diff --git a/.changeset/clean-staged-media.md b/.changeset/clean-staged-media.md deleted file mode 100644 index 626004327..000000000 --- a/.changeset/clean-staged-media.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Keep pasted image and video attachments available in session history. diff --git a/.changeset/daemon-file-ref-drop-path.md b/.changeset/daemon-file-ref-drop-path.md deleted file mode 100644 index dfc44c31c..000000000 --- a/.changeset/daemon-file-ref-drop-path.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code-sdk": minor ---- - -Daemon file references no longer persist a materialization path; the display path is derived from the session media store at read time. diff --git a/.changeset/fix-gemini-thought-signature.md b/.changeset/fix-gemini-thought-signature.md deleted file mode 100644 index 75caa22b0..000000000 --- a/.changeset/fix-gemini-thought-signature.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Fix Gemini tool-calling sessions failing on follow-up requests. diff --git a/.changeset/fix-tool-call-422-strict-providers.md b/.changeset/fix-tool-call-422-strict-providers.md new file mode 100644 index 000000000..5449e85ee --- /dev/null +++ b/.changeset/fix-tool-call-422-strict-providers.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Fix 422 errors from some OpenAI-compatible providers when a conversation includes tool calls. diff --git a/.changeset/fix-utf8-text-binary-detection.md b/.changeset/fix-utf8-text-binary-detection.md deleted file mode 100644 index 951e6a77b..000000000 --- a/.changeset/fix-utf8-text-binary-detection.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Fix text files containing Chinese or emoji being misdetected as binary in the web UI. diff --git a/.changeset/fork-print-resume-command.md b/.changeset/fork-print-resume-command.md deleted file mode 100644 index a9148dc3e..000000000 --- a/.changeset/fork-print-resume-command.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Print and copy the full `kimi --resume` command after `/fork`. diff --git a/.changeset/goal-objective-length-warning.md b/.changeset/goal-objective-length-warning.md deleted file mode 100644 index 6a5b1815a..000000000 --- a/.changeset/goal-objective-length-warning.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Warn when a typed `/goal` objective exceeds the 4000-character limit, and keep the input if it is rejected. diff --git a/.changeset/inline-multi-skill-sdk.md b/.changeset/inline-multi-skill-sdk.md deleted file mode 100644 index ce0221b81..000000000 --- a/.changeset/inline-multi-skill-sdk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code-sdk": minor ---- - -Add `session.promptWithSkills(input, skills)` to submit one prompt with multiple skill activations in a single turn (v2 engine only). diff --git a/.changeset/inline-multi-skill-tui.md b/.changeset/inline-multi-skill-tui.md deleted file mode 100644 index aadadc77b..000000000 --- a/.changeset/inline-multi-skill-tui.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": minor ---- - -Activate multiple skills in a single prompt. Type `/` after whitespace to insert a skill token. diff --git a/.changeset/inline-slash-trigger-pi-tui.md b/.changeset/inline-slash-trigger-pi-tui.md deleted file mode 100644 index fffe58b26..000000000 --- a/.changeset/inline-slash-trigger-pi-tui.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/pi-tui": patch ---- - -Add an opt-in inline slash autocomplete trigger that fires after whitespace mid-input. diff --git a/.changeset/lazy-global-search-startup.md b/.changeset/lazy-global-search-startup.md deleted file mode 100644 index 4d9a1a240..000000000 --- a/.changeset/lazy-global-search-startup.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Fix slow startup by loading the global search index on demand. diff --git a/.changeset/mcp-oauth-authenticate-tool.md b/.changeset/mcp-oauth-authenticate-tool.md new file mode 100644 index 000000000..12e3e7fe8 --- /dev/null +++ b/.changeset/mcp-oauth-authenticate-tool.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Fix the missing OAuth authenticate tool for remote MCP servers that require login. diff --git a/.changeset/media-registrar-stale-alias.md b/.changeset/media-registrar-stale-alias.md deleted file mode 100644 index ff4885835..000000000 --- a/.changeset/media-registrar-stale-alias.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Fix a startup error when a restored session references a model that is no longer configured. diff --git a/.changeset/persist-token-counting-ledger.md b/.changeset/persist-token-counting-ledger.md deleted file mode 100644 index 9876b5019..000000000 --- a/.changeset/persist-token-counting-ledger.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Fix the displayed context size dropping to a smaller estimate after archiving and resuming a session. diff --git a/.changeset/queue-skill-commands-while-busy.md b/.changeset/queue-skill-commands-while-busy.md deleted file mode 100644 index 3ce8fdb63..000000000 --- a/.changeset/queue-skill-commands-while-busy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Queue slash skill commands entered while the agent is busy instead of rejecting them. diff --git a/.changeset/sdk-upload-file.md b/.changeset/sdk-upload-file.md deleted file mode 100644 index 33f52df98..000000000 --- a/.changeset/sdk-upload-file.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code-sdk": minor ---- - -Add `uploadFile` for uploading media and referencing it from prompts, and an optional `promptId` on prompt submissions. Both require the v2 harness. diff --git a/.changeset/subagent-spawned-task-id.md b/.changeset/subagent-spawned-task-id.md new file mode 100644 index 000000000..10e230a19 --- /dev/null +++ b/.changeset/subagent-spawned-task-id.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Emit subagent.spawned after the run's task registration so the signal carries the task id clients bind cancel/status actions to. diff --git a/.changeset/swift-views-scream.md b/.changeset/swift-views-scream.md new file mode 100644 index 000000000..701fd39ab --- /dev/null +++ b/.changeset/swift-views-scream.md @@ -0,0 +1,5 @@ +--- +"kimi-code": patch +--- + +multi-select question jumps to next after only one answer selected diff --git a/.changeset/tidy-media-tool-hints.md b/.changeset/tidy-media-tool-hints.md new file mode 100644 index 000000000..3777306e6 --- /dev/null +++ b/.changeset/tidy-media-tool-hints.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Stop recommending specific other tools in Read tool descriptions and error messages, which could point models to tools that are not available. diff --git a/.changeset/undo-todo-panel-revert.md b/.changeset/undo-todo-panel-revert.md deleted file mode 100644 index a9475f295..000000000 --- a/.changeset/undo-todo-panel-revert.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Fix /undo not restoring the todo list to its state before the undone turn. diff --git a/.changeset/v1-mcp-management-plane-sdk.md b/.changeset/v1-mcp-management-plane-sdk.md deleted file mode 100644 index 7ff189ff6..000000000 --- a/.changeset/v1-mcp-management-plane-sdk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code-sdk": minor ---- - -Unify the MCP management surface behind a source-tagged registry, covering plugin-declared servers in `listMcpServers` and adding `getMcpServer`, `testMcpServerConfig`, runtime `addMcpServer`, `inspectAppMcpServers`, and an `oauth-expired` auth state. diff --git a/.changeset/v1-mcp-management-plane-vscode.md b/.changeset/v1-mcp-management-plane-vscode.md deleted file mode 100644 index b545e4139..000000000 --- a/.changeset/v1-mcp-management-plane-vscode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"kimi-code": patch ---- - -Show plugin- and file-declared MCP servers as read-only entries in the MCP servers panel. diff --git a/.changeset/v1-mcp-management-plane.md b/.changeset/v1-mcp-management-plane.md deleted file mode 100644 index 4857d7892..000000000 --- a/.changeset/v1-mcp-management-plane.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -On the legacy engine, plugin MCP server changes and OAuth sign-in now take effect in open sessions immediately. diff --git a/.changeset/wait-for-progress.md b/.changeset/wait-for-progress.md new file mode 100644 index 000000000..b11419bf6 --- /dev/null +++ b/.changeset/wait-for-progress.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Show a live status line with elapsed time and remaining task count while the WaitFor tool is waiting. diff --git a/.changeset/wait-for-tool.md b/.changeset/wait-for-tool.md new file mode 100644 index 000000000..f195b6500 --- /dev/null +++ b/.changeset/wait-for-tool.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": minor +--- + +Add the WaitFor tool: the agent can now wait for a background task (sub-agent, background bash, or background question) inside the current turn — with an optional task ID and a required timeout of up to 600 seconds — instead of ending the turn and being re-invoked. diff --git a/.changeset/wait-for-tui-display.md b/.changeset/wait-for-tui-display.md new file mode 100644 index 000000000..c9dcea034 --- /dev/null +++ b/.changeset/wait-for-tui-display.md @@ -0,0 +1,5 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +Improve the WaitFor tool's transcript display: the header shows the waited task and its outcome, and the body summarizes the finished task, other tasks that completed during the wait, and tasks still running, instead of dumping raw fields. diff --git a/.changeset/web-title-flag.md b/.changeset/web-title-flag.md deleted file mode 100644 index 82d074b86..000000000 --- a/.changeset/web-title-flag.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@moonshot-ai/kimi-code": patch ---- - -Add `kimi web --web-title ` to set a custom browser tab title for the web UI. diff --git a/apps/kimi-code/CHANGELOG.md b/apps/kimi-code/CHANGELOG.md index ab853df7d..4f5b50a7a 100644 --- a/apps/kimi-code/CHANGELOG.md +++ b/apps/kimi-code/CHANGELOG.md @@ -1,5 +1,95 @@ # @moonshot-ai/kimi-code +## 0.37.2 + +### Patch Changes + +- [#3061](https://github.com/MoonshotAI/kimi-code/pull/3061) [`5c661f4`](https://github.com/MoonshotAI/kimi-code/commit/5c661f4610f36481dbf2f9598aa63f49004e4980) Thanks [@wbxl2000](https://github.com/wbxl2000)! - web: the subagent detail panel now keeps the working process fully expanded and drops the end-of-turn timestamp footer. + +- [#3061](https://github.com/MoonshotAI/kimi-code/pull/3061) [`5c661f4`](https://github.com/MoonshotAI/kimi-code/commit/5c661f4610f36481dbf2f9598aa63f49004e4980) Thanks [@wbxl2000](https://github.com/wbxl2000)! - web: Settings gains a Lab tab with a multi-tab sidebar toggle (off by default); when enabled, the sidebar shows the Open / Done / Workspaces tabs. + +## 0.37.1 + +### Patch Changes + +- [#3053](https://github.com/MoonshotAI/kimi-code/pull/3053) [`95cede8`](https://github.com/MoonshotAI/kimi-code/commit/95cede82b4d3b6cb1845c66e87896ab2e5fd9ba5) Thanks [@7Sageer](https://github.com/7Sageer)! - Fix pasted images failing to reach the model on first send. + +- [#3047](https://github.com/MoonshotAI/kimi-code/pull/3047) [`c9c34ae`](https://github.com/MoonshotAI/kimi-code/commit/c9c34ae5a8626f133bd1b9c34cac0f3270e35b8d) Thanks [@7Sageer](https://github.com/7Sageer)! - Fix pasted videos failing to submit instead of reaching the model. + +## 0.37.0 + +### Minor Changes + +- [#2935](https://github.com/MoonshotAI/kimi-code/pull/2935) [`44a6c70`](https://github.com/MoonshotAI/kimi-code/commit/44a6c70e66762ea9e122f8dceae16dc759086a7c) Thanks [@chengluyu](https://github.com/chengluyu)! - Activate multiple skills in a single prompt. Type `/` after whitespace to insert a skill token. + +- [#2994](https://github.com/MoonshotAI/kimi-code/pull/2994) [`8c865f4`](https://github.com/MoonshotAI/kimi-code/commit/8c865f48173011439cfc2e140e45586e59b6bfcf) Thanks [@liruifengv](https://github.com/liruifengv)! - The Windows native (single-binary) CLI now supports automatic updates. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: the sidebar gains Open / Done / Workspaces tabs, and sessions can be marked as done (and reopened) to keep the open list focused. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: added a session management page (from the sidebar's list-management menu) for cross-workspace triage — filter by workspace, status, and updated time, and batch mark sessions as done or reopen them. + +### Patch Changes + +- [#2593](https://github.com/MoonshotAI/kimi-code/pull/2593) [`d833a1a`](https://github.com/MoonshotAI/kimi-code/commit/d833a1a893c4d69d96af542f40557442992085e0) Thanks [@7Sageer](https://github.com/7Sageer)! - Keep pasted image and video attachments available in session history. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: @-mentioned files, folders, and skills in chat messages now render as icon pills. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: renamed the Subagent panel to "Background Agent". + +- [#2914](https://github.com/MoonshotAI/kimi-code/pull/2914) [`1cf617d`](https://github.com/MoonshotAI/kimi-code/commit/1cf617d769a887f5d8306ebc16a1e078b5e47049) Thanks [@SeleneXX](https://github.com/SeleneXX)! - Fix Gemini tool-calling sessions failing on follow-up requests. + +- [#2972](https://github.com/MoonshotAI/kimi-code/pull/2972) [`04d23e2`](https://github.com/MoonshotAI/kimi-code/commit/04d23e2dab776c480d24cfa033c9500543c75a3b) Thanks [@sailist](https://github.com/sailist)! - Fix text files containing Chinese or emoji being misdetected as binary in the web UI. + +- [#2940](https://github.com/MoonshotAI/kimi-code/pull/2940) [`6b72345`](https://github.com/MoonshotAI/kimi-code/commit/6b72345f8bb03487e3bcc05b541e65484818428c) Thanks [@bj456736](https://github.com/bj456736)! - Print and copy the full `kimi --resume` command after `/fork`. + +- [#2928](https://github.com/MoonshotAI/kimi-code/pull/2928) [`d96cd03`](https://github.com/MoonshotAI/kimi-code/commit/d96cd037702637305422222e985139e51ff83c8c) Thanks [@chengluyu](https://github.com/chengluyu)! - Warn when a typed `/goal` objective exceeds the 4000-character limit, and keep the input if it is rejected. + +- [#2633](https://github.com/MoonshotAI/kimi-code/pull/2633) [`f492cd7`](https://github.com/MoonshotAI/kimi-code/commit/f492cd7c9e03666ecfd10dc47ca9b48c35de2318) Thanks [@tpoisonooo](https://github.com/tpoisonooo)! - Fix slow startup by loading the global search index on demand. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: fixed YAML frontmatter in messages rendering as a giant heading — it now shows as a small meta block. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: fixed plain text like "(c)", "(tm)", and "--" in messages being rewritten as ©, ™, and dashes — message text now renders verbatim. + +- [#2985](https://github.com/MoonshotAI/kimi-code/pull/2985) [`a7dc1ea`](https://github.com/MoonshotAI/kimi-code/commit/a7dc1ea28445555d5944066936fdf6e1b21d27ea) Thanks [@bj456736](https://github.com/bj456736)! - Fix a startup error when a restored session references a model that is no longer configured. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: hovering a mention pill now shows a detail bubble (full path for files and folders, description plus an open button for skills), skill and file mentions in messages are clickable, long file names middle-ellipsize, and deleted files are struck through. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: fixed long task panel titles pushing the status badge, copy, and close buttons out of view — titles now ellipsize and show the full text on hover. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: fixed pasting a copied folder into the composer failing the upload with a connection error — folders are now skipped instead. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: reduced animation power draw — the mascot and home doodle pause while hidden or scrolled offscreen, and looping animations play once and stop when the system's "reduce motion" setting is on. + +- [#2969](https://github.com/MoonshotAI/kimi-code/pull/2969) [`ee564e5`](https://github.com/MoonshotAI/kimi-code/commit/ee564e5ec90afd068123b8052928c53f1fd5a27d) Thanks [@sailist](https://github.com/sailist)! - Fix the displayed context size dropping to a smaller estimate after archiving and resuming a session. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: the plan review feedback box now auto-grows with its content, so longer rejection reasons are easier to write. + +- [#2633](https://github.com/MoonshotAI/kimi-code/pull/2633) [`f492cd7`](https://github.com/MoonshotAI/kimi-code/commit/f492cd7c9e03666ecfd10dc47ca9b48c35de2318) Thanks [@tpoisonooo](https://github.com/tpoisonooo)! - Queue slash skill commands entered while the agent is busy instead of rejecting them. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: the search dialog now finds workspaces too, and picking a workspace or session result expands the sidebar and scrolls the item into view. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: fixed sent image and video attachments rendering broken in session history after a refresh or reopen. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: fixed empty replies left by manually stopped answers still showing a completion time after reloading the page. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: fixed background agent tasks not being cancellable during their first moments after starting. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: fixed foreground subagents leaking into the Background Agent panel, which broke the count and left finished rows stuck as running and unstoppable. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: merged the task panel's two copy icons into a single button with a dropdown menu (copy command / copy output / copy all), with keyboard and touch-friendly targets. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: fixed cancelled or abnormally ended background tasks showing as completed. + +- [#3016](https://github.com/MoonshotAI/kimi-code/pull/3016) [`98ebda8`](https://github.com/MoonshotAI/kimi-code/commit/98ebda840a1e420f57a05ec680cbeca41a2419d7) Thanks [@sailist](https://github.com/sailist)! - Fix /undo not restoring the todo list to its state before the undone turn. + +- [#2858](https://github.com/MoonshotAI/kimi-code/pull/2858) [`59dde73`](https://github.com/MoonshotAI/kimi-code/commit/59dde734f37596db5c77794060f81bfb3c1dbeb6) Thanks [@7Sageer](https://github.com/7Sageer)! - On the legacy engine, plugin MCP server changes and OAuth sign-in now take effect in open sessions immediately. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: the browser tab title now shows the current workspace directory name (override with the new `--web-title` flag), making instances on multiple machines easier to tell apart. + +- [#3043](https://github.com/MoonshotAI/kimi-code/pull/3043) [`e31b3a3`](https://github.com/MoonshotAI/kimi-code/commit/e31b3a335ed49139c1aa3abb6b45a244fa17356a) Thanks [@liruifengv](https://github.com/liruifengv)! - web: fixed Ctrl+K in the composer opening session search on macOS instead of deleting to end of line — session search now only answers to Cmd+K. + +- [#2989](https://github.com/MoonshotAI/kimi-code/pull/2989) [`09976b0`](https://github.com/MoonshotAI/kimi-code/commit/09976b09140c412f81a38cc00191f88bee4a9437) Thanks [@bj456736](https://github.com/bj456736)! - Add `kimi web --web-title <title>` to set a custom browser tab title for the web UI. + ## 0.36.1 ### Patch Changes diff --git a/apps/kimi-code/dist-web/assets/CodeBlockNode-CZYIqTV_.js b/apps/kimi-code/dist-web/assets/CodeBlockNode-EUGAgT_h.js similarity index 99% rename from apps/kimi-code/dist-web/assets/CodeBlockNode-CZYIqTV_.js rename to apps/kimi-code/dist-web/assets/CodeBlockNode-EUGAgT_h.js index fe2b6d5e2..57790a822 100644 --- a/apps/kimi-code/dist-web/assets/CodeBlockNode-CZYIqTV_.js +++ b/apps/kimi-code/dist-web/assets/CodeBlockNode-EUGAgT_h.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Cj2NmNUG.js","assets/index-_5lXYMaO.js","assets/index-C_ObXpF5.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as Ho,M as pl,bl as Ci,af as fl,bY as Mi,cc as Bi,b$ as hl,aU as $,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Mo,aD as No,bE as ue,az as Li,cd as wn,c8 as mt,aI as To,aL as Y,s as Sn,aw as Vt,au as pt,bk as J,ce as Bo,u as ie,I as Ro,A as Oi,bJ as Gt,aY as ht,bL as vl,v as w,t as we,bB as ml,bb as Be,q as b,b7 as $i,cf as zi,cg as bn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as A,cl as Eo,cm as Di,cn as Ai,co as Wt,cp as Fo,bO as Do,T as ji,G as qi,F as Po,g as Wi,c7 as _i,b_ as Ii}from"./index-_5lXYMaO.js";import{i as fe,t as kn}from"./safeRaf-DGuzXxDK.js";var xn=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,M)).next())});let Lo=!1,_t=null,It=null,Ut=null;function Ui(){return xn(this,null,function*(){if(Ut)return Ut;Ut=xn(null,null,function*(){if(!It)try{if(It=(function(k){const M=k;if(typeof M?.useMonaco=="function")return M;const y=k?.default;return typeof y?.useMonaco=="function"?y:null})(yield xi(()=>import("./index-Cj2NmNUG.js"),__vite__mapDeps([0,1,2]))),!It)return null}catch{return null}try{return yield(function(k){return xn(this,null,function*(){return Lo?void 0:_t||(_t=xn(null,null,function*(){const y=globalThis?.MonacoEnvironment;y&&(typeof y.getWorker=="function"||typeof y.getWorkerUrl=="function")||typeof k?.preloadMonacoWorkers!="function"||(yield k.preloadMonacoWorkers()),Lo=!0}).finally(()=>{_t=null}),_t)})})(It),Si(),It}catch{return null}});try{return yield Ut}finally{Ut=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,$o=(k,M,y)=>M in k?Vi(k,M,{enumerable:!0,configurable:!0,writable:!0,value:y}):k[M]=y,U=(k,M)=>{for(var y in M||(M={}))Yi.call(M,y)&&$o(k,y,M[y]);if(Oo)for(var y of Oo(M))Qi.call(M,y)&&$o(k,y,M[y]);return k},Me=(k,M)=>Gi(k,Ji(M)),j=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=pl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(k,{emit:M}){const y=k,te=M,ne=$(!1),be=$(null),ke=$(null);function r(){mt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",H,{once:!0,capture:!0})}function P(){mt(!0),ne.value=!1}function H(Q){var v,z;const wt=Q.target;(v=be.value)!=null&&v.contains(wt)||(z=ke.value)!=null&&z.contains(wt)?document.addEventListener("click",H,{once:!0,capture:!0}):P()}const re=b(()=>y.showFontSizeButtons&&y.enableFontSizeControl||y.showExpandButton||y.isPreviewable&&y.showPreviewButton),{t:T}=hl(),gt=b(()=>y.showTooltips!==!1);function Ge(Q,v){gt.value&&_i(Q.currentTarget,v,"top",!1,void 0,y.isDark)}function Ee(){gt.value&&mt()}function yt(Q){Ge(Q,y.copyText?T("common.copied")||"Copied":T("common.copy")||"Copy")}const gl=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)<=((v=y.codeFontMin)!=null?v:0)}),Jt=b(()=>!y.fontBaselineReady||y.codeFontSize===y.defaultCodeFontSize),Yt=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)>=((v=y.codeFontMax)!=null?v:100)});return(Q,v)=>(Y(),ie(Po,null,[y.showHeader?(Y(),ie("div",Xi,[ht(Q.$slots,"header-left"),ht(Q.$slots,"header-right",{},()=>[w("div",Ki,[k.diffStats?(Y(),ie("div",{key:0,class:"code-diff-stats","aria-label":k.diffStatsAriaLabel},[w("span",er,"-"+Be(k.diffStats.removed),1),w("span",tr,"+"+Be(k.diffStats.added),1)],8,Zi)):we("",!0),y.showCopyButton?(Y(),ie("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":k.copyText?J(T)("common.copied")||"Copied":J(T)("common.copy")||"Copy",onClick:v[0]||(v[0]=z=>te("copy")),onMouseenter:v[1]||(v[1]=z=>yt(z)),onFocus:v[2]||(v[2]=z=>yt(z)),onMouseleave:Ee,onBlur:Ee},[k.copyText?(Y(),ie("svg",or,[...v[14]||(v[14]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(Y(),ie("svg",lr,[...v[13]||(v[13]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),w("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):we("",!0),y.showCollapseButton?(Y(),ie("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":k.isCollapsed,onClick:v[3]||(v[3]=z=>te("toggleCollapse")),onMouseenter:v[4]||(v[4]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onFocus:v[5]||(v[5]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onMouseleave:Ee,onBlur:Ee},[(Y(),ie("svg",{style:Vt({rotate:k.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...v[15]||(v[15]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):we("",!0),re.value?(Y(),ie("div",rr,[w("button",{ref_key:"moreBtnRef",ref:ke,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Do(r,["stop"]),onMouseenter:v[6]||(v[6]=z=>Ge(z,J(T)("common.more")||"More")),onFocus:v[7]||(v[7]=z=>Ge(z,J(T)("common.more")||"More")),onMouseleave:Ee,onBlur:Ee},[...v[16]||(v[16]=[qi('<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="currentColor"><circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle></g></svg>',1)])],40,ar),Ro(Wi,{name:"code-menu"},{default:Gt(()=>[ne.value?(Y(),ie("div",{key:0,ref_key:"moreMenuRef",ref:be,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[y.showFontSizeButtons&&y.enableFontSizeControl?(Y(),ie(Po,{key:0},[w("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:gl.value,onClick:v[8]||(v[8]=z=>{J(mt)(!0),te("decreaseFont")})},[v[17]||(v[17]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),w("span",null,Be(J(T)("common.fontSmaller")||"Font size −"),1)],8,ur),w("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Jt.value,onClick:v[9]||(v[9]=z=>{J(mt)(!0),te("resetFont")})},[v[18]||(v[18]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),w("path",{d:"M3 3v5h5"})])],-1)),w("span",null,Be(J(T)("common.fontReset")||"Font size reset"),1)],8,sr),w("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Yt.value,onClick:v[10]||(v[10]=z=>{J(mt)(!0),te("increaseFont")})},[v[19]||(v[19]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),w("span",null,Be(J(T)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):we("",!0),y.showExpandButton?(Y(),ie("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:v[11]||(v[11]=z=>{P(),te("toggleExpand")})},[k.isExpanded?(Y(),ie("svg",cr,[...v[20]||(v[20]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(Y(),ie("svg",fr,[...v[21]||(v[21]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),w("span",null,Be(k.isExpanded?J(T)("common.collapse")||"Collapse":J(T)("common.expand")||"Expand"),1)])):we("",!0),k.isPreviewable&&y.showPreviewButton?(Y(),ie("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:v[12]||(v[12]=z=>{P(),te("preview")})},[v[22]||(v[22]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),w("circle",{cx:"12",cy:"12",r:"3"})])],-1)),w("span",null,Be(J(T)("common.preview")||"Preview"),1)])):we("",!0)],512)):we("",!0)]),_:1})])):we("",!0)])])])):we("",!0),vl(w("div",{class:pt(["code-block-shell-content",{"code-block-shell-content--collapsed":k.isCollapsed}])},[ht(Q.$slots,"default")],2),[[ml,!!k.stream||!k.loading]]),vl(w("div",vr,[ht(Q.$slots,"loading",{},()=>[v[23]||(v[23]=w("div",{class:"loading-skeleton"},[w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line short"})],-1))])],512),[[ml,!k.stream&&k.loading]]),w("span",mr,Be(k.copyText?J(T)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=Ho(pl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(k){const M=k,y=import.meta!==void 0&&!1;let te=null;const{t:ne}=hl(),be=b(()=>{const P=M.code||"",H=P.trim().toLowerCase();return H.startsWith("<!doctype")||H.startsWith("<html")||H.startsWith("<body")?P:`<!doctype html> +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DXophRCW.js","assets/index-yKYHPeXU.js","assets/index-DBtc5buz.css"])))=>i.map(i=>d[i]); +import{bR as xi,cb as Si,bQ as Ho,M as pl,bl as Ci,af as fl,bY as Mi,cc as Bi,b$ as hl,aU as $,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Mo,aD as No,bE as ue,az as Li,cd as wn,c8 as mt,aI as To,aL as Y,s as Sn,aw as Vt,au as pt,bk as J,ce as Bo,u as ie,I as Ro,A as Oi,bJ as Gt,aY as ht,bL as vl,v as w,t as we,bB as ml,bb as Be,q as b,b7 as $i,cf as zi,cg as bn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as A,cl as Eo,cm as Di,cn as Ai,co as Wt,cp as Fo,bO as Do,T as ji,G as qi,F as Po,g as Wi,c7 as _i,b_ as Ii}from"./index-yKYHPeXU.js";import{i as fe,t as kn}from"./safeRaf-DGuzXxDK.js";var xn=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,M)).next())});let Lo=!1,_t=null,It=null,Ut=null;function Ui(){return xn(this,null,function*(){if(Ut)return Ut;Ut=xn(null,null,function*(){if(!It)try{if(It=(function(k){const M=k;if(typeof M?.useMonaco=="function")return M;const y=k?.default;return typeof y?.useMonaco=="function"?y:null})(yield xi(()=>import("./index-DXophRCW.js"),__vite__mapDeps([0,1,2]))),!It)return null}catch{return null}try{return yield(function(k){return xn(this,null,function*(){return Lo?void 0:_t||(_t=xn(null,null,function*(){const y=globalThis?.MonacoEnvironment;y&&(typeof y.getWorker=="function"||typeof y.getWorkerUrl=="function")||typeof k?.preloadMonacoWorkers!="function"||(yield k.preloadMonacoWorkers()),Lo=!0}).finally(()=>{_t=null}),_t)})})(It),Si(),It}catch{return null}});try{return yield Ut}finally{Ut=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Oo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,$o=(k,M,y)=>M in k?Vi(k,M,{enumerable:!0,configurable:!0,writable:!0,value:y}):k[M]=y,U=(k,M)=>{for(var y in M||(M={}))Yi.call(M,y)&&$o(k,y,M[y]);if(Oo)for(var y of Oo(M))Qi.call(M,y)&&$o(k,y,M[y]);return k},Me=(k,M)=>Gi(k,Ji(M)),j=(k,M,y)=>new Promise((te,ne)=>{var be=P=>{try{r(y.next(P))}catch(H){ne(H)}},ke=P=>{try{r(y.throw(P))}catch(H){ne(H)}},r=P=>P.done?te(P.value):Promise.resolve(P.value).then(be,ke);r((y=y.apply(k,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=pl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(k,{emit:M}){const y=k,te=M,ne=$(!1),be=$(null),ke=$(null);function r(){mt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",H,{once:!0,capture:!0})}function P(){mt(!0),ne.value=!1}function H(Q){var v,z;const wt=Q.target;(v=be.value)!=null&&v.contains(wt)||(z=ke.value)!=null&&z.contains(wt)?document.addEventListener("click",H,{once:!0,capture:!0}):P()}const re=b(()=>y.showFontSizeButtons&&y.enableFontSizeControl||y.showExpandButton||y.isPreviewable&&y.showPreviewButton),{t:T}=hl(),gt=b(()=>y.showTooltips!==!1);function Ge(Q,v){gt.value&&_i(Q.currentTarget,v,"top",!1,void 0,y.isDark)}function Ee(){gt.value&&mt()}function yt(Q){Ge(Q,y.copyText?T("common.copied")||"Copied":T("common.copy")||"Copy")}const gl=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)<=((v=y.codeFontMin)!=null?v:0)}),Jt=b(()=>!y.fontBaselineReady||y.codeFontSize===y.defaultCodeFontSize),Yt=b(()=>{var Q,v;return!!Number.isFinite(y.codeFontSize)&&((Q=y.codeFontSize)!=null?Q:0)>=((v=y.codeFontMax)!=null?v:100)});return(Q,v)=>(Y(),ie(Po,null,[y.showHeader?(Y(),ie("div",Xi,[ht(Q.$slots,"header-left"),ht(Q.$slots,"header-right",{},()=>[w("div",Ki,[k.diffStats?(Y(),ie("div",{key:0,class:"code-diff-stats","aria-label":k.diffStatsAriaLabel},[w("span",er,"-"+Be(k.diffStats.removed),1),w("span",tr,"+"+Be(k.diffStats.added),1)],8,Zi)):we("",!0),y.showCopyButton?(Y(),ie("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":k.copyText?J(T)("common.copied")||"Copied":J(T)("common.copy")||"Copy",onClick:v[0]||(v[0]=z=>te("copy")),onMouseenter:v[1]||(v[1]=z=>yt(z)),onFocus:v[2]||(v[2]=z=>yt(z)),onMouseleave:Ee,onBlur:Ee},[k.copyText?(Y(),ie("svg",or,[...v[14]||(v[14]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(Y(),ie("svg",lr,[...v[13]||(v[13]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),w("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):we("",!0),y.showCollapseButton?(Y(),ie("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":k.isCollapsed,onClick:v[3]||(v[3]=z=>te("toggleCollapse")),onMouseenter:v[4]||(v[4]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onFocus:v[5]||(v[5]=z=>Ge(z,k.isCollapsed?J(T)("common.expand")||"Expand":J(T)("common.collapse")||"Collapse")),onMouseleave:Ee,onBlur:Ee},[(Y(),ie("svg",{style:Vt({rotate:k.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...v[15]||(v[15]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):we("",!0),re.value?(Y(),ie("div",rr,[w("button",{ref_key:"moreBtnRef",ref:ke,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Do(r,["stop"]),onMouseenter:v[6]||(v[6]=z=>Ge(z,J(T)("common.more")||"More")),onFocus:v[7]||(v[7]=z=>Ge(z,J(T)("common.more")||"More")),onMouseleave:Ee,onBlur:Ee},[...v[16]||(v[16]=[qi('<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="1em" height="1em" viewBox="0 0 24 24" class="action-icon"><g fill="currentColor"><circle cx="12" cy="5" r="1.5"></circle><circle cx="12" cy="12" r="1.5"></circle><circle cx="12" cy="19" r="1.5"></circle></g></svg>',1)])],40,ar),Ro(Wi,{name:"code-menu"},{default:Gt(()=>[ne.value?(Y(),ie("div",{key:0,ref_key:"moreMenuRef",ref:be,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[y.showFontSizeButtons&&y.enableFontSizeControl?(Y(),ie(Po,{key:0},[w("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:gl.value,onClick:v[8]||(v[8]=z=>{J(mt)(!0),te("decreaseFont")})},[v[17]||(v[17]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),w("span",null,Be(J(T)("common.fontSmaller")||"Font size −"),1)],8,ur),w("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Jt.value,onClick:v[9]||(v[9]=z=>{J(mt)(!0),te("resetFont")})},[v[18]||(v[18]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),w("path",{d:"M3 3v5h5"})])],-1)),w("span",null,Be(J(T)("common.fontReset")||"Font size reset"),1)],8,sr),w("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Yt.value,onClick:v[10]||(v[10]=z=>{J(mt)(!0),te("increaseFont")})},[v[19]||(v[19]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),w("span",null,Be(J(T)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):we("",!0),y.showExpandButton?(Y(),ie("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:v[11]||(v[11]=z=>{P(),te("toggleExpand")})},[k.isExpanded?(Y(),ie("svg",cr,[...v[20]||(v[20]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(Y(),ie("svg",fr,[...v[21]||(v[21]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),w("span",null,Be(k.isExpanded?J(T)("common.collapse")||"Collapse":J(T)("common.expand")||"Expand"),1)])):we("",!0),k.isPreviewable&&y.showPreviewButton?(Y(),ie("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:v[12]||(v[12]=z=>{P(),te("preview")})},[v[22]||(v[22]=w("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),w("circle",{cx:"12",cy:"12",r:"3"})])],-1)),w("span",null,Be(J(T)("common.preview")||"Preview"),1)])):we("",!0)],512)):we("",!0)]),_:1})])):we("",!0)])])])):we("",!0),vl(w("div",{class:pt(["code-block-shell-content",{"code-block-shell-content--collapsed":k.isCollapsed}])},[ht(Q.$slots,"default")],2),[[ml,!!k.stream||!k.loading]]),vl(w("div",vr,[ht(Q.$slots,"loading",{},()=>[v[23]||(v[23]=w("div",{class:"loading-skeleton"},[w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line"}),w("div",{class:"skeleton-line short"})],-1))])],512),[[ml,!k.stream&&k.loading]]),w("span",mr,Be(k.copyText?J(T)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=Ho(pl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(k){const M=k,y=import.meta!==void 0&&!1;let te=null;const{t:ne}=hl(),be=b(()=>{const P=M.code||"",H=P.trim().toLowerCase();return H.startsWith("<!doctype")||H.startsWith("<html")||H.startsWith("<body")?P:`<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-B4B2cx0C.js b/apps/kimi-code/dist-web/assets/DesignSystemView-B4B2cx0C.js new file mode 100644 index 000000000..e2afff6d4 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/DesignSystemView-B4B2cx0C.js @@ -0,0 +1,13 @@ +import{M as z,aD as q,aI as A,aL as n,u as l,v as t,G as c,H as e,F as u,aX as y,bb as k,I as s,bk as d,cx as o,cy as B,cz as x,cA as M,cB as h,cC as I,cD as E}from"./index-yKYHPeXU.js";const D={class:"ds-page"},H={class:"layout"},V={class:"content"},L={class:"content-inner"},R={id:"tokens"},O={class:"icon-sizes"},W={class:"sz"},N={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},F={class:"sz"},j={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},G={class:"icon-grid"},K={class:"icon-group-label"},J={class:"ic-name"},Y={id:"primitives"},Q={class:"stage-wrap"},Z={class:"stage p"},X={class:"p-pill",style:{color:"var(--p-warning)"}},$={class:"stage-wrap"},_={class:"stage p col"},aa={class:"demo-row"},ta={class:"p-btn primary disabled"},ea={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},sa={class:"stage-wrap"},da={class:"stage p col"},oa={class:"demo-row"},ca={class:"stage-wrap"},ia={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},na={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},la={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ra={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ba={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},va={id:"chat"},pa={class:"stage-wrap"},ha={class:"stage p col"},ua={style:{"max-width":"560px",width:"100%"}},ga={class:"stage-wrap"},ma={class:"stage p col",style:{"align-items":"center",background:"#fff"}},fa={class:"p-composer",style:{width:"100%","max-width":"620px"}},wa={class:"p-composer-bar"},ya={class:"p-composer-left"},ka={class:"p-pill",style:{color:"var(--p-warning)"}},xa={class:"stage-wrap"},Ta={class:"stage p",style:{background:"var(--p-bg)"}},Sa={class:"am-mock"},Ca={class:"am-mock-row focus"},za={class:"am-mock-row"},qa={class:"am-mock-row"},Aa={class:"am-mock-row"},Ba={class:"dt"},Ma={class:"dw-spin"},Ia={class:"stage-wrap"},Ea={class:"stage p",style:{background:"var(--p-bg)"}},Da={class:"dw-bar"},Ha={class:"dw-pill"},Va={class:"dw-pill"},La={class:"dw-pill on"},Ra={class:"dw-running"},Oa={class:"dw-pill"},Wa={class:"stage-wrap"},Na={class:"stage p col",style:{background:"var(--p-bg)",gap:"var(--space-4)"}},Pa={class:"dw-panel"},Ua={class:"dw-head"},Fa={class:"dw-tab"},ja={class:"dw-chips"},Ga={class:"dw-chip on"},Ka={class:"dw-chip"},Ja={class:"dw-chip"},Ya={class:"dw-chip"},Qa={class:"dw-body col"},Za={class:"dw-row"},Xa={class:"dw-row"},$a={class:"dw-row fail"},_a={class:"dw-row cancelled"},at={class:"dw-panel"},tt={class:"dw-head"},et={class:"dw-tab"},st={class:"dw-chips"},dt={class:"dw-chip on"},ot={class:"dw-chip"},ct={class:"dw-chip"},it={class:"dw-chip"},nt={class:"dw-body grid"},lt={class:"dw-card"},rt={class:"cf"},bt={class:"cm"},vt={class:"cs"},pt={class:"sl"},ht={class:"tm"},ut={class:"dw-card"},gt={class:"cf"},mt={class:"cm"},ft={class:"cs"},wt={class:"sl"},yt={class:"tm"},kt={class:"dw-card fail"},xt={class:"cf"},Tt={class:"cm"},St={class:"cs"},Ct={class:"sl"},zt={class:"tm"},qt={class:"dw-card"},At={class:"cf"},Bt={class:"cm"},Mt={class:"cs"},It={class:"sl"},Et={class:"tm"},Dt="/repo",Ht=z({__name:"DesignSystemView",emits:["close"],setup(Vt,{emit:T}){const S=[{path:"/repo/apps/web/src/components/chat/TurnFilesSummary.vue",added:19,removed:4,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/composables/useFilePreview.ts",added:8,removed:1,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/components/chatTurnRendering.ts",added:0,removed:0,hasWrite:!0,statsIncomplete:!0,diff:null},{path:"/repo/apps/web/src/lib/toolDiff.ts",added:3,removed:2,hasWrite:!1,statsIncomplete:!1,diff:null}];function g(){}const C=T;function m(){C("close")}let p=null;function f(v){v.key==="Escape"&&m()}return q(()=>{document.addEventListener("keydown",f);const v=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;v.forEach(b=>{const i=b.getAttribute("href");if(!i)return;const w=document.getElementById(i.slice(1));w&&a.set(w,b)});let r=null;p=new IntersectionObserver(b=>{b.forEach(i=>{i.isIntersecting&&(r&&r.classList.remove("active"),r=a.get(i.target)??null,r&&r.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((b,i)=>p.observe(i)),v.length&&v[0].classList.add("active")}),A(()=>{document.removeEventListener("keydown",f),p&&(p.disconnect(),p=null)}),(v,a)=>(n(),l("div",D,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:m},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",H,[a[146]||(a[146]=c('<aside class="sidebar" data-v-a3290cb2><div class="brand" data-v-a3290cb2><div class="brand-mark" data-v-a3290cb2>K</div><div class="brand-name" data-v-a3290cb2>Kimi Web</div></div><div class="brand-sub" data-v-a3290cb2>Design System · v1.0</div><div class="nav-group" data-v-a3290cb2>Navigate</div><nav class="nav" id="nav" data-v-a3290cb2><a href="#overview" data-v-a3290cb2><span class="num" data-v-a3290cb2>00</span>Overview</a><a href="#principles" data-v-a3290cb2><span class="num" data-v-a3290cb2>01</span>Design Principles</a><a href="#tokens" data-v-a3290cb2><span class="num" data-v-a3290cb2>02</span>Design Tokens</a><a href="#primitives" data-v-a3290cb2><span class="num" data-v-a3290cb2>03</span>Primitives</a><a href="#chat" data-v-a3290cb2><span class="num" data-v-a3290cb2>04</span>Chat Interface</a><a href="#richtext" data-v-a3290cb2><span class="num" data-v-a3290cb2>05</span>Rich Text Messages</a><a href="#themes" data-v-a3290cb2><span class="num" data-v-a3290cb2>06</span>Theming</a><a href="#rules" data-v-a3290cb2><span class="num" data-v-a3290cb2>07</span>Style Rules</a><a href="#shell" data-v-a3290cb2><span class="num" data-v-a3290cb2>08</span>App Shell & Sidebar</a><a href="#a11y" data-v-a3290cb2><span class="num" data-v-a3290cb2>09</span>Accessibility</a><a href="#dialogs" data-v-a3290cb2><span class="num" data-v-a3290cb2>10</span>Dialogs</a><a href="#session-admin" data-v-a3290cb2><span class="num" data-v-a3290cb2>11</span>Session Admin</a></nav><div class="nav-group" data-v-a3290cb2>Companion output</div><nav class="nav" data-v-a3290cb2><a href="#tokens" data-v-a3290cb2><span class="num" data-v-a3290cb2>↗</span>Token list</a><a href="#primitives" data-v-a3290cb2><span class="num" data-v-a3290cb2>↗</span>Component API</a><a href="#rules" data-v-a3290cb2><span class="num" data-v-a3290cb2>↗</span>Style rules</a></nav></aside>',1)),t("main",V,[t("div",L,[a[144]||(a[144]=c('<section id="overview" data-v-a3290cb2><div class="hero" data-v-a3290cb2><span class="eyebrow" data-v-a3290cb2>● Design System · v1.0</span><h1 data-v-a3290cb2>Kimi Web <span class="grad" data-v-a3290cb2>Design System</span></h1><p class="lead" data-v-a3290cb2> This document defines the visual language and component specification for Kimi Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable. </p><div class="hero-meta" data-v-a3290cb2><span class="meta-chip" data-v-a3290cb2><span class="dot" data-v-a3290cb2></span> Scope <b data-v-a3290cb2>apps/kimi-web</b></span><span class="meta-chip" data-v-a3290cb2>Component primitives</span><span class="meta-chip" data-v-a3290cb2>Theme <b data-v-a3290cb2>1 set · 4 customizable colors</b></span><span class="meta-chip" data-v-a3290cb2>Light / dark mode</span></div></div><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2><b data-v-a3290cb2>This spec is the single reference when changing the web UI.</b> Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed. </div></div></section><section id="principles" data-v-a3290cb2><div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>01</span><h2 class="sec-title" data-v-a3290cb2>Design Principles</h2></div><p class="sec-desc" data-v-a3290cb2> Every UI decision traces back to the following principles. Kimi Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first. </p><ul class="clean check" data-v-a3290cb2><li data-v-a3290cb2><b data-v-a3290cb2>Consistency</b> —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.</li><li data-v-a3290cb2><b data-v-a3290cb2>Hierarchy</b> —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".</li><li data-v-a3290cb2><b data-v-a3290cb2>Proximity</b> —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.</li><li data-v-a3290cb2><b data-v-a3290cb2>Feedback</b> —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.</li><li data-v-a3290cb2><b data-v-a3290cb2>Breathing room</b> —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.</li><li data-v-a3290cb2><b data-v-a3290cb2>Accessibility (A11y)</b> —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.</li><li data-v-a3290cb2><b data-v-a3290cb2>Reduction</b> —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.</li></ul><div class="callout good" data-v-a3290cb2><span class="ico" data-v-a3290cb2>✓</span><div data-v-a3290cb2><b data-v-a3290cb2>Brand tone (the do-not list)</b>: calm, clinical, never exaggerated. <span class="pill red" style="margin:0 4px;" data-v-a3290cb2>Reject</span> purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided. </div></div><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2><b data-v-a3290cb2>Declare design intent first (Design Read)</b>: before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style. </div></div></section>',2)),t("section",R,[a[7]||(a[7]=c(`<div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>02</span><h2 class="sec-title" data-v-a3290cb2>Design Tokens</h2></div><p class="sec-desc" data-v-a3290cb2> Collapse every visual decision into tokens. <b data-v-a3290cb2>Color tokens keep the existing short names and fill out the semantics</b> (lowering migration cost), while <b data-v-a3290cb2>spacing, z-index, motion, and font-weight</b> fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage. </p><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2><b data-v-a3290cb2>Naming convention</b>: <code data-v-a3290cb2>--<category>-<role>-<state></code>. For example <code data-v-a3290cb2>--color-text-muted</code>, <code data-v-a3290cb2>--radius-md</code>, <code data-v-a3290cb2>--space-4</code>. To reduce churn, the existing short names (<code data-v-a3290cb2>--bg</code> / <code data-v-a3290cb2>--ink</code> / <code data-v-a3290cb2>--line</code> / <code data-v-a3290cb2>--blue</code> …) are kept as <b data-v-a3290cb2>compatibility aliases</b> for one release cycle. </div></div><h3 class="sub" data-v-a3290cb2>Color</h3><p data-v-a3290cb2>Semantic-first, in three layers: <b data-v-a3290cb2>background / text / border</b> + <b data-v-a3290cb2>accent</b> + <b data-v-a3290cb2>status colors</b>. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.</p><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2>The table below shows the <b data-v-a3290cb2>semantic tokens</b>. Each ships a light value in <code data-v-a3290cb2>:root</code> and a dark override in the <code data-v-a3290cb2>data-color-scheme</code> blocks — for example <code data-v-a3290cb2>--color-bg</code> is <code data-v-a3290cb2>#ffffff</code> in light and <code data-v-a3290cb2>#121212</code> in dark; <code data-v-a3290cb2>--color-accent</code> is the brand blue (<code data-v-a3290cb2>#1783ff</code> light / <code data-v-a3290cb2>#1a88ff</code> dark). The <b data-v-a3290cb2>semantic status colors</b> (success / warning / danger / info) are independent palettes, one set each for light / dark.</div></div><div class="palette" data-v-a3290cb2><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:#ffffff;" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>bg</div><div class="cv" data-v-a3290cb2>#ffffff / #121212</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:#f5f5f5;" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>surface</div><div class="cv" data-v-a3290cb2>#f5f5f5 / #1f1f1f</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:#f5f5f5;" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>surface-sunken</div><div class="cv" data-v-a3290cb2>#f5f5f5 / #121212</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:#f5f5f5;" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>well</div><div class="cv" data-v-a3290cb2>#f5f5f5 / #1f1f1f</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:#f5f5f5;" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>surface-deep</div><div class="cv" data-v-a3290cb2>#f5f5f5 / #0d0d0d</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:#fff;border:0.5px solid rgba(0,0,0,.13);" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>surface-overlay</div><div class="cv" data-v-a3290cb2>#ffffff / rgba(255,255,255,.1)</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:rgba(0,0,0,.05);" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>selected</div><div class="cv" data-v-a3290cb2>rgba(0,0,0,.05) / rgba(255,255,255,.1)</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:rgba(0,0,0,.9);" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>fg</div><div class="cv" data-v-a3290cb2>rgba(0,0,0,.9) / rgba(255,255,255,.84)</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:rgba(0,0,0,.6);" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>fg-muted</div><div class="cv" data-v-a3290cb2>rgba(0,0,0,.6) / rgba(255,255,255,.56)</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:rgba(0,0,0,.13);" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>line</div><div class="cv" data-v-a3290cb2>rgba(0,0,0,.13) / rgba(255,255,255,.12)</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:rgba(0,0,0,.05);" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>subtle</div><div class="cv" data-v-a3290cb2>rgba(0,0,0,.05) / rgba(255,255,255,.05)</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:#1783ff;" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>accent (KMBlue)</div><div class="cv" data-v-a3290cb2>#1783ff / #1a88ff</div></div></div><div class="color-card" data-v-a3290cb2><div class="color-chip" style="background:#e8f3ff;" data-v-a3290cb2></div><div class="color-meta" data-v-a3290cb2><div class="cn" data-v-a3290cb2>accent-soft</div><div class="cv" data-v-a3290cb2>#e8f3ff / rgba(26,136,255,.1)</div></div></div></div><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Token</th><th data-v-a3290cb2>Light</th><th data-v-a3290cb2>Dark</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-bg</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fff;" data-v-a3290cb2></span>#ffffff</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#121212;" data-v-a3290cb2></span>#121212</td><td data-v-a3290cb2>Page background</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-surface</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#f5f5f5;" data-v-a3290cb2></span>#f5f5f5</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#1f1f1f;" data-v-a3290cb2></span>#1f1f1f</td><td data-v-a3290cb2>Panel / sidebar / card head</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-surface-raised</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fff;" data-v-a3290cb2></span>#ffffff</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#292929;" data-v-a3290cb2></span>#292929</td><td data-v-a3290cb2>Raised card / dialog / input</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-menu-bg</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(255,255,255,.95);" data-v-a3290cb2></span>rgba(255,255,255,.95)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(41,41,41,.95);" data-v-a3290cb2></span>rgba(41,41,41,.95)</td><td data-v-a3290cb2>Floating menu panel — frosted glass over <code data-v-a3290cb2>--p-menu-backdrop</code> blur</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-surface-overlay</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fff;" data-v-a3290cb2></span>#ffffff</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-a3290cb2></span>rgba(255,255,255,.1)</td><td data-v-a3290cb2>Field-control fill on raised cards (selects, steppers) — top rung; light tops out at white (the level is carried by the border), dark steps one rung above raised. Floating layers stay at raised</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-well</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#f5f5f5;" data-v-a3290cb2></span>#f5f5f5</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#1f1f1f;" data-v-a3290cb2></span>#1f1f1f</td><td data-v-a3290cb2>Content well on the page (code blocks, tool-output panels, match/file lists, media thumbnails) — light reuses the sunken recess; dark lifts one rung ABOVE the page, because a true recess (<code data-v-a3290cb2>#121212</code>) vanishes into the page there</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-surface-deep</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#f5f5f5;" data-v-a3290cb2></span>#f5f5f5</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#0d0d0d;" data-v-a3290cb2></span>#0d0d0d</td><td data-v-a3290cb2>Deep chrome plane one step BELOW the page (panel headers, diff gutters) — dark drops under <code data-v-a3290cb2>--color-bg</code> so chrome framing stays darker than the content it frames</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-text</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.9);" data-v-a3290cb2></span>rgba(0,0,0,.9)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(255,255,255,.84);" data-v-a3290cb2></span>rgba(255,255,255,.84)</td><td data-v-a3290cb2>Body text / headings</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-text-strong</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#000;" data-v-a3290cb2></span>#000000</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fff;box-shadow:inset 0 0 0 1px #ddd;" data-v-a3290cb2></span>#ffffff</td><td data-v-a3290cb2>Max foreground emphasis — menu-row label & icon on hover</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-text-muted</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-a3290cb2></span>rgba(0,0,0,.6)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(255,255,255,.56);" data-v-a3290cb2></span>rgba(255,255,255,.56)</td><td data-v-a3290cb2>Secondary text / placeholder</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-line</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.13);" data-v-a3290cb2></span>rgba(0,0,0,.13)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(255,255,255,.12);" data-v-a3290cb2></span>rgba(255,255,255,.12)</td><td data-v-a3290cb2>Divider / card border</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-subtle</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.05);" data-v-a3290cb2></span>rgba(0,0,0,.05)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(255,255,255,.05);" data-v-a3290cb2></span>rgba(255,255,255,.05)</td><td data-v-a3290cb2>Subtle hairline — tertiary separators below <code data-v-a3290cb2>--color-line</code> (diff-gutter column rules, quiet dividers inside wells)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-selected</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.05);" data-v-a3290cb2></span>rgba(0,0,0,.05)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-a3290cb2></span>rgba(255,255,255,.1)</td><td data-v-a3290cb2>Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-hover</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.03);" data-v-a3290cb2></span>rgba(0,0,0,.03)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(255,255,255,.05);" data-v-a3290cb2></span>rgba(255,255,255,.05)</td><td data-v-a3290cb2>Row hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface. The global hover rule: transparent-base controls overlay this f1 wash (hover never darkens — never sunken); filled controls use their own hover token (accent-hover, send-bg-hover)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-selected-hover</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.08);" data-v-a3290cb2></span>rgba(0,0,0,.08)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(255,255,255,.14);" data-v-a3290cb2></span>rgba(255,255,255,.14)</td><td data-v-a3290cb2>Hover of a control RESTING at the selected fill (work cards) — one rung above f2, below f3: hover deepens/brightens a step, never drops below the rest state</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-inline-code-bg</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.03);" data-v-a3290cb2></span>rgba(0,0,0,.03)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-a3290cb2></span>rgba(255,255,255,.1)</td><td data-v-a3290cb2>Inline-code chip fill — fills.f1 / fills.f2; dark lifts off any dark surface (sunken == bg there)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-media-alpha-bg-1</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#858585;" data-v-a3290cb2></span>≈#858585</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#76797e;" data-v-a3290cb2></span>≈#76797e</td><td data-v-a3290cb2>Checkerboard square A of the <code data-v-a3290cb2><img></code> alpha canvas — color-mix of <code data-v-a3290cb2>--color-bg</code>/<code data-v-a3290cb2>--color-text</code> (52/48); applied via <code data-v-a3290cb2>--media-alpha-canvas</code> (16px period)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-media-alpha-bg-2</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#6b6b6b;" data-v-a3290cb2></span>≈#6b6b6b</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#8c8f93;" data-v-a3290cb2></span>≈#8c8f93</td><td data-v-a3290cb2>Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-sidebar-bg</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#f9fbfc;" data-v-a3290cb2></span>#f9fbfc</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#0d0d0d;" data-v-a3290cb2></span>#0d0d0d</td><td data-v-a3290cb2>Sidebar surface — one step off <code data-v-a3290cb2>--color-bg</code> (just under white in light, one step BELOW the page in dark) so the session column reads as its own plane and never brighter than the reading surface</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-scrim</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.4);" data-v-a3290cb2></span>rgba(0,0,0,.4)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-a3290cb2></span>rgba(0,0,0,.6)</td><td data-v-a3290cb2>Modal scrim — the dark veil behind dialogs/lightboxes (mask.base; legacy hardcoded overlays can migrate here)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-scrim-strong</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-a3290cb2></span>rgba(0,0,0,.6)</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:rgba(0,0,0,.75);" data-v-a3290cb2></span>rgba(0,0,0,.75)</td><td data-v-a3290cb2>Stronger scrim for full-screen media previews (mask.strong — the PhotoSwipe image preview backdrop)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-text-on-scrim</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fff;" data-v-a3290cb2></span>#ffffff</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fff;" data-v-a3290cb2></span>same</td><td data-v-a3290cb2>Text drawn on the scrim (captions over the media lightbox)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-accent</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#1783ff;" data-v-a3290cb2></span>#1783ff</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#1a88ff;" data-v-a3290cb2></span>#1a88ff</td><td data-v-a3290cb2>Primary action / link / focus</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-success</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#0e7a38;" data-v-a3290cb2></span>#0e7a38</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#3fb950;" data-v-a3290cb2></span>#3fb950</td><td data-v-a3290cb2>Success / pass</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-warning</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#a9610a;" data-v-a3290cb2></span>#a9610a</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#d29922;" data-v-a3290cb2></span>#d29922</td><td data-v-a3290cb2>Warning / pending</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--color-danger</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#c0392b;" data-v-a3290cb2></span>#c0392b</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#f85149;" data-v-a3290cb2></span>#f85149</td><td data-v-a3290cb2>Danger / error / abort</td></tr></tbody></table><h4 class="mini" data-v-a3290cb2>Palette</h4><p data-v-a3290cb2>The palette <b data-v-a3290cb2>is</b> the production kimi.com palette (design tokens <code data-v-a3290cb2>tokens.json</code>): neutral-gray surfaces, an alpha-based label / fill / separator ramp (<code data-v-a3290cb2>labels.*</code> / <code data-v-a3290cb2>fills.*</code> / <code data-v-a3290cb2>separator.s1</code>), the KMBlue accent, and a true neutral dark ladder (<code data-v-a3290cb2>#121212 → #1f1f1f → #292929</code>; the deep chrome plane and sidebar derive one step below at <code data-v-a3290cb2>#0d0d0d</code> — the palette has nothing darker than primary).</p><p data-v-a3290cb2>The ONE deliberate exception is the <b data-v-a3290cb2>status hues</b>: success / warning / danger / done keep the app's own WCAG-tuned ramp (≥4.5:1 on the neutral surfaces) — the production status colours (positiveGreen <code data-v-a3290cb2>#16c456</code>, orange <code data-v-a3290cb2>#ff9500</code>, danger red <code data-v-a3290cb2>#ff3849</code>) are too bright against it. Diff add/del bands happen to coincide (both use the production 25% fills in light, 14% in dark).</p><h4 class="mini" data-v-a3290cb2>Surface usage</h4><p data-v-a3290cb2>The surface layers each have a role — choose by "field overlay / raised layer / content well / default flat layer / sunken layer / page background / deep chrome", and avoid treating <code data-v-a3290cb2>--p-surface-raised</code> as a universal background. In dark, elevation = lighter: floating layers sit above the content, content wells sit above the page, and chrome planes (sidebar, panel headers) sit below it — never the reverse. One consequence: on the page itself, never use <code data-v-a3290cb2>--color-surface-sunken</code> for a content carrier — it equals <code data-v-a3290cb2>--color-bg</code> in dark and the fill vanishes; use <code data-v-a3290cb2>--color-well</code>. Sunken stays correct INSIDE surface / raised cards, where it is a genuine recess. Field controls (selects, steppers) on a raised card use <code data-v-a3290cb2>--color-surface-overlay</code>, the top fill rung; floating layers keep <code data-v-a3290cb2>--color-surface-raised</code> — their elevation is shadow + hairline, not a lighter fill.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Token</th><th data-v-a3290cb2>Light</th><th data-v-a3290cb2>Dark</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-surface-overlay</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fff;" data-v-a3290cb2></span>#ffffff</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#22272e;" data-v-a3290cb2></span>#22272e</td><td data-v-a3290cb2>Field controls on raised cards — select, stepper (top fill rung; light = white)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-surface-raised</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fff;" data-v-a3290cb2></span>#ffffff</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#1c2128;" data-v-a3290cb2></span>#1c2128</td><td data-v-a3290cb2>Raised card / dialog / input (raised layer)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-well</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#f3f5f8;" data-v-a3290cb2></span>#f3f5f8</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#13181e;" data-v-a3290cb2></span>#13181e</td><td data-v-a3290cb2>Code block / tool output / list carrier directly on the page (content well — light: recessed, dark: one rung above the page)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-surface</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fafbfc;" data-v-a3290cb2></span>#fafbfc</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#13181e;" data-v-a3290cb2></span>#13181e</td><td data-v-a3290cb2>Panel / sidebar / card head (default flat layer)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-surface-sunken</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#f3f5f8;" data-v-a3290cb2></span>#f3f5f8</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#0d1117;" data-v-a3290cb2></span>#0d1117</td><td data-v-a3290cb2>Recessed area INSIDE a surface / raised card — never a content carrier on the page (sunken layer)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-bg</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fff;" data-v-a3290cb2></span>#ffffff</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#0d1117;" data-v-a3290cb2></span>#0d1117</td><td data-v-a3290cb2>Page background</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-surface-deep</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#fafbfc;" data-v-a3290cb2></span>#fafbfc</td><td class="val" data-v-a3290cb2><span class="swatch" style="background:#0a0d12;" data-v-a3290cb2></span>#0a0d12</td><td data-v-a3290cb2>Panel header / diff gutter (deep chrome layer — below the page in dark)</td></tr></tbody></table><h4 class="mini" data-v-a3290cb2>Borders & hairlines</h4><p data-v-a3290cb2>Three line tokens, three jobs: <code data-v-a3290cb2>--color-line</code> is the default structural separator, <code data-v-a3290cb2>--color-subtle</code> the tertiary separator that must stay quieter (diff-gutter column rules, quiet dividers inside wells), and <code data-v-a3290cb2>--color-line-strong</code> the edge of interactive controls (inputs, selects, secondary buttons). Width is one: <b data-v-a3290cb2>0.5px</b> — every stroke is the same hairline, on static structural edges (card rims, plane seams, header dividers), interactive control rims and floating layers alike. Separation comes from luminance first — planes one rung apart already read as distinct in dark, so their shared edge stays a 0.5px hairline rather than a heavier border; same-rung neighbours (list rows, card head / body) are exactly where a hairline is required. In dark, drop shadows fade on near-black surfaces, so a floating layer's edge IS its hairline — never ship a shadow-only floating surface. (Legacy <code data-v-a3290cb2>--line</code> / <code data-v-a3290cb2>--line2</code> alias <code data-v-a3290cb2>--color-line</code> / <code data-v-a3290cb2>--color-subtle</code> for one cycle; new work references the v2 names.)</p><h4 class="mini" data-v-a3290cb2>Focus ring</h4><p data-v-a3290cb2>All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a <code data-v-a3290cb2>box-shadow</code> focus ring.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Token</th><th data-v-a3290cb2>Value</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-focus-ring</td><td class="val" data-v-a3290cb2>0 0 0 3px var(--p-accent-soft)</td><td data-v-a3290cb2>Default focus ring (link, menu item, switch, checkbox)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-focus-ring-strong</td><td class="val" data-v-a3290cb2>0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)</td><td data-v-a3290cb2>Strong focus ring (button, primary action)</td></tr></tbody></table><h4 class="mini" data-v-a3290cb2>Text selection</h4><p data-v-a3290cb2>The text-selection color uses <code data-v-a3290cb2>--p-selection</code> uniformly (light <code data-v-a3290cb2>rgba(23,131,255,.18)</code> / dark <code data-v-a3290cb2>rgba(88,166,255,.32)</code>), applied by the global <code data-v-a3290cb2>::selection</code> rule; do not set a separate highlight background.</p><h4 class="mini" data-v-a3290cb2>Disabled state</h4><p data-v-a3290cb2>All disabled controls use <code data-v-a3290cb2>opacity:.5</code> + <code data-v-a3290cb2>cursor:not-allowed</code> uniformly; do not separately grey out or recolor.</p><h3 class="sub" data-v-a3290cb2>Font families</h3><p data-v-a3290cb2>Kimi Web uses two font tokens: <b data-v-a3290cb2>--font-ui</b> (UI and body, with Schibsted Grotesk for Latin and Noto Sans SC for Simplified Chinese) and <b data-v-a3290cb2>--font-mono</b> (code and monospace). Components always reference the variables; do not hard-code font names.</p><h4 class="mini" data-v-a3290cb2>--font-ui · UI & body (Schibsted Grotesk + Noto Sans SC)</h4><p data-v-a3290cb2>Body and UI use self-hosted Schibsted Grotesk for Latin text and self-hosted Noto Sans SC Variable for Simplified Chinese. Platform fonts remain as fallbacks:</p><div class="code" data-v-a3290cb2><div class="code-bar" data-v-a3290cb2><span class="d" data-v-a3290cb2></span><span class="d" data-v-a3290cb2></span><span class="d" data-v-a3290cb2></span><span class="fn" data-v-a3290cb2>--font-ui</span></div><pre data-v-a3290cb2>--font-ui: "Schibsted Grotesk Variable", "Helvetica Neue", Arial, + "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC", + "Microsoft YaHei", + -apple-system, BlinkMacSystemFont, "Segoe UI", + Roboto, Ubuntu, sans-serif, + "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";</pre></div><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2>Schibsted Grotesk first: self-hosted Latin UI and body text, with normal and italic variable faces.</li><li data-v-a3290cb2>Western fallbacks next: Helvetica Neue / Arial for environments where Schibsted Grotesk cannot load.</li><li data-v-a3290cb2>Noto Sans SC Variable next: bundled Simplified Chinese glyphs with a weight range of 100–900.</li><li data-v-a3290cb2>System UI fallbacks last: PingFang SC / Microsoft YaHei, platform UI fonts, and emoji fonts.</li></ul><h4 class="mini" data-v-a3290cb2>--font-mono · Code & monospace</h4><p data-v-a3290cb2>Code, line numbers, diffs, and Bash commands use JetBrains Mono (a self-hosted variable font), falling back to the system monospace. Other tool labels and summaries use the UI font:</p><div class="code" data-v-a3290cb2><div class="code-bar" data-v-a3290cb2><span class="d" data-v-a3290cb2></span><span class="d" data-v-a3290cb2></span><span class="d" data-v-a3290cb2></span><span class="fn" data-v-a3290cb2>--font-mono</span></div><pre data-v-a3290cb2>--font-mono: "JetBrains Mono Variable", "JetBrains Mono", + ui-monospace, "SF Mono", Menlo, Consolas, monospace;</pre></div><h4 class="mini" data-v-a3290cb2>Loading strategy</h4><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Font</th><th data-v-a3290cb2>Source</th><th data-v-a3290cb2>Bundled</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>JetBrains Mono</td><td class="val" data-v-a3290cb2>@fontsource-variable/jetbrains-mono</td><td class="val" data-v-a3290cb2>✓ self-hosted</td><td data-v-a3290cb2>monospace / code (--font-mono)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Schibsted Grotesk</td><td class="val" data-v-a3290cb2>prepare-fonts → app-ui/assets/fonts</td><td class="val" data-v-a3290cb2>✓ generated + bundled</td><td data-v-a3290cb2>UI / body / display (--font-ui, --font-display), wght 400-900, normal + italic</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Noto Sans SC</td><td class="val" data-v-a3290cb2>prepare-fonts → app-ui/assets/fonts</td><td class="val" data-v-a3290cb2>✓ generated + bundled</td><td data-v-a3290cb2>Simplified Chinese UI / body, wght 100–900</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>System UI / CJK fonts</td><td class="val" data-v-a3290cb2>operating system</td><td class="val" data-v-a3290cb2>—</td><td data-v-a3290cb2>late fallback for UI / body</td></tr></tbody></table><div class="callout good" data-v-a3290cb2><span class="ico" data-v-a3290cb2>✓</span><div data-v-a3290cb2> Schibsted Grotesk, Noto Sans SC, and JetBrains Mono are self-hosted. They make no external network requests and work offline; platform fonts remain as fallbacks. </div></div><h4 class="mini" data-v-a3290cb2>Usage rules</h4><ul class="clean check" data-v-a3290cb2><li data-v-a3290cb2>Components always use <code data-v-a3290cb2>var(--font-ui)</code> / <code data-v-a3290cb2>var(--font-mono)</code>; do not hard-code font names like <code data-v-a3290cb2>'Schibsted Grotesk'</code> / <code data-v-a3290cb2>'JetBrains Mono'</code>.</li><li data-v-a3290cb2>Body / UI use <code data-v-a3290cb2>--font-ui</code> (Schibsted Grotesk for Latin, Noto Sans SC for Simplified Chinese); code / monospace use <code data-v-a3290cb2>--font-mono</code> (JetBrains Mono).</li><li data-v-a3290cb2>Schibsted Grotesk is loaded from complete variable faces, including normal and italic styles; <code data-v-a3290cb2>font-optical-sizing: auto</code> is enabled globally.</li><li data-v-a3290cb2>Noto Sans SC is loaded from one complete weight-variable WOFF2 asset. Platform CJK fonts stay late in the fallback chain.</li></ul><h3 class="sub" data-v-a3290cb2>Type scale & weight</h3><p data-v-a3290cb2>The user font-size preference is one of four named steps (<code data-v-a3290cb2>small / medium / large / xlarge</code>, Medium default) written to <code data-v-a3290cb2>data-font-scale</code> on <code data-v-a3290cb2><html></code>; the step name is persisted, never a px value. The step only moves <code data-v-a3290cb2>--base-font</code>; every size token derives additively (<code data-v-a3290cb2>default + shift</code>), and line heights are locked to integer px via <code data-v-a3290cb2>round(size × ratio, 1px)</code> — never a unitless ratio.</p><p data-v-a3290cb2>Two token groups share the shift but keep their own ratios: <b data-v-a3290cb2>--ui-*</b> for chrome (tight, 1.40–1.50) and <b data-v-a3290cb2>--md-*</b> for Markdown content + the composer (loose, 1.56–1.63; body is anchored to the UI body size — the spec's +2px offset was dropped as a product decision — while keeping its own looser line-height ratios). T0/T1 cap at 24/22px on the top steps (built into the tokens via <code data-v-a3290cb2>min()</code> — do not remove). Use the <code data-v-a3290cb2>.text-ui-*</code> / <code data-v-a3290cb2>.text-md-*</code> utility classes; legacy aliases <code data-v-a3290cb2>--ui-font-size</code> (→ <code data-v-a3290cb2>--ui-b2</code>), <code data-v-a3290cb2>--content-font-size</code> (→ <code data-v-a3290cb2>--md-b1</code>) and the whole 6-level <code data-v-a3290cb2>--text-*</code> ramp (xs→c1, sm→b2−1px, base→b2, lg→t2, xl→t1, 2xl→t0) keep older components on the ramp. Panel titles sit at the base step (<code data-v-a3290cb2>--ui-b2</code>); dropdown menu items sit one rung below (<code data-v-a3290cb2>--text-sm</code> = b2 − 1px) — both still follow the user's font scale.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-a3290cb2><div class="type-row" data-v-a3290cb2><div class="type-sample" style="font-size:var(--ui-t1);font-weight:500;" data-v-a3290cb2>Section Title</div><div class="type-meta" data-v-a3290cb2>--ui-t1 · title (cap 22)</div></div><div class="type-row" data-v-a3290cb2><div class="type-sample" style="font-size:var(--ui-t2);font-weight:500;" data-v-a3290cb2>Card title</div><div class="type-meta" data-v-a3290cb2>--ui-t2 · subtitle</div></div><div class="type-row" data-v-a3290cb2><div class="type-sample" style="font-size:var(--ui-b1);font-weight:500;" data-v-a3290cb2>UI emphasis</div><div class="type-meta" data-v-a3290cb2>--ui-b1 · body strong</div></div><div class="type-row" data-v-a3290cb2><div class="type-sample" style="font-size:var(--ui-b2);" data-v-a3290cb2>UI control / button / form</div><div class="type-meta" data-v-a3290cb2>--ui-b2 · body</div></div><div class="type-row" data-v-a3290cb2><div class="type-sample" style="font-size:var(--ui-c1);" data-v-a3290cb2>Helper text / table</div><div class="type-meta" data-v-a3290cb2>--ui-c1 · caption</div></div><div class="type-row" data-v-a3290cb2><div class="type-sample" style="font-size:var(--ui-c2);" data-v-a3290cb2>Badge / timestamp</div><div class="type-meta" data-v-a3290cb2>--ui-c2 · non-critical only</div></div><div class="type-row" data-v-a3290cb2><div class="type-sample" style="font-size:var(--md-h1);font-weight:600;" data-v-a3290cb2>Markdown H1</div><div class="type-meta" data-v-a3290cb2>--md-h1</div></div><div class="type-row" data-v-a3290cb2><div class="type-sample" style="font-size:var(--md-b1);" data-v-a3290cb2>Chat body / message bubbles / composer</div><div class="type-meta" data-v-a3290cb2>--md-b1 · prose body</div></div><div class="type-row" data-v-a3290cb2><div class="type-sample" style="font-size:var(--md-b2);" data-v-a3290cb2>Quote / table</div><div class="type-meta" data-v-a3290cb2>--md-b2 · secondary</div></div><div class="type-row" data-v-a3290cb2><div class="type-sample" style="font-size:var(--md-b3);font-family:var(--font-mono);" data-v-a3290cb2>Code block / inline code</div><div class="type-meta" data-v-a3290cb2>--md-b3 · weak / code</div></div></div><p data-v-a3290cb2>The fixed product type tokens still define scale-independent defaults: transcript prose enables <code data-v-a3290cb2>text-autospace: normal</code> for mixed CJK and Latin text. Drop stray <code data-v-a3290cb2>font-weight: 650 / 750</code>; converge on 400 / 500 (regular / emphasis), with a dedicated 600 weight for sidebar section labels.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Token</th><th data-v-a3290cb2>Value</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--font-ui</td><td class="val" data-v-a3290cb2>"Schibsted Grotesk Variable", …, "Noto Sans SC Variable", …</td><td data-v-a3290cb2>UI & body (Schibsted Grotesk + Noto Sans SC)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--font-kbd</td><td class="val" data-v-a3290cb2>"Schibsted Grotesk Variable", system-ui, sans-serif</td><td data-v-a3290cb2>keyboard shortcut keycaps</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--font-mono</td><td class="val" data-v-a3290cb2>JetBrains Mono…</td><td data-v-a3290cb2>code, Bash commands, line numbers, diffs</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>data-font-scale</td><td class="val" data-v-a3290cb2>small / medium / large / xlarge</td><td data-v-a3290cb2>user preference on <html>; sets --base-font (12–18px), Medium = 14px default</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--ui-t0…--ui-c2</td><td class="val" data-v-a3290cb2>default + --ui-shift, t0/t1 capped via min()</td><td data-v-a3290cb2>chrome type ramp (title / subtitle / body / caption); .text-ui-* classes</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--md-h1…--md-b3</td><td class="val" data-v-a3290cb2>default + --md-shift</td><td data-v-a3290cb2>Markdown ramp (headings / body / secondary / code); .text-md-* classes</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--ui-font-size / --content-font-size</td><td class="val" data-v-a3290cb2>var(--ui-b2) / var(--md-b1)</td><td data-v-a3290cb2>legacy aliases kept on the ramp</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--code-font-size</td><td class="val" data-v-a3290cb2>calc(var(--content-font-size) - 2px)</td><td data-v-a3290cb2>standalone code surfaces (diff view, file preview, tool cards) — one step below body, 12px @ Medium; prose-embedded code stays on the --md-* ramp</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--text-xs / sm / base / lg / xl / 2xl</td><td class="val" data-v-a3290cb2>c1 / b2−1 / b2 / t2 / t1 / t0</td><td data-v-a3290cb2>legacy ramp, aliased into the scale</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--leading-tight/normal/prose/relaxed</td><td class="val" data-v-a3290cb2>1.25 / 1.5 / 1.6 / 1.7</td><td data-v-a3290cb2>headings / UI / chat prose / long text</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--weight-regular/option-label/medium/ui-strong</td><td class="val" data-v-a3290cb2>400 / 475 / 500 / 525</td><td data-v-a3290cb2>body / settings labels / emphasis / compact UI emphasis</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--weight-section-label</td><td class="val" data-v-a3290cb2>600</td><td data-v-a3290cb2>sidebar section labels</td></tr></tbody></table><h4 class="mini" data-v-a3290cb2>Icon size</h4><p data-v-a3290cb2>Icons use three size tokens uniformly. The global <code data-v-a3290cb2>.p-ic</code> default is 16px (<code data-v-a3290cb2>--p-ic-md</code>); components pick as needed, and random pixel sizes are forbidden.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Token</th><th data-v-a3290cb2>Value</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-ic-sm</td><td class="val" data-v-a3290cb2>14px</td><td data-v-a3290cb2>small button, badge, menu item, inline link icon</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-ic-md</td><td class="val" data-v-a3290cb2>16px</td><td data-v-a3290cb2>default (button, icon button, toolbar)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-ic-lg</td><td class="val" data-v-a3290cb2>20px</td><td data-v-a3290cb2>Toast status icon, empty-state illustration</td></tr></tbody></table><h4 class="mini" data-v-a3290cb2>Icon</h4><p data-v-a3290cb2>Icons always come from the centralized registry <code data-v-a3290cb2>lib/icons.ts</code>: in templates use the <code data-v-a3290cb2><Icon name size /></code> component (<code data-v-a3290cb2>components/ui/Icon.vue</code>); for <code data-v-a3290cb2>v-html</code> contexts (such as a tool glyph) use <code data-v-a3290cb2>iconSvg(name, size)</code>. <b data-v-a3290cb2>Do not hand-write <code data-v-a3290cb2><svg></code></b> — the <code data-v-a3290cb2>scripts/check-style.mjs</code> <code data-v-a3290cb2>icon-from-registry</code> rule flags stray SVGs. Every glyph shares the 24×24 source grid and <code data-v-a3290cb2>currentColor</code> (colour follows text); size uses the three tokens below, and only icons imported in <code data-v-a3290cb2>lib/icons.ts</code> are bundled by <a href="https://github.com/unplugin/unplugin-icons" data-v-a3290cb2>unplugin-icons</a> at build time. Three collections feed the registry, in this order of preference: <b data-v-a3290cb2><code data-v-a3290cb2>~icons/kimi/*</code></b> — Kimi Design System icons (24×24 outlined, 1.8px stroke), local SVGs under <code data-v-a3290cb2>src/icons/kimi/</code> registered as a custom collection in the Vite config, used whenever a Kimi glyph exists for the intent; <b data-v-a3290cb2><code data-v-a3290cb2>~icons/tabler/*</code></b> — Tabler Icons (MIT), for the few gaps it uniquely covers (today: the right-panel toggle); and <b data-v-a3290cb2><code data-v-a3290cb2>~icons/ri/*</code></b> — <a href="https://remixicon.com/" data-v-a3290cb2>Remix Icon</a> (Apache-2.0), for the remaining intents the Kimi set does not cover yet. A few glyphs are filed under their intent rather than the upstream asset name (see the <code data-v-a3290cb2>lib/icons.ts</code> header). When an icon is missing, prefer a glyph from the Kimi icon set: copy the SVG into <code data-v-a3290cb2>src/icons/kimi/</code> (kebab-case name, monochrome <code data-v-a3290cb2>currentColor</code>) and register it — two static imports (component + <code data-v-a3290cb2>?raw</code> string) plus one entry in <code data-v-a3290cb2>ICONS</code>; reach for Remix only when no Kimi glyph fits, and never draw paths in a component.</p><h4 class="mini" data-v-a3290cb2>Size scale</h4>`,49)),t("div",O,[t("div",W,[(n(),l("svg",N,[...a[1]||(a[1]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[2]||(a[2]=e("sm · 14",-1))]),t("div",P,[(n(),l("svg",U,[...a[3]||(a[3]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[4]||(a[4]=e("md · 16",-1))]),t("div",F,[(n(),l("svg",j,[...a[5]||(a[5]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[6]||(a[6]=e("lg · 20",-1))])]),a[8]||(a[8]=t("h4",{class:"mini"},"Icon library",-1)),a[9]||(a[9]=t("p",null,[e("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),t("code",null,"ICON_GROUPS"),e(" in "),t("code",null,"lib/icons.ts"),e(" (a hand-maintained array covering the same icon names), and this catalog is rendered directly from that array so the registry and the document never drift.")],-1)),t("div",G,[(n(!0),l(u,null,y(d(B),([r,b])=>(n(),l(u,{key:r},[t("div",K,k(r),1),(n(!0),l(u,null,y(b,i=>(n(),l("div",{key:i,class:"icon-cell"},[s(d(o),{name:i},null,8,["name"]),t("span",J,k(i),1)]))),128))],64))),128))]),a[10]||(a[10]=c('<p data-v-a3290cb2>Do not use emoji as functional icons. The Kimi brand mark (the robot mascot logo) is a brand asset and is not part of this icon system.</p><p data-v-a3290cb2>A few <b data-v-a3290cb2>special graphics</b> are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <code data-v-a3290cb2><ContextRing :pct /></code> (the Composer context progress ring, data-driven), <code data-v-a3290cb2><AuthStateIcon kind /></code> (the success / expired / error colored illustrations in the login flow), <code data-v-a3290cb2><Spinner /></code> (loading state). Status dots (such as in the Provider list) always use CSS dots (<code data-v-a3290cb2>border-radius:50%</code>), not SVG. The <code data-v-a3290cb2>scripts/check-style.mjs</code> <code data-v-a3290cb2>icon-from-registry</code> rule exempts the above and the brand mark; all other hand-written <code data-v-a3290cb2><svg></code> is flagged.</p><h3 class="sub" data-v-a3290cb2>Spacing</h3><p data-v-a3290cb2>A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-a3290cb2><div class="space-row" data-v-a3290cb2><div class="space-bar" style="width:4px;" data-v-a3290cb2></div><div class="space-meta" data-v-a3290cb2>--space-1 · 4</div><div class="space-use" data-v-a3290cb2>icon gap, badge padding</div></div><div class="space-row" data-v-a3290cb2><div class="space-bar" style="width:6px;" data-v-a3290cb2></div><div class="space-meta" data-v-a3290cb2>--space-1-5 · 6</div><div class="space-use" data-v-a3290cb2>workbar pill icon ↔ label</div></div><div class="space-row" data-v-a3290cb2><div class="space-bar" style="width:8px;" data-v-a3290cb2></div><div class="space-meta" data-v-a3290cb2>--space-2 · 8</div><div class="space-use" data-v-a3290cb2>control gap, small padding</div></div><div class="space-row" data-v-a3290cb2><div class="space-bar" style="width:12px;" data-v-a3290cb2></div><div class="space-meta" data-v-a3290cb2>--space-3 · 12</div><div class="space-use" data-v-a3290cb2>button padding, form-item gap</div></div><div class="space-row" data-v-a3290cb2><div class="space-bar" style="width:16px;" data-v-a3290cb2></div><div class="space-meta" data-v-a3290cb2>--space-4 · 16</div><div class="space-use" data-v-a3290cb2>card padding, grid gap</div></div><div class="space-row" data-v-a3290cb2><div class="space-bar" style="width:20px;" data-v-a3290cb2></div><div class="space-meta" data-v-a3290cb2>--space-5 · 20</div><div class="space-use" data-v-a3290cb2>dialog padding</div></div><div class="space-row" data-v-a3290cb2><div class="space-bar" style="width:24px;" data-v-a3290cb2></div><div class="space-meta" data-v-a3290cb2>--space-6 · 24</div><div class="space-use" data-v-a3290cb2>section gap</div></div><div class="space-row" data-v-a3290cb2><div class="space-bar" style="width:32px;" data-v-a3290cb2></div><div class="space-meta" data-v-a3290cb2>--space-8 · 32</div><div class="space-use" data-v-a3290cb2>large section gap</div></div></div><h4 class="mini" data-v-a3290cb2>Dense list (sidebar / file tree)</h4><p data-v-a3290cb2>High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: <b data-v-a3290cb2>in-row vertical padding</b> <code data-v-a3290cb2>--space-1</code> (4px), <b data-v-a3290cb2>no margin between rows</b> (the hover pill provides the separation); <b data-v-a3290cb2>section gap</b> (between logo / search / action buttons / group title / list) uniformly <code data-v-a3290cb2>--space-2</code> (8px); <b data-v-a3290cb2>between groups</b> <code data-v-a3290cb2>--space-2</code>; the brand header is slightly looser at the top (<code data-v-a3290cb2>--space-3</code>). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.</p><h3 class="sub" data-v-a3290cb2>Radius</h3><p data-v-a3290cb2>Merge the existing 14 values <b data-v-a3290cb2>into the nearest</b> of 7 scale steps. Rule: the component type determines the radius, not the author's feel. The Composer shell is the sole product-specific exception: its 32px radius pairs with <code data-v-a3290cb2>superellipse(1.5)</code> so the flatter curve stays visually concentric with its controls.</p><div class="radius-grid" data-v-a3290cb2><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border-radius:4px;" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>xs · 4</span></div><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border-radius:6px;" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>sm · 6</span></div><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border-radius:8px;" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>md · 8</span></div><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border-radius:12px;" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>lg · 12</span></div><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border-radius:16px;" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>xl · 16</span></div><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border-radius:20px;" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>2xl · 20</span></div><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border-radius:32px;corner-shape:superellipse(1.5);" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>composer · 32 / 1.5</span></div><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border-radius:999px;" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>full · 999</span></div></div><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Token</th><th data-v-a3290cb2>Value</th><th data-v-a3290cb2>Usage</th><th data-v-a3290cb2>Merged from</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--radius-xs</td><td class="val" data-v-a3290cb2>4px</td><td data-v-a3290cb2>small badge, inline tag</td><td class="val" data-v-a3290cb2>2/3/4px →</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--radius-sm</td><td class="val" data-v-a3290cb2>6px</td><td data-v-a3290cb2>small button, icon button, menu item</td><td class="val" data-v-a3290cb2>5/6px →</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--radius-md</td><td class="val" data-v-a3290cb2>8px</td><td data-v-a3290cb2>button, input, badge, card</td><td class="val" data-v-a3290cb2>7/8/9px →</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--radius-lg</td><td class="val" data-v-a3290cb2>12px</td><td data-v-a3290cb2>menu, toast, bubble, floating card</td><td class="val" data-v-a3290cb2>10/12px →</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--radius-xl</td><td class="val" data-v-a3290cb2>16px</td><td data-v-a3290cb2>container baseline: dialogs, settings cards, sheets, work panel</td><td class="val" data-v-a3290cb2>13/16px →</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--radius-2xl</td><td class="val" data-v-a3290cb2>20px</td><td data-v-a3290cb2>workspace attachment card bottom (<code data-v-a3290cb2>0 0 2xl 2xl</code>) tucked under the composer</td><td class="val" data-v-a3290cb2>18/20px →</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--radius-composer</td><td class="val" data-v-a3290cb2>32px</td><td data-v-a3290cb2>Composer shell, with <code data-v-a3290cb2>--corner-shape-composer</code></td><td class="val" data-v-a3290cb2>product-specific</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--radius-menu-row</td><td class="val" data-v-a3290cb2>var(--radius-sm)</td><td data-v-a3290cb2>Menu rows inset 6px inside the plain <code data-v-a3290cb2>--radius-lg</code> menu frame (concentric: 12px − 6px hug)</td><td class="val" data-v-a3290cb2>product-specific</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--radius-full</td><td class="val" data-v-a3290cb2>999px</td><td data-v-a3290cb2>pill badge, avatar, send button</td><td class="val" data-v-a3290cb2>999px / 50%</td></tr></tbody></table><h3 class="sub" data-v-a3290cb2>Elevation & z-index</h3><p data-v-a3290cb2>Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating <code data-v-a3290cb2>9999</code>-style one-upping.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-a3290cb2><div class="radius-grid" style="align-items:stretch;" data-v-a3290cb2><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border:none;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>sm · dropdown menu / sticky</span></div><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border:none;background:#fff;box-shadow:0 4px 12px rgba(16,24,40,.07),0 2px 4px rgba(16,24,40,.05);" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>md · Toast</span></div><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border:none;background:#fff;box-shadow:0 12px 32px rgba(16,24,40,.12),0 4px 10px rgba(16,24,40,.08);" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>lg · overlay (reserved)</span></div><div class="radius-item" data-v-a3290cb2><div class="radius-box" style="border:none;background:#fff;box-shadow:0 24px 64px rgba(16,24,40,.18),0 8px 20px rgba(16,24,40,.10);" data-v-a3290cb2></div><span class="rl" data-v-a3290cb2>xl · dialog</span></div></div></div><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Z-index Token</th><th data-v-a3290cb2>Value</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--z-base</td><td class="val" data-v-a3290cb2>0</td><td data-v-a3290cb2>normal flow</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--z-raised</td><td class="val" data-v-a3290cb2>1</td><td data-v-a3290cb2>in-component local stacking (menu scroll thumbs, strip badges, floating pills) — never a global layer</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--z-sticky</td><td class="val" data-v-a3290cb2>100</td><td data-v-a3290cb2>sticky header / sidebar</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--z-dropdown</td><td class="val" data-v-a3290cb2>200</td><td data-v-a3290cb2>dropdown menu</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--z-overlay</td><td class="val" data-v-a3290cb2>300</td><td data-v-a3290cb2>overlay / bottom Sheet</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--z-modal</td><td class="val" data-v-a3290cb2>400</td><td data-v-a3290cb2>dialog — sibling overlays tie-break by DOM order, so the global confirm (ConfirmDialogHost) mounts on demand to always land last / on top</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--z-modal-dropdown</td><td class="val" data-v-a3290cb2>500</td><td data-v-a3290cb2>menus / popovers that open above a modal dialog (teleported to <body>, e.g. the settings SecondaryModelPicker cascade)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--z-toast</td><td class="val" data-v-a3290cb2>600</td><td data-v-a3290cb2>toast</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--z-tooltip</td><td class="val" data-v-a3290cb2>650</td><td data-v-a3290cb2>tooltip bubble — transient and pointer-events none, so it sits above everything (dialogs, toasts) to stay visible anywhere</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--z-max</td><td class="val" data-v-a3290cb2>9999</td><td data-v-a3290cb2>reserved: only this tier for extreme fallback</td></tr></tbody></table><h3 class="sub" data-v-a3290cb2>Motion</h3><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Token</th><th data-v-a3290cb2>Value</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--ease-out</td><td class="val" data-v-a3290cb2>cubic-bezier(0.16, 1, 0.3, 1)</td><td data-v-a3290cb2>enter, hover, expand</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--ease-in-out</td><td class="val" data-v-a3290cb2>cubic-bezier(0.4, 0, 0.2, 1)</td><td data-v-a3290cb2>panel width, layout changes</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--duration-fast</td><td class="val" data-v-a3290cb2>120ms</td><td data-v-a3290cb2>press, focus</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--duration-base</td><td class="val" data-v-a3290cb2>160ms</td><td data-v-a3290cb2>hover, show/hide</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--duration-slow</td><td class="val" data-v-a3290cb2>260ms</td><td data-v-a3290cb2>dialog, Sheet, layout</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--duration-hover-intent</td><td class="val" data-v-a3290cb2>250ms</td><td data-v-a3290cb2>hover-intent reveal gate (TOC rail)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--duration-spin</td><td class="val" data-v-a3290cb2>700ms</td><td data-v-a3290cb2>spinner rotation period (mention-tip probe spinner)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--duration-flash</td><td class="val" data-v-a3290cb2>1200ms</td><td data-v-a3290cb2>one-shot attention flashes (search locate, provider-row added) — a highlight timeout, past the show/hide ramp on purpose</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--anim-rive-spin</td><td class="val" data-v-a3290cb2>416.7ms</td><td data-v-a3290cb2>new-chat / folder-plus icon: plus spin on hover</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--anim-leftbar</td><td class="val" data-v-a3290cb2>533.3ms</td><td data-v-a3290cb2>sidebar toggle icon: arrow fly-in on hover</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--anim-leftbar-shrink</td><td class="val" data-v-a3290cb2>200ms</td><td data-v-a3290cb2>sidebar toggle icon: divider shrink on hover</td></tr></tbody></table><p data-v-a3290cb2>The <code data-v-a3290cb2>--anim-*</code> lengths are track timings ported verbatim from the designer's Rive exports, so they sit outside the <code data-v-a3290cb2>--duration-*</code> ramp on purpose — retiming the ramp must not distort them. Their interpolation stays <code data-v-a3290cb2>linear</code> because the easing is already baked into the dense keyframe stops; a token easing would double-apply. Three hover tracks use them today: the sidebar toggle shrinks its divider to half height while an arrow flies in and settles (the expand variant mirrors the track from the left), and the new-chat / folder-plus pluses do one bouncy spin. Each track is keyed to an id inside its own glyph (<code data-v-a3290cb2>#bar-divider</code>, <code data-v-a3290cb2>#bar-arrow</code> / <code data-v-a3290cb2>#bar-arrow-expand</code>, <code data-v-a3290cb2>#p1</code>, <code data-v-a3290cb2>#af-p1</code>) so every instance of the icon animates, and all revert on mouse-out. They still fall under the global reduced-motion switch below.</p><h4 class="mini" data-v-a3290cb2>Reduced motion</h4><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2> Under <code data-v-a3290cb2>@media (prefers-reduced-motion: reduce)</code>, all animation and transition durations drop to about <code data-v-a3290cb2>0.001ms</code> (effectively off), and the chat working indicator's mascot renders its static fallback instead of the Rive loop. Components should not check this individually; it is handled uniformly in the global styles. The switch clears durations, not <code data-v-a3290cb2>transition-delay</code>: a hover-intent gate (the conversation TOC's 250ms reveal) decides <i data-v-a3290cb2>whether</i> hidden content appears, and clearing it would make pointer fly-bys strobe content for reduced-motion users. </div></div><h3 class="sub" data-v-a3290cb2>Layout & breakpoints</h3><p data-v-a3290cb2>Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Token</th><th data-v-a3290cb2>Value</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-sidebar-w</td><td class="val" data-v-a3290cb2>264px</td><td data-v-a3290cb2>left session sidebar width</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-content-max</td><td class="val" data-v-a3290cb2>760px</td><td data-v-a3290cb2>chat reading-column max width (regular chat prose)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-content-wide</td><td class="val" data-v-a3290cb2>920px</td><td data-v-a3290cb2>wide content (settings / panel)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-table-max</td><td class="val" data-v-a3290cb2>1040px</td><td data-v-a3290cb2>desktop wide-table max width (see §04)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-table-cell-max</td><td class="val" data-v-a3290cb2>700px</td><td data-v-a3290cb2>max width of a single table column; longer cell content wraps (see §04)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-bp-sm</td><td class="val" data-v-a3290cb2>640px</td><td data-v-a3290cb2>mobile / desktop boundary</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-bp-md</td><td class="val" data-v-a3290cb2>980px</td><td data-v-a3290cb2>narrow / wide screen boundary</td></tr></tbody></table><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2> At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap. </div></div>',24))]),t("section",Y,[a[27]||(a[27]=c(`<div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>03</span><h2 class="sec-title" data-v-a3290cb2>Primitives</h2></div><p class="sec-desc" data-v-a3290cb2> Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — <code data-v-a3290cb2>variant</code> / <code data-v-a3290cb2>size</code> — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors. </p><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2> For every interactive primitive, the <b data-v-a3290cb2>keyboard behavior, focus, and ARIA contract are in §08 Accessibility</b>. New primitives must ship with a keyboard model — mouse-only interaction is not enough. </div></div><h3 class="sub" data-v-a3290cb2>Component selection guide</h3><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Scenario</th><th data-v-a3290cb2>Use</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td data-v-a3290cb2>Primary action (submit / confirm)</td><td data-v-a3290cb2><code data-v-a3290cb2>Button variant=primary</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Secondary action / cancel</td><td data-v-a3290cb2><code data-v-a3290cb2>Button secondary</code> / <code data-v-a3290cb2>ghost</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Destructive action (delete / abort)</td><td data-v-a3290cb2><code data-v-a3290cb2>Button danger</code> / <code data-v-a3290cb2>danger-soft</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Status marker</td><td data-v-a3290cb2><code data-v-a3290cb2>Badge</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Toolbar filter / model switch</td><td data-v-a3290cb2><code data-v-a3290cb2>Pill</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>2–5 mutually exclusive options</td><td data-v-a3290cb2><code data-v-a3290cb2>SegmentedControl</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Top tabs</td><td data-v-a3290cb2><code data-v-a3290cb2>Tabs</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Switch / multi-select</td><td data-v-a3290cb2><code data-v-a3290cb2>Switch</code> / <code data-v-a3290cb2>Checkbox</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Scrollable regions with overlay controls</td><td data-v-a3290cb2><code data-v-a3290cb2>ScrollArea</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Floating content card / list action menu</td><td data-v-a3290cb2><code data-v-a3290cb2>Card</code> / <code data-v-a3290cb2>Menu</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Inline notice / global toast</td><td data-v-a3290cb2><code data-v-a3290cb2>Banner</code> / <code data-v-a3290cb2>Toast</code></td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Dialog / confirmation · bottom panel (mobile)</td><td data-v-a3290cb2><code data-v-a3290cb2>Dialog</code> / <code data-v-a3290cb2>Sheet</code></td></tr></tbody></table><h3 class="sub" data-v-a3290cb2>Button</h3><p data-v-a3290cb2>4 semantic variants × 3 sizes. The primary action <code data-v-a3290cb2>primary</code> takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses <code data-v-a3290cb2>--radius-md</code> uniformly (small size <code data-v-a3290cb2>--radius-sm</code>), weight 600, with a visible focus ring.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Variant matrix <span class="tag spec" data-v-a3290cb2>light</span></span><span class="sactions" data-v-a3290cb2><span class="tab on" data-v-a3290cb2>preview</span></span></div><div class="stage p col" data-v-a3290cb2><span class="stage-label" data-v-a3290cb2>medium · default</span><div class="demo-row" data-v-a3290cb2><button class="p-btn primary" data-v-a3290cb2>Primary action</button><button class="p-btn secondary" data-v-a3290cb2>Secondary action</button><button class="p-btn ghost" data-v-a3290cb2>Ghost button</button><button class="p-btn danger-soft" data-v-a3290cb2>Destructive (soft)</button><button class="p-btn danger" data-v-a3290cb2>Destructive action</button></div><span class="stage-label" data-v-a3290cb2>small</span><div class="demo-row" data-v-a3290cb2><button class="p-btn primary sm" data-v-a3290cb2>Confirm</button><button class="p-btn secondary sm" data-v-a3290cb2>Cancel</button><button class="p-btn ghost sm" data-v-a3290cb2>More</button></div><span class="stage-label" data-v-a3290cb2>With icon / state</span><div class="demo-row" data-v-a3290cb2><button class="p-btn primary" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-a3290cb2></path></svg>New chat</button><button class="p-btn secondary" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-a3290cb2></path></svg>Copied</button><button class="p-btn primary disabled" data-v-a3290cb2>Loading…</button></div></div></div><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Dark skin <span class="tag spec" data-v-a3290cb2>dark</span></span></div><div class="stage dark p col" data-p="dark" data-v-a3290cb2><div class="demo-row" data-v-a3290cb2><button class="p-btn primary" data-v-a3290cb2>Primary action</button><button class="p-btn secondary" data-v-a3290cb2>Secondary action</button><button class="p-btn ghost" data-v-a3290cb2>Ghost button</button><button class="p-btn danger" data-v-a3290cb2>Destructive action</button></div></div></div><h4 class="mini" data-v-a3290cb2>API</h4><div class="code" data-v-a3290cb2><div class="code-bar" data-v-a3290cb2><span class="d" data-v-a3290cb2></span><span class="d" data-v-a3290cb2></span><span class="d" data-v-a3290cb2></span><span class="fn" data-v-a3290cb2>Button.vue · usage</span></div><pre data-v-a3290cb2><span class="k" data-v-a3290cb2><Button</span> <span class="p" data-v-a3290cb2>variant</span>=<span class="s" data-v-a3290cb2>"primary"</span> <span class="p" data-v-a3290cb2>size</span>=<span class="s" data-v-a3290cb2>"md"</span> <span class="p" data-v-a3290cb2>:loading</span>=<span class="s" data-v-a3290cb2>"submitting"</span><span class="k" data-v-a3290cb2>></span>Save<span class="k" data-v-a3290cb2></Button></span> + <span class="c" data-v-a3290cb2>// variant: primary | secondary | ghost | danger | danger-soft</span> + <span class="c" data-v-a3290cb2>// size: sm | md | lg</span></pre></div><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>States</span></div><div class="stage p" data-v-a3290cb2><div class="demo-row" data-v-a3290cb2><button class="p-btn primary" disabled style="opacity:.5;cursor:not-allowed;" data-v-a3290cb2>Disabled primary</button><button class="p-btn primary" data-v-a3290cb2><svg class="p-spinner sm" viewBox="0 0 24 24" data-v-a3290cb2><circle class="track" cx="12" cy="12" r="9" data-v-a3290cb2></circle><circle class="arc" cx="12" cy="12" r="9" data-v-a3290cb2></circle></svg>Submitting</button><button class="p-btn danger" disabled style="opacity:.5;cursor:not-allowed;" data-v-a3290cb2>Disabled danger</button></div></div></div><h3 class="sub" data-v-a3290cb2>IconButton</h3><p data-v-a3290cb2>Unified into three sizes — 26 / 32 / 44px — with the neutral <code data-v-a3290cb2>--color-hover</code> wash on hover and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>IconButton</span></div><div class="stage p" data-v-a3290cb2><button class="p-icon-btn" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-a3290cb2></path></svg></button><button class="p-icon-btn" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-a3290cb2></path></svg></button><button class="p-icon-btn" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-a3290cb2></path></svg></button><button class="p-icon-btn sm" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975z" data-v-a3290cb2></path></svg></button><button class="p-icon-btn sm" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-a3290cb2></path></svg></button></div></div><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2> The desktop IconButton comes in <code data-v-a3290cb2>sm</code> 26 / <code data-v-a3290cb2>md</code> 32; on touch devices the tap target should be ≥ 44px, so use <code data-v-a3290cb2>lg</code> 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses <code data-v-a3290cb2>lg</code>). Icon-only buttons must also name themselves on hover: pass <code data-v-a3290cb2>tooltip</code> (usually the same text as <code data-v-a3290cb2>label</code> — <code data-v-a3290cb2>label</code> alone only sets the aria-label); bare icon <code data-v-a3290cb2><button></code>/<code data-v-a3290cb2><a></code> triggers wrap the <code data-v-a3290cb2>Tooltip</code> component directly. </div></div><h3 class="sub" data-v-a3290cb2>Badge · Chip · Pill</h3><p data-v-a3290cb2>Collapsed into two kinds: <b data-v-a3290cb2>Badge</b> (status badge, with an optional status dot) and <b data-v-a3290cb2>Pill</b> (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Badge · status badge</span></div><div class="stage p col" data-v-a3290cb2><span class="stage-label" data-v-a3290cb2>Semantic variants</span><div class="demo-row" data-v-a3290cb2><span class="p-badge neutral" data-v-a3290cb2><span class="bd" data-v-a3290cb2></span>pending</span><span class="p-badge info" data-v-a3290cb2><span class="bd" data-v-a3290cb2></span>running</span><span class="p-badge success" data-v-a3290cb2><span class="bd" data-v-a3290cb2></span>completed</span><span class="p-badge warning" data-v-a3290cb2><span class="bd" data-v-a3290cb2></span>needs confirmation</span><span class="p-badge danger" data-v-a3290cb2><span class="bd" data-v-a3290cb2></span>failed</span><span class="p-badge solid" data-v-a3290cb2>KIMI</span></div><span class="stage-label" data-v-a3290cb2>With icon / small size</span><div class="demo-row" data-v-a3290cb2><span class="p-badge info" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1m1 2v14h14V5z" data-v-a3290cb2></path></svg>plan</span><span class="p-badge success sm" data-v-a3290cb2><span class="bd" data-v-a3290cb2></span>passed</span><span class="p-badge neutral sm" data-v-a3290cb2>read-only</span></div></div></div>`,19)),t("div",Q,[a[14]||(a[14]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Pill · toolbar pill (composer)")],-1)),t("div",Z,[a[12]||(a[12]=c('<span class="p-pill" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M8 4h13v2H8zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M8 11h13v2H8zm0 7h13v2H8z" data-v-a3290cb2></path></svg><span class="pp-strong" data-v-a3290cb2>kimi-k2</span><span class="pp-sub" data-v-a3290cb2>· thinking</span><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-a3290cb2></path></svg></span>',1)),t("span",X,[s(d(o),{name:"shield-question",size:"sm"}),a[11]||(a[11]=e("yolo",-1))]),a[13]||(a[13]=t("span",{class:"p-pill"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m1-8h4v2h-6V7h2z"})]),e("12k / 200k")],-1))])]),a[28]||(a[28]=c(`<h3 class="sub" data-v-a3290cb2>Kbd · keyboard shortcut</h3><p data-v-a3290cb2><b data-v-a3290cb2>Kbd</b> renders a shortcut as keycaps — one block per key, never inline text like <code data-v-a3290cb2>(⌘K)</code>. Caps are 18px tall (Badge sm rhythm): transparent ground with a 0.5px hairline edge, 11px <code data-v-a3290cb2>--font-kbd</code> (Inter + system-ui), text colour inherited from the row that carries it — the cap has no fill or colour of its own, so it follows its context (bright inside the accent-ringed recording box, quiet in a hint row). Typical placement: pushed to the row's trailing edge, opposite the label (e.g. the sidebar search row), and inside dialog navigation hints.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Kbd · keycaps</span></div><div class="stage p" data-v-a3290cb2><span class="p-kbd" data-v-a3290cb2><kbd data-v-a3290cb2>⌘</kbd><kbd data-v-a3290cb2>K</kbd></span><span class="p-kbd" data-v-a3290cb2><kbd data-v-a3290cb2>Ctrl</kbd><kbd data-v-a3290cb2>K</kbd></span><span class="p-kbd" data-v-a3290cb2><kbd data-v-a3290cb2>⌘</kbd><kbd data-v-a3290cb2>⇧</kbd><kbd data-v-a3290cb2>P</kbd></span></div></div><h3 class="sub" data-v-a3290cb2>Card / Surface</h3><p data-v-a3290cb2>All cards across the site share <b data-v-a3290cb2>one structure</b> — <code data-v-a3290cb2>head / body / foot</code> — and come in two tiers by visual weight:</p><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2><b data-v-a3290cb2>Operation card</b> —— composite "process" content such as the Swarm overview. (Individual tool calls are NOT cards anymore: they render as quiet borderless lines, see §04.) Flat shell: <code data-v-a3290cb2>0.5px</code> hairline, <code data-v-a3290cb2>--radius-md</code>, no shadow. The head is compact mono with no fill, low weight by default, not competing with the conversation.</li><li data-v-a3290cb2><b data-v-a3290cb2>Attention card</b> —— content that needs a user decision, such as Question / Approval. A floating neutral card: white raised surface, <code data-v-a3290cb2>--radius-lg</code>, a faint popover shadow (<code data-v-a3290cb2>--shadow-menu</code>), a plain dark title head, and a hairline footer whose actions read in number-key order (chips on the buttons) leading to one solid primary action. No semantic color band.</li></ul><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Operation card · compact mono head (no fill)</span></div><div class="stage p col" data-v-a3290cb2><div class="p-card" style="max-width:460px;" data-v-a3290cb2><div class="p-card-head" data-v-a3290cb2><span class="p-card-title" data-v-a3290cb2>read_file</span><span class="p-badge info sm" style="margin-left:auto;" data-v-a3290cb2>session.ts</span></div><div class="p-card-body" data-v-a3290cb2>The head uses mono + a neutral background to emphasize its "code / process" nature; the body uses sans for readability. Flat, radius-md, same shape as the Swarm composite card.</div></div></div></div><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Attention card · floating neutral surface (no color band)</span></div><div class="stage p col" data-v-a3290cb2><div class="p-action" style="max-width:460px;" data-v-a3290cb2><div class="p-action-head" data-v-a3290cb2><span class="p-action-title" data-v-a3290cb2>A decision needs your confirmation</span></div><div class="p-action-body" data-v-a3290cb2>A floating neutral card — no color band. The raised surface, large radius and soft shadow lift it above the transcript; the head is a plain dark title, and the hairline footer lines up quiet text buttons leading to one solid primary action.</div><div class="p-action-foot" data-v-a3290cb2><button class="p-btn ghost sm" data-v-a3290cb2>Dismiss</button><button class="p-btn primary sm" data-v-a3290cb2>Confirm</button></div></div></div></div><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Activity run · a summary row expands into the folded lines</span></div><div class="stage p col" data-v-a3290cb2><div class="p-tool-group open" style="max-width:460px;" data-v-a3290cb2><div class="p-tool-group-head" data-v-a3290cb2><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-a3290cb2></path></svg><span class="tg-title" data-v-a3290cb2>Read 2 files</span></div><div class="p-tool-row" data-v-a3290cb2><span class="tr-name" data-v-a3290cb2>Read</span><span class="tr-file" data-v-a3290cb2>session.ts</span><span class="tr-faint" data-v-a3290cb2>src/auth</span><span class="tr-chip" data-v-a3290cb2>34 lines</span><span class="tr-ok" data-v-a3290cb2>✓</span></div><div class="p-tool-row" data-v-a3290cb2><span class="tr-name" data-v-a3290cb2>Read</span><span class="tr-file" data-v-a3290cb2>middleware.ts</span><span class="tr-faint" data-v-a3290cb2>src/auth</span><span class="tr-chip" data-v-a3290cb2>58 lines</span><span class="tr-ok" data-v-a3290cb2>✓</span></div></div></div></div><ul class="clean check" data-v-a3290cb2><li data-v-a3290cb2><b data-v-a3290cb2>One structure, two shells</b>: every card is <code data-v-a3290cb2>head / body / foot</code>; operation cards are flat + 0.5px hairline + radius-md with no shadow, while the attention card is the single exception — raised surface, radius-lg and a soft shadow, because it floats above the transcript in place of the composer.</li><li data-v-a3290cb2><b data-v-a3290cb2>Differences are intentional</b>: operation cards keep a compact mono head; attention cards get a plain dark title head and footer actions.</li><li data-v-a3290cb2><b data-v-a3290cb2>Grouping</b>: consecutive activity (thinking + tool calls of any kind, cards included) folds into ONE activity-run row — a smart summary sentence that expands into the items in order; only text and successful media tools (inline media is the turn's output) stay out and break the run (see §04).</li><li data-v-a3290cb2><b data-v-a3290cb2>Turn fold</b>: once an assistant turn settles, everything before its final text block (thinking, activity runs, interim text, standalone cards) folds into ONE bare "Worked Ns" row — no glyph, a faint one-line label + rotating chevron sharing the activity-run head's padding and hover language; while the turn streams the row stays hidden and the body forced open, and on settle the row appears and folds itself back. The span is the turn's elapsed time (daemon duration once settled, server message stamps for history; approval/question waits included by design), reading the generic "Work details" without any stamp. The final text — and anything after it, so trailing media / cards stay on screen — never folds; a text-only turn renders no row at all (see §04).</li><li data-v-a3290cb2><b data-v-a3290cb2>Status dots</b>: running (pulsing blue) / done (green) / failed (red), sharing one color vocabulary (see §04 tool calls).</li></ul><h3 class="sub" data-v-a3290cb2>Input / Select / Textarea</h3><p data-v-a3290cb2>Unified 38px height (32px small), <code data-v-a3290cb2>--radius-md</code> radius, <code data-v-a3290cb2>--color-surface-overlay</code> background, and a unified blue focus ring (<code data-v-a3290cb2>0 0 0 3px accent-soft</code>). Select is a custom combobox and listbox, not a native <code data-v-a3290cb2><select></code>; opening it centres the selected option in the scrollable menu. Open Select roots enter the dropdown layer; containing settings groups temporarily release clipping and join that layer so later sections cannot cover the menu.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Form primitives</span></div><div class="stage p col" data-v-a3290cb2><div class="demo-row" style="align-items:flex-start;" data-v-a3290cb2><div class="p-field demo-grow" data-v-a3290cb2><label class="p-label" data-v-a3290cb2>Workspace name</label><input class="p-input" placeholder="e.g. frontend" data-v-a3290cb2><span class="p-hint" data-v-a3290cb2>Only letters, numbers, and hyphens are allowed.</span></div><div class="p-field demo-grow" data-v-a3290cb2><label class="p-label" data-v-a3290cb2>Model provider</label><button class="p-select" type="button" data-v-a3290cb2>Anthropic</button></div></div><div class="p-field" data-v-a3290cb2><label class="p-label" data-v-a3290cb2>System prompt</label><textarea class="p-textarea" placeholder="Describe this Agent's role and boundaries…" data-v-a3290cb2></textarea></div></div></div><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>States</span></div><div class="stage p col" data-v-a3290cb2><div class="demo-row" style="align-items:flex-start;" data-v-a3290cb2><div class="p-field demo-grow" data-v-a3290cb2><label class="p-label" data-v-a3290cb2>Workspace name</label><input class="p-input" value="my workspace!" style="border-color:var(--p-danger);" data-v-a3290cb2><span class="p-field-error" data-v-a3290cb2>Please enter a valid workspace name</span></div><div class="p-field demo-grow" data-v-a3290cb2><label class="p-label" data-v-a3290cb2>Display name</label><input class="p-input" value="frontend" data-v-a3290cb2><span class="p-hint" data-v-a3290cb2>Normal state · validation passed</span></div></div></div></div><h3 class="sub" data-v-a3290cb2>Code / Diff</h3><p data-v-a3290cb2><b data-v-a3290cb2>Diff controls</b>: The non-selectable branch summary starts with a 14px branch icon, aligns to the panel header's 12px inset, uses 12px labels, and ends with a 0.5px hairline. List and tree choices use the 14px <code data-v-a3290cb2>list</code> and <code data-v-a3290cb2>tree-view</code> registry icons. Flat-list and tree-view paths use the UI font at 12px. Tree roots share the flat list's 14px content inset, then each depth advances by 12px and adds a grey indentation rule.</p><p data-v-a3290cb2><b data-v-a3290cb2>Diff empty state</b>: Centre the clean-workspace message in the available panel height and lead with a quiet 32px status icon.</p><p data-v-a3290cb2><b data-v-a3290cb2>Diff detail body</b>: the right-side diff detail reuses <code data-v-a3290cb2>HighlightedCode</code> unframed (the panel owns the edge and scroll) — shiki highlighting with the language inferred from the file path, an old/new line-number gutter, hunk headers as a muted band, at the shared code size <code data-v-a3290cb2>--code-font-size</code> (12px at Medium, one step below body text). The file preview's code body (text / JSON / HTML and Markdown source) renders through the same component with a per-row number gutter plus search-hit / jump-target row states.</p><p data-v-a3290cb2>Inline code, code blocks, and diff contents use the monospace font (<code data-v-a3290cb2>--p-font-mono</code>); diff change counts and branch summaries use the UI font. Code blocks have a filename title bar and a copy button; the action edge uses a compact 6px inset. Diffs use <code data-v-a3290cb2>+</code> / <code data-v-a3290cb2>-</code> row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Code / Diff</span></div><div class="stage p col" data-v-a3290cb2><span class="stage-label" data-v-a3290cb2>inline code</span><div data-v-a3290cb2>The server uses <code class="p-code-inline" data-v-a3290cb2>jwt.verify(token)</code> to verify the signature, returning 401 on failure.</div><span class="stage-label" data-v-a3290cb2>code block</span><div class="p-code-block" data-v-a3290cb2><div class="p-code-block-head" data-v-a3290cb2><span data-v-a3290cb2>session.ts</span><button class="p-icon-btn sm" aria-label="Copy" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z" data-v-a3290cb2></path></svg></button></div><pre data-v-a3290cb2>import { verify } from './jwt'; + + export function auth(token: string) { + return verify(token, process.env.JWT_SECRET!); + }</pre></div><span class="stage-label" data-v-a3290cb2>diff</span><div class="p-diff" data-v-a3290cb2><div class="p-diff-head" data-v-a3290cb2>session.ts · +3 -1</div><div class="p-diff-row" data-v-a3290cb2><span class="pm" data-v-a3290cb2></span><span class="p-diff-code" data-v-a3290cb2>import { verify } from './jwt';</span></div><div class="p-diff-row del" data-v-a3290cb2><span class="pm" data-v-a3290cb2>-</span><span class="p-diff-code" data-v-a3290cb2>const secret = 'dev-secret';</span></div><div class="p-diff-row add" data-v-a3290cb2><span class="pm" data-v-a3290cb2>+</span><span class="p-diff-code" data-v-a3290cb2>const secret = process.env.JWT_SECRET!;</span></div><div class="p-diff-row" data-v-a3290cb2><span class="pm" data-v-a3290cb2></span><span class="p-diff-code" data-v-a3290cb2>return verify(token, secret);</span></div></div></div></div><h3 class="sub" data-v-a3290cb2>Dialog</h3><p data-v-a3290cb2>One dialog primitive replaces 6 hand-written implementations: unified <code data-v-a3290cb2>--radius-xl</code> radius, <code data-v-a3290cb2>--shadow-xl</code> shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Dialog primitive</span></div><div class="stage p col" style="align-items:center;" data-v-a3290cb2><div class="p-dialog" data-v-a3290cb2><div class="p-dialog-head" data-v-a3290cb2><div data-v-a3290cb2><div class="p-dialog-title" data-v-a3290cb2>New chat</div><div class="p-dialog-desc" data-v-a3290cb2>Create an independent Agent chat in the current workspace.</div></div><button class="p-icon-btn sm" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-a3290cb2></path></svg></button></div><div class="p-dialog-body" data-v-a3290cb2><div class="p-field" data-v-a3290cb2><label class="p-label" data-v-a3290cb2>Chat title (optional)</label><input class="p-input" placeholder="Generated automatically" data-v-a3290cb2></div></div><div class="p-dialog-foot" data-v-a3290cb2><button class="p-btn secondary" data-v-a3290cb2>Cancel</button><button class="p-btn primary" data-v-a3290cb2>Create</button></div></div></div></div><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2><b data-v-a3290cb2>Size & height</b>: Dialog offers three widths — <code data-v-a3290cb2>md</code> 440 / <code data-v-a3290cb2>lg</code> 640 / <code data-v-a3290cb2>xl</code> 760 (<code data-v-a3290cb2>--p-content-max</code>) — chosen by content weight. Height comes in two kinds: <code data-v-a3290cb2>auto</code> (default, grows with content up to <code data-v-a3290cb2>max-height</code>) and <code data-v-a3290cb2>fixed</code> (constant height <code data-v-a3290cb2>min(680px, 100vh - 64px)</code>, with overflow scrolled inside the body). <b data-v-a3290cb2>Content / multi-tab dialogs</b> (settings, model picker, provider manager, folder browser) always use <code data-v-a3290cb2>fixed</code> so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep <code data-v-a3290cb2>auto</code>. Selectable controls inside Settings use 0.5px hairlines. Its navigation stays transparent on the grouped canvas — separated from the content region by the 0.5px hairline (horizontal in the stacked mobile layout) — and uses 12px labels at weight 525 with 16px registry icons; the selected tab paints the same neutral <code data-v-a3290cb2>--color-hover</code> wash as hover, with the label simply brightening to <code data-v-a3290cb2>--color-text</code> — the Kimi app settings nav's recipe (<code data-v-a3290cb2>.ss-nav-item--active</code> → <code data-v-a3290cb2>Fills-F1</code>, no accent tint, no weight change); section captions use 16px UI text in <code data-v-a3290cb2>--color-text</code>. Every setting row has a plain-language description; option labels use <code data-v-a3290cb2>--color-text</code> at weight 475 with a 1px gap before that description. Chinese descriptions use “思考” and “计划模式” rather than the English terms; “skills” stays lowercase when it appears within a sentence. Every settings section puts its rows inside one rounded group with 0.5px dividers; the content region paints the flat <code data-v-a3290cb2>--color-surface</code> so each group (<code data-v-a3290cb2>--color-surface-raised</code>) reads one rung above it — never a sunken pit, which would sink the dialog's content below its chrome in dark. The font-size stepper is a compact 32px UI-font control with 12px values and custom minus and plus buttons. Its 52px desktop row centres the control with equal space above and below. Archived workspace headings reuse the sidebar’s <code data-v-a3290cb2>folder-closed</code> registry icon, and Restore actions lead with the <code data-v-a3290cb2>undo</code> icon. Archive counts use weight 500; timestamps and workspace paths use the UI font. </div></div><p data-v-a3290cb2><b data-v-a3290cb2>Dialog backdrop</b>: Use a restrained 28% neutral overlay so the workspace remains legible without competing with the modal.</p><p data-v-a3290cb2><b data-v-a3290cb2>Settings regions</b>: The settings title and close action belong to the right content region. The navigation is a separate full-height region that starts at the dialog's top edge, not content beneath a dialog-wide header.</p><p data-v-a3290cb2><b data-v-a3290cb2>Archived sessions</b>: Start with the localized page title. Do not add a repeated English kicker above it.</p><p data-v-a3290cb2><b data-v-a3290cb2>Settings interaction</b>: Notification labels and descriptions are not selectable; their switches remain fully interactive.</p><p data-v-a3290cb2><b data-v-a3290cb2>Conversation chrome</b>: Header labels are not selectable; the rename input remains selectable and editable. Branch names start with a 14px branch icon. The overflow trigger is a compact 24px control with a 14px icon. Below a 720px header container, hide the workspace prefix and give the conversation title the available width. On macOS desktop the header doubles as the window-drag region and interactive controls opt out with no-drag; while one of its menus or a dock work panel is open every window-drag strip (chat header, sidebar header, panel header) drops the drag region so an outside press anywhere reaches the page and dismisses the overlay (window dragging is simply paused).</p><p data-v-a3290cb2><b data-v-a3290cb2>Session search</b>: follows the §09 flush picker anatomy — a boxed Input under the head, and a result list that fills the body's available height and owns vertical scrolling.</p><p data-v-a3290cb2><b data-v-a3290cb2>Model picker</b>: follows the §09 flush picker anatomy; the provider filter remains horizontally scrollable without showing a persistent scrollbar. Only the model list scrolls; the shortcut bar remains pinned at the bottom.</p><h3 class="sub" data-v-a3290cb2>Toast</h3><p data-v-a3290cb2>Unified information architecture: status icon + title + description. The status color appears only on the icon, avoiding large colored areas that create visual noise. For an <b data-v-a3290cb2>undoable action</b> there is a second, lighter form — the <b data-v-a3290cb2>Action toast</b> (<code data-v-a3290cb2>ActionToast.vue</code>): a pill floating top-center just below the 48px header, carrying a one-line sentence whose actions are plain inline <code data-v-a3290cb2><button></code>s (styled accent by the component), plus close. Self-timed (default 8s, hover pauses); the parent re-keys to reset and wraps it in a <code data-v-a3290cb2><Transition></code>. First used by session archive (Undo / Settings); warnings keep the bottom-right <code data-v-a3290cb2>Toast</code> stack.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Toast</span></div><div class="stage p col" data-v-a3290cb2><div class="p-toast success" data-v-a3290cb2><span class="ti" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-a3290cb2></path></svg></span><div data-v-a3290cb2><div class="tt" data-v-a3290cb2>Connected to server</div><div class="td" data-v-a3290cb2>The local server is responding normally; you can start a new chat.</div></div></div><div class="p-toast warning" data-v-a3290cb2><span class="ti" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z" data-v-a3290cb2></path></svg></span><div data-v-a3290cb2><div class="tt" data-v-a3290cb2>Context usage 82%</div><div class="td" data-v-a3290cb2>Consider running /compact to free up space.</div></div></div></div></div><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Action toast</span></div><div class="stage p col" data-v-a3290cb2><div class="p-action-toast" data-v-a3290cb2><button class="lk" data-v-a3290cb2>Undo</button><span data-v-a3290cb2>or view archived chats in</span><button class="lk" data-v-a3290cb2>Settings</button><svg class="p-ic x" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path d="M17.9542 4.77253C18.3056 4.42106 18.8761 4.42106 19.2276 4.77253C19.579 5.12401 19.579 5.69452 19.2276 6.04597L13.2735 12.0001L19.2276 17.9542C19.5791 18.3056 19.5791 18.8761 19.2276 19.2276C18.8761 19.5791 18.3056 19.5791 17.9542 19.2276L12.0001 13.2735L6.04595 19.2276C5.69451 19.5791 5.12399 19.579 4.77252 19.2276C4.42104 18.8761 4.42104 18.3056 4.77252 17.9542L10.7266 12.0001L4.77252 6.04597C4.42104 5.6945 4.42104 5.124 4.77252 4.77253C5.12399 4.42107 5.69448 4.42106 6.04595 4.77253L12.0001 10.7266L17.9542 4.77253Z" data-v-a3290cb2></path></svg></div></div></div><h3 class="sub" data-v-a3290cb2>Spinner</h3><p data-v-a3290cb2>Loaders fall into two categories by scenario — <b data-v-a3290cb2>do not mix them</b>:</p><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2><b data-v-a3290cb2>Spinner (plain · SVG ring)</b> —— the default loader. Used for button loading, app startup (GlobalLoading), and general inline waits — "everything else".</li><li data-v-a3290cb2><b data-v-a3290cb2>WorkingIndicator (小蓝 mascot · brand signature)</b> —— used <b data-v-a3290cb2>only</b> for the chat working state after a prompt is sent (the sending placeholder in ChatPane, the send → first-token loading in SideChatPanel). The label follows the phase: "Requesting…" until the assistant's reply starts, then "Working…".</li></ul><h4 class="mini" data-v-a3290cb2>Spinner · plain loader (default)</h4>`,39)),t("div",$,[a[18]||(a[18]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Spinner · common scenarios")],-1)),t("div",_,[t("div",aa,[a[17]||(a[17]=c('<svg class="p-spinner" viewBox="0 0 24 24" data-v-a3290cb2><circle class="track" cx="12" cy="12" r="9" data-v-a3290cb2></circle><circle class="arc" cx="12" cy="12" r="9" data-v-a3290cb2></circle></svg><span class="p-thinking" data-v-a3290cb2><svg class="p-spinner sm" viewBox="0 0 24 24" data-v-a3290cb2><circle class="track" cx="12" cy="12" r="9" data-v-a3290cb2></circle><circle class="arc" cx="12" cy="12" r="9" data-v-a3290cb2></circle></svg>Loading…</span>',2)),t("button",ta,[(n(),l("svg",ea,[...a[15]||(a[15]=[t("circle",{class:"track",cx:"12",cy:"12",r:"9"},null,-1),t("circle",{class:"arc",cx:"12",cy:"12",r:"9"},null,-1)])])),a[16]||(a[16]=e("Submitting",-1))])])])]),a[29]||(a[29]=t("h4",{class:"mini"},"WorkingIndicator · 小蓝 mascot (only the chat working state)",-1)),t("div",sa,[a[20]||(a[20]=t("div",{class:"stage-bar"},[t("span",{class:"st"},[e("WorkingIndicator · chat working state only "),t("span",{class:"tag spec"},"signature")])],-1)),t("div",da,[a[19]||(a[19]=t("span",{class:"stage-label"},"Usage · only while the chat has an unfinished prompt",-1)),t("div",oa,[s(x,{label:"Requesting…"}),s(x,{label:"Working…"})])])]),a[30]||(a[30]=c('<div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2>The chat working state is rendered uniformly by <code data-v-a3290cb2>WorkingIndicator</code> — the 小蓝 mascot (<code data-v-a3290cb2>KimiMascot</code>, the kimi.com avatar Rive asset, with a static SVG fallback under reduced motion or when the runtime fails) plus a phase label. All other loading states use the plain Spinner.</div></div><h3 class="sub" data-v-a3290cb2>Link</h3><p data-v-a3290cb2>Inline text link: the default is the accent color with no underline; on hover it shows an underline and darkens. File links inside inline code use a 1.5px underline offset so the line stays clear of the chip background. The <code data-v-a3290cb2>.muted</code> variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Link · inline link</span></div><div class="stage p col" data-v-a3290cb2><div class="demo-row" style="font-size:var(--p-font-size-base);color:var(--p-text);" data-v-a3290cb2><span data-v-a3290cb2>Read the full <a class="p-link" href="#" data-v-a3290cb2>design token docs</a> before building.</span><a class="p-link" href="#" data-v-a3290cb2>View on GitHub<svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z" data-v-a3290cb2></path></svg></a><a class="p-link muted" href="#" data-v-a3290cb2>View history</a></div></div></div><h3 class="sub" data-v-a3290cb2>Menu / Dropdown</h3><p data-v-a3290cb2>Desktop menus use a 3.5px panel inset. Standard items use 5px × 9px padding and a 7px icon gap. Their three-layer neutral shadow stays below 4% opacity.</p><p data-v-a3290cb2>Dropdown menu panel: frosted glass — the translucent <code data-v-a3290cb2>--color-menu-bg</code> fill over a blurred, saturated page backdrop (<code data-v-a3290cb2>--p-menu-backdrop</code>) — plus hairline + light shadow (<code data-v-a3290cb2>--shadow-menu</code>, a three-layer neutral ramp). This is the one place glassmorphism is the design language rather than an exception (§06); every floating menu surface (Menu.vue, the Select listbox, composer dropdowns, slash/mention popups) uses the token pair, never ad-hoc blur values. Menu items support icons, the current (active) state, the danger state, and the disabled state, with separators grouping items. All menu actions use 13px labels at weight 475 with 16px leading icons; both share a 16px line box for vertical alignment. Menu timestamps use the UI font. On touch / mobile, use <code data-v-a3290cb2>lg</code> (≥44px row height) while keeping the same type size. A dropdown menu pops in from its trigger corner — fade plus a slight 0.97 scale over <code data-v-a3290cb2>--duration-base</code> (exit <code data-v-a3290cb2>--duration-fast</code>), the composer model dropdown's motion language; the transform origin and the nudge direction follow the anchoring, including the upward flip near the viewport edge.</p><p data-v-a3290cb2>Row states: hover uses the mode-aware <code data-v-a3290cb2>--color-hover</code> wash (it lightens under dark, never darkens); a leading icon sits one rung below the label (<code data-v-a3290cb2>--muted</code>), and on hover both label and icon step up to <code data-v-a3290cb2>--color-text-strong</code>, the max foreground tier. Selection keeps the accent pair (<code data-v-a3290cb2>--color-accent-soft</code> / <code data-v-a3290cb2>--color-accent-hover</code>); danger keeps its own colour.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Menu · dropdown menu</span></div><div class="stage p col" style="align-items:flex-start;" data-v-a3290cb2><div class="p-menu" data-v-a3290cb2><div class="p-menu-item" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-a3290cb2></path></svg>Open file</div><div class="p-menu-item active" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-a3290cb2></path></svg>Selected item</div><div class="p-menu-item disabled" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16M8.523 7.109l8.368 8.368a6 6 0 0 1-1.414 1.414L7.109 8.523A6 6 0 0 1 8.523 7.11" data-v-a3290cb2></path></svg>Disabled item</div><div class="p-menu-sep" data-v-a3290cb2></div><div class="p-menu-item danger" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-a3290cb2></path></svg>Delete chat</div></div></div></div><h3 class="sub" data-v-a3290cb2>SegmentedControl</h3><p data-v-a3290cb2>Mutually exclusive short option groups, commonly used for 2–5 option switches such as "light / dark / follow system" or the four font-scale steps. Options may include a 14px registry icon or a colour swatch. A single raised indicator with a soft shadow (no border — the edge stays clean) slides and resizes between options using the standard motion tokens. Three sizes: <code data-v-a3290cb2>md</code> (default, settings pages), <code data-v-a3290cb2>sm</code> (compact rows), and <code data-v-a3290cb2>xs</code> (dense menus such as the composer model dropdown — 20px items, 12px labels).</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>SegmentedControl</span></div><div class="stage p col" data-v-a3290cb2><div class="p-seg" data-v-a3290cb2><span class="p-seg-item on" data-v-a3290cb2>Light</span><span class="p-seg-item" data-v-a3290cb2>Dark</span><span class="p-seg-item" data-v-a3290cb2>Follow system</span></div></div></div><h3 class="sub" data-v-a3290cb2>SecondaryModelPicker</h3><p data-v-a3290cb2>Linked model + thinking-effort picker (settings → Agent → Subagents, experimental; <code data-v-a3290cb2>components/settings/SecondaryModelPicker.vue</code>, shared by both ends). Use it whenever two choices are only valid as a pair — here an effort is meaningless without its model, and every model declares a different supported set. It is a cascading variant of the §03 Select: the trigger is the Select trigger verbatim (value renders <code data-v-a3290cb2>model · effort</code>, the unset state uses the placeholder tint), and the dropdown opens as a SINGLE-LEVEL model list (grouped by provider) on the floating menu surface (<code data-v-a3290cb2>--color-menu-bg</code> / <code data-v-a3290cb2>--p-menu-backdrop</code> / <code data-v-a3290cb2>--shadow-lg</code>). The menu <b data-v-a3290cb2>teleports to <code data-v-a3290cb2><body></code> with <code data-v-a3290cb2>position: fixed</code></b> — it opens on top of the settings modal (on the <code data-v-a3290cb2>--z-modal-dropdown</code> rung), and only a body-level surface escapes the dialog's scrolling-body clip; it re-anchors to the trigger on any outside scroll and closes on window resize (the UserMenu teleport's full recipe). Hovering or clicking a model row flies its effort submenu out to the RIGHT of the row — same menu surface, anchored to the row's live position, flipping to the left only near the viewport edge per the §03 anchoring rules — with a 250ms hover-intent grace (the UserMenu flyout's recipe) so the diagonal path into the submenu doesn't collapse it. Every model row carries a trailing <code data-v-a3290cb2>chevron-right</code> affordance; clicking an effort confirms the pair and closes — one atomic write, never two staggered patches. Flyout options follow the composer's thinking-level model (<code data-v-a3290cb2>segmentsFor</code>): effort models get <code data-v-a3290cb2>off</code> + their declared levels (always-thinking ones get no off), boolean-thinking models get <code data-v-a3290cb2>on</code>/<code data-v-a3290cb2>off</code>, unsupported models get <code data-v-a3290cb2>off</code> alone; while no effort is set at all, a "Model default" entry leads (it writes the model alone — POST /config merges and cannot clear a stored effort, so the entry disappears once one is set). A configured effort the model no longer declares is appended as an extra flyout option so the current pair stays visible and re-selectable. Keyboard mirrors the Select contract (focus stays on the trigger, Esc <code data-v-a3290cb2>preventDefault</code>s so the hosting dialog does not close): ↑/↓ move within the active level (the flyout follows model moves), → opens the flyout, ← collapses it, Enter confirms, Home/End jump. ARIA: combobox trigger → <code data-v-a3290cb2>dialog</code> menu holding a model <code data-v-a3290cb2>listbox</code> plus the effort <code data-v-a3290cb2>listbox</code> flyout with <code data-v-a3290cb2>option</code> rows. The menu itself flips upward when the trigger sits near the viewport bottom.</p><h3 class="sub" data-v-a3290cb2>Tabs</h3><p data-v-a3290cb2>Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Tabs</span></div><div class="stage p col" data-v-a3290cb2><div class="p-tabs" data-v-a3290cb2><span class="p-tab on" data-v-a3290cb2>General</span><span class="p-tab" data-v-a3290cb2>Agent</span><span class="p-tab" data-v-a3290cb2>Advanced</span></div></div></div><h3 class="sub" data-v-a3290cb2>Switch</h3><p data-v-a3290cb2>A two-state switch for settings that take effect immediately. The 36×20 track has a 0.5px hairline and full radius; its 16px knob uses 1.5px internal offsets so the visible inset remains 2px and symmetric after accounting for the border. On hover, the knob eases to an 18px rounded rectangle towards the track centre. When on, the track turns accent and the knob slides right.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Switch</span></div><div class="stage p" data-v-a3290cb2><span class="p-switch on" data-v-a3290cb2></span><span class="p-switch" data-v-a3290cb2></span></div></div><h3 class="sub" data-v-a3290cb2>Checkbox</h3><p data-v-a3290cb2>A 17×17 checkbox. When checked it fills with the accent color and shows a white tick (inline SVG). Often paired with a text label.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Checkbox</span></div><div class="stage p" data-v-a3290cb2><span class="p-check on" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-a3290cb2></path></svg></span><span class="p-check" data-v-a3290cb2></span><label style="display:inline-flex;align-items:center;gap:8px;color:var(--p-text);font-size:var(--p-font-size-base);cursor:pointer;" data-v-a3290cb2><span class="p-check on" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-a3290cb2></path></svg></span>Enable auto-save</label></div></div><h3 class="sub" data-v-a3290cb2>Avatar</h3><p data-v-a3290cb2>A 32px default avatar with md radius; <code data-v-a3290cb2>.sm</code> is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Avatar</span></div><div class="stage p" data-v-a3290cb2><span class="p-avatar" data-v-a3290cb2>K</span><span class="p-avatar" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M4 22a8 8 0 1 1 16 0h-2a6 6 0 0 0-12 0zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6m0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4" data-v-a3290cb2></path></svg></span><span class="p-avatar sm" data-v-a3290cb2>K</span></div></div><h3 class="sub" data-v-a3290cb2>EmptyState</h3><p data-v-a3290cb2>A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>EmptyState</span></div><div class="stage p col" data-v-a3290cb2><div class="p-empty" style="width:100%;border:0.5px dashed var(--p-line);border-radius:var(--p-r-lg);" data-v-a3290cb2><svg class="em-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1zm-.692-2H20V5H4v13.385zM8 10h8v2H8z" data-v-a3290cb2></path></svg><div class="em-title" data-v-a3290cb2>No chats yet</div><div class="em-hint" data-v-a3290cb2>Click "New chat" to start a conversation with Kimi</div></div></div></div><h3 class="sub" data-v-a3290cb2>Divider</h3><p data-v-a3290cb2>A 0.5px hairline divider (<code data-v-a3290cb2>--p-line</code>); <code data-v-a3290cb2>.p-divider-v</code> is the vertical divider, used between inline elements.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Divider</span></div><div class="stage p col" data-v-a3290cb2><div style="width:100%;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-a3290cb2>Content above</div><hr class="p-divider" data-v-a3290cb2><div style="width:100%;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-a3290cb2>Content below</div><div style="display:flex;align-items:center;gap:10px;height:24px;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-a3290cb2><span data-v-a3290cb2>kimi-k2</span><span class="p-divider-v" data-v-a3290cb2></span><span data-v-a3290cb2>thinking</span></div></div></div><h3 class="sub" data-v-a3290cb2>Tooltip</h3><p data-v-a3290cb2>A CSS-only hover hint, wrapped in <code data-v-a3290cb2>.p-tip</code>. Inverted background (<code data-v-a3290cb2>--p-text</code> / <code data-v-a3290cb2>--p-bg</code>), single line, no wrapping — carries only short notes.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Tooltip (hover the button)</span></div><div class="stage p" data-v-a3290cb2><span class="p-tip" data-v-a3290cb2><button class="p-icon-btn" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-a3290cb2></path></svg></button><span class="p-tooltip" data-v-a3290cb2>New chat</span></span></div></div><h3 class="sub" data-v-a3290cb2>Banner</h3><p data-v-a3290cb2>An inline notice bar placed at the top of a content area. Three states — <code data-v-a3290cb2>.info</code> / <code data-v-a3290cb2>.warning</code> / <code data-v-a3290cb2>.danger</code> — each with a matching 18px icon.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Banner</span></div><div class="stage p col" data-v-a3290cb2><div class="p-banner info" data-v-a3290cb2><svg class="bn-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16M11 7h2v2h-2zm0 4h2v6h-2z" data-v-a3290cb2></path></svg>Connected to server</div><div class="p-banner warning" data-v-a3290cb2><svg class="bn-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z" data-v-a3290cb2></path></svg>Currently in yolo mode; tool calls will run automatically</div></div></div><h3 class="sub" data-v-a3290cb2>Sheet / BottomSheet</h3><p data-v-a3290cb2>A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>BottomSheet</span></div><div class="stage p col" style="align-items:center;" data-v-a3290cb2><div class="p-sheet" style="width:100%;max-width:360px;" data-v-a3290cb2><div class="p-sheet-handle" data-v-a3290cb2></div><div style="font-size:var(--p-font-size-base);font-weight:700;color:var(--p-text);margin-bottom:8px;" data-v-a3290cb2>Choose a model</div><div class="p-menu-item" style="padding:8px 10px;" data-v-a3290cb2>kimi-k2 · thinking</div><div class="p-menu-item" style="padding:8px 10px;" data-v-a3290cb2>kimi-k2 · instant</div></div></div></div><h3 class="sub" data-v-a3290cb2>Skeleton</h3><p data-v-a3290cb2>A placeholder for loading content, using a breathing opacity animation (no gradients), following the <code data-v-a3290cb2>no-gradient-text</code> rule. Composed into titles / text lines / avatars.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Skeleton</span></div><div class="stage p col" data-v-a3290cb2><div style="display:flex;flex-direction:column;gap:10px;width:100%;max-width:360px;" data-v-a3290cb2><div class="p-skeleton" style="height:16px;width:55%;" data-v-a3290cb2></div><div class="p-skeleton" style="height:12px;width:100%;" data-v-a3290cb2></div><div class="p-skeleton" style="height:12px;width:82%;" data-v-a3290cb2></div><div class="p-skeleton" style="height:32px;width:32px;border-radius:var(--p-r-full);" data-v-a3290cb2></div></div></div></div><h3 class="sub" data-v-a3290cb2>Command Bar</h3><p data-v-a3290cb2>An inline combination of "primary action + command text + copy", sitting between a button and a code block — used for install / onboarding / one-click execution. The primary action reuses <code data-v-a3290cb2>Button primary</code>; the command area uses a mono light-grey background.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Command Bar</span></div><div class="stage p col" data-v-a3290cb2><div class="p-cmdbar" style="max-width:620px;" data-v-a3290cb2><button class="p-btn primary" data-v-a3290cb2>Install Kimi Web ▾</button><span class="p-cmd" data-v-a3290cb2><span class="cmd-text" data-v-a3290cb2>curl -fsSL https://code.kimi.com/install.sh | bash</span><button class="cmd-copy" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z" data-v-a3290cb2></path></svg></button></span></div></div></div><h3 class="sub" data-v-a3290cb2>TopBar</h3><p data-v-a3290cb2>The application top bar. Solid by default; the <code data-v-a3290cb2>.frost</code> variant is translucent + background blur, used <b data-v-a3290cb2>only for sticky navigation bars</b>. Together with the floating menu surfaces (Menu / Dropdown), it is one of the two exceptions to the <code data-v-a3290cb2>no-glassmorphism</code> rule (see §06).</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>TopBar · solid / frosted glass</span></div><div class="stage p col" style="gap:14px;background:radial-gradient(circle at 18% 30%,rgba(23,131,255,.16),transparent 42%),radial-gradient(circle at 82% 75%,rgba(20,23,28,.10),transparent 46%),var(--p-surface-sunken);" data-v-a3290cb2><div class="p-topbar" style="width:100%;max-width:580px;" data-v-a3290cb2><span class="tb-title" data-v-a3290cb2>Solid TopBar</span><span class="tb-actions" data-v-a3290cb2><button class="p-icon-btn sm" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-a3290cb2></path></svg></button></span></div><div class="p-topbar frost" style="width:100%;max-width:580px;" data-v-a3290cb2><span class="tb-title" data-v-a3290cb2>Frosted-glass TopBar · .frost</span><span class="tb-actions" data-v-a3290cb2><button class="p-icon-btn sm" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-a3290cb2></path></svg></button></span></div></div></div><h3 class="sub" data-v-a3290cb2>Find Bar · transcript search</h3><p data-v-a3290cb2>The in-transcript find bar (Cmd/Ctrl+F), implemented by <code data-v-a3290cb2>components/chat/TranscriptSearch.vue</code>. A floating card pinned to the transcript's top-right (<code data-v-a3290cb2>top: --panel-head-h + --space-3</code>, <code data-v-a3290cb2>right: --space-3</code> — equal inset on both axes), <code data-v-a3290cb2>--z-sticky</code>, raised surface + 0.5px hairline + <code data-v-a3290cb2>--shadow-menu</code>. <b data-v-a3290cb2>One radius for both states</b>: <code data-v-a3290cb2>--radius-2xl</code> is a full capsule at the collapsed height and a card once the footer expands — never animate between two radii.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Part</th><th data-v-a3290cb2>Rule</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Input row</td><td data-v-a3290cb2>Search icon (muted) + <b data-v-a3290cb2>bare input</b> — the list-style bare-input exception family (sidebar search row, inline rename), NOT the boxed Input primitive; the 38px bordered control would break the pill. Circular close <code data-v-a3290cb2>IconButton sm</code> (concentric with the capsule end); a 0.5px hairline separator before it. Height comes from the grid: 32px control (<code data-v-a3290cb2>--space-8</code>) + 2× <code data-v-a3290cb2>--space-1</code> padding = 40px — at which <code data-v-a3290cb2>--radius-2xl</code> is exactly the half-height capsule.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Footer (results)</td><td data-v-a3290cb2>Expands via the 0fr→1fr grid fold (<code data-v-a3290cb2>--duration-slow</code>), hairline top separator, prev/next <code data-v-a3290cb2>IconButton sm</code> left, right-aligned muted count (<code data-v-a3290cb2>N/M results</code> · <code data-v-a3290cb2>--ui-font-size-sm</code>). Only exists once a query has settled — while typing or empty, the bar stays a bare pill.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>States</td><td data-v-a3290cb2>collapsed (empty query) / searching (<code data-v-a3290cb2>Spinner sm</code> in the input row during the ~800ms debounce) / results / no-results (count reads "No results", nav disabled). Disabled is uniformly <code data-v-a3290cb2>opacity:.5</code>.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Focus</td><td data-v-a3290cb2>Composer-style: a neutral hairline overlay (<code data-v-a3290cb2>::after</code> + <code data-v-a3290cb2>--color-composer-focus-line</code>) fading in on <code data-v-a3290cb2>:focus-within</code>. No accent ring.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Match ink</td><td data-v-a3290cb2>CSS Custom Highlight API — the bar mutates no transcript DOM. All matches: <code data-v-a3290cb2>--color-search-match</code> (yellow); current: <code data-v-a3290cb2>--color-search-match-current</code> + a 2px <code data-v-a3290cb2>--color-warning</code> outline ring (a positioned overlay — highlight pseudos can't paint box outlines). Tokens live in <code data-v-a3290cb2>app-ui/style.css</code> with light/dark pairs.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Keyboard</td><td data-v-a3290cb2>Cmd/Ctrl+F opens + focuses (repeat = re-focus + select-all; hardcoded, reserved in the desktop keymap), Enter / Shift+Enter steps matches (wrapping), Esc closes from ANY control inside (container-level, so it never reaches the conversation's Esc-abort).</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Matching semantics</td><td data-v-a3290cb2>Rendered transcript DOM only (unloaded older pages are out of scope), capped at 1000 matches (count reads <code data-v-a3290cb2>N/1000+</code>). Matches span inline nodes within one block, never cross block breaks; <code data-v-a3290cb2>inert</code> and <code data-v-a3290cb2>display:none</code> content is excluded. Stepping scrolls the match's own rect into view, not its parent element.</td></tr></tbody></table><h3 class="sub" data-v-a3290cb2>SectionLabel</h3><p data-v-a3290cb2>A small group title for sidebar lists, used to section the content below (such as <code data-v-a3290cb2>Workspaces</code> in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing <code data-v-a3290cb2>.08em</code>, color <code data-v-a3290cb2>--color-fg-faint</code>; left-aligned to the row's starting padding (<code data-v-a3290cb2>--sb-pad-x</code>), keeping the same indent as the group rows below. For scripts without case (such as Chinese), <code data-v-a3290cb2>text-transform:uppercase</code> simply has no effect — no special handling needed.</p>',55)),t("div",ca,[a[26]||(a[26]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Sidebar · group title")],-1)),t("div",ia,[a[25]||(a[25]=t("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),t("div",na,[(n(),l("svg",la,[...a[21]||(a[21]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[22]||(a[22]=e(" kimi-code-web ",-1))]),t("div",ra,[(n(),l("svg",ba,[...a[23]||(a[23]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[24]||(a[24]=e(" playground ",-1))])])])]),t("section",va,[a[136]||(a[136]=c('<div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>04</span><h2 class="sec-title" data-v-a3290cb2>Chat Interface Overhaul</h2></div><p class="sec-desc" data-v-a3290cb2> The message stream is the core of Kimi Web. Tool calls render as <b data-v-a3290cb2>quiet activity lines</b> — one borderless line per call, bespoke per tool kind, auto-grouped, expanding on demand — while Question / Approval elevate to a <b data-v-a3290cb2>floating neutral surface</b> because they need a decision, and the Swarm composite keeps a card; the Composer collapses into a single rounded container. </p><h3 class="sub" data-v-a3290cb2>Unified message stream</h3><p data-v-a3290cb2>User-message bubbles follow the kimiwork production recipe (<code data-v-a3290cb2>MessageItem .user-bubble</code>): a neutral <code data-v-a3290cb2>--color-user-bubble-bg</code> fill (BubbleGray — <code data-v-a3290cb2>#f5f5f5</code> light / <code data-v-a3290cb2>#292929</code> dark), uniform <code data-v-a3290cb2>--radius-lg</code> corners, no border, no shadow.</p><p data-v-a3290cb2>Message timestamps use 12px UI text at weight 500, matching the compact metadata scale without switching to a monospace face.</p><p data-v-a3290cb2>The user-message metadata row sits one 8px spacing step below the bubble, so its actions and timestamp read as supporting information rather than part of the bubble edge.</p><p data-v-a3290cb2>Overlong user messages clamp at 10 measured lines, the tail dissolving through an alpha mask rather than a tint overlay (the translucent accent fill would double-composite); a floating pill toggle centred on the fade expands in place and collapses back, and the collapse pins the toggle itself so the reading position survives. Skill / plugin command args clamp through the same wrapper, beside the card head. Like the transcript's other disclosure controls (thinking row, turn fold, tool lines), the toggle is a bare native button carrying <code data-v-a3290cb2>aria-expanded</code> — chat-surface disclosure controls do not use the §03 Button primitive.</p><p data-v-a3290cb2>The floating jump-to-latest control uses 12px UI text at weight 525, led by the full down-arrow icon rather than a disclosure caret.</p><p data-v-a3290cb2>Thinking is an inline, borderless disclosure row in the message stream — never a side panel. The k15 bulb (the <code data-v-a3290cb2>thinking</code> registry icon) leads the row in every state; while streaming the "Thinking…" label breathes (opacity only, never a gradient shimmer) and whole elapsed seconds tick beside it, afterwards the label settles to "Thinking process" with the final span as <code data-v-a3290cb2>· Ns</code> (renderer-measured, live sessions only — history shows no seconds). Collapsed by default, it expands in place with the standard grid-rows animation and a 90° chevron rotation, and it folds itself back once the stream moves past it, even if the user expanded mid-stream. The header only animates its text colour on hover (standard duration and easing tokens), no card shell.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Conversation · 760px reading column</span></div><div class="stage p col" style="align-items:center;background:#fff;" data-v-a3290cb2><div class="demo-chat" data-v-a3290cb2><div class="p-bubble-user" data-v-a3290cb2>Please change the login endpoint to JWT and add the corresponding unit tests.</div><span class="p-thinking" data-v-a3290cb2><span style="font-size:15px;line-height:1;" data-v-a3290cb2>🌔</span>Analyzing the auth module…</span><div class="p-tool-group open" data-v-a3290cb2><div class="p-tool-group-head" data-v-a3290cb2><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-a3290cb2></path></svg><span class="tg-title" data-v-a3290cb2>Read 2 files</span><svg class="tg-car" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-a3290cb2></path></svg></div><div class="p-tool-row expanded" data-v-a3290cb2><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-a3290cb2></path></svg><span class="tr-name" data-v-a3290cb2>Read</span><span class="tr-file" data-v-a3290cb2>session.ts</span><span class="tr-faint" data-v-a3290cb2>src/auth · :12-45</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-a3290cb2></path></svg><span class="tr-chip" data-v-a3290cb2>34 lines</span><span class="tr-ok" data-v-a3290cb2>✓</span></div><div class="p-tool-detail" data-v-a3290cb2><div class="p-code" data-v-a3290cb2>12 export function verify(token: string) {<br data-v-a3290cb2>13 return jwt.verify(token, getSecret());<br data-v-a3290cb2>14 }</div></div><div class="p-tool-row" data-v-a3290cb2><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-a3290cb2></path></svg><span class="tr-name" data-v-a3290cb2>Read</span><span class="tr-file" data-v-a3290cb2>middleware.ts</span><span class="tr-faint" data-v-a3290cb2>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-a3290cb2></path></svg><span class="tr-chip" data-v-a3290cb2>58 lines</span><span class="tr-ok" data-v-a3290cb2>✓</span></div></div><div class="p-tool-row" data-v-a3290cb2><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414 1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zM4 21h16v-2H4v2z" data-v-a3290cb2></path></svg><span class="tr-name" data-v-a3290cb2>Edit</span><span class="tr-file" data-v-a3290cb2>middleware.ts</span><span class="tr-faint" data-v-a3290cb2>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-a3290cb2></path></svg><span class="tr-add" data-v-a3290cb2>+12</span><span class="tr-del" data-v-a3290cb2>−4</span><span class="tr-bar" aria-hidden="true" data-v-a3290cb2><span style="flex:12;background:var(--p-success);" data-v-a3290cb2></span><span style="flex:4;background:var(--p-danger);" data-v-a3290cb2></span></span><span class="tr-ok" data-v-a3290cb2>✓</span></div><div class="p-tool-row" data-v-a3290cb2><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975z" data-v-a3290cb2></path></svg><span class="tr-name" data-v-a3290cb2>Search</span><span class="tr-mono" data-v-a3290cb2>"jwt.verify"</span><span class="tr-faint" data-v-a3290cb2>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-a3290cb2></path></svg><span class="tr-chip" data-v-a3290cb2>4 results</span><span class="tr-ok" data-v-a3290cb2>✓</span></div><div class="p-msg" data-v-a3290cb2><p data-v-a3290cb2>I looked at the structure of <code data-v-a3290cb2>src/auth</code>; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.</p></div><div class="p-action" data-v-a3290cb2><div class="p-action-head" data-v-a3290cb2><span class="p-action-title" data-v-a3290cb2>A decision needs your confirmation</span></div><div class="p-action-body" data-v-a3290cb2>How long should the JWT expiry be? Default 7 days, refresh token 30 days.</div><div class="p-action-foot" data-v-a3290cb2><button class="p-btn ghost sm" data-v-a3290cb2>Customize</button><button class="p-btn primary sm" data-v-a3290cb2>Use default</button></div></div><div class="p-action" data-v-a3290cb2><div class="p-action-head" data-v-a3290cb2><span class="p-action-title" data-v-a3290cb2>Write permission required</span></div><div class="p-action-body" data-v-a3290cb2>About to modify <code data-v-a3290cb2>src/auth/middleware.ts</code>, 42 lines changed. Allow?</div><div class="p-action-foot" data-v-a3290cb2><button class="p-btn primary sm" data-v-a3290cb2>Allow this time</button><button class="p-btn ghost sm" data-v-a3290cb2>Always allow</button><button class="p-btn ghost sm" data-v-a3290cb2>Deny</button></div></div><div class="p-todo" data-v-a3290cb2><div class="p-todo-row done" data-v-a3290cb2><span class="p-todo-check" data-v-a3290cb2><svg viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-a3290cb2></path></svg></span>Replace session with JWT signing</div><div class="p-todo-row active" data-v-a3290cb2><span class="p-todo-check" data-v-a3290cb2><svg viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><circle cx="12" cy="12" r="3.5" data-v-a3290cb2></circle></svg></span>Refactor the auth middleware</div><div class="p-todo-row" data-v-a3290cb2><span class="p-todo-check" data-v-a3290cb2><svg viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><circle cx="12" cy="12" r="3.5" data-v-a3290cb2></circle></svg></span>Add unit tests</div></div></div></div></div><p data-v-a3290cb2><b data-v-a3290cb2>Wide markdown tables (desktop):</b> regular chat prose stays within the 760px reading column (<code data-v-a3290cb2>--p-content-max</code>), and tables stay there too by default — an overflowing table scrolls horizontally inside its own wrapper, so the page and the chat area never scroll sideways. A clipped table shows a gradient fade at its truncated right edge, and hovering the table reveals a small widen button at its top-right corner; clicking it lets the table grow naturally with its content up to 1040px (<code data-v-a3290cb2>--p-table-max</code>), centred within the conversation pane, and clicking again restores the default width. At the default width a single column is capped at 36% of the pane; once widened the cap relaxes to 700px (<code data-v-a3290cb2>--p-table-cell-max</code>), so long cell content wraps inside the cell instead of stretching the table. The conversation outline (TOC) keeps its usual position just outside the reading column; when a widened table grows past it and scrolls under the rail, the TOC is hidden temporarily and returns as soon as the table leaves, without touching the user's TOC setting. On mobile a table never breaks out of the reading column.</p><h3 class="sub" data-v-a3290cb2>Tool calls: quiet activity lines, bespoke per tool</h3><p data-v-a3290cb2>High-frequency calls like <code data-v-a3290cb2>read</code> / <code data-v-a3290cb2>bash</code> / <code data-v-a3290cb2>grep</code> are "operational noise" — boxed, collapsible cards quickly drown out the conversation. Tool calls therefore render as <b data-v-a3290cb2>one quiet borderless line</b> in the message stream — never a card — and each tool kind composes that line for its own content, so the stream reads like an activity log rather than a pile of widgets. The three visual-weight tiers:</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Three visual-weight tiers</span></div><div class="stage p col" data-v-a3290cb2><span class="stage-label" data-v-a3290cb2>① Tool line · lightest (default) — bespoke content per tool, no card chrome</span><div class="p-tool-row" style="align-self:stretch;" data-v-a3290cb2><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm3 3h5v2H7V8zm0 4h8v2H7v-2z" data-v-a3290cb2></path></svg><span class="tr-name" data-v-a3290cb2>Run</span><span class="tr-mono" data-v-a3290cb2>pnpm run build && pnpm lint</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-a3290cb2></path></svg><span class="tr-chip" data-v-a3290cb2>0.8s</span><span class="tr-ok" data-v-a3290cb2>✓</span></div><span class="stage-label" data-v-a3290cb2>② Activity run · medium (consecutive quiet activity — thinking + tool lines — folds to one smart-summary row)</span><div class="p-tool-group" data-v-a3290cb2><div class="p-tool-group-head" data-v-a3290cb2><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-a3290cb2></path></svg><span class="tg-title" data-v-a3290cb2>Read 3 files</span><svg class="tg-car" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-a3290cb2></path></svg></div></div><span class="stage-label" data-v-a3290cb2>③ Sub Agent identity card · one per delegation — task title + agent type; the whole card opens the side panel (no in-stream expansion, never grouped)</span><div class="p-agent-card" data-v-a3290cb2><span class="pa-ic" data-v-a3290cb2><svg viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M13.5 2c0 .444-.193.843-.5 1.118V5h5a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h5V3.118A1.5 1.5 0 1 1 13.5 2M6 7a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1zm-4 3H0v6h2zm20 0h2v6h-2zM9 14.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m6 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3" data-v-a3290cb2></path></svg></span><span class="pa-main" data-v-a3290cb2><span class="pa-task" data-v-a3290cb2>分析双引擎架构</span><span class="pa-type" data-v-a3290cb2>Explore</span></span><span class="pa-ok" data-v-a3290cb2>✓</span><span class="pa-go" data-v-a3290cb2>→</span></div><span class="stage-label" data-v-a3290cb2>④ Decision card · heavy (only question / approval, needs user input)</span><div class="p-action" data-v-a3290cb2><div class="p-action-head" data-v-a3290cb2><span class="p-action-title" data-v-a3290cb2>Write permission required</span></div><div class="p-action-body" data-v-a3290cb2>About to modify <code data-v-a3290cb2>src/auth/middleware.ts</code>, 42 lines changed.</div></div></div></div><ul class="clean check" data-v-a3290cb2><li data-v-a3290cb2>A tool call renders as <b data-v-a3290cb2>one quiet borderless line</b> (~24px, the thinking row's rhythm): leading glyph, tool-specific content, trailing meta + status. There is no card chrome and no hover wash — the chevron hugging the line's text (thinking-row style, never pushed to the far edge) is the only disclosure affordance, a real <code data-v-a3290cb2><button></code> carrying <code data-v-a3290cb2>aria-expanded</code> (keyboard path); the head itself is a plain click target (mouse path), so trailing slots may hold genuine buttons of their own (e.g. Agent's "open detail").</li><li data-v-a3290cb2><b data-v-a3290cb2>One type scale for the whole stream</b>: thinking rows, fold summary rows and tool lines all set 13px UI text; in-line mono and trailing meta run one step down at 12px (a monospace x-height reads larger, so 12px sits level next to 13px). Hierarchy comes from colour, never from size jumps or bold — everything on the line is regular weight: the only dark object is the file-name button (<code data-v-a3290cb2>--color-text</code> — the one interactive place to go); the action label (Run / Read / Edit…), the mono command / pattern and secondary context all sit at <code data-v-a3290cb2>--color-text-muted</code>; auxiliary elements (glyphs, chevrons, trailing meta) stay <code data-v-a3290cb2>--color-text-faint</code>. The stream thus reads in three quiet tiers: prose in text, tool lines in muted, thinking / captions in faint. Line content is centre-aligned so mono-only rows (Bash) sit level with the icon and chevron. Truncating line content (the CSS-ellipsis spans) sets <code data-v-a3290cb2>--leading-tight</code> rather than the row's <code data-v-a3290cb2>line-height: 1</code> — a 1em line box is shorter than the font's ascent + descent, so <code data-v-a3290cb2>overflow: hidden</code> would clip descenders (j / p / g / y); mono runs take the font's own <code data-v-a3290cb2>normal</code> leading instead, since JetBrains Mono's ≈1.32em metrics exceed <code data-v-a3290cb2>--leading-tight</code>. The 16px chevron still drives the ~24px row height.</li><li data-v-a3290cb2><b data-v-a3290cb2>Every tool kind composes its own line, leading with the tool's localized action label</b> (Run / Read / Edit / Write / Search / Find / Fetch…): Bash pairs its label with the full command in mono (CSS-truncated) plus a duration chip; Read / Edit / Write follow the label with the file name as a real button (opens the file preview) followed by the directory, a <code data-v-a3290cb2>:line-range</code> or a <code data-v-a3290cb2>+N −M</code> stat with a mini segmented bar; Grep shows the pattern in mono plus a match count; Glob / Ls list paths; Todo carries the active task with a done/total progress bar; goal tools show a coloured status pill; ExitPlanMode expands into a read-only plan receipt with its persisted review outcome. Unrecognized tools fall back to glyph + localized label + argument summary.</li><li data-v-a3290cb2><b data-v-a3290cb2>The settled question is the one exception to the quiet line</b>: once AskUserQuestion settles with a recognized answer, it becomes a small <b data-v-a3290cb2>receipt card</b> — the question card's echo (raised surface, hairline edge, lg radius, <code data-v-a3290cb2>--shadow-xs</code>, flush with the stream's left edge, ≤560px). The card echoes only the picks, checked with the live QuestionCard's CSS glyph language one step down (14px); passed-over options are not echoed. Dismissed (or zero-answer) collapses to a slim italic one-line card; while running, and for unrecognized output (background launch / error), it stays the plain quiet disclosure line with the raw output.</li><li data-v-a3290cb2>Clicking a line <b data-v-a3290cb2>expands it in place</b>; the detail hangs below at the line's own left edge (no inset), so it reads as part of the stream rather than as a separate card. Details are one of: the mono output panel (content-well surface, hairline edge, 12-line scroll cap), the inline diff, or clickable match / file lists (<code data-v-a3290cb2>path:line</code> opens the preview at that line). Code-bearing details — the Read content, the Edit diff, the Write content — are <b data-v-a3290cb2>syntax-highlighted by file type</b> (github-light / github-dark, following the colour scheme), with the Read output's real line numbers as the gutter; highlighting mounts lazily on first expand and degrades to plain text for unknown languages or oversized content.</li><li data-v-a3290cb2>Rows sit <b data-v-a3290cb2>flush with the message stream's left edge</b> (same alignment as prose and the thinking row): no inset, no hover wash, and the glyph rides the thinking row's 4px icon-to-text rhythm with no padded slot. Expanded rows inside a group stack directly on the shared rhythm — no dividers.</li><li data-v-a3290cb2>Consecutive activity — thinking segments and tool calls of ANY kind, quiet lines and richer cards alike — <b data-v-a3290cb2>folds into ONE activity-run row</b>: a smart summary sentence that aggregates the run per tool kind in first-appearance order (<code data-v-a3290cb2>Read 2 files · Ran 5 commands (1 failed) · 26s</code>), the failure clause hanging on its kind in danger red, the total span faint at the tail — one line, ellipsis-truncated, the full sentence in the title tooltip. Thinking items fold into the run but are not narrated in the sentence. The row shares the thinking row's language (borderless faint text row, text-colour hover only, one whole-row button with a rotating chevron) but rides a roomier 8px vertical padding — 30px against the quiet lines' 22px, so the turn-level summary keeps its presence between prose paragraphs; while the turn streams through the run the row stays expanded and the summary turns live (current action + cumulative per-kind stats + ticking whole seconds), and once every item settles it folds itself back — even if the user expanded it mid-run (the thinking block's vocabulary); a settled → running transition (the stream appending to the same run) reopens it. The glyph carries the state: the current step's own icon breathing while running, green ✓ / red ✕ once settled. A run needs <b data-v-a3290cb2>≥ 2 steps</b> — a lone step renders standalone as the block it always was. <b data-v-a3290cb2>Text never folds</b> (it breaks the run), and neither do successful media tools (no card — inline media is the turn's output); everything else folds, cards included: Todo / Goal progress narration, the sub-agent identity card, Question / Swarm cards and unrecognized kinds (skills, MCP tools) all join the run — the stay-expanded-while-live rule keeps a card visible exactly while it is active. The expanded run is the items flat in order (thinking rows + tool rows), each with its own in-row details intact — the lines keep their own 4px row rhythm but breathe 8px apart, with a small inset below the head.</li><li data-v-a3290cb2><b data-v-a3290cb2>Above the activity run sits the turn fold</b> (<code data-v-a3290cb2>TurnFold.vue</code>): when an assistant turn settles, every block before the LAST text block — thinking segments, activity runs, interim text paragraphs, Todo / Goal / sub-agent cards — folds into a single bare row reading <code data-v-a3290cb2>Worked 4m57s</code> (whole seconds, no glyph, no summary sentence), expanding into the folded blocks in order, each with its own rendering intact. The span is the turn's ELAPSED time (<code data-v-a3290cb2>turnWorkMs</code>): it ticks from the stamped start while the turn is open — approval/question waits included by design, so no park bookkeeping exists — then reads the daemon's own <code data-v-a3290cb2>durationMs</code> once settled (the server message stamps for history turns); the wall clock only feeds the live tick, so throttled tabs, session switches and remounts cannot corrupt the settled value. Without any stamp the row falls back to the generic <code data-v-a3290cb2>Work details</code>. Streaming turns show no row and a forced-open body — the live transcript is untouched, the fold lands only when the stream moves past the turn (or the turn parks). The split never hides the turn's output: the final text block and any trailing blocks (inline media, standalone cards) stay visible, and a text-only turn folds nothing. Fold state is a plain component ref — nothing persists, switching sessions resets to folded. Inside the right-side sub-agent transcript (ChatPane's inspector mode), the turn fold and the run-end footer are suppressed entirely and activity runs and thinking blocks stay pinned open (their heads demoted to plain captions) — an inspection view exists to show the whole trajectory, so nothing folds away — and disclosure bodies open instantly while their chevrons retain the standard rotation: animating the height of a full historical stream would relayout the entire panel on every animation frame.</li><li data-v-a3290cb2><b data-v-a3290cb2>A sub-agent delegation is an identity card</b> — never a quiet line: the card carries the TASK as its title and the agent type as a quiet meta line, while the orchestrator's full prompt stays out of the stream on purpose. The whole card is one action (the quiet shell vocabulary: raised surface, hairline edge, large radius, no shadow): click to open the subagent's live progress in the side panel — there is no in-stream expansion.</li><li data-v-a3290cb2>Status keeps the shared vocabulary: running (pulsing accent dot) / done (green ✓) / failed (red ✗), at the line's right edge. <b data-v-a3290cb2>Only two types keep a full card</b>: <code data-v-a3290cb2>Question</code> and <code data-v-a3290cb2>Approval</code> — they genuinely need the user's attention. The Swarm composite keeps one quiet card (raised surface, 0.5px hairline, large radius) for its phase overview + member accordion.</li><li data-v-a3290cb2><b data-v-a3290cb2>A task notification is a status card, not a quiet line</b> (<code data-v-a3290cb2>NotificationCard.vue</code>): the hidden <code data-v-a3290cb2><notification></code> injections (background-task / sub-agent settlement) render where they landed in the turn — a 28px status chip + title/sub head tinted with the toast status token pairs (completed → success, failed / timed_out / lost → danger, killed → warning, else neutral surface), expanding in place to the fields, the body, an output-file row (copy path) and the raw payload. ≥2 CONSECUTIVE notifications merge into one neutral group card (count + per-item status dots + compact rows, each expanding on its own). Notifications break the activity run but are never turn boundaries, and they <b data-v-a3290cb2>never fold</b> — a notification is an event worth noticing, not process noise, so it punches out of the turn fold and renders right after the fold row, in order.</li><li data-v-a3290cb2><b data-v-a3290cb2>A turn that dies on a model-request failure leaves a persistent terminal card</b> at the transcript tail (ChatPane's <code data-v-a3290cb2>.turn-failed</code>): the notification card's danger shell (danger-soft surface, danger hairline, 24px status chip with the warning glyph) carrying a title keyed by the wire error kind (model failure vs step-limit stop), the provider message as a muted sub, a mono diagnostics meta (code · HTTP status · request id), and exactly ONE secondary sm action — Continue, which submits a short continue prompt through the normal path. It renders only while the session sits idle on <code data-v-a3290cb2>lastTurnReason === 'failed'</code> (a turn with zero assistant output included, so it pins to the tail rather than any assistant row), it is not dismissible, and it vanishes the moment a new turn starts. While the turn is still fighting, the working indicator instead narrates the retry backoff ("retrying n/max" from the live <code data-v-a3290cb2>agent.status.updated</code> phase) — a retrying turn never shows the card. The transient error toast now fires only for background sessions; the viewed session's failure is fully covered by the card.</li><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Turn failed card · persistent terminal marker + one resume action</span></div><div class="stage p col" data-v-a3290cb2><div class="p-turn-failed" data-v-a3290cb2><span class="tf-chip" data-v-a3290cb2><svg viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path d="M11.9996 7C11.5026 7 11.0996 7.36985 11.0996 7.82609V14.1739C11.0996 14.6301 11.5026 15 11.9996 15C12.4967 15 12.8996 14.6301 12.8996 14.1739V7.82609C12.8996 7.36985 12.4967 7 11.9996 7Z" data-v-a3290cb2></path><path d="M12.8996 17.1006C12.8996 17.5974 12.4968 18.001 11.9992 18.001C11.5024 18.001 11.0996 17.5974 11.0996 17.1006C11.0996 16.6038 11.5024 16.2002 11.9992 16.2002C12.4968 16.2002 12.8996 16.6038 12.8996 17.1006Z" data-v-a3290cb2></path><path fill-rule="evenodd" clip-rule="evenodd" d="M14.5108 3.5501C13.3946 1.61676 10.6041 1.61676 9.48786 3.5501L1.69363 17.0501C0.577423 18.9834 1.97269 21.4001 4.20511 21.4001H19.7936C22.026 21.4001 23.4212 18.9834 22.305 17.0501L14.5108 3.5501ZM11.0467 4.4501C11.4701 3.71676 12.5286 3.71676 12.952 4.4501L20.7462 17.9501C21.1696 18.6834 20.6403 19.6001 19.7936 19.6001H4.20511C3.35833 19.6001 2.82909 18.6834 3.25248 17.9501L11.0467 4.4501Z" data-v-a3290cb2></path></svg></span><div class="tf-main" data-v-a3290cb2><span class="tf-title" data-v-a3290cb2>模型请求失败,本轮对话已中断</span><span class="tf-sub" data-v-a3290cb2>429 The engine is currently overloaded, please try again later</span><span class="tf-meta" data-v-a3290cb2>provider.rate_limit · HTTP 429 · req_01KZ8Y…</span></div><button class="p-btn secondary sm" data-v-a3290cb2>继续</button></div></div></div><li data-v-a3290cb2><b data-v-a3290cb2>A goal-continuation turn carries a provenance row</b>: the hidden <code data-v-a3290cb2>goal_continuation</code> trigger (goal mode's self-driven next turn — a turn boundary, unlike task notifications) never renders its machine prompt; instead the assistant turn it opens shows one faint 12px line flush with the stream's left edge — the <code data-v-a3290cb2>target</code> glyph shared with the Goal tool (this turn belongs to the goal) + a localized label — ABOVE the turn's content and OUTSIDE the turn fold, so the row survives as the turn's provenance after settling. The marker lands with the trigger (before the first assistant block), and while the newest exchange is a goal-continuation turn the undo affordances (edit-and-resend, Esc undo) are suppressed — rewinding would drop the hidden trigger while refilling the older user text.</li><li data-v-a3290cb2><b data-v-a3290cb2>A settled turn's file changes are one summary card</b> (<code data-v-a3290cb2>TurnFilesSummary.vue</code>): between the turn's final text and its footer, a §03 <code data-v-a3290cb2>Card</code> (hairline border, no shadow — NOT the quiet tool line, the artifacts are worth a discrete object) lists every file the turn's Edit / Write calls touched. The head reads "N files changed" with the aggregate <code data-v-a3290cb2>+A −D</code> and the mini diffbar; the aggregate hides whenever any row's stats are incomplete (a Write or an underivable edit makes the total a lower bound, never presented as exact). Each row is one clickable workspace-relative path (short and self-locating; a file outside the cwd stays absolute) with its per-file <code data-v-a3290cb2>+A −D</code> at the right edge. The row's action keys on the tool kind, and the stats tell it apart: a <b data-v-a3290cb2>Write</b> has no per-file count (its diff is underivable) and opens the whole file in the preview; an <b data-v-a3290cb2>Edit / MultiEdit</b> carries its <code data-v-a3290cb2>+A −D</code> and opens that file's <b data-v-a3290cb2>turn diff</b> in the right-side detail layer (<code data-v-a3290cb2>TurnDiffPanel.vue</code> — the turn's own X→Y change, not the git diff), whose header keeps an open-file action. The first three files show inline; the rest collapse behind a "N more files" ghost-button row in the card's foot. Where nothing handles the row action (the BTW side chat), the card renders its file rows as plain text instead of links.</li></ul>',15)),t("div",pa,[a[31]||(a[31]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Turn files summary · a real TurnFilesSummary (fixed sample)")],-1)),t("div",ha,[t("div",ua,[s(M,{changes:S,cwd:Dt,onOpenDiff:g,onOpenFile:g})])])]),a[137]||(a[137]=c('<div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Tool Call · quiet lines (expand on demand)</span></div><div class="stage p" data-v-a3290cb2><div class="p-tool-group open" data-v-a3290cb2><div class="p-tool-group-head" data-v-a3290cb2><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-a3290cb2></path></svg><span class="tg-title" data-v-a3290cb2>Read 2 files</span></div><div class="p-tool-row expanded" data-v-a3290cb2><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-a3290cb2></path></svg><span class="tr-name" data-v-a3290cb2>Read</span><span class="tr-file" data-v-a3290cb2>session.ts</span><span class="tr-faint" data-v-a3290cb2>src/auth · :12-45</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-a3290cb2></path></svg><span class="tr-chip" data-v-a3290cb2>34 lines</span><span class="tr-ok" data-v-a3290cb2>✓</span></div><div class="p-tool-detail" data-v-a3290cb2><div class="p-code" style="font-size:11px;padding:7px 9px;" data-v-a3290cb2>12 export function verify(…</div></div><div class="p-tool-row" data-v-a3290cb2><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-a3290cb2></path></svg><span class="tr-name" data-v-a3290cb2>Read</span><span class="tr-file" data-v-a3290cb2>middleware.ts</span><span class="tr-faint" data-v-a3290cb2>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-a3290cb2></path></svg><span class="tr-chip" data-v-a3290cb2>58 lines</span><span class="tr-ok" data-v-a3290cb2>✓</span></div></div><div class="p-tool-row" data-v-a3290cb2><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414 1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zM4 21h16v-2H4v2z" data-v-a3290cb2></path></svg><span class="tr-name" data-v-a3290cb2>Edit</span><span class="tr-file" data-v-a3290cb2>middleware.ts</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-a3290cb2></path></svg><span class="tr-add" data-v-a3290cb2>+12</span><span class="tr-del" data-v-a3290cb2>−4</span><span class="tr-bar" aria-hidden="true" data-v-a3290cb2><span style="flex:12;background:var(--p-success);" data-v-a3290cb2></span><span style="flex:4;background:var(--p-danger);" data-v-a3290cb2></span></span><span class="tr-ok" data-v-a3290cb2>✓</span></div></div></div><h3 class="sub" data-v-a3290cb2>Decision cards · Question / Approval</h3><p data-v-a3290cb2>The two attention cards replace the composer in the dock and share one contract: a floating neutral shell (<code data-v-a3290cb2>--color-surface-raised</code> + hairline + <code data-v-a3290cb2>--radius-lg</code> + <code data-v-a3290cb2>--shadow-menu</code>), a plain dark 16px title head, and a hairline footer whose actions read in number-key order with exactly one accent primary. There is no semantic colour band — the floating card itself is the "needs a decision" signal.</p><div class="stage-wrap" data-v-a3290cb2><div class="stage-bar" data-v-a3290cb2><span class="st" data-v-a3290cb2>Plan review · pinned option rows, second-line descriptions</span></div><div class="stage p col" data-v-a3290cb2><div class="p-action" style="max-width:520px;" data-v-a3290cb2><div class="p-action-head" data-v-a3290cb2><span class="p-action-title" data-v-a3290cb2>按这份 plan 开始实现?</span></div><div class="p-action-body" data-v-a3290cb2>The plan markdown scrolls in a capped area; the approaches are pinned below it — label on the first line, full description always on the second. The number chip doubles as the keyboard hint.</div><div class="p-opts" data-v-a3290cb2><div class="p-opt" data-v-a3290cb2><span class="n" data-v-a3290cb2>1</span><span class="p-opt-text" data-v-a3290cb2><span class="l" data-v-a3290cb2>方案 A:静态徽章</span><span class="d" data-v-a3290cb2>零依赖、渲染稳定,升级时需手动同步版本号。</span></span></div><div class="p-opt" data-v-a3290cb2><span class="n" data-v-a3290cb2>2</span><span class="p-opt-text" data-v-a3290cb2><span class="l" data-v-a3290cb2>方案 B:动态徽章</span><span class="d" data-v-a3290cb2>版本自动同步免维护,但要求仓库公开可访问。</span></span></div></div><div class="p-action-foot" data-v-a3290cb2><button class="p-btn ghost sm" data-v-a3290cb2>修改</button><button class="p-btn ghost sm" data-v-a3290cb2>拒绝并退出</button></div></div></div></div><ul class="clean check" data-v-a3290cb2><li data-v-a3290cb2><b data-v-a3290cb2>Footer contract</b>: actions are left-aligned in number-key order (1·2·3·4), each carrying a number chip — sized by <code data-v-a3290cb2>--p-chip-num</code> over <code data-v-a3290cb2>--color-inline-code-bg</code>, the same chip vocabulary as option rows and the multi-step chip; exactly one <code data-v-a3290cb2>primary</code> action, the rest are <code data-v-a3290cb2>ghost</code>. Feedback mode swaps the whole footer for submit / cancel.</li><li data-v-a3290cb2><b data-v-a3290cb2>Feedback input</b>: the reject-with-feedback box is the shared §03 <code data-v-a3290cb2>Textarea</code> primitive (no bespoke input), three rows at rest, auto-growing with its content UPWARD — the card is bottom-anchored in the dock, so the bottom edge and the submit / cancel footer never move — capped at 40% of the VISUAL viewport, then scrolling internally. Height budgets follow <code data-v-a3290cb2>--app-height</code> (the visual viewport, which shrinks with the iOS keyboard where <code data-v-a3290cb2>dvh</code> does not): the card caps at <code data-v-a3290cb2>calc(var(--app-height, 100dvh) - 72px)</code> and the dock takes over the same budget. While the feedback box grows, every body kind yields and scrolls internally by default instead of pushing the card past its cap — the plan scroll area, code previews, shell output, todo lists, invocation chips and generic text — with only the one-line plan path pinned at full height. A plan review's option rows belong to the plan region and never shrink, so once fixed chrome (options, grown feedback box) exceeds what the capped card leaves — e.g. the iOS keyboard shrinking the visual viewport — the WHOLE plan region (body and options together) becomes one scroller, keeping an approve option reachable by scrolling instead of clipped out of reach. Below even that budget — the cap under the fixed chrome alone (header plus mobile's stacked ≥46px submit / cancel buttons), as when an iOS landscape keyboard leaves a ~200px visual viewport — the body has already shrunk to zero and the CARD itself becomes the scroller of last resort (overflow-y: auto, with its own scroll seam), so the footer buttons are never clipped away.</li><li data-v-a3290cb2><b data-v-a3290cb2>Body by kind</b>: Write approvals preview the incoming content with <code data-v-a3290cb2>HighlightedCode</code> (syntax-highlighted, 24-row cap with scroll); Edit approvals render the before/after hunk as a highlighted line diff. Plan / diff / file kinds get a head expand toggle that lifts the cap so the block fills the card; the card itself never exceeds the pane (only the scroll area shrinks) — with the dock work pills visible, the dock takes over the same height budget as a flex column, so an expanded card yields the pills' height instead of pushing them past the pane's top edge. Once the plan scrolls, a soft shadow fades in at the scroll area's top edge — the sidebar's scroll-linked seam language, so clipped content reads as passing under the card chrome.</li><li data-v-a3290cb2><b data-v-a3290cb2>Danger hint</b>: destructive shell commands (rm -rf, sudo, force-push…) show a <code data-v-a3290cb2>danger-soft</code> filled hint row under the command — detection is a display-layer heuristic on the client.</li><li data-v-a3290cb2><b data-v-a3290cb2>Minimized</b>: the card collapses to a thin bar with a mono peek of the subject; the whole bar is the expand click target.</li><li data-v-a3290cb2><b data-v-a3290cb2>Question card</b>: the title is the question itself (2-line clamp), with a step chip for multi-question flows and a × dismiss button. Options use CSS radio/checkbox glyphs (accent when selected); the number chip and glyph top-align with the option text, optically centred on the label's first line. The footer follows the same left-aligned action contract (primary first, ghosts after), with the keyboard hint pinned to the right edge; keyboard: ↑↓ moves (Space toggles in multi), digits pick, Enter advances/submits, Esc dismisses.</li></ul><h3 class="sub" data-v-a3290cb2>Composer</h3><p data-v-a3290cb2>Unified into a single raised container: <code data-v-a3290cb2>--radius-composer</code> (32px) with <code data-v-a3290cb2>--corner-shape-composer: superellipse(1.5)</code> and a stable 0.5px edge. Focus crossfades a low-chroma line-and-accent edge over <code data-v-a3290cb2>--duration-slow</code> with <code data-v-a3290cb2>--ease-in-out</code>, while the neutral shadow stays unchanged — there is no added halo and no layout shift. The composer input (a ProseMirror contenteditable on desktop, a textarea on the web during the migration) uses <code data-v-a3290cb2>text-autospace: normal</code> for mixed CJK and Latin input. Toolbar controls use a quiet 32px full-round geometry with 8px edge inset; the send button remains a standard 32px circle, with its glyph at 28px (<code data-v-a3290cb2>--composer-send-icon-size</code>, the production kimi.com size; it sits outside the <code data-v-a3290cb2>--p-ic-*</code> scale on purpose).</p><p data-v-a3290cb2><b data-v-a3290cb2>Fill and edge tokens</b>: the card's fill and rest border are their own tokens — <code data-v-a3290cb2>--color-composer-bg</code> and <code data-v-a3290cb2>--color-composer-line</code> — running the kimiwork / kimi.com production input recipe (<code data-v-a3290cb2>.chat-input__shell</code>): fill = <code data-v-a3290cb2>groupedBackground.secondary</code> (#ffffff light / #1f1f1f dark), rest border = <code data-v-a3290cb2>separator.s1</code> (13% black / 12% white), focus line = <code data-v-a3290cb2>fills.f4</code> (25% in both schemes), and <code data-v-a3290cb2>--shadow-input</code> = <code data-v-a3290cb2>effect.shadow.inputDefault</code> (<code data-v-a3290cb2>0 5px 16px -4px rgba(0,0,0,0.07)</code>, kept identical in dark — the hairline carries the edge there). Only colours sit in the tokens; the 32px superellipse shape and the focus-only edge overlay are unchanged.</p><p data-v-a3290cb2><b data-v-a3290cb2>Send button tokens</b>: the send circle runs on <code data-v-a3290cb2>--color-send-bg</code> / <code data-v-a3290cb2>--color-send-bg-hover</code> / <code data-v-a3290cb2>--color-send-icon</code> (+ <code data-v-a3290cb2>*-disabled</code>, <code data-v-a3290cb2>--opacity-send-disabled</code>, <code data-v-a3290cb2>--shadow-send[-hover]</code>), following the production recipe (<code data-v-a3290cb2>.chat-input__send</code>): a neutral <code data-v-a3290cb2>labels.primary</code> fill (90% black light / 84% white dark, hover #252525 / 84.8%) with the production lift shadow (<code data-v-a3290cb2>0 7px 16px -13px 38% + 0 1px 2px 7%</code>, one step larger on hover), a <code data-v-a3290cb2>groupedBackground.secondary</code> glyph, and a disabled state of the same vocabulary — <code data-v-a3290cb2>fills.f2</code> fill with a <code data-v-a3290cb2>labels.quaternary</code> glyph at full opacity. The button is disabled exactly when submit would no-op — an empty draft with no ready attachment (image-only sends stay enabled), an upload in flight, or the starting spinner — so disabled is a first-class persistent state, never a fade.</p><p data-v-a3290cb2><b data-v-a3290cb2>Layering, anchors, and motion</b>: the dock normally stays at <code data-v-a3290cb2>--z-sticky</code> so the Latest Messages pill can remain visible above its veil. While any Composer popup or work panel is open, the dock temporarily joins <code data-v-a3290cb2>--z-dropdown</code>, ensuring permission, work-mode, and model menus — and the work panel — always paint above that pill. The permission menu's left edge and the model menu's right edge each follow their own trigger pill. All three menus use <code data-v-a3290cb2>--shadow-menu</code> and the same trigger-corner pop motion as Session Row menus: 0.97 scale with a 2px shift toward the trigger, <code data-v-a3290cb2>--duration-base</code> on entry, and <code data-v-a3290cb2>--duration-fast</code> on exit.</p><p data-v-a3290cb2><b data-v-a3290cb2>Attachment strip</b>: attachments hang inside the composer card above the input as two grouped rows — images/videos as shared <code data-v-a3290cb2>MediaThumb</code> rounded thumbnails, files as the shared <code data-v-a3290cb2>AttachmentChip</code> pill — the same pair the sent bubble renders, so a draft looks exactly like the sent message. File-store videos render a static play tile instead of fetching a first frame. The strip caps at two thumbnail rows and scrolls beyond that instead of pushing the input down; while overflowing, a quiet count badge pins to the bottom-left and new attachments auto-scroll into view (to the end of whichever group grew). With two or more attachments, a one-click clear-all pins to the strip's top-right corner as a quiet 22px badge (trash glyph, danger on hover). The composer's pending preview and the bubble's media clicks open the same <code data-v-a3290cb2>MediaLightbox</code> preview, which owns Escape via the shared dialog stack: images go through PhotoSwipe (<code data-v-a3290cb2>@moonshot-ai/app-client</code>'s <code data-v-a3290cb2>lib/mediaPreview</code>) and zoom out of the clicked thumbnail (scrim = <code data-v-a3290cb2>--color-scrim-strong</code>, caption = <code data-v-a3290cb2>--color-text-on-scrim</code>; the slide area is inset — 24px sides matching the video modal, 56px top/bottom clearing the close button and caption — so a viewport-filling image never kisses the edges), videos keep the custom modal. Both share the <code data-v-a3290cb2>--color-scrim-strong</code> backdrop and the same close button — the raised 36px circle (<code data-v-a3290cb2>.media-lightbox-close</code>) fixed at the viewport's top-right, rendered by <code data-v-a3290cb2>MediaLightbox</code> for both (PhotoSwipe's own top bar is disabled; zoom stays on wheel / pinch / image click). ReadMedia tool cards open it too (an App-level instance fed by the <code data-v-a3290cb2>openMedia</code> chain): the image zooms out of the card's thumbnail, and videos show as a static play tile that opens the modal player — no more right-side-panel detour or inline <code data-v-a3290cb2><video></code>.</p><p data-v-a3290cb2><b data-v-a3290cb2>Mention pills</b>: @-mentions render as inline pills in the editor — one element of the cross-surface rich-text vocabulary specified in §05 <b data-v-a3290cb2>Rich Text Messages</b> (visual recipe, wire forms, and behavior contract live there).</p>',12)),t("div",ga,[a[38]||(a[38]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Composer")],-1)),t("div",ma,[t("div",fa,[a[36]||(a[36]=t("div",{class:"p-composer-ta ph"},"Message Kimi, / to run a command, @ to reference a file…",-1)),t("div",wa,[t("div",ya,[a[33]||(a[33]=t("button",{class:"p-icon-btn"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"})])],-1)),t("span",ka,[s(d(o),{name:"shield-question",size:"sm"}),a[32]||(a[32]=e("yolo",-1))]),a[34]||(a[34]=t("span",{class:"p-pill"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("path",{fill:"currentColor",d:"M8 4h13v2H8zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M8 11h13v2H8zm0 7h13v2H8z"})]),e("plan")],-1))]),a[35]||(a[35]=c('<div class="p-composer-right" data-v-a3290cb2><span class="p-pill" data-v-a3290cb2><span class="pp-strong" data-v-a3290cb2>kimi-k2</span><span class="pp-sub" data-v-a3290cb2>· thinking</span><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-a3290cb2></path></svg></span><button class="p-send" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M13 7.828V20h-2V7.828l-5.364 5.364l-1.414-1.414L12 4l7.778 7.778l-1.414 1.414z" data-v-a3290cb2></path></svg></button></div>',1))])]),a[37]||(a[37]=c('<div class="p-composer-strip" data-v-a3290cb2><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="M4 5a1 1 0 0 1 1-1h5l2 2h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5z" data-v-a3290cb2></path></svg>kimi-code-web<svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-a3290cb2><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-a3290cb2></path></svg></div>',1))])]),a[138]||(a[138]=c('<div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2><b data-v-a3290cb2>Site-wide consistency</b>: the composer uses one 32px superellipse shell and one 32px desktop control height. The add (+), permission, compact, and model controls are all full-round and transparent at rest; hover reveals a neutral wash, open/active may use accent-soft, and Send remains the sole persistent filled control — an inverted <code data-v-a3290cb2>--color-text</code> fill with a <code data-v-a3290cb2>--color-bg</code> glyph (never the accent), disabled while the input is empty or an upload is in flight. The transparent dock floats over the transcript, while the scrolling content receives bottom padding equal to the live dock height so its final item can still clear the composer. Composer chrome is not selectable; only the message input permits text selection. Each permission mode has its own registry icon — manual <code data-v-a3290cb2>hand</code>, yolo <code data-v-a3290cb2>shield-question</code>, auto <code data-v-a3290cb2>full-access</code> — paired with the label in the pill (collapsing to the accessible icon below a 620px composer container) and leading its dropdown row in the mode's colour, with the current row's check trailing the row's end. The right toolbar is the flexible region: the model pill shrink-wraps its content, then shrinks and truncates internally only when the toolbar runs out of room. The dock's work pills and panels — pill vocabulary, panel shell and motion, the two-tone head, per-kind bodies, filtering, and the open/cancel model — are specified in <b data-v-a3290cb2>Dock · work pills & panels</b> below. </div></div><p data-v-a3290cb2><b data-v-a3290cb2>Workspace attachment card</b>: on the empty session, the workspace picker is a <b data-v-a3290cb2>separate attachment card</b> tucked under the composer — and the composer card itself stays complete (its own 0.5px border, <code data-v-a3290cb2>--radius-composer</code> corners with <code data-v-a3290cb2>--corner-shape-composer</code>, and shadow are never altered). The attachment lives inside the composer's padding box as the card's sibling, so its width always matches; its top <code data-v-a3290cb2>--space-4</code> slides behind the card (the card is raised to <code data-v-a3290cb2>--z-sticky</code>), its square top edge stays hidden, and only the rounded bottom (<code data-v-a3290cb2>0 0 --radius-xl --radius-xl</code>) shows. Background <code data-v-a3290cb2>--color-hover</code> at 60% via <code data-v-a3290cb2>color-mix</code> (≈0.03 black in light, self-adapting in dark), no border, no shadow. Inside sits one quiet capsule trigger: transparent, <code data-v-a3290cb2>--radius-full</code>, 16px leading icon and 12px label at weight 475 in <code data-v-a3290cb2>--color-text-muted</code>; hover deepens to <code data-v-a3290cb2>--color-selected</code> and the label turns <code data-v-a3290cb2>--color-text</code>. The dropdown follows the §03 menu spec and is viewport-aware (flips above when more room, clamps max-height to the scrollport); at <code data-v-a3290cb2>--z-dropdown</code> it outranks both the card and the fixed click-outside backdrop (<code data-v-a3290cb2>--z-sticky</code>), which renders outside the composer because the card's <code data-v-a3290cb2>container-type</code> captures <code data-v-a3290cb2>position: fixed</code> descendants.</p><h3 class="sub" data-v-a3290cb2>Autocomplete menus</h3><p data-v-a3290cb2>The slash, mention, and add popups share one geometry, all on dedicated tokens: the <code data-v-a3290cb2>--color-menu-bg-frost</code> surface (the frostier recipe), frame padding <code data-v-a3290cb2>--menu-row-hug</code>, rows at <code data-v-a3290cb2>--menu-row-padding-block</code> × <code data-v-a3290cb2>--menu-row-padding-inline</code> with <code data-v-a3290cb2>--radius-menu-row</code> caps (plain corners — the frame is <code data-v-a3290cb2>--radius-lg</code> with NO corner-shape, and the row radius stays concentric: 12px frame − 6px hug = 6px), an icon-to-label gap of <code data-v-a3290cb2>--menu-row-gap-icon</code>, and a <code data-v-a3290cb2>--menu-rows-seam</code> between stacked rows. Touch rows pad to <code data-v-a3290cb2>--menu-row-touch-padding-block</code> with a hard floor of <code data-v-a3290cb2>--touch-target-min</code>. Scroll height caps at <code data-v-a3290cb2>--p-slash-menu-h</code> / <code data-v-a3290cb2>--p-mention-menu-h</code> / <code data-v-a3290cb2>--p-add-menu-h</code>; the scroll-edge fade is <code data-v-a3290cb2>--menu-scroll-fade</code>, and the overlay thumb rides <code data-v-a3290cb2>--menu-scrollbar-width</code> / <code data-v-a3290cb2>--menu-scrollbar-edge</code> / <code data-v-a3290cb2>--menu-scrollbar-track-inset</code> / <code data-v-a3290cb2>--menu-scrollbar-thumb-min</code> in <code data-v-a3290cb2>--color-menu-scrollbar</code> (hover <code data-v-a3290cb2>--color-menu-scrollbar-hover</code>) — 3px visually, with a wider invisible drag strip.</p><h3 class="sub" data-v-a3290cb2>Add menu</h3><p data-v-a3290cb2>The composer's <b data-v-a3290cb2>+ button</b> opens the add menu — the autocomplete family's action-list member: one column of icon + label (+ muted description) rows (Files, Goal, Plan, Swarm) on the same frost surface and row geometry as the slash/mention popups, capped at <code data-v-a3290cb2>--p-add-menu-h</code>. Semantically it is an action menu, not an autocomplete listbox: rows are <code data-v-a3290cb2>menuitem</code> commands, DOM focus moves into the menu (arrows navigate, Enter activates, Escape closes), and the + button carries <code data-v-a3290cb2>aria-haspopup="menu"</code> — the textarea's combobox ARIA never points at it.</p><p data-v-a3290cb2><b data-v-a3290cb2>Design decision: deliberately NOT the §03 Menu/MenuItem primitives.</b> Those are the trigger-dropdown family (sidebar, user menu, session rows) — <code data-v-a3290cb2>--color-menu-bg</code>, <code data-v-a3290cb2>--radius-lg</code>, a min-width box. The add menu instead shares the composer menus' material (the frostier surface, the composer corner curve, rows hugging the frame at the composer's text column, muted description sub-lines). Bending MenuItem into that material would require exactly the per-screen appearance overrides the primitive contract forbids, so the add menu keeps bespoke rows built directly on the shared <code data-v-a3290cb2>--menu-row-*</code> tokens. This paragraph is the canonical record of that choice — reviews should not re-litigate it.</p>',7)),t("div",xa,[a[46]||(a[46]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Add menu — family surface, icon + label + desc rows, keyboard focus wash")],-1)),t("div",Ta,[t("div",Sa,[t("span",Ca,[s(d(o),{name:"attachment",size:"sm"}),a[39]||(a[39]=t("span",{class:"n"},"Files",-1))]),t("span",za,[s(d(o),{name:"target",size:"sm"}),a[40]||(a[40]=t("span",{class:"n"},"Goal",-1)),a[41]||(a[41]=t("span",{class:"d"},"Set a goal to keep pursuing",-1))]),t("span",qa,[s(d(o),{name:"file-edit",size:"sm"}),a[42]||(a[42]=t("span",{class:"n"},"Plan",-1)),a[43]||(a[43]=t("span",{class:"d"},"Turn plan mode on",-1))]),t("span",Aa,[s(d(o),{name:"sparkles",size:"sm"}),a[44]||(a[44]=t("span",{class:"n"},"Swarm",-1)),a[45]||(a[45]=t("span",{class:"d"},"Turn swarm mode on",-1))])])])]),a[139]||(a[139]=c('<h3 class="sub" data-v-a3290cb2>Work modes</h3><p data-v-a3290cb2><b data-v-a3290cb2>Plan and Goal are the primary work modes — mutually exclusive, at most one armed at a time.</b> Arming happens only through the slash commands (<code data-v-a3290cb2>/plan</code>, <code data-v-a3290cb2>/goal</code>) or the add menu; an armed mode renders as the input row's leading pill — a neutral <code data-v-a3290cb2>--color-surface</code> chip with the mode's 14px icon, its label, and a × that disarms. The × is an IconButton sized <code data-v-a3290cb2>--wm-x-size</code> (below the sm default, so its hover wash never outgrows the pill's rounded end) with a <code data-v-a3290cb2>--wm-x-ring</code> hit reserve that stays inside the textarea's indent; on touch it meets <code data-v-a3290cb2>--touch-target-min</code>. The input's first-line text indent reserves exactly the pill's width (the desktop ProseMirror editor applies it to the first paragraph), so the caret and placeholder slide right rather than colliding; arming Goal also swaps the placeholder to its objective prompt. Sending with Goal armed creates the goal and the pill hands off to the dock's goal pill; a live goal does NOT lock the primary modes — <code data-v-a3290cb2>/goal</code> then just focuses the goal's panel, and <code data-v-a3290cb2>/plan</code> still arms (the only hard rule: one message cannot both create a goal and enter plan — the goal write carries the plan disarm atomically — and a failed mode write is treated as a send failure: the optimistic message rolls back, the error toasts). Swarm is deliberately NOT a mode: an orthogonal toolbar chip with its own enable confirmation, disarmed from the chip's ×.</p><h3 class="sub" data-v-a3290cb2>Dock · work pills & panels</h3><p data-v-a3290cb2><b data-v-a3290cb2>Work pills</b> (<code data-v-a3290cb2>WorkPill.vue</code>): the dock's workbar above the composer carries one pill vocabulary — font-driven by flex computation: the 1.5em leading icon and the label's own line box (<code data-v-a3290cb2>--text-base</code> at <code data-v-a3290cb2>--leading-normal</code>) both come to 21px at the 14px UI text, and 8px block padding wraps them to 37px, nothing pinning pixels, so the pills rescale with the font; borderless, with <code data-v-a3290cb2>--radius-lg</code> rounded-square corners, filled at the fills ladder's <code data-v-a3290cb2>--color-selected</code> rung over the shared <code data-v-a3290cb2>--p-menu-backdrop</code> blur — the panel's frosted recipe scaled down to a chip, so transcript text never reads through the light fill (the neutral hover wash layers on top — one layer, never two), the icon at full text colour, <code data-v-a3290cb2>--space-2</code> / <code data-v-a3290cb2>--space-3</code> block / inline padding — the trailing side adds a <code data-v-a3290cb2>--space-05</code> optical compensation against the leading glyph — and a <code data-v-a3290cb2>--space-1-5</code> content gap. Every pill stays expanded — the Code client does not collapse status chips — carrying icon + label and a trailing meta that answers one question — what is live on this surface right now — for background bash tasks, background sub-agents, todos, and the goal alike; the row insets to the composer's text column — dock inline inset + the card's 0.5px border + the input wrap's 16px inline padding — not the card edge. The active pill keeps the wash on permanently — one fills-ladder step deeper, neutral. The meta is always muted ink and surface-specific: the goal carries its status word, colour-coded by state (active <code data-v-a3290cb2>--color-success</code>, paused <code data-v-a3290cb2>--color-warning</code>, blocked <code data-v-a3290cb2>--color-danger</code>); the bash and sub-agent pills carry a pulsing dot and the running count, only while something runs (a quiet absence otherwise); the todos carry the done/total fraction. The plan pill joins the row only once plan mode is live server-side or a persisted plan exists — a merely armed directive stays in the composer's inline work-mode pill (its × cancels) and never reaches this bar, so every pill here reads as live server truth rather than local intent. Narrow panes wrap the row instead of clipping (the dock height observes); below the <code data-v-a3290cb2>--p-bp-sm</code> breakpoint the pills collapse to their icons — label and meta hide (the threshold is read from the token, never a hardcoded width).</p><p data-v-a3290cb2><b data-v-a3290cb2>Panel shell & motion</b>: a pill toggles the shared work panel — the menu family material: 70% page background via <code data-v-a3290cb2>color-mix</code> over the shared <code data-v-a3290cb2>--p-menu-backdrop</code> blur (the frostier recipe, see §06 Glassmorphism exemption), a 0.5px <code data-v-a3290cb2>--color-line</code> edge, <code data-v-a3290cb2>--radius-2xl</code>, and the menu panel's <code data-v-a3290cb2>--shadow-menu</code>. The panel pops from the clicked pill along the trigger-corner motion tokens (<code data-v-a3290cb2>--motion-panel-scale</code> / <code data-v-a3290cb2>--motion-panel-shift</code>), and switching pills replays the pop from the newly clicked pill (the shell is keyed by panel kind); while it is open the dock raises to <code data-v-a3290cb2>--z-dropdown</code> so it clears the transcript's new-message pill, and every window-drag strip pauses so an outside press reaches the page and dismisses. The panel owns Escape while open (a document-capture handler guarded by the shared IME latch, so a candidate-cancelling Escape is never swallowed), and a scrolled body dissolves toward the head through the <code data-v-a3290cb2>--menu-scroll-fade</code> alpha mask instead of hard-clipping. Height is content-sized up to <code data-v-a3290cb2>min(360px, 50vh)</code>; the filtered panels pin instead — see Filtering & sizing. The panel is chrome: nothing inside it is text-selectable, the head's filter chips included.</p><p data-v-a3290cb2><b data-v-a3290cb2>Panel head</b> (<code data-v-a3290cb2>WorkPanelHead.vue</code>): every work panel head is one tab row — a leading icon at the pill's 1.5em glyph size, the panel title at full text colour, and a muted trailing meta (<code data-v-a3290cb2>--color-text-muted</code>) carrying that panel's one live number, joined by the row's <code data-v-a3290cb2>--space-2</code> gap with no separator glyph: the goal's wall-clock time, the bash / sub-agent running count, the todos' done/total. Actions right-align in the head: the goal's pause / resume / cancel / close as quiet neutral IconButtons (cancel deliberately shares that neutral vocabulary), the plan's open-in-side-panel, dismiss-directive (shown only while the directive is live), and close, and the bash / sub-agent filter chips as a SegmentedControl. The plan head's meta carries the latest plan's review outcome. On touch these meet the 44px minimum (<code data-v-a3290cb2>--touch-target-min</code>) via the <code data-v-a3290cb2>hover: none</code> capability query — a width-only gate would miss tablets — and below 480px the head wraps so the actions take a full row.</p><p data-v-a3290cb2><b data-v-a3290cb2>Panel bodies</b>: todos read as a quiet list — a green <code data-v-a3290cb2>circle-check</code> for done, a hollow ring for pending, an xs Spinner for in-progress. The goal's detail (full objective, completion criterion, rendered with the chat Markdown renderer) fills the body — no footer strip. Bash tasks are long rows (<code data-v-a3290cb2>TasksPane.vue</code>): a StatusDot while running, <code data-v-a3290cb2>circle-check</code> when done, a close glyph for failed and for cancelled (a user stop is neutral, never reported as a failure), the command as the meta line, and a bare duration that renders only when computable — never the raw protocol status word. Sub-agents form a card grid (<code data-v-a3290cb2>SubagentGrid.vue</code>) — an auto-fill grid (minmax <code data-v-a3290cb2>--p-subagent-card-min</code>) of cards at the <code data-v-a3290cb2>--color-selected</code> rung with <code data-v-a3290cb2>--radius-lg</code> corners; each card carries the task name, a stable session-wide number (creation order across the session's background sub-agents — unique even across swarms; once shown it sticks, so late-arriving history takes the next tail number), an optional prompt meta line one size down (<code data-v-a3290cb2>--text-sm</code>), an icon-led model · effort line and the status row a further size down (<code data-v-a3290cb2>--text-xs</code>) — the status row pairs the task-row state glyph with the localized label, plus a clock-led bare duration that renders only when computable; the full-bleed <code data-v-a3290cb2>circle-check</code> (drawn for the todo rows' ring family) is scaled onto the shared icon grid wherever it sits beside other glyphs (task rows, cards, filter chips). A failed row tints its name <code data-v-a3290cb2>--color-danger</code>; a cancelled one stays neutral. Rows hover with a rounded strip that grows by padding and a matching negative margin — the row metrics never shift. The row stop is danger-coloured; the card cancel reveals on hover and is always visible on touch as a <code data-v-a3290cb2>--touch-target-min</code> corner target. Every pane's empty state is centered and muted. State and time labels — the head meta included — set <code data-v-a3290cb2>text-autospace: normal</code>, the transcript's mixed CJK/numeric spacing rule, so durations like 9小时2分 breathe.</p><p data-v-a3290cb2><b data-v-a3290cb2>State vocabulary</b>: two glyph families meet here by design — the activity dot (shared with the transcript's tool rows and swarm members) backs the task rows, the todo rows speak the default loader ring, and the sub-agent cards skip glyphs in favour of a localized text label:</p>',8)),t("table",Ba,[a[83]||(a[83]=t("thead",null,[t("tr",null,[t("th",null,"Surface"),t("th",null,"State"),t("th",null,"Meaning"),t("th",null,"Glyph"),t("th",null,"Ink")])],-1)),t("tbody",null,[t("tr",null,[a[48]||(a[48]=t("td",null,"Bash rows",-1)),a[49]||(a[49]=t("td",{class:"tk"},"running",-1)),a[50]||(a[50]=t("td",null,"Task in flight",-1)),t("td",null,[s(d(h),{status:"running"}),a[47]||(a[47]=e(" pulsing dot",-1))]),a[51]||(a[51]=t("td",null,[t("code",null,"--color-accent")],-1))]),t("tr",null,[a[54]||(a[54]=t("td",null,null,-1)),a[55]||(a[55]=t("td",{class:"tk"},"done",-1)),a[56]||(a[56]=t("td",null,"Finished cleanly",-1)),t("td",null,[s(d(o),{name:"circle-check",size:"sm"}),a[52]||(a[52]=e()),a[53]||(a[53]=t("code",null,"circle-check",-1))]),a[57]||(a[57]=t("td",null,[t("code",null,"--color-success")],-1))]),t("tr",null,[a[60]||(a[60]=t("td",null,null,-1)),a[61]||(a[61]=t("td",{class:"tk"},"failed",-1)),a[62]||(a[62]=t("td",null,"Errored — the row's name tints to match",-1)),t("td",null,[s(d(o),{name:"close",size:"sm"}),a[58]||(a[58]=e()),a[59]||(a[59]=t("code",null,"close",-1))]),a[63]||(a[63]=t("td",null,[t("code",null,"--color-danger")],-1))]),t("tr",null,[a[66]||(a[66]=t("td",null,null,-1)),a[67]||(a[67]=t("td",{class:"tk"},"cancelled",-1)),a[68]||(a[68]=t("td",null,"User stop — neutral, never a failure",-1)),t("td",null,[s(d(o),{name:"close",size:"sm"}),a[64]||(a[64]=e()),a[65]||(a[65]=t("code",null,"close",-1))]),a[69]||(a[69]=t("td",null,[t("code",null,"--color-text-muted")],-1))]),t("tr",null,[a[71]||(a[71]=t("td",null,"Todo rows",-1)),a[72]||(a[72]=t("td",{class:"tk"},"in_progress",-1)),a[73]||(a[73]=t("td",null,"Being worked on",-1)),t("td",null,[t("span",Ma,[s(d(I),{size:"xs"})]),a[70]||(a[70]=e(" xs Spinner ring",-1))]),a[74]||(a[74]=t("td",null,[e("the row's own ink ("),t("code",null,"--color-text"),e(")")],-1))]),a[81]||(a[81]=t("tr",null,[t("td"),t("td",{class:"tk"},"pending"),t("td",null,"Not started"),t("td",null,[t("span",{class:"dw-ring"}),e(" hollow ring")]),t("td",null,[t("code",null,"--color-line-strong"),e(" stroke")])],-1)),t("tr",null,[a[77]||(a[77]=t("td",null,null,-1)),a[78]||(a[78]=t("td",{class:"tk"},"done",-1)),a[79]||(a[79]=t("td",null,"Completed",-1)),t("td",null,[s(d(o),{name:"circle-check",size:"md"}),a[75]||(a[75]=e()),a[76]||(a[76]=t("code",null,"circle-check",-1))]),a[80]||(a[80]=t("td",null,[t("code",null,"--color-success")],-1))]),a[82]||(a[82]=t("tr",null,[t("td",null,"Sub-agent cards"),t("td",{class:"tk"},"all"),t("td",null,"The task-row glyph plus a localized label — failed alone tints danger — with a clock-led bare duration trailing"),t("td",null,"glyph + label"),t("td",null,"muted / danger")],-1))])]),a[140]||(a[140]=c("<p data-v-a3290cb2><b data-v-a3290cb2>Filtering & sizing</b>: the bash and sub-agent heads carry the same four icon-led filter chips — recent (<code data-v-a3290cb2>clock</code>; running + the five most recently finished), running (<code data-v-a3290cb2>play</code>), done (<code data-v-a3290cb2>circle-check</code>; every terminal state), all (<code data-v-a3290cb2>list</code>) — and both filtered panels pin to <code data-v-a3290cb2>--p-dock-panel-h</code> so filtering never resizes the panel; the body scrolls inside. When the head runs out of room the chips collapse into a dropdown menu (<code data-v-a3290cb2>FilterControl.vue</code> measures the head itself, so the switch follows the panel's own width, not the viewport; the menu teleports to <code data-v-a3290cb2><body></code> and anchors to the trigger, so the panel's clip and backdrop-filter never squeeze it); the head title never wraps and is never clipped — once the filter is a dropdown the head always fits. An empty pane names its filter (no completed tasks is not no tasks).</p><p data-v-a3290cb2><b data-v-a3290cb2>Opening & cancelling</b>: clicking a row or card opens the task's detail in the right-side panel. Opening is gated: the overlay navigation button renders only when a stable <code data-v-a3290cb2>agentId</code> (on-demand transcript) or locally held output exists, so a REST-only cold-loaded row stays inert instead of opening an empty panel — and says so with the not-allowed cursor. Open and cancel are sibling controls (a full-cover overlay button, the stop IconButton floating above it): no nested interactives, and the stop action exists only while the task runs.</p>",2)),t("div",Ia,[a[94]||(a[94]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Work pills — one vocabulary, a live count or status where one exists")],-1)),t("div",Ea,[t("div",Da,[t("span",Ha,[s(d(o),{name:"target",size:"md"}),a[84]||(a[84]=t("span",null,"Goal",-1)),a[85]||(a[85]=e()),a[86]||(a[86]=t("span",{class:"dw-live"},"Active",-1))]),t("span",Va,[s(d(o),{name:"terminal",size:"md"}),a[87]||(a[87]=t("span",null,"Bash",-1))]),t("span",La,[s(d(o),{name:"sparkles",size:"md"}),a[89]||(a[89]=t("span",null,"Background Agent",-1)),a[90]||(a[90]=e()),t("span",Ra,[s(d(h),{status:"running"}),a[88]||(a[88]=e("3",-1))])]),t("span",Oa,[s(d(o),{name:"list",size:"md"}),a[91]||(a[91]=t("span",null,"Progress",-1)),a[92]||(a[92]=e()),a[93]||(a[93]=t("span",{class:"dw-count"},"3/7",-1))])])])]),t("div",Wa,[a[135]||(a[135]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Work panels — two-tone head, filter chips, rows & card grid")],-1)),t("div",Na,[t("div",Pa,[t("div",Ua,[t("span",Fa,[s(d(o),{name:"terminal",size:"md"}),a[95]||(a[95]=e("Bash ",-1)),a[96]||(a[96]=t("span",{class:"dw-meta"},"1 running",-1))]),t("span",ja,[t("span",Ga,[s(d(o),{name:"clock",size:"sm"}),a[97]||(a[97]=e("Recent",-1))]),t("span",Ka,[s(d(o),{name:"play",size:"sm"}),a[98]||(a[98]=e("Running",-1))]),t("span",Ja,[s(d(o),{name:"circle-check",size:"sm"}),a[99]||(a[99]=e("Done",-1))]),t("span",Ya,[s(d(o),{name:"list",size:"sm"}),a[100]||(a[100]=e("All",-1))])])]),t("div",Qa,[t("div",Za,[s(d(h),{status:"running"}),a[101]||(a[101]=t("span",{class:"nm"},"pnpm test -- --watch",-1)),a[102]||(a[102]=t("span",{class:"tm"},"0:42",-1))]),t("div",Xa,[s(d(o),{name:"circle-check",size:"sm",class:"ok"}),a[103]||(a[103]=t("span",{class:"nm"},"pnpm run build",-1)),a[104]||(a[104]=t("span",{class:"tm"},"3m12s",-1))]),t("div",$a,[s(d(o),{name:"close",size:"sm"}),a[105]||(a[105]=t("span",{class:"nm"},"pnpm lint",-1)),a[106]||(a[106]=t("span",{class:"tm"},"1m05s",-1))]),t("div",_a,[s(d(o),{name:"close",size:"sm"}),a[107]||(a[107]=t("span",{class:"nm"},"node scripts/migrate.mjs",-1)),a[108]||(a[108]=t("span",{class:"tm"},"0:18",-1))])])]),t("div",at,[t("div",tt,[t("span",et,[s(d(o),{name:"sparkles",size:"md"}),a[109]||(a[109]=e("Background Agent ",-1)),a[110]||(a[110]=t("span",{class:"dw-meta"},"1 running",-1))]),t("span",st,[t("span",dt,[s(d(o),{name:"clock",size:"sm"}),a[111]||(a[111]=e("Recent",-1))]),t("span",ot,[s(d(o),{name:"play",size:"sm"}),a[112]||(a[112]=e("Running",-1))]),t("span",ct,[s(d(o),{name:"circle-check",size:"sm"}),a[113]||(a[113]=e("Done",-1))]),t("span",it,[s(d(o),{name:"list",size:"sm"}),a[114]||(a[114]=e("All",-1))])])]),t("div",nt,[t("div",lt,[a[118]||(a[118]=t("div",{class:"ct"},[t("span",{class:"nu"},"01"),t("span",{class:"nm"},"Explore the auth module")],-1)),a[119]||(a[119]=t("div",{class:"ds"},"Map every callsite of the legacy token refresh and report findings",-1)),t("div",rt,[t("div",bt,[s(d(o),{name:"robot",size:"sm"}),a[115]||(a[115]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",vt,[t("span",pt,[s(d(h),{status:"running"}),a[116]||(a[116]=e("Running",-1))]),t("span",ht,[s(d(o),{name:"clock",size:"sm"}),a[117]||(a[117]=e("0:42",-1))])])])]),t("div",ut,[a[123]||(a[123]=t("div",{class:"ct"},[t("span",{class:"nu"},"02"),t("span",{class:"nm"},"Draft the release notes")],-1)),a[124]||(a[124]=t("div",{class:"ds"},"Summarize the merged PRs since the last tag into user-facing notes",-1)),t("div",gt,[t("div",mt,[s(d(o),{name:"robot",size:"sm"}),a[120]||(a[120]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",ft,[t("span",wt,[s(d(o),{name:"circle-check",size:"sm",class:"ok"}),a[121]||(a[121]=e("Done",-1))]),t("span",yt,[s(d(o),{name:"clock",size:"sm"}),a[122]||(a[122]=e("3m12s",-1))])])])]),t("div",kt,[a[128]||(a[128]=t("div",{class:"ct"},[t("span",{class:"nu"},"03"),t("span",{class:"nm"},"Run the integration tests")],-1)),a[129]||(a[129]=t("div",{class:"ds"},"pnpm test against the staging daemon",-1)),t("div",xt,[t("div",Tt,[s(d(o),{name:"robot",size:"sm"}),a[125]||(a[125]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",St,[t("span",Ct,[s(d(o),{name:"close",size:"sm"}),a[126]||(a[126]=e("Failed",-1))]),t("span",zt,[s(d(o),{name:"clock",size:"sm"}),a[127]||(a[127]=e("1m05s",-1))])])])]),t("div",qt,[a[133]||(a[133]=t("div",{class:"ct"},[t("span",{class:"nu"},"04"),t("span",{class:"nm"},"Migrate the config files")],-1)),a[134]||(a[134]=t("div",{class:"ds"},"Rewrite the workspace configs to the new schema",-1)),t("div",At,[t("div",Bt,[s(d(o),{name:"robot",size:"sm"}),a[130]||(a[130]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",Mt,[t("span",It,[s(d(o),{name:"close",size:"sm"}),a[131]||(a[131]=e("Cancelled",-1))]),t("span",Et,[s(d(o),{name:"clock",size:"sm"}),a[132]||(a[132]=e("0:18",-1))])])])])])])])]),a[141]||(a[141]=t("h3",{class:"sub"},"Responsive",-1)),a[142]||(a[142]=t("p",null,[e("See §02 "),t("code",null,"--p-bp-sm"),e(" for the breakpoint. This section only gives mobile-adaptation pointers for the chat interface; a full mobile mockup is out of scope for this spec.")],-1)),a[143]||(a[143]=t("div",{class:"callout info"},[t("span",{class:"ico"},"i"),t("div",null," At ≤640px: dialogs anchor to the bottom as Sheets (xl top radius, top drag handle), the sidebar collapses into an expandable drawer, the Composer toolbar is allowed to wrap, and the chat reading column drops its max-width to fill the screen. ")],-1))]),a[145]||(a[145]=c('<section id="richtext" data-v-a3290cb2><div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>05</span><h2 class="sec-title" data-v-a3290cb2>Rich Text Messages</h2></div><p class="sec-desc" data-v-a3290cb2> Structured references travel as <b data-v-a3290cb2>plain text on the wire</b> and render as <b data-v-a3290cb2>pills at both ends</b>: the composer's editing surface and the rendered message stream share one pill vocabulary, so what you type is what the message shows. This section is the category spec — every future rich-text element (marks, embeds, interactive chips) joins it here. </p><h3 class="sub" data-v-a3290cb2>Mention pill</h3><p data-v-a3290cb2>The mention is the first rich-text element. It exists in two synchronized forms: an <b data-v-a3290cb2>atom</b> inside the desktop composer's ProseMirror document, and a <b data-v-a3290cb2>pill in the message stream</b> — assistant Markdown decorates local links with the same classes, and user/queue bubbles (verbatim wire text, never Markdown) render through the declarative <code data-v-a3290cb2>ComposerText</code> component. Both are the same mark: <b data-v-a3290cb2>not a filled chip</b> — no background, no vertical padding — just body text in a heavier weight (<code data-v-a3290cb2>--weight-ui-strong</code>) on a lighter ink (<code data-v-a3290cb2>--color-text-muted</code>), so the baseline stays flush with the surrounding text; a 2px horizontal inset (<code data-v-a3290cb2>padding-inline: var(--space-05)</code>) supplies the CJK/Latin autospacing that can't cross element boundaries and sets the mention apart from plain text; a 13px muted <b data-v-a3290cb2>kind glyph</b> leads, and the label is the <b data-v-a3290cb2>basename</b> — never the full path, which lives on the tooltip. Hover deepens the ink (glyph included) toward <code data-v-a3290cb2>--color-text</code> on every surface; in the message stream the clickable kinds (file, skill) also take the pointer cursor and the link underline, while the composer keeps pure editing semantics — I-beam, no underline, a click just places the caret. The shared classes live in app-ui's global sheet; the kind → glyph mapping is single-sourced in app-composer (<code data-v-a3290cb2>mentionIcons</code>) and also drives the mention menu rows, so a file looks identical in the menu, the editor, and the sent bubble. Copying from a bubble re-serializes the selection back to the wire text — pills carry their full attrs in <code data-v-a3290cb2>data-mention-*</code>, so a copy/paste round trip restores the link instead of a truncated basename.</p><p data-v-a3290cb2><b data-v-a3290cb2>Kinds and wire forms</b> (serialization is a Markdown link, so the daemon payload stays plain text and the TUI needs nothing new):</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Kind</th><th data-v-a3290cb2>Glyph</th><th data-v-a3290cb2>Wire form</th><th data-v-a3290cb2>Click (in messages)</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td data-v-a3290cb2>File</td><td data-v-a3290cb2>single folded-corner file glyph for every file (no per-extension variants)</td><td data-v-a3290cb2><code data-v-a3290cb2>[name](path)</code> — the dest is canonically encoded per path segment (every non-unreserved ASCII character → <code data-v-a3290cb2>%XX</code>; non-ASCII stays literal, so a CJK path reads as itself — one <code data-v-a3290cb2>decodeURIComponent</code> restores it on every surface)</td><td data-v-a3290cb2>opens the file preview</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Folder</td><td data-v-a3290cb2>folder glyph</td><td data-v-a3290cb2><code data-v-a3290cb2>[name](path/)</code> — trailing slash marks the kind (dest <code data-v-a3290cb2>%</code> → <code data-v-a3290cb2>%25</code> as above)</td><td data-v-a3290cb2>inert (no target yet)</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Skill</td><td data-v-a3290cb2>sparkling glyph</td><td data-v-a3290cb2><code data-v-a3290cb2>[name](kimi-code://skill/<name>)</code> — the app's deep-link protocol</td><td data-v-a3290cb2>opens the skill's SKILL.md in the preview panel</td></tr></tbody></table><p data-v-a3290cb2><b data-v-a3290cb2>Hover tooltip</b>: one document-level singleton (<code data-v-a3290cb2>mentionTooltip</code>) serves every pill — composer NodeViews, ComposerText-rendered bubbles, and Markdown anchors are all raw DOM a Vue wrapper can't reach, so it delegates on document mouseover into a single shared bubble. The bubble keeps the design-system tooltip's dark skin but is <b data-v-a3290cb2>interactive</b>. File and folder pills show the <b data-v-a3290cb2>full path</b>, wrapping anywhere within a fixed max width: every <code data-v-a3290cb2>/</code> separator muted, the basename bold (<code data-v-a3290cb2>--weight-semibold</code>). Skill pills show a card — the name with an <b data-v-a3290cb2>open button</b> at the right (opens the skill's SKILL.md in the preview panel; the path rides the wire skill descriptor through <code data-v-a3290cb2>AppSkill.path</code>), the description below, clamped to four lines; an unresolvable skill degrades to the name alone. Timing mirrors TooltipBubble (150ms show delay, top placement with flip, viewport clamping) and the bubble stays open while hovered so the button is reachable; native <code data-v-a3290cb2>title</code> tooltips are removed wherever a pill appears. The bubble is a <b data-v-a3290cb2>documented structural exception</b> to the component-primitive rule (like the dock overlay): its anchors are ProseMirror NodeViews and pillified spans a Vue wrapper can't reach, so the open/copy buttons re-implement the Button primitive's contract (size, hover, <code data-v-a3290cb2>:focus-visible</code> ring) by hand instead of importing it.</p><p data-v-a3290cb2><b data-v-a3290cb2>Edge cases</b>: labels cap at 32 chars — a longer name takes a <b data-v-a3290cb2>middle ellipsis</b> that keeps the head of the base name and the whole extension (the full name stays in the data attributes, the full path on the tooltip). A pill whose target was deleted after the fact: hovering fires a one-byte <b data-v-a3290cb2>existence probe</b> (an inline spinner sits at the tail of the tooltip's path text while in flight), and a definitive not-found fades the pill and strikes it through — in messages and in the composer alike. Clicks are never gated on the verdict (the preview's own not-found state is the final answer); only confirmed-existing verdicts are cached, scoped to the session, so a recreated file recovers on the next hover and a flaky daemon can never strike a pill by mistake.</p><p data-v-a3290cb2><b data-v-a3290cb2>Behavior contract</b>: a bare <code data-v-a3290cb2>@</code> opens the menu instantly with the workspace root listing (Esc dismisses); with a query, the menu groups <b data-v-a3290cb2>Files</b> (debounced daemon search) above <b data-v-a3290cb2>Skills</b> (instant local filter), captions shown only when both exist, and an in-flight search never hides the current rows (a corner spinner marks it). Full-width <code data-v-a3290cb2>@</code> from IMEs triggers identically. Insertion replaces the @token and adds a separating trailing space; the pill is one atom — Backspace removes it whole, and a zero-width caret anchor keeps the caret on the pill's line when it ends a paragraph. Drafts, history recall, and queue reloads revive pills from their link form on load, and pasting mention-link text (e.g. a copied pill) revives them too — the serializer round-trips both ways. <b data-v-a3290cb2>Skill activation</b>: sending a message with exactly one skill pill activates that skill via the existing channel (the pill form of <code data-v-a3290cb2>/skill:<name></code>, the full text — the pill traveling as its mention link — becomes the args, attachments ride along), and the sent bubble shows the original message verbatim with the pill revived in place (a slash-typed activation, whose bare args carry no pill, keeps the identity card instead); two or more skill pills degrade to plain references, because each activation is its own turn.</p><p data-v-a3290cb2><b data-v-a3290cb2>Implementation map</b>: schema/serialization/offset mapping in app-composer's <code data-v-a3290cb2>composerTextDoc</code> (pure, node-tested); the editor surface in <code data-v-a3290cb2>composerEditor</code>; user/queue bubbles render via app-composer's <code data-v-a3290cb2>ComposerText</code> (one segment pass, declarative tree — no post-processing); assistant-side classification (<code data-v-a3290cb2>classifyMentionHref</code>) and decoration in app-markdown's <code data-v-a3290cb2>Markdown.vue</code> link pass; hover + skill-click routing in app-composer's <code data-v-a3290cb2>mentionTooltip</code> singleton, wired per app shell. When editing these, keep the two surfaces in lockstep — a pill that serializes one way in the composer must read the same way in a message.</p></section><section id="themes" data-v-a3290cb2><div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>06</span><h2 class="sec-title" data-v-a3290cb2>Theming</h2></div><p class="sec-desc" data-v-a3290cb2> Kimi Web uses <b data-v-a3290cb2>one unified theme</b>: the same components, fonts, radii, shadows, and surfaces — theming only swaps color values. Every semantic color token ships a light value in <code data-v-a3290cb2>:root</code> and a dark override in the <code data-v-a3290cb2>data-color-scheme</code> blocks; the semantic status colors (success / warning / danger) are independent palettes, one set each for light / dark. </p><h3 class="sub" data-v-a3290cb2>Accent</h3><p data-v-a3290cb2>The app has <b data-v-a3290cb2>one accent</b>: the brand blue (<code data-v-a3290cb2>--color-accent</code>, <code data-v-a3290cb2>#1783ff</code> light / <code data-v-a3290cb2>#58a6ff</code> dark). Use it sparingly — the accent is reserved for the primary action, focus rings, links, and active marks (current tab, toggles); large fills always come from the neutral surface tokens. Selection that means "where I am" (sidebar rows, list pickers) is deliberately NOT accent-tinted — it uses <code data-v-a3290cb2>--color-selected</code> so it reads as location, not as an action.</p><h3 class="sub" data-v-a3290cb2>Light / dark mode</h3><p data-v-a3290cb2>Each semantic token ships a light value in <code data-v-a3290cb2>:root</code> and a dark override in the two <code data-v-a3290cb2>data-color-scheme</code> blocks (explicit choice, or following the OS preference via <code data-v-a3290cb2>prefers-color-scheme</code>). Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.</p><div class="callout good" data-v-a3290cb2><span class="ico" data-v-a3290cb2>✓</span><div data-v-a3290cb2><b data-v-a3290cb2>Benefits of one theme</b>: components, fonts, radii, and surfaces are consistent site-wide; a single accent keeps the brand identity unambiguous; light / dark mode works out of the box; semantic status colors are independently tunable. </div></div></section><section id="rules" data-v-a3290cb2><div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>07</span><h2 class="sec-title" data-v-a3290cb2>Style Rules</h2></div><p class="sec-desc" data-v-a3290cb2> Anti-pattern rules that all UI code must follow. These rules are also the basis of the check-style detection script, one-to-one with a warning. </p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Rule ID</th><th data-v-a3290cb2>What it detects</th><th data-v-a3290cb2>Action</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>no-gradient-text</td><td data-v-a3290cb2>gradient text / gradient background</td><td data-v-a3290cb2><span class="pill red" data-v-a3290cb2>Forbidden</span></td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>no-glassmorphism</td><td data-v-a3290cb2><code data-v-a3290cb2>backdrop-filter: blur</code> (<b data-v-a3290cb2>TopBar sticky nav bar</b> and <b data-v-a3290cb2>menu surfaces via <code data-v-a3290cb2>--p-menu-backdrop</code></b> are the exceptions)</td><td data-v-a3290cb2><span class="pill amber" data-v-a3290cb2>TopBar + menus exempt</span></td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>no-color-glow</td><td data-v-a3290cb2>colored / large-radius box-shadow glow</td><td data-v-a3290cb2><span class="pill red" data-v-a3290cb2>Forbidden</span></td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>no-emoji-icon</td><td data-v-a3290cb2>using emoji as a functional icon (no exceptions). Emoji inside <b data-v-a3290cb2>user content</b> — session titles, messages — is not chrome and is out of scope (see §07 Session row's emoji icon)</td><td data-v-a3290cb2><span class="pill red" data-v-a3290cb2>Forbidden</span></td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>no-hardcoded-hex</td><td data-v-a3290cb2>unregistered hex color inside a component <code data-v-a3290cb2><style></code></td><td data-v-a3290cb2><span class="pill amber" data-v-a3290cb2>Warning</span></td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>no-hardcoded-font</td><td data-v-a3290cb2>hard-coded <code data-v-a3290cb2>font-family</code> in a component (e.g. <code data-v-a3290cb2>'Inter'</code>) instead of <code data-v-a3290cb2>var(--font-ui)</code></td><td data-v-a3290cb2><span class="pill amber" data-v-a3290cb2>Warning</span></td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>radius-from-scale</td><td data-v-a3290cb2>radius value not in <code data-v-a3290cb2>{4,6,8,12,16,20,999}</code></td><td data-v-a3290cb2><span class="pill amber" data-v-a3290cb2>Warning</span></td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>z-from-scale</td><td data-v-a3290cb2>z-index using an unregistered large number</td><td data-v-a3290cb2><span class="pill amber" data-v-a3290cb2>Warning</span></td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>weight-from-scale</td><td data-v-a3290cb2>font-weight not in <code data-v-a3290cb2>{400,500}</code></td><td data-v-a3290cb2><span class="pill amber" data-v-a3290cb2>Warning</span></td></tr></tbody></table><h3 class="sub" data-v-a3290cb2>State matrix</h3><p data-v-a3290cb2>Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. <code data-v-a3290cb2>focus-visible</code> always uses <code data-v-a3290cb2>--p-focus-ring</code> (appears only on keyboard focus, see §08); <code data-v-a3290cb2>disabled</code> is uniformly <code data-v-a3290cb2>opacity:.5</code>.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>State</th><th data-v-a3290cb2>Button</th><th data-v-a3290cb2>Input</th><th data-v-a3290cb2>Card</th><th data-v-a3290cb2>Menu item</th><th data-v-a3290cb2>Switch</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>default</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>✓</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>hover</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>—</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>active / pressed</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>focus-visible</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>✓</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>disabled</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>—</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>loading</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>selected / active</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>✓</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>error</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>readonly</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>✓</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td><td data-v-a3290cb2>—</td></tr></tbody></table><h3 class="sub" data-v-a3290cb2>Chat working indicator</h3><div class="callout good" data-v-a3290cb2><span class="ico" data-v-a3290cb2>✓</span><div data-v-a3290cb2> The chat working state ("prompt sent, turn unfinished") is a brand signature of Kimi Web, rendered uniformly by the <code data-v-a3290cb2>WorkingIndicator</code> component: the 小蓝 mascot plus a phase label — "Requesting…" until the assistant's reply starts, "Working…" once it is streaming. All other loading states (including <code data-v-a3290cb2>ActivityNotice</code>) use the plain <code data-v-a3290cb2>Spinner</code>. </div></div><h3 class="sub" data-v-a3290cb2>Glassmorphism exemption</h3><div class="callout good" data-v-a3290cb2><span class="ico" data-v-a3290cb2>✓</span><div data-v-a3290cb2><code data-v-a3290cb2>backdrop-filter: blur</code> is banned site-wide, with <b data-v-a3290cb2>two exceptions</b>: the <code data-v-a3290cb2>.frost</code> variant of <code data-v-a3290cb2>TopBar</code> — only in the one place of the "sticky navigation bar", used to stay readable over scrolling content — and the floating menu surfaces: Menu.vue, the Select listbox and the composer dropdowns use the <code data-v-a3290cb2>--color-menu-bg</code> token (a 95% surface), while the autocomplete family — slash/mention popups and the dock work panel — deliberately runs a frostier recipe of its own: 70% page background (single-sourced as <code data-v-a3290cb2>--color-menu-bg-frost</code>) over the shared <code data-v-a3290cb2>--p-menu-backdrop</code> blur, which stays the single-sourced blur token across all of them. The dock's work surfaces — the work panel and its pills, persistent over the scrolling transcript — ride that same frostier recipe (specified per-surface in §04 (Dock · work pills & panels)) rather than a bespoke one. No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under <code data-v-a3290cb2>no-glassmorphism</code>, and menu blur with ad-hoc values (anything but the token) is flagged too. </div></div><div class="footer" data-v-a3290cb2><span data-v-a3290cb2>Kimi Web Design System · v1.0</span><span data-v-a3290cb2>The reference when changing the web UI</span></div></section><section id="shell" data-v-a3290cb2><div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>08</span><h2 class="sec-title" data-v-a3290cb2>App Shell & Sidebar</h2></div><p class="sec-desc" data-v-a3290cb2> The structural spec for the app shell (three-column grid + right preview panel) and the left session sidebar. These are business-agnostic "skeletons" — components, fonts, radii, and surfaces are reused from §02 / §03, but layout and alignment have their own conventions. </p><h3 class="sub" data-v-a3290cb2>Layout grid</h3><p data-v-a3290cb2>On web it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent <code data-v-a3290cb2>auto</code> track, with the conversation column in the middle; two 0-width tracks are for the ResizeHandles. (The desktop app adds a second row for its terminal panel — desktop-only, see below.)</p><div class="code" data-v-a3290cb2><div class="code-bar" data-v-a3290cb2><span class="d" data-v-a3290cb2></span><span class="d" data-v-a3290cb2></span><span class="d" data-v-a3290cb2></span><span class="fn" data-v-a3290cb2>App.vue · .app</span></div><pre data-v-a3290cb2>grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;\n /* sidebar ↑ ↑handle ↑conversation ↑handle ↑right panel (auto) */</pre></div><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Token</th><th data-v-a3290cb2>Value</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>sidebar width</td><td class="val" data-v-a3290cb2>270px default (adjustable)</td><td data-v-a3290cb2>expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's <code data-v-a3290cb2>--p-sidebar-w</code> (264px)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--preview-w</td><td class="val" data-v-a3290cb2>460px</td><td data-v-a3290cb2>width of the right preview panel when open</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--panel-head-h</td><td class="val" data-v-a3290cb2>48px</td><td data-v-a3290cb2>unified height for all right panel heads + the conversation column head; both use a 0.5px bottom hairline</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--p-bp-sm</td><td class="val" data-v-a3290cb2>640px</td><td data-v-a3290cb2>≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel</td></tr></tbody></table><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2>The right panel track exists permanently, with its width toggling between <code data-v-a3290cb2>0 ↔ var(--preview-w)</code> and no transition — animating a grid track would relayout the whole app grid every frame (when open it squeezes the conversation column, rather than switching templates).</li><li data-v-a3290cb2>The sidebar collapses SYMMETRICALLY to the right panel: its container width animates to 0 while the content keeps its fixed width anchored to the right edge (clipped, sliding out left — no reflow, hairline stays on the clipped content). No rail remains. The collapse control differs by platform: on <b data-v-a3290cb2>macOS desktop</b> the toggle is a single resident floating IconButton pinned beside the traffic lights (rendered in both states, only the glyph swaps — the sidebar slides underneath it, never moves or flashes); on <b data-v-a3290cb2>Windows / web</b> the collapse button lives inside the sidebar header (right-aligned), and a floating expand button appears at the top-left only while collapsed. The conversation header uses a 0.5px bottom hairline and pads left in step with the transition while collapsed.</li><li data-v-a3290cb2>All grid children must have <code data-v-a3290cb2>min-height:0; min-width:0</code>, so only the inner scroll containers scroll and the page itself does not scroll.</li></ul><h3 class="sub" data-v-a3290cb2>Sidebar alignment system (<code data-v-a3290cb2>--sb-*</code>)</h3><p data-v-a3290cb2>All sidebar rows (group head, session row, New chat, search, and Settings buttons) share 4 custom properties. Their 16px icon slots and <code data-v-a3290cb2>--sb-gap</code> place every label on the same x-axis as the workspace name.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Token</th><th data-v-a3290cb2>Value</th><th data-v-a3290cb2>Usage</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--sb-inset</td><td class="val" data-v-a3290cb2>12px</td><td data-v-a3290cb2>row box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--sb-pad-x</td><td class="val" data-v-a3290cb2>20px</td><td data-v-a3290cb2>content start x (= --sb-inset + 8px row padding)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--sb-gutter</td><td class="val" data-v-a3290cb2>16px</td><td data-v-a3290cb2>leading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>--sb-gap</td><td class="val" data-v-a3290cb2>8px</td><td data-v-a3290cb2>gap between the icon slot and the text</td></tr></tbody></table><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2> The session title's starting x = <code data-v-a3290cb2>--sb-pad-x + --sb-gutter + --sb-gap</code>. The group head has a folder icon and the session row has a status slot; both icons are the same width and position, so the titles align naturally. </div></div><h3 class="sub" data-v-a3290cb2>Sidebar structure</h3><p data-v-a3290cb2>The sidebar from top to bottom: brand header → action group → pinned head (pinned section + "Workspaces" label) → scrolling grouped list (workspace head + session rows) → user-menu footer. New chat and Search are direct sibling controls in the same grid container; the optional new-workspace action shares the first row, while Search spans the next row. A 4px gap keeps Search clear of the scroll boundary. The pinned head sits OUTSIDE the scroll container (the action-group / footer pattern — never <code data-v-a3290cb2>position: sticky</code>, which would need an opaque plate over the frosted tint), so the pinned sessions and the "Workspaces" label stay put while the workspace groups scroll beneath; the pinned section is collapsible (a chevron on its label, revealed on hover/focus and kept visible while folded; state persisted) so a long pinned set can't eat the sidebar, and it re-expands when a new session is pinned. Both pinned edges use three light near, middle and far fades across 18px, entering over 260ms only while more session content exists beyond that edge — the top seam lives at the pinned head's bottom border. The footer seam is a 0.5px hairline. Controls reuse the §03 primitives as much as possible. The sidebar sits on <code data-v-a3290cb2>--color-sidebar-bg</code> (one step off <code data-v-a3290cb2>--color-bg</code>: warm off-white just under white in light, one step BELOW the page in dark — the session column reads as its own plane, and with dark elevation = lighter the chrome never sits brighter than the conversation pane; the hairline still separates it from the pane). Vertical rhythm: the brand header keeps 12px padding (on macOS desktop the left padding grows to 80px to clear the traffic lights); rows inside the action group stack flush (0 gap, same rhythm as the list rows); adjacent groups are separated by 12px. The search glyph has a -0.5px optical correction to align its visual centre with the label. Row hover uses <code data-v-a3290cb2>--sb-hover</code> (= the global <code data-v-a3290cb2>--color-hover</code> wash); the selected row uses the lighter <code data-v-a3290cb2>--sb-selected</code> wash derived from <code data-v-a3290cb2>--color-selected</code> — On macOS desktop the sidebar is instead <b data-v-a3290cb2>frosted</b>: the window carries a native <code data-v-a3290cb2>NSVisualEffectView</code> ('menu' vibrancy, following the in-app scheme via the nativeTheme mirror, its state pinned to <code data-v-a3290cb2>inactive</code> so the material keeps its flat pressed-down colour — ≈ #282829 dark / #E7E7E7 light — with no active/inactive drift) and the sidebar column drops <code data-v-a3290cb2>--color-sidebar-bg</code> for a single translucent <code data-v-a3290cb2>--color-sidebar-tint</code> wash that presses the pinned material one step — ≈ #282829 → ≈ #1e1e1f in dark (<code data-v-a3290cb2>rgba(0,0,0,0.25)</code>), ≈ #E7E7E7 → ≈ #f1f1f1 in light (<code data-v-a3290cb2>rgba(255,255,255,0.4)</code>) — with header and footer staying transparent so the tint reads as one uniform pane; the root chain (<code data-v-a3290cb2>html/body/#app/.app</code>) stays unpainted only under the <code data-v-a3290cb2>macos-desktop</code> + <code data-v-a3290cb2>vibrancy</code> flags — the latter is the Settings → Appearance accessibility switch (default on; persisted main-side so the window is created with the right material, and live-applied on toggle): off repaints the root chain and the sidebar falls back to opaque <code data-v-a3290cb2>--color-sidebar-bg</code>, while the traffic-light layout keeps keying off <code data-v-a3290cb2>macos-desktop</code> alone — while the conversation pane, chat header and right preview keep their own opaque surfaces. The list's hover-icon clusters (session-row kebab, group-head actions) paint NOTHING there — no plate, no wash, no blur (real backdrop blur does not even render over this window: Chromium's backdrop sampler returns a flat wash above the transparent BrowserWindow + vibrancy view). Instead the row's title/name dissolves before it ever reaches the buttons: a two-stage <code data-v-a3290cb2>mask-image</code> fade — a subtle 16px dissolve at rest, extending over the cluster zone only while the actions are revealed (row hover / keyboard focus / menu open): 34px on session rows (the pin+kebab cluster overhangs the title by ≈25px), 68px on group heads (the floating cluster is ≈60px wide). The fade is zone-based, so short rows render untouched, and <code data-v-a3290cb2>text-overflow</code> becomes <code data-v-a3290cb2>clip</code> so a long tail dissolves instead of dotting.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Block</th><th data-v-a3290cb2>Use</th><th data-v-a3290cb2>Note</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td data-v-a3290cb2>Brand header</td><td data-v-a3290cb2>logo + name + collapse IconButton (right-aligned)</td><td data-v-a3290cb2>on Windows / web the brand is left and the collapse IconButton sm is right-aligned inside the header; the dev-only backend version/address pill uses the UI font, not monospace; the logo is animated (a blinking eye). On macOS desktop the header is a bare drag strip (brand hidden, traffic lights + resident floating toggle over it)</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>New chat</td><td data-v-a3290cb2>full-width left-aligned button (custom)</td><td data-v-a3290cb2>500-weight label; same rhythm as the session rows in the list (left-aligned, hover = <code data-v-a3290cb2>--sb-hover</code>). <b data-v-a3290cb2>Do not</b> use Button (centered, breaks the rhythm)</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Search</td><td data-v-a3290cb2>bare search row (custom)</td><td data-v-a3290cb2>500-weight label; no border, hover/focus shows the faint <code data-v-a3290cb2>--color-hover</code> wash; icon + label, with the <code data-v-a3290cb2>Kbd</code> keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. <b data-v-a3290cb2>Do not</b> use Input (the 38px bordered version is too heavy). It is a direct sibling of New chat in the action group</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Section label</td><td data-v-a3290cb2><code data-v-a3290cb2>.p-section-label</code></td><td data-v-a3290cb2>uppercase muted small titles like "Workspaces", using <code data-v-a3290cb2>--weight-section-label</code> (600)</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Pinned head</td><td data-v-a3290cb2>fixed block above the scroll container (<code data-v-a3290cb2>.sessions-head</code>): the pinned section (<code data-v-a3290cb2>PinnedSessionList.vue</code>) + the "Workspaces" section label</td><td data-v-a3290cb2>stays put while the workspace groups scroll; owns the top scroll-linked seam (hairline + fade, only while scrolled). Pinned rows render in pure recency order (updatedAt desc — no manual ordering, no attention tiering): drag a session row in to pin it (the drop spot carries no position meaning), drag a pinned row out to unpin. The pinned section folds via its label chevron (persisted, <code data-v-a3290cb2>kimi-web.pinned-collapsed</code>) and re-expands only on an explicit pin (never on load backfill); the expanded rows are capped at 40vh with their own scroll so a long pinned set can't push the list or footer out of view</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Workspace head / session row</td><td data-v-a3290cb2>see next two sections</td><td data-v-a3290cb2>share <code data-v-a3290cb2>--sb-*</code> alignment</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>User-menu footer</td><td data-v-a3290cb2>account area (<code data-v-a3290cb2>components/UserMenu.vue</code>) opening an upward §03 menu</td><td data-v-a3290cb2>pinned row under the session list, separated by a 0.5px <code data-v-a3290cb2>--line</code> hairline; trigger keeps the same list-style family as New chat (24px round avatar + nickname when signed in, user icon + sign-in hint otherwise). The menu box follows the trigger's left edge and width (ResizeObserver-tracked, so it survives a sidebar resize) and is teleported to body because the column's container-type would capture position:fixed. Rows: plan usage / theme / language are macOS-style hover flyout submenus — the parent row carries the module icon, a faint current value and a fixed chevron-right, and hovering (or moving focus to the parent row, or pressing Enter / Space / → on it) opens a teleported panel anchored to the parent menu's right edge (content-adaptive width floored by the menu's own min-width and capped at the parent menu's width; flips left near the viewport edge) with a 250ms hover-intent close grace; the usage panel shows weekly + 5h rows (used-percent values via <code data-v-a3290cb2>settings.planUsage.usedPct</code>, with severity colours), while the theme (three schemes) and language (two locales) panels move the check to the picked option without closing the menu — then the upgrade entry below the top plan level, settings (with an always-visible Kbd keycap shortcut hint on desktop) and a confirming sign-out; all menu icons come from the Kimi set, and the whole menu (flyouts included) runs one step above the §03 default density — base-size labels, taller rows</td></tr></tbody></table><div class="callout warn" data-v-a3290cb2><span class="ico" data-v-a3290cb2>!</span><div data-v-a3290cb2><b data-v-a3290cb2>Why New chat / search / inline rename don't use Button / Input:</b> they are "list-style" controls (full-width, left-aligned, compact, borderless), while Button is centered and Input is a 38px bordered control — forcing them in would break the sidebar's visual density and alignment. This is an intentional custom exception, not an oversight. </div></div><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2><b data-v-a3290cb2>实验室 multi-tab sidebar toggle</b> (Settings → 实验室, <code data-v-a3290cb2>kimi-web.sidebar-multi-tab</code>, default OFF) forks the sidebar into two forms. <b data-v-a3290cb2>OFF = the legacy single session list</b>: no 进行中/已完成/工作空间 tabs (<code data-v-a3290cb2>statusTab</code> pinned to <code data-v-a3290cb2>open</code>, tab shortcuts inert), no session-admin entries (the 列表管理 menu item hides and the workspace home itself falls back to the classic 新建会话 doodle hero — no workspace head, no recent-sessions list), the row hover action + context menu and the chat-header ⋯ menu read <b data-v-a3290cb2>归档</b> with the <code data-v-a3290cb2>archive</code> glyph (no success-hover variant, the header's Done pill + reopen button hide), and the archive ActionToast is the legacy «撤销 · 或到 · 设置 · 查看已归档的会话» linking to Settings → Archived. <b data-v-a3290cb2>ON = the status-tabs form</b> documented in this section (tabs, session admin page, the complete/reopen relabel, «已完成 · 撤销» toast). The preference is an app-core singleton (<code data-v-a3290cb2>useSidebarTabs</code>) consumed directly by Sidebar / SessionRow / ConversationPane / App.vue — no prop threading. </div></div><h3 class="sub" data-v-a3290cb2>Session row</h3><p data-v-a3290cb2>A session row is an inset rounded pill, structured as: <code data-v-a3290cb2>status slot → title → time → attention Badge → hover actions (pin / archive)</code>.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Part</th><th data-v-a3290cb2>Rule</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td data-v-a3290cb2>Container</td><td data-v-a3290cb2><code data-v-a3290cb2>padding: 8px 8px</code> inside the list's <code data-v-a3290cb2>--sb-inset</code> gutter, <code data-v-a3290cb2>radius-sm</code>; <b data-v-a3290cb2>no fixed/min height</b> — row height is font-driven (title <code data-v-a3290cb2>line-height: --leading-tight</code>, ≈16px) → ≈32px total, the sidebar-wide row rhythm. The hover actions are absolutely positioned so they never force the row taller (no hover jitter). hover = <code data-v-a3290cb2>--sb-hover</code> (the global <code data-v-a3290cb2>--color-hover</code> wash); active = <code data-v-a3290cb2>--sb-selected</code> (75% of the global selected wash) — neutral, no accent tint, no border, no weight change</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Status slot (lead)</td><td data-v-a3290cb2>fixed <code data-v-a3290cb2>--sb-gutter</code> width; running = <code data-v-a3290cb2>Spinner</code> sm, otherwise unread = 7px accent dot; empty while an attention Badge owns the row — one status at a time, decided by the shared <code data-v-a3290cb2>SessionDisplayStatus</code> enum (app-core <code data-v-a3290cb2>sessionDisplayStatus.ts</code>: approval › question › running › aborted › unread)</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Title</td><td data-v-a3290cb2>flex:1 with truncation and <code data-v-a3290cb2>user-select:none</code>; double-click enters inline rename (compact input, not Input), whose text remains selectable</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Emoji icon</td><td data-v-a3290cb2>the session icon is the title's LEADING emoji cluster (app-core <code data-v-a3290cb2>splitSessionEmoji</code> — no icon field; every client renders the title as-is). The emoji is an ordinary title character — no decoration at rest or on hover (it stays a <code data-v-a3290cb2><button></code> for a11y), and clicking it opens <code data-v-a3290cb2>SessionEmojiPicker</code> — a Menu-shelled panel (bare list-style search row → scrollable sections: Recently used persisted in localStorage (cap 8) + the grouped emoji dataset, with remove/random as MenuItems in the footer; a query swaps the sections for keyword-search results), teleported + fixed + <code data-v-a3290cb2>--z-dropdown</code>, popping from the trigger corner like the right-click menu. The menu's "Set Emoji…" opens the same picker and is the discoverable path. Inline rename edits the whole title — the emoji is an ordinary character in the input</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Time</td><td data-v-a3290cb2>mono xs, <code data-v-a3290cb2>fg-faint</code>; yields to the hover actions on hover</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Attention Badge</td><td data-v-a3290cb2><code data-v-a3290cb2>Badge</code> sm: info (needs answer) / warning (needs approval) / danger (aborted)</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Hover actions</td><td data-v-a3290cb2><code data-v-a3290cb2>IconButton</code> sm × 2 — pin + archive — cross-faded over the time on row hover (no kebab button). Right-clicking the row opens the full menu (copy ID / rename / emoji / fork / export / pin / archive + timestamp) anchored to the cursor, except over the inline rename input, where the native text-editing menu stays</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Flat-style variant (flat list + pinned section)</td><td data-v-a3290cb2>the sidebar's flat list rows AND — always, regardless of view mode — the pinned section's rows differ from the grouped row in three ways (all keyed off the facade projecting <code data-v-a3290cb2>cwdLabel</code>): ① no leading status slot — the title is left-aligned at the row's content edge; ② a second line under the title: <code data-v-a3290cb2>folder-closed</code> icon sm + the cwd's final directory name (<code data-v-a3290cb2>-</code> when the session has no cwd), xs faint like the time — except the icon, which takes <code data-v-a3290cb2>--color-text-muted</code> (one rung stronger, the same optical compensation as the group head's folder; the open-folder glyph's thin back-flap washed out at 14px) — rest-width tail mask fade; when the session has an associated PR (v2 git domain), a small tag (<code data-v-a3290cb2>git-pull-request</code> icon + #number, 2xs medium on a soft ground with a hairline edge and radius-sm corners — a mini §03 Badge) sits at the line's right edge, state-colored the GitHub way (open = <code data-v-a3290cb2>--color-success-soft</code> ground + <code data-v-a3290cb2>--color-success</code> text, merged = <code data-v-a3290cb2>--color-done-soft</code> + <code data-v-a3290cb2>--color-done</code> purple, closed = neutral sunken) and opens the PR on click; ③ the first line's right side shows status — attention Badges anchored to the row's right edge, running Spinner, unread dot — INSTEAD of the time, which only renders when there is nothing to report (the Spinner yields to the attention pills: a session waiting for approval/answer never shows both); on hover the actions cross-fade IN as the whole status cluster fades OUT — pills and pin/archive never co-exist (grouped rows keep pills visible on hover). Height stays font-driven — the pill just grows the line. Grouped rows never set <code data-v-a3290cb2>cwdLabel</code> and keep the classic structure. The flat ↔ grouped switch lives in a dropdown on the SESSIONS section label (fixed <code data-v-a3290cb2>list-settings</code> icon + hover tooltip; the menu opens with a muted group label, per-view icons, and the current view checked at the row's right edge; mode persisted per device)</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Archive</td><td data-v-a3290cb2>no confirm — the hover archive button / menu item archives immediately, then App.vue shows the §03 <code data-v-a3290cb2>ActionToast</code> (top-center) with Undo (restores the session) and Settings (opens the archived list)</td></tr></tbody></table><h3 class="sub" data-v-a3290cb2>Workspace group</h3><p data-v-a3290cb2>The group head and session rows share <code data-v-a3290cb2>--sb-*</code>: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.</p><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2>The folder icon leads the row (switching icons between open and closed states) with the plain <code data-v-a3290cb2>--sb-gap</code> before the name — it does not pad out the <code data-v-a3290cb2>--sb-gutter</code> slot.</li><li data-v-a3290cb2>The name uses 500 weight with muted color (<code data-v-a3290cb2>--color-text-muted</code>, one step lighter than session titles), so group heads remain clear without competing with list content. No path subtitle; hovering the name shows the full root path in a <code data-v-a3290cb2>Tooltip</code>.</li><li data-v-a3290cb2>The kebab (menu) and "+" (new chat in this workspace) both use <code data-v-a3290cb2>IconButton</code> sm inside a floating actions layer anchored to the row's right edge — no reserved layout space, so the name uses the full row width when idle. Shown on hover, keyboard focus, or while the menu is open; the layer backs itself with the sidebar surface (container background) plus the row hover wash (an <code data-v-a3290cb2>::after</code> shown only while the row is hovered), so its color exactly equals the row's current background and the overlapped name tail doesn't bleed through (hidden via <code data-v-a3290cb2>opacity:0</code>, staying in the tab order). On macOS desktop the layer paints nothing at all — the name's <code data-v-a3290cb2>mask-image</code> fade (see the sidebar section above) dissolves the tail before it reaches the buttons</li><li data-v-a3290cb2>The group is collapsible; when collapsed its session list is hidden.</li><li data-v-a3290cb2>While the active workspace has no session selected (the draft state — e.g. right after adding the workspace, or after New chat), the group head carries the same neutral <code data-v-a3290cb2>--sb-selected</code> fill as a selected session row (selection reads as "where I am"; the fill wins over hover). Once a session is selected or created, the fill moves to that session row.</li></ul><h3 class="sub" data-v-a3290cb2>Show more & collapse</h3><p data-v-a3290cb2>The "expand / collapse" controls at the bottom of each workspace group are compact list controls (same family as search, New chat, inline rename — not Buttons) sharing one row: expand (chevron-down) first, collapse (chevron-up) after a faint middot when both are present. Expanding reveals the next batch of sessions, fetching the next page from the server only when the locally loaded rows can't cover it — the control never exposes whether a reveal came from memory or the network.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Part</th><th data-v-a3290cb2>Rule</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Row</td><td data-v-a3290cb2>a single flex row holding the controls, all content-width — hover washes just the button as a snug pill, never the full row. Font-driven height (≈32px like a session row), <code data-v-a3290cb2>radius-sm</code>; hover = <code data-v-a3290cb2>--sb-hover</code> (no text recolor); <code data-v-a3290cb2>:focus-visible</code> uses <code data-v-a3290cb2>--p-focus-ring</code></td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Chevron</td><td data-v-a3290cb2>sm (down = expand, up = collapse); the row indents by <code data-v-a3290cb2>--sb-gutter + --sb-gap</code> so the first button's chevron starts exactly at the session-title x, lining the control's leading edge up with the titles above</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Label</td><td data-v-a3290cb2><code data-v-a3290cb2>font-ui</code>, <code data-v-a3290cb2>text-xs</code>, <code data-v-a3290cb2>--color-text-muted</code>; truncated</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Separator</td><td data-v-a3290cb2>faint middot (<code data-v-a3290cb2>--color-text-faint</code>) with <code data-v-a3290cb2>--space-1</code> side margins, rendered only when both controls are present</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Behavior</td><td data-v-a3290cb2>each group keeps a display cap starting at the first page; "Show more" steps it up by one batch (5) and fetches the next page only when the loaded rows fall short (busy = "Loading…", disabled); "Show less" resets the cap to the first page (view-layer trim — data is kept, no refetch). "Show more" exists while undisplayed loaded rows remain or the server has more; "Show less" appears once past the first page</td></tr></tbody></table><h3 class="sub" data-v-a3290cb2>ResizeHandle</h3><p data-v-a3290cb2>A 4px grab strip layered over the 1px column border (<code data-v-a3290cb2>margin: 0 -2px</code> makes the whole 4px grabbable) with a centred 2px indicator bar. The bar stays transparent at rest and shows the neutral fills one step up the ramp — f2 on hover, f3 while the drag is live (the sidebar column is translucent on macOS, so f1 read too faint) — never the accent.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Rule</th><th data-v-a3290cb2>Value</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td data-v-a3290cb2>Width / cursor</td><td data-v-a3290cb2>4px strip, 2px bar / <code data-v-a3290cb2>col-resize</code> mid-range; <code data-v-a3290cb2>w-resize</code> / <code data-v-a3290cb2>e-resize</code> at the drag limits (hints the direction that still resizes)</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Normal / hover / drag</td><td data-v-a3290cb2>transparent / <code data-v-a3290cb2>--color-selected</code> (f2) / <code data-v-a3290cb2>--color-line-strong</code> (f3) — the neutral ramp one step up, never accent</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Layer</td><td data-v-a3290cb2><code data-v-a3290cb2>--z-dropdown</code>, above pane-level sticky chrome (chat dock at <code data-v-a3290cb2>--z-sticky</code>) so the overhang stays visible and grabbable</td></tr><tr data-v-a3290cb2><td data-v-a3290cb2>Behavior</td><td data-v-a3290cb2>panel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage</td></tr></tbody></table><h3 class="sub" data-v-a3290cb2>Right panel</h3><p data-v-a3290cb2>The right panels (file preview / Diff / compaction summary / sub-agent / side chat) share one track and one head primitive.</p><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2>The panel head uses the <code data-v-a3290cb2>PanelHeader</code> primitive (48px = <code data-v-a3290cb2>--panel-head-h</code>), the same height as the conversation column head, so the hairline runs as one line.</li><li data-v-a3290cb2>Panel head: bold mono title + optional muted subtitle + middle slot (Badge / control / path) + close IconButton on the right.</li><li data-v-a3290cb2>When opened, the panel width snaps from <code data-v-a3290cb2>0 → var(--preview-w)</code> with no animation, squeezing the conversation column in a single layout.</li><li data-v-a3290cb2>At ≤640px the panel becomes a full-screen overlay (<code data-v-a3290cb2>position:fixed; inset:0</code>).</li></ul><h3 class="sub" data-v-a3290cb2>Bottom terminal panel (desktop-only)</h3><p data-v-a3290cb2>The native terminal (<code data-v-a3290cb2>components/terminal/</code>) sits in the conversation column's own bottom grid slot — the sidebar and the right panel span BOTH rows and keep full height (the VS Code layout: the panel belongs to the editor area, not to the whole window). Its height transitions <code data-v-a3290cb2>0 ↔ var(--terminal-h)</code> (260px default, 120 min, 60% viewport max; persisted), squeezing the conversation column above instead of overlaying it. The panel mounts lazily on first open and then stays mounted so xterm scrollback survives a collapse.</p><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2>Resize: a horizontal twin of the ResizeHandle (4px strip over the 0.5px top hairline, <code data-v-a3290cb2>row-resize</code> mid-range, <code data-v-a3290cb2>n/s-resize</code> at the limits, same neutral f2/f3 ramp, never accent). The shared <code data-v-a3290cb2>useResizable</code> hook owns it via <code data-v-a3290cb2>axis: 'y'</code>; the height var is written imperatively during a drag (same no-Vue-rerender rule as <code data-v-a3290cb2>--preview-w</code>).</li><li data-v-a3290cb2>Toolbar (32px, 0.5px bottom hairline): tab strip on the left — each tab is a compact <code data-v-a3290cb2>radius-sm</code> pill (leading terminal glyph, muted while exited + shell label + hover close affordance), the active tab uses <code data-v-a3290cb2>--color-selected</code>, hover <code data-v-a3290cb2>--color-hover</code>; a "+" action appends a tab. Tabs follow the §08 tablist keyboard model (roving tabindex, ←/→/Home/End), the close affordance is its own button (no nested interactives), and the height separator is keyboard-operable (↑/↓ in steps, value exposed). Trailing actions: restart (only while the active tab exited) and a collapse chevron. Collapsing sets <code data-v-a3290cb2>inert</code> on the region — the xterm instances and their scrollback stay mounted but leave the tab order.</li><li data-v-a3290cb2>The xterm canvas cannot resolve CSS variables either, so its palette is resolved from the live <code data-v-a3290cb2>--color-*</code> tokens at runtime (re-read on scheme flips; the ANSI hues the status ramp doesn't cover use dedicated <code data-v-a3290cb2>--color-term-magenta/cyan</code> tokens); the font is the app JetBrains Mono stack sized off the content token scale. While focused, the panel owns every key except the registered app shortcuts (chat-level Esc / find / select-all chords stay inert inside it).</li><li data-v-a3290cb2>Entries: the chat header's terminal IconButton (right of Open in, lit while the panel is open) — on the empty-composer state, where no chat header renders, the same button floats at the conversation's top-right instead — plus <code data-v-a3290cb2>ctrl+`</code> (⌃` on macOS — VS Code's binding; ⌘` stays free for the OS window switcher — customizable in the shortcut registry), and the View menu's Toggle Terminal item. New tabs spawn in the visible workspace root. Terminal state is per session: switching sessions swaps the visible bucket while the others keep their PTYs and xterm views alive (scrollback survives a round trip; the ten most recent sessions are kept, LRU). The panel never renders on mobile / web.</li></ul><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2><b data-v-a3290cb2>One-sentence principle:</b> the sidebar / shell is a "list + grid" skeleton that reuses the §02 tokens and §03 primitives (Button / IconButton / Badge / Kbd / Menu / Spinner / PanelHeader); compact list controls that don't fit a primitive (search, New chat, inline rename, show-more) keep their custom form, governed by this section. </div></div></section><section id="a11y" data-v-a3290cb2><div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>09</span><h2 class="sec-title" data-v-a3290cb2>Accessibility (pragmatic edition)</h2></div><p class="sec-desc" data-v-a3290cb2> Kimi Web is a local developer tool; it <b data-v-a3290cb2>does not target a specific WCAG conformance level</b>, nor maintain a full screen-reader QA matrix. This section collects only the rules that are "low-cost, don't hurt the look, and directly benefit keyboard-heavy users", as the baseline contract for each primitive; the more expensive, lower-ROI parts (such as real-time announcement orchestration for streaming output) are not mandatory for now. </p><div class="callout info" data-v-a3290cb2><span class="ico" data-v-a3290cb2>i</span><div data-v-a3290cb2><b data-v-a3290cb2>On the "ugly" focus ring:</b> the focus visibility required below always uses <code data-v-a3290cb2>:focus-visible</code> (not <code data-v-a3290cb2>:focus</code>). It appears <b data-v-a3290cb2>only on keyboard focus</b>; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with <code data-v-a3290cb2>--p-focus-ring</code>, not overridden per place. </div></div><h4 class="mini" data-v-a3290cb2>1. Contrast & color</h4><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2>Body text vs. background contrast <b data-v-a3290cb2>≥ 4.5:1</b>; control borders, icons, and key graphics <b data-v-a3290cb2>≥ 3:1</b>. When changing theme colors / dark mode, verify against §05 together.</li><li data-v-a3290cb2><b data-v-a3290cb2>Button text vs. button background</b>, and <b data-v-a3290cb2>form controls</b> (input, placeholder, helper / error text) <b data-v-a3290cb2>vs. their section background</b> must all have contrast ≥ 4.5:1 (large text ≥ 3:1). White-on-white text, a transparent borderless button floating over the page background, and a light placeholder on a near-white background are all flagged by the style rules.</li><li data-v-a3290cb2><b data-v-a3290cb2>State is not conveyed by color alone.</b> Error, selected, and disabled states also carry text, an icon, or a shape change (for example an error state is not just red, but also carries text or an icon).</li></ul><h4 class="mini" data-v-a3290cb2>2. Keyboard operable</h4><p data-v-a3290cb2>Anything doable with a mouse must also be doable with a keyboard; Tab order follows the DOM, with no invented skipping. Composite controls define their keyboard model per the table below; a missing model is treated as incomplete:</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Control</th><th data-v-a3290cb2>Keyboard behavior</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Dialog</td><td data-v-a3290cb2><code data-v-a3290cb2>Tab</code> cycles within the dialog (focus trap); <code data-v-a3290cb2>Esc</code> closes; focus returns to the trigger element after closing.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Menu</td><td data-v-a3290cb2><code data-v-a3290cb2>↑</code> / <code data-v-a3290cb2>↓</code> move the highlight, <code data-v-a3290cb2>Enter</code> selects, <code data-v-a3290cb2>Esc</code> closes.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Tabs</td><td data-v-a3290cb2><code data-v-a3290cb2>←</code> / <code data-v-a3290cb2>→</code> switch tabs (roving tabindex); only the current tab is in the Tab sequence.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Switch / Segmented</td><td data-v-a3290cb2><code data-v-a3290cb2>←</code> / <code data-v-a3290cb2>→</code> or <code data-v-a3290cb2>Space</code> / <code data-v-a3290cb2>Enter</code> to toggle.</td></tr></tbody></table><h4 class="mini" data-v-a3290cb2>3. Focus visibility</h4><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2>Every interactive element must have a visible focus indicator on keyboard focus, uniformly via <code data-v-a3290cb2>:focus-visible</code> + <code data-v-a3290cb2>--p-focus-ring</code> (primary actions may use <code data-v-a3290cb2>--p-focus-ring-strong</code>).</li><li data-v-a3290cb2>Bare <code data-v-a3290cb2>outline: none</code> is forbidden. To remove the default outline, you must provide an equivalent replacement style.</li></ul><h4 class="mini" data-v-a3290cb2>4. Labels & semantics</h4><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2><b data-v-a3290cb2>Semantic HTML first</b> (button / a / input / dialog…); ARIA is added only when native semantics fall short.</li><li data-v-a3290cb2>Icon-only buttons must have an <code data-v-a3290cb2>aria-label</code> — <code data-v-a3290cb2>IconButton</code> already enforces this with a required <code data-v-a3290cb2>label</code> prop.</li><li data-v-a3290cb2>Dialog: <code data-v-a3290cb2>role="dialog"</code> + <code data-v-a3290cb2>aria-modal="true"</code>, with the title as the dialog's accessible name.</li><li data-v-a3290cb2>Purely decorative SVG / icons get <code data-v-a3290cb2>aria-hidden="true"</code> to avoid being read out by screen readers.</li></ul><h4 class="mini" data-v-a3290cb2>5. Target size</h4><p data-v-a3290cb2>Desktop click targets <b data-v-a3290cb2>≥ 32px</b>; touch devices <b data-v-a3290cb2>≥ 44px</b> (consistent with the §01 principle and the IconButton <code data-v-a3290cb2>lg</code> tier).</p><h4 class="mini" data-v-a3290cb2>6. Reduced motion</h4><p data-v-a3290cb2>Handled uniformly in the global styles per §02's <code data-v-a3290cb2>@media (prefers-reduced-motion: reduce)</code>; components do not check this individually. The chat working indicator's mascot renders its static fallback.</p><h4 class="mini" data-v-a3290cb2>7. Live announcements (non-mandatory)</h4><p data-v-a3290cb2>Screen-reader announcements are <b data-v-a3290cb2>not a mandatory contract</b> in this product. Short hints like Toast can use <code data-v-a3290cb2>role="status"</code> / <code data-v-a3290cb2>aria-live</code>; chat streaming output is currently not announced word-by-word, which is an acceptable trade-off, to be added later if a real need arises.</p><div class="callout good" data-v-a3290cb2><span class="ico" data-v-a3290cb2>✓</span><div data-v-a3290cb2><b data-v-a3290cb2>Explicitly not mandatory for now:</b> a WCAG conformance-level claim, a complete ARIA pattern table, a per-screen-reader QA matrix, and real-time announcement orchestration for streaming output — these are not written into the primitive contract, to avoid becoming slogans no one maintains. </div></div></section><section id="dialogs" data-v-a3290cb2><div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>10</span><h2 class="sec-title" data-v-a3290cb2>Dialogs</h2></div><p class="sec-desc" data-v-a3290cb2> Every overlay in the app — pickers, browsers, managers, confirmations — is built on the single §03 Dialog primitive. This chapter fixes the two layout anatomies allowed inside that frame, plus the row and footer contracts that make all dialogs read as one family. Do not hand-roll a third anatomy. </p><h3 class="sub" data-v-a3290cb2>The frame (recap)</h3><p data-v-a3290cb2> All dialogs share the §03 primitive: <code data-v-a3290cb2>--radius-xl</code> radius, <code data-v-a3290cb2>--shadow-xl</code> shadow, a restrained 28% neutral backdrop, a head (title + IconButton close), a body, and a right-aligned foot. Widths <code data-v-a3290cb2>md</code> 440 / <code data-v-a3290cb2>lg</code> 640 / <code data-v-a3290cb2>xl</code> 760 and <code data-v-a3290cb2>auto</code> / <code data-v-a3290cb2>fixed</code> height are chosen per §03. One interruptive overlay at a time; <code data-v-a3290cb2>Esc</code> closes; focus is trapped and restored. A blocking flow that must be resolved rather than dismissed (server token) uses <code data-v-a3290cb2>hideClose</code> with <code data-v-a3290cb2>closeOnOverlay</code>/<code data-v-a3290cb2>closeOnEsc</code> off — never a hand-written overlay. </p><h3 class="sub" data-v-a3290cb2>Anatomy A — padded (forms & confirmations)</h3><p data-v-a3290cb2> The default: the body carries its own padding and the caller drops content straight in. Confirmations put their Buttons in the <code data-v-a3290cb2>#foot</code> slot (right-aligned, cancel → confirm). Used by: confirm, login, status panel, server token. </p><h3 class="sub" data-v-a3290cb2>Anatomy B — flush (pickers & browsers)</h3><p data-v-a3290cb2><code data-v-a3290cb2>:padded="false"</code> with <code data-v-a3290cb2>height="fixed"</code>; the consumer owns the zone layout inside a full-height column. The zones below are the whole vocabulary — a picker dialog composes them and adds nothing else. Used by: model picker, session search, folder browser, provider manager. </p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Zone</th><th data-v-a3290cb2>Contract</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Search</td><td data-v-a3290cb2>The boxed §03 Input, inset 22px so its edge aligns with the head title. Autofocus on open. No leading icon, no borderless variant.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Filter chips</td><td data-v-a3290cb2>Optional. 28px pill: transparent + muted text by default, <code data-v-a3290cb2>--color-hover</code> on hover, <code data-v-a3290cb2>--color-selected</code> + medium <code data-v-a3290cb2>--color-text</code> when active. Horizontally scrollable with the scrollbar hidden. Never a row of Buttons.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>List</td><td data-v-a3290cb2><code data-v-a3290cb2>flex:1</code>, owns the vertical scrolling, padded 4px 8px so rows bleed near the dialog edge. <code data-v-a3290cb2>role="listbox"</code>; rows carry <code data-v-a3290cb2>role="option"</code> + <code data-v-a3290cb2>aria-selected</code>.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Row</td><td data-v-a3290cb2>8px 12px padding, <code data-v-a3290cb2>--radius-md</code>. Two quiet lines: name 14/20 (medium when current) and a meta line 12/18 in <code data-v-a3290cb2>--color-text-faint</code> — provider · context · capability labels, dot-separated. No badge rows, no raw-id line (search still matches them). Trailing slot: check icon (current row only), then the star IconButton.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Row states</td><td data-v-a3290cb2>Hover / keyboard-selected → <code data-v-a3290cb2>--color-hover</code>; current → <code data-v-a3290cb2>--color-selected</code> — a neutral "where I am" fill, never an accent tint, never an inset stroke. The star stays hidden until row hover, keyboard selection, or starred; it is always visible on touch devices and colored <code data-v-a3290cb2>--star</code> when starred.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>State rows</td><td data-v-a3290cb2>Loading / unavailable / empty: centered on both axes, muted 14px; warning color only for the unavailable case.</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Shortcut bar</td><td data-v-a3290cb2>The footer: full-bleed, padding 8px 16px, <code data-v-a3290cb2>border-top --color-line</code>, left-aligned. Keyboard hints are Kbd keycaps + 12px <code data-v-a3290cb2>--color-text-faint</code> labels, groups separated by "·", the whole bar <code data-v-a3290cb2>aria-hidden</code>. An instructional sentence (folder browser) reuses the same bar without keycaps.</td></tr></tbody></table><h4 class="mini" data-v-a3290cb2>Keyboard & behavior contract</h4><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2><code data-v-a3290cb2>↑</code>/<code data-v-a3290cb2>↓</code> move a keyboard selection (rendered identical to hover) and always <code data-v-a3290cb2>scrollIntoView({ block: 'nearest' })</code>; <code data-v-a3290cb2>Enter</code> selects and closes; <code data-v-a3290cb2>Esc</code> closes.</li><li data-v-a3290cb2>Pointer hover drives the same selection index, so keyboard and mouse never disagree about which row is active.</li><li data-v-a3290cb2>Rows transition <code data-v-a3290cb2>background</code> only (<code data-v-a3290cb2>--duration-fast</code> ease-out); the open/close animation lives in the primitive, not in the consumer.</li><li data-v-a3290cb2>Selection is a fill, not a border (surface over stroke). Accent blue is reserved for actions — primary buttons and focus rings — never for "which row am I on".</li></ul><h4 class="mini" data-v-a3290cb2>Dialog map</h4><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Dialog</th><th data-v-a3290cb2>Anatomy</th><th data-v-a3290cb2>Composition</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Model picker</td><td data-v-a3290cb2>flush · lg · fixed</td><td data-v-a3290cb2>search + provider chips + model rows + shortcut bar</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Session search</td><td data-v-a3290cb2>flush · lg · fixed</td><td data-v-a3290cb2>search + result rows (sidebar-style alignment: one icon gutter, shared left text edge, shared right meta edge; workspace rows single-line name + right-aligned path, session rows title + time over a workspace · snippet meta line; quiet uppercase section heads with counts; empty query shows a few top workspaces + recent sessions) + shortcut bar</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Folder browser</td><td data-v-a3290cb2>flush · lg · fixed</td><td data-v-a3290cb2>breadcrumb bar + filter bar + folder rows + actions + hint bar</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Provider manager</td><td data-v-a3290cb2>flush · xl · fixed</td><td data-v-a3290cb2>management rows with inset dividers (rows are not selectable) + add section + shortcut bar</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Confirm / Login / Status</td><td data-v-a3290cb2>padded · md · auto</td><td data-v-a3290cb2>title + message or form + right-aligned foot</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>App update (desktop)</td><td data-v-a3290cb2>padded · lg · auto</td><td data-v-a3290cb2>version title (stays "发现新版本 vX" even while downloading) + quiet meta line (release date · current version) + height-capped scrolling what's-new list + right-aligned action row (skip → download; downloading → background + disabled live-percent button; later → restart) with the auto-download checkbox right-aligned on its own foot row below (a pure preference for future checks)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Server token</td><td data-v-a3290cb2>padded · md · auto</td><td data-v-a3290cb2><code data-v-a3290cb2>hideClose</code>, no Esc/overlay close — resolved only by a valid token</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Settings</td><td data-v-a3290cb2>flush · xl · fixed</td><td data-v-a3290cb2>page-like exception: side-nav region, per §03</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>Onboarding wizard</td><td data-v-a3290cb2>not a Dialog</td><td data-v-a3290cb2>full-page takeover (not built on §03): one centered column (brand lockup → step content → ghost actions + centered primary CTA); selectable options share the option-card pattern — 0.5px <code data-v-a3290cb2>--color-line</code> hairline, <code data-v-a3290cb2>--color-accent</code> border + <code data-v-a3290cb2>--color-accent-soft</code> fill when selected</td></tr></tbody></table><div class="callout good" data-v-a3290cb2><span class="ico" data-v-a3290cb2>✓</span><div data-v-a3290cb2><b data-v-a3290cb2>Design intent:</b> a picker dialog should feel like a quiet command palette — one boxed search, calm rows, a neutral "you are here" fill, and a predictable shortcut bar. Anything noisier — badge clouds, accent-selected rows, per-dialog footer inventions — is a regression to weed out. </div></div></section><section id="session-admin" data-v-a3290cb2><div class="sec-head" data-v-a3290cb2><span class="sec-num" data-v-a3290cb2>11</span><h2 class="sec-title" data-v-a3290cb2>Session Admin Page</h2></div><p class="sec-desc" data-v-a3290cb2> The session admin page (<code data-v-a3290cb2>/admin/sessions</code>, opened from the sidebar's list-management menu) is a full-pane management view for cross-workspace session triage: filters, a server-side paged table, and batch lifecycle actions. It is a main-view peer of the conversation pane (<code data-v-a3290cb2>mainView</code> in the facade, switched with v-show so the chat stays alive) and page-private by decision — everything lives under <code data-v-a3290cb2>components/admin/</code> (<code data-v-a3290cb2>SessionAdminView/Table/Pagination</code>, <code data-v-a3290cb2>FilterSelect</code>, <code data-v-a3290cb2>MultiSelectMenu</code>, <code data-v-a3290cb2>SessionAdminMenu</code>, <code data-v-a3290cb2>useAnchoredMenu</code>); nothing here promotes to §03 until a second consumer exists. Data is one <code data-v-a3290cb2>GET /api/v2/sessions</code> page-mode call per filter/page change (all conditions pushed down, no client-side aggregation); batch archive/restore go through the v2 batch endpoints with per-item outcomes. </p><h3 class="sub" data-v-a3290cb2>Page skeleton — a full-pane admin surface</h3><p data-v-a3290cb2>A 48px title bar (a back IconButton — chevron-left, tooltip 返回, closing the page back to the chat underneath via <code data-v-a3290cb2>closeSessionAdmin</code> — then the page title, semibold base; hairline bottom edge; on macOS desktop it doubles as the window-drag region and takes the chat header's collapsed-sidebar clearance — 146px / 78px / Windows fallback — so ONLY the bar insets, the body never does) → muted subtitle → query-form filter bar → table card → pager. The title bar and the scroll container are siblings (bar fixed, body scrolls). The page wrapper spans the whole conversation column — <b data-v-a3290cb2>do not</b> apply the chat content measure (<code data-v-a3290cb2>--p-content-max</code>) here: under <code data-v-a3290cb2>table-layout: fixed</code> a narrow wrapper crushes the table's flexible columns to zero width (the title/prompt columns collapsed in practice). An admin table surface owns the pane width. The status filter defaults to 全部 (all) — the page is the whole inventory, 重置 restores that same default.</p><div class="callout warn" data-v-a3290cb2><span class="ico" data-v-a3290cb2>!</span><div data-v-a3290cb2><b data-v-a3290cb2>Lesson (content measure):</b> <code data-v-a3290cb2>--p-content-max</code> is a READING measure for prose-like content (chat, dialogs). Full-bleed work surfaces — tables, grids, dashboards — span the pane instead. Pick one deliberately; inheriting the chat measure by default is the bug. </div></div><h3 class="sub" data-v-a3290cb2>Table</h3><p data-v-a3290cb2>The card is the flat shell: 0.5px <code data-v-a3290cb2>--color-line</code> hairline, <code data-v-a3290cb2>--radius-lg</code>, no shadow. Inside, <code data-v-a3290cb2>table-layout: fixed</code> with a <code data-v-a3290cb2>colgroup</code>: fixed-width utility columns (checkbox, workspace, status, the two time columns, actions) and two flexible content columns (title at <code data-v-a3290cb2>max(200px, 20%)</code> — a floor, not a bare percentage — last prompt taking the rest). The head row is a pinned-height 32px box (it hosts the batch transform below); body rows are 40px. Rows are separated by 0.5px <code data-v-a3290cb2>--color-subtle</code> hairlines (none after the last row), with a <code data-v-a3290cb2>--color-hover</code> wash on hover. Every cell truncates single-line with ellipsis and carries a <code data-v-a3290cb2>title</code> tooltip. Time columns are absolute (<code data-v-a3290cb2>YYYY-MM-DD HH:mm</code>) in <code data-v-a3290cb2>--font-mono</code> xs with <code data-v-a3290cb2>tabular-nums</code> — the admin page is an audit view, so no relative times; empty values render a faint <code data-v-a3290cb2>—</code>. The status column sits right after the workspace column and reuses the sidebar row's lifecycle glyphs: <code data-v-a3290cb2>state-open</code> (dashed ring, <code data-v-a3290cb2>--color-success</code>) for 进行中 and <code data-v-a3290cb2>state-done</code> (checked ring, <code data-v-a3290cb2>--color-done</code>) for 已完成, icon + label. First load swaps the body for a centered §03 Spinner; refetches keep the stale rows and dim the card (opacity + <code data-v-a3290cb2>pointer-events: none</code>) rather than flashing it away; filters with no matches render the centered faint empty line.</p><p data-v-a3290cb2><b data-v-a3290cb2>Responsive steps</b> (the card is the query container; web's narrow panes matter too): the time columns give ground FIRST — at ≤1020px their values swap to the compact <code data-v-a3290cb2>MM-DD HH:mm</code> at 108px (each time cell carries both spans, CSS toggles them — no JS measuring); at ≤760px the time columns hide outright (the <code data-v-a3290cb2>col</code> and the cells share <code data-v-a3290cb2>sa-c-time</code>/<code data-v-a3290cb2>sa-col-time</code> classes) and the workspace column drops its folder icon. The table itself floors at 640px and the card takes <code data-v-a3290cb2>overflow-x: auto</code> — past the floor the card scrolls horizontally instead of crushing title/prompt to zero, and auto still clips the rounded corners like hidden did.</p><table class="dt" data-v-a3290cb2><thead data-v-a3290cb2><tr data-v-a3290cb2><th data-v-a3290cb2>Column</th><th data-v-a3290cb2>Width</th><th data-v-a3290cb2>Content</th></tr></thead><tbody data-v-a3290cb2><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>checkbox</td><td class="val" data-v-a3290cb2>36px</td><td data-v-a3290cb2>header select-this-page (indeterminate) + row checkboxes</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>会话名</td><td class="val" data-v-a3290cb2>20%</td><td data-v-a3290cb2>title (emoji verbatim), weight 475, ellipsis; hosts inline rename</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>工作空间</td><td class="val" data-v-a3290cb2>116px</td><td data-v-a3290cb2>folder-closed icon + workspace name (cwd basename fallback)</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>状态</td><td class="val" data-v-a3290cb2>88px</td><td data-v-a3290cb2>state-open/state-done glyph + label</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>最后一条 prompt</td><td class="val" data-v-a3290cb2>flex</td><td data-v-a3290cb2>muted, ellipsis, faint <code data-v-a3290cb2>—</code> when null</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>最后更新 / 完成时间</td><td class="val" data-v-a3290cb2>140px ×2</td><td data-v-a3290cb2>mono tabular-nums absolute time; completed shows <code data-v-a3290cb2>—</code> while open</td></tr><tr data-v-a3290cb2><td class="tk" data-v-a3290cb2>操作</td><td class="val" data-v-a3290cb2>84px</td><td data-v-a3290cb2>lifecycle IconButton (state-done completes an open row, undo reopens a done one; tooltips carry 标记完成/恢复进行中) + ⋯ IconButton dropdown (Rename… / Fork / Export)</td></tr></tbody></table><h3 class="sub" data-v-a3290cb2>Batch header — the zero-offset transform</h3><p data-v-a3290cb2>GitHub issues/PR semantics: while a selection exists, the head row transforms IN PLACE — the checkbox column stays put, and the remaining column headers swap for a single <code data-v-a3290cb2><th colspan></code> batch bar ("已选 n 项" + Mark-as-done / Reopen, each disabled when the selection holds no row of that lifecycle) inside the SAME pinned 32px box, so the table body does not move a pixel. Mark-as-done is the bar's one accent-primary button (fill + on-accent icon/label); Reopen stays a quiet hairline button. The selection itself is facade-owned (a reactive id set plus a per-id lifecycle map, reconciled against fresh rows on every landing) and survives page and filter changes — the batch count deliberately includes rows no longer visible. Successful batch items leave the selection and the current page is silently re-pulled; failures stay selected. There is deliberately no "clear selection" button for ordinary selections: unchecking rows or the header checkbox is the way out. Toasts ride App.vue's shared ActionToast channel (succeeded count, failed count when partial, Undo through the inverse batch endpoint); an all-failed batch has nothing to undo and surfaces as a WarningToast instead.</p><h3 class="sub" data-v-a3290cb2>Select-all-matching — the Gmail move</h3><p data-v-a3290cb2>Page-size caps (≤100) make "mark everything done" hopeless against thousands of rows, so the batch bar borrows Gmail's escalation: once the header checkbox has the whole page selected and <code data-v-a3290cb2>total</code> says more rows exist, a link-style button appears IN the bar (zero-offset — no banner pushing the table down): "选中当前条件下的全部 N 项" (busy-label 正在选中… while fetching). Activating it materializes every matching id into the selection via the ids projection (<code data-v-a3290cb2>GET /api/v2/sessions?fields=id,archived</code> — the one cheap shape whose page_size ceiling relaxes to 10000; cursor-walked for larger sets), merging atomically: a filter change mid-flight discards the fetch entirely. While active the count reads "已选中全部 n 项" and the link becomes 清除选择. Exclusions are free — unchecking a row just drops it from the set; emptying the selection drops the mode, as does a right-click single-row collapse. The mode ties itself to the filter fingerprint it was built from: a real condition change (query-form apply with different values, or any granular setter) clears the whole selection — re-applying the SAME conditions keeps it. Batch executions chunk at the wire's 5000-unique-ids ceiling (sequential, merged per-item outcomes; a thrown chunk aborts the rest and counts everything unexecuted as failed — the succeeded ids still reconcile).</p><h3 class="sub" data-v-a3290cb2>The quiet-button border reset</h3><p data-v-a3290cb2>All quiet icon/text buttons on the page (the batch bar's Reopen, the pager buttons) set <code data-v-a3290cb2>border: none; background: transparent</code> explicitly — or, for the bordered shapes (the filter triggers), an explicit 0.5px hairline. Row actions are pure §03 IconButtons (the sidebar row's language): the lifecycle glyph (<code data-v-a3290cb2>state-done</code> completes an open row, <code data-v-a3290cb2>undo</code> reopens a done one — tooltips carry the labels) plus the ⋯ dropdown; a text button per row read as visual noise once every row carried one.</p><div class="callout warn" data-v-a3290cb2><span class="ico" data-v-a3290cb2>!</span><div data-v-a3290cb2><b data-v-a3290cb2>Lesson (UA borders):</b> the global reset clears button backgrounds only — a bare <code data-v-a3290cb2><button></code> still inherits the UA stylesheet's outset border, which reads as a stray box around every quiet control. Any quiet button outside the §03 primitives must reset both properties. </div></div><h3 class="sub" data-v-a3290cb2>Quiet filter controls (query form)</h3><p data-v-a3290cb2>The filter bar is a <b data-v-a3290cb2>query form</b> (antd Pro semantics): the controls edit a local DRAFT only — nothing is requested until an explicit apply. 查询 (a §03 <code data-v-a3290cb2>Button variant=primary size=sm</code>) applies the whole draft through the facade in one shot (<code data-v-a3290cb2>applySessionAdminFilters</code> — atomic write + page reset + exactly one request, never the per-setter debounce dribble), 重置 (a <code data-v-a3290cb2>ghost</code> sibling) restores defaults the same way, and Enter inside the bar queries too — except while any overlay (a select dropdown) is open, where Enter belongs to the overlay. Pagination is exempt: page/page-size changes still fetch immediately. Entry paths can pre-seed the conditions: the workspace home's 查看更多 opens the page with its workspace already selected in the filter (<code data-v-a3290cb2>openSessionAdmin(workspaceId)</code> applies the filter atomically with the navigation), and because the page is v-show-kept, the draft re-seeds from the applied filters on EVERY entry so the controls always show the true conditions. The controls themselves are muted sm labels plus a family of quiet 30px hairline controls (0.5px <code data-v-a3290cb2>--color-line</code>, <code data-v-a3290cb2>--radius-md</code>, transparent ground, <code data-v-a3290cb2>--color-hover</code> on hover/open) — deliberately NOT the §03 Select (a 32px+ form control with an accent focus ring, too heavy for a filter strip):</p><ul class="clean" data-v-a3290cb2><li data-v-a3290cb2><b data-v-a3290cb2>FilterSelect</b> — quiet single-select (status, updated time, page size): the trigger carries the current label + a faint chevron; the dropdown is the §03 Menu surface with a leading fixed-width check slot and an optional lifecycle dot (<code data-v-a3290cb2>--color-success</code> open / <code data-v-a3290cb2>--color-done</code> done).</li><li data-v-a3290cb2><b data-v-a3290cb2>MultiSelectMenu</b> — workspace multi-select: the trigger shows the selection as removable tags (at most two, then "+N"; empty = the 全部工作空间 placeholder). The anchored panel leads with a search row (case-insensitive name filter, autofocused, reset on close), then a Select-all row, then the option rows — no checkboxes, selected rows take the active highlight. The options area is capped at 320px with its own scroll (in-menu scrolls never close the panel); the panel STAYS OPEN on toggles so several workspaces can be picked in one go (Esc / outside click / outside scroll closes). Empty selection = no filter.</li><li data-v-a3290cb2><b data-v-a3290cb2>Updated-time presets</b> — a FilterSelect of relative windows (全部时间 / 3 天以前 / 7 天以前 / 30 天以前): a pick maps onto the facade's <code data-v-a3290cb2>updatedTo</code> bound as the local calendar day N days back (computed at apply time, so a saved draft never goes stale), and the facade's day-end mapping turns it into <code data-v-a3290cb2>updatedBefore</code>. Deliberately not a calendar range picker — triage asks "older than X", not "between two dates".</li></ul><h3 class="sub" data-v-a3290cb2>Point-anchored context menus</h3><p data-v-a3290cb2><code data-v-a3290cb2>useAnchoredMenu</code> is the page's one menu mechanic: fixed-position §03 Menu surface, pop-from-anchor motion (fade + 0.97 scale on the menu tokens, origin and nudge following the upward flip at the viewport edge), closed by outside mousedown / Esc / scroll / resize. Three anchor modes — left-aligned under a trigger (filter selects), right-edge under a trigger (the row ⋯), and <code data-v-a3290cb2>openAt(x, y)</code> at a raw viewport point for the row contextmenu. The contextmenu has two shapes: on a row outside the multi-selection the selection first collapses to just that row and the menu is the single shape (Open session / Rename… / Fork / Export / — / the lifecycle action); on a row inside it, the multi shape (a muted count head + Mark-as-done (n) / Reopen (n), disabled per availability). Open session is the facade's <code data-v-a3290cb2>selectSession</code> — a user navigation that also leaves the admin page back to chat.</p><h3 class="sub" data-v-a3290cb2>Inline rename</h3><p data-v-a3290cb2>The title cell swaps for an accent-ringed input (<code data-v-a3290cb2>--color-accent</code> border + <code data-v-a3290cb2>--color-accent-bd</code> ring, <code data-v-a3290cb2>--radius-sm</code>) — Enter commits, Esc cancels, blur commits, settled once. The table is server-fed, so a commit is followed by a silent re-pull of the current page (the facade's pool update never reaches it).</p></section>',7))])])])]))}}),Rt=E(Ht,[["__scopeId","data-v-a3290cb2"]]);export{Rt as default}; diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-BxQYZjpo.css b/apps/kimi-code/dist-web/assets/DesignSystemView-BxQYZjpo.css new file mode 100644 index 000000000..6c83daba9 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/DesignSystemView-BxQYZjpo.css @@ -0,0 +1 @@ +.ds-page[data-v-a3290cb2]{--d-bg: var(--color-bg);--d-surface: var(--color-surface);--d-surface-2: var(--color-surface-sunken);--d-surface-3: var(--color-line);--d-fg: var(--color-text);--d-fg-soft: var(--color-text-muted);--d-fg-muted: var(--color-text-muted);--d-fg-faint: var(--color-text-faint);--d-line: var(--color-line);--d-line-2: var(--color-line);--d-accent: var(--color-accent);--d-accent-2: var(--color-accent-hover);--d-accent-soft: var(--color-accent-soft);--d-accent-bd: var(--color-accent-bd);--d-green: var(--color-success);--d-green-soft: var(--color-success-soft);--d-amber: var(--color-warning);--d-amber-soft: var(--color-warning-soft);--d-red: var(--color-danger);--d-red-soft: var(--color-danger-soft);--d-violet: var(--color-done);--d-code-bg: var(--color-surface-sunken);--d-sidebar: var(--color-surface);--d-shadow-sm: var(--shadow-sm);--d-shadow-md: var(--shadow-md);--d-shadow-lg: var(--shadow-lg);--sidebar-w: var(--p-sidebar-w);--content-max: var(--p-content-wide)}.ds-page[data-v-a3290cb2] *,.ds-page[data-v-a3290cb2] *:before,.ds-page[data-v-a3290cb2] *:after{box-sizing:border-box}.ds-page[data-v-a3290cb2]{scroll-behavior:smooth}.ds-page[data-v-a3290cb2]{margin:0;background:var(--d-bg);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}h1[data-v-a3290cb2],h2[data-v-a3290cb2],h3[data-v-a3290cb2],h4[data-v-a3290cb2]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-a3290cb2]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-a3290cb2]{color:var(--d-accent-2);text-decoration:none}a[data-v-a3290cb2]:hover{text-decoration:underline}code[data-v-a3290cb2],pre[data-v-a3290cb2],.mono[data-v-a3290cb2]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-a3290cb2]{background:var(--d-code-bg);border:.5px solid var(--d-line-2);border-radius:5px;padding:1px 6px;font-size:.88em;color:#1f2937;white-space:nowrap}.layout[data-v-a3290cb2]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-a3290cb2]{position:sticky;top:0;align-self:start;height:100vh;background:var(--d-sidebar);border-right:.5px solid var(--d-line);padding:26px 22px;overflow-y:auto}.brand[data-v-a3290cb2]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-a3290cb2]{width:26px;height:26px;border-radius:7px;flex:none;background:var(--d-fg);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;letter-spacing:-.04em}.brand-name[data-v-a3290cb2]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-a3290cb2]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-a3290cb2]{margin:22px 0 8px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--d-fg-faint)}.p-section-label[data-v-a3290cb2]{font-size:12px;font-weight:600;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-a3290cb2]{display:flex;align-items:center;gap:9px;padding:7px 10px;border-radius:7px;font-size:13.5px;font-weight:500;color:var(--d-fg-soft);margin:1px 0;transition:background .15s,color .15s}.nav a .num[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-a3290cb2]:hover{background:var(--color-hover);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-a3290cb2]{background:var(--color-hover);color:var(--d-fg)}.nav a.active .num[data-v-a3290cb2]{color:var(--d-fg-soft)}.content[data-v-a3290cb2]{min-width:0}.content-inner[data-v-a3290cb2]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-a3290cb2]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-a3290cb2]{margin-top:72px}.hero[data-v-a3290cb2]{padding:8px 0 40px;border-bottom:.5px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:8px;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--d-fg);background:#1783ff1a;border:none;padding:6px 12px;border-radius:8px;margin-bottom:22px}.hero h1[data-v-a3290cb2]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-a3290cb2]{color:var(--d-accent)}.hero p.lead[data-v-a3290cb2]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-a3290cb2]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--d-fg-muted);background:var(--d-surface);border:.5px solid var(--d-line);border-radius:8px;padding:7px 12px}.meta-chip b[data-v-a3290cb2]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-a3290cb2]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-a3290cb2]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-a3290cb2]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-a3290cb2]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-a3290cb2]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-a3290cb2]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-a3290cb2]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-a3290cb2]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-a3290cb2]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-a3290cb2]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-a3290cb2]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-a3290cb2]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-a3290cb2]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-a3290cb2]{color:var(--d-amber)}.stat.bad[data-v-a3290cb2]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-a3290cb2]{color:var(--d-red)}.stat.good[data-v-a3290cb2]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-a3290cb2]{color:var(--d-green)}.panel[data-v-a3290cb2]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-a3290cb2]{padding:22px}.panel-soft[data-v-a3290cb2]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px}.callout[data-v-a3290cb2]{display:flex;gap:12px;padding:14px 16px;border-radius:12px;font-size:14px;line-height:1.55;background:var(--d-surface);border:.5px solid var(--d-line);color:var(--d-fg-soft);margin:18px 0}.callout .ico[data-v-a3290cb2]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-a3290cb2]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-a3290cb2]{background:var(--d-accent);color:#fff}.callout.warn[data-v-a3290cb2]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-a3290cb2]{background:var(--d-amber);color:#fff}.callout.good[data-v-a3290cb2]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-a3290cb2]{background:var(--d-green);color:#fff}table.dt[data-v-a3290cb2]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-a3290cb2]{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--d-fg-faint);font-weight:700;padding:10px 12px;border-bottom:.5px solid var(--d-line)}table.dt td[data-v-a3290cb2]{padding:11px 12px;border-bottom:.5px solid var(--d-line-2);color:var(--d-fg-soft);vertical-align:middle}table.dt tr:last-child td[data-v-a3290cb2]{border-bottom:none}table.dt td.tk[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-a3290cb2]{display:inline-block;width:16px;height:16px;border-radius:4px;border:.5px solid rgba(0,0,0,.08);vertical-align:-3px;margin-right:8px}.palette[data-v-a3290cb2]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-a3290cb2]{border:.5px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-a3290cb2]{height:56px;border-bottom:.5px solid var(--d-line)}.color-meta[data-v-a3290cb2]{padding:10px 12px 12px}.color-meta .cn[data-v-a3290cb2]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-a3290cb2]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:.5px solid var(--d-line-2)}.type-row[data-v-a3290cb2]:last-child{border-bottom:none}.type-sample[data-v-a3290cb2]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-a3290cb2]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-a3290cb2]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:.5px solid var(--d-line-2)}.space-row[data-v-a3290cb2]:last-child{border-bottom:none}.space-bar[data-v-a3290cb2]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-a3290cb2]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-a3290cb2]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-a3290cb2]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-a3290cb2]{width:64px;height:64px;border:.5px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-a3290cb2]{border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;background:var(--d-bg);box-shadow:var(--d-shadow-sm)}.stage-bar[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:.5px solid var(--d-line);background:var(--d-surface)}.stage-bar .st[data-v-a3290cb2]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-a3290cb2]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-a3290cb2]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-a3290cb2]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-a3290cb2]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-a3290cb2]{display:flex;gap:6px}.tab[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:11.5px;padding:4px 10px;border-radius:6px;color:var(--d-fg-muted);cursor:default}.tab.on[data-v-a3290cb2]{background:var(--d-bg);color:var(--d-fg);border:.5px solid var(--d-line)}.stage[data-v-a3290cb2]{padding:32px;display:flex;flex-wrap:wrap;align-items:center;gap:16px;background:radial-gradient(circle at 1px 1px,rgba(0,0,0,.045) 1px,transparent 0) 0 0 / 18px 18px,var(--d-surface)}.stage.col[data-v-a3290cb2]{flex-direction:column;align-items:stretch}.stage.dark[data-v-a3290cb2]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#0d1117}.stage-label[data-v-a3290cb2]{width:100%;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--d-fg-faint);margin-bottom:-6px}.stage.dark .stage-label[data-v-a3290cb2]{color:#6b7280}.ba[data-v-a3290cb2]{display:grid;grid-template-columns:1fr 1fr;gap:0;border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;box-shadow:var(--d-shadow-sm)}.ba-col[data-v-a3290cb2]{min-width:0}.ba-col+.ba-col[data-v-a3290cb2]{border-left:.5px solid var(--d-line)}.ba-head[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:.5px solid var(--d-line)}.ba-head.before[data-v-a3290cb2]{background:var(--d-red-soft)}.ba-head.after[data-v-a3290cb2]{background:var(--d-green-soft)}.ba-head .bh[data-v-a3290cb2]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-a3290cb2]{color:var(--d-red)}.ba-head.after .bh[data-v-a3290cb2]{color:var(--d-green)}.ba-head .bh small[data-v-a3290cb2]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-a3290cb2]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-a3290cb2]{background:#fff}.code[data-v-a3290cb2]{background:#0d1117;border-radius:12px;overflow:hidden;margin:16px 0;border:.5px solid #1c2128}.code-bar[data-v-a3290cb2]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#13181e;border-bottom:.5px solid #1c2128}.code-bar .d[data-v-a3290cb2]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-a3290cb2]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-a3290cb2]{color:#8b949e}.code .k[data-v-a3290cb2]{color:#ff7b72}.code .s[data-v-a3290cb2]{color:#a5d6ff}.code .p[data-v-a3290cb2]{color:#79c0ff}.code .n[data-v-a3290cb2]{color:#d2a8ff}.code .v[data-v-a3290cb2]{color:#ffa657}.pill[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;border:.5px solid var(--d-line);background:var(--d-surface);color:var(--d-fg-soft)}.pill.blue[data-v-a3290cb2]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-a3290cb2]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-a3290cb2]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-a3290cb2]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-a3290cb2]{font-family:JetBrains Mono,monospace}ul.clean[data-v-a3290cb2]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-a3290cb2]{position:relative;padding:8px 0 8px 26px;color:var(--d-fg-soft);border-bottom:.5px solid var(--d-line-2)}ul.clean li[data-v-a3290cb2]:last-child{border-bottom:none}ul.clean li[data-v-a3290cb2]:before{content:"";position:absolute;left:4px;top:17px;width:7px;height:7px;border-radius:50%;background:var(--d-accent)}ul.clean.check li[data-v-a3290cb2]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-a3290cb2]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-a3290cb2]{color:var(--d-fg)}ul.clean li .path[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-a3290cb2]{position:relative;margin:24px 0}.phase[data-v-a3290cb2]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-a3290cb2]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-a3290cb2]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-a3290cb2]{display:inline-block;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:700;color:var(--d-accent-2);background:var(--d-accent-soft);border:.5px solid var(--d-accent-bd);padding:5px 10px;border-radius:8px}.phase-tag .pe[data-v-a3290cb2]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-a3290cb2]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:14px;padding:18px 20px;box-shadow:var(--d-shadow-sm)}.phase-body h4[data-v-a3290cb2]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-a3290cb2]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-a3290cb2]{margin:0}.matrix[data-v-a3290cb2]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-a3290cb2]{border:.5px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-a3290cb2]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-a3290cb2]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-a3290cb2]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-a3290cb2]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-a3290cb2]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-a3290cb2]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-a3290cb2]{margin-top:80px;padding-top:28px;border-top:.5px solid var(--d-line);font-size:13px;color:var(--d-fg-faint);display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}.kbd[data-v-a3290cb2]{font-family:JetBrains Mono,monospace;font-size:11px;background:var(--d-surface-2);border:.5px solid var(--d-line);border-radius:5px;padding:1px 6px}@media(max-width:980px){.layout[data-v-a3290cb2]{grid-template-columns:1fr}.sidebar[data-v-a3290cb2]{position:static;height:auto}.nav[data-v-a3290cb2]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-a3290cb2]{padding:40px 22px 80px}.stat-grid[data-v-a3290cb2]{grid-template-columns:repeat(2,1fr)}.ba[data-v-a3290cb2]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-a3290cb2]{border-left:none;border-top:.5px solid var(--d-line)}.palette[data-v-a3290cb2]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-a3290cb2]{grid-template-columns:1fr}}.ds-page .p[data-v-a3290cb2],.ds-page .stage.p-skin[data-v-a3290cb2],.ds-page [data-p][data-v-a3290cb2]{--p-font-sans: var(--font-ui);--p-font-kbd: var(--font-kbd);--p-font-mono: var(--font-mono);--p-bg: var(--color-bg);--p-surface: var(--color-surface);--p-surface-raised: var(--color-surface-raised);--p-surface-overlay: var(--color-surface-overlay);--p-surface-sunken: var(--color-surface-sunken);--p-well: var(--color-well);--p-surface-deep: var(--color-surface-deep);--p-hover: var(--color-hover);--p-text: var(--color-text);--p-text-strong: var(--color-text-strong);--p-muted: var(--muted);--p-text-muted: var(--color-text-muted);--p-text-faint: var(--color-text-faint);--p-text-on-accent: var(--color-text-on-accent);--p-line: var(--color-line);--p-line-strong: var(--color-line-strong);--p-accent: var(--color-accent);--p-accent-hover: var(--color-accent-hover);--p-accent-soft: var(--color-accent-soft);--p-user-bubble-bg: var(--color-user-bubble-bg);--p-accent-bd: var(--color-accent-bd);--p-success: var(--color-success);--p-success-soft: var(--color-success-soft);--p-success-bd: var(--color-success-bd);--p-warning: var(--color-warning);--p-warning-soft: var(--color-warning-soft);--p-warning-bd: var(--color-warning-bd);--p-danger: var(--color-danger);--p-danger-soft: var(--color-danger-soft);--p-danger-bd: var(--color-danger-bd);--p-info: var(--color-info);--p-sp-1: var(--space-1);--p-sp-2: var(--space-2);--p-sp-3: var(--space-3);--p-sp-4: var(--space-4);--p-sp-5: var(--space-5);--p-sp-6: var(--space-6);--p-sp-8: var(--space-8);--p-r-xs: var(--radius-xs);--p-r-sm: var(--radius-sm);--p-r-md: var(--radius-md);--p-r-lg: var(--radius-lg);--p-r-xl: var(--radius-xl);--p-r-composer: var(--radius-composer);--p-r-full: var(--radius-full);--p-corner-composer: var(--corner-shape-composer);--p-sh-xs: var(--shadow-xs);--p-sh-sm: var(--shadow-sm);--p-sh-menu: var(--shadow-menu);--p-sh-md: var(--shadow-md);--p-sh-input: var(--shadow-input);--p-sh-lg: var(--shadow-lg);--p-sh-xl: var(--shadow-xl);--p-font-size-xs: var(--text-xs);--p-font-size-sm: var(--text-sm);--p-font-size-base: var(--text-base);--p-font-size-md: var(--text-base);--p-font-size-lg: var(--text-lg);--p-font-size-xl: var(--text-xl);--p-font-size-2xl: var(--text-2xl);--p-leading-tight: var(--leading-tight);--p-leading-normal: var(--leading-normal);--p-leading-relaxed: var(--leading-relaxed);--p-ease: var(--ease-out);--p-ease-inout: var(--ease-in-out);--p-dur-fast: var(--duration-fast);--p-dur: var(--duration-base);--p-dur-slow: var(--duration-slow);--p-composer-focus-line: var(--color-composer-focus-line);font-family:var(--font-ui);color:var(--color-text);font-size:var(--text-base)}[data-p=dark][data-v-a3290cb2]{--p-bg: #0d1117;--p-surface: #13181e;--p-surface-raised: #1c2128;--p-surface-sunken: #0d1117;--p-well: #13181e;--p-surface-deep: #0a0d12;--p-surface-overlay: #22272e;--p-hover: #ffffff0d;--p-text: #e8eaed;--p-text-strong: #ffffff;--p-muted: #727983;--p-text-muted: #9aa0a8;--p-text-faint: #6b7280;--p-line: #2d333b;--p-line-strong: #3d444d;--p-accent: #58a6ff;--p-accent-hover: #79b8ff;--p-accent-soft: rgba(88,166,255,.14);--p-accent-bd: rgba(88,166,255,.28);--p-success: #3fb950;--p-success-soft: rgba(63,185,80,.14);--p-success-bd: rgba(63,185,80,.28);--p-warning: #d29922;--p-warning-soft: rgba(210,153,34,.14);--p-warning-bd: rgba(210,153,34,.28);--p-danger: #f85149;--p-danger-soft: rgba(248,81,73,.14);--p-danger-bd: rgba(248,81,73,.28);--p-sh-sm: 0 1px 2px rgba(0,0,0,.4);--p-sh-md: 0 4px 12px rgba(0,0,0,.45);--p-sh-lg: 0 12px 32px rgba(0,0,0,.55);--p-sh-input: var(--shadow-input);--p-selection: rgba(88,166,255,.32)}.p-ic[data-v-a3290cb2]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-a3290cb2]{--_h: 36px;--_px: 16px;--_fs: var(--p-font-size-base);--_r: var(--p-r-md);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--_h);padding:0 var(--_px);border-radius:var(--_r);font-family:var(--p-font-sans);font-size:var(--_fs);font-weight:600;line-height:1;border:.5px solid transparent;cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease),transform var(--p-dur-fast) var(--p-ease)}.p-btn[data-v-a3290cb2]:active{transform:scale(.98)}.p-btn[data-v-a3290cb2]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft),0 0 0 1px var(--p-accent)}.p-btn .p-ic[data-v-a3290cb2]{width:16px;height:16px}.p-btn.sm[data-v-a3290cb2]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-a3290cb2]{width:14px;height:14px}.p-btn.lg[data-v-a3290cb2]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-a3290cb2]{background:var(--p-accent);color:var(--p-text-on-accent);border-color:var(--p-accent);box-shadow:var(--p-sh-xs)}.p-btn.primary[data-v-a3290cb2]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-a3290cb2]{background:var(--p-surface-raised);color:var(--p-text);border-color:var(--p-line-strong);box-shadow:var(--p-sh-xs)}.p-btn.secondary[data-v-a3290cb2]:hover{background:var(--p-hover);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-a3290cb2]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-a3290cb2]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-btn.danger[data-v-a3290cb2]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-a3290cb2]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-a3290cb2]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-a3290cb2]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-a3290cb2],.p-btn.disabled[data-v-a3290cb2]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-a3290cb2]{--_s: 32px;display:inline-grid;place-items:center;width:var(--_s);height:var(--_s);flex:none;border-radius:var(--p-r-md);border:.5px solid transparent;background:transparent;color:var(--p-text-muted);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-icon-btn[data-v-a3290cb2]:hover{background:var(--p-hover);color:var(--p-text)}.p-icon-btn[data-v-a3290cb2]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-a3290cb2]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-a3290cb2]{--_s: 44px}.p-icon-btn .p-ic[data-v-a3290cb2]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-a3290cb2]{width:20px;height:20px}.p-badge[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:var(--p-r-full);font-family:var(--p-font-sans);font-size:var(--p-font-size-xs);font-weight:600;line-height:1;border:.5px solid var(--p-line);background:var(--p-surface);color:var(--p-text);white-space:nowrap}.p-badge.sm[data-v-a3290cb2]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-a3290cb2]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-a3290cb2]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-a3290cb2]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-a3290cb2]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-a3290cb2]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-a3290cb2]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-a3290cb2]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-a3290cb2]{width:12px;height:12px}.p-kbd[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-a3290cb2]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:.5px solid var(--p-line);border-radius:var(--p-r-xs);background:transparent;color:inherit;font-family:var(--p-font-kbd);font-size:11px;line-height:1}.p-pill[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 12px;border-radius:var(--p-r-full);border:.5px solid transparent;background:transparent;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-pill[data-v-a3290cb2]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-pill .pp-strong[data-v-a3290cb2]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-a3290cb2]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-a3290cb2]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-a3290cb2]{background:var(--p-surface);border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;color:var(--p-text)}.p-card.interactive[data-v-a3290cb2]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-a3290cb2]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-a3290cb2]{display:flex;align-items:center;gap:9px;padding:10px 14px;border-bottom:.5px solid var(--p-line);background:var(--p-surface)}.p-card-title[data-v-a3290cb2]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text);font-family:var(--p-font-mono)}.p-card-body[data-v-a3290cb2]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-a3290cb2]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:.5px solid var(--p-line);background:var(--p-surface)}.p-field[data-v-a3290cb2]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-a3290cb2]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-a3290cb2],.p-select[data-v-a3290cb2],.p-textarea[data-v-a3290cb2]{width:100%;height:38px;padding:0 12px;border-radius:var(--p-r-md);border:.5px solid var(--p-line-strong);background:var(--p-surface-raised);font-family:var(--p-font-sans);font-size:var(--p-font-size-base);color:var(--p-text);box-shadow:var(--p-sh-xs);transition:border-color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-textarea[data-v-a3290cb2]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-select[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;text-align:left}.p-select[data-v-a3290cb2]:after{content:"⌄";color:var(--p-text-muted)}.p-input[data-v-a3290cb2]:hover,.p-select[data-v-a3290cb2]:hover,.p-textarea[data-v-a3290cb2]:hover{border-color:var(--p-line-strong)}.p-input[data-v-a3290cb2]:focus,.p-select[data-v-a3290cb2]:focus,.p-textarea[data-v-a3290cb2]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-a3290cb2]::placeholder,.p-textarea[data-v-a3290cb2]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-a3290cb2]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-a3290cb2]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-a3290cb2]{width:480px;max-width:calc(100vw - 48px);background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl);box-shadow:var(--p-sh-xl);overflow:hidden;color:var(--p-text)}.p-dialog-head[data-v-a3290cb2]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-a3290cb2]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-a3290cb2]{font-size:var(--p-font-size-base);color:var(--p-text-muted);margin-top:4px;line-height:var(--p-leading-normal)}.p-dialog-body[data-v-a3290cb2]{padding:4px 22px 18px}.p-dialog-foot[data-v-a3290cb2]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-a3290cb2]{display:flex;align-items:flex-start;gap:11px;width:360px;padding:13px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-md)}.p-toast .ti[data-v-a3290cb2]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-a3290cb2]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-a3290cb2]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-a3290cb2]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-a3290cb2]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-action-toast[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:8px;align-self:center;padding:4px 6px 4px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);font-size:var(--p-font-size-base);color:var(--p-text);white-space:nowrap}.p-action-toast .lk[data-v-a3290cb2]{border:0;padding:0;background:none;color:var(--p-accent);cursor:pointer;font:inherit}.p-action-toast .x[data-v-a3290cb2]{color:var(--p-text-muted);width:14px;height:14px}.p-spinner[data-v-a3290cb2]{width:18px;height:18px;animation:p-spin-a3290cb2 .85s linear infinite}.p-spinner.sm[data-v-a3290cb2]{width:14px;height:14px}.p-spinner circle[data-v-a3290cb2]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-a3290cb2]{stroke:var(--p-line)}.p-spinner .arc[data-v-a3290cb2]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-a3290cb2{to{transform:rotate(360deg)}}.p-thinking[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:9px;font-size:var(--p-font-size-sm);color:var(--p-text-muted);font-family:var(--p-font-sans)}.p-bubble-user[data-v-a3290cb2]{align-self:flex-end;max-width:78%;background:var(--p-user-bubble-bg);border:none;color:var(--p-text);border-radius:var(--p-r-lg);padding:10px 12px;font-size:var(--p-font-size-md);line-height:var(--p-leading-normal)}.p-msg[data-v-a3290cb2]{max-width:760px;font-size:var(--p-font-size-md);line-height:var(--p-leading-relaxed);color:var(--p-text)}.p-msg p[data-v-a3290cb2]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-a3290cb2]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);border:0;color:var(--p-accent-hover);padding:1px 6px;border-radius:5px;font-size:.9em}.p-code[data-v-a3290cb2]{font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:11px 13px;color:var(--p-text);overflow-x:auto}.p-action[data-v-a3290cb2]{border-radius:var(--p-r-lg);overflow:hidden;border:.5px solid var(--p-line);background:var(--p-surface-raised);box-shadow:var(--p-sh-menu)}.p-action-head[data-v-a3290cb2]{display:flex;align-items:center;gap:9px;padding:14px 16px 0}.p-action-title[data-v-a3290cb2]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-action-body[data-v-a3290cb2]{padding:12px 16px 0;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-action-foot[data-v-a3290cb2]{display:flex;gap:8px;margin-top:12px;padding:10px 16px;border-top:.5px solid var(--p-line)}.p-opts[data-v-a3290cb2]{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:12px 16px;border-top:.5px solid var(--p-line)}.p-opt[data-v-a3290cb2]{display:flex;align-items:flex-start;gap:10px;padding:8px 12px;border-radius:var(--p-r-md);color:var(--p-text);font-size:var(--p-font-size-base)}.p-opt .n[data-v-a3290cb2]{width:var(--p-chip-num);height:var(--p-chip-num);margin-top:calc((var(--p-font-size-base) * var(--p-leading-normal) - var(--p-chip-num)) / 2);border-radius:var(--p-r-sm);background:var(--p-surface-sunken);color:var(--p-text);font-size:var(--p-font-size-xs);font-weight:500;display:inline-flex;align-items:center;justify-content:center;flex:none}.p-opt-text[data-v-a3290cb2]{display:flex;flex-direction:column;gap:2px;min-width:0}.p-opt-text .l[data-v-a3290cb2]{font-weight:500}.p-opt-text .d[data-v-a3290cb2]{font-size:var(--p-font-size-xs);color:var(--p-text-muted);line-height:var(--p-leading-normal)}.p-todo[data-v-a3290cb2]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-a3290cb2]{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--p-r-md);font-size:var(--p-font-size-base);color:var(--p-text)}.p-todo-row.done[data-v-a3290cb2]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-a3290cb2]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-a3290cb2]{width:16px;flex:none;display:inline-flex;align-items:center;justify-content:center;user-select:none;color:var(--p-text-faint)}.p-todo-check svg[data-v-a3290cb2]{width:14px;height:14px}.p-todo-row.active .p-todo-check[data-v-a3290cb2]{color:var(--p-accent)}.p-todo-row.done .p-todo-check[data-v-a3290cb2]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-a3290cb2]{color:var(--p-accent);font-weight:500}.p-dot[data-v-a3290cb2]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-a3290cb2]{background:var(--p-success)}.p-dot.error[data-v-a3290cb2]{background:var(--p-danger)}.p-dot.running[data-v-a3290cb2]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-a3290cb2 1.4s ease-out infinite}@keyframes p-pulse-a3290cb2{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-a3290cb2]{overflow:hidden}.p-tool-group-head[data-v-a3290cb2]{display:flex;align-items:center;gap:4px;padding:4px 0;cursor:pointer;border-radius:6px;font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text-faint);user-select:none;transition:color var(--p-dur) var(--p-ease)}.p-tool-group-head .tg-ic[data-v-a3290cb2]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-group-head[data-v-a3290cb2]:hover{color:var(--p-text)}.p-tool-group-head .tg-title[data-v-a3290cb2]{font-weight:500}.p-tool-group-head .tg-meta[data-v-a3290cb2]{color:var(--p-text-faint);font-weight:400}.p-tool-group-head .tg-car[data-v-a3290cb2]{width:14px;height:14px;color:var(--p-text-faint);transition:transform var(--p-dur) var(--p-ease)}.p-tool-group.open .p-tool-group-head .tg-car[data-v-a3290cb2]{transform:rotate(90deg)}.p-tool-row[data-v-a3290cb2]{position:relative;display:flex;align-items:center;gap:4px;padding:4px 0;border-radius:6px;cursor:pointer;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text)}.p-tool-row .tr-ic[data-v-a3290cb2]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-a3290cb2]{font-weight:400;color:var(--p-text-muted);flex:none}.p-tool-row .tr-file[data-v-a3290cb2]{font-weight:400;color:var(--p-text);flex:none}.p-tool-row .tr-file[data-v-a3290cb2]:hover{color:var(--p-accent);text-decoration:underline;text-underline-offset:3px}.p-tool-row .tr-mono[data-v-a3290cb2]{font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);line-height:normal;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--p-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-faint[data-v-a3290cb2]{color:var(--p-text-faint);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-chip[data-v-a3290cb2]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add[data-v-a3290cb2]{margin-left:auto;color:var(--p-success);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add~.tr-chip[data-v-a3290cb2],.p-tool-row .tr-add~.tr-add[data-v-a3290cb2]{margin-left:0}.p-tool-row .tr-del[data-v-a3290cb2]{color:var(--p-danger);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-bar[data-v-a3290cb2]{display:inline-flex;width:36px;height:3px;border-radius:999px;overflow:hidden;gap:1px;flex:none}.p-tool-row .tr-ok[data-v-a3290cb2]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-a3290cb2]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-agent-card[data-v-a3290cb2]{display:flex;align-items:center;gap:8px;align-self:stretch;padding:8px 12px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);cursor:pointer}.p-agent-card .pa-ic[data-v-a3290cb2]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:var(--p-surface-sunken);color:var(--p-text-muted);flex:none}.p-agent-card .pa-ic svg[data-v-a3290cb2]{width:14px;height:14px}.p-agent-card .pa-main[data-v-a3290cb2]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-agent-card .pa-task[data-v-a3290cb2]{font-size:var(--p-font-size-sm);line-height:1.4;color:var(--p-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-type[data-v-a3290cb2]{font-size:var(--p-font-size-xs);line-height:1.4;color:var(--p-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-ok[data-v-a3290cb2]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-agent-card .pa-go[data-v-a3290cb2]{color:var(--p-text-faint);flex:none}.p-tool-row.expanded .tr-car[data-v-a3290cb2]{transform:rotate(90deg)}.p-tool-detail[data-v-a3290cb2]{padding:2px 8px 4px 0}.p-tool-detail .p-code[data-v-a3290cb2]{margin-top:4px}.p-composer[data-v-a3290cb2]{background:var(--p-surface-raised);border:.5px solid var(--p-line-strong);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);box-shadow:var(--p-sh-input);overflow:hidden;position:relative;z-index:1}.p-composer[data-v-a3290cb2]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--p-composer-focus-line);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);opacity:0;pointer-events:none;transition:opacity var(--p-dur-slow) var(--p-ease-inout)}.p-composer[data-v-a3290cb2]:focus-within:after{opacity:1}.p-composer-ta[data-v-a3290cb2]{padding:14px 16px 8px;font-family:var(--p-font-sans);font-size:var(--p-font-size-md);color:var(--p-text);line-height:var(--p-leading-normal);text-autospace:normal}.p-composer-ta.ph[data-v-a3290cb2]{color:var(--p-text-faint)}.p-composer-bar[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px 8px}.p-composer-strip[data-v-a3290cb2]{width:100%;max-width:620px;margin-top:calc(-1 * var(--space-4));display:flex;align-items:center;gap:var(--space-2);padding:calc(var(--space-4) + var(--space-2)) var(--space-2) var(--space-2);background:color-mix(in srgb,var(--color-hover) 60%,transparent);border-radius:0 0 var(--radius-2xl) var(--radius-2xl);font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);color:var(--p-text-faint);cursor:pointer}.p-composer-strip .p-ic[data-v-a3290cb2]{width:16px;height:16px;color:var(--p-text-faint)}.p-composer-left[data-v-a3290cb2],.p-composer-right[data-v-a3290cb2]{display:flex;align-items:center;gap:4px}.p-composer .p-icon-btn[data-v-a3290cb2]{border-radius:var(--p-r-full)}.p-send[data-v-a3290cb2]{position:relative;width:32px;height:32px;border-radius:var(--p-r-full);display:grid;place-items:center;background:var(--p-text);color:var(--p-bg);border:none;cursor:pointer;box-shadow:var(--p-sh-xs);transition:transform var(--p-dur-fast) var(--p-ease)}.p-send[data-v-a3290cb2]:after{content:"";position:absolute;inset:0;border-radius:var(--p-r-full);background:var(--p-bg);opacity:0;transition:opacity var(--p-dur-slow) var(--p-ease);pointer-events:none}.p-send[data-v-a3290cb2]:hover:after{opacity:.28}.p-send[data-v-a3290cb2]:active{transform:scale(.92)}.p-send .p-ic[data-v-a3290cb2]{width:16px;height:16px}.dw-bar[data-v-a3290cb2]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5)}.am-mock[data-v-a3290cb2]{display:flex;flex-direction:column;gap:var(--menu-rows-seam);width:100%;max-width:420px;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--p-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--p-sh-menu);font-family:var(--font-ui)}.am-mock-row[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border-radius:var(--radius-menu-row);color:var(--p-text);font-size:var(--p-font-size-base)}.am-mock-row.focus[data-v-a3290cb2]{background:var(--color-selected)}.am-mock-row .n[data-v-a3290cb2]{font-weight:var(--weight-medium)}.am-mock-row .d[data-v-a3290cb2]{margin-left:var(--space-1);color:var(--p-text-muted);font-size:var(--text-sm)}.dw-pill[data-v-a3290cb2]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1-5);padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-normal)}.dw-pill[data-v-a3290cb2] svg{width:1.5em;height:1.5em}.dw-pill.on[data-v-a3290cb2]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);pointer-events:none}.dw-pill .dw-count[data-v-a3290cb2]{color:var(--p-text-muted)}.dw-pill .dw-running[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted)}.dw-pill .dw-live[data-v-a3290cb2]{color:var(--p-success);font-weight:var(--weight-medium)}.dw-panel[data-v-a3290cb2]{width:100%;border:.5px solid var(--p-line);border-radius:var(--radius-2xl);background:color-mix(in srgb,var(--p-bg) 70%,transparent);box-shadow:var(--p-sh-menu);overflow:hidden}.dw-head[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-4) var(--space-4) 0}.dw-tab[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:var(--space-2);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-tab[data-v-a3290cb2] svg{width:1.5em;height:1.5em}.dw-tab .dw-meta[data-v-a3290cb2]{color:var(--p-text-muted)}.dw-chips[data-v-a3290cb2]{margin-left:auto;display:inline-flex;gap:var(--space-05);padding:var(--space-05);background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md)}.dw-chip[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--p-sp-3);border-radius:var(--p-r-sm);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-chip.on[data-v-a3290cb2]{color:var(--p-text);background:var(--p-surface-raised);box-shadow:var(--p-sh-sm)}.dw-body[data-v-a3290cb2]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dw-body.col[data-v-a3290cb2]{display:flex;flex-direction:column}.dw-row[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) 0;color:var(--p-text);font-size:var(--p-font-size-base)}.dw-row .nm[data-v-a3290cb2]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-row .tm[data-v-a3290cb2]{flex:none;color:var(--p-text-muted);font-variant-numeric:tabular-nums}.dw-row .ok[data-v-a3290cb2]{color:var(--p-success);transform:scale(.91)}.dw-row.fail .nm[data-v-a3290cb2],.dw-row.fail[data-v-a3290cb2] svg{color:var(--p-danger)}.dw-row.cancelled[data-v-a3290cb2] svg{color:var(--p-text-muted)}.dw-body.grid[data-v-a3290cb2]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.dw-card[data-v-a3290cb2]{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.dw-card .ct[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--space-2)}.dw-card .nm[data-v-a3290cb2]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium)}.dw-card .nu[data-v-a3290cb2]{flex:none;color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-variant-numeric:tabular-nums}.dw-card .ds[data-v-a3290cb2]{color:var(--p-text-muted);font-size:var(--p-font-size-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.dw-card .cs[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cf[data-v-a3290cb2]{display:flex;flex-direction:column;gap:var(--space-1)}.dw-card .cm[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cm span[data-v-a3290cb2]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-card .cs .sl[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:var(--space-1)}.dw-card .cs .sl .ok[data-v-a3290cb2]{color:var(--p-success);transform:scale(.91)}.dw-card .cs .tm[data-v-a3290cb2]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);font-variant-numeric:tabular-nums}.dw-card.fail .cs .sl[data-v-a3290cb2]{color:var(--p-danger)}.dw-ring[data-v-a3290cb2]{display:inline-block;width:var(--p-ic-md);height:var(--p-ic-md);border:1.5px solid var(--p-line-strong);border-radius:var(--radius-full);vertical-align:middle}.dw-spin[data-v-a3290cb2]{display:inline-flex;color:var(--p-text);vertical-align:middle}.dt td .kw-dot[data-v-a3290cb2],.dt td[data-v-a3290cb2] svg{vertical-align:middle}.p[data-v-a3290cb2] ::selection,[data-p][data-v-a3290cb2] ::selection{background:var(--p-selection)}.p-link[data-v-a3290cb2]{color:var(--p-accent);text-decoration:none;font-family:var(--p-font-sans);transition:color var(--p-dur) var(--p-ease)}.p-link[data-v-a3290cb2]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-a3290cb2]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-a3290cb2]{color:var(--p-text-muted)}.p-link.muted[data-v-a3290cb2]:hover{color:var(--p-text)}.p-link .p-ic[data-v-a3290cb2]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-a3290cb2]{background:var(--color-menu-bg);border:.5px solid var(--p-line);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);padding:3.5px;min-width:180px;font-family:var(--p-font-sans);color:var(--p-text)}.p-menu-item[data-v-a3290cb2]{display:flex;align-items:center;gap:7px;padding:5px 9px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-menu-item[data-v-a3290cb2]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-menu-item.active[data-v-a3290cb2],.p-menu-item.active[data-v-a3290cb2]:hover{background:var(--p-hover);color:var(--p-text)}.p-menu-item.danger[data-v-a3290cb2]{color:var(--p-danger)}.p-menu-item.danger[data-v-a3290cb2]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-a3290cb2]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-a3290cb2]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-a3290cb2]{width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--p-muted)}.p-menu-item:hover .p-ic[data-v-a3290cb2]{color:var(--p-text-strong)}.p-menu-item.active .p-ic[data-v-a3290cb2]{color:var(--p-accent-hover)}.p-menu-item.danger .p-ic[data-v-a3290cb2]{color:var(--p-danger)}.p-menu-item.lg[data-v-a3290cb2]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-sm)}.p-menu-sep[data-v-a3290cb2]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-a3290cb2]{display:inline-flex;gap:2px;padding:2px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-sans)}.p-seg-item[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-seg-item[data-v-a3290cb2]:hover{color:var(--p-text)}.p-seg-item.on[data-v-a3290cb2]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-sm)}.p-tabs[data-v-a3290cb2]{display:flex;align-items:center;gap:0;border-bottom:.5px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-a3290cb2]{padding:8px 14px;font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text-muted);cursor:pointer;white-space:nowrap;border-bottom:.5px solid transparent;margin-bottom:-.5px;transition:color var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-tab[data-v-a3290cb2]:hover{color:var(--p-text)}.p-tab.on[data-v-a3290cb2]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-a3290cb2]{position:relative;display:inline-block;width:36px;height:20px;flex:none;border-radius:var(--p-r-full);background:var(--p-line-strong);cursor:pointer;transition:background var(--p-dur) var(--p-ease)}.p-switch[data-v-a3290cb2]:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--p-r-full);background:var(--p-surface-raised);box-shadow:var(--p-sh-xs);transform-origin:left center;transition:transform var(--p-dur) var(--p-ease)}.p-switch[data-v-a3290cb2]:hover:after{transform:scaleX(1.125)}.p-switch.on[data-v-a3290cb2]{background:var(--p-accent)}.p-switch.on[data-v-a3290cb2]:after{transform:translate(16px);transform-origin:right center}.p-switch.on[data-v-a3290cb2]:hover:after{transform:translate(16px) scaleX(1.125)}.p-switch[data-v-a3290cb2]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-a3290cb2]{width:17px;height:17px;flex:none;display:inline-grid;place-items:center;border:.5px solid var(--p-line-strong);border-radius:var(--p-r-sm);background:var(--p-surface-raised);color:var(--p-text-on-accent);cursor:pointer;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-check.on[data-v-a3290cb2]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-a3290cb2]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-a3290cb2]{width:12px;height:12px}.p-avatar[data-v-a3290cb2]{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--p-r-md);background:var(--p-surface-sunken);border:.5px solid var(--p-line);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:600}.p-avatar.sm[data-v-a3290cb2]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-a3290cb2]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-a3290cb2]{width:13px;height:13px}.p-empty[data-v-a3290cb2]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 16px;color:var(--p-text-muted);text-align:center}.p-empty .em-ic[data-v-a3290cb2]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-a3290cb2]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-a3290cb2]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-a3290cb2]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-a3290cb2]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-turn-failed[data-v-a3290cb2]{display:flex;align-items:center;gap:var(--space-2);width:100%;max-width:560px;padding:var(--space-2) var(--space-3);border:var(--p-hairline) solid var(--color-danger-bd);border-radius:var(--radius-lg);background:var(--color-danger-soft);box-shadow:var(--shadow-xs)}.p-turn-failed .tf-chip[data-v-a3290cb2]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);flex:none;border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-danger)}.p-turn-failed .tf-chip svg[data-v-a3290cb2]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-turn-failed .tf-main[data-v-a3290cb2]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-turn-failed .tf-title[data-v-a3290cb2]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.p-turn-failed .tf-sub[data-v-a3290cb2],.p-turn-failed .tf-meta[data-v-a3290cb2]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-turn-failed .tf-meta[data-v-a3290cb2]{font-family:var(--font-mono);color:var(--color-text-faint)}.p-tip[data-v-a3290cb2]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-a3290cb2]{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--p-text);color:var(--p-bg);font-size:var(--p-font-size-xs);padding:4px 8px;border-radius:var(--p-r-sm);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity var(--p-dur-fast) var(--p-ease)}.p-tip:hover .p-tooltip[data-v-a3290cb2]{opacity:1}.p-banner[data-v-a3290cb2]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--p-r-md);border:.5px solid var(--p-line);background:var(--p-surface);font-size:var(--p-font-size-sm);color:var(--p-text)}.p-banner .bn-ic[data-v-a3290cb2]{width:18px;height:18px;flex:none}.p-banner.info[data-v-a3290cb2]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-a3290cb2]{color:var(--p-accent)}.p-banner.warning[data-v-a3290cb2]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-a3290cb2]{color:var(--p-warning)}.p-banner.danger[data-v-a3290cb2]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-a3290cb2]{color:var(--p-danger)}.p-sheet[data-v-a3290cb2]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl) var(--p-r-xl) 0 0;box-shadow:var(--p-sh-xl);padding:8px 16px 20px}.p-sheet-handle[data-v-a3290cb2]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-a3290cb2]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-a3290cb2 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-a3290cb2{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-a3290cb2]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-a3290cb2]{flex:1;min-width:0;height:38px;display:flex;align-items:center;gap:10px;padding:0 10px 0 14px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-cmd .cmd-text[data-v-a3290cb2]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-a3290cb2]{margin-left:auto;flex:none;display:grid;place-items:center;width:26px;height:26px;border:none;background:transparent;border-radius:var(--p-r-sm);color:var(--p-text-faint);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-cmd .cmd-copy[data-v-a3290cb2]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-a3290cb2]{width:15px;height:15px}.p-topbar[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;gap:12px;height:48px;padding:0 16px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg)}.p-topbar .tb-title[data-v-a3290cb2]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-a3290cb2]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-a3290cb2]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-a3290cb2]{background:#161b22b8;border-color:#ffffff14}.demo-row[data-v-a3290cb2]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-a3290cb2]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-a3290cb2]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-a3290cb2]{flex:1;min-width:0}.demo-chat[data-v-a3290cb2]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-a3290cb2]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-a3290cb2]{grid-column:1 / -1;margin-top:10px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--d-fg-muted)}.icon-cell[data-v-a3290cb2]{display:flex;align-items:center;gap:10px;padding:8px 10px;border:.5px solid var(--d-line);border-radius:8px;background:var(--d-surface)}.icon-cell .kw-icon[data-v-a3290cb2]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-a3290cb2]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-a3290cb2]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-a3290cb2]{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:11px;color:var(--d-fg-muted);font-family:JetBrains Mono,ui-monospace,monospace}.p-code-inline[data-v-a3290cb2]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);color:var(--p-text);padding:0 5px;border-radius:var(--p-r-sm);font-size:.9em}.p-code-block[data-v-a3290cb2]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;background:var(--p-surface-sunken)}.p-code-block-head[data-v-a3290cb2]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-code-block pre[data-v-a3290cb2]{margin:0;padding:12px 14px;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;color:var(--p-text);overflow-x:auto}.p-diff[data-v-a3290cb2]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm)}.p-diff-head[data-v-a3290cb2]{padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-diff-row[data-v-a3290cb2]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-a3290cb2]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-a3290cb2]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-a3290cb2]{color:var(--p-success)}.p-diff-row.del[data-v-a3290cb2]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-a3290cb2]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-a3290cb2]{color:var(--p-text)}.p-field-error[data-v-a3290cb2]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-a3290cb2]{vertical-align:middle}.p-btn .p-spinner .track[data-v-a3290cb2]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-a3290cb2]{stroke:currentColor}.ds-page[data-v-a3290cb2]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-a3290cb2]{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-4);background:var(--color-surface);border-bottom:.5px solid var(--color-line)}.ds-back[data-v-a3290cb2]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-3);border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer}.ds-back[data-v-a3290cb2]:hover{background:var(--color-hover)}.ds-topbar-title[data-v-a3290cb2]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)} diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-C2ybIYYn.js b/apps/kimi-code/dist-web/assets/DesignSystemView-C2ybIYYn.js deleted file mode 100644 index 674645153..000000000 --- a/apps/kimi-code/dist-web/assets/DesignSystemView-C2ybIYYn.js +++ /dev/null @@ -1,13 +0,0 @@ -import{M as T,aD as q,aI as B,aL as n,u as l,v as t,G as c,H as e,F as h,aX as y,bb as k,I as s,bk as d,cx as o,cy as A,cz as x,cA as M,cB as p,cC as I,cD as E}from"./index-_5lXYMaO.js";const V={class:"ds-page"},D={class:"layout"},H={class:"content"},L={class:"content-inner"},R={id:"tokens"},O={class:"icon-sizes"},W={class:"sz"},N={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},U={class:"sz"},P={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},F={class:"sz"},j={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},G={class:"icon-grid"},K={class:"icon-group-label"},J={class:"ic-name"},Q={id:"primitives"},Y={class:"stage-wrap"},Z={class:"stage p"},X={class:"p-pill",style:{color:"var(--p-warning)"}},$={class:"stage-wrap"},_={class:"stage p col"},aa={class:"demo-row"},ta={class:"p-btn primary disabled"},ea={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},sa={class:"stage-wrap"},da={class:"stage p col"},oa={class:"demo-row"},ca={class:"stage-wrap"},ia={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},na={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},la={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ra={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},va={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ba={id:"chat"},fa={class:"stage-wrap"},pa={class:"stage p col"},ha={style:{"max-width":"560px",width:"100%"}},ua={class:"stage-wrap"},ga={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ma={class:"p-composer",style:{width:"100%","max-width":"620px"}},wa={class:"p-composer-bar"},ya={class:"p-composer-left"},ka={class:"p-pill",style:{color:"var(--p-warning)"}},xa={class:"stage-wrap"},Ca={class:"stage p",style:{background:"var(--p-bg)"}},Sa={class:"am-mock"},za={class:"am-mock-row focus"},Ta={class:"am-mock-row"},qa={class:"am-mock-row"},Ba={class:"am-mock-row"},Aa={class:"dt"},Ma={class:"dw-spin"},Ia={class:"stage-wrap"},Ea={class:"stage p",style:{background:"var(--p-bg)"}},Va={class:"dw-bar"},Da={class:"dw-pill"},Ha={class:"dw-pill"},La={class:"dw-pill on"},Ra={class:"dw-running"},Oa={class:"dw-pill"},Wa={class:"stage-wrap"},Na={class:"stage p col",style:{background:"var(--p-bg)",gap:"var(--space-4)"}},Ua={class:"dw-panel"},Pa={class:"dw-head"},Fa={class:"dw-tab"},ja={class:"dw-chips"},Ga={class:"dw-chip on"},Ka={class:"dw-chip"},Ja={class:"dw-chip"},Qa={class:"dw-chip"},Ya={class:"dw-body col"},Za={class:"dw-row"},Xa={class:"dw-row"},$a={class:"dw-row fail"},_a={class:"dw-row cancelled"},at={class:"dw-panel"},tt={class:"dw-head"},et={class:"dw-tab"},st={class:"dw-chips"},dt={class:"dw-chip on"},ot={class:"dw-chip"},ct={class:"dw-chip"},it={class:"dw-chip"},nt={class:"dw-body grid"},lt={class:"dw-card"},rt={class:"cf"},vt={class:"cm"},bt={class:"cs"},ft={class:"sl"},pt={class:"tm"},ht={class:"dw-card"},ut={class:"cf"},gt={class:"cm"},mt={class:"cs"},wt={class:"sl"},yt={class:"tm"},kt={class:"dw-card fail"},xt={class:"cf"},Ct={class:"cm"},St={class:"cs"},zt={class:"sl"},Tt={class:"tm"},qt={class:"dw-card"},Bt={class:"cf"},At={class:"cm"},Mt={class:"cs"},It={class:"sl"},Et={class:"tm"},Vt="/repo",Dt=T({__name:"DesignSystemView",emits:["close"],setup(Ht,{emit:C}){const S=[{path:"/repo/apps/web/src/components/chat/TurnFilesSummary.vue",added:19,removed:4,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/composables/useFilePreview.ts",added:8,removed:1,hasWrite:!1,statsIncomplete:!1,diff:null},{path:"/repo/apps/web/src/components/chatTurnRendering.ts",added:0,removed:0,hasWrite:!0,statsIncomplete:!0,diff:null},{path:"/repo/apps/web/src/lib/toolDiff.ts",added:3,removed:2,hasWrite:!1,statsIncomplete:!1,diff:null}];function u(){}const z=C;function g(){z("close")}let f=null;function m(b){b.key==="Escape"&&g()}return q(()=>{document.addEventListener("keydown",m);const b=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;b.forEach(v=>{const i=v.getAttribute("href");if(!i)return;const w=document.getElementById(i.slice(1));w&&a.set(w,v)});let r=null;f=new IntersectionObserver(v=>{v.forEach(i=>{i.isIntersecting&&(r&&r.classList.remove("active"),r=a.get(i.target)??null,r&&r.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((v,i)=>f.observe(i)),b.length&&b[0].classList.add("active")}),B(()=>{document.removeEventListener("keydown",m),f&&(f.disconnect(),f=null)}),(b,a)=>(n(),l("div",V,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:g},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",D,[a[146]||(a[146]=c('<aside class="sidebar" data-v-8cbfa422><div class="brand" data-v-8cbfa422><div class="brand-mark" data-v-8cbfa422>K</div><div class="brand-name" data-v-8cbfa422>Kimi Web</div></div><div class="brand-sub" data-v-8cbfa422>Design System · v1.0</div><div class="nav-group" data-v-8cbfa422>Navigate</div><nav class="nav" id="nav" data-v-8cbfa422><a href="#overview" data-v-8cbfa422><span class="num" data-v-8cbfa422>00</span>Overview</a><a href="#principles" data-v-8cbfa422><span class="num" data-v-8cbfa422>01</span>Design Principles</a><a href="#tokens" data-v-8cbfa422><span class="num" data-v-8cbfa422>02</span>Design Tokens</a><a href="#primitives" data-v-8cbfa422><span class="num" data-v-8cbfa422>03</span>Primitives</a><a href="#chat" data-v-8cbfa422><span class="num" data-v-8cbfa422>04</span>Chat Interface</a><a href="#themes" data-v-8cbfa422><span class="num" data-v-8cbfa422>05</span>Theming</a><a href="#rules" data-v-8cbfa422><span class="num" data-v-8cbfa422>06</span>Style Rules</a><a href="#shell" data-v-8cbfa422><span class="num" data-v-8cbfa422>07</span>App Shell & Sidebar</a><a href="#a11y" data-v-8cbfa422><span class="num" data-v-8cbfa422>08</span>Accessibility</a><a href="#dialogs" data-v-8cbfa422><span class="num" data-v-8cbfa422>09</span>Dialogs</a></nav><div class="nav-group" data-v-8cbfa422>Companion output</div><nav class="nav" data-v-8cbfa422><a href="#tokens" data-v-8cbfa422><span class="num" data-v-8cbfa422>↗</span>Token list</a><a href="#primitives" data-v-8cbfa422><span class="num" data-v-8cbfa422>↗</span>Component API</a><a href="#rules" data-v-8cbfa422><span class="num" data-v-8cbfa422>↗</span>Style rules</a></nav></aside>',1)),t("main",H,[t("div",L,[a[144]||(a[144]=c('<section id="overview" data-v-8cbfa422><div class="hero" data-v-8cbfa422><span class="eyebrow" data-v-8cbfa422>● Design System · v1.0</span><h1 data-v-8cbfa422>Kimi Web <span class="grad" data-v-8cbfa422>Design System</span></h1><p class="lead" data-v-8cbfa422> This document defines the visual language and component specification for Kimi Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable. </p><div class="hero-meta" data-v-8cbfa422><span class="meta-chip" data-v-8cbfa422><span class="dot" data-v-8cbfa422></span> Scope <b data-v-8cbfa422>apps/kimi-web</b></span><span class="meta-chip" data-v-8cbfa422>Component primitives</span><span class="meta-chip" data-v-8cbfa422>Theme <b data-v-8cbfa422>1 set · 4 customizable colors</b></span><span class="meta-chip" data-v-8cbfa422>Light / dark mode</span></div></div><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>This spec is the single reference when changing the web UI.</b> Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed. </div></div></section><section id="principles" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>01</span><h2 class="sec-title" data-v-8cbfa422>Design Principles</h2></div><p class="sec-desc" data-v-8cbfa422> Every UI decision traces back to the following principles. Kimi Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first. </p><ul class="clean check" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>Consistency</b> —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.</li><li data-v-8cbfa422><b data-v-8cbfa422>Hierarchy</b> —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".</li><li data-v-8cbfa422><b data-v-8cbfa422>Proximity</b> —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.</li><li data-v-8cbfa422><b data-v-8cbfa422>Feedback</b> —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.</li><li data-v-8cbfa422><b data-v-8cbfa422>Breathing room</b> —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.</li><li data-v-8cbfa422><b data-v-8cbfa422>Accessibility (A11y)</b> —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.</li><li data-v-8cbfa422><b data-v-8cbfa422>Reduction</b> —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.</li></ul><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422><b data-v-8cbfa422>Brand tone (the do-not list)</b>: calm, clinical, never exaggerated. <span class="pill red" style="margin:0 4px;" data-v-8cbfa422>Reject</span> purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided. </div></div><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>Declare design intent first (Design Read)</b>: before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style. </div></div></section>',2)),t("section",R,[a[7]||(a[7]=c(`<div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>02</span><h2 class="sec-title" data-v-8cbfa422>Design Tokens</h2></div><p class="sec-desc" data-v-8cbfa422> Collapse every visual decision into tokens. <b data-v-8cbfa422>Color tokens keep the existing short names and fill out the semantics</b> (lowering migration cost), while <b data-v-8cbfa422>spacing, z-index, motion, and font-weight</b> fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage. </p><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>Naming convention</b>: <code data-v-8cbfa422>--<category>-<role>-<state></code>. For example <code data-v-8cbfa422>--color-text-muted</code>, <code data-v-8cbfa422>--radius-md</code>, <code data-v-8cbfa422>--space-4</code>. To reduce churn, the existing short names (<code data-v-8cbfa422>--bg</code> / <code data-v-8cbfa422>--ink</code> / <code data-v-8cbfa422>--line</code> / <code data-v-8cbfa422>--blue</code> …) are kept as <b data-v-8cbfa422>compatibility aliases</b> for one release cycle. </div></div><h3 class="sub" data-v-8cbfa422>Color</h3><p data-v-8cbfa422>Semantic-first, in three layers: <b data-v-8cbfa422>background / text / border</b> + <b data-v-8cbfa422>accent</b> + <b data-v-8cbfa422>status colors</b>. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.</p><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422>The table below shows the <b data-v-8cbfa422>semantic tokens</b>. Each ships a light value in <code data-v-8cbfa422>:root</code> and a dark override in the <code data-v-8cbfa422>data-color-scheme</code> blocks — for example <code data-v-8cbfa422>--color-bg</code> is <code data-v-8cbfa422>#ffffff</code> in light and <code data-v-8cbfa422>#121212</code> in dark; <code data-v-8cbfa422>--color-accent</code> is the brand blue (<code data-v-8cbfa422>#1783ff</code> light / <code data-v-8cbfa422>#1a88ff</code> dark). The <b data-v-8cbfa422>semantic status colors</b> (success / warning / danger / info) are independent palettes, one set each for light / dark.</div></div><div class="palette" data-v-8cbfa422><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#ffffff;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>bg</div><div class="cv" data-v-8cbfa422>#ffffff / #121212</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#f5f5f5;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>surface</div><div class="cv" data-v-8cbfa422>#f5f5f5 / #1f1f1f</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#f5f5f5;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>surface-sunken</div><div class="cv" data-v-8cbfa422>#f5f5f5 / #121212</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#f5f5f5;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>well</div><div class="cv" data-v-8cbfa422>#f5f5f5 / #1f1f1f</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#f5f5f5;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>surface-deep</div><div class="cv" data-v-8cbfa422>#f5f5f5 / #0d0d0d</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#fff;border:0.5px solid rgba(0,0,0,.13);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>surface-overlay</div><div class="cv" data-v-8cbfa422>#ffffff / rgba(255,255,255,.1)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:rgba(0,0,0,.05);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>selected</div><div class="cv" data-v-8cbfa422>rgba(0,0,0,.05) / rgba(255,255,255,.1)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:rgba(0,0,0,.9);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>fg</div><div class="cv" data-v-8cbfa422>rgba(0,0,0,.9) / rgba(255,255,255,.84)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:rgba(0,0,0,.6);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>fg-muted</div><div class="cv" data-v-8cbfa422>rgba(0,0,0,.6) / rgba(255,255,255,.56)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:rgba(0,0,0,.13);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>line</div><div class="cv" data-v-8cbfa422>rgba(0,0,0,.13) / rgba(255,255,255,.12)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:rgba(0,0,0,.05);" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>subtle</div><div class="cv" data-v-8cbfa422>rgba(0,0,0,.05) / rgba(255,255,255,.05)</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#1783ff;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>accent (KMBlue)</div><div class="cv" data-v-8cbfa422>#1783ff / #1a88ff</div></div></div><div class="color-card" data-v-8cbfa422><div class="color-chip" style="background:#e8f3ff;" data-v-8cbfa422></div><div class="color-meta" data-v-8cbfa422><div class="cn" data-v-8cbfa422>accent-soft</div><div class="cv" data-v-8cbfa422>#e8f3ff / rgba(26,136,255,.1)</div></div></div></div><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Light</th><th data-v-8cbfa422>Dark</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-bg</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#121212;" data-v-8cbfa422></span>#121212</td><td data-v-8cbfa422>Page background</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-surface</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f5f5f5;" data-v-8cbfa422></span>#f5f5f5</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#1f1f1f;" data-v-8cbfa422></span>#1f1f1f</td><td data-v-8cbfa422>Panel / sidebar / card head</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-surface-raised</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#292929;" data-v-8cbfa422></span>#292929</td><td data-v-8cbfa422>Raised card / dialog / input</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-menu-bg</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.95);" data-v-8cbfa422></span>rgba(255,255,255,.95)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(41,41,41,.95);" data-v-8cbfa422></span>rgba(41,41,41,.95)</td><td data-v-8cbfa422>Floating menu panel — frosted glass over <code data-v-8cbfa422>--p-menu-backdrop</code> blur</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-surface-overlay</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-8cbfa422></span>rgba(255,255,255,.1)</td><td data-v-8cbfa422>Field-control fill on raised cards (selects, steppers) — top rung; light tops out at white (the level is carried by the border), dark steps one rung above raised. Floating layers stay at raised</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-well</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f5f5f5;" data-v-8cbfa422></span>#f5f5f5</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#1f1f1f;" data-v-8cbfa422></span>#1f1f1f</td><td data-v-8cbfa422>Content well on the page (code blocks, tool-output panels, match/file lists, media thumbnails) — light reuses the sunken recess; dark lifts one rung ABOVE the page, because a true recess (<code data-v-8cbfa422>#121212</code>) vanishes into the page there</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-surface-deep</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f5f5f5;" data-v-8cbfa422></span>#f5f5f5</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0d0d0d;" data-v-8cbfa422></span>#0d0d0d</td><td data-v-8cbfa422>Deep chrome plane one step BELOW the page (panel headers, diff gutters) — dark drops under <code data-v-8cbfa422>--color-bg</code> so chrome framing stays darker than the content it frames</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-text</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.9);" data-v-8cbfa422></span>rgba(0,0,0,.9)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.84);" data-v-8cbfa422></span>rgba(255,255,255,.84)</td><td data-v-8cbfa422>Body text / headings</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-text-strong</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#000;" data-v-8cbfa422></span>#000000</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;box-shadow:inset 0 0 0 1px #ddd;" data-v-8cbfa422></span>#ffffff</td><td data-v-8cbfa422>Max foreground emphasis — menu-row label & icon on hover</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-text-muted</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-8cbfa422></span>rgba(0,0,0,.6)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.56);" data-v-8cbfa422></span>rgba(255,255,255,.56)</td><td data-v-8cbfa422>Secondary text / placeholder</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-line</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.13);" data-v-8cbfa422></span>rgba(0,0,0,.13)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.12);" data-v-8cbfa422></span>rgba(255,255,255,.12)</td><td data-v-8cbfa422>Divider / card border</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-subtle</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.05);" data-v-8cbfa422></span>rgba(0,0,0,.05)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.05);" data-v-8cbfa422></span>rgba(255,255,255,.05)</td><td data-v-8cbfa422>Subtle hairline — tertiary separators below <code data-v-8cbfa422>--color-line</code> (diff-gutter column rules, quiet dividers inside wells)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-selected</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.05);" data-v-8cbfa422></span>rgba(0,0,0,.05)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-8cbfa422></span>rgba(255,255,255,.1)</td><td data-v-8cbfa422>Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-hover</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.03);" data-v-8cbfa422></span>rgba(0,0,0,.03)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.05);" data-v-8cbfa422></span>rgba(255,255,255,.05)</td><td data-v-8cbfa422>Row hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface. The global hover rule: transparent-base controls overlay this f1 wash (hover never darkens — never sunken); filled controls use their own hover token (accent-hover, send-bg-hover)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-selected-hover</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.08);" data-v-8cbfa422></span>rgba(0,0,0,.08)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.14);" data-v-8cbfa422></span>rgba(255,255,255,.14)</td><td data-v-8cbfa422>Hover of a control RESTING at the selected fill (work cards) — one rung above f2, below f3: hover deepens/brightens a step, never drops below the rest state</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-inline-code-bg</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.03);" data-v-8cbfa422></span>rgba(0,0,0,.03)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(255,255,255,.1);" data-v-8cbfa422></span>rgba(255,255,255,.1)</td><td data-v-8cbfa422>Inline-code chip fill — fills.f1 / fills.f2; dark lifts off any dark surface (sunken == bg there)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-media-alpha-bg-1</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#858585;" data-v-8cbfa422></span>≈#858585</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#76797e;" data-v-8cbfa422></span>≈#76797e</td><td data-v-8cbfa422>Checkerboard square A of the <code data-v-8cbfa422><img></code> alpha canvas — color-mix of <code data-v-8cbfa422>--color-bg</code>/<code data-v-8cbfa422>--color-text</code> (52/48); applied via <code data-v-8cbfa422>--media-alpha-canvas</code> (16px period)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-media-alpha-bg-2</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#6b6b6b;" data-v-8cbfa422></span>≈#6b6b6b</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#8c8f93;" data-v-8cbfa422></span>≈#8c8f93</td><td data-v-8cbfa422>Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-sidebar-bg</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f9fbfc;" data-v-8cbfa422></span>#f9fbfc</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0d0d0d;" data-v-8cbfa422></span>#0d0d0d</td><td data-v-8cbfa422>Sidebar surface — one step off <code data-v-8cbfa422>--color-bg</code> (just under white in light, one step BELOW the page in dark) so the session column reads as its own plane and never brighter than the reading surface</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-scrim</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.4);" data-v-8cbfa422></span>rgba(0,0,0,.4)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-8cbfa422></span>rgba(0,0,0,.6)</td><td data-v-8cbfa422>Modal scrim — the dark veil behind dialogs/lightboxes (mask.base; legacy hardcoded overlays can migrate here)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-scrim-strong</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.6);" data-v-8cbfa422></span>rgba(0,0,0,.6)</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:rgba(0,0,0,.75);" data-v-8cbfa422></span>rgba(0,0,0,.75)</td><td data-v-8cbfa422>Stronger scrim for full-screen media previews (mask.strong — the PhotoSwipe image preview backdrop)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-text-on-scrim</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>same</td><td data-v-8cbfa422>Text drawn on the scrim (captions over the media lightbox)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-accent</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#1783ff;" data-v-8cbfa422></span>#1783ff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#1a88ff;" data-v-8cbfa422></span>#1a88ff</td><td data-v-8cbfa422>Primary action / link / focus</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-success</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0e7a38;" data-v-8cbfa422></span>#0e7a38</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#3fb950;" data-v-8cbfa422></span>#3fb950</td><td data-v-8cbfa422>Success / pass</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-warning</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#a9610a;" data-v-8cbfa422></span>#a9610a</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#d29922;" data-v-8cbfa422></span>#d29922</td><td data-v-8cbfa422>Warning / pending</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--color-danger</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#c0392b;" data-v-8cbfa422></span>#c0392b</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f85149;" data-v-8cbfa422></span>#f85149</td><td data-v-8cbfa422>Danger / error / abort</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Palette</h4><p data-v-8cbfa422>The palette <b data-v-8cbfa422>is</b> the production kimi.com palette (design tokens <code data-v-8cbfa422>tokens.json</code>): neutral-gray surfaces, an alpha-based label / fill / separator ramp (<code data-v-8cbfa422>labels.*</code> / <code data-v-8cbfa422>fills.*</code> / <code data-v-8cbfa422>separator.s1</code>), the KMBlue accent, and a true neutral dark ladder (<code data-v-8cbfa422>#121212 → #1f1f1f → #292929</code>; the deep chrome plane and sidebar derive one step below at <code data-v-8cbfa422>#0d0d0d</code> — the palette has nothing darker than primary).</p><p data-v-8cbfa422>The ONE deliberate exception is the <b data-v-8cbfa422>status hues</b>: success / warning / danger / done keep the app's own WCAG-tuned ramp (≥4.5:1 on the neutral surfaces) — the production status colours (positiveGreen <code data-v-8cbfa422>#16c456</code>, orange <code data-v-8cbfa422>#ff9500</code>, danger red <code data-v-8cbfa422>#ff3849</code>) are too bright against it. Diff add/del bands happen to coincide (both use the production 25% fills in light, 14% in dark).</p><h4 class="mini" data-v-8cbfa422>Surface usage</h4><p data-v-8cbfa422>The surface layers each have a role — choose by "field overlay / raised layer / content well / default flat layer / sunken layer / page background / deep chrome", and avoid treating <code data-v-8cbfa422>--p-surface-raised</code> as a universal background. In dark, elevation = lighter: floating layers sit above the content, content wells sit above the page, and chrome planes (sidebar, panel headers) sit below it — never the reverse. One consequence: on the page itself, never use <code data-v-8cbfa422>--color-surface-sunken</code> for a content carrier — it equals <code data-v-8cbfa422>--color-bg</code> in dark and the fill vanishes; use <code data-v-8cbfa422>--color-well</code>. Sunken stays correct INSIDE surface / raised cards, where it is a genuine recess. Field controls (selects, steppers) on a raised card use <code data-v-8cbfa422>--color-surface-overlay</code>, the top fill rung; floating layers keep <code data-v-8cbfa422>--color-surface-raised</code> — their elevation is shadow + hairline, not a lighter fill.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Light</th><th data-v-8cbfa422>Dark</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-surface-overlay</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#22272e;" data-v-8cbfa422></span>#22272e</td><td data-v-8cbfa422>Field controls on raised cards — select, stepper (top fill rung; light = white)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-surface-raised</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#1c2128;" data-v-8cbfa422></span>#1c2128</td><td data-v-8cbfa422>Raised card / dialog / input (raised layer)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-well</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f3f5f8;" data-v-8cbfa422></span>#f3f5f8</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#13181e;" data-v-8cbfa422></span>#13181e</td><td data-v-8cbfa422>Code block / tool output / list carrier directly on the page (content well — light: recessed, dark: one rung above the page)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-surface</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fafbfc;" data-v-8cbfa422></span>#fafbfc</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#13181e;" data-v-8cbfa422></span>#13181e</td><td data-v-8cbfa422>Panel / sidebar / card head (default flat layer)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-surface-sunken</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#f3f5f8;" data-v-8cbfa422></span>#f3f5f8</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0d1117;" data-v-8cbfa422></span>#0d1117</td><td data-v-8cbfa422>Recessed area INSIDE a surface / raised card — never a content carrier on the page (sunken layer)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-bg</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fff;" data-v-8cbfa422></span>#ffffff</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0d1117;" data-v-8cbfa422></span>#0d1117</td><td data-v-8cbfa422>Page background</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-surface-deep</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#fafbfc;" data-v-8cbfa422></span>#fafbfc</td><td class="val" data-v-8cbfa422><span class="swatch" style="background:#0a0d12;" data-v-8cbfa422></span>#0a0d12</td><td data-v-8cbfa422>Panel header / diff gutter (deep chrome layer — below the page in dark)</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Borders & hairlines</h4><p data-v-8cbfa422>Three line tokens, three jobs: <code data-v-8cbfa422>--color-line</code> is the default structural separator, <code data-v-8cbfa422>--color-subtle</code> the tertiary separator that must stay quieter (diff-gutter column rules, quiet dividers inside wells), and <code data-v-8cbfa422>--color-line-strong</code> the edge of interactive controls (inputs, selects, secondary buttons). Width is one: <b data-v-8cbfa422>0.5px</b> — every stroke is the same hairline, on static structural edges (card rims, plane seams, header dividers), interactive control rims and floating layers alike. Separation comes from luminance first — planes one rung apart already read as distinct in dark, so their shared edge stays a 0.5px hairline rather than a heavier border; same-rung neighbours (list rows, card head / body) are exactly where a hairline is required. In dark, drop shadows fade on near-black surfaces, so a floating layer's edge IS its hairline — never ship a shadow-only floating surface. (Legacy <code data-v-8cbfa422>--line</code> / <code data-v-8cbfa422>--line2</code> alias <code data-v-8cbfa422>--color-line</code> / <code data-v-8cbfa422>--color-subtle</code> for one cycle; new work references the v2 names.)</p><h4 class="mini" data-v-8cbfa422>Focus ring</h4><p data-v-8cbfa422>All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a <code data-v-8cbfa422>box-shadow</code> focus ring.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-focus-ring</td><td class="val" data-v-8cbfa422>0 0 0 3px var(--p-accent-soft)</td><td data-v-8cbfa422>Default focus ring (link, menu item, switch, checkbox)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-focus-ring-strong</td><td class="val" data-v-8cbfa422>0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)</td><td data-v-8cbfa422>Strong focus ring (button, primary action)</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Text selection</h4><p data-v-8cbfa422>The text-selection color uses <code data-v-8cbfa422>--p-selection</code> uniformly (light <code data-v-8cbfa422>rgba(23,131,255,.18)</code> / dark <code data-v-8cbfa422>rgba(88,166,255,.32)</code>), applied by the global <code data-v-8cbfa422>::selection</code> rule; do not set a separate highlight background.</p><h4 class="mini" data-v-8cbfa422>Disabled state</h4><p data-v-8cbfa422>All disabled controls use <code data-v-8cbfa422>opacity:.5</code> + <code data-v-8cbfa422>cursor:not-allowed</code> uniformly; do not separately grey out or recolor.</p><h3 class="sub" data-v-8cbfa422>Font families</h3><p data-v-8cbfa422>Kimi Web uses two font tokens: <b data-v-8cbfa422>--font-ui</b> (UI and body, with Schibsted Grotesk for Latin and Noto Sans SC for Simplified Chinese) and <b data-v-8cbfa422>--font-mono</b> (code and monospace). Components always reference the variables; do not hard-code font names.</p><h4 class="mini" data-v-8cbfa422>--font-ui · UI & body (Schibsted Grotesk + Noto Sans SC)</h4><p data-v-8cbfa422>Body and UI use self-hosted Schibsted Grotesk for Latin text and self-hosted Noto Sans SC Variable for Simplified Chinese. Platform fonts remain as fallbacks:</p><div class="code" data-v-8cbfa422><div class="code-bar" data-v-8cbfa422><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="fn" data-v-8cbfa422>--font-ui</span></div><pre data-v-8cbfa422>--font-ui: "Schibsted Grotesk Variable", "Helvetica Neue", Arial, - "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC", - "Microsoft YaHei", - -apple-system, BlinkMacSystemFont, "Segoe UI", - Roboto, Ubuntu, sans-serif, - "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";</pre></div><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>Schibsted Grotesk first: self-hosted Latin UI and body text, with normal and italic variable faces.</li><li data-v-8cbfa422>Western fallbacks next: Helvetica Neue / Arial for environments where Schibsted Grotesk cannot load.</li><li data-v-8cbfa422>Noto Sans SC Variable next: bundled Simplified Chinese glyphs with a weight range of 100–900.</li><li data-v-8cbfa422>System UI fallbacks last: PingFang SC / Microsoft YaHei, platform UI fonts, and emoji fonts.</li></ul><h4 class="mini" data-v-8cbfa422>--font-mono · Code & monospace</h4><p data-v-8cbfa422>Code, line numbers, diffs, and Bash commands use JetBrains Mono (a self-hosted variable font), falling back to the system monospace. Other tool labels and summaries use the UI font:</p><div class="code" data-v-8cbfa422><div class="code-bar" data-v-8cbfa422><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="fn" data-v-8cbfa422>--font-mono</span></div><pre data-v-8cbfa422>--font-mono: "JetBrains Mono Variable", "JetBrains Mono", - ui-monospace, "SF Mono", Menlo, Consolas, monospace;</pre></div><h4 class="mini" data-v-8cbfa422>Loading strategy</h4><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Font</th><th data-v-8cbfa422>Source</th><th data-v-8cbfa422>Bundled</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>JetBrains Mono</td><td class="val" data-v-8cbfa422>@fontsource-variable/jetbrains-mono</td><td class="val" data-v-8cbfa422>✓ self-hosted</td><td data-v-8cbfa422>monospace / code (--font-mono)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Schibsted Grotesk</td><td class="val" data-v-8cbfa422>prepare-fonts → app-ui/assets/fonts</td><td class="val" data-v-8cbfa422>✓ generated + bundled</td><td data-v-8cbfa422>UI / body / display (--font-ui, --font-display), wght 400-900, normal + italic</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Noto Sans SC</td><td class="val" data-v-8cbfa422>prepare-fonts → app-ui/assets/fonts</td><td class="val" data-v-8cbfa422>✓ generated + bundled</td><td data-v-8cbfa422>Simplified Chinese UI / body, wght 100–900</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>System UI / CJK fonts</td><td class="val" data-v-8cbfa422>operating system</td><td class="val" data-v-8cbfa422>—</td><td data-v-8cbfa422>late fallback for UI / body</td></tr></tbody></table><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422> Schibsted Grotesk, Noto Sans SC, and JetBrains Mono are self-hosted. They make no external network requests and work offline; platform fonts remain as fallbacks. </div></div><h4 class="mini" data-v-8cbfa422>Usage rules</h4><ul class="clean check" data-v-8cbfa422><li data-v-8cbfa422>Components always use <code data-v-8cbfa422>var(--font-ui)</code> / <code data-v-8cbfa422>var(--font-mono)</code>; do not hard-code font names like <code data-v-8cbfa422>'Schibsted Grotesk'</code> / <code data-v-8cbfa422>'JetBrains Mono'</code>.</li><li data-v-8cbfa422>Body / UI use <code data-v-8cbfa422>--font-ui</code> (Schibsted Grotesk for Latin, Noto Sans SC for Simplified Chinese); code / monospace use <code data-v-8cbfa422>--font-mono</code> (JetBrains Mono).</li><li data-v-8cbfa422>Schibsted Grotesk is loaded from complete variable faces, including normal and italic styles; <code data-v-8cbfa422>font-optical-sizing: auto</code> is enabled globally.</li><li data-v-8cbfa422>Noto Sans SC is loaded from one complete weight-variable WOFF2 asset. Platform CJK fonts stay late in the fallback chain.</li></ul><h3 class="sub" data-v-8cbfa422>Type scale & weight</h3><p data-v-8cbfa422>The user font-size preference is one of four named steps (<code data-v-8cbfa422>small / medium / large / xlarge</code>, Medium default) written to <code data-v-8cbfa422>data-font-scale</code> on <code data-v-8cbfa422><html></code>; the step name is persisted, never a px value. The step only moves <code data-v-8cbfa422>--base-font</code>; every size token derives additively (<code data-v-8cbfa422>default + shift</code>), and line heights are locked to integer px via <code data-v-8cbfa422>round(size × ratio, 1px)</code> — never a unitless ratio.</p><p data-v-8cbfa422>Two token groups share the shift but keep their own ratios: <b data-v-8cbfa422>--ui-*</b> for chrome (tight, 1.40–1.50) and <b data-v-8cbfa422>--md-*</b> for Markdown content + the composer (loose, 1.56–1.63; body is anchored to the UI body size — the spec's +2px offset was dropped as a product decision — while keeping its own looser line-height ratios). T0/T1 cap at 24/22px on the top steps (built into the tokens via <code data-v-8cbfa422>min()</code> — do not remove). Use the <code data-v-8cbfa422>.text-ui-*</code> / <code data-v-8cbfa422>.text-md-*</code> utility classes; legacy aliases <code data-v-8cbfa422>--ui-font-size</code> (→ <code data-v-8cbfa422>--ui-b2</code>), <code data-v-8cbfa422>--content-font-size</code> (→ <code data-v-8cbfa422>--md-b1</code>) and the whole 6-level <code data-v-8cbfa422>--text-*</code> ramp (xs→c1, sm→b2−1px, base→b2, lg→t2, xl→t1, 2xl→t0) keep older components on the ramp. Panel titles sit at the base step (<code data-v-8cbfa422>--ui-b2</code>); dropdown menu items sit one rung below (<code data-v-8cbfa422>--text-sm</code> = b2 − 1px) — both still follow the user's font scale.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-8cbfa422><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-t1);font-weight:500;" data-v-8cbfa422>Section Title</div><div class="type-meta" data-v-8cbfa422>--ui-t1 · title (cap 22)</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-t2);font-weight:500;" data-v-8cbfa422>Card title</div><div class="type-meta" data-v-8cbfa422>--ui-t2 · subtitle</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-b1);font-weight:500;" data-v-8cbfa422>UI emphasis</div><div class="type-meta" data-v-8cbfa422>--ui-b1 · body strong</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-b2);" data-v-8cbfa422>UI control / button / form</div><div class="type-meta" data-v-8cbfa422>--ui-b2 · body</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-c1);" data-v-8cbfa422>Helper text / table</div><div class="type-meta" data-v-8cbfa422>--ui-c1 · caption</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--ui-c2);" data-v-8cbfa422>Badge / timestamp</div><div class="type-meta" data-v-8cbfa422>--ui-c2 · non-critical only</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--md-h1);font-weight:600;" data-v-8cbfa422>Markdown H1</div><div class="type-meta" data-v-8cbfa422>--md-h1</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--md-b1);" data-v-8cbfa422>Chat body / message bubbles / composer</div><div class="type-meta" data-v-8cbfa422>--md-b1 · prose body</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--md-b2);" data-v-8cbfa422>Quote / table</div><div class="type-meta" data-v-8cbfa422>--md-b2 · secondary</div></div><div class="type-row" data-v-8cbfa422><div class="type-sample" style="font-size:var(--md-b3);font-family:var(--font-mono);" data-v-8cbfa422>Code block / inline code</div><div class="type-meta" data-v-8cbfa422>--md-b3 · weak / code</div></div></div><p data-v-8cbfa422>The fixed product type tokens still define scale-independent defaults: transcript prose enables <code data-v-8cbfa422>text-autospace: normal</code> for mixed CJK and Latin text. Drop stray <code data-v-8cbfa422>font-weight: 650 / 750</code>; converge on 400 / 500 (regular / emphasis), with a dedicated 600 weight for sidebar section labels.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--font-ui</td><td class="val" data-v-8cbfa422>"Schibsted Grotesk Variable", …, "Noto Sans SC Variable", …</td><td data-v-8cbfa422>UI & body (Schibsted Grotesk + Noto Sans SC)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--font-kbd</td><td class="val" data-v-8cbfa422>"Schibsted Grotesk Variable", system-ui, sans-serif</td><td data-v-8cbfa422>keyboard shortcut keycaps</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--font-mono</td><td class="val" data-v-8cbfa422>JetBrains Mono…</td><td data-v-8cbfa422>code, Bash commands, line numbers, diffs</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>data-font-scale</td><td class="val" data-v-8cbfa422>small / medium / large / xlarge</td><td data-v-8cbfa422>user preference on <html>; sets --base-font (12–18px), Medium = 14px default</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--ui-t0…--ui-c2</td><td class="val" data-v-8cbfa422>default + --ui-shift, t0/t1 capped via min()</td><td data-v-8cbfa422>chrome type ramp (title / subtitle / body / caption); .text-ui-* classes</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--md-h1…--md-b3</td><td class="val" data-v-8cbfa422>default + --md-shift</td><td data-v-8cbfa422>Markdown ramp (headings / body / secondary / code); .text-md-* classes</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--ui-font-size / --content-font-size</td><td class="val" data-v-8cbfa422>var(--ui-b2) / var(--md-b1)</td><td data-v-8cbfa422>legacy aliases kept on the ramp</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--code-font-size</td><td class="val" data-v-8cbfa422>calc(var(--content-font-size) - 2px)</td><td data-v-8cbfa422>standalone code surfaces (diff view, file preview, tool cards) — one step below body, 12px @ Medium; prose-embedded code stays on the --md-* ramp</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--text-xs / sm / base / lg / xl / 2xl</td><td class="val" data-v-8cbfa422>c1 / b2−1 / b2 / t2 / t1 / t0</td><td data-v-8cbfa422>legacy ramp, aliased into the scale</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--leading-tight/normal/prose/relaxed</td><td class="val" data-v-8cbfa422>1.25 / 1.5 / 1.6 / 1.7</td><td data-v-8cbfa422>headings / UI / chat prose / long text</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--weight-regular/option-label/medium/ui-strong</td><td class="val" data-v-8cbfa422>400 / 475 / 500 / 525</td><td data-v-8cbfa422>body / settings labels / emphasis / compact UI emphasis</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--weight-section-label</td><td class="val" data-v-8cbfa422>600</td><td data-v-8cbfa422>sidebar section labels</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Icon size</h4><p data-v-8cbfa422>Icons use three size tokens uniformly. The global <code data-v-8cbfa422>.p-ic</code> default is 16px (<code data-v-8cbfa422>--p-ic-md</code>); components pick as needed, and random pixel sizes are forbidden.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-ic-sm</td><td class="val" data-v-8cbfa422>14px</td><td data-v-8cbfa422>small button, badge, menu item, inline link icon</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-ic-md</td><td class="val" data-v-8cbfa422>16px</td><td data-v-8cbfa422>default (button, icon button, toolbar)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-ic-lg</td><td class="val" data-v-8cbfa422>20px</td><td data-v-8cbfa422>Toast status icon, empty-state illustration</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Icon</h4><p data-v-8cbfa422>Icons always come from the centralized registry <code data-v-8cbfa422>lib/icons.ts</code>: in templates use the <code data-v-8cbfa422><Icon name size /></code> component (<code data-v-8cbfa422>components/ui/Icon.vue</code>); for <code data-v-8cbfa422>v-html</code> contexts (such as a tool glyph) use <code data-v-8cbfa422>iconSvg(name, size)</code>. <b data-v-8cbfa422>Do not hand-write <code data-v-8cbfa422><svg></code></b> — the <code data-v-8cbfa422>scripts/check-style.mjs</code> <code data-v-8cbfa422>icon-from-registry</code> rule flags stray SVGs. Every glyph shares the 24×24 source grid and <code data-v-8cbfa422>currentColor</code> (colour follows text); size uses the three tokens below, and only icons imported in <code data-v-8cbfa422>lib/icons.ts</code> are bundled by <a href="https://github.com/unplugin/unplugin-icons" data-v-8cbfa422>unplugin-icons</a> at build time. Three collections feed the registry, in this order of preference: <b data-v-8cbfa422><code data-v-8cbfa422>~icons/kimi/*</code></b> — Kimi Design System icons (24×24 outlined, 1.8px stroke), local SVGs under <code data-v-8cbfa422>src/icons/kimi/</code> registered as a custom collection in the Vite config, used whenever a Kimi glyph exists for the intent; <b data-v-8cbfa422><code data-v-8cbfa422>~icons/tabler/*</code></b> — Tabler Icons (MIT), for the few gaps it uniquely covers (today: the right-panel toggle); and <b data-v-8cbfa422><code data-v-8cbfa422>~icons/ri/*</code></b> — <a href="https://remixicon.com/" data-v-8cbfa422>Remix Icon</a> (Apache-2.0), for the remaining intents the Kimi set does not cover yet. A few glyphs are filed under their intent rather than the upstream asset name (see the <code data-v-8cbfa422>lib/icons.ts</code> header). When an icon is missing, prefer a glyph from the Kimi icon set: copy the SVG into <code data-v-8cbfa422>src/icons/kimi/</code> (kebab-case name, monochrome <code data-v-8cbfa422>currentColor</code>) and register it — two static imports (component + <code data-v-8cbfa422>?raw</code> string) plus one entry in <code data-v-8cbfa422>ICONS</code>; reach for Remix only when no Kimi glyph fits, and never draw paths in a component.</p><h4 class="mini" data-v-8cbfa422>Size scale</h4>`,49)),t("div",O,[t("div",W,[(n(),l("svg",N,[...a[1]||(a[1]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[2]||(a[2]=e("sm · 14",-1))]),t("div",U,[(n(),l("svg",P,[...a[3]||(a[3]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[4]||(a[4]=e("md · 16",-1))]),t("div",F,[(n(),l("svg",j,[...a[5]||(a[5]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[6]||(a[6]=e("lg · 20",-1))])]),a[8]||(a[8]=t("h4",{class:"mini"},"Icon library",-1)),a[9]||(a[9]=t("p",null,[e("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),t("code",null,"ICON_GROUPS"),e(" in "),t("code",null,"lib/icons.ts"),e(" (a hand-maintained array covering the same icon names), and this catalog is rendered directly from that array so the registry and the document never drift.")],-1)),t("div",G,[(n(!0),l(h,null,y(d(A),([r,v])=>(n(),l(h,{key:r},[t("div",K,k(r),1),(n(!0),l(h,null,y(v,i=>(n(),l("div",{key:i,class:"icon-cell"},[s(d(o),{name:i},null,8,["name"]),t("span",J,k(i),1)]))),128))],64))),128))]),a[10]||(a[10]=c('<p data-v-8cbfa422>Do not use emoji as functional icons. The Kimi brand mark (the robot mascot logo) is a brand asset and is not part of this icon system.</p><p data-v-8cbfa422>A few <b data-v-8cbfa422>special graphics</b> are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <code data-v-8cbfa422><ContextRing :pct /></code> (the Composer context progress ring, data-driven), <code data-v-8cbfa422><AuthStateIcon kind /></code> (the success / expired / error colored illustrations in the login flow), <code data-v-8cbfa422><Spinner /></code> (loading state). Status dots (such as in the Provider list) always use CSS dots (<code data-v-8cbfa422>border-radius:50%</code>), not SVG. The <code data-v-8cbfa422>scripts/check-style.mjs</code> <code data-v-8cbfa422>icon-from-registry</code> rule exempts the above and the brand mark; all other hand-written <code data-v-8cbfa422><svg></code> is flagged.</p><h3 class="sub" data-v-8cbfa422>Spacing</h3><p data-v-8cbfa422>A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-8cbfa422><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:4px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-1 · 4</div><div class="space-use" data-v-8cbfa422>icon gap, badge padding</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:6px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-1-5 · 6</div><div class="space-use" data-v-8cbfa422>workbar pill icon ↔ label</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:8px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-2 · 8</div><div class="space-use" data-v-8cbfa422>control gap, small padding</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:12px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-3 · 12</div><div class="space-use" data-v-8cbfa422>button padding, form-item gap</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:16px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-4 · 16</div><div class="space-use" data-v-8cbfa422>card padding, grid gap</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:20px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-5 · 20</div><div class="space-use" data-v-8cbfa422>dialog padding</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:24px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-6 · 24</div><div class="space-use" data-v-8cbfa422>section gap</div></div><div class="space-row" data-v-8cbfa422><div class="space-bar" style="width:32px;" data-v-8cbfa422></div><div class="space-meta" data-v-8cbfa422>--space-8 · 32</div><div class="space-use" data-v-8cbfa422>large section gap</div></div></div><h4 class="mini" data-v-8cbfa422>Dense list (sidebar / file tree)</h4><p data-v-8cbfa422>High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: <b data-v-8cbfa422>in-row vertical padding</b> <code data-v-8cbfa422>--space-1</code> (4px), <b data-v-8cbfa422>no margin between rows</b> (the hover pill provides the separation); <b data-v-8cbfa422>section gap</b> (between logo / search / action buttons / group title / list) uniformly <code data-v-8cbfa422>--space-2</code> (8px); <b data-v-8cbfa422>between groups</b> <code data-v-8cbfa422>--space-2</code>; the brand header is slightly looser at the top (<code data-v-8cbfa422>--space-3</code>). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.</p><h3 class="sub" data-v-8cbfa422>Radius</h3><p data-v-8cbfa422>Merge the existing 14 values <b data-v-8cbfa422>into the nearest</b> of 7 scale steps. Rule: the component type determines the radius, not the author's feel. The Composer shell is the sole product-specific exception: its 32px radius pairs with <code data-v-8cbfa422>superellipse(1.5)</code> so the flatter curve stays visually concentric with its controls.</p><div class="radius-grid" data-v-8cbfa422><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:4px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>xs · 4</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:6px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>sm · 6</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:8px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>md · 8</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:12px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>lg · 12</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:16px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>xl · 16</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:20px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>2xl · 20</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:32px;corner-shape:superellipse(1.5);" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>composer · 32 / 1.5</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border-radius:999px;" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>full · 999</span></div></div><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th><th data-v-8cbfa422>Merged from</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-xs</td><td class="val" data-v-8cbfa422>4px</td><td data-v-8cbfa422>small badge, inline tag</td><td class="val" data-v-8cbfa422>2/3/4px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-sm</td><td class="val" data-v-8cbfa422>6px</td><td data-v-8cbfa422>small button, icon button, menu item</td><td class="val" data-v-8cbfa422>5/6px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-md</td><td class="val" data-v-8cbfa422>8px</td><td data-v-8cbfa422>button, input, badge, card</td><td class="val" data-v-8cbfa422>7/8/9px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-lg</td><td class="val" data-v-8cbfa422>12px</td><td data-v-8cbfa422>menu, toast, bubble, floating card</td><td class="val" data-v-8cbfa422>10/12px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-xl</td><td class="val" data-v-8cbfa422>16px</td><td data-v-8cbfa422>container baseline: dialogs, settings cards, sheets, work panel</td><td class="val" data-v-8cbfa422>13/16px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-2xl</td><td class="val" data-v-8cbfa422>20px</td><td data-v-8cbfa422>workspace attachment card bottom (<code data-v-8cbfa422>0 0 2xl 2xl</code>) tucked under the composer</td><td class="val" data-v-8cbfa422>18/20px →</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-composer</td><td class="val" data-v-8cbfa422>32px</td><td data-v-8cbfa422>Composer shell, with <code data-v-8cbfa422>--corner-shape-composer</code></td><td class="val" data-v-8cbfa422>product-specific</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-menu-row</td><td class="val" data-v-8cbfa422>25.3px</td><td data-v-8cbfa422>Menu rows inset 6px inside a composer-radius frame (diagonal-exact concentric)</td><td class="val" data-v-8cbfa422>product-specific</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--radius-full</td><td class="val" data-v-8cbfa422>999px</td><td data-v-8cbfa422>pill badge, avatar, send button</td><td class="val" data-v-8cbfa422>999px / 50%</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Elevation & z-index</h3><p data-v-8cbfa422>Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating <code data-v-8cbfa422>9999</code>-style one-upping.</p><div class="panel panel-pad" style="margin:16px 0;" data-v-8cbfa422><div class="radius-grid" style="align-items:stretch;" data-v-8cbfa422><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border:none;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>sm · dropdown menu / sticky</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border:none;background:#fff;box-shadow:0 4px 12px rgba(16,24,40,.07),0 2px 4px rgba(16,24,40,.05);" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>md · Toast</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border:none;background:#fff;box-shadow:0 12px 32px rgba(16,24,40,.12),0 4px 10px rgba(16,24,40,.08);" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>lg · overlay (reserved)</span></div><div class="radius-item" data-v-8cbfa422><div class="radius-box" style="border:none;background:#fff;box-shadow:0 24px 64px rgba(16,24,40,.18),0 8px 20px rgba(16,24,40,.10);" data-v-8cbfa422></div><span class="rl" data-v-8cbfa422>xl · dialog</span></div></div></div><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Z-index Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-base</td><td class="val" data-v-8cbfa422>0</td><td data-v-8cbfa422>normal flow</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-raised</td><td class="val" data-v-8cbfa422>1</td><td data-v-8cbfa422>in-component local stacking (menu scroll thumbs, strip badges, floating pills) — never a global layer</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-sticky</td><td class="val" data-v-8cbfa422>100</td><td data-v-8cbfa422>sticky header / sidebar</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-dropdown</td><td class="val" data-v-8cbfa422>200</td><td data-v-8cbfa422>dropdown menu</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-overlay</td><td class="val" data-v-8cbfa422>300</td><td data-v-8cbfa422>overlay / bottom Sheet</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-modal</td><td class="val" data-v-8cbfa422>400</td><td data-v-8cbfa422>dialog — sibling overlays tie-break by DOM order, so the global confirm (ConfirmDialogHost) mounts on demand to always land last / on top</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-modal-dropdown</td><td class="val" data-v-8cbfa422>500</td><td data-v-8cbfa422>menus / popovers that open above a modal dialog (teleported to <body>, e.g. the settings SecondaryModelPicker cascade)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-toast</td><td class="val" data-v-8cbfa422>600</td><td data-v-8cbfa422>toast</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-tooltip</td><td class="val" data-v-8cbfa422>650</td><td data-v-8cbfa422>tooltip bubble — transient and pointer-events none, so it sits above everything (dialogs, toasts) to stay visible anywhere</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--z-max</td><td class="val" data-v-8cbfa422>9999</td><td data-v-8cbfa422>reserved: only this tier for extreme fallback</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Motion</h3><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--ease-out</td><td class="val" data-v-8cbfa422>cubic-bezier(0.16, 1, 0.3, 1)</td><td data-v-8cbfa422>enter, hover, expand</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--ease-in-out</td><td class="val" data-v-8cbfa422>cubic-bezier(0.4, 0, 0.2, 1)</td><td data-v-8cbfa422>panel width, layout changes</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--duration-fast</td><td class="val" data-v-8cbfa422>120ms</td><td data-v-8cbfa422>press, focus</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--duration-base</td><td class="val" data-v-8cbfa422>160ms</td><td data-v-8cbfa422>hover, show/hide</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--duration-slow</td><td class="val" data-v-8cbfa422>260ms</td><td data-v-8cbfa422>dialog, Sheet, layout</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--duration-hover-intent</td><td class="val" data-v-8cbfa422>250ms</td><td data-v-8cbfa422>hover-intent reveal gate (TOC rail)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--duration-flash</td><td class="val" data-v-8cbfa422>1200ms</td><td data-v-8cbfa422>one-shot attention flashes (search locate, provider-row added) — a highlight timeout, past the show/hide ramp on purpose</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--anim-rive-spin</td><td class="val" data-v-8cbfa422>416.7ms</td><td data-v-8cbfa422>new-chat / folder-plus icon: plus spin on hover</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--anim-leftbar</td><td class="val" data-v-8cbfa422>533.3ms</td><td data-v-8cbfa422>sidebar toggle icon: arrow fly-in on hover</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--anim-leftbar-shrink</td><td class="val" data-v-8cbfa422>200ms</td><td data-v-8cbfa422>sidebar toggle icon: divider shrink on hover</td></tr></tbody></table><p data-v-8cbfa422>The <code data-v-8cbfa422>--anim-*</code> lengths are track timings ported verbatim from the designer's Rive exports, so they sit outside the <code data-v-8cbfa422>--duration-*</code> ramp on purpose — retiming the ramp must not distort them. Their interpolation stays <code data-v-8cbfa422>linear</code> because the easing is already baked into the dense keyframe stops; a token easing would double-apply. Three hover tracks use them today: the sidebar toggle shrinks its divider to half height while an arrow flies in and settles (the expand variant mirrors the track from the left), and the new-chat / folder-plus pluses do one bouncy spin. Each track is keyed to an id inside its own glyph (<code data-v-8cbfa422>#bar-divider</code>, <code data-v-8cbfa422>#bar-arrow</code> / <code data-v-8cbfa422>#bar-arrow-expand</code>, <code data-v-8cbfa422>#p1</code>, <code data-v-8cbfa422>#af-p1</code>) so every instance of the icon animates, and all revert on mouse-out. They still fall under the global reduced-motion switch below.</p><h4 class="mini" data-v-8cbfa422>Reduced motion</h4><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422> Under <code data-v-8cbfa422>@media (prefers-reduced-motion: reduce)</code>, all animation and transition durations drop to about <code data-v-8cbfa422>0.001ms</code> (effectively off), and the chat working indicator's mascot renders its static fallback instead of the Rive loop. Components should not check this individually; it is handled uniformly in the global styles. The switch clears durations, not <code data-v-8cbfa422>transition-delay</code>: a hover-intent gate (the conversation TOC's 250ms reveal) decides <i data-v-8cbfa422>whether</i> hidden content appears, and clearing it would make pointer fly-bys strobe content for reduced-motion users. </div></div><h3 class="sub" data-v-8cbfa422>Layout & breakpoints</h3><p data-v-8cbfa422>Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-sidebar-w</td><td class="val" data-v-8cbfa422>264px</td><td data-v-8cbfa422>left session sidebar width</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-content-max</td><td class="val" data-v-8cbfa422>760px</td><td data-v-8cbfa422>chat reading-column max width (regular chat prose)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-content-wide</td><td class="val" data-v-8cbfa422>920px</td><td data-v-8cbfa422>wide content (settings / panel)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-table-max</td><td class="val" data-v-8cbfa422>1040px</td><td data-v-8cbfa422>desktop wide-table max width (see §04)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-table-cell-max</td><td class="val" data-v-8cbfa422>700px</td><td data-v-8cbfa422>max width of a single table column; longer cell content wraps (see §04)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-bp-sm</td><td class="val" data-v-8cbfa422>640px</td><td data-v-8cbfa422>mobile / desktop boundary</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-bp-md</td><td class="val" data-v-8cbfa422>980px</td><td data-v-8cbfa422>narrow / wide screen boundary</td></tr></tbody></table><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422> At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap. </div></div>',24))]),t("section",Q,[a[27]||(a[27]=c(`<div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>03</span><h2 class="sec-title" data-v-8cbfa422>Primitives</h2></div><p class="sec-desc" data-v-8cbfa422> Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — <code data-v-8cbfa422>variant</code> / <code data-v-8cbfa422>size</code> — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors. </p><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422> For every interactive primitive, the <b data-v-8cbfa422>keyboard behavior, focus, and ARIA contract are in §08 Accessibility</b>. New primitives must ship with a keyboard model — mouse-only interaction is not enough. </div></div><h3 class="sub" data-v-8cbfa422>Component selection guide</h3><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Scenario</th><th data-v-8cbfa422>Use</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td data-v-8cbfa422>Primary action (submit / confirm)</td><td data-v-8cbfa422><code data-v-8cbfa422>Button variant=primary</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Secondary action / cancel</td><td data-v-8cbfa422><code data-v-8cbfa422>Button secondary</code> / <code data-v-8cbfa422>ghost</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Destructive action (delete / abort)</td><td data-v-8cbfa422><code data-v-8cbfa422>Button danger</code> / <code data-v-8cbfa422>danger-soft</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Status marker</td><td data-v-8cbfa422><code data-v-8cbfa422>Badge</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Toolbar filter / model switch</td><td data-v-8cbfa422><code data-v-8cbfa422>Pill</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>2–5 mutually exclusive options</td><td data-v-8cbfa422><code data-v-8cbfa422>SegmentedControl</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Top tabs</td><td data-v-8cbfa422><code data-v-8cbfa422>Tabs</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Switch / multi-select</td><td data-v-8cbfa422><code data-v-8cbfa422>Switch</code> / <code data-v-8cbfa422>Checkbox</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Scrollable regions with overlay controls</td><td data-v-8cbfa422><code data-v-8cbfa422>ScrollArea</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Floating content card / list action menu</td><td data-v-8cbfa422><code data-v-8cbfa422>Card</code> / <code data-v-8cbfa422>Menu</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Inline notice / global toast</td><td data-v-8cbfa422><code data-v-8cbfa422>Banner</code> / <code data-v-8cbfa422>Toast</code></td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Dialog / confirmation · bottom panel (mobile)</td><td data-v-8cbfa422><code data-v-8cbfa422>Dialog</code> / <code data-v-8cbfa422>Sheet</code></td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Button</h3><p data-v-8cbfa422>4 semantic variants × 3 sizes. The primary action <code data-v-8cbfa422>primary</code> takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses <code data-v-8cbfa422>--radius-md</code> uniformly (small size <code data-v-8cbfa422>--radius-sm</code>), weight 600, with a visible focus ring.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Variant matrix <span class="tag spec" data-v-8cbfa422>light</span></span><span class="sactions" data-v-8cbfa422><span class="tab on" data-v-8cbfa422>preview</span></span></div><div class="stage p col" data-v-8cbfa422><span class="stage-label" data-v-8cbfa422>medium · default</span><div class="demo-row" data-v-8cbfa422><button class="p-btn primary" data-v-8cbfa422>Primary action</button><button class="p-btn secondary" data-v-8cbfa422>Secondary action</button><button class="p-btn ghost" data-v-8cbfa422>Ghost button</button><button class="p-btn danger-soft" data-v-8cbfa422>Destructive (soft)</button><button class="p-btn danger" data-v-8cbfa422>Destructive action</button></div><span class="stage-label" data-v-8cbfa422>small</span><div class="demo-row" data-v-8cbfa422><button class="p-btn primary sm" data-v-8cbfa422>Confirm</button><button class="p-btn secondary sm" data-v-8cbfa422>Cancel</button><button class="p-btn ghost sm" data-v-8cbfa422>More</button></div><span class="stage-label" data-v-8cbfa422>With icon / state</span><div class="demo-row" data-v-8cbfa422><button class="p-btn primary" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-8cbfa422></path></svg>New chat</button><button class="p-btn secondary" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg>Copied</button><button class="p-btn primary disabled" data-v-8cbfa422>Loading…</button></div></div></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Dark skin <span class="tag spec" data-v-8cbfa422>dark</span></span></div><div class="stage dark p col" data-p="dark" data-v-8cbfa422><div class="demo-row" data-v-8cbfa422><button class="p-btn primary" data-v-8cbfa422>Primary action</button><button class="p-btn secondary" data-v-8cbfa422>Secondary action</button><button class="p-btn ghost" data-v-8cbfa422>Ghost button</button><button class="p-btn danger" data-v-8cbfa422>Destructive action</button></div></div></div><h4 class="mini" data-v-8cbfa422>API</h4><div class="code" data-v-8cbfa422><div class="code-bar" data-v-8cbfa422><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="fn" data-v-8cbfa422>Button.vue · usage</span></div><pre data-v-8cbfa422><span class="k" data-v-8cbfa422><Button</span> <span class="p" data-v-8cbfa422>variant</span>=<span class="s" data-v-8cbfa422>"primary"</span> <span class="p" data-v-8cbfa422>size</span>=<span class="s" data-v-8cbfa422>"md"</span> <span class="p" data-v-8cbfa422>:loading</span>=<span class="s" data-v-8cbfa422>"submitting"</span><span class="k" data-v-8cbfa422>></span>Save<span class="k" data-v-8cbfa422></Button></span> - <span class="c" data-v-8cbfa422>// variant: primary | secondary | ghost | danger | danger-soft</span> - <span class="c" data-v-8cbfa422>// size: sm | md | lg</span></pre></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>States</span></div><div class="stage p" data-v-8cbfa422><div class="demo-row" data-v-8cbfa422><button class="p-btn primary" disabled style="opacity:.5;cursor:not-allowed;" data-v-8cbfa422>Disabled primary</button><button class="p-btn primary" data-v-8cbfa422><svg class="p-spinner sm" viewBox="0 0 24 24" data-v-8cbfa422><circle class="track" cx="12" cy="12" r="9" data-v-8cbfa422></circle><circle class="arc" cx="12" cy="12" r="9" data-v-8cbfa422></circle></svg>Submitting</button><button class="p-btn danger" disabled style="opacity:.5;cursor:not-allowed;" data-v-8cbfa422>Disabled danger</button></div></div></div><h3 class="sub" data-v-8cbfa422>IconButton</h3><p data-v-8cbfa422>Unified into three sizes — 26 / 32 / 44px — with the neutral <code data-v-8cbfa422>--color-hover</code> wash on hover and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>IconButton</span></div><div class="stage p" data-v-8cbfa422><button class="p-icon-btn" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-8cbfa422></path></svg></button><button class="p-icon-btn" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-8cbfa422></path></svg></button><button class="p-icon-btn" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-8cbfa422></path></svg></button><button class="p-icon-btn sm" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975z" data-v-8cbfa422></path></svg></button><button class="p-icon-btn sm" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg></button></div></div><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422> The desktop IconButton comes in <code data-v-8cbfa422>sm</code> 26 / <code data-v-8cbfa422>md</code> 32; on touch devices the tap target should be ≥ 44px, so use <code data-v-8cbfa422>lg</code> 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses <code data-v-8cbfa422>lg</code>). Icon-only buttons must also name themselves on hover: pass <code data-v-8cbfa422>tooltip</code> (usually the same text as <code data-v-8cbfa422>label</code> — <code data-v-8cbfa422>label</code> alone only sets the aria-label); bare icon <code data-v-8cbfa422><button></code>/<code data-v-8cbfa422><a></code> triggers wrap the <code data-v-8cbfa422>Tooltip</code> component directly. </div></div><h3 class="sub" data-v-8cbfa422>Badge · Chip · Pill</h3><p data-v-8cbfa422>Collapsed into two kinds: <b data-v-8cbfa422>Badge</b> (status badge, with an optional status dot) and <b data-v-8cbfa422>Pill</b> (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Badge · status badge</span></div><div class="stage p col" data-v-8cbfa422><span class="stage-label" data-v-8cbfa422>Semantic variants</span><div class="demo-row" data-v-8cbfa422><span class="p-badge neutral" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>pending</span><span class="p-badge info" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>running</span><span class="p-badge success" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>completed</span><span class="p-badge warning" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>needs confirmation</span><span class="p-badge danger" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>failed</span><span class="p-badge solid" data-v-8cbfa422>KIMI</span></div><span class="stage-label" data-v-8cbfa422>With icon / small size</span><div class="demo-row" data-v-8cbfa422><span class="p-badge info" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1m1 2v14h14V5z" data-v-8cbfa422></path></svg>plan</span><span class="p-badge success sm" data-v-8cbfa422><span class="bd" data-v-8cbfa422></span>passed</span><span class="p-badge neutral sm" data-v-8cbfa422>read-only</span></div></div></div>`,19)),t("div",Y,[a[14]||(a[14]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Pill · toolbar pill (composer)")],-1)),t("div",Z,[a[12]||(a[12]=c('<span class="p-pill" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M8 4h13v2H8zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M8 11h13v2H8zm0 7h13v2H8z" data-v-8cbfa422></path></svg><span class="pp-strong" data-v-8cbfa422>kimi-k2</span><span class="pp-sub" data-v-8cbfa422>· thinking</span><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-8cbfa422></path></svg></span>',1)),t("span",X,[s(d(o),{name:"shield-question",size:"sm"}),a[11]||(a[11]=e("yolo",-1))]),a[13]||(a[13]=t("span",{class:"p-pill"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m1-8h4v2h-6V7h2z"})]),e("12k / 200k")],-1))])]),a[28]||(a[28]=c(`<h3 class="sub" data-v-8cbfa422>Kbd · keyboard shortcut</h3><p data-v-8cbfa422><b data-v-8cbfa422>Kbd</b> renders a shortcut as keycaps — one block per key, never inline text like <code data-v-8cbfa422>(⌘K)</code>. Caps are 18px tall (Badge sm rhythm): transparent ground with a 0.5px hairline edge, 11px <code data-v-8cbfa422>--font-kbd</code> (Inter + system-ui), text colour inherited from the row that carries it — the cap has no fill or colour of its own, so it follows its context (bright inside the accent-ringed recording box, quiet in a hint row). Typical placement: pushed to the row's trailing edge, opposite the label (e.g. the sidebar search row), and inside dialog navigation hints.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Kbd · keycaps</span></div><div class="stage p" data-v-8cbfa422><span class="p-kbd" data-v-8cbfa422><kbd data-v-8cbfa422>⌘</kbd><kbd data-v-8cbfa422>K</kbd></span><span class="p-kbd" data-v-8cbfa422><kbd data-v-8cbfa422>Ctrl</kbd><kbd data-v-8cbfa422>K</kbd></span><span class="p-kbd" data-v-8cbfa422><kbd data-v-8cbfa422>⌘</kbd><kbd data-v-8cbfa422>⇧</kbd><kbd data-v-8cbfa422>P</kbd></span></div></div><h3 class="sub" data-v-8cbfa422>Card / Surface</h3><p data-v-8cbfa422>All cards across the site share <b data-v-8cbfa422>one structure</b> — <code data-v-8cbfa422>head / body / foot</code> — and come in two tiers by visual weight:</p><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>Operation card</b> —— composite "process" content such as the Swarm overview. (Individual tool calls are NOT cards anymore: they render as quiet borderless lines, see §04.) Flat shell: <code data-v-8cbfa422>0.5px</code> hairline, <code data-v-8cbfa422>--radius-md</code>, no shadow. The head is compact mono with no fill, low weight by default, not competing with the conversation.</li><li data-v-8cbfa422><b data-v-8cbfa422>Attention card</b> —— content that needs a user decision, such as Question / Approval. A floating neutral card: white raised surface, <code data-v-8cbfa422>--radius-lg</code>, a faint popover shadow (<code data-v-8cbfa422>--shadow-menu</code>), a plain dark title head, and a hairline footer whose actions read in number-key order (chips on the buttons) leading to one solid primary action. No semantic color band.</li></ul><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Operation card · compact mono head (no fill)</span></div><div class="stage p col" data-v-8cbfa422><div class="p-card" style="max-width:460px;" data-v-8cbfa422><div class="p-card-head" data-v-8cbfa422><span class="p-card-title" data-v-8cbfa422>read_file</span><span class="p-badge info sm" style="margin-left:auto;" data-v-8cbfa422>session.ts</span></div><div class="p-card-body" data-v-8cbfa422>The head uses mono + a neutral background to emphasize its "code / process" nature; the body uses sans for readability. Flat, radius-md, same shape as the Swarm composite card.</div></div></div></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Attention card · floating neutral surface (no color band)</span></div><div class="stage p col" data-v-8cbfa422><div class="p-action" style="max-width:460px;" data-v-8cbfa422><div class="p-action-head" data-v-8cbfa422><span class="p-action-title" data-v-8cbfa422>A decision needs your confirmation</span></div><div class="p-action-body" data-v-8cbfa422>A floating neutral card — no color band. The raised surface, large radius and soft shadow lift it above the transcript; the head is a plain dark title, and the hairline footer lines up quiet text buttons leading to one solid primary action.</div><div class="p-action-foot" data-v-8cbfa422><button class="p-btn ghost sm" data-v-8cbfa422>Dismiss</button><button class="p-btn primary sm" data-v-8cbfa422>Confirm</button></div></div></div></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Activity run · a summary row expands into the folded lines</span></div><div class="stage p col" data-v-8cbfa422><div class="p-tool-group open" style="max-width:460px;" data-v-8cbfa422><div class="p-tool-group-head" data-v-8cbfa422><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tg-title" data-v-8cbfa422>Read 2 files</span></div><div class="p-tool-row" data-v-8cbfa422><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>session.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><span class="tr-chip" data-v-8cbfa422>34 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div><div class="p-tool-row" data-v-8cbfa422><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>middleware.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><span class="tr-chip" data-v-8cbfa422>58 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div></div></div></div><ul class="clean check" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>One structure, two shells</b>: every card is <code data-v-8cbfa422>head / body / foot</code>; operation cards are flat + 0.5px hairline + radius-md with no shadow, while the attention card is the single exception — raised surface, radius-lg and a soft shadow, because it floats above the transcript in place of the composer.</li><li data-v-8cbfa422><b data-v-8cbfa422>Differences are intentional</b>: operation cards keep a compact mono head; attention cards get a plain dark title head and footer actions.</li><li data-v-8cbfa422><b data-v-8cbfa422>Grouping</b>: consecutive activity (thinking + tool calls of any kind, cards included) folds into ONE activity-run row — a smart summary sentence that expands into the items in order; only text and successful media tools (inline media is the turn's output) stay out and break the run (see §04).</li><li data-v-8cbfa422><b data-v-8cbfa422>Turn fold</b>: once an assistant turn settles, everything before its final text block (thinking, activity runs, interim text, standalone cards) folds into ONE bare "Worked Ns" row — no glyph, a faint one-line label + rotating chevron sharing the activity-run head's padding and hover language; while the turn streams the row stays hidden and the body forced open, and on settle the row appears and folds itself back. The span is the turn's elapsed time (daemon duration once settled, server message stamps for history; approval/question waits included by design), reading the generic "Work details" without any stamp. The final text — and anything after it, so trailing media / cards stay on screen — never folds; a text-only turn renders no row at all (see §04).</li><li data-v-8cbfa422><b data-v-8cbfa422>Status dots</b>: running (pulsing blue) / done (green) / failed (red), sharing one color vocabulary (see §04 tool calls).</li></ul><h3 class="sub" data-v-8cbfa422>Input / Select / Textarea</h3><p data-v-8cbfa422>Unified 38px height (32px small), <code data-v-8cbfa422>--radius-md</code> radius, <code data-v-8cbfa422>--color-surface-overlay</code> background, and a unified blue focus ring (<code data-v-8cbfa422>0 0 0 3px accent-soft</code>). Select is a custom combobox and listbox, not a native <code data-v-8cbfa422><select></code>; opening it centres the selected option in the scrollable menu. Open Select roots enter the dropdown layer; containing settings groups temporarily release clipping and join that layer so later sections cannot cover the menu.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Form primitives</span></div><div class="stage p col" data-v-8cbfa422><div class="demo-row" style="align-items:flex-start;" data-v-8cbfa422><div class="p-field demo-grow" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>Workspace name</label><input class="p-input" placeholder="e.g. frontend" data-v-8cbfa422><span class="p-hint" data-v-8cbfa422>Only letters, numbers, and hyphens are allowed.</span></div><div class="p-field demo-grow" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>Model provider</label><button class="p-select" type="button" data-v-8cbfa422>Anthropic</button></div></div><div class="p-field" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>System prompt</label><textarea class="p-textarea" placeholder="Describe this Agent's role and boundaries…" data-v-8cbfa422></textarea></div></div></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>States</span></div><div class="stage p col" data-v-8cbfa422><div class="demo-row" style="align-items:flex-start;" data-v-8cbfa422><div class="p-field demo-grow" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>Workspace name</label><input class="p-input" value="my workspace!" style="border-color:var(--p-danger);" data-v-8cbfa422><span class="p-field-error" data-v-8cbfa422>Please enter a valid workspace name</span></div><div class="p-field demo-grow" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>Display name</label><input class="p-input" value="frontend" data-v-8cbfa422><span class="p-hint" data-v-8cbfa422>Normal state · validation passed</span></div></div></div></div><h3 class="sub" data-v-8cbfa422>Code / Diff</h3><p data-v-8cbfa422><b data-v-8cbfa422>Diff controls</b>: The non-selectable branch summary starts with a 14px branch icon, aligns to the panel header's 12px inset, uses 12px labels, and ends with a 0.5px hairline. List and tree choices use the 14px <code data-v-8cbfa422>list</code> and <code data-v-8cbfa422>tree-view</code> registry icons. Flat-list and tree-view paths use the UI font at 12px. Tree roots share the flat list's 14px content inset, then each depth advances by 12px and adds a grey indentation rule.</p><p data-v-8cbfa422><b data-v-8cbfa422>Diff empty state</b>: Centre the clean-workspace message in the available panel height and lead with a quiet 32px status icon.</p><p data-v-8cbfa422><b data-v-8cbfa422>Diff detail body</b>: the right-side diff detail reuses <code data-v-8cbfa422>HighlightedCode</code> unframed (the panel owns the edge and scroll) — shiki highlighting with the language inferred from the file path, an old/new line-number gutter, hunk headers as a muted band, at the shared code size <code data-v-8cbfa422>--code-font-size</code> (12px at Medium, one step below body text). The file preview's code body (text / JSON / HTML and Markdown source) renders through the same component with a per-row number gutter plus search-hit / jump-target row states.</p><p data-v-8cbfa422>Inline code, code blocks, and diff contents use the monospace font (<code data-v-8cbfa422>--p-font-mono</code>); diff change counts and branch summaries use the UI font. Code blocks have a filename title bar and a copy button; the action edge uses a compact 6px inset. Diffs use <code data-v-8cbfa422>+</code> / <code data-v-8cbfa422>-</code> row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Code / Diff</span></div><div class="stage p col" data-v-8cbfa422><span class="stage-label" data-v-8cbfa422>inline code</span><div data-v-8cbfa422>The server uses <code class="p-code-inline" data-v-8cbfa422>jwt.verify(token)</code> to verify the signature, returning 401 on failure.</div><span class="stage-label" data-v-8cbfa422>code block</span><div class="p-code-block" data-v-8cbfa422><div class="p-code-block-head" data-v-8cbfa422><span data-v-8cbfa422>session.ts</span><button class="p-icon-btn sm" aria-label="Copy" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z" data-v-8cbfa422></path></svg></button></div><pre data-v-8cbfa422>import { verify } from './jwt'; - - export function auth(token: string) { - return verify(token, process.env.JWT_SECRET!); - }</pre></div><span class="stage-label" data-v-8cbfa422>diff</span><div class="p-diff" data-v-8cbfa422><div class="p-diff-head" data-v-8cbfa422>session.ts · +3 -1</div><div class="p-diff-row" data-v-8cbfa422><span class="pm" data-v-8cbfa422></span><span class="p-diff-code" data-v-8cbfa422>import { verify } from './jwt';</span></div><div class="p-diff-row del" data-v-8cbfa422><span class="pm" data-v-8cbfa422>-</span><span class="p-diff-code" data-v-8cbfa422>const secret = 'dev-secret';</span></div><div class="p-diff-row add" data-v-8cbfa422><span class="pm" data-v-8cbfa422>+</span><span class="p-diff-code" data-v-8cbfa422>const secret = process.env.JWT_SECRET!;</span></div><div class="p-diff-row" data-v-8cbfa422><span class="pm" data-v-8cbfa422></span><span class="p-diff-code" data-v-8cbfa422>return verify(token, secret);</span></div></div></div></div><h3 class="sub" data-v-8cbfa422>Dialog</h3><p data-v-8cbfa422>One dialog primitive replaces 6 hand-written implementations: unified <code data-v-8cbfa422>--radius-xl</code> radius, <code data-v-8cbfa422>--shadow-xl</code> shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Dialog primitive</span></div><div class="stage p col" style="align-items:center;" data-v-8cbfa422><div class="p-dialog" data-v-8cbfa422><div class="p-dialog-head" data-v-8cbfa422><div data-v-8cbfa422><div class="p-dialog-title" data-v-8cbfa422>New chat</div><div class="p-dialog-desc" data-v-8cbfa422>Create an independent Agent chat in the current workspace.</div></div><button class="p-icon-btn sm" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-8cbfa422></path></svg></button></div><div class="p-dialog-body" data-v-8cbfa422><div class="p-field" data-v-8cbfa422><label class="p-label" data-v-8cbfa422>Chat title (optional)</label><input class="p-input" placeholder="Generated automatically" data-v-8cbfa422></div></div><div class="p-dialog-foot" data-v-8cbfa422><button class="p-btn secondary" data-v-8cbfa422>Cancel</button><button class="p-btn primary" data-v-8cbfa422>Create</button></div></div></div></div><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>Size & height</b>: Dialog offers three widths — <code data-v-8cbfa422>md</code> 440 / <code data-v-8cbfa422>lg</code> 640 / <code data-v-8cbfa422>xl</code> 760 (<code data-v-8cbfa422>--p-content-max</code>) — chosen by content weight. Height comes in two kinds: <code data-v-8cbfa422>auto</code> (default, grows with content up to <code data-v-8cbfa422>max-height</code>) and <code data-v-8cbfa422>fixed</code> (constant height <code data-v-8cbfa422>min(680px, 100vh - 64px)</code>, with overflow scrolled inside the body). <b data-v-8cbfa422>Content / multi-tab dialogs</b> (settings, model picker, provider manager, folder browser) always use <code data-v-8cbfa422>fixed</code> so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep <code data-v-8cbfa422>auto</code>. Selectable controls inside Settings use 0.5px hairlines. Its navigation stays transparent on the grouped canvas — separated from the content region by the 0.5px hairline (horizontal in the stacked mobile layout) — and uses 12px labels at weight 525 with 16px registry icons; the selected tab paints the same neutral <code data-v-8cbfa422>--color-hover</code> wash as hover, with the label simply brightening to <code data-v-8cbfa422>--color-text</code> — the Kimi app settings nav's recipe (<code data-v-8cbfa422>.ss-nav-item--active</code> → <code data-v-8cbfa422>Fills-F1</code>, no accent tint, no weight change); section captions use 16px UI text in <code data-v-8cbfa422>--color-text</code>. Every setting row has a plain-language description; option labels use <code data-v-8cbfa422>--color-text</code> at weight 475 with a 1px gap before that description. Chinese descriptions use “思考” and “计划模式” rather than the English terms; “skills” stays lowercase when it appears within a sentence. Every settings section puts its rows inside one rounded group with 0.5px dividers; the content region paints the flat <code data-v-8cbfa422>--color-surface</code> so each group (<code data-v-8cbfa422>--color-surface-raised</code>) reads one rung above it — never a sunken pit, which would sink the dialog's content below its chrome in dark. The font-size stepper is a compact 32px UI-font control with 12px values and custom minus and plus buttons. Its 52px desktop row centres the control with equal space above and below. Archived workspace headings reuse the sidebar’s <code data-v-8cbfa422>folder-closed</code> registry icon, and Restore actions lead with the <code data-v-8cbfa422>undo</code> icon. Archive counts use weight 500; timestamps and workspace paths use the UI font. </div></div><p data-v-8cbfa422><b data-v-8cbfa422>Dialog backdrop</b>: Use a restrained 28% neutral overlay so the workspace remains legible without competing with the modal.</p><p data-v-8cbfa422><b data-v-8cbfa422>Settings regions</b>: The settings title and close action belong to the right content region. The navigation is a separate full-height region that starts at the dialog's top edge, not content beneath a dialog-wide header.</p><p data-v-8cbfa422><b data-v-8cbfa422>Archived sessions</b>: Start with the localized page title. Do not add a repeated English kicker above it.</p><p data-v-8cbfa422><b data-v-8cbfa422>Settings interaction</b>: Notification labels and descriptions are not selectable; their switches remain fully interactive.</p><p data-v-8cbfa422><b data-v-8cbfa422>Conversation chrome</b>: Header labels are not selectable; the rename input remains selectable and editable. Branch names start with a 14px branch icon. The overflow trigger is a compact 24px control with a 14px icon. Below a 720px header container, hide the workspace prefix and give the conversation title the available width. On macOS desktop the header doubles as the window-drag region and interactive controls opt out with no-drag; while one of its menus or a dock work panel is open every window-drag strip (chat header, sidebar header, panel header) drops the drag region so an outside press anywhere reaches the page and dismisses the overlay (window dragging is simply paused).</p><p data-v-8cbfa422><b data-v-8cbfa422>Session search</b>: follows the §09 flush picker anatomy — a boxed Input under the head, and a result list that fills the body's available height and owns vertical scrolling.</p><p data-v-8cbfa422><b data-v-8cbfa422>Model picker</b>: follows the §09 flush picker anatomy; the provider filter remains horizontally scrollable without showing a persistent scrollbar. Only the model list scrolls; the shortcut bar remains pinned at the bottom.</p><h3 class="sub" data-v-8cbfa422>Toast</h3><p data-v-8cbfa422>Unified information architecture: status icon + title + description. The status color appears only on the icon, avoiding large colored areas that create visual noise. For an <b data-v-8cbfa422>undoable action</b> there is a second, lighter form — the <b data-v-8cbfa422>Action toast</b> (<code data-v-8cbfa422>ActionToast.vue</code>): a pill floating top-center just below the 48px header, carrying a one-line sentence whose actions are plain inline <code data-v-8cbfa422><button></code>s (styled accent by the component), plus close. Self-timed (default 8s, hover pauses); the parent re-keys to reset and wraps it in a <code data-v-8cbfa422><Transition></code>. First used by session archive (Undo / Settings); warnings keep the bottom-right <code data-v-8cbfa422>Toast</code> stack.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Toast</span></div><div class="stage p col" data-v-8cbfa422><div class="p-toast success" data-v-8cbfa422><span class="ti" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg></span><div data-v-8cbfa422><div class="tt" data-v-8cbfa422>Connected to server</div><div class="td" data-v-8cbfa422>The local server is responding normally; you can start a new chat.</div></div></div><div class="p-toast warning" data-v-8cbfa422><span class="ti" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z" data-v-8cbfa422></path></svg></span><div data-v-8cbfa422><div class="tt" data-v-8cbfa422>Context usage 82%</div><div class="td" data-v-8cbfa422>Consider running /compact to free up space.</div></div></div></div></div><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Action toast</span></div><div class="stage p col" data-v-8cbfa422><div class="p-action-toast" data-v-8cbfa422><button class="lk" data-v-8cbfa422>Undo</button><span data-v-8cbfa422>or view archived chats in</span><button class="lk" data-v-8cbfa422>Settings</button><svg class="p-ic x" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path d="M17.9542 4.77253C18.3056 4.42106 18.8761 4.42106 19.2276 4.77253C19.579 5.12401 19.579 5.69452 19.2276 6.04597L13.2735 12.0001L19.2276 17.9542C19.5791 18.3056 19.5791 18.8761 19.2276 19.2276C18.8761 19.5791 18.3056 19.5791 17.9542 19.2276L12.0001 13.2735L6.04595 19.2276C5.69451 19.5791 5.12399 19.579 4.77252 19.2276C4.42104 18.8761 4.42104 18.3056 4.77252 17.9542L10.7266 12.0001L4.77252 6.04597C4.42104 5.6945 4.42104 5.124 4.77252 4.77253C5.12399 4.42107 5.69448 4.42106 6.04595 4.77253L12.0001 10.7266L17.9542 4.77253Z" data-v-8cbfa422></path></svg></div></div></div><h3 class="sub" data-v-8cbfa422>Spinner</h3><p data-v-8cbfa422>Loaders fall into two categories by scenario — <b data-v-8cbfa422>do not mix them</b>:</p><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>Spinner (plain · SVG ring)</b> —— the default loader. Used for button loading, app startup (GlobalLoading), and general inline waits — "everything else".</li><li data-v-8cbfa422><b data-v-8cbfa422>WorkingIndicator (小蓝 mascot · brand signature)</b> —— used <b data-v-8cbfa422>only</b> for the chat working state after a prompt is sent (the sending placeholder in ChatPane, the send → first-token loading in SideChatPanel). The label follows the phase: "Requesting…" until the assistant's reply starts, then "Working…".</li></ul><h4 class="mini" data-v-8cbfa422>Spinner · plain loader (default)</h4>`,39)),t("div",$,[a[18]||(a[18]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Spinner · common scenarios")],-1)),t("div",_,[t("div",aa,[a[17]||(a[17]=c('<svg class="p-spinner" viewBox="0 0 24 24" data-v-8cbfa422><circle class="track" cx="12" cy="12" r="9" data-v-8cbfa422></circle><circle class="arc" cx="12" cy="12" r="9" data-v-8cbfa422></circle></svg><span class="p-thinking" data-v-8cbfa422><svg class="p-spinner sm" viewBox="0 0 24 24" data-v-8cbfa422><circle class="track" cx="12" cy="12" r="9" data-v-8cbfa422></circle><circle class="arc" cx="12" cy="12" r="9" data-v-8cbfa422></circle></svg>Loading…</span>',2)),t("button",ta,[(n(),l("svg",ea,[...a[15]||(a[15]=[t("circle",{class:"track",cx:"12",cy:"12",r:"9"},null,-1),t("circle",{class:"arc",cx:"12",cy:"12",r:"9"},null,-1)])])),a[16]||(a[16]=e("Submitting",-1))])])])]),a[29]||(a[29]=t("h4",{class:"mini"},"WorkingIndicator · 小蓝 mascot (only the chat working state)",-1)),t("div",sa,[a[20]||(a[20]=t("div",{class:"stage-bar"},[t("span",{class:"st"},[e("WorkingIndicator · chat working state only "),t("span",{class:"tag spec"},"signature")])],-1)),t("div",da,[a[19]||(a[19]=t("span",{class:"stage-label"},"Usage · only while the chat has an unfinished prompt",-1)),t("div",oa,[s(x,{label:"Requesting…"}),s(x,{label:"Working…"})])])]),a[30]||(a[30]=c('<div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422>The chat working state is rendered uniformly by <code data-v-8cbfa422>WorkingIndicator</code> — the 小蓝 mascot (<code data-v-8cbfa422>KimiMascot</code>, the kimi.com avatar Rive asset, with a static SVG fallback under reduced motion or when the runtime fails) plus a phase label. All other loading states use the plain Spinner.</div></div><h3 class="sub" data-v-8cbfa422>Link</h3><p data-v-8cbfa422>Inline text link: the default is the accent color with no underline; on hover it shows an underline and darkens. File links inside inline code use a 1.5px underline offset so the line stays clear of the chip background. The <code data-v-8cbfa422>.muted</code> variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Link · inline link</span></div><div class="stage p col" data-v-8cbfa422><div class="demo-row" style="font-size:var(--p-font-size-base);color:var(--p-text);" data-v-8cbfa422><span data-v-8cbfa422>Read the full <a class="p-link" href="#" data-v-8cbfa422>design token docs</a> before building.</span><a class="p-link" href="#" data-v-8cbfa422>View on GitHub<svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z" data-v-8cbfa422></path></svg></a><a class="p-link muted" href="#" data-v-8cbfa422>View history</a></div></div></div><h3 class="sub" data-v-8cbfa422>Menu / Dropdown</h3><p data-v-8cbfa422>Desktop menus use a 3.5px panel inset. Standard items use 5px × 9px padding and a 7px icon gap. Their three-layer neutral shadow stays below 4% opacity.</p><p data-v-8cbfa422>Dropdown menu panel: frosted glass — the translucent <code data-v-8cbfa422>--color-menu-bg</code> fill over a blurred, saturated page backdrop (<code data-v-8cbfa422>--p-menu-backdrop</code>) — plus hairline + light shadow (<code data-v-8cbfa422>--shadow-menu</code>, a three-layer neutral ramp). This is the one place glassmorphism is the design language rather than an exception (§06); every floating menu surface (Menu.vue, the Select listbox, composer dropdowns, slash/mention popups) uses the token pair, never ad-hoc blur values. Menu items support icons, the current (active) state, the danger state, and the disabled state, with separators grouping items. All menu actions use 13px labels at weight 475 with 16px leading icons; both share a 16px line box for vertical alignment. Menu timestamps use the UI font. On touch / mobile, use <code data-v-8cbfa422>lg</code> (≥44px row height) while keeping the same type size. A dropdown menu pops in from its trigger corner — fade plus a slight 0.97 scale over <code data-v-8cbfa422>--duration-base</code> (exit <code data-v-8cbfa422>--duration-fast</code>), the composer model dropdown's motion language; the transform origin and the nudge direction follow the anchoring, including the upward flip near the viewport edge.</p><p data-v-8cbfa422>Row states: hover uses the mode-aware <code data-v-8cbfa422>--color-hover</code> wash (it lightens under dark, never darkens); a leading icon sits one rung below the label (<code data-v-8cbfa422>--muted</code>), and on hover both label and icon step up to <code data-v-8cbfa422>--color-text-strong</code>, the max foreground tier. Selection keeps the accent pair (<code data-v-8cbfa422>--color-accent-soft</code> / <code data-v-8cbfa422>--color-accent-hover</code>); danger keeps its own colour.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Menu · dropdown menu</span></div><div class="stage p col" style="align-items:flex-start;" data-v-8cbfa422><div class="p-menu" data-v-8cbfa422><div class="p-menu-item" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg>Open file</div><div class="p-menu-item active" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg>Selected item</div><div class="p-menu-item disabled" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16M8.523 7.109l8.368 8.368a6 6 0 0 1-1.414 1.414L7.109 8.523A6 6 0 0 1 8.523 7.11" data-v-8cbfa422></path></svg>Disabled item</div><div class="p-menu-sep" data-v-8cbfa422></div><div class="p-menu-item danger" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z" data-v-8cbfa422></path></svg>Delete chat</div></div></div></div><h3 class="sub" data-v-8cbfa422>SegmentedControl</h3><p data-v-8cbfa422>Mutually exclusive short option groups, commonly used for 2–5 option switches such as "light / dark / follow system" or the four font-scale steps. Options may include a 14px registry icon or a colour swatch. A single raised indicator with a soft shadow (no border — the edge stays clean) slides and resizes between options using the standard motion tokens. Three sizes: <code data-v-8cbfa422>md</code> (default, settings pages), <code data-v-8cbfa422>sm</code> (compact rows), and <code data-v-8cbfa422>xs</code> (dense menus such as the composer model dropdown — 20px items, 12px labels).</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>SegmentedControl</span></div><div class="stage p col" data-v-8cbfa422><div class="p-seg" data-v-8cbfa422><span class="p-seg-item on" data-v-8cbfa422>Light</span><span class="p-seg-item" data-v-8cbfa422>Dark</span><span class="p-seg-item" data-v-8cbfa422>Follow system</span></div></div></div><h3 class="sub" data-v-8cbfa422>SecondaryModelPicker</h3><p data-v-8cbfa422>Linked model + thinking-effort picker (settings → Agent → Subagents, experimental; <code data-v-8cbfa422>components/settings/SecondaryModelPicker.vue</code>, shared by both ends). Use it whenever two choices are only valid as a pair — here an effort is meaningless without its model, and every model declares a different supported set. It is a cascading variant of the §03 Select: the trigger is the Select trigger verbatim (value renders <code data-v-8cbfa422>model · effort</code>, the unset state uses the placeholder tint), and the dropdown opens as a SINGLE-LEVEL model list (grouped by provider) on the floating menu surface (<code data-v-8cbfa422>--color-menu-bg</code> / <code data-v-8cbfa422>--p-menu-backdrop</code> / <code data-v-8cbfa422>--shadow-lg</code>). The menu <b data-v-8cbfa422>teleports to <code data-v-8cbfa422><body></code> with <code data-v-8cbfa422>position: fixed</code></b> — it opens on top of the settings modal (on the <code data-v-8cbfa422>--z-modal-dropdown</code> rung), and only a body-level surface escapes the dialog's scrolling-body clip; it re-anchors to the trigger on any outside scroll and closes on window resize (the UserMenu teleport's full recipe). Hovering or clicking a model row flies its effort submenu out to the RIGHT of the row — same menu surface, anchored to the row's live position, flipping to the left only near the viewport edge per the §03 anchoring rules — with a 250ms hover-intent grace (the UserMenu flyout's recipe) so the diagonal path into the submenu doesn't collapse it. Every model row carries a trailing <code data-v-8cbfa422>chevron-right</code> affordance; clicking an effort confirms the pair and closes — one atomic write, never two staggered patches. Flyout options follow the composer's thinking-level model (<code data-v-8cbfa422>segmentsFor</code>): effort models get <code data-v-8cbfa422>off</code> + their declared levels (always-thinking ones get no off), boolean-thinking models get <code data-v-8cbfa422>on</code>/<code data-v-8cbfa422>off</code>, unsupported models get <code data-v-8cbfa422>off</code> alone; while no effort is set at all, a "Model default" entry leads (it writes the model alone — POST /config merges and cannot clear a stored effort, so the entry disappears once one is set). A configured effort the model no longer declares is appended as an extra flyout option so the current pair stays visible and re-selectable. Keyboard mirrors the Select contract (focus stays on the trigger, Esc <code data-v-8cbfa422>preventDefault</code>s so the hosting dialog does not close): ↑/↓ move within the active level (the flyout follows model moves), → opens the flyout, ← collapses it, Enter confirms, Home/End jump. ARIA: combobox trigger → <code data-v-8cbfa422>dialog</code> menu holding a model <code data-v-8cbfa422>listbox</code> plus the effort <code data-v-8cbfa422>listbox</code> flyout with <code data-v-8cbfa422>option</code> rows. The menu itself flips upward when the trigger sits near the viewport bottom.</p><h3 class="sub" data-v-8cbfa422>Tabs</h3><p data-v-8cbfa422>Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Tabs</span></div><div class="stage p col" data-v-8cbfa422><div class="p-tabs" data-v-8cbfa422><span class="p-tab on" data-v-8cbfa422>General</span><span class="p-tab" data-v-8cbfa422>Agent</span><span class="p-tab" data-v-8cbfa422>Advanced</span></div></div></div><h3 class="sub" data-v-8cbfa422>Switch</h3><p data-v-8cbfa422>A two-state switch for settings that take effect immediately. The 36×20 track has a 0.5px hairline and full radius; its 16px knob uses 1.5px internal offsets so the visible inset remains 2px and symmetric after accounting for the border. On hover, the knob eases to an 18px rounded rectangle towards the track centre. When on, the track turns accent and the knob slides right.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Switch</span></div><div class="stage p" data-v-8cbfa422><span class="p-switch on" data-v-8cbfa422></span><span class="p-switch" data-v-8cbfa422></span></div></div><h3 class="sub" data-v-8cbfa422>Checkbox</h3><p data-v-8cbfa422>A 17×17 checkbox. When checked it fills with the accent color and shows a white tick (inline SVG). Often paired with a text label.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Checkbox</span></div><div class="stage p" data-v-8cbfa422><span class="p-check on" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg></span><span class="p-check" data-v-8cbfa422></span><label style="display:inline-flex;align-items:center;gap:8px;color:var(--p-text);font-size:var(--p-font-size-base);cursor:pointer;" data-v-8cbfa422><span class="p-check on" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg></span>Enable auto-save</label></div></div><h3 class="sub" data-v-8cbfa422>Avatar</h3><p data-v-8cbfa422>A 32px default avatar with md radius; <code data-v-8cbfa422>.sm</code> is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Avatar</span></div><div class="stage p" data-v-8cbfa422><span class="p-avatar" data-v-8cbfa422>K</span><span class="p-avatar" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M4 22a8 8 0 1 1 16 0h-2a6 6 0 0 0-12 0zm8-9c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6m0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4" data-v-8cbfa422></path></svg></span><span class="p-avatar sm" data-v-8cbfa422>K</span></div></div><h3 class="sub" data-v-8cbfa422>EmptyState</h3><p data-v-8cbfa422>A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>EmptyState</span></div><div class="stage p col" data-v-8cbfa422><div class="p-empty" style="width:100%;border:0.5px dashed var(--p-line);border-radius:var(--p-r-lg);" data-v-8cbfa422><svg class="em-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M6.455 19L2 22.5V4a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1zm-.692-2H20V5H4v13.385zM8 10h8v2H8z" data-v-8cbfa422></path></svg><div class="em-title" data-v-8cbfa422>No chats yet</div><div class="em-hint" data-v-8cbfa422>Click "New chat" to start a conversation with Kimi</div></div></div></div><h3 class="sub" data-v-8cbfa422>Divider</h3><p data-v-8cbfa422>A 0.5px hairline divider (<code data-v-8cbfa422>--p-line</code>); <code data-v-8cbfa422>.p-divider-v</code> is the vertical divider, used between inline elements.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Divider</span></div><div class="stage p col" data-v-8cbfa422><div style="width:100%;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-8cbfa422>Content above</div><hr class="p-divider" data-v-8cbfa422><div style="width:100%;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-8cbfa422>Content below</div><div style="display:flex;align-items:center;gap:10px;height:24px;font-size:var(--p-font-size-sm);color:var(--p-text);" data-v-8cbfa422><span data-v-8cbfa422>kimi-k2</span><span class="p-divider-v" data-v-8cbfa422></span><span data-v-8cbfa422>thinking</span></div></div></div><h3 class="sub" data-v-8cbfa422>Tooltip</h3><p data-v-8cbfa422>A CSS-only hover hint, wrapped in <code data-v-8cbfa422>.p-tip</code>. Inverted background (<code data-v-8cbfa422>--p-text</code> / <code data-v-8cbfa422>--p-bg</code>), single line, no wrapping — carries only short notes.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Tooltip (hover the button)</span></div><div class="stage p" data-v-8cbfa422><span class="p-tip" data-v-8cbfa422><button class="p-icon-btn" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" data-v-8cbfa422></path></svg></button><span class="p-tooltip" data-v-8cbfa422>New chat</span></span></div></div><h3 class="sub" data-v-8cbfa422>Banner</h3><p data-v-8cbfa422>An inline notice bar placed at the top of a content area. Three states — <code data-v-8cbfa422>.info</code> / <code data-v-8cbfa422>.warning</code> / <code data-v-8cbfa422>.danger</code> — each with a matching 18px icon.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Banner</span></div><div class="stage p col" data-v-8cbfa422><div class="p-banner info" data-v-8cbfa422><svg class="bn-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16M11 7h2v2h-2zm0 4h2v6h-2z" data-v-8cbfa422></path></svg>Connected to server</div><div class="p-banner warning" data-v-8cbfa422><svg class="bn-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z" data-v-8cbfa422></path></svg>Currently in yolo mode; tool calls will run automatically</div></div></div><h3 class="sub" data-v-8cbfa422>Sheet / BottomSheet</h3><p data-v-8cbfa422>A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>BottomSheet</span></div><div class="stage p col" style="align-items:center;" data-v-8cbfa422><div class="p-sheet" style="width:100%;max-width:360px;" data-v-8cbfa422><div class="p-sheet-handle" data-v-8cbfa422></div><div style="font-size:var(--p-font-size-base);font-weight:700;color:var(--p-text);margin-bottom:8px;" data-v-8cbfa422>Choose a model</div><div class="p-menu-item" style="padding:8px 10px;" data-v-8cbfa422>kimi-k2 · thinking</div><div class="p-menu-item" style="padding:8px 10px;" data-v-8cbfa422>kimi-k2 · instant</div></div></div></div><h3 class="sub" data-v-8cbfa422>Skeleton</h3><p data-v-8cbfa422>A placeholder for loading content, using a breathing opacity animation (no gradients), following the <code data-v-8cbfa422>no-gradient-text</code> rule. Composed into titles / text lines / avatars.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Skeleton</span></div><div class="stage p col" data-v-8cbfa422><div style="display:flex;flex-direction:column;gap:10px;width:100%;max-width:360px;" data-v-8cbfa422><div class="p-skeleton" style="height:16px;width:55%;" data-v-8cbfa422></div><div class="p-skeleton" style="height:12px;width:100%;" data-v-8cbfa422></div><div class="p-skeleton" style="height:12px;width:82%;" data-v-8cbfa422></div><div class="p-skeleton" style="height:32px;width:32px;border-radius:var(--p-r-full);" data-v-8cbfa422></div></div></div></div><h3 class="sub" data-v-8cbfa422>Command Bar</h3><p data-v-8cbfa422>An inline combination of "primary action + command text + copy", sitting between a button and a code block — used for install / onboarding / one-click execution. The primary action reuses <code data-v-8cbfa422>Button primary</code>; the command area uses a mono light-grey background.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Command Bar</span></div><div class="stage p col" data-v-8cbfa422><div class="p-cmdbar" style="max-width:620px;" data-v-8cbfa422><button class="p-btn primary" data-v-8cbfa422>Install Kimi Web ▾</button><span class="p-cmd" data-v-8cbfa422><span class="cmd-text" data-v-8cbfa422>curl -fsSL https://code.kimi.com/install.sh | bash</span><button class="cmd-copy" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z" data-v-8cbfa422></path></svg></button></span></div></div></div><h3 class="sub" data-v-8cbfa422>TopBar</h3><p data-v-8cbfa422>The application top bar. Solid by default; the <code data-v-8cbfa422>.frost</code> variant is translucent + background blur, used <b data-v-8cbfa422>only for sticky navigation bars</b>. Together with the floating menu surfaces (Menu / Dropdown), it is one of the two exceptions to the <code data-v-8cbfa422>no-glassmorphism</code> rule (see §06).</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>TopBar · solid / frosted glass</span></div><div class="stage p col" style="gap:14px;background:radial-gradient(circle at 18% 30%,rgba(23,131,255,.16),transparent 42%),radial-gradient(circle at 82% 75%,rgba(20,23,28,.10),transparent 46%),var(--p-surface-sunken);" data-v-8cbfa422><div class="p-topbar" style="width:100%;max-width:580px;" data-v-8cbfa422><span class="tb-title" data-v-8cbfa422>Solid TopBar</span><span class="tb-actions" data-v-8cbfa422><button class="p-icon-btn sm" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-8cbfa422></path></svg></button></span></div><div class="p-topbar frost" style="width:100%;max-width:580px;" data-v-8cbfa422><span class="tb-title" data-v-8cbfa422>Frosted-glass TopBar · .frost</span><span class="tb-actions" data-v-8cbfa422><button class="p-icon-btn sm" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z" data-v-8cbfa422></path></svg></button></span></div></div></div><h3 class="sub" data-v-8cbfa422>Find Bar · transcript search</h3><p data-v-8cbfa422>The in-transcript find bar (Cmd/Ctrl+F), implemented by <code data-v-8cbfa422>components/chat/TranscriptSearch.vue</code>. A floating card pinned to the transcript's top-right (<code data-v-8cbfa422>top: --panel-head-h + --space-3</code>, <code data-v-8cbfa422>right: --space-3</code> — equal inset on both axes), <code data-v-8cbfa422>--z-sticky</code>, raised surface + 0.5px hairline + <code data-v-8cbfa422>--shadow-menu</code>. <b data-v-8cbfa422>One radius for both states</b>: <code data-v-8cbfa422>--radius-2xl</code> is a full capsule at the collapsed height and a card once the footer expands — never animate between two radii.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Part</th><th data-v-8cbfa422>Rule</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Input row</td><td data-v-8cbfa422>Search icon (muted) + <b data-v-8cbfa422>bare input</b> — the list-style bare-input exception family (sidebar search row, inline rename), NOT the boxed Input primitive; the 38px bordered control would break the pill. Circular close <code data-v-8cbfa422>IconButton sm</code> (concentric with the capsule end); a 0.5px hairline separator before it. Height comes from the grid: 32px control (<code data-v-8cbfa422>--space-8</code>) + 2× <code data-v-8cbfa422>--space-1</code> padding = 40px — at which <code data-v-8cbfa422>--radius-2xl</code> is exactly the half-height capsule.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Footer (results)</td><td data-v-8cbfa422>Expands via the 0fr→1fr grid fold (<code data-v-8cbfa422>--duration-slow</code>), hairline top separator, prev/next <code data-v-8cbfa422>IconButton sm</code> left, right-aligned muted count (<code data-v-8cbfa422>N/M results</code> · <code data-v-8cbfa422>--ui-font-size-sm</code>). Only exists once a query has settled — while typing or empty, the bar stays a bare pill.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>States</td><td data-v-8cbfa422>collapsed (empty query) / searching (<code data-v-8cbfa422>Spinner sm</code> in the input row during the ~800ms debounce) / results / no-results (count reads "No results", nav disabled). Disabled is uniformly <code data-v-8cbfa422>opacity:.5</code>.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Focus</td><td data-v-8cbfa422>Composer-style: a neutral hairline overlay (<code data-v-8cbfa422>::after</code> + <code data-v-8cbfa422>--color-composer-focus-line</code>) fading in on <code data-v-8cbfa422>:focus-within</code>. No accent ring.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Match ink</td><td data-v-8cbfa422>CSS Custom Highlight API — the bar mutates no transcript DOM. All matches: <code data-v-8cbfa422>--color-search-match</code> (yellow); current: <code data-v-8cbfa422>--color-search-match-current</code> + a 2px <code data-v-8cbfa422>--color-warning</code> outline ring (a positioned overlay — highlight pseudos can't paint box outlines). Tokens live in <code data-v-8cbfa422>app-ui/style.css</code> with light/dark pairs.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Keyboard</td><td data-v-8cbfa422>Cmd/Ctrl+F opens + focuses (repeat = re-focus + select-all; hardcoded, reserved in the desktop keymap), Enter / Shift+Enter steps matches (wrapping), Esc closes from ANY control inside (container-level, so it never reaches the conversation's Esc-abort).</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Matching semantics</td><td data-v-8cbfa422>Rendered transcript DOM only (unloaded older pages are out of scope), capped at 1000 matches (count reads <code data-v-8cbfa422>N/1000+</code>). Matches span inline nodes within one block, never cross block breaks; <code data-v-8cbfa422>inert</code> and <code data-v-8cbfa422>display:none</code> content is excluded. Stepping scrolls the match's own rect into view, not its parent element.</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>SectionLabel</h3><p data-v-8cbfa422>A small group title for sidebar lists, used to section the content below (such as <code data-v-8cbfa422>Workspaces</code> in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing <code data-v-8cbfa422>.08em</code>, color <code data-v-8cbfa422>--color-fg-faint</code>; left-aligned to the row's starting padding (<code data-v-8cbfa422>--sb-pad-x</code>), keeping the same indent as the group rows below. For scripts without case (such as Chinese), <code data-v-8cbfa422>text-transform:uppercase</code> simply has no effect — no special handling needed.</p>',55)),t("div",ca,[a[26]||(a[26]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Sidebar · group title")],-1)),t("div",ia,[a[25]||(a[25]=t("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),t("div",na,[(n(),l("svg",la,[...a[21]||(a[21]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[22]||(a[22]=e(" kimi-code-web ",-1))]),t("div",ra,[(n(),l("svg",va,[...a[23]||(a[23]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[24]||(a[24]=e(" playground ",-1))])])])]),t("section",ba,[a[136]||(a[136]=c('<div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>04</span><h2 class="sec-title" data-v-8cbfa422>Chat Interface Overhaul</h2></div><p class="sec-desc" data-v-8cbfa422> The message stream is the core of Kimi Web. Tool calls render as <b data-v-8cbfa422>quiet activity lines</b> — one borderless line per call, bespoke per tool kind, auto-grouped, expanding on demand — while Question / Approval elevate to a <b data-v-8cbfa422>floating neutral surface</b> because they need a decision, and the Swarm composite keeps a card; the Composer collapses into a single rounded container. </p><h3 class="sub" data-v-8cbfa422>Unified message stream</h3><p data-v-8cbfa422>User-message bubbles follow the kimiwork production recipe (<code data-v-8cbfa422>MessageItem .user-bubble</code>): a neutral <code data-v-8cbfa422>--color-user-bubble-bg</code> fill (BubbleGray — <code data-v-8cbfa422>#f5f5f5</code> light / <code data-v-8cbfa422>#292929</code> dark), uniform <code data-v-8cbfa422>--radius-lg</code> corners, no border, no shadow.</p><p data-v-8cbfa422>Message timestamps use 12px UI text at weight 500, matching the compact metadata scale without switching to a monospace face.</p><p data-v-8cbfa422>The user-message metadata row sits one 8px spacing step below the bubble, so its actions and timestamp read as supporting information rather than part of the bubble edge.</p><p data-v-8cbfa422>Overlong user messages clamp at 10 measured lines, the tail dissolving through an alpha mask rather than a tint overlay (the translucent accent fill would double-composite); a floating pill toggle centred on the fade expands in place and collapses back, and the collapse pins the toggle itself so the reading position survives. Skill / plugin command args clamp through the same wrapper, beside the card head. Like the transcript's other disclosure controls (thinking row, turn fold, tool lines), the toggle is a bare native button carrying <code data-v-8cbfa422>aria-expanded</code> — chat-surface disclosure controls do not use the §03 Button primitive.</p><p data-v-8cbfa422>The floating jump-to-latest control uses 12px UI text at weight 525, led by the full down-arrow icon rather than a disclosure caret.</p><p data-v-8cbfa422>Thinking is an inline, borderless disclosure row in the message stream — never a side panel. The k15 bulb (the <code data-v-8cbfa422>thinking</code> registry icon) leads the row in every state; while streaming the "Thinking…" label breathes (opacity only, never a gradient shimmer) and whole elapsed seconds tick beside it, afterwards the label settles to "Thinking process" with the final span as <code data-v-8cbfa422>· Ns</code> (renderer-measured, live sessions only — history shows no seconds). Collapsed by default, it expands in place with the standard grid-rows animation and a 90° chevron rotation, and it folds itself back once the stream moves past it, even if the user expanded mid-stream. The header only animates its text colour on hover (standard duration and easing tokens), no card shell.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Conversation · 760px reading column</span></div><div class="stage p col" style="align-items:center;background:#fff;" data-v-8cbfa422><div class="demo-chat" data-v-8cbfa422><div class="p-bubble-user" data-v-8cbfa422>Please change the login endpoint to JWT and add the corresponding unit tests.</div><span class="p-thinking" data-v-8cbfa422><span style="font-size:15px;line-height:1;" data-v-8cbfa422>🌔</span>Analyzing the auth module…</span><div class="p-tool-group open" data-v-8cbfa422><div class="p-tool-group-head" data-v-8cbfa422><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tg-title" data-v-8cbfa422>Read 2 files</span><svg class="tg-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg></div><div class="p-tool-row expanded" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>session.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth · :12-45</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>34 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div><div class="p-tool-detail" data-v-8cbfa422><div class="p-code" data-v-8cbfa422>12 export function verify(token: string) {<br data-v-8cbfa422>13 return jwt.verify(token, getSecret());<br data-v-8cbfa422>14 }</div></div><div class="p-tool-row" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>middleware.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>58 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div></div><div class="p-tool-row" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414 1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zM4 21h16v-2H4v2z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Edit</span><span class="tr-file" data-v-8cbfa422>middleware.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-add" data-v-8cbfa422>+12</span><span class="tr-del" data-v-8cbfa422>−4</span><span class="tr-bar" aria-hidden="true" data-v-8cbfa422><span style="flex:12;background:var(--p-success);" data-v-8cbfa422></span><span style="flex:4;background:var(--p-danger);" data-v-8cbfa422></span></span><span class="tr-ok" data-v-8cbfa422>✓</span></div><div class="p-tool-row" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Search</span><span class="tr-mono" data-v-8cbfa422>"jwt.verify"</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>4 results</span><span class="tr-ok" data-v-8cbfa422>✓</span></div><div class="p-msg" data-v-8cbfa422><p data-v-8cbfa422>I looked at the structure of <code data-v-8cbfa422>src/auth</code>; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.</p></div><div class="p-action" data-v-8cbfa422><div class="p-action-head" data-v-8cbfa422><span class="p-action-title" data-v-8cbfa422>A decision needs your confirmation</span></div><div class="p-action-body" data-v-8cbfa422>How long should the JWT expiry be? Default 7 days, refresh token 30 days.</div><div class="p-action-foot" data-v-8cbfa422><button class="p-btn ghost sm" data-v-8cbfa422>Customize</button><button class="p-btn primary sm" data-v-8cbfa422>Use default</button></div></div><div class="p-action" data-v-8cbfa422><div class="p-action-head" data-v-8cbfa422><span class="p-action-title" data-v-8cbfa422>Write permission required</span></div><div class="p-action-body" data-v-8cbfa422>About to modify <code data-v-8cbfa422>src/auth/middleware.ts</code>, 42 lines changed. Allow?</div><div class="p-action-foot" data-v-8cbfa422><button class="p-btn primary sm" data-v-8cbfa422>Allow this time</button><button class="p-btn ghost sm" data-v-8cbfa422>Always allow</button><button class="p-btn ghost sm" data-v-8cbfa422>Deny</button></div></div><div class="p-todo" data-v-8cbfa422><div class="p-todo-row done" data-v-8cbfa422><span class="p-todo-check" data-v-8cbfa422><svg viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z" data-v-8cbfa422></path></svg></span>Replace session with JWT signing</div><div class="p-todo-row active" data-v-8cbfa422><span class="p-todo-check" data-v-8cbfa422><svg viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><circle cx="12" cy="12" r="3.5" data-v-8cbfa422></circle></svg></span>Refactor the auth middleware</div><div class="p-todo-row" data-v-8cbfa422><span class="p-todo-check" data-v-8cbfa422><svg viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><circle cx="12" cy="12" r="3.5" data-v-8cbfa422></circle></svg></span>Add unit tests</div></div></div></div></div><p data-v-8cbfa422><b data-v-8cbfa422>Wide markdown tables (desktop):</b> regular chat prose stays within the 760px reading column (<code data-v-8cbfa422>--p-content-max</code>), and tables stay there too by default — an overflowing table scrolls horizontally inside its own wrapper, so the page and the chat area never scroll sideways. A clipped table shows a gradient fade at its truncated right edge, and hovering the table reveals a small widen button at its top-right corner; clicking it lets the table grow naturally with its content up to 1040px (<code data-v-8cbfa422>--p-table-max</code>), centred within the conversation pane, and clicking again restores the default width. At the default width a single column is capped at 36% of the pane; once widened the cap relaxes to 700px (<code data-v-8cbfa422>--p-table-cell-max</code>), so long cell content wraps inside the cell instead of stretching the table. The conversation outline (TOC) keeps its usual position just outside the reading column; when a widened table grows past it and scrolls under the rail, the TOC is hidden temporarily and returns as soon as the table leaves, without touching the user's TOC setting. On mobile a table never breaks out of the reading column.</p><h3 class="sub" data-v-8cbfa422>Tool calls: quiet activity lines, bespoke per tool</h3><p data-v-8cbfa422>High-frequency calls like <code data-v-8cbfa422>read</code> / <code data-v-8cbfa422>bash</code> / <code data-v-8cbfa422>grep</code> are "operational noise" — boxed, collapsible cards quickly drown out the conversation. Tool calls therefore render as <b data-v-8cbfa422>one quiet borderless line</b> in the message stream — never a card — and each tool kind composes that line for its own content, so the stream reads like an activity log rather than a pile of widgets. The three visual-weight tiers:</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Three visual-weight tiers</span></div><div class="stage p col" data-v-8cbfa422><span class="stage-label" data-v-8cbfa422>① Tool line · lightest (default) — bespoke content per tool, no card chrome</span><div class="p-tool-row" style="align-self:stretch;" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm3 3h5v2H7V8zm0 4h8v2H7v-2z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Run</span><span class="tr-mono" data-v-8cbfa422>pnpm run build && pnpm lint</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>0.8s</span><span class="tr-ok" data-v-8cbfa422>✓</span></div><span class="stage-label" data-v-8cbfa422>② Activity run · medium (consecutive quiet activity — thinking + tool lines — folds to one smart-summary row)</span><div class="p-tool-group" data-v-8cbfa422><div class="p-tool-group-head" data-v-8cbfa422><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tg-title" data-v-8cbfa422>Read 3 files</span><svg class="tg-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg></div></div><span class="stage-label" data-v-8cbfa422>③ Sub Agent identity card · one per delegation — task title + agent type; the whole card opens the side panel (no in-stream expansion, never grouped)</span><div class="p-agent-card" data-v-8cbfa422><span class="pa-ic" data-v-8cbfa422><svg viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M13.5 2c0 .444-.193.843-.5 1.118V5h5a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h5V3.118A1.5 1.5 0 1 1 13.5 2M6 7a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1zm-4 3H0v6h2zm20 0h2v6h-2zM9 14.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m6 0a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3" data-v-8cbfa422></path></svg></span><span class="pa-main" data-v-8cbfa422><span class="pa-task" data-v-8cbfa422>分析双引擎架构</span><span class="pa-type" data-v-8cbfa422>Explore</span></span><span class="pa-ok" data-v-8cbfa422>✓</span><span class="pa-go" data-v-8cbfa422>→</span></div><span class="stage-label" data-v-8cbfa422>④ Decision card · heavy (only question / approval, needs user input)</span><div class="p-action" data-v-8cbfa422><div class="p-action-head" data-v-8cbfa422><span class="p-action-title" data-v-8cbfa422>Write permission required</span></div><div class="p-action-body" data-v-8cbfa422>About to modify <code data-v-8cbfa422>src/auth/middleware.ts</code>, 42 lines changed.</div></div></div></div><ul class="clean check" data-v-8cbfa422><li data-v-8cbfa422>A tool call renders as <b data-v-8cbfa422>one quiet borderless line</b> (~24px, the thinking row's rhythm): leading glyph, tool-specific content, trailing meta + status. There is no card chrome and no hover wash — the chevron hugging the line's text (thinking-row style, never pushed to the far edge) is the only disclosure affordance, a real <code data-v-8cbfa422><button></code> carrying <code data-v-8cbfa422>aria-expanded</code> (keyboard path); the head itself is a plain click target (mouse path), so trailing slots may hold genuine buttons of their own (e.g. Agent's "open detail").</li><li data-v-8cbfa422><b data-v-8cbfa422>One type scale for the whole stream</b>: thinking rows, fold summary rows and tool lines all set 13px UI text; in-line mono and trailing meta run one step down at 12px (a monospace x-height reads larger, so 12px sits level next to 13px). Hierarchy comes from colour, never from size jumps or bold — everything on the line is regular weight: the only dark object is the file-name button (<code data-v-8cbfa422>--color-text</code> — the one interactive place to go); the action label (Run / Read / Edit…), the mono command / pattern and secondary context all sit at <code data-v-8cbfa422>--color-text-muted</code>; auxiliary elements (glyphs, chevrons, trailing meta) stay <code data-v-8cbfa422>--color-text-faint</code>. The stream thus reads in three quiet tiers: prose in text, tool lines in muted, thinking / captions in faint. Line content is centre-aligned so mono-only rows (Bash) sit level with the icon and chevron. Truncating line content (the CSS-ellipsis spans) sets <code data-v-8cbfa422>--leading-tight</code> rather than the row's <code data-v-8cbfa422>line-height: 1</code> — a 1em line box is shorter than the font's ascent + descent, so <code data-v-8cbfa422>overflow: hidden</code> would clip descenders (j / p / g / y); mono runs take the font's own <code data-v-8cbfa422>normal</code> leading instead, since JetBrains Mono's ≈1.32em metrics exceed <code data-v-8cbfa422>--leading-tight</code>. The 16px chevron still drives the ~24px row height.</li><li data-v-8cbfa422><b data-v-8cbfa422>Every tool kind composes its own line, leading with the tool's localized action label</b> (Run / Read / Edit / Write / Search / Find / Fetch…): Bash pairs its label with the full command in mono (CSS-truncated) plus a duration chip; Read / Edit / Write follow the label with the file name as a real button (opens the file preview) followed by the directory, a <code data-v-8cbfa422>:line-range</code> or a <code data-v-8cbfa422>+N −M</code> stat with a mini segmented bar; Grep shows the pattern in mono plus a match count; Glob / Ls list paths; Todo carries the active task with a done/total progress bar; goal tools show a coloured status pill; ExitPlanMode expands into a read-only plan receipt with its persisted review outcome. Unrecognized tools fall back to glyph + localized label + argument summary.</li><li data-v-8cbfa422><b data-v-8cbfa422>The settled question is the one exception to the quiet line</b>: once AskUserQuestion settles with a recognized answer, it becomes a small <b data-v-8cbfa422>receipt card</b> — the question card's echo (raised surface, hairline edge, lg radius, <code data-v-8cbfa422>--shadow-xs</code>, flush with the stream's left edge, ≤560px). The card echoes only the picks, checked with the live QuestionCard's CSS glyph language one step down (14px); passed-over options are not echoed. Dismissed (or zero-answer) collapses to a slim italic one-line card; while running, and for unrecognized output (background launch / error), it stays the plain quiet disclosure line with the raw output.</li><li data-v-8cbfa422>Clicking a line <b data-v-8cbfa422>expands it in place</b>; the detail hangs below at the line's own left edge (no inset), so it reads as part of the stream rather than as a separate card. Details are one of: the mono output panel (content-well surface, hairline edge, 12-line scroll cap), the inline diff, or clickable match / file lists (<code data-v-8cbfa422>path:line</code> opens the preview at that line). Code-bearing details — the Read content, the Edit diff, the Write content — are <b data-v-8cbfa422>syntax-highlighted by file type</b> (github-light / github-dark, following the colour scheme), with the Read output's real line numbers as the gutter; highlighting mounts lazily on first expand and degrades to plain text for unknown languages or oversized content.</li><li data-v-8cbfa422>Rows sit <b data-v-8cbfa422>flush with the message stream's left edge</b> (same alignment as prose and the thinking row): no inset, no hover wash, and the glyph rides the thinking row's 4px icon-to-text rhythm with no padded slot. Expanded rows inside a group stack directly on the shared rhythm — no dividers.</li><li data-v-8cbfa422>Consecutive activity — thinking segments and tool calls of ANY kind, quiet lines and richer cards alike — <b data-v-8cbfa422>folds into ONE activity-run row</b>: a smart summary sentence that aggregates the run per tool kind in first-appearance order (<code data-v-8cbfa422>Read 2 files · Ran 5 commands (1 failed) · 26s</code>), the failure clause hanging on its kind in danger red, the total span faint at the tail — one line, ellipsis-truncated, the full sentence in the title tooltip. Thinking items fold into the run but are not narrated in the sentence. The row shares the thinking row's language (borderless faint text row, text-colour hover only, one whole-row button with a rotating chevron) but rides a roomier 8px vertical padding — 30px against the quiet lines' 22px, so the turn-level summary keeps its presence between prose paragraphs; while the turn streams through the run the row stays expanded and the summary turns live (current action + cumulative per-kind stats + ticking whole seconds), and once every item settles it folds itself back — even if the user expanded it mid-run (the thinking block's vocabulary); a settled → running transition (the stream appending to the same run) reopens it. The glyph carries the state: the current step's own icon breathing while running, green ✓ / red ✕ once settled. A run needs <b data-v-8cbfa422>≥ 2 steps</b> — a lone step renders standalone as the block it always was. <b data-v-8cbfa422>Text never folds</b> (it breaks the run), and neither do successful media tools (no card — inline media is the turn's output); everything else folds, cards included: Todo / Goal progress narration, the sub-agent identity card, Question / Swarm cards and unrecognized kinds (skills, MCP tools) all join the run — the stay-expanded-while-live rule keeps a card visible exactly while it is active. The expanded run is the items flat in order (thinking rows + tool rows), each with its own in-row details intact — the lines keep their own 4px row rhythm but breathe 8px apart, with a small inset below the head.</li><li data-v-8cbfa422><b data-v-8cbfa422>Above the activity run sits the turn fold</b> (<code data-v-8cbfa422>TurnFold.vue</code>): when an assistant turn settles, every block before the LAST text block — thinking segments, activity runs, interim text paragraphs, Todo / Goal / sub-agent cards — folds into a single bare row reading <code data-v-8cbfa422>Worked 4m57s</code> (whole seconds, no glyph, no summary sentence), expanding into the folded blocks in order, each with its own rendering intact. The span is the turn's ELAPSED time (<code data-v-8cbfa422>turnWorkMs</code>): it ticks from the stamped start while the turn is open — approval/question waits included by design, so no park bookkeeping exists — then reads the daemon's own <code data-v-8cbfa422>durationMs</code> once settled (the server message stamps for history turns); the wall clock only feeds the live tick, so throttled tabs, session switches and remounts cannot corrupt the settled value. Without any stamp the row falls back to the generic <code data-v-8cbfa422>Work details</code>. Streaming turns show no row and a forced-open body — the live transcript is untouched, the fold lands only when the stream moves past the turn (or the turn parks). The split never hides the turn's output: the final text block and any trailing blocks (inline media, standalone cards) stay visible, and a text-only turn folds nothing. Fold state is a plain component ref — nothing persists, switching sessions resets to folded. Inside the right-side sub-agent transcript, disclosure bodies open instantly while their chevrons retain the standard rotation: animating the height of a full historical stream would relayout the entire panel on every animation frame.</li><li data-v-8cbfa422><b data-v-8cbfa422>A sub-agent delegation is an identity card</b> — never a quiet line: the card carries the TASK as its title and the agent type as a quiet meta line, while the orchestrator's full prompt stays out of the stream on purpose. The whole card is one action (the quiet shell vocabulary: raised surface, hairline edge, large radius, no shadow): click to open the subagent's live progress in the side panel — there is no in-stream expansion.</li><li data-v-8cbfa422>Status keeps the shared vocabulary: running (pulsing accent dot) / done (green ✓) / failed (red ✗), at the line's right edge. <b data-v-8cbfa422>Only two types keep a full card</b>: <code data-v-8cbfa422>Question</code> and <code data-v-8cbfa422>Approval</code> — they genuinely need the user's attention. The Swarm composite keeps one quiet card (raised surface, 0.5px hairline, large radius) for its phase overview + member accordion.</li><li data-v-8cbfa422><b data-v-8cbfa422>A task notification is a status card, not a quiet line</b> (<code data-v-8cbfa422>NotificationCard.vue</code>): the hidden <code data-v-8cbfa422><notification></code> injections (background-task / sub-agent settlement) render where they landed in the turn — a 28px status chip + title/sub head tinted with the toast status token pairs (completed → success, failed / timed_out / lost → danger, killed → warning, else neutral surface), expanding in place to the fields, the body, an output-file row (copy path) and the raw payload. ≥2 CONSECUTIVE notifications merge into one neutral group card (count + per-item status dots + compact rows, each expanding on its own). Notifications break the activity run but are never turn boundaries, and they <b data-v-8cbfa422>never fold</b> — a notification is an event worth noticing, not process noise, so it punches out of the turn fold and renders right after the fold row, in order.</li><li data-v-8cbfa422><b data-v-8cbfa422>A turn that dies on a model-request failure leaves a persistent terminal card</b> at the transcript tail (ChatPane's <code data-v-8cbfa422>.turn-failed</code>): the notification card's danger shell (danger-soft surface, danger hairline, 24px status chip with the warning glyph) carrying a title keyed by the wire error kind (model failure vs step-limit stop), the provider message as a muted sub, a mono diagnostics meta (code · HTTP status · request id), and exactly ONE secondary sm action — Continue, which submits a short continue prompt through the normal path. It renders only while the session sits idle on <code data-v-8cbfa422>lastTurnReason === 'failed'</code> (a turn with zero assistant output included, so it pins to the tail rather than any assistant row), it is not dismissible, and it vanishes the moment a new turn starts. While the turn is still fighting, the working indicator instead narrates the retry backoff ("retrying n/max" from the live <code data-v-8cbfa422>agent.status.updated</code> phase) — a retrying turn never shows the card. The transient error toast now fires only for background sessions; the viewed session's failure is fully covered by the card.</li><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Turn failed card · persistent terminal marker + one resume action</span></div><div class="stage p col" data-v-8cbfa422><div class="p-turn-failed" data-v-8cbfa422><span class="tf-chip" data-v-8cbfa422><svg viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path d="M11.9996 7C11.5026 7 11.0996 7.36985 11.0996 7.82609V14.1739C11.0996 14.6301 11.5026 15 11.9996 15C12.4967 15 12.8996 14.6301 12.8996 14.1739V7.82609C12.8996 7.36985 12.4967 7 11.9996 7Z" data-v-8cbfa422></path><path d="M12.8996 17.1006C12.8996 17.5974 12.4968 18.001 11.9992 18.001C11.5024 18.001 11.0996 17.5974 11.0996 17.1006C11.0996 16.6038 11.5024 16.2002 11.9992 16.2002C12.4968 16.2002 12.8996 16.6038 12.8996 17.1006Z" data-v-8cbfa422></path><path fill-rule="evenodd" clip-rule="evenodd" d="M14.5108 3.5501C13.3946 1.61676 10.6041 1.61676 9.48786 3.5501L1.69363 17.0501C0.577423 18.9834 1.97269 21.4001 4.20511 21.4001H19.7936C22.026 21.4001 23.4212 18.9834 22.305 17.0501L14.5108 3.5501ZM11.0467 4.4501C11.4701 3.71676 12.5286 3.71676 12.952 4.4501L20.7462 17.9501C21.1696 18.6834 20.6403 19.6001 19.7936 19.6001H4.20511C3.35833 19.6001 2.82909 18.6834 3.25248 17.9501L11.0467 4.4501Z" data-v-8cbfa422></path></svg></span><div class="tf-main" data-v-8cbfa422><span class="tf-title" data-v-8cbfa422>模型请求失败,本轮对话已中断</span><span class="tf-sub" data-v-8cbfa422>429 The engine is currently overloaded, please try again later</span><span class="tf-meta" data-v-8cbfa422>provider.rate_limit · HTTP 429 · req_01KZ8Y…</span></div><button class="p-btn secondary sm" data-v-8cbfa422>继续</button></div></div></div><li data-v-8cbfa422><b data-v-8cbfa422>A goal-continuation turn carries a provenance row</b>: the hidden <code data-v-8cbfa422>goal_continuation</code> trigger (goal mode's self-driven next turn — a turn boundary, unlike task notifications) never renders its machine prompt; instead the assistant turn it opens shows one faint 12px line flush with the stream's left edge — the <code data-v-8cbfa422>target</code> glyph shared with the Goal tool (this turn belongs to the goal) + a localized label — ABOVE the turn's content and OUTSIDE the turn fold, so the row survives as the turn's provenance after settling. The marker lands with the trigger (before the first assistant block), and while the newest exchange is a goal-continuation turn the undo affordances (edit-and-resend, Esc undo) are suppressed — rewinding would drop the hidden trigger while refilling the older user text.</li><li data-v-8cbfa422><b data-v-8cbfa422>A settled turn's file changes are one summary card</b> (<code data-v-8cbfa422>TurnFilesSummary.vue</code>): between the turn's final text and its footer, a §03 <code data-v-8cbfa422>Card</code> (hairline border, no shadow — NOT the quiet tool line, the artifacts are worth a discrete object) lists every file the turn's Edit / Write calls touched. The head reads "N files changed" with the aggregate <code data-v-8cbfa422>+A −D</code> and the mini diffbar; the aggregate hides whenever any row's stats are incomplete (a Write or an underivable edit makes the total a lower bound, never presented as exact). Each row is one clickable workspace-relative path (short and self-locating; a file outside the cwd stays absolute) with its per-file <code data-v-8cbfa422>+A −D</code> at the right edge. The row's action keys on the tool kind, and the stats tell it apart: a <b data-v-8cbfa422>Write</b> has no per-file count (its diff is underivable) and opens the whole file in the preview; an <b data-v-8cbfa422>Edit / MultiEdit</b> carries its <code data-v-8cbfa422>+A −D</code> and opens that file's <b data-v-8cbfa422>turn diff</b> in the right-side detail layer (<code data-v-8cbfa422>TurnDiffPanel.vue</code> — the turn's own X→Y change, not the git diff), whose header keeps an open-file action. The first three files show inline; the rest collapse behind a "N more files" ghost-button row in the card's foot. Where nothing handles the row action (the BTW side chat), the card renders its file rows as plain text instead of links.</li></ul>',15)),t("div",fa,[a[31]||(a[31]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Turn files summary · a real TurnFilesSummary (fixed sample)")],-1)),t("div",pa,[t("div",ha,[s(M,{changes:S,cwd:Vt,onOpenDiff:u,onOpenFile:u})])])]),a[137]||(a[137]=c('<div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Tool Call · quiet lines (expand on demand)</span></div><div class="stage p" data-v-8cbfa422><div class="p-tool-group open" data-v-8cbfa422><div class="p-tool-group-head" data-v-8cbfa422><svg class="tg-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tg-title" data-v-8cbfa422>Read 2 files</span></div><div class="p-tool-row expanded" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>session.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth · :12-45</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>34 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div><div class="p-tool-detail" data-v-8cbfa422><div class="p-code" style="font-size:11px;padding:7px 9px;" data-v-8cbfa422>12 export function verify(…</div></div><div class="p-tool-row" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M9 2.003V2h10.998C20.55 2 21 2.455 21 2.992v18.016a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 20.993V8zM5.83 8H9V4.83zM11 4v5a1 1 0 0 1-1 1H5v10h14V4z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Read</span><span class="tr-file" data-v-8cbfa422>middleware.ts</span><span class="tr-faint" data-v-8cbfa422>src/auth</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-chip" data-v-8cbfa422>58 lines</span><span class="tr-ok" data-v-8cbfa422>✓</span></div></div><div class="p-tool-row" data-v-8cbfa422><svg class="tr-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M15.728 9.686l-1.414-1.414L5 17.586V19h1.414l9.314-9.314zm1.414-1.414l1.414 1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zM4 21h16v-2H4v2z" data-v-8cbfa422></path></svg><span class="tr-name" data-v-8cbfa422>Edit</span><span class="tr-file" data-v-8cbfa422>middleware.ts</span><svg class="tr-car" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z" data-v-8cbfa422></path></svg><span class="tr-add" data-v-8cbfa422>+12</span><span class="tr-del" data-v-8cbfa422>−4</span><span class="tr-bar" aria-hidden="true" data-v-8cbfa422><span style="flex:12;background:var(--p-success);" data-v-8cbfa422></span><span style="flex:4;background:var(--p-danger);" data-v-8cbfa422></span></span><span class="tr-ok" data-v-8cbfa422>✓</span></div></div></div><h3 class="sub" data-v-8cbfa422>Decision cards · Question / Approval</h3><p data-v-8cbfa422>The two attention cards replace the composer in the dock and share one contract: a floating neutral shell (<code data-v-8cbfa422>--color-surface-raised</code> + hairline + <code data-v-8cbfa422>--radius-lg</code> + <code data-v-8cbfa422>--shadow-menu</code>), a plain dark 16px title head, and a hairline footer whose actions read in number-key order with exactly one accent primary. There is no semantic colour band — the floating card itself is the "needs a decision" signal.</p><div class="stage-wrap" data-v-8cbfa422><div class="stage-bar" data-v-8cbfa422><span class="st" data-v-8cbfa422>Plan review · pinned option rows, second-line descriptions</span></div><div class="stage p col" data-v-8cbfa422><div class="p-action" style="max-width:520px;" data-v-8cbfa422><div class="p-action-head" data-v-8cbfa422><span class="p-action-title" data-v-8cbfa422>按这份 plan 开始实现?</span></div><div class="p-action-body" data-v-8cbfa422>The plan markdown scrolls in a capped area; the approaches are pinned below it — label on the first line, full description always on the second. The number chip doubles as the keyboard hint.</div><div class="p-opts" data-v-8cbfa422><div class="p-opt" data-v-8cbfa422><span class="n" data-v-8cbfa422>1</span><span class="p-opt-text" data-v-8cbfa422><span class="l" data-v-8cbfa422>方案 A:静态徽章</span><span class="d" data-v-8cbfa422>零依赖、渲染稳定,升级时需手动同步版本号。</span></span></div><div class="p-opt" data-v-8cbfa422><span class="n" data-v-8cbfa422>2</span><span class="p-opt-text" data-v-8cbfa422><span class="l" data-v-8cbfa422>方案 B:动态徽章</span><span class="d" data-v-8cbfa422>版本自动同步免维护,但要求仓库公开可访问。</span></span></div></div><div class="p-action-foot" data-v-8cbfa422><button class="p-btn ghost sm" data-v-8cbfa422>修改</button><button class="p-btn ghost sm" data-v-8cbfa422>拒绝并退出</button></div></div></div></div><ul class="clean check" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>Footer contract</b>: actions are left-aligned in number-key order (1·2·3·4), each carrying a number chip — sized by <code data-v-8cbfa422>--p-chip-num</code> over <code data-v-8cbfa422>--color-inline-code-bg</code>, the same chip vocabulary as option rows and the multi-step chip; exactly one <code data-v-8cbfa422>primary</code> action, the rest are <code data-v-8cbfa422>ghost</code>. Feedback mode swaps the whole footer for submit / cancel.</li><li data-v-8cbfa422><b data-v-8cbfa422>Body by kind</b>: Write approvals preview the incoming content with <code data-v-8cbfa422>HighlightedCode</code> (syntax-highlighted, 24-row cap with scroll); Edit approvals render the before/after hunk as a highlighted line diff. Plan / diff / file kinds get a head expand toggle that lifts the cap so the block fills the card; the card itself never exceeds the pane (only the scroll area shrinks) — with the dock work pills visible, the dock takes over the same height budget as a flex column, so an expanded card yields the pills' height instead of pushing them past the pane's top edge. Once the plan scrolls, a soft shadow fades in at the scroll area's top edge — the sidebar's scroll-linked seam language, so clipped content reads as passing under the card chrome.</li><li data-v-8cbfa422><b data-v-8cbfa422>Danger hint</b>: destructive shell commands (rm -rf, sudo, force-push…) show a <code data-v-8cbfa422>danger-soft</code> filled hint row under the command — detection is a display-layer heuristic on the client.</li><li data-v-8cbfa422><b data-v-8cbfa422>Minimized</b>: the card collapses to a thin bar with a mono peek of the subject; the whole bar is the expand click target.</li><li data-v-8cbfa422><b data-v-8cbfa422>Question card</b>: the title is the question itself (2-line clamp), with a step chip for multi-question flows and a × dismiss button. Options use CSS radio/checkbox glyphs (accent when selected); the number chip and glyph top-align with the option text, optically centred on the label's first line. The footer follows the same left-aligned action contract (primary first, ghosts after), with the keyboard hint pinned to the right edge; keyboard: ↑↓ moves (Space toggles in multi), digits pick, Enter advances/submits, Esc dismisses.</li></ul><h3 class="sub" data-v-8cbfa422>Composer</h3><p data-v-8cbfa422>Unified into a single raised container: <code data-v-8cbfa422>--radius-composer</code> (32px) with <code data-v-8cbfa422>--corner-shape-composer: superellipse(1.5)</code> and a stable 0.5px edge. Focus crossfades a low-chroma line-and-accent edge over <code data-v-8cbfa422>--duration-slow</code> with <code data-v-8cbfa422>--ease-in-out</code>, while the neutral shadow stays unchanged — there is no added halo and no layout shift. The composer input (a ProseMirror contenteditable on desktop, a textarea on the web during the migration) uses <code data-v-8cbfa422>text-autospace: normal</code> for mixed CJK and Latin input. Toolbar controls use a quiet 32px full-round geometry with 8px edge inset; the send button remains a standard 32px circle, with its glyph at 28px (<code data-v-8cbfa422>--composer-send-icon-size</code>, the production kimi.com size; it sits outside the <code data-v-8cbfa422>--p-ic-*</code> scale on purpose).</p><p data-v-8cbfa422><b data-v-8cbfa422>Fill and edge tokens</b>: the card's fill and rest border are their own tokens — <code data-v-8cbfa422>--color-composer-bg</code> and <code data-v-8cbfa422>--color-composer-line</code> — running the kimiwork / kimi.com production input recipe (<code data-v-8cbfa422>.chat-input__shell</code>): fill = <code data-v-8cbfa422>groupedBackground.secondary</code> (#ffffff light / #1f1f1f dark), rest border = <code data-v-8cbfa422>separator.s1</code> (13% black / 12% white), focus line = <code data-v-8cbfa422>fills.f4</code> (25% in both schemes), and <code data-v-8cbfa422>--shadow-input</code> = <code data-v-8cbfa422>effect.shadow.inputDefault</code> (<code data-v-8cbfa422>0 5px 16px -4px rgba(0,0,0,0.07)</code>, kept identical in dark — the hairline carries the edge there). Only colours sit in the tokens; the 32px superellipse shape and the focus-only edge overlay are unchanged.</p><p data-v-8cbfa422><b data-v-8cbfa422>Send button tokens</b>: the send circle runs on <code data-v-8cbfa422>--color-send-bg</code> / <code data-v-8cbfa422>--color-send-bg-hover</code> / <code data-v-8cbfa422>--color-send-icon</code> (+ <code data-v-8cbfa422>*-disabled</code>, <code data-v-8cbfa422>--opacity-send-disabled</code>, <code data-v-8cbfa422>--shadow-send[-hover]</code>), following the production recipe (<code data-v-8cbfa422>.chat-input__send</code>): a neutral <code data-v-8cbfa422>labels.primary</code> fill (90% black light / 84% white dark, hover #252525 / 84.8%) with the production lift shadow (<code data-v-8cbfa422>0 7px 16px -13px 38% + 0 1px 2px 7%</code>, one step larger on hover), a <code data-v-8cbfa422>groupedBackground.secondary</code> glyph, and a disabled state of the same vocabulary — <code data-v-8cbfa422>fills.f2</code> fill with a <code data-v-8cbfa422>labels.quaternary</code> glyph at full opacity. The button is disabled exactly when submit would no-op — an empty draft with no ready attachment (image-only sends stay enabled), an upload in flight, or the starting spinner — so disabled is a first-class persistent state, never a fade.</p><p data-v-8cbfa422><b data-v-8cbfa422>Layering, anchors, and motion</b>: the dock normally stays at <code data-v-8cbfa422>--z-sticky</code> so the Latest Messages pill can remain visible above its veil. While any Composer popup or work panel is open, the dock temporarily joins <code data-v-8cbfa422>--z-dropdown</code>, ensuring permission, work-mode, and model menus — and the work panel — always paint above that pill. The permission menu's left edge and the model menu's right edge each follow their own trigger pill. All three menus use <code data-v-8cbfa422>--shadow-menu</code> and the same trigger-corner pop motion as Session Row menus: 0.97 scale with a 2px shift toward the trigger, <code data-v-8cbfa422>--duration-base</code> on entry, and <code data-v-8cbfa422>--duration-fast</code> on exit.</p><p data-v-8cbfa422><b data-v-8cbfa422>Attachment strip</b>: attachments hang inside the composer card above the input as two grouped rows — images/videos as shared <code data-v-8cbfa422>MediaThumb</code> rounded thumbnails, files as the shared <code data-v-8cbfa422>AttachmentChip</code> pill — the same pair the sent bubble renders, so a draft looks exactly like the sent message. File-store videos render a static play tile instead of fetching a first frame. The strip caps at two thumbnail rows and scrolls beyond that instead of pushing the input down; while overflowing, a quiet count badge pins to the bottom-left and new attachments auto-scroll into view (to the end of whichever group grew). With two or more attachments, a one-click clear-all pins to the strip's top-right corner as a quiet 22px badge (trash glyph, danger on hover). The composer's pending preview and the bubble's media clicks open the same <code data-v-8cbfa422>MediaLightbox</code> preview, which owns Escape via the shared dialog stack: images go through PhotoSwipe (<code data-v-8cbfa422>@moonshot-ai/app-client</code>'s <code data-v-8cbfa422>lib/mediaPreview</code>) and zoom out of the clicked thumbnail (scrim = <code data-v-8cbfa422>--color-scrim-strong</code>, caption = <code data-v-8cbfa422>--color-text-on-scrim</code>; the slide area is inset — 24px sides matching the video modal, 56px top/bottom clearing the close button and caption — so a viewport-filling image never kisses the edges), videos keep the custom modal. Both share the <code data-v-8cbfa422>--color-scrim-strong</code> backdrop and the same close button — the raised 36px circle (<code data-v-8cbfa422>.media-lightbox-close</code>) fixed at the viewport's top-right, rendered by <code data-v-8cbfa422>MediaLightbox</code> for both (PhotoSwipe's own top bar is disabled; zoom stays on wheel / pinch / image click). ReadMedia tool cards open it too (an App-level instance fed by the <code data-v-8cbfa422>openMedia</code> chain): the image zooms out of the card's thumbnail, and videos show as a static play tile that opens the modal player — no more right-side-panel detour or inline <code data-v-8cbfa422><video></code>.</p>',11)),t("div",ua,[a[38]||(a[38]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Composer")],-1)),t("div",ga,[t("div",ma,[a[36]||(a[36]=t("div",{class:"p-composer-ta ph"},"Message Kimi, / to run a command, @ to reference a file…",-1)),t("div",wa,[t("div",ya,[a[33]||(a[33]=t("button",{class:"p-icon-btn"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"})])],-1)),t("span",ka,[s(d(o),{name:"shield-question",size:"sm"}),a[32]||(a[32]=e("yolo",-1))]),a[34]||(a[34]=t("span",{class:"p-pill"},[t("svg",{class:"p-ic",viewBox:"0 0 24 24",fill:"currentColor"},[t("path",{fill:"currentColor",d:"M8 4h13v2H8zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M8 11h13v2H8zm0 7h13v2H8z"})]),e("plan")],-1))]),a[35]||(a[35]=c('<div class="p-composer-right" data-v-8cbfa422><span class="p-pill" data-v-8cbfa422><span class="pp-strong" data-v-8cbfa422>kimi-k2</span><span class="pp-sub" data-v-8cbfa422>· thinking</span><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-8cbfa422></path></svg></span><button class="p-send" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M13 7.828V20h-2V7.828l-5.364 5.364l-1.414-1.414L12 4l7.778 7.778l-1.414 1.414z" data-v-8cbfa422></path></svg></button></div>',1))])]),a[37]||(a[37]=c('<div class="p-composer-strip" data-v-8cbfa422><svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="M4 5a1 1 0 0 1 1-1h5l2 2h7a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5z" data-v-8cbfa422></path></svg>kimi-code-web<svg class="p-ic" viewBox="0 0 24 24" fill="currentColor" data-v-8cbfa422><path fill="currentColor" d="m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z" data-v-8cbfa422></path></svg></div>',1))])]),a[138]||(a[138]=c('<div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>Site-wide consistency</b>: the composer uses one 32px superellipse shell and one 32px desktop control height. The add (+), permission, compact, and model controls are all full-round and transparent at rest; hover reveals a neutral wash, open/active may use accent-soft, and Send remains the sole persistent filled control — an inverted <code data-v-8cbfa422>--color-text</code> fill with a <code data-v-8cbfa422>--color-bg</code> glyph (never the accent), disabled while the input is empty or an upload is in flight. The transparent dock floats over the transcript, while the scrolling content receives bottom padding equal to the live dock height so its final item can still clear the composer. Composer chrome is not selectable; only the message input permits text selection. Each permission mode has its own registry icon — manual <code data-v-8cbfa422>hand</code>, yolo <code data-v-8cbfa422>shield-question</code>, auto <code data-v-8cbfa422>full-access</code> — paired with the label in the pill (collapsing to the accessible icon below a 620px composer container) and leading its dropdown row in the mode's colour, with the current row's check trailing the row's end. The right toolbar is the flexible region: the model pill shrink-wraps its content, then shrinks and truncates internally only when the toolbar runs out of room. The dock's work pills and panels — pill vocabulary, panel shell and motion, the two-tone head, per-kind bodies, filtering, and the open/cancel model — are specified in <b data-v-8cbfa422>Dock · work pills & panels</b> below. </div></div><p data-v-8cbfa422><b data-v-8cbfa422>Workspace attachment card</b>: on the empty session, the workspace picker is a <b data-v-8cbfa422>separate attachment card</b> tucked under the composer — and the composer card itself stays complete (its own 0.5px border, <code data-v-8cbfa422>--radius-composer</code> corners with <code data-v-8cbfa422>--corner-shape-composer</code>, and shadow are never altered). The attachment lives inside the composer's padding box as the card's sibling, so its width always matches; its top <code data-v-8cbfa422>--space-4</code> slides behind the card (the card is raised to <code data-v-8cbfa422>--z-sticky</code>), its square top edge stays hidden, and only the rounded bottom (<code data-v-8cbfa422>0 0 --radius-xl --radius-xl</code>) shows. Background <code data-v-8cbfa422>--color-hover</code> at 60% via <code data-v-8cbfa422>color-mix</code> (≈0.03 black in light, self-adapting in dark), no border, no shadow. Inside sits one quiet capsule trigger: transparent, <code data-v-8cbfa422>--radius-full</code>, 16px leading icon and 12px label at weight 475 in <code data-v-8cbfa422>--color-text-muted</code>; hover deepens to <code data-v-8cbfa422>--color-selected</code> and the label turns <code data-v-8cbfa422>--color-text</code>. The dropdown follows the §03 menu spec and is viewport-aware (flips above when more room, clamps max-height to the scrollport); at <code data-v-8cbfa422>--z-dropdown</code> it outranks both the card and the fixed click-outside backdrop (<code data-v-8cbfa422>--z-sticky</code>), which renders outside the composer because the card's <code data-v-8cbfa422>container-type</code> captures <code data-v-8cbfa422>position: fixed</code> descendants.</p><h3 class="sub" data-v-8cbfa422>Autocomplete menus</h3><p data-v-8cbfa422>The slash, mention, and add popups share one geometry, all on dedicated tokens: the <code data-v-8cbfa422>--color-menu-bg-frost</code> surface (the frostier recipe), frame padding <code data-v-8cbfa422>--menu-row-hug</code>, rows at <code data-v-8cbfa422>--menu-row-padding-block</code> × <code data-v-8cbfa422>--menu-row-padding-inline</code> with <code data-v-8cbfa422>--radius-menu-row</code> caps on the <code data-v-8cbfa422>--corner-shape-menu</code> curve, an icon-to-label gap of <code data-v-8cbfa422>--menu-row-gap-icon</code>, and a <code data-v-8cbfa422>--menu-rows-seam</code> between stacked rows. Touch rows pad to <code data-v-8cbfa422>--menu-row-touch-padding-block</code> with a hard floor of <code data-v-8cbfa422>--touch-target-min</code>. Scroll height caps at <code data-v-8cbfa422>--p-slash-menu-h</code> / <code data-v-8cbfa422>--p-mention-menu-h</code> / <code data-v-8cbfa422>--p-add-menu-h</code>; the scroll-edge fade is <code data-v-8cbfa422>--menu-scroll-fade</code>, and the overlay thumb rides <code data-v-8cbfa422>--menu-scrollbar-width</code> / <code data-v-8cbfa422>--menu-scrollbar-edge</code> / <code data-v-8cbfa422>--menu-scrollbar-track-inset</code> / <code data-v-8cbfa422>--menu-scrollbar-thumb-min</code> in <code data-v-8cbfa422>--color-menu-scrollbar</code> (hover <code data-v-8cbfa422>--color-menu-scrollbar-hover</code>) — 3px visually, with a wider invisible drag strip.</p><h3 class="sub" data-v-8cbfa422>Add menu</h3><p data-v-8cbfa422>The composer's <b data-v-8cbfa422>+ button</b> opens the add menu — the autocomplete family's action-list member: one column of icon + label (+ muted description) rows (Files, Goal, Plan, Swarm) on the same frost surface and row geometry as the slash/mention popups, capped at <code data-v-8cbfa422>--p-add-menu-h</code>. Semantically it is an action menu, not an autocomplete listbox: rows are <code data-v-8cbfa422>menuitem</code> commands, DOM focus moves into the menu (arrows navigate, Enter activates, Escape closes), and the + button carries <code data-v-8cbfa422>aria-haspopup="menu"</code> — the textarea's combobox ARIA never points at it.</p><p data-v-8cbfa422><b data-v-8cbfa422>Design decision: deliberately NOT the §03 Menu/MenuItem primitives.</b> Those are the trigger-dropdown family (sidebar, user menu, session rows) — <code data-v-8cbfa422>--color-menu-bg</code>, <code data-v-8cbfa422>--radius-lg</code>, a min-width box. The add menu instead shares the composer menus' material (the frostier surface, the composer corner curve, rows hugging the frame at the composer's text column, muted description sub-lines). Bending MenuItem into that material would require exactly the per-screen appearance overrides the primitive contract forbids, so the add menu keeps bespoke rows built directly on the shared <code data-v-8cbfa422>--menu-row-*</code> tokens. This paragraph is the canonical record of that choice — reviews should not re-litigate it.</p>',7)),t("div",xa,[a[46]||(a[46]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Add menu — family surface, icon + label + desc rows, keyboard focus wash")],-1)),t("div",Ca,[t("div",Sa,[t("span",za,[s(d(o),{name:"attachment",size:"sm"}),a[39]||(a[39]=t("span",{class:"n"},"Files",-1))]),t("span",Ta,[s(d(o),{name:"target",size:"sm"}),a[40]||(a[40]=t("span",{class:"n"},"Goal",-1)),a[41]||(a[41]=t("span",{class:"d"},"Set a goal to keep pursuing",-1))]),t("span",qa,[s(d(o),{name:"file-edit",size:"sm"}),a[42]||(a[42]=t("span",{class:"n"},"Plan",-1)),a[43]||(a[43]=t("span",{class:"d"},"Turn plan mode on",-1))]),t("span",Ba,[s(d(o),{name:"sparkles",size:"sm"}),a[44]||(a[44]=t("span",{class:"n"},"Swarm",-1)),a[45]||(a[45]=t("span",{class:"d"},"Turn swarm mode on",-1))])])])]),a[139]||(a[139]=c('<h3 class="sub" data-v-8cbfa422>Work modes</h3><p data-v-8cbfa422><b data-v-8cbfa422>Plan and Goal are the primary work modes — mutually exclusive, at most one armed at a time.</b> Arming happens only through the slash commands (<code data-v-8cbfa422>/plan</code>, <code data-v-8cbfa422>/goal</code>) or the add menu; an armed mode renders as the input row's leading pill — a neutral <code data-v-8cbfa422>--color-surface</code> chip with the mode's 14px icon, its label, and a × that disarms. The × is an IconButton sized <code data-v-8cbfa422>--wm-x-size</code> (below the sm default, so its hover wash never outgrows the pill's rounded end) with a <code data-v-8cbfa422>--wm-x-ring</code> hit reserve that stays inside the textarea's indent; on touch it meets <code data-v-8cbfa422>--touch-target-min</code>. The input's first-line text indent reserves exactly the pill's width (the desktop ProseMirror editor applies it to the first paragraph), so the caret and placeholder slide right rather than colliding; arming Goal also swaps the placeholder to its objective prompt. Sending with Goal armed creates the goal and the pill hands off to the dock's goal pill; a live goal does NOT lock the primary modes — <code data-v-8cbfa422>/goal</code> then just focuses the goal's panel, and <code data-v-8cbfa422>/plan</code> still arms (the only hard rule: one message cannot both create a goal and enter plan — the goal write carries the plan disarm atomically — and a failed mode write is treated as a send failure: the optimistic message rolls back, the error toasts). Swarm is deliberately NOT a mode: an orthogonal toolbar chip with its own enable confirmation, disarmed from the chip's ×.</p><h3 class="sub" data-v-8cbfa422>Dock · work pills & panels</h3><p data-v-8cbfa422><b data-v-8cbfa422>Work pills</b> (<code data-v-8cbfa422>WorkPill.vue</code>): the dock's workbar above the composer carries one pill vocabulary — font-driven by flex computation: the 1.5em leading icon and the label's own line box (<code data-v-8cbfa422>--text-base</code> at <code data-v-8cbfa422>--leading-normal</code>) both come to 21px at the 14px UI text, and 8px block padding wraps them to 37px, nothing pinning pixels, so the pills rescale with the font; borderless, with <code data-v-8cbfa422>--radius-lg</code> rounded-square corners, filled at the fills ladder's <code data-v-8cbfa422>--color-selected</code> rung over the shared <code data-v-8cbfa422>--p-menu-backdrop</code> blur — the panel's frosted recipe scaled down to a chip, so transcript text never reads through the light fill (the neutral hover wash layers on top — one layer, never two), the icon at full text colour, <code data-v-8cbfa422>--space-2</code> / <code data-v-8cbfa422>--space-3</code> block / inline padding — the trailing side adds a <code data-v-8cbfa422>--space-05</code> optical compensation against the leading glyph — and a <code data-v-8cbfa422>--space-1-5</code> content gap. Every pill stays expanded — the Code client does not collapse status chips — carrying icon + label and a trailing meta that answers one question — what is live on this surface right now — for background bash tasks, background sub-agents, todos, and the goal alike; the row insets to the composer's text column — dock inline inset + the card's 0.5px border + the input wrap's 16px inline padding — not the card edge. The active pill keeps the wash on permanently — one fills-ladder step deeper, neutral. The meta is always muted ink and surface-specific: the goal carries its status word, colour-coded by state (active <code data-v-8cbfa422>--color-success</code>, paused <code data-v-8cbfa422>--color-warning</code>, blocked <code data-v-8cbfa422>--color-danger</code>); the bash and sub-agent pills carry a pulsing dot and the running count, only while something runs (a quiet absence otherwise); the todos carry the done/total fraction. The plan pill joins the row only once plan mode is live server-side or a persisted plan exists — a merely armed directive stays in the composer's inline work-mode pill (its × cancels) and never reaches this bar, so every pill here reads as live server truth rather than local intent. Narrow panes wrap the row instead of clipping (the dock height observes); below the <code data-v-8cbfa422>--p-bp-sm</code> breakpoint the pills collapse to their icons — label and meta hide (the threshold is read from the token, never a hardcoded width).</p><p data-v-8cbfa422><b data-v-8cbfa422>Panel shell & motion</b>: a pill toggles the shared work panel — the menu family material: 70% page background via <code data-v-8cbfa422>color-mix</code> over the shared <code data-v-8cbfa422>--p-menu-backdrop</code> blur (the frostier recipe, see §06 Glassmorphism exemption), a 0.5px <code data-v-8cbfa422>--color-line</code> edge, <code data-v-8cbfa422>--radius-2xl</code>, and the menu panel's <code data-v-8cbfa422>--shadow-menu</code>. The panel pops from the clicked pill along the trigger-corner motion tokens (<code data-v-8cbfa422>--motion-panel-scale</code> / <code data-v-8cbfa422>--motion-panel-shift</code>), and switching pills replays the pop from the newly clicked pill (the shell is keyed by panel kind); while it is open the dock raises to <code data-v-8cbfa422>--z-dropdown</code> so it clears the transcript's new-message pill, and every window-drag strip pauses so an outside press reaches the page and dismisses. The panel owns Escape while open (a document-capture handler guarded by the shared IME latch, so a candidate-cancelling Escape is never swallowed), and a scrolled body dissolves toward the head through the <code data-v-8cbfa422>--menu-scroll-fade</code> alpha mask instead of hard-clipping. Height is content-sized up to <code data-v-8cbfa422>min(360px, 50vh)</code>; the filtered panels pin instead — see Filtering & sizing. The panel is chrome: nothing inside it is text-selectable, the head's filter chips included.</p><p data-v-8cbfa422><b data-v-8cbfa422>Panel head</b> (<code data-v-8cbfa422>WorkPanelHead.vue</code>): every work panel head is one tab row — a leading icon at the pill's 1.5em glyph size, the panel title at full text colour, and a muted trailing meta (<code data-v-8cbfa422>--color-text-muted</code>) carrying that panel's one live number, joined by the row's <code data-v-8cbfa422>--space-2</code> gap with no separator glyph: the goal's wall-clock time, the bash / sub-agent running count, the todos' done/total. Actions right-align in the head: the goal's pause / resume / cancel / close as quiet neutral IconButtons (cancel deliberately shares that neutral vocabulary), the plan's open-in-side-panel, dismiss-directive (shown only while the directive is live), and close, and the bash / sub-agent filter chips as a SegmentedControl. The plan head's meta carries the latest plan's review outcome. On touch these meet the 44px minimum (<code data-v-8cbfa422>--touch-target-min</code>) via the <code data-v-8cbfa422>hover: none</code> capability query — a width-only gate would miss tablets — and below 480px the head wraps so the actions take a full row.</p><p data-v-8cbfa422><b data-v-8cbfa422>Panel bodies</b>: todos read as a quiet list — a green <code data-v-8cbfa422>circle-check</code> for done, a hollow ring for pending, an xs Spinner for in-progress. The goal's detail (full objective, completion criterion, rendered with the chat Markdown renderer) fills the body — no footer strip. Bash tasks are long rows (<code data-v-8cbfa422>TasksPane.vue</code>): a StatusDot while running, <code data-v-8cbfa422>circle-check</code> when done, a close glyph for failed and for cancelled (a user stop is neutral, never reported as a failure), the command as the meta line, and a bare duration that renders only when computable — never the raw protocol status word. Sub-agents form a card grid (<code data-v-8cbfa422>SubagentGrid.vue</code>) — an auto-fill grid (minmax <code data-v-8cbfa422>--p-subagent-card-min</code>) of cards at the <code data-v-8cbfa422>--color-selected</code> rung with <code data-v-8cbfa422>--radius-lg</code> corners; each card carries the task name, a stable session-wide number (creation order across the session's background sub-agents — unique even across swarms; once shown it sticks, so late-arriving history takes the next tail number), an optional prompt meta line one size down (<code data-v-8cbfa422>--text-sm</code>), an icon-led model · effort line and the status row a further size down (<code data-v-8cbfa422>--text-xs</code>) — the status row pairs the task-row state glyph with the localized label, plus a clock-led bare duration that renders only when computable; the full-bleed <code data-v-8cbfa422>circle-check</code> (drawn for the todo rows' ring family) is scaled onto the shared icon grid wherever it sits beside other glyphs (task rows, cards, filter chips). A failed row tints its name <code data-v-8cbfa422>--color-danger</code>; a cancelled one stays neutral. Rows hover with a rounded strip that grows by padding and a matching negative margin — the row metrics never shift. The row stop is danger-coloured; the card cancel reveals on hover and is always visible on touch as a <code data-v-8cbfa422>--touch-target-min</code> corner target. Every pane's empty state is centered and muted. State and time labels — the head meta included — set <code data-v-8cbfa422>text-autospace: normal</code>, the transcript's mixed CJK/numeric spacing rule, so durations like 9小时2分 breathe.</p><p data-v-8cbfa422><b data-v-8cbfa422>State vocabulary</b>: two glyph families meet here by design — the activity dot (shared with the transcript's tool rows and swarm members) backs the task rows, the todo rows speak the default loader ring, and the sub-agent cards skip glyphs in favour of a localized text label:</p>',8)),t("table",Aa,[a[83]||(a[83]=t("thead",null,[t("tr",null,[t("th",null,"Surface"),t("th",null,"State"),t("th",null,"Meaning"),t("th",null,"Glyph"),t("th",null,"Ink")])],-1)),t("tbody",null,[t("tr",null,[a[48]||(a[48]=t("td",null,"Bash rows",-1)),a[49]||(a[49]=t("td",{class:"tk"},"running",-1)),a[50]||(a[50]=t("td",null,"Task in flight",-1)),t("td",null,[s(d(p),{status:"running"}),a[47]||(a[47]=e(" pulsing dot",-1))]),a[51]||(a[51]=t("td",null,[t("code",null,"--color-accent")],-1))]),t("tr",null,[a[54]||(a[54]=t("td",null,null,-1)),a[55]||(a[55]=t("td",{class:"tk"},"done",-1)),a[56]||(a[56]=t("td",null,"Finished cleanly",-1)),t("td",null,[s(d(o),{name:"circle-check",size:"sm"}),a[52]||(a[52]=e()),a[53]||(a[53]=t("code",null,"circle-check",-1))]),a[57]||(a[57]=t("td",null,[t("code",null,"--color-success")],-1))]),t("tr",null,[a[60]||(a[60]=t("td",null,null,-1)),a[61]||(a[61]=t("td",{class:"tk"},"failed",-1)),a[62]||(a[62]=t("td",null,"Errored — the row's name tints to match",-1)),t("td",null,[s(d(o),{name:"close",size:"sm"}),a[58]||(a[58]=e()),a[59]||(a[59]=t("code",null,"close",-1))]),a[63]||(a[63]=t("td",null,[t("code",null,"--color-danger")],-1))]),t("tr",null,[a[66]||(a[66]=t("td",null,null,-1)),a[67]||(a[67]=t("td",{class:"tk"},"cancelled",-1)),a[68]||(a[68]=t("td",null,"User stop — neutral, never a failure",-1)),t("td",null,[s(d(o),{name:"close",size:"sm"}),a[64]||(a[64]=e()),a[65]||(a[65]=t("code",null,"close",-1))]),a[69]||(a[69]=t("td",null,[t("code",null,"--color-text-muted")],-1))]),t("tr",null,[a[71]||(a[71]=t("td",null,"Todo rows",-1)),a[72]||(a[72]=t("td",{class:"tk"},"in_progress",-1)),a[73]||(a[73]=t("td",null,"Being worked on",-1)),t("td",null,[t("span",Ma,[s(d(I),{size:"xs"})]),a[70]||(a[70]=e(" xs Spinner ring",-1))]),a[74]||(a[74]=t("td",null,[e("the row's own ink ("),t("code",null,"--color-text"),e(")")],-1))]),a[81]||(a[81]=t("tr",null,[t("td"),t("td",{class:"tk"},"pending"),t("td",null,"Not started"),t("td",null,[t("span",{class:"dw-ring"}),e(" hollow ring")]),t("td",null,[t("code",null,"--color-line-strong"),e(" stroke")])],-1)),t("tr",null,[a[77]||(a[77]=t("td",null,null,-1)),a[78]||(a[78]=t("td",{class:"tk"},"done",-1)),a[79]||(a[79]=t("td",null,"Completed",-1)),t("td",null,[s(d(o),{name:"circle-check",size:"md"}),a[75]||(a[75]=e()),a[76]||(a[76]=t("code",null,"circle-check",-1))]),a[80]||(a[80]=t("td",null,[t("code",null,"--color-success")],-1))]),a[82]||(a[82]=t("tr",null,[t("td",null,"Sub-agent cards"),t("td",{class:"tk"},"all"),t("td",null,"The task-row glyph plus a localized label — failed alone tints danger — with a clock-led bare duration trailing"),t("td",null,"glyph + label"),t("td",null,"muted / danger")],-1))])]),a[140]||(a[140]=c("<p data-v-8cbfa422><b data-v-8cbfa422>Filtering & sizing</b>: the bash and sub-agent heads carry the same four icon-led filter chips — recent (<code data-v-8cbfa422>clock</code>; running + the five most recently finished), running (<code data-v-8cbfa422>play</code>), done (<code data-v-8cbfa422>circle-check</code>; every terminal state), all (<code data-v-8cbfa422>list</code>) — and both filtered panels pin to <code data-v-8cbfa422>--p-dock-panel-h</code> so filtering never resizes the panel; the body scrolls inside. When the head runs out of room the chips collapse into a dropdown menu (<code data-v-8cbfa422>FilterControl.vue</code> measures the head itself, so the switch follows the panel's own width, not the viewport; the menu teleports to <code data-v-8cbfa422><body></code> and anchors to the trigger, so the panel's clip and backdrop-filter never squeeze it); the head title never wraps and is never clipped — once the filter is a dropdown the head always fits. An empty pane names its filter (no completed tasks is not no tasks).</p><p data-v-8cbfa422><b data-v-8cbfa422>Opening & cancelling</b>: clicking a row or card opens the task's detail in the right-side panel. Opening is gated: the overlay navigation button renders only when a stable <code data-v-8cbfa422>agentId</code> (on-demand transcript) or locally held output exists, so a REST-only cold-loaded row stays inert instead of opening an empty panel — and says so with the not-allowed cursor. Open and cancel are sibling controls (a full-cover overlay button, the stop IconButton floating above it): no nested interactives, and the stop action exists only while the task runs.</p>",2)),t("div",Ia,[a[94]||(a[94]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Work pills — one vocabulary, a live count or status where one exists")],-1)),t("div",Ea,[t("div",Va,[t("span",Da,[s(d(o),{name:"target",size:"md"}),a[84]||(a[84]=t("span",null,"Goal",-1)),a[85]||(a[85]=e()),a[86]||(a[86]=t("span",{class:"dw-live"},"Active",-1))]),t("span",Ha,[s(d(o),{name:"terminal",size:"md"}),a[87]||(a[87]=t("span",null,"Bash",-1))]),t("span",La,[s(d(o),{name:"sparkles",size:"md"}),a[89]||(a[89]=t("span",null,"Sub Agent",-1)),a[90]||(a[90]=e()),t("span",Ra,[s(d(p),{status:"running"}),a[88]||(a[88]=e("3",-1))])]),t("span",Oa,[s(d(o),{name:"list",size:"md"}),a[91]||(a[91]=t("span",null,"Progress",-1)),a[92]||(a[92]=e()),a[93]||(a[93]=t("span",{class:"dw-count"},"3/7",-1))])])])]),t("div",Wa,[a[135]||(a[135]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Work panels — two-tone head, filter chips, rows & card grid")],-1)),t("div",Na,[t("div",Ua,[t("div",Pa,[t("span",Fa,[s(d(o),{name:"terminal",size:"md"}),a[95]||(a[95]=e("Bash ",-1)),a[96]||(a[96]=t("span",{class:"dw-meta"},"1 running",-1))]),t("span",ja,[t("span",Ga,[s(d(o),{name:"clock",size:"sm"}),a[97]||(a[97]=e("Recent",-1))]),t("span",Ka,[s(d(o),{name:"play",size:"sm"}),a[98]||(a[98]=e("Running",-1))]),t("span",Ja,[s(d(o),{name:"circle-check",size:"sm"}),a[99]||(a[99]=e("Done",-1))]),t("span",Qa,[s(d(o),{name:"list",size:"sm"}),a[100]||(a[100]=e("All",-1))])])]),t("div",Ya,[t("div",Za,[s(d(p),{status:"running"}),a[101]||(a[101]=t("span",{class:"nm"},"pnpm test -- --watch",-1)),a[102]||(a[102]=t("span",{class:"tm"},"0:42",-1))]),t("div",Xa,[s(d(o),{name:"circle-check",size:"sm",class:"ok"}),a[103]||(a[103]=t("span",{class:"nm"},"pnpm run build",-1)),a[104]||(a[104]=t("span",{class:"tm"},"3m12s",-1))]),t("div",$a,[s(d(o),{name:"close",size:"sm"}),a[105]||(a[105]=t("span",{class:"nm"},"pnpm lint",-1)),a[106]||(a[106]=t("span",{class:"tm"},"1m05s",-1))]),t("div",_a,[s(d(o),{name:"close",size:"sm"}),a[107]||(a[107]=t("span",{class:"nm"},"node scripts/migrate.mjs",-1)),a[108]||(a[108]=t("span",{class:"tm"},"0:18",-1))])])]),t("div",at,[t("div",tt,[t("span",et,[s(d(o),{name:"sparkles",size:"md"}),a[109]||(a[109]=e("Sub Agent ",-1)),a[110]||(a[110]=t("span",{class:"dw-meta"},"1 running",-1))]),t("span",st,[t("span",dt,[s(d(o),{name:"clock",size:"sm"}),a[111]||(a[111]=e("Recent",-1))]),t("span",ot,[s(d(o),{name:"play",size:"sm"}),a[112]||(a[112]=e("Running",-1))]),t("span",ct,[s(d(o),{name:"circle-check",size:"sm"}),a[113]||(a[113]=e("Done",-1))]),t("span",it,[s(d(o),{name:"list",size:"sm"}),a[114]||(a[114]=e("All",-1))])])]),t("div",nt,[t("div",lt,[a[118]||(a[118]=t("div",{class:"ct"},[t("span",{class:"nu"},"01"),t("span",{class:"nm"},"Explore the auth module")],-1)),a[119]||(a[119]=t("div",{class:"ds"},"Map every callsite of the legacy token refresh and report findings",-1)),t("div",rt,[t("div",vt,[s(d(o),{name:"robot",size:"sm"}),a[115]||(a[115]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",bt,[t("span",ft,[s(d(p),{status:"running"}),a[116]||(a[116]=e("Running",-1))]),t("span",pt,[s(d(o),{name:"clock",size:"sm"}),a[117]||(a[117]=e("0:42",-1))])])])]),t("div",ht,[a[123]||(a[123]=t("div",{class:"ct"},[t("span",{class:"nu"},"02"),t("span",{class:"nm"},"Draft the release notes")],-1)),a[124]||(a[124]=t("div",{class:"ds"},"Summarize the merged PRs since the last tag into user-facing notes",-1)),t("div",ut,[t("div",gt,[s(d(o),{name:"robot",size:"sm"}),a[120]||(a[120]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",mt,[t("span",wt,[s(d(o),{name:"circle-check",size:"sm",class:"ok"}),a[121]||(a[121]=e("Done",-1))]),t("span",yt,[s(d(o),{name:"clock",size:"sm"}),a[122]||(a[122]=e("3m12s",-1))])])])]),t("div",kt,[a[128]||(a[128]=t("div",{class:"ct"},[t("span",{class:"nu"},"03"),t("span",{class:"nm"},"Run the integration tests")],-1)),a[129]||(a[129]=t("div",{class:"ds"},"pnpm test against the staging daemon",-1)),t("div",xt,[t("div",Ct,[s(d(o),{name:"robot",size:"sm"}),a[125]||(a[125]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",St,[t("span",zt,[s(d(o),{name:"close",size:"sm"}),a[126]||(a[126]=e("Failed",-1))]),t("span",Tt,[s(d(o),{name:"clock",size:"sm"}),a[127]||(a[127]=e("1m05s",-1))])])])]),t("div",qt,[a[133]||(a[133]=t("div",{class:"ct"},[t("span",{class:"nu"},"04"),t("span",{class:"nm"},"Migrate the config files")],-1)),a[134]||(a[134]=t("div",{class:"ds"},"Rewrite the workspace configs to the new schema",-1)),t("div",Bt,[t("div",At,[s(d(o),{name:"robot",size:"sm"}),a[130]||(a[130]=t("span",null,"kimi-k2 · thinking",-1))]),t("div",Mt,[t("span",It,[s(d(o),{name:"close",size:"sm"}),a[131]||(a[131]=e("Cancelled",-1))]),t("span",Et,[s(d(o),{name:"clock",size:"sm"}),a[132]||(a[132]=e("0:18",-1))])])])])])])])]),a[141]||(a[141]=t("h3",{class:"sub"},"Responsive",-1)),a[142]||(a[142]=t("p",null,[e("See §02 "),t("code",null,"--p-bp-sm"),e(" for the breakpoint. This section only gives mobile-adaptation pointers for the chat interface; a full mobile mockup is out of scope for this spec.")],-1)),a[143]||(a[143]=t("div",{class:"callout info"},[t("span",{class:"ico"},"i"),t("div",null," At ≤640px: dialogs anchor to the bottom as Sheets (xl top radius, top drag handle), the sidebar collapses into an expandable drawer, the Composer toolbar is allowed to wrap, and the chat reading column drops its max-width to fill the screen. ")],-1))]),a[145]||(a[145]=c('<section id="themes" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>05</span><h2 class="sec-title" data-v-8cbfa422>Theming</h2></div><p class="sec-desc" data-v-8cbfa422> Kimi Web uses <b data-v-8cbfa422>one unified theme</b>: the same components, fonts, radii, shadows, and surfaces — theming only swaps color values. Every semantic color token ships a light value in <code data-v-8cbfa422>:root</code> and a dark override in the <code data-v-8cbfa422>data-color-scheme</code> blocks; the semantic status colors (success / warning / danger) are independent palettes, one set each for light / dark. </p><h3 class="sub" data-v-8cbfa422>Accent</h3><p data-v-8cbfa422>The app has <b data-v-8cbfa422>one accent</b>: the brand blue (<code data-v-8cbfa422>--color-accent</code>, <code data-v-8cbfa422>#1783ff</code> light / <code data-v-8cbfa422>#58a6ff</code> dark). Use it sparingly — the accent is reserved for the primary action, focus rings, links, and active marks (current tab, toggles); large fills always come from the neutral surface tokens. Selection that means "where I am" (sidebar rows, list pickers) is deliberately NOT accent-tinted — it uses <code data-v-8cbfa422>--color-selected</code> so it reads as location, not as an action.</p><h3 class="sub" data-v-8cbfa422>Light / dark mode</h3><p data-v-8cbfa422>Each semantic token ships a light value in <code data-v-8cbfa422>:root</code> and a dark override in the two <code data-v-8cbfa422>data-color-scheme</code> blocks (explicit choice, or following the OS preference via <code data-v-8cbfa422>prefers-color-scheme</code>). Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.</p><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422><b data-v-8cbfa422>Benefits of one theme</b>: components, fonts, radii, and surfaces are consistent site-wide; a single accent keeps the brand identity unambiguous; light / dark mode works out of the box; semantic status colors are independently tunable. </div></div></section><section id="rules" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>06</span><h2 class="sec-title" data-v-8cbfa422>Style Rules</h2></div><p class="sec-desc" data-v-8cbfa422> Anti-pattern rules that all UI code must follow. These rules are also the basis of the check-style detection script, one-to-one with a warning. </p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Rule ID</th><th data-v-8cbfa422>What it detects</th><th data-v-8cbfa422>Action</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-gradient-text</td><td data-v-8cbfa422>gradient text / gradient background</td><td data-v-8cbfa422><span class="pill red" data-v-8cbfa422>Forbidden</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-glassmorphism</td><td data-v-8cbfa422><code data-v-8cbfa422>backdrop-filter: blur</code> (<b data-v-8cbfa422>TopBar sticky nav bar</b> and <b data-v-8cbfa422>menu surfaces via <code data-v-8cbfa422>--p-menu-backdrop</code></b> are the exceptions)</td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>TopBar + menus exempt</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-color-glow</td><td data-v-8cbfa422>colored / large-radius box-shadow glow</td><td data-v-8cbfa422><span class="pill red" data-v-8cbfa422>Forbidden</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-emoji-icon</td><td data-v-8cbfa422>using emoji as a functional icon (no exceptions). Emoji inside <b data-v-8cbfa422>user content</b> — session titles, messages — is not chrome and is out of scope (see §07 Session row's emoji icon)</td><td data-v-8cbfa422><span class="pill red" data-v-8cbfa422>Forbidden</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-hardcoded-hex</td><td data-v-8cbfa422>unregistered hex color inside a component <code data-v-8cbfa422><style></code></td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>Warning</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>no-hardcoded-font</td><td data-v-8cbfa422>hard-coded <code data-v-8cbfa422>font-family</code> in a component (e.g. <code data-v-8cbfa422>'Inter'</code>) instead of <code data-v-8cbfa422>var(--font-ui)</code></td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>Warning</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>radius-from-scale</td><td data-v-8cbfa422>radius value not in <code data-v-8cbfa422>{4,6,8,12,16,20,999}</code></td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>Warning</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>z-from-scale</td><td data-v-8cbfa422>z-index using an unregistered large number</td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>Warning</span></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>weight-from-scale</td><td data-v-8cbfa422>font-weight not in <code data-v-8cbfa422>{400,500}</code></td><td data-v-8cbfa422><span class="pill amber" data-v-8cbfa422>Warning</span></td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>State matrix</h3><p data-v-8cbfa422>Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. <code data-v-8cbfa422>focus-visible</code> always uses <code data-v-8cbfa422>--p-focus-ring</code> (appears only on keyboard focus, see §08); <code data-v-8cbfa422>disabled</code> is uniformly <code data-v-8cbfa422>opacity:.5</code>.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>State</th><th data-v-8cbfa422>Button</th><th data-v-8cbfa422>Input</th><th data-v-8cbfa422>Card</th><th data-v-8cbfa422>Menu item</th><th data-v-8cbfa422>Switch</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>default</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>hover</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>active / pressed</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>focus-visible</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>✓</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>disabled</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>loading</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>selected / active</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>✓</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>error</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>readonly</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>✓</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td><td data-v-8cbfa422>—</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Chat working indicator</h3><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422> The chat working state ("prompt sent, turn unfinished") is a brand signature of Kimi Web, rendered uniformly by the <code data-v-8cbfa422>WorkingIndicator</code> component: the 小蓝 mascot plus a phase label — "Requesting…" until the assistant's reply starts, "Working…" once it is streaming. All other loading states (including <code data-v-8cbfa422>ActivityNotice</code>) use the plain <code data-v-8cbfa422>Spinner</code>. </div></div><h3 class="sub" data-v-8cbfa422>Glassmorphism exemption</h3><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422><code data-v-8cbfa422>backdrop-filter: blur</code> is banned site-wide, with <b data-v-8cbfa422>two exceptions</b>: the <code data-v-8cbfa422>.frost</code> variant of <code data-v-8cbfa422>TopBar</code> — only in the one place of the "sticky navigation bar", used to stay readable over scrolling content — and the floating menu surfaces: Menu.vue, the Select listbox and the composer dropdowns use the <code data-v-8cbfa422>--color-menu-bg</code> token (a 95% surface), while the autocomplete family — slash/mention popups and the dock work panel — deliberately runs a frostier recipe of its own: 70% page background (single-sourced as <code data-v-8cbfa422>--color-menu-bg-frost</code>) over the shared <code data-v-8cbfa422>--p-menu-backdrop</code> blur, which stays the single-sourced blur token across all of them. The dock's work surfaces — the work panel and its pills, persistent over the scrolling transcript — ride that same frostier recipe (specified per-surface in §04 (Dock · work pills & panels)) rather than a bespoke one. No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under <code data-v-8cbfa422>no-glassmorphism</code>, and menu blur with ad-hoc values (anything but the token) is flagged too. </div></div><div class="footer" data-v-8cbfa422><span data-v-8cbfa422>Kimi Web Design System · v1.0</span><span data-v-8cbfa422>The reference when changing the web UI</span></div></section><section id="shell" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>07</span><h2 class="sec-title" data-v-8cbfa422>App Shell & Sidebar</h2></div><p class="sec-desc" data-v-8cbfa422> The structural spec for the app shell (three-column grid + right preview panel) and the left session sidebar. These are business-agnostic "skeletons" — components, fonts, radii, and surfaces are reused from §02 / §03, but layout and alignment have their own conventions. </p><h3 class="sub" data-v-8cbfa422>Layout grid</h3><p data-v-8cbfa422>On web it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent <code data-v-8cbfa422>auto</code> track, with the conversation column in the middle; two 0-width tracks are for the ResizeHandles. (The desktop app adds a second row for its terminal panel — desktop-only, see below.)</p><div class="code" data-v-8cbfa422><div class="code-bar" data-v-8cbfa422><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="d" data-v-8cbfa422></span><span class="fn" data-v-8cbfa422>App.vue · .app</span></div><pre data-v-8cbfa422>grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;\n /* sidebar ↑ ↑handle ↑conversation ↑handle ↑right panel (auto) */</pre></div><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>sidebar width</td><td class="val" data-v-8cbfa422>270px default (adjustable)</td><td data-v-8cbfa422>expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's <code data-v-8cbfa422>--p-sidebar-w</code> (264px)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--preview-w</td><td class="val" data-v-8cbfa422>460px</td><td data-v-8cbfa422>width of the right preview panel when open</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--panel-head-h</td><td class="val" data-v-8cbfa422>48px</td><td data-v-8cbfa422>unified height for all right panel heads + the conversation column head; both use a 0.5px bottom hairline</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--p-bp-sm</td><td class="val" data-v-8cbfa422>640px</td><td data-v-8cbfa422>≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel</td></tr></tbody></table><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>The right panel track exists permanently, with its width toggling between <code data-v-8cbfa422>0 ↔ var(--preview-w)</code> and no transition — animating a grid track would relayout the whole app grid every frame (when open it squeezes the conversation column, rather than switching templates).</li><li data-v-8cbfa422>The sidebar collapses SYMMETRICALLY to the right panel: its container width animates to 0 while the content keeps its fixed width anchored to the right edge (clipped, sliding out left — no reflow, hairline stays on the clipped content). No rail remains. The collapse control differs by platform: on <b data-v-8cbfa422>macOS desktop</b> the toggle is a single resident floating IconButton pinned beside the traffic lights (rendered in both states, only the glyph swaps — the sidebar slides underneath it, never moves or flashes); on <b data-v-8cbfa422>Windows / web</b> the collapse button lives inside the sidebar header (right-aligned), and a floating expand button appears at the top-left only while collapsed. The conversation header uses a 0.5px bottom hairline and pads left in step with the transition while collapsed.</li><li data-v-8cbfa422>All grid children must have <code data-v-8cbfa422>min-height:0; min-width:0</code>, so only the inner scroll containers scroll and the page itself does not scroll.</li></ul><h3 class="sub" data-v-8cbfa422>Sidebar alignment system (<code data-v-8cbfa422>--sb-*</code>)</h3><p data-v-8cbfa422>All sidebar rows (group head, session row, New chat, search, and Settings buttons) share 4 custom properties. Their 16px icon slots and <code data-v-8cbfa422>--sb-gap</code> place every label on the same x-axis as the workspace name.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Token</th><th data-v-8cbfa422>Value</th><th data-v-8cbfa422>Usage</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--sb-inset</td><td class="val" data-v-8cbfa422>12px</td><td data-v-8cbfa422>row box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--sb-pad-x</td><td class="val" data-v-8cbfa422>20px</td><td data-v-8cbfa422>content start x (= --sb-inset + 8px row padding)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--sb-gutter</td><td class="val" data-v-8cbfa422>16px</td><td data-v-8cbfa422>leading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>--sb-gap</td><td class="val" data-v-8cbfa422>8px</td><td data-v-8cbfa422>gap between the icon slot and the text</td></tr></tbody></table><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422> The session title's starting x = <code data-v-8cbfa422>--sb-pad-x + --sb-gutter + --sb-gap</code>. The group head has a folder icon and the session row has a status slot; both icons are the same width and position, so the titles align naturally. </div></div><h3 class="sub" data-v-8cbfa422>Sidebar structure</h3><p data-v-8cbfa422>The sidebar from top to bottom: brand header → action group → pinned head (pinned section + "Workspaces" label) → scrolling grouped list (workspace head + session rows) → user-menu footer. New chat and Search are direct sibling controls in the same grid container; the optional new-workspace action shares the first row, while Search spans the next row. A 4px gap keeps Search clear of the scroll boundary. The pinned head sits OUTSIDE the scroll container (the action-group / footer pattern — never <code data-v-8cbfa422>position: sticky</code>, which would need an opaque plate over the frosted tint), so the pinned sessions and the "Workspaces" label stay put while the workspace groups scroll beneath; the pinned section is collapsible (a chevron on its label, revealed on hover/focus and kept visible while folded; state persisted) so a long pinned set can't eat the sidebar, and it re-expands when a new session is pinned. Both pinned edges use three light near, middle and far fades across 18px, entering over 260ms only while more session content exists beyond that edge — the top seam lives at the pinned head's bottom border. The footer seam is a 0.5px hairline. Controls reuse the §03 primitives as much as possible. The sidebar sits on <code data-v-8cbfa422>--color-sidebar-bg</code> (one step off <code data-v-8cbfa422>--color-bg</code>: warm off-white just under white in light, one step BELOW the page in dark — the session column reads as its own plane, and with dark elevation = lighter the chrome never sits brighter than the conversation pane; the hairline still separates it from the pane). Vertical rhythm: the brand header keeps 12px padding (on macOS desktop the left padding grows to 80px to clear the traffic lights); rows inside the action group stack flush (0 gap, same rhythm as the list rows); adjacent groups are separated by 12px. The search glyph has a -0.5px optical correction to align its visual centre with the label. Row hover uses <code data-v-8cbfa422>--sb-hover</code> (= the global <code data-v-8cbfa422>--color-hover</code> wash); the selected row uses the lighter <code data-v-8cbfa422>--sb-selected</code> wash derived from <code data-v-8cbfa422>--color-selected</code> — On macOS desktop the sidebar is instead <b data-v-8cbfa422>frosted</b>: the window carries a native <code data-v-8cbfa422>NSVisualEffectView</code> ('menu' vibrancy, following the in-app scheme via the nativeTheme mirror, its state pinned to <code data-v-8cbfa422>inactive</code> so the material keeps its flat pressed-down colour — ≈ #282829 dark / #E7E7E7 light — with no active/inactive drift) and the sidebar column drops <code data-v-8cbfa422>--color-sidebar-bg</code> for a single translucent <code data-v-8cbfa422>--color-sidebar-tint</code> wash that presses the pinned material one step — ≈ #282829 → ≈ #1e1e1f in dark (<code data-v-8cbfa422>rgba(0,0,0,0.25)</code>), ≈ #E7E7E7 → ≈ #f1f1f1 in light (<code data-v-8cbfa422>rgba(255,255,255,0.4)</code>) — with header and footer staying transparent so the tint reads as one uniform pane; the root chain (<code data-v-8cbfa422>html/body/#app/.app</code>) stays unpainted only under the <code data-v-8cbfa422>macos-desktop</code> + <code data-v-8cbfa422>vibrancy</code> flags — the latter is the Settings → Appearance accessibility switch (default on; persisted main-side so the window is created with the right material, and live-applied on toggle): off repaints the root chain and the sidebar falls back to opaque <code data-v-8cbfa422>--color-sidebar-bg</code>, while the traffic-light layout keeps keying off <code data-v-8cbfa422>macos-desktop</code> alone — while the conversation pane, chat header and right preview keep their own opaque surfaces. The list's hover-icon clusters (session-row kebab, group-head actions) paint NOTHING there — no plate, no wash, no blur (real backdrop blur does not even render over this window: Chromium's backdrop sampler returns a flat wash above the transparent BrowserWindow + vibrancy view). Instead the row's title/name dissolves before it ever reaches the buttons: a two-stage <code data-v-8cbfa422>mask-image</code> fade — a subtle 16px dissolve at rest, extending over the cluster zone only while the actions are revealed (row hover / keyboard focus / menu open): 34px on session rows (the pin+kebab cluster overhangs the title by ≈25px), 68px on group heads (the floating cluster is ≈60px wide). The fade is zone-based, so short rows render untouched, and <code data-v-8cbfa422>text-overflow</code> becomes <code data-v-8cbfa422>clip</code> so a long tail dissolves instead of dotting.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Block</th><th data-v-8cbfa422>Use</th><th data-v-8cbfa422>Note</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td data-v-8cbfa422>Brand header</td><td data-v-8cbfa422>logo + name + collapse IconButton (right-aligned)</td><td data-v-8cbfa422>on Windows / web the brand is left and the collapse IconButton sm is right-aligned inside the header; the dev-only backend version/address pill uses the UI font, not monospace; the logo is animated (a blinking eye). On macOS desktop the header is a bare drag strip (brand hidden, traffic lights + resident floating toggle over it)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>New chat</td><td data-v-8cbfa422>full-width left-aligned button (custom)</td><td data-v-8cbfa422>500-weight label; same rhythm as the session rows in the list (left-aligned, hover = <code data-v-8cbfa422>--sb-hover</code>). <b data-v-8cbfa422>Do not</b> use Button (centered, breaks the rhythm)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Search</td><td data-v-8cbfa422>bare search row (custom)</td><td data-v-8cbfa422>500-weight label; no border, hover/focus shows the faint <code data-v-8cbfa422>--color-hover</code> wash; icon + label, with the <code data-v-8cbfa422>Kbd</code> keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. <b data-v-8cbfa422>Do not</b> use Input (the 38px bordered version is too heavy). It is a direct sibling of New chat in the action group</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Section label</td><td data-v-8cbfa422><code data-v-8cbfa422>.p-section-label</code></td><td data-v-8cbfa422>uppercase muted small titles like "Workspaces", using <code data-v-8cbfa422>--weight-section-label</code> (600)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Pinned head</td><td data-v-8cbfa422>fixed block above the scroll container (<code data-v-8cbfa422>.sessions-head</code>): the pinned section (<code data-v-8cbfa422>PinnedSessionList.vue</code>) + the "Workspaces" section label</td><td data-v-8cbfa422>stays put while the workspace groups scroll; owns the top scroll-linked seam (hairline + fade, only while scrolled). Pinned rows render in pure recency order (updatedAt desc — no manual ordering, no attention tiering): drag a session row in to pin it (the drop spot carries no position meaning), drag a pinned row out to unpin. The pinned section folds via its label chevron (persisted, <code data-v-8cbfa422>kimi-web.pinned-collapsed</code>) and re-expands only on an explicit pin (never on load backfill); the expanded rows are capped at 40vh with their own scroll so a long pinned set can't push the list or footer out of view</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Workspace head / session row</td><td data-v-8cbfa422>see next two sections</td><td data-v-8cbfa422>share <code data-v-8cbfa422>--sb-*</code> alignment</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>User-menu footer</td><td data-v-8cbfa422>account area (<code data-v-8cbfa422>components/UserMenu.vue</code>) opening an upward §03 menu</td><td data-v-8cbfa422>pinned row under the session list, separated by a 0.5px <code data-v-8cbfa422>--line</code> hairline; trigger keeps the same list-style family as New chat (24px round avatar + nickname when signed in, user icon + sign-in hint otherwise). The menu box follows the trigger's left edge and width (ResizeObserver-tracked, so it survives a sidebar resize) and is teleported to body because the column's container-type would capture position:fixed. Rows: plan usage / theme / language are macOS-style hover flyout submenus — the parent row carries the module icon, a faint current value and a fixed chevron-right, and hovering (or moving focus to the parent row, or pressing Enter / Space / → on it) opens a teleported panel anchored to the parent menu's right edge (content-adaptive width floored by the menu's own min-width and capped at the parent menu's width; flips left near the viewport edge) with a 250ms hover-intent close grace; the usage panel shows weekly + 5h rows (used-percent values via <code data-v-8cbfa422>settings.planUsage.usedPct</code>, with severity colours), while the theme (three schemes) and language (two locales) panels move the check to the picked option without closing the menu — then the upgrade entry below the top plan level, settings (with an always-visible Kbd keycap shortcut hint on desktop) and a confirming sign-out; all menu icons come from the Kimi set, and the whole menu (flyouts included) runs one step above the §03 default density — base-size labels, taller rows</td></tr></tbody></table><div class="callout warn" data-v-8cbfa422><span class="ico" data-v-8cbfa422>!</span><div data-v-8cbfa422><b data-v-8cbfa422>Why New chat / search / inline rename don't use Button / Input:</b> they are "list-style" controls (full-width, left-aligned, compact, borderless), while Button is centered and Input is a 38px bordered control — forcing them in would break the sidebar's visual density and alignment. This is an intentional custom exception, not an oversight. </div></div><h3 class="sub" data-v-8cbfa422>Session row</h3><p data-v-8cbfa422>A session row is an inset rounded pill, structured as: <code data-v-8cbfa422>status slot → title → time → attention Badge → hover actions (pin / archive)</code>.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Part</th><th data-v-8cbfa422>Rule</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td data-v-8cbfa422>Container</td><td data-v-8cbfa422><code data-v-8cbfa422>padding: 8px 8px</code> inside the list's <code data-v-8cbfa422>--sb-inset</code> gutter, <code data-v-8cbfa422>radius-sm</code>; <b data-v-8cbfa422>no fixed/min height</b> — row height is font-driven (title <code data-v-8cbfa422>line-height: --leading-tight</code>, ≈16px) → ≈32px total, the sidebar-wide row rhythm. The hover actions are absolutely positioned so they never force the row taller (no hover jitter). hover = <code data-v-8cbfa422>--sb-hover</code> (the global <code data-v-8cbfa422>--color-hover</code> wash); active = <code data-v-8cbfa422>--sb-selected</code> (75% of the global selected wash) — neutral, no accent tint, no border, no weight change</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Status slot (lead)</td><td data-v-8cbfa422>fixed <code data-v-8cbfa422>--sb-gutter</code> width; running = <code data-v-8cbfa422>Spinner</code> sm, otherwise unread = 7px accent dot; empty while an attention Badge owns the row — one status at a time, decided by the shared <code data-v-8cbfa422>SessionDisplayStatus</code> enum (app-core <code data-v-8cbfa422>sessionDisplayStatus.ts</code>: approval › question › running › aborted › unread)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Title</td><td data-v-8cbfa422>flex:1 with truncation and <code data-v-8cbfa422>user-select:none</code>; double-click enters inline rename (compact input, not Input), whose text remains selectable</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Emoji icon</td><td data-v-8cbfa422>the session icon is the title's LEADING emoji cluster (app-core <code data-v-8cbfa422>splitSessionEmoji</code> — no icon field; every client renders the title as-is). The emoji is an ordinary title character — no decoration at rest or on hover (it stays a <code data-v-8cbfa422><button></code> for a11y), and clicking it opens <code data-v-8cbfa422>SessionEmojiPicker</code> — a Menu-shelled panel (bare list-style search row → scrollable sections: Recently used persisted in localStorage (cap 8) + the grouped emoji dataset, with remove/random as MenuItems in the footer; a query swaps the sections for keyword-search results), teleported + fixed + <code data-v-8cbfa422>--z-dropdown</code>, popping from the trigger corner like the right-click menu. The menu's "Set Emoji…" opens the same picker and is the discoverable path. Inline rename edits the whole title — the emoji is an ordinary character in the input</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Time</td><td data-v-8cbfa422>mono xs, <code data-v-8cbfa422>fg-faint</code>; yields to the hover actions on hover</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Attention Badge</td><td data-v-8cbfa422><code data-v-8cbfa422>Badge</code> sm: info (needs answer) / warning (needs approval) / danger (aborted)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Hover actions</td><td data-v-8cbfa422><code data-v-8cbfa422>IconButton</code> sm × 2 — pin + archive — cross-faded over the time on row hover (no kebab button). Right-clicking the row opens the full menu (copy ID / rename / emoji / fork / export / pin / archive + timestamp) anchored to the cursor, except over the inline rename input, where the native text-editing menu stays</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Flat-style variant (flat list + pinned section)</td><td data-v-8cbfa422>the sidebar's flat list rows AND — always, regardless of view mode — the pinned section's rows differ from the grouped row in three ways (all keyed off the facade projecting <code data-v-8cbfa422>cwdLabel</code>): ① no leading status slot — the title is left-aligned at the row's content edge; ② a second line under the title: <code data-v-8cbfa422>folder-closed</code> icon sm + the cwd's final directory name (<code data-v-8cbfa422>-</code> when the session has no cwd), xs faint like the time — except the icon, which takes <code data-v-8cbfa422>--color-text-muted</code> (one rung stronger, the same optical compensation as the group head's folder; the open-folder glyph's thin back-flap washed out at 14px) — rest-width tail mask fade; when the session has an associated PR (v2 git domain), a small tag (<code data-v-8cbfa422>git-pull-request</code> icon + #number, 2xs medium on a soft ground with a hairline edge and radius-sm corners — a mini §03 Badge) sits at the line's right edge, state-colored the GitHub way (open = <code data-v-8cbfa422>--color-success-soft</code> ground + <code data-v-8cbfa422>--color-success</code> text, merged = <code data-v-8cbfa422>--color-done-soft</code> + <code data-v-8cbfa422>--color-done</code> purple, closed = neutral sunken) and opens the PR on click; ③ the first line's right side shows status — attention Badges anchored to the row's right edge, running Spinner, unread dot — INSTEAD of the time, which only renders when there is nothing to report (the Spinner yields to the attention pills: a session waiting for approval/answer never shows both); on hover the actions cross-fade IN as the whole status cluster fades OUT — pills and pin/archive never co-exist (grouped rows keep pills visible on hover). Height stays font-driven — the pill just grows the line. Grouped rows never set <code data-v-8cbfa422>cwdLabel</code> and keep the classic structure. The flat ↔ grouped switch lives in a dropdown on the SESSIONS section label (fixed <code data-v-8cbfa422>list-settings</code> icon + hover tooltip; the menu opens with a muted group label, per-view icons, and the current view checked at the row's right edge; mode persisted per device)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Archive</td><td data-v-8cbfa422>no confirm — the hover archive button / menu item archives immediately, then App.vue shows the §03 <code data-v-8cbfa422>ActionToast</code> (top-center) with Undo (restores the session) and Settings (opens the archived list)</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Workspace group</h3><p data-v-8cbfa422>The group head and session rows share <code data-v-8cbfa422>--sb-*</code>: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.</p><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>The folder icon leads the row (switching icons between open and closed states) with the plain <code data-v-8cbfa422>--sb-gap</code> before the name — it does not pad out the <code data-v-8cbfa422>--sb-gutter</code> slot.</li><li data-v-8cbfa422>The name uses 500 weight with muted color (<code data-v-8cbfa422>--color-text-muted</code>, one step lighter than session titles), so group heads remain clear without competing with list content. No path subtitle; hovering the name shows the full root path in a <code data-v-8cbfa422>Tooltip</code>.</li><li data-v-8cbfa422>The kebab (menu) and "+" (new chat in this workspace) both use <code data-v-8cbfa422>IconButton</code> sm inside a floating actions layer anchored to the row's right edge — no reserved layout space, so the name uses the full row width when idle. Shown on hover, keyboard focus, or while the menu is open; the layer backs itself with the sidebar surface (container background) plus the row hover wash (an <code data-v-8cbfa422>::after</code> shown only while the row is hovered), so its color exactly equals the row's current background and the overlapped name tail doesn't bleed through (hidden via <code data-v-8cbfa422>opacity:0</code>, staying in the tab order). On macOS desktop the layer paints nothing at all — the name's <code data-v-8cbfa422>mask-image</code> fade (see the sidebar section above) dissolves the tail before it reaches the buttons</li><li data-v-8cbfa422>The group is collapsible; when collapsed its session list is hidden.</li><li data-v-8cbfa422>While the active workspace has no session selected (the draft state — e.g. right after adding the workspace, or after New chat), the group head carries the same neutral <code data-v-8cbfa422>--sb-selected</code> fill as a selected session row (selection reads as "where I am"; the fill wins over hover). Once a session is selected or created, the fill moves to that session row.</li></ul><h3 class="sub" data-v-8cbfa422>Show more & collapse</h3><p data-v-8cbfa422>The "expand / collapse" controls at the bottom of each workspace group are compact list controls (same family as search, New chat, inline rename — not Buttons) sharing one row: expand (chevron-down) first, collapse (chevron-up) after a faint middot when both are present. Expanding reveals the next batch of sessions, fetching the next page from the server only when the locally loaded rows can't cover it — the control never exposes whether a reveal came from memory or the network.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Part</th><th data-v-8cbfa422>Rule</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Row</td><td data-v-8cbfa422>a single flex row holding the controls, all content-width — hover washes just the button as a snug pill, never the full row. Font-driven height (≈32px like a session row), <code data-v-8cbfa422>radius-sm</code>; hover = <code data-v-8cbfa422>--sb-hover</code> (no text recolor); <code data-v-8cbfa422>:focus-visible</code> uses <code data-v-8cbfa422>--p-focus-ring</code></td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Chevron</td><td data-v-8cbfa422>sm (down = expand, up = collapse); the row indents by <code data-v-8cbfa422>--sb-gutter + --sb-gap</code> so the first button's chevron starts exactly at the session-title x, lining the control's leading edge up with the titles above</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Label</td><td data-v-8cbfa422><code data-v-8cbfa422>font-ui</code>, <code data-v-8cbfa422>text-xs</code>, <code data-v-8cbfa422>--color-text-muted</code>; truncated</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Separator</td><td data-v-8cbfa422>faint middot (<code data-v-8cbfa422>--color-text-faint</code>) with <code data-v-8cbfa422>--space-1</code> side margins, rendered only when both controls are present</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Behavior</td><td data-v-8cbfa422>each group keeps a display cap starting at the first page; "Show more" steps it up by one batch (5) and fetches the next page only when the loaded rows fall short (busy = "Loading…", disabled); "Show less" resets the cap to the first page (view-layer trim — data is kept, no refetch). "Show more" exists while undisplayed loaded rows remain or the server has more; "Show less" appears once past the first page</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>ResizeHandle</h3><p data-v-8cbfa422>A 4px grab strip layered over the 1px column border (<code data-v-8cbfa422>margin: 0 -2px</code> makes the whole 4px grabbable) with a centred 2px indicator bar. The bar stays transparent at rest and shows the neutral fills one step up the ramp — f2 on hover, f3 while the drag is live (the sidebar column is translucent on macOS, so f1 read too faint) — never the accent.</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Rule</th><th data-v-8cbfa422>Value</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td data-v-8cbfa422>Width / cursor</td><td data-v-8cbfa422>4px strip, 2px bar / <code data-v-8cbfa422>col-resize</code> mid-range; <code data-v-8cbfa422>w-resize</code> / <code data-v-8cbfa422>e-resize</code> at the drag limits (hints the direction that still resizes)</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Normal / hover / drag</td><td data-v-8cbfa422>transparent / <code data-v-8cbfa422>--color-selected</code> (f2) / <code data-v-8cbfa422>--color-line-strong</code> (f3) — the neutral ramp one step up, never accent</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Layer</td><td data-v-8cbfa422><code data-v-8cbfa422>--z-dropdown</code>, above pane-level sticky chrome (chat dock at <code data-v-8cbfa422>--z-sticky</code>) so the overhang stays visible and grabbable</td></tr><tr data-v-8cbfa422><td data-v-8cbfa422>Behavior</td><td data-v-8cbfa422>panel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage</td></tr></tbody></table><h3 class="sub" data-v-8cbfa422>Right panel</h3><p data-v-8cbfa422>The right panels (file preview / Diff / compaction summary / sub-agent / side chat) share one track and one head primitive.</p><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>The panel head uses the <code data-v-8cbfa422>PanelHeader</code> primitive (48px = <code data-v-8cbfa422>--panel-head-h</code>), the same height as the conversation column head, so the hairline runs as one line.</li><li data-v-8cbfa422>Panel head: bold mono title + optional muted subtitle + middle slot (Badge / control / path) + close IconButton on the right.</li><li data-v-8cbfa422>When opened, the panel width snaps from <code data-v-8cbfa422>0 → var(--preview-w)</code> with no animation, squeezing the conversation column in a single layout.</li><li data-v-8cbfa422>At ≤640px the panel becomes a full-screen overlay (<code data-v-8cbfa422>position:fixed; inset:0</code>).</li></ul><h3 class="sub" data-v-8cbfa422>Bottom terminal panel (desktop-only)</h3><p data-v-8cbfa422>The native terminal (<code data-v-8cbfa422>components/terminal/</code>) sits in the conversation column's own bottom grid slot — the sidebar and the right panel span BOTH rows and keep full height (the VS Code layout: the panel belongs to the editor area, not to the whole window). Its height transitions <code data-v-8cbfa422>0 ↔ var(--terminal-h)</code> (260px default, 120 min, 60% viewport max; persisted), squeezing the conversation column above instead of overlaying it. The panel mounts lazily on first open and then stays mounted so xterm scrollback survives a collapse.</p><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>Resize: a horizontal twin of the ResizeHandle (4px strip over the 0.5px top hairline, <code data-v-8cbfa422>row-resize</code> mid-range, <code data-v-8cbfa422>n/s-resize</code> at the limits, same neutral f2/f3 ramp, never accent). The shared <code data-v-8cbfa422>useResizable</code> hook owns it via <code data-v-8cbfa422>axis: 'y'</code>; the height var is written imperatively during a drag (same no-Vue-rerender rule as <code data-v-8cbfa422>--preview-w</code>).</li><li data-v-8cbfa422>Toolbar (32px, 0.5px bottom hairline): tab strip on the left — each tab is a compact <code data-v-8cbfa422>radius-sm</code> pill (leading terminal glyph, muted while exited + shell label + hover close affordance), the active tab uses <code data-v-8cbfa422>--color-selected</code>, hover <code data-v-8cbfa422>--color-hover</code>; a "+" action appends a tab. Tabs follow the §08 tablist keyboard model (roving tabindex, ←/→/Home/End), the close affordance is its own button (no nested interactives), and the height separator is keyboard-operable (↑/↓ in steps, value exposed). Trailing actions: restart (only while the active tab exited) and a collapse chevron. Collapsing sets <code data-v-8cbfa422>inert</code> on the region — the xterm instances and their scrollback stay mounted but leave the tab order.</li><li data-v-8cbfa422>The xterm canvas cannot resolve CSS variables either, so its palette is resolved from the live <code data-v-8cbfa422>--color-*</code> tokens at runtime (re-read on scheme flips; the ANSI hues the status ramp doesn't cover use dedicated <code data-v-8cbfa422>--color-term-magenta/cyan</code> tokens); the font is the app JetBrains Mono stack sized off the content token scale. While focused, the panel owns every key except the registered app shortcuts (chat-level Esc / find / select-all chords stay inert inside it).</li><li data-v-8cbfa422>Entries: the chat header's terminal IconButton (right of Open in, lit while the panel is open) — on the empty-composer state, where no chat header renders, the same button floats at the conversation's top-right instead — plus <code data-v-8cbfa422>ctrl+`</code> (⌃` on macOS — VS Code's binding; ⌘` stays free for the OS window switcher — customizable in the shortcut registry), and the View menu's Toggle Terminal item. New tabs spawn in the visible workspace root. Terminal state is per session: switching sessions swaps the visible bucket while the others keep their PTYs and xterm views alive (scrollback survives a round trip; the ten most recent sessions are kept, LRU). The panel never renders on mobile / web.</li></ul><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>One-sentence principle:</b> the sidebar / shell is a "list + grid" skeleton that reuses the §02 tokens and §03 primitives (Button / IconButton / Badge / Kbd / Menu / Spinner / PanelHeader); compact list controls that don't fit a primitive (search, New chat, inline rename, show-more) keep their custom form, governed by this section. </div></div></section><section id="a11y" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>08</span><h2 class="sec-title" data-v-8cbfa422>Accessibility (pragmatic edition)</h2></div><p class="sec-desc" data-v-8cbfa422> Kimi Web is a local developer tool; it <b data-v-8cbfa422>does not target a specific WCAG conformance level</b>, nor maintain a full screen-reader QA matrix. This section collects only the rules that are "low-cost, don't hurt the look, and directly benefit keyboard-heavy users", as the baseline contract for each primitive; the more expensive, lower-ROI parts (such as real-time announcement orchestration for streaming output) are not mandatory for now. </p><div class="callout info" data-v-8cbfa422><span class="ico" data-v-8cbfa422>i</span><div data-v-8cbfa422><b data-v-8cbfa422>On the "ugly" focus ring:</b> the focus visibility required below always uses <code data-v-8cbfa422>:focus-visible</code> (not <code data-v-8cbfa422>:focus</code>). It appears <b data-v-8cbfa422>only on keyboard focus</b>; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with <code data-v-8cbfa422>--p-focus-ring</code>, not overridden per place. </div></div><h4 class="mini" data-v-8cbfa422>1. Contrast & color</h4><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>Body text vs. background contrast <b data-v-8cbfa422>≥ 4.5:1</b>; control borders, icons, and key graphics <b data-v-8cbfa422>≥ 3:1</b>. When changing theme colors / dark mode, verify against §05 together.</li><li data-v-8cbfa422><b data-v-8cbfa422>Button text vs. button background</b>, and <b data-v-8cbfa422>form controls</b> (input, placeholder, helper / error text) <b data-v-8cbfa422>vs. their section background</b> must all have contrast ≥ 4.5:1 (large text ≥ 3:1). White-on-white text, a transparent borderless button floating over the page background, and a light placeholder on a near-white background are all flagged by the style rules.</li><li data-v-8cbfa422><b data-v-8cbfa422>State is not conveyed by color alone.</b> Error, selected, and disabled states also carry text, an icon, or a shape change (for example an error state is not just red, but also carries text or an icon).</li></ul><h4 class="mini" data-v-8cbfa422>2. Keyboard operable</h4><p data-v-8cbfa422>Anything doable with a mouse must also be doable with a keyboard; Tab order follows the DOM, with no invented skipping. Composite controls define their keyboard model per the table below; a missing model is treated as incomplete:</p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Control</th><th data-v-8cbfa422>Keyboard behavior</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Dialog</td><td data-v-8cbfa422><code data-v-8cbfa422>Tab</code> cycles within the dialog (focus trap); <code data-v-8cbfa422>Esc</code> closes; focus returns to the trigger element after closing.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Menu</td><td data-v-8cbfa422><code data-v-8cbfa422>↑</code> / <code data-v-8cbfa422>↓</code> move the highlight, <code data-v-8cbfa422>Enter</code> selects, <code data-v-8cbfa422>Esc</code> closes.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Tabs</td><td data-v-8cbfa422><code data-v-8cbfa422>←</code> / <code data-v-8cbfa422>→</code> switch tabs (roving tabindex); only the current tab is in the Tab sequence.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Switch / Segmented</td><td data-v-8cbfa422><code data-v-8cbfa422>←</code> / <code data-v-8cbfa422>→</code> or <code data-v-8cbfa422>Space</code> / <code data-v-8cbfa422>Enter</code> to toggle.</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>3. Focus visibility</h4><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422>Every interactive element must have a visible focus indicator on keyboard focus, uniformly via <code data-v-8cbfa422>:focus-visible</code> + <code data-v-8cbfa422>--p-focus-ring</code> (primary actions may use <code data-v-8cbfa422>--p-focus-ring-strong</code>).</li><li data-v-8cbfa422>Bare <code data-v-8cbfa422>outline: none</code> is forbidden. To remove the default outline, you must provide an equivalent replacement style.</li></ul><h4 class="mini" data-v-8cbfa422>4. Labels & semantics</h4><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422><b data-v-8cbfa422>Semantic HTML first</b> (button / a / input / dialog…); ARIA is added only when native semantics fall short.</li><li data-v-8cbfa422>Icon-only buttons must have an <code data-v-8cbfa422>aria-label</code> — <code data-v-8cbfa422>IconButton</code> already enforces this with a required <code data-v-8cbfa422>label</code> prop.</li><li data-v-8cbfa422>Dialog: <code data-v-8cbfa422>role="dialog"</code> + <code data-v-8cbfa422>aria-modal="true"</code>, with the title as the dialog's accessible name.</li><li data-v-8cbfa422>Purely decorative SVG / icons get <code data-v-8cbfa422>aria-hidden="true"</code> to avoid being read out by screen readers.</li></ul><h4 class="mini" data-v-8cbfa422>5. Target size</h4><p data-v-8cbfa422>Desktop click targets <b data-v-8cbfa422>≥ 32px</b>; touch devices <b data-v-8cbfa422>≥ 44px</b> (consistent with the §01 principle and the IconButton <code data-v-8cbfa422>lg</code> tier).</p><h4 class="mini" data-v-8cbfa422>6. Reduced motion</h4><p data-v-8cbfa422>Handled uniformly in the global styles per §02's <code data-v-8cbfa422>@media (prefers-reduced-motion: reduce)</code>; components do not check this individually. The chat working indicator's mascot renders its static fallback.</p><h4 class="mini" data-v-8cbfa422>7. Live announcements (non-mandatory)</h4><p data-v-8cbfa422>Screen-reader announcements are <b data-v-8cbfa422>not a mandatory contract</b> in this product. Short hints like Toast can use <code data-v-8cbfa422>role="status"</code> / <code data-v-8cbfa422>aria-live</code>; chat streaming output is currently not announced word-by-word, which is an acceptable trade-off, to be added later if a real need arises.</p><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422><b data-v-8cbfa422>Explicitly not mandatory for now:</b> a WCAG conformance-level claim, a complete ARIA pattern table, a per-screen-reader QA matrix, and real-time announcement orchestration for streaming output — these are not written into the primitive contract, to avoid becoming slogans no one maintains. </div></div></section><section id="dialogs" data-v-8cbfa422><div class="sec-head" data-v-8cbfa422><span class="sec-num" data-v-8cbfa422>09</span><h2 class="sec-title" data-v-8cbfa422>Dialogs</h2></div><p class="sec-desc" data-v-8cbfa422> Every overlay in the app — pickers, browsers, managers, confirmations — is built on the single §03 Dialog primitive. This chapter fixes the two layout anatomies allowed inside that frame, plus the row and footer contracts that make all dialogs read as one family. Do not hand-roll a third anatomy. </p><h3 class="sub" data-v-8cbfa422>The frame (recap)</h3><p data-v-8cbfa422> All dialogs share the §03 primitive: <code data-v-8cbfa422>--radius-xl</code> radius, <code data-v-8cbfa422>--shadow-xl</code> shadow, a restrained 28% neutral backdrop, a head (title + IconButton close), a body, and a right-aligned foot. Widths <code data-v-8cbfa422>md</code> 440 / <code data-v-8cbfa422>lg</code> 640 / <code data-v-8cbfa422>xl</code> 760 and <code data-v-8cbfa422>auto</code> / <code data-v-8cbfa422>fixed</code> height are chosen per §03. One interruptive overlay at a time; <code data-v-8cbfa422>Esc</code> closes; focus is trapped and restored. A blocking flow that must be resolved rather than dismissed (server token) uses <code data-v-8cbfa422>hideClose</code> with <code data-v-8cbfa422>closeOnOverlay</code>/<code data-v-8cbfa422>closeOnEsc</code> off — never a hand-written overlay. </p><h3 class="sub" data-v-8cbfa422>Anatomy A — padded (forms & confirmations)</h3><p data-v-8cbfa422> The default: the body carries its own padding and the caller drops content straight in. Confirmations put their Buttons in the <code data-v-8cbfa422>#foot</code> slot (right-aligned, cancel → confirm). Used by: confirm, login, status panel, server token. </p><h3 class="sub" data-v-8cbfa422>Anatomy B — flush (pickers & browsers)</h3><p data-v-8cbfa422><code data-v-8cbfa422>:padded="false"</code> with <code data-v-8cbfa422>height="fixed"</code>; the consumer owns the zone layout inside a full-height column. The zones below are the whole vocabulary — a picker dialog composes them and adds nothing else. Used by: model picker, session search, folder browser, provider manager. </p><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Zone</th><th data-v-8cbfa422>Contract</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Search</td><td data-v-8cbfa422>The boxed §03 Input, inset 22px so its edge aligns with the head title. Autofocus on open. No leading icon, no borderless variant.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Filter chips</td><td data-v-8cbfa422>Optional. 28px pill: transparent + muted text by default, <code data-v-8cbfa422>--color-hover</code> on hover, <code data-v-8cbfa422>--color-selected</code> + medium <code data-v-8cbfa422>--color-text</code> when active. Horizontally scrollable with the scrollbar hidden. Never a row of Buttons.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>List</td><td data-v-8cbfa422><code data-v-8cbfa422>flex:1</code>, owns the vertical scrolling, padded 4px 8px so rows bleed near the dialog edge. <code data-v-8cbfa422>role="listbox"</code>; rows carry <code data-v-8cbfa422>role="option"</code> + <code data-v-8cbfa422>aria-selected</code>.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Row</td><td data-v-8cbfa422>8px 12px padding, <code data-v-8cbfa422>--radius-md</code>. Two quiet lines: name 14/20 (medium when current) and a meta line 12/18 in <code data-v-8cbfa422>--color-text-faint</code> — provider · context · capability labels, dot-separated. No badge rows, no raw-id line (search still matches them). Trailing slot: check icon (current row only), then the star IconButton.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Row states</td><td data-v-8cbfa422>Hover / keyboard-selected → <code data-v-8cbfa422>--color-hover</code>; current → <code data-v-8cbfa422>--color-selected</code> — a neutral "where I am" fill, never an accent tint, never an inset stroke. The star stays hidden until row hover, keyboard selection, or starred; it is always visible on touch devices and colored <code data-v-8cbfa422>--star</code> when starred.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>State rows</td><td data-v-8cbfa422>Loading / unavailable / empty: centered on both axes, muted 14px; warning color only for the unavailable case.</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Shortcut bar</td><td data-v-8cbfa422>The footer: full-bleed, padding 8px 16px, <code data-v-8cbfa422>border-top --color-line</code>, left-aligned. Keyboard hints are Kbd keycaps + 12px <code data-v-8cbfa422>--color-text-faint</code> labels, groups separated by "·", the whole bar <code data-v-8cbfa422>aria-hidden</code>. An instructional sentence (folder browser) reuses the same bar without keycaps.</td></tr></tbody></table><h4 class="mini" data-v-8cbfa422>Keyboard & behavior contract</h4><ul class="clean" data-v-8cbfa422><li data-v-8cbfa422><code data-v-8cbfa422>↑</code>/<code data-v-8cbfa422>↓</code> move a keyboard selection (rendered identical to hover) and always <code data-v-8cbfa422>scrollIntoView({ block: 'nearest' })</code>; <code data-v-8cbfa422>Enter</code> selects and closes; <code data-v-8cbfa422>Esc</code> closes.</li><li data-v-8cbfa422>Pointer hover drives the same selection index, so keyboard and mouse never disagree about which row is active.</li><li data-v-8cbfa422>Rows transition <code data-v-8cbfa422>background</code> only (<code data-v-8cbfa422>--duration-fast</code> ease-out); the open/close animation lives in the primitive, not in the consumer.</li><li data-v-8cbfa422>Selection is a fill, not a border (surface over stroke). Accent blue is reserved for actions — primary buttons and focus rings — never for "which row am I on".</li></ul><h4 class="mini" data-v-8cbfa422>Dialog map</h4><table class="dt" data-v-8cbfa422><thead data-v-8cbfa422><tr data-v-8cbfa422><th data-v-8cbfa422>Dialog</th><th data-v-8cbfa422>Anatomy</th><th data-v-8cbfa422>Composition</th></tr></thead><tbody data-v-8cbfa422><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Model picker</td><td data-v-8cbfa422>flush · lg · fixed</td><td data-v-8cbfa422>search + provider chips + model rows + shortcut bar</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Session search</td><td data-v-8cbfa422>flush · lg · fixed</td><td data-v-8cbfa422>search + result rows (sidebar-style alignment: one icon gutter, shared left text edge, shared right meta edge; workspace rows single-line name + right-aligned path, session rows title + time over a workspace · snippet meta line; quiet uppercase section heads with counts; empty query shows a few top workspaces + recent sessions) + shortcut bar</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Folder browser</td><td data-v-8cbfa422>flush · lg · fixed</td><td data-v-8cbfa422>breadcrumb bar + filter bar + folder rows + actions + hint bar</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Provider manager</td><td data-v-8cbfa422>flush · xl · fixed</td><td data-v-8cbfa422>management rows with inset dividers (rows are not selectable) + add section + shortcut bar</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Confirm / Login / Status</td><td data-v-8cbfa422>padded · md · auto</td><td data-v-8cbfa422>title + message or form + right-aligned foot</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>App update (desktop)</td><td data-v-8cbfa422>padded · lg · auto</td><td data-v-8cbfa422>version title + quiet meta line (release date · current version) + height-capped scrolling what's-new list / progress bar + right-aligned action row (skip → download, later → restart) with the auto-download checkbox right-aligned on its own foot row below (a pure preference for future checks)</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Server token</td><td data-v-8cbfa422>padded · md · auto</td><td data-v-8cbfa422><code data-v-8cbfa422>hideClose</code>, no Esc/overlay close — resolved only by a valid token</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Settings</td><td data-v-8cbfa422>flush · xl · fixed</td><td data-v-8cbfa422>page-like exception: side-nav region, per §03</td></tr><tr data-v-8cbfa422><td class="tk" data-v-8cbfa422>Onboarding wizard</td><td data-v-8cbfa422>not a Dialog</td><td data-v-8cbfa422>full-page takeover (not built on §03): one centered column (brand lockup → step content → ghost actions + centered primary CTA); selectable options share the option-card pattern — 0.5px <code data-v-8cbfa422>--color-line</code> hairline, <code data-v-8cbfa422>--color-accent</code> border + <code data-v-8cbfa422>--color-accent-soft</code> fill when selected</td></tr></tbody></table><div class="callout good" data-v-8cbfa422><span class="ico" data-v-8cbfa422>✓</span><div data-v-8cbfa422><b data-v-8cbfa422>Design intent:</b> a picker dialog should feel like a quiet command palette — one boxed search, calm rows, a neutral "you are here" fill, and a predictable shortcut bar. Anything noisier — badge clouds, accent-selected rows, per-dialog footer inventions — is a regression to weed out. </div></div></section>',5))])])])]))}}),Rt=E(Dt,[["__scopeId","data-v-8cbfa422"]]);export{Rt as default}; diff --git a/apps/kimi-code/dist-web/assets/DesignSystemView-DT_ORWRp.css b/apps/kimi-code/dist-web/assets/DesignSystemView-DT_ORWRp.css deleted file mode 100644 index 5d141c49a..000000000 --- a/apps/kimi-code/dist-web/assets/DesignSystemView-DT_ORWRp.css +++ /dev/null @@ -1 +0,0 @@ -.ds-page[data-v-8cbfa422]{--d-bg: var(--color-bg);--d-surface: var(--color-surface);--d-surface-2: var(--color-surface-sunken);--d-surface-3: var(--color-line);--d-fg: var(--color-text);--d-fg-soft: var(--color-text-muted);--d-fg-muted: var(--color-text-muted);--d-fg-faint: var(--color-text-faint);--d-line: var(--color-line);--d-line-2: var(--color-line);--d-accent: var(--color-accent);--d-accent-2: var(--color-accent-hover);--d-accent-soft: var(--color-accent-soft);--d-accent-bd: var(--color-accent-bd);--d-green: var(--color-success);--d-green-soft: var(--color-success-soft);--d-amber: var(--color-warning);--d-amber-soft: var(--color-warning-soft);--d-red: var(--color-danger);--d-red-soft: var(--color-danger-soft);--d-violet: var(--color-done);--d-code-bg: var(--color-surface-sunken);--d-sidebar: var(--color-surface);--d-shadow-sm: var(--shadow-sm);--d-shadow-md: var(--shadow-md);--d-shadow-lg: var(--shadow-lg);--sidebar-w: var(--p-sidebar-w);--content-max: var(--p-content-wide)}.ds-page[data-v-8cbfa422] *,.ds-page[data-v-8cbfa422] *:before,.ds-page[data-v-8cbfa422] *:after{box-sizing:border-box}.ds-page[data-v-8cbfa422]{scroll-behavior:smooth}.ds-page[data-v-8cbfa422]{margin:0;background:var(--d-bg);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}h1[data-v-8cbfa422],h2[data-v-8cbfa422],h3[data-v-8cbfa422],h4[data-v-8cbfa422]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-8cbfa422]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-8cbfa422]{color:var(--d-accent-2);text-decoration:none}a[data-v-8cbfa422]:hover{text-decoration:underline}code[data-v-8cbfa422],pre[data-v-8cbfa422],.mono[data-v-8cbfa422]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-8cbfa422]{background:var(--d-code-bg);border:.5px solid var(--d-line-2);border-radius:5px;padding:1px 6px;font-size:.88em;color:#1f2937;white-space:nowrap}.layout[data-v-8cbfa422]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-8cbfa422]{position:sticky;top:0;align-self:start;height:100vh;background:var(--d-sidebar);border-right:.5px solid var(--d-line);padding:26px 22px;overflow-y:auto}.brand[data-v-8cbfa422]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-8cbfa422]{width:26px;height:26px;border-radius:7px;flex:none;background:var(--d-fg);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;letter-spacing:-.04em}.brand-name[data-v-8cbfa422]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-8cbfa422]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-8cbfa422]{margin:22px 0 8px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--d-fg-faint)}.p-section-label[data-v-8cbfa422]{font-size:12px;font-weight:600;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-8cbfa422]{display:flex;align-items:center;gap:9px;padding:7px 10px;border-radius:7px;font-size:13.5px;font-weight:500;color:var(--d-fg-soft);margin:1px 0;transition:background .15s,color .15s}.nav a .num[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-8cbfa422]:hover{background:var(--color-hover);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-8cbfa422]{background:var(--color-hover);color:var(--d-fg)}.nav a.active .num[data-v-8cbfa422]{color:var(--d-fg-soft)}.content[data-v-8cbfa422]{min-width:0}.content-inner[data-v-8cbfa422]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-8cbfa422]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-8cbfa422]{margin-top:72px}.hero[data-v-8cbfa422]{padding:8px 0 40px;border-bottom:.5px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:8px;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--d-fg);background:#1783ff1a;border:none;padding:6px 12px;border-radius:8px;margin-bottom:22px}.hero h1[data-v-8cbfa422]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-8cbfa422]{color:var(--d-accent)}.hero p.lead[data-v-8cbfa422]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-8cbfa422]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--d-fg-muted);background:var(--d-surface);border:.5px solid var(--d-line);border-radius:8px;padding:7px 12px}.meta-chip b[data-v-8cbfa422]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-8cbfa422]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-8cbfa422]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-8cbfa422]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-8cbfa422]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-8cbfa422]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-8cbfa422]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-8cbfa422]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-8cbfa422]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-8cbfa422]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-8cbfa422]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-8cbfa422]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-8cbfa422]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-8cbfa422]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-8cbfa422]{color:var(--d-amber)}.stat.bad[data-v-8cbfa422]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-8cbfa422]{color:var(--d-red)}.stat.good[data-v-8cbfa422]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-8cbfa422]{color:var(--d-green)}.panel[data-v-8cbfa422]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-8cbfa422]{padding:22px}.panel-soft[data-v-8cbfa422]{background:var(--d-surface);border:.5px solid var(--d-line);border-radius:14px}.callout[data-v-8cbfa422]{display:flex;gap:12px;padding:14px 16px;border-radius:12px;font-size:14px;line-height:1.55;background:var(--d-surface);border:.5px solid var(--d-line);color:var(--d-fg-soft);margin:18px 0}.callout .ico[data-v-8cbfa422]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-8cbfa422]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-8cbfa422]{background:var(--d-accent);color:#fff}.callout.warn[data-v-8cbfa422]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-8cbfa422]{background:var(--d-amber);color:#fff}.callout.good[data-v-8cbfa422]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-8cbfa422]{background:var(--d-green);color:#fff}table.dt[data-v-8cbfa422]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-8cbfa422]{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--d-fg-faint);font-weight:700;padding:10px 12px;border-bottom:.5px solid var(--d-line)}table.dt td[data-v-8cbfa422]{padding:11px 12px;border-bottom:.5px solid var(--d-line-2);color:var(--d-fg-soft);vertical-align:middle}table.dt tr:last-child td[data-v-8cbfa422]{border-bottom:none}table.dt td.tk[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-8cbfa422]{display:inline-block;width:16px;height:16px;border-radius:4px;border:.5px solid rgba(0,0,0,.08);vertical-align:-3px;margin-right:8px}.palette[data-v-8cbfa422]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-8cbfa422]{border:.5px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-8cbfa422]{height:56px;border-bottom:.5px solid var(--d-line)}.color-meta[data-v-8cbfa422]{padding:10px 12px 12px}.color-meta .cn[data-v-8cbfa422]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-8cbfa422]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:.5px solid var(--d-line-2)}.type-row[data-v-8cbfa422]:last-child{border-bottom:none}.type-sample[data-v-8cbfa422]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-8cbfa422]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-8cbfa422]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:.5px solid var(--d-line-2)}.space-row[data-v-8cbfa422]:last-child{border-bottom:none}.space-bar[data-v-8cbfa422]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-8cbfa422]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-8cbfa422]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-8cbfa422]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-8cbfa422]{width:64px;height:64px;border:.5px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-8cbfa422]{border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;background:var(--d-bg);box-shadow:var(--d-shadow-sm)}.stage-bar[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:.5px solid var(--d-line);background:var(--d-surface)}.stage-bar .st[data-v-8cbfa422]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-8cbfa422]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-8cbfa422]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-8cbfa422]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-8cbfa422]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-8cbfa422]{display:flex;gap:6px}.tab[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:11.5px;padding:4px 10px;border-radius:6px;color:var(--d-fg-muted);cursor:default}.tab.on[data-v-8cbfa422]{background:var(--d-bg);color:var(--d-fg);border:.5px solid var(--d-line)}.stage[data-v-8cbfa422]{padding:32px;display:flex;flex-wrap:wrap;align-items:center;gap:16px;background:radial-gradient(circle at 1px 1px,rgba(0,0,0,.045) 1px,transparent 0) 0 0 / 18px 18px,var(--d-surface)}.stage.col[data-v-8cbfa422]{flex-direction:column;align-items:stretch}.stage.dark[data-v-8cbfa422]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#0d1117}.stage-label[data-v-8cbfa422]{width:100%;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--d-fg-faint);margin-bottom:-6px}.stage.dark .stage-label[data-v-8cbfa422]{color:#6b7280}.ba[data-v-8cbfa422]{display:grid;grid-template-columns:1fr 1fr;gap:0;border:.5px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;box-shadow:var(--d-shadow-sm)}.ba-col[data-v-8cbfa422]{min-width:0}.ba-col+.ba-col[data-v-8cbfa422]{border-left:.5px solid var(--d-line)}.ba-head[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:.5px solid var(--d-line)}.ba-head.before[data-v-8cbfa422]{background:var(--d-red-soft)}.ba-head.after[data-v-8cbfa422]{background:var(--d-green-soft)}.ba-head .bh[data-v-8cbfa422]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-8cbfa422]{color:var(--d-red)}.ba-head.after .bh[data-v-8cbfa422]{color:var(--d-green)}.ba-head .bh small[data-v-8cbfa422]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-8cbfa422]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-8cbfa422]{background:#fff}.code[data-v-8cbfa422]{background:#0d1117;border-radius:12px;overflow:hidden;margin:16px 0;border:.5px solid #1c2128}.code-bar[data-v-8cbfa422]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#13181e;border-bottom:.5px solid #1c2128}.code-bar .d[data-v-8cbfa422]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-8cbfa422]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-8cbfa422]{color:#8b949e}.code .k[data-v-8cbfa422]{color:#ff7b72}.code .s[data-v-8cbfa422]{color:#a5d6ff}.code .p[data-v-8cbfa422]{color:#79c0ff}.code .n[data-v-8cbfa422]{color:#d2a8ff}.code .v[data-v-8cbfa422]{color:#ffa657}.pill[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;border:.5px solid var(--d-line);background:var(--d-surface);color:var(--d-fg-soft)}.pill.blue[data-v-8cbfa422]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-8cbfa422]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-8cbfa422]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-8cbfa422]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-8cbfa422]{font-family:JetBrains Mono,monospace}ul.clean[data-v-8cbfa422]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-8cbfa422]{position:relative;padding:8px 0 8px 26px;color:var(--d-fg-soft);border-bottom:.5px solid var(--d-line-2)}ul.clean li[data-v-8cbfa422]:last-child{border-bottom:none}ul.clean li[data-v-8cbfa422]:before{content:"";position:absolute;left:4px;top:17px;width:7px;height:7px;border-radius:50%;background:var(--d-accent)}ul.clean.check li[data-v-8cbfa422]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-8cbfa422]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-8cbfa422]{color:var(--d-fg)}ul.clean li .path[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-8cbfa422]{position:relative;margin:24px 0}.phase[data-v-8cbfa422]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-8cbfa422]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-8cbfa422]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-8cbfa422]{display:inline-block;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:700;color:var(--d-accent-2);background:var(--d-accent-soft);border:.5px solid var(--d-accent-bd);padding:5px 10px;border-radius:8px}.phase-tag .pe[data-v-8cbfa422]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-8cbfa422]{background:var(--d-bg);border:.5px solid var(--d-line);border-radius:14px;padding:18px 20px;box-shadow:var(--d-shadow-sm)}.phase-body h4[data-v-8cbfa422]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-8cbfa422]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-8cbfa422]{margin:0}.matrix[data-v-8cbfa422]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-8cbfa422]{border:.5px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-8cbfa422]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-8cbfa422]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-8cbfa422]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-8cbfa422]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-8cbfa422]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-8cbfa422]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-8cbfa422]{margin-top:80px;padding-top:28px;border-top:.5px solid var(--d-line);font-size:13px;color:var(--d-fg-faint);display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}.kbd[data-v-8cbfa422]{font-family:JetBrains Mono,monospace;font-size:11px;background:var(--d-surface-2);border:.5px solid var(--d-line);border-radius:5px;padding:1px 6px}@media(max-width:980px){.layout[data-v-8cbfa422]{grid-template-columns:1fr}.sidebar[data-v-8cbfa422]{position:static;height:auto}.nav[data-v-8cbfa422]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-8cbfa422]{padding:40px 22px 80px}.stat-grid[data-v-8cbfa422]{grid-template-columns:repeat(2,1fr)}.ba[data-v-8cbfa422]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-8cbfa422]{border-left:none;border-top:.5px solid var(--d-line)}.palette[data-v-8cbfa422]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-8cbfa422]{grid-template-columns:1fr}}.ds-page .p[data-v-8cbfa422],.ds-page .stage.p-skin[data-v-8cbfa422],.ds-page [data-p][data-v-8cbfa422]{--p-font-sans: var(--font-ui);--p-font-kbd: var(--font-kbd);--p-font-mono: var(--font-mono);--p-bg: var(--color-bg);--p-surface: var(--color-surface);--p-surface-raised: var(--color-surface-raised);--p-surface-overlay: var(--color-surface-overlay);--p-surface-sunken: var(--color-surface-sunken);--p-well: var(--color-well);--p-surface-deep: var(--color-surface-deep);--p-hover: var(--color-hover);--p-text: var(--color-text);--p-text-strong: var(--color-text-strong);--p-muted: var(--muted);--p-text-muted: var(--color-text-muted);--p-text-faint: var(--color-text-faint);--p-text-on-accent: var(--color-text-on-accent);--p-line: var(--color-line);--p-line-strong: var(--color-line-strong);--p-accent: var(--color-accent);--p-accent-hover: var(--color-accent-hover);--p-accent-soft: var(--color-accent-soft);--p-user-bubble-bg: var(--color-user-bubble-bg);--p-accent-bd: var(--color-accent-bd);--p-success: var(--color-success);--p-success-soft: var(--color-success-soft);--p-success-bd: var(--color-success-bd);--p-warning: var(--color-warning);--p-warning-soft: var(--color-warning-soft);--p-warning-bd: var(--color-warning-bd);--p-danger: var(--color-danger);--p-danger-soft: var(--color-danger-soft);--p-danger-bd: var(--color-danger-bd);--p-info: var(--color-info);--p-sp-1: var(--space-1);--p-sp-2: var(--space-2);--p-sp-3: var(--space-3);--p-sp-4: var(--space-4);--p-sp-5: var(--space-5);--p-sp-6: var(--space-6);--p-sp-8: var(--space-8);--p-r-xs: var(--radius-xs);--p-r-sm: var(--radius-sm);--p-r-md: var(--radius-md);--p-r-lg: var(--radius-lg);--p-r-xl: var(--radius-xl);--p-r-composer: var(--radius-composer);--p-r-full: var(--radius-full);--p-corner-composer: var(--corner-shape-composer);--p-sh-xs: var(--shadow-xs);--p-sh-sm: var(--shadow-sm);--p-sh-menu: var(--shadow-menu);--p-sh-md: var(--shadow-md);--p-sh-input: var(--shadow-input);--p-sh-lg: var(--shadow-lg);--p-sh-xl: var(--shadow-xl);--p-font-size-xs: var(--text-xs);--p-font-size-sm: var(--text-sm);--p-font-size-base: var(--text-base);--p-font-size-md: var(--text-base);--p-font-size-lg: var(--text-lg);--p-font-size-xl: var(--text-xl);--p-font-size-2xl: var(--text-2xl);--p-leading-tight: var(--leading-tight);--p-leading-normal: var(--leading-normal);--p-leading-relaxed: var(--leading-relaxed);--p-ease: var(--ease-out);--p-ease-inout: var(--ease-in-out);--p-dur-fast: var(--duration-fast);--p-dur: var(--duration-base);--p-dur-slow: var(--duration-slow);--p-composer-focus-line: var(--color-composer-focus-line);font-family:var(--font-ui);color:var(--color-text);font-size:var(--text-base)}[data-p=dark][data-v-8cbfa422]{--p-bg: #0d1117;--p-surface: #13181e;--p-surface-raised: #1c2128;--p-surface-sunken: #0d1117;--p-well: #13181e;--p-surface-deep: #0a0d12;--p-surface-overlay: #22272e;--p-hover: #ffffff0d;--p-text: #e8eaed;--p-text-strong: #ffffff;--p-muted: #727983;--p-text-muted: #9aa0a8;--p-text-faint: #6b7280;--p-line: #2d333b;--p-line-strong: #3d444d;--p-accent: #58a6ff;--p-accent-hover: #79b8ff;--p-accent-soft: rgba(88,166,255,.14);--p-accent-bd: rgba(88,166,255,.28);--p-success: #3fb950;--p-success-soft: rgba(63,185,80,.14);--p-success-bd: rgba(63,185,80,.28);--p-warning: #d29922;--p-warning-soft: rgba(210,153,34,.14);--p-warning-bd: rgba(210,153,34,.28);--p-danger: #f85149;--p-danger-soft: rgba(248,81,73,.14);--p-danger-bd: rgba(248,81,73,.28);--p-sh-sm: 0 1px 2px rgba(0,0,0,.4);--p-sh-md: 0 4px 12px rgba(0,0,0,.45);--p-sh-lg: 0 12px 32px rgba(0,0,0,.55);--p-sh-input: var(--shadow-input);--p-selection: rgba(88,166,255,.32)}.p-ic[data-v-8cbfa422]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-8cbfa422]{--_h: 36px;--_px: 16px;--_fs: var(--p-font-size-base);--_r: var(--p-r-md);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--_h);padding:0 var(--_px);border-radius:var(--_r);font-family:var(--p-font-sans);font-size:var(--_fs);font-weight:600;line-height:1;border:.5px solid transparent;cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease),transform var(--p-dur-fast) var(--p-ease)}.p-btn[data-v-8cbfa422]:active{transform:scale(.98)}.p-btn[data-v-8cbfa422]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft),0 0 0 1px var(--p-accent)}.p-btn .p-ic[data-v-8cbfa422]{width:16px;height:16px}.p-btn.sm[data-v-8cbfa422]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-8cbfa422]{width:14px;height:14px}.p-btn.lg[data-v-8cbfa422]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-8cbfa422]{background:var(--p-accent);color:var(--p-text-on-accent);border-color:var(--p-accent);box-shadow:var(--p-sh-xs)}.p-btn.primary[data-v-8cbfa422]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-8cbfa422]{background:var(--p-surface-raised);color:var(--p-text);border-color:var(--p-line-strong);box-shadow:var(--p-sh-xs)}.p-btn.secondary[data-v-8cbfa422]:hover{background:var(--p-hover);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-8cbfa422]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-8cbfa422]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-btn.danger[data-v-8cbfa422]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-8cbfa422]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-8cbfa422]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-8cbfa422]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-8cbfa422],.p-btn.disabled[data-v-8cbfa422]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-8cbfa422]{--_s: 32px;display:inline-grid;place-items:center;width:var(--_s);height:var(--_s);flex:none;border-radius:var(--p-r-md);border:.5px solid transparent;background:transparent;color:var(--p-text-muted);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-icon-btn[data-v-8cbfa422]:hover{background:var(--p-hover);color:var(--p-text)}.p-icon-btn[data-v-8cbfa422]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-8cbfa422]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-8cbfa422]{--_s: 44px}.p-icon-btn .p-ic[data-v-8cbfa422]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-8cbfa422]{width:20px;height:20px}.p-badge[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:var(--p-r-full);font-family:var(--p-font-sans);font-size:var(--p-font-size-xs);font-weight:600;line-height:1;border:.5px solid var(--p-line);background:var(--p-surface);color:var(--p-text);white-space:nowrap}.p-badge.sm[data-v-8cbfa422]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-8cbfa422]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-8cbfa422]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-8cbfa422]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-8cbfa422]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-8cbfa422]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-8cbfa422]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-8cbfa422]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-8cbfa422]{width:12px;height:12px}.p-kbd[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-8cbfa422]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:.5px solid var(--p-line);border-radius:var(--p-r-xs);background:transparent;color:inherit;font-family:var(--p-font-kbd);font-size:11px;line-height:1}.p-pill[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 12px;border-radius:var(--p-r-full);border:.5px solid transparent;background:transparent;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-pill[data-v-8cbfa422]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-pill .pp-strong[data-v-8cbfa422]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-8cbfa422]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-8cbfa422]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-8cbfa422]{background:var(--p-surface);border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;color:var(--p-text)}.p-card.interactive[data-v-8cbfa422]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-8cbfa422]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-8cbfa422]{display:flex;align-items:center;gap:9px;padding:10px 14px;border-bottom:.5px solid var(--p-line);background:var(--p-surface)}.p-card-title[data-v-8cbfa422]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text);font-family:var(--p-font-mono)}.p-card-body[data-v-8cbfa422]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-8cbfa422]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:.5px solid var(--p-line);background:var(--p-surface)}.p-field[data-v-8cbfa422]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-8cbfa422]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-8cbfa422],.p-select[data-v-8cbfa422],.p-textarea[data-v-8cbfa422]{width:100%;height:38px;padding:0 12px;border-radius:var(--p-r-md);border:.5px solid var(--p-line-strong);background:var(--p-surface-raised);font-family:var(--p-font-sans);font-size:var(--p-font-size-base);color:var(--p-text);box-shadow:var(--p-sh-xs);transition:border-color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-textarea[data-v-8cbfa422]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-select[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;text-align:left}.p-select[data-v-8cbfa422]:after{content:"⌄";color:var(--p-text-muted)}.p-input[data-v-8cbfa422]:hover,.p-select[data-v-8cbfa422]:hover,.p-textarea[data-v-8cbfa422]:hover{border-color:var(--p-line-strong)}.p-input[data-v-8cbfa422]:focus,.p-select[data-v-8cbfa422]:focus,.p-textarea[data-v-8cbfa422]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-8cbfa422]::placeholder,.p-textarea[data-v-8cbfa422]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-8cbfa422]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-8cbfa422]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-8cbfa422]{width:480px;max-width:calc(100vw - 48px);background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl);box-shadow:var(--p-sh-xl);overflow:hidden;color:var(--p-text)}.p-dialog-head[data-v-8cbfa422]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-8cbfa422]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-8cbfa422]{font-size:var(--p-font-size-base);color:var(--p-text-muted);margin-top:4px;line-height:var(--p-leading-normal)}.p-dialog-body[data-v-8cbfa422]{padding:4px 22px 18px}.p-dialog-foot[data-v-8cbfa422]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-8cbfa422]{display:flex;align-items:flex-start;gap:11px;width:360px;padding:13px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-md)}.p-toast .ti[data-v-8cbfa422]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-8cbfa422]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-8cbfa422]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-8cbfa422]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-8cbfa422]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-action-toast[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:8px;align-self:center;padding:4px 6px 4px 14px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);font-size:var(--p-font-size-base);color:var(--p-text);white-space:nowrap}.p-action-toast .lk[data-v-8cbfa422]{border:0;padding:0;background:none;color:var(--p-accent);cursor:pointer;font:inherit}.p-action-toast .x[data-v-8cbfa422]{color:var(--p-text-muted);width:14px;height:14px}.p-spinner[data-v-8cbfa422]{width:18px;height:18px;animation:p-spin-8cbfa422 .85s linear infinite}.p-spinner.sm[data-v-8cbfa422]{width:14px;height:14px}.p-spinner circle[data-v-8cbfa422]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-8cbfa422]{stroke:var(--p-line)}.p-spinner .arc[data-v-8cbfa422]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-8cbfa422{to{transform:rotate(360deg)}}.p-thinking[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:9px;font-size:var(--p-font-size-sm);color:var(--p-text-muted);font-family:var(--p-font-sans)}.p-bubble-user[data-v-8cbfa422]{align-self:flex-end;max-width:78%;background:var(--p-user-bubble-bg);border:none;color:var(--p-text);border-radius:var(--p-r-lg);padding:10px 12px;font-size:var(--p-font-size-md);line-height:var(--p-leading-normal)}.p-msg[data-v-8cbfa422]{max-width:760px;font-size:var(--p-font-size-md);line-height:var(--p-leading-relaxed);color:var(--p-text)}.p-msg p[data-v-8cbfa422]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-8cbfa422]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);border:0;color:var(--p-accent-hover);padding:1px 6px;border-radius:5px;font-size:.9em}.p-code[data-v-8cbfa422]{font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:11px 13px;color:var(--p-text);overflow-x:auto}.p-action[data-v-8cbfa422]{border-radius:var(--p-r-lg);overflow:hidden;border:.5px solid var(--p-line);background:var(--p-surface-raised);box-shadow:var(--p-sh-menu)}.p-action-head[data-v-8cbfa422]{display:flex;align-items:center;gap:9px;padding:14px 16px 0}.p-action-title[data-v-8cbfa422]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-action-body[data-v-8cbfa422]{padding:12px 16px 0;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-action-foot[data-v-8cbfa422]{display:flex;gap:8px;margin-top:12px;padding:10px 16px;border-top:.5px solid var(--p-line)}.p-opts[data-v-8cbfa422]{display:flex;flex-direction:column;gap:2px;margin-top:12px;padding:12px 16px;border-top:.5px solid var(--p-line)}.p-opt[data-v-8cbfa422]{display:flex;align-items:flex-start;gap:10px;padding:8px 12px;border-radius:var(--p-r-md);color:var(--p-text);font-size:var(--p-font-size-base)}.p-opt .n[data-v-8cbfa422]{width:var(--p-chip-num);height:var(--p-chip-num);margin-top:calc((var(--p-font-size-base) * var(--p-leading-normal) - var(--p-chip-num)) / 2);border-radius:var(--p-r-sm);background:var(--p-surface-sunken);color:var(--p-text);font-size:var(--p-font-size-xs);font-weight:500;display:inline-flex;align-items:center;justify-content:center;flex:none}.p-opt-text[data-v-8cbfa422]{display:flex;flex-direction:column;gap:2px;min-width:0}.p-opt-text .l[data-v-8cbfa422]{font-weight:500}.p-opt-text .d[data-v-8cbfa422]{font-size:var(--p-font-size-xs);color:var(--p-text-muted);line-height:var(--p-leading-normal)}.p-todo[data-v-8cbfa422]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-8cbfa422]{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--p-r-md);font-size:var(--p-font-size-base);color:var(--p-text)}.p-todo-row.done[data-v-8cbfa422]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-8cbfa422]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-8cbfa422]{width:16px;flex:none;display:inline-flex;align-items:center;justify-content:center;user-select:none;color:var(--p-text-faint)}.p-todo-check svg[data-v-8cbfa422]{width:14px;height:14px}.p-todo-row.active .p-todo-check[data-v-8cbfa422]{color:var(--p-accent)}.p-todo-row.done .p-todo-check[data-v-8cbfa422]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-8cbfa422]{color:var(--p-accent);font-weight:500}.p-dot[data-v-8cbfa422]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-8cbfa422]{background:var(--p-success)}.p-dot.error[data-v-8cbfa422]{background:var(--p-danger)}.p-dot.running[data-v-8cbfa422]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-8cbfa422 1.4s ease-out infinite}@keyframes p-pulse-8cbfa422{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-8cbfa422]{overflow:hidden}.p-tool-group-head[data-v-8cbfa422]{display:flex;align-items:center;gap:4px;padding:4px 0;cursor:pointer;border-radius:6px;font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text-faint);user-select:none;transition:color var(--p-dur) var(--p-ease)}.p-tool-group-head .tg-ic[data-v-8cbfa422]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-group-head[data-v-8cbfa422]:hover{color:var(--p-text)}.p-tool-group-head .tg-title[data-v-8cbfa422]{font-weight:500}.p-tool-group-head .tg-meta[data-v-8cbfa422]{color:var(--p-text-faint);font-weight:400}.p-tool-group-head .tg-car[data-v-8cbfa422]{width:14px;height:14px;color:var(--p-text-faint);transition:transform var(--p-dur) var(--p-ease)}.p-tool-group.open .p-tool-group-head .tg-car[data-v-8cbfa422]{transform:rotate(90deg)}.p-tool-row[data-v-8cbfa422]{position:relative;display:flex;align-items:center;gap:4px;padding:4px 0;border-radius:6px;cursor:pointer;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);line-height:1;color:var(--p-text)}.p-tool-row .tr-ic[data-v-8cbfa422]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-8cbfa422]{font-weight:400;color:var(--p-text-muted);flex:none}.p-tool-row .tr-file[data-v-8cbfa422]{font-weight:400;color:var(--p-text);flex:none}.p-tool-row .tr-file[data-v-8cbfa422]:hover{color:var(--p-accent);text-decoration:underline;text-underline-offset:3px}.p-tool-row .tr-mono[data-v-8cbfa422]{font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);line-height:normal;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--p-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-faint[data-v-8cbfa422]{color:var(--p-text-faint);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-chip[data-v-8cbfa422]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add[data-v-8cbfa422]{margin-left:auto;color:var(--p-success);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-add~.tr-chip[data-v-8cbfa422],.p-tool-row .tr-add~.tr-add[data-v-8cbfa422]{margin-left:0}.p-tool-row .tr-del[data-v-8cbfa422]{color:var(--p-danger);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-bar[data-v-8cbfa422]{display:inline-flex;width:36px;height:3px;border-radius:999px;overflow:hidden;gap:1px;flex:none}.p-tool-row .tr-ok[data-v-8cbfa422]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-8cbfa422]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-agent-card[data-v-8cbfa422]{display:flex;align-items:center;gap:8px;align-self:stretch;padding:8px 12px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg);cursor:pointer}.p-agent-card .pa-ic[data-v-8cbfa422]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:var(--p-surface-sunken);color:var(--p-text-muted);flex:none}.p-agent-card .pa-ic svg[data-v-8cbfa422]{width:14px;height:14px}.p-agent-card .pa-main[data-v-8cbfa422]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-agent-card .pa-task[data-v-8cbfa422]{font-size:var(--p-font-size-sm);line-height:1.4;color:var(--p-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-type[data-v-8cbfa422]{font-size:var(--p-font-size-xs);line-height:1.4;color:var(--p-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-agent-card .pa-ok[data-v-8cbfa422]{color:var(--p-success);font-size:var(--p-font-size-xs);flex:none}.p-agent-card .pa-go[data-v-8cbfa422]{color:var(--p-text-faint);flex:none}.p-tool-row.expanded .tr-car[data-v-8cbfa422]{transform:rotate(90deg)}.p-tool-detail[data-v-8cbfa422]{padding:2px 8px 4px 0}.p-tool-detail .p-code[data-v-8cbfa422]{margin-top:4px}.p-composer[data-v-8cbfa422]{background:var(--p-surface-raised);border:.5px solid var(--p-line-strong);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);box-shadow:var(--p-sh-input);overflow:hidden;position:relative;z-index:1}.p-composer[data-v-8cbfa422]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--p-composer-focus-line);border-radius:var(--p-r-composer);corner-shape:var(--p-corner-composer);opacity:0;pointer-events:none;transition:opacity var(--p-dur-slow) var(--p-ease-inout)}.p-composer[data-v-8cbfa422]:focus-within:after{opacity:1}.p-composer-ta[data-v-8cbfa422]{padding:14px 16px 8px;font-family:var(--p-font-sans);font-size:var(--p-font-size-md);color:var(--p-text);line-height:var(--p-leading-normal);text-autospace:normal}.p-composer-ta.ph[data-v-8cbfa422]{color:var(--p-text-faint)}.p-composer-bar[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 8px 8px}.p-composer-strip[data-v-8cbfa422]{width:100%;max-width:620px;margin-top:calc(-1 * var(--space-4));display:flex;align-items:center;gap:var(--space-2);padding:calc(var(--space-4) + var(--space-2)) var(--space-2) var(--space-2);background:color-mix(in srgb,var(--color-hover) 60%,transparent);border-radius:0 0 var(--radius-2xl) var(--radius-2xl);font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);color:var(--p-text-faint);cursor:pointer}.p-composer-strip .p-ic[data-v-8cbfa422]{width:16px;height:16px;color:var(--p-text-faint)}.p-composer-left[data-v-8cbfa422],.p-composer-right[data-v-8cbfa422]{display:flex;align-items:center;gap:4px}.p-composer .p-icon-btn[data-v-8cbfa422]{border-radius:var(--p-r-full)}.p-send[data-v-8cbfa422]{position:relative;width:32px;height:32px;border-radius:var(--p-r-full);display:grid;place-items:center;background:var(--p-text);color:var(--p-bg);border:none;cursor:pointer;box-shadow:var(--p-sh-xs);transition:transform var(--p-dur-fast) var(--p-ease)}.p-send[data-v-8cbfa422]:after{content:"";position:absolute;inset:0;border-radius:var(--p-r-full);background:var(--p-bg);opacity:0;transition:opacity var(--p-dur-slow) var(--p-ease);pointer-events:none}.p-send[data-v-8cbfa422]:hover:after{opacity:.28}.p-send[data-v-8cbfa422]:active{transform:scale(.92)}.p-send .p-ic[data-v-8cbfa422]{width:16px;height:16px}.dw-bar[data-v-8cbfa422]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5)}.am-mock[data-v-8cbfa422]{display:flex;flex-direction:column;gap:var(--menu-rows-seam);width:100%;max-width:420px;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--p-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--p-sh-menu);font-family:var(--font-ui)}.am-mock-row[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:.5px solid transparent;border-radius:var(--radius-menu-row);corner-shape:var(--corner-shape-menu);color:var(--p-text);font-size:var(--p-font-size-base)}.am-mock-row.focus[data-v-8cbfa422]{background:var(--color-selected)}.am-mock-row .n[data-v-8cbfa422]{font-weight:var(--weight-medium)}.am-mock-row .d[data-v-8cbfa422]{margin-left:var(--space-1);color:var(--p-text-muted);font-size:var(--text-sm)}.dw-pill[data-v-8cbfa422]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1-5);padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-normal)}.dw-pill[data-v-8cbfa422] svg{width:1.5em;height:1.5em}.dw-pill.on[data-v-8cbfa422]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);pointer-events:none}.dw-pill .dw-count[data-v-8cbfa422]{color:var(--p-text-muted)}.dw-pill .dw-running[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted)}.dw-pill .dw-live[data-v-8cbfa422]{color:var(--p-success);font-weight:var(--weight-medium)}.dw-panel[data-v-8cbfa422]{width:100%;border:.5px solid var(--p-line);border-radius:var(--radius-2xl);background:color-mix(in srgb,var(--p-bg) 70%,transparent);box-shadow:var(--p-sh-menu);overflow:hidden}.dw-head[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-4) var(--space-4) 0}.dw-tab[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:var(--space-2);color:var(--p-text);font-size:var(--p-font-size-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-tab[data-v-8cbfa422] svg{width:1.5em;height:1.5em}.dw-tab .dw-meta[data-v-8cbfa422]{color:var(--p-text-muted)}.dw-chips[data-v-8cbfa422]{margin-left:auto;display:inline-flex;gap:var(--space-05);padding:var(--space-05);background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md)}.dw-chip[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--p-sp-3);border-radius:var(--p-r-sm);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap}.dw-chip.on[data-v-8cbfa422]{color:var(--p-text);background:var(--p-surface-raised);box-shadow:var(--p-sh-sm)}.dw-body[data-v-8cbfa422]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dw-body.col[data-v-8cbfa422]{display:flex;flex-direction:column}.dw-row[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) 0;color:var(--p-text);font-size:var(--p-font-size-base)}.dw-row .nm[data-v-8cbfa422]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-row .tm[data-v-8cbfa422]{flex:none;color:var(--p-text-muted);font-variant-numeric:tabular-nums}.dw-row .ok[data-v-8cbfa422]{color:var(--p-success);transform:scale(.91)}.dw-row.fail .nm[data-v-8cbfa422],.dw-row.fail[data-v-8cbfa422] svg{color:var(--p-danger)}.dw-row.cancelled[data-v-8cbfa422] svg{color:var(--p-text-muted)}.dw-body.grid[data-v-8cbfa422]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.dw-card[data-v-8cbfa422]{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.dw-card .ct[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--space-2)}.dw-card .nm[data-v-8cbfa422]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium)}.dw-card .nu[data-v-8cbfa422]{flex:none;color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-variant-numeric:tabular-nums}.dw-card .ds[data-v-8cbfa422]{color:var(--p-text-muted);font-size:var(--p-font-size-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.dw-card .cs[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cf[data-v-8cbfa422]{display:flex;flex-direction:column;gap:var(--space-1)}.dw-card .cm[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--space-1);color:var(--p-text-muted);font-size:var(--p-font-size-xs)}.dw-card .cm span[data-v-8cbfa422]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dw-card .cs .sl[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:var(--space-1)}.dw-card .cs .sl .ok[data-v-8cbfa422]{color:var(--p-success);transform:scale(.91)}.dw-card .cs .tm[data-v-8cbfa422]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);font-variant-numeric:tabular-nums}.dw-card.fail .cs .sl[data-v-8cbfa422]{color:var(--p-danger)}.dw-ring[data-v-8cbfa422]{display:inline-block;width:var(--p-ic-md);height:var(--p-ic-md);border:1.5px solid var(--p-line-strong);border-radius:var(--radius-full);vertical-align:middle}.dw-spin[data-v-8cbfa422]{display:inline-flex;color:var(--p-text);vertical-align:middle}.dt td .kw-dot[data-v-8cbfa422],.dt td[data-v-8cbfa422] svg{vertical-align:middle}.p[data-v-8cbfa422] ::selection,[data-p][data-v-8cbfa422] ::selection{background:var(--p-selection)}.p-link[data-v-8cbfa422]{color:var(--p-accent);text-decoration:none;font-family:var(--p-font-sans);transition:color var(--p-dur) var(--p-ease)}.p-link[data-v-8cbfa422]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-8cbfa422]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-8cbfa422]{color:var(--p-text-muted)}.p-link.muted[data-v-8cbfa422]:hover{color:var(--p-text)}.p-link .p-ic[data-v-8cbfa422]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-8cbfa422]{background:var(--color-menu-bg);border:.5px solid var(--p-line);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);padding:3.5px;min-width:180px;font-family:var(--p-font-sans);color:var(--p-text)}.p-menu-item[data-v-8cbfa422]{display:flex;align-items:center;gap:7px;padding:5px 9px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-menu-item[data-v-8cbfa422]:hover{background:var(--p-hover);color:var(--p-text-strong)}.p-menu-item.active[data-v-8cbfa422],.p-menu-item.active[data-v-8cbfa422]:hover{background:var(--p-hover);color:var(--p-text)}.p-menu-item.danger[data-v-8cbfa422]{color:var(--p-danger)}.p-menu-item.danger[data-v-8cbfa422]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-8cbfa422]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-8cbfa422]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-8cbfa422]{width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--p-muted)}.p-menu-item:hover .p-ic[data-v-8cbfa422]{color:var(--p-text-strong)}.p-menu-item.active .p-ic[data-v-8cbfa422]{color:var(--p-accent-hover)}.p-menu-item.danger .p-ic[data-v-8cbfa422]{color:var(--p-danger)}.p-menu-item.lg[data-v-8cbfa422]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-sm)}.p-menu-sep[data-v-8cbfa422]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-8cbfa422]{display:inline-flex;gap:2px;padding:2px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-sans)}.p-seg-item[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:4px;padding:5px 12px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-seg-item[data-v-8cbfa422]:hover{color:var(--p-text)}.p-seg-item.on[data-v-8cbfa422]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-sm)}.p-tabs[data-v-8cbfa422]{display:flex;align-items:center;gap:0;border-bottom:.5px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-8cbfa422]{padding:8px 14px;font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text-muted);cursor:pointer;white-space:nowrap;border-bottom:.5px solid transparent;margin-bottom:-.5px;transition:color var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-tab[data-v-8cbfa422]:hover{color:var(--p-text)}.p-tab.on[data-v-8cbfa422]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-8cbfa422]{position:relative;display:inline-block;width:36px;height:20px;flex:none;border-radius:var(--p-r-full);background:var(--p-line-strong);cursor:pointer;transition:background var(--p-dur) var(--p-ease)}.p-switch[data-v-8cbfa422]:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--p-r-full);background:var(--p-surface-raised);box-shadow:var(--p-sh-xs);transform-origin:left center;transition:transform var(--p-dur) var(--p-ease)}.p-switch[data-v-8cbfa422]:hover:after{transform:scaleX(1.125)}.p-switch.on[data-v-8cbfa422]{background:var(--p-accent)}.p-switch.on[data-v-8cbfa422]:after{transform:translate(16px);transform-origin:right center}.p-switch.on[data-v-8cbfa422]:hover:after{transform:translate(16px) scaleX(1.125)}.p-switch[data-v-8cbfa422]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-8cbfa422]{width:17px;height:17px;flex:none;display:inline-grid;place-items:center;border:.5px solid var(--p-line-strong);border-radius:var(--p-r-sm);background:var(--p-surface-raised);color:var(--p-text-on-accent);cursor:pointer;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-check.on[data-v-8cbfa422]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-8cbfa422]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-8cbfa422]{width:12px;height:12px}.p-avatar[data-v-8cbfa422]{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--p-r-md);background:var(--p-surface-sunken);border:.5px solid var(--p-line);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:600}.p-avatar.sm[data-v-8cbfa422]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-8cbfa422]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-8cbfa422]{width:13px;height:13px}.p-empty[data-v-8cbfa422]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 16px;color:var(--p-text-muted);text-align:center}.p-empty .em-ic[data-v-8cbfa422]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-8cbfa422]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-8cbfa422]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-8cbfa422]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-8cbfa422]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-turn-failed[data-v-8cbfa422]{display:flex;align-items:center;gap:var(--space-2);width:100%;max-width:560px;padding:var(--space-2) var(--space-3);border:var(--p-hairline) solid var(--color-danger-bd);border-radius:var(--radius-lg);background:var(--color-danger-soft);box-shadow:var(--shadow-xs)}.p-turn-failed .tf-chip[data-v-8cbfa422]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);flex:none;border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);color:var(--color-danger)}.p-turn-failed .tf-chip svg[data-v-8cbfa422]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-turn-failed .tf-main[data-v-8cbfa422]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.p-turn-failed .tf-title[data-v-8cbfa422]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.p-turn-failed .tf-sub[data-v-8cbfa422],.p-turn-failed .tf-meta[data-v-8cbfa422]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-turn-failed .tf-meta[data-v-8cbfa422]{font-family:var(--font-mono);color:var(--color-text-faint)}.p-tip[data-v-8cbfa422]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-8cbfa422]{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--p-text);color:var(--p-bg);font-size:var(--p-font-size-xs);padding:4px 8px;border-radius:var(--p-r-sm);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity var(--p-dur-fast) var(--p-ease)}.p-tip:hover .p-tooltip[data-v-8cbfa422]{opacity:1}.p-banner[data-v-8cbfa422]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--p-r-md);border:.5px solid var(--p-line);background:var(--p-surface);font-size:var(--p-font-size-sm);color:var(--p-text)}.p-banner .bn-ic[data-v-8cbfa422]{width:18px;height:18px;flex:none}.p-banner.info[data-v-8cbfa422]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-8cbfa422]{color:var(--p-accent)}.p-banner.warning[data-v-8cbfa422]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-8cbfa422]{color:var(--p-warning)}.p-banner.danger[data-v-8cbfa422]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-8cbfa422]{color:var(--p-danger)}.p-sheet[data-v-8cbfa422]{background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-xl) var(--p-r-xl) 0 0;box-shadow:var(--p-sh-xl);padding:8px 16px 20px}.p-sheet-handle[data-v-8cbfa422]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-8cbfa422]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-8cbfa422 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-8cbfa422{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-8cbfa422]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-8cbfa422]{flex:1;min-width:0;height:38px;display:flex;align-items:center;gap:10px;padding:0 10px 0 14px;background:var(--p-surface-sunken);border:.5px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-cmd .cmd-text[data-v-8cbfa422]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-8cbfa422]{margin-left:auto;flex:none;display:grid;place-items:center;width:26px;height:26px;border:none;background:transparent;border-radius:var(--p-r-sm);color:var(--p-text-faint);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-cmd .cmd-copy[data-v-8cbfa422]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-8cbfa422]{width:15px;height:15px}.p-topbar[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;gap:12px;height:48px;padding:0 16px;background:var(--p-surface-raised);border:.5px solid var(--p-line);border-radius:var(--p-r-lg)}.p-topbar .tb-title[data-v-8cbfa422]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-8cbfa422]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-8cbfa422]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-8cbfa422]{background:#161b22b8;border-color:#ffffff14}.demo-row[data-v-8cbfa422]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-8cbfa422]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-8cbfa422]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-8cbfa422]{flex:1;min-width:0}.demo-chat[data-v-8cbfa422]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-8cbfa422]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-8cbfa422]{grid-column:1 / -1;margin-top:10px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--d-fg-muted)}.icon-cell[data-v-8cbfa422]{display:flex;align-items:center;gap:10px;padding:8px 10px;border:.5px solid var(--d-line);border-radius:8px;background:var(--d-surface)}.icon-cell .kw-icon[data-v-8cbfa422]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-8cbfa422]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-8cbfa422]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-8cbfa422]{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:11px;color:var(--d-fg-muted);font-family:JetBrains Mono,ui-monospace,monospace}.p-code-inline[data-v-8cbfa422]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);color:var(--p-text);padding:0 5px;border-radius:var(--p-r-sm);font-size:.9em}.p-code-block[data-v-8cbfa422]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;background:var(--p-surface-sunken)}.p-code-block-head[data-v-8cbfa422]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-code-block pre[data-v-8cbfa422]{margin:0;padding:12px 14px;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;color:var(--p-text);overflow-x:auto}.p-diff[data-v-8cbfa422]{border:.5px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm)}.p-diff-head[data-v-8cbfa422]{padding:8px 12px;background:var(--p-surface);border-bottom:.5px solid var(--p-line);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-diff-row[data-v-8cbfa422]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-8cbfa422]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-8cbfa422]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-8cbfa422]{color:var(--p-success)}.p-diff-row.del[data-v-8cbfa422]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-8cbfa422]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-8cbfa422]{color:var(--p-text)}.p-field-error[data-v-8cbfa422]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-8cbfa422]{vertical-align:middle}.p-btn .p-spinner .track[data-v-8cbfa422]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-8cbfa422]{stroke:currentColor}.ds-page[data-v-8cbfa422]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-8cbfa422]{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-4);background:var(--color-surface);border-bottom:.5px solid var(--color-line)}.ds-back[data-v-8cbfa422]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-3);border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer}.ds-back[data-v-8cbfa422]:hover{background:var(--color-hover)}.ds-topbar-title[data-v-8cbfa422]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)} diff --git a/apps/kimi-code/dist-web/assets/Tooltip-CbHFsn-6.js b/apps/kimi-code/dist-web/assets/Tooltip-OrMK9Tfr.js similarity index 98% rename from apps/kimi-code/dist-web/assets/Tooltip-CbHFsn-6.js rename to apps/kimi-code/dist-web/assets/Tooltip-OrMK9Tfr.js index 8ed667768..4b970a712 100644 --- a/apps/kimi-code/dist-web/assets/Tooltip-CbHFsn-6.js +++ b/apps/kimi-code/dist-web/assets/Tooltip-OrMK9Tfr.js @@ -1 +1 @@ -import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-_5lXYMaO.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default}; +import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-yKYHPeXU.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default}; diff --git a/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-COKyJfaN.js b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-BN8tpheJ.js similarity index 86% rename from apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-COKyJfaN.js rename to apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-BN8tpheJ.js index e11d6fbc5..ef1d6d6ed 100644 --- a/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-COKyJfaN.js +++ b/apps/kimi-code/dist-web/assets/abnfDiagram-VRR7QNED-BN8tpheJ.js @@ -1 +1 @@ -import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-B49sRSVS.js";import{p as f}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as n,l as o}from"./mermaid.core-DpBz6UHc.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram}; +import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-BWl8WxOI.js";import{p as f}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{_ as n,l as o}from"./mermaid.core-BKBZnrB_.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},F={parser:R,db:a,renderer:u,styles:p};export{F as diagram}; diff --git a/apps/kimi-code/dist-web/assets/arc-BNlcm8Io.js b/apps/kimi-code/dist-web/assets/arc-myf2kRJl.js similarity index 98% rename from apps/kimi-code/dist-web/assets/arc-BNlcm8Io.js rename to apps/kimi-code/dist-web/assets/arc-myf2kRJl.js index 39ad59a17..4860d6d42 100644 --- a/apps/kimi-code/dist-web/assets/arc-BNlcm8Io.js +++ b/apps/kimi-code/dist-web/assets/arc-myf2kRJl.js @@ -1 +1 @@ -import{G as ln,H as un,I as N,J as I,K as J,L as an,M as y,N as tn,O as j,P as _,Q as rn,R as o,S as on,T as sn,V as fn}from"./mermaid.core-DpBz6UHc.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,q,O,v,R,K,u){var D=q-l,i=O-h,n=K-v,d=u-R,a=d*D-n*i;if(!(a*a<y))return a=(n*(h-R)-d*(l-v))/a,[l+a*D,h+a*i]}function W(l,h,q,O,v,R,K){var u=l-q,D=h-O,i=(K?R:-R)/j(u*u+D*D),n=i*D,d=-i*u,a=l+n,s=h+d,f=q+n,c=O+d,L=(a+f)/2,t=(s+c)/2,m=f-a,g=c-s,A=m*m+g*g,T=v-R,P=a*c-f*s,E=(g<0?-1:1)*j(on(0,T*T*A-P*P)),G=(P*g-m*E)/A,H=(-P*m-g*E)/A,w=(P*g+m*E)/A,p=(-P*m+g*E)/A,x=G-L,e=H-t,r=w-L,M=p-t;return x*x+e*e>r*r+M*M&&(G=w,H=p),{cx:G,cy:H,x01:-n,y01:-d,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),O=null,v=gn,R=dn,K=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,L=rn(c-f),t=c>f;if(u||(u=n=D()),s<a&&(d=s,s=a,a=d),!(s>y))u.moveTo(0,0);else if(L>tn-y)u.moveTo(s*N(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*N(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=L,E=L,G=K.apply(this,arguments)/2,H=G>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(rn(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(H>y){var M=sn(H/a*I(G)),z=sn(H/s*I(G));(P-=M*2)>y?(M*=t?1:-1,A+=M,T-=M):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var Q=s*N(m),V=s*I(m),B=a*N(T),C=a*I(T);if(w>y){var F=s*N(g),U=s*I(g),X=a*N(A),Y=a*I(A),S;if(L<un)if(S=pn(Q,V,X,Y,F,U,B,C)){var Z=Q-S[0],$=V-S[1],k=F-S[0],b=U-S[1],nn=1/I(fn((Z*k+$*b)/(j(Z*Z+$*$)*j(k*k+b*b)))/2),en=j(S[0]*S[0]+S[1]*S[1]);p=_(w,(a-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}E>y?x>y?(e=W(X,Y,Q,V,s,x,t),r=W(F,U,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),u.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(u.moveTo(Q,V),u.arc(0,0,s,m,g,!t)):u.moveTo(Q,V),!(a>y)||!(P>y)?u.lineTo(B,C):p>y?(e=W(B,C,F,U,a,-p,t),r=W(Q,V,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,a,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),u.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):u.arc(0,0,a,T,A,t)}if(u.closePath(),n)return u=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-un/2;return[N(d)*n,I(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(q=typeof n=="function"?n:J(+n),i):q},i.padRadius=function(n){return arguments.length?(O=n==null?null:typeof n=="function"?n:J(+n),i):O},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:J(+n),i):R},i.padAngle=function(n){return arguments.length?(K=typeof n=="function"?n:J(+n),i):K},i.context=function(n){return arguments.length?(u=n??null,i):u},i}export{hn as d}; +import{G as ln,H as un,I as N,J as I,K as J,L as an,M as y,N as tn,O as j,P as _,Q as rn,R as o,S as on,T as sn,V as fn}from"./mermaid.core-BKBZnrB_.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,q,O,v,R,K,u){var D=q-l,i=O-h,n=K-v,d=u-R,a=d*D-n*i;if(!(a*a<y))return a=(n*(h-R)-d*(l-v))/a,[l+a*D,h+a*i]}function W(l,h,q,O,v,R,K){var u=l-q,D=h-O,i=(K?R:-R)/j(u*u+D*D),n=i*D,d=-i*u,a=l+n,s=h+d,f=q+n,c=O+d,L=(a+f)/2,t=(s+c)/2,m=f-a,g=c-s,A=m*m+g*g,T=v-R,P=a*c-f*s,E=(g<0?-1:1)*j(on(0,T*T*A-P*P)),G=(P*g-m*E)/A,H=(-P*m-g*E)/A,w=(P*g+m*E)/A,p=(-P*m+g*E)/A,x=G-L,e=H-t,r=w-L,M=p-t;return x*x+e*e>r*r+M*M&&(G=w,H=p),{cx:G,cy:H,x01:-n,y01:-d,x11:G*(v/T-1),y11:H*(v/T-1)}}function hn(){var l=cn,h=yn,q=J(0),O=null,v=gn,R=dn,K=mn,u=null,D=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=R.apply(this,arguments)-an,L=rn(c-f),t=c>f;if(u||(u=n=D()),s<a&&(d=s,s=a,a=d),!(s>y))u.moveTo(0,0);else if(L>tn-y)u.moveTo(s*N(f),s*I(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*N(c),a*I(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=L,E=L,G=K.apply(this,arguments)/2,H=G>y&&(O?+O.apply(this,arguments):j(a*a+s*s)),w=_(rn(s-a)/2,+q.apply(this,arguments)),p=w,x=w,e,r;if(H>y){var M=sn(H/a*I(G)),z=sn(H/s*I(G));(P-=M*2)>y?(M*=t?1:-1,A+=M,T-=M):(P=0,A=T=(f+c)/2),(E-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(E=0,m=g=(f+c)/2)}var Q=s*N(m),V=s*I(m),B=a*N(T),C=a*I(T);if(w>y){var F=s*N(g),U=s*I(g),X=a*N(A),Y=a*I(A),S;if(L<un)if(S=pn(Q,V,X,Y,F,U,B,C)){var Z=Q-S[0],$=V-S[1],k=F-S[0],b=U-S[1],nn=1/I(fn((Z*k+$*b)/(j(Z*Z+$*$)*j(k*k+b*b)))/2),en=j(S[0]*S[0]+S[1]*S[1]);p=_(w,(a-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}E>y?x>y?(e=W(X,Y,Q,V,s,x,t),r=W(F,U,B,C,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),u.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(u.moveTo(Q,V),u.arc(0,0,s,m,g,!t)):u.moveTo(Q,V),!(a>y)||!(P>y)?u.lineTo(B,C):p>y?(e=W(B,C,F,U,a,-p,t),r=W(Q,V,X,Y,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(u.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),u.arc(0,0,a,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),u.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):u.arc(0,0,a,T,A,t)}if(u.closePath(),n)return u=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-un/2;return[N(d)*n,I(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:J(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:J(+n),i):h},i.cornerRadius=function(n){return arguments.length?(q=typeof n=="function"?n:J(+n),i):q},i.padRadius=function(n){return arguments.length?(O=n==null?null:typeof n=="function"?n:J(+n),i):O},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:J(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:J(+n),i):R},i.padAngle=function(n){return arguments.length?(K=typeof n=="function"?n:J(+n),i):K},i.context=function(n){return arguments.length?(u=n??null,i):u},i}export{hn as d}; diff --git a/apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-pdH2rk7i.js b/apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-C9XZJvH9.js similarity index 99% rename from apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-pdH2rk7i.js rename to apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-C9XZJvH9.js index acb376a31..58a86402b 100644 --- a/apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-pdH2rk7i.js +++ b/apps/kimi-code/dist-web/assets/architectureDiagram-ZJ3FMSHR-C9XZJvH9.js @@ -1,4 +1,4 @@ -import{p as ke}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as gt,F as Ze,ad as qe,l as Se,b as Qe,a as Je,o as Ke,p as je,g as _e,s as tr,q as er,B as rr,z as ir,D as ar,c as me,a$ as Ee,ai as ve,i as nr,d as or,r as sr,aj as hr,b7 as lr}from"./mermaid.core-DpBz6UHc.js";import{p as fr}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import{c as Fe}from"./cytoscape.esm-OyMbaexL.js";import{g as cr}from"./_commonjsHelpers-CqkleIqs.js";import"./index-_5lXYMaO.js";var se={exports:{}},he={exports:{}},le={exports:{}},gr=le.exports,Me;function ur(){return Me||(Me=1,(function(L,b){(function(G,N){L.exports=N()})(gr,function(){return(function(A){var G={};function N(v){if(G[v])return G[v].exports;var h=G[v]={i:v,l:!1,exports:{}};return A[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=A,N.c=G,N.i=function(v){return v},N.d=function(v,h,i){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:i})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(A,G,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,A.exports=v}),(function(A,G,N){var v=N(2),h=N(8),i=N(9);function r(f,e,u){v.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var a in v)r[a]=v[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var u=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(u.getOwner()==e)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r}),(function(A,G,N){function v(h){this.vGraphObject=h}A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(13),r=N(0),a=N(16),f=N(5);function e(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new i(s.x,s.y,o.width,o.height):this.rect=new i}e.prototype=Object.create(v.prototype);for(var u in v)e[u]=v[u];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},e.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},e.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},e.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)s=c[l],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},e.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},e.prototype.scatter=function(){var t,s,o=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+a.nextDouble()*(c-o)+o;var l=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+a.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},e.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=e}),(function(A,G,N){var v=N(0);function h(){}for(var i in v)h[i]=v[i];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h}),(function(A,G,N){function v(h,i){h==null&&i==null?(this.x=0,this.y=0):(this.x=h,this.y=i)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(0),r=N(7),a=N(3),f=N(1),e=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof a){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,C=0;C<d;C++)g=T[C],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var S=this.nodes.indexOf(l);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var w=g.source.edges.indexOf(g),P=g.target.edges.indexOf(g);if(!(w>-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(w,1),g.target!=g.source&&g.target.edges.splice(P,1);var S=g.source.owner.getEdges().indexOf(g);if(S==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,C=this.getNodes(),S=C.length,w=0;w<S;w++){var P=C[w];T=P.getTop(),g=P.getLeft(),c>T&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?d=C[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,C,S,w,P,B,U=this.nodes,V=U.length,M=0;M<V;M++){var _=U[M];c&&_.child!=null&&_.updateBounds(),C=_.getLeft(),S=_.getRight(),w=_.getTop(),P=_.getBottom(),l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var n=new e(l,g,T-l,d-g);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),U[0].getParent().paddingLeft!=null?B=U[0].getParent().paddingLeft:B=this.margin,this.left=n.x-B,this.right=n.x+n.width+B,this.top=n.y-B,this.bottom=n.y+n.height+B},s.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,C,S,w,P,B=c.length,U=0;U<B;U++){var V=c[U];C=V.getLeft(),S=V.getRight(),w=V.getTop(),P=V.getBottom(),l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var M=new e(l,g,T-l,d-g);return M},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,g=0;g<T;g++){var d=l[g];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=i.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,g=this.nodes[0],d,C,S=g.withChildren();for(S.forEach(function(M){l.push(M),T.add(M)});l.length!==0;){g=l.shift(),d=g.getEdges();for(var w=d.length,P=0;P<w;P++){var B=d[P];if(C=B.getOtherEndInGraph(g,this),C!=null&&!T.has(C)){var U=C.withChildren();U.forEach(function(M){l.push(M),T.add(M)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var V=0;T.forEach(function(M){M.owner==c&&V++}),V==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,G,N){var v,h=N(1);function i(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),f=this.add(r,a);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,a,f,e,u){if(f==null&&e==null&&u==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{u=f,e=a,f=r;var t=e.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,e,u);if(f.isInterGraph=!0,f.source=e,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof v){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(a.getEdges());for(var e,u=f.length,t=0;t<u;t++)e=f[t],a.remove(e);var s=[];s=s.concat(a.getNodes());var o;u=s.length;for(var t=0;t<u;t++)o=s[t],a.remove(o);a==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(a);this.graphs.splice(c,1),a.parent=null}else if(r instanceof h){if(e=r,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var c=e.source.edges.indexOf(e);if(e.source.edges.splice(c,1),c=e.target.edges.indexOf(e),e.target.edges.splice(c,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var c=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(c,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],a=this.getGraphs(),f=a.length,e=0;e<f;e++)r=r.concat(a[e].getNodes());this.allNodes=r}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],a=this.getGraphs();a.length;for(var f=0;f<a.length;f++)r=r.concat(a[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(r,a){if(!(r!=null&&a!=null))throw"assert failed";if(r==a)return!0;var f=r.getOwner(),e;do{if(e=f.getParent(),e==null)break;if(e==a)return!0;if(f=e.getOwner(),f==null)break}while(!0);f=a.getOwner();do{if(e=f.getParent(),e==null)break;if(e==r)return!0;if(f=e.getOwner(),f==null)break}while(!0);return!1},i.prototype.calcLowestCommonAncestors=function(){for(var r,a,f,e,u,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(r=t[o],a=r.source,f=r.target,r.lca=null,r.sourceInLca=a,r.targetInLca=f,a==f){r.lca=a.getOwner();continue}for(e=a.getOwner();r.lca==null;){for(r.targetInLca=f,u=f.getOwner();r.lca==null;){if(u==e){r.lca=u;break}if(u==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=u.getParent(),u=r.targetInLca.getOwner()}if(e==this.rootGraph)break;r.lca==null&&(r.sourceInLca=e.getParent(),e=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(r,a){if(r==a)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var e=a.getOwner();do{if(e==null)break;if(e==f)return e;e=e.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},i.prototype.calcInclusionTreeDepths=function(r,a){r==null&&a==null&&(r=this.rootGraph,a=1);for(var f,e=r.getNodes(),u=e.length,t=0;t<u;t++)f=e[t],f.inclusionTreeDepth=a,f.child!=null&&this.calcInclusionTreeDepths(f.child,a+1)},i.prototype.includesInvalidEdge=function(){for(var r,a=[],f=this.edges.length,e=0;e<f;e++)r=this.edges[e],this.isOneAncestorOfOther(r.source,r.target)&&a.push(r);for(var e=0;e<a.length;e++)this.remove(a[e]);return!1},A.exports=i}),(function(A,G,N){var v=N(12);function h(){}h.calcSeparationAmount=function(i,r,a,f){if(!i.intersects(r))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(i,r,e),a[0]=Math.min(i.getRight(),r.getRight())-Math.max(i.x,r.x),a[1]=Math.min(i.getBottom(),r.getBottom())-Math.max(i.y,r.y),i.getX()<=r.getX()&&i.getRight()>=r.getRight()?a[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(a[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(a[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var u=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(u=1);var t=u*a[0],s=a[1]/u;a[0]<s?s=a[0]:t=a[1],a[0]=-1*e[0]*(s/2+f),a[1]=-1*e[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(i,r,a){i.getCenterX()<r.getCenterX()?a[0]=-1:a[0]=1,i.getCenterY()<r.getCenterY()?a[1]=-1:a[1]=1},h.getIntersection2=function(i,r,a){var f=i.getCenterX(),e=i.getCenterY(),u=r.getCenterX(),t=r.getCenterY();if(i.intersects(r))return a[0]=f,a[1]=e,a[2]=u,a[3]=t,!0;var s=i.getX(),o=i.getY(),c=i.getRight(),l=i.getX(),T=i.getBottom(),g=i.getRight(),d=i.getWidthHalf(),C=i.getHeightHalf(),S=r.getX(),w=r.getY(),P=r.getRight(),B=r.getX(),U=r.getBottom(),V=r.getRight(),M=r.getWidthHalf(),_=r.getHeightHalf(),n=!1,E=!1;if(f===u){if(e>t)return a[0]=f,a[1]=o,a[2]=u,a[3]=U,!1;if(e<t)return a[0]=f,a[1]=T,a[2]=u,a[3]=w,!1}else if(e===t){if(f>u)return a[0]=s,a[1]=e,a[2]=P,a[3]=t,!1;if(f<u)return a[0]=c,a[1]=e,a[2]=S,a[3]=t,!1}else{var p=i.height/i.width,m=r.height/r.width,y=(t-e)/(u-f),I=void 0,O=void 0,R=void 0,W=void 0,x=void 0,Q=void 0;if(-p===y?f>u?(a[0]=l,a[1]=T,n=!0):(a[0]=c,a[1]=o,n=!0):p===y&&(f>u?(a[0]=s,a[1]=o,n=!0):(a[0]=g,a[1]=T,n=!0)),-m===y?u>f?(a[2]=B,a[3]=U,E=!0):(a[2]=P,a[3]=w,E=!0):m===y&&(u>f?(a[2]=S,a[3]=w,E=!0):(a[2]=V,a[3]=U,E=!0)),n&&E)return!1;if(f>u?e>t?(I=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-m,y,1)):e>t?(I=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,R=f+-C/y,a[0]=R,a[1]=W;break;case 2:R=g,W=e+d*y,a[0]=R,a[1]=W;break;case 3:W=T,R=f+C/y,a[0]=R,a[1]=W;break;case 4:R=l,W=e+-d*y,a[0]=R,a[1]=W;break}if(!E)switch(O){case 1:Q=w,x=u+-_/y,a[2]=x,a[3]=Q;break;case 2:x=V,Q=t+M*y,a[2]=x,a[3]=Q;break;case 3:Q=U,x=u+_/y,a[2]=x,a[3]=Q;break;case 4:x=B,Q=t+-M*y,a[2]=x,a[3]=Q;break}}return!1},h.getCardinalDirection=function(i,r,a){return i>r?a:1+a%4},h.getIntersection=function(i,r,a,f){if(f==null)return this.getIntersection2(i,r,a);var e=i.x,u=i.y,t=r.x,s=r.y,o=a.x,c=a.y,l=f.x,T=f.y,g=void 0,d=void 0,C=void 0,S=void 0,w=void 0,P=void 0,B=void 0,U=void 0,V=void 0;return C=s-u,w=e-t,B=t*u-e*s,S=T-c,P=o-l,U=l*c-o*T,V=C*P-S*w,V===0?null:(g=(w*U-P*B)/V,d=(S*B-C*U)/V,new v(g,d))},h.angleOfVector=function(i,r,a,f){var e=void 0;return i!==a?(e=Math.atan((f-r)/(a-i)),a<i?e+=Math.PI:f<r&&(e+=this.TWO_PI)):f<r?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},h.doIntersect=function(i,r,a,f){var e=i.x,u=i.y,t=r.x,s=r.y,o=a.x,c=a.y,l=f.x,T=f.y,g=(t-e)*(T-c)-(l-o)*(s-u);if(g===0)return!1;var d=((T-c)*(l-e)+(o-l)*(T-u))/g,C=((u-s)*(l-e)+(t-e)*(T-u))/g;return 0<d&&d<1&&0<C&&C<1},h.findCircleLineIntersections=function(i,r,a,f,e,u,t){var s=(a-i)*(a-i)+(f-r)*(f-r),o=2*((i-e)*(a-i)+(r-u)*(f-r)),c=(i-e)*(i-e)+(r-u)*(r-u)-t*t,l=o*o-4*s*c;if(l>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h}),(function(A,G,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=v}),(function(A,G,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,A.exports=v}),(function(A,G,N){var v=(function(){function e(u,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}return function(u,t,s){return t&&e(u.prototype,t),s&&e(u,s),u}})();function h(e,u){if(!(e instanceof u))throw new TypeError("Cannot call a class as a function")}var i=function(u){return{value:u,next:null,prev:null}},r=function(u,t,s,o){return u!==null?u.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=u,t.next=s,o.length++,t},a=function(u,t){var s=u.prev,o=u.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,u.prev=u.next=null,t.length--,u},f=(function(){function e(u){var t=this;h(this,e),this.length=0,this.head=null,this.tail=null,u?.forEach(function(s){return t.push(s)})}return v(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,i(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,i(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,i(t),null,this)}},{key:"unshift",value:function(t){return r(null,i(t),this.head,this)}},{key:"remove",value:function(t){return a(t,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),e})();A.exports=f}),(function(A,G,N){function v(h,i,r){this.x=null,this.y=null,h==null&&i==null&&r==null?(this.x=0,this.y=0):typeof h=="number"&&typeof i=="number"&&r==null?(this.x=h,this.y=i):h.constructor.name=="Point"&&i==null&&r==null&&(r=h,this.x=r.x,this.y=r.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(h,i,r){h.constructor.name=="Point"&&i==null&&r==null?(r=h,this.setLocation(r.x,r.y)):typeof h=="number"&&typeof i=="number"&&r==null&&(parseInt(h)==h&&parseInt(i)==i?this.move(h,i):(this.x=Math.floor(h+.5),this.y=Math.floor(i+.5)))},v.prototype.move=function(h,i){this.x=h,this.y=i},v.prototype.translate=function(h,i){this.x+=h,this.y+=i},v.prototype.equals=function(h){if(h.constructor.name=="Point"){var i=h;return this.x==i.x&&this.y==i.y}return this==h},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=v}),(function(A,G,N){function v(h,i,r,a){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&i!=null&&r!=null&&a!=null&&(this.x=h,this.y=i,this.width=r,this.height=a)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(h){this.x=h},v.prototype.getY=function(){return this.y},v.prototype.setY=function(h){this.y=h},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},A.exports=v}),(function(A,G,N){var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function h(){}h.lastID=0,h.createID=function(i){return h.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=h.getString(),h.lastID++),i.uniqueID)},h.getString=function(i){return i==null&&(i=h.lastID),"Object#"+i},h.isPrimitive=function(i){var r=typeof i>"u"?"undefined":v(i);return i==null||r!="object"&&r!="function"},A.exports=h}),(function(A,G,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c<o.length;c++)l[c]=o[c];return l}else return Array.from(o)}var h=N(0),i=N(7),r=N(3),a=N(1),f=N(6),e=N(5),u=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new i(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new r(this.graphManager,o)},s.prototype.newEdge=function(o){return new a(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),h.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(o instanceof a){var d=o;if(d.vGraphObject!=null){var C=d.vGraphObject;C.update(d)}}else if(o instanceof f){var S=o;if(S.vGraphObject!=null){var w=S.vGraphObject;w.update(S)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new e(0,0));else{var c=new u,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),g,d=0;d<T.length;d++)g=T[d],g.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),g=0;g<T.length;g++)c=T[g],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<l.length;g++)l[g].getChild()!=null&&(T=!1);if(!T)return o;var d=new Set,C=[],S=new Map,w=[];for(w=w.concat(l);w.length>0&&c;){for(C.push(w[0]);C.length>0&&c;){var P=C[0];C.splice(0,1),d.add(P);for(var B=P.getEdges(),g=0;g<B.length;g++){var U=B[g].getOtherEnd(P);if(S.get(P)!=U)if(!d.has(U))C.push(U),S.set(U,P);else{c=!1;break}}}if(!c)o=[];else{var V=[].concat(v(d));o.push(V);for(var g=0;g<V.length;g++){var M=V[g],_=w.indexOf(M);_>-1&&w.splice(_,1)}d=new Set,S=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g<o.bendpoints.length;g++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var C=this.newEdge(null);this.graphManager.add(C,l,d),c.add(d),l=d}var C=this.newEdge(null);return this.graphManager.add(C,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(v(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var l=o[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),g=0;g<T.length;g++){var d=T[g],C=new e(d.getCenterX(),d.getCenterY()),S=l.bendpoints.get(g);S.x=C.x,S.y=C.y,d.getOwner().remove(d)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(o,c,l,T){if(l!=null&&T!=null){var g=c;if(o<=50){var d=c/l;g-=(c-d)/50*(50-o)}else{var C=c*T;g+=(C-c)/50*(o-50)}return g}else{var S,w;return o<=50?(S=9*c/500,w=c/10):(S=9*c/50,w=-8*c),S*o+w}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,g=!1,d=null;(c.length==1||c.length==2)&&(g=!0,d=c[0]);for(var C=0;C<c.length;C++){var S=c[C],w=S.getNeighborsList().size;T.set(S,S.getNeighborsList().size),w==1&&l.push(S)}var P=[];for(P=P.concat(l);!g;){var B=[];B=B.concat(P),P=[];for(var C=0;C<c.length;C++){var S=c[C],U=c.indexOf(S);U>=0&&c.splice(U,1);var V=S.getNeighborsList();V.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&P.push(n),T.set(n,p)}})}l=l.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,G,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},A.exports=v}),(function(A,G,N){var v=N(5);function h(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(i){this.lworldExtX=i},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(i){this.lworldExtY=i},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},h.prototype.transformX=function(i){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/a),r},h.prototype.transformY=function(i){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/a),r},h.prototype.inverseTransformX=function(i){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/a),r},h.prototype.inverseTransformY=function(i){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/a),r},h.prototype.inverseTransformPoint=function(i){var r=new v(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=h}),(function(A,G,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var h=N(15),i=N(4),r=N(0),a=N(8),f=N(9);function e(){h.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}e.prototype=Object.create(h.prototype);for(var u in h)e[u]=h[u];e.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,l,T,g,d=this.getGraphManager().getAllEdges(),C=0;C<d.length;C++)t=d[C],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},e.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},e.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;o<g.length;o++)l=g[o],this.calculateRepulsionForceOfANode(l,d,t,s),d.add(l);else for(o=0;o<g.length;o++)for(l=g[o],c=o+1;c<g.length;c++)T=g[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},e.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},e.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},e.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),l,T,g,d;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),g=T*(t.lengthX/l),d=T*(t.lengthY/l),o.springForceX+=g,o.springForceY+=d,c.springForceX-=g,c.springForceY-=d)},e.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),g,d,C,S,w,P,B;if(o.intersects(c)){a.calcSeparationAmount(o,c,l,i.DEFAULT_EDGE_LENGTH/2),P=2*l[0],B=2*l[1];var U=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=U*P,t.repulsionForceY-=U*B,s.repulsionForceX+=U*P,s.repulsionForceY+=U*B}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(g=c.getCenterX()-o.getCenterX(),d=c.getCenterY()-o.getCenterY()):(a.getIntersection(o,c,T),g=T[2]-T[0],d=T[3]-T[1]),Math.abs(g)<i.MIN_REPULSION_DIST&&(g=f.sign(g)*i.MIN_REPULSION_DIST),Math.abs(d)<i.MIN_REPULSION_DIST&&(d=f.sign(d)*i.MIN_REPULSION_DIST),C=g*g+d*d,S=Math.sqrt(C),w=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/C,P=w*g/S,B=w*d/S,t.repulsionForceX-=P,t.repulsionForceY-=B,s.repulsionForceX+=P,s.repulsionForceY+=B},e.prototype.calcGravitationalForce=function(t){var s,o,c,l,T,g,d,C;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,g=Math.abs(l)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(C=s.getEstimatedSize()*this.gravityRangeFactor,(g>C||d>C)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(C=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>C||d>C)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},e.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(o);for(var l=0;l<s;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},e.prototype.addNodeToGrid=function(t,s,o){var c=0,l=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var d=c;d<=l;d++)for(var C=T;C<=g;C++)this.grid[d][C].push(t),t.setGridCoordinates(c,l,T,g)},e.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},e.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,g=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var C=t.startY-1;C<t.finishY+2;C++)if(!(d<0||C<0||d>=g.length||C>=g[0].length)){for(var S=0;S<g[d][C].length;S++)if(T=g[d][C][S],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var w=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);w<=this.repulsionRange&&P<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(v(l))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},e.prototype.calcRepulsionRange=function(){return 0},A.exports=e}),(function(A,G,N){var v=N(1),h=N(4);function i(a,f,e){v.call(this,a,f,e),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}i.prototype=Object.create(v.prototype);for(var r in v)i[r]=v[r];A.exports=i}),(function(A,G,N){var v=N(3),h=N(4);function i(a,f,e,u){v.call(this,a,f,e,u),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}i.prototype=Object.create(v.prototype);for(var r in v)i[r]=v[r];i.prototype.setGridCoordinates=function(a,f,e,u){this.startX=a,this.finishX=f,this.startY=e,this.finishY=u},A.exports=i}),(function(A,G,N){function v(h,i){this.width=0,this.height=0,h!==null&&i!==null&&(this.height=i,this.width=h)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},A.exports=v}),(function(A,G,N){var v=N(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(i,r){var a=v.createID(i);this.contains(a)||(this.map[a]=r,this.keys.push(i))},h.prototype.contains=function(i){return v.createID(i),this.map[i]!=null},h.prototype.get=function(i){var r=v.createID(i);return this.map[r]},h.prototype.keySet=function(){return this.keys},A.exports=h}),(function(A,G,N){var v=N(14);function h(){this.set={}}h.prototype.add=function(i){var r=v.createID(i);this.contains(r)||(this.set[r]=i)},h.prototype.remove=function(i){delete this.set[v.createID(i)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(i){return this.set[v.createID(i)]==i},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(i){for(var r=Object.keys(this.set),a=r.length,f=0;f<a;f++)i.push(this.set[r[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(i){for(var r=i.length,a=0;a<r;a++){var f=i[a];this.add(f)}},A.exports=h}),(function(A,G,N){function v(){}v.multMat=function(h,i){for(var r=[],a=0;a<h.length;a++){r[a]=[];for(var f=0;f<i[0].length;f++){r[a][f]=0;for(var e=0;e<h[0].length;e++)r[a][f]+=h[a][e]*i[e][f]}}return r},v.transpose=function(h){for(var i=[],r=0;r<h[0].length;r++){i[r]=[];for(var a=0;a<h.length;a++)i[r][a]=h[a][r]}return i},v.multCons=function(h,i){for(var r=[],a=0;a<h.length;a++)r[a]=h[a]*i;return r},v.minusOp=function(h,i){for(var r=[],a=0;a<h.length;a++)r[a]=h[a]-i[a];return r},v.dotProduct=function(h,i){for(var r=0,a=0;a<h.length;a++)r+=h[a]*i[a];return r},v.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},v.normalize=function(h){for(var i=[],r=this.mag(h),a=0;a<h.length;a++)i[a]=h[a]/r;return i},v.multGamma=function(h){for(var i=[],r=0,a=0;a<h.length;a++)r+=h[a];r*=-1/h.length;for(var f=0;f<h.length;f++)i[f]=r+h[f];return i},v.multL=function(h,i,r){for(var a=[],f=[],e=[],u=0;u<i[0].length;u++){for(var t=0,s=0;s<i.length;s++)t+=-.5*i[s][u]*h[s];f[u]=t}for(var o=0;o<r.length;o++){for(var c=0,l=0;l<r.length;l++)c+=r[o][l]*f[l];e[o]=c}for(var T=0;T<i.length;T++){for(var g=0,d=0;d<i[0].length;d++)g+=i[T][d]*e[d];a[T]=g}return a},A.exports=v}),(function(A,G,N){var v=(function(){function a(f,e){for(var u=0;u<e.length;u++){var t=e[u];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,e,u){return e&&a(f.prototype,e),u&&a(f,u),f}})();function h(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function")}var i=N(11),r=(function(){function a(f,e){h(this,a),(e!==null||e!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var u=void 0;f instanceof i?u=f.size():u=f.length,this._quicksort(f,0,u-1)}return v(a,[{key:"_quicksort",value:function(e,u,t){if(u<t){var s=this._partition(e,u,t);this._quicksort(e,u,s),this._quicksort(e,s+1,t)}}},{key:"_partition",value:function(e,u,t){for(var s=this._get(e,u),o=u,c=t;;){for(;this.compareFunction(s,this._get(e,c));)c--;for(;this.compareFunction(this._get(e,o),s);)o++;if(o<c)this._swap(e,o,c),o++,c--;else return c}}},{key:"_get",value:function(e,u){return e instanceof i?e.get_object_at(u):e[u]}},{key:"_set",value:function(e,u,t){e instanceof i?e.set_object_at(u,t):e[u]=t}},{key:"_swap",value:function(e,u,t){var s=this._get(e,u);this._set(e,u,this._get(e,t)),this._set(e,t,s)}},{key:"_defaultCompareFunction",value:function(e,u){return u>e}}]),a})();A.exports=r}),(function(A,G,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var i=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.m,i]),this.V=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var r=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),a=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,e=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(e,u);t++){if(t<e){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=v.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)h[o][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<e,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=l*h[g][t]}r[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<e))for(var d=t;d<this.m;d++)this.U[d][t]=h[d][t];if(t<u){r[t]=0;for(var C=t+1;C<this.n;C++)r[t]=v.hypot(r[t],r[C]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var S=t+1;S<this.n;S++)r[S]/=r[t];r[t+1]+=1}if(r[t]=-r[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,r[t]!==0)){for(var w=t+1;w<this.m;w++)a[w]=0;for(var P=t+1;P<this.n;P++)for(var B=t+1;B<this.m;B++)a[B]+=r[P]*h[B][P];for(var U=t+1;U<this.n;U++)for(var V=-r[U]/r[t+1],M=t+1;M<this.m;M++)h[M][U]+=V*a[M]}for(var _=t+1;_<this.n;_++)this.V[_][t]=r[_]}}var n=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=h[e][e]),this.m<n&&(this.s[n-1]=0),u+1<n&&(r[u]=h[u][n-1]),r[n-1]=0;{for(var E=e;E<i;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=e-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<i;y++){for(var I=0,O=m;O<this.m;O++)I+=this.U[O][m]*this.U[O][y];I=-I/this.U[m][m];for(var R=m;R<this.m;R++)this.U[R][y]+=I*this.U[R][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var x=0;x<m-1;x++)this.U[x][m]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][m]=0;this.U[m][m]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z<u,r[z]!==0))for(var X=z+1;X<i;X++){for(var rt=0,$=z+1;$<this.n;$++)rt+=this.V[$][z]*this.V[$][X];rt=-rt/this.V[z+1][z];for(var D=z+1;D<this.n;D++)this.V[D][X]+=rt*this.V[D][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var k=n-1,tt=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),wt=this.s[ut]/Et,Ot=it/Et;this.s[ut]=Et,ut!==J&&(it=-Ot*r[ut-1],r[ut-1]=wt*r[ut-1]);for(var mt=0;mt<this.n;mt++)Et=wt*this.V[mt][ut]+Ot*this.V[mt][n-1],this.V[mt][n-1]=-Ot*this.V[mt][ut]+wt*this.V[mt][n-1],this.V[mt][ut]=Et}}break;case 2:{var Dt=r[J-1];r[J-1]=0;for(var Rt=J;Rt<n;Rt++){var Ht=v.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*r[Rt],r[Rt]=Ut*r[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][J-1],this.U[Ft][J-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][J-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(r[n-2])),Math.abs(this.s[J])),Math.abs(r[J])),Vt=this.s[n-1]/Yt,F=this.s[n-2]/Yt,Y=r[n-2]/Yt,Z=this.s[J]/Yt,K=r[J]/Yt,q=((F+Vt)*(F-Vt)+Y*Y)/2,at=Vt*Y*(Vt*Y),ct=0;(function(Tt,Ct){return Tt||Ct})(q!==0,at!==0)&&(ct=Math.sqrt(q*q+at),q<0&&(ct=-ct),ct=at/(q+ct));for(var nt=(Z+Vt)*(Z-Vt)+ct,et=Z*K,j=J;j<n-1;j++){var dt=v.hypot(nt,et),At=nt/dt,pt=et/dt;j!==J&&(r[j-1]=dt),nt=At*this.s[j]+pt*r[j],r[j]=At*r[j]-pt*this.s[j],et=pt*this.s[j+1],this.s[j+1]=At*this.s[j+1];for(var xt=0;xt<this.n;xt++)dt=At*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+At*this.V[xt][j+1],this.V[xt][j]=dt;if(dt=v.hypot(nt,et),At=nt/dt,pt=et/dt,this.s[j]=dt,nt=At*r[j]+pt*this.s[j+1],this.s[j+1]=-pt*r[j]+At*this.s[j+1],et=pt*r[j+1],r[j+1]=At*r[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)dt=At*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+At*this.U[lt][j+1],this.U[lt][j]=dt}r[n-2]=nt}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var ot=0;ot<=k;ot++)this.V[ot][J]=-this.V[ot][J]}for(;J<k&&!(this.s[J]>=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,J<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][J+1],this.V[ft][J+1]=this.V[ft][J],this.V[ft][J]=Lt;if(J<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][J+1],this.U[st][J+1]=this.U[st][J],this.U[st][J]=Lt;J++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},v.hypot=function(h,i){var r=void 0;return Math.abs(h)>Math.abs(i)?(r=i/h,r=Math.abs(h)*Math.sqrt(1+r*r)):i!=0?(r=h/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=v}),(function(A,G,N){var v=(function(){function r(a,f){for(var e=0;e<f.length;e++){var u=f[e];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(a,u.key,u)}}return function(a,f,e){return f&&r(a.prototype,f),e&&r(a,e),a}})();function h(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var i=(function(){function r(a,f){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,r),this.sequence1=a,this.sequence2=f,this.match_score=e,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var u=1;u<this.iMax;u++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[u-1]===this.sequence2[t-1]?s=this.grid[u-1][t-1]+this.match_score:s=this.grid[u-1][t-1]+this.mismatch_penalty;var o=this.grid[u-1][t]+this.gap_penalty,c=this.grid[u][t-1]+this.gap_penalty,l=[s,o,c],T=this.arrayAllMaxIndexes(l);this.grid[u][t]=l[T[0]],this.tracebackGrid[u][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var e=f[0],u=this.tracebackGrid[e.pos[0]][e.pos[1]];u[0]&&f.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),u[1]&&f.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),u[2]&&f.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,e){for(var u=[],t=-1;(t=f.indexOf(e,t+1))!==-1;)u.push(t);return u}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),r})();A.exports=i}),(function(A,G,N){var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),A.exports=v}),(function(A,G,N){function v(){this.listeners=[]}var h=v.prototype;h.addListener=function(i,r){this.listeners.push({event:i,callback:r})},h.removeListener=function(i,r){for(var a=this.listeners.length;a>=0;a--){var f=this.listeners[a];f.event===i&&f.callback===r&&this.listeners.splice(a,1)}},h.emit=function(i,r){for(var a=0;a<this.listeners.length;a++){var f=this.listeners[a];i===f.event&&f.callback(r)}},A.exports=v})])})})(le)),le.exports}var dr=he.exports,Oe;function vr(){return Oe||(Oe=1,(function(L,b){(function(G,N){L.exports=N(ur())})(dr,function(A){return(()=>{var G={45:((i,r,a)=>{var f={};f.layoutBase=a(551),f.CoSEConstants=a(806),f.CoSEEdge=a(767),f.CoSEGraph=a(880),f.CoSEGraphManager=a(578),f.CoSELayout=a(765),f.CoSENode=a(991),f.ConstraintHandler=a(902),i.exports=f}),806:((i,r,a)=>{var f=a(551).FDLayoutConstants;function e(){}for(var u in f)e[u]=f[u];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,i.exports=e}),767:((i,r,a)=>{var f=a(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),880:((i,r,a)=>{var f=a(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),578:((i,r,a)=>{var f=a(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),765:((i,r,a)=>{var f=a(551).FDLayout,e=a(578),u=a(880),t=a(991),s=a(767),o=a(806),c=a(902),l=a(551).FDLayoutConstants,T=a(551).LayoutConstants,g=a(551).Point,d=a(551).PointD,C=a(551).DimensionD,S=a(551).Layout,w=a(551).Integer,P=a(551).IGeometry,B=a(551).LGraph,U=a(551).Transform,V=a(551).LinkedList;function M(){f.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(f.prototype);for(var _ in f)M[_]=f[_];M.prototype.newGraphManager=function(){var n=new e(this);return this.graphManager=n,n},M.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},M.prototype.newNode=function(n){return new t(this.graphManager,n)},M.prototype.newEdge=function(n){return new s(null,null,n)},M.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p<n.length;p++){var m=n[p].rect,y=n[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},M.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},M.prototype.moveNodes=function(){for(var n=this.getAllNodes(),E,p=0;p<n.length;p++)E=n[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)E=n[p],E.move()},M.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),p=0;p<E.length;p++){var m=E[p];this.idToNodeMap.set(m.id,m)}var y=function D(H){for(var k=H.getChild().getNodes(),tt,ht=0,J=0;J<k.length;J++)tt=k[J],tt.getChild()==null?n.fixedNodeSet.has(tt.id)&&(ht+=100):ht+=D(tt);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(k){n.fixedNodeSet.add(k.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var I=y(m);I>0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var O=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){O.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){R.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var H,k,tt;for(tt=D.length-1;tt>=2*D.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=D[tt],D[tt]=D[H],D[H]=k;return D},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:D.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:D.gap})}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:D.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new V,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(wt){It.has(wt)||(J.push(wt),It.add(wt),tt[Nt].push(wt))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},M.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var D=n.idToNodeMap.get($.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p<E.length;p++){for(var m=0,y=0;y<E[p].length;y++){if(this.fixedNodeSet.has(E[p][y])){m=0;break}m+=this.idToNodeMap.get(E[p][y]).displacementX}for(var I=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal)for(var O=this.constraints.alignmentConstraint.horizontal,p=0;p<O.length;p++){for(var R=0,y=0;y<O[p].length;y++){if(this.fixedNodeSet.has(O[p][y])){R=0;break}R+=this.idToNodeMap.get(O[p][y]).displacementY}for(var W=R/O[p].length,y=0;y<O[p].length;y++)this.idToNodeMap.get(O[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var D=0;n.dummyToNodeForVerticalAlignment.has($)?D=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:D=n.idToNodeMap.get($).displacementX,n.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var k=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=n.nodeToTempPositionMapHorizontal.get($)-n.nodeToTempPositionMapHorizontal.get(H.left)+D;k<H.gap&&(D+=H.gap-k)}}),n.nodeToTempPositionMapHorizontal.set($,n.nodeToTempPositionMapHorizontal.get($)+D),n.dummyToNodeForVerticalAlignment.has($)?n.dummyToNodeForVerticalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementX=D}):n.idToNodeMap.get($).displacementX=D}}),this.nodesInRelativeVertical.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var D=0;n.dummyToNodeForHorizontalAlignment.has($)?D=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:D=n.idToNodeMap.get($).displacementY,n.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var k=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=n.nodeToTempPositionMapVertical.get($)-n.nodeToTempPositionMapVertical.get(H.top)+D;k<H.gap&&(D+=H.gap-k)}}),n.nodeToTempPositionMapVertical.set($,n.nodeToTempPositionMapVertical.get($)+D),n.dummyToNodeForHorizontalAlignment.has($)?n.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementY=D}):n.idToNodeMap.get($).displacementY=D}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var X=this.dummyToNodeForVerticalAlignment.get(x[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(x[y]).displacementX,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(k){n.idToNodeMap.get(k).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var X=this.dummyToNodeForHorizontalAlignment.get(x[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(x[y]).displacementY,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(J){n.idToNodeMap.get(J).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},M.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(n=n.concat(E.getNodes()));return n},M.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<n.length;p++){var m=n[p];if(!E.has(m)){var y=m.getSource(),I=m.getTarget();if(y==I)m.getBendpoints().push(new d),m.getBendpoints().push(new d),this.createDummyNodesForBendpoints(m),E.add(m);else{var O=[];if(O=O.concat(y.getEdgeListToNode(I)),O=O.concat(I.getEdgeListToNode(y)),!E.has(O[0])){if(O.length>1){var R;for(R=0;R<O.length;R++){var W=O[R];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}O.forEach(function(x){E.add(x)})}}}if(E.size==n.length)break}},M.prototype.positionNodesRadially=function(n){for(var E=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),m=0,y=0,I=0,O=new d(0,0),R=0;R<n.length;R++){R%p==0&&(I=0,y=m,R!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),m=0);var W=n[R],x=S.findCenterOfTree(W);E.x=I,E.y=y,O=M.radialLayout(W,x,E),O.y>m&&(m=Math.floor(O.y)),I=Math.floor(O.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},M.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(E,null,0,359,0,m);var y=B.calculateBounds(n),I=new U;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var O=0;O<n.length;O++){var R=n[O];R.transform(I)}var W=new d(y.getMaxX(),y.getMaxY());return I.inverseTransformPoint(W)},M.branchRadialLayout=function(n,E,p,m,y,I){var O=(m-p+1)/2;O<0&&(O+=180);var R=(O+p)%360,W=R*P.TWO_PI/360,x=y*Math.cos(W),Q=y*Math.sin(W);n.setCenter(x,Q);var z=[];z=z.concat(n.getEdges());var X=z.length;E!=null&&X--;for(var rt=0,$=z.length,D,H=n.getEdgesBetween(E);H.length>1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),$--,X--}E!=null?D=(z.indexOf(H[0])+1)%$:D=0;for(var ht=Math.abs(m-p)/X,J=D;rt!=X;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;M.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},M.maxDiagonalInTree=function(n){for(var E=w.MIN_VALUE,p=0;p<n.length;p++){var m=n[p],y=m.getDiagonal();y>E&&(E=y)}return E},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var I=m[y],O=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(O.id==null||!this.getToBeTiled(O))&&p.push(I)}for(var y=0;y<p.length;y++){var I=p[y],R=I.getParent().id;typeof E[R]>"u"&&(E[R]=[]),E[R]=E[R].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$<E[W].length;$++){var D=E[W][$];rt.remove(D),X.add(D)}}})},M.prototype.clearCompounds=function(){var n={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,E)},M.prototype.clearZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=n.idToDummyNode[p];if(E[p]=n.tileNodes(n.memberGroups[p],m.paddingLeft+m.paddingRight),m.rect.width=E[p].width,m.rect.height=E[p].height,m.setCenter(E[p].centerX,E[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,I=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,O)}},M.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,O=m.labelMarginLeft,R=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,O,R)})},M.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y<m.length;y++){var I=m[y];if(this.getNodeDegree(I)>0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},M.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},M.prototype.getNodeDegreeWithChildren=function(n){var E=this.getNodeDegree(n);if(n.getChild()==null)return E;for(var p=n.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(n){for(var E=0;E<n.length;E++){var p=n[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},M.prototype.adjustLocations=function(n,E,p,m,y,I,O){E+=m+I,p+=y+O;for(var R=E,W=0;W<n.rows.length;W++){var x=n.rows[W];E=R;for(var Q=0,z=0;z<x.length;z++){var X=x[z];X.rect.x=E,X.rect.y=p,E+=X.rect.width+n.horizontalPadding,X.rect.height>Q&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},M.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,O=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},M.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),O;return I<y?O=m:O=p,O},M.prototype.getOrgRatio=function(n){var E=n.width,p=n.height,m=E/p;return m<1&&(m=1/m),m},M.prototype.calcIdealRowWidth=function(n,E){var p=o.TILING_PADDING_VERTICAL,m=o.TILING_PADDING_HORIZONTAL,y=n.length,I=0,O=0,R=0;n.forEach(function($){I+=$.getWidth(),O+=$.getHeight(),$.getWidth()>R&&(R=$.getWidth())});var W=I/y,x=O/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return R>rt&&(rt=R),rt+=m*2,rt},M.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(O.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(D){return D.rect.width*D.rect.height},W=function(D,H){return R(H)-R(D)};n.sort(function($,D){var H=W;return O.idealRowWidth?(H=I,H($.id,D.id)):H($,D)});for(var x=0,Q=0,z=0;z<n.length;z++){var X=n[z];x+=X.getCenterX(),Q+=X.getCenterY()}O.centerX=x/n.length,O.centerY=Q/n.length;for(var z=0;z<n.length;z++){var X=n[z];if(O.rows.length==0)this.insertNodeToRow(O,X,0,E);else if(this.canAddHorizontal(O,X.rect.width,X.rect.height)){var rt=O.rows.length-1;O.idealRowWidth||(rt=this.getShortestRowIndex(O)),this.insertNodeToRow(O,X,rt,E)}else this.insertNodeToRow(O,X,O.rows.length,E);this.shiftToLastRow(O)}return O},M.prototype.insertNodeToRow=function(n,E,p,m){var y=m;if(p==n.rows.length){var I=[];n.rows.push(I),n.rowWidth.push(y),n.rowHeight.push(0)}var O=n.rowWidth[p]+E.rect.width;n.rows[p].length>0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,n.width<O&&(n.width=O);var R=E.rect.height;p>0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},M.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;m<n.rows.length;m++)n.rowWidth[m]<p&&(E=m,p=n.rowWidth[m]);return E},M.prototype.getLongestRowIndex=function(n){for(var E=-1,p=Number.MIN_VALUE,m=0;m<n.rows.length;m++)n.rowWidth[m]>p&&(E=m,p=n.rowWidth[m]);return E},M.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var O=n.rowWidth[I];if(O+n.horizontalPadding+E<=n.width)return!0;var R=0;n.rowHeight[I]<p&&I>0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-O>=E+n.horizontalPadding?W=(n.height+R)/(O+E+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.width<E?x=(n.height+R)/E:x=(n.height+R)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},M.prototype.shiftToLastRow=function(n){var E=this.getLongestRowIndex(n),p=n.rowWidth.length-1,m=n.rows[E],y=m[m.length-1],I=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>I&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var O=Number.MIN_VALUE,R=0;R<m.length;R++)m[R].height>O&&(O=m[R].height);E>0&&(O+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=O,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[E]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},M.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var n=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var I=0;I<m.length;I++)if(p=m[I],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var O=p.getEdges()[0].getOtherEnd(p),R=new C(p.getCenterX()-O.getCenterX(),p.getCenterY()-O.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),R])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},M.prototype.growTree=function(n){for(var E=n.length,p=n[E-1],m,y=0;y<p.length;y++)m=p[y],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},M.prototype.findPlaceforPrunedNode=function(n){var E,p,m=n[0];if(m==n[1].source?p=n[1].target:p=n[1].source,o.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,I=p.finishX,O=p.startY,R=p.finishY,W=0,x=0,Q=0,z=0,X=[W,Q,x,z];if(O>0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(I<this.grid.length-1)for(var rt=O;rt<=R;rt++)X[1]+=this.grid[I+1][rt].length+this.grid[I][rt].length-1;if(R<this.grid[0].length-1)for(var rt=y;rt<=I;rt++)X[2]+=this.grid[rt][R+1].length+this.grid[rt][R].length-1;if(y>0)for(var rt=O;rt<=R;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,D,H,k=0;k<X.length;k++)X[k]<$?($=X[k],D=1,H=k):X[k]==$&&D++;if(D==3&&$==0)X[0]==0&&X[1]==0&&X[2]==0?E=1:X[0]==0&&X[1]==0&&X[3]==0?E=0:X[0]==0&&X[2]==0&&X[3]==0?E=3:X[1]==0&&X[2]==0&&X[3]==0&&(E=2);else if(D==2&&$==0){var tt=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?tt==0?E=0:E=1:X[0]==0&&X[2]==0?tt==0?E=0:E=2:X[0]==0&&X[3]==0?tt==0?E=0:E=3:X[1]==0&&X[2]==0?tt==0?E=1:E=2:X[1]==0&&X[3]==0?tt==0?E=1:E=3:tt==0?E=2:E=3}else if(D==4&&$==0){var tt=Math.floor(Math.random()*4);E=tt}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},i.exports=M}),991:((i,r,a)=>{var f=a(551).FDLayoutNode,e=a(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=o):l.propogateDisplacementToChildren(s,o)},u.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},u.prototype.setPred1=function(s){this.pred1=s},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(s){this.next=s},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(s){this.processed=s},u.prototype.isProcessed=function(){return processed},i.exports=u}),902:((i,r,a)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var e=a(806),u=a(551).LinkedList,t=a(551).Matrix,s=a(551).SVD;function o(){}o.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,d=[],C=[],S=c.getAllNodes(),w=0,P=0;P<S.length;P++){var B=S[P];B.getChild()==null&&(g.set(B.id,w++),d.push(B.getCenterX()),C.push(B.getCenterY()),T.set(B.id,B))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=e.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=e.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var U=function(Y,Z){return{x:Y.x-Z.x,y:Y.y-Z.y}},V=function(Y){var Z=0,K=0;return Y.forEach(function(q){Z+=d[g.get(q)],K+=C[g.get(q)]}),{x:Z/Y.size,y:K/Y.size}},M=function(Y,Z,K,q,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;Y.forEach(function(lt,ot){nt.set(ot,0)}),Y.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var et=new Map,j=new Map,dt=new u;nt.forEach(function(lt,ot){lt==0?(dt.push(ot),K||(Z=="horizontal"?et.set(ot,g.has(ot)?d[g.get(ot)]:q.get(ot)):et.set(ot,g.has(ot)?C[g.get(ot)]:q.get(ot)))):et.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?C[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?C[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var At=function(){var ot=dt.shift(),Lt=Y.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)<et.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(Z=="horizontal"?st=g.has(ft.id)?d[g.get(ft.id)]:q.get(ft.id):st=g.has(ft.id)?C[g.get(ft.id)]:q.get(ft.id),et.set(ft.id,st),st<et.get(ot)+ft.gap){var Xt=et.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ft.id,et.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&dt.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};dt.length!=0;)At();if(K){var pt=new Set;Y.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=kt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;Z=="horizontal"?kt=g.has(St)?d[g.get(St)]:q.get(St):kt=g.has(St)?C[g.get(St)]:q.get(St);var Kt=et.get(St);kt<Lt&&(Lt=kt),kt>st&&(st=kt),Kt<ft&&(ft=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(Y){var Z=0,K=0,q=0,at=0;if(Y.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:C[g.get(j.top)]-C[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var ct=0;ct<g.size;ct++)d[ct]=-1*d[ct],C[ct]=-1*C[ct];else if(Z>K)for(var nt=0;nt<g.size;nt++)d[nt]=-1*d[nt];else if(q>at)for(var et=0;et<g.size;et++)C[et]=-1*C[et]},n=function(Y){var Z=[],K=new u,q=new Set,at=0;return Y.forEach(function(ct,nt){if(!q.has(nt)){Z[at]=[];var et=nt;for(K.push(et),q.add(et),Z[at].push(et);K.length!=0;){et=K.shift();var j=Y.get(et);j.forEach(function(dt){q.has(dt.id)||(K.push(dt.id),q.add(dt.id),Z[at].push(dt.id))})}at++}}),Z},E=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(q).push(at),Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},p=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},m=[],y=[],I=!1,O=!1,R=new Set,W=new Map,x=new Map,Q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(F){R.add(F.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(F){F.left?(W.has(F.left)?W.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):W.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),W.has(F.right)||W.set(F.right,[])):(W.has(F.top)?W.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):W.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),W.has(F.bottom)||W.set(F.bottom,[]))}),x=E(W),Q=n(x)),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(F,Y){m[Y]=[F.position.x,F.position.y],y[Y]=[d[g.get(F.nodeId)],C[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var Y=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;Y[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),At=void 0;dt.size>0?At=d[g.get(dt.values().next().value)]:At=V(j).x,Y[et].forEach(function(pt){m[F]=[At,C[g.get(pt)]],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},K=0;K<Y.length;K++)Z(K);I=!0}if(l.alignmentConstraint.horizontal){for(var q=l.alignmentConstraint.horizontal,at=function(et){var j=new Set;q[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),At=void 0;dt.size>0?At=d[g.get(dt.values().next().value)]:At=V(j).y,q[et].forEach(function(pt){m[F]=[d[g.get(pt)],At],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},ct=0;ct<q.length;ct++)at(ct);I=!0}l.relativePlacementConstraint&&(O=!0)})();else if(l.relativePlacementConstraint){for(var z=0,X=0,rt=0;rt<Q.length;rt++)Q[rt].length>z&&(z=Q[rt].length,X=rt);if(z<x.size/2)_(l.relativePlacementConstraint),I=!1,O=!1;else{var $=new Map,D=new Map,H=[];Q[X].forEach(function(F){W.get(F).forEach(function(Y){Y.direction=="horizontal"?($.has(F)?$.get(F).push(Y):$.set(F,[Y]),$.has(Y.id)||$.set(Y.id,[]),H.push({left:F,right:Y.id})):(D.has(F)?D.get(F).push(Y):D.set(F,[Y]),D.has(Y.id)||D.set(Y.id,[]),H.push({top:F,bottom:Y.id}))})}),_(H),O=!1;var k=M($,"horizontal"),tt=M(D,"vertical");Q[X].forEach(function(F,Y){y[Y]=[d[g.get(F)],C[g.get(F)]],m[Y]=[],k.has(F)?m[Y][0]=k.get(F):m[Y][0]=d[g.get(F)],tt.has(F)?m[Y][1]=tt.get(F):m[Y][1]=C[g.get(F)]}),I=!0}}if(I){for(var ht=void 0,J=t.transpose(m),It=t.transpose(y),Nt=0;Nt<J.length;Nt++)J[Nt]=t.multGamma(J[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(J,t.transpose(It)),it=s.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var ut=0;ut<g.size;ut++){var Et=[d[ut],C[ut]],wt=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];d[ut]=t.dotProduct(Et,wt),C[ut]=t.dotProduct(Et,Ot)}O&&_(l.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,Y){var Z={x:d[g.get(F.nodeId)],y:C[g.get(F.nodeId)]},K=F.position,q=U(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(F,Y){d[Y]+=mt.x}),C.forEach(function(F,Y){C[Y]+=mt.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,C[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(Y){var Z=new Set;Dt[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=V(Z).x,Z.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(Y){var Z=new Set;Ut[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=C[g.get(K.values().next().value)]:q=V(Z).y,Z.forEach(function(at){R.has(at)||(C[g.get(at)]=q)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var F=new Map,Y=new Map,Z=new Map,K=new Map,q=new Map,at=new Map,ct=new Set,nt=new Set;if(R.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var et=l.alignmentConstraint.vertical,j=function(yt){Z.set("dummy"+yt,[]),et[yt].forEach(function(Mt){F.set(Mt,"dummy"+yt),Z.get("dummy"+yt).push(Mt),R.has(Mt)&&ct.add("dummy"+yt)}),q.set("dummy"+yt,d[g.get(et[yt][0])])},dt=0;dt<et.length;dt++)j(dt);if(l.alignmentConstraint.horizontal)for(var At=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),At[yt].forEach(function(Mt){Y.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),R.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,C[g.get(At[yt][0])])},xt=0;xt<At.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var Zt=void 0,$t=void 0;Mt.direction=="horizontal"?(Zt=F.get(yt)?F.get(yt):yt,F.get(Mt.id)?$t={id:F.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,lt.has(Zt)?lt.get(Zt).push($t):lt.set(Zt,[$t]),lt.has($t.id)||lt.set($t.id,[])):(Zt=Y.get(yt)?Y.get(yt):yt,Y.get(Mt.id)?$t={id:Y.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ot.has(Zt)?ot.get(Zt).push($t):ot.set(Zt,[$t]),ot.has($t.id)||ot.set($t.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=E(lt),zt=E(ot),St=n(bt),kt=n(zt),Kt=p(lt),fe=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){fe.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=M(lt,"horizontal",ct,q,Qt),Jt=M(ot,"vertical",nt,at,jt),ne=function(yt){Z.get(yt)?Z.get(yt).forEach(function(Mt){d[g.get(Mt)]=_t.get(yt)}):d[g.get(yt)]=_t.get(yt)},te=!0,ee=!1,Ne=void 0;try{for(var ce=_t.keys()[Symbol.iterator](),Le;!(te=(Le=ce.next()).done);te=!0){var ge=Le.value;ne(ge)}}catch(Gt){ee=!0,Ne=Gt}finally{try{!te&&ce.return&&ce.return()}finally{if(ee)throw Ne}}var $e=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){C[g.get(Mt)]=Jt.get(yt)}):C[g.get(yt)]=Jt.get(yt)},ue=!0,Ce=!1,we=void 0;try{for(var de=Jt.keys()[Symbol.iterator](),Ae;!(ue=(Ae=de.next()).done);ue=!0){var ge=Ae.value;$e(ge)}}catch(Gt){Ce=!0,we=Gt}finally{try{!ue&&de.return&&de.return()}finally{if(Ce)throw we}}})()}for(var Yt=0;Yt<S.length;Yt++){var Vt=S[Yt];Vt.getChild()==null&&Vt.setCenter(d[g.get(Vt.id)],C[g.get(Vt.id)])}},i.exports=o}),551:(i=>{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(45);return h})()})})(he)),he.exports}var pr=se.exports,De;function yr(){return De||(De=1,(function(L,b){(function(G,N){L.exports=N(vr())})(pr,function(A){return(()=>{var G={658:(i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,f=Array(a>1?a-1:0),e=1;e<a;e++)f[e-1]=arguments[e];return f.forEach(function(u){Object.keys(u).forEach(function(t){return r[t]=u[t]})}),r}}),548:((i,r,a)=>{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),C;!(l=(C=d.next()).done)&&(c.push(C.value),!(o&&c.length===o));l=!0);}catch(S){T=!0,g=S}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=a(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var g=l.parent()[0];g!=null;){if(s[g.id()])return!1;g=g.parent()[0]}return!0});return c},u.connectComponents=function(t,s,o,c){var l=new e,T=new Set,g=[],d=void 0,C=void 0,S=void 0,w=!1,P=1,B=[],U=[],V=function(){var _=t.collection();U.push(_);var n=o[0],E=t.collection();E.merge(n).merge(n.descendants().intersection(s)),g.push(n),E.forEach(function(y){l.push(y),T.add(y),_.merge(y)});for(var p=function(){n=l.shift();var I=t.collection();n.neighborhood().nodes().forEach(function(x){s.intersection(n.edgesWith(x)).length>0&&I.merge(x)});for(var O=0;O<I.length;O++){var R=I[O];if(d=o.intersection(R.union(R.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(x){l.push(x),T.add(x),_.merge(x),o.has(x)&&g.push(x)})}}};l.length!=0;)p();if(_.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(I){_.has(I.source())&&_.has(I.target())&&_.merge(I)})}),g.length==o.length&&(w=!0),!w||w&&P>1){C=g[0],S=C.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<S&&(S=y.connectedEdges().length,C=y)}),B.push(C.id());var m=t.collection();m.merge(g[0]),g.forEach(function(y){m.merge(y)}),g=[],o=o.difference(m),P++}};do V();while(!w);return c&&B.length>0&&c.set("dummy"+(c.size+1),B),U},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,C=!1,S=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var B=P.value,U=f(B,2),V=U[0],M=U[1],_=o.cy.getElementById(V);if(_){var n=_.boundingBox(),E=s.xCoords[M]-n.w/2,p=s.xCoords[M]+n.w/2,m=s.yCoords[M]-n.h/2,y=s.yCoords[M]+n.h/2;E<c&&(c=E),p>l&&(l=p),m<T&&(T=m),y>g&&(g=y)}}}catch(x){C=!0,S=x}finally{try{!d&&w.return&&w.return()}finally{if(C)throw S}}var I=t.x-(l+c)/2,O=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+O})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;z<c&&(c=z),X>l&&(l=X),rt<T&&(T=rt),$>g&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,C=void 0,S=void 0,w=void 0,P=void 0,B=t.descendants().not(":parent"),U=B.length,V=0;V<U;V++){var M=B[V];C=s[c.get(M.id())]-M.width()/2,S=s[c.get(M.id())]+M.width()/2,w=o[c.get(M.id())]-M.height()/2,P=o[c.get(M.id())]+M.height()/2,l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var _={};return _.topLeftX=l,_.topLeftY=g,_.width=T-l,_.height=d-g,_},u.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||o.merge(c)}),o},i.exports=u}),816:((i,r,a)=>{var f=a(548),e=a(140).CoSELayout,u=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,c=a(140).layoutBase.FDLayoutConstants,l=a(140).CoSEConstants,T=function(d,C){var S=d.cy,w=d.eles,P=w.nodes(),B=w.edges(),U=void 0,V=void 0,M=void 0,_={};d.randomize&&(U=C.nodeIndexes,V=C.xCoords,M=C.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(S,w),m=function W(x,Q,z,X){for(var rt=Q.length,$=0;$<rt;$++){var D=Q[$],H=null;D.intersection(p).length==0&&(H=D.children());var k=void 0,tt=D.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(D.outerWidth()!=null&&D.outerHeight()!=null)if(X.randomize)if(!D.isParent())k=x.add(new u(z.graphManager,new t(V[U.get(D.id())]-tt.w/2,M[U.get(D.id())]-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else{var ht=f.calcBoundingBox(D,V,M,U);D.intersection(p).length==0?k=x.add(new u(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(ht.width,ht.height))):k=x.add(new u(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(parseFloat(tt.w),parseFloat(tt.h))))}else k=x.add(new u(z.graphManager,new t(D.position("x")-tt.w/2,D.position("y")-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else k=x.add(new u(this.graphManager));if(k.id=D.data("id"),k.nodeRepulsion=E(X.nodeRepulsion,D),k.paddingLeft=parseInt(D.css("padding")),k.paddingTop=parseInt(D.css("padding")),k.paddingRight=parseInt(D.css("padding")),k.paddingBottom=parseInt(D.css("padding")),X.nodeDimensionsIncludeLabels&&(k.labelWidth=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,k.labelHeight=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,k.labelPosVertical=D.css("text-valign"),k.labelPosHorizontal=D.css("text-halign")),_[D.data("id")]=k,isNaN(k.rect.x)&&(k.rect.x=0),isNaN(k.rect.y)&&(k.rect.y=0),H!=null&&H.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,$=0;$<z.length;$++){var D=z[$],H=_[D.data("source")],k=_[D.data("target")];if(H&&k&&H!==k&&H.getEdgesBetween(k).length==0){var tt=Q.add(x.newEdge(),H,k);tt.id=D.id(),tt.idealLength=E(d.idealEdgeLength,D),tt.edgeElasticity=E(d.edgeElasticity,D),X+=tt.idealLength,rt++}}d.idealEdgeLength!=null&&(rt>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,R=O.newGraphManager();return m(R.addRoot(),f.getTopMostNodes(P),O,d),y(O,R,B),I(O,d),O.runLayout(),_};i.exports={coseLayout:T}}),212:((i,r,a)=>{var f=(function(){function d(C,S){for(var w=0;w<S.length;w++){var P=S[w];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(C,P.key,P)}}return function(C,S,w){return S&&d(C.prototype,S),w&&d(C,w),C}})();function e(d,C){if(!(d instanceof C))throw new TypeError("Cannot call a class as a function")}var u=a(658),t=a(548),s=a(657),o=s.spectralLayout,c=a(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(C){return 4500},idealEdgeLength:function(C){return 50},edgeElasticity:function(C){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function d(C){e(this,d),this.options=u({},T,C)}return f(d,[{key:"run",value:function(){var S=this,w=this.options,P=w.cy,B=w.eles,U=[],V=[],M=void 0,_=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var n=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;n&&(w.tile=!1,w.packComponents=!1);var E=void 0,p=!1;if(P.layoutUtilities&&w.packComponents&&(E=P.layoutUtilities("get"),E||(E=P.layoutUtilities()),p=!0),B.nodes().length>0)if(p){var I=t.getTopMostNodes(w.eles.nodes());if(M=t.connectComponents(P,w.eles,I),M.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&M.forEach(function(vt){w.eles=vt,U.push(o(w))}),w.quality=="default"||w.quality=="proof"){var O=P.collection();if(w.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},X=[];if(M.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){O.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),O.length>1){var rt=O.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),M.push(O),U.push(z);for(var $=X.length-1;$>=0;$--)M.splice(X[$],1),U.splice(X[$],1),_.splice(X[$],1)}}M.forEach(function(vt,it){w.eles=vt,V.push(l(w,U[it])),t.relocateComponent(_[it],V[it],w)})}else M.forEach(function(vt,it){t.relocateComponent(_[it],U[it],w)});var D=new Set;if(M.length>1){var H=[],k=B.filter(function(vt){return vt.css("display")=="none"});M.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=U[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var wt=void 0;vt.nodes().not(k).forEach(function(Ot){if(w.quality=="draft")if(!Ot.isParent())wt=ut.get(Ot.id()),Et.nodes.push({x:U[it].xCoords[wt]-Ot.boundingbox().w/2,y:U[it].yCoords[wt]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,U[it].xCoords,U[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else V[it][Ot.id()]&&Et.nodes.push({x:V[it][Ot.id()].getLeft(),y:V[it][Ot.id()].getTop(),width:V[it][Ot.id()].getWidth(),height:V[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,U[it].xCoords,U[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[it].xCoords[Rt]),Ut.push(U[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[it].xCoords,U[it].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[it].xCoords[Ht]),Pt.push(U[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else V[it][mt.id()]&&V[it][Dt.id()]&&Et.edges.push({startX:V[it][mt.id()].getCenterX(),startY:V[it][mt.id()].getCenterY(),endX:V[it][Dt.id()].getCenterX(),endY:V[it][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),D.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")U.forEach(function(vt,it){var ut=vt.xCoords.map(function(wt){return wt+tt[it].dx}),Et=vt.yCoords.map(function(wt){return wt+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;D.forEach(function(vt){Object.keys(V[vt]).forEach(function(it){var ut=V[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);U.push(y)}w.quality=="default"||w.quality=="proof"?(V.push(l(w,U[0])),t.relocateComponent(_[0],V[0],w)):t.relocateComponent(_[0],U[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,wt=void 0,Ot=it.data("id");return V.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},wt=Dt[Ot])}),w.nodeDimensionsIncludeLabels&&(wt.labelWidth&&(wt.labelPosHorizontal=="left"?Et.x+=wt.labelWidth/2:wt.labelPosHorizontal=="right"&&(Et.x-=wt.labelWidth/2)),wt.labelHeight&&(wt.labelPosVertical=="top"?Et.y+=wt.labelHeight/2:wt.labelPosVertical=="bottom"&&(Et.y-=wt.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,B),Nt=B.filter(function(vt){return vt.css("display")=="none"});w.eles=B.not(Nt),B.nodes().not(":parent").not(Nt).layoutPositions(S,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();i.exports=g}),657:((i,r,a)=>{var f=a(548),e=a(140).layoutBase.Matrix,u=a(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,C=new Map,S=new Map,w=[],P=[],B=[],U=[],V=[],M=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,O=o.nodeSeparation,R=void 0,W=function(){for(var Y=0,Z=0,K=!1;Z<R;){Y=Math.floor(Math.random()*E),K=!1;for(var q=0;q<Z;q++)if(U[q]==Y){K=!0;break}if(!K)U[Z]=Y,Z++;else continue}},x=function(Y,Z,K){for(var q=[],at=0,ct=0,nt=0,et=void 0,j=[],dt=0,At=1,pt=0;pt<E;pt++)j[pt]=p;for(q[ct]=Y,j[Y]=0;ct>=at;){nt=q[at++];for(var xt=w[nt],lt=0;lt<xt.length;lt++)et=C.get(xt[lt]),j[et]==p&&(j[et]=j[nt]+1,q[++ct]=et);M[nt][Z]=j[nt]*O}if(K){for(var ot=0;ot<E;ot++)M[ot][Z]<V[ot]&&(V[ot]=M[ot][Z]);for(var Lt=0;Lt<E;Lt++)V[Lt]>dt&&(dt=V[Lt],At=Lt)}return At},Q=function(Y){var Z=void 0;if(Y){Z=Math.floor(Math.random()*E);for(var q=0;q<E;q++)V[q]=p;for(var at=0;at<R;at++)U[at]=Z,Z=x(Z,at,Y)}else{W();for(var K=0;K<R;K++)x(U[K],K,Y)}for(var ct=0;ct<E;ct++)for(var nt=0;nt<R;nt++)M[ct][nt]*=M[ct][nt];for(var et=0;et<R;et++)_[et]=[];for(var j=0;j<R;j++)for(var dt=0;dt<R;dt++)_[j][dt]=M[U[dt]][j]},z=function(){for(var Y=u.svd(_),Z=Y.S,K=Y.U,q=Y.V,at=Z[0]*Z[0]*Z[0],ct=[],nt=0;nt<R;nt++){ct[nt]=[];for(var et=0;et<R;et++)ct[nt][et]=0,nt==et&&(ct[nt][et]=Z[nt]/(Z[nt]*Z[nt]+at/(Z[nt]*Z[nt])))}n=e.multMat(e.multMat(q,ct),e.transpose(K))},X=function(){for(var Y=void 0,Z=void 0,K=[],q=[],at=[],ct=[],nt=0;nt<E;nt++)K[nt]=Math.random(),q[nt]=Math.random();K=e.normalize(K),q=e.normalize(q);for(var et=m,j=m,dt=void 0;;){for(var At=0;At<E;At++)at[At]=K[At];if(K=e.multGamma(e.multL(e.multGamma(at),M,n)),Y=e.dotProduct(at,K),K=e.normalize(K),et=e.dotProduct(at,K),dt=Math.abs(et/j),dt<=1+y&&dt>=1)break;j=et}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(j=m;;){for(var xt=0;xt<E;xt++)ct[xt]=q[xt];if(ct=e.minusOp(ct,e.multCons(at,e.dotProduct(at,ct))),q=e.multGamma(e.multL(e.multGamma(ct),M,n)),Z=e.dotProduct(ct,q),q=e.normalize(q),et=e.dotProduct(ct,q),dt=Math.abs(et/j),dt<=1+y&&dt>=1)break;j=et}for(var lt=0;lt<E;lt++)ct[lt]=q[lt];P=e.multCons(at,Math.sqrt(Math.abs(Y))),B=e.multCons(ct,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,l,f.getTopMostNodes(T),d),g.forEach(function(F){f.connectComponents(c,l,f.getTopMostNodes(F.descendants().intersection(l)),d)});for(var rt=0,$=0;$<T.length;$++)T[$].isParent()||C.set(T[$].id(),rt++);var D=!0,H=!1,k=void 0;try{for(var tt=d.keys()[Symbol.iterator](),ht;!(D=(ht=tt.next()).done);D=!0){var J=ht.value;C.set(J,rt++)}}catch(F){H=!0,k=F}finally{try{!D&&tt.return&&tt.return()}finally{if(H)throw k}}for(var It=0;It<C.size;It++)w[It]=[];g.forEach(function(F){for(var Y=F.children().intersection(l);Y.nodes(":childless").length==0;)Y=Y.nodes()[0].children().intersection(l);var Z=0,K=Y.nodes(":childless")[0].connectedEdges().length;Y.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,Z=at)}),S.set(F.id(),Y.nodes(":childless")[Z].id())}),T.forEach(function(F){var Y=void 0;F.isParent()?Y=C.get(S.get(F.id())):Y=C.get(F.id()),F.neighborhood().nodes().forEach(function(Z){l.intersection(F.edgesWith(Z)).length>0&&(Z.isParent()?w[Y].push(S.get(Z.id())):w[Y].push(Z.id()))})});var Nt=function(Y){var Z=C.get(Y),K=void 0;d.get(Y).forEach(function(q){c.getElementById(q).isParent()?K=S.get(q):K=q,w[Z].push(K),w[C.get(K)].push(Y)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),wt;!(vt=(wt=Et.next()).done);vt=!0){var Ot=wt.value;Nt(Ot)}}catch(F){it=!0,ut=F}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=C.size;var mt=void 0;if(E>2){R=E<o.sampleSize?E:o.sampleSize;for(var Dt=0;Dt<E;Dt++)M[Dt]=[];for(var Rt=0;Rt<R;Rt++)n[Rt]=[];return o.quality=="draft"||o.step=="all"?(Q(I),z(),X(),mt={nodeIndexes:C,xCoords:P,yCoords:B}):(C.forEach(function(F,Y){P.push(c.getElementById(Y).position("x")),B.push(c.getElementById(Y).position("y"))}),mt={nodeIndexes:C,xCoords:P,yCoords:B}),mt}else{var Ht=C.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(P.push(Pt.x),B.push(Pt.y),E==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();P.push(Pt.x+Ft/2+Vt/2+o.idealEdgeLength),B.push(Pt.y)}return mt={nodeIndexes:C,xCoords:P,yCoords:B},mt}};i.exports={spectralLayout:t}}),579:((i,r,a)=>{var f=a(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),i.exports=e}),140:(i=>{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(579);return h})()})})(se)),se.exports}var mr=yr();const Er=cr(mr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:gt(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:gt(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:gt(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:gt(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},oe={L:gt((L,b)=>L-b+2,"L"),R:gt((L,b)=>L-2,"R"),T:gt((L,b)=>L-b+2,"T"),B:gt((L,b)=>L-2,"B")},Tr=gt(function(L){return Wt(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=gt(function(L){const b=L;return b==="L"||b==="R"||b==="T"||b==="B"},"isArchitectureDirection"),Wt=gt(function(L){const b=L;return b==="L"||b==="R"},"isArchitectureDirectionX"),qt=gt(function(L){const b=L;return b==="T"||b==="B"},"isArchitectureDirectionY"),Te=gt(function(L,b){const A=Wt(L)&&qt(b),G=qt(L)&&Wt(b);return A||G},"isArchitectureDirectionXY"),Nr=gt(function(L){const b=L[0],A=L[1],G=Wt(b)&&qt(A),N=qt(b)&&Wt(A);return G||N},"isArchitecturePairXY"),Lr=gt(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),pe=gt(function(L,b){const A=`${L}${b}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=gt(function([L,b],A){const G=A[0],N=A[1];return Wt(G)?qt(N)?[L+(G==="L"?-1:1),b+(N==="T"?1:-1)]:[L+(G==="L"?-1:1),b]:Wt(N)?[L+(N==="L"?1:-1),b+(G==="T"?1:-1)]:[L,b+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),wr=gt(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=gt(function(L,b){return Te(L,b)?"bend":Wt(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=gt(function(L){return L.type==="service"},"isArchitectureService"),Or=gt(function(L){return L.type==="junction"},"isArchitectureJunction"),be=gt(L=>L.data(),"edgeData"),ie=gt(L=>L.data(),"nodeData"),Dr=ar.architecture,Pe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}static{gt(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:L,icon:b,in:A,title:G,iconText:N}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[A]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:b,iconText:N,title:G,edges:[],in:A}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:L,in:b}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(b!==void 0){if(L===b)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[b]==="node")throw new Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:b,in:A,title:G}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[A]===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[A]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:b,title:G,in:A}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:b,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(A)}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(G)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[b]===void 0&&this.groups[b]===void 0)throw new Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);const a=this.nodes[L].in,f=this.nodes[b].in;if(h&&a&&f&&a==f)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&a&&f&&a==f)throw new Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:L,lhsDir:A,lhsInto:N,lhsGroup:h,rhsId:b,rhsDir:G,rhsInto:v,rhsGroup:i,title:r};this.edges.push(e),this.nodes[L]&&this.nodes[b]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw new Error(`An align directive requires at least two members; got ${L.members.length}`);const b=new Set;L.members.forEach(A=>{if(this.registeredIds[A]!=="node")throw new Error(`align ${L.direction} references [${A}], which is not a service or junction`);if(b.has(A))throw new Error(`align ${L.direction} lists [${A}] more than once`);b.add(A)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const L={},b=Object.entries(this.nodes).reduce((i,[r,a])=>(i[r]=a.edges.reduce((f,e)=>{const u=this.getNode(e.lhsId)?.in,t=this.getNode(e.rhsId)?.in;if(u&&t&&u!==t){const s=Ar(e.lhsDir,e.rhsDir);s!=="bend"&&(L[u]??={},L[u][t]=s,L[t]??={},L[t][u]=s)}if(e.lhsId===r){const s=pe(e.lhsDir,e.rhsDir);s&&(f[s]=e.rhsId)}else{const s=pe(e.rhsDir,e.lhsDir);s&&(f[s]=e.lhsId)}return f},{}),i),{}),A=Object.keys(b)[0],G={[A]:1},N=Object.keys(b).reduce((i,r)=>r===A?i:{...i,[r]:1},{}),v=gt(i=>{const r={[i]:[0,0]},a=[i];for(;a.length>0;){const f=a.shift();if(f){G[f]=1,delete N[f];const e=b[f],[u,t]=r[f];Object.entries(e).forEach(([s,o])=>{G[o]||(r[o]=Cr([u,t],s),a.push(o))})}}return r},"BFS"),h=[v(A)];for(;Object.keys(N).length>0;)h.push(v(Object.keys(N)[0]));this.dataStructures={adjList:b,spatialMaps:h,groupAlignments:L}}return this.dataStructures}setElementForId(L,b){this.elements[L]=b}getElementById(L){return this.elements[L]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(L){return this.getConfig()[L]}},xr=gt((L,b)=>{ke(L,b),L.groups.map(A=>b.addGroup(A)),L.services.map(A=>b.addService({...A,type:"service"})),L.junctions.map(A=>b.addJunction({...A,type:"junction"})),L.edges.map(A=>b.addEdge(A)),L.alignments?.map(A=>b.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ge={parser:{yy:void 0},parse:gt(async L=>{const b=await fr("architecture",L);Se.debug(b);const A=Ge.parser?.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(b,A)},"parse")},Ir=gt(L=>` +import{p as ke}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{_ as gt,F as Ze,ad as qe,l as Se,b as Qe,a as Je,o as Ke,p as je,g as _e,s as tr,q as er,B as rr,z as ir,D as ar,c as me,a$ as Ee,ai as ve,i as nr,d as or,r as sr,aj as hr,b7 as lr}from"./mermaid.core-BKBZnrB_.js";import{p as fr}from"./cynefin-VYW2F7L2-BGL2vhde.js";import{c as Fe}from"./cytoscape.esm-OyMbaexL.js";import{g as cr}from"./_commonjsHelpers-CqkleIqs.js";import"./index-yKYHPeXU.js";var se={exports:{}},he={exports:{}},le={exports:{}},gr=le.exports,Me;function ur(){return Me||(Me=1,(function(L,b){(function(G,N){L.exports=N()})(gr,function(){return(function(A){var G={};function N(v){if(G[v])return G[v].exports;var h=G[v]={i:v,l:!1,exports:{}};return A[v].call(h.exports,h,h.exports,N),h.l=!0,h.exports}return N.m=A,N.c=G,N.i=function(v){return v},N.d=function(v,h,i){N.o(v,h)||Object.defineProperty(v,h,{configurable:!1,enumerable:!0,get:i})},N.n=function(v){var h=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(h,"a",h),h},N.o=function(v,h){return Object.prototype.hasOwnProperty.call(v,h)},N.p="",N(N.s=28)})([(function(A,G,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,A.exports=v}),(function(A,G,N){var v=N(2),h=N(8),i=N(9);function r(f,e,u){v.call(this,u),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=u,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var a in v)r[a]=v[a];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var u=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(u.getOwner()==e)return u;if(u.getOwner()==t)break;u=u.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},A.exports=r}),(function(A,G,N){function v(h){this.vGraphObject=h}A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(13),r=N(0),a=N(16),f=N(5);function e(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new i(s.x,s.y,o.width,o.height):this.rect=new i}e.prototype=Object.create(v.prototype);for(var u in v)e[u]=v[u];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},e.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},e.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},e.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;l<c.length;l++)s=c[l],o=s.withChildren(),o.forEach(function(T){t.add(T)});return t},e.prototype.getNoOfChildren=function(){var t=0,s;if(this.child==null)t=1;else for(var o=this.child.getNodes(),c=0;c<o.length;c++)s=o[c],t+=s.getNoOfChildren();return t==0&&(t=1),t},e.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},e.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},e.prototype.scatter=function(){var t,s,o=-r.INITIAL_WORLD_BOUNDARY,c=r.INITIAL_WORLD_BOUNDARY;t=r.WORLD_CENTER_X+a.nextDouble()*(c-o)+o;var l=-r.INITIAL_WORLD_BOUNDARY,T=r.INITIAL_WORLD_BOUNDARY;s=r.WORLD_CENTER_Y+a.nextDouble()*(T-l)+l,this.rect.x=t,this.rect.y=s},e.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),r.NODE_DIMENSIONS_INCLUDE_LABELS){var s=t.getRight()-t.getLeft(),o=t.getBottom()-t.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(s+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>s?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=e}),(function(A,G,N){var v=N(0);function h(){}for(var i in v)h[i]=v[i];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=h}),(function(A,G,N){function v(h,i){h==null&&i==null?(this.x=0,this.y=0):(this.x=h,this.y=i)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(h){this.x=h},v.prototype.setY=function(h){this.y=h},v.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},A.exports=v}),(function(A,G,N){var v=N(2),h=N(10),i=N(0),r=N(7),a=N(3),f=N(1),e=N(13),u=N(12),t=N(11);function s(c,l,T){v.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof a){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,C=0;C<d;C++)g=T[C],g.isInterGraph?this.graphManager.remove(g):g.source.owner.remove(g);var S=this.nodes.indexOf(l);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(c instanceof f){var g=c;if(g==null)throw"Edge is null!";if(!(g.source!=null&&g.target!=null))throw"Source and/or target is null!";if(!(g.source.owner!=null&&g.target.owner!=null&&g.source.owner==this&&g.target.owner==this))throw"Source and/or target owner is invalid!";var w=g.source.edges.indexOf(g),P=g.target.edges.indexOf(g);if(!(w>-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(w,1),g.target!=g.source&&g.target.edges.splice(P,1);var S=g.source.owner.getEdges().indexOf(g);if(S==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,C=this.getNodes(),S=C.length,w=0;w<S;w++){var P=C[w];T=P.getTop(),g=P.getLeft(),c>T&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?d=C[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new u(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,C,S,w,P,B,U=this.nodes,V=U.length,M=0;M<V;M++){var _=U[M];c&&_.child!=null&&_.updateBounds(),C=_.getLeft(),S=_.getRight(),w=_.getTop(),P=_.getBottom(),l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var n=new e(l,g,T-l,d-g);l==h.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),U[0].getParent().paddingLeft!=null?B=U[0].getParent().paddingLeft:B=this.margin,this.left=n.x-B,this.right=n.x+n.width+B,this.top=n.y-B,this.bottom=n.y+n.height+B},s.calculateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,C,S,w,P,B=c.length,U=0;U<B;U++){var V=c[U];C=V.getLeft(),S=V.getRight(),w=V.getTop(),P=V.getBottom(),l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var M=new e(l,g,T-l,d-g);return M},s.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},s.prototype.getEstimatedSize=function(){if(this.estimatedSize==h.MIN_VALUE)throw"assert failed";return this.estimatedSize},s.prototype.calcEstimatedSize=function(){for(var c=0,l=this.nodes,T=l.length,g=0;g<T;g++){var d=l[g];c+=d.calcEstimatedSize()}return c==0?this.estimatedSize=i.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=c/Math.sqrt(this.nodes.length),this.estimatedSize},s.prototype.updateConnected=function(){var c=this;if(this.nodes.length==0){this.isConnected=!0;return}var l=new t,T=new Set,g=this.nodes[0],d,C,S=g.withChildren();for(S.forEach(function(M){l.push(M),T.add(M)});l.length!==0;){g=l.shift(),d=g.getEdges();for(var w=d.length,P=0;P<w;P++){var B=d[P];if(C=B.getOtherEndInGraph(g,this),C!=null&&!T.has(C)){var U=C.withChildren();U.forEach(function(M){l.push(M),T.add(M)})}}}if(this.isConnected=!1,T.size>=this.nodes.length){var V=0;T.forEach(function(M){M.owner==c&&V++}),V==this.nodes.length&&(this.isConnected=!0)}},A.exports=s}),(function(A,G,N){var v,h=N(1);function i(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),a=this.layout.newNode(null),f=this.add(r,a);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,a,f,e,u){if(f==null&&e==null&&u==null){if(r==null)throw"Graph is null!";if(a==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(a.child!=null)throw"Already has a child!";return r.parent=a,a.child=r,r}else{u=f,e=a,f=r;var t=e.getOwner(),s=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,e,u);if(f.isInterGraph=!0,f.source=e,f.target=u,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof v){var a=r;if(a.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(a==this.rootGraph||a.parent!=null&&a.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(a.getEdges());for(var e,u=f.length,t=0;t<u;t++)e=f[t],a.remove(e);var s=[];s=s.concat(a.getNodes());var o;u=s.length;for(var t=0;t<u;t++)o=s[t],a.remove(o);a==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(a);this.graphs.splice(c,1),a.parent=null}else if(r instanceof h){if(e=r,e==null)throw"Edge is null!";if(!e.isInterGraph)throw"Not an inter-graph edge!";if(!(e.source!=null&&e.target!=null))throw"Source and/or target is null!";if(!(e.source.edges.indexOf(e)!=-1&&e.target.edges.indexOf(e)!=-1))throw"Source and/or target doesn't know this edge!";var c=e.source.edges.indexOf(e);if(e.source.edges.splice(c,1),c=e.target.edges.indexOf(e),e.target.edges.splice(c,1),!(e.source.owner!=null&&e.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(e.source.owner.getGraphManager().edges.indexOf(e)==-1)throw"Not in owner graph manager's edge list!";var c=e.source.owner.getGraphManager().edges.indexOf(e);e.source.owner.getGraphManager().edges.splice(c,1)}},i.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},i.prototype.getGraphs=function(){return this.graphs},i.prototype.getAllNodes=function(){if(this.allNodes==null){for(var r=[],a=this.getGraphs(),f=a.length,e=0;e<f;e++)r=r.concat(a[e].getNodes());this.allNodes=r}return this.allNodes},i.prototype.resetAllNodes=function(){this.allNodes=null},i.prototype.resetAllEdges=function(){this.allEdges=null},i.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},i.prototype.getAllEdges=function(){if(this.allEdges==null){var r=[],a=this.getGraphs();a.length;for(var f=0;f<a.length;f++)r=r.concat(a[f].getEdges());r=r.concat(this.edges),this.allEdges=r}return this.allEdges},i.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},i.prototype.setAllNodesToApplyGravitation=function(r){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=r},i.prototype.getRoot=function(){return this.rootGraph},i.prototype.setRootGraph=function(r){if(r.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=r,r.parent==null&&(r.parent=this.layout.newNode("Root node"))},i.prototype.getLayout=function(){return this.layout},i.prototype.isOneAncestorOfOther=function(r,a){if(!(r!=null&&a!=null))throw"assert failed";if(r==a)return!0;var f=r.getOwner(),e;do{if(e=f.getParent(),e==null)break;if(e==a)return!0;if(f=e.getOwner(),f==null)break}while(!0);f=a.getOwner();do{if(e=f.getParent(),e==null)break;if(e==r)return!0;if(f=e.getOwner(),f==null)break}while(!0);return!1},i.prototype.calcLowestCommonAncestors=function(){for(var r,a,f,e,u,t=this.getAllEdges(),s=t.length,o=0;o<s;o++){if(r=t[o],a=r.source,f=r.target,r.lca=null,r.sourceInLca=a,r.targetInLca=f,a==f){r.lca=a.getOwner();continue}for(e=a.getOwner();r.lca==null;){for(r.targetInLca=f,u=f.getOwner();r.lca==null;){if(u==e){r.lca=u;break}if(u==this.rootGraph)break;if(r.lca!=null)throw"assert failed";r.targetInLca=u.getParent(),u=r.targetInLca.getOwner()}if(e==this.rootGraph)break;r.lca==null&&(r.sourceInLca=e.getParent(),e=r.sourceInLca.getOwner())}if(r.lca==null)throw"assert failed"}},i.prototype.calcLowestCommonAncestor=function(r,a){if(r==a)return r.getOwner();var f=r.getOwner();do{if(f==null)break;var e=a.getOwner();do{if(e==null)break;if(e==f)return e;e=e.getParent().getOwner()}while(!0);f=f.getParent().getOwner()}while(!0);return f},i.prototype.calcInclusionTreeDepths=function(r,a){r==null&&a==null&&(r=this.rootGraph,a=1);for(var f,e=r.getNodes(),u=e.length,t=0;t<u;t++)f=e[t],f.inclusionTreeDepth=a,f.child!=null&&this.calcInclusionTreeDepths(f.child,a+1)},i.prototype.includesInvalidEdge=function(){for(var r,a=[],f=this.edges.length,e=0;e<f;e++)r=this.edges[e],this.isOneAncestorOfOther(r.source,r.target)&&a.push(r);for(var e=0;e<a.length;e++)this.remove(a[e]);return!1},A.exports=i}),(function(A,G,N){var v=N(12);function h(){}h.calcSeparationAmount=function(i,r,a,f){if(!i.intersects(r))throw"assert failed";var e=new Array(2);this.decideDirectionsForOverlappingNodes(i,r,e),a[0]=Math.min(i.getRight(),r.getRight())-Math.max(i.x,r.x),a[1]=Math.min(i.getBottom(),r.getBottom())-Math.max(i.y,r.y),i.getX()<=r.getX()&&i.getRight()>=r.getRight()?a[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(a[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?a[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(a[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var u=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(u=1);var t=u*a[0],s=a[1]/u;a[0]<s?s=a[0]:t=a[1],a[0]=-1*e[0]*(s/2+f),a[1]=-1*e[1]*(t/2+f)},h.decideDirectionsForOverlappingNodes=function(i,r,a){i.getCenterX()<r.getCenterX()?a[0]=-1:a[0]=1,i.getCenterY()<r.getCenterY()?a[1]=-1:a[1]=1},h.getIntersection2=function(i,r,a){var f=i.getCenterX(),e=i.getCenterY(),u=r.getCenterX(),t=r.getCenterY();if(i.intersects(r))return a[0]=f,a[1]=e,a[2]=u,a[3]=t,!0;var s=i.getX(),o=i.getY(),c=i.getRight(),l=i.getX(),T=i.getBottom(),g=i.getRight(),d=i.getWidthHalf(),C=i.getHeightHalf(),S=r.getX(),w=r.getY(),P=r.getRight(),B=r.getX(),U=r.getBottom(),V=r.getRight(),M=r.getWidthHalf(),_=r.getHeightHalf(),n=!1,E=!1;if(f===u){if(e>t)return a[0]=f,a[1]=o,a[2]=u,a[3]=U,!1;if(e<t)return a[0]=f,a[1]=T,a[2]=u,a[3]=w,!1}else if(e===t){if(f>u)return a[0]=s,a[1]=e,a[2]=P,a[3]=t,!1;if(f<u)return a[0]=c,a[1]=e,a[2]=S,a[3]=t,!1}else{var p=i.height/i.width,m=r.height/r.width,y=(t-e)/(u-f),I=void 0,O=void 0,R=void 0,W=void 0,x=void 0,Q=void 0;if(-p===y?f>u?(a[0]=l,a[1]=T,n=!0):(a[0]=c,a[1]=o,n=!0):p===y&&(f>u?(a[0]=s,a[1]=o,n=!0):(a[0]=g,a[1]=T,n=!0)),-m===y?u>f?(a[2]=B,a[3]=U,E=!0):(a[2]=P,a[3]=w,E=!0):m===y&&(u>f?(a[2]=S,a[3]=w,E=!0):(a[2]=V,a[3]=U,E=!0)),n&&E)return!1;if(f>u?e>t?(I=this.getCardinalDirection(p,y,4),O=this.getCardinalDirection(m,y,2)):(I=this.getCardinalDirection(-p,y,3),O=this.getCardinalDirection(-m,y,1)):e>t?(I=this.getCardinalDirection(-p,y,1),O=this.getCardinalDirection(-m,y,3)):(I=this.getCardinalDirection(p,y,2),O=this.getCardinalDirection(m,y,4)),!n)switch(I){case 1:W=o,R=f+-C/y,a[0]=R,a[1]=W;break;case 2:R=g,W=e+d*y,a[0]=R,a[1]=W;break;case 3:W=T,R=f+C/y,a[0]=R,a[1]=W;break;case 4:R=l,W=e+-d*y,a[0]=R,a[1]=W;break}if(!E)switch(O){case 1:Q=w,x=u+-_/y,a[2]=x,a[3]=Q;break;case 2:x=V,Q=t+M*y,a[2]=x,a[3]=Q;break;case 3:Q=U,x=u+_/y,a[2]=x,a[3]=Q;break;case 4:x=B,Q=t+-M*y,a[2]=x,a[3]=Q;break}}return!1},h.getCardinalDirection=function(i,r,a){return i>r?a:1+a%4},h.getIntersection=function(i,r,a,f){if(f==null)return this.getIntersection2(i,r,a);var e=i.x,u=i.y,t=r.x,s=r.y,o=a.x,c=a.y,l=f.x,T=f.y,g=void 0,d=void 0,C=void 0,S=void 0,w=void 0,P=void 0,B=void 0,U=void 0,V=void 0;return C=s-u,w=e-t,B=t*u-e*s,S=T-c,P=o-l,U=l*c-o*T,V=C*P-S*w,V===0?null:(g=(w*U-P*B)/V,d=(S*B-C*U)/V,new v(g,d))},h.angleOfVector=function(i,r,a,f){var e=void 0;return i!==a?(e=Math.atan((f-r)/(a-i)),a<i?e+=Math.PI:f<r&&(e+=this.TWO_PI)):f<r?e=this.ONE_AND_HALF_PI:e=this.HALF_PI,e},h.doIntersect=function(i,r,a,f){var e=i.x,u=i.y,t=r.x,s=r.y,o=a.x,c=a.y,l=f.x,T=f.y,g=(t-e)*(T-c)-(l-o)*(s-u);if(g===0)return!1;var d=((T-c)*(l-e)+(o-l)*(T-u))/g,C=((u-s)*(l-e)+(t-e)*(T-u))/g;return 0<d&&d<1&&0<C&&C<1},h.findCircleLineIntersections=function(i,r,a,f,e,u,t){var s=(a-i)*(a-i)+(f-r)*(f-r),o=2*((i-e)*(a-i)+(r-u)*(f-r)),c=(i-e)*(i-e)+(r-u)*(r-u)-t*t,l=o*o-4*s*c;if(l>=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,A.exports=h}),(function(A,G,N){function v(){}v.sign=function(h){return h>0?1:h<0?-1:0},v.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},v.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},A.exports=v}),(function(A,G,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,A.exports=v}),(function(A,G,N){var v=(function(){function e(u,t){for(var s=0;s<t.length;s++){var o=t[s];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(u,o.key,o)}}return function(u,t,s){return t&&e(u.prototype,t),s&&e(u,s),u}})();function h(e,u){if(!(e instanceof u))throw new TypeError("Cannot call a class as a function")}var i=function(u){return{value:u,next:null,prev:null}},r=function(u,t,s,o){return u!==null?u.next=t:o.head=t,s!==null?s.prev=t:o.tail=t,t.prev=u,t.next=s,o.length++,t},a=function(u,t){var s=u.prev,o=u.next;return s!==null?s.next=o:t.head=o,o!==null?o.prev=s:t.tail=s,u.prev=u.next=null,t.length--,u},f=(function(){function e(u){var t=this;h(this,e),this.length=0,this.head=null,this.tail=null,u?.forEach(function(s){return t.push(s)})}return v(e,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,s){return r(s.prev,i(t),s,this)}},{key:"insertAfter",value:function(t,s){return r(s,i(t),s.next,this)}},{key:"insertNodeBefore",value:function(t,s){return r(s.prev,t,s,this)}},{key:"insertNodeAfter",value:function(t,s){return r(s,t,s.next,this)}},{key:"push",value:function(t){return r(this.tail,i(t),null,this)}},{key:"unshift",value:function(t){return r(null,i(t),this.head,this)}},{key:"remove",value:function(t){return a(t,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var s=1,o=this.head;s<t;)o=o.next,s++;return o.value}}},{key:"set_object_at",value:function(t,s){if(t<=this.length()){for(var o=1,c=this.head;o<t;)c=c.next,o++;c.value=s}}}]),e})();A.exports=f}),(function(A,G,N){function v(h,i,r){this.x=null,this.y=null,h==null&&i==null&&r==null?(this.x=0,this.y=0):typeof h=="number"&&typeof i=="number"&&r==null?(this.x=h,this.y=i):h.constructor.name=="Point"&&i==null&&r==null&&(r=h,this.x=r.x,this.y=r.y)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.getLocation=function(){return new v(this.x,this.y)},v.prototype.setLocation=function(h,i,r){h.constructor.name=="Point"&&i==null&&r==null?(r=h,this.setLocation(r.x,r.y)):typeof h=="number"&&typeof i=="number"&&r==null&&(parseInt(h)==h&&parseInt(i)==i?this.move(h,i):(this.x=Math.floor(h+.5),this.y=Math.floor(i+.5)))},v.prototype.move=function(h,i){this.x=h,this.y=i},v.prototype.translate=function(h,i){this.x+=h,this.y+=i},v.prototype.equals=function(h){if(h.constructor.name=="Point"){var i=h;return this.x==i.x&&this.y==i.y}return this==h},v.prototype.toString=function(){return new v().constructor.name+"[x="+this.x+",y="+this.y+"]"},A.exports=v}),(function(A,G,N){function v(h,i,r,a){this.x=0,this.y=0,this.width=0,this.height=0,h!=null&&i!=null&&r!=null&&a!=null&&(this.x=h,this.y=i,this.width=r,this.height=a)}v.prototype.getX=function(){return this.x},v.prototype.setX=function(h){this.x=h},v.prototype.getY=function(){return this.y},v.prototype.setY=function(h){this.y=h},v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},v.prototype.getRight=function(){return this.x+this.width},v.prototype.getBottom=function(){return this.y+this.height},v.prototype.intersects=function(h){return!(this.getRight()<h.x||this.getBottom()<h.y||h.getRight()<this.x||h.getBottom()<this.y)},v.prototype.getCenterX=function(){return this.x+this.width/2},v.prototype.getMinX=function(){return this.getX()},v.prototype.getMaxX=function(){return this.getX()+this.width},v.prototype.getCenterY=function(){return this.y+this.height/2},v.prototype.getMinY=function(){return this.getY()},v.prototype.getMaxY=function(){return this.getY()+this.height},v.prototype.getWidthHalf=function(){return this.width/2},v.prototype.getHeightHalf=function(){return this.height/2},A.exports=v}),(function(A,G,N){var v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i};function h(){}h.lastID=0,h.createID=function(i){return h.isPrimitive(i)?i:(i.uniqueID!=null||(i.uniqueID=h.getString(),h.lastID++),i.uniqueID)},h.getString=function(i){return i==null&&(i=h.lastID),"Object#"+i},h.isPrimitive=function(i){var r=typeof i>"u"?"undefined":v(i);return i==null||r!="object"&&r!="function"},A.exports=h}),(function(A,G,N){function v(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c<o.length;c++)l[c]=o[c];return l}else return Array.from(o)}var h=N(0),i=N(7),r=N(3),a=N(1),f=N(6),e=N(5),u=N(17),t=N(29);function s(o){t.call(this),this.layoutQuality=h.QUALITY,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=h.DEFAULT_INCREMENTAL,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new i(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,o!=null&&(this.isRemoteUse=o)}s.RANDOM_SEED=1,s.prototype=Object.create(t.prototype),s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},s.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},s.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},s.prototype.newGraphManager=function(){var o=new i(this);return this.graphManager=o,o},s.prototype.newGraph=function(o){return new f(null,this.graphManager,o)},s.prototype.newNode=function(o){return new r(this.graphManager,o)},s.prototype.newEdge=function(o){return new a(null,null,o)},s.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},s.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var o;return this.checkLayoutSuccess()?o=!1:o=this.layout(),h.ANIMATE==="during"?!1:(o&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,o)},s.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},s.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var o=this.graphManager.getAllEdges(),c=0;c<o.length;c++)o[c];for(var l=this.graphManager.getRoot().getNodes(),c=0;c<l.length;c++)l[c];this.update(this.graphManager.getRoot())}},s.prototype.update=function(o){if(o==null)this.update2();else if(o instanceof r){var c=o;if(c.getChild()!=null)for(var l=c.getChild().getNodes(),T=0;T<l.length;T++)update(l[T]);if(c.vGraphObject!=null){var g=c.vGraphObject;g.update(c)}}else if(o instanceof a){var d=o;if(d.vGraphObject!=null){var C=d.vGraphObject;C.update(d)}}else if(o instanceof f){var S=o;if(S.vGraphObject!=null){var w=S.vGraphObject;w.update(S)}}},s.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=h.QUALITY,this.animationDuringLayout=h.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=h.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=h.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=h.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=h.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=h.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},s.prototype.transform=function(o){if(o==null)this.transform(new e(0,0));else{var c=new u,l=this.graphManager.getRoot().updateLeftTop();if(l!=null){c.setWorldOrgX(o.x),c.setWorldOrgY(o.y),c.setDeviceOrgX(l.x),c.setDeviceOrgY(l.y);for(var T=this.getAllNodes(),g,d=0;d<T.length;d++)g=T[d],g.transform(c)}}},s.prototype.positionNodesRandomly=function(o){if(o==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var c,l,T=o.getNodes(),g=0;g<T.length;g++)c=T[g],l=c.getChild(),l==null||l.getNodes().length==0?c.scatter():(this.positionNodesRandomly(l),c.updateBounds())},s.prototype.getFlatForest=function(){for(var o=[],c=!0,l=this.graphManager.getRoot().getNodes(),T=!0,g=0;g<l.length;g++)l[g].getChild()!=null&&(T=!1);if(!T)return o;var d=new Set,C=[],S=new Map,w=[];for(w=w.concat(l);w.length>0&&c;){for(C.push(w[0]);C.length>0&&c;){var P=C[0];C.splice(0,1),d.add(P);for(var B=P.getEdges(),g=0;g<B.length;g++){var U=B[g].getOtherEnd(P);if(S.get(P)!=U)if(!d.has(U))C.push(U),S.set(U,P);else{c=!1;break}}}if(!c)o=[];else{var V=[].concat(v(d));o.push(V);for(var g=0;g<V.length;g++){var M=V[g],_=w.indexOf(M);_>-1&&w.splice(_,1)}d=new Set,S=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g<o.bendpoints.length;g++){var d=this.newNode(null);d.setRect(new Point(0,0),new Dimension(1,1)),T.add(d);var C=this.newEdge(null);this.graphManager.add(C,l,d),c.add(d),l=d}var C=this.newEdge(null);return this.graphManager.add(C,l,o.target),this.edgeToDummyNodes.set(o,c),o.isInterGraph()?this.graphManager.remove(o):T.remove(o),c},s.prototype.createBendpointsFromDummyNodes=function(){var o=[];o=o.concat(this.graphManager.getAllEdges()),o=[].concat(v(this.edgeToDummyNodes.keys())).concat(o);for(var c=0;c<o.length;c++){var l=o[c];if(l.bendpoints.length>0){for(var T=this.edgeToDummyNodes.get(l),g=0;g<T.length;g++){var d=T[g],C=new e(d.getCenterX(),d.getCenterY()),S=l.bendpoints.get(g);S.x=C.x,S.y=C.y,d.getOwner().remove(d)}this.graphManager.add(l,l.source,l.target)}}},s.transform=function(o,c,l,T){if(l!=null&&T!=null){var g=c;if(o<=50){var d=c/l;g-=(c-d)/50*(50-o)}else{var C=c*T;g+=(C-c)/50*(o-50)}return g}else{var S,w;return o<=50?(S=9*c/500,w=c/10):(S=9*c/50,w=-8*c),S*o+w}},s.findCenterOfTree=function(o){var c=[];c=c.concat(o);var l=[],T=new Map,g=!1,d=null;(c.length==1||c.length==2)&&(g=!0,d=c[0]);for(var C=0;C<c.length;C++){var S=c[C],w=S.getNeighborsList().size;T.set(S,S.getNeighborsList().size),w==1&&l.push(S)}var P=[];for(P=P.concat(l);!g;){var B=[];B=B.concat(P),P=[];for(var C=0;C<c.length;C++){var S=c[C],U=c.indexOf(S);U>=0&&c.splice(U,1);var V=S.getNeighborsList();V.forEach(function(n){if(l.indexOf(n)<0){var E=T.get(n),p=E-1;p==1&&P.push(n),T.set(n,p)}})}l=l.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s}),(function(A,G,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},A.exports=v}),(function(A,G,N){var v=N(5);function h(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(i){this.lworldExtX=i},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(i){this.lworldExtY=i},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},h.prototype.transformX=function(i){var r=0,a=this.lworldExtX;return a!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/a),r},h.prototype.transformY=function(i){var r=0,a=this.lworldExtY;return a!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/a),r},h.prototype.inverseTransformX=function(i){var r=0,a=this.ldeviceExtX;return a!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/a),r},h.prototype.inverseTransformY=function(i){var r=0,a=this.ldeviceExtY;return a!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/a),r},h.prototype.inverseTransformPoint=function(i){var r=new v(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=h}),(function(A,G,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);s<t.length;s++)o[s]=t[s];return o}else return Array.from(t)}var h=N(15),i=N(4),r=N(0),a=N(8),f=N(9);function e(){h.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}e.prototype=Object.create(h.prototype);for(var u in h)e[u]=h[u];e.prototype.initParameters=function(){h.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},e.prototype.calcIdealEdgeLengths=function(){for(var t,s,o,c,l,T,g,d=this.getGraphManager().getAllEdges(),C=0;C<d.length;C++)t=d[C],s=t.idealLength,t.isInterGraph&&(c=t.getSource(),l=t.getTarget(),T=t.getSourceInLca().getEstimatedSize(),g=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=T+g-2*r.SIMPLE_NODE_SIZE),o=t.getLca().getInclusionTreeDepth(),t.idealLength+=s*i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(c.getInclusionTreeDepth()+l.getInclusionTreeDepth()-2*o))},e.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>i.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o<t.length;o++)s=t[o],this.calcSpringForce(s,s.idealLength)},e.prototype.calcRepulsionForces=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;o<g.length;o++)l=g[o],this.calculateRepulsionForceOfANode(l,d,t,s),d.add(l);else for(o=0;o<g.length;o++)for(l=g[o],c=o+1;c<g.length;c++)T=g[c],l.getOwner()==T.getOwner()&&this.calcRepulsionForce(l,T)},e.prototype.calcGravitationalForces=function(){for(var t,s=this.getAllNodesToApplyGravitation(),o=0;o<s.length;o++)t=s[o],this.calcGravitationalForce(t)},e.prototype.moveNodes=function(){for(var t=this.getAllNodes(),s,o=0;o<t.length;o++)s=t[o],s.move()},e.prototype.calcSpringForce=function(t,s){var o=t.getSource(),c=t.getTarget(),l,T,g,d;if(this.uniformLeafNodeSizes&&o.getChild()==null&&c.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;l=t.getLength(),l!=0&&(T=t.edgeElasticity*(l-s),g=T*(t.lengthX/l),d=T*(t.lengthY/l),o.springForceX+=g,o.springForceY+=d,c.springForceX-=g,c.springForceY-=d)},e.prototype.calcRepulsionForce=function(t,s){var o=t.getRect(),c=s.getRect(),l=new Array(2),T=new Array(4),g,d,C,S,w,P,B;if(o.intersects(c)){a.calcSeparationAmount(o,c,l,i.DEFAULT_EDGE_LENGTH/2),P=2*l[0],B=2*l[1];var U=t.noOfChildren*s.noOfChildren/(t.noOfChildren+s.noOfChildren);t.repulsionForceX-=U*P,t.repulsionForceY-=U*B,s.repulsionForceX+=U*P,s.repulsionForceY+=U*B}else this.uniformLeafNodeSizes&&t.getChild()==null&&s.getChild()==null?(g=c.getCenterX()-o.getCenterX(),d=c.getCenterY()-o.getCenterY()):(a.getIntersection(o,c,T),g=T[2]-T[0],d=T[3]-T[1]),Math.abs(g)<i.MIN_REPULSION_DIST&&(g=f.sign(g)*i.MIN_REPULSION_DIST),Math.abs(d)<i.MIN_REPULSION_DIST&&(d=f.sign(d)*i.MIN_REPULSION_DIST),C=g*g+d*d,S=Math.sqrt(C),w=(t.nodeRepulsion/2+s.nodeRepulsion/2)*t.noOfChildren*s.noOfChildren/C,P=w*g/S,B=w*d/S,t.repulsionForceX-=P,t.repulsionForceY-=B,s.repulsionForceX+=P,s.repulsionForceY+=B},e.prototype.calcGravitationalForce=function(t){var s,o,c,l,T,g,d,C;s=t.getOwner(),o=(s.getRight()+s.getLeft())/2,c=(s.getTop()+s.getBottom())/2,l=t.getCenterX()-o,T=t.getCenterY()-c,g=Math.abs(l)+t.getWidth()/2,d=Math.abs(T)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(C=s.getEstimatedSize()*this.gravityRangeFactor,(g>C||d>C)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(C=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>C||d>C)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||s},e.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},e.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,s=this.graphManager.getAllNodes(),o=0;o<s.length;o++)t=s[o],t.noOfChildren=t.getNoOfChildren()},e.prototype.calcGrid=function(t){var s=0,o=0;s=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),o=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var c=new Array(s),l=0;l<s;l++)c[l]=new Array(o);for(var l=0;l<s;l++)for(var T=0;T<o;T++)c[l][T]=new Array;return c},e.prototype.addNodeToGrid=function(t,s,o){var c=0,l=0,T=0,g=0;c=parseInt(Math.floor((t.getRect().x-s)/this.repulsionRange)),l=parseInt(Math.floor((t.getRect().width+t.getRect().x-s)/this.repulsionRange)),T=parseInt(Math.floor((t.getRect().y-o)/this.repulsionRange)),g=parseInt(Math.floor((t.getRect().height+t.getRect().y-o)/this.repulsionRange));for(var d=c;d<=l;d++)for(var C=T;C<=g;C++)this.grid[d][C].push(t),t.setGridCoordinates(c,l,T,g)},e.prototype.updateGrid=function(){var t,s,o=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<o.length;t++)s=o[t],this.addNodeToGrid(s,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},e.prototype.calculateRepulsionForceOfANode=function(t,s,o,c){if(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o||c){var l=new Set;t.surrounding=new Array;for(var T,g=this.grid,d=t.startX-1;d<t.finishX+2;d++)for(var C=t.startY-1;C<t.finishY+2;C++)if(!(d<0||C<0||d>=g.length||C>=g[0].length)){for(var S=0;S<g[d][C].length;S++)if(T=g[d][C][S],!(t.getOwner()!=T.getOwner()||t==T)&&!s.has(T)&&!l.has(T)){var w=Math.abs(t.getCenterX()-T.getCenterX())-(t.getWidth()/2+T.getWidth()/2),P=Math.abs(t.getCenterY()-T.getCenterY())-(t.getHeight()/2+T.getHeight()/2);w<=this.repulsionRange&&P<=this.repulsionRange&&l.add(T)}}t.surrounding=[].concat(v(l))}for(d=0;d<t.surrounding.length;d++)this.calcRepulsionForce(t,t.surrounding[d])},e.prototype.calcRepulsionRange=function(){return 0},A.exports=e}),(function(A,G,N){var v=N(1),h=N(4);function i(a,f,e){v.call(this,a,f,e),this.idealLength=h.DEFAULT_EDGE_LENGTH,this.edgeElasticity=h.DEFAULT_SPRING_STRENGTH}i.prototype=Object.create(v.prototype);for(var r in v)i[r]=v[r];A.exports=i}),(function(A,G,N){var v=N(3),h=N(4);function i(a,f,e,u){v.call(this,a,f,e,u),this.nodeRepulsion=h.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}i.prototype=Object.create(v.prototype);for(var r in v)i[r]=v[r];i.prototype.setGridCoordinates=function(a,f,e,u){this.startX=a,this.finishX=f,this.startY=e,this.finishY=u},A.exports=i}),(function(A,G,N){function v(h,i){this.width=0,this.height=0,h!==null&&i!==null&&(this.height=i,this.width=h)}v.prototype.getWidth=function(){return this.width},v.prototype.setWidth=function(h){this.width=h},v.prototype.getHeight=function(){return this.height},v.prototype.setHeight=function(h){this.height=h},A.exports=v}),(function(A,G,N){var v=N(14);function h(){this.map={},this.keys=[]}h.prototype.put=function(i,r){var a=v.createID(i);this.contains(a)||(this.map[a]=r,this.keys.push(i))},h.prototype.contains=function(i){return v.createID(i),this.map[i]!=null},h.prototype.get=function(i){var r=v.createID(i);return this.map[r]},h.prototype.keySet=function(){return this.keys},A.exports=h}),(function(A,G,N){var v=N(14);function h(){this.set={}}h.prototype.add=function(i){var r=v.createID(i);this.contains(r)||(this.set[r]=i)},h.prototype.remove=function(i){delete this.set[v.createID(i)]},h.prototype.clear=function(){this.set={}},h.prototype.contains=function(i){return this.set[v.createID(i)]==i},h.prototype.isEmpty=function(){return this.size()===0},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAllTo=function(i){for(var r=Object.keys(this.set),a=r.length,f=0;f<a;f++)i.push(this.set[r[f]])},h.prototype.size=function(){return Object.keys(this.set).length},h.prototype.addAll=function(i){for(var r=i.length,a=0;a<r;a++){var f=i[a];this.add(f)}},A.exports=h}),(function(A,G,N){function v(){}v.multMat=function(h,i){for(var r=[],a=0;a<h.length;a++){r[a]=[];for(var f=0;f<i[0].length;f++){r[a][f]=0;for(var e=0;e<h[0].length;e++)r[a][f]+=h[a][e]*i[e][f]}}return r},v.transpose=function(h){for(var i=[],r=0;r<h[0].length;r++){i[r]=[];for(var a=0;a<h.length;a++)i[r][a]=h[a][r]}return i},v.multCons=function(h,i){for(var r=[],a=0;a<h.length;a++)r[a]=h[a]*i;return r},v.minusOp=function(h,i){for(var r=[],a=0;a<h.length;a++)r[a]=h[a]-i[a];return r},v.dotProduct=function(h,i){for(var r=0,a=0;a<h.length;a++)r+=h[a]*i[a];return r},v.mag=function(h){return Math.sqrt(this.dotProduct(h,h))},v.normalize=function(h){for(var i=[],r=this.mag(h),a=0;a<h.length;a++)i[a]=h[a]/r;return i},v.multGamma=function(h){for(var i=[],r=0,a=0;a<h.length;a++)r+=h[a];r*=-1/h.length;for(var f=0;f<h.length;f++)i[f]=r+h[f];return i},v.multL=function(h,i,r){for(var a=[],f=[],e=[],u=0;u<i[0].length;u++){for(var t=0,s=0;s<i.length;s++)t+=-.5*i[s][u]*h[s];f[u]=t}for(var o=0;o<r.length;o++){for(var c=0,l=0;l<r.length;l++)c+=r[o][l]*f[l];e[o]=c}for(var T=0;T<i.length;T++){for(var g=0,d=0;d<i[0].length;d++)g+=i[T][d]*e[d];a[T]=g}return a},A.exports=v}),(function(A,G,N){var v=(function(){function a(f,e){for(var u=0;u<e.length;u++){var t=e[u];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(f,t.key,t)}}return function(f,e,u){return e&&a(f.prototype,e),u&&a(f,u),f}})();function h(a,f){if(!(a instanceof f))throw new TypeError("Cannot call a class as a function")}var i=N(11),r=(function(){function a(f,e){h(this,a),(e!==null||e!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var u=void 0;f instanceof i?u=f.size():u=f.length,this._quicksort(f,0,u-1)}return v(a,[{key:"_quicksort",value:function(e,u,t){if(u<t){var s=this._partition(e,u,t);this._quicksort(e,u,s),this._quicksort(e,s+1,t)}}},{key:"_partition",value:function(e,u,t){for(var s=this._get(e,u),o=u,c=t;;){for(;this.compareFunction(s,this._get(e,c));)c--;for(;this.compareFunction(this._get(e,o),s);)o++;if(o<c)this._swap(e,o,c),o++,c--;else return c}}},{key:"_get",value:function(e,u){return e instanceof i?e.get_object_at(u):e[u]}},{key:"_set",value:function(e,u,t){e instanceof i?e.set_object_at(u,t):e[u]=t}},{key:"_swap",value:function(e,u,t){var s=this._get(e,u);this._set(e,u,this._get(e,t)),this._set(e,t,s)}},{key:"_defaultCompareFunction",value:function(e,u){return u>e}}]),a})();A.exports=r}),(function(A,G,N){function v(){}v.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var i=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.m,i]),this.V=(function(Tt){var Ct=function Bt(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St<bt[0];St++)zt.push(Bt(bt.slice(1)));return zt};return Ct(Tt)})([this.n,this.n]);for(var r=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.n),a=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,e=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(e,u);t++){if(t<e){this.s[t]=0;for(var s=t;s<this.m;s++)this.s[t]=v.hypot(this.s[t],h[s][t]);if(this.s[t]!==0){h[t][t]<0&&(this.s[t]=-this.s[t]);for(var o=t;o<this.m;o++)h[o][t]/=this.s[t];h[t][t]+=1}this.s[t]=-this.s[t]}for(var c=t+1;c<this.n;c++){if((function(Tt,Ct){return Tt&&Ct})(t<e,this.s[t]!==0)){for(var l=0,T=t;T<this.m;T++)l+=h[T][t]*h[T][c];l=-l/h[t][t];for(var g=t;g<this.m;g++)h[g][c]+=l*h[g][t]}r[c]=h[t][c]}if((function(Tt,Ct){return Ct})(f,t<e))for(var d=t;d<this.m;d++)this.U[d][t]=h[d][t];if(t<u){r[t]=0;for(var C=t+1;C<this.n;C++)r[t]=v.hypot(r[t],r[C]);if(r[t]!==0){r[t+1]<0&&(r[t]=-r[t]);for(var S=t+1;S<this.n;S++)r[S]/=r[t];r[t+1]+=1}if(r[t]=-r[t],(function(Tt,Ct){return Tt&&Ct})(t+1<this.m,r[t]!==0)){for(var w=t+1;w<this.m;w++)a[w]=0;for(var P=t+1;P<this.n;P++)for(var B=t+1;B<this.m;B++)a[B]+=r[P]*h[B][P];for(var U=t+1;U<this.n;U++)for(var V=-r[U]/r[t+1],M=t+1;M<this.m;M++)h[M][U]+=V*a[M]}for(var _=t+1;_<this.n;_++)this.V[_][t]=r[_]}}var n=Math.min(this.n,this.m+1);e<this.n&&(this.s[e]=h[e][e]),this.m<n&&(this.s[n-1]=0),u+1<n&&(r[u]=h[u][n-1]),r[n-1]=0;{for(var E=e;E<i;E++){for(var p=0;p<this.m;p++)this.U[p][E]=0;this.U[E][E]=1}for(var m=e-1;m>=0;m--)if(this.s[m]!==0){for(var y=m+1;y<i;y++){for(var I=0,O=m;O<this.m;O++)I+=this.U[O][m]*this.U[O][y];I=-I/this.U[m][m];for(var R=m;R<this.m;R++)this.U[R][y]+=I*this.U[R][m]}for(var W=m;W<this.m;W++)this.U[W][m]=-this.U[W][m];this.U[m][m]=1+this.U[m][m];for(var x=0;x<m-1;x++)this.U[x][m]=0}else{for(var Q=0;Q<this.m;Q++)this.U[Q][m]=0;this.U[m][m]=1}}for(var z=this.n-1;z>=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z<u,r[z]!==0))for(var X=z+1;X<i;X++){for(var rt=0,$=z+1;$<this.n;$++)rt+=this.V[$][z]*this.V[$][X];rt=-rt/this.V[z+1][z];for(var D=z+1;D<this.n;D++)this.V[D][X]+=rt*this.V[D][z]}for(var H=0;H<this.n;H++)this.V[H][z]=0;this.V[z][z]=1}for(var k=n-1,tt=Math.pow(2,-52),ht=Math.pow(2,-966);n>0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),wt=this.s[ut]/Et,Ot=it/Et;this.s[ut]=Et,ut!==J&&(it=-Ot*r[ut-1],r[ut-1]=wt*r[ut-1]);for(var mt=0;mt<this.n;mt++)Et=wt*this.V[mt][ut]+Ot*this.V[mt][n-1],this.V[mt][n-1]=-Ot*this.V[mt][ut]+wt*this.V[mt][n-1],this.V[mt][ut]=Et}}break;case 2:{var Dt=r[J-1];r[J-1]=0;for(var Rt=J;Rt<n;Rt++){var Ht=v.hypot(this.s[Rt],Dt),Ut=this.s[Rt]/Ht,Pt=Dt/Ht;this.s[Rt]=Ht,Dt=-Pt*r[Rt],r[Rt]=Ut*r[Rt];for(var Ft=0;Ft<this.m;Ft++)Ht=Ut*this.U[Ft][Rt]+Pt*this.U[Ft][J-1],this.U[Ft][J-1]=-Pt*this.U[Ft][Rt]+Ut*this.U[Ft][J-1],this.U[Ft][Rt]=Ht}}break;case 3:{var Yt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[n-1]),Math.abs(this.s[n-2])),Math.abs(r[n-2])),Math.abs(this.s[J])),Math.abs(r[J])),Vt=this.s[n-1]/Yt,F=this.s[n-2]/Yt,Y=r[n-2]/Yt,Z=this.s[J]/Yt,K=r[J]/Yt,q=((F+Vt)*(F-Vt)+Y*Y)/2,at=Vt*Y*(Vt*Y),ct=0;(function(Tt,Ct){return Tt||Ct})(q!==0,at!==0)&&(ct=Math.sqrt(q*q+at),q<0&&(ct=-ct),ct=at/(q+ct));for(var nt=(Z+Vt)*(Z-Vt)+ct,et=Z*K,j=J;j<n-1;j++){var dt=v.hypot(nt,et),At=nt/dt,pt=et/dt;j!==J&&(r[j-1]=dt),nt=At*this.s[j]+pt*r[j],r[j]=At*r[j]-pt*this.s[j],et=pt*this.s[j+1],this.s[j+1]=At*this.s[j+1];for(var xt=0;xt<this.n;xt++)dt=At*this.V[xt][j]+pt*this.V[xt][j+1],this.V[xt][j+1]=-pt*this.V[xt][j]+At*this.V[xt][j+1],this.V[xt][j]=dt;if(dt=v.hypot(nt,et),At=nt/dt,pt=et/dt,this.s[j]=dt,nt=At*r[j]+pt*this.s[j+1],this.s[j+1]=-pt*r[j]+At*this.s[j+1],et=pt*r[j+1],r[j+1]=At*r[j+1],j<this.m-1)for(var lt=0;lt<this.m;lt++)dt=At*this.U[lt][j]+pt*this.U[lt][j+1],this.U[lt][j+1]=-pt*this.U[lt][j]+At*this.U[lt][j+1],this.U[lt][j]=dt}r[n-2]=nt}break;case 4:{if(this.s[J]<=0){this.s[J]=this.s[J]<0?-this.s[J]:0;for(var ot=0;ot<=k;ot++)this.V[ot][J]=-this.V[ot][J]}for(;J<k&&!(this.s[J]>=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,J<this.n-1)for(var ft=0;ft<this.n;ft++)Lt=this.V[ft][J+1],this.V[ft][J+1]=this.V[ft][J],this.V[ft][J]=Lt;if(J<this.m-1)for(var st=0;st<this.m;st++)Lt=this.U[st][J+1],this.U[st][J+1]=this.U[st][J],this.U[st][J]=Lt;J++}n--}break}}var Xt={U:this.U,V:this.V,S:this.s};return Xt},v.hypot=function(h,i){var r=void 0;return Math.abs(h)>Math.abs(i)?(r=i/h,r=Math.abs(h)*Math.sqrt(1+r*r)):i!=0?(r=h/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=v}),(function(A,G,N){var v=(function(){function r(a,f){for(var e=0;e<f.length;e++){var u=f[e];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(a,u.key,u)}}return function(a,f,e){return f&&r(a.prototype,f),e&&r(a,e),a}})();function h(r,a){if(!(r instanceof a))throw new TypeError("Cannot call a class as a function")}var i=(function(){function r(a,f){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,r),this.sequence1=a,this.sequence2=f,this.match_score=e,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=a.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var o=0;o<this.jMax;o++)this.grid[s][o]=0}this.tracebackGrid=new Array(this.iMax);for(var c=0;c<this.iMax;c++){this.tracebackGrid[c]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[c][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return v(r,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var f=1;f<this.jMax;f++)this.grid[0][f]=this.grid[0][f-1]+this.gap_penalty,this.tracebackGrid[0][f]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var u=1;u<this.iMax;u++)for(var t=1;t<this.jMax;t++){var s=void 0;this.sequence1[u-1]===this.sequence2[t-1]?s=this.grid[u-1][t-1]+this.match_score:s=this.grid[u-1][t-1]+this.mismatch_penalty;var o=this.grid[u-1][t]+this.gap_penalty,c=this.grid[u][t-1]+this.gap_penalty,l=[s,o,c],T=this.arrayAllMaxIndexes(l);this.grid[u][t]=l[T[0]],this.tracebackGrid[u][t]=[T.includes(0),T.includes(1),T.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var f=[];for(f.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});f[0];){var e=f[0],u=this.tracebackGrid[e.pos[0]][e.pos[1]];u[0]&&f.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),u[1]&&f.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),u[2]&&f.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),e.pos[0]===0&&e.pos[1]===0&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),f.shift()}return this.alignments}},{key:"getAllIndexes",value:function(f,e){for(var u=[],t=-1;(t=f.indexOf(e,t+1))!==-1;)u.push(t);return u}},{key:"arrayAllMaxIndexes",value:function(f){return this.getAllIndexes(f,Math.max.apply(null,f))}}]),r})();A.exports=i}),(function(A,G,N){var v=function(){};v.FDLayout=N(18),v.FDLayoutConstants=N(4),v.FDLayoutEdge=N(19),v.FDLayoutNode=N(20),v.DimensionD=N(21),v.HashMap=N(22),v.HashSet=N(23),v.IGeometry=N(8),v.IMath=N(9),v.Integer=N(10),v.Point=N(12),v.PointD=N(5),v.RandomSeed=N(16),v.RectangleD=N(13),v.Transform=N(17),v.UniqueIDGeneretor=N(14),v.Quicksort=N(25),v.LinkedList=N(11),v.LGraphObject=N(2),v.LGraph=N(6),v.LEdge=N(1),v.LGraphManager=N(7),v.LNode=N(3),v.Layout=N(15),v.LayoutConstants=N(0),v.NeedlemanWunsch=N(27),v.Matrix=N(24),v.SVD=N(26),A.exports=v}),(function(A,G,N){function v(){this.listeners=[]}var h=v.prototype;h.addListener=function(i,r){this.listeners.push({event:i,callback:r})},h.removeListener=function(i,r){for(var a=this.listeners.length;a>=0;a--){var f=this.listeners[a];f.event===i&&f.callback===r&&this.listeners.splice(a,1)}},h.emit=function(i,r){for(var a=0;a<this.listeners.length;a++){var f=this.listeners[a];i===f.event&&f.callback(r)}},A.exports=v})])})})(le)),le.exports}var dr=he.exports,Oe;function vr(){return Oe||(Oe=1,(function(L,b){(function(G,N){L.exports=N(ur())})(dr,function(A){return(()=>{var G={45:((i,r,a)=>{var f={};f.layoutBase=a(551),f.CoSEConstants=a(806),f.CoSEEdge=a(767),f.CoSEGraph=a(880),f.CoSEGraphManager=a(578),f.CoSELayout=a(765),f.CoSENode=a(991),f.ConstraintHandler=a(902),i.exports=f}),806:((i,r,a)=>{var f=a(551).FDLayoutConstants;function e(){}for(var u in f)e[u]=f[u];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,i.exports=e}),767:((i,r,a)=>{var f=a(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),880:((i,r,a)=>{var f=a(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),578:((i,r,a)=>{var f=a(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var u in f)e[u]=f[u];i.exports=e}),765:((i,r,a)=>{var f=a(551).FDLayout,e=a(578),u=a(880),t=a(991),s=a(767),o=a(806),c=a(902),l=a(551).FDLayoutConstants,T=a(551).LayoutConstants,g=a(551).Point,d=a(551).PointD,C=a(551).DimensionD,S=a(551).Layout,w=a(551).Integer,P=a(551).IGeometry,B=a(551).LGraph,U=a(551).Transform,V=a(551).LinkedList;function M(){f.call(this),this.toBeTiled={},this.constraints={}}M.prototype=Object.create(f.prototype);for(var _ in f)M[_]=f[_];M.prototype.newGraphManager=function(){var n=new e(this);return this.graphManager=n,n},M.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},M.prototype.newNode=function(n){return new t(this.graphManager,n)},M.prototype.newEdge=function(n){return new s(null,null,n)},M.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return E.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),E={},p=0;p<n.length;p++){var m=n[p].rect,y=n[p].id;E[y]={id:y,x:m.getCenterX(),y:m.getCenterY(),w:m.width,h:m.height}}return E},M.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var n=!1;if(l.ANIMATE==="during")this.emit("layoutstarted");else{for(;!n;)n=this.tick();this.graphManager.updateBounds()}},M.prototype.moveNodes=function(){for(var n=this.getAllNodes(),E,p=0;p<n.length;p++)E=n[p],E.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var p=0;p<n.length;p++)E=n[p],E.move()},M.prototype.initConstraintVariables=function(){var n=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var E=this.graphManager.getAllNodes(),p=0;p<E.length;p++){var m=E[p];this.idToNodeMap.set(m.id,m)}var y=function D(H){for(var k=H.getChild().getNodes(),tt,ht=0,J=0;J<k.length;J++)tt=k[J],tt.getChild()==null?n.fixedNodeSet.has(tt.id)&&(ht+=100):ht+=D(tt);return ht};if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(k){n.fixedNodeSet.add(k.nodeId)});for(var E=this.graphManager.getAllNodes(),m,p=0;p<E.length;p++)if(m=E[p],m.getChild()!=null){var I=y(m);I>0&&(m.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var O=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(D){n.fixedNodesOnHorizontal.add(D),n.fixedNodesOnVertical.add(D)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p<W.length;p++)this.dummyToNodeForVerticalAlignment.set("dummy"+p,[]),W[p].forEach(function(H){O.set(H,"dummy"+p),n.dummyToNodeForVerticalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnHorizontal.add("dummy"+p)});if(this.constraints.alignmentConstraint.horizontal)for(var x=this.constraints.alignmentConstraint.horizontal,p=0;p<x.length;p++)this.dummyToNodeForHorizontalAlignment.set("dummy"+p,[]),x[p].forEach(function(H){R.set(H,"dummy"+p),n.dummyToNodeForHorizontalAlignment.get("dummy"+p).push(H),n.fixedNodeSet.has(H)&&n.fixedNodesOnVertical.add("dummy"+p)})}if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(D){var H,k,tt;for(tt=D.length-1;tt>=2*D.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),k=D[tt],D[tt]=D[H],D[H]=k;return D},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(k)||(n.nodesInRelativeHorizontal.push(k),n.nodeToRelativeConstraintMapHorizontal.set(k,[]),n.dummyToNodeForVerticalAlignment.has(k)?n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(k)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(k,n.idToNodeMap.get(k).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:k,gap:D.gap}),n.nodeToRelativeConstraintMapHorizontal.get(k).push({left:H,gap:D.gap})}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:D.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:D.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(D){if(D.left){var H=O.has(D.left)?O.get(D.left):D.left,k=O.has(D.right)?O.get(D.right):D.right;Q.has(H)?Q.get(H).push(k):Q.set(H,[k]),Q.has(k)?Q.get(k).push(H):Q.set(k,[H])}else{var tt=R.has(D.top)?R.get(D.top):D.top,ht=R.has(D.bottom)?R.get(D.bottom):D.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,k){var tt=[],ht=[],J=new V,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),k.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(wt){It.has(wt)||(J.push(wt),It.add(wt),tt[Nt].push(wt))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},M.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var D=n.idToNodeMap.get($.nodeId);D.displacementX=0,D.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p<E.length;p++){for(var m=0,y=0;y<E[p].length;y++){if(this.fixedNodeSet.has(E[p][y])){m=0;break}m+=this.idToNodeMap.get(E[p][y]).displacementX}for(var I=m/E[p].length,y=0;y<E[p].length;y++)this.idToNodeMap.get(E[p][y]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal)for(var O=this.constraints.alignmentConstraint.horizontal,p=0;p<O.length;p++){for(var R=0,y=0;y<O[p].length;y++){if(this.fixedNodeSet.has(O[p][y])){R=0;break}R+=this.idToNodeMap.get(O[p][y]).displacementY}for(var W=R/O[p].length,y=0;y<O[p].length;y++)this.idToNodeMap.get(O[p][y]).displacementY=W}}if(this.constraints.relativePlacementConstraint)if(o.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var D=0;n.dummyToNodeForVerticalAlignment.has($)?D=n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).displacementX:D=n.idToNodeMap.get($).displacementX,n.nodeToRelativeConstraintMapHorizontal.get($).forEach(function(H){if(H.right){var k=n.nodeToTempPositionMapHorizontal.get(H.right)-n.nodeToTempPositionMapHorizontal.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=n.nodeToTempPositionMapHorizontal.get($)-n.nodeToTempPositionMapHorizontal.get(H.left)+D;k<H.gap&&(D+=H.gap-k)}}),n.nodeToTempPositionMapHorizontal.set($,n.nodeToTempPositionMapHorizontal.get($)+D),n.dummyToNodeForVerticalAlignment.has($)?n.dummyToNodeForVerticalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementX=D}):n.idToNodeMap.get($).displacementX=D}}),this.nodesInRelativeVertical.forEach(function($){if(!n.fixedNodesOnHorizontal.has($)){var D=0;n.dummyToNodeForHorizontalAlignment.has($)?D=n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get($)[0]).displacementY:D=n.idToNodeMap.get($).displacementY,n.nodeToRelativeConstraintMapVertical.get($).forEach(function(H){if(H.bottom){var k=n.nodeToTempPositionMapVertical.get(H.bottom)-n.nodeToTempPositionMapVertical.get($)-D;k<H.gap&&(D-=H.gap-k)}else{var k=n.nodeToTempPositionMapVertical.get($)-n.nodeToTempPositionMapVertical.get(H.top)+D;k<H.gap&&(D+=H.gap-k)}}),n.nodeToTempPositionMapVertical.set($,n.nodeToTempPositionMapVertical.get($)+D),n.dummyToNodeForHorizontalAlignment.has($)?n.dummyToNodeForHorizontalAlignment.get($).forEach(function(H){n.idToNodeMap.get(H).displacementY=D}):n.idToNodeMap.get($).displacementY=D}});else{for(var p=0;p<this.componentsOnHorizontal.length;p++){var x=this.componentsOnHorizontal[p];if(this.fixedComponentsOnHorizontal[p])for(var y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=0}):this.idToNodeMap.get(x[y]).displacementX=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForVerticalAlignment.has(x[y])){var X=this.dummyToNodeForVerticalAlignment.get(x[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementX,z+=X.length}else Q+=this.idToNodeMap.get(x[y]).displacementX,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForVerticalAlignment.has(x[y])?this.dummyToNodeForVerticalAlignment.get(x[y]).forEach(function(H){n.idToNodeMap.get(H).displacementX=rt}):this.idToNodeMap.get(x[y]).displacementX=rt}}for(var p=0;p<this.componentsOnVertical.length;p++){var x=this.componentsOnVertical[p];if(this.fixedComponentsOnVertical[p])for(var y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(k){n.idToNodeMap.get(k).displacementY=0}):this.idToNodeMap.get(x[y]).displacementY=0;else{for(var Q=0,z=0,y=0;y<x.length;y++)if(this.dummyToNodeForHorizontalAlignment.has(x[y])){var X=this.dummyToNodeForHorizontalAlignment.get(x[y]);Q+=X.length*this.idToNodeMap.get(X[0]).displacementY,z+=X.length}else Q+=this.idToNodeMap.get(x[y]).displacementY,z++;for(var rt=Q/z,y=0;y<x.length;y++)this.dummyToNodeForHorizontalAlignment.has(x[y])?this.dummyToNodeForHorizontalAlignment.get(x[y]).forEach(function(J){n.idToNodeMap.get(J).displacementY=rt}):this.idToNodeMap.get(x[y]).displacementY=rt}}}},M.prototype.calculateNodesToApplyGravitationTo=function(){var n=[],E,p=this.graphManager.getGraphs(),m=p.length,y;for(y=0;y<m;y++)E=p[y],E.updateConnected(),E.isConnected||(n=n.concat(E.getNodes()));return n},M.prototype.createBendpoints=function(){var n=[];n=n.concat(this.graphManager.getAllEdges());var E=new Set,p;for(p=0;p<n.length;p++){var m=n[p];if(!E.has(m)){var y=m.getSource(),I=m.getTarget();if(y==I)m.getBendpoints().push(new d),m.getBendpoints().push(new d),this.createDummyNodesForBendpoints(m),E.add(m);else{var O=[];if(O=O.concat(y.getEdgeListToNode(I)),O=O.concat(I.getEdgeListToNode(y)),!E.has(O[0])){if(O.length>1){var R;for(R=0;R<O.length;R++){var W=O[R];W.getBendpoints().push(new d),this.createDummyNodesForBendpoints(W)}}O.forEach(function(x){E.add(x)})}}}if(E.size==n.length)break}},M.prototype.positionNodesRadially=function(n){for(var E=new g(0,0),p=Math.ceil(Math.sqrt(n.length)),m=0,y=0,I=0,O=new d(0,0),R=0;R<n.length;R++){R%p==0&&(I=0,y=m,R!=0&&(y+=o.DEFAULT_COMPONENT_SEPERATION),m=0);var W=n[R],x=S.findCenterOfTree(W);E.x=I,E.y=y,O=M.radialLayout(W,x,E),O.y>m&&(m=Math.floor(O.y)),I=Math.floor(O.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-O.x/2,T.WORLD_CENTER_Y-O.y/2))},M.radialLayout=function(n,E,p){var m=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(E,null,0,359,0,m);var y=B.calculateBounds(n),I=new U;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var O=0;O<n.length;O++){var R=n[O];R.transform(I)}var W=new d(y.getMaxX(),y.getMaxY());return I.inverseTransformPoint(W)},M.branchRadialLayout=function(n,E,p,m,y,I){var O=(m-p+1)/2;O<0&&(O+=180);var R=(O+p)%360,W=R*P.TWO_PI/360,x=y*Math.cos(W),Q=y*Math.sin(W);n.setCenter(x,Q);var z=[];z=z.concat(n.getEdges());var X=z.length;E!=null&&X--;for(var rt=0,$=z.length,D,H=n.getEdgesBetween(E);H.length>1;){var k=H[0];H.splice(0,1);var tt=z.indexOf(k);tt>=0&&z.splice(tt,1),$--,X--}E!=null?D=(z.indexOf(H[0])+1)%$:D=0;for(var ht=Math.abs(m-p)/X,J=D;rt!=X;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;M.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},M.maxDiagonalInTree=function(n){for(var E=w.MIN_VALUE,p=0;p<n.length;p++){var m=n[p],y=m.getDiagonal();y>E&&(E=y)}return E},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var n=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y<m.length;y++){var I=m[y],O=I.getParent();this.getNodeDegreeWithChildren(I)===0&&(O.id==null||!this.getToBeTiled(O))&&p.push(I)}for(var y=0;y<p.length;y++){var I=p[y],R=I.getParent().id;typeof E[R]>"u"&&(E[R]=[]),E[R]=E[R].concat(I)}Object.keys(E).forEach(function(W){if(E[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=E[W];var Q=E[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var X=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$<E[W].length;$++){var D=E[W][$];rt.remove(D),X.add(D)}}})},M.prototype.clearCompounds=function(){var n={},E={};this.performDFSOnCompounds();for(var p=0;p<this.compoundOrder.length;p++)E[this.compoundOrder[p].id]=this.compoundOrder[p],n[this.compoundOrder[p].id]=[].concat(this.compoundOrder[p].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[p].getChild()),this.compoundOrder[p].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(n,E)},M.prototype.clearZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(p){var m=n.idToDummyNode[p];if(E[p]=n.tileNodes(n.memberGroups[p],m.paddingLeft+m.paddingRight),m.rect.width=E[p].width,m.rect.height=E[p].height,m.setCenter(E[p].centerX,E[p].centerY),m.labelMarginLeft=0,m.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var y=m.rect.width,I=m.rect.height;m.labelWidth&&(m.labelPosHorizontal=="left"?(m.rect.x-=m.labelWidth,m.setWidth(y+m.labelWidth),m.labelMarginLeft=m.labelWidth):m.labelPosHorizontal=="center"&&m.labelWidth>y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(I+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>I?(m.rect.y-=(m.labelHeight-I)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-I)/2):m.labelPosVertical=="bottom"&&m.setHeight(I+m.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var E=this.compoundOrder[n],p=E.id,m=E.paddingLeft,y=E.paddingTop,I=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,I,O)}},M.prototype.repopulateZeroDegreeMembers=function(){var n=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=n.idToDummyNode[p],y=m.paddingLeft,I=m.paddingTop,O=m.labelMarginLeft,R=m.labelMarginTop;n.adjustLocations(E[p],m.rect.x,m.rect.y,y,I,O,R)})},M.prototype.getToBeTiled=function(n){var E=n.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=n.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y<m.length;y++){var I=m[y];if(this.getNodeDegree(I)>0)return this.toBeTiled[E]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},M.prototype.getNodeDegree=function(n){n.id;for(var E=n.getEdges(),p=0,m=0;m<E.length;m++){var y=E[m];y.getSource().id!==y.getTarget().id&&(p=p+1)}return p},M.prototype.getNodeDegreeWithChildren=function(n){var E=this.getNodeDegree(n);if(n.getChild()==null)return E;for(var p=n.getChild().getNodes(),m=0;m<p.length;m++){var y=p[m];E+=this.getNodeDegreeWithChildren(y)}return E},M.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},M.prototype.fillCompexOrderByDFS=function(n){for(var E=0;E<n.length;E++){var p=n[E];p.getChild()!=null&&this.fillCompexOrderByDFS(p.getChild().getNodes()),this.getToBeTiled(p)&&this.compoundOrder.push(p)}},M.prototype.adjustLocations=function(n,E,p,m,y,I,O){E+=m+I,p+=y+O;for(var R=E,W=0;W<n.rows.length;W++){var x=n.rows[W];E=R;for(var Q=0,z=0;z<x.length;z++){var X=x[z];X.rect.x=E,X.rect.y=p,E+=X.rect.width+n.horizontalPadding,X.rect.height>Q&&(Q=X.rect.height)}p+=Q+n.verticalPadding}},M.prototype.tileCompoundMembers=function(n,E){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(n[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,O=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(O+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>O?(y.rect.y-=(y.labelHeight-O)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-O)/2):y.labelPosVertical=="bottom"&&y.setHeight(O+y.labelHeight))}})},M.prototype.tileNodes=function(n,E){var p=this.tileNodesByFavoringDim(n,E,!0),m=this.tileNodesByFavoringDim(n,E,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(m),O;return I<y?O=m:O=p,O},M.prototype.getOrgRatio=function(n){var E=n.width,p=n.height,m=E/p;return m<1&&(m=1/m),m},M.prototype.calcIdealRowWidth=function(n,E){var p=o.TILING_PADDING_VERTICAL,m=o.TILING_PADDING_HORIZONTAL,y=n.length,I=0,O=0,R=0;n.forEach(function($){I+=$.getWidth(),O+=$.getHeight(),$.getWidth()>R&&(R=$.getWidth())});var W=I/y,x=O/y,Q=Math.pow(p-m,2)+4*(W+m)*(x+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return R>rt&&(rt=R),rt+=m*2,rt},M.prototype.tileNodesByFavoringDim=function(n,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};I&&(O.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(D){return D.rect.width*D.rect.height},W=function(D,H){return R(H)-R(D)};n.sort(function($,D){var H=W;return O.idealRowWidth?(H=I,H($.id,D.id)):H($,D)});for(var x=0,Q=0,z=0;z<n.length;z++){var X=n[z];x+=X.getCenterX(),Q+=X.getCenterY()}O.centerX=x/n.length,O.centerY=Q/n.length;for(var z=0;z<n.length;z++){var X=n[z];if(O.rows.length==0)this.insertNodeToRow(O,X,0,E);else if(this.canAddHorizontal(O,X.rect.width,X.rect.height)){var rt=O.rows.length-1;O.idealRowWidth||(rt=this.getShortestRowIndex(O)),this.insertNodeToRow(O,X,rt,E)}else this.insertNodeToRow(O,X,O.rows.length,E);this.shiftToLastRow(O)}return O},M.prototype.insertNodeToRow=function(n,E,p,m){var y=m;if(p==n.rows.length){var I=[];n.rows.push(I),n.rowWidth.push(y),n.rowHeight.push(0)}var O=n.rowWidth[p]+E.rect.width;n.rows[p].length>0&&(O+=n.horizontalPadding),n.rowWidth[p]=O,n.width<O&&(n.width=O);var R=E.rect.height;p>0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(E)},M.prototype.getShortestRowIndex=function(n){for(var E=-1,p=Number.MAX_VALUE,m=0;m<n.rows.length;m++)n.rowWidth[m]<p&&(E=m,p=n.rowWidth[m]);return E},M.prototype.getLongestRowIndex=function(n){for(var E=-1,p=Number.MIN_VALUE,m=0;m<n.rows.length;m++)n.rowWidth[m]>p&&(E=m,p=n.rowWidth[m]);return E},M.prototype.canAddHorizontal=function(n,E,p){if(n.idealRowWidth){var m=n.rows.length-1,y=n.rowWidth[m];return y+E+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var O=n.rowWidth[I];if(O+n.horizontalPadding+E<=n.width)return!0;var R=0;n.rowHeight[I]<p&&I>0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-O>=E+n.horizontalPadding?W=(n.height+R)/(O+E+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.width<E?x=(n.height+R)/E:x=(n.height+R)/n.width,x<1&&(x=1/x),W<1&&(W=1/W),W<x},M.prototype.shiftToLastRow=function(n){var E=this.getLongestRowIndex(n),p=n.rowWidth.length-1,m=n.rows[E],y=m[m.length-1],I=y.width+n.horizontalPadding;if(n.width-n.rowWidth[p]>I&&E!=p){m.splice(-1,1),n.rows[p].push(y),n.rowWidth[E]=n.rowWidth[E]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var O=Number.MIN_VALUE,R=0;R<m.length;R++)m[R].height>O&&(O=m[R].height);E>0&&(O+=n.verticalPadding);var W=n.rowHeight[E]+n.rowHeight[p];n.rowHeight[E]=O,n.rowHeight[p]<y.height+n.verticalPadding&&(n.rowHeight[p]=y.height+n.verticalPadding);var x=n.rowHeight[E]+n.rowHeight[p];n.height+=x-W,this.shiftToLastRow(n)}},M.prototype.tilingPreLayout=function(){o.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){o.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var n=[],E=!0,p;E;){var m=this.graphManager.getAllNodes(),y=[];E=!1;for(var I=0;I<m.length;I++)if(p=m[I],p.getEdges().length==1&&!p.getEdges()[0].isInterGraph&&p.getChild()==null){if(o.PURE_INCREMENTAL){var O=p.getEdges()[0].getOtherEnd(p),R=new C(p.getCenterX()-O.getCenterX(),p.getCenterY()-O.getCenterY());y.push([p,p.getEdges()[0],p.getOwner(),R])}else y.push([p,p.getEdges()[0],p.getOwner()]);E=!0}if(E==!0){for(var W=[],x=0;x<y.length;x++)y[x][0].getEdges().length==1&&(W.push(y[x]),y[x][0].getOwner().remove(y[x][0]));n.push(W),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=n},M.prototype.growTree=function(n){for(var E=n.length,p=n[E-1],m,y=0;y<p.length;y++)m=p[y],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);n.splice(n.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},M.prototype.findPlaceforPrunedNode=function(n){var E,p,m=n[0];if(m==n[1].source?p=n[1].target:p=n[1].source,o.PURE_INCREMENTAL)m.setCenter(p.getCenterX()+n[3].getWidth(),p.getCenterY()+n[3].getHeight());else{var y=p.startX,I=p.finishX,O=p.startY,R=p.finishY,W=0,x=0,Q=0,z=0,X=[W,Q,x,z];if(O>0)for(var rt=y;rt<=I;rt++)X[0]+=this.grid[rt][O-1].length+this.grid[rt][O].length-1;if(I<this.grid.length-1)for(var rt=O;rt<=R;rt++)X[1]+=this.grid[I+1][rt].length+this.grid[I][rt].length-1;if(R<this.grid[0].length-1)for(var rt=y;rt<=I;rt++)X[2]+=this.grid[rt][R+1].length+this.grid[rt][R].length-1;if(y>0)for(var rt=O;rt<=R;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,D,H,k=0;k<X.length;k++)X[k]<$?($=X[k],D=1,H=k):X[k]==$&&D++;if(D==3&&$==0)X[0]==0&&X[1]==0&&X[2]==0?E=1:X[0]==0&&X[1]==0&&X[3]==0?E=0:X[0]==0&&X[2]==0&&X[3]==0?E=3:X[1]==0&&X[2]==0&&X[3]==0&&(E=2);else if(D==2&&$==0){var tt=Math.floor(Math.random()*2);X[0]==0&&X[1]==0?tt==0?E=0:E=1:X[0]==0&&X[2]==0?tt==0?E=0:E=2:X[0]==0&&X[3]==0?tt==0?E=0:E=3:X[1]==0&&X[2]==0?tt==0?E=1:E=2:X[1]==0&&X[3]==0?tt==0?E=1:E=3:tt==0?E=2:E=3}else if(D==4&&$==0){var tt=Math.floor(Math.random()*4);E=tt}else E=H;E==0?m.setCenter(p.getCenterX(),p.getCenterY()-p.getHeight()/2-l.DEFAULT_EDGE_LENGTH-m.getHeight()/2):E==1?m.setCenter(p.getCenterX()+p.getWidth()/2+l.DEFAULT_EDGE_LENGTH+m.getWidth()/2,p.getCenterY()):E==2?m.setCenter(p.getCenterX(),p.getCenterY()+p.getHeight()/2+l.DEFAULT_EDGE_LENGTH+m.getHeight()/2):m.setCenter(p.getCenterX()-p.getWidth()/2-l.DEFAULT_EDGE_LENGTH-m.getWidth()/2,p.getCenterY())}},i.exports=M}),991:((i,r,a)=>{var f=a(551).FDLayoutNode,e=a(551).IMath;function u(s,o,c,l){f.call(this,s,o,c,l)}u.prototype=Object.create(f.prototype);for(var t in f)u[t]=f[t];u.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T<c.length;T++)l=c[T],l.getChild()==null?(l.displacementX+=s,l.displacementY+=o):l.propogateDisplacementToChildren(s,o)},u.prototype.move=function(){var s=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),s.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},u.prototype.setPred1=function(s){this.pred1=s},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(s){this.next=s},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(s){this.processed=s},u.prototype.isProcessed=function(){return processed},i.exports=u}),902:((i,r,a)=>{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l<c.length;l++)T[l]=c[l];return T}else return Array.from(c)}var e=a(806),u=a(551).LinkedList,t=a(551).Matrix,s=a(551).SVD;function o(){}o.handleConstraints=function(c){var l={};l.fixedNodeConstraint=c.constraints.fixedNodeConstraint,l.alignmentConstraint=c.constraints.alignmentConstraint,l.relativePlacementConstraint=c.constraints.relativePlacementConstraint;for(var T=new Map,g=new Map,d=[],C=[],S=c.getAllNodes(),w=0,P=0;P<S.length;P++){var B=S[P];B.getChild()==null&&(g.set(B.id,w++),d.push(B.getCenterX()),C.push(B.getCenterY()),T.set(B.id,B))}l.relativePlacementConstraint&&l.relativePlacementConstraint.forEach(function(F){!F.gap&&F.gap!=0&&(F.left?F.gap=e.DEFAULT_EDGE_LENGTH+T.get(F.left).getWidth()/2+T.get(F.right).getWidth()/2:F.gap=e.DEFAULT_EDGE_LENGTH+T.get(F.top).getHeight()/2+T.get(F.bottom).getHeight()/2)});var U=function(Y,Z){return{x:Y.x-Z.x,y:Y.y-Z.y}},V=function(Y){var Z=0,K=0;return Y.forEach(function(q){Z+=d[g.get(q)],K+=C[g.get(q)]}),{x:Z/Y.size,y:K/Y.size}},M=function(Y,Z,K,q,at){function ct(lt,ot){var Lt=new Set(lt),ft=!0,st=!1,Xt=void 0;try{for(var Tt=ot[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt.add(Bt)}}catch(bt){st=!0,Xt=bt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}return Lt}var nt=new Map;Y.forEach(function(lt,ot){nt.set(ot,0)}),Y.forEach(function(lt,ot){lt.forEach(function(Lt){nt.set(Lt.id,nt.get(Lt.id)+1)})});var et=new Map,j=new Map,dt=new u;nt.forEach(function(lt,ot){lt==0?(dt.push(ot),K||(Z=="horizontal"?et.set(ot,g.has(ot)?d[g.get(ot)]:q.get(ot)):et.set(ot,g.has(ot)?C[g.get(ot)]:q.get(ot)))):et.set(ot,Number.NEGATIVE_INFINITY),K&&j.set(ot,new Set([ot]))}),K&&at.forEach(function(lt){var ot=[];if(lt.forEach(function(st){K.has(st)&&ot.push(st)}),ot.length>0){var Lt=0;ot.forEach(function(st){Z=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?C[g.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){Z=="horizontal"?ft+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?C[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var At=function(){var ot=dt.shift(),Lt=Y.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)<et.get(ot)+ft.gap)if(K&&K.has(ft.id)){var st=void 0;if(Z=="horizontal"?st=g.has(ft.id)?d[g.get(ft.id)]:q.get(ft.id):st=g.has(ft.id)?C[g.get(ft.id)]:q.get(ft.id),et.set(ft.id,st),st<et.get(ot)+ft.gap){var Xt=et.get(ot)+ft.gap-st;j.get(ot).forEach(function(Tt){et.set(Tt,et.get(Tt)-Xt)})}}else et.set(ft.id,et.get(ot)+ft.gap);nt.set(ft.id,nt.get(ft.id)-1),nt.get(ft.id)==0&&dt.push(ft.id),K&&j.set(ft.id,ct(j.get(ot),j.get(ft.id)))})};dt.length!=0;)At();if(K){var pt=new Set;Y.forEach(function(lt,ot){lt.length==0&&pt.add(ot)});var xt=[];j.forEach(function(lt,ot){if(pt.has(ot)){var Lt=!1,ft=!0,st=!1,Xt=void 0;try{for(var Tt=lt[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;K.has(Bt)&&(Lt=!0)}}catch(St){st=!0,Xt=St}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}if(!Lt){var bt=!1,zt=void 0;xt.forEach(function(St,kt){St.has([].concat(f(lt))[0])&&(bt=!0,zt=kt)}),bt?lt.forEach(function(St){xt[zt].add(St)}):xt.push(new Set(lt))}}}),xt.forEach(function(lt,ot){var Lt=Number.POSITIVE_INFINITY,ft=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Xt=Number.NEGATIVE_INFINITY,Tt=!0,Ct=!1,Bt=void 0;try{for(var bt=lt[Symbol.iterator](),zt;!(Tt=(zt=bt.next()).done);Tt=!0){var St=zt.value,kt=void 0;Z=="horizontal"?kt=g.has(St)?d[g.get(St)]:q.get(St):kt=g.has(St)?C[g.get(St)]:q.get(St);var Kt=et.get(St);kt<Lt&&(Lt=kt),kt>st&&(st=kt),Kt<ft&&(ft=Kt),Kt>Xt&&(Xt=Kt)}}catch(ee){Ct=!0,Bt=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw Bt}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(Y){var Z=0,K=0,q=0,at=0;if(Y.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?Z++:K++:C[g.get(j.top)]-C[g.get(j.bottom)]>=0?q++:at++}),Z>K&&q>at)for(var ct=0;ct<g.size;ct++)d[ct]=-1*d[ct],C[ct]=-1*C[ct];else if(Z>K)for(var nt=0;nt<g.size;nt++)d[nt]=-1*d[nt];else if(q>at)for(var et=0;et<g.size;et++)C[et]=-1*C[et]},n=function(Y){var Z=[],K=new u,q=new Set,at=0;return Y.forEach(function(ct,nt){if(!q.has(nt)){Z[at]=[];var et=nt;for(K.push(et),q.add(et),Z[at].push(et);K.length!=0;){et=K.shift();var j=Y.get(et);j.forEach(function(dt){q.has(dt.id)||(K.push(dt.id),q.add(dt.id),Z[at].push(dt.id))})}at++}}),Z},E=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(q).push(at),Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},p=function(Y){var Z=new Map;return Y.forEach(function(K,q){Z.set(q,[])}),Y.forEach(function(K,q){K.forEach(function(at){Z.get(at.id).push({id:q,gap:at.gap,direction:at.direction})})}),Z},m=[],y=[],I=!1,O=!1,R=new Set,W=new Map,x=new Map,Q=[];if(l.fixedNodeConstraint&&l.fixedNodeConstraint.forEach(function(F){R.add(F.nodeId)}),l.relativePlacementConstraint&&(l.relativePlacementConstraint.forEach(function(F){F.left?(W.has(F.left)?W.get(F.left).push({id:F.right,gap:F.gap,direction:"horizontal"}):W.set(F.left,[{id:F.right,gap:F.gap,direction:"horizontal"}]),W.has(F.right)||W.set(F.right,[])):(W.has(F.top)?W.get(F.top).push({id:F.bottom,gap:F.gap,direction:"vertical"}):W.set(F.top,[{id:F.bottom,gap:F.gap,direction:"vertical"}]),W.has(F.bottom)||W.set(F.bottom,[]))}),x=E(W),Q=n(x)),e.TRANSFORM_ON_CONSTRAINT_HANDLING){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>1)l.fixedNodeConstraint.forEach(function(F,Y){m[Y]=[F.position.x,F.position.y],y[Y]=[d[g.get(F.nodeId)],C[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var Y=l.alignmentConstraint.vertical,Z=function(et){var j=new Set;Y[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),At=void 0;dt.size>0?At=d[g.get(dt.values().next().value)]:At=V(j).x,Y[et].forEach(function(pt){m[F]=[At,C[g.get(pt)]],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},K=0;K<Y.length;K++)Z(K);I=!0}if(l.alignmentConstraint.horizontal){for(var q=l.alignmentConstraint.horizontal,at=function(et){var j=new Set;q[et].forEach(function(pt){j.add(pt)});var dt=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),At=void 0;dt.size>0?At=d[g.get(dt.values().next().value)]:At=V(j).y,q[et].forEach(function(pt){m[F]=[d[g.get(pt)],At],y[F]=[d[g.get(pt)],C[g.get(pt)]],F++})},ct=0;ct<q.length;ct++)at(ct);I=!0}l.relativePlacementConstraint&&(O=!0)})();else if(l.relativePlacementConstraint){for(var z=0,X=0,rt=0;rt<Q.length;rt++)Q[rt].length>z&&(z=Q[rt].length,X=rt);if(z<x.size/2)_(l.relativePlacementConstraint),I=!1,O=!1;else{var $=new Map,D=new Map,H=[];Q[X].forEach(function(F){W.get(F).forEach(function(Y){Y.direction=="horizontal"?($.has(F)?$.get(F).push(Y):$.set(F,[Y]),$.has(Y.id)||$.set(Y.id,[]),H.push({left:F,right:Y.id})):(D.has(F)?D.get(F).push(Y):D.set(F,[Y]),D.has(Y.id)||D.set(Y.id,[]),H.push({top:F,bottom:Y.id}))})}),_(H),O=!1;var k=M($,"horizontal"),tt=M(D,"vertical");Q[X].forEach(function(F,Y){y[Y]=[d[g.get(F)],C[g.get(F)]],m[Y]=[],k.has(F)?m[Y][0]=k.get(F):m[Y][0]=d[g.get(F)],tt.has(F)?m[Y][1]=tt.get(F):m[Y][1]=C[g.get(F)]}),I=!0}}if(I){for(var ht=void 0,J=t.transpose(m),It=t.transpose(y),Nt=0;Nt<J.length;Nt++)J[Nt]=t.multGamma(J[Nt]),It[Nt]=t.multGamma(It[Nt]);var vt=t.multMat(J,t.transpose(It)),it=s.svd(vt);ht=t.multMat(it.V,t.transpose(it.U));for(var ut=0;ut<g.size;ut++){var Et=[d[ut],C[ut]],wt=[ht[0][0],ht[1][0]],Ot=[ht[0][1],ht[1][1]];d[ut]=t.dotProduct(Et,wt),C[ut]=t.dotProduct(Et,Ot)}O&&_(l.relativePlacementConstraint)}}if(e.ENFORCE_CONSTRAINTS){if(l.fixedNodeConstraint&&l.fixedNodeConstraint.length>0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,Y){var Z={x:d[g.get(F.nodeId)],y:C[g.get(F.nodeId)]},K=F.position,q=U(K,Z);mt.x+=q.x,mt.y+=q.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(F,Y){d[Y]+=mt.x}),C.forEach(function(F,Y){C[Y]+=mt.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,C[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(Y){var Z=new Set;Dt[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=V(Z).x,Z.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht<Dt.length;Ht++)Rt(Ht);if(l.alignmentConstraint.horizontal)for(var Ut=l.alignmentConstraint.horizontal,Pt=function(Y){var Z=new Set;Ut[Y].forEach(function(at){Z.add(at)});var K=new Set([].concat(f(Z)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=C[g.get(K.values().next().value)]:q=V(Z).y,Z.forEach(function(at){R.has(at)||(C[g.get(at)]=q)})},Ft=0;Ft<Ut.length;Ft++)Pt(Ft)}l.relativePlacementConstraint&&(function(){var F=new Map,Y=new Map,Z=new Map,K=new Map,q=new Map,at=new Map,ct=new Set,nt=new Set;if(R.forEach(function(Gt){ct.add(Gt),nt.add(Gt)}),l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var et=l.alignmentConstraint.vertical,j=function(yt){Z.set("dummy"+yt,[]),et[yt].forEach(function(Mt){F.set(Mt,"dummy"+yt),Z.get("dummy"+yt).push(Mt),R.has(Mt)&&ct.add("dummy"+yt)}),q.set("dummy"+yt,d[g.get(et[yt][0])])},dt=0;dt<et.length;dt++)j(dt);if(l.alignmentConstraint.horizontal)for(var At=l.alignmentConstraint.horizontal,pt=function(yt){K.set("dummy"+yt,[]),At[yt].forEach(function(Mt){Y.set(Mt,"dummy"+yt),K.get("dummy"+yt).push(Mt),R.has(Mt)&&nt.add("dummy"+yt)}),at.set("dummy"+yt,C[g.get(At[yt][0])])},xt=0;xt<At.length;xt++)pt(xt)}var lt=new Map,ot=new Map,Lt=function(yt){W.get(yt).forEach(function(Mt){var Zt=void 0,$t=void 0;Mt.direction=="horizontal"?(Zt=F.get(yt)?F.get(yt):yt,F.get(Mt.id)?$t={id:F.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,lt.has(Zt)?lt.get(Zt).push($t):lt.set(Zt,[$t]),lt.has($t.id)||lt.set($t.id,[])):(Zt=Y.get(yt)?Y.get(yt):yt,Y.get(Mt.id)?$t={id:Y.get(Mt.id),gap:Mt.gap,direction:Mt.direction}:$t=Mt,ot.has(Zt)?ot.get(Zt).push($t):ot.set(Zt,[$t]),ot.has($t.id)||ot.set($t.id,[]))})},ft=!0,st=!1,Xt=void 0;try{for(var Tt=W.keys()[Symbol.iterator](),Ct;!(ft=(Ct=Tt.next()).done);ft=!0){var Bt=Ct.value;Lt(Bt)}}catch(Gt){st=!0,Xt=Gt}finally{try{!ft&&Tt.return&&Tt.return()}finally{if(st)throw Xt}}var bt=E(lt),zt=E(ot),St=n(bt),kt=n(zt),Kt=p(lt),fe=p(ot),Qt=[],jt=[];St.forEach(function(Gt,yt){Qt[yt]=[],Gt.forEach(function(Mt){Kt.get(Mt).length==0&&Qt[yt].push(Mt)})}),kt.forEach(function(Gt,yt){jt[yt]=[],Gt.forEach(function(Mt){fe.get(Mt).length==0&&jt[yt].push(Mt)})});var _t=M(lt,"horizontal",ct,q,Qt),Jt=M(ot,"vertical",nt,at,jt),ne=function(yt){Z.get(yt)?Z.get(yt).forEach(function(Mt){d[g.get(Mt)]=_t.get(yt)}):d[g.get(yt)]=_t.get(yt)},te=!0,ee=!1,Ne=void 0;try{for(var ce=_t.keys()[Symbol.iterator](),Le;!(te=(Le=ce.next()).done);te=!0){var ge=Le.value;ne(ge)}}catch(Gt){ee=!0,Ne=Gt}finally{try{!te&&ce.return&&ce.return()}finally{if(ee)throw Ne}}var $e=function(yt){K.get(yt)?K.get(yt).forEach(function(Mt){C[g.get(Mt)]=Jt.get(yt)}):C[g.get(yt)]=Jt.get(yt)},ue=!0,Ce=!1,we=void 0;try{for(var de=Jt.keys()[Symbol.iterator](),Ae;!(ue=(Ae=de.next()).done);ue=!0){var ge=Ae.value;$e(ge)}}catch(Gt){Ce=!0,we=Gt}finally{try{!ue&&de.return&&de.return()}finally{if(Ce)throw we}}})()}for(var Yt=0;Yt<S.length;Yt++){var Vt=S[Yt];Vt.getChild()==null&&Vt.setCenter(d[g.get(Vt.id)],C[g.get(Vt.id)])}},i.exports=o}),551:(i=>{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(45);return h})()})})(he)),he.exports}var pr=se.exports,De;function yr(){return De||(De=1,(function(L,b){(function(G,N){L.exports=N(vr())})(pr,function(A){return(()=>{var G={658:(i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var a=arguments.length,f=Array(a>1?a-1:0),e=1;e<a;e++)f[e-1]=arguments[e];return f.forEach(function(u){Object.keys(u).forEach(function(t){return r[t]=u[t]})}),r}}),548:((i,r,a)=>{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),C;!(l=(C=d.next()).done)&&(c.push(C.value),!(o&&c.length===o));l=!0);}catch(S){T=!0,g=S}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=a(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var s={},o=0;o<t.length;o++)s[t[o].id()]=!0;var c=t.filter(function(l,T){typeof l=="number"&&(l=T);for(var g=l.parent()[0];g!=null;){if(s[g.id()])return!1;g=g.parent()[0]}return!0});return c},u.connectComponents=function(t,s,o,c){var l=new e,T=new Set,g=[],d=void 0,C=void 0,S=void 0,w=!1,P=1,B=[],U=[],V=function(){var _=t.collection();U.push(_);var n=o[0],E=t.collection();E.merge(n).merge(n.descendants().intersection(s)),g.push(n),E.forEach(function(y){l.push(y),T.add(y),_.merge(y)});for(var p=function(){n=l.shift();var I=t.collection();n.neighborhood().nodes().forEach(function(x){s.intersection(n.edgesWith(x)).length>0&&I.merge(x)});for(var O=0;O<I.length;O++){var R=I[O];if(d=o.intersection(R.union(R.ancestors())),d!=null&&!T.has(d[0])){var W=d.union(d.descendants());W.forEach(function(x){l.push(x),T.add(x),_.merge(x),o.has(x)&&g.push(x)})}}};l.length!=0;)p();if(_.forEach(function(y){s.intersection(y.connectedEdges()).forEach(function(I){_.has(I.source())&&_.has(I.target())&&_.merge(I)})}),g.length==o.length&&(w=!0),!w||w&&P>1){C=g[0],S=C.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length<S&&(S=y.connectedEdges().length,C=y)}),B.push(C.id());var m=t.collection();m.merge(g[0]),g.forEach(function(y){m.merge(y)}),g=[],o=o.difference(m),P++}};do V();while(!w);return c&&B.length>0&&c.set("dummy"+(c.size+1),B),U},u.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,C=!1,S=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var B=P.value,U=f(B,2),V=U[0],M=U[1],_=o.cy.getElementById(V);if(_){var n=_.boundingBox(),E=s.xCoords[M]-n.w/2,p=s.xCoords[M]+n.w/2,m=s.yCoords[M]-n.h/2,y=s.yCoords[M]+n.h/2;E<c&&(c=E),p>l&&(l=p),m<T&&(T=m),y>g&&(g=y)}}}catch(x){C=!0,S=x}finally{try{!d&&w.return&&w.return()}finally{if(C)throw S}}var I=t.x-(l+c)/2,O=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+O})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;z<c&&(c=z),X>l&&(l=X),rt<T&&(T=rt),$>g&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,C=void 0,S=void 0,w=void 0,P=void 0,B=t.descendants().not(":parent"),U=B.length,V=0;V<U;V++){var M=B[V];C=s[c.get(M.id())]-M.width()/2,S=s[c.get(M.id())]+M.width()/2,w=o[c.get(M.id())]-M.height()/2,P=o[c.get(M.id())]+M.height()/2,l>C&&(l=C),T<S&&(T=S),g>w&&(g=w),d<P&&(d=P)}var _={};return _.topLeftX=l,_.topLeftY=g,_.width=T-l,_.height=d-g,_},u.calcParentsWithoutChildren=function(t,s){var o=t.collection();return s.nodes(":parent").forEach(function(c){var l=!1;c.children().forEach(function(T){T.css("display")!="none"&&(l=!0)}),l||o.merge(c)}),o},i.exports=u}),816:((i,r,a)=>{var f=a(548),e=a(140).CoSELayout,u=a(140).CoSENode,t=a(140).layoutBase.PointD,s=a(140).layoutBase.DimensionD,o=a(140).layoutBase.LayoutConstants,c=a(140).layoutBase.FDLayoutConstants,l=a(140).CoSEConstants,T=function(d,C){var S=d.cy,w=d.eles,P=w.nodes(),B=w.edges(),U=void 0,V=void 0,M=void 0,_={};d.randomize&&(U=C.nodeIndexes,V=C.xCoords,M=C.yCoords);var n=function(x){return typeof x=="function"},E=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(S,w),m=function W(x,Q,z,X){for(var rt=Q.length,$=0;$<rt;$++){var D=Q[$],H=null;D.intersection(p).length==0&&(H=D.children());var k=void 0,tt=D.layoutDimensions({nodeDimensionsIncludeLabels:X.nodeDimensionsIncludeLabels});if(D.outerWidth()!=null&&D.outerHeight()!=null)if(X.randomize)if(!D.isParent())k=x.add(new u(z.graphManager,new t(V[U.get(D.id())]-tt.w/2,M[U.get(D.id())]-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else{var ht=f.calcBoundingBox(D,V,M,U);D.intersection(p).length==0?k=x.add(new u(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(ht.width,ht.height))):k=x.add(new u(z.graphManager,new t(ht.topLeftX,ht.topLeftY),new s(parseFloat(tt.w),parseFloat(tt.h))))}else k=x.add(new u(z.graphManager,new t(D.position("x")-tt.w/2,D.position("y")-tt.h/2),new s(parseFloat(tt.w),parseFloat(tt.h))));else k=x.add(new u(this.graphManager));if(k.id=D.data("id"),k.nodeRepulsion=E(X.nodeRepulsion,D),k.paddingLeft=parseInt(D.css("padding")),k.paddingTop=parseInt(D.css("padding")),k.paddingRight=parseInt(D.css("padding")),k.paddingBottom=parseInt(D.css("padding")),X.nodeDimensionsIncludeLabels&&(k.labelWidth=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,k.labelHeight=D.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,k.labelPosVertical=D.css("text-valign"),k.labelPosHorizontal=D.css("text-halign")),_[D.data("id")]=k,isNaN(k.rect.x)&&(k.rect.x=0),isNaN(k.rect.y)&&(k.rect.y=0),H!=null&&H.length>0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),k),W(J,H,z,X)}}},y=function(x,Q,z){for(var X=0,rt=0,$=0;$<z.length;$++){var D=z[$],H=_[D.data("source")],k=_[D.data("target")];if(H&&k&&H!==k&&H.getEdgesBetween(k).length==0){var tt=Q.add(x.newEdge(),H,k);tt.id=D.id(),tt.idealLength=E(d.idealEdgeLength,D),tt.edgeElasticity=E(d.edgeElasticity,D),X+=tt.idealLength,rt++}}d.idealEdgeLength!=null&&(rt>0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,R=O.newGraphManager();return m(R.addRoot(),f.getTopMostNodes(P),O,d),y(O,R,B),I(O,d),O.runLayout(),_};i.exports={coseLayout:T}}),212:((i,r,a)=>{var f=(function(){function d(C,S){for(var w=0;w<S.length;w++){var P=S[w];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(C,P.key,P)}}return function(C,S,w){return S&&d(C.prototype,S),w&&d(C,w),C}})();function e(d,C){if(!(d instanceof C))throw new TypeError("Cannot call a class as a function")}var u=a(658),t=a(548),s=a(657),o=s.spectralLayout,c=a(816),l=c.coseLayout,T=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(C){return 4500},idealEdgeLength:function(C){return 50},edgeElasticity:function(C){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),g=(function(){function d(C){e(this,d),this.options=u({},T,C)}return f(d,[{key:"run",value:function(){var S=this,w=this.options,P=w.cy,B=w.eles,U=[],V=[],M=void 0,_=[];w.fixedNodeConstraint&&(!Array.isArray(w.fixedNodeConstraint)||w.fixedNodeConstraint.length==0)&&(w.fixedNodeConstraint=void 0),w.alignmentConstraint&&(w.alignmentConstraint.vertical&&(!Array.isArray(w.alignmentConstraint.vertical)||w.alignmentConstraint.vertical.length==0)&&(w.alignmentConstraint.vertical=void 0),w.alignmentConstraint.horizontal&&(!Array.isArray(w.alignmentConstraint.horizontal)||w.alignmentConstraint.horizontal.length==0)&&(w.alignmentConstraint.horizontal=void 0)),w.relativePlacementConstraint&&(!Array.isArray(w.relativePlacementConstraint)||w.relativePlacementConstraint.length==0)&&(w.relativePlacementConstraint=void 0);var n=w.fixedNodeConstraint||w.alignmentConstraint||w.relativePlacementConstraint;n&&(w.tile=!1,w.packComponents=!1);var E=void 0,p=!1;if(P.layoutUtilities&&w.packComponents&&(E=P.layoutUtilities("get"),E||(E=P.layoutUtilities()),p=!0),B.nodes().length>0)if(p){var I=t.getTopMostNodes(w.eles.nodes());if(M=t.connectComponents(P,w.eles,I),M.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&M.forEach(function(vt){w.eles=vt,U.push(o(w))}),w.quality=="default"||w.quality=="proof"){var O=P.collection();if(w.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},X=[];if(M.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){O.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),O.length>1){var rt=O.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),M.push(O),U.push(z);for(var $=X.length-1;$>=0;$--)M.splice(X[$],1),U.splice(X[$],1),_.splice(X[$],1)}}M.forEach(function(vt,it){w.eles=vt,V.push(l(w,U[it])),t.relocateComponent(_[it],V[it],w)})}else M.forEach(function(vt,it){t.relocateComponent(_[it],U[it],w)});var D=new Set;if(M.length>1){var H=[],k=B.filter(function(vt){return vt.css("display")=="none"});M.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=U[it].nodeIndexes),vt.nodes().not(k).length>0){var Et={};Et.edges=[],Et.nodes=[];var wt=void 0;vt.nodes().not(k).forEach(function(Ot){if(w.quality=="draft")if(!Ot.isParent())wt=ut.get(Ot.id()),Et.nodes.push({x:U[it].xCoords[wt]-Ot.boundingbox().w/2,y:U[it].yCoords[wt]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var mt=t.calcBoundingBox(Ot,U[it].xCoords,U[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else V[it][Ot.id()]&&Et.nodes.push({x:V[it][Ot.id()].getLeft(),y:V[it][Ot.id()].getTop(),width:V[it][Ot.id()].getWidth(),height:V[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var mt=Ot.source(),Dt=Ot.target();if(mt.css("display")!="none"&&Dt.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Dt.id()),Ut=[],Pt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,U[it].xCoords,U[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[it].xCoords[Rt]),Ut.push(U[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[it].xCoords,U[it].yCoords,ut);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[it].xCoords[Ht]),Pt.push(U[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else V[it][mt.id()]&&V[it][Dt.id()]&&Et.edges.push({startX:V[it][mt.id()].getCenterX(),startY:V[it][mt.id()].getCenterY(),endX:V[it][Dt.id()].getCenterX(),endY:V[it][Dt.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),D.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")U.forEach(function(vt,it){var ut=vt.xCoords.map(function(wt){return wt+tt[it].dx}),Et=vt.yCoords.map(function(wt){return wt+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;D.forEach(function(vt){Object.keys(V[vt]).forEach(function(it){var ut=V[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(_.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);U.push(y)}w.quality=="default"||w.quality=="proof"?(V.push(l(w,U[0])),t.relocateComponent(_[0],V[0],w)):t.relocateComponent(_[0],U[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,wt=void 0,Ot=it.data("id");return V.forEach(function(Dt){Ot in Dt&&(Et={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},wt=Dt[Ot])}),w.nodeDimensionsIncludeLabels&&(wt.labelWidth&&(wt.labelPosHorizontal=="left"?Et.x+=wt.labelWidth/2:wt.labelPosHorizontal=="right"&&(Et.x-=wt.labelWidth/2)),wt.labelHeight&&(wt.labelPosVertical=="top"?Et.y+=wt.labelHeight/2:wt.labelPosVertical=="bottom"&&(Et.y-=wt.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,B),Nt=B.filter(function(vt){return vt.css("display")=="none"});w.eles=B.not(Nt),B.nodes().not(":parent").not(Nt).layoutPositions(S,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d})();i.exports=g}),657:((i,r,a)=>{var f=a(548),e=a(140).layoutBase.Matrix,u=a(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,C=new Map,S=new Map,w=[],P=[],B=[],U=[],V=[],M=[],_=[],n=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,I=o.samplingType,O=o.nodeSeparation,R=void 0,W=function(){for(var Y=0,Z=0,K=!1;Z<R;){Y=Math.floor(Math.random()*E),K=!1;for(var q=0;q<Z;q++)if(U[q]==Y){K=!0;break}if(!K)U[Z]=Y,Z++;else continue}},x=function(Y,Z,K){for(var q=[],at=0,ct=0,nt=0,et=void 0,j=[],dt=0,At=1,pt=0;pt<E;pt++)j[pt]=p;for(q[ct]=Y,j[Y]=0;ct>=at;){nt=q[at++];for(var xt=w[nt],lt=0;lt<xt.length;lt++)et=C.get(xt[lt]),j[et]==p&&(j[et]=j[nt]+1,q[++ct]=et);M[nt][Z]=j[nt]*O}if(K){for(var ot=0;ot<E;ot++)M[ot][Z]<V[ot]&&(V[ot]=M[ot][Z]);for(var Lt=0;Lt<E;Lt++)V[Lt]>dt&&(dt=V[Lt],At=Lt)}return At},Q=function(Y){var Z=void 0;if(Y){Z=Math.floor(Math.random()*E);for(var q=0;q<E;q++)V[q]=p;for(var at=0;at<R;at++)U[at]=Z,Z=x(Z,at,Y)}else{W();for(var K=0;K<R;K++)x(U[K],K,Y)}for(var ct=0;ct<E;ct++)for(var nt=0;nt<R;nt++)M[ct][nt]*=M[ct][nt];for(var et=0;et<R;et++)_[et]=[];for(var j=0;j<R;j++)for(var dt=0;dt<R;dt++)_[j][dt]=M[U[dt]][j]},z=function(){for(var Y=u.svd(_),Z=Y.S,K=Y.U,q=Y.V,at=Z[0]*Z[0]*Z[0],ct=[],nt=0;nt<R;nt++){ct[nt]=[];for(var et=0;et<R;et++)ct[nt][et]=0,nt==et&&(ct[nt][et]=Z[nt]/(Z[nt]*Z[nt]+at/(Z[nt]*Z[nt])))}n=e.multMat(e.multMat(q,ct),e.transpose(K))},X=function(){for(var Y=void 0,Z=void 0,K=[],q=[],at=[],ct=[],nt=0;nt<E;nt++)K[nt]=Math.random(),q[nt]=Math.random();K=e.normalize(K),q=e.normalize(q);for(var et=m,j=m,dt=void 0;;){for(var At=0;At<E;At++)at[At]=K[At];if(K=e.multGamma(e.multL(e.multGamma(at),M,n)),Y=e.dotProduct(at,K),K=e.normalize(K),et=e.dotProduct(at,K),dt=Math.abs(et/j),dt<=1+y&&dt>=1)break;j=et}for(var pt=0;pt<E;pt++)at[pt]=K[pt];for(j=m;;){for(var xt=0;xt<E;xt++)ct[xt]=q[xt];if(ct=e.minusOp(ct,e.multCons(at,e.dotProduct(at,ct))),q=e.multGamma(e.multL(e.multGamma(ct),M,n)),Z=e.dotProduct(ct,q),q=e.normalize(q),et=e.dotProduct(ct,q),dt=Math.abs(et/j),dt<=1+y&&dt>=1)break;j=et}for(var lt=0;lt<E;lt++)ct[lt]=q[lt];P=e.multCons(at,Math.sqrt(Math.abs(Y))),B=e.multCons(ct,Math.sqrt(Math.abs(Z)))};f.connectComponents(c,l,f.getTopMostNodes(T),d),g.forEach(function(F){f.connectComponents(c,l,f.getTopMostNodes(F.descendants().intersection(l)),d)});for(var rt=0,$=0;$<T.length;$++)T[$].isParent()||C.set(T[$].id(),rt++);var D=!0,H=!1,k=void 0;try{for(var tt=d.keys()[Symbol.iterator](),ht;!(D=(ht=tt.next()).done);D=!0){var J=ht.value;C.set(J,rt++)}}catch(F){H=!0,k=F}finally{try{!D&&tt.return&&tt.return()}finally{if(H)throw k}}for(var It=0;It<C.size;It++)w[It]=[];g.forEach(function(F){for(var Y=F.children().intersection(l);Y.nodes(":childless").length==0;)Y=Y.nodes()[0].children().intersection(l);var Z=0,K=Y.nodes(":childless")[0].connectedEdges().length;Y.nodes(":childless").forEach(function(q,at){q.connectedEdges().length<K&&(K=q.connectedEdges().length,Z=at)}),S.set(F.id(),Y.nodes(":childless")[Z].id())}),T.forEach(function(F){var Y=void 0;F.isParent()?Y=C.get(S.get(F.id())):Y=C.get(F.id()),F.neighborhood().nodes().forEach(function(Z){l.intersection(F.edgesWith(Z)).length>0&&(Z.isParent()?w[Y].push(S.get(Z.id())):w[Y].push(Z.id()))})});var Nt=function(Y){var Z=C.get(Y),K=void 0;d.get(Y).forEach(function(q){c.getElementById(q).isParent()?K=S.get(q):K=q,w[Z].push(K),w[C.get(K)].push(Y)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),wt;!(vt=(wt=Et.next()).done);vt=!0){var Ot=wt.value;Nt(Ot)}}catch(F){it=!0,ut=F}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=C.size;var mt=void 0;if(E>2){R=E<o.sampleSize?E:o.sampleSize;for(var Dt=0;Dt<E;Dt++)M[Dt]=[];for(var Rt=0;Rt<R;Rt++)n[Rt]=[];return o.quality=="draft"||o.step=="all"?(Q(I),z(),X(),mt={nodeIndexes:C,xCoords:P,yCoords:B}):(C.forEach(function(F,Y){P.push(c.getElementById(Y).position("x")),B.push(c.getElementById(Y).position("y"))}),mt={nodeIndexes:C,xCoords:P,yCoords:B}),mt}else{var Ht=C.keys(),Ut=c.getElementById(Ht.next().value),Pt=Ut.position(),Ft=Ut.outerWidth();if(P.push(Pt.x),B.push(Pt.y),E==2){var Yt=c.getElementById(Ht.next().value),Vt=Yt.outerWidth();P.push(Pt.x+Ft/2+Vt/2+o.idealEdgeLength),B.push(Pt.y)}return mt={nodeIndexes:C,xCoords:P,yCoords:B},mt}};i.exports={spectralLayout:t}}),579:((i,r,a)=>{var f=a(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),i.exports=e}),140:(i=>{i.exports=A})},N={};function v(i){var r=N[i];if(r!==void 0)return r.exports;var a=N[i]={exports:{}};return G[i](a,a.exports,v),a.exports}var h=v(579);return h})()})})(se)),se.exports}var mr=yr();const Er=cr(mr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:gt(L=>`${L},${L/2} 0,${L} 0,0`,"L"),R:gt(L=>`0,${L/2} ${L},0 ${L},${L}`,"R"),T:gt(L=>`0,0 ${L},0 ${L/2},${L}`,"T"),B:gt(L=>`${L/2},0 ${L},${L} 0,${L}`,"B")},oe={L:gt((L,b)=>L-b+2,"L"),R:gt((L,b)=>L-2,"R"),T:gt((L,b)=>L-b+2,"T"),B:gt((L,b)=>L-2,"B")},Tr=gt(function(L){return Wt(L)?L==="L"?"R":"L":L==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=gt(function(L){const b=L;return b==="L"||b==="R"||b==="T"||b==="B"},"isArchitectureDirection"),Wt=gt(function(L){const b=L;return b==="L"||b==="R"},"isArchitectureDirectionX"),qt=gt(function(L){const b=L;return b==="T"||b==="B"},"isArchitectureDirectionY"),Te=gt(function(L,b){const A=Wt(L)&&qt(b),G=qt(L)&&Wt(b);return A||G},"isArchitectureDirectionXY"),Nr=gt(function(L){const b=L[0],A=L[1],G=Wt(b)&&qt(A),N=qt(b)&&Wt(A);return G||N},"isArchitecturePairXY"),Lr=gt(function(L){return L!=="LL"&&L!=="RR"&&L!=="TT"&&L!=="BB"},"isValidArchitectureDirectionPair"),pe=gt(function(L,b){const A=`${L}${b}`;return Lr(A)?A:void 0},"getArchitectureDirectionPair"),Cr=gt(function([L,b],A){const G=A[0],N=A[1];return Wt(G)?qt(N)?[L+(G==="L"?-1:1),b+(N==="T"?1:-1)]:[L+(G==="L"?-1:1),b]:Wt(N)?[L+(N==="L"?1:-1),b+(G==="T"?1:-1)]:[L,b+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),wr=gt(function(L){return L==="LT"||L==="TL"?[1,1]:L==="BL"||L==="LB"?[1,-1]:L==="BR"||L==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=gt(function(L,b){return Te(L,b)?"bend":Wt(L)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=gt(function(L){return L.type==="service"},"isArchitectureService"),Or=gt(function(L){return L.type==="junction"},"isArchitectureJunction"),be=gt(L=>L.data(),"edgeData"),ie=gt(L=>L.data(),"nodeData"),Dr=ar.architecture,Pe=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Qe,this.getAccTitle=Je,this.setDiagramTitle=Ke,this.getDiagramTitle=je,this.getAccDescription=_e,this.setAccDescription=tr,this.clear()}static{gt(this,"ArchitectureDB")}setDiagramId(L){this.diagramId=L}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",er()}addService({id:L,icon:b,in:A,title:G,iconText:N}){if(this.registeredIds[L]!==void 0)throw new Error(`The service id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The service [${L}] cannot be placed within itself`);if(this.registeredIds[A]===void 0)throw new Error(`The service [${L}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[A]==="node")throw new Error(`The service [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"service",icon:b,iconText:N,title:G,edges:[],in:A}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:L,in:b}){if(this.registeredIds[L]!==void 0)throw new Error(`The junction id [${L}] is already in use by another ${this.registeredIds[L]}`);if(b!==void 0){if(L===b)throw new Error(`The junction [${L}] cannot be placed within itself`);if(this.registeredIds[b]===void 0)throw new Error(`The junction [${L}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[b]==="node")throw new Error(`The junction [${L}]'s parent is not a group`)}this.registeredIds[L]="node",this.nodes[L]={id:L,type:"junction",edges:[],in:b}}getJunctions(){return Object.values(this.nodes).filter(Or)}getNodes(){return Object.values(this.nodes)}getNode(L){return this.nodes[L]??null}addGroup({id:L,icon:b,in:A,title:G}){if(this.registeredIds?.[L]!==void 0)throw new Error(`The group id [${L}] is already in use by another ${this.registeredIds[L]}`);if(A!==void 0){if(L===A)throw new Error(`The group [${L}] cannot be placed within itself`);if(this.registeredIds?.[A]===void 0)throw new Error(`The group [${L}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[A]==="node")throw new Error(`The group [${L}]'s parent is not a group`)}this.registeredIds[L]="group",this.groups[L]={id:L,icon:b,title:G,in:A}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:L,rhsId:b,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:v,lhsGroup:h,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(A)}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${L}--${b}. Expected (L,R,T,B) got ${String(G)}`);if(this.nodes[L]===void 0&&this.groups[L]===void 0)throw new Error(`The left-hand id [${L}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[b]===void 0&&this.groups[b]===void 0)throw new Error(`The right-hand id [${b}] does not yet exist. Please create the service/group before declaring an edge to it.`);const a=this.nodes[L].in,f=this.nodes[b].in;if(h&&a&&f&&a==f)throw new Error(`The left-hand id [${L}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&a&&f&&a==f)throw new Error(`The right-hand id [${b}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const e={lhsId:L,lhsDir:A,lhsInto:N,lhsGroup:h,rhsId:b,rhsDir:G,rhsInto:v,rhsGroup:i,title:r};this.edges.push(e),this.nodes[L]&&this.nodes[b]&&(this.nodes[L].edges.push(this.edges[this.edges.length-1]),this.nodes[b].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(L){if(L.members.length<2)throw new Error(`An align directive requires at least two members; got ${L.members.length}`);const b=new Set;L.members.forEach(A=>{if(this.registeredIds[A]!=="node")throw new Error(`align ${L.direction} references [${A}], which is not a service or junction`);if(b.has(A))throw new Error(`align ${L.direction} lists [${A}] more than once`);b.add(A)}),this.layoutHints.push(L)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const L={},b=Object.entries(this.nodes).reduce((i,[r,a])=>(i[r]=a.edges.reduce((f,e)=>{const u=this.getNode(e.lhsId)?.in,t=this.getNode(e.rhsId)?.in;if(u&&t&&u!==t){const s=Ar(e.lhsDir,e.rhsDir);s!=="bend"&&(L[u]??={},L[u][t]=s,L[t]??={},L[t][u]=s)}if(e.lhsId===r){const s=pe(e.lhsDir,e.rhsDir);s&&(f[s]=e.rhsId)}else{const s=pe(e.rhsDir,e.lhsDir);s&&(f[s]=e.lhsId)}return f},{}),i),{}),A=Object.keys(b)[0],G={[A]:1},N=Object.keys(b).reduce((i,r)=>r===A?i:{...i,[r]:1},{}),v=gt(i=>{const r={[i]:[0,0]},a=[i];for(;a.length>0;){const f=a.shift();if(f){G[f]=1,delete N[f];const e=b[f],[u,t]=r[f];Object.entries(e).forEach(([s,o])=>{G[o]||(r[o]=Cr([u,t],s),a.push(o))})}}return r},"BFS"),h=[v(A)];for(;Object.keys(N).length>0;)h.push(v(Object.keys(N)[0]));this.dataStructures={adjList:b,spatialMaps:h,groupAlignments:L}}return this.dataStructures}setElementForId(L,b){this.elements[L]=b}getElementById(L){return this.elements[L]}getConfig(){return rr({...Dr,...ir().architecture})}getConfigField(L){return this.getConfig()[L]}},xr=gt((L,b)=>{ke(L,b),L.groups.map(A=>b.addGroup(A)),L.services.map(A=>b.addService({...A,type:"service"})),L.junctions.map(A=>b.addJunction({...A,type:"junction"})),L.edges.map(A=>b.addEdge(A)),L.alignments?.map(A=>b.addLayoutHint({direction:A.direction,members:[...A.members]}))},"populateDb"),Ge={parser:{yy:void 0},parse:gt(async L=>{const b=await fr("architecture",L);Se.debug(b);const A=Ge.parser?.yy;if(!(A instanceof Pe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");xr(b,A)},"parse")},Ir=gt(L=>` .edge { stroke-width: ${L.archEdgeWidth}; stroke: ${L.archEdgeColor}; diff --git a/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-Cp3c1EWu.js b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-DAH71x1Q.js similarity index 99% rename from apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-Cp3c1EWu.js rename to apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-DAH71x1Q.js index 64eddae6d..00c6788fa 100644 --- a/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-Cp3c1EWu.js +++ b/apps/kimi-code/dist-web/assets/blockDiagram-677ZJIJ3-DAH71x1Q.js @@ -1,4 +1,4 @@ -import{g as de}from"./chunk-5VM5RSS4-D5nhu_pI.js";import{aA as pe,aB as Kt,aC as fe,aD as xe,aE as ye,aF as be,aG as we,aH as me,aI as Se,aJ as Le,aK as ke,aL as ve,aM as Ee,aN as _e,aO as Te,aP as De,aQ as Be,aR as Ne,aS as Ie,aT as Ce,aU as Oe,aV as Re,aW as Ae,aX as ze,aY as Me,_ as g,z as rt,d as D,e as Pe,l as k,q as Fe,t as We,c as R,aZ as Ye,a7 as He,a8 as Ke,a3 as Ue,a_ as M,a$ as kt,b0 as Q,as as Xe,y as $,k as Ve,b1 as je,i as Ct,b2 as Ot,b3 as Ge}from"./mermaid.core-DpBz6UHc.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-DPT3_xql.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";function Je(e){return Array.isArray(e)}function Qe(e){if(pe(e))return e;const t=Kt(e);if(!$e(e))return{};if(Je(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(fe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?er(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Kt(e)){case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:case xe:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s<a.length;s++){const i=a[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function er(e,t){const a=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(s)>=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var bt=(function(){var e=g(function(T,m,p,x){for(p=p||{},x=T.length;x--;p[T[x]]=m);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],d=[1,23],b=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(m,p,x,L,E,o,F){var f=o.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",o[f-1]),L.setHierarchy(o[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:L.getLogger().debug("Rule: link: ",o[f],m),this.$={edgeTypeStr:o[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:const C=parseInt(o[f]),Z=L.generateId();this.$={id:Z,type:"space",label:"",width:C,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);const V=L.edgeStrToEdgeData(o[f-1].edgeTypeStr),at=L.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),gt=L.edgeStrToThickness(o[f-1].edgeTypeStr),O=L.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:gt,pattern:O,directions:o[f].directions,arrowTypeEnd:V,arrowTypeStart:at},{id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:L.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]),L.generateId(),this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);const j=L.generateId();this.$={id:j,type:"composite",label:"",children:o[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:d,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(w,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:b,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(m,p){if(p.recoverable)this.trace(m);else{var x=new Error(m);throw x.hash=p,x}},"parseError"),parse:g(function(m){var p=this,x=[0],L=[],E=[null],o=[],F=this.table,f="",C=0,Z=0,V=2,at=1,gt=o.slice.call(arguments,1),O=Object.create(this.lexer),j={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(j.yy[ut]=this.yy[ut]);O.setInput(m,j.yy),j.yy.lexer=O,j.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var dt=O.yylloc;o.push(dt);var ge=O.options&&O.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(W){x.length=x.length-2*W,E.length=E.length-W,o.length=o.length-W}g(ue,"popStack");function Nt(){var W;return W=L.pop()||O.lex()||at,typeof W!="number"&&(W instanceof Array&&(L=W,W=L.pop()),W=p.symbols_[W]||W),W}g(Nt,"lex");for(var P,q,H,pt,J={},st,G,It,it;;){if(q=x[x.length-1],this.defaultActions[q]?H=this.defaultActions[q]:((P===null||typeof P>"u")&&(P=Nt()),H=F[q]&&F[q][P]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in F[q])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");O.showPosition?ft="Parse error on line "+(C+1)+`: +import{g as de}from"./chunk-5VM5RSS4-BxdGGlTY.js";import{aA as pe,aB as Kt,aC as fe,aD as xe,aE as ye,aF as be,aG as we,aH as me,aI as Se,aJ as Le,aK as ke,aL as ve,aM as Ee,aN as _e,aO as Te,aP as De,aQ as Be,aR as Ne,aS as Ie,aT as Ce,aU as Oe,aV as Re,aW as Ae,aX as ze,aY as Me,_ as g,z as rt,d as D,e as Pe,l as k,q as Fe,t as We,c as R,aZ as Ye,a7 as He,a8 as Ke,a3 as Ue,a_ as M,a$ as kt,b0 as Q,as as Xe,y as $,k as Ve,b1 as je,i as Ct,b2 as Ot,b3 as Ge}from"./mermaid.core-BKBZnrB_.js";import{G as Ze}from"./graph-DOmOIIwC.js";import{c as qe}from"./channel-C2KMAw2n.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";function Je(e){return Array.isArray(e)}function Qe(e){if(pe(e))return e;const t=Kt(e);if(!$e(e))return{};if(Je(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(fe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?er(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Kt(e)){case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:case xe:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s<a.length;s++){const i=a[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function er(e,t){const a=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(s)>=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var bt=(function(){var e=g(function(T,m,p,x){for(p=p||{},x=T.length;x--;p[T[x]]=m);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],u=[8,30],h=[8,10,21,28,29,30,31,39,43,46],d=[1,23],b=[1,24],w=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(m,p,x,L,E,o,F){var f=o.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",o[f-1]),L.setHierarchy(o[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:L.getLogger().debug("Rule: link: ",o[f],m),this.$={edgeTypeStr:o[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:const C=parseInt(o[f]),Z=L.generateId();this.$={id:Z,type:"space",label:"",width:C,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);const V=L.edgeStrToEdgeData(o[f-1].edgeTypeStr),at=L.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),gt=L.edgeStrToThickness(o[f-1].edgeTypeStr),O=L.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:gt,pattern:O,directions:o[f].directions,arrowTypeEnd:V,arrowTypeStart:at},{id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:L.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:L.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]),L.generateId(),this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);const j=L.generateId();this.$={id:j,type:"composite",label:"",children:o[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:d,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(w,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(w,[2,24]),{10:t,11:37,13:4,14:22,15:d,16:b,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(w,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(h,[2,27]),e(y,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(m,p){if(p.recoverable)this.trace(m);else{var x=new Error(m);throw x.hash=p,x}},"parseError"),parse:g(function(m){var p=this,x=[0],L=[],E=[null],o=[],F=this.table,f="",C=0,Z=0,V=2,at=1,gt=o.slice.call(arguments,1),O=Object.create(this.lexer),j={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(j.yy[ut]=this.yy[ut]);O.setInput(m,j.yy),j.yy.lexer=O,j.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var dt=O.yylloc;o.push(dt);var ge=O.options&&O.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(W){x.length=x.length-2*W,E.length=E.length-W,o.length=o.length-W}g(ue,"popStack");function Nt(){var W;return W=L.pop()||O.lex()||at,typeof W!="number"&&(W instanceof Array&&(L=W,W=L.pop()),W=p.symbols_[W]||W),W}g(Nt,"lex");for(var P,q,H,pt,J={},st,G,It,it;;){if(q=x[x.length-1],this.defaultActions[q]?H=this.defaultActions[q]:((P===null||typeof P>"u")&&(P=Nt()),H=F[q]&&F[q][P]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in F[q])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");O.showPosition?ft="Parse error on line "+(C+1)+`: `+O.showPosition()+` Expecting `+it.join(", ")+", got '"+(this.terminals_[P]||P)+"'":ft="Parse error on line "+(C+1)+": Unexpected "+(P==at?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(ft,{text:O.match,token:this.terminals_[P]||P,line:O.yylineno,loc:dt,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+P);switch(H[0]){case 1:x.push(P),E.push(O.yytext),o.push(O.yylloc),x.push(H[1]),P=null,Z=O.yyleng,f=O.yytext,C=O.yylineno,dt=O.yylloc;break;case 2:if(G=this.productions_[H[1]][1],J.$=E[E.length-G],J._$={first_line:o[o.length-(G||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(G||1)].first_column,last_column:o[o.length-1].last_column},ge&&(J._$.range=[o[o.length-(G||1)].range[0],o[o.length-1].range[1]]),pt=this.performAction.apply(J,[f,Z,C,j.yy,H[1],E,o].concat(gt)),typeof pt<"u")return pt;G&&(x=x.slice(0,-1*G*2),E=E.slice(0,-1*G),o=o.slice(0,-1*G)),x.push(this.productions_[H[1]][0]),E.push(J.$),o.push(J._$),It=F[x[x.length-2]][x[x.length-1]],x.push(It);break;case 3:return!0}}return!0},"parse")},N=(function(){var T={EOF:1,parseError:g(function(p,x){if(this.yy.parser)this.yy.parser.parseError(p,x);else throw new Error(p)},"parseError"),setInput:g(function(m,p){return this.yy=p||this.yy||{},this._input=m,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var p=m.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},"input"),unput:g(function(m){var p=m.length,x=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===L.length?this.yylloc.first_column:0)+L[L.length-x.length].length-x[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(m){this.unput(this.match.slice(m))},"less"),pastInput:g(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var m=this.pastInput(),p=new Array(m.length+1).join("-");return m+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Dus3HzI2.js b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Pb2vyZDT.js similarity index 99% rename from apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Dus3HzI2.js rename to apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Pb2vyZDT.js index d4d8cfc8c..352c27be2 100644 --- a/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Dus3HzI2.js +++ b/apps/kimi-code/dist-web/assets/c4Diagram-LMCZKHZV-Pb2vyZDT.js @@ -1,4 +1,4 @@ -import{g as Oe,d as Re}from"./chunk-32BRIVSS-Dx199TNh.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var jt=(function(){var e=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Rt){var f=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`: +import{g as Oe,d as Re}from"./chunk-32BRIVSS-CZoTGle4.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-BKBZnrB_.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var jt=(function(){var e=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ot=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Qt={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,E,b,R,h,Rt){var f=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`: `+D.showPosition()+` Expecting `+Lt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Kt="Parse error on line "+(Et+1)+": Unexpected "+(I==le?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Kt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:qt,expected:Lt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+I);switch(N[0]){case 1:E.push(I),R.push(D.yytext),h.push(D.yylloc),E.push(N[1]),I=null,re=D.yyleng,f=D.yytext,Et=D.yylineno,qt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},we&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Gt=this.performAction.apply(wt,[f,re,Et,At.yy,N[1],R,h].concat(Ce)),typeof Gt<"u")return Gt;W&&(E=E.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),E.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ce=Rt[E[E.length-2]][E[E.length-1]],E.push(ce);break;case 3:return!0}}return!0},"parse")},Ae=(function(){var _t={EOF:1,parseError:y(function(v,E){if(this.yy.parser)this.yy.parser.parseError(v,E);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,E=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===b.length?this.yylloc.first_column:0)+b[b.length-E.length].length-E[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/channel-C2KMAw2n.js b/apps/kimi-code/dist-web/assets/channel-C2KMAw2n.js new file mode 100644 index 000000000..cef64dad4 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/channel-C2KMAw2n.js @@ -0,0 +1 @@ +import{U as a,C as n}from"./mermaid.core-BKBZnrB_.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/kimi-code/dist-web/assets/channel-DPT3_xql.js b/apps/kimi-code/dist-web/assets/channel-DPT3_xql.js deleted file mode 100644 index c57055344..000000000 --- a/apps/kimi-code/dist-web/assets/channel-DPT3_xql.js +++ /dev/null @@ -1 +0,0 @@ -import{U as a,C as n}from"./mermaid.core-DpBz6UHc.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-CqtdGPMZ.js b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-vvrZ7MG7.js similarity index 67% rename from apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-CqtdGPMZ.js rename to apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-vvrZ7MG7.js index 4ea053058..7e0b10f30 100644 --- a/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-CqtdGPMZ.js +++ b/apps/kimi-code/dist-web/assets/chunk-2Q5K7J3B-vvrZ7MG7.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-DpBz6UHc.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I}; +import{_ as i}from"./mermaid.core-BKBZnrB_.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I}; diff --git a/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-Dx199TNh.js b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-CZoTGle4.js similarity index 96% rename from apps/kimi-code/dist-web/assets/chunk-32BRIVSS-Dx199TNh.js rename to apps/kimi-code/dist-web/assets/chunk-32BRIVSS-CZoTGle4.js index cde86f94e..48da1a199 100644 --- a/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-Dx199TNh.js +++ b/apps/kimi-code/dist-web/assets/chunk-32BRIVSS-CZoTGle4.js @@ -1 +1 @@ -import{_ as i,d as l,n as d,j as o}from"./mermaid.core-DpBz6UHc.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,g as c,x as d,m as e,w as f,h as g,y as h}; +import{_ as i,d as l,n as d,j as o}from"./mermaid.core-BKBZnrB_.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{p as a,f as b,g as c,x as d,m as e,w as f,h as g,y as h}; diff --git a/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-D5nhu_pI.js b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-BxdGGlTY.js similarity index 83% rename from apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-D5nhu_pI.js rename to apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-BxdGGlTY.js index 8149e170a..b2ab05e6f 100644 --- a/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-D5nhu_pI.js +++ b/apps/kimi-code/dist-web/assets/chunk-5VM5RSS4-BxdGGlTY.js @@ -1,4 +1,4 @@ -import{_ as e}from"./mermaid.core-DpBz6UHc.js";var l=e(()=>` +import{_ as e}from"./mermaid.core-BKBZnrB_.js";var l=e(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; diff --git a/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-5GJmdVbS.js b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-CfpEIqXB.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-5GJmdVbS.js rename to apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-CfpEIqXB.js index 64e467ea3..fd0304d47 100644 --- a/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-5GJmdVbS.js +++ b/apps/kimi-code/dist-web/assets/chunk-EX3LRPZG-CfpEIqXB.js @@ -1,4 +1,4 @@ -import{g as te}from"./chunk-XXDRQBXY-BYo5O_6D.js";import{s as ee}from"./chunk-VR4S4FIN-JAO0vJUe.js";import{_ as f,l as _,c as $,x as se,y as ie,a as re,b as ae,g as ne,s as oe,o as le,p as ce,a9 as he,k as j,q as ue,d as bt,a5 as de}from"./mermaid.core-DpBz6UHc.js";import{f as fe}from"./chunk-32BRIVSS-Dx199TNh.js";var vt=(function(){var t=f(function(V,a,d,r){for(d=d||{},r=V.length;r--;d[V[r]]=a);return d},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],O=[1,33],x=[1,20],k=[1,21],u=[1,22],L=[1,23],I=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],w=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,d,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:O,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:O,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,d){if(d.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=d,r}},"parseError"),parse:f(function(a){var d=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(N){r.length=r.length-2*N,E.length=E.length-N,i.length=i.length-N}f(Zt,"popStack");function Lt(){var N;return N=g.pop()||b.lex()||Q,typeof N!="number"&&(N instanceof Array&&(g=N,N=g.pop()),N=d.symbols_[N]||N),N}f(Lt,"lex");for(var A,W,R,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?R=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),R=B[W]&&B[W][A]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`: +import{g as te}from"./chunk-XXDRQBXY-BeefoqH0.js";import{s as ee}from"./chunk-VR4S4FIN-CTR9P-lT.js";import{_ as f,l as _,c as $,x as se,y as ie,a as re,b as ae,g as ne,s as oe,o as le,p as ce,a9 as he,k as j,q as ue,d as bt,a5 as de}from"./mermaid.core-BKBZnrB_.js";import{f as fe}from"./chunk-32BRIVSS-CZoTGle4.js";var vt=(function(){var t=f(function(V,a,d,r){for(d=d||{},r=V.length;r--;d[V[r]]=a);return d},"o"),e=[1,2],o=[1,3],s=[1,4],c=[2,4],h=[1,9],p=[1,11],y=[1,16],n=[1,17],T=[1,18],m=[1,19],O=[1,33],x=[1,20],k=[1,21],u=[1,22],L=[1,23],I=[1,24],v=[1,26],F=[1,27],C=[1,28],P=[1,29],w=[1,30],H=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],z=[1,34],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(a,d,r,g,E,i,B){var l=i.length-1;switch(E){case 3:return g.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const Q=i[l-1];Q.description=g.trimColon(i[l]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=g.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var Y=i[l],K=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");Y=ht[0],K=[K,ht[1]]}this.$={stmt:"state",id:Y,type:"default",description:K};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],c,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:y,17:n,19:T,22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,40],15:[1,41]}),t(S,[2,16]),{18:[1,42]},t(S,[2,18],{20:[1,43]}),{23:[1,44]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(S,[2,28]),{34:[1,49]},{36:[1,50]},t(S,[2,31]),{13:51,24:O,57:z},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(S,[2,38]),t(S,[2,39]),t(S,[2,40]),t(S,[2,41]),t(S,[2,6]),t(S,[2,13]),{13:58,24:O,57:z},t(S,[2,17]),t(xt,c,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(S,[2,29]),t(S,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(S,[2,14],{14:[1,71]}),{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,72],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(S,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(S,[2,15]),t(S,[2,19]),t(xt,c,{7:78}),t(S,[2,26]),t(S,[2,27]),{5:[1,79]},{5:[1,80]},{4:h,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:y,17:n,19:T,21:[1,81],22:m,24:O,25:x,26:k,27:u,28:L,29:I,32:25,33:v,35:F,37:C,38:P,41:w,45:H,48:it,51:rt,52:at,53:nt,54:ot,57:z},t(S,[2,32]),t(S,[2,33]),t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,d){if(d.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=d,r}},"parseError"),parse:f(function(a){var d=this,r=[0],g=[],E=[null],i=[],B=this.table,l="",Y=0,K=0,ht=2,Q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),U={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(U.yy[Tt]=this.yy[Tt]);b.setInput(a,U.yy),U.yy.lexer=b,U.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var Qt=b.options&&b.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(N){r.length=r.length-2*N,E.length=E.length-N,i.length=i.length-N}f(Zt,"popStack");function Lt(){var N;return N=g.pop()||b.lex()||Q,typeof N!="number"&&(N instanceof Array&&(g=N,N=g.pop()),N=d.symbols_[N]||N),N}f(Lt,"lex");for(var A,W,R,_t,X={},ut,G,It,dt;;){if(W=r[r.length-1],this.defaultActions[W]?R=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=Lt()),R=B[W]&&B[W][A]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in B[W])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(Y+1)+`: `+b.showPosition()+` Expecting `+dt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":mt="Parse error on line "+(Y+1)+": Unexpected "+(A==Q?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[A]||A,line:b.yylineno,loc:Et,expected:dt})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(R[0]){case 1:r.push(A),E.push(b.yytext),i.push(b.yylloc),r.push(R[1]),A=null,K=b.yyleng,l=b.yytext,Y=b.yylineno,Et=b.yylloc;break;case 2:if(G=this.productions_[R[1]][1],X.$=E[E.length-G],X._$={first_line:i[i.length-(G||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(G||1)].first_column,last_column:i[i.length-1].last_column},Qt&&(X._$.range=[i[i.length-(G||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(X,[l,K,Y,U.yy,R[1],E,i].concat(gt)),typeof _t<"u")return _t;G&&(r=r.slice(0,-1*G*2),E=E.slice(0,-1*G),i=i.slice(0,-1*G)),r.push(this.productions_[R[1]][0]),E.push(X.$),i.push(X._$),It=B[r[r.length-2]][r[r.length-1]],r.push(It);break;case 3:return!0}}return!0},"parse")},qt=(function(){var V={EOF:1,parseError:f(function(d,r){if(this.yy.parser)this.yy.parser.parseError(d,r);else throw new Error(d)},"parseError"),setInput:f(function(a,d){return this.yy=d||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var d=a.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var d=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===g.length?this.yylloc.first_column:0)+g[g.length-r.length].length-r[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-BtckK32c.js b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-D0FrOBtU.js similarity index 71% rename from apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-BtckK32c.js rename to apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-D0FrOBtU.js index 68ab08f9e..198d2d4e8 100644 --- a/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-BtckK32c.js +++ b/apps/kimi-code/dist-web/assets/chunk-JWPE2WC7-D0FrOBtU.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-DpBz6UHc.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p}; +import{_ as i}from"./mermaid.core-BKBZnrB_.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p}; diff --git a/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-B49sRSVS.js b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-BWl8WxOI.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-B49sRSVS.js rename to apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-BWl8WxOI.js index a8a3bc17a..5137cf21a 100644 --- a/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-B49sRSVS.js +++ b/apps/kimi-code/dist-web/assets/chunk-MOJQB5TN-BWl8WxOI.js @@ -1,4 +1,4 @@ -import{_ as p,l as w,F as L,z as E,q as I,W as X,e as q,i as H,c as G}from"./mermaid.core-DpBz6UHc.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,G()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),I(),w.debug("[Railroad] Database cleared")},"clear"),W=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),_=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,` +import{_ as p,l as w,F as L,z as E,q as I,W as X,e as q,i as H,c as G}from"./mermaid.core-BKBZnrB_.js";var z="",b="",N="",A=[],R=new Map,k=p(e=>H(e,G()),"sanitizeText"),F=p(e=>{switch(e.type){case"terminal":return{...e,value:k(e.value)};case"nonterminal":return{...e,name:k(e.name)};case"sequence":return{...e,elements:e.elements.map(F)};case"choice":return{...e,alternatives:e.alternatives.map(F)};case"optional":return{...e,element:F(e.element)};case"repetition":return{...e,element:F(e.element),separator:e.separator?F(e.separator):void 0};case"special":return{...e,text:k(e.text)}}},"sanitizeAstNode"),U=p(()=>{z="",b="",N="",A.length=0,R.clear(),I(),w.debug("[Railroad] Database cleared")},"clear"),W=p(e=>{z=k(e),w.debug("[Railroad] Title set:",e)},"setTitle"),_=p(()=>z,"getTitle"),j=p(e=>{const i={...e,name:k(e.name),definition:F(e.definition),comment:e.comment?k(e.comment):void 0};w.debug("[Railroad] Adding rule:",i.name),R.has(i.name)&&w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),A.push(i),R.set(i.name,i)},"addRule"),K=p(()=>A,"getRules"),J=p(e=>R.get(e),"getRule"),Q=p(e=>{b=k(e).replace(/^\s+/g,""),w.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Z=p(()=>b,"getAccTitle"),V=p(e=>{N=k(e).replace(/\n\s+/g,` `),w.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ee=p(()=>N,"getAccDescription"),te=W,re=_,ie={clear:U,setTitle:W,getTitle:_,addRule:j,getRules:K,getRule:J,setAccTitle:Q,getAccTitle:Z,setAccDescription:V,getAccDescription:ee,setDiagramTitle:te,getDiagramTitle:re},g={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},ne=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,ae=/^[\w "',.-]+$/,oe=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),B=p(e=>e?Object.keys(e).every(i=>i==="railroad"||oe.has(i)):!1,"isRailroadStyleOptions"),le=p(e=>e?"railroad"in e&&e.railroad?e.railroad:B(e)?e:{}:{},"extractRailroadOverrides"),se=p(e=>{if(!e||B(e))return{};const{railroad:i,svgId:a,theme:r,look:t,...n}=e;return n},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ne.test(a)?a:i},"sanitizeColorValue"),Y=p((e,i)=>{if(typeof e!="string")return i;const a=e.trim();return ae.test(a)?a:i},"sanitizeFontFamilyValue"),S=p((e,i)=>{const a=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(a)&&a>=0?a:i},"sanitizeNumberValue"),de=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),ce=p(e=>{const i=Y(e.fontFamily,g.fontFamily),a=de(e.fontSize)??g.fontSize;return{...g,fontFamily:i,fontSize:a,terminalFill:m(e.secondBkg??e.secondaryColor,g.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,g.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,g.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,g.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,g.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,g.nonTerminalTextColor),lineColor:m(e.lineColor,g.lineColor),markerFill:m(e.lineColor,g.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,g.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,g.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,g.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,g.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,g.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,g.ruleNameColor)}},"buildThemeDefaults"),M=p(e=>{const i=E(),a={...X(),...i.themeVariables??{},...se(e)},r=ce(a),t={...i.railroad??{},...le(e)};return{compactMode:t.compactMode??r.compactMode,padding:S(t.padding,r.padding),verticalSeparation:S(t.verticalSeparation,r.verticalSeparation),horizontalSeparation:S(t.horizontalSeparation,r.horizontalSeparation),arcRadius:S(t.arcRadius,r.arcRadius),fontSize:S(t.fontSize,r.fontSize),fontFamily:Y(t.fontFamily,r.fontFamily),terminalFill:m(t.terminalFill,r.terminalFill),terminalStroke:m(t.terminalStroke,r.terminalStroke),terminalTextColor:m(t.terminalTextColor,r.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:m(t.lineColor,r.lineColor),strokeWidth:S(t.strokeWidth,r.strokeWidth),markerFill:m(t.markerFill,r.markerFill),commentFill:m(t.commentFill,r.commentFill),commentStroke:m(t.commentStroke,r.commentStroke),commentTextColor:m(t.commentTextColor,r.commentTextColor),specialFill:m(t.specialFill,r.specialFill),specialStroke:m(t.specialStroke,r.specialStroke),ruleNameColor:m(t.ruleNameColor,r.ruleNameColor),showMarkers:t.showMarkers??r.showMarkers,markerRadius:S(t.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),ue=p(e=>{const{fontFamily:i,fontSize:a,terminalFill:r,terminalStroke:t,terminalTextColor:n,nonTerminalFill:h,nonTerminalStroke:s,nonTerminalTextColor:o,lineColor:u,strokeWidth:c,markerFill:d,commentFill:x,commentStroke:l,commentTextColor:f,specialFill:y,specialStroke:v,ruleNameColor:C}=M(e);return` .railroad-diagram { font-family: ${i}; diff --git a/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DYUKYgim.js b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DPVXfp-M.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DYUKYgim.js rename to apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DPVXfp-M.js index d2e328936..da580cd26 100644 --- a/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DYUKYgim.js +++ b/apps/kimi-code/dist-web/assets/chunk-RYQCIY6F-DPVXfp-M.js @@ -1 +1 @@ -import{_ as u,l as i}from"./mermaid.core-DpBz6UHc.js";import{i as m,G as y}from"./graph-DOmOIIwC.js";import{b as _,m as X}from"./map-DxJ2ADlA.js";var j=4;function p(e){return _(e,j)}function C(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:F(e),edges:M(e)};return m(e.graph())||(r.value=p(e.graph())),r}function F(e){return X(e.nodes(),function(r){var n=e.node(r),s=e.parent(r),t={v:r};return m(n)||(t.value=n),m(s)||(t.parent=s),t})}function M(e){return X(e.edges(),function(r){var n=e.edge(r),s={v:r.v,w:r.w};return m(r.name)||(s.name=r.name),m(n)||(s.value=n),s})}var c=new Map,w=new Map,A=new Map,J=u(()=>{w.clear(),A.clear(),c.clear()},"clear"),v=u((e,r)=>{const n=w.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),R=u((e,r)=>{const n=w.get(r)||[];return i.info("Descendants of ",r," is ",n),i.info("Edge is ",e),e.v===r||e.w===r?!1:n?n.includes(e.v)||v(e.v,r)||v(e.w,r)||n.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),b=u((e,r,n,s)=>{i.warn("Copying children of ",e,"root",s,"data",r.node(e),s);const t=r.children(e)||[];e!==s&&t.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",t),t.forEach(o=>{if(r.children(o).length>0)b(o,r,n,s);else{const l=r.node(o);i.info("cp ",o," to ",s," with parent ",e),n.setNode(o,l),s!==r.parent(o)&&(i.warn("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o))),e!==s&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",s,"data",r.node(e),s),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==s,"node!==clusterId",o!==e));const f=r.edges(o);i.debug("Copying Edges",f),f.forEach(a=>{i.info("Edge",a);const d=r.edge(a.v,a.w,a.name);i.info("Edge data",d,s);try{if(R(a,s)){const g=w.get(s)||[],E=g.includes(a.v)||v(a.v,s)||a.v===s,x=g.includes(a.w)||v(a.w,s)||a.w===s;if(E&&x)i.info("Copying as ",a.v,a.w,d,a.name),n.setEdge(a.v,a.w,d,a.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else{const N=E?s:a.v,h=x?s:a.w;i.info("Rebinding cross-boundary edge as ",N,h,d,a.name),r.setEdge(N,h,d,a.name)}}else i.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",s," clusterId:",e)}catch(g){i.error(g)}})}i.debug("Removing node",o),r.removeNode(o)})},"copy"),O=u((e,r)=>{const n=r.children(e);let s=[...n];for(const t of n)A.set(t,e),s=[...s,...O(t,r)];return s},"extractDescendants"),P=u((e,r,n)=>{const s=e.edges().filter(a=>a.v===r||a.w===r),t=e.edges().filter(a=>a.v===n||a.w===n),o=s.map(a=>({v:a.v===r?n:a.v,w:a.w===r?r:a.w})),l=t.map(a=>({v:a.v,w:a.w}));return o.filter(a=>l.some(d=>a.v===d.v&&a.w===d.w))},"findCommonEdges"),D=u((e,r,n)=>{const s=r.children(e);if(i.trace("Searching children of id ",e,s),s.length<1)return e;let t;for(const o of s){const l=D(o,r,n),f=P(r,n,l);if(l)if(f.length>0)t=l;else return l}return t},"findNonClusterChild"),S=u(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),U=u((e,r)=>{if(!e||r>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),w.set(n,O(n,e)),c.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const s=e.children(n),t=e.edges();s.length>0?(i.debug("Cluster identified",n,w),t.forEach(o=>{const l=v(o.v,n),f=v(o.w,n);l^f&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",w.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,w)});for(let n of c.keys()){const s=c.get(n).id,t=e.parent(s);t!==n&&c.has(t)&&!c.get(t).externalConnections&&(c.get(n).id=t);const o=e.edges().some(l=>l.v===n);if(s&&c.get(n)?.externalConnections&&o&&L(e,s,n)){const l=T(e,n,e.parent(s));l&&(c.get(n).id=l)}}e.edges().forEach(function(n){const s=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let t=n.v,o=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),t=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),t!==n.v){const l=e.parent(t);c.get(l).externalConnections=!0,s.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);c.get(l).externalConnections=!0,s.toCluster=n.w}i.warn("Fix Replacing with XXX",t,o,n.name),e.setEdge(t,o,s,n.name)}}),i.warn("Adjusted Graph",C(e)),k(e,0),i.trace(c)},"adjustClustersAndEdges"),k=u((e,r)=>{if(i.warn("extractor - ",r,C(e),e.children("D")),r>10){i.error("Bailing out");return}let n=e.nodes(),s=!1;for(const t of n){const o=e.children(t);s=s||o.length>0}if(!s){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,r);for(const t of n)if(i.debug("Extracting node",t,c,c.has(t)&&!c.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",r),!c.has(t))i.debug("Not a cluster",t,r);else if(c.get(t)?.clusterData?.explicitDir&&e.children(t)&&e.children(t).length>0){i.warn("Cluster with explicit dir, creating subgraph for children",t,r);const o=c.get(t).clusterData.dir,l=new y({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,l,t);const f=e.node(t)||{};e.setNode(t,{...f,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:l}),i.warn("Subgraph for cluster with explicit dir created:",t,C(l))}else if(!c.get(t).externalConnections&&e.children(t)&&e.children(t).length>0){i.warn("Cluster without external connections, without a parent and with children",t,r);let l=e.graph().rankdir==="TB"?"LR":"TB";c.get(t)?.clusterData?.dir&&(l=c.get(t).clusterData.dir,i.warn("Fixing dir",c.get(t).clusterData.dir,l));const f=new y({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,f,t);const a=e.node(t)||{};e.setNode(t,{...a,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:f}),i.debug("Old graph after copy",C(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!c.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&e.children(t).length>0,e.children("D"),r),i.debug(c);n=e.nodes(),i.warn("New list of nodes",n);for(const t of n){const o=e.node(t);i.warn(" Now next level",t,o),o?.clusterNode&&k(o.graph,r+1)}},"extractor"),B=u((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach(s=>{const t=e.children(s),o=B(e,t);n=[...n,...o]}),n},"sorter"),W=u(e=>B(e,e.children()),"sortNodesByHierarchy"),L=u((e,r,n)=>{let s=e.parent(r);for(;s&&s!==n;){const t=c.get(s);if(t&&!t.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),T=u((e,r,n)=>{const s=e.children(r)??[];for(const t of s){if(t===n||v(t,n))continue;const o=D(t,e,r);if(o&&!L(e,o,r))return o}return null},"findSafeAnchorNode");export{U as a,c as b,J as c,D as f,W as s,C as w}; +import{_ as u,l as i}from"./mermaid.core-BKBZnrB_.js";import{i as m,G as y}from"./graph-DOmOIIwC.js";import{b as _,m as X}from"./map-DxJ2ADlA.js";var j=4;function p(e){return _(e,j)}function C(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:F(e),edges:M(e)};return m(e.graph())||(r.value=p(e.graph())),r}function F(e){return X(e.nodes(),function(r){var n=e.node(r),s=e.parent(r),t={v:r};return m(n)||(t.value=n),m(s)||(t.parent=s),t})}function M(e){return X(e.edges(),function(r){var n=e.edge(r),s={v:r.v,w:r.w};return m(r.name)||(s.name=r.name),m(n)||(s.value=n),s})}var c=new Map,w=new Map,A=new Map,J=u(()=>{w.clear(),A.clear(),c.clear()},"clear"),v=u((e,r)=>{const n=w.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),R=u((e,r)=>{const n=w.get(r)||[];return i.info("Descendants of ",r," is ",n),i.info("Edge is ",e),e.v===r||e.w===r?!1:n?n.includes(e.v)||v(e.v,r)||v(e.w,r)||n.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),b=u((e,r,n,s)=>{i.warn("Copying children of ",e,"root",s,"data",r.node(e),s);const t=r.children(e)||[];e!==s&&t.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",t),t.forEach(o=>{if(r.children(o).length>0)b(o,r,n,s);else{const l=r.node(o);i.info("cp ",o," to ",s," with parent ",e),n.setNode(o,l),s!==r.parent(o)&&(i.warn("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o))),e!==s&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",s,"data",r.node(e),s),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==s,"node!==clusterId",o!==e));const f=r.edges(o);i.debug("Copying Edges",f),f.forEach(a=>{i.info("Edge",a);const d=r.edge(a.v,a.w,a.name);i.info("Edge data",d,s);try{if(R(a,s)){const g=w.get(s)||[],E=g.includes(a.v)||v(a.v,s)||a.v===s,x=g.includes(a.w)||v(a.w,s)||a.w===s;if(E&&x)i.info("Copying as ",a.v,a.w,d,a.name),n.setEdge(a.v,a.w,d,a.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else{const N=E?s:a.v,h=x?s:a.w;i.info("Rebinding cross-boundary edge as ",N,h,d,a.name),r.setEdge(N,h,d,a.name)}}else i.info("Skipping copy of edge ",a.v,"-->",a.w," rootId: ",s," clusterId:",e)}catch(g){i.error(g)}})}i.debug("Removing node",o),r.removeNode(o)})},"copy"),O=u((e,r)=>{const n=r.children(e);let s=[...n];for(const t of n)A.set(t,e),s=[...s,...O(t,r)];return s},"extractDescendants"),P=u((e,r,n)=>{const s=e.edges().filter(a=>a.v===r||a.w===r),t=e.edges().filter(a=>a.v===n||a.w===n),o=s.map(a=>({v:a.v===r?n:a.v,w:a.w===r?r:a.w})),l=t.map(a=>({v:a.v,w:a.w}));return o.filter(a=>l.some(d=>a.v===d.v&&a.w===d.w))},"findCommonEdges"),D=u((e,r,n)=>{const s=r.children(e);if(i.trace("Searching children of id ",e,s),s.length<1)return e;let t;for(const o of s){const l=D(o,r,n),f=P(r,n,l);if(l)if(f.length>0)t=l;else return l}return t},"findNonClusterChild"),S=u(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),U=u((e,r)=>{if(!e||r>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),w.set(n,O(n,e)),c.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const s=e.children(n),t=e.edges();s.length>0?(i.debug("Cluster identified",n,w),t.forEach(o=>{const l=v(o.v,n),f=v(o.w,n);l^f&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",w.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,w)});for(let n of c.keys()){const s=c.get(n).id,t=e.parent(s);t!==n&&c.has(t)&&!c.get(t).externalConnections&&(c.get(n).id=t);const o=e.edges().some(l=>l.v===n);if(s&&c.get(n)?.externalConnections&&o&&L(e,s,n)){const l=T(e,n,e.parent(s));l&&(c.get(n).id=l)}}e.edges().forEach(function(n){const s=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let t=n.v,o=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),t=S(n.v),o=S(n.w),e.removeEdge(n.v,n.w,n.name),t!==n.v){const l=e.parent(t);c.get(l).externalConnections=!0,s.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);c.get(l).externalConnections=!0,s.toCluster=n.w}i.warn("Fix Replacing with XXX",t,o,n.name),e.setEdge(t,o,s,n.name)}}),i.warn("Adjusted Graph",C(e)),k(e,0),i.trace(c)},"adjustClustersAndEdges"),k=u((e,r)=>{if(i.warn("extractor - ",r,C(e),e.children("D")),r>10){i.error("Bailing out");return}let n=e.nodes(),s=!1;for(const t of n){const o=e.children(t);s=s||o.length>0}if(!s){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,r);for(const t of n)if(i.debug("Extracting node",t,c,c.has(t)&&!c.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",r),!c.has(t))i.debug("Not a cluster",t,r);else if(c.get(t)?.clusterData?.explicitDir&&e.children(t)&&e.children(t).length>0){i.warn("Cluster with explicit dir, creating subgraph for children",t,r);const o=c.get(t).clusterData.dir,l=new y({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,l,t);const f=e.node(t)||{};e.setNode(t,{...f,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:l}),i.warn("Subgraph for cluster with explicit dir created:",t,C(l))}else if(!c.get(t).externalConnections&&e.children(t)&&e.children(t).length>0){i.warn("Cluster without external connections, without a parent and with children",t,r);let l=e.graph().rankdir==="TB"?"LR":"TB";c.get(t)?.clusterData?.dir&&(l=c.get(t).clusterData.dir,i.warn("Fixing dir",c.get(t).clusterData.dir,l));const f=new y({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});b(t,e,f,t);const a=e.node(t)||{};e.setNode(t,{...a,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:f}),i.debug("Old graph after copy",C(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!c.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&e.children(t).length>0,e.children("D"),r),i.debug(c);n=e.nodes(),i.warn("New list of nodes",n);for(const t of n){const o=e.node(t);i.warn(" Now next level",t,o),o?.clusterNode&&k(o.graph,r+1)}},"extractor"),B=u((e,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach(s=>{const t=e.children(s),o=B(e,t);n=[...n,...o]}),n},"sorter"),W=u(e=>B(e,e.children()),"sortNodesByHierarchy"),L=u((e,r,n)=>{let s=e.parent(r);for(;s&&s!==n;){const t=c.get(s);if(t&&!t.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),T=u((e,r,n)=>{const s=e.children(r)??[];for(const t of s){if(t===n||v(t,n))continue;const o=D(t,e,r);if(o&&!L(e,o,r))return o}return null},"findSafeAnchorNode");export{U as a,c as b,J as c,D as f,W as s,C as w}; diff --git a/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-Bj6HhMBf.js b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-CySsnTrI.js similarity index 99% rename from apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-Bj6HhMBf.js rename to apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-CySsnTrI.js index a5a83e168..106af85b1 100644 --- a/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-Bj6HhMBf.js +++ b/apps/kimi-code/dist-web/assets/chunk-V7JOEXUC-CySsnTrI.js @@ -1,4 +1,4 @@ -import{g as tt}from"./chunk-5VM5RSS4-D5nhu_pI.js";import{g as st}from"./chunk-XXDRQBXY-BYo5O_6D.js";import{s as it}from"./chunk-VR4S4FIN-JAO0vJUe.js";import{_ as f,l as Ie,c as F,v as at,x as nt,y as Oe,d as de,a5 as rt,b as ut,a as lt,s as ct,g as ot,o as ht,p as dt,k as I,q as pt,r as At,i as ft,a6 as G}from"./mermaid.core-DpBz6UHc.js";import{f as gt}from"./chunk-32BRIVSS-Dx199TNh.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`: +import{g as tt}from"./chunk-5VM5RSS4-BxdGGlTY.js";import{g as st}from"./chunk-XXDRQBXY-BeefoqH0.js";import{s as it}from"./chunk-VR4S4FIN-CTR9P-lT.js";import{_ as f,l as Ie,c as F,v as at,x as nt,y as Oe,d as de,a5 as rt,b as ut,a as lt,s as ct,g as ot,o as ht,p as dt,k as I,q as pt,r as At,i as ft,a6 as G}from"./mermaid.core-BKBZnrB_.js";import{f as gt}from"./chunk-32BRIVSS-CZoTGle4.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],n=[1,20],r=[1,41],c=[1,26],u=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],re=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:f(function(o,h,p,l,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:l.addRelation(e[s]);break;case 20:e[s-1].title=l.cleanupLabel(e[s]),l.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[s]);break;case 37:this.$=l.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:l.setCssClass(e[s-2],e[s]);break;case 49:l.addMembers(e[s-3],e[s-1]);break;case 51:l.setCssClass(e[s-5],e[s-3]),l.addMembers(e[s-5],e[s-1]);break;case 52:l.addAnnotation(e[s-3],e[s-1]);break;case 53:l.addAnnotation(e[s-6],e[s-4]),l.addMembers(e[s-6],e[s-1]);break;case 54:l.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],l.addClass(e[s]);break;case 56:this.$=e[s-1],l.addClass(e[s-1]),l.setClassLabel(e[s-1],e[s]);break;case 60:l.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:l.addMember(e[s-1],l.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=l.addNote(e[s],e[s-1]);break;case 72:this.$=l.addNote(e[s]);break;case 73:this.$=e[s-2],l.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],l.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],l.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],l.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],l.setLink(e[s-2],e[s-1]),l.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],l.setLink(e[s-3],e[s-2],e[s]),l.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],l.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],l.setClickEvent(e[s-3],e[s-2],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],l.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],l.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],l.setLink(e[s-3],e[s-1]),l.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],l.setLink(e[s-4],e[s-2],e[s]),l.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],l.setCssStyle(e[s-1],e[s]);break;case 106:l.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:n,42:r,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:n,38:22,42:r,43:23,46:c,48:u,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:r,43:23,48:u,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(re,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(re,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:r,43:23,48:u,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(re,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:r,43:23,48:u,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:r,43:23,48:u,54:g,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(re,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],l=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=l.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(l=S,S=l.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`: `+D.showPosition()+` Expecting `+he.join(", ")+", got '"+(this.terminals_[B]||B)+"'":ve="Parse error on line "+(ce+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ve,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Le,expected:he})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ye=D.yyleng,s=D.yytext,ce=D.yylineno,Le=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],R.$=C[C.length-v],R._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},$e&&(R._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),xe=this.performAction.apply(R,[s,Ye,ce,w.yy,L[1],C,e].concat(Ze)),typeof xe<"u")return xe;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(R.$),e.push(R._$),Qe=J[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},He=(function(){var O={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-JAO0vJUe.js b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CTR9P-lT.js similarity index 87% rename from apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-JAO0vJUe.js rename to apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CTR9P-lT.js index 5c308a5cf..95b2028ca 100644 --- a/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-JAO0vJUe.js +++ b/apps/kimi-code/dist-web/assets/chunk-VR4S4FIN-CTR9P-lT.js @@ -1 +1 @@ -import{_ as a,e as w,l as x}from"./mermaid.core-DpBz6UHc.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s}; +import{_ as a,e as w,l as x}from"./mermaid.core-BKBZnrB_.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s}; diff --git a/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BYo5O_6D.js b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BeefoqH0.js similarity index 72% rename from apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BYo5O_6D.js rename to apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BeefoqH0.js index 50b653fd9..1b071626d 100644 --- a/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BYo5O_6D.js +++ b/apps/kimi-code/dist-web/assets/chunk-XXDRQBXY-BeefoqH0.js @@ -1 +1 @@ -import{_ as a,d as o}from"./mermaid.core-DpBz6UHc.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; +import{_ as a,d as o}from"./mermaid.core-BKBZnrB_.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-BeJtrUxZ.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-BeJtrUxZ.js deleted file mode 100644 index 238087840..000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-BeJtrUxZ.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-Bj6HhMBf.js";import{_ as i}from"./mermaid.core-DpBz6UHc.js";import"./chunk-5VM5RSS4-D5nhu_pI.js";import"./chunk-XXDRQBXY-BYo5O_6D.js";import"./chunk-VR4S4FIN-JAO0vJUe.js";import"./chunk-32BRIVSS-Dx199TNh.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-C4oeFc7A.js b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-C4oeFc7A.js new file mode 100644 index 000000000..3855241bf --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-OUVF2IWQ-C4oeFc7A.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-CySsnTrI.js";import{_ as i}from"./mermaid.core-BKBZnrB_.js";import"./chunk-5VM5RSS4-BxdGGlTY.js";import"./chunk-XXDRQBXY-BeefoqH0.js";import"./chunk-VR4S4FIN-CTR9P-lT.js";import"./chunk-32BRIVSS-CZoTGle4.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-BeJtrUxZ.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-BeJtrUxZ.js deleted file mode 100644 index 238087840..000000000 --- a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-BeJtrUxZ.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-Bj6HhMBf.js";import{_ as i}from"./mermaid.core-DpBz6UHc.js";import"./chunk-5VM5RSS4-D5nhu_pI.js";import"./chunk-XXDRQBXY-BYo5O_6D.js";import"./chunk-VR4S4FIN-JAO0vJUe.js";import"./chunk-32BRIVSS-Dx199TNh.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-C4oeFc7A.js b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-C4oeFc7A.js new file mode 100644 index 000000000..3855241bf --- /dev/null +++ b/apps/kimi-code/dist-web/assets/classDiagram-v2-EOCWNBFH-C4oeFc7A.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-V7JOEXUC-CySsnTrI.js";import{_ as i}from"./mermaid.core-BKBZnrB_.js";import"./chunk-5VM5RSS4-BxdGGlTY.js";import"./chunk-XXDRQBXY-BeefoqH0.js";import"./chunk-VR4S4FIN-CTR9P-lT.js";import"./chunk-32BRIVSS-CZoTGle4.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Bvd7lU_r.js b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Br_qiVSQ.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Bvd7lU_r.js rename to apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Br_qiVSQ.js index 8ea3f7e22..a43614392 100644 --- a/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Bvd7lU_r.js +++ b/apps/kimi-code/dist-web/assets/cose-bilkent-JH36ORCC-Br_qiVSQ.js @@ -1 +1 @@ -import{_ as V,l as k,d as lt}from"./mermaid.core-DpBz6UHc.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import{g as gt}from"./_commonjsHelpers-CqkleIqs.js";import"./index-_5lXYMaO.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y<T;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;m<A;m++){var C=E[m];p&&C.child!=null&&C.updateBounds(),y=C.getLeft(),O=C.getRight(),s=C.getTop(),f=C.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var R=new n(v,u,D-v,T-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?c=E[0].getParent().paddingLeft:c=this.margin,this.left=R.x-c,this.right=R.x+R.width+c,this.top=R.y-c,this.bottom=R.y+R.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var T=v[u];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t}),(function(N,I,L){var o=L(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,I,L){var o=L(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),C=i.getHeightHalf(),R=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,I,L){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}})();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=(function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d?.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n})();N.exports=g}),(function(N,I,L){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o}),(function(N,I,L){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o}),(function(N,I,L){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,T=0;T<D.length;T++)u=D[T],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var T=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],C=s.indexOf(m);C>-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var T=p/v;u-=(p-T)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,T=null;(p.length==1||p.length==2)&&(u=!0,T=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],E=p.indexOf(O);E>=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=L(15),t=L(7),i=L(0),l=L(8),g=L(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),T=0;T<u.length;T++)r=u[T],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,T;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,T,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t}),(function(N,I,L){var o=L(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e}),(function(N,I,L){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o}),(function(N,I,L){var o=L(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,I,L){var o=L(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e}),(function(N,I,L){var o=(function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}})();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=L(11),i=(function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}})();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i})();N.exports=t}),(function(N,I,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o})])})})(Q)),Q.exports}var ct=$.exports,z;function pt(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(ft())})(ct,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i}),(function(I,L,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,T=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),E=c.length,A;for(A=0;A<E;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);else{var C=[];if(C=C.concat(A.getEdgeListToNode(m)),C=C.concat(m.getEdgeListToNode(A)),!f.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var M=C[R];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}C.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=E,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>E&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C<s.length;C++){var R=s[C];R.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,E,A,m){var C=(E-c+1)/2;C<0&&(C+=180);var R=(C+c)%360,M=R*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var E=s[c],A=E.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A<E.length;A++){var m=E[A],C=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(C.id==null||!this.getToBeTiled(C))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],R=m.getParent().id;typeof f[R]>"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A<E.length;A++){var m=E[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;E<f.length;E++){var A=f[E];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var A=c[E];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,E,A){f+=E,c+=A;for(var m=f,C=0;C<s.rows.length;C++){var R=s.rows[C];f=m;for(var M=0,S=0;S<R.length;S++){var Y=R[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var C=s[m];A.rows.length==0?this.insertNodeToRow(A,C,0,f):this.canAddHorizontal(A,C.rect.width,C.rect.height)?this.insertNodeToRow(A,C,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,C,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,E){var A=E;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var C=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width<C&&(s.width=C);var R=f.rect.height;c>0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]<c&&E>0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.width<f?R=(s.height+m)/f:R=(s.height+m)/s.width,R<1&&(R=1/R),C<1&&(C=1/C),C<R},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;R<E.length;R++)E[R].height>C&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var C=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(C.push(A[R]),A[R][0].getOwner().remove(A[R][0]));s.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,C=c.startY,R=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(C>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m<this.grid.length-1)for(var F=C;F<=R;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(R<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][R+1].length+this.grid[F][R].length-1;if(A>0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e})])})})($)),$.exports}var dt=Z.exports,J;function vt(){return J||(J=1,(function(G,b){(function(I,L){G.exports=L(pt())})(dt,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,T=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var E=0;E<c.length;E++){var A=c[E],m=this.idToLNode[A.data("source")],C=this.idToLNode[A.data("target")];if(m!==C&&m.getEdgesBetween(C).length==0){var R=s.add(y.newEdge(),m,C);R.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();T.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},T=0;T<D.length;T++)u[D[T].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=C}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(Z)),Z.exports}var yt=vt();const Et=gt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=lt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render}; +import{_ as V,l as k,d as lt}from"./mermaid.core-BKBZnrB_.js";import{c as tt}from"./cytoscape.esm-OyMbaexL.js";import{g as gt}from"./_commonjsHelpers-CqkleIqs.js";import"./index-yKYHPeXU.js";var Z={exports:{}},$={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y<T;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;m<A;m++){var C=E[m];p&&C.child!=null&&C.updateBounds(),y=C.getLeft(),O=C.getRight(),s=C.getTop(),f=C.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var R=new n(v,u,D-v,T-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?c=E[0].getParent().paddingLeft:c=this.margin,this.left=R.x-c,this.right=R.x+R.width+c,this.top=R.y-c,this.bottom=R.y+R.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var T=v[u];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t}),(function(N,I,L){var o=L(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,I,L){var o=L(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),C=i.getHeightHalf(),R=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,I,L){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}})();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=(function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d?.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n})();N.exports=g}),(function(N,I,L){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o}),(function(N,I,L){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o}),(function(N,I,L){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,T=0;T<D.length;T++)u=D[T],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var T=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],C=s.indexOf(m);C>-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var T=p/v;u-=(p-T)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,T=null;(p.length==1||p.length==2)&&(u=!0,T=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],E=p.indexOf(O);E>=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=L(15),t=L(7),i=L(0),l=L(8),g=L(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),T=0;T<u.length;T++)r=u[T],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,T;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,T,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t}),(function(N,I,L){var o=L(3);function e(i,l,g,n){o.call(this,i,l,g,n),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e}),(function(N,I,L){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o}),(function(N,I,L){var o=L(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,I,L){var o=L(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e}),(function(N,I,L){var o=(function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}})();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=L(11),i=(function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}})();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i})();N.exports=t}),(function(N,I,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o})])})})(Q)),Q.exports}var ct=$.exports,z;function pt(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(ft())})(ct,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i}),(function(I,L,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,T=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),E=c.length,A;for(A=0;A<E;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);else{var C=[];if(C=C.concat(A.getEdgeListToNode(m)),C=C.concat(m.getEdgeListToNode(A)),!f.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var M=C[R];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}C.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=E,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>E&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C<s.length;C++){var R=s[C];R.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,E,A,m){var C=(E-c+1)/2;C<0&&(C+=180);var R=(C+c)%360,M=R*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var E=s[c],A=E.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A<E.length;A++){var m=E[A],C=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(C.id==null||!this.getToBeTiled(C))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],R=m.getParent().id;typeof f[R]>"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A<E.length;A++){var m=E[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;E<f.length;E++){var A=f[E];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var A=c[E];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,E,A){f+=E,c+=A;for(var m=f,C=0;C<s.rows.length;C++){var R=s.rows[C];f=m;for(var M=0,S=0;S<R.length;S++){var Y=R[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var C=s[m];A.rows.length==0?this.insertNodeToRow(A,C,0,f):this.canAddHorizontal(A,C.rect.width,C.rect.height)?this.insertNodeToRow(A,C,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,C,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,E){var A=E;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var C=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width<C&&(s.width=C);var R=f.rect.height;c>0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]<c&&E>0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.width<f?R=(s.height+m)/f:R=(s.height+m)/s.width,R<1&&(R=1/R),C<1&&(C=1/C),C<R},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;R<E.length;R++)E[R].height>C&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var C=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(C.push(A[R]),A[R][0].getOwner().remove(A[R][0]));s.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,C=c.startY,R=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(C>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m<this.grid.length-1)for(var F=C;F<=R;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(R<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][R+1].length+this.grid[F][R].length-1;if(A>0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e})])})})($)),$.exports}var dt=Z.exports,J;function vt(){return J||(J=1,(function(G,b){(function(I,L){G.exports=L(pt())})(dt,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,T=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var E=0;E<c.length;E++){var A=c[E],m=this.idToLNode[A.data("source")],C=this.idToLNode[A.data("target")];if(m!==C&&m.getEdgesBetween(C).length==0){var R=s.add(y.newEdge(),m,C);R.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();T.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},T=0;T<D.length;T++)u[D[T].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=C}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(Z)),Z.exports}var yt=vt();const Et=gt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=lt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Ot=Lt;export{Ot as render}; diff --git a/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-Dac1VpFl.js b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BGL2vhde.js similarity index 99% rename from apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-Dac1VpFl.js rename to apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BGL2vhde.js index 023c32b83..3e7c81024 100644 --- a/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-Dac1VpFl.js +++ b/apps/kimi-code/dist-web/assets/cynefin-VYW2F7L2-BGL2vhde.js @@ -1,4 +1,4 @@ -import{bR as et}from"./index-_5lXYMaO.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[` +import{bR as et}from"./index-yKYHPeXU.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),bI=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),bd=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>bc,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>bo,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>_c,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>_o,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,bc,_c,Sc,bo,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,_o,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=bI({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ac||(Ac={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(bc||(bc={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_c||(_c={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(bo||(bo={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,bo.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(va||(va={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(a=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(_o||(_o={})),ki=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0?n=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},Ku=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},(function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r})(Jc||(Jc={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||_o.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(sf||(sf={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(of||(of={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}i(t,"is"),e.is=t})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[` `,`\r `,"\r"],(function(e){function t(s,o,l,u){return new lh(s,o,l,u)}i(t,"create"),e.create=t;function r(s){let o=s;return!!(A.defined(o)&&A.string(o.uri)&&(A.undefined(o.languageId)||A.string(o.languageId))&&A.uinteger(o.lineCount)&&A.func(o.getText)&&A.func(o.positionAt)&&A.func(o.offsetAt))}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),u=a(o,(f,d)=>{let m=f.range.start.line-d.range.start.line;return m===0?f.range.start.character-d.range.start.character:m}),c=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],m=s.offsetAt(d.range.start),g=s.offsetAt(d.range.end);if(g<=c)l=l.substring(0,m)+d.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");c=m}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const l=s.length/2|0,u=s.slice(0,l),c=s.slice(l);a(u,o),a(c,o);let f=0,d=0,m=0;for(;f<u.length&&d<c.length;)o(u[f],c[d])<=0?s[m++]=u[f++]:s[m++]=c[d++];for(;f<u.length;)s[m++]=u[f++];for(;d<c.length;)s[m++]=c[d++];return s}i(a,"mergeSort")})(Rf||(Rf={})),lh=class{static{i(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,r=!0;for(let n=0;n<t.length;n++){r&&(e.push(n),r=!1);let a=t.charAt(n);r=a==="\r"||a===` `,a==="\r"&&n+1<t.length&&t.charAt(n+1)===` diff --git a/apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-cH6p2fBn.js b/apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-qBwjxYIX.js similarity index 98% rename from apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-cH6p2fBn.js rename to apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-qBwjxYIX.js index 9b41a344f..d667da409 100644 --- a/apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-cH6p2fBn.js +++ b/apps/kimi-code/dist-web/assets/cynefinDiagram-TSTJHNR4-qBwjxYIX.js @@ -1,4 +1,4 @@ -import{p as xt}from"./chunk-JWPE2WC7-BtckK32c.js";import{s as gt,g as $t,p as bt,o as wt,a as Ct,b as vt,_ as s,l as O,F as Dt,e as kt,q as Tt,B as U,z as Q,D as At,W as ot}from"./mermaid.core-DpBz6UHc.js";import{p as Bt}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}s(st,"hashString");function it(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:st(e)}s(it,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,I=e/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*17)*m*2-m;d.push({x:c+p,y:o*I})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*31+7),F=p.x+h,R=f,_=i.x-h;D+=` C${F},${R} ${_},${f} ${i.x},${i.y}`}return D}s(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,I=t/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*23)*m*2-m;d.push({x:o*I,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*37+11),F=f,R=p.y+h,_=f,z=i.y-h;D+=` C${F},${R} ${_},${z} ${i.x},${i.y}`}return D}s(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}s(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}s(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Ft=s((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Rt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Rt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,F=o.boundaryAmplitude,R=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,R,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${R} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),V=Ft(i,f),Z=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=V[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,F)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,F)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=V[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=V[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=V[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=V[y.from],N=V[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,G=-x/C,ht=$/C,et=M+G*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Vt={draw:_t},Et=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return` +import{p as xt}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{s as gt,g as $t,p as bt,o as wt,a as Ct,b as vt,_ as s,l as O,F as Dt,e as kt,q as Tt,B as U,z as Q,D as At,W as ot}from"./mermaid.core-BKBZnrB_.js";import{p as Bt}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=s(()=>U({...At.cynefin,...Q().cynefin}),"getConfig"),Pt=s(()=>{Tt(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);O.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}s(st,"hashString");function it(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:st(e)}s(it,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,I=e/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*17)*m*2-m;d.push({x:c+p,y:o*I})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.y+i.y)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*31+7),F=p.x+h,R=f,_=i.x-h;D+=` C${F},${R} ${_},${f} ${i.x},${i.y}`}return D}s(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,I=t/v,d=[];for(let o=0;o<=v;o++){const p=E(n+o*23)*m*2-m;d.push({x:o*I,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],i=d[o+1],f=(p.x+i.x)/2,b=o%2===0?1:-1,h=m*1.5*b*E(n+o*37+11),F=f,R=p.y+h,_=f,z=i.y-h;D+=` C${F},${R} ${_},${z} ${i.x},${i.y}`}return D}s(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}s(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}s(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Ft=s((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Rt=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,_t=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Rt();O.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,F=o.boundaryAmplitude,R=i+b*2,_=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,_,R,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${R} ${_}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const T=k.append("g").attr("transform",`translate(${b}, ${b})`),V=Ft(i,f),Z=it(o.seed,e),mt=T.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=V[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=T.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,F)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,F)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=T.append("g").attr("class","cynefin-labels");for(const l of X){const r=V[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=T.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=V[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=T.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=V[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){const g=B+L.length*(A+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(P=W.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=V[y.from],N=V[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,G=-x/C,ht=$/C,et=M+G*W,nt=P+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&T.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),Vt={draw:_t},Et=s(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return` .cynefinDomain { stroke: none; } diff --git a/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BCr0U4UL.js b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-LDM5VIAI.js similarity index 97% rename from apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BCr0U4UL.js rename to apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-LDM5VIAI.js index 1a525e5c9..a6803a237 100644 --- a/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-BCr0U4UL.js +++ b/apps/kimi-code/dist-web/assets/dagre-VKFMJZFB-LDM5VIAI.js @@ -1,4 +1,4 @@ -import{c as O,w as I,a as J,f as P,b as E,s as A}from"./chunk-RYQCIY6F-DYUKYgim.js";import{_ as w,am as v,an as D,ao as H,ap as Y,l,c as _,aq as W,ar as $,ag as j,as as q,ah as R,af as F,at as z,au as K,av as G}from"./mermaid.core-DpBz6UHc.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var C=w((s,t,g)=>Math.max(t,Math.min(g,s)),"clamp"),B=w((s="TB")=>{switch(s){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=w(s=>s==="flowchart"||s==="flowchart-v2"||s==="stateDiagram","shouldMergeSelfLoopSegments"),Z=w((s,t,g,m,c)=>{const o=[],r=new Set;if(g.forEach(({start:i,end:n})=>{i!==m&&r.add(i),n!==m&&r.add(n)}),r.forEach(i=>{const n=s.node(i);typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)}),o.length===0&&g.forEach(({edge:i})=>{(i.points??[]).forEach(n=>{typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)})}),o.length===0)return B(c);const f=o.reduce((i,n)=>({x:i.x+n.x/o.length,y:i.y+n.y/o.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":B(c)},"getSelfLoopSide"),ee=w((s,t="top",g=0,m=0)=>{const c=s.x,o=s.y-g,r=s.width/2,f=s.height/2,h=Math.max(36,Math.min(100,s.width*.8)),a=C(Math.max(m,s.width*.35),36,h),i=C(Math.min(s.width,s.height)*.45,24,48);switch(t){case"bottom":{const n=o+f;return[{x:c-a/2,y:n},{x:c-a/2,y:n+i},{x:c+a/2,y:n+i},{x:c+a/2,y:n}]}case"right":{const n=c+r;return[{x:n,y:o-a/2},{x:n+i,y:o-a/2},{x:n+i,y:o+a/2},{x:n,y:o+a/2}]}case"left":{const n=c-r;return[{x:n,y:o-a/2},{x:n-i,y:o-a/2},{x:n-i,y:o+a/2},{x:n,y:o+a/2}]}case"top":default:{const n=o-f;return[{x:c-a/2,y:n},{x:c-a/2,y:n-i},{x:c+a/2,y:n-i},{x:c+a/2,y:n}]}}},"getSelfLoopPoints"),te=w((s,t,g="top",m=0,c={})=>{const r=s.x,f=s.y-m,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:r,y:Math.max(...t.map(i=>i.y))+a/2+4};case"right":return{x:Math.max(...t.map(i=>i.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(i=>i.x))-h/2-4,y:f};case"top":default:return{x:r,y:Math.min(...t.map(i=>i.y))-a/2-4}}},"getSelfLoopLabelPosition"),ne=w((s,t=0,{mergeSelfLoops:g=!0}={})=>{const m=new Map,c=[],o=s.graph()?.rankdir;return s.edges().forEach(r=>{const f=s.edge(r);if(g&&f.selfLoop){const h=f.selfLoop.id;m.has(h)||m.set(h,[]),m.get(h).push({edge:f,start:r.v,end:r.w})}else c.push({edge:f,start:r.v,end:r.w})}),m.forEach(r=>{if(r.length!==3){r.forEach(L=>c.push(L));return}r.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);const[f,h,a]=r,i=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,n=s.node(i.start);if(!n){r.forEach(L=>c.push(L));return}const p={width:h.edge.width,height:h.edge.height},y=Z(s,n,r,i.start,o),X=ee(n,y,t,p.width??0),S=te(n,X,y,t,p),b={...h.edge,...i,id:i.id,points:X,start:i.start,end:i.end,x:S.x,y:S.y,width:p.width,height:p.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),T=w(async(s,t,g,m,c,o)=>{l.warn("Graph in recursive render:XAX",I(t),c);const r=t.graph().rankdir;l.trace("Dir in recursive render - dir:",r);const f=s.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));const h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),i=f.insert("g").attr("class","edgeLabels"),n=f.insert("g").attr("class","nodes"),p=V(g);await Promise.all(t.nodes().map(async function(d){const e=t.node(d);if(c!==void 0){const u=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX +import{c as O,w as I,a as J,f as P,b as E,s as A}from"./chunk-RYQCIY6F-DPVXfp-M.js";import{_ as w,am as v,an as D,ao as H,ap as Y,l,c as _,aq as W,ar as $,ag as j,as as q,ah as R,af as F,at as z,au as K,av as G}from"./mermaid.core-BKBZnrB_.js";import{G as Q}from"./graph-DOmOIIwC.js";import{l as U}from"./layout-D-LzfAck.js";import"./map-DxJ2ADlA.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var C=w((s,t,g)=>Math.max(t,Math.min(g,s)),"clamp"),B=w((s="TB")=>{switch(s){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=w(s=>s==="flowchart"||s==="flowchart-v2"||s==="stateDiagram","shouldMergeSelfLoopSegments"),Z=w((s,t,g,m,c)=>{const o=[],r=new Set;if(g.forEach(({start:i,end:n})=>{i!==m&&r.add(i),n!==m&&r.add(n)}),r.forEach(i=>{const n=s.node(i);typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)}),o.length===0&&g.forEach(({edge:i})=>{(i.points??[]).forEach(n=>{typeof n?.x=="number"&&typeof n?.y=="number"&&o.push(n)})}),o.length===0)return B(c);const f=o.reduce((i,n)=>({x:i.x+n.x/o.length,y:i.y+n.y/o.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":B(c)},"getSelfLoopSide"),ee=w((s,t="top",g=0,m=0)=>{const c=s.x,o=s.y-g,r=s.width/2,f=s.height/2,h=Math.max(36,Math.min(100,s.width*.8)),a=C(Math.max(m,s.width*.35),36,h),i=C(Math.min(s.width,s.height)*.45,24,48);switch(t){case"bottom":{const n=o+f;return[{x:c-a/2,y:n},{x:c-a/2,y:n+i},{x:c+a/2,y:n+i},{x:c+a/2,y:n}]}case"right":{const n=c+r;return[{x:n,y:o-a/2},{x:n+i,y:o-a/2},{x:n+i,y:o+a/2},{x:n,y:o+a/2}]}case"left":{const n=c-r;return[{x:n,y:o-a/2},{x:n-i,y:o-a/2},{x:n-i,y:o+a/2},{x:n,y:o+a/2}]}case"top":default:{const n=o-f;return[{x:c-a/2,y:n},{x:c-a/2,y:n-i},{x:c+a/2,y:n-i},{x:c+a/2,y:n}]}}},"getSelfLoopPoints"),te=w((s,t,g="top",m=0,c={})=>{const r=s.x,f=s.y-m,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:r,y:Math.max(...t.map(i=>i.y))+a/2+4};case"right":return{x:Math.max(...t.map(i=>i.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(i=>i.x))-h/2-4,y:f};case"top":default:return{x:r,y:Math.min(...t.map(i=>i.y))-a/2-4}}},"getSelfLoopLabelPosition"),ne=w((s,t=0,{mergeSelfLoops:g=!0}={})=>{const m=new Map,c=[],o=s.graph()?.rankdir;return s.edges().forEach(r=>{const f=s.edge(r);if(g&&f.selfLoop){const h=f.selfLoop.id;m.has(h)||m.set(h,[]),m.get(h).push({edge:f,start:r.v,end:r.w})}else c.push({edge:f,start:r.v,end:r.w})}),m.forEach(r=>{if(r.length!==3){r.forEach(L=>c.push(L));return}r.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);const[f,h,a]=r,i=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,n=s.node(i.start);if(!n){r.forEach(L=>c.push(L));return}const p={width:h.edge.width,height:h.edge.height},y=Z(s,n,r,i.start,o),X=ee(n,y,t,p.width??0),S=te(n,X,y,t,p),b={...h.edge,...i,id:i.id,points:X,start:i.start,end:i.end,x:S.x,y:S.y,width:p.width,height:p.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),T=w(async(s,t,g,m,c,o)=>{l.warn("Graph in recursive render:XAX",I(t),c);const r=t.graph().rankdir;l.trace("Dir in recursive render - dir:",r);const f=s.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));const h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),i=f.insert("g").attr("class","edgeLabels"),n=f.insert("g").attr("class","nodes"),p=V(g);await Promise.all(t.nodes().map(async function(d){const e=t.node(d);if(c!==void 0){const u=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX Node.id = `,d,` data=`,u.height,` Parent cluster`,c.height),t.setNode(c.id,u),t.parent(d)||(l.trace("Setting parent",d,c.id),t.setParent(d,c.id,u))}if(l.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),e?.clusterNode){l.info("Cluster identified XBX",d,e.width,t.node(d));const{ranksep:u,nodesep:x}=t.graph();e.graph.setGraph({...e.graph.graph(),ranksep:u+25,nodesep:x});const N=await T(n,e.graph,g,m,t.node(d),o),M=N.elem;W(e,M),e.diff=N.diff||0,l.info("New compound node after recursive render XAX",d,"width",e.width,"height",e.height),$(M,e)}else t.children(d).length>0?(l.trace("Cluster - the non recursive path XBX",d,e.id,e,e.width,"Graph:",t),l.trace(P(e.id,t)),E.set(e.id,{id:P(e.id,t),node:e})):(l.trace("Node - the non recursive path XAX",d,n,t.node(d),r),await j(n,t.node(d),{config:o,dir:r}))})),await w(async()=>{const d=t.edges().map(async function(e){const u=t.edge(e.v,e.w,e.name);if(l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),l.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),l.info("Fix",E,"ids:",e.v,e.w,"Translating: ",E.get(e.v),E.get(e.w)),p&&u.selfLoop){if(u.selfLoop.order!==1)return;const x=u.id;u.id=u.selfLoop.id,await G(i,u),u.id=x;return}await G(i,u)});await Promise.all(d)},"processEdges")(),l.info("Graph before layout:",JSON.stringify(I(t))),l.info("############################################# XXX"),l.info("### Layout ### XXX"),l.info("############################################# XXX"),U(t),l.info("Graph after layout:",JSON.stringify(I(t)));let X=0,{subGraphTitleTotalMargin:S}=q(o);await Promise.all(A(t).map(async function(d){const e=t.node(d);if(l.info("Position XBX => "+d+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e?.clusterNode)e.y+=S,l.info("A tainted cluster node XBX1",d,e.id,e.width,e.height,e.x,e.y,t.parent(d)),E.get(e.id).node=e,R(e);else if(t.children(d).length>0){l.info("A pure cluster node XBX1",d,e.id,e.x,e.y,e.width,e.height,t.parent(d)),e.height+=S,t.node(e.parentId);const u=e?.padding/2||0,x=e?.labelBBox?.height||0,N=x-u||0;l.debug("OffsetY",N,"labelHeight",x,"halfPadding",u),await F(h,e),E.get(e.id).node=e}else{const u=t.node(e.parentId);e.y+=S/2,l.info("A regular node XBX1 - using the padding",e.id,"parent",e.parentId,e.width,e.height,e.x,e.y,"offsetY",e.offsetY,"parent",u,u?.offsetY,e),R(e)}}));const b=S/2;return ne(t,b,{mergeSelfLoops:p}).forEach(function({edge:d,start:e,end:u}){l.info("Edge "+e+" -> "+u+": "+JSON.stringify(d),d),d.points.forEach(k=>k.y+=b);const x=t.node(e),N=t.node(u),M=z(a,d,E,g,x,N,m);K(d,M)}),t.nodes().forEach(function(d){const e=t.node(d);l.info(d,e.type,e.diff),e.isGroup&&(X=e.diff)}),l.warn("Returning from recursive render XAX",f,X),{elem:f,diff:X}},"recursiveRender"),le=w(async(s,t)=>{const g=new Q({multigraph:!0,compound:!0}).setGraph({rankdir:s.direction,nodesep:s.config?.nodeSpacing||s.config?.flowchart?.nodeSpacing||s.nodeSpacing,ranksep:s.config?.rankSpacing||s.config?.flowchart?.rankSpacing||s.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),m=t.select("g");v(m,s.markers,s.type,s.diagramId),D(),H(),Y(),O(),s.nodes.forEach(o=>{g.setNode(o.id,{...o}),o.parentId&&g.setParent(o.id,o.parentId)}),l.debug("Edges:",s.edges),s.edges.forEach(o=>{if(o.start===o.end){const r=o.start,f=r+"---"+r+"---1",h=r+"---"+r+"---2",a=g.node(r);g.setNode(f,{domId:f,id:f,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),g.setParent(f,a.parentId),g.setNode(h,{domId:h,id:h,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),g.setParent(h,a.parentId);const i=structuredClone(o),n=structuredClone(o),p=structuredClone(o),y=structuredClone(o);n.originalEdge=i,n.selfLoop={id:i.id,order:0},p.originalEdge=i,p.selfLoop={id:i.id,order:1},y.originalEdge=i,y.selfLoop={id:i.id,order:2},n.label="",n.arrowTypeEnd="none",n.endLabelLeft="",n.endLabelRight="",n.startLabelLeft="",n.id=r+"-cyclic-special-1",p.startLabelRight="",p.startLabelLeft="",p.endLabelLeft="",p.endLabelRight="",p.arrowTypeStart="none",p.arrowTypeEnd="none",p.id=r+"-cyclic-special-mid",y.label="",y.startLabelRight="",y.startLabelLeft="",y.arrowTypeStart="none",a.isGroup&&(n.fromCluster=r,y.toCluster=r),y.id=r+"-cyclic-special-2",y.arrowTypeStart="none",g.setEdge(r,f,n,r+"-cyclic-special-0"),g.setEdge(f,h,p,r+"-cyclic-special-1"),g.setEdge(h,r,y,r+"-cyclic-special-2")}else g.setEdge(o.start,o.end,{...o},o.id)}),l.warn("Graph at first:",JSON.stringify(I(g))),J(g),l.warn("Graph after XAX:",JSON.stringify(I(g)));const c=_();await T(m,g,s.type,s.diagramId,void 0,c)},"render");export{ne as getEdgesToRender,le as render}; diff --git a/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DPlhFZdP.js b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-D5pIW94l.js similarity index 98% rename from apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DPlhFZdP.js rename to apps/kimi-code/dist-web/assets/diagram-FQU43EPY-D5pIW94l.js index cc6a1f752..bc0250674 100644 --- a/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-DPlhFZdP.js +++ b/apps/kimi-code/dist-web/assets/diagram-FQU43EPY-D5pIW94l.js @@ -1,3 +1,3 @@ -import{p as re}from"./chunk-JWPE2WC7-BtckK32c.js";import{p as oe,o as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as D,d as ue,A as xe,q as fe,B as ge,z as M,D as he,i as y,w as P,ak as pe}from"./mermaid.core-DpBz6UHc.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var T="position frame",$="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${P(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ +import{p as re}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{p as oe,o as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as D,d as ue,A as xe,q as fe,B as ge,z as M,D as he,i as y,w as P,ak as pe}from"./mermaid.core-BKBZnrB_.js";import{p as be,i as ve}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var T="position frame",$="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),fe()},"clear");function C(){B={}}o(C,"reset");var Se=he.eventmodeling,ke=o(()=>ge({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:T,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${P(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," "),r+="<br/>")}const m=r!==void 0;m&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function V(e,n){const t=n,i=L(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:$,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,d,r),m=c+l.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p<f.length;p++){const w=f[p],R=f[p-1];w.y=R.y+R.height+s.swimlaneGap}return h}o(Y,"evolveFramePositioned");function z(e,n){return e===0&&n.sourceFrames.length===0}o(z,"isFirstFrame");function K(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o(K,"hasSourceFrame");function k(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(k,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||z(t.index,t.frame))return[];const i=k(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=k(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:N,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[T]:V,[S]:J},Be={[$]:Y,[N]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var F={getConfig:ke,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:le,setAccDescription:de,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),F.setAst(n),re(n,F)},"parse")},Ae=D(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ne(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var De=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+` `,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=D(),l=ue(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(l,m.maxR,c,r)),m.boxes.forEach(te(l,c)),m.relations.forEach(ie(l,c,x,r)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),xe(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),Te={draw:De},$e=o(e=>"","getStyles"),Ne=$e,Ue={parser:Ee,db:F,renderer:Te,styles:Ne};export{Ue as diagram}; diff --git a/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-D-tFNEyZ.js b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-Xp-lqyAs.js similarity index 97% rename from apps/kimi-code/dist-web/assets/diagram-G47NLZAW-D-tFNEyZ.js rename to apps/kimi-code/dist-web/assets/diagram-G47NLZAW-Xp-lqyAs.js index ad4b9ff9f..7bb5a3908 100644 --- a/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-D-tFNEyZ.js +++ b/apps/kimi-code/dist-web/assets/diagram-G47NLZAW-Xp-lqyAs.js @@ -1,4 +1,4 @@ -import{p as me}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as w,W as ge,z as te,B as Q,F as ye,e as Se,l as ee,be as B,d as j,b as ve,a as xe,o as be,p as we,g as Ce,s as Te,D as Le,bf as $e,q as Ae}from"./mermaid.core-DpBz6UHc.js";import{s as Fe}from"./chunk-VR4S4FIN-JAO0vJUe.js";import{p as Ne}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h<d;++h)l.push(o[h]);for(;n=r.pop();)e.call(a,n,++g,this);return this}function De(e,a){let n=-1;for(const l of this)if(e.call(a,l,++n,this))return l}function Pe(e){return this.eachAfter(function(a){for(var n=+e(a.data)||0,l=a.children,r=l&&l.length;--r>=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function We(e){for(var a=this,n=Ee(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Ee(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function Re(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*qe(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r<o;++r)n.push(l[r]);while(n.length)}function ae(e,a){e instanceof Map?(e=[void 0,e],a===void 0&&(a=Ye)):a===void 0&&(a=Xe);for(var n=new U(e),l,r=[n],o,h,d,g;l=r.pop();)if((h=a(l.data))&&(g=(h=Array.from(h)).length))for(l.children=h,d=g-1;d>=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function Ge(){return ae(this).eachBefore(je)}function Xe(e){return e.children}function Ye(e){return Array.isArray(e)?e[1]:null}function je(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:We,ancestors:Re,descendants:He,leaves:Ie,links:Oe,copy:Ge,[Symbol.iterator]:qe};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++d<g;)h=o[d],h.y0=n,h.y1=r,h.x0=a,h.x1=a+=h.value*c}function Qe(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(r-n)/e.value;++d<g;)h=o[d],h.x0=a,h.x1=l,h.y0=n,h.y1=n+=h.value*c}var et=(1+Math.sqrt(5))/2;function tt(e,a,n,l,r,o){for(var h=[],d=a.children,g,c,p=0,b=0,s=d.length,x,S,v=a.value,u,y,N,$,V,E,M;p<s;){x=r-n,S=o-l;do u=d[b++].value;while(!u&&b<s);for(y=N=u,E=Math.max(S/x,x/S)/(v*e),M=u*u*E,V=Math.max(N/M,M/y);b<s;++b){if(u+=c=d[b].value,c<y&&(y=c),c>N&&(N=c),M=u*u*E,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x<S,children:d.slice(p,b)}),g.dice?Ke(g,n,l,r,v?l+=S*u/v:o):Qe(g,n,l,v?n+=x*u/v:r,o),v-=u,p=b}return h}const at=(function e(a){function n(l,r,o,h,d){tt(a,l,r,o,h,d)}return n.ratio=function(l){return e((l=+l)>1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),s.x0=S,s.y0=v,s.x1=u,s.y1=y,s.children&&(x=r[s.depth+1]=o(s)/2,S+=c(s)-x,v+=h(s)-x,u-=d(s)-x,y-=g(s)-x,u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),e(s,S,v,u,y))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(n=+s[0],l=+s[1],p):[n,l]},p.tile=function(s){return arguments.length?(e=Ze(s),p):e},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(o=typeof s=="function"?s:q(+s),p):o},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(h=typeof s=="function"?s:q(+s),p):h},p.paddingRight=function(s){return arguments.length?(d=typeof s=="function"?s:q(+s),p):d},p.paddingBottom=function(s){return arguments.length?(g=typeof s=="function"?s:q(+s),p):g},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:q(+s),p):c},p}var ie=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ve,this.getAccTitle=xe,this.setDiagramTitle=be,this.getDiagramTitle=we,this.getAccDescription=Ce,this.setAccDescription=Te}static{w(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=Le,a=te();return Q({...e.treemap,...a.treemap??{}})}addNode(e,a){this.nodes.push(e),this.levels.set(e,a),a===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,a){const n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=a.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(r=>{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,W=10,G=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*W:960,x=o.nodeHeight?o.nodeHeight*W:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?G+W:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?W:0).paddingRight(t=>t.children&&t.children.length>0?W:0).paddingBottom(t=>t.children&&t.children.length>0?W:0).round(!0)(E),he=ne.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),R.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",G),R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=j(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,Y=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);Y.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(T<re||P<re){i.style("display","none");return}let m=parseInt(i.style("font-size"),10);const _=.6;for(;L.getComputedTextLength()>T&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(F<H&&m===D));)i.style("font-size",`${m}px`),k=m+J+F;i.style("font-size",`${m}px`),A?(m<D||P<D)&&i.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&i.style("display","none")}),o.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",i=>(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m<H?f.style("display","none"):f.style("display",null)});const pe=o.diagramPadding??8;Fe(b,pe,"flowchart",o?.useMaxWidth||!1)},"draw"),ot=w(function(e,a){return a.db.getClasses()},"getClasses"),ct={draw:it,getClasses:ot},ht={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},dt=w(({treemap:e}={})=>{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` +import{p as me}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{_ as w,W as ge,z as te,B as Q,F as ye,e as Se,l as ee,be as B,d as j,b as ve,a as xe,o as be,p as we,g as Ce,s as Te,D as Le,bf as $e,q as Ae}from"./mermaid.core-BKBZnrB_.js";import{s as Fe}from"./chunk-VR4S4FIN-CTR9P-lT.js";import{p as Ne}from"./cynefin-VYW2F7L2-BGL2vhde.js";import{b as I}from"./defaultLocale-DX6XiGOO.js";import{o as K}from"./ordinal-Cboi1Yqb.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function Me(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function _e(){return this.eachAfter(Me)}function ke(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function ze(e,a){for(var n=this,l=[n],r,o,h=-1;n=l.pop();)if(e.call(a,n,++h,this),r=n.children)for(o=r.length-1;o>=0;--o)l.push(r[o]);return this}function Ve(e,a){for(var n=this,l=[n],r=[],o,h,d,g=-1;n=l.pop();)if(r.push(n),o=n.children)for(h=0,d=o.length;h<d;++h)l.push(o[h]);for(;n=r.pop();)e.call(a,n,++g,this);return this}function De(e,a){let n=-1;for(const l of this)if(e.call(a,l,++n,this))return l}function Pe(e){return this.eachAfter(function(a){for(var n=+e(a.data)||0,l=a.children,r=l&&l.length;--r>=0;)n+=l[r].value;a.value=n})}function Be(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function We(e){for(var a=this,n=Ee(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var r=l.length;e!==n;)l.splice(r,0,e),e=e.parent;return l}function Ee(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),r=null;for(e=n.pop(),a=l.pop();e===a;)r=e,e=n.pop(),a=l.pop();return r}function Re(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function He(){return Array.from(this)}function Ie(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Oe(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*qe(){var e=this,a,n=[e],l,r,o;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(r=0,o=l.length;r<o;++r)n.push(l[r]);while(n.length)}function ae(e,a){e instanceof Map?(e=[void 0,e],a===void 0&&(a=Ye)):a===void 0&&(a=Xe);for(var n=new U(e),l,r=[n],o,h,d,g;l=r.pop();)if((h=a(l.data))&&(g=(h=Array.from(h)).length))for(l.children=h,d=g-1;d>=0;--d)r.push(o=h[d]=new U(h[d])),o.parent=l,o.depth=l.depth+1;return n.eachBefore(Ue)}function Ge(){return ae(this).eachBefore(je)}function Xe(e){return e.children}function Ye(e){return Array.isArray(e)?e[1]:null}function je(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Ue(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=ae.prototype={constructor:U,count:_e,each:ke,eachAfter:Ve,eachBefore:ze,find:De,sum:Pe,sort:Be,path:We,ancestors:Re,descendants:He,leaves:Ie,links:Oe,copy:Ge,[Symbol.iterator]:qe};function Ze(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Je(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ke(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(l-a)/e.value;++d<g;)h=o[d],h.y0=n,h.y1=r,h.x0=a,h.x1=a+=h.value*c}function Qe(e,a,n,l,r){for(var o=e.children,h,d=-1,g=o.length,c=e.value&&(r-n)/e.value;++d<g;)h=o[d],h.x0=a,h.x1=l,h.y0=n,h.y1=n+=h.value*c}var et=(1+Math.sqrt(5))/2;function tt(e,a,n,l,r,o){for(var h=[],d=a.children,g,c,p=0,b=0,s=d.length,x,S,v=a.value,u,y,N,$,V,E,M;p<s;){x=r-n,S=o-l;do u=d[b++].value;while(!u&&b<s);for(y=N=u,E=Math.max(S/x,x/S)/(v*e),M=u*u*E,V=Math.max(N/M,M/y);b<s;++b){if(u+=c=d[b].value,c<y&&(y=c),c>N&&(N=c),M=u*u*E,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x<S,children:d.slice(p,b)}),g.dice?Ke(g,n,l,r,v?l+=S*u/v:o):Qe(g,n,l,v?n+=x*u/v:r,o),v-=u,p=b}return h}const at=(function e(a){function n(l,r,o,h,d){tt(a,l,r,o,h,d)}return n.ratio=function(l){return e((l=+l)>1?l:1)},n})(et);function nt(){var e=at,a=!1,n=1,l=1,r=[0],o=O,h=O,d=O,g=O,c=O;function p(s){return s.x0=s.y0=0,s.x1=n,s.y1=l,s.eachBefore(b),r=[0],a&&s.eachBefore(Je),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),s.x0=S,s.y0=v,s.x1=u,s.y1=y,s.children&&(x=r[s.depth+1]=o(s)/2,S+=c(s)-x,v+=h(s)-x,u-=d(s)-x,y-=g(s)-x,u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),e(s,S,v,u,y))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(n=+s[0],l=+s[1],p):[n,l]},p.tile=function(s){return arguments.length?(e=Ze(s),p):e},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(o=typeof s=="function"?s:q(+s),p):o},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(h=typeof s=="function"?s:q(+s),p):h},p.paddingRight=function(s){return arguments.length?(d=typeof s=="function"?s:q(+s),p):d},p.paddingBottom=function(s){return arguments.length?(g=typeof s=="function"?s:q(+s),p):g},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:q(+s),p):c},p}var ie=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ve,this.getAccTitle=xe,this.setDiagramTitle=be,this.getDiagramTitle=we,this.getAccDescription=Ce,this.setAccDescription=Te}static{w(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=Le,a=te();return Q({...e.treemap,...a.treemap??{}})}addNode(e,a){this.nodes.push(e),this.levels.set(e,a),a===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,a){const n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=a.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");l&&l.forEach(r=>{$e(r)&&(n?.textStyles?n.textStyles.push(r):n.textStyles=[r]),n?.styles?n.styles.push(r):n.styles=[r]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){Ae(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function oe(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const r={name:l.name,children:l.type==="Leaf"?void 0:[]};for(r.classSelector=l?.classSelector,l?.cssCompiledStyles&&(r.cssCompiledStyles=l.cssCompiledStyles),l.type==="Leaf"&&l.value!==void 0&&(r.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(r);else{const o=n[n.length-1].node;o.children?o.children.push(r):o.children=[r]}l.type!=="Leaf"&&n.push({node:r,level:l.level})}),a}w(oe,"buildHierarchy");var lt=w((e,a)=>{me(e,a);const n=[];for(const o of e.TreemapRows??[])o.$type==="ClassDefStatement"&&a.addClass(o.className??"",o.styleText??"");for(const o of e.TreemapRows??[]){const h=o.item;if(!h)continue;const d=o.indent?parseInt(o.indent):0,g=rt(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};n.push(b)}const l=oe(n),r=w((o,h)=>{for(const d of o)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(l,0)},"populate"),rt=w(e=>e.name?String(e.name):"","getItemName"),ce={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ne("treemap",e);ee.debug("Treemap AST:",n);const l=ce.parser?.yy;if(!(l instanceof ie))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");lt(n,l)}catch(a){throw ee.error("Error parsing treemap:",a),a}},"parse")},st=10,W=10,G=25,it=w((e,a,n,l)=>{const r=l.db,o=r.getConfig(),h=o.padding??st,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=te();if(!g)return;const p=d?30:0,b=ye(a),s=o.nodeWidth?o.nodeWidth*W:960,x=o.nodeHeight?o.nodeHeight*W:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),Se(b,v,S,o.useMaxWidth);let u;try{const t=o.valueFormat||",";if(t==="$0,0")u=w(i=>"$"+I(",")(i),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const i=/\.\d+/.exec(t),f=i?i[0]:"";u=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const i=t.substring(1);u=w(f=>"$"+I(i||"")(f),"valueFormat")}else u=I(t)}catch(t){ee.error("Error creating format function:",t),u=I(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=ae(g).sum(t=>t.value??0).sort((t,i)=>(i.value??0)-(t.value??0)),ne=nt().size([s,x]).paddingTop(t=>t.children&&t.children.length>0?G+W:0).paddingInner(h).paddingLeft(t=>t.children&&t.children.length>0?W:0).paddingRight(t=>t.children&&t.children.length>0?W:0).paddingBottom(t=>t.children&&t.children.length>0?W:0).round(!0)(E),he=ne.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(he).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),R.append("clipPath").attr("id",(t,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",G),R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,i)=>`treemapSection section${i}`).attr("fill",t=>y(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const i=B({cssCompiledStyles:t.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("clip-path",(t,i)=>`url(#clip-section-${a}-${i})`).attr("style",t=>{if(t.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const i=j(this),f=t.data.name;i.text(f);const C=t.x1-t.x0,L=6;let T;o.showValues!==!1&&t.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=i.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){i.text("..."),_.getComputedTextLength()>m&&i.text("");break}if(i.text(z+"..."),_.getComputedTextLength()<=m)break}}}),o.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?u(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const le=ne.leaves(),A=le.length>20,de=A?16:38,X=A?14:28,D=A?4:8,H=A?4:6,Z=A?2:4,re=A?8:10,J=A?1:2,Y=V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class",(t,i)=>`treemapNode treemapLeafGroup leaf${i}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);Y.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("style",t=>B({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?y(t.parent.data.name):y(t.data.name)).attr("stroke-width",3),Y.append("clipPath").attr("id",(t,i)=>`clip-${a}-${i}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),Y.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const i=`text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:`+$(t.data.name)+";",f=B({cssCompiledStyles:t.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,i)=>`url(#clip-${a}-${i})`).text(t=>t.data.name).each(function(t){const i=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=i.node(),T=f-2*Z,P=C-2*Z;if(T<re||P<re){i.style("display","none");return}let m=parseInt(i.style("font-size"),10);const _=.6;for(;L.getComputedTextLength()>T&&m>D;)m--,i.style("font-size",`${m}px`);let F=Math.max(H,Math.min(X,Math.round(m*_))),k=m+J+F;for(;k>P&&m>D&&(m--,F=Math.max(H,Math.min(X,Math.round(m*_))),!(F<H&&m===D));)i.style("font-size",`${m}px`),k=m+J+F;i.style("font-size",`${m}px`),A?(m<D||P<D)&&i.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&i.style("display","none")}),o.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",i=>(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+$(i.data.name)+";",C=B({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?u(i.value):"").each(function(i){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(i.y1-i.y0)/2+T/2+J;f.attr("y",F);const k=i.x1-i.x0,se=i.y1-i.y0-4,fe=k-2*Z;f.node().getComputedTextLength()>fe||F+m>se||m<H?f.style("display","none"):f.style("display",null)});const pe=o.diagramPadding??8;Fe(b,pe,"flowchart",o?.useMaxWidth||!1)},"draw"),ot=w(function(e,a){return a.db.getClasses()},"getClasses"),ct={draw:it,getClasses:ot},ht={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},dt=w(({treemap:e}={})=>{const a=ge(),n=te(),l=Q(a,n.themeVariables),r=Q(ht,e),o=r.titleColor??l.titleColor,h=r.labelColor??l.textColor,d=r.valueColor??l.textColor;return` .treemapNode.section { stroke: ${r.sectionStrokeColor}; stroke-width: ${r.sectionStrokeWidth}; diff --git a/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CZRzvszj.js b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-arIhWcCl.js similarity index 93% rename from apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CZRzvszj.js rename to apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-arIhWcCl.js index 8138d268e..d4c37bc76 100644 --- a/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-CZRzvszj.js +++ b/apps/kimi-code/dist-web/assets/diagram-NH7WQ7WH-arIhWcCl.js @@ -1,4 +1,4 @@ -import{p as B}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as b,B as u,F as $,e as C,l as m,b as S,a as D,o as T,p as z,g as F,s as P,z as E,D as A,q as W}from"./mermaid.core-DpBz6UHc.js";import{p as _}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var N=A.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=F,this.setAccDescription=P}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{B(t,e);let r=-1,o=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,m.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){const[p,s]=Y({start:a,end:i,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}e.pushWord(o)},"populate"),Y=b((t,e,r)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},I=b((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const s of e){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:t}={})=>{const e=u(q,t);return` +import{p as B}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{_ as b,B as u,F as $,e as C,l as m,b as S,a as D,o as T,p as z,g as F,s as P,z as E,D as A,q as W}from"./mermaid.core-BKBZnrB_.js";import{p as _}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var N=A.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=F,this.setAccDescription=P}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=b((t,e)=>{B(t,e);let r=-1,o=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,m.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){const[p,s]=Y({start:a,end:i,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}e.pushWord(o)},"populate"),Y=b((t,e,r)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},I=b((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=b((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const s of e){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:t}={})=>{const e=u(q,t);return` .packetByte { font-size: ${e.byteFontSize}; } diff --git a/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-B2qPmny7.js b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DRlqkiV7.js similarity index 96% rename from apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-B2qPmny7.js rename to apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DRlqkiV7.js index 8dd08f1e0..9eb3c5027 100644 --- a/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-B2qPmny7.js +++ b/apps/kimi-code/dist-web/assets/diagram-OA4YK3LP-DRlqkiV7.js @@ -1,4 +1,4 @@ -import{I as X}from"./chunk-2Q5K7J3B-CqtdGPMZ.js";import{p as O}from"./chunk-JWPE2WC7-BtckK32c.js";import{o as G,b as Y,s as F,p as P,g as j,a as q,_ as f,B as A,l as D,F as Z,e as U,z as N,q as J,i as K,ai as Q,D as ee,aj as te}from"./mermaid.core-DpBz6UHc.js";import{p as ne}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var E=/[─━│┃└┗├┣]/,S=/[└┗├┣]/,re=/[─━]/,V=/^[\s│┃]+$/,$=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function L(n){return n.some(e=>E.test(e))}f(L,"isBoxDrawingFormat");function _(n){for(const e of n){const t=S.exec(e);if(t?.index&&t.index>0)return t.index}return 4}f(_,"inferSegmentWidth");function M(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{const i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}f(M,"remapErrorLines");function R(n){const e=n.split(` +import{I as X}from"./chunk-2Q5K7J3B-vvrZ7MG7.js";import{p as O}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{o as G,b as Y,s as F,p as P,g as j,a as q,_ as f,B as A,l as D,F as Z,e as U,z as N,q as J,i as K,ai as Q,D as ee,aj as te}from"./mermaid.core-BKBZnrB_.js";import{p as ne}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var E=/[─━│┃└┗├┣]/,S=/[└┗├┣]/,re=/[─━]/,V=/^[\s│┃]+$/,$=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function L(n){return n.some(e=>E.test(e))}f(L,"isBoxDrawingFormat");function _(n){for(const e of n){const t=S.exec(e);if(t?.index&&t.index>0)return t.index}return 4}f(_,"inferSegmentWidth");function M(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{const i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}f(M,"remapErrorLines");function R(n){const e=n.split(` `),t=new Map;let r=-1;for(const[s,o]of e.entries())if(o.trim()==="treeView-beta"){r=s;break}if(r===-1)return{text:n,lineMap:t};const i=[];for(let s=r+1;s<e.length;s++){const o=e[s];o.trim()===""||k.test(o)||$.test(o)||V.test(o)||i.push(o.replace(/\t/g," "))}if(!L(i))return{text:n,lineMap:t};const a=_(i),c=[];let l=0;for(let s=0;s<=r;s++)c.push(e[s]),l++,t.set(l,s+1);for(let s=r+1;s<e.length;s++){const o=e[s],h=o.trim(),p=s+1;if(h===""){c.push(o),l++,t.set(l,p);continue}if(k.test(o)){c.push(o),l++,t.set(l,p);continue}if($.test(o)){c.push(o),l++,t.set(l,p);continue}if(V.test(o))continue;const d=o.replace(/\t/g," "),w=S.exec(d);if(w?.index!==void 0){const g=w.index,m=Math.round(g/a)+1;let u=g+1;for(;u<d.length&&re.test(d[u]);)u++;for(;u<d.length&&d[u]===" ";)u++;const v=d.slice(u).trimEnd();if(!v)throw new Error(`Line ${p}: Empty node — expected a filename or directory name after the box-drawing prefix`);const W=ie.repeat(m);c.push(W+v),l++,t.set(l,p)}else{if(/^[\s─━│┃└┗├┣]+$/.test(d))continue;if(E.test(d))c.push(o),l++,t.set(l,p);else{if(/^\s+/.test(d))throw new Error(`Line ${p}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);c.push(o),l++,t.set(l,p)}}}return{text:c.join(` `),lineMap:t}}f(R,"preprocessBoxDrawing");var x=new X(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),oe=f(()=>{x.reset(),J()},"clear"),se=f(()=>x.records.stack[0],"getRoot"),ae=f(()=>x.records.cnt,"getCount"),ce=ee.treeView,le=f(()=>A(ce,N().treeView),"getConfig"),de=f((n,e,t,r,i,a)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const c={id:x.records.cnt++,level:n,name:e,nodeType:t,icon:i,cssClass:r,description:a,children:[]};x.records.stack[x.records.stack.length-1].children.push(c),x.records.stack.push(c)},"addNode"),he={clear:oe,addNode:de,getRoot:se,getCount:ae,getConfig:le,getAccTitle:q,getAccDescription:j,getDiagramTitle:P,setAccDescription:F,setAccTitle:Y,setDiagramTitle:G},I=he,pe=f(n=>{O(n,I);for(const e of n.nodes){const t=typeof e.indent=="number"?e.indent:0;let r=e.name;const i=r.endsWith("/");i&&(r=r.slice(0,-1));const a=i?"directory":"file",c=e.classAnnotation||void 0,l=e.iconAnnotation,s=l!==void 0?l||"none":void 0,o=e.descAnnotation||void 0,h=o?K(o,N()):void 0;I.addNode(t,r,a,c,s,h)}},"populate"),fe={parse:f(async n=>{const{text:e,lineMap:t}=R(n);try{const r=await ne("treeView",e);D.debug(r),pe(r)}catch(r){throw t.size>0&&r instanceof Error&&(r.message=M(r.message,t)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function z(n,e){const t=e?.filenameIcons?.[n];if(t)return t;const r=n.lastIndexOf(".");if(r>0){const i=n.substring(r).toLowerCase(),a=e?.extensionIcons;return a?.[i]??a?.[i.slice(1)]}}f(z,"detectIcon");function C(n,e){return n.includes(":")?n:n in b.icons||!e?`${b.prefix}:${n}`:`${e}:${n}`}f(C,"qualifyIcon");function B(n,e){if(n.icon!=="none"){if(n.icon)return C(n.icon,e.defaultIconPack);if(e.showIcons){if(n.nodeType==="file"){const t=z(n.name,e);if(t==="none")return;if(t)return C(t,e.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}f(B,"getNodeIcon");te([{name:b.prefix,icons:b}]);var y=14,ge=4,ue=16,H=f((n,e)=>`tv-icon-${n}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),we=f(async(n,e,t,r)=>{const i=new Set,a=f(s=>{const o=B(s,t);o&&i.add(o),s.children.forEach(a)},"collect");if(a(e),i.size===0)return;const c=await Promise.all([...i].map(async s=>({icon:s,svg:await Q(s,{height:y,width:y})}))),l=n.append("defs");for(const{icon:s,svg:o}of c)l.append("g").attr("id",H(r,s)).html(o)},"injectIconDefs"),me=f((n,e,t,r,i,a)=>{const c=r.append("g");let l="treeView-node-label";t.nodeType==="directory"&&(l+=" treeView-node-dir"),t.cssClass&&(l+=` ${t.cssClass}`);const s=y+ge,o=B(t,i),h=o!==void 0;o&&c.append("use").attr("xlink:href",`#${H(a,o)}`).attr("x",n+i.paddingX).attr("y",e+i.paddingY).attr("class","treeView-node-icon");const p=c.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:d,width:w}=p.node().getBBox(),g=d+i.paddingY*2,m=n+i.paddingX+(h?s:0);p.attr("x",m),p.attr("y",e+g/2);const u=m+w,v=w+i.paddingX*2+(h?s:0);return t.BBox={x:n,y:e,width:v,height:g},t.cssClass?.split(/\s+/).includes("highlight")&&c.insert("rect",":first-child").attr("x",n).attr("y",e+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:c,labelRightEdge:u,centerY:e+g/2}},"positionLabel"),T=f((n,e,t,r,i,a)=>n.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),xe=f((n,e,t,r)=>{let i=0,a=0;const c=[],l=f((h,p,d,w)=>{const g=w*(d.rowIndent+d.paddingX),m=me(g,i,p,h,d,r);c.push(m);const{height:u,width:v}=p.BBox;T(h,g-d.rowIndent,i+u/2,g,i+u/2,d.lineThickness),a=Math.max(a,g+v),i+=u},"drawNode"),s=f((h,p=0)=>{l(n,h,t,p),h.children.forEach(m=>{s(m,p+1)});const{x:d,y:w,height:g}=h.BBox;if(h.children.length){const{y:m,height:u}=h.children[h.children.length-1].BBox;T(n,d+t.paddingX,w+g,d+t.paddingX,m+u/2+t.lineThickness/2,t.lineThickness)}},"processNode");s(e);const o=c.filter(h=>h.node.description);if(o.length>0){const p=Math.max(...c.map(d=>d.labelRightEdge))+ue;for(const d of o){const g=d.nodeGroup.append("text").text(d.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",d.centerY).node().getBBox();a=Math.max(a,p+g.width+t.paddingX)}}for(const h of c)if(h.node.cssClass?.split(/\s+/).includes("highlight")){const p=h.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const d=a-h.node.BBox.x+8;p.attr("width",d),a=Math.max(a,h.node.BBox.x+d+2)}}return{totalHeight:i,totalWidth:a}},"drawTree"),ve=f(async(n,e,t,r)=>{D.debug(`Rendering treeView diagram `+n);const i=r.db,a=i.getRoot(),c=i.getConfig(),l=Z(e);await we(l,a,c,e);const s=l.append("g");s.attr("class","tree-view");const{totalHeight:o,totalWidth:h}=xe(s,a,c,e);l.attr("viewBox",`-${c.lineThickness/2} 0 ${h} ${o}`),U(l,o,h,c.useMaxWidth)},"draw"),be={draw:ve},Ie=be,Ce={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ye=f(({treeView:n})=>{const{labelFontSize:e,labelColor:t,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:c,highlightStroke:l}=A(Ce,n);return` diff --git a/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-BhWQTWhi.js b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-zMSIhP2J.js similarity index 95% rename from apps/kimi-code/dist-web/assets/diagram-WEI45ONY-BhWQTWhi.js rename to apps/kimi-code/dist-web/assets/diagram-WEI45ONY-zMSIhP2J.js index 471c02d8f..623c8da64 100644 --- a/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-BhWQTWhi.js +++ b/apps/kimi-code/dist-web/assets/diagram-WEI45ONY-zMSIhP2J.js @@ -1,4 +1,4 @@ -import{p as k}from"./chunk-JWPE2WC7-BtckK32c.js";import{s as R,g as F,p as I,o as _,a as D,b as E,_ as c,F as z,q as P,B as y,z as C,D as G,l as B,W,e as V}from"./mermaid.core-DpBz6UHc.js";import{p as H}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:m},x=structuredClone(w),j=G.radar,q=c(()=>y({...j,...C().radar}),"getConfig"),b=c(()=>x.axes,"getAxes"),N=c(()=>x.curves,"getCurves"),U=c(()=>x.options,"getOptions"),X=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule}},"setOptions"),K=c(()=>{P(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:E,getAccTitle:D,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:F,setAccDescription:R},Q=c(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:c(async a=>{const t=await H("radar",a);B.debug(t),Q(t)},"parse")},et=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=at(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;rt(u,i,v,n.ticks,n.graticule),st(u,i,v,o),A(u,i,l,h,g,n.graticule,o),T(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),at=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return V(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=c((a,t,e,r)=>{const s=t.length;for(let i=0;i<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function A(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=M(g,r,s,o),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});i==="circle"?a.append("path").attr("d",L(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(A,"drawCurves");function M(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(M,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}c(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(T,"drawLegend");var nt={draw:et},ot=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=` +import{p as k}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{s as R,g as F,p as I,o as _,a as D,b as E,_ as c,F as z,q as P,B as y,z as C,D as G,l as B,W,e as V}from"./mermaid.core-BKBZnrB_.js";import{p as H}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var m={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:m},x=structuredClone(w),j=G.radar,q=c(()=>y({...j,...C().radar}),"getConfig"),b=c(()=>x.axes,"getAxes"),N=c(()=>x.curves,"getCurves"),U=c(()=>x.options,"getOptions"),X=c(a=>{x.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{x.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=c(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});x.options={showLegend:t.showLegend?.value??m.showLegend,ticks:t.ticks?.value??m.ticks,max:t.max?.value??m.max,min:t.min?.value??m.min,graticule:t.graticule?.value??m.graticule}},"setOptions"),K=c(()=>{P(),x=structuredClone(w)},"clear"),$={getAxes:b,getCurves:N,getOptions:U,setAxes:X,setCurves:Y,setOptions:J,getConfig:q,clear:K,setAccTitle:E,getAccTitle:D,setDiagramTitle:_,getDiagramTitle:I,getAccDescription:F,setAccDescription:R},Q=c(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),tt={parse:c(async a=>{const t=await H("radar",a);B.debug(t),Q(t)},"parse")},et=c((a,t,e,r)=>{const s=r.db,i=s.getAxes(),l=s.getCurves(),n=s.getOptions(),o=s.getConfig(),d=s.getDiagramTitle(),p=z(t),u=at(p,o),g=n.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=n.min,v=Math.min(o.width,o.height)/2;rt(u,i,v,n.ticks,n.graticule),st(u,i,v,o),A(u,i,l,h,g,n.graticule,o),T(u,l,n.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),at=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return V(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),rt=c((a,t,e,r,s)=>{if(s==="circle")for(let i=0;i<r;i++){const l=e*(i+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(s==="polygon"){const i=t.length;for(let l=0;l<r;l++){const n=e*(l+1)/r,o=t.map((d,p)=>{const u=2*p*Math.PI/i-Math.PI/2,g=n*Math.cos(u),h=n*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=c((a,t,e,r)=>{const s=t.length;for(let i=0;i<s;i++){const l=t[i].label,n=2*i*Math.PI/s-Math.PI/2,o=Math.cos(n),d=Math.sin(n);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");const p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*o+g*o).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function A(a,t,e,r,s,i,l){const n=t.length,o=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==n)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/n-Math.PI/2,f=M(g,r,s,o),S=f*Math.cos(v),O=f*Math.sin(v);return{x:S,y:O}});i==="circle"?a.append("path").attr("d",L(u,l.curveTension)).attr("class",`radarCurve-${p}`):i==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(A,"drawCurves");function M(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(M,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s<e;s++){const i=a[(s-1+e)%e],l=a[s],n=a[(s+1)%e],o=a[(s+2)%e],d={x:l.x+(n.x-i.x)*t,y:l.y+(n.y-i.y)*t},p={x:n.x-(o.x-l.x)*t,y:n.y-(o.y-l.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`}return`${r} Z`}c(L,"closedRoundCurve");function T(a,t,e,r){if(!e)return;const s=(r.width/2+r.marginRight)*3/4,i=-(r.height/2+r.marginTop)*3/4,l=20;t.forEach((n,o)=>{const d=a.append("g").attr("transform",`translate(${s}, ${i+o*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}c(T,"drawLegend");var nt={draw:et},ot=c((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const s=a[`cScale${r}`];e+=` .radarCurve-${r} { color: ${s}; fill: ${s}; diff --git a/apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-C7ceb06g.js b/apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-CxhfT5Dk.js similarity index 87% rename from apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-C7ceb06g.js rename to apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-CxhfT5Dk.js index 09f2c2342..6ec156436 100644 --- a/apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-C7ceb06g.js +++ b/apps/kimi-code/dist-web/assets/ebnfDiagram-CCIWWBDH-CxhfT5Dk.js @@ -1 +1 @@ -import{g as l,r as m,d as n}from"./chunk-MOJQB5TN-B49sRSVS.js";import{p}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as t,l as o}from"./mermaid.core-DpBz6UHc.js";import{M as u,a as f}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; +import{g as l,r as m,d as n}from"./chunk-MOJQB5TN-BWl8WxOI.js";import{p}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{_ as t,l as o}from"./mermaid.core-BKBZnrB_.js";import{M as u,a as f}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram}; diff --git a/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-CnsIdx2o.js b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-qDRc-Mjq.js similarity index 99% rename from apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-CnsIdx2o.js rename to apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-qDRc-Mjq.js index c3bea349b..e87a2e713 100644 --- a/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-CnsIdx2o.js +++ b/apps/kimi-code/dist-web/assets/erDiagram-Q63AITRT-qDRc-Mjq.js @@ -1,4 +1,4 @@ -import{g as Mt}from"./chunk-XXDRQBXY-BYo5O_6D.js";import{s as Bt}from"./chunk-VR4S4FIN-JAO0vJUe.js";import{_ as l,b as Ft,a as Yt,s as Pt,g as zt,o as Gt,p as Kt,c as it,l as V,q as Ut,r as Zt,t as jt,u as Wt,v as qt,x as Qt,d as Xt,y as Ht}from"./mermaid.core-DpBz6UHc.js";import{c as Jt}from"./channel-DPT3_xql.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var _t=(function(){var e=l(function(I,n,c,o){for(c=c||{},o=I.length;o--;c[I[o]]=n);return c},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],h=[1,10],a=[1,11],u=[1,12],d=[1,13],y=[1,23],f=[1,24],m=[1,25],j=[1,26],W=[1,27],S=[1,19],q=[1,28],M=[1,29],D=[1,20],R=[1,18],T=[1,21],C=[1,22],nt=[1,36],at=[1,37],ct=[1,38],ot=[1,39],lt=[1,40],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],F=[1,55],Y=[40,48,50,51,52,71,72],P=[1,66],z=[1,64],A=[1,61],G=[1,65],K=[1,67],Q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],gt=[66,67,68,69,70],bt=[1,85],kt=[1,84],mt=[1,82],Et=[1,83],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],X=[1,93],H=[1,92],J=[1,91],U=[19,58],Tt=[1,102],Ot=[1,101],ht=[19,58,61,63],ut={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:l(function(n,c,o,r,p,t,Z){var s=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 5:this.$=t[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[s-4]),r.addEntity(t[s-2]),r.addRelationship(t[s-4],t[s],t[s-2],t[s-3]);break;case 9:r.addEntity(t[s-8]),r.addEntity(t[s-4]),r.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),r.setClass([t[s-8]],t[s-6]),r.setClass([t[s-4]],t[s-2]);break;case 10:r.addEntity(t[s-6]),r.addEntity(t[s-2]),r.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),r.setClass([t[s-6]],t[s-4]);break;case 11:r.addEntity(t[s-6]),r.addEntity(t[s-4]),r.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),r.setClass([t[s-4]],t[s-2]);break;case 12:r.addEntity(t[s-3]),r.addAttributes(t[s-3],t[s-1]);break;case 13:r.addEntity(t[s-5]),r.addAttributes(t[s-5],t[s-1]),r.setClass([t[s-5]],t[s-3]);break;case 14:r.addEntity(t[s-2]);break;case 15:r.addEntity(t[s-4]),r.setClass([t[s-4]],t[s-2]);break;case 16:r.addEntity(t[s]);break;case 17:r.addEntity(t[s-2]),r.setClass([t[s-2]],t[s]);break;case 18:r.addEntity(t[s-6],t[s-4]),r.addAttributes(t[s-6],t[s-1]);break;case 19:r.addEntity(t[s-8],t[s-6]),r.addAttributes(t[s-8],t[s-1]),r.setClass([t[s-8]],t[s-3]);break;case 20:r.addEntity(t[s-5],t[s-3]);break;case 21:r.addEntity(t[s-7],t[s-5]),r.setClass([t[s-7]],t[s-2]);break;case 22:r.addEntity(t[s-3],t[s-1]);break;case 23:r.addEntity(t[s-5],t[s-3]),r.setClass([t[s-5]],t[s]);break;case 24:case 25:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[s-3],r.addClass(t[s-2],t[s-1]);break;case 37:case 38:case 59:case 68:this.$=[t[s]];break;case 39:case 40:this.$=t[s-2].concat([t[s]]);break;case 41:this.$=t[s-2],r.setClass(t[s-1],t[s]);break;case 42:this.$=t[s-3],r.addCssStyles(t[s-2],t[s-1]);break;case 43:this.$=[t[s]];break;case 44:t[s-2].push(t[s]),this.$=t[s-2];break;case 46:this.$=t[s-1]+t[s];break;case 54:case 80:case 81:this.$=t[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[s];break;case 60:t[s].push(t[s-1]),this.$=t[s];break;case 61:this.$={type:t[s-1],name:t[s]};break;case 62:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 63:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 64:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 65:case 67:case 70:this.$=t[s];break;case 66:this.$=t[s-1]+t[s];break;case 69:t[s-2].push(t[s]),this.$=t[s-2];break;case 71:this.$=t[s].replace(/"/g,"");break;case 72:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,7],{1:[2,1]}),e(i,[2,3]),{9:30,11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:nt,67:at,68:ct,69:ot,70:lt}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(i,[2,27]),e(i,[2,28]),e(i,[2,29]),e(i,[2,30]),e(i,[2,31]),e(B,[2,54]),e(B,[2,55]),e(B,[2,56]),e(B,[2,57]),e(B,[2,58]),e(i,[2,32]),e(i,[2,33]),e(i,[2,34]),e(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},e(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:C},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:S,48:D,50:R,51:T,52:C},{65:57,71:[1,58],72:[1,59]},e(Y,[2,73]),e(Y,[2,74]),e(Y,[2,75]),e(Y,[2,76]),e(Y,[2,77]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:P,38:60,41:z,42:A,45:62,46:63,48:G,49:K},e(Q,[2,37]),e(Q,[2,38]),{16:68,40:O,41:N,42:A},{13:P,38:69,41:z,42:A,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},e(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:nt,67:at,68:ct,69:ot,70:lt}),{19:[1,74]},e(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:F},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:nt,67:at,68:ct,69:ot,70:lt},e(gt,[2,78]),e(gt,[2,79]),{6:bt,10:kt,39:81,42:mt,47:Et},{40:[1,86],41:[1,87]},e(St,[2,43],{46:88,13:P,41:z,48:G,49:K}),e(L,[2,45]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),e(L,[2,53]),e(i,[2,41],{42:A}),{6:bt,10:kt,39:89,42:mt,47:Et},{14:90,40:X,50:H,73:J},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:C},{18:96,19:[1,97],53:53,54:54,58:F},e(i,[2,12]),{19:[2,60]},e(U,[2,61],{56:98,57:99,60:100,62:Tt,63:Ot}),e([19,58,62,63],[2,67]),{58:[2,66]},e(i,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(i,[2,36]),{13:P,41:z,45:105,46:63,48:G,49:K},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(Q,[2,39]),e(Q,[2,40]),e(L,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,80]),e(i,[2,81]),e(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},e(i,[2,15]),e(U,[2,62],{57:110,61:[1,111],63:Ot}),e(U,[2,63]),e(ht,[2,68]),e(U,[2,71]),e(ht,[2,70]),{18:112,19:[1,113],53:53,54:54,58:F},{16:114,40:O,41:N},e(St,[2,44],{46:88,13:P,41:z,48:G,49:K}),{14:115,40:X,50:H,73:J},{16:116,40:O,41:N},{14:117,40:X,50:H,73:J},e(i,[2,13]),e(U,[2,64]),{60:118,62:Tt},{19:[1,119]},e(i,[2,20]),e(i,[2,23],{17:[1,120],42:A}),e(i,[2,11]),{13:[1,121],42:A},e(i,[2,10]),e(ht,[2,69]),e(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:F},{14:124,40:X,50:H,73:J},{19:[1,125]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:l(function(n,c){if(c.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=c,o}},"parseError"),parse:l(function(n){var c=this,o=[0],r=[],p=[null],t=[],Z=this.table,s="",tt=0,Nt=0,Dt=2,At=1,Lt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(x.yy[dt]=this.yy[dt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;t.push(pt);var wt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vt(b){o.length=o.length-2*b,p.length=p.length-b,t.length=t.length-b}l(Vt,"popStack");function It(){var b;return b=r.pop()||_.lex()||At,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=c.symbols_[b]||b),b}l(It,"lex");for(var g,v,k,ft,w={},et,E,Rt,st;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=It()),k=Z[v]&&Z[v][g]),typeof k>"u"||!k.length||!k[0]){var yt="";st=[];for(et in Z[v])this.terminals_[et]&&et>Dt&&st.push("'"+this.terminals_[et]+"'");_.showPosition?yt="Parse error on line "+(tt+1)+`: +import{g as Mt}from"./chunk-XXDRQBXY-BeefoqH0.js";import{s as Bt}from"./chunk-VR4S4FIN-CTR9P-lT.js";import{_ as l,b as Ft,a as Yt,s as Pt,g as zt,o as Gt,p as Kt,c as it,l as V,q as Ut,r as Zt,t as jt,u as Wt,v as qt,x as Qt,d as Xt,y as Ht}from"./mermaid.core-BKBZnrB_.js";import{c as Jt}from"./channel-C2KMAw2n.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var _t=(function(){var e=l(function(I,n,c,o){for(c=c||{},o=I.length;o--;c[I[o]]=n);return c},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],h=[1,10],a=[1,11],u=[1,12],d=[1,13],y=[1,23],f=[1,24],m=[1,25],j=[1,26],W=[1,27],S=[1,19],q=[1,28],M=[1,29],D=[1,20],R=[1,18],T=[1,21],C=[1,22],nt=[1,36],at=[1,37],ct=[1,38],ot=[1,39],lt=[1,40],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],F=[1,55],Y=[40,48,50,51,52,71,72],P=[1,66],z=[1,64],A=[1,61],G=[1,65],K=[1,67],Q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],gt=[66,67,68,69,70],bt=[1,85],kt=[1,84],mt=[1,82],Et=[1,83],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],X=[1,93],H=[1,92],J=[1,91],U=[19,58],Tt=[1,102],Ot=[1,101],ht=[19,58,61,63],ut={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:l(function(n,c,o,r,p,t,Z){var s=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 5:this.$=t[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[s-4]),r.addEntity(t[s-2]),r.addRelationship(t[s-4],t[s],t[s-2],t[s-3]);break;case 9:r.addEntity(t[s-8]),r.addEntity(t[s-4]),r.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),r.setClass([t[s-8]],t[s-6]),r.setClass([t[s-4]],t[s-2]);break;case 10:r.addEntity(t[s-6]),r.addEntity(t[s-2]),r.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),r.setClass([t[s-6]],t[s-4]);break;case 11:r.addEntity(t[s-6]),r.addEntity(t[s-4]),r.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),r.setClass([t[s-4]],t[s-2]);break;case 12:r.addEntity(t[s-3]),r.addAttributes(t[s-3],t[s-1]);break;case 13:r.addEntity(t[s-5]),r.addAttributes(t[s-5],t[s-1]),r.setClass([t[s-5]],t[s-3]);break;case 14:r.addEntity(t[s-2]);break;case 15:r.addEntity(t[s-4]),r.setClass([t[s-4]],t[s-2]);break;case 16:r.addEntity(t[s]);break;case 17:r.addEntity(t[s-2]),r.setClass([t[s-2]],t[s]);break;case 18:r.addEntity(t[s-6],t[s-4]),r.addAttributes(t[s-6],t[s-1]);break;case 19:r.addEntity(t[s-8],t[s-6]),r.addAttributes(t[s-8],t[s-1]),r.setClass([t[s-8]],t[s-3]);break;case 20:r.addEntity(t[s-5],t[s-3]);break;case 21:r.addEntity(t[s-7],t[s-5]),r.setClass([t[s-7]],t[s-2]);break;case 22:r.addEntity(t[s-3],t[s-1]);break;case 23:r.addEntity(t[s-5],t[s-3]),r.setClass([t[s-5]],t[s]);break;case 24:case 25:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[s-3],r.addClass(t[s-2],t[s-1]);break;case 37:case 38:case 59:case 68:this.$=[t[s]];break;case 39:case 40:this.$=t[s-2].concat([t[s]]);break;case 41:this.$=t[s-2],r.setClass(t[s-1],t[s]);break;case 42:this.$=t[s-3],r.addCssStyles(t[s-2],t[s-1]);break;case 43:this.$=[t[s]];break;case 44:t[s-2].push(t[s]),this.$=t[s-2];break;case 46:this.$=t[s-1]+t[s];break;case 54:case 80:case 81:this.$=t[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[s];break;case 60:t[s].push(t[s-1]),this.$=t[s];break;case 61:this.$={type:t[s-1],name:t[s]};break;case 62:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 63:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 64:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 65:case 67:case 70:this.$=t[s];break;case 66:this.$=t[s-1]+t[s];break;case 69:t[s-2].push(t[s]),this.$=t[s-2];break;case 71:this.$=t[s].replace(/"/g,"");break;case 72:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,7],{1:[2,1]}),e(i,[2,3]),{9:30,11:9,22:h,24:a,26:u,28:d,29:14,30:15,31:16,32:17,33:y,34:f,35:m,36:j,37:W,40:S,43:q,44:M,48:D,50:R,51:T,52:C},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:nt,67:at,68:ct,69:ot,70:lt}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(i,[2,27]),e(i,[2,28]),e(i,[2,29]),e(i,[2,30]),e(i,[2,31]),e(B,[2,54]),e(B,[2,55]),e(B,[2,56]),e(B,[2,57]),e(B,[2,58]),e(i,[2,32]),e(i,[2,33]),e(i,[2,34]),e(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},e(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:C},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:S,48:D,50:R,51:T,52:C},{65:57,71:[1,58],72:[1,59]},e(Y,[2,73]),e(Y,[2,74]),e(Y,[2,75]),e(Y,[2,76]),e(Y,[2,77]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:P,38:60,41:z,42:A,45:62,46:63,48:G,49:K},e(Q,[2,37]),e(Q,[2,38]),{16:68,40:O,41:N,42:A},{13:P,38:69,41:z,42:A,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},e(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:nt,67:at,68:ct,69:ot,70:lt}),{19:[1,74]},e(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:F},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:nt,67:at,68:ct,69:ot,70:lt},e(gt,[2,78]),e(gt,[2,79]),{6:bt,10:kt,39:81,42:mt,47:Et},{40:[1,86],41:[1,87]},e(St,[2,43],{46:88,13:P,41:z,48:G,49:K}),e(L,[2,45]),e(L,[2,50]),e(L,[2,51]),e(L,[2,52]),e(L,[2,53]),e(i,[2,41],{42:A}),{6:bt,10:kt,39:89,42:mt,47:Et},{14:90,40:X,50:H,73:J},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:C},{18:96,19:[1,97],53:53,54:54,58:F},e(i,[2,12]),{19:[2,60]},e(U,[2,61],{56:98,57:99,60:100,62:Tt,63:Ot}),e([19,58,62,63],[2,67]),{58:[2,66]},e(i,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(i,[2,36]),{13:P,41:z,45:105,46:63,48:G,49:K},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(Q,[2,39]),e(Q,[2,40]),e(L,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,80]),e(i,[2,81]),e(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},e(i,[2,15]),e(U,[2,62],{57:110,61:[1,111],63:Ot}),e(U,[2,63]),e(ht,[2,68]),e(U,[2,71]),e(ht,[2,70]),{18:112,19:[1,113],53:53,54:54,58:F},{16:114,40:O,41:N},e(St,[2,44],{46:88,13:P,41:z,48:G,49:K}),{14:115,40:X,50:H,73:J},{16:116,40:O,41:N},{14:117,40:X,50:H,73:J},e(i,[2,13]),e(U,[2,64]),{60:118,62:Tt},{19:[1,119]},e(i,[2,20]),e(i,[2,23],{17:[1,120],42:A}),e(i,[2,11]),{13:[1,121],42:A},e(i,[2,10]),e(ht,[2,69]),e(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:F},{14:124,40:X,50:H,73:J},{19:[1,125]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:l(function(n,c){if(c.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=c,o}},"parseError"),parse:l(function(n){var c=this,o=[0],r=[],p=[null],t=[],Z=this.table,s="",tt=0,Nt=0,Dt=2,At=1,Lt=t.slice.call(arguments,1),_=Object.create(this.lexer),x={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(x.yy[dt]=this.yy[dt]);_.setInput(n,x.yy),x.yy.lexer=_,x.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var pt=_.yylloc;t.push(pt);var wt=_.options&&_.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Vt(b){o.length=o.length-2*b,p.length=p.length-b,t.length=t.length-b}l(Vt,"popStack");function It(){var b;return b=r.pop()||_.lex()||At,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=c.symbols_[b]||b),b}l(It,"lex");for(var g,v,k,ft,w={},et,E,Rt,st;;){if(v=o[o.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=It()),k=Z[v]&&Z[v][g]),typeof k>"u"||!k.length||!k[0]){var yt="";st=[];for(et in Z[v])this.terminals_[et]&&et>Dt&&st.push("'"+this.terminals_[et]+"'");_.showPosition?yt="Parse error on line "+(tt+1)+`: `+_.showPosition()+` Expecting `+st.join(", ")+", got '"+(this.terminals_[g]||g)+"'":yt="Parse error on line "+(tt+1)+": Unexpected "+(g==At?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(yt,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:pt,expected:st})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(k[0]){case 1:o.push(g),p.push(_.yytext),t.push(_.yylloc),o.push(k[1]),g=null,Nt=_.yyleng,s=_.yytext,tt=_.yylineno,pt=_.yylloc;break;case 2:if(E=this.productions_[k[1]][1],w.$=p[p.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},wt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),ft=this.performAction.apply(w,[s,Nt,tt,x.yy,k[1],p,t].concat(Lt)),typeof ft<"u")return ft;E&&(o=o.slice(0,-1*E*2),p=p.slice(0,-1*E),t=t.slice(0,-1*E)),o.push(this.productions_[k[1]][0]),p.push(w.$),t.push(w._$),Rt=Z[o[o.length-2]][o[o.length-1]],o.push(Rt);break;case 3:return!0}}return!0},"parse")},vt=(function(){var I={EOF:1,parseError:l(function(c,o){if(this.yy.parser)this.yy.parser.parseError(c,o);else throw new Error(c)},"parseError"),setInput:l(function(n,c){return this.yy=c||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var c=n.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:l(function(n){var c=n.length,o=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===r.length?this.yylloc.first_column:0)+r[r.length-o.length].length-o[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(n){this.unput(this.match.slice(n))},"less"),pastInput:l(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var n=this.pastInput(),c=new Array(n.length+1).join("-");return n+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CBIszsQp.js b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CLFIXYkh.js similarity index 99% rename from apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CBIszsQp.js rename to apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CLFIXYkh.js index f48968424..fee6ef8f8 100644 --- a/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CBIszsQp.js +++ b/apps/kimi-code/dist-web/assets/flowDiagram-23GEKE2U-CLFIXYkh.js @@ -1,4 +1,4 @@ -import{g as He}from"./chunk-5VM5RSS4-D5nhu_pI.js";import{g as Xe}from"./chunk-XXDRQBXY-BYo5O_6D.js";import{s as Qe}from"./chunk-VR4S4FIN-JAO0vJUe.js";import{_ as b,b6 as Ze,X as Oe,l as Z,c as g1,v as Je,x as $e,y as ie,b as et,s as tt,o as st,a as it,g as rt,p as at,k as nt,Y as ut,Z as ot,bo as lt,r as te,d as se,a5 as ct,q as ht,b8 as dt,t as pt}from"./mermaid.core-DpBz6UHc.js";import{f as ft}from"./chunk-32BRIVSS-Dx199TNh.js";import{c as gt}from"./channel-DPT3_xql.js";var bt="flowchart-",At=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=et,this.setAccDescription=tt,this.setDiagramTitle=st,this.getAccTitle=it,this.getAccDescription=rt,this.getDiagramTitle=at,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{b(this,"FlowDB")}sanitizeText(e){return nt.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,o,d,l={},A){if(!e||e.trim().length===0)return;let n;if(A!==void 0){let k;A.includes(` +import{g as He}from"./chunk-5VM5RSS4-BxdGGlTY.js";import{g as Xe}from"./chunk-XXDRQBXY-BeefoqH0.js";import{s as Qe}from"./chunk-VR4S4FIN-CTR9P-lT.js";import{_ as b,b6 as Ze,X as Oe,l as Z,c as g1,v as Je,x as $e,y as ie,b as et,s as tt,o as st,a as it,g as rt,p as at,k as nt,Y as ut,Z as ot,bo as lt,r as te,d as se,a5 as ct,q as ht,b8 as dt,t as pt}from"./mermaid.core-BKBZnrB_.js";import{f as ft}from"./chunk-32BRIVSS-CZoTGle4.js";import{c as gt}from"./channel-C2KMAw2n.js";var bt="flowchart-",At=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=et,this.setAccDescription=tt,this.setDiagramTitle=st,this.getAccTitle=it,this.getAccDescription=rt,this.getDiagramTitle=at,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{b(this,"FlowDB")}sanitizeText(e){return nt.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const i of this.vertices.values())if(i.id===e)return this.diagramId?`${this.diagramId}-${i.domId}`:i.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,i,r,a,o,d,l={},A){if(!e||e.trim().length===0)return;let n;if(A!==void 0){let k;A.includes(` `)?k=A+` `:k=`{ `+A+` diff --git a/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-Bp3UvmyY.js b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-CWQOrsH8.js similarity index 99% rename from apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-Bp3UvmyY.js rename to apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-CWQOrsH8.js index 0777e866b..041301e78 100644 --- a/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-Bp3UvmyY.js +++ b/apps/kimi-code/dist-web/assets/ganttDiagram-NO4QXBWP-CWQOrsH8.js @@ -1,4 +1,4 @@ -import{bg as on,bh as On,bi as cn,bj as un,bk as ln,bl as ue,bm as Hn,g as Nn,s as Pn,p as Vn,o as Rn,a as zn,b as qn,_ as d,c as Yt,d as Zt,e as Bn,bn as it,l as Tt,k as Zn,j as Xn,q as Gn,y as jn}from"./mermaid.core-DpBz6UHc.js";import{g as oe}from"./_commonjsHelpers-CqkleIqs.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-BWc4ICs9.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-_5lXYMaO.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*hr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function be(t,e,n,r){return arguments.length===1?yr(t):new ht(t,e,n,r??1)}function ht(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function pn(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*dr;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}cn(ht,be,un(ln,{brighter(t){return new ht(this.h,this.c,this.l+ne*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-ne*(t??1),this.opacity)},rgb(){return pn(this).rgb()}}));function kr(t){return function(e,n){var r=t((e=be(e)).h,(n=be(n)).h),i=ue(e.c,n.c),s=ue(e.l,n.l),a=ue(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const pr=kr(Hn);function vr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ge=new Date,ye=new Date;function nt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a<y-s?a:y},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s<a)||!(y>0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(S<s&&s<a);return F},i.filter=s=>nt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=w<S;_&&([S,w]=[w,S]);const Y=P&&typeof P.range=="function"?P:F(S,w,P),X=Y?Y.range(S,+w+1):[];return _?X.reverse():X}function F(S,w,P){const _=Math.abs(w-S)/P,Y=Qn(([,,v])=>v).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]<a[Y][2]/_?Y-1:Y];return X.every(B)}return[y,F]}const[Yr,Fr]=_r(kt,Rt,zt,xt,Pt,Nt);function pe(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ve(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $t(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ur(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,F=t.shortMonths,S=Ot(i),w=Ht(i),P=Ot(s),_=Ht(s),Y=Ot(a),X=Ht(a),B=Ot(y),v=Ht(y),U=Ot(F),R=Ht(F),E={a:m,A:I,b:o,B:W,c:null,d:Xe,e:Xe,f:ti,g:li,G:di,H:Qr,I:Jr,j:Kr,L:Dn,m:ei,M:ni,p:u,q:K,Q:Qe,s:Je,S:ri,u:ii,U:si,V:ai,w:oi,W:ci,x:null,X:null,y:ui,Y:fi,Z:hi,"%":je},z={a:l,A:$,b:O,B:j,c:null,d:Ge,e:Ge,f:ki,g:Si,G:Yi,H:mi,I:gi,j:yi,L:Cn,m:pi,M:vi,p:H,q:J,Q:Qe,s:Je,S:Ti,u:xi,U:bi,V:wi,w:Di,W:Mi,x:null,X:null,y:Ci,Y:_i,Z:Fi,"%":je},G={a:x,A:C,b:M,B:D,c,d:Be,e:Be,f:Zr,g:qe,G:ze,H:Ze,I:Ze,j:Rr,L:Br,m:Vr,M:zr,p:L,q:Pr,Q:Gr,s:jr,S:qr,u:Wr,U:$r,V:Or,w:Ar,W:Hr,x:g,X:b,y:qe,Y:ze,Z:Nr,"%":Xr};E.x=T(n,E),E.X=T(r,E),E.c=T(e,E),z.x=T(n,z),z.X=T(r,z),z.c=T(e,z);function T(h,N){return function(V){var f=[],tt=-1,A=0,Q=h.length,Z,st,at;for(V instanceof Date||(V=new Date(+V));++tt<Q;)h.charCodeAt(tt)===37&&(f.push(h.slice(A,tt)),(st=Re[Z=h.charAt(++tt)])!=null?Z=h.charAt(++tt):st=Z==="e"?" ":"0",(at=N[Z])&&(Z=at(V,st)),f.push(Z),A=tt+1);return f.push(h.slice(A,tt)),f.join("")}}function k(h,N){return function(V){var f=$t(1900,void 0,1),tt=p(f,h,V+="",0),A,Q;if(tt!=V.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(N&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt<A;){if(f>=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function Lr(t){return t.replace(Ir,"\\$&")}function Ot(t){return new RegExp("^(?:"+t.map(Lr).join("|")+")","i")}function Ht(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)<T?Y:y(T)<T?X:a(T)<T?B:s(T)<T?v:r(T)<T?i(T)<T?U:R:n(T)<T?E:z)(T)}return w.invert=function(T){return new Date(P(T))},w.domain=function(T){return arguments.length?_(Array.from(T,Ii)):_().map(Ei)},w.ticks=function(T){var k=_();return t(k[0],k[k.length-1],T??10)},w.tickFormat=function(T,k){return k==null?G:S(k)},w.nice=function(T){var k=_();return(!T||typeof T.range!="function")&&(T=e(k[0],k[k.length-1],T??10)),T?_(vr(k,T)):w},w.copy=function(){return Kn(w,_n(t,e,n,r,i,s,a,y,F,S))},w}function Li(){return er.apply(_n(Yr,Fr,kt,Rt,zt,xt,Pt,Nt,vt,ie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var jt={exports:{}},Ai=jt.exports,Ke;function Wi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})(Ai,(function(){var n="day";return function(r,i,s){var a=function(S){return S.add(4-S.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var w,P,_,Y,X=a(this),B=(w=this.isoWeekYear(),P=this.$u,_=(P?s.utc:s)().year(w).startOf("year"),Y=4-_.isoWeekday(),_.isoWeekday()>4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G<z;G+=1){var T=E[G],k=X[T],p=k&&k[0],L=k&&k[1];E[G]=L?{regex:p,parser:L}:T.replace(/^\[|\]$/g,"")}return function(x){for(var C={},M=0,D=0;M<z;M+=1){var c=E[M];if(typeof c=="string")D+=c.length;else{var g=c.regex,b=c.parser,m=x.slice(D),I=g.exec(m)[0];b.call(C,I),x=x.replace(I,"")}}return(function(o){var W=o.afternoon;if(W!==void 0){var u=o.hours;W?u<12&&(o.hours+=12):u===12&&(o.hours=0),delete o.afternoon}})(C),C}}return function(v,U,R){R.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(S=v.parseTwoDigitYear);var E=U.prototype,z=E.parse;E.parse=function(G){var T=G.date,k=G.utc,p=G.args;this.$u=k;var L=p[1];if(typeof L=="string"){var x=p[2]===!0,C=p[3]===!0,M=x||C,D=p[2];C&&(D=p[2]),F=this.$locale(),!x&&D&&(F=R.Ls[D]),this.$d=(function(m,I,o,W){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: +import{bg as on,bh as On,bi as cn,bj as un,bk as ln,bl as ue,bm as Hn,g as Nn,s as Pn,p as Vn,o as Rn,a as zn,b as qn,_ as d,c as Yt,d as Zt,e as Bn,bn as it,l as Tt,k as Zn,j as Xn,q as Gn,y as jn}from"./mermaid.core-BKBZnrB_.js";import{g as oe}from"./_commonjsHelpers-CqkleIqs.js";import{b as Qn,t as Ne,c as Jn,a as Kn,l as tr}from"./linear-oD38CRgN.js";import{i as er}from"./init-Gi6I4Gst.js";import"./index-yKYHPeXU.js";import"./defaultLocale-DX6XiGOO.js";function nr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function rr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ir(t){return t}var Gt=1,le=2,xe=3,Xt=4,Pe=1e-6;function sr(t){return"translate("+t+",0)"}function ar(t){return"translate(0,"+t+")"}function or(t){return e=>+t(e)}function cr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ur(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===Gt||t===Xt?-1:1,w=t===Xt||t===le?"x":"y",P=t===Gt||t===xe?sr:ar;function _(Y){var X=r??(e.ticks?e.ticks.apply(e,n):e.domain()),B=i??(e.tickFormat?e.tickFormat.apply(e,n):ir),v=Math.max(s,0)+y,U=e.range(),R=+U[0]+F,E=+U[U.length-1]+F,z=(e.bandwidth?cr:or)(e.copy(),F),G=Y.selection?Y.selection():Y,T=G.selectAll(".domain").data([null]),k=G.selectAll(".tick").data(X,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===Gt?"0em":t===xe?"0.71em":"0.32em")),Y!==G&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",Pe).attr("transform",function(M){return isFinite(M=z(M))?P(M+F):this.getAttribute("transform")}),L.attr("opacity",Pe).attr("transform",function(M){var D=this.parentNode.__axis;return P((D&&isFinite(D=D(M))?D:z(M))+F)})),p.remove(),T.attr("d",t===Xt||t===le?a?"M"+S*a+","+R+"H"+F+"V"+E+"H"+S*a:"M"+F+","+R+"V"+E:a?"M"+R+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+R+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return P(z(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(B),G.filter(ur).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===le?"start":t===Xt?"end":"middle"),G.each(function(){this.__axis=z})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function lr(t){return fn(Gt,t)}function fr(t){return fn(xe,t)}const dr=Math.PI/180,hr=180/Math.PI,ne=18,dn=.96422,hn=1,mn=.82521,gn=4/29,Ft=6/29,yn=3*Ft*Ft,mr=Ft*Ft*Ft;function kn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return pn(t);t instanceof on||(t=On(t));var e=me(t.r),n=me(t.g),r=me(t.b),i=fe((.2225045*e+.7168786*n+.0606169*r)/hn),s,a;return e===n&&n===r?s=a=i:(s=fe((.4360747*e+.3850649*n+.1430804*r)/dn),a=fe((.0139322*e+.0971045*n+.7141733*r)/mn)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function gr(t,e,n,r){return arguments.length===1?kn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}cn(ft,gr,un(ln,{brighter(t){return new ft(this.l+ne*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ne*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=dn*de(e),t=hn*de(t),n=mn*de(n),new on(he(3.1338561*e-1.6168667*t-.4906146*n),he(-.9787684*e+1.9161415*t+.033454*n),he(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function fe(t){return t>mr?Math.pow(t,1/3):t/yn+gn}function de(t){return t>Ft?t*t*t:yn*(t-gn)}function he(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function me(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=kn(t)),t.a===0&&t.b===0)return new ht(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*hr;return new ht(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function be(t,e,n,r){return arguments.length===1?yr(t):new ht(t,e,n,r??1)}function ht(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function pn(t){if(isNaN(t.h))return new ft(t.l,0,0,t.opacity);var e=t.h*dr;return new ft(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}cn(ht,be,un(ln,{brighter(t){return new ht(this.h,this.c,this.l+ne*(t??1),this.opacity)},darker(t){return new ht(this.h,this.c,this.l-ne*(t??1),this.opacity)},rgb(){return pn(this).rgb()}}));function kr(t){return function(e,n){var r=t((e=be(e)).h,(n=be(n)).h),i=ue(e.c,n.c),s=ue(e.l,n.l),a=ue(e.opacity,n.opacity);return function(y){return e.h=r(y),e.c=i(y),e.l=s(y),e.opacity=a(y),e+""}}}const pr=kr(Hn);function vr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),t[n]=e.floor(i),t[r]=e.ceil(s),t}const ge=new Date,ye=new Date;function nt(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a<y-s?a:y},i.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s<a)||!(y>0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(S<s&&s<a);return F},i.filter=s=>nt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(ge.setTime(+s),ye.setTime(+a),t(ge),t(ye),Math.floor(n(ge,ye))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Se=yt*7,Ve=yt*30,ke=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const Tr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());Tr.range;const Pt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Pt.range;const xr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());xr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const _e=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);_e.range;const br=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));br.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Se)}const zt=Dt(0),Vt=Dt(1),vn=Dt(2),Tn=Dt(3),bt=Dt(4),xn=Dt(5),bn=Dt(6);zt.range;Vt.range;vn.range;Tn.range;bt.range;xn.range;bn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Se)}const wn=Mt(0),re=Mt(1),wr=Mt(2),Dr=Mt(3),It=Mt(4),Mr=Mt(5),Cr=Mt(6);wn.range;re.range;wr.range;Dr.range;It.range;Mr.range;Cr.range;const Rt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Rt.range;const Sr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Sr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function _r(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Se],[e,1,Ve],[e,3,3*Ve],[t,1,ke]];function y(S,w,P){const _=w<S;_&&([S,w]=[w,S]);const Y=P&&typeof P.range=="function"?P:F(S,w,P),X=Y?Y.range(S,+w+1):[];return _?X.reverse():X}function F(S,w,P){const _=Math.abs(w-S)/P,Y=Qn(([,,v])=>v).right(a,_);if(Y===a.length)return t.every(Ne(S/ke,w/ke,P));if(Y===0)return Et.every(Math.max(Ne(S,w,P),1));const[X,B]=a[_/a[Y-1][2]<a[Y][2]/_?Y-1:Y];return X.every(B)}return[y,F]}const[Yr,Fr]=_r(kt,Rt,zt,xt,Pt,Nt);function pe(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ve(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $t(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ur(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,a=t.shortDays,y=t.months,F=t.shortMonths,S=Ot(i),w=Ht(i),P=Ot(s),_=Ht(s),Y=Ot(a),X=Ht(a),B=Ot(y),v=Ht(y),U=Ot(F),R=Ht(F),E={a:m,A:I,b:o,B:W,c:null,d:Xe,e:Xe,f:ti,g:li,G:di,H:Qr,I:Jr,j:Kr,L:Dn,m:ei,M:ni,p:u,q:K,Q:Qe,s:Je,S:ri,u:ii,U:si,V:ai,w:oi,W:ci,x:null,X:null,y:ui,Y:fi,Z:hi,"%":je},z={a:l,A:$,b:O,B:j,c:null,d:Ge,e:Ge,f:ki,g:Si,G:Yi,H:mi,I:gi,j:yi,L:Cn,m:pi,M:vi,p:H,q:J,Q:Qe,s:Je,S:Ti,u:xi,U:bi,V:wi,w:Di,W:Mi,x:null,X:null,y:Ci,Y:_i,Z:Fi,"%":je},G={a:x,A:C,b:M,B:D,c,d:Be,e:Be,f:Zr,g:qe,G:ze,H:Ze,I:Ze,j:Rr,L:Br,m:Vr,M:zr,p:L,q:Pr,Q:Gr,s:jr,S:qr,u:Wr,U:$r,V:Or,w:Ar,W:Hr,x:g,X:b,y:qe,Y:ze,Z:Nr,"%":Xr};E.x=T(n,E),E.X=T(r,E),E.c=T(e,E),z.x=T(n,z),z.X=T(r,z),z.c=T(e,z);function T(h,N){return function(V){var f=[],tt=-1,A=0,Q=h.length,Z,st,at;for(V instanceof Date||(V=new Date(+V));++tt<Q;)h.charCodeAt(tt)===37&&(f.push(h.slice(A,tt)),(st=Re[Z=h.charAt(++tt)])!=null?Z=h.charAt(++tt):st=Z==="e"?" ":"0",(at=N[Z])&&(Z=at(V,st)),f.push(Z),A=tt+1);return f.push(h.slice(A,tt)),f.join("")}}function k(h,N){return function(V){var f=$t(1900,void 0,1),tt=p(f,h,V+="",0),A,Q;if(tt!=V.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(f.s*1e3+("L"in f?f.L:0));if(N&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+f.p*12),f.m===void 0&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(A=ve($t(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?re.ceil(A):re(A),A=_e.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=pe($t(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Vt.ceil(A):Vt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ve($t(f.y,0,1)).getUTCDay():pe($t(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ve(f)):pe(f)}}function p(h,N,V,f){for(var tt=0,A=N.length,Q=V.length,Z,st;tt<A;){if(f>=Q)return-1;if(Z=N.charCodeAt(tt++),Z===37){if(Z=N.charAt(tt++),st=G[Z in Re?N.charAt(tt++):Z],!st||(f=st(h,V,f))<0)return-1}else if(Z!=V.charCodeAt(f++))return-1}return f}function L(h,N,V){var f=S.exec(N.slice(V));return f?(h.p=w.get(f[0].toLowerCase()),V+f[0].length):-1}function x(h,N,V){var f=Y.exec(N.slice(V));return f?(h.w=X.get(f[0].toLowerCase()),V+f[0].length):-1}function C(h,N,V){var f=P.exec(N.slice(V));return f?(h.w=_.get(f[0].toLowerCase()),V+f[0].length):-1}function M(h,N,V){var f=U.exec(N.slice(V));return f?(h.m=R.get(f[0].toLowerCase()),V+f[0].length):-1}function D(h,N,V){var f=B.exec(N.slice(V));return f?(h.m=v.get(f[0].toLowerCase()),V+f[0].length):-1}function c(h,N,V){return p(h,e,N,V)}function g(h,N,V){return p(h,n,N,V)}function b(h,N,V){return p(h,r,N,V)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function $(h){return s[h.getUTCDay()]}function O(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",z);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Re={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Er=/^%/,Ir=/[\\^$*+?|[\]().{}]/g;function q(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function Lr(t){return t.replace(Ir,"\\$&")}function Ot(t){return new RegExp("^(?:"+t.map(Lr).join("|")+")","i")}function Ht(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function qe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Be(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Br(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xr(t,e,n){var r=Er.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Xe(t,e){return q(t.getDate(),e,2)}function Qr(t,e){return q(t.getHours(),e,2)}function Jr(t,e){return q(t.getHours()%12||12,e,2)}function Kr(t,e){return q(1+xt.count(kt(t),t),e,3)}function Dn(t,e){return q(t.getMilliseconds(),e,3)}function ti(t,e){return Dn(t,e)+"000"}function ei(t,e){return q(t.getMonth()+1,e,2)}function ni(t,e){return q(t.getMinutes(),e,2)}function ri(t,e){return q(t.getSeconds(),e,2)}function ii(t){var e=t.getDay();return e===0?7:e}function si(t,e){return q(zt.count(kt(t)-1,t),e,2)}function Mn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ai(t,e){return t=Mn(t),q(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function oi(t){return t.getDay()}function ci(t,e){return q(Vt.count(kt(t)-1,t),e,2)}function ui(t,e){return q(t.getFullYear()%100,e,2)}function li(t,e){return t=Mn(t),q(t.getFullYear()%100,e,2)}function fi(t,e){return q(t.getFullYear()%1e4,e,4)}function di(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),q(t.getFullYear()%1e4,e,4)}function hi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+q(e/60|0,"0",2)+q(e%60,"0",2)}function Ge(t,e){return q(t.getUTCDate(),e,2)}function mi(t,e){return q(t.getUTCHours(),e,2)}function gi(t,e){return q(t.getUTCHours()%12||12,e,2)}function yi(t,e){return q(1+_e.count(wt(t),t),e,3)}function Cn(t,e){return q(t.getUTCMilliseconds(),e,3)}function ki(t,e){return Cn(t,e)+"000"}function pi(t,e){return q(t.getUTCMonth()+1,e,2)}function vi(t,e){return q(t.getUTCMinutes(),e,2)}function Ti(t,e){return q(t.getUTCSeconds(),e,2)}function xi(t){var e=t.getUTCDay();return e===0?7:e}function bi(t,e){return q(wn.count(wt(t)-1,t),e,2)}function Sn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function wi(t,e){return t=Sn(t),q(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function Di(t){return t.getUTCDay()}function Mi(t,e){return q(re.count(wt(t)-1,t),e,2)}function Ci(t,e){return q(t.getUTCFullYear()%100,e,2)}function Si(t,e){return t=Sn(t),q(t.getUTCFullYear()%100,e,2)}function _i(t,e){return q(t.getUTCFullYear()%1e4,e,4)}function Yi(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),q(t.getUTCFullYear()%1e4,e,4)}function Fi(){return"+0000"}function je(){return"%"}function Qe(t){return+t}function Je(t){return Math.floor(+t/1e3)}var St,ie;Ui({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ui(t){return St=Ur(t),ie=St.format,St.parse,St.utcFormat,St.utcParse,St}function Ei(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function _n(t,e,n,r,i,s,a,y,F,S){var w=Jn(),P=w.invert,_=w.domain,Y=S(".%L"),X=S(":%S"),B=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),R=S("%b %d"),E=S("%B"),z=S("%Y");function G(T){return(F(T)<T?Y:y(T)<T?X:a(T)<T?B:s(T)<T?v:r(T)<T?i(T)<T?U:R:n(T)<T?E:z)(T)}return w.invert=function(T){return new Date(P(T))},w.domain=function(T){return arguments.length?_(Array.from(T,Ii)):_().map(Ei)},w.ticks=function(T){var k=_();return t(k[0],k[k.length-1],T??10)},w.tickFormat=function(T,k){return k==null?G:S(k)},w.nice=function(T){var k=_();return(!T||typeof T.range!="function")&&(T=e(k[0],k[k.length-1],T??10)),T?_(vr(k,T)):w},w.copy=function(){return Kn(w,_n(t,e,n,r,i,s,a,y,F,S))},w}function Li(){return er.apply(_n(Yr,Fr,kt,Rt,zt,xt,Pt,Nt,vt,ie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var jt={exports:{}},Ai=jt.exports,Ke;function Wi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})(Ai,(function(){var n="day";return function(r,i,s){var a=function(S){return S.add(4-S.isoWeekday(),n)},y=i.prototype;y.isoWeekYear=function(){return a(this).year()},y.isoWeek=function(S){if(!this.$utils().u(S))return this.add(7*(S-this.isoWeek()),n);var w,P,_,Y,X=a(this),B=(w=this.isoWeekYear(),P=this.$u,_=(P?s.utc:s)().year(w).startOf("year"),Y=4-_.isoWeekday(),_.isoWeekday()>4&&(Y+=7),_.add(Y,n));return X.diff(B,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var P=this.$utils(),_=!!P.u(w)||w;return P.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}}))})(jt)),jt.exports}var $i=Wi();const Oi=oe($i);var Qt={exports:{}},Hi=Qt.exports,tn;function Ni(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Hi,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(U){if(!U||U==="Z")return 0;var R=U.match(/([+-]|\d\d)/g),E=60*R[1]+(+R[2]||0);return E===0?0:R[0]==="+"?-E:E})(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var R,E=F.meridiem;if(E){for(var z=1;z<=24;z+=1)if(v.indexOf(E(z,0,U))>-1){R=z>12;break}}else R=v===(U?"pm":"PM");return R},X={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,R=v.match(/\d+/);if(this.day=R[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),R=(_("monthsShort")||U.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function B(v){var U,R;U=v,R=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,C,M){var D=M&&M.toUpperCase();return C||R[M]||n[M]||R[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(c,g,b){return g||b.slice(1)}))}))).match(r),z=E.length,G=0;G<z;G+=1){var T=E[G],k=X[T],p=k&&k[0],L=k&&k[1];E[G]=L?{regex:p,parser:L}:T.replace(/^\[|\]$/g,"")}return function(x){for(var C={},M=0,D=0;M<z;M+=1){var c=E[M];if(typeof c=="string")D+=c.length;else{var g=c.regex,b=c.parser,m=x.slice(D),I=g.exec(m)[0];b.call(C,I),x=x.replace(I,"")}}return(function(o){var W=o.afternoon;if(W!==void 0){var u=o.hours;W?u<12&&(o.hours+=12):u===12&&(o.hours=0),delete o.afternoon}})(C),C}}return function(v,U,R){R.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(S=v.parseTwoDigitYear);var E=U.prototype,z=E.parse;E.parse=function(G){var T=G.date,k=G.utc,p=G.args;this.$u=k;var L=p[1];if(typeof L=="string"){var x=p[2]===!0,C=p[3]===!0,M=x||C,D=p[2];C&&(D=p[2]),F=this.$locale(),!x&&D&&(F=R.Ls[D]),this.$d=(function(m,I,o,W){try{if(["x","X"].indexOf(I)>-1)return new Date((I==="X"?1e3:1)*m);var u=B(I)(m),K=u.year,l=u.month,$=u.day,O=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,V=new Date,f=$||(K||l?1:V.getDate()),tt=K||V.getFullYear(),A=0;K&&!l||(A=l>0?l-1:V.getMonth());var Q,Z=O||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,Z,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,Z,st,at,pt)):(Q=new Date(tt,A,f,Z,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}})(T,L,k,R),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=R.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else z.call(this,G)}}}))})(Qt)),Qt.exports}var Pi=Ni();const Vi=oe(Pi);var Jt={exports:{}},Ri=Jt.exports,en;function zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(Ri,(function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(P){switch(P){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),P==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),P==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return P}}));return s.bind(this)(w)}}}))})(Jt)),Jt.exports}var qi=zi();const Bi=oe(qi);var Kt={exports:{}},Zi=Kt.exports,nn;function Xi(){return nn||(nn=1,(function(t,e){(function(n,r){t.exports=r()})(Zi,(function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof z},X=function(T,k,p){return new z(T,p,k.$l)},B=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},R=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+R(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},z=(function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return X(p*_[B(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach((function(c){C.$d[B(c)]=p[c]})),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map((function(c){return c!=null?Number(c):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce((function(L,x){return L+(p.$d[x]||0)*_[x]}),0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(P,(function(C,M){return M||String(x[C])}))},k.as=function(p){return this.$ms/_[B(p)]},k.get=function(p){var L=this.$ms,x=B(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[B(L)]:Y(p)?p.$ms:X(p,this).$ms,X(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return X(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T})(),G=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return X(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?G(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?G(this,C,-1):x.bind(this)(C,M)}}}))})(Kt)),Kt.exports}var Gi=Xi();const ji=oe(Gi);var we=(function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],P=[1,9],_=[1,10],Y=[1,11],X=[1,12],B=[1,13],v=[1,14],U=[1,15],R=[1,16],E=[1,19],z=[1,20],G=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:P,23:_,24:Y,25:X,26:B,27:v,28:U,29:R,30:E,31:z,33:G,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,$=2,O=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var V=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||O,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,Z,st,at={},pt,ut,He,Bt;;){if(Q=b[b.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),Z=W[Q]&&W[Q][A]),typeof Z>"u"||!Z.length||!Z[0]){var ce="";Bt=[];for(pt in W[Q])this.terminals_[pt]&&pt>$&&Bt.push("'"+this.terminals_[pt]+"'");H.showPosition?ce="Parse error on line "+(K+1)+`: `+H.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ce="Parse error on line "+(K+1)+": Unexpected "+(A==O?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ce,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Bt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(Z[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(Z[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[Z[1]][1],at.$=I[I.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,Z[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[Z[1]][0]),I.push(at.$),o.push(at._$),He=W[b[b.length-2]][b[b.length-1]],b.push(He);break;case 3:return!0}}return!0},"parse")},C=(function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||this.yy||{},this._input=c,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(c){this.unput(this.match.slice(c))},"less"),pastInput:d(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BH8WCC4D.js b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-DT7ncN8L.js similarity index 99% rename from apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BH8WCC4D.js rename to apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-DT7ncN8L.js index 779ec7618..c7e944d05 100644 --- a/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-BH8WCC4D.js +++ b/apps/kimi-code/dist-web/assets/gitGraphDiagram-IHSO6WYX-DT7ncN8L.js @@ -1,4 +1,4 @@ -import{I as le}from"./chunk-2Q5K7J3B-CqtdGPMZ.js";import{p as he}from"./chunk-JWPE2WC7-BtckK32c.js";import{p as $e,o as fe,s as ge,g as ue,a as ye,b as xe,_ as h,z as J,l as w,d as me,c as W,y as pe,A as be,q as we,k as B,B as ke,D as ve,E as Ce}from"./mermaid.core-DpBz6UHc.js";import{p as Ee}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` +import{I as le}from"./chunk-2Q5K7J3B-vvrZ7MG7.js";import{p as he}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{p as $e,o as fe,s as ge,g as ue,a as ye,b as xe,_ as h,z as J,l as w,d as me,c as W,y as pe,A as be,q as we,k as B,B as ke,D as ve,E as Ce}from"./mermaid.core-BKBZnrB_.js";import{p as Ee}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new le(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",` ${s-i/2-L/2},${x+R} ${s-i/2-L/2},${x-R} ${t.posWithOffset-i/2-L},${x-c-R} diff --git a/apps/kimi-code/dist-web/assets/index-DcbRorFd.js b/apps/kimi-code/dist-web/assets/index-C6iX4-LJ.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index-DcbRorFd.js rename to apps/kimi-code/dist-web/assets/index-C6iX4-LJ.js index 4190eba86..33a934d18 100644 --- a/apps/kimi-code/dist-web/assets/index-DcbRorFd.js +++ b/apps/kimi-code/dist-web/assets/index-C6iX4-LJ.js @@ -1,5 +1,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]); -import{bR as c}from"./index-_5lXYMaO.js";var Ft=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,to=Object.getOwnPropertyNames,no=Object.prototype.hasOwnProperty,an=(e,t)=>{let n={};for(var r in e)Ft(n,r,{get:e[r],enumerable:!0});return Ft(n,Symbol.toStringTag,{value:"Module"}),n},ro=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=to(t),o=0,s=i.length,a;o<s;o++)a=i[o],!no.call(e,a)&&a!==n&&Ft(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=eo(t,a))||r.enumerable});return e},Sr=(e,t,n)=>(ro(e,t,"default"),n);const Ne=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>c(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>c(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>c(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>c(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>c(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>c(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>c(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],at=Object.fromEntries(Ne.map(e=>[e.id,e.import])),lt=Object.fromEntries(Ne.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ut={...at,...lt},ct=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],dt=Object.fromEntries(ct.map(e=>[e.id,e.import]));var ln=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function io(){return 2147483648}function oo(){return typeof performance<"u"?performance.now():Date.now()}const so=(e,t)=>e+(t-e%t)%t;async function ao(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=io();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const y=Math.min(E,so(Math.max(h,g),65536));if(s(y))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let y="";for(;m<g;){let w=h[m++];if(!(w&128)){y+=String.fromCharCode(w);continue}const A=h[m++]&63;if((w&224)===192){y+=String.fromCharCode((w&31)<<6|A);continue}const k=h[m++]&63;if((w&240)===224?w=(w&15)<<12|A<<6|k:w=(w&7)<<18|A<<12|k<<6|h[m++]&63,w<65536)y+=String.fromCharCode(w);else{const I=w-65536;y+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return y}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:oo,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var lo=Object.defineProperty,uo=(e,t,n)=>t in e?lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>uo(e,typeof t!="symbol"?t+"":t,n);let D=null;function co(e){throw new ln(e.UTF8ToString(e.getLastOnigError()))}class pt{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=pt._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u<n;u++){const p=t.charCodeAt(u);let d=p,f=!1;if(p>=55296&&p<=56319&&u+1<n){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const o=t.charCodeAt(r);let s=o,a=!1;if(o>=55296&&o<=56319&&r+1<i){const l=t.charCodeAt(r+1);l>=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const ht=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new ln("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new pt(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(ht,"LAST_ID",0);P(ht,"_sharedPtr",0);P(ht,"_sharedPtrInUse",!1);let Lr=ht;class po{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new ln("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a<l;a++){const u=new pt(t[a]);n[a]=u.createString(D),r[a]=u.utf8Length}const i=D.omalloc(4*t.length);D.HEAPU32.set(n,i/4);const o=D.omalloc(4*t.length);D.HEAPU32.set(r,o/4);const s=D.createOnigScanner(i,o,t.length);for(let a=0,l=t.length;a<l;a++)D.ofree(n[a]);D.ofree(o),D.ofree(i),s===0&&co(D),this._onigBinding=D,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new Lr(t);const o=this._findNextMatchSync(t,n,!1,i);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(s===0)return null;const a=o.HEAPU32;let l=s/4;const u=a[l++],p=a[l++],d=[];for(let f=0;f<p;f++){const h=t.convertUtf8OffsetToUtf16(a[l++]),m=t.convertUtf8OffsetToUtf16(a[l++]);d[f]={start:h,end:m,length:m-h}}return{index:u,captureIndices:d}}}function ho(e){return typeof e.instantiator=="function"}function fo(e){return typeof e.default=="function"}function mo(e){return typeof e.data<"u"}function go(e){return typeof Response<"u"&&e instanceof Response}function _o(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Fe;function ft(e){if(Fe)return Fe;async function t(){D=await ao(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),ho(r)?r=await r.instantiator(n):fo(r)?r=await r.default(n):(mo(r)&&(r=r.data),go(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await yo(r)(n):r=await Eo(r)(n):_o(r)?r=await Lt(r)(n):r instanceof WebAssembly.Module?r=await Lt(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Lt(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Fe=t(),Fe}function Lt(e){return t=>WebAssembly.instantiate(e,t)}function yo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Eo(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Rr;function bo(e){Rr=e}function wo(){return Rr}async function un(e){return e&&await ft(e),{createScanner(t){return new po(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Lr(t)}}}const vo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:un,getDefaultWasmLoader:wo,loadWasm:ft,setDefaultWasmLoader:bo},Symbol.toStringTag,{value:"Module"}));var Ir=an({});Sr(Ir,vo);var L=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Co(e){return cn(e)}function cn(e){return Array.isArray(e)?Ao(e):e instanceof RegExp?e:typeof e=="object"?ko(e):e}function Ao(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=cn(e[n]);return t}function ko(e){let t={};for(let n in e)t[n]=cn(e[n]);return t}function Tr(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Pr(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Pr(e.substring(0,e.length-1)):e.substr(~t+1)}var Rt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,je=class{static hasCaptures(e){return e===null?!1:(Rt.lastIndex=0,Rt.test(e))}static replaceCaptures(e,t,n){return e.replace(Rt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function Or(e,t){return e<t?-1:e>t?1:0}function xr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let o=Or(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function $n(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Dr(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Nr=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Ye=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ro(e),t)}static createFromParsedTheme(e,t){return To(e,t)}_cachedMatchRoot=new Nr(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>So(e.parent,i.parentScopes));return r?new Vr(r.fontStyle,r.foreground,r.background):null}},It=class Ke{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Ke(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Ke(n,t[r]);return n}push(t){return new Ke(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function So(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Lo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Lo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Vr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ro(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let s=t[i];if(!s.settings)continue;let a;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(s.scope)?a=s.scope:a=[""];let l=-1;if(typeof s.settings.fontStyle=="string"){l=0;let d=s.settings.fontStyle.split(" ");for(let f=0,h=d.length;f<h;f++)switch(d[f]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof s.settings.foreground=="string"&&$n(s.settings.foreground)&&(u=s.settings.foreground);let p=null;typeof s.settings.background=="string"&&$n(s.settings.background)&&(p=s.settings.background);for(let d=0,f=a.length;d<f;d++){let m=a[d].trim().split(" "),E=m[m.length-1],b=null;m.length>1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new Io(E,b,i,l,u,p)}}return n}var Io=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function To(e,t){e.sort((l,u)=>{let p=Or(l.scope,u.scope);return p!==0||(p=xr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Po(t),s=new Vr(n,o.getId(r),o.getId(i)),a=new xo(new jt(0,null,-1,0,0),[]);for(let l=0,u=e.length;l<u;l++){let p=e[l];a.insert(0,p.scope,p.parentScopes,p.fontStyle,o.getId(p.foreground),o.getId(p.background))}return new Ye(o,s,a)}var Po=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Oo=Object.freeze([]),jt=class $r{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,o){this.scopeDepth=t,this.parentScopes=n||Oo,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new $r(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},xo=class Ht{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ht._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Ht(this._mainRule.clone(),jt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s<a;s++){let l=this._rulesWithParentScopes[s];if(xr(l.parentScopes,n)===0){l.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new jt(t,n,r,i,o))}},le=class U{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=U.getLanguageId(t),r=U.getTokenType(t),i=U.getFontStyle(t),o=U.getForeground(t),s=U.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ze(e,t){const n=[],r=Do(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(Mn(i)){const l=[];do l.push(i),i=r.next();while(Mn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function Mn(e){return!!e&&!!e.match(/[\w\.:]+/)}function Do(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Mr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Vo=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},$o=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Vo;for(const n of e)Mo(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Mo(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Qe({baseGrammar:o,selfGrammar:i},r):Wt(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function Wt(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];et([r],t,n)}}function Qe(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&et(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&et(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function et(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Tr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&et(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Gr(o);switch(s.kind){case 0:Qe({...t,selfGrammar:t.baseGrammar},n);break;case 1:Qe(t,n);break;case 2:Wt(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?Wt(s.ruleName,l,n):Qe(l,n)}else s.kind===4?n.add(new No(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Go=class{kind=0},Bo=class{kind=1},Uo=class{constructor(e){this.ruleName=e}kind=2},Fo=class{constructor(e){this.scopeName=e}kind=3},jo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Gr(e){if(e==="$base")return new Go;if(e==="$self")return new Bo;const t=e.indexOf("#");if(t===-1)return new Fo(e);if(t===0)return new Uo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new jo(n,r)}}var Ho=/\\(\d+)/,Gn=/\\(\d+)/g,Wo=-1,Br=-2;var Ve=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=je.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=je.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Pr(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:je.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:je.replaceCaptures(this._contentName,e,t)}},zo=class extends Ve{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},qo=class extends Ve{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Bn=class extends Ve{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zt=class extends Ve{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},tt=class extends Ve{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Br),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Ur=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new zo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new qo(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Tr({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Bn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new tt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new zt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;o<s;o++){const a=t[o];let l=-1;if(a.include){const u=Gr(a.include);switch(u.kind){case 0:case 1:l=V.getCompiledRuleId(r[a.include],n,r);break;case 2:let p=r[u.ruleName];p&&(l=V.getCompiledRuleId(p,n,r));break;case 3:case 4:const d=u.scopeName,f=u.kind===4?u.ruleName:null,h=n.getExternalGrammar(d,r);if(h)if(f){let m=h.repository[f];m&&(l=V.getCompiledRuleId(m,n,h.repository))}else l=V.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else l=V.getCompiledRuleId(a,n,r);if(l!==-1){const u=n.getRule(l);let p=!1;if((u instanceof Bn||u instanceof zt||u instanceof tt)&&u.hasMissingPatterns&&u.patterns.length===0&&(p=!0),p)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Le=class Fr{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],s=!1;for(let a=0;a<r;a++)if(t.charAt(a)==="\\"&&a+1<r){const u=t.charAt(a+1);u==="z"?(o.push(t.substring(i,a)),o.push("$(?!\\n)(?<!\\n)"),i=a+2):(u==="A"||u==="G")&&(s=!0),a++}this.hasAnchor=s,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Ho.test(this.source):this.hasBackReferences=!1}clone(){return new Fr(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return Gn.lastIndex=0,this.source.replace(Gn,(i,o)=>Dr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;o<s;o++)a=this.source.charAt(o),t[o]=a,n[o]=a,r[o]=a,i[o]=a,a==="\\"&&o+1<s&&(l=this.source.charAt(o+1),l==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",i[o+1]="A"):l==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",i[o+1]="G"):(t[o+1]=l,n[o+1]=l,r[o+1]=l,i[o+1]=l),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Un(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new Un(e,r,this._items.map(i=>i.ruleId))}},Un=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(` +import{bR as c}from"./index-yKYHPeXU.js";var Ft=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,to=Object.getOwnPropertyNames,no=Object.prototype.hasOwnProperty,an=(e,t)=>{let n={};for(var r in e)Ft(n,r,{get:e[r],enumerable:!0});return Ft(n,Symbol.toStringTag,{value:"Module"}),n},ro=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=to(t),o=0,s=i.length,a;o<s;o++)a=i[o],!no.call(e,a)&&a!==n&&Ft(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=eo(t,a))||r.enumerable});return e},Sr=(e,t,n)=>(ro(e,t,"default"),n);const Ne=[{id:"abap",name:"ABAP",import:(()=>c(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>c(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>c(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>c(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>c(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>c(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>c(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>c(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>c(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>c(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>c(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>c(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>c(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>c(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>c(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>c(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>c(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>c(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>c(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>c(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>c(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>c(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>c(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>c(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>c(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>c(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>c(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>c(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>c(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>c(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>c(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>c(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>c(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>c(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>c(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>c(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>c(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>c(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>c(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>c(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>c(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>c(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>c(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>c(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>c(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>c(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>c(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>c(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>c(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>c(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>c(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>c(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>c(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>c(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>c(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>c(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>c(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>c(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>c(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>c(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>c(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>c(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>c(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>c(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>c(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>c(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>c(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>c(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>c(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>c(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>c(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>c(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>c(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>c(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>c(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>c(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>c(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>c(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>c(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>c(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>c(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>c(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>c(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>c(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>c(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>c(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>c(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>c(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>c(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>c(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>c(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>c(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>c(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>c(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>c(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>c(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>c(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>c(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>c(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>c(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>c(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>c(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>c(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>c(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>c(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>c(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>c(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>c(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>c(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>c(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>c(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>c(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>c(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>c(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>c(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>c(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>c(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>c(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>c(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>c(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>c(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>c(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>c(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>c(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>c(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>c(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>c(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>c(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>c(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>c(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>c(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>c(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>c(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>c(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>c(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>c(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>c(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>c(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>c(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>c(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>c(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>c(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>c(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>c(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>c(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>c(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>c(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>c(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>c(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>c(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>c(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>c(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>c(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>c(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>c(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>c(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>c(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>c(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>c(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>c(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>c(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>c(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>c(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>c(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>c(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>c(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>c(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>c(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>c(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>c(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>c(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>c(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>c(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>c(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>c(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>c(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>c(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>c(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>c(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>c(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>c(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>c(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>c(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>c(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>c(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>c(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>c(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>c(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>c(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>c(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>c(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>c(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>c(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>c(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>c(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>c(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>c(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>c(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>c(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>c(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>c(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>c(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>c(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>c(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>c(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>c(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>c(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>c(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>c(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>c(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>c(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>c(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>c(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>c(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>c(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>c(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>c(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>c(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>c(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>c(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>c(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>c(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>c(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>c(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>c(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>c(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>c(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>c(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>c(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>c(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>c(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>c(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>c(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>c(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>c(()=>import("./zig-VOosw3JB.js"),[]))}],at=Object.fromEntries(Ne.map(e=>[e.id,e.import])),lt=Object.fromEntries(Ne.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ut={...at,...lt},ct=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>c(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>c(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>c(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>c(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>c(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>c(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>c(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>c(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>c(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>c(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>c(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>c(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>c(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>c(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>c(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>c(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>c(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>c(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>c(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>c(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>c(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>c(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>c(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>c(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>c(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>c(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>c(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>c(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>c(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>c(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>c(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>c(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>c(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>c(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>c(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>c(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>c(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>c(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>c(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>c(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>c(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>c(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>c(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>c(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>c(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>c(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>c(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>c(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>c(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>c(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>c(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>c(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>c(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>c(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>c(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>c(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>c(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>c(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>c(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>c(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>c(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>c(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>c(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],dt=Object.fromEntries(ct.map(e=>[e.id,e.import]));var ln=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function io(){return 2147483648}function oo(){return typeof performance<"u"?performance.now():Date.now()}const so=(e,t)=>e+(t-e%t)%t;async function ao(e){let t,n;const r={};function i(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function o(h,m,E){r.HEAPU8.copyWithin(h,m,m+E)}function s(h){try{return t.grow(h-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(h){const m=r.HEAPU8.length;h=h>>>0;const E=io();if(h>E)return!1;for(let b=1;b<=4;b*=2){let g=m*(1+.2/b);g=Math.min(g,h+100663296);const y=Math.min(E,so(Math.max(h,g),65536));if(s(y))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,E=1024){const b=m+E;let g=m;for(;h[g]&&!(g>=b);)++g;if(g-m>16&&h.buffer&&l)return l.decode(h.subarray(m,g));let y="";for(;m<g;){let w=h[m++];if(!(w&128)){y+=String.fromCharCode(w);continue}const A=h[m++]&63;if((w&224)===192){y+=String.fromCharCode((w&31)<<6|A);continue}const k=h[m++]&63;if((w&240)===224?w=(w&15)<<12|A<<6|k:w=(w&7)<<18|A<<12|k<<6|h[m++]&63,w<65536)y+=String.fromCharCode(w);else{const I=w-65536;y+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return y}function p(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:oo,emscripten_memcpy_big:o,emscripten_resize_heap:a,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=p}return await f(),r}var lo=Object.defineProperty,uo=(e,t,n)=>t in e?lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>uo(e,typeof t!="symbol"?t+"":t,n);let D=null;function co(e){throw new ln(e.UTF8ToString(e.getLastOnigError()))}class pt{constructor(t){P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16Value"),P(this,"utf8Value"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16");const n=t.length,r=pt._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const s=i?new Uint32Array(r+1):null;i&&(s[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u<n;u++){const p=t.charCodeAt(u);let d=p,f=!1;if(p>=55296&&p<=56319&&u+1<n){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(d=(p-55296<<10)+65536|h-56320,f=!0)}i&&(o[u]=l,f&&(o[u+1]=l),d<=127?s[l+0]=u:d<=2047?(s[l+0]=u,s[l+1]=u):d<=65535?(s[l+0]=u,s[l+1]=u,s[l+2]=u):(s[l+0]=u,s[l+1]=u,s[l+2]=u,s[l+3]=u)),d<=127?a[l++]=d:d<=2047?(a[l++]=192|(d&1984)>>>6,a[l++]=128|(d&63)>>>0):d<=65535?(a[l++]=224|(d&61440)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0):(a[l++]=240|(d&1835008)>>>18,a[l++]=128|(d&258048)>>>12,a[l++]=128|(d&4032)>>>6,a[l++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=a,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const o=t.charCodeAt(r);let s=o,a=!1;if(o>=55296&&o<=56319&&r+1<i){const l=t.charCodeAt(r+1);l>=56320&&l<=57343&&(s=(o-55296<<10)+65536|l-56320,a=!0)}s<=127?n+=1:s<=2047?n+=2:s<=65535?n+=3:n+=4,a&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const ht=class X{constructor(t){if(P(this,"id",++X.LAST_ID),P(this,"_onigBinding"),P(this,"content"),P(this,"utf16Length"),P(this,"utf8Length"),P(this,"utf16OffsetToUtf8"),P(this,"utf8OffsetToUtf16"),P(this,"ptr"),!D)throw new ln("Must invoke loadWasm first.");this._onigBinding=D,this.content=t;const n=new pt(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!X._sharedPtrInUse?(X._sharedPtr||(X._sharedPtr=D.omalloc(1e4)),X._sharedPtrInUse=!0,D.HEAPU8.set(n.utf8Value,X._sharedPtr),this.ptr=X._sharedPtr):this.ptr=n.createString(D)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===X._sharedPtr?X._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};P(ht,"LAST_ID",0);P(ht,"_sharedPtr",0);P(ht,"_sharedPtrInUse",!1);let Lr=ht;class po{constructor(t){if(P(this,"_onigBinding"),P(this,"_ptr"),!D)throw new ln("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=t.length;a<l;a++){const u=new pt(t[a]);n[a]=u.createString(D),r[a]=u.utf8Length}const i=D.omalloc(4*t.length);D.HEAPU32.set(n,i/4);const o=D.omalloc(4*t.length);D.HEAPU32.set(r,o/4);const s=D.createOnigScanner(i,o,t.length);for(let a=0,l=t.length;a<l;a++)D.ofree(n[a]);D.ofree(o),D.ofree(i),s===0&&co(D),this._onigBinding=D,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new Lr(t);const o=this._findNextMatchSync(t,n,!1,i);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(s===0)return null;const a=o.HEAPU32;let l=s/4;const u=a[l++],p=a[l++],d=[];for(let f=0;f<p;f++){const h=t.convertUtf8OffsetToUtf16(a[l++]),m=t.convertUtf8OffsetToUtf16(a[l++]);d[f]={start:h,end:m,length:m-h}}return{index:u,captureIndices:d}}}function ho(e){return typeof e.instantiator=="function"}function fo(e){return typeof e.default=="function"}function mo(e){return typeof e.data<"u"}function go(e){return typeof Response<"u"&&e instanceof Response}function _o(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Fe;function ft(e){if(Fe)return Fe;async function t(){D=await ao(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),ho(r)?r=await r.instantiator(n):fo(r)?r=await r.default(n):(mo(r)&&(r=r.data),go(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await yo(r)(n):r=await Eo(r)(n):_o(r)?r=await Lt(r)(n):r instanceof WebAssembly.Module?r=await Lt(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Lt(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Fe=t(),Fe}function Lt(e){return t=>WebAssembly.instantiate(e,t)}function yo(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Eo(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let Rr;function bo(e){Rr=e}function wo(){return Rr}async function un(e){return e&&await ft(e),{createScanner(t){return new po(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Lr(t)}}}const vo=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:un,getDefaultWasmLoader:wo,loadWasm:ft,setDefaultWasmLoader:bo},Symbol.toStringTag,{value:"Module"}));var Ir=an({});Sr(Ir,vo);var L=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Co(e){return cn(e)}function cn(e){return Array.isArray(e)?Ao(e):e instanceof RegExp?e:typeof e=="object"?ko(e):e}function Ao(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=cn(e[n]);return t}function ko(e){let t={};for(let n in e)t[n]=cn(e[n]);return t}function Tr(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function Pr(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Pr(e.substring(0,e.length-1)):e.substr(~t+1)}var Rt=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,je=class{static hasCaptures(e){return e===null?!1:(Rt.lastIndex=0,Rt.test(e))}static replaceCaptures(e,t,n){return e.replace(Rt,(r,i,o,s)=>{let a=n[parseInt(i||o,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function Or(e,t){return e<t?-1:e>t?1:0}function xr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let o=Or(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function $n(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Dr(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Nr=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Ye=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ro(e),t)}static createFromParsedTheme(e,t){return To(e,t)}_cachedMatchRoot=new Nr(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>So(e.parent,i.parentScopes));return r?new Vr(r.fontStyle,r.foreground,r.background):null}},It=class Ke{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Ke(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Ke(n,t[r]);return n}push(t){return new Ke(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function So(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Lo(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Lo(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Vr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ro(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let s=t[i];if(!s.settings)continue;let a;if(typeof s.scope=="string"){let d=s.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(s.scope)?a=s.scope:a=[""];let l=-1;if(typeof s.settings.fontStyle=="string"){l=0;let d=s.settings.fontStyle.split(" ");for(let f=0,h=d.length;f<h;f++)switch(d[f]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof s.settings.foreground=="string"&&$n(s.settings.foreground)&&(u=s.settings.foreground);let p=null;typeof s.settings.background=="string"&&$n(s.settings.background)&&(p=s.settings.background);for(let d=0,f=a.length;d<f;d++){let m=a[d].trim().split(" "),E=m[m.length-1],b=null;m.length>1&&(b=m.slice(0,m.length-1),b.reverse()),n[r++]=new Io(E,b,i,l,u,p)}}return n}var Io=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},$=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))($||{});function To(e,t){e.sort((l,u)=>{let p=Or(l.scope,u.scope);return p!==0||(p=xr(l.parentScopes,u.parentScopes),p!==0)?p:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let o=new Po(t),s=new Vr(n,o.getId(r),o.getId(i)),a=new xo(new jt(0,null,-1,0,0),[]);for(let l=0,u=e.length;l<u;l++){let p=e[l];a.insert(0,p.scope,p.parentScopes,p.fontStyle,o.getId(p.foreground),o.getId(p.background))}return new Ye(o,s,a)}var Po=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Oo=Object.freeze([]),jt=class $r{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,o){this.scopeDepth=t,this.parentScopes=n||Oo,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new $r(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},xo=class Ht{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ht._cmpBySpecificity),n}insert(t,n,r,i,o,s){if(n===""){this._doInsertHere(t,r,i,o,s);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let p;this._children.hasOwnProperty(l)?p=this._children[l]:(p=new Ht(this._mainRule.clone(),jt.cloneArr(this._rulesWithParentScopes)),this._children[l]=p),p.insert(t+1,u,r,i,o,s)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let s=0,a=this._rulesWithParentScopes.length;s<a;s++){let l=this._rulesWithParentScopes[s];if(xr(l.parentScopes,n)===0){l.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new jt(t,n,r,i,o))}},le=class U{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=U.getLanguageId(t),r=U.getTokenType(t),i=U.getFontStyle(t),o=U.getForeground(t),s=U.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:s})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,s,a){let l=U.getLanguageId(t),u=U.getTokenType(t),p=U.containsBalancedBrackets(t)?1:0,d=U.getFontStyle(t),f=U.getForeground(t),h=U.getBackground(t);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(p=i?1:0),o!==-1&&(d=o),s!==0&&(f=s),a!==0&&(h=a),(l<<0|u<<8|p<<10|d<<11|f<<15|h<<24)>>>0}};function Ze(e,t){const n=[],r=Do(e);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=s();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const l=o();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(Mn(i)){const l=[];do l.push(i),i=r.next();while(Mn(i));return u=>t(l,u)}return null}function s(){const l=[];let u=o();for(;u;)l.push(u),u=o();return p=>l.every(d=>d(p))}function a(){const l=[];let u=s();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=s()}return p=>l.some(d=>d(p))}}function Mn(e){return!!e&&!!e.match(/[\w\.:]+/)}function Do(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function Mr(e){typeof e.dispose=="function"&&e.dispose()}var Se=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},No=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Vo=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},$o=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Se(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Vo;for(const n of e)Mo(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Se){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Mo(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Se?Qe({baseGrammar:o,selfGrammar:i},r):Wt(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=n.injections(e.scopeName);if(s)for(const a of s)r.add(new Se(a))}function Wt(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];et([r],t,n)}}function Qe(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&et(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&et(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function et(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?Tr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&et(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const s=Gr(o);switch(s.kind){case 0:Qe({...t,selfGrammar:t.baseGrammar},n);break;case 1:Qe(t,n);break;case 2:Wt(s.ruleName,{...t,repository:i},n);break;case 3:case 4:const a=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){const l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:i};s.kind===4?Wt(s.ruleName,l,n):Qe(l,n)}else s.kind===4?n.add(new No(s.scopeName,s.ruleName)):n.add(new Se(s.scopeName));break}}}var Go=class{kind=0},Bo=class{kind=1},Uo=class{constructor(e){this.ruleName=e}kind=2},Fo=class{constructor(e){this.scopeName=e}kind=3},jo=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Gr(e){if(e==="$base")return new Go;if(e==="$self")return new Bo;const t=e.indexOf("#");if(t===-1)return new Fo(e);if(t===0)return new Uo(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new jo(n,r)}}var Ho=/\\(\d+)/,Gn=/\\(\d+)/g,Wo=-1,Br=-2;var Ve=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=je.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=je.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Pr(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:je.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:je.replaceCaptures(this._contentName,e,t)}},zo=class extends Ve{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},qo=class extends Ve{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Le(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Bn=class extends Ve{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Re,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},zt=class extends Ve{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,s,a,l,u){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this._end=new Le(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},tt=class extends Ve{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r),this._begin=new Le(i,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new Le(s,Br),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Re;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Ur=class V{static createCaptureRule(t,n,r,i,o){return t.registerRule(s=>new zo(n,s,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new qo(t.$vscodeTextmateLocation,t.id,t.name,t.match,V._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=Tr({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Bn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,V._compilePatterns(o,n,r))}return t.while?new tt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,V._compileCaptures(t.whileCaptures||t.captures,n,r),V._compilePatterns(t.patterns,n,r)):new zt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,V._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,V._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,V._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);a>o&&(o=a)}for(let s=0;s<=o;s++)i[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const a=parseInt(s,10);let l=0;t[s].patterns&&(l=V.getCompiledRuleId(t[s],n,r)),i[a]=V.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,l)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,s=t.length;o<s;o++){const a=t[o];let l=-1;if(a.include){const u=Gr(a.include);switch(u.kind){case 0:case 1:l=V.getCompiledRuleId(r[a.include],n,r);break;case 2:let p=r[u.ruleName];p&&(l=V.getCompiledRuleId(p,n,r));break;case 3:case 4:const d=u.scopeName,f=u.kind===4?u.ruleName:null,h=n.getExternalGrammar(d,r);if(h)if(f){let m=h.repository[f];m&&(l=V.getCompiledRuleId(m,n,h.repository))}else l=V.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else l=V.getCompiledRuleId(a,n,r);if(l!==-1){const u=n.getRule(l);let p=!1;if((u instanceof Bn||u instanceof zt||u instanceof tt)&&u.hasMissingPatterns&&u.patterns.length===0&&(p=!0),p)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Le=class Fr{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],s=!1;for(let a=0;a<r;a++)if(t.charAt(a)==="\\"&&a+1<r){const u=t.charAt(a+1);u==="z"?(o.push(t.substring(i,a)),o.push("$(?!\\n)(?<!\\n)"),i=a+2):(u==="A"||u==="G")&&(s=!0),a++}this.hasAnchor=s,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Ho.test(this.source):this.hasBackReferences=!1}clone(){return new Fr(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return Gn.lastIndex=0,this.source.replace(Gn,(i,o)=>Dr(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,s,a,l;for(o=0,s=this.source.length;o<s;o++)a=this.source.charAt(o),t[o]=a,n[o]=a,r[o]=a,i[o]=a,a==="\\"&&o+1<s&&(l=this.source.charAt(o+1),l==="A"?(t[o+1]="￿",n[o+1]="￿",r[o+1]="A",i[o+1]="A"):l==="G"?(t[o+1]="￿",n[o+1]="G",r[o+1]="￿",i[o+1]="G"):(t[o+1]=l,n[o+1]=l,r[o+1]=l,i[o+1]=l),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Un(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new Un(e,r,this._items.map(i=>i.ruleId))}},Un=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(` `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Tt=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Xo=class qt{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Tt(t,8),this._embeddedLanguagesMatcher=new Ko(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?qt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Tt(0,0);_getBasicScopeAttributes=new Nr(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Tt(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(qt.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ko=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Dr(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Fn=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function jr(e,t,n,r,i,o,s,a){const l=t.content.length;let u=!1,p=-1;if(s){const h=Qo(e,t,n,r,i,o);i=h.stack,r=h.linePos,n=h.isFirstLine,p=h.anchorPosition}const d=Date.now();for(;!u;){if(a!==0&&Date.now()-d>a)return new Fn(i,!0);f()}return new Fn(i,!1);function f(){const h=Jo(e,t,n,r,i,p);if(!h){o.produce(i,l),u=!0;return}const m=h.captureIndices,E=h.matchedRuleId,b=m&&m.length>0?m[0].end>r:!1;if(E===Wo){const g=i.getRule(e);o.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ce(e,t,n,i,o,g.endCaptures,m),o.produce(i,m[0].end);const y=i;if(i=i.parent,p=y.getAnchorPos(),!b&&y.getEnterPos()===r){i=y,o.produce(i,l),u=!0;return}}else{const g=e.getRule(E);o.produce(i,m[0].start);const y=i,w=g.getName(t.content,m),A=i.contentNameScopesList.pushAttributed(w,e);if(i=i.push(E,r,p,m[0].end===l,null,A,A),g instanceof zt){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.endHasBackReferences&&(i=i.withEndRule(k.getEndWithResolvedBackReferences(t.content,m))),!b&&y.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(g instanceof tt){const k=g;Ce(e,t,n,i,o,k.beginCaptures,m),o.produce(i,m[0].end),p=m[0].end;const I=k.getContentName(t.content,m),M=A.pushAttributed(I,e);if(i=i.withContentNameScopesList(M),k.whileHasBackReferences&&(i=i.withEndRule(k.getWhileWithResolvedBackReferences(t.content,m))),!b&&y.hasSameRuleAs(i)){i=i.pop(),o.produce(i,l),u=!0;return}}else if(Ce(e,t,n,i,o,g.captures,m),o.produce(i,m[0].end),i=i.pop(),!b){i=i.safePop(),o.produce(i,l),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function Qo(e,t,n,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const u=l.getRule(e);u instanceof tt&&a.push({rule:u,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:u,findOptions:p}=es(l.rule,e,l.stack.endRule,n,r===s),d=u.findNextMatchSync(t,r,p);if(d){if(d.ruleId!==Br){i=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(l.stack,d.captureIndices[0].start),Ce(e,t,n,l.stack,o,l.rule.whileCaptures,d.captureIndices),o.produce(l.stack,d.captureIndices[0].end),s=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:n}}function Jo(e,t,n,r,i,o){const s=Yo(e,t,n,r,i,o),a=e.getInjections();if(a.length===0)return s;const l=Zo(a,e,t,n,r,i,o);if(!l)return s;if(!s)return l;const u=s.captureIndices[0].start,p=l.captureIndices[0].start;return p<u||l.priorityMatch&&p===u?l:s}function Yo(e,t,n,r,i,o){const s=i.getRule(e),{ruleScanner:a,findOptions:l}=Hr(s,e,i.endRule,n,r===o),u=a.findNextMatchSync(t,r,l);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function Zo(e,t,n,r,i,o,s){let a=Number.MAX_VALUE,l=null,u,p=0;const d=o.contentNameScopesList.getScopeNames();for(let f=0,h=e.length;f<h;f++){const m=e[f];if(!m.matcher(d))continue;const E=t.getRule(m.ruleId),{ruleScanner:b,findOptions:g}=Hr(E,t,null,r,i===s),y=b.findNextMatchSync(n,i,g);if(!y)continue;const w=y.captureIndices[0].start;if(!(w>=a)&&(a=w,l=y.captureIndices,u=y.ruleId,p=m.priority,a===i))break}return l?{priorityMatch:p===-1,captureIndices:l,matchedRuleId:u}:null}function Hr(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function es(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ce(e,t,n,r,i,o,s){if(o.length===0)return;const a=t.content,l=Math.min(o.length,s.length),u=[],p=s[0].end;for(let d=0;d<l;d++){const f=o[d];if(f===null)continue;const h=s[d];if(h.length===0)continue;if(h.start>p)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,h.start):i.produce(r,h.start),f.retokenizeCapturedWithRuleId){const E=f.getName(a,s),b=r.contentNameScopesList.pushAttributed(E,e),g=f.getContentName(a,s),y=b.pushAttributed(g,e),w=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,b,y),A=e.createOnigString(a.substring(0,h.end));jr(e,A,n&&h.start===0,h.start,w,i,!1,0),Mr(A);continue}const m=f.getName(a,s);if(m!==null){const b=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new ts(b,h.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var ts=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ns(e,t,n,r,i,o,s,a){return new is(e,t,n,r,i,o,s,a)}function jn(e,t,n,r,i){const o=Ze(t,nt),s=Ur.getCompiledRuleId(n,r,i.repository);for(const a of o)e.push({debugSelector:t,matcher:a.matcher,ruleId:s,grammar:i,priority:a.priority})}function nt(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(rs(t[i],r))return n=i+1,!0;return!1})}function rs(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var is=class{constructor(e,t,n,r,i,o,s,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new Xo(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Hn(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=Ze(l,nt);for(const p of u)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let s in i)jn(t,s,i[s],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const a=this.getExternalGrammar(s);if(a){const l=a.injectionSelector;l&&jn(t,l,a,this,a)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Hn(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Ur.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Xt.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),d=le.set(0,u.languageId,u.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=Ae.createRootAndLookUpScopeName(f,d,this):h=Ae.createRoot("unknown",d),t=new Xt(null,this._rootId,-1,-1,!1,null,h,h)}else i=!1,t.reset();e=e+` `;const o=this.createOnigString(e),s=o.content.length,a=new ss(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=jr(this,o,i,0,t,a,!0,r);return Mr(o),{lineLength:s,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Hn(e,t){return e=Co(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ae=class K{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const o of n)i=It.push(i,o.scopeNames),r=new K(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new K(null,new It(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new It(null,t),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(n,i,s);return new K(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return K.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),le.set(t,n.languageId,n.tokenType,null,i,o,s)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return K._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=K._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),s=r.themeProvider.themeMatch(o),a=K.mergeAttributes(t.tokenAttributes,i,s);return new K(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Xt=class ie{constructor(t,n,r,i,o,s,a,l){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new ie(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:ie._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ae.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){ie._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,s,a){return new ie(this,t,n,r,i,o,s,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new ie(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Ae.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new ie(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ae.fromExtension(r,n.contentNameScopesList))}},os=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ze(n,nt).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ze(n,nt).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},ss=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(r=le.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=le.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},as=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,ns(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},ls=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new as(Ye.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Ye.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new os(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const s=new $o(this._syncRegistry,t);for(;s.Q.length>0;)s.Q.map(a=>this._loadSingleGrammar(a.scopeName)),s.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},Kt=Xt.NULL;function Ie(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function ee(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Wr(e){return Array.isArray(e)?e:[e]}async function dn(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function $e(e){return!e||["plaintext","txt","text","plain"].includes(e)}function pn(e){return e==="ansi"||$e(e)}function Me(e){return e==="none"}function hn(e){return Me(e)}const us=/(\r?\n)/g;function Ge(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(us);let r=0;const i=[];for(let o=0;o<n.length;o+=2){const s=t?n[o]+(n[o+1]||""):n[o];i.push([s,r]),r+=n[o].length,r+=n[o+1]?.length||0}return i}const Wn={light:"#333333",dark:"#bbbbbb"},zn={light:"#fffffe",dark:"#1e1e1e"},qn="__shiki_resolved";function mt(e){if(e?.[qn])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const a=t.settings?t.settings.find(l=>!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Wn.light:Wn.dark),n||(n=t.type==="light"?zn.light:zn.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function s(a){if(o.has(a))return o.get(a);i+=1;const l=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?s(a):(o.set(a,l),l)}t.settings=t.settings.map(a=>{const l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),u=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!u)return a;const p={...a,settings:{...a.settings}};if(l){const d=s(a.settings.foreground);t.colorReplacements[d]=a.settings.foreground,p.settings.foreground=d}if(u){const d=s(a.settings.background);t.colorReplacements[d]=a.settings.background,p.settings.background=d}return p});for(const a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const l=s(t.colors[a]);t.colorReplacements[l]=t.colors[a],t.colors[a]=l}return Object.defineProperty(t,qn,{enumerable:!1,writable:!1,value:!0}),t}async function zr(e){return[...new Set((await Promise.all(e.filter(t=>!pn(t)).map(async t=>await dn(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function qr(e){return(await Promise.all(e.map(async t=>hn(t)?null:mt(await dn(t))))).filter(t=>!!t)}function Xr(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new L(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var cs=class extends ls{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=mt(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Ye.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Xr(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(s=>n.map(([a])=>a).includes(s)):!1).filter(i=>!n.includes(i));throw new L(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},ds=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let ve=0;function gt(e){ve+=1,e.warnings!==!1&&ve>=10&&ve%10===0&&console.warn(`[Shiki] ${ve} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new L("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(mt),i=new cs(new ds(e.engine,n),r,n,e.langAlias);let o;function s(y){return Xr(y,e.langAlias)}function a(y){b();const w=i.getGrammar(typeof y=="string"?y:y.name);if(!w)throw new L(`Language \`${y}\` not found, you may need to load it first`);return w}function l(y){if(y==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const w=i.getTheme(y);if(!w)throw new L(`Theme \`${y}\` not found, you may need to load it first`);return w}function u(y){b();const w=l(y);return o!==y&&(i.setTheme(w),o=y),{theme:w,colorMap:i.getColorMap()}}function p(){return b(),i.getLoadedThemes()}function d(){return b(),i.getLoadedLanguages()}function f(...y){b(),i.loadLanguages(y.flat(1))}async function h(...y){return f(await zr(y))}function m(...y){b();for(const w of y.flat(1))i.loadTheme(w)}async function E(...y){return b(),m(await qr(y))}function b(){if(t)throw new L("Shiki instance has been disposed")}function g(){t||(t=!0,i.dispose(),ve-=1)}return{setTheme:u,getTheme:l,getLanguage:a,getLoadedThemes:p,getLoadedLanguages:d,resolveLangAlias:s,loadLanguage:h,loadLanguageSync:f,loadTheme:E,loadThemeSync:m,dispose:g,[Symbol.dispose]:g}}const ps=gt;async function fn(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([qr(e.themes||[]),zr(e.langs||[]),e.engine]);return gt({...e,themes:t,langs:n,engine:r})}const hs=fn,Kr=new WeakMap;function _t(e,t){Kr.set(e,t)}function Te(e){return Kr.get(e)}var yt=class Qr{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Qr(Object.fromEntries(Wr(n).map(r=>[r,Kt])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return fs(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function fs(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function ms(e,t){if(!(e instanceof yt))throw new L("Invalid grammar state");return e.getInternalStack(t)}const gs=/,/,_s=/ /;function Jr(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if($e(e.resolveLangAlias(n.lang||"text"))||Me(r))return Ge(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:o}=e.setTheme(r),s=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==s.name)throw new L(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(i.name))throw new L(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Zr(t,s,i,o,n)}function Yr(...e){if(e.length===2)return Te(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if($e(i)||Me(o))throw new L("Plain language does not have grammar state");if(i==="ansi")throw new L("ANSI language does not have grammar state");const{theme:s,colorMap:a}=t.setTheme(o),l=t.getLanguage(i);return new yt(mn(n,l,s,a,r).stateStack,l.name,s.name)}function Zr(e,t,n,r,i){const o=mn(e,t,n,r,i),s=new yt(o.stateStack,t.name,n.name);return _t(o.tokens,s),o.tokens}function mn(e,t,n,r,i){const o=Ie(n,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=i,u=Ge(e);let p=i.grammarState?ms(i.grammarState,n.name)??Kt:i.grammarContextCode!=null?mn(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Kt,d=[];const f=[];for(let h=0,m=u.length;h<m;h++){const[E,b]=u[h];if(E===""){d=[],f.push([]);continue}if(s>0&&E.length>=s){d=[],f.push([{content:E,offset:b,color:"",fontStyle:0}]);continue}let g,y,w;l&&l!=="tokenType"&&(g=t.tokenizeLine(E,p,a),y=g.tokens,w=0);const A=t.tokenizeLine2(E,p,a),k=A.tokens.length/2;for(let I=0;I<k;I++){const M=A.tokens[2*I],z=I+1<k?A.tokens[2*I+2]:E.length;if(M===z)continue;const pe=A.tokens[2*I+1],At=ee(r[le.getForeground(pe)],o),kt=le.getFontStyle(pe),q={content:E.substring(M,z),offset:b+M,color:At,fontStyle:kt};if(l==="tokenType")q.type=le.getTokenType(pe);else if(l){const Nn=[];if(l!=="scopeName")for(const Q of n.settings){let he;switch(typeof Q.scope){case"string":he=Q.scope.split(gs).map(St=>St.trim());break;case"object":he=Q.scope;break;default:continue}Nn.push({settings:Q,selectors:he.map(St=>St.split(_s))})}q.explanation=[];let Vn=0;for(;M+Vn<z;){const Q=y[w],he=E.substring(Q.startIndex,Q.endIndex);Vn+=he.length,q.explanation.push({content:he,scopes:l==="scopeName"?ys(Q.scopes):Es(Nn,Q.scopes)}),w+=1}}d.push(q)}f.push(d),d=[],p=A.ruleStack}return{tokens:f,stateStack:p}}function ys(e){return e.map(t=>({scopeName:t}))}function Es(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:ws(e,o,t.slice(0,r))}}return n}function Xn(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function bs(e,t,n){if(!Xn(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Xn(e[r],n[i])&&(r-=1),i-=1;return r===-1}function ws(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const s of i)if(bs(s,t,n)){r.push(o);break}return r}function gn(e,t,n,r=Jr){const i=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),o=i.map(u=>{const p=r(e,t,{...n,theme:u.theme});return{tokens:p,state:Te(p),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),s=vs(...o.map(u=>u.tokens)),a=s[0].map((u,p)=>u.map((d,f)=>{const h={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=d.explanation),s.forEach((m,E)=>{const{content:b,explanation:g,offset:y,...w}=m[p][f];h.variants[i[E].color]=w}),h})),l=o[0].state?new yt(Object.fromEntries(o.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),o[0].state.lang):void 0;return l&&_t(a,l),a}function vs(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(l=>l[r]),o=t.map(()=>[]);t.forEach((l,u)=>l.push(o[u]));const s=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(u=>u.content.length));for(let u=0;u<n;u++){const p=a[u];p.content.length===l?(o[u].push(p),s[u]+=1,a[u]=i[u][s[u]]):(o[u].push({...p,content:p.content.slice(0,l)}),a[u]={...p,content:p.content.slice(l),offset:p.offset+l})}}}return t}const Cs=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Be{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Be.prototype.normal={};Be.prototype.property={};Be.prototype.space=void 0;function ei(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Be(n,r,t)}function Qt(e){return e.toLowerCase()}class G{constructor(t,n){this.attribute=n,this.property=t}}G.prototype.attribute="";G.prototype.booleanish=!1;G.prototype.boolean=!1;G.prototype.commaOrSpaceSeparated=!1;G.prototype.commaSeparated=!1;G.prototype.defined=!1;G.prototype.mustUseProperty=!1;G.prototype.number=!1;G.prototype.overloadedBoolean=!1;G.prototype.property="";G.prototype.spaceSeparated=!1;G.prototype.space=void 0;let As=0;const v=de(),T=de(),Jt=de(),_=de(),S=de(),ue=de(),B=de();function de(){return 2**++As}const Yt=Object.freeze(Object.defineProperty({__proto__:null,boolean:v,booleanish:T,commaOrSpaceSeparated:B,commaSeparated:ue,number:_,overloadedBoolean:Jt,spaceSeparated:S},Symbol.toStringTag,{value:"Module"})),Pt=Object.keys(Yt);class _n extends G{constructor(t,n,r,i){let o=-1;if(super(t,n),Kn(this,"space",i),typeof r=="number")for(;++o<Pt.length;){const s=Pt[o];Kn(this,Pt[o],(r&Yt[s])===Yt[s])}}}_n.prototype.defined=!0;function Kn(e,t,n){n&&(e[t]=n)}function Ee(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new _n(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Qt(r)]=r,n[Qt(o.attribute)]=r}return new Be(t,n,e.space)}const ti=Ee({properties:{ariaActiveDescendant:null,ariaAtomic:T,ariaAutoComplete:null,ariaBusy:T,ariaChecked:T,ariaColCount:_,ariaColIndex:_,ariaColSpan:_,ariaControls:S,ariaCurrent:null,ariaDescribedBy:S,ariaDetails:null,ariaDisabled:T,ariaDropEffect:S,ariaErrorMessage:null,ariaExpanded:T,ariaFlowTo:S,ariaGrabbed:T,ariaHasPopup:null,ariaHidden:T,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:S,ariaLevel:_,ariaLive:null,ariaModal:T,ariaMultiLine:T,ariaMultiSelectable:T,ariaOrientation:null,ariaOwns:S,ariaPlaceholder:null,ariaPosInSet:_,ariaPressed:T,ariaReadOnly:T,ariaRelevant:null,ariaRequired:T,ariaRoleDescription:S,ariaRowCount:_,ariaRowIndex:_,ariaRowSpan:_,ariaSelected:T,ariaSetSize:_,ariaSort:null,ariaValueMax:_,ariaValueMin:_,ariaValueNow:_,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ni(e,t){return t in e?e[t]:t}function ri(e,t){return ni(e,t.toLowerCase())}const ks=Ee({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ue,acceptCharset:S,accessKey:S,action:null,allow:null,allowFullScreen:v,allowPaymentRequest:v,allowUserMedia:v,alpha:v,alt:null,as:null,async:v,autoCapitalize:null,autoComplete:S,autoFocus:v,autoPlay:v,blocking:S,capture:null,charSet:null,checked:v,cite:null,className:S,closedBy:null,colorSpace:null,cols:_,colSpan:_,command:null,commandFor:null,content:null,contentEditable:T,controls:v,controlsList:S,coords:_|ue,crossOrigin:null,data:null,dateTime:null,decoding:null,default:v,defer:v,dir:null,dirName:null,disabled:v,download:Jt,draggable:T,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:v,formTarget:null,headers:S,height:_,hidden:Jt,high:_,href:null,hrefLang:null,htmlFor:S,httpEquiv:S,id:null,imageSizes:null,imageSrcSet:null,inert:v,inputMode:null,integrity:null,is:null,isMap:v,itemId:null,itemProp:S,itemRef:S,itemScope:v,itemType:S,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:v,low:_,manifest:null,max:null,maxLength:_,media:null,method:null,min:null,minLength:_,multiple:v,muted:v,name:null,nonce:null,noModule:v,noValidate:v,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:v,optimum:_,pattern:null,ping:S,placeholder:null,playsInline:v,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:v,referrerPolicy:null,rel:S,required:v,reversed:v,rows:_,rowSpan:_,sandbox:S,scope:null,scoped:v,seamless:v,selected:v,shadowRootClonable:v,shadowRootCustomElementRegistry:v,shadowRootDelegatesFocus:v,shadowRootMode:null,shadowRootSerializable:v,shape:null,size:_,sizes:null,slot:null,span:_,spellCheck:T,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_,step:null,style:null,tabIndex:_,target:null,title:null,translate:null,type:null,typeMustMatch:v,useMap:null,value:T,width:_,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:S,axis:null,background:null,bgColor:null,border:_,borderColor:null,bottomMargin:_,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:v,declare:v,event:null,face:null,frame:null,frameBorder:null,hSpace:_,leftMargin:_,link:null,longDesc:null,lowSrc:null,marginHeight:_,marginWidth:_,noResize:v,noHref:v,noShade:v,noWrap:v,object:null,profile:null,prompt:null,rev:null,rightMargin:_,rules:null,scheme:null,scrolling:T,standby:null,summary:null,text:null,topMargin:_,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:v,disablePictureInPicture:v,disableRemotePlayback:v,exportParts:ue,part:S,prefix:null,property:null,results:_,security:null,unselectable:null},space:"html",transform:ri}),Ss=Ee({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:B,accentHeight:_,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_,amplitude:_,arabicForm:null,ascent:_,attributeName:null,attributeType:null,azimuth:_,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_,by:null,calcMode:null,capHeight:_,className:S,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:_,diffuseConstant:_,direction:null,display:null,dur:null,divisor:_,dominantBaseline:null,download:v,dx:null,dy:null,edgeMode:null,editable:null,elevation:_,enableBackground:null,end:null,event:null,exponent:_,externalResourcesRequired:null,fill:null,fillOpacity:_,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:ue,g2:ue,glyphName:ue,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_,horizOriginX:_,horizOriginY:_,id:null,ideographic:_,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_,k:_,k1:_,k2:_,k3:_,k4:_,kernelMatrix:B,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_,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:_,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:_,overlineThickness:_,paintOrder:null,panose1:null,path:null,pathLength:_,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:S,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_,pointsAtY:_,pointsAtZ:_,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:B,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:B,rev:B,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:B,requiredFeatures:B,requiredFonts:B,requiredFormats:B,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:_,specularExponent:_,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_,strikethroughThickness:_,string:null,stroke:null,strokeDashArray:B,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_,strokeOpacity:_,strokeWidth:null,style:null,surfaceScale:_,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:B,tabIndex:_,tableValues:null,target:null,targetX:_,targetY:_,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:B,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_,underlineThickness:_,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_,values:null,vAlphabetic:_,vMathematical:_,vectorEffect:null,vHanging:_,vIdeographic:_,version:null,vertAdvY:_,vertOriginX:_,vertOriginY:_,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ni}),ii=Ee({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()}}),oi=Ee({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ri}),si=Ee({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ls=/[A-Z]/g,Qn=/-[a-z]/g,Rs=/^data[-\w.:]+$/i;function Is(e,t){const n=Qt(t);let r=t,i=G;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Rs.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Qn,Ps);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Qn.test(o)){let s=o.replace(Ls,Ts);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=_n}return new i(r,t)}function Ts(e){return"-"+e.toLowerCase()}function Ps(e){return e.charAt(1).toUpperCase()}const Os=ei([ti,ks,ii,oi,si],"html"),ai=ei([ti,Ss,ii,oi,si],"svg"),Jn={}.hasOwnProperty;function xs(e,t){const n=t||{};function r(i,...o){let s=r.invalid;const a=r.handlers;if(i&&Jn.call(i,e)){const l=String(i[e]);s=Jn.call(a,l)?a[l]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ds=/["&'<>`]/g,Ns=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Vs=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,$s=/[|\\{}()[\]^$+*?.]/g,Yn=new WeakMap;function Ms(e,t){if(e=e.replace(t.subset?Gs(t.subset):Ds,r),t.subset||t.escapeOnly)return e;return e.replace(Ns,n).replace(Vs,r);function n(i,o,s){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function r(i,o,s){return t.format(i.charCodeAt(0),s.charCodeAt(o+1),t)}}function Gs(e){let t=Yn.get(e);return t||(t=Bs(e),Yn.set(e,t)),t}function Bs(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace($s,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Us=/[\dA-Fa-f]/;function Fs(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Us.test(String.fromCharCode(t))?r:r+";"}const js=/\d/;function Hs(e,t,n){const r="&#"+String(e);return n&&t&&!js.test(String.fromCharCode(t))?r:r+";"}const Ws=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ot={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},zs=["cent","copy","divide","gt","lt","not","para","times"],li={}.hasOwnProperty,Zt={};let He;for(He in Ot)li.call(Ot,He)&&(Zt[Ot[He]]=He);const qs=/[^\dA-Za-z]/;function Xs(e,t,n,r){const i=String.fromCharCode(e);if(li.call(Zt,i)){const o=Zt[i],s="&"+o;return n&&Ws.includes(o)&&!zs.includes(o)&&(!r||t&&t!==61&&qs.test(String.fromCharCode(t)))?s:s+";"}return""}function Ks(e,t,n){let r=Fs(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Xs(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=Hs(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function ye(e,t){return Ms(e,Object.assign({format:Ks},t))}const Qs=/^>|^->|<!--|-->|--!>|<!-$/g,Js=[">"],Ys=["<",">"];function Zs(e,t,n,r){return r.settings.bogusComments?"<?"+ye(e.value,Object.assign({},r.settings.characterReferences,{subset:Js}))+">":"<!--"+e.value.replace(Qs,i)+"-->";function i(o){return ye(o,Object.assign({},r.settings.characterReferences,{subset:Ys}))}}function ea(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Zn(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function ta(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function na(e){return e.join(" ").trim()}const ra=/[ \t\n\f\r]/g;function yn(e){return typeof e=="object"?e.type==="text"?er(e.value):!1:er(e)}function er(e){return e.replace(ra,"")===""}const x=ci(1),ui=ci(-1),ia=[];function ci(e){return t;function t(n,r,i){const o=n?n.children:ia;let s=(r||0)+e,a=o[s];if(!i)for(;a&&yn(a);)s+=e,a=o[s];return a}}const oa={}.hasOwnProperty;function di(e){return t;function t(n,r,i){return oa.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const En=di({body:aa,caption:xt,colgroup:xt,dd:da,dt:ca,head:xt,html:sa,li:ua,optgroup:pa,option:ha,p:la,rp:tr,rt:tr,tbody:ma,td:nr,tfoot:ga,th:nr,thead:fa,tr:_a});function xt(e,t,n){const r=x(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&yn(r.value.charAt(0)))}function sa(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function aa(e,t,n){const r=x(n,t);return!r||r.type!=="comment"}function la(e,t,n){const r=x(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ua(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="li"}function ca(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function da(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function tr(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function pa(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function ha(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function fa(e,t,n){const r=x(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function ma(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function ga(e,t,n){return!x(n,t)}function _a(e,t,n){const r=x(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function nr(e,t,n){const r=x(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ya=di({body:wa,colgroup:va,head:ba,html:Ea,tbody:Ca});function Ea(e){const t=x(e,-1);return!t||t.type!=="comment"}function ba(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function wa(e){const t=x(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&yn(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function va(e,t,n){const r=ui(n,t),i=x(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&En(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Ca(e,t,n){const r=ui(n,t),i=x(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&En(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const We={name:[[` \f\r &/=>`.split(""),` diff --git a/apps/kimi-code/dist-web/assets/index-wuJEF9t-.js b/apps/kimi-code/dist-web/assets/index-CDF-FRTI.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index-wuJEF9t-.js rename to apps/kimi-code/dist-web/assets/index-CDF-FRTI.js index 18ad8cac3..4c124b465 100644 --- a/apps/kimi-code/dist-web/assets/index-wuJEF9t-.js +++ b/apps/kimi-code/dist-web/assets/index-CDF-FRTI.js @@ -1,4 +1,4 @@ -import{t as pe,b as Ln,n as Or,c as Nr,a as Fr,d as zr,s as Ur,g as Vr,e as Br}from"./index-DcbRorFd.js";import{f as Ld}from"./index-DcbRorFd.js";import{bR as k}from"./index-_5lXYMaO.js";const Ei="diffs-container",$r=(()=>{try{return!1}catch{return!1}})(),Wr=/(?=^From [a-f0-9]+ .+$)/m,Ti=/(?=^diff --git)/gm,Ul=/(?=^---\s+\S)/gm,Vl=/(?=^@@ )/gm,Gr=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,jr=/(?<=\n)/,qr=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Kr=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Yr=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Xr=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Bl=/^<{7,}(?:\s.*)?$/,$l=/^\|{7,}(?:\s.*)?$/,Wl=/^={7,}$/,Gl=/^>{7,}(?:\s.*)?$/,on="header-prefix",sn="header-metadata",an="header-custom",_={dark:"pierre-dark",light:"pierre-light"},Ii="data-theme-css",Ri="data-unsafe-css",Qr="data-core-css",Jr="data-diffs-scrollbar-measure",Ai="--diffs-scrollbar-gutter-measured",jl=1,Zr=1e5,ln={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},_e={...ln,hunkLineCount:1},eo={paddingTop:8,paddingBottom:8,gap:8},to={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},no=Object.freeze({fromStart:0,fromEnd:0}),Ae={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Hi={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ie=new Set;let Re=null;function Y(e){Ie.add(e),Re??=requestAnimationFrame(Mi)}function io(e){Ie.delete(e),Ie.size===0&&Re!=null&&(cancelAnimationFrame(Re),Re=null)}function Mi(e){const t=new Set(Ie);Ie.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Ie.size>0?Re=requestAnimationFrame(Mi):Re=null}function He(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function De(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function dn(e,t){const n=e?.theme??_,i=t?.theme??_,r=kn(e),o=kn(t);return De(n,i)&&He(e,t,["theme","parseDiffOptions"])&&He(r,o)}function kn(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Wt(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Gt({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const h=Math.max(e-r,0),c=Math.min(e+l,t);return{top:h,bottom:Math.max(c,h)}}let a=e+n/2-s/2,d=a+s;return a<0&&(a=0),d>t&&(d=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(d,t),a))}}function ro(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function W(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function pt({name:e,width:t=16,height:n=16,properties:i}){return A({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function oo(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function Ee(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function Di(e,t,n,i={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[W(`${t}`)]})]:void 0})}function j(e,t,n){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function so(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[pt({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function ao(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var Pi=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||Wt(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:o}=this.options;t==null&&n==null&&i==null&&o==null&&r==null||this.options.onGutterUtilityClick!=null&&et(e.composedPath())||(he(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:o,enableGutterUtility:s=!1}=this.options;t==="disabled"&&!s&&n==null&&i==null&&r==null&&o==null||(he(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(he(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){he(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,i=t.composedPath();he(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const r=this.resolvePointerTarget(i);he(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:o,onLineNumberClick:s,onLineEnter:l,onLineLeave:a,onTokenClick:d,onTokenEnter:h,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const g=Tt(r)&&this.hoveredLine?.lineElement===r.lineElement;ut(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(c?.(this.hoveredToken,t),this.clearHoveredToken()),ut(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),h?.(this.hoveredToken,t))),g||(this.hoveredLine!=null&&(a?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Tt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),l?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(co(r)&&f!=null){f(r);break}if(ho(r)&&u!=null){u(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Tt(r))break;ut(r)&&d!=null&&d(this.toTokenEventBaseProps(r),t);const g=this.toEventBaseProps(r);s!=null&&r.numberColumn?s({...g,event:t}):o?.({...g,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:o,onLineLeave:s,onTokenClick:l,onTokenEnter:a,onTokenLeave:d,onHunkExpand:h,onMergeConflictActionClick:c,enableGutterUtility:u=!1,enableLineSelection:f=!1,onGutterUtilityClick:g}=this.options,b=g!=null,y=n!=="disabled"||i!=null||r!=null||o!=null||s!=null||l!=null||a!=null||d!=null||h!=null||c!=null||u||f||b;y&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,he(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const C=[];return(t==="both"||t==="click")&&(i!=null&&C.push("onLineClick"),r!=null&&C.push("onLineNumberClick"),h!=null&&C.push("expandable hunk separators"),c!=null&&C.push("merge conflict actions")),C})()),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const m=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",p=this.pointerSession.mode==="gutterSelecting";(!f&&m||!b&&p)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,r=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();et(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:r,eventSide:o,lineIndex:s}=n;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const a=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:a?this.selectedRange.start:this.selectedRange.end,side:a?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const l={lineNumber:r,side:o};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:o},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const i=this.currentSelectionEnds(),r=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=i?.top??r;r==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:r},t&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const i={lineNumber:n.lineNumber,side:n.eventSide};if(ao(this.pointerSession.pending,i))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,t&&this.updateSelection(i.lineNumber,i.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=pe(so());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Ve(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(!(i==null||r==null))return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const r of i){if(!(r instanceof HTMLElement))continue;const o=this.resolvePointerTarget(Ze(r));if(Ve(o)&&!(this.mode==="diff"&&e.side!=null&&o.side!==e.side))return o}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(Ve(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Ve(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&et(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Ze(e);if(t&&et(n))return;const i=fo(e);return i!=null?Ze(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=go(po(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Ze(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=En(t)?t:En(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const o=this.selectionAnchor?.side??t,s=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(s,e,o,t)}Wt(i??void 0,r??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const l of e)l.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,n);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const r=i.start===i.end,o=Math.min(i.start,i.end),s=Math.max(i.start,i.end);for(const l of t){const[a,d]=l.children,h=d.children.length;if(h!==a.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let c=0;c<h;c++){const u=d.children[c],f=a.children[c];if(!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;const g=this.parseLineIndex(u,n);if((g??0)>s)break;if(g==null||g<o)continue;let b=r?"single":g===o?"first":g===s?"last":"";u.setAttribute("data-selected-line",b),f.setAttribute("data-selected-line",b),f.nextSibling instanceof HTMLElement&&u.nextSibling instanceof HTMLElement&&(u.nextSibling.hasAttribute("data-line-annotation")||u.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(r?(b="last",u.setAttribute("data-selected-line","first")):g===o?b="":g===s&&u.setAttribute("data-selected-line",""),u.nextSibling.setAttribute("data-selected-line",b),f.nextSibling.setAttribute("data-selected-line",b))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:r,tokenText:o}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,i){return{start:e,end:t,...n!=null?{side:n}:{},...n!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let t=!1,n,i,r,o,s,l,a,d,h,c;for(const f of e){if(!(f instanceof HTMLElement))continue;if(c==null&&f.hasAttribute("data-merge-conflict-action")){const m=f.getAttribute("data-merge-conflict-action")??void 0,p=f.getAttribute("data-merge-conflict-conflict-index")??void 0,C=p!=null?Number.parseInt(p,10):NaN;uo(m)&&Number.isFinite(C)&&(c={kind:"merge-conflict-action",resolution:m,conflictIndex:C})}if(l==null&&f.hasAttribute("data-char")){l=f;const m=f.getAttribute("data-char");if(m!=null){const p=Number.parseInt(m,10);if(!Number.isNaN(p)){const C=f.textContent??"",v=p+C.length;(C.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(a={tokenElement:l,lineCharStart:p,lineCharEnd:v,tokenText:C});continue}}}const g=s==null?f.getAttribute("data-column-number")??void 0:void 0;if(g!=null){s=f,h=Number.parseInt(g,10),t=!0,n=In(f),o=f.getAttribute("data-line-index")??void 0;continue}const b=r==null?f.getAttribute("data-line")??void 0:void 0;if(b!=null){r=f,h=Number.parseInt(b,10),n=In(f),o=f.getAttribute("data-line-index")??void 0;continue}if(d==null&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){d={hunkIndex:void 0,direction:f.hasAttribute("data-expand-up")?"up":f.hasAttribute("data-expand-down")?"down":"both",all:f.hasAttribute("data-expand-all-button")};continue}const y=d!=null?f.getAttribute("data-expand-index")??void 0:void 0;if(d!=null&&y!=null){const m=Number.parseInt(y,10);Number.isNaN(m)||(d.hunkIndex=m);continue}if(i==null&&f.hasAttribute("data-code")){i=f;break}}if(c!=null)return c;if(d?.hunkIndex!=null)return{type:"line-info",hunkIndex:d.hunkIndex,direction:d.direction,all:d.all};if(r??=o!=null?wn(i,`[data-line][data-line-index="${o}"]`):void 0,s??=o!=null?wn(i,`[data-column-number][data-line-index="${o}"]`):void 0,i==null||r==null||s==null||n==null||h==null||Number.isNaN(h))return;const u=this.parseLineIndex(r,this.isSplitDiff());return a!=null?this.mode==="file"?{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u,...a}:{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:Tn(n,i),splitLineIndex:u,...a}:this.mode==="file"?{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u}:{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:Tn(n,i),splitLineIndex:u}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Ke({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,renderGutterUtility:c,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p},C,v,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:lo({enableGutterUtility:t,renderGutterUtility:c,onGutterUtilityClick:i}),usesCustomGutterUtility:c!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:C,onMergeConflictActionClick:x,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p,getLineIndex:v}}function lo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Ve(e){return e!=null&&"kind"in e&&e.kind==="line"}function ut(e){return e!=null&&"kind"in e&&e.kind==="token"}function Tt(e){return Ve(e)||ut(e)}function ho(e){return"type"in e&&e.type==="line-info"}function co(e){return"kind"in e&&e.kind==="merge-conflict-action"}function uo(e){return e==="current"||e==="incoming"||e==="both"}function wn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Ze(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function fo(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function po(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function go(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function En(e){return e!=null&&typeof e.elementFromPoint=="function"}function Tn(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function In(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function et(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function he(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var _i=class ue{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=ue.resizeObserver??new ResizeObserver(ue.handleSharedResizeEntries);return ue.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const r=ue.managersByElement.get(i.target);if(r==null)continue;const o=n.get(r);o==null?n.set(r,[i]):o.push(i)}for(const[i,r]of n)i.handleResizeEntries(r)}observedNodes=new Map;setup(t,n){const i=new Set;let r=0;const o=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(r===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;r++;let a=o.get(l);if(a!=null&&a.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),a!=null?(this.observedNodes.set(l,a),o.delete(l),a.numberElement!==d?(a.numberElement!=null&&(this.unobserve(a.numberElement),o.delete(a.numberElement)),d!=null&&(this.observe(d),o.delete(d),this.observedNodes.set(d,a)),a.numberElement=d,a.numberWidth=0):a.numberElement!=null?(o.delete(a.numberElement),this.observedNodes.set(a.numberElement,a)):a.numberWidth=0):(a={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,a),this.observe(l),d!=null&&(this.observedNodes.set(d,a),this.observe(d)))}if(r>1&&!n){const s=t.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const a of s){if(!(a instanceof HTMLElement))continue;const d=a.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:a});continue}let h=l.get(d);h==null&&(h=[],l.set(d,h)),h.push(a)}for(const[a,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",a,d);continue}const[h,c]=d,u=h.firstElementChild,f=c.firstElementChild;if(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let g=o.get(u);if(g!=null){this.observedNodes.set(u,g),this.observedNodes.set(f,g),o.delete(u),o.delete(f);continue}const b=u.getBoundingClientRect().height,y=f.getBoundingClientRect().height;g={type:"annotations",column1:{container:h,child:u,childHeight:b},column2:{container:c,child:f,childHeight:y},currentHeight:"auto"},i.add({child1:u,child2:f,item:g,newHeight:Math.max(b,y)})}for(const a of i)this.applyNewHeight(a.item,a.newHeight),this.observedNodes.set(a.child1,a.item),this.observedNodes.set(a.child2,a.item),this.observe(a.child1),this.observe(a.child2);i.clear()}for(const[s,l]of o)this.unobserve(s),l.type==="code"?bo(l):Co(l);o.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=ue,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),ue.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=ue,r=n.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),ue.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const r of t){const{target:o,borderBoxSize:s,contentBoxSize:l}=r;if(!(o instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const a=this.observedNodes.get(o);if(a==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(a.type==="annotations"){const d=(()=>{if(o===a.column1.child)return a.column1;if(o===a.column2.child)return a.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:a,target:o});continue}d.childHeight=s[0].blockSize,i.add(a)}else if(a.type==="code"){const d=n.get(a)??{},h=l[0].inlineSize;o===a.codeElement?d.codeInlineSize=h:o===a.numberElement&&(d.numberInlineSize=h),n.set(a,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const r=i.codeInlineSize!=null?mo(i.codeInlineSize):n.codeWidth,o=i.numberInlineSize!=null?vo(i.numberInlineSize):n.numberWidth,s=r!==n.codeWidth,l=o!==n.numberWidth;if(!(!s&&!l)&&(n.codeWidth=r,n.numberWidth=o,s&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),l&&n.codeElement.style.setProperty("--diffs-column-number-width",`${o===0?"auto":`${o}px`}`),s||l&&r!=="auto")){const a=typeof r=="number"?Math.max(r-o,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${a>0?`${a}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function mo(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function vo(e){return Math.max(Math.ceil(e),0)}function bo(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function Co(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Se=new Map,It=new Map,jt=new Map,gt=new Set;function mt(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!gt.has(t))return!1;return!0}function Rn(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(gt.has(n.name))continue;let i=Se.get(n.name);i==null&&(i=n,Se.set(n.name,i)),gt.add(i.name),t.loadLanguageSync(i.data)}}function So(){Se.clear(),gt.clear()}function Oi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function Ni(e){if(Oi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=It.get(e);if(t!=null)return t;try{let n=jt.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Ln,e)&&(n=Ln[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:r})=>{const o={name:e,data:r};return Se.has(e)||Se.set(e,o),o});return It.set(e,i),await i}finally{It.delete(e)}}function Fi(e){return Se.get(e)??Ni(e)}const vt=new Set;function Ye(e){const t=[],n=new Set;for(const c of yo(e.themes)){const u=zi(c)?c.getThemes():[c];for(const f of u){if(n.has(f.name))throw new Error(`Theme collection already contains theme "${f.name}"`);n.add(f.name),t.push(f)}}const i=Object.freeze([...t]),r=Object.freeze(i.filter(c=>c.colorScheme==="light")),o=Object.freeze(i.filter(c=>c.colorScheme==="dark")),s=new Map(i.map(c=>[c.name,c])),l=Object.freeze(i.map(c=>c.name)),a=Object.freeze(r.map(c=>c.name)),d=Object.freeze(o.map(c=>c.name));function h(c){if(c==null)return i;const{colorScheme:u,collection:f}=c;return f==null?u==="light"?r:u==="dark"?o:i:i.filter(g=>g.collection!==f?!1:u==null||g.colorScheme===u)}return{getTheme(c){return s.get(c)},getThemes(c){return h(c)},getThemeNames(c){return c?.collection==null?c?.colorScheme==="light"?a:c?.colorScheme==="dark"?d:l:h(c).map(u=>u.name)},hasTheme(c){return s.has(c)},orderBy(c){return Ye({themes:i.map((u,f)=>({descriptor:u,index:f})).sort((u,f)=>{const g=c(u.descriptor,f.descriptor);return g!==0?g:u.index-f.index}).map(u=>u.descriptor)})},pick(c){const u=[],f=new Set;for(const g of c){if(f.has(g))throw new Error(`Theme collection pick already includes theme "${g}"`);f.add(g);const b=s.get(g);if(b==null)throw new Error(`Theme collection does not contain theme "${g}"`);u.push(b)}return Ye({themes:u})},registerInto(c){for(const u of i)c.registerThemeIfAbsent(u.name,u.load)}}}function yo(e){return xo(e)?[e]:e}function xo(e){return zi(e)||Lo(e)}function Lo(e){return typeof e.name=="string"&&typeof e.load=="function"}function zi(e){return typeof e.getThemes=="function"}function Ui(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var Vi=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},ko=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},wo=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function Eo(){const e=new Map,t=new Map,n=new Map;let i=0;function r(m,p){if(e.has(m))throw new Vi(m);e.set(m,p)}function o(m,p){return e.has(m)?!1:(e.set(m,p),!0)}function s(m){return e.has(m)}function l(m){const p=t.get(m);if(p!==void 0)return Promise.resolve(p);const C=n.get(m);if(C!==void 0)return C;const v=e.get(m);if(v===void 0)return Promise.reject(new ko(m));const x=i,S=v().then(L=>{const E=Ui(L);return x===i&&t.set(m,E),n.get(m)===S&&n.delete(m),E}).catch(L=>{throw n.get(m)===S&&n.delete(m),L});return n.set(m,S),S}function a(m){return Promise.all(m.map(p=>l(p)))}function d(m,p){t.set(m,p)}function h(m){for(const[p,C]of m)d(p,C)}function c(m){return t.get(m)}function u(m){const p=[];for(const C of m){const v=t.get(C);if(v===void 0)throw new wo(C);p.push(v)}return p}function f(m){return t.has(m)}function g(m){for(const p of m)if(!t.has(p))return!1;return!0}function b(m){const p=t.get(m);return p!==void 0?p:l(m)}function y(){i++,t.clear(),n.clear()}return{clearResolvedThemes:y,getResolvedOrResolveTheme:b,getResolvedTheme:c,getResolvedThemes:u,hasRegisteredTheme:s,hasResolvedTheme:f,hasResolvedThemes:g,registerTheme:r,registerThemeIfAbsent:o,resolveTheme:l,resolveThemes:a,seedResolvedTheme:d,seedResolvedThemes:h}}const X=Eo();function An(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=X.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,X.getResolvedTheme(n)==null&&X.seedResolvedTheme(n,i);vt.has(n)||(vt.add(n),t.loadThemeSync(i))}}function To(){X.clearResolvedThemes(),vt.clear()}function hn({name:e,load:t,colorScheme:n,collection:i,displayName:r}){return{name:e,colorScheme:n,collection:i,displayName:r,load:Io(t)}}function Io(e){return async()=>Or(Ui(await e()))}const Ro="pierre",Ao=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],Bi=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],Ho=[...Bi,...Ao],Mo=new Set(Bi);function Do(e){return Mo.has(e)?"light":"dark"}const Po={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},_o={"pierre-dark":()=>k(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>k(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>k(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>k(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>k(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>k(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>k(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>k(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>k(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>k(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function Oo(e){return hn({name:e,collection:Ro,colorScheme:Do(e),displayName:Po[e],load:_o[e]})}const $i=Ye({themes:Ho.map(e=>Oo(e))}),No="shiki",Wi=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],Fo=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],zo=new Set(Wi);function Uo(e){return zo.has(e)?"light":"dark"}const Vo={andromeeda:()=>k(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>k(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>k(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>k(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>k(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>k(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>k(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>k(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>k(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>k(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>k(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>k(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>k(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>k(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>k(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>k(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>k(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>k(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>k(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>k(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>k(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>k(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>k(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>k(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>k(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>k(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>k(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>k(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>k(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>k(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>k(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>k(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>k(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>k(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>k(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>k(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>k(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>k(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>k(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>k(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>k(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>k(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>k(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>k(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>k(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>k(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>k(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>k(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>k(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>k(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>k(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>k(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>k(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>k(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>k(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>k(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>k(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>k(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>k(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>k(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>k(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>k(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>k(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>k(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>k(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function Hn(e){return hn({name:e,collection:No,colorScheme:Uo(e),load:Vo[e]})}const Gi=Ye({themes:Object.freeze([...Wi.map(e=>Hn(e)),...Fo.map(e=>Hn(e))])});Ye({themes:[$i,Gi]});function ji(e){if(Oi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(X.hasRegisteredTheme(e))return;const t=Gi.getTheme(e);if(t!=null){X.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function qi(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function Bo(e){ji(e);const t=await X.resolveTheme(e);return qi(e,t),t}function $o(e){return X.getResolvedTheme(e)??Bo(e)}let $;async function xt({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){$??=Nr({themes:[],langs:["text"],engine:n==="shiki-wasm"?Fr(k(()=>import("./wasm-CG6Dc4jp.js"),[])):zr()});const i=Wo($)?await $:$;$=i;const r=[];for(const s of t){if(s==="text"||s==="ansi")continue;const l=Fi(s);"then"in l?r.push(l):Rn(l,i)}const o=[];for(const s of e){const l=$o(s);"then"in l?o.push(l):An(l,$)}return(r.length>0||o.length>0)&&await Promise.all([Promise.all(r).then(s=>{Rn(s,i)}),Promise.all(o).then(s=>{An(s,i)})]),i}function ql(e=$){return e!=null&&!("then"in e)}function Ki(){if($!=null&&!("then"in $))return $}function Wo(e=$){return e!=null&&"then"in e}function Kl(e=$){return e==null}async function Yl(e){await xt(e)}async function Xl(){$!=null&&((await $).dispose(),So(),To(),$=void 0)}for(const e of $i.getThemes())X.registerThemeIfAbsent(e.name,e.load);function cn(e=_){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Ge(e){for(const t of cn(e))if(!vt.has(t))return!1;return!0}function Go(e){return X.hasResolvedThemes(e)}function Oe(e,t){return De(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function ae(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Lt(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function qt(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function jo(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Yi({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:an}}):qo({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[Ko(i)]],properties:r})}function qo({name:e,prevName:t,iconType:n}){const i=[A({tagName:"slot",properties:{name:on}}),pt({name:jo(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(t)]})],properties:{"data-prev-name":""}})),i.push(pt({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(e)]})],properties:{"data-title":""}})),A({tagName:"div",children:i,properties:{"data-header-content":""}})}function Ko(e){const t=[];if(e!=null){let n=0,i=0;for(const r of e.hunks)n+=r.additionLines,i+=r.deletionLines;(i>0||n===0)&&t.push(A({tagName:"span",children:[W(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(A({tagName:"span",children:[W(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:sn}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function Xi(e){return A({tagName:"pre",properties:Yo(e)})}function Yo({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:o,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${o}`.length}ch;`}}const Z=new Map;let bt=0;const Ne={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Q(e){if(Z.has(e))return Z.get(e)??"text";if(Ne[e]!=null)return Ne[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Z.has(t[1]))return Z.get(t[1])??"text";if(Ne[t[1]]!=null)return Ne[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return Z.has(n)?Z.get(n)??"text":Ne[n]??"text"}function Ql(e,t){if(e<=bt)return!1;Z.clear();for(const n in t){const i=t[n];i!=null&&Z.set(n,i)}return bt=e,!0}function Jl(){return bt}function Xo(e,t){const n=Z.get(e);return n===t?!1:(n!=null&&console.warn(`setCustomExtension: overriding custom mapping for "${e}" from "${n}" to "${t}"`),Z.set(e,t),bt++,!0)}function Zl(){return Object.fromEntries(Z)}function un(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:cn(t),preferredHighlighter:n}}function ge(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function xe(e){return e.replace(/\n$|\r\n$/,"")}function Qo(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),new Error(r)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push(W(` +import{t as pe,b as Ln,n as Or,c as Nr,a as Fr,d as zr,s as Ur,g as Vr,e as Br}from"./index-C6iX4-LJ.js";import{f as Ld}from"./index-C6iX4-LJ.js";import{bR as k}from"./index-yKYHPeXU.js";const Ei="diffs-container",$r=(()=>{try{return!1}catch{return!1}})(),Wr=/(?=^From [a-f0-9]+ .+$)/m,Ti=/(?=^diff --git)/gm,Ul=/(?=^---\s+\S)/gm,Vl=/(?=^@@ )/gm,Gr=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,jr=/(?<=\n)/,qr=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Kr=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Yr=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Xr=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Bl=/^<{7,}(?:\s.*)?$/,$l=/^\|{7,}(?:\s.*)?$/,Wl=/^={7,}$/,Gl=/^>{7,}(?:\s.*)?$/,on="header-prefix",sn="header-metadata",an="header-custom",_={dark:"pierre-dark",light:"pierre-light"},Ii="data-theme-css",Ri="data-unsafe-css",Qr="data-core-css",Jr="data-diffs-scrollbar-measure",Ai="--diffs-scrollbar-gutter-measured",jl=1,Zr=1e5,ln={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8},_e={...ln,hunkLineCount:1},eo={paddingTop:8,paddingBottom:8,gap:8},to={omega:.015,positionEpsilon:.5,velocityEpsilon:.05},no=Object.freeze({fromStart:0,fromEnd:0}),Ae={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Hi={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Ie=new Set;let Re=null;function Y(e){Ie.add(e),Re??=requestAnimationFrame(Mi)}function io(e){Ie.delete(e),Ie.size===0&&Re!=null&&(cancelAnimationFrame(Re),Re=null)}function Mi(e){const t=new Set(Ie);Ie.clear();for(const n of t)try{n(e)}catch(i){console.error(i)}Ie.size>0?Re=requestAnimationFrame(Mi):Re=null}function He(e,t,n){if(e===t||e==null||t==null)return e===t;const i=new Set(n),r=Object.keys(e),o=new Set(Object.keys(t));for(const s of r)if(o.delete(s),!i.has(s)&&(!(s in t)||e[s]!==t[s]))return!1;for(const s of Array.from(o))if(!i.has(s))return!1;return!0}function De(e,t){return e==null||t==null||typeof e=="string"||typeof t=="string"?e===t:e.dark===t.dark&&e.light===t.light}function dn(e,t){const n=e?.theme??_,i=t?.theme??_,r=kn(e),o=kn(t);return De(n,i)&&He(e,t,["theme","parseDiffOptions"])&&He(r,o)}function kn(e){if(e!=null&&"parseDiffOptions"in e)return e.parseDiffOptions}function Wt(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function Gt({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:i=!1,fitPerfectlyOverscroll:r=0,overscrollSize:o}){const s=n+o*2,l=i?n+r*2:s;if(t=Math.max(t,l),s>=t||i){const h=Math.max(e-r,0),c=Math.min(e+l,t);return{top:h,bottom:Math.max(c,h)}}let a=e+n/2-s/2,d=a+s;return a<0&&(a=0),d>t&&(d=t),a=Math.floor(Math.max(a,0)),{top:a,bottom:Math.ceil(Math.max(Math.min(d,t),a))}}function ro(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function W(e){return{type:"text",value:e}}function A({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function pt({name:e,width:t=16,height:n=16,properties:i}){return A({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[A({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function oo(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t;"children"in t?t=t.children[0]:t=null}}function Ee(e){return A({tagName:"div",properties:{"data-gutter":""},children:e})}function Di(e,t,n,i={}){return A({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:t!=null?[A({tagName:"span",properties:{"data-line-number-content":""},children:[W(`${t}`)]})]:void 0})}function j(e,t,n){return A({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t==="annotation"?void 0:e,style:t==="annotation"?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function so(){return A({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[pt({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function ao(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var Pi=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();const{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){const n=!(e===this.selectedRange||Wt(e??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{const e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode==="diff"&&e.type==="diff-line")return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode==="file"&&e.type==="line")return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{const{onHunkExpand:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:o}=this.options;t==null&&n==null&&i==null&&o==null&&r==null||this.options.onGutterUtilityClick!=null&&et(e.composedPath())||(he(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if(e.pointerType!=="mouse")return;const{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:o,enableGutterUtility:s=!1}=this.options;t==="disabled"&&!s&&n==null&&i==null&&r==null&&o==null||(he(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{const{__debugPointerEvents:t}=this.options;if(he(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null&&this.hoveredToken==null){he(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token");return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){const{__debugPointerEvents:n}=this.options,i=t.composedPath();he(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});const r=this.resolvePointerTarget(i);he(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);const{onLineClick:o,onLineNumberClick:s,onLineEnter:l,onLineLeave:a,onTokenClick:d,onTokenEnter:h,onTokenLeave:c,onHunkExpand:u,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{const g=Tt(r)&&this.hoveredLine?.lineElement===r.lineElement;ut(r)&&this.hoveredToken?.tokenElement===r.tokenElement||(this.hoveredToken!=null&&(c?.(this.hoveredToken,t),this.clearHoveredToken()),ut(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),h?.(this.hoveredToken,t))),g||(this.hoveredLine!=null&&(a?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Tt(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),l?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{if(r==null)break;if(co(r)&&f!=null){f(r);break}if(ho(r)&&u!=null){u(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Tt(r))break;ut(r)&&d!=null&&d(this.toTokenEventBaseProps(r),t);const g=this.toEventBaseProps(r);s!=null&&r.numberColumn?s({...g,event:t}):o?.({...g,event:t});break}}}syncPointerListeners(e){const{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:o,onLineLeave:s,onTokenClick:l,onTokenEnter:a,onTokenLeave:d,onHunkExpand:h,onMergeConflictActionClick:c,enableGutterUtility:u=!1,enableLineSelection:f=!1,onGutterUtilityClick:g}=this.options,b=g!=null,y=n!=="disabled"||i!=null||r!=null||o!=null||s!=null||l!=null||a!=null||d!=null||h!=null||c!=null||u||f||b;y&&!this.hasPointerListeners?(e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,he(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const C=[];return(t==="both"||t==="click")&&(i!=null&&C.push("onLineClick"),r!=null&&C.push("onLineNumberClick"),h!=null&&C.push("expandable hunk separators"),c!=null&&C.push("merge conflict actions")),C})()),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),he(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!y&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const m=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",p=this.pointerSession.mode==="gutterSelecting";(!f&&m||!b&&p)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=e!=null,r=t!=null||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType==="mouse"&&e.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const t=e.composedPath();et(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!=="mouse"&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){const{enableLineSelection:t=!1}=this.options;if(!t)return;const n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(n==null)return;const{pre:i}=this;if(i==null)return;const{lineNumber:r,eventSide:o,lineIndex:s}=n;if(e.shiftKey&&this.selectedRange!=null){const l=this.getIndexesFromSelection(this.selectedRange,i.getAttribute("data-diff-type")==="split");if(l==null)return;const a=l.start<=l.end?s>=l.start:s<=l.end;this.selectionAnchor={lineNumber:a?this.selectedRange.start:this.selectedRange.end,side:a?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){const l={lineNumber:r,side:o};this.selectionAnchor=l,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:l,pending:l},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:o},this.updateSelection(r,o,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;const i=this.currentSelectionEnds(),r=i?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),o=i?.top??r;r==null||o==null||(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:o,current:r},t&&(this.selectionAnchor={lineNumber:o.lineNumber,side:o.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{const{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;this.updateSelection(n.lineNumber,n.eventSide);return}case"pendingSingleLineUnselect":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(n==null||this.selectionAnchor==null)return;const i={lineNumber:n.lineNumber,side:n.eventSide};if(ao(this.pointerSession.pending,i))return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{const{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();const i=this.resolveSelectionPoint(e,{source:"coordinates-first"});i!=null&&(this.pointerSession.current=i,t&&this.updateSelection(i.lineNumber,i.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){const{lineHoverHighlight:t="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!=="disabled"&&((t==="both"||t==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(t==="both"||t==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const t=document.createElement("div");t.innerHTML=pe(so());const n=t.firstElementChild;if(!(n instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");n.remove(),this.gutterUtilityButton=n}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;const t=this.resolvePointerTarget(e);Ve(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){const e=this.currentSelectionEnds();if(e==null)return!1;const t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){const e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){const t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(!(i==null||r==null))return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){const t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;const t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;const n=this.mode==="diff"?`${t[0]},${t[1]}`:`${t[0]}`,i=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(const r of i){if(!(r instanceof HTMLElement))continue;const o=this.resolvePointerTarget(Ze(r));if(Ve(o)&&!(this.mode==="diff"&&e.side!=null&&o.side!==e.side))return o}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){const n=this.resolvePointerTarget(e);if(Ve(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode==="diff"?n.side:void 0}}resolveSelectionInfo(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){const t=this.resolvePointerTarget(e);if(Ve(t))return{lineNumber:t.lineNumber,side:this.mode==="diff"?t.side:void 0}}resolveSelectionPoint(e,t){const n=this.resolveSelectionPath(e,t);return n!=null?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){const n=t.excludeUtility!==!1;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{const i=this.pathFromCoordinates(e,n);return i!==void 0?i??void 0:this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){const n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&et(e))){for(const n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){const n=Ze(e);if(t&&et(n))return;const i=fo(e);return i!=null?Ze(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){const t=go(po(e));if(t==null)return;const n=this.targetForSelectionPoint(t);return n!=null?Ze(n.lineElement):void 0}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;const t=this.pre?.getRootNode(),n=En(t)?t:En(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){const{getLineIndex:n}=this.options;return n!=null?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return this.proposedSelectedRange!==void 0?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){const i=this.getCurrentSelectionRange();let r;if(e==null)r=null;else{const o=this.selectionAnchor?.side??t,s=this.selectionAnchor?.lineNumber??e;r=this.buildSelectionRange(s,e,o,t)}Wt(i??void 0,r??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=r:(this.selectedRange=r,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;const n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&i!=null?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const e=this.pre.querySelectorAll("[data-selected-line]");for(const l of e)l.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const n=this.pre.getAttribute("data-diff-type")==="split",i=this.getIndexesFromSelection(this.selectedRange,n);if(i==null)throw console.error({rowRange:i,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const r=i.start===i.end,o=Math.min(i.start,i.end),s=Math.max(i.start,i.end);for(const l of t){const[a,d]=l.children,h=d.children.length;if(h!==a.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let c=0;c<h;c++){const u=d.children[c],f=a.children[c];if(!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;const g=this.parseLineIndex(u,n);if((g??0)>s)break;if(g==null||g<o)continue;let b=r?"single":g===o?"first":g===s?"last":"";u.setAttribute("data-selected-line",b),f.setAttribute("data-selected-line",b),f.nextSibling instanceof HTMLElement&&u.nextSibling instanceof HTMLElement&&(u.nextSibling.hasAttribute("data-line-annotation")||u.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(r?(b="last",u.setAttribute("data-selected-line","first")):g===o?b="":g===s&&u.setAttribute("data-selected-line",""),u.nextSibling.setAttribute("data-selected-line",b),f.nextSibling.setAttribute("data-selected-line",b))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode==="file"?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}){return this.mode==="file"?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:r,tokenText:o}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:o}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,i){return{start:e,end:t,...n!=null?{side:n}:{},...n!==i&&i!=null?{endSide:i}:{}}}resolvePointerTarget(e){let t=!1,n,i,r,o,s,l,a,d,h,c;for(const f of e){if(!(f instanceof HTMLElement))continue;if(c==null&&f.hasAttribute("data-merge-conflict-action")){const m=f.getAttribute("data-merge-conflict-action")??void 0,p=f.getAttribute("data-merge-conflict-conflict-index")??void 0,C=p!=null?Number.parseInt(p,10):NaN;uo(m)&&Number.isFinite(C)&&(c={kind:"merge-conflict-action",resolution:m,conflictIndex:C})}if(l==null&&f.hasAttribute("data-char")){l=f;const m=f.getAttribute("data-char");if(m!=null){const p=Number.parseInt(m,10);if(!Number.isNaN(p)){const C=f.textContent??"",v=p+C.length;(C.trim()!==""||this.options.enableTokenInteractionsOnWhitespace===!0)&&(a={tokenElement:l,lineCharStart:p,lineCharEnd:v,tokenText:C});continue}}}const g=s==null?f.getAttribute("data-column-number")??void 0:void 0;if(g!=null){s=f,h=Number.parseInt(g,10),t=!0,n=In(f),o=f.getAttribute("data-line-index")??void 0;continue}const b=r==null?f.getAttribute("data-line")??void 0:void 0;if(b!=null){r=f,h=Number.parseInt(b,10),n=In(f),o=f.getAttribute("data-line-index")??void 0;continue}if(d==null&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){d={hunkIndex:void 0,direction:f.hasAttribute("data-expand-up")?"up":f.hasAttribute("data-expand-down")?"down":"both",all:f.hasAttribute("data-expand-all-button")};continue}const y=d!=null?f.getAttribute("data-expand-index")??void 0:void 0;if(d!=null&&y!=null){const m=Number.parseInt(y,10);Number.isNaN(m)||(d.hunkIndex=m);continue}if(i==null&&f.hasAttribute("data-code")){i=f;break}}if(c!=null)return c;if(d?.hunkIndex!=null)return{type:"line-info",hunkIndex:d.hunkIndex,direction:d.direction,all:d.all};if(r??=o!=null?wn(i,`[data-line][data-line-index="${o}"]`):void 0,s??=o!=null?wn(i,`[data-column-number][data-line-index="${o}"]`):void 0,i==null||r==null||s==null||n==null||h==null||Number.isNaN(h))return;const u=this.parseLineIndex(r,this.isSplitDiff());return a!=null?this.mode==="file"?{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u,...a}:{kind:"token",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:Tn(n,i),splitLineIndex:u,...a}:this.mode==="file"?{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:void 0,splitLineIndex:u}:{kind:"line",lineType:n,lineElement:r,lineNumber:h,numberColumn:t,numberElement:s,side:Tn(n,i),splitLineIndex:u}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){const n=(e.getAttribute("data-line-index")??"").split(",").map(i=>Number.parseInt(i,10)).filter(i=>!Number.isNaN(i));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Ke({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,renderGutterUtility:c,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p},C,v,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:lo({enableGutterUtility:t,renderGutterUtility:c,onGutterUtilityClick:i}),usesCustomGutterUtility:c!=null,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:C,onMergeConflictActionClick:x,onLineClick:r,onLineEnter:o,onLineLeave:s,onLineNumberClick:l,onTokenClick:a,onTokenEnter:d,onTokenLeave:h,__debugPointerEvents:u,enableLineSelection:f,controlledSelection:g,onLineSelected:b,onLineSelectionStart:y,onLineSelectionChange:m,onLineSelectionEnd:p,getLineIndex:v}}function lo({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw new Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}function Ve(e){return e!=null&&"kind"in e&&e.kind==="line"}function ut(e){return e!=null&&"kind"in e&&e.kind==="token"}function Tt(e){return Ve(e)||ut(e)}function ho(e){return"type"in e&&e.type==="line-info"}function co(e){return"kind"in e&&e.kind==="merge-conflict-action"}function uo(e){return e==="current"||e==="incoming"||e==="both"}function wn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Ze(e){const t=[];let n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function fo(e){const t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;const n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;const i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}function po(e){const t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){const n=e.getAttribute("name")??void 0;return n!=null&&n.startsWith("annotation-")?n:void 0}}function go(e){if(e==null)return;const t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;const n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function En(e){return e!=null&&typeof e.elementFromPoint=="function"}function Tn(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function In(e){const t=e.getAttribute("data-line-type");if(t!=null)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function et(e){for(const t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||t.getAttribute("slot")==="gutter-utility-slot"||t.getAttribute("name")==="gutter-utility-slot"))return!0;return!1}function he(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if(t!=="click")return;break;case"move":if(t!=="move")return;break}console.log(...n)}var _i=class ue{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){const t=ue.resizeObserver??new ResizeObserver(ue.handleSharedResizeEntries);return ue.resizeObserver=t,t}static handleSharedResizeEntries(t){const n=new Map;for(const i of t){const r=ue.managersByElement.get(i.target);if(r==null)continue;const o=n.get(r);o==null?n.set(r,[i]):o.push(i)}for(const[i,r]of n)i.handleResizeEntries(r)}observedNodes=new Map;setup(t,n){const i=new Set;let r=0;const o=new Map(this.observedNodes);this.observedNodes.clear();for(const s of t.children){if(r===2)break;const l=(()=>{if(s instanceof HTMLElement&&s.tagName==="CODE")return s})();if(l==null)continue;r++;let a=o.get(l);if(a!=null&&a.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let d=l.firstElementChild;d instanceof HTMLElement||(d=null),a!=null?(this.observedNodes.set(l,a),o.delete(l),a.numberElement!==d?(a.numberElement!=null&&(this.unobserve(a.numberElement),o.delete(a.numberElement)),d!=null&&(this.observe(d),o.delete(d),this.observedNodes.set(d,a)),a.numberElement=d,a.numberWidth=0):a.numberElement!=null?(o.delete(a.numberElement),this.observedNodes.set(a.numberElement,a)):a.numberWidth=0):(a={type:"code",codeElement:l,numberElement:d,codeWidth:"auto",numberWidth:0},this.observedNodes.set(l,a),this.observe(l),d!=null&&(this.observedNodes.set(d,a),this.observe(d)))}if(r>1&&!n){const s=t.querySelectorAll('[data-line-annotation*=","]'),l=new Map;for(const a of s){if(!(a instanceof HTMLElement))continue;const d=a.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(d)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:d,element:a});continue}let h=l.get(d);h==null&&(h=[],l.set(d,h)),h.push(a)}for(const[a,d]of l){if(d.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",a,d);continue}const[h,c]=d,u=h.firstElementChild,f=c.firstElementChild;if(!(h instanceof HTMLElement)||!(c instanceof HTMLElement)||!(u instanceof HTMLElement)||!(f instanceof HTMLElement))continue;let g=o.get(u);if(g!=null){this.observedNodes.set(u,g),this.observedNodes.set(f,g),o.delete(u),o.delete(f);continue}const b=u.getBoundingClientRect().height,y=f.getBoundingClientRect().height;g={type:"annotations",column1:{container:h,child:u,childHeight:b},column2:{container:c,child:f,childHeight:y},currentHeight:"auto"},i.add({child1:u,child2:f,item:g,newHeight:Math.max(b,y)})}for(const a of i)this.applyNewHeight(a.item,a.newHeight),this.observedNodes.set(a.child1,a.item),this.observedNodes.set(a.child2,a.item),this.observe(a.child1),this.observe(a.child2);i.clear()}for(const[s,l]of o)this.unobserve(s),l.type==="code"?bo(l):Co(l);o.clear()}cleanUp(){for(const t of this.observedNodes.keys())this.unobserve(t);this.observedNodes.clear()}observe(t){const{managersByElement:n}=ue,i=n.get(t);if(i!==this){if(i!=null&&i!==this)throw new Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),ue.getResizeObserver().observe(t)}}unobserve(t){const{managersByElement:n,resizeObserver:i}=ue,r=n.get(t);if(r!=null){if(r!==this)throw new Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),i!=null&&n.size===0&&(i.disconnect(),ue.resizeObserver=void 0)}}handleResizeEntries(t){const n=new Map,i=new Set;for(const r of t){const{target:o,borderBoxSize:s,contentBoxSize:l}=r;if(!(o instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",r);continue}const a=this.observedNodes.get(o);if(a==null){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",r);continue}if(a.type==="annotations"){const d=(()=>{if(o===a.column1.child)return a.column1;if(o===a.column2.child)return a.column2})();if(d==null){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:a,target:o});continue}d.childHeight=s[0].blockSize,i.add(a)}else if(a.type==="code"){const d=n.get(a)??{},h=l[0].inlineSize;o===a.codeElement?d.codeInlineSize=h:o===a.numberElement&&(d.numberInlineSize=h),n.set(a,d)}}this.applyAnnotationUpdates(i),i.clear(),this.applyColumnUpdates(n),n.clear()}applyAnnotationUpdates(t){for(const n of t)this.applyNewHeight(n,Math.max(n.column1.childHeight,n.column2.childHeight))}applyColumnUpdates=t=>{for(const[n,i]of t){const r=i.codeInlineSize!=null?mo(i.codeInlineSize):n.codeWidth,o=i.numberInlineSize!=null?vo(i.numberInlineSize):n.numberWidth,s=r!==n.codeWidth,l=o!==n.numberWidth;if(!(!s&&!l)&&(n.codeWidth=r,n.numberWidth=o,s&&n.codeElement.style.setProperty("--diffs-column-width",`${typeof r=="number"?`${r}px`:"auto"}`),l&&n.codeElement.style.setProperty("--diffs-column-number-width",`${o===0?"auto":`${o}px`}`),s||l&&r!=="auto")){const a=typeof r=="number"?Math.max(r-o,0):0;n.codeElement.style.setProperty("--diffs-column-content-width",`${a>0?`${a}px`:"auto"}`)}}};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};function mo(e){const t=Math.max(Math.floor(e),0);return t===0?"auto":t}function vo(e){return Math.max(Math.ceil(e),0)}function bo(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width"))}function Co(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty("--diffs-annotation-min-height"),e.column2.container.isConnected&&e.column2.container.style.removeProperty("--diffs-annotation-min-height")}const Se=new Map,It=new Map,jt=new Map,gt=new Set;function mt(e){for(const t of Array.isArray(e)?e:[e])if(!(t==="text"||t==="ansi")&&!gt.has(t))return!1;return!0}function Rn(e,t){e=Array.isArray(e)?e:[e];for(const n of e){if(gt.has(n.name))continue;let i=Se.get(n.name);i==null&&(i=n,Se.set(n.name,i)),gt.add(i.name),t.loadLanguageSync(i.data)}}function So(){Se.clear(),gt.clear()}function Oi(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}async function Ni(e){if(Oi())throw new Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const t=It.get(e);if(t!=null)return t;try{let n=jt.get(e);if(n==null&&Object.prototype.hasOwnProperty.call(Ln,e)&&(n=Ln[e]),n==null)throw new Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);const i=n().then(({default:r})=>{const o={name:e,data:r};return Se.has(e)||Se.set(e,o),o});return It.set(e,i),await i}finally{It.delete(e)}}function Fi(e){return Se.get(e)??Ni(e)}const vt=new Set;function Ye(e){const t=[],n=new Set;for(const c of yo(e.themes)){const u=zi(c)?c.getThemes():[c];for(const f of u){if(n.has(f.name))throw new Error(`Theme collection already contains theme "${f.name}"`);n.add(f.name),t.push(f)}}const i=Object.freeze([...t]),r=Object.freeze(i.filter(c=>c.colorScheme==="light")),o=Object.freeze(i.filter(c=>c.colorScheme==="dark")),s=new Map(i.map(c=>[c.name,c])),l=Object.freeze(i.map(c=>c.name)),a=Object.freeze(r.map(c=>c.name)),d=Object.freeze(o.map(c=>c.name));function h(c){if(c==null)return i;const{colorScheme:u,collection:f}=c;return f==null?u==="light"?r:u==="dark"?o:i:i.filter(g=>g.collection!==f?!1:u==null||g.colorScheme===u)}return{getTheme(c){return s.get(c)},getThemes(c){return h(c)},getThemeNames(c){return c?.collection==null?c?.colorScheme==="light"?a:c?.colorScheme==="dark"?d:l:h(c).map(u=>u.name)},hasTheme(c){return s.has(c)},orderBy(c){return Ye({themes:i.map((u,f)=>({descriptor:u,index:f})).sort((u,f)=>{const g=c(u.descriptor,f.descriptor);return g!==0?g:u.index-f.index}).map(u=>u.descriptor)})},pick(c){const u=[],f=new Set;for(const g of c){if(f.has(g))throw new Error(`Theme collection pick already includes theme "${g}"`);f.add(g);const b=s.get(g);if(b==null)throw new Error(`Theme collection does not contain theme "${g}"`);u.push(b)}return Ye({themes:u})},registerInto(c){for(const u of i)c.registerThemeIfAbsent(u.name,u.load)}}}function yo(e){return xo(e)?[e]:e}function xo(e){return zi(e)||Lo(e)}function Lo(e){return typeof e.name=="string"&&typeof e.load=="function"}function zi(e){return typeof e.getThemes=="function"}function Ui(e){return e!==null&&typeof e=="object"&&"default"in e?e.default:e}var Vi=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},ko=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},wo=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};function Eo(){const e=new Map,t=new Map,n=new Map;let i=0;function r(m,p){if(e.has(m))throw new Vi(m);e.set(m,p)}function o(m,p){return e.has(m)?!1:(e.set(m,p),!0)}function s(m){return e.has(m)}function l(m){const p=t.get(m);if(p!==void 0)return Promise.resolve(p);const C=n.get(m);if(C!==void 0)return C;const v=e.get(m);if(v===void 0)return Promise.reject(new ko(m));const x=i,S=v().then(L=>{const E=Ui(L);return x===i&&t.set(m,E),n.get(m)===S&&n.delete(m),E}).catch(L=>{throw n.get(m)===S&&n.delete(m),L});return n.set(m,S),S}function a(m){return Promise.all(m.map(p=>l(p)))}function d(m,p){t.set(m,p)}function h(m){for(const[p,C]of m)d(p,C)}function c(m){return t.get(m)}function u(m){const p=[];for(const C of m){const v=t.get(C);if(v===void 0)throw new wo(C);p.push(v)}return p}function f(m){return t.has(m)}function g(m){for(const p of m)if(!t.has(p))return!1;return!0}function b(m){const p=t.get(m);return p!==void 0?p:l(m)}function y(){i++,t.clear(),n.clear()}return{clearResolvedThemes:y,getResolvedOrResolveTheme:b,getResolvedTheme:c,getResolvedThemes:u,hasRegisteredTheme:s,hasResolvedTheme:f,hasResolvedThemes:g,registerTheme:r,registerThemeIfAbsent:o,resolveTheme:l,resolveThemes:a,seedResolvedTheme:d,seedResolvedThemes:h}}const X=Eo();function An(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let i;if(typeof n=="string"){if(i=X.getResolvedTheme(n),i==null)throw new Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else i=n,n=n.name,X.getResolvedTheme(n)==null&&X.seedResolvedTheme(n,i);vt.has(n)||(vt.add(n),t.loadThemeSync(i))}}function To(){X.clearResolvedThemes(),vt.clear()}function hn({name:e,load:t,colorScheme:n,collection:i,displayName:r}){return{name:e,colorScheme:n,collection:i,displayName:r,load:Io(t)}}function Io(e){return async()=>Or(Ui(await e()))}const Ro="pierre",Ao=["pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],Bi=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],Ho=[...Bi,...Ao],Mo=new Set(Bi);function Do(e){return Mo.has(e)?"light":"dark"}const Po={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},_o={"pierre-dark":()=>k(()=>import("./pierre-dark-CyvmCCZW.js"),[]),"pierre-dark-soft":()=>k(()=>import("./pierre-dark-soft-BHGpRqa4.js"),[]),"pierre-dark-vibrant":()=>k(()=>import("./pierre-dark-vibrant-BWBVywrn.js"),[]),"pierre-dark-protanopia-deuteranopia":()=>k(()=>import("./pierre-dark-protanopia-deuteranopia-Rgc0TwpF.js"),[]),"pierre-dark-tritanopia":()=>k(()=>import("./pierre-dark-tritanopia-Beq2gCRQ.js"),[]),"pierre-light":()=>k(()=>import("./pierre-light-480U9XYS.js"),[]),"pierre-light-soft":()=>k(()=>import("./pierre-light-soft-CVdyfjmI.js"),[]),"pierre-light-vibrant":()=>k(()=>import("./pierre-light-vibrant-DdTDNdfJ.js"),[]),"pierre-light-protanopia-deuteranopia":()=>k(()=>import("./pierre-light-protanopia-deuteranopia-CaVOBURG.js"),[]),"pierre-light-tritanopia":()=>k(()=>import("./pierre-light-tritanopia-B4_gpKOM.js"),[])};function Oo(e){return hn({name:e,collection:Ro,colorScheme:Do(e),displayName:Po[e],load:_o[e]})}const $i=Ye({themes:Ho.map(e=>Oo(e))}),No="shiki",Wi=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],Fo=["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"],zo=new Set(Wi);function Uo(e){return zo.has(e)?"light":"dark"}const Vo={andromeeda:()=>k(()=>import("./andromeeda-C4gqWexZ.js"),[]),"aurora-x":()=>k(()=>import("./aurora-x-D-2ljcwZ.js"),[]),"ayu-dark":()=>k(()=>import("./ayu-dark-DYE7WIF3.js"),[]),"ayu-light":()=>k(()=>import("./ayu-light-BA47KaF1.js"),[]),"ayu-mirage":()=>k(()=>import("./ayu-mirage-32ctXXKs.js"),[]),"catppuccin-frappe":()=>k(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]),"catppuccin-latte":()=>k(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]),"catppuccin-macchiato":()=>k(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]),"catppuccin-mocha":()=>k(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]),"dark-plus":()=>k(()=>import("./dark-plus-C3mMm8J8.js"),[]),dracula:()=>k(()=>import("./dracula-BzJJZx-M.js"),[]),"dracula-soft":()=>k(()=>import("./dracula-soft-BXkSAIEj.js"),[]),"everforest-dark":()=>k(()=>import("./everforest-dark-BgDCqdQA.js"),[]),"everforest-light":()=>k(()=>import("./everforest-light-C8M2exoo.js"),[]),"github-dark":()=>k(()=>import("./github-dark-DHJKELXO.js"),[]),"github-dark-default":()=>k(()=>import("./github-dark-default-Cuk6v7N8.js"),[]),"github-dark-dimmed":()=>k(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]),"github-dark-high-contrast":()=>k(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]),"github-light":()=>k(()=>import("./github-light-DAi9KRSo.js"),[]),"github-light-default":()=>k(()=>import("./github-light-default-D7oLnXFd.js"),[]),"github-light-high-contrast":()=>k(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]),"gruvbox-dark-hard":()=>k(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]),"gruvbox-dark-medium":()=>k(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]),"gruvbox-dark-soft":()=>k(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]),"gruvbox-light-hard":()=>k(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]),"gruvbox-light-medium":()=>k(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]),"gruvbox-light-soft":()=>k(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]),horizon:()=>k(()=>import("./horizon-BUw7H-hv.js"),[]),"horizon-bright":()=>k(()=>import("./horizon-bright-CUuTKBJd.js"),[]),houston:()=>k(()=>import("./houston-DnULxvSX.js"),[]),"kanagawa-dragon":()=>k(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]),"kanagawa-lotus":()=>k(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]),"kanagawa-wave":()=>k(()=>import("./kanagawa-wave-DWedfzmr.js"),[]),laserwave:()=>k(()=>import("./laserwave-DUszq2jm.js"),[]),"light-plus":()=>k(()=>import("./light-plus-B7mTdjB0.js"),[]),"material-theme":()=>k(()=>import("./material-theme-D5KoaKCx.js"),[]),"material-theme-darker":()=>k(()=>import("./material-theme-darker-BfHTSMKl.js"),[]),"material-theme-lighter":()=>k(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]),"material-theme-ocean":()=>k(()=>import("./material-theme-ocean-CyktbL80.js"),[]),"material-theme-palenight":()=>k(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]),"min-dark":()=>k(()=>import("./min-dark-CafNBF8u.js"),[]),"min-light":()=>k(()=>import("./min-light-CTRr51gU.js"),[]),monokai:()=>k(()=>import("./monokai-D4h5O-jR.js"),[]),"night-owl":()=>k(()=>import("./night-owl-C39BiMTA.js"),[]),"night-owl-light":()=>k(()=>import("./night-owl-light-CMTm3GFP.js"),[]),nord:()=>k(()=>import("./nord-Ddv68eIx.js"),[]),"one-dark-pro":()=>k(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]),"one-light":()=>k(()=>import("./one-light-C3Wv6jpd.js"),[]),plastic:()=>k(()=>import("./plastic-3e1v2bzS.js"),[]),poimandres:()=>k(()=>import("./poimandres-CS3Unz2-.js"),[]),red:()=>k(()=>import("./red-bN70gL4F.js"),[]),"rose-pine":()=>k(()=>import("./rose-pine-qdsjHGoJ.js"),[]),"rose-pine-dawn":()=>k(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]),"rose-pine-moon":()=>k(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]),"slack-dark":()=>k(()=>import("./slack-dark-BthQWCQV.js"),[]),"slack-ochin":()=>k(()=>import("./slack-ochin-DqwNpetd.js"),[]),"snazzy-light":()=>k(()=>import("./snazzy-light-Bw305WKR.js"),[]),"solarized-dark":()=>k(()=>import("./solarized-dark-DXbdFlpD.js"),[]),"solarized-light":()=>k(()=>import("./solarized-light-L9t79GZl.js"),[]),"synthwave-84":()=>k(()=>import("./synthwave-84-CbfX1IO0.js"),[]),"tokyo-night":()=>k(()=>import("./tokyo-night-hegEt444.js"),[]),vesper:()=>k(()=>import("./vesper-DRje8inN.js"),[]),"vitesse-black":()=>k(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),"vitesse-dark":()=>k(()=>import("./vitesse-dark-D0r3Knsf.js"),[]),"vitesse-light":()=>k(()=>import("./vitesse-light-CVO1_9PV.js"),[])};function Hn(e){return hn({name:e,collection:No,colorScheme:Uo(e),load:Vo[e]})}const Gi=Ye({themes:Object.freeze([...Wi.map(e=>Hn(e)),...Fo.map(e=>Hn(e))])});Ye({themes:[$i,Gi]});function ji(e){if(Oi())throw new Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(X.hasRegisteredTheme(e))return;const t=Gi.getTheme(e);if(t!=null){X.registerThemeIfAbsent(t.name,t.load);return}throw new Error(`No valid theme loader registered for "${e}"`)}function qi(e,t){if(t.name!==e)throw new Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function Bo(e){ji(e);const t=await X.resolveTheme(e);return qi(e,t),t}function $o(e){return X.getResolvedTheme(e)??Bo(e)}let $;async function xt({themes:e,langs:t,preferredHighlighter:n="shiki-js"}){$??=Nr({themes:[],langs:["text"],engine:n==="shiki-wasm"?Fr(k(()=>import("./wasm-CG6Dc4jp.js"),[])):zr()});const i=Wo($)?await $:$;$=i;const r=[];for(const s of t){if(s==="text"||s==="ansi")continue;const l=Fi(s);"then"in l?r.push(l):Rn(l,i)}const o=[];for(const s of e){const l=$o(s);"then"in l?o.push(l):An(l,$)}return(r.length>0||o.length>0)&&await Promise.all([Promise.all(r).then(s=>{Rn(s,i)}),Promise.all(o).then(s=>{An(s,i)})]),i}function ql(e=$){return e!=null&&!("then"in e)}function Ki(){if($!=null&&!("then"in $))return $}function Wo(e=$){return e!=null&&"then"in e}function Kl(e=$){return e==null}async function Yl(e){await xt(e)}async function Xl(){$!=null&&((await $).dispose(),So(),To(),$=void 0)}for(const e of $i.getThemes())X.registerThemeIfAbsent(e.name,e.load);function cn(e=_){const t=[];return typeof e=="string"?t.push(e):(t.push(e.dark),t.push(e.light)),t}function Ge(e){for(const t of cn(e))if(!vt.has(t))return!1;return!0}function Go(e){return X.hasResolvedThemes(e)}function Oe(e,t){return De(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function ae(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Lt(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function qt(e){return A({tagName:"div",children:[A({tagName:"div",children:e.annotations?.map(t=>A({tagName:"slot",properties:{name:t}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function jo(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function Yi({fileOrDiff:e,mode:t,stickyHeader:n}){const i="type"in e?e:void 0,r={"data-diffs-header":t,"data-change-type":i?.type,"data-sticky":n?"":void 0};return A({tagName:"div",children:[t==="custom"?A({tagName:"slot",properties:{name:an}}):qo({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:i?.type??"file"}),...t==="custom"?[]:[Ko(i)]],properties:r})}function qo({name:e,prevName:t,iconType:n}){const i=[A({tagName:"slot",properties:{name:on}}),pt({name:jo(n),properties:{"data-change-icon":n}})];return t!=null&&(i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(t)]})],properties:{"data-prev-name":""}})),i.push(pt({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),i.push(A({tagName:"div",children:[A({tagName:"bdi",children:[W(e)]})],properties:{"data-title":""}})),A({tagName:"div",children:i,properties:{"data-header-content":""}})}function Ko(e){const t=[];if(e!=null){let n=0,i=0;for(const r of e.hunks)n+=r.additionLines,i+=r.deletionLines;(i>0||n===0)&&t.push(A({tagName:"span",children:[W(`-${i}`)],properties:{"data-deletions-count":""}})),(n>0||i===0)&&t.push(A({tagName:"span",children:[W(`+${n}`)],properties:{"data-additions-count":""}}))}return t.push(A({tagName:"slot",properties:{name:sn}})),A({tagName:"div",children:t,properties:{"data-metadata":""}})}function Xi(e){return A({tagName:"pre",properties:Yo(e)})}function Yo({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:o,type:s,customProperties:l}){return{...l,"data-diff":s==="diff"?"":void 0,"data-file":s==="file"?"":void 0,"data-diff-type":s==="diff"?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":e==="bars"||e==="classic"?e:void 0,style:`--diffs-min-number-column-width-default:${`${o}`.length}ch;`}}const Z=new Map;let bt=0;const Ne={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Q(e){if(Z.has(e))return Z.get(e)??"text";if(Ne[e]!=null)return Ne[e];const t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Z.has(t[1]))return Z.get(t[1])??"text";if(Ne[t[1]]!=null)return Ne[t[1]]??"text"}const n=e.match(/\.([^.]+)$/)?.[1]??"";return Z.has(n)?Z.get(n)??"text":Ne[n]??"text"}function Ql(e,t){if(e<=bt)return!1;Z.clear();for(const n in t){const i=t[n];i!=null&&Z.set(n,i)}return bt=e,!0}function Jl(){return bt}function Xo(e,t){const n=Z.get(e);return n===t?!1:(n!=null&&console.warn(`setCustomExtension: overriding custom mapping for "${e}" from "${n}" to "${t}"`),Z.set(e,t),bt++,!0)}function Zl(){return Object.fromEntries(Z)}function un(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:cn(t),preferredHighlighter:n}}function ge(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}function xe(e){return e.replace(/\n$|\r\n$/,"")}function Qo(e,t,n){const i=typeof n.lineInfo=="function"?n.lineInfo(t):n.lineInfo[t-1];if(i==null){const r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),new Error(r)}return e.tagName="div",e.properties["data-line"]=i.lineNumber,e.properties["data-alt-line"]=i.altLineNumber,e.properties["data-line-type"]=i.type,e.properties["data-line-index"]=i.lineIndex,e.children.length===0&&e.children.push(W(` `)),e}const tt=Symbol("no-token"),Rt=Symbol("multiple-tokens");function Qi(e){const t=Jo(e);if(t!=null)return t;let n=tt;const i=[];let r=[],o;const s=()=>{if(r.length===0||o==null){r=[],o=void 0;return}if(r.length===1){const a=r[0];if(a?.type==="element"){Zo(a,o);for(const d of a.children)ft(d)}else ft(a);i.push(a),r=[],o=void 0;return}for(const a of r)ft(a);i.push(A({tagName:"span",properties:{"data-char":o},children:r})),r=[],o=void 0},l=a=>{if(a!==tt){if(a===Rt){n=Rt;return}if(n===tt){n=a;return}n!==a&&(n=Rt)}};for(const a of e.children){const d=a.type==="element"?Qi(a):tt;if(l(d),typeof d!="number"){s(),i.push(a);continue}o!=null&&o!==d&&s(),o??=d,r.push(a)}return s(),e.children=i,n}function Jo(e){const t=e.properties["data-char"];if(typeof t=="number")return t}function ft(e){if(e.type==="element"){e.properties["data-char"]=void 0;for(const t of e.children)ft(t)}}function Zo(e,t){e.properties["data-char"]=t}function es(e={}){const{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:i=l=>l}=e,r=new Map;function o(l){return Object.entries(l).map(([a,d])=>`${a}:${d}`).join(";")}function s(l){let a=t+ts(typeof l=="string"?l:o(l))+n;return a=i(a),r.has(a)||r.set(a,typeof l=="string"?l:{...l}),a}return{name:"@shikijs/transformers:style-to-class",pre(l){if(!l.properties.style)return;const a=s(l.properties.style);delete l.properties.style,this.addClassToHast(l,a)},tokens(l){for(const a of l)for(const d of a){if(!d.htmlStyle)continue;const h=s(d.htmlStyle);d.htmlStyle={},d.htmlAttrs||={},d.htmlAttrs.class?d.htmlAttrs.class+=` ${h}`:d.htmlAttrs.class=h}},getClassRegistry(){return r},getCSS(){let l="";for(const[a,d]of r.entries())l+=`.${a}{${typeof d=="string"?d:o(d)}}`;return l},clearRegistry(){r.clear()}}}function ts(e,t=0){let n=3735928559^t,i=1103547991^t;for(let r=0,o;r<e.length;r++)o=e.charCodeAt(r),n=Math.imul(n^o,2654435761),i=Math.imul(i^o,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507),i^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&i)+(n>>>0)).toString(36).slice(0,6)}function Ji(e=!1,t=!1){const n={lineInfo:[]},i=[{line(r){return delete r.properties.class,r},pre(r){const o=oo(r),s=[];if(o!=null){let l=1;for(const a of o.children)a.type==="element"&&(e&&Qi(a),s.push(Qo(a,l,n)),l++);o.children=s}return r},...e?{tokens(r){for(const o of r){let s=0;for(const l of o){const a=l;a.__lineChar??=s,s+=l.content.length}}},preprocess(r,o){o.mergeWhitespaces="never"},span(r,o,s,l,a){if(a?.offset!=null&&a.content!=null){const d=a.__lineChar;return d!=null&&(r.properties["data-char"]=d),r}return r}}:null}];return t&&i.push(ns,Mn),{state:n,transformers:i,toClass:Mn}}const Mn=es({classPrefix:"hl-"}),ns={name:"token-style-normalizer",tokens(e){for(const t of e)for(const n of t){if(n.htmlStyle!=null)continue;const i={};n.color!=null&&(i.color=n.color),n.bgColor!=null&&(i["background-color"]=n.bgColor),n.fontStyle!=null&&n.fontStyle!==0&&((n.fontStyle&1)!==0&&(i["font-style"]="italic"),(n.fontStyle&2)!==0&&(i["font-weight"]="bold"),(n.fontStyle&4)!==0&&(i["text-decoration"]="underline")),Object.keys(i).length>0&&(n.htmlStyle=i)}}};function B(e){return`--${e==="token"?"diffs-token":"diffs"}-`}const is=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,rs=/^0(?:\.0+)?%?$/;function os(e){const t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;const n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;const i=e.slice(t+1,-1).trim();if(i.length===0)return;const r=i.lastIndexOf("/");if(r!==-1)return i.slice(r+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){const o=i.split(",");if(o.length===4)return o[3]?.trim()}}function ss(e){const t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;const n=t[1];let i,r=1;return n.length===3?i=n.split("").map(o=>o+o).join(""):n.length===6?i=n:(i=n.slice(0,6),r=parseInt(n.slice(6,8),16)/255),[parseInt(i.slice(0,2),16),parseInt(i.slice(2,4),16),parseInt(i.slice(4,6),16),r]}function At(e){if(e==null)return null;const t=ss(e);if(t==null)return null;const n=t[0]/255,i=t[1]/255,r=t[2]/255,o=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4;return .2126*o(n)+.7152*o(i)+.0722*o(r)}function Dn(e){if(e==null)return!1;const t=e.trim().toLowerCase();if(t==="transparent"||is.test(t))return!0;const n=os(t);return n!=null&&rs.test(n)}function as(e,t,n){if(t==null||n==null)return!1;const i=At(e),r=At(t),o=At(n);return i==null||r==null||o==null?!1:Math.abs(i-o)<Math.abs(i-r)}const Pn=new WeakMap;function Ht(e){const t=Pn.get(e);if(t!=null)return t;const n=e.colors??{},i={...n},r=n["editor.background"]??e.bg,o=n["editor.foreground"]??e.fg,s=n["sideBar.background"]??r,l=n["sideBar.foreground"]??o;ie(i,"editor.background",r),ie(i,"editor.foreground",o),ie(i,"sideBar.background",s),ie(i,"sideBar.foreground",l),ie(i,"input.background",n["input.background"]??s),ie(i,"sideBarSectionHeader.foreground",n["sideBarSectionHeader.foreground"]??l),ie(i,"list.activeSelectionForeground",n["list.activeSelectionForeground"]??l),ie(i,"gitDecoration.addedResourceForeground",Mt(n["gitDecoration.addedResourceForeground"],n["terminal.ansiGreen"],n["editorGutter.addedBackground"])),ie(i,"gitDecoration.modifiedResourceForeground",Mt(n["gitDecoration.modifiedResourceForeground"],n["terminal.ansiBlue"],n["editorGutter.modifiedBackground"])),ie(i,"gitDecoration.deletedResourceForeground",Mt(n["gitDecoration.deletedResourceForeground"],n["terminal.ansiRed"],n["editorGutter.deletedBackground"]));const a=(Dn(n["list.focusOutline"])?void 0:n["list.focusOutline"])??(Dn(n.focusBorder)?void 0:n.focusBorder);a!=null?i["list.focusOutline"]=a:delete i["list.focusOutline"];const d=n["list.hoverBackground"];d!=null&&(ls(d,s)||as(d,s,l))&&delete i["list.hoverBackground"];const h=Object.freeze({...e,colors:Object.freeze(i)});return Pn.set(e,h),h}function ie(e,t,n){n!=null&&n!==""&&(e[t]=n)}function Mt(...e){for(const t of e)if(t!=null&&t!=="")return t}function ls(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function fn({theme:e=_,highlighter:t,prefix:n}){let i="";if(typeof e=="string"){const r=t.getTheme(e),o=Ht(r);i+=`color:${o.fg};`,i+=`background-color:${o.bg};`,i+=`${B("global")}fg:${o.fg};`,i+=`${B("global")}bg:${o.bg};`,i+=Dt(r,n)}else{let r=t.getTheme(e.dark),o=Ht(r);i+=`${B("global")}dark:${o.fg};`,i+=`${B("global")}dark-bg:${o.bg};`,i+=Dt(r,"dark"),r=t.getTheme(e.light),o=Ht(r),i+=`${B("global")}light:${o.fg};`,i+=`${B("global")}light-bg:${o.bg};`,i+=Dt(r,"light")}return i}function Dt(e,t){t=t!=null?`${t}-`:"";let n="";const i=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];i!=null&&(n+=`${B("global")}${t}addition-color:${i};`);const r=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];r!=null&&(n+=`${B("global")}${t}deletion-color:${r};`);const o=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return o!=null&&(n+=`${B("global")}${t}modified-color:${o};`),n}function Kt(e){let t=e.children[0];for(;t!=null;){if(t.type==="element"&&t.tagName==="code")return t.children;"children"in t?t=t.children[0]:t=null}throw console.error(e),new Error("getLineNodes: Unable to find children")}function Ct({lines:e,startingLine:t=0,totalLines:n=1/0,callback:i}){const r=Math.min(t+n,e.length),o=(()=>{const s=e.at(-1);return s===""||s===` `||s===`\r `||s==="\r"?Math.max(0,e.length-2):e.length-1})();for(let s=t;s<r;s++){const l=s===o;if(i({lineIndex:s,lineNumber:s+1,content:e[s],isLastLine:l})===!0||l)break}}function St(e){return e!==""?e.split(jr):[]}const ds={forcePlainText:!1};function hs(e,t,{theme:n=_,tokenizeMaxLineLength:i,useTokenTransformer:r},{forcePlainText:o,startingLine:s,totalLines:l,lines:a}=ds){o?(s??=0,l??=1/0):(s=0,l=1/0);const d=s>0||l<1/0,{state:h,transformers:c}=Ji(r),u=o?"text":e.lang??Q(e.name),f=typeof n=="string"?t.getTheme(n).type:void 0,g=fn({theme:n,highlighter:t});h.lineInfo=p=>({type:"context",lineIndex:p-1+s,lineNumber:p+s});const b=typeof n=="string"?{lang:u,theme:n,transformers:c,defaultColor:!1,cssVariablePrefix:B("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0}:{lang:u,themes:n,transformers:c,defaultColor:!1,cssVariablePrefix:B("token"),tokenizeMaxLineLength:i,tokenizeTimeLimit:0},y=Kt(t.codeToHast(d?cs(a??St(e.contents),s,l):xe(e.contents),b)),m=d?new Array(s):y;return d&&m.push(...y),{code:m,themeStyles:g,baseThemeType:f}}function cs(e,t,n){let i="";return Ct({lines:e,startingLine:t,totalLines:n,callback({content:r}){i+=r}}),i}const Zi="-1,-1";function Yt(e){return e?.some(t=>t.lineNumber===0)??!1}function Xt(e){const t=e[0];return t!=null&&t.length>0?t:void 0}function kt(e){return e.startingLine===0&&e.totalLines>0}function er(e,t){return A({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: span ${t}`}})}function Qt(e){return(e.lang??Q(e.name))==="text"}function tr(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}let us=-1;var fs=class{options;onRenderUpdate;workerManager;__id=`file-renderer:${++us}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;constructor(e={theme:_},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=Ge(e.theme??_)?Ki():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(const t of e){const n=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=n,n.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0}clearRenderCache(){this.renderCache=void 0}hydrate(e){const{options:t}=this.getRenderOptions(e),n=Pt(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());let i=this.workerManager?.getFileResultCache(e);i!=null&&!Oe(t,i.options)&&(i=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!Qt(e),result:n?void 0:i?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter==null&&(this.computedLang=e.lang??Q(e.name),this.initializeHighlighter())}getRenderOptions(e){const t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();const{theme:i=_,tokenizeMaxLineLength:r=1e3}=this.options;return{theme:i,useTokenTransformer:tr(this.options),tokenizeMaxLineLength:r}})(),{renderCache:n}=this;return n?.result==null?{options:t,forceHighlight:!0}:!ae(e,n.file)||!Oe(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){if(e.cacheKey==null)return this.lineCache=void 0,St(e.contents);let{lineCache:t}=this;return(t==null||t.cacheKey!==e.cacheKey)&&(t={cacheKey:e.cacheKey,lines:St(e.contents)}),this.lineCache=t,t.lines}renderFile(e=this.renderCache?.file,t=Ae){if(e==null)return;let{options:n,forceHighlight:i}=this.getRenderOptions(e);const r=this.getMatchingWorkerResultCache(e,n);r!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...r},i=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};const o=this.getOrCreateLineCache(e),s=e.contents.length>0,l=!s||Qt(e)||Pt(o.length,this.getTokenizeMaxLength()),a=!ae(e,this.renderCache.file),d=!Lt(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(l||this.renderCache.result==null||!this.renderCache.highlighted&&(a||d))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||a||d||i)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,o)),this.renderCache.renderRange=t),!l&&s&&(!this.renderCache.highlighted||i)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??Q(e.name);const h=this.highlighter!=null&&Ge(n.theme),c=this.highlighter!=null&&mt(this.computedLang),u=!l&&c;if(this.highlighter!=null&&h&&(i||l||!this.renderCache.highlighted&&u||this.renderCache.result==null)){const{result:f,options:g}=this.renderFileWithHighlighter(e,this.highlighter,l||!c);this.renderCache={file:e,options:g,highlighted:u,result:f,renderRange:void 0}}(!h||!l&&!c)&&this.asyncHighlight(e).then(({result:f,options:g})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,f,g,!l)})}return this.renderCache.result!=null?this.processFileResult(this.renderCache.file,t,this.renderCache.result):void 0}async asyncRender(e,t=Ae){const{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){const t=Pt(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?"text":e.lang??Q(e.name);const n=this.highlighter!=null&&Go(cn(this.options.theme)),i=t||this.highlighter!=null&&mt(this.computedLang);return(this.highlighter==null||!n||!i)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){const{options:i}=this.getRenderOptions(e);return{result:hs(e,t,i,{forcePlainText:n}),options:i}}processFileResult(e,t,{code:n,themeStyles:i,baseThemeType:r}){const{disableFileHeader:o=!1}=this.options,s=[],l=Ee(),a=this.getOrCreateLineCache(e);let d=0;const h=kt(t)?Xt(this.lineAnnotations):void 0;return h!=null&&(l.children.push(j("context","annotation",1)),s.push(qt({hunkIndex:-1,lineIndex:-1,annotations:h.map(c=>ge(c))})),d++),Ct({lines:a,startingLine:t.startingLine,totalLines:t.totalLines,callback:({lineIndex:c,lineNumber:u})=>{const f=n[c];if(f==null){const g="FileRenderer.processFileResult: Line doesnt exist";throw console.error(g,{name:e.name,lineIndex:c,lineNumber:u,lines:a}),new Error(g)}if(f!=null){l.children.push(Di("context",u,`${c}`)),s.push(f),d++;const g=this.lineAnnotations[u];g!=null&&(l.children.push(j("context","annotation",1)),s.push(qt({hunkIndex:0,lineIndex:u,annotations:g.map(b=>ge(b))})),d++)}}}),l.properties.style=`grid-row: span ${d}`,{gutterAST:l.children??[],contentAST:s,preAST:this.createPreElement(a.length),headerAST:o?void 0:this.renderHeader(e),totalLines:a.length,rowCount:d,themeStyles:i,baseThemeType:r,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){const{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return Yi({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return pe(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(A({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){const t=Ee();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,er(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return t?pe(A({tagName:"code",children:e,properties:{"data-code":""}})):pe(e)}async initializeHighlighter(){return this.highlighter=await xt(un(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,n,i=!0){if(this.renderCache==null)return;const r=!ae(e,this.renderCache.file)||!this.renderCache.highlighted||!Oe(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:i,result:t,renderRange:void 0},r&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){const n=this.workerManager?.getFileResultCache(e);if(!(n==null||!Oe(t,n.options)))return n}hasHighlightedRenderCache(e,t){const{renderCache:n}=this;return n?.result!=null&&n.highlighted&&ae(e,n.file)&&Oe(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){const{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return Xi({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function Pt(e,t){return e>t}const nr=`<svg data-icon-sprite aria-hidden="true" width="0" height="0"> diff --git a/apps/kimi-code/dist-web/assets/index-C_ObXpF5.css b/apps/kimi-code/dist-web/assets/index-C_ObXpF5.css deleted file mode 100644 index bd137eadf..000000000 --- a/apps/kimi-code/dist-web/assets/index-C_ObXpF5.css +++ /dev/null @@ -1 +0,0 @@ -.ui-tip__bubble[data-v-93bacf6d]{position:fixed;z-index:var(--z-tooltip);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tip-lines);max-width:280px;padding:4px 8px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:1.35;overflow:hidden;overflow-wrap:anywhere;pointer-events:none;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.ui-tip__bubble.positioned[data-v-93bacf6d]{opacity:1}.ui-icon-button[data-v-2cbeca98]{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.ui-icon-button[data-v-2cbeca98]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text)}.ui-icon-button[data-v-2cbeca98]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-icon-button[data-v-2cbeca98]:disabled{opacity:.5;cursor:not-allowed}.ui-icon-button--sm[data-v-2cbeca98]{width:var(--icon-button-sm);height:var(--icon-button-sm);border-radius:var(--radius-sm)}.ui-icon-button--md[data-v-2cbeca98]{width:32px;height:32px}.ui-icon-button--lg[data-v-2cbeca98]{width:44px;height:44px}.ui-icon-button[data-v-2cbeca98] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--sm[data-v-2cbeca98] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--lg[data-v-2cbeca98] svg{width:var(--p-ic-lg);height:var(--p-ic-lg)}.ui-action-toast-host[data-v-e6936dfd]{position:fixed;top:calc(48px + var(--space-2));left:50%;translate:-50% 0;z-index:var(--z-toast);max-width:calc(100vw - 32px)}.ui-action-toast[data-v-e6936dfd]{display:flex;align-items:center;gap:var(--space-2);padding:4px 6px 4px 14px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.45;color:var(--color-text);white-space:nowrap}.ui-action-toast__body[data-v-e6936dfd]{min-width:0}.ui-action-toast__body button[data-v-e6936dfd-s]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit}.ui-action-toast__body button[data-v-e6936dfd-s]:hover{color:var(--color-accent-hover);text-decoration:underline}.ui-action-toast__body button[data-v-e6936dfd-s]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--radius-xs)}.ui-action-toast__close[data-v-e6936dfd]{flex:none}.ui-badge[data-v-d879fe18]{display:inline-flex;align-items:center;gap:6px;border-radius:var(--radius-full);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;border:.5px solid transparent}.ui-badge--md[data-v-d879fe18]{height:22px;padding:0 9px;font-size:var(--text-xs)}.ui-badge--sm[data-v-d879fe18]{height:18px;padding:0 7px;font-size:11px}.ui-badge__dot[data-v-d879fe18]{width:6px;height:6px;border-radius:var(--radius-full);background:currentColor;flex:none}.ui-badge--neutral[data-v-d879fe18]{background:var(--color-surface-sunken);color:var(--color-text-muted);border-color:var(--color-line)}.ui-badge--info[data-v-d879fe18]{background:var(--color-accent-soft);color:var(--color-accent-hover);border-color:var(--color-accent-bd)}.ui-badge--success[data-v-d879fe18]{background:var(--color-success-soft);color:var(--color-success);border-color:var(--color-success-bd)}.ui-badge--warning[data-v-d879fe18]{background:var(--color-warning-soft);color:var(--color-warning);border-color:var(--color-warning-bd)}.ui-badge--danger[data-v-d879fe18]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-badge--solid[data-v-d879fe18]{background:var(--color-text);color:var(--color-bg)}.ui-banner[data-v-6d739c6d]{display:flex;align-items:center;gap:10px;padding:10px 14px;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal)}.ui-banner__icon[data-v-6d739c6d]{display:inline-flex;flex:none}.ui-banner__icon svg[data-v-6d739c6d]{width:18px;height:18px}.ui-banner--info[data-v-6d739c6d]{background:var(--color-accent-soft);border-color:var(--color-accent-bd)}.ui-banner--warning[data-v-6d739c6d]{background:var(--color-warning-soft);border-color:var(--color-warning-bd)}.ui-banner--danger[data-v-6d739c6d]{background:var(--color-danger-soft);border-color:var(--color-danger-bd)}.ui-banner--info .ui-banner__icon[data-v-6d739c6d]{color:var(--color-accent)}.ui-banner--warning .ui-banner__icon[data-v-6d739c6d]{color:var(--color-warning)}.ui-banner--danger .ui-banner__icon[data-v-6d739c6d]{color:var(--color-danger)}.ui-spinner[data-v-476ed1b4]{display:inline-flex;flex:none;color:var(--color-accent)}.ui-spinner--xs[data-v-476ed1b4]{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-spinner--xs .ui-spinner__track[data-v-476ed1b4],.ui-spinner--xs .ui-spinner__arc[data-v-476ed1b4]{r:10.875px;stroke-width:calc(var(--p-ring-stroke) * 1.5)}.ui-spinner--xs .ui-spinner__arc[data-v-476ed1b4]{stroke-dasharray:67.7 67.7;stroke-dashoffset:45.9}.ui-spinner--sm[data-v-476ed1b4]{width:14px;height:14px}.ui-spinner--md[data-v-476ed1b4]{width:18px;height:18px}.ui-spinner--lg[data-v-476ed1b4]{width:28px;height:28px}.ui-spinner__svg[data-v-476ed1b4]{width:100%;height:100%}.ui-spinner__track[data-v-476ed1b4]{fill:none;stroke:var(--color-line);stroke-width:2.2}.ui-spinner__arc[data-v-476ed1b4]{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-dasharray:56 56;stroke-dashoffset:38}.ui-button[data-v-01b5ec22]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);border:.5px solid transparent;border-radius:var(--radius-md);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;cursor:pointer;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.ui-button[data-v-01b5ec22]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ui-button[data-v-01b5ec22]:not(:disabled):active{transform:scale(.98)}.ui-button[data-v-01b5ec22]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.ui-button--sm[data-v-01b5ec22]{height:30px;padding:0 var(--space-3);font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-button--md[data-v-01b5ec22]{height:36px;padding:0 var(--space-4);font-size:var(--text-base)}.ui-button--lg[data-v-01b5ec22]{height:42px;padding:0 var(--space-5);font-size:15px;border-radius:var(--radius-lg)}.ui-button__content[data-v-01b5ec22]{display:inline-flex;align-items:center;gap:var(--space-2)}.ui-button__content[data-v-01b5ec22] svg{flex:none}.ui-button__content[data-v-01b5ec22] svg:not([width]){width:1em;height:1em}.ui-button--primary[data-v-01b5ec22]{background:var(--color-accent);color:var(--color-text-on-accent);border-color:var(--color-accent);box-shadow:var(--shadow-xs)}.ui-button--primary[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ui-button--secondary[data-v-01b5ec22]{background:var(--color-surface-raised);color:var(--color-text);border-color:var(--color-line-strong);box-shadow:var(--shadow-xs)}.ui-button--secondary[data-v-01b5ec22]:not(:disabled):hover{border-color:var(--color-line-strong);background:var(--color-hover)}.ui-button--ghost[data-v-01b5ec22]{background:transparent;color:var(--color-text-muted);border-color:transparent}.ui-button--ghost[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-hover);color:var(--color-text-strong)}.ui-button--danger[data-v-01b5ec22]{background:var(--color-danger);color:var(--color-text-on-accent);border-color:var(--color-danger);box-shadow:var(--shadow-xs)}.ui-button--danger[data-v-01b5ec22]:not(:disabled):hover{filter:brightness(.96)}.ui-button--danger-soft[data-v-01b5ec22]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-button--danger-soft[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-danger);color:var(--color-text-on-accent);border-color:var(--color-danger)}.ui-button.is-loading .ui-button__content[data-v-01b5ec22]{opacity:.7}.ui-button .ui-button__spinner[data-v-01b5ec22]{flex:none;color:inherit}.ui-button__spinner[data-v-01b5ec22] .ui-spinner__track{opacity:.35}.ui-card[data-v-fbd05138]{background:var(--color-surface);border:.5px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.ui-card.is-elevated[data-v-fbd05138]{box-shadow:var(--shadow-md);border-color:transparent}.ui-card__head[data-v-fbd05138]{display:flex;align-items:center;gap:var(--space-2);padding:10px 14px;border-bottom:.5px solid var(--color-line);background:var(--color-surface);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.ui-card__body[data-v-fbd05138]{padding:14px;color:var(--color-text-muted)}.ui-card__foot[data-v-fbd05138]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding:10px 14px;border-top:.5px solid var(--color-line);background:var(--color-surface)}.ui-check[data-v-d4bf4026]{display:inline-flex;align-items:center;gap:var(--space-2);cursor:pointer}.ui-check.is-disabled[data-v-d4bf4026]{opacity:.5;cursor:not-allowed}.ui-check__input[data-v-d4bf4026]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.ui-check__box[data-v-d4bf4026]{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;flex:none;border:.5px solid var(--color-line-strong);border-radius:var(--radius-sm);background:var(--color-surface-raised);color:var(--color-text-on-accent);transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out)}.ui-check.is-on .ui-check__box[data-v-d4bf4026]{background:var(--color-accent);border-color:var(--color-accent)}.ui-check__input:focus-visible+.ui-check__box[data-v-d4bf4026]{box-shadow:var(--p-focus-ring)}.ui-check__box svg[data-v-d4bf4026]{width:12px;height:12px}.ui-check__label[data-v-d4bf4026]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text)}.ctx-ring[data-v-de787cf2]{width:16px;height:16px;flex:none;transform:rotate(-90deg)}.ctx-ring-track[data-v-de787cf2]{stroke:var(--line)}.ctx-ring-fill[data-v-de787cf2]{stroke:var(--color-accent);transition:stroke-dashoffset .3s ease,stroke .3s ease}.ui-dialog__overlay[data-v-ebbc1a68]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:#0d111747;animation:kimi-dialog-overlay-in-ebbc1a68 var(--duration-base) var(--ease-out)}@keyframes kimi-dialog-overlay-in-ebbc1a68{0%{opacity:0}to{opacity:1}}.ui-dialog[data-v-ebbc1a68]{max-height:calc(100vh - var(--space-8) * 2);display:flex;flex-direction:column;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);outline:none;overflow:hidden;animation:kimi-card-in var(--duration-slow) var(--ease-out)}.ui-dialog--md[data-v-ebbc1a68]{width:min(440px,100%)}.ui-dialog--lg[data-v-ebbc1a68]{width:min(640px,100%)}.ui-dialog--xl[data-v-ebbc1a68]{width:min(var(--p-content-max),100%)}.ui-dialog--fixed-height[data-v-ebbc1a68]{height:min(680px,calc(100vh - var(--space-8) * 2))}.ui-dialog--grouped[data-v-ebbc1a68]{background:var(--color-bg)}.ui-dialog--flush .ui-dialog__body[data-v-ebbc1a68]{padding:0}.ui-dialog__head[data-v-ebbc1a68]{display:flex;align-items:flex-start;gap:var(--space-3);padding:20px 22px 14px}.ui-dialog__titles[data-v-ebbc1a68]{flex:1;min-width:0}.ui-dialog__title[data-v-ebbc1a68]{font-size:var(--text-lg);font-weight:500;color:var(--color-text);line-height:var(--leading-tight)}.ui-dialog__desc[data-v-ebbc1a68]{margin-top:4px;font-size:var(--text-base);color:var(--color-text-muted)}.ui-dialog__close[data-v-ebbc1a68]{flex:none;margin-top:-2px}.ui-dialog__body[data-v-ebbc1a68]{flex:1;min-height:0;padding:4px 22px 18px;color:var(--color-text);overflow:auto}.ui-dialog__foot[data-v-ebbc1a68]{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.ui-empty[data-v-6da80932]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-8) var(--space-4);text-align:center;color:var(--color-text-muted)}.ui-empty__icon[data-v-6da80932]{color:var(--color-text-faint)}.ui-empty__icon[data-v-6da80932] svg{width:48px;height:48px}.ui-empty__title[data-v-6da80932]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-empty__hint[data-v-6da80932]{font-size:var(--text-sm);color:var(--color-text-muted)}.ui-field[data-v-a8de5f7f]{display:flex;flex-direction:column;gap:6px}.ui-field__label[data-v-a8de5f7f]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-field__hint[data-v-a8de5f7f]{font-size:var(--text-xs);color:var(--color-text-faint)}.ui-field__error[data-v-a8de5f7f]{font-size:var(--text-xs);color:var(--color-danger)}.ui-input[data-v-f1cdf732]{width:100%;border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-overlay);box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-input--md[data-v-f1cdf732]{height:38px}.ui-input--sm[data-v-f1cdf732]{height:32px;font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-input[data-v-f1cdf732]::placeholder{color:var(--color-text-faint)}.ui-input[data-v-f1cdf732]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-input[data-v-f1cdf732]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-input[data-v-f1cdf732]:disabled{opacity:.5;cursor:not-allowed}.ui-input[readonly][data-v-f1cdf732]{background:var(--color-surface-sunken)}.ui-input.has-error[data-v-f1cdf732]{border-color:var(--color-danger)}.ui-input.has-error[data-v-f1cdf732]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}.ui-kbd[data-v-04b30ce2]{display:inline-flex;align-items:center;gap:3px;flex:none}.ui-kbd__key[data-v-04b30ce2]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:.5px solid var(--color-line);border-radius:var(--radius-xs);background:transparent;color:inherit;font-family:var(--font-kbd);font-size:11px;line-height:1}.ui-menu[data-v-9be2c64a]{min-width:180px;padding:3.5px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);display:flex;flex-direction:column}.ui-menu-item[data-v-3427559a]{display:flex;align-items:center;gap:7px;width:100%;padding:5px 9px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-option-label);line-height:var(--leading-tight);text-align:left;cursor:pointer;transition:background var(--duration-base),color var(--duration-base)}.ui-menu-item[data-v-3427559a]:hover:not(:disabled):not(.is-active):not(.is-danger){background:var(--color-hover);color:var(--color-text-strong)}.ui-menu-item[data-v-3427559a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-menu-item[data-v-3427559a]:disabled{opacity:.5;cursor:not-allowed}.ui-menu-item.is-active[data-v-3427559a]{background:var(--color-hover);color:var(--color-text)}.ui-menu-item.is-danger[data-v-3427559a]{color:var(--color-danger)}.ui-menu-item.is-danger[data-v-3427559a]:hover:not(:disabled){background:var(--color-danger-soft)}.ui-menu-item[data-v-3427559a] svg{display:block;width:16px;height:16px;flex:none;color:var(--muted);transition:color var(--duration-base)}.ui-menu-item[data-v-3427559a]:hover:not(:disabled):not(.is-active):not(.is-danger) svg{color:var(--color-text-strong)}.ui-menu-item.is-active[data-v-3427559a] svg{color:var(--color-text)}.ui-menu-item.is-danger[data-v-3427559a] svg{color:var(--color-danger)}.ui-menu-item--lg[data-v-3427559a]{min-height:44px;padding:12px 14px;font-size:var(--text-sm)}.ui-menu-sep[data-v-3427559a]{height:1px;margin:4px 0;background:var(--color-line)}.ui-tip[data-v-414bd903]{display:contents}.ui-panel-header[data-v-eb14b05d]{flex:none;display:flex;align-items:center;gap:var(--space-2);height:var(--panel-head-h, 48px);padding:0 var(--panel-head-inset, 11px) 0 var(--space-3);box-sizing:border-box;min-width:0;border-bottom:.5px solid var(--color-line);background:var(--color-surface-deep)}.ui-panel-header__title[data-v-eb14b05d]{flex:none;font:var(--weight-semibold) var(--ui-b2) var(--font-ui);color:var(--color-text)}.ui-panel-header__sub[data-v-eb14b05d]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--ui-c1) var(--font-mono);color:var(--color-text-muted)}.ui-panel-header__close[data-v-eb14b05d]{flex:none;margin-left:auto}.ui-panel-header.wrap[data-v-eb14b05d]{flex-wrap:wrap;height:auto;min-height:var(--panel-head-h, 48px);padding-top:3px;padding-bottom:3px;gap:4px 6px}.ui-panel-header.wrap .ui-panel-header__close[data-v-eb14b05d]{margin-left:0}.ui-pill[data-v-fe6a2873]{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:default;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}button.ui-pill[data-v-fe6a2873]{cursor:pointer}button.ui-pill[data-v-fe6a2873]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text-strong)}button.ui-pill[data-v-fe6a2873]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}button.ui-pill[data-v-fe6a2873]:disabled{opacity:.5;cursor:not-allowed}.ui-pill.is-active[data-v-fe6a2873]{background:var(--color-accent-soft);color:var(--color-accent)}.ui-pill[data-v-fe6a2873] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);flex:none;color:var(--color-text-faint)}.ui-scroll-area[data-v-9c504ebc]{position:relative;min-width:0;min-height:0;overflow:hidden}.ui-scroll-area__viewport[data-v-9c504ebc]{width:100%;height:100%;overscroll-behavior:contain;scrollbar-width:none}.ui-scroll-area__viewport[data-v-9c504ebc]::-webkit-scrollbar{display:none}.ui-scroll-area__viewport[data-v-9c504ebc]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ui-scroll-area__bar[data-v-9c504ebc]{position:absolute;z-index:3;opacity:0;pointer-events:none;touch-action:none;transition:opacity var(--duration-base) var(--ease-out)}.ui-scroll-area__bar.is-visible[data-v-9c504ebc]{opacity:1;pointer-events:auto}.ui-scroll-area__bar--vertical[data-v-9c504ebc]{inset:2px 2px 2px auto;width:10px}.ui-scroll-area__bar--horizontal[data-v-9c504ebc]{inset:auto 2px 2px;height:10px}.ui-scroll-area__thumb[data-v-9c504ebc]{position:absolute;display:block;border-radius:999px;background:color-mix(in srgb,var(--color-text-muted) 62%,transparent);transition:background var(--duration-fast) var(--ease-out),width var(--duration-fast) var(--ease-out),height var(--duration-fast) var(--ease-out)}.ui-scroll-area__bar--vertical .ui-scroll-area__thumb[data-v-9c504ebc]{right:1px;width:4px}.ui-scroll-area__bar--horizontal .ui-scroll-area__thumb[data-v-9c504ebc]{bottom:1px;height:4px}.ui-scroll-area__bar:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__thumb[data-v-9c504ebc]:active{background:color-mix(in srgb,var(--color-text-muted) 82%,transparent)}.ui-scroll-area__bar--vertical:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__bar--vertical .ui-scroll-area__thumb[data-v-9c504ebc]:active{width:6px}.ui-scroll-area__bar--horizontal:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__bar--horizontal .ui-scroll-area__thumb[data-v-9c504ebc]:active{height:6px}.ui-seg[data-v-b09ef1d1]{position:relative;display:inline-flex;gap:2px;padding:2px;background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md)}.ui-seg__indicator[data-v-b09ef1d1]{position:absolute;top:0;left:0;z-index:0;border-radius:var(--radius-sm);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);opacity:0;pointer-events:none;transition:transform var(--duration-base) var(--ease-out),width var(--duration-base) var(--ease-out),height var(--duration-base) var(--ease-out),opacity var(--duration-fast) var(--ease-out)}.ui-seg__indicator.is-ready[data-v-b09ef1d1]{opacity:1}.ui-seg__item[data-v-b09ef1d1]{position:relative;z-index:1;display:inline-flex;align-items:center;gap:var(--space-1);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-weight:var(--weight-medium);cursor:pointer;line-height:1;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-seg__swatch[data-v-b09ef1d1]{width:7px;height:7px;border:.5px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:50%;flex:none}.ui-seg__icon[data-v-b09ef1d1]{flex:none}.ui-seg--md .ui-seg__item[data-v-b09ef1d1]{padding:5px var(--space-3);font-size:var(--text-sm)}.ui-seg--sm .ui-seg__item[data-v-b09ef1d1]{height:24px;padding:0 var(--space-2);font-size:var(--text-sm)}.ui-seg--xs .ui-seg__item[data-v-b09ef1d1]{height:20px;padding:0 var(--space-2);font-size:var(--text-xs)}.ui-seg__item[data-v-b09ef1d1]:hover:not(.is-on){color:var(--color-text)}.ui-seg__item.is-on[data-v-b09ef1d1]{color:var(--color-text)}.ui-seg__item[data-v-b09ef1d1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-select[data-v-63f5dcbc]{position:relative;width:100%;font-family:var(--font-ui)}.ui-select.is-open[data-v-63f5dcbc]{z-index:var(--z-dropdown)}.ui-select__trigger[data-v-63f5dcbc]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:100%;padding:0 var(--space-3);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out)}.ui-select--md[data-v-63f5dcbc]{height:38px}.ui-select--sm[data-v-63f5dcbc]{height:32px}.ui-select--sm .ui-select__trigger[data-v-63f5dcbc]{font-size:var(--text-sm)}.ui-select__trigger[data-v-63f5dcbc]:hover:not(:disabled){border-color:var(--color-line-strong)}.ui-select__trigger[data-v-63f5dcbc]:focus-visible,.ui-select.is-open .ui-select__trigger[data-v-63f5dcbc]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-select.has-error .ui-select__trigger[data-v-63f5dcbc]{border-color:var(--color-danger)}.ui-select.has-error .ui-select__trigger[data-v-63f5dcbc]:focus-visible{box-shadow:0 0 0 3px var(--color-danger-soft)}.ui-select__value[data-v-63f5dcbc]{min-width:0;flex:1;display:flex;align-items:center;gap:var(--space-2);overflow:hidden;white-space:nowrap}.ui-select__value-text[data-v-63f5dcbc]{min-width:0;overflow:hidden;text-overflow:ellipsis}.ui-select__value.is-placeholder[data-v-63f5dcbc]{color:var(--color-text-faint)}.ui-select__icon[data-v-63f5dcbc]{flex:none;width:14px;height:14px;border-radius:3px}.ui-select__icon--option[data-v-63f5dcbc]{width:16px;height:16px;border-radius:4px}.ui-select__chevron[data-v-63f5dcbc]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-base) var(--ease-out)}.ui-select.is-open .ui-select__chevron[data-v-63f5dcbc]{transform:rotate(180deg)}.ui-select.is-disabled[data-v-63f5dcbc]{opacity:.5}.ui-select.is-disabled .ui-select__trigger[data-v-63f5dcbc]{cursor:not-allowed}.ui-select__menu[data-v-63f5dcbc]{position:absolute;z-index:var(--z-dropdown);top:calc(100% + var(--space-1));left:0;width:100%;max-height:260px;overflow-y:auto;padding:var(--space-1);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.ui-select__group[data-v-63f5dcbc]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ui-select__option[data-v-63f5dcbc]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.ui-select__option.is-active[data-v-63f5dcbc]{background:var(--color-hover);color:var(--color-text-strong)}.ui-select__option[data-v-63f5dcbc]:disabled{opacity:.45;cursor:not-allowed}.ui-select__check[data-v-63f5dcbc]{flex:none;color:transparent}.ui-select__option.is-selected .ui-select__check[data-v-63f5dcbc]{color:var(--color-accent)}.kw-dot[data-v-390a778a]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-text-faint);flex:none}.kw-dot--ok[data-v-390a778a]{background:var(--color-success)}.kw-dot--error[data-v-390a778a]{background:var(--color-danger)}.kw-dot--suspended[data-v-390a778a]{background:var(--color-warning)}.kw-dot--running[data-v-390a778a]{background:var(--color-accent);position:relative}.kw-dot--running[data-v-390a778a]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:color-mix(in srgb,var(--color-accent) 40%,transparent);animation:kw-dot-pulse-390a778a 1.4s var(--ease-out) infinite}@keyframes kw-dot-pulse-390a778a{0%{transform:scale(1);opacity:1}to{transform:scale(2.7);opacity:0}}.ui-switch[data-v-2fc56545]{position:relative;width:36px;height:20px;flex:none;padding:0;border:.5px solid var(--color-line-strong);border-radius:var(--radius-full);background:var(--color-line-strong);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ui-switch.is-on[data-v-2fc56545]{background:var(--color-accent)}.ui-switch[data-v-2fc56545]:disabled{opacity:.5;cursor:not-allowed}.ui-switch[data-v-2fc56545]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-switch__thumb[data-v-2fc56545]{position:absolute;top:1.5px;left:1.5px;width:16px;height:16px;border-radius:var(--radius-full);background:var(--color-text-on-accent);box-shadow:var(--shadow-xs);transform-origin:left center;transition:transform var(--duration-base) var(--ease-out)}.ui-switch:not(:disabled):hover .ui-switch__thumb[data-v-2fc56545]{transform:scaleX(1.125)}.ui-switch.is-on .ui-switch__thumb[data-v-2fc56545]{transform:translate(16px);transform-origin:right center}.ui-switch.is-on:not(:disabled):hover .ui-switch__thumb[data-v-2fc56545]{transform:translate(16px) scaleX(1.125)}.ui-toast[data-v-62bc76d1]{display:flex;align-items:flex-start;gap:11px;width:360px;max-width:100%;padding:13px 14px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);line-height:1.45}.ui-toast__icon[data-v-62bc76d1]{flex:none;width:20px;height:20px;margin-top:1px;border-radius:var(--radius-full);display:grid;place-items:center;background:var(--color-accent-soft);color:var(--color-accent)}.ui-toast__icon svg[data-v-62bc76d1]{width:12px;height:12px}.ui-toast--success .ui-toast__icon[data-v-62bc76d1]{background:var(--color-success-soft);color:var(--color-success)}.ui-toast--warning .ui-toast__icon[data-v-62bc76d1]{background:var(--color-warning-soft);color:var(--color-warning)}.ui-toast--danger .ui-toast__icon[data-v-62bc76d1]{background:var(--color-danger-soft);color:var(--color-danger)}.ui-toast--danger[data-v-62bc76d1]{border-color:color-mix(in srgb,var(--color-danger) 35%,transparent)}.ui-toast__body[data-v-62bc76d1]{flex:1;min-width:0}.ui-toast__title[data-v-62bc76d1]{font-size:var(--text-base);font-weight:500;color:var(--color-text);overflow-wrap:anywhere}.ui-toast__msg[data-v-62bc76d1]{margin-top:2px;font-size:var(--text-sm);color:var(--color-text-muted);overflow-wrap:anywhere}.ui-toast--danger .ui-toast__msg[data-v-62bc76d1]{color:var(--color-danger)}.ui-toast__close[data-v-62bc76d1]{flex:none;margin:-3px -4px 0 0}.sd-search[data-v-5bf43f78]{position:relative;margin:0 22px;padding-bottom:var(--space-1)}.sd-search[data-v-5bf43f78] .ui-input{padding-right:30px}.search-clear[data-v-5bf43f78]{position:absolute;top:0;bottom:var(--space-1);right:var(--space-2);margin-block:auto;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-hover);color:var(--color-text-faint);cursor:pointer;visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast),background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.search-clear.is-on[data-v-5bf43f78]{visibility:visible;opacity:1}.search-clear[data-v-5bf43f78]:hover{background:var(--color-selected);color:var(--color-text-muted)}.search-clear[data-v-5bf43f78]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}@media(prefers-reduced-motion:reduce){.search-clear[data-v-5bf43f78]{transition:none}}.sd-body[data-v-5bf43f78]{height:100%;min-height:0;display:flex;flex-direction:column;gap:var(--space-2);padding-top:4px}.sd-list[data-v-5bf43f78]{flex:1;min-height:0;overflow-y:auto;padding:var(--space-1) var(--space-2);--sd-gutter: var(--p-ic-md);--sd-gap: var(--space-2)}.sd-section[data-v-5bf43f78]{display:flex;align-items:baseline;gap:var(--space-1);padding:var(--space-2) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.sd-section-count[data-v-5bf43f78]{font-weight:var(--weight-regular)}.sd-section[data-v-5bf43f78]:first-child{padding-top:var(--space-1)}.sd-section[data-v-5bf43f78]:not(:first-child){margin-top:var(--space-1);border-top:var(--p-hairline) solid var(--color-line)}.sd-row[data-v-5bf43f78]{display:flex;flex-direction:column;gap:2px;width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:none;cursor:pointer;text-align:left;font-family:var(--font-ui);color:var(--color-text)}.sd-row[data-v-5bf43f78]:hover{background:var(--color-hover)}.sd-row.on[data-v-5bf43f78]{background:var(--color-selected)}.sd-row.active .sd-title[data-v-5bf43f78]{color:var(--color-accent-hover)}.sd-row-ws[data-v-5bf43f78]{flex-direction:row;align-items:center;gap:var(--sd-gap)}.sd-folder[data-v-5bf43f78]{flex:none;width:var(--sd-gutter);color:var(--color-text-muted)}.sd-ws-name[data-v-5bf43f78]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.sd-ws-path[data-v-5bf43f78]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;font-size:var(--text-xs);color:var(--color-text-faint)}.sd-line1[data-v-5bf43f78],.sd-line2[data-v-5bf43f78]{padding-left:calc(var(--sd-gutter) + var(--sd-gap))}.sd-line1[data-v-5bf43f78]{display:flex;align-items:baseline;gap:var(--space-2);min-width:0}.sd-title[data-v-5bf43f78]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.sd-time[data-v-5bf43f78]{flex:none;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.sd-line2[data-v-5bf43f78]{display:flex;align-items:center;gap:var(--space-1);min-width:0;font-size:var(--text-xs);color:var(--color-text-muted)}.sd-meta-ws[data-v-5bf43f78]{flex:none;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-meta-sep[data-v-5bf43f78]{color:var(--color-text-faint)}.sd-meta-snippet[data-v-5bf43f78]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-title[data-v-5bf43f78] mark,.sd-ws-name[data-v-5bf43f78] mark{background:var(--color-accent-soft);color:inherit;font-weight:var(--weight-semibold);border-radius:var(--radius-xs);padding:0 1px}.sd-line2[data-v-5bf43f78] mark,.sd-ws-path[data-v-5bf43f78] mark{background:var(--color-accent-soft);color:var(--color-text);font-weight:var(--weight-medium);border-radius:var(--radius-xs);padding:0 1px}.sd-empty[data-v-5bf43f78]{height:100%;display:flex;align-items:center;justify-content:center}.sd-foot[data-v-5bf43f78]{flex:none;display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-4);border-top:.5px solid var(--color-line);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.sd-hint[data-v-5bf43f78]{display:inline-flex;align-items:center;gap:var(--space-1)}.sd-dot[data-v-5bf43f78]{margin:0 var(--space-1)}:where(.markstream-vue) button{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.markstream-vue li:has(.checkbox-node){list-style-type:none;margin-left:calc(-1 * var(--ms-flow-list-indent))}.markstream-vue .text-node{white-space:pre-wrap;overflow-wrap:break-word}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.markstream-vue .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.markstream-vue .pointer-events-none{pointer-events:none}.markstream-vue .\!visible{visibility:visible!important}.markstream-vue .visible{visibility:visible}.markstream-vue .collapse{visibility:collapse}.markstream-vue .static{position:static}.markstream-vue .fixed{position:fixed}.markstream-vue .absolute{position:absolute}.markstream-vue .relative{position:relative}.markstream-vue .inset-0{inset:0}.markstream-vue .right-2{right:8px}.markstream-vue .right-6{right:24px}.markstream-vue .top-2{top:8px}.markstream-vue .top-6{top:24px}.markstream-vue .z-10{z-index:10}.markstream-vue .z-50{z-index:50}.markstream-vue .m-0{margin:0}.markstream-vue .mx-0\.5{margin-left:2px;margin-right:2px}.markstream-vue .mr-2{margin-right:8px}.markstream-vue .mt-2{margin-top:8px}.markstream-vue .block{display:block}.markstream-vue .inline{display:inline}.markstream-vue .flex{display:flex}.markstream-vue .inline-flex{display:inline-flex}.markstream-vue .table{display:table}.markstream-vue .flow-root{display:flow-root}.markstream-vue .grid{display:grid}.markstream-vue .contents{display:contents}.markstream-vue .list-item{display:list-item}.markstream-vue .hidden{display:none}.markstream-vue .h-4{height:16px}.markstream-vue .h-full{height:100%}.markstream-vue .max-h-full{max-height:100%}.markstream-vue .min-h-full{min-height:100%}.markstream-vue .w-2\/3{width:66.666667%}.markstream-vue .w-4{width:16px}.markstream-vue .w-4\/5{width:80%}.markstream-vue .w-full{width:100%}.markstream-vue .min-w-\[160px\]{min-width:160px}.markstream-vue .max-w-full{max-width:100%}.markstream-vue .flex-1{flex:1 1 0%}.markstream-vue .flex-shrink{flex-shrink:1}.markstream-vue .flex-shrink-0{flex-shrink:0}.markstream-vue .shrink{flex-shrink:1}.markstream-vue .shrink-0{flex-shrink:0}.markstream-vue .border-collapse{border-collapse:collapse}.markstream-vue .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.markstream-vue .animate-spin{animation:spin 1s linear infinite}.markstream-vue .cursor-grab{cursor:grab}.markstream-vue .cursor-grabbing{cursor:grabbing}.markstream-vue .cursor-not-allowed{cursor:not-allowed}.markstream-vue .cursor-pointer{cursor:pointer}.markstream-vue .resize{resize:both}.markstream-vue .list-decimal{list-style-type:decimal}.markstream-vue .list-disc{list-style-type:disc}.markstream-vue .flex-wrap{flex-wrap:wrap}.markstream-vue .items-center{align-items:center}.markstream-vue .items-baseline{align-items:baseline}.markstream-vue .justify-center{justify-content:center}.markstream-vue .justify-between{justify-content:space-between}.markstream-vue .gap-0\.5{gap:2px}.markstream-vue .gap-1\.5{gap:6px}.markstream-vue .gap-2{gap:8px}.markstream-vue .gap-\[var\(--ms-gap-header-actions\)\]{gap:var(--ms-gap-header-actions)}.markstream-vue .gap-x-1{-moz-column-gap:4px;column-gap:4px}.markstream-vue .gap-x-2{-moz-column-gap:8px;column-gap:8px}.markstream-vue .overflow-hidden{overflow:hidden}.markstream-vue .overflow-x-auto{overflow-x:auto}.markstream-vue .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markstream-vue .whitespace-nowrap{white-space:nowrap}.markstream-vue .whitespace-pre-wrap{white-space:pre-wrap}.markstream-vue .rounded{border-radius:calc(var(--ms-radius) * .5)}.markstream-vue .rounded-lg{border-radius:var(--ms-radius)}.markstream-vue .rounded-md{border-radius:calc(var(--ms-radius) * .75)}.markstream-vue .border{border-width:1px}.markstream-vue .border-b{border-bottom-width:1px}.markstream-vue .border-t{border-top-width:1px}.markstream-vue .border-\[var\(--code-border\)\]{border-color:var(--code-border)}.markstream-vue .border-\[var\(--footnote-border\)\]{border-color:var(--footnote-border)}.markstream-vue .border-\[var\(--hr-border\)\]{border-color:var(--hr-border)}.markstream-vue .bg-\[hsl\(var\(--ms-popover\)\)\]{background-color:hsl(var(--ms-popover))}.markstream-vue .bg-\[var\(--code-header-bg\)\]{background-color:var(--code-header-bg)}.markstream-vue .p-0{padding:0}.markstream-vue .p-1{padding:4px}.markstream-vue .p-4{padding:16px}.markstream-vue .p-\[var\(--ms-action-btn-padding\)\]{padding:var(--ms-action-btn-padding)}.markstream-vue .px-1\.5{padding-left:6px;padding-right:6px}.markstream-vue .px-2{padding-left:8px;padding-right:8px}.markstream-vue .px-4{padding-left:16px;padding-right:16px}.markstream-vue .px-\[var\(--ms-inset-panel-x\)\]{padding-left:var(--ms-inset-panel-x);padding-right:var(--ms-inset-panel-x)}.markstream-vue .py-0\.5{padding-top:2px;padding-bottom:2px}.markstream-vue .py-1\.5{padding-top:6px;padding-bottom:6px}.markstream-vue .py-\[var\(--ms-inset-panel-y\)\]{padding-top:var(--ms-inset-panel-y);padding-bottom:var(--ms-inset-panel-y)}.markstream-vue .pb-3{padding-bottom:12px}.markstream-vue .pt-2{padding-top:8px}.markstream-vue .text-left{text-align:left}.markstream-vue .text-center{text-align:center}.markstream-vue .text-right{text-align:right}.markstream-vue .font-mono{font-family:var(--ms-font-mono)}.markstream-vue .text-\[length\:var\(--ms-text-label\)\]{font-size:var(--ms-text-label)}.markstream-vue .text-sm{font-size:14px;line-height:20px}.markstream-vue .text-xs{font-size:12px;line-height:16px}.markstream-vue .font-medium{font-weight:500}.markstream-vue .font-semibold{font-weight:600}.markstream-vue .uppercase{text-transform:uppercase}.markstream-vue .lowercase{text-transform:lowercase}.markstream-vue .italic{font-style:italic}.markstream-vue .leading-\[normal\]{line-height:normal}.markstream-vue .leading-none{line-height:1}.markstream-vue .leading-relaxed{line-height:1.625}.markstream-vue .text-\[\#0366d6\]{--tw-text-opacity: 1;color:rgb(3 102 214 / var(--tw-text-opacity, 1))}.markstream-vue .text-\[hsl\(var\(--ms-popover-foreground\)\)\]{color:hsl(var(--ms-popover-foreground))}.markstream-vue .text-\[var\(--code-action-fg\)\]{color:var(--code-action-fg)}.markstream-vue .text-\[var\(--code-fg\)\]{color:var(--code-fg)}.markstream-vue .underline{text-decoration-line:underline}.markstream-vue .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markstream-vue .opacity-0{opacity:0}.markstream-vue .opacity-50{opacity:.5}.markstream-vue .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.markstream-vue .shadow-\[var\(--ms-shadow-popover\)\]{--tw-shadow-color: var(--ms-shadow-popover);--tw-shadow: var(--tw-shadow-colored)}.markstream-vue .outline{outline-style:solid}.markstream-vue .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-\[height\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.markstream-vue .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.markstream-vue{--ms-background: 0 0% 100%;--ms-foreground: 0 0% 10%;--ms-muted: 0 0% 96.5%;--ms-muted-foreground: 0 0% 43%;--ms-secondary: 0 0% 93.5%;--ms-secondary-foreground: 0 0% 10%;--ms-accent: 0 0% 91%;--ms-accent-foreground: 0 0% 10%;--ms-primary: 0 0% 10%;--ms-primary-foreground: 0 0% 100%;--ms-destructive: 0 62% 52%;--ms-destructive-foreground: 0 0% 100%;--ms-border: 0 0% 87%;--ms-ring: 0 0% 10%;--ms-popover: 0 0% 100%;--ms-popover-foreground: 0 0% 10%;--ms-radius: 8px;--ms-info: 215 60% 50%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 56% 39%;--ms-success-foreground: 0 0% 100%;--ms-warning: 38 64% 46%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 50% 36%;--ms-diff-removed: 0 58% 48%;--ms-highlight: 50 60% 72%;--ms-highlight-foreground: 0 0% 0%;--ms-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--ms-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}.dark .markstream-vue,.markstream-vue.dark{--ms-background: 0 0% 7%;--ms-foreground: 0 0% 93%;--ms-muted: 0 0% 12%;--ms-muted-foreground: 0 0% 60%;--ms-secondary: 0 0% 16%;--ms-secondary-foreground: 0 0% 93%;--ms-accent: 0 0% 24%;--ms-accent-foreground: 0 0% 93%;--ms-primary: 0 0% 93%;--ms-primary-foreground: 0 0% 10%;--ms-destructive: 0 60% 50%;--ms-destructive-foreground: 0 0% 93%;--ms-border: 0 0% 20%;--ms-ring: 0 0% 80%;--ms-popover: 0 0% 9%;--ms-popover-foreground: 0 0% 93%;--ms-info: 215 55% 62%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 48% 55%;--ms-success-foreground: 0 0% 100%;--ms-warning: 32 65% 58%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 42% 60%;--ms-diff-removed: 0 58% 58%;--ms-highlight: 48 65% 50%;--ms-highlight-foreground: 0 0% 0%;--ms-shadow-subtle: 0 1px 3px 0 hsl(0 0% 0% / .25);--ms-shadow-popover: 0 4px 6px -1px hsl(0 0% 0% / .2), 0 2px 4px -2px hsl(0 0% 0% / .15);--ms-shadow-modal: 0 10px 15px -3px hsl(0 0% 0% / .5), 0 4px 6px -4px hsl(0 0% 0% / .4);--ms-shadow-preview: 0 10px 40px hsl(0 0% 0% / .6);--tooltip-bg: hsl(0 0% 12%);--tooltip-fg: hsl(0 0% 72%);--code-bg: #111827;--code-header-bg: hsl(var(--ms-muted));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 12%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 12%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 12%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 12%, transparent)}.markstream-vue{font-family:var(--ms-font-sans);font-size:var(--ms-text-body);line-height:var(--ms-leading-body);--inline-code-bg: hsl(var(--ms-secondary));--inline-code-fg: hsl(var(--ms-foreground) / .75);--inline-code-border: hsl(var(--ms-border) / .9);--code-bg: #fff;--code-fg: hsl(var(--ms-foreground));--code-border: hsl(var(--ms-border));--code-header-bg: hsl(var(--ms-secondary));--code-selection-bg: hsl(var(--ms-accent) / .3);--code-line-number: hsl(var(--ms-muted-foreground));--markstream-code-line-number-align: right;--code-action-fg: hsl(var(--ms-muted-foreground));--code-action-hover-bg: hsl(var(--ms-accent));--code-action-hover-fg: hsl(var(--ms-accent-foreground));--code-action-active-bg: hsl(var(--ms-primary));--code-action-active-fg: hsl(var(--ms-primary-foreground));--diff-added-fg: hsl(var(--ms-diff-added));--diff-removed-fg: hsl(var(--ms-diff-removed));--diff-added-bg: hsl(var(--ms-diff-added) / .1);--diff-added-inline-bg: hsl(var(--ms-diff-added) / .2);--diff-removed-bg: hsl(var(--ms-diff-removed) / .1);--diff-removed-inline-bg: hsl(var(--ms-diff-removed) / .2);--blockquote-border: hsl(var(--ms-muted-foreground) / .2);--admonition-bg: hsl(var(--ms-muted));--admonition-border: hsl(var(--ms-border));--admonition-fg: hsl(var(--ms-foreground));--admonition-muted: hsl(var(--ms-muted-foreground));--admonition-header-bg: hsl(var(--ms-muted) / .5);--admonition-note: hsl(var(--ms-info));--admonition-tip: hsl(var(--ms-success));--admonition-warning: hsl(var(--ms-warning));--admonition-danger: hsl(var(--ms-destructive));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 6%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 6%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 6%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 6%, transparent);--table-border: hsl(var(--ms-border));--table-header-bg: hsl(var(--ms-muted));--link-color: hsl(var(--ms-info));--list-marker: hsl(var(--ms-muted-foreground) / .5);--list-counter-marker: hsl(var(--ms-muted-foreground));--hr-border: hsl(var(--ms-border));--highlight-bg: hsl(var(--ms-highlight));--footnote-border: hsl(var(--ms-border));--tooltip-bg: hsl(0 0% 18%);--tooltip-fg: hsl(0 0% 88%);--tooltip-border: hsl(var(--ms-border));--modal-overlay: hsl(0 0% 0% / .7);--modal-bg: hsl(var(--ms-popover));--modal-fg: hsl(var(--ms-popover-foreground));--diagram-bg: hsl(var(--ms-muted));--diagram-border: hsl(var(--ms-border));--diagram-header-bg: hsl(var(--ms-muted));--loading-spinner: hsl(var(--ms-muted-foreground));--loading-shimmer: hsl(var(--ms-muted) / .5);--image-placeholder-bg: hsl(var(--ms-muted));--focus-ring: hsl(var(--ms-ring));--ms-space-1: 4px;--ms-space-1_5: 6px;--ms-space-2: 8px;--ms-space-2_5: 10px;--ms-space-3: 12px;--ms-space-4: 16px;--ms-space-5: 20px;--ms-space-6: 24px;--ms-space-8: 32px;--ms-space-12: 48px;--ms-flow-paragraph-y: 1.5em;--ms-flow-list-y: 1em;--ms-flow-list-item-y: .25em;--ms-flow-list-indent: 1.625em ;--ms-flow-list-indent-mobile: calc(14 / 9 * 1em);--ms-flow-table-y: 2em;--ms-flow-table-cell: .5em .75em;--ms-flow-blockquote-y: 1.25em;--ms-flow-blockquote-indent: 1.25em;--ms-flow-admonition-y: 1.25em;--ms-flow-footnote-y: .5em;--ms-flow-hr-y: 2.5em;--ms-flow-diagram-y: 1.5em;--ms-flow-codeblock-y: 1.5em;--ms-flow-definition-term-mt: .75em;--ms-flow-definition-desc-ml: 1.25em;--ms-flow-definition-desc-mb: .5em;--ms-flow-heading-1-mt: 0;--ms-flow-heading-1-mb: 1em;--ms-flow-heading-2-mt: 2em;--ms-flow-heading-2-mb: .75em;--ms-flow-heading-3-mt: 1.5em;--ms-flow-heading-3-mb: .6em;--ms-flow-heading-4-mt: 1.25em;--ms-flow-heading-4-mb: .4em;--ms-flow-heading-5-mt: 1em;--ms-flow-heading-5-mb: .25em;--ms-flow-heading-6-mt: 1em;--ms-flow-heading-6-mb: .25em;--ms-text-body: 16px;--ms-leading-body: 1.75;--ms-text-h1: 36px;--ms-text-h2: 24px;--ms-text-h3: 20px;--ms-text-h4: 16px;--ms-text-h5: 16px;--ms-text-h6: 16px;--ms-leading-h1: 1.2;--ms-leading-h2: 1.35;--ms-leading-h3: 1.5;--ms-weight-h1: 700;--ms-weight-h2: 600;--ms-weight-h3: 600;--ms-weight-h4: 600;--ms-text-label: 12px;--ms-action-btn-padding: 6px;--ms-action-btn-icon: 14px;--ms-inset-panel-x: 10px;--ms-inset-panel-y: 6px;--ms-inset-panel-body-sm: 8px;--ms-inset-panel-body: 16px;--ms-inset-admonition-body-top: 8px;--ms-inset-admonition-body-bottom: 12px;--ms-gap-header: var(--ms-space-4);--ms-gap-header-main: var(--ms-space-2_5);--ms-gap-header-actions: var(--ms-space-2);--ms-shadow-subtle: 0 1px 3px 0 hsl(var(--ms-foreground) / .06);--ms-shadow-popover: 0 4px 6px -1px hsl(var(--ms-foreground) / .1), 0 2px 4px -2px hsl(var(--ms-foreground) / .1);--ms-shadow-modal: 0 10px 15px -3px hsl(var(--ms-foreground) / .1), 0 4px 6px -4px hsl(var(--ms-foreground) / .1);--ms-shadow-preview: 0 10px 40px hsl(var(--ms-foreground) / .25);--ms-duration-fast: .12s;--ms-duration-standard: .18s;--ms-duration-overlay: .2s;--ms-duration-emphasis: .22s;--ms-duration-slow: .3s;--ms-duration-stream: .28s;--ms-ease-linear: linear;--ms-ease-standard: ease;--ms-ease-out: ease-out;--ms-ease-in-out: ease-in-out;--ms-ease-spring: cubic-bezier(.16, 1, .3, 1);--ms-border-width: 1px;--ms-border-width-strong: 4px;--ms-focus-ring-width: 2px;--ms-focus-ring-offset: 2px;--ms-size-diagram-min-height: 360px;--ms-size-code-max-height: 500px;--ms-size-image-max-width: 384px;--ms-size-image-min-width: 128px;--ms-size-image-min-height: 1.5em;--ms-size-math-min-height: 40px;--ms-size-skeleton-min-height: 120px}body>div[id^=dmermaid-]{position:fixed;top:-10000px;left:0;width:100%;visibility:hidden;pointer-events:none}.markstream-vue .hover\:bg-\[var\(--code-action-hover-bg\)\]:hover{background-color:var(--code-action-hover-bg)}.markstream-vue .hover\:text-\[var\(--code-action-hover-fg\)\]:hover{color:var(--code-action-hover-fg)}.markstream-vue .hover\:underline:hover{text-decoration-line:underline}.markstream-vue .active\:scale-\[0\.96\]:active{--tw-scale-x: .96;--tw-scale-y: .96;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.markstream-vue .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.markstream-vue .disabled\:opacity-40:disabled{opacity:.4}.checkbox-node[data-v-be21ab83]{display:inline-flex;align-items:center;margin-right:.5em;vertical-align:-.15em}.checkbox-icon[data-v-be21ab83]{flex-shrink:0}.checkbox-unchecked[data-v-be21ab83]{color:hsl(var(--ms-muted-foreground) / .5)}.checkbox-checked[data-v-be21ab83]{color:hsl(var(--ms-info))}.emoji-node[data-v-de55dc97]{display:inline-block}.footnote-reference[data-v-c1463a29]{font-size:.75em;line-height:0}.footnote-link[data-v-c1463a29]{color:var(--link-color);text-decoration:none}.footnote-link[data-v-c1463a29]:hover{text-decoration:underline}.html-inline-node[data-v-d17f12b0]{display:inline}.html-inline-node--loading[data-v-d17f12b0]{opacity:.85}.inline-code[data-v-4e331c97]{display:inline;font-family:var(--ms-font-mono);font-size:.8125em;line-height:inherit;color:var(--inline-code-fg);background-color:var(--inline-code-bg);padding:.15em .35em;border-radius:.25em;white-space:normal;word-break:break-word;max-width:100%;-webkit-box-decoration-break:clone;box-decoration-break:clone}.inline-code-stream-delta[data-v-4e331c97]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both}.inline-code-stream-delta--a[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-a-4e331c97}.inline-code-stream-delta--b[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-b-4e331c97}@keyframes inline-code-stream-update-fade-a-4e331c97{0%{opacity:0}to{opacity:1}}@keyframes inline-code-stream-update-fade-b-4e331c97{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.inline-code-stream-delta[data-v-4e331c97]{animation:none!important}}.image-node-container[data-v-046e82ac]{display:inline-block;position:relative;vertical-align:middle;max-width:var(--ms-size-image-max-width)}.image-node__img[data-v-046e82ac]{display:inline-block;max-width:100%;min-width:var(--ms-size-image-min-width);min-height:var(--ms-size-image-min-height);height:auto;vertical-align:middle;transition:opacity var(--ms-duration-emphasis) var(--ms-ease-standard)}.image-node__img.is-loading[data-v-046e82ac]{opacity:0}.image-node__img.is-loaded[data-v-046e82ac]{opacity:1}.image-node__img.has-natural-size[data-v-046e82ac]{min-width:0;min-height:0}.image-placeholder[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:var(--ms-size-image-min-width);min-height:128px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));overflow:hidden;vertical-align:middle}.image-shimmer-overlay[data-v-046e82ac]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:hsl(var(--ms-muted));overflow:hidden}.image-shimmer-overlay .image-shimmer[data-v-046e82ac]{width:100%;height:100%}.image-shimmer[data-v-046e82ac]{display:block;width:100%;height:100%;min-height:128px;background:linear-gradient(90deg,hsl(var(--ms-muted)),hsl(var(--ms-muted-foreground) / .06),hsl(var(--ms-muted)));background-size:200% 100%;animation:image-shimmer-046e82ac 1.5s ease-in-out infinite}.image-node-container[data-markstream-viewport-pending=true] .image-shimmer[data-v-046e82ac]{animation:none}@keyframes image-shimmer-046e82ac{0%{background-position:100% 0}to{background-position:-100% 0}}.image-error[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:16px 24px;min-height:64px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground));font-size:var(--ms-text-label);vertical-align:middle}.image-node__raw-text[data-v-046e82ac]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}@media(prefers-reduced-motion:reduce){.image-shimmer[data-v-046e82ac]{animation:none!important}}.markstream-vue pre[class^=language-],.markstream-vue pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-vue pre[class^=language-]>code,.markstream-vue pre[class*=" language-"]>code{display:block}.markstream-vue pre[data-markstream-pre="1"]:not(.markstream-pre--diff-preview){background:var(--code-bg);color:var(--code-fg)}.markstream-vue pre.markstream-pre--line-numbers{position:relative}.markstream-vue pre.code-pre-fallback[data-markstream-code-loading="1"]{--markstream-pre-line-number-top: var(--markstream-code-padding-y, 8px);--markstream-pre-line-number-left: 0px;--markstream-pre-line-number-width: 2ch;--markstream-pre-line-number-padding-left: 2ch;--markstream-pre-line-number-padding-right: 1ch;--markstream-pre-line-number-separator-width: 2px;--markstream-code-padding-left: calc(6ch + 2px) ;box-sizing:border-box;width:100%;margin:0;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left);overflow:auto;border:0;border-radius:0;background:var(--code-bg);color:var(--code-fg);font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace );font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers{position:absolute;top:var(--markstream-pre-line-number-top, 0);left:var(--markstream-pre-line-number-left, 0);box-sizing:content-box;display:flex;flex-direction:column;align-items:flex-end;width:var(--markstream-pre-line-number-width, 2ch);min-width:var(--markstream-pre-line-number-width, 2ch);padding-left:var(--markstream-pre-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-line-number-padding-right, 1ch);border-right:var(--markstream-pre-line-number-separator-width, 2px) solid transparent;color:var(--code-line-number);font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--line-numbers:not(.markstream-pre--diff-preview):not(.code-pre-fallback)>.markstream-pre__code{box-sizing:border-box;min-width:100%;padding-left:var(--markstream-code-padding-left, 52px);padding-right:var(--markstream-code-padding-x, 12px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-number{display:block;min-height:1lh}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-numbers-text{display:block;min-height:1lh;text-align:right;white-space:pre}.markstream-vue pre.markstream-pre--diff-preview{box-sizing:border-box;padding-left:0;padding-right:0;width:100%;--markstream-pre-diff-gutter-marker-width: var(--stream-monaco-gutter-marker-width, 4px);--markstream-pre-diff-gutter-gap: var(--stream-monaco-gutter-gap, 1ch);--markstream-pre-diff-code-gap: var(--stream-monaco-diff-code-gap, 1ch);--markstream-pre-diff-code-padding: var(--stream-monaco-diff-code-padding, 0px);--markstream-diff-added-fg: var(--diff-added-fg, #2f8f68);--markstream-diff-removed-fg: var(--diff-removed-fg, #c24141);--markstream-diff-added-line-fill: var(--diff-added-bg, rgb(47 143 104 / 12%));--markstream-diff-removed-line-fill: var(--diff-removed-bg, rgb(194 65 65 / 12%));--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-diff-removed-gutter: linear-gradient( 90deg, var(--markstream-diff-removed-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-pre-diff-line-number-width: var( --stream-monaco-line-number-width, 2ch );--markstream-pre-diff-line-number-padding-left: var(--stream-monaco-line-number-padding-left, 2ch);--markstream-pre-diff-line-number-padding-right: var(--stream-monaco-line-number-padding-right, 1ch);--markstream-pre-diff-line-number-separator-width: var(--stream-monaco-line-number-separator-width, 2px);--markstream-pre-diff-line-number-box-width: calc( var(--markstream-pre-diff-line-number-padding-left) + var(--markstream-pre-diff-line-number-width) + var(--markstream-pre-diff-line-number-padding-right) + var(--markstream-pre-diff-line-number-separator-width) );--markstream-pre-diff-line-number-bg: var( --stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg, transparent) );--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-original-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );--markstream-pre-diff-line-number-align: var(--markstream-diff-line-number-align, right);--markstream-pre-diff-code-fill-left: calc( var(--markstream-pre-diff-line-number-left) + var(--markstream-pre-diff-line-number-box-width) );--markstream-pre-diff-code-left: calc( var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-line-number-gap-to-code) + var(--markstream-pre-diff-code-padding) )}.markstream-vue pre.markstream-pre--diff-preview::-webkit-scrollbar{width:12px;height:12px}.markstream-vue pre.markstream-pre--diff-preview.is-wrap{white-space:pre-wrap;overflow-wrap:anywhere}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline{--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px )}.markstream-vue pre.markstream-pre--diff-preview>.markstream-pre__diff-code{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);font:inherit;line-height:inherit;min-width:100%;width:100%}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline>.markstream-pre__diff-code{grid-template-columns:minmax(0,1fr)}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap)>.markstream-pre__diff-code{grid-template-columns:minmax(100%,max-content);width:100%;min-width:-moz-max-content;min-width:max-content}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane{min-width:0;overflow:hidden}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{overflow-x:auto;overflow-y:hidden}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane-content{display:block;min-width:100%}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane-content{width:-moz-max-content;width:max-content}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap) .markstream-pre__diff-pane{min-width:-moz-max-content;min-width:max-content;width:100%;overflow:visible}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane--modified{--markstream-pre-diff-pane-divider-width: 1px;--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );box-shadow:inset 1px 0 var(--markstream-diff-pane-divider, hsl(var(--ms-border)))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified{--markstream-pre-diff-line-number-left: calc( var(--stream-monaco-line-number-left, 0px) + var(--markstream-pre-diff-pane-divider-width) )}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-rail{left:var(--markstream-pre-diff-pane-divider-width)}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line{padding-left:calc(var(--markstream-pre-diff-code-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line:before{left:calc(var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline .markstream-pre__diff-pane--modified{box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line{position:relative;display:block;box-sizing:border-box;width:100%;min-width:100%;min-height:var( --markstream-pre-diff-synced-row-height, var(--markstream-pre-diff-line-height, 18px) );padding-left:var(--markstream-pre-diff-code-left);line-height:var(--markstream-pre-diff-line-height, 18px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:before{content:"";position:absolute;left:var(--markstream-pre-diff-code-fill-left);right:0;top:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;border-radius:0;background:transparent}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:after{content:"";position:absolute;left:var(--markstream-pre-diff-line-number-left);top:0;width:var(--markstream-pre-diff-line-number-box-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-rail{position:absolute;z-index:2;top:0;left:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );width:var(--markstream-pre-diff-gutter-marker-width, 4px);min-width:var(--markstream-pre-diff-gutter-marker-width, 4px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-number{position:absolute;z-index:1;top:0;left:var(--markstream-pre-diff-line-number-left);width:var(--markstream-pre-diff-line-number-width);min-width:var(--markstream-pre-diff-line-number-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );box-sizing:content-box;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none;padding-left:var(--markstream-pre-diff-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-diff-line-number-padding-right, 1ch);border-right:var(--markstream-pre-diff-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg, var(--code-bg));color:var(--code-line-number);font-variant-numeric:tabular-nums;line-height:var(--markstream-pre-diff-line-height, 18px);text-align:var(--markstream-pre-diff-line-number-align, right);-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent));color:var(--stream-monaco-added-fg, var(--markstream-diff-added-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent));color:var(--stream-monaco-removed-fg, var(--markstream-diff-removed-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content{position:relative;z-index:1;display:block;width:-moz-max-content;width:max-content;min-width:100%;line-height:var(--markstream-pre-diff-line-height, 18px);white-space:inherit;overflow-wrap:normal;word-break:normal;line-break:auto}.markstream-vue pre.markstream-pre--diff-preview.is-wrap .markstream-pre__diff-content{width:auto;min-width:0;overflow-wrap:inherit}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content-inner{white-space:inherit;overflow-wrap:inherit;word-break:inherit;line-break:inherit;-webkit-box-decoration-break:clone;box-decoration-break:clone}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk{color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk:before{background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:before{background-image:linear-gradient(-45deg,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 12.5%,transparent 12.5%,transparent 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 62.5%,transparent 62.5%,transparent 100%);background-size:10px 10px;opacity:.38}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-number,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-content{display:none}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-collapsed:not(.code-pre-fallback){height:auto!important;min-height:0!important}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed{min-height:28px;padding-left:0;color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)));line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:before{left:0;height:28px;background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, rgb(0 0 0 / 4%)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-number{display:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-content{width:100%;min-width:0;padding-left:calc(var(--markstream-pre-diff-code-left) + 12px);line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:before{background:linear-gradient(var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent)),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:before{background:linear-gradient(var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent)),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:after{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))}.markstream-vue pre[class^=language-]:focus,.markstream-vue pre[class*=" language-"]:focus{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.text-node[data-v-fd79037c]{display:inline;font-weight:inherit;vertical-align:baseline}.text-node-center[data-v-fd79037c]{display:inline-flex;justify-content:center;width:100%}.text-node-stream-delta[data-v-fd79037c]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both;will-change:opacity}.text-node-stream-delta--a[data-v-fd79037c]{animation-name:text-node-stream-update-fade-a-fd79037c}.text-node-stream-delta--b[data-v-fd79037c]{animation-name:text-node-stream-update-fade-b-fd79037c}@keyframes text-node-stream-update-fade-a-fd79037c{0%{opacity:0}to{opacity:1}}@keyframes text-node-stream-update-fade-b-fd79037c{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.text-node-stream-delta[data-v-fd79037c]{animation:none!important}}.reference-node[data-v-775c65e4]{background-color:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground))}.reference-node[data-v-775c65e4]:hover{background-color:hsl(var(--ms-secondary))}.superscript-node[data-v-24160b22]{font-size:.8em;vertical-align:super}.subscript-node[data-v-197fa13b]{font-size:.8em;vertical-align:sub}.strong-node[data-v-a8647104]{font-weight:700}.strikethrough-node[data-v-b7a531fa]{text-decoration:line-through}.link-node[data-v-367e6ca4]{color:var(--link-color);text-decoration:none}.link-node[data-v-367e6ca4]:hover{text-decoration:underline;text-underline-offset:3.2px}.link-loading .link-text-wrapper[data-v-367e6ca4]{position:relative}.link-loading[data-v-367e6ca4]{color:var(--link-color)}.link-loading .link-text[data-v-367e6ca4]{position:relative;z-index:2}.link-loading-indicator[data-v-367e6ca4]{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;border-radius:999px;will-change:opacity;opacity:var(--underline-rest-opacity, .18);animation:underlinePulse-367e6ca4 var(--underline-duration, 1.6s) var(--underline-timing, ease-in-out) var(--underline-iteration, infinite)}@keyframes underlinePulse-367e6ca4{0%,to{opacity:var(--underline-rest-opacity, .18)}50%{opacity:var(--underline-opacity, .35)}}@media(prefers-reduced-motion:reduce){.link-loading-indicator[data-v-367e6ca4]{animation:none;opacity:var(--underline-rest-opacity, .18)}}.insert-node[data-v-1e2c29d4]{text-decoration:underline}.highlight-node[data-v-7a62982a]{background-color:var(--highlight-bg);padding:0 3.2px;border-radius:.2em}.emphasis-node[data-v-2a5aafbf]{font-style:italic}.hard-break[data-v-50c58f70]{display:block}.blockquote[data-v-abfecebc]{font-weight:400;font-style:normal;color:var(--blockquote-fg, hsl(var(--ms-muted-foreground)));border-left:3px solid var(--blockquote-border);margin-top:var(--ms-flow-blockquote-y);margin-bottom:var(--ms-flow-blockquote-y);padding-left:var(--ms-flow-blockquote-indent)}.blockquote>.paragraph-node[data-v-abfecebc]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}.blockquote>.paragraph-node[data-v-abfecebc]:first-child{margin-top:0}.blockquote>.paragraph-node[data-v-abfecebc]:last-child{margin-bottom:0}.blockquote[data-v-abfecebc] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.definition-list[data-v-4e103b30]{margin:0 0 16px}.definition-term[data-v-4e103b30]{font-weight:600;margin-top:var(--ms-flow-definition-term-mt)}.definition-desc[data-v-4e103b30]{margin-left:var(--ms-flow-definition-desc-ml);margin-bottom:var(--ms-flow-definition-desc-mb)}.definition-list[data-v-4e103b30] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.footnote-anchor[data-v-e1eb37b6]{margin-left:8px;color:var(--link-color)}.footnote-node{margin-top:var(--ms-flow-footnote-y);margin-bottom:var(--ms-flow-footnote-y)}.markstream-vue [class*=footnote-] .markdown-renderer,.markstream-vue .flex-1 .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node[data-v-7122dbe1]{font-weight:500;line-height:1.25}hr+.heading-node[data-v-7122dbe1]{margin-top:0}.heading-1[data-v-7122dbe1]{font-size:var(--ms-text-h1);line-height:var(--ms-leading-h1);font-weight:var(--ms-weight-h1);margin-top:var(--ms-flow-heading-1-mt);margin-bottom:var(--ms-flow-heading-1-mb)}.heading-2[data-v-7122dbe1]{font-size:var(--ms-text-h2);line-height:var(--ms-leading-h2);font-weight:var(--ms-weight-h2);margin-top:var(--ms-flow-heading-2-mt);margin-bottom:var(--ms-flow-heading-2-mb)}.heading-3[data-v-7122dbe1]{font-size:var(--ms-text-h3);line-height:var(--ms-leading-h3);font-weight:var(--ms-weight-h3);margin-top:var(--ms-flow-heading-3-mt);margin-bottom:var(--ms-flow-heading-3-mb)}.heading-4[data-v-7122dbe1]{font-size:var(--ms-text-h4);font-weight:var(--ms-weight-h4);margin-top:var(--ms-flow-heading-4-mt);margin-bottom:var(--ms-flow-heading-4-mb)}.heading-5[data-v-7122dbe1]{font-size:var(--ms-text-h5);margin-top:var(--ms-flow-heading-5-mt);margin-bottom:var(--ms-flow-heading-5-mb)}.heading-6[data-v-7122dbe1]{font-size:var(--ms-text-h6);margin-top:var(--ms-flow-heading-6-mt);margin-bottom:var(--ms-flow-heading-6-mb)}.list-item[data-v-617214f9]{margin:var(--ms-flow-list-item-y) 0;padding-left:var(--ms-space-1_5)}ol>.list-item[data-v-617214f9]::marker{color:var(--list-counter-marker);line-height:1.6}ul>.list-item[data-v-617214f9]::marker{color:var(--list-marker)}.list-item>.paragraph-node[data-v-617214f9]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:0}.list-item[data-v-617214f9] .markdown-renderer{content-visibility:visible;contain-intrinsic-size:0px 0px;contain:content}.list-node[data-v-99cb95e0]{margin-top:var(--ms-flow-list-y);margin-bottom:var(--ms-flow-list-y);padding-left:var(--ms-flow-list-indent)}.list-decimal[data-v-99cb95e0]{list-style-type:decimal}.list-disc[data-v-99cb95e0]{list-style-type:disc}@media(max-width:1023px){.list-disc[data-v-99cb95e0]{margin-top:calc(4/3*1em);margin-bottom:calc(4/3*1em);padding-left:var(--ms-flow-list-indent-mobile)}}.html-block-node__raw[data-v-e140a874]{white-space:pre-wrap;overflow-wrap:anywhere;opacity:.85}.html-block-node__placeholder[data-v-e140a874]{display:flex;flex-direction:column;gap:5.6px;padding:8px 0}.html-block-node__placeholder-bar[data-v-e140a874]{display:block;height:12.8px;border-radius:9999px;background-image:linear-gradient(90deg,var(--loading-shimmer),transparent,var(--loading-shimmer));background-size:200% 100%}.paragraph-node[data-v-c59ff506]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}li .paragraph-node[data-v-c59ff506]{margin:0}.table-node-wrapper[data-v-39f87b5d]{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scrollbar-gutter:stable}.table-node[data-v-39f87b5d]{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:var(--ms-flow-table-y) 0;font-size:inherit;border:1px solid var(--table-border);border-radius:var(--ms-radius);overflow:hidden;box-shadow:var(--ms-shadow-subtle)}.table-node[data-v-39f87b5d] th,.table-node[data-v-39f87b5d] td{border-bottom:1px solid var(--table-border);border-right:1px solid var(--table-border);padding:var(--ms-flow-table-cell);white-space:normal;overflow-wrap:break-word;word-break:normal}.table-node[data-v-39f87b5d] th:last-child,.table-node[data-v-39f87b5d] td:last-child{border-right:none}.table-node[data-v-39f87b5d] tbody tr:last-child td{border-bottom:none}.table-node[data-v-39f87b5d] thead th{position:relative;font-weight:600;background-color:var(--table-header-bg);border-bottom-width:2px}.table-node__resize-handle[data-v-39f87b5d]{position:absolute;top:0;right:-4px;bottom:0;z-index:1;width:8px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none}.table-node__resize-handle[data-v-39f87b5d]:after{content:"";position:absolute;top:.35em;bottom:.35em;left:50%;width:2px;border-radius:9999px;background:color-mix(in srgb,var(--table-border) 45%,hsl(var(--ms-foreground)));opacity:0;transform:translate(-50%);transition:opacity var(--ms-duration-fast) var(--ms-ease-standard)}.table-node__resize-handle[data-v-39f87b5d]:hover:after,.table-node__resize-handle[data-v-39f87b5d]:focus-visible:after{opacity:1}.table-node[data-v-39f87b5d] tbody tr:nth-child(2n){background-color:hsl(var(--ms-muted) / .35)}.table-node[data-v-39f87b5d] tbody tr:hover{background-color:var(--code-action-hover-bg)}.table-node--loading tbody td[data-v-39f87b5d]{position:relative;overflow:hidden}.table-node--loading tbody td[data-v-39f87b5d]>*{visibility:hidden}.table-node--loading tbody td[data-v-39f87b5d]:after{content:"";position:absolute;inset:0;border-radius:calc(var(--ms-radius) * .5);background:linear-gradient(90deg,var(--loading-shimmer) 25%,var(--loading-shimmer) 50%,var(--loading-shimmer) 75%);background-size:200% 100%;animation:table-node-shimmer-39f87b5d 1.2s linear infinite;will-change:background-position}.table-node__loading[data-v-39f87b5d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner[data-v-39f87b5d]{width:40px;height:40px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-39f87b5d],.table-node-fade-leave-active[data-v-39f87b5d]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-39f87b5d],.table-node-fade-leave-to[data-v-39f87b5d]{opacity:0}[data-v-39f87b5d] .table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}[data-v-39f87b5d] .table-node .markdown-renderer .node-slot,[data-v-39f87b5d] .table-node .markdown-renderer .node-content,[data-v-39f87b5d] .table-node .markdown-renderer .node-space{display:contents}[data-v-39f87b5d] .table-node .text-node,[data-v-39f87b5d] .table-node code{white-space:inherit;overflow-wrap:inherit;word-break:inherit;max-width:none}@keyframes table-node-shimmer-39f87b5d{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper[data-v-39f87b5d]{margin-top:0}.hr+.table-node-wrapper .table-node[data-v-39f87b5d]{margin-top:0}.sr-only[data-v-39f87b5d]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hr-node[data-v-39b2349c]{border-top-width:1px;border-color:var(--hr-border);margin:var(--ms-flow-hr-y) 0}.vmr-container[data-v-911e41c4]{margin-top:16px;margin-bottom:16px;border-radius:var(--ms-radius);border-width:1px;padding:16px;border-left-width:var(--ms-border-width-strong)}.height-estimation-probes[data-v-3e0766e2]{position:absolute;left:-100000px;top:0;visibility:hidden;pointer-events:none;overflow:hidden;z-index:-1}.node-content[data-v-3e0766e2]{width:100%}.node-content-flow-root[data-v-3e0766e2]{display:flow-root}.markdown-renderer[data-v-a9489508]{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:auto}.markdown-renderer.stable-layout[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:none}.node-slot[data-v-a9489508],.node-content[data-v-a9489508]{width:100%}.markdown-renderer.virtualized .node-slot[data-v-a9489508],.markdown-renderer.virtualized .node-content[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-slot[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-content[data-v-a9489508]{display:flow-root}.node-placeholder[data-v-a9489508]{width:100%;min-height:16px;margin:4px 0}.node-placeholder[data-v-a9489508]:first-child{margin-top:0}.node-spacer[data-v-a9489508]{width:100%}.unknown-node[data-v-a9489508]{color:hsl(var(--ms-muted-foreground));font-style:italic;margin:var(--ms-flow-paragraph-y) 0}.typewriter-cursor[data-v-a9489508]{position:absolute;left:0;top:0;display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;visibility:hidden;animation:typewriter-cursor-blink-a9489508 1s steps(1,end) infinite}@keyframes typewriter-cursor-blink-a9489508{0%,49%{opacity:1}50%,to{opacity:0}}.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{content:"";display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;animation:typewriter-cursor-blink 1s steps(1,end) infinite}@media(prefers-reduced-motion:reduce){.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{animation:none}}.markstream-vue .fade-enter-from{opacity:0}.markstream-vue .fade-enter-active{transition:opacity var(--fade-duration, .28s) var(--fade-ease, cubic-bezier(.33, 0, .67, 1));will-change:opacity}.markstream-vue .fade-enter-to{opacity:1}.admonition[data-v-a83480e1]{position:relative;margin:var(--ms-flow-admonition-y) 0;padding:.25em .75em .375em;border:1px solid var(--admonition-border);border-radius:var(--ms-radius);color:var(--admonition-fg)}.admonition-legend[data-v-a83480e1]{position:absolute;top:0;left:.75em;transform:translateY(-50%);display:inline-flex;align-items:center;gap:.35em;padding:0 .5em;background-color:hsl(var(--ms-background));font-size:13px;font-weight:600;line-height:1}.admonition-icon[data-v-a83480e1]{flex-shrink:0}.admonition-title[data-v-a83480e1]{white-space:nowrap}.admonition-content[data-v-a83480e1]{padding-top:.25em;color:var(--admonition-fg)}.admonition-note[data-v-a83480e1],.admonition-info[data-v-a83480e1]{border-color:hsl(var(--ms-info) / .3);background-color:hsl(var(--ms-info) / .04)}.admonition-note .admonition-legend[data-v-a83480e1],.admonition-info .admonition-legend[data-v-a83480e1]{color:var(--admonition-note)}.admonition-tip[data-v-a83480e1]{border-color:hsl(var(--ms-success) / .3);background-color:hsl(var(--ms-success) / .04)}.admonition-tip .admonition-legend[data-v-a83480e1]{color:var(--admonition-tip)}.admonition-warning[data-v-a83480e1],.admonition-caution[data-v-a83480e1]{border-color:hsl(var(--ms-warning) / .3);background-color:hsl(var(--ms-warning) / .04)}.admonition-warning .admonition-legend[data-v-a83480e1],.admonition-caution .admonition-legend[data-v-a83480e1]{color:var(--admonition-warning)}.admonition-danger[data-v-a83480e1],.admonition-error[data-v-a83480e1]{border-color:hsl(var(--ms-destructive) / .3);background-color:hsl(var(--ms-destructive) / .04)}.admonition-danger .admonition-legend[data-v-a83480e1],.admonition-error .admonition-legend[data-v-a83480e1]{color:var(--admonition-danger)}.admonition-toggle[data-v-a83480e1]{margin-left:.25em;background:transparent;border:none;color:inherit;cursor:pointer;padding:2px;border-radius:calc(var(--ms-radius) * .5);display:inline-flex;align-items:center;transition:background-color var(--ms-duration-fast) var(--ms-ease-standard)}.admonition-toggle[data-v-a83480e1]:hover{background-color:hsl(var(--ms-accent))}.admonition-toggle[data-v-a83480e1]:focus-visible{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.admonition-content[data-v-a83480e1] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.tooltip-element[data-v-c606ee4c]{z-index:9999;display:inline-block;max-width:320px;padding:4px 8px;border-radius:calc(var(--ms-radius) * .75);font-size:12px;line-height:1.4;white-space:normal;word-break:break-word;pointer-events:none;background-color:var(--tooltip-bg);color:var(--tooltip-fg);box-shadow:inset 0 1px #ffffff26,0 0 0 1px #0000001f,var(--ms-shadow-popover);transition:transform var(--ms-duration-emphasis) var(--ms-ease-spring),box-shadow var(--ms-duration-emphasis) var(--ms-ease-spring)}.tooltip-arrow[data-v-c606ee4c]{position:absolute;width:6px;height:6px;background:inherit;transform:rotate(45deg)}.tooltip-arrow[data-placement^=top][data-v-c606ee4c]{bottom:-3px}.tooltip-arrow[data-placement^=bottom][data-v-c606ee4c]{top:-3px}.tooltip-arrow[data-placement^=left][data-v-c606ee4c]{right:-3px}.tooltip-arrow[data-placement^=right][data-v-c606ee4c]{left:-3px}.tooltip-enter-active[data-v-c606ee4c]{transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.tooltip-leave-active[data-v-c606ee4c]{transition:opacity .12s ease-in,transform .12s ease-in}.tooltip-enter-from[data-v-c606ee4c]{opacity:0;transform:scale(.96)}.tooltip-enter-to[data-v-c606ee4c],.tooltip-leave-from[data-v-c606ee4c]{opacity:1;transform:scale(1)}.tooltip-leave-to[data-v-c606ee4c]{opacity:0;transform:scale(.97)}.action-icon{width:var(--ms-action-btn-icon, 14px);height:var(--ms-action-btn-icon, 14px);max-width:20px;max-height:20px}.code-block-container{margin:var(--ms-flow-codeblock-y) 0;contain:layout style;container-type:inline-size;background:var(--code-bg);border-color:var(--code-border);color:var(--code-fg);box-shadow:var(--ms-shadow-subtle)}.code-block-header{position:relative;z-index:1;gap:var(--ms-gap-header);border-radius:var(--ms-radius) var(--ms-radius) 0 0;overflow:visible}.code-block-header .code-header-main{min-width:0;flex:1 1 auto;display:flex;align-items:center;gap:var(--ms-gap-header-main);overflow:hidden}.code-block-header .code-header-copy{min-width:0;display:grid;gap:2px}.code-block-header .code-header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ms-text-label);font-weight:500;color:var(--code-action-fg)}.code-block-header .code-header-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--code-line-number)}.code-block-header .code-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--ms-gap-header-actions);flex-wrap:wrap}.code-block-header .icon-slot{display:inline-flex;align-items:center;justify-content:center}.code-block-header .icon-slot svg,.code-block-header .icon-slot img{display:block;width:100%;height:100%}.code-diff-stats{display:inline-flex;align-items:center;gap:var(--ms-space-1_5);margin-right:var(--ms-space-1);font-size:var(--ms-text-label);font-weight:600;line-height:1;font-variant-numeric:tabular-nums}.code-diff-stat{display:inline-flex;align-items:center;padding:2px 6px;border-radius:var(--ms-radius);line-height:1}.code-diff-stat.removed{color:var(--diff-removed-fg);background:hsl(var(--ms-diff-removed) / .1)}.code-diff-stat.added{color:var(--diff-added-fg);background:hsl(var(--ms-diff-added) / .1)}.code-more-menu{position:absolute;top:100%;right:0;margin-top:4px;z-index:50;border-radius:var(--ms-radius)}.code-block-shell-content,.code-loading-placeholder{overflow:hidden;border-radius:0 0 var(--ms-radius) var(--ms-radius);contain:content}.code-block-shell-content--collapsed{height:0;min-height:0;visibility:hidden;pointer-events:none}.code-menu-enter-active,.code-menu-leave-active{transform-origin:top right}.code-menu-enter-active{transition:opacity .22s cubic-bezier(.16,1,.3,1),transform .22s cubic-bezier(.16,1,.3,1)}.code-menu-leave-active{transition:opacity .14s ease-in,transform .14s ease-in}.code-menu-enter-from{opacity:0;transform:scale(.9) translateY(-4px)}.code-menu-leave-to{opacity:0;transform:scale(.95) translateY(-2px)}.html-preview-frame__backdrop[data-v-24e66176]{position:fixed;inset:0;background-color:var(--modal-overlay);display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame[data-v-24e66176]{width:80vw;max-width:960px;height:70vh;background-color:var(--modal-bg);color:var(--modal-fg);border-radius:calc(var(--ms-radius) * 2);overflow:hidden;box-shadow:var(--ms-shadow-preview);display:flex;flex-direction:column}.html-preview-frame__header[data-v-24e66176]{display:flex;justify-content:space-between;align-items:center;padding:6.4px 12px;border-bottom:1px solid var(--code-border)}.html-preview-frame__title[data-v-24e66176]{display:inline-flex;align-items:center;gap:6.4px;font-size:12px;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot[data-v-24e66176]{width:8px;height:8px;border-radius:999px;background-color:hsl(var(--ms-success))}.html-preview-frame__label[data-v-24e66176]{white-space:nowrap}.html-preview-frame__close[data-v-24e66176]{border:none;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:var(--modal-fg)}.html-preview-frame__iframe[data-v-24e66176]{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame[data-v-24e66176]{width:100vw;height:80vh;border-radius:0}}.code-block-container[data-v-ef6e4bb8]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--vscode-editor-selectionBackground: var(--markstream-code-fallback-selection-bg);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 16px 40px -32px hsl(var(--ms-foreground) / .18);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .92);--markstream-diff-editor-bg: hsl(var(--ms-background));--markstream-diff-editor-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-bg: hsl(var(--ms-muted));--markstream-diff-unchanged-divider: hsl(var(--ms-background) / .94);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .26);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: linear-gradient(180deg, var(--code-bg) 0%, hsl(var(--ms-muted)) 100%);--markstream-diff-panel-bg-soft: var(--code-bg);--markstream-diff-panel-bg-strong: var(--code-bg);--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .42);--markstream-diff-gutter-bg: transparent;--markstream-diff-gutter-guide: hsl(var(--ms-border) / .72);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(var(--ms-muted) / .45);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: var(--diff-added-fg);--markstream-diff-removed-fg: var(--diff-removed-fg);--markstream-diff-added-line: var(--diff-added-bg);--markstream-diff-removed-line: var(--diff-removed-bg);--markstream-diff-added-inline: var(--diff-added-inline-bg);--markstream-diff-removed-inline: var(--diff-removed-inline-bg);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: var(--diff-added-bg);--markstream-diff-removed-line-fill: var(--diff-removed-bg)}.code-block-container.is-dark[data-v-ef6e4bb8]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 18px 40px -30px hsl(var(--ms-foreground) / .84);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .82);--markstream-diff-editor-bg: #121212;--markstream-diff-editor-fg: #e5e5e5;--markstream-diff-unchanged-fg: #d4d4d4;--markstream-diff-unchanged-bg: #262626;--markstream-diff-unchanged-divider: hsl(0 0% 100% / .08);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .72);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: #121212;--markstream-diff-panel-bg-soft: #121212;--markstream-diff-panel-bg-strong: #121212;--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .34);--markstream-diff-gutter-bg: linear-gradient( 180deg, hsl(0 0% 7% / .94) 0%, hsl(0 0% 7% / .98) 100% );--markstream-diff-gutter-guide: hsl(var(--ms-muted-foreground) / .08);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(0 0% 7% / .98);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: hsl(152 42% 60%);--markstream-diff-removed-fg: hsl(0 58% 58%);--markstream-diff-added-line: hsl(152 42% 60% / .18);--markstream-diff-removed-line: hsl(0 58% 58% / .18);--markstream-diff-added-inline: hsl(152 42% 60% / .28);--markstream-diff-removed-inline: hsl(0 58% 58% / .28);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: hsl(152 42% 60% / .18);--markstream-diff-removed-line-fill: hsl(0 58% 58% / .18)}.code-editor-container[data-v-ef6e4bb8]{transition:none;box-sizing:border-box;min-width:0;width:100%}.code-block-container.is-diff .code-editor-container[data-v-ef6e4bb8]{transition:none}.code-editor-layer[data-v-ef6e4bb8]{display:grid;min-width:0;position:relative}.code-editor-layer--collapsed[data-v-ef6e4bb8]{height:0;min-height:0;overflow:hidden;visibility:hidden;pointer-events:none}.code-editor-layer>.code-editor-container[data-v-ef6e4bb8]{grid-area:1 / 1;z-index:1}.code-editor-layer>pre.code-pre-fallback[data-v-ef6e4bb8]{grid-area:1 / 1;position:relative;z-index:2}.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .monaco-editor-background,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .lines-content{background:var(--vscode-editor-background, var(--markstream-code-fallback-bg))!important}.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-lines,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-line,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-line span,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .line-numbers{color:var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))!important}.code-block-container.is-diff[data-v-ef6e4bb8]{color:var(--markstream-diff-shell-fg);border-color:var(--markstream-diff-shell-border);background:var(--markstream-diff-shell-bg);box-shadow:var(--markstream-diff-shell-shadow);--vscode-editor-selectionBackground: var(--markstream-diff-action-hover);--code-fg: var(--markstream-diff-shell-fg);--code-header-bg: transparent;--code-border: var(--markstream-diff-header-border);--code-line-number: var(--markstream-diff-shell-muted);--code-action-fg: var(--markstream-diff-shell-muted)}.code-block-container.is-diff .code-editor-layer[data-v-ef6e4bb8]{background:transparent;--vscode-editor-background: var(--markstream-diff-editor-bg);--vscode-editor-foreground: var(--markstream-diff-editor-fg);--vscode-diffEditor-unchangedRegionForeground: var(--markstream-diff-unchanged-fg);--vscode-diffEditor-unchangedRegionBackground: var(--markstream-diff-unchanged-bg);--vscode-focusBorder: var(--markstream-diff-focus);--vscode-widget-shadow: var(--markstream-diff-widget-shadow);--vscode-editor-selectionBackground: color-mix( in srgb, var(--markstream-diff-editor-bg) 90%, var(--markstream-diff-editor-fg) 10% );--stream-monaco-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-editor-fg: var(--markstream-diff-editor-fg);--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg);--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg);--stream-monaco-frame-radius: 0;--stream-monaco-fixed-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-frame-border: transparent;--stream-monaco-frame-shadow: none;--stream-monaco-panel-bg: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-soft: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-strong: var(--markstream-diff-editor-bg);--stream-monaco-panel-border: transparent;--stream-monaco-pane-divider: var(--markstream-diff-pane-divider);--stream-monaco-gutter-bg: var(--markstream-diff-gutter-bg);--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide);--stream-monaco-gutter-marker-width: 4px;--stream-monaco-gutter-gap: 1ch;--stream-monaco-line-number-bg: var(--markstream-diff-line-number-bg);--stream-monaco-line-number: var(--markstream-diff-line-number);--stream-monaco-line-number-active: var(--markstream-diff-line-number-active);--stream-monaco-line-number-left: 0px;--stream-monaco-line-number-width: 2ch;--stream-monaco-line-number-padding-left: 2ch;--stream-monaco-line-number-padding-right: 1ch;--stream-monaco-line-number-separator-width: 2px;--stream-monaco-layout-character-width: var(--markstream-code-layout-character-width, 1ch);--stream-monaco-line-number-box-width: calc( var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-line-number-separator-width) );--stream-monaco-diff-code-gap: 1ch;--stream-monaco-diff-code-padding: 0px;--stream-monaco-line-number-gap-to-code: var(--stream-monaco-diff-code-gap);--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) );--stream-monaco-original-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-original-scrollable-left: var(--stream-monaco-original-margin-width);--stream-monaco-original-scrollable-width: calc( 100% - var(--stream-monaco-original-margin-width) );--stream-monaco-modified-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-modified-scrollable-left: var(--stream-monaco-modified-margin-width);--stream-monaco-modified-scrollable-width: calc( 100% - var(--stream-monaco-modified-margin-width) );--stream-monaco-added-fg: var(--markstream-diff-added-fg);--stream-monaco-removed-fg: var(--markstream-diff-removed-fg);--stream-monaco-added-line: var(--markstream-diff-added-line);--stream-monaco-removed-line: var(--markstream-diff-removed-line);--stream-monaco-added-inline: var(--markstream-diff-added-inline);--stream-monaco-removed-inline: var(--markstream-diff-removed-inline);--stream-monaco-added-outline: transparent;--stream-monaco-removed-outline: transparent;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border);--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border);--stream-monaco-added-line-shadow: none;--stream-monaco-removed-line-shadow: none;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter);--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter);--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill);--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill);--stream-monaco-added-border: hsl(var(--ms-diff-added) / .25);--stream-monaco-removed-border: hsl(var(--ms-diff-removed) / .25);--stream-monaco-widget-shadow: var(--markstream-diff-widget-shadow)}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers{left:var(--stream-monaco-line-number-left)!important;width:var(--stream-monaco-line-number-width)!important;min-width:var(--stream-monaco-line-number-width)!important;box-sizing:content-box!important;background:var(--stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg))!important;padding-left:var(--stream-monaco-line-number-padding-left, 2ch)!important;padding-right:var(--stream-monaco-line-number-padding-right, 1ch)!important;border-right:var(--stream-monaco-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg)!important;text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums;box-shadow:none}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays .line-numbers *{text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-editor .stream-monaco-fallback-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-delete.line-numbers{background:var(--stream-monaco-removed-line-fill)!important;color:var(--stream-monaco-removed-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-editor .stream-monaco-fallback-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-insert.line-numbers{background:var(--stream-monaco-added-line-fill)!important;color:var(--stream-monaco-added-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .monaco-editor,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays{--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) ) !important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff){--markstream-code-line-number-box-width: calc( var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + 2px );--markstream-code-content-left: calc( var(--markstream-code-line-number-box-width) + var(--markstream-code-layout-character-width, 1ch) )}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin-view-overlays{width:var(--markstream-code-content-left)!important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .line-numbers{left:0!important;width:2ch!important;min-width:2ch!important;box-sizing:content-box!important;padding-left:2ch!important;padding-right:1ch!important;border-right:2px solid var(--vscode-editor-background)!important;text-align:var(--markstream-code-line-number-align, right)!important;font-variant-numeric:tabular-nums}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .monaco-scrollable-element.editor-scrollable{left:var(--markstream-code-content-left)!important;width:calc(100% - var(--markstream-code-content-left))!important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .lines-content{left:0!important}.code-editor-container[data-markstream-host-hidden=true][data-v-ef6e4bb8]{position:absolute;inset:0;width:100%;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden;visibility:hidden;pointer-events:none}pre.code-pre-fallback[data-v-ef6e4bb8]{margin:0;box-sizing:border-box;width:100%;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left, 52px);background:var(--markstream-code-fallback-bg, var(--code-bg, #fff));color:var(--markstream-code-fallback-fg, var(--code-fg));backface-visibility:visible;transform:none;-webkit-font-smoothing:auto;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-weight:400;font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace )}pre.code-pre-fallback[data-v-ef6e4bb8] code{font-size:inherit;font-weight:inherit;line-height:inherit;font-family:inherit}pre.code-pre-fallback.is-wrap[data-v-ef6e4bb8]{white-space:pre-wrap;overflow-wrap:anywhere}pre.code-pre-fallback.markstream-pre--diff-preview[data-v-ef6e4bb8]{padding-left:0;padding-right:0}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview{background:var(--markstream-diff-editor-bg);transition:none}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-pane{box-sizing:border-box;padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added:after,.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after,.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays>.gutter-insert>.cmdr.gutter-insert{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-added-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays>.gutter-delete>.cmdr.gutter-delete{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-removed-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}@media(prefers-reduced-motion:reduce){.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview{transition:none}}.code-block-container.is-rendering .code-height-placeholder[data-v-ef6e4bb8]{background-size:400% 100%;animation:code-skeleton-shimmer-ef6e4bb8 1.2s ease-in-out infinite;min-height:var(--ms-size-skeleton-min-height);background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%)}.code-loading-placeholder[data-v-ef6e4bb8]{padding:16px;min-height:var(--ms-size-skeleton-min-height)}.loading-skeleton[data-v-ef6e4bb8]{display:flex;flex-direction:column;gap:12px}.skeleton-line[data-v-ef6e4bb8]{height:16px;background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%);background-size:400% 100%;animation:code-skeleton-shimmer-ef6e4bb8 1.2s ease-in-out infinite;border-radius:calc(var(--ms-radius) * .5)}.skeleton-line.short[data-v-ef6e4bb8]{width:60%}.code-block-container[data-markstream-viewport-pending=true] .code-height-placeholder[data-v-ef6e4bb8],.code-block-container[data-markstream-viewport-pending=true] .skeleton-line[data-v-ef6e4bb8]{animation:none}@keyframes code-skeleton-shimmer-ef6e4bb8{0%{background-position:100% 0}to{background-position:0 0}}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center{border-radius:var(--ms-radius)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;min-height:28px!important;transition:background-color .14s ease,border-color .14s ease!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 4%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 10%,transparent)!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center{background:transparent!important;border-color:transparent!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 6%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 12%,transparent)!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center .stream-monaco-unchanged-count:before{content:"";display:inline-block;width:14px;height:14px;margin-right:4px;flex-shrink:0;background:currentColor;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}[data-v-ef6e4bb8] .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background)}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .diffOverview,[data-v-ef6e4bb8] .stream-monaco-diff-root .decorationsOverviewRuler{display:none!important;width:0!important;min-width:0!important;max-width:0!important;border:0!important;background:transparent!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-diff-editor{border:0!important;border-radius:0!important;box-shadow:none!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-clickable)>*:not(a){visibility:hidden!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines-compact .text{opacity:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root{--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide) !important;--stream-monaco-gutter-gap: var(--markstream-diff-gutter-gap) !important;--stream-monaco-line-number: var(--markstream-diff-line-number) !important;--stream-monaco-line-number-active: var(--markstream-diff-line-number-active) !important;--stream-monaco-added-fg: var(--markstream-diff-added-fg) !important;--stream-monaco-removed-fg: var(--markstream-diff-removed-fg) !important;--stream-monaco-added-line: var(--markstream-diff-added-line) !important;--stream-monaco-removed-line: var(--markstream-diff-removed-line) !important;--stream-monaco-added-inline: var(--markstream-diff-added-inline) !important;--stream-monaco-removed-inline: var(--markstream-diff-removed-inline) !important;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border) !important;--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border) !important;--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill) !important;--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill) !important;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter) !important;--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter) !important;--stream-monaco-added-line-shadow: none !important;--stream-monaco-removed-line-shadow: none !important;--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;box-sizing:border-box;min-width:0;width:100%}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .overflow-guard,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side),[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .overflow-guard{min-width:0!important;width:100%!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-scrollable-element.editor-scrollable,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-scrollable-element.editor-scrollable{left:var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width))!important;width:calc(100% - var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width)))!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .editor.modified .view-lines .view-line.stream-monaco-line-insert-fill,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .editor.original .view-lines .view-line.stream-monaco-line-delete-fill{width:1000000px!important}.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-fallback-inline-delete-line{box-sizing:border-box;padding-left:var(--stream-monaco-diff-code-padding, 0px)}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .scrollbar.horizontal,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .scrollbar.horizontal{display:none!important;height:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .view-lines.line-delete{margin-left:0!important;width:100%!important;background:var(--stream-monaco-removed-line-fill)!important;box-shadow:var(--stream-monaco-removed-line-shadow)!important;display:block!important;height:-moz-max-content!important;height:max-content!important;min-height:18px!important;overflow:visible!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .gutter-delete,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .inline-deleted-margin-view-zone,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .stream-monaco-fallback-inline-delete-margin{background:var(--stream-monaco-removed-gutter),var(--stream-monaco-removed-line-fill)!important;display:block!important;height:100%!important;min-height:18px!important;overflow:visible!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-unchanged-bridge-source),[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;background:var(--stream-monaco-unchanged-bg)!important;color:var(--stream-monaco-unchanged-fg)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{right:calc(var(--stream-monaco-gutter-marker-width) - var(--stream-monaco-unchanged-rail-width) / 2 + (var(--stream-monaco-gutter-gap) * 2))!important;width:auto!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important;color:var(--markstream-diff-unchanged-fg)!important;padding-left:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important;padding-right:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge.stream-monaco-diff-unchanged-bridge-line-info .stream-monaco-unchanged-rail,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail{border-right-color:var(--markstream-diff-unchanged-divider)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal{border-bottom-color:transparent!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-both .stream-monaco-unchanged-reveal:first-child{border-bottom-color:var(--markstream-diff-unchanged-divider)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-top-only .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-bottom-only .stream-monaco-unchanged-reveal{border-bottom:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-meta,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-count,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-metadata-label,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{color:var(--markstream-diff-unchanged-fg)!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center{align-items:center;justify-content:center}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center{align-items:center;justify-content:center!important;position:relative}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center:not(.stream-monaco-clickable){opacity:0!important;pointer-events:none!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center .stream-monaco-unchanged-meta{justify-content:center!important;padding:0 28px!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center>div:first-child{align-items:center;display:flex;justify-content:center!important;min-width:100%;width:100%!important}[data-v-ef6e4bb8] .markstream-inline-fold-proxy{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:calc(var(--ms-radius) * .5);box-shadow:none;cursor:pointer;inset:0;padding:0;pointer-events:auto;position:absolute;z-index:2}[data-v-ef6e4bb8] .markstream-inline-fold-proxy:hover,[data-v-ef6e4bb8] .markstream-inline-fold-proxy:focus-visible{background:transparent}[data-v-ef6e4bb8] .markstream-inline-fold-proxy:focus-visible{outline:1px solid var(--vscode-focusBorder, currentColor);outline-offset:-1px}.math-inline-wrapper[data-v-6c556261]{position:relative;display:inline-block}.math-inline[data-v-6c556261]{display:inline-block;vertical-align:middle}.math-inline--fallback[data-v-6c556261]{white-space:pre-wrap}.math-inline__loading[data-v-6c556261]{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner[data-v-6c556261]{width:16px;height:16px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-6c556261],.table-node-fade-leave-active[data-v-6c556261]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-6c556261],.table-node-fade-leave-to[data-v-6c556261]{opacity:0}.sr-only[data-v-6c556261]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.math-block[data-v-939191ad]{min-height:var(--ms-size-math-min-height);transition:min-height var(--ms-duration-overlay) var(--ms-ease-standard)}.math-loading-overlay[data-v-939191ad]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px);min-height:var(--ms-size-math-min-height)}.math-loading-spinner[data-v-939191ad]{width:20px;height:20px;border:2px solid color-mix(in srgb,var(--loading-spinner) 15%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);border-radius:50%;animation:math-spin-939191ad .8s linear infinite}@keyframes math-spin-939191ad{to{transform:rotate(360deg)}}.math-rendering[data-v-939191ad]{opacity:.3;transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.math-block__fallback[data-v-939191ad]{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.math-fade-enter-active[data-v-939191ad],.math-fade-leave-active[data-v-939191ad]{transition:all var(--ms-duration-slow) var(--ms-ease-standard)}.math-fade-enter-from[data-v-939191ad],.math-fade-leave-to[data-v-939191ad]{opacity:0}.action-icon{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg{display:block;width:100%;height:100%}.mermaid-block-container[data-v-73c385f8]{margin:var(--ms-flow-diagram-y) 0;border-color:var(--diagram-border)}.mermaid-block-header[data-v-73c385f8]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border)}.mermaid-label-text[data-v-73c385f8]{color:var(--code-action-fg)}.mermaid-mode-toggle-group[data-v-73c385f8]{background:transparent}.mermaid-mode-btn[data-v-73c385f8]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6}.mermaid-mode-btn[data-v-73c385f8]:hover{opacity:.9}.mermaid-mode-btn.is-active[data-v-73c385f8]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.mermaid-header-actions[data-v-73c385f8]{gap:var(--ms-gap-header-actions)}.mermaid-action-btn[data-v-73c385f8]{font-family:inherit;font-size:var(--ms-text-label);color:var(--code-action-fg)}.mermaid-action-btn[data-v-73c385f8]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.mermaid-action-btn[data-v-73c385f8]:active{transform:scale(.98)}.mermaid-source-panel[data-v-73c385f8]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.mermaid-source-code[data-v-73c385f8]{color:hsl(var(--ms-foreground))}.mermaid-preview-area[data-v-73c385f8]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-standard)}.mermaid-modal-overlay[data-v-73c385f8]{background:var(--modal-overlay)}.mermaid-modal-panel[data-v-73c385f8]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}._mermaid[data-v-73c385f8]{position:relative;font-family:inherit;content-visibility:auto;contain:content;contain-intrinsic-size:var(--ms-size-diagram-min-height) 240px}._mermaid[data-v-73c385f8] [data-mermaid-svg-layer]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;min-height:100%}._mermaid[data-v-73c385f8] svg{width:100%;height:auto;max-height:100%;display:block}.fullscreen ._mermaid[data-v-73c385f8] svg{max-height:none}.fullscreen[data-v-73c385f8]{width:100%;max-height:100%!important;height:100%!important}.mermaid-dialog-enter-from[data-v-73c385f8],.mermaid-dialog-leave-to[data-v-73c385f8]{opacity:0}.mermaid-dialog-enter-active[data-v-73c385f8],.mermaid-dialog-leave-active[data-v-73c385f8]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.mermaid-dialog-enter-from .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-to .dialog-panel[data-v-73c385f8]{transform:translateY(8px) scale(.98);opacity:.98}.mermaid-dialog-enter-to .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-from .dialog-panel[data-v-73c385f8]{transform:translateY(0) scale(1);opacity:1}.mermaid-dialog-enter-active .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-active .dialog-panel[data-v-73c385f8]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-block-container[data-v-de34ec4b]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.infographic-block-header[data-v-de34ec4b]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.infographic-label[data-v-de34ec4b]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}.action-icon[data-v-de34ec4b]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot[data-v-de34ec4b]{display:inline-flex;align-items:center;justify-content:center}.icon-slot[data-v-de34ec4b] svg{display:block;width:100%;height:100%}.infographic-mode-toggle[data-v-de34ec4b]{background:transparent}.infographic-mode-btn[data-v-de34ec4b]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:color .15s,background-color .15s,opacity .15s}.infographic-mode-btn[data-v-de34ec4b]:hover{opacity:.9}.infographic-mode-btn.is-active[data-v-de34ec4b]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.infographic-header-actions[data-v-de34ec4b]{gap:var(--ms-gap-header-actions)}.infographic-action-btn[data-v-de34ec4b]{font-family:inherit;color:var(--code-action-fg);transition:background-color .15s,color .15s}.infographic-action-btn[data-v-de34ec4b]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.infographic-action-btn[data-v-de34ec4b]:active{transform:scale(.98)}.infographic-source[data-v-de34ec4b]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.infographic-source-code[data-v-de34ec4b]{color:hsl(var(--ms-foreground))}.infographic-preview[data-v-de34ec4b]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-fast)}.infographic-pending-source[data-v-de34ec4b]{position:absolute;inset:0;z-index:1;margin:0;padding:var(--ms-inset-panel-body);overflow:auto;color:hsl(var(--ms-foreground));text-align:left;background:var(--diagram-bg)}.infographic-modal-overlay[data-v-de34ec4b]{background:var(--modal-overlay)}.infographic-modal-panel[data-v-de34ec4b]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}.fullscreen[data-v-de34ec4b]{width:100%;max-height:100%!important;height:100%!important}.infographic-dialog-enter-from[data-v-de34ec4b],.infographic-dialog-leave-to[data-v-de34ec4b]{opacity:0}.infographic-dialog-enter-active[data-v-de34ec4b],.infographic-dialog-leave-active[data-v-de34ec4b]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-dialog-enter-from .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-to .dialog-panel[data-v-de34ec4b]{transform:translateY(8px) scale(.98);opacity:.98}.infographic-dialog-enter-to .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-from .dialog-panel[data-v-de34ec4b]{transform:translateY(0) scale(1);opacity:1}.infographic-dialog-enter-active .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-active .dialog-panel[data-v-de34ec4b]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.d2-block-container[data-v-3b434cf5]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.d2-block-header[data-v-3b434cf5]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.d2-mode-toggle[data-v-3b434cf5]{background:transparent}.mode-btn[data-v-3b434cf5]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:opacity .2s,color .2s,background-color .2s}.mode-btn[data-v-3b434cf5]:hover{opacity:.9}.mode-btn.is-active[data-v-3b434cf5]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.d2-header-actions[data-v-3b434cf5]{gap:var(--ms-gap-header-actions)}.d2-action-btn[data-v-3b434cf5]{color:var(--code-action-fg);opacity:.7;transition:opacity .2s,background-color .15s,color .15s}.d2-action-btn[data-v-3b434cf5]:hover{opacity:1;background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.d2-action-btn[data-v-3b434cf5]:disabled{opacity:.3;cursor:not-allowed}.d2-block-body[data-v-3b434cf5]{position:relative}.d2-source[data-v-3b434cf5]{padding:var(--ms-inset-panel-body) var(--ms-inset-panel-x);font-family:var(--vscode-editor-font-family, "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}.d2-code[data-v-3b434cf5]{white-space:pre;font-size:14px;line-height:1.5}.d2-render[data-v-3b434cf5]{max-height:var(--ms-size-code-max-height);overflow:auto}.d2-svg[data-v-3b434cf5] svg.markstream-d2-root-svg{width:100%;max-width:100%;height:auto;display:block}.d2-label[data-v-3b434cf5]{font-size:var(--ms-text-label)}.action-icon[data-v-3b434cf5]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.d2-error[data-v-3b434cf5]{color:hsl(var(--ms-destructive))}.markstream-virtual-timeline[data-v-1303f06e]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;overflow:auto;overflow-anchor:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__spacer[data-v-1303f06e],.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e]{opacity:0;visibility:hidden;pointer-events:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e],.markstream-virtual-timeline__item.is-restored-height-floor[data-v-1303f06e]{height:var(--markstream-virtual-item-size);overflow:hidden}.markstream-virtual-timeline__restore-loading[data-v-1303f06e]{position:absolute;top:0;left:0;right:0;z-index:10;display:grid;place-items:center;pointer-events:none;overflow:hidden;background:Canvas;contain:strict}.markstream-virtual-timeline__restore-loading-card[data-v-1303f06e]{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid rgb(148 163 184 / 32%);border-radius:999px;background:#ffffffeb;color:#334155;font-size:13px;box-shadow:0 8px 24px #0f172a14}.markstream-virtual-timeline__restore-spinner[data-v-1303f06e]{width:14px;height:14px;border:2px solid rgb(148 163 184 / 35%);border-top-color:#334155;border-radius:999px;animation:markstream-timeline-restore-spin-1303f06e .8s linear infinite}@keyframes markstream-timeline-restore-spin-1303f06e{to{transform:rotate(360deg)}}.markstream-virtual-timeline__spacer[data-v-1303f06e]{flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__item[data-v-1303f06e]{display:flow-root;flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__default-item[data-v-1303f06e]{margin:8px 0;padding:10px 12px;border:1px solid rgb(148 163 184 / 32%);border-radius:8px;background:#f8fafc;color:#0f172a;line-height:1.5;white-space:pre-wrap}.markstream-virtual-timeline__default-item--system-divider[data-v-1303f06e]{border:0;background:transparent;color:#64748b;font-size:12px;text-align:center}.markstream-virtual-timeline__default-item--error[data-v-1303f06e]{border-color:#f8717173;background:#fef2f2;color:#991b1b}.markstream-virtual-timeline__status[data-v-1303f06e]{display:inline-flex;margin-right:8px;color:#475569;font-size:12px;text-transform:uppercase}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.17.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.md[data-v-f0354d0f]{font:400 var(--content-font-size)/1.6 var(--font-ui);line-height:round(calc(var(--content-font-size) * 1.625),1px);color:var(--color-text);word-break:break-word}.md[data-v-f0354d0f] .markdown-renderer{font:400 var(--content-font-size)/1.6 var(--font-ui);line-height:round(calc(var(--content-font-size) * 1.625),1px);color:var(--color-text)}.md[data-v-f0354d0f] .markstream-vue,.md[data-v-f0354d0f] .markdown-renderer{--code-bg: var(--color-surface-sunken);--code-fg: var(--color-text);--code-border: var(--color-line);--code-header-bg: var(--color-surface);--code-action-fg: var(--color-text-muted);--code-action-hover-fg: var(--color-accent);--markstream-code-fallback-bg: var(--color-surface-sunken);--markstream-code-fallback-fg: var(--color-text);--markstream-code-border-color: var(--color-line);--inline-code-bg: var(--color-inline-code-bg);--inline-code-fg: var(--color-text);--inline-code-border: transparent}.md[data-v-f0354d0f] .md-file-link{appearance:none;display:inline;border:0;padding:0;background:transparent;color:var(--color-accent-hover);font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;cursor:pointer}.md[data-v-f0354d0f] .md-file-link:hover{color:var(--color-accent)}.md[data-v-f0354d0f] .inline-code .md-file-link{text-underline-offset:1.5px}.md[data-v-f0354d0f] .markdown-renderer p,.md[data-v-f0354d0f] .markdown-renderer li{font-size:var(--content-font-size);line-height:round(calc(var(--content-font-size) * 1.625),1px)}.md[data-v-f0354d0f] .markdown-renderer blockquote,.md[data-v-f0354d0f] .markdown-renderer td,.md[data-v-f0354d0f] .markdown-renderer th{font-size:var(--md-b2)}.md[data-v-f0354d0f] .markdown-renderer img{background:var(--media-alpha-canvas)}.md[data-v-f0354d0f] strong{color:color-mix(in srgb,var(--color-text) 86%,var(--color-text-muted));font-weight:var(--weight-semibold)}.md[data-v-f0354d0f] h1,.md[data-v-f0354d0f] h2,.md[data-v-f0354d0f] h3,.md[data-v-f0354d0f] h4{color:var(--color-text);font-optical-sizing:auto;font-weight:600;margin:.85em 0 .35em}.md[data-v-f0354d0f] h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px);border-bottom:1px solid var(--color-line);padding-bottom:4px}.md[data-v-f0354d0f] h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.md[data-v-f0354d0f] h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.md[data-v-f0354d0f] h4{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px);color:var(--color-text-muted)}.md[data-v-f0354d0f] p{margin:0}.md[data-v-f0354d0f] .node-slot+.node-slot{margin-top:var(--content-font-size)}.md[data-v-f0354d0f] .node-slot+.node-slot:has(h1),.md[data-v-f0354d0f] .node-slot+.node-slot:has(h2){margin-top:calc(var(--content-font-size) * 2)}.md[data-v-f0354d0f] .node-slot+.node-slot:has(h3),.md[data-v-f0354d0f] .node-slot+.node-slot:has(h4){margin-top:calc(var(--content-font-size) * 1.5)}.md[data-v-f0354d0f] ul,.md[data-v-f0354d0f] ol{--md-dot: round(calc(var(--content-font-size) * .375), 1px);list-style:none;margin:0;padding-left:calc(var(--content-font-size) * 2)}.md[data-v-f0354d0f] li{position:relative;margin:0;padding:0}.md[data-v-f0354d0f] li+li{margin-top:round(calc(var(--content-font-size) * .75),1px)}.md[data-v-f0354d0f] li>ul,.md[data-v-f0354d0f] li>ol{margin-top:round(calc(var(--content-font-size) * .75),1px);padding-left:calc(var(--content-font-size) * 1.5)}.md[data-v-f0354d0f] ul>li:before{content:"";position:absolute;left:calc((var(--md-dot) + var(--content-font-size) * 2) / -2);top:calc((round(calc(var(--content-font-size) * 1.625),1px) - var(--md-dot)) / 2);width:var(--md-dot);height:var(--md-dot);border-radius:50%;background:color-mix(in srgb,var(--color-text) 90%,transparent)}.md[data-v-f0354d0f] ul>li:has(>input[type=checkbox]):before,.md[data-v-f0354d0f] ul>li:has(>p>input[type=checkbox]):before{content:none}.md[data-v-f0354d0f] ul ul>li:before{background:transparent;border:1px solid color-mix(in srgb,var(--color-text) 90%,transparent);box-sizing:border-box}.md[data-v-f0354d0f] ol{counter-reset:md-ol}.md[data-v-f0354d0f] ol[start],.md[data-v-f0354d0f] ol:has(>li[value]){counter-reset:none;list-style:decimal}.md[data-v-f0354d0f] ol[start]>li,.md[data-v-f0354d0f] ol:has(>li[value])>li{counter-increment:none}.md[data-v-f0354d0f] ol[start]>li:before,.md[data-v-f0354d0f] ol:has(>li[value])>li:before{content:none}.md[data-v-f0354d0f] ol>li{counter-increment:md-ol}.md[data-v-f0354d0f] ol>li:before{content:counter(md-ol) ".";position:absolute;top:0;left:calc(var(--content-font-size) * -2);width:calc(var(--content-font-size) * 2);line-height:round(calc(var(--content-font-size) * 1.625),1px);text-align:center;color:var(--color-text)}.md[data-v-f0354d0f] :not(pre)>code,.md[data-v-f0354d0f] .inline-code{font:.9em var(--font-mono);background:var(--color-inline-code-bg);color:var(--color-text);border:0;padding:0 4px;border-radius:var(--radius-sm)}.md[data-v-f0354d0f] strong code,.md[data-v-f0354d0f] strong .inline-code,.md[data-v-f0354d0f] b code,.md[data-v-f0354d0f] b .inline-code{font-weight:var(--weight-semibold)}.md[data-v-f0354d0f] .code-block-container{margin:.6em 0;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow:hidden;--vscode-editor-font-size: var(--text-sm);--vscode-editor-line-height: calc(var(--text-sm) * 1.65)}.md[data-v-f0354d0f] .code-block-header{background:var(--color-surface);border-bottom:.5px solid var(--color-line);padding:4px 6px 4px 12px;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.md[data-v-f0354d0f] .code-block-header *{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.md[data-v-f0354d0f] .code-block-header .code-header-main{font-family:var(--font-ui)}.md[data-v-f0354d0f] .code-block-header .code-action-btn{color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-f0354d0f] .code-block-header .code-action-btn:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-f0354d0f] .code-block-header .code-action-btn:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-f0354d0f] .code-block-header .code-action-btn *{pointer-events:none}.md[data-v-f0354d0f] .code-block-shell-content,.md[data-v-f0354d0f] .markstream-pre{background:var(--color-well)}.md[data-v-f0354d0f] .code-editor-container{line-height:1.65;--diffs-gap-block: var(--space-3)}.md[data-v-f0354d0f] .code-editor-container diffs-container{--diffs-line-height: 1.65em}.md[data-v-f0354d0f] .code-pre-fallback>.markstream-pre__line-numbers{display:none}.md[data-v-f0354d0f] .code-block-container .code-pre-fallback{padding-left:1ch;line-height:1.65!important}.md[data-v-f0354d0f] .code-block-container pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers),.md[data-v-f0354d0f] .markstream-pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers){margin:0;padding:12px 14px;overflow-x:auto;font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-f0354d0f] .code-block-container pre code{font:inherit;color:var(--color-text);background:none;border:none;padding:0;border-radius:0}.md[data-v-f0354d0f] .markstream-pre,.md[data-v-f0354d0f] .code-pre-fallback,.md[data-v-f0354d0f] .code-block-shell-content pre:not(.shiki),.md[data-v-f0354d0f] .code-block-shell-content pre:not(.shiki) code{color:var(--color-text)}.md[data-v-f0354d0f] a{color:var(--color-accent);text-decoration:none}.md[data-v-f0354d0f] a:hover{text-decoration:underline}.md[data-v-f0354d0f] .katex-display{overflow-x:auto;overflow-y:hidden;padding:2px 0 6px;margin:.6em 0}.md[data-v-f0354d0f] .math-inline{vertical-align:baseline}.md[data-v-f0354d0f] blockquote{position:relative;margin:0;padding:0 0 0 round(calc(var(--content-font-size) * 1.5),1px);border-left:none;color:var(--color-text)}.md[data-v-f0354d0f] blockquote:before{content:"";position:absolute;left:calc(round(calc(var(--content-font-size) * 1.5),1px)/2 - 1px);top:2px;bottom:2px;width:2px;border-radius:2px;background:var(--color-line)}.md[data-v-f0354d0f] .blockquote>.paragraph-node{margin:0}.md[data-v-f0354d0f] .blockquote>.paragraph-node+.paragraph-node{margin-top:var(--content-font-size)}.md[data-v-f0354d0f] hr{border:none;border-top:1px solid var(--color-line);margin:0}.md[data-v-f0354d0f] table:not(.table-node){border-collapse:collapse;font-size:var(--text-lg);margin:.5em 0}.md[data-v-f0354d0f] table:not(.table-node) th,.md[data-v-f0354d0f] table:not(.table-node) td{border:1px solid var(--color-line);padding:4px 10px;text-align:left}.md[data-v-f0354d0f] table:not(.table-node) th{background:var(--color-surface);color:var(--color-text);font-weight:var(--weight-medium)}.md[data-v-f0354d0f] .table-node-wrapper{width:100%;max-width:100%!important;min-width:0;overflow-x:auto!important;scrollbar-gutter:auto!important;position:relative;--table-cell-cap: var(--p-table-cell-max)}.md[data-v-f0354d0f] .table-node{--table-border: var(--color-line);--table-header-bg: var(--color-surface);font-size:var(--text-lg);margin:.5em 0;width:max-content!important;min-width:100%;max-width:none!important;table-layout:auto!important}.md[data-v-f0354d0f] .table-node th,.md[data-v-f0354d0f] .table-node td{text-align:left;vertical-align:top;max-width:var(--table-cell-cap)}.md[data-v-f0354d0f] .table-node .text-node{display:inline-block;max-width:var(--table-cell-cap);vertical-align:top}.md[data-v-f0354d0f] .md-table-fade{display:none;position:absolute;top:0;bottom:0;right:0;width:36px;z-index:1;background:linear-gradient(to right,transparent,color-mix(in srgb,var(--color-bg) 65%,transparent) 55%,var(--color-bg));pointer-events:none;transition:opacity var(--duration-base) var(--ease-out)}.md[data-v-f0354d0f] .md-table-at-end .md-table-fade{opacity:0}.md[data-v-f0354d0f] .md-table-toggle{display:none;position:absolute;top:6px;right:6px;z-index:2;align-items:center;justify-content:center;width:26px;height:26px;color:var(--color-text-muted);background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm);cursor:pointer;opacity:0;transition:opacity var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}@container (min-width: 760px){.md[data-v-f0354d0f] .md-table-fade.md-table-toggle--show,.md[data-v-f0354d0f] .md-table-toggle.md-table-toggle--show{display:block}.md[data-v-f0354d0f] .md-table-toggle.md-table-toggle--show{display:inline-flex}}.md[data-v-f0354d0f] .table-node-wrapper:hover .md-table-toggle.md-table-toggle--show,.md[data-v-f0354d0f] .table-node-wrapper:focus-within .md-table-toggle.md-table-toggle--show,.md[data-v-f0354d0f] .table-node-wrapper.md-table-wide .md-table-toggle.md-table-toggle--show{opacity:1}.md[data-v-f0354d0f] .md-table-toggle:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-f0354d0f] .md-table-toggle:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-f0354d0f] .md-table-toggle svg{display:block}.md[data-v-f0354d0f] .table-node tbody tr:hover{background-color:transparent!important}.md-frontmatter[data-v-f0354d0f]{margin:0 0 var(--space-2);padding:var(--space-3) var(--space-4);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow-x:auto;color:var(--color-text-muted);font:var(--text-sm)/1.65 var(--font-mono)}.diff-wrap[data-v-f0354d0f]{margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden}.diff-bar[data-v-f0354d0f]{display:flex;align-items:center;gap:6px;padding:4px 12px;background:var(--color-surface);border-bottom:1px solid var(--color-line);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.diff-lang[data-v-f0354d0f]{margin-right:auto}.diff-copy[data-v-f0354d0f]{display:inline-flex;align-items:center;justify-content:center;color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;padding:2px 6px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.diff-copy[data-v-f0354d0f]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.diff-copy[data-v-f0354d0f]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.diff-pre[data-v-f0354d0f]{margin:0;padding:12px 0;overflow-x:auto;background:var(--color-surface-sunken)}.diff-pre code[data-v-f0354d0f]{display:block;width:max-content;min-width:100%;font:var(--text-sm)/1.65 var(--font-mono);color:var(--color-text)}.diff-line[data-v-f0354d0f]{display:block;width:100%;padding:0 14px}.diff-sign[data-v-f0354d0f]{display:inline-block;width:14px;text-align:center;color:var(--color-text-muted);user-select:none}.diff-text[data-v-f0354d0f]{color:var(--color-text)}.diff-add[data-v-f0354d0f]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.diff-add .diff-sign[data-v-f0354d0f]{color:var(--color-success)}.diff-del[data-v-f0354d0f]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diff-del .diff-sign[data-v-f0354d0f]{color:var(--color-danger)}.diff-hunk[data-v-f0354d0f]{background:var(--color-surface)}.diff-hunk .diff-text[data-v-f0354d0f]{color:var(--color-text-muted)}.md[data-v-f0354d0f],.md .markdown-renderer[data-v-f0354d0f]{font-family:var(--sans)}.md .code-block-container[data-v-f0354d0f],.md .diff-wrap[data-v-f0354d0f]{border-radius:var(--radius-md)}.md :not(pre)>code[data-v-f0354d0f],.md .inline-code[data-v-f0354d0f]{border-radius:var(--radius-sm)}.upd[data-v-2b5c23f7]{display:inline-flex;flex:none;-webkit-app-region:no-drag;animation:upd-in-2b5c23f7 var(--duration-base) var(--ease-out)}@keyframes upd-in-2b5c23f7{0%{opacity:0;transform:scale(.85)}}.upd-pill[data-v-2b5c23f7]{display:inline-flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-warning);color:var(--color-text-on-accent);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);line-height:var(--leading-normal);white-space:nowrap;cursor:pointer;transition:filter var(--duration-fast) var(--ease-out)}.upd-pill[data-v-2b5c23f7]:hover{filter:brightness(1.1)}.upd-pill[data-v-2b5c23f7]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.upd-pill-icon[data-v-2b5c23f7]{flex:none;color:var(--color-text-on-accent)}.upd[data-state=downloading] .upd-pill-text[data-v-2b5c23f7]{display:inline-block;min-width:4ch;text-align:left;font-variant-numeric:tabular-nums}@container sidebar-col (max-width: 250px){.upd-pill[data-v-2b5c23f7]{padding:var(--space-1)}.upd-pill-text[data-v-2b5c23f7]{display:none}}.upd-meta[data-v-2b5c23f7]{margin:0;font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-faint)}.upd-message[data-v-2b5c23f7]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted);word-break:break-all}.upd-notes[data-v-2b5c23f7]{margin-top:var(--space-3);padding-top:var(--space-3);border-top:1px solid var(--color-line);max-height:min(360px,45vh);overflow-y:auto;font-size:var(--text-sm);line-height:var(--leading-normal);color:var(--color-text)}.upd-notes-title[data-v-2b5c23f7]{margin:0 0 var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-medium);color:var(--color-text-faint)}.upd-notes[data-v-2b5c23f7] ul,.upd-notes[data-v-2b5c23f7] p{margin:0}.upd-notes[data-v-2b5c23f7] li+li{margin-top:var(--space-1)}.upd-notes[data-v-2b5c23f7] h3{margin:var(--space-3) 0 var(--space-1);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:var(--leading-normal);color:var(--color-text)}.upd-notes[data-v-2b5c23f7] h3:first-child{margin-top:0}.upd-notes[data-v-2b5c23f7]:first-child{margin-top:0;padding-top:0;border-top:none}.upd-foot[data-v-2b5c23f7]{display:flex;flex-direction:column;align-items:stretch;gap:var(--space-3);width:100%}.upd-foot-actions[data-v-2b5c23f7]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2)}.upd-auto[data-v-2b5c23f7]{align-self:flex-end}.upd-progress[data-v-2b5c23f7]{margin-top:var(--space-3);height:var(--space-1);border-radius:var(--radius-xs);background:var(--color-line);overflow:hidden}.upd-progress-fill[data-v-2b5c23f7]{height:100%;border-radius:var(--radius-xs);background:var(--color-accent);transition:width var(--duration-base) var(--ease-out)}.user-menu-trigger[data-v-ee9821b4]{display:flex;align-items:center;gap:var(--sb-gap);width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);cursor:pointer;text-align:left}.user-menu-trigger[data-v-ee9821b4]:hover,.user-menu-trigger[aria-expanded=true][data-v-ee9821b4]{background:var(--sb-hover)}.user-menu-trigger[data-v-ee9821b4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.user-menu-trigger svg[data-v-ee9821b4]{flex:none}.user-menu-avatar[data-v-ee9821b4]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex:none;border-radius:var(--radius-full);background:var(--color-surface-sunken);color:var(--color-text-muted);overflow:hidden}.user-menu-avatar img[data-v-ee9821b4]{width:100%;height:100%;object-fit:cover}.user-menu-name[data-v-ee9821b4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-menu[data-v-ee9821b4]{position:fixed;top:0;left:0;z-index:var(--z-dropdown);max-height:calc(100vh - 16px);overflow-y:auto;overflow-x:hidden}.user-submenu[data-v-ee9821b4]{position:fixed;top:0;left:0;z-index:var(--z-dropdown);width:max-content;max-height:calc(100vh - 16px);overflow-y:auto;overflow-x:hidden}.menu-pop-enter-active[data-v-ee9821b4]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-ee9821b4]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-ee9821b4],.menu-pop-leave-to[data-v-ee9821b4]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, 2px))}.user-menu .ui-menu-item[data-v-ee9821b4],.user-submenu .ui-menu-item[data-v-ee9821b4]{padding:var(--space-2) 9px;font-size:var(--text-base)}.user-menu-usage[data-v-ee9821b4]{display:flex;flex-direction:column;gap:var(--space-1-5);padding:var(--space-2) var(--space-3)}.user-menu-usage-state[data-v-ee9821b4]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-1) 0;color:var(--color-text-muted);font-size:var(--text-base)}.user-menu-usage-error[data-v-ee9821b4]{flex:1;min-width:0}.user-menu-usage-empty[data-v-ee9821b4]{color:var(--color-text-faint)}.user-menu-usage-row[data-v-ee9821b4]{display:flex;align-items:flex-start;gap:var(--space-3)}.user-menu-usage-main[data-v-ee9821b4]{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-05)}.user-menu-usage-label[data-v-ee9821b4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.user-menu-usage-hint[data-v-ee9821b4]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);color:var(--color-text-faint)}.user-menu-usage-value[data-v-ee9821b4]{flex:none;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);font-variant-numeric:tabular-nums;white-space:nowrap}.user-menu-usage-value.sev-warn[data-v-ee9821b4]{color:var(--color-warning)}.user-menu-usage-value.sev-danger[data-v-ee9821b4]{color:var(--color-danger)}.user-menu-item-label[data-v-ee9821b4]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-menu-login-label[data-v-ee9821b4]{color:var(--color-accent)}.user-menu-row-value[data-v-ee9821b4]{flex:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);color:var(--color-text-faint)}.emoji-picker[data-v-b0dbbae4]{--ep-cell: 26px}.ep-search[data-v-b0dbbae4]{display:flex;align-items:center;gap:var(--space-2);margin:var(--space-1);padding:0 var(--space-2);border-radius:var(--radius-sm);color:var(--color-text-faint)}.ep-search[data-v-b0dbbae4]:hover,.ep-search[data-v-b0dbbae4]:focus-within{background:var(--color-surface-sunken)}.ep-input[data-v-b0dbbae4]{flex:1;min-width:0;height:calc(var(--ep-cell) + 2px);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;outline:none}.ep-input[data-v-b0dbbae4]::placeholder{color:var(--color-text-faint)}.ep-scroll[data-v-b0dbbae4]{max-height:calc(var(--ep-cell) * 10 + var(--space-1));overflow-y:auto;padding:0 var(--space-1)}.ep-label[data-v-b0dbbae4]{padding:var(--space-1) var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.ep-grid[data-v-b0dbbae4]{display:grid;grid-template-columns:repeat(8,var(--ep-cell));gap:var(--space-1);padding-bottom:var(--space-1)}.ep-e[data-v-b0dbbae4]{height:var(--ep-cell);display:grid;place-items:center;padding:0;font-size:var(--text-lg);background:transparent;border:none;border-radius:var(--radius-xs);cursor:pointer}.ep-e[data-v-b0dbbae4]:hover{background:var(--color-hover)}.ep-e[data-v-b0dbbae4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ep-e.sel[data-v-b0dbbae4]{background:var(--color-accent-soft)}.ep-empty[data-v-b0dbbae4]{padding:var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);text-align:center;user-select:none}.se[data-v-8cccabc6]{--se-pad-x: var(--space-2);display:block;margin:0;padding:8px var(--se-pad-x);border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);cursor:pointer;position:relative}.se[data-v-8cccabc6]:hover{background:var(--sb-hover, var(--color-hover));color:var(--color-text)}.se.on[data-v-8cccabc6]{background:var(--sb-selected, var(--color-selected));color:var(--color-text)}.row[data-v-8cccabc6]{display:flex;align-items:center;gap:var(--sb-gap, 6px);min-width:0}.left[data-v-8cccabc6]{display:flex;align-items:center;flex:1;min-width:0}.lead[data-v-8cccabc6]{width:var(--sb-gutter, 16px);flex:none;display:inline-flex;align-items:center;justify-content:center}.unread-dot[data-v-8cccabc6]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-accent)}.t[data-v-8cccabc6]{--sb-fade: 0px;--sb-fade-len: 16px;color:inherit;font-size:var(--ui-font-size-sm);font-weight:450;line-height:var(--leading-tight);user-select:none;flex:1;min-width:0;overflow:hidden;text-overflow:clip;white-space:nowrap;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)));mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)))}.se:hover .t[data-v-8cccabc6]{--sb-fade: 34px;--sb-fade-len: 26px}.se:has(.ui-badge):hover .t[data-v-8cccabc6]{--sb-fade: 0px;--sb-fade-len: 16px}.t .emoji[data-v-8cccabc6]{padding:0;background:transparent;border:none;cursor:pointer}.t .emoji[data-v-8cccabc6]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sub[data-v-8cccabc6]{display:flex;align-items:center;gap:var(--space-1);margin:var(--space-1) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-tight);user-select:none}.sub-icon[data-v-8cccabc6]{flex:none;color:var(--color-text-muted)}.pr[data-v-8cccabc6]{display:inline-flex;align-items:center;gap:var(--space-05);flex:none;padding:1px var(--space-1);border:.5px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-2xs);font-weight:var(--weight-medium);line-height:1;cursor:pointer}.pr[data-v-8cccabc6]:hover{border-color:var(--color-line-strong)}.pr[data-v-8cccabc6]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.pr--open[data-v-8cccabc6],.pr--open[data-v-8cccabc6]:hover{background:var(--color-success-soft);border-color:var(--color-success-bd);color:var(--color-success)}.pr--merged[data-v-8cccabc6],.pr--merged[data-v-8cccabc6]:hover{background:var(--color-done-soft);border-color:var(--color-done-bd);color:var(--color-done)}.sub-text[data-v-8cccabc6]{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ts[data-v-8cccabc6]{color:var(--color-text-faint);font-size:var(--text-xs);font-family:var(--font-ui);font-weight:475;line-height:var(--leading-tight);font-variant-numeric:tabular-nums;text-align:right}.act[data-v-8cccabc6]{position:relative;flex:none;align-self:stretch;display:inline-flex;align-items:center;justify-content:flex-end;gap:var(--sb-gap, 6px);min-width:26px}.act .ha[data-v-8cccabc6]{position:absolute;top:0;bottom:0;right:calc(3px - var(--se-pad-x));display:inline-flex;align-items:center;gap:2px;opacity:0;visibility:hidden;border-radius:var(--radius-sm);transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.se:hover .ha[data-v-8cccabc6]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.act .ts[data-v-8cccabc6]{transition:opacity var(--duration-fast) var(--ease-out)}.se:hover .act .ts[data-v-8cccabc6]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.act .st[data-v-8cccabc6]{display:inline-flex;align-items:center;transition:opacity var(--duration-fast) var(--ease-out)}.se:hover .act .st[data-v-8cccabc6]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.act .ui-badge[data-v-8cccabc6]{transition:opacity var(--duration-fast) var(--ease-out)}.se.flat:hover .act .ui-badge[data-v-8cccabc6]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.menu[data-v-8cccabc6],.picker[data-v-8cccabc6]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-pop-enter-active[data-v-8cccabc6]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-8cccabc6]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-8cccabc6],.menu-pop-leave-to[data-v-8cccabc6]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}.menu-time[data-v-8cccabc6]{padding:6px 10px;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);cursor:default;user-select:text}.rename-wrap[data-v-8cccabc6]{position:relative;display:flex;align-items:center;flex:1;min-width:0;background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs)}.rename-input[data-v-8cccabc6]{flex:1;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;padding:1px 4px;outline:none;min-width:0}.rename-wrap.generating .rename-input[data-v-8cccabc6]{visibility:hidden}.gen-dots[data-v-8cccabc6]{position:absolute;left:6px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:3px;pointer-events:none}.gen-dots i[data-v-8cccabc6]{width:3px;height:3px;border-radius:var(--radius-full, 50%);background:var(--color-accent);animation:gen-title-dot-8cccabc6 .9s var(--ease-out) infinite}.gen-dots i[data-v-8cccabc6]:nth-child(2){animation-delay:.15s}.gen-dots i[data-v-8cccabc6]:nth-child(3){animation-delay:.3s}@keyframes gen-title-dot-8cccabc6{0%,60%,to{opacity:.3;transform:translate(0)}30%{opacity:1;transform:translate(2px)}}.gen-title-btn[data-v-8cccabc6]{flex:none;margin-right:1px;color:var(--color-accent)}.gen-title-btn[data-v-8cccabc6]:hover:not(:disabled){color:var(--color-accent-hover);background:transparent}.sessions .se[data-v-8cccabc6]{margin:0;border-radius:var(--radius-sm);--se-pad-x: calc(var(--sb-pad-x, 20px) - var(--sb-inset, 12px));padding:8px var(--se-pad-x)}.sessions .se.flat+.se.flat[data-v-8cccabc6]{margin-top:var(--space-05)}.sessions .se .rename-input[data-v-8cccabc6]{border-radius:var(--radius-sm);font-family:var(--sans)}.group.dragging[data-v-08d57eaf]{opacity:.45}.group.pinned-drag-active[data-v-08d57eaf],.group.pinned-drop-hover[data-v-08d57eaf]{border-radius:var(--radius-sm)}.group.pinned-drag-active[data-v-08d57eaf]{box-shadow:inset 0 0 0 1px var(--color-accent)}.group.pinned-drop-hover[data-v-08d57eaf]{box-shadow:inset 0 0 0 2px var(--color-accent)}.group.pinned-drop-blocked[data-v-08d57eaf],.group.pinned-drop-blocked[data-v-08d57eaf] *{cursor:no-drop}.se-locate-flash[data-v-08d57eaf]{isolation:isolate}.se-locate-flash[data-v-08d57eaf]:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:var(--radius-sm);background:var(--color-accent-soft);pointer-events:none;animation:se-locate-fade-08d57eaf var(--duration-flash) var(--ease-out) forwards}@keyframes se-locate-fade-08d57eaf{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.se-locate-flash[data-v-08d57eaf]:before{animation:none}}.group-sessions[data-v-08d57eaf]{height:auto;overflow:hidden;transition:height var(--duration-base) var(--ease-out)}.group-sessions.collapsed[data-v-08d57eaf]{height:0}.gh[data-v-08d57eaf]{display:flex;flex-direction:column;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text);user-select:none;position:relative;cursor:grab}.gh[data-v-08d57eaf]:active{cursor:grabbing}.gh[data-v-08d57eaf]:hover{background:var(--sb-hover, var(--color-hover))}.gh.on[data-v-08d57eaf]{background:var(--sb-selected, var(--color-selected))}.gh-top[data-v-08d57eaf]{position:relative;display:flex;align-items:center;gap:var(--sb-gap)}.gh-folder[data-v-08d57eaf]{flex:none;color:var(--color-text-muted)}.gh-name[data-v-08d57eaf]{font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text-muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.gh-actions[data-v-08d57eaf]{position:absolute;right:calc(3px - (var(--sb-pad-x) - var(--sb-inset)));top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:var(--space-1);padding-left:var(--space-1);border-radius:var(--radius-sm);isolation:isolate;opacity:0;pointer-events:none}.gh-name[data-v-08d57eaf]{--sb-fade: 0px;--sb-fade-len: 16px;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)));mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)))}.gh:hover .gh-name[data-v-08d57eaf],.gh:focus-within .gh-name[data-v-08d57eaf],.gh:has(.gh-actions.open) .gh-name[data-v-08d57eaf]{--sb-fade: 64px;--sb-fade-len: 26px}.gh-actions[data-v-08d57eaf]>*{position:relative;z-index:1}.gh:hover .gh-actions[data-v-08d57eaf],.gh:focus-within .gh-actions[data-v-08d57eaf],.gh-actions.open[data-v-08d57eaf]{opacity:1;pointer-events:auto}.gh-more.open[data-v-08d57eaf]{color:var(--color-text);background:var(--color-line)}.group-empty[data-v-08d57eaf]{padding:var(--space-1) var(--space-2) var(--space-1) calc(var(--sb-pad-x) - var(--sb-inset) + var(--sb-gutter) + var(--sb-gap));font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui);user-select:none}.show-more-row[data-v-08d57eaf]{display:flex;align-items:center;padding-left:calc(var(--sb-gutter) + var(--sb-gap))}.show-more[data-v-08d57eaf]{display:flex;align-items:center;gap:var(--sb-gap);margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));min-width:0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);text-align:left;cursor:pointer}.show-more[data-v-08d57eaf]:hover{background:var(--sb-hover, var(--color-hover))}.show-more[data-v-08d57eaf]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-sep[data-v-08d57eaf]{margin:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);user-select:none}.show-more-label[data-v-08d57eaf]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gh-rename[data-v-08d57eaf]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-regular);color:var(--color-text);background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.gh-rename[data-v-08d57eaf]{border-radius:var(--radius-sm);font-family:var(--sans)}.gh-add[data-v-08d57eaf]{color:var(--faint)}.gh-add[data-v-08d57eaf]:hover{color:var(--dim)}.pinned-label[data-v-728c6a88]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--faint);user-select:none}.pinned-title[data-v-728c6a88]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pinned-toggle[data-v-728c6a88]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.pinned-label:hover .pinned-toggle[data-v-728c6a88],.pinned-label:focus-within .pinned-toggle[data-v-728c6a88],.pinned-toggle--on[data-v-728c6a88]{opacity:1}.pinned-toggle[data-v-728c6a88]:hover{color:var(--dim)}.pinned-toggle svg[data-v-728c6a88]{width:13px;height:13px}.se-locate-flash[data-v-728c6a88]{isolation:isolate}.se-locate-flash[data-v-728c6a88]:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:var(--radius-sm);background:var(--color-accent-soft);pointer-events:none;animation:se-locate-fade-728c6a88 var(--duration-flash) var(--ease-out) forwards}@keyframes se-locate-fade-728c6a88{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.se-locate-flash[data-v-728c6a88]:before{animation:none}}.pinned-rows[data-v-728c6a88]{max-height:40vh;overflow-y:auto}.pinned-rows[data-v-728c6a88]::-webkit-scrollbar{width:4px}.pinned-rows[data-v-728c6a88]::-webkit-scrollbar-track{background:transparent}.pinned-rows[data-v-728c6a88]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.pinned-rows[data-v-728c6a88]:hover::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.pinned-rows[data-v-728c6a88]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.pin-row.dragging[data-v-728c6a88]{opacity:.45}.pinned.drop-active[data-v-728c6a88]{border-radius:var(--radius-sm);box-shadow:inset 0 0 0 1px var(--color-accent)}.side[data-v-fb698df7]{background:var(--color-sidebar-bg);display:flex;flex-direction:row;justify-content:flex-end;overflow:hidden;min-width:0;height:100%;transition:width .28s cubic-bezier(.4,0,.2,1),visibility .28s;--sb-inset: var(--space-2);--sb-pad-x: var(--space-4);--sb-gutter: 16px;--sb-gap: var(--space-2);--sb-hover: var(--color-hover);--sb-selected: color-mix(in srgb, var(--color-selected) 75%, transparent)}.side.no-anim[data-v-fb698df7]{transition:none}.side.collapsed[data-v-fb698df7]{visibility:hidden}.col[data-v-fb698df7]{flex:none;min-width:0;display:flex;flex-direction:column;min-height:0;width:100%;box-sizing:border-box;border-right:.5px solid var(--line);container-type:inline-size;container-name:sidebar-col;position:relative}.ch[data-v-fb698df7]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:var(--space-3);min-height:calc(26px + 2 * var(--space-3));width:100%;box-sizing:border-box}.side.macos-desktop .ch[data-v-fb698df7]{padding-left:80px;-webkit-app-region:drag}.side.macos-desktop .ch-brand[data-v-fb698df7]{display:none}.ch-logo[data-v-fb698df7]{height:22px;width:32px;flex:none;display:block;cursor:pointer;user-select:none;touch-action:none;transition:transform .18s ease}.ch-logo[data-v-fb698df7]:hover{transform:scale(1.08)}.ch-brand[data-v-fb698df7]{display:flex;align-items:center;gap:8px;min-width:0;flex:1;user-select:none;touch-action:none}.ch-tail[data-v-fb698df7]{display:flex;align-items:center;gap:var(--space-2);flex:none;min-width:0;margin-left:auto}.ch-name[data-v-fb698df7]{font-size:var(--ui-font-size);font-weight:500;line-height:22px;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container sidebar-col (max-width: 250px){.ch-name[data-v-fb698df7]{display:none}}.sidebar-actions[data-v-fb698df7]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 var(--space-2);padding:0 var(--sb-inset) var(--space-1);position:relative;z-index:1;background:var(--color-sidebar-bg)}.sessions-head[data-v-fb698df7]{position:relative;z-index:1;padding:var(--space-3) var(--sb-inset) 0;border-bottom:.5px solid transparent;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.sessions-head[data-v-fb698df7]:after,.side-footer[data-v-fb698df7]:before{content:"";position:absolute;left:0;right:0;height:13px;pointer-events:none;opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sessions-head[data-v-fb698df7]:after{top:100%;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.5%,transparent),transparent 35%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1%,transparent),transparent 65%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) .75%,transparent),transparent);transition-duration:var(--duration-slow)}.sessions-head--scrolled[data-v-fb698df7]{border-bottom-color:var(--line)}.sessions-head--scrolled[data-v-fb698df7]:after{opacity:1}.btn-new-chat[data-v-fb698df7]{grid-column:1 / -1;display:flex;align-items:center;gap:var(--sb-gap);width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);cursor:pointer;text-align:left}.sidebar-actions--has-workspace-action .btn-new-chat[data-v-fb698df7]{grid-column:1}.btn-new-chat[data-v-fb698df7]:hover{background:var(--sb-hover)}.btn-new-chat[data-v-fb698df7]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-new-chat svg[data-v-fb698df7]{flex:none}.btn-new-chat span[data-v-fb698df7]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn-new-chat[data-v-fb698df7] .ui-kbd{margin-left:auto}.btn-new-chat[data-v-fb698df7] .ui-kbd,.search[data-v-fb698df7] .ui-kbd{opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.btn-new-chat[data-v-fb698df7]:hover .ui-kbd,.btn-new-chat[data-v-fb698df7]:focus-visible .ui-kbd,.search[data-v-fb698df7]:hover .ui-kbd,.search[data-v-fb698df7]:focus-visible .ui-kbd{opacity:1}.search[data-v-fb698df7]{grid-column:1 / -1;display:flex;align-items:center;gap:var(--sb-gap);width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.search[data-v-fb698df7]:hover{background:var(--sb-hover)}.search[data-v-fb698df7]:focus-visible{background:var(--sb-hover);color:var(--color-text);outline:2px solid var(--color-accent-bd);outline-offset:-2px}.search-icon[data-v-fb698df7]{flex:none;transform:translateY(-.5px)}.search-input[data-v-fb698df7]{flex:1;min-width:0;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions[data-v-fb698df7]{flex:1;overflow-y:auto;padding:0 var(--sb-inset) var(--space-3);min-height:0}.sessions[data-v-fb698df7]::-webkit-scrollbar{width:4px}.sessions[data-v-fb698df7]::-webkit-scrollbar-track{background:transparent}.sessions[data-v-fb698df7]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.sessions.scrolling[data-v-fb698df7]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.sessions.scrolling[data-v-fb698df7]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.side-footer[data-v-fb698df7]{flex:none;position:relative;z-index:1;padding:var(--space-2) var(--sb-inset);border-top:.5px solid var(--line);background:var(--color-sidebar-bg)}.side-footer[data-v-fb698df7]:before{bottom:100%;background:linear-gradient(to top,color-mix(in srgb,var(--color-text) 1.5%,transparent),transparent 35%),linear-gradient(to top,color-mix(in srgb,var(--color-text) 1%,transparent),transparent 65%),linear-gradient(to top,color-mix(in srgb,var(--color-text) .75%,transparent),transparent);transition-duration:var(--duration-slow)}.side-footer--shadowed[data-v-fb698df7]:before{opacity:1}.side-section-label[data-v-fb698df7]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--faint);user-select:none}.side-section-title[data-v-fb698df7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions-head .pinned+.side-section-label[data-v-fb698df7]{margin-top:var(--space-2)}.side-section-toggle[data-v-fb698df7]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.side-section-label:hover .side-section-toggle[data-v-fb698df7],.side-section-label:focus-within .side-section-toggle[data-v-fb698df7]{opacity:1}.side-section-toggle[data-v-fb698df7]:hover{color:var(--dim)}.side-section-toggle svg[data-v-fb698df7]{width:13px;height:13px}.side-section-actions[data-v-fb698df7]{display:flex;align-items:center;gap:2px}.ws-drop-target.drop-before[data-v-fb698df7]{box-shadow:inset 0 2px 0 var(--color-accent)}.ws-drop-target.drop-after[data-v-fb698df7]{box-shadow:inset 0 -2px 0 var(--color-accent)}.ws-drop-target.ws-locate-flash[data-v-fb698df7] .gh{isolation:isolate}.ws-drop-target.ws-locate-flash[data-v-fb698df7] .gh:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:var(--radius-sm);background:var(--color-accent-soft);pointer-events:none;animation:ws-locate-fade-fb698df7 var(--duration-flash) var(--ease-out) forwards}@keyframes ws-locate-fade-fb698df7{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.ws-drop-target.ws-locate-flash[data-v-fb698df7] .gh:before{animation:none}}.sessions.pinned-drag-active[data-v-fb698df7]{box-shadow:inset 0 0 0 1px var(--color-accent)}.sessions.flat-pinned-drop-hover[data-v-fb698df7]{box-shadow:inset 0 0 0 2px var(--color-accent)}.show-more-row[data-v-fb698df7]{display:flex;align-items:center;justify-content:center}.show-more[data-v-fb698df7]{display:flex;align-items:center;justify-content:center;gap:var(--space-1);margin:0;padding:6px var(--space-3);min-width:0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);cursor:pointer}.show-more[data-v-fb698df7]:hover{background:var(--sb-hover, var(--color-hover))}.show-more[data-v-fb698df7]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-label[data-v-fb698df7]{flex:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.folder-drop-overlay[data-v-fb698df7]{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:var(--space-3);box-sizing:border-box;background:color-mix(in srgb,var(--color-sidebar-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.folder-drop-overlay.show[data-v-fb698df7]{opacity:1;visibility:visible}.folder-drop-card[data-v-fb698df7]{display:flex;align-items:center;gap:var(--space-3);max-width:100%;box-sizing:border-box;padding:var(--space-4);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.folder-drop-card svg[data-v-fb698df7]{flex:none}.folder-drop-card span[data-v-fb698df7]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty[data-v-fb698df7]{padding:var(--space-6) var(--space-3);text-align:center;color:var(--faint);font-size:calc(var(--ui-font-size) - 3px);line-height:1.6}.ws-menu[data-v-fb698df7],.gh-menu[data-v-fb698df7],.view-menu[data-v-fb698df7]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.view-menu-label[data-v-fb698df7]{padding:var(--space-1) var(--space-2) var(--space-05);font-size:var(--text-xs);color:var(--faint);user-select:none}.view-menu-check[data-v-fb698df7]{margin-left:auto;display:inline-flex}.menu-pop-enter-active[data-v-fb698df7]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-fb698df7]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-fb698df7],.menu-pop-leave-to[data-v-fb698df7]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}[data-v-fb698df7] .workspace-rename-item{font-size:var(--text-xs);font-weight:var(--weight-option-label)}.section-menu-check[data-v-fb698df7]{display:inline-flex;flex:none;width:14px}.rh[data-v-1c6dfdc5]{width:4px;flex:none;position:relative;align-self:stretch;background:transparent;touch-action:none;margin:0 -2px;z-index:var(--z-dropdown)}.rh-bar[data-v-1c6dfdc5]{position:absolute;inset:0 1px;background:transparent;transition:background .12s}.rh:hover .rh-bar[data-v-1c6dfdc5]{background:var(--color-selected)}.rh.dragging .rh-bar[data-v-1c6dfdc5]{background:var(--color-line-strong)}.op[data-v-ab413c67]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);background:var(--color-well);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-word;max-height:12lh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.op-empty[data-v-ab413c67]{color:var(--color-text-faint);font-style:italic}.agent-card[data-v-5bbb3a70]{margin:var(--space-1) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.agent-card[data-v-5bbb3a70]:hover{border-color:var(--color-line-strong)}.agent-card.err[data-v-5bbb3a70]{border-color:color-mix(in srgb,var(--color-danger) 45%,var(--bg))}.head[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-2) var(--space-3);border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer}.head[data-v-5bbb3a70]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.head[data-v-5bbb3a70]:disabled{cursor:default}.lead[data-v-5bbb3a70]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-surface-sunken);color:var(--color-text-muted);flex:none}.main[data-v-5bbb3a70]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.task[data-v-5bbb3a70]{font-size:var(--ui-font-size);line-height:var(--leading-caption);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.type[data-v-5bbb3a70]{font-size:var(--text-xs);line-height:var(--leading-caption);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tail[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-2);flex:none}.st[data-v-5bbb3a70]{display:inline-flex;align-items:center}.st.ok[data-v-5bbb3a70]{color:var(--color-success)}.st.error[data-v-5bbb3a70]{color:var(--color-danger)}.go[data-v-5bbb3a70]{color:var(--color-text-faint);transition:color var(--duration-base) var(--ease-out)}.agent-card:hover .head:not(:disabled) .go[data-v-5bbb3a70]{color:var(--color-text)}.go.car[data-v-5bbb3a70]{transition:color var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.go.car.open[data-v-5bbb3a70]{transform:rotate(90deg)}.saved-result[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);text-align:left;cursor:pointer}.saved-result[data-v-5bbb3a70]:hover{color:var(--color-text-muted)}.saved-result[data-v-5bbb3a70]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.saved-result__chevron[data-v-5bbb3a70]{transition:transform var(--duration-base) var(--ease-out)}.saved-result__chevron.open[data-v-5bbb3a70]{transform:rotate(90deg)}.result[data-v-5bbb3a70]{padding:var(--space-2) var(--space-3)}.result--legacy[data-v-5bbb3a70]{border-top:.5px solid var(--color-line)}.tl-head[data-v-58658159]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border-radius:var(--radius-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left}.tl-head.clickable[data-v-58658159]{cursor:pointer;user-select:none}.tl-ic[data-v-58658159]{display:inline-flex;align-items:center;justify-content:flex-start;flex:none;color:var(--color-text-faint)}.tl-main[data-v-58658159]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-1)}.tl-tail[data-v-58658159]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}.tl-status[data-v-58658159]{display:inline-flex;align-items:center;flex:none}.tl-status.ok[data-v-58658159]{color:var(--color-success)}.tl-status.error[data-v-58658159]{color:var(--color-danger)}.tl-car[data-v-58658159]{display:inline-flex;align-items:center;justify-content:center;align-self:center;width:16px;height:16px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);cursor:pointer;flex:none}.tl-car[data-v-58658159]:hover{color:var(--color-text)}.tl-car[data-v-58658159]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-car-ic[data-v-58658159]{transition:transform var(--duration-base) var(--ease-out)}.tool-line.open .tl-car-ic[data-v-58658159]{transform:rotate(90deg)}.tl-body[data-v-58658159]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tl-body.open[data-v-58658159]{grid-template-rows:minmax(0,1fr)}.tl-body-inner[data-v-58658159]{min-height:0;overflow:hidden;padding:2px var(--space-2) var(--space-1) 0}.tl-main .tl-name[data-v-58658159-s]{font-weight:var(--weight-regular);color:var(--color-text-muted);flex:none}.tl-main .tl-dim[data-v-58658159-s]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-faint[data-v-58658159-s]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-mono[data-v-58658159-s]{font-family:var(--font-mono);font-size:var(--text-xs);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);line-height:normal;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-file[data-v-58658159-s]{font-weight:var(--weight-regular);color:var(--color-text);line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer}.tl-main .tl-file[data-v-58658159-s]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-main .tl-file[data-v-58658159-s]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-tail .tl-pill[data-v-58658159-s]{font-size:var(--text-xs);line-height:1.5;padding:0 var(--space-2);border-radius:var(--radius-full);flex:none;white-space:nowrap}.tl-tail .tl-chip[data-v-58658159-s]{color:var(--color-text-faint);font-size:var(--text-xs);flex:none;white-space:nowrap}.tl-tail .tl-add[data-v-58658159-s]{color:var(--color-success);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tl-tail .tl-del[data-v-58658159-s]{color:var(--color-danger);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.ask-receipt[data-v-f29eda04]{max-width:560px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-xs);padding:var(--space-2) var(--space-3) 10px;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.ask-receipt.flat[data-v-f29eda04]{color:var(--color-text-faint);font-style:italic;padding-top:6px;padding-bottom:6px}.rc-head[data-v-f29eda04]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text-faint);font-size:var(--text-xs);margin-bottom:6px}.rc-st[data-v-f29eda04]{margin-left:auto;color:var(--color-success);display:inline-flex}.rc-q+.rc-q[data-v-f29eda04]{margin-top:6px}.rc-qtext[data-v-f29eda04]{display:flex;align-items:baseline;gap:var(--space-2);margin-bottom:3px;font-weight:var(--weight-medium);color:var(--color-text)}.rc-opt[data-v-f29eda04]{display:flex;align-items:center;gap:var(--space-2);padding:1.5px 0;color:var(--color-text)}.rc-qskip[data-v-f29eda04]{padding:1.5px 0;color:var(--color-text-faint);font-style:italic}.rc-lb[data-v-f29eda04]{min-width:0}.rc-ds[data-v-f29eda04]{color:var(--color-text-faint);font-size:var(--text-xs)}.rc-g[data-v-f29eda04]{width:14px;height:14px;flex:none;border:.5px solid var(--color-line-strong);position:relative}.rc-g.chk[data-v-f29eda04]{border-radius:var(--radius-xs)}.rc-g.rad[data-v-f29eda04]{border-radius:50%}.rc-g.on[data-v-f29eda04]{border-color:var(--color-accent)}.rc-g.chk.on[data-v-f29eda04]{background:var(--color-accent)}.rc-g.chk.on[data-v-f29eda04]:after{content:"";position:absolute;left:3.5px;top:.5px;width:4px;height:8px;border-right:1.5px solid var(--color-text-on-accent);border-bottom:1.5px solid var(--color-text-on-accent);transform:rotate(45deg)}.rc-g.rad.on[data-v-f29eda04]:after{content:"";position:absolute;inset:2.5px;border-radius:50%;background:var(--color-accent)}.cmd-echo[data-v-8869dd42]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.hl-code[data-v-6735e4da]{border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:auto;max-height:calc(24 * 1.5 * var(--ui-font-size));overscroll-behavior:contain;font-family:var(--font-mono);font-size:var(--code-font-size);line-height:var(--leading-normal);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none}.hl-code[data-v-6735e4da]:not(.framed){border:none;border-radius:0;background:transparent;max-height:none;overflow:visible}.hl-body[data-v-6735e4da]{width:max-content;min-width:100%;padding:var(--space-1) 0 var(--space-2)}.hl-code.plain-pad .hl-body[data-v-6735e4da]{padding-left:var(--space-3)}.hl-row[data-v-6735e4da]{display:flex;align-items:flex-start;min-height:calc(1em * var(--leading-normal));white-space:pre;width:100%}.hl-gutter[data-v-6735e4da]{flex:none;box-sizing:content-box;min-width:var(--gutter-ch, 4ch);padding:0 var(--space-2);text-align:right;color:var(--color-text-faint);user-select:none;border-right:.5px solid var(--color-line);font-variant-numeric:tabular-nums}.hl-sign[data-v-6735e4da]{flex:none;width:16px;text-align:center;color:var(--color-text-muted);user-select:none}.hl-text[data-v-6735e4da]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.hl-gutter+.hl-text[data-v-6735e4da]{padding-left:var(--space-2)}.row-add[data-v-6735e4da]{background:var(--color-diff-add-bg)}.row-add .hl-sign[data-v-6735e4da]{color:var(--color-success)}.row-del[data-v-6735e4da]{background:var(--color-diff-del-bg)}.row-del .hl-sign[data-v-6735e4da]{color:var(--color-danger)}.row-hunk[data-v-6735e4da]{background:var(--color-surface-sunken)}.row-hunk .hl-text[data-v-6735e4da]{color:var(--color-text-muted)}.hl-code.gutter .row-add[data-v-6735e4da]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.hl-code.gutter .row-del[data-v-6735e4da]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diffbar[data-v-bbf61950]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;gap:1px;flex:none}.seg-add[data-v-bbf61950]{background:var(--color-success)}.seg-del[data-v-bbf61950]{background:var(--color-danger)}.gl[data-v-b12a8498]{display:inline-flex;align-items:center}.arg-full[data-v-b12a8498]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.file-list[data-v-3936099e]{display:flex;flex-direction:column;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-1);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.file-row[data-v-3936099e]{width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.file-row[data-v-3936099e]:hover{background:var(--color-hover);color:var(--color-accent)}.file-row[data-v-3936099e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-pill.pill-active[data-v-862274de]{color:var(--color-accent);background:var(--color-accent-soft)}.tl-pill.pill-done[data-v-862274de]{color:var(--color-success);background:var(--color-success-soft)}.tl-pill.pill-blocked[data-v-862274de]{color:var(--color-warning);background:var(--color-warning-soft)}.goal-block[data-v-862274de]{margin-bottom:var(--space-1)}.goal-text[data-v-862274de]{color:var(--color-text);font-size:calc(var(--content-font-size) - 1px);line-height:1.6;white-space:pre-wrap;word-break:break-word}.goal-criterion[data-v-862274de]{color:var(--color-text-muted);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;margin-top:2px;white-space:pre-wrap;word-break:break-word}.match-list[data-v-899c1a48]{display:flex;flex-direction:column;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-1);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.match-row[data-v-899c1a48]{display:flex;align-items:baseline;gap:var(--space-2);width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);text-align:left;cursor:default}.match-row.link[data-v-899c1a48]{cursor:pointer}.match-row.link[data-v-899c1a48]:hover{background:var(--color-hover)}.match-row[data-v-899c1a48]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mref[data-v-899c1a48]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-faint)}.match-row.link:hover .mref[data-v-899c1a48]{color:var(--color-accent)}.mtext[data-v-899c1a48]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.is-resolving[data-v-0826404b]{visibility:hidden}.media-tool[data-v-3bc3ee1a]{display:inline-flex;flex-direction:column;gap:6px;max-width:320px}.media-title[data-v-3bc3ee1a]{font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-image-button[data-v-3bc3ee1a]{padding:0;border:none;background:transparent;cursor:pointer;border-radius:var(--radius-md);overflow:hidden}.media-image[data-v-3bc3ee1a]{display:block;max-width:100%;border-radius:var(--radius-md);background:var(--media-alpha-canvas)}.media-video[data-v-3bc3ee1a],.media-audio[data-v-3bc3ee1a]{max-width:100%;border-radius:var(--radius-md)}.media-video[data-v-3bc3ee1a]{display:block}.media-video-button[data-v-3bc3ee1a]{position:relative}.media-video-tile[data-v-3bc3ee1a]{display:block;width:320px;max-width:100%;aspect-ratio:16 / 9;background:var(--color-well)}.media-play-badge[data-v-3bc3ee1a]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.plan-glyph[data-v-8dff80a1]{display:inline-flex;align-items:center}.plan-path[data-v-8dff80a1]{display:block;max-width:100%;margin:0 0 var(--space-2);padding:0;overflow:hidden;border:none;background:transparent;color:var(--color-accent);font-family:var(--font-mono);font-size:var(--text-xs);text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.plan-path[data-v-8dff80a1]:hover{text-decoration:underline}.plan-path[data-v-8dff80a1]:focus-visible{outline:none;border-radius:var(--radius-xs);box-shadow:var(--p-focus-ring)}.plan-content[data-v-8dff80a1]{padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);color:var(--color-text)}.plan-review[data-v-8dff80a1]{display:flex;flex-direction:column;gap:var(--space-1);margin-top:var(--space-2);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal)}.plan-review>div[data-v-8dff80a1]{display:flex;align-items:baseline;gap:var(--space-2)}.review-label[data-v-8dff80a1]{flex:none;color:var(--color-text-faint)}.review-feedback[data-v-8dff80a1]{white-space:pre-wrap}.path-link[data-v-0edbdd82]{display:block;width:100%;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 0 var(--space-1);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);color:var(--color-text-muted);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.path-link[data-v-0edbdd82]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.path-link[data-v-0edbdd82]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.swarm-card[data-v-f7b643ea]{margin:0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.swarm-card.err[data-v-f7b643ea]{border-color:color-mix(in srgb,var(--color-danger) 45%,var(--bg))}.head[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:34px;padding:0 var(--space-2) 0 var(--space-3);border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--ui-font-size);text-align:left;cursor:pointer;user-select:none}.head[data-v-f7b643ea]:hover{background:var(--color-hover);color:var(--color-text)}.head[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ic[data-v-f7b643ea]{color:var(--color-text-faint);flex:none}.title[data-v-f7b643ea]{font-weight:var(--weight-medium);color:var(--color-text);flex:none}.meta[data-v-f7b643ea]{color:var(--color-text-faint);flex:none}.sum-txt[data-v-f7b643ea]{color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-f7b643ea]{margin-left:auto;display:flex;align-items:center;gap:var(--space-2);flex:none;color:var(--color-text-muted);font-size:var(--text-xs)}.status[data-v-f7b643ea]{display:inline-flex;align-items:center;flex:none}.status[data-v-f7b643ea]:has(>svg){color:var(--color-success)}.err .status[data-v-f7b643ea]:has(>svg){color:var(--color-danger)}.chip[data-v-f7b643ea]{color:var(--color-text-muted);font-family:var(--font-mono)}.tm[data-v-f7b643ea]{color:var(--color-text-faint);font-family:var(--font-mono)}.car[data-v-f7b643ea]{margin-left:2px;color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.swarm-card.open .car[data-v-f7b643ea]{transform:rotate(90deg)}.body[data-v-f7b643ea]{border-top:.5px solid var(--color-line)}.overview[data-v-f7b643ea]{padding:10px var(--space-3) var(--space-2);border-bottom:.5px solid var(--color-line)}.overview-line[data-v-f7b643ea]{display:flex;align-items:baseline;gap:var(--space-2)}.big[data-v-f7b643ea]{font-family:var(--font-mono);font-weight:var(--weight-medium);color:var(--color-text);font-size:15px}.lbl[data-v-f7b643ea]{color:var(--color-text-muted);font-size:var(--text-xs)}.seg[data-v-f7b643ea]{display:flex;height:5px;border-radius:var(--radius-full);overflow:hidden;margin:var(--space-2) 0 var(--space-1);gap:2px}.seg>span[data-v-f7b643ea]{height:100%;border-radius:var(--radius-full);min-width:3px}.s-ok[data-v-f7b643ea]{background:var(--color-success)}.s-run[data-v-f7b643ea]{background:var(--color-accent)}.s-warn[data-v-f7b643ea]{background:var(--color-warning)}.s-fail[data-v-f7b643ea]{background:var(--color-danger)}.s-queue[data-v-f7b643ea]{background:var(--color-line)}.legend[data-v-f7b643ea]{display:flex;flex-wrap:wrap;gap:10px}.legend span[data-v-f7b643ea]{display:inline-flex;align-items:center;gap:5px;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted)}.lg-dot[data-v-f7b643ea]{width:6px;height:6px;border-radius:var(--radius-full)}.member[data-v-f7b643ea]{border-bottom:.5px solid var(--color-line)}.member[data-v-f7b643ea]:last-child{border-bottom:none}.member-head[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:30px;padding:0 var(--space-2) 0 var(--space-3);border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);text-align:left;cursor:pointer;user-select:none}.member-head[data-v-f7b643ea]:not(:disabled):hover{background:var(--color-hover)}.member-head[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.member-head[data-v-f7b643ea]:disabled{cursor:default}.row-dot[data-v-f7b643ea]{flex:none}.mname[data-v-f7b643ea]{flex:none;min-width:0;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium);color:var(--color-text)}.mact[data-v-f7b643ea]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font-size:var(--text-xs)}.mphase[data-v-f7b643ea]{flex:none;margin-left:auto;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.phase-completed .mphase[data-v-f7b643ea]{color:var(--color-success)}.phase-failed .mphase[data-v-f7b643ea]{color:var(--color-danger)}.phase-working .mphase[data-v-f7b643ea]{color:var(--color-accent)}.phase-suspended .mphase[data-v-f7b643ea]{color:var(--color-warning)}.mcar[data-v-f7b643ea]{margin-left:var(--space-1);color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.member.open .mcar[data-v-f7b643ea]{transform:rotate(90deg)}.member-saved[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);text-align:left;cursor:pointer}.member-saved[data-v-f7b643ea]:hover{color:var(--color-text-muted)}.member-saved[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.member-saved-car[data-v-f7b643ea]{transition:transform var(--duration-base) var(--ease-out)}.member-saved-car.open[data-v-f7b643ea]{transform:rotate(90deg)}.member-body[data-v-f7b643ea]{padding:var(--space-1) var(--space-3) 10px 31px;color:var(--color-text-muted);font-size:calc(var(--content-font-size) - 2px);line-height:1.65;white-space:pre-wrap;word-break:break-word}.waiting[data-v-f7b643ea]{padding:6px var(--space-3) 10px;color:var(--color-text-muted);font-size:var(--text-xs)}.fallback-output[data-v-f7b643ea]{padding:10px var(--space-3);color:var(--color-text);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;white-space:pre-wrap;word-break:break-word}.status-glyph[data-v-f1aedfd0]{flex:none;width:16px;display:inline-flex;align-items:center;justify-content:center;user-select:none}.status-glyph.s-run[data-v-f1aedfd0]{color:var(--color-accent)}.status-glyph.s-done[data-v-f1aedfd0]{color:var(--color-success)}.status-glyph.s-fail[data-v-f1aedfd0]{color:var(--color-danger)}.status-glyph.s-pending[data-v-f1aedfd0]{color:var(--color-text-faint)}.todo-bar[data-v-1b7f51f3]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.todo-fill[data-v-1b7f51f3]{background:var(--color-success);border-radius:var(--radius-full);transition:width var(--duration-slow) var(--ease-out)}.todo-list[data-v-1b7f51f3]{display:flex;flex-direction:column;gap:1px;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-2) var(--space-3);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.todo-row[data-v-1b7f51f3]{display:flex;align-items:center;gap:7px;padding:2px 0;font-size:calc(var(--content-font-size) - 1px);color:var(--color-text)}.todo-title[data-v-1b7f51f3]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.4}.todo-row.s-in_progress .todo-title[data-v-1b7f51f3]{font-weight:var(--weight-medium)}.todo-row.s-done .todo-title[data-v-1b7f51f3]{color:var(--color-text-faint);text-decoration:line-through}.fetch-url[data-v-8c248fcc]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;color:var(--color-text-faint);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.think[data-v-7d463c2a]{margin:0}.think-head[data-v-7d463c2a]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.think-head[data-v-7d463c2a]:hover{color:var(--color-text)}.think-head[data-v-7d463c2a]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.think-bulb[data-v-7d463c2a]{flex:none}.think-title[data-v-7d463c2a]{font-weight:var(--weight-medium)}.think-time[data-v-7d463c2a]{color:var(--color-text-faint);font-weight:400;flex:none}.think.streaming .think-title[data-v-7d463c2a]{animation:think-breathe-7d463c2a 1.6s var(--ease-in-out) infinite}@keyframes think-breathe-7d463c2a{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.think.streaming .think-title[data-v-7d463c2a]{animation:none}}.think-car[data-v-7d463c2a]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.think.open .think-car[data-v-7d463c2a]{transform:rotate(90deg)}.think-body[data-v-7d463c2a]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.think-body.instant[data-v-7d463c2a]{transition:none}.think-body.open[data-v-7d463c2a]{grid-template-rows:minmax(0,1fr)}.think-body-inner[data-v-7d463c2a]{min-height:0;overflow:hidden}.think-text[data-v-7d463c2a]{font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word;margin:0;padding:var(--space-1) 0 var(--space-2)}.mob .think-text[data-v-7d463c2a]{color:var(--color-text-faint);line-height:var(--leading-normal)}.activity-run[data-v-91eb361a]{display:flex;flex-direction:column;animation:kimi-card-in var(--duration-base) var(--ease-out)}.ar-head[data-v-91eb361a]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.ar-head[data-v-91eb361a]:hover{color:var(--color-text)}.ar-head[data-v-91eb361a]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ar-glyph[data-v-91eb361a]{display:inline-flex;align-items:center;flex:none;color:var(--color-text-faint)}.ar-glyph.ok[data-v-91eb361a]{color:var(--color-success)}.ar-glyph.err[data-v-91eb361a]{color:var(--color-danger)}.ar-glyph.run[data-v-91eb361a]{color:var(--color-text-muted);animation:ar-breathe-91eb361a 1.6s var(--ease-in-out) infinite}@keyframes ar-breathe-91eb361a{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.ar-glyph.run[data-v-91eb361a]{animation:none}}.ar-sum[data-v-91eb361a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.ar-danger[data-v-91eb361a]{color:var(--color-danger)}.ar-faint[data-v-91eb361a],.ar-sep[data-v-91eb361a]{color:var(--color-text-faint)}.ar-car[data-v-91eb361a]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.activity-run.open .ar-car[data-v-91eb361a]{transform:rotate(90deg)}.ar-body[data-v-91eb361a]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.ar-body.open[data-v-91eb361a]{grid-template-rows:minmax(0,1fr)}.ar-body-inner[data-v-91eb361a]{min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:var(--space-2);padding-top:var(--space-1)}.msg-time[data-v-9153170e]{display:inline-flex;align-items:center;min-height:22px;box-sizing:border-box;padding:2px 5px;border-radius:var(--radius-sm);color:var(--muted);font-size:var(--text-xs);font-weight:var(--weight-medium);line-height:1;opacity:.7;white-space:nowrap}.ntf[data-v-69e0a1db],.ntf-group-card[data-v-69e0a1db]{margin:var(--space-2) 0;border:.5px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface);box-shadow:var(--shadow-xs);overflow:hidden;animation:kimi-card-in var(--duration-slow) var(--ease-out)}.ntf.ok[data-v-69e0a1db]{background:var(--color-success-soft);border-color:var(--color-success-bd)}.ntf.err[data-v-69e0a1db]{background:var(--color-danger-soft);border-color:var(--color-danger-bd)}.ntf.warn[data-v-69e0a1db]{background:var(--color-warning-soft);border-color:var(--color-warning-bd)}.ntf-head[data-v-69e0a1db]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-2) var(--space-3);border:none;text-align:left;user-select:none}.ntf-chip[data-v-69e0a1db]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);flex:none;color:var(--color-text-muted)}.ntf.ok .ntf-chip[data-v-69e0a1db]{color:var(--color-success)}.ntf.err .ntf-chip[data-v-69e0a1db]{color:var(--color-danger)}.ntf.warn .ntf-chip[data-v-69e0a1db]{color:var(--color-warning)}.ntf-main[data-v-69e0a1db]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.ntf-title[data-v-69e0a1db]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.ntf-sub[data-v-69e0a1db]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ntf-side[data-v-69e0a1db]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1);font-size:var(--text-xs);color:var(--color-text-faint)}.ntf-side .st[data-v-69e0a1db]{font-weight:var(--weight-medium)}.ntf.ok .st[data-v-69e0a1db],.ng-item.ok .st[data-v-69e0a1db]{color:var(--color-success)}.ntf.err .st[data-v-69e0a1db],.ng-item.err .st[data-v-69e0a1db]{color:var(--color-danger)}.ntf.warn .st[data-v-69e0a1db],.ng-item.warn .st[data-v-69e0a1db]{color:var(--color-warning)}.ntf-car[data-v-69e0a1db]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.ntf.open>.ntf-head .ntf-car[data-v-69e0a1db],.ntf-group-card.open>.ntf-head .ntf-car[data-v-69e0a1db],.ng-item.open>.ntf-head .ntf-car[data-v-69e0a1db]{transform:rotate(90deg)}.ntf-body-in[data-v-69e0a1db]{margin:0 var(--space-3) var(--space-3);padding-top:var(--space-3);border-top:.5px solid var(--color-line);display:flex;flex-direction:column;gap:var(--space-2)}.ntf.ok .ntf-body-in[data-v-69e0a1db],.ng-item.ok .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-success-bd)}.ntf.err .ntf-body-in[data-v-69e0a1db],.ng-item.err .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-danger-bd)}.ntf.warn .ntf-body-in[data-v-69e0a1db],.ng-item.warn .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-warning-bd)}.nd-fields[data-v-69e0a1db]{display:grid;grid-template-columns:auto 1fr;gap:var(--space-1) var(--space-3)}.nd-fields .k[data-v-69e0a1db]{color:var(--color-text-faint);font-size:var(--text-xs)}.nd-fields .v[data-v-69e0a1db]{color:var(--color-text-muted);font-size:var(--text-xs);font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nd-body[data-v-69e0a1db]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.nd-out[data-v-69e0a1db]{display:flex;align-items:center;gap:var(--space-2);background:var(--color-surface-raised);border-radius:var(--radius-md);padding:var(--space-1) var(--space-2);box-shadow:var(--shadow-xs)}.nd-out-ic[data-v-69e0a1db]{color:var(--color-text-faint);flex:none}.nd-out .path[data-v-69e0a1db]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left}.nd-act[data-v-69e0a1db]{display:inline-flex;align-items:center;height:var(--space-6);padding:0 var(--space-2);border-radius:var(--radius-full);font-size:var(--text-xs);color:var(--color-text-muted);border:.5px solid var(--color-line-strong);background:var(--color-surface-raised);flex:none;transition:color var(--duration-fast) var(--ease-out)}.nd-act[data-v-69e0a1db]:hover{color:var(--color-text)}.nd-raw summary[data-v-69e0a1db]{list-style:none;display:flex;align-items:center;gap:var(--space-1);cursor:pointer;color:var(--color-text-faint);font-size:var(--text-xs);user-select:none}.nd-raw summary[data-v-69e0a1db]::-webkit-details-marker{display:none}.nd-raw summary[data-v-69e0a1db]:hover{color:var(--color-text)}.nd-raw-car[data-v-69e0a1db]{transition:transform var(--duration-base) var(--ease-out)}.nd-raw[open] .nd-raw-car[data-v-69e0a1db]{transform:rotate(90deg)}.nd-raw pre[data-v-69e0a1db]{margin:var(--space-2) 0 0;padding:var(--space-2) var(--space-3);background:var(--color-surface-raised);border-radius:var(--radius-sm);box-shadow:var(--shadow-xs);font-size:var(--text-xs);line-height:1.55;color:var(--color-text-muted);overflow-x:auto;white-space:pre}.ng-dots[data-v-69e0a1db]{display:inline-flex;gap:var(--space-1);margin-right:var(--space-1)}.dot[data-v-69e0a1db]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--color-text-faint)}.dot.done[data-v-69e0a1db]{background:var(--color-success)}.dot.error[data-v-69e0a1db]{background:var(--color-danger)}.dot.warn[data-v-69e0a1db]{background:var(--color-warning)}.ng-list[data-v-69e0a1db]{display:flex;flex-direction:column}.ng-item[data-v-69e0a1db]{border-top:.5px solid var(--color-subtle)}.ng-item>.ntf-head[data-v-69e0a1db]{padding:var(--space-1) var(--space-3)}.ng-item .ntf-chip[data-v-69e0a1db]{width:22px;height:22px;border-radius:var(--radius-sm);box-shadow:none;background:transparent}.ng-item.ok .ntf-chip[data-v-69e0a1db]{color:var(--color-success)}.ng-item.err .ntf-chip[data-v-69e0a1db]{color:var(--color-danger)}.ng-item.warn .ntf-chip[data-v-69e0a1db]{color:var(--color-warning)}.ng-item .ntf-title[data-v-69e0a1db]{font-weight:var(--weight-regular);color:var(--color-text-muted)}.ng-item.open .ntf-title[data-v-69e0a1db]{color:var(--color-text)}.turn-fold[data-v-66797f5d]{display:flex;flex-direction:column}.tf-head[data-v-66797f5d]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.tf-head[data-v-66797f5d]:hover{color:var(--color-text)}.tf-head[data-v-66797f5d]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.tf-sum[data-v-66797f5d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.tf-car[data-v-66797f5d]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.turn-fold.open .tf-car[data-v-66797f5d]{transform:rotate(90deg)}.tf-body[data-v-66797f5d]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tf-body.open[data-v-66797f5d]{grid-template-rows:minmax(0,1fr)}.tf-body-inner[data-v-66797f5d]{min-height:0;overflow:hidden;display:flex;flex-direction:column}.tf-body-inner>.msg[data-v-66797f5d],.tf-body-inner[data-v-66797f5d]>.think,.tf-body-inner[data-v-66797f5d]>.tool-group,.tf-body-inner[data-v-66797f5d]>.activity-run,.tf-body-inner[data-v-66797f5d]>.agent-card,.tf-body-inner[data-v-66797f5d]>.agent-group,.tf-body-inner[data-v-66797f5d]>.tool-line,.tf-body-inner[data-v-66797f5d]>.swarm-card,.tf-body-inner[data-v-66797f5d]>.media-tool,.tf-body-inner[data-v-66797f5d]>.ask-receipt{margin-top:var(--chat-block-gap)}.turn-fold.streaming .tf-body-inner>.msg[data-v-66797f5d]:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.think:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.tool-group:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.activity-run:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.agent-card:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.agent-group:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.tool-line:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.swarm-card:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.media-tool:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.ask-receipt:first-child{margin-top:0}.tf-body-inner .msg[data-v-66797f5d]{font-size:var(--ui-font-size);line-height:var(--leading-prose);color:var(--color-text);font-weight:var(--weight-medium)}.tf-body-inner .msg[data-v-66797f5d] p{margin:0}.tf-body-inner .msg[data-v-66797f5d] p+p{margin-top:var(--space-2)}@container (min-width: 760px){.tf-body-inner .msg[data-v-66797f5d] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.tf-body-inner .msg[data-v-66797f5d] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}.tf-body-inner .msg[data-v-66797f5d] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}}@media(max-width:640px){.tf-body-inner .msg[data-v-66797f5d]{font-size:var(--ui-font-size-xl)}}.turn-files[data-v-f37da416]{margin-top:var(--chat-block-gap)}.turn-files[data-v-f37da416] .ui-card__head{font-family:var(--font-ui);font-weight:var(--weight-regular);padding:var(--space-2) var(--space-3)}.turn-files[data-v-f37da416] .ui-card__body{padding:var(--space-1) var(--space-3)}.turn-files[data-v-f37da416] .ui-card__foot{padding:0;justify-content:stretch}.tf-ic[data-v-f37da416]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.tf-title[data-v-f37da416]{font-size:var(--text-sm);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-stats[data-v-f37da416]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.tf-add[data-v-f37da416],.tf-del[data-v-f37da416]{font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tf-add[data-v-f37da416]{color:var(--color-success)}.tf-del[data-v-f37da416]{color:var(--color-danger)}.tf-list[data-v-f37da416]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.tf-row[data-v-f37da416]{display:flex;align-items:center;gap:var(--space-1);min-width:0;padding:var(--space-1) 0;font-size:var(--text-sm);line-height:var(--leading-tight)}.tf-file[data-v-f37da416]{display:flex;align-items:baseline;border:none;border-radius:var(--radius-xs);background:transparent;padding:0;font-family:inherit;font-size:inherit;color:var(--color-text);flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-align:left}button.tf-file[data-v-f37da416]{cursor:pointer}button.tf-file[data-v-f37da416]:hover{text-decoration:underline;text-decoration-color:var(--color-text-faint);text-underline-offset:3px}.tf-file[data-v-f37da416]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tf-dir[data-v-f37da416]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--color-text-faint)}.tf-base[data-v-f37da416]{flex:none;font-weight:var(--weight-medium);color:var(--color-text)}.tf-more[data-v-f37da416]{width:100%;justify-content:flex-start;border-radius:0}.turn-files .tf-more[data-v-f37da416]:not(:disabled):active{transform:none}.tf-more-car[data-v-f37da416]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.tf-more-car.open[data-v-f37da416]{transform:rotate(180deg)}.diffbar[data-v-f37da416]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;flex:none}.seg-add[data-v-f37da416]{background:var(--color-success)}.seg-del[data-v-f37da416]{background:var(--color-danger)}.activity-notice[data-v-cc29061f]{display:inline-flex;align-items:center;gap:9px;align-self:flex-start;margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.cn[data-v-9f79345d]{margin:0;align-self:flex-end;max-width:78%;display:flex;flex-direction:column;align-items:flex-end}.cn-head[data-v-9f79345d]{align-self:flex-end;display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal);overflow-wrap:anywhere}.cn-head-ico[data-v-9f79345d]{flex:none}.cn-head.error .cn-head-ico[data-v-9f79345d]{color:var(--color-danger)}.cn-bubble[data-v-9f79345d]{box-sizing:border-box;max-width:100%;padding:10px 12px;background:var(--color-user-bubble-bg);border-radius:var(--radius-lg);color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.cn-meta[data-v-9f79345d]{margin-top:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal)}/*! PhotoSwipe main CSS by Dmytro Semenov | photoswipe.com */.pswp{--pswp-bg: #000;--pswp-placeholder-bg: #222;--pswp-root-z-index: 100000;--pswp-preloader-color: rgba(79, 79, 79, .4);--pswp-preloader-color-secondary: rgba(255, 255, 255, .9);--pswp-icon-color: #fff;--pswp-icon-color-secondary: #4f4f4f;--pswp-icon-stroke-color: #4f4f4f;--pswp-icon-stroke-width: 2px;--pswp-error-text-color: var(--pswp-icon-color)}.pswp{position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--pswp-root-z-index);display:none;touch-action:none;outline:0;opacity:.003;contain:layout style size;-webkit-tap-highlight-color:rgba(0,0,0,0)}.pswp:focus{outline:0}.pswp *{box-sizing:border-box}.pswp img{max-width:none}.pswp--open{display:block}.pswp,.pswp__bg{transform:translateZ(0);will-change:opacity}.pswp__bg{opacity:.005;background:var(--pswp-bg)}.pswp,.pswp__scroll-wrap{overflow:hidden}.pswp__scroll-wrap,.pswp__bg,.pswp__container,.pswp__item,.pswp__content,.pswp__img,.pswp__zoom-wrap{position:absolute;top:0;left:0;width:100%;height:100%}.pswp__img,.pswp__zoom-wrap{width:auto;height:auto}.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img{cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,.pswp__img{cursor:-webkit-zoom-out;cursor:-moz-zoom-out;cursor:zoom-out}.pswp__container,.pswp__img,.pswp__button,.pswp__counter{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pswp__item{z-index:1;overflow:hidden}.pswp__hidden{display:none!important}.pswp__content{pointer-events:none}.pswp__content>*{pointer-events:auto}.pswp__error-msg-container{display:grid}.pswp__error-msg{margin:auto;font-size:1em;line-height:1;color:var(--pswp-error-text-color)}.pswp .pswp__hide-on-close{opacity:.005;will-change:opacity;transition:opacity var(--pswp-transition-duration) cubic-bezier(.4,0,.22,1);z-index:10;pointer-events:none}.pswp--ui-visible .pswp__hide-on-close{opacity:1;pointer-events:auto}.pswp__button{position:relative;display:block;width:50px;height:60px;padding:0;margin:0;overflow:hidden;cursor:pointer;background:none;border:0;box-shadow:none;opacity:.85;-webkit-appearance:none;-webkit-touch-callout:none}.pswp__button:hover,.pswp__button:active,.pswp__button:focus{transition:none;padding:0;background:none;border:0;box-shadow:none;opacity:1}.pswp__button:disabled{opacity:.3;cursor:auto}.pswp__icn{fill:var(--pswp-icon-color);color:var(--pswp-icon-color-secondary)}.pswp__icn{position:absolute;top:14px;left:9px;width:32px;height:32px;overflow:hidden;pointer-events:none}.pswp__icn-shadow{stroke:var(--pswp-icon-stroke-color);stroke-width:var(--pswp-icon-stroke-width);fill:none}.pswp__icn:focus{outline:0}div.pswp__img--placeholder,.pswp__img--with-bg{background:var(--pswp-placeholder-bg)}.pswp__top-bar{position:absolute;left:0;top:0;width:100%;height:60px;display:flex;flex-direction:row;justify-content:flex-end;z-index:10;pointer-events:none!important}.pswp__top-bar>*{pointer-events:auto;will-change:opacity}.pswp__button--close{margin-right:6px}.pswp__button--arrow{position:absolute;width:75px;height:100px;top:50%;margin-top:-50px}.pswp__button--arrow:disabled{display:none;cursor:default}.pswp__button--arrow .pswp__icn{top:50%;margin-top:-30px;width:60px;height:60px;background:none;border-radius:0}.pswp--one-slide .pswp__button--arrow{display:none}.pswp--touch .pswp__button--arrow{visibility:hidden}.pswp--has_mouse .pswp__button--arrow{visibility:visible}.pswp__button--arrow--prev{right:auto;left:0}.pswp__button--arrow--next{right:0}.pswp__button--arrow--next .pswp__icn{left:auto;right:14px;transform:scaleX(-1)}.pswp__button--zoom{display:none}.pswp--zoom-allowed .pswp__button--zoom{display:block}.pswp--zoomed-in .pswp__zoom-icn-bar-v{display:none}.pswp__preloader{position:relative;overflow:hidden;width:50px;height:60px;margin-right:auto}.pswp__preloader .pswp__icn{opacity:0;transition:opacity .2s linear;animation:pswp-clockwise .6s linear infinite}.pswp__preloader--active .pswp__icn{opacity:.85}@keyframes pswp-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.pswp__counter{height:30px;margin-top:15px;margin-inline-start:20px;font-size:14px;line-height:30px;color:var(--pswp-icon-color);text-shadow:1px 1px 3px var(--pswp-icon-color-secondary);opacity:.85}.pswp--one-slide .pswp__counter{display:none}.pswp{--pswp-root-z-index: var(--z-modal);--pswp-bg: var(--color-scrim-strong)}.media-preview-caption{position:absolute;left:0;right:0;bottom:var(--space-4);padding:0 var(--space-6);color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.media-lightbox[data-v-6c0c564d]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:var(--color-scrim-strong)}.media-lightbox-card[data-v-6c0c564d]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(960px,calc(100vw - var(--space-6) * 2));max-height:calc(100vh - var(--space-6) * 2)}.media-lightbox-frame[data-v-6c0c564d]{max-width:100%;border-radius:var(--radius-md);overflow:hidden;background:var(--color-bg);box-shadow:var(--shadow-xl)}.media-lightbox-media[data-v-6c0c564d]{display:block;max-width:100%;max-height:calc(100vh - var(--space-6) * 4);object-fit:contain}.media-lightbox-name[data-v-6c0c564d]{max-width:100%;color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-lightbox-close[data-v-6c0c564d]{position:fixed;top:var(--space-4);right:var(--space-6);display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-sm);cursor:pointer;z-index:var(--z-modal-dropdown)}.media-lightbox-close[data-v-6c0c564d]:before{content:"";position:absolute;inset:-6px}.media-lightbox-close[data-v-6c0c564d]:hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.media-thumb[data-v-a7ab7e98]{position:relative;flex:none;display:inline-flex}.media-thumb-btn[data-v-a7ab7e98]{display:block;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:hidden;cursor:pointer;transition:border-color var(--duration-fast) ease}.media-thumb-btn[data-v-a7ab7e98]:hover{border-color:var(--color-line-strong)}.media-thumb-btn[data-v-a7ab7e98]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.media-thumb-media[data-v-a7ab7e98]{display:block;width:64px;height:64px;object-fit:cover}.media-thumb-tile[data-v-a7ab7e98]{object-fit:none}.media-thumb-badge[data-v-a7ab7e98]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.media-thumb-badge.is-error[data-v-a7ab7e98]{color:var(--color-danger);border-color:var(--color-danger-bd)}.media-thumb.is-error .media-thumb-btn[data-v-a7ab7e98]{border-color:var(--color-danger-bd)}.media-thumb-rm[data-v-a7ab7e98]{position:absolute;top:var(--space-1);right:var(--space-1);z-index:1;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:var(--color-scrim);color:var(--color-text-on-scrim);cursor:pointer}.media-thumb-rm[data-v-a7ab7e98]:hover{background:var(--color-text);color:var(--color-bg)}.media-thumb-rm[data-v-a7ab7e98]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.att-chip[data-v-f3a3043a]{display:inline-flex;align-items:center;gap:6px;max-width:220px;padding:4px 9px 4px var(--att-chip-pad-left, 5px);background:var(--color-well);border:.5px solid var(--color-line);border-radius:999px;font-size:var(--ui-font-size-sm);transition:border-color var(--duration-fast) ease}.att-chip[data-v-f3a3043a]:hover{border-color:var(--color-line-strong)}.att-activate[data-v-f3a3043a]{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}.att-activate[data-v-f3a3043a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:999px}.att-tile[data-v-f3a3043a]{width:20px;height:20px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--color-text-muted);background:var(--color-surface-sunken)}.att-tile[data-v-f3a3043a] .att-thumb{width:100%;height:100%;object-fit:cover;display:block}.att-name[data-v-f3a3043a]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.att-chip.is-error[data-v-f3a3043a]{border-color:var(--color-danger-bd)}.att-chip.is-error .att-err[data-v-f3a3043a]{flex:none;display:flex;align-items:center;color:var(--color-danger)}.att-rm[data-v-f3a3043a]{flex:none;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--color-text-faint);cursor:pointer}.att-rm[data-v-f3a3043a]:hover{background:var(--color-hover);color:var(--color-text)}.att-rm[data-v-f3a3043a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mascot-host[data-v-27600ac7]{position:relative;width:100%;aspect-ratio:72 / 100}.mascot-fallback[data-v-27600ac7]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:86.5%;height:auto}.mascot-canvas[data-v-27600ac7]{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .25s ease}.mascot-canvas.ready[data-v-27600ac7]{opacity:1}@media(prefers-reduced-motion:reduce){.mascot-canvas[data-v-27600ac7]{transition:none}}.working-indicator[data-v-8abb44ef]{display:inline-flex;align-items:center;gap:var(--space-2);align-self:flex-start;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.wi-mascot[data-v-8abb44ef]{flex:none;width:40px}.wi-label[data-v-8abb44ef]{animation:wi-breathe-8abb44ef 1.6s var(--ease-in-out) infinite}@keyframes wi-breathe-8abb44ef{0%,to{opacity:1}50%{opacity:.45}}.chat-empty[data-v-2304fd80]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px 16px;color:var(--faint);text-align:center}.chat-empty-text[data-v-2304fd80]{font-size:var(--ui-font-size-sm)}.chat-loading[data-v-2304fd80]{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:24px 16px;color:var(--muted)}.chat-loading-text[data-v-2304fd80]{font-size:var(--ui-font-size-sm)}.chat[data-v-2304fd80]{--chat-turn-gap: 16px;--chat-block-gap: 10px;--chat-section-gap: 18px;display:flex;flex-direction:column;gap:0;padding:16px 14px 20px;flex:1;min-height:0;position:relative}.chat .chat-empty[data-v-2304fd80]{align-self:stretch}.open-unsupported[data-v-2304fd80]{position:absolute;bottom:16px;left:50%;transform:translate(-50%);max-width:min(90%,480px);padding:6px 12px;border-radius:var(--radius-md);border:.5px solid var(--color-line);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;z-index:var(--z-sticky)}.chat>.u-turn[data-v-2304fd80],.chat>.a-msg[data-v-2304fd80],.chat>.compact-divider[data-v-2304fd80],.chat>.cron-notice[data-v-2304fd80],.chat>.sending-placeholder[data-v-2304fd80],.chat[data-v-2304fd80]>.activity-notice{margin-top:var(--chat-turn-gap)}.chat>.a-msg[data-v-2304fd80]{margin-top:10px}.chat>.u-turn[data-v-2304fd80]:first-child,.chat>.a-msg[data-v-2304fd80]:first-child,.chat>.compact-divider[data-v-2304fd80]:first-child,.chat>.cron-notice[data-v-2304fd80]:first-child,.chat>.sending-placeholder[data-v-2304fd80]:first-child,.chat[data-v-2304fd80]>.activity-notice:first-child{margin-top:0}.u-turn[data-v-2304fd80]{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-start;width:100%}.u-bub[data-v-2304fd80]{align-self:flex-end;max-width:78%;background:var(--color-user-bubble-bg);color:var(--color-text);border-radius:var(--radius-lg);padding:10px 12px;font-size:var(--content-font-size);line-height:var(--leading-normal)}.u-meta[data-v-2304fd80]{align-self:flex-end;display:flex;justify-content:flex-end;align-items:center;max-width:78%;margin-top:var(--space-2);margin-right:4px}.u-meta .u-edit[data-v-2304fd80]{min-height:22px;box-sizing:border-box}.u-text[data-v-2304fd80]{white-space:pre-wrap;overflow-wrap:anywhere}.u-text-wrap[data-v-2304fd80]{position:relative;display:flex;flex-direction:column}.u-text-wrap-args[data-v-2304fd80]{margin-top:var(--space-1)}.u-text-wrap.is-clamped[data-v-2304fd80]{min-width:120px}.u-text-wrap.is-clamped>.u-text[data-v-2304fd80],.u-text-wrap.is-clamped>.skill-act-args[data-v-2304fd80],.u-text-wrap.is-clamped>.q-body[data-v-2304fd80]{max-height:10lh;overflow:hidden;mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh));-webkit-mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh))}.u-text-toggle[data-v-2304fd80]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:center;margin-top:var(--space-2);padding:var(--space-2) var(--space-4);border:none;border-radius:var(--radius-full);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:1;cursor:pointer;user-select:none;transition:box-shadow var(--duration-base) var(--ease-out)}.u-text-toggle[data-v-2304fd80]:hover{box-shadow:var(--shadow-md)}.u-text-toggle[data-v-2304fd80]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.u-text-wrap.is-clamped .u-text-toggle[data-v-2304fd80]{position:absolute;bottom:0;left:50%;transform:translate(-50%);margin-top:0}.u-text-toggle-car[data-v-2304fd80]{transition:transform var(--duration-base) var(--ease-out)}.u-text-toggle[aria-expanded=true] .u-text-toggle-car[data-v-2304fd80]{transform:rotate(180deg)}.u-edit[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s}.u-edit svg[data-v-2304fd80]{display:block;flex:none}.u-edit[data-v-2304fd80]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-armed[data-v-2304fd80]{--undo-hint-duration: 5s;gap:var(--space-1);opacity:1;color:var(--color-text);animation:u-edit-armed-blink-2304fd80 var(--undo-hint-duration) linear forwards}.u-edit-armed[data-v-2304fd80]:hover{color:var(--color-accent);background:var(--hover)}.u-edit-hint[data-v-2304fd80]{display:inline-flex;align-items:center;gap:var(--space-1);font-size:var(--text-xs);font-weight:var(--weight-medium);white-space:nowrap}@keyframes u-edit-armed-blink-2304fd80{0%,55%{opacity:1}62%{opacity:.45}69%{opacity:1}75%{opacity:.4}81%{opacity:.95}86%{opacity:.35}91%{opacity:.85}95%{opacity:.3}to{opacity:0}}@media(prefers-reduced-motion:reduce){.u-edit-armed[data-v-2304fd80]{animation:none}}.u-copy[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.u-copy svg[data-v-2304fd80]{display:block;flex:none}.u-copy[data-v-2304fd80]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-wrap[data-v-2304fd80]{display:flex;justify-content:flex-end}.chat>.u-edit-wrap[data-v-2304fd80]{margin-top:4px}.chat>.u-edit-wrap+.a-msg[data-v-2304fd80]{margin-top:8px}.compact-divider[data-v-2304fd80]{display:flex;align-items:center;gap:10px;align-self:stretch;width:100%;margin:var(--chat-section-gap) 0 0}.chat>.compact-divider[data-v-2304fd80]:first-child{margin-top:0}.cd-line[data-v-2304fd80]{flex:1;height:1px;background:var(--line)}.cd-label[data-v-2304fd80]{flex:none;display:inline-flex;align-items:center;gap:8px;max-width:80%;font-size:var(--text-base);color:var(--muted);white-space:nowrap}.cd-btn[data-v-2304fd80]{background:none;border:none;padding:0;cursor:pointer;font:inherit;font-size:var(--text-base);color:var(--muted)}.cd-view[data-v-2304fd80]{color:var(--color-accent)}.cd-btn:hover .cd-view[data-v-2304fd80]{text-decoration:underline}.chat>.turn-failed[data-v-2304fd80]{margin-top:var(--chat-turn-gap)}.chat>.turn-failed[data-v-2304fd80]:first-child{margin-top:0}.turn-failed[data-v-2304fd80]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:var(--p-hairline) solid var(--color-danger-bd);border-radius:var(--radius-lg);background:var(--color-danger-soft);box-shadow:var(--shadow-xs);animation:kimi-card-in var(--duration-slow) var(--ease-out)}.tf-chip[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);flex:none;color:var(--color-danger)}.tf-main[data-v-2304fd80]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.tf-title[data-v-2304fd80]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.tf-sub[data-v-2304fd80]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-meta[data-v-2304fd80]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.goal-prov[data-v-2304fd80]{display:flex;align-items:center;gap:var(--space-1);margin-bottom:var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-normal);user-select:none}.a-msg[data-v-2304fd80]{align-self:flex-start;max-width:94%;width:94%}.a-msg-ft[data-v-2304fd80]{display:flex;justify-content:flex-start;align-items:center;gap:8px;height:auto;margin-top:var(--chat-block-gap);overflow:visible}.a-time[data-v-2304fd80]{display:inline-flex;align-items:center;font-size:var(--text-base);color:var(--muted);line-height:1}.a-cpbtn[data-v-2304fd80]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.a-cpbtn[data-v-2304fd80]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.a-cpbtn svg[data-v-2304fd80]{display:block;flex:none}@media(hover:none){.a-msg-ft[data-v-2304fd80]{height:auto;margin-top:var(--chat-block-gap);opacity:1;pointer-events:auto}.a-cpbtn[data-v-2304fd80]{font-size:var(--ui-font-size-sm);padding:8px 10px;margin:-4px -6px}}.a-msg .msg[data-v-2304fd80]{font-size:var(--ui-font-size);line-height:var(--leading-prose);color:var(--color-text);font-weight:500}.a-msg .msg[data-v-2304fd80] p{margin:0}.a-msg .msg[data-v-2304fd80] p+p{margin-top:8px}.a-msg>.msg[data-v-2304fd80],.a-msg[data-v-2304fd80]>.think,.a-msg[data-v-2304fd80]>.tool-group,.a-msg[data-v-2304fd80]>.activity-run,.a-msg[data-v-2304fd80]>.agent-card,.a-msg[data-v-2304fd80]>.agent-group,.a-msg[data-v-2304fd80]>.tool-line,.a-msg[data-v-2304fd80]>.swarm-card,.a-msg[data-v-2304fd80]>.media-tool,.a-msg[data-v-2304fd80]>.ask-receipt{margin-top:var(--chat-block-gap)}.a-msg>.msg[data-v-2304fd80]:first-child,.a-msg[data-v-2304fd80]>.think:first-child,.a-msg[data-v-2304fd80]>.tool-group:first-child,.a-msg[data-v-2304fd80]>.activity-run:first-child,.a-msg[data-v-2304fd80]>.agent-card:first-child,.a-msg[data-v-2304fd80]>.agent-group:first-child,.a-msg[data-v-2304fd80]>.tool-line:first-child,.a-msg[data-v-2304fd80]>.swarm-card:first-child,.a-msg[data-v-2304fd80]>.media-tool:first-child,.a-msg[data-v-2304fd80]>.ask-receipt:first-child{margin-top:0}.a-msg>.goal-prov:first-child+.msg[data-v-2304fd80],.a-msg>.goal-prov[data-v-2304fd80]:first-child+.think,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.tool-group,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.activity-run,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.agent-card,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.agent-group,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.tool-line,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.swarm-card,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.media-tool,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.ask-receipt,.a-msg>.goal-prov[data-v-2304fd80]:first-child+.turn-fold{margin-top:0}.a-msg[data-v-2304fd80] :not(pre)>code{font:.9em var(--font-mono);background:var(--color-inline-code-bg);border:.5px solid var(--color-line);border-radius:var(--radius-sm);padding:1px 6px;color:var(--color-accent-hover)}@container (min-width: 760px){.a-msg .msg[data-v-2304fd80] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.a-msg .msg[data-v-2304fd80] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}.a-msg .msg[data-v-2304fd80] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}}.u-media[data-v-2304fd80]{display:flex;flex-wrap:wrap;gap:var(--space-2)}.u-media[data-v-2304fd80]:not(:last-child){margin-bottom:var(--space-2)}.u-atts[data-v-2304fd80]{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.sending-placeholder[data-v-2304fd80]{align-self:flex-start;padding:10px 0}.skill-act[data-v-2304fd80]{display:flex;flex-direction:column;gap:2px}.skill-act-head[data-v-2304fd80]{font-size:var(--ui-font-size-sm);font-weight:500;color:var(--color-accent-hover);display:flex;align-items:center;gap:6px}.skill-act-arrow[data-v-2304fd80]{color:var(--color-accent);font-size:var(--text-base)}.skill-act-args[data-v-2304fd80]{font-size:var(--text-base);color:var(--muted);padding-left:17px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:640px){.chat[data-v-2304fd80]{box-sizing:border-box;width:100%;padding:14px max(12px,var(--safe-right)) 18px max(12px,var(--safe-left))}.u-bub[data-v-2304fd80]{max-width:min(88%,calc(100vw - 52px))}.a-msg[data-v-2304fd80]{width:100%;max-width:100%}.u-bub .u-text[data-v-2304fd80],.a-msg .msg[data-v-2304fd80]{font-size:var(--ui-font-size-xl)}.a-msg[data-v-2304fd80] .md,.a-msg[data-v-2304fd80] .markdown-renderer,.a-msg[data-v-2304fd80] .code-block-container,.a-msg[data-v-2304fd80] .diff-wrap,.a-msg[data-v-2304fd80] pre{max-width:100%}.a-msg[data-v-2304fd80] .code-block-container pre,.a-msg[data-v-2304fd80] .diff-pre{overflow-x:auto;-webkit-overflow-scrolling:touch}.a-msg[data-v-2304fd80] .media-tool.mob{width:min(44vw,160px)}.cd-label[data-v-2304fd80]{min-width:0;max-width:calc(100% - 48px);overflow:hidden;text-overflow:ellipsis}.u-edit-confirm[data-v-2304fd80]{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100vw - 28px)}.ts[data-v-2304fd80]{font-size:var(--ui-font-size-sm)}.chat-empty-text[data-v-2304fd80],.chat-loading-text[data-v-2304fd80]{font-size:var(--ui-font-size-lg)}.cd-label[data-v-2304fd80],.cd-btn[data-v-2304fd80]{font-size:var(--ui-font-size)}}.top-sentinel[data-v-2304fd80]{display:flex;align-items:center;justify-content:center;padding:12px 0;min-height:28px;user-select:none}.top-sentinel-loading[data-v-2304fd80]{opacity:.8}.top-sentinel-btn[data-v-2304fd80]{appearance:none;border:.5px solid var(--border);background:transparent;color:var(--muted);font-size:var(--ui-font-size-sm);padding:4px 12px;border-radius:999px;cursor:pointer;transition:color .15s ease,border-color .15s ease}.top-sentinel-btn[data-v-2304fd80]:hover{color:var(--fg);border-color:var(--fg)}.top-sentinel-text[data-v-2304fd80]{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--ui-font-size-sm)}.chat[data-v-2304fd80]{background:transparent}.chat[data-v-2304fd80]{gap:0;padding:22px 20px 26px}.u-bub[data-v-2304fd80]{background:var(--color-user-bubble-bg);border-radius:var(--radius-lg);padding:10px 12px}.a-msg[data-v-2304fd80]{max-width:100%;width:100%}.chat>.q-stack[data-v-2304fd80]{margin-top:var(--chat-turn-gap)}.chat>.q-stack[data-v-2304fd80]:first-child{margin-top:0}.q-stack[data-v-2304fd80]{align-self:flex-end;width:100%;display:flex;flex-direction:column;gap:8px}.q-head[data-v-2304fd80]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 6px;color:var(--color-text-faint);font-size:var(--ui-font-size-xs)}.q-title[data-v-2304fd80]{display:inline-flex;align-items:center;gap:6px}.q-title b[data-v-2304fd80]{color:var(--color-accent-hover);font-weight:var(--weight-medium)}.q-hint[data-v-2304fd80]{color:var(--color-text-faint)}.q-turn[data-v-2304fd80]{position:relative}.q-bub[data-v-2304fd80]{display:flex;align-items:center;gap:8px;width:fit-content;background:var(--color-surface-raised);border:.5px dashed var(--color-accent-bd);padding:8px 8px 8px 6px;transition:border-color .12s ease,background .12s ease}.q-bub[data-v-2304fd80]:hover{border-color:var(--color-accent);background:var(--color-accent-soft)}.q-grip[data-v-2304fd80]{flex:none;display:inline-flex;align-items:center;padding:2px;color:var(--color-text-faint);cursor:grab;opacity:.7}.q-grip[data-v-2304fd80]:hover{opacity:1}.q-grip[data-v-2304fd80]:active{cursor:grabbing}.q-clamp[data-v-2304fd80]{flex:1;min-width:0}.q-body[data-v-2304fd80]{flex:1;min-width:0;background:none;border:none;padding:0;margin:0;font:inherit;color:var(--color-text);text-align:left;cursor:pointer;opacity:.82}.q-bub:hover .q-body[data-v-2304fd80]{opacity:1}.q-body[data-v-2304fd80]:disabled{cursor:default}.q-text[data-v-2304fd80]{white-space:pre-wrap;overflow-wrap:anywhere}.q-text-placeholder[data-v-2304fd80]{display:inline-flex;align-items:center;gap:4px;color:var(--color-text-muted)}.q-imgs[data-v-2304fd80]{display:flex;gap:4px;flex:none}.q-img[data-v-2304fd80]{width:28px;height:28px;object-fit:cover;border-radius:var(--radius-sm);border:.5px solid var(--color-line)}.q-file[data-v-2304fd80]{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border-radius:var(--radius-sm);border:.5px solid var(--color-line);color:var(--color-text-muted);font-size:calc(var(--ui-font-size) - 3px);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.q-tag[data-v-2304fd80]{flex:none;padding:1px 6px;border-radius:var(--radius-full);font-size:var(--ui-font-size-xs);font-weight:var(--weight-medium);line-height:var(--leading-caption);white-space:nowrap}.q-tag-next[data-v-2304fd80]{color:var(--color-accent-hover);background:var(--color-accent-soft);border:.5px solid var(--color-accent-bd)}.q-tag-idx[data-v-2304fd80]{color:var(--color-text-faint);background:var(--color-surface-sunken);border:.5px solid var(--color-line)}.q-rm[data-v-2304fd80]{flex:none;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;border-radius:var(--radius-sm);color:var(--color-text-faint);cursor:pointer;opacity:0;transition:opacity .12s ease,background .12s ease,color .12s ease}.q-bub:hover .q-rm[data-v-2304fd80],.q-bub:focus-within .q-rm[data-v-2304fd80],.q-rm[data-v-2304fd80]:focus-visible{opacity:1}.q-rm[data-v-2304fd80]:hover{background:var(--color-danger-soft);color:var(--color-danger)}.q-turn.q-dragging .q-bub[data-v-2304fd80]{opacity:.45}.q-turn.drop-before[data-v-2304fd80]:before,.q-turn.drop-after[data-v-2304fd80]:after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--color-accent);border-radius:var(--radius-full);z-index:1}.q-turn.drop-before[data-v-2304fd80]:before{top:-5px}.q-turn.drop-after[data-v-2304fd80]:after{bottom:-5px}.chat-header[data-v-cac58d83]{flex:none;display:flex;align-items:center;gap:14px;height:var(--panel-head-h, 48px);padding:0 16px;border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui);min-width:0;user-select:none;container-type:inline-size}.chat-header.macos-desktop[data-v-cac58d83]{-webkit-app-region:drag}.chat-header.macos-desktop button[data-v-cac58d83],.chat-header.macos-desktop input[data-v-cac58d83]{-webkit-app-region:no-drag}.ch-id[data-v-cac58d83]{display:flex;align-items:center;gap:6px;min-width:0;flex:none;max-width:46%}.ch-ws[data-v-cac58d83]{color:var(--color-text-muted);font-size:var(--text-base);font-weight:var(--weight-medium);flex:none}.ch-sep[data-v-cac58d83]{color:var(--color-text-faint);flex:none}.ch-ses[data-v-cac58d83]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ch-rename[data-v-cac58d83]{flex:1;min-width:0;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none;user-select:text}.ch-git[data-v-cac58d83]{display:flex;align-items:center;gap:4px;border:none;background:transparent;padding:0;color:var(--muted);font-family:var(--font-ui);font-size:calc(var(--ui-font-size) - 2px);flex:0 1 auto;max-width:none;min-width:0;cursor:pointer}.ch-git:hover .ch-branch[data-v-cac58d83]{color:var(--color-text)}.ch-branch-icon[data-v-cac58d83]{flex:none;color:var(--color-text-muted)}.ch-branch[data-v-cac58d83]{color:var(--dim);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:4px}.ch-detached[data-v-cac58d83]{color:var(--muted);font-style:italic}.ch-pill[data-v-cac58d83]{display:inline-flex;align-items:center;gap:3px;padding:1px 5px;border-radius:999px;background:var(--panel);border:.5px solid var(--line);font-size:calc(var(--ui-font-size) - 3px)}.ch-sync-pill[data-v-cac58d83]{border-color:var(--line)}.ch-diff-pill[data-v-cac58d83]{border-color:color-mix(in srgb,var(--color-success) 20%,var(--line));font-variant-numeric:tabular-nums}.ch-ahead[data-v-cac58d83]{color:var(--color-warning);flex:none}.ch-behind[data-v-cac58d83]{color:var(--color-accent-hover);flex:none}.ch-add[data-v-cac58d83]{color:var(--color-success);flex:none}.ch-del[data-v-cac58d83]{color:var(--color-danger);flex:none}.ch-spacer[data-v-cac58d83]{flex:1;min-width:0}@container (max-width: 720px){.ch-ws[data-v-cac58d83],.ch-sep[data-v-cac58d83]{display:none}.ch-id[data-v-cac58d83]{flex:1;max-width:none}.ch-spacer[data-v-cac58d83]{flex:0}}.chat-header .ch-act-more[data-v-cac58d83]{width:24px;height:24px;border-radius:var(--radius-sm)}.chat-header .ch-act-more[data-v-cac58d83] svg{width:14px;height:14px}.ch-act-more.open[data-v-cac58d83]{background:var(--color-well);color:var(--color-text)}.ch-dev[data-v-cac58d83]{display:inline-flex;align-items:center;height:22px;padding:0 9px;flex:none;border:.5px solid var(--color-warning-bd);border-radius:var(--radius-full);background:var(--color-warning-soft);color:var(--color-warning);font-size:var(--text-xs);font-weight:500}.ch-pr[data-v-cac58d83]{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 9px;flex:none;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-well);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:500;cursor:pointer}.ch-pr svg[data-v-cac58d83]{flex:none}.ch-pr.pr-open[data-v-cac58d83]{color:var(--color-success);border-color:var(--color-success-bd);background:var(--color-success-soft)}.ch-pr.pr-merged[data-v-cac58d83]{color:var(--color-done);border-color:var(--color-done-bd);background:var(--color-done-soft)}.ch-pr.pr-closed[data-v-cac58d83]{color:var(--color-danger);border-color:var(--color-danger-bd);background:var(--color-danger-soft)}.ch-pr.pr-draft[data-v-cac58d83],.ch-pr.pr-unknown[data-v-cac58d83]{color:var(--color-text-muted);border-color:var(--color-line-strong);background:var(--color-well)}.ch-pr[data-v-cac58d83]:hover{border-color:var(--color-line-strong)}.ch-menu[data-v-cac58d83]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-pop-enter-active[data-v-cac58d83]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-cac58d83]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-cac58d83],.menu-pop-leave-to[data-v-cac58d83]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}@media(max-width:980px){.ch-act-label[data-v-cac58d83]{display:none}}@media(max-width:640px){.chat-header[data-v-cac58d83]{display:none}}.slash-menu[data-menu-frame][data-v-98398dd7]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.slash-scroll[data-v-98398dd7]{max-height:var(--p-slash-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.slash-scroll[data-v-98398dd7]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-98398dd7]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.slash-menu:hover .scroll-thumb[data-v-98398dd7]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-98398dd7]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.slash-item[data-v-98398dd7]{display:flex;align-items:baseline;gap:var(--space-2);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:var(--p-hairline) solid transparent;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row);corner-shape:var(--corner-shape-menu)}.slash-item[data-v-98398dd7]:hover{background:var(--color-hover)}.slash-item.active[data-v-98398dd7]{background:var(--color-selected)}.slash-item+.slash-item[data-v-98398dd7]{margin-top:var(--menu-rows-seam)}.slash-name[data-v-98398dd7]{flex:none;max-width:60%;color:var(--color-text);font-weight:500;min-width:0;line-height:var(--leading-normal);overflow-wrap:anywhere}.slash-match[data-v-98398dd7]{font-weight:var(--weight-semibold)}.slash-empty[data-v-98398dd7]{padding:var(--space-1-5) var(--space-1);color:var(--color-text-muted)}@media(hover:none){.slash-item[data-v-98398dd7]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.slash-desc[data-v-98398dd7]{flex:1;min-width:0;color:var(--color-text-muted);font-size:var(--ui-b2);font-weight:var(--weight-regular);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-desc-match[data-v-98398dd7]{font-weight:var(--weight-semibold)}@media(max-width:520px){.slash-item[data-v-98398dd7]{flex-direction:column;align-items:stretch;gap:var(--space-05)}.slash-name[data-v-98398dd7]{max-width:none}}.mention-menu[data-menu-frame][data-v-53eca905]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.mention-scroll[data-v-53eca905]{max-height:var(--p-mention-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.mention-scroll[data-v-53eca905]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-53eca905]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.mention-menu:hover .scroll-thumb[data-v-53eca905]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-53eca905]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.mention-state[data-v-53eca905]{padding:var(--space-2) var(--space-1);font-family:var(--font-ui);font-size:var(--ui-b2)}.dim[data-v-53eca905]{color:var(--color-text-muted)}.mention-item[data-v-53eca905]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:var(--p-hairline) solid transparent;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row);corner-shape:var(--corner-shape-menu)}.mention-icon[data-v-53eca905]{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;color:var(--muted);flex-shrink:0}.mention-icon[data-v-53eca905] svg{width:13px;height:13px;display:block}.mention-item:hover .mention-icon[data-v-53eca905],.mention-item.active .mention-icon[data-v-53eca905]{color:var(--color-text-strong)}.mention-item[data-v-53eca905]:hover{background:var(--color-hover)}.mention-item:hover .mention-name[data-v-53eca905],.mention-item.active .mention-name[data-v-53eca905]{color:var(--color-text-strong)}.mention-item.active[data-v-53eca905]{background:var(--color-selected)}.mention-item+.mention-item[data-v-53eca905]{margin-top:var(--menu-rows-seam)}@media(hover:none){.mention-item[data-v-53eca905]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.mention-name[data-v-53eca905]{color:var(--color-text);font-weight:500;min-width:80px;flex-shrink:0}.mention-path[data-v-53eca905]{color:var(--color-text-muted);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer[data-v-a4ef2d7c]{padding:7px var(--dock-inline-right, 16px) 12px var(--dock-inline-left, 16px);background:transparent;transition:background .12s}.composer.drag-over[data-v-a4ef2d7c]{background:var(--color-accent-soft)}.drop-overlay[data-v-a4ef2d7c]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.drop-overlay.show[data-v-a4ef2d7c]{opacity:1;visibility:visible}.drop-card[data-v-a4ef2d7c]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4) var(--space-6);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.composer-card[data-v-a4ef2d7c]{--composer-control-size: var(--space-8);--composer-send-size: var(--composer-control-size);--composer-control-inset: var(--space-2);position:relative;border:.5px solid var(--color-composer-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);background:var(--color-composer-bg);box-shadow:var(--shadow-input);user-select:none;container-type:inline-size}.composer-card[data-v-a4ef2d7c]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.composer-card[data-v-a4ef2d7c]:focus-within:after{opacity:1}.att-strip[data-v-a4ef2d7c]{position:relative;padding:calc(var(--space-4) + var(--space-05)) var(--space-4) 0 calc(var(--space-4) + var(--space-05))}.att-scroll[data-v-a4ef2d7c]{max-height:calc(128px + var(--space-2));overflow-y:auto;margin-right:calc(var(--icon-button-sm) + var(--space-1))}.att-scroll-content[data-v-a4ef2d7c]{display:flex;flex-direction:column;gap:var(--space-2);padding-right:var(--space-1)}.att-scroll.is-overflowing[data-v-a4ef2d7c]{padding-bottom:var(--space-6)}.att-more[data-v-a4ef2d7c]{position:absolute;left:var(--space-4);bottom:var(--space-1);z-index:var(--z-raised);display:inline-flex;align-items:center;height:18px;padding:0 var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--text-xs);box-shadow:var(--shadow-sm);pointer-events:none}.att-row[data-v-a4ef2d7c]{display:flex;flex-wrap:wrap;gap:6px}.att-row-media[data-v-a4ef2d7c]{gap:var(--space-2)}.att-scroll-content[data-v-a4ef2d7c] .att-chip{corner-shape:superellipse(1.5)}.att-scroll-content[data-v-a4ef2d7c] .att-tile{margin-left:calc(-1 * (var(--att-chip-pad-left, 5px) + var(--space-05)))}.att-clear[data-v-a4ef2d7c]{position:absolute;top:calc(var(--space-4) + var(--space-05));right:var(--space-4);z-index:var(--z-raised)}.file-input-hidden[data-v-a4ef2d7c]{display:none}.cin-wrap[data-v-a4ef2d7c]{position:relative;padding:14px 16px 8px}.input-row[data-v-a4ef2d7c]{position:relative;display:flex;align-items:flex-start;gap:var(--space-2)}.expand-btn[data-v-a4ef2d7c]{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:none;border-radius:6px;background:transparent;color:var(--dim);cursor:pointer;padding:0;transition:background .12s,color .12s}.expand-btn[data-v-a4ef2d7c]:hover{background:var(--panel2);color:var(--color-text)}.expand-btn[data-v-a4ef2d7c]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.ph[data-v-a4ef2d7c]{color:var(--faint);caret-color:var(--color-text);flex:1;border:none;outline:none;resize:none;font-family:var(--font-ui);font-size:var(--content-font-size);text-autospace:normal;background:transparent;min-height:36px;max-height:25vh;overflow-y:auto;scrollbar-width:none;line-height:1.5;margin-bottom:6px;user-select:text}.ph[data-v-a4ef2d7c]::-webkit-scrollbar{display:none}.ph[data-v-a4ef2d7c]::placeholder{color:var(--muted)}.ph[data-v-a4ef2d7c]:not(:placeholder-shown){color:var(--color-text)}.composer.expanded .ph[data-v-a4ef2d7c]{min-height:70vh;max-height:70vh}.compact-chip[data-v-a4ef2d7c]{height:var(--composer-control-size);padding:0 var(--space-2);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-warning);font-family:var(--mono);font-size:var(--ui-font-size);cursor:pointer;line-height:1;flex:none;transition:background var(--duration-base) var(--ease-out)}.compact-chip[data-v-a4ef2d7c]:hover{background:var(--color-hover)}.composer-attach[data-v-a4ef2d7c]{width:var(--composer-control-size);height:var(--composer-control-size);border-radius:var(--radius-full)}.add-menu[data-v-a4ef2d7c]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;z-index:var(--z-dropdown);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);box-shadow:var(--shadow-menu);padding:var(--space-1-5) var(--space-3);display:flex;flex-direction:column;gap:var(--menu-rows-seam);font-family:var(--font-ui);transform-origin:bottom left}.am-scroll[data-v-a4ef2d7c]{max-height:var(--p-add-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:var(--menu-rows-seam)}.am-scroll[data-v-a4ef2d7c]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-a4ef2d7c]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);pointer-events:none;z-index:var(--z-raised)}.add-menu:hover .scroll-thumb[data-v-a4ef2d7c]{background:var(--color-menu-scrollbar-hover)}.am-row[data-v-a4ef2d7c]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:.5px solid transparent;border-radius:var(--radius-menu-row);corner-shape:superellipse(1.5);background:none;cursor:pointer;font-size:var(--ui-font-size);color:var(--color-text);text-align:left;transition:background var(--duration-base) var(--ease-out)}.am-row[data-v-a4ef2d7c]:hover{background:var(--color-hover)}.am-row[data-v-a4ef2d7c]:focus-visible{background:var(--color-selected);outline:none}@media(hover:none){.am-row[data-v-a4ef2d7c]{padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.am-row:hover .am-icon[data-v-a4ef2d7c],.am-row:focus-visible .am-icon[data-v-a4ef2d7c]{color:var(--color-text)}.am-icon[data-v-a4ef2d7c]{flex:none;width:var(--p-ic-sm);display:flex;justify-content:center;color:var(--color-text-muted);transition:color var(--duration-base) var(--ease-out)}.am-name[data-v-a4ef2d7c]{flex:none;font-weight:var(--weight-medium)}.am-desc[data-v-a4ef2d7c]{margin-left:var(--space-1);color:var(--color-text-muted);font-size:var(--ui-font-size-sm)}.send[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-send-bg);color:var(--color-send-icon);border:none;box-shadow:var(--shadow-send);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background var(--duration-slow) var(--ease-out),transform var(--duration-fast) var(--ease-out),box-shadow var(--duration-slow) var(--ease-out);position:relative}.send[data-v-a4ef2d7c]:hover:not(:disabled){background:var(--color-send-bg-hover);box-shadow:var(--shadow-send-hover)}.send[data-v-a4ef2d7c]:active{transform:scale(.92)}.send[data-v-a4ef2d7c]:disabled{cursor:not-allowed;background:var(--color-send-bg-disabled);color:var(--color-send-icon-disabled);opacity:var(--opacity-send-disabled)}.send[data-v-a4ef2d7c]:disabled:active{transform:none}.send.is-starting[data-v-a4ef2d7c]:disabled{background:var(--color-send-bg);color:var(--color-send-icon)}.send.is-starting[data-v-a4ef2d7c] .ui-spinner{color:var(--color-send-icon)}.send.is-starting[data-v-a4ef2d7c] .ui-spinner__track{stroke:color-mix(in srgb,var(--color-send-icon) 32%,transparent)}.send svg[data-v-a4ef2d7c]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.stop[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-subtle);color:var(--color-stop-glyph);border:none;box-shadow:var(--shadow-xs);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .16s ease,color .16s ease,transform .12s ease}.stop[data-v-a4ef2d7c]:hover{background:var(--color-danger);color:var(--color-text-on-accent)}.stop[data-v-a4ef2d7c]:active{transform:scale(.92)}.stop svg[data-v-a4ef2d7c]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.toolbar[data-v-a4ef2d7c]{display:flex;align-items:center;justify-content:space-between;padding:var(--space-1) var(--composer-control-inset) var(--composer-control-inset);position:relative}.menu-measure[data-v-a4ef2d7c]{position:absolute;width:max-content;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.toolbar-left[data-v-a4ef2d7c],.toolbar-right[data-v-a4ef2d7c]{display:flex;align-items:center;gap:var(--space-1);min-width:0}.toolbar-left[data-v-a4ef2d7c]{flex:0 1 auto;overflow:hidden}.toolbar-right[data-v-a4ef2d7c]{flex:1 1 0;justify-content:flex-end}.perm-pill[data-v-a4ef2d7c],.swarm-chip[data-v-a4ef2d7c],.model-pill[data-v-a4ef2d7c]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1);height:var(--composer-control-size);padding:0 var(--space-3);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:pointer;user-select:none;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.perm-pill[data-v-a4ef2d7c]{font-size:var(--ui-font-size-sm)}.perm-pill[data-v-a4ef2d7c]:after,.swarm-chip[data-v-a4ef2d7c]:after,.model-pill[data-v-a4ef2d7c]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.perm-pill[data-v-a4ef2d7c]:hover:after,.swarm-chip[data-v-a4ef2d7c]:hover:after,.model-pill[data-v-a4ef2d7c]:hover:after{opacity:1}.perm-pill.open[data-v-a4ef2d7c],.model-pill.open[data-v-a4ef2d7c]{background:var(--color-accent-soft)}.swarm-chip[data-v-a4ef2d7c]{cursor:default}.swarm-x[data-v-a4ef2d7c]{margin-right:calc(var(--composer-control-size) / 2 - var(--space-3) - var(--icon-button-sm) / 2);color:inherit;opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.swarm-chip:hover .swarm-x[data-v-a4ef2d7c],.swarm-x[data-v-a4ef2d7c]:focus-visible{opacity:1}@media(hover:none){.swarm-x[data-v-a4ef2d7c]{opacity:1;position:relative}.swarm-x[data-v-a4ef2d7c]:before{content:"";position:absolute;inset:calc(-1 * (var(--touch-target-min) - var(--icon-button-sm)) / 2)}}.perm-pill.perm-manual[data-v-a4ef2d7c]{color:var(--dim)}.perm-pill.perm-yolo[data-v-a4ef2d7c]{color:var(--color-warning)}.perm-pill.perm-auto[data-v-a4ef2d7c]{color:var(--color-danger)}.perm-pill-icon[data-v-a4ef2d7c]{flex:none}@container (max-width: 620px){.perm-pill[data-v-a4ef2d7c]{width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.perm-pill-label[data-v-a4ef2d7c]{display:none}.swarm-chip[data-v-a4ef2d7c]{position:relative;width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center}.swarm-label[data-v-a4ef2d7c]{display:none}.swarm-ic[data-v-a4ef2d7c]{transition:opacity var(--duration-base) var(--ease-out)}.swarm-chip:hover .swarm-ic[data-v-a4ef2d7c]{opacity:0}.swarm-x[data-v-a4ef2d7c]{position:absolute;inset:0;width:auto;height:auto;margin-right:0}@media(hover:none){.swarm-chip[data-v-a4ef2d7c]{width:var(--touch-target-min);height:var(--touch-target-min)}.swarm-chip:hover .swarm-ic[data-v-a4ef2d7c]{opacity:1}.swarm-x[data-v-a4ef2d7c]{inset:0;width:auto;height:auto;opacity:1;background:transparent}.swarm-x[data-v-a4ef2d7c]:before{inset:0 0 auto auto;width:var(--p-ic-md);height:var(--p-ic-md);border-radius:var(--radius-full);background:var(--color-selected)}.swarm-x[data-v-a4ef2d7c] svg{position:absolute;top:calc(var(--space-1-5) / 2);right:calc(var(--space-1-5) / 2);width:calc(var(--p-ic-md) - var(--space-1-5));height:calc(var(--p-ic-md) - var(--space-1-5))}}}.ctx-group[data-v-a4ef2d7c]{display:flex;align-items:center;gap:4px;flex-shrink:0;padding:2px 0;border-radius:var(--radius-xs)}.ctx-group[data-v-a4ef2d7c]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.model-pill[data-v-a4ef2d7c]{gap:var(--space-1);line-height:var(--leading-normal);overflow:hidden;flex:0 1 auto;min-width:0;max-width:320px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.model-pill[data-v-a4ef2d7c]:active{transform:scale(.97)}.model-pill[data-v-a4ef2d7c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-pill .mp-name[data-v-a4ef2d7c]{flex:0 1 auto;font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.model-pill .think-suffix[data-v-a4ef2d7c]{color:var(--color-accent);font-weight:var(--weight-medium);flex-shrink:0}.model-pill .cv[data-v-a4ef2d7c]{color:var(--faint);flex:none;transition:transform var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.model-pill:hover .cv[data-v-a4ef2d7c],.model-pill.open .cv[data-v-a4ef2d7c]{color:var(--dim)}.model-pill.open .cv[data-v-a4ef2d7c]{transform:rotate(180deg)}.model-pill.login-pill[data-v-a4ef2d7c]{flex:none;color:var(--color-accent)}.model-pill.login-pill .mp-name[data-v-a4ef2d7c]{color:var(--color-accent)}.model-dropdown[data-v-a4ef2d7c]{position:absolute;bottom:calc(100% + 4px);right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));z-index:var(--z-dropdown);min-width:200px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1);display:flex;flex-direction:column;gap:1px;font-family:var(--font-ui);transform-origin:bottom right}.composer-menu-pop-enter-active[data-v-a4ef2d7c]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.composer-menu-pop-leave-active[data-v-a4ef2d7c]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.composer-menu-pop-enter-from[data-v-a4ef2d7c],.composer-menu-pop-leave-to[data-v-a4ef2d7c]{opacity:0;transform:scale(.97) translateY(2px)}.md-list[data-v-a4ef2d7c]{display:flex;flex-direction:column;gap:1px;max-height:min(320px,40vh);overflow-y:auto;overscroll-behavior:contain}.md-section[data-v-a4ef2d7c]{padding:4px 9px 2px;font-size:var(--text-xs);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:var(--weight-semibold)}.md-row[data-v-a4ef2d7c]{display:flex;align-items:center;gap:7px;width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);padding:5px 9px;border-radius:6px;text-align:left;transition:background var(--duration-base) var(--ease-out)}.md-row[data-v-a4ef2d7c]:hover{background:var(--color-hover)}.md-row:hover .md-name[data-v-a4ef2d7c]{color:var(--color-text-strong)}.md-row[data-v-a4ef2d7c]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md-row[data-v-a4ef2d7c]:disabled{cursor:default;opacity:.58}.md-row[data-v-a4ef2d7c]:disabled:hover{background:none}.md-row.is-current[data-v-a4ef2d7c]{background:var(--color-selected)}.md-note[data-v-a4ef2d7c]{margin-left:auto;color:var(--muted);font-size:var(--ui-font-size-xs)}.md-row-more .md-more-icon[data-v-a4ef2d7c]{color:var(--dim)}.md-row-more .md-more-arrow[data-v-a4ef2d7c]{color:var(--faint);flex:none;transition:color var(--duration-base) var(--ease-out)}.md-row-more:hover .md-more-arrow[data-v-a4ef2d7c]{color:var(--dim)}.md-check[data-v-a4ef2d7c]{width:14px;flex:none;color:var(--color-accent);font-weight:500;display:flex;justify-content:center}.md-name[data-v-a4ef2d7c]{flex:1;transition:color var(--duration-base) var(--ease-out)}.md-provider[data-v-a4ef2d7c]{color:var(--muted);font-size:var(--ui-font-size-xs);flex:none}.md-star[data-v-a4ef2d7c]{color:var(--star);flex:none;margin-left:auto}.md-divider[data-v-a4ef2d7c]{height:1px;background:var(--line);margin:3px 0}.md-thinking[data-v-a4ef2d7c]{display:flex;align-items:center;gap:8px;padding:6px 9px;border-radius:var(--radius-sm)}.md-thinking .md-name[data-v-a4ef2d7c]{font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);flex:none}.md-thinking .md-note[data-v-a4ef2d7c],.md-thinking .ui-seg[data-v-a4ef2d7c]{margin-left:auto}.md-cache-note[data-v-a4ef2d7c]{width:0;min-width:100%;padding:2px 7px 4px;color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.4}.perm-dropdown[data-v-a4ef2d7c]{position:absolute;bottom:calc(100% + 4px);left:var(--composer-control-inset);z-index:var(--z-dropdown);min-width:220px;width:max-content;max-width:calc(100vw - var(--space-8));background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:5px;display:flex;flex-direction:column;gap:1px;transform-origin:bottom left}.pd-row[data-v-a4ef2d7c]{display:grid;grid-template-columns:var(--p-ic-md) var(--composer-menu-desc-width, max-content) var(--p-ic-sm);column-gap:7px;row-gap:2px;align-items:start;width:100%;background:none;border:none;cursor:pointer;padding:6px 7px;border-radius:6px;text-align:left}.pd-row[data-v-a4ef2d7c]:hover,.pd-row.is-current[data-v-a4ef2d7c]{background:var(--color-hover)}.pd-icon[data-v-a4ef2d7c]{grid-column:1;grid-row:1;width:var(--p-ic-md);min-height:1lh;display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-check[data-v-a4ef2d7c]{grid-column:3;grid-row:1;width:var(--p-ic-sm);min-height:1lh;color:var(--color-accent);font-size:var(--ui-font-size);font-weight:var(--weight-medium);display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-info[data-v-a4ef2d7c]{display:contents}.pd-name[data-v-a4ef2d7c]{grid-column:2;grid-row:1;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight)}.pd-desc[data-v-a4ef2d7c]{grid-column:2;grid-row:2;width:var(--composer-menu-desc-width, auto);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-caption);color:var(--muted);line-height:var(--leading-tight)}.wm-pill[data-v-a4ef2d7c]{position:absolute;top:0;left:0;margin-left:calc(-1 * var(--space-05));z-index:var(--z-raised);display:inline-flex;align-items:center;gap:var(--space-1);height:calc(var(--content-font-size) * 1.5);padding:0 calc((var(--content-font-size) * 1.5 - var(--wm-x-size)) / 2) 0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-surface);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:calc(var(--content-font-size) * 1.5);white-space:nowrap;user-select:none}.wm-x[data-v-a4ef2d7c]{position:relative;width:var(--wm-x-size);height:var(--wm-x-size);border-radius:var(--radius-full)}.wm-x[data-v-a4ef2d7c]:before{content:"";position:absolute;inset:calc(-1 * var(--wm-x-ring))}@media(hover:none){.wm-x[data-v-a4ef2d7c]:before{inset:calc((var(--wm-x-size) - var(--touch-target-min)) / 2)}}@media(max-width:980px){.perm-pill[data-v-a4ef2d7c]{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media(max-width:640px){.composer[data-v-a4ef2d7c]{padding:9px var(--dock-inline-right, max(12px, var(--safe-right))) max(24px,var(--safe-bottom)) var(--dock-inline-left, max(12px, var(--safe-left)))}.composer-card[data-v-a4ef2d7c]{--composer-control-size: 36px;max-width:100%}.input-row[data-v-a4ef2d7c]{gap:6px;min-width:0}.send[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.send svg[data-v-a4ef2d7c]{display:none}.send[data-v-a4ef2d7c]:after{content:"↑";font-size:17px;line-height:1;color:var(--bg)}.stop[data-v-a4ef2d7c]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.stop svg[data-v-a4ef2d7c]{display:none}.stop[data-v-a4ef2d7c]:after{content:"■";font-size:17px;line-height:1}.perm-pill[data-v-a4ef2d7c],.wm-pill[data-v-a4ef2d7c]{display:none}.model-dropdown[data-v-a4ef2d7c]{right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));left:auto;min-width:180px;max-width:calc(100vw - 24px)}.ph[data-v-a4ef2d7c]{font-size:16px}.model-pill[data-v-a4ef2d7c],.attach-btn[data-v-a4ef2d7c]{font-size:var(--ui-font-size)}.toolbar[data-v-a4ef2d7c]{gap:6px;min-width:0}.toolbar-left[data-v-a4ef2d7c],.toolbar-right[data-v-a4ef2d7c]{min-width:0}.model-pill[data-v-a4ef2d7c]{max-width:min(52vw,220px)}.model-pill .mp-name[data-v-a4ef2d7c]{max-width:min(40vw,170px)}.md-row[data-v-a4ef2d7c],.md-section[data-v-a4ef2d7c]{font-size:var(--ui-font-size)}.md-thinking[data-v-a4ef2d7c]{flex-wrap:wrap;row-gap:6px}.md-thinking .ui-seg[data-v-a4ef2d7c]{margin-left:0}.pd-name[data-v-a4ef2d7c]{font-size:var(--ui-font-size)}.pd-desc[data-v-a4ef2d7c]{font-size:var(--text-xs)}}.goal-panel[data-v-cdb3e8b0]{display:flex;flex-direction:column;gap:var(--space-2);overflow-wrap:anywhere}.goal-criterion[data-v-cdb3e8b0]{padding-top:var(--space-2);border-top:.5px solid var(--color-line)}.goal-criterion-label[data-v-cdb3e8b0]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-section-label);line-height:var(--leading-normal);margin-bottom:var(--space-1)}.plan-panel[data-v-dea23306]{display:flex;flex-direction:column;gap:var(--space-2)}.plan-review-row[data-v-dea23306]{display:flex;gap:var(--space-2);font-size:var(--text-sm)}.plan-review-label[data-v-dea23306]{flex:none;color:var(--color-text-muted)}.plan-review-feedback[data-v-dea23306]{color:var(--color-text-muted)}.plan-path-only[data-v-dea23306]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-1)}.plan-path-hint[data-v-dea23306]{color:var(--color-text-muted);font-size:var(--text-sm)}.plan-path[data-v-dea23306]{max-width:100%;font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plan-empty[data-v-dea23306]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.plan-empty-ico[data-v-dea23306]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}.qcard[data-v-ca95f2cd]{margin:var(--space-2) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);overflow:hidden;animation:kimi-card-in var(--duration-base) var(--ease-out)}.qcard.minimized[data-v-ca95f2cd]{transition:background var(--duration-fast) var(--ease-out)}.qcard.minimized[data-v-ca95f2cd]:hover{background:var(--color-hover)}.qh[data-v-ca95f2cd]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-3) var(--space-4) 0}.qcard.minimized .qh[data-v-ca95f2cd]{padding-bottom:var(--space-3);align-items:center}.qcard.minimized .qh.clickable[data-v-ca95f2cd]{cursor:pointer}.qh-chip[data-v-ca95f2cd]{width:var(--p-chip-num);height:var(--p-chip-num);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.qtitle[data-v-ca95f2cd]{flex:1;min-width:0;color:var(--color-text);font-size:var(--text-lg);font-weight:var(--weight-semibold);line-height:var(--leading-tight);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.qcard.minimized .qtitle[data-v-ca95f2cd]{display:block;white-space:nowrap;text-overflow:ellipsis}.qmin[data-v-ca95f2cd],.qclose[data-v-ca95f2cd]{flex:none;margin-top:calc((var(--text-lg) * var(--leading-tight) - var(--icon-button-sm)) / 2)}.qmin[data-v-ca95f2cd]{margin-left:auto}.qcard.minimized .qmin[data-v-ca95f2cd],.qcard.minimized .qclose[data-v-ca95f2cd]{margin-top:0}.qbody[data-v-ca95f2cd]{padding:var(--space-3) var(--space-4) 0;color:var(--color-text);font:var(--text-base)/var(--leading-normal) var(--font-ui)}.qmdbody[data-v-ca95f2cd]{margin-bottom:var(--space-2)}.qopts[data-v-ca95f2cd]{display:flex;flex-direction:column;gap:2px;margin-top:var(--space-2)}.qopt[data-v-ca95f2cd]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);cursor:pointer;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text);transition:background var(--duration-fast) var(--ease-out);user-select:none}.qopt[data-v-ca95f2cd]:hover,.qopt.highlighted[data-v-ca95f2cd]{background:var(--color-hover)}.qopt-key[data-v-ca95f2cd]{width:var(--p-chip-num);height:var(--p-chip-num);margin-top:calc((var(--text-base) * var(--leading-normal) - var(--p-chip-num)) / 2);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.qopt-key[data-v-ca95f2cd]:empty{background:transparent}.qopt-glyph[data-v-ca95f2cd]{width:16px;height:16px;margin-top:calc((var(--text-base) * var(--leading-normal) - 16px) / 2);flex:none;border:.5px solid var(--color-line-strong);position:relative;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.qopt-glyph.rad[data-v-ca95f2cd]{border-radius:50%}.qopt-glyph.chk[data-v-ca95f2cd]{border-radius:var(--radius-xs)}.qopt.selected .qopt-glyph[data-v-ca95f2cd]{border-color:var(--color-accent)}.qopt.selected .qopt-glyph.rad[data-v-ca95f2cd]:after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--color-accent)}.qopt.selected .qopt-glyph.chk[data-v-ca95f2cd]{background:var(--color-accent)}.qopt.selected .qopt-glyph.chk[data-v-ca95f2cd]:after{content:"";position:absolute;left:4.5px;top:1.5px;width:4px;height:8px;border-right:1.5px solid var(--color-text-on-accent);border-bottom:1.5px solid var(--color-text-on-accent);transform:rotate(45deg)}.qopt-text[data-v-ca95f2cd]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.qopt-label[data-v-ca95f2cd]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.qopt-desc[data-v-ca95f2cd]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui)}.other-input[data-v-ca95f2cd]{flex:1;font:var(--text-base) var(--font-ui);border:none;border-bottom:.5px solid var(--color-line);outline:none;padding:2px var(--space-1);color:var(--color-text);background:transparent;min-width:0}.other-input[data-v-ca95f2cd]:focus-visible{border-bottom-color:var(--color-accent);box-shadow:0 1px 0 0 var(--color-accent)}.qfoot[data-v-ca95f2cd]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-3);padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.qbtns[data-v-ca95f2cd]{display:flex;align-items:center;gap:var(--space-1)}.qhint[data-v-ca95f2cd]{margin-left:auto;color:var(--color-text-faint);font:var(--text-xs) var(--font-ui);user-select:none}@media(max-width:640px){.qopt[data-v-ca95f2cd]{min-height:44px;padding:var(--space-3)}.other-input[data-v-ca95f2cd]{flex-basis:100%;min-height:28px}.qfoot[data-v-ca95f2cd]{flex-direction:column;align-items:stretch}.qhint[data-v-ca95f2cd]{display:none}.qbtns[data-v-ca95f2cd]{flex-direction:column;gap:var(--space-2)}.qbtns[data-v-ca95f2cd] .ui-button{width:100%;min-height:46px}}.appr[data-v-cd852243]{display:flex;flex-direction:column;max-height:calc(100dvh - 72px);margin:var(--space-2) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);overflow:hidden;animation:kimi-card-in var(--duration-base) var(--ease-out)}.appr>.ah[data-v-cd852243],.appr>.af[data-v-cd852243]{flex:none}.appr.minimized[data-v-cd852243]{transition:background var(--duration-fast) var(--ease-out)}.appr.minimized[data-v-cd852243]:hover{background:var(--color-hover)}.ah[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-3) var(--space-4) 0;flex-wrap:nowrap}.appr.minimized .ah[data-v-cd852243]{padding-bottom:var(--space-3)}.appr.minimized .ah.clickable[data-v-cd852243]{cursor:pointer}.akind[data-v-cd852243]{color:var(--color-text);font-size:var(--text-lg);font-weight:var(--weight-semibold);white-space:nowrap;flex:none}.apeek[data-v-cd852243]{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.amin[data-v-cd852243],.aexpand[data-v-cd852243]{margin-left:auto;flex:none}.aexpand+.amin[data-v-cd852243]{margin-left:0}.ab[data-v-cd852243]{display:flex;flex-direction:column;flex:1;min-height:0;padding:var(--space-3) var(--space-4) 0}.ab[data-v-cd852243]>*{flex:none}.ab>.body-plan-wrap[data-v-cd852243]{flex:1}.plan-path[data-v-cd852243]{display:block;width:100%;margin-bottom:var(--space-2);padding:0;border:none;background:transparent;color:var(--color-accent);font:var(--text-xs) var(--font-mono);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.plan-path[data-v-cd852243]:hover{text-decoration:underline}.plan-path[data-v-cd852243]:focus-visible{outline:none;text-decoration:underline;border-radius:var(--radius-xs);box-shadow:var(--p-focus-ring)}.body-code[data-v-cd852243]{display:flex;flex-direction:column;min-height:0}.body-code.expanded[data-v-cd852243]{flex:1}.body-code.expanded[data-v-cd852243] .hl-code{max-height:none;flex:1}.code-path[data-v-cd852243]{flex:none;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shell-cmd[data-v-cd852243]{font:var(--text-sm) var(--font-mono);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-all;max-height:160px;overflow-y:auto;color:var(--color-text)}.shell-dollar[data-v-cd852243]{color:var(--color-accent-hover);font-weight:var(--weight-medium);margin-right:var(--space-2)}.shell-cwd[data-v-cd852243]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-top:var(--space-1)}.shell-danger[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui);background:var(--color-danger-soft)}.shell-danger-ic[data-v-cd852243]{flex:none}.body-chip[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.chip-label[data-v-cd852243]{background:var(--color-inline-code-bg);border-radius:var(--radius-sm);padding:2px var(--space-2);font:var(--weight-semibold) var(--text-xs) var(--font-mono);color:var(--color-text-muted);white-space:nowrap}.chip-value[data-v-cd852243]{font:var(--text-sm) var(--font-mono);color:var(--color-text);word-break:break-all}.chip-detail[data-v-cd852243]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted)}.todo-item[data-v-cd852243]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-1) 0;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.todo-glyph[data-v-cd852243]{color:var(--color-accent);font-size:var(--text-sm);flex:none;width:14px}.todo-title[data-v-cd852243]{color:var(--color-text)}.todo-done[data-v-cd852243]{color:var(--color-text-muted);text-decoration:line-through}.body-generic[data-v-cd852243]{font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text);word-break:break-word}.body-plan-wrap[data-v-cd852243]{display:flex;flex-direction:column;min-height:0;position:relative}.body-plan-wrap[data-v-cd852243]:before{content:"";position:absolute;top:0;left:0;right:0;height:18px;z-index:1;pointer-events:none;opacity:0;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 2.5%,transparent),transparent 35%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.75%,transparent),transparent 65%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.25%,transparent),transparent);transition:opacity var(--duration-slow) var(--ease-out)}.body-plan-wrap.scrolled[data-v-cd852243]:before{opacity:1}.body-plan-wrap>.plan-opts[data-v-cd852243]{flex:none}.body-plan[data-v-cd852243]{max-height:50vh;overflow-y:auto;min-height:0}.body-plan.expanded[data-v-cd852243]{max-height:none;flex:1}.plan-opts[data-v-cd852243]{display:flex;flex-direction:column;gap:2px;margin-top:var(--space-3);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.popt[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-3);width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text);font:var(--text-sm)/var(--leading-normal) var(--font-ui);text-align:left;cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.popt[data-v-cd852243]:hover:not(:disabled){background:var(--color-hover)}.popt[data-v-cd852243]:focus-visible{outline:none;background:var(--color-hover);box-shadow:var(--p-focus-ring)}.popt[data-v-cd852243]:disabled{cursor:default;opacity:.6}.popt-key[data-v-cd852243]{width:var(--p-chip-num);height:var(--p-chip-num);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.popt-text[data-v-cd852243]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.popt-label[data-v-cd852243]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.popt-desc[data-v-cd852243]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui)}.popt-spin[data-v-cd852243]{flex:none;color:var(--color-text-muted)}.feedback-wrap[data-v-cd852243]{margin-top:var(--space-3)}.feedback-ta[data-v-cd852243]{width:100%;box-sizing:border-box;font:var(--text-sm) var(--font-ui);padding:var(--space-2) var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-md);resize:none;outline:none;color:var(--color-text);background:var(--color-surface)}.feedback-ta[data-v-cd852243]:focus-visible{border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.feedback-hint[data-v-cd852243]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted);margin-top:var(--space-1)}.af[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-3);padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.abtns[data-v-cd852243]{display:flex;align-items:center;gap:var(--space-1)}.knum[data-v-cd852243]{min-width:16px;height:16px;padding:0 3px;border-radius:var(--radius-xs);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/16px var(--font-ui);text-align:center}.abtns .ui-button--primary .knum[data-v-cd852243]{background:color-mix(in srgb,var(--color-text-on-accent) 28%,transparent);color:var(--color-text-on-accent)}@media(max-width:640px){.popt[data-v-cd852243]{min-height:44px;padding:var(--space-3)}.af[data-v-cd852243]{flex-direction:column;align-items:stretch}.abtns[data-v-cd852243]{flex-direction:column;margin-left:0;gap:var(--space-2)}.abtns[data-v-cd852243] .ui-button{width:100%;min-height:46px}.abtns .amain[data-v-cd852243]{order:-1}}.taskspane[data-v-d5a5712a]{flex:1;min-height:0;display:flex;flex-direction:column}.tp-list[data-v-d5a5712a]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-05)}.tp-row[data-v-d5a5712a]{padding:var(--space-1) 0}.tp-row.fail .tp-name[data-v-d5a5712a]{color:var(--color-danger)}.tp-main[data-v-d5a5712a]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-base)}.tp-row.expandable>.tp-main[data-v-d5a5712a]{position:relative;border-radius:var(--radius-lg);padding:var(--space-1) var(--space-2);margin:calc(-1 * var(--space-1)) 0}.tp-row.expandable>.tp-main[data-v-d5a5712a]:hover{background:var(--color-hover)}.tp-row[data-v-d5a5712a]:not(.expandable){cursor:not-allowed}.tp-open[data-v-d5a5712a]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.tp-open[data-v-d5a5712a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tp-chevron[data-v-d5a5712a]{flex:none;color:var(--muted)}.tp-name[data-v-d5a5712a]{color:var(--color-text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-meta[data-v-d5a5712a]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted)}.tp-glyph[data-v-d5a5712a]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center}.tp-done[data-v-d5a5712a]{color:var(--color-success);transform:scale(.91)}.tp-cancelled[data-v-d5a5712a]{color:var(--color-text-muted)}.tp-fail[data-v-d5a5712a]{color:var(--color-danger)}.tp-time[data-v-d5a5712a]{flex:none;font-size:var(--text-base);color:var(--muted);font-variant-numeric:tabular-nums;text-autospace:normal}.tp-model[data-v-d5a5712a]{flex:0 1 auto;min-width:0;font-size:var(--text-base);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-stop[data-v-d5a5712a]{position:relative;flex:none;color:var(--color-danger)}.tp-stop[data-v-d5a5712a]:hover{color:var(--color-danger)}@media(hover:none){.tp-stop[data-v-d5a5712a]{width:var(--touch-target-min);height:var(--touch-target-min)}.tp-row.expandable>.tp-main[data-v-d5a5712a]{min-height:var(--touch-target-min)}}.tp-empty[data-v-d5a5712a]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--faint);font-size:var(--ui-font-size-sm);user-select:none}@media(max-width:640px){.tp-main[data-v-d5a5712a]{flex-wrap:wrap;row-gap:var(--space-1)}.tp-name[data-v-d5a5712a]{font-size:var(--ui-font-size-sm)}}.sg-empty[data-v-f7e4b600]{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-text-faint);font-size:var(--text-sm);user-select:none}.sg-grid[data-v-f7e4b600]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.sg-card[data-v-f7e4b600]{position:relative;display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.sg-card.openable[data-v-f7e4b600]{cursor:pointer}.sg-card.openable[data-v-f7e4b600]:hover{background:var(--color-selected-hover)}.sg-card[data-v-f7e4b600]:not(.openable){cursor:not-allowed}.sg-open[data-v-f7e4b600]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.sg-open[data-v-f7e4b600]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sg-top[data-v-f7e4b600]{display:flex;align-items:center;gap:var(--space-2)}.sg-name[data-v-f7e4b600]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.sg-num[data-v-f7e4b600]{flex:none;color:var(--color-text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums}.sg-card:has(.sg-cancel) .sg-top[data-v-f7e4b600]{padding-right:calc(var(--icon-button-sm) + var(--space-1))}@media(hover:none){.sg-card:has(.sg-cancel) .sg-top[data-v-f7e4b600]{padding-right:calc(var(--touch-target-min) + var(--space-1))}}.sg-desc[data-v-f7e4b600]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.sg-foot[data-v-f7e4b600]{display:flex;flex-direction:column;gap:var(--space-1)}.sg-model[data-v-f7e4b600]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs)}.sg-model span[data-v-f7e4b600]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sg-status[data-v-f7e4b600]{display:flex;align-items:center}.sg-state[data-v-f7e4b600]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);text-autospace:normal}.sg-ic-done[data-v-f7e4b600]{color:var(--color-success);transform:scale(.91)}.s-fail .sg-state[data-v-f7e4b600]{color:var(--color-danger)}.sg-time[data-v-f7e4b600]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-variant-numeric:tabular-nums;text-autospace:normal}.sg-cancel[data-v-f7e4b600]{position:absolute;top:var(--space-2);right:var(--space-2);color:var(--color-text-muted);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sg-card:hover .sg-cancel[data-v-f7e4b600],.sg-cancel[data-v-f7e4b600]:focus-visible{opacity:1}.sg-cancel[data-v-f7e4b600]:hover{color:var(--color-danger)}@media(hover:none){.sg-cancel[data-v-f7e4b600]{top:0;right:0;width:var(--touch-target-min);height:var(--touch-target-min);opacity:1}}.todo-card[data-v-f090f678]{display:flex;flex-direction:column;gap:var(--space-3);font-size:var(--text-base)}.tc-row[data-v-f090f678]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text)}.tc-name[data-v-f090f678]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:var(--leading-caption)}.tc-row.s-in_progress .tc-name[data-v-f090f678]{font-weight:var(--weight-medium)}.tc-row.s-pending .tc-name[data-v-f090f678]{color:var(--color-text-muted)}.tc-glyph[data-v-f090f678]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-full)}.tc-glyph.g-done[data-v-f090f678]{color:var(--color-success)}.tc-glyph.g-pending[data-v-f090f678]{border:var(--p-ring-stroke) solid var(--color-line-strong)}.tc-glyph .tc-spin[data-v-f090f678]{color:var(--color-text)}.tc-empty[data-v-f090f678]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.tc-empty-ico[data-v-f090f678]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}@media(max-width:640px){.todo-card[data-v-f090f678]{font-size:var(--text-lg)}.tc-row[data-v-f090f678]{padding:var(--space-2) var(--space-3)}}.wp-head-tab[data-v-82048a74]{display:inline-flex;align-items:center;gap:var(--space-2);padding:0;border:.5px solid transparent;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap;flex:none}.wp-head-tab[data-v-82048a74] svg{width:1.5em;height:1.5em}.wp-head-meta[data-v-82048a74]{color:var(--color-text-muted);text-autospace:normal}.wp-head-actions[data-v-82048a74]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}@media(max-width:480px){.wp-head-actions[data-v-82048a74]{flex-basis:100%;margin-left:0}}@media(hover:none){.wp-head-actions[data-v-82048a74] .ui-seg__item{min-height:var(--touch-target-min)}}@media(max-width:640px),(hover:none){.wp-head-actions[data-v-82048a74] .ui-seg__item{height:var(--touch-target-min)}.wp-head-actions[data-v-82048a74] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}.wp-head-actions[data-v-82048a74] .fc-trigger{min-height:var(--touch-target-min)}}.filter-control[data-v-153e0d9c]{display:inline-flex;min-width:0}.fc-chevron[data-v-153e0d9c]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.fc-trigger[aria-expanded=true] .fc-chevron[data-v-153e0d9c]{transform:rotate(180deg)}.fc-menu[data-v-153e0d9c]{position:fixed;z-index:var(--z-dropdown)}.fc-menu[data-v-153e0d9c] .ui-menu{min-width:0}.fc-label[data-v-153e0d9c]{flex:1;white-space:nowrap}.filter-control[data-v-153e0d9c] .ui-seg__item[data-icon=circle-check] .ui-seg__icon,.fc-menu .kw-icon[data-icon=circle-check][data-v-153e0d9c]{transform:scale(.91)}.fc-check[data-v-153e0d9c]{color:var(--color-accent)}.chat-dock[data-v-e91fb967]{--dock-inline-left: 16px;--dock-inline-right: 16px;box-sizing:border-box;width:100%;max-width:calc(var(--read-max) + var(--panes-scrollbar-width, 0px));padding-right:var(--panes-scrollbar-width, 0px);flex:none;position:absolute;inset:auto 0 0;background:transparent;z-index:var(--z-sticky)}.chat-dock.has-popup[data-v-e91fb967]{z-index:var(--z-dropdown)}.chat-dock.align-center[data-v-e91fb967]{margin-left:auto;margin-right:auto}.chat-dock.align-left[data-v-e91fb967]{margin-left:0;margin-right:auto}.chat-dock.align-mobile[data-v-e91fb967]{max-width:none}.chat-dock[data-v-e91fb967]:before{--fade: 48px;--veil: 72px;content:"";position:absolute;top:calc(-1 * var(--fade));right:0;bottom:0;left:0;z-index:0;pointer-events:none;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-bg) 0%,transparent),color-mix(in srgb,var(--color-bg) 30%,transparent) 21px,color-mix(in srgb,var(--color-bg) 70%,transparent) 45px,var(--color-bg) var(--veil))}.chat-dock[data-v-e91fb967]>*{position:relative;z-index:1}.dock-work-panel[data-v-e91fb967]{position:absolute;left:16px;right:calc(16px + var(--panes-scrollbar-width, 0px));bottom:100%;background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);margin-bottom:var(--space-2);max-height:min(360px,50vh);display:flex;flex-direction:column;overflow:hidden;user-select:none}.dock-work-panel.panel-todos .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-head[data-v-e91fb967]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-body[data-v-e91fb967]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-todos .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-plan .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-head[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-head[data-v-e91fb967]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-plan .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-tab[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-tab[data-v-e91fb967]{padding:0;line-height:var(--leading-solid)}.dock-work-panel.panel-goal .gh-time[data-v-e91fb967]{color:var(--color-text-muted)}.dock-work-panel.panel-todos .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-goal .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-plan .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-subagent .dock-work-body[data-v-e91fb967],.dock-work-panel.panel-bash .dock-work-body[data-v-e91fb967]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-subagent[data-v-e91fb967],.dock-work-panel.panel-bash[data-v-e91fb967]{height:min(var(--p-dock-panel-h),50vh)}.dock-work-tab.tab-progress[data-v-e91fb967]{display:inline-flex;align-items:center;gap:var(--space-2)}.dock-work-head[data-v-e91fb967]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:.5px solid var(--color-line);position:relative;z-index:1}.dock-work-body[data-v-e91fb967]{padding:var(--space-2) var(--space-3);overflow-y:auto;min-height:0;display:flex;flex-direction:column}@media(max-width:480px){.dock-work-head[data-v-e91fb967]{flex-wrap:wrap}}.dock-work-panel.body-scrolled-up .dock-work-body[data-v-e91fb967]{mask-image:linear-gradient(to bottom,transparent,black var(--menu-scroll-fade))}.dock-work-body[data-v-e91fb967] .taskspane{border:none;background:transparent;padding:0}.dock-work-body[data-v-e91fb967] .taskspane .tp-head{display:none}.dock-workbar[data-v-e91fb967]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5);padding:var(--space-1) calc(var(--dock-inline-right) + var(--space-4) + var(--p-hairline)) var(--space-05) calc(var(--dock-inline-left) + var(--space-4) + var(--p-hairline))}.dock-workbar[data-v-e91fb967] .ui-pill{position:relative;gap:var(--space-1-5);height:auto;padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border:none;border-radius:var(--radius-lg);background:var(--color-selected);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);color:var(--color-text);font-size:var(--text-base);line-height:var(--leading-normal)}.dock-workbar[data-v-e91fb967] .ui-pill svg{width:1.5em;height:1.5em;color:inherit}.dock-workbar[data-v-e91fb967] .ui-pill:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.dock-workbar[data-v-e91fb967] .ui-pill:hover:not(:disabled):after,.dock-workbar[data-v-e91fb967] .ui-pill.is-active:after{opacity:1}.chat-dock.pills-compact .dock-workbar[data-v-e91fb967] .ui-pill{padding:var(--space-2)}.chat-dock.pills-compact .dock-workbar[data-v-e91fb967] .ui-pill>span{display:none}.dock-workbar .dw-count[data-v-e91fb967]{color:var(--color-text-muted)}.dock-workbar .dw-running[data-v-e91fb967]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted)}.dock-workbar .dw-goal-status[data-v-e91fb967]{font-weight:var(--weight-medium)}.dock-workbar .dw-goal-status--active[data-v-e91fb967]{color:var(--color-success)}.dock-workbar .dw-goal-status--paused[data-v-e91fb967]{color:var(--color-warning)}.dock-workbar .dw-goal-status--blocked[data-v-e91fb967]{color:var(--color-danger)}.dock-approval[data-v-e91fb967]{margin-top:8px}.chat-dock.has-approval[data-v-e91fb967]{display:flex;flex-direction:column;max-height:calc(100dvh - 72px)}.chat-dock.has-approval>.dock-workbar[data-v-e91fb967]{flex:none}.chat-dock.has-approval>.dock-approval[data-v-e91fb967]{min-height:0}@media(max-width:640px){.chat-dock[data-v-e91fb967]{--dock-inline-left: max(12px, var(--safe-left));--dock-inline-right: max(12px, var(--safe-right))}.dock-work-panel[data-v-e91fb967]{left:10px;right:calc(10px + var(--panes-scrollbar-width, 0px))}.dock-work-head-actions[data-v-e91fb967] .ui-seg__item{height:var(--touch-target-min)}.dock-work-head-actions[data-v-e91fb967] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}}.chat-dock[data-v-e91fb967]:not(.align-mobile) .composer{padding-bottom:14px}.dock-panel-enter-active[data-v-e91fb967]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.dock-panel-leave-active[data-v-e91fb967]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.dock-panel-enter-from[data-v-e91fb967],.dock-panel-leave-to[data-v-e91fb967]{opacity:0;transform:translateY(var(--motion-panel-shift)) scale(var(--motion-panel-scale))}.conversation-toc[data-v-b8ba267a]{position:absolute;z-index:var(--z-sticky);top:50%;transform:translateY(-50%);--toc-content-max: min( var(--p-content-max), calc(100cqi - var(--space-5) - var(--space-5)) );left:calc(50% + (var(--toc-content-max) / 2) + 14px);max-height:calc(100% - 160px);display:flex;flex-direction:column;justify-content:center;opacity:.5;transition:opacity var(--duration-base) var(--ease-out)}.conversation-toc[data-v-b8ba267a]:before{content:"";position:absolute;inset:0 -48px 0 -14px;z-index:0}.conversation-toc[data-v-b8ba267a]:hover,.conversation-toc[data-v-b8ba267a]:focus-within{opacity:1}.conversation-toc[data-v-b8ba267a]:hover:not(:focus-within){transition-delay:var(--duration-hover-intent)}.toc-scroll[data-v-b8ba267a]{position:relative;z-index:1;display:flex;flex-direction:column;gap:7px;padding:8px 0;min-height:0;overflow-y:auto;scrollbar-width:none}.toc-scroll[data-v-b8ba267a]::-webkit-scrollbar{display:none}.toc-row[data-v-b8ba267a]{display:flex;align-items:center;gap:10px;height:18px;padding:0;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;white-space:nowrap}.toc-row[data-v-b8ba267a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.toc-bar[data-v-b8ba267a]{flex:none;width:3px;height:14px;border-radius:var(--radius-full);background:var(--color-accent);opacity:.3;transition:opacity var(--duration-fast) var(--ease-out),height var(--duration-fast) var(--ease-out)}.toc-label[data-v-b8ba267a]{display:block;max-width:0;overflow:hidden;opacity:0;text-overflow:ellipsis;transition:max-width .22s var(--ease-out),opacity var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.conversation-toc:hover .toc-bar[data-v-b8ba267a],.conversation-toc:focus-within .toc-bar[data-v-b8ba267a]{height:18px;opacity:.5}.conversation-toc:hover .toc-label[data-v-b8ba267a],.conversation-toc:focus-within .toc-label[data-v-b8ba267a]{max-width:220px;opacity:1}.conversation-toc:hover:not(:focus-within) .toc-bar[data-v-b8ba267a]{transition-delay:0ms,var(--duration-hover-intent)}.conversation-toc:hover:not(:focus-within) .toc-label[data-v-b8ba267a]{transition-delay:var(--duration-hover-intent),var(--duration-hover-intent),0ms}.toc-row.active .toc-bar[data-v-b8ba267a]{opacity:1;height:18px}.toc-row.active .toc-label[data-v-b8ba267a]{color:var(--color-accent);font-weight:var(--weight-medium)}.toc-row:hover .toc-bar[data-v-b8ba267a]{opacity:1}.toc-row:hover .toc-label[data-v-b8ba267a]{color:var(--color-text)}.conversation-toc.toc-clipped[data-v-b8ba267a]{visibility:hidden;pointer-events:none}.tsearch[data-v-26f3fed5]{position:absolute;top:calc(var(--panel-head-h, 48px) + var(--space-3));right:var(--space-3);z-index:var(--z-sticky);width:min(var(--p-findbar-w),calc(100% - var(--space-3) * 2));background:var(--color-surface-raised);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);animation:kimi-card-in var(--duration-slow) var(--ease-out)}.tsearch.mobile[data-v-26f3fed5]{top:var(--space-3)}.tsearch[data-v-26f3fed5]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-2xl);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.tsearch[data-v-26f3fed5]:focus-within:after{opacity:1}.tsearch-main[data-v-26f3fed5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-2);min-height:calc(var(--space-8) + 2 * var(--space-1))}.tsearch-icon[data-v-26f3fed5]{flex:none;margin-left:var(--space-1);color:var(--color-text-muted)}.tsearch-input[data-v-26f3fed5]{flex:1;min-width:0;height:var(--space-8);padding:0;border:none;background:transparent;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text)}.tsearch-input[data-v-26f3fed5]:focus-visible{outline:none}.tsearch-input[data-v-26f3fed5]::placeholder{color:var(--color-text-muted)}.tsearch-spin[data-v-26f3fed5]{display:inline-flex;flex:none}.tsearch-sep[data-v-26f3fed5]{flex:none;width:var(--p-hairline);height:var(--space-4);background:var(--color-line)}.tsearch .tsearch-close[data-v-26f3fed5]{border-radius:var(--radius-full)}.tsearch-foot-wrap[data-v-26f3fed5]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.tsearch-foot-wrap.open[data-v-26f3fed5]{grid-template-rows:1fr}.tsearch-foot[data-v-26f3fed5]{overflow:hidden;min-height:0;display:flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2)}.tsearch-foot-wrap.open .tsearch-foot[data-v-26f3fed5]{padding:var(--space-1) var(--space-2);border-top:var(--p-hairline) solid var(--color-line)}.tsearch-count[data-v-26f3fed5]{margin-left:auto;padding-right:var(--space-1);font-size:var(--ui-font-size-sm);color:var(--color-text-muted);white-space:nowrap;user-select:none}.tsearch-rings[data-v-26f3fed5]{position:absolute;inset:0;pointer-events:none}.tsearch-ring[data-v-26f3fed5]{position:absolute;box-sizing:content-box;border:var(--p-findring-w) solid var(--color-warning);margin:calc(-1 * var(--p-findring-w));border-radius:var(--radius-xs);pointer-events:none}.doodle-host[data-v-694a2ad0]{position:relative;width:100%;aspect-ratio:338 / 152;display:flex;align-items:center;justify-content:center}.doodle-canvas[data-v-694a2ad0]{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .25s ease}.doodle-canvas.ready[data-v-694a2ad0]{opacity:1}@media(prefers-reduced-motion:reduce){.doodle-canvas[data-v-694a2ad0]{transition:none}}.con[data-v-8c7ebe8d]{--read-max: 760px;display:flex;flex-direction:column;min-width:0;height:100%;position:relative;container-type:inline-size}.empty-drag[data-v-8c7ebe8d]{position:absolute;top:0;left:0;right:0;height:var(--panel-head-h, 48px)}.empty-drag.macos-desktop[data-v-8c7ebe8d]{-webkit-app-region:drag}.panes[data-v-8c7ebe8d]{flex:1;min-height:0;overflow-y:auto;overflow-anchor:auto;scrollbar-gutter:stable}.panes[data-v-8c7ebe8d]::-webkit-scrollbar{width:4px}.panes[data-v-8c7ebe8d]::-webkit-scrollbar-thumb{background:transparent;transition:background var(--duration-base) var(--ease-out)}.panes.scrolling[data-v-8c7ebe8d]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.panes.scrolling[data-v-8c7ebe8d]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.panes.session-settling .chat[data-v-8c7ebe8d]>*:not(.chat-loading){visibility:hidden}.panes.is-following[data-v-8c7ebe8d],.panes.history-prepending[data-v-8c7ebe8d],.panes.is-pinned[data-v-8c7ebe8d]{overflow-anchor:none}.chat-layout[data-v-8c7ebe8d]{display:flex;flex-direction:column;height:100%;min-height:0;position:relative}.chat-scroll[data-v-8c7ebe8d]{flex:1;min-height:0;position:relative}.content-wrap[data-v-8c7ebe8d]{width:100%;max-width:var(--read-max);min-height:100%;box-sizing:border-box;padding-bottom:var(--chat-dock-height, 0px);display:flex;flex-direction:column;flex-shrink:0}.content-wrap.align-center[data-v-8c7ebe8d]{margin-left:auto;margin-right:auto}.content-wrap.align-left[data-v-8c7ebe8d]{margin-left:0;margin-right:auto}.content-wrap.align-mobile[data-v-8c7ebe8d]{max-width:none}@media(max-width:640px){.con.mobile[data-v-8c7ebe8d]{min-width:0;overflow:hidden}.con.mobile .panes[data-v-8c7ebe8d]{scrollbar-gutter:auto;-webkit-overflow-scrolling:touch}.content-wrap.align-mobile[data-v-8c7ebe8d]{width:100%;min-width:0}}.empty-spacer[data-v-8c7ebe8d]{flex:1}.empty-hint[data-v-8c7ebe8d]{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:0 16px 16px;color:var(--color-text);font-family:var(--font-ui);user-select:none}.empty-hint-title[data-v-8c7ebe8d]{font-size:calc(var(--ui-font-size) + 16px);font-optical-sizing:auto;font-weight:600}.empty-hint-title.is-starting[data-v-8c7ebe8d]{display:inline-flex;align-items:center;gap:9px;color:var(--dim);font-weight:400}.empty-doodle[data-v-8c7ebe8d]{width:min(340px,62vw)}.empty-hint-text[data-v-8c7ebe8d]{display:inline-block;font-size:var(--text-base);color:var(--dim);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upgrade-banner[data-v-8c7ebe8d]{flex:none;display:flex;align-items:center;gap:var(--space-3);margin:0 var(--dock-inline-right, 16px) var(--space-2) var(--dock-inline-left, 16px);padding:var(--space-2) var(--space-3);border:.5px solid var(--color-accent-bd);border-radius:var(--radius-xl);background:var(--color-accent-soft)}.upgrade-banner-icon[data-v-8c7ebe8d]{flex:none;color:var(--color-accent)}.upgrade-banner-text[data-v-8c7ebe8d]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text)}.upgrade-banner-cta[data-v-8c7ebe8d]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-accent);cursor:pointer}.upgrade-banner-cta[data-v-8c7ebe8d]:hover{color:var(--color-accent-hover)}.empty-composer[data-v-8c7ebe8d] .composer-card{position:relative;z-index:var(--z-sticky)}.empty-composer[data-v-8c7ebe8d]:not(.expanded) .ph{min-height:3lh}.ws-bar[data-v-8c7ebe8d]{margin-top:calc(-1 * var(--space-4));padding:calc(var(--space-4) + var(--space-2)) var(--space-2) var(--space-2);background:color-mix(in srgb,var(--color-hover) 60%,transparent);border-radius:0 0 var(--radius-2xl) var(--radius-2xl);font-family:var(--font-ui)}.ws-anchor[data-v-8c7ebe8d]{position:relative}.ws-chip[data-v-8c7ebe8d]{display:inline-flex;align-items:center;gap:var(--space-2);max-width:100%;padding:var(--space-2) var(--space-3);background:none;border:none;border-radius:var(--radius-full);color:var(--color-text-muted);font-family:inherit;font-size:var(--ui-font-size-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ws-chip[data-v-8c7ebe8d]:hover,.ws-chip.open[data-v-8c7ebe8d]{background:var(--color-selected);color:var(--color-text)}.ws-chip[data-v-8c7ebe8d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ws-chip>.kw-icon[data-v-8c7ebe8d]{flex:none}.ws-chip-name[data-v-8c7ebe8d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-option-label)}.ws-chip-chev[data-v-8c7ebe8d]{flex:none;transition:transform var(--duration-base) var(--ease-out)}.ws-chip.open .ws-chip-chev[data-v-8c7ebe8d]{transform:rotate(180deg)}.ws-chip.ws-ghost[data-v-8c7ebe8d]{color:var(--color-text-muted)}.ws-chip.ws-ghost[data-v-8c7ebe8d]:hover{color:var(--color-text)}.ws-backdrop[data-v-8c7ebe8d]{position:fixed;inset:0;z-index:var(--z-sticky)}.ws-panel[data-v-8c7ebe8d]{position:absolute;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);left:0;top:calc(100% + var(--space-1));z-index:var(--z-dropdown);width:max-content;min-width:min(calc(var(--space-8) * 8),100%);max-width:100%;max-height:calc(var(--space-8) * 10);overflow:hidden auto;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);padding:var(--space-1);animation:ws-pop-8c7ebe8d var(--duration-base) var(--ease-out)}.ws-panel.up[data-v-8c7ebe8d]{top:auto;bottom:calc(100% + var(--space-1));animation-name:ws-pop-up-8c7ebe8d}@keyframes ws-pop-8c7ebe8d{0%{opacity:0;transform:translateY(calc(-1 * var(--space-1))) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes ws-pop-up-8c7ebe8d{0%{opacity:0;transform:translateY(var(--space-1)) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.ws-caption[data-v-8c7ebe8d]{padding:var(--space-1) var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-medium);color:var(--color-text-faint);user-select:none}.ws-row[data-v-8c7ebe8d]{display:flex;align-items:center;gap:var(--space-2);width:100%;text-align:left;background:none;border:none;border-radius:var(--radius-sm);padding:var(--space-1) var(--space-2);cursor:pointer;font-family:var(--font-ui)}.ws-row>.kw-icon[data-v-8c7ebe8d]{flex:none;color:var(--muted)}.ws-row[data-v-8c7ebe8d]:hover{background:var(--color-hover)}.ws-row.on[data-v-8c7ebe8d]{background:var(--color-selected)}.ws-row[data-v-8c7ebe8d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ws-info[data-v-8c7ebe8d]{flex:1;min-width:0;display:flex;flex-direction:column}.ws-name[data-v-8c7ebe8d]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-option-label);color:var(--color-text);line-height:var(--leading-normal)}.ws-path[data-v-8c7ebe8d]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs);font-weight:var(--weight-option-label);color:var(--muted);line-height:var(--leading-normal)}.ws-check[data-v-8c7ebe8d]{flex:none;margin-left:var(--space-3);color:var(--color-text)}.ws-divider[data-v-8c7ebe8d]{height:1px;margin:var(--space-1) var(--space-2);background:var(--line)}.ws-action[data-v-8c7ebe8d]{display:flex;align-items:center;gap:var(--space-2);width:100%;text-align:left;background:none;border:none;border-radius:var(--radius-sm);padding:var(--space-2);cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-action>.kw-icon[data-v-8c7ebe8d]{flex:none;color:var(--muted)}.ws-action span[data-v-8c7ebe8d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-action[data-v-8c7ebe8d]:hover{background:var(--color-hover);color:var(--color-text)}.ws-action:hover>.kw-icon[data-v-8c7ebe8d]{color:var(--dim)}.ws-action[data-v-8c7ebe8d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.chat-scroll[data-v-8c7ebe8d]{display:flex;flex-direction:column}.mobile .panes[data-v-8c7ebe8d]:has(>.chat-layout){overflow:hidden;scrollbar-gutter:auto}.newmsg-pill[data-v-8c7ebe8d]{position:absolute;left:50%;bottom:12px;transform:translate(-50%);display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:.5px solid var(--line);background:var(--panel);color:var(--color-text);font-size:var(--text-xs);font-weight:var(--weight-ui-strong);cursor:pointer;box-shadow:var(--shadow-sm);z-index:var(--z-sticky)}.pill-chevron[data-v-8c7ebe8d]{width:12px;height:12px}.pill-enter-active[data-v-8c7ebe8d],.pill-leave-active[data-v-8c7ebe8d]{transition:opacity .2s ease,transform .2s ease}.pill-enter-from[data-v-8c7ebe8d],.pill-leave-to[data-v-8c7ebe8d]{opacity:0;transform:translate(-50%) translateY(8px)}.undo-toast[data-v-8c7ebe8d]{position:absolute;left:50%;top:60px;transform:translate(-50%);padding:8px 14px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--bg);font-size:var(--ui-font-size-sm);z-index:var(--z-sticky);box-shadow:var(--shadow-sm)}.undo-toast-text[data-v-8c7ebe8d]{display:flex;align-items:center;gap:8px}.undo-toast-enter-active[data-v-8c7ebe8d],.undo-toast-leave-active[data-v-8c7ebe8d]{transition:opacity .15s ease,transform .15s ease}.undo-toast-enter-from[data-v-8c7ebe8d],.undo-toast-leave-to[data-v-8c7ebe8d]{opacity:0;transform:translate(-50%) translateY(-6px)}.con[data-v-8c7ebe8d]{background:var(--bg)}.newmsg-pill[data-v-8c7ebe8d]{font-family:var(--sans)}.file-preview[data-v-4c55a361]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono);min-width:0;container-type:inline-size}.fp-empty[data-v-4c55a361],.fp-loading[data-v-4c55a361]{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);font-size:var(--ui-font-size)}.fp-path[data-v-4c55a361]{flex:1 1 60px;min-width:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left;font-size:var(--ui-font-size-xs);color:var(--muted);font-weight:400}.fp-meta[data-v-4c55a361]{display:flex;align-items:center;gap:8px;flex:none}@container (max-width: 539px){.fp-meta[data-v-4c55a361]{display:none}}.fp-lines[data-v-4c55a361],.fp-size[data-v-4c55a361]{font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--muted);white-space:nowrap}.fp-search[data-v-4c55a361]{display:flex;align-items:center;gap:4px;flex:1 1 110px;min-width:70px;max-width:200px}.fp-search-input[data-v-4c55a361]{flex:1;min-width:0;height:26px;border:.5px solid var(--color-line);border-radius:var(--radius-sm);padding:2px 7px;background:var(--color-surface-raised);color:var(--color-text);font:var(--text-xs) var(--font-mono)}.fp-search-count[data-v-4c55a361]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px));min-width:18px;text-align:right}.fp-download[data-v-4c55a361]{display:inline-grid;place-items:center;width:26px;height:26px;flex:none;border-radius:var(--radius-sm);color:var(--color-text-muted)}.fp-download[data-v-4c55a361]:hover{background:var(--color-hover);color:var(--color-text)}.fp-download[data-v-4c55a361]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.fp-download svg[data-v-4c55a361]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.fp-check[data-v-4c55a361]{color:var(--color-success)}.fp-body[data-v-4c55a361]{--fp-search-hit-bg: color-mix(in srgb, var(--star) 22%, var(--bg));--fp-search-active-bg: color-mix(in srgb, var(--star) 36%, var(--bg));flex:1;min-height:0;overflow:auto}.fp-markdown[data-v-4c55a361]{padding:16px 20px}.fp-code[data-v-4c55a361]{background:var(--bg)}.fp-code[data-v-4c55a361] .hl-row.hit,.fp-table tr.hit td[data-v-4c55a361]{background:var(--fp-search-hit-bg)}.fp-code[data-v-4c55a361] .hl-row.active,.fp-table tr.active td[data-v-4c55a361]{background:var(--fp-search-active-bg)}.fp-code[data-v-4c55a361] .hl-row.target,.fp-table tr.target th[data-v-4c55a361],.fp-table tr.target td[data-v-4c55a361]{background:var(--color-accent-soft)}.fp-html-frame[data-v-4c55a361],.fp-pdf-frame[data-v-4c55a361]{width:100%;height:100%;border:0;background:var(--color-surface-raised)}.fp-pdf-wrap[data-v-4c55a361]{background:var(--panel2)}.fp-table-wrap[data-v-4c55a361]{background:var(--bg)}.fp-table[data-v-4c55a361]{border-collapse:collapse;min-width:100%;font:var(--code-font-size)/var(--leading-normal) var(--mono)}.fp-table th[data-v-4c55a361]{position:sticky;left:0;z-index:1;width:44px;min-width:44px;padding:2px 8px;text-align:right;color:var(--faint);background:var(--panel);border-right:.5px solid var(--line2);user-select:none}.fp-table td[data-v-4c55a361]{padding:2px 10px;border-right:.5px solid var(--line2);border-bottom:.5px solid var(--line2);white-space:pre}.fp-image-wrap[data-v-4c55a361]{display:flex;align-items:center;justify-content:center;padding:24px;background:var(--panel2)}.fp-image[data-v-4c55a361]{max-width:100%;max-height:100%;object-fit:contain;border:.5px solid var(--line);border-radius:4px;background:var(--media-alpha-canvas)}.fp-image.actual[data-v-4c55a361]{max-width:none;max-height:none}.fp-binary-wrap[data-v-4c55a361]{display:flex;align-items:center;justify-content:center}.fp-binary-card[data-v-4c55a361]{display:flex;align-items:center;gap:12px;padding:20px 24px;border:.5px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font-size:var(--ui-font-size);margin:32px auto;max-width:480px}.fp-binary-icon[data-v-4c55a361]{color:var(--faint);flex:none}.fp-error[data-v-4c55a361]{flex-direction:column;padding:24px;text-align:center}@keyframes spin-4c55a361{to{transform:rotate(360deg)}}.spinner[data-v-4c55a361]{display:inline-block;width:14px;height:14px;border:.5px solid var(--line);border-top-color:var(--color-accent);border-radius:50%;animation:spin-4c55a361 .7s linear infinite}@media(max-width:640px){.fp-lines[data-v-4c55a361]{display:none}.fp-markdown[data-v-4c55a361]{padding:14px 16px}.fp-body.fp-code[data-v-4c55a361]{-webkit-overflow-scrolling:touch}}.fp-empty[data-v-4c55a361],.fp-loading[data-v-4c55a361]{font-family:var(--sans)}.fp-binary-card[data-v-4c55a361]{border:.5px solid var(--color-line);border-radius:var(--radius-md)}.fp-binary-label[data-v-4c55a361]{font-family:var(--sans)}.fp-image[data-v-4c55a361]{border-radius:var(--radius-md)}.seg-btn[data-v-4c55a361]{font-family:var(--sans)}.tp[data-v-afb1f46f]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--color-bg)}.tp-body[data-v-afb1f46f]{flex:1;min-height:0;overflow-y:auto;margin:0;padding:12px 14px;font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word}.agent-panel[data-v-84a2873f]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-bg)}.agent-transcript[data-v-84a2873f]{flex:1;min-height:0;overflow-y:auto}.agent-transcript[data-v-84a2873f] .think-body,.agent-transcript[data-v-84a2873f] .ar-body,.agent-transcript[data-v-84a2873f] .tf-body,.agent-transcript[data-v-84a2873f] .bb,.agent-transcript[data-v-84a2873f] .tl-body{transition:none}.agent-error[data-v-84a2873f]{color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.agent-fallback[data-v-84a2873f]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4)}.sc[data-v-bb28a4e0]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.sc-body[data-v-bb28a4e0]{flex:1;min-height:0;overflow-y:auto}.sc-empty[data-v-bb28a4e0]{padding:24px 16px;text-align:center;color:var(--muted);font-size:var(--ui-font-size)}.sc-composer[data-v-bb28a4e0]{flex:none;display:flex;align-items:flex-end;gap:6px;padding:8px 10px;border-top:.5px solid var(--color-line);background:var(--color-surface-raised)}.sc-input[data-v-bb28a4e0]{flex:1;min-width:0;resize:none;border:.5px solid var(--color-line);border-radius:var(--r-sm);padding:7px 9px;background:var(--bg);color:var(--color-text);font:var(--ui-font-size)/1.5 var(--sans);outline:none;max-height:160px}.sc-input[data-v-bb28a4e0]:focus{border-color:var(--color-accent-bd)}.sc-send[data-v-bb28a4e0]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:var(--r-sm);background:var(--color-accent);color:var(--color-text-on-accent);cursor:pointer}.sc-send[data-v-bb28a4e0]:disabled{opacity:.4;cursor:default}.sc-send[data-v-bb28a4e0]:not(:disabled):hover{background:var(--color-accent-hover)}.sc-loading[data-v-bb28a4e0]{flex:none;padding:8px 12px 12px}.sc-body[data-v-bb28a4e0] .sending-placeholder,.sc-body[data-v-bb28a4e0] .sending-line{display:none}.changes-pane[data-v-7d5ab9c7]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono)}.dv-path[data-v-7d5ab9c7],.dv-change-count[data-v-7d5ab9c7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:var(--muted)}.dv-change-count[data-v-7d5ab9c7]{flex:1;align-self:stretch;display:inline-flex;align-items:center;font-family:var(--font-ui)}.dv-path[data-v-7d5ab9c7]{font-family:var(--font-ui)}.ch-head[data-v-7d5ab9c7]{display:flex;align-items:center;gap:8px;padding:8px var(--space-3);border-bottom:.5px solid var(--line);background:var(--panel);font-size:var(--text-base);color:var(--dim);flex:none;white-space:nowrap;overflow:hidden;font-family:var(--font-ui);user-select:none}.br-heading[data-v-7d5ab9c7]{display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.br-icon[data-v-7d5ab9c7]{flex:none;color:var(--muted)}.br-label[data-v-7d5ab9c7]{color:var(--muted);font-size:var(--text-xs);font-weight:500}.br-name[data-v-7d5ab9c7]{color:var(--color-text);font-weight:500;font-size:var(--text-xs)}.sync-info[data-v-7d5ab9c7]{display:flex;align-items:center;gap:4px}.ahead[data-v-7d5ab9c7]{color:var(--color-accent);font-size:var(--text-xs)}.behind[data-v-7d5ab9c7]{color:var(--color-warning);font-size:var(--text-xs)}.empty-head[data-v-7d5ab9c7]{color:var(--muted);font-size:var(--text-base)}.ch-list[data-v-7d5ab9c7]{flex:1;min-height:0}.ch-list-content[data-v-7d5ab9c7]{min-height:100%;padding:4px 0}.ch-row[data-v-7d5ab9c7]{display:flex;align-items:center;gap:6px;padding:3px 8px;cursor:pointer;font-size:var(--text-xs);line-height:1.6;width:100%;background:none;border:none;text-align:left;font-family:var(--font-ui);color:inherit}.ch-row[data-v-7d5ab9c7]:hover{background:var(--panel2)}.ch-row[data-v-7d5ab9c7]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ch-tree[data-v-7d5ab9c7]{--tree-base-indent: 14px;--tree-indent-step: 12px;font-family:var(--font-ui)}.tree-list[data-v-7d5ab9c7]{list-style:none;margin:0}.tree-node[data-v-7d5ab9c7]{overflow:hidden;interpolate-size:allow-keywords}.tree-collapse-enter-active[data-v-7d5ab9c7],.tree-collapse-leave-active[data-v-7d5ab9c7]{transition:block-size var(--duration-base) var(--ease-out),opacity var(--duration-fast) var(--ease-out),transform var(--duration-base) var(--ease-out)}.tree-collapse-enter-from[data-v-7d5ab9c7],.tree-collapse-leave-to[data-v-7d5ab9c7]{block-size:0;opacity:0;transform:translateY(-3px)}.tree-collapse-enter-to[data-v-7d5ab9c7],.tree-collapse-leave-from[data-v-7d5ab9c7]{block-size:auto;opacity:1;transform:translateY(0)}.tree-row[data-v-7d5ab9c7]{position:relative;display:flex;align-items:center;gap:6px;width:100%;margin-top:1px;padding:3px 8px;background:none;border:none;text-align:left;font-family:inherit;font-size:var(--text-xs);color:inherit;cursor:pointer}.tree-row[data-v-7d5ab9c7]:before{content:"";position:absolute;top:0;bottom:0;left:calc(var(--tree-base-indent) + 6px);width:calc(var(--tree-depth, 0) * var(--tree-indent-step));background:repeating-linear-gradient(to right,var(--color-line) 0 1px,transparent 1px var(--tree-indent-step));pointer-events:none}.tree-row[data-v-7d5ab9c7]:hover{background:var(--panel2)}.tree-row[data-v-7d5ab9c7]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.tree-folder[data-v-7d5ab9c7]{color:var(--color-text);font-weight:500}.tree-file[data-v-7d5ab9c7]{color:var(--color-text);font-weight:450}.tree-icon[data-v-7d5ab9c7]{flex:none;color:var(--muted)}.tree-name[data-v-7d5ab9c7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge[data-v-7d5ab9c7]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:var(--radius-xs);font-size:max(9px,calc(var(--ui-font-size) - 4px));font-weight:500;flex:none;user-select:none}.badge.modified[data-v-7d5ab9c7]{background:var(--color-warning-soft);color:var(--color-warning)}.badge.added[data-v-7d5ab9c7]{background:var(--color-success-soft);color:var(--color-success)}.badge.deleted[data-v-7d5ab9c7]{background:var(--color-danger-soft);color:var(--color-danger)}.badge.renamed[data-v-7d5ab9c7]{background:var(--color-done-soft);color:var(--color-done)}.badge.untracked[data-v-7d5ab9c7]{background:var(--color-success-soft);color:var(--color-success)}.badge.conflicted[data-v-7d5ab9c7]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger);font-size:max(9px,calc(var(--ui-font-size) - 5px))}.badge.ignored[data-v-7d5ab9c7]{background:var(--color-well);color:var(--faint)}.badge.clean[data-v-7d5ab9c7]{background:transparent;color:var(--faint)}.badge.unknown[data-v-7d5ab9c7]{background:var(--color-well);color:var(--muted)}.fpath[data-v-7d5ab9c7]{color:var(--color-text);font-size:var(--text-xs);font-weight:450;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left;min-width:0}.fpath[data-v-7d5ab9c7]:before,.fpath[data-v-7d5ab9c7]:after{content:"‎"}.empty-state[data-v-7d5ab9c7]{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:32px 20px;color:var(--muted);font-size:var(--ui-font-size);text-align:center;user-select:none}.empty-state-icon[data-v-7d5ab9c7]{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--color-well);color:var(--color-text-muted)}.diff-head[data-v-7d5ab9c7]{display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:.5px solid var(--line);background:var(--panel);flex:none;white-space:nowrap;overflow:hidden}.dv-lines-wrap[data-v-7d5ab9c7]{flex:1;min-height:0;overflow:auto}.diff-content-enter-active[data-v-7d5ab9c7],.diff-content-leave-active[data-v-7d5ab9c7]{transition:opacity var(--duration-base) var(--ease-out)}.diff-content-enter-from[data-v-7d5ab9c7],.diff-content-leave-to[data-v-7d5ab9c7]{opacity:0}@media(max-width:640px){.ch-head[data-v-7d5ab9c7]{padding:10px 14px}.ch-list[data-v-7d5ab9c7]{padding:2px 0 12px}.ch-row[data-v-7d5ab9c7]{min-height:44px;padding:8px 14px;gap:12px;font-size:var(--text-xs)}.ch-row[data-v-7d5ab9c7]:active{background:var(--panel2)}.badge[data-v-7d5ab9c7]{width:18px;height:18px}.fpath[data-v-7d5ab9c7]{font-size:var(--text-xs)}.tree-row[data-v-7d5ab9c7]{min-height:40px;padding:8px 14px}.diff-head[data-v-7d5ab9c7]{padding:8px 12px;gap:10px}.diff-path[data-v-7d5ab9c7]{font-size:var(--text-base)}}.changes-pane .empty-state[data-v-7d5ab9c7],.br-label[data-v-7d5ab9c7],.empty-head[data-v-7d5ab9c7]{font-family:var(--sans)}.ch-row[data-v-7d5ab9c7],.ct-row[data-v-7d5ab9c7]{margin:1px 6px;width:calc(100% - 12px);border-radius:var(--radius-md)}.changes-pane .badge[data-v-7d5ab9c7],.changed-tree .badge[data-v-7d5ab9c7]{border-radius:var(--radius-sm)}.change-count[data-v-7d5ab9c7]{font-family:var(--sans);border-radius:999px}.td[data-v-fdd0bc05]{display:flex;flex-direction:column;height:100%;min-height:0}.td-path[data-v-fdd0bc05]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--ui-c1) var(--font-mono);color:var(--color-text-muted)}.td-body[data-v-fdd0bc05]{flex:1;min-height:0;overflow:auto}.td-empty[data-v-fdd0bc05]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);height:100%;padding:var(--space-6);color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.mp[data-v-3ba22330]{display:flex;flex-direction:column;gap:var(--space-2);height:100%;min-height:0;padding-top:4px}.search-wrap[data-v-3ba22330]{position:relative;margin:0 22px;padding-bottom:var(--space-1)}.search-wrap[data-v-3ba22330] .ui-input{padding-right:30px}.search-clear[data-v-3ba22330]{position:absolute;top:0;bottom:var(--space-1);right:var(--space-2);margin-block:auto;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-hover);color:var(--color-text-faint);cursor:pointer;visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast),background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.search-clear.is-on[data-v-3ba22330]{visibility:visible;opacity:1}.search-clear[data-v-3ba22330]:hover{background:var(--color-selected);color:var(--color-text-muted)}.search-clear[data-v-3ba22330]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.chip-strip[data-v-3ba22330]{display:flex;gap:var(--space-1);margin:0 22px;overflow-x:auto;scrollbar-width:none}.chip-strip[data-v-3ba22330]::-webkit-scrollbar{display:none}.chip[data-v-3ba22330]{flex:none;height:28px;padding:0 var(--space-3);border:none;border-radius:var(--radius-full);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base);white-space:nowrap;cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.chip[data-v-3ba22330]:hover{background:var(--color-hover);color:var(--color-text)}.chip.is-active[data-v-3ba22330]{background:var(--color-selected);color:var(--color-text);font-weight:var(--weight-medium)}.chip[data-v-3ba22330]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-list[data-v-3ba22330]{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding:var(--space-1) var(--space-2)}.model-row[data-v-3ba22330]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);cursor:pointer;color:var(--color-text);min-width:0;transition:background var(--duration-fast) var(--ease-out)}.model-row[data-v-3ba22330]:hover,.model-row.is-selected[data-v-3ba22330]{background:var(--color-hover)}.model-row.is-current[data-v-3ba22330]{background:var(--color-selected)}.model-main[data-v-3ba22330]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.model-name[data-v-3ba22330]{font-family:var(--font-ui);font-size:var(--text-base);line-height:20px;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-row.is-current .model-name[data-v-3ba22330]{font-weight:var(--weight-medium)}.model-meta[data-v-3ba22330]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:18px;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-side[data-v-3ba22330]{display:flex;align-items:center;gap:var(--space-1);flex:none}.model-check[data-v-3ba22330]{color:var(--color-text)}.model-star[data-v-3ba22330]{color:var(--color-text-faint);visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast)}.model-row:hover .model-star[data-v-3ba22330],.model-row.is-selected .model-star[data-v-3ba22330],.model-star.is-starred[data-v-3ba22330],.model-star[data-v-3ba22330]:focus-visible{visibility:visible;opacity:1}.model-star.is-starred[data-v-3ba22330]{color:var(--star)}@media(hover:none){.model-star[data-v-3ba22330]{visibility:visible;opacity:1}}.state-row[data-v-3ba22330]{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:var(--space-2);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.state-row.unavail[data-v-3ba22330]{color:var(--color-warning)}.empty[data-v-3ba22330]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.footer-hint[data-v-3ba22330]{flex:none;display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-4);border-top:.5px solid var(--color-line);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.hint-dot[data-v-3ba22330]{margin:0 var(--space-1)}@media(prefers-reduced-motion:reduce){.chip[data-v-3ba22330],.model-row[data-v-3ba22330],.model-star[data-v-3ba22330],.search-clear[data-v-3ba22330]{transition:none}}.center-body[data-v-0b06fca3]{display:flex;flex-direction:column;align-items:center;gap:var(--space-3);padding:var(--space-8) 0 var(--space-4);text-align:center}.center-text[data-v-0b06fca3]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.success-text[data-v-0b06fca3]{color:var(--color-success)}.err-text[data-v-0b06fca3]{color:var(--color-danger)}.warn-text[data-v-0b06fca3]{color:var(--color-warning);font-size:var(--text-base)}.center-hint[data-v-0b06fca3]{font-size:var(--text-sm);color:var(--color-text-muted)}.nb[data-v-0b06fca3]{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-2) 0 var(--space-4)}.nb-lead[data-v-0b06fca3]{font-size:var(--text-base);color:var(--color-text);line-height:var(--leading-normal)}.nb-primary[data-v-0b06fca3]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);width:100%;min-height:40px;padding:0 var(--space-4);background:var(--color-accent);color:var(--color-text-on-accent);border:.5px solid var(--color-accent);border-radius:var(--radius-md);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);cursor:pointer;text-decoration:none;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.nb-primary[data-v-0b06fca3]:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.nb-or[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-3);color:var(--color-text-muted);font-size:var(--text-xs);letter-spacing:.06em}.nb-or[data-v-0b06fca3]:before,.nb-or[data-v-0b06fca3]:after{content:"";flex:1;height:1px;background:var(--color-line)}.nb-fallback[data-v-0b06fca3]{display:flex;flex-direction:column;gap:var(--space-2)}.nb-fb-text[data-v-0b06fca3]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.nb-fb-link[data-v-0b06fca3]{color:var(--color-accent);text-decoration:none;border-bottom:.5px solid var(--color-accent-bd)}.nb-fb-link[data-v-0b06fca3]:hover{border-bottom-color:var(--color-accent)}.nb-code-row[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-3);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3)}.nb-code[data-v-0b06fca3]{flex:1;font-family:var(--font-mono);font-size:var(--text-xl);font-weight:var(--weight-medium);color:var(--color-text);letter-spacing:.14em}.nb-link[data-v-0b06fca3]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text}.nb-copy.is-copied[data-v-0b06fca3]{color:var(--color-success);border-color:var(--color-success-bd)}.nb-status[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.nb-status-text[data-v-0b06fca3]{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--color-text-muted);flex:1}.nb-countdown[data-v-0b06fca3]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);font-variant-numeric:tabular-nums}.actions[data-v-0b06fca3]{display:flex;justify-content:flex-end;gap:var(--space-3);padding-top:var(--space-4)}@media(max-width:640px){.center-body[data-v-0b06fca3],.nb[data-v-0b06fca3]{overflow-y:auto;-webkit-overflow-scrolling:touch}.nb-code-row[data-v-0b06fca3],.nb-status[data-v-0b06fca3],.actions[data-v-0b06fca3]{flex-wrap:wrap}.nb-code[data-v-0b06fca3]{min-width:0;overflow-wrap:anywhere;letter-spacing:.08em}.nb-copy[data-v-0b06fca3]{min-height:34px}.nb-primary[data-v-0b06fca3]{min-height:44px}.nb-status-text[data-v-0b06fca3]{min-width:0}}.pf-form[data-v-ac0597e3]{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-4) var(--space-4) var(--space-5);border-top:.5px solid var(--color-line)}.pf-guard[data-v-ac0597e3] .ui-banner__text{display:flex;align-items:center;gap:var(--space-2);width:100%}.pf-guard .msg[data-v-ac0597e3]{flex:1}.pf-field[data-v-ac0597e3]{display:flex;flex-direction:column;gap:6px}.pf-key-wrap[data-v-ac0597e3]{position:relative}.pf-key-wrap[data-v-ac0597e3] .ui-input{padding-right:calc(var(--icon-button-sm) + var(--space-2))}.pf-key-eye[data-v-ac0597e3]{position:absolute;right:var(--space-1);top:50%;transform:translateY(-50%)}.pf-field-label[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.req[data-v-ac0597e3]{color:var(--color-danger)}.pf-models[data-v-ac0597e3]{display:flex;flex-direction:column;gap:var(--space-2)}.pf-model-grid[data-v-ac0597e3]{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,2fr) auto;gap:var(--space-2);align-items:center}.pf-model-head span[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.pf-models-empty[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.pf-foot[data-v-ac0597e3]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-4);border-top:.5px solid var(--color-line)}.pf-foot .spacer[data-v-ac0597e3]{flex:1}.pf-confirm-msg[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-danger)}.pf-managed-note[data-v-ac0597e3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}@media(max-width:640px){.pf-model-grid[data-v-ac0597e3]{grid-template-columns:minmax(0,1fr) auto}}.af[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4) var(--space-4) var(--space-5);border-top:.5px solid var(--color-line)}.af-guard[data-v-9e5ec0a8] .ui-banner__text{display:flex;align-items:center;gap:var(--space-2);width:100%}.af-guard .msg[data-v-9e5ec0a8]{flex:1}.af-catalog[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:var(--space-3)}.af-center[data-v-9e5ec0a8]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-4) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.af-error[data-v-9e5ec0a8]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-2)}.af-list[data-v-9e5ec0a8]{display:flex;flex-direction:column;max-height:320px;overflow-y:auto;border:.5px solid var(--color-line);border-radius:var(--radius-md)}.af-list[data-v-9e5ec0a8]>*+*{border-top:.5px solid var(--color-line)}.af-entry[data-v-9e5ec0a8]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:34px;padding:var(--space-1) var(--space-3);border:none;background:transparent;text-align:left;font-family:var(--font-ui);color:var(--color-text);cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.af-entry[data-v-9e5ec0a8]:hover:not(:disabled){background:var(--color-hover)}.af-entry[data-v-9e5ec0a8]:disabled{cursor:not-allowed;opacity:.55}.af-entry-name[data-v-9e5ec0a8]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-medium)}.af-entry .grow[data-v-9e5ec0a8]{flex:1;min-width:0}.af-entry-count[data-v-9e5ec0a8],.af-entry-reason[data-v-9e5ec0a8]{flex:none;font-size:var(--text-xs);color:var(--color-text-faint);white-space:nowrap}.af-empty[data-v-9e5ec0a8]{padding:var(--space-4);text-align:center;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm)}.af-import[data-v-9e5ec0a8],.af-registry[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:var(--space-4)}.af-hint[data-v-9e5ec0a8]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.af-back[data-v-9e5ec0a8]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:flex-start;padding:0;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer;transition:color var(--duration-fast) var(--ease-out)}.af-back[data-v-9e5ec0a8]:hover{color:var(--color-text)}.af-field[data-v-9e5ec0a8]{display:flex;flex-direction:column;gap:6px}.af-label[data-v-9e5ec0a8]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.req[data-v-9e5ec0a8]{color:var(--color-danger)}.af-key-wrap[data-v-9e5ec0a8]{position:relative}.af-key-wrap[data-v-9e5ec0a8] .ui-input{padding-right:calc(var(--icon-button-sm) + var(--space-2))}.af-key-eye[data-v-9e5ec0a8]{position:absolute;right:var(--space-1);top:50%;transform:translateY(-50%)}.af-note[data-v-9e5ec0a8]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.af-foot[data-v-9e5ec0a8]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-4);border-top:.5px solid var(--color-line)}.af-manual[data-v-9e5ec0a8] .pf-form{padding:0;border-top:none}.pp[data-v-9aa0e3a8]{display:flex;flex-direction:column}.pp-head[data-v-9aa0e3a8]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.pp-title[data-v-9aa0e3a8]{margin:0;font-family:var(--font-ui);font-size:var(--text-lg);font-weight:var(--weight-medium);color:var(--color-text)}.pp-loading[data-v-9aa0e3a8]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-4) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.pp-group[data-v-9aa0e3a8]{overflow:hidden;border:.5px solid var(--color-line);border-radius:var(--radius-xl);background:var(--color-surface-raised)}.pp-group[data-v-9aa0e3a8]:has(.ui-select.is-open){position:relative;z-index:var(--z-dropdown);overflow:visible}.pp-group[data-v-9aa0e3a8]>*+*{border-top:.5px solid var(--color-line)}.pp-row[data-v-9aa0e3a8]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:40px;padding:var(--space-2) var(--space-4);border:none;background:transparent;text-align:left;font-family:var(--font-ui);color:var(--color-text);cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.pp-row[data-v-9aa0e3a8]:hover{background:var(--color-hover)}.pp-item.open>.pp-row[data-v-9aa0e3a8]{background:var(--color-surface-sunken)}.pp-row .grow[data-v-9aa0e3a8]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-2)}.pp-id[data-v-9aa0e3a8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pp-count[data-v-9aa0e3a8]{flex:none;font-size:var(--text-xs);color:var(--color-text-faint);white-space:nowrap}.pp-chev[data-v-9aa0e3a8]{display:inline-flex;flex:none;color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.pp-item.open .pp-chev[data-v-9aa0e3a8]{transform:rotate(90deg)}.pp-add-row[data-v-9aa0e3a8]{gap:var(--space-2);color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.pp-acc[data-v-9aa0e3a8]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.pp-item.open>.pp-acc[data-v-9aa0e3a8]{grid-template-rows:1fr}.pp-acc-in[data-v-9aa0e3a8]{overflow:hidden;min-height:0}.pp-item.open .pp-acc-in[data-v-9aa0e3a8]{overflow:visible}.pp-item.flash>.pp-row[data-v-9aa0e3a8]{animation:pp-flash-9aa0e3a8 1.2s var(--ease-out)}@keyframes pp-flash-9aa0e3a8{0%{background:var(--color-accent-soft)}to{background:transparent}}.pp-empty[data-v-9aa0e3a8]{padding:var(--space-5) var(--space-4);color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);text-align:center}.sec[data-v-5711dff8]{margin-bottom:var(--space-5)}.sec-title[data-v-5711dff8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);margin:0 0 var(--space-3)}.pu-group[data-v-5711dff8]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.pu-row[data-v-5711dff8]{display:flex;align-items:center;gap:var(--space-3);min-height:52px;padding:var(--space-3) var(--space-4)}.pu-main[data-v-5711dff8]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pu-label[data-v-5711dff8]{font-size:var(--text-sm);color:var(--color-text)}.pu-hint[data-v-5711dff8]{font-size:var(--text-xs);color:var(--color-text-faint)}.sec[data-v-f39cdded]{margin-bottom:var(--space-5)}.sec-title[data-v-f39cdded]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);margin:0 0 var(--space-3)}.pu-group[data-v-f39cdded]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.pu-row[data-v-f39cdded]{display:flex;align-items:center;gap:var(--space-3);min-height:52px;padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.pu-row[data-v-f39cdded]:first-child{border-top:none}.pu-state[data-v-f39cdded]{color:var(--color-text-muted);font-size:var(--text-sm)}.pu-error-text[data-v-f39cdded]{flex:1;min-width:0}.pu-empty[data-v-f39cdded]{color:var(--color-text-faint)}.pu-main[data-v-f39cdded]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pu-label[data-v-f39cdded]{font-size:var(--text-sm);color:var(--color-text)}.pu-hint[data-v-f39cdded]{font-size:var(--text-xs);color:var(--color-text-faint)}.pu-value[data-v-f39cdded]{flex:none;font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);font-variant-numeric:tabular-nums;white-space:nowrap}.pu-value-sub[data-v-f39cdded]{font-weight:var(--weight-regular);color:var(--color-text-faint)}.pu-meter[data-v-f39cdded]{flex:none;width:120px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden}.pu-meter i[data-v-f39cdded]{display:block;height:100%;border-radius:var(--radius-full);background:var(--color-accent);transition:width var(--duration-base) var(--ease-out)}.pu-meter i.sev-warn[data-v-f39cdded]{background:var(--color-warning)}.pu-meter i.sev-danger[data-v-f39cdded]{background:var(--color-danger)}.sm-picker[data-v-eb75e643]{position:relative;width:100%;font-family:var(--font-ui)}.sm-picker__trigger[data-v-eb75e643]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:38px;padding:0 var(--space-3);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out)}.sm-picker__trigger[data-v-eb75e643]:focus-visible,.sm-picker.is-open .sm-picker__trigger[data-v-eb75e643]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.sm-picker__value[data-v-eb75e643]{min-width:0;flex:1;display:flex;align-items:center;overflow:hidden;white-space:nowrap}.sm-picker__value-text[data-v-eb75e643]{min-width:0;overflow:hidden;text-overflow:ellipsis}.sm-picker__value.is-placeholder[data-v-eb75e643]{color:var(--color-text-faint)}.sm-picker__chevron[data-v-eb75e643]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-base) var(--ease-out)}.sm-picker.is-open .sm-picker__chevron[data-v-eb75e643]{transform:rotate(180deg)}.sm-picker__menu[data-v-eb75e643]{position:fixed;z-index:var(--z-modal-dropdown);width:252px;max-width:calc(100vw - 64px);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__models[data-v-eb75e643]{max-height:280px;overflow-y:auto;padding:var(--space-1);border-radius:var(--radius-md)}.sm-picker__flyout[data-v-eb75e643]{position:absolute;width:180px;max-height:280px;overflow-y:auto;padding:var(--space-1);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__flyout--right[data-v-eb75e643]{left:calc(100% + var(--space-1))}.sm-picker__flyout--left[data-v-eb75e643]{right:calc(100% + var(--space-1))}.sm-picker__group[data-v-eb75e643]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.sm-picker__option[data-v-eb75e643]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.sm-picker__option.is-active[data-v-eb75e643]{background:var(--color-hover);color:var(--color-text-strong)}.sm-picker__option.is-muted[data-v-eb75e643]{color:var(--color-text-muted)}.sm-picker__option-label[data-v-eb75e643]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-picker__check[data-v-eb75e643]{flex:none;color:transparent}.sm-picker__option.is-selected .sm-picker__check[data-v-eb75e643]{color:var(--color-accent)}.sm-picker__flyout-caret[data-v-eb75e643]{flex:none;margin-left:auto;color:var(--color-text-faint)}.sd[data-v-ca0381a0]{display:grid;grid-template-columns:148px 1fr;grid-template-areas:"tabs region";min-height:0;height:100%;user-select:none}.sd[data-v-ca0381a0] :is(input,textarea,[contenteditable=true]){user-select:text}.settings-region[data-v-ca0381a0]{display:flex;min-width:0;min-height:0;flex-direction:column;grid-area:region}.settings-region-header[data-v-ca0381a0],.settings-tabs-header[data-v-ca0381a0]{display:flex;align-items:center;height:calc(var(--space-4) + var(--icon-button-sm) + var(--space-2));box-sizing:border-box}.settings-region-header[data-v-ca0381a0]{justify-content:flex-end;padding-right:var(--space-5)}.settings-tabs-header[data-v-ca0381a0]{padding-inline:var(--space-3)}.settings-dialog-title[data-v-ca0381a0]{margin:0;font-family:var(--font-ui);font-size:var(--text-lg);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text)}.settings-tabs[data-v-ca0381a0]{display:flex;flex-direction:column;width:148px;padding:0 var(--space-2) var(--space-2);gap:2px;overflow-y:auto;border-right:.5px solid var(--color-line);grid-area:tabs}.settings-tab-list[data-v-ca0381a0]{display:flex;flex-direction:column;gap:2px}.tab[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-2);text-align:left;padding:8px 10px;border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-ui-strong);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.tab[data-v-ca0381a0]:hover{background:var(--color-hover);color:var(--color-text-strong)}.tab.on[data-v-ca0381a0]{background:var(--color-hover);color:var(--color-text)}.tab[data-v-ca0381a0]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.body[data-v-ca0381a0]{display:flex;flex-direction:column;overflow-y:auto;padding:var(--space-2) 32px var(--space-5);flex:1;min-width:0}.body[data-v-ca0381a0]::-webkit-scrollbar{width:4px}.body[data-v-ca0381a0]::-webkit-scrollbar-track{background:transparent}.body[data-v-ca0381a0]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.body.scrolling[data-v-ca0381a0]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.body.scrolling[data-v-ca0381a0]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.panel[data-v-ca0381a0]{display:block}.sec[data-v-ca0381a0]{padding:var(--space-4) 0}.panel>.sec[data-v-ca0381a0]:first-child{padding-top:0}.sec-head[data-v-ca0381a0]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.sec-title[data-v-ca0381a0]{margin:0 0 var(--space-3);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);letter-spacing:0;color:var(--color-text)}.notification-settings[data-v-ca0381a0]{user-select:none}.sec-head .sec-title[data-v-ca0381a0]{margin-bottom:0}.row[data-v-ca0381a0]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:38px;padding:var(--space-1) 0}.settings-group[data-v-ca0381a0]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.settings-group[data-v-ca0381a0]:has(.ui-select.is-open){position:relative;z-index:var(--z-dropdown);overflow:visible}.settings-group>.row[data-v-ca0381a0]{min-height:52px;padding:var(--space-4);border-top:.5px solid var(--color-line)}.settings-group>.row[data-v-ca0381a0]:first-child{border-top:none}.settings-group>.empty-config[data-v-ca0381a0]{padding:var(--space-3)}.account-row[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4)}.account-avatar[data-v-ca0381a0]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--color-surface-sunken);color:var(--color-text-muted)}.account-avatar img[data-v-ca0381a0]{width:100%;height:100%;border-radius:50%;object-fit:cover}.account-name-row[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-2);min-width:0}.account-level[data-v-ca0381a0]{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.account-meta[data-v-ca0381a0]{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.account-name[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-sub[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rlabel[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);font-weight:var(--weight-option-label);display:flex;flex-direction:column;gap:0}.rvalue[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted);max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rvalue.mono[data-v-ca0381a0]{font-family:var(--font-mono);font-size:var(--text-xs)}.hint[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);color:var(--color-text-faint)}.body[data-v-ca0381a0] .ui-seg,.body[data-v-ca0381a0] .ui-select__trigger,.body[data-v-ca0381a0] .ui-button,.archive-search[data-v-ca0381a0]{border-width:.5px}.select-wrap[data-v-ca0381a0]{min-width:220px;max-width:min(320px,50vw);flex:none}.empty-config[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:var(--space-1) 0}@media(max-width:640px){.sd[data-v-ca0381a0]{grid-template-columns:1fr;grid-template-rows:auto 1fr;grid-template-areas:"tabs" "region"}.settings-tabs[data-v-ca0381a0]{width:auto;padding:0;overflow-x:visible;border-right:none;border-bottom:.5px solid var(--color-line)}.settings-tabs-header[data-v-ca0381a0]{padding:var(--space-3)}.settings-tab-list[data-v-ca0381a0]{flex-direction:row;gap:var(--space-1);overflow-x:auto;padding:0 var(--space-3) var(--space-2)}.settings-region-header[data-v-ca0381a0]{padding:var(--space-3)}.body[data-v-ca0381a0]{padding-inline:var(--space-3)}.tab[data-v-ca0381a0]{white-space:nowrap;flex:none}.row[data-v-ca0381a0]{align-items:flex-start;flex-direction:column}.settings-group[data-v-ca0381a0]{margin-inline:0}.select-wrap[data-v-ca0381a0]{width:100%;max-width:none}}.setting-card[data-v-ca0381a0]{border-radius:var(--radius-xl);overflow:hidden;background:var(--color-surface)}.panel-head[data-v-ca0381a0]{margin-bottom:var(--space-4)}.panel-title[data-v-ca0381a0]{margin:0 0 var(--space-2);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);letter-spacing:0;color:var(--color-text)}.panel-desc[data-v-ca0381a0]{margin:0;font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-muted);max-width:560px}.archive-toolbar[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-4);flex-wrap:wrap}.archive-search[data-v-ca0381a0]{flex:1;min-width:200px;height:36px;display:flex;align-items:center;gap:var(--space-2);padding:0 var(--space-3);border-radius:var(--radius-md);border:.5px solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-xs);background:var(--color-surface-overlay);transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.archive-search[data-v-ca0381a0]:focus-within{border-color:var(--color-accent);box-shadow:var(--p-focus-ring);color:var(--color-text-muted)}.archive-search svg[data-v-ca0381a0]{width:15px;height:15px;flex:none}.archive-search input[data-v-ca0381a0]{width:100%;border:none;outline:none;background:transparent;font:inherit;color:var(--color-text)}.archive-list[data-v-ca0381a0]{display:flex;flex-direction:column;gap:var(--space-4)}.archive-card .setting-card[data-v-ca0381a0]{margin-bottom:0}.archive-workspace[data-v-ca0381a0]{display:flex;align-items:center;gap:var(--space-2);margin:0 2px var(--space-2);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.archive-workspace svg[data-v-ca0381a0]{width:16px;height:16px;color:var(--color-text-faint);flex:none}.archive-workspace .path[data-v-ca0381a0]{font-family:var(--font-ui);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-workspace .count[data-v-ca0381a0]{margin-left:auto;color:var(--color-text-faint);font-weight:var(--weight-medium);font-size:var(--text-xs);flex:none}.archive-row[data-v-ca0381a0]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3);align-items:center;padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.archive-row[data-v-ca0381a0]:first-child{border-top:none}.archive-row[data-v-ca0381a0]:hover{background:var(--color-hover)}.archive-meta[data-v-ca0381a0]{min-width:0}.archive-name[data-v-ca0381a0]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-time[data-v-ca0381a0]{margin-top:2px;font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui)}.archive-draining[data-v-ca0381a0]{margin-bottom:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);background:var(--color-accent-soft);color:var(--color-accent-hover);font-size:var(--text-xs)}.archive-empty[data-v-ca0381a0]{padding:var(--space-6) var(--space-4);border-radius:var(--radius-xl);color:var(--color-text-faint);font-size:var(--text-xs);text-align:center;background:var(--color-surface)}@media(max-width:640px){.archive-toolbar[data-v-ca0381a0]{flex-direction:column;align-items:stretch}.archive-search[data-v-ca0381a0]{min-width:0}}[data-v-ca0381a0] .ui-dialog{width:min(980px,96vw)}[data-v-ca0381a0] .ui-dialog--fixed-height{height:min(780px,calc(100vh - var(--space-8) * 2))}.aw[data-v-fea98be5]{padding-top:4px}.crumbbar[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) 22px;border-bottom:.5px solid var(--color-line)}.crumbs[data-v-fea98be5]{display:flex;align-items:center;flex-wrap:wrap;gap:1px;min-width:0;font-size:var(--text-sm)}.crumb-sep[data-v-fea98be5]{color:var(--color-text-muted)}.crumb[data-v-fea98be5]{background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:1px var(--space-1);border-radius:var(--radius-xs)}.crumb[data-v-fea98be5]:hover{color:var(--color-text);background:var(--color-hover)}.crumb.last[data-v-fea98be5]{color:var(--color-text);font-weight:var(--weight-medium)}.filterbar[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) 22px;border-bottom:.5px solid var(--color-line)}.filter-icon[data-v-fea98be5]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.filter-input[data-v-fea98be5]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-base);padding:var(--space-1) 0;border:none;background:none;color:var(--color-text);outline:none}.filter-input[data-v-fea98be5]::placeholder{color:var(--color-text-muted)}.search-rel[data-v-fea98be5]{color:var(--color-text)}.folder-list[data-v-fea98be5]{height:300px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.fl-loading[data-v-fea98be5],.fl-empty[data-v-fea98be5]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.folder-row[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);text-align:left;padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);transition:background var(--duration-fast) var(--ease-out)}.folder-row[data-v-fea98be5]:hover{background:var(--color-hover)}.dir-icon[data-v-fea98be5]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.folder-name[data-v-fea98be5]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text)}.paste-section[data-v-fea98be5]{padding:var(--space-3) 22px;border-top:.5px solid var(--color-line)}.paste-section.paste-only[data-v-fea98be5]{border-top:none}.paste-row[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2)}.paste-input-wrap[data-v-fea98be5]{flex:1;min-width:0}.add-error[data-v-fea98be5]{margin:0 22px var(--space-2);padding:var(--space-2) var(--space-3);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-danger);background:var(--color-danger-soft);border:.5px solid var(--color-danger-bd);border-radius:var(--radius-sm)}.actions[data-v-fea98be5]{display:flex;justify-content:flex-end;gap:var(--space-2);padding:var(--space-3) 22px}.footer-hint[data-v-fea98be5]{padding:var(--space-2) var(--space-4);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint);border-top:.5px solid var(--color-line)}@media(max-width:640px){.folder-row[data-v-fea98be5]{min-height:44px}.crumbbar[data-v-fea98be5]{align-items:flex-start}.actions[data-v-fea98be5]{flex-wrap:wrap}}.confirm-dialog__message[data-v-aa5422da]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.rows[data-v-340d1b31]{margin:0;padding:0}.row[data-v-340d1b31]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) 0;font-size:var(--text-base)}.row dt[data-v-340d1b31]{width:96px;flex:none;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:var(--text-xs)}.row dd[data-v-340d1b31]{margin:0;color:var(--color-text);font-weight:var(--weight-medium);display:flex;align-items:center;gap:var(--space-2);min-width:0}.row dd.plan-on[data-v-340d1b31],.row dd.swarm-on[data-v-340d1b31]{color:var(--color-accent)}.ctx-text[data-v-340d1b31]{flex:none}.bar[data-v-340d1b31]{width:80px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.bar i[data-v-340d1b31]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.rows[data-v-340d1b31]{overflow-y:auto;-webkit-overflow-scrolling:touch}.row[data-v-340d1b31]{align-items:flex-start;flex-direction:column;gap:var(--space-1);min-height:48px}.row dt[data-v-340d1b31]{width:auto}.row dd[data-v-340d1b31]{max-width:100%;flex-wrap:wrap}}.toasts[data-v-ac44e9ef]{position:fixed;right:16px;bottom:84px;display:flex;flex-direction:column;gap:var(--space-2);z-index:var(--z-toast);width:min(440px,calc(100vw - 32px));max-height:56vh;overflow-y:auto}.toast-enter-active[data-v-ac44e9ef],.toast-leave-active[data-v-ac44e9ef]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.toast-enter-from[data-v-ac44e9ef],.toast-leave-to[data-v-ac44e9ef]{opacity:0;transform:translate(16px)}.toast-move[data-v-ac44e9ef]{transition:transform var(--duration-base) var(--ease-out)}.actions[data-v-ac44e9ef]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}.link[data-v-ac44e9ef]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit;font-size:var(--ui-font-size-xs)}.link[data-v-ac44e9ef]:hover{text-decoration:underline}.details[data-v-ac44e9ef]{display:grid;gap:5px;margin:8px 0 0;padding:8px;border:.5px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken)}.detail-row[data-v-ac44e9ef]{display:grid;grid-template-columns:minmax(88px,.34fr) minmax(0,1fr);gap:8px}.detail-row dt[data-v-ac44e9ef]{color:var(--color-text-muted)}.detail-row dd[data-v-ac44e9ef]{margin:0;color:var(--color-text);overflow-wrap:anywhere;white-space:pre-wrap}@media(max-width:640px){.toasts[data-v-ac44e9ef]{left:12px;right:12px;bottom:calc(var(--dock-h, 76px) + 8px);width:auto;max-height:50vh}.detail-row[data-v-ac44e9ef]{grid-template-columns:1fr;gap:2px}}.topbar[data-v-7f357087]{display:flex;align-items:center;gap:10px;height:calc(50px + var(--safe-top));flex:none;padding:var(--safe-top) max(12px,var(--safe-right)) 0 max(12px,var(--safe-left));border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui)}.wsq[data-v-7f357087]{flex:none;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-text);color:var(--color-bg);display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-weight:var(--weight-medium);font-size:var(--ui-font-size-sm)}.tb-mid[data-v-7f357087]{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:center;gap:1px;background:none;border:none;padding:0;cursor:pointer;text-align:left}.tb-path[data-v-7f357087]{display:flex;align-items:center;gap:5px;font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .ws[data-v-7f357087]{color:var(--color-text)}.tb-path .sl[data-v-7f357087]{color:var(--color-text-faint)}.tb-path .se[data-v-7f357087]{color:var(--color-text);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .cv[data-v-7f357087]{color:var(--color-text-faint);flex:none}.tb-sub[data-v-7f357087]{display:flex;align-items:center;gap:5px;font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-sub .rd[data-v-7f357087]{flex:none;width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-text-faint)}.tb-sub .rd.on[data-v-7f357087]{background:var(--color-success)}.topbar .tb-path[data-v-7f357087]{font-family:var(--sans)}.sheet-root[data-v-c3d5dadc]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;flex-direction:column;justify-content:flex-end}.sheet-scrim[data-v-c3d5dadc]{position:absolute;inset:0;background:#0d111773}.sheet-panel[data-v-c3d5dadc]{position:relative;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-bottom:none;border-radius:var(--radius-xl) var(--radius-xl) 0 0;box-shadow:var(--shadow-xl);max-height:86vh;display:flex;flex-direction:column;min-height:0;font-family:var(--font-ui);color:var(--color-text)}.sheet-grab[data-v-c3d5dadc]{flex:none;align-self:center;width:56px;height:18px;padding:0;border:none;background:none;cursor:pointer;position:relative;margin-top:4px}.sheet-grab[data-v-c3d5dadc]:after{content:"";position:absolute;left:50%;top:7px;transform:translate(-50%);width:38px;height:5px;border-radius:var(--radius-full);background:var(--color-line)}.sheet-head[data-v-c3d5dadc]{flex:none;display:flex;align-items:center;justify-content:space-between;padding:6px 16px 10px}.sheet-title[data-v-c3d5dadc]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.sheet-body[data-v-c3d5dadc]{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:max(16px,var(--safe-bottom))}.sheet-enter-active[data-v-c3d5dadc],.sheet-leave-active[data-v-c3d5dadc]{transition:opacity var(--duration-slow) var(--ease-out)}.sheet-enter-active .sheet-panel[data-v-c3d5dadc],.sheet-leave-active .sheet-panel[data-v-c3d5dadc]{transition:transform var(--duration-slow) var(--ease-out)}.sheet-enter-from[data-v-c3d5dadc],.sheet-leave-to[data-v-c3d5dadc]{opacity:0}.sheet-enter-from .sheet-panel[data-v-c3d5dadc],.sheet-leave-to .sheet-panel[data-v-c3d5dadc]{transform:translateY(102%)}.newrow[data-v-67278201]{display:flex;align-items:center;gap:10px;width:100%;padding:var(--space-3) var(--space-4);background:none;border:none;border-radius:var(--radius-md);color:var(--color-accent);font-weight:500;font-size:var(--text-base);cursor:pointer;text-align:left}.newrow[data-v-67278201]:hover{background:var(--color-hover)}.newrow[data-v-67278201]:active{background:var(--color-surface-sunken)}.newrow.secondary[data-v-67278201]{padding-top:var(--space-2);padding-bottom:var(--space-2);color:var(--color-text-muted);font-weight:400}.newrow.secondary[data-v-67278201]:hover{background:var(--color-hover)}.newrow.secondary[data-v-67278201]:active{background:var(--color-surface-sunken);color:var(--color-text)}.mlist[data-v-67278201]{--m-pad: 16px;--m-gutter: 15px;--m-gap: 8px;--m-indent: calc(var(--m-pad) + var(--m-gutter) + var(--m-gap));padding-bottom:var(--space-1)}.mempty[data-v-67278201]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-faint);font-size:var(--ui-font-size)}.mempty.small[data-v-67278201]{padding:10px 16px 12px var(--m-indent);text-align:left;font-size:var(--ui-font-size-xs)}.mgroup[data-v-67278201]{padding-top:2px}.mgh[data-v-67278201]{display:flex;align-items:center;gap:var(--m-gap);padding:10px var(--m-pad) 6px;border-radius:var(--radius-md);cursor:pointer;user-select:none;position:relative}.mgh[data-v-67278201]:hover{background:var(--color-hover)}.mgh[data-v-67278201]:active{background:var(--color-surface-sunken)}.mgh-folder[data-v-67278201]{flex:none;color:var(--color-text-muted)}.mgh-main[data-v-67278201]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.mgh-name[data-v-67278201]{font-size:var(--ui-font-size-lg);font-weight:550;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-path[data-v-67278201]{font-size:var(--text-base);font-weight:425;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-add[data-v-67278201]{margin:-10px -12px -10px 0}.mgh-add[data-v-67278201]:active{color:var(--color-text);background:var(--color-hover)}.mgh-more[data-v-67278201]{margin:-10px -8px}.mgh-more[data-v-67278201]:active{color:var(--color-text);background:var(--color-hover)}.srow[data-v-67278201]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--m-pad) var(--space-3) var(--m-indent);border-radius:var(--radius-md);cursor:pointer;position:relative}.srow[data-v-67278201]:hover{background:var(--color-hover)}.srow[data-v-67278201]:active{background:var(--color-surface-sunken)}.srow.cur[data-v-67278201]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.srow .m[data-v-67278201]{flex:1;min-width:0}.srow .m .t[data-v-67278201]{font-size:var(--text-base);font-weight:450;line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow.cur .m .t[data-v-67278201]{color:var(--color-accent-hover)}.srow .m .t.run[data-v-67278201]{position:relative}.srow .m .t.run[data-v-67278201]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-accent);animation:mRunPulse-67278201 1.4s ease-in-out infinite}@keyframes mRunPulse-67278201{0%,to{opacity:1}50%{opacity:.35}}.srow .m .t.aborted[data-v-67278201]{position:relative}.srow .m .t.aborted[data-v-67278201]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-danger)}.srow .m .s[data-v-67278201]{font-size:var(--text-base);font-weight:475;font-variant-numeric:tabular-nums;color:var(--color-text-faint);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att[data-v-67278201]{flex:none;font-family:var(--font-mono);font-size:max(9px,calc(var(--ui-font-size) - 4px));color:var(--color-text-on-accent);background:var(--color-warning);border-radius:var(--radius-full);padding:1px 7px}.srow .kb[data-v-67278201]:active{color:var(--color-text);background:var(--color-hover)}.kmenu[data-v-67278201]{position:absolute;right:12px;top:44px;z-index:var(--z-dropdown);min-width:96px;overflow:hidden}.wsmenu[data-v-67278201]{top:calc(100% - 4px);right:var(--m-pad);min-width:132px}.mshow-more-row[data-v-67278201]{display:flex;align-items:center;padding-left:calc(var(--m-indent) - var(--space-3))}.mshow-more[data-v-67278201]{display:flex;align-items:center;gap:var(--space-2);min-height:44px;padding:var(--space-1) var(--space-3);background:none;border:none;border-radius:var(--radius-md);color:var(--color-text-muted);font-size:var(--text-base);cursor:pointer;text-align:left}.mshow-more[data-v-67278201]:active{color:var(--color-accent-hover);background:var(--color-hover)}.mshow-more-sep[data-v-67278201]{margin:0 var(--space-1);color:var(--color-text-faint);user-select:none}.newrow[data-v-67278201]{font-family:var(--sans)}.mlist .srow[data-v-67278201]{margin:1px 8px;border-radius:var(--radius-md);border-bottom:none;padding:12px calc(var(--m-pad, 16px) - 8px) 12px calc(var(--m-indent, 39px) - 8px)}.mlist .srow.cur[data-v-67278201]{box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.group-title[data-v-81e94fd3]{padding:var(--space-3) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-faint)}.srow[data-v-81e94fd3]:disabled{opacity:.5;cursor:not-allowed}.srow[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:52px;padding:var(--space-3);background:none;border:none;border-radius:var(--radius-md);cursor:pointer;text-align:left;color:var(--color-text)}.srow[data-v-81e94fd3]:hover:not(.read-only){background:var(--color-hover)}.srow[data-v-81e94fd3]:active:not(.read-only){background:var(--color-surface-sunken)}.srow.read-only[data-v-81e94fd3]{cursor:default}.srow-main[data-v-81e94fd3]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.srow-label[data-v-81e94fd3]{font-size:var(--text-base);color:var(--color-text)}.srow-sub[data-v-81e94fd3]{font-size:var(--text-base);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow-val[data-v-81e94fd3]{flex:none;font-family:var(--font-mono);font-size:var(--ui-font-size);font-weight:500;color:var(--color-accent-hover)}.srow-val.dim[data-v-81e94fd3]{font-weight:400;color:var(--color-text-muted)}.cache-note[data-v-81e94fd3]{padding:0 var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);line-height:1.4}.chev[data-v-81e94fd3]{flex:none;color:var(--color-text-faint);font-size:17px;line-height:1}.toggle[data-v-81e94fd3]{flex:none;width:44px;height:26px;border-radius:var(--radius-full);background:var(--color-line);position:relative;transition:background .18s}.toggle.on[data-v-81e94fd3]{background:var(--color-accent)}.toggle[data-v-81e94fd3]:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:var(--radius-full);box-sizing:border-box;background:var(--color-bg);border:.5px solid var(--color-line);box-shadow:var(--shadow-xs);transition:left .18s}.toggle.on[data-v-81e94fd3]:after{left:21px}.srow.pref[data-v-81e94fd3]{cursor:default}.srow.acct.in .srow-label[data-v-81e94fd3]{color:var(--color-accent-hover);font-weight:500}.srow.acct.out .srow-label[data-v-81e94fd3]{color:var(--color-danger)}.acct-avatar[data-v-81e94fd3]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--color-surface-sunken);color:var(--color-text-muted)}.acct-avatar img[data-v-81e94fd3]{width:100%;height:100%;border-radius:50%;object-fit:cover}.acct-name-row[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-2);min-width:0}.acct-name-row .srow-label[data-v-81e94fd3]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.acct-level[data-v-81e94fd3]{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.ctx-meter[data-v-81e94fd3]{flex:none;width:96px;height:7px;border-radius:var(--radius-full);background:var(--color-surface-sunken);overflow:hidden}.ctx-meter i[data-v-81e94fd3]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.srow[data-v-81e94fd3]{align-items:flex-start;gap:10px;min-width:0;padding:14px max(14px,var(--safe-right)) 14px max(14px,var(--safe-left))}.group-title[data-v-81e94fd3],.cache-note[data-v-81e94fd3]{padding-left:max(14px,var(--safe-left));padding-right:max(14px,var(--safe-right))}.srow-main[data-v-81e94fd3]{flex:1 1 auto}.srow-sub[data-v-81e94fd3]{white-space:normal;overflow-wrap:anywhere}.srow.pref[data-v-81e94fd3]{flex-wrap:wrap}.srow.pref .srow-main[data-v-81e94fd3]{flex:1 0 100%}.srow-val[data-v-81e94fd3],.chev[data-v-81e94fd3],.toggle[data-v-81e94fd3],.ctx-meter[data-v-81e94fd3]{margin-top:2px}}.srow[data-v-81e94fd3],.srow-sub[data-v-81e94fd3],.srow-val[data-v-81e94fd3],.cache-note[data-v-81e94fd3]{font-family:var(--sans)}.arch-subhead[data-v-81e94fd3]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) var(--space-3) var(--space-1)}.arch-back[data-v-81e94fd3]{display:inline-flex;align-items:center;gap:2px;border:none;background:none;padding:var(--space-1) var(--space-2) var(--space-1) 0;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-accent-hover);cursor:pointer}.chev.back[data-v-81e94fd3]{font-size:20px}.arch-count[data-v-81e94fd3]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.arch-tools[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);flex-wrap:wrap}.arch-search-input[data-v-81e94fd3]{flex:1;min-width:160px}.arch-row[data-v-81e94fd3]{display:flex;align-items:center;gap:var(--space-3);min-height:56px;padding:var(--space-2) var(--space-3);border-top:.5px solid var(--color-line)}.arch-row[data-v-81e94fd3]:first-of-type{border-top:none}.arch-meta[data-v-81e94fd3]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.arch-name[data-v-81e94fd3]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arch-time[data-v-81e94fd3]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.arch-empty[data-v-81e94fd3]{padding:var(--space-6) var(--space-4);text-align:center;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.brand-logo[data-v-f04205a8]{display:block;flex:none;cursor:pointer;user-select:none;touch-action:manipulation}.ls-cards[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-3)}.ls-card[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);width:100%;padding:var(--space-4);background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);font-family:var(--font-ui);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.ls-card[data-v-1ff21828]:hover{border-color:var(--color-line-strong);background:var(--color-surface)}.ls-card[data-v-1ff21828]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ls-card-logo[data-v-1ff21828]{align-self:flex-start}.ls-card-icon[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--color-text-muted)}.ls-card-text[data-v-1ff21828]{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-1)}.ls-card-title[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-lg);font-weight:var(--weight-medium);color:var(--color-text)}.ls-reco[data-v-1ff21828]{padding:2px var(--space-2);border-radius:var(--radius-full);background:var(--color-accent-soft);color:var(--color-accent);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ls-card-hint[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.ls-card-chevron[data-v-1ff21828]{color:var(--color-text-faint);flex:none}.ls-done-card[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4);background:var(--color-surface-raised);border:.5px solid var(--color-success-bd);border-radius:var(--radius-lg)}.ls-done-badge[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-full);background:var(--color-success-soft);color:var(--color-success);flex:none}.ls-flow[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-4)}.ls-center[data-v-1ff21828]{display:flex;flex-direction:column;align-items:center;gap:var(--space-3);padding:var(--space-6) 0 var(--space-2);text-align:center}.ls-center-text[data-v-1ff21828]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.ls-success-text[data-v-1ff21828]{color:var(--color-success)}.ls-err-text[data-v-1ff21828]{color:var(--color-danger)}.ls-warn-text[data-v-1ff21828]{color:var(--color-warning)}.ls-center-hint[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted)}.ls-device[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-4)}.ls-lead[data-v-1ff21828]{font-size:var(--text-base);color:var(--color-text);line-height:var(--leading-normal)}.ls-primary[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);width:100%;min-height:40px;padding:0 var(--space-4);background:var(--color-accent);color:var(--color-text-on-accent);border:.5px solid var(--color-accent);border-radius:var(--radius-md);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);cursor:pointer;text-decoration:none;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.ls-primary[data-v-1ff21828]:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ls-or[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);color:var(--color-text-muted);font-size:var(--text-xs);letter-spacing:.06em}.ls-or[data-v-1ff21828]:before,.ls-or[data-v-1ff21828]:after{content:"";flex:1;height:1px;background:var(--color-line)}.ls-fb-text[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.ls-fb-link[data-v-1ff21828]{color:var(--color-accent);text-decoration:none;border-bottom:.5px solid var(--color-accent-bd)}.ls-fb-link[data-v-1ff21828]:hover{border-bottom-color:var(--color-accent)}.ls-code-row[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3)}.ls-code[data-v-1ff21828]{flex:1;font-family:var(--font-mono);font-size:var(--text-xl);font-weight:var(--weight-medium);color:var(--color-text);letter-spacing:.14em}.ls-link[data-v-1ff21828]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text}.ls-copy.is-copied[data-v-1ff21828]{color:var(--color-success);border-color:var(--color-success-bd)}.ls-status[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.ls-status-text[data-v-1ff21828]{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--color-text-muted);flex:1}.ls-countdown[data-v-1ff21828]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);font-variant-numeric:tabular-nums}.ls-actions[data-v-1ff21828]{display:flex;justify-content:flex-end;gap:var(--space-3)}@media(max-width:640px){.ls-code-row[data-v-1ff21828],.ls-status[data-v-1ff21828],.ls-actions[data-v-1ff21828]{flex-wrap:wrap}.ls-code[data-v-1ff21828]{min-width:0;overflow-wrap:anywhere;letter-spacing:.08em}.ls-status-text[data-v-1ff21828]{min-width:0}}.wizard[data-v-6546a2d8]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);overflow-y:auto;font-family:var(--font-ui)}.wiz-body[data-v-6546a2d8]{flex:1;display:flex;flex-direction:column;align-items:center;width:min(560px,100%);margin:0 auto;padding:max(var(--space-8),12vh) var(--space-5) var(--space-6)}.wiz-step[data-v-6546a2d8]{display:flex;flex-direction:column;align-items:center;width:100%;flex:1;min-height:0}.wiz-step-fill[data-v-6546a2d8]{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;width:100%}.wiz-title[data-v-6546a2d8]{margin:var(--space-4) 0 0;font-size:var(--text-2xl);font-weight:var(--weight-semibold);line-height:var(--leading-tight);color:var(--color-text);text-align:center}.wiz-sub[data-v-6546a2d8]{margin:var(--space-2) 0 var(--space-6);font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted);text-align:center;max-width:460px}.pref-group[data-v-6546a2d8]{width:100%;margin-bottom:var(--space-5)}.pref-label[data-v-6546a2d8]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted);margin-bottom:var(--space-2)}.opt-card[data-v-6546a2d8]{display:flex;align-items:center;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);font-family:var(--font-ui);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.opt-card[data-v-6546a2d8]:hover{border-color:var(--color-line-strong)}.opt-card[data-v-6546a2d8]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.opt-card.selected[data-v-6546a2d8]{border-color:var(--color-accent);background:var(--color-accent-soft)}.opt-label[data-v-6546a2d8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.lang-cards[data-v-6546a2d8]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-3);width:100%}.lang-card[data-v-6546a2d8]{gap:var(--space-3);padding:var(--space-4)}.opt-radio[data-v-6546a2d8]{width:18px;height:18px;border-radius:var(--radius-full);border:.5px solid var(--color-line-strong);background:var(--color-surface-raised);flex:none;display:inline-flex;align-items:center;justify-content:center;transition:border-color var(--duration-fast) var(--ease-out)}.opt-radio[data-v-6546a2d8]:after{content:"";width:8px;height:8px;border-radius:var(--radius-full);background:transparent;transition:background var(--duration-fast) var(--ease-out)}.opt-radio.on[data-v-6546a2d8]{border-color:var(--color-accent)}.opt-radio.on[data-v-6546a2d8]:after{background:var(--color-accent)}.theme-cards[data-v-6546a2d8]{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3);width:100%}.theme-card[data-v-6546a2d8]{flex-direction:column;gap:var(--space-3);padding:var(--space-3)}.tp[data-v-6546a2d8]{display:flex;width:100%;aspect-ratio:16 / 10;border:.5px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.tp-light[data-v-6546a2d8]{background:#fff}.tp-dark[data-v-6546a2d8]{background:#0d1117}.tp-half[data-v-6546a2d8]{flex:1;display:flex;min-width:0}.tp-half-light[data-v-6546a2d8]{background:#fff}.tp-half-dark[data-v-6546a2d8]{background:#0d1117}.tp-side[data-v-6546a2d8]{width:30%;flex:none}.tp-light .tp-side[data-v-6546a2d8],.tp-half-light .tp-side[data-v-6546a2d8]{background:#0000000d}.tp-dark .tp-side[data-v-6546a2d8],.tp-half-dark .tp-side[data-v-6546a2d8]{background:#ffffff12}.tp-lines[data-v-6546a2d8]{flex:1;display:flex;flex-direction:column;gap:6px;padding:14% 12%}.tp-lines span[data-v-6546a2d8]{height:6px;border-radius:var(--radius-full)}.tp-lines span[data-v-6546a2d8]:nth-child(1){width:62%}.tp-lines span[data-v-6546a2d8]:nth-child(2){width:88%}.tp-lines span[data-v-6546a2d8]:nth-child(3){width:44%}.tp-light .tp-lines span[data-v-6546a2d8],.tp-half-light .tp-lines span[data-v-6546a2d8]{background:#00000024}.tp-dark .tp-lines span[data-v-6546a2d8],.tp-half-dark .tp-lines span[data-v-6546a2d8]{background:#ffffff38}.wiz-foot[data-v-6546a2d8]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);width:100%;margin-top:auto;padding:var(--space-8) 0 max(var(--space-8),8vh)}.wiz-foot-ghost[data-v-6546a2d8]{display:flex;gap:var(--space-3);min-height:32px;align-items:center}.wiz-foot-ghost[data-v-6546a2d8] .ui-button--ghost:not(:disabled):hover{background:transparent;color:var(--color-text)}.wiz-primary[data-v-6546a2d8]{min-width:140px}@media(max-width:640px){.theme-cards[data-v-6546a2d8]{grid-template-columns:1fr}}.gload[data-v-ab85ede1]{position:fixed;top:0;left:0;width:100vw;height:100vh;height:100dvh;min-width:100vw;min-height:100dvh;z-index:var(--z-toast);display:flex;align-items:center;justify-content:center;background:var(--bg)}.gload-box[data-v-ab85ede1]{display:flex;flex-direction:column;align-items:center;gap:22px;transform:translateY(-6%)}.gload-logo[data-v-ab85ede1]{width:128px;height:auto;color:var(--color-text);animation:gload-pop-ab85ede1 .55s cubic-bezier(.22,1,.36,1) both}.gload-text[data-v-ab85ede1]{font-family:var(--mono);font-size:var(--text-base);color:var(--muted);letter-spacing:.04em}@keyframes gload-pop-ab85ede1{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.gload-logo[data-v-ab85ede1]{animation:none}}.gload-text[data-v-ab85ede1]{font-family:var(--sans)}.kap-root[data-v-2b13888e]{height:100vh;display:flex;flex-direction:column;background:var(--bg);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2.5px);color:var(--color-text)}.kap-head[data-v-2b13888e]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:.5px solid var(--line);background:var(--panel)}.kap-count[data-v-2b13888e]{color:var(--muted)}.kap-head-actions[data-v-2b13888e]{margin-left:auto;display:flex;gap:6px}.kap-head-actions button[data-v-2b13888e],.kap-view-toggle button[data-v-2b13888e]{padding:3px 8px;border:.5px solid var(--line);border-radius:6px;background:var(--bg);color:var(--muted);font:inherit;cursor:pointer}.kap-head-actions button[data-v-2b13888e]:hover,.kap-view-toggle button[data-v-2b13888e]:hover{color:var(--color-text)}.kap-head-actions button.on[data-v-2b13888e],.kap-view-toggle button.on[data-v-2b13888e]{color:var(--color-accent-hover);border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.kap-filters[data-v-2b13888e]{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:7px 10px;border-bottom:.5px solid var(--line)}.kap-filters select[data-v-2b13888e],.kap-filters input[type=text][data-v-2b13888e]{padding:3px 6px;border:.5px solid var(--line);border-radius:6px;background:var(--bg);color:var(--color-text);font:inherit;min-width:0}.kap-filters input[type=text][data-v-2b13888e]{flex:1;min-width:120px}.kap-check[data-v-2b13888e]{display:inline-flex;align-items:center;gap:4px;color:var(--muted);white-space:nowrap}.kap-view-toggle[data-v-2b13888e]{display:flex;gap:0}.kap-view-toggle button[data-v-2b13888e]:first-child{border-radius:6px 0 0 6px;border-right:none}.kap-view-toggle button[data-v-2b13888e]:last-child{border-radius:0 6px 6px 0}.kap-list[data-v-2b13888e]{flex:1;min-height:0;overflow-y:auto}.kap-empty[data-v-2b13888e]{padding:18px 12px;color:var(--muted);text-align:center}.kap-row[data-v-2b13888e]{display:flex;align-items:baseline;gap:7px;width:100%;padding:3px 10px;border:none;border-bottom:.5px solid var(--line);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.kap-row[data-v-2b13888e]:hover{background:var(--panel2)}.kap-row.expanded[data-v-2b13888e]{background:var(--color-accent-soft)}.kap-ts[data-v-2b13888e]{flex:none;color:var(--muted)}.kap-badge[data-v-2b13888e]{flex:none;padding:0 5px;border-radius:var(--radius-sm);font-size:max(9px,calc(var(--ui-font-size) - 4.5px));font-weight:500;line-height:1.7}.b-rest[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.b-in[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-success)}.b-out[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-warning)}.b-life[data-v-2b13888e]{background:var(--panel2);color:var(--muted)}.b-err[data-v-2b13888e]{background:var(--color-warning);color:var(--bg)}.kap-label[data-v-2b13888e]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kap-detail[data-v-2b13888e]{border-bottom:.5px solid var(--line);background:var(--bg);padding:6px 10px 10px}.kap-detail-actions[data-v-2b13888e]{display:flex;justify-content:flex-end;margin-bottom:4px}.kap-detail-actions button[data-v-2b13888e]{padding:2px 8px;border:.5px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font:inherit;cursor:pointer}.kap-detail-actions button[data-v-2b13888e]:hover{color:var(--color-text)}.kap-detail pre[data-v-2b13888e]{margin:0;max-height:320px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:calc(var(--ui-font-size) - 3px);line-height:1.45}.kap-agg[data-v-2b13888e]{flex:1;min-height:0;overflow-y:auto;padding:8px 10px}.kap-agg h4[data-v-2b13888e]{margin:8px 0 4px;font-size:calc(var(--ui-font-size) - 2.5px);color:var(--muted)}.kap-agg table[data-v-2b13888e]{width:100%;border-collapse:collapse}.kap-agg th[data-v-2b13888e],.kap-agg td[data-v-2b13888e]{padding:3px 6px;border-bottom:.5px solid var(--line);text-align:left;vertical-align:top}.kap-agg th[data-v-2b13888e]{color:var(--muted);font-weight:500}.kap-agg .num[data-v-2b13888e]{text-align:right}.kap-agg .err[data-v-2b13888e]{color:var(--color-warning);font-weight:500}.kap-agg .mono[data-v-2b13888e]{word-break:break-all}.kap-fab[data-v-21de79fc]{position:fixed;right:10px;bottom:10px;z-index:var(--z-overlay);padding:5px 9px;border:.5px solid var(--line);border-radius:8px;background:var(--panel);color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 3px);font-weight:500;letter-spacing:.04em;cursor:pointer;opacity:.75}.kap-fab[data-v-21de79fc]:hover{opacity:1;color:var(--color-accent)}.server-auth-hint[data-v-331563ff]{margin:0 0 var(--space-3);font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.server-auth-hint code[data-v-331563ff]{padding:1px 5px;font-family:var(--font-mono);font-size:var(--text-xs);background:var(--color-surface-sunken);border-radius:var(--radius-xs)}.internal-build-tag[data-v-14c3d0e0]{flex:none;display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:999px;background:#f5a623;color:#3a2a00;font-size:11px;font-weight:700;letter-spacing:.01em;line-height:1.4;white-space:nowrap;user-select:none}.gload-fade-leave-active[data-v-01f1cfe9]{transition:opacity .28s ease}.gload-fade-leave-to[data-v-01f1cfe9]{opacity:0}.action-toast-enter-active[data-v-01f1cfe9],.action-toast-leave-active[data-v-01f1cfe9]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.action-toast-leave-active[data-v-01f1cfe9]{transition-duration:var(--duration-fast);pointer-events:none}.action-toast-enter-from[data-v-01f1cfe9],.action-toast-leave-to[data-v-01f1cfe9]{opacity:0;transform:translateY(-6px)}.app-shell[data-v-01f1cfe9]{position:fixed;top:var(--app-top, 0px);left:0;right:0;height:100vh;height:100dvh;height:var(--app-height, 100dvh);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}.app[data-v-01f1cfe9]{flex:1;min-height:0;position:relative;display:grid;grid-template-columns:auto 0 minmax(0,1fr) 0 auto;background:var(--bg);color:var(--color-text);overflow:hidden;box-sizing:border-box}.app[data-v-01f1cfe9]>*{min-height:0;min-width:0}.app>.side[data-v-01f1cfe9]{grid-column:1}.side-handle[data-v-01f1cfe9]{grid-column:2}.app:not(.mobile)>.con[data-v-01f1cfe9]{grid-column:3}.preview-handle[data-v-01f1cfe9]{grid-column:4}.sidebar-toggle-btn[data-v-01f1cfe9]{position:absolute;top:11px;left:16px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-01f1cfe9 .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .sidebar-toggle-btn[data-v-01f1cfe9]{left:84px;animation:none}.new-chat-btn[data-v-01f1cfe9]{position:absolute;top:11px;left:42px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-01f1cfe9 .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .new-chat-btn[data-v-01f1cfe9]{left:110px}@keyframes sidebar-toggle-btn-in-01f1cfe9{0%{opacity:0}}.internal-build-fab[data-v-01f1cfe9]{position:absolute;right:var(--space-3);bottom:var(--space-3);z-index:var(--z-sticky);pointer-events:none}.app.mobile[data-v-01f1cfe9]{grid-template-columns:1fr;grid-template-rows:auto 1fr}.global-preview[data-v-01f1cfe9]{--preview-w: 460px;grid-column:5;min-width:0;min-height:0;width:0;background:var(--bg);overflow:hidden}.global-preview.open[data-v-01f1cfe9]{width:var(--preview-w)}.global-preview[data-v-01f1cfe9]:not(.mobile)>*{width:var(--preview-w);height:100%;box-sizing:border-box;border-left:.5px solid var(--line)}.global-preview.mobile[data-v-01f1cfe9]{position:fixed;inset:0;z-index:var(--z-sticky);width:auto;transition:none;border-top:.5px solid var(--color-text)}:root{--panel-head-h: 48px;--panel-head-inset: calc((var(--panel-head-h) - var(--icon-button-sm)) / 2)}.app:not(.mobile) .chat-header{transition:padding-left .28s cubic-bezier(.4,0,.2,1)}.app.sidebar-collapsed .chat-header{padding-left:78px}.app.sidebar-collapsed.macos-desktop .chat-header{padding-left:146px}.app.macos-desktop .global-preview .ui-panel-header{-webkit-app-region:drag}.app.macos-desktop .global-preview .ui-panel-header button,.app.macos-desktop .global-preview .ui-panel-header input{-webkit-app-region:no-drag}.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .chat-header,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .side .ch,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel) .global-preview .ui-panel-header{-webkit-app-region:no-drag}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--dim: rgba(0, 0, 0, .6);--muted: rgba(0, 0, 0, .45);--faint: rgba(0, 0, 0, .3);--line: var(--color-line);--line2: var(--color-subtle);--canvas: #f9fbfc;--sh: 0 1px 3px rgba(28, 40, 66, .05), 0 6px 18px rgba(28, 40, 66, .06);--shc: 0 1px 2px rgba(28, 40, 66, .05);--panel: #f5f5f5;--panel2: rgba(0, 0, 0, .05);--bg: #ffffff;--blue: #1783ff;--blue2: #167ff7;--soft: #e8f3ff;--bd: rgba(23, 131, 255, .25);--logo: #1783ff;--bluebg: #e8f3ff;--blueln: rgba(23, 131, 255, .25);--ok: #0e7a38;--warn: #a9610a;--star: #eab308;--err: #c0392b;--hover: var(--color-hover);--r-xs: var(--radius-sm);--r-sm: var(--radius-md);--r-md: var(--radius-lg);--r-lg: var(--radius-xl);--ui-font-size: var(--ui-b2);--ui-font-size-sm: calc(var(--ui-font-size) - 1px);--ui-font-size-xs: calc(var(--ui-font-size) - 2px);--ui-font-size-lg: calc(var(--ui-font-size) + 1px);--ui-font-size-xl: calc(var(--ui-font-size) + 2px);--content-font-size: var(--md-b1);--code-font-size: calc(var(--content-font-size) - 2px);--mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--sans: var(--font-ui);color-scheme:light dark}html[data-color-scheme=light]{color-scheme:light}html[data-color-scheme=system]{color-scheme:light dark}html[data-color-scheme=dark]{color-scheme:dark;--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35)}}:root{--color-bg: #ffffff;--color-surface: #f5f5f5;--color-surface-raised: #ffffff;--color-surface-overlay: #ffffff;--color-surface-sunken: #f5f5f5;--color-inline-code-bg: rgba(0, 0, 0, .03);--color-well: #f5f5f5;--color-surface-deep: #f5f5f5;--color-media-alpha-bg-1: color-mix(in srgb, var(--color-bg) 52%, var(--color-text) 48%);--color-media-alpha-bg-2: color-mix(in srgb, var(--color-bg) 42%, var(--color-text) 58%);--media-alpha-canvas: conic-gradient( var(--color-media-alpha-bg-1) 25%, var(--color-media-alpha-bg-2) 0 50%, var(--color-media-alpha-bg-1) 0 75%, var(--color-media-alpha-bg-2) 0 ) 0 0 / 16px 16px;--color-text: rgba(0, 0, 0, .9);--color-text-strong: #000000;--color-text-muted: rgba(0, 0, 0, .6);--color-text-faint: rgba(0, 0, 0, .45);--color-text-on-accent: #ffffff;--color-line: rgba(0, 0, 0, .13);--color-subtle: rgba(0, 0, 0, .05);--color-line-strong: rgba(0, 0, 0, .15);--color-scrim: rgba(0, 0, 0, .4);--color-scrim-strong: rgba(0, 0, 0, .6);--color-text-on-scrim: #ffffff;--color-selected: rgba(0, 0, 0, .05);--color-selected-hover: rgba(0, 0, 0, .08);--color-hover: rgba(0, 0, 0, .03);--color-sidebar-bg: #f9fbfc;--color-user-bubble-bg: #f5f5f5;--color-accent: #1783ff;--color-accent-hover: #167ff7;--color-accent-soft: #e8f3ff;--color-accent-bd: rgba(23, 131, 255, .25);--color-success: #0e7a38;--color-success-soft: #e7f6ee;--color-success-bd: #bfe3cc;--color-warning: #a9610a;--color-warning-soft: #fbf1e0;--color-warning-bd: #f0d9b8;--color-danger: #c0392b;--color-danger-soft: #fbeaea;--color-danger-bd: #f0cccc;--color-diff-add-bg: rgba(22, 196, 86, .25);--color-diff-del-bg: rgba(255, 56, 73, .25);--color-done: #8250df;--color-done-soft: #f3e8ff;--color-done-bd: #e0ccff;--color-info: #1783ff;--color-term-magenta: #8250df;--color-term-cyan: #1b7c83;--color-term-black: #24292f;--space-05: 2px;--space-1: 4px;--space-1-5: 6px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-2xl: 20px;--radius-composer: 32px;--corner-shape-composer: superellipse(1.5);--radius-menu-row: 25.3px;--corner-shape-menu: var(--corner-shape-composer);--color-menu-bg-frost: color-mix(in srgb, var(--color-bg) 70%, transparent);--color-menu-scrollbar: color-mix(in srgb, var(--color-text) 16%, transparent);--color-menu-scrollbar-hover: color-mix(in srgb, var(--color-text) 48%, transparent);--radius-full: 999px;--menu-scroll-fade: var(--space-5);--menu-row-hug: var(--space-1-5);--menu-rows-seam: 1px;--menu-row-gap-icon: 7px;--menu-row-padding-block: calc(var(--menu-row-hug) - var(--p-hairline));--menu-row-padding-inline: calc(var(--space-4) - var(--space-3) + var(--menu-row-hug) - var(--p-hairline));--menu-row-touch-padding-block: 11px;--menu-scrollbar-width: 3px;--menu-scrollbar-edge: calc(var(--menu-row-hug) + var(--p-hairline) - var(--menu-scrollbar-width));--menu-scrollbar-track-inset: calc(var(--radius-composer) - var(--space-1-5));--menu-scrollbar-thumb-min: 24px;--att-chip-pad-left: 5px;--wm-x-size: calc(var(--p-ic-sm) + var(--space-1));--wm-x-ring: var(--space-1-5);--z-base: 0;--z-raised: 1;--z-sticky: 100;--z-dropdown: 200;--z-overlay: 300;--z-modal: 400;--z-modal-dropdown: 500;--z-toast: 600;--z-tooltip: 650;--z-max: 9999;--shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);--shadow-menu: 0 6px 18px lch(0% 0 0 / .02), 0 3px 9px lch(0% 0 0 / .04), 0 1px 1px lch(0% 0 0 / .04);--color-menu-bg: rgba(255, 255, 255, .95);--p-menu-backdrop: blur(24px) saturate(1.8);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .05);--shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 4px 10px rgba(16, 24, 40, .08);--shadow-xl: 0 24px 64px rgba(16, 24, 40, .18), 0 8px 20px rgba(16, 24, 40, .1);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-in-out: cubic-bezier(.4, 0, .2, 1);--duration-fast: .12s;--duration-base: .16s;--duration-slow: .26s;--duration-hover-intent: .25s;--duration-flash: 1.2s;--motion-panel-shift: 2px;--motion-panel-scale: .97;--color-composer-bg: #ffffff;--color-composer-line: rgba(0, 0, 0, .13);--color-composer-focus-line: rgba(0, 0, 0, .25);--color-send-bg: rgba(0, 0, 0, .9);--color-send-bg-hover: #252525;--color-send-icon: #ffffff;--color-stop-glyph: var(--color-danger);--color-send-bg-disabled: rgba(0, 0, 0, .05);--color-send-icon-disabled: rgba(0, 0, 0, .27);--opacity-send-disabled: 1;--shadow-send: 0 7px 16px -13px rgba(0, 0, 0, .38), 0 1px 2px rgba(0, 0, 0, .07);--shadow-send-hover: 0 8px 18px -13px rgba(0, 0, 0, .42), 0 1px 3px rgba(0, 0, 0, .09);--composer-send-icon-size: 28px;--font-ui-latin: "Schibsted Grotesk Variable", "Helvetica Neue", Arial;--font-ui: var(--font-ui-latin), "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-display: var(--font-ui);--font-kbd: "Schibsted Grotesk Variable", system-ui, sans-serif;--font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--text-2xs: calc(var(--ui-c1) - 1px);--text-xs: var(--ui-c1);--text-sm: calc(var(--ui-b2) - 1px);--text-base: var(--ui-b2);--text-lg: var(--ui-t2);--text-xl: var(--ui-t1);--text-2xl: var(--ui-t0);--leading-solid: 1;--leading-tight: 1.25;--leading-caption: 1.4;--leading-normal: 1.5;--leading-prose: 1.6;--leading-relaxed: 1.7;--weight-regular: 400;--weight-caption: 450;--weight-option-label: 475;--weight-medium: 500;--weight-ui-strong: 525;--weight-section-label: 600;--weight-semibold: 700;--ui-shift: calc(var(--base-font, 14px) - 14px);--md-shift: var(--ui-shift);--ui-t0: min(calc(20px + var(--ui-shift)), 24px);--ui-t1: min(calc(18px + var(--ui-shift)), 22px);--ui-t2: calc(16px + var(--ui-shift));--ui-b1: calc(15px + var(--ui-shift));--ui-b2: calc(14px + var(--ui-shift));--ui-c1: calc(12px + var(--ui-shift));--ui-c2: calc(10px + var(--ui-shift));--md-h1: calc(22px + var(--md-shift));--md-h2: calc(20px + var(--md-shift));--md-h3: calc(18px + var(--md-shift));--md-b1: calc(14px + var(--md-shift));--md-b2: calc(13px + var(--md-shift));--md-b3: calc(13px + var(--md-shift));--p-focus-ring: 0 0 0 3px var(--color-accent-soft);--p-focus-ring-strong: 0 0 0 3px var(--color-accent-soft), 0 0 0 1px var(--color-accent);--p-selection: rgba(23, 131, 255, .2);--p-ic-sm: 14px;--p-ic-md: 16px;--p-ring-stroke: 1.5px;--p-ic-lg: 20px;--p-empty-ico: 28px;--p-hairline: .5px;--p-findring-w: 2px;--icon-button-sm: 26px;--touch-target-min: 44px;--p-chip-num: 20px;--p-sidebar-w: 264px;--p-content-max: 760px;--p-content-wide: 920px;--p-table-max: 1040px;--p-table-cell-max: 700px;--p-findbar-w: 340px;--p-dock-panel-h: 320px;--p-subagent-card-min: 180px;--p-slash-menu-h: 228px;--p-mention-menu-h: 208px;--p-add-menu-h: var(--p-slash-menu-h);--p-bp-sm: 640px;--p-bp-md: 980px}:root,html[data-font-scale=medium]{--base-font: 14px}html[data-font-scale=small]{--base-font: 12px}html[data-font-scale=large]{--base-font: 16px}html[data-font-scale=xlarge]{--base-font: 18px}.text-ui-t0{font-size:var(--ui-t0);line-height:round(calc(var(--ui-t0) * 1.4),1px)}.text-ui-t1{font-size:var(--ui-t1);line-height:round(calc(var(--ui-t1) * 1.44),1px)}.text-ui-t2{font-size:var(--ui-t2);line-height:round(calc(var(--ui-t2) * 1.5),1px)}.text-ui-b1{font-size:var(--ui-b1);line-height:round(calc(var(--ui-b1) * 1.47),1px)}.text-ui-b2{font-size:var(--ui-b2);line-height:round(calc(var(--ui-b2) * 1.42),1px)}.text-ui-c1{font-size:var(--ui-c1);line-height:round(calc(var(--ui-c1) * 1.5),1px)}.text-ui-c2{font-size:var(--ui-c2);line-height:round(calc(var(--ui-c2) * 1.4),1px)}.text-md-h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px)}.text-md-h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.text-md-h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.text-md-b1{font-size:var(--md-b1);line-height:round(calc(var(--md-b1) * 1.625),1px)}.text-md-b2{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px)}.text-md-b3{font-size:var(--md-b3);line-height:round(calc(var(--md-b3) * 1.57),1px)}html[data-color-scheme=dark]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-info: #1a88ff;--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-info: #1a88ff;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32)}}:root{--color-sidebar-tint: rgba(255, 255, 255, .4)}html[data-color-scheme=dark]{--color-sidebar-tint: rgba(0, 0, 0, .25)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-sidebar-tint: rgba(0, 0, 0, .25)}}:root{--color-search-match: #ffe066;--color-search-match-current: #ffc531}html[data-color-scheme=dark]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55)}}::highlight(kimi-transcript-search){background-color:var(--color-search-match)}::highlight(kimi-transcript-search-current){background-color:var(--color-search-match-current)}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/NotoSansSC_wght_-BkPpiACN.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:normal;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk_wght_-DIzGrWVg.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:italic;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk-Italic_wght_-DjkBGo1z.woff2) format("woff2-variations")}*,*:before,*:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;tab-size:4}body{margin:0}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit;margin:0}p,blockquote,dl,dd,figure,pre{margin:0}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}b,strong{font-weight:var(--weight-medium)}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{margin:0;padding:0;font-family:inherit;font-size:100%;line-height:inherit;color:inherit}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background:transparent;background-image:none}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block}img,video{max-width:100%;height:auto}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}table{border-collapse:collapse;border-color:inherit;text-indent:0}hr{height:0;color:inherit;border-top-width:1px}fieldset{margin:0;padding:0}legend{padding:0}dialog{padding:0}summary{display:list-item}[hidden]{display:none}@supports (interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}:root{--safe-top: env(safe-area-inset-top, 0px);--safe-right: env(safe-area-inset-right, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px)}.kw-icon{display:inline-block;flex:none;vertical-align:-.15em}code,pre,kbd,samp,tt{font-feature-settings:"liga" 0,"calt" 0,"ss01" 0;font-variant-ligatures:none}html,body,#app{height:100%;margin:0;background:var(--bg)}#app{position:fixed;inset:0}html,body{overflow:hidden}@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--color-text) 12%,transparent) transparent}}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:999px}*::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}*::-webkit-scrollbar-corner{background:transparent}body{font-family:var(--sans);color:var(--color-text);background:var(--bg);font-size:var(--ui-font-size);font-weight:400;line-height:1.6;font-optical-sizing:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto;font-synthesis:none;text-size-adjust:100%;-webkit-hyphens:none;hyphens:none}@media(max-width:640px){.backdrop{align-items:flex-end;justify-content:stretch}.backdrop .dialog{width:100%;max-width:100%;max-height:88vh;border-radius:var(--radius-xl) var(--radius-xl) 0 0;border-left:none;border-right:none;border-bottom:none;border-top:.5px solid var(--line);box-shadow:0 -10px 30px #0000002e;animation:kimi-sheet-up .26s cubic-bezier(.4,0,.2,1)}}@keyframes kimi-sheet-up{0%{transform:translateY(101%)}to{transform:translateY(0)}}.backdrop,.ob-backdrop{min-width:100vw!important;min-height:100vh!important;min-height:100dvh!important}@keyframes kimi-card-in{0%{opacity:0;transform:translateY(8px) scale(.995)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes kimi-check-in{0%{opacity:0;transform:scale(.4)}60%{opacity:1;transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-delay:0ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ch-eyes{animation:kimi-eye-look 16s ease-in-out infinite}.ch-eye{transform-box:fill-box;transform-origin:center;animation:kimi-eye-blink 11s ease-in-out infinite}@keyframes kimi-eye-look{0%,42%{transform:translate(0)}47%,53%{transform:translate(2px)}58%,80%{transform:translate(0)}84%,90%{transform:translate(-2px)}95%,to{transform:translate(0)}}@keyframes kimi-eye-blink{0%,94%,to{transform:scaleY(1)}96.5%,98%{transform:scaleY(.12)}}@media(prefers-reduced-motion:reduce){.ch-eyes,.ch-eye{animation:none}}.blink-now .ch-eye{animation:kimi-eye-blink-once .24s ease-in-out}@keyframes kimi-eye-blink-once{0%,to{transform:scaleY(1)}50%{transform:scaleY(.1)}}.md .markdown-renderer img{min-width:0;min-height:0}.app{font-size:var(--ui-font-size)}.md,.md .markdown-renderer,.md .markdown-renderer p,.md .markdown-renderer li,.u-bub,.u-bub .u-text,.a-msg .msg,.ph{font-size:var(--content-font-size)}.md .markdown-renderer blockquote,.md .markdown-renderer td,.md .markdown-renderer th{font-size:var(--md-b2)}.md,.u-bub .u-text,.a-msg .msg{text-autospace:normal}.md .code-block-container pre,.md .markstream-pre,.md .code-block-container pre code,.md .diff-pre code,.md .markdown-renderer :not(pre)>code,.md .markdown-renderer .inline-code,.a-msg code{font-size:var(--md-b3)}.md .markdown-renderer :is(h1,h2,h3,h4) :not(pre)>code,.md .markdown-renderer :is(h1,h2,h3,h4) .inline-code{font-size:.9em}.queue-item,.queue-text,.ctx-num,.model-pill,.perm-pill,.mode-pill,.compact-chip,.qcard,.qtext,.qopt,.qbtn,.srow,.srow-val{font-size:var(--ui-font-size)}.qopt-desc,.srow-label{font-size:var(--ui-font-size-sm)}.code-block-header,.code-block-header *,.diff-lang,.queue-label,.qopt-key,.qstep,.srow-sub{font-size:var(--ui-font-size-xs)}@media(max-width:640px){.u-bub .u-text,.a-msg .msg,.ph{font-size:max(16px,var(--ui-font-size-xl))}}:root{--anim-rive-spin: .4167s;--anim-leftbar: .5333s;--anim-leftbar-shrink: .2s}#bar-divider{transform-box:view-box;transform-origin:9.3px 12px;transition:transform var(--anim-leftbar-shrink) linear}svg:hover #bar-divider,button:hover #bar-divider{transform:translate(-1.5px) scaleY(.5)}#bar-arrow{transform-box:view-box;transform-origin:0 0;transform:translate(63.95833%,50.625%) scale(0)}svg:hover #bar-arrow,button:hover #bar-arrow{animation:leftbar-arrow var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow{0%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:0}3.125%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:1}15.625%{transform:translate(59.0125%,50.625%) scale(-1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}}#bar-arrow-expand{transform-box:view-box;transform-origin:0 0;transform:translate(52.08333%,50.625%) scale(0)}svg:hover #bar-arrow-expand,button:hover #bar-arrow-expand{animation:leftbar-arrow-expand var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow-expand{0%{transform:translate(37.02917%,50.625%) scale(.6);opacity:0}3.125%{transform:translate(37.02917%,50.625%) scale(.6);opacity:1}15.625%{transform:translate(40.9875%,50.625%) scale(1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(1);opacity:1}}#p1{transform-box:view-box;transform-origin:0 0}svg:hover #p1,button:hover #p1{animation:nc-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes nc-plus-spin{0%{transform:translate(11.5px,11.5px)}8%{transform:translate(11.501px,11.48px) rotate(1.1795deg) scale(1.02022)}12%{transform:translate(11.511px,11.46px) rotate(2.8374deg) scale(1.03026)}20%{transform:translate(11.562px,11.401px) rotate(8.8167deg) scale(1.05041)}24%{transform:translate(11.608px,11.361px) rotate(13.4726deg) scale(1.06017)}32%{transform:translate(11.751px,11.278px) rotate(25.9719deg) scale(1.08008)}48%{transform:translate(12.149px,11.222px) rotate(55.8418deg) scale(1.12025)}52%{transform:translate(12.235px,11.236px) rotate(62.0737deg) scale(1.12953)}60%{transform:translate(12.371px,11.276px) rotate(72.1167deg) scale(1.14954)}68%{transform:translate(12.446px,11.346px) rotate(79.3018deg) scale(1.12048)}76%{transform:translate(12.488px,11.403px) rotate(84.2633deg) scale(1.09046)}88%{transform:translate(12.509px,11.464px) rotate(88.52deg) scale(1.04535)}to{transform:translate(12.5px,11.5px) rotate(90deg)}}#af-p1{transform-box:view-box;transform-origin:18.4px 16.3px}svg:hover #af-p1,button:hover #af-p1{animation:folder-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes folder-plus-spin{0%{transform:none}8%{transform:rotate(1.1795deg) scale(1.02022)}12%{transform:rotate(2.8374deg) scale(1.03026)}20%{transform:rotate(8.8167deg) scale(1.05041)}24%{transform:rotate(13.4726deg) scale(1.06017)}32%{transform:rotate(25.9719deg) scale(1.08008)}48%{transform:rotate(55.8418deg) scale(1.12025)}52%{transform:rotate(62.0737deg) scale(1.12953)}60%{transform:rotate(72.1167deg) scale(1.14954)}68%{transform:rotate(79.3018deg) scale(1.12048)}76%{transform:rotate(84.2633deg) scale(1.09046)}88%{transform:rotate(88.52deg) scale(1.04535)}to{transform:rotate(90deg)}} diff --git a/apps/kimi-code/dist-web/assets/index-DBtc5buz.css b/apps/kimi-code/dist-web/assets/index-DBtc5buz.css new file mode 100644 index 000000000..0a5b33119 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/index-DBtc5buz.css @@ -0,0 +1 @@ +.ui-tip__bubble[data-v-93bacf6d]{position:fixed;z-index:var(--z-tooltip);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tip-lines);max-width:280px;padding:4px 8px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:1.35;overflow:hidden;overflow-wrap:anywhere;pointer-events:none;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.ui-tip__bubble.positioned[data-v-93bacf6d]{opacity:1}.ui-icon-button[data-v-2cbeca98]{display:inline-flex;align-items:center;justify-content:center;flex:none;padding:0;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.ui-icon-button[data-v-2cbeca98]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text)}.ui-icon-button[data-v-2cbeca98]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-icon-button[data-v-2cbeca98]:disabled{opacity:.5;cursor:not-allowed}.ui-icon-button--sm[data-v-2cbeca98]{width:var(--icon-button-sm);height:var(--icon-button-sm);border-radius:var(--radius-sm)}.ui-icon-button--md[data-v-2cbeca98]{width:32px;height:32px}.ui-icon-button--lg[data-v-2cbeca98]{width:44px;height:44px}.ui-icon-button[data-v-2cbeca98] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--sm[data-v-2cbeca98] svg{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-icon-button--lg[data-v-2cbeca98] svg{width:var(--p-ic-lg);height:var(--p-ic-lg)}.ui-action-toast-host[data-v-e67fcfa0]{position:fixed;top:calc(48px + var(--space-2));left:50%;translate:-50% 0;z-index:var(--z-toast);max-width:calc(100vw - 32px)}.ui-action-toast[data-v-e67fcfa0]{display:flex;align-items:center;gap:var(--space-2);padding:4px 6px 4px 14px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.45;color:var(--color-text);white-space:nowrap}.ui-action-toast__body[data-v-e67fcfa0]{min-width:0}.ui-action-toast__body button[data-v-e67fcfa0-s]{border:0;padding:0;margin-inline:var(--space-1);background:none;color:var(--color-accent);cursor:pointer;font:inherit}.ui-action-toast__body button[data-v-e67fcfa0-s]:hover{color:var(--color-accent-hover);text-decoration:underline}.ui-action-toast__body button[data-v-e67fcfa0-s]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--radius-xs)}.ui-action-toast__close[data-v-e67fcfa0]{flex:none}.ui-badge[data-v-d879fe18]{display:inline-flex;align-items:center;gap:6px;border-radius:var(--radius-full);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;border:.5px solid transparent}.ui-badge--md[data-v-d879fe18]{height:22px;padding:0 9px;font-size:var(--text-xs)}.ui-badge--sm[data-v-d879fe18]{height:18px;padding:0 7px;font-size:11px}.ui-badge__dot[data-v-d879fe18]{width:6px;height:6px;border-radius:var(--radius-full);background:currentColor;flex:none}.ui-badge--neutral[data-v-d879fe18]{background:var(--color-surface-sunken);color:var(--color-text-muted);border-color:var(--color-line)}.ui-badge--info[data-v-d879fe18]{background:var(--color-accent-soft);color:var(--color-accent-hover);border-color:var(--color-accent-bd)}.ui-badge--success[data-v-d879fe18]{background:var(--color-success-soft);color:var(--color-success);border-color:var(--color-success-bd)}.ui-badge--warning[data-v-d879fe18]{background:var(--color-warning-soft);color:var(--color-warning);border-color:var(--color-warning-bd)}.ui-badge--danger[data-v-d879fe18]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-badge--solid[data-v-d879fe18]{background:var(--color-text);color:var(--color-bg)}.ui-banner[data-v-6d739c6d]{display:flex;align-items:center;gap:10px;padding:10px 14px;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal)}.ui-banner__icon[data-v-6d739c6d]{display:inline-flex;flex:none}.ui-banner__icon svg[data-v-6d739c6d]{width:18px;height:18px}.ui-banner--info[data-v-6d739c6d]{background:var(--color-accent-soft);border-color:var(--color-accent-bd)}.ui-banner--warning[data-v-6d739c6d]{background:var(--color-warning-soft);border-color:var(--color-warning-bd)}.ui-banner--danger[data-v-6d739c6d]{background:var(--color-danger-soft);border-color:var(--color-danger-bd)}.ui-banner--info .ui-banner__icon[data-v-6d739c6d]{color:var(--color-accent)}.ui-banner--warning .ui-banner__icon[data-v-6d739c6d]{color:var(--color-warning)}.ui-banner--danger .ui-banner__icon[data-v-6d739c6d]{color:var(--color-danger)}.ui-spinner[data-v-476ed1b4]{display:inline-flex;flex:none;color:var(--color-accent)}.ui-spinner--xs[data-v-476ed1b4]{width:var(--p-ic-md);height:var(--p-ic-md)}.ui-spinner--xs .ui-spinner__track[data-v-476ed1b4],.ui-spinner--xs .ui-spinner__arc[data-v-476ed1b4]{r:10.875px;stroke-width:calc(var(--p-ring-stroke) * 1.5)}.ui-spinner--xs .ui-spinner__arc[data-v-476ed1b4]{stroke-dasharray:67.7 67.7;stroke-dashoffset:45.9}.ui-spinner--sm[data-v-476ed1b4]{width:14px;height:14px}.ui-spinner--md[data-v-476ed1b4]{width:18px;height:18px}.ui-spinner--lg[data-v-476ed1b4]{width:28px;height:28px}.ui-spinner__svg[data-v-476ed1b4]{width:100%;height:100%}.ui-spinner__track[data-v-476ed1b4]{fill:none;stroke:var(--color-line);stroke-width:2.2}.ui-spinner__arc[data-v-476ed1b4]{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-dasharray:56 56;stroke-dashoffset:38}.ui-button[data-v-01b5ec22]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);border:.5px solid transparent;border-radius:var(--radius-md);font-family:var(--font-ui);font-weight:var(--weight-medium);line-height:1;cursor:pointer;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.ui-button[data-v-01b5ec22]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ui-button[data-v-01b5ec22]:not(:disabled):active{transform:scale(.98)}.ui-button[data-v-01b5ec22]:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.ui-button--sm[data-v-01b5ec22]{height:30px;padding:0 var(--space-3);font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-button--md[data-v-01b5ec22]{height:36px;padding:0 var(--space-4);font-size:var(--text-base)}.ui-button--lg[data-v-01b5ec22]{height:42px;padding:0 var(--space-5);font-size:15px;border-radius:var(--radius-lg)}.ui-button__content[data-v-01b5ec22]{display:inline-flex;align-items:center;gap:var(--space-2)}.ui-button__content[data-v-01b5ec22] svg{flex:none}.ui-button__content[data-v-01b5ec22] svg:not([width]){width:1em;height:1em}.ui-button--primary[data-v-01b5ec22]{background:var(--color-accent);color:var(--color-text-on-accent);border-color:var(--color-accent);box-shadow:var(--shadow-xs)}.ui-button--primary[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ui-button--secondary[data-v-01b5ec22]{background:var(--color-surface-raised);color:var(--color-text);border-color:var(--color-line-strong);box-shadow:var(--shadow-xs)}.ui-button--secondary[data-v-01b5ec22]:not(:disabled):hover{border-color:var(--color-line-strong);background:var(--color-hover)}.ui-button--ghost[data-v-01b5ec22]{background:transparent;color:var(--color-text-muted);border-color:transparent}.ui-button--ghost[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-hover);color:var(--color-text-strong)}.ui-button--danger[data-v-01b5ec22]{background:var(--color-danger);color:var(--color-text-on-accent);border-color:var(--color-danger);box-shadow:var(--shadow-xs)}.ui-button--danger[data-v-01b5ec22]:not(:disabled):hover{filter:brightness(.96)}.ui-button--danger-soft[data-v-01b5ec22]{background:var(--color-danger-soft);color:var(--color-danger);border-color:var(--color-danger-bd)}.ui-button--danger-soft[data-v-01b5ec22]:not(:disabled):hover{background:var(--color-danger);color:var(--color-text-on-accent);border-color:var(--color-danger)}.ui-button.is-loading .ui-button__content[data-v-01b5ec22]{opacity:.7}.ui-button .ui-button__spinner[data-v-01b5ec22]{flex:none;color:inherit}.ui-button__spinner[data-v-01b5ec22] .ui-spinner__track{opacity:.35}.ui-card[data-v-fbd05138]{background:var(--color-surface);border:.5px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.ui-card.is-elevated[data-v-fbd05138]{box-shadow:var(--shadow-md);border-color:transparent}.ui-card__head[data-v-fbd05138]{display:flex;align-items:center;gap:var(--space-2);padding:10px 14px;border-bottom:.5px solid var(--color-line);background:var(--color-surface);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text)}.ui-card__body[data-v-fbd05138]{padding:14px;color:var(--color-text-muted)}.ui-card__foot[data-v-fbd05138]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding:10px 14px;border-top:.5px solid var(--color-line);background:var(--color-surface)}.ctx-ring[data-v-de787cf2]{width:16px;height:16px;flex:none;transform:rotate(-90deg)}.ctx-ring-track[data-v-de787cf2]{stroke:var(--line)}.ctx-ring-fill[data-v-de787cf2]{stroke:var(--color-accent);transition:stroke-dashoffset .3s ease,stroke .3s ease}.ui-dialog__overlay[data-v-ebbc1a68]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:#0d111747;animation:kimi-dialog-overlay-in-ebbc1a68 var(--duration-base) var(--ease-out)}@keyframes kimi-dialog-overlay-in-ebbc1a68{0%{opacity:0}to{opacity:1}}.ui-dialog[data-v-ebbc1a68]{max-height:calc(100vh - var(--space-8) * 2);display:flex;flex-direction:column;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-xl);box-shadow:var(--shadow-xl);outline:none;overflow:hidden;animation:kimi-card-in var(--duration-slow) var(--ease-out)}.ui-dialog--md[data-v-ebbc1a68]{width:min(440px,100%)}.ui-dialog--lg[data-v-ebbc1a68]{width:min(640px,100%)}.ui-dialog--xl[data-v-ebbc1a68]{width:min(var(--p-content-max),100%)}.ui-dialog--fixed-height[data-v-ebbc1a68]{height:min(680px,calc(100vh - var(--space-8) * 2))}.ui-dialog--grouped[data-v-ebbc1a68]{background:var(--color-bg)}.ui-dialog--flush .ui-dialog__body[data-v-ebbc1a68]{padding:0}.ui-dialog__head[data-v-ebbc1a68]{display:flex;align-items:flex-start;gap:var(--space-3);padding:20px 22px 14px}.ui-dialog__titles[data-v-ebbc1a68]{flex:1;min-width:0}.ui-dialog__title[data-v-ebbc1a68]{font-size:var(--text-lg);font-weight:500;color:var(--color-text);line-height:var(--leading-tight)}.ui-dialog__desc[data-v-ebbc1a68]{margin-top:4px;font-size:var(--text-base);color:var(--color-text-muted)}.ui-dialog__close[data-v-ebbc1a68]{flex:none;margin-top:-2px}.ui-dialog__body[data-v-ebbc1a68]{flex:1;min-height:0;padding:4px 22px 18px;color:var(--color-text);overflow:auto}.ui-dialog__foot[data-v-ebbc1a68]{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.ui-empty[data-v-6da80932]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-8) var(--space-4);text-align:center;color:var(--color-text-muted)}.ui-empty__icon[data-v-6da80932]{color:var(--color-text-faint)}.ui-empty__icon[data-v-6da80932] svg{width:48px;height:48px}.ui-empty__title[data-v-6da80932]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-empty__hint[data-v-6da80932]{font-size:var(--text-sm);color:var(--color-text-muted)}.ui-field[data-v-a8de5f7f]{display:flex;flex-direction:column;gap:6px}.ui-field__label[data-v-a8de5f7f]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.ui-field__hint[data-v-a8de5f7f]{font-size:var(--text-xs);color:var(--color-text-faint)}.ui-field__error[data-v-a8de5f7f]{font-size:var(--text-xs);color:var(--color-danger)}.ui-input[data-v-f1cdf732]{width:100%;border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-overlay);box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:0 var(--space-3);transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-input--md[data-v-f1cdf732]{height:38px}.ui-input--sm[data-v-f1cdf732]{height:32px;font-size:var(--text-sm);border-radius:var(--radius-sm)}.ui-input[data-v-f1cdf732]::placeholder{color:var(--color-text-faint)}.ui-input[data-v-f1cdf732]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-input[data-v-f1cdf732]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-input[data-v-f1cdf732]:disabled{opacity:.5;cursor:not-allowed}.ui-input[readonly][data-v-f1cdf732]{background:var(--color-surface-sunken)}.ui-input.has-error[data-v-f1cdf732]{border-color:var(--color-danger)}.ui-input.has-error[data-v-f1cdf732]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}.ui-kbd[data-v-04b30ce2]{display:inline-flex;align-items:center;gap:3px;flex:none}.ui-kbd__key[data-v-04b30ce2]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:.5px solid var(--color-line);border-radius:var(--radius-xs);background:transparent;color:inherit;font-family:var(--font-kbd);font-size:11px;line-height:1}.ui-menu[data-v-9be2c64a]{min-width:180px;padding:3.5px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);display:flex;flex-direction:column}.ui-menu-item[data-v-3427559a]{display:flex;align-items:center;gap:7px;width:100%;padding:5px 9px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-option-label);line-height:var(--leading-tight);text-align:left;cursor:pointer;transition:background var(--duration-base),color var(--duration-base)}.ui-menu-item[data-v-3427559a]:hover:not(:disabled):not(.is-active):not(.is-danger){background:var(--color-hover);color:var(--color-text-strong)}.ui-menu-item[data-v-3427559a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-menu-item[data-v-3427559a]:disabled{opacity:.5;cursor:not-allowed}.ui-menu-item.is-active[data-v-3427559a]{background:var(--color-hover);color:var(--color-text)}.ui-menu-item.is-danger[data-v-3427559a]{color:var(--color-danger)}.ui-menu-item.is-danger[data-v-3427559a]:hover:not(:disabled){background:var(--color-danger-soft)}.ui-menu-item[data-v-3427559a] svg{display:block;width:16px;height:16px;flex:none;color:var(--muted);transition:color var(--duration-base)}.ui-menu-item[data-v-3427559a]:hover:not(:disabled):not(.is-active):not(.is-danger) svg{color:var(--color-text-strong)}.ui-menu-item.is-active[data-v-3427559a] svg{color:var(--color-text)}.ui-menu-item.is-danger[data-v-3427559a] svg{color:var(--color-danger)}.ui-menu-item--lg[data-v-3427559a]{min-height:44px;padding:12px 14px;font-size:var(--text-sm)}.ui-menu-sep[data-v-3427559a]{height:1px;margin:4px 0;background:var(--color-line)}.ui-tip[data-v-414bd903]{display:contents}.ui-panel-header[data-v-2650aff3]{flex:none;display:flex;align-items:center;gap:var(--space-2);height:var(--panel-head-h, 48px);padding:0 var(--panel-head-inset, 11px) 0 var(--space-3);box-sizing:border-box;min-width:0;border-bottom:.5px solid var(--color-line);background:var(--color-surface-deep)}.ui-panel-header__title[data-v-2650aff3]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--weight-semibold) var(--ui-b2) var(--font-ui);color:var(--color-text)}.ui-panel-header__sub[data-v-2650aff3]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--ui-c1) var(--font-mono);color:var(--color-text-muted)}.ui-panel-header__close[data-v-2650aff3]{flex:none;margin-left:auto}.ui-panel-header.wrap[data-v-2650aff3]{flex-wrap:wrap;height:auto;min-height:var(--panel-head-h, 48px);padding-top:3px;padding-bottom:3px;gap:4px 6px}.ui-panel-header.wrap .ui-panel-header__close[data-v-2650aff3]{margin-left:0}.ui-pill[data-v-fe6a2873]{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:.5px solid transparent;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:default;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}button.ui-pill[data-v-fe6a2873]{cursor:pointer}button.ui-pill[data-v-fe6a2873]:hover:not(:disabled){background:var(--color-hover);color:var(--color-text-strong)}button.ui-pill[data-v-fe6a2873]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}button.ui-pill[data-v-fe6a2873]:disabled{opacity:.5;cursor:not-allowed}.ui-pill.is-active[data-v-fe6a2873]{background:var(--color-accent-soft);color:var(--color-accent)}.ui-pill[data-v-fe6a2873] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);flex:none;color:var(--color-text-faint)}.ui-scroll-area[data-v-9c504ebc]{position:relative;min-width:0;min-height:0;overflow:hidden}.ui-scroll-area__viewport[data-v-9c504ebc]{width:100%;height:100%;overscroll-behavior:contain;scrollbar-width:none}.ui-scroll-area__viewport[data-v-9c504ebc]::-webkit-scrollbar{display:none}.ui-scroll-area__viewport[data-v-9c504ebc]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ui-scroll-area__bar[data-v-9c504ebc]{position:absolute;z-index:3;opacity:0;pointer-events:none;touch-action:none;transition:opacity var(--duration-base) var(--ease-out)}.ui-scroll-area__bar.is-visible[data-v-9c504ebc]{opacity:1;pointer-events:auto}.ui-scroll-area__bar--vertical[data-v-9c504ebc]{inset:2px 2px 2px auto;width:10px}.ui-scroll-area__bar--horizontal[data-v-9c504ebc]{inset:auto 2px 2px;height:10px}.ui-scroll-area__thumb[data-v-9c504ebc]{position:absolute;display:block;border-radius:999px;background:color-mix(in srgb,var(--color-text-muted) 62%,transparent);transition:background var(--duration-fast) var(--ease-out),width var(--duration-fast) var(--ease-out),height var(--duration-fast) var(--ease-out)}.ui-scroll-area__bar--vertical .ui-scroll-area__thumb[data-v-9c504ebc]{right:1px;width:4px}.ui-scroll-area__bar--horizontal .ui-scroll-area__thumb[data-v-9c504ebc]{bottom:1px;height:4px}.ui-scroll-area__bar:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__thumb[data-v-9c504ebc]:active{background:color-mix(in srgb,var(--color-text-muted) 82%,transparent)}.ui-scroll-area__bar--vertical:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__bar--vertical .ui-scroll-area__thumb[data-v-9c504ebc]:active{width:6px}.ui-scroll-area__bar--horizontal:hover .ui-scroll-area__thumb[data-v-9c504ebc],.ui-scroll-area__bar--horizontal .ui-scroll-area__thumb[data-v-9c504ebc]:active{height:6px}.ui-seg[data-v-b09ef1d1]{position:relative;display:inline-flex;gap:2px;padding:2px;background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md)}.ui-seg__indicator[data-v-b09ef1d1]{position:absolute;top:0;left:0;z-index:0;border-radius:var(--radius-sm);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);opacity:0;pointer-events:none;transition:transform var(--duration-base) var(--ease-out),width var(--duration-base) var(--ease-out),height var(--duration-base) var(--ease-out),opacity var(--duration-fast) var(--ease-out)}.ui-seg__indicator.is-ready[data-v-b09ef1d1]{opacity:1}.ui-seg__item[data-v-b09ef1d1]{position:relative;z-index:1;display:inline-flex;align-items:center;gap:var(--space-1);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-weight:var(--weight-medium);cursor:pointer;line-height:1;white-space:nowrap;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-seg__swatch[data-v-b09ef1d1]{width:7px;height:7px;border:.5px solid color-mix(in srgb,currentColor 22%,transparent);border-radius:50%;flex:none}.ui-seg__icon[data-v-b09ef1d1]{flex:none}.ui-seg--md .ui-seg__item[data-v-b09ef1d1]{padding:5px var(--space-3);font-size:var(--text-sm)}.ui-seg--sm .ui-seg__item[data-v-b09ef1d1]{height:24px;padding:0 var(--space-2);font-size:var(--text-sm)}.ui-seg--xs .ui-seg__item[data-v-b09ef1d1]{height:20px;padding:0 var(--space-2);font-size:var(--text-xs)}.ui-seg__item[data-v-b09ef1d1]:hover:not(.is-on){color:var(--color-text)}.ui-seg__item.is-on[data-v-b09ef1d1]{color:var(--color-text)}.ui-seg__item[data-v-b09ef1d1]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-select[data-v-63f5dcbc]{position:relative;width:100%;font-family:var(--font-ui)}.ui-select.is-open[data-v-63f5dcbc]{z-index:var(--z-dropdown)}.ui-select__trigger[data-v-63f5dcbc]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:100%;padding:0 var(--space-3);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out)}.ui-select--md[data-v-63f5dcbc]{height:38px}.ui-select--sm[data-v-63f5dcbc]{height:32px}.ui-select--sm .ui-select__trigger[data-v-63f5dcbc]{font-size:var(--text-sm)}.ui-select__trigger[data-v-63f5dcbc]:hover:not(:disabled){border-color:var(--color-line-strong)}.ui-select__trigger[data-v-63f5dcbc]:focus-visible,.ui-select.is-open .ui-select__trigger[data-v-63f5dcbc]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-select.has-error .ui-select__trigger[data-v-63f5dcbc]{border-color:var(--color-danger)}.ui-select.has-error .ui-select__trigger[data-v-63f5dcbc]:focus-visible{box-shadow:0 0 0 3px var(--color-danger-soft)}.ui-select__value[data-v-63f5dcbc]{min-width:0;flex:1;display:flex;align-items:center;gap:var(--space-2);overflow:hidden;white-space:nowrap}.ui-select__value-text[data-v-63f5dcbc]{min-width:0;overflow:hidden;text-overflow:ellipsis}.ui-select__value.is-placeholder[data-v-63f5dcbc]{color:var(--color-text-faint)}.ui-select__icon[data-v-63f5dcbc]{flex:none;width:14px;height:14px;border-radius:3px}.ui-select__icon--option[data-v-63f5dcbc]{width:16px;height:16px;border-radius:4px}.ui-select__chevron[data-v-63f5dcbc]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-base) var(--ease-out)}.ui-select.is-open .ui-select__chevron[data-v-63f5dcbc]{transform:rotate(180deg)}.ui-select.is-disabled[data-v-63f5dcbc]{opacity:.5}.ui-select.is-disabled .ui-select__trigger[data-v-63f5dcbc]{cursor:not-allowed}.ui-select__menu[data-v-63f5dcbc]{position:absolute;z-index:var(--z-dropdown);top:calc(100% + var(--space-1));left:0;width:100%;max-height:260px;overflow-y:auto;padding:var(--space-1);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.ui-select__group[data-v-63f5dcbc]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ui-select__option[data-v-63f5dcbc]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.ui-select__option.is-active[data-v-63f5dcbc]{background:var(--color-hover);color:var(--color-text-strong)}.ui-select__option[data-v-63f5dcbc]:disabled{opacity:.45;cursor:not-allowed}.ui-select__check[data-v-63f5dcbc]{flex:none;color:transparent}.ui-select__option.is-selected .ui-select__check[data-v-63f5dcbc]{color:var(--color-accent)}.kw-dot[data-v-390a778a]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-text-faint);flex:none}.kw-dot--ok[data-v-390a778a]{background:var(--color-success)}.kw-dot--error[data-v-390a778a]{background:var(--color-danger)}.kw-dot--suspended[data-v-390a778a]{background:var(--color-warning)}.kw-dot--running[data-v-390a778a]{background:var(--color-accent);position:relative}.kw-dot--running[data-v-390a778a]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:color-mix(in srgb,var(--color-accent) 40%,transparent);animation:kw-dot-pulse-390a778a 1.4s var(--ease-out) infinite}@keyframes kw-dot-pulse-390a778a{0%{transform:scale(1);opacity:1}to{transform:scale(2.7);opacity:0}}.ui-switch[data-v-2fc56545]{position:relative;width:36px;height:20px;flex:none;padding:0;border:.5px solid var(--color-line-strong);border-radius:var(--radius-full);background:var(--color-line-strong);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ui-switch.is-on[data-v-2fc56545]{background:var(--color-accent)}.ui-switch[data-v-2fc56545]:disabled{opacity:.5;cursor:not-allowed}.ui-switch[data-v-2fc56545]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ui-switch__thumb[data-v-2fc56545]{position:absolute;top:1.5px;left:1.5px;width:16px;height:16px;border-radius:var(--radius-full);background:var(--color-text-on-accent);box-shadow:var(--shadow-xs);transform-origin:left center;transition:transform var(--duration-base) var(--ease-out)}.ui-switch:not(:disabled):hover .ui-switch__thumb[data-v-2fc56545]{transform:scaleX(1.125)}.ui-switch.is-on .ui-switch__thumb[data-v-2fc56545]{transform:translate(16px);transform-origin:right center}.ui-switch.is-on:not(:disabled):hover .ui-switch__thumb[data-v-2fc56545]{transform:translate(16px) scaleX(1.125)}.ui-textarea[data-v-07cc9fb9]{width:100%;min-height:84px;resize:vertical;border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-surface-overlay);box-shadow:var(--shadow-xs);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:var(--leading-normal);padding:10px 12px;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.ui-textarea[data-v-07cc9fb9]::placeholder{color:var(--color-text-faint)}.ui-textarea.no-resize[data-v-07cc9fb9]{resize:none}.ui-textarea[data-v-07cc9fb9]:hover:not(:disabled):not(:focus){border-color:var(--color-line-strong)}.ui-textarea[data-v-07cc9fb9]:focus{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.ui-textarea[data-v-07cc9fb9]:disabled{opacity:.5;cursor:not-allowed}.ui-textarea[readonly][data-v-07cc9fb9]{background:var(--color-surface-sunken)}.ui-textarea.has-error[data-v-07cc9fb9]{border-color:var(--color-danger)}.ui-textarea.has-error[data-v-07cc9fb9]:focus{box-shadow:0 0 0 3px var(--color-danger-soft)}.ui-toast[data-v-62bc76d1]{display:flex;align-items:flex-start;gap:11px;width:360px;max-width:100%;padding:13px 14px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);font-family:var(--font-ui);line-height:1.45}.ui-toast__icon[data-v-62bc76d1]{flex:none;width:20px;height:20px;margin-top:1px;border-radius:var(--radius-full);display:grid;place-items:center;background:var(--color-accent-soft);color:var(--color-accent)}.ui-toast__icon svg[data-v-62bc76d1]{width:12px;height:12px}.ui-toast--success .ui-toast__icon[data-v-62bc76d1]{background:var(--color-success-soft);color:var(--color-success)}.ui-toast--warning .ui-toast__icon[data-v-62bc76d1]{background:var(--color-warning-soft);color:var(--color-warning)}.ui-toast--danger .ui-toast__icon[data-v-62bc76d1]{background:var(--color-danger-soft);color:var(--color-danger)}.ui-toast--danger[data-v-62bc76d1]{border-color:color-mix(in srgb,var(--color-danger) 35%,transparent)}.ui-toast__body[data-v-62bc76d1]{flex:1;min-width:0}.ui-toast__title[data-v-62bc76d1]{font-size:var(--text-base);font-weight:500;color:var(--color-text);overflow-wrap:anywhere}.ui-toast__msg[data-v-62bc76d1]{margin-top:2px;font-size:var(--text-sm);color:var(--color-text-muted);overflow-wrap:anywhere}.ui-toast--danger .ui-toast__msg[data-v-62bc76d1]{color:var(--color-danger)}.ui-toast__close[data-v-62bc76d1]{flex:none;margin:-3px -4px 0 0}.sd-search[data-v-5bf43f78]{position:relative;margin:0 22px;padding-bottom:var(--space-1)}.sd-search[data-v-5bf43f78] .ui-input{padding-right:30px}.search-clear[data-v-5bf43f78]{position:absolute;top:0;bottom:var(--space-1);right:var(--space-2);margin-block:auto;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-hover);color:var(--color-text-faint);cursor:pointer;visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast),background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.search-clear.is-on[data-v-5bf43f78]{visibility:visible;opacity:1}.search-clear[data-v-5bf43f78]:hover{background:var(--color-selected);color:var(--color-text-muted)}.search-clear[data-v-5bf43f78]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}@media(prefers-reduced-motion:reduce){.search-clear[data-v-5bf43f78]{transition:none}}.sd-body[data-v-5bf43f78]{height:100%;min-height:0;display:flex;flex-direction:column;gap:var(--space-2);padding-top:4px}.sd-list[data-v-5bf43f78]{flex:1;min-height:0;overflow-y:auto;padding:var(--space-1) var(--space-2);--sd-gutter: var(--p-ic-md);--sd-gap: var(--space-2)}.sd-section[data-v-5bf43f78]{display:flex;align-items:baseline;gap:var(--space-1);padding:var(--space-2) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.sd-section-count[data-v-5bf43f78]{font-weight:var(--weight-regular)}.sd-section[data-v-5bf43f78]:first-child{padding-top:var(--space-1)}.sd-section[data-v-5bf43f78]:not(:first-child){margin-top:var(--space-1);border-top:var(--p-hairline) solid var(--color-line)}.sd-row[data-v-5bf43f78]{display:flex;flex-direction:column;gap:2px;width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:none;cursor:pointer;text-align:left;font-family:var(--font-ui);color:var(--color-text)}.sd-row[data-v-5bf43f78]:hover{background:var(--color-hover)}.sd-row.on[data-v-5bf43f78]{background:var(--color-selected)}.sd-row.active .sd-title[data-v-5bf43f78]{color:var(--color-accent-hover)}.sd-row-ws[data-v-5bf43f78]{flex-direction:row;align-items:center;gap:var(--sd-gap)}.sd-folder[data-v-5bf43f78]{flex:none;width:var(--sd-gutter);color:var(--color-text-muted)}.sd-ws-name[data-v-5bf43f78]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.sd-ws-path[data-v-5bf43f78]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;font-size:var(--text-xs);color:var(--color-text-faint)}.sd-line1[data-v-5bf43f78],.sd-line2[data-v-5bf43f78]{padding-left:calc(var(--sd-gutter) + var(--sd-gap))}.sd-line1[data-v-5bf43f78]{display:flex;align-items:baseline;gap:var(--space-2);min-width:0}.sd-title[data-v-5bf43f78]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.sd-time[data-v-5bf43f78]{flex:none;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.sd-line2[data-v-5bf43f78]{display:flex;align-items:center;gap:var(--space-1);min-width:0;font-size:var(--text-xs);color:var(--color-text-muted)}.sd-meta-ws[data-v-5bf43f78]{flex:none;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-meta-sep[data-v-5bf43f78]{color:var(--color-text-faint)}.sd-meta-snippet[data-v-5bf43f78]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sd-title[data-v-5bf43f78] mark,.sd-ws-name[data-v-5bf43f78] mark{background:var(--color-accent-soft);color:inherit;font-weight:var(--weight-semibold);border-radius:var(--radius-xs);padding:0 1px}.sd-line2[data-v-5bf43f78] mark,.sd-ws-path[data-v-5bf43f78] mark{background:var(--color-accent-soft);color:var(--color-text);font-weight:var(--weight-medium);border-radius:var(--radius-xs);padding:0 1px}.sd-empty[data-v-5bf43f78]{height:100%;display:flex;align-items:center;justify-content:center}.sd-foot[data-v-5bf43f78]{flex:none;display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-4);border-top:.5px solid var(--color-line);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.sd-hint[data-v-5bf43f78]{display:inline-flex;align-items:center;gap:var(--space-1)}.sd-dot[data-v-5bf43f78]{margin:0 var(--space-1)}.user-menu-trigger[data-v-ba83fe5b]{display:flex;align-items:center;gap:var(--sb-gap);width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);cursor:pointer;text-align:left}.user-menu-trigger[data-v-ba83fe5b]:hover,.user-menu-trigger[aria-expanded=true][data-v-ba83fe5b]{background:var(--sb-hover)}.user-menu-trigger[data-v-ba83fe5b]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.user-menu-trigger svg[data-v-ba83fe5b]{flex:none}.user-menu-avatar[data-v-ba83fe5b]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex:none;border-radius:var(--radius-full);background:var(--color-surface-sunken);color:var(--color-text-muted);overflow:hidden}.user-menu-avatar img[data-v-ba83fe5b]{width:100%;height:100%;object-fit:cover}.user-menu-name[data-v-ba83fe5b]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-menu[data-v-ba83fe5b]{position:fixed;top:0;left:0;z-index:var(--z-dropdown);max-height:calc(100vh - 16px);overflow-y:auto;overflow-x:hidden}.user-submenu[data-v-ba83fe5b]{position:fixed;top:0;left:0;z-index:var(--z-dropdown);width:max-content;max-height:calc(100vh - 16px);overflow-y:auto;overflow-x:hidden}.menu-pop-enter-active[data-v-ba83fe5b]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-ba83fe5b]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-ba83fe5b],.menu-pop-leave-to[data-v-ba83fe5b]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, 2px))}.user-menu .ui-menu-item[data-v-ba83fe5b],.user-submenu .ui-menu-item[data-v-ba83fe5b]{padding:var(--space-2) 9px;font-size:var(--text-base)}.user-menu-usage[data-v-ba83fe5b]{display:flex;flex-direction:column;gap:var(--space-1-5);padding:var(--space-2) var(--space-3)}.user-menu-usage-state[data-v-ba83fe5b]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-1) 0;color:var(--color-text-muted);font-size:var(--text-base)}.user-menu-usage-error[data-v-ba83fe5b]{flex:1;min-width:0}.user-menu-usage-empty[data-v-ba83fe5b]{color:var(--color-text-faint)}.user-menu-usage-row[data-v-ba83fe5b]{display:flex;align-items:flex-start;gap:var(--space-3)}.user-menu-usage-main[data-v-ba83fe5b]{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-05)}.user-menu-usage-label[data-v-ba83fe5b]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);color:var(--color-text)}.user-menu-usage-hint[data-v-ba83fe5b]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);color:var(--color-text-faint)}.user-menu-usage-value[data-v-ba83fe5b]{flex:none;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);font-variant-numeric:tabular-nums;white-space:nowrap}.user-menu-usage-value.sev-warn[data-v-ba83fe5b]{color:var(--color-warning)}.user-menu-usage-value.sev-danger[data-v-ba83fe5b]{color:var(--color-danger)}.user-menu-item-label[data-v-ba83fe5b]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-menu-login-label[data-v-ba83fe5b]{color:var(--color-accent)}.user-menu-row-value[data-v-ba83fe5b]{flex:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);color:var(--color-text-faint)}.emoji-picker[data-v-b0dbbae4]{--ep-cell: 26px}.ep-search[data-v-b0dbbae4]{display:flex;align-items:center;gap:var(--space-2);margin:var(--space-1);padding:0 var(--space-2);border-radius:var(--radius-sm);color:var(--color-text-faint)}.ep-search[data-v-b0dbbae4]:hover,.ep-search[data-v-b0dbbae4]:focus-within{background:var(--color-surface-sunken)}.ep-input[data-v-b0dbbae4]{flex:1;min-width:0;height:calc(var(--ep-cell) + 2px);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;outline:none}.ep-input[data-v-b0dbbae4]::placeholder{color:var(--color-text-faint)}.ep-scroll[data-v-b0dbbae4]{max-height:calc(var(--ep-cell) * 10 + var(--space-1));overflow-y:auto;padding:0 var(--space-1)}.ep-label[data-v-b0dbbae4]{padding:var(--space-1) var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--color-text-faint);user-select:none}.ep-grid[data-v-b0dbbae4]{display:grid;grid-template-columns:repeat(8,var(--ep-cell));gap:var(--space-1);padding-bottom:var(--space-1)}.ep-e[data-v-b0dbbae4]{height:var(--ep-cell);display:grid;place-items:center;padding:0;font-size:var(--text-lg);background:transparent;border:none;border-radius:var(--radius-xs);cursor:pointer}.ep-e[data-v-b0dbbae4]:hover{background:var(--color-hover)}.ep-e[data-v-b0dbbae4]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ep-e.sel[data-v-b0dbbae4]{background:var(--color-accent-soft)}.ep-empty[data-v-b0dbbae4]{padding:var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);text-align:center;user-select:none}.se[data-v-d577d143]{--se-pad-x: var(--space-2);display:block;margin:0;padding:8px var(--se-pad-x);border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);cursor:pointer;position:relative}.se[data-v-d577d143]:hover{background:var(--sb-hover, var(--color-hover));color:var(--color-text)}.se.on[data-v-d577d143]{background:var(--sb-selected, var(--color-selected));color:var(--color-text)}.row[data-v-d577d143]{display:flex;align-items:center;gap:var(--sb-gap, 6px);min-width:0}.left[data-v-d577d143]{display:flex;align-items:center;flex:1;min-width:0}.lead[data-v-d577d143]{width:var(--sb-gutter, 16px);flex:none;display:inline-flex;align-items:center;justify-content:center}.unread-dot[data-v-d577d143]{width:7px;height:7px;border-radius:var(--radius-full);background:var(--color-accent)}.ha .complete-btn[data-v-d577d143]:hover{color:var(--color-success)}.t[data-v-d577d143]{--sb-fade: 0px;--sb-fade-len: 16px;color:inherit;font-size:var(--ui-font-size-sm);font-weight:450;line-height:var(--leading-tight);user-select:none;flex:1;min-width:0;overflow:hidden;text-overflow:clip;white-space:nowrap;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)));mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)))}.se:hover .t[data-v-d577d143]{--sb-fade: 34px;--sb-fade-len: 26px}.se:has(.ui-badge):hover .t[data-v-d577d143]{--sb-fade: 0px;--sb-fade-len: 16px}.t .emoji[data-v-d577d143]{padding:0;background:transparent;border:none;cursor:pointer}.t .emoji[data-v-d577d143]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sub[data-v-d577d143]{display:flex;align-items:center;gap:var(--space-1);margin:var(--space-1) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-tight);user-select:none}.sub-icon[data-v-d577d143]{flex:none;color:var(--color-text-muted)}.pr[data-v-d577d143]{display:inline-flex;align-items:center;gap:var(--space-05);flex:none;padding:1px var(--space-1);border:.5px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-2xs);font-weight:var(--weight-medium);line-height:1;cursor:pointer}.pr[data-v-d577d143]:hover{border-color:var(--color-line-strong)}.pr[data-v-d577d143]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.pr--open[data-v-d577d143],.pr--open[data-v-d577d143]:hover{background:var(--color-success-soft);border-color:var(--color-success-bd);color:var(--color-success)}.pr--merged[data-v-d577d143],.pr--merged[data-v-d577d143]:hover{background:var(--color-done-soft);border-color:var(--color-done-bd);color:var(--color-done)}.sub-text[data-v-d577d143]{flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ts[data-v-d577d143]{color:var(--color-text-faint);font-size:var(--text-xs);font-family:var(--font-ui);font-weight:475;line-height:var(--leading-tight);font-variant-numeric:tabular-nums;text-align:right}.act[data-v-d577d143]{position:relative;flex:none;align-self:stretch;display:inline-flex;align-items:center;justify-content:flex-end;gap:var(--sb-gap, 6px);min-width:26px}.act .ha[data-v-d577d143]{position:absolute;top:0;bottom:0;right:calc(3px - var(--se-pad-x));display:inline-flex;align-items:center;gap:2px;opacity:0;visibility:hidden;border-radius:var(--radius-sm);transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.se:hover .ha[data-v-d577d143]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.act .ts[data-v-d577d143]{transition:opacity var(--duration-fast) var(--ease-out)}.se:hover .act .ts[data-v-d577d143]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.act .st[data-v-d577d143]{display:inline-flex;align-items:center;transition:opacity var(--duration-fast) var(--ease-out)}.se:hover .act .st[data-v-d577d143]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.act .ui-badge[data-v-d577d143]{transition:opacity var(--duration-fast) var(--ease-out)}.se:hover .act .ui-badge[data-v-d577d143]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.menu[data-v-d577d143],.picker[data-v-d577d143]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-pop-enter-active[data-v-d577d143]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-d577d143]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-d577d143],.menu-pop-leave-to[data-v-d577d143]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}.menu-time[data-v-d577d143]{padding:6px 10px;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);cursor:default;user-select:text}.rename-wrap[data-v-d577d143]{position:relative;display:flex;align-items:center;flex:1;min-width:0;background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs)}.rename-input[data-v-d577d143]{flex:1;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);background:transparent;border:none;padding:1px 4px;outline:none;min-width:0}.rename-wrap.generating .rename-input[data-v-d577d143]{visibility:hidden}.gen-dots[data-v-d577d143]{position:absolute;left:6px;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:3px;pointer-events:none}.gen-dots i[data-v-d577d143]{width:3px;height:3px;border-radius:var(--radius-full, 50%);background:var(--color-accent);animation:gen-title-dot-d577d143 .9s var(--ease-out) infinite}.gen-dots i[data-v-d577d143]:nth-child(2){animation-delay:.15s}.gen-dots i[data-v-d577d143]:nth-child(3){animation-delay:.3s}@keyframes gen-title-dot-d577d143{0%,60%,to{opacity:.3;transform:translate(0)}30%{opacity:1;transform:translate(2px)}}.gen-title-btn[data-v-d577d143]{flex:none;margin-right:1px;color:var(--color-accent)}.gen-title-btn[data-v-d577d143]:hover:not(:disabled){color:var(--color-accent-hover);background:transparent}.sessions .se[data-v-d577d143]{margin:0;border-radius:var(--radius-sm);--se-pad-x: calc(var(--sb-pad-x, 20px) - var(--sb-inset, 12px));padding:8px var(--se-pad-x)}.sessions .se.flat+.se.flat[data-v-d577d143]{margin-top:var(--space-05)}.sessions .se .rename-input[data-v-d577d143]{border-radius:var(--radius-sm);font-family:var(--sans)}.group.dragging[data-v-6756fbf6]{opacity:.45}.group.pinned-drag-active[data-v-6756fbf6],.group.pinned-drop-hover[data-v-6756fbf6]{border-radius:var(--radius-sm)}.group.pinned-drag-active[data-v-6756fbf6]{box-shadow:inset 0 0 0 1px var(--color-accent)}.group.pinned-drop-hover[data-v-6756fbf6]{box-shadow:inset 0 0 0 2px var(--color-accent)}.group.pinned-drop-blocked[data-v-6756fbf6],.group.pinned-drop-blocked[data-v-6756fbf6] *{cursor:no-drop}.se-locate-flash[data-v-6756fbf6]{isolation:isolate}.se-locate-flash[data-v-6756fbf6]:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:var(--radius-sm);background:var(--color-accent-soft);pointer-events:none;animation:se-locate-fade-6756fbf6 var(--duration-flash) var(--ease-out) forwards}@keyframes se-locate-fade-6756fbf6{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.se-locate-flash[data-v-6756fbf6]:before{animation:none}}.group-sessions[data-v-6756fbf6]{height:auto;overflow:hidden;transition:height var(--duration-base) var(--ease-out)}.group-sessions.collapsed[data-v-6756fbf6]{height:0}.gh[data-v-6756fbf6]{display:flex;flex-direction:column;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text);user-select:none;position:relative;cursor:grab}.gh[data-v-6756fbf6]:active{cursor:grabbing}.gh[data-v-6756fbf6]:hover{background:var(--sb-hover, var(--color-hover))}.gh.on[data-v-6756fbf6]{background:var(--sb-selected, var(--color-selected))}.gh-top[data-v-6756fbf6]{position:relative;display:flex;align-items:center;gap:var(--sb-gap)}.gh-folder[data-v-6756fbf6]{flex:none;color:var(--color-text-muted)}.gh-name[data-v-6756fbf6]{font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text-muted);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.gh-actions[data-v-6756fbf6]{position:absolute;right:calc(3px - (var(--sb-pad-x) - var(--sb-inset)));top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:var(--space-1);padding-left:var(--space-1);border-radius:var(--radius-sm);isolation:isolate;opacity:0;pointer-events:none}.gh-name[data-v-6756fbf6]{--sb-fade: 0px;--sb-fade-len: 16px;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)));mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - var(--sb-fade) - var(--sb-fade-len)),transparent calc(100% - var(--sb-fade)))}.gh:hover .gh-name[data-v-6756fbf6],.gh:focus-within .gh-name[data-v-6756fbf6],.gh:has(.gh-actions.open) .gh-name[data-v-6756fbf6]{--sb-fade: 64px;--sb-fade-len: 26px}.gh-actions[data-v-6756fbf6]>*{position:relative;z-index:1}.gh:hover .gh-actions[data-v-6756fbf6],.gh:focus-within .gh-actions[data-v-6756fbf6],.gh-actions.open[data-v-6756fbf6]{opacity:1;pointer-events:auto}.gh-more.open[data-v-6756fbf6]{color:var(--color-text);background:var(--color-line)}.group-empty[data-v-6756fbf6]{padding:var(--space-1) var(--space-2) var(--space-1) calc(var(--sb-pad-x) - var(--sb-inset) + var(--sb-gutter) + var(--sb-gap));font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui);user-select:none}.show-more-row[data-v-6756fbf6]{display:flex;align-items:center;padding-left:calc(var(--sb-gutter) + var(--sb-gap))}.show-more[data-v-6756fbf6]{display:flex;align-items:center;gap:var(--sb-gap);margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));min-width:0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);text-align:left;cursor:pointer}.show-more[data-v-6756fbf6]:hover{background:var(--sb-hover, var(--color-hover))}.show-more[data-v-6756fbf6]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-sep[data-v-6756fbf6]{margin:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);user-select:none}.show-more-label[data-v-6756fbf6]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gh-rename[data-v-6756fbf6]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-regular);color:var(--color-text);background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none}.gh-rename[data-v-6756fbf6]{border-radius:var(--radius-sm);font-family:var(--sans)}.gh-add[data-v-6756fbf6]{color:var(--faint)}.gh-add[data-v-6756fbf6]:hover{color:var(--dim)}.pinned-label[data-v-d4e69bf4]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--faint);user-select:none}.pinned-title[data-v-d4e69bf4]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pinned-toggle[data-v-d4e69bf4]{color:var(--faint);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.pinned-label:hover .pinned-toggle[data-v-d4e69bf4],.pinned-label:focus-within .pinned-toggle[data-v-d4e69bf4],.pinned-toggle--on[data-v-d4e69bf4]{opacity:1}.pinned-toggle[data-v-d4e69bf4]:hover{color:var(--dim)}.pinned-toggle svg[data-v-d4e69bf4]{width:13px;height:13px}.se-locate-flash[data-v-d4e69bf4]{isolation:isolate}.se-locate-flash[data-v-d4e69bf4]:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:var(--radius-sm);background:var(--color-accent-soft);pointer-events:none;animation:se-locate-fade-d4e69bf4 var(--duration-flash) var(--ease-out) forwards}@keyframes se-locate-fade-d4e69bf4{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.se-locate-flash[data-v-d4e69bf4]:before{animation:none}}.pinned-rows[data-v-d4e69bf4]{max-height:40vh;overflow-y:auto}.pinned-rows[data-v-d4e69bf4]::-webkit-scrollbar{width:4px}.pinned-rows[data-v-d4e69bf4]::-webkit-scrollbar-track{background:transparent}.pinned-rows[data-v-d4e69bf4]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.pinned-rows[data-v-d4e69bf4]:hover::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.pinned-rows[data-v-d4e69bf4]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.pin-row.dragging[data-v-d4e69bf4]{opacity:.45}.pinned.drop-active[data-v-d4e69bf4]{border-radius:var(--radius-sm);box-shadow:inset 0 0 0 1px var(--color-accent)}.side[data-v-2d3d457d]{background:var(--color-sidebar-bg);display:flex;flex-direction:row;justify-content:flex-end;overflow:hidden;min-width:0;height:100%;transition:width .28s cubic-bezier(.4,0,.2,1),visibility .28s;--sb-inset: var(--space-2);--sb-pad-x: var(--space-4);--sb-gutter: 16px;--sb-gap: var(--space-2);--sb-hover: var(--color-hover);--sb-selected: color-mix(in srgb, var(--color-selected) 75%, transparent)}.side.no-anim[data-v-2d3d457d]{transition:none}.side.collapsed[data-v-2d3d457d]{visibility:hidden}.col[data-v-2d3d457d]{flex:none;min-width:0;display:flex;flex-direction:column;min-height:0;width:100%;box-sizing:border-box;border-right:.5px solid var(--line);container-type:inline-size;container-name:sidebar-col;position:relative}.ch[data-v-2d3d457d]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:var(--space-3);min-height:calc(26px + 2 * var(--space-3));width:100%;box-sizing:border-box}.side.macos-desktop .ch[data-v-2d3d457d]{padding-left:80px;-webkit-app-region:drag}.side.macos-desktop .ch-brand[data-v-2d3d457d]{display:none}.ch-logo[data-v-2d3d457d]{height:22px;width:32px;flex:none;display:block;cursor:pointer;user-select:none;touch-action:none;transition:transform .18s ease}.ch-logo[data-v-2d3d457d]:hover{transform:scale(1.08)}.ch-brand[data-v-2d3d457d]{display:flex;align-items:center;gap:8px;min-width:0;flex:1;user-select:none;touch-action:none}.ch-tail[data-v-2d3d457d]{display:flex;align-items:center;gap:var(--space-2);flex:none;min-width:0;margin-left:auto}.ch-name[data-v-2d3d457d]{font-size:var(--ui-font-size);font-weight:500;line-height:22px;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container sidebar-col (max-width: 250px){.ch-name[data-v-2d3d457d]{display:none}}.sidebar-actions[data-v-2d3d457d]{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 var(--space-2);padding:0 var(--sb-inset) var(--space-1);position:relative;z-index:1;background:var(--color-sidebar-bg)}.sessions-head[data-v-2d3d457d]{position:relative;z-index:1;padding:var(--space-3) var(--sb-inset) 0;border-bottom:.5px solid transparent;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out)}.sessions-head[data-v-2d3d457d]:after,.side-footer[data-v-2d3d457d]:before{content:"";position:absolute;left:0;right:0;height:13px;pointer-events:none;opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sessions-head[data-v-2d3d457d]:after{top:100%;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.5%,transparent),transparent 35%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1%,transparent),transparent 65%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) .75%,transparent),transparent);transition-duration:var(--duration-slow)}.sessions-head--scrolled[data-v-2d3d457d]{border-bottom-color:var(--line)}.sessions-head--scrolled[data-v-2d3d457d]:after{opacity:1}.btn-new-chat[data-v-2d3d457d]{grid-column:1 / -1;display:flex;align-items:center;gap:var(--sb-gap);width:100%;min-width:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);cursor:pointer;text-align:left}.sidebar-actions--has-workspace-action .btn-new-chat[data-v-2d3d457d]{grid-column:1}.btn-new-chat[data-v-2d3d457d]:hover{background:var(--sb-hover)}.btn-new-chat[data-v-2d3d457d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.btn-new-chat svg[data-v-2d3d457d]{flex:none}.btn-new-chat span[data-v-2d3d457d]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btn-new-chat[data-v-2d3d457d] .ui-kbd{margin-left:auto}.btn-new-chat[data-v-2d3d457d] .ui-kbd,.search[data-v-2d3d457d] .ui-kbd{opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.btn-new-chat[data-v-2d3d457d]:hover .ui-kbd,.btn-new-chat[data-v-2d3d457d]:focus-visible .ui-kbd,.search[data-v-2d3d457d]:hover .ui-kbd,.search[data-v-2d3d457d]:focus-visible .ui-kbd{opacity:1}.search[data-v-2d3d457d]{grid-column:1 / -1;display:flex;align-items:center;gap:var(--sb-gap);width:100%;margin:0;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.search[data-v-2d3d457d]:hover{background:var(--sb-hover)}.search[data-v-2d3d457d]:focus-visible{background:var(--sb-hover);color:var(--color-text);outline:2px solid var(--color-accent-bd);outline-offset:-2px}.search-icon[data-v-2d3d457d]{flex:none;transform:translateY(-.5px)}.search-input[data-v-2d3d457d]{flex:1;min-width:0;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-tabs[data-v-2d3d457d]{padding:var(--space-2) var(--sb-inset) 0}.status-seg[data-v-2d3d457d]{width:100%;display:flex}.status-seg[data-v-2d3d457d] .ui-seg__item{flex:1;min-width:0;justify-content:center;padding:0 var(--space-1);overflow:hidden}.ws-dir[data-v-2d3d457d]{display:block;padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);cursor:pointer;position:relative;user-select:none}.ws-dir[data-v-2d3d457d]:hover{background:var(--sb-hover, var(--color-hover))}.ws-dir.on[data-v-2d3d457d]{background:var(--sb-selected, var(--color-selected))}.ws-dir+.ws-dir[data-v-2d3d457d]{margin-top:var(--space-05)}.ws-dir-row[data-v-2d3d457d]{display:flex;align-items:center;gap:var(--sb-gap);min-width:0}.ws-dir-icon[data-v-2d3d457d]{flex:none;color:var(--color-text-muted)}.ws-dir-name[data-v-2d3d457d]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ws-dir-act[data-v-2d3d457d]{position:absolute;top:0;bottom:0;right:3px;display:inline-flex;align-items:center;opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.ws-dir-rename[data-v-2d3d457d]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);color:var(--color-text);background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-sm);padding:2px 5px;outline:none}.ws-dir:hover .ws-dir-act[data-v-2d3d457d],.ws-dir:focus-within .ws-dir-act[data-v-2d3d457d]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.ws-dir-sub[data-v-2d3d457d]{margin:var(--space-1) 0 0;color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-tight);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.ws-dir:hover .ws-dir-name[data-v-2d3d457d],.ws-dir:focus-within .ws-dir-name[data-v-2d3d457d],.ws-dir:hover .ws-dir-sub[data-v-2d3d457d],.ws-dir:focus-within .ws-dir-sub[data-v-2d3d457d]{margin-right:calc(var(--icon-button-sm) + var(--space-2))}.done-gh[data-v-2d3d457d]{display:flex;align-items:center;gap:var(--sb-gap);padding:8px calc(var(--sb-pad-x) - var(--sb-inset));border-radius:var(--radius-sm);font-family:var(--font-ui);color:var(--color-text);user-select:none;position:relative;cursor:pointer}.done-gh[data-v-2d3d457d]:hover{background:var(--sb-hover, var(--color-hover))}.done-gh-folder[data-v-2d3d457d]{flex:none;color:var(--color-text-muted)}.done-gh-name[data-v-2d3d457d]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text-muted);overflow:hidden;white-space:nowrap;text-overflow:clip;-webkit-mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent);mask-image:linear-gradient(to right,var(--color-text-strong) calc(100% - 16px),transparent)}.done-gh-count[data-v-2d3d457d]{flex:none;color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.done-gh-act[data-v-2d3d457d]{position:absolute;top:0;bottom:0;right:3px;display:inline-flex;align-items:center;opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.done-gh:hover .done-gh-act[data-v-2d3d457d],.done-gh:focus-within .done-gh-act[data-v-2d3d457d]{opacity:1;visibility:visible;transition:opacity var(--duration-fast) var(--ease-out)}.done-gh:hover .done-gh-count[data-v-2d3d457d],.done-gh:focus-within .done-gh-count[data-v-2d3d457d]{opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--ease-out),visibility 0s linear var(--duration-fast)}.sessions[data-v-2d3d457d]{flex:1;overflow-y:auto;padding:0 var(--sb-inset) var(--space-3);min-height:0}.sessions[data-v-2d3d457d]::-webkit-scrollbar{width:4px}.sessions[data-v-2d3d457d]::-webkit-scrollbar-track{background:transparent}.sessions[data-v-2d3d457d]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.sessions.scrolling[data-v-2d3d457d]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.sessions.scrolling[data-v-2d3d457d]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.side-footer[data-v-2d3d457d]{flex:none;position:relative;z-index:1;padding:var(--space-2) var(--sb-inset);border-top:.5px solid var(--line);background:var(--color-sidebar-bg)}.side-footer[data-v-2d3d457d]:before{bottom:100%;background:linear-gradient(to top,color-mix(in srgb,var(--color-text) 1.5%,transparent),transparent 35%),linear-gradient(to top,color-mix(in srgb,var(--color-text) 1%,transparent),transparent 65%),linear-gradient(to top,color-mix(in srgb,var(--color-text) .75%,transparent),transparent);transition-duration:var(--duration-slow)}.side-footer--shadowed[data-v-2d3d457d]:before{opacity:1}.side-section-label[data-v-2d3d457d]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 var(--space-3) var(--space-1) var(--space-2);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--faint);user-select:none}.side-section-title[data-v-2d3d457d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sessions-head .pinned+.side-section-label[data-v-2d3d457d]{margin-top:var(--space-2)}.side-section-toggle[data-v-2d3d457d]{color:var(--faint)}.side-section-toggle[data-v-2d3d457d]:hover{color:var(--dim)}.side-section-toggle svg[data-v-2d3d457d]{width:13px;height:13px}.side-section-actions[data-v-2d3d457d]{display:flex;align-items:center;gap:2px}.ws-drop-target.drop-before[data-v-2d3d457d]{box-shadow:inset 0 2px 0 var(--color-accent)}.ws-drop-target.drop-after[data-v-2d3d457d]{box-shadow:inset 0 -2px 0 var(--color-accent)}.ws-drop-target.ws-locate-flash[data-v-2d3d457d] .gh{isolation:isolate}.ws-drop-target.ws-locate-flash[data-v-2d3d457d] .gh:before{content:"";position:absolute;inset:0;z-index:-1;border-radius:var(--radius-sm);background:var(--color-accent-soft);pointer-events:none;animation:ws-locate-fade-2d3d457d var(--duration-flash) var(--ease-out) forwards}@keyframes ws-locate-fade-2d3d457d{0%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){.ws-drop-target.ws-locate-flash[data-v-2d3d457d] .gh:before{animation:none}}.sessions.pinned-drag-active[data-v-2d3d457d]{box-shadow:inset 0 0 0 1px var(--color-accent)}.sessions.flat-pinned-drop-hover[data-v-2d3d457d]{box-shadow:inset 0 0 0 2px var(--color-accent)}.show-more-row[data-v-2d3d457d]{display:flex;align-items:center;justify-content:center}.show-more[data-v-2d3d457d]{display:flex;align-items:center;justify-content:center;gap:var(--space-1);margin:0;padding:6px var(--space-3);min-width:0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);cursor:pointer}.show-more[data-v-2d3d457d]:hover{background:var(--sb-hover, var(--color-hover))}.show-more[data-v-2d3d457d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.show-more-label[data-v-2d3d457d]{flex:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.folder-drop-overlay[data-v-2d3d457d]{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:var(--space-3);box-sizing:border-box;background:color-mix(in srgb,var(--color-sidebar-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.folder-drop-overlay.show[data-v-2d3d457d]{opacity:1;visibility:visible}.folder-drop-card[data-v-2d3d457d]{display:flex;align-items:center;gap:var(--space-3);max-width:100%;box-sizing:border-box;padding:var(--space-4);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.folder-drop-card svg[data-v-2d3d457d]{flex:none}.folder-drop-card span[data-v-2d3d457d]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty[data-v-2d3d457d]{padding:var(--space-6) var(--space-3);text-align:center;color:var(--faint);font-size:calc(var(--ui-font-size) - 3px);line-height:1.6}.ws-menu[data-v-2d3d457d],.gh-menu[data-v-2d3d457d],.view-menu[data-v-2d3d457d]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.view-menu-label[data-v-2d3d457d]{padding:var(--space-1) var(--space-2) var(--space-05);font-size:var(--text-xs);color:var(--faint);user-select:none}.view-menu-check[data-v-2d3d457d]{margin-left:auto;display:inline-flex}.menu-pop-enter-active[data-v-2d3d457d]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-2d3d457d]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-2d3d457d],.menu-pop-leave-to[data-v-2d3d457d]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}[data-v-2d3d457d] .workspace-rename-item{font-size:var(--text-xs);font-weight:var(--weight-option-label)}.section-menu-check[data-v-2d3d457d]{display:inline-flex;flex:none;width:14px}.rh[data-v-1c6dfdc5]{width:4px;flex:none;position:relative;align-self:stretch;background:transparent;touch-action:none;margin:0 -2px;z-index:var(--z-dropdown)}.rh-bar[data-v-1c6dfdc5]{position:absolute;inset:0 1px;background:transparent;transition:background .12s}.rh:hover .rh-bar[data-v-1c6dfdc5]{background:var(--color-selected)}.rh.dragging .rh-bar[data-v-1c6dfdc5]{background:var(--color-line-strong)}.op[data-v-ab413c67]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);background:var(--color-well);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-word;max-height:12lh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.op-empty[data-v-ab413c67]{color:var(--color-text-faint);font-style:italic}.agent-card[data-v-5bbb3a70]{margin:var(--space-1) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.agent-card[data-v-5bbb3a70]:hover{border-color:var(--color-line-strong)}.agent-card.err[data-v-5bbb3a70]{border-color:color-mix(in srgb,var(--color-danger) 45%,var(--bg))}.head[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-2) var(--space-3);border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer}.head[data-v-5bbb3a70]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.head[data-v-5bbb3a70]:disabled{cursor:default}.lead[data-v-5bbb3a70]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-surface-sunken);color:var(--color-text-muted);flex:none}.main[data-v-5bbb3a70]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.task[data-v-5bbb3a70]{font-size:var(--ui-font-size);line-height:var(--leading-caption);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.type[data-v-5bbb3a70]{font-size:var(--text-xs);line-height:var(--leading-caption);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tail[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-2);flex:none}.st[data-v-5bbb3a70]{display:inline-flex;align-items:center}.st.ok[data-v-5bbb3a70]{color:var(--color-success)}.st.error[data-v-5bbb3a70]{color:var(--color-danger)}.go[data-v-5bbb3a70]{color:var(--color-text-faint);transition:color var(--duration-base) var(--ease-out)}.agent-card:hover .head:not(:disabled) .go[data-v-5bbb3a70]{color:var(--color-text)}.go.car[data-v-5bbb3a70]{transition:color var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.go.car.open[data-v-5bbb3a70]{transform:rotate(90deg)}.saved-result[data-v-5bbb3a70]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);text-align:left;cursor:pointer}.saved-result[data-v-5bbb3a70]:hover{color:var(--color-text-muted)}.saved-result[data-v-5bbb3a70]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.saved-result__chevron[data-v-5bbb3a70]{transition:transform var(--duration-base) var(--ease-out)}.saved-result__chevron.open[data-v-5bbb3a70]{transform:rotate(90deg)}.result[data-v-5bbb3a70]{padding:var(--space-2) var(--space-3)}.result--legacy[data-v-5bbb3a70]{border-top:.5px solid var(--color-line)}.tl-head[data-v-58658159]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border-radius:var(--radius-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left}.tl-head.clickable[data-v-58658159]{cursor:pointer;user-select:none}.tl-ic[data-v-58658159]{display:inline-flex;align-items:center;justify-content:flex-start;flex:none;color:var(--color-text-faint)}.tl-main[data-v-58658159]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-1)}.tl-tail[data-v-58658159]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}.tl-status[data-v-58658159]{display:inline-flex;align-items:center;flex:none}.tl-status.ok[data-v-58658159]{color:var(--color-success)}.tl-status.error[data-v-58658159]{color:var(--color-danger)}.tl-car[data-v-58658159]{display:inline-flex;align-items:center;justify-content:center;align-self:center;width:16px;height:16px;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);cursor:pointer;flex:none}.tl-car[data-v-58658159]:hover{color:var(--color-text)}.tl-car[data-v-58658159]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-car-ic[data-v-58658159]{transition:transform var(--duration-base) var(--ease-out)}.tool-line.open .tl-car-ic[data-v-58658159]{transform:rotate(90deg)}.tl-body[data-v-58658159]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tl-body.open[data-v-58658159]{grid-template-rows:minmax(0,1fr)}.tl-body-inner[data-v-58658159]{min-height:0;overflow:hidden;padding:2px var(--space-2) var(--space-1) 0}.tl-main .tl-name[data-v-58658159-s]{font-weight:var(--weight-regular);color:var(--color-text-muted);flex:none}.tl-main .tl-dim[data-v-58658159-s]{color:var(--color-text-muted);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-faint[data-v-58658159-s]{color:var(--color-text-faint);line-height:var(--leading-tight);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-mono[data-v-58658159-s]{font-family:var(--font-mono);font-size:var(--text-xs);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);line-height:normal;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tl-main .tl-file[data-v-58658159-s]{font-weight:var(--weight-regular);color:var(--color-text);line-height:var(--leading-tight);flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 1px;font-family:inherit;font-size:inherit;cursor:pointer}.tl-main .tl-file[data-v-58658159-s]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.tl-main .tl-file[data-v-58658159-s]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-tail .tl-pill[data-v-58658159-s]{font-size:var(--text-xs);line-height:1.5;padding:0 var(--space-2);border-radius:var(--radius-full);flex:none;white-space:nowrap}.tl-tail .tl-chip[data-v-58658159-s]{color:var(--color-text-faint);font-size:var(--text-xs);flex:none;white-space:nowrap}.tl-tail .tl-add[data-v-58658159-s]{color:var(--color-success);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tl-tail .tl-del[data-v-58658159-s]{color:var(--color-danger);font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.ask-receipt[data-v-f29eda04]{max-width:560px;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-xs);padding:var(--space-2) var(--space-3) 10px;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.ask-receipt.flat[data-v-f29eda04]{color:var(--color-text-faint);font-style:italic;padding-top:6px;padding-bottom:6px}.rc-head[data-v-f29eda04]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text-faint);font-size:var(--text-xs);margin-bottom:6px}.rc-st[data-v-f29eda04]{margin-left:auto;color:var(--color-success);display:inline-flex}.rc-q+.rc-q[data-v-f29eda04]{margin-top:6px}.rc-qtext[data-v-f29eda04]{display:flex;align-items:baseline;gap:var(--space-2);margin-bottom:3px;font-weight:var(--weight-medium);color:var(--color-text)}.rc-opt[data-v-f29eda04]{display:flex;align-items:center;gap:var(--space-2);padding:1.5px 0;color:var(--color-text)}.rc-qskip[data-v-f29eda04]{padding:1.5px 0;color:var(--color-text-faint);font-style:italic}.rc-lb[data-v-f29eda04]{min-width:0}.rc-ds[data-v-f29eda04]{color:var(--color-text-faint);font-size:var(--text-xs)}.rc-g[data-v-f29eda04]{width:14px;height:14px;flex:none;border:.5px solid var(--color-line-strong);position:relative}.rc-g.chk[data-v-f29eda04]{border-radius:var(--radius-xs)}.rc-g.rad[data-v-f29eda04]{border-radius:50%}.rc-g.on[data-v-f29eda04]{border-color:var(--color-accent)}.rc-g.chk.on[data-v-f29eda04]{background:var(--color-accent)}.rc-g.chk.on[data-v-f29eda04]:after{content:"";position:absolute;left:3.5px;top:.5px;width:4px;height:8px;border-right:1.5px solid var(--color-text-on-accent);border-bottom:1.5px solid var(--color-text-on-accent);transform:rotate(45deg)}.rc-g.rad.on[data-v-f29eda04]:after{content:"";position:absolute;inset:2.5px;border-radius:50%;background:var(--color-accent)}.cmd-echo[data-v-8869dd42]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.hl-code[data-v-6735e4da]{border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:auto;max-height:calc(24 * 1.5 * var(--ui-font-size));overscroll-behavior:contain;font-family:var(--font-mono);font-size:var(--code-font-size);line-height:var(--leading-normal);font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none}.hl-code[data-v-6735e4da]:not(.framed){border:none;border-radius:0;background:transparent;max-height:none;overflow:visible}.hl-body[data-v-6735e4da]{width:max-content;min-width:100%;padding:var(--space-1) 0 var(--space-2)}.hl-code.plain-pad .hl-body[data-v-6735e4da]{padding-left:var(--space-3)}.hl-row[data-v-6735e4da]{display:flex;align-items:flex-start;min-height:calc(1em * var(--leading-normal));white-space:pre;width:100%}.hl-gutter[data-v-6735e4da]{flex:none;box-sizing:content-box;min-width:var(--gutter-ch, 4ch);padding:0 var(--space-2);text-align:right;color:var(--color-text-faint);user-select:none;border-right:.5px solid var(--color-line);font-variant-numeric:tabular-nums}.hl-sign[data-v-6735e4da]{flex:none;width:16px;text-align:center;color:var(--color-text-muted);user-select:none}.hl-text[data-v-6735e4da]{flex:none;padding-right:14px;white-space:pre;color:var(--color-text)}.hl-gutter+.hl-text[data-v-6735e4da]{padding-left:var(--space-2)}.row-add[data-v-6735e4da]{background:var(--color-diff-add-bg)}.row-add .hl-sign[data-v-6735e4da]{color:var(--color-success)}.row-del[data-v-6735e4da]{background:var(--color-diff-del-bg)}.row-del .hl-sign[data-v-6735e4da]{color:var(--color-danger)}.row-hunk[data-v-6735e4da]{background:var(--color-surface-sunken)}.row-hunk .hl-text[data-v-6735e4da]{color:var(--color-text-muted)}.hl-code.gutter .row-add[data-v-6735e4da]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.hl-code.gutter .row-del[data-v-6735e4da]{box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diffbar[data-v-bbf61950]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;gap:1px;flex:none}.seg-add[data-v-bbf61950]{background:var(--color-success)}.seg-del[data-v-bbf61950]{background:var(--color-danger)}.gl[data-v-b12a8498]{display:inline-flex;align-items:center}.arg-full[data-v-b12a8498]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.file-list[data-v-3936099e]{display:flex;flex-direction:column;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-1);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.file-row[data-v-3936099e]{width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.file-row[data-v-3936099e]:hover{background:var(--color-hover);color:var(--color-accent)}.file-row[data-v-3936099e]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tl-pill.pill-active[data-v-862274de]{color:var(--color-accent);background:var(--color-accent-soft)}.tl-pill.pill-done[data-v-862274de]{color:var(--color-success);background:var(--color-success-soft)}.tl-pill.pill-blocked[data-v-862274de]{color:var(--color-warning);background:var(--color-warning-soft)}.goal-block[data-v-862274de]{margin-bottom:var(--space-1)}.goal-text[data-v-862274de]{color:var(--color-text);font-size:calc(var(--content-font-size) - 1px);line-height:1.6;white-space:pre-wrap;word-break:break-word}.goal-criterion[data-v-862274de]{color:var(--color-text-muted);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;margin-top:2px;white-space:pre-wrap;word-break:break-word}.match-list[data-v-899c1a48]{display:flex;flex-direction:column;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-1);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.match-row[data-v-899c1a48]{display:flex;align-items:baseline;gap:var(--space-2);width:100%;border:none;border-radius:var(--radius-sm);background:transparent;padding:2px var(--space-2);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;font-feature-settings:"liga" 0,"calt" 0;font-variant-ligatures:none;color:var(--color-text);text-align:left;cursor:default}.match-row.link[data-v-899c1a48]{cursor:pointer}.match-row.link[data-v-899c1a48]:hover{background:var(--color-hover)}.match-row[data-v-899c1a48]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mref[data-v-899c1a48]{flex:none;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-faint)}.match-row.link:hover .mref[data-v-899c1a48]{color:var(--color-accent)}.mtext[data-v-899c1a48]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.is-resolving[data-v-23acd4fa]{visibility:hidden}.media-tool[data-v-3bc3ee1a]{display:inline-flex;flex-direction:column;gap:6px;max-width:320px}.media-title[data-v-3bc3ee1a]{font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-image-button[data-v-3bc3ee1a]{padding:0;border:none;background:transparent;cursor:pointer;border-radius:var(--radius-md);overflow:hidden}.media-image[data-v-3bc3ee1a]{display:block;max-width:100%;border-radius:var(--radius-md);background:var(--media-alpha-canvas)}.media-video[data-v-3bc3ee1a],.media-audio[data-v-3bc3ee1a]{max-width:100%;border-radius:var(--radius-md)}.media-video[data-v-3bc3ee1a]{display:block}.media-video-button[data-v-3bc3ee1a]{position:relative}.media-video-tile[data-v-3bc3ee1a]{display:block;width:320px;max-width:100%;aspect-ratio:16 / 9;background:var(--color-well)}.media-play-badge[data-v-3bc3ee1a]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}:where(.markstream-vue) button{appearance:none;-webkit-appearance:none;-moz-appearance:none;background:transparent;border:0;font:inherit;color:inherit}.markstream-vue li:has(.checkbox-node){list-style-type:none;margin-left:calc(-1 * var(--ms-flow-list-indent))}.markstream-vue .text-node{white-space:pre-wrap;overflow-wrap:break-word}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.markstream-vue .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.markstream-vue .pointer-events-none{pointer-events:none}.markstream-vue .\!visible{visibility:visible!important}.markstream-vue .visible{visibility:visible}.markstream-vue .collapse{visibility:collapse}.markstream-vue .static{position:static}.markstream-vue .fixed{position:fixed}.markstream-vue .absolute{position:absolute}.markstream-vue .relative{position:relative}.markstream-vue .inset-0{inset:0}.markstream-vue .right-2{right:8px}.markstream-vue .right-6{right:24px}.markstream-vue .top-2{top:8px}.markstream-vue .top-6{top:24px}.markstream-vue .z-10{z-index:10}.markstream-vue .z-50{z-index:50}.markstream-vue .m-0{margin:0}.markstream-vue .mx-0\.5{margin-left:2px;margin-right:2px}.markstream-vue .mr-2{margin-right:8px}.markstream-vue .mt-2{margin-top:8px}.markstream-vue .block{display:block}.markstream-vue .inline{display:inline}.markstream-vue .flex{display:flex}.markstream-vue .inline-flex{display:inline-flex}.markstream-vue .table{display:table}.markstream-vue .flow-root{display:flow-root}.markstream-vue .grid{display:grid}.markstream-vue .contents{display:contents}.markstream-vue .list-item{display:list-item}.markstream-vue .hidden{display:none}.markstream-vue .h-4{height:16px}.markstream-vue .h-full{height:100%}.markstream-vue .max-h-full{max-height:100%}.markstream-vue .min-h-full{min-height:100%}.markstream-vue .w-2\/3{width:66.666667%}.markstream-vue .w-4{width:16px}.markstream-vue .w-4\/5{width:80%}.markstream-vue .w-full{width:100%}.markstream-vue .min-w-\[160px\]{min-width:160px}.markstream-vue .max-w-full{max-width:100%}.markstream-vue .flex-1{flex:1 1 0%}.markstream-vue .flex-shrink{flex-shrink:1}.markstream-vue .flex-shrink-0{flex-shrink:0}.markstream-vue .shrink{flex-shrink:1}.markstream-vue .shrink-0{flex-shrink:0}.markstream-vue .border-collapse{border-collapse:collapse}.markstream-vue .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.markstream-vue .animate-spin{animation:spin 1s linear infinite}.markstream-vue .cursor-grab{cursor:grab}.markstream-vue .cursor-grabbing{cursor:grabbing}.markstream-vue .cursor-not-allowed{cursor:not-allowed}.markstream-vue .cursor-pointer{cursor:pointer}.markstream-vue .resize{resize:both}.markstream-vue .list-decimal{list-style-type:decimal}.markstream-vue .list-disc{list-style-type:disc}.markstream-vue .flex-wrap{flex-wrap:wrap}.markstream-vue .items-center{align-items:center}.markstream-vue .items-baseline{align-items:baseline}.markstream-vue .justify-center{justify-content:center}.markstream-vue .justify-between{justify-content:space-between}.markstream-vue .gap-0\.5{gap:2px}.markstream-vue .gap-1\.5{gap:6px}.markstream-vue .gap-2{gap:8px}.markstream-vue .gap-\[var\(--ms-gap-header-actions\)\]{gap:var(--ms-gap-header-actions)}.markstream-vue .gap-x-1{-moz-column-gap:4px;column-gap:4px}.markstream-vue .gap-x-2{-moz-column-gap:8px;column-gap:8px}.markstream-vue .overflow-hidden{overflow:hidden}.markstream-vue .overflow-x-auto{overflow-x:auto}.markstream-vue .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.markstream-vue .whitespace-nowrap{white-space:nowrap}.markstream-vue .whitespace-pre-wrap{white-space:pre-wrap}.markstream-vue .rounded{border-radius:calc(var(--ms-radius) * .5)}.markstream-vue .rounded-lg{border-radius:var(--ms-radius)}.markstream-vue .rounded-md{border-radius:calc(var(--ms-radius) * .75)}.markstream-vue .border{border-width:1px}.markstream-vue .border-b{border-bottom-width:1px}.markstream-vue .border-t{border-top-width:1px}.markstream-vue .border-\[var\(--code-border\)\]{border-color:var(--code-border)}.markstream-vue .border-\[var\(--footnote-border\)\]{border-color:var(--footnote-border)}.markstream-vue .border-\[var\(--hr-border\)\]{border-color:var(--hr-border)}.markstream-vue .bg-\[hsl\(var\(--ms-popover\)\)\]{background-color:hsl(var(--ms-popover))}.markstream-vue .bg-\[var\(--code-header-bg\)\]{background-color:var(--code-header-bg)}.markstream-vue .p-0{padding:0}.markstream-vue .p-1{padding:4px}.markstream-vue .p-4{padding:16px}.markstream-vue .p-\[var\(--ms-action-btn-padding\)\]{padding:var(--ms-action-btn-padding)}.markstream-vue .px-1\.5{padding-left:6px;padding-right:6px}.markstream-vue .px-2{padding-left:8px;padding-right:8px}.markstream-vue .px-4{padding-left:16px;padding-right:16px}.markstream-vue .px-\[var\(--ms-inset-panel-x\)\]{padding-left:var(--ms-inset-panel-x);padding-right:var(--ms-inset-panel-x)}.markstream-vue .py-0\.5{padding-top:2px;padding-bottom:2px}.markstream-vue .py-1\.5{padding-top:6px;padding-bottom:6px}.markstream-vue .py-\[var\(--ms-inset-panel-y\)\]{padding-top:var(--ms-inset-panel-y);padding-bottom:var(--ms-inset-panel-y)}.markstream-vue .pb-3{padding-bottom:12px}.markstream-vue .pt-2{padding-top:8px}.markstream-vue .text-left{text-align:left}.markstream-vue .text-center{text-align:center}.markstream-vue .text-right{text-align:right}.markstream-vue .font-mono{font-family:var(--ms-font-mono)}.markstream-vue .text-\[length\:var\(--ms-text-label\)\]{font-size:var(--ms-text-label)}.markstream-vue .text-sm{font-size:14px;line-height:20px}.markstream-vue .text-xs{font-size:12px;line-height:16px}.markstream-vue .font-medium{font-weight:500}.markstream-vue .font-semibold{font-weight:600}.markstream-vue .uppercase{text-transform:uppercase}.markstream-vue .lowercase{text-transform:lowercase}.markstream-vue .italic{font-style:italic}.markstream-vue .leading-\[normal\]{line-height:normal}.markstream-vue .leading-none{line-height:1}.markstream-vue .leading-relaxed{line-height:1.625}.markstream-vue .text-\[\#0366d6\]{--tw-text-opacity: 1;color:rgb(3 102 214 / var(--tw-text-opacity, 1))}.markstream-vue .text-\[hsl\(var\(--ms-popover-foreground\)\)\]{color:hsl(var(--ms-popover-foreground))}.markstream-vue .text-\[var\(--code-action-fg\)\]{color:var(--code-action-fg)}.markstream-vue .text-\[var\(--code-fg\)\]{color:var(--code-fg)}.markstream-vue .underline{text-decoration-line:underline}.markstream-vue .antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.markstream-vue .opacity-0{opacity:0}.markstream-vue .opacity-50{opacity:.5}.markstream-vue .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.markstream-vue .shadow-\[var\(--ms-shadow-popover\)\]{--tw-shadow-color: var(--ms-shadow-popover);--tw-shadow: var(--tw-shadow-colored)}.markstream-vue .outline{outline-style:solid}.markstream-vue .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.markstream-vue .backdrop-blur{--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.markstream-vue .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-\[height\]{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.markstream-vue .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.markstream-vue .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.markstream-vue{--ms-background: 0 0% 100%;--ms-foreground: 0 0% 10%;--ms-muted: 0 0% 96.5%;--ms-muted-foreground: 0 0% 43%;--ms-secondary: 0 0% 93.5%;--ms-secondary-foreground: 0 0% 10%;--ms-accent: 0 0% 91%;--ms-accent-foreground: 0 0% 10%;--ms-primary: 0 0% 10%;--ms-primary-foreground: 0 0% 100%;--ms-destructive: 0 62% 52%;--ms-destructive-foreground: 0 0% 100%;--ms-border: 0 0% 87%;--ms-ring: 0 0% 10%;--ms-popover: 0 0% 100%;--ms-popover-foreground: 0 0% 10%;--ms-radius: 8px;--ms-info: 215 60% 50%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 56% 39%;--ms-success-foreground: 0 0% 100%;--ms-warning: 38 64% 46%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 50% 36%;--ms-diff-removed: 0 58% 48%;--ms-highlight: 50 60% 72%;--ms-highlight-foreground: 0 0% 0%;--ms-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--ms-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}.dark .markstream-vue,.markstream-vue.dark{--ms-background: 0 0% 7%;--ms-foreground: 0 0% 93%;--ms-muted: 0 0% 12%;--ms-muted-foreground: 0 0% 60%;--ms-secondary: 0 0% 16%;--ms-secondary-foreground: 0 0% 93%;--ms-accent: 0 0% 24%;--ms-accent-foreground: 0 0% 93%;--ms-primary: 0 0% 93%;--ms-primary-foreground: 0 0% 10%;--ms-destructive: 0 60% 50%;--ms-destructive-foreground: 0 0% 93%;--ms-border: 0 0% 20%;--ms-ring: 0 0% 80%;--ms-popover: 0 0% 9%;--ms-popover-foreground: 0 0% 93%;--ms-info: 215 55% 62%;--ms-info-foreground: 0 0% 100%;--ms-success: 152 48% 55%;--ms-success-foreground: 0 0% 100%;--ms-warning: 32 65% 58%;--ms-warning-foreground: 0 0% 9%;--ms-diff-added: 152 42% 60%;--ms-diff-removed: 0 58% 58%;--ms-highlight: 48 65% 50%;--ms-highlight-foreground: 0 0% 0%;--ms-shadow-subtle: 0 1px 3px 0 hsl(0 0% 0% / .25);--ms-shadow-popover: 0 4px 6px -1px hsl(0 0% 0% / .2), 0 2px 4px -2px hsl(0 0% 0% / .15);--ms-shadow-modal: 0 10px 15px -3px hsl(0 0% 0% / .5), 0 4px 6px -4px hsl(0 0% 0% / .4);--ms-shadow-preview: 0 10px 40px hsl(0 0% 0% / .6);--tooltip-bg: hsl(0 0% 12%);--tooltip-fg: hsl(0 0% 72%);--code-bg: #111827;--code-header-bg: hsl(var(--ms-muted));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 12%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 12%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 12%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 12%, transparent)}.markstream-vue{font-family:var(--ms-font-sans);font-size:var(--ms-text-body);line-height:var(--ms-leading-body);--inline-code-bg: hsl(var(--ms-secondary));--inline-code-fg: hsl(var(--ms-foreground) / .75);--inline-code-border: hsl(var(--ms-border) / .9);--code-bg: #fff;--code-fg: hsl(var(--ms-foreground));--code-border: hsl(var(--ms-border));--code-header-bg: hsl(var(--ms-secondary));--code-selection-bg: hsl(var(--ms-accent) / .3);--code-line-number: hsl(var(--ms-muted-foreground));--markstream-code-line-number-align: right;--code-action-fg: hsl(var(--ms-muted-foreground));--code-action-hover-bg: hsl(var(--ms-accent));--code-action-hover-fg: hsl(var(--ms-accent-foreground));--code-action-active-bg: hsl(var(--ms-primary));--code-action-active-fg: hsl(var(--ms-primary-foreground));--diff-added-fg: hsl(var(--ms-diff-added));--diff-removed-fg: hsl(var(--ms-diff-removed));--diff-added-bg: hsl(var(--ms-diff-added) / .1);--diff-added-inline-bg: hsl(var(--ms-diff-added) / .2);--diff-removed-bg: hsl(var(--ms-diff-removed) / .1);--diff-removed-inline-bg: hsl(var(--ms-diff-removed) / .2);--blockquote-border: hsl(var(--ms-muted-foreground) / .2);--admonition-bg: hsl(var(--ms-muted));--admonition-border: hsl(var(--ms-border));--admonition-fg: hsl(var(--ms-foreground));--admonition-muted: hsl(var(--ms-muted-foreground));--admonition-header-bg: hsl(var(--ms-muted) / .5);--admonition-note: hsl(var(--ms-info));--admonition-tip: hsl(var(--ms-success));--admonition-warning: hsl(var(--ms-warning));--admonition-danger: hsl(var(--ms-destructive));--admonition-note-header-bg: color-mix(in srgb, hsl(var(--ms-info)) 6%, transparent);--admonition-tip-header-bg: color-mix(in srgb, hsl(var(--ms-success)) 6%, transparent);--admonition-warn-header-bg: color-mix(in srgb, hsl(var(--ms-warning)) 6%, transparent);--admonition-danger-header-bg: color-mix(in srgb, hsl(var(--ms-destructive)) 6%, transparent);--table-border: hsl(var(--ms-border));--table-header-bg: hsl(var(--ms-muted));--link-color: hsl(var(--ms-info));--list-marker: hsl(var(--ms-muted-foreground) / .5);--list-counter-marker: hsl(var(--ms-muted-foreground));--hr-border: hsl(var(--ms-border));--highlight-bg: hsl(var(--ms-highlight));--footnote-border: hsl(var(--ms-border));--tooltip-bg: hsl(0 0% 18%);--tooltip-fg: hsl(0 0% 88%);--tooltip-border: hsl(var(--ms-border));--modal-overlay: hsl(0 0% 0% / .7);--modal-bg: hsl(var(--ms-popover));--modal-fg: hsl(var(--ms-popover-foreground));--diagram-bg: hsl(var(--ms-muted));--diagram-border: hsl(var(--ms-border));--diagram-header-bg: hsl(var(--ms-muted));--loading-spinner: hsl(var(--ms-muted-foreground));--loading-shimmer: hsl(var(--ms-muted) / .5);--image-placeholder-bg: hsl(var(--ms-muted));--focus-ring: hsl(var(--ms-ring));--ms-space-1: 4px;--ms-space-1_5: 6px;--ms-space-2: 8px;--ms-space-2_5: 10px;--ms-space-3: 12px;--ms-space-4: 16px;--ms-space-5: 20px;--ms-space-6: 24px;--ms-space-8: 32px;--ms-space-12: 48px;--ms-flow-paragraph-y: 1.5em;--ms-flow-list-y: 1em;--ms-flow-list-item-y: .25em;--ms-flow-list-indent: 1.625em ;--ms-flow-list-indent-mobile: calc(14 / 9 * 1em);--ms-flow-table-y: 2em;--ms-flow-table-cell: .5em .75em;--ms-flow-blockquote-y: 1.25em;--ms-flow-blockquote-indent: 1.25em;--ms-flow-admonition-y: 1.25em;--ms-flow-footnote-y: .5em;--ms-flow-hr-y: 2.5em;--ms-flow-diagram-y: 1.5em;--ms-flow-codeblock-y: 1.5em;--ms-flow-definition-term-mt: .75em;--ms-flow-definition-desc-ml: 1.25em;--ms-flow-definition-desc-mb: .5em;--ms-flow-heading-1-mt: 0;--ms-flow-heading-1-mb: 1em;--ms-flow-heading-2-mt: 2em;--ms-flow-heading-2-mb: .75em;--ms-flow-heading-3-mt: 1.5em;--ms-flow-heading-3-mb: .6em;--ms-flow-heading-4-mt: 1.25em;--ms-flow-heading-4-mb: .4em;--ms-flow-heading-5-mt: 1em;--ms-flow-heading-5-mb: .25em;--ms-flow-heading-6-mt: 1em;--ms-flow-heading-6-mb: .25em;--ms-text-body: 16px;--ms-leading-body: 1.75;--ms-text-h1: 36px;--ms-text-h2: 24px;--ms-text-h3: 20px;--ms-text-h4: 16px;--ms-text-h5: 16px;--ms-text-h6: 16px;--ms-leading-h1: 1.2;--ms-leading-h2: 1.35;--ms-leading-h3: 1.5;--ms-weight-h1: 700;--ms-weight-h2: 600;--ms-weight-h3: 600;--ms-weight-h4: 600;--ms-text-label: 12px;--ms-action-btn-padding: 6px;--ms-action-btn-icon: 14px;--ms-inset-panel-x: 10px;--ms-inset-panel-y: 6px;--ms-inset-panel-body-sm: 8px;--ms-inset-panel-body: 16px;--ms-inset-admonition-body-top: 8px;--ms-inset-admonition-body-bottom: 12px;--ms-gap-header: var(--ms-space-4);--ms-gap-header-main: var(--ms-space-2_5);--ms-gap-header-actions: var(--ms-space-2);--ms-shadow-subtle: 0 1px 3px 0 hsl(var(--ms-foreground) / .06);--ms-shadow-popover: 0 4px 6px -1px hsl(var(--ms-foreground) / .1), 0 2px 4px -2px hsl(var(--ms-foreground) / .1);--ms-shadow-modal: 0 10px 15px -3px hsl(var(--ms-foreground) / .1), 0 4px 6px -4px hsl(var(--ms-foreground) / .1);--ms-shadow-preview: 0 10px 40px hsl(var(--ms-foreground) / .25);--ms-duration-fast: .12s;--ms-duration-standard: .18s;--ms-duration-overlay: .2s;--ms-duration-emphasis: .22s;--ms-duration-slow: .3s;--ms-duration-stream: .28s;--ms-ease-linear: linear;--ms-ease-standard: ease;--ms-ease-out: ease-out;--ms-ease-in-out: ease-in-out;--ms-ease-spring: cubic-bezier(.16, 1, .3, 1);--ms-border-width: 1px;--ms-border-width-strong: 4px;--ms-focus-ring-width: 2px;--ms-focus-ring-offset: 2px;--ms-size-diagram-min-height: 360px;--ms-size-code-max-height: 500px;--ms-size-image-max-width: 384px;--ms-size-image-min-width: 128px;--ms-size-image-min-height: 1.5em;--ms-size-math-min-height: 40px;--ms-size-skeleton-min-height: 120px}body>div[id^=dmermaid-]{position:fixed;top:-10000px;left:0;width:100%;visibility:hidden;pointer-events:none}.markstream-vue .hover\:bg-\[var\(--code-action-hover-bg\)\]:hover{background-color:var(--code-action-hover-bg)}.markstream-vue .hover\:text-\[var\(--code-action-hover-fg\)\]:hover{color:var(--code-action-hover-fg)}.markstream-vue .hover\:underline:hover{text-decoration-line:underline}.markstream-vue .active\:scale-\[0\.96\]:active{--tw-scale-x: .96;--tw-scale-y: .96;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.markstream-vue .disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.markstream-vue .disabled\:opacity-40:disabled{opacity:.4}.checkbox-node[data-v-be21ab83]{display:inline-flex;align-items:center;margin-right:.5em;vertical-align:-.15em}.checkbox-icon[data-v-be21ab83]{flex-shrink:0}.checkbox-unchecked[data-v-be21ab83]{color:hsl(var(--ms-muted-foreground) / .5)}.checkbox-checked[data-v-be21ab83]{color:hsl(var(--ms-info))}.emoji-node[data-v-de55dc97]{display:inline-block}.footnote-reference[data-v-c1463a29]{font-size:.75em;line-height:0}.footnote-link[data-v-c1463a29]{color:var(--link-color);text-decoration:none}.footnote-link[data-v-c1463a29]:hover{text-decoration:underline}.html-inline-node[data-v-d17f12b0]{display:inline}.html-inline-node--loading[data-v-d17f12b0]{opacity:.85}.inline-code[data-v-4e331c97]{display:inline;font-family:var(--ms-font-mono);font-size:.8125em;line-height:inherit;color:var(--inline-code-fg);background-color:var(--inline-code-bg);padding:.15em .35em;border-radius:.25em;white-space:normal;word-break:break-word;max-width:100%;-webkit-box-decoration-break:clone;box-decoration-break:clone}.inline-code-stream-delta[data-v-4e331c97]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both}.inline-code-stream-delta--a[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-a-4e331c97}.inline-code-stream-delta--b[data-v-4e331c97]{animation-name:inline-code-stream-update-fade-b-4e331c97}@keyframes inline-code-stream-update-fade-a-4e331c97{0%{opacity:0}to{opacity:1}}@keyframes inline-code-stream-update-fade-b-4e331c97{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.inline-code-stream-delta[data-v-4e331c97]{animation:none!important}}.image-node-container[data-v-046e82ac]{display:inline-block;position:relative;vertical-align:middle;max-width:var(--ms-size-image-max-width)}.image-node__img[data-v-046e82ac]{display:inline-block;max-width:100%;min-width:var(--ms-size-image-min-width);min-height:var(--ms-size-image-min-height);height:auto;vertical-align:middle;transition:opacity var(--ms-duration-emphasis) var(--ms-ease-standard)}.image-node__img.is-loading[data-v-046e82ac]{opacity:0}.image-node__img.is-loaded[data-v-046e82ac]{opacity:1}.image-node__img.has-natural-size[data-v-046e82ac]{min-width:0;min-height:0}.image-placeholder[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:var(--ms-size-image-min-width);min-height:128px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));overflow:hidden;vertical-align:middle}.image-shimmer-overlay[data-v-046e82ac]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:hsl(var(--ms-muted));overflow:hidden}.image-shimmer-overlay .image-shimmer[data-v-046e82ac]{width:100%;height:100%}.image-shimmer[data-v-046e82ac]{display:block;width:100%;height:100%;min-height:128px;background:linear-gradient(90deg,hsl(var(--ms-muted)),hsl(var(--ms-muted-foreground) / .06),hsl(var(--ms-muted)));background-size:200% 100%;animation:image-shimmer-046e82ac 1.5s ease-in-out infinite}.image-node-container[data-markstream-viewport-pending=true] .image-shimmer[data-v-046e82ac]{animation:none}@keyframes image-shimmer-046e82ac{0%{background-position:100% 0}to{background-position:-100% 0}}.image-error[data-v-046e82ac]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:16px 24px;min-height:64px;max-width:var(--ms-size-image-max-width);background:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground));font-size:var(--ms-text-label);vertical-align:middle}.image-node__raw-text[data-v-046e82ac]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}@media(prefers-reduced-motion:reduce){.image-shimmer[data-v-046e82ac]{animation:none!important}}.markstream-vue pre[class^=language-],.markstream-vue pre[class*=" language-"]{white-space:pre;overflow:auto;-moz-tab-size:2;-o-tab-size:2;tab-size:2;font-variant-ligatures:none;contain:content;backface-visibility:hidden;transform:translateZ(0);-webkit-font-smoothing:antialiased}.markstream-vue pre[class^=language-]>code,.markstream-vue pre[class*=" language-"]>code{display:block}.markstream-vue pre[data-markstream-pre="1"]:not(.markstream-pre--diff-preview){background:var(--code-bg);color:var(--code-fg)}.markstream-vue pre.markstream-pre--line-numbers{position:relative}.markstream-vue pre.code-pre-fallback[data-markstream-code-loading="1"]{--markstream-pre-line-number-top: var(--markstream-code-padding-y, 8px);--markstream-pre-line-number-left: 0px;--markstream-pre-line-number-width: 2ch;--markstream-pre-line-number-padding-left: 2ch;--markstream-pre-line-number-padding-right: 1ch;--markstream-pre-line-number-separator-width: 2px;--markstream-code-padding-left: calc(6ch + 2px) ;box-sizing:border-box;width:100%;margin:0;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left);overflow:auto;border:0;border-radius:0;background:var(--code-bg);color:var(--code-fg);font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace );font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers{position:absolute;top:var(--markstream-pre-line-number-top, 0);left:var(--markstream-pre-line-number-left, 0);box-sizing:content-box;display:flex;flex-direction:column;align-items:flex-end;width:var(--markstream-pre-line-number-width, 2ch);min-width:var(--markstream-pre-line-number-width, 2ch);padding-left:var(--markstream-pre-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-line-number-padding-right, 1ch);border-right:var(--markstream-pre-line-number-separator-width, 2px) solid transparent;color:var(--code-line-number);font:inherit;font-variant-numeric:tabular-nums;line-height:inherit;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--line-numbers:not(.markstream-pre--diff-preview):not(.code-pre-fallback)>.markstream-pre__code{box-sizing:border-box;min-width:100%;padding-left:var(--markstream-code-padding-left, 52px);padding-right:var(--markstream-code-padding-x, 12px)}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-number{display:block;min-height:1lh}.markstream-vue pre.markstream-pre--line-numbers>.markstream-pre__line-numbers>.markstream-pre__line-numbers-text{display:block;min-height:1lh;text-align:right;white-space:pre}.markstream-vue pre.markstream-pre--diff-preview{box-sizing:border-box;padding-left:0;padding-right:0;width:100%;--markstream-pre-diff-gutter-marker-width: var(--stream-monaco-gutter-marker-width, 4px);--markstream-pre-diff-gutter-gap: var(--stream-monaco-gutter-gap, 1ch);--markstream-pre-diff-code-gap: var(--stream-monaco-diff-code-gap, 1ch);--markstream-pre-diff-code-padding: var(--stream-monaco-diff-code-padding, 0px);--markstream-diff-added-fg: var(--diff-added-fg, #2f8f68);--markstream-diff-removed-fg: var(--diff-removed-fg, #c24141);--markstream-diff-added-line-fill: var(--diff-added-bg, rgb(47 143 104 / 12%));--markstream-diff-removed-line-fill: var(--diff-removed-bg, rgb(194 65 65 / 12%));--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-diff-removed-gutter: linear-gradient( 90deg, var(--markstream-diff-removed-fg) 0 var(--markstream-pre-diff-gutter-marker-width), transparent var(--markstream-pre-diff-gutter-marker-width) 100% );--markstream-pre-diff-line-number-width: var( --stream-monaco-line-number-width, 2ch );--markstream-pre-diff-line-number-padding-left: var(--stream-monaco-line-number-padding-left, 2ch);--markstream-pre-diff-line-number-padding-right: var(--stream-monaco-line-number-padding-right, 1ch);--markstream-pre-diff-line-number-separator-width: var(--stream-monaco-line-number-separator-width, 2px);--markstream-pre-diff-line-number-box-width: calc( var(--markstream-pre-diff-line-number-padding-left) + var(--markstream-pre-diff-line-number-width) + var(--markstream-pre-diff-line-number-padding-right) + var(--markstream-pre-diff-line-number-separator-width) );--markstream-pre-diff-line-number-bg: var( --stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg, transparent) );--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-original-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );--markstream-pre-diff-line-number-align: var(--markstream-diff-line-number-align, right);--markstream-pre-diff-code-fill-left: calc( var(--markstream-pre-diff-line-number-left) + var(--markstream-pre-diff-line-number-box-width) );--markstream-pre-diff-code-left: calc( var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-line-number-gap-to-code) + var(--markstream-pre-diff-code-padding) )}.markstream-vue pre.markstream-pre--diff-preview::-webkit-scrollbar{width:12px;height:12px}.markstream-vue pre.markstream-pre--diff-preview.is-wrap{white-space:pre-wrap;overflow-wrap:anywhere}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline{--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px )}.markstream-vue pre.markstream-pre--diff-preview>.markstream-pre__diff-code{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);font:inherit;line-height:inherit;min-width:100%;width:100%}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline>.markstream-pre__diff-code{grid-template-columns:minmax(0,1fr)}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap)>.markstream-pre__diff-code{grid-template-columns:minmax(100%,max-content);width:100%;min-width:-moz-max-content;min-width:max-content}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane{min-width:0;overflow:hidden}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{overflow-x:auto;overflow-y:hidden}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane-content{display:block;min-width:100%}.markstream-vue pre.markstream-pre--diff-preview:not(.is-wrap):not(.markstream-pre--diff-inline) .markstream-pre__diff-pane-content{width:-moz-max-content;width:max-content}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline:not(.is-wrap) .markstream-pre__diff-pane{min-width:-moz-max-content;min-width:max-content;width:100%;overflow:visible}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-pane--modified{--markstream-pre-diff-pane-divider-width: 1px;--markstream-pre-diff-line-number-gap-to-code: var( --stream-monaco-modified-line-number-gap-to-code, var(--stream-monaco-line-number-gap-to-code, var(--markstream-pre-diff-code-gap)) );--markstream-pre-diff-line-number-left: var( --stream-monaco-line-number-left, 0px );box-shadow:inset 1px 0 var(--markstream-diff-pane-divider, hsl(var(--ms-border)))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified{--markstream-pre-diff-line-number-left: calc( var(--stream-monaco-line-number-left, 0px) + var(--markstream-pre-diff-pane-divider-width) )}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-rail{left:var(--markstream-pre-diff-pane-divider-width)}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line{padding-left:calc(var(--markstream-pre-diff-code-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane--modified .markstream-pre__diff-line:before{left:calc(var(--markstream-pre-diff-code-fill-left) + var(--markstream-pre-diff-pane-divider-width))}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-inline .markstream-pre__diff-pane--modified{box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line{position:relative;display:block;box-sizing:border-box;width:100%;min-width:100%;min-height:var( --markstream-pre-diff-synced-row-height, var(--markstream-pre-diff-line-height, 18px) );padding-left:var(--markstream-pre-diff-code-left);line-height:var(--markstream-pre-diff-line-height, 18px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:before{content:"";position:absolute;left:var(--markstream-pre-diff-code-fill-left);right:0;top:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;border-radius:0;background:transparent}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line:after{content:"";position:absolute;left:var(--markstream-pre-diff-line-number-left);top:0;width:var(--markstream-pre-diff-line-number-box-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );z-index:0;pointer-events:none;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-rail{position:absolute;z-index:2;top:0;left:0;height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );width:var(--markstream-pre-diff-gutter-marker-width, 4px);min-width:var(--markstream-pre-diff-gutter-marker-width, 4px)}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-number{position:absolute;z-index:1;top:0;left:var(--markstream-pre-diff-line-number-left);width:var(--markstream-pre-diff-line-number-width);min-width:var(--markstream-pre-diff-line-number-width);height:var( --markstream-pre-diff-content-height, var(--markstream-pre-diff-line-height, 18px) );box-sizing:content-box;background:var(--markstream-pre-diff-line-number-bg);box-shadow:none;padding-left:var(--markstream-pre-diff-line-number-padding-left, 2ch);padding-right:var(--markstream-pre-diff-line-number-padding-right, 1ch);border-right:var(--markstream-pre-diff-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg, var(--code-bg));color:var(--code-line-number);font-variant-numeric:tabular-nums;line-height:var(--markstream-pre-diff-line-height, 18px);text-align:var(--markstream-pre-diff-line-number-align, right);-webkit-user-select:none;-moz-user-select:none;user-select:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent));color:var(--stream-monaco-added-fg, var(--markstream-diff-added-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent));color:var(--stream-monaco-removed-fg, var(--markstream-diff-removed-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content{position:relative;z-index:1;display:block;width:-moz-max-content;width:max-content;min-width:100%;line-height:var(--markstream-pre-diff-line-height, 18px);white-space:inherit;overflow-wrap:normal;word-break:normal;line-break:auto}.markstream-vue pre.markstream-pre--diff-preview.is-wrap .markstream-pre__diff-content{width:auto;min-width:0;overflow-wrap:inherit}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-content-inner{white-space:inherit;overflow-wrap:inherit;word-break:inherit;line-break:inherit;-webkit-box-decoration-break:clone;box-decoration-break:clone}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk{color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--hunk:before{background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:before{background-image:linear-gradient(-45deg,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 12.5%,transparent 12.5%,transparent 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 50%,color-mix(in srgb,var(--stream-monaco-editor-fg, currentColor) 20%,transparent) 62.5%,transparent 62.5%,transparent 100%);background-size:10px 10px;opacity:.38}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-number,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--spacer>.markstream-pre__diff-content{display:none}.markstream-vue pre.markstream-pre--diff-preview.markstream-pre--diff-collapsed:not(.code-pre-fallback){height:auto!important;min-height:0!important}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed{min-height:28px;padding-left:0;color:var(--stream-monaco-unchanged-fg, var(--markstream-diff-unchanged-fg, var(--code-line-number)));line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:before{left:0;height:28px;background:var(--stream-monaco-unchanged-bg, var(--markstream-diff-unchanged-bg, rgb(0 0 0 / 4%)))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed:after,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-rail,.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-number{display:none}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--collapsed>.markstream-pre__diff-content{width:100%;min-width:0;padding-left:calc(var(--markstream-pre-diff-code-left) + 12px);line-height:28px}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:before{background:linear-gradient(var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent)),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))),var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:before{background:linear-gradient(var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent)),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))),var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added:after{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))}.markstream-vue pre.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))}.markstream-vue pre[class^=language-]:focus,.markstream-vue pre[class*=" language-"]:focus{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.text-node[data-v-fd79037c]{display:inline;font-weight:inherit;vertical-align:baseline}.text-node-center[data-v-fd79037c]{display:inline-flex;justify-content:center;width:100%}.text-node-stream-delta[data-v-fd79037c]{animation-duration:var(--stream-update-fade-duration, var(--fade-duration, .28s));animation-timing-function:var(--stream-update-fade-ease, var(--fade-ease, cubic-bezier(.33, 0, .67, 1)));animation-fill-mode:both;will-change:opacity}.text-node-stream-delta--a[data-v-fd79037c]{animation-name:text-node-stream-update-fade-a-fd79037c}.text-node-stream-delta--b[data-v-fd79037c]{animation-name:text-node-stream-update-fade-b-fd79037c}@keyframes text-node-stream-update-fade-a-fd79037c{0%{opacity:0}to{opacity:1}}@keyframes text-node-stream-update-fade-b-fd79037c{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){.text-node-stream-delta[data-v-fd79037c]{animation:none!important}}.reference-node[data-v-775c65e4]{background-color:hsl(var(--ms-muted));color:hsl(var(--ms-muted-foreground))}.reference-node[data-v-775c65e4]:hover{background-color:hsl(var(--ms-secondary))}.superscript-node[data-v-24160b22]{font-size:.8em;vertical-align:super}.subscript-node[data-v-197fa13b]{font-size:.8em;vertical-align:sub}.strong-node[data-v-a8647104]{font-weight:700}.strikethrough-node[data-v-b7a531fa]{text-decoration:line-through}.link-node[data-v-367e6ca4]{color:var(--link-color);text-decoration:none}.link-node[data-v-367e6ca4]:hover{text-decoration:underline;text-underline-offset:3.2px}.link-loading .link-text-wrapper[data-v-367e6ca4]{position:relative}.link-loading[data-v-367e6ca4]{color:var(--link-color)}.link-loading .link-text[data-v-367e6ca4]{position:relative;z-index:2}.link-loading-indicator[data-v-367e6ca4]{position:absolute;left:0;right:0;height:var(--underline-height, 2px);bottom:var(--underline-bottom, -3px);background:currentColor;border-radius:999px;will-change:opacity;opacity:var(--underline-rest-opacity, .18);animation:underlinePulse-367e6ca4 var(--underline-duration, 1.6s) var(--underline-timing, ease-in-out) var(--underline-iteration, infinite)}@keyframes underlinePulse-367e6ca4{0%,to{opacity:var(--underline-rest-opacity, .18)}50%{opacity:var(--underline-opacity, .35)}}@media(prefers-reduced-motion:reduce){.link-loading-indicator[data-v-367e6ca4]{animation:none;opacity:var(--underline-rest-opacity, .18)}}.insert-node[data-v-1e2c29d4]{text-decoration:underline}.highlight-node[data-v-7a62982a]{background-color:var(--highlight-bg);padding:0 3.2px;border-radius:.2em}.emphasis-node[data-v-2a5aafbf]{font-style:italic}.hard-break[data-v-50c58f70]{display:block}.blockquote[data-v-abfecebc]{font-weight:400;font-style:normal;color:var(--blockquote-fg, hsl(var(--ms-muted-foreground)));border-left:3px solid var(--blockquote-border);margin-top:var(--ms-flow-blockquote-y);margin-bottom:var(--ms-flow-blockquote-y);padding-left:var(--ms-flow-blockquote-indent)}.blockquote>.paragraph-node[data-v-abfecebc]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}.blockquote>.paragraph-node[data-v-abfecebc]:first-child{margin-top:0}.blockquote>.paragraph-node[data-v-abfecebc]:last-child{margin-bottom:0}.blockquote[data-v-abfecebc] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.definition-list[data-v-4e103b30]{margin:0 0 16px}.definition-term[data-v-4e103b30]{font-weight:600;margin-top:var(--ms-flow-definition-term-mt)}.definition-desc[data-v-4e103b30]{margin-left:var(--ms-flow-definition-desc-ml);margin-bottom:var(--ms-flow-definition-desc-mb)}.definition-list[data-v-4e103b30] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.footnote-anchor[data-v-e1eb37b6]{margin-left:8px;color:var(--link-color)}.footnote-node{margin-top:var(--ms-flow-footnote-y);margin-bottom:var(--ms-flow-footnote-y)}.markstream-vue [class*=footnote-] .markdown-renderer,.markstream-vue .flex-1 .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.heading-node[data-v-7122dbe1]{font-weight:500;line-height:1.25}hr+.heading-node[data-v-7122dbe1]{margin-top:0}.heading-1[data-v-7122dbe1]{font-size:var(--ms-text-h1);line-height:var(--ms-leading-h1);font-weight:var(--ms-weight-h1);margin-top:var(--ms-flow-heading-1-mt);margin-bottom:var(--ms-flow-heading-1-mb)}.heading-2[data-v-7122dbe1]{font-size:var(--ms-text-h2);line-height:var(--ms-leading-h2);font-weight:var(--ms-weight-h2);margin-top:var(--ms-flow-heading-2-mt);margin-bottom:var(--ms-flow-heading-2-mb)}.heading-3[data-v-7122dbe1]{font-size:var(--ms-text-h3);line-height:var(--ms-leading-h3);font-weight:var(--ms-weight-h3);margin-top:var(--ms-flow-heading-3-mt);margin-bottom:var(--ms-flow-heading-3-mb)}.heading-4[data-v-7122dbe1]{font-size:var(--ms-text-h4);font-weight:var(--ms-weight-h4);margin-top:var(--ms-flow-heading-4-mt);margin-bottom:var(--ms-flow-heading-4-mb)}.heading-5[data-v-7122dbe1]{font-size:var(--ms-text-h5);margin-top:var(--ms-flow-heading-5-mt);margin-bottom:var(--ms-flow-heading-5-mb)}.heading-6[data-v-7122dbe1]{font-size:var(--ms-text-h6);margin-top:var(--ms-flow-heading-6-mt);margin-bottom:var(--ms-flow-heading-6-mb)}.list-item[data-v-617214f9]{margin:var(--ms-flow-list-item-y) 0;padding-left:var(--ms-space-1_5)}ol>.list-item[data-v-617214f9]::marker{color:var(--list-counter-marker);line-height:1.6}ul>.list-item[data-v-617214f9]::marker{color:var(--list-marker)}.list-item>.paragraph-node[data-v-617214f9]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:0}.list-item[data-v-617214f9] .markdown-renderer{content-visibility:visible;contain-intrinsic-size:0px 0px;contain:content}.list-node[data-v-99cb95e0]{margin-top:var(--ms-flow-list-y);margin-bottom:var(--ms-flow-list-y);padding-left:var(--ms-flow-list-indent)}.list-decimal[data-v-99cb95e0]{list-style-type:decimal}.list-disc[data-v-99cb95e0]{list-style-type:disc}@media(max-width:1023px){.list-disc[data-v-99cb95e0]{margin-top:calc(4/3*1em);margin-bottom:calc(4/3*1em);padding-left:var(--ms-flow-list-indent-mobile)}}.html-block-node__raw[data-v-e140a874]{white-space:pre-wrap;overflow-wrap:anywhere;opacity:.85}.html-block-node__placeholder[data-v-e140a874]{display:flex;flex-direction:column;gap:5.6px;padding:8px 0}.html-block-node__placeholder-bar[data-v-e140a874]{display:block;height:12.8px;border-radius:9999px;background-image:linear-gradient(90deg,var(--loading-shimmer),transparent,var(--loading-shimmer));background-size:200% 100%}.paragraph-node[data-v-c59ff506]{font-size:var(--ms-text-body);line-height:var(--ms-leading-body);margin:var(--ms-flow-paragraph-y) 0}li .paragraph-node[data-v-c59ff506]{margin:0}.table-node-wrapper[data-v-39f87b5d]{position:relative;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;overscroll-behavior-y:auto;scrollbar-gutter:stable}.table-node[data-v-39f87b5d]{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:var(--ms-flow-table-y) 0;font-size:inherit;border:1px solid var(--table-border);border-radius:var(--ms-radius);overflow:hidden;box-shadow:var(--ms-shadow-subtle)}.table-node[data-v-39f87b5d] th,.table-node[data-v-39f87b5d] td{border-bottom:1px solid var(--table-border);border-right:1px solid var(--table-border);padding:var(--ms-flow-table-cell);white-space:normal;overflow-wrap:break-word;word-break:normal}.table-node[data-v-39f87b5d] th:last-child,.table-node[data-v-39f87b5d] td:last-child{border-right:none}.table-node[data-v-39f87b5d] tbody tr:last-child td{border-bottom:none}.table-node[data-v-39f87b5d] thead th{position:relative;font-weight:600;background-color:var(--table-header-bg);border-bottom-width:2px}.table-node__resize-handle[data-v-39f87b5d]{position:absolute;top:0;right:-4px;bottom:0;z-index:1;width:8px;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none}.table-node__resize-handle[data-v-39f87b5d]:after{content:"";position:absolute;top:.35em;bottom:.35em;left:50%;width:2px;border-radius:9999px;background:color-mix(in srgb,var(--table-border) 45%,hsl(var(--ms-foreground)));opacity:0;transform:translate(-50%);transition:opacity var(--ms-duration-fast) var(--ms-ease-standard)}.table-node__resize-handle[data-v-39f87b5d]:hover:after,.table-node__resize-handle[data-v-39f87b5d]:focus-visible:after{opacity:1}.table-node[data-v-39f87b5d] tbody tr:nth-child(2n){background-color:hsl(var(--ms-muted) / .35)}.table-node[data-v-39f87b5d] tbody tr:hover{background-color:var(--code-action-hover-bg)}.table-node--loading tbody td[data-v-39f87b5d]{position:relative;overflow:hidden}.table-node--loading tbody td[data-v-39f87b5d]>*{visibility:hidden}.table-node--loading tbody td[data-v-39f87b5d]:after{content:"";position:absolute;inset:0;border-radius:calc(var(--ms-radius) * .5);background:linear-gradient(90deg,var(--loading-shimmer) 25%,var(--loading-shimmer) 50%,var(--loading-shimmer) 75%);background-size:200% 100%;animation:table-node-shimmer-39f87b5d 1.2s linear infinite;will-change:background-position}.table-node__loading[data-v-39f87b5d]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.table-node__spinner[data-v-39f87b5d]{width:40px;height:40px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-39f87b5d],.table-node-fade-leave-active[data-v-39f87b5d]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-39f87b5d],.table-node-fade-leave-to[data-v-39f87b5d]{opacity:0}[data-v-39f87b5d] .table-node .markdown-renderer{display:contents;content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}[data-v-39f87b5d] .table-node .markdown-renderer .node-slot,[data-v-39f87b5d] .table-node .markdown-renderer .node-content,[data-v-39f87b5d] .table-node .markdown-renderer .node-space{display:contents}[data-v-39f87b5d] .table-node .text-node,[data-v-39f87b5d] .table-node code{white-space:inherit;overflow-wrap:inherit;word-break:inherit;max-width:none}@keyframes table-node-shimmer-39f87b5d{0%{background-position:0% 0%}50%{background-position:100% 0%}to{background-position:200% 0%}}.hr+.table-node-wrapper[data-v-39f87b5d]{margin-top:0}.hr+.table-node-wrapper .table-node[data-v-39f87b5d]{margin-top:0}.sr-only[data-v-39f87b5d]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hr-node[data-v-39b2349c]{border-top-width:1px;border-color:var(--hr-border);margin:var(--ms-flow-hr-y) 0}.vmr-container[data-v-911e41c4]{margin-top:16px;margin-bottom:16px;border-radius:var(--ms-radius);border-width:1px;padding:16px;border-left-width:var(--ms-border-width-strong)}.height-estimation-probes[data-v-3e0766e2]{position:absolute;left:-100000px;top:0;visibility:hidden;pointer-events:none;overflow:hidden;z-index:-1}.node-content[data-v-3e0766e2]{width:100%}.node-content-flow-root[data-v-3e0766e2]{display:flow-root}.markdown-renderer[data-v-a9489508]{position:relative;contain:layout;content-visibility:auto;contain-intrinsic-size:800px 600px}.markdown-renderer.virtualized[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:auto}.markdown-renderer.stable-layout[data-v-a9489508]{content-visibility:visible;contain-intrinsic-size:none}.node-slot[data-v-a9489508],.node-content[data-v-a9489508]{width:100%}.markdown-renderer.virtualized .node-slot[data-v-a9489508],.markdown-renderer.virtualized .node-content[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-slot[data-v-a9489508],.markdown-renderer.virtual-scroll-coordinated .node-content[data-v-a9489508]{display:flow-root}.node-placeholder[data-v-a9489508]{width:100%;min-height:16px;margin:4px 0}.node-placeholder[data-v-a9489508]:first-child{margin-top:0}.node-spacer[data-v-a9489508]{width:100%}.unknown-node[data-v-a9489508]{color:hsl(var(--ms-muted-foreground));font-style:italic;margin:var(--ms-flow-paragraph-y) 0}.typewriter-cursor[data-v-a9489508]{position:absolute;left:0;top:0;display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;visibility:hidden;animation:typewriter-cursor-blink-a9489508 1s steps(1,end) infinite}@keyframes typewriter-cursor-blink-a9489508{0%,49%{opacity:1}50%,to{opacity:0}}.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{content:"";display:inline-block;width:.55em;height:1em;margin-left:.08em;vertical-align:-.12em;border-right:2px solid currentColor;pointer-events:none;animation:typewriter-cursor-blink 1s steps(1,end) infinite}@media(prefers-reduced-motion:reduce){.markstream-vue.typewriter-simple-cursor .typewriter-simple-cursor-target:after{animation:none}}.markstream-vue .fade-enter-from{opacity:0}.markstream-vue .fade-enter-active{transition:opacity var(--fade-duration, .28s) var(--fade-ease, cubic-bezier(.33, 0, .67, 1));will-change:opacity}.markstream-vue .fade-enter-to{opacity:1}.admonition[data-v-a83480e1]{position:relative;margin:var(--ms-flow-admonition-y) 0;padding:.25em .75em .375em;border:1px solid var(--admonition-border);border-radius:var(--ms-radius);color:var(--admonition-fg)}.admonition-legend[data-v-a83480e1]{position:absolute;top:0;left:.75em;transform:translateY(-50%);display:inline-flex;align-items:center;gap:.35em;padding:0 .5em;background-color:hsl(var(--ms-background));font-size:13px;font-weight:600;line-height:1}.admonition-icon[data-v-a83480e1]{flex-shrink:0}.admonition-title[data-v-a83480e1]{white-space:nowrap}.admonition-content[data-v-a83480e1]{padding-top:.25em;color:var(--admonition-fg)}.admonition-note[data-v-a83480e1],.admonition-info[data-v-a83480e1]{border-color:hsl(var(--ms-info) / .3);background-color:hsl(var(--ms-info) / .04)}.admonition-note .admonition-legend[data-v-a83480e1],.admonition-info .admonition-legend[data-v-a83480e1]{color:var(--admonition-note)}.admonition-tip[data-v-a83480e1]{border-color:hsl(var(--ms-success) / .3);background-color:hsl(var(--ms-success) / .04)}.admonition-tip .admonition-legend[data-v-a83480e1]{color:var(--admonition-tip)}.admonition-warning[data-v-a83480e1],.admonition-caution[data-v-a83480e1]{border-color:hsl(var(--ms-warning) / .3);background-color:hsl(var(--ms-warning) / .04)}.admonition-warning .admonition-legend[data-v-a83480e1],.admonition-caution .admonition-legend[data-v-a83480e1]{color:var(--admonition-warning)}.admonition-danger[data-v-a83480e1],.admonition-error[data-v-a83480e1]{border-color:hsl(var(--ms-destructive) / .3);background-color:hsl(var(--ms-destructive) / .04)}.admonition-danger .admonition-legend[data-v-a83480e1],.admonition-error .admonition-legend[data-v-a83480e1]{color:var(--admonition-danger)}.admonition-toggle[data-v-a83480e1]{margin-left:.25em;background:transparent;border:none;color:inherit;cursor:pointer;padding:2px;border-radius:calc(var(--ms-radius) * .5);display:inline-flex;align-items:center;transition:background-color var(--ms-duration-fast) var(--ms-ease-standard)}.admonition-toggle[data-v-a83480e1]:hover{background-color:hsl(var(--ms-accent))}.admonition-toggle[data-v-a83480e1]:focus-visible{outline:var(--ms-focus-ring-width) solid var(--focus-ring);outline-offset:var(--ms-focus-ring-offset)}.admonition-content[data-v-a83480e1] .markdown-renderer{content-visibility:visible;contain:content;contain-intrinsic-size:0px 0px}.tooltip-element[data-v-c606ee4c]{z-index:9999;display:inline-block;max-width:320px;padding:4px 8px;border-radius:calc(var(--ms-radius) * .75);font-size:12px;line-height:1.4;white-space:normal;word-break:break-word;pointer-events:none;background-color:var(--tooltip-bg);color:var(--tooltip-fg);box-shadow:inset 0 1px #ffffff26,0 0 0 1px #0000001f,var(--ms-shadow-popover);transition:transform var(--ms-duration-emphasis) var(--ms-ease-spring),box-shadow var(--ms-duration-emphasis) var(--ms-ease-spring)}.tooltip-arrow[data-v-c606ee4c]{position:absolute;width:6px;height:6px;background:inherit;transform:rotate(45deg)}.tooltip-arrow[data-placement^=top][data-v-c606ee4c]{bottom:-3px}.tooltip-arrow[data-placement^=bottom][data-v-c606ee4c]{top:-3px}.tooltip-arrow[data-placement^=left][data-v-c606ee4c]{right:-3px}.tooltip-arrow[data-placement^=right][data-v-c606ee4c]{left:-3px}.tooltip-enter-active[data-v-c606ee4c]{transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.tooltip-leave-active[data-v-c606ee4c]{transition:opacity .12s ease-in,transform .12s ease-in}.tooltip-enter-from[data-v-c606ee4c]{opacity:0;transform:scale(.96)}.tooltip-enter-to[data-v-c606ee4c],.tooltip-leave-from[data-v-c606ee4c]{opacity:1;transform:scale(1)}.tooltip-leave-to[data-v-c606ee4c]{opacity:0;transform:scale(.97)}.action-icon{width:var(--ms-action-btn-icon, 14px);height:var(--ms-action-btn-icon, 14px);max-width:20px;max-height:20px}.code-block-container{margin:var(--ms-flow-codeblock-y) 0;contain:layout style;container-type:inline-size;background:var(--code-bg);border-color:var(--code-border);color:var(--code-fg);box-shadow:var(--ms-shadow-subtle)}.code-block-header{position:relative;z-index:1;gap:var(--ms-gap-header);border-radius:var(--ms-radius) var(--ms-radius) 0 0;overflow:visible}.code-block-header .code-header-main{min-width:0;flex:1 1 auto;display:flex;align-items:center;gap:var(--ms-gap-header-main);overflow:hidden}.code-block-header .code-header-copy{min-width:0;display:grid;gap:2px}.code-block-header .code-header-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ms-text-label);font-weight:500;color:var(--code-action-fg)}.code-block-header .code-header-caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--code-line-number)}.code-block-header .code-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--ms-gap-header-actions);flex-wrap:wrap}.code-block-header .icon-slot{display:inline-flex;align-items:center;justify-content:center}.code-block-header .icon-slot svg,.code-block-header .icon-slot img{display:block;width:100%;height:100%}.code-diff-stats{display:inline-flex;align-items:center;gap:var(--ms-space-1_5);margin-right:var(--ms-space-1);font-size:var(--ms-text-label);font-weight:600;line-height:1;font-variant-numeric:tabular-nums}.code-diff-stat{display:inline-flex;align-items:center;padding:2px 6px;border-radius:var(--ms-radius);line-height:1}.code-diff-stat.removed{color:var(--diff-removed-fg);background:hsl(var(--ms-diff-removed) / .1)}.code-diff-stat.added{color:var(--diff-added-fg);background:hsl(var(--ms-diff-added) / .1)}.code-more-menu{position:absolute;top:100%;right:0;margin-top:4px;z-index:50;border-radius:var(--ms-radius)}.code-block-shell-content,.code-loading-placeholder{overflow:hidden;border-radius:0 0 var(--ms-radius) var(--ms-radius);contain:content}.code-block-shell-content--collapsed{height:0;min-height:0;visibility:hidden;pointer-events:none}.code-menu-enter-active,.code-menu-leave-active{transform-origin:top right}.code-menu-enter-active{transition:opacity .22s cubic-bezier(.16,1,.3,1),transform .22s cubic-bezier(.16,1,.3,1)}.code-menu-leave-active{transition:opacity .14s ease-in,transform .14s ease-in}.code-menu-enter-from{opacity:0;transform:scale(.9) translateY(-4px)}.code-menu-leave-to{opacity:0;transform:scale(.95) translateY(-2px)}.html-preview-frame__backdrop[data-v-24e66176]{position:fixed;inset:0;background-color:var(--modal-overlay);display:flex;align-items:center;justify-content:center;z-index:50}.html-preview-frame[data-v-24e66176]{width:80vw;max-width:960px;height:70vh;background-color:var(--modal-bg);color:var(--modal-fg);border-radius:calc(var(--ms-radius) * 2);overflow:hidden;box-shadow:var(--ms-shadow-preview);display:flex;flex-direction:column}.html-preview-frame__header[data-v-24e66176]{display:flex;justify-content:space-between;align-items:center;padding:6.4px 12px;border-bottom:1px solid var(--code-border)}.html-preview-frame__title[data-v-24e66176]{display:inline-flex;align-items:center;gap:6.4px;font-size:12px;font-weight:500;letter-spacing:.02em;text-transform:uppercase;opacity:.85}.html-preview-frame__dot[data-v-24e66176]{width:8px;height:8px;border-radius:999px;background-color:hsl(var(--ms-success))}.html-preview-frame__label[data-v-24e66176]{white-space:nowrap}.html-preview-frame__close[data-v-24e66176]{border:none;background:transparent;font-size:20px;line-height:1;cursor:pointer;color:var(--modal-fg)}.html-preview-frame__iframe[data-v-24e66176]{width:100%;height:100%;border:none;display:block}@media(max-width:640px){.html-preview-frame[data-v-24e66176]{width:100vw;height:80vh;border-radius:0}}.code-block-container[data-v-ef6e4bb8]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--vscode-editor-selectionBackground: var(--markstream-code-fallback-selection-bg);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 16px 40px -32px hsl(var(--ms-foreground) / .18);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .92);--markstream-diff-editor-bg: hsl(var(--ms-background));--markstream-diff-editor-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-fg: hsl(var(--ms-foreground));--markstream-diff-unchanged-bg: hsl(var(--ms-muted));--markstream-diff-unchanged-divider: hsl(var(--ms-background) / .94);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .26);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: linear-gradient(180deg, var(--code-bg) 0%, hsl(var(--ms-muted)) 100%);--markstream-diff-panel-bg-soft: var(--code-bg);--markstream-diff-panel-bg-strong: var(--code-bg);--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .42);--markstream-diff-gutter-bg: transparent;--markstream-diff-gutter-guide: hsl(var(--ms-border) / .72);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(var(--ms-muted) / .45);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: var(--diff-added-fg);--markstream-diff-removed-fg: var(--diff-removed-fg);--markstream-diff-added-line: var(--diff-added-bg);--markstream-diff-removed-line: var(--diff-removed-bg);--markstream-diff-added-inline: var(--diff-added-inline-bg);--markstream-diff-removed-inline: var(--diff-removed-inline-bg);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: var(--diff-added-bg);--markstream-diff-removed-line-fill: var(--diff-removed-bg)}.code-block-container.is-dark[data-v-ef6e4bb8]{--markstream-code-fallback-bg: var(--code-bg);--markstream-code-fallback-fg: var(--code-fg);--markstream-code-border-color: var(--code-border);--markstream-code-fallback-selection-bg: var(--code-selection-bg);--markstream-diff-frame-border: var(--code-border);--markstream-diff-frame-shadow: 0 18px 40px -30px hsl(var(--ms-foreground) / .84);--markstream-diff-shell-fg: hsl(var(--ms-foreground));--markstream-diff-shell-muted: hsl(var(--ms-muted-foreground));--markstream-diff-shell-border: var(--code-border);--markstream-diff-shell-shadow: var(--ms-shadow-subtle);--markstream-diff-shell-bg: var(--code-bg);--markstream-diff-header-border: hsl(var(--ms-border) / .82);--markstream-diff-editor-bg: #121212;--markstream-diff-editor-fg: #e5e5e5;--markstream-diff-unchanged-fg: #d4d4d4;--markstream-diff-unchanged-bg: #262626;--markstream-diff-unchanged-divider: hsl(0 0% 100% / .08);--markstream-diff-focus: var(--focus-ring);--markstream-diff-widget-shadow: hsl(var(--ms-foreground) / .72);--markstream-diff-action-hover: var(--code-action-hover-bg);--markstream-diff-panel-bg: #121212;--markstream-diff-panel-bg-soft: #121212;--markstream-diff-panel-bg-strong: #121212;--markstream-diff-panel-border: hsl(var(--ms-border) / .3);--markstream-diff-pane-divider: hsl(var(--ms-border) / .34);--markstream-diff-gutter-bg: linear-gradient( 180deg, hsl(0 0% 7% / .94) 0%, hsl(0 0% 7% / .98) 100% );--markstream-diff-gutter-guide: hsl(var(--ms-muted-foreground) / .08);--markstream-diff-gutter-gap: 8px;--markstream-diff-line-number-bg: hsl(0 0% 7% / .98);--markstream-diff-line-number: var(--code-line-number);--markstream-diff-line-number-active: var(--code-line-number);--markstream-diff-added-fg: hsl(152 42% 60%);--markstream-diff-removed-fg: hsl(0 58% 58%);--markstream-diff-added-line: hsl(152 42% 60% / .18);--markstream-diff-removed-line: hsl(0 58% 58% / .18);--markstream-diff-added-inline: hsl(152 42% 60% / .28);--markstream-diff-removed-inline: hsl(0 58% 58% / .28);--markstream-diff-added-inline-border: transparent;--markstream-diff-removed-inline-border: transparent;--markstream-diff-added-gutter: linear-gradient( 90deg, var(--markstream-diff-added-fg) 0 var(--stream-monaco-gutter-marker-width, 4px), transparent var(--stream-monaco-gutter-marker-width, 4px) 100% );--markstream-diff-removed-gutter: repeating-linear-gradient( 180deg, var(--markstream-diff-removed-fg) 0 2px, transparent 2px 4px ) left / var(--stream-monaco-gutter-marker-width, 4px) 100% no-repeat;--markstream-diff-added-line-fill: hsl(152 42% 60% / .18);--markstream-diff-removed-line-fill: hsl(0 58% 58% / .18)}.code-editor-container[data-v-ef6e4bb8]{transition:none;box-sizing:border-box;min-width:0;width:100%}.code-block-container.is-diff .code-editor-container[data-v-ef6e4bb8]{transition:none}.code-editor-layer[data-v-ef6e4bb8]{display:grid;min-width:0;position:relative}.code-editor-layer--collapsed[data-v-ef6e4bb8]{height:0;min-height:0;overflow:hidden;visibility:hidden;pointer-events:none}.code-editor-layer>.code-editor-container[data-v-ef6e4bb8]{grid-area:1 / 1;z-index:1}.code-editor-layer>pre.code-pre-fallback[data-v-ef6e4bb8]{grid-area:1 / 1;position:relative;z-index:2}.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .monaco-editor-background,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .lines-content{background:var(--vscode-editor-background, var(--markstream-code-fallback-bg))!important}.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-lines,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-line,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .view-line span,.code-block-container.is-plain-text[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .line-numbers{color:var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))!important}.code-block-container.is-diff[data-v-ef6e4bb8]{color:var(--markstream-diff-shell-fg);border-color:var(--markstream-diff-shell-border);background:var(--markstream-diff-shell-bg);box-shadow:var(--markstream-diff-shell-shadow);--vscode-editor-selectionBackground: var(--markstream-diff-action-hover);--code-fg: var(--markstream-diff-shell-fg);--code-header-bg: transparent;--code-border: var(--markstream-diff-header-border);--code-line-number: var(--markstream-diff-shell-muted);--code-action-fg: var(--markstream-diff-shell-muted)}.code-block-container.is-diff .code-editor-layer[data-v-ef6e4bb8]{background:transparent;--vscode-editor-background: var(--markstream-diff-editor-bg);--vscode-editor-foreground: var(--markstream-diff-editor-fg);--vscode-diffEditor-unchangedRegionForeground: var(--markstream-diff-unchanged-fg);--vscode-diffEditor-unchangedRegionBackground: var(--markstream-diff-unchanged-bg);--vscode-focusBorder: var(--markstream-diff-focus);--vscode-widget-shadow: var(--markstream-diff-widget-shadow);--vscode-editor-selectionBackground: color-mix( in srgb, var(--markstream-diff-editor-bg) 90%, var(--markstream-diff-editor-fg) 10% );--stream-monaco-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-editor-fg: var(--markstream-diff-editor-fg);--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg);--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg);--stream-monaco-frame-radius: 0;--stream-monaco-fixed-editor-bg: var(--markstream-diff-editor-bg);--stream-monaco-frame-border: transparent;--stream-monaco-frame-shadow: none;--stream-monaco-panel-bg: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-soft: var(--markstream-diff-editor-bg);--stream-monaco-panel-bg-strong: var(--markstream-diff-editor-bg);--stream-monaco-panel-border: transparent;--stream-monaco-pane-divider: var(--markstream-diff-pane-divider);--stream-monaco-gutter-bg: var(--markstream-diff-gutter-bg);--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide);--stream-monaco-gutter-marker-width: 4px;--stream-monaco-gutter-gap: 1ch;--stream-monaco-line-number-bg: var(--markstream-diff-line-number-bg);--stream-monaco-line-number: var(--markstream-diff-line-number);--stream-monaco-line-number-active: var(--markstream-diff-line-number-active);--stream-monaco-line-number-left: 0px;--stream-monaco-line-number-width: 2ch;--stream-monaco-line-number-padding-left: 2ch;--stream-monaco-line-number-padding-right: 1ch;--stream-monaco-line-number-separator-width: 2px;--stream-monaco-layout-character-width: var(--markstream-code-layout-character-width, 1ch);--stream-monaco-line-number-box-width: calc( var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-layout-character-width) + var(--stream-monaco-line-number-separator-width) );--stream-monaco-diff-code-gap: 1ch;--stream-monaco-diff-code-padding: 0px;--stream-monaco-line-number-gap-to-code: var(--stream-monaco-diff-code-gap);--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) );--stream-monaco-original-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-original-scrollable-left: var(--stream-monaco-original-margin-width);--stream-monaco-original-scrollable-width: calc( 100% - var(--stream-monaco-original-margin-width) );--stream-monaco-modified-margin-width: calc( var(--stream-monaco-line-number-left) + var(--stream-monaco-line-number-box-width) + var(--stream-monaco-line-number-gap-to-code) );--stream-monaco-modified-scrollable-left: var(--stream-monaco-modified-margin-width);--stream-monaco-modified-scrollable-width: calc( 100% - var(--stream-monaco-modified-margin-width) );--stream-monaco-added-fg: var(--markstream-diff-added-fg);--stream-monaco-removed-fg: var(--markstream-diff-removed-fg);--stream-monaco-added-line: var(--markstream-diff-added-line);--stream-monaco-removed-line: var(--markstream-diff-removed-line);--stream-monaco-added-inline: var(--markstream-diff-added-inline);--stream-monaco-removed-inline: var(--markstream-diff-removed-inline);--stream-monaco-added-outline: transparent;--stream-monaco-removed-outline: transparent;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border);--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border);--stream-monaco-added-line-shadow: none;--stream-monaco-removed-line-shadow: none;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter);--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter);--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill);--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill);--stream-monaco-added-border: hsl(var(--ms-diff-added) / .25);--stream-monaco-removed-border: hsl(var(--ms-diff-removed) / .25);--stream-monaco-widget-shadow: var(--markstream-diff-widget-shadow)}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers{left:var(--stream-monaco-line-number-left)!important;width:var(--stream-monaco-line-number-width)!important;min-width:var(--stream-monaco-line-number-width)!important;box-sizing:content-box!important;background:var(--stream-monaco-line-number-bg, var(--markstream-diff-line-number-bg))!important;padding-left:var(--stream-monaco-line-number-padding-left, 2ch)!important;padding-right:var(--stream-monaco-line-number-padding-right, 1ch)!important;border-right:var(--stream-monaco-line-number-separator-width, 2px) solid var(--stream-monaco-editor-bg)!important;text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums;box-shadow:none}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays .line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays .line-numbers *{text-align:var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) )!important;font-variant-numeric:tabular-nums}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .line-delete.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-editor .stream-monaco-fallback-line-number-delete,.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-delete.line-numbers{background:var(--stream-monaco-removed-line-fill)!important;color:var(--stream-monaco-removed-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .line-insert.line-numbers,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.original .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .editor.modified .margin-view-overlays .line-numbers.stream-monaco-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-editor .stream-monaco-fallback-line-number-insert,.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-native-stale .monaco-diff-editor .line-insert.line-numbers{background:var(--stream-monaco-added-line-fill)!important;color:var(--stream-monaco-added-fg)!important;box-shadow:none!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .monaco-editor,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin,.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays{--stream-monaco-line-number-align: var( --markstream-diff-line-number-align, var(--markstream-code-line-number-align, right) ) !important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff){--markstream-code-line-number-box-width: calc( var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + var(--markstream-code-layout-character-width, 1ch) + 2px );--markstream-code-content-left: calc( var(--markstream-code-line-number-box-width) + var(--markstream-code-layout-character-width, 1ch) )}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin,.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .margin-view-overlays{width:var(--markstream-code-content-left)!important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .line-numbers{left:0!important;width:2ch!important;min-width:2ch!important;box-sizing:content-box!important;padding-left:2ch!important;padding-right:1ch!important;border-right:2px solid var(--vscode-editor-background)!important;text-align:var(--markstream-code-line-number-align, right)!important;font-variant-numeric:tabular-nums}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .monaco-scrollable-element.editor-scrollable{left:var(--markstream-code-content-left)!important;width:calc(100% - var(--markstream-code-content-left))!important}.code-block-container[data-v-ef6e4bb8]:not(.is-diff) .monaco-editor .lines-content{left:0!important}.code-editor-container[data-markstream-host-hidden=true][data-v-ef6e4bb8]{position:absolute;inset:0;width:100%;height:100%!important;min-height:0!important;max-height:none!important;overflow:hidden;visibility:hidden;pointer-events:none}pre.code-pre-fallback[data-v-ef6e4bb8]{margin:0;box-sizing:border-box;width:100%;padding:var(--markstream-code-padding-y, 8px) var(--markstream-code-padding-x, 12px);padding-left:var(--markstream-code-padding-left, 52px);background:var(--markstream-code-fallback-bg, var(--code-bg, #fff));color:var(--markstream-code-fallback-fg, var(--code-fg));backface-visibility:visible;transform:none;-webkit-font-smoothing:auto;font-size:var(--vscode-editor-font-size, 12px);line-height:var(--vscode-editor-line-height, 18px);font-weight:400;font-family:var( --markstream-code-font-family, Menlo, Monaco, Courier New, monospace )}pre.code-pre-fallback[data-v-ef6e4bb8] code{font-size:inherit;font-weight:inherit;line-height:inherit;font-family:inherit}pre.code-pre-fallback.is-wrap[data-v-ef6e4bb8]{white-space:pre-wrap;overflow-wrap:anywhere}pre.code-pre-fallback.markstream-pre--diff-preview[data-v-ef6e4bb8]{padding-left:0;padding-right:0}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview{background:var(--markstream-diff-editor-bg);transition:none}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-pane{box-sizing:border-box;padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview:not(.markstream-pre--diff-inline) .markstream-pre__diff-pane{padding-bottom:var(--markstream-pre-diff-pane-bottom-padding, 0px)}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added:after,.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-number{background:var(--stream-monaco-added-line-fill, var(--markstream-diff-added-line-fill, transparent))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed:after,.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-number{background:var(--stream-monaco-removed-line-fill, var(--markstream-diff-removed-line-fill, transparent))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--added>.markstream-pre__diff-rail{background:var(--stream-monaco-added-gutter, var(--markstream-diff-added-gutter, currentColor))!important}.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview .markstream-pre__diff-line--removed>.markstream-pre__diff-rail{background:var(--stream-monaco-removed-gutter, var(--markstream-diff-removed-gutter, currentColor))!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays>.gutter-insert>.cmdr.gutter-insert{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-added-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}.code-block-container.is-diff[data-v-ef6e4bb8] .monaco-diff-editor .margin-view-overlays>.gutter-delete>.cmdr.gutter-delete{background:linear-gradient(90deg,transparent 0 var(--stream-monaco-line-number-box-width),var(--stream-monaco-removed-line-fill) var(--stream-monaco-line-number-box-width) 100%)!important}@media(prefers-reduced-motion:reduce){.code-block-container.is-diff[data-v-ef6e4bb8] pre.code-pre-fallback.markstream-pre--diff-preview{transition:none}}.code-block-container.is-rendering .code-height-placeholder[data-v-ef6e4bb8]{background-size:400% 100%;animation:code-skeleton-shimmer-ef6e4bb8 1.2s ease-in-out infinite;min-height:var(--ms-size-skeleton-min-height);background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%)}.code-loading-placeholder[data-v-ef6e4bb8]{padding:16px;min-height:var(--ms-size-skeleton-min-height)}.loading-skeleton[data-v-ef6e4bb8]{display:flex;flex-direction:column;gap:12px}.skeleton-line[data-v-ef6e4bb8]{height:16px;background:linear-gradient(90deg,var(--loading-shimmer) 25%,hsl(var(--ms-muted) / .7) 37%,var(--loading-shimmer) 63%);background-size:400% 100%;animation:code-skeleton-shimmer-ef6e4bb8 1.2s ease-in-out infinite;border-radius:calc(var(--ms-radius) * .5)}.skeleton-line.short[data-v-ef6e4bb8]{width:60%}.code-block-container[data-markstream-viewport-pending=true] .code-height-placeholder[data-v-ef6e4bb8],.code-block-container[data-markstream-viewport-pending=true] .skeleton-line[data-v-ef6e4bb8]{animation:none}@keyframes code-skeleton-shimmer-ef6e4bb8{0%{background-position:100% 0}to{background-position:0 0}}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center{border-radius:var(--ms-radius)!important;background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;min-height:28px!important;transition:background-color .14s ease,border-color .14s ease!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 4%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 10%,transparent)!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center{background:transparent!important;border-color:transparent!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-appearance-dark .monaco-editor .diff-hidden-lines .center.stream-monaco-focus-within{background:color-mix(in srgb,var(--stream-monaco-editor-fg) 6%,transparent)!important;border-color:color-mix(in srgb,var(--stream-monaco-editor-fg) 12%,transparent)!important;box-shadow:none!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center .stream-monaco-unchanged-count:before{content:"";display:inline-block;width:14px;height:14px;margin-right:4px;flex-shrink:0;background:currentColor;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");mask-size:contain;-webkit-mask-size:contain;mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat}[data-v-ef6e4bb8] .monaco-diff-editor .diffOverview{background-color:var(--vscode-editor-background)}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .diffOverview,[data-v-ef6e4bb8] .stream-monaco-diff-root .decorationsOverviewRuler{display:none!important;width:0!important;min-width:0!important;max-width:0!important;border:0!important;background:transparent!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-diff-editor{border:0!important;border-radius:0!important;box-shadow:none!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-clickable)>*:not(a){visibility:hidden!important}[data-v-ef6e4bb8] .code-block-container .stream-monaco-diff-root .monaco-editor .diff-hidden-lines-compact .text{opacity:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root{--stream-monaco-gutter-guide: var(--markstream-diff-gutter-guide) !important;--stream-monaco-gutter-gap: var(--markstream-diff-gutter-gap) !important;--stream-monaco-line-number: var(--markstream-diff-line-number) !important;--stream-monaco-line-number-active: var(--markstream-diff-line-number-active) !important;--stream-monaco-added-fg: var(--markstream-diff-added-fg) !important;--stream-monaco-removed-fg: var(--markstream-diff-removed-fg) !important;--stream-monaco-added-line: var(--markstream-diff-added-line) !important;--stream-monaco-removed-line: var(--markstream-diff-removed-line) !important;--stream-monaco-added-inline: var(--markstream-diff-added-inline) !important;--stream-monaco-removed-inline: var(--markstream-diff-removed-inline) !important;--stream-monaco-added-inline-border: var(--markstream-diff-added-inline-border) !important;--stream-monaco-removed-inline-border: var(--markstream-diff-removed-inline-border) !important;--stream-monaco-added-line-fill: var(--markstream-diff-added-line-fill) !important;--stream-monaco-removed-line-fill: var(--markstream-diff-removed-line-fill) !important;--stream-monaco-added-gutter: var(--markstream-diff-added-gutter) !important;--stream-monaco-removed-gutter: var(--markstream-diff-removed-gutter) !important;--stream-monaco-added-line-shadow: none !important;--stream-monaco-removed-line-shadow: none !important;--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;box-sizing:border-box;min-width:0;width:100%}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .overflow-guard,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side),[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-editor,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .overflow-guard{min-width:0!important;width:100%!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .editor.modified .monaco-scrollable-element.editor-scrollable,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .editor.modified .monaco-scrollable-element.editor-scrollable{left:var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width))!important;width:calc(100% - var(--stream-monaco-modified-scrollable-left, var(--stream-monaco-modified-margin-width)))!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .editor.modified .view-lines .view-line.stream-monaco-line-insert-fill,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor .editor.original .view-lines .view-line.stream-monaco-line-delete-fill{width:1000000px!important}.code-block-container.is-diff[data-v-ef6e4bb8] .stream-monaco-fallback-inline-delete-line{box-sizing:border-box;padding-left:var(--stream-monaco-diff-code-padding, 0px)}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline .monaco-diff-editor .scrollbar.horizontal,[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-diff-editor:not(.side-by-side) .scrollbar.horizontal{display:none!important;height:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .view-lines.line-delete{margin-left:0!important;width:100%!important;background:var(--stream-monaco-removed-line-fill)!important;box-shadow:var(--stream-monaco-removed-line-shadow)!important;display:block!important;height:-moz-max-content!important;height:max-content!important;min-height:18px!important;overflow:visible!important}[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .gutter-delete,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .inline-deleted-margin-view-zone,[data-v-ef6e4bb8] .stream-monaco-diff-root.stream-monaco-diff-inline.stream-monaco-diff-inline-native-ready.stream-monaco-diff-native-stale .monaco-diff-editor .editor.modified .stream-monaco-fallback-inline-delete-margin{background:var(--stream-monaco-removed-gutter),var(--stream-monaco-removed-line-fill)!important;display:block!important;height:100%!important;min-height:18px!important;overflow:visible!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .monaco-editor .diff-hidden-lines .center:not(.stream-monaco-unchanged-bridge-source),[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{--stream-monaco-unchanged-bg: var(--markstream-diff-unchanged-bg) !important;--stream-monaco-unchanged-fg: var(--markstream-diff-unchanged-fg) !important;background:var(--stream-monaco-unchanged-bg)!important;color:var(--stream-monaco-unchanged-fg)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge{right:calc(var(--stream-monaco-gutter-marker-width) - var(--stream-monaco-unchanged-rail-width) / 2 + (var(--stream-monaco-gutter-gap) * 2))!important;width:auto!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-summary.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important;color:var(--markstream-diff-unchanged-fg)!important;padding-left:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important;padding-right:calc(var(--stream-monaco-gutter-marker-width) + (var(--stream-monaco-gutter-gap) * 2))!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge.stream-monaco-diff-unchanged-bridge-line-info .stream-monaco-unchanged-rail,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{background:var(--stream-monaco-unchanged-bg)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail{border-right-color:var(--markstream-diff-unchanged-divider)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal{border-bottom-color:transparent!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-both .stream-monaco-unchanged-reveal:first-child{border-bottom-color:var(--markstream-diff-unchanged-divider)!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-top-only .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-rail.stream-monaco-unchanged-rail-bottom-only .stream-monaco-unchanged-reveal{border-bottom:0!important}[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-meta,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-count,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-metadata-label,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:hover,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal:focus-visible,[data-v-ef6e4bb8] .stream-monaco-diff-root .stream-monaco-diff-unchanged-bridge .stream-monaco-unchanged-reveal.stream-monaco-focus-visible{color:var(--markstream-diff-unchanged-fg)!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center{align-items:center;justify-content:center}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center{align-items:center;justify-content:center!important;position:relative}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center:not(.stream-monaco-clickable){opacity:0!important;pointer-events:none!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.modified .diff-hidden-lines .center .stream-monaco-unchanged-meta{justify-content:center!important;padding:0 28px!important}[data-v-ef6e4bb8] .monaco-diff-editor:not(.side-by-side) .editor.original .diff-hidden-lines .center>div:first-child{align-items:center;display:flex;justify-content:center!important;min-width:100%;width:100%!important}[data-v-ef6e4bb8] .markstream-inline-fold-proxy{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:calc(var(--ms-radius) * .5);box-shadow:none;cursor:pointer;inset:0;padding:0;pointer-events:auto;position:absolute;z-index:2}[data-v-ef6e4bb8] .markstream-inline-fold-proxy:hover,[data-v-ef6e4bb8] .markstream-inline-fold-proxy:focus-visible{background:transparent}[data-v-ef6e4bb8] .markstream-inline-fold-proxy:focus-visible{outline:1px solid var(--vscode-focusBorder, currentColor);outline-offset:-1px}.math-inline-wrapper[data-v-6c556261]{position:relative;display:inline-block}.math-inline[data-v-6c556261]{display:inline-block;vertical-align:middle}.math-inline--fallback[data-v-6c556261]{white-space:pre-wrap}.math-inline__loading[data-v-6c556261]{display:inline-flex;align-items:center;justify-content:center;pointer-events:none}.math-inline__spinner[data-v-6c556261]{width:16px;height:16px;border-radius:9999px;border:2px solid color-mix(in srgb,var(--loading-spinner) 25%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);will-change:transform}.table-node-fade-enter-active[data-v-6c556261],.table-node-fade-leave-active[data-v-6c556261]{transition:opacity var(--ms-duration-standard) var(--ms-ease-standard)}.table-node-fade-enter-from[data-v-6c556261],.table-node-fade-leave-to[data-v-6c556261]{opacity:0}.sr-only[data-v-6c556261]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.math-block[data-v-939191ad]{min-height:var(--ms-size-math-min-height);transition:min-height var(--ms-duration-overlay) var(--ms-ease-standard)}.math-loading-overlay[data-v-939191ad]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px);min-height:var(--ms-size-math-min-height)}.math-loading-spinner[data-v-939191ad]{width:20px;height:20px;border:2px solid color-mix(in srgb,var(--loading-spinner) 15%,transparent);border-top-color:color-mix(in srgb,var(--loading-spinner) 80%,transparent);border-radius:50%;animation:math-spin-939191ad .8s linear infinite}@keyframes math-spin-939191ad{to{transform:rotate(360deg)}}.math-rendering[data-v-939191ad]{opacity:.3;transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.math-block__fallback[data-v-939191ad]{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.math-fade-enter-active[data-v-939191ad],.math-fade-leave-active[data-v-939191ad]{transition:all var(--ms-duration-slow) var(--ms-ease-standard)}.math-fade-enter-from[data-v-939191ad],.math-fade-leave-to[data-v-939191ad]{opacity:0}.action-icon{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot{display:inline-flex;align-items:center;justify-content:center}.icon-slot svg{display:block;width:100%;height:100%}.mermaid-block-container[data-v-73c385f8]{margin:var(--ms-flow-diagram-y) 0;border-color:var(--diagram-border)}.mermaid-block-header[data-v-73c385f8]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border)}.mermaid-label-text[data-v-73c385f8]{color:var(--code-action-fg)}.mermaid-mode-toggle-group[data-v-73c385f8]{background:transparent}.mermaid-mode-btn[data-v-73c385f8]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6}.mermaid-mode-btn[data-v-73c385f8]:hover{opacity:.9}.mermaid-mode-btn.is-active[data-v-73c385f8]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.mermaid-header-actions[data-v-73c385f8]{gap:var(--ms-gap-header-actions)}.mermaid-action-btn[data-v-73c385f8]{font-family:inherit;font-size:var(--ms-text-label);color:var(--code-action-fg)}.mermaid-action-btn[data-v-73c385f8]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.mermaid-action-btn[data-v-73c385f8]:active{transform:scale(.98)}.mermaid-source-panel[data-v-73c385f8]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.mermaid-source-code[data-v-73c385f8]{color:hsl(var(--ms-foreground))}.mermaid-preview-area[data-v-73c385f8]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-standard)}.mermaid-modal-overlay[data-v-73c385f8]{background:var(--modal-overlay)}.mermaid-modal-panel[data-v-73c385f8]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}._mermaid[data-v-73c385f8]{position:relative;font-family:inherit;content-visibility:auto;contain:content;contain-intrinsic-size:var(--ms-size-diagram-min-height) 240px}._mermaid[data-v-73c385f8] [data-mermaid-svg-layer]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;min-height:100%}._mermaid[data-v-73c385f8] svg{width:100%;height:auto;max-height:100%;display:block}.fullscreen ._mermaid[data-v-73c385f8] svg{max-height:none}.fullscreen[data-v-73c385f8]{width:100%;max-height:100%!important;height:100%!important}.mermaid-dialog-enter-from[data-v-73c385f8],.mermaid-dialog-leave-to[data-v-73c385f8]{opacity:0}.mermaid-dialog-enter-active[data-v-73c385f8],.mermaid-dialog-leave-active[data-v-73c385f8]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.mermaid-dialog-enter-from .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-to .dialog-panel[data-v-73c385f8]{transform:translateY(8px) scale(.98);opacity:.98}.mermaid-dialog-enter-to .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-from .dialog-panel[data-v-73c385f8]{transform:translateY(0) scale(1);opacity:1}.mermaid-dialog-enter-active .dialog-panel[data-v-73c385f8],.mermaid-dialog-leave-active .dialog-panel[data-v-73c385f8]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-block-container[data-v-de34ec4b]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.infographic-block-header[data-v-de34ec4b]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.infographic-label[data-v-de34ec4b]{font-size:var(--ms-text-label);color:hsl(var(--ms-muted-foreground))}.action-icon[data-v-de34ec4b]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.icon-slot[data-v-de34ec4b]{display:inline-flex;align-items:center;justify-content:center}.icon-slot[data-v-de34ec4b] svg{display:block;width:100%;height:100%}.infographic-mode-toggle[data-v-de34ec4b]{background:transparent}.infographic-mode-btn[data-v-de34ec4b]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:color .15s,background-color .15s,opacity .15s}.infographic-mode-btn[data-v-de34ec4b]:hover{opacity:.9}.infographic-mode-btn.is-active[data-v-de34ec4b]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.infographic-header-actions[data-v-de34ec4b]{gap:var(--ms-gap-header-actions)}.infographic-action-btn[data-v-de34ec4b]{font-family:inherit;color:var(--code-action-fg);transition:background-color .15s,color .15s}.infographic-action-btn[data-v-de34ec4b]:hover{background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.infographic-action-btn[data-v-de34ec4b]:active{transform:scale(.98)}.infographic-source[data-v-de34ec4b]{padding:var(--ms-inset-panel-body);background:var(--diagram-bg)}.infographic-source-code[data-v-de34ec4b]{color:hsl(var(--ms-foreground))}.infographic-preview[data-v-de34ec4b]{background:var(--diagram-bg);min-height:var(--ms-size-diagram-min-height);transition-duration:var(--ms-duration-fast)}.infographic-pending-source[data-v-de34ec4b]{position:absolute;inset:0;z-index:1;margin:0;padding:var(--ms-inset-panel-body);overflow:auto;color:hsl(var(--ms-foreground));text-align:left;background:var(--diagram-bg)}.infographic-modal-overlay[data-v-de34ec4b]{background:var(--modal-overlay)}.infographic-modal-panel[data-v-de34ec4b]{background:var(--modal-bg);color:var(--modal-fg);box-shadow:var(--ms-shadow-modal)}.fullscreen[data-v-de34ec4b]{width:100%;max-height:100%!important;height:100%!important}.infographic-dialog-enter-from[data-v-de34ec4b],.infographic-dialog-leave-to[data-v-de34ec4b]{opacity:0}.infographic-dialog-enter-active[data-v-de34ec4b],.infographic-dialog-leave-active[data-v-de34ec4b]{transition:opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.infographic-dialog-enter-from .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-to .dialog-panel[data-v-de34ec4b]{transform:translateY(8px) scale(.98);opacity:.98}.infographic-dialog-enter-to .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-from .dialog-panel[data-v-de34ec4b]{transform:translateY(0) scale(1);opacity:1}.infographic-dialog-enter-active .dialog-panel[data-v-de34ec4b],.infographic-dialog-leave-active .dialog-panel[data-v-de34ec4b]{transition:transform var(--ms-duration-overlay) var(--ms-ease-standard),opacity var(--ms-duration-overlay) var(--ms-ease-standard)}.d2-block-container[data-v-3b434cf5]{margin:var(--ms-flow-diagram-y) 0;background:var(--diagram-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground));box-shadow:var(--ms-shadow-subtle)}.d2-block-header[data-v-3b434cf5]{padding:var(--ms-inset-panel-y) var(--ms-inset-panel-x);background:var(--diagram-header-bg);border-color:var(--diagram-border);color:hsl(var(--ms-foreground))}.d2-mode-toggle[data-v-3b434cf5]{background:transparent}.mode-btn[data-v-3b434cf5]{font-size:var(--ms-text-label);color:var(--code-action-fg);opacity:.6;transition:opacity .2s,color .2s,background-color .2s}.mode-btn[data-v-3b434cf5]:hover{opacity:.9}.mode-btn.is-active[data-v-3b434cf5]{background:hsl(var(--ms-foreground) / .08);color:var(--code-fg);opacity:1}.d2-header-actions[data-v-3b434cf5]{gap:var(--ms-gap-header-actions)}.d2-action-btn[data-v-3b434cf5]{color:var(--code-action-fg);opacity:.7;transition:opacity .2s,background-color .15s,color .15s}.d2-action-btn[data-v-3b434cf5]:hover{opacity:1;background:var(--code-action-hover-bg);color:var(--code-action-hover-fg)}.d2-action-btn[data-v-3b434cf5]:disabled{opacity:.3;cursor:not-allowed}.d2-block-body[data-v-3b434cf5]{position:relative}.d2-source[data-v-3b434cf5]{padding:var(--ms-inset-panel-body) var(--ms-inset-panel-x);font-family:var(--vscode-editor-font-family, "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace)}.d2-code[data-v-3b434cf5]{white-space:pre;font-size:14px;line-height:1.5}.d2-render[data-v-3b434cf5]{max-height:var(--ms-size-code-max-height);overflow:auto}.d2-svg[data-v-3b434cf5] svg.markstream-d2-root-svg{width:100%;max-width:100%;height:auto;display:block}.d2-label[data-v-3b434cf5]{font-size:var(--ms-text-label)}.action-icon[data-v-3b434cf5]{width:var(--ms-action-btn-icon);height:var(--ms-action-btn-icon)}.d2-error[data-v-3b434cf5]{color:hsl(var(--ms-destructive))}.markstream-virtual-timeline[data-v-1303f06e]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;overflow:auto;overflow-anchor:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__spacer[data-v-1303f06e],.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e]{opacity:0;visibility:hidden;pointer-events:none}.markstream-virtual-timeline.is-restoring-thread>.markstream-virtual-timeline__item[data-v-1303f06e],.markstream-virtual-timeline__item.is-restored-height-floor[data-v-1303f06e]{height:var(--markstream-virtual-item-size);overflow:hidden}.markstream-virtual-timeline__restore-loading[data-v-1303f06e]{position:absolute;top:0;left:0;right:0;z-index:10;display:grid;place-items:center;pointer-events:none;overflow:hidden;background:Canvas;contain:strict}.markstream-virtual-timeline__restore-loading-card[data-v-1303f06e]{display:inline-flex;align-items:center;gap:10px;padding:10px 14px;border:1px solid rgb(148 163 184 / 32%);border-radius:999px;background:#ffffffeb;color:#334155;font-size:13px;box-shadow:0 8px 24px #0f172a14}.markstream-virtual-timeline__restore-spinner[data-v-1303f06e]{width:14px;height:14px;border:2px solid rgb(148 163 184 / 35%);border-top-color:#334155;border-radius:999px;animation:markstream-timeline-restore-spin-1303f06e .8s linear infinite}@keyframes markstream-timeline-restore-spin-1303f06e{to{transform:rotate(360deg)}}.markstream-virtual-timeline__spacer[data-v-1303f06e]{flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__item[data-v-1303f06e]{display:flow-root;flex:0 0 auto;overflow-anchor:none}.markstream-virtual-timeline__default-item[data-v-1303f06e]{margin:8px 0;padding:10px 12px;border:1px solid rgb(148 163 184 / 32%);border-radius:8px;background:#f8fafc;color:#0f172a;line-height:1.5;white-space:pre-wrap}.markstream-virtual-timeline__default-item--system-divider[data-v-1303f06e]{border:0;background:transparent;color:#64748b;font-size:12px;text-align:center}.markstream-virtual-timeline__default-item--error[data-v-1303f06e]{border-color:#f8717173;background:#fef2f2;color:#991b1b}.markstream-virtual-timeline__status[data-v-1303f06e]{display:inline-flex;margin-right:8px;color:#475569;font-size:12px;text-transform:uppercase}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.17.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}.md[data-v-33cb819f]{font:400 var(--content-font-size)/1.6 var(--font-ui);line-height:round(calc(var(--content-font-size) * 1.625),1px);color:var(--color-text);word-break:break-word}.md[data-v-33cb819f] .markdown-renderer{font:400 var(--content-font-size)/1.6 var(--font-ui);line-height:round(calc(var(--content-font-size) * 1.625),1px);color:var(--color-text)}.md[data-v-33cb819f] .markstream-vue,.md[data-v-33cb819f] .markdown-renderer{--code-bg: var(--color-surface-sunken);--code-fg: var(--color-text);--code-border: var(--color-line);--code-header-bg: var(--color-surface);--code-action-fg: var(--color-text-muted);--code-action-hover-fg: var(--color-accent);--markstream-code-fallback-bg: var(--color-surface-sunken);--markstream-code-fallback-fg: var(--color-text);--markstream-code-border-color: var(--color-line);--inline-code-bg: var(--color-inline-code-bg);--inline-code-fg: var(--color-text);--inline-code-border: transparent}.md[data-v-33cb819f] .md-file-link{appearance:none;display:inline;border:0;padding:0;background:transparent;color:var(--color-accent-hover);font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;cursor:pointer}.md[data-v-33cb819f] .md-file-link:hover{color:var(--color-accent)}.md[data-v-33cb819f] .inline-code .md-file-link{text-underline-offset:1.5px}.md[data-v-33cb819f] .markdown-renderer p,.md[data-v-33cb819f] .markdown-renderer li{font-size:var(--content-font-size);line-height:round(calc(var(--content-font-size) * 1.625),1px)}.md[data-v-33cb819f] .markdown-renderer blockquote,.md[data-v-33cb819f] .markdown-renderer td,.md[data-v-33cb819f] .markdown-renderer th{font-size:var(--md-b2)}.md[data-v-33cb819f] .markdown-renderer img{background:var(--media-alpha-canvas)}.md[data-v-33cb819f] strong{color:color-mix(in srgb,var(--color-text) 86%,var(--color-text-muted));font-weight:var(--weight-semibold)}.md[data-v-33cb819f] h1,.md[data-v-33cb819f] h2,.md[data-v-33cb819f] h3,.md[data-v-33cb819f] h4{color:var(--color-text);font-optical-sizing:auto;font-weight:600;margin:.85em 0 .35em}.md[data-v-33cb819f] h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px);border-bottom:1px solid var(--color-line);padding-bottom:4px}.md[data-v-33cb819f] h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.md[data-v-33cb819f] h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.md[data-v-33cb819f] h4{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px);color:var(--color-text-muted)}.md[data-v-33cb819f] p{margin:0}.md[data-v-33cb819f] .node-slot+.node-slot{margin-top:var(--content-font-size)}.md[data-v-33cb819f] .node-slot+.node-slot:has(h1),.md[data-v-33cb819f] .node-slot+.node-slot:has(h2){margin-top:calc(var(--content-font-size) * 2)}.md[data-v-33cb819f] .node-slot+.node-slot:has(h3),.md[data-v-33cb819f] .node-slot+.node-slot:has(h4){margin-top:calc(var(--content-font-size) * 1.5)}.md[data-v-33cb819f] ul,.md[data-v-33cb819f] ol{--md-dot: round(calc(var(--content-font-size) * .375), 1px);list-style:none;margin:0;padding-left:calc(var(--content-font-size) * 2)}.md[data-v-33cb819f] li{position:relative;margin:0;padding:0}.md[data-v-33cb819f] li+li{margin-top:round(calc(var(--content-font-size) * .75),1px)}.md[data-v-33cb819f] li>ul,.md[data-v-33cb819f] li>ol{margin-top:round(calc(var(--content-font-size) * .75),1px);padding-left:calc(var(--content-font-size) * 1.5)}.md[data-v-33cb819f] ul>li:before{content:"";position:absolute;left:calc((var(--md-dot) + var(--content-font-size) * 2) / -2);top:calc((round(calc(var(--content-font-size) * 1.625),1px) - var(--md-dot)) / 2);width:var(--md-dot);height:var(--md-dot);border-radius:50%;background:color-mix(in srgb,var(--color-text) 90%,transparent)}.md[data-v-33cb819f] ul>li:has(>input[type=checkbox]):before,.md[data-v-33cb819f] ul>li:has(>p>input[type=checkbox]):before{content:none}.md[data-v-33cb819f] ul ul>li:before{background:transparent;border:1px solid color-mix(in srgb,var(--color-text) 90%,transparent);box-sizing:border-box}.md[data-v-33cb819f] ol{counter-reset:md-ol}.md[data-v-33cb819f] ol[start],.md[data-v-33cb819f] ol:has(>li[value]){counter-reset:none;list-style:decimal}.md[data-v-33cb819f] ol[start]>li,.md[data-v-33cb819f] ol:has(>li[value])>li{counter-increment:none}.md[data-v-33cb819f] ol[start]>li:before,.md[data-v-33cb819f] ol:has(>li[value])>li:before{content:none}.md[data-v-33cb819f] ol>li{counter-increment:md-ol}.md[data-v-33cb819f] ol>li:before{content:counter(md-ol) ".";position:absolute;top:0;left:calc(var(--content-font-size) * -2);width:calc(var(--content-font-size) * 2);line-height:round(calc(var(--content-font-size) * 1.625),1px);text-align:center;color:var(--color-text)}.md[data-v-33cb819f] :not(pre)>code,.md[data-v-33cb819f] .inline-code{font:.9em var(--font-mono);background:var(--color-inline-code-bg);color:var(--color-text);border:0;padding:0 4px;border-radius:var(--radius-sm)}.md[data-v-33cb819f] strong code,.md[data-v-33cb819f] strong .inline-code,.md[data-v-33cb819f] b code,.md[data-v-33cb819f] b .inline-code{font-weight:var(--weight-semibold)}.md[data-v-33cb819f] .code-block-container{margin:.6em 0;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow:hidden;--vscode-editor-font-size: var(--text-sm);--vscode-editor-line-height: calc(var(--text-sm) * 1.65)}.md[data-v-33cb819f] .code-block-header{background:var(--color-surface);border-bottom:.5px solid var(--color-line);padding:4px 6px 4px 12px;color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.md[data-v-33cb819f] .code-block-header *{color:var(--color-text-muted);font:var(--text-xs) var(--font-ui)}.md[data-v-33cb819f] .code-block-header .code-header-main{font-family:var(--font-ui)}.md[data-v-33cb819f] .code-block-header .code-action-btn{color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.md[data-v-33cb819f] .code-block-header .code-action-btn:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-33cb819f] .code-block-header .code-action-btn:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-33cb819f] .code-block-header .code-action-btn *{pointer-events:none}.md[data-v-33cb819f] .code-block-shell-content,.md[data-v-33cb819f] .markstream-pre{background:var(--color-well)}.md[data-v-33cb819f] .code-editor-container{line-height:1.65;--diffs-gap-block: var(--space-3)}.md[data-v-33cb819f] .code-editor-container diffs-container{--diffs-line-height: 1.65em}.md[data-v-33cb819f] .code-pre-fallback>.markstream-pre__line-numbers{display:none}.md[data-v-33cb819f] .code-block-container .code-pre-fallback{padding-left:1ch;line-height:1.65!important}.md[data-v-33cb819f] .code-block-container pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers),.md[data-v-33cb819f] .markstream-pre:not(.code-pre-fallback):not(.markstream-pre--line-numbers){margin:0;padding:12px 14px;overflow-x:auto;font:var(--text-sm)/1.65 var(--font-mono)}.md[data-v-33cb819f] .code-block-container pre code{font:inherit;color:var(--color-text);background:none;border:none;padding:0;border-radius:0}.md[data-v-33cb819f] .markstream-pre,.md[data-v-33cb819f] .code-pre-fallback,.md[data-v-33cb819f] .code-block-shell-content pre:not(.shiki),.md[data-v-33cb819f] .code-block-shell-content pre:not(.shiki) code{color:var(--color-text)}.md[data-v-33cb819f] a{color:var(--color-accent);text-decoration:none}.md[data-v-33cb819f] a:hover{text-decoration:underline}.md[data-v-33cb819f] a.mention-pill{color:var(--color-text-muted);text-decoration:none}.md[data-v-33cb819f] a.mention-folder:hover{text-decoration:none}.md[data-v-33cb819f] .katex-display{overflow-x:auto;overflow-y:hidden;padding:2px 0 6px;margin:.6em 0}.md[data-v-33cb819f] .math-inline{vertical-align:baseline}.md[data-v-33cb819f] blockquote{position:relative;margin:0;padding:0 0 0 round(calc(var(--content-font-size) * 1.5),1px);border-left:none;color:var(--color-text)}.md[data-v-33cb819f] blockquote:before{content:"";position:absolute;left:calc(round(calc(var(--content-font-size) * 1.5),1px)/2 - 1px);top:2px;bottom:2px;width:2px;border-radius:2px;background:var(--color-line)}.md[data-v-33cb819f] .blockquote>.paragraph-node{margin:0}.md[data-v-33cb819f] .blockquote>.paragraph-node+.paragraph-node{margin-top:var(--content-font-size)}.md[data-v-33cb819f] hr{border:none;border-top:1px solid var(--color-line);margin:0}.md[data-v-33cb819f] table:not(.table-node){border-collapse:collapse;font-size:var(--text-lg);margin:.5em 0}.md[data-v-33cb819f] table:not(.table-node) th,.md[data-v-33cb819f] table:not(.table-node) td{border:1px solid var(--color-line);padding:4px 10px;text-align:left}.md[data-v-33cb819f] table:not(.table-node) th{background:var(--color-surface);color:var(--color-text);font-weight:var(--weight-medium)}.md[data-v-33cb819f] .table-node-wrapper{width:100%;max-width:100%!important;min-width:0;overflow-x:auto!important;scrollbar-gutter:auto!important;position:relative;--table-cell-cap: var(--p-table-cell-max)}.md[data-v-33cb819f] .table-node{--table-border: var(--color-line);--table-header-bg: var(--color-surface);font-size:var(--text-lg);margin:.5em 0;width:max-content!important;min-width:100%;max-width:none!important;table-layout:auto!important}.md[data-v-33cb819f] .table-node th,.md[data-v-33cb819f] .table-node td{text-align:left;vertical-align:top;max-width:var(--table-cell-cap)}.md[data-v-33cb819f] .table-node .text-node{display:inline-block;max-width:var(--table-cell-cap);vertical-align:top}.md[data-v-33cb819f] .md-table-fade{display:none;position:absolute;top:0;bottom:0;right:0;width:36px;z-index:1;background:linear-gradient(to right,transparent,color-mix(in srgb,var(--color-bg) 65%,transparent) 55%,var(--color-bg));pointer-events:none;transition:opacity var(--duration-base) var(--ease-out)}.md[data-v-33cb819f] .md-table-at-end .md-table-fade{opacity:0}.md[data-v-33cb819f] .md-table-toggle{display:none;position:absolute;top:6px;right:6px;z-index:2;align-items:center;justify-content:center;width:26px;height:26px;color:var(--color-text-muted);background:var(--color-surface);border:1px solid var(--color-line);border-radius:var(--radius-sm);box-shadow:var(--shadow-sm);cursor:pointer;opacity:0;transition:opacity var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}@container (min-width: 760px){.md[data-v-33cb819f] .md-table-fade.md-table-toggle--show,.md[data-v-33cb819f] .md-table-toggle.md-table-toggle--show{display:block}.md[data-v-33cb819f] .md-table-toggle.md-table-toggle--show{display:inline-flex}}.md[data-v-33cb819f] .table-node-wrapper:hover .md-table-toggle.md-table-toggle--show,.md[data-v-33cb819f] .table-node-wrapper:focus-within .md-table-toggle.md-table-toggle--show,.md[data-v-33cb819f] .table-node-wrapper.md-table-wide .md-table-toggle.md-table-toggle--show{opacity:1}.md[data-v-33cb819f] .md-table-toggle:hover{background:var(--color-surface-sunken);color:var(--color-text)}.md[data-v-33cb819f] .md-table-toggle:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md[data-v-33cb819f] .md-table-toggle svg{display:block}.md[data-v-33cb819f] .table-node tbody tr:hover{background-color:transparent!important}.md-frontmatter[data-v-33cb819f]{margin:0 0 var(--space-2);padding:var(--space-3) var(--space-4);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);box-shadow:var(--shadow-xs);overflow-x:auto;color:var(--color-text-muted);font:var(--text-sm)/1.65 var(--font-mono)}.diff-wrap[data-v-33cb819f]{margin:.6em 0;border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-sunken);box-shadow:var(--shadow-xs);overflow:hidden}.diff-bar[data-v-33cb819f]{display:flex;align-items:center;gap:6px;padding:4px 12px;background:var(--color-surface);border-bottom:1px solid var(--color-line);color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.diff-lang[data-v-33cb819f]{margin-right:auto}.diff-copy[data-v-33cb819f]{display:inline-flex;align-items:center;justify-content:center;color:var(--color-text-muted);background:transparent;border:none;border-radius:var(--radius-sm);cursor:pointer;padding:2px 6px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.diff-copy[data-v-33cb819f]:hover{background:var(--color-surface-sunken);color:var(--color-text)}.diff-copy[data-v-33cb819f]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.diff-pre[data-v-33cb819f]{margin:0;padding:12px 0;overflow-x:auto;background:var(--color-surface-sunken)}.diff-pre code[data-v-33cb819f]{display:block;width:max-content;min-width:100%;font:var(--text-sm)/1.65 var(--font-mono);color:var(--color-text)}.diff-line[data-v-33cb819f]{display:block;width:100%;padding:0 14px}.diff-sign[data-v-33cb819f]{display:inline-block;width:14px;text-align:center;color:var(--color-text-muted);user-select:none}.diff-text[data-v-33cb819f]{color:var(--color-text)}.diff-add[data-v-33cb819f]{background:var(--color-success-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-success) 55%,transparent)}.diff-add .diff-sign[data-v-33cb819f]{color:var(--color-success)}.diff-del[data-v-33cb819f]{background:var(--color-danger-soft);box-shadow:inset 2px 0 color-mix(in srgb,var(--color-danger) 55%,transparent)}.diff-del .diff-sign[data-v-33cb819f]{color:var(--color-danger)}.diff-hunk[data-v-33cb819f]{background:var(--color-surface)}.diff-hunk .diff-text[data-v-33cb819f]{color:var(--color-text-muted)}.md[data-v-33cb819f],.md .markdown-renderer[data-v-33cb819f]{font-family:var(--sans)}.md .code-block-container[data-v-33cb819f],.md .diff-wrap[data-v-33cb819f]{border-radius:var(--radius-md)}.md :not(pre)>code[data-v-33cb819f],.md .inline-code[data-v-33cb819f]{border-radius:var(--radius-sm)}.plan-glyph[data-v-8dff80a1]{display:inline-flex;align-items:center}.plan-path[data-v-8dff80a1]{display:block;max-width:100%;margin:0 0 var(--space-2);padding:0;overflow:hidden;border:none;background:transparent;color:var(--color-accent);font-family:var(--font-mono);font-size:var(--text-xs);text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.plan-path[data-v-8dff80a1]:hover{text-decoration:underline}.plan-path[data-v-8dff80a1]:focus-visible{outline:none;border-radius:var(--radius-xs);box-shadow:var(--p-focus-ring)}.plan-content[data-v-8dff80a1]{padding:var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);color:var(--color-text)}.plan-review[data-v-8dff80a1]{display:flex;flex-direction:column;gap:var(--space-1);margin-top:var(--space-2);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-normal)}.plan-review>div[data-v-8dff80a1]{display:flex;align-items:baseline;gap:var(--space-2)}.review-label[data-v-8dff80a1]{flex:none;color:var(--color-text-faint)}.review-feedback[data-v-8dff80a1]{white-space:pre-wrap}.path-link[data-v-0edbdd82]{display:block;width:100%;border:none;border-radius:var(--radius-xs);background:transparent;padding:0 0 var(--space-1);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);color:var(--color-text-muted);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.path-link[data-v-0edbdd82]:hover{color:var(--color-accent);text-decoration:underline;text-underline-offset:3px}.path-link[data-v-0edbdd82]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.swarm-card[data-v-f7b643ea]{margin:0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);overflow:hidden;transition:border-color var(--duration-base) var(--ease-out)}.swarm-card.err[data-v-f7b643ea]{border-color:color-mix(in srgb,var(--color-danger) 45%,var(--bg))}.head[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:34px;padding:0 var(--space-2) 0 var(--space-3);border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--ui-font-size);text-align:left;cursor:pointer;user-select:none}.head[data-v-f7b643ea]:hover{background:var(--color-hover);color:var(--color-text)}.head[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ic[data-v-f7b643ea]{color:var(--color-text-faint);flex:none}.title[data-v-f7b643ea]{font-weight:var(--weight-medium);color:var(--color-text);flex:none}.meta[data-v-f7b643ea]{color:var(--color-text-faint);flex:none}.sum-txt[data-v-f7b643ea]{color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.rt[data-v-f7b643ea]{margin-left:auto;display:flex;align-items:center;gap:var(--space-2);flex:none;color:var(--color-text-muted);font-size:var(--text-xs)}.status[data-v-f7b643ea]{display:inline-flex;align-items:center;flex:none}.status[data-v-f7b643ea]:has(>svg){color:var(--color-success)}.err .status[data-v-f7b643ea]:has(>svg){color:var(--color-danger)}.chip[data-v-f7b643ea]{color:var(--color-text-muted);font-family:var(--font-mono)}.tm[data-v-f7b643ea]{color:var(--color-text-faint);font-family:var(--font-mono)}.car[data-v-f7b643ea]{margin-left:2px;color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.swarm-card.open .car[data-v-f7b643ea]{transform:rotate(90deg)}.body[data-v-f7b643ea]{border-top:.5px solid var(--color-line)}.overview[data-v-f7b643ea]{padding:10px var(--space-3) var(--space-2);border-bottom:.5px solid var(--color-line)}.overview-line[data-v-f7b643ea]{display:flex;align-items:baseline;gap:var(--space-2)}.big[data-v-f7b643ea]{font-family:var(--font-mono);font-weight:var(--weight-medium);color:var(--color-text);font-size:15px}.lbl[data-v-f7b643ea]{color:var(--color-text-muted);font-size:var(--text-xs)}.seg[data-v-f7b643ea]{display:flex;height:5px;border-radius:var(--radius-full);overflow:hidden;margin:var(--space-2) 0 var(--space-1);gap:2px}.seg>span[data-v-f7b643ea]{height:100%;border-radius:var(--radius-full);min-width:3px}.s-ok[data-v-f7b643ea]{background:var(--color-success)}.s-run[data-v-f7b643ea]{background:var(--color-accent)}.s-warn[data-v-f7b643ea]{background:var(--color-warning)}.s-fail[data-v-f7b643ea]{background:var(--color-danger)}.s-queue[data-v-f7b643ea]{background:var(--color-line)}.legend[data-v-f7b643ea]{display:flex;flex-wrap:wrap;gap:10px}.legend span[data-v-f7b643ea]{display:inline-flex;align-items:center;gap:5px;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted)}.lg-dot[data-v-f7b643ea]{width:6px;height:6px;border-radius:var(--radius-full)}.member[data-v-f7b643ea]{border-bottom:.5px solid var(--color-line)}.member[data-v-f7b643ea]:last-child{border-bottom:none}.member-head[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:30px;padding:0 var(--space-2) 0 var(--space-3);border:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);text-align:left;cursor:pointer;user-select:none}.member-head[data-v-f7b643ea]:not(:disabled):hover{background:var(--color-hover)}.member-head[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.member-head[data-v-f7b643ea]:disabled{cursor:default}.row-dot[data-v-f7b643ea]{flex:none}.mname[data-v-f7b643ea]{flex:none;min-width:0;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-medium);color:var(--color-text)}.mact[data-v-f7b643ea]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font-size:var(--text-xs)}.mphase[data-v-f7b643ea]{flex:none;margin-left:auto;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.phase-completed .mphase[data-v-f7b643ea]{color:var(--color-success)}.phase-failed .mphase[data-v-f7b643ea]{color:var(--color-danger)}.phase-working .mphase[data-v-f7b643ea]{color:var(--color-accent)}.phase-suspended .mphase[data-v-f7b643ea]{color:var(--color-warning)}.mcar[data-v-f7b643ea]{margin-left:var(--space-1);color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.member.open .mcar[data-v-f7b643ea]{transform:rotate(90deg)}.member-saved[data-v-f7b643ea]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) var(--space-3);border:none;border-top:.5px solid var(--color-line);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-xs);text-align:left;cursor:pointer}.member-saved[data-v-f7b643ea]:hover{color:var(--color-text-muted)}.member-saved[data-v-f7b643ea]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.member-saved-car[data-v-f7b643ea]{transition:transform var(--duration-base) var(--ease-out)}.member-saved-car.open[data-v-f7b643ea]{transform:rotate(90deg)}.member-body[data-v-f7b643ea]{padding:var(--space-1) var(--space-3) 10px 31px;color:var(--color-text-muted);font-size:calc(var(--content-font-size) - 2px);line-height:1.65;white-space:pre-wrap;word-break:break-word}.waiting[data-v-f7b643ea]{padding:6px var(--space-3) 10px;color:var(--color-text-muted);font-size:var(--text-xs)}.fallback-output[data-v-f7b643ea]{padding:10px var(--space-3);color:var(--color-text);font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;white-space:pre-wrap;word-break:break-word}.status-glyph[data-v-f1aedfd0]{flex:none;width:16px;display:inline-flex;align-items:center;justify-content:center;user-select:none}.status-glyph.s-run[data-v-f1aedfd0]{color:var(--color-accent)}.status-glyph.s-done[data-v-f1aedfd0]{color:var(--color-success)}.status-glyph.s-fail[data-v-f1aedfd0]{color:var(--color-danger)}.status-glyph.s-pending[data-v-f1aedfd0]{color:var(--color-text-faint)}.todo-bar[data-v-1b7f51f3]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.todo-fill[data-v-1b7f51f3]{background:var(--color-success);border-radius:var(--radius-full);transition:width var(--duration-slow) var(--ease-out)}.todo-list[data-v-1b7f51f3]{display:flex;flex-direction:column;gap:1px;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);padding:var(--space-2) var(--space-3);max-height:calc(12 * 1.6 * var(--content-font-size));overflow-y:auto;overscroll-behavior:contain}.todo-row[data-v-1b7f51f3]{display:flex;align-items:center;gap:7px;padding:2px 0;font-size:calc(var(--content-font-size) - 1px);color:var(--color-text)}.todo-title[data-v-1b7f51f3]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.4}.todo-row.s-in_progress .todo-title[data-v-1b7f51f3]{font-weight:var(--weight-medium)}.todo-row.s-done .todo-title[data-v-1b7f51f3]{color:var(--color-text-faint);text-decoration:line-through}.fetch-url[data-v-8c248fcc]{font-family:var(--font-mono);font-size:calc(var(--content-font-size) - 2px);line-height:1.6;color:var(--color-text-faint);white-space:pre-wrap;word-break:break-all;margin-bottom:var(--space-1)}.think[data-v-33e6d7d4]{margin:0}.think-head[data-v-33e6d7d4]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-1) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.think-head[data-v-33e6d7d4]:hover{color:var(--color-text)}.think-head.is-static[data-v-33e6d7d4],.think-head.is-static[data-v-33e6d7d4]:hover{cursor:default;color:var(--color-text-faint)}.think-head[data-v-33e6d7d4]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.think-bulb[data-v-33e6d7d4]{flex:none}.think-title[data-v-33e6d7d4]{font-weight:var(--weight-medium)}.think-time[data-v-33e6d7d4]{color:var(--color-text-faint);font-weight:400;flex:none}.think.streaming .think-title[data-v-33e6d7d4]{animation:think-breathe-33e6d7d4 1.6s var(--ease-in-out) infinite}@keyframes think-breathe-33e6d7d4{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.think.streaming .think-title[data-v-33e6d7d4]{animation:none}}.think-car[data-v-33e6d7d4]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.think.open .think-car[data-v-33e6d7d4]{transform:rotate(90deg)}.think-body[data-v-33e6d7d4]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.think-body.instant[data-v-33e6d7d4]{transition:none}.think-body.open[data-v-33e6d7d4]{grid-template-rows:minmax(0,1fr)}.think-body-inner[data-v-33e6d7d4]{min-height:0;overflow:hidden}.think-text[data-v-33e6d7d4]{font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word;margin:0;padding:var(--space-1) 0 var(--space-2)}.mob .think-text[data-v-33e6d7d4]{color:var(--color-text-faint);line-height:var(--leading-normal)}.activity-run[data-v-c3bb6975]{display:flex;flex-direction:column;animation:kimi-card-in var(--duration-base) var(--ease-out)}.ar-head[data-v-c3bb6975]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.ar-head[data-v-c3bb6975]:hover{color:var(--color-text)}.ar-head.is-static[data-v-c3bb6975],.ar-head.is-static[data-v-c3bb6975]:hover{cursor:default;color:var(--color-text-faint)}.ar-head[data-v-c3bb6975]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.ar-glyph[data-v-c3bb6975]{display:inline-flex;align-items:center;flex:none;color:var(--color-text-faint)}.ar-glyph.ok[data-v-c3bb6975]{color:var(--color-success)}.ar-glyph.err[data-v-c3bb6975]{color:var(--color-danger)}.ar-glyph.run[data-v-c3bb6975]{color:var(--color-text-muted);animation:ar-breathe-c3bb6975 1.6s var(--ease-in-out) infinite}@keyframes ar-breathe-c3bb6975{0%,to{opacity:1}50%{opacity:.45}}@media(prefers-reduced-motion:reduce){.ar-glyph.run[data-v-c3bb6975]{animation:none}}.ar-sum[data-v-c3bb6975]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.ar-danger[data-v-c3bb6975]{color:var(--color-danger)}.ar-faint[data-v-c3bb6975],.ar-sep[data-v-c3bb6975]{color:var(--color-text-faint)}.ar-car[data-v-c3bb6975]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.activity-run.open .ar-car[data-v-c3bb6975]{transform:rotate(90deg)}.ar-body[data-v-c3bb6975]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.ar-body.open[data-v-c3bb6975]{grid-template-rows:minmax(0,1fr)}.ar-body-inner[data-v-c3bb6975]{min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:var(--space-2);padding-top:var(--space-1)}.msg-time[data-v-9153170e]{display:inline-flex;align-items:center;min-height:22px;box-sizing:border-box;padding:2px 5px;border-radius:var(--radius-sm);color:var(--muted);font-size:var(--text-xs);font-weight:var(--weight-medium);line-height:1;opacity:.7;white-space:nowrap}.ntf[data-v-69e0a1db],.ntf-group-card[data-v-69e0a1db]{margin:var(--space-2) 0;border:.5px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-surface);box-shadow:var(--shadow-xs);overflow:hidden;animation:kimi-card-in var(--duration-slow) var(--ease-out)}.ntf.ok[data-v-69e0a1db]{background:var(--color-success-soft);border-color:var(--color-success-bd)}.ntf.err[data-v-69e0a1db]{background:var(--color-danger-soft);border-color:var(--color-danger-bd)}.ntf.warn[data-v-69e0a1db]{background:var(--color-warning-soft);border-color:var(--color-warning-bd)}.ntf-head[data-v-69e0a1db]{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-2) var(--space-3);border:none;text-align:left;user-select:none}.ntf-chip[data-v-69e0a1db]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);flex:none;color:var(--color-text-muted)}.ntf.ok .ntf-chip[data-v-69e0a1db]{color:var(--color-success)}.ntf.err .ntf-chip[data-v-69e0a1db]{color:var(--color-danger)}.ntf.warn .ntf-chip[data-v-69e0a1db]{color:var(--color-warning)}.ntf-main[data-v-69e0a1db]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.ntf-title[data-v-69e0a1db]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.ntf-sub[data-v-69e0a1db]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ntf-side[data-v-69e0a1db]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1);font-size:var(--text-xs);color:var(--color-text-faint)}.ntf-side .st[data-v-69e0a1db]{font-weight:var(--weight-medium)}.ntf.ok .st[data-v-69e0a1db],.ng-item.ok .st[data-v-69e0a1db]{color:var(--color-success)}.ntf.err .st[data-v-69e0a1db],.ng-item.err .st[data-v-69e0a1db]{color:var(--color-danger)}.ntf.warn .st[data-v-69e0a1db],.ng-item.warn .st[data-v-69e0a1db]{color:var(--color-warning)}.ntf-car[data-v-69e0a1db]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.ntf.open>.ntf-head .ntf-car[data-v-69e0a1db],.ntf-group-card.open>.ntf-head .ntf-car[data-v-69e0a1db],.ng-item.open>.ntf-head .ntf-car[data-v-69e0a1db]{transform:rotate(90deg)}.ntf-body-in[data-v-69e0a1db]{margin:0 var(--space-3) var(--space-3);padding-top:var(--space-3);border-top:.5px solid var(--color-line);display:flex;flex-direction:column;gap:var(--space-2)}.ntf.ok .ntf-body-in[data-v-69e0a1db],.ng-item.ok .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-success-bd)}.ntf.err .ntf-body-in[data-v-69e0a1db],.ng-item.err .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-danger-bd)}.ntf.warn .ntf-body-in[data-v-69e0a1db],.ng-item.warn .ntf-body-in[data-v-69e0a1db]{border-top-color:var(--color-warning-bd)}.nd-fields[data-v-69e0a1db]{display:grid;grid-template-columns:auto 1fr;gap:var(--space-1) var(--space-3)}.nd-fields .k[data-v-69e0a1db]{color:var(--color-text-faint);font-size:var(--text-xs)}.nd-fields .v[data-v-69e0a1db]{color:var(--color-text-muted);font-size:var(--text-xs);font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nd-body[data-v-69e0a1db]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.nd-out[data-v-69e0a1db]{display:flex;align-items:center;gap:var(--space-2);background:var(--color-surface-raised);border-radius:var(--radius-md);padding:var(--space-1) var(--space-2);box-shadow:var(--shadow-xs)}.nd-out-ic[data-v-69e0a1db]{color:var(--color-text-faint);flex:none}.nd-out .path[data-v-69e0a1db]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left}.nd-act[data-v-69e0a1db]{display:inline-flex;align-items:center;height:var(--space-6);padding:0 var(--space-2);border-radius:var(--radius-full);font-size:var(--text-xs);color:var(--color-text-muted);border:.5px solid var(--color-line-strong);background:var(--color-surface-raised);flex:none;transition:color var(--duration-fast) var(--ease-out)}.nd-act[data-v-69e0a1db]:hover{color:var(--color-text)}.nd-raw summary[data-v-69e0a1db]{list-style:none;display:flex;align-items:center;gap:var(--space-1);cursor:pointer;color:var(--color-text-faint);font-size:var(--text-xs);user-select:none}.nd-raw summary[data-v-69e0a1db]::-webkit-details-marker{display:none}.nd-raw summary[data-v-69e0a1db]:hover{color:var(--color-text)}.nd-raw-car[data-v-69e0a1db]{transition:transform var(--duration-base) var(--ease-out)}.nd-raw[open] .nd-raw-car[data-v-69e0a1db]{transform:rotate(90deg)}.nd-raw pre[data-v-69e0a1db]{margin:var(--space-2) 0 0;padding:var(--space-2) var(--space-3);background:var(--color-surface-raised);border-radius:var(--radius-sm);box-shadow:var(--shadow-xs);font-size:var(--text-xs);line-height:1.55;color:var(--color-text-muted);overflow-x:auto;white-space:pre}.ng-dots[data-v-69e0a1db]{display:inline-flex;gap:var(--space-1);margin-right:var(--space-1)}.dot[data-v-69e0a1db]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--color-text-faint)}.dot.done[data-v-69e0a1db]{background:var(--color-success)}.dot.error[data-v-69e0a1db]{background:var(--color-danger)}.dot.warn[data-v-69e0a1db]{background:var(--color-warning)}.ng-list[data-v-69e0a1db]{display:flex;flex-direction:column}.ng-item[data-v-69e0a1db]{border-top:.5px solid var(--color-subtle)}.ng-item>.ntf-head[data-v-69e0a1db]{padding:var(--space-1) var(--space-3)}.ng-item .ntf-chip[data-v-69e0a1db]{width:22px;height:22px;border-radius:var(--radius-sm);box-shadow:none;background:transparent}.ng-item.ok .ntf-chip[data-v-69e0a1db]{color:var(--color-success)}.ng-item.err .ntf-chip[data-v-69e0a1db]{color:var(--color-danger)}.ng-item.warn .ntf-chip[data-v-69e0a1db]{color:var(--color-warning)}.ng-item .ntf-title[data-v-69e0a1db]{font-weight:var(--weight-regular);color:var(--color-text-muted)}.ng-item.open .ntf-title[data-v-69e0a1db]{color:var(--color-text)}.turn-fold[data-v-66797f5d]{display:flex;flex-direction:column}.tf-head[data-v-66797f5d]{display:flex;align-items:center;gap:var(--space-1);width:100%;padding:var(--space-2) 0;border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);line-height:1;text-align:left;cursor:pointer;user-select:none;transition:color var(--duration-base) var(--ease-out)}.tf-head[data-v-66797f5d]:hover{color:var(--color-text)}.tf-head[data-v-66797f5d]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--color-accent-soft)}.tf-sum[data-v-66797f5d]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-regular)}.tf-car[data-v-66797f5d]{color:var(--color-text-faint);flex:none;transition:transform var(--duration-base) var(--ease-out)}.turn-fold.open .tf-car[data-v-66797f5d]{transform:rotate(90deg)}.tf-body[data-v-66797f5d]{display:grid;grid-template-rows:minmax(0,0fr);overflow:hidden;transition:grid-template-rows var(--duration-base) var(--ease-out)}.tf-body.open[data-v-66797f5d]{grid-template-rows:minmax(0,1fr)}.tf-body-inner[data-v-66797f5d]{min-height:0;overflow:hidden;display:flex;flex-direction:column}.tf-body-inner>.msg[data-v-66797f5d],.tf-body-inner[data-v-66797f5d]>.think,.tf-body-inner[data-v-66797f5d]>.tool-group,.tf-body-inner[data-v-66797f5d]>.activity-run,.tf-body-inner[data-v-66797f5d]>.agent-card,.tf-body-inner[data-v-66797f5d]>.agent-group,.tf-body-inner[data-v-66797f5d]>.tool-line,.tf-body-inner[data-v-66797f5d]>.swarm-card,.tf-body-inner[data-v-66797f5d]>.media-tool,.tf-body-inner[data-v-66797f5d]>.ask-receipt{margin-top:var(--chat-block-gap)}.turn-fold.streaming .tf-body-inner>.msg[data-v-66797f5d]:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.think:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.tool-group:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.activity-run:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.agent-card:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.agent-group:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.tool-line:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.swarm-card:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.media-tool:first-child,.turn-fold.streaming .tf-body-inner[data-v-66797f5d]>.ask-receipt:first-child{margin-top:0}.tf-body-inner .msg[data-v-66797f5d]{font-size:var(--ui-font-size);line-height:var(--leading-prose);color:var(--color-text);font-weight:var(--weight-medium)}.tf-body-inner .msg[data-v-66797f5d] p{margin:0}.tf-body-inner .msg[data-v-66797f5d] p+p{margin-top:var(--space-2)}@container (min-width: 760px){.tf-body-inner .msg[data-v-66797f5d] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.tf-body-inner .msg[data-v-66797f5d] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}.tf-body-inner .msg[data-v-66797f5d] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}}@media(max-width:640px){.tf-body-inner .msg[data-v-66797f5d]{font-size:var(--ui-font-size-xl)}}.turn-files[data-v-f37da416]{margin-top:var(--chat-block-gap)}.turn-files[data-v-f37da416] .ui-card__head{font-family:var(--font-ui);font-weight:var(--weight-regular);padding:var(--space-2) var(--space-3)}.turn-files[data-v-f37da416] .ui-card__body{padding:var(--space-1) var(--space-3)}.turn-files[data-v-f37da416] .ui-card__foot{padding:0;justify-content:stretch}.tf-ic[data-v-f37da416]{display:inline-flex;align-items:center;color:var(--color-text-faint);flex:none}.tf-title[data-v-f37da416]{font-size:var(--text-sm);color:var(--color-text);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-stats[data-v-f37da416]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.tf-add[data-v-f37da416],.tf-del[data-v-f37da416]{font-family:var(--font-mono);font-size:var(--text-xs);flex:none}.tf-add[data-v-f37da416]{color:var(--color-success)}.tf-del[data-v-f37da416]{color:var(--color-danger)}.tf-list[data-v-f37da416]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.tf-row[data-v-f37da416]{display:flex;align-items:center;gap:var(--space-1);min-width:0;padding:var(--space-1) 0;font-size:var(--text-sm);line-height:var(--leading-tight)}.tf-file[data-v-f37da416]{display:flex;align-items:baseline;border:none;border-radius:var(--radius-xs);background:transparent;padding:0;font-family:inherit;font-size:inherit;color:var(--color-text);flex:1;min-width:0;overflow:hidden;white-space:nowrap;text-align:left}button.tf-file[data-v-f37da416]{cursor:pointer}button.tf-file[data-v-f37da416]:hover{text-decoration:underline;text-decoration-color:var(--color-text-faint);text-underline-offset:3px}.tf-file[data-v-f37da416]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tf-dir[data-v-f37da416]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--color-text-faint)}.tf-base[data-v-f37da416]{flex:none;font-weight:var(--weight-medium);color:var(--color-text)}.tf-more[data-v-f37da416]{width:100%;justify-content:flex-start;border-radius:0}.turn-files .tf-more[data-v-f37da416]:not(:disabled):active{transform:none}.tf-more-car[data-v-f37da416]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.tf-more-car.open[data-v-f37da416]{transform:rotate(180deg)}.diffbar[data-v-f37da416]{display:inline-flex;width:36px;height:3px;border-radius:var(--radius-full);overflow:hidden;flex:none}.seg-add[data-v-f37da416]{background:var(--color-success)}.seg-del[data-v-f37da416]{background:var(--color-danger)}.activity-notice[data-v-cc29061f]{display:inline-flex;align-items:center;gap:9px;align-self:flex-start;margin:0;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.cn[data-v-9f79345d]{margin:0;align-self:flex-end;max-width:78%;display:flex;flex-direction:column;align-items:flex-end}.cn-head[data-v-9f79345d]{align-self:flex-end;display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal);overflow-wrap:anywhere}.cn-head-ico[data-v-9f79345d]{flex:none}.cn-head.error .cn-head-ico[data-v-9f79345d]{color:var(--color-danger)}.cn-bubble[data-v-9f79345d]{box-sizing:border-box;max-width:100%;padding:10px 12px;background:var(--color-user-bubble-bg);border-radius:var(--radius-lg);color:var(--color-text);font-size:var(--content-font-size);line-height:var(--leading-normal);white-space:pre-wrap;overflow-wrap:anywhere}.cn-meta[data-v-9f79345d]{margin-top:var(--space-1);padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-base);line-height:var(--leading-normal)}/*! PhotoSwipe main CSS by Dmytro Semenov | photoswipe.com */.pswp{--pswp-bg: #000;--pswp-placeholder-bg: #222;--pswp-root-z-index: 100000;--pswp-preloader-color: rgba(79, 79, 79, .4);--pswp-preloader-color-secondary: rgba(255, 255, 255, .9);--pswp-icon-color: #fff;--pswp-icon-color-secondary: #4f4f4f;--pswp-icon-stroke-color: #4f4f4f;--pswp-icon-stroke-width: 2px;--pswp-error-text-color: var(--pswp-icon-color)}.pswp{position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--pswp-root-z-index);display:none;touch-action:none;outline:0;opacity:.003;contain:layout style size;-webkit-tap-highlight-color:rgba(0,0,0,0)}.pswp:focus{outline:0}.pswp *{box-sizing:border-box}.pswp img{max-width:none}.pswp--open{display:block}.pswp,.pswp__bg{transform:translateZ(0);will-change:opacity}.pswp__bg{opacity:.005;background:var(--pswp-bg)}.pswp,.pswp__scroll-wrap{overflow:hidden}.pswp__scroll-wrap,.pswp__bg,.pswp__container,.pswp__item,.pswp__content,.pswp__img,.pswp__zoom-wrap{position:absolute;top:0;left:0;width:100%;height:100%}.pswp__img,.pswp__zoom-wrap{width:auto;height:auto}.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img{cursor:-webkit-zoom-in;cursor:-moz-zoom-in;cursor:zoom-in}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img,.pswp--no-mouse-drag.pswp--zoomed-in .pswp__img:active,.pswp__img{cursor:-webkit-zoom-out;cursor:-moz-zoom-out;cursor:zoom-out}.pswp__container,.pswp__img,.pswp__button,.pswp__counter{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pswp__item{z-index:1;overflow:hidden}.pswp__hidden{display:none!important}.pswp__content{pointer-events:none}.pswp__content>*{pointer-events:auto}.pswp__error-msg-container{display:grid}.pswp__error-msg{margin:auto;font-size:1em;line-height:1;color:var(--pswp-error-text-color)}.pswp .pswp__hide-on-close{opacity:.005;will-change:opacity;transition:opacity var(--pswp-transition-duration) cubic-bezier(.4,0,.22,1);z-index:10;pointer-events:none}.pswp--ui-visible .pswp__hide-on-close{opacity:1;pointer-events:auto}.pswp__button{position:relative;display:block;width:50px;height:60px;padding:0;margin:0;overflow:hidden;cursor:pointer;background:none;border:0;box-shadow:none;opacity:.85;-webkit-appearance:none;-webkit-touch-callout:none}.pswp__button:hover,.pswp__button:active,.pswp__button:focus{transition:none;padding:0;background:none;border:0;box-shadow:none;opacity:1}.pswp__button:disabled{opacity:.3;cursor:auto}.pswp__icn{fill:var(--pswp-icon-color);color:var(--pswp-icon-color-secondary)}.pswp__icn{position:absolute;top:14px;left:9px;width:32px;height:32px;overflow:hidden;pointer-events:none}.pswp__icn-shadow{stroke:var(--pswp-icon-stroke-color);stroke-width:var(--pswp-icon-stroke-width);fill:none}.pswp__icn:focus{outline:0}div.pswp__img--placeholder,.pswp__img--with-bg{background:var(--pswp-placeholder-bg)}.pswp__top-bar{position:absolute;left:0;top:0;width:100%;height:60px;display:flex;flex-direction:row;justify-content:flex-end;z-index:10;pointer-events:none!important}.pswp__top-bar>*{pointer-events:auto;will-change:opacity}.pswp__button--close{margin-right:6px}.pswp__button--arrow{position:absolute;width:75px;height:100px;top:50%;margin-top:-50px}.pswp__button--arrow:disabled{display:none;cursor:default}.pswp__button--arrow .pswp__icn{top:50%;margin-top:-30px;width:60px;height:60px;background:none;border-radius:0}.pswp--one-slide .pswp__button--arrow{display:none}.pswp--touch .pswp__button--arrow{visibility:hidden}.pswp--has_mouse .pswp__button--arrow{visibility:visible}.pswp__button--arrow--prev{right:auto;left:0}.pswp__button--arrow--next{right:0}.pswp__button--arrow--next .pswp__icn{left:auto;right:14px;transform:scaleX(-1)}.pswp__button--zoom{display:none}.pswp--zoom-allowed .pswp__button--zoom{display:block}.pswp--zoomed-in .pswp__zoom-icn-bar-v{display:none}.pswp__preloader{position:relative;overflow:hidden;width:50px;height:60px;margin-right:auto}.pswp__preloader .pswp__icn{opacity:0;transition:opacity .2s linear;animation:pswp-clockwise .6s linear infinite}.pswp__preloader--active .pswp__icn{opacity:.85}@keyframes pswp-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.pswp__counter{height:30px;margin-top:15px;margin-inline-start:20px;font-size:14px;line-height:30px;color:var(--pswp-icon-color);text-shadow:1px 1px 3px var(--pswp-icon-color-secondary);opacity:.85}.pswp--one-slide .pswp__counter{display:none}.pswp{--pswp-root-z-index: var(--z-modal);--pswp-bg: var(--color-scrim-strong)}.media-preview-caption{position:absolute;left:0;right:0;bottom:var(--space-4);padding:0 var(--space-6);color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.media-lightbox[data-v-2e2c2784]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;padding:var(--space-6);background:var(--color-scrim-strong)}.media-lightbox-card[data-v-2e2c2784]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);max-width:min(960px,calc(100vw - var(--space-6) * 2));max-height:calc(100vh - var(--space-6) * 2)}.media-lightbox-frame[data-v-2e2c2784]{max-width:100%;border-radius:var(--radius-md);overflow:hidden;background:var(--color-bg);box-shadow:var(--shadow-xl)}.media-lightbox-media[data-v-2e2c2784]{display:block;max-width:100%;max-height:calc(100vh - var(--space-6) * 4);object-fit:contain}.media-lightbox-name[data-v-2e2c2784]{max-width:100%;color:var(--color-text-on-scrim);font-size:var(--ui-font-size-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.media-lightbox-close[data-v-2e2c2784]{position:fixed;top:var(--space-4);right:var(--space-6);display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text);box-shadow:var(--shadow-sm);cursor:pointer;z-index:var(--z-modal-dropdown)}.media-lightbox-close[data-v-2e2c2784]:before{content:"";position:absolute;inset:-6px}.media-lightbox-close[data-v-2e2c2784]:hover{border-color:var(--color-line-strong);background:var(--color-surface-sunken)}.media-thumb[data-v-16b8c78d]{position:relative;flex:none;display:inline-flex}.media-thumb-btn[data-v-16b8c78d]{display:block;padding:0;border:.5px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-well);overflow:hidden;cursor:pointer;transition:border-color var(--duration-fast) ease}.media-thumb-btn[data-v-16b8c78d]:hover{border-color:var(--color-line-strong)}.media-thumb-btn[data-v-16b8c78d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.media-thumb-media[data-v-16b8c78d]{display:block;width:64px;height:64px;object-fit:cover}.media-thumb-tile[data-v-16b8c78d]{object-fit:none}.media-thumb-badge[data-v-16b8c78d]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:.5px solid var(--color-line);color:var(--color-text);box-shadow:var(--shadow-sm);pointer-events:none}.media-thumb-badge.is-error[data-v-16b8c78d]{color:var(--color-danger);border-color:var(--color-danger-bd)}.media-thumb.is-error .media-thumb-btn[data-v-16b8c78d]{border-color:var(--color-danger-bd)}.media-thumb-rm[data-v-16b8c78d]{position:absolute;top:var(--space-1);right:var(--space-1);z-index:1;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:var(--color-scrim);color:var(--color-text-on-scrim);cursor:pointer}.media-thumb-rm[data-v-16b8c78d]:hover{background:var(--color-text);color:var(--color-bg)}.media-thumb-rm[data-v-16b8c78d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.att-chip[data-v-37de1632]{display:inline-flex;align-items:center;gap:6px;max-width:220px;padding:4px 9px 4px var(--att-chip-pad-left, 5px);background:var(--color-well);border:.5px solid var(--color-line);border-radius:999px;font-size:var(--ui-font-size-sm);transition:border-color var(--duration-fast) ease}.att-chip[data-v-37de1632]:hover{border-color:var(--color-line-strong)}.att-activate[data-v-37de1632]{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0;border:none;background:transparent;color:inherit;font:inherit;cursor:pointer}.att-activate[data-v-37de1632]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:999px}.att-tile[data-v-37de1632]{width:20px;height:20px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--color-text-muted);background:var(--color-surface-sunken)}.att-tile[data-v-37de1632] .att-thumb{width:100%;height:100%;object-fit:cover;display:block}.att-name[data-v-37de1632]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.att-chip.is-error[data-v-37de1632]{border-color:var(--color-danger-bd)}.att-chip.is-error .att-err[data-v-37de1632]{flex:none;display:flex;align-items:center;color:var(--color-danger)}.att-rm[data-v-37de1632]{flex:none;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--color-text-faint);cursor:pointer}.att-rm[data-v-37de1632]:hover{background:var(--color-hover);color:var(--color-text)}.att-rm[data-v-37de1632]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mascot-host[data-v-27600ac7]{position:relative;width:100%;aspect-ratio:72 / 100}.mascot-fallback[data-v-27600ac7]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:86.5%;height:auto}.mascot-canvas[data-v-27600ac7]{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .25s ease}.mascot-canvas.ready[data-v-27600ac7]{opacity:1}@media(prefers-reduced-motion:reduce){.mascot-canvas[data-v-27600ac7]{transition:none}}.working-indicator[data-v-8abb44ef]{display:inline-flex;align-items:center;gap:var(--space-2);align-self:flex-start;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text-muted)}.wi-mascot[data-v-8abb44ef]{flex:none;width:40px}.wi-label[data-v-8abb44ef]{animation:wi-breathe-8abb44ef 1.6s var(--ease-in-out) infinite}@keyframes wi-breathe-8abb44ef{0%,to{opacity:1}50%{opacity:.45}}.chat-empty[data-v-b75e2feb]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px 16px;color:var(--faint);text-align:center}.chat-empty-text[data-v-b75e2feb]{font-size:var(--ui-font-size-sm)}.chat-loading[data-v-b75e2feb]{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:24px 16px;color:var(--muted)}.chat-loading-text[data-v-b75e2feb]{font-size:var(--ui-font-size-sm)}.chat[data-v-b75e2feb]{--chat-turn-gap: 16px;--chat-block-gap: 10px;--chat-section-gap: 18px;display:flex;flex-direction:column;gap:0;padding:16px 14px 20px;flex:1;min-height:0;position:relative}.chat .chat-empty[data-v-b75e2feb]{align-self:stretch}.open-unsupported[data-v-b75e2feb]{position:absolute;bottom:16px;left:50%;transform:translate(-50%);max-width:min(90%,480px);padding:6px 12px;border-radius:var(--radius-md);border:.5px solid var(--color-line);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;z-index:var(--z-sticky)}.chat>.u-turn[data-v-b75e2feb],.chat>.a-msg[data-v-b75e2feb],.chat>.compact-divider[data-v-b75e2feb],.chat>.cron-notice[data-v-b75e2feb],.chat>.sending-placeholder[data-v-b75e2feb],.chat[data-v-b75e2feb]>.activity-notice{margin-top:var(--chat-turn-gap)}.chat>.a-msg[data-v-b75e2feb]{margin-top:10px}.chat>.u-turn[data-v-b75e2feb]:first-child,.chat>.a-msg[data-v-b75e2feb]:first-child,.chat>.compact-divider[data-v-b75e2feb]:first-child,.chat>.cron-notice[data-v-b75e2feb]:first-child,.chat>.sending-placeholder[data-v-b75e2feb]:first-child,.chat[data-v-b75e2feb]>.activity-notice:first-child{margin-top:0}.u-turn[data-v-b75e2feb]{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-start;width:100%}.u-bub[data-v-b75e2feb]{align-self:flex-end;max-width:78%;background:var(--color-user-bubble-bg);color:var(--color-text);border-radius:var(--radius-lg);padding:10px 12px;font-size:var(--content-font-size);line-height:var(--leading-normal)}.u-meta[data-v-b75e2feb]{align-self:flex-end;display:flex;justify-content:flex-end;align-items:center;max-width:78%;margin-top:var(--space-2);margin-right:4px}.u-meta .u-edit[data-v-b75e2feb]{min-height:22px;box-sizing:border-box}.u-text[data-v-b75e2feb]{white-space:pre-wrap;overflow-wrap:anywhere}.u-text-wrap[data-v-b75e2feb]{position:relative;display:flex;flex-direction:column}.u-text-wrap-args[data-v-b75e2feb]{margin-top:var(--space-1)}.u-text-wrap.is-clamped[data-v-b75e2feb]{min-width:120px}.u-text-wrap.is-clamped>.u-text[data-v-b75e2feb],.u-text-wrap.is-clamped>.skill-act-args[data-v-b75e2feb],.u-text-wrap.is-clamped>.q-body[data-v-b75e2feb]{max-height:10lh;overflow:hidden;mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh));-webkit-mask-image:linear-gradient(to bottom,black calc(100% - 5lh),transparent calc(100% - 1lh))}.u-text-toggle[data-v-b75e2feb]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:center;margin-top:var(--space-2);padding:var(--space-2) var(--space-4);border:none;border-radius:var(--radius-full);background:var(--color-surface-raised);box-shadow:var(--shadow-sm);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);line-height:1;cursor:pointer;user-select:none;transition:box-shadow var(--duration-base) var(--ease-out)}.u-text-toggle[data-v-b75e2feb]:hover{box-shadow:var(--shadow-md)}.u-text-toggle[data-v-b75e2feb]:focus-visible{outline:2px solid var(--color-accent);outline-offset:1px}.u-text-wrap.is-clamped .u-text-toggle[data-v-b75e2feb]{position:absolute;bottom:0;left:50%;transform:translate(-50%);margin-top:0}.u-text-toggle-car[data-v-b75e2feb]{transition:transform var(--duration-base) var(--ease-out)}.u-text-toggle[aria-expanded=true] .u-text-toggle-car[data-v-b75e2feb]{transform:rotate(180deg)}.u-edit[data-v-b75e2feb]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s}.u-edit svg[data-v-b75e2feb]{display:block;flex:none}.u-edit[data-v-b75e2feb]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-armed[data-v-b75e2feb]{--undo-hint-duration: 5s;gap:var(--space-1);opacity:1;color:var(--color-text);animation:u-edit-armed-blink-b75e2feb var(--undo-hint-duration) linear forwards}.u-edit-armed[data-v-b75e2feb]:hover{color:var(--color-accent);background:var(--hover)}.u-edit-hint[data-v-b75e2feb]{display:inline-flex;align-items:center;gap:var(--space-1);font-size:var(--text-xs);font-weight:var(--weight-medium);white-space:nowrap}@keyframes u-edit-armed-blink-b75e2feb{0%,55%{opacity:1}62%{opacity:.45}69%{opacity:1}75%{opacity:.4}81%{opacity:.95}86%{opacity:.35}91%{opacity:.85}95%{opacity:.3}to{opacity:0}}@media(prefers-reduced-motion:reduce){.u-edit-armed[data-v-b75e2feb]{animation:none}}.u-copy[data-v-b75e2feb]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.u-copy svg[data-v-b75e2feb]{display:block;flex:none}.u-copy[data-v-b75e2feb]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.u-edit-wrap[data-v-b75e2feb]{display:flex;justify-content:flex-end}.chat>.u-edit-wrap[data-v-b75e2feb]{margin-top:4px}.chat>.u-edit-wrap+.a-msg[data-v-b75e2feb]{margin-top:8px}.compact-divider[data-v-b75e2feb]{display:flex;align-items:center;gap:10px;align-self:stretch;width:100%;margin:var(--chat-section-gap) 0 0}.chat>.compact-divider[data-v-b75e2feb]:first-child{margin-top:0}.cd-line[data-v-b75e2feb]{flex:1;height:1px;background:var(--line)}.cd-label[data-v-b75e2feb]{flex:none;display:inline-flex;align-items:center;gap:8px;max-width:80%;font-size:var(--text-base);color:var(--muted);white-space:nowrap}.cd-btn[data-v-b75e2feb]{background:none;border:none;padding:0;cursor:pointer;font:inherit;font-size:var(--text-base);color:var(--muted)}.cd-view[data-v-b75e2feb]{color:var(--color-accent)}.cd-btn:hover .cd-view[data-v-b75e2feb]{text-decoration:underline}.chat>.turn-failed[data-v-b75e2feb]{margin-top:var(--chat-turn-gap)}.chat>.turn-failed[data-v-b75e2feb]:first-child{margin-top:0}.turn-failed[data-v-b75e2feb]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border:var(--p-hairline) solid var(--color-danger-bd);border-radius:var(--radius-lg);background:var(--color-danger-soft);box-shadow:var(--shadow-xs);animation:kimi-card-in var(--duration-slow) var(--ease-out)}.tf-chip[data-v-b75e2feb]{display:inline-flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);border-radius:var(--radius-md);background:var(--color-surface-raised);box-shadow:var(--shadow-xs);flex:none;color:var(--color-danger)}.tf-main[data-v-b75e2feb]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.tf-title[data-v-b75e2feb]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);line-height:var(--leading-normal)}.tf-sub[data-v-b75e2feb]{font-size:var(--text-xs);color:var(--color-text-muted);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tf-meta[data-v-b75e2feb]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.goal-prov[data-v-b75e2feb]{display:flex;align-items:center;gap:var(--space-1);margin-bottom:var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);line-height:var(--leading-normal);user-select:none}.a-msg[data-v-b75e2feb]{align-self:flex-start;max-width:94%;width:94%}.a-msg-ft[data-v-b75e2feb]{display:flex;justify-content:flex-start;align-items:center;gap:8px;height:auto;margin-top:var(--chat-block-gap);overflow:visible}.a-time[data-v-b75e2feb]{display:inline-flex;align-items:center;font-size:var(--text-base);color:var(--muted);line-height:1}.a-cpbtn[data-v-b75e2feb]{display:inline-flex;align-items:center;justify-content:center;padding:2px 5px;background:none;border:none;border-radius:var(--radius-sm);color:var(--muted);font:inherit;font-size:var(--text-base);line-height:1;cursor:pointer;opacity:.7;transition:opacity .12s,color .12s,background-color .12s;min-height:22px;box-sizing:border-box}.a-cpbtn[data-v-b75e2feb]:hover{opacity:1;color:var(--color-accent);background:var(--hover)}.a-cpbtn svg[data-v-b75e2feb]{display:block;flex:none}@media(hover:none){.a-msg-ft[data-v-b75e2feb]{height:auto;margin-top:var(--chat-block-gap);opacity:1;pointer-events:auto}.a-cpbtn[data-v-b75e2feb]{font-size:var(--ui-font-size-sm);padding:8px 10px;margin:-4px -6px}}.a-msg .msg[data-v-b75e2feb]{font-size:var(--ui-font-size);line-height:var(--leading-prose);color:var(--color-text);font-weight:500}.a-msg .msg[data-v-b75e2feb] p{margin:0}.a-msg .msg[data-v-b75e2feb] p+p{margin-top:8px}.a-msg>.msg[data-v-b75e2feb],.a-msg[data-v-b75e2feb]>.think,.a-msg[data-v-b75e2feb]>.tool-group,.a-msg[data-v-b75e2feb]>.activity-run,.a-msg[data-v-b75e2feb]>.agent-card,.a-msg[data-v-b75e2feb]>.agent-group,.a-msg[data-v-b75e2feb]>.tool-line,.a-msg[data-v-b75e2feb]>.swarm-card,.a-msg[data-v-b75e2feb]>.media-tool,.a-msg[data-v-b75e2feb]>.ask-receipt{margin-top:var(--chat-block-gap)}.a-msg>.msg[data-v-b75e2feb]:first-child,.a-msg[data-v-b75e2feb]>.think:first-child,.a-msg[data-v-b75e2feb]>.tool-group:first-child,.a-msg[data-v-b75e2feb]>.activity-run:first-child,.a-msg[data-v-b75e2feb]>.agent-card:first-child,.a-msg[data-v-b75e2feb]>.agent-group:first-child,.a-msg[data-v-b75e2feb]>.tool-line:first-child,.a-msg[data-v-b75e2feb]>.swarm-card:first-child,.a-msg[data-v-b75e2feb]>.media-tool:first-child,.a-msg[data-v-b75e2feb]>.ask-receipt:first-child{margin-top:0}.a-msg>.goal-prov:first-child+.msg[data-v-b75e2feb],.a-msg>.goal-prov[data-v-b75e2feb]:first-child+.think,.a-msg>.goal-prov[data-v-b75e2feb]:first-child+.tool-group,.a-msg>.goal-prov[data-v-b75e2feb]:first-child+.activity-run,.a-msg>.goal-prov[data-v-b75e2feb]:first-child+.agent-card,.a-msg>.goal-prov[data-v-b75e2feb]:first-child+.agent-group,.a-msg>.goal-prov[data-v-b75e2feb]:first-child+.tool-line,.a-msg>.goal-prov[data-v-b75e2feb]:first-child+.swarm-card,.a-msg>.goal-prov[data-v-b75e2feb]:first-child+.media-tool,.a-msg>.goal-prov[data-v-b75e2feb]:first-child+.ask-receipt,.a-msg>.goal-prov[data-v-b75e2feb]:first-child+.turn-fold{margin-top:0}.a-msg[data-v-b75e2feb] :not(pre)>code{font:.9em var(--font-mono);background:var(--color-inline-code-bg);border:.5px solid var(--color-line);border-radius:var(--radius-sm);padding:1px 6px;color:var(--color-accent-hover)}@container (min-width: 760px){.a-msg .msg[data-v-b75e2feb] .markstream-vue.markdown-renderer:has(.table-node-wrapper.md-table-wide){content-visibility:visible}.a-msg .msg[data-v-b75e2feb] .table-node-wrapper.md-table-wide{position:relative;left:50%;width:max-content;min-width:100%;max-width:min(var(--p-table-max),calc(100cqi - var(--space-5) - var(--space-5)))!important;transform:translate(-50%)}.a-msg .msg[data-v-b75e2feb] .table-node-wrapper:not(.md-table-wide){--table-cell-cap: min(var(--p-table-cell-max), 36cqi)}}.u-media[data-v-b75e2feb]{display:flex;flex-wrap:wrap;gap:var(--space-2)}.u-media[data-v-b75e2feb]:not(:last-child){margin-bottom:var(--space-2)}.u-atts[data-v-b75e2feb]{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.sending-placeholder[data-v-b75e2feb]{align-self:flex-start;padding:10px 0}.skill-act[data-v-b75e2feb]{display:flex;flex-direction:column;gap:2px}.skill-act-head[data-v-b75e2feb]{font-size:var(--ui-font-size-sm);font-weight:500;color:var(--color-accent-hover);display:flex;align-items:center;gap:6px}.skill-act-arrow[data-v-b75e2feb]{color:var(--color-accent);font-size:var(--text-base)}.skill-act-args[data-v-b75e2feb]{font-size:var(--text-base);color:var(--muted);padding-left:17px;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:640px){.chat[data-v-b75e2feb]{box-sizing:border-box;width:100%;padding:14px max(12px,var(--safe-right)) 18px max(12px,var(--safe-left))}.u-bub[data-v-b75e2feb]{max-width:min(88%,calc(100vw - 52px))}.a-msg[data-v-b75e2feb]{width:100%;max-width:100%}.u-bub .u-text[data-v-b75e2feb],.a-msg .msg[data-v-b75e2feb]{font-size:var(--ui-font-size-xl)}.a-msg[data-v-b75e2feb] .md,.a-msg[data-v-b75e2feb] .markdown-renderer,.a-msg[data-v-b75e2feb] .code-block-container,.a-msg[data-v-b75e2feb] .diff-wrap,.a-msg[data-v-b75e2feb] pre{max-width:100%}.a-msg[data-v-b75e2feb] .code-block-container pre,.a-msg[data-v-b75e2feb] .diff-pre{overflow-x:auto;-webkit-overflow-scrolling:touch}.a-msg[data-v-b75e2feb] .media-tool.mob{width:min(44vw,160px)}.cd-label[data-v-b75e2feb]{min-width:0;max-width:calc(100% - 48px);overflow:hidden;text-overflow:ellipsis}.u-edit-confirm[data-v-b75e2feb]{flex-wrap:wrap;justify-content:flex-end;max-width:calc(100vw - 28px)}.ts[data-v-b75e2feb]{font-size:var(--ui-font-size-sm)}.chat-empty-text[data-v-b75e2feb],.chat-loading-text[data-v-b75e2feb]{font-size:var(--ui-font-size-lg)}.cd-label[data-v-b75e2feb],.cd-btn[data-v-b75e2feb]{font-size:var(--ui-font-size)}}.top-sentinel[data-v-b75e2feb]{display:flex;align-items:center;justify-content:center;padding:12px 0;min-height:28px;user-select:none}.top-sentinel-loading[data-v-b75e2feb]{opacity:.8}.top-sentinel-btn[data-v-b75e2feb]{appearance:none;border:.5px solid var(--border);background:transparent;color:var(--muted);font-size:var(--ui-font-size-sm);padding:4px 12px;border-radius:999px;cursor:pointer;transition:color .15s ease,border-color .15s ease}.top-sentinel-btn[data-v-b75e2feb]:hover{color:var(--fg);border-color:var(--fg)}.top-sentinel-text[data-v-b75e2feb]{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:var(--ui-font-size-sm)}.chat[data-v-b75e2feb]{background:transparent}.chat[data-v-b75e2feb]{gap:0;padding:22px 20px 26px}.u-bub[data-v-b75e2feb]{background:var(--color-user-bubble-bg);border-radius:var(--radius-lg);padding:10px 12px}.a-msg[data-v-b75e2feb]{max-width:100%;width:100%}.chat>.q-stack[data-v-b75e2feb]{margin-top:var(--chat-turn-gap)}.chat>.q-stack[data-v-b75e2feb]:first-child{margin-top:0}.q-stack[data-v-b75e2feb]{align-self:flex-end;width:100%;display:flex;flex-direction:column;gap:8px}.q-head[data-v-b75e2feb]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 6px;color:var(--color-text-faint);font-size:var(--ui-font-size-xs)}.q-title[data-v-b75e2feb]{display:inline-flex;align-items:center;gap:6px}.q-title b[data-v-b75e2feb]{color:var(--color-accent-hover);font-weight:var(--weight-medium)}.q-hint[data-v-b75e2feb]{color:var(--color-text-faint)}.q-turn[data-v-b75e2feb]{position:relative}.q-bub[data-v-b75e2feb]{display:flex;align-items:center;gap:8px;width:fit-content;background:var(--color-surface-raised);border:.5px dashed var(--color-accent-bd);padding:8px 8px 8px 6px;transition:border-color .12s ease,background .12s ease}.q-bub[data-v-b75e2feb]:hover{border-color:var(--color-accent);background:var(--color-accent-soft)}.q-grip[data-v-b75e2feb]{flex:none;display:inline-flex;align-items:center;padding:2px;color:var(--color-text-faint);cursor:grab;opacity:.7}.q-grip[data-v-b75e2feb]:hover{opacity:1}.q-grip[data-v-b75e2feb]:active{cursor:grabbing}.q-clamp[data-v-b75e2feb]{flex:1;min-width:0}.q-body[data-v-b75e2feb]{flex:1;min-width:0;background:none;border:none;padding:0;margin:0;font:inherit;color:var(--color-text);text-align:left;cursor:pointer;opacity:.82}.q-bub:hover .q-body[data-v-b75e2feb]{opacity:1}.q-body[data-v-b75e2feb]:disabled{cursor:default}.q-text[data-v-b75e2feb]{white-space:pre-wrap;overflow-wrap:anywhere}.q-text-placeholder[data-v-b75e2feb]{display:inline-flex;align-items:center;gap:4px;color:var(--color-text-muted)}.q-imgs[data-v-b75e2feb]{display:flex;gap:4px;flex:none}.q-img[data-v-b75e2feb]{width:28px;height:28px;object-fit:cover;border-radius:var(--radius-sm);border:.5px solid var(--color-line)}.q-file[data-v-b75e2feb]{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 6px;border-radius:var(--radius-sm);border:.5px solid var(--color-line);color:var(--color-text-muted);font-size:calc(var(--ui-font-size) - 3px);max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.q-tag[data-v-b75e2feb]{flex:none;padding:1px 6px;border-radius:var(--radius-full);font-size:var(--ui-font-size-xs);font-weight:var(--weight-medium);line-height:var(--leading-caption);white-space:nowrap}.q-tag-next[data-v-b75e2feb]{color:var(--color-accent-hover);background:var(--color-accent-soft);border:.5px solid var(--color-accent-bd)}.q-tag-idx[data-v-b75e2feb]{color:var(--color-text-faint);background:var(--color-surface-sunken);border:.5px solid var(--color-line)}.q-rm[data-v-b75e2feb]{flex:none;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:none;border:none;border-radius:var(--radius-sm);color:var(--color-text-faint);cursor:pointer;opacity:0;transition:opacity .12s ease,background .12s ease,color .12s ease}.q-bub:hover .q-rm[data-v-b75e2feb],.q-bub:focus-within .q-rm[data-v-b75e2feb],.q-rm[data-v-b75e2feb]:focus-visible{opacity:1}.q-rm[data-v-b75e2feb]:hover{background:var(--color-danger-soft);color:var(--color-danger)}.q-turn.q-dragging .q-bub[data-v-b75e2feb]{opacity:.45}.q-turn.drop-before[data-v-b75e2feb]:before,.q-turn.drop-after[data-v-b75e2feb]:after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--color-accent);border-radius:var(--radius-full);z-index:1}.q-turn.drop-before[data-v-b75e2feb]:before{top:-5px}.q-turn.drop-after[data-v-b75e2feb]:after{bottom:-5px}.chat-header[data-v-2ee21a3a]{flex:none;display:flex;align-items:center;gap:14px;height:var(--panel-head-h, 48px);padding:0 16px;border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui);min-width:0;user-select:none;container-type:inline-size}.chat-header.macos-desktop[data-v-2ee21a3a]{-webkit-app-region:drag}.chat-header.macos-desktop button[data-v-2ee21a3a],.chat-header.macos-desktop input[data-v-2ee21a3a]{-webkit-app-region:no-drag}.ch-id[data-v-2ee21a3a]{display:flex;align-items:center;gap:6px;min-width:0;flex:none;max-width:46%}.ch-ws[data-v-2ee21a3a]{color:var(--color-text-muted);font-size:var(--text-base);font-weight:var(--weight-medium);flex:none}.ch-sep[data-v-2ee21a3a]{color:var(--color-text-faint);flex:none}.ch-ses[data-v-2ee21a3a]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ch-rename[data-v-2ee21a3a]{flex:1;min-width:0;font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);background:var(--color-bg);border:.5px solid var(--color-accent);border-radius:var(--radius-xs);padding:2px 5px;outline:none;user-select:text}.ch-git[data-v-2ee21a3a]{display:flex;align-items:center;gap:4px;border:none;background:transparent;padding:0;color:var(--muted);font-family:var(--font-ui);font-size:calc(var(--ui-font-size) - 2px);flex:0 1 auto;max-width:none;min-width:0;cursor:pointer}.ch-git:hover .ch-branch[data-v-2ee21a3a]{color:var(--color-text)}.ch-branch-icon[data-v-2ee21a3a]{flex:none;color:var(--color-text-muted)}.ch-branch[data-v-2ee21a3a]{color:var(--dim);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:4px}.ch-detached[data-v-2ee21a3a]{color:var(--muted);font-style:italic}.ch-pill[data-v-2ee21a3a]{display:inline-flex;align-items:center;gap:3px;padding:1px 5px;border-radius:999px;background:var(--panel);border:.5px solid var(--line);font-size:calc(var(--ui-font-size) - 3px)}.ch-sync-pill[data-v-2ee21a3a]{border-color:var(--line)}.ch-diff-pill[data-v-2ee21a3a]{border-color:color-mix(in srgb,var(--color-success) 20%,var(--line));font-variant-numeric:tabular-nums}.ch-ahead[data-v-2ee21a3a]{color:var(--color-warning);flex:none}.ch-behind[data-v-2ee21a3a]{color:var(--color-accent-hover);flex:none}.ch-add[data-v-2ee21a3a]{color:var(--color-success);flex:none}.ch-del[data-v-2ee21a3a]{color:var(--color-danger);flex:none}.ch-spacer[data-v-2ee21a3a]{flex:1;min-width:0}@container (max-width: 720px){.ch-ws[data-v-2ee21a3a],.ch-sep[data-v-2ee21a3a]{display:none}.ch-id[data-v-2ee21a3a]{flex:1;max-width:none}.ch-spacer[data-v-2ee21a3a]{flex:0}}.chat-header .ch-act-more[data-v-2ee21a3a]{width:24px;height:24px;border-radius:var(--radius-sm)}.chat-header .ch-act-more[data-v-2ee21a3a] svg{width:14px;height:14px}.ch-act-more.open[data-v-2ee21a3a]{background:var(--color-well);color:var(--color-text)}.ch-dev[data-v-2ee21a3a]{display:inline-flex;align-items:center;height:22px;padding:0 9px;flex:none;border:.5px solid var(--color-warning-bd);border-radius:var(--radius-full);background:var(--color-warning-soft);color:var(--color-warning);font-size:var(--text-xs);font-weight:500}.ch-pr[data-v-2ee21a3a]{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 9px;flex:none;border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-well);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:500;cursor:pointer}.ch-pr svg[data-v-2ee21a3a]{flex:none}.ch-pr.pr-open[data-v-2ee21a3a]{color:var(--color-success);border-color:var(--color-success-bd);background:var(--color-success-soft)}.ch-pr.pr-merged[data-v-2ee21a3a]{color:var(--color-done);border-color:var(--color-done-bd);background:var(--color-done-soft)}.ch-pr.pr-closed[data-v-2ee21a3a]{color:var(--color-danger);border-color:var(--color-danger-bd);background:var(--color-danger-soft)}.ch-pr.pr-draft[data-v-2ee21a3a],.ch-pr.pr-unknown[data-v-2ee21a3a]{color:var(--color-text-muted);border-color:var(--color-line-strong);background:var(--color-well)}.ch-pr[data-v-2ee21a3a]:hover{border-color:var(--color-line-strong)}.ch-done-pill[data-v-2ee21a3a]{cursor:default}.ch-done-pill[data-v-2ee21a3a]:hover{border-color:var(--color-done-bd)}.ch-menu[data-v-2ee21a3a]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.menu-pop-enter-active[data-v-2ee21a3a]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-2ee21a3a]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-2ee21a3a],.menu-pop-leave-to[data-v-2ee21a3a]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}@media(max-width:980px){.ch-act-label[data-v-2ee21a3a]{display:none}}@media(max-width:640px){.chat-header[data-v-2ee21a3a]{display:none}}.slash-menu[data-menu-frame][data-v-61668b96]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.slash-scroll[data-v-61668b96]{max-height:var(--p-slash-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.slash-scroll[data-v-61668b96]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-61668b96]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.slash-menu:hover .scroll-thumb[data-v-61668b96]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-61668b96]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.slash-item[data-v-61668b96]{display:flex;align-items:baseline;gap:var(--space-2);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-b2);border-radius:var(--radius-menu-row)}.slash-item[data-v-61668b96]:hover{background:var(--color-hover)}.slash-item.active[data-v-61668b96]{background:var(--color-selected)}.slash-item+.slash-item[data-v-61668b96]{margin-top:var(--menu-rows-seam)}.slash-name[data-v-61668b96]{flex:none;max-width:60%;color:var(--color-text);font-weight:500;min-width:0;line-height:var(--leading-normal);overflow-wrap:anywhere}.slash-match[data-v-61668b96]{font-weight:var(--weight-semibold)}.slash-empty[data-v-61668b96]{padding:var(--space-1-5) var(--space-1);color:var(--color-text-muted)}@media(hover:none){.slash-item[data-v-61668b96]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.slash-desc[data-v-61668b96]{flex:1;min-width:0;color:var(--color-text-muted);font-size:var(--ui-b2);font-weight:var(--weight-regular);line-height:var(--leading-normal);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.slash-desc-match[data-v-61668b96]{font-weight:var(--weight-semibold)}@media(max-width:520px){.slash-item[data-v-61668b96]{flex-direction:column;align-items:stretch;gap:var(--space-05)}.slash-name[data-v-61668b96]{max-width:none}}.mention-menu[data-menu-frame][data-v-592070e7]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;padding:var(--space-1-5) var(--space-3);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);z-index:var(--z-dropdown)}.mention-scroll[data-v-592070e7]{max-height:var(--p-mention-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none}.mention-scroll[data-v-592070e7]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-592070e7]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);cursor:default;touch-action:none;z-index:var(--z-raised)}.mention-menu:hover .scroll-thumb[data-v-592070e7]{background:var(--color-menu-scrollbar-hover)}.scroll-thumb[data-v-592070e7]:before{content:"";position:absolute;top:0;bottom:0;left:calc(-1 * var(--space-2));right:0}.mention-state[data-v-592070e7]{padding:var(--space-2) var(--space-1);font-family:var(--font-ui);font-size:var(--ui-b2)}.mention-section[data-v-592070e7]{padding:var(--space-1) var(--space-1) var(--space-05);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label)}.mention-spin[data-v-592070e7]{position:absolute;top:var(--space-2);right:var(--space-3);color:var(--color-text-muted);z-index:var(--z-raised)}.dim[data-v-592070e7]{color:var(--color-text-muted)}.mention-item[data-v-592070e7]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--space-2);cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);border-radius:var(--radius-menu-row)}.mention-icon[data-v-592070e7]{display:inline-flex;align-items:center;justify-content:center;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--muted);flex-shrink:0}.mention-icon[data-v-592070e7] svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block}.mention-item:hover .mention-icon[data-v-592070e7],.mention-item.active .mention-icon[data-v-592070e7]{color:var(--color-text-strong)}.mention-item[data-v-592070e7]:hover{background:var(--color-hover)}.mention-item:hover .mention-name[data-v-592070e7],.mention-item.active .mention-name[data-v-592070e7]{color:var(--color-text-strong)}.mention-item.active[data-v-592070e7]{background:var(--color-selected)}.mention-item+.mention-item[data-v-592070e7]{margin-top:var(--menu-rows-seam)}.mention-item[data-v-592070e7]{transition:opacity var(--duration-slow) var(--ease-out)}.mention-item.stale[data-v-592070e7]{opacity:var(--opacity-stale)}@media(hover:none){.mention-item[data-v-592070e7]{min-height:var(--touch-target-min);padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.mention-name[data-v-592070e7]{color:var(--color-text);font-weight:500;flex-shrink:0}.mention-meta[data-v-592070e7]{color:var(--color-text-muted);font-size:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer[data-v-139db90d]{padding:7px var(--dock-inline-right, 16px) 12px var(--dock-inline-left, 16px);background:transparent;transition:background .12s}.composer.drag-over[data-v-139db90d]{background:var(--color-accent-soft)}.drop-overlay[data-v-139db90d]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--color-bg) 72%,transparent);pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--duration-base) ease,visibility var(--duration-base)}.drop-overlay.show[data-v-139db90d]{opacity:1;visibility:visible}.drop-card[data-v-139db90d]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4) var(--space-6);border-radius:var(--radius-lg);border:.5px dashed var(--color-accent);background:var(--color-bg);color:var(--color-accent);font-size:var(--ui-font-size-lg);font-weight:var(--weight-medium);box-shadow:var(--shadow-md)}.composer-card[data-v-139db90d]{--composer-control-size: var(--space-8);--composer-send-size: var(--composer-control-size);--composer-control-inset: var(--space-2);position:relative;border:.5px solid var(--color-composer-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);background:var(--color-composer-bg);box-shadow:var(--shadow-input);user-select:none;container-type:inline-size}.composer-card[data-v-139db90d]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-composer);corner-shape:var(--corner-shape-composer);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.composer-card[data-v-139db90d]:focus-within:after{opacity:1}.att-strip[data-v-139db90d]{position:relative;padding:calc(var(--space-4) + var(--space-05)) var(--space-4) 0 calc(var(--space-4) + var(--space-05))}.att-scroll[data-v-139db90d]{max-height:calc(128px + var(--space-2));overflow-y:auto;margin-right:calc(var(--icon-button-sm) + var(--space-1))}.att-scroll-content[data-v-139db90d]{display:flex;flex-direction:column;gap:var(--space-2);padding-right:var(--space-1)}.att-scroll.is-overflowing[data-v-139db90d]{padding-bottom:var(--space-6)}.att-more[data-v-139db90d]{position:absolute;left:var(--space-4);bottom:var(--space-1);z-index:var(--z-raised);display:inline-flex;align-items:center;height:18px;padding:0 var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-full);background:var(--color-surface-raised);color:var(--color-text-muted);font-size:var(--text-xs);box-shadow:var(--shadow-sm);pointer-events:none}.att-row[data-v-139db90d]{display:flex;flex-wrap:wrap;gap:6px}.att-row-media[data-v-139db90d]{gap:var(--space-2)}.att-scroll-content[data-v-139db90d] .att-chip{corner-shape:superellipse(1.5)}.att-scroll-content[data-v-139db90d] .att-tile{margin-left:calc(-1 * (var(--att-chip-pad-left, 5px) + var(--space-05)))}.att-clear[data-v-139db90d]{position:absolute;top:calc(var(--space-4) + var(--space-05));right:var(--space-4);z-index:var(--z-raised)}.file-input-hidden[data-v-139db90d]{display:none}.cin-wrap[data-v-139db90d]{position:relative;padding:14px 16px 8px}.input-row[data-v-139db90d]{position:relative;display:flex;align-items:flex-start;gap:var(--space-2)}.expand-btn[data-v-139db90d]{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border:none;border-radius:6px;background:transparent;color:var(--dim);cursor:pointer;padding:0;transition:background .12s,color .12s}.expand-btn[data-v-139db90d]:hover{background:var(--panel2);color:var(--color-text)}.expand-btn[data-v-139db90d]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.ph[data-v-139db90d]{color:var(--faint);caret-color:var(--color-text);flex:1;border:none;outline:none;resize:none;font-family:var(--font-ui);font-size:var(--content-font-size);text-autospace:normal;background:transparent;min-height:36px;max-height:25vh;overflow-y:auto;scrollbar-width:none;line-height:1.5;margin-bottom:6px;user-select:text}.ph[data-v-139db90d]::-webkit-scrollbar{display:none}.ph[data-v-139db90d]::placeholder{color:var(--muted)}.ph[data-v-139db90d]:not(:placeholder-shown){color:var(--color-text)}.composer.expanded .ph[data-v-139db90d]{min-height:70vh;max-height:70vh}.compact-chip[data-v-139db90d]{height:var(--composer-control-size);padding:0 var(--space-2);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-warning);font-family:var(--mono);font-size:var(--ui-font-size);cursor:pointer;line-height:1;flex:none;transition:background var(--duration-base) var(--ease-out)}.compact-chip[data-v-139db90d]:hover{background:var(--color-hover)}.composer-attach[data-v-139db90d]{width:var(--composer-control-size);height:var(--composer-control-size);border-radius:var(--radius-full)}.add-menu[data-v-139db90d]{position:absolute;bottom:calc(100% + var(--space-2));left:0;right:0;z-index:var(--z-dropdown);background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1-5) var(--space-3);display:flex;flex-direction:column;gap:var(--menu-rows-seam);font-family:var(--font-ui);transform-origin:bottom left}.am-scroll[data-v-139db90d]{max-height:var(--p-add-menu-h);margin:0 calc(-1 * var(--menu-row-hug));padding:0 var(--menu-row-hug);overflow-y:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:var(--menu-rows-seam)}.am-scroll[data-v-139db90d]::-webkit-scrollbar{display:none}.scroll-thumb[data-v-139db90d]{position:absolute;right:var(--menu-scrollbar-edge);width:var(--menu-scrollbar-width);border-radius:var(--radius-full);background:var(--color-menu-scrollbar);transition:background var(--duration-base) var(--ease-out);pointer-events:none;z-index:var(--z-raised)}.add-menu:hover .scroll-thumb[data-v-139db90d]{background:var(--color-menu-scrollbar-hover)}.am-row[data-v-139db90d]{display:flex;align-items:center;gap:var(--menu-row-gap-icon);margin:0 calc(-1 * var(--menu-row-hug));padding:var(--menu-row-padding-block) var(--menu-row-padding-inline);border:none;border-radius:var(--radius-menu-row);background:none;cursor:pointer;font-size:var(--ui-font-size);color:var(--color-text);text-align:left;transition:background var(--duration-base) var(--ease-out)}.am-row[data-v-139db90d]:hover{background:var(--color-hover)}.am-row[data-v-139db90d]:focus-visible{background:var(--color-selected);outline:none}@media(hover:none){.am-row[data-v-139db90d]{padding-top:var(--menu-row-touch-padding-block);padding-bottom:var(--menu-row-touch-padding-block)}}.am-row:hover .am-icon[data-v-139db90d],.am-row:focus-visible .am-icon[data-v-139db90d]{color:var(--color-text)}.am-icon[data-v-139db90d]{flex:none;width:var(--p-ic-sm);display:flex;justify-content:center;color:var(--color-text-muted);transition:color var(--duration-base) var(--ease-out)}.am-name[data-v-139db90d]{flex:none;font-weight:var(--weight-medium)}.am-desc[data-v-139db90d]{margin-left:var(--space-1);color:var(--color-text-muted);font-size:var(--ui-font-size-sm)}.send[data-v-139db90d]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-send-bg);color:var(--color-send-icon);border:none;box-shadow:var(--shadow-send);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background var(--duration-slow) var(--ease-out),transform var(--duration-fast) var(--ease-out),box-shadow var(--duration-slow) var(--ease-out);position:relative}.send[data-v-139db90d]:hover:not(:disabled){background:var(--color-send-bg-hover);box-shadow:var(--shadow-send-hover)}.send[data-v-139db90d]:active{transform:scale(.92)}.send[data-v-139db90d]:disabled{cursor:not-allowed;background:var(--color-send-bg-disabled);color:var(--color-send-icon-disabled);opacity:var(--opacity-send-disabled)}.send[data-v-139db90d]:disabled:active{transform:none}.send.is-starting[data-v-139db90d]:disabled{background:var(--color-send-bg);color:var(--color-send-icon)}.send.is-starting[data-v-139db90d] .ui-spinner{color:var(--color-send-icon)}.send.is-starting[data-v-139db90d] .ui-spinner__track{stroke:color-mix(in srgb,var(--color-send-icon) 32%,transparent)}.send svg[data-v-139db90d]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.stop[data-v-139db90d]{width:var(--composer-send-size);height:var(--composer-send-size);border-radius:var(--radius-full);background:var(--color-subtle);color:var(--color-stop-glyph);border:none;box-shadow:var(--shadow-xs);padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:background .16s ease,color .16s ease,transform .12s ease}.stop[data-v-139db90d]:hover{background:var(--color-danger);color:var(--color-text-on-accent)}.stop[data-v-139db90d]:active{transform:scale(.92)}.stop svg[data-v-139db90d]{flex:none;width:var(--composer-send-icon-size);height:var(--composer-send-icon-size)}.toolbar[data-v-139db90d]{display:flex;align-items:center;justify-content:space-between;padding:var(--space-1) var(--composer-control-inset) var(--composer-control-inset);position:relative}.menu-measure[data-v-139db90d]{position:absolute;width:max-content;height:0;overflow:hidden;visibility:hidden;pointer-events:none}.toolbar-left[data-v-139db90d],.toolbar-right[data-v-139db90d]{display:flex;align-items:center;gap:var(--space-1);min-width:0}.toolbar-left[data-v-139db90d]{flex:0 1 auto;overflow:hidden}.toolbar-right[data-v-139db90d]{flex:1 1 0;justify-content:flex-end}.perm-pill[data-v-139db90d],.swarm-chip[data-v-139db90d],.model-pill[data-v-139db90d]{position:relative;display:inline-flex;align-items:center;gap:var(--space-1);height:var(--composer-control-size);padding:0 var(--space-3);border:.5px solid transparent;border-radius:var(--radius-full);background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size);font-weight:var(--weight-medium);line-height:1;white-space:nowrap;cursor:pointer;user-select:none;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.perm-pill[data-v-139db90d]{font-size:var(--ui-font-size-sm)}.perm-pill[data-v-139db90d]:after,.swarm-chip[data-v-139db90d]:after,.model-pill[data-v-139db90d]:after{content:"";position:absolute;inset:0;border-radius:var(--radius-full);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.perm-pill[data-v-139db90d]:hover:after,.swarm-chip[data-v-139db90d]:hover:after,.model-pill[data-v-139db90d]:hover:after{opacity:1}.perm-pill.open[data-v-139db90d],.model-pill.open[data-v-139db90d]{background:var(--color-accent-soft)}.swarm-chip[data-v-139db90d]{cursor:default}.swarm-x[data-v-139db90d]{margin-right:calc(var(--composer-control-size) / 2 - var(--space-3) - var(--icon-button-sm) / 2);color:inherit;opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.swarm-chip:hover .swarm-x[data-v-139db90d],.swarm-x[data-v-139db90d]:focus-visible{opacity:1}@media(hover:none){.swarm-x[data-v-139db90d]{opacity:1;position:relative}.swarm-x[data-v-139db90d]:before{content:"";position:absolute;inset:calc(-1 * (var(--touch-target-min) - var(--icon-button-sm)) / 2)}}.perm-pill.perm-manual[data-v-139db90d]{color:var(--dim)}.perm-pill.perm-yolo[data-v-139db90d]{color:var(--color-warning)}.perm-pill.perm-auto[data-v-139db90d]{color:var(--color-danger)}.perm-pill-icon[data-v-139db90d]{flex:none}@container (max-width: 620px){.perm-pill[data-v-139db90d]{width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center;flex:none}.perm-pill-label[data-v-139db90d]{display:none}.swarm-chip[data-v-139db90d]{position:relative;width:var(--composer-control-size);height:var(--composer-control-size);padding:0;justify-content:center}.swarm-label[data-v-139db90d]{display:none}.swarm-ic[data-v-139db90d]{transition:opacity var(--duration-base) var(--ease-out)}.swarm-chip:hover .swarm-ic[data-v-139db90d]{opacity:0}.swarm-x[data-v-139db90d]{position:absolute;inset:0;width:auto;height:auto;margin-right:0}@media(hover:none){.swarm-chip[data-v-139db90d]{width:var(--touch-target-min);height:var(--touch-target-min)}.swarm-chip:hover .swarm-ic[data-v-139db90d]{opacity:1}.swarm-x[data-v-139db90d]{inset:0;width:auto;height:auto;opacity:1;background:transparent}.swarm-x[data-v-139db90d]:before{inset:0 0 auto auto;width:var(--p-ic-md);height:var(--p-ic-md);border-radius:var(--radius-full);background:var(--color-selected)}.swarm-x[data-v-139db90d] svg{position:absolute;top:calc(var(--space-1-5) / 2);right:calc(var(--space-1-5) / 2);width:calc(var(--p-ic-md) - var(--space-1-5));height:calc(var(--p-ic-md) - var(--space-1-5))}}}.ctx-group[data-v-139db90d]{display:flex;align-items:center;gap:4px;flex-shrink:0;padding:2px 0;border-radius:var(--radius-xs)}.ctx-group[data-v-139db90d]:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.model-pill[data-v-139db90d]{gap:var(--space-1);line-height:var(--leading-normal);overflow:hidden;flex:0 1 auto;min-width:0;max-width:320px;transition:background var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.model-pill[data-v-139db90d]:active{transform:scale(.97)}.model-pill[data-v-139db90d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-pill .mp-name[data-v-139db90d]{flex:0 1 auto;font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.model-pill .think-suffix[data-v-139db90d]{color:var(--color-accent);font-weight:var(--weight-medium);flex-shrink:0}.model-pill .cv[data-v-139db90d]{color:var(--faint);flex:none;transition:transform var(--duration-base) var(--ease-out),color var(--duration-base) var(--ease-out)}.model-pill:hover .cv[data-v-139db90d],.model-pill.open .cv[data-v-139db90d]{color:var(--dim)}.model-pill.open .cv[data-v-139db90d]{transform:rotate(180deg)}.model-pill.login-pill[data-v-139db90d]{flex:none;color:var(--color-accent)}.model-pill.login-pill .mp-name[data-v-139db90d]{color:var(--color-accent)}.model-dropdown[data-v-139db90d]{position:absolute;bottom:calc(100% + 4px);right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));z-index:var(--z-dropdown);min-width:200px;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:var(--space-1);display:flex;flex-direction:column;gap:1px;font-family:var(--font-ui);transform-origin:bottom right}.composer-menu-pop-enter-active[data-v-139db90d]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.composer-menu-pop-leave-active[data-v-139db90d]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.composer-menu-pop-enter-from[data-v-139db90d],.composer-menu-pop-leave-to[data-v-139db90d]{opacity:0;transform:scale(.97) translateY(2px)}.md-list[data-v-139db90d]{display:flex;flex-direction:column;gap:1px;max-height:min(320px,40vh);overflow-y:auto;overscroll-behavior:contain}.md-section[data-v-139db90d]{padding:4px 9px 2px;font-size:var(--text-xs);color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-weight:var(--weight-semibold)}.md-row[data-v-139db90d]{display:flex;align-items:center;gap:7px;width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);padding:5px 9px;border-radius:6px;text-align:left;transition:background var(--duration-base) var(--ease-out)}.md-row[data-v-139db90d]:hover{background:var(--color-hover)}.md-row:hover .md-name[data-v-139db90d]{color:var(--color-text-strong)}.md-row[data-v-139db90d]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.md-row[data-v-139db90d]:disabled{cursor:default;opacity:.58}.md-row[data-v-139db90d]:disabled:hover{background:none}.md-row.is-current[data-v-139db90d]{background:var(--color-selected)}.md-note[data-v-139db90d]{margin-left:auto;color:var(--muted);font-size:var(--ui-font-size-xs)}.md-row-more .md-more-icon[data-v-139db90d]{color:var(--dim)}.md-row-more .md-more-arrow[data-v-139db90d]{color:var(--faint);flex:none;transition:color var(--duration-base) var(--ease-out)}.md-row-more:hover .md-more-arrow[data-v-139db90d]{color:var(--dim)}.md-check[data-v-139db90d]{width:14px;flex:none;color:var(--color-accent);font-weight:500;display:flex;justify-content:center}.md-name[data-v-139db90d]{flex:1;transition:color var(--duration-base) var(--ease-out)}.md-provider[data-v-139db90d]{color:var(--muted);font-size:var(--ui-font-size-xs);flex:none}.md-star[data-v-139db90d]{color:var(--star);flex:none;margin-left:auto}.md-divider[data-v-139db90d]{height:1px;background:var(--line);margin:3px 0}.md-thinking[data-v-139db90d]{display:flex;align-items:center;gap:8px;padding:6px 9px;border-radius:var(--radius-sm)}.md-thinking .md-name[data-v-139db90d]{font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text);flex:none}.md-thinking .md-note[data-v-139db90d],.md-thinking .ui-seg[data-v-139db90d]{margin-left:auto}.md-cache-note[data-v-139db90d]{width:0;min-width:100%;padding:2px 7px 4px;color:var(--muted);font-size:var(--ui-font-size-xs);line-height:1.4}.perm-dropdown[data-v-139db90d]{position:absolute;bottom:calc(100% + 4px);left:var(--composer-control-inset);z-index:var(--z-dropdown);min-width:220px;width:max-content;max-width:calc(100vw - var(--space-8));background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);padding:5px;display:flex;flex-direction:column;gap:1px;transform-origin:bottom left}.pd-row[data-v-139db90d]{display:grid;grid-template-columns:var(--p-ic-md) var(--composer-menu-desc-width, max-content) var(--p-ic-sm);column-gap:7px;row-gap:2px;align-items:start;width:100%;background:none;border:none;cursor:pointer;padding:6px 7px;border-radius:6px;text-align:left}.pd-row[data-v-139db90d]:hover,.pd-row.is-current[data-v-139db90d]{background:var(--color-hover)}.pd-icon[data-v-139db90d]{grid-column:1;grid-row:1;width:var(--p-ic-md);min-height:1lh;display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-check[data-v-139db90d]{grid-column:3;grid-row:1;width:var(--p-ic-sm);min-height:1lh;color:var(--color-accent);font-size:var(--ui-font-size);font-weight:var(--weight-medium);display:flex;align-items:center;justify-content:center;line-height:var(--leading-tight)}.pd-info[data-v-139db90d]{display:contents}.pd-name[data-v-139db90d]{grid-column:2;grid-row:1;font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:var(--leading-tight)}.pd-desc[data-v-139db90d]{grid-column:2;grid-row:2;width:var(--composer-menu-desc-width, auto);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-caption);color:var(--muted);line-height:var(--leading-tight)}.wm-pill[data-v-139db90d]{position:absolute;top:0;left:0;margin-left:calc(-1 * var(--space-05));z-index:var(--z-raised);display:inline-flex;align-items:center;gap:var(--space-1);height:calc(var(--content-font-size) * 1.5);padding:0 calc((var(--content-font-size) * 1.5 - var(--wm-x-size)) / 2) 0 var(--space-2);border:none;border-radius:var(--radius-full);background:var(--color-surface);color:var(--color-text);font-family:var(--font-ui);font-size:var(--ui-font-size-sm);font-weight:var(--weight-medium);line-height:calc(var(--content-font-size) * 1.5);white-space:nowrap;user-select:none}.wm-x[data-v-139db90d]{position:relative;width:var(--wm-x-size);height:var(--wm-x-size);border-radius:var(--radius-full)}.wm-x[data-v-139db90d]:before{content:"";position:absolute;inset:calc(-1 * var(--wm-x-ring))}@media(hover:none){.wm-x[data-v-139db90d]:before{inset:calc((var(--wm-x-size) - var(--touch-target-min)) / 2)}}@media(max-width:980px){.perm-pill[data-v-139db90d]{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media(max-width:640px){.composer[data-v-139db90d]{padding:9px var(--dock-inline-right, max(12px, var(--safe-right))) max(24px,var(--safe-bottom)) var(--dock-inline-left, max(12px, var(--safe-left)))}.composer-card[data-v-139db90d]{--composer-control-size: 36px;max-width:100%}.input-row[data-v-139db90d]{gap:6px;min-width:0}.send[data-v-139db90d]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.send svg[data-v-139db90d]{display:none}.send[data-v-139db90d]:after{content:"↑";font-size:17px;line-height:1;color:var(--bg)}.stop[data-v-139db90d]{width:var(--composer-send-size);height:var(--composer-send-size);min-width:var(--composer-send-size);padding:0;border-radius:var(--radius-full);font-size:0;align-self:flex-end;position:relative}.stop svg[data-v-139db90d]{display:none}.stop[data-v-139db90d]:after{content:"■";font-size:17px;line-height:1}.perm-pill[data-v-139db90d],.wm-pill[data-v-139db90d]{display:none}.model-dropdown[data-v-139db90d]{right:calc(var(--composer-control-inset) + var(--composer-send-size) + var(--space-1));left:auto;min-width:180px;max-width:calc(100vw - 24px)}.ph[data-v-139db90d]{font-size:16px}.model-pill[data-v-139db90d],.attach-btn[data-v-139db90d]{font-size:var(--ui-font-size)}.toolbar[data-v-139db90d]{gap:6px;min-width:0}.toolbar-left[data-v-139db90d],.toolbar-right[data-v-139db90d]{min-width:0}.model-pill[data-v-139db90d]{max-width:min(52vw,220px)}.model-pill .mp-name[data-v-139db90d]{max-width:min(40vw,170px)}.md-row[data-v-139db90d],.md-section[data-v-139db90d]{font-size:var(--ui-font-size)}.md-thinking[data-v-139db90d]{flex-wrap:wrap;row-gap:6px}.md-thinking .ui-seg[data-v-139db90d]{margin-left:0}.pd-name[data-v-139db90d]{font-size:var(--ui-font-size)}.pd-desc[data-v-139db90d]{font-size:var(--text-xs)}}.goal-panel[data-v-cdb3e8b0]{display:flex;flex-direction:column;gap:var(--space-2);overflow-wrap:anywhere}.goal-criterion[data-v-cdb3e8b0]{padding-top:var(--space-2);border-top:.5px solid var(--color-line)}.goal-criterion-label[data-v-cdb3e8b0]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-section-label);line-height:var(--leading-normal);margin-bottom:var(--space-1)}.plan-panel[data-v-dea23306]{display:flex;flex-direction:column;gap:var(--space-2)}.plan-review-row[data-v-dea23306]{display:flex;gap:var(--space-2);font-size:var(--text-sm)}.plan-review-label[data-v-dea23306]{flex:none;color:var(--color-text-muted)}.plan-review-feedback[data-v-dea23306]{color:var(--color-text-muted)}.plan-path-only[data-v-dea23306]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-1)}.plan-path-hint[data-v-dea23306]{color:var(--color-text-muted);font-size:var(--text-sm)}.plan-path[data-v-dea23306]{max-width:100%;font-family:var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plan-empty[data-v-dea23306]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.plan-empty-ico[data-v-dea23306]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}.qcard[data-v-ca95f2cd]{margin:var(--space-2) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);overflow:hidden;animation:kimi-card-in var(--duration-base) var(--ease-out)}.qcard.minimized[data-v-ca95f2cd]{transition:background var(--duration-fast) var(--ease-out)}.qcard.minimized[data-v-ca95f2cd]:hover{background:var(--color-hover)}.qh[data-v-ca95f2cd]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-3) var(--space-4) 0}.qcard.minimized .qh[data-v-ca95f2cd]{padding-bottom:var(--space-3);align-items:center}.qcard.minimized .qh.clickable[data-v-ca95f2cd]{cursor:pointer}.qh-chip[data-v-ca95f2cd]{width:var(--p-chip-num);height:var(--p-chip-num);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.qtitle[data-v-ca95f2cd]{flex:1;min-width:0;color:var(--color-text);font-size:var(--text-lg);font-weight:var(--weight-semibold);line-height:var(--leading-tight);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.qcard.minimized .qtitle[data-v-ca95f2cd]{display:block;white-space:nowrap;text-overflow:ellipsis}.qmin[data-v-ca95f2cd],.qclose[data-v-ca95f2cd]{flex:none;margin-top:calc((var(--text-lg) * var(--leading-tight) - var(--icon-button-sm)) / 2)}.qmin[data-v-ca95f2cd]{margin-left:auto}.qcard.minimized .qmin[data-v-ca95f2cd],.qcard.minimized .qclose[data-v-ca95f2cd]{margin-top:0}.qbody[data-v-ca95f2cd]{padding:var(--space-3) var(--space-4) 0;color:var(--color-text);font:var(--text-base)/var(--leading-normal) var(--font-ui)}.qmdbody[data-v-ca95f2cd]{margin-bottom:var(--space-2)}.qopts[data-v-ca95f2cd]{display:flex;flex-direction:column;gap:2px;margin-top:var(--space-2)}.qopt[data-v-ca95f2cd]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);cursor:pointer;font:var(--text-sm)/var(--leading-normal) var(--font-ui);color:var(--color-text);transition:background var(--duration-fast) var(--ease-out);user-select:none}.qopt[data-v-ca95f2cd]:hover,.qopt.highlighted[data-v-ca95f2cd]{background:var(--color-hover)}.qopt-key[data-v-ca95f2cd]{width:var(--p-chip-num);height:var(--p-chip-num);margin-top:calc((var(--text-base) * var(--leading-normal) - var(--p-chip-num)) / 2);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.qopt-key[data-v-ca95f2cd]:empty{background:transparent}.qopt-glyph[data-v-ca95f2cd]{width:16px;height:16px;margin-top:calc((var(--text-base) * var(--leading-normal) - 16px) / 2);flex:none;border:.5px solid var(--color-line-strong);position:relative;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.qopt-glyph.rad[data-v-ca95f2cd]{border-radius:50%}.qopt-glyph.chk[data-v-ca95f2cd]{border-radius:var(--radius-xs)}.qopt.selected .qopt-glyph[data-v-ca95f2cd]{border-color:var(--color-accent)}.qopt.selected .qopt-glyph.rad[data-v-ca95f2cd]:after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--color-accent)}.qopt.selected .qopt-glyph.chk[data-v-ca95f2cd]{background:var(--color-accent)}.qopt.selected .qopt-glyph.chk[data-v-ca95f2cd]:after{content:"";position:absolute;left:4.5px;top:1.5px;width:4px;height:8px;border-right:1.5px solid var(--color-text-on-accent);border-bottom:1.5px solid var(--color-text-on-accent);transform:rotate(45deg)}.qopt-text[data-v-ca95f2cd]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.qopt-label[data-v-ca95f2cd]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.qopt-desc[data-v-ca95f2cd]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui)}.other-input[data-v-ca95f2cd]{flex:1;font:var(--text-base) var(--font-ui);border:none;border-bottom:.5px solid var(--color-line);outline:none;padding:2px var(--space-1);color:var(--color-text);background:transparent;min-width:0}.other-input[data-v-ca95f2cd]:focus-visible{border-bottom-color:var(--color-accent);box-shadow:0 1px 0 0 var(--color-accent)}.qfoot[data-v-ca95f2cd]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-3);padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.qbtns[data-v-ca95f2cd]{display:flex;align-items:center;gap:var(--space-1)}.qhint[data-v-ca95f2cd]{margin-left:auto;color:var(--color-text-faint);font:var(--text-xs) var(--font-ui);user-select:none}@media(max-width:640px){.qopt[data-v-ca95f2cd]{min-height:44px;padding:var(--space-3)}.other-input[data-v-ca95f2cd]{flex-basis:100%;min-height:28px}.qfoot[data-v-ca95f2cd]{flex-direction:column;align-items:stretch}.qhint[data-v-ca95f2cd]{display:none}.qbtns[data-v-ca95f2cd]{flex-direction:column;gap:var(--space-2)}.qbtns[data-v-ca95f2cd] .ui-button{width:100%;min-height:46px}}.appr[data-v-319750a5]{display:flex;flex-direction:column;max-height:calc(var(--app-height, 100dvh) - 72px);margin:var(--space-2) 0;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-menu);overflow:hidden auto;animation:kimi-card-in var(--duration-base) var(--ease-out)}.appr[data-v-319750a5]:before{content:"";position:sticky;top:0;flex:none;height:var(--p-scroll-seam-h);margin-bottom:calc(-1 * var(--p-scroll-seam-h));z-index:var(--z-raised);pointer-events:none;opacity:0;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 2.5%,transparent),transparent 35%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.75%,transparent),transparent 65%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.25%,transparent),transparent);transition:opacity var(--duration-slow) var(--ease-out)}.appr.scrolled[data-v-319750a5]:before{opacity:1}.appr>.ah[data-v-319750a5],.appr>.af[data-v-319750a5]{flex:none}.appr.minimized[data-v-319750a5]{transition:background var(--duration-fast) var(--ease-out)}.appr.minimized[data-v-319750a5]:hover{background:var(--color-hover)}.ah[data-v-319750a5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-3) var(--space-4) 0;flex-wrap:nowrap}.appr.minimized .ah[data-v-319750a5]{padding-bottom:var(--space-3)}.appr.minimized .ah.clickable[data-v-319750a5]{cursor:pointer}.akind[data-v-319750a5]{color:var(--color-text);font-size:var(--text-lg);font-weight:var(--weight-semibold);white-space:nowrap;flex:none}.apeek[data-v-319750a5]{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono)}.amin[data-v-319750a5],.aexpand[data-v-319750a5]{margin-left:auto;flex:none}.aexpand+.amin[data-v-319750a5]{margin-left:0}.ab[data-v-319750a5]{display:flex;flex-direction:column;flex:1;min-height:0;padding:var(--space-3) var(--space-4) 0}.ab[data-v-319750a5]>*{flex:0 1 auto;min-height:0}.ab>.plan-path[data-v-319750a5]{flex:none}.ab>.body-plan-wrap[data-v-319750a5]{flex:1}.plan-path[data-v-319750a5]{display:block;width:100%;margin-bottom:var(--space-2);padding:0;border:none;background:transparent;color:var(--color-accent);font:var(--text-xs) var(--font-mono);text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.plan-path[data-v-319750a5]:hover{text-decoration:underline}.plan-path[data-v-319750a5]:focus-visible{outline:none;text-decoration:underline;border-radius:var(--radius-xs);box-shadow:var(--p-focus-ring)}.body-code[data-v-319750a5]{display:flex;flex-direction:column}.body-code.expanded[data-v-319750a5]{flex:1}.body-code.expanded[data-v-319750a5] .hl-code{max-height:none;flex:1}.code-path[data-v-319750a5]{flex:none;color:var(--color-text-muted);font:var(--text-xs) var(--font-mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.body-shell[data-v-319750a5]{overflow-y:auto}.shell-cmd[data-v-319750a5]{font:var(--text-sm) var(--font-mono);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);white-space:pre-wrap;word-break:break-all;max-height:160px;overflow-y:auto;color:var(--color-text)}.shell-dollar[data-v-319750a5]{color:var(--color-accent-hover);font-weight:var(--weight-medium);margin-right:var(--space-2)}.shell-cwd[data-v-319750a5]{font:var(--text-xs) var(--font-mono);color:var(--color-text-muted);margin-top:var(--space-1)}.shell-danger[data-v-319750a5]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui);background:var(--color-danger-soft)}.shell-danger-ic[data-v-319750a5]{flex:none}.body-chip[data-v-319750a5]{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text);overflow-y:auto}.chip-label[data-v-319750a5]{background:var(--color-inline-code-bg);border-radius:var(--radius-sm);padding:2px var(--space-2);font:var(--weight-semibold) var(--text-xs) var(--font-mono);color:var(--color-text-muted);white-space:nowrap}.chip-value[data-v-319750a5]{font:var(--text-sm) var(--font-mono);color:var(--color-text);word-break:break-all}.chip-detail[data-v-319750a5]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted)}.body-todo[data-v-319750a5]{overflow-y:auto}.todo-item[data-v-319750a5]{display:flex;align-items:flex-start;gap:var(--space-2);padding:var(--space-1) 0;font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text)}.todo-glyph[data-v-319750a5]{color:var(--color-accent);font-size:var(--text-sm);flex:none;width:14px}.todo-title[data-v-319750a5]{color:var(--color-text)}.todo-done[data-v-319750a5]{color:var(--color-text-muted);text-decoration:line-through}.body-generic[data-v-319750a5]{font:var(--text-base)/var(--leading-normal) var(--font-ui);color:var(--color-text);word-break:break-word;overflow-y:auto}.body-plan-wrap[data-v-319750a5]{display:flex;flex-direction:column;overflow-y:auto}.body-plan-wrap[data-v-319750a5]:before{content:"";position:sticky;top:0;flex:none;height:var(--p-scroll-seam-h);margin-bottom:calc(-1 * var(--p-scroll-seam-h));z-index:var(--z-raised);pointer-events:none;opacity:0;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 2.5%,transparent),transparent 35%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.75%,transparent),transparent 65%),linear-gradient(to bottom,color-mix(in srgb,var(--color-text) 1.25%,transparent),transparent);transition:opacity var(--duration-slow) var(--ease-out)}.body-plan-wrap.scrolled[data-v-319750a5]:before{opacity:1}.body-plan-wrap>.plan-opts[data-v-319750a5]{flex:none}.body-plan[data-v-319750a5]{max-height:50vh;overflow-y:auto;min-height:0}.body-plan.expanded[data-v-319750a5]{max-height:none;flex:1}.plan-opts[data-v-319750a5]{display:flex;flex-direction:column;gap:2px;margin-top:var(--space-3);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.popt[data-v-319750a5]{display:flex;align-items:center;gap:var(--space-3);width:100%;padding:var(--space-2) var(--space-3);border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text);font:var(--text-sm)/var(--leading-normal) var(--font-ui);text-align:left;cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.popt[data-v-319750a5]:hover:not(:disabled){background:var(--color-hover)}.popt[data-v-319750a5]:focus-visible{outline:none;background:var(--color-hover);box-shadow:var(--p-focus-ring)}.popt[data-v-319750a5]:disabled{cursor:default;opacity:.6}.popt-key[data-v-319750a5]{width:var(--p-chip-num);height:var(--p-chip-num);border-radius:var(--radius-sm);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/var(--p-chip-num) var(--font-ui);text-align:center;flex:none}.popt-text[data-v-319750a5]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.popt-label[data-v-319750a5]{color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.popt-desc[data-v-319750a5]{color:var(--color-text-muted);font:var(--text-xs)/var(--leading-normal) var(--font-ui)}.popt-spin[data-v-319750a5]{flex:none;color:var(--color-text-muted)}.feedback-wrap[data-v-319750a5]{margin-top:var(--space-3);overflow-y:auto}.feedback-hint[data-v-319750a5]{font:var(--text-xs) var(--font-ui);color:var(--color-text-muted);margin-top:var(--space-1)}.af[data-v-319750a5]{display:flex;align-items:center;gap:var(--space-2);margin-top:var(--space-3);padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.abtns[data-v-319750a5]{display:flex;align-items:center;gap:var(--space-1)}.knum[data-v-319750a5]{min-width:16px;height:16px;padding:0 3px;border-radius:var(--radius-xs);background:var(--color-inline-code-bg);color:var(--color-text);font:var(--weight-medium) var(--text-xs)/16px var(--font-ui);text-align:center}.abtns .ui-button--primary .knum[data-v-319750a5]{background:color-mix(in srgb,var(--color-text-on-accent) 28%,transparent);color:var(--color-text-on-accent)}@media(max-width:640px){.popt[data-v-319750a5]{min-height:44px;padding:var(--space-3)}.af[data-v-319750a5]{flex-direction:column;align-items:stretch}.abtns[data-v-319750a5]{flex-direction:column;margin-left:0;gap:var(--space-2)}.abtns[data-v-319750a5] .ui-button{width:100%;min-height:46px}.abtns .amain[data-v-319750a5]{order:-1}}.taskspane[data-v-d5a5712a]{flex:1;min-height:0;display:flex;flex-direction:column}.tp-list[data-v-d5a5712a]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--space-05)}.tp-row[data-v-d5a5712a]{padding:var(--space-1) 0}.tp-row.fail .tp-name[data-v-d5a5712a]{color:var(--color-danger)}.tp-main[data-v-d5a5712a]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-base)}.tp-row.expandable>.tp-main[data-v-d5a5712a]{position:relative;border-radius:var(--radius-lg);padding:var(--space-1) var(--space-2);margin:calc(-1 * var(--space-1)) 0}.tp-row.expandable>.tp-main[data-v-d5a5712a]:hover{background:var(--color-hover)}.tp-row[data-v-d5a5712a]:not(.expandable){cursor:not-allowed}.tp-open[data-v-d5a5712a]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.tp-open[data-v-d5a5712a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.tp-chevron[data-v-d5a5712a]{flex:none;color:var(--muted)}.tp-name[data-v-d5a5712a]{color:var(--color-text);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-meta[data-v-d5a5712a]{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-muted)}.tp-glyph[data-v-d5a5712a]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center}.tp-done[data-v-d5a5712a]{color:var(--color-success);transform:scale(.91)}.tp-cancelled[data-v-d5a5712a]{color:var(--color-text-muted)}.tp-fail[data-v-d5a5712a]{color:var(--color-danger)}.tp-time[data-v-d5a5712a]{flex:none;font-size:var(--text-base);color:var(--muted);font-variant-numeric:tabular-nums;text-autospace:normal}.tp-model[data-v-d5a5712a]{flex:0 1 auto;min-width:0;font-size:var(--text-base);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-stop[data-v-d5a5712a]{position:relative;flex:none;color:var(--color-danger)}.tp-stop[data-v-d5a5712a]:hover{color:var(--color-danger)}@media(hover:none){.tp-stop[data-v-d5a5712a]{width:var(--touch-target-min);height:var(--touch-target-min)}.tp-row.expandable>.tp-main[data-v-d5a5712a]{min-height:var(--touch-target-min)}}.tp-empty[data-v-d5a5712a]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--faint);font-size:var(--ui-font-size-sm);user-select:none}@media(max-width:640px){.tp-main[data-v-d5a5712a]{flex-wrap:wrap;row-gap:var(--space-1)}.tp-name[data-v-d5a5712a]{font-size:var(--ui-font-size-sm)}}.sg-empty[data-v-f7e4b600]{height:100%;display:flex;align-items:center;justify-content:center;color:var(--color-text-faint);font-size:var(--text-sm);user-select:none}.sg-grid[data-v-f7e4b600]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--p-subagent-card-min),1fr));gap:var(--space-2)}.sg-card[data-v-f7e4b600]{position:relative;display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-3);border-radius:var(--radius-lg);background:var(--color-selected)}.sg-card.openable[data-v-f7e4b600]{cursor:pointer}.sg-card.openable[data-v-f7e4b600]:hover{background:var(--color-selected-hover)}.sg-card[data-v-f7e4b600]:not(.openable){cursor:not-allowed}.sg-open[data-v-f7e4b600]{position:absolute;inset:0;padding:0;border:none;border-radius:var(--radius-lg);background:transparent;cursor:pointer}.sg-open[data-v-f7e4b600]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sg-top[data-v-f7e4b600]{display:flex;align-items:center;gap:var(--space-2)}.sg-name[data-v-f7e4b600]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-medium)}.sg-num[data-v-f7e4b600]{flex:none;color:var(--color-text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums}.sg-card:has(.sg-cancel) .sg-top[data-v-f7e4b600]{padding-right:calc(var(--icon-button-sm) + var(--space-1))}@media(hover:none){.sg-card:has(.sg-cancel) .sg-top[data-v-f7e4b600]{padding-right:calc(var(--touch-target-min) + var(--space-1))}}.sg-desc[data-v-f7e4b600]{color:var(--color-text-muted);font-size:var(--text-sm);line-height:var(--leading-caption);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.sg-foot[data-v-f7e4b600]{display:flex;flex-direction:column;gap:var(--space-1)}.sg-model[data-v-f7e4b600]{display:flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs)}.sg-model span[data-v-f7e4b600]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sg-status[data-v-f7e4b600]{display:flex;align-items:center}.sg-state[data-v-f7e4b600]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);text-autospace:normal}.sg-ic-done[data-v-f7e4b600]{color:var(--color-success);transform:scale(.91)}.s-fail .sg-state[data-v-f7e4b600]{color:var(--color-danger)}.sg-time[data-v-f7e4b600]{margin-left:auto;display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted);font-size:var(--text-xs);font-variant-numeric:tabular-nums;text-autospace:normal}.sg-cancel[data-v-f7e4b600]{position:absolute;top:var(--space-2);right:var(--space-2);color:var(--color-text-muted);opacity:0;transition:opacity var(--duration-base) var(--ease-out)}.sg-card:hover .sg-cancel[data-v-f7e4b600],.sg-cancel[data-v-f7e4b600]:focus-visible{opacity:1}.sg-cancel[data-v-f7e4b600]:hover{color:var(--color-danger)}@media(hover:none){.sg-cancel[data-v-f7e4b600]{top:0;right:0;width:var(--touch-target-min);height:var(--touch-target-min);opacity:1}}.todo-card[data-v-f090f678]{display:flex;flex-direction:column;gap:var(--space-3);font-size:var(--text-base)}.tc-row[data-v-f090f678]{display:flex;align-items:center;gap:var(--space-2);color:var(--color-text)}.tc-name[data-v-f090f678]{flex:1;min-width:0;overflow-wrap:anywhere;line-height:var(--leading-caption)}.tc-row.s-in_progress .tc-name[data-v-f090f678]{font-weight:var(--weight-medium)}.tc-row.s-pending .tc-name[data-v-f090f678]{color:var(--color-text-muted)}.tc-glyph[data-v-f090f678]{flex:none;width:var(--p-ic-md);height:var(--p-ic-md);display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-full)}.tc-glyph.g-done[data-v-f090f678]{color:var(--color-success)}.tc-glyph.g-pending[data-v-f090f678]{border:var(--p-ring-stroke) solid var(--color-line-strong)}.tc-glyph .tc-spin[data-v-f090f678]{color:var(--color-text)}.tc-empty[data-v-f090f678]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);padding:var(--space-6) var(--space-4);color:var(--color-text-faint);font-size:var(--text-sm)}.tc-empty-ico[data-v-f090f678]{width:var(--p-empty-ico);height:var(--p-empty-ico);color:var(--color-line-strong)}@media(max-width:640px){.todo-card[data-v-f090f678]{font-size:var(--text-lg)}.tc-row[data-v-f090f678]{padding:var(--space-2) var(--space-3)}}.wp-head-tab[data-v-82048a74]{display:inline-flex;align-items:center;gap:var(--space-2);padding:0;border:.5px solid transparent;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium);line-height:var(--leading-solid);white-space:nowrap;flex:none}.wp-head-tab[data-v-82048a74] svg{width:1.5em;height:1.5em}.wp-head-meta[data-v-82048a74]{color:var(--color-text-muted);text-autospace:normal}.wp-head-actions[data-v-82048a74]{margin-left:auto;display:flex;align-items:center;gap:var(--space-1);flex:none}@media(max-width:480px){.wp-head-actions[data-v-82048a74]{flex-basis:100%;margin-left:0}}@media(hover:none){.wp-head-actions[data-v-82048a74] .ui-seg__item{min-height:var(--touch-target-min)}}@media(max-width:640px),(hover:none){.wp-head-actions[data-v-82048a74] .ui-seg__item{height:var(--touch-target-min)}.wp-head-actions[data-v-82048a74] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}.wp-head-actions[data-v-82048a74] .fc-trigger{min-height:var(--touch-target-min)}}.filter-control[data-v-153e0d9c]{display:inline-flex;min-width:0}.fc-chevron[data-v-153e0d9c]{color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.fc-trigger[aria-expanded=true] .fc-chevron[data-v-153e0d9c]{transform:rotate(180deg)}.fc-menu[data-v-153e0d9c]{position:fixed;z-index:var(--z-dropdown)}.fc-menu[data-v-153e0d9c] .ui-menu{min-width:0}.fc-label[data-v-153e0d9c]{flex:1;white-space:nowrap}.filter-control[data-v-153e0d9c] .ui-seg__item[data-icon=circle-check] .ui-seg__icon,.fc-menu .kw-icon[data-icon=circle-check][data-v-153e0d9c]{transform:scale(.91)}.fc-check[data-v-153e0d9c]{color:var(--color-accent)}.chat-dock[data-v-4e74be75]{--dock-inline-left: 16px;--dock-inline-right: 16px;box-sizing:border-box;width:100%;max-width:calc(var(--read-max) + var(--panes-scrollbar-width, 0px));padding-right:var(--panes-scrollbar-width, 0px);flex:none;position:absolute;inset:auto 0 0;background:transparent;z-index:var(--z-sticky)}.chat-dock.has-popup[data-v-4e74be75]{z-index:var(--z-dropdown)}.chat-dock.align-center[data-v-4e74be75]{margin-left:auto;margin-right:auto}.chat-dock.align-left[data-v-4e74be75]{margin-left:0;margin-right:auto}.chat-dock.align-mobile[data-v-4e74be75]{max-width:none}.chat-dock[data-v-4e74be75]:before{--fade: 48px;--veil: 72px;content:"";position:absolute;top:calc(-1 * var(--fade));right:0;bottom:0;left:0;z-index:0;pointer-events:none;background:linear-gradient(to bottom,color-mix(in srgb,var(--color-bg) 0%,transparent),color-mix(in srgb,var(--color-bg) 30%,transparent) 21px,color-mix(in srgb,var(--color-bg) 70%,transparent) 45px,var(--color-bg) var(--veil))}.chat-dock[data-v-4e74be75]>*{position:relative;z-index:1}.dock-work-panel[data-v-4e74be75]{position:absolute;left:16px;right:calc(16px + var(--panes-scrollbar-width, 0px));bottom:100%;background:var(--color-menu-bg-frost);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);margin-bottom:var(--space-2);max-height:min(360px,50vh);display:flex;flex-direction:column;overflow:hidden;user-select:none}.dock-work-panel.panel-todos .dock-work-head[data-v-4e74be75],.dock-work-panel.panel-goal .dock-work-head[data-v-4e74be75],.dock-work-panel.panel-subagent .dock-work-head[data-v-4e74be75],.dock-work-panel.panel-bash .dock-work-head[data-v-4e74be75]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-body[data-v-4e74be75],.dock-work-panel.panel-goal .dock-work-body[data-v-4e74be75],.dock-work-panel.panel-subagent .dock-work-body[data-v-4e74be75],.dock-work-panel.panel-bash .dock-work-body[data-v-4e74be75]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-todos .dock-work-head[data-v-4e74be75],.dock-work-panel.panel-goal .dock-work-head[data-v-4e74be75],.dock-work-panel.panel-plan .dock-work-head[data-v-4e74be75],.dock-work-panel.panel-subagent .dock-work-head[data-v-4e74be75],.dock-work-panel.panel-bash .dock-work-head[data-v-4e74be75]{padding:var(--space-4) var(--space-4) 0;border-bottom:none}.dock-work-panel.panel-todos .dock-work-tab[data-v-4e74be75],.dock-work-panel.panel-goal .dock-work-tab[data-v-4e74be75],.dock-work-panel.panel-plan .dock-work-tab[data-v-4e74be75],.dock-work-panel.panel-subagent .dock-work-tab[data-v-4e74be75],.dock-work-panel.panel-bash .dock-work-tab[data-v-4e74be75]{padding:0;line-height:var(--leading-solid)}.dock-work-panel.panel-goal .gh-time[data-v-4e74be75]{color:var(--color-text-muted)}.dock-work-panel.panel-todos .dock-work-body[data-v-4e74be75],.dock-work-panel.panel-goal .dock-work-body[data-v-4e74be75],.dock-work-panel.panel-plan .dock-work-body[data-v-4e74be75],.dock-work-panel.panel-subagent .dock-work-body[data-v-4e74be75],.dock-work-panel.panel-bash .dock-work-body[data-v-4e74be75]{margin-top:var(--space-3);padding:0 var(--space-4) var(--space-4)}.dock-work-panel.panel-subagent[data-v-4e74be75],.dock-work-panel.panel-bash[data-v-4e74be75]{height:min(var(--p-dock-panel-h),50vh)}.dock-work-tab.tab-progress[data-v-4e74be75]{display:inline-flex;align-items:center;gap:var(--space-2)}.dock-work-head[data-v-4e74be75]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:.5px solid var(--color-line);position:relative;z-index:1}.dock-work-body[data-v-4e74be75]{padding:var(--space-2) var(--space-3);overflow-y:auto;min-height:0;display:flex;flex-direction:column}@media(max-width:480px){.dock-work-head[data-v-4e74be75]{flex-wrap:wrap}}.dock-work-panel.body-scrolled-up .dock-work-body[data-v-4e74be75]{mask-image:linear-gradient(to bottom,transparent,black var(--menu-scroll-fade))}.dock-work-body[data-v-4e74be75] .taskspane{border:none;background:transparent;padding:0}.dock-work-body[data-v-4e74be75] .taskspane .tp-head{display:none}.dock-workbar[data-v-4e74be75]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--space-1) var(--space-1-5);padding:var(--space-1) calc(var(--dock-inline-right) + var(--space-4) + var(--p-hairline)) var(--space-05) calc(var(--dock-inline-left) + var(--space-4) + var(--p-hairline))}.dock-workbar[data-v-4e74be75] .ui-pill{position:relative;gap:var(--space-1-5);height:auto;padding:var(--space-2) calc(var(--space-3) + var(--space-05)) var(--space-2) var(--space-3);border:none;border-radius:var(--radius-lg);background:var(--color-selected);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);color:var(--color-text);font-size:var(--text-base);line-height:var(--leading-normal)}.dock-workbar[data-v-4e74be75] .ui-pill svg{width:1.5em;height:1.5em;color:inherit}.dock-workbar[data-v-4e74be75] .ui-pill:after{content:"";position:absolute;inset:0;border-radius:var(--radius-lg);background:var(--color-hover);opacity:0;transition:opacity var(--duration-base) var(--ease-out);pointer-events:none}.dock-workbar[data-v-4e74be75] .ui-pill:hover:not(:disabled):after,.dock-workbar[data-v-4e74be75] .ui-pill.is-active:after{opacity:1}.chat-dock.pills-compact .dock-workbar[data-v-4e74be75] .ui-pill{padding:var(--space-2)}.chat-dock.pills-compact .dock-workbar[data-v-4e74be75] .ui-pill>span{display:none}.dock-workbar .dw-count[data-v-4e74be75]{color:var(--color-text-muted)}.dock-workbar .dw-running[data-v-4e74be75]{display:inline-flex;align-items:center;gap:var(--space-1);color:var(--color-text-muted)}.dock-workbar .dw-goal-status[data-v-4e74be75]{font-weight:var(--weight-medium)}.dock-workbar .dw-goal-status--active[data-v-4e74be75]{color:var(--color-success)}.dock-workbar .dw-goal-status--paused[data-v-4e74be75]{color:var(--color-warning)}.dock-workbar .dw-goal-status--blocked[data-v-4e74be75]{color:var(--color-danger)}.dock-approval[data-v-4e74be75]{margin-top:8px}.chat-dock.has-approval[data-v-4e74be75]{display:flex;flex-direction:column;max-height:calc(var(--app-height, 100dvh) - 72px)}.chat-dock.has-approval>.dock-workbar[data-v-4e74be75]{flex:none}.chat-dock.has-approval>.dock-approval[data-v-4e74be75]{min-height:0}@media(max-width:640px){.chat-dock[data-v-4e74be75]{--dock-inline-left: max(12px, var(--safe-left));--dock-inline-right: max(12px, var(--safe-right))}.dock-work-panel[data-v-4e74be75]{left:10px;right:calc(10px + var(--panes-scrollbar-width, 0px))}.dock-work-head-actions[data-v-4e74be75] .ui-seg__item{height:var(--touch-target-min)}.dock-work-head-actions[data-v-4e74be75] .ui-icon-button{width:var(--touch-target-min);height:var(--touch-target-min)}}.chat-dock[data-v-4e74be75]:not(.align-mobile) .composer{padding-bottom:14px}.dock-panel-enter-active[data-v-4e74be75]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.dock-panel-leave-active[data-v-4e74be75]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out)}.dock-panel-enter-from[data-v-4e74be75],.dock-panel-leave-to[data-v-4e74be75]{opacity:0;transform:translateY(var(--motion-panel-shift)) scale(var(--motion-panel-scale))}.ws-home[data-v-cf7957ea]{flex:none;display:flex;flex-direction:column;align-items:center;gap:var(--space-1);padding:0 var(--space-4) var(--space-4);user-select:none}.ws-home-title[data-v-cf7957ea]{display:flex;align-items:center;gap:10px;color:var(--color-text);font-size:var(--ui-t1);font-weight:var(--weight-section-label)}.ws-home-folder[data-v-cf7957ea]{color:var(--color-text-muted)}.ws-home-path[data-v-cf7957ea]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wrs[data-v-f463cc7b]{flex:none;display:flex;flex-direction:column;margin:var(--space-4) var(--dock-inline-right, 16px) 0 var(--dock-inline-left, 16px)}.wrs-caption[data-v-f463cc7b]{padding:0 var(--space-2) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-section-label);text-transform:uppercase;color:var(--faint);user-select:none}.wrs-row[data-v-f463cc7b]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-width:0;padding:6px var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-family:var(--font-ui);text-align:left;cursor:pointer}.wrs-row[data-v-f463cc7b]:hover{background:var(--color-hover)}.wrs-row[data-v-f463cc7b]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.wrs-ico[data-v-f463cc7b]{display:inline-flex;flex:none}.wrs-ico--open[data-v-f463cc7b]{color:var(--color-success)}.wrs-ico--done[data-v-f463cc7b]{color:var(--color-done)}.wrs-title[data-v-f463cc7b]{flex:1;min-width:0;font-size:var(--ui-font-size-sm);font-weight:var(--weight-caption);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wrs-time[data-v-f463cc7b]{flex:none;color:var(--color-text-faint);font-size:var(--text-xs);font-variant-numeric:tabular-nums}.wrs-foot[data-v-f463cc7b]{display:flex;justify-content:center;margin-top:var(--space-2)}.wrs-more[data-v-f463cc7b]{display:inline-flex;align-items:center;gap:var(--space-1);height:26px;padding:0 var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.wrs-more[data-v-f463cc7b]:hover{background:var(--color-hover);color:var(--color-text)}.wrs-more svg[data-v-f463cc7b]{color:var(--color-text-faint)}.conversation-toc[data-v-b8ba267a]{position:absolute;z-index:var(--z-sticky);top:50%;transform:translateY(-50%);--toc-content-max: min( var(--p-content-max), calc(100cqi - var(--space-5) - var(--space-5)) );left:calc(50% + (var(--toc-content-max) / 2) + 14px);max-height:calc(100% - 160px);display:flex;flex-direction:column;justify-content:center;opacity:.5;transition:opacity var(--duration-base) var(--ease-out)}.conversation-toc[data-v-b8ba267a]:before{content:"";position:absolute;inset:0 -48px 0 -14px;z-index:0}.conversation-toc[data-v-b8ba267a]:hover,.conversation-toc[data-v-b8ba267a]:focus-within{opacity:1}.conversation-toc[data-v-b8ba267a]:hover:not(:focus-within){transition-delay:var(--duration-hover-intent)}.toc-scroll[data-v-b8ba267a]{position:relative;z-index:1;display:flex;flex-direction:column;gap:7px;padding:8px 0;min-height:0;overflow-y:auto;scrollbar-width:none}.toc-scroll[data-v-b8ba267a]::-webkit-scrollbar{display:none}.toc-row[data-v-b8ba267a]{display:flex;align-items:center;gap:10px;height:18px;padding:0;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);text-align:left;cursor:pointer;white-space:nowrap}.toc-row[data-v-b8ba267a]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.toc-bar[data-v-b8ba267a]{flex:none;width:3px;height:14px;border-radius:var(--radius-full);background:var(--color-accent);opacity:.3;transition:opacity var(--duration-fast) var(--ease-out),height var(--duration-fast) var(--ease-out)}.toc-label[data-v-b8ba267a]{display:block;max-width:0;overflow:hidden;opacity:0;text-overflow:ellipsis;transition:max-width .22s var(--ease-out),opacity var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.conversation-toc:hover .toc-bar[data-v-b8ba267a],.conversation-toc:focus-within .toc-bar[data-v-b8ba267a]{height:18px;opacity:.5}.conversation-toc:hover .toc-label[data-v-b8ba267a],.conversation-toc:focus-within .toc-label[data-v-b8ba267a]{max-width:220px;opacity:1}.conversation-toc:hover:not(:focus-within) .toc-bar[data-v-b8ba267a]{transition-delay:0ms,var(--duration-hover-intent)}.conversation-toc:hover:not(:focus-within) .toc-label[data-v-b8ba267a]{transition-delay:var(--duration-hover-intent),var(--duration-hover-intent),0ms}.toc-row.active .toc-bar[data-v-b8ba267a]{opacity:1;height:18px}.toc-row.active .toc-label[data-v-b8ba267a]{color:var(--color-accent);font-weight:var(--weight-medium)}.toc-row:hover .toc-bar[data-v-b8ba267a]{opacity:1}.toc-row:hover .toc-label[data-v-b8ba267a]{color:var(--color-text)}.conversation-toc.toc-clipped[data-v-b8ba267a]{visibility:hidden;pointer-events:none}.tsearch[data-v-26f3fed5]{position:absolute;top:calc(var(--panel-head-h, 48px) + var(--space-3));right:var(--space-3);z-index:var(--z-sticky);width:min(var(--p-findbar-w),calc(100% - var(--space-3) * 2));background:var(--color-surface-raised);border:var(--p-hairline) solid var(--color-line);border-radius:var(--radius-2xl);box-shadow:var(--shadow-menu);animation:kimi-card-in var(--duration-slow) var(--ease-out)}.tsearch.mobile[data-v-26f3fed5]{top:var(--space-3)}.tsearch[data-v-26f3fed5]:after{content:"";position:absolute;inset:0;border:inherit;border-color:var(--color-composer-focus-line);border-radius:var(--radius-2xl);opacity:0;pointer-events:none;transition:opacity var(--duration-slow) var(--ease-in-out)}.tsearch[data-v-26f3fed5]:focus-within:after{opacity:1}.tsearch-main[data-v-26f3fed5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-1) var(--space-2);min-height:calc(var(--space-8) + 2 * var(--space-1))}.tsearch-icon[data-v-26f3fed5]{flex:none;margin-left:var(--space-1);color:var(--color-text-muted)}.tsearch-input[data-v-26f3fed5]{flex:1;min-width:0;height:var(--space-8);padding:0;border:none;background:transparent;font-family:var(--font-ui);font-size:var(--ui-font-size);color:var(--color-text)}.tsearch-input[data-v-26f3fed5]:focus-visible{outline:none}.tsearch-input[data-v-26f3fed5]::placeholder{color:var(--color-text-muted)}.tsearch-spin[data-v-26f3fed5]{display:inline-flex;flex:none}.tsearch-sep[data-v-26f3fed5]{flex:none;width:var(--p-hairline);height:var(--space-4);background:var(--color-line)}.tsearch .tsearch-close[data-v-26f3fed5]{border-radius:var(--radius-full)}.tsearch-foot-wrap[data-v-26f3fed5]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.tsearch-foot-wrap.open[data-v-26f3fed5]{grid-template-rows:1fr}.tsearch-foot[data-v-26f3fed5]{overflow:hidden;min-height:0;display:flex;align-items:center;gap:var(--space-1);padding:0 var(--space-2)}.tsearch-foot-wrap.open .tsearch-foot[data-v-26f3fed5]{padding:var(--space-1) var(--space-2);border-top:var(--p-hairline) solid var(--color-line)}.tsearch-count[data-v-26f3fed5]{margin-left:auto;padding-right:var(--space-1);font-size:var(--ui-font-size-sm);color:var(--color-text-muted);white-space:nowrap;user-select:none}.tsearch-rings[data-v-26f3fed5]{position:absolute;inset:0;pointer-events:none}.tsearch-ring[data-v-26f3fed5]{position:absolute;box-sizing:content-box;border:var(--p-findring-w) solid var(--color-warning);margin:calc(-1 * var(--p-findring-w));border-radius:var(--radius-xs);pointer-events:none}.doodle-host[data-v-694a2ad0]{position:relative;width:100%;aspect-ratio:338 / 152;display:flex;align-items:center;justify-content:center}.doodle-canvas[data-v-694a2ad0]{position:absolute;inset:0;width:100%;height:100%;display:block;opacity:0;transition:opacity .25s ease}.doodle-canvas.ready[data-v-694a2ad0]{opacity:1}@media(prefers-reduced-motion:reduce){.doodle-canvas[data-v-694a2ad0]{transition:none}}.con[data-v-430dd661]{--read-max: 760px;display:flex;flex-direction:column;min-width:0;height:100%;position:relative;container-type:inline-size}.empty-drag[data-v-430dd661]{position:absolute;top:0;left:0;right:0;height:var(--panel-head-h, 48px)}.empty-drag.macos-desktop[data-v-430dd661]{-webkit-app-region:drag}.panes[data-v-430dd661]{flex:1;min-height:0;overflow-y:auto;overflow-anchor:auto;scrollbar-gutter:stable}.panes[data-v-430dd661]::-webkit-scrollbar{width:4px}.panes[data-v-430dd661]::-webkit-scrollbar-thumb{background:transparent;transition:background var(--duration-base) var(--ease-out)}.panes.scrolling[data-v-430dd661]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.panes.scrolling[data-v-430dd661]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.panes.session-settling .chat[data-v-430dd661]>*:not(.chat-loading){visibility:hidden}.panes.is-following[data-v-430dd661],.panes.history-prepending[data-v-430dd661],.panes.is-pinned[data-v-430dd661]{overflow-anchor:none}.chat-layout[data-v-430dd661]{display:flex;flex-direction:column;height:100%;min-height:0;position:relative}.chat-scroll[data-v-430dd661]{flex:1;min-height:0;position:relative}.content-wrap[data-v-430dd661]{width:100%;max-width:var(--read-max);min-height:100%;box-sizing:border-box;padding-bottom:var(--chat-dock-height, 0px);display:flex;flex-direction:column;flex-shrink:0}.content-wrap.align-center[data-v-430dd661]{margin-left:auto;margin-right:auto}.content-wrap.align-left[data-v-430dd661]{margin-left:0;margin-right:auto}.content-wrap.align-mobile[data-v-430dd661]{max-width:none}@media(max-width:640px){.con.mobile[data-v-430dd661]{min-width:0;overflow:hidden}.con.mobile .panes[data-v-430dd661]{scrollbar-gutter:auto;-webkit-overflow-scrolling:touch}.content-wrap.align-mobile[data-v-430dd661]{width:100%;min-width:0}}.empty-spacer[data-v-430dd661]{flex:1}.empty-hint[data-v-430dd661]{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:0 16px 16px;color:var(--color-text);font-family:var(--font-ui);user-select:none}.empty-hint-title[data-v-430dd661]{font-size:calc(var(--ui-font-size) + 16px);font-optical-sizing:auto;font-weight:600}.empty-hint-title.is-starting[data-v-430dd661]{display:inline-flex;align-items:center;gap:9px;color:var(--dim);font-weight:400}.empty-doodle[data-v-430dd661]{width:min(340px,62vw)}.empty-hint-text[data-v-430dd661]{display:inline-block;font-size:var(--text-base);color:var(--dim);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upgrade-banner[data-v-430dd661]{flex:none;display:flex;align-items:center;gap:var(--space-3);margin:0 var(--dock-inline-right, 16px) var(--space-2) var(--dock-inline-left, 16px);padding:var(--space-2) var(--space-3);border:.5px solid var(--color-accent-bd);border-radius:var(--radius-xl);background:var(--color-accent-soft)}.upgrade-banner-icon[data-v-430dd661]{flex:none;color:var(--color-accent)}.upgrade-banner-text[data-v-430dd661]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text)}.upgrade-banner-cta[data-v-430dd661]{flex:none;display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-accent);cursor:pointer}.upgrade-banner-cta[data-v-430dd661]:hover{color:var(--color-accent-hover)}.empty-composer[data-v-430dd661] .composer-card{position:relative;z-index:var(--z-sticky)}.empty-composer[data-v-430dd661]:not(.expanded) .ph{min-height:3lh}.ws-bar[data-v-430dd661]{margin-top:calc(-1 * var(--space-4));padding:calc(var(--space-4) + var(--space-2)) var(--space-2) var(--space-2);background:color-mix(in srgb,var(--color-hover) 60%,transparent);border-radius:0 0 var(--radius-2xl) var(--radius-2xl);font-family:var(--font-ui)}.ws-anchor[data-v-430dd661]{position:relative}.ws-chip[data-v-430dd661]{display:inline-flex;align-items:center;gap:var(--space-2);max-width:100%;padding:var(--space-2) var(--space-3);background:none;border:none;border-radius:var(--radius-full);color:var(--color-text-muted);font-family:inherit;font-size:var(--ui-font-size-sm);cursor:pointer;transition:background var(--duration-base) var(--ease-out)}.ws-chip[data-v-430dd661]:hover,.ws-chip.open[data-v-430dd661]{background:var(--color-selected);color:var(--color-text)}.ws-chip[data-v-430dd661]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ws-chip>.kw-icon[data-v-430dd661]{flex:none}.ws-chip-name[data-v-430dd661]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--weight-option-label)}.ws-chip-chev[data-v-430dd661]{flex:none;transition:transform var(--duration-base) var(--ease-out)}.ws-chip.open .ws-chip-chev[data-v-430dd661]{transform:rotate(180deg)}.ws-chip.ws-ghost[data-v-430dd661]{color:var(--color-text-muted)}.ws-chip.ws-ghost[data-v-430dd661]:hover{color:var(--color-text)}.ws-backdrop[data-v-430dd661]{position:fixed;inset:0;z-index:var(--z-sticky)}.ws-panel[data-v-430dd661]{position:absolute;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);left:0;top:calc(100% + var(--space-1));z-index:var(--z-dropdown);width:max-content;min-width:min(calc(var(--space-8) * 8),100%);max-width:100%;max-height:calc(var(--space-8) * 10);overflow:hidden auto;background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);border:.5px solid var(--color-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);padding:var(--space-1);animation:ws-pop-430dd661 var(--duration-base) var(--ease-out)}.ws-panel.up[data-v-430dd661]{top:auto;bottom:calc(100% + var(--space-1));animation-name:ws-pop-up-430dd661}@keyframes ws-pop-430dd661{0%{opacity:0;transform:translateY(calc(-1 * var(--space-1))) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes ws-pop-up-430dd661{0%{opacity:0;transform:translateY(var(--space-1)) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.ws-caption[data-v-430dd661]{padding:var(--space-1) var(--space-2);font-size:var(--text-xs);font-weight:var(--weight-medium);color:var(--color-text-faint);user-select:none}.ws-row[data-v-430dd661]{display:flex;align-items:center;gap:var(--space-2);width:100%;text-align:left;background:none;border:none;border-radius:var(--radius-sm);padding:var(--space-1) var(--space-2);cursor:pointer;font-family:var(--font-ui)}.ws-row>.kw-icon[data-v-430dd661]{flex:none;color:var(--muted)}.ws-row[data-v-430dd661]:hover{background:var(--color-hover)}.ws-row.on[data-v-430dd661]{background:var(--color-selected)}.ws-row[data-v-430dd661]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.ws-info[data-v-430dd661]{flex:1;min-width:0;display:flex;flex-direction:column}.ws-name[data-v-430dd661]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-option-label);color:var(--color-text);line-height:var(--leading-normal)}.ws-path[data-v-430dd661]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs);font-weight:var(--weight-option-label);color:var(--muted);line-height:var(--leading-normal)}.ws-check[data-v-430dd661]{flex:none;margin-left:var(--space-3);color:var(--color-text)}.ws-divider[data-v-430dd661]{height:1px;margin:var(--space-1) var(--space-2);background:var(--line)}.ws-action[data-v-430dd661]{display:flex;align-items:center;gap:var(--space-2);width:100%;text-align:left;background:none;border:none;border-radius:var(--radius-sm);padding:var(--space-2);cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--dim)}.ws-action>.kw-icon[data-v-430dd661]{flex:none;color:var(--muted)}.ws-action span[data-v-430dd661]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ws-action[data-v-430dd661]:hover{background:var(--color-hover);color:var(--color-text)}.ws-action:hover>.kw-icon[data-v-430dd661]{color:var(--dim)}.ws-action[data-v-430dd661]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.chat-scroll[data-v-430dd661]{display:flex;flex-direction:column}.mobile .panes[data-v-430dd661]:has(>.chat-layout){overflow:hidden;scrollbar-gutter:auto}.newmsg-pill[data-v-430dd661]{position:absolute;left:50%;bottom:12px;transform:translate(-50%);display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;border:.5px solid var(--line);background:var(--panel);color:var(--color-text);font-size:var(--text-xs);font-weight:var(--weight-ui-strong);cursor:pointer;box-shadow:var(--shadow-sm);z-index:var(--z-sticky)}.pill-chevron[data-v-430dd661]{width:12px;height:12px}.pill-enter-active[data-v-430dd661],.pill-leave-active[data-v-430dd661]{transition:opacity .2s ease,transform .2s ease}.pill-enter-from[data-v-430dd661],.pill-leave-to[data-v-430dd661]{opacity:0;transform:translate(-50%) translateY(8px)}.undo-toast[data-v-430dd661]{position:absolute;left:50%;top:60px;transform:translate(-50%);padding:8px 14px;border-radius:var(--radius-sm);background:var(--color-text);color:var(--bg);font-size:var(--ui-font-size-sm);z-index:var(--z-sticky);box-shadow:var(--shadow-sm)}.undo-toast-text[data-v-430dd661]{display:flex;align-items:center;gap:8px}.undo-toast-enter-active[data-v-430dd661],.undo-toast-leave-active[data-v-430dd661]{transition:opacity .15s ease,transform .15s ease}.undo-toast-enter-from[data-v-430dd661],.undo-toast-leave-to[data-v-430dd661]{opacity:0;transform:translate(-50%) translateY(-6px)}.con[data-v-430dd661]{background:var(--bg)}.newmsg-pill[data-v-430dd661]{font-family:var(--sans)}.sa-select[data-v-559b928b]{display:inline-flex;align-items:center;gap:var(--space-1-5);height:30px;padding:0 var(--space-3);border:.5px solid var(--color-line);border-radius:var(--radius-md);background:transparent;color:var(--color-text);font-size:var(--text-sm);font-weight:var(--weight-option-label);line-height:1;white-space:nowrap;transition:background var(--duration-fast) var(--ease-out)}.sa-select[data-v-559b928b]:hover,.sa-select.is-open[data-v-559b928b]{background:var(--color-hover)}.sa-select-chev[data-v-559b928b]{color:var(--color-text-faint)}.sa-menu[data-v-559b928b]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.sa-check[data-v-559b928b]{display:inline-flex;flex:none;width:14px}.sa-dot[data-v-559b928b]{flex:none;width:8px;height:8px;border-radius:var(--radius-full)}.sa-dot--open[data-v-559b928b]{background:var(--color-success)}.sa-dot--done[data-v-559b928b]{background:var(--color-done)}.menu-pop-enter-active[data-v-559b928b]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-559b928b]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-559b928b],.menu-pop-leave-to[data-v-559b928b]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}.sa-select[data-v-08fc2991]{display:inline-flex;align-items:center;gap:var(--space-1-5);min-height:30px;padding:0 var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-md);background:transparent;color:var(--color-text);font-size:var(--text-sm);font-weight:var(--weight-option-label);line-height:1;white-space:nowrap;cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.sa-select[data-v-08fc2991]:hover,.sa-select.is-open[data-v-08fc2991]{background:var(--color-hover)}.sa-select[data-v-08fc2991]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.sa-select-chev[data-v-08fc2991]{color:var(--color-text-faint)}.sa-tag[data-v-08fc2991]{display:inline-flex;align-items:center;gap:1px;height:20px;padding:0 2px 0 var(--space-1-5);border-radius:var(--radius-xs);background:var(--color-selected);font-size:var(--text-xs)}.sa-tag-name[data-v-08fc2991]{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sa-tag-x[data-v-08fc2991]{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:16px;padding:0;border:none;border-radius:var(--radius-xs);background:transparent;color:var(--color-text-faint);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.sa-tag-x[data-v-08fc2991]:hover{background:var(--color-hover);color:var(--color-text)}.sa-tag-more[data-v-08fc2991]{color:var(--color-text-muted);font-size:var(--text-xs)}.sa-menu[data-v-08fc2991]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.sa-search[data-v-08fc2991]{display:flex;align-items:center;gap:7px;padding:5px 9px;color:var(--color-text-faint)}.sa-search-input[data-v-08fc2991]{flex:1;min-width:0;border:none;outline:none;background:transparent;color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);line-height:var(--leading-tight)}.sa-search-input[data-v-08fc2991]::placeholder{color:var(--color-text-faint)}.sa-ws-name[data-v-08fc2991]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sa-opts[data-v-08fc2991]{max-height:320px;overflow-y:auto;overscroll-behavior:contain}.sa-menu-empty[data-v-08fc2991]{padding:5px 9px;color:var(--color-text-faint);font-size:var(--text-sm)}.menu-pop-enter-active[data-v-08fc2991]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-08fc2991]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-08fc2991],.menu-pop-leave-to[data-v-08fc2991]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}.sa-menu[data-v-770e2854]{position:fixed;top:0;left:0;z-index:var(--z-dropdown)}.sa-menu-head[data-v-770e2854]{padding:var(--space-1) var(--space-2) var(--space-05);color:var(--color-text-faint);font-size:var(--text-xs);user-select:none}.menu-pop-enter-active[data-v-770e2854]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.menu-pop-leave-active[data-v-770e2854]{transition:opacity var(--duration-fast) var(--ease-out),transform var(--duration-fast) var(--ease-out);pointer-events:none}.menu-pop-enter-from[data-v-770e2854],.menu-pop-leave-to[data-v-770e2854]{opacity:0;transform:scale(.97) translateY(var(--menu-pop-shift, -2px))}.sa-table-card[data-v-9b9dc9c2]{border:.5px solid var(--color-line);border-radius:var(--radius-lg);background:var(--color-bg);overflow-x:auto;container-type:inline-size;transition:opacity var(--duration-fast) var(--ease-out)}.sa-table-card.is-loading[data-v-9b9dc9c2]{opacity:.45;pointer-events:none}table[data-v-9b9dc9c2]{width:100%;min-width:640px;border-collapse:collapse;table-layout:fixed}.sa-col-cb[data-v-9b9dc9c2]{width:36px}.sa-col-title[data-v-9b9dc9c2]{width:max(200px,20%)}.sa-col-ws[data-v-9b9dc9c2]{width:116px}.sa-col-status[data-v-9b9dc9c2]{width:88px}.sa-col-time[data-v-9b9dc9c2]{width:140px}.sa-col-act[data-v-9b9dc9c2]{width:84px}.sa-time--compact[data-v-9b9dc9c2]{display:none}@container (max-width: 1020px){.sa-col-time[data-v-9b9dc9c2]{width:108px}.sa-time--full[data-v-9b9dc9c2]{display:none}.sa-time--compact[data-v-9b9dc9c2]{display:inline}}@container (max-width: 760px){col.sa-col-time[data-v-9b9dc9c2],.sa-c-time[data-v-9b9dc9c2]{display:none}.sa-col-ws[data-v-9b9dc9c2]{width:96px}}thead th[data-v-9b9dc9c2]{height:32px;padding:0 var(--space-3);border-bottom:.5px solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium);text-align:left;white-space:nowrap;user-select:none}th.sa-col-cb[data-v-9b9dc9c2],td.sa-col-cb[data-v-9b9dc9c2]{padding-right:0}tbody td[data-v-9b9dc9c2]{height:40px;padding:0 var(--space-3);border-bottom:.5px solid var(--color-subtle);font-size:var(--text-sm);line-height:var(--leading-tight);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}tbody tr:last-child td[data-v-9b9dc9c2]{border-bottom:none}tbody tr[data-v-9b9dc9c2]{transition:background var(--duration-fast) var(--ease-out)}tbody tr[data-v-9b9dc9c2]:hover{background:var(--color-hover)}.sa-cb[data-v-9b9dc9c2]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border:.5px solid var(--color-line-strong);border-radius:var(--radius-xs);color:var(--color-text-on-accent);vertical-align:middle;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.sa-cb[data-v-9b9dc9c2]:hover{border-color:var(--color-text-faint)}.sa-cb.on[data-v-9b9dc9c2],.sa-cb.ind[data-v-9b9dc9c2]{background:var(--color-accent);border-color:var(--color-accent)}.sa-batch-inner[data-v-9b9dc9c2]{display:flex;align-items:center;gap:var(--space-2)}.sa-batch-count[data-v-9b9dc9c2]{margin-right:var(--space-1);color:var(--color-text-muted);font-size:var(--text-sm);white-space:nowrap;user-select:none}.sa-batch-link[data-v-9b9dc9c2]{display:inline-flex;align-items:center;height:24px;padding:0 var(--space-1);border:none;background:transparent;color:var(--color-accent);font-size:var(--text-sm);font-weight:var(--weight-medium);white-space:nowrap}.sa-batch-link[data-v-9b9dc9c2]:hover{text-decoration:underline}.sa-batch-link[data-v-9b9dc9c2]:disabled{color:var(--color-text-faint);cursor:default;text-decoration:none}.sa-btn-q[data-v-9b9dc9c2]{display:inline-flex;align-items:center;gap:var(--space-1-5);height:24px;padding:0 var(--space-2);border:.5px solid var(--color-line);border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font-size:var(--text-xs);font-weight:var(--weight-medium);line-height:1;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.sa-btn-q[data-v-9b9dc9c2]:hover{background:var(--color-hover)}.sa-btn-q[data-v-9b9dc9c2]:disabled{opacity:.42;cursor:default}.sa-btn-q[data-v-9b9dc9c2]:disabled:hover{background:transparent}.sa-btn-q[data-v-9b9dc9c2] :first-child{color:var(--color-text-muted)}.sa-btn-q[data-v-9b9dc9c2]:hover :first-child{color:var(--color-text)}.sa-btn-q--primary[data-v-9b9dc9c2],.sa-btn-q--primary[data-v-9b9dc9c2] :first-child{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-text-on-accent)}.sa-btn-q--primary[data-v-9b9dc9c2]:hover,.sa-btn-q--primary[data-v-9b9dc9c2]:hover :first-child{border-color:var(--color-accent-hover);background:var(--color-accent-hover);color:var(--color-text-on-accent)}.sa-btn-q--primary[data-v-9b9dc9c2]:disabled,.sa-btn-q--primary[data-v-9b9dc9c2]:disabled:hover,.sa-btn-q--primary[data-v-9b9dc9c2]:disabled :first-child,.sa-btn-q--primary[data-v-9b9dc9c2]:disabled:hover :first-child{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-text-on-accent)}.sa-st[data-v-9b9dc9c2]{display:inline-flex;align-items:center;gap:var(--space-1-5)}.sa-st--open[data-v-9b9dc9c2]{color:var(--color-success)}.sa-st--done[data-v-9b9dc9c2]{color:var(--color-done)}.sa-title[data-v-9b9dc9c2]{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text);font-weight:var(--weight-option-label)}.sa-rename[data-v-9b9dc9c2]{width:100%;height:26px;padding:0 var(--space-1-5);border:1px solid var(--color-accent);border-radius:var(--radius-sm);outline:none;box-shadow:0 0 0 2px var(--color-accent-bd);background:var(--color-bg);color:var(--color-text);font-family:inherit;font-size:var(--text-sm)}.sa-ws[data-v-9b9dc9c2]{display:inline-flex;align-items:center;max-width:100%;color:var(--color-text-muted)}.sa-ws span[data-v-9b9dc9c2]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sa-prompt[data-v-9b9dc9c2]{color:var(--color-text-muted)}.sa-time[data-v-9b9dc9c2]{color:var(--color-text-muted);font-family:var(--font-mono);font-size:var(--text-xs);font-variant-numeric:tabular-nums;white-space:nowrap}.sa-none[data-v-9b9dc9c2]{color:var(--color-text-faint)}.sa-act[data-v-9b9dc9c2]{display:flex;align-items:center;gap:var(--space-05)}.sa-state[data-v-9b9dc9c2]{display:flex;align-items:center;justify-content:center;padding:calc(var(--space-8) + var(--space-6)) var(--space-4)}.sa-empty[data-v-9b9dc9c2]{color:var(--color-text-faint);font-size:var(--text-sm)}.sa-pager[data-v-a27fa76f]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);flex-wrap:wrap;margin-top:var(--space-3)}.sa-total[data-v-a27fa76f]{color:var(--color-text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums;user-select:none}.sa-pager-right[data-v-a27fa76f]{display:flex;align-items:center;gap:var(--space-3)}.sa-pages[data-v-a27fa76f]{display:flex;align-items:center;gap:var(--space-05)}.sa-pg[data-v-a27fa76f]{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:26px;padding:0 var(--space-1-5);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text-muted);font-size:var(--text-sm);font-variant-numeric:tabular-nums;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.sa-pg[data-v-a27fa76f]:hover{background:var(--color-hover);color:var(--color-text)}.sa-pg.cur[data-v-a27fa76f]{background:var(--color-selected);color:var(--color-text);font-weight:var(--weight-medium)}.sa-pg.cur[data-v-a27fa76f]:hover{background:var(--color-selected)}.sa-pg[data-v-a27fa76f]:disabled{opacity:.38;cursor:default}.sa-pg[data-v-a27fa76f]:disabled:hover{background:transparent;color:var(--color-text-muted)}.sa-ellipsis[data-v-a27fa76f]{padding:0 var(--space-1);color:var(--color-text-faint);font-size:var(--text-sm);user-select:none}.session-admin[data-v-01565f3a]{display:flex;flex-direction:column;min-width:0;height:100%;background:var(--color-bg);font-family:var(--font-ui)}.sa-scroll[data-v-01565f3a]{flex:1;min-height:0;overflow-y:auto}.sa-page[data-v-01565f3a]{padding:var(--space-8) var(--space-6);display:flex;flex-direction:column;box-sizing:border-box}.sa-head[data-v-01565f3a]{flex:none;display:flex;align-items:center;gap:var(--space-2);height:48px;padding:0 var(--space-6);border-bottom:.5px solid var(--color-line);box-sizing:border-box}.sa-title[data-v-01565f3a]{margin:0;font-size:var(--text-base);font-weight:var(--weight-semibold);line-height:var(--leading-tight);color:var(--color-text);user-select:none}.sa-subtitle[data-v-01565f3a]{margin:0 0 var(--space-3);font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.session-admin.macos-desktop .sa-head[data-v-01565f3a]{-webkit-app-region:drag}.session-admin.macos-desktop .sa-head button[data-v-01565f3a],.session-admin.macos-desktop .sa-head input[data-v-01565f3a]{-webkit-app-region:no-drag}.sa-filters[data-v-01565f3a]{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap;margin-bottom:var(--space-3)}.sa-f-label[data-v-01565f3a]{margin-left:var(--space-2);color:var(--color-text-muted);font-size:var(--text-sm);user-select:none}.sa-f-label[data-v-01565f3a]:first-child{margin-left:0}.sa-f-actions[data-v-01565f3a]{display:inline-flex;align-items:center;gap:var(--space-2);margin-left:var(--space-2)}.file-preview[data-v-9a4f39c9]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono);min-width:0;container-type:inline-size}.fp-empty[data-v-9a4f39c9],.fp-loading[data-v-9a4f39c9]{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted);font-size:var(--ui-font-size)}.fp-path[data-v-9a4f39c9]{flex:1 1 60px;min-width:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left;font-size:var(--ui-font-size-xs);color:var(--muted);font-weight:400}.fp-meta[data-v-9a4f39c9]{display:flex;align-items:center;gap:8px;flex:none}@container (max-width: 539px){.fp-meta[data-v-9a4f39c9]{display:none}}.fp-lines[data-v-9a4f39c9],.fp-size[data-v-9a4f39c9]{font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--muted);white-space:nowrap}.fp-search[data-v-9a4f39c9]{display:flex;align-items:center;gap:4px;flex:1 1 110px;min-width:70px;max-width:200px}.fp-search-input[data-v-9a4f39c9]{flex:1;min-width:0;height:26px;border:.5px solid var(--color-line);border-radius:var(--radius-sm);padding:2px 7px;background:var(--color-surface-raised);color:var(--color-text);font:var(--text-xs) var(--font-mono)}.fp-search-count[data-v-9a4f39c9]{color:var(--muted);font-size:max(9px,calc(var(--ui-font-size) - 3.5px));min-width:18px;text-align:right}.fp-download[data-v-9a4f39c9]{display:inline-grid;place-items:center;width:26px;height:26px;flex:none;border-radius:var(--radius-sm);color:var(--color-text-muted)}.fp-download[data-v-9a4f39c9]:hover{background:var(--color-hover);color:var(--color-text)}.fp-download[data-v-9a4f39c9]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.fp-download svg[data-v-9a4f39c9]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.fp-check[data-v-9a4f39c9]{color:var(--color-success)}.fp-body[data-v-9a4f39c9]{--fp-search-hit-bg: color-mix(in srgb, var(--star) 22%, var(--bg));--fp-search-active-bg: color-mix(in srgb, var(--star) 36%, var(--bg));flex:1;min-height:0;overflow:auto}.fp-markdown[data-v-9a4f39c9]{padding:16px 20px}.fp-code[data-v-9a4f39c9]{background:var(--bg)}.fp-code[data-v-9a4f39c9] .hl-row.hit,.fp-table tr.hit td[data-v-9a4f39c9]{background:var(--fp-search-hit-bg)}.fp-code[data-v-9a4f39c9] .hl-row.active,.fp-table tr.active td[data-v-9a4f39c9]{background:var(--fp-search-active-bg)}.fp-code[data-v-9a4f39c9] .hl-row.target,.fp-table tr.target th[data-v-9a4f39c9],.fp-table tr.target td[data-v-9a4f39c9]{background:var(--color-accent-soft)}.fp-html-frame[data-v-9a4f39c9],.fp-pdf-frame[data-v-9a4f39c9]{width:100%;height:100%;border:0;background:var(--color-surface-raised)}.fp-pdf-wrap[data-v-9a4f39c9]{background:var(--panel2)}.fp-table-wrap[data-v-9a4f39c9]{background:var(--bg)}.fp-table[data-v-9a4f39c9]{border-collapse:collapse;min-width:100%;font:var(--code-font-size)/var(--leading-normal) var(--mono)}.fp-table th[data-v-9a4f39c9]{position:sticky;left:0;z-index:1;width:44px;min-width:44px;padding:2px 8px;text-align:right;color:var(--faint);background:var(--panel);border-right:.5px solid var(--line2);user-select:none}.fp-table td[data-v-9a4f39c9]{padding:2px 10px;border-right:.5px solid var(--line2);border-bottom:.5px solid var(--line2);white-space:pre}.fp-image-wrap[data-v-9a4f39c9]{display:flex;align-items:center;justify-content:center;padding:24px;background:var(--panel2)}.fp-image[data-v-9a4f39c9]{max-width:100%;max-height:100%;object-fit:contain;border:.5px solid var(--line);border-radius:4px;background:var(--media-alpha-canvas)}.fp-image.actual[data-v-9a4f39c9]{max-width:none;max-height:none}.fp-binary-wrap[data-v-9a4f39c9]{display:flex;align-items:center;justify-content:center}.fp-binary-card[data-v-9a4f39c9]{display:flex;align-items:center;gap:12px;padding:20px 24px;border:.5px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font-size:var(--ui-font-size);margin:32px auto;max-width:480px}.fp-binary-icon[data-v-9a4f39c9]{color:var(--faint);flex:none}.fp-error[data-v-9a4f39c9]{flex-direction:column;padding:24px;text-align:center}@keyframes spin-9a4f39c9{to{transform:rotate(360deg)}}.spinner[data-v-9a4f39c9]{display:inline-block;width:14px;height:14px;border:.5px solid var(--line);border-top-color:var(--color-accent);border-radius:50%;animation:spin-9a4f39c9 .7s linear infinite}@media(max-width:640px){.fp-lines[data-v-9a4f39c9]{display:none}.fp-markdown[data-v-9a4f39c9]{padding:14px 16px}.fp-body.fp-code[data-v-9a4f39c9]{-webkit-overflow-scrolling:touch}}.fp-empty[data-v-9a4f39c9],.fp-loading[data-v-9a4f39c9]{font-family:var(--sans)}.fp-binary-card[data-v-9a4f39c9]{border:.5px solid var(--color-line);border-radius:var(--radius-md)}.fp-binary-label[data-v-9a4f39c9]{font-family:var(--sans)}.fp-image[data-v-9a4f39c9]{border-radius:var(--radius-md)}.seg-btn[data-v-9a4f39c9]{font-family:var(--sans)}.tp[data-v-afb1f46f]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--color-bg)}.tp-body[data-v-afb1f46f]{flex:1;min-height:0;overflow-y:auto;margin:0;padding:12px 14px;font:var(--text-base)/var(--leading-relaxed) var(--font-ui);font-weight:400;color:var(--color-text-muted);white-space:pre-wrap;word-break:break-word}.agent-panel[data-v-87af6ca2]{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--color-bg)}.agent-transcript[data-v-87af6ca2]{flex:1;min-height:0;overflow-y:auto}.agent-transcript[data-v-87af6ca2] .think-body,.agent-transcript[data-v-87af6ca2] .ar-body,.agent-transcript[data-v-87af6ca2] .tf-body,.agent-transcript[data-v-87af6ca2] .bb,.agent-transcript[data-v-87af6ca2] .tl-body{transition:none}.agent-error[data-v-87af6ca2]{color:var(--color-danger);font:var(--text-sm)/var(--leading-normal) var(--font-ui)}.copy-menu[data-v-87af6ca2]{position:fixed;z-index:var(--z-dropdown)}.agent-fallback[data-v-87af6ca2]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4)}.sc[data-v-bb28a4e0]{height:100%;display:flex;flex-direction:column;min-height:0;background:var(--bg)}.sc-body[data-v-bb28a4e0]{flex:1;min-height:0;overflow-y:auto}.sc-empty[data-v-bb28a4e0]{padding:24px 16px;text-align:center;color:var(--muted);font-size:var(--ui-font-size)}.sc-composer[data-v-bb28a4e0]{flex:none;display:flex;align-items:flex-end;gap:6px;padding:8px 10px;border-top:.5px solid var(--color-line);background:var(--color-surface-raised)}.sc-input[data-v-bb28a4e0]{flex:1;min-width:0;resize:none;border:.5px solid var(--color-line);border-radius:var(--r-sm);padding:7px 9px;background:var(--bg);color:var(--color-text);font:var(--ui-font-size)/1.5 var(--sans);outline:none;max-height:160px}.sc-input[data-v-bb28a4e0]:focus{border-color:var(--color-accent-bd)}.sc-send[data-v-bb28a4e0]{flex:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:var(--r-sm);background:var(--color-accent);color:var(--color-text-on-accent);cursor:pointer}.sc-send[data-v-bb28a4e0]:disabled{opacity:.4;cursor:default}.sc-send[data-v-bb28a4e0]:not(:disabled):hover{background:var(--color-accent-hover)}.sc-loading[data-v-bb28a4e0]{flex:none;padding:8px 12px 12px}.sc-body[data-v-bb28a4e0] .sending-placeholder,.sc-body[data-v-bb28a4e0] .sending-line{display:none}.changes-pane[data-v-7d5ab9c7]{display:flex;flex-direction:column;height:100%;background:var(--bg);font-family:var(--mono)}.dv-path[data-v-7d5ab9c7],.dv-change-count[data-v-7d5ab9c7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:var(--ui-font-size-xs);color:var(--muted)}.dv-change-count[data-v-7d5ab9c7]{flex:1;align-self:stretch;display:inline-flex;align-items:center;font-family:var(--font-ui)}.dv-path[data-v-7d5ab9c7]{font-family:var(--font-ui)}.ch-head[data-v-7d5ab9c7]{display:flex;align-items:center;gap:8px;padding:8px var(--space-3);border-bottom:.5px solid var(--line);background:var(--panel);font-size:var(--text-base);color:var(--dim);flex:none;white-space:nowrap;overflow:hidden;font-family:var(--font-ui);user-select:none}.br-heading[data-v-7d5ab9c7]{display:inline-flex;align-items:center;gap:var(--space-1);flex:none}.br-icon[data-v-7d5ab9c7]{flex:none;color:var(--muted)}.br-label[data-v-7d5ab9c7]{color:var(--muted);font-size:var(--text-xs);font-weight:500}.br-name[data-v-7d5ab9c7]{color:var(--color-text);font-weight:500;font-size:var(--text-xs)}.sync-info[data-v-7d5ab9c7]{display:flex;align-items:center;gap:4px}.ahead[data-v-7d5ab9c7]{color:var(--color-accent);font-size:var(--text-xs)}.behind[data-v-7d5ab9c7]{color:var(--color-warning);font-size:var(--text-xs)}.empty-head[data-v-7d5ab9c7]{color:var(--muted);font-size:var(--text-base)}.ch-list[data-v-7d5ab9c7]{flex:1;min-height:0}.ch-list-content[data-v-7d5ab9c7]{min-height:100%;padding:4px 0}.ch-row[data-v-7d5ab9c7]{display:flex;align-items:center;gap:6px;padding:3px 8px;cursor:pointer;font-size:var(--text-xs);line-height:1.6;width:100%;background:none;border:none;text-align:left;font-family:var(--font-ui);color:inherit}.ch-row[data-v-7d5ab9c7]:hover{background:var(--panel2)}.ch-row[data-v-7d5ab9c7]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.ch-tree[data-v-7d5ab9c7]{--tree-base-indent: 14px;--tree-indent-step: 12px;font-family:var(--font-ui)}.tree-list[data-v-7d5ab9c7]{list-style:none;margin:0}.tree-node[data-v-7d5ab9c7]{overflow:hidden;interpolate-size:allow-keywords}.tree-collapse-enter-active[data-v-7d5ab9c7],.tree-collapse-leave-active[data-v-7d5ab9c7]{transition:block-size var(--duration-base) var(--ease-out),opacity var(--duration-fast) var(--ease-out),transform var(--duration-base) var(--ease-out)}.tree-collapse-enter-from[data-v-7d5ab9c7],.tree-collapse-leave-to[data-v-7d5ab9c7]{block-size:0;opacity:0;transform:translateY(-3px)}.tree-collapse-enter-to[data-v-7d5ab9c7],.tree-collapse-leave-from[data-v-7d5ab9c7]{block-size:auto;opacity:1;transform:translateY(0)}.tree-row[data-v-7d5ab9c7]{position:relative;display:flex;align-items:center;gap:6px;width:100%;margin-top:1px;padding:3px 8px;background:none;border:none;text-align:left;font-family:inherit;font-size:var(--text-xs);color:inherit;cursor:pointer}.tree-row[data-v-7d5ab9c7]:before{content:"";position:absolute;top:0;bottom:0;left:calc(var(--tree-base-indent) + 6px);width:calc(var(--tree-depth, 0) * var(--tree-indent-step));background:repeating-linear-gradient(to right,var(--color-line) 0 1px,transparent 1px var(--tree-indent-step));pointer-events:none}.tree-row[data-v-7d5ab9c7]:hover{background:var(--panel2)}.tree-row[data-v-7d5ab9c7]:focus-visible{outline:2px solid var(--color-accent);outline-offset:-2px}.tree-folder[data-v-7d5ab9c7]{color:var(--color-text);font-weight:500}.tree-file[data-v-7d5ab9c7]{color:var(--color-text);font-weight:450}.tree-icon[data-v-7d5ab9c7]{flex:none;color:var(--muted)}.tree-name[data-v-7d5ab9c7]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.badge[data-v-7d5ab9c7]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:var(--radius-xs);font-size:max(9px,calc(var(--ui-font-size) - 4px));font-weight:500;flex:none;user-select:none}.badge.modified[data-v-7d5ab9c7]{background:var(--color-warning-soft);color:var(--color-warning)}.badge.added[data-v-7d5ab9c7]{background:var(--color-success-soft);color:var(--color-success)}.badge.deleted[data-v-7d5ab9c7]{background:var(--color-danger-soft);color:var(--color-danger)}.badge.renamed[data-v-7d5ab9c7]{background:var(--color-done-soft);color:var(--color-done)}.badge.untracked[data-v-7d5ab9c7]{background:var(--color-success-soft);color:var(--color-success)}.badge.conflicted[data-v-7d5ab9c7]{background:color-mix(in srgb,var(--color-danger) 10%,var(--bg));color:var(--color-danger);font-size:max(9px,calc(var(--ui-font-size) - 5px))}.badge.ignored[data-v-7d5ab9c7]{background:var(--color-well);color:var(--faint)}.badge.clean[data-v-7d5ab9c7]{background:transparent;color:var(--faint)}.badge.unknown[data-v-7d5ab9c7]{background:var(--color-well);color:var(--muted)}.fpath[data-v-7d5ab9c7]{color:var(--color-text);font-size:var(--text-xs);font-weight:450;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left;min-width:0}.fpath[data-v-7d5ab9c7]:before,.fpath[data-v-7d5ab9c7]:after{content:"‎"}.empty-state[data-v-7d5ab9c7]{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-2);padding:32px 20px;color:var(--muted);font-size:var(--ui-font-size);text-align:center;user-select:none}.empty-state-icon[data-v-7d5ab9c7]{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--color-well);color:var(--color-text-muted)}.diff-head[data-v-7d5ab9c7]{display:flex;align-items:center;gap:10px;padding:6px 12px;border-bottom:.5px solid var(--line);background:var(--panel);flex:none;white-space:nowrap;overflow:hidden}.dv-lines-wrap[data-v-7d5ab9c7]{flex:1;min-height:0;overflow:auto}.diff-content-enter-active[data-v-7d5ab9c7],.diff-content-leave-active[data-v-7d5ab9c7]{transition:opacity var(--duration-base) var(--ease-out)}.diff-content-enter-from[data-v-7d5ab9c7],.diff-content-leave-to[data-v-7d5ab9c7]{opacity:0}@media(max-width:640px){.ch-head[data-v-7d5ab9c7]{padding:10px 14px}.ch-list[data-v-7d5ab9c7]{padding:2px 0 12px}.ch-row[data-v-7d5ab9c7]{min-height:44px;padding:8px 14px;gap:12px;font-size:var(--text-xs)}.ch-row[data-v-7d5ab9c7]:active{background:var(--panel2)}.badge[data-v-7d5ab9c7]{width:18px;height:18px}.fpath[data-v-7d5ab9c7]{font-size:var(--text-xs)}.tree-row[data-v-7d5ab9c7]{min-height:40px;padding:8px 14px}.diff-head[data-v-7d5ab9c7]{padding:8px 12px;gap:10px}.diff-path[data-v-7d5ab9c7]{font-size:var(--text-base)}}.changes-pane .empty-state[data-v-7d5ab9c7],.br-label[data-v-7d5ab9c7],.empty-head[data-v-7d5ab9c7]{font-family:var(--sans)}.ch-row[data-v-7d5ab9c7],.ct-row[data-v-7d5ab9c7]{margin:1px 6px;width:calc(100% - 12px);border-radius:var(--radius-md)}.changes-pane .badge[data-v-7d5ab9c7],.changed-tree .badge[data-v-7d5ab9c7]{border-radius:var(--radius-sm)}.change-count[data-v-7d5ab9c7]{font-family:var(--sans);border-radius:999px}.td[data-v-fdd0bc05]{display:flex;flex-direction:column;height:100%;min-height:0}.td-path[data-v-fdd0bc05]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:var(--ui-c1) var(--font-mono);color:var(--color-text-muted)}.td-body[data-v-fdd0bc05]{flex:1;min-height:0;overflow:auto}.td-empty[data-v-fdd0bc05]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-3);height:100%;padding:var(--space-6);color:var(--color-text-muted);font-size:var(--text-sm);text-align:center}.mp[data-v-3ba22330]{display:flex;flex-direction:column;gap:var(--space-2);height:100%;min-height:0;padding-top:4px}.search-wrap[data-v-3ba22330]{position:relative;margin:0 22px;padding-bottom:var(--space-1)}.search-wrap[data-v-3ba22330] .ui-input{padding-right:30px}.search-clear[data-v-3ba22330]{position:absolute;top:0;bottom:var(--space-1);right:var(--space-2);margin-block:auto;display:flex;align-items:center;justify-content:center;width:18px;height:18px;padding:0;border:none;border-radius:var(--radius-full);background:var(--color-hover);color:var(--color-text-faint);cursor:pointer;visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast),background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.search-clear.is-on[data-v-3ba22330]{visibility:visible;opacity:1}.search-clear[data-v-3ba22330]:hover{background:var(--color-selected);color:var(--color-text-muted)}.search-clear[data-v-3ba22330]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.chip-strip[data-v-3ba22330]{display:flex;gap:var(--space-1);margin:0 22px;overflow-x:auto;scrollbar-width:none}.chip-strip[data-v-3ba22330]::-webkit-scrollbar{display:none}.chip[data-v-3ba22330]{flex:none;height:28px;padding:0 var(--space-3);border:none;border-radius:var(--radius-full);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base);white-space:nowrap;cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.chip[data-v-3ba22330]:hover{background:var(--color-hover);color:var(--color-text)}.chip.is-active[data-v-3ba22330]{background:var(--color-selected);color:var(--color-text);font-weight:var(--weight-medium)}.chip[data-v-3ba22330]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.model-list[data-v-3ba22330]{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;padding:var(--space-1) var(--space-2)}.model-row[data-v-3ba22330]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);cursor:pointer;color:var(--color-text);min-width:0;transition:background var(--duration-fast) var(--ease-out)}.model-row[data-v-3ba22330]:hover,.model-row.is-selected[data-v-3ba22330]{background:var(--color-hover)}.model-row.is-current[data-v-3ba22330]{background:var(--color-selected)}.model-main[data-v-3ba22330]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.model-name[data-v-3ba22330]{font-family:var(--font-ui);font-size:var(--text-base);line-height:20px;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-row.is-current .model-name[data-v-3ba22330]{font-weight:var(--weight-medium)}.model-meta[data-v-3ba22330]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:18px;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.model-side[data-v-3ba22330]{display:flex;align-items:center;gap:var(--space-1);flex:none}.model-check[data-v-3ba22330]{color:var(--color-text)}.model-star[data-v-3ba22330]{color:var(--color-text-faint);visibility:hidden;opacity:0;transition:opacity var(--duration-fast) var(--ease-out),visibility var(--duration-fast)}.model-row:hover .model-star[data-v-3ba22330],.model-row.is-selected .model-star[data-v-3ba22330],.model-star.is-starred[data-v-3ba22330],.model-star[data-v-3ba22330]:focus-visible{visibility:visible;opacity:1}.model-star.is-starred[data-v-3ba22330]{color:var(--star)}@media(hover:none){.model-star[data-v-3ba22330]{visibility:visible;opacity:1}}.state-row[data-v-3ba22330]{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:var(--space-2);color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.state-row.unavail[data-v-3ba22330]{color:var(--color-warning)}.empty[data-v-3ba22330]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.footer-hint[data-v-3ba22330]{flex:none;display:flex;align-items:center;gap:var(--space-1);padding:var(--space-2) var(--space-4);border-top:.5px solid var(--color-line);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.hint-dot[data-v-3ba22330]{margin:0 var(--space-1)}@media(prefers-reduced-motion:reduce){.chip[data-v-3ba22330],.model-row[data-v-3ba22330],.model-star[data-v-3ba22330],.search-clear[data-v-3ba22330]{transition:none}}.center-body[data-v-0b06fca3]{display:flex;flex-direction:column;align-items:center;gap:var(--space-3);padding:var(--space-8) 0 var(--space-4);text-align:center}.center-text[data-v-0b06fca3]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.success-text[data-v-0b06fca3]{color:var(--color-success)}.err-text[data-v-0b06fca3]{color:var(--color-danger)}.warn-text[data-v-0b06fca3]{color:var(--color-warning);font-size:var(--text-base)}.center-hint[data-v-0b06fca3]{font-size:var(--text-sm);color:var(--color-text-muted)}.nb[data-v-0b06fca3]{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-2) 0 var(--space-4)}.nb-lead[data-v-0b06fca3]{font-size:var(--text-base);color:var(--color-text);line-height:var(--leading-normal)}.nb-primary[data-v-0b06fca3]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);width:100%;min-height:40px;padding:0 var(--space-4);background:var(--color-accent);color:var(--color-text-on-accent);border:.5px solid var(--color-accent);border-radius:var(--radius-md);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);cursor:pointer;text-decoration:none;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.nb-primary[data-v-0b06fca3]:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.nb-or[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-3);color:var(--color-text-muted);font-size:var(--text-xs);letter-spacing:.06em}.nb-or[data-v-0b06fca3]:before,.nb-or[data-v-0b06fca3]:after{content:"";flex:1;height:1px;background:var(--color-line)}.nb-fallback[data-v-0b06fca3]{display:flex;flex-direction:column;gap:var(--space-2)}.nb-fb-text[data-v-0b06fca3]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.nb-fb-link[data-v-0b06fca3]{color:var(--color-accent);text-decoration:none;border-bottom:.5px solid var(--color-accent-bd)}.nb-fb-link[data-v-0b06fca3]:hover{border-bottom-color:var(--color-accent)}.nb-code-row[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-3);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3)}.nb-code[data-v-0b06fca3]{flex:1;font-family:var(--font-mono);font-size:var(--text-xl);font-weight:var(--weight-medium);color:var(--color-text);letter-spacing:.14em}.nb-link[data-v-0b06fca3]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text}.nb-copy.is-copied[data-v-0b06fca3]{color:var(--color-success);border-color:var(--color-success-bd)}.nb-status[data-v-0b06fca3]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.nb-status-text[data-v-0b06fca3]{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--color-text-muted);flex:1}.nb-countdown[data-v-0b06fca3]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);font-variant-numeric:tabular-nums}.actions[data-v-0b06fca3]{display:flex;justify-content:flex-end;gap:var(--space-3);padding-top:var(--space-4)}@media(max-width:640px){.center-body[data-v-0b06fca3],.nb[data-v-0b06fca3]{overflow-y:auto;-webkit-overflow-scrolling:touch}.nb-code-row[data-v-0b06fca3],.nb-status[data-v-0b06fca3],.actions[data-v-0b06fca3]{flex-wrap:wrap}.nb-code[data-v-0b06fca3]{min-width:0;overflow-wrap:anywhere;letter-spacing:.08em}.nb-copy[data-v-0b06fca3]{min-height:34px}.nb-primary[data-v-0b06fca3]{min-height:44px}.nb-status-text[data-v-0b06fca3]{min-width:0}}.pf-form[data-v-3164ed08]{display:flex;flex-direction:column;gap:var(--space-4);padding:var(--space-4) var(--space-4) var(--space-5);border-top:.5px solid var(--color-line)}.pf-guard[data-v-3164ed08] .ui-banner__text{display:flex;align-items:center;gap:var(--space-2);width:100%}.pf-guard .msg[data-v-3164ed08]{flex:1}.pf-field[data-v-3164ed08]{display:flex;flex-direction:column;gap:6px}.pf-key-wrap[data-v-3164ed08]{position:relative}.pf-key-wrap[data-v-3164ed08] .ui-input{padding-right:calc(var(--icon-button-sm) + var(--space-2))}.pf-key-eye[data-v-3164ed08]{position:absolute;right:var(--space-1);top:50%;transform:translateY(-50%)}.pf-field-label[data-v-3164ed08]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.req[data-v-3164ed08]{color:var(--color-danger)}.pf-models[data-v-3164ed08]{display:flex;flex-direction:column;gap:var(--space-2)}.pf-model-grid[data-v-3164ed08]{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,2fr) auto;gap:var(--space-2);align-items:center}.pf-model-head span[data-v-3164ed08]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint)}.pf-models-empty[data-v-3164ed08]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.pf-foot[data-v-3164ed08]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-4);border-top:.5px solid var(--color-line)}.pf-foot .spacer[data-v-3164ed08]{flex:1}.pf-confirm-msg[data-v-3164ed08]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-danger)}.pf-managed-note[data-v-3164ed08]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}@media(max-width:640px){.pf-model-grid[data-v-3164ed08]{grid-template-columns:minmax(0,1fr) auto}}.af[data-v-9777a945]{display:flex;flex-direction:column;gap:var(--space-3);padding:var(--space-4) var(--space-4) var(--space-5);border-top:.5px solid var(--color-line)}.af-guard[data-v-9777a945] .ui-banner__text{display:flex;align-items:center;gap:var(--space-2);width:100%}.af-guard .msg[data-v-9777a945]{flex:1}.af-catalog[data-v-9777a945]{display:flex;flex-direction:column;gap:var(--space-3)}.af-center[data-v-9777a945]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-4) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.af-error[data-v-9777a945]{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-2)}.af-list[data-v-9777a945]{display:flex;flex-direction:column;max-height:320px;overflow-y:auto;border:.5px solid var(--color-line);border-radius:var(--radius-md)}.af-list[data-v-9777a945]>*+*{border-top:.5px solid var(--color-line)}.af-entry[data-v-9777a945]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:34px;padding:var(--space-1) var(--space-3);border:none;background:transparent;text-align:left;font-family:var(--font-ui);color:var(--color-text);cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.af-entry[data-v-9777a945]:hover:not(:disabled){background:var(--color-hover)}.af-entry[data-v-9777a945]:disabled{cursor:not-allowed;opacity:.55}.af-entry-name[data-v-9777a945]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-base);font-weight:var(--weight-medium)}.af-entry .grow[data-v-9777a945]{flex:1;min-width:0}.af-entry-count[data-v-9777a945],.af-entry-reason[data-v-9777a945]{flex:none;font-size:var(--text-xs);color:var(--color-text-faint);white-space:nowrap}.af-empty[data-v-9777a945]{padding:var(--space-4);text-align:center;color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm)}.af-import[data-v-9777a945],.af-registry[data-v-9777a945]{display:flex;flex-direction:column;gap:var(--space-4)}.af-hint[data-v-9777a945]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.af-back[data-v-9777a945]{display:inline-flex;align-items:center;gap:var(--space-1);align-self:flex-start;padding:0;border:none;background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer;transition:color var(--duration-fast) var(--ease-out)}.af-back[data-v-9777a945]:hover{color:var(--color-text)}.af-field[data-v-9777a945]{display:flex;flex-direction:column;gap:6px}.af-label[data-v-9777a945]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)}.req[data-v-9777a945]{color:var(--color-danger)}.af-key-wrap[data-v-9777a945]{position:relative}.af-key-wrap[data-v-9777a945] .ui-input{padding-right:calc(var(--icon-button-sm) + var(--space-2))}.af-key-eye[data-v-9777a945]{position:absolute;right:var(--space-1);top:50%;transform:translateY(-50%)}.af-note[data-v-9777a945]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.af-foot[data-v-9777a945]{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);padding-top:var(--space-4);border-top:.5px solid var(--color-line)}.af-manual[data-v-9777a945] .pf-form{padding:0;border-top:none}.pp[data-v-ee634b62]{display:flex;flex-direction:column}.pp-head[data-v-ee634b62]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.pp-title[data-v-ee634b62]{margin:0;font-family:var(--font-ui);font-size:var(--text-lg);font-weight:var(--weight-medium);color:var(--color-text)}.pp-loading[data-v-ee634b62]{display:flex;align-items:center;justify-content:center;gap:var(--space-2);padding:var(--space-4) 0;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-base)}.pp-group[data-v-ee634b62]{overflow:hidden;border:.5px solid var(--color-line);border-radius:var(--radius-xl);background:var(--color-surface-raised)}.pp-group[data-v-ee634b62]:has(.ui-select.is-open){position:relative;z-index:var(--z-dropdown);overflow:visible}.pp-group[data-v-ee634b62]>*+*{border-top:.5px solid var(--color-line)}.pp-row[data-v-ee634b62]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:40px;padding:var(--space-2) var(--space-4);border:none;background:transparent;text-align:left;font-family:var(--font-ui);color:var(--color-text);cursor:pointer;transition:background var(--duration-fast) var(--ease-out)}.pp-row[data-v-ee634b62]:hover{background:var(--color-hover)}.pp-item.open>.pp-row[data-v-ee634b62]{background:var(--color-surface-sunken)}.pp-row .grow[data-v-ee634b62]{flex:1;min-width:0;display:flex;align-items:center;gap:var(--space-2)}.pp-id[data-v-ee634b62]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pp-count[data-v-ee634b62]{flex:none;font-size:var(--text-xs);color:var(--color-text-faint);white-space:nowrap}.pp-chev[data-v-ee634b62]{display:inline-flex;flex:none;color:var(--color-text-faint);transition:transform var(--duration-base) var(--ease-out)}.pp-item.open .pp-chev[data-v-ee634b62]{transform:rotate(90deg)}.pp-add-row[data-v-ee634b62]{gap:var(--space-2);color:var(--color-text);font-size:var(--text-base);font-weight:var(--weight-medium)}.pp-acc[data-v-ee634b62]{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-slow) var(--ease-out)}.pp-item.open>.pp-acc[data-v-ee634b62]{grid-template-rows:1fr}.pp-acc-in[data-v-ee634b62]{overflow:hidden;min-height:0}.pp-item.open .pp-acc-in[data-v-ee634b62]{overflow:visible}.pp-item.flash>.pp-row[data-v-ee634b62]{animation:pp-flash-ee634b62 1.2s var(--ease-out)}@keyframes pp-flash-ee634b62{0%{background:var(--color-accent-soft)}to{background:transparent}}.pp-empty[data-v-ee634b62]{padding:var(--space-5) var(--space-4);color:var(--color-text-faint);font-family:var(--font-ui);font-size:var(--text-sm);text-align:center}.sec[data-v-5711dff8]{margin-bottom:var(--space-5)}.sec-title[data-v-5711dff8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);margin:0 0 var(--space-3)}.pu-group[data-v-5711dff8]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.pu-row[data-v-5711dff8]{display:flex;align-items:center;gap:var(--space-3);min-height:52px;padding:var(--space-3) var(--space-4)}.pu-main[data-v-5711dff8]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pu-label[data-v-5711dff8]{font-size:var(--text-sm);color:var(--color-text)}.pu-hint[data-v-5711dff8]{font-size:var(--text-xs);color:var(--color-text-faint)}.sec[data-v-f39cdded]{margin-bottom:var(--space-5)}.sec-title[data-v-f39cdded]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text);margin:0 0 var(--space-3)}.pu-group[data-v-f39cdded]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.pu-row[data-v-f39cdded]{display:flex;align-items:center;gap:var(--space-3);min-height:52px;padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.pu-row[data-v-f39cdded]:first-child{border-top:none}.pu-state[data-v-f39cdded]{color:var(--color-text-muted);font-size:var(--text-sm)}.pu-error-text[data-v-f39cdded]{flex:1;min-width:0}.pu-empty[data-v-f39cdded]{color:var(--color-text-faint)}.pu-main[data-v-f39cdded]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pu-label[data-v-f39cdded]{font-size:var(--text-sm);color:var(--color-text)}.pu-hint[data-v-f39cdded]{font-size:var(--text-xs);color:var(--color-text-faint)}.pu-value[data-v-f39cdded]{flex:none;font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);font-variant-numeric:tabular-nums;white-space:nowrap}.pu-value-sub[data-v-f39cdded]{font-weight:var(--weight-regular);color:var(--color-text-faint)}.pu-meter[data-v-f39cdded]{flex:none;width:120px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden}.pu-meter i[data-v-f39cdded]{display:block;height:100%;border-radius:var(--radius-full);background:var(--color-accent);transition:width var(--duration-base) var(--ease-out)}.pu-meter i.sev-warn[data-v-f39cdded]{background:var(--color-warning)}.pu-meter i.sev-danger[data-v-f39cdded]{background:var(--color-danger)}.sm-picker[data-v-eb75e643]{position:relative;width:100%;font-family:var(--font-ui)}.sm-picker__trigger[data-v-eb75e643]{display:flex;align-items:center;gap:var(--space-2);width:100%;height:38px;padding:0 var(--space-3);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:transparent;box-shadow:none;color:var(--color-text);font:inherit;font-size:var(--text-base);line-height:var(--leading-normal);text-align:left;cursor:pointer;transition:border-color var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out)}.sm-picker__trigger[data-v-eb75e643]:focus-visible,.sm-picker.is-open .sm-picker__trigger[data-v-eb75e643]{outline:none;border-color:var(--color-accent);box-shadow:var(--p-focus-ring)}.sm-picker__value[data-v-eb75e643]{min-width:0;flex:1;display:flex;align-items:center;overflow:hidden;white-space:nowrap}.sm-picker__value-text[data-v-eb75e643]{min-width:0;overflow:hidden;text-overflow:ellipsis}.sm-picker__value.is-placeholder[data-v-eb75e643]{color:var(--color-text-faint)}.sm-picker__chevron[data-v-eb75e643]{flex:none;color:var(--color-text-muted);transition:transform var(--duration-base) var(--ease-out)}.sm-picker.is-open .sm-picker__chevron[data-v-eb75e643]{transform:rotate(180deg)}.sm-picker__menu[data-v-eb75e643]{position:fixed;z-index:var(--z-modal-dropdown);width:252px;max-width:calc(100vw - 64px);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__models[data-v-eb75e643]{max-height:280px;overflow-y:auto;padding:var(--space-1);border-radius:var(--radius-md)}.sm-picker__flyout[data-v-eb75e643]{position:absolute;width:180px;max-height:280px;overflow-y:auto;padding:var(--space-1);border:.5px solid var(--color-line-strong);border-radius:var(--radius-md);background:var(--color-menu-bg);-webkit-backdrop-filter:var(--p-menu-backdrop);backdrop-filter:var(--p-menu-backdrop);box-shadow:var(--shadow-lg)}.sm-picker__flyout--right[data-v-eb75e643]{left:calc(100% + var(--space-1))}.sm-picker__flyout--left[data-v-eb75e643]{right:calc(100% + var(--space-1))}.sm-picker__group[data-v-eb75e643]{padding:var(--space-2) var(--space-2) var(--space-1);color:var(--color-text-faint);font-size:var(--text-xs);font-weight:var(--weight-medium)}.sm-picker__option[data-v-eb75e643]{display:flex;align-items:center;gap:var(--space-2);width:100%;min-height:32px;padding:var(--space-1) var(--space-2);border:none;border-radius:var(--radius-sm);background:transparent;color:var(--color-text);font:inherit;font-size:var(--text-sm);text-align:left;cursor:pointer}.sm-picker__option.is-active[data-v-eb75e643]{background:var(--color-hover);color:var(--color-text-strong)}.sm-picker__option.is-muted[data-v-eb75e643]{color:var(--color-text-muted)}.sm-picker__option-label[data-v-eb75e643]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm-picker__check[data-v-eb75e643]{flex:none;color:transparent}.sm-picker__option.is-selected .sm-picker__check[data-v-eb75e643]{color:var(--color-accent)}.sm-picker__flyout-caret[data-v-eb75e643]{flex:none;margin-left:auto;color:var(--color-text-faint)}.sd[data-v-347803bd]{display:grid;grid-template-columns:148px 1fr;grid-template-areas:"tabs region";min-height:0;height:100%;user-select:none}.sd[data-v-347803bd] :is(input,textarea,[contenteditable=true]){user-select:text}.settings-region[data-v-347803bd]{display:flex;min-width:0;min-height:0;flex-direction:column;grid-area:region}.settings-region-header[data-v-347803bd],.settings-tabs-header[data-v-347803bd]{display:flex;align-items:center;height:calc(var(--space-4) + var(--icon-button-sm) + var(--space-2));box-sizing:border-box}.settings-region-header[data-v-347803bd]{justify-content:flex-end;padding-right:var(--space-5)}.settings-tabs-header[data-v-347803bd]{padding-inline:var(--space-3)}.settings-dialog-title[data-v-347803bd]{margin:0;font-family:var(--font-ui);font-size:var(--text-lg);font-weight:var(--weight-medium);line-height:var(--leading-tight);color:var(--color-text)}.settings-tabs[data-v-347803bd]{display:flex;flex-direction:column;width:148px;padding:0 var(--space-2) var(--space-2);gap:2px;overflow-y:auto;border-right:.5px solid var(--color-line);grid-area:tabs}.settings-tab-list[data-v-347803bd]{display:flex;flex-direction:column;gap:2px}.tab[data-v-347803bd]{display:flex;align-items:center;gap:var(--space-2);text-align:left;padding:8px 10px;border:none;border-radius:var(--radius-md);background:transparent;color:var(--color-text-muted);font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-ui-strong);cursor:pointer;transition:background var(--duration-fast) var(--ease-out),color var(--duration-fast) var(--ease-out)}.tab[data-v-347803bd]:hover{background:var(--color-hover);color:var(--color-text-strong)}.tab.on[data-v-347803bd]{background:var(--color-hover);color:var(--color-text)}.tab[data-v-347803bd]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.body[data-v-347803bd]{display:flex;flex-direction:column;overflow-y:auto;padding:var(--space-2) 32px var(--space-5);flex:1;min-width:0}.body[data-v-347803bd]::-webkit-scrollbar{width:4px}.body[data-v-347803bd]::-webkit-scrollbar-track{background:transparent}.body[data-v-347803bd]::-webkit-scrollbar-thumb{background:transparent;border-radius:var(--radius-full);transition:background var(--duration-base) var(--ease-out)}.body.scrolling[data-v-347803bd]::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent)}.body.scrolling[data-v-347803bd]::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}.panel[data-v-347803bd]{display:block}.sec[data-v-347803bd]{padding:var(--space-4) 0}.panel>.sec[data-v-347803bd]:first-child{padding-top:0}.sec-head[data-v-347803bd]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);margin-bottom:var(--space-3)}.sec-title[data-v-347803bd]{margin:0 0 var(--space-3);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);letter-spacing:0;color:var(--color-text)}.notification-settings[data-v-347803bd]{user-select:none}.sec-head .sec-title[data-v-347803bd]{margin-bottom:0}.row[data-v-347803bd]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:38px;padding:var(--space-1) 0}.settings-group[data-v-347803bd]{overflow:hidden;border-radius:var(--radius-xl);background:var(--color-surface)}.settings-group[data-v-347803bd]:has(.ui-select.is-open){position:relative;z-index:var(--z-dropdown);overflow:visible}.settings-group>.row[data-v-347803bd]{min-height:52px;padding:var(--space-4);border-top:.5px solid var(--color-line)}.settings-group>.row[data-v-347803bd]:first-child{border-top:none}.settings-group>.empty-config[data-v-347803bd]{padding:var(--space-3)}.account-row[data-v-347803bd]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4)}.account-avatar[data-v-347803bd]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--color-surface-sunken);color:var(--color-text-muted)}.account-avatar img[data-v-347803bd]{width:100%;height:100%;border-radius:50%;object-fit:cover}.account-name-row[data-v-347803bd]{display:flex;align-items:center;gap:var(--space-2);min-width:0}.account-level[data-v-347803bd]{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.account-meta[data-v-347803bd]{display:flex;flex:1;min-width:0;flex-direction:column;gap:2px}.account-name[data-v-347803bd]{font-family:var(--font-ui);font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account-sub[data-v-347803bd]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rlabel[data-v-347803bd]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text);font-weight:var(--weight-option-label);display:flex;flex-direction:column;gap:0}.rvalue[data-v-347803bd]{font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-muted);max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rvalue.mono[data-v-347803bd]{font-family:var(--font-mono);font-size:var(--text-xs)}.hint[data-v-347803bd]{font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-tight);color:var(--color-text-faint)}.body[data-v-347803bd] .ui-seg,.body[data-v-347803bd] .ui-select__trigger,.body[data-v-347803bd] .ui-button,.archive-search[data-v-347803bd]{border-width:.5px}.select-wrap[data-v-347803bd]{min-width:220px;max-width:min(320px,50vw);flex:none}.empty-config[data-v-347803bd]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:var(--space-1) 0}@media(max-width:640px){.sd[data-v-347803bd]{grid-template-columns:1fr;grid-template-rows:auto 1fr;grid-template-areas:"tabs" "region"}.settings-tabs[data-v-347803bd]{width:auto;padding:0;overflow-x:visible;border-right:none;border-bottom:.5px solid var(--color-line)}.settings-tabs-header[data-v-347803bd]{padding:var(--space-3)}.settings-tab-list[data-v-347803bd]{flex-direction:row;gap:var(--space-1);overflow-x:auto;padding:0 var(--space-3) var(--space-2)}.settings-region-header[data-v-347803bd]{padding:var(--space-3)}.body[data-v-347803bd]{padding-inline:var(--space-3)}.tab[data-v-347803bd]{white-space:nowrap;flex:none}.row[data-v-347803bd]{align-items:flex-start;flex-direction:column}.settings-group[data-v-347803bd]{margin-inline:0}.select-wrap[data-v-347803bd]{width:100%;max-width:none}}.setting-card[data-v-347803bd]{border-radius:var(--radius-xl);overflow:hidden;background:var(--color-surface)}.panel-head[data-v-347803bd]{margin-bottom:var(--space-4)}.panel-title[data-v-347803bd]{margin:0 0 var(--space-2);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);letter-spacing:0;color:var(--color-text)}.panel-desc[data-v-347803bd]{margin:0;font-family:var(--font-ui);font-size:var(--text-xs);line-height:var(--leading-normal);color:var(--color-text-muted);max-width:560px}.archive-toolbar[data-v-347803bd]{display:flex;align-items:center;gap:var(--space-3);margin-bottom:var(--space-4);flex-wrap:wrap}.archive-search[data-v-347803bd]{flex:1;min-width:200px;height:36px;display:flex;align-items:center;gap:var(--space-2);padding:0 var(--space-3);border-radius:var(--radius-md);border:.5px solid var(--color-line);color:var(--color-text-faint);font-size:var(--text-xs);background:var(--color-surface-overlay);transition:border-color var(--duration-fast) var(--ease-out),box-shadow var(--duration-fast) var(--ease-out)}.archive-search[data-v-347803bd]:focus-within{border-color:var(--color-accent);box-shadow:var(--p-focus-ring);color:var(--color-text-muted)}.archive-search svg[data-v-347803bd]{width:15px;height:15px;flex:none}.archive-search input[data-v-347803bd]{width:100%;border:none;outline:none;background:transparent;font:inherit;color:var(--color-text)}.archive-list[data-v-347803bd]{display:flex;flex-direction:column;gap:var(--space-4)}.archive-card .setting-card[data-v-347803bd]{margin-bottom:0}.archive-workspace[data-v-347803bd]{display:flex;align-items:center;gap:var(--space-2);margin:0 2px var(--space-2);color:var(--color-text-muted);font-size:var(--text-xs);font-weight:var(--weight-medium)}.archive-workspace svg[data-v-347803bd]{width:16px;height:16px;color:var(--color-text-faint);flex:none}.archive-workspace .path[data-v-347803bd]{font-family:var(--font-ui);font-size:var(--text-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-workspace .count[data-v-347803bd]{margin-left:auto;color:var(--color-text-faint);font-weight:var(--weight-medium);font-size:var(--text-xs);flex:none}.archive-row[data-v-347803bd]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3);align-items:center;padding:var(--space-3) var(--space-4);border-top:.5px solid var(--color-line)}.archive-row[data-v-347803bd]:first-child{border-top:none}.archive-row[data-v-347803bd]:hover{background:var(--color-hover)}.archive-meta[data-v-347803bd]{min-width:0}.archive-name[data-v-347803bd]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.archive-time[data-v-347803bd]{margin-top:2px;font-size:var(--text-xs);color:var(--color-text-faint);font-family:var(--font-ui)}.archive-draining[data-v-347803bd]{margin-bottom:var(--space-3);padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);background:var(--color-accent-soft);color:var(--color-accent-hover);font-size:var(--text-xs)}.archive-empty[data-v-347803bd]{padding:var(--space-6) var(--space-4);border-radius:var(--radius-xl);color:var(--color-text-faint);font-size:var(--text-xs);text-align:center;background:var(--color-surface)}@media(max-width:640px){.archive-toolbar[data-v-347803bd]{flex-direction:column;align-items:stretch}.archive-search[data-v-347803bd]{min-width:0}}[data-v-347803bd] .ui-dialog{width:min(980px,96vw)}[data-v-347803bd] .ui-dialog--fixed-height{height:min(780px,calc(100vh - var(--space-8) * 2))}.aw[data-v-fea98be5]{padding-top:4px}.crumbbar[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) 22px;border-bottom:.5px solid var(--color-line)}.crumbs[data-v-fea98be5]{display:flex;align-items:center;flex-wrap:wrap;gap:1px;min-width:0;font-size:var(--text-sm)}.crumb-sep[data-v-fea98be5]{color:var(--color-text-muted)}.crumb[data-v-fea98be5]{background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-muted);padding:1px var(--space-1);border-radius:var(--radius-xs)}.crumb[data-v-fea98be5]:hover{color:var(--color-text);background:var(--color-hover)}.crumb.last[data-v-fea98be5]{color:var(--color-text);font-weight:var(--weight-medium)}.filterbar[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) 22px;border-bottom:.5px solid var(--color-line)}.filter-icon[data-v-fea98be5]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.filter-input[data-v-fea98be5]{flex:1;min-width:0;font-family:var(--font-ui);font-size:var(--text-base);padding:var(--space-1) 0;border:none;background:none;color:var(--color-text);outline:none}.filter-input[data-v-fea98be5]::placeholder{color:var(--color-text-muted)}.search-rel[data-v-fea98be5]{color:var(--color-text)}.folder-list[data-v-fea98be5]{height:300px;overflow-y:auto;padding:var(--space-1) var(--space-2)}.fl-loading[data-v-fea98be5],.fl-empty[data-v-fea98be5]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-muted);font-size:var(--text-sm)}.folder-row[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2);width:100%;background:none;border:none;cursor:pointer;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);text-align:left;padding:var(--space-2) var(--space-3);border-radius:var(--radius-md);transition:background var(--duration-fast) var(--ease-out)}.folder-row[data-v-fea98be5]:hover{background:var(--color-hover)}.dir-icon[data-v-fea98be5]{flex:none;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--color-text-muted)}.folder-name[data-v-fea98be5]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text)}.paste-section[data-v-fea98be5]{padding:var(--space-3) 22px;border-top:.5px solid var(--color-line)}.paste-section.paste-only[data-v-fea98be5]{border-top:none}.paste-row[data-v-fea98be5]{display:flex;align-items:center;gap:var(--space-2)}.paste-input-wrap[data-v-fea98be5]{flex:1;min-width:0}.add-error[data-v-fea98be5]{margin:0 22px var(--space-2);padding:var(--space-2) var(--space-3);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-danger);background:var(--color-danger-soft);border:.5px solid var(--color-danger-bd);border-radius:var(--radius-sm)}.actions[data-v-fea98be5]{display:flex;justify-content:flex-end;gap:var(--space-2);padding:var(--space-3) 22px}.footer-hint[data-v-fea98be5]{padding:var(--space-2) var(--space-4);font-family:var(--font-ui);font-size:var(--text-xs);color:var(--color-text-faint);border-top:.5px solid var(--color-line)}@media(max-width:640px){.folder-row[data-v-fea98be5]{min-height:44px}.crumbbar[data-v-fea98be5]{align-items:flex-start}.actions[data-v-fea98be5]{flex-wrap:wrap}}.confirm-dialog__message[data-v-aa5422da]{margin:0;font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.rows[data-v-340d1b31]{margin:0;padding:0}.row[data-v-340d1b31]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) 0;font-size:var(--text-base)}.row dt[data-v-340d1b31]{width:96px;flex:none;color:var(--color-text-muted);text-transform:uppercase;letter-spacing:.04em;font-size:var(--text-xs)}.row dd[data-v-340d1b31]{margin:0;color:var(--color-text);font-weight:var(--weight-medium);display:flex;align-items:center;gap:var(--space-2);min-width:0}.row dd.plan-on[data-v-340d1b31],.row dd.swarm-on[data-v-340d1b31]{color:var(--color-accent)}.ctx-text[data-v-340d1b31]{flex:none}.bar[data-v-340d1b31]{width:80px;height:5px;border-radius:var(--radius-full);background:var(--color-line);overflow:hidden;flex:none}.bar i[data-v-340d1b31]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.rows[data-v-340d1b31]{overflow-y:auto;-webkit-overflow-scrolling:touch}.row[data-v-340d1b31]{align-items:flex-start;flex-direction:column;gap:var(--space-1);min-height:48px}.row dt[data-v-340d1b31]{width:auto}.row dd[data-v-340d1b31]{max-width:100%;flex-wrap:wrap}}.toasts[data-v-ac44e9ef]{position:fixed;right:16px;bottom:84px;display:flex;flex-direction:column;gap:var(--space-2);z-index:var(--z-toast);width:min(440px,calc(100vw - 32px));max-height:56vh;overflow-y:auto}.toast-enter-active[data-v-ac44e9ef],.toast-leave-active[data-v-ac44e9ef]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.toast-enter-from[data-v-ac44e9ef],.toast-leave-to[data-v-ac44e9ef]{opacity:0;transform:translate(16px)}.toast-move[data-v-ac44e9ef]{transition:transform var(--duration-base) var(--ease-out)}.actions[data-v-ac44e9ef]{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-2)}.link[data-v-ac44e9ef]{border:0;padding:0;background:none;color:var(--color-accent);cursor:pointer;font:inherit;font-size:var(--ui-font-size-xs)}.link[data-v-ac44e9ef]:hover{text-decoration:underline}.details[data-v-ac44e9ef]{display:grid;gap:5px;margin:8px 0 0;padding:8px;border:.5px solid var(--color-line);border-radius:var(--radius-sm);background:var(--color-surface-sunken)}.detail-row[data-v-ac44e9ef]{display:grid;grid-template-columns:minmax(88px,.34fr) minmax(0,1fr);gap:8px}.detail-row dt[data-v-ac44e9ef]{color:var(--color-text-muted)}.detail-row dd[data-v-ac44e9ef]{margin:0;color:var(--color-text);overflow-wrap:anywhere;white-space:pre-wrap}@media(max-width:640px){.toasts[data-v-ac44e9ef]{left:12px;right:12px;bottom:calc(var(--dock-h, 76px) + 8px);width:auto;max-height:50vh}.detail-row[data-v-ac44e9ef]{grid-template-columns:1fr;gap:2px}}.topbar[data-v-7f357087]{display:flex;align-items:center;gap:10px;height:calc(50px + var(--safe-top));flex:none;padding:var(--safe-top) max(12px,var(--safe-right)) 0 max(12px,var(--safe-left));border-bottom:.5px solid var(--color-line);background:var(--color-bg);font-family:var(--font-ui)}.wsq[data-v-7f357087]{flex:none;width:28px;height:28px;border-radius:var(--radius-md);background:var(--color-text);color:var(--color-bg);display:flex;align-items:center;justify-content:center;font-family:var(--font-mono);font-weight:var(--weight-medium);font-size:var(--ui-font-size-sm)}.tb-mid[data-v-7f357087]{flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:center;gap:1px;background:none;border:none;padding:0;cursor:pointer;text-align:left}.tb-path[data-v-7f357087]{display:flex;align-items:center;gap:5px;font-size:var(--ui-font-size-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .ws[data-v-7f357087]{color:var(--color-text)}.tb-path .sl[data-v-7f357087]{color:var(--color-text-faint)}.tb-path .se[data-v-7f357087]{color:var(--color-text);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-path .cv[data-v-7f357087]{color:var(--color-text-faint);flex:none}.tb-sub[data-v-7f357087]{display:flex;align-items:center;gap:5px;font-size:max(9px,calc(var(--ui-font-size) - 3.5px));color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tb-sub .rd[data-v-7f357087]{flex:none;width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-text-faint)}.tb-sub .rd.on[data-v-7f357087]{background:var(--color-success)}.topbar .tb-path[data-v-7f357087]{font-family:var(--sans)}.sheet-root[data-v-c3d5dadc]{position:fixed;inset:0;z-index:var(--z-overlay);display:flex;flex-direction:column;justify-content:flex-end}.sheet-scrim[data-v-c3d5dadc]{position:absolute;inset:0;background:#0d111773}.sheet-panel[data-v-c3d5dadc]{position:relative;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-bottom:none;border-radius:var(--radius-xl) var(--radius-xl) 0 0;box-shadow:var(--shadow-xl);max-height:86vh;display:flex;flex-direction:column;min-height:0;font-family:var(--font-ui);color:var(--color-text)}.sheet-grab[data-v-c3d5dadc]{flex:none;align-self:center;width:56px;height:18px;padding:0;border:none;background:none;cursor:pointer;position:relative;margin-top:4px}.sheet-grab[data-v-c3d5dadc]:after{content:"";position:absolute;left:50%;top:7px;transform:translate(-50%);width:38px;height:5px;border-radius:var(--radius-full);background:var(--color-line)}.sheet-head[data-v-c3d5dadc]{flex:none;display:flex;align-items:center;justify-content:space-between;padding:6px 16px 10px}.sheet-title[data-v-c3d5dadc]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.sheet-body[data-v-c3d5dadc]{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:max(16px,var(--safe-bottom))}.sheet-enter-active[data-v-c3d5dadc],.sheet-leave-active[data-v-c3d5dadc]{transition:opacity var(--duration-slow) var(--ease-out)}.sheet-enter-active .sheet-panel[data-v-c3d5dadc],.sheet-leave-active .sheet-panel[data-v-c3d5dadc]{transition:transform var(--duration-slow) var(--ease-out)}.sheet-enter-from[data-v-c3d5dadc],.sheet-leave-to[data-v-c3d5dadc]{opacity:0}.sheet-enter-from .sheet-panel[data-v-c3d5dadc],.sheet-leave-to .sheet-panel[data-v-c3d5dadc]{transform:translateY(102%)}.newrow[data-v-b9a018f8]{display:flex;align-items:center;gap:10px;width:100%;padding:var(--space-3) var(--space-4);background:none;border:none;border-radius:var(--radius-md);color:var(--color-accent);font-weight:500;font-size:var(--text-base);cursor:pointer;text-align:left}.newrow[data-v-b9a018f8]:hover{background:var(--color-hover)}.newrow[data-v-b9a018f8]:active{background:var(--color-surface-sunken)}.newrow.secondary[data-v-b9a018f8]{padding-top:var(--space-2);padding-bottom:var(--space-2);color:var(--color-text-muted);font-weight:400}.newrow.secondary[data-v-b9a018f8]:hover{background:var(--color-hover)}.newrow.secondary[data-v-b9a018f8]:active{background:var(--color-surface-sunken);color:var(--color-text)}.mlist[data-v-b9a018f8]{--m-pad: 16px;--m-gutter: 15px;--m-gap: 8px;--m-indent: calc(var(--m-pad) + var(--m-gutter) + var(--m-gap));padding-bottom:var(--space-1)}.mempty[data-v-b9a018f8]{padding:var(--space-6) var(--space-4);text-align:center;color:var(--color-text-faint);font-size:var(--ui-font-size)}.mempty.small[data-v-b9a018f8]{padding:10px 16px 12px var(--m-indent);text-align:left;font-size:var(--ui-font-size-xs)}.mgroup[data-v-b9a018f8]{padding-top:2px}.mgh[data-v-b9a018f8]{display:flex;align-items:center;gap:var(--m-gap);padding:10px var(--m-pad) 6px;border-radius:var(--radius-md);cursor:pointer;user-select:none;position:relative}.mgh[data-v-b9a018f8]:hover{background:var(--color-hover)}.mgh[data-v-b9a018f8]:active{background:var(--color-surface-sunken)}.mgh-folder[data-v-b9a018f8]{flex:none;color:var(--color-text-muted)}.mgh-main[data-v-b9a018f8]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.mgh-name[data-v-b9a018f8]{font-size:var(--ui-font-size-lg);font-weight:550;color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-path[data-v-b9a018f8]{font-size:var(--text-base);font-weight:425;color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgh-add[data-v-b9a018f8]{margin:-10px -12px -10px 0}.mgh-add[data-v-b9a018f8]:active{color:var(--color-text);background:var(--color-hover)}.mgh-more[data-v-b9a018f8]{margin:-10px -8px}.mgh-more[data-v-b9a018f8]:active{color:var(--color-text);background:var(--color-hover)}.srow[data-v-b9a018f8]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--m-pad) var(--space-3) var(--m-indent);border-radius:var(--radius-md);cursor:pointer;position:relative}.srow[data-v-b9a018f8]:hover{background:var(--color-hover)}.srow[data-v-b9a018f8]:active{background:var(--color-surface-sunken)}.srow.cur[data-v-b9a018f8]{background:var(--color-accent-soft);box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.srow .m[data-v-b9a018f8]{flex:1;min-width:0}.srow .m .t[data-v-b9a018f8]{font-size:var(--text-base);font-weight:450;line-height:var(--leading-tight);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow.cur .m .t[data-v-b9a018f8]{color:var(--color-accent-hover)}.srow .m .t.run[data-v-b9a018f8]{position:relative}.srow .m .t.run[data-v-b9a018f8]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-accent);animation:mRunPulse-b9a018f8 1.4s ease-in-out infinite}@keyframes mRunPulse-b9a018f8{0%,to{opacity:1}50%{opacity:.35}}.srow .m .t.aborted[data-v-b9a018f8]{position:relative}.srow .m .t.aborted[data-v-b9a018f8]:before{content:"";position:absolute;left:-14px;top:50%;transform:translateY(-50%);width:6px;height:6px;border-radius:var(--radius-full);background:var(--color-danger)}.srow .m .s[data-v-b9a018f8]{font-size:var(--text-base);font-weight:475;font-variant-numeric:tabular-nums;color:var(--color-text-faint);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.att[data-v-b9a018f8]{flex:none;font-family:var(--font-mono);font-size:max(9px,calc(var(--ui-font-size) - 4px));color:var(--color-text-on-accent);background:var(--color-warning);border-radius:var(--radius-full);padding:1px 7px}.srow .kb[data-v-b9a018f8]:active{color:var(--color-text);background:var(--color-hover)}.kmenu[data-v-b9a018f8]{position:absolute;right:12px;top:44px;z-index:var(--z-dropdown);min-width:96px;overflow:hidden}.wsmenu[data-v-b9a018f8]{top:calc(100% - 4px);right:var(--m-pad);min-width:132px}.mshow-more-row[data-v-b9a018f8]{display:flex;align-items:center;padding-left:calc(var(--m-indent) - var(--space-3))}.mshow-more[data-v-b9a018f8]{display:flex;align-items:center;gap:var(--space-2);min-height:44px;padding:var(--space-1) var(--space-3);background:none;border:none;border-radius:var(--radius-md);color:var(--color-text-muted);font-size:var(--text-base);cursor:pointer;text-align:left}.mshow-more[data-v-b9a018f8]:active{color:var(--color-accent-hover);background:var(--color-hover)}.mshow-more-sep[data-v-b9a018f8]{margin:0 var(--space-1);color:var(--color-text-faint);user-select:none}.newrow[data-v-b9a018f8]{font-family:var(--sans)}.mlist .srow[data-v-b9a018f8]{margin:1px 8px;border-radius:var(--radius-md);border-bottom:none;padding:12px calc(var(--m-pad, 16px) - 8px) 12px calc(var(--m-indent, 39px) - 8px)}.mlist .srow.cur[data-v-b9a018f8]{box-shadow:inset 0 0 0 1px var(--color-accent-bd)}.group-title[data-v-e7d4975b]{padding:var(--space-3) var(--space-3) var(--space-1);font-family:var(--font-ui);font-size:var(--text-xs);font-weight:var(--weight-medium);letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-faint)}.srow[data-v-e7d4975b]:disabled{opacity:.5;cursor:not-allowed}.srow[data-v-e7d4975b]{display:flex;align-items:center;gap:var(--space-3);width:100%;min-height:52px;padding:var(--space-3);background:none;border:none;border-radius:var(--radius-md);cursor:pointer;text-align:left;color:var(--color-text)}.srow[data-v-e7d4975b]:hover:not(.read-only){background:var(--color-hover)}.srow[data-v-e7d4975b]:active:not(.read-only){background:var(--color-surface-sunken)}.srow.read-only[data-v-e7d4975b]{cursor:default}.srow-main[data-v-e7d4975b]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.srow-label[data-v-e7d4975b]{font-size:var(--text-base);color:var(--color-text)}.srow-sub[data-v-e7d4975b]{font-size:var(--text-base);color:var(--color-text-faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.srow-val[data-v-e7d4975b]{flex:none;font-family:var(--font-mono);font-size:var(--ui-font-size);font-weight:500;color:var(--color-accent-hover)}.srow-val.dim[data-v-e7d4975b]{font-weight:400;color:var(--color-text-muted)}.cache-note[data-v-e7d4975b]{padding:0 var(--space-3) var(--space-2);font-size:var(--text-xs);color:var(--color-text-faint);line-height:1.4}.chev[data-v-e7d4975b]{flex:none;color:var(--color-text-faint);font-size:17px;line-height:1}.toggle[data-v-e7d4975b]{flex:none;width:44px;height:26px;border-radius:var(--radius-full);background:var(--color-line);position:relative;transition:background .18s}.toggle.on[data-v-e7d4975b]{background:var(--color-accent)}.toggle[data-v-e7d4975b]:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:var(--radius-full);box-sizing:border-box;background:var(--color-bg);border:.5px solid var(--color-line);box-shadow:var(--shadow-xs);transition:left .18s}.toggle.on[data-v-e7d4975b]:after{left:21px}.srow.pref[data-v-e7d4975b]{cursor:default}.srow.acct.in .srow-label[data-v-e7d4975b]{color:var(--color-accent-hover);font-weight:500}.srow.acct.out .srow-label[data-v-e7d4975b]{color:var(--color-danger)}.acct-avatar[data-v-e7d4975b]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex:none;border-radius:50%;background:var(--color-surface-sunken);color:var(--color-text-muted)}.acct-avatar img[data-v-e7d4975b]{width:100%;height:100%;border-radius:50%;object-fit:cover}.acct-name-row[data-v-e7d4975b]{display:flex;align-items:center;gap:var(--space-2);min-width:0}.acct-name-row .srow-label[data-v-e7d4975b]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.acct-level[data-v-e7d4975b]{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}.ctx-meter[data-v-e7d4975b]{flex:none;width:96px;height:7px;border-radius:var(--radius-full);background:var(--color-surface-sunken);overflow:hidden}.ctx-meter i[data-v-e7d4975b]{display:block;height:100%;background:var(--color-accent)}@media(max-width:640px){.srow[data-v-e7d4975b]{align-items:flex-start;gap:10px;min-width:0;padding:14px max(14px,var(--safe-right)) 14px max(14px,var(--safe-left))}.group-title[data-v-e7d4975b],.cache-note[data-v-e7d4975b]{padding-left:max(14px,var(--safe-left));padding-right:max(14px,var(--safe-right))}.srow-main[data-v-e7d4975b]{flex:1 1 auto}.srow-sub[data-v-e7d4975b]{white-space:normal;overflow-wrap:anywhere}.srow.pref[data-v-e7d4975b]{flex-wrap:wrap}.srow.pref .srow-main[data-v-e7d4975b]{flex:1 0 100%}.srow-val[data-v-e7d4975b],.chev[data-v-e7d4975b],.toggle[data-v-e7d4975b],.ctx-meter[data-v-e7d4975b]{margin-top:2px}}.srow[data-v-e7d4975b],.srow-sub[data-v-e7d4975b],.srow-val[data-v-e7d4975b],.cache-note[data-v-e7d4975b]{font-family:var(--sans)}.arch-subhead[data-v-e7d4975b]{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);padding:var(--space-2) var(--space-3) var(--space-1)}.arch-back[data-v-e7d4975b]{display:inline-flex;align-items:center;gap:2px;border:none;background:none;padding:var(--space-1) var(--space-2) var(--space-1) 0;font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-accent-hover);cursor:pointer}.chev.back[data-v-e7d4975b]{font-size:20px}.arch-count[data-v-e7d4975b]{font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.arch-tools[data-v-e7d4975b]{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);flex-wrap:wrap}.arch-search-input[data-v-e7d4975b]{flex:1;min-width:160px}.arch-row[data-v-e7d4975b]{display:flex;align-items:center;gap:var(--space-3);min-height:56px;padding:var(--space-2) var(--space-3);border-top:.5px solid var(--color-line)}.arch-row[data-v-e7d4975b]:first-of-type{border-top:none}.arch-meta[data-v-e7d4975b]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.arch-name[data-v-e7d4975b]{font-family:var(--font-ui);font-size:var(--text-base);color:var(--color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.arch-time[data-v-e7d4975b]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-faint)}.arch-empty[data-v-e7d4975b]{padding:var(--space-6) var(--space-4);text-align:center;font-family:var(--font-ui);font-size:var(--text-sm);color:var(--color-text-faint)}.brand-logo[data-v-f04205a8]{display:block;flex:none;cursor:pointer;user-select:none;touch-action:manipulation}.ls-cards[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-3)}.ls-card[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);width:100%;padding:var(--space-4);background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);font-family:var(--font-ui);text-align:left;cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.ls-card[data-v-1ff21828]:hover{border-color:var(--color-line-strong);background:var(--color-surface)}.ls-card[data-v-1ff21828]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.ls-card-logo[data-v-1ff21828]{align-self:flex-start}.ls-card-icon[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;color:var(--color-text-muted)}.ls-card-text[data-v-1ff21828]{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--space-1)}.ls-card-title[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-2);font-size:var(--text-lg);font-weight:var(--weight-medium);color:var(--color-text)}.ls-reco[data-v-1ff21828]{padding:2px var(--space-2);border-radius:var(--radius-full);background:var(--color-accent-soft);color:var(--color-accent);font-size:var(--text-xs);font-weight:var(--weight-medium)}.ls-card-hint[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.ls-card-chevron[data-v-1ff21828]{color:var(--color-text-faint);flex:none}.ls-done-card[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-4);background:var(--color-surface-raised);border:.5px solid var(--color-success-bd);border-radius:var(--radius-lg)}.ls-done-badge[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--radius-full);background:var(--color-success-soft);color:var(--color-success);flex:none}.ls-flow[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-4)}.ls-center[data-v-1ff21828]{display:flex;flex-direction:column;align-items:center;gap:var(--space-3);padding:var(--space-6) 0 var(--space-2);text-align:center}.ls-center-text[data-v-1ff21828]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.ls-success-text[data-v-1ff21828]{color:var(--color-success)}.ls-err-text[data-v-1ff21828]{color:var(--color-danger)}.ls-warn-text[data-v-1ff21828]{color:var(--color-warning)}.ls-center-hint[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted)}.ls-device[data-v-1ff21828]{display:flex;flex-direction:column;gap:var(--space-4)}.ls-lead[data-v-1ff21828]{font-size:var(--text-base);color:var(--color-text);line-height:var(--leading-normal)}.ls-primary[data-v-1ff21828]{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);width:100%;min-height:40px;padding:0 var(--space-4);background:var(--color-accent);color:var(--color-text-on-accent);border:.5px solid var(--color-accent);border-radius:var(--radius-md);font-family:var(--font-ui);font-size:var(--text-base);font-weight:var(--weight-medium);cursor:pointer;text-decoration:none;transition:background var(--duration-fast) var(--ease-out),border-color var(--duration-fast) var(--ease-out)}.ls-primary[data-v-1ff21828]:hover{background:var(--color-accent-hover);border-color:var(--color-accent-hover)}.ls-or[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);color:var(--color-text-muted);font-size:var(--text-xs);letter-spacing:.06em}.ls-or[data-v-1ff21828]:before,.ls-or[data-v-1ff21828]:after{content:"";flex:1;height:1px;background:var(--color-line)}.ls-fb-text[data-v-1ff21828]{font-size:var(--text-sm);color:var(--color-text-muted);line-height:var(--leading-normal)}.ls-fb-link[data-v-1ff21828]{color:var(--color-accent);text-decoration:none;border-bottom:.5px solid var(--color-accent-bd)}.ls-fb-link[data-v-1ff21828]:hover{border-bottom-color:var(--color-accent)}.ls-code-row[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-3);background:var(--color-surface-sunken);border:.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3)}.ls-code[data-v-1ff21828]{flex:1;font-family:var(--font-mono);font-size:var(--text-xl);font-weight:var(--weight-medium);color:var(--color-text);letter-spacing:.14em}.ls-link[data-v-1ff21828]{flex:1;min-width:0;font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:text}.ls-copy.is-copied[data-v-1ff21828]{color:var(--color-success);border-color:var(--color-success-bd)}.ls-status[data-v-1ff21828]{display:flex;align-items:center;gap:var(--space-2);padding-top:var(--space-3);border-top:.5px solid var(--color-line)}.ls-status-text[data-v-1ff21828]{font-family:var(--font-mono);font-size:var(--text-sm);color:var(--color-text-muted);flex:1}.ls-countdown[data-v-1ff21828]{font-family:var(--font-mono);font-size:var(--text-xs);color:var(--color-text-muted);font-variant-numeric:tabular-nums}.ls-actions[data-v-1ff21828]{display:flex;justify-content:flex-end;gap:var(--space-3)}@media(max-width:640px){.ls-code-row[data-v-1ff21828],.ls-status[data-v-1ff21828],.ls-actions[data-v-1ff21828]{flex-wrap:wrap}.ls-code[data-v-1ff21828]{min-width:0;overflow-wrap:anywhere;letter-spacing:.08em}.ls-status-text[data-v-1ff21828]{min-width:0}}.wizard[data-v-6546a2d8]{position:fixed;inset:0;z-index:var(--z-modal);display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);overflow-y:auto;font-family:var(--font-ui)}.wiz-body[data-v-6546a2d8]{flex:1;display:flex;flex-direction:column;align-items:center;width:min(560px,100%);margin:0 auto;padding:max(var(--space-8),12vh) var(--space-5) var(--space-6)}.wiz-step[data-v-6546a2d8]{display:flex;flex-direction:column;align-items:center;width:100%;flex:1;min-height:0}.wiz-step-fill[data-v-6546a2d8]{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;width:100%}.wiz-title[data-v-6546a2d8]{margin:var(--space-4) 0 0;font-size:var(--text-2xl);font-weight:var(--weight-semibold);line-height:var(--leading-tight);color:var(--color-text);text-align:center}.wiz-sub[data-v-6546a2d8]{margin:var(--space-2) 0 var(--space-6);font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted);text-align:center;max-width:460px}.pref-group[data-v-6546a2d8]{width:100%;margin-bottom:var(--space-5)}.pref-label[data-v-6546a2d8]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted);margin-bottom:var(--space-2)}.opt-card[data-v-6546a2d8]{display:flex;align-items:center;background:var(--color-surface-raised);border:.5px solid var(--color-line);border-radius:var(--radius-lg);font-family:var(--font-ui);cursor:pointer;transition:border-color var(--duration-fast) var(--ease-out),background var(--duration-fast) var(--ease-out)}.opt-card[data-v-6546a2d8]:hover{border-color:var(--color-line-strong)}.opt-card[data-v-6546a2d8]:focus-visible{outline:none;box-shadow:var(--p-focus-ring-strong)}.opt-card.selected[data-v-6546a2d8]{border-color:var(--color-accent);background:var(--color-accent-soft)}.opt-label[data-v-6546a2d8]{font-size:var(--text-base);font-weight:var(--weight-medium);color:var(--color-text)}.lang-cards[data-v-6546a2d8]{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-3);width:100%}.lang-card[data-v-6546a2d8]{gap:var(--space-3);padding:var(--space-4)}.opt-radio[data-v-6546a2d8]{width:18px;height:18px;border-radius:var(--radius-full);border:.5px solid var(--color-line-strong);background:var(--color-surface-raised);flex:none;display:inline-flex;align-items:center;justify-content:center;transition:border-color var(--duration-fast) var(--ease-out)}.opt-radio[data-v-6546a2d8]:after{content:"";width:8px;height:8px;border-radius:var(--radius-full);background:transparent;transition:background var(--duration-fast) var(--ease-out)}.opt-radio.on[data-v-6546a2d8]{border-color:var(--color-accent)}.opt-radio.on[data-v-6546a2d8]:after{background:var(--color-accent)}.theme-cards[data-v-6546a2d8]{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-3);width:100%}.theme-card[data-v-6546a2d8]{flex-direction:column;gap:var(--space-3);padding:var(--space-3)}.tp[data-v-6546a2d8]{display:flex;width:100%;aspect-ratio:16 / 10;border:.5px solid var(--color-line);border-radius:var(--radius-md);overflow:hidden}.tp-light[data-v-6546a2d8]{background:#fff}.tp-dark[data-v-6546a2d8]{background:#0d1117}.tp-half[data-v-6546a2d8]{flex:1;display:flex;min-width:0}.tp-half-light[data-v-6546a2d8]{background:#fff}.tp-half-dark[data-v-6546a2d8]{background:#0d1117}.tp-side[data-v-6546a2d8]{width:30%;flex:none}.tp-light .tp-side[data-v-6546a2d8],.tp-half-light .tp-side[data-v-6546a2d8]{background:#0000000d}.tp-dark .tp-side[data-v-6546a2d8],.tp-half-dark .tp-side[data-v-6546a2d8]{background:#ffffff12}.tp-lines[data-v-6546a2d8]{flex:1;display:flex;flex-direction:column;gap:6px;padding:14% 12%}.tp-lines span[data-v-6546a2d8]{height:6px;border-radius:var(--radius-full)}.tp-lines span[data-v-6546a2d8]:nth-child(1){width:62%}.tp-lines span[data-v-6546a2d8]:nth-child(2){width:88%}.tp-lines span[data-v-6546a2d8]:nth-child(3){width:44%}.tp-light .tp-lines span[data-v-6546a2d8],.tp-half-light .tp-lines span[data-v-6546a2d8]{background:#00000024}.tp-dark .tp-lines span[data-v-6546a2d8],.tp-half-dark .tp-lines span[data-v-6546a2d8]{background:#ffffff38}.wiz-foot[data-v-6546a2d8]{display:flex;flex-direction:column;align-items:center;gap:var(--space-2);width:100%;margin-top:auto;padding:var(--space-8) 0 max(var(--space-8),8vh)}.wiz-foot-ghost[data-v-6546a2d8]{display:flex;gap:var(--space-3);min-height:32px;align-items:center}.wiz-foot-ghost[data-v-6546a2d8] .ui-button--ghost:not(:disabled):hover{background:transparent;color:var(--color-text)}.wiz-primary[data-v-6546a2d8]{min-width:140px}@media(max-width:640px){.theme-cards[data-v-6546a2d8]{grid-template-columns:1fr}}.gload[data-v-ab85ede1]{position:fixed;top:0;left:0;width:100vw;height:100vh;height:100dvh;min-width:100vw;min-height:100dvh;z-index:var(--z-toast);display:flex;align-items:center;justify-content:center;background:var(--bg)}.gload-box[data-v-ab85ede1]{display:flex;flex-direction:column;align-items:center;gap:22px;transform:translateY(-6%)}.gload-logo[data-v-ab85ede1]{width:128px;height:auto;color:var(--color-text);animation:gload-pop-ab85ede1 .55s cubic-bezier(.22,1,.36,1) both}.gload-text[data-v-ab85ede1]{font-family:var(--mono);font-size:var(--text-base);color:var(--muted);letter-spacing:.04em}@keyframes gload-pop-ab85ede1{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.gload-logo[data-v-ab85ede1]{animation:none}}.gload-text[data-v-ab85ede1]{font-family:var(--sans)}.kap-root[data-v-2b13888e]{height:100vh;display:flex;flex-direction:column;background:var(--bg);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 2.5px);color:var(--color-text)}.kap-head[data-v-2b13888e]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 14px;border-bottom:.5px solid var(--line);background:var(--panel)}.kap-count[data-v-2b13888e]{color:var(--muted)}.kap-head-actions[data-v-2b13888e]{margin-left:auto;display:flex;gap:6px}.kap-head-actions button[data-v-2b13888e],.kap-view-toggle button[data-v-2b13888e]{padding:3px 8px;border:.5px solid var(--line);border-radius:6px;background:var(--bg);color:var(--muted);font:inherit;cursor:pointer}.kap-head-actions button[data-v-2b13888e]:hover,.kap-view-toggle button[data-v-2b13888e]:hover{color:var(--color-text)}.kap-head-actions button.on[data-v-2b13888e],.kap-view-toggle button.on[data-v-2b13888e]{color:var(--color-accent-hover);border-color:var(--color-accent-bd);background:var(--color-accent-soft)}.kap-filters[data-v-2b13888e]{flex:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:7px 10px;border-bottom:.5px solid var(--line)}.kap-filters select[data-v-2b13888e],.kap-filters input[type=text][data-v-2b13888e]{padding:3px 6px;border:.5px solid var(--line);border-radius:6px;background:var(--bg);color:var(--color-text);font:inherit;min-width:0}.kap-filters input[type=text][data-v-2b13888e]{flex:1;min-width:120px}.kap-check[data-v-2b13888e]{display:inline-flex;align-items:center;gap:4px;color:var(--muted);white-space:nowrap}.kap-view-toggle[data-v-2b13888e]{display:flex;gap:0}.kap-view-toggle button[data-v-2b13888e]:first-child{border-radius:6px 0 0 6px;border-right:none}.kap-view-toggle button[data-v-2b13888e]:last-child{border-radius:0 6px 6px 0}.kap-list[data-v-2b13888e]{flex:1;min-height:0;overflow-y:auto}.kap-empty[data-v-2b13888e]{padding:18px 12px;color:var(--muted);text-align:center}.kap-row[data-v-2b13888e]{display:flex;align-items:baseline;gap:7px;width:100%;padding:3px 10px;border:none;border-bottom:.5px solid var(--line);background:transparent;color:var(--color-text);font:inherit;text-align:left;cursor:pointer}.kap-row[data-v-2b13888e]:hover{background:var(--panel2)}.kap-row.expanded[data-v-2b13888e]{background:var(--color-accent-soft)}.kap-ts[data-v-2b13888e]{flex:none;color:var(--muted)}.kap-badge[data-v-2b13888e]{flex:none;padding:0 5px;border-radius:var(--radius-sm);font-size:max(9px,calc(var(--ui-font-size) - 4.5px));font-weight:500;line-height:1.7}.b-rest[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-accent-hover)}.b-in[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-success)}.b-out[data-v-2b13888e]{background:var(--color-accent-soft);color:var(--color-warning)}.b-life[data-v-2b13888e]{background:var(--panel2);color:var(--muted)}.b-err[data-v-2b13888e]{background:var(--color-warning);color:var(--bg)}.kap-label[data-v-2b13888e]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kap-detail[data-v-2b13888e]{border-bottom:.5px solid var(--line);background:var(--bg);padding:6px 10px 10px}.kap-detail-actions[data-v-2b13888e]{display:flex;justify-content:flex-end;margin-bottom:4px}.kap-detail-actions button[data-v-2b13888e]{padding:2px 8px;border:.5px solid var(--line);border-radius:6px;background:var(--panel);color:var(--muted);font:inherit;cursor:pointer}.kap-detail-actions button[data-v-2b13888e]:hover{color:var(--color-text)}.kap-detail pre[data-v-2b13888e]{margin:0;max-height:320px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:calc(var(--ui-font-size) - 3px);line-height:1.45}.kap-agg[data-v-2b13888e]{flex:1;min-height:0;overflow-y:auto;padding:8px 10px}.kap-agg h4[data-v-2b13888e]{margin:8px 0 4px;font-size:calc(var(--ui-font-size) - 2.5px);color:var(--muted)}.kap-agg table[data-v-2b13888e]{width:100%;border-collapse:collapse}.kap-agg th[data-v-2b13888e],.kap-agg td[data-v-2b13888e]{padding:3px 6px;border-bottom:.5px solid var(--line);text-align:left;vertical-align:top}.kap-agg th[data-v-2b13888e]{color:var(--muted);font-weight:500}.kap-agg .num[data-v-2b13888e]{text-align:right}.kap-agg .err[data-v-2b13888e]{color:var(--color-warning);font-weight:500}.kap-agg .mono[data-v-2b13888e]{word-break:break-all}.kap-fab[data-v-21de79fc]{position:fixed;right:10px;bottom:10px;z-index:var(--z-overlay);padding:5px 9px;border:.5px solid var(--line);border-radius:8px;background:var(--panel);color:var(--muted);font-family:var(--mono);font-size:calc(var(--ui-font-size) - 3px);font-weight:500;letter-spacing:.04em;cursor:pointer;opacity:.75}.kap-fab[data-v-21de79fc]:hover{opacity:1;color:var(--color-accent)}.server-auth-hint[data-v-331563ff]{margin:0 0 var(--space-3);font-size:var(--text-base);line-height:var(--leading-normal);color:var(--color-text-muted)}.server-auth-hint code[data-v-331563ff]{padding:1px 5px;font-family:var(--font-mono);font-size:var(--text-xs);background:var(--color-surface-sunken);border-radius:var(--radius-xs)}.internal-build-tag[data-v-14c3d0e0]{flex:none;display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:999px;background:#f5a623;color:#3a2a00;font-size:11px;font-weight:700;letter-spacing:.01em;line-height:1.4;white-space:nowrap;user-select:none}.gload-fade-leave-active[data-v-f425edfe]{transition:opacity .28s ease}.gload-fade-leave-to[data-v-f425edfe]{opacity:0}.action-toast-enter-active[data-v-f425edfe],.action-toast-leave-active[data-v-f425edfe]{transition:opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out)}.action-toast-leave-active[data-v-f425edfe]{transition-duration:var(--duration-fast);pointer-events:none}.action-toast-enter-from[data-v-f425edfe],.action-toast-leave-to[data-v-f425edfe]{opacity:0;transform:translateY(-6px)}.app-shell[data-v-f425edfe]{position:fixed;top:var(--app-top, 0px);left:0;right:0;height:100vh;height:100dvh;height:var(--app-height, 100dvh);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}.app[data-v-f425edfe]{flex:1;min-height:0;position:relative;display:grid;grid-template-columns:auto 0 minmax(0,1fr) 0 auto;background:var(--bg);color:var(--color-text);overflow:hidden;box-sizing:border-box}.app[data-v-f425edfe]>*{min-height:0;min-width:0}.app>.side[data-v-f425edfe]{grid-column:1}.side-handle[data-v-f425edfe]{grid-column:2}.app:not(.mobile)>.con[data-v-f425edfe]{grid-column:3}.preview-handle[data-v-f425edfe]{grid-column:4}.sidebar-toggle-btn[data-v-f425edfe]{position:absolute;top:11px;left:16px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-f425edfe .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .sidebar-toggle-btn[data-v-f425edfe]{left:84px;animation:none}.new-chat-btn[data-v-f425edfe]{position:absolute;top:11px;left:42px;z-index:var(--z-sticky);animation:sidebar-toggle-btn-in-f425edfe .18s var(--ease-out) .12s backwards;-webkit-app-region:no-drag}.app.macos-desktop .new-chat-btn[data-v-f425edfe]{left:110px}@keyframes sidebar-toggle-btn-in-f425edfe{0%{opacity:0}}.internal-build-fab[data-v-f425edfe]{position:absolute;right:var(--space-3);bottom:var(--space-3);z-index:var(--z-sticky);pointer-events:none}.app.mobile[data-v-f425edfe]{grid-template-columns:1fr;grid-template-rows:auto 1fr}.global-preview[data-v-f425edfe]{--preview-w: 460px;grid-column:5;min-width:0;min-height:0;width:0;background:var(--bg);overflow:hidden}.global-preview.open[data-v-f425edfe]{width:var(--preview-w)}.global-preview[data-v-f425edfe]:not(.mobile)>*{width:var(--preview-w);height:100%;box-sizing:border-box;border-left:.5px solid var(--line)}.global-preview.mobile[data-v-f425edfe]{position:fixed;inset:0;z-index:var(--z-sticky);width:auto;transition:none;border-top:.5px solid var(--color-text)}:root{--panel-head-h: 48px;--panel-head-inset: calc((var(--panel-head-h) - var(--icon-button-sm)) / 2)}.app:not(.mobile) .chat-header{transition:padding-left .28s cubic-bezier(.4,0,.2,1)}.app.sidebar-collapsed .chat-header{padding-left:78px}.app.sidebar-collapsed.macos-desktop .chat-header{padding-left:146px}.app.sidebar-collapsed .session-admin .sa-head{padding-left:78px}.app.sidebar-collapsed.windows-desktop .session-admin .sa-head{padding-left:var(--space-6)}.app.sidebar-collapsed.macos-desktop .session-admin .sa-head{padding-left:146px}.app.fullscreen.sidebar-collapsed.macos-desktop .session-admin .sa-head{padding-left:78px}.app.macos-desktop .global-preview .ui-panel-header{-webkit-app-region:drag}.app.macos-desktop .global-preview .ui-panel-header button,.app.macos-desktop .global-preview .ui-panel-header input{-webkit-app-region:no-drag}.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel,.copy-menu-open) .chat-header,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel,.copy-menu-open) .side .ch,.app.macos-desktop:has(.ch-menu,.open-in-menu,.dock-work-panel,.copy-menu-open) .global-preview .ui-panel-header{-webkit-app-region:no-drag}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAfsABQAAAAAEAwAAAeCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhwbHhwoP0hWQVJbBmA/U1RBVIFiJyYAdC9qEQgKhGSEAAsgADCGCAE2AiQDOgQgBYlMB4EUDAcbLQ4onoexrSC/2ZyLAa8p8VHB8/x3Vue+V0hVJalMJg2nx/TCrQXxBeqLjQG7FyM1WEa/X1tEXN7cFz9EJEMmMUz3RihWSSKeQCbcIou0izz/C8v+fq3VfajEa9gDD11CImXS7qL/RJFVzC1qiB6KmKeD6TZdQ6IRGv78dL6uSVVCfgni5mzu7kcgQBgAEAQTQRCoL++STTYybkJxNfQxAAIAGu8OdEB9teW2jh4BpgDqFjAeSEByW3zFP0CBBgNMsMCGEDjgggdhiEAUAeIIED7ABTDUEnkIE9Q9ahFgKttcVhApo4ACB4qobHaccgDfEjFO6aaWUhjMLt2SyIvHKoDqoA4CSUwEIYQCEjhAO9R1G6keDeDZGjNo+AhxOjCEGTr1WeIF3kYBiLAOKvkJSMiKX0VdAyQt3SDJClCkxJCHkCzfqyVTriJZLcolS32JZHUekq2TYNkYtCtjYHMQXSxGjXDz2t/yLWXzDzxz+o3zFwDEaN23F+13pyMdQAEaSKAR9vcGq4A4MTSKCElGW+M7UcY7xqkggITb28ZJhlqc9q2twYKTt0NjixBgYvO9BIihEBLYuOFXQzfIQ7dXGUEEEgFDooBfAzqiQbpJrhiWSuKJCRFKYbHCyJKI2G5GiZbNAvgAu5pc3vwx4G+g3aDkhklABiSz0BICXrYghtYhx/cdJ+44rY2oZ0aMNRFz3VZjb6W33F3gzltqtOCV8tTHSpOeXuItfvr5lCdfzFpqtEitvqdcdGGFd28ZqqC0tPbeChGXgrIlnhSWu/eUso4uKWFLugyDzQJhflY4659+WjQ++6x72WUMv9G8mw6QJl7BVxX5fe/kpUsOvnZwee9uQ0cGXYd0o89XB2748sDSnt8d2VphdOTTgceDVvOds0v9P/s7HPq15aGun/6Vllb56f1dl0t1LejqrNkpdRZsG8TOnM5vkBG5oiVyVGnS8LHps5cfNWJs6qKPfaNSxiQNBUm3cKNWROr0GSur7Za31k1vieq7LH11VF+jXdRIasRKflc7jkobm1Z9te1IyZA0pDkhLR98+H37Zf1c/8at+dB7x+7GfVyTfJMPiYztsnl59Y5l4j+0n1RXlpHnF3Tq7HecmNF/CJodEMAikruxiyJaGLvHOdAfoA+oDvpjBm2b91cHGRZMU9n25xEU0A8fgEEAdKI3Q1iDtc034sug5YVMkE2jsE+BIkwSoQ3gxXMqz9tELp48bd0cFKOKS7xYjEuXBnZP5ia7DyiO/X/YI+PQSbt2uSdqAkWL9nQbV1XB94/+uPfdZz8dnXYFBYrcTl2SIR/ybxJNJPz/Gupb0JaZeens2ekC7EKr8t+Ls/P5VJPYJdHKyqfg2nqU6bhlidzcddQV/7MmecTzJ5VPcKXkNKSEogHjYFx6QZ7rQ+FSe8njaiNuOnXS8H2ScQ619c2mC3VTtauL0rRbXd/CkSOP37FY9Zkjz8+GibYUMOEWF+RdrFS8Ecv1SHOpPUPZGEIpjPvFyU5cXKjd6OXqorTqy9GwRd++HVufPGnVsW+aO3vggKZ18jR9sXaTC1PWTEsVUaK0FkNySbTQDqlm2PfDjZcu4aalnSLKjnOoYQ0nUlqqXcGpPu/4VgV/xU2pAqW4BW3qzhQ8/hFKhV2qE3+BKAtDqBXjfgnVdH4y0wg5tbVNRenNdTWOrenWLcupQdmsbq5b+18piTe/xRdp1xbILxNPJGInm2z6hoB21Lal0i+ePTtd7B45+3XhFJ329evskXm7qurUVREotqSluSo/L29d3qDhI4YOQqWhI4YNvBNfsMHeXKemXrxQfKeuPOGRVayA3JtkJKEgbPp+dXUDluddutRYLFoXGXWX6N3WFaGLbQtRSitVYNacTNSdy7AaG/HSaUEANcBoGXNdcZvZsOqQ1icBDv21/gzAoYPHH/WDW0qNR3QTYKEAEHig6o13NXbND06CQPlRtYjGNnSktRc09k1mAMDvAlDKfQjgy6fssInlfzmNAjKkDxoxHOBLdVRAIVt9j4qo+hA1w9T1aNBNTUOTTNUHLbqokE+UAfJXCIGw/IxCSL5GRUJeR40rL/UxTm4Q08H6MbCs70ObuNyIIXrINHQYInF06UUlevTjbQzTh5upiDMzMMogUtEnjPs/Y7jAHCJeB0GBHh04tC6FiB6ZFB1oArUSIoFoqhzCeAN6lHwm0T4C3VVPWvjpSMXReuWesMEcoqrmgtNBGd2noWeV0hNAz9rFeShNJxHGsPa3HXeKTk8b55hahySYHaYKKFFLpCfN8rsoaJn01CR04Gkc+5k7KVTCmClX8Q10HCrUEkVlSX+XO33oQR9609tJ516H497WSobWs5Up6TLaS10/dessIskgJSLiDlWvHVUywpkQ7hdPZqGyiEF0uVQerVcPamT1A3eKXdyI1vG9OoflrSXihZ1qqGE3nhmAgiIbRCQgPLEPtOM3UQwTLYaYYomNlpA44opnjV6jkD6id80OOrzf6BzmMD6eEa1zKyeYG1fzfEf16V6jw9XYOaar1/b2kP/IYX8oR2mcFvv2GtBV3JXgd437AQAA) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--dim: rgba(0, 0, 0, .6);--muted: rgba(0, 0, 0, .45);--faint: rgba(0, 0, 0, .3);--line: var(--color-line);--line2: var(--color-subtle);--canvas: #f9fbfc;--sh: 0 1px 3px rgba(28, 40, 66, .05), 0 6px 18px rgba(28, 40, 66, .06);--shc: 0 1px 2px rgba(28, 40, 66, .05);--panel: #f5f5f5;--panel2: rgba(0, 0, 0, .05);--bg: #ffffff;--blue: #1783ff;--blue2: #167ff7;--soft: #e8f3ff;--bd: rgba(23, 131, 255, .25);--logo: #1783ff;--bluebg: #e8f3ff;--blueln: rgba(23, 131, 255, .25);--ok: #0e7a38;--warn: #a9610a;--star: #eab308;--err: #c0392b;--hover: var(--color-hover);--r-xs: var(--radius-sm);--r-sm: var(--radius-md);--r-md: var(--radius-lg);--r-lg: var(--radius-xl);--ui-font-size: var(--ui-b2);--ui-font-size-sm: calc(var(--ui-font-size) - 1px);--ui-font-size-xs: calc(var(--ui-font-size) - 2px);--ui-font-size-lg: calc(var(--ui-font-size) + 1px);--ui-font-size-xl: calc(var(--ui-font-size) + 2px);--content-font-size: var(--md-b1);--code-font-size: calc(var(--content-font-size) - 2px);--mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--sans: var(--font-ui);color-scheme:light dark}html[data-color-scheme=light]{color-scheme:light}html[data-color-scheme=system]{color-scheme:light dark}html[data-color-scheme=dark]{color-scheme:dark;--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--dim: rgba(255, 255, 255, .56);--muted: rgba(255, 255, 255, .42);--faint: rgba(255, 255, 255, .26);--panel: #1f1f1f;--panel2: #121212;--bg: #121212;--blue: #1a88ff;--blue2: #258eff;--soft: rgba(26, 136, 255, .1);--bd: rgba(26, 136, 255, .28);--logo: #1a88ff;--bluebg: #292929;--blueln: rgba(255, 255, 255, .05);--ok: #3fb950;--warn: #d29922;--star: #facc15;--err: #f85149;--hover: var(--color-hover);--canvas: #161717;--sh: 0 1px 3px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .4);--shc: 0 1px 2px rgba(0, 0, 0, .35)}}:root{--color-bg: #ffffff;--color-surface: #f5f5f5;--color-surface-raised: #ffffff;--color-surface-overlay: #ffffff;--color-surface-sunken: #f5f5f5;--color-inline-code-bg: rgba(0, 0, 0, .03);--color-well: #f5f5f5;--color-surface-deep: #f5f5f5;--color-media-alpha-bg-1: color-mix(in srgb, var(--color-bg) 52%, var(--color-text) 48%);--color-media-alpha-bg-2: color-mix(in srgb, var(--color-bg) 42%, var(--color-text) 58%);--media-alpha-canvas: conic-gradient( var(--color-media-alpha-bg-1) 25%, var(--color-media-alpha-bg-2) 0 50%, var(--color-media-alpha-bg-1) 0 75%, var(--color-media-alpha-bg-2) 0 ) 0 0 / 16px 16px;--color-text: rgba(0, 0, 0, .9);--color-text-strong: #000000;--color-text-muted: rgba(0, 0, 0, .6);--color-text-faint: rgba(0, 0, 0, .45);--color-text-on-accent: #ffffff;--color-line: rgba(0, 0, 0, .13);--color-subtle: rgba(0, 0, 0, .05);--color-line-strong: rgba(0, 0, 0, .15);--color-scrim: rgba(0, 0, 0, .4);--color-scrim-strong: rgba(0, 0, 0, .6);--color-text-on-scrim: #ffffff;--color-selected: rgba(0, 0, 0, .05);--color-selected-hover: rgba(0, 0, 0, .08);--color-hover: rgba(0, 0, 0, .03);--color-sidebar-bg: #f9fbfc;--color-user-bubble-bg: #f5f5f5;--color-accent: #1783ff;--color-accent-hover: #167ff7;--color-accent-soft: #e8f3ff;--color-accent-bd: rgba(23, 131, 255, .25);--color-success: #0e7a38;--color-success-soft: #e7f6ee;--color-success-bd: #bfe3cc;--color-warning: #a9610a;--color-warning-soft: #fbf1e0;--color-warning-bd: #f0d9b8;--color-danger: #c0392b;--color-danger-soft: #fbeaea;--color-danger-bd: #f0cccc;--color-diff-add-bg: rgba(22, 196, 86, .25);--color-diff-del-bg: rgba(255, 56, 73, .25);--color-done: #8250df;--color-done-soft: #f3e8ff;--color-done-bd: #e0ccff;--color-info: #1783ff;--color-term-magenta: #8250df;--color-term-cyan: #1b7c83;--color-term-black: #24292f;--space-05: 2px;--space-1: 4px;--space-1-5: 6px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--radius-xs: 4px;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-2xl: 20px;--radius-composer: 32px;--corner-shape-composer: superellipse(1.5);--radius-menu-row: var(--radius-sm);--corner-shape-menu: var(--corner-shape-composer);--color-menu-bg-frost: color-mix(in srgb, var(--color-bg) 70%, transparent);--color-menu-scrollbar: color-mix(in srgb, var(--color-text) 16%, transparent);--color-menu-scrollbar-hover: color-mix(in srgb, var(--color-text) 48%, transparent);--radius-full: 999px;--menu-scroll-fade: var(--space-5);--menu-row-hug: var(--space-1-5);--menu-rows-seam: 1px;--menu-row-gap-icon: 7px;--menu-row-padding-block: var(--space-05);--menu-row-padding-inline: calc(var(--space-4) - var(--space-3) + var(--menu-row-hug));--menu-row-touch-padding-block: 11px;--menu-scrollbar-width: 3px;--menu-scrollbar-edge: calc(var(--menu-row-hug) + var(--p-hairline) - var(--menu-scrollbar-width));--menu-scrollbar-track-inset: calc(var(--radius-lg) - var(--space-1-5));--menu-scrollbar-thumb-min: 24px;--att-chip-pad-left: 5px;--wm-x-size: calc(var(--p-ic-sm) + var(--space-1));--wm-x-ring: var(--space-1-5);--z-base: 0;--z-raised: 1;--z-sticky: 100;--z-dropdown: 200;--z-overlay: 300;--z-modal: 400;--z-modal-dropdown: 500;--z-toast: 600;--z-tooltip: 650;--z-max: 9999;--shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);--shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);--shadow-menu: 0 6px 18px lch(0% 0 0 / .02), 0 3px 9px lch(0% 0 0 / .04), 0 1px 1px lch(0% 0 0 / .04);--color-menu-bg: rgba(255, 255, 255, .95);--p-menu-backdrop: blur(24px) saturate(1.8);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(16, 24, 40, .07), 0 2px 4px rgba(16, 24, 40, .05);--shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 4px 10px rgba(16, 24, 40, .08);--shadow-xl: 0 24px 64px rgba(16, 24, 40, .18), 0 8px 20px rgba(16, 24, 40, .1);--ease-out: cubic-bezier(.16, 1, .3, 1);--ease-in-out: cubic-bezier(.4, 0, .2, 1);--duration-fast: .12s;--duration-base: .16s;--duration-slow: .26s;--duration-hover-intent: .25s;--duration-tooltip: .15s;--duration-spin: .7s;--duration-flash: 1.2s;--motion-panel-shift: 2px;--motion-panel-scale: .97;--color-composer-bg: #ffffff;--color-composer-line: rgba(0, 0, 0, .13);--color-composer-focus-line: rgba(0, 0, 0, .25);--color-send-bg: rgba(0, 0, 0, .9);--color-send-bg-hover: #252525;--color-send-icon: #ffffff;--color-stop-glyph: var(--color-danger);--color-send-bg-disabled: rgba(0, 0, 0, .05);--color-send-icon-disabled: rgba(0, 0, 0, .27);--opacity-send-disabled: 1;--shadow-send: 0 7px 16px -13px rgba(0, 0, 0, .38), 0 1px 2px rgba(0, 0, 0, .07);--shadow-send-hover: 0 8px 18px -13px rgba(0, 0, 0, .42), 0 1px 3px rgba(0, 0, 0, .09);--composer-send-icon-size: 28px;--font-ui-latin: "Schibsted Grotesk Variable", "Helvetica Neue", Arial;--font-ui: var(--font-ui-latin), "Noto Sans SC Variable", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-display: var(--font-ui);--font-kbd: "Schibsted Grotesk Variable", system-ui, sans-serif;--font-mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;--text-2xs: calc(var(--ui-c1) - 1px);--text-xs: var(--ui-c1);--text-sm: calc(var(--ui-b2) - 1px);--text-base: var(--ui-b2);--text-lg: var(--ui-t2);--text-xl: var(--ui-t1);--text-2xl: var(--ui-t0);--leading-solid: 1;--leading-tight: 1.25;--leading-caption: 1.4;--leading-normal: 1.5;--leading-prose: 1.6;--leading-relaxed: 1.7;--weight-regular: 400;--weight-caption: 450;--weight-option-label: 475;--weight-medium: 500;--weight-ui-strong: 525;--weight-section-label: 600;--weight-semibold: 700;--ui-shift: calc(var(--base-font, 14px) - 14px);--md-shift: var(--ui-shift);--ui-t0: min(calc(20px + var(--ui-shift)), 24px);--ui-t1: min(calc(18px + var(--ui-shift)), 22px);--ui-t2: calc(16px + var(--ui-shift));--ui-b1: calc(15px + var(--ui-shift));--ui-b2: calc(14px + var(--ui-shift));--ui-c1: calc(12px + var(--ui-shift));--ui-c2: calc(10px + var(--ui-shift));--md-h1: calc(22px + var(--md-shift));--md-h2: calc(20px + var(--md-shift));--md-h3: calc(18px + var(--md-shift));--md-b1: calc(14px + var(--md-shift));--md-b2: calc(13px + var(--md-shift));--md-b3: calc(13px + var(--md-shift));--p-focus-ring: 0 0 0 3px var(--color-accent-soft);--p-focus-ring-strong: 0 0 0 3px var(--color-accent-soft), 0 0 0 1px var(--color-accent);--p-selection: rgba(23, 131, 255, .2);--p-ic-sm: 14px;--p-ic-md: 16px;--p-ring-stroke: 1.5px;--p-ic-lg: 20px;--p-empty-ico: 28px;--p-hairline: .5px;--p-findring-w: 2px;--p-scroll-seam-h: 18px;--icon-button-sm: 26px;--touch-target-min: 44px;--p-chip-num: 20px;--p-sidebar-w: 264px;--p-content-max: 760px;--p-content-wide: 920px;--p-table-max: 1040px;--p-table-cell-max: 700px;--p-findbar-w: 340px;--p-dock-panel-h: 320px;--p-subagent-card-min: 180px;--p-slash-menu-h: 228px;--p-mention-menu-h: 296px;--p-mention-tip-w: 320px;--p-mention-tip-vmargin: var(--space-3);--p-mention-tip-spinner-lift: -.1em;--opacity-stale: .55;--p-add-menu-h: var(--p-slash-menu-h);--p-bp-sm: 640px;--p-bp-md: 980px}:root,html[data-font-scale=medium]{--base-font: 14px}html[data-font-scale=small]{--base-font: 12px}html[data-font-scale=large]{--base-font: 16px}html[data-font-scale=xlarge]{--base-font: 18px}.text-ui-t0{font-size:var(--ui-t0);line-height:round(calc(var(--ui-t0) * 1.4),1px)}.text-ui-t1{font-size:var(--ui-t1);line-height:round(calc(var(--ui-t1) * 1.44),1px)}.text-ui-t2{font-size:var(--ui-t2);line-height:round(calc(var(--ui-t2) * 1.5),1px)}.text-ui-b1{font-size:var(--ui-b1);line-height:round(calc(var(--ui-b1) * 1.47),1px)}.text-ui-b2{font-size:var(--ui-b2);line-height:round(calc(var(--ui-b2) * 1.42),1px)}.text-ui-c1{font-size:var(--ui-c1);line-height:round(calc(var(--ui-c1) * 1.5),1px)}.text-ui-c2{font-size:var(--ui-c2);line-height:round(calc(var(--ui-c2) * 1.4),1px)}.text-md-h1{font-size:var(--md-h1);line-height:round(calc(var(--md-h1) * 1.63),1px)}.text-md-h2{font-size:var(--md-h2);line-height:round(calc(var(--md-h2) * 1.6),1px)}.text-md-h3{font-size:var(--md-h3);line-height:round(calc(var(--md-h3) * 1.56),1px)}.text-md-b1{font-size:var(--md-b1);line-height:round(calc(var(--md-b1) * 1.625),1px)}.text-md-b2{font-size:var(--md-b2);line-height:round(calc(var(--md-b2) * 1.6),1px)}.text-md-b3{font-size:var(--md-b3);line-height:round(calc(var(--md-b3) * 1.57),1px)}html[data-color-scheme=dark]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-info: #1a88ff;--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-bg: #121212;--color-surface: #1f1f1f;--color-surface-raised: #292929;--color-surface-overlay: rgba(255, 255, 255, .1);--color-surface-sunken: #121212;--color-inline-code-bg: rgba(255, 255, 255, .1);--color-well: #1f1f1f;--color-surface-deep: #0d0d0d;--color-text: rgba(255, 255, 255, .84);--color-text-strong: #ffffff;--color-text-muted: rgba(255, 255, 255, .56);--color-text-faint: rgba(255, 255, 255, .42);--color-line: rgba(255, 255, 255, .12);--color-subtle: rgba(255, 255, 255, .05);--color-line-strong: rgba(255, 255, 255, .18);--color-scrim: rgba(0, 0, 0, .6);--color-scrim-strong: rgba(0, 0, 0, .75);--color-selected: rgba(255, 255, 255, .1);--color-selected-hover: rgba(255, 255, 255, .14);--color-hover: rgba(255, 255, 255, .05);--color-sidebar-bg: #0d0d0d;--color-user-bubble-bg: #292929;--color-accent: #1a88ff;--color-accent-hover: #258eff;--color-accent-soft: rgba(26, 136, 255, .1);--color-accent-bd: rgba(26, 136, 255, .28);--p-selection: rgba(26, 136, 255, .2);--color-success: #3fb950;--color-success-soft: rgba(63, 185, 80, .14);--color-success-bd: rgba(63, 185, 80, .28);--color-warning: #d29922;--color-warning-soft: rgba(210, 153, 34, .14);--color-warning-bd: rgba(210, 153, 34, .28);--color-danger: #f85149;--color-danger-soft: rgba(248, 81, 73, .14);--color-danger-bd: rgba(248, 81, 73, .28);--color-diff-add-bg: rgba(63, 185, 80, .14);--color-diff-del-bg: rgba(248, 81, 73, .14);--color-done: #a371f7;--color-done-soft: rgba(163, 113, 247, .14);--color-done-bd: rgba(163, 113, 247, .28);--color-term-magenta: #d2a8ff;--color-term-cyan: #76e3ea;--color-term-black: #484f58;--color-info: #1a88ff;--color-composer-bg: #1f1f1f;--color-composer-line: rgba(255, 255, 255, .12);--color-composer-focus-line: rgba(255, 255, 255, .25);--color-send-bg: rgba(255, 255, 255, .84);--color-send-bg-hover: rgba(255, 255, 255, .848);--color-send-icon: #1f1f1f;--color-stop-glyph: color-mix(in srgb, var(--color-danger) 72%, transparent);--color-send-bg-disabled: rgba(255, 255, 255, .1);--color-send-icon-disabled: rgba(255, 255, 255, .28);--shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .18);--shadow-menu: 0 6px 18px rgba(0, 0, 0, .2), 0 3px 9px rgba(0, 0, 0, .24), 0 1px 1px rgba(0, 0, 0, .24);--color-menu-bg: rgba(41, 41, 41, .95);--shadow-input: 0 5px 16px -4px rgba(0, 0, 0, .07);--shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 2px 4px rgba(0, 0, 0, .24);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .34), 0 4px 10px rgba(0, 0, 0, .28);--shadow-xl: 0 24px 64px rgba(0, 0, 0, .42), 0 8px 20px rgba(0, 0, 0, .32)}}:root{--color-sidebar-tint: rgba(255, 255, 255, .4)}html[data-color-scheme=dark]{--color-sidebar-tint: rgba(0, 0, 0, .25)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-sidebar-tint: rgba(0, 0, 0, .25)}}:root{--color-search-match: #ffe066;--color-search-match-current: #ffc531}html[data-color-scheme=dark]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55)}@media(prefers-color-scheme:dark){html[data-color-scheme=system]{--color-search-match: rgba(255, 197, 49, .3);--color-search-match-current: rgba(255, 197, 49, .55)}}::highlight(kimi-transcript-search){background-color:var(--color-search-match)}::highlight(kimi-transcript-search-current){background-color:var(--color-search-match-current)}.mention-pill{display:inline-flex;align-items:baseline;gap:var(--space-05);color:var(--color-text-muted);font-weight:var(--weight-ui-strong);white-space:nowrap;text-decoration:none;vertical-align:baseline;padding-inline:var(--space-05);transition:color var(--duration-fast) var(--ease-out)}.mention-pill:hover{color:var(--color-text)}.mention-pill:hover .mention-pill-icon{color:inherit}.mention-pill.mention-file,.mention-pill.mention-skill{cursor:pointer}.mention-pill.mention-file:hover,.mention-pill.mention-skill:hover{text-decoration:underline}.mention-pill:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--radius-sm)}.ProseMirror .mention-pill,.ProseMirror .mention-pill:hover{cursor:text;text-decoration:none}a.mention-folder{cursor:default}.mention-pill.mention-skill.mention-inert,.mention-pill.mention-skill.mention-inert:hover{cursor:default;text-decoration:none}.mention-pill-name{max-width:24em;min-width:0;overflow:hidden;text-overflow:ellipsis}.mention-pill-icon{display:inline-flex;align-items:center;justify-content:center;width:var(--p-ic-sm);height:var(--p-ic-sm);color:var(--muted);align-self:center;flex-shrink:0}.mention-pill-icon svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block;stroke:currentColor;stroke-width:var(--p-hairline)}.mention-pill.pill-in-selection{background:var(--p-selection);border-radius:var(--radius-sm)}.mention-tip{position:fixed;z-index:var(--z-tooltip);max-width:min(var(--p-mention-tip-w),calc(100vw - 2 * var(--p-mention-tip-vmargin)));padding:var(--space-1) var(--space-2);border-radius:var(--radius-sm);background:var(--color-text);color:var(--color-bg);font-family:var(--font-ui);font-size:var(--text-xs);line-height:round(calc(var(--text-xs) * 1.5),1px);overflow-wrap:anywhere;opacity:0;transition:opacity var(--duration-fast) var(--ease-out)}.mention-tip:not(.positioned){pointer-events:none}.mention-tip.positioned{opacity:1}.mention-tip-path{display:flex;align-items:flex-start;gap:var(--space-2)}.mention-tip-path-text{min-width:0}.mention-tip-sep{color:color-mix(in srgb,currentColor 45%,transparent)}.mention-tip-base{font-weight:var(--weight-semibold)}.mention-tip-head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-2)}.mention-tip-name{font-weight:var(--weight-semibold);overflow-wrap:anywhere}.mention-tip-open,.mention-tip-copy{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:var(--space-05);border:none;border-radius:var(--radius-xs);background:transparent;color:color-mix(in srgb,currentColor 65%,transparent);cursor:pointer;transition:color var(--duration-fast) var(--ease-out),background-color var(--duration-fast) var(--ease-out)}.mention-tip-open:hover,.mention-tip-copy:hover{color:var(--color-bg);background:color-mix(in srgb,var(--color-bg) 14%,transparent)}.mention-tip-open:focus-visible,.mention-tip-copy:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.mention-tip-open svg,.mention-tip-copy svg{width:var(--p-ic-sm);height:var(--p-ic-sm);display:block}.mention-tip-copy{margin-top:calc(0px - var(--space-05));margin-right:calc(var(--space-05) - var(--space-2))}.mention-tip-desc{margin-top:var(--space-05);color:color-mix(in srgb,currentColor 78%,transparent);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.mention-tip-spinner{display:inline-block;width:calc(var(--space-2) + var(--space-05));height:calc(var(--space-2) + var(--space-05));margin-left:var(--space-1);vertical-align:var(--p-mention-tip-spinner-lift);border-radius:50%;border:var(--p-ring-stroke) solid color-mix(in srgb,currentColor 30%,transparent);border-top-color:currentColor;animation:mention-tip-spin var(--duration-spin) linear infinite}@keyframes mention-tip-spin{to{transform:rotate(360deg)}}.mention-pill.mention-missing,.mention-pill.mention-missing:hover{color:color-mix(in srgb,var(--color-text-muted) 55%,transparent);text-decoration:line-through}.mention-pill.mention-missing .mention-pill-icon{color:inherit}@font-face{font-family:Noto Sans SC Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/NotoSansSC_wght_-BkPpiACN.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:normal;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk_wght_-DIzGrWVg.woff2) format("woff2-variations")}@font-face{font-family:Schibsted Grotesk Variable;font-style:italic;font-display:swap;font-weight:400 900;src:url(/assets/SchibstedGrotesk-Italic_wght_-DjkBGo1z.woff2) format("woff2-variations")}*,*:before,*:after{box-sizing:border-box}html{-webkit-text-size-adjust:100%;tab-size:4}body{margin:0}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit;margin:0}p,blockquote,dl,dd,figure,pre{margin:0}ol,ul,menu{list-style:none;margin:0;padding:0}a{color:inherit;text-decoration:inherit}b,strong{font-weight:var(--weight-medium)}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button,input,optgroup,select,textarea{margin:0;padding:0;font-family:inherit;font-size:100%;line-height:inherit;color:inherit}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background:transparent;background-image:none}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block}img,video{max-width:100%;height:auto}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}table{border-collapse:collapse;border-color:inherit;text-indent:0}hr{height:0;color:inherit;border-top-width:1px}fieldset{margin:0;padding:0}legend{padding:0}dialog{padding:0}summary{display:list-item}[hidden]{display:none}@supports (interpolate-size: allow-keywords){:root{interpolate-size:allow-keywords}}:root{--safe-top: env(safe-area-inset-top, 0px);--safe-right: env(safe-area-inset-right, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--safe-left: env(safe-area-inset-left, 0px)}.kw-icon{display:inline-block;flex:none;vertical-align:-.15em}code,pre,kbd,samp,tt{font-feature-settings:"liga" 0,"calt" 0,"ss01" 0;font-variant-ligatures:none}html,body,#app{height:100%;margin:0;background:var(--bg)}#app{position:fixed;inset:0}html,body{overflow:hidden}@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--color-text) 12%,transparent) transparent}}*::-webkit-scrollbar{width:6px;height:6px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--color-text) 12%,transparent);border-radius:999px}*::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--color-text) 25%,transparent)}*::-webkit-scrollbar-corner{background:transparent}body{font-family:var(--sans);color:var(--color-text);background:var(--bg);font-size:var(--ui-font-size);font-weight:400;line-height:1.6;font-optical-sizing:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto;font-synthesis:none;text-size-adjust:100%;-webkit-hyphens:none;hyphens:none}@media(max-width:640px){.backdrop{align-items:flex-end;justify-content:stretch}.backdrop .dialog{width:100%;max-width:100%;max-height:88vh;border-radius:var(--radius-xl) var(--radius-xl) 0 0;border-left:none;border-right:none;border-bottom:none;border-top:.5px solid var(--line);box-shadow:0 -10px 30px #0000002e;animation:kimi-sheet-up .26s cubic-bezier(.4,0,.2,1)}}@keyframes kimi-sheet-up{0%{transform:translateY(101%)}to{transform:translateY(0)}}.backdrop,.ob-backdrop{min-width:100vw!important;min-height:100vh!important;min-height:100dvh!important}@keyframes kimi-card-in{0%{opacity:0;transform:translateY(8px) scale(.995)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes kimi-check-in{0%{opacity:0;transform:scale(.4)}60%{opacity:1;transform:scale(1.15)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-delay:0ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}.ch-eyes{animation:kimi-eye-look 16s ease-in-out infinite}.ch-eye{transform-box:fill-box;transform-origin:center;animation:kimi-eye-blink 11s ease-in-out infinite}@keyframes kimi-eye-look{0%,42%{transform:translate(0)}47%,53%{transform:translate(2px)}58%,80%{transform:translate(0)}84%,90%{transform:translate(-2px)}95%,to{transform:translate(0)}}@keyframes kimi-eye-blink{0%,94%,to{transform:scaleY(1)}96.5%,98%{transform:scaleY(.12)}}@media(prefers-reduced-motion:reduce){.ch-eyes,.ch-eye{animation:none}}.blink-now .ch-eye{animation:kimi-eye-blink-once .24s ease-in-out}@keyframes kimi-eye-blink-once{0%,to{transform:scaleY(1)}50%{transform:scaleY(.1)}}.md .markdown-renderer img{min-width:0;min-height:0}.app{font-size:var(--ui-font-size)}.md,.md .markdown-renderer,.md .markdown-renderer p,.md .markdown-renderer li,.u-bub,.u-bub .u-text,.a-msg .msg,.ph{font-size:var(--content-font-size)}.md .markdown-renderer blockquote,.md .markdown-renderer td,.md .markdown-renderer th{font-size:var(--md-b2)}.md,.u-bub .u-text,.a-msg .msg{text-autospace:normal}.md .code-block-container pre,.md .markstream-pre,.md .code-block-container pre code,.md .diff-pre code,.md .markdown-renderer :not(pre)>code,.md .markdown-renderer .inline-code,.a-msg code{font-size:var(--md-b3)}.md .markdown-renderer :is(h1,h2,h3,h4) :not(pre)>code,.md .markdown-renderer :is(h1,h2,h3,h4) .inline-code{font-size:.9em}.queue-item,.queue-text,.ctx-num,.model-pill,.perm-pill,.mode-pill,.compact-chip,.qcard,.qtext,.qopt,.qbtn,.srow,.srow-val{font-size:var(--ui-font-size)}.qopt-desc,.srow-label{font-size:var(--ui-font-size-sm)}.code-block-header,.code-block-header *,.diff-lang,.queue-label,.qopt-key,.qstep,.srow-sub{font-size:var(--ui-font-size-xs)}@media(max-width:640px){.u-bub .u-text,.a-msg .msg,.ph{font-size:max(16px,var(--ui-font-size-xl))}}:root{--anim-rive-spin: .4167s;--anim-leftbar: .5333s;--anim-leftbar-shrink: .2s}#bar-divider{transform-box:view-box;transform-origin:9.3px 12px;transition:transform var(--anim-leftbar-shrink) linear}svg:hover #bar-divider,button:hover #bar-divider{transform:translate(-1.5px) scaleY(.5)}#bar-arrow{transform-box:view-box;transform-origin:0 0;transform:translate(63.95833%,50.625%) scale(0)}svg:hover #bar-arrow,button:hover #bar-arrow{animation:leftbar-arrow var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow{0%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:0}3.125%{transform:translate(62.97083%,50.625%) scale(-.6);opacity:1}15.625%{transform:translate(59.0125%,50.625%) scale(-1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(-1);opacity:1}}#bar-arrow-expand{transform-box:view-box;transform-origin:0 0;transform:translate(52.08333%,50.625%) scale(0)}svg:hover #bar-arrow-expand,button:hover #bar-arrow-expand{animation:leftbar-arrow-expand var(--anim-leftbar) linear 1 forwards}@keyframes leftbar-arrow-expand{0%{transform:translate(37.02917%,50.625%) scale(.6);opacity:0}3.125%{transform:translate(37.02917%,50.625%) scale(.6);opacity:1}15.625%{transform:translate(40.9875%,50.625%) scale(1);opacity:1}37.5%{transform:translate(52.08333%,50.625%) scale(1);opacity:1}to{transform:translate(52.08333%,50.625%) scale(1);opacity:1}}#p1{transform-box:view-box;transform-origin:0 0}svg:hover #p1,button:hover #p1{animation:nc-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes nc-plus-spin{0%{transform:translate(11.5px,11.5px)}8%{transform:translate(11.501px,11.48px) rotate(1.1795deg) scale(1.02022)}12%{transform:translate(11.511px,11.46px) rotate(2.8374deg) scale(1.03026)}20%{transform:translate(11.562px,11.401px) rotate(8.8167deg) scale(1.05041)}24%{transform:translate(11.608px,11.361px) rotate(13.4726deg) scale(1.06017)}32%{transform:translate(11.751px,11.278px) rotate(25.9719deg) scale(1.08008)}48%{transform:translate(12.149px,11.222px) rotate(55.8418deg) scale(1.12025)}52%{transform:translate(12.235px,11.236px) rotate(62.0737deg) scale(1.12953)}60%{transform:translate(12.371px,11.276px) rotate(72.1167deg) scale(1.14954)}68%{transform:translate(12.446px,11.346px) rotate(79.3018deg) scale(1.12048)}76%{transform:translate(12.488px,11.403px) rotate(84.2633deg) scale(1.09046)}88%{transform:translate(12.509px,11.464px) rotate(88.52deg) scale(1.04535)}to{transform:translate(12.5px,11.5px) rotate(90deg)}}#af-p1{transform-box:view-box;transform-origin:18.4px 16.3px}svg:hover #af-p1,button:hover #af-p1{animation:folder-plus-spin var(--anim-rive-spin) linear 1 forwards}@keyframes folder-plus-spin{0%{transform:none}8%{transform:rotate(1.1795deg) scale(1.02022)}12%{transform:rotate(2.8374deg) scale(1.03026)}20%{transform:rotate(8.8167deg) scale(1.05041)}24%{transform:rotate(13.4726deg) scale(1.06017)}32%{transform:rotate(25.9719deg) scale(1.08008)}48%{transform:rotate(55.8418deg) scale(1.12025)}52%{transform:rotate(62.0737deg) scale(1.12953)}60%{transform:rotate(72.1167deg) scale(1.14954)}68%{transform:rotate(79.3018deg) scale(1.12048)}76%{transform:rotate(84.2633deg) scale(1.09046)}88%{transform:rotate(88.52deg) scale(1.04535)}to{transform:rotate(90deg)}} diff --git a/apps/kimi-code/dist-web/assets/index-Cj2NmNUG.js b/apps/kimi-code/dist-web/assets/index-DXophRCW.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index-Cj2NmNUG.js rename to apps/kimi-code/dist-web/assets/index-DXophRCW.js index 45de3cbc3..4e1444f7b 100644 --- a/apps/kimi-code/dist-web/assets/index-Cj2NmNUG.js +++ b/apps/kimi-code/dist-web/assets/index-DXophRCW.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-wuJEF9t-.js","assets/index-DcbRorFd.js","assets/index-_5lXYMaO.js","assets/index-C_ObXpF5.css"])))=>i.map(i=>d[i]); -import{bR as Q}from"./index-_5lXYMaO.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-wuJEF9t-.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t<e.length;t++)e.charCodeAt(t)===10&&i++;return i}function de(e){return new K(e)}var G=class{options;state="idle";generation=0;original="";modified="";container;shell;surface;finalizedSurface;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e,i=this.original,t=this.modified){if(this.state==="disposed")throw new Error("Cannot mount a disposed diff stream. Create a new controller instead.");++this.generation,this.original=i,this.modified=t,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.setState("mounting"),this.container=e;const{shell:n,surface:r}=$(e,this.options.maxHeight);this.shell=n,this.surface=r,this.renderPre(),this.setState("streaming")}update(e,i){if(this.state==="disposed")throw new Error("Cannot update a disposed diff stream");return this.original=e,this.modified=i,this.finalizedSurface?this.finalizedSurface.updateDiff(this.asFile(e),this.asFile(i)):(this.renderPre(),this.emitRender(),Promise.resolve())}finalize(e){if(this.state==="finalized")return Promise.resolve(this.finalizedSurface);if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CDF-FRTI.js","assets/index-C6iX4-LJ.js","assets/index-yKYHPeXU.js","assets/index-DBtc5buz.css"])))=>i.map(i=>d[i]); +import{bR as Q}from"./index-yKYHPeXU.js";var Y=class{chunks=[];cached="";dirty=!1;length=0;append(e){e&&(this.chunks.push(e),this.length+=e.length,this.dirty=!0,this.chunks.length>256&&this.compact())}clear(e=""){this.chunks=e?[e]:[],this.cached=e,this.dirty=!1,this.length=e.length}toString(){return this.dirty&&(this.cached=this.chunks.join(""),this.dirty=!1),this.cached}compact(){this.chunks=[this.chunks.join("")]}};function $(e,i){e.replaceChildren();const t=document.createElement("div");t.className="stream-diffs-shell",t.style.overflow="auto",t.style.maxHeight=typeof i=="number"?`${i}px`:i??"none";const n=document.createElement("div");return n.className="stream-diffs-surface",t.appendChild(n),e.appendChild(t),{shell:t,surface:n}}function E(e,i,t){return{name:e,contents:i,lang:t}}var Z=class{input;container;surface;instance;diff;selectedLines=null;disposed=!1;renderListeners=new Set;visualRevision=0;visualReadyPromise=Promise.resolve(!1);resolveVisualReady;constructor(e){this.input=e}async mount(e){this.disposed=!1,this.container=e,this.surface=$(e).surface,await this.render()}async update(e){this.input=e,this.surface&&await this.render(!0)}updateFile(e,i){return this.update({kind:"file",file:e,annotations:i,options:this.input.kind==="file"?this.input.options:void 0,workerManager:this.input.kind==="file"?this.input.workerManager:void 0})}updateDiff(e,i,t){return this.update({kind:"diff",oldFile:e,newFile:i,annotations:t,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updateParsedDiff(e,i){return this.update({kind:"diff",fileDiff:e,annotations:i,options:z(this.input)?this.input.options:void 0,workerManager:z(this.input)?this.input.workerManager:void 0})}updatePatch(e,i=0,t,n=0){return this.update({kind:"patch",patch:e,patchIndex:n,fileIndex:i,annotations:t,options:this.input.kind==="patch"?this.input.options:void 0,workerManager:this.input.kind==="patch"?this.input.workerManager:void 0})}updateMergeConflict(e,i){return this.update({kind:"merge-conflict",file:e,annotations:i,options:this.input.kind==="merge-conflict"?this.input.options:void 0,workerManager:this.input.kind==="merge-conflict"?this.input.workerManager:void 0})}setSelectedLines(e){this.selectedLines=e,this.instance?.setSelectedLines(e)}setAnnotations(e){this.instance&&(this.input.kind==="file"?(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)):(this.input.annotations=e,this.instance.setLineAnnotations(this.input.annotations)),this.emitRender())}setThemeType(e){this.input.options?this.input.options={...this.input.options,themeType:e}:this.input.options={themeType:e},this.instance?.setThemeType(e)}async setTheme(e){this.input.options?this.input.options={...this.input.options,theme:e}:this.input.options={theme:e},this.surface&&await this.render(!1)}async setOptions(e){this.input.options=e,this.surface&&await this.render(!1)}acceptReject(e,i){if(!z(this.input)||!this.diff)throw new Error("acceptReject() requires a diff view");const{diffAcceptRejectHunk:t}=this.module;return this.diff=t(this.diff,e,i),this.instance.render({fileDiff:this.diff,containerWrapper:this.surface,lineAnnotations:this.input.annotations}),this.diff}resolveConflict(e,i){if(this.input.kind!=="merge-conflict")throw new Error("resolveConflict() requires a merge-conflict view");const t=this.instance.resolveConflict(e,i);return t&&(this.input.file=t.file,this.diff=t.fileDiff),t?.file}getResolvedFile(){if(!z(this.input)||!this.diff||this.diff.isPartial)return;const e="newFile"in this.input?this.input.newFile:void 0;return{name:e?.name??this.diff.name,contents:this.diff.additionLines.join(""),lang:e?.lang??this.diff.lang}}getDiff(){return this.diff}getInput(){return this.input}getNativeInstance(){return this.instance}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}async whenVisualReady(){let e=this.visualReadyPromise;for(;;){const i=await e;if(e===this.visualReadyPromise)return i;e=this.visualReadyPromise}}dispose(){this.disposed=!0,this.invalidateVisualReady(),this.instance?.cleanUp(),this.instance=void 0,this.surface=void 0,this.container?.replaceChildren(),this.container=void 0,this.renderListeners.clear()}module;async render(e=!0){const i=this.surface;if(!i||this.disposed)return;const t=this.beginVisualRender(),n=this.module??=await Q(()=>import("./index-CDF-FRTI.js"),__vite__mapDeps([0,1,2,3]));if(this.disposed||i!==this.surface)return;if(this.instance?.cleanUp(),i.replaceChildren(),this.input.kind==="file"){const o=new n.File(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines),this.diff=void 0;return}if(z(this.input)){if(e||!this.diff)if(this.input.kind==="patch"){const a=n.parsePatchFiles(this.input.patch)[this.input.patchIndex??0];if(!a)throw new Error(`Patch does not contain patch index ${this.input.patchIndex??0}`);const d=a.files[this.input.fileIndex??0];if(!d)throw new Error(`Patch does not contain file index ${this.input.fileIndex??0}`);this.diff=d}else"fileDiff"in this.input?this.diff=this.input.fileDiff:this.diff=n.parseDiffFromFile(this.input.oldFile,this.input.newFile,this.input.options?.parseDiffOptions);const o=new n.FileDiff(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);o.render({fileDiff:this.diff,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=o,o.setSelectedLines(this.selectedLines);return}const r=new n.UnresolvedFile(b(this.input.options,()=>this.markVisualReady(t)),this.input.workerManager);r.render({file:this.input.file,containerWrapper:i,lineAnnotations:this.input.annotations}),this.instance=r,r.setSelectedLines(this.selectedLines),this.diff=r.fileDiff}emitRender(){for(const e of this.renderListeners)e()}beginVisualRender(){this.resolveVisualReady?.(!1);const e=++this.visualRevision;return this.visualReadyPromise=new Promise(i=>{this.resolveVisualReady=i}),e}markVisualReady(e){this.disposed||e!==this.visualRevision||(this.resolveVisualReady?.(!0),this.resolveVisualReady=void 0,this.emitRender())}invalidateVisualReady(){this.visualRevision++,this.resolveVisualReady?.(!1),this.resolveVisualReady=void 0}};function x(e){return new Z(e)}function ee(e){return!e||e.useTokenTransformer===!0||!e.onTokenClick&&!e.onTokenEnter&&!e.onTokenLeave?e:{...e,useTokenTransformer:!0}}function b(e,i){const t=ee(e),n=t?.onPostRender;return{...t,onPostRender(...r){n?.(...r),i()}}}function z(e){return e.kind==="diff"||e.kind==="patch"}var K=class{options;state="idle";stats={characters:0,lines:0,writes:0,resets:0,renderMode:"plain-text",overflowed:!1};text=new Y;pending=[];scheduled;generation=0;container;shell;surface;finalizedSurface;plainText;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e){if(this.state==="disposed")throw new Error("Cannot mount a disposed code stream. Create a new controller instead.");++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.setState("mounting"),this.container=e;const{shell:i,surface:t}=$(e,this.options.maxHeight);this.shell=i,this.surface=t,this.mountPlainText(t),this.stats.startedAt??=performance.now(),this.setState("streaming")}append(e){if(e){if(this.state==="finalized"||this.state==="finalizing"||this.state==="disposed")throw new Error(`Cannot append while stream is ${this.state}`);this.text.append(e),this.stats.characters=this.text.length,this.stats.lines+=ie(e)+(this.stats.lines===0?1:0),this.pending.push(e),this.scheduleFlush()}}updateSnapshot(e){const i=this.text.toString();if(e.startsWith(i)){this.append(e.slice(i.length));return}const t=this.options.nonAppendBehavior??"reset";if(t!=="ignore"){if(t==="throw")throw new Error("Snapshot violates the append-only stream contract");return this.reset(e)}}async consume(e){try{if(Symbol.asyncIterator in e)for await(const i of e)this.append(i);else{const i=e.getReader();try{for(;;){const{done:t,value:n}=await i.read();if(t)break;this.append(n)}}finally{i.releaseLock()}}}catch(i){throw this.fail(i),i}}async flush(){if(this.cancelScheduledFlush(),!this.pending.length)return;const e=this.shouldFollowViewport(),i=this.pending.join("");this.pending.length=0,this.plainText?.append(i),this.stats.writes++,this.followViewport(e),this.emitRender()}finalize(e={view:"stream"}){if(this.state==="finalized")return Promise.resolve();if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed code stream");const i=this.generation;if(this.setState("finalizing"),await this.flush(),i!==this.generation)return;if(this.stats.finalizedAt=performance.now(),!e.view||e.view==="stream"){this.setState("finalized");return}const t=this.surface;if(!t)throw new Error("Mount the stream before finalizing to a file or diff view");const n=this.options.fileName??`code.${this.options.language??"txt"}`,r=E(n,this.getText(),this.options.language);let o;if(e.view==="file"){const{annotations:c,workerManager:g,view:S,...T}=e;o=x({kind:"file",file:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...T},workerManager:g??this.options.workerManager})}else{const{annotations:c,original:g,workerManager:S,view:T,...L}=e;o=x({kind:"diff",oldFile:E(n,g,this.options.language),newFile:r,annotations:c,options:{theme:this.options.theme,themeType:this.options.themeType,...L},workerManager:S??this.options.workerManager})}const a=document.createElement("div");if(a.className="stream-diffs-finalized",await o.mount(a),i!==this.generation){o.dispose();return}const d=this.shell,p=d?.scrollTop??0,h=d?d.scrollHeight-d.scrollTop-d.clientHeight:0;t.replaceWith(a),this.surface=a,this.plainText=void 0,this.finalizedSurface=o,this.finalizedRenderSubscription=o.onDidRender(()=>this.emitRender()),d&&(this.options.autoScroll==="always"||this.options.autoScroll!=="never"&&h<=(this.options.autoScrollThresholdPx??32)?d.scrollTop=d.scrollHeight:d.scrollTop=p),this.setState("finalized"),this.emitRender()}async reset(e=""){const i=this.container;++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.plainText=void 0,this.pending=[],this.finalizePromise=void 0,this.text.clear(),this.stats.resets++,this.stats.characters=0,this.stats.lines=0,this.stats.renderMode="plain-text",this.stats.overflowed=!1,this.setState("idle"),e&&this.append(e),i&&await this.mount(i)}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e===this.options.language||(this.options.language=e,!this.finalizedSurface))return;const i=this.finalizedSurface.getInput();i.kind==="file"?await this.finalizedSurface.updateFile({...i.file,lang:e},i.annotations):i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations)}getText(){return this.text.toString()}getState(){return this.state}getStats(){return{...this.stats}}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.cancelScheduledFlush(),this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.plainText=void 0,this.container=void 0,this.surface=void 0,this.shell=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}scheduleFlush(){if(this.scheduled!=null||!this.plainText)return;const e=this.options.flushStrategy??"raf";e==="raf"&&typeof requestAnimationFrame=="function"?this.scheduled=requestAnimationFrame(()=>void this.flush()):this.scheduled=globalThis.setTimeout(()=>void this.flush(),e==="raf"?0:e.intervalMs)}cancelScheduledFlush(){this.scheduled!=null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.scheduled),clearTimeout(this.scheduled),this.scheduled=void 0)}shouldFollowViewport(){const e=this.shell;return!e||this.options.autoScroll==="never"?!1:this.options.autoScroll==="always"?!0:e.scrollHeight-e.scrollTop-e.clientHeight<=(this.options.autoScrollThresholdPx??32)}followViewport(e=this.shouldFollowViewport()){this.shell&&e&&(this.shell.scrollTop=this.shell.scrollHeight)}mountPlainText(e){const i=document.createElement("pre");i.className="stream-diffs-plain-text",i.dataset.streamDiffsState="streaming",i.style.margin="0",i.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",i.style.overflowWrap=this.options.wrap?"anywhere":"normal",i.textContent=this.getText(),e.replaceChildren(i),this.plainText=i}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}fail(e){this.state!=="disposed"&&(this.setState("error"),this.options.onError?.(e))}};function ie(e){let i=0;for(let t=0;t<e.length;t++)e.charCodeAt(t)===10&&i++;return i}function de(e){return new K(e)}var G=class{options;state="idle";generation=0;original="";modified="";container;shell;surface;finalizedSurface;finalizePromise;renderListeners=new Set;finalizedRenderSubscription;constructor(e={}){this.options=e}async mount(e,i=this.original,t=this.modified){if(this.state==="disposed")throw new Error("Cannot mount a disposed diff stream. Create a new controller instead.");++this.generation,this.original=i,this.modified=t,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.setState("mounting"),this.container=e;const{shell:n,surface:r}=$(e,this.options.maxHeight);this.shell=n,this.surface=r,this.renderPre(),this.setState("streaming")}update(e,i){if(this.state==="disposed")throw new Error("Cannot update a disposed diff stream");return this.original=e,this.modified=i,this.finalizedSurface?this.finalizedSurface.updateDiff(this.asFile(e),this.asFile(i)):(this.renderPre(),this.emitRender(),Promise.resolve())}finalize(e){if(this.state==="finalized")return Promise.resolve(this.finalizedSurface);if(this.finalizePromise)return this.finalizePromise;const i=this.performFinalize(e).finally(()=>{this.finalizePromise===i&&(this.finalizePromise=void 0)});return this.finalizePromise=i,i}async performFinalize(e){if(this.state==="disposed")throw new Error("Cannot finalize a disposed diff stream");const i=this.surface;if(!i)throw new Error("Mount the diff stream before finalizing it");const t=this.generation;this.setState("finalizing");const n=x({kind:"diff",oldFile:this.asFile(this.original),newFile:this.asFile(this.modified),annotations:e,options:{...this.options,diffStyle:this.options.diffStyle??"unified"},workerManager:this.options.workerManager}),r=document.createElement("div");if(r.className="stream-diffs-finalized",await n.mount(r),t!==this.generation){n.dispose();return}const o=this.shell,a=o?.scrollTop??0;return i.replaceWith(r),this.surface=r,this.finalizedSurface=n,this.finalizedRenderSubscription=n.onDidRender(()=>this.emitRender()),o&&(o.scrollTop=a),this.setState("finalized"),this.emitRender(),n}setThemeType(e){this.options.themeType=e,this.finalizedSurface?.setThemeType(e)}async setTheme(e){this.options.theme=e,this.finalizedSurface&&await this.finalizedSurface.setTheme(e)}async setLanguage(e){if(e!==this.options.language){if(this.options.language=e,this.finalizedSurface){const i=this.finalizedSurface.getInput();i.kind==="diff"&&"oldFile"in i&&await this.finalizedSurface.updateDiff({...i.oldFile,lang:e},{...i.newFile,lang:e},i.annotations);return}this.renderPre()}}getOriginal(){return this.original}getModified(){return this.modified}getState(){return this.state}getElement(){return this.shell}getFinalizedSurface(){return this.finalizedSurface}onDidRender(e){return this.renderListeners.add(e),{dispose:()=>this.renderListeners.delete(e)}}dispose(){++this.generation,this.finalizedSurface?.dispose(),this.finalizedRenderSubscription?.dispose(),this.container?.replaceChildren(),this.container=void 0,this.shell=void 0,this.surface=void 0,this.finalizedSurface=void 0,this.finalizedRenderSubscription=void 0,this.finalizePromise=void 0,this.renderListeners.clear(),this.setState("disposed")}renderPre(){const e=this.surface;if(!e||this.finalizedSurface)return;const i=document.createElement("div");i.className=`stream-diffs-diff-pre stream-diffs-diff-pre--${this.options.diffStyle??"unified"}`,i.dataset.streamDiffsState="streaming",i.style.minWidth="max-content",(this.options.diffStyle??"unified")==="split"?(i.style.display="grid",i.style.gridTemplateColumns="minmax(0, 1fr) minmax(0, 1fr)",i.append(this.createPre(this.original,"deletions"),this.createPre(this.modified,"additions"))):i.append(this.createPre(te(this.original,this.modified),"unified")),e.replaceChildren(i)}createPre(e,i){const t=document.createElement("pre");return t.className=`stream-diffs-diff-pre__pane stream-diffs-diff-pre__pane--${i}`,t.dataset.side=i,t.style.margin="0",t.style.whiteSpace=this.options.wrap?"pre-wrap":"pre",t.style.overflowWrap=this.options.wrap?"anywhere":"normal",t.textContent=e,t}asFile(e){return E(this.options.fileName??`code.${this.options.language??"txt"}`,e,this.options.language)}setState(e){this.state=e,this.options.onStateChange?.(e)}emitRender(){for(const e of this.renderListeners)e()}};function te(e,i){const t=e.split(` `),n=i.split(` `);let r=0;for(;r<t.length&&r<n.length&&t[r]===n[r];)r++;let o=0;for(;o<t.length-r&&o<n.length-r&&t[t.length-o-1]===n[n.length-o-1];)o++;return[...t.slice(0,r).map(a=>` ${a}`),...t.slice(r,t.length-o).map(a=>`- ${a}`),...n.slice(r,n.length-o).map(a=>`+ ${a}`),...t.slice(t.length-o).map(a=>` ${a}`)].join(` `)}function he(e){return new G(e)}function ue(e={}){let i,t,n,r,o,a="text",d="",p="",h,c=0,g="system",S=U(e),T=q(e);const L={disableLineNumbers:e.lineNumbers===!1,overflow:e.wordWrap==="on"?"wrap":"scroll",enableLineSelection:e.enableLineSelection},M=()=>({...L,theme:S,themeType:g});async function H(s,l,u){k();const w=c;if(N(s,e),h=s,a=R(u),_(l))return V(s,l,a);if(e.stream===!1)return O(s,l,a);const f=new K({...M(),...F(e),fileName:`code.${a}`,language:a,maxHeight:e.MAX_HEIGHT,autoScroll:e.autoScrollOnUpdate===!1?"never":"near-bottom",autoScrollThresholdPx:e.autoScrollThresholdPx,workerManager:e.workerManager});if(i=f,f.append(l),await f.mount(s),w!==c||i!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>f.getText(),s,()=>f.getFinalizedSurface(),m=>f.onDidRender(m)),r}async function I(s,l,u,w){k();const f=c;N(s,e),h=s,a=R(w),d=l,p=u;let m,v;if(e.stream===!1){if(m=x({kind:"diff",oldFile:y(l),newFile:y(u),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),...F(e)}}),n=m,await m.mount(s),f!==c||n!==m||h!==s)throw m.dispose(),new Error("Editor creation was cancelled");e.onController?.(m)}else{if(v=new G({...M(),...F(e),fileName:`code.${a}`,language:a,diffStyle:e.diffStyle??(e.renderSideBySide===!1?"unified":"split"),maxHeight:e.MAX_HEIGHT,wrap:e.wordWrap==="on",workerManager:e.workerManager}),t=v,await v.mount(s,l,u),f!==c||t!==v||h!==s)throw v.dispose(),new Error("Editor creation was cancelled");e.onController?.(v)}return o=oe(()=>d,()=>p,s,()=>m??v?.getFinalizedSurface()),o}async function X(s,l=a){const u=R(l);if(_(s)){n?.getInput().kind==="merge-conflict"?(a=u,await n.updateMergeConflict(y(s),e.lineAnnotations)):h&&await V(h,s,u);return}if(e.stream===!1){n?.getInput().kind==="file"?(a=u,await n.updateFile(y(s),e.lineAnnotations)):h&&await O(h,s,u);return}if(!i){h&&await H(h,s,u);return}if(i.getState()==="finalized"){s!==i.getText()&&await i.reset(s);return}if(u!==a){a=u,await i.setLanguage(u),s!==i.getText()&&await i.reset(s);return}const w=i.getText();s.startsWith(w)?i.append(s.slice(w.length)):await i.reset(s)}async function P(s,l,u=a){if(d=s,p=l,a=R(u),t){await t.update(s,l);return}if(!n){h&&await I(h,s,l,u);return}await n.updateDiff(y(s),y(l))}function k(){c++,i?.dispose(),t?.dispose(),t||n?.dispose(),i=void 0,t=void 0,n=void 0,r=void 0,o=void 0,h=void 0}async function O(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"file",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}async function V(s,l,u){k();const w=c;h=s,a=u;const f=x({kind:"merge-conflict",file:y(l),annotations:e.lineAnnotations,workerManager:e.workerManager,options:{...M(),...F(e)}});if(n=f,await f.mount(s),w!==c||n!==f||h!==s)throw f.dispose(),new Error("Editor creation was cancelled");return e.onController?.(f),r=C(()=>B(f)??l,s,()=>f,m=>f.onDidRender(m)),r}function _(s){return e.mergeConflict===!1?!1:/^<<<<<<< .+$/m.test(s)&&/^=======$/m.test(s)&&/^>>>>>>> .+$/m.test(s)}async function J(s){if(s){if(typeof s=="string"){const l=e.themes;if(l?.[0]===s){await W(),g="dark",i?.setThemeType("dark"),t?.setThemeType("dark"),n?.setThemeType("dark");return}if(l?.[1]===s){await W(),g="light",i?.setThemeType("light"),t?.setThemeType("light"),n?.setThemeType("light");return}}T=void 0,S=s,await j(s)}}async function W(){const s=q(e);!s||s===T||(T=s,S=U(e),await j(S))}async function j(s){await i?.setTheme(s),await t?.setTheme(s),await n?.setTheme(s)}function y(s){return E(`code.${a||"txt"}`,s,a)}return{runtimeKind:"stream-diffs",createEditor:H,createDiffEditor:I,updateCode:X,appendCode(s){i?.append(s)},async finalizeCode(){if(!i||i.getState()==="finalized")return i?.getFinalizedSurface();const s=F(e);return delete s.lineAnnotations,await i.finalize({view:"file",...s,theme:S,themeType:g,annotations:e.lineAnnotations,workerManager:e.workerManager}),i.getFinalizedSurface()},async finalizeDiff(){return t&&(n=await t.finalize(e.lineAnnotations)),n},updateDiff:P,updateOriginal(s,l=a){return P(s,p,l)},updateModified(s,l=a){return P(d,s,l)},appendOriginal(s,l=a){return P(d+s,p,l)},appendModified(s,l=a){return P(d,p+s,l)},cleanupEditor:k,safeClean:k,setTheme:J,async setLanguage(s){if(a=R(s),await i?.setLanguage(a),await t?.setLanguage(a),n&&!t){const l=n.getInput();l.kind==="file"||l.kind==="merge-conflict"?await n.update({...l,file:{...l.file,lang:a}}):l.kind==="diff"&&"oldFile"in l&&await n.update({...l,oldFile:{...l.oldFile,lang:a},newFile:{...l.newFile,lang:a}})}},getCurrentTheme:()=>S,getEditor:()=>le,getEditorView:()=>r??null,getDiffEditorView:()=>o??null,getDiffModels:()=>({original:D(()=>d),modified:D(()=>n?.getResolvedFile()?.contents??t?.getModified()??p)}),getCode:()=>{const s=n?.getInput();return s?.kind==="diff"||s?.kind==="patch"?{original:d,modified:n?.getResolvedFile()?.contents??p}:s?.kind==="file"||s?.kind==="merge-conflict"?s.file.contents:t?{original:t.getOriginal(),modified:t.getModified()}:i?.getText()??null},refreshDiffPresentation:()=>n?.update(n.getInput()),whenVisualReady:async()=>{const s=h,l=c,u=n??i?.getFinalizedSurface()??t?.getFinalizedSurface();return!u||!await u.whenVisualReady()?!1:ne(s,()=>l===c&&s===h&&u===(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()),()=>se(n??i?.getFinalizedSurface()??t?.getFinalizedSurface()))}}}async function ne(e,i,t){if(!e||typeof window>"u")return!1;let n="",r,o=0;for(let a=0;a<120;a+=1){if(!i())return!1;const d=e.querySelector(".stream-diffs-shell"),p=d?.querySelector("diffs-container")?.shadowRoot?.querySelector("pre"),h=d?.getBoundingClientRect(),c=p?.textContent??"";if(h&&h.width>0&&h.height>0&&p&&t()){const g=`${Math.round(h.width)}:${Math.round(h.height)}:${p.scrollWidth}:${p.scrollHeight}:${c.length}`;if(o=p===r&&g===n?o+1:1,r=p,n=g,o>=2)return!0}else n="",r=void 0,o=0;await ae()}return!1}function se(e){if(!e)return!0;const i=e.getNativeInstance(),t=i?.fileRenderer??i?.hunksRenderer;if(!t)return!0;const n=t.renderCache;if(!n?.result)return!1;if(n.highlighted===!0)return!0;const r=e.getInput();if(R(r.kind==="file"||r.kind==="merge-conflict"?r.file.lang:"oldFile"in r?r.oldFile.lang??r.newFile.lang:e.getDiff()?.lang)==="text")return!0;const o=Number(t.getTokenizeMaxLength?.()??1e5);if(r.kind==="file"||r.kind==="merge-conflict")return re(r.file.contents)>o;const a=e.getDiff();return!!a&&Math.max(a.additionLines.length,a.deletionLines.length)>o}function R(e){return!e||/^(?:text|txt|plain|plaintext)$/i.test(e)?"text":e}function re(e){if(!e)return 0;let i=1;for(let t=0;t<e.length;t+=1)e.charCodeAt(t)===10&&(i+=1);return i}function ae(){return new Promise(e=>{let i=!1;const t=()=>{i||(i=!0,window.clearTimeout(r),window.cancelAnimationFrame(n),e())},n=window.requestAnimationFrame(t),r=window.setTimeout(t,50)})}function U(e){return e.themes?.length&&typeof e.themes[0]=="string"&&typeof e.themes[1]=="string"?{dark:e.themes[0],light:e.themes[1]}:e.theme??void 0}function q(e){if(!(typeof e.themes?.[0]!="string"||typeof e.themes?.[1]!="string"))return`${e.themes[0]} diff --git a/apps/kimi-code/dist-web/assets/index-_5lXYMaO.js b/apps/kimi-code/dist-web/assets/index-_5lXYMaO.js deleted file mode 100644 index 7522e4605..000000000 --- a/apps/kimi-code/dist-web/assets/index-_5lXYMaO.js +++ /dev/null @@ -1,652 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-DpBz6UHc.js","assets/_commonjsHelpers-CqkleIqs.js","assets/CodeBlockNode-CZYIqTV_.js","assets/safeRaf-DGuzXxDK.js","assets/index5-BHVixm2V.js","assets/index11-Cx5Yh-Ch.js","assets/DesignSystemView-C2ybIYYn.js","assets/DesignSystemView-DT_ORWRp.css","assets/rive-CeXCFBdn.js"])))=>i.map(i=>d[i]); -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();/** -* @vue/shared v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function L2(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const $n={},tf=[],Pr=()=>{},xM=()=>!1,hp=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),N2=e=>e.startsWith("onUpdate:"),gi=Object.assign,H8=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},HR=Object.prototype.hasOwnProperty,ii=(e,t)=>HR.call(e,t),Xt=Array.isArray,nf=e=>Df(e)==="[object Map]",id=e=>Df(e)==="[object Set]",P6=e=>Df(e)==="[object Date]",WR=e=>Df(e)==="[object RegExp]",hn=e=>typeof e=="function",wi=e=>typeof e=="string",_r=e=>typeof e=="symbol",si=e=>e!==null&&typeof e=="object",W8=e=>(si(e)||hn(e))&&hn(e.then)&&hn(e.catch),_M=Object.prototype.toString,Df=e=>_M.call(e),qR=e=>Df(e).slice(8,-1),F2=e=>Df(e)==="[object Object]",B2=e=>wi(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Fc=L2(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$2=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},UR=/-\w/g,Ls=$2(e=>e.replace(UR,t=>t.slice(1).toUpperCase())),KR=/\B([A-Z])/g,er=$2(e=>e.replace(KR,"-$1").toLowerCase()),D2=$2(e=>e.charAt(0).toUpperCase()+e.slice(1)),mg=$2(e=>e?`on${D2(e)}`:""),js=(e,t)=>!Object.is(e,t),sf=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},SM=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},R2=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Zg=e=>{const t=wi(e)?Number(e):NaN;return isNaN(t)?e:t};let j6;const z2=()=>j6||(j6=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),VR="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",ZR=L2(VR);function Vt(e){if(Xt(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],s=wi(i)?JR(i):Vt(i);if(s)for(const o in s)t[o]=s[o]}return t}else if(wi(e)||si(e))return e}const GR=/;(?![^(]*\))/g,QR=/:([^]+)/,YR=/\/\*[^]*?\*\//g;function JR(e){const t={};return e.replace(YR,"").split(GR).forEach(n=>{if(n){const i=n.split(QR);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function De(e){let t="";if(wi(e))t=e;else if(Xt(e))for(let n=0;n<e.length;n++){const i=De(e[n]);i&&(t+=i+" ")}else if(si(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function XR(e){if(!e)return null;let{class:t,style:n}=e;return t&&!wi(t)&&(e.class=De(t)),n&&(e.style=Vt(n)),e}const ez="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",tz=L2(ez);function MM(e){return!!e||e===""}function nz(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=xa(e[i],t[i]);return n}function xa(e,t){if(e===t)return!0;let n=P6(e),i=P6(t);if(n||i)return n&&i?e.getTime()===t.getTime():!1;if(n=_r(e),i=_r(t),n||i)return e===t;if(n=Xt(e),i=Xt(t),n||i)return n&&i?nz(e,t):!1;if(n=si(e),i=si(t),n||i){if(!n||!i)return!1;const s=Object.keys(e).length,o=Object.keys(t).length;if(s!==o)return!1;for(const r in e){const l=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(l&&!a||!l&&a||!xa(e[r],t[r]))return!1}}return String(e)===String(t)}function O2(e,t){return e.findIndex(n=>xa(n,t))}const IM=e=>!!(e&&e.__v_isRef===!0),B=e=>wi(e)?e:e==null?"":Xt(e)||si(e)&&(e.toString===_M||!hn(e.toString))?IM(e)?B(e.value):JSON.stringify(e,EM,2):String(e),EM=(e,t)=>IM(t)?EM(e,t.value):nf(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,s],o)=>(n[N9(i,o)+" =>"]=s,n),{})}:id(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>N9(n))}:_r(t)?N9(t):si(t)&&!Xt(t)&&!F2(t)?String(t):t,N9=(e,t="")=>{var n;return _r(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function iz(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** -* @vue/reactivity v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Ss;class TM{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ss&&(Ss.active?(this.parent=Ss,this.index=(Ss.scopes||(Ss.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Ss;try{return Ss=this,t()}finally{Ss=n}}}on(){++this._on===1&&(this.prevScope=Ss,Ss=this)}off(){if(this._on>0&&--this._on===0){if(Ss===this)Ss=this.prevScope;else{let t=Ss;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function sz(e){return new TM(e)}function P2(){return Ss}function Rf(e,t=!1){Ss&&Ss.cleanups.push(e)}let Ei;const F9=new WeakSet;class Gg{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ss&&(Ss.active?Ss.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,F9.has(this)&&(F9.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||NM(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,H6(this),FM(this);const t=Ei,n=ul;Ei=this,ul=!0;try{return this.fn()}finally{BM(this),Ei=t,ul=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)K8(t);this.deps=this.depsTail=void 0,H6(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?F9.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){x4(this)&&this.run()}get dirty(){return x4(this)}}let LM=0,o1,r1;function NM(e,t=!1){if(e.flags|=8,t){e.next=r1,r1=e;return}e.next=o1,o1=e}function q8(){LM++}function U8(){if(--LM>0)return;if(r1){let t=r1;for(r1=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;o1;){let t=o1;for(o1=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function FM(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function BM(e){let t,n=e.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),K8(i),oz(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}e.deps=t,e.depsTail=n}function x4(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($M(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $M(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===B1)||(e.globalVersion=B1,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!x4(e))))return;e.flags|=2;const t=e.dep,n=Ei,i=ul;Ei=e,ul=!0;try{FM(e);const s=e.fn(e._value);(t.version===0||js(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Ei=n,ul=i,BM(e),e.flags&=-3}}function K8(e,t=!1){const{dep:n,prevSub:i,nextSub:s}=e;if(i&&(i.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)K8(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function oz(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function bQe(e,t){e.effect instanceof Gg&&(e=e.effect.fn);const n=new Gg(e);t&&gi(n,t);try{n.run()}catch(s){throw n.stop(),s}const i=n.run.bind(n);return i.effect=n,i}function kQe(e){e.effect.stop()}let ul=!0;const DM=[];function Wl(){DM.push(ul),ul=!1}function ql(){const e=DM.pop();ul=e===void 0?!0:e}function H6(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ei;Ei=void 0;try{t()}finally{Ei=n}}}let B1=0;class rz{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class j2{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ei||!ul||Ei===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ei)n=this.activeLink=new rz(Ei,this),Ei.deps?(n.prevDep=Ei.depsTail,Ei.depsTail.nextDep=n,Ei.depsTail=n):Ei.deps=Ei.depsTail=n,RM(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Ei.depsTail,n.nextDep=void 0,Ei.depsTail.nextDep=n,Ei.depsTail=n,Ei.deps===n&&(Ei.deps=i)}return n}trigger(t){this.version++,B1++,this.notify(t)}notify(t){q8();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{U8()}}}function RM(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)RM(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Qg=new WeakMap,Bc=Symbol(""),_4=Symbol(""),$1=Symbol("");function bo(e,t,n){if(ul&&Ei){let i=Qg.get(e);i||Qg.set(e,i=new Map);let s=i.get(n);s||(i.set(n,s=new j2),s.map=i,s.key=n),s.track()}}function fa(e,t,n,i,s,o){const r=Qg.get(e);if(!r){B1++;return}const l=a=>{a&&a.trigger()};if(q8(),t==="clear")r.forEach(l);else{const a=Xt(e),u=a&&B2(n);if(a&&n==="length"){const c=Number(i);r.forEach((d,f)=>{(f==="length"||f===$1||!_r(f)&&f>=c)&&l(d)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),u&&l(r.get($1)),t){case"add":a?u&&l(r.get("length")):(l(r.get(Bc)),nf(e)&&l(r.get(_4)));break;case"delete":a||(l(r.get(Bc)),nf(e)&&l(r.get(_4)));break;case"set":nf(e)&&l(r.get(Bc));break}}U8()}function lz(e,t){const n=Qg.get(e);return n&&n.get(t)}function _d(e){const t=Vn(e);return t===e?t:(bo(t,"iterate",$1),br(e)?t:t.map(fl))}function H2(e){return bo(e=Vn(e),"iterate",$1),e}function $l(e,t){return _a(e)?xf(du(e)?fl(t):t):fl(t)}const az={__proto__:null,[Symbol.iterator](){return B9(this,Symbol.iterator,e=>$l(this,e))},concat(...e){return _d(this).concat(...e.map(t=>Xt(t)?_d(t):t))},entries(){return B9(this,"entries",e=>(e[1]=$l(this,e[1]),e))},every(e,t){return sa(this,"every",e,t,void 0,arguments)},filter(e,t){return sa(this,"filter",e,t,n=>n.map(i=>$l(this,i)),arguments)},find(e,t){return sa(this,"find",e,t,n=>$l(this,n),arguments)},findIndex(e,t){return sa(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return sa(this,"findLast",e,t,n=>$l(this,n),arguments)},findLastIndex(e,t){return sa(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return sa(this,"forEach",e,t,void 0,arguments)},includes(...e){return $9(this,"includes",e)},indexOf(...e){return $9(this,"indexOf",e)},join(e){return _d(this).join(e)},lastIndexOf(...e){return $9(this,"lastIndexOf",e)},map(e,t){return sa(this,"map",e,t,void 0,arguments)},pop(){return bh(this,"pop")},push(...e){return bh(this,"push",e)},reduce(e,...t){return W6(this,"reduce",e,t)},reduceRight(e,...t){return W6(this,"reduceRight",e,t)},shift(){return bh(this,"shift")},some(e,t){return sa(this,"some",e,t,void 0,arguments)},splice(...e){return bh(this,"splice",e)},toReversed(){return _d(this).toReversed()},toSorted(e){return _d(this).toSorted(e)},toSpliced(...e){return _d(this).toSpliced(...e)},unshift(...e){return bh(this,"unshift",e)},values(){return B9(this,"values",e=>$l(this,e))}};function B9(e,t,n){const i=H2(e),s=i[t]();return i!==e&&!br(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const uz=Array.prototype;function sa(e,t,n,i,s,o){const r=H2(e),l=r!==e&&!br(e),a=r[t];if(a!==uz[t]){const d=a.apply(e,o);return l?fl(d):d}let u=n;r!==e&&(l?u=function(d,f){return n.call(this,$l(e,d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=a.call(r,u,i);return l&&s?s(c):c}function W6(e,t,n,i){const s=H2(e),o=s!==e&&!br(e);let r=n,l=!1;s!==e&&(o?(l=i.length===0,r=function(u,c,d){return l&&(l=!1,u=$l(e,u)),n.call(this,u,$l(e,c),d,e)}):n.length>3&&(r=function(u,c,d){return n.call(this,u,c,d,e)}));const a=s[t](r,...i);return l?$l(e,a):a}function $9(e,t,n){const i=Vn(e);bo(i,"iterate",$1);const s=i[t](...n);return(s===-1||s===!1)&&U2(n[0])?(n[0]=Vn(n[0]),i[t](...n)):s}function bh(e,t,n=[]){Wl(),q8();const i=Vn(e)[t].apply(e,n);return U8(),ql(),i}const cz=L2("__proto__,__v_isRef,__isVue"),zM=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(_r));function dz(e){_r(e)||(e=String(e));const t=Vn(this);return bo(t,"has",e),t.hasOwnProperty(e)}class OM{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return i===(s?o?UM:qM:o?WM:HM).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const r=Xt(t);if(!s){let a;if(r&&(a=az[n]))return a;if(n==="hasOwnProperty")return dz}const l=Reflect.get(t,n,ls(t)?t:i);if((_r(n)?zM.has(n):cz(n))||(s||bo(t,"get",n),o))return l;if(ls(l)){const a=r&&B2(n)?l:l.value;return s&&si(a)?M4(a):a}return si(l)?s?M4(l):Ts(l):l}}class PM extends OM{constructor(t=!1){super(!1,t)}set(t,n,i,s){let o=t[n];const r=Xt(t)&&B2(n);if(!this._isShallow){const u=_a(o);if(!br(i)&&!_a(i)&&(o=Vn(o),i=Vn(i)),!r&&ls(o)&&!ls(i))return u||(o.value=i),!0}const l=r?Number(n)<t.length:ii(t,n),a=Reflect.set(t,n,i,ls(t)?t:s);return t===Vn(s)&&a&&(l?js(i,o)&&fa(t,"set",n,i):fa(t,"add",n,i)),a}deleteProperty(t,n){const i=ii(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&i&&fa(t,"delete",n,void 0),s}has(t,n){const i=Reflect.has(t,n);return(!_r(n)||!zM.has(n))&&bo(t,"has",n),i}ownKeys(t){return bo(t,"iterate",Xt(t)?"length":Bc),Reflect.ownKeys(t)}}class jM extends OM{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const fz=new PM,hz=new jM,pz=new PM(!0),gz=new jM(!0),S4=e=>e,m0=e=>Reflect.getPrototypeOf(e);function mz(e,t,n){return function(...i){const s=this.__v_raw,o=Vn(s),r=nf(o),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,u=s[e](...i),c=n?S4:t?xf:fl;return!t&&bo(o,"iterate",a?_4:Bc),gi(Object.create(u),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}}})}}function v0(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function vz(e,t){const n={get(s){const o=this.__v_raw,r=Vn(o),l=Vn(s);e||(js(s,l)&&bo(r,"get",s),bo(r,"get",l));const{has:a}=m0(r),u=t?S4:e?xf:fl;if(a.call(r,s))return u(o.get(s));if(a.call(r,l))return u(o.get(l));o!==r&&o.get(s)},get size(){const s=this.__v_raw;return!e&&bo(Vn(s),"iterate",Bc),s.size},has(s){const o=this.__v_raw,r=Vn(o),l=Vn(s);return e||(js(s,l)&&bo(r,"has",s),bo(r,"has",l)),s===l?o.has(s):o.has(s)||o.has(l)},forEach(s,o){const r=this,l=r.__v_raw,a=Vn(l),u=t?S4:e?xf:fl;return!e&&bo(a,"iterate",Bc),l.forEach((c,d)=>s.call(o,u(c),u(d),r))}};return gi(n,e?{add:v0("add"),set:v0("set"),delete:v0("delete"),clear:v0("clear")}:{add(s){const o=Vn(this),r=m0(o),l=Vn(s),a=!t&&!br(s)&&!_a(s)?l:s;return r.has.call(o,a)||js(s,a)&&r.has.call(o,s)||js(l,a)&&r.has.call(o,l)||(o.add(a),fa(o,"add",a,a)),this},set(s,o){!t&&!br(o)&&!_a(o)&&(o=Vn(o));const r=Vn(this),{has:l,get:a}=m0(r);let u=l.call(r,s);u||(s=Vn(s),u=l.call(r,s));const c=a.call(r,s);return r.set(s,o),u?js(o,c)&&fa(r,"set",s,o):fa(r,"add",s,o),this},delete(s){const o=Vn(this),{has:r,get:l}=m0(o);let a=r.call(o,s);a||(s=Vn(s),a=r.call(o,s)),l&&l.call(o,s);const u=o.delete(s);return a&&fa(o,"delete",s,void 0),u},clear(){const s=Vn(this),o=s.size!==0,r=s.clear();return o&&fa(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=mz(s,e,t)}),n}function W2(e,t){const n=vz(e,t);return(i,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?i:Reflect.get(ii(n,s)&&s in i?n:i,s,o)}const yz={get:W2(!1,!1)},bz={get:W2(!1,!0)},kz={get:W2(!0,!1)},Az={get:W2(!0,!0)},HM=new WeakMap,WM=new WeakMap,qM=new WeakMap,UM=new WeakMap;function Cz(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ts(e){return _a(e)?e:q2(e,!1,fz,yz,HM)}function KM(e){return q2(e,!1,pz,bz,WM)}function M4(e){return q2(e,!0,hz,kz,qM)}function AQe(e){return q2(e,!0,gz,Az,UM)}function q2(e,t,n,i,s){if(!si(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=s.get(e);if(o)return o;const r=Cz(qR(e));if(r===0)return e;const l=new Proxy(e,r===2?i:n);return s.set(e,l),l}function du(e){return _a(e)?du(e.__v_raw):!!(e&&e.__v_isReactive)}function _a(e){return!!(e&&e.__v_isReadonly)}function br(e){return!!(e&&e.__v_isShallow)}function U2(e){return e?!!e.__v_raw:!1}function Vn(e){const t=e&&e.__v_raw;return t?Vn(t):e}function wt(e){return!ii(e,"__v_skip")&&Object.isExtensible(e)&&SM(e,"__v_skip",!0),e}const fl=e=>si(e)?Ts(e):e,xf=e=>si(e)?M4(e):e;function ls(e){return e?e.__v_isRef===!0:!1}function Z(e){return VM(e,!1)}function vl(e){return VM(e,!0)}function VM(e,t){return ls(e)?e:new wz(e,t)}class wz{constructor(t,n){this.dep=new j2,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Vn(t),this._value=n?t:fl(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||br(t)||_a(t);t=i?t:Vn(t),js(t,n)&&(this._rawValue=t,this._value=i?t:fl(t),this.dep.trigger())}}function xz(e){e.dep&&e.dep.trigger()}function h(e){return ls(e)?e.value:e}function fu(e){return hn(e)?e():h(e)}const _z={get:(e,t,n)=>t==="__v_raw"?e:h(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const s=e[t];return ls(s)&&!ls(n)?(s.value=n,!0):Reflect.set(e,t,n,i)}};function ZM(e){return du(e)?e:new Proxy(e,_z)}class Sz{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new j2,{get:i,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Mz(e){return new Sz(e)}function CQe(e){const t=Xt(e)?new Array(e.length):{};for(const n in e)t[n]=GM(e,n);return t}class Iz{constructor(t,n,i){this._object=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._key=_r(n)?n:String(n),this._raw=Vn(t);let s=!0,o=t;if(!Xt(t)||_r(this._key)||!B2(this._key))do s=!U2(o)||br(o);while(s&&(o=o.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=h(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&ls(this._raw[this._key])){const n=this._object[this._key];if(ls(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return lz(this._raw,this._key)}}class Ez{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function wQe(e,t,n){return ls(e)?e:hn(e)?new Ez(e):si(e)&&arguments.length>1?GM(e,t,n):Z(e)}function GM(e,t,n){return new Iz(e,t,n)}class Tz{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new j2(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=B1-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Ei!==this)return NM(this,!0),!0}get value(){const t=this.dep.track();return $M(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Lz(e,t,n=!1){let i,s;return hn(e)?i=e:(i=e.get,s=e.set),new Tz(i,s,n)}const xQe={GET:"get",HAS:"has",ITERATE:"iterate"},_Qe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},y0={},Yg=new WeakMap;let eu;function SQe(){return eu}function Nz(e,t=!1,n=eu){if(n){let i=Yg.get(n);i||Yg.set(n,i=[]),i.push(e)}}function Fz(e,t,n=$n){const{immediate:i,deep:s,once:o,scheduler:r,augmentJob:l,call:a}=n,u=v=>s?v:br(v)||s===!1||s===0?ha(v,1):ha(v);let c,d,f,p,g=!1,m=!1;if(ls(e)?(d=()=>e.value,g=br(e)):du(e)?(d=()=>u(e),g=!0):Xt(e)?(m=!0,g=e.some(v=>du(v)||br(v)),d=()=>e.map(v=>{if(ls(v))return v.value;if(du(v))return u(v);if(hn(v))return a?a(v,2):v()})):hn(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Wl();try{f()}finally{ql()}}const v=eu;eu=c;try{return a?a(e,3,[p]):e(p)}finally{eu=v}}:d=Pr,t&&s){const v=d,x=s===!0?1/0:s;d=()=>ha(v(),x)}const y=P2(),w=()=>{c.stop(),y&&y.active&&H8(y.effects,c)};if(o&&t){const v=t;t=(...x)=>{const E=v(...x);return w(),E}}let k=m?new Array(e.length).fill(y0):y0;const A=v=>{if(!(!(c.flags&1)||!c.dirty&&!v))if(t){const x=c.run();if(v||s||g||(m?x.some((E,S)=>js(E,k[S])):js(x,k))){f&&f();const E=eu;eu=c;try{const S=[x,k===y0?void 0:m&&k[0]===y0?[]:k,p];k=x,a?a(t,3,S):t(...S)}finally{eu=E}}}else c.run()};return l&&l(A),c=new Gg(d),c.scheduler=r?()=>r(A,!1):A,p=v=>Nz(v,!1,c),f=c.onStop=()=>{const v=Yg.get(c);if(v){if(a)a(v,4);else for(const x of v)x();Yg.delete(c)}},t?i?A(!0):k=c.run():r?r(A.bind(null,!0),!0):c.run(),w.pause=c.pause.bind(c),w.resume=c.resume.bind(c),w.stop=w,w}function ha(e,t=1/0,n){if(t<=0||!si(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ls(e))ha(e.value,t,n);else if(Xt(e))for(let i=0;i<e.length;i++)ha(e[i],t,n);else if(id(e)||nf(e))e.forEach(i=>{ha(i,t,n)});else if(F2(e)){for(const i in e)ha(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&ha(e[i],t,n)}return e}/** -* @vue/runtime-core v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const QM=[];function Bz(e){QM.push(e)}function $z(){QM.pop()}function MQe(e,t){}const IQe={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},Dz={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function pp(e,t,n,i){try{return i?e(...i):e()}catch(s){zf(s,t,n)}}function Hr(e,t,n,i){if(hn(e)){const s=pp(e,t,n,i);return s&&W8(s)&&s.catch(o=>{zf(o,t,n)}),s}if(Xt(e)){const s=[];for(let o=0;o<e.length;o++)s.push(Hr(e[o],t,n,i));return s}}function zf(e,t,n,i=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||$n;if(t){let l=t.parent;const a=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,a,u)===!1)return}l=l.parent}if(o){Wl(),pp(o,null,10,[e,a,u]),ql();return}}Rz(e,n,s,i,r)}function Rz(e,t,n,i=!0,s=!1){if(s)throw e;console.error(e)}const No=[];let Nl=-1;const of=[];let tu=null,Rd=0;const YM=Promise.resolve();let Jg=null;function kt(e){const t=Jg||YM;return e?t.then(this?e.bind(this):e):t}function zz(e){let t=Nl+1,n=No.length;for(;t<n;){const i=t+n>>>1,s=No[i],o=D1(s);o<e||o===e&&s.flags&2?t=i+1:n=i}return t}function V8(e){if(!(e.flags&1)){const t=D1(e),n=No[No.length-1];!n||!(e.flags&2)&&t>=D1(n)?No.push(e):No.splice(zz(t),0,e),e.flags|=1,JM()}}function JM(){Jg||(Jg=YM.then(XM))}function Xg(e){Xt(e)?of.push(...e):tu&&e.id===-1?tu.splice(Rd+1,0,e):e.flags&1||(of.push(e),e.flags|=1),JM()}function q6(e,t,n=Nl+1){for(;n<No.length;n++){const i=No[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;No.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function em(e){if(of.length){const t=[...new Set(of)].sort((n,i)=>D1(n)-D1(i));if(of.length=0,tu){tu.push(...t);return}for(tu=t,Rd=0;Rd<tu.length;Rd++){const n=tu[Rd];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}tu=null,Rd=0}}const D1=e=>e.id==null?e.flags&2?-1:1/0:e.id;function XM(e){try{for(Nl=0;Nl<No.length;Nl++){const t=No[Nl];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),pp(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Nl<No.length;Nl++){const t=No[Nl];t&&(t.flags&=-2)}Nl=-1,No.length=0,em(),Jg=null,(No.length||of.length)&&XM()}}let zd,b0=[];function eI(e,t){var n,i;zd=e,zd?(zd.enabled=!0,b0.forEach(({event:s,args:o})=>zd.emit(s,...o)),b0=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{eI(o,t)}),setTimeout(()=>{zd||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,b0=[])},3e3)):b0=[]}let oo=null,K2=null;function R1(e){const t=oo;return oo=e,K2=e&&e.type.__scopeId||null,t}function EQe(e){K2=e}function TQe(){K2=null}const LQe=e=>he;function he(e,t=oo,n){if(!t||e._n)return e;const i=(...s)=>{i._d&&rm(-1);const o=R1(t);let r;try{r=e(...s)}finally{R1(o),i._d&&rm(1)}return r};return i._n=!0,i._c=!0,i._d=!0,i}function Bn(e,t){if(oo===null)return e;const n=yp(oo),i=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,r,l,a=$n]=t[s];o&&(hn(o)&&(o={mounted:o,updated:o}),o.deep&&ha(r),i.push({dir:o,instance:n,value:r,oldValue:void 0,arg:l,modifiers:a}))}return e}function Bl(e,t,n,i){const s=e.dirs,o=t&&t.dirs;for(let r=0;r<s.length;r++){const l=s[r];o&&(l.oldValue=o[r].value);let a=l.dir[i];a&&(Wl(),Hr(a,n,8,[e.el,l,e,t]),ql())}}function Pn(e,t){if(so){let n=so.provides;const i=so.parent&&so.parent.provides;i===n&&(n=so.provides=Object.create(i)),n[e]=t}}function an(e,t,n=!1){const i=As();if(i||$c){let s=$c?$c._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&hn(t)?t.call(i&&i.proxy):t}}function NQe(){return!!(As()||$c)}const Oz=Symbol.for("v-scx"),Pz=()=>an(Oz);function I4(e,t){return gp(e,null,t)}function FQe(e,t){return gp(e,null,{flush:"post"})}function jz(e,t){return gp(e,null,{flush:"sync"})}function Qe(e,t,n){return gp(e,t,n)}function gp(e,t,n=$n){const{immediate:i,deep:s,flush:o,once:r}=n,l=gi({},n),a=t&&i||!t&&o!=="post";let u;if(qc){if(o==="sync"){const p=Pz();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Pr,p.resume=Pr,p.pause=Pr,p}}const c=so;l.call=(p,g,m)=>Hr(p,c,g,m);let d=!1;o==="post"?l.scheduler=p=>{hs(p,c&&c.suspense)}:o!=="sync"&&(d=!0,l.scheduler=(p,g)=>{g?p():V8(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=Fz(e,t,l);return qc&&(u?u.push(f):a&&f()),f}function Hz(e,t,n){const i=this.proxy,s=wi(e)?e.includes(".")?tI(i,e):()=>i[e]:e.bind(i,i);let o;hn(t)?o=t:(o=t.handler,n=t);const r=Pf(this),l=gp(s,o.bind(i),n);return r(),l}function tI(e,t){const n=t.split(".");return()=>{let i=e;for(let s=0;s<n.length&&i;s++)i=i[n[s]];return i}}const Ga=new WeakMap,nI=Symbol("_vte"),iI=e=>e.__isTeleport,kc=e=>e&&(e.disabled||e.disabled===""),Wz=e=>e&&(e.defer||e.defer===""),U6=e=>typeof SVGElement<"u"&&e instanceof SVGElement,K6=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,E4=(e,t)=>{const n=e&&e.to;return wi(n)?t?t(n):null:n},qz={name:"Teleport",__isTeleport:!0,process(e,t,n,i,s,o,r,l,a,u){const{mc:c,pc:d,pbc:f,o:{insert:p,querySelector:g,createText:m,createComment:y,parentNode:w}}=u,k=kc(t.props);let{dynamicChildren:A}=t;const v=(S,M,_)=>{S.shapeFlag&16&&c(S.children,M,_,s,o,r,l,a)},x=(S=t)=>{const M=kc(S.props),_=S.target=E4(S.props,g),N=T4(_,S,m,p);_&&(r!=="svg"&&U6(_)?r="svg":r!=="mathml"&&K6(_)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(_),M||(v(S,_,N),zh(S,!1)))},E=S=>{const M=()=>{if(Ga.get(S)===M){if(Ga.delete(S),kc(S.props)){const _=w(S.el)||n;v(S,_,S.anchor),zh(S,!0)}x(S)}};Ga.set(S,M),hs(M,o)};if(e==null){const S=t.el=m(""),M=t.anchor=m("");if(p(S,n,i),p(M,n,i),Wz(t.props)||o&&o.pendingBranch){E(t);return}k&&(v(t,n,M),zh(t,!0)),x()}else{t.el=e.el;const S=t.anchor=e.anchor,M=Ga.get(e);if(M){M.flags|=8,Ga.delete(e),E(t);return}t.targetStart=e.targetStart;const _=t.target=e.target,N=t.targetAnchor=e.targetAnchor,D=kc(e.props),T=D?n:_,$=D?S:N;if(r==="svg"||U6(_)?r="svg":(r==="mathml"||K6(_))&&(r="mathml"),A?(f(e.dynamicChildren,A,T,s,o,r,l),i5(e,t,!0)):a||d(e,t,T,$,s,o,r,l,!1),k)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):k0(t,n,S,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const P=E4(t.props,g);P&&(t.target=P,k0(t,P,null,u,0))}else D&&k0(t,_,N,u,1);zh(t,k)}},remove(e,t,n,{um:i,o:{remove:s}},o){const{shapeFlag:r,children:l,anchor:a,targetStart:u,targetAnchor:c,target:d,props:f}=e,p=kc(f),g=o||!p,m=Ga.get(e);if(m&&(m.flags|=8,Ga.delete(e)),d&&(s(u),s(c)),o&&s(a),!m&&(p||d)&&r&16)for(let y=0;y<l.length;y++){const w=l[y];i(w,t,n,g,!!w.dynamicChildren)}},move:k0,hydrate:Uz};function k0(e,t,n,{o:{insert:i},m:s},o=2){o===0&&i(e.targetAnchor,t,n);const{el:r,anchor:l,shapeFlag:a,children:u,props:c}=e,d=o===2;if(d&&i(r,t,n),!Ga.has(e)&&(!d||kc(c))&&a&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&i(l,t,n)}function Uz(e,t,n,i,s,o,{o:{nextSibling:r,parentNode:l,querySelector:a,insert:u,createText:c}},d){function f(y,w){let k=w;for(;k;){if(k&&k.nodeType===8){if(k.data==="teleport start anchor")t.targetStart=k;else if(k.data==="teleport anchor"){t.targetAnchor=k,y._lpa=t.targetAnchor&&r(t.targetAnchor);break}}k=r(k)}}function p(y,w){w.anchor=d(r(y),w,l(y),n,i,s,o)}const g=t.target=E4(t.props,a),m=kc(t.props);if(g){const y=g._lpa||g.firstChild;t.shapeFlag&16&&(m?(p(e,t),f(g,y),t.targetAnchor||T4(g,t,c,u,l(e)===g?e:null)):(t.anchor=r(e),f(g,y),t.targetAnchor||T4(g,t,c,u),d(y&&r(y),t,g,n,i,s,o))),zh(t,m)}else m&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=r(e));return t.anchor&&r(t.anchor)}const Wr=qz;function zh(e,t){const n=e.ctx;if(n&&n.ut){let i,s;for(t?(i=e.el,s=e.anchor):(i=e.targetStart,s=e.targetAnchor);i&&i!==s;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function T4(e,t,n,i,s=null){const o=t.targetStart=n(""),r=t.targetAnchor=n("");return o[nI]=r,e&&(i(o,e,s),i(r,e,s)),r}const Dr=Symbol("_leaveCb"),kh=Symbol("_enterCb");function sI(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return pn(()=>{e.isMounted=!0}),Gn(()=>{e.isUnmounting=!0}),e}const Tr=[Function,Array],oI={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Tr,onEnter:Tr,onAfterEnter:Tr,onEnterCancelled:Tr,onBeforeLeave:Tr,onLeave:Tr,onAfterLeave:Tr,onLeaveCancelled:Tr,onBeforeAppear:Tr,onAppear:Tr,onAfterAppear:Tr,onAppearCancelled:Tr},rI=e=>{const t=e.subTree;return t.component?rI(t.component):t},Kz={name:"BaseTransition",props:oI,setup(e,{slots:t}){const n=As(),i=sI();return()=>{const s=t.default&&Z8(t.default(),!0),o=s&&s.length?lI(s):n.subTree?ne():void 0;if(!o)return;const r=Vn(e),{mode:l}=r;if(i.isLeaving)return D9(o);const a=V6(o);if(!a)return D9(o);let u=z1(a,r,i,n,d=>u=d);a.type!==ms&&bu(a,u);let c=n.subTree&&V6(n.subTree);if(c&&c.type!==ms&&!il(c,a)&&rI(n).type!==ms){let d=z1(c,r,i,n);if(bu(c,d),l==="out-in"&&a.type!==ms)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},D9(o);l==="in-out"&&a.type!==ms?d.delayLeave=(f,p,g)=>{const m=aI(i,c);m[String(c.key)]=c,f[Dr]=()=>{p(),f[Dr]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return o}}};function lI(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ms){t=n;break}}return t}const Vz=Kz;function aI(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function z1(e,t,n,i,s){const{appear:o,mode:r,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:g,onLeaveCancelled:m,onBeforeAppear:y,onAppear:w,onAfterAppear:k,onAppearCancelled:A}=t,v=String(e.key),x=aI(n,e),E=(_,N)=>{_&&Hr(_,i,9,N)},S=(_,N)=>{const D=N[1];E(_,N),Xt(_)?_.every(T=>T.length<=1)&&D():_.length<=1&&D()},M={mode:r,persisted:l,beforeEnter(_){let N=a;if(!n.isMounted)if(o)N=y||a;else return;_[Dr]&&_[Dr](!0);const D=x[v];D&&il(e,D)&&D.el[Dr]&&D.el[Dr](),E(N,[_])},enter(_){if(x[v]===e)return;let N=u,D=c,T=d;if(!n.isMounted)if(o)N=w||u,D=k||c,T=A||d;else return;let $=!1;_[kh]=O=>{$||($=!0,O?E(T,[_]):E(D,[_]),M.delayedLeave&&M.delayedLeave(),_[kh]=void 0)};const P=_[kh].bind(null,!1);N?S(N,[_,P]):P()},leave(_,N){const D=String(e.key);if(_[kh]&&_[kh](!0),n.isUnmounting)return N();E(f,[_]);let T=!1;_[Dr]=P=>{T||(T=!0,N(),P?E(m,[_]):E(g,[_]),_[Dr]=void 0,x[D]===e&&delete x[D])};const $=_[Dr].bind(null,!1);x[D]=e,p?S(p,[_,$]):$()},clone(_){const N=z1(_,t,n,i,s);return s&&s(N),N}};return M}function D9(e){if(mp(e))return e=Sa(e),e.children=null,e}function V6(e){if(!mp(e))return iI(e.type)&&e.children?lI(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&hn(n.default))return n.default()}}function bu(e,t){e.shapeFlag&6&&e.component?(e.transition=t,bu(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Z8(e,t=!1,n){let i=[],s=0;for(let o=0;o<e.length;o++){let r=e[o];const l=n==null?r.key:String(n)+String(r.key!=null?r.key:o);r.type===Be?(r.patchFlag&128&&s++,i=i.concat(Z8(r.children,t,l))):(t||r.type!==ms)&&i.push(l!=null?Sa(r,{key:l}):r)}if(s>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}function tt(e,t){return hn(e)?gi({name:e.name},t,{setup:e}):e}function Zz(){const e=As();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function G8(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function BQe(e){const t=As(),n=vl(null);if(t){const s=t.refs===$n?t.refs={}:t.refs;Object.defineProperty(s,e,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}function Z6(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const tm=new WeakMap;function rf(e,t,n,i,s=!1){if(Xt(e)){e.forEach((m,y)=>rf(m,t&&(Xt(t)?t[y]:t),n,i,s));return}if(ka(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&rf(e,t,n,i.component.subTree);return}const o=i.shapeFlag&4?yp(i.component):i.el,r=s?null:o,{i:l,r:a}=e,u=t&&t.r,c=l.refs===$n?l.refs={}:l.refs,d=l.setupState,f=Vn(d),p=d===$n?xM:m=>Z6(c,m)?!1:ii(f,m),g=(m,y)=>!(y&&Z6(c,y));if(u!=null&&u!==a){if(G6(t),wi(u))c[u]=null,p(u)&&(d[u]=null);else if(ls(u)){const m=t;g(u,m.k)&&(u.value=null),m.k&&(c[m.k]=null)}}if(hn(a)){Wl();try{pp(a,l,12,[r,c])}finally{ql()}}else{const m=wi(a),y=ls(a);if(m||y){const w=()=>{if(e.f){const k=m?p(a)?d[a]:c[a]:g()||!e.k?a.value:c[e.k];if(s)Xt(k)&&H8(k,o);else if(Xt(k))k.includes(o)||k.push(o);else if(m)c[a]=[o],p(a)&&(d[a]=c[a]);else{const A=[o];g(a,e.k)&&(a.value=A),e.k&&(c[e.k]=A)}}else m?(c[a]=r,p(a)&&(d[a]=r)):y&&(g(a,e.k)&&(a.value=r),e.k&&(c[e.k]=r))};if(r){const k=()=>{w(),tm.delete(e)};k.id=-1,tm.set(e,k),hs(k,n)}else G6(e),w()}}}function G6(e){const t=tm.get(e);t&&(t.flags|=8,tm.delete(e))}let Q6=!1;const Sd=()=>{Q6||(console.error("Hydration completed but contains mismatches."),Q6=!0)},Gz=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Qz=e=>e.namespaceURI.includes("MathML"),A0=e=>{if(e.nodeType===1){if(Gz(e))return"svg";if(Qz(e))return"mathml"}},Ud=e=>e.nodeType===8;function Yz(e){const{mt:t,p:n,o:{patchProp:i,createText:s,nextSibling:o,parentNode:r,remove:l,insert:a,createComment:u}}=e,c=(A,v)=>{if(!v.hasChildNodes()){n(null,A,v),em(),v._vnode=A;return}d(v.firstChild,A,null,null,null),em(),v._vnode=A},d=(A,v,x,E,S,M=!1)=>{M=M||!!v.dynamicChildren;const _=Ud(A)&&A.data==="[",N=()=>m(A,v,x,E,S,_),{type:D,ref:T,shapeFlag:$,patchFlag:P}=v;let O=A.nodeType;v.el=A,P===-2&&(M=!1,v.dynamicChildren=null);let R=null;switch(D){case hu:O!==3?v.children===""?(a(v.el=s(""),r(A),A),R=A):R=N():(A.data!==v.children&&(Sd(),A.data=v.children),R=o(A));break;case ms:k(A)?(R=o(A),w(v.el=A.content.firstChild,A,x)):O!==8||_?R=N():R=o(A);break;case af:if(_&&(A=o(A),O=A.nodeType),O===1||O===3){R=A;const W=!v.children.length;for(let z=0;z<v.staticCount;z++)W&&(v.children+=R.nodeType===1?R.outerHTML:R.data),z===v.staticCount-1&&(v.anchor=R),R=o(R);return _?o(R):R}else N();break;case Be:_?R=g(A,v,x,E,S,M):R=N();break;default:if($&1)(O!==1||v.type.toLowerCase()!==A.tagName.toLowerCase())&&!k(A)?R=N():R=f(A,v,x,E,S,M);else if($&6){v.slotScopeIds=S;const W=r(A);if(_?R=y(A):Ud(A)&&A.data==="teleport start"?R=y(A,A.data,"teleport end"):R=o(A),t(v,W,null,x,E,A0(W),M),ka(v)&&!v.type.__asyncResolved){let z;_?(z=V(Be),z.anchor=R?R.previousSibling:W.lastChild):z=A.nodeType===3?Ue(""):V("div"),z.el=A,v.component.subTree=z}}else $&64?O!==8?R=N():R=v.type.hydrate(A,v,x,E,S,M,e,p):$&128&&(R=v.type.hydrate(A,v,x,E,A0(r(A)),S,M,e,d))}return T!=null&&rf(T,null,E,v),R},f=(A,v,x,E,S,M)=>{M=M||!!v.dynamicChildren;const{type:_,dynamicProps:N,props:D,patchFlag:T,shapeFlag:$,dirs:P,transition:O}=v,R=_==="input"||_==="option",W=!!N;if(R||W||T!==-1){P&&Bl(v,null,x,"created");let z=!1;if(k(A)){z=II(null,O)&&x&&x.vnode.props&&x.vnode.props.appear;const K=A.content.firstChild;if(z){const H=K.getAttribute("class");H&&(K.$cls=H),O.beforeEnter(K)}w(K,A,x),v.el=A=K}if($&16&&!(D&&(D.innerHTML||D.textContent))){let K=p(A.firstChild,v,A,x,E,S,M);for(K&&!vg(A,1)&&Sd();K;){const H=K;K=K.nextSibling,l(H)}}else if($&8){let K=v.children;K[0]===` -`&&(A.tagName==="PRE"||A.tagName==="TEXTAREA")&&(K=K.slice(1));const{textContent:H}=A;H!==K&&H!==K.replace(/\r\n|\r/g,` -`)&&(vg(A,0)||Sd(),A.textContent=v.children)}if(D){if(R||W||!M||T&48){const K=A.tagName.includes("-");for(const H in D)(R&&(H.endsWith("value")||H==="indeterminate")||hp(H)&&!Fc(H)||H[0]==="."||K&&!Fc(H)||N&&N.includes(H))&&i(A,H,null,D[H],void 0,x)}else if(D.onClick)i(A,"onClick",null,D.onClick,void 0,x);else if(T&4&&du(D.style))for(const K in D.style)D.style[K]}let G;(G=D&&D.onVnodeBeforeMount)&&Go(G,x,v),P&&Bl(v,null,x,"beforeMount"),((G=D&&D.onVnodeMounted)||P||z)&&NI(()=>{G&&Go(G,x,v),z&&O.enter(A),P&&Bl(v,null,x,"mounted")},E)}return A.nextSibling},p=(A,v,x,E,S,M,_)=>{_=_||!!v.dynamicChildren;const N=v.children,D=N.length;let T=!1;for(let $=0;$<D;$++){const P=_?N[$]:N[$]=Xo(N[$]),O=P.type===hu;A?(O&&!_&&$+1<D&&Xo(N[$+1]).type===hu&&(a(s(A.data.slice(P.children.length)),x,o(A)),A.data=P.children),A=d(A,P,E,S,M,_)):O&&!P.children?a(P.el=s(""),x):(T||(T=!0,vg(x,1)||Sd()),n(null,P,x,null,E,S,A0(x),M))}return A},g=(A,v,x,E,S,M)=>{const{slotScopeIds:_}=v;_&&(S=S?S.concat(_):_);const N=r(A),D=p(o(A),v,N,x,E,S,M);return D&&Ud(D)&&D.data==="]"?o(v.anchor=D):(Sd(),a(v.anchor=u("]"),N,D),D)},m=(A,v,x,E,S,M)=>{if(Xz(A,v)||Sd(),v.el=null,M){const D=y(A);for(;;){const T=o(A);if(T&&T!==D)l(T);else break}}const _=o(A),N=r(A);return l(A),n(null,v,N,_,x,E,A0(N),S),x&&(x.vnode.el=v.el,G2(x,v.el)),_},y=(A,v="[",x="]")=>{let E=0;for(;A;)if(A=o(A),A&&Ud(A)&&(A.data===v&&E++,A.data===x)){if(E===0)return o(A);E--}return A},w=(A,v,x)=>{const E=v.parentNode;E&&E.replaceChild(A,v);let S=x;for(;S;)S.vnode.el===v&&(S.vnode.el=S.subTree.el=A),S=S.parent},k=A=>A.nodeType===1&&A.tagName==="TEMPLATE";return[c,d]}const nm="data-allow-mismatch",Jz={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function vg(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(nm);)e=e.parentElement;return Q8(e&&e.getAttribute(nm),t)}function Q8(e,t){if(e==null)return!1;if(e==="")return!0;{const n=e.split(",");return t===0&&n.includes("children")?!0:n.includes(Jz[t])}}function Xz(e,t){return vg(e.parentElement,1)||eO(e)||tO(t)}function eO(e){return e.nodeType===1&&Q8(e.getAttribute(nm),1)}function tO({props:e}){const t=e&&e[nm];return typeof t=="string"&&Q8(t,1)}const nO=z2().requestIdleCallback||(e=>setTimeout(e,1)),iO=z2().cancelIdleCallback||(e=>clearTimeout(e)),$Qe=(e=1e4)=>t=>{const n=nO(t,{timeout:e});return()=>iO(n)};function sO(e){const{top:t,left:n,bottom:i,right:s}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:r}=window;return(t>0&&t<o||i>0&&i<o)&&(n>0&&n<r||s>0&&s<r)}const DQe=e=>(t,n)=>{const i=new IntersectionObserver(s=>{for(const o of s)if(o.isIntersecting){i.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(sO(s))return t(),i.disconnect(),!1;i.observe(s)}}),()=>i.disconnect()},RQe=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},zQe=(e=[])=>(t,n)=>{wi(e)&&(e=[e]);let i=!1;const s=r=>{i||(i=!0,o(),t(),r.target.dispatchEvent(new r.constructor(r.type,r)))},o=()=>{n(r=>{for(const l of e)r.removeEventListener(l,s)})};return n(r=>{for(const l of e)r.addEventListener(l,s,{once:!0})}),o};function oO(e,t){if(Ud(e)&&e.data==="["){let n=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(Ud(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else t(e)}const ka=e=>!!e.type.__asyncLoader;function rl(e){hn(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:i,delay:s=200,hydrate:o,timeout:r,suspensible:l=!0,onError:a}=e;let u=null,c,d=0;const f=()=>(d++,u=null,p()),p=()=>{let g;return u||(g=u=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((y,w)=>{a(m,()=>y(f()),()=>w(m),d+1)});throw m}).then(m=>g!==u&&u?u:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),c=m,m)))};return tt({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(g,m,y){let w=!1;(m.bu||(m.bu=[])).push(()=>w=!0);const k=()=>{w||y()},A=o?()=>{const v=o(k,x=>oO(g,x));v&&(m.bum||(m.bum=[])).push(v)}:k;c?A():p().then(()=>!m.isUnmounted&&A())},get __asyncResolved(){return c},setup(){const g=so;if(G8(g),c)return()=>C0(c,g);const m=x=>{u=null,zf(x,g,13,!i)};if(l&&g.suspense||qc)return p().then(x=>()=>C0(x,g)).catch(x=>(m(x),()=>i?V(i,{error:x}):null));const y=Z(!1),w=Z(),k=Z(!!s);let A,v;return An(()=>{A!=null&&clearTimeout(A),v!=null&&clearTimeout(v)}),s&&(v=setTimeout(()=>{g.isUnmounted||(k.value=!1)},s)),r!=null&&(A=setTimeout(()=>{if(!g.isUnmounted&&!y.value&&!w.value){const x=new Error(`Async component timed out after ${r}ms.`);m(x),w.value=x}},r)),p().then(()=>{g.isUnmounted||(y.value=!0,g.parent&&mp(g.parent.vnode)&&g.parent.update())}).catch(x=>{if(g.isUnmounted){u=null;return}m(x),w.value=x}),()=>{if(y.value&&c)return C0(c,g);if(w.value&&i)return V(i,{error:w.value});if(n&&!k.value)return C0(n,g)}}})}function C0(e,t){const{ref:n,props:i,children:s,ce:o}=t.vnode,r=V(e,i,s);return r.ref=n,r.ce=o,delete t.vnode.ce,r}const mp=e=>e.type.__isKeepAlive,rO={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=As(),i=n.ctx;if(!i.renderer)return()=>{const k=t.default&&t.default();return k&&k.length===1?k[0]:k};const s=new Map,o=new Set;let r=null;const l=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:d}}}=i,f=d("div");i.activate=(k,A,v,x,E)=>{const S=k.component;u(k,A,v,0,l),a(S.vnode,k,A,v,S,l,x,k.slotScopeIds,E),hs(()=>{S.isDeactivated=!1,S.a&&sf(S.a);const M=k.props&&k.props.onVnodeMounted;M&&Go(M,S.parent,k)},l)},i.deactivate=k=>{const A=k.component;sm(A.m),sm(A.a),u(k,f,null,1,l),hs(()=>{A.da&&sf(A.da);const v=k.props&&k.props.onVnodeUnmounted;v&&Go(v,A.parent,k),A.isDeactivated=!0},l)};function p(k){R9(k),c(k,n,l,!0)}function g(k){s.forEach((A,v)=>{const x=O4(ka(A)?A.type.__asyncResolved||{}:A.type);x&&!k(x)&&m(v)})}function m(k){const A=s.get(k);A&&(!r||!il(A,r))?p(A):r&&R9(r),s.delete(k),o.delete(k)}Qe(()=>[e.include,e.exclude],([k,A])=>{k&&g(v=>Oh(k,v)),A&&g(v=>!Oh(A,v))},{flush:"post",deep:!0});let y=null;const w=()=>{y!=null&&(om(n.subTree.type)?hs(()=>{s.set(y,w0(n.subTree))},n.subTree.suspense):s.set(y,w0(n.subTree)))};return pn(w),vp(w),Gn(()=>{s.forEach(k=>{const{subTree:A,suspense:v}=n,x=w0(A);if(k.type===x.type&&k.key===x.key){R9(x);const E=x.component.da;E&&hs(E,v);return}p(k)})}),()=>{if(y=null,!t.default)return r=null;const k=t.default(),A=k[0];if(k.length>1)return r=null,k;if(!ku(A)||!(A.shapeFlag&4)&&!(A.shapeFlag&128))return r=null,A;let v=w0(A);if(v.type===ms)return r=null,v;const x=v.type,E=O4(ka(v)?v.type.__asyncResolved||{}:x),{include:S,exclude:M,max:_}=e;if(S&&(!E||!Oh(S,E))||M&&E&&Oh(M,E))return v.shapeFlag&=-257,r=v,A;const N=v.key==null?x:v.key,D=s.get(N);return v.el&&(v=Sa(v),A.shapeFlag&128&&(A.ssContent=v)),y=N,D?(v.el=D.el,v.component=D.component,v.transition&&bu(v,v.transition),v.shapeFlag|=512,o.delete(N),o.add(N)):(o.add(N),_&&o.size>parseInt(_,10)&&m(o.values().next().value)),v.shapeFlag|=256,r=v,om(A.type)?A:v}}},OQe=rO;function Oh(e,t){return Xt(e)?e.some(n=>Oh(n,t)):wi(e)?e.split(",").includes(t):WR(e)?(e.lastIndex=0,e.test(t)):!1}function lO(e,t){uI(e,"a",t)}function aO(e,t){uI(e,"da",t)}function uI(e,t,n=so){const i=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(V2(t,i,n),n){let s=n.parent;for(;s&&s.parent;)mp(s.parent.vnode)&&uO(i,t,n,s),s=s.parent}}function uO(e,t,n,i){const s=V2(t,e,i,!0);An(()=>{H8(i[t],s)},n)}function R9(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function w0(e){return e.shapeFlag&128?e.ssContent:e}function V2(e,t,n=so,i=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{Wl();const l=Pf(n),a=Hr(t,n,e,r);return l(),ql(),a});return i?s.unshift(o):s.push(o),o}}const Ta=e=>(t,n=so)=>{(!qc||e==="sp")&&V2(e,(...i)=>t(...i),n)},cO=Ta("bm"),pn=Ta("m"),cI=Ta("bu"),vp=Ta("u"),Gn=Ta("bum"),An=Ta("um"),dO=Ta("sp"),fO=Ta("rtg"),hO=Ta("rtc");function pO(e,t=so){V2("ec",e,t)}const Y8="components",gO="directives";function mO(e,t){return J8(Y8,e,!0,t)||e}const dI=Symbol.for("v-ndc");function Ms(e){return wi(e)?J8(Y8,e,!1)||e:e||dI}function PQe(e){return J8(gO,e)}function J8(e,t,n=!0,i=!1){const s=oo||so;if(s){const o=s.type;if(e===Y8){const l=O4(o,!1);if(l&&(l===t||l===Ls(t)||l===D2(Ls(t))))return o}const r=Y6(s[e]||o[e],t)||Y6(s.appContext[e],t);return!r&&i?o:r}}function Y6(e,t){return e&&(e[t]||e[Ls(t)]||e[D2(Ls(t))])}function yt(e,t,n,i){let s;const o=n&&n[i],r=Xt(e);if(r||wi(e)){const l=r&&du(e);let a=!1,u=!1;l&&(a=!br(e),u=_a(e),e=H2(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(a?u?xf(fl(e[c])):fl(e[c]):e[c],c,void 0,o&&o[c])}else if(typeof e=="number"){s=new Array(e);for(let l=0;l<e;l++)s[l]=t(l+1,l,void 0,o&&o[l])}else if(si(e))if(e[Symbol.iterator])s=Array.from(e,(l,a)=>t(l,a,void 0,o&&o[a]));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];s[a]=t(e[c],c,a,o&&o[a])}}else s=[];return n&&(n[i]=s),s}function fI(e,t){for(let n=0;n<t.length;n++){const i=t[n];if(Xt(i))for(let s=0;s<i.length;s++)e[i[s].name]=i[s].fn;else i&&(e[i.name]=i.key?(...s)=>{const o=i.fn(...s);return o&&(o.key=i.key),o}:i.fn)}return e}function En(e,t,n={},i,s){if(oo.ce||oo.parent&&ka(oo.parent)&&oo.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),b(),fe(Be,null,[V("slot",n,i&&i())],u?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),b();const r=o&&X8(o(n)),l=n.key||r&&r.key,a=fe(Be,{key:(l&&!_r(l)?l:`_${t}`)+(!r&&i?"_fb":"")},r||(i?i():[]),r&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function X8(e){return e.some(t=>ku(t)?!(t.type===ms||t.type===Be&&!X8(t.children)):!0)?e:null}function jQe(e,t){const n={};for(const i in e)n[t&&/[A-Z]/.test(i)?`on:${i}`:mg(i)]=e[i];return n}const L4=e=>e?zI(e)?yp(e):L4(e.parent):null,l1=gi(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>L4(e.parent),$root:e=>L4(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e5(e),$forceUpdate:e=>e.f||(e.f=()=>{V8(e.update)}),$nextTick:e=>e.n||(e.n=kt.bind(e.proxy)),$watch:e=>Hz.bind(e)}),z9=(e,t)=>e!==$n&&!e.__isScriptSetup&&ii(e,t),N4={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:o,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const f=r[t];if(f!==void 0)switch(f){case 1:return i[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(z9(i,t))return r[t]=1,i[t];if(s!==$n&&ii(s,t))return r[t]=2,s[t];if(ii(o,t))return r[t]=3,o[t];if(n!==$n&&ii(n,t))return r[t]=4,n[t];F4&&(r[t]=0)}}const u=l1[t];let c,d;if(u)return t==="$attrs"&&bo(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==$n&&ii(n,t))return r[t]=4,n[t];if(d=a.config.globalProperties,ii(d,t))return d[t]},set({_:e},t,n){const{data:i,setupState:s,ctx:o}=e;return z9(s,t)?(s[t]=n,!0):i!==$n&&ii(i,t)?(i[t]=n,!0):ii(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:s,props:o,type:r}},l){let a;return!!(n[l]||e!==$n&&l[0]!=="$"&&ii(e,l)||z9(t,l)||ii(o,l)||ii(i,l)||ii(l1,l)||ii(s.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ii(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},vO=gi({},N4,{get(e,t){if(t!==Symbol.unscopables)return N4.get(e,t,e)},has(e,t){return t[0]!=="_"&&!ZR(t)}});function HQe(){return null}function WQe(){return null}function qQe(e){}function UQe(e){}function KQe(){return null}function VQe(){}function ZQe(e,t){return null}function GQe(){return hI().slots}function Of(){return hI().attrs}function hI(e){const t=As();return t.setupContext||(t.setupContext=jI(t))}function O1(e){return Xt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function QQe(e,t){const n=O1(e);for(const i in t){if(i.startsWith("__skip"))continue;let s=n[i];s?Xt(s)||hn(s)?s=n[i]={type:s,default:t[i]}:s.default=t[i]:s===null&&(s=n[i]={default:t[i]}),s&&t[`__skip_${i}`]&&(s.skipFactory=!0)}return n}function YQe(e,t){return!e||!t?e||t:Xt(e)&&Xt(t)?e.concat(t):gi({},O1(e),O1(t))}function JQe(e,t){const n={};for(const i in e)t.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>e[i]});return n}function XQe(e){const t=As(),n=qc;let i=e();j1(),n&&uf(!1);const s=()=>{Pf(t),n&&uf(!0)},o=()=>{As()!==t&&t.scope.off(),j1(),n&&uf(!1)};return W8(i)&&(i=i.catch(r=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(o)),r})),[i,()=>{s(),Promise.resolve().then(o)}]}let F4=!0;function yO(e){const t=e5(e),n=e.proxy,i=e.ctx;F4=!1,t.beforeCreate&&J6(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:r,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:g,activated:m,deactivated:y,beforeDestroy:w,beforeUnmount:k,destroyed:A,unmounted:v,render:x,renderTracked:E,renderTriggered:S,errorCaptured:M,serverPrefetch:_,expose:N,inheritAttrs:D,components:T,directives:$,filters:P}=t;if(u&&bO(u,i,null),r)for(const W in r){const z=r[W];hn(z)&&(i[W]=z.bind(n))}if(s){const W=s.call(n,n);si(W)&&(e.data=Ts(W))}if(F4=!0,o)for(const W in o){const z=o[W],G=hn(z)?z.bind(n,n):hn(z.get)?z.get.bind(n,n):Pr,K=!hn(z)&&hn(z.set)?z.set.bind(n):Pr,H=F({get:G,set:K});Object.defineProperty(i,W,{enumerable:!0,configurable:!0,get:()=>H.value,set:q=>H.value=q})}if(l)for(const W in l)pI(l[W],i,n,W);if(a){const W=hn(a)?a.call(n):a;Reflect.ownKeys(W).forEach(z=>{Pn(z,W[z])})}c&&J6(c,e,"c");function R(W,z){Xt(z)?z.forEach(G=>W(G.bind(n))):z&&W(z.bind(n))}if(R(cO,d),R(pn,f),R(cI,p),R(vp,g),R(lO,m),R(aO,y),R(pO,M),R(hO,E),R(fO,S),R(Gn,k),R(An,v),R(dO,_),Xt(N))if(N.length){const W=e.exposed||(e.exposed={});N.forEach(z=>{Object.defineProperty(W,z,{get:()=>n[z],set:G=>n[z]=G,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===Pr&&(e.render=x),D!=null&&(e.inheritAttrs=D),T&&(e.components=T),$&&(e.directives=$),_&&G8(e)}function bO(e,t,n=Pr){Xt(e)&&(e=B4(e));for(const i in e){const s=e[i];let o;si(s)?"default"in s?o=an(s.from||i,s.default,!0):o=an(s.from||i):o=an(s),ls(o)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[i]=o}}function J6(e,t,n){Hr(Xt(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function pI(e,t,n,i){let s=i.includes(".")?tI(n,i):()=>n[i];if(wi(e)){const o=t[e];hn(o)&&Qe(s,o)}else if(hn(e))Qe(s,e.bind(n));else if(si(e))if(Xt(e))e.forEach(o=>pI(o,t,n,i));else{const o=hn(e.handler)?e.handler.bind(n):t[e.handler];hn(o)&&Qe(s,o,e)}}function e5(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,l=o.get(t);let a;return l?a=l:!s.length&&!n&&!i?a=t:(a={},s.length&&s.forEach(u=>im(a,u,r,!0)),im(a,t,r)),si(t)&&o.set(t,a),a}function im(e,t,n,i=!1){const{mixins:s,extends:o}=t;o&&im(e,o,n,!0),s&&s.forEach(r=>im(e,r,n,!0));for(const r in t)if(!(i&&r==="expose")){const l=kO[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const kO={data:X6,props:e7,emits:e7,methods:Ph,computed:Ph,beforeCreate:Io,created:Io,beforeMount:Io,mounted:Io,beforeUpdate:Io,updated:Io,beforeDestroy:Io,beforeUnmount:Io,destroyed:Io,unmounted:Io,activated:Io,deactivated:Io,errorCaptured:Io,serverPrefetch:Io,components:Ph,directives:Ph,watch:CO,provide:X6,inject:AO};function X6(e,t){return t?e?function(){return gi(hn(e)?e.call(this,this):e,hn(t)?t.call(this,this):t)}:t:e}function AO(e,t){return Ph(B4(e),B4(t))}function B4(e){if(Xt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Io(e,t){return e?[...new Set([].concat(e,t))]:t}function Ph(e,t){return e?gi(Object.create(null),e,t):t}function e7(e,t){return e?Xt(e)&&Xt(t)?[...new Set([...e,...t])]:gi(Object.create(null),O1(e),O1(t??{})):t}function CO(e,t){if(!e)return t;if(!t)return e;const n=gi(Object.create(null),e);for(const i in t)n[i]=Io(e[i],t[i]);return n}function gI(){return{app:null,config:{isNativeTag:xM,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let wO=0;function xO(e,t){return function(i,s=null){hn(i)||(i=gi({},i)),s!=null&&!si(s)&&(s=null);const o=gI(),r=new WeakSet,l=[];let a=!1;const u=o.app={_uid:wO++,_component:i,_props:s,_container:null,_context:o,_instance:null,version:XO,get config(){return o.config},set config(c){},use(c,...d){return r.has(c)||(c&&hn(c.install)?(r.add(c),c.install(u,...d)):hn(c)&&(r.add(c),c(u,...d))),u},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),u},component(c,d){return d?(o.components[c]=d,u):o.components[c]},directive(c,d){return d?(o.directives[c]=d,u):o.directives[c]},mount(c,d,f){if(!a){const p=u._ceVNode||V(i,s);return p.appContext=o,f===!0?f="svg":f===!1&&(f=void 0),d&&t?t(p,c):e(p,c,f),a=!0,u._container=c,c.__vue_app__=u,yp(p.component)}},onUnmount(c){l.push(c)},unmount(){a&&(Hr(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return o.provides[c]=d,u},runWithContext(c){const d=$c;$c=u;try{return c()}finally{$c=d}}};return u}}let $c=null;function eYe(e,t,n=$n){const i=As(),s=Ls(t),o=er(t),r=mI(e,s),l=Mz((a,u)=>{let c,d=$n,f;return jz(()=>{const p=e[s];js(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const g=n.set?n.set(p):p;if(!js(g,c)&&!(d!==$n&&js(p,d)))return;const m=i.vnode.props,y=!!(m&&(t in m||s in m||o in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${o}`in m));y||(c=p,u()),i.emit(`update:${t}`,g),js(p,d)&&(js(p,g)&&!js(g,f)||y&&d!==$n&&!js(g,c))&&u(),d=p,f=g}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?r||$n:l,done:!1}:{done:!0}}}},l}const mI=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ls(t)}Modifiers`]||e[`${er(t)}Modifiers`];function _O(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||$n;let s=n;const o=t.startsWith("update:"),r=o&&mI(i,t.slice(7));r&&(r.trim&&(s=n.map(c=>wi(c)?c.trim():c)),r.number&&(s=n.map(R2)));let l,a=i[l=mg(t)]||i[l=mg(Ls(t))];!a&&o&&(a=i[l=mg(er(t))]),a&&Hr(a,e,6,s);const u=i[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Hr(u,e,6,s)}}const SO=new WeakMap;function vI(e,t,n=!1){const i=n?SO:t.emitsCache,s=i.get(e);if(s!==void 0)return s;const o=e.emits;let r={},l=!1;if(!hn(e)){const a=u=>{const c=vI(u,t,!0);c&&(l=!0,gi(r,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(si(e)&&i.set(e,null),null):(Xt(o)?o.forEach(a=>r[a]=null):gi(r,o),si(e)&&i.set(e,r),r)}function Z2(e,t){return!e||!hp(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ii(e,t[0].toLowerCase()+t.slice(1))||ii(e,er(t))||ii(e,t))}function yg(e){const{type:t,vnode:n,proxy:i,withProxy:s,propsOptions:[o],slots:r,attrs:l,emit:a,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:g,inheritAttrs:m}=e,y=R1(e);let w,k;try{if(n.shapeFlag&4){const v=s||i,x=v;w=Xo(u.call(x,v,c,d,p,f,g)),k=l}else{const v=t;w=Xo(v.length>1?v(d,{attrs:l,slots:r,emit:a}):v(d,null)),k=t.props?l:IO(l)}}catch(v){a1.length=0,zf(v,e,1),w=V(ms)}let A=w;if(k&&m!==!1){const v=Object.keys(k),{shapeFlag:x}=A;v.length&&x&7&&(o&&v.some(N2)&&(k=EO(k,o)),A=Sa(A,k,!1,!0))}return n.dirs&&(A=Sa(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&bu(A,n.transition),w=A,R1(y),w}function MO(e,t=!0){let n;for(let i=0;i<e.length;i++){const s=e[i];if(ku(s)){if(s.type!==ms||s.children==="v-if"){if(n)return;n=s}}else return}return n}const IO=e=>{let t;for(const n in e)(n==="class"||n==="style"||hp(n))&&((t||(t={}))[n]=e[n]);return t},EO=(e,t)=>{const n={};for(const i in e)(!N2(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function TO(e,t,n){const{props:i,children:s,component:o}=e,{props:r,children:l,patchFlag:a}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return i?t7(i,r,u):!!r;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(yI(r,i,f)&&!Z2(u,f))return!0}}}else return(s||l)&&(!l||!l.$stable)?!0:i===r?!1:i?r?t7(i,r,u):!0:!!r;return!1}function t7(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let s=0;s<i.length;s++){const o=i[s];if(yI(t,e,o)&&!Z2(n,o))return!0}return!1}function yI(e,t,n){const i=e[n],s=t[n];return n==="style"&&si(i)&&si(s)?!xa(i,s):i!==s}function G2({vnode:e,parent:t,suspense:n},i){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.suspense.vnode.el=s.el=i,e=s),s===e)(e=t.vnode).el=i,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=i)}const bI={},kI=()=>Object.create(bI),AI=e=>Object.getPrototypeOf(e)===bI;function LO(e,t,n,i=!1){const s={},o=kI();e.propsDefaults=Object.create(null),CI(e,t,s,o);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);n?e.props=i?s:KM(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function NO(e,t,n,i){const{props:s,attrs:o,vnode:{patchFlag:r}}=e,l=Vn(s),[a]=e.propsOptions;let u=!1;if((i||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Z2(e.emitsOptions,f))continue;const p=t[f];if(a)if(ii(o,f))p!==o[f]&&(o[f]=p,u=!0);else{const g=Ls(f);s[g]=$4(a,l,g,p,e,!1)}else p!==o[f]&&(o[f]=p,u=!0)}}}else{CI(e,t,s,o)&&(u=!0);let c;for(const d in l)(!t||!ii(t,d)&&((c=er(d))===d||!ii(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=$4(a,l,d,void 0,e,!0)):delete s[d]);if(o!==l)for(const d in o)(!t||!ii(t,d))&&(delete o[d],u=!0)}u&&fa(e.attrs,"set","")}function CI(e,t,n,i){const[s,o]=e.propsOptions;let r=!1,l;if(t)for(let a in t){if(Fc(a))continue;const u=t[a];let c;s&&ii(s,c=Ls(a))?!o||!o.includes(c)?n[c]=u:(l||(l={}))[c]=u:Z2(e.emitsOptions,a)||(!(a in i)||u!==i[a])&&(i[a]=u,r=!0)}if(o){const a=Vn(n),u=l||$n;for(let c=0;c<o.length;c++){const d=o[c];n[d]=$4(s,a,d,u[d],e,!ii(u,d))}}return r}function $4(e,t,n,i,s,o){const r=e[n];if(r!=null){const l=ii(r,"default");if(l&&i===void 0){const a=r.default;if(r.type!==Function&&!r.skipFactory&&hn(a)){const{propsDefaults:u}=s;if(n in u)i=u[n];else{const c=Pf(s);i=u[n]=a.call(null,t),c()}}else i=a;s.ce&&s.ce._setProp(n,i)}r[0]&&(o&&!l?i=!1:r[1]&&(i===""||i===er(n))&&(i=!0))}return i}const FO=new WeakMap;function wI(e,t,n=!1){const i=n?FO:t.propsCache,s=i.get(e);if(s)return s;const o=e.props,r={},l=[];let a=!1;if(!hn(e)){const c=d=>{a=!0;const[f,p]=wI(d,t,!0);gi(r,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!a)return si(e)&&i.set(e,tf),tf;if(Xt(o))for(let c=0;c<o.length;c++){const d=Ls(o[c]);n7(d)&&(r[d]=$n)}else if(o)for(const c in o){const d=Ls(c);if(n7(d)){const f=o[c],p=r[d]=Xt(f)||hn(f)?{type:f}:gi({},f),g=p.type;let m=!1,y=!0;if(Xt(g))for(let w=0;w<g.length;++w){const k=g[w],A=hn(k)&&k.name;if(A==="Boolean"){m=!0;break}else A==="String"&&(y=!1)}else m=hn(g)&&g.name==="Boolean";p[0]=m,p[1]=y,(m||ii(p,"default"))&&l.push(d)}}const u=[r,l];return si(e)&&i.set(e,u),u}function n7(e){return e[0]!=="$"&&!Fc(e)}const t5=e=>e==="_"||e==="_ctx"||e==="$stable",n5=e=>Xt(e)?e.map(Xo):[Xo(e)],BO=(e,t,n)=>{if(t._n)return t;const i=he((...s)=>n5(t(...s)),n);return i._c=!1,i},xI=(e,t,n)=>{const i=e._ctx;for(const s in e){if(t5(s))continue;const o=e[s];if(hn(o))t[s]=BO(s,o,i);else if(o!=null){const r=n5(o);t[s]=()=>r}}},_I=(e,t)=>{const n=n5(t);e.slots.default=()=>n},SI=(e,t,n)=>{for(const i in t)(n||!t5(i))&&(e[i]=t[i])},$O=(e,t,n)=>{const i=e.slots=kI();if(e.vnode.shapeFlag&32){const s=t._;s?(SI(i,t,n),n&&SM(i,"_",s,!0)):xI(t,i)}else t&&_I(e,t)},DO=(e,t,n)=>{const{vnode:i,slots:s}=e;let o=!0,r=$n;if(i.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:SI(s,t,n):(o=!t.$stable,xI(t,s)),r=t}else t&&(_I(e,t),r={default:1});if(o)for(const l in s)!t5(l)&&r[l]==null&&delete s[l]},hs=NI;function RO(e){return MI(e)}function zO(e){return MI(e,Yz)}function MI(e,t){const n=z2();n.__VUE__=!0;const{insert:i,remove:s,patchProp:o,createElement:r,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=Pr,insertStaticContent:g}=e,m=(j,Y,ve,re=null,se=null,U=null,J=void 0,de=null,me=!!Y.dynamicChildren)=>{if(j===Y)return;j&&!il(j,Y)&&(re=xe(j),q(j,se,U,!0),j=null),Y.patchFlag===-2&&(me=!1,Y.dynamicChildren=null);const{type:Ie,ref:je,shapeFlag:ke}=Y;switch(Ie){case hu:y(j,Y,ve,re);break;case ms:w(j,Y,ve,re);break;case af:j==null&&k(Y,ve,re,J);break;case Be:T(j,Y,ve,re,se,U,J,de,me);break;default:ke&1?x(j,Y,ve,re,se,U,J,de,me):ke&6?$(j,Y,ve,re,se,U,J,de,me):(ke&64||ke&128)&&Ie.process(j,Y,ve,re,se,U,J,de,me,Ne)}je!=null&&se?rf(je,j&&j.ref,U,Y||j,!Y):je==null&&j&&j.ref!=null&&rf(j.ref,null,U,j,!0)},y=(j,Y,ve,re)=>{if(j==null)i(Y.el=l(Y.children),ve,re);else{const se=Y.el=j.el;Y.children!==j.children&&u(se,Y.children)}},w=(j,Y,ve,re)=>{j==null?i(Y.el=a(Y.children||""),ve,re):Y.el=j.el},k=(j,Y,ve,re)=>{[j.el,j.anchor]=g(j.children,Y,ve,re,j.el,j.anchor)},A=({el:j,anchor:Y},ve,re)=>{let se;for(;j&&j!==Y;)se=f(j),i(j,ve,re),j=se;i(Y,ve,re)},v=({el:j,anchor:Y})=>{let ve;for(;j&&j!==Y;)ve=f(j),s(j),j=ve;s(Y)},x=(j,Y,ve,re,se,U,J,de,me)=>{if(Y.type==="svg"?J="svg":Y.type==="math"&&(J="mathml"),j==null)E(Y,ve,re,se,U,J,de,me);else{const Ie=j.el&&j.el._isVueCE?j.el:null;try{Ie&&Ie._beginPatch(),_(j,Y,se,U,J,de,me)}finally{Ie&&Ie._endPatch()}}},E=(j,Y,ve,re,se,U,J,de)=>{let me,Ie;const{props:je,shapeFlag:ke,transition:Le,dirs:it}=j;if(me=j.el=r(j.type,U,je&&je.is,je),ke&8?c(me,j.children):ke&16&&M(j.children,me,null,re,se,O9(j,U),J,de),it&&Bl(j,null,re,"created"),S(me,j,j.scopeId,J,re),je){for(const Re in je)Re!=="value"&&!Fc(Re)&&o(me,Re,null,je[Re],U,re);"value"in je&&o(me,"value",null,je.value,U),(Ie=je.onVnodeBeforeMount)&&Go(Ie,re,j)}it&&Bl(j,null,re,"beforeMount");const Fe=II(se,Le);Fe&&Le.beforeEnter(me),i(me,Y,ve),((Ie=je&&je.onVnodeMounted)||Fe||it)&&hs(()=>{try{Ie&&Go(Ie,re,j),Fe&&Le.enter(me),it&&Bl(j,null,re,"mounted")}finally{}},se)},S=(j,Y,ve,re,se)=>{if(ve&&p(j,ve),re)for(let U=0;U<re.length;U++)p(j,re[U]);if(se){let U=se.subTree;if(Y===U||om(U.type)&&(U.ssContent===Y||U.ssFallback===Y)){const J=se.vnode;S(j,J,J.scopeId,J.slotScopeIds,se.parent)}}},M=(j,Y,ve,re,se,U,J,de,me=0)=>{for(let Ie=me;Ie<j.length;Ie++){const je=j[Ie]=de?da(j[Ie]):Xo(j[Ie]);m(null,je,Y,ve,re,se,U,J,de)}},_=(j,Y,ve,re,se,U,J)=>{const de=Y.el=j.el;let{patchFlag:me,dynamicChildren:Ie,dirs:je}=Y;me|=j.patchFlag&16;const ke=j.props||$n,Le=Y.props||$n;let it;if(ve&&sc(ve,!1),(it=Le.onVnodeBeforeUpdate)&&Go(it,ve,Y,j),je&&Bl(Y,j,ve,"beforeUpdate"),ve&&sc(ve,!0),Ie&&(!j.dynamicChildren||j.dynamicChildren.length!==Ie.length)&&(me=0,J=!1,Ie=null),(ke.innerHTML&&Le.innerHTML==null||ke.textContent&&Le.textContent==null)&&c(de,""),Ie?N(j.dynamicChildren,Ie,de,ve,re,O9(Y,se),U):J||z(j,Y,de,null,ve,re,O9(Y,se),U,!1),me>0){if(me&16)D(de,ke,Le,ve,se);else if(me&2&&ke.class!==Le.class&&o(de,"class",null,Le.class,se),me&4&&o(de,"style",ke.style,Le.style,se),me&8){const Fe=Y.dynamicProps;for(let Re=0;Re<Fe.length;Re++){const Ke=Fe[Re],ht=ke[Ke],ot=Le[Ke];(ot!==ht||Ke==="value")&&o(de,Ke,ht,ot,se,ve)}}me&1&&j.children!==Y.children&&c(de,Y.children)}else!J&&Ie==null&&D(de,ke,Le,ve,se);((it=Le.onVnodeUpdated)||je)&&hs(()=>{it&&Go(it,ve,Y,j),je&&Bl(Y,j,ve,"updated")},re)},N=(j,Y,ve,re,se,U,J)=>{for(let de=0;de<Y.length;de++){const me=j[de],Ie=Y[de],je=me.el&&(me.type===Be||!il(me,Ie)||me.shapeFlag&198)?d(me.el):ve;m(me,Ie,je,null,re,se,U,J,!0)}},D=(j,Y,ve,re,se)=>{if(Y!==ve){if(Y!==$n)for(const U in Y)!Fc(U)&&!(U in ve)&&o(j,U,Y[U],null,se,re);for(const U in ve){if(Fc(U))continue;const J=ve[U],de=Y[U];J!==de&&U!=="value"&&o(j,U,de,J,se,re)}"value"in ve&&o(j,"value",Y.value,ve.value,se)}},T=(j,Y,ve,re,se,U,J,de,me)=>{const Ie=Y.el=j?j.el:l(""),je=Y.anchor=j?j.anchor:l("");let{patchFlag:ke,dynamicChildren:Le,slotScopeIds:it}=Y;it&&(de=de?de.concat(it):it),j==null?(i(Ie,ve,re),i(je,ve,re),M(Y.children||[],ve,je,se,U,J,de,me)):ke>0&&ke&64&&Le&&j.dynamicChildren&&j.dynamicChildren.length===Le.length?(N(j.dynamicChildren,Le,ve,se,U,J,de),(Y.key!=null||se&&Y===se.subTree)&&i5(j,Y,!0)):z(j,Y,ve,je,se,U,J,de,me)},$=(j,Y,ve,re,se,U,J,de,me)=>{Y.slotScopeIds=de,j==null?Y.shapeFlag&512?se.ctx.activate(Y,ve,re,J,me):P(Y,ve,re,se,U,J,me):O(j,Y,me)},P=(j,Y,ve,re,se,U,J)=>{const de=j.component=RI(j,re,se);if(mp(j)&&(de.ctx.renderer=Ne),OI(de,!1,J),de.asyncDep){if(se&&se.registerDep(de,R,J),!j.el){const me=de.subTree=V(ms);w(null,me,Y,ve),j.placeholder=me.el}}else R(de,j,Y,ve,se,U,J)},O=(j,Y,ve)=>{const re=Y.component=j.component;if(TO(j,Y,ve))if(re.asyncDep&&!re.asyncResolved){W(re,Y,ve);return}else re.next=Y,re.update();else Y.el=j.el,re.vnode=Y},R=(j,Y,ve,re,se,U,J)=>{const de=()=>{if(j.isMounted){let{next:ke,bu:Le,u:it,parent:Fe,vnode:Re}=j;{const Tt=EI(j);if(Tt){ke&&(ke.el=Re.el,W(j,ke,J)),Tt.asyncDep.then(()=>{hs(()=>{j.isUnmounted||Ie()},se)});return}}let Ke=ke,ht;sc(j,!1),ke?(ke.el=Re.el,W(j,ke,J)):ke=Re,Le&&sf(Le),(ht=ke.props&&ke.props.onVnodeBeforeUpdate)&&Go(ht,Fe,ke,Re),sc(j,!0);const ot=yg(j),gt=j.subTree;j.subTree=ot,m(gt,ot,d(gt.el),xe(gt),j,se,U),ke.el=ot.el,Ke===null&&G2(j,ot.el),it&&hs(it,se),(ht=ke.props&&ke.props.onVnodeUpdated)&&hs(()=>Go(ht,Fe,ke,Re),se)}else{let ke;const{el:Le,props:it}=Y,{bm:Fe,m:Re,parent:Ke,root:ht,type:ot}=j,gt=ka(Y);if(sc(j,!1),Fe&&sf(Fe),!gt&&(ke=it&&it.onVnodeBeforeMount)&&Go(ke,Ke,Y),sc(j,!0),Le&&ye){const Tt=()=>{j.subTree=yg(j),ye(Le,j.subTree,j,se,null)};gt&&ot.__asyncHydrate?ot.__asyncHydrate(Le,j,Tt):Tt()}else{ht.ce&&ht.ce._hasShadowRoot()&&ht.ce._injectChildStyle(ot,j.parent?j.parent.type:void 0);const Tt=j.subTree=yg(j);m(null,Tt,ve,re,j,se,U),Y.el=Tt.el}if(Re&&hs(Re,se),!gt&&(ke=it&&it.onVnodeMounted)){const Tt=Y;hs(()=>Go(ke,Ke,Tt),se)}(Y.shapeFlag&256||Ke&&ka(Ke.vnode)&&Ke.vnode.shapeFlag&256)&&j.a&&hs(j.a,se),j.isMounted=!0,Y=ve=re=null}};j.scope.on();const me=j.effect=new Gg(de);j.scope.off();const Ie=j.update=me.run.bind(me),je=j.job=me.runIfDirty.bind(me);je.i=j,je.id=j.uid,me.scheduler=()=>V8(je),sc(j,!0),Ie()},W=(j,Y,ve)=>{Y.component=j;const re=j.vnode.props;j.vnode=Y,j.next=null,NO(j,Y.props,re,ve),DO(j,Y.children,ve),Wl(),q6(j),ql()},z=(j,Y,ve,re,se,U,J,de,me=!1)=>{const Ie=j&&j.children,je=j?j.shapeFlag:0,ke=Y.children,{patchFlag:Le,shapeFlag:it}=Y;if(Le>0){if(Le&128){K(Ie,ke,ve,re,se,U,J,de,me);return}else if(Le&256){G(Ie,ke,ve,re,se,U,J,de,me);return}}it&8?(je&16&&ie(Ie,se,U),ke!==Ie&&c(ve,ke)):je&16?it&16?K(Ie,ke,ve,re,se,U,J,de,me):ie(Ie,se,U,!0):(je&8&&c(ve,""),it&16&&M(ke,ve,re,se,U,J,de,me))},G=(j,Y,ve,re,se,U,J,de,me)=>{j=j||tf,Y=Y||tf;const Ie=j.length,je=Y.length,ke=Math.min(Ie,je);let Le;for(Le=0;Le<ke;Le++){const it=Y[Le]=me?da(Y[Le]):Xo(Y[Le]);m(j[Le],it,ve,null,se,U,J,de,me)}Ie>je?ie(j,se,U,!0,!1,ke):M(Y,ve,re,se,U,J,de,me,ke)},K=(j,Y,ve,re,se,U,J,de,me)=>{let Ie=0;const je=Y.length;let ke=j.length-1,Le=je-1;for(;Ie<=ke&&Ie<=Le;){const it=j[Ie],Fe=Y[Ie]=me?da(Y[Ie]):Xo(Y[Ie]);if(il(it,Fe))m(it,Fe,ve,null,se,U,J,de,me);else break;Ie++}for(;Ie<=ke&&Ie<=Le;){const it=j[ke],Fe=Y[Le]=me?da(Y[Le]):Xo(Y[Le]);if(il(it,Fe))m(it,Fe,ve,null,se,U,J,de,me);else break;ke--,Le--}if(Ie>ke){if(Ie<=Le){const it=Le+1,Fe=it<je?Y[it].el:re;for(;Ie<=Le;)m(null,Y[Ie]=me?da(Y[Ie]):Xo(Y[Ie]),ve,Fe,se,U,J,de,me),Ie++}}else if(Ie>Le)for(;Ie<=ke;)q(j[Ie],se,U,!0),Ie++;else{const it=Ie,Fe=Ie,Re=new Map;for(Ie=Fe;Ie<=Le;Ie++){const Kt=Y[Ie]=me?da(Y[Ie]):Xo(Y[Ie]);Kt.key!=null&&Re.set(Kt.key,Ie)}let Ke,ht=0;const ot=Le-Fe+1;let gt=!1,Tt=0;const yn=new Array(ot);for(Ie=0;Ie<ot;Ie++)yn[Ie]=0;for(Ie=it;Ie<=ke;Ie++){const Kt=j[Ie];if(ht>=ot){q(Kt,se,U,!0);continue}let mn;if(Kt.key!=null)mn=Re.get(Kt.key);else for(Ke=Fe;Ke<=Le;Ke++)if(yn[Ke-Fe]===0&&il(Kt,Y[Ke])){mn=Ke;break}mn===void 0?q(Kt,se,U,!0):(yn[mn-Fe]=Ie+1,mn>=Tt?Tt=mn:gt=!0,m(Kt,Y[mn],ve,null,se,U,J,de,me),ht++)}const Gt=gt?OO(yn):tf;for(Ke=Gt.length-1,Ie=ot-1;Ie>=0;Ie--){const Kt=Fe+Ie,mn=Y[Kt],_n=Y[Kt+1],He=Kt+1<je?_n.el||TI(_n):re;yn[Ie]===0?m(null,mn,ve,He,se,U,J,de,me):gt&&(Ke<0||Ie!==Gt[Ke]?H(mn,ve,He,2):Ke--)}}},H=(j,Y,ve,re,se=null)=>{const{el:U,type:J,transition:de,children:me,shapeFlag:Ie}=j;if(Ie&6){H(j.component.subTree,Y,ve,re);return}if(Ie&128){j.suspense.move(Y,ve,re);return}if(Ie&64){J.move(j,Y,ve,Ne);return}if(J===Be){i(U,Y,ve);for(let ke=0;ke<me.length;ke++)H(me[ke],Y,ve,re);i(j.anchor,Y,ve);return}if(J===af){A(j,Y,ve);return}if(re!==2&&Ie&1&&de)if(re===0)de.persisted&&!U[Dr]?i(U,Y,ve):(de.beforeEnter(U),i(U,Y,ve),hs(()=>de.enter(U),se));else{const{leave:ke,delayLeave:Le,afterLeave:it}=de,Fe=()=>{j.ctx.isUnmounted?s(U):i(U,Y,ve)},Re=()=>{const Ke=U._isLeaving||!!U[Dr];U._isLeaving&&U[Dr](!0),de.persisted&&!Ke?Fe():ke(U,()=>{Fe(),it&&it()})};Le?Le(U,Fe,Re):Re()}else i(U,Y,ve)},q=(j,Y,ve,re=!1,se=!1)=>{const{type:U,props:J,ref:de,children:me,dynamicChildren:Ie,shapeFlag:je,patchFlag:ke,dirs:Le,cacheIndex:it,memo:Fe}=j;if(ke===-2&&(se=!1),de!=null&&(Wl(),rf(de,null,ve,j,!0),ql()),it!=null&&(Y.renderCache[it]=void 0),je&256){Y.ctx.deactivate(j);return}const Re=je&1&&Le,Ke=!ka(j);let ht;if(Ke&&(ht=J&&J.onVnodeBeforeUnmount)&&Go(ht,Y,j),je&6)ue(j.component,ve,re);else{if(je&128){j.suspense.unmount(ve,re);return}Re&&Bl(j,null,Y,"beforeUnmount"),je&64?j.type.remove(j,Y,ve,Ne,re):Ie&&!Ie.hasOnce&&(U!==Be||ke>0&&ke&64)?ie(Ie,Y,ve,!1,!0):(U===Be&&ke&384||!se&&je&16)&&ie(me,Y,ve),re&&X(j)}const ot=Fe!=null&&it==null;(Ke&&(ht=J&&J.onVnodeUnmounted)||Re||ot)&&hs(()=>{ht&&Go(ht,Y,j),Re&&Bl(j,null,Y,"unmounted"),ot&&(j.el=null)},ve)},X=j=>{const{type:Y,el:ve,anchor:re,transition:se}=j;if(Y===Be){ee(ve,re);return}if(Y===af){v(j);return}const U=()=>{s(ve),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(j.shapeFlag&1&&se&&!se.persisted){const{leave:J,delayLeave:de}=se,me=()=>J(ve,U);de?de(j.el,U,me):me()}else U()},ee=(j,Y)=>{let ve;for(;j!==Y;)ve=f(j),s(j),j=ve;s(Y)},ue=(j,Y,ve)=>{const{bum:re,scope:se,job:U,subTree:J,um:de,m:me,a:Ie}=j;sm(me),sm(Ie),re&&sf(re),se.stop(),U&&(U.flags|=8,q(J,j,Y,ve)),de&&hs(de,Y),hs(()=>{j.isUnmounted=!0},Y)},ie=(j,Y,ve,re=!1,se=!1,U=0)=>{for(let J=U;J<j.length;J++)q(j[J],Y,ve,re,se)},xe=j=>{if(j.shapeFlag&6)return xe(j.component.subTree);if(j.shapeFlag&128)return j.suspense.next();const Y=f(j.anchor||j.el),ve=Y&&Y[nI];return ve?f(ve):Y};let ce=!1;const pe=(j,Y,ve)=>{let re;j==null?Y._vnode&&(q(Y._vnode,null,null,!0),re=Y._vnode.component):m(Y._vnode||null,j,Y,null,null,null,ve),Y._vnode=j,ce||(ce=!0,q6(re),em(),ce=!1)},Ne={p:m,um:q,m:H,r:X,mt:P,mc:M,pc:z,pbc:N,n:xe,o:e};let te,ye;return t&&([te,ye]=t(Ne)),{render:pe,hydrate:te,createApp:xO(pe,te)}}function O9({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function sc({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function II(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function i5(e,t,n=!1){const i=e.children,s=t.children;if(Xt(i)&&Xt(s))for(let o=0;o<i.length;o++){const r=i[o];let l=s[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=s[o]=da(s[o]),l.el=r.el),!n&&l.patchFlag!==-2&&i5(r,l)),l.type===hu&&(l.patchFlag===-1&&(l=s[o]=da(l)),l.el=r.el),l.type===ms&&!l.el&&(l.el=r.el)}}function OO(e){const t=e.slice(),n=[0];let i,s,o,r,l;const a=e.length;for(i=0;i<a;i++){const u=e[i];if(u!==0){if(s=n[n.length-1],e[s]<u){t[i]=s,n.push(i);continue}for(o=0,r=n.length-1;o<r;)l=o+r>>1,e[n[l]]<u?o=l+1:r=l;u<e[n[o]]&&(o>0&&(t[i]=n[o-1]),n[o]=i)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=t[r];return n}function EI(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:EI(t)}function sm(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function TI(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?TI(t.subTree):null}const om=e=>e.__isSuspense;let D4=0;const PO={name:"Suspense",__isSuspense:!0,process(e,t,n,i,s,o,r,l,a,u){if(e==null)jO(t,n,i,s,o,r,l,a,u);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}HO(e,t,n,i,s,r,l,a,u)}},hydrate:WO,normalize:qO},tYe=PO;function P1(e,t){const n=e.props&&e.props[t];hn(n)&&n()}function jO(e,t,n,i,s,o,r,l,a){const{p:u,o:{createElement:c}}=a,d=c("div"),f=e.suspense=LI(e,s,i,t,d,n,o,r,l,a);u(null,f.pendingBranch=e.ssContent,d,null,i,f,o,r),f.deps>0?(P1(e,"onPending"),P1(e,"onFallback"),u(null,e.ssFallback,t,n,i,null,o,r),lf(f,e.ssFallback)):f.resolve(!1,!0)}function HO(e,t,n,i,s,o,r,l,{p:a,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,p=t.ssFallback,{activeBranch:g,pendingBranch:m,isInFallback:y,isHydrating:w}=d;if(m)d.pendingBranch=f,il(m,f)?(a(m,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0?d.resolve():y&&(w||(a(g,p,n,i,s,null,o,r,l),lf(d,p)))):(d.pendingId=D4++,w?(d.isHydrating=!1,d.activeBranch=m):u(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),y?(a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0?d.resolve():(a(g,p,n,i,s,null,o,r,l),lf(d,p))):g&&il(g,f)?(a(g,f,n,i,s,d,o,r,l),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0&&d.resolve()));else if(g&&il(g,f))a(g,f,n,i,s,d,o,r,l),lf(d,f);else if(P1(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=D4++,a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0)d.resolve();else{const{timeout:k,pendingId:A}=d;k>0?setTimeout(()=>{d.pendingId===A&&d.fallback(p)},k):k===0&&d.fallback(p)}}function LI(e,t,n,i,s,o,r,l,a,u,c=!1){const{p:d,m:f,um:p,n:g,o:{parentNode:m,remove:y}}=u;let w;const k=UO(e);k&&t&&t.pendingBranch&&(w=t.pendingId,t.deps++);const A=e.props?Zg(e.props.timeout):void 0,v=o,x={vnode:e,parent:t,parentComponent:n,namespace:r,container:i,hiddenContainer:s,deps:0,pendingId:D4++,timeout:typeof A=="number"?A:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(E=!1,S=!1){const{vnode:M,activeBranch:_,pendingBranch:N,pendingId:D,effects:T,parentComponent:$,container:P,isInFallback:O}=x;let R=!1;if(x.isHydrating)x.isHydrating=!1;else if(!E){R=_&&N.transition&&N.transition.mode==="out-in";let G=!1;R&&(_.transition.afterLeave=()=>{D===x.pendingId&&(f(N,P,o===v&&!G?g(_):o,0),Xg(T),O&&M.ssFallback&&(M.ssFallback.el=null))}),_&&!x.isFallbackMountPending&&(m(_.el)===P&&(o=g(_),G=!0),p(_,$,x,!0),!R&&O&&M.ssFallback&&hs(()=>M.ssFallback.el=null,x)),R||f(N,P,o,0)}x.isFallbackMountPending=!1,lf(x,N),x.pendingBranch=null,x.isInFallback=!1;let W=x.parent,z=!1;for(;W;){if(W.pendingBranch){W.effects.push(...T),z=!0;break}W=W.parent}!z&&!R&&Xg(T),x.effects=[],k&&t&&t.pendingBranch&&w===t.pendingId&&(t.deps--,t.deps===0&&!S&&t.resolve()),P1(M,"onResolve")},fallback(E){if(!x.pendingBranch)return;const{vnode:S,activeBranch:M,parentComponent:_,container:N,namespace:D}=x;P1(S,"onFallback");const T=g(M),$=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,E,N,T,_,null,D,l,a),lf(x,E))},P=E.transition&&E.transition.mode==="out-in";P&&(x.isFallbackMountPending=!0,M.transition.afterLeave=$),x.isInFallback=!0,p(M,_,null,!0),P||$()},move(E,S,M){x.activeBranch&&f(x.activeBranch,E,S,M),x.container=E},next(){return x.activeBranch&&g(x.activeBranch)},registerDep(E,S,M){const _=!!x.pendingBranch;_&&x.deps++;const N=E.vnode.el;E.asyncDep.catch(D=>{zf(D,E,0)}).then(D=>{if(E.isUnmounted||x.isUnmounted||x.pendingId!==E.suspenseId)return;j1(),E.asyncResolved=!0;const{vnode:T}=E;R4(E,D,!1),N&&(T.el=N);const $=!N&&E.subTree.el;S(E,T,m(N||E.subTree.el),N?null:g(E.subTree),x,r,M),$&&(T.placeholder=null,y($)),G2(E,T.el),_&&--x.deps===0&&x.resolve()})},unmount(E,S){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,E,S),x.pendingBranch&&p(x.pendingBranch,n,E,S)}};return x}function WO(e,t,n,i,s,o,r,l,a){const u=t.suspense=LI(t,i,n,e.parentNode,document.createElement("div"),null,s,o,r,l,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,o,r);return u.deps===0&&u.resolve(!1,!0),c}function qO(e){const{shapeFlag:t,children:n}=e,i=t&32;e.ssContent=i7(i?n.default:n),e.ssFallback=i?i7(n.fallback):V(ms)}function i7(e){let t;if(hn(e)){const n=Wc&&e._c;n&&(e._d=!1,b()),e=e(),n&&(e._d=!0,t=Co,FI())}return Xt(e)&&(e=MO(e)),e=Xo(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function NI(e,t){t&&t.pendingBranch?Xt(e)?t.effects.push(...e):t.effects.push(e):Xg(e)}function lf(e,t){e.activeBranch=t;const{vnode:n,parentComponent:i}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,i&&i.subTree===n&&(i.vnode.el=s,G2(i,s))}function UO(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Be=Symbol.for("v-fgt"),hu=Symbol.for("v-txt"),ms=Symbol.for("v-cmt"),af=Symbol.for("v-stc"),a1=[];let Co=null;function b(e=!1){a1.push(Co=e?null:[])}function FI(){a1.pop(),Co=a1[a1.length-1]||null}let Wc=1;function rm(e,t=!1){Wc+=e,e<0&&Co&&t&&(Co.hasOnce=!0)}function BI(e){return e.dynamicChildren=Wc>0?Co||tf:null,FI(),Wc>0&&Co&&Co.push(e),e}function I(e,t,n,i,s,o){return BI(C(e,t,n,i,s,o,!0))}function fe(e,t,n,i,s){return BI(V(e,t,n,i,s,!0))}function ku(e){return e?e.__v_isVNode===!0:!1}function il(e,t){return e.type===t.type&&e.key===t.key}function nYe(e){}const $I=({key:e})=>e??null,bg=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?wi(e)||ls(e)||hn(e)?{i:oo,r:e,k:t,f:!!n}:e:null);function C(e,t=null,n=null,i=0,s=null,o=e===Be?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$I(t),ref:t&&bg(t),scopeId:K2,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:oo};return l?(lm(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=wi(n)?8:16),Wc>0&&!r&&Co&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&Co.push(a),a}const V=KO;function KO(e,t=null,n=null,i=0,s=null,o=!1){if((!e||e===dI)&&(e=ms),ku(e)){const l=Sa(e,t,!0);return n&&lm(l,n),Wc>0&&!o&&Co&&(l.shapeFlag&6?Co[Co.indexOf(e)]=l:Co.push(l)),l.patchFlag=-2,l}if(YO(e)&&(e=e.__vccOpts),t){t=DI(t);let{class:l,style:a}=t;l&&!wi(l)&&(t.class=De(l)),si(a)&&(U2(a)&&!Xt(a)&&(a=gi({},a)),t.style=Vt(a))}const r=wi(e)?1:om(e)?128:iI(e)?64:si(e)?4:hn(e)?2:0;return C(e,t,n,i,s,r,o,!0)}function DI(e){return e?U2(e)||AI(e)?gi({},e):e:null}function Sa(e,t,n=!1,i=!1){const{props:s,ref:o,patchFlag:r,children:l,transition:a}=e,u=t?Yn(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&$I(u),ref:t&&t.ref?n&&o?Xt(o)?o.concat(bg(t)):[o,bg(t)]:bg(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Be?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Sa(e.ssContent),ssFallback:e.ssFallback&&Sa(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&i&&bu(c,a.clone(c)),c}function Ue(e=" ",t=0){return V(hu,null,e,t)}function Lu(e,t){const n=V(af,null,e);return n.staticCount=t,n}function ne(e="",t=!1){return t?(b(),fe(ms,null,e)):V(ms,null,e)}function Xo(e){return e==null||typeof e=="boolean"?V(ms):Xt(e)?V(Be,null,e.slice()):ku(e)?da(e):V(hu,null,String(e))}function da(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Sa(e)}function lm(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(Xt(t))n=16;else if(typeof t=="object")if(i&65){const s=t.default;s&&(s._c&&(s._d=!1),lm(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!AI(t)?t._ctx=oo:s===3&&oo&&(oo.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(hn(t)){if(i&65){lm(e,{default:t});return}t={default:t,_ctx:oo},n=32}else t=String(t),i&64?(n=16,t=[Ue(t)]):n=8;e.children=t,e.shapeFlag|=n}function Yn(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const s in i)if(s==="class")t.class!==i.class&&(t.class=De([t.class,i.class]));else if(s==="style")t.style=Vt([t.style,i.style]);else if(hp(s)){const o=t[s],r=i[s];r&&o!==r&&!(Xt(o)&&o.includes(r))?t[s]=o?[].concat(o,r):r:r==null&&o==null&&!N2(s)&&(t[s]=r)}else s!==""&&(t[s]=i[s])}return t}function Go(e,t,n,i=null){Hr(e,t,7,[n,i])}const VO=gI();let ZO=0;function RI(e,t,n){const i=e.type,s=(t?t.appContext:e.appContext)||VO,o={uid:ZO++,vnode:e,type:i,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new TM(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:wI(i,s),emitsOptions:vI(i,s),emit:null,emitted:null,propsDefaults:$n,inheritAttrs:i.inheritAttrs,ctx:$n,data:$n,props:$n,attrs:$n,slots:$n,refs:$n,setupState:$n,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=_O.bind(null,o),e.ce&&e.ce(o),o}let so=null;const As=()=>so||oo;let am,uf;{const e=z2(),t=(n,i)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(i),o=>{s.length>1?s.forEach(r=>r(o)):s[0](o)}};am=t("__VUE_INSTANCE_SETTERS__",n=>so=n),uf=t("__VUE_SSR_SETTERS__",n=>qc=n)}const Pf=e=>{const t=so;return am(e),e.scope.on(),()=>{e.scope.off(),am(t)}},j1=()=>{so&&so.scope.off(),am(null)};function zI(e){return e.vnode.shapeFlag&4}let qc=!1;function OI(e,t=!1,n=!1){t&&uf(t);const{props:i,children:s}=e.vnode,o=zI(e);LO(e,i,o,t),$O(e,s,n||t);const r=o?GO(e,t):void 0;return t&&uf(!1),r}function GO(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,N4);const{setup:i}=n;if(i){Wl();const s=e.setupContext=i.length>1?jI(e):null,o=Pf(e),r=pp(i,e,0,[e.props,s]),l=W8(r);if(ql(),o(),(l||e.sp)&&!ka(e)&&G8(e),l){if(r.then(j1,j1),t)return r.then(a=>{R4(e,a,t)}).catch(a=>{zf(a,e,0)});e.asyncDep=r}else R4(e,r,t)}else PI(e,t)}function R4(e,t,n){hn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:si(t)&&(e.setupState=ZM(t)),PI(e,n)}let um,z4;function iYe(e){um=e,z4=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,vO))}}const sYe=()=>!um;function PI(e,t,n){const i=e.type;if(!e.render){if(!t&&um&&!i.render){const s=i.template||e5(e).template;if(s){const{isCustomElement:o,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:a}=i,u=gi(gi({isCustomElement:o,delimiters:l},r),a);i.render=um(s,u)}}e.render=i.render||Pr,z4&&z4(e)}{const s=Pf(e);Wl();try{yO(e)}finally{ql(),s()}}}const QO={get(e,t){return bo(e,"get",""),e[t]}};function jI(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,QO),slots:e.slots,emit:e.emit,expose:t}}function yp(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ZM(wt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in l1)return l1[n](e)},has(t,n){return n in t||n in l1}})):e.proxy}function O4(e,t=!0){return hn(e)?e.displayName||e.name:e.name||t&&e.__name}function YO(e){return hn(e)&&"__vccOpts"in e}const F=(e,t)=>Lz(e,t,qc);function cn(e,t,n){try{rm(-1);const i=arguments.length;return i===2?si(t)&&!Xt(t)?ku(t)?V(e,null,[t]):V(e,t):V(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&ku(n)&&(n=[n]),V(e,t,n))}finally{rm(1)}}function oYe(){}function rYe(e,t,n,i){const s=n[i];if(s&&JO(s,e))return s;const o=t();return o.memo=e.slice(),o.cacheIndex=i,n[i]=o}function JO(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let i=0;i<n.length;i++)if(js(n[i],t[i]))return!1;return Wc>0&&Co&&Co.push(e),!0}const XO="3.5.39",lYe=Pr,aYe=Dz,uYe=zd,cYe=eI,eP={createComponentInstance:RI,setupComponent:OI,renderComponentRoot:yg,setCurrentRenderingInstance:R1,isVNode:ku,normalizeVNode:Xo,getComponentPublicInstance:yp,ensureValidVNode:X8,pushWarningContext:Bz,popWarningContext:$z},dYe=eP,fYe=null,hYe=null,pYe=null;/** -* @vue/runtime-dom v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let P4;const s7=typeof window<"u"&&window.trustedTypes;if(s7)try{P4=s7.createPolicy("vue",{createHTML:e=>e})}catch{}const HI=P4?e=>P4.createHTML(e):e=>e,tP="http://www.w3.org/2000/svg",nP="http://www.w3.org/1998/Math/MathML",aa=typeof document<"u"?document:null,o7=aa&&aa.createElement("template"),iP={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const s=t==="svg"?aa.createElementNS(tP,e):t==="mathml"?aa.createElementNS(nP,e):n?aa.createElement(e,{is:n}):aa.createElement(e);return e==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:e=>aa.createTextNode(e),createComment:e=>aa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>aa.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,s,o){const r=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{o7.innerHTML=HI(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const l=o7.content;if(i==="svg"||i==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Pa="transition",Ah="animation",_f=Symbol("_vtc"),WI={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qI=gi({},oI,WI),sP=e=>(e.displayName="Transition",e.props=qI,e),ys=sP((e,{slots:t})=>cn(Vz,UI(e),t)),oc=(e,t=[])=>{Xt(e)?e.forEach(n=>n(...t)):e&&e(...t)},r7=e=>e?Xt(e)?e.some(t=>t.length>1):e.length>1:!1;function UI(e){const t={};for(const T in e)T in WI||(t[T]=e[T]);if(e.css===!1)return t;const{name:n="v",type:i,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:u=r,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,g=oP(s),m=g&&g[0],y=g&&g[1],{onBeforeEnter:w,onEnter:k,onEnterCancelled:A,onLeave:v,onLeaveCancelled:x,onBeforeAppear:E=w,onAppear:S=k,onAppearCancelled:M=A}=t,_=(T,$,P,O)=>{T._enterCancelled=O,Qa(T,$?c:l),Qa(T,$?u:r),P&&P()},N=(T,$)=>{T._isLeaving=!1,Qa(T,d),Qa(T,p),Qa(T,f),$&&$()},D=T=>($,P)=>{const O=T?S:k,R=()=>_($,T,P);oc(O,[$,R]),l7(()=>{Qa($,T?a:o),Ll($,T?c:l),r7(O)||a7($,i,m,R)})};return gi(t,{onBeforeEnter(T){oc(w,[T]),Ll(T,o),Ll(T,r)},onBeforeAppear(T){oc(E,[T]),Ll(T,a),Ll(T,u)},onEnter:D(!1),onAppear:D(!0),onLeave(T,$){T._isLeaving=!0;const P=()=>N(T,$);Ll(T,d),T._enterCancelled?(Ll(T,f),j4(T)):(j4(T),Ll(T,f)),l7(()=>{T._isLeaving&&(Qa(T,d),Ll(T,p),r7(v)||a7(T,i,y,P))}),oc(v,[T,P])},onEnterCancelled(T){_(T,!1,void 0,!0),oc(A,[T])},onAppearCancelled(T){_(T,!0,void 0,!0),oc(M,[T])},onLeaveCancelled(T){N(T),oc(x,[T])}})}function oP(e){if(e==null)return null;if(si(e))return[P9(e.enter),P9(e.leave)];{const t=P9(e);return[t,t]}}function P9(e){return Zg(e)}function Ll(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[_f]||(e[_f]=new Set)).add(t)}function Qa(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[_f];n&&(n.delete(t),n.size||(e[_f]=void 0))}function l7(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let rP=0;function a7(e,t,n,i){const s=e._endId=++rP,o=()=>{s===e._endId&&i()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:l,propCount:a}=KI(e,t);if(!r)return i();const u=r+"end";let c=0;const d=()=>{e.removeEventListener(u,f),o()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(u,f)}function KI(e,t){const n=window.getComputedStyle(e),i=g=>(n[g]||"").split(", "),s=i(`${Pa}Delay`),o=i(`${Pa}Duration`),r=u7(s,o),l=i(`${Ah}Delay`),a=i(`${Ah}Duration`),u=u7(l,a);let c=null,d=0,f=0;t===Pa?r>0&&(c=Pa,d=r,f=o.length):t===Ah?u>0&&(c=Ah,d=u,f=a.length):(d=Math.max(r,u),c=d>0?r>u?Pa:Ah:null,f=c?c===Pa?o.length:a.length:0);const p=c===Pa&&/\b(?:transform|all)(?:,|$)/.test(i(`${Pa}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function u7(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>c7(n)+c7(e[i])))}function c7(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function j4(e){return(e?e.ownerDocument:document).body.offsetHeight}function lP(e,t,n){const i=e[_f];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const cm=Symbol("_vod"),s5=Symbol("_vsh"),rs={name:"show",beforeMount(e,{value:t},{transition:n}){e[cm]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ch(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),Ch(e,!0),i.enter(e)):i.leave(e,()=>{Ch(e,!1)}):Ch(e,t))},beforeUnmount(e,{value:t}){Ch(e,t)}};function Ch(e,t){e.style.display=t?e[cm]:"none",e[s5]=!t}function aP(){rs.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const VI=Symbol("");function gYe(e){const t=As();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>dm(o,s))},i=()=>{const s=e(t.proxy);t.ce?dm(t.ce,s):H4(t.subTree,s),n(s)};cI(()=>{Xg(i)}),pn(()=>{Qe(i,Pr,{flush:"post"});const s=new MutationObserver(i);s.observe(t.subTree.el.parentNode,{childList:!0}),An(()=>s.disconnect())})}function H4(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{H4(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)dm(e.el,t);else if(e.type===Be)e.children.forEach(n=>H4(n,t));else if(e.type===af){let{el:n,anchor:i}=e;for(;n&&(dm(n,t),n!==i);)n=n.nextSibling}}function dm(e,t){if(e.nodeType===1){const n=e.style;let i="";for(const s in t){const o=iz(t[s]);n.setProperty(`--${s}`,o),i+=`--${s}: ${o};`}n[VI]=i}}const uP=/(?:^|;)\s*display\s*:/;function cP(e,t,n){const i=e.style,s=wi(n);let o=!1;if(n&&!s){if(t)if(wi(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&jh(i,l,"")}else for(const r in t)n[r]==null&&jh(i,r,"");for(const r in n){r==="display"&&(o=!0);const l=n[r];l!=null?fP(e,r,!wi(t)&&t?t[r]:void 0,l)||jh(i,r,l):jh(i,r,"")}}else if(s){if(t!==n){const r=i[VI];r&&(n+=";"+r),i.cssText=n,o=uP.test(n)}}else t&&e.removeAttribute("style");cm in e&&(e[cm]=o?i.display:"",e[s5]&&(i.display="none"))}const d7=/\s*!important$/;function jh(e,t,n){if(Xt(n))n.forEach(i=>jh(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=dP(e,t);d7.test(n)?e.setProperty(er(i),n.replace(d7,""),"important"):e[i]=n}}const f7=["Webkit","Moz","ms"],j9={};function dP(e,t){const n=j9[t];if(n)return n;let i=Ls(t);if(i!=="filter"&&i in e)return j9[t]=i;i=D2(i);for(let s=0;s<f7.length;s++){const o=f7[s]+i;if(o in e)return j9[t]=o}return t}function fP(e,t,n,i){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&wi(i)&&n===i}const h7="http://www.w3.org/1999/xlink";function p7(e,t,n,i,s,o=tz(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(h7,t.slice(6,t.length)):e.setAttributeNS(h7,t,n):n==null||o&&!MM(n)?e.removeAttribute(t):e.setAttribute(t,o?"":_r(n)?String(n):n)}function g7(e,t,n,i,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?HI(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=MM(n):n==null&&l==="string"?(n="",r=!0):l==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(s||t)}function pa(e,t,n,i){e.addEventListener(t,n,i)}function hP(e,t,n,i){e.removeEventListener(t,n,i)}const m7=Symbol("_vei");function pP(e,t,n,i,s=null){const o=e[m7]||(e[m7]={}),r=o[t];if(i&&r)r.value=i;else{const[l,a]=vP(t);if(i){const u=o[t]=kP(i,s);pa(e,l,u,a)}else r&&(hP(e,l,r,a),o[t]=void 0)}}const gP=/(Once|Passive|Capture)$/,mP=/^on:?(?:Once|Passive|Capture)$/;function vP(e){let t,n;for(;(n=e.match(gP))&&!mP.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):er(e.slice(2)),t]}let H9=0;const yP=Promise.resolve(),bP=()=>H9||(yP.then(()=>H9=0),H9=Date.now());function kP(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;const s=n.value;if(Xt(s)){const o=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{o.call(i),i._stopped=!0};const r=s.slice(),l=[i];for(let a=0;a<r.length&&!i._stopped;a++){const u=r[a];u&&Hr(u,t,5,l)}}else Hr(s,t,5,[i])};return n.value=e,n.attached=bP(),n}const v7=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,AP=(e,t,n,i,s,o)=>{const r=s==="svg";t==="class"?lP(e,i,r):t==="style"?cP(e,n,i):hp(t)?N2(t)||pP(e,t,n,i,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):CP(e,t,i,r))?(g7(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&p7(e,t,i,r,o,t!=="value")):e._isVueCE&&(wP(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!wi(i)))?g7(e,Ls(t),i,o,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),p7(e,t,i,r))};function CP(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&v7(t)&&hn(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return v7(t)&&wi(n)?!1:t in e}function wP(e,t){const n=e._def.props;if(!n)return!1;const i=Ls(t);return Array.isArray(n)?n.some(s=>Ls(s)===i):Object.keys(n).some(s=>Ls(s)===i)}const y7={};function xP(e,t,n){let i=tt(e,t);F2(i)&&(i=gi({},i,t));class s extends o5{constructor(r){super(i,r,n)}}return s.def=i,s}const mYe=((e,t)=>xP(e,t,PP)),_P=typeof HTMLElement<"u"?HTMLElement:class{};class o5 extends _P{constructor(t,n={},i=pm){super(),this._def=t,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&i!==pm?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(gi({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof o5){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,kt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(i,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:r}=i;let l;if(o&&!Xt(o))for(const a in o){const u=o[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=Zg(this._props[a])),(l||(l=Object.create(null)))[Ls(a)]=!0)}this._numberProps=l,this._resolveProps(i),this.shadowRoot&&this._applyStyles(r),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>{i.configureApp=this._def.configureApp,t(this._def=i,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const i in n)ii(this,i)||Object.defineProperty(this,i,{get:()=>h(n[i])})}_resolveProps(t){const{props:n}=t,i=Xt(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&i.includes(s)&&this._setProp(s,this[s]);for(const s of i.map(Ls))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(o){this._setProp(s,o,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let i=n?this.getAttribute(t):y7;const s=Ls(t);n&&this._numberProps&&this._numberProps[s]&&(i=Zg(i)),this._setProp(s,i,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,i=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===y7?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),i)){const o=this._ob;o&&(this._processMutations(o.takeRecords()),o.disconnect()),n===!0?this.setAttribute(er(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(er(t),n+""):n||this.removeAttribute(er(t)),o&&o.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),OP(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=V(this._def,gi(t,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const s=(o,r)=>{this.dispatchEvent(new CustomEvent(o,F2(r[0])?gi({detail:r},r[0]):{detail:r}))};i.emit=(o,...r)=>{s(o,r),er(o)!==o&&s(er(o),r)},this._setParent()}),n}_applyStyles(t,n,i){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,o=this.shadowRoot,r=i?this._getStyleAnchor(i)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(o);let l=null;for(let a=t.length-1;a>=0;a--){const u=document.createElement("style");s&&u.setAttribute("nonce",s),u.textContent=t[a],o.insertBefore(u,l||r),l=u,a===0&&(i||this._styleAnchors.set(this._def,u),n&&this._styleAnchors.set(n,u))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n<t.childNodes.length;n++){const i=t.childNodes[n];if(!(i instanceof HTMLStyleElement))return i}return null}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(t[i]||(t[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let i=0;i<t.length;i++){const s=t[i],o=s.getAttribute("name")||"default",r=this._slots[o],l=s.parentNode;if(r)for(const a of r){if(n&&a.nodeType===1){const u=n+"-s",c=document.createTreeWalker(a,1);a.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}l.insertBefore(a,s)}else for(;s.firstChild;)l.insertBefore(s.firstChild,s);l.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const n=new Set;for(const i of t){const s=i.querySelectorAll("slot");for(let o=0;o<s.length;o++)n.add(s[o])}return Array.from(n)}_injectChildStyle(t,n){this._applyStyles(t.styles,t,n)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}}function SP(e){const t=As(),n=t&&t.ce;return n||null}function vYe(){const e=SP();return e&&e.shadowRoot}function yYe(e="$style"){{const t=As();if(!t)return $n;const n=t.type.__cssModules;if(!n)return $n;const i=n[e];return i||$n}}const ZI=new WeakMap,GI=new WeakMap,fm=Symbol("_moveCb"),b7=Symbol("_enterCb"),MP=e=>(delete e.props.mode,e),IP=MP({name:"TransitionGroup",props:gi({},qI,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=As(),i=sI();let s,o;return vp(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!NP(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(EP),s.forEach(TP);const l=s.filter(LP);j4(n.vnode.el),l.forEach(a=>{const u=a.el,c=u.style;Ll(u,r),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[fm]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[fm]=null,Qa(u,r))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const r=Vn(e),l=UI(r);let a=r.tag||Be;if(s=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&!c.el[s5]&&(s.push(c),bu(c,z1(c,l,i,n)),ZI.set(c,YI(c.el)))}o=t.default?Z8(t.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&bu(c,z1(c,l,i,n))}return V(a,null,o)}}}),QI=IP;function EP(e){const t=e.el;t[fm]&&t[fm](),t[b7]&&t[b7]()}function TP(e){GI.set(e,YI(e.el))}function LP(e){const t=ZI.get(e),n=GI.get(e),i=t.left-n.left,s=t.top-n.top;if(i||s){const o=e.el,r=o.style,l=o.getBoundingClientRect();let a=1,u=1;return o.offsetWidth&&(a=l.width/o.offsetWidth),o.offsetHeight&&(u=l.height/o.offsetHeight),(!Number.isFinite(a)||a===0)&&(a=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(a-1)<.01&&(a=1),Math.abs(u-1)<.01&&(u=1),r.transform=r.webkitTransform=`translate(${i/a}px,${s/u}px)`,r.transitionDuration="0s",e}}function YI(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function NP(e,t,n){const i=e.cloneNode(),s=e[_f];s&&s.forEach(l=>{l.split(/\s+/).forEach(a=>a&&i.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&i.classList.add(l)),i.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(i);const{hasTransform:r}=KI(i);return o.removeChild(i),r}const Au=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Xt(t)?n=>sf(t,n):t};function FP(e){e.target.composing=!0}function k7(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const jr=Symbol("_assign");function A7(e,t,n){return t&&(e=e.trim()),n&&(e=R2(e)),e}const _o={created(e,{modifiers:{lazy:t,trim:n,number:i}},s){e[jr]=Au(s);const o=i||s.props&&s.props.type==="number";pa(e,t?"change":"input",r=>{r.target.composing||e[jr](A7(e.value,n,o))}),(n||o)&&pa(e,"change",()=>{e.value=A7(e.value,n,o)}),t||(pa(e,"compositionstart",FP),pa(e,"compositionend",k7),pa(e,"change",k7))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:s,number:o}},r){if(e[jr]=Au(r),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?R2(e.value):e.value,a=t??"";if(l===a)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(i&&t===n||s&&e.value.trim()===a)||(e.value=a)}},hm={deep:!0,created(e,t,n){e[jr]=Au(n),pa(e,"change",()=>{const i=e._modelValue,s=Sf(e),o=e.checked,r=e[jr];if(Xt(i)){const l=O2(i,s),a=l!==-1;if(o&&!a)r(i.concat(s));else if(!o&&a){const u=[...i];u.splice(l,1),r(u)}}else if(id(i)){const l=new Set(i);o?l.add(s):l.delete(s),r(l)}else r(XI(e,o))})},mounted:C7,beforeUpdate(e,t,n){e[jr]=Au(n),C7(e,t,n)}};function C7(e,{value:t,oldValue:n},i){e._modelValue=t;let s;if(Xt(t))s=O2(t,i.props.value)>-1;else if(id(t))s=t.has(i.props.value);else{if(t===n)return;s=xa(t,XI(e,!0))}e.checked!==s&&(e.checked=s)}const JI={created(e,{value:t},n){e.checked=xa(t,n.props.value),e[jr]=Au(n),pa(e,"change",()=>{e[jr](Sf(e))})},beforeUpdate(e,{value:t,oldValue:n},i){e[jr]=Au(i),t!==n&&(e.checked=xa(t,i.props.value))}},W4={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const s=id(t);pa(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?R2(Sf(r)):Sf(r));e[jr](e.multiple?s?new Set(o):o:o[0]),e._assigning=!0,kt(()=>{e._assigning=!1})}),e[jr]=Au(i)},mounted(e,{value:t}){w7(e,t)},beforeUpdate(e,t,n){e[jr]=Au(n)},updated(e,{value:t}){e._assigning||w7(e,t)}};function w7(e,t){const n=e.multiple,i=Xt(t);if(!(n&&!i&&!id(t))){for(let s=0,o=e.options.length;s<o;s++){const r=e.options[s],l=Sf(r);if(n)if(i){const a=typeof l;a==="string"||a==="number"?r.selected=t.some(u=>String(u)===String(l)):r.selected=O2(t,l)>-1}else r.selected=t.has(l);else if(xa(Sf(r),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Sf(e){return"_value"in e?e._value:e.value}function XI(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const BP={created(e,t,n){x0(e,t,n,null,"created")},mounted(e,t,n){x0(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){x0(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){x0(e,t,n,i,"updated")}};function eE(e,t){switch(e){case"SELECT":return W4;case"TEXTAREA":return _o;default:switch(t){case"checkbox":return hm;case"radio":return JI;default:return _o}}}function x0(e,t,n,i,s){const r=eE(e.tagName,n.props&&n.props.type)[s];r&&r(e,t,n,i)}function $P(){_o.getSSRProps=({value:e})=>({value:e}),JI.getSSRProps=({value:e},t)=>{if(t.props&&xa(t.props.value,e))return{checked:!0}},hm.getSSRProps=({value:e},t)=>{if(Xt(e)){if(t.props&&O2(e,t.props.value)>-1)return{checked:!0}}else if(id(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},BP.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=eE(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const DP=["ctrl","shift","alt","meta"],RP={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>DP.some(n=>e[`${n}Key`]&&!t.includes(n))},It=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=((s,...o)=>{for(let r=0;r<t.length;r++){const l=RP[t[r]];if(l&&l(s,t))return}return e(s,...o)}))},zP={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},qr=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=(s=>{if(!("key"in s))return;const o=er(s.key);if(t.some(r=>r===o||zP[r]===o))return e(s)}))},tE=gi({patchProp:AP},iP);let u1,x7=!1;function nE(){return u1||(u1=RO(tE))}function iE(){return u1=x7?u1:zO(tE),x7=!0,u1}const OP=((...e)=>{nE().render(...e)}),bYe=((...e)=>{iE().hydrate(...e)}),pm=((...e)=>{const t=nE().createApp(...e),{mount:n}=t;return t.mount=i=>{const s=oE(i);if(!s)return;const o=t._component;!hn(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,sE(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t}),PP=((...e)=>{const t=iE().createApp(...e),{mount:n}=t;return t.mount=i=>{const s=oE(i);if(s)return n(s,!0,sE(s))},t});function sE(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function oE(e){return wi(e)?document.querySelector(e):e}let _7=!1;const kYe=()=>{_7||(_7=!0,$P(),aP())};/*! - * shared v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function jP(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const gm=typeof window<"u",Nu=(e,t=!1)=>t?Symbol.for(e):Symbol(e),HP=(e,t,n)=>WP({l:e,k:t,s:n}),WP=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),vs=e=>typeof e=="number"&&isFinite(e),rE=e=>l5(e)==="[object Date]",Mf=e=>l5(e)==="[object RegExp]",Q2=e=>Hn(e)&&Object.keys(e).length===0,bs=Object.assign,qP=Object.create,Ci=(e=null)=>qP(e);let S7;const Sc=()=>S7||(S7=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ci());function M7(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function UP(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}const KP=/^\s*javascript\s*(?::|�*58;?|�*3a;?|:?)/i,VP=/^(?:href|src|action|formaction)$/i;function r5(e){return KP.test(e)}function ZP(e){const t=/url\s*\(/gi;let n="",i=0,s;for(;(s=t.exec(e))!==null;){const o=s.index,r=t.lastIndex-1;let l=r+1,a=1,u=null;for(;l<e.length;l++){const f=e[l];if(u){f===u&&(u=null);continue}if(f==='"'||f==="'")u=f;else if(f==="(")a++;else if(f===")"&&(a--,a===0))break}if(a!==0)break;const c=e.slice(r+1,l).trim(),d=c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'")?c.slice(1,-1).trim():c;n+=e.slice(i,o),n+=r5(d)?"url(about:blank)":e.slice(o,l+1),i=l+1}return n+e.slice(i)}function I7(e,t){if(VP.test(e)&&r5(t))return"about:blank";const n=e.toLowerCase()==="style"?ZP(t):t;return UP(n)}function GP(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(n,i,s)=>`${i}="${I7(i,s)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(n,i,s)=>`${i}='${I7(i,s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),e=e.replace(/(\s+(?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi,(n,i,s)=>r5(s)?`${i}about:blank`:n),e}const QP=Object.prototype.hasOwnProperty;function zr(e,t){return QP.call(e,t)}const ts=Array.isArray,Oi=e=>typeof e=="function",Ut=e=>typeof e=="string",Xn=e=>typeof e=="boolean",ti=e=>e!==null&&typeof e=="object",YP=e=>ti(e)&&Oi(e.then)&&Oi(e.catch),lE=Object.prototype.toString,l5=e=>lE.call(e),Hn=e=>l5(e)==="[object Object]",JP=e=>e==null?"":ts(e)||Hn(e)&&e.toString===lE?JSON.stringify(e,null,2):String(e);function a5(e,t=""){return e.reduce((n,i,s)=>s===0?n+i:n+t+i,"")}const _0=e=>!ti(e)||ts(e);function kg(e,t){if(_0(e)||_0(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:i,des:s}=n.pop();Object.keys(i).forEach(o=>{o!=="__proto__"&&(ti(i[o])&&!ti(s[o])&&(s[o]=Array.isArray(i[o])?[]:Ci()),_0(s[o])||_0(i[o])?s[o]=i[o]:n.push({src:i[o],des:s[o]}))})}}/*! - * message-compiler v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function XP(e,t,n){return{line:e,column:t,offset:n}}function q4(e,t,n){return{start:e,end:t}}const li={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},ej=17;function Y2(e,t,n={}){const{domain:i,messages:s,args:o}=n,r=e,l=new SyntaxError(String(r));return l.code=e,t&&(l.location=t),l.domain=i,l}function tj(e){throw e}const Sl=" ",nj="\r",mo=` -`,ij="\u2028",sj="\u2029";function oj(e){const t=e;let n=0,i=1,s=1,o=0;const r=S=>t[S]===nj&&t[S+1]===mo,l=S=>t[S]===mo,a=S=>t[S]===sj,u=S=>t[S]===ij,c=S=>r(S)||l(S)||a(S)||u(S),d=()=>n,f=()=>i,p=()=>s,g=()=>o,m=S=>r(S)||a(S)||u(S)?mo:t[S],y=()=>m(n),w=()=>m(n+o);function k(){return o=0,c(n)&&(i++,s=0),r(n)&&n++,n++,s++,t[n]}function A(){return r(n+o)&&o++,o++,t[n+o]}function v(){n=0,i=1,s=1,o=0}function x(S=0){o=S}function E(){const S=n+o;for(;S!==n;)k();o=0}return{index:d,line:f,column:p,peekOffset:g,charAt:m,currentChar:y,currentPeek:w,next:k,peek:A,reset:v,resetPeek:x,skipToPeek:E}}const oa=void 0,rj=".",E7="'",lj="tokenizer";function aj(e,t={}){const n=t.location!==!1,i=oj(e),s=()=>i.index(),o=()=>XP(i.line(),i.column(),i.index()),r=o(),l=s(),a={currentType:13,offset:l,startLoc:r,endLoc:r,lastType:13,lastOffset:l,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},u=()=>a,{onError:c}=t;function d(U,J,de,...me){const Ie=u();if(J.column+=de,J.offset+=de,c){const je=n?q4(Ie.startLoc,J):null,ke=Y2(U,je,{domain:lj,args:me});c(ke)}}function f(U,J,de){U.endLoc=o(),U.currentType=J;const me={type:J};return n&&(me.loc=q4(U.startLoc,U.endLoc)),de!=null&&(me.value=de),me}const p=U=>f(U,13);function g(U,J){return U.currentChar()===J?(U.next(),J):(d(li.EXPECTED_TOKEN,o(),0,J),"")}function m(U){let J="";for(;U.currentPeek()===Sl||U.currentPeek()===mo;)J+=U.currentPeek(),U.peek();return J}function y(U){const J=m(U);return U.skipToPeek(),J}function w(U){if(U===oa)return!1;const J=U.charCodeAt(0);return J>=97&&J<=122||J>=65&&J<=90||J===95}function k(U){if(U===oa)return!1;const J=U.charCodeAt(0);return J>=48&&J<=57}function A(U,J){const{currentType:de}=J;if(de!==2)return!1;m(U);const me=w(U.currentPeek());return U.resetPeek(),me}function v(U,J){const{currentType:de}=J;if(de!==2)return!1;m(U);const me=U.currentPeek()==="-"?U.peek():U.currentPeek(),Ie=k(me);return U.resetPeek(),Ie}function x(U,J){const{currentType:de}=J;if(de!==2)return!1;m(U);const me=U.currentPeek()===E7;return U.resetPeek(),me}function E(U,J){const{currentType:de}=J;if(de!==7)return!1;m(U);const me=U.currentPeek()===".";return U.resetPeek(),me}function S(U,J){const{currentType:de}=J;if(de!==8)return!1;m(U);const me=w(U.currentPeek());return U.resetPeek(),me}function M(U,J){const{currentType:de}=J;if(!(de===7||de===11))return!1;m(U);const me=U.currentPeek()===":";return U.resetPeek(),me}function _(U,J){const{currentType:de}=J;if(de!==9)return!1;const me=()=>{const je=U.currentPeek();return je==="{"?w(U.peek()):je==="@"||je==="|"||je===":"||je==="."||je===Sl||!je?!1:je===mo?(U.peek(),me()):D(U,!1)},Ie=me();return U.resetPeek(),Ie}function N(U){m(U);const J=U.currentPeek()==="|";return U.resetPeek(),J}function D(U,J=!0){const de=(Ie=!1,je="")=>{const ke=U.currentPeek();return ke==="{"||ke==="@"||!ke?Ie:ke==="|"?!(je===Sl||je===mo):ke===Sl?(U.peek(),de(!0,Sl)):ke===mo?(U.peek(),de(!0,mo)):!0},me=de();return J&&U.resetPeek(),me}function T(U,J){const de=U.currentChar();return de===oa?oa:J(de)?(U.next(),de):null}function $(U){const J=U.charCodeAt(0);return J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===95||J===36}function P(U){return T(U,$)}function O(U){const J=U.charCodeAt(0);return J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===95||J===36||J===45}function R(U){return T(U,O)}function W(U){const J=U.charCodeAt(0);return J>=48&&J<=57}function z(U){return T(U,W)}function G(U){const J=U.charCodeAt(0);return J>=48&&J<=57||J>=65&&J<=70||J>=97&&J<=102}function K(U){return T(U,G)}function H(U){let J="",de="";for(;J=z(U);)de+=J;return de}function q(U){let J="";for(;;){const de=U.currentChar();if(de==="\\"){const me=U.peek();me==="{"||me==="}"||me==="@"||me==="|"||me==="\\"?(J+=de+me,U.next(),U.next()):(U.resetPeek(),J+=de,U.next())}else{if(de==="{"||de==="}"||de==="@"||de==="|"||!de)break;if(de===Sl||de===mo)if(D(U))J+=de,U.next();else{if(N(U))break;J+=de,U.next()}else J+=de,U.next()}}return J}function X(U){y(U);let J="",de="";for(;J=R(U);)de+=J;const me=U.currentChar();if(me&&me!=="}"&&me!==oa&&me!==Sl&&me!==mo&&me!==" "){const Ie=Ne(U);return d(li.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,de+Ie),de+Ie}return U.currentChar()===oa&&d(li.UNTERMINATED_CLOSING_BRACE,o(),0),de}function ee(U){y(U);let J="";return U.currentChar()==="-"?(U.next(),J+=`-${H(U)}`):J+=H(U),U.currentChar()===oa&&d(li.UNTERMINATED_CLOSING_BRACE,o(),0),J}function ue(U){return U!==E7&&U!==mo}function ie(U){y(U),g(U,"'");let J="",de="";for(;J=T(U,ue);)J==="\\"?de+=xe(U):de+=J;const me=U.currentChar();return me===mo||me===oa?(d(li.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),me===mo&&(U.next(),g(U,"'")),de):(g(U,"'"),de)}function xe(U){const J=U.currentChar();switch(J){case"\\":case"'":return U.next(),`\\${J}`;case"u":return ce(U,J,4);case"U":return ce(U,J,6);default:return d(li.UNKNOWN_ESCAPE_SEQUENCE,o(),0,J),""}}function ce(U,J,de){g(U,J);let me="";for(let Ie=0;Ie<de;Ie++){const je=K(U);if(!je){d(li.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${J}${me}${U.currentChar()}`);break}me+=je}return`\\${J}${me}`}function pe(U){return U!=="{"&&U!=="}"&&U!==Sl&&U!==mo}function Ne(U){y(U);let J="",de="";for(;J=T(U,pe);)de+=J;return de}function te(U){let J="",de="";for(;J=P(U);)de+=J;return de}function ye(U){const J=de=>{const me=U.currentChar();return me==="{"||me==="@"||me==="|"||me==="("||me===")"||!me||me===Sl?de:(de+=me,U.next(),J(de))};return J("")}function j(U){y(U);const J=g(U,"|");return y(U),J}function Y(U,J){let de=null;switch(U.currentChar()){case"{":return J.braceNest>=1&&d(li.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),U.next(),de=f(J,2,"{"),y(U),J.braceNest++,de;case"}":return J.braceNest>0&&J.currentType===2&&d(li.EMPTY_PLACEHOLDER,o(),0),U.next(),de=f(J,3,"}"),J.braceNest--,J.braceNest>0&&y(U),J.inLinked&&J.braceNest===0&&(J.inLinked=!1),de;case"@":return J.braceNest>0&&d(li.UNTERMINATED_CLOSING_BRACE,o(),0),de=ve(U,J)||p(J),J.braceNest=0,de;default:{let Ie=!0,je=!0,ke=!0;if(N(U))return J.braceNest>0&&d(li.UNTERMINATED_CLOSING_BRACE,o(),0),de=f(J,1,j(U)),J.braceNest=0,J.inLinked=!1,de;if(J.braceNest>0&&(J.currentType===4||J.currentType===5||J.currentType===6))return d(li.UNTERMINATED_CLOSING_BRACE,o(),0),J.braceNest=0,re(U,J);if(Ie=A(U,J))return de=f(J,4,X(U)),y(U),de;if(je=v(U,J))return de=f(J,5,ee(U)),y(U),de;if(ke=x(U,J))return de=f(J,6,ie(U)),y(U),de;if(!Ie&&!je&&!ke)return de=f(J,12,Ne(U)),d(li.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,de.value),y(U),de;break}}return de}function ve(U,J){const{currentType:de}=J;let me=null;const Ie=U.currentChar();switch((de===7||de===8||de===11||de===9)&&(Ie===mo||Ie===Sl)&&d(li.INVALID_LINKED_FORMAT,o(),0),Ie){case"@":return U.next(),me=f(J,7,"@"),J.inLinked=!0,me;case".":return y(U),U.next(),f(J,8,".");case":":return y(U),U.next(),f(J,9,":");default:return N(U)?(me=f(J,1,j(U)),J.braceNest=0,J.inLinked=!1,me):E(U,J)||M(U,J)?(y(U),ve(U,J)):S(U,J)?(y(U),f(J,11,te(U))):_(U,J)?(y(U),Ie==="{"?Y(U,J)||me:f(J,10,ye(U))):(de===7&&d(li.INVALID_LINKED_FORMAT,o(),0),J.braceNest=0,J.inLinked=!1,re(U,J))}}function re(U,J){let de={type:13};if(J.braceNest>0)return Y(U,J)||p(J);if(J.inLinked)return ve(U,J)||p(J);switch(U.currentChar()){case"{":return Y(U,J)||p(J);case"}":return d(li.UNBALANCED_CLOSING_BRACE,o(),0),U.next(),f(J,3,"}");case"@":return ve(U,J)||p(J);default:{if(N(U))return de=f(J,1,j(U)),J.braceNest=0,J.inLinked=!1,de;if(D(U))return f(J,0,q(U));break}}return de}function se(){const{currentType:U,offset:J,startLoc:de,endLoc:me}=a;return a.lastType=U,a.lastOffset=J,a.lastStartLoc=de,a.lastEndLoc=me,a.offset=s(),a.startLoc=o(),i.currentChar()===oa?f(a,13):re(i,a)}return{nextToken:se,currentOffset:s,currentPosition:o,context:u}}const uj="parser",cj=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,dj=/\\([\\@{}|])/g;function fj(e,t){return t}function hj(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(t||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function pj(e={}){const t=e.location!==!1,{onError:n}=e;function i(w,k,A,v,...x){const E=w.currentPosition();if(E.offset+=v,E.column+=v,n){const S=t?q4(A,E):null,M=Y2(k,S,{domain:uj,args:x});n(M)}}function s(w,k,A){const v={type:w};return t&&(v.start=k,v.end=k,v.loc={start:A,end:A}),v}function o(w,k,A,v){t&&(w.end=k,w.loc&&(w.loc.end=A))}function r(w,k){const A=w.context(),v=s(3,A.offset,A.startLoc);return v.value=k.replace(dj,fj),o(v,w.currentOffset(),w.currentPosition()),v}function l(w,k){const A=w.context(),{lastOffset:v,lastStartLoc:x}=A,E=s(5,v,x);return E.index=parseInt(k,10),w.nextToken(),o(E,w.currentOffset(),w.currentPosition()),E}function a(w,k){const A=w.context(),{lastOffset:v,lastStartLoc:x}=A,E=s(4,v,x);return E.key=k,w.nextToken(),o(E,w.currentOffset(),w.currentPosition()),E}function u(w,k){const A=w.context(),{lastOffset:v,lastStartLoc:x}=A,E=s(9,v,x);return E.value=k.replace(cj,hj),w.nextToken(),o(E,w.currentOffset(),w.currentPosition()),E}function c(w){const k=w.nextToken(),A=w.context(),{lastOffset:v,lastStartLoc:x}=A,E=s(8,v,x);return k.type!==11?(i(w,li.UNEXPECTED_EMPTY_LINKED_MODIFIER,A.lastStartLoc,0),E.value="",o(E,v,x),{nextConsumeToken:k,node:E}):(k.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,Ml(k)),E.value=k.value||"",o(E,w.currentOffset(),w.currentPosition()),{node:E})}function d(w,k){const A=w.context(),v=s(7,A.offset,A.startLoc);return v.value=k,o(v,w.currentOffset(),w.currentPosition()),v}function f(w){const k=w.context(),A=s(6,k.offset,k.startLoc);let v=w.nextToken();if(v.type===8){const x=c(w);A.modifier=x.node,v=x.nextConsumeToken||w.nextToken()}switch(v.type!==9&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(v)),v=w.nextToken(),v.type===2&&(v=w.nextToken()),v.type){case 10:v.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(v)),A.key=d(w,v.value||"");break;case 4:v.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(v)),A.key=a(w,v.value||"");break;case 5:v.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(v)),A.key=l(w,v.value||"");break;case 6:v.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(v)),A.key=u(w,v.value||"");break;default:{i(w,li.UNEXPECTED_EMPTY_LINKED_KEY,k.lastStartLoc,0);const x=w.context(),E=s(7,x.offset,x.startLoc);return E.value="",o(E,x.offset,x.startLoc),A.key=E,o(A,x.offset,x.startLoc),{nextConsumeToken:v,node:A}}}return o(A,w.currentOffset(),w.currentPosition()),{node:A}}function p(w){const k=w.context(),A=k.currentType===1?w.currentOffset():k.offset,v=k.currentType===1?k.endLoc:k.startLoc,x=s(2,A,v);x.items=[];let E=null;do{const _=E||w.nextToken();switch(E=null,_.type){case 0:_.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(_)),x.items.push(r(w,_.value||""));break;case 5:_.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(_)),x.items.push(l(w,_.value||""));break;case 4:_.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(_)),x.items.push(a(w,_.value||""));break;case 6:_.value==null&&i(w,li.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Ml(_)),x.items.push(u(w,_.value||""));break;case 7:{const N=f(w);x.items.push(N.node),E=N.nextConsumeToken||null;break}}}while(k.currentType!==13&&k.currentType!==1);const S=k.currentType===1?k.lastOffset:w.currentOffset(),M=k.currentType===1?k.lastEndLoc:w.currentPosition();return o(x,S,M),x}function g(w,k,A,v){const x=w.context();let E=v.items.length===0;const S=s(1,k,A);S.cases=[],S.cases.push(v);do{const M=p(w);E||(E=M.items.length===0),S.cases.push(M)}while(x.currentType!==13);return E&&i(w,li.MUST_HAVE_MESSAGES_IN_PLURAL,A,0),o(S,w.currentOffset(),w.currentPosition()),S}function m(w){const k=w.context(),{offset:A,startLoc:v}=k,x=p(w);return k.currentType===13?x:g(w,A,v,x)}function y(w){const k=aj(w,bs({},e)),A=k.context(),v=s(0,A.offset,A.startLoc);return t&&v.loc&&(v.loc.source=w),v.body=m(k),e.onCacheKey&&(v.cacheKey=e.onCacheKey(w)),A.currentType!==13&&i(k,li.UNEXPECTED_LEXICAL_ANALYSIS,A.lastStartLoc,0,w[A.offset]||""),o(v,k.currentOffset(),k.currentPosition()),v}return{parse:y}}function Ml(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function gj(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:o=>(n.helpers.add(o),o)}}function T7(e,t){for(let n=0;n<e.length;n++)u5(e[n],t)}function u5(e,t){switch(e.type){case 1:T7(e.cases,t),t.helper("plural");break;case 2:T7(e.items,t);break;case 6:{u5(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function mj(e,t={}){const n=gj(e);n.helper("normalize"),e.body&&u5(e.body,n);const i=n.context();e.helpers=Array.from(i.helpers)}function vj(e){const t=e.body;return t.type===2?L7(t):t.cases.forEach(n=>L7(n)),e}function L7(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const i=e.items[n];if(!(i.type===3||i.type===9)||i.value==null)break;t.push(i.value)}if(t.length===e.items.length){e.static=a5(t);for(let n=0;n<e.items.length;n++){const i=e.items[n];(i.type===3||i.type===9)&&delete i.value}}}}function Od(e){switch(e.t=e.type,e.type){case 0:{const t=e;Od(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let i=0;i<n.length;i++)Od(n[i]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let i=0;i<n.length;i++)Od(n[i]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Od(t.key),t.k=t.key,delete t.key,t.modifier&&(Od(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function yj(e,t){const{filename:n,breakLineCode:i,needIndent:s}=t,o=t.location!==!1,r={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:s,indentLevel:0};o&&e.loc&&(r.source=e.loc.source);const l=()=>r;function a(m,y){r.code+=m}function u(m,y=!0){const w=y?i:"";a(s?w+" ".repeat(m):w)}function c(m=!0){const y=++r.indentLevel;m&&u(y)}function d(m=!0){const y=--r.indentLevel;m&&u(y)}function f(){u(r.indentLevel)}return{context:l,push:a,indent:c,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>r.needIndent}}function bj(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),If(e,t.key),t.modifier?(e.push(", "),If(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function kj(e,t){const{helper:n,needIndent:i}=e;e.push(`${n("normalize")}([`),e.indent(i());const s=t.items.length;for(let o=0;o<s&&(If(e,t.items[o]),o!==s-1);o++)e.push(", ");e.deindent(i()),e.push("])")}function Aj(e,t){const{helper:n,needIndent:i}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(i());const s=t.cases.length;for(let o=0;o<s&&(If(e,t.cases[o]),o!==s-1);o++)e.push(", ");e.deindent(i()),e.push("])")}}function Cj(e,t){t.body?If(e,t.body):e.push("null")}function If(e,t){const{helper:n}=e;switch(t.type){case 0:Cj(e,t);break;case 1:Aj(e,t);break;case 2:kj(e,t);break;case 6:bj(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const wj=(e,t={})=>{const n=Ut(t.mode)?t.mode:"normal",i=Ut(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` -`,o=t.needIndent?t.needIndent:n!=="arrow",r=e.helpers||[],l=yj(e,{filename:i,breakLineCode:s,needIndent:o});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(o),r.length>0&&(l.push(`const { ${a5(r.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),If(l,e),l.deindent(o),l.push("}"),delete e.helpers;const{code:a,map:u}=l.context();return{ast:e,code:a,map:u?u.toJSON():void 0}};function xj(e,t={}){const n=bs({},t),i=!!n.jit,s=!!n.minify,o=n.optimize==null?!0:n.optimize,l=pj(n).parse(e);return i?(o&&vj(l),s&&Od(l),{ast:l,code:""}):(mj(l,n),wj(l,n))}/*! - * core-base v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */function _j(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Sc().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Sc().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function jl(e){return ti(e)&&c5(e)===0&&(zr(e,"b")||zr(e,"body"))}const aE=["b","body"];function Sj(e){return Fu(e,aE)}const uE=["c","cases"];function Mj(e){return Fu(e,uE,[])}const cE=["s","static"];function Ij(e){return Fu(e,cE)}const dE=["i","items"];function Ej(e){return Fu(e,dE,[])}const fE=["t","type"];function c5(e){return Fu(e,fE)}const hE=["v","value"];function S0(e,t){const n=Fu(e,hE);if(n!=null)return n;throw H1(t)}const pE=["m","modifier"];function Tj(e){return Fu(e,pE)}const gE=["k","key"];function Lj(e){const t=Fu(e,gE);if(t)return t;throw H1(6)}function Fu(e,t,n){for(let i=0;i<t.length;i++){const s=t[i];if(zr(e,s)&&e[s]!=null)return e[s]}return n}const mE=[...aE,...uE,...cE,...dE,...gE,...pE,...hE,...fE];function H1(e){return new Error(`unhandled node type: ${e}`)}function W9(e){return n=>Nj(n,e)}function Nj(e,t){const n=Sj(t);if(n==null)throw H1(0);if(c5(n)===1){const o=Mj(n);return e.plural(o.reduce((r,l)=>[...r,N7(e,l)],[]))}else return N7(e,n)}function N7(e,t){const n=Ij(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const i=Ej(t).reduce((s,o)=>[...s,U4(e,o)],[]);return e.normalize(i)}}function U4(e,t){const n=c5(t);switch(n){case 3:return S0(t,n);case 9:return S0(t,n);case 4:{const i=t;if(zr(i,"k")&&i.k)return e.interpolate(e.named(i.k));if(zr(i,"key")&&i.key)return e.interpolate(e.named(i.key));throw H1(n)}case 5:{const i=t;if(zr(i,"i")&&vs(i.i))return e.interpolate(e.list(i.i));if(zr(i,"index")&&vs(i.index))return e.interpolate(e.list(i.index));throw H1(n)}case 6:{const i=t,s=Tj(i),o=Lj(i);return e.linked(U4(e,o),s?U4(e,s):void 0,e.type)}case 7:return S0(t,n);case 8:return S0(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Fj=e=>e;let M0=Ci();function Bj(e,t={}){let n=!1;const i=t.onError||tj;return t.onError=s=>{n=!0,i(s)},{...xj(e,t),detectError:n}}function $j(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Ut(e)){Xn(t.warnHtmlMessage)&&t.warnHtmlMessage;const i=(t.onCacheKey||Fj)(e),s=M0[i];if(s)return s;const{ast:o,detectError:r}=Bj(e,{...t,location:!1,jit:!0}),l=W9(o);return r?l:M0[i]=l}else{const n=e.cacheKey;if(n){const i=M0[n];return i||(M0[n]=W9(e))}else return W9(e)}}let W1=null;function Dj(e){W1=e}function Rj(e,t,n){W1&&W1.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const zj=Oj("function:translate");function Oj(e){return t=>W1&&W1.emit(e,t)}const ma={INVALID_ARGUMENT:ej,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},Pj=24;function va(e){return Y2(e,null,void 0)}function d5(e,t){return t.locale!=null?F7(t.locale):F7(e.locale)}let q9;function F7(e){if(Ut(e))return e;if(Oi(e)){if(e.resolvedOnce&&q9!=null)return q9;if(e.constructor.name==="Function"){const t=e();if(YP(t))throw va(ma.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return q9=t}else throw va(ma.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw va(ma.NOT_SUPPORT_LOCALE_TYPE)}function jj(e,t,n){return[...new Set([n,...ts(t)?t:ti(t)?Object.keys(t):Ut(t)?[t]:[n]])]}function K4(e,t,n){const i=Ut(n)?n:q1,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let o=s.__localeChainCache.get(i);if(!o){o=[];let r=[n];for(;ts(r);)r=B7(o,r,t);const l=ts(t)||!Hn(t)?t:t.default?t.default:null;r=Ut(l)?[l]:l,ts(r)&&B7(o,r,!1),s.__localeChainCache.set(i,o)}return o}function B7(e,t,n){let i=!0;for(let s=0;s<t.length&&Xn(i);s++){const o=t[s];Ut(o)&&(i=Hj(e,t[s],n))}return i}function Hj(e,t,n){let i;const s=t.split("-");do{const o=s.join("-");i=Wj(e,o,n),s.splice(-1,1)}while(s.length&&i===!0);return i}function Wj(e,t,n){let i=!1;if(!e.includes(t)&&(i=!0,t)){i=t[t.length-1]!=="!";const s=t.replace(/!/g,"");e.push(s),(ts(n)||Hn(n))&&n[s]&&(i=n[s])}return i}const Bu=[];Bu[0]={w:[0],i:[3,0],"[":[4],o:[7]};Bu[1]={w:[1],".":[2],"[":[4],o:[7]};Bu[2]={w:[2],i:[3,0],0:[3,0]};Bu[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};Bu[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};Bu[5]={"'":[4,0],o:8,l:[5,0]};Bu[6]={'"':[4,0],o:8,l:[6,0]};const qj=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Uj(e){return qj.test(e)}function Kj(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function Vj(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function Zj(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:Uj(t)?Kj(t):"*"+t}function Gj(e){const t=[];let n=-1,i=0,s=0,o,r,l,a,u,c,d;const f=[];f[0]=()=>{r===void 0?r=l:r+=l},f[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,i=4,f[0]();else{if(s=0,r===void 0||(r=Zj(r),r===!1))return!1;f[1]()}};function p(){const g=e[n+1];if(i===5&&g==="'"||i===6&&g==='"')return n++,l="\\"+g,f[0](),!0}for(;i!==null;)if(n++,o=e[n],!(o==="\\"&&p())){if(a=Vj(o),d=Bu[i],u=d[a]||d.l||8,u===8||(i=u[0],u[1]!==void 0&&(c=f[u[1]],c&&(l=o,c()===!1))))return;if(i===7)return t}}const $7=new Map;function Qj(e,t){return ti(e)?e[t]:null}function Yj(e,t){if(!ti(e))return null;let n=$7.get(t);if(n||(n=Gj(t),n&&$7.set(t,n)),!n)return null;const i=n.length;let s=e,o=0;for(;o<i;){const r=n[o];if(mE.includes(r)&&jl(s)||!ti(s)||!zr(s,r))return null;const l=s[r];if(l===void 0||Oi(s))return null;s=l,o++}return s}const Jj="11.4.6",J2=-1,q1="en-US",mm="",D7=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Xj(){return{upper:(e,t)=>t==="text"&&Ut(e)?e.toUpperCase():t==="vnode"&&ti(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Ut(e)?e.toLowerCase():t==="vnode"&&ti(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Ut(e)?D7(e):t==="vnode"&&ti(e)&&"__v_isVNode"in e?D7(e.children):e}}let vE;function eH(e){vE=e}let yE;function tH(e){yE=e}let bE;function nH(e){bE=e}let kE=null;const iH=e=>{kE=e},sH=()=>kE;let AE=null;const R7=e=>{AE=e},oH=()=>AE;let z7=0;function rH(e={}){const t=Oi(e.onWarn)?e.onWarn:jP,n=Ut(e.version)?e.version:Jj,i=Ut(e.locale)||Oi(e.locale)?e.locale:q1,s=Oi(i)?q1:i,o=ts(e.fallbackLocale)||Hn(e.fallbackLocale)||Ut(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,r=Hn(e.messages)?e.messages:U9(s),l=Hn(e.datetimeFormats)?e.datetimeFormats:U9(s),a=Hn(e.numberFormats)?e.numberFormats:U9(s),u=bs(Ci(),e.modifiers,Xj()),c=e.pluralRules||Ci(),d=Oi(e.missing)?e.missing:null,f=Xn(e.missingWarn)||Mf(e.missingWarn)?e.missingWarn:!0,p=Xn(e.fallbackWarn)||Mf(e.fallbackWarn)?e.fallbackWarn:!0,g=!!e.fallbackFormat,m=!!e.unresolving,y=Oi(e.postTranslation)?e.postTranslation:null,w=Hn(e.processor)?e.processor:null,k=Xn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,A=!!e.escapeParameter,v=Oi(e.messageCompiler)?e.messageCompiler:vE,x=Oi(e.messageResolver)?e.messageResolver:yE||Qj,E=Oi(e.localeFallbacker)?e.localeFallbacker:bE||jj,S=ti(e.fallbackContext)?e.fallbackContext:void 0,M=e,_=ti(M.__datetimeFormatters)?M.__datetimeFormatters:new Map,N=ti(M.__numberFormatters)?M.__numberFormatters:new Map,D=ti(M.__meta)?M.__meta:{};z7++;const T={version:n,cid:z7,locale:i,fallbackLocale:o,messages:r,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:g,unresolving:m,postTranslation:y,processor:w,warnHtmlMessage:k,escapeParameter:A,messageCompiler:v,messageResolver:x,localeFallbacker:E,fallbackContext:S,onWarn:t,__meta:D};return T.datetimeFormats=l,T.numberFormats=a,T.__datetimeFormatters=_,T.__numberFormatters=N,__INTLIFY_PROD_DEVTOOLS__&&Rj(T,n,D),T}const U9=e=>({[e]:Ci()});function f5(e,t,n,i,s){const{missing:o,onWarn:r}=e;if(o!==null){const l=o(e,n,t,s);return Ut(l)?l:t}else return t}function wh(e,t,n){const i=e;i.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function lH(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function aH(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let i=n+1;i<t.length;i++)if(lH(e,t[i]))return!0;return!1}function O7(e,...t){const{datetimeFormats:n,unresolving:i,fallbackLocale:s,onWarn:o,localeFallbacker:r}=e,{__datetimeFormatters:l}=e;if(!Ut(t[0])&&!rE(t[0])&&!vs(t[0]))return mm;const[a,u,c,d]=V4(...t),f=Xn(c.missingWarn)?c.missingWarn:e.missingWarn;Xn(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,g=d5(e,c),m=r(e,s,g);if(!Ut(a)||a===""){const E=new Intl.DateTimeFormat(g.replace(/!/g,""),d);return p?E.formatToParts(u):E.format(u)}let y={},w,k=null;const A="datetime format";for(let E=0;E<m.length&&(w=m[E],y=n[w]||{},k=y[a],!Hn(k));E++)f5(e,a,w,f,A);if(!Hn(k)||!Ut(w))return i?J2:a;let v=`${w}__${a}`;Q2(d)||(v=`${v}__${JSON.stringify(d)}`);let x=l.get(v);return x||(x=new Intl.DateTimeFormat(w,bs({},k,d)),l.set(v,x)),p?x.formatToParts(u):x.format(u)}const CE=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function V4(...e){const[t,n,i,s]=e,o=Ci();let r=Ci(),l;if(Ut(t)){const a=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!a)throw va(ma.INVALID_ISO_DATE_ARGUMENT);const u=a[3]?a[3].trim().startsWith("T")?`${a[1].trim()}${a[3].trim()}`:`${a[1].trim()}T${a[3].trim()}`:a[1].trim();l=new Date(u);try{l.toISOString()}catch{throw va(ma.INVALID_ISO_DATE_ARGUMENT)}}else if(rE(t)){if(isNaN(t.getTime()))throw va(ma.INVALID_DATE_ARGUMENT);l=t}else if(vs(t))l=t;else throw va(ma.INVALID_ARGUMENT);return Ut(n)?o.key=n:Hn(n)&&Object.keys(n).forEach(a=>{CE.includes(a)?r[a]=n[a]:o[a]=n[a]}),Ut(i)?o.locale=i:Hn(i)&&(r=i),Hn(s)&&(r=s),[o.key||"",l,o,r]}function P7(e,t,n){const i=e;for(const s in n){const o=`${t}__${s}`;i.__datetimeFormatters.has(o)&&i.__datetimeFormatters.delete(o)}}function j7(e,...t){const{numberFormats:n,unresolving:i,fallbackLocale:s,onWarn:o,localeFallbacker:r}=e,{__numberFormatters:l}=e;if(!vs(t[0]))return mm;const[a,u,c,d]=Z4(...t),f=Xn(c.missingWarn)?c.missingWarn:e.missingWarn;Xn(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,g=d5(e,c),m=r(e,s,g);if(!Ut(a)||a===""){const E=new Intl.NumberFormat(g.replace(/!/g,""),d);return p?E.formatToParts(u):E.format(u)}let y={},w,k=null;const A="number format";for(let E=0;E<m.length&&(w=m[E],y=n[w]||{},k=y[a],!Hn(k));E++)f5(e,a,w,f,A);if(!Hn(k)||!Ut(w))return i?J2:a;let v=`${w}__${a}`;Q2(d)||(v=`${v}__${JSON.stringify(d)}`);let x=l.get(v);return x||(x=new Intl.NumberFormat(w,bs({},k,d)),l.set(v,x)),p?x.formatToParts(u):x.format(u)}const wE=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Z4(...e){const[t,n,i,s]=e,o=Ci();let r=Ci();if(!vs(t))throw va(ma.INVALID_ARGUMENT);const l=t;return Ut(n)?o.key=n:Hn(n)&&Object.keys(n).forEach(a=>{wE.includes(a)?r[a]=n[a]:o[a]=n[a]}),Ut(i)?o.locale=i:Hn(i)&&(r=i),Hn(s)&&(r=s),[o.key||"",l,o,r]}function H7(e,t,n){const i=e;for(const s in n){const o=`${t}__${s}`;i.__numberFormatters.has(o)&&i.__numberFormatters.delete(o)}}const uH=e=>e,cH=e=>"",dH="text",fH=e=>e.length===0?"":a5(e),hH=JP;function K9(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function pH(e){const t=vs(e.pluralIndex)?e.pluralIndex:-1;return vs(e.named?.count)?e.named.count:vs(e.named?.n)?e.named.n:t}function gH(e={}){const t=e.locale,n=pH(e),i=Ut(t)&&Oi(e.pluralRules?.[t])?e.pluralRules[t]:K9,s=i===K9?void 0:K9,o=w=>w[i(n,w.length,s)],r=e.list||[],l=w=>r[w],a=e.named||Ci();vs(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const u=w=>a[w];function c(w,k){const A=Oi(e.messages)?e.messages(w,!!k):ti(e.messages)?e.messages[w]:!1;return A||(e.parent?e.parent.message(w):cH)}const d=w=>e.modifiers?e.modifiers[w]:uH,f=Oi(e.processor?.normalize)?e.processor.normalize:fH,p=Oi(e.processor?.interpolate)?e.processor.interpolate:hH,g=Ut(e.processor?.type)?e.processor.type:dH,y={list:l,named:u,plural:o,linked:(w,...k)=>{const[A,v]=k;let x="text",E="";k.length===1?ti(A)?(E=A.modifier||E,x=A.type||x):Ut(A)&&(E=A||E):k.length===2&&(Ut(A)&&(E=A||E),Ut(v)&&(x=v||x));const S=c(w,!0)(y),M=S===""||S===void 0?w:S,_=x==="vnode"&&ts(M)&&E?M[0]:M;return E?d(E)(_,x):_},message:c,type:g,interpolate:p,normalize:f,values:bs(Ci(),r,a)};return y}const W7=()=>"",Rr=e=>Oi(e);function q7(e,...t){const{fallbackFormat:n,postTranslation:i,unresolving:s,messageCompiler:o,fallbackLocale:r,messages:l}=e,[a,u]=G4(...t),c=Xn(u.missingWarn)?u.missingWarn:e.missingWarn,d=Xn(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=Xn(u.escapeParameter)?u.escapeParameter:e.escapeParameter,p=!!u.resolvedMessage,g=Ut(u.default)||Xn(u.default)?Xn(u.default)?o?a:()=>a:u.default:n?o?a:()=>a:null,m=n||g!=null&&(Ut(g)||Oi(g)),y=d5(e,u);f&&mH(u);let[w,k,A]=p?[a,y,l[y]||Ci()]:xE(e,a,y,r,d,c),v=w,x=a;if(!p&&!(Ut(v)||jl(v)||Rr(v))&&m&&(v=g,x=v),!p&&(!(Ut(v)||jl(v)||Rr(v))||!Ut(k)))return s?J2:a;let E=!1;const S=()=>{E=!0},M=Rr(v)?v:_E(e,a,k,v,x,S);if(E)return v;const _=bH(e,k,A,u),N=gH(_),D=vH(e,M,N);let T=i?i(D,a):D;if(f&&Ut(T)&&(T=GP(T)),__INTLIFY_PROD_DEVTOOLS__){const $={timestamp:Date.now(),key:Ut(a)?a:Rr(v)?v.key:"",locale:k||(Rr(v)?v.locale:""),format:Ut(v)?v:Rr(v)?v.source:"",message:T};$.meta=bs({},e.__meta,sH()||{}),zj($)}return T}function mH(e){ts(e.list)?e.list=e.list.map(t=>Ut(t)?M7(t):t):ti(e.named)&&Object.keys(e.named).forEach(t=>{Ut(e.named[t])&&(e.named[t]=M7(e.named[t]))})}function xE(e,t,n,i,s,o){const{messages:r,onWarn:l,messageResolver:a,localeFallbacker:u}=e,c=u(e,i,n);let d=Ci(),f,p=null;const g="translate";for(let m=0;m<c.length&&(f=c[m],d=r[f]||Ci(),(p=a(d,t))===null&&(p=d[t]),!(Ut(p)||jl(p)||Rr(p)));m++)if(!aH(f,c)){const y=f5(e,t,f,o,g);y!==t&&(p=y)}return[p,f,d]}function _E(e,t,n,i,s,o){const{messageCompiler:r,warnHtmlMessage:l}=e;if(Rr(i)){const u=i;return u.locale=u.locale||n,u.key=u.key||t,u}if(r==null){const u=(()=>i);return u.locale=n,u.key=t,u}const a=r(i,yH(e,n,s,i,l,o));return a.locale=n,a.key=t,a.source=i,a}function vH(e,t,n){return t(n)}function G4(...e){const[t,n,i]=e,s=Ci();if(!Ut(t)&&!vs(t)&&!Rr(t)&&!jl(t))throw va(ma.INVALID_ARGUMENT);const o=vs(t)?String(t):(Rr(t),t);return vs(n)?s.plural=n:Ut(n)?s.default=n:Hn(n)&&!Q2(n)?s.named=n:ts(n)&&(s.list=n),vs(i)?s.plural=i:Ut(i)?s.default=i:Hn(i)&&bs(s,i),[o,s]}function yH(e,t,n,i,s,o){return{locale:t,key:n,warnHtmlMessage:s,onError:r=>{throw o&&o(r),r},onCacheKey:r=>HP(t,n,r)}}function bH(e,t,n,i){const{modifiers:s,pluralRules:o,messageResolver:r,fallbackLocale:l,fallbackWarn:a,missingWarn:u,fallbackContext:c}=e,f={locale:t,modifiers:s,pluralRules:o,messages:(p,g)=>{let m=r(n,p);if(m==null&&(c||g)){const[y,,w]=xE(c||e,p,t,l,a,u);m=y??r(w,p)}if(Ut(m)||jl(m)){let y=!1;const k=_E(e,p,t,m,p,()=>{y=!0});return y?W7:k}else return Rr(m)?m:W7}};return e.processor&&(f.processor=e.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),vs(i.plural)&&(f.pluralIndex=i.plural),f}_j();/*! - * vue-i18n v11.4.6 - * (c) 2026 kazuya kawaguchi - * Released under the MIT License. - */const kH="11.4.6";function AH(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Sc().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Sc().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Sc().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Sc().__INTLIFY_PROD_DEVTOOLS__=!1)}const $o={UNEXPECTED_RETURN_TYPE:Pj,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function tr(e,...t){return Y2(e,null,void 0)}const Q4=Nu("__translateVNode"),Y4=Nu("__datetimeParts"),J4=Nu("__numberParts"),SE=Nu("__setPluralRules"),ME=Nu("__injectWithOption"),Kd=Nu("__dispose");function U1(e){if(!ti(e)||jl(e))return e;for(const t in e)if(zr(e,t))if(!t.includes("."))ti(e[t])&&U1(e[t]);else{const n=t.split("."),i=n.length-1;let s=e,o=!1;for(let r=0;r<i;r++){if(n[r]==="__proto__")throw new Error(`unsafe key: ${n[r]}`);if(n[r]in s||(s[n[r]]=Ci()),!ti(s[n[r]])){o=!0;break}s=s[n[r]]}if(o||(jl(s)?mE.includes(n[i])||delete e[t]:(s[n[i]]=e[t],delete e[t])),!jl(s)){const r=s[n[i]];ti(r)&&U1(r)}}return e}function h5(e,t){const{messages:n,__i18n:i,messageResolver:s,flatJson:o}=t,r=Hn(n)?n:ts(i)?Ci():{[e]:Ci()};if(ts(i)&&i.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:a,resource:u}=l;a?(r[a]=r[a]||Ci(),kg(u,r[a])):kg(u,r)}else Ut(l)&&kg(JSON.parse(l),r)}),s==null&&o)for(const l in r)zr(r,l)&&U1(r[l]);return r}function IE(e){return e.type}function EE(e,t,n){let i=ti(t.messages)?t.messages:Ci();"__i18nGlobal"in n&&(i=h5(e.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(o=>{e.mergeLocaleMessage(o,i[o])});{if(ti(t.datetimeFormats)){const o=Object.keys(t.datetimeFormats);o.length&&o.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(ti(t.numberFormats)){const o=Object.keys(t.numberFormats);o.length&&o.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function U7(e){return V(hu,null,e,0)}function K1(){return As()}const K7="__INTLIFY_META__",V7=()=>[],CH=()=>!1;let Z7=0;function G7(e){return((t,n,i,s)=>e(n,i,K1()||void 0,s))}const wH=()=>{const e=K1();let t=null;return e&&(t=IE(e)[K7])?{[K7]:t}:null};function vm(e={}){const{__root:t,__injectWithOption:n}=e,i=t===void 0,s=e.flatJson,o=gm?Z:vl;let r=Xn(e.inheritLocale)?e.inheritLocale:!0;const l=o(t&&r?t.locale.value:Ut(e.locale)?e.locale:q1),a=o(t&&r?t.fallbackLocale.value:Ut(e.fallbackLocale)||ts(e.fallbackLocale)||Hn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),u=o(h5(l.value,e)),c=o(Hn(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=o(Hn(e.numberFormats)?e.numberFormats:{[l.value]:{}});let f=t?t.missingWarn:Xn(e.missingWarn)||Mf(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:Xn(e.fallbackWarn)||Mf(e.fallbackWarn)?e.fallbackWarn:!0,g=t?t.fallbackRoot:Xn(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,y=Oi(e.missing)?e.missing:null,w=Oi(e.missing)?G7(e.missing):null,k=Oi(e.postTranslation)?e.postTranslation:null,A=t?t.warnHtmlMessage:Xn(e.warnHtmlMessage)?e.warnHtmlMessage:!0,v=!!e.escapeParameter;const x=t?t.modifiers:Hn(e.modifiers)?e.modifiers:{};let E=e.pluralRules||t&&t.pluralRules,S;S=(()=>{i&&R7(null);const ke={version:kH,locale:l.value,fallbackLocale:a.value,messages:u.value,modifiers:x,pluralRules:E,missing:w===null?void 0:w,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:A,escapeParameter:v,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ke.datetimeFormats=c.value,ke.numberFormats=d.value,ke.__datetimeFormatters=Hn(S)?S.__datetimeFormatters:void 0,ke.__numberFormatters=Hn(S)?S.__numberFormatters:void 0;const Le=rH(ke);return i&&R7(Le),Le})(),wh(S,l.value,a.value);function _(){return[l.value,a.value,u.value,c.value,d.value]}const N=F({get:()=>l.value,set:ke=>{S.locale=ke,l.value=ke}}),D=F({get:()=>a.value,set:ke=>{S.fallbackLocale=ke,a.value=ke,wh(S,l.value,ke)}}),T=F(()=>u.value),$=F(()=>c.value),P=F(()=>d.value);function O(){return Oi(k)?k:null}function R(ke){k=ke,S.postTranslation=ke}function W(){return y}function z(ke){ke!==null&&(w=G7(ke)),y=ke,S.missing=w}const G=(ke,Le,it,Fe,Re,Ke)=>{_();let ht;try{__INTLIFY_PROD_DEVTOOLS__,i||(S.fallbackContext=t?oH():void 0),ht=ke(S)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(S.fallbackContext=void 0)}if(it!=="translate exists"&&vs(ht)&&ht===J2||it==="translate exists"&&!ht){const[ot,gt]=Le();return t&&g?Fe(t):Re(ot)}else{if(Ke(ht))return ht;throw tr($o.UNEXPECTED_RETURN_TYPE)}};function K(...ke){return G(Le=>Reflect.apply(q7,null,[Le,...ke]),()=>G4(...ke),"translate",Le=>Reflect.apply(Le.t,Le,[...ke]),Le=>Le,Le=>Ut(Le))}function H(...ke){const[Le,it,Fe]=ke;if(Fe&&!ti(Fe))throw tr($o.INVALID_ARGUMENT);return K(Le,it,bs({resolvedMessage:!0},Fe||{}))}function q(...ke){return G(Le=>Reflect.apply(O7,null,[Le,...ke]),()=>V4(...ke),"datetime format",Le=>Reflect.apply(Le.d,Le,[...ke]),()=>mm,Le=>Ut(Le)||ts(Le))}function X(...ke){return G(Le=>Reflect.apply(j7,null,[Le,...ke]),()=>Z4(...ke),"number format",Le=>Reflect.apply(Le.n,Le,[...ke]),()=>mm,Le=>Ut(Le)||ts(Le))}function ee(ke){return ke.map(Le=>Ut(Le)||vs(Le)||Xn(Le)?U7(String(Le)):Le)}const ie={normalize:ee,interpolate:ke=>ke,type:"vnode"};function xe(...ke){return G(Le=>{let it;const Fe=Le;try{Fe.processor=ie,it=Reflect.apply(q7,null,[Fe,...ke])}finally{Fe.processor=null}return it},()=>G4(...ke),"translate",Le=>Le[Q4](...ke),Le=>[U7(Le)],Le=>ts(Le))}function ce(...ke){return G(Le=>Reflect.apply(j7,null,[Le,...ke]),()=>Z4(...ke),"number format",Le=>Le[J4](...ke),V7,Le=>Ut(Le)||ts(Le))}function pe(...ke){return G(Le=>Reflect.apply(O7,null,[Le,...ke]),()=>V4(...ke),"datetime format",Le=>Le[Y4](...ke),V7,Le=>Ut(Le)||ts(Le))}function Ne(ke){E=ke,S.pluralRules=E}function te(ke,Le){return G(()=>{if(!ke)return!1;const it=Ut(Le)?Le:l.value,Fe=Ut(Le)?[it]:K4(S,a.value,it);for(let Re=0;Re<Fe.length;Re++){const Ke=Y(Fe[Re]);let ht=S.messageResolver(Ke,ke);if(ht===null&&(ht=Ke[ke]),jl(ht)||Rr(ht)||Ut(ht))return!0}return!1},()=>[ke],"translate exists",it=>Reflect.apply(it.te,it,[ke,Le]),CH,it=>Xn(it))}function ye(ke){let Le=null;const it=K4(S,a.value,l.value);for(let Fe=0;Fe<it.length;Fe++){const Re=u.value[it[Fe]]||{},Ke=S.messageResolver(Re,ke);if(Ke!=null){Le=Ke;break}}return Le}function j(ke){const Le=ye(ke);return Le??(t?t.tm(ke)||{}:{})}function Y(ke){return u.value[ke]||{}}function ve(ke,Le){if(s){const it={[ke]:Le};for(const Fe in it)zr(it,Fe)&&U1(it[Fe]);Le=it[ke]}u.value[ke]=Le,S.messages=u.value}function re(ke,Le){u.value[ke]=u.value[ke]||{};const it={[ke]:Le};if(s)for(const Fe in it)zr(it,Fe)&&U1(it[Fe]);Le=it[ke],kg(Le,u.value[ke]),S.messages=u.value}function se(ke){return c.value[ke]||{}}function U(ke,Le){c.value[ke]=Le,S.datetimeFormats=c.value,P7(S,ke,Le)}function J(ke,Le){c.value[ke]=bs(c.value[ke]||{},Le),S.datetimeFormats=c.value,P7(S,ke,Le)}function de(ke){return d.value[ke]||{}}function me(ke,Le){d.value[ke]=Le,S.numberFormats=d.value,H7(S,ke,Le)}function Ie(ke,Le){d.value[ke]=bs(d.value[ke]||{},Le),S.numberFormats=d.value,H7(S,ke,Le)}Z7++,t&&gm&&(Qe(t.locale,ke=>{r&&(l.value=ke,S.locale=ke,wh(S,l.value,a.value))}),Qe(t.fallbackLocale,ke=>{r&&(a.value=ke,S.fallbackLocale=ke,wh(S,l.value,a.value))}));const je={id:Z7,locale:N,fallbackLocale:D,get inheritLocale(){return r},set inheritLocale(ke){r=ke,ke&&t&&(l.value=t.locale.value,a.value=t.fallbackLocale.value,wh(S,l.value,a.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:T,get modifiers(){return x},get pluralRules(){return E||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(ke){f=ke,S.missingWarn=f},get fallbackWarn(){return p},set fallbackWarn(ke){p=ke,S.fallbackWarn=p},get fallbackRoot(){return g},set fallbackRoot(ke){g=ke},get fallbackFormat(){return m},set fallbackFormat(ke){m=ke,S.fallbackFormat=m},get warnHtmlMessage(){return A},set warnHtmlMessage(ke){A=ke,S.warnHtmlMessage=ke},get escapeParameter(){return v},set escapeParameter(ke){v=ke,S.escapeParameter=ke},t:K,getLocaleMessage:Y,setLocaleMessage:ve,mergeLocaleMessage:re,getPostTranslationHandler:O,setPostTranslationHandler:R,getMissingHandler:W,setMissingHandler:z,[SE]:Ne};return je.datetimeFormats=$,je.numberFormats=P,je.rt=H,je.te=te,je.tm=j,je.d=q,je.n=X,je.getDateTimeFormat=se,je.setDateTimeFormat=U,je.mergeDateTimeFormat=J,je.getNumberFormat=de,je.setNumberFormat=me,je.mergeNumberFormat=Ie,je[ME]=n,je[Q4]=xe,je[Y4]=pe,je[J4]=ce,je}function xH(e){const t=Ut(e.locale)?e.locale:q1,n=Ut(e.fallbackLocale)||ts(e.fallbackLocale)||Hn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,i=Oi(e.missing)?e.missing:void 0,s=Xn(e.silentTranslationWarn)||Mf(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,o=Xn(e.silentFallbackWarn)||Mf(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=Xn(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,a=Hn(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Oi(e.postTranslation)?e.postTranslation:void 0,d=Ut(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,p=Xn(e.sync)?e.sync:!0;let g=e.messages;if(Hn(e.sharedMessages)){const x=e.sharedMessages;g=Object.keys(x).reduce((S,M)=>{const _=S[M]||(S[M]={});return bs(_,x[M]),S},g||{})}const{__i18n:m,__root:y,__injectWithOption:w}=e,k=e.datetimeFormats,A=e.numberFormats,v=e.flatJson;return{locale:t,fallbackLocale:n,messages:g,flatJson:v,datetimeFormats:k,numberFormats:A,missing:i,missingWarn:s,fallbackWarn:o,fallbackRoot:r,fallbackFormat:l,modifiers:a,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:m,__root:y,__injectWithOption:w}}function X4(e={}){const t=vm(xH(e)),{__extender:n}=e,i={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return Xn(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=Xn(s)?!s:s},get silentFallbackWarn(){return Xn(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=Xn(s)?!s:s},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,o){return t.te(s,o)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,o){t.setLocaleMessage(s,o)},mergeLocaleMessage(s,o){t.mergeLocaleMessage(s,o)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,o){t.setDateTimeFormat(s,o)},mergeDateTimeFormat(s,o){t.mergeDateTimeFormat(s,o)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,o){t.setNumberFormat(s,o)},mergeNumberFormat(s,o){t.mergeNumberFormat(s,o)}};return i.__extender=n,i}function _H(e,t,n){return{beforeCreate(){const i=K1();if(!i)throw tr($o.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const o=s.i18n;if(s.__i18n&&(o.__i18n=s.__i18n),o.__root=t,this===this.$root)this.$i18n=Q7(e,o);else{o.__injectWithOption=!0,o.__extender=n.__vueI18nExtend,this.$i18n=X4(o);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=Q7(e,s);else{this.$i18n=X4({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&EE(t,s,s),this.$t=(...o)=>this.$i18n.t(...o),this.$rt=(...o)=>this.$i18n.rt(...o),this.$te=(o,r)=>this.$i18n.te(o,r),this.$d=(...o)=>this.$i18n.d(...o),this.$n=(...o)=>this.$i18n.n(...o),this.$tm=o=>this.$i18n.tm(o),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=K1();if(!i)throw tr($o.UNEXPECTED_ERROR);const s=this.$i18n;s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s?.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(i),delete this.$i18n)}}}function Q7(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[SE](t.pluralizationRules||e.pluralizationRules);const n=h5(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(i=>e.mergeLocaleMessage(i,n[i])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(i=>e.mergeDateTimeFormat(i,t.datetimeFormats[i])),t.numberFormats&&Object.keys(t.numberFormats).forEach(i=>e.mergeNumberFormat(i,t.numberFormats[i])),e}const p5={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function SH({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((i,s)=>[...i,...s.type===Be?s.children:[s]],[]):t.reduce((n,i)=>{const s=e[i];return s&&(n[i]=s()),n},Ci())}function TE(){return Be}const MH=tt({name:"i18n-t",props:bs({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>vs(e)||!isNaN(e)}},p5),setup(e,t){const{slots:n,attrs:i}=t,s=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return()=>{const o=()=>{const a=Object.keys(n).filter(d=>d[0]!=="_"),u=Ci();e.locale&&(u.locale=e.locale),e.plural!==void 0&&(u.plural=Ut(e.plural)?+e.plural:e.plural);const c=SH(t,a);return s[Q4](e.keypath,c,u)},r=bs(Ci(),i),l=Ut(e.tag)||ti(e.tag)?e.tag:TE();return ti(l)?cn(l,r,{default:o}):cn(l,r,o())}}}),Y7=MH;function IH(e){return ts(e)&&!Ut(e[0])}function LE(e,t,n,i){const{slots:s,attrs:o}=t;return()=>{const r=()=>{const u={part:!0};let c=Ci();e.locale&&(u.locale=e.locale),Ut(e.format)?u.key=e.format:ti(e.format)&&(Ut(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((p,g)=>n.includes(g)?bs(Ci(),p,{[g]:e.format[g]}):p,Ci()));const d=i(e.value,u,c);let f=[u.key];return ts(d)?f=d.map((p,g)=>{const m=s[p.type],y=m?m({[p.type]:p.value,index:g,parts:d}):[p.value];return IH(y)&&(y[0].key=`${p.type}-${g}`),y}):Ut(d)&&(f=[d]),f},l=bs(Ci(),o),a=Ut(e.tag)||ti(e.tag)?e.tag:TE();return ti(a)?cn(a,l,{default:r}):cn(a,l,r())}}const EH=tt({name:"i18n-n",props:bs({value:{type:Number,required:!0},format:{type:[String,Object]}},p5),setup(e,t){const n=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return LE(e,t,wE,(...i)=>n[J4](...i))}}),J7=EH;function TH(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const i=n.__getInstance(t);return i!=null?i.__composer:e.global.__composer}}function LH(e){const t=r=>{const{instance:l,value:a}=r;if(!l||!l.$)throw tr($o.UNEXPECTED_ERROR);const u=TH(e,l.$),c=X7(a);return[Reflect.apply(u.t,u,[...eA(c)]),u]};return{created:(r,l)=>{const[a,u]=t(l);gm&&(r.__i18nWatcher=Qe(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),r.__composer=u,r.textContent=a},unmounted:r=>{gm&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:l})=>{if(r.__composer){const a=r.__composer,u=X7(l);r.textContent=Reflect.apply(a.t,a,[...eA(u)])}},getSSRProps:r=>{const[l]=t(r);return{textContent:l}}}}function X7(e){if(Ut(e))return{path:e};if(Hn(e)){if(!("path"in e))throw tr($o.REQUIRED_VALUE,"path");return e}else throw tr($o.INVALID_VALUE)}function eA(e){const{path:t,locale:n,args:i,choice:s,plural:o}=e,r={},l=i||{};return Ut(n)&&(r.locale=n),vs(s)&&(r.plural=s),vs(o)&&(r.plural=o),[t,l,r]}function NH(e,t,...n){const i=Hn(n[0])?n[0]:{};(Xn(i.globalInstall)?i.globalInstall:!0)&&([Y7.name,"I18nT"].forEach(o=>e.component(o,Y7)),[J7.name,"I18nN"].forEach(o=>e.component(o,J7)),[iA.name,"I18nD"].forEach(o=>e.component(o,iA))),e.directive("t",LH(t))}const FH=Nu("global-vue-i18n");function BH(e={}){const t=__VUE_I18N_LEGACY_API__&&Xn(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Xn(e.globalInjection)?e.globalInjection:!0,i=new Map,[s,o]=$H(e,t),r=Nu("");function l(d){return i.get(d)||null}function a(d,f){i.set(d,f)}function u(d){i.delete(d)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...f){if(d.__VUE_I18N_SYMBOL__=r,d.provide(d.__VUE_I18N_SYMBOL__,c),Hn(f[0])){const m=f[0];c.__composerExtend=m.__composerExtend,c.__vueI18nExtend=m.__vueI18nExtend}let p=null;!t&&n&&(p=HH(d,c.global)),__VUE_I18N_FULL_INSTALL__&&NH(d,c,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(_H(o,o.__composer,c));const g=d.unmount;d.unmount=()=>{p&&p(),c.dispose(),g()}},get global(){return o},dispose(){s.stop()},__instances:i,__getInstance:l,__setInstance:a,__deleteInstance:u};return c}function Bt(e={}){const t=K1();if(t==null)throw tr($o.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw tr($o.NOT_INSTALLED);const n=DH(t),i=zH(n),s=IE(t),o=RH(e,s);if(o==="global")return EE(i,e,s),i;if(o==="parent"){let a=tA(n,t,e.__useComponent);return a==null&&(a=i),a}if(o==="isolated"){if(n.mode!=="composition")throw tr($o.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,u=bs({},e),c=tA(n,t);u.__root=c||i;const d=vm(u);return a.__composerExtend&&(d[Kd]=a.__composerExtend(d)),P2()&&Rf(()=>{const p=d[Kd];p&&(p(),delete d[Kd])}),d}const r=n;let l=r.__getInstance(t);if(l==null){const a=bs({},e);"__i18n"in s&&(a.__i18n=s.__i18n),i&&(a.__root=i),l=vm(a),r.__composerExtend&&(l[Kd]=r.__composerExtend(l)),PH(r,t,l),r.__setInstance(t,l)}return l}function $H(e,t){const n=sz(),i=__VUE_I18N_LEGACY_API__&&t?n.run(()=>X4(e)):n.run(()=>vm(e));if(i==null)throw tr($o.UNEXPECTED_ERROR);return[n,i]}function DH(e){const t=an(e.isCE?FH:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw tr(e.isCE?$o.NOT_INSTALLED_WITH_PROVIDE:$o.UNEXPECTED_ERROR);return t}function RH(e,t){return Q2(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function zH(e){return e.mode==="composition"?e.global:e.global.__composer}function tA(e,t,n=!1){let i=null;const s=t.root;let o=OH(t,n);for(;o!=null;){const r=e;if(e.mode==="composition")i=r.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const l=r.__getInstance(o);l!=null&&(i=l.__composer,n&&i&&!i[ME]&&(i=null))}if(i!=null||s===o)break;o=o.parent}return i}function OH(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function PH(e,t,n){pn(()=>{},t),An(()=>{const i=n;e.__deleteInstance(t);const s=i[Kd];s&&(s(),delete i[Kd])},t)}const jH=["locale","fallbackLocale","availableLocales"],nA=["t","rt","d","n","tm","te"];function HH(e,t){const n=Object.create(null);return jH.forEach(s=>{const o=Object.getOwnPropertyDescriptor(t,s);if(!o)throw tr($o.UNEXPECTED_ERROR);const r=ls(o.value)?{get(){return o.value.value},set(l){o.value.value=l}}:{get(){return o.get&&o.get()}};Object.defineProperty(n,s,r)}),e.config.globalProperties.$i18n=n,nA.forEach(s=>{const o=Object.getOwnPropertyDescriptor(t,s);if(!o||!o.value)throw tr($o.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,o)}),()=>{delete e.config.globalProperties.$i18n,nA.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const WH=tt({name:"i18n-d",props:bs({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},p5),setup(e,t){const n=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return LE(e,t,CE,(...i)=>n[Y4](...i))}}),iA=WH;AH();eH($j);tH(Yj);nH(K4);if(__INTLIFY_PROD_DEVTOOLS__){const e=Sc();e.__INTLIFY__=!0,Dj(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const qH={preview:"Preview",confirm:"Confirm",cancel:"Cancel",close:"Close",dismiss:"Dismiss",loading:"Loading",copy:"Copy"},UH={authBannerMessage:"Not signed in · Sign in to Kimi Code to start a conversation",authBannerLogin:"Sign in",connecting:"Connecting…",internalBuildBanner:"Internal testing only",menuFile:"File",menuEdit:"Edit",menuView:"View",menuHelp:"Help",applicationMenu:"Application menu"},KH={workspaceMeta:"workspace · {branch}",sessionsHeader:"sessions",workspaces:"Workspaces",viewSwitcher:"View options",viewGroup:"View",viewFlat:"Flat list",viewGrouped:"Group by workspace",sortGroup:"Sort order",sortManual:"Manual",sortRecent:"Recent activity",collapseAll:"Collapse all workspaces",expandAll:"Expand all workspaces",newSession:"New Session",newChat:"New Session",newWorkspace:"New Workspace",dropToAddWorkspace:"Drop to add workspace",emptyState:"No sessions yet · click New Session to start",options:"Options",rename:"Rename",genTitle:"Gen Title",genTitleUnavailable:"Title generation unavailable — needs a managed Kimi Code login and at least one message",setEmoji:"Set Emoji…",sessionEmojiTitle:"Pick an emoji",removeEmoji:"Remove emoji",randomEmoji:"Random",searchEmoji:"Search emoji",recentEmojis:"Recently used",noEmojiResults:"No matching emoji",emojiGroupFaces:"Smileys & People",emojiGroupNature:"Animals & Nature",emojiGroupFood:"Food & Drink",emojiGroupActivity:"Activities & Travel",emojiGroupObjects:"Objects & Work",emojiGroupSymbols:"Symbols & Status",copyPath:"Copy path",copySessionId:"Copy session ID",copied:"Copied ✓",copyFailed:"Copy failed",archive:"Archive",archiveToastUndo:"Undo",archiveToastMid:"or view archived chats in",archiveToastSettings:"Settings",archiveToastTail:"",fork:"Fork session",export:"Export session",pin:"Pin",unpin:"Unpin",pinned:"Pinned",collapsePinned:"Collapse pinned",expandPinned:"Expand pinned",delete:"Delete",removeWorkspace:"Remove workspace",brand:"Kimi Code",signedIn:"Signed in",signOut:"Sign out",notSignedIn:"Not signed in",signIn:"Sign in",defaultUserName:"Kimi User",upgrade:"Upgrade",upgradeMembership:"Upgrade membership",logoutConfirmTitle:"Sign out",logoutConfirmMessage:"Are you sure you want to sign out?",language:"Language",backendTitle:"Backend {backend} · {endpoint} — click to switch",noSessions:"No conversations yet",allPinned:"{count} conversations pinned",showMore:"Show more",loadMore:"Load more",showLess:"Show less",loadingMore:"Loading…",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",searchPlaceholder:"Search sessions and workspaces",search:"Search",searchHint:"↑↓ navigate · ↵ open · Esc close",searchHintSelect:"navigate",searchHintOpen:"open",searchHintClose:"close",searchClear:"Clear search",searchNoResults:"No matching sessions or workspaces",searchEmpty:"No sessions yet",update:"Upgrade",updateAvailable:"v{version} available",updateDownloading:"Downloading… {percent}%",updateReady:"v{version} ready",updateDone:"Restart",updateFailed:"Download failed",updateRetry:"Retry",updateDownloadNow:"Download & Update",updateSkip:"Skip This Version",updateRestartNow:"Restart Now",updateRestartLater:"Later",updateReleaseDate:"Released {date}",updateCurrentVersion:"Current v{version}",updateWhatsNew:"What’s new",updateBackground:"Download in Background",updateAutoDownload:"Automatically download and install updates"},VH={switcherTitle:"Switch workspace",switchTooltip:"Switch workspace",eyebrow:"Workspace",branchLabel:"branch: {branch}",noBranch:"no branch",sessionCount:"{count} session | {count} sessions",allWorkspaces:"All workspaces",currentWorkspace:"Current workspace only",addWorkspace:"Add workspace…",noWorkspace:"No workspace",deleteHasSessions:"This workspace still has sessions — archive them before deleting it",removeWorkspaceConfirm:'Remove workspace "{name}"?',swarmEnableTitle:"Enable swarm mode?",swarmEnableConfirm:"The agent will run multiple sub-agents in parallel.",goalStartTitle:"Start goal?",goalStartConfirm:'"{objective}" — the agent will run autonomously toward it.',scopeCurrent:"this workspace",scopeAll:"all workspaces",newInGroup:"New session in this workspace",addTitle:"Add workspace",pathLabel:"Path",pathPlaceholder:"/absolute/path/to/project",recentLabel:"Recent folders",add:"Add",cancel:"Cancel",addHint:"Paste an absolute folder path, or pick a recent one.",addFailed:"Couldn't open this folder. Check the path and try again.",requiredTitle:"Choose a workspace first",requiredMessage:"Pick a folder to use as your workspace before sending a message.",openThisFolder:"Open this folder",up:"Up",browsing:"Browsing…",filterPlaceholder:"Filter subfolders…",searchPlaceholder:"Fuzzy-search under this folder…",searching:"Searching…",pasteToggle:"Enter an absolute path",noFilterMatch:"No subfolders match “{q}”",noSubfolders:"No subfolders here",browseHint:'Click a folder to enter it, then "Open this folder" to add it as a workspace.',attentionTitle:"{count} item needs your attention | {count} items need your attention",awaitingAnswer:"Answer",awaitingAnswerTitle:"A question is waiting for your answer",awaitingPermission:"Approve",awaitingPermissionTitle:"An action is waiting for your approval",aborted:"Failed",abortedTitle:"This session's latest turn ended on an error"},ZH={jumpToLatestAria:"Jump to latest message",toc:"Conversation outline",newMessages:"Latest messages",loading:"Loading…",starting:"Starting conversation…",requesting:"Requesting…",working:"Working…",workingRetry:"Model request failed — retrying ({n}/{max})…",emptyWorkspaceHint:"Send in {name}",switchWorkspace:"Switch workspace",addWorkspace:"New workspace",moreWorkspaces:"More workspaces ({count})",pickFolder:"Choose folder…",compacting:"Compacting context…",compactedPlain:"Context compacted",compactedAuto:"Context auto-compacted",compactedTokens:" ({before} → {after} tokens)",viewSummary:"View summary",summaryTitle:"Compaction summary",activatedSkill:"Activated skill: {name}",undo:"Undo",undoTooltip:"Undo edit",undoConfirm:"Undo last message?",escUndoHintPre:"Press",escUndoHintPost:"again to undo",undone:"Undone — the message is back in the composer",turnInterrupted:"Manually stopped",turnFailed:"Model request failed — this turn was interrupted",turnFailedMaxSteps:"Step limit reached — this turn was interrupted",turnFailedResume:"Continue",turnFailedResumeText:"Continue",yesterday:"Yesterday",loadOlder:"Load earlier messages",loadingOlder:"Loading earlier messages…",widenTable:"Widen table",restoreTableWidth:"Restore default width",cron:{fired:"Scheduled reminder fired",missed:"Missed scheduled reminders",job:"job {id}",oneShot:"one-shot",coalesced:"{n} fires coalesced",missedCount:"{n} missed",finalDelivery:"final delivery",expand:"Show more",collapse:"Show less"},fold:{worked:"Worked {duration}",workedUnknown:"Work details"},turnFiles:{titleOne:"{number} file changed",titleOther:"{number} files changed",more:"{number} more files",moreOne:"1 more file",showLess:"Show less",diffTitle:"Changes this turn",diffUnavailable:"This file’s changes can’t be shown line by line",openFile:"Open file"},goal:{continuation:"Goal continuation"},notification:{kindTask:"Background task",kindSubagent:"Subagent",title:{completed:"{kind} completed",failed:"{kind} failed",timed_out:"{kind} timed out",killed:"{kind} killed",lost:"{kind} lost",info:"{kind} notification"},status:{completed:"completed",failed:"failed",timed_out:"timed out",killed:"killed",lost:"lost",info:"info"},groupTitle:"{n} notifications",copyPath:"Copy path",copied:"Copied",rawPayload:"Raw payload",fields:{type:"Type",source:"Source",severity:"Severity"}},userMessage:{expand:"Show more",collapse:"Show less"},search:{placeholder:"Search chat…",searching:"Searching…",results:"{current}/{total} results",resultsCapped:"{current}/{total}+ results",noResults:"No results",previous:"Previous match",next:"Next match",close:"Close search"}},GH={connectionConnected:"Connected",connectionConnecting:"Connecting…",connectionDisconnected:"Disconnected",ctxTooltip:"Used {used} / {max} tokens ({pct}%)",modelLabel:"Model",permissionManual:"Manual",permissionAuto:"Auto",permissionYolo:"YOLO",permissionManualDesc:"Ask for approval on every tool action",permissionAutoDesc:"Fully autonomous — agent decides everything without asking",permissionYoloDesc:"Auto-approve tool actions, but agent may still ask questions",planLabel:"Plan",planOn:"on",planOff:"off",planTooltip:"Toggle plan mode (research before editing)",workModeDismiss:"Exit mode",goalLabel:"Goal",timeUnitHour:"h",timeUnitMinute:"m",timeUnitSecond:"s",planEmptyArmed:"Plan mode is on — the plan the agent writes will show up here.",planEmptyIdle:"No plan yet — turn plan mode on and the agent’s plan will show up here.",swarmLabel:"Swarm",swarmDismiss:"Turn off Swarm",modeOff:"Off",goalPlaceholder:"What should the agent achieve?",planPlaceholder:"What should the agent plan for?",goalStart:"Start",goalPause:"Pause",goalResume:"Resume",goalCancel:"Cancel",goalCancelConfirm:"Cancel this goal? It cannot be resumed afterwards.",goalCancelConfirmYes:"Yes",goalCancelConfirmNo:"No",goalDoneWhen:"Done when",goalStatusActive:"Active",goalStatusPaused:"Paused",goalStatusBlocked:"Blocked",goalStatusComplete:"Complete",modeNotSupported:"Not supported",thinkingLabel:"Thinking",thinkingTooltip:"Toggle thinking mode",thinkingOn:"On",thinkingOff:"Off",cacheNote:"Note: Switching models or thinking effort invalidates the existing prompt cache. Start a new chat to avoid extra token costs.",starredModels:"Starred",moreModels:"More models…",statusPanelTitle:"Session status",statusPanelClose:"Close",statusModel:"Model",statusThinking:"Thinking",statusPermission:"Permission",statusPlanMode:"Plan mode",statusSwarmMode:"Swarm mode",swarmOn:"on",swarmOff:"off",statusContext:"Context",statusCost:"Cost",statusContextValue:"{used} / {max} ({pct}%)",statusNone:"—",activityRunning:"Running…",activityAwaitingApproval:"Awaiting approval",activityAwaitingQuestion:"Awaiting answer",interrupt:"Interrupt",runningShort:"in progress"},QH={placeholder:"Type a message…",send:"Send ↵",queueLabel:"Queue",placeholderRunning:"Press Enter to queue · Ctrl+S to inject into the running turn",starting:"Sending…",queueAutoDrain:"sends automatically when the current turn ends",queueNext:"Up next",queueDragTitle:"Drag to reorder",editQueued:"Edit (load back into the input)",queuedAttachments:"attachment ×{n}",queuedHasImage:"Contains {n} image(s) — remove only, not editable",attachmentImage:"Image",attachmentVideo:"Video",attachmentFile:"File",attachmentOpenUnsupported:"Can’t open {name} — this file type isn’t supported",dropToAttach:"Drop files to attach",remove:"Remove",removeNamed:"Remove {name}",clearAll:"Clear all attachments",attachmentCount:"{n} attachments",uploading:"Uploading",uploadFailed:"Upload failed",attachFile:"Attach file",addMenu:"Add",addFiles:"Files",addGoalDesc:"Set a goal to keep pursuing",addPlanDesc:"Turn plan mode on",addSwarmDesc:"Turn swarm mode on",noCommands:"No commands",previewAttachment:"Preview {name}",interrupt:"Interrupt",interruptTitle:"Interrupt current operation",expandTitle:"Expand input for multi-line editing",collapseTitle:"Collapse input",emptyConversationTitle:"Kimi Code",emptyConversation:"No messages yet — type below to start the conversation",upgradeBanner:"Upgrade your Kimi account to use Kimi Code",quickStartPlaceholder:"Type a message to start a new conversation…",thinkingSuffix:" · thinking",thinkingSuffixEffort:" · {level}"},YH={title:"Sign in to Kimi Code",close:"Close (Esc)",starting:"Starting sign-in flow…",lead:"Click the button below to sign in from a new browser tab.",authorizeInBrowser:"Sign in via browser",orDivider:"or",fallbackPrefix:"On another device? Open ",fallbackSuffix:" and enter the device code:",copy:"Copy",copied:"Copied",copyLink:"Copy link",waitingAuth:"Waiting for sign-in",waitingAutoClose:"Waiting for sign-in, closes automatically…",success:"Signed in",successHint:"Loading, will close automatically…",expiredTitle:"Device code expired",expiredHint:"Please restart the sign-in flow",retry:"Retry",closeBtn:"Close",errorTitle:"The current version does not support login yet",errorHint:"Please upgrade kimi-code and try again",pollErrorTitle:"Lost connection",pollErrorHint:"Sign-in polling failed repeatedly. Check the kimi-code process and try again.",action:"Sign in",requiredTitle:"Sign in required",requiredMessage:"Sign in to your Kimi account and set up a model to start chatting.",goToLogin:"Sign in",upgradeRequiredTitle:"Upgrade required",upgradeRequiredMessage:"Your account is on the free plan. Upgrade to a membership to start chatting with Kimi models.",rcSubtitle:"Remote Control session",rcChecking:"Checking sign-in status…",rcLead:"This Remote Control session requires authorization. Sign in with your Kimi account to continue.",rcAuthorize:"Open authorization page",rcUserCodeLabel:"Authorization code",rcSuccessHint:"Redirecting…",rcExpiredTitle:"Authorization expired or declined",rcStartErrorTitle:"Could not start sign-in",rcConnectionErrorHint:"Check your connection and try again.",rcSuccessNoRedirect:"You can close this page now."},JH={title:"Provider management",loading:"Loading providers…",unavailable:"Provider management is not available yet",empty:"No providers yet",status:{connected:"Connected",error:"Error",unconfigured:"Not configured"},keySet:"key set",keyNotSet:"key not set",managedBadge:"OAuth",modelCount:"{count} models",confirmDelete:"Confirm delete?",refresh:"Refresh",delete:"Delete",refreshTitle:"Refresh {type}",deleteTitle:"Delete {type}",loginKimi:"Sign in to Kimi",loginAnthropic:"Sign in to Anthropic",addProvider:"Add provider",added:"Provider added",enterApiKey:"Enter API Key",optional:"Optional",apiKeyRequired:"API Key cannot be empty",fieldId:"Name",fieldType:"API Protocol",types:{kimi:"Kimi",openai:"OpenAI",openai_responses:"OpenAI Responses",anthropic:"Anthropic","google-genai":"Google GenAI",vertexai:"Vertex AI"},fieldApiKey:"API Key",apiKeyManaged:"Signed in with OAuth",apiKeySet:"Set — enter a new key to replace",showApiKey:"Show API key",hideApiKey:"Hide API key",fieldBaseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com/v1",fieldModels:"Models",colModelId:"Model ID",colContext:"Context",colDisplayName:"Display name",modelIdPlaceholder:"kimi-k3",modelContextPlaceholder:"1048576",modelNamePlaceholder:"Optional",noModels:"No models",addModel:"Add model",removeModel:"Remove model",fieldDefaultModel:"Default model",save:"Save",saved:"Provider saved",deleteProvider:"Delete provider",deleteConfirm:"Delete {id} and its {count} models?",deleteConfirmYes:"Delete",managedHint:"Managed providers sign in and out on the Account tab",unsavedGuard:"You have unsaved changes.",guardStay:"Keep editing",guardDiscard:"Discard",add:"Add",catalog:{sourceCatalog:"From directory",sourceManual:"Manual",sourceRegistry:"Registry",registryHint:"Import providers and models from an api.json registry; re-importing the same URL refreshes it",registryUrlLabel:"Registry URL",registryImported:"{count} providers imported",searchPlaceholder:"Search providers",loading:"Loading directory…",loadError:"Failed to load the directory. Check your network and retry.",retry:"Retry",empty:"No matching providers",rejected:"Not importable",rejectReason:{"unknown-explicit-type":"Unsupported protocol","proprietary-sdk":"Proprietary SDK — cannot be imported","empty-base-url":"Blank base URL","placeholder-base-url":"Endpoint contains an env placeholder"},backToList:"Back to directory",willImport:"{count} models will be imported from the directory",overwriteWarning:"A provider with this name already exists; importing overwrites its config and models",importAction:"Import"},error:{idRequired:"Name cannot be empty",idInvalid:'Name must start with a letter or digit and may only contain letters, digits, "-", "_" and spaces',apiKeyRequired:"API Key cannot be empty",baseUrlRequired:"Base URL cannot be empty",registryUrlRequired:"Registry URL cannot be empty",modelRequired:"Model ID cannot be empty",contextSizeRequired:"Max context size cannot be empty",contextSizeInvalid:"Max context size must be a positive integer"},hintClose:"Close"},XH={dialogLabel:"Switch model",title:"Switch model",close:"Close (Esc)",allTab:"All",providerTabs:"Model providers",searchPlaceholder:"Search models or providers…",clearSearch:"Clear search",loading:"Loading models…",unavailable:"Model list is unavailable",contextSuffix:"{size} ctx",capabilityImageInput:"Image input",capabilityVideoInput:"Video input",capabilityToolUse:"Tool use",capabilityThinking:"Thinking",capabilityAlwaysThinking:"Always thinking",emptyNoModels:"No models available",emptyNoMatch:"No matching models",starTitle:"Add to favorites",unstarTitle:"Remove from favorites",hintNavigate:"Navigate",hintSelect:"Select",hintClose:"Close"},eW={justNow:"just now"},tW={title:{shell:"Run command?",diff:"Apply changes?",file:"Write file?",fileop:"File operation?",url:"Fetch URL?",search:"Search?",invocation:"Invoke?",todo:"Update todo?",plan_review:"Ready to build with this plan?",generic:"Approve action?"},subagentBadge:"sub agent · {name}",danger:"Danger: {detail}",searchQueryLabel:"query",searchScope:"scope: {scope}",feedbackPlaceholder:"Explain why you are rejecting… (Enter to submit, Esc to cancel)",feedbackHint:"Enter to submit · Esc to cancel",approve:"Approve",approveSession:"Approve for session",reject:"Reject",feedback:"Feedback",feedbackSubmit:"Reject with feedback",feedbackCancel:"Cancel",approvePlan:"Approve plan",revise:"Revise",rejectAndExit:"Reject and Exit",expandPlan:"Expand",collapsePlan:"Collapse"},nW={back:"‹ Previous question",nextQuestion:"Next question ›",otherDefault:"Other…",submit:"Submit",dismiss:"Dismiss",minimize:"Minimize",expand:"Expand",hint:"↑↓ to choose · Enter to confirm"},iW={tag:"tasks",summary:"{run} running · {done} done",copy:"Copy",calling:"Calling {label}",fieldTask:"Task",fieldOutput:"Output",fieldProgress:"Progress",fieldResult:"Result",moreLines:"… ({count} more)",copied:"Copied",stop:"stop",defaultDescription:"Background task",dockTasks:"Background tasks",dockBash:"Bash",dockSubagent:"Sub Agent",dockTodos:"Todos",todoProgressTitle:"Progress",stateDone:"Done",stateFail:"Failed",stateCancelled:"Cancelled",filterRecent:"Recent",filterRunning:"Running",filterDone:"Done",filterAll:"All",running:"running",closePanel:"Close panel",openPanel:"Open in the side panel",timingRunning:"Running · {time}",timingDone:"Done · {time}",emptyTasks:"No background tasks running",emptyRecent:"No recent tasks",emptyRunning:"No running tasks",emptyDone:"No completed tasks",emptyBash:"No bash tasks running",emptySubagent:"No sub agent tasks running",emptyTodo:"No todos yet",openTab:"Open the tasks tab",openDetail:"Open",collapse:"Collapse",expand:"Expand",transcriptLoadError:"Failed to load this sub agent’s conversation.",copyCommand:"Copy command",copyOutput:"Copy output"},sW={panelTitle:"Thinking",streaming:"Thinking…",close:"Close"},oW={title:"Changes",branch:"branch",aheadTitle:"ahead of remote",behindTitle:"behind remote",fileCountOne:"{number} file",fileCountOther:"{number} files",empty:"No git changes",clean:"Working tree clean, no changes",back:"Back",loading:"Loading diff…",noDiff:"No line changes for this file",emptyFile:"Empty file",list:"List",tree:"Tree",close:"Close"},rW={},lW={empty:"Select a file on the left to preview",loading:"Loading…",lineCount:"{count} lines",copy:"Copy",copied:"Copied",copyPath:"Copy path",openInEditor:"Open",reveal:"Reveal",download:"Download",close:"Close",search:"Search",prevMatch:"Previous match",nextMatch:"Next match",htmlMode:"HTML preview mode",markdownMode:"Markdown preview mode",preview:"Preview",source:"Source",imageFit:"Image sizing",fit:"Fit",actual:"Actual",pdfNoPreview:"This PDF cannot be embedded here. Download it to view.",imageNoPreview:"Image file · {mime} · {size} · preview unavailable",binaryNoPreview:"Binary file · {mime} · {size} bytes · preview unavailable",unknownType:"unknown type",copyCode:"Copy code",enlargeImage:"Enlarge image",errors:{emptyPath:"File path is empty",unsupportedPath:"URLs and remote paths cannot be previewed",outsideWorkspace:"Only files inside the current workspace can be previewed",isDirectory:"Select a file instead of a directory",notFound:"File no longer exists or was moved",tooLarge:"File is too large to preview",loadFailed:"Unable to read this file"}},aW={searching:"Searching…",noMatch:"No matches"},uW={dismiss:"Close",errorLabel:"Error",noteLabel:"Note",agentWarningFallback:"agent warning",unhandledEvent:"Unhandled event: {type}",agentError:{title:"Model request failed",connection:"Cannot connect to the model service",auth:"Model authentication failed",rateLimit:"Model rate limit reached",overloaded:"Model overloaded",filtered:"Response filtered by the provider",api:"Model API error",contextOverflow:"Context size exceeded"},details:{cause:"Cause",code:"Error code",connection:"Connection",contentType:"Content type",details:"Server details",duration:"Duration",endpoint:"Endpoint",errorName:"Error type",message:"Message",operation:"Operation",phase:"Failure phase",request:"Request",requestId:"Request ID",responsePreview:"Response preview",sessionId:"Session ID",stack:"Stack",status:"HTTP status",timeout:"Timeout",timestamp:"Time"},daemonApiTitle:"Kimi server returned an error",daemonNetworkMessage:"Web did not receive a response from the Kimi server. Check that it is still running, or refresh the page.",daemonNetworkTitle:"Cannot connect to Kimi server",daemonTimeoutMessage:"The Kimi server did not respond within the wait limit. The operation may still complete in the background — refresh later to check, or try again.",daemonTimeoutTitle:"Kimi server response timed out",diagnostics:"Diagnostics",hideDetails:"Hide details",operationFailedMessage:"The last operation did not finish. Try again later.",operationFailedTitle:"Operation failed",sessionSnapshotMessage:"Web could not load the current conversation. Check that the Kimi server is still running, or refresh the page.",sessionSnapshotTitle:"Cannot load current conversation",showDetails:"Show details",copyDetails:"Copy diagnostics",copied:"Copied",wsTitle:"Realtime connection error",goal:{alreadyExists:"This session already has an active goal. Cancel it before starting a new one.",notFound:"No goal to act on — it may have already finished or been cancelled.",statusInvalid:"The current goal state does not allow this action.",notResumable:"This goal cannot be resumed (it may be cancelled or completed).",objectiveTooLong:"The objective is too long. Please shorten it and try again."}},cW={new:{desc:"Create a new session"},clear:{desc:"Clear and start a new session"},login:{desc:"Sign in to Kimi in the browser"},plan:{desc:"Toggle plan mode on/off"},swarm:{desc:"Toggle swarm mode; /swarm <task> runs a task in swarm"},goal:{desc:"Create/control a goal: /goal <objective>, /goal pause{'|'}resume{'|'}cancel"},btw:{desc:"Side chat: /btw <question> asks a forked side session"},yolo:{desc:"Auto-approve tool actions; the agent may still ask questions"},auto:{desc:"Fully autonomous — the agent never asks questions"},thinking:{desc:"Set the thinking level"},compact:{desc:"Compact the conversation history"},fork:{desc:"Fork this session into a new one"},export:{desc:"Download this session and troubleshooting logs as a ZIP",noSession:"Open a session before exporting it.",started:"Exporting session…",done:"Session exported.",tooLarge:"Session data exceeds the export size limit. Export it from a terminal instead: kimi export {sessionId} -o session.zip"},status:{desc:"View session status"},undo:{desc:"Undo the last message"}},dW={label:{read:"Read",bash:"Run",edit:"Edit",write:"Write",grep:"Search",glob:"Find",ls:"List",web_fetch:"Fetch",search:"Search",todo:"Todo",task:"Task",swarm:"Swarm",ask_user:"Question",plan:"Plan",goal_create:"Start Goal",goal_get:"Read Goal",goal_budget:"Set Goal Budget",goal_update:"Update Goal"},swarm:{progress:"{done} / {total}",runningSub:"{count} in progress",doneSub:"{completed} completed · {failed} failed",doneSubWithCancelled:"{completed} completed · {failed} failed · {cancelled} cancelled",phaseQueued:"Queued",phaseWorking:"Working",phaseSuspended:"Suspended",phaseCompleted:"Completed",phaseFailed:"Failed",phaseCancelled:"Cancelled",waiting:"Waiting for subagents…"},chip:{lines:"{count} lines",results:"{count} results",files:"{count} files",edited:"edited",created:"created",todos:"{count} items"},disclosure:{expand:"Expand details",collapse:"Collapse details"},output:{waiting:"Waiting for output…",empty:"No output",saved:"Saved result"},plan:{review:{pending:"Pending review",approved:"Approved",rejected:"Rejected",cancelled:"Cancelled"},selectedOption:"Selected",pathOnlyHint:"No inline content — open it in the side panel:",feedback:"Feedback"},summary:{inScope:"{value} in {scope}"},goal:{objectiveWithCriterion:"{objective} · {criterion}",status:"Status: {status}",budget:"{value} {unit}",turns:"{value} turns",tokens:"{value} tokens",milliseconds:"{value} ms",seconds:"{value} sec",minutes:"{value} min",hours:"{value} hr"},group:{countOther:"{count} tool call | {count} tool calls",typed:{read:{done:"Read {count} file | Read {count} files"},bash:{done:"Ran {count} command | Ran {count} commands"},grep:{done:"Searched {count} pattern | Searched {count} patterns"},search:{done:"Ran {count} web search | Ran {count} web searches"},glob:{done:"Matched {count} file pattern | Matched {count} file patterns"},ls:{done:"Listed {count} directory | Listed {count} directories"},web_fetch:{done:"Fetched {count} page | Fetched {count} pages"},edit:{done:"Made {count} edit | Made {count} edits"},write:{done:"Wrote {count} file | Wrote {count} files"}}},activity:{failedClause:" ({count} failed)",liveDonePrefix:"",busy:"Working…",doing:{read:"Reading {subject}",bash:"Running {subject}",grep:"Searching {subject}",search:"Searching {subject}",glob:"Matching {subject}",ls:"Listing {subject}",web_fetch:"Fetching {subject}",edit:"Editing {subject}",write:"Writing {subject}"}},ask:{dismissed:"Dismissed",answer:"{count} answer",answers:"{count} answers",answered:"Answered",more:"(+{count} more)",collected:"Collected your answers",question:"{count} question",questions:"{count} questions",freeInput:"(free text)",unanswered:"No answer"}},fW={resizeHandleAria:"Resize sidebar width",resizePreviewAria:"Resize preview panel width",detailPanelAria:"Detail panel"},hW={openSwitcher:"Switch session / workspace",openSettings:"Session settings",settingsTitle:"Session settings",groupSession:"Current session",groupApp:"App preferences",sheetLabel:"Sheet",closeSheet:"Close",tapToCycle:"tap to cycle",running:"running",idle:"idle",sessionCount:"{n} sessions",newSession:"New session",permManualSub:"confirm every tool",permAutoSub:"fully autonomous, never asks",permYoloSub:"auto-approve tools, may still ask",planModeSub:"Plan mode",goalModeSub:"Goal mode",swarmModeSub:"Swarm mode",archivedSessions:"Archived sessions",archivedSessionsSub:"Browse and restore archived sessions",archivedBack:"Back"},pW={colorSchemeLabel:"Appearance",light:"Moon bright",dark:"Moon dark",system:"System"},gW={continue:"Continue",back:"Back",skip:"Skip",welcome:{title:"Welcome to Kimi Code",subtitle:"The AI coding workbench for professional developers",languageLabel:"Language",themeLabel:"Appearance"},login:{title:"Configure Model",subtitle:"Choose the model service that powers Kimi Code. You can change it later in Settings",kimiTitle:"Sign in with Kimi",kimiHint:"Ready out of the box with Kimi membership benefits",recommended:"Recommended",customProviderTitle:"Add a custom provider",customProviderHint:"Bring your own API key for OpenAI-compatible and other services",loggedInTitle:"Logged in with Kimi",loggedInHint:"Your model service is ready to use",finish:"Finish",skip:"Skip for now"}},mW={title:"Settings",internalTest:"Internal Test",close:"Close (Esc)",tabs:{general:"General",agent:"Agent",account:"Account",providers:"Providers",advanced:"Advanced",archived:"Archived",shortcuts:"Hotkeys",plugins:"Plugins"},plugins:{retry:"Retry",builtIn:"Built-in",official:"Official",thirdParty:"Third-party",installed:"Installed",install:"Install",update:"Update",remove:"Remove",enabled:"Enabled",homepage:"Homepage",empty:"No plugins found",hasErrors:"Error",customInstall:"Install custom plugin",customInstallPlaceholder:"https://… or /path/to/plugin",customInstallHint:"Accepts an https zip URL, a GitHub repo URL, or a local directory path.",extensionHintTitle:"One step left: install the browser extension",extensionGuide:"Manual install",dismissHint:"Dismiss",catalogUnavailable:"The marketplace catalog is currently unreachable; installed plugins remain manageable below.",source:{"local-path":"Local","zip-url":"ZIP",github:"GitHub"},counts:{skill:"1 skill | {n} skills",mcp:"1 MCP server | {n} MCP servers",mcpEnabled:"{n} on",hook:"1 hook | {n} hooks",command:"1 command | {n} commands"}},appearance:"Appearance",notifications:"Notifications",notifyEnabled:"System notifications",notifyEnabledHint:"Send a system notification when a turn completes, needs an answer, or needs approval",notifySound:"Notification sound",notifySoundHint:"Play the system sound with notifications",notifyDenied:"Blocked in browser settings",notifyTitle:"Kimi Code · Turn finished",notifyQuestionTitle:"Kimi Code · Needs answer",notifyApprovalTitle:"Kimi Code · Approval required",notifyFallback:"View result",notifyQuestionFallback:"A question is waiting for your answer",notifyApprovalFallback:"A tool needs your approval",account:"Account",signedIn:"Signed in",signedOutHint:"Sign in to view your account and model access",planUsage:{title:"Plan Usage",retry:"Retry",loadFailed:"Failed to load",empty:"No usage data yet",weekLimit:"Weekly limit",genericLimit:"Limit",hourLimit:"{n}h limit",dayLimit:"{n}d limit",minuteLimit:"{n}m limit",resetsIn:"resets in {duration}",resetDone:"reset",durationDay:"{n}d",durationHour:"{n}h",durationMinute:"{n}m",durationSecond:"{n}s",usedPct:"{pct}% used",boosterTitle:"Booster",boosterBalance:"Balance",monthlyUsed:"Used this month",monthlyLimit:"Monthly limit",unlimited:"Unlimited",freeTitle:"Free account",freeHint:"Upgrade to a membership to use Kimi models and see plan usage"},colorSchemeHint:"Choose the app’s light or dark appearance",appIcon:"Dock icon",appIconHint:"Choose the icon shown in the Dock",appIconDefault:"Default",appIconBlack:"Black",uiFontSize:"Font size",uiFontSizeHint:"Adjust interface and message text size",vibrancy:"Frosted sidebar",vibrancyHint:"Use the native macOS frosted-glass material behind the sidebar — turn it off if the translucency is hard to read",languageHint:"Choose the interface language",defaultOpenInApp:"Default open-in app",defaultOpenInAppHint:"App used when opening files and folders from the header menu",openWith:"Open with",agentDefaults:"Agent defaults",saving:"Saving",defaultModel:"Default model",defaultModelHint:"New sessions prefer this model",noDefaultModel:"No default model",defaultPermission:"Default permission",defaultPermissionHint:"Only affects newly-created sessions",defaultThinking:"Thinking by default",defaultThinkingHint:"Whether new sessions start with thinking enabled",defaultPlanMode:"Plan mode by default",defaultPlanModeHint:"Whether new sessions start in plan mode",secondaryModelSection:"Subagents",secondaryModel:"Subagent model",secondaryModelHint:"Model and thinking effort that subagents use by default",secondaryModelEffort:"Thinking effort",noSecondaryModel:"Not set (inherit primary)",secondaryModelEffortAuto:"Model default",telemetry:"Improve product with usage data",telemetryHint:"When on, we collect anonymous interaction data (such as clicks, interruptions, and feature usage) to improve the product experience. You can turn it off at any time.",telemetryRestartHint:"Takes effect after restarting the service.",credentialReady:"Credential configured",credentialMissing:"Missing credential",configUnavailable:"The server did not return config yet. These settings are unavailable.",versionAndUpdates:"Version & updates",appVersion:"App version",appVersionHint:"The running app’s version and build time",checkUpdate:"Check for updates",checkUpdateHint:"Manually check whether a new version is available",checkUpdateBtn:"Check now",updateChecking:"Checking…",updateCheckLatest:"You’re on the latest version",updateCheckAvailable:"Version {version} is available — download it from the update entry in the sidebar",updateCheckUnsupported:"This build does not support update checks",updateCheckFailed:"Check failed. Please try again later.",updateCheckAvailableAuto:"Version {version} found — downloading in the background",updateCheckDownloaded:"Version {version} is ready — restart from the update entry in the sidebar",autoDownloadUpdate:"Auto-download updates",autoDownloadUpdateHint:"Download new versions in the background and install them on the next restart",privacy:"Data & privacy",diagnostics:"Diagnostics",build:"Build",serverVersion:"Server version",serverAddress:"Server address",serverAddressHint:"The address of the connected server",serverVersionHint:"The version of the connected service",exportLog:"Troubleshooting log",exportLogHint:"Export the troubleshooting log collected by the app",logHint:"Enable with ?debug=1 to capture",exportLogBtn:"Export log",archivedTitle:"Archived sessions",archivedDesc:"Browse archived sessions, see their workspace path, name, and archive time, and restore them to the session list.",archivedSearch:"Search archived sessions",archivedAllWorkspaces:"All workspaces",archivedSortLabel:"Sort by",archivedSortArchived:"Archive time",archivedSortCreated:"Created time",archivedSortName:"Name",archivedRestore:"Restore",archivedEmpty:"No archived sessions yet",archivedNoMatch:"No matching archived sessions",archivedSessionsCount:"{count} sessions",archivedAt:"Archived {time}",archivedLoadMore:"Load more",archivedLoading:"Loading…",archivedLoadingAll:"Loading all archived sessions…"},vW={openInEditor:"Open in editor",openInEditorShort:"Open",openInApp:"Open in {app}",chooseOpenApp:"Choose application",copyAll:"Copy all as Markdown",copyFinalSummary:"Copy final summary",copied:"Copied",lastUsed:"Last used",copyPath:"Copy path",changed:"{n} changed",gitTooltip:"Open Files > Changed",detached:"detached",openPr:"Open pull request",prStatusOpen:"open",prStatusClosed:"closed",prStatusMerged:"merged",prStatusDraft:"draft",prStatusUnknown:"unknown",options:"Options",copySessionId:"Copy session ID",renameSession:"Rename",forkSession:"Fork session",archiveSession:"Archive",exportSession:"Export session",devBadge:"Running in development mode"},yW={title:"Side chat",subtitle:"forked from this session",empty:"Ask a quick question on the side — it shares this session’s context.",placeholder:"Ask the side chat…",send:"Send"},bW={actions:{summonApp:{label:"Show App Window",desc:"Bring the app window to the foreground from anywhere"},newSession:{label:"New Session",desc:"Start a new session in the current workspace"},searchSessions:{label:"Search Chats",desc:"Open the session search dialog"},archiveSession:{label:"Archive Chat",desc:"Archive the current chat right away"},toggleSideChat:{label:"Toggle Side Chat",desc:"Open or close the /btw side chat"},toggleSidebar:{label:"Toggle Sidebar",desc:"Collapse or expand the session sidebar"},openFolder:{label:"Open Folder",desc:"Add a workspace folder with the native picker"},openInDefaultApp:{label:"Open in App",desc:"Open the workspace in your default editor/terminal"},openSettings:{label:"Open Settings",desc:"Show or hide the settings dialog"},toggleTerminal:{label:"Toggle Terminal",desc:"Show or hide the bottom terminal panel"},send:{label:"Send Message",desc:"Send the composer input"},newline:{label:"Newline",desc:"Insert a newline in the composer"}},searchPlaceholder:"Search shortcuts",unassigned:"Unassigned",unassign:"Unassign shortcut",edit:"Edit shortcut",reset:"Reset to default",resetAll:"Reset all to defaults",recording:"Press the new shortcut…",invalid:"This key combination can’t be used as a shortcut",notGlobal:"This key combination can’t be registered as a system-wide shortcut",globalTaken:"This shortcut is already taken by the system or another app",reserved:"Reserved by the system menu",reservedSteer:"Reserved for steer (Ctrl/Cmd+S)",reservedFind:"Reserved for transcript find (Ctrl/Cmd+F)",conflict:"Already used by “{action}”",customBadge:"Custom"},kW={panelAria:"Terminal",toolbarAria:"Terminal tabs",resizeAria:"Resize terminal panel height",toggle:"Toggle terminal",newTab:"New terminal",closeTab:"Close terminal",restartTab:"Restart terminal",collapse:"Collapse terminal panel",empty:"No terminal yet — click to start one",processExited:"[process exited]",processExitedWithCode:"[process exited with code {code}]"},AW={common:qH,app:UH,sidebar:KH,workspace:VH,conversation:ZH,status:GH,composer:QH,login:YH,providers:JH,model:XH,sessions:eW,approval:tW,question:nW,tasks:iW,thinking:sW,diff:oW,fileTree:rW,filePreview:lW,mention:aW,warnings:uW,commands:cW,tools:dW,layout:fW,mobile:hW,theme:pW,onboarding:gW,settings:mW,header:vW,sideChat:yW,shortcuts:bW,terminal:kW},CW={preview:"预览",confirm:"确认",cancel:"取消",close:"关闭",dismiss:"关闭",loading:"加载中",copy:"复制"},wW={authBannerMessage:"未登录 · 需要登录 Kimi Code 才能开始对话",authBannerLogin:"登录",connecting:"连接中…",internalBuildBanner:"仅供内部测试",menuFile:"文件",menuEdit:"编辑",menuView:"视图",menuHelp:"帮助",applicationMenu:"应用菜单"},xW={workspaceMeta:"workspace · {branch}",sessionsHeader:"会话",workspaces:"工作区",viewSwitcher:"视图选项",viewGroup:"视图",viewFlat:"平铺列表",viewGrouped:"按工作区分组",sortGroup:"排序",sortManual:"手动排序",sortRecent:"按最近活动",collapseAll:"折叠全部工作区",expandAll:"展开全部工作区",newSession:"新建会话",newChat:"新建会话",newWorkspace:"新建工作区",dropToAddWorkspace:"松开鼠标添加工作区",emptyState:"还没有会话 · 点击 新建会话 开始",options:"选项",rename:"重命名",genTitle:"生成标题",genTitleUnavailable:"无法生成标题:需要登录 Kimi Code 托管账号,且会话中已有消息",setEmoji:"设置 Emoji…",sessionEmojiTitle:"选择 Emoji",removeEmoji:"移除 Emoji",randomEmoji:"随机",searchEmoji:"搜索 Emoji",recentEmojis:"最近使用",noEmojiResults:"没有匹配的 Emoji",emojiGroupFaces:"笑脸与人物",emojiGroupNature:"动物与自然",emojiGroupFood:"美食饮品",emojiGroupActivity:"活动与出行",emojiGroupObjects:"物品与工作",emojiGroupSymbols:"符号与状态",copyPath:"复制路径",copySessionId:"复制 Session ID",copied:"已复制 ✓",copyFailed:"复制失败",archive:"归档",archiveToastUndo:"撤销",archiveToastMid:"或到",archiveToastSettings:"设置",archiveToastTail:"查看已归档的会话",fork:"分叉会话",export:"导出会话",pin:"置顶",unpin:"取消置顶",pinned:"置顶",collapsePinned:"折叠置顶区",expandPinned:"展开置顶区",delete:"删除",removeWorkspace:"移除工作区",brand:"Kimi Code",signedIn:"已登录",signOut:"退出登录",notSignedIn:"未登录",signIn:"登录",defaultUserName:"Kimi 用户",upgrade:"升级",upgradeMembership:"会员升级",logoutConfirmTitle:"退出登录",logoutConfirmMessage:"确定要退出当前账号吗?",language:"语言",backendTitle:"后端 {backend} · {endpoint} — 点击切换",noSessions:"暂无对话",allPinned:"有 {count} 条对话被置顶",showMore:"展开更多",loadMore:"加载更多",showLess:"收起",loadingMore:"加载中…",collapseSidebar:"收起侧边栏",expandSidebar:"展开侧边栏",searchPlaceholder:"搜索会话或工作区",search:"搜索",searchHint:"↑↓ 选择 · ↵ 打开 · Esc 关闭",searchHintSelect:"选择",searchHintOpen:"打开",searchHintClose:"关闭",searchClear:"清除搜索",searchNoResults:"没有匹配的会话或工作区",searchEmpty:"暂无会话",update:"更新",updateAvailable:"发现新版本 v{version}",updateDownloading:"下载中… {percent}%",updateReady:"v{version} 已就绪",updateDone:"重启并更新",updateFailed:"下载失败",updateRetry:"重试",updateDownloadNow:"下载并更新",updateSkip:"本次跳过",updateRestartNow:"立即重启",updateRestartLater:"下次启动",updateReleaseDate:"发布于 {date}",updateCurrentVersion:"当前版本 v{version}",updateWhatsNew:"更新内容",updateBackground:"后台下载",updateAutoDownload:"以后自动下载并安装更新"},_W={switcherTitle:"切换工作区",switchTooltip:"切换工作区",eyebrow:"工作区",branchLabel:"分支: {branch}",noBranch:"无分支",sessionCount:"{count} 个会话",allWorkspaces:"全部工作区",currentWorkspace:"仅当前工作区",addWorkspace:"添加工作区…",noWorkspace:"暂无工作区",deleteHasSessions:"工作区内还有会话,请先归档这些会话再删除",removeWorkspaceConfirm:"移除工作区「{name}」?",swarmEnableTitle:"启用 swarm 模式?",swarmEnableConfirm:"Agent 将并行运行多个子 agent。",goalStartTitle:"启动 goal?",goalStartConfirm:"「{objective}」——Agent 将自主执行。",scopeCurrent:"当前工作区",scopeAll:"全部工作区",newInGroup:"在此工作区新建会话",addTitle:"添加工作区",pathLabel:"路径",pathPlaceholder:"/项目的绝对路径",recentLabel:"最近的文件夹",add:"添加",cancel:"取消",addHint:"粘贴一个绝对路径,或从最近用过的文件夹中选择。",addFailed:"无法打开此文件夹,请检查路径后重试。",requiredTitle:"请先选择工作空间",requiredMessage:"发送消息前,需要先选择一个文件夹作为工作区。",openThisFolder:"打开此文件夹",up:"上一级",browsing:"加载中…",filterPlaceholder:"过滤子文件夹…",searchPlaceholder:"在此目录下模糊搜索…",searching:"搜索中…",pasteToggle:"直接输入绝对路径",noFilterMatch:"没有匹配「{q}」的子文件夹",noSubfolders:"此处没有子文件夹",browseHint:'点击文件夹进入,再点"打开此文件夹"将其添加为工作区。',attentionTitle:"{count} 项待处理",awaitingAnswer:"待回答",awaitingAnswerTitle:"有提问等待你回答",awaitingPermission:"待授权",awaitingPermissionTitle:"有操作等待你授权",aborted:"失败",abortedTitle:"此会话的上一轮对话因错误中断"},SW={jumpToLatestAria:"跳到最新消息",toc:"对话目录",newMessages:"最新消息",loading:"加载中…",starting:"正在创建对话…",requesting:"请求中…",working:"工作中…",workingRetry:"模型请求失败,正在重试(第 {n}/{max} 次)…",emptyWorkspaceHint:"在 {name} 中发送",switchWorkspace:"切换工作区",addWorkspace:"添加工作区",moreWorkspaces:"更多工作区 ({count})",pickFolder:"选择文件夹…",compacting:"正在压缩上下文…",compactedPlain:"上下文已压缩",compactedAuto:"已自动压缩上下文",compactedTokens:"({before} → {after} tokens)",viewSummary:"查看摘要",summaryTitle:"压缩摘要",activatedSkill:"已激活技能: {name}",undo:"撤销",undoTooltip:"撤回编辑",undoConfirm:"撤销上一条消息?",escUndoHintPre:"再按",escUndoHintPost:"撤销本条",undone:"已撤销,原文已放回输入框",turnInterrupted:"已手动终止",turnFailed:"模型请求失败,本轮对话已中断",turnFailedMaxSteps:"达到本轮步数上限,对话已中断",turnFailedResume:"继续",turnFailedResumeText:"继续",yesterday:"昨天",loadOlder:"加载更早的消息",loadingOlder:"正在加载更早的消息…",widenTable:"加宽表格",restoreTableWidth:"恢复默认宽度",cron:{fired:"定时任务已触发",missed:"错过的定时提醒",job:"任务 {id}",oneShot:"单次",coalesced:"已合并 {n} 次触发",missedCount:"错过 {n} 次",finalDelivery:"最后一次投递",expand:"展开",collapse:"收起"},fold:{worked:"已工作 {duration}",workedUnknown:"工作过程"},turnFiles:{titleOne:"{number} 个文件已修改",titleOther:"{number} 个文件已修改",more:"还有 {number} 个文件",moreOne:"还有 1 个文件",showLess:"收起",diffTitle:"本次改动",diffUnavailable:"此文件的改动无法逐项展示",openFile:"打开文件"},goal:{continuation:"目标续跑"},notification:{kindTask:"后台任务",kindSubagent:"子代理",title:{completed:"{kind}完成",failed:"{kind}失败",timed_out:"{kind}超时",killed:"{kind}被终止",lost:"{kind}丢失",info:"{kind}通知"},status:{completed:"完成",failed:"失败",timed_out:"超时",killed:"已终止",lost:"丢失",info:"信息"},groupTitle:"{n} 条通知",copyPath:"复制路径",copied:"已复制",rawPayload:"原始 payload",fields:{type:"类型",source:"来源",severity:"严重度"}},userMessage:{expand:"展开",collapse:"收起"},search:{placeholder:"搜索对话…",searching:"搜索中…",results:"{current}/{total} 条结果",resultsCapped:"{current}/{total}+ 条结果",noResults:"无结果",previous:"上一个匹配",next:"下一个匹配",close:"关闭搜索"}},MW={connectionConnected:"已连接",connectionConnecting:"连接中…",connectionDisconnected:"未连接",ctxTooltip:"使用 {used} / {max} tokens ({pct}%)",modelLabel:"模型",permissionManual:"逐条确认",permissionAuto:"完全自主",permissionYolo:"自动通过",permissionManualDesc:"每个工具操作都需要你手动确认",permissionAutoDesc:"完全自主运行,智能体自己做决定,不再询问",permissionYoloDesc:"自动批准工具操作,但遇到关键问题仍会询问",planLabel:"计划",planOn:"开",planOff:"关",planTooltip:"切换计划模式(先调研再修改)",workModeDismiss:"退出模式",goalLabel:"目标",timeUnitHour:"小时",timeUnitMinute:"分",timeUnitSecond:"秒",planEmptyArmed:"计划模式已开启,智能体写出计划后会显示在这里",planEmptyIdle:"还没有计划——开启计划模式后,智能体写出的计划会显示在这里",swarmLabel:"Swarm",swarmDismiss:"关闭 Swarm",modeOff:"未启用",goalPlaceholder:"让智能体完成什么目标?",planPlaceholder:"让智能体先规划什么?",goalStart:"开始",goalPause:"暂停",goalResume:"继续",goalCancel:"取消",goalCancelConfirm:"是否需要取消当前目标?取消后将无法恢复。",goalCancelConfirmYes:"是",goalCancelConfirmNo:"否",goalDoneWhen:"完成条件",goalStatusActive:"进行中",goalStatusPaused:"已暂停",goalStatusBlocked:"已阻塞",goalStatusComplete:"已完成",modeNotSupported:"暂不支持",thinkingLabel:"思考",thinkingTooltip:"切换思考模式",thinkingOn:"开",thinkingOff:"关",cacheNote:"提示:切换模型或思考程度会使已有的提示词缓存失效。建议新建会话,避免额外的 token 消耗。",starredModels:"收藏",moreModels:"更多模型…",statusPanelTitle:"会话状态",statusPanelClose:"关闭",statusModel:"模型",statusThinking:"思考强度",statusPermission:"权限",statusPlanMode:"计划模式",statusSwarmMode:"Swarm 模式",swarmOn:"开",swarmOff:"关",statusContext:"上下文",statusCost:"花费",statusContextValue:"{used} / {max} ({pct}%)",statusNone:"—",activityRunning:"运行中…",activityAwaitingApproval:"等待批准",activityAwaitingQuestion:"等待回答",interrupt:"中断",runningShort:"进行中"},IW={placeholder:"输入消息…",send:"发送 ↵",queueLabel:"队列",placeholderRunning:"输入会加入队列 · Ctrl+S 立即插入运行中的回合",starting:"正在发送…",queueAutoDrain:"当前回合结束后自动逐条发送",queueNext:"下一条",queueDragTitle:"拖拽排序",editQueued:"编辑(载入到输入框)",queuedAttachments:"附件 ×{n}",queuedHasImage:"包含 {n} 张图片 — 只能移除,不能编辑",attachmentImage:"图片",attachmentVideo:"视频",attachmentFile:"文件",attachmentOpenUnsupported:"无法打开 {name}:暂不支持此文件类型",dropToAttach:"松开鼠标添加附件",remove:"移除",removeNamed:"移除 {name}",clearAll:"清空全部附件",attachmentCount:"共 {n} 个附件",uploading:"上传中",uploadFailed:"上传失败",attachFile:"添加附件",addMenu:"添加",addFiles:"文件",addGoalDesc:"设定目标并持续推进",addPlanDesc:"启用计划模式",addSwarmDesc:"启用 swarm 模式",noCommands:"无匹配命令",previewAttachment:"预览 {name}",interrupt:"中断",interruptTitle:"中断当前操作",expandTitle:"展开输入框进行多行编辑",collapseTitle:"收起输入框",emptyConversationTitle:"Kimi Code",emptyConversation:"还没有消息 —— 在下方输入开始对话",upgradeBanner:"升级你的 Kimi 账户来使用 Kimi Code",quickStartPlaceholder:"输入消息开始新对话…",thinkingSuffix:" · 思考",thinkingSuffixEffort:" · {level}"},EW={title:"登录 Kimi Code",close:"关闭 (Esc)",starting:"正在启动登录流程…",lead:"点击下方按钮,在新标签页中完成登录。",authorizeInBrowser:"在浏览器中登录",orDivider:"或者",fallbackPrefix:"换个设备?在浏览器打开 ",fallbackSuffix:" 输入设备码:",copy:"复制",copied:"已复制",copyLink:"复制链接",waitingAuth:"等待登录",waitingAutoClose:"等待登录,完成后自动关闭…",success:"已登录",successHint:"正在加载,稍后自动关闭…",expiredTitle:"设备码已过期",expiredHint:"请重新开始登录流程",retry:"重试",closeBtn:"关闭",errorTitle:"当前版本暂不支持登录",errorHint:"请升级 kimi-code 后重试",pollErrorTitle:"连接已断开",pollErrorHint:"登录轮询连续失败,请检查 kimi-code 进程后重试",action:"登录",requiredTitle:"请先登录",requiredMessage:"登录 Kimi 账号并配置模型后,才能开始对话。",goToLogin:"去登录",upgradeRequiredTitle:"请升级会员",upgradeRequiredMessage:"当前为免费账户,升级会员后即可使用 Kimi 模型开始对话。",rcSubtitle:"远程控制会话",rcChecking:"正在检查登录状态…",rcLead:"此远程控制会话需要授权。使用 Kimi 账号登录后即可继续。",rcAuthorize:"打开授权页",rcUserCodeLabel:"授权码",rcSuccessHint:"正在跳转…",rcExpiredTitle:"授权已过期或被取消",rcStartErrorTitle:"无法开始登录",rcConnectionErrorHint:"请检查网络连接后重试。",rcSuccessNoRedirect:"现在可以关闭本页了。"},TW={title:"供应商管理",loading:"加载提供商中…",unavailable:"暂不支持提供商管理",empty:"暂无提供商",status:{connected:"已连接",error:"错误",unconfigured:"未配置"},keySet:"key 已设置",keyNotSet:"未设置 key",managedBadge:"OAuth",modelCount:"{count} 个模型",confirmDelete:"确认删除?",refresh:"刷新",delete:"删除",refreshTitle:"刷新 {type}",deleteTitle:"删除 {type}",loginKimi:"登录 Kimi",loginAnthropic:"登录 Anthropic",addProvider:"添加供应商",added:"已添加",enterApiKey:"填写 API Key",optional:"可选",apiKeyRequired:"API Key 不能为空",fieldId:"名称",fieldType:"API 协议",types:{kimi:"Kimi",openai:"OpenAI",openai_responses:"OpenAI Responses",anthropic:"Anthropic","google-genai":"Google GenAI",vertexai:"Vertex AI"},fieldApiKey:"API Key",apiKeyManaged:"OAuth 托管登录",apiKeySet:"已设置,输入以更换",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",fieldBaseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com/v1",fieldModels:"模型",colModelId:"模型 ID",colContext:"上下文",colDisplayName:"显示名",modelIdPlaceholder:"kimi-k3",modelContextPlaceholder:"1048576",modelNamePlaceholder:"可选",noModels:"暂无模型",addModel:"添加模型",removeModel:"移除模型",fieldDefaultModel:"默认模型",save:"保存",saved:"已保存",deleteProvider:"删除供应商",deleteConfirm:"确认删除 {id} 及其 {count} 个模型?",deleteConfirmYes:"确认删除",managedHint:"托管供应商在账户页登录 / 登出",unsavedGuard:"有未保存的修改。",guardStay:"继续编辑",guardDiscard:"丢弃",add:"添加",catalog:{sourceCatalog:"从目录添加",sourceManual:"手动添加",sourceRegistry:"注册表",registryHint:"从 api.json 注册表导入供应商与模型;同一 URL 重复导入即为刷新",registryUrlLabel:"注册表 URL",registryImported:"已导入 {count} 个供应商",searchPlaceholder:"搜索供应商",loading:"加载目录中…",loadError:"目录加载失败,请检查网络后重试",retry:"重试",empty:"没有匹配的供应商",rejected:"不可导入",rejectReason:{"unknown-explicit-type":"协议不受支持","proprietary-sdk":"私有协议,无法导入","empty-base-url":"Base URL 为空","placeholder-base-url":"端点包含环境变量占位符"},backToList:"返回目录列表",willImport:"将从目录导入 {count} 个模型",overwriteWarning:"已存在同名供应商,导入将覆盖其配置与模型",importAction:"导入"},error:{idRequired:"名称不能为空",idInvalid:'名称需以字母或数字开头,只能包含字母、数字、"-"、"_" 和空格',apiKeyRequired:"API Key 不能为空",baseUrlRequired:"Base URL 不能为空",registryUrlRequired:"注册表 URL 不能为空",modelRequired:"模型 ID 不能为空",contextSizeRequired:"上下文长度不能为空",contextSizeInvalid:"上下文长度需为正整数"},hintClose:"关闭"},LW={dialogLabel:"切换模型",title:"切换模型",close:"关闭 (Esc)",allTab:"全部",providerTabs:"模型提供商",searchPlaceholder:"搜索模型或提供商…",clearSearch:"清除搜索",loading:"加载模型中…",unavailable:"暂无可用模型列表",contextSuffix:"{size} ctx",capabilityImageInput:"图片输入",capabilityVideoInput:"视频输入",capabilityToolUse:"工具调用",capabilityThinking:"思考",capabilityAlwaysThinking:"始终思考",emptyNoModels:"暂无可用模型",emptyNoMatch:"无匹配模型",starTitle:"添加到收藏",unstarTitle:"取消收藏",hintNavigate:"导航",hintSelect:"选择",hintClose:"关闭"},NW={justNow:"刚刚"},FW={title:{shell:"运行命令?",diff:"应用修改?",file:"写入文件?",fileop:"文件操作?",url:"抓取 URL?",search:"搜索?",invocation:"调用?",todo:"更新 todo?",plan_review:"按这份 plan 开始实现?",generic:"批准操作?"},subagentBadge:"子 agent · {name}",danger:"危险: {detail}",searchQueryLabel:"查询",searchScope:"范围:{scope}",feedbackPlaceholder:"说明拒绝原因… (Enter 提交, Esc 取消)",feedbackHint:"Enter 提交 · Esc 取消",approve:"批准",approveSession:"本会话内批准",reject:"拒绝",feedback:"反馈",feedbackSubmit:"提交并拒绝",feedbackCancel:"取消",approvePlan:"批准 plan",revise:"修改",rejectAndExit:"拒绝并退出",expandPlan:"放大",collapsePlan:"还原"},BW={back:"‹ 上一题",nextQuestion:"下一题 ›",otherDefault:"其他…",submit:"提交",dismiss:"放弃",minimize:"最小化",expand:"展开",hint:"↑↓ 选择 · Enter 确认"},$W={tag:"任务",summary:"{run} 运行中 · {done} 完成",copy:"复制",calling:"调用 {label}",fieldTask:"任务",fieldOutput:"输出",fieldProgress:"进度",fieldResult:"结果",moreLines:"…(还有 {count} 行)",copied:"已复制",stop:"stop",defaultDescription:"后台任务",dockTasks:"后台任务",dockBash:"后台 Bash",dockSubagent:"子 Agent",dockTodos:"待办",todoProgressTitle:"当前进度",stateDone:"完成",stateFail:"失败",stateCancelled:"已取消",filterRecent:"最近",filterRunning:"进行中",filterDone:"已完成",filterAll:"全部",running:"运行中",closePanel:"关闭面板",openPanel:"在侧边栏打开",timingRunning:"运行中 · {time}",timingDone:"完成 · {time}",emptyTasks:"暂无后台任务",emptyRecent:"暂无最近任务",emptyRunning:"暂无运行中的任务",emptyDone:"暂无已完成的任务",emptyBash:"暂无后台 Bash 任务",emptySubagent:"暂无子 Agent 任务",emptyTodo:"暂无待办事项",openTab:"查看全部后台任务",openDetail:"查看",collapse:"折叠",expand:"展开",transcriptLoadError:"无法加载这个子 Agent 的对话。",copyCommand:"复制命令",copyOutput:"复制输出"},DW={panelTitle:"思考过程",streaming:"思考中…",close:"关闭"},RW={title:"改动",branch:"分支",aheadTitle:"领先远程",behindTitle:"落后远程",fileCountOne:"{number} 个文件",fileCountOther:"{number} 个文件",empty:"无 git 改动",clean:"工作区干净,无改动",back:"返回",loading:"正在加载 diff…",noDiff:"该文件没有行级改动",emptyFile:"空文件",list:"列表",tree:"树形",close:"关闭"},zW={},OW={empty:"选择左侧文件预览",loading:"加载中…",lineCount:"{count} 行",copy:"复制",copied:"已复制",copyPath:"复制路径",openInEditor:"打开",reveal:"显示",download:"下载",close:"关闭",search:"搜索",prevMatch:"上一个匹配",nextMatch:"下一个匹配",htmlMode:"HTML 预览模式",markdownMode:"Markdown 预览模式",preview:"预览",source:"源码",imageFit:"图片缩放",fit:"适应",actual:"原始",pdfNoPreview:"无法内嵌预览此 PDF,可以下载后查看",imageNoPreview:"图片文件 · {mime} · {size} · 暂不预览",binaryNoPreview:"二进制文件 · {mime} · {size} 字节 · 暂不预览",unknownType:"未知类型",copyCode:"复制代码",enlargeImage:"放大图片",errors:{emptyPath:"文件路径为空",unsupportedPath:"不支持预览 URL 或远程路径",outsideWorkspace:"只能预览当前 workspace 内的文件",isDirectory:"请选择具体文件,而不是目录",notFound:"文件不存在或已被移动",tooLarge:"文件过大,暂不支持预览",loadFailed:"无法读取这个文件"}},PW={searching:"搜索中…",noMatch:"无匹配"},jW={dismiss:"关闭",errorLabel:"错误",noteLabel:"提示",agentWarningFallback:"agent 警告",unhandledEvent:"未处理的事件:{type}",agentError:{title:"模型请求失败",connection:"无法连接模型服务",auth:"模型认证失败",rateLimit:"模型请求被限流",overloaded:"模型服务过载",filtered:"响应被提供方过滤",api:"模型接口返回错误",contextOverflow:"上下文超出模型限制"},details:{cause:"底层原因",code:"错误码",connection:"连接状态",contentType:"响应类型",details:"服务端详情",duration:"耗时",endpoint:"请求地址",errorName:"错误类型",message:"错误信息",operation:"操作",phase:"失败阶段",request:"请求",requestId:"Request ID",responsePreview:"响应预览",sessionId:"Session ID",stack:"堆栈",status:"HTTP 状态",timeout:"超时设置",timestamp:"时间"},daemonApiTitle:"Kimi 服务器返回错误",daemonNetworkMessage:"Web 没有拿到 Kimi 服务器的响应。请确认它仍在运行,或刷新页面重试。",daemonNetworkTitle:"无法连接到 Kimi 服务器",daemonTimeoutMessage:"Kimi 服务器在等待时限内没有响应。操作可能仍在后台执行,请稍后刷新确认结果,或重试。",daemonTimeoutTitle:"Kimi 服务器响应超时",diagnostics:"诊断信息",hideDetails:"收起详情",operationFailedMessage:"刚才的操作没有完成,请稍后重试。",operationFailedTitle:"操作失败",sessionSnapshotMessage:"Web 没能加载当前会话内容。请确认 Kimi 服务器仍在运行,或刷新页面重试。",sessionSnapshotTitle:"无法加载当前会话内容",showDetails:"查看详情",copyDetails:"复制诊断信息",copied:"已复制",wsTitle:"实时连接出错",goal:{alreadyExists:"当前会话已有一个进行中的目标,请先取消它再创建新目标。",notFound:"没有找到可操作的目标,可能它已经结束或被取消。",statusInvalid:"当前目标状态不支持这个操作。",notResumable:"这个目标无法恢复(可能已取消或已完成)。",objectiveTooLong:"目标描述太长了,请精简后重试。"}},HW={new:{desc:"创建新会话"},clear:{desc:"清空并新建会话"},login:{desc:"在浏览器中登录 Kimi"},plan:{desc:"切换计划模式 开/关"},swarm:{desc:"切换 swarm 模式;/swarm <任务> 直接在 swarm 下执行"},goal:{desc:"创建/控制目标:/goal <目标>、/goal pause{'|'}resume{'|'}cancel"},btw:{desc:"侧边聊天:/btw <问题> 向 fork 的侧边会话提问"},yolo:{desc:"自动批准工具操作,Agent 仍可能提问"},auto:{desc:"完全自主,Agent 不再提问"},thinking:{desc:"设置思考强度"},compact:{desc:"压缩会话历史"},fork:{desc:"把当前会话 fork 出一个新会话"},export:{desc:"将当前会话和排障日志下载为 ZIP 压缩包",noSession:"请先打开一个会话再导出。",started:"正在导出会话…",done:"会话导出完成。",tooLarge:"会话数据超过导出大小限制,可在终端用 CLI 导出:kimi export {sessionId} -o session.zip"},status:{desc:"查看会话状态"},undo:{desc:"撤销上一条消息"}},WW={label:{read:"读取",bash:"运行",edit:"编辑",write:"写入",grep:"搜索",glob:"查找",ls:"列目录",web_fetch:"抓取",search:"搜索",todo:"待办",task:"任务",swarm:"Swarm",ask_user:"提问",plan:"计划",goal_create:"启动目标",goal_get:"读取目标",goal_budget:"设置目标预算",goal_update:"更新目标"},swarm:{progress:"{done} / {total}",runningSub:"{count} 个进行中",doneSub:"完成 {completed} · 失败 {failed}",doneSubWithCancelled:"完成 {completed} · 失败 {failed} · 已取消 {cancelled}",phaseQueued:"排队",phaseWorking:"运行中",phaseSuspended:"暂停",phaseCompleted:"完成",phaseFailed:"失败",phaseCancelled:"已取消",waiting:"等待子任务加入…"},chip:{lines:"{count} 行",results:"{count} 结果",files:"{count} 个文件",edited:"已编辑",created:"已创建",todos:"{count} 项"},disclosure:{expand:"展开详情",collapse:"收起详情"},output:{waiting:"等待输出…",empty:"(无输出)",saved:"已保存的结果"},plan:{review:{pending:"待确认",approved:"已通过",rejected:"已拒绝",cancelled:"已取消"},selectedOption:"已选择",pathOnlyHint:"该计划未保存内联内容,可在侧边栏打开:",feedback:"反馈"},summary:{inScope:"{value} 在 {scope} 中"},goal:{objectiveWithCriterion:"{objective} · {criterion}",status:"状态:{status}",budget:"{value} {unit}",turns:"{value} 轮",tokens:"{value} token",milliseconds:"{value} 毫秒",seconds:"{value} 秒",minutes:"{value} 分钟",hours:"{value} 小时"},group:{countOther:"执行了 {count} 次工具调用",typed:{read:{done:"读取了 {count} 个文件"},bash:{done:"运行了 {count} 条命令"},grep:{done:"搜索了 {count} 个模式"},search:{done:"网络搜索了 {count} 次"},glob:{done:"找了 {count} 次文件"},ls:{done:"列出了 {count} 个目录"},web_fetch:{done:"抓取了 {count} 个页面"},edit:{done:"编辑了 {count} 处"},write:{done:"写入了 {count} 个文件"}}},activity:{failedClause:"({count} 失败)",liveDonePrefix:"已",busy:"正在执行…",doing:{read:"正在读取 {subject}",bash:"正在运行 {subject}",grep:"正在搜索 {subject}",search:"正在搜索 {subject}",glob:"正在匹配 {subject}",ls:"正在列出 {subject}",web_fetch:"正在抓取 {subject}",edit:"正在编辑 {subject}",write:"正在写入 {subject}"}},ask:{dismissed:"已忽略",answer:"{count} 个回答",answers:"{count} 个回答",answered:"已回答",more:"(还有 {count} 个)",collected:"已收集回答",question:"{count} 个问题",questions:"{count} 个问题",freeInput:"(自由输入)",unanswered:"未作答"}},qW={resizeHandleAria:"调整侧栏宽度",resizePreviewAria:"调整预览面板宽度",detailPanelAria:"详情面板"},UW={openSwitcher:"切换会话 / 工作区",openSettings:"会话设置",settingsTitle:"会话设置",groupSession:"当前会话",groupApp:"应用偏好",sheetLabel:"面板",closeSheet:"关闭",tapToCycle:"点击切换",running:"运行中",idle:"空闲",sessionCount:"{n} 个会话",newSession:"新建会话",permManualSub:"每个工具都确认",permAutoSub:"完全自主,不再提问",permYoloSub:"自动批准工具,仍可能提问",planModeSub:"计划模式",goalModeSub:"目标模式",swarmModeSub:"Swarm 模式",archivedSessions:"已归档会话",archivedSessionsSub:"查看并恢复已归档会话",archivedBack:"返回"},KW={colorSchemeLabel:"外观",light:"月之亮面",dark:"月之暗面",system:"跟随系统"},VW={continue:"继续",back:"上一步",skip:"跳过",welcome:{title:"欢迎使用 Kimi Code",subtitle:"为专业开发者打造的 AI 编程工作台",languageLabel:"语言",themeLabel:"外观"},login:{title:"选择配置模型",subtitle:"选择驱动 Kimi Code 的模型服务,之后可在「设置」中更改。",kimiTitle:"登录 Kimi 账号",kimiHint:"使用 Kimi 会员权益,开箱即用",recommended:"推荐",customProviderTitle:"添加自定义供应商",customProviderHint:"使用自己的 API Key,接入 OpenAI 兼容等模型服务",loggedInTitle:"已登录 Kimi 账号",loggedInHint:"模型服务已就绪,可以开始使用",finish:"完成",skip:"跳过,稍后再说"}},ZW={title:"设置",internalTest:"内部测试",close:"关闭 (Esc)",tabs:{general:"通用",agent:"Agent",account:"账户",providers:"供应商",advanced:"高级",archived:"已归档",shortcuts:"快捷键",plugins:"插件"},plugins:{retry:"重试",builtIn:"内置",official:"官方",thirdParty:"第三方",installed:"已安装",install:"安装",update:"更新",remove:"移除",enabled:"启用",homepage:"主页",empty:"没有找到插件",hasErrors:"错误",customInstall:"安装自定义插件",customInstallPlaceholder:"https://… 或 /本地/目录",customInstallHint:"支持 https zip 链接、GitHub 仓库地址或本地目录路径。",extensionHintTitle:"还差一步:安装浏览器扩展",extensionGuide:"手动安装",dismissHint:"知道了",catalogUnavailable:"插件市场目录暂时不可达;已安装的插件仍可正常管理。",source:{"local-path":"本地","zip-url":"ZIP",github:"GitHub"},counts:{skill:"{n} 个技能",mcp:"{n} 个 MCP 服务",mcpEnabled:"启用 {n} 个",hook:"{n} 个钩子",command:"{n} 个命令"}},appearance:"外观",notifications:"通知",notifyEnabled:"系统通知",notifyEnabledHint:"回合完成、待回答或待审批时发送系统通知",notifySound:"通知提示音",notifySoundHint:"系统通知随附提示音",notifyDenied:"已在浏览器设置中被阻止",notifyTitle:"Kimi Code · 回合完成",notifyQuestionTitle:"Kimi Code · 待回答",notifyApprovalTitle:"Kimi Code · 等待审批",notifyFallback:"点击查看结果",notifyQuestionFallback:"有提问等待你回答",notifyApprovalFallback:"有工具等待你审批",account:"账户",signedIn:"已登录",signedOutHint:"登录后可查看账户和模型权益",planUsage:{title:"套餐用量",retry:"重试",loadFailed:"加载失败",empty:"暂无用量数据",weekLimit:"每周限额",genericLimit:"限额",hourLimit:"{n} 小时限额",dayLimit:"{n} 天限额",minuteLimit:"{n} 分钟限额",resetsIn:"{duration}后重置",resetDone:"已重置",durationDay:"{n} 天",durationHour:"{n} 小时",durationMinute:"{n} 分钟",durationSecond:"{n} 秒",usedPct:"已使用 {pct}%",boosterTitle:"加油包",boosterBalance:"余额",monthlyUsed:"本月已用",monthlyLimit:"每月上限",unlimited:"不限",freeTitle:"免费账户",freeHint:"升级会员后即可使用 Kimi 模型并查看套餐用量"},colorSchemeHint:"选择应用的明暗外观",appIcon:"程序坞图标",appIconHint:"选择程序坞中显示的图标",appIconDefault:"默认",appIconBlack:"黑色",uiFontSize:"字体大小",uiFontSizeHint:"调整界面和消息文字大小",vibrancy:"毛玻璃侧栏",vibrancyHint:"在侧栏使用 macOS 原生毛玻璃材质——如果半透明影响阅读可以关闭",languageHint:"选择界面显示语言",defaultOpenInApp:"默认打开应用",defaultOpenInAppHint:"从顶栏菜单打开文件和文件夹时默认使用的应用",openWith:"打开方式",agentDefaults:"Agent 默认值",saving:"保存中",defaultModel:"默认模型",defaultModelHint:"新会话会优先使用这个模型",noDefaultModel:"未设置默认模型",defaultPermission:"默认权限",defaultPermissionHint:"只影响之后新建的会话",defaultThinking:"默认开启思考",defaultThinkingHint:"新会话默认是否开启思考",defaultPlanMode:"默认计划模式",defaultPlanModeHint:"新会话默认进入计划模式",secondaryModelSection:"子智能体",secondaryModel:"子智能体模型",secondaryModelHint:"子智能体默认使用的模型与思考强度",secondaryModelEffort:"思考强度",noSecondaryModel:"未设置(跟随主模型)",secondaryModelEffortAuto:"模型默认",telemetry:"使用数据改进产品",telemetryHint:"开启后,我们会收集您的匿名交互数据(如点击、打断、功能使用等),用于改进产品体验。您可以随时关闭。",telemetryRestartHint:"更改后需重启服务生效。",credentialReady:"凭据已配置",credentialMissing:"缺少凭据",configUnavailable:"当前服务端没有返回 config,设置项暂不可用。",versionAndUpdates:"版本与更新",appVersion:"应用版本",appVersionHint:"当前应用的版本号和构建时间",checkUpdate:"检查更新",checkUpdateHint:"手动检查是否有新版本",checkUpdateBtn:"立即检查",updateChecking:"检查中…",updateCheckLatest:"已是最新版本",updateCheckAvailable:"发现新版本 {version},可从侧边栏的更新入口下载",updateCheckUnsupported:"当前构建不支持检查更新",updateCheckFailed:"检查失败,请稍后重试",updateCheckAvailableAuto:"发现新版本 {version},正在后台下载",updateCheckDownloaded:"新版本 {version} 已就绪,可从侧边栏的更新入口重启安装",autoDownloadUpdate:"自动下载更新",autoDownloadUpdateHint:"发现新版本时在后台自动下载,重启后完成安装",privacy:"数据与隐私",diagnostics:"诊断",build:"构建",serverVersion:"服务端版本",serverAddress:"服务器地址",serverAddressHint:"当前连接的服务器地址",serverVersionHint:"当前连接服务的版本",exportLog:"故障排查日志",exportLogHint:"导出已采集的故障排查日志",logHint:"加 ?debug=1 开启采集",exportLogBtn:"导出日志",archivedTitle:"已归档会话",archivedDesc:"查看已归档会话,确认其所属工作区路径、会话名称和归档时间,并可恢复到会话列表。",archivedSearch:"搜索已归档会话",archivedAllWorkspaces:"所有工作区",archivedSortLabel:"排序方式",archivedSortArchived:"归档时间",archivedSortCreated:"创建时间",archivedSortName:"按字母顺序",archivedRestore:"恢复",archivedEmpty:"还没有归档的会话",archivedNoMatch:"没有匹配的已归档会话",archivedSessionsCount:"{count} 个会话",archivedAt:"归档于 {time}",archivedLoadMore:"加载更多",archivedLoading:"加载中…",archivedLoadingAll:"正在加载全部归档会话…"},GW={openInEditor:"在编辑器中打开",openInEditorShort:"打开",openInApp:"用 {app} 打开",chooseOpenApp:"选择应用",copyAll:"复制全部对话为 Markdown",copyFinalSummary:"仅复制最终总结",copied:"已复制",lastUsed:"上次使用",copyPath:"复制路径",changed:"{n} 处改动",gitTooltip:"打开「文件 > 改动」",detached:"游离",openPr:"打开 Pull Request",prStatusOpen:"已打开",prStatusClosed:"已关闭",prStatusMerged:"已合并",prStatusDraft:"草稿",prStatusUnknown:"未知",options:"选项",copySessionId:"复制 Session ID",renameSession:"重命名",forkSession:"分叉会话",archiveSession:"归档",exportSession:"导出会话",devBadge:"开发环境运行中"},QW={title:"侧边聊天",subtitle:"从当前会话 fork",empty:"在侧边随手问一句 —— 它共享当前会话的上下文。",placeholder:"问问侧边聊天…",send:"发送"},YW={actions:{summonApp:{label:"显示应用窗口",desc:"从任意位置将应用窗口唤起到前台"},newSession:{label:"新建会话",desc:"在当前工作区开始一个新会话"},searchSessions:{label:"搜索会话",desc:"打开会话搜索弹窗"},archiveSession:{label:"归档任务",desc:"立即归档当前聊天"},toggleSideChat:{label:"侧边聊天",desc:"打开或关闭 /btw 侧边聊天"},toggleSidebar:{label:"展开/收起侧边栏",desc:"收起或展开会话侧边栏"},openFolder:{label:"打开文件夹",desc:"通过系统原生选择器添加工作目录"},openInDefaultApp:{label:"在默认应用中打开",desc:"在默认编辑器或终端中打开当前工作目录"},openSettings:{label:"打开设置",desc:"显示或隐藏设置窗口"},toggleTerminal:{label:"切换终端",desc:"显示或隐藏底部终端面板"},send:{label:"发送消息",desc:"发送输入框中的内容"},newline:{label:"换行",desc:"在输入框中插入换行"}},searchPlaceholder:"搜索快捷键",unassigned:"未分配",unassign:"取消分配",edit:"编辑快捷键",reset:"恢复默认",resetAll:"全部恢复默认",recording:"按下新的快捷键…",invalid:"该按键组合不能用作快捷键",notGlobal:"该按键组合无法注册为系统级快捷键",globalTaken:"该快捷键已被系统或其他应用占用",reserved:"系统菜单已占用该快捷键",reservedSteer:"steer 固定快捷键(Ctrl/Cmd+S),不可占用",reservedFind:"对话搜索固定快捷键(Ctrl/Cmd+F),不可占用",conflict:"已被「{action}」占用",customBadge:"自定义"},JW={panelAria:"终端",toolbarAria:"终端标签页",resizeAria:"调整终端面板高度",toggle:"切换终端",newTab:"新建终端",closeTab:"关闭终端",restartTab:"重启终端",collapse:"收起终端面板",empty:"还没有终端,点击新建一个",processExited:"[进程已退出]",processExitedWithCode:"[进程已退出,退出码 {code}]"},XW={common:CW,app:wW,sidebar:xW,workspace:_W,conversation:SW,status:MW,composer:IW,login:EW,providers:TW,model:LW,sessions:NW,approval:FW,question:BW,tasks:$W,thinking:DW,diff:RW,fileTree:zW,filePreview:OW,mention:PW,warnings:jW,commands:HW,tools:WW,layout:qW,mobile:UW,theme:KW,onboarding:VW,settings:ZW,header:GW,sideChat:QW,shortcuts:YW,terminal:JW},eq={en:AW,zh:XW},tq="kimi-locale";function NE(){let e=null;try{e=globalThis.localStorage?.getItem(tq)??null}catch{e=null}return e==="en"||e==="zh"?e:globalThis.navigator?.language?.toLowerCase().startsWith("zh")?"zh":"en"}function nq(e){const t=e.locale??NE();return BH({legacy:!1,locale:t,fallbackLocale:"en",messages:eq})}const FE=Symbol("KimiI18n"),iq={t:e=>e};function jf(){const e=an(FE,null);if(e)return e;try{const t=Bt();return{t:(n,i)=>t.t(n,i),locale:t.locale.value}}catch{return iq}}const ja=6,Ha=8,sq=150,oq=tt({__name:"TooltipBubble",props:{target:{default:null},delegate:{default:null},text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=e,n=Z(),i=Z(!1),s=Z(!1),o=Z({maxWidth:`${t.maxWidth}px`});let r,l=null,a;function u(){if(t.target)return t.target;const S=t.delegate;return S?S.firstElementChild??S:null}function c(S){const M=n.value;if(!M)return;const _=S.getBoundingClientRect(),N=M.offsetWidth,D=M.offsetHeight,T=window.innerWidth,$=window.innerHeight;let P=t.placement;P==="top"&&_.top-ja-D<Ha?P="bottom":P==="bottom"&&_.bottom+ja+D>$-Ha?P="top":P==="left"&&_.left-ja-N<Ha?P="right":P==="right"&&_.right+ja+N>T-Ha&&(P="left");let O=0,R=0;P==="top"?(O=_.top-ja-D,R=_.left+_.width/2-N/2):P==="bottom"?(O=_.bottom+ja,R=_.left+_.width/2-N/2):P==="left"?(O=_.top+_.height/2-D/2,R=_.left-ja-N):(O=_.top+_.height/2-D/2,R=_.right+ja),R=Math.min(Math.max(R,Ha),T-Ha-N),O=Math.min(Math.max(O,Ha),$-Ha-D),o.value={maxWidth:`${t.maxWidth}px`,top:`${Math.round(O)}px`,left:`${Math.round(R)}px`}}function d(){if(!t.text)return;const S=u();S&&(window.clearTimeout(r),r=window.setTimeout(()=>{i.value=!0,s.value=!1,kt(()=>{c(S),s.value=!0})},sq))}function f(){window.clearTimeout(r),i.value=!1,s.value=!1}function p(){d()}function g(){f()}function m(S){return S instanceof Element?S.closest(".ui-tip"):null}function y(S){const M=t.delegate;if(!M)return;if(m(S.target)!==M){f();return}const _=S.relatedTarget;_ instanceof Element&&M.contains(_)&&m(_)===M||d()}function w(S){const M=t.delegate;if(!M)return;const _=S.relatedTarget;_ instanceof Element&&M.contains(_)||f()}function k(S){m(S.target)===t.delegate&&d()}function A(){f()}function v(){l&&(t.delegate?(l.removeEventListener("mouseover",y),l.removeEventListener("mouseout",w),l.removeEventListener("focusin",k),l.removeEventListener("focusout",A)):(l.removeEventListener("mouseenter",p),l.removeEventListener("mouseleave",g),l.removeEventListener("focusin",p),l.removeEventListener("focusout",g)),l=null)}function x(){v(),a?.disconnect(),a=void 0;const S=t.target??t.delegate;S&&(l=S,t.delegate?(S.addEventListener("mouseover",y),S.addEventListener("mouseout",w),S.addEventListener("focusin",k),S.addEventListener("focusout",A),a=new MutationObserver(()=>{i.value&&f()}),a.observe(S,{childList:!0})):(S.addEventListener("mouseenter",p),S.addEventListener("mouseleave",g),S.addEventListener("focusin",p),S.addEventListener("focusout",g)))}Qe(()=>[t.target,t.delegate],()=>{f(),x()});function E(){i.value&&f()}return pn(()=>{x(),window.addEventListener("scroll",E,!0),window.addEventListener("resize",E)}),Gn(()=>{window.clearTimeout(r),a?.disconnect(),v(),window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}),(S,M)=>i.value?(b(),fe(Wr,{key:0,to:"body"},[C("div",{ref_key:"bubble",ref:n,class:De(["ui-tip__bubble",{positioned:s.value}]),style:Vt([o.value,{"--tip-lines":e.maxLines}]),role:"tooltip"},B(e.text),7)])):ne("",!0)}}),vt=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},BE=vt(oq,[["__scopeId","data-v-93bacf6d"]]),rq=["type","disabled","aria-label"],lq=tt({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},tooltip:{},type:{default:"button"}},setup(e,{expose:t}){const n=Z();return t({el:n}),(i,s)=>(b(),I("button",{ref_key:"el",ref:n,class:De(["ui-icon-button",`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[En(i.$slots,"default",{},void 0,!0),e.tooltip?(b(),fe(BE,{key:0,target:n.value??null,text:e.tooltip},null,8,["target","text"])):ne("",!0)],10,rq))}}),rn=vt(lq,[["__scopeId","data-v-2cbeca98"]]),$E=Symbol("IconResolver"),aq={sm:14,md:16,lg:20},Ce=tt({__name:"Icon",props:{name:{},size:{default:"md"},label:{}},setup(e){const t=e,n=an($E,()=>{}),i=F(()=>n(t.name)),s=F(()=>aq[t.size]);return(o,r)=>i.value?(b(),fe(Ms(i.value),{key:0,class:"kw-icon",width:s.value,height:s.value,"aria-label":e.label,"aria-hidden":e.label?void 0:!0},null,8,["width","height","aria-label","aria-hidden"])):ne("",!0)}}),uq={class:"ui-action-toast-host"},cq={class:"ui-action-toast__body"},dq=tt({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,i=t,{t:s}=jf();let o=null,r=0,l=0;function a(d){o=setTimeout(()=>i("dismiss",n.dismissToken),d),r=Date.now()+d}function u(){o!==null&&(clearTimeout(o),o=null,l=Math.max(0,r-Date.now()))}function c(){o===null&&a(l)}return a(n.duration),An(()=>{o!==null&&clearTimeout(o)}),(d,f)=>(b(),I("div",uq,[C("div",{class:"ui-action-toast",role:"status",onPointerenter:u,onPointerleave:c},[C("span",cq,[En(d.$slots,"default")]),V(rn,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??h(s)("common.dismiss"),tooltip:e.dismissLabel??h(s)("common.dismiss"),onClick:f[0]||(f[0]=p=>i("dismiss",e.dismissToken))},{default:he(()=>[V(Ce,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],32)]))}}),fq=vt(dq,[["__scopeId","data-v-e6936dfd"]]),hq={key:0,width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",stroke:"var(--color-success)","stroke-width":"2","aria-hidden":"true"},pq={key:1,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-danger)","stroke-width":"1.5","aria-hidden":"true"},gq={key:2,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-warning)","stroke-width":"1.5","aria-hidden":"true"},cf=tt({__name:"AuthStateIcon",props:{kind:{}},setup(e){return(t,n)=>e.kind==="success"?(b(),I("svg",hq,[...n[0]||(n[0]=[C("circle",{cx:"18",cy:"18",r:"15"},null,-1),C("polyline",{points:"10,18 15,24 26,12"},null,-1)])])):e.kind==="expired"?(b(),I("svg",pq,[...n[1]||(n[1]=[C("circle",{cx:"14",cy:"14",r:"12"},null,-1),C("line",{x1:"14",y1:"8",x2:"14",y2:"15"},null,-1),C("circle",{cx:"14",cy:"19",r:"1.2",fill:"var(--color-danger)"},null,-1)])])):(b(),I("svg",gq,[...n[2]||(n[2]=[C("path",{d:"M14 3 L26 24 H2 Z"},null,-1),C("line",{x1:"14",y1:"12",x2:"14",y2:"18"},null,-1),C("circle",{cx:"14",cy:"21.5",r:"1",fill:"var(--color-warning)"},null,-1)])]))}}),mq={key:0,class:"ui-badge__dot","aria-hidden":"true"},vq=tt({__name:"Badge",props:{variant:{default:"neutral"},size:{default:"md"},dot:{type:Boolean}},setup(e){return(t,n)=>(b(),I("span",{class:De(["ui-badge",[`ui-badge--${e.variant}`,`ui-badge--${e.size}`]])},[e.dot?(b(),I("span",mq)):ne("",!0),En(t.$slots,"default",{},void 0,!0)],2))}}),Hl=vt(vq,[["__scopeId","data-v-d879fe18"]]),yq={class:"ui-banner__icon","aria-hidden":"true"},bq={class:"ui-banner__text"},kq=tt({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(b(),I("div",{class:De(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[C("span",yq,[En(t.$slots,"icon",{},()=>[e.variant==="info"?(b(),fe(Ce,{key:0,name:"info",size:"md"})):(b(),fe(Ce,{key:1,name:"alert-triangle",size:"md"}))],!0)]),C("span",bq,[En(t.$slots,"default",{},void 0,!0)])],2))}}),Ac=vt(kq,[["__scopeId","data-v-6d739c6d"]]),Aq=["aria-label"],Cq=tt({__name:"Spinner",props:{size:{default:"md"},label:{}},setup(e){const{t}=jf(),n=Z(null);let i,s;function o(){const r=n.value;if(r){if(s?.matches){i?.cancel(),i=void 0;return}i||(i=r.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:850,iterations:1/0}),i.startTime=0)}}return pn(()=>{const r=n.value;!r||typeof r.animate!="function"||(s=window.matchMedia("(prefers-reduced-motion: reduce)"),s.addEventListener("change",o),o())}),Gn(()=>{s?.removeEventListener("change",o),s=void 0,i?.cancel(),i=void 0}),(r,l)=>(b(),I("span",{ref_key:"boxRef",ref:n,class:De(["ui-spinner",`ui-spinner--${e.size}`]),role:"status","aria-label":e.label??h(t)("common.loading")},[...l[0]||(l[0]=[C("svg",{class:"ui-spinner__svg",viewBox:"0 0 24 24","aria-hidden":"true"},[C("circle",{class:"ui-spinner__track",cx:"12",cy:"12",r:"9"}),C("circle",{class:"ui-spinner__arc",cx:"12",cy:"12",r:"9"})],-1)])],10,Aq))}}),Bi=vt(Cq,[["__scopeId","data-v-476ed1b4"]]),wq=["type","disabled"],xq={class:"ui-button__content"},_q=tt({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},loading:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(b(),I("button",{class:De(["ui-button",[`ui-button--${e.variant}`,`ui-button--${e.size}`,{"is-loading":e.loading}]]),type:e.type,disabled:e.disabled||e.loading},[e.loading?(b(),fe(Bi,{key:0,size:"sm",class:"ui-button__spinner"})):ne("",!0),C("span",xq,[En(t.$slots,"default",{},void 0,!0)])],10,wq))}}),jt=vt(_q,[["__scopeId","data-v-01b5ec22"]]),Sq={key:0,class:"ui-card__head"},Mq={class:"ui-card__body"},Iq={key:1,class:"ui-card__foot"},Eq=tt({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(b(),I("div",{class:De(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(b(),I("div",Sq,[En(t.$slots,"head",{},void 0,!0)])):ne("",!0),C("div",Mq,[En(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(b(),I("div",Iq,[En(t.$slots,"foot",{},void 0,!0)])):ne("",!0)],2))}}),Tq=vt(Eq,[["__scopeId","data-v-fbd05138"]]),Lq=["checked","disabled"],Nq={class:"ui-check__box","aria-hidden":"true"},Fq={key:0,class:"ui-check__label"},Bq=tt({__name:"Checkbox",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(i,s)=>(b(),I("label",{class:De(["ui-check",{"is-on":e.modelValue,"is-disabled":e.disabled}])},[C("input",{class:"ui-check__input",type:"checkbox",checked:e.modelValue,disabled:e.disabled,onChange:s[0]||(s[0]=o=>n("update:modelValue",o.target.checked))},null,40,Lq),C("span",Nq,[e.modelValue?(b(),fe(Ce,{key:0,name:"check",size:"md"})):ne("",!0)]),i.$slots.default?(b(),I("span",Fq,[En(i.$slots,"default",{},void 0,!0)])):ne("",!0)],2))}}),$q=vt(Bq,[["__scopeId","data-v-d4bf4026"]]),Dq={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},Rq=["stroke-dasharray","stroke-dashoffset"],V9=7,zq=tt({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*V9;return(i,s)=>(b(),I("svg",Dq,[C("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:V9,fill:"none","stroke-width":"2.5"}),C("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:V9,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,Rq)]))}}),Oq=vt(zq,[["__scopeId","data-v-de787cf2"]]),Ao=Z(0),Pq=["aria-label"],jq={key:0,class:"ui-dialog__head"},Hq={class:"ui-dialog__titles"},Wq={key:0,class:"ui-dialog__title"},qq={key:1,class:"ui-dialog__desc"},Uq={class:"ui-dialog__body"},Kq={key:1,class:"ui-dialog__foot"},Vq='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',Zq=tt({__name:"Dialog",props:{open:{type:Boolean},title:{},ariaLabel:{},description:{},closeOnOverlay:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},size:{default:"md"},height:{default:"auto"},padded:{type:Boolean,default:!0},hideClose:{type:Boolean},level:{default:"raised"},initialFocus:{}},emits:["update:open","close"],setup(e,{emit:t}){const n=e,i=t,{t:s}=jf(),o=Z(null);let r=null;function l(){i("update:open",!1),i("close")}function a(){return o.value?Array.from(o.value.querySelectorAll(Vq)):[]}function u(){const{initialFocus:f}=n;return f?typeof f=="function"?f()??null:typeof f=="string"?o.value?.querySelector(f)??null:o.value?.contains(f)?f:null:null}function c(f){if(!n.open)return;if(f.key==="Escape"&&n.closeOnEsc){f.preventDefault(),l();return}if(f.key!=="Tab")return;const p=a(),g=p[0],m=p[p.length-1];if(!g||!m){f.preventDefault(),o.value?.focus();return}const y=document.activeElement;f.shiftKey&&y===g?(f.preventDefault(),m.focus()):!f.shiftKey&&y===m&&(f.preventDefault(),g.focus())}function d(f){n.closeOnOverlay&&f.target===f.currentTarget&&l()}return Qe(()=>n.open,async f=>{if(f){Ao.value+=1,r=document.activeElement,await kt();const p=u(),g=a();(p??g[0]??o.value)?.focus()}else Ao.value=Math.max(0,Ao.value-1),r instanceof HTMLElement&&(r.focus(),r=null)},{immediate:!0}),typeof window<"u"&&window.addEventListener("keydown",c),Gn(()=>{typeof window<"u"&&window.removeEventListener("keydown",c),n.open&&(Ao.value=Math.max(0,Ao.value-1),r instanceof HTMLElement&&r.focus())}),(f,p)=>(b(),fe(Wr,{to:"body"},[e.open?(b(),I("div",{key:0,class:"ui-dialog__overlay",onMousedown:d},[C("div",{ref_key:"panel",ref:o,class:De(["ui-dialog",[`ui-dialog--${e.size}`,{"ui-dialog--flush":!e.padded,"ui-dialog--fixed-height":e.height==="fixed","ui-dialog--grouped":e.level==="grouped"}]]),role:"dialog","aria-modal":"true","aria-label":e.ariaLabel??e.title,tabindex:"-1"},[e.title||f.$slots.head?(b(),I("div",jq,[En(f.$slots,"head",{},()=>[C("div",Hq,[e.title?(b(),I("div",Wq,B(e.title),1)):ne("",!0),e.description?(b(),I("div",qq,B(e.description),1)):ne("",!0)])],!0),e.hideClose?ne("",!0):(b(),fe(rn,{key:0,class:"ui-dialog__close",size:"sm",label:h(s)("common.close"),tooltip:h(s)("common.close"),onClick:l},{default:he(()=>[V(Ce,{name:"close",size:"md"})]),_:1},8,["label","tooltip"]))])):ne("",!0),C("div",Uq,[En(f.$slots,"default",{},void 0,!0)]),f.$slots.foot?(b(),I("div",Kq,[En(f.$slots,"foot",{},void 0,!0)])):ne("",!0)],10,Pq)],32)):ne("",!0)]))}}),La=vt(Zq,[["__scopeId","data-v-ebbc1a68"]]),Gq={class:"ui-empty"},Qq={key:0,class:"ui-empty__icon","aria-hidden":"true"},Yq={key:1,class:"ui-empty__title"},Jq={key:2,class:"ui-empty__hint"},Xq=tt({__name:"EmptyState",props:{title:{},hint:{}},setup(e){return(t,n)=>(b(),I("div",Gq,[t.$slots.icon?(b(),I("span",Qq,[En(t.$slots,"icon",{},void 0,!0)])):ne("",!0),e.title?(b(),I("div",Yq,B(e.title),1)):ne("",!0),e.hint?(b(),I("div",Jq,B(e.hint),1)):ne("",!0),En(t.$slots,"default",{},void 0,!0)]))}}),eU=vt(Xq,[["__scopeId","data-v-6da80932"]]),tU={key:0,class:"ui-field__label"},nU={key:1,class:"ui-field__error"},iU={key:2,class:"ui-field__hint"},sU=tt({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(b(),I("div",{class:De(["ui-field",{"has-error":!!e.error}])},[e.label?(b(),I("label",tU,B(e.label),1)):ne("",!0),En(t.$slots,"default",{},void 0,!0),e.error?(b(),I("span",nU,B(e.error),1)):e.hint?(b(),I("span",iU,B(e.hint),1)):ne("",!0)],2))}}),oU=vt(sU,[["__scopeId","data-v-a8de5f7f"]]),rU=["type","value","placeholder","disabled","readonly"],lU=tt({__name:"Input",props:{modelValue:{},size:{default:"md"},type:{default:"text"},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue","focus","blur"],setup(e,{expose:t,emit:n}){const i=n,s=Z();function o(a){i("update:modelValue",a.target.value)}function r(){s.value?.focus()}function l(){s.value?.select()}return t({focus:r,select:l,el:s}),(a,u)=>(b(),I("input",{ref_key:"el",ref:s,class:De(["ui-input",[`ui-input--${e.size}`,{"has-error":e.error}]]),type:e.type,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,onInput:o,onFocus:u[0]||(u[0]=c=>a.$emit("focus",c)),onBlur:u[1]||(u[1]=c=>a.$emit("blur",c))},null,42,rU))}}),io=vt(lU,[["__scopeId","data-v-f1cdf732"]]),aU={class:"ui-kbd"},uU=tt({__name:"Kbd",props:{keys:{}},setup(e){return(t,n)=>(b(),I("span",aU,[(b(!0),I(Be,null,yt(e.keys,i=>(b(),I("kbd",{key:i,class:"ui-kbd__key"},B(i),1))),128))]))}}),Aa=vt(uU,[["__scopeId","data-v-04b30ce2"]]),cU=["role"],dU=tt({__name:"Menu",props:{role:{default:"menu"}},setup(e,{expose:t}){const n=Z();return t({el:n}),(i,s)=>(b(),I("div",{ref_key:"el",ref:n,class:"ui-menu",role:e.role},[En(i.$slots,"default",{},void 0,!0)],8,cU))}}),cl=vt(dU,[["__scopeId","data-v-9be2c64a"]]),fU={key:0,class:"ui-menu-sep",role:"separator"},hU=["role","disabled"],pU=tt({__name:"MenuItem",props:{active:{type:Boolean},danger:{type:Boolean},disabled:{type:Boolean},separator:{type:Boolean},size:{default:"md"},role:{default:"menuitem"}},emits:["click"],setup(e){return(t,n)=>e.separator?(b(),I("div",fU)):(b(),I("button",{key:1,class:De(["ui-menu-item",[`ui-menu-item--${e.size}`,{"is-active":e.active,"is-danger":e.danger}]]),type:"button",role:e.role,disabled:e.disabled,onClick:n[0]||(n[0]=i=>t.$emit("click",i))},[En(t.$slots,"default",{},void 0,!0)],10,hU))}}),bn=vt(pU,[["__scopeId","data-v-3427559a"]]),gU=tt({__name:"Tooltip",props:{text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=Z();return(n,i)=>(b(),I(Be,null,[C("span",{ref_key:"trigger",ref:t,class:"ui-tip"},[En(n.$slots,"default",{},void 0,!0)],512),V(BE,{delegate:t.value??null,text:e.text,placement:e.placement,"max-width":e.maxWidth,"max-lines":e.maxLines},null,8,["delegate","text","placement","max-width","max-lines"])],64))}}),gn=vt(gU,[["__scopeId","data-v-414bd903"]]),mU={class:"ui-panel-header__title"},vU={key:0,class:"ui-panel-header__sub"},yU=tt({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{},closeIcon:{default:"close"},wrap:{type:Boolean}},emits:["close"],setup(e){const{t}=jf();return(n,i)=>(b(),I("div",{class:De(["ui-panel-header",{wrap:e.wrap}])},[C("span",mU,B(e.title),1),V(gn,{text:e.subtitle},{default:he(()=>[e.subtitle?(b(),I("span",vU,B(e.subtitle),1)):ne("",!0)]),_:1},8,["text"]),En(n.$slots,"default",{},void 0,!0),e.closable?(b(),fe(rn,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel??h(t)("common.close"),tooltip:e.closeLabel??h(t)("common.close"),onClick:i[0]||(i[0]=s=>n.$emit("close"))},{default:he(()=>[V(Ce,{name:e.closeIcon,size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])):ne("",!0)],2))}}),Uc=vt(yU,[["__scopeId","data-v-eb14b05d"]]),bU=["disabled","aria-pressed"],kU=tt({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(b(),I("button",{key:0,class:De(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=i=>t.$emit("click",i))},[En(t.$slots,"default",{},void 0,!0)],10,bU)):(b(),I("span",{key:1,class:De(["ui-pill",{"is-active":e.active}])},[En(t.$slots,"default",{},void 0,!0)],2))}}),DE=vt(kU,[["__scopeId","data-v-fe6a2873"]]),AU=tt({__name:"ScrollArea",props:{orientation:{default:"vertical"},hideDelay:{default:600}},setup(e,{expose:t}){const n=e,i=Z(null),s=Z(null),o=Z(!1),r=Z({overflow:!1,size:0,offset:0}),l=Z({overflow:!1,size:0,offset:0}),a=Z(null);let u=null,c=null,d=null;const f=F(()=>({overflowX:n.orientation==="vertical"?"hidden":"auto",overflowY:n.orientation==="horizontal"?"hidden":"auto"})),p=F(()=>({height:`${r.value.size}px`,transform:`translateY(${r.value.offset}px)`})),g=F(()=>({width:`${l.value.size}px`,transform:`translateX(${l.value.offset}px)`}));function m(_,N,D){if(!(N>_+1)||_<=0)return{overflow:!1,size:0,offset:0};const $=Math.max(0,_-4),P=Math.min($,Math.max(24,$*_/N)),O=Math.max(0,$-P),R=Math.max(1,N-_);return{overflow:!0,size:P,offset:O*D/R}}function y(){const _=s.value;if(!_)return;const N=m(_.clientHeight,_.scrollHeight,_.scrollTop),D=m(_.clientWidth,_.scrollWidth,_.scrollLeft);(N.overflow!==r.value.overflow||N.size!==r.value.size||N.offset!==r.value.offset)&&(r.value=N),(D.overflow!==l.value.overflow||D.size!==l.value.size||D.offset!==l.value.offset)&&(l.value=D)}function w(){u!==null&&clearTimeout(u),u=null}function k(){w(),o.value=!0}function A(){w(),!(a.value||i.value?.matches(":hover, :focus-within"))&&(u=setTimeout(()=>{o.value=!1,u=null},n.hideDelay))}function v(){y(),k(),A()}function x(_,N){const D=s.value;D&&(N.preventDefault(),k(),a.value={axis:_,pointerId:N.pointerId,startPointer:_==="vertical"?N.clientY:N.clientX,startScroll:_==="vertical"?D.scrollTop:D.scrollLeft},N.currentTarget.setPointerCapture(N.pointerId))}function E(_){const N=a.value,D=s.value;if(!N||N.pointerId!==_.pointerId||!D)return;const T=N.axis==="vertical"?_.clientY:_.clientX,$=N.axis==="vertical"?D.clientHeight:D.clientWidth,P=N.axis==="vertical"?D.scrollHeight:D.scrollWidth,O=N.axis==="vertical"?r.value.size:l.value.size,R=Math.max(1,$-4-O),W=(T-N.startPointer)*(P-$)/R;N.axis==="vertical"?D.scrollTop=N.startScroll+W:D.scrollLeft=N.startScroll+W}function S(_){!a.value||a.value.pointerId!==_.pointerId||(a.value=null,A())}function M(){const _=s.value;if(!(!_||!c))for(const N of _.children)c.observe(N)}return pn(async()=>{await kt();const _=s.value;_&&(c=new ResizeObserver(y),c.observe(_),M(),d=new MutationObserver(()=>{M(),y()}),d.observe(_,{childList:!0,subtree:!0,characterData:!0}),y())}),Gn(()=>{w(),c?.disconnect(),d?.disconnect()}),t({viewport:s,updateMetrics:y}),(_,N)=>(b(),I("div",{ref_key:"root",ref:i,class:"ui-scroll-area",onPointerenter:k,onPointerleave:A,onFocusin:k,onFocusout:A},[C("div",{ref_key:"viewport",ref:s,class:"ui-scroll-area__viewport",style:Vt(f.value),tabindex:"0",onScroll:v},[En(_.$slots,"default",{},void 0,!0)],36),r.value.overflow&&n.orientation!=="horizontal"?(b(),I("div",{key:0,class:De(["ui-scroll-area__bar ui-scroll-area__bar--vertical",{"is-visible":o.value}]),"aria-hidden":"true"},[C("span",{class:"ui-scroll-area__thumb",style:Vt(p.value),onPointerdown:N[0]||(N[0]=D=>x("vertical",D)),onPointermove:E,onPointerup:S,onPointercancel:S},null,36)],2)):ne("",!0),l.value.overflow&&n.orientation!=="vertical"?(b(),I("div",{key:1,class:De(["ui-scroll-area__bar ui-scroll-area__bar--horizontal",{"is-visible":o.value}]),"aria-hidden":"true"},[C("span",{class:"ui-scroll-area__thumb",style:Vt(g.value),onPointerdown:N[1]||(N[1]=D=>x("horizontal",D)),onPointermove:E,onPointerup:S,onPointercancel:S},null,36)],2)):ne("",!0)],544))}}),sA=vt(AU,[["__scopeId","data-v-9c504ebc"]]),CU=["data-icon","aria-selected","onClick"],wU=tt({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,s=Z(null),o=Z([]),r=Z(!1),l=Z({});let a=null;function u(d,f){d instanceof HTMLElement&&(o.value[f]=d)}async function c(){await kt();const d=n.options.findIndex(p=>p.value===n.modelValue),f=o.value[d];f&&(l.value={width:`${f.offsetWidth}px`,height:`${f.offsetHeight}px`,transform:`translate(${f.offsetLeft}px, ${f.offsetTop}px)`},r.value=!0)}return Qe(()=>[n.modelValue,n.options.length],c,{immediate:!0}),pn(()=>{a=new ResizeObserver(()=>c()),s.value&&a.observe(s.value);for(const d of o.value)a.observe(d);c()}),Gn(()=>a?.disconnect()),(d,f)=>(b(),I("div",{ref_key:"root",ref:s,class:De(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[C("span",{class:De(["ui-seg__indicator",{"is-ready":r.value}]),style:Vt(l.value),"aria-hidden":"true"},null,6),(b(!0),I(Be,null,yt(e.options,(p,g)=>(b(),I("button",{key:p.value,ref_for:!0,ref:m=>u(m,g),class:De(["ui-seg__item",{"is-on":p.value===e.modelValue}]),"data-icon":p.icon,type:"button",role:"tab","aria-selected":p.value===e.modelValue,onClick:m=>i("update:modelValue",p.value)},[p.icon?(b(),fe(Ce,{key:0,class:"ui-seg__icon",name:p.icon,size:"sm"},null,8,["name"])):ne("",!0),p.swatch?(b(),I("span",{key:1,class:"ui-seg__swatch",style:Vt({backgroundColor:p.swatch})},null,4)):ne("",!0),Ue(" "+B(p.label),1)],10,CU))),128))],2))}}),wo=vt(wU,[["__scopeId","data-v-b09ef1d1"]]),xU=["aria-expanded","disabled"],_U=["src"],SU={class:"ui-select__value-text"},MU={key:0,class:"ui-select__group"},IU=["aria-selected","disabled","onMouseenter","onClick"],EU=["src"],TU=tt({inheritAttrs:!1,__name:"Select",props:{modelValue:{},options:{},placeholder:{default:""},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,s=Of(),o=Z(null),r=Z(null),l=Z(null),a=Z([]),u=Z(!1),c=Z(-1),d=`ui-select-${Math.random().toString(36).slice(2,9)}`,f=F(()=>n.options.findIndex(M=>String(M.value)===String(n.modelValue??""))),p=F(()=>n.options[f.value]),g=F(()=>p.value?.label??n.placeholder);function m(M,_){a.value[_]=M instanceof HTMLElement?M:null}function y(){const M=l.value,_=a.value[c.value];!M||!_||(M.scrollTop=_.offsetTop-(M.clientHeight-_.offsetHeight)/2)}function w(){n.disabled||u.value||(u.value=!0,c.value=f.value>=0?f.value:n.options.findIndex(M=>!M.disabled),kt(y))}function k({restoreFocus:M=!1}={}){u.value&&(u.value=!1,M&&kt(()=>r.value?.focus()))}function A(){u.value?k():w()}function v(M){M.disabled||(String(M.value)!==String(n.modelValue??"")&&i("update:modelValue",M.value),k({restoreFocus:!0}))}function x(M){if(u.value||w(),n.options.length===0)return;let _=c.value;for(let N=0;N<n.options.length;N+=1)if(_=(_+M+n.options.length)%n.options.length,!n.options[_]?.disabled){c.value=_,kt(y);return}}function E(M){if(M.key==="ArrowDown")M.preventDefault(),x(1);else if(M.key==="ArrowUp")M.preventDefault(),x(-1);else if(M.key==="Enter"||M.key===" ")if(M.preventDefault(),!u.value)w();else{const _=n.options[c.value];_&&v(_)}else if(M.key==="Escape")M.preventDefault(),k();else if(M.key==="Home"||M.key==="End"){M.preventDefault();const _=n.options.map((N,D)=>N.disabled?-1:D).filter(N=>N>=0);c.value=M.key==="Home"?_[0]??-1:_.at(-1)??-1,kt(y)}}function S(M){o.value?.contains(M.target)||k()}return pn(()=>document.addEventListener("pointerdown",S)),An(()=>document.removeEventListener("pointerdown",S)),(M,_)=>(b(),I("div",{ref_key:"rootRef",ref:o,class:De(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error,"is-open":u.value,"is-disabled":e.disabled}]])},[C("button",Yn({ref_key:"triggerRef",ref:r},h(s),{class:"ui-select__trigger",type:"button",role:"combobox","aria-controls":d,"aria-expanded":u.value,"aria-haspopup":"listbox",disabled:e.disabled,onClick:A,onKeydown:E}),[C("span",{class:De(["ui-select__value",{"is-placeholder":!p.value}])},[p.value?.icon?(b(),I("img",{key:0,class:"ui-select__icon",src:p.value.icon,alt:""},null,8,_U)):ne("",!0),C("span",SU,B(g.value),1)],2),V(Ce,{class:"ui-select__chevron",name:"chevron-down",size:"sm"})],16,xU),u.value?(b(),I("div",{key:0,id:d,ref_key:"listRef",ref:l,class:"ui-select__menu",role:"listbox"},[(b(!0),I(Be,null,yt(e.options,(N,D)=>(b(),I(Be,{key:`${N.group??""}:${N.value}`},[N.group&&N.group!==e.options[D-1]?.group?(b(),I("div",MU,B(N.group),1)):ne("",!0),C("button",{ref_for:!0,ref:T=>m(T,D),class:De(["ui-select__option",{"is-selected":D===f.value,"is-active":D===c.value}]),type:"button",role:"option","aria-selected":D===f.value,disabled:N.disabled,onMouseenter:T=>c.value=D,onClick:T=>v(N)},[V(Ce,{class:"ui-select__check",name:"check",size:"sm"}),N.icon?(b(),I("img",{key:0,class:"ui-select__icon ui-select__icon--option",src:N.icon,alt:""},null,8,EU)):ne("",!0),C("span",null,B(N.label),1)],42,IU)],64))),128))],512)):ne("",!0)],2))}}),e3=vt(TU,[["__scopeId","data-v-63f5dcbc"]]),LU=tt({__name:"StatusDot",props:{status:{}},setup(e){const t=e;function n(s){switch(s){case"ok":case"done":case"completed":case"success":return"ok";case"error":case"failed":case"fail":case"danger":return"error";case"running":case"run":case"working":case"in_progress":case"active":return"running";case"suspended":return"suspended";default:return"idle"}}const i=F(()=>n(t.status));return(s,o)=>(b(),I("span",{class:De(["kw-dot",`kw-dot--${i.value}`]),"aria-hidden":"true"},null,2))}}),hl=vt(LU,[["__scopeId","data-v-390a778a"]]),NU=["aria-checked","aria-label","disabled"],FU=tt({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(i,s)=>(b(),I("button",{class:De(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:s[0]||(s[0]=o=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[C("span",{class:"ui-switch__thumb"},null,-1)])],10,NU))}}),Md=vt(FU,[["__scopeId","data-v-2fc56545"]]),BU={class:"ui-toast__icon","aria-hidden":"true"},$U={class:"ui-toast__body"},DU={class:"ui-toast__title"},RU={key:0,class:"ui-toast__msg"},zU=tt({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{}},emits:["dismiss"],setup(e){const{t}=jf();return(n,i)=>(b(),I("div",{class:De(["ui-toast",`ui-toast--${e.variant}`])},[C("span",BU,[En(n.$slots,"icon",{},()=>[e.variant==="success"?(b(),fe(Ce,{key:0,name:"check"})):e.variant==="danger"?(b(),fe(Ce,{key:1,name:"close"})):e.variant==="warning"?(b(),fe(Ce,{key:2,name:"alert-triangle"})):(b(),fe(Ce,{key:3,name:"info"}))],!0)]),C("div",$U,[C("div",DU,B(e.title),1),e.message?(b(),I("div",RU,B(e.message),1)):ne("",!0),En(n.$slots,"default",{},void 0,!0)]),V(rn,{class:"ui-toast__close",size:"sm",label:e.dismissLabel??h(t)("common.dismiss"),tooltip:e.dismissLabel??h(t)("common.dismiss"),onClick:i[0]||(i[0]=s=>n.$emit("dismiss"))},{default:he(()=>[V(Ce,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],2))}}),OU=vt(zU,[["__scopeId","data-v-62bc76d1"]]),PU=100;function Kr(){let e=!1,t=0;function n(){e=!0,t=0}function i(){e=!1,t=Date.now()}function s(){e=!1,t=0}function o(r){return e||r.isComposing||r.keyCode===229||Date.now()-t<PU}return typeof window<"u"&&(window.addEventListener("focusin",s,!0),window.addEventListener("focusout",s,!0)),An(()=>{typeof window<"u"&&(window.removeEventListener("focusin",s,!0),window.removeEventListener("focusout",s,!0))}),{handleCompositionStart:n,handleCompositionEnd:i,resetComposition:s,isComposingKeyEvent:o}}function Vd(e,t,n="/api/v1"){return`${e}${n}${t.startsWith("/")?t:`/${t}`}`}function jU(e,t){const n=new URL(`${e}/api/v1/ws`);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("client_id",t),n.toString()}const g5={};class au extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class ra extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class m5 extends Error{size;limit;constructor(t){super(`file too large to preview: ${t.size} bytes (limit ${t.limit})`),this.name="FileTooLargeError",this.size=t.size,this.limit=t.limit}}function Ps(e){return e instanceof au||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function X2(e){return e instanceof ra||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}function HU(e){return X2(e)&&typeof e.cause=="object"&&e.cause!==null&&e.cause.name==="TimeoutError"}function WU(e){return e instanceof m5||typeof e=="object"&&e!==null&&e.name==="FileTooLargeError"&&typeof e.limit=="number"}const qU=41301,UU=40922;function KU(e){return Ps(e)&&e.code===UU}const Hh=3e4,I0=5*6e4,oA=5*6e4,RE="0123456789ABCDEFGHJKMNPQRSTVWXYZ",rA=500,zE=40101;function lA(e,t){for(const[n,i]of Object.entries(t))if(i!==void 0)if(Array.isArray(i))for(const s of i)s!==void 0&&e.append(n,String(s));else e.set(n,String(i))}function E0(e=Hh){try{return AbortSignal.timeout(e)}catch{return}}function VU(e,t){let n="",i=e;for(let s=0;s<t;s++)n=RE[i%32]+n,i=Math.floor(i/32);return n}function ZU(e){const t=new Uint8Array(e);if(globalThis.crypto?.getRandomValues)globalThis.crypto.getRandomValues(t);else for(let n=0;n<t.length;n++)t[n]=Math.floor(Math.random()*256);return Array.from(t,n=>RE[n%32]).join("")}function T0(){return`${VU(Date.now(),10)}${ZU(16)}`}function GU(e){try{const t=[];return e.forEach((n,i)=>{typeof n=="string"?t.push({field:i,value:n}):t.push({field:i,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function Z9(e){try{const t=await e.text();return t?t.length>rA?`${t.slice(0,rA)}...`:t:void 0}catch{return}}class aA{constructor(t){this.opts=t,this.tracer=t.tracer??g5}tracer;async get(t,n){return this.request("GET",t,void 0,n)}async getBlob(t,n,i){let s=Vd(this.opts.origin,t,this.opts.restBasePath);if(n){const c=new URLSearchParams;lA(c,n);const d=c.toString();d&&(s=`${s}?${d}`)}const o=T0(),r={"X-Request-Id":o};this.addClientHeaders(r);const l=Date.now();this.tracer.restRequest?.({method:"GET",path:t,url:s,requestId:o});let a;try{a=await fetch(s,{method:"GET",headers:r,signal:E0()})}catch(c){throw this.tracer.restFailure?.({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-l,error:c}),new ra({message:`Network error calling GET ${t}`,cause:c,method:"GET",path:t,url:s,requestId:o,phase:"fetch",timeoutMs:Hh,timestamp:Date.now(),durationMs:Date.now()-l})}if(a.ok){this.tracer.restResponse?.({method:"GET",path:t,requestId:o,status:a.status,durationMs:Date.now()-l,code:0,msg:""});const c=Number(a.headers.get("content-length")??0);if(i?.maxBytes!==void 0&&c>i.maxBytes)throw a.body?.cancel(),new m5({size:c,limit:i.maxBytes});return a.blob()}let u;try{u=await a.clone().json()}catch{}throw this.checkAuthRequired(a,u?.code??0),this.tracer.restResponse?.({method:"GET",path:t,requestId:o,status:a.status,durationMs:Date.now()-l,code:u?.code??a.status,msg:u?.msg??a.statusText,envelopeRequestId:u?.request_id}),new au({code:u?.code??a.status,msg:u?.msg??a.statusText,requestId:u?.request_id??o,details:u?.details,timestamp:Date.now(),durationMs:Date.now()-l})}async post(t,n,i){return this.request("POST",t,n,void 0,i?.allowCodes,i?.timeoutMs)}async postZip(t,n,i){const s="POST",o=Vd(this.opts.origin,t,this.opts.restBasePath),r=T0(),l={"X-Request-Id":r,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(l);const a=Date.now();this.tracer.restRequest?.({method:s,path:t,url:o,requestId:r,body:i});let u;try{u=await fetch(o,{method:s,headers:l,body:JSON.stringify(n),signal:E0(I0)})}catch(p){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"fetch",durationMs:Date.now()-a,error:p}),new ra({message:`Network error calling ${s} ${t}`,cause:p,method:s,path:t,url:o,requestId:r,phase:"fetch",timeoutMs:I0,timestamp:Date.now(),durationMs:Date.now()-a})}const c=u.headers.get("content-type")??void 0,d=c?.split(";",1)[0]?.trim().toLowerCase();if(!u.ok||d!=="application/zip"){let p;try{p=await u.clone().json()}catch{}if(this.checkAuthRequired(u,p?.code??0),!u.ok||p!==void 0&&p.code!==0){const y=p?.code??u.status,w=p?.msg??u.statusText;throw this.tracer.restResponse?.({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:y,msg:w,envelopeRequestId:p?.request_id}),new au({code:y,msg:w,requestId:p?.request_id??r,details:p?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const g=u.clone(),m=new TypeError(`Expected application/zip, received ${c??"no content type"}`);throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:m}),new ra({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:o,requestId:r,phase:"parse",timeoutMs:I0,status:u.status,statusText:u.statusText,contentType:c,bodyPreview:await Z9(g),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await u.blob()}catch(p){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:p}),new ra({message:`Failed to read ZIP response from ${s} ${t}`,cause:p,method:s,path:t,url:o,requestId:r,phase:"parse",timeoutMs:I0,status:u.status,statusText:u.statusText,contentType:c,timestamp:Date.now(),durationMs:Date.now()-a})}return this.tracer.restResponse?.({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:u.headers.get("content-disposition")??void 0}}async postForm(t,n){const i=Vd(this.opts.origin,t,this.opts.restBasePath),s=T0(),o={"X-Request-Id":s};this.addClientHeaders(o);const r=Date.now();this.tracer.restRequest?.({method:"POST",path:t,url:i,requestId:s,body:GU(n)});let l;try{l=await fetch(i,{method:"POST",headers:o,body:n,signal:E0()})}catch(c){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-r,error:c}),new ra({message:`Network error calling POST ${t}`,cause:c,method:"POST",path:t,url:i,requestId:s,phase:"fetch",timeoutMs:Hh,timestamp:Date.now(),durationMs:Date.now()-r})}let a;const u=l.clone();try{a=await l.json()}catch(c){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-r,status:l.status,error:c}),new ra({message:`Failed to parse JSON response from POST ${t}`,cause:c,method:"POST",path:t,url:i,requestId:s,phase:"parse",timeoutMs:Hh,status:l.status,statusText:l.statusText,contentType:l.headers.get("content-type")??void 0,bodyPreview:await Z9(u),timestamp:Date.now(),durationMs:Date.now()-r})}if(this.tracer.restResponse?.({method:"POST",path:t,requestId:s,status:l.status,durationMs:Date.now()-r,code:a.code,msg:a.msg,envelopeRequestId:a.request_id,data:a.data}),this.checkAuthRequired(l,a.code),a.code!==0){const c=a.code??l.status;throw new au({code:c,msg:a.msg??l.statusText,requestId:a.request_id??s,details:a.details,timestamp:Date.now(),durationMs:Date.now()-r})}return a.data}async patch(t,n){return this.request("PATCH",t,n)}async put(t,n){return this.request("PUT",t,n)}async delete(t){return this.request("DELETE",t)}async request(t,n,i,s,o=[],r=Hh){let l=Vd(this.opts.origin,n,this.opts.restBasePath);if(s){const g=new URLSearchParams;lA(g,s);const m=g.toString();m&&(l=`${l}?${m}`)}const a=T0(),u={"X-Request-Id":a};this.addClientHeaders(u),i!==void 0&&(u["Content-Type"]="application/json; charset=utf-8");const c=Date.now();this.tracer.restRequest?.({method:t,path:n,url:l,requestId:a,body:i});let d;try{d=await fetch(l,{method:t,headers:u,body:i!==void 0?JSON.stringify(i):void 0,signal:E0(r)})}catch(g){throw this.tracer.restFailure?.({method:t,path:n,requestId:a,phase:"fetch",durationMs:Date.now()-c,error:g}),new ra({message:`Network error calling ${t} ${n}`,cause:g,method:t,path:n,url:l,requestId:a,phase:"fetch",timeoutMs:r,timestamp:Date.now(),durationMs:Date.now()-c})}let f;const p=d.clone();try{const g=await d.text();f=d.status===204&&g===""?{code:0,msg:"",data:null,request_id:a}:JSON.parse(g)}catch(g){throw this.tracer.restFailure?.({method:t,path:n,requestId:a,phase:"parse",durationMs:Date.now()-c,status:d.status,error:g}),new ra({message:`Failed to parse JSON response from ${t} ${n}`,cause:g,method:t,path:n,url:l,requestId:a,phase:"parse",timeoutMs:r,status:d.status,statusText:d.statusText,contentType:d.headers.get("content-type")??void 0,bodyPreview:await Z9(p),timestamp:Date.now(),durationMs:Date.now()-c})}if(this.tracer.restResponse?.({method:t,path:n,requestId:a,status:d.status,durationMs:Date.now()-c,code:f.code,msg:f.msg,envelopeRequestId:f.request_id,data:f.data}),this.checkAuthRequired(d,f.code),f.code!==0&&!o.includes(f.code))throw new au({code:typeof f.code=="number"?f.code:d.status,msg:typeof f.msg=="string"&&f.msg.length>0?f.msg:`HTTP ${d.status}${d.statusText?` ${d.statusText}`:""}`,requestId:f.request_id??a,details:f.details,timestamp:Date.now(),durationMs:Date.now()-c});return f.data}addClientHeaders(t){const n=this.opts.credentialStore?.getToken();n!==void 0&&(t.Authorization=`Bearer ${n}`);const i=this.opts.identity;i!==void 0&&(t["X-Kimi-Client-Id"]=i.clientId,t["X-Kimi-Client-Name"]=i.clientName,t["X-Kimi-Client-Version"]=i.clientVersion,t["X-Kimi-Client-Ui-Mode"]=i.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===zE)&&this.opts.credentialStore?.markAuthRequired?.()}}function OE(e){return{inputTokens:e.input_tokens,outputTokens:e.output_tokens,cacheReadTokens:e.cache_read_tokens,cacheCreationTokens:e.cache_creation_tokens,totalCostUsd:e.total_cost_usd,contextTokens:e.context_tokens,contextLimit:e.context_limit,turnCount:e.turn_count}}function ym(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function QU(e,t,n){return{...t,model:t.model.length>0?t.model:e.model,usage:ym(t.usage)?e.usage:t.usage,updatedAt:!n&&t.updatedAt>e.updatedAt?t.updatedAt:e.updatedAt,pullRequest:t.pullRequest??e.pullRequest}}function Yr(e){return{id:e.id,title:e.title,createdAt:e.created_at,updatedAt:e.updated_at,busy:e.busy,mainTurnActive:e.main_turn_active,pendingInteraction:e.pending_interaction,lastTurnReason:e.last_turn_reason,archived:e.archived??!1,archivedAt:e.archived_at,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:OE(e.usage),messageCount:e.message_count,lastSeq:e.last_seq,workspaceId:e.workspace_id,parentSessionId:typeof e.metadata.parent_session_id=="string"?e.metadata.parent_session_id:void 0}}function YU(e){const t=e.activity.status;return{id:e.id,title:e.meta.title??e.meta.last_prompt??e.id.slice(0,12),createdAt:new Date(e.meta.created_at).toISOString(),updatedAt:new Date(e.meta.updated_at).toISOString(),busy:t==="running",pendingInteraction:t==="approval"?"approval":t==="question"?"question":void 0,lastTurnReason:t==="failed"?"failed":void 0,archived:e.meta.archived,archivedAt:e.meta.archived_at==null?void 0:new Date(e.meta.archived_at).toISOString(),lastPrompt:e.meta.last_prompt??void 0,cwd:e.workspace.cwd??"",model:"",pullRequest:e.git===void 0?void 0:e.git.pull_request,usage:{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalCostUsd:0,contextTokens:0,contextLimit:0,turnCount:0},messageCount:0,lastSeq:0,workspaceId:e.workspace.id.length>0?e.workspace.id:void 0}}function c1(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function uA(e){return e.kind==="base64"?{kind:"base64",mediaType:e.media_type,data:e.data}:e.kind==="file"?{kind:"file",fileId:e.file_id}:{kind:"url",url:e.url}}function v5(e){switch(e.type){case"text":return{type:"text",text:e.text};case"tool_use":return{type:"toolUse",toolCallId:e.tool_call_id,toolName:e.tool_name,input:e.input};case"tool_result":return{type:"toolResult",toolCallId:e.tool_call_id,output:e.output,isError:e.is_error};case"image":return{type:"image",source:uA(e.source)};case"video":return{type:"video",source:uA(e.source)};case"file":return{type:"file",fileId:e.file_id,name:e.name,mediaType:e.media_type,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};default:return{type:"unknown",raw:e}}}function t3(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(v5),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function PE(e){switch(e.type){case"text":return{type:"text",text:e.text};case"toolUse":return{type:"tool_use",tool_call_id:e.toolCallId,tool_name:e.toolName,input:e.input};case"toolResult":return{type:"tool_result",tool_call_id:e.toolCallId,output:e.output,is_error:e.isError};case"image":case"video":{const t=e.source;let n;return t.kind==="base64"?n={kind:"base64",media_type:t.mediaType,data:t.data}:t.kind==="file"?n={kind:"file",file_id:t.fileId}:n={kind:"url",url:t.url},{type:e.type,source:n}}case"file":return{type:"file",file_id:e.fileId,name:e.name,media_type:e.mediaType,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};case"unknown":return e.raw}}function JU(e){return{content:e.content.map(PE),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,swarm_mode:e.swarmMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function XU(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function jE(e){return{approvalId:e.approval_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,toolName:e.tool_name,action:e.action,display:e.tool_input_display??e.display,expiresAt:e.expires_at,createdAt:e.created_at}}function eK(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function tK(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(eK),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function HE(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map(tK),createdAt:e.created_at}}function nK(e){switch(e.kind){case"single":return{kind:"single",option_id:e.optionId};case"multi":return{kind:"multi",option_ids:e.optionIds};case"other":return{kind:"other",text:e.text};case"multiWithOther":return{kind:"multi_with_other",option_ids:e.optionIds,other_text:e.otherText};case"skipped":return{kind:"skipped"}}}function iK(e){const t={};for(const[n,i]of Object.entries(e.answers))t[n]=nK(i);return{answers:t,method:e.method,note:e.note}}function Ag(e,t){return{id:e.id,agentId:e.agent_id??t,sessionId:e.session_id,kind:e.kind,description:e.description,status:e.status,command:e.command,createdAt:e.created_at,startedAt:e.started_at,completedAt:e.completed_at,outputPreview:e.output_preview,outputBytes:e.output_bytes,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,model:e.model,thinkingEffort:e.thinking_effort,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,swarmIndex:e.swarm_index,runInBackground:e.run_in_background??(e.kind==="subagent"?!0:void 0)}}function cA(e){return{path:e.path,name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modified_at,etag:e.etag,mime:e.mime,languageId:e.language_id,isBinary:e.is_binary,isSymlinkTo:e.is_symlink_to,gitStatus:e.git_status,childCount:e.child_count}}function Wa(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Id(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Lr(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function WE(e){if(!e||typeof e!="object")return null;const t=e,n=Wa(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const i=t.budget,s=i&&typeof i=="object"?i:{};return{goalId:Wa(t,"goalId")??Wa(t,"goal_id")??"goal",objective:Wa(t,"objective")??"",completionCriterion:Wa(t,"completionCriterion")??Wa(t,"completion_criterion"),status:n,turnsUsed:Id(t,"turnsUsed")??Id(t,"turns_used")??0,tokensUsed:Id(t,"tokensUsed")??Id(t,"tokens_used")??0,wallClockMs:Id(t,"wallClockMs")??Id(t,"wall_clock_ms")??0,terminalReason:Wa(t,"terminalReason")??Wa(t,"terminal_reason"),budget:{tokenBudget:Lr(s,"tokenBudget")??Lr(s,"token_budget"),remainingTokens:Lr(s,"remainingTokens")??Lr(s,"remaining_tokens"),turnBudget:Lr(s,"turnBudget")??Lr(s,"turn_budget"),remainingTurns:Lr(s,"remainingTurns")??Lr(s,"remaining_turns"),wallClockBudgetMs:Lr(s,"wallClockBudgetMs")??Lr(s,"wall_clock_budget_ms"),remainingWallClockMs:Lr(s,"remainingWallClockMs")??Lr(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function sK(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:Yr(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:Yr(t.payload.session),changedFields:t.payload.changed_fields};case"event.session.deleted":return{type:"sessionDeleted",sessionId:t.session_id};case"event.workspace.created":return{type:"workspaceCreated",workspace:c1(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:c1(t.payload.workspace)};case"event.workspace.deleted":return{type:"workspaceDeleted",workspaceId:t.payload.workspace_id,root:t.payload.root};case"event.session.work_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.busy,mainTurnActive:t.payload.main_turn_active,pendingInteraction:t.payload.pending_interaction,lastTurnReason:t.payload.last_turn_reason};case"event.session.status_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.status!=="idle"&&t.payload.status!=="aborted",mainTurnActive:t.payload.status!=="idle"&&t.payload.status!=="aborted",pendingInteraction:t.payload.status==="awaiting_approval"?"approval":t.payload.status==="awaiting_question"?"question":"none",lastTurnReason:t.payload.status==="aborted"?"cancelled":void 0};case"event.session.usage_updated":return{type:"sessionUsageUpdated",sessionId:t.session_id,usage:OE(t.payload.usage)};case"event.session.history_compacted":return{type:"historyCompacted",sessionId:t.session_id,beforeSeq:t.payload.before_seq,reason:t.payload.reason,summaryMessageId:t.payload.summary_message_id};case"event.goal.updated":{const n=WE(t.payload.snapshot??null);return{type:"goalUpdated",sessionId:t.session_id,goal:n?.status==="complete"?null:n}}case"event.message.created":return{type:"messageCreated",message:t3(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(v5),status:t.payload.status};case"event.assistant.delta":return{type:"assistantDelta",sessionId:t.session_id,messageId:t.payload.message_id,contentIndex:t.payload.content_index,delta:t.payload.delta};case"event.assistant.tool_use_started":case"event.assistant.tool_use_delta":case"event.assistant.tool_use_completed":case"event.assistant.completed":case"event.tool.started":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.output":return{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.chunk,stream:t.payload.stream};case"event.tool.progress":return typeof t.payload.message=="string"&&t.payload.message.length>0?{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.message,stream:"stdout"}:{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.completed":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.approval.requested":return{type:"approvalRequested",sessionId:t.session_id,approval:jE(t.payload)};case"event.approval.resolved":return{type:"approvalResolved",sessionId:t.session_id,approvalId:t.payload.approval_id,decision:t.payload.decision,resolvedAt:t.payload.resolved_at,feedback:t.payload.feedback,selectedLabel:t.payload.selected_label};case"event.approval.expired":return{type:"approvalExpired",sessionId:t.session_id,approvalId:t.payload.approval_id};case"event.question.requested":return{type:"questionRequested",sessionId:t.session_id,question:HE(t.payload)};case"event.question.answered":return{type:"questionAnswered",sessionId:t.session_id,questionId:t.payload.question_id,resolvedAt:t.payload.resolved_at};case"event.question.dismissed":return{type:"questionDismissed",sessionId:t.session_id,questionId:t.payload.question_id,dismissedAt:t.payload.dismissed_at};case"event.task.created":return{type:"taskCreated",sessionId:t.session_id,task:Ag(t.payload.task)};case"event.task.progress":return{type:"taskProgress",sessionId:t.session_id,taskId:t.payload.task_id,outputChunk:t.payload.output_chunk,stream:t.payload.stream};case"event.task.completed":return{type:"taskCompleted",sessionId:t.session_id,taskId:t.payload.task_id,status:t.payload.status,outputPreview:t.payload.output_preview,outputBytes:t.payload.output_bytes};case"event.plugin.changed":return{type:"pluginsChanged"};case"event.capability.changed":return{type:"capabilityChanged",capabilityId:t.payload.capability_id,install:t.payload.install};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:n3(t.payload.config)};case"event.model_catalog.changed":return{type:"modelCatalogChanged",changed:t.payload.changed.map(n=>({providerId:n.provider_id,providerName:n.provider_name,added:n.added,removed:n.removed})),unchanged:t.payload.unchanged,failed:t.payload.failed};default:return{type:"unknown",raw:e}}}function oK(e){return{id:e.model,provider:e.provider,model:e.model,displayName:e.display_name,maxContextSize:e.max_context_size,capabilities:e.capabilities,supportEfforts:e.support_efforts,defaultEffort:e.default_effort}}function Ed(e){return{id:e.id,type:e.type,baseUrl:e.base_url,defaultModel:e.default_model,hasApiKey:e.has_api_key,status:e.status,models:e.models}}function dA(e){return{id:e.id,name:e.name,wireType:e.wire_type,guessed:e.guessed,needsBaseUrl:e.needs_base_url,rejected:e.rejected,rejectReason:e.reject_reason,envKey:e.env_key,models:e.models.map(t=>({id:t.id,name:t.name,maxContextSize:t.max_context_size,capabilities:t.capabilities,reasoning:t.reasoning}))}}function n3(e){const t={};for(const[n,i]of Object.entries(e.providers))t[n]={type:i.type,baseUrl:i.base_url,defaultModel:i.default_model,hasApiKey:i.has_api_key};return{providers:t,defaultProvider:e.default_provider,defaultModel:e.default_model,secondaryModel:e.secondary_model,models:e.models,thinking:e.thinking,planMode:e.plan_mode,yolo:e.yolo,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,services:e.services,mergeAllAvailableSkills:e.merge_all_available_skills,extraSkillDirs:e.extra_skill_dirs,loopControl:e.loop_control,background:e.background,experimental:e.experimental,telemetry:e.telemetry,raw:e.raw}}function rK(e){return e.session_id}function lK(e){return e.seq}function aK(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}const uK={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function cK(e,t){switch(t.op){case"reset":return dK(e,t);case"turn.upsert":return hK(e,t.turn);case"step.upsert":return gK(e,t.turnId,t.step);case"frame.upsert":return vK(e,t);case"append":return bK(e,t);case"marker.upsert":return hA(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return hA(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return CK(e,t.task);case"interaction.upsert":return wK(e,t.interaction);case"attachment.upsert":return _K(e,t.attachment);case"todo.upsert":return MK(e,t.todo);case"prompt.upsert":return EK(e,t.prompt);case"meta.merge":return NK(e,t.meta);case"items.remove":return AK(e,t.ids)}}function dK(e,t){const n=new Set;for(const i of t.snapshot.interactions)i.state==="pending"&&n.add(i.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(i=>[i.taskId,i])),interactions:new Map(t.snapshot.interactions.map(i=>[i.interactionId,i])),attachments:new Map(t.snapshot.attachments.map(i=>[i.attachmentId,i])),todos:new Map(t.snapshot.todos.map(i=>[i.todoId,i])),prompts:new Map(t.snapshot.prompts.map(i=>[i.promptId,i])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function fA(e,t){return{...e,kind:"turn",steps:[...t]}}function qE(e){return{kind:"turn",turnId:e,ordinal:aK(e),state:"running",origin:{kind:"other"},steps:[]}}function fK(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Ef(e,t){const n=e.items.find(i=>i.kind==="turn"&&i.turnId===t);return n?.kind==="turn"?n:void 0}function y5(e,t){const n=[...e];let i=n.length;for(let s=0;s<n.length;s+=1){const o=n[s];if(o?.kind==="turn"&&o.ordinal>t.ordinal){i=s;break}}return n.splice(i,0,t),n}function ev(e,t,n){return e.map(i=>i.kind==="turn"&&i.turnId===t?n(i):i)}function hK(e,t){const n=Ef(e,t.turnId);return n?pK(n,t)?{state:e,changed:!1}:{state:{...e,items:ev(e.items,t.turnId,i=>fA(t,i.steps))},changed:!0}:{state:{...e,items:y5(e.items,fA(t,[]))},changed:!0}}function pK(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.prompt===t.prompt&&e.attachmentIds===t.attachmentIds&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.origin.kind===t.origin.kind&&e.origin.payload===t.origin.payload&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function gK(e,t,n){const i=Ef(e,t)??qE(t),s=i.steps.findIndex(u=>u.stepId===n.stepId);let o,r=!0;if(s>=0){const u=i.steps[s];u&&mK(u,n)?(r=!1,o=i.steps):o=i.steps.map(c=>c.stepId===n.stepId?{...n,kind:"step",frames:c.frames}:c)}else o=[...i.steps,{...n,kind:"step",frames:[]}].toSorted((u,c)=>u.ordinal-c.ordinal);if(!r)return{state:e,changed:!1};const l={...i,steps:[...o]},a=Ef(e,t)?ev(e.items,t,()=>l):y5(e.items,l);return{state:{...e,items:a},changed:!0}}function mK(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.usage===t.usage&&e.finishReason===t.finishReason&&e.timing===t.timing&&e.retry===t.retry&&e.endReason===t.endReason&&e.endMessage===t.endMessage}function vK(e,t){const n=Ef(e,t.turnId)??qE(t.turnId),i=n.steps.find(c=>c.stepId===t.stepId)??fK(t.stepId,t.turnId),s=i.frames.findIndex(c=>c.frameId===t.frame.frameId);let o;if(s>=0){const c=i.frames[s];if(c!==void 0&&yK(c,t.frame))return{state:e,changed:!1};o=i.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else o=[...i.frames,t.frame];const r={...i,frames:[...o]},l=n.steps.some(c=>c.stepId===t.stepId)?n.steps.map(c=>c.stepId===t.stepId?r:c):[...n.steps,r].toSorted((c,d)=>c.ordinal-d.ordinal),a={...n,steps:l},u=Ef(e,t.turnId)?ev(e.items,t.turnId,()=>a):y5(e.items,a);return{state:{...e,items:u},changed:!0}}function yK(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.text===t.text&&e.role===t.role&&e.attachmentIds===t.attachmentIds&&e.taskId===t.taskId:e.kind==="thinking"&&t.kind==="thinking"?e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.state===t.state&&e.toolCallId===t.toolCallId&&e.name===t.name&&e.view===t.view&&e.input===t.input&&e.output===t.output&&e.display===t.display&&e.error===t.error&&e.inputText===t.inputText&&e.progress===t.progress&&e.taskId===t.taskId&&e.approvalId===t.approvalId&&e.todoId===t.todoId&&e.agentRefs===t.agentRefs:e.kind==="notice"&&t.kind==="notice"?e.message===t.message&&e.level===t.level&&e.detail===t.detail:!1}function bK(e,t){if(t.target.type==="task")return kK(e,t);const{turnId:n,stepId:i,frameId:s}=t.target,o=Ef(e,n),r=o?.steps.find(f=>f.stepId===i),l=r?.frames.find(f=>f.frameId===s);if(!o||!r||!l||l.kind!=="text"&&l.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=UE(l.text,t.offset,t.text);if(a.gap)return{state:e,changed:!1,gap:a.gap};if(!a.changed)return{state:e,changed:!1};const u={...l,text:a.text},c={...r,frames:r.frames.map(f=>f.frameId===s?u:f)},d={...o,steps:o.steps.map(f=>f.stepId===i?c:f)};return{state:{...e,items:ev(e.items,n,()=>d)},changed:!0}}function kK(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,i=e.tasks.get(n),s=i?.outputTail??"",o=UE(s,t.offset,t.text);if(o.gap)return{state:e,changed:!1,gap:o.gap};if(!o.changed)return{state:e,changed:!1};const r=i?{...i,outputTail:o.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:o.text},l=new Map(e.tasks);return l.set(n,r),{state:{...e,tasks:l},changed:!0}}function UE(e,t,n){if(t>e.length)return{text:e,changed:!1,gap:{expected:e.length,got:t}};if(e.slice(t,t+n.length)===n)return{text:e,changed:!1};const i=e.length-t;return e.slice(t)!==n.slice(0,i)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(i>0?n.slice(i):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function hA(e,t,n,i){if(e.items.some(o=>i3(o)===n)){let o=!1;const r=e.items.map(l=>i3(l)!==n||l===t?l:(o=!0,t));return o?{state:{...e,items:r},changed:!0}:{state:e,changed:!1}}if(i!==void 0){const o=[...e.items];let r=o.length;for(let l=0;l<o.length;l+=1){const a=o[l];if(a?.kind==="turn"&&a.ordinal>=i){r=l;break}}return o.splice(r,0,t),{state:{...e,items:o},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function i3(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function AK(e,t){const n=new Set(t),i=e.items.filter(l=>l.kind==="turn"&&n.has(l.turnId)),s=e.items.filter(l=>!n.has(i3(l)));if(s.length===e.items.length)return{state:e,changed:!1};let o=e.pendingInteractions,r=e.interactions;if(i.length>0){const l=new Set,a=new Set(o),u=new Set;for(const c of i)for(const d of c.steps)for(const f of d.frames)f.kind==="tool"&&l.add(f.toolCallId);for(const c of r.values())c.toolCallId!==void 0&&l.has(c.toolCallId)&&(u.add(c.interactionId),a.delete(c.interactionId));if(u.size>0){const c=new Map(r);for(const d of u)c.delete(d);r=c}o=a}return{state:{...e,items:s,interactions:r,pendingInteractions:o},changed:!0}}function CK(e,t){const n=e.tasks.get(t.taskId);if(n&&LK(n,t))return{state:e,changed:!1};const i=new Map(e.tasks);return i.set(t.taskId,t),{state:{...e,tasks:i},changed:!0}}function wK(e,t){const n=e.interactions.get(t.interactionId);if(n&&xK(n,t))return{state:e,changed:!1};const i=new Map(e.interactions);i.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const o=new Set(s);o.add(t.interactionId),s=o}}else if(s.has(t.interactionId)){const o=new Set(s);o.delete(t.interactionId),s=o}return{state:{...e,interactions:i,pendingInteractions:s},changed:!0}}function xK(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function _K(e,t){const n=e.attachments.get(t.attachmentId);if(n&&SK(n,t))return{state:e,changed:!1};const i=new Map(e.attachments);return i.set(t.attachmentId,t),{state:{...e,attachments:i},changed:!0}}function SK(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function MK(e,t){const n=e.todos.get(t.todoId);if(n&&IK(n,t))return{state:e,changed:!1};const i=new Map(e.todos);return i.set(t.todoId,t),{state:{...e,todos:i},changed:!0}}function IK(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function EK(e,t){const n=e.prompts.get(t.promptId);if(n&&TK(n,t))return{state:e,changed:!1};const i=new Map(e.prompts);return i.set(t.promptId,t),{state:{...e,prompts:i},changed:!0}}function TK(e,t){return e.status===t.status&&e.userMessageId===t.userMessageId&&e.content===t.content&&e.createdAt===t.createdAt&&e.finishedAt===t.finishedAt&&e.steeredAt===t.steeredAt}function LK(e,t){return e.kind===t.kind&&e.state===t.state&&e.detached===t.detached&&e.description===t.description&&e.agentId===t.agentId&&e.outputTail===t.outputTail&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.resultSummary===t.resultSummary&&e.error===t.error&&e.stateReason===t.stateReason&&e.usage===t.usage}function NK(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,swarm:t.modes.swarm===null?void 0:t.modes.swarm??e.meta.modes?.swarm}:e.meta.modes,i=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.swarm===void 0?void 0:n,agent:i};return s.goal===e.meta.goal&&s.activity===e.meta.activity&&s.modes===e.meta.modes&&s.agent===e.meta.agent?{state:e,changed:!1}:{state:{...e,meta:s},changed:!0}}class FK{constructor(t){this.agentId=t}#e=uK;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let i,s=this.#e;for(const o of t){const r=cK(s,o);if(r.gap){i={target:o.target,...r.gap};continue}r.changed&&(s=r.state,n.push(o))}if(this.#e=s,n.length>0){const o={agentId:this.agentId,ops:n};for(const r of this.#t)r(o)}return{accepted:n,gap:i}}onChange(t){return this.#t.add(t),{dispose:()=>void this.#t.delete(t)}}getItems(){return this.#e.items}getTurn(t){const n=this.#e.items.find(i=>i.kind==="turn"&&i.turnId===t);return n?.kind==="turn"?n:void 0}getTasks(){return this.#e.tasks}getTask(t){return this.#e.tasks.get(t)}getInteractions(){return this.#e.interactions}getInteraction(t){return this.#e.interactions.get(t)}getAttachments(){return this.#e.attachments}getAttachment(t){return this.#e.attachments.get(t)}getTodos(){return this.#e.todos}getTodo(t){return this.#e.todos.get(t)}getPrompts(){return this.#e.prompts}getPrompt(t){return this.#e.prompts.get(t)}getMeta(){return this.#e.meta}listPendingInteractions(){return[...this.#e.pendingInteractions]}get hasMoreOlder(){return this.#e.hasMoreOlder}snapshot(t){let n=this.#e.items,i=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((o,r)=>r.kind==="turn"?o+1:o,0);if(s>t.tailTurns){const o=s-t.tailTurns,r=[];let l=0;for(const a of n)if(a.kind==="turn"){if(l+=1,l<=o)continue;r.push(a)}else l>o&&r.push(a);n=r,i=!0}}return{items:n,tasks:[...this.#e.tasks.values()],interactions:[...this.#e.interactions.values()],attachments:[...this.#e.attachments.values()],todos:[...this.#e.todos.values()],prompts:[...this.#e.prompts.values()],meta:this.#e.meta,hasMoreOlder:i}}}function pt(e,t,n){function i(l,a){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:a,constr:r,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,a);const u=r.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){const f=c[d];f in l||(l[f]=u[f].bind(l))}}const s=n?.Parent??Object;class o extends s{}Object.defineProperty(o,"name",{value:e});function r(l){var a;const u=n?.Parent?new o:this;i(u,l),(a=u._zod).deferred??(a.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(r,"init",{value:i}),Object.defineProperty(r,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(r,"name",{value:e}),r}class df extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class KE extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const VE={};function Cu(e){return VE}function ZE(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,s])=>t.indexOf(+i)===-1).map(([i,s])=>s)}function s3(e,t){return typeof t=="bigint"?t.toString():t}function tv(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function b5(e){return e==null}function k5(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function BK(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let s=(i.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(i)){const a=i.match(/\d?e-(\d?)/);a?.[1]&&(s=Number.parseInt(a[1]))}const o=n>s?n:s,r=Number.parseInt(e.toFixed(o).replace(".","")),l=Number.parseInt(t.toFixed(o).replace(".",""));return r%l/10**o}const pA=Symbol("evaluating");function ui(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==pA)return i===void 0&&(i=pA,i=n()),i},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function sd(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function $u(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function gA(e){return JSON.stringify(e)}function $K(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const GE="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function V1(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const DK=tv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Tf(e){if(V1(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(V1(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function QE(e){return Tf(e)?{...e}:Array.isArray(e)?[...e]:e}const RK=new Set(["string","number","symbol"]);function Lf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Du(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function ln(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function zK(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const OK={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function PK(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=$u(e._zod.def,{get shape(){const r={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(r[l]=n.shape[l])}return sd(this,"shape",r),r},checks:[]});return Du(e,o)}function jK(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=$u(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete r[l]}return sd(this,"shape",r),r},checks:[]});return Du(e,o)}function HK(e,t){if(!Tf(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const r in t)if(Object.getOwnPropertyDescriptor(o,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=$u(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return sd(this,"shape",o),o}});return Du(e,s)}function WK(e,t){if(!Tf(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=$u(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return sd(this,"shape",i),i}});return Du(e,n)}function qK(e,t){const n=$u(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return sd(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Du(e,n)}function UK(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=$u(t._zod.def,{get shape(){const l=t._zod.def.shape,a={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(a[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)a[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return sd(this,"shape",a),a},checks:[]});return Du(t,r)}function KK(e,t,n){const i=$u(t._zod.def,{get shape(){const s=t._zod.def.shape,o={...s};if(n)for(const r in n){if(!(r in o))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(o[r]=new e({type:"nonoptional",innerType:s[r]}))}else for(const r in s)o[r]=new e({type:"nonoptional",innerType:s[r]});return sd(this,"shape",o),o}});return Du(t,i)}function Zd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Gd(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function L0(e){return typeof e=="string"?e:e?.message}function wu(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const s=L0(e.inst?._zod.def?.error?.(e))??L0(t?.error?.(e))??L0(n.customError?.(e))??L0(n.localeError?.(e))??"Invalid input";i.message=s}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function A5(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Z1(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const YE=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,s3,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},JE=pt("$ZodError",YE),XE=pt("$ZodError",YE,{Parent:Error});function VK(e,t=n=>n.message){const n={},i=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):i.push(t(s));return{formErrors:i,fieldErrors:n}}function ZK(e,t=n=>n.message){const n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(r=>i({issues:r}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let r=n,l=0;for(;l<o.path.length;){const a=o.path[l];l===o.path.length-1?(r[a]=r[a]||{_errors:[]},r[a]._errors.push(t(o))):r[a]=r[a]||{_errors:[]},r=r[a],l++}}};return i(e),n}const C5=e=>(t,n,i,s)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise)throw new df;if(r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>wu(a,o,Cu())));throw GE(l,s?.callee),l}return r.value},w5=e=>async(t,n,i,s)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise&&(r=await r),r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>wu(a,o,Cu())));throw GE(l,s?.callee),l}return r.value},nv=e=>(t,n,i)=>{const s=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new df;return o.issues.length?{success:!1,error:new(e??JE)(o.issues.map(r=>wu(r,s,Cu())))}:{success:!0,data:o.value}},GK=nv(XE),iv=e=>async(t,n,i)=>{const s=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(r=>wu(r,s,Cu())))}:{success:!0,data:o.value}},QK=iv(XE),YK=e=>(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return C5(e)(t,n,s)},JK=e=>(t,n,i)=>C5(e)(t,n,i),XK=e=>async(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return w5(e)(t,n,s)},eV=e=>async(t,n,i)=>w5(e)(t,n,i),tV=e=>(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return nv(e)(t,n,s)},nV=e=>(t,n,i)=>nv(e)(t,n,i),iV=e=>async(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return iv(e)(t,n,s)},sV=e=>async(t,n,i)=>iv(e)(t,n,i),oV=/^[cC][^\s-]{8,}$/,rV=/^[0-9a-z]+$/,lV=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,aV=/^[0-9a-vA-V]{20}$/,uV=/^[A-Za-z0-9]{27}$/,cV=/^[a-zA-Z0-9_-]{21}$/,dV=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,fV=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,mA=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,hV=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,pV="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function gV(){return new RegExp(pV,"u")}const mV=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vV=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,yV=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,bV=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kV=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,eT=/^[A-Za-z0-9_-]*$/,AV=/^\+[1-9]\d{6,14}$/,tT="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",CV=new RegExp(`^${tT}$`);function nT(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function wV(e){return new RegExp(`^${nT(e)}$`)}function xV(e){const t=nT({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${tT}T(?:${i})$`)}const _V=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},SV=/^-?\d+$/,iT=/^-?\d+(?:\.\d+)?$/,MV=/^(?:true|false)$/i,IV=/^[^A-Z]*$/,EV=/^[^a-z]*$/,ar=pt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),sT={number:"number",bigint:"bigint",object:"date"},oT=pt("$ZodCheckLessThan",(e,t)=>{ar.init(e,t);const n=sT[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,o=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rT=pt("$ZodCheckGreaterThan",(e,t)=>{ar.init(e,t);const n=sT[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,o=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),TV=pt("$ZodCheckMultipleOf",(e,t)=>{ar.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):BK(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),LV=pt("$ZodCheckNumberFormat",(e,t)=>{ar.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[s,o]=OK[t.format];e._zod.onattach.push(r=>{const l=r._zod.bag;l.format=t.format,l.minimum=s,l.maximum=o,n&&(l.pattern=SV)}),e._zod.check=r=>{const l=r.value;if(n){if(!Number.isInteger(l)){r.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?r.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):r.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}l<s&&r.issues.push({origin:"number",input:l,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),l>o&&r.issues.push({origin:"number",input:l,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),NV=pt("$ZodCheckMaxLength",(e,t)=>{var n;ar.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!b5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const s=i.value;if(s.length<=t.maximum)return;const r=A5(s);i.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),FV=pt("$ZodCheckMinLength",(e,t)=>{var n;ar.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!b5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const s=i.value;if(s.length>=t.minimum)return;const r=A5(s);i.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),BV=pt("$ZodCheckLengthEquals",(e,t)=>{var n;ar.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!b5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=i=>{const s=i.value,o=s.length;if(o===t.length)return;const r=A5(s),l=o>t.length;i.issues.push({origin:r,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),sv=pt("$ZodCheckStringFormat",(e,t)=>{var n,i;ar.init(e,t),e._zod.onattach.push(s=>{const o=s._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),$V=pt("$ZodCheckRegex",(e,t)=>{sv.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),DV=pt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=IV),sv.init(e,t)}),RV=pt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=EV),sv.init(e,t)}),zV=pt("$ZodCheckIncludes",(e,t)=>{ar.init(e,t);const n=Lf(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(s=>{const o=s._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),OV=pt("$ZodCheckStartsWith",(e,t)=>{ar.init(e,t);const n=new RegExp(`^${Lf(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),PV=pt("$ZodCheckEndsWith",(e,t)=>{ar.init(e,t);const n=new RegExp(`.*${Lf(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),jV=pt("$ZodCheckOverwrite",(e,t)=>{ar.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class HV{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(` -`).filter(r=>r),s=Math.min(...i.map(r=>r.length-r.trimStart().length)),o=i.map(r=>r.slice(s)).map(r=>" ".repeat(this.indent*2)+r);for(const r of o)this.content.push(r)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,s.join(` -`))}}const WV={major:4,minor:3,patch:6},Vi=pt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=WV;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const s of i)for(const o of s._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(r,l,a)=>{let u=Zd(r),c;for(const d of l){if(d._zod.def.when){if(!d._zod.def.when(r))continue}else if(u)continue;const f=r.issues.length,p=d._zod.check(r);if(p instanceof Promise&&a?.async===!1)throw new df;if(c||p instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await p,r.issues.length!==f&&(u||(u=Zd(r,f)))});else{if(r.issues.length===f)continue;u||(u=Zd(r,f))}}return c?c.then(()=>r):r},o=(r,l,a)=>{if(Zd(r))return r.aborted=!0,r;const u=s(l,i,a);if(u instanceof Promise){if(a.async===!1)throw new df;return u.then(c=>e._zod.parse(c,a))}return e._zod.parse(u,a)};e._zod.run=(r,l)=>{if(l.skipChecks)return e._zod.parse(r,l);if(l.direction==="backward"){const u=e._zod.parse({value:r.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(c=>o(c,r,l)):o(u,r,l)}const a=e._zod.parse(r,l);if(a instanceof Promise){if(l.async===!1)throw new df;return a.then(u=>s(u,i,l))}return s(a,i,l)}}ui(e,"~standard",()=>({validate:s=>{try{const o=GK(e,s);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return QK(e,s).then(r=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),x5=pt("$ZodString",(e,t)=>{Vi.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??_V(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ji=pt("$ZodStringFormat",(e,t)=>{sv.init(e,t),x5.init(e,t)}),qV=pt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=fV),ji.init(e,t)}),UV=pt("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=mA(i))}else t.pattern??(t.pattern=mA());ji.init(e,t)}),KV=pt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=hV),ji.init(e,t)}),VV=pt("$ZodURL",(e,t)=>{ji.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),s=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),ZV=pt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=gV()),ji.init(e,t)}),GV=pt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=cV),ji.init(e,t)}),QV=pt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=oV),ji.init(e,t)}),YV=pt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=rV),ji.init(e,t)}),JV=pt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=lV),ji.init(e,t)}),XV=pt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=aV),ji.init(e,t)}),eZ=pt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=uV),ji.init(e,t)}),tZ=pt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=xV(t)),ji.init(e,t)}),nZ=pt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=CV),ji.init(e,t)}),iZ=pt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=wV(t)),ji.init(e,t)}),sZ=pt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=dV),ji.init(e,t)}),oZ=pt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=mV),ji.init(e,t),e._zod.bag.format="ipv4"}),rZ=pt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=vV),ji.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),lZ=pt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=yV),ji.init(e,t)}),aZ=pt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=bV),ji.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[s,o]=i;if(!o)throw new Error;const r=Number(o);if(`${r}`!==o)throw new Error;if(r<0||r>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function lT(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const uZ=pt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=kV),ji.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{lT(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function cZ(e){if(!eT.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return lT(n)}const dZ=pt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=eT),ji.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{cZ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),fZ=pt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=AV),ji.init(e,t)});function hZ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const s=JSON.parse(atob(i));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const pZ=pt("$ZodJWT",(e,t)=>{ji.init(e,t),e._zod.check=n=>{hZ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),aT=pt("$ZodNumber",(e,t)=>{Vi.init(e,t),e._zod.pattern=e._zod.bag.pattern??iT,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const o=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...o?{received:o}:{}}),n}}),gZ=pt("$ZodNumberFormat",(e,t)=>{LV.init(e,t),aT.init(e,t)}),mZ=pt("$ZodBoolean",(e,t)=>{Vi.init(e,t),e._zod.pattern=MV,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),vZ=pt("$ZodUnknown",(e,t)=>{Vi.init(e,t),e._zod.parse=n=>n}),yZ=pt("$ZodNever",(e,t)=>{Vi.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function vA(e,t,n){e.issues.length&&t.issues.push(...Gd(n,e.issues)),t.value[n]=e.value}const bZ=pt("$ZodArray",(e,t)=>{Vi.init(e,t),e._zod.parse=(n,i)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const o=[];for(let r=0;r<s.length;r++){const l=s[r],a=t.element._zod.run({value:l,issues:[]},i);a instanceof Promise?o.push(a.then(u=>vA(u,n,r))):vA(a,n,r)}return o.length?Promise.all(o).then(()=>n):n}});function bm(e,t,n,i,s){if(e.issues.length){if(s&&!(n in i))return;t.issues.push(...Gd(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function uT(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=zK(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function cT(e,t,n,i,s,o){const r=[],l=s.keySet,a=s.catchall._zod,u=a.def.type,c=a.optout==="optional";for(const d in t){if(l.has(d))continue;if(u==="never"){r.push(d);continue}const f=a.run({value:t[d],issues:[]},i);f instanceof Promise?e.push(f.then(p=>bm(p,n,d,t,c))):bm(f,n,d,t,c)}return r.length&&n.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const kZ=pt("$ZodObject",(e,t)=>{if(Vi.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...l};return Object.defineProperty(t,"shape",{value:a}),a}})}const i=tv(()=>uT(t));ui(e._zod,"propValues",()=>{const l=t.shape,a={};for(const u in l){const c=l[u]._zod;if(c.values){a[u]??(a[u]=new Set);for(const d of c.values)a[u].add(d)}}return a});const s=V1,o=t.catchall;let r;e._zod.parse=(l,a)=>{r??(r=i.value);const u=l.value;if(!s(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const c=[],d=r.shape;for(const f of r.keys){const p=d[f],g=p._zod.optout==="optional",m=p._zod.run({value:u[f],issues:[]},a);m instanceof Promise?c.push(m.then(y=>bm(y,l,f,u,g))):bm(m,l,f,u,g)}return o?cT(c,u,l,a,i.value,e):c.length?Promise.all(c).then(()=>l):l}}),AZ=pt("$ZodObjectJIT",(e,t)=>{kZ.init(e,t);const n=e._zod.parse,i=tv(()=>uT(t)),s=f=>{const p=new HV(["shape","payload","ctx"]),g=i.value,m=A=>{const v=gA(A);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};p.write("const input = payload.value;");const y=Object.create(null);let w=0;for(const A of g.keys)y[A]=`key_${w++}`;p.write("const newResult = {};");for(const A of g.keys){const v=y[A],x=gA(A),S=f[A]?._zod?.optout==="optional";p.write(`const ${v} = ${m(A)};`),S?p.write(` - if (${v}.issues.length) { - if (${x} in input) { - payload.issues = payload.issues.concat(${v}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${x}, ...iss.path] : [${x}] - }))); - } - } - - if (${v}.value === undefined) { - if (${x} in input) { - newResult[${x}] = undefined; - } - } else { - newResult[${x}] = ${v}.value; - } - - `):p.write(` - if (${v}.issues.length) { - payload.issues = payload.issues.concat(${v}.issues.map(iss => ({ - ...iss, - path: iss.path ? [${x}, ...iss.path] : [${x}] - }))); - } - - if (${v}.value === undefined) { - if (${x} in input) { - newResult[${x}] = undefined; - } - } else { - newResult[${x}] = ${v}.value; - } - - `)}p.write("payload.value = newResult;"),p.write("return payload;");const k=p.compile();return(A,v)=>k(f,A,v)};let o;const r=V1,l=!VE.jitless,u=l&&DK.value,c=t.catchall;let d;e._zod.parse=(f,p)=>{d??(d=i.value);const g=f.value;return r(g)?l&&u&&p?.async===!1&&p.jitless!==!0?(o||(o=s(t.shape)),f=o(f,p),c?cT([],g,f,p,d,e):f):n(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function yA(e,t,n,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const s=e.filter(o=>!Zd(o));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(r=>wu(r,i,Cu())))}),t)}const dT=pt("$ZodUnion",(e,t)=>{Vi.init(e,t),ui(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),ui(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),ui(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),ui(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${s.map(o=>k5(o.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(s,o)=>{if(n)return i(s,o);let r=!1;const l=[];for(const a of t.options){const u=a._zod.run({value:s.value,issues:[]},o);if(u instanceof Promise)l.push(u),r=!0;else{if(u.issues.length===0)return u;l.push(u)}}return r?Promise.all(l).then(a=>yA(a,s,e,o)):yA(l,s,e,o)}}),CZ=pt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,dT.init(e,t);const n=e._zod.parse;ui(e._zod,"propValues",()=>{const s={};for(const o of t.options){const r=o._zod.propValues;if(!r||Object.keys(r).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[l,a]of Object.entries(r)){s[l]||(s[l]=new Set);for(const u of a)s[l].add(u)}}return s});const i=tv(()=>{const s=t.options,o=new Map;for(const r of s){const l=r._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const a of l){if(o.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);o.set(a,r)}}return o});e._zod.parse=(s,o)=>{const r=s.value;if(!V1(r))return s.issues.push({code:"invalid_type",expected:"object",input:r,inst:e}),s;const l=i.value.get(r?.[t.discriminator]);return l?l._zod.run(s,o):t.unionFallback?n(s,o):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:r,path:[t.discriminator],inst:e}),s)}}),wZ=pt("$ZodIntersection",(e,t)=>{Vi.init(e,t),e._zod.parse=(n,i)=>{const s=n.value,o=t.left._zod.run({value:s,issues:[]},i),r=t.right._zod.run({value:s,issues:[]},i);return o instanceof Promise||r instanceof Promise?Promise.all([o,r]).then(([a,u])=>bA(n,a,u)):bA(n,o,r)}});function o3(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Tf(e)&&Tf(t)){const n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),s={...e,...t};for(const o of i){const r=o3(e[o],t[o]);if(!r.valid)return{valid:!1,mergeErrorPath:[o,...r.mergeErrorPath]};s[o]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const s=e[i],o=t[i],r=o3(s,o);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function bA(e,t,n){const i=new Map;let s;for(const l of t.issues)if(l.code==="unrecognized_keys"){s??(s=l);for(const a of l.keys)i.has(a)||i.set(a,{}),i.get(a).l=!0}else e.issues.push(l);for(const l of n.issues)if(l.code==="unrecognized_keys")for(const a of l.keys)i.has(a)||i.set(a,{}),i.get(a).r=!0;else e.issues.push(l);const o=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(o.length&&s&&e.issues.push({...s,keys:o}),Zd(e))return e;const r=o3(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const xZ=pt("$ZodRecord",(e,t)=>{Vi.init(e,t),e._zod.parse=(n,i)=>{const s=n.value;if(!Tf(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const o=[],r=t.keyType._zod.values;if(r){n.value={};const l=new Set;for(const u of r)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);const c=t.valueType._zod.run({value:s[u],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&n.issues.push(...Gd(u,d.issues)),n.value[u]=d.value})):(c.issues.length&&n.issues.push(...Gd(u,c.issues)),n.value[u]=c.value)}let a;for(const u in s)l.has(u)||(a=a??[],a.push(u));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const l of Reflect.ownKeys(s)){if(l==="__proto__")continue;let a=t.keyType._zod.run({value:l,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&iT.test(l)&&a.issues.length){const d=t.keyType._zod.run({value:Number(l),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(a=d)}if(a.issues.length){t.mode==="loose"?n.value[l]=s[l]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(d=>wu(d,i,Cu())),input:l,path:[l],inst:e});continue}const c=t.valueType._zod.run({value:s[l],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&n.issues.push(...Gd(l,d.issues)),n.value[a.value]=d.value})):(c.issues.length&&n.issues.push(...Gd(l,c.issues)),n.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),_Z=pt("$ZodEnum",(e,t)=>{Vi.init(e,t);const n=ZE(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(s=>RK.has(typeof s)).map(s=>typeof s=="string"?Lf(s):s.toString()).join("|")})$`),e._zod.parse=(s,o)=>{const r=s.value;return i.has(r)||s.issues.push({code:"invalid_value",values:n,input:r,inst:e}),s}}),SZ=pt("$ZodLiteral",(e,t)=>{if(Vi.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Lf(i):i?Lf(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,s)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),MZ=pt("$ZodTransform",(e,t)=>{Vi.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new KE(e.constructor.name);const s=t.transform(n.value,n);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(r=>(n.value=r,n));if(s instanceof Promise)throw new df;return n.value=s,n}});function kA(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const fT=pt("$ZodOptional",(e,t)=>{Vi.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ui(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ui(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${k5(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>kA(o,n.value)):kA(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),IZ=pt("$ZodExactOptional",(e,t)=>{fT.init(e,t),ui(e._zod,"values",()=>t.innerType._zod.values),ui(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),EZ=pt("$ZodNullable",(e,t)=>{Vi.init(e,t),ui(e._zod,"optin",()=>t.innerType._zod.optin),ui(e._zod,"optout",()=>t.innerType._zod.optout),ui(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${k5(n.source)}|null)$`):void 0}),ui(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),TZ=pt("$ZodDefault",(e,t)=>{Vi.init(e,t),e._zod.optin="optional",ui(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>AA(o,t)):AA(s,t)}});function AA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const LZ=pt("$ZodPrefault",(e,t)=>{Vi.init(e,t),e._zod.optin="optional",ui(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),NZ=pt("$ZodNonOptional",(e,t)=>{Vi.init(e,t),ui(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>CA(o,e)):CA(s,e)}});function CA(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const FZ=pt("$ZodCatch",(e,t)=>{Vi.init(e,t),ui(e._zod,"optin",()=>t.innerType._zod.optin),ui(e._zod,"optout",()=>t.innerType._zod.optout),ui(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(r=>wu(r,i,Cu()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(o=>wu(o,i,Cu()))},input:n.value}),n.issues=[]),n)}}),BZ=pt("$ZodPipe",(e,t)=>{Vi.init(e,t),ui(e._zod,"values",()=>t.in._zod.values),ui(e._zod,"optin",()=>t.in._zod.optin),ui(e._zod,"optout",()=>t.out._zod.optout),ui(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(n,i);return o instanceof Promise?o.then(r=>N0(r,t.in,i)):N0(o,t.in,i)}const s=t.in._zod.run(n,i);return s instanceof Promise?s.then(o=>N0(o,t.out,i)):N0(s,t.out,i)}});function N0(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const $Z=pt("$ZodReadonly",(e,t)=>{Vi.init(e,t),ui(e._zod,"propValues",()=>t.innerType._zod.propValues),ui(e._zod,"values",()=>t.innerType._zod.values),ui(e._zod,"optin",()=>t.innerType?._zod?.optin),ui(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(wA):wA(s)}});function wA(e){return e.value=Object.freeze(e.value),e}const DZ=pt("$ZodCustom",(e,t)=>{ar.init(e,t),Vi.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,s=t.fn(i);if(s instanceof Promise)return s.then(o=>xA(o,n,i,e));xA(s,n,i,e)}});function xA(e,t,n,i){if(!e){const s={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),t.issues.push(Z1(s))}}var _A;class RZ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const s={...i,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function zZ(){return new RZ}(_A=globalThis).__zod_globalRegistry??(_A.__zod_globalRegistry=zZ());const Wh=globalThis.__zod_globalRegistry;function OZ(e,t){return new e({type:"string",...ln(t)})}function PZ(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ln(t)})}function SA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ln(t)})}function jZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ln(t)})}function HZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ln(t)})}function WZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ln(t)})}function qZ(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ln(t)})}function UZ(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ln(t)})}function KZ(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ln(t)})}function VZ(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ln(t)})}function ZZ(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ln(t)})}function GZ(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ln(t)})}function QZ(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ln(t)})}function YZ(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ln(t)})}function JZ(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ln(t)})}function XZ(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ln(t)})}function eG(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ln(t)})}function tG(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ln(t)})}function nG(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ln(t)})}function iG(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ln(t)})}function sG(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ln(t)})}function oG(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ln(t)})}function rG(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ln(t)})}function lG(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ln(t)})}function aG(e,t){return new e({type:"string",format:"date",check:"string_format",...ln(t)})}function uG(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ln(t)})}function cG(e,t){return new e({type:"string",format:"duration",check:"string_format",...ln(t)})}function dG(e,t){return new e({type:"number",checks:[],...ln(t)})}function fG(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ln(t)})}function hG(e,t){return new e({type:"boolean",...ln(t)})}function pG(e){return new e({type:"unknown"})}function gG(e,t){return new e({type:"never",...ln(t)})}function MA(e,t){return new oT({check:"less_than",...ln(t),value:e,inclusive:!1})}function G9(e,t){return new oT({check:"less_than",...ln(t),value:e,inclusive:!0})}function IA(e,t){return new rT({check:"greater_than",...ln(t),value:e,inclusive:!1})}function Q9(e,t){return new rT({check:"greater_than",...ln(t),value:e,inclusive:!0})}function EA(e,t){return new TV({check:"multiple_of",...ln(t),value:e})}function hT(e,t){return new NV({check:"max_length",...ln(t),maximum:e})}function km(e,t){return new FV({check:"min_length",...ln(t),minimum:e})}function pT(e,t){return new BV({check:"length_equals",...ln(t),length:e})}function mG(e,t){return new $V({check:"string_format",format:"regex",...ln(t),pattern:e})}function vG(e){return new DV({check:"string_format",format:"lowercase",...ln(e)})}function yG(e){return new RV({check:"string_format",format:"uppercase",...ln(e)})}function bG(e,t){return new zV({check:"string_format",format:"includes",...ln(t),includes:e})}function kG(e,t){return new OV({check:"string_format",format:"starts_with",...ln(t),prefix:e})}function AG(e,t){return new PV({check:"string_format",format:"ends_with",...ln(t),suffix:e})}function Hf(e){return new jV({check:"overwrite",tx:e})}function CG(e){return Hf(t=>t.normalize(e))}function wG(){return Hf(e=>e.trim())}function xG(){return Hf(e=>e.toLowerCase())}function _G(){return Hf(e=>e.toUpperCase())}function SG(){return Hf(e=>$K(e))}function MG(e,t,n){return new e({type:"array",element:t,...ln(n)})}function IG(e,t,n){return new e({type:"custom",check:"custom",fn:t,...ln(n)})}function EG(e){const t=TG(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(Z1(i,n.value,t._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(Z1(s))}},e(n.value,n)));return t}function TG(e,t){const n=new ar({check:"custom",...ln(t)});return n._zod.check=e,n}function gT(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Wh,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function ks(e,t,n={path:[],schemaPath:[]}){var i;const s=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;const r={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,r);const l=e._zod.toJSONSchema?.();if(l)r.schema=l;else{const c={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,r.schema,c);else{const f=r.schema,p=t.processors[s.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);p(e,t,f,c)}const d=e._zod.parent;d&&(r.ref||(r.ref=d),ks(d,t,c),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(r.schema,a),t.io==="input"&&Eo(e)&&(delete r.schema.examples,delete r.schema.default),t.io==="input"&&r.schema._prefault&&((i=r.schema).default??(i.default=r.schema._prefault)),delete r.schema._prefault,t.seen.get(e).schema}function mT(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const r of e.seen.entries()){const l=e.metadataRegistry.get(r[0])?.id;if(l){const a=i.get(l);if(a&&a!==r[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(l,r[0])}}const s=r=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(r[0])?.id,f=e.external.uri??(g=>g);if(d)return{ref:f(d)};const p=r[1].defId??r[1].schema.id??`schema${e.counter++}`;return r[1].defId=p,{defId:p,ref:`${f("__shared")}#/${l}/${p}`}}if(r[1]===n)return{ref:"#"};const u=`#/${l}/`,c=r[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:u+c}},o=r=>{if(r[1].schema.$ref)return;const l=r[1],{ref:a,defId:u}=s(r);l.def={...l.schema},u&&(l.defId=u);const c=l.schema;for(const d in c)delete c[d];c.$ref=a};if(e.cycles==="throw")for(const r of e.seen.entries()){const l=r[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root> - -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const r of e.seen.entries()){const l=r[1];if(t===r[0]){o(r);continue}if(e.external){const u=e.external.registry.get(r[0])?.id;if(t!==r[0]&&u){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id){o(r);continue}if(l.cycle){o(r);continue}if(l.count>1&&e.reused==="ref"){o(r);continue}}}function vT(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=r=>{const l=e.seen.get(r);if(l.ref===null)return;const a=l.def??l.schema,u={...a},c=l.ref;if(l.ref=null,c){i(c);const f=e.seen.get(c),p=f.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(p)):Object.assign(a,p),Object.assign(a,u),r._zod.parent===c)for(const m in a)m==="$ref"||m==="allOf"||m in u||delete a[m];if(p.$ref&&f.def)for(const m in a)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(a[m])===JSON.stringify(f.def[m])&&delete a[m]}const d=r._zod.parent;if(d&&d!==c){i(d);const f=e.seen.get(d);if(f?.schema.$ref&&(a.$ref=f.schema.$ref,f.def))for(const p in a)p==="$ref"||p==="allOf"||p in f.def&&JSON.stringify(a[p])===JSON.stringify(f.def[p])&&delete a[p]}e.override({zodSchema:r,jsonSchema:a,path:l.path??[]})};for(const r of[...e.seen.entries()].reverse())i(r[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const r=e.external.registry.get(t)?.id;if(!r)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(r)}Object.assign(s,n.def??n.schema);const o=e.external?.defs??{};for(const r of e.seen.entries()){const l=r[1];l.def&&l.defId&&(o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?s.$defs=o:s.definitions=o);try{const r=JSON.parse(JSON.stringify(s));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:Am(t,"input",e.processors),output:Am(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function Eo(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Eo(i.element,n);if(i.type==="set")return Eo(i.valueType,n);if(i.type==="lazy")return Eo(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Eo(i.innerType,n);if(i.type==="intersection")return Eo(i.left,n)||Eo(i.right,n);if(i.type==="record"||i.type==="map")return Eo(i.keyType,n)||Eo(i.valueType,n);if(i.type==="pipe")return Eo(i.in,n)||Eo(i.out,n);if(i.type==="object"){for(const s in i.shape)if(Eo(i.shape[s],n))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(Eo(s,n))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(Eo(s,n))return!0;return!!(i.rest&&Eo(i.rest,n))}return!1}const LG=(e,t={})=>n=>{const i=gT({...n,processors:t});return ks(e,i),mT(i,e),vT(i,e)},Am=(e,t,n={})=>i=>{const{libraryOptions:s,target:o}=i??{},r=gT({...s??{},target:o,io:t,processors:n});return ks(e,r),mT(r,e),vT(r,e)},NG={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},FG=(e,t,n,i)=>{const s=n;s.type="string";const{minimum:o,maximum:r,format:l,patterns:a,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(s.minLength=o),typeof r=="number"&&(s.maxLength=r),l&&(s.format=NG[l]??l,s.format===""&&delete s.format,l==="time"&&delete s.format),u&&(s.contentEncoding=u),a&&a.size>0){const c=[...a];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},BG=(e,t,n,i)=>{const s=n,{minimum:o,maximum:r,format:l,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof l=="string"&&l.includes("int")?s.type="integer":s.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=c,s.exclusiveMinimum=!0):s.exclusiveMinimum=c),typeof o=="number"&&(s.minimum=o,typeof c=="number"&&t.target!=="draft-04"&&(c>=o?delete s.minimum:delete s.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u),typeof r=="number"&&(s.maximum=r,typeof u=="number"&&t.target!=="draft-04"&&(u<=r?delete s.maximum:delete s.exclusiveMaximum)),typeof a=="number"&&(s.multipleOf=a)},$G=(e,t,n,i)=>{n.type="boolean"},DG=(e,t,n,i)=>{n.not={}},RG=(e,t,n,i)=>{},zG=(e,t,n,i)=>{const s=e._zod.def,o=ZE(s.entries);o.every(r=>typeof r=="number")&&(n.type="number"),o.every(r=>typeof r=="string")&&(n.type="string"),n.enum=o},OG=(e,t,n,i)=>{const s=e._zod.def,o=[];for(const r of s.values)if(r===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof r=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(r))}else o.push(r);if(o.length!==0)if(o.length===1){const r=o[0];n.type=r===null?"null":typeof r,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[r]:n.const=r}else o.every(r=>typeof r=="number")&&(n.type="number"),o.every(r=>typeof r=="string")&&(n.type="string"),o.every(r=>typeof r=="boolean")&&(n.type="boolean"),o.every(r=>r===null)&&(n.type="null"),n.enum=o},PG=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},jG=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},HG=(e,t,n,i)=>{const s=n,o=e._zod.def,{minimum:r,maximum:l}=e._zod.bag;typeof r=="number"&&(s.minItems=r),typeof l=="number"&&(s.maxItems=l),s.type="array",s.items=ks(o.element,t,{...i,path:[...i.path,"items"]})},WG=(e,t,n,i)=>{const s=n,o=e._zod.def;s.type="object",s.properties={};const r=o.shape;for(const u in r)s.properties[u]=ks(r[u],t,{...i,path:[...i.path,"properties",u]});const l=new Set(Object.keys(r)),a=new Set([...l].filter(u=>{const c=o.shape[u]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));a.size>0&&(s.required=Array.from(a)),o.catchall?._zod.def.type==="never"?s.additionalProperties=!1:o.catchall?o.catchall&&(s.additionalProperties=ks(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},qG=(e,t,n,i)=>{const s=e._zod.def,o=s.inclusive===!1,r=s.options.map((l,a)=>ks(l,t,{...i,path:[...i.path,o?"oneOf":"anyOf",a]}));o?n.oneOf=r:n.anyOf=r},UG=(e,t,n,i)=>{const s=e._zod.def,o=ks(s.left,t,{...i,path:[...i.path,"allOf",0]}),r=ks(s.right,t,{...i,path:[...i.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,a=[...l(o)?o.allOf:[o],...l(r)?r.allOf:[r]];n.allOf=a},KG=(e,t,n,i)=>{const s=n,o=e._zod.def;s.type="object";const r=o.keyType,a=r._zod.bag?.patterns;if(o.mode==="loose"&&a&&a.size>0){const c=ks(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=ks(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=ks(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const u=r._zod.values;if(u){const c=[...u].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(s.required=c)}},VG=(e,t,n,i)=>{const s=e._zod.def,o=ks(s.innerType,t,i),r=t.seen.get(e);t.target==="openapi-3.0"?(r.ref=s.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},ZG=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType},GG=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},QG=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},YG=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType;let r;try{r=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=r},JG=(e,t,n,i)=>{const s=e._zod.def,o=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;ks(o,t,i);const r=t.seen.get(e);r.ref=o},XG=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,n.readOnly=!0},yT=(e,t,n,i)=>{const s=e._zod.def;ks(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType},eQ=pt("ZodISODateTime",(e,t)=>{tZ.init(e,t),Gi.init(e,t)});function tQ(e){return lG(eQ,e)}const nQ=pt("ZodISODate",(e,t)=>{nZ.init(e,t),Gi.init(e,t)});function iQ(e){return aG(nQ,e)}const sQ=pt("ZodISOTime",(e,t)=>{iZ.init(e,t),Gi.init(e,t)});function oQ(e){return uG(sQ,e)}const rQ=pt("ZodISODuration",(e,t)=>{sZ.init(e,t),Gi.init(e,t)});function lQ(e){return cG(rQ,e)}const aQ=(e,t)=>{JE.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ZK(e,n)},flatten:{value:n=>VK(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,s3,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,s3,2)}},isEmpty:{get(){return e.issues.length===0}}})},Vr=pt("ZodError",aQ,{Parent:Error}),uQ=C5(Vr),cQ=w5(Vr),dQ=nv(Vr),fQ=iv(Vr),hQ=YK(Vr),pQ=JK(Vr),gQ=XK(Vr),mQ=eV(Vr),vQ=tV(Vr),yQ=nV(Vr),bQ=iV(Vr),kQ=sV(Vr),Zi=pt("ZodType",(e,t)=>(Vi.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Am(e,"input"),output:Am(e,"output")}}),e.toJSONSchema=LG(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone($u(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Du(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>uQ(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>dQ(e,n,i),e.parseAsync=async(n,i)=>cQ(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>fQ(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>hQ(e,n,i),e.decode=(n,i)=>pQ(e,n,i),e.encodeAsync=async(n,i)=>gQ(e,n,i),e.decodeAsync=async(n,i)=>mQ(e,n,i),e.safeEncode=(n,i)=>vQ(e,n,i),e.safeDecode=(n,i)=>yQ(e,n,i),e.safeEncodeAsync=async(n,i)=>bQ(e,n,i),e.safeDecodeAsync=async(n,i)=>kQ(e,n,i),e.refine=(n,i)=>e.check(pY(n,i)),e.superRefine=n=>e.check(gY(n)),e.overwrite=n=>e.check(Hf(n)),e.optional=()=>NA(e),e.exactOptional=()=>tY(e),e.nullable=()=>FA(e),e.nullish=()=>NA(FA(e)),e.nonoptional=n=>lY(e,n),e.array=()=>Jn(e),e.or=n=>KQ([e,n]),e.and=n=>GQ(e,n),e.transform=n=>BA(e,XQ(n)),e.default=n=>sY(e,n),e.prefault=n=>rY(e,n),e.catch=n=>uY(e,n),e.pipe=n=>BA(e,n),e.readonly=()=>fY(e),e.describe=n=>{const i=e.clone();return Wh.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return Wh.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Wh.get(e);const i=e.clone();return Wh.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),bT=pt("_ZodString",(e,t)=>{x5.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(i,s,o)=>FG(e,i,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(mG(...i)),e.includes=(...i)=>e.check(bG(...i)),e.startsWith=(...i)=>e.check(kG(...i)),e.endsWith=(...i)=>e.check(AG(...i)),e.min=(...i)=>e.check(km(...i)),e.max=(...i)=>e.check(hT(...i)),e.length=(...i)=>e.check(pT(...i)),e.nonempty=(...i)=>e.check(km(1,...i)),e.lowercase=i=>e.check(vG(i)),e.uppercase=i=>e.check(yG(i)),e.trim=()=>e.check(wG()),e.normalize=(...i)=>e.check(CG(...i)),e.toLowerCase=()=>e.check(xG()),e.toUpperCase=()=>e.check(_G()),e.slugify=()=>e.check(SG())}),AQ=pt("ZodString",(e,t)=>{x5.init(e,t),bT.init(e,t),e.email=n=>e.check(PZ(CQ,n)),e.url=n=>e.check(UZ(wQ,n)),e.jwt=n=>e.check(rG(zQ,n)),e.emoji=n=>e.check(KZ(xQ,n)),e.guid=n=>e.check(SA(TA,n)),e.uuid=n=>e.check(jZ(F0,n)),e.uuidv4=n=>e.check(HZ(F0,n)),e.uuidv6=n=>e.check(WZ(F0,n)),e.uuidv7=n=>e.check(qZ(F0,n)),e.nanoid=n=>e.check(VZ(_Q,n)),e.guid=n=>e.check(SA(TA,n)),e.cuid=n=>e.check(ZZ(SQ,n)),e.cuid2=n=>e.check(GZ(MQ,n)),e.ulid=n=>e.check(QZ(IQ,n)),e.base64=n=>e.check(iG($Q,n)),e.base64url=n=>e.check(sG(DQ,n)),e.xid=n=>e.check(YZ(EQ,n)),e.ksuid=n=>e.check(JZ(TQ,n)),e.ipv4=n=>e.check(XZ(LQ,n)),e.ipv6=n=>e.check(eG(NQ,n)),e.cidrv4=n=>e.check(tG(FQ,n)),e.cidrv6=n=>e.check(nG(BQ,n)),e.e164=n=>e.check(oG(RQ,n)),e.datetime=n=>e.check(tQ(n)),e.date=n=>e.check(iQ(n)),e.time=n=>e.check(oQ(n)),e.duration=n=>e.check(lQ(n))});function _t(e){return OZ(AQ,e)}const Gi=pt("ZodStringFormat",(e,t)=>{ji.init(e,t),bT.init(e,t)}),CQ=pt("ZodEmail",(e,t)=>{KV.init(e,t),Gi.init(e,t)}),TA=pt("ZodGUID",(e,t)=>{qV.init(e,t),Gi.init(e,t)}),F0=pt("ZodUUID",(e,t)=>{UV.init(e,t),Gi.init(e,t)}),wQ=pt("ZodURL",(e,t)=>{VV.init(e,t),Gi.init(e,t)}),xQ=pt("ZodEmoji",(e,t)=>{ZV.init(e,t),Gi.init(e,t)}),_Q=pt("ZodNanoID",(e,t)=>{GV.init(e,t),Gi.init(e,t)}),SQ=pt("ZodCUID",(e,t)=>{QV.init(e,t),Gi.init(e,t)}),MQ=pt("ZodCUID2",(e,t)=>{YV.init(e,t),Gi.init(e,t)}),IQ=pt("ZodULID",(e,t)=>{JV.init(e,t),Gi.init(e,t)}),EQ=pt("ZodXID",(e,t)=>{XV.init(e,t),Gi.init(e,t)}),TQ=pt("ZodKSUID",(e,t)=>{eZ.init(e,t),Gi.init(e,t)}),LQ=pt("ZodIPv4",(e,t)=>{oZ.init(e,t),Gi.init(e,t)}),NQ=pt("ZodIPv6",(e,t)=>{rZ.init(e,t),Gi.init(e,t)}),FQ=pt("ZodCIDRv4",(e,t)=>{lZ.init(e,t),Gi.init(e,t)}),BQ=pt("ZodCIDRv6",(e,t)=>{aZ.init(e,t),Gi.init(e,t)}),$Q=pt("ZodBase64",(e,t)=>{uZ.init(e,t),Gi.init(e,t)}),DQ=pt("ZodBase64URL",(e,t)=>{dZ.init(e,t),Gi.init(e,t)}),RQ=pt("ZodE164",(e,t)=>{fZ.init(e,t),Gi.init(e,t)}),zQ=pt("ZodJWT",(e,t)=>{pZ.init(e,t),Gi.init(e,t)}),kT=pt("ZodNumber",(e,t)=>{aT.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(i,s,o)=>BG(e,i,s),e.gt=(i,s)=>e.check(IA(i,s)),e.gte=(i,s)=>e.check(Q9(i,s)),e.min=(i,s)=>e.check(Q9(i,s)),e.lt=(i,s)=>e.check(MA(i,s)),e.lte=(i,s)=>e.check(G9(i,s)),e.max=(i,s)=>e.check(G9(i,s)),e.int=i=>e.check(LA(i)),e.safe=i=>e.check(LA(i)),e.positive=i=>e.check(IA(0,i)),e.nonnegative=i=>e.check(Q9(0,i)),e.negative=i=>e.check(MA(0,i)),e.nonpositive=i=>e.check(G9(0,i)),e.multipleOf=(i,s)=>e.check(EA(i,s)),e.step=(i,s)=>e.check(EA(i,s)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Jt(e){return dG(kT,e)}const OQ=pt("ZodNumberFormat",(e,t)=>{gZ.init(e,t),kT.init(e,t)});function LA(e){return fG(OQ,e)}const PQ=pt("ZodBoolean",(e,t)=>{mZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>$G(e,n,i)});function bp(e){return hG(PQ,e)}const jQ=pt("ZodUnknown",(e,t)=>{vZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>RG()});function Is(){return pG(jQ)}const HQ=pt("ZodNever",(e,t)=>{yZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>DG(e,n,i)});function WQ(e){return gG(HQ,e)}const qQ=pt("ZodArray",(e,t)=>{bZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>HG(e,n,i,s),e.element=t.element,e.min=(n,i)=>e.check(km(n,i)),e.nonempty=n=>e.check(km(1,n)),e.max=(n,i)=>e.check(hT(n,i)),e.length=(n,i)=>e.check(pT(n,i)),e.unwrap=()=>e.element});function Jn(e,t){return MG(qQ,e,t)}const UQ=pt("ZodObject",(e,t)=>{AZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>WG(e,n,i,s),ui(e,"shape",()=>t.shape),e.keyof=()=>Pi(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Is()}),e.loose=()=>e.clone({...e._zod.def,catchall:Is()}),e.strict=()=>e.clone({...e._zod.def,catchall:WQ()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>HK(e,n),e.safeExtend=n=>WK(e,n),e.merge=n=>qK(e,n),e.pick=n=>PK(e,n),e.omit=n=>jK(e,n),e.partial=(...n)=>UK(CT,e,n[0]),e.required=(...n)=>KK(wT,e,n[0])});function Dt(e,t){const n={type:"object",shape:e??{},...ln(t)};return new UQ(n)}const AT=pt("ZodUnion",(e,t)=>{dT.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>qG(e,n,i,s),e.options=t.options});function KQ(e,t){return new AT({type:"union",options:e,...ln(t)})}const VQ=pt("ZodDiscriminatedUnion",(e,t)=>{AT.init(e,t),CZ.init(e,t)});function Ru(e,t,n){return new VQ({type:"union",options:t,discriminator:e,...ln(n)})}const ZQ=pt("ZodIntersection",(e,t)=>{wZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>UG(e,n,i,s)});function GQ(e,t){return new ZQ({type:"intersection",left:e,right:t})}const QQ=pt("ZodRecord",(e,t)=>{xZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>KG(e,n,i,s),e.keyType=t.keyType,e.valueType=t.valueType});function _5(e,t,n){return new QQ({type:"record",keyType:e,valueType:t,...ln(n)})}const r3=pt("ZodEnum",(e,t)=>{_Z.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(i,s,o)=>zG(e,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,s)=>{const o={};for(const r of i)if(n.has(r))o[r]=t.entries[r];else throw new Error(`Key ${r} not found in enum`);return new r3({...t,checks:[],...ln(s),entries:o})},e.exclude=(i,s)=>{const o={...t.entries};for(const r of i)if(n.has(r))delete o[r];else throw new Error(`Key ${r} not found in enum`);return new r3({...t,checks:[],...ln(s),entries:o})}});function Pi(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new r3({type:"enum",entries:n,...ln(t)})}const YQ=pt("ZodLiteral",(e,t)=>{SZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>OG(e,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function xn(e,t){return new YQ({type:"literal",values:Array.isArray(e)?e:[e],...ln(t)})}const JQ=pt("ZodTransform",(e,t)=>{MZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>jG(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new KE(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(Z1(o,n.value,t));else{const r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(Z1(r))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(o=>(n.value=o,n)):(n.value=s,n)}});function XQ(e){return new JQ({type:"transform",transform:e})}const CT=pt("ZodOptional",(e,t)=>{fT.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>yT(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function NA(e){return new CT({type:"optional",innerType:e})}const eY=pt("ZodExactOptional",(e,t)=>{IZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>yT(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function tY(e){return new eY({type:"optional",innerType:e})}const nY=pt("ZodNullable",(e,t)=>{EZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>VG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function FA(e){return new nY({type:"nullable",innerType:e})}const iY=pt("ZodDefault",(e,t)=>{TZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>GG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sY(e,t){return new iY({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():QE(t)}})}const oY=pt("ZodPrefault",(e,t)=>{LZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>QG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function rY(e,t){return new oY({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():QE(t)}})}const wT=pt("ZodNonOptional",(e,t)=>{NZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>ZG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function lY(e,t){return new wT({type:"nonoptional",innerType:e,...ln(t)})}const aY=pt("ZodCatch",(e,t)=>{FZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>YG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function uY(e,t){return new aY({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const cY=pt("ZodPipe",(e,t)=>{BZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>JG(e,n,i,s),e.in=t.in,e.out=t.out});function BA(e,t){return new cY({type:"pipe",in:e,out:t})}const dY=pt("ZodReadonly",(e,t)=>{$Z.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>XG(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function fY(e){return new dY({type:"readonly",innerType:e})}const hY=pt("ZodCustom",(e,t)=>{DZ.init(e,t),Zi.init(e,t),e._zod.processJSONSchema=(n,i,s)=>PG(e,n)});function pY(e,t={}){return IG(hY,e,t)}function gY(e){return EG(e)}const Kc=_t().min(1),S5=_t().min(1),kp=_t().min(1),Vc=_t().min(1),Sr=_t().min(1),mY=/^[A-Za-z0-9._-]{1,128}$/;function vY(e){return mY.test(e)&&e!=="."&&e!==".."}const xT=Ru("kind",[Dt({kind:xn("user"),payload:Is().optional()}),Dt({kind:xn("cron"),taskId:Vc.optional(),payload:Is().optional()}),Dt({kind:xn("task"),taskId:Vc,payload:Is().optional()}),Dt({kind:xn("hook"),payload:Is().optional()}),Dt({kind:xn("compaction"),payload:Is().optional()}),Dt({kind:xn("side"),payload:Is().optional()}),Dt({kind:xn("other"),payload:Is().optional()})]),yY=Dt({inputTokens:Jt().optional(),outputTokens:Jt().optional(),cachedTokens:Jt().optional(),cost:Jt().optional()}),d1=Dt({inputOther:Jt(),output:Jt(),inputCacheRead:Jt(),inputCacheCreation:Jt()}),bY=Dt({llmFirstTokenLatencyMs:Jt().optional(),llmStreamDurationMs:Jt().optional(),llmRequestBuildMs:Jt().optional(),llmServerFirstTokenMs:Jt().optional(),llmServerDecodeMs:Jt().optional(),llmClientConsumeMs:Jt().optional()}),kY=Dt({failedAttempt:Jt(),nextAttempt:Jt(),maxAttempts:Jt(),delayMs:Jt(),errorName:_t(),errorMessage:_t(),statusCode:Jt().optional()}),_T=Pi(["queued","running","completed","failed","cancelled"]),AY=Pi(["running","completed","interrupted","failed"]),CY=Dt({kind:xn("text"),frameId:kp,role:Pi(["assistant","user"]),text:_t(),attachmentIds:Jn(_t()).optional(),taskId:Vc.optional()}),wY=Dt({kind:xn("thinking"),frameId:kp,text:_t()}),xY=Dt({agentId:Sr,role:Pi(["child","member"]).optional()}),_Y=Dt({kind:Pi(["stdout","stderr","progress","status","custom"]),text:_t().optional(),percent:Jt().optional(),customKind:_t().optional(),customData:Is().optional()}),SY=Dt({kind:xn("tool"),frameId:kp,toolCallId:_t(),name:_t(),view:_t().optional(),state:Pi(["running","done","error"]),input:Is().optional(),output:Is().optional(),display:Is().optional(),error:_t().optional(),inputText:_t().optional(),progress:_Y.optional(),taskId:Vc.optional(),approvalId:_t().optional(),todoId:_t().optional(),agentRefs:Jn(xY).optional()}),M5=Dt({interactionId:_t(),interactionKind:Pi(["approval","question"]),toolCallId:_t().optional(),state:Pi(["pending","approved","rejected","cancelled","answered","dismissed"]),request:Is().optional(),response:Is().optional()}),MY=Dt({kind:xn("notice"),frameId:kp,level:Pi(["error","warning","info"]),source:_t().optional(),message:_t(),detail:Is().optional()}),ST=Ru("kind",[CY,wY,SY,MY]),MT=Dt({kind:xn("step"),stepId:S5,turnId:Kc,ordinal:Jt().int(),state:AY,frames:Jn(ST),startedAt:_t().optional(),endedAt:_t().optional(),usage:d1.optional(),finishReason:_t().optional(),timing:bY.optional(),retry:kY.optional(),endReason:_t().optional(),endMessage:_t().optional()}),IT=Dt({kind:xn("turn"),turnId:Kc,ordinal:Jt().int(),state:_T,origin:xT,prompt:_t().optional(),attachmentIds:Jn(_t()).optional(),steps:Jn(MT),startedAt:_t().optional(),endedAt:_t().optional(),usage:yY.optional(),durationMs:Jt().optional(),error:_t().optional()}),ET=Dt({kind:xn("marker"),markerId:_t(),marker:_t(),payload:Is().optional(),at:_t().optional()}),TT=Dt({kind:xn("taskref"),refId:_t(),taskId:Vc,at:_t().optional()}),LT=Ru("kind",[IT,ET,TT]),I5=Dt({taskId:Vc,kind:Pi(["shell","subagent","tool","other"]),state:Pi(["running","completed","failed","timed_out","killed","lost"]),detached:bp(),description:_t().optional(),agentId:Sr.optional(),outputTail:_t(),startedAt:_t().optional(),endedAt:_t().optional(),resultSummary:_t().optional(),error:_t().optional(),stateReason:_t().optional(),usage:d1.optional()}),IY=Dt({objective:_t(),status:Pi(["active","paused","blocked","complete"]),completionCriterion:_t().optional(),budgetUsed:Jt().optional(),budgetLimit:Jt().optional()}),EY=Dt({plan:Dt({reviewPath:_t().optional(),version:Jt().optional()}).optional(),swarm:Dt({trigger:_t().optional()}).optional()}),TY=Dt({plan:Dt({reviewPath:_t().optional(),version:Jt().optional()}).nullable().optional(),swarm:Dt({trigger:_t().optional()}).nullable().optional()}),LY=Ru("kind",[Dt({kind:xn("idle")}),Dt({kind:xn("running"),turnId:Jt(),step:Jt(),stepId:_t(),since:Jt()}),Dt({kind:xn("streaming"),turnId:Jt(),step:Jt(),stepId:_t(),stream:Pi(["assistant","thinking","tool_call"]),toolCallId:_t().optional(),toolName:_t().optional(),since:Jt()}),Dt({kind:xn("tool_call"),turnId:Jt(),step:Jt(),toolCallId:_t(),name:_t(),since:Jt()}),Dt({kind:xn("retrying"),turnId:Jt(),step:Jt(),stepId:_t(),failedAttempt:Jt(),nextAttempt:Jt(),maxAttempts:Jt(),delayMs:Jt(),errorName:_t().optional(),statusCode:Jt().optional(),since:Jt()}),Dt({kind:xn("awaiting_approval"),turnId:Jt(),step:Jt().optional(),approval:Is().optional(),since:Jt()}),Dt({kind:xn("interrupted"),turnId:Jt(),step:Jt().optional(),reason:Pi(["aborted","max_steps","error"]),message:_t().optional(),at:Jt()}),Dt({kind:xn("ended"),turnId:Jt(),reason:Pi(["completed","cancelled","failed","blocked"]),durationMs:Jt().optional(),at:Jt()})]),NY=Dt({byModel:_5(_t(),d1).optional(),currentTurn:d1.optional(),total:d1.optional()}),FY=Dt({model:_t().optional(),thinkingEffort:_t().optional(),usage:NY.optional(),contextTokens:Jt().optional(),maxContextTokens:Jt().optional(),contextUsage:Jt().optional(),permission:Pi(["manual","yolo","auto"]).optional(),phase:LY.optional()}),E5=Dt({goal:IY.optional(),modes:EY.optional(),activity:Pi(["idle","turn","disposing","unknown"]).optional(),agent:FY.optional()}),BY=E5.extend({modes:TY.optional()}),ov=Dt({attachmentId:_t(),mediaType:_t(),name:_t().optional(),size:Jt().optional(),source:Ru("kind",[Dt({kind:xn("url"),url:_t()}),Dt({kind:xn("file"),fileId:_t()})]).optional(),placeholder:_t().optional()}),$Y=Dt({title:_t(),status:Pi(["pending","in_progress","done"])}),T5=Dt({todoId:_t(),items:Jn($Y),updatedAt:_t().optional()}),L5=Dt({promptId:_t(),status:Pi(["running","queued","blocked","completed","failed","aborted"]),userMessageId:_t().optional(),content:Is().optional(),createdAt:_t(),finishedAt:_t().optional(),steeredAt:_t().optional()}),NT=Dt({items:Jn(LT),tasks:Jn(I5),interactions:Jn(M5).default([]),attachments:Jn(ov).default([]),todos:Jn(T5).default([]),prompts:Jn(L5).default([]),meta:E5,hasMoreOlder:bp().optional()}),DY=IT.omit({steps:!0}),RY=MT.omit({frames:!0}),zY=Ru("type",[Dt({type:xn("frame"),turnId:Kc,stepId:S5,frameId:kp}),Dt({type:xn("task"),taskId:Vc})]),N5=Ru("op",[Dt({op:xn("reset"),agentId:Sr,snapshot:NT}),Dt({op:xn("turn.upsert"),turn:DY}),Dt({op:xn("step.upsert"),turnId:Kc,step:RY}),Dt({op:xn("frame.upsert"),turnId:Kc,stepId:S5,frame:ST}),Dt({op:xn("append"),target:zY,offset:Jt().int().nonnegative(),text:_t()}),Dt({op:xn("marker.upsert"),item:ET,beforeTurn:Jt().int().optional()}),Dt({op:xn("taskref.upsert"),item:TT,beforeTurn:Jt().int().optional()}),Dt({op:xn("task.upsert"),task:I5}),Dt({op:xn("interaction.upsert"),interaction:M5}),Dt({op:xn("attachment.upsert"),attachment:ov}),Dt({op:xn("todo.upsert"),todo:T5}),Dt({op:xn("prompt.upsert"),prompt:L5}),Dt({op:xn("meta.merge"),meta:BY}),Dt({op:xn("items.remove"),ids:Jn(_t())})]);Dt({agentId:Sr,ops:Jn(N5)});const OY=Pi(["off","turn","block","delta"]),Nf=Jt().int().nonnegative(),PY=_5(_t(),OY);Dt({session_id:_t().min(1),transcript:PY,transcript_since:_5(_t(),Nf).optional()});Dt({agent_id:Sr,before_turn:_t().min(1).optional(),after_turn:_t().min(1).optional(),page_size:Jt().int().min(1).max(100).optional()}).superRefine((e,t)=>{e.before_turn!==void 0&&e.after_turn!==void 0&&t.addIssue({code:"custom",message:"before_turn and after_turn are mutually exclusive",path:["before_turn"]}),vY(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const jY=Dt({agentId:Sr,type:Pi(["main","sub","independent"]).optional(),parentAgentId:Sr.optional(),label:_t().optional(),createdAt:_t().optional(),disposedAt:_t().optional()}),HY=Dt({agent_id:Sr,items:Jn(LT),has_more:bp(),tasks:Jn(I5),interactions:Jn(M5).default([]),attachments:Jn(ov).default([]),todos:Jn(T5).default([]),prompts:Jn(L5).default([]),meta:E5,agents:Jn(jY),pending_interactions:Jn(_t()),seq:Nf.optional()});Dt({agent_id:Sr,batches:Jn(Dt({seq:Nf,ops:Jn(N5)})),latest_seq:Nf,complete:bp()});const WY=Dt({turn_id:Kc,ordinal:Jt().int(),state:_T,origin:xT,prompt:_t(),attachment_ids:Jn(_t()).optional(),started_at:_t().optional()});Dt({agents:Jn(Dt({agent_id:Sr,messages:Jn(WY),attachments:Jn(ov).default([])}))});const qY=Dt({state:Pi(["pending","approved","rejected","cancelled"]),selected_option:_t().optional(),feedback:_t().optional()}),UY=Dt({tool_call_id:_t(),turn_id:Kc,source:Pi(["interaction","display","output"]),plan:_t(),path:_t().optional(),options:Jn(Dt({label:_t(),description:_t().optional()})).optional(),review:qY.optional()});Dt({agent_id:Sr,plans:Jn(UY)});const KY=Dt({agent_id:Sr,snapshot:NT,has_more_older:bp(),seq:Nf.optional()}),VY=Dt({agent_id:Sr,ops:Jn(N5),seq:Nf.optional()}),FT=KY.extend({type:xn("transcript.reset")}),BT=VY.extend({type:xn("transcript.ops")});Ru("type",[FT,BT]);const $A=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.call.started","tool.use","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.submitted","prompt.completed","prompt.aborted","session.meta.updated","compaction.started","compaction.completed","compaction.cancelled","goal.updated","error","warning","subagent.spawned","subagent.started","subagent.suspended","subagent.completed","subagent.failed","task.started","task.terminated","background.task.started","background.task.terminated","cron.fired"]),ZY=new Set(["session.created","session.updated","session.deleted","session.status_changed","session.usage_updated","session.history_compacted","message.created","message.updated","approval.requested","approval.resolved","approval.expired","question.requested","question.answered","question.dismissed","task.created","task.progress","task.completed","assistant.tool_use_started","assistant.tool_use_delta","assistant.tool_use_completed","assistant.completed","tool.started","tool.output","tool.completed"]),GY=new Set(["server_hello","ack","ping","resync_required","error","pong"]),QY=new Set(["assistant.delta","thinking.delta"]);function YY(e,t){if(GY.has(e))return{route:"ignore"};const n=e.startsWith("event."),i=n?e.slice(6):e;return QY.has(i)?JY(t)?{route:"agent",agentType:i}:{route:"protocol"}:n?ZY.has(i)?{route:"protocol"}:$A.has(i)?{route:"agent",agentType:i}:{route:"protocol"}:$A.has(i)?{route:"agent",agentType:i}:{route:"agent",agentType:i}}function JY(e){if(!e||typeof e!="object")return!1;const t=e;return"message_id"in t||"content_index"in t?!1:typeof t.delta=="string"}const XY="kimi-code.bearer.",eJ=3e4;class tJ{constructor(t){this.opts=t,this.tracer=t.tracer??g5}ws=null;connected=!1;closed=!1;subscriptions=new Map;transcriptSubscriptions=new Map;sideChannelAgents=new Map;pendingSubscriptions=[];terminalAttachments=new Map;msgSeq=0;clientHelloId=null;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;tracer;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),this.tracer.wsEvent?.({kind:"lifecycle",event:"connect",detail:{url:this.opts.wsUrl,attempt:this.reconnectAttempts}});const t=this.opts.credentialStore?.getToken(),n=t!==void 0?[`${XY}${t}`]:void 0,i=new WebSocket(this.opts.wsUrl,n);this.ws=i,i.onopen=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"open"})},i.onmessage=s=>{this.lastActivityAt=Date.now();try{const o=JSON.parse(String(s.data));this.tracer.wsEvent?.({kind:"in",frame:o}),this.handleFrame(o)}catch(o){this.tracer.wsEvent?.({kind:"lifecycle",event:"parse-error",detail:{error:String(o)}}),this.opts.handlers.onError(0,`Failed to parse WS frame: ${String(o)}`,!1)}},i.onerror=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"error"}),this.opts.handlers.onError(0,"WebSocket error",!1)},i.onclose=s=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"close",detail:s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0}),this.connected=!1,this.ws=null,this.opts.handlers.onConnectionState(!1),this.scheduleReconnect()}}scheduleReconnect(){if(this.closed||this.reconnectTimer!==null)return;const n=Math.min(3e4,1e3*2**this.reconnectAttempts)+Math.floor(Math.random()*250);this.reconnectAttempts+=1,this.tracer.wsEvent?.({kind:"lifecycle",event:"reconnect-scheduled",detail:{delayMs:n,attempt:this.reconnectAttempts}}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}subscribe(t,n={seq:0}){if(this.subscriptions.set(t,{...n}),this.connected)this.sendSubscribe([t],{[t]:n});else{const i=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);i!==-1&&this.pendingSubscriptions.splice(i,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(i=>i.sessionId===t);n!==-1&&this.pendingSubscriptions.splice(n,1),this.connected&&this.ws&&this.send({type:"unsubscribe",id:this.nextId(),payload:{session_ids:[t]}})}subscribeTranscript(t,n,i){this.transcriptSubscriptions.set(t,{agentId:n,...i!==void 0?{sinceSeq:i}:{}}),this.connected&&this.sendTranscriptSubscribe(t,n,i)}unsubscribeTranscript(t,n){const i=this.transcriptSubscriptions.get(t);(n===void 0||i===void 0||n.includes(i.agentId))&&this.transcriptSubscriptions.delete(t),!(!this.connected||!this.ws)&&this.send({type:"unsubscribe_v2",id:this.nextId(),payload:{session_id:t,...n!==void 0?{agent_ids:n}:{}}})}markSideChannelAgent(t,n){if(!this.opts.mainAgentOnly)return;let i=this.sideChannelAgents.get(t);if(i===void 0&&(i=new Set,this.sideChannelAgents.set(t,i)),i.has(n))return;i.add(n);const s=this.subscriptions.get(t);this.connected&&s!==void 0&&this.sendSubscribe([t],{[t]:s})}abort(t,n){!this.connected||!this.ws||this.send({type:"abort",id:this.nextId(),payload:{session_id:t,prompt_id:n}})}terminalAttach(t,n,i){const s=B0(t,n),o=this.terminalAttachments.get(s),r=i??o?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:r}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,r)}terminalInput(t,n,i){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:i}})}terminalResize(t,n,i,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:i,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(B0(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_detach",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}terminalClose(t,n){this.terminalAttachments.delete(B0(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_close",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}close(){this.closed=!0,this.connected=!1,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(1e3),this.ws=null)}health(){const t=this.ws!==null&&this.ws.readyState===WebSocket.OPEN,n=Math.max(this.heartbeatMs*2,eJ),i=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:i}}reconnect(){if(this.closed)return;this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;if(t!==null){t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null;try{t.close(1e3,"reconnect")}catch{}}const n=this.connected;this.ws=null,this.connected=!1,n&&this.opts.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,i=t.type;if(i==="transcript.reset"){const s=FT.safeParse({type:i,...n.payload}),o=n.session_id;if(!s.success||typeof o!="string"){this.opts.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const r=s.data;this.opts.handlers.onTranscriptReset?.(o,r.agent_id,{...r.snapshot,hasMoreOlder:r.has_more_older},r.seq);const l=this.transcriptSubscriptions.get(o);l?.agentId===r.agent_id&&r.seq!==void 0&&(l.sinceSeq=r.seq);return}if(i==="transcript.ops"){const s=BT.safeParse({type:i,...n.payload}),o=n.session_id;if(!s.success||typeof o!="string"){this.opts.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const r=s.data,l=this.opts.handlers.onTranscriptOps?.(o,r.agent_id,r.ops,r.seq),a=this.transcriptSubscriptions.get(o);l!==!1&&a?.agentId===r.agent_id&&r.seq!==void 0&&(a.sinceSeq=r.seq);return}switch(i){case"server_hello":{const s=n.payload?.heartbeat_ms;typeof s=="number"&&s>0&&(this.heartbeatMs=s),this.onServerHello();break}case"ping":this.send({type:"pong",payload:{nonce:n.payload.nonce}});break;case"resync_required":{const s=n.payload.session_id,o=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:o}),this.opts.handlers.onResync(s,n.payload.current_seq,o);break}case"error":{const s=n.session_id;typeof s=="string"&&this.opts.handlers.onRawAgentEvent?this.opts.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.opts.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":n.id===this.clientHelloId&&(this.clientHelloId=null,n.code===0&&this.opts.handlers.onReplayComplete?.());break;case"terminal_output":{const s=n.session_id,o=n.terminal_id,r=n.seq,l=B0(s,o),a=this.terminalAttachments.get(l);a&&this.terminalAttachments.set(l,{...a,lastSeq:Math.max(a.lastSeq,r)});const u=typeof n.payload?.data=="string"?n.payload.data:"";this.opts.handlers.onTerminalOutput?.(s,o,u,r);break}case"terminal_exit":{const s=n.session_id,o=n.terminal_id,r=n.payload?.exit_code,l=typeof r=="number"?r:null;this.opts.handlers.onTerminalExit?.(s,o,l);break}default:{this.trackCursor(n);const s=n.type,o=YY(s,n.payload);if(o.route==="protocol"){this.opts.handlers.onWireEvent(n);break}if(o.route==="agent"){if(this.opts.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const r=n,l=n;this.opts.handlers.onRawAgentEvent({type:o.agentType,seq:r.seq,session_id:r.session_id,timestamp:r.timestamp,payload:r.payload,...l.volatile!==void 0?{volatile:l.volatile}:{},...l.offset!==void 0?{offset:l.offset}:{}})}break}break}}}onServerHello(){this.connected=!0,this.reconnectAttempts=0,this.opts.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const s of this.pendingSubscriptions)this.subscriptions.set(s.sessionId,s.cursor),t.includes(s.sessionId)||t.push(s.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[s,o]of this.subscriptions.entries())n[s]=o;const i=this.nextId();this.clientHelloId=i,this.send({type:"client_hello",id:i,payload:{client_id:this.opts.clientId,subscriptions:t,cursors:n,...this.opts.mainAgentOnly?{agent_filter:this.rawAgentFilter(t)}:{}}});for(const[s,o]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(s,o.agentId,o.sinceSeq);for(const s of this.terminalAttachments.values())this.sendTerminalAttach(s.sessionId,s.terminalId,s.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n,...this.opts.mainAgentOnly?{agent_filter:this.rawAgentFilter(t)}:{}}})}rawAgentFilter(t){return Object.fromEntries(t.map(n=>[n,["main",...this.sideChannelAgents.get(n)??[]]]))}sendTranscriptSubscribe(t,n,i){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...i!==void 0?{transcript_since:{[n]:i}}:{}}})}sendTerminalAttach(t,n,i){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:i>0?i:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,i=t.seq;if(typeof n!="string"||typeof i!="number")return;const s=this.subscriptions.get(n);if(!s||i<=s.seq&&s.epoch!==void 0)return;const o=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(i,s.seq),epoch:o})}send(t){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN))try{this.ws.send(JSON.stringify(t)),this.tracer.wsEvent?.({kind:"out",frame:t})}catch{}}nextId(){return`c_${++this.msgSeq}`}}function B0(e,t){return`${e}\0${t}`}async function nJ(e,t,n){const i=await e.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=HY.parse(i),o={items:s.items,tasks:s.tasks,interactions:s.interactions,attachments:s.attachments,todos:s.todos,prompts:s.prompts,meta:s.meta,hasMoreOlder:s.has_more};return{agentId:s.agent_id,...o,agents:s.agents,pendingInteractions:s.pending_interactions,...s.seq!==void 0?{seq:s.seq}:{}}}const Y9=10485760,iJ=40001;function sJ(e,t){if(e===void 0)return t;let n;const i=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(i!==void 0)try{n=decodeURIComponent(i.replaceAll(/^"|"$/g,""))}catch{return t}else n=/filename\s*=\s*"([^"]*)"/i.exec(e)?.[1]??/filename\s*=\s*([^;]+)/i.exec(e)?.[1]?.trim();return n===void 0||n.length===0||n.length>200||n==="."||n===".."||/[\u0000-\u001F\u007F/\\]/.test(n)||!n.toLowerCase().endsWith(".zip")?t:n}function DA(e){if(typeof e!="object"||e===null)return{errorName:typeof e};const t=e;return{errorName:typeof t.name=="string"?t.name:"Error",errorCode:typeof t.code=="number"?t.code:void 0,requestId:typeof t.requestId=="string"?t.requestId:void 0,phase:typeof t.phase=="string"?t.phase:void 0,httpStatus:typeof t.status=="number"?t.status:void 0}}function J9(e){return{id:e.id,sessionId:e.session_id,cwd:e.cwd,shell:e.shell,cols:e.cols,rows:e.rows,status:e.status,createdAt:e.created_at,exitedAt:e.exited_at,exitCode:e.exit_code}}function RA(e){return e==="auto_compact"||e==="manual_compact"}class oJ{constructor(t){this.opts=t,this.tracer=t.tracer??g5,this.http=new aA({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore}),this.httpV2=new aA({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore,restBasePath:"/api/v2"})}http;httpV2;tracer;async getHealth(){return{status:"ok",uptimeSec:(await this.http.get("/healthz")).uptime_sec??0}}async getMeta(){const t=await this.http.get("/meta");return{serverVersion:t.server_version,serverId:t.server_id,startedAt:t.started_at,capabilities:t.capabilities,openInApps:Array.isArray(t.open_in_apps)?t.open_in_apps:[],dangerousBypassAuth:t.dangerous_bypass_auth===!0,experimentalFlags:t.experimental_flags??{},backend:t.backend==="v2"?"v2":"v1",webTitle:t.web_title??""}}async listSessions(t){const n={before_id:t?.beforeId,after_id:t?.afterId,page_size:t?.pageSize,busy:t?.busy,include_archive:t?.includeArchive,archived_only:t?.archivedOnly,exclude_empty:t?.excludeEmpty,workspace_id:t?.workspaceId},i=await this.http.get("/sessions",n);return{items:i.items.map(Yr),hasMore:i.has_more}}async listSessionsV2(t){const n={sort:t?.sort,page_size:t?.pageSize,page_token:t?.pageToken,"meta.updated_after":t?.updatedAfter,"meta.archived":t?.archived===void 0?void 0:String(t.archived),include:t?.include,"workspace.id":t?.workspaceIds,"activity.status":t?.statuses},i=await this.httpV2.get("/sessions",n);return{items:i.items,hasMore:i.has_more,nextPageToken:i.next_page_token}}async createSession(t){const n={metadata:t.cwd!==void 0?{cwd:t.cwd}:{}};t.workspaceId!==void 0&&(n.workspace_id=t.workspaceId),t.title!==void 0&&(n.title=t.title),t.model!==void 0&&(n.agent_config={model:t.model});const i=await this.http.post("/sessions",n);return Yr(i)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return Yr(n)}async updateSession(t,n){const i={};n.title!==void 0&&(i.title=n.title),n.cwd!==void 0&&(i.metadata={cwd:n.cwd});const s={};n.model!==void 0&&(s.model=n.model),n.permissionMode!==void 0&&(s.permission_mode=n.permissionMode),n.planMode!==void 0&&(s.plan_mode=n.planMode),n.swarmMode!==void 0&&(s.swarm_mode=n.swarmMode),n.goalObjective!==void 0&&(s.goal_objective=n.goalObjective),n.goalControl!==void 0&&(s.goal_control=n.goalControl),n.thinking!==void 0&&(s.thinking=n.thinking),Object.keys(s).length>0&&(i.agent_config=s);const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,i);return Yr(o)}async getSessionStatus(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/status`);return{model:n.model&&n.model.length>0?n.model:null,thinkingEffort:n.thinking_level,permission:n.permission,planMode:n.plan_mode===!0,swarmMode:n.swarm_mode===!0,contextTokens:n.context_tokens??0,maxContextTokens:n.max_context_tokens??0,contextUsage:n.context_usage??0}}async getSessionGoal(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/goal`);return WE(n)}async getSessionPlans(t,n){const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript/plan`,{agent_id:n.agentId,tool_call_id:n.toolCallId});return i.plans.map(s=>({agentId:i.agent_id,toolCallId:s.tool_call_id,turnId:s.turn_id,source:s.source,plan:s.plan,...s.path!==void 0?{path:s.path}:{},...s.options!==void 0?{options:s.options.map(o=>({label:o.label,...o.description!==void 0?{description:o.description}:{}}))}:{},...s.review!==void 0?{review:{state:s.review.state,...s.review.selected_option!==void 0?{selectedOption:s.review.selected_option}:{},...s.review.feedback!==void 0?{feedback:s.review.feedback}:{}}}:{}}))}async getSessionWarnings(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/warnings`)).warnings??[]}async archiveSession(t){return await this.http.post(`/sessions/${encodeURIComponent(t)}:archive`,{})}async restoreSession(t){const n=await this.http.post(`/sessions/${encodeURIComponent(t)}:restore`,{});return Yr(n)}async listMessages(t,n){const i={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,i);return{items:s.items.map(t3),hasMore:s.has_more}}async getSessionSnapshot(t){const n=Date.now();this.tracer.traceKeyEvent?.("session:snapshot:start",{sessionId:t});try{const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:i.as_of_seq,epoch:i.epoch,session:Yr(i.session),messages:i.messages.items.map(t3),hasMoreMessages:i.messages.has_more,inFlightTurn:i.in_flight_turn===null?null:{turnId:i.in_flight_turn.turn_id,assistantText:i.in_flight_turn.assistant_text,thinkingText:i.in_flight_turn.thinking_text,runningTools:i.in_flight_turn.running_tools.map(o=>({toolCallId:o.tool_call_id,name:o.name,args:o.args,description:o.description,lastProgress:o.last_progress})),promptId:i.in_flight_turn.current_prompt_id},pendingApprovals:i.pending_approvals.map(jE),pendingQuestions:i.pending_questions.map(HE),subagents:(i.subagents??[]).map(o=>Ag(o,o.id))};return this.tracer.traceKeyEvent?.("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(i){throw this.tracer.traceKeyEvent?.("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...DA(i)}),i}}async getSessionTranscript(t,n){return nJ(this.http,t,n)}async exportSession(t,n,i){const s=n===void 0?0:new TextEncoder().encode(n).byteLength,o=n===void 0||n.length===0?0:n.split(` -`).length,r=`/sessions/${encodeURIComponent(t)}/export`,l={web_log_bytes:s,web_log_entries:o},a=i?.desktop===!0;let u;try{u=await this.http.postZip(r,{web_log:n,...a?{desktop:!0}:{}},l)}catch(d){if(a&&Ps(d)&&d.code===iJ)u=await this.http.postZip(r,{web_log:n},l);else throw d}const c=`${t}.zip`;return{blob:u.blob,fileName:sJ(u.contentDisposition,c)}}async submitPrompt(t,n){const i=Date.now();this.tracer.traceKeyEvent?.("prompt:start",{sessionId:t,contentCount:n.content.length,mediaCount:n.content.filter(s=>s.type==="image"||s.type==="video"||s.type==="file").length});try{const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts`,JU(n));return this.tracer.traceKeyEvent?.("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-i}),{promptId:s.prompt_id,userMessageId:s.user_message_id,status:s.status}}catch(s){throw this.tracer.traceKeyEvent?.("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-i,...DA(s)}),s}}async steerPrompts(t,n){const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:i.steered,promptIds:i.prompt_ids}}async abortPrompt(t,n){const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:i.aborted,atSeq:i.at_seq}}async abortSession(t){return{aborted:(await this.http.post(`/sessions/${encodeURIComponent(t)}:abort`,{})).aborted}}async compactSession(t,n){await this.http.post(`/sessions/${encodeURIComponent(t)}:compact`,n?{instruction:n}:{})}async undoSession(t,n=1){await this.http.post(`/sessions/${encodeURIComponent(t)}:undo`,{count:n})}async generateSessionTitle(t,n){try{const i={};n?.force===!0&&(i.force=!0),n?.source!==void 0&&(i.source=n.source);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,i);return typeof s?.title=="string"&&s.title.length>0?s.title:null}catch{return null}}async forkSession(t,n){const i={};n?.title!==void 0&&(i.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,i,{timeoutMs:oA});return Yr(s)}async createChildSession(t,n){const i={};n?.title!==void 0&&(i.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,i,{timeoutMs:oA});return Yr(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(Yr)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,i){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,XU(i));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,i){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,iK(i));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async dismissQuestion(t,n){return{dismissed:!0,dismissedAt:(await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}:dismiss`,void 0,{allowCodes:[40909]})).dismissed_at}}async listTasks(t,n){const i={status:n};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,i)).items.map(o=>Ag(o))}async getTask(t,n,i){const s={with_output:i?.withOutput,output_bytes:i?.outputBytes},o=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s);return Ag(o)}async cancelTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:cancel`)}async listTerminals(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals`)).items.map(J9)}async createTerminal(t,n={}){const i={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,i);return J9(s)}async getTerminal(t,n){const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return J9(i)}async closeTerminal(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}:close`)}async listSkills(t){return((await this.http.get(`/sessions/${encodeURIComponent(t)}/skills`)).skills??[]).map(i=>({name:i.name,description:i.description,source:i.source}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(i=>({name:i.name,description:i.description,source:i.source}))}async activateSkill(t,n,i,s){const o={};i!==void 0&&i.length>0&&(o.args=i),s!==void 0&&s.length>0&&(o.attachments=s.map(PE));const r=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o);return{activated:r.activated,skillName:r.skill_name}}async listCapabilities(){return(await this.http.get("/capabilities")).capabilities??[]}async getCapability(t){return this.http.get(`/capabilities/${encodeURIComponent(t)}`)}async installCapability(t){return this.http.post(`/capabilities/${encodeURIComponent(t)}:install`,{})}async listPlugins(){return(await this.http.get("/plugins")).plugins??[]}async listPluginMarketplace(){return(await this.http.get("/plugins/marketplace")).entries??[]}async installPlugin(t){return this.http.post("/plugins",{source:t})}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:${n?"enable":"disable"}`,{})}async removePlugin(t){return this.http.post(`/plugins/${encodeURIComponent(t)}:remove`,{})}async listDirectory(t,n){const i={};n.path!==void 0&&(i.path=n.path),n.depth!==void 0&&(i.depth=n.depth),n.includeGitStatus!==void 0&&(i.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,i),o=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([r,l])=>[r,l.map(cA)])):void 0;return{items:s.items.map(cA),childrenByPath:o,truncated:s.truncated}}async readFile(t,n){const i={path:n.path};n.offset!==void 0&&(i.offset=n.offset),n.length!==void 0&&(i.length=n.length);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,i);return{path:s.path,content:s.content,encoding:s.encoding,size:s.size,truncated:s.truncated,etag:s.etag,mime:s.mime,languageId:s.language_id,lineCount:s.line_count,isBinary:s.is_binary}}async searchFiles(t,n){const i={workspace:t,query:n.query};n.limit!==void 0&&(i.limit=n.limit);const s=await this.http.post("/workspace/fs:search",i);return{items:s.items.map(o=>({path:o.path,name:o.name,kind:o.kind,score:o.score,matchPositions:o.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const i={pattern:n.pattern};n.regex!==void 0&&(i.regex=n.regex),n.caseSensitive!==void 0&&(i.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,i);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const i={};n!==void 0&&(i.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,i);return{branch:s.branch,ahead:s.ahead,behind:s.behind,entries:s.entries,additions:s.additions,deletions:s.deletions,pullRequest:s.pullRequest??null}}async getFileDiff(t,n){const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:i.path,diff:i.diff,truncated:i.truncated??!1}}getFileDownloadUrl(t,n){const i=n.split("/").map(s=>encodeURIComponent(s)).join("/");return Vd(this.opts.origin,`/sessions/${encodeURIComponent(t)}/fs/${i}:download`)}async openFile(t,n){const i={path:n.path};return n.line!==void 0&&(i.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,i)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async openInApp(t,n,i,s){const o={app_id:n,path:i};s!==void 0&&(o.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,o)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(c1)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const i=await this.http.post("/workspaces",n);return c1(i)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const i=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return c1(i)}async browseFs(t){try{const n=await this.http.get("/fs:browse",{path:t});return{path:n.path,parent:n.parent,entries:(n.entries??[]).map(i=>({name:i.name,path:i.path,isDir:i.is_dir}))}}catch{return{path:"",parent:null,entries:[]}}}async getFsHome(){try{const t=await this.http.get("/fs:home");return{home:t.home,recentRoots:t.recent_roots??[]}}catch{return{home:"",recentRoots:[]}}}async listModels(){return(await this.http.get("/models")).items.map(oK)}async listProviders(){return(await this.http.get("/providers")).items.map(Ed)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),i=Ed(n);return n.api_key!==void 0?{...i,apiKey:n.api_key}:i}async addProvider(t){const n={id:t.id??"",type:t.type,models:(t.models??[]).map(s=>{const o={model:s.model,max_context_size:s.maxContextSize};return s.displayName!==void 0&&(o.display_name=s.displayName),s.capabilities!==void 0&&(o.capabilities=s.capabilities),s.maxOutputSize!==void 0&&(o.max_output_size=s.maxOutputSize),s.supportEfforts!==void 0&&(o.support_efforts=s.supportEfforts),s.adaptiveThinking!==void 0&&(o.adaptive_thinking=s.adaptiveThinking),o})};t.apiKey!==void 0&&(n.api_key=t.apiKey),t.baseUrl!==void 0&&(n.base_url=t.baseUrl),t.defaultModel!==void 0&&(n.default_model=t.defaultModel);const i=await this.http.post("/providers",n);return Ed(i)}async updateProvider(t,n){const i={type:n.type,models:(n.models??[]).map(o=>{const r={model:o.model,max_context_size:o.maxContextSize};return o.displayName!==void 0&&(r.display_name=o.displayName),o.capabilities!==void 0&&(r.capabilities=o.capabilities),o.maxOutputSize!==void 0&&(r.max_output_size=o.maxOutputSize),o.supportEfforts!==void 0&&(r.support_efforts=o.supportEfforts),o.adaptiveThinking!==void 0&&(r.adaptive_thinking=o.adaptiveThinking),r})};n.newId!==void 0&&(i.new_id=n.newId),n.apiKey!==void 0&&(i.api_key=n.apiKey),n.baseUrl!==void 0&&(i.base_url=n.baseUrl),n.defaultModel!==void 0&&(i.default_model=n.defaultModel);const s=await this.http.put(`/providers/${encodeURIComponent(t)}`,i);return{provider:Ed(s.provider)}}async deleteProvider(t){return await this.http.delete(`/providers/${encodeURIComponent(t)}`),{deleted:t}}async listCatalogProviders(){return(await this.http.get("/catalog/providers")).items.map(dA)}async getCatalogProvider(t){const n=await this.http.get(`/catalog/providers/${encodeURIComponent(t)}`);return dA(n)}async importCatalogProvider(t){const n={catalog_id:t.catalogId};t.apiKey!==void 0&&(n.api_key=t.apiKey),t.baseUrl!==void 0&&(n.base_url=t.baseUrl),t.id!==void 0&&(n.id=t.id);const i=await this.http.post("/providers:import_catalog",n);return{provider:Ed(i.provider),modelsImported:i.models_imported}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const i=await this.http.post("/providers:import_registry",n);return{providers:i.providers.map(Ed),modelsImported:i.models_imported}}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return X9(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return X9(t)}async refreshOAuthProviderModels(){const t=await this.http.post("/providers:refresh_oauth");return X9(t)}async getConfig(){const t=await this.http.get("/config");return n3(t)}async setConfig(t){const n={},i={providers:"providers",defaultProvider:"default_provider",defaultModel:"default_model",secondaryModel:"secondary_model",models:"models",thinking:"thinking",planMode:"plan_mode",yolo:"yolo",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",services:"services",mergeAllAvailableSkills:"merge_all_available_skills",extraSkillDirs:"extra_skill_dirs",loopControl:"loop_control",background:"background",experimental:"experimental",telemetry:"telemetry",raw:"raw"};for(const[o,r]of Object.entries(t)){const l=i[o];l!==void 0&&(n[l]=r)}const s=await this.http.post("/config",n);return n3(s)}async getAuth(){const t=await this.http.get("/auth");return{ready:t.ready,providersCount:t.providers_count,defaultModel:t.default_model,managedProvider:t.managed_provider?{status:t.managed_provider.status}:null}}async startOAuthLogin(){const t=await this.http.post("/oauth/login",{});return t.status==="authenticated"?{flowId:t.flow_id,provider:t.provider,status:"authenticated"}:{flowId:t.flow_id,provider:t.provider,status:"pending",verificationUri:t.verification_uri,verificationUriComplete:t.verification_uri_complete,userCode:t.user_code,expiresIn:t.expires_in,interval:t.interval,expiresAt:t.expires_at}}async pollOAuthLogin(){const t=await this.http.get("/oauth/login");return t?{flowId:t.flow_id,status:t.status,resolvedAt:t.resolved_at}:null}async cancelOAuthLogin(){const t=await this.http.delete("/oauth/login");return{cancelled:t.cancelled,status:t.status}}async logout(){return{loggedOut:(await this.http.post("/oauth/logout",{})).logged_out}}async getUsage(){const t=await this.http.get("/oauth/usage");if(t.kind==="error")return{kind:"error",message:t.message,status:t.status};const n=i=>({name:i.name,window:i.window,used:i.used,limit:i.limit,resetAt:i.reset_at});return{kind:"ok",summary:t.summary===null?null:n(t.summary),limits:t.limits.map(n),extraUsage:t.extra_usage===null?null:{balanceCents:t.extra_usage.balance_cents,totalCents:t.extra_usage.total_cents,monthlyChargeLimitEnabled:t.extra_usage.monthly_charge_limit_enabled,monthlyChargeLimitCents:t.extra_usage.monthly_charge_limit_cents,monthlyUsedCents:t.extra_usage.monthly_used_cents,currency:t.extra_usage.currency}}}async getUserInfo(){return this.http.get("/oauth/userinfo")}async uploadFile(t){const n=new FormData;n.append("file",t.file,t.name??(t.file instanceof File?t.file.name:"upload")),t.name!==void 0&&n.append("name",t.name);const i=await this.http.postForm("/files",n);return{id:i.id,name:i.name,mediaType:i.media_type,size:i.size}}getFileUrl(t){return Vd(this.opts.origin,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}async readHostFileContent(t){const n=await this.http.getBlob("/fs:content",{path:t},{maxBytes:Y9});if(n.size>Y9)throw new m5({size:n.size,limit:Y9});const i=n.type,s=!rJ(i),o=i||(s?"application/octet-stream":"text/plain");if(s){const l=await lJ(n);return{path:t,content:l,encoding:"base64",mime:o,isBinary:!0,size:n.size}}const r=await n.text();return{path:t,content:r,encoding:"utf-8",mime:o,isBinary:!1,size:n.size}}connectEvents(t){const n=jU(this.opts.origin,this.opts.identity.clientId),i=this.opts.projectorFactory(),s=new tJ({wsUrl:n,clientId:this.opts.identity.clientId,tracer:this.tracer,credentialStore:this.opts.credentialStore,mainAgentOnly:this.opts.mainAgentOnly,handlers:{onWireEvent:o=>{const r=rK(o),l=lK(o),a=sK(o);a.type==="historyCompacted"&&!RA(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:r,seq:l})},onRawAgentEvent:o=>{const{type:r,seq:l,session_id:a,payload:u,offset:c}=o,d=i.project(r,u,a,{offset:c});for(const f of d){const p=u?.turnId,g=f.type==="assistantDelta"&&typeof p=="number"&&typeof c=="number"&&(r==="assistant.delta"||r==="thinking.delta")?{turnId:p,offset:c,kind:r==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!RA(f.reason)&&t.onResync(a,l),t.onEvent(f,{sessionId:a,seq:l,stream:g})}},onResync:(o,r,l)=>{i.reset(o),t.onResync(o,r,l)},onConnectionState:o=>{t.onConnectionChange(o)},onReplayComplete:()=>{t.onReplayComplete?.()},onError:(o,r,l)=>{t.onError(o,r,l)},onTerminalOutput:(o,r,l,a)=>{t.onTerminalOutput?.(o,r,l,a)},onTerminalExit:(o,r,l)=>{t.onTerminalExit?.(o,r,l)},onTranscriptReset:(o,r,l,a)=>{t.onTranscriptReset?.(o,r,l,a)},onTranscriptOps:(o,r,l,a)=>t.onTranscriptOps?.(o,r,l,a)??!0}});return s.connect(),{subscribe(o,r){s.subscribe(o,r??{seq:0})},unsubscribe(o){s.unsubscribe(o)},subscribeTranscript(o,r,l){s.subscribeTranscript(o,r,l)},unsubscribeTranscript(o,r){s.unsubscribeTranscript(o,r)},seedSnapshot(o,r){if(r.inFlightTurn===null){i.reset(o);return}const l=i.seedInFlight(o,r.inFlightTurn);for(const a of l)t.onEvent(a,{sessionId:o,seq:r.asOfSeq})},bindNextPromptId(o,r){i.bindNextPromptId(o,r)},abort(o,r){s.abort(o,r)},terminalAttach(o,r,l){s.terminalAttach(o,r,l)},terminalInput(o,r,l){s.terminalInput(o,r,l)},terminalResize(o,r,l,a){s.terminalResize(o,r,l,a)},terminalDetach(o,r){s.terminalDetach(o,r)},terminalClose(o,r){s.terminalClose(o,r)},markSideChannelAgent(o,r){s.markSideChannelAgent(o,r),i.markSideChannelAgent(r)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function X9(e){return{changed:e.changed.map(t=>({providerId:t.provider_id,providerName:t.provider_name,added:t.added,removed:t.removed})),unchanged:e.unchanged,failed:e.failed}}function rJ(e){const t=e.toLowerCase().split(";")[0].trim();return t===""||t==="text/plain"||t.startsWith("text/")?!0:/(json|xml|javascript|typescript|x-yaml|yaml|svg|x-sh|x-python|markdown|csv|html|css)$/.test(t)}function lJ(e){return new Promise((t,n)=>{const i=new FileReader;i.onload=()=>{const s=String(i.result);t(s.slice(s.indexOf(",")+1))},i.onerror=()=>n(i.error),i.readAsDataURL(e)})}function aJ(){return window.kimiDesktop}function $T(e,t,n){const i=n.length===0?void 0:n.length===1?n[0]:n;try{aJ()?.log?.(e,t,i)}catch{}}function Dl(e,...t){console.warn(e,...t),$T("warn",e,t)}function ga(e,...t){console.error(e,...t),$T("error",e,t)}const uJ={multiedit:"multi_edit",multiedits:"multi_edit",shell:"bash",run:"bash",exec:"bash",ripgrep:"grep",rg:"grep",find:"glob",fetch:"web_fetch",webfetch:"web_fetch",url_fetch:"web_fetch",urlfetch:"web_fetch",list:"ls",listdir:"ls",list_dir:"ls",todowrite:"todo",todo_write:"todo",todoread:"todo",todolist:"todo",todo_list:"todo",agent:"task",subagent:"task",websearch:"search",web_search:"search",create_goal:"creategoal",get_goal:"getgoal",set_goal_budget:"setgoalbudget",update_goal:"updategoal"};function ao(e){const t=(e??"").trim().toLowerCase().replace(/[\s-]+/g,"_");return uJ[t]??t}const cJ={read:"tools.label.read",bash:"tools.label.bash",edit:"tools.label.edit",multi_edit:"tools.label.edit",write:"tools.label.write",grep:"tools.label.grep",glob:"tools.label.glob",ls:"tools.label.ls",web_fetch:"tools.label.web_fetch",search:"tools.label.search",todo:"tools.label.todo",task:"tools.label.task",agentswarm:"tools.label.swarm",askuserquestion:"tools.label.ask_user",exitplanmode:"tools.label.plan",creategoal:"tools.label.goal_create",getgoal:"tools.label.goal_get",setgoalbudget:"tools.label.goal_budget",updategoal:"tools.label.goal_update"};function DT(e,t){const n=cJ[ao(t)];return n?e(n):t}const RT=80;function dJ(e,t=RT){const n=e.trim();return n.length>t?n.slice(0,t-1)+"…":n}function fJ(e,t){const n=e.trim();return!!(n===""||n==="{}"||n==="[]"||n==="null"||t&&Object.keys(t).length===0)}function hJ(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function Rn(e){return typeof e=="string"&&e.length>0?e:void 0}function Ya(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function pJ(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean)[0];return n?`${t.host}/${n}`:t.host}catch{return e.replace(/^https?:\/\//,"")}}function ey(e){return Rn(e.path)??Rn(e.file_path)??Rn(e.filePath)??Rn(e.filename)}const gJ={active:"status.goalStatusActive",blocked:"status.goalStatusBlocked",complete:"status.goalStatusComplete"};function mJ(e,t){const n=Rn(t);if(!n)return;const i=gJ[n];return i?e(i):n}function vJ(e,t){const n=Ya(t.value),i=Rn(t.unit);if(!(n===void 0||!i))switch(i){case"turns":return e("tools.goal.turns",{value:n});case"tokens":return e("tools.goal.tokens",{value:n});case"milliseconds":return e("tools.goal.milliseconds",{value:n});case"seconds":return e("tools.goal.seconds",{value:n});case"minutes":return e("tools.goal.minutes",{value:n});case"hours":return e("tools.goal.hours",{value:n});default:return e("tools.goal.budget",{value:n,unit:i})}}function F5(e,t,n,i=!1){const s=(o,r=RT)=>i?o.trim():dJ(o,r);try{const o=hJ(n);if(!i&&fJ(n,o))return"";const r=()=>s(n.replace(/^·\s*/,""));if(!o)return r();switch(ao(t)){case"read":{const l=ey(o);if(!l)return r();const a=Ya(o.offset)??Ya(o.line_start)??Ya(o.start_line),u=Ya(o.limit)??Ya(o.length),c=Ya(o.line_end)??Ya(o.end_line)??(a!==void 0&&u!==void 0?a+u:void 0);return s(a!==void 0&&c!==void 0?`${l}:${a}-${c}`:a!==void 0?`${l}:${a}`:l)}case"write":{const l=ey(o);return l?s(`${l} ${e("tools.chip.created")}`):r()}case"edit":case"multi_edit":{const l=ey(o);return l?s(l):r()}case"bash":{const l=Rn(o.command)??Rn(o.cmd)??Rn(o.script);return l?l.trim():r()}case"grep":case"search":{const l=Rn(o.pattern)??Rn(o.query)??Rn(o.regex),a=Rn(o.path)??Rn(o.glob)??Rn(o.include);return l&&a?s(e("tools.summary.inScope",{value:l,scope:a})):l?s(l):r()}case"glob":{const l=Rn(o.pattern)??Rn(o.glob)??Rn(o.query),a=Rn(o.path)??Rn(o.cwd);return l&&a?s(e("tools.summary.inScope",{value:l,scope:a})):l?s(l):Rn(o.path)?s(Rn(o.path)):r()}case"ls":{const l=Rn(o.path)??Rn(o.dir)??Rn(o.directory)??Rn(o.cwd);return l?s(l):r()}case"web_fetch":{const l=Rn(o.url)??Rn(o.uri);return l?s(pJ(l)):r()}case"todo":case"task":{const l=Rn(o.description)??Rn(o.title)??Rn(o.prompt)??Rn(o.name)??Rn(o.subagent_type);if(l)return s(l);const a=Array.isArray(o.todos)?o.todos:Array.isArray(o.items)?o.items:void 0;return a?s(e("tools.chip.todos",{count:a.length})):r()}case"creategoal":{if(i)return r();const l=Rn(o.objective),a=Rn(o.completionCriterion);return l&&a?s(e("tools.goal.objectiveWithCriterion",{objective:l,criterion:a})):l?s(l):r()}case"getgoal":return i?r():"";case"setgoalbudget":{if(i)return r();const l=vJ(e,o);return l?s(l):r()}case"updategoal":{if(i)return r();const l=mJ(e,o.status);return l?s(e("tools.goal.status",{status:l})):r()}default:return r()}}catch{return n}}function yJ(e,t){try{switch(ao(t.name)){case"bash":return t.timing?t.timing:"";case"read":{if(t.output&&t.output.length>0){const n=t.output.length;return e("tools.chip.lines",{count:n})}return""}case"edit":case"multi_edit":case"write":{if(t.output){for(const i of t.output){const s=i.match(/\+(\d+).*[-−](\d+)/);if(s)return`+${s[1]} −${s[2]}`}const n=t.output.find(i=>/\d+/.test(i));if(n){const i=n.match(/\+(\d+)/),s=n.match(/[-−](\d+)/);if(i||s)return`${i?`+${i[1]}`:""} ${s?`−${s[1]}`:""}`.trim()}if(t.status!=="error")return e("tools.chip.edited")}return""}case"grep":case"search":return t.output&&t.output.length>0?e("tools.chip.results",{count:t.output.length}):"";default:return""}}catch{return""}}const bJ="main",kJ=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function Fl(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function AJ(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}function zA(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,retryReuseMsgId:void 0,retryActive:!1}}function zi(e,t){const n=e[t];return typeof n=="string"?n:void 0}function Os(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function Nr(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function CJ(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,i=n&&typeof n=="object"?n:{},s=zi(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const o=zi(t,"goalId")??zi(t,"goal_id")??"goal",r=zi(t,"objective")??"";return{goalId:o,objective:r,completionCriterion:zi(t,"completionCriterion")??zi(t,"completion_criterion"),status:s,turnsUsed:Os(t,"turnsUsed")??Os(t,"turns_used")??0,tokensUsed:Os(t,"tokensUsed")??Os(t,"tokens_used")??0,wallClockMs:Os(t,"wallClockMs")??Os(t,"wall_clock_ms")??0,terminalReason:zi(t,"terminalReason")??zi(t,"terminal_reason"),budget:{tokenBudget:Nr(i,"tokenBudget")??Nr(i,"token_budget"),remainingTokens:Nr(i,"remainingTokens")??Nr(i,"remaining_tokens"),turnBudget:Nr(i,"turnBudget")??Nr(i,"turn_budget"),remainingTurns:Nr(i,"remainingTurns")??Nr(i,"remaining_turns"),wallClockBudgetMs:Nr(i,"wallClockBudgetMs")??Nr(i,"wall_clock_budget_ms"),remainingWallClockMs:Nr(i,"remainingWallClockMs")??Nr(i,"remaining_wall_clock_ms"),overBudget:i.overBudget===!0||i.over_budget===!0}}}function Cc(e,t,n,i,s){if(typeof i!="string"||i.length===0)return null;const r={...t.subagentMeta.get(i)??{id:i,agentId:i,sessionId:n,kind:"subagent",description:e("tasks.dockSubagent"),status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},...s,id:i,sessionId:n,kind:"subagent"};return t.subagentMeta.set(i,r),r}function wJ(e,t,n){if(t==="turn.step.started")return null;if(t==="tool.use"||t==="tool.call.started"){const i=zi(n,"name")??zi(n,"toolName")??"tool",s=DT(e,xJ(i)),o=_J(e,i,n.args??n.input);return o?`Calling ${s}: ${o}`:`Calling ${s}`}if(t==="tool.progress"){const i=n.update;if(i&&typeof i=="object"){const o=zi(i,"text");if(o)return ty(o);const r=zi(i,"message");if(r)return ty(r)}const s=zi(n,"message");if(s)return ty(s)}return null}function xJ(e){return e.replace(/_\d+$/,"")}const OA=2e3;function ty(e){return e.length>OA?`${e.slice(0,OA)}…`:e}function _J(e,t,n){if(n==null)return"";const i=typeof n=="string"?n:JSON.stringify(n);return F5(e,t,i)}function SJ(e,t,n,i,s,o,r){if(r.has(i)&&s==="turn.step.started")return[];if(s==="assistant.delta"){const d=zi(o,"delta");if(!d)return[];const f=t.subagentMeta.get(i),p=Cc(e,t,n,i,{status:"running",subagentPhase:"working",startedAt:f?.startedAt??new Date().toISOString()}),g=[];return p&&g.push({type:"taskCreated",sessionId:n,task:p}),g.push({type:"taskProgress",sessionId:n,taskId:i,outputChunk:d,stream:"stdout",kind:"text"}),g}const l=wJ(e,s,o);if(l===null||l.length===0)return[];const a=t.subagentMeta.get(i),u=Cc(e,t,n,i,{status:"running",subagentPhase:"working",startedAt:a?.startedAt??new Date().toISOString()}),c=[];return u&&c.push({type:"taskCreated",sessionId:n,task:u}),c.push({type:"taskProgress",sessionId:n,taskId:i,outputChunk:l,stream:"stdout"}),c}function rc(e){return{...e,content:e.content.map(t=>({...t}))}}function PA(e,t,n){const i={id:Fl("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(i),i}function MJ(e,t,n,i,s,o){const r={id:i,sessionId:t,role:"user",content:s,createdAt:o,promptId:n};return e.messages.push(r),r}function jA(e){return Array.isArray(e)?e.map(t=>v5(t)):[]}function HA(e,t,n,i){const s=e.messages.find(r=>r.id===t);if(!s)return-1;const o=s.content.at(-1);return o&&o.type===n?(n==="text"?o.text+=i:o.thinking+=i,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:i}:{type:"thinking",thinking:i}),s.content.length-1)}function IJ(e,t,n,i,s,o){const r=e.messages.find(l=>l.id===t);r&&r.content.push({type:"toolUse",toolCallId:n,toolName:i,input:s,outputLines:o})}function EJ(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",o=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return o.length>0?{outputChunk:o,stream:s}:null}function WA(e,t){e.messages.find(n=>n.id===t)}function TJ(e,t,n,i,s,o){const r={id:Fl("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:i,isError:s}],createdAt:new Date().toISOString(),promptId:o};return e.messages.push(r),r}function xh(e,t){return e.messages.find(n=>n.id===t)}function qA(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function LJ(e){const{t}=e,n=new Map,i=new Set;function s(f){let p=n.get(f);return p||(p=zA(),n.set(f,p)),p}function o(f){n.set(f,zA())}function r(f){i.add(f)}function l(f,p){const g=s(f);g.currentPromptId=p}function a(f,p){o(f);const g=s(f),m=p.promptId??Fl("pr_");g.currentPromptId=m,g.turnPromptId.set(p.turnId,m);const y=PA(g,f,m);p.thinkingText.length>0&&y.content.push({type:"thinking",thinking:p.thinkingText}),p.assistantText.length>0&&y.content.push({type:"text",text:p.assistantText});for(const w of p.runningTools){const k=typeof w.lastProgress?.text=="string"&&w.lastProgress.text.length>0?[w.lastProgress.text]:void 0;y.content.push({type:"toolUse",toolCallId:w.toolCallId,toolName:w.name,input:w.args??{},outputLines:k}),g.toolStartTimes.set(w.toolCallId,Date.now())}return g.currentAssistantMsgId=y.id,g.turnTextLen=p.assistantText.length,g.turnThinkLen=p.thinkingText.length,[{type:"messageCreated",message:rc(y)}]}function u(f,p,g,m){try{return d(f,p,g,m)}catch(y){return ga("[agentProjector] Error projecting event:",f,y instanceof Error?y.message:y),[]}}function c(f,p){return p===void 0?"append":p<f?"skip":p>f?"gap":"append"}function d(f,p,g,m){const y=s(g),w=p,k=[],A=w?.agentId;if(typeof A=="string"&&A!==bJ){const v=i.has(A);if(f==="prompt.submitted"){if(!v)return[];const x=w?.promptId,E=w?.userMessageId;if(!x||!E)return[];const S=jA(w?.content);return S.length===0?[]:[{type:"messageCreated",agentId:A,message:{id:E,sessionId:g,role:"user",content:S,createdAt:typeof w?.createdAt=="string"?w.createdAt:new Date().toISOString(),promptId:x}}]}if(v&&(f==="thinking.delta"||f==="assistant.delta")){const x=w?.delta??"";return x?[{type:"agentDelta",sessionId:g,agentId:A,delta:{[f==="thinking.delta"?"thinking":"text"]:x}}]:[]}if(v&&f==="turn.ended")return[{type:"agentTurnEnded",sessionId:g,agentId:A,reason:w?.reason}];if(kJ.has(f))return SJ(t,y,g,A,f,w??{},i)}switch(f){case"session.meta.updated":{const v=w?.patch?.title??w?.title,x=w?.patch?.lastPrompt,E={};typeof v=="string"&&v.length>0&&(E.title=v),typeof x=="string"&&(E.lastPrompt=x),(E.title!==void 0||E.lastPrompt!==void 0)&&k.push({type:"sessionMetaUpdated",sessionId:g,...E});break}case"prompt.submitted":{const v=w?.promptId,x=w?.userMessageId;if(!v||!x)break;const E=jA(w?.content);if(E.length===0)break;y.currentPromptId=v;const S=MJ(y,g,v,x,E,typeof w?.createdAt=="string"?w.createdAt:new Date().toISOString());k.push({type:"messageCreated",message:rc(S),...typeof A=="string"?{agentId:A}:{}});break}case"turn.started":{const v=w?.turnId,x=y.currentPromptId??Fl("pr_");y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x),y.turnTextLen=0,y.turnThinkLen=0;const E=w?.origin;if(E&&typeof E=="object"&&E.kind==="system_trigger"&&E.name==="goal_continuation"){const S={id:v!==void 0?`goal_cont_${v}`:Fl("goal_"),sessionId:g,role:"user",content:[{type:"text",text:zi(w??{},"prompt")??""}],createdAt:new Date().toISOString(),metadata:{origin:E}};y.messages.push(S),k.push({type:"turnActiveChanged",sessionId:g,active:!0}),k.push({type:"messageCreated",message:rc(S)});break}k.push({type:"turnActiveChanged",sessionId:g,active:!0});break}case"turn.step.started":{const v=w?.turnId;y.retryActive&&(y.retryActive=!1,k.push({type:"turnRetry",sessionId:g,retry:void 0}));let x=y.turnPromptId.get(v)??y.currentPromptId;if(x||(x=Fl("pr_"),y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x)),y.turnTextLen=0,y.turnThinkLen=0,y.retryReuseMsgId!==void 0){const S=y.retryReuseMsgId;if(y.retryReuseMsgId=void 0,xh(y,S)!==void 0){y.currentAssistantMsgId=S;break}}const E=PA(y,g,x);y.currentAssistantMsgId=E.id,k.push({type:"messageCreated",message:rc(E)});break}case"thinking.delta":{const v=y.currentAssistantMsgId;if(!v)break;const x=w?.delta??"";if(!x)break;m?.offset===0&&y.turnThinkLen>0&&(y.turnThinkLen=0);const E=c(y.turnThinkLen,m?.offset);if(E==="skip")break;if(E==="gap"){k.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"delta_gap"});break}const S=HA(y,v,"thinking",x);if(S<0)break;y.turnThinkLen+=x.length,k.push({type:"assistantDelta",sessionId:g,messageId:v,contentIndex:S,delta:{thinking:x}});break}case"assistant.delta":{const v=y.currentAssistantMsgId;if(!v)break;const x=w?.delta??"";if(!x)break;m?.offset===0&&y.turnTextLen>0&&(y.turnTextLen=0);const E=c(y.turnTextLen,m?.offset);if(E==="skip")break;if(E==="gap"){k.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"delta_gap"});break}const S=HA(y,v,"text",x);if(S<0)break;y.turnTextLen+=x.length,k.push({type:"assistantDelta",sessionId:g,messageId:v,contentIndex:S,delta:{text:x}});break}case"tool.use":case"tool.call.started":{const v=y.currentAssistantMsgId,x=w?.turnId,E=y.turnPromptId.get(x)??y.currentPromptId;if(!v||!E)break;const S=w?.toolCallId,M=w?.name??w?.toolName??"",_=w?.args??w?.input??{};IJ(y,v,S,M,_);const N=xh(y,v);N&&N.content.length-1,y.toolStartTimes.set(S,Date.now()),N&&k.push({type:"messageUpdated",sessionId:g,messageId:v,content:N.content.map(D=>({...D})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const v=w?.toolCallId,x=EJ(w??{});v&&x&&k.push({type:"toolOutput",sessionId:g,toolCallId:v,outputChunk:x.outputChunk,stream:x.stream});break}case"tool.result":{const v=w?.turnId;let x=y.turnPromptId.get(v)??y.currentPromptId;x||(x=Fl("pr_"),y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x));const E=w?.toolCallId,S=w?.output,M=w?.isError??!1;y.toolStartTimes.get(E)??Date.now(),y.toolStartTimes.delete(E);const _=TJ(y,g,E,S,M,x);k.push({type:"messageCreated",message:rc(_)}),y.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const v=y.currentAssistantMsgId,x=AJ(w?.usage);if(y.totalInput+=x.input,y.totalOutput+=x.output,y.totalCacheRead+=x.cacheRead,y.totalCacheCreate+=x.cacheCreate,v){WA(y,v);const E=xh(y,v);E&&k.push({type:"messageUpdated",sessionId:g,messageId:v,content:E.content.map(S=>({...S})),status:"completed"})}break}case"agent.status.updated":{w?.model&&(y.model=w.model),w?.contextTokens!==void 0&&(y.contextTokens=w.contextTokens),w?.maxContextTokens!==void 0&&(y.contextLimit=w.maxContextTokens);const v=w?.phase;v!=null&&v.kind==="retrying"?(y.retryActive=!0,k.push({type:"turnRetry",sessionId:g,retry:{failedAttempt:Os(v,"failedAttempt")??0,nextAttempt:Os(v,"nextAttempt")??0,maxAttempts:Os(v,"maxAttempts")??0,delayMs:Os(v,"delayMs")??0,errorName:zi(v,"errorName"),statusCode:Os(v,"statusCode"),turnId:Os(v,"turnId")}})):y.retryActive&&v!==void 0&&v!==null&&typeof v.kind=="string"&&(y.retryActive=!1,k.push({type:"turnRetry",sessionId:g,retry:void 0})),k.push({type:"sessionUsageUpdated",sessionId:g,usage:qA(y),model:y.model||void 0,swarmMode:w?.swarmMode===!0?!0:w?.swarmMode===!1?!1:void 0,planMode:w?.planMode===!0?!0:w?.planMode===!1?!1:void 0,thinking:typeof w?.thinkingEffort=="string"&&w.thinkingEffort.length>0?w.thinkingEffort:void 0});break}case"turn.ended":{const v=y.currentAssistantMsgId,x=w?.reason??"completed",E=Os(w??{},"durationMs"),S=w?.turnId,M=(S!==void 0?y.turnPromptId.get(S):void 0)??y.currentPromptId;if(k.push({type:"turnActiveChanged",sessionId:g,active:!1,reason:w?.reason,promptId:M}),v){WA(y,v);const N=xh(y,v);N&&k.push({type:"messageUpdated",sessionId:g,messageId:v,content:N.content.map(D=>({...D})),status:x==="failed"||x==="blocked"?"error":"completed",durationMs:E})}y.turnCount++;const _=qA(y);k.push({type:"sessionUsageUpdated",sessionId:g,usage:_}),y.currentAssistantMsgId=void 0,y.currentPromptId=void 0,y.turnTextLen=0,y.turnThinkLen=0,y.retryReuseMsgId=void 0;break}case"prompt.completed":{const v=w?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptCompleted",sessionId:g,promptId:v,reason:w?.reason??"completed"});break}case"prompt.aborted":{const v=w?.promptId;typeof v=="string"&&v.length>0&&k.push({type:"promptAborted",sessionId:g,promptId:v});break}case"turn.step.retrying":{y.retryActive=!0,k.push({type:"turnRetry",sessionId:g,retry:{failedAttempt:Os(w??{},"failedAttempt")??0,nextAttempt:Os(w??{},"nextAttempt")??0,maxAttempts:Os(w??{},"maxAttempts")??0,delayMs:Os(w??{},"delayMs")??0,errorName:zi(w??{},"errorName"),statusCode:Os(w??{},"statusCode"),turnId:typeof w?.turnId=="number"?w.turnId:void 0}});const v=y.currentAssistantMsgId;if(v!==void 0){const x=xh(y,v);x!==void 0&&(x.content=x.content.filter(E=>E.type!=="text"&&E.type!=="thinking"&&E.type!=="toolUse"),k.push({type:"messageUpdated",sessionId:g,messageId:v,content:x.content.map(E=>({...E})),status:"pending"}),y.retryReuseMsgId=v)}y.turnTextLen=0,y.turnThinkLen=0,y.toolStartTimes.clear();break}case"turn.step.interrupted":{y.currentAssistantMsgId=void 0,y.retryReuseMsgId=void 0;break}case"subagent.spawned":{const v=typeof w?.subagentId=="string"&&w.subagentId.length>0?w.subagentId:Fl("task_"),x={id:v,agentId:v,sessionId:g,kind:"subagent",description:typeof w?.description=="string"?w.description:w?.subagentName??t("tasks.dockSubagent"),status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued",subagentType:typeof w?.subagentName=="string"?w.subagentName:void 0,model:typeof w?.model=="string"&&w.model.length>0?w.model:void 0,thinkingEffort:typeof w?.thinkingEffort=="string"&&w.thinkingEffort.length>0?w.thinkingEffort:void 0,parentToolCallId:typeof w?.parentToolCallId=="string"?w.parentToolCallId:void 0,swarmIndex:typeof w?.swarmIndex=="number"?w.swarmIndex:void 0,runInBackground:w?.runInBackground===!0};y.subagentMeta.set(x.id,x),k.push({type:"taskCreated",sessionId:g,task:x});break}case"subagent.started":{const v=Cc(t,y,g,w?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString()});v&&k.push({type:"taskCreated",sessionId:g,task:v});break}case"subagent.suspended":{const v=Cc(t,y,g,w?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof w?.reason=="string"?w.reason:void 0});v&&k.push({type:"taskCreated",sessionId:g,task:v});break}case"subagent.completed":{const v=typeof w?.resultSummary=="string"?w.resultSummary:void 0,x=Cc(t,y,g,w?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:v});x&&k.push({type:"taskCreated",sessionId:g,task:x}),k.push({type:"taskCompleted",sessionId:g,taskId:w?.subagentId??"",status:"completed",outputPreview:v});break}case"subagent.failed":{const v=typeof w?.error=="string"?w.error:void 0,x=Cc(t,y,g,w?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:v});x&&k.push({type:"taskCreated",sessionId:g,task:x}),k.push({type:"taskCompleted",sessionId:g,taskId:w?.subagentId??"",status:"failed",outputPreview:v});break}case"error":{k.push({type:"unknown",raw:{_agentError:!0,code:w?.code,message:w?.message,name:w?.name,details:w?.details,retryable:w?.retryable}});break}case"task.notified":{const v=zi(w??{},"notificationType"),x=zi(w??{},"sourceKind"),E=zi(w??{},"sourceId");if(!v||!x||!E)break;const S=v.startsWith("task.")?v.slice(5):v,M=`task:${E}:${S}`,_=O=>O.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">"),N=zi(w??{},"title")??"",D=zi(w??{},"severity")??"",T=zi(w??{},"body")??"",$=`<notification id="${M}" category="task" type="${_(v)}" source_kind="${_(x)}" source_id="${_(E)}"> -`+(N!==""?`Title: ${_(N)} -`:"")+(D!==""?`Severity: ${_(D)} -`:"")+(T!==""?`${_(T)} -`:"")+"</notification>",P={id:`task_ntf_${M}`,sessionId:g,role:"user",content:[{type:"text",text:$}],createdAt:new Date().toISOString(),metadata:{origin:{kind:"task",taskId:E,status:S,notificationId:M}}};y.messages.push(P),k.push({type:"messageCreated",message:rc(P)});break}case"warning":{k.push({type:"unknown",raw:{_agentWarning:!0,message:w?.message}});break}case"task.started":case"background.task.started":{const v=w?.info??{},x=typeof v.startedAt=="number"?new Date(v.startedAt).toISOString():void 0,E=typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):Fl("task_"),S=typeof v.description=="string"?v.description:typeof v.command=="string"?v.command:t("tasks.defaultDescription");if(v.kind==="agent"){const _=typeof v.agentId=="string"&&v.agentId.length>0?v.agentId:void 0;if(_!==void 0){const N=Cc(t,y,g,_,{description:S,backgroundTaskId:E,runInBackground:!0});N&&k.push({type:"taskCreated",sessionId:g,task:N})}else k.push({type:"taskCreated",sessionId:g,task:{id:E,sessionId:g,kind:"subagent",description:S,status:"running",createdAt:x??new Date().toISOString(),startedAt:x,subagentPhase:"queued",runInBackground:!0}});break}const M=typeof v.command=="string"?v.command:void 0;k.push({type:"taskCreated",sessionId:g,task:{id:E,sessionId:g,kind:"bash",description:S,command:M,status:"running",createdAt:x??new Date().toISOString(),startedAt:x,outputPreview:M!==void 0?`$ ${M}`:void 0}});break}case"task.terminated":case"background.task.terminated":{const v=w?.info??{},x=v.status==="failed"||typeof v.exitCode=="number"&&v.exitCode!==0;k.push({type:"taskCompleted",sessionId:g,taskId:typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):"",status:x?"failed":"completed"});break}case"compaction.completed":{const v=w?.result??{};k.push({type:"compactionCompleted",sessionId:g,tokensBefore:typeof v.tokensBefore=="number"?v.tokensBefore:void 0,tokensAfter:typeof v.tokensAfter=="number"?v.tokensAfter:void 0,summary:typeof v.summary=="string"?v.summary:void 0}),k.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{k.push({type:"compactionStarted",sessionId:g,trigger:w?.trigger==="manual"?"manual":"auto",instruction:typeof w?.instruction=="string"?w.instruction:void 0});break}case"compaction.cancelled":{k.push({type:"compactionCancelled",sessionId:g});break}case"goal.updated":{const v=CJ(w?.snapshot??null);k.push({type:"goalUpdated",sessionId:g,goal:v?.status==="complete"?null:v});break}case"cron.fired":{const v=w?.origin,x=zi(w??{},"prompt");if(v&&typeof v=="object"&&v.kind==="cron_job"&&x){const E={id:Fl("cron_"),sessionId:g,role:"user",content:[{type:"text",text:x}],createdAt:new Date().toISOString(),metadata:{origin:v}};y.messages.push(E),k.push({type:"messageCreated",message:rc(E)})}break}}return k}return{project:u,bindNextPromptId:l,seedInFlight:a,reset:o,markSideChannelAgent:r}}function NJ(e){return new oJ({origin:e.origin,identity:e.identity,tracer:e.tracer,credentialStore:e.credentialStore,projectorFactory:()=>LJ({t:e.t}),mainAgentOnly:e.mainAgentOnly})}const zT="kimiWeb.compaction",FJ={t:e=>e},BJ="kimiWeb.optimisticUserMessage",UA="Sub Agent";function qh(e,t,n=e.length){for(let i=0;i<n;i++){const s=e[i];s.type==="thinking"&&s.startedAt!==void 0&&s.durationMs===void 0&&(e[i]={...s,durationMs:Math.max(0,t-Date.parse(s.startedAt))})}}function KA(e,t,n){const i=e.messagesBySession[t];if(i)for(let s=i.length-1;s>=0;s--){const o=i[s];if(o.role!=="assistant")continue;if(!o.content.some(u=>u.type==="thinking"&&u.startedAt!==void 0&&u.durationMs===void 0))return;const l=[...o.content];qh(l,n);const a=[...i];a[s]={...o,content:l},e.messagesBySession[t]=a;return}}function VA(e){const t=Date.parse(e);return Number.isNaN(t)?Date.now():t}function $J(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},turnEndedPromptIdBySession:{},turnErrorBySession:{},turnRetryBySession:{},compactionBySession:{},warnings:[]}}function DJ(e){return{...e,sessions:e.sessions,messagesBySession:{...e.messagesBySession},approvalsBySession:{...e.approvalsBySession},planReviewByToolCallId:{...e.planReviewByToolCallId},questionsBySession:{...e.questionsBySession},tasksBySession:{...e.tasksBySession},goalBySession:{...e.goalBySession},goalVersionBySession:{...e.goalVersionBySession},lastSeqBySession:{...e.lastSeqBySession},turnActiveBySession:{...e.turnActiveBySession},turnEndedPromptIdBySession:{...e.turnEndedPromptIdBySession},turnErrorBySession:{...e.turnErrorBySession},turnRetryBySession:{...e.turnRetryBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function RJ(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const i=e.lastSeqBySession[t]??0;n>i&&(e.lastSeqBySession[t]=n)}}function lc(e,t){const n=new Date().toISOString();e.sessions=e.sessions.map(i=>i.id===t&&n>i.updatedAt?{...i,updatedAt:n}:i)}function qa(e,t){return t.seq>(e.lastSeqBySession[t.sessionId]??0)}function ZA(e){return e.role==="user"&&e.metadata?.[BJ]===!0}function zJ(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function OJ(e){return e.metadata?.origin?.kind==="system_trigger"}function PJ(e,t){const n=t.userMessageId??t.id;for(let s=e.length-1;s>=0;s--){const o=e[s];if(ZA(o)&&o.userMessageId===n)return s}const i=t.promptId;if(i!==void 0)for(let s=e.length-1;s>=0;s--){const o=e[s];if(ZA(o)&&o.promptId===i)return s}return-1}function jJ(e,t,n){let i=!1;const s=e.map(o=>{let r=!1;const l=o.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(r=!0,{...a,outputLines:[...a.outputLines??[],n]}));return r?(i=!0,{...o,content:l}):o});return i?s:e}const HJ={"provider.connection_error":"connection","provider.auth_error":"auth","provider.rate_limit":"rateLimit","provider.overloaded":"overloaded","provider.filtered":"filtered","provider.api_error":"api","context.overflow":"contextOverflow"};function WJ(e,t){const n=[],i=(r,l)=>{typeof l=="number"||typeof l=="boolean"?n.push({label:r,value:String(l)}):typeof l=="string"&&l.length>0&&n.push({label:r,value:l})};i(t("warnings.details.code"),e.code);const s=e.details??{};i(t("warnings.details.status"),s.statusCode),i(t("warnings.details.requestId"),s.requestId),i(t("warnings.details.errorName"),e.name);for(const[r,l]of Object.entries(s))r==="statusCode"||r==="requestId"||i(r,l);const o=(e.code!==void 0?HJ[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${o}`),message:e.message,details:n.length>0?n:void 0}}function qJ(e,t,n,i=FJ){const s=DJ(e);switch(RJ(s,n.sessionId,n.seq),t.type){case"sessionCreated":{s.sessions.some(r=>r.id===t.session.id)||(s.sessions=[t.session,...s.sessions]);break}case"sessionUpdated":{s.sessions=s.sessions.map(o=>o.id===t.session.id?{...t.session,pullRequest:o.pullRequest}:o);break}case"sessionDeleted":{const o=t.sessionId;s.sessions=s.sessions.filter(r=>r.id!==o),delete s.messagesBySession[o],delete s.tasksBySession[o],delete s.goalBySession[o],delete s.approvalsBySession[o],delete s.questionsBySession[o],delete s.lastSeqBySession[o],delete s.turnActiveBySession[o],delete s.turnEndedPromptIdBySession[o],delete s.turnErrorBySession[o],delete s.turnRetryBySession[o],s.activeSessionId===o&&(s.activeSessionId=void 0);break}case"sessionWorkChanged":{if(!qa(e,n))break;let o;s.sessions=s.sessions.map(r=>r.id!==t.sessionId?r:(o=t.pendingInteraction??(t.busy?r.pendingInteraction:"none"),{...r,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?r.mainTurnActive:!1),pendingInteraction:o,lastTurnReason:t.lastTurnReason})),o==="none"?(delete s.approvalsBySession[t.sessionId],delete s.questionsBySession[t.sessionId]):o==="question"&&delete s.approvalsBySession[t.sessionId],t.mainTurnActive===!0?s.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&(e.turnActiveBySession[t.sessionId]&&lc(s,t.sessionId),delete s.turnActiveBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId]);break}case"sessionMetaUpdated":{s.sessions=s.sessions.map(o=>o.id===t.sessionId?{...o,title:t.title??o.title,lastPrompt:t.lastPrompt??o.lastPrompt}:o);break}case"sessionUsageUpdated":{s.sessions=s.sessions.map(o=>{if(o.id!==t.sessionId)return o;const r=t.model&&t.model.length>0?t.model:o.model;return{...o,usage:t.usage,model:r}});break}case"historyCompacted":break;case"compactionStarted":{s.compactionBySession={...s.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const o=t.sessionId,r=s.compactionBySession[o],{[o]:l,...a}=s.compactionBySession;if(s.compactionBySession=a,Object.prototype.hasOwnProperty.call(s.messagesBySession,o)){const u=s.messagesBySession[o]??[],c=`compaction_${o}_${n.seq}`;if(!u.some(d=>d.id===c)){const d={trigger:r?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};s.messagesBySession[o]=[...u,{id:c,sessionId:o,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[zT]:d}}]}}break}case"compactionCancelled":{const{[t.sessionId]:o,...r}=s.compactionBySession;s.compactionBySession=r;break}case"messageCreated":{const o=t.message.sessionId,r=s.messagesBySession[o]??[];if(!r.some(a=>a.id===t.message.id)){if(t.message.role==="user"&&!zJ(t.message)&&!OJ(t.message)){const a=PJ(r,t.message);if(a!==-1){const u=[...r],c=u[a];u[a]={...t.message,id:c.id,promptId:t.message.promptId??c.promptId,userMessageId:t.message.userMessageId??t.message.id,metadata:{...t.message.metadata,...c.metadata}},s.messagesBySession[o]=u;break}}s.messagesBySession[o]=[...r,t.message]}break}case"messageUpdated":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=r.map(l=>{if(l.id!==t.messageId)return l;const a=t.content.map((c,d)=>{const f=l.content[d];return c.type==="thinking"&&f?.type==="thinking"?{...c,startedAt:f.startedAt,durationMs:f.durationMs}:c}),u=Date.now();return qh(a,u,a.length-1),(t.status!=="pending"||t.durationMs!==void 0)&&qh(a,u),{...l,content:a,durationMs:t.durationMs??l.durationMs,endedAt:t.durationMs!==void 0?l.endedAt??new Date(u).toISOString():l.endedAt}});break}case"assistantDelta":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=r.map(l=>{if(l.id!==t.messageId)return l;const a=[...l.content],u=t.contentIndex,c=a.length<=u;for(;a.length<=u;)a.push({type:"text",text:""});const d=a[u];let f;return t.delta.text!==void 0?d.type==="text"&&!c?f={type:"text",text:d.text+t.delta.text}:(f={type:"text",text:t.delta.text},qh(a,Date.now(),u)):t.delta.thinking!==void 0?d.type==="thinking"?f={type:"thinking",thinking:d.thinking+t.delta.thinking,signature:d.signature,startedAt:d.startedAt,durationMs:d.durationMs}:(f={type:"thinking",thinking:t.delta.thinking,startedAt:new Date().toISOString()},qh(a,Date.now(),u)):f=d,a[u]=f,{...l,content:a}});break}case"toolOutput":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=jJ(r,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const o=t.sessionId,r=s.approvalsBySession[o]??[];r.some(u=>u.approvalId===t.approval.approvalId)||(s.approvalsBySession[o]=[...r,t.approval],qa(e,n)&&(KA(s,o,VA(t.approval.createdAt)),lc(s,o)));const a=t.approval.display;a?.kind==="plan_review"&&typeof a.plan=="string"&&a.plan.length>0&&(s.planReviewByToolCallId={...s.planReviewByToolCallId,[t.approval.toolCallId]:{plan:a.plan,path:typeof a.path=="string"?a.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const o=t.sessionId,r=t.approvalId,l=s.approvalsBySession[o]??[];s.approvalsBySession[o]=l.filter(a=>a.approvalId!==r);break}case"questionRequested":{const o=t.sessionId,r=s.questionsBySession[o]??[];r.some(a=>a.questionId===t.question.questionId)||(s.questionsBySession[o]=[...r,t.question],qa(e,n)&&(KA(s,o,VA(t.question.createdAt)),lc(s,o)));break}case"questionAnswered":case"questionDismissed":{const o=t.sessionId,r=t.questionId,l=s.questionsBySession[o]??[];s.questionsBySession[o]=l.filter(a=>a.questionId!==r);break}case"taskCreated":{const o=t.sessionId,r=s.tasksBySession[o]??[],l=r.findIndex(a=>a.id===t.task.id);if(l===-1)s.tasksBySession[o]=[...r,t.task];else{const a=[...r],u=r[l];a[l]={...t.task,outputLines:u.outputLines,text:u.text,description:t.task.description===UA&&u.description!==UA?u.description:t.task.description,swarmIndex:t.task.swarmIndex??u.swarmIndex,parentToolCallId:t.task.parentToolCallId??u.parentToolCallId,subagentType:t.task.subagentType??u.subagentType,model:t.task.model??u.model,thinkingEffort:t.task.thinkingEffort??u.thinkingEffort,runInBackground:t.task.runInBackground??u.runInBackground,backgroundTaskId:t.task.backgroundTaskId??u.backgroundTaskId,agentId:t.task.agentId??u.agentId},s.tasksBySession[o]=a}break}case"taskProgress":{const o=t.sessionId,r=s.tasksBySession[o]??[];s.tasksBySession[o]=r.map(l=>{if(l.id!==t.taskId)return l;if(l.kind==="subagent"&&t.kind==="text")return{...l,text:(l.text??"")+t.outputChunk};const a=l.outputLines??[];if(a.at(-1)===t.outputChunk)return l;const u=[...a,t.outputChunk];return{...l,outputLines:l.kind==="subagent"?u:u.slice(-40)}});break}case"taskCompleted":{const o=t.sessionId,r=s.tasksBySession[o]??[];s.tasksBySession[o]=r.map(l=>l.id!==t.taskId?l:{...l,status:t.status,completedAt:l.completedAt??new Date().toISOString(),completedAtEstimated:l.completedAt===void 0?!0:l.completedAtEstimated,outputPreview:t.outputPreview,outputBytes:t.outputBytes});break}case"goalUpdated":{const o=t.sessionId;s.goalVersionBySession[o]=(s.goalVersionBySession[o]??0)+1,t.goal===null||t.goal.status==="complete"?delete s.goalBySession[o]:s.goalBySession[o]=t.goal;break}case"configChanged":{s.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":{t.reason==="blocked"&&qa(e,n)&&lc(s,t.sessionId);break}case"promptAborted":{if(t.promptId===e.turnEndedPromptIdBySession[t.sessionId])break;qa(e,n)&&lc(s,t.sessionId);break}case"turnActiveChanged":{if(!qa(e,n))break;s.sessions=s.sessions.map(o=>o.id===t.sessionId?{...o,mainTurnActive:t.active}:o),t.active?(s.turnActiveBySession[t.sessionId]=!0,delete s.turnEndedPromptIdBySession[t.sessionId],delete s.turnErrorBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId],lc(s,t.sessionId)):(delete s.turnActiveBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId],t.promptId!==void 0&&(s.turnEndedPromptIdBySession[t.sessionId]=t.promptId),lc(s,t.sessionId));break}case"turnRetry":{if(!qa(e,n))break;t.retry===void 0?delete s.turnRetryBySession[t.sessionId]:s.turnRetryBySession[t.sessionId]=t.retry;break}case"unknown":{const o=t.raw;if(!(o&&o._noop===!0))if(o&&o._agentError){if(qa(e,n)){if(n.sessionId!==void 0){const r=o.details??{};s.turnErrorBySession[n.sessionId]={code:o.code,message:o.message,name:o.name,retryable:o.retryable,statusCode:typeof r.statusCode=="number"?r.statusCode:void 0,requestId:typeof r.requestId=="string"?r.requestId:void 0}}(n.sessionId===void 0||n.sessionId!==e.activeSessionId)&&(s.warnings=[...s.warnings,WJ(o,i.t)])}}else if(o&&o._agentWarning){const r=o.message??o.code??i.t("warnings.agentWarningFallback");s.warnings=[...s.warnings,`${i.t("warnings.noteLabel")}: ${r}`]}else{const r=o?.type??"(unknown)";s.warnings=[...s.warnings,i.t("warnings.unhandledEvent",{type:r})]}break}}return s}function UJ(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Zo(e,t){for(const n of Object.keys(t))Object.is(e[n],t[n])||(e[n]=t[n]);for(const n of Object.keys(e))n in t||delete e[n]}const KJ=[{pattern:/\brm\s+(?:-[a-zA-Z]*[rf][a-zA-Z]*|--recursive|--force)\b/,detail:"rm -rf"},{pattern:/\bsudo\b/,detail:"sudo"},{pattern:/\bmkfs(?:\.[a-z0-9]+)?\b/,detail:"mkfs"},{pattern:/\bdd\b[^|;&]*\bof=/,detail:"dd of=…"},{pattern:/>\s*\/dev\/(?:sd|nvme|disk|hd)/,detail:"> /dev/…"},{pattern:/:\(\)\s*\{/,detail:"fork bomb"},{pattern:/\bgit\s+push\b[^|;&]*(?:--force(?:-with-lease)?\b|\s-f\b)/,detail:"git push --force"},{pattern:/\bchmod\s+(?:-[a-zA-Z]+\s+)*777\b/,detail:"chmod 777"},{pattern:/\b(?:curl|wget)\b[^|;&]*\|\s*(?:sudo\s+)?(?:ba|z)?sh\b/,detail:"curl | sh"},{pattern:/\b(?:shutdown|reboot|poweroff|halt)\b/,detail:"shutdown / reboot"}];function OT(e){const t=e.replace(/"[^"]*"|'[^']*'/g," ");for(const{pattern:n,detail:i}of KJ)if(n.test(t))return i}const PT="kimiWeb.taskNotification",VJ=/<notification\b([^>]*)>([\s\S]*?)<\/notification>/g,ZJ=/([\w-]+)="([^"]*)"/g,GJ=/<output-file\b([^>]*)>[\s\S]*?<\/output-file>/,QJ=/^Title: (.*)$/m,YJ=/^Severity: (.*)$/m;function l3(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function GA(e){const t={};for(const n of e.matchAll(ZJ))n[1]!==void 0&&n[2]!==void 0&&(t[n[1]]=l3(n[2]));return t}function JJ(e,t,n){const i=GA(e),s=QJ.exec(t)?.[1]?.trim()??"",o=YJ.exec(t)?.[1]?.trim()??"";let r=t.split(` -`).filter(c=>!c.startsWith("Title: ")&&!c.startsWith("Severity: ")).join(` -`);const l=r.search(/^<\w/m);l!==-1&&(r=r.slice(0,l)),r=r.trim();const a=GJ.exec(t),u=a?(()=>{const c=GA(a[1]??""),d=Number(c.bytes);return c.path!==void 0&&c.path!==""?{path:c.path,bytes:Number.isFinite(d)?d:void 0}:void 0})():void 0;return{id:i.id??"",category:i.category??"",type:i.type??"",sourceKind:i.source_kind??"",sourceId:i.source_id??"",agentId:i.agent_id,title:l3(s),severity:o,body:l3(r),outputFile:u,raw:n}}function XJ(e){if(!e.includes("<notification"))return[];const t=[];for(const n of e.matchAll(VJ))n[1]===void 0||n[2]===void 0||t.push(JJ(n[1],n[2],n[0]));return t}function eX(e){const t=e?.[PT];if(typeof t!="object"||t===null)return;const n=t;for(const i of["id","category","type","sourceKind","sourceId","title","severity","body","raw"])if(typeof n[i]!="string")return;return t}function Cg(e){for(const t of["completed","failed","timed_out","killed","lost"])if(e.type.endsWith(`.${t}`))return t;return"info"}function tX(e){const t=Cg(e);return t==="completed"?"ok":t==="failed"||t==="timed_out"||t==="lost"?"err":t==="killed"?"warn":e.severity==="error"?"err":e.severity==="warning"?"warn":"info"}const nX=1e6,QA=5e3;function Ul(e){return e===""?[]:e.endsWith(` -`)?e.slice(0,-1).split(` -`):e.split(` -`)}function Ff(e,t){const n=Ul(e),i=Ul(t),s=n.length,o=i.length;if(s===0&&o===0)return[];if(s>QA||o>QA||(s+1)*(o+1)>nX)return null;const r=Array.from({length:s+1},()=>Array.from({length:o+1},()=>0));for(let p=1;p<=s;p++)for(let g=1;g<=o;g++)r[p][g]=n[p-1]===i[g-1]?r[p-1][g-1]+1:Math.max(r[p-1][g],r[p][g-1]);const l=[];let a=s,u=o;for(;a>0||u>0;)a>0&&u>0&&n[a-1]===i[u-1]?(l.push({type:"context",text:n[a-1]}),a--,u--):u>0&&(a===0||r[a][u-1]>=r[a-1][u])?(l.push({type:"add",text:i[u-1]}),u--):(l.push({type:"del",text:n[a-1]}),a--);l.reverse();const c=[];let d=1,f=1;for(const p of l)p.type==="context"?(c.push({type:"context",text:p.text,oldNo:d,newNo:f}),d++,f++):p.type==="add"?(c.push({type:"add",text:p.text,newNo:f}),f++):(c.push({type:"del",text:p.text,oldNo:d}),d++);return c}const YA=500;function Cm(e,t){const n=[],i=Ul(e),s=Ul(t),o=Math.min(i.length,YA),r=Math.min(s.length,YA);for(let l=1;l<=o;l++)n.push({type:"del",text:i[l-1],oldNo:l});i.length>o&&n.push({type:"context",text:`… ${i.length-o} more lines …`});for(let l=1;l<=r;l++)n.push({type:"add",text:s[l-1],newNo:l});return s.length>r&&n.push({type:"context",text:`… ${s.length-r} more lines …`}),n}function jT(e){let t=0,n=0;for(const i of e)i.type==="add"?t++:i.type==="del"&&n++;return{added:t,removed:n}}const iX=/^read[_-]?media(?:file)?$/i,sX=/^data:([^;]+);base64,(.*)$/s,oX=/^<(image|video|audio)\s+path="([^"]+)">$/,rX=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,lX=/Mime type:\s*([^.\s]+)/i,aX=/Size:\s*(\d+)\s*bytes/i,uX=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,cX="<system>Image compressed to fit model limits:",dX=/<system>Image compressed to fit model limits:[\s\S]*?<\/system>/g;function fX(e){return e.includes(cX)?e.replace(dX,""):e}function hX(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function JA(e){const t=rX.exec(e.trim());return t?{kind:t[1],path:hX(t[2])}:null}const HT=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,pX=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function a3(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),i=n>0?t.slice(0,n):t;return HT.test(i)?i:void 0}const gX=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function XA(e){const t=gX.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",i=pX.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:i!==void 0&&HT.test(i)?i:void 0}}function mX(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function vX(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function yX(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const o=s.url;return typeof o=="string"?{kind:n,url:o}:null}function bX(e,t){if(!iX.test(e))return;const n=vX(t);if(n===null)return;let i,s,o,r,l,a=null;for(const c of n){if(typeof c!="object"||c===null)continue;const d=c;if(d.type==="text"&&typeof d.text=="string"){const p=d.text,g=oX.exec(p);g&&(s=g[1],i=g[2]);const m=lX.exec(p);m?.[1]&&(o=m[1]);const y=aX.exec(p);y?.[1]&&(r=Number(y[1]));const w=uX.exec(p);w?.[1]&&w[2]&&(l=`${w[1]}x${w[2]}`);continue}const f=yX(d);f&&(a=f)}if(a===null)return;const u=sX.exec(a.url);return u?.[1]&&(o=u[1]),u?.[2]&&(r=mX(u[2])),{kind:a.kind??s??"image",url:a.url,path:i,fileId:a.url.startsWith("ms://")&&i!==void 0?a3(i):void 0,mimeType:o,bytes:Number.isFinite(r)?r:void 0,dimensions:l}}function B5(e){if(e!=null){if(typeof e=="string")return e.split(` -`);if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="string")t.push(...n.split(` -`));else if(n&&typeof n=="object"){const i=n;i.type==="text"&&typeof i.text=="string"?t.push(...i.text.split(` -`)):i.type==="think"&&typeof i.think=="string"?t.push(...i.think.split(` -`)):i.type==="image_url"||i.type==="image"?t.push("[image]"):typeof i.type=="string"?t.push(`[${i.type}]`):t.push(JSON.stringify(n))}return t.length>0?t:void 0}return[JSON.stringify(e)]}}function kX(e,t){if(ao(e)==="task")for(const n of t??[]){const i=/^agent_id:\s*(\S+)\s*$/.exec(n);if(i?.[1])return i[1]}}function AX(e,t){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,prompt:e.command??t,model:e.model,thinkingEffort:e.thinkingEffort,phase:e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase??"working",status:e.status,summary:e.outputPreview,outputLines:e.outputLines,text:e.text,suspendedReason:e.suspendedReason,swarmIndex:e.swarmIndex}}function CX(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const i=typeof t.path=="string"?t.path:"";if(Array.isArray(t.diff))return{kind:"diff",path:i,diff:t.diff};const s=typeof t.old_text=="string"?t.old_text:typeof t.before=="string"?t.before:void 0,o=typeof t.new_text=="string"?t.new_text:typeof t.after=="string"?t.after:void 0;if(s!==void 0&&o!==void 0){const r=Ff(s,o)??Cm(s,o);return{kind:"diff",path:i,diff:r}}return{kind:"diff",path:i,diff:[]}}if(n==="file_io"){const i=typeof t.path=="string"?t.path:"",s=typeof t.operation=="string"?t.operation:"";if(s==="write"&&typeof t.content=="string")return{kind:"file",path:i,content:t.content};if(s==="edit"&&typeof t.before=="string"&&typeof t.after=="string"){const r=Ff(t.before,t.after)??Cm(t.before,t.after);return{kind:"diff",path:i,diff:r}}const o=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:s||n,path:i,detail:o}}if(n==="shell"||n==="command"){const i=typeof t.command=="string"?t.command:e.action;return{kind:"shell",command:i,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:OT(i)}}if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(o=>{const r=o??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const i=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:i,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function wX(e){const t=`<prompt> -`,n=` -</prompt>`,i=e.indexOf(t),s=e.lastIndexOf(n);return i>=0&&s>=i+t.length?e.slice(i+t.length,s):xX(e)}function xX(e){const t=e.split(` -`);return t.length>=2&&t[0]?.startsWith("<cron-fire ")&&t.at(-1)==="</cron-fire>"?t.slice(1,-1).join(` -`):e}function _X(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function SX(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` -`);return wX(t)}function MX(e,t){const n=e.metadata?.origin??{},i=SX(e);return t==="cron_missed"?{text:i,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:i,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function IX(e,t,n){const{text:i,cron:s}=MX(e,n);return{id:e.id,role:"cron",no:t,text:i,createdAt:e.createdAt,cron:s}}function EX(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function TX(e){return e.metadata?.origin?.kind==="compaction_summary"}function LX(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function NX(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function FX(e){const t=[];for(const n of e){const i=t.at(-1);n.type==="text"&&i?.type==="text"?i.text+=n.text:n.type==="thinking"&&i?.type==="thinking"?i.thinking+=n.thinking:n.type==="thinking"?t.push({type:"thinking",thinking:n.thinking}):t.push({...n})}return JSON.stringify(t)}function WT(e,t,n,i=!0,s={},o={},r){const l=[];let a=r?.startNo??1;const u=r?.collect,c=new Map;for(const m of t)c.set(m.toolCallId,m);let d=null;function f(m=!1){if(!d)return;const y=d;if(d=null,!m&&y.blocks.length===0&&y.textParts.length===0&&y.thinkingParts.length===0&&y.tools.length===0)return;if(!m||!i)for(let k=0;k<y.tools.length;k++){const A=y.tools[k];if(A.status!=="running")continue;const v={...A,status:"ok"};y.tools[k]=v;const x=y.blocks.find(E=>E.kind==="tool"&&E.tool.id===v.id);x&&x.kind==="tool"&&(x.tool=v)}const w={id:y.id,role:"assistant",no:a++,text:y.textParts.join(` -`),thinking:y.thinkingParts.length>0?y.thinkingParts.join(` -`):void 0,tools:y.tools.length>0?y.tools:void 0,blocks:y.blocks.length>0?y.blocks:void 0,approval:y.approval,approvalId:y.approvalId,durationMs:y.durationMs,createdAt:y.createdAt,endedAt:y.endedAt,goalContinuation:y.goalContinuation};l.push(w),u?.(w,y.sources)}function p(m,y){let w=null;for(const k of y)if(k.type==="text"){if(k.text){w==="text"?m.textParts[m.textParts.length-1]+=k.text:m.textParts.push(k.text);const A=m.blocks.at(-1);A&&A.kind==="text"?A.text+=(w==="text"?"":` -`)+k.text:m.blocks.push({kind:"text",text:k.text}),w="text"}}else if(k.type==="thinking"){if(k.thinking){w==="thinking"?m.thinkingParts[m.thinkingParts.length-1]+=k.thinking:m.thinkingParts.push(k.thinking);const A=m.blocks.at(-1);if(A&&A.kind==="thinking"){A.thinking+=(w==="thinking"?"":` -`)+k.thinking;const v=[A.startedAt,k.startedAt].filter(S=>S!==void 0).sort()[0],x=A.startedAt!==void 0&&A.durationMs===void 0||k.startedAt!==void 0&&k.durationMs===void 0,E=[A,k].flatMap(S=>S.startedAt!==void 0&&S.durationMs!==void 0?[Date.parse(S.startedAt)+S.durationMs]:[]);A.startedAt=v,A.durationMs=!x&&v!==void 0&&E.length>0?Math.max(...E)-Date.parse(v):void 0}else m.blocks.push({kind:"thinking",thinking:k.thinking,startedAt:k.startedAt,durationMs:k.durationMs});w="thinking"}}else if(k.type==="toolUse"){w=null;const A=c.get(k.toolCallId),v=k.toolName==="ExitPlanMode"?o[k.toolCallId]:void 0,x={id:k.toolCallId,name:k.toolName,arg:typeof k.input=="string"?k.input:JSON.stringify(k.input),agentId:ao(k.toolName)==="task"?k.agentRefs?.find(E=>E.role!=="member")?.agentId??k.agentRefs?.[0]?.agentId:void 0,status:"running",output:k.outputLines,plan:v,planPath:k.toolName==="ExitPlanMode"?v?.path??s[k.toolCallId]?.path:void 0};m.tools.push(x),m.blocks.push({kind:"tool",tool:x}),A&&(m.approval=CX(A),m.approvalId=A.approvalId)}else if(k.type==="toolResult"){w=null;const A=m.tools.findIndex(v=>v.id===k.toolCallId);if(A!==-1){const v=m.tools[A],x=B5(k.output),E={...v,status:k.isError?"error":"ok",output:x,media:k.isError?void 0:bX(v.name,k.output),agentId:v.agentId??kX(v.name,x)};E.name==="ExitPlanMode"&&!E.planPath&&(E.planPath=NX(E.output)),m.tools[A]=E;const S=m.blocks.find(M=>M.kind==="tool"&&M.tool.id===k.toolCallId);S&&S.kind==="tool"&&(S.tool=E)}}else w=null}function g(m){if(m.type==="image"||m.type==="video"){const y=m.type,w=m.source;if(w.kind==="url")return{url:w.url,kind:y};if(w.kind==="base64")return{url:`data:${w.mediaType};base64,${w.data}`,kind:y};if(w.kind==="file"&&n)return{url:n(w.fileId),kind:y,fileId:w.fileId}}if(m.type==="file"&&n){if(m.mediaType.startsWith("image/"))return{url:n(m.fileId),kind:"image",fileId:m.fileId};if(m.mediaType.startsWith("video/"))return{url:n(m.fileId),kind:"video",fileId:m.fileId}}}for(const m of e){if(m.role==="system")continue;if(TX(m)){f();const v=m.metadata?.[zT],x={id:m.id,role:"compaction",no:a,text:m.content.filter(E=>E.type==="text").map(E=>E.text).join(` -`),compaction:{trigger:v?.trigger,tokensBefore:v?.tokensBefore,tokensAfter:v?.tokensAfter}};l.push(x),u?.(x,[m]);continue}if(m.role==="user"){const v=_X(m),x=m.metadata?.origin?.kind,E=x==="skill_activation"&&m.metadata?.origin?.trigger!=="user-slash";if(v===void 0&&(x==="injection"||E))continue;if(v===void 0&&(x==="task"||x==="background_task"||x==="task_notification")){const $=m.content.filter(R=>R.type==="text").map(R=>R.text).join(` -`),P=eX(m.metadata),O=P!==void 0?[P]:XJ($);if(O.length>0){d??={id:m.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[m],createdAt:m.createdAt};for(const R of O)d.blocks.push({kind:"notification",notification:{...R,createdAt:m.createdAt}})}continue}if(f(),v!==void 0){const $=IX(m,a++,v);l.push($),u?.($,[m]);continue}if(x==="system_trigger"&&m.metadata?.origin?.name==="goal_continuation"){d={id:m.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[m],createdAt:m.createdAt,goalContinuation:!0};continue}if(!EX(m))continue;const S=m.metadata?.origin,M=S?.kind==="skill_activation"&&S?.trigger==="user-slash",_=S?.kind==="plugin_command"&&S?.trigger==="user-slash",N=[],D=[];for(const $ of m.content){if($.type==="text")if(M){const O=JA($.text);if(O&&(O.kind==="video"||O.kind==="image")&&n){const W=a3(O.path);if(W){D.push({url:n(W),kind:O.kind,fileId:W});continue}}const R=XA($.text);R&&D.push({kind:"file",url:R.fileId&&n?n(R.fileId):"",fileId:R.fileId,name:R.name,mediaType:R.mediaType,size:R.size})}else if(_)N.push(S.commandArgs??"");else{const O=JA($.text);if(O&&(O.kind==="video"||O.kind==="image")&&n){const z=a3(O.path);if(z){D.push({url:n(z),kind:O.kind,fileId:z});continue}}const R=XA($.text);if(R){D.push({kind:"file",url:R.fileId&&n?n(R.fileId):"",fileId:R.fileId,name:R.name,mediaType:R.mediaType,size:R.size});continue}const W=fX($.text);if(W!==$.text&&W.trim().length===0)continue;N.push(W)}const P=g($);if(P){D.push({url:P.url,kind:P.kind,name:$.type==="file"?$.name:void 0,fileId:P.fileId});continue}$.type==="file"&&n&&D.push({kind:"file",url:n($.fileId),fileId:$.fileId,name:$.name,mediaType:$.mediaType||void 0,size:$.size})}const T={id:m.id,role:"user",no:a++,text:M?S?.skillArgs??"":N.join(` -`),attachments:D.length>0?D:void 0,skillActivation:M?{name:S.skillName,args:S.skillArgs}:void 0,pluginCommand:_?{pluginId:S.pluginId,commandName:S.commandName,args:S.commandArgs}:void 0,createdAt:m.createdAt};l.push(T),u?.(T,[m]);continue}if(m.role==="tool"){d&&(d.sources.push(m),p(d,m.content),d.endedAt=m.createdAt);continue}const y=m.promptId;LX(d,y)?d!==null&&d.promptId===void 0&&y!==void 0&&(d.promptId=y):(f(),d={id:m.id,promptId:y,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[],durationMs:m.durationMs,createdAt:m.createdAt});const k=d;if(k===null)continue;const A=FX(m.content);k.promptId!==void 0&&k.seenSigs.has(A)||(k.seenSigs.add(A),k.sources.push(m),m.durationMs!==void 0&&(k.durationMs=m.durationMs),p(k,m.content),m.endedAt!==void 0?k.endedAt=m.endedAt:m.id!==k.id&&(k.endedAt=m.createdAt))}return f(!0),l}function BX(e,t,n){const i=e.items.filter(u=>u.kind==="turn"),s=i[0]?.turnId,o=i.length===1?s:void 0,r=new Map(e.tasks.map(u=>[u.taskId,u])),l=e.items.flatMap(u=>u.kind==="turn"?$X(u,e.attachments,r,u.turnId===s?n?.createdAt:void 0,u.turnId===o?n?.disposedAt:void 0):[]),a=e.meta.activity==="turn";return WT(l,[],t,a).map(RX)}function $X(e,t,n,i,s){const o=[],r=new Map(t.map(d=>[d.attachmentId,d])),l=zX([e.startedAt,...e.steps.map(d=>d.startedAt),i])??"",a=eC(e.endedAt)??eC(s),u=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const d=[{type:"text",text:e.prompt}];for(const f of e.attachmentIds??[]){const p=OX(r.get(f));p!==void 0&&d.push(p)}o.push({id:`${e.turnId}:input`,sessionId:"",role:"user",content:d,createdAt:l,promptId:u,metadata:e.origin.kind==="task"&&e.prompt.includes("<notification")?{origin:e.origin.payload??e.origin}:void 0})}for(const d of e.steps)for(const f of d.frames)if(f.kind==="text"){if(f.text.length===0)continue;if(f.role==="user"){if(f.taskId===void 0)continue;const p=DX(f.taskId,f.text,n.get(f.taskId));o.push({id:f.frameId,sessionId:"",role:"user",content:[{type:"text",text:f.text}],createdAt:d.startedAt??l,promptId:u,metadata:{origin:{kind:"task",taskId:f.taskId},[PT]:p}});continue}o.push({id:f.frameId,sessionId:"",role:"assistant",content:[{type:"text",text:f.text}],createdAt:d.startedAt??l,promptId:u})}else if(f.kind==="thinking"){if(f.text.length===0)continue;o.push({id:f.frameId,sessionId:"",role:"assistant",content:[{type:"thinking",thinking:f.text,startedAt:d.startedAt,durationMs:tC(d.startedAt,d.endedAt)}],createdAt:d.startedAt??l,promptId:u})}else f.kind==="tool"&&(o.push({id:`${f.frameId}:call`,sessionId:"",role:"assistant",content:[{type:"toolUse",toolCallId:f.toolCallId,toolName:f.name,input:f.input??f.display??{},outputLines:f.state==="running"?B5(f.output):void 0,agentRefs:f.agentRefs}],createdAt:d.startedAt??l,promptId:u}),f.state!=="running"&&o.push({id:`${f.frameId}:result`,sessionId:"",role:"tool",content:[{type:"toolResult",toolCallId:f.toolCallId,output:f.output??f.error??"",isError:f.state==="error"}],createdAt:d.endedAt??d.startedAt??l,promptId:u}));const c=e.durationMs??tC(l||void 0,a);if(c!==void 0){const d=o.findLastIndex(f=>f.role==="assistant");d>=0&&(o[d]={...o[d],durationMs:c})}return o}function DX(e,t,n){const[i="",...s]=t.split(` -`),o=n?.state??"info";return{id:`task:${e}:${o}`,category:"task",type:`task.${o}`,sourceKind:n?.kind==="subagent"?"subagent":"background_task",sourceId:e,agentId:n?.agentId,title:i.trim(),severity:o==="completed"?"info":"warning",body:s.join(` -`).trim(),raw:t}}function RX(e){if(e.createdAt!==""&&e.endedAt!=="")return e;const t={...e};return t.createdAt===""&&delete t.createdAt,t.endedAt===""&&delete t.endedAt,t}function zX(e){let t;for(const n of e){if(n===void 0)continue;const i=Date.parse(n);Number.isFinite(i)&&(t===void 0||i<t.time)&&(t={value:n,time:i})}return t?.value}function eC(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function OX(e){if(e?.source!==void 0){if(e.mediaType.startsWith("image/"))return{type:"image",source:e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId}};if(e.mediaType.startsWith("video/"))return{type:"video",source:e.source.kind==="url"?{kind:"url",url:e.source.url}:{kind:"file",fileId:e.source.fileId}};if(e.source.kind==="file")return{type:"file",fileId:e.source.fileId,name:e.name??e.attachmentId,mediaType:e.mediaType,size:e.size??0}}}function tC(e,t){if(e===void 0||t===void 0)return;const n=Date.parse(t)-Date.parse(e);return Number.isFinite(n)&&n>=0?n:void 0}const nC=6e3,u3=256*1024,PX=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;function iC(e,t){return t===0?e:e-1}function jX(e,t){const n=Ul(t),i=[];let s=0;for(const o of e){if(o.type==="hunk"){const r=PX.exec(o.text);if(!r)return null;const l=iC(Number(r[1]),r[2]===void 0?1:Number(r[2])),a=iC(Number(r[3]),r[4]===void 0?1:Number(r[4]));if(a<s||a>n.length)return null;for(;s<a;)i.push(n[s++]);if(i.length!==l)return null;continue}if(o.oldNo===void 0&&o.newNo===void 0)return null;if(o.type==="del"){i.push(o.text);continue}if(s>=n.length||n[s]!==o.text)return null;s++,o.type==="context"&&i.push(o.text)}for(;s<n.length;)i.push(n[s++]);return i.join(` -`)}async function HX(e,t){if(t.truncated||e.length===0)return null;const n=await t.readNewText()??"";if(n.length>u3||Ul(n).length>nC)return null;const i=jX(e,n);return i===null||i.length>u3||Ul(i).length>nC?null:{before:i,after:n}}const WX=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function qX(e){return WX.has(e.type)}const UX=50,KX=100,c3=32*1024,VX={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,UX)},cancelTask(e){clearTimeout(e)}};function ZX(e,t,n={}){const i=n.scheduler??VX,s=Math.max(1,Math.floor(n.maxItemsPerSlice??KX)),o=[];let r=0,l=null,a=null,u=0,c=!1;const d=()=>o.length-r,f=()=>{u+=1,l!==null&&(i.cancelFrame(l),l=null),a!==null&&(i.cancelTask(a),a=null)},p=()=>{r===o.length?(o.length=0,r=0):r>=1024&&(o.splice(0,r),r=0)};let g;const m=()=>{if(c||l!==null||a!==null||d()===0)return;const w=++u,k=()=>{w===u&&g()};l=i.requestFrame(k),a=i.requestTask(k)};g=()=>{f();let w=0;for(;!c&&w<s&&r<o.length;){const k=o[r++];e(k),w+=1}p(),m()};const y=(w=>{if(!c){if(t(w)){const k=o.length>r?o.at(-1):void 0,A=k===void 0?void 0:n.coalesce?.(k,w);A===void 0?o.push(w):o[o.length-1]=A,m();return}if(d()===0){e(w);return}o.push(w),g()}});return y.flush=()=>{if(!c){for(f();!c&&r<o.length;)e(o[r++]);p()}},y.discard=w=>{if(c||d()===0)return;let k=r;for(let A=r;A<o.length;A+=1){const v=o[A];w(v)||(o[k++]=v)}o.length=k,p(),d()===0?f():m()},y.dispose=()=>{c||(c=!0,f(),o.length=0,r=0)},y}function d3(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function GX(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,i=d3(t);if(n===void 0||i===void 0||n.kind!==i.kind||i.value.length<=c3)return[e];const s=[];let o=0;for(;o<i.value.length;){let r=Math.min(o+c3,i.value.length);r<i.value.length&&r>o&&/[\uD800-\uDBFF]/u.test(i.value[r-1])&&/[\uDC00-\uDFFF]/u.test(i.value[r])&&(r-=1);const l=i.value.slice(o,r);s.push({appEvent:{...t,delta:i.kind==="text"?{text:l}:{thinking:l}},meta:{...e.meta,stream:{...n,offset:n.offset+o}}}),o=r}return s}function QX(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,i=t.meta.stream,s=d3(e.appEvent),o=d3(t.appEvent);if(n===void 0||i===void 0||s===void 0||o===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==i.turnId||n.kind!==i.kind||s.kind!==o.kind||n.kind!==s.kind||i.kind!==o.kind||i.offset!==n.offset+s.value.length||s.value.length+o.value.length>c3)return;const r=s.value+o.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:r}:{thinking:r}},meta:{...t.meta,stream:{...n}}}}function YX(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function JX(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let i=n.content.length-1;i>=0;i--){const s=n.content[i];if(s.type!=="toolUse"||ao(s.toolName)!=="todo")continue;let o=s.input;if(typeof o=="string")try{o=JSON.parse(o)}catch{continue}const r=o?.todos;if(Array.isArray(r))return r.flatMap(l=>{const a=l??{},u=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return u?[{title:u,status:YX(a.status)}]:[]})}}return[]}function XX(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function eee(e){const t=[];if(!e)return t;let n=0,i=0,s=!1;for(const o of e.split(` -`)){if(o.startsWith("diff --git")){s=!1;continue}if(!s&&XX(o))continue;if(o.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(o);a&&(n=Number.parseInt(a[1],10),i=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:o});continue}if(!s||o.startsWith("\\"))continue;const r=o.charAt(0),l=o.slice(1);r==="+"?(t.push({type:"add",text:l,newNo:i}),i+=1):r==="-"?(t.push({type:"del",text:l,oldNo:n}),n+=1):r===" "&&(t.push({type:"context",text:l,oldNo:n,newNo:i}),n+=1,i+=1)}return t}function sC(e){return e?e.split(` -`).map(t=>t.trimEnd()).filter(Boolean).at(-1)??"":""}function tee(e){return e.suspendedReason||sC(e.text)||sC(e.outputLines?.join(` -`))||e.summary||""}function nee(e){return e.suspendedReason?e.suspendedReason:e.text?e.text:e.outputLines&&e.outputLines.length>0?e.outputLines.join(` -`):e.summary??""}function iee(e){return e==="completed"?"completed":e==="failed"?"failed":e==="aborted"?"cancelled":"working"}function oC(e,t){return{id:e.agentId??e.item??`result-${t}`,agentId:e.agentId,name:e.item??`subagent ${t+1}`,activity:e.body.split(` -`)[0]??"",phase:iee(e.outcome),body:e.body}}function see(e,t){return!!(t.agentId&&e.agentId===t.agentId||t.item&&e.name.includes(t.item))}function oee(e,t){const n=e.map(s=>({id:s.id,agentId:s.agentId,name:s.name,activity:tee(s),phase:s.phase,body:nee(s)}));if(!t)return n;const i=t.subagents.filter(s=>(s.outcome==="aborted"||s.state==="not_started")&&!e.some(o=>see(o,s))).map((s,o)=>oC(s,o));return n.length>0?[...n,...i]:t.subagents.map((s,o)=>oC(s,o))}const ree=["queued","working","suspended","completed","failed","cancelled"];function qT(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function lee(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function aee(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.swarmIndex===void 0)continue;const i=n.parentToolCallId??"swarm",s=t.get(i)??[];s.push({id:n.id,agentId:n.agentId,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,phase:qT(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,swarmIndex:n.swarmIndex}),t.set(i,s)}return[...t.entries()].map(([n,i])=>{const s=i.toSorted((r,l)=>r.swarmIndex-l.swarmIndex||r.id.localeCompare(l.id)),o=lee();for(const r of s)o[r.phase]++;return{id:n,members:s,counts:o}}).filter(n=>n.members.length>1).toSorted((n,i)=>{const s=n.members.at(0)?.swarmIndex??0,o=i.members.at(0)?.swarmIndex??0;return s!==o?s-o:n.id.localeCompare(i.id)})}function uee(e){let t=0,n=0;for(const i of e){n+=i.members.length;for(const s of ree)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=i.counts[s])}return{done:t,total:n}}function cee(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const i=t.get(n.parentToolCallId)??[];i.push({id:n.id,agentId:n.agentId,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,phase:qT(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,swarmIndex:n.swarmIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,i)}for(const[n,i]of t)t.set(n,i.toSorted((s,o)=>s.swarmIndex-o.swarmIndex||s.id.localeCompare(o.id)));return t}function $5(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function UT(e){for(const t of["path","file_path","filePath","filename"]){const n=e[t];if(typeof n=="string"&&n.length>0)return n}}const Uh=100*1024;function KT(e){const t=ao(e.name);if(t!=="edit"&&t!=="multi_edit")return null;const n=$5(e.arg);if(!n)return null;if(t==="edit"){if(n.replace_all===!0)return null;const l=typeof n.old_string=="string"?n.old_string:void 0,a=typeof n.new_string=="string"?n.new_string:void 0;return l===void 0||a===void 0||l.length>Uh||a.length>Uh?null:Ff(l,a)}const i=Array.isArray(n.edits)?n.edits:void 0;if(!i||i.length===0)return null;const s=[];let o=0,r=0;for(const l of i){if(!l||typeof l!="object")return null;const a=l;if(a.replace_all===!0)return null;const u=typeof a.old_string=="string"?a.old_string:void 0,c=typeof a.new_string=="string"?a.new_string:void 0;if(u===void 0||c===void 0||u.length>Uh||c.length>Uh)return null;const d=Ff(u,c);if(d===null)return null;s.length>0&&s.push({type:"hunk",text:"···"});for(const f of d)s.push({...f,oldNo:f.oldNo!==void 0?f.oldNo+o:void 0,newNo:f.newNo!==void 0?f.newNo+r:void 0});o+=Ul(u).length,r+=Ul(c).length}return s}const dee=5e3;function fee(e){if(ao(e.name)!=="write")return null;const t=$5(e.arg);return!t||typeof t.content!="string"||t.content.length>Uh||t.content.split(` -`).length>dee?null:{content:t.content,path:UT(t)}}function rC(e){const t=$5(e.arg);return t?UT(t):void 0}function VT(){let e=[],t=null,n=null,i=null,s,o=!0;const r=new WeakMap,l=a=>{const{messages:u,approvals:c}=a,d=a.sessionActive??!0,f=a.planReviewByToolCallId??{},p=a.plansByToolCallId??{},g=(S,M)=>r.set(S,M);let m=n!==null;if(m){const S=n,M=Object.keys(f);m=M.length===Object.keys(S).length&&M.every(_=>f[_]===S[_])}let y=i!==null;if(y){const S=i,M=Object.keys(p);y=M.length===Object.keys(S).length&&M.every(_=>p[_]===S[_])}const w=e.length>0&&c===t&&m&&y&&a.getFileUrl===s;let k=0,A=0,v=1;if(w){let S=-1;for(let M=e.length-1;M>=0;M--)if(e[M].role==="assistant"){S=M;break}for(let M=0;M<e.length;M++){const _=e[M],N=r.get(_);if(!N||N.length===0||M===S&&d!==o)break;let D=A+N.length<=u.length;for(let T=0;D&&T<N.length;T++)u[A+T]!==N[T]&&(D=!1);if(!D||M===S&&A+N.length!==u.length)break;k++,A+=N.length,_.role!=="compaction"&&v++}}const x=WT(u.slice(A),c,a.getFileUrl,d,f,p,{startNo:v,collect:g}),E=k>0?[...e.slice(0,k),...x]:x;return e=E,t=c,n={...f},i={...p},s=a.getFileUrl,o=d,E};return l.reset=()=>{e=[],t=null,n=null,i=null,s=void 0,o=!0},l}const ZT=["light","dark","system"],hee=["small","medium","large","xlarge"],ny="medium",GT="kimi-web.color-scheme",f3="kimi-web.font-scale",lC="kimi-web.ui-font-size";function h3(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function D5(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function pee(e){try{globalThis.localStorage.removeItem(e)}catch{}}function gee(){const e=h3(GT);return e&&ZT.includes(e)?e:"system"}const $0={light:"#ffffff",dark:"#121212"};function mee(e){if(typeof document>"u"||!document.documentElement)return;document.documentElement.dataset.colorScheme=e;const t=document.querySelectorAll('meta[name="theme-color"]');if(t.length===0)return;const n=e==="dark"?$0.dark:e==="light"?$0.light:null;t.forEach(i=>{const o=(i.getAttribute("media")??"").includes("dark")?$0.dark:$0.light;i.setAttribute("content",n??o)})}function QT(e){return hee.includes(e)}function vee(e){return e<=13?"small":e<=15?"medium":e<=17?"large":"xlarge"}function yee(){const e=h3(f3);if(e==="xxlarge")return"xlarge";if(e!==null)return QT(e)?e:ny;const t=h3(lC);if(t===null)return ny;const n=Number(t),i=Number.isFinite(n)?vee(n):ny;return D5(f3,i),pee(lC),i}function bee(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=e)}const R5=Z(gee()),z5=Z(yee());let aC=!1;function kee(){aC||(aC=!0,Qe(R5,mee,{immediate:!0}),Qe(z5,bee,{immediate:!0}))}function Aee(e){ZT.includes(e)&&(R5.value=e,D5(GT,e))}function Cee(e){QT(e)&&(z5.value=e,D5(f3,e))}function YT(){return kee(),{colorScheme:R5,fontScale:z5,setColorScheme:Aee,setFontScale:Cee}}const D0=Z(!1);let uC=!1;function iy(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function rv(){return!uC&&typeof window<"u"&&typeof document<"u"&&(uC=!0,D0.value=iy(),new MutationObserver(()=>{D0.value=iy()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{D0.value=iy()})),D0}const wee=Symbol("KimiWebClientFacade"),xee="modulepreload",_ee=function(e){return"/"+e},cC={},ns=function(t,n,i){let s=Promise.resolve();if(n&&n.length>0){let r=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),a=l?.nonce||l?.getAttribute("nonce");s=r(n.map(u=>{if(u=_ee(u),u in cC)return;cC[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":xee,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return s.then(r=>{for(const l of r||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};function Ma(e,t){const n=t??{h:"h",m:"m",s:"s"},i=Math.max(0,Math.floor(e/1e3));if(i<60)return i===0?"":`${i}${n.s}`;const s=Math.floor(i/60);if(s<60){const l=i%60;return l===0?`${s}${n.m}`:`${s}${n.m}${l}${n.s}`}const o=Math.floor(s/60),r=s%60;return r===0?`${o}${n.h}`:`${o}${n.h}${r}${n.m}`}const JT=new Set(["read","bash","grep","search","glob","ls","web_fetch","edit","write"]);function XT(e){const t=ao(e);return t==="multi_edit"?"edit":t}function eL(e){const t=[],n=new Map;for(const i of e){if(i.kind==="thinking")continue;const s=XT(i.tool.name);let o=n.get(s);o||(o={count:0,errors:0},n.set(s,o),t.push(s)),o.count++,i.tool.status==="error"&&o.errors++}return{order:t,byKind:n}}function tL(e,t,n){return JT.has(t)?e(`tools.group.typed.${t}.done`,{count:n}):e("tools.group.countOther",{count:n})}function nL(e,t){return{text:e("tools.activity.failedClause",{count:t}),tone:"danger"}}function iL(e){return e.map(t=>t.fragments.map(n=>n.text).join("")).join(" · ")}function See(e,t,n={}){const{order:i,byKind:s}=eL(t),o=[];let r=!1;for(const l of i){const a=s.get(l);if(!a)continue;const u=[{text:tL(e,l,a.count),tone:"normal"}];a.errors>0&&(r=!0,u.push(nL(e,a.errors))),o.push({fragments:u})}if(n.durationMs!==void 0){const l=Ma(n.durationMs);l&&o.push({fragments:[{text:l,tone:"faint"}]})}return{clauses:o,plain:iL(o),hasError:r}}function Mee(e,t){if(t.kind==="thinking")return{fragments:[{text:e("thinking.streaming"),tone:"normal"}]};const n=XT(t.tool.name);let i=F5(e,t.tool.name,t.tool.arg);if(n==="write"&&i){const o=e("tools.chip.created");i.endsWith(o)&&(i=i.slice(0,i.length-o.length).trimEnd())}return{fragments:[{text:i&&JT.has(n)?e(`tools.activity.doing.${n}`,{subject:i}):e("tools.activity.busy"),tone:"normal"}]}}function Iee(e,t,n){const i=t.filter(c=>c!==n&&!(c.kind==="tool"&&c.tool.status==="running")),{order:s,byKind:o}=eL(i),r=e("tools.activity.liveDonePrefix"),l=[];for(const c of s){const d=o.get(c);if(!d)continue;const f=[{text:`${r}${tL(e,c,d.count)}`,tone:"faint"}];d.errors>0&&f.push(nL(e,d.errors)),l.push({fragments:f})}const a=n===null?null:Mee(e,n),u=a?[a,...l]:l;return{current:a,done:l,plain:iL(u)}}async function ro(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return Eee(e)}function Eee(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const Tee={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},Lee={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function Nee(e){const t=e?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!t)return;const n=Lee[t];if(n)return n;const i=t.lastIndexOf(".");if(!(i<=0))return Tee[t.slice(i+1)]}const Fee="kimi_desktop",Bee="platform",dC="kimi-desktop",fC="kimi-desktop-platform";function $ee(){let e=!1,t=null;try{const n=new URLSearchParams(window.location.search);n.has(Fee)?(sessionStorage.setItem(dC,"1"),e=!0):e=e||sessionStorage.getItem(dC)==="1";const i=n.get(Bee);i?(sessionStorage.setItem(fC,i),t=i):t=sessionStorage.getItem(fC)}catch{}return{isDesktop:e,platform:t}}const p3=$ee(),Wf=p3.isDesktop,Dc=p3.isDesktop&&p3.platform==="darwin",Dee=["faces","nature","food","activity","objects","symbols"],Ree=[["😀","faces","grinning smile happy 笑 开心"],["😄","faces","smile happy joy 笑 开心 高兴"],["😁","faces","grin beaming 咧嘴笑 开心"],["😂","faces","joy laugh tears 笑哭 爆笑"],["🤣","faces","rofl laugh rolling 笑翻 爆笑"],["😊","faces","blush shy happy 微笑 害羞"],["😉","faces","wink 眨眼"],["😍","faces","heart eyes love 爱心眼 喜欢 爱"],["🥰","faces","smiling hearts love 爱心 喜欢"],["😘","faces","kiss 飞吻 亲亲"],["😋","faces","yum tongue 好吃 馋"],["🤪","faces","zany crazy 鬼脸 疯"],["🤔","faces","thinking hmm consider 思考 想"],["🤨","faces","skeptical eyebrow 怀疑 挑眉"],["😐","faces","neutral meh 面无表情 无语"],["😑","faces","expressionless 面无表情 无语"],["🙄","faces","eye roll 翻白眼 无语"],["😶","faces","no mouth silent 无言 沉默"],["🫡","faces","salute 敬礼 收到"],["🤫","faces","shush quiet 嘘 安静"],["🤭","faces","oops giggle 捂嘴 偷笑"],["😴","faces","sleeping sleepy 睡觉 困"],["😪","faces","sleepy tired 困 疲惫"],["😷","faces","mask sick 口罩 生病"],["🤒","faces","sick fever 生病 发烧"],["🤕","faces","hurt bandage 受伤"],["🤢","faces","nauseated 恶心"],["🤯","faces","mind blown explode 震惊 爆炸"],["🥳","faces","party celebrate 庆祝 派对"],["🤩","faces","star struck 星星眼 激动"],["😎","faces","cool sunglasses 酷 墨镜"],["🥸","faces","disguise 伪装 假扮"],["🤓","faces","nerd geek 书呆子 学霸"],["😢","faces","cry sad 哭 难过"],["😭","faces","sob cry loudly 大哭 痛哭"],["😤","faces","triumph huff 哼 生气"],["😡","faces","angry rage mad 生气 愤怒"],["🤬","faces","swearing cursing 骂人 爆粗"],["😱","faces","scream fear 尖叫 害怕"],["😨","faces","fearful 害怕 恐惧"],["🥵","faces","hot heat 热 出汗"],["🥶","faces","cold freezing 冷 冻"],["🥴","faces","woozy drunk 晕 醉"],["😇","faces","angel innocent 天使 无辜"],["🙃","faces","upside down silly 倒脸 哭笑不得"],["💀","faces","skull dead 骷髅 笑死"],["👻","faces","ghost 鬼 幽灵"],["👍","faces","thumbs up like good 赞 好"],["👎","faces","thumbs down dislike 踩 差"],["👏","faces","clap applause 鼓掌 厉害"],["🙌","faces","raise hands celebrate 举手 庆祝"],["🙏","faces","pray thanks please 拜托 感谢 祈祷"],["💪","faces","muscle strong flex 加油 强壮 肌肉"],["👀","faces","eyes look watch 看 围观 眼睛"],["🤝","faces","handshake deal 握手 合作"],["✌️","faces","victory peace 胜利 耶"],["👋","faces","wave hello bye 挥手 你好 再见"],["🤞","faces","crossed fingers luck 祈祷 好运"],["👌","faces","ok okay 好的 可以"],["🫶","faces","heart hands love 比心 爱心"],["✍️","faces","writing hand 写字 记录"],["🧠","faces","brain smart 大脑 聪明"],["🦾","faces","mechanical arm 机械臂 力量"],["👤","faces","person user profile 个人 用户"],["👥","faces","people team group 团队 多人"],["🐶","nature","dog puppy 狗 小狗"],["🐱","nature","cat kitten 猫 小猫"],["🐭","nature","mouse rat 老鼠"],["🐹","nature","hamster 仓鼠"],["🐰","nature","rabbit bunny 兔子"],["🦊","nature","fox 狐狸"],["🐻","nature","bear 熊"],["🐼","nature","panda 熊猫"],["🐨","nature","koala 考拉"],["🐯","nature","tiger 老虎"],["🦁","nature","lion 狮子"],["🐮","nature","cow 牛"],["🐷","nature","pig 猪"],["🐸","nature","frog 青蛙"],["🐵","nature","monkey 猴子"],["🐔","nature","chicken 鸡"],["🐧","nature","penguin 企鹅"],["🐦","nature","bird 鸟"],["🐣","nature","chick hatching 小鸡 孵化"],["🦆","nature","duck 鸭子"],["🦉","nature","owl 猫头鹰"],["🐝","nature","bee 蜜蜂"],["🐛","nature","bug caterpillar 虫子 毛虫"],["🦋","nature","butterfly 蝴蝶"],["🐌","nature","snail slow 蜗牛 慢"],["🐢","nature","turtle slow 乌龟 慢"],["🐍","nature","snake 蛇"],["🐙","nature","octopus 章鱼"],["🦑","nature","squid 鱿鱼"],["🦐","nature","shrimp 虾"],["🦀","nature","crab 螃蟹"],["🐠","nature","tropical fish 鱼 热带鱼"],["🐳","nature","whale 鲸鱼"],["🦈","nature","shark 鲨鱼"],["🐊","nature","crocodile 鳄鱼"],["🦄","nature","unicorn 独角兽"],["🐴","nature","horse 马"],["🐑","nature","sheep 羊 绵羊"],["🐐","nature","goat 山羊"],["🦜","nature","parrot 鹦鹉"],["🌸","nature","blossom flower sakura 樱花 花"],["🌹","nature","rose flower 玫瑰 花"],["🌻","nature","sunflower 向日葵"],["🌷","nature","tulip 郁金香"],["🌱","nature","seedling sprout 发芽 幼苗"],["🌲","nature","tree evergreen 树 松树"],["🌳","nature","deciduous tree 树 大树"],["🌵","nature","cactus 仙人掌"],["🍀","nature","clover luck 四叶草 幸运"],["🍁","nature","maple leaf autumn 枫叶 秋天"],["🍄","nature","mushroom 蘑菇"],["🌈","nature","rainbow 彩虹"],["☀️","nature","sun sunny 太阳 晴"],["🌙","nature","moon crescent 月亮"],["⭐","nature","star 星星"],["🌟","nature","glowing star 星星 闪亮"],["☁️","nature","cloud 云"],["⛅","nature","partly cloudy 多云"],["🌧️","nature","rain rainy 下雨"],["❄️","nature","snowflake snow 雪 雪花"],["⛄","nature","snowman 雪人"],["⚡","nature","lightning bolt 闪电"],["🔥","nature","fire hot 火 燃"],["🌊","nature","wave ocean sea 海浪"],["🏔️","nature","mountain snow 雪山 山"],["☕","food","coffee 咖啡"],["🍵","food","tea 茶"],["🧋","food","bubble tea boba 奶茶"],["🥛","food","milk 牛奶"],["🍺","food","beer 啤酒"],["🍷","food","wine 红酒"],["🥂","food","champagne cheers 香槟 干杯"],["🥤","food","cup straw soda 饮料 可乐"],["🧃","food","juice box 果汁"],["🍎","food","apple 苹果"],["🍊","food","orange tangerine 橙子 橘子"],["🍋","food","lemon 柠檬"],["🍉","food","watermelon 西瓜"],["🍓","food","strawberry 草莓"],["🍑","food","peach 桃子"],["🥭","food","mango 芒果"],["🍍","food","pineapple 菠萝"],["🥝","food","kiwi 猕猴桃"],["🍇","food","grapes 葡萄"],["🍒","food","cherries 樱桃"],["🥑","food","avocado 牛油果"],["🥦","food","broccoli 西兰花"],["🌽","food","corn 玉米"],["🌶️","food","hot pepper spicy 辣椒 辣"],["🍔","food","burger hamburger 汉堡"],["🍟","food","fries 薯条"],["🍕","food","pizza 披萨"],["🌭","food","hot dog 热狗"],["🥪","food","sandwich 三明治"],["🌮","food","taco 墨西哥卷"],["🍜","food","ramen noodles 拉面 面条"],["🍝","food","spaghetti pasta 意面"],["🍣","food","sushi 寿司"],["🍱","food","bento 便当"],["🥟","food","dumpling 饺子"],["🍚","food","rice 米饭"],["🍞","food","bread 面包"],["🥐","food","croissant 可颂 牛角包"],["🧀","food","cheese 奶酪 芝士"],["🍳","food","cooking egg 煎蛋 做饭"],["🍦","food","ice cream 冰淇淋"],["🍰","food","cake 蛋糕"],["🎂","food","birthday cake 生日蛋糕"],["🍫","food","chocolate 巧克力"],["🍩","food","donut doughnut 甜甜圈"],["🍪","food","cookie 饼干"],["🍭","food","lollipop 棒棒糖"],["⚽","activity","soccer football 足球"],["🏀","activity","basketball 篮球"],["🏈","activity","american football 橄榄球"],["⚾","activity","baseball 棒球"],["🎾","activity","tennis 网球"],["🏐","activity","volleyball 排球"],["🏓","activity","ping pong 乒乓球"],["🏸","activity","badminton 羽毛球"],["🥊","activity","boxing 拳击"],["⛳","activity","golf 高尔夫"],["🎣","activity","fishing 钓鱼"],["🏊","activity","swim 游泳"],["🏄","activity","surf 冲浪"],["🚴","activity","cycling 骑行"],["🏋️","activity","weightlifting gym 举重 健身"],["🧘","activity","yoga meditation 瑜伽 冥想"],["🎮","activity","video game controller 游戏 游戏机"],["🎲","activity","dice 骰子"],["🎯","activity","target bullseye 目标 靶心"],["🎳","activity","bowling 保龄球"],["🎰","activity","slot machine 老虎机"],["♟️","activity","chess 国际象棋 棋"],["🎸","activity","guitar 吉他"],["🎹","activity","piano keyboard 钢琴"],["🥁","activity","drum 鼓"],["🎤","activity","microphone sing 麦克风 唱歌"],["🎧","activity","headphones 耳机"],["🎬","activity","clapper movie 电影 拍摄"],["🎨","activity","art palette paint 画画 艺术"],["🎭","activity","theater masks 戏剧 面具"],["🎪","activity","circus 马戏团"],["🎡","activity","ferris wheel 摩天轮"],["✈️","activity","airplane travel flight 飞机 旅行"],["🚗","activity","car drive 汽车 车"],["🚕","activity","taxi 出租车"],["🚌","activity","bus 公交车"],["🚑","activity","ambulance 救护车"],["🚒","activity","fire engine 消防车"],["🚀","activity","rocket launch ship 火箭 发射"],["🛸","activity","ufo flying saucer 飞碟"],["🚲","activity","bicycle bike 自行车"],["🛴","activity","scooter 滑板车"],["🚄","activity","bullet train 高铁 动车"],["🚢","activity","ship 船 轮船"],["⛵","activity","sailboat 帆船"],["🏠","activity","house home 房子 家"],["🏢","activity","office building 公司 办公楼"],["🏥","activity","hospital 医院"],["🏫","activity","school 学校"],["🏖️","activity","beach vacation 海滩 度假"],["⛺","activity","camping tent 露营 帐篷"],["🌋","activity","volcano 火山"],["🗺️","activity","map world 地图"],["🧭","activity","compass 指南针"],["💻","objects","laptop computer 电脑 笔记本"],["🖥️","objects","desktop computer 台式机 电脑"],["⌨️","objects","keyboard 键盘"],["🖱️","objects","computer mouse 鼠标"],["📱","objects","phone mobile 手机"],["🔋","objects","battery 电池"],["🔌","objects","plug electric 插头"],["💾","objects","floppy save 软盘 保存"],["📀","objects","cd disc 光盘"],["🎥","objects","movie camera 摄像机"],["📷","objects","camera 相机"],["🔭","objects","telescope 望远镜"],["📡","objects","satellite antenna 卫星 天线"],["🌐","objects","globe web internet 网络 全球 互联网"],["🕯️","objects","candle 蜡烛"],["💡","objects","bulb idea light 灯泡 点子"],["🔦","objects","flashlight 手电筒"],["📁","objects","folder 文件夹"],["📂","objects","open folder 文件夹 打开"],["🗂️","objects","card index archive 归档 索引"],["📅","objects","calendar date 日历 日期"],["📌","objects","pin pushpin 图钉 置顶"],["📍","objects","round pin location 定位 位置"],["📎","objects","paperclip attachment 回形针 附件"],["✂️","objects","scissors cut 剪刀 剪切"],["📏","objects","ruler 尺子"],["📝","objects","memo note write 备忘 记录"],["✏️","objects","pencil edit write 铅笔 编辑"],["📄","objects","document page 文档 文件"],["📃","objects","page curl 文档 文件"],["📑","objects","bookmark tabs 标签页 文档"],["📚","objects","books 书 书籍"],["📖","objects","open book 打开的书 阅读"],["🔖","objects","bookmark 书签"],["🏷️","objects","label tag 标签"],["📊","objects","bar chart stats 图表 统计"],["📈","objects","chart up growth 上涨 增长"],["📉","objects","chart down 下跌 下降"],["🔍","objects","search magnifier 搜索 查找"],["🔎","objects","search magnifier right 搜索 查找"],["🔒","objects","lock locked 锁 锁定"],["🔓","objects","unlock open 解锁"],["🔑","objects","key 钥匙 密钥"],["🔧","objects","wrench tool 扳手 工具"],["🔨","objects","hammer 锤子"],["🛠️","objects","tools hammer wrench 工具 修理"],["🧰","objects","toolbox 工具箱 工具"],["🪛","objects","screwdriver 螺丝刀 工具"],["🔩","objects","nut and bolt screw 螺母 螺栓"],["🏗️","objects","building construction crane 施工 建造"],["⚙️","objects","gear settings 齿轮 设置"],["🧲","objects","magnet 磁铁"],["⚗️","objects","alembic 蒸馏器 实验"],["🧪","objects","test tube experiment 实验 试管"],["🔬","objects","microscope science 显微镜 科学"],["🤖","objects","robot bot 机器人"],["👾","objects","alien monster game 外星人 游戏"],["💣","objects","bomb 炸弹"],["🧨","objects","firecracker 爆竹"],["🗑️","objects","trash delete 垃圾桶 删除"],["🧹","objects","broom clean 扫帚 清理"],["🧻","objects","toilet paper 纸巾"],["🧽","objects","sponge 海绵"],["📦","objects","package box 包裹 箱子"],["✉️","objects","envelope mail 邮件 信封"],["📮","objects","mailbox postbox 邮箱"],["📧","objects","email mail 邮件"],["📥","objects","inbox tray receive 收件箱 接收"],["📤","objects","outbox tray send 发件箱 发送"],["📞","objects","telephone receiver call phone 电话 通话"],["💬","objects","speech balloon chat message bubble 聊天 对话 气泡 消息"],["💭","objects","thought balloon thinking 思考 想法 气泡"],["📣","objects","megaphone announcement 喇叭 公告"],["📢","objects","loudspeaker broadcast 广播 喇叭 通知"],["🚨","objects","police light alert emergency 警报 告警 紧急"],["🗳️","objects","ballot box vote 投票箱 投票"],["🔗","objects","link chain 链接 连接"],["🧩","objects","puzzle piece plugin 拼图 插件"],["🪄","objects","magic wand 魔法 魔杖"],["🛡️","objects","shield security 盾牌 安全"],["⚔️","objects","crossed swords 交叉剑 战斗"],["💳","objects","credit card 信用卡"],["💰","objects","money bag 钱袋 钱"],["🧾","objects","receipt 收据 小票"],["📿","objects","prayer beads 念珠"],["💍","objects","ring 戒指"],["👑","objects","crown 皇冠"],["🎩","objects","top hat 礼帽"],["🎒","objects","backpack 背包 书包"],["👓","objects","glasses 眼镜"],["🌂","objects","umbrella 雨伞"],["🕰️","objects","mantel clock 座钟"],["⌚","objects","watch 手表"],["⏱️","objects","stopwatch 秒表"],["🧯","objects","fire extinguisher 灭火器"],["🩹","objects","bandage patch fix 创可贴 补丁 修复"],["🎓","objects","graduation cap study learn 毕业 学习"],["🎫","objects","ticket 票 门票 工单"],["✅","symbols","check done complete 完成 对勾"],["✔️","symbols","checkmark correct 对勾 正确"],["❌","symbols","cross x wrong 错误 叉"],["❓","symbols","question help 问题 问号"],["❔","symbols","white question 问题 问号"],["❗","symbols","exclamation important 感叹号 重要"],["❕","symbols","white exclamation 感叹号"],["⚠️","symbols","warning caution 警告 注意"],["🚧","symbols","construction wip 施工 进行中"],["🚫","symbols","prohibited no 禁止"],["💥","symbols","boom explosion 爆炸"],["✨","symbols","sparkles shiny 闪亮 星星"],["🎉","symbols","tada party celebrate 庆祝 撒花"],["🎊","symbols","confetti party 庆祝 彩带"],["🏆","symbols","trophy champion 奖杯 冠军"],["🥇","symbols","gold medal first 金牌 第一"],["🥈","symbols","silver medal second 银牌 第二"],["🥉","symbols","bronze medal third 铜牌 第三"],["🎖️","symbols","military medal 勋章"],["🚩","symbols","red flag mark 红旗 标记"],["🏁","symbols","checkered flag finish 终点 完成"],["⏳","symbols","hourglass time waiting 沙漏 时间"],["⌛","symbols","hourglass done 沙漏 时间"],["🕐","symbols","clock one time 时钟 一点"],["⏰","symbols","alarm clock 闹钟"],["🔔","symbols","bell notification 铃铛 通知"],["🔕","symbols","bell slash mute 静音 免打扰"],["🕹️","symbols","joystick game 摇杆 游戏"],["🔴","symbols","red circle record 红圆 录制"],["🟢","symbols","green circle online 绿圆 在线"],["🟡","symbols","yellow circle 黄圆"],["🟠","symbols","orange circle 橙圆"],["🔵","symbols","blue circle 蓝圆"],["🟣","symbols","purple circle 紫圆"],["⚫","symbols","black circle 黑圆"],["⚪","symbols","white circle 白圆"],["🟥","symbols","red square 红方"],["🟩","symbols","green square 绿方"],["🟦","symbols","blue square 蓝方"],["🔺","symbols","red triangle up 三角 上"],["🔻","symbols","triangle down 三角 下"],["🔸","symbols","diamond orange 菱形"],["🔹","symbols","diamond blue 菱形"],["💠","symbols","diamond dot 菱形 花"],["🔶","symbols","diamond orange big 菱形"],["🔷","symbols","diamond blue big 菱形"],["▶️","symbols","play 播放"],["⏸️","symbols","pause 暂停"],["⏹️","symbols","stop 停止"],["⏺️","symbols","record 录制"],["⏩","symbols","fast forward 快进"],["⏪","symbols","rewind 快退"],["🔀","symbols","shuffle 随机 打乱"],["🔁","symbols","repeat 重复 循环"],["🔂","symbols","repeat one 单曲循环"],["🔄","symbols","refresh sync 刷新 同步"],["🔃","symbols","reload 重载"],["➕","symbols","plus add 加 新增"],["➖","symbols","minus 减"],["➗","symbols","divide 除"],["✖️","symbols","multiply 乘"],["💲","symbols","dollar money 美元 钱"],["™️","symbols","trademark 商标"],["©️","symbols","copyright 版权"],["®️","symbols","registered 注册商标"],["↔️","symbols","left right arrow 左右箭头"],["⬆️","symbols","up arrow 上箭头"],["⬇️","symbols","down arrow 下箭头"],["➡️","symbols","right arrow 右箭头"],["⬅️","symbols","left arrow 左箭头"],["🔙","symbols","back 返回"],["🔜","symbols","soon 很快"],["🔝","symbols","top 置顶 顶部"],["💤","symbols","zzz sleep 睡觉"],["🆕","symbols","new 新 新品"],["🆒","symbols","cool 酷"],["🆓","symbols","free 免费"],["🆗","symbols","ok 可以"],["🆙","symbols","up 提升"],["🆚","symbols","vs versus 对比"],["♾️","symbols","infinity 无限"],["💯","symbols","hundred perfect 满分 一百"],["💢","symbols","anger 生气"],["♨️","symbols","hot springs 温泉"],["🚸","symbols","children crossing 注意儿童"],["🔞","symbols","no one under eighteen 十八禁"],["📵","symbols","no mobile phones 禁止手机"],["❤️","symbols","red heart love 红心 爱"],["🧡","symbols","orange heart 橙心"],["💛","symbols","yellow heart 黄心"],["💚","symbols","green heart 绿心"],["💙","symbols","blue heart 蓝心"],["💜","symbols","purple heart 紫心"],["🖤","symbols","black heart 黑心"],["🤍","symbols","white heart 白心"],["🤎","symbols","brown heart 棕心"],["💔","symbols","broken heart 心碎"],["💕","symbols","two hearts 双心 爱心"],["💖","symbols","sparkling heart 闪亮的心"],["💗","symbols","growing heart 心动"]],sL=Ree.map(([e,t,n])=>({emoji:e,group:t,keywords:n}));function zee(e,t=24){const n=e.trim().toLowerCase();if(!n)return[];const i=[];for(const s of sL)if((s.keywords.includes(n)||s.emoji===n)&&(i.push(s.emoji),i.length>=t))break;return i}const Oee=8;function Pee(e,t,n=Oee){return[t,...e.filter(i=>i!==t)].slice(0,n)}function oL(e,t){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const i=new Date,s=c=>String(c).padStart(2,"0"),o=`${s(n.getHours())}:${s(n.getMinutes())}`,r=n.getFullYear()===i.getFullYear(),l=n.getMonth()===i.getMonth(),a=n.getDate()===i.getDate();if(r&&l&&a)return o;const u=new Date(i);return u.setDate(i.getDate()-1),n.getFullYear()===u.getFullYear()&&n.getMonth()===u.getMonth()&&n.getDate()===u.getDate()?`${t} ${o}`:r?`${s(n.getMonth()+1)}-${s(n.getDate())} ${o}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${o}`}catch{return e}}function Ia(e){if(e>=1024*1024)return`${hC(e/(1024*1024))}M`;if(e>=1024){const t=e/1024;return`${t>=100?Math.round(t):hC(t)}k`}return String(e)}function hC(e){const t=e.toFixed(1);return t.endsWith(".0")?t.slice(0,-2):t}function qf(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const jee=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function el(e){const t=e.replaceAll("\\","/"),n=jee.test(t),i=t.replace(/\/+$/,"");return n?i.toLowerCase():i}function Hee(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:i,sessionsHasMoreByWorkspace:s}=e,o=new Set(i.map(el)),r=new Map;for(const f of t){const p=el(f.root);o.has(p)||r.has(p)||r.set(p,{...f})}for(const f of n){const p=f.cwd;if(!p)continue;const g=el(p);o.has(g)||r.has(g)||r.set(g,{id:f.workspaceId??p,root:p,name:qf(p),sessionCount:0})}const l=new Map;for(const f of t){const p=el(f.root);l.has(p)||l.set(p,f.id)}const a=new Map;for(const f of n){const p=l.get(el(f.cwd))??f.workspaceId??f.cwd;a.set(p,(a.get(p)??0)+1)}const u=[];for(const f of t){const p=el(f.root);!o.has(p)&&!u.includes(p)&&u.push(p)}const c=[...r.keys()].filter(f=>!u.includes(f));c.sort((f,p)=>r.get(f).root.localeCompare(r.get(p).root));const d=[];for(const f of[...u,...c]){const p=r.get(f),g=a.get(p.id)??a.get(p.root)??0,m=s[p.id]===!1?g:Math.max(p.sessionCount,g);d.push({...p,sessionCount:m})}return d}function Wee(e,t){if(e===void 0||e.length===0)return;const n=t?.find(i=>i.id===e)??t?.find(i=>i.model===e);return n?.displayName||n?.model||(e.includes("/")?e.split("/").pop():e)}function qee(e){if(!(e===void 0||e.length===0||e==="off"||e==="on"))return e}function lv(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function rL(e){return e?.supportEfforts??[]}function Uee(e){return e[Math.floor(e.length/2)]}function G1(e){if(lv(e)==="unsupported")return"off";const t=rL(e);return t.length>0?e?.defaultEffort??Uee(t):"on"}function Ap(e){const t=rL(e),n=lv(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function g3(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function Kee(e){return e!=="off"}function Vee(e,t){return Ap(e).includes(t)}function O5(e,t){return t==="off"?"off":t==="on"?G1(e):t}function wm(e,t){return t??G1(e)}function Zee(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function Gee(e,t,n){return!n||e===void 0?t:G1(e)}let Qee=0;function m3(e,t){const n=++Qee;return e.pendingThinkingBySession[t]=n,n}function Ca(e,t,n){return n===void 0||e.pendingThinkingBySession[t]!==n?!1:(delete e.pendingThinkingBySession[t],!0)}function lL(e,t,n){e.pendingThinkingBySession[t]===void 0&&(e.thinkingBySession[t]=n)}function aL(){return window.kimiDesktop}function R0(){return typeof aL()?.getPathForFile=="function"}function uL(e){const t=aL()?.getPathForFile;if(typeof t!="function")return null;try{return t(e)}catch{return null}}function sy(e){return Array.from(e.dataTransfer?.items??[]).some(t=>t.kind==="file"&&t.type==="")}function v3(e,t=uL){const n=Array.from(e.dataTransfer?.items??[]);if(n.length===0)return{files:Array.from(e.dataTransfer?.files??[]),folderPaths:[]};const i=[],s=[],o=new Set;for(const r of n){if(r.kind!=="file")continue;const l=r.getAsFile();if(l)if(r.webkitGetAsEntry()?.isDirectory===!0){const a=t(l);if(!a||o.has(a))continue;o.add(a),s.push(a)}else i.push(l)}return{files:i,folderPaths:s}}function Yee(e,t=uL){return v3(e,t).folderPaths}const Jee=/<summary>([\s\S]*?)<\/summary>/,Xee=/<resume_hint>([\s\S]*?)<\/resume_hint>/,oy=/<subagent\b([^>]*)>|<\/subagent>/g,ete="</subagent>",pC=/(completed|failed|aborted):\s*(\d+)/g,gC=/([a-z_]+)="([^"]*)"/g;function tte(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function nte(e){const t={};gC.lastIndex=0;let n;for(;(n=gC.exec(e))!==null;)t[n[1]]=tte(n[2]);return t}function ite(e){const t={completed:0,failed:0,aborted:0};pC.lastIndex=0;let n;for(;(n=pC.exec(e))!==null;){const i=n[1];t[i]=Number(n[2])}return t}function ste(e,t){const n=nte(e);return{outcome:n.outcome??"completed",item:n.item,agentId:n.agent_id,mode:n.mode,state:n.state,body:t.trim()}}function ote(e){const t=[],n=[];oy.lastIndex=0;let i;for(;(i=oy.exec(e))!==null;)if(i[0]===ete){if(n.length===0)continue;const s=n.pop();s&&n.length===0&&t.push(ste(s.attrs,e.slice(s.bodyStart,i.index)))}else n.length===0?n.push({attrs:i[1]??"",bodyStart:oy.lastIndex}):n.push(null);return t}function rte(e){if(e==null)return null;const t=Array.isArray(e)?e.join(` -`):e;if(!t.includes("<agent_swarm_result>"))return null;const n=Jee.exec(t)?.[1]?.trim()??"",{completed:i,failed:s,aborted:o}=ite(n),r=Xee.exec(t)?.[1]?.trim(),l=ote(t),a=i+s+o;return{summary:n,completed:i,failed:s,aborted:o,total:a>0?a:l.length,subagents:l,resumeHint:r}}const lte=/^[A-Za-z]:[\\/]/;function mC(e){return lte.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function av(e,t){if(!t)return null;const n=c=>c.replace(/\\/g,"/"),i=n(e);let s=n(t);s.length>1&&(s=s.replace(/\/+$/,""));const o=mC(s)||mC(i),r=o?s.toLowerCase():s,l=o?i.toLowerCase():i,a=r.endsWith("/")?r:`${r}/`;if(l!==r&&!l.startsWith(a))return null;const u=l===r?"":i.slice(a.length);return u.split("/").includes("..")?null:u||null}const xm="application/x-kimi-session-row";function ate(e,t){return e.includes(t)?e:[...e,t]}function cL(e,t){return e.includes(t)?e.filter(n=>n!==t):e}function ute(e,t){const n=new Set(t),i=new Map,s=[];for(const r of e)n.has(r.id)?i.set(r.id,r):s.push(r);const o=[];for(const r of t){const l=i.get(r);l!==void 0&&o.push(l)}return{pinned:o,unpinned:s}}function cte(e,t,n){return e.find(i=>i.window?.duration===t&&i.window?.unit===n)}const dte=30;function fte(e){return e!==void 0&&e<dte}function dL(e,t){if(e.window!==void 0){const{duration:n,unit:i}=e.window;return i==="week"?t("settings.planUsage.weekLimit",{n}):i==="day"?t("settings.planUsage.dayLimit",{n}):i==="hour"?t("settings.planUsage.hourLimit",{n}):t("settings.planUsage.minuteLimit",{n})}return e.name??t("settings.planUsage.genericLimit")}function fL(e,t){const n=Date.parse(e);if(Number.isNaN(n))return"";const i=Math.floor((n-Date.now())/1e3);if(i<=0)return t("settings.planUsage.resetDone");const s=Math.floor(i/86400),o=Math.floor(i%86400/3600),r=Math.floor(i%3600/60),l=[];return s>0?(l.push(t("settings.planUsage.durationDay",{n:s})),l.push(t("settings.planUsage.durationHour",{n:o})),l.push(t("settings.planUsage.durationMinute",{n:r}))):o>0?(l.push(t("settings.planUsage.durationHour",{n:o})),l.push(t("settings.planUsage.durationMinute",{n:r}))):r>0?l.push(t("settings.planUsage.durationMinute",{n:r})):l.push(t("settings.planUsage.durationSecond",{n:i})),t("settings.planUsage.resetsIn",{duration:l.join(" ")})}function y3(e,t){if(t<=0)return"ok";const n=e/t;return n>=.85?"danger":n>=.5?"warn":"ok"}function wg(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}function hte(e,t){const n=(e/100).toFixed(2);switch(t.toUpperCase()){case"CNY":return{symbol:"¥",number:n};case"USD":return{symbol:"$",number:n};default:return{symbol:"",number:`${n} ${t}`}}}const pte=["kimi","openai","openai_responses","anthropic","google-genai","vertexai"];function z0(){return{model:"",maxContextSize:"",displayName:"",capabilities:["tool_use","thinking"],supportEfforts:[],adaptiveThinking:!0}}function b3(e,t){const n=[];for(const i of Object.values(t??{})){if(i===null||typeof i!="object")continue;const s=i;s.provider===e.id&&n.push({model:typeof s.model=="string"?s.model:"",maxContextSize:typeof s.maxContextSize=="number"?String(s.maxContextSize):"",displayName:typeof s.displayName=="string"?s.displayName:"",capabilities:Array.isArray(s.capabilities)?s.capabilities.filter(o=>typeof o=="string"):[],supportEfforts:Array.isArray(s.supportEfforts)?s.supportEfforts.filter(o=>typeof o=="string"):[],...typeof s.adaptiveThinking=="boolean"?{adaptiveThinking:s.adaptiveThinking}:{}})}return n}const hL=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function gte(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!hL.test(n))return"idInvalid";if(t.requireApiKey===!0&&e.apiKey.trim()==="")return"apiKeyRequired";if(t.requireBaseUrl===!0&&e.baseUrl.trim()==="")return"baseUrlRequired";if(e.models.length===0)return"modelRequired";for(const i of e.models){if(i.model.trim()==="")return"modelRequired";const s=i.maxContextSize.trim();if(s==="")return"contextSizeRequired";if(!/^\d+$/.test(s)||Number(s)<1)return"contextSizeInvalid"}return null}function pL(e){return e.map(t=>{const n=t.displayName.trim();return{model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),...t.capabilities.length>0?{capabilities:[...t.capabilities]}:{},...t.supportEfforts.length>0?{supportEfforts:[...t.supportEfforts]}:{},...t.adaptiveThinking!==void 0?{adaptiveThinking:t.adaptiveThinking}:{},...n===""?{}:{displayName:n}}})}function mte(e){const t=e.apiKey.trim(),n=e.baseUrl.trim();return{id:e.id.trim(),type:e.type,models:pL(e.models),...t===""?{}:{apiKey:t},...n===""?{}:{baseUrl:n}}}function vte(e,t,n){const i=pL(e.models),s=e.id.trim(),o=e.apiKey.trim(),r=e.baseUrl.trim(),l=n?.existingDefaultModel?.trim()??"",a=l.indexOf("/")>=0?l.slice(l.indexOf("/")+1):l;return{...t!==void 0&&s!==""&&s!==t.id?{newId:s}:{},type:e.type,models:i,...o===""&&n?.includeBlankApiKey!==!0?{}:{apiKey:o},...r===""?{}:{baseUrl:r},...a!==""&&i.some(u=>u.model===a)?{defaultModel:a}:{}}}function gL(e){return e.id==="managed:kimi-code"&&e.type==="kimi"}const yte=/^(\d+)\t(.*)$/;function bte(e){const t=e.at(-1)===""?e.slice(0,-1):e;if(t.length===0)return null;const n=[],i=[];for(const s of t){const o=yte.exec(s);if(!o)return null;i.push(Number(o[1])),n.push(o[2]??"")}return{contents:n,lineNumbers:i}}function mL(e,t){for(const n of e.stateMachineNames){const i=(e.stateMachineInputs(n)??[]).find(s=>s.name===t);if(i!==void 0)return i}return null}function kte(e,t){const n=mL(e,t);return n!==null&&typeof n.fire=="function"?(n.fire(),!0):!1}function vC(e,t,n){const i=mL(e,t);return i!==null&&typeof i.value==typeof n?(i.value=n,!0):!1}const ry={isPageHidden:()=>typeof document<"u"&&document.hidden,onVisibilityChange:e=>typeof document>"u"?()=>{}:(document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)),observeIntersection:(e,t)=>{if(typeof IntersectionObserver!="function")return()=>{};const n=new IntersectionObserver(i=>{const s=i[0];s!==void 0&&t(s.isIntersecting)});return n.observe(e),()=>n.disconnect()}};function vL(e,t,n={}){const i=n.isPageHidden??ry.isPageHidden,s=n.onVisibilityChange??ry.onVisibilityChange,o=n.observeIntersection??ry.observeIntersection;let r=!i(),l=!0,a=!1;function u(){const f=!r||!l;f!==a&&(a=f,a?e.pause():e.play())}const c=s(()=>{r=!i(),u()}),d=o(t,f=>{l=f,u()});return u(),()=>{c(),d()}}const Ate={"&":"&","<":"<",">":">",'"':""","'":"'"};function yC(e){return e.replace(/[&<>"']/g,t=>Ate[t]??t)}function Cte(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wte(e,t,n=40){const i=e.replace(/\s+/g," ").trim();if(i.length===0)return"";const s=t.trim();if(s.length===0)return bC(i,n*2);const o=i.toLowerCase().indexOf(s.toLowerCase());if(o<0)return bC(i,n*2);const r=Math.max(0,o-n),l=Math.min(i.length,o+s.length+n),a=r>0,u=l<i.length;return`${a?"…":""}${i.slice(r,l)}${u?"…":""}`}function bC(e,t){return e.length<=t?e:`${e.slice(0,t)}…`}function _h(e,t){const n=yC(e),i=t.trim();if(i.length===0)return n;const s=new RegExp(Cte(yC(i)),"gi");return n.replace(s,o=>`<mark>${o}</mark>`)}const to="kimi-web.server-credential",xte="token",_te=10080*60*1e3;let Ol;const k3=new Set;function Ste(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(xte);if(!n)return;const i=new URL(window.location.href);return i.hash="",window.history.replaceState(window.history.state,"",`${i.pathname}${i.search}`),n}function A3(e){return{version:1,credential:e,expiresAt:Date.now()+_te}}function Mte(e){return JSON.stringify(e)}function P5(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function C3(e){globalThis.localStorage?.setItem(to,Mte(e))}function Ite(){try{const e=globalThis.localStorage?.getItem(to);if(e){const n=P5(e);if(n===void 0){const i=A3(e);let s=!1;try{C3(i),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(to)===e&&globalThis.localStorage?.removeItem(to),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(to)}catch{}return s?i:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(to),globalThis.localStorage?.getItem(to)===e&&globalThis.localStorage?.removeItem(to);return}const t=globalThis.sessionStorage?.getItem(to);if(t){const n=A3(t);let i=!1;try{C3(n),i=!0}catch{}try{globalThis.sessionStorage?.removeItem(to),i=!0}catch{}return i?n:void 0}return}catch{return}}function Ete(){const e=Ste();return e?(yL(e),!0):(Ol=Ite(),Ol!==void 0)}function Tte(){if(Ol!==void 0){if(Ol.expiresAt<=Date.now()){Lte(Ol);return}return Ol.credential}}function Lte(e){Ol=void 0;try{globalThis.sessionStorage?.removeItem(to);const t=globalThis.localStorage?.getItem(to),n=t==null?void 0:P5(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(to)}catch{}}function yL(e){const t=A3(e);Ol=t;try{C3(t)}catch{}try{globalThis.sessionStorage?.removeItem(to)}catch{}}function Nte(){const e=Ol;Ol=void 0;try{const t=globalThis.localStorage?.getItem(to),i=(t==null?void 0:P5(t))?.credential??t;e!==void 0&&i===e.credential&&globalThis.localStorage?.removeItem(to),globalThis.sessionStorage?.removeItem(to)}catch{}}function Fte(e){return k3.add(e),()=>{k3.delete(e)}}function Bte(){Nte();for(const e of k3)try{e()}catch{}}function j5(e){return e.approvalCount>0?"awaiting-approval":e.questionCount>0?"awaiting-question":e.pendingInteraction==="approval"?"awaiting-approval":e.pendingInteraction==="question"?"awaiting-question":e.busy?"running":e.lastTurnReason==="failed"?"aborted":e.unread?"unread":"idle"}let kC;function $te(e){if(typeof Intl.Segmenter=="function")return kC??=new Intl.Segmenter("und",{granularity:"grapheme"}),kC.segment(e)}const Dte=/\p{Emoji_Presentation}/u,Rte=/\p{Regional_Indicator}/u,zte=/\p{Extended_Pictographic}/u,Ote="️";function Pte(e){return Dte.test(e)||Rte.test(e)?!0:zte.test(e)&&e.includes(Ote)}function bL(e){const t=$te(e)?.[Symbol.iterator]().next().value;if(t===void 0||!Pte(t.segment))return{emoji:null,rest:e};const n=e.slice(t.index+t.segment.length).replace(/^\s+/,"");return{emoji:t.segment,rest:n}}function jte(e,t){const{rest:n}=bL(e),i=t?.trim()??"";return i?n?`${i} ${n}`:i:n}function Hte(e,t){const n=e.findIndex(o=>o.id===t.id);if(n!==-1&&e[n].updatedAt===t.updatedAt)return e.map(o=>o.id===t.id?t:o);const i=e.filter(o=>o.id!==t.id),s=i.findIndex(o=>o.updatedAt<t.updatedAt);return s===-1?[...i,t]:[...i.slice(0,s),t,...i.slice(s)]}const w3="/sessions/";function AC(e){const{pathname:t}=e;if(!t.startsWith(w3))return;const n=t.slice(w3.length);if(!(!n||n.includes("/")))try{const i=decodeURIComponent(n);return i.length>0?i:void 0}catch{return}}function Wte(e){return e===void 0||e.length===0?"/":`${w3}${encodeURIComponent(e)}`}function zu(e){return Array.isArray?Array.isArray(e):AL(e)==="[object Array]"}function qte(e){if(typeof e=="string")return e;if(typeof e=="bigint")return e.toString();const t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function x3(e){return e==null?"":qte(e)}function ko(e){return typeof e=="string"}function xg(e){return typeof e=="number"}function Ute(e){return e===!0||e===!1||Kte(e)&&AL(e)=="[object Boolean]"}function kL(e){return typeof e=="object"}function Kte(e){return kL(e)&&e!==null}function mr(e){return e!=null}function O0(e){return!e.trim().length}function AL(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Vte="Incorrect 'index' type",_3="Invalid doc index: must be a non-negative integer within the bounds of the docs array",Zte=e=>`Invalid value for key ${e}`,Gte=e=>`Pattern length exceeds max of ${e}.`,Qte=e=>`Missing ${e} property in key`,Yte=e=>`Property 'weight' in key '${e}' must be a positive integer`,Jte="Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.",CC=Object.prototype.hasOwnProperty;var Xte=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{const i=CL(n);this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function CL(e){let t=null,n=null,i=null,s=1,o=null;if(ko(e)||zu(e))i=e,t=wC(e),n=_g(e);else{if(!CC.call(e,"name"))throw new Error(Qte("name"));const r=e.name;if(i=r,CC.call(e,"weight")&&e.weight!==void 0&&(s=e.weight,s<=0))throw new Error(Yte(_g(r)));t=wC(r),n=_g(r),o=e.getFn??null}return{path:t,id:n,weight:s,src:i,getFn:o}}function wC(e){return zu(e)?e:e.split(".")}function _g(e){return zu(e)?e.join("."):e}function ene(e,t){const n=[];let i=!1;const s=(o,r,l,a)=>{if(mr(o))if(!r[l])n.push(a!==void 0?{v:o,i:a}:o);else{const u=o[r[l]];if(!mr(u))return;if(l===r.length-1&&(ko(u)||xg(u)||Ute(u)||typeof u=="bigint"))n.push(a!==void 0?{v:x3(u),i:a}:x3(u));else if(zu(u)){i=!0;for(let c=0,d=u.length;c<d;c+=1)s(u[c],r,l+1,c)}else r.length&&s(u,r,l+1,a)}};return s(e,ko(t)?t.split("."):t,0),i?n:n[0]}const tne={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},nne={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},ine={location:0,threshold:.6,distance:100},sne={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:ene,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},vn=Object.freeze({...nne,...tne,...ine,...sne});function one(e){return e>=9&&e<=13||e===32||e===160}function rne(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(s){let o=0,r=!1;for(let a=0;a<s.length;a++)one(s.charCodeAt(a))?r=!1:r||(o++,r=!0);if(o===0&&(o=1),n.has(o))return n.get(o);const l=Math.round(i/Math.pow(o,.5*e))/i;return n.set(o,l),l},clear(){n.clear()}}}var H5=class{constructor({getFn:e=vn.getFn,fieldNormWeight:t=vn.fieldNormWeight}={}){this.norm=rne(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,n)=>{this._keysMap[t.id]=n})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(ko(this.docs[0]))for(let n=0;n<e;n++){const i=this._createStringRecord(this.docs[n],n);i&&(this.records[t++]=i)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(_3);if(ko(e)){const i=this._createStringRecord(e,t);return i&&this.records.push(i),i}const n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(_3);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const i of e)Number.isInteger(i)&&i>=0&&t.add(i);if(t.size===0)return;this.records=this.records.filter(i=>!t.has(i.i));const n=Array.from(t).sort((i,s)=>i-s);for(const i of this.records){let s=0,o=n.length;for(;s<o;){const r=s+o>>>1;n[r]<i.i?s=r+1:o=r}i.i-=s}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!mr(e)||O0(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const n={i:t,$:{}};for(let i=0,s=this.keys.length;i<s;i++){const o=this.keys[i],r=o.getFn?o.getFn(e):this.getFn(e,o.path);if(mr(r)){if(zu(r)){const l=[];for(let a=0,u=r.length;a<u;a+=1){const c=r[a];if(mr(c)){if(ko(c)){if(!O0(c)){const d={v:c,i:a,n:this.norm.get(c)};l.push(d)}}else if(mr(c.v)){const d=ko(c.v)?c.v:x3(c.v);if(!O0(d)){const f={v:d,i:c.i,n:this.norm.get(d)};l.push(f)}}}}n.$[i]=l}else if(ko(r)&&!O0(r)){const l={v:r,n:this.norm.get(r)};n.$[i]=l}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function wL(e,t,{getFn:n=vn.getFn,fieldNormWeight:i=vn.fieldNormWeight}={}){const s=new H5({getFn:n,fieldNormWeight:i});return s.setKeys(e.map(CL)),s.setSources(t),s.create(),s}function lne(e,{getFn:t=vn.getFn,fieldNormWeight:n=vn.fieldNormWeight}={}){const{keys:i,records:s}=e,o=new H5({getFn:t,fieldNormWeight:n});return o.setKeys(i),o.setIndexRecords(s),o}function ane(e=[],t=vn.minMatchCharLength){const n=[];let i=-1,s=-1,o=0;for(let r=e.length;o<r;o+=1){const l=e[o];l&&i===-1?i=o:!l&&i!==-1&&(s=o-1,s-i+1>=t&&n.push([i,s]),i=-1)}return e[o-1]&&o-i>=t&&n.push([i,o-1]),n}function une(e,t,n,{location:i=vn.location,distance:s=vn.distance,threshold:o=vn.threshold,findAllMatches:r=vn.findAllMatches,minMatchCharLength:l=vn.minMatchCharLength,includeMatches:a=vn.includeMatches,ignoreLocation:u=vn.ignoreLocation}={}){if(t.length>32)throw new Error(Gte(32));const c=t.length,d=e.length,f=Math.max(0,Math.min(i,d));let p=o,g=f;const m=(_,N)=>{const D=_/c;if(u)return D;const T=Math.abs(f-N);return s?D+T/s:T?1:D},y=l>1||a,w=y?Array(d):[];let k;for(;(k=e.indexOf(t,g))>-1;){const _=m(0,k);if(p=Math.min(_,p),g=k+c,y){let N=0;for(;N<c;)w[k+N]=1,N+=1}}g=-1;let A=[],v=1,x=0,E=c+d;const S=1<<c-1;for(let _=0;_<c;_+=1){let N=0,D=E;for(;N<D;)m(_,f+D)<=p?N=D:E=D,D=Math.floor((E-N)/2+N);E=D;let T=Math.max(1,f-D+1);const $=r?d:Math.min(f+D,d)+c,P=Array($+2);P[$+1]=(1<<_)-1;for(let O=$;O>=T;O-=1){const R=O-1,W=n[e[R]];if(P[O]=(P[O+1]<<1|1)&W,_&&(P[O]|=(A[O+1]|A[O])<<1|1|A[O+1]),P[O]&S&&(v=m(_,R),v<=p)){if(p=v,g=R,x=_,g<=f)break;T=Math.max(1,2*f-g)}}if(m(_+1,f)>p)break;A=P}if(y&&g>=0){const _=Math.min(d-1,g+c-1+x);for(let N=g;N<=_;N+=1)n[e[N]]&&(w[N]=1)}const M={isMatch:g>=0,score:Math.max(.001,v)};if(y){const _=ane(w,l);_.length?a&&(M.indices=_):M.isMatch=!1}return M}function cne(e){const t={};for(let n=0,i=e.length;n<i;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<i-n-1}return t}function W5(e){if(e.length<=1)return e;e.sort((n,i)=>n[0]-i[0]||n[1]-i[1]);const t=[e[0]];for(let n=1,i=e.length;n<i;n+=1){const s=t[t.length-1],o=e[n];o[0]<=s[1]+1?s[1]=Math.max(s[1],o[1]):t.push(o)}return t}const xL={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},dne=new RegExp("["+Object.keys(xL).join("")+"]","g"),Q1=typeof String.prototype.normalize=="function"?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(dne,t=>xL[t]):e=>e;var q5=class{constructor(e,{location:t=vn.location,threshold:n=vn.threshold,distance:i=vn.distance,includeMatches:s=vn.includeMatches,findAllMatches:o=vn.findAllMatches,minMatchCharLength:r=vn.minMatchCharLength,isCaseSensitive:l=vn.isCaseSensitive,ignoreDiacritics:a=vn.ignoreDiacritics,ignoreLocation:u=vn.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:i,includeMatches:s,findAllMatches:o,minMatchCharLength:r,isCaseSensitive:l,ignoreDiacritics:a,ignoreLocation:u},e=l?e:e.toLowerCase(),e=a?Q1(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const c=(f,p)=>{this.chunks.push({pattern:f,alphabet:cne(f),startIndex:p})},d=this.pattern.length;if(d>32){let f=0;const p=d%32,g=d-p;for(;f<g;)c(this.pattern.substr(f,32),f),f+=32;if(p){const m=d-32;c(this.pattern.substr(m),m)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i}=this.options;if(e=t?e:e.toLowerCase(),e=n?Q1(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const g={isMatch:!0,score:0};return i&&(g.indices=[[0,e.length-1]]),g}const{location:s,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:a,ignoreLocation:u}=this.options,c=[];let d=0,f=!1;this.chunks.forEach(({pattern:g,alphabet:m,startIndex:y})=>{const{isMatch:w,score:k,indices:A}=une(e,g,m,{location:s+y,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:a,includeMatches:i,ignoreLocation:u});w&&(f=!0),d+=k,w&&A&&c.push(...A)});const p={isMatch:f,score:f?d/this.chunks.length:1};return f&&i&&(p.indices=W5(c)),p}};const fne=new Set(["fuzzy","include"]);function hne(e){return e.startsWith("inverse")}const S3=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const n=t===e;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n=0,i;const s=[],o=e.length;for(;(i=t.indexOf(e,n))>-1;)n=i+o,s.push([i,n-1]);const r=!!s.length;return{isMatch:r,score:r?0:1,indices:s}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const n=t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const n=!t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const n=!t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const n=t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const n=t.indexOf(e)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const n=new q5(e,{location:t.location??vn.location,threshold:t.threshold??vn.threshold,distance:t.distance??vn.distance,includeMatches:t.includeMatches??vn.includeMatches,findAllMatches:t.findAllMatches??vn.findAllMatches,minMatchCharLength:t.minMatchCharLength??vn.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??vn.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??vn.ignoreDiacritics,ignoreLocation:t.ignoreLocation??vn.ignoreLocation});return{type:"fuzzy",search(i){return n.searchIn(i)}}}}],xC=S3.length,pne="\0",gne="|";function mne(e){const t=[],n=e.length;let i=0;for(;i<n;){for(;i<n&&e[i]===" ";)i++;if(i>=n)break;let s=i;for(;s<n&&e[s]!==" "&&e[s]!=='"';)s++;if(s<n&&e[s]==='"'){for(s++;s<n;){if(e[s]==='"'){const o=s+1;if(o>=n||e[o]===" "){s++;break}if(e[o]==="$"&&(o+1>=n||e[o+1]===" ")){s+=2;break}}s++}t.push(e.substring(i,s)),i=s}else{for(;s<n&&e[s]!==" ";)s++;t.push(e.substring(i,s)),i=s}}return t}function _C(e,t){const n=e.match(t);return n?n[1]:null}function vne(e,t={}){return e.replace(/\\\|/g,pne).split(gne).map(n=>{const i=mne(n.replace(/\u0000/g,"|").trim()).filter(o=>o&&!!o.trim()),s=[];for(let o=0,r=i.length;o<r;o+=1){const l=i[o];let a=!1,u=-1;for(;!a&&++u<xC;){const c=S3[u],d=_C(l,c.multiRegex);d&&(s.push(c.create(d,t)),a=!0)}if(!a)for(u=-1;++u<xC;){const c=S3[u],d=_C(l,c.singleRegex);if(d){s.push(c.create(d,t));break}}}return s})}var yne=class{constructor(e,{isCaseSensitive:t=vn.isCaseSensitive,ignoreDiacritics:n=vn.ignoreDiacritics,includeMatches:i=vn.includeMatches,minMatchCharLength:s=vn.minMatchCharLength,ignoreLocation:o=vn.ignoreLocation,findAllMatches:r=vn.findAllMatches,location:l=vn.location,threshold:a=vn.threshold,distance:u=vn.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i,minMatchCharLength:s,findAllMatches:r,ignoreLocation:o,location:l,threshold:a,distance:u},e=t?e:e.toLowerCase(),e=n?Q1(e):e,this.pattern=e,this.query=vne(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:i,ignoreDiacritics:s}=this.options;e=i?e:e.toLowerCase(),e=s?Q1(e):e;let o=0;const r=[];let l=0,a=!1;for(let u=0,c=t.length;u<c;u+=1){const d=t[u];r.length=0,o=0,a=!1;for(let f=0,p=d.length;f<p;f+=1){const g=d[f],{isMatch:m,indices:y,score:w}=g.search(e);if(m)o+=1,l+=w,hne(g.type)&&(a=!0),n&&(fne.has(g.type)?r.push(...y):r.push(y));else{l=0,o=0,r.length=0,a=!1;break}}if(o){const f={isMatch:!0,score:l/o};return a&&(f.hasInverse=!0),n&&(f.indices=W5(r)),f}}return{isMatch:!1,score:1}}};const M3=[];function U5(...e){M3.push(...e)}function _m(e,t){for(let n=0,i=M3.length;n<i;n+=1){const s=M3[n];if(s.condition(e,t))return new s(e,t)}return new q5(e,t)}const Sm={AND:"$and",OR:"$or"},I3={PATH:"$path",PATTERN:"$val"},E3=e=>!!(e[Sm.AND]||e[Sm.OR]),bne=e=>!!e[I3.PATH],kne=e=>!zu(e)&&kL(e)&&!E3(e),SC=e=>({[Sm.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function _L(e,t,{auto:n=!0}={}){const i=s=>{if(ko(s)){const a={keyId:null,pattern:s};return n&&(a.searcher=_m(s,t)),a}const o=Object.keys(s),r=bne(s);if(!r&&o.length>1&&!E3(s))return i(SC(s));if(kne(s)){const a=r?s[I3.PATH]:o[0],u=r?s[I3.PATTERN]:s[a];if(!ko(u))throw new Error(Zte(a));const c={keyId:_g(a),pattern:u};return n&&(c.searcher=_m(u,t)),c}const l={children:[],operator:o[0]};return o.forEach(a=>{const u=s[a];zu(u)&&u.forEach(c=>{l.children.push(i(c))})}),l};return E3(e)||(e=SC(e)),i(e)}function T3(e,{ignoreFieldNorm:t=vn.ignoreFieldNorm}){let n=1;return e.forEach(({key:i,norm:s,score:o})=>{const r=i?i.weight:null;n*=Math.pow(o===0&&r?Number.EPSILON:o,(r||1)*(t?1:s))}),n}function Ane(e,{ignoreFieldNorm:t=vn.ignoreFieldNorm}){e.forEach(n=>{n.score=T3(n.matches,{ignoreFieldNorm:t})})}var Cne=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){const t=this.heap;for(;e>0;){const n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;const i=t[e];t[e]=t[n],t[n]=i,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let i=e;do{e=i;const s=2*e+1,o=2*e+2;if(s<n&&this.comparator(t[s],t[i])>0&&(i=s),o<n&&this.comparator(t[o],t[i])>0&&(i=o),i!==e){const r=t[e];t[e]=t[i],t[i]=r}}while(i!==e)}};function wne(e){const t=[];return e.matches.forEach(n=>{if(!mr(n.indices)||!n.indices.length)return;const i={indices:n.indices,value:n.value};n.key&&(i.key=n.key.id),n.idx>-1&&(i.refIndex=n.idx),t.push(i)}),t}function xne(e,t,{includeMatches:n=vn.includeMatches,includeScore:i=vn.includeScore}={}){return e.map(s=>{const{idx:o}=s,r={item:t[o],refIndex:o};return n&&(r.matches=wne(s)),i&&(r.score=s.score),r})}const _ne=/[\p{L}\p{M}\p{N}_]+/gu,MC=new WeakSet;function Sne(e){MC.has(e)||(MC.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function Mne(e){if(typeof e=="function"){let t=!1;return n=>{const i=e(n);if(!t&&(t=!0,!Array.isArray(i)||i.some(s=>typeof s!="string")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(i)?"array containing non-strings":typeof i}.`);return i}}return e instanceof RegExp?(e.global||Sne(e),t=>t.match(e)||[]):t=>t.match(_ne)||[]}function L3({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){const i=Mne(n);return{tokenize(s){return e||(s=s.toLowerCase()),t&&(s=Q1(s)),i(s)}}}var Ine=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=L3({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const n=this.analyzer.tokenize(e),{df:i,fieldCount:s}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const o of n){this.termSearchers.push(new q5(o,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=i.get(o)||0,l=Math.log(1+(s-r+.5)/(r+.5));this.idfWeights.push(l)}this.combineAll=t.tokenMatch==="all",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,i=0,s=0,o=0;const r=this.combineAll&&!this.useMask?new Set:null;for(let u=0;u<this.termSearchers.length;u++){const c=this.termSearchers[u].searchIn(e),d=this.idfWeights[u];i+=d,c.isMatch&&(s++,n+=d*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?o|=1<<u:r.add(u)))}if(s===0)return{isMatch:!1,score:1};const l=i>0?1-n/i:0,a={isMatch:!0,score:Math.max(.001,l)};return this.options.includeMatches&&t.length&&(a.indices=W5(t)),this.combineAll&&(this.useMask?a.matchedMask=o:a.matchedTerms=r,a.termCount=this.numTerms),a}};function ly(e,t,n,i){const s=i.tokenize(t);if(!s.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);const o=new Set(s);let r=e.docTermFieldHits.get(n);r||(r=new Map,e.docTermFieldHits.set(n,r));for(const l of o)r.set(l,(r.get(l)||0)+1),e.df.set(l,(e.df.get(l)||0)+1)}function SL(e,t,n,i){const{i:s,v:o,$:r}=t;if(o!==void 0){ly(e,o,s,i);return}if(r)for(let l=0;l<n;l++){const a=r[l];if(a)if(Array.isArray(a))for(const u of a)ly(e,u.v,s,i);else ly(e,a.v,s,i)}}function Ene(e,t,n){const i={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const s of e)SL(i,s,t,n);return i}function Tne(e,t,n,i){SL(e,t,n,i)}function Lne(e,t){const n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);const i=e.docTermFieldHits.get(t);if(i){for(const[s,o]of i){const r=(e.df.get(s)||0)-o;r<=0?e.df.delete(s):e.df.set(s,r)}e.docTermFieldHits.delete(t)}}function IC(e,t){if(t.length===0)return;const n=Array.from(new Set(t)).sort((l,a)=>l-a);for(const l of n)Lne(e,l);const i=l=>{let a=0,u=n.length;for(;a<u;){const c=a+u>>>1;n[c]<l?a=c+1:u=c}return l-a},s=n[0],o=new Map;for(const[l,a]of e.docFieldCount)o.set(l>s?i(l):l,a);e.docFieldCount=o;const r=new Map;for(const[l,a]of e.docTermFieldHits)r.set(l>s?i(l):l,a);e.docTermFieldHits=r}var Ou=class{constructor(e,t,n){this.options={...vn,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Xte(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=_m(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof H5))throw new Error(Vte);if(this._myIndex=t||wL(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=L3({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=Ene(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(e){if(!mr(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const n=L3({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});Tne(this._invertedIndex,t,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],n=[];for(let i=0,s=this._docs.length;i<s;i+=1)e(this._docs[i],i)&&(t.push(this._docs[i]),n.push(i));if(n.length){this._invertedIndex&&IC(this._invertedIndex,n);const i=new Set(n);this._docs=this._docs.filter((s,o)=>!i.has(o)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(_3);this._invertedIndex&&IC(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:n=-1}=t||{},{includeMatches:i,includeScore:s,shouldSort:o,sortFn:r,ignoreFieldNorm:l}=this.options;if(ko(e)&&!e.trim()){let f=this._docs.map((p,g)=>({item:p,refIndex:g}));return xg(n)&&n>-1&&(f=f.slice(0,n)),f}const a=o&&xg(n)&&n>0&&ko(e),u=r,c=(f,p)=>u(f,p)||f.idx-p.idx;let d;if(a){const f=new Cne(n,c);ko(this._docs[0])?this._searchStringList(e,{heap:f,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:f,ignoreFieldNorm:l}),d=f.extractSorted()}else d=ko(e)?ko(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),Ane(d,{ignoreFieldNorm:l}),o&&d.sort(ko(e)?c:u),xg(n)&&n>-1&&(d=d.slice(0,n));return xne(d,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:o}=this._myIndex,r=t?null:[];return o.forEach(({v:l,i:a,n:u})=>{if(!mr(l))return;const c=i.searchIn(l);if(c.isMatch){const d={score:c.score,value:l,norm:u,indices:c.indices};s&&(d.matchedMask=c.matchedMask,d.matchedTerms=c.matchedTerms,d.termCount=c.termCount);const f=[d];if(!s||this._coversAllTokens(f)){const p={item:l,idx:a,matches:f};t?(p.score=T3(p.matches,{ignoreFieldNorm:n}),t.insert(p)):r.push(p)}}}),r}_searchLogical(e){const t=_L(e,this.options),n=this._normalizedKeys(),i=(l,a,u)=>{if(!("children"in l)){const{keyId:p,searcher:g}=l;let m;return p===null?(m=[],n.forEach((y,w)=>{m.push(...this._findMatches({key:y,value:a[w],searcher:g}))})):m=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(a,p),searcher:g}),m&&m.length?[{idx:u,item:a,matches:m}]:[]}const{children:c,operator:d}=l,f=[];for(let p=0,g=c.length;p<g;p+=1){const m=c[p],y=i(m,a,u);if(y.length)f.push(...y);else if(d===Sm.AND)return[]}return f},s=this._myIndex.records,o=new Map,r=[];return s.forEach(({$:l,i:a})=>{if(mr(l)){const u=i(t,l,a);u.length&&(o.has(a)||(o.set(a,{idx:a,item:l,matches:[]}),r.push(o.get(a))),u.forEach(({matches:c})=>{o.get(a).matches.push(...c)}))}}),r}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:o}=this._myIndex,r=this._normalizedKeys(),l=t?null:[];return o.forEach(({$:a,i:u})=>{if(!mr(a))return;const c=[];let d=!1,f=!1;if(r.forEach((p,g)=>{const m=this._findMatches({key:p,value:a[g],searcher:i});m.length?(c.push(...m),m[0].hasInverse&&(f=!0)):d=!0}),!(f&&d)&&c.length&&(!s||this._coversAllTokens(c))){const p={idx:u,item:a,matches:c};t?(p.score=T3(p.matches,{ignoreFieldNorm:n}),t.insert(p)):l.push(p)}}),l}_findMatches({key:e,value:t,searcher:n}){if(!mr(t))return[];const i=[];if(zu(t))t.forEach(({v:s,i:o,n:r})=>{if(!mr(s))return;const l=n.searchIn(s);if(l.isMatch){const a={score:l.score,key:e,value:s,idx:o,norm:r,indices:l.indices,hasInverse:l.hasInverse};l.termCount!==void 0&&(a.matchedMask=l.matchedMask,a.matchedTerms=l.matchedTerms,a.termCount=l.termCount),i.push(a)}});else{const{v:s,n:o}=t,r=n.searchIn(s);if(r.isMatch){const l={score:r.score,key:e,value:s,norm:o,indices:r.indices,hasInverse:r.hasInverse};r.termCount!==void 0&&(l.matchedMask=r.matchedMask,l.matchedTerms=r.matchedTerms,l.termCount=r.termCount),i.push(l)}}return i}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let i=0;for(let s=0;s<e.length;s++)i|=e[s].matchedMask||0;return i===2**t-1}const n=new Set;for(let i=0;i<e.length;i++){const s=e[i].matchedTerms;if(s)for(const o of s)n.add(o)}return n.size===t}};Ou.version="7.5.0";Ou.createIndex=wL;Ou.parseIndex=lne;Ou.config=vn;Ou.match=function(e,t,n){if(n&&n.useTokenSearch)throw new Error(Jte);return _m(e,{...vn,...n}).searchIn(t)};Ou.parseQuery=_L;U5(yne);U5(Ine);Ou.use=function(...e){e.forEach(t=>U5(t))};var Nne=Ou;const Fne=/^[\uD800-\uDBFF]$/,Bne=/^[\uDC00-\uDFFF]$/,$ne=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var EC;(function(e){e[e.Unknown=1e-13]="Unknown",e[e.Rule=1e-12]="Rule",e[e.DICT=2e-8]="DICT",e[e.Surname=1]="Surname",e[e.Custom=1]="Custom"})(EC||(EC={}));const Mr={Normal:1,Surname:10,Custom:100};function sl(e){var t;return e.length-(((t=e.match($ne))===null||t===void 0?void 0:t.length)||0)}function N3(e){const t=[];let n=0;for(;n<e.length;){const i=e[n];Fne.test(i)&&Bne.test(e[n+1])?(t.push(e.substring(n,n+2)),n+=2):(t.push(i),n+=1)}return t}class ML{constructor(){this.NumberDICT=[],this.StringDICT=new Map}get(t){if(t.length>1)return this.StringDICT.get(t);{const n=t.charCodeAt(0);return this.NumberDICT[n]}}set(t,n){if(t.length>1)this.StringDICT.set(t,n);else{const i=t.charCodeAt(0);this.NumberDICT[i]=n}}clear(){this.NumberDICT=[],this.StringDICT.clear()}}const Dne=["zh","ch","sh","z","c","s","b","p","m","f","d","t","n","l","g","k","h","j","q","x","r","y","w",""],Rne=["j","q","x"],zne=["uān","uán","uǎn","uàn","uan","uē","ué","uě","uè","ue","ūn","ún","ǔn","ùn","un","ū","ú","ǔ","ù","u"],One={uān:"üān",uán:"üán",uǎn:"üǎn",uàn:"üàn",uan:"üan",uē:"üē",ué:"üé",uě:"üě",uè:"üè",ue:"üe",ūn:"ǖn",ún:"ǘn",ǔn:"ǚn",ùn:"ǜn",un:"ün",ū:"ǖ",ú:"ǘ",ǔ:"ǚ",ù:"ǜ",u:"ü"},Pne=["ia","ian","iang","iao","ie","iu","iong","ua","uai","uan","uang","ue","ui","uo","üan","üe","van","ve"],TC={一:"yì",二:"èr",三:"sān",四:"sì",五:"wǔ",六:"liù",七:"qī",八:"bā",九:"jiǔ",十:"shí",百:"bǎi",千:"qiān",万:"wàn",亿:"yì",单:"dān",两:"liǎng",双:"shuāng",多:"duō",几:"jǐ",十一:"shí yī",零一:"líng yī",第一:"dì yī",一十:"yī shí",一十一:"yī shí yī"},LC={重:"chóng",行:"háng",斗:"dǒu",更:"gēng"};function jne(){const e={零一:"líng yī","〇一":"líng yī",十一:"shí yī",一十:"yī shí",第一:"dì yī",一十一:"yī shí yī"};for(let t in TC)for(let n in LC){const i=`${t}${n}`,s=`${TC[t]} ${LC[n]}`;e[i]=s}return e}const NC=jne(),Hne=Object.keys(NC).map(e=>({zh:e,pinyin:NC[e],probability:1e-12,length:sl(e),priority:Mr.Normal,dict:Symbol("rule")})),IL={不:{bú:[4]},一:{yí:[4],yì:[1,2,3]}},Wne={不:["的","而","之","后","也","还","地"],一:["的","而","之","后","也","还","是"]},qne=Object.keys(IL),F3={南宫:"nán gōng",第五:"dì wǔ",万俟:"mò qí",司马:"sī mǎ",上官:"shàng guān",欧阳:"ōu yáng",夏侯:"xià hóu",诸葛:"zhū gě",闻人:"wén rén",东方:"dōng fāng",赫连:"hè lián",皇甫:"huáng fǔ",尉迟:"yù chí",公羊:"gōng yáng",澹台:"tán tái",公冶:"gōng yě",宗政:"zōng zhèng",濮阳:"pú yáng",淳于:"chún yú",太叔:"tài shū",申屠:"shēn tú",公孙:"gōng sūn",仲孙:"zhòng sūn",轩辕:"xuān yuán",令狐:"líng hú",钟离:"zhōng lí",宇文:"yǔ wén",长孙:"zhǎng sūn",慕容:"mù róng",鲜于:"xiān yú",闾丘:"lǘ qiū",司徒:"sī tú",司空:"sī kōng",亓官:"qí guān",司寇:"sī kòu",仉督:"zhǎng dū",子车:"zǐ jū",颛孙:"zhuān sūn",端木:"duān mù",巫马:"wū mǎ",公西:"gōng xī",漆雕:"qī diāo",乐正:"yuè zhèng",壤驷:"rǎng sì",公良:"gōng liáng",拓跋:"tuò bá",夹谷:"jiá gǔ",宰父:"zǎi fǔ",榖梁:"gǔ liáng",段干:"duàn gān",百里:"bǎi lǐ",东郭:"dōng guō",南门:"nán mén",呼延:"hū yán",羊舌:"yáng shé",梁丘:"liáng qiū",左丘:"zuǒ qiū",东门:"dōng mén",西门:"xī mén",句龙:"gōu lóng",毌丘:"guàn qiū",赵:"zhào",钱:"qián",孙:"sūn",李:"lǐ",周:"zhōu",吴:"wú",郑:"zhèng",王:"wáng",冯:"féng",陈:"chén",褚:"chǔ",卫:"wèi",蒋:"jiǎng",沈:"shěn",韩:"hán",杨:"yáng",朱:"zhū",秦:"qín",尤:"yóu",许:"xǔ",何:"hé",吕:"lǚ",施:"shī",张:"zhāng",孔:"kǒng",曹:"cáo",严:"yán",华:"huà",金:"jīn",魏:"wèi",陶:"táo",姜:"jiāng",戚:"qī",谢:"xiè",邹:"zōu",喻:"yù",柏:"bǎi",水:"shuǐ",窦:"dòu",章:"zhāng",云:"yún",苏:"sū",潘:"pān",葛:"gě",奚:"xī",范:"fàn",彭:"péng",郎:"láng",鲁:"lǔ",韦:"wéi",昌:"chāng",马:"mǎ",苗:"miáo",凤:"fèng",花:"huā",方:"fāng",俞:"yú",任:"rén",袁:"yuán",柳:"liǔ",酆:"fēng",鲍:"bào",史:"shǐ",唐:"táng",费:"fèi",廉:"lián",岑:"cén",薛:"xuē",雷:"léi",贺:"hè",倪:"ní",汤:"tāng",滕:"téng",殷:"yīn",罗:"luó",毕:"bì",郝:"hǎo",邬:"wū",安:"ān",常:"cháng",乐:"yuè",于:"yú",时:"shí",傅:"fù",皮:"pí",卞:"biàn",齐:"qí",康:"kāng",伍:"wǔ",余:"yú",元:"yuán",卜:"bǔ",顾:"gù",孟:"mèng",平:"píng",黄:"huáng",和:"hé",穆:"mù",萧:"xiāo",尹:"yǐn",姚:"yáo",邵:"shào",湛:"zhàn",汪:"wāng",祁:"qí",毛:"máo",禹:"yǔ",狄:"dí",米:"mǐ",贝:"bèi",明:"míng",臧:"zāng",计:"jì",伏:"fú",成:"chéng",戴:"dài",谈:"tán",宋:"sòng",茅:"máo",庞:"páng",熊:"xióng",纪:"jǐ",舒:"shū",屈:"qū",项:"xiàng",祝:"zhù",董:"dǒng",梁:"liáng",杜:"dù",阮:"ruǎn",蓝:"lán",闵:"mǐn",席:"xí",季:"jì",麻:"má",强:"qiáng",贾:"jiǎ",路:"lù",娄:"lóu",危:"wēi",江:"jiāng",童:"tóng",颜:"yán",郭:"guō",梅:"méi",盛:"shèng",林:"lín",刁:"diāo",钟:"zhōng",徐:"xú",邱:"qiū",骆:"luò",高:"gāo",夏:"xià",蔡:"cài",田:"tián",樊:"fán",胡:"hú",凌:"líng",霍:"huò",虞:"yú",万:"wàn",支:"zhī",柯:"kē",昝:"zǎn",管:"guǎn",卢:"lú",莫:"mò",经:"jīng",房:"fáng",裘:"qiú",缪:"miào",干:"gān",解:"xiè",应:"yīng",宗:"zōng",丁:"dīng",宣:"xuān",贲:"bēn",邓:"dèng",郁:"yù",单:"shàn",杭:"háng",洪:"hóng",包:"bāo",诸:"zhū",左:"zuǒ",石:"shí",崔:"cuī",吉:"jí",钮:"niǔ",龚:"gōng",程:"chéng",嵇:"jī",邢:"xíng",滑:"huá",裴:"péi",陆:"lù",荣:"róng",翁:"wēng",荀:"xún",羊:"yáng",於:"yū",惠:"huì",甄:"zhēn",曲:"qū",家:"jiā",封:"fēng",芮:"ruì",羿:"yì",储:"chǔ",靳:"jìn",汲:"jí",邴:"bǐng",糜:"mí",松:"sōng",井:"jǐng",段:"duàn",富:"fù",巫:"wū",乌:"wū",焦:"jiāo",巴:"bā",弓:"gōng",牧:"mù",隗:"wěi",山:"shān",谷:"gǔ",车:"chē",侯:"hóu",宓:"mì",蓬:"péng",全:"quán",郗:"xī",班:"bān",仰:"yǎng",秋:"qiū",仲:"zhòng",伊:"yī",宫:"gōng",宁:"nìng",仇:"qiú",栾:"luán",暴:"bào",甘:"gān",钭:"tǒu",厉:"lì",戎:"róng",祖:"zǔ",武:"wǔ",符:"fú",刘:"liú",景:"jǐng",詹:"zhān",束:"shù",龙:"lóng",叶:"yè",幸:"xìng",司:"sī",韶:"sháo",郜:"gào",黎:"lí",蓟:"jì",薄:"bó",印:"yìn",宿:"sù",白:"bái",怀:"huái",蒲:"pú",邰:"tái",从:"cóng",鄂:"è",索:"suǒ",咸:"xián",籍:"jí",赖:"lài",卓:"zhuó",蔺:"lìn",屠:"tú",蒙:"méng",池:"chí",乔:"qiáo",阴:"yīn",鬱:"yù",胥:"xū",能:"nài",苍:"cāng",双:"shuāng",闻:"wén",莘:"shēn",党:"dǎng",翟:"zhái",谭:"tán",贡:"gòng",劳:"láo",逄:"páng",姬:"jī",申:"shēn",扶:"fú",堵:"dǔ",冉:"rǎn",宰:"zǎi",郦:"lì",雍:"yōng",郤:"xì",璩:"qú",桑:"sāng",桂:"guì",濮:"pú",牛:"niú",寿:"shòu",通:"tōng",边:"biān",扈:"hù",燕:"yān",冀:"jì",郏:"jiá",浦:"pǔ",尚:"shàng",农:"nóng",温:"wēn",别:"bié",庄:"zhuāng",晏:"yàn",柴:"chái",瞿:"qú",阎:"yán",充:"chōng",慕:"mù",连:"lián",茹:"rú",习:"xí",宦:"huàn",艾:"ài",鱼:"yú",容:"róng",向:"xiàng",古:"gǔ",易:"yì",慎:"shèn",戈:"gē",廖:"liào",庾:"yǔ",终:"zhōng",暨:"jì",居:"jū",衡:"héng",步:"bù",都:"dū",耿:"gěng",满:"mǎn",弘:"hóng",匡:"kuāng",国:"guó",文:"wén",寇:"kòu",广:"guǎng",禄:"lù",阙:"quē",东:"dōng",欧:"ōu",殳:"shū",沃:"wò",利:"lì",蔚:"wèi",越:"yuè",夔:"kuí",隆:"lóng",师:"shī",巩:"gǒng",厍:"shè",聂:"niè",晁:"cháo",勾:"gōu",敖:"áo",融:"róng",冷:"lěng",訾:"zī",辛:"xīn",阚:"kàn",那:"nā",简:"jiǎn",饶:"ráo",空:"kōng",曾:"zēng",母:"mǔ",沙:"shā",乜:"niè",养:"yǎng",鞠:"jū",须:"xū",丰:"fēng",巢:"cháo",关:"guān",蒯:"kuǎi",相:"xiàng",查:"zhā",后:"hòu",荆:"jīng",红:"hóng",游:"yóu",竺:"zhú",权:"quán",逯:"lù",盖:"gě",益:"yì",桓:"huán",公:"gōng",牟:"móu",哈:"hǎ",言:"yán",福:"fú",肖:"xiāo",区:"ōu",覃:"qín",朴:"piáo",繁:"pó",员:"yùn",句:"gōu",要:"yāo",过:"guō",钻:"zuān",谌:"chén",折:"shé",召:"shào",郄:"qiè",撒:"sǎ",甯:"nìng",六:"lù",啜:"chuài",行:"xíng"},Une=Object.keys(F3).map(e=>({zh:e,pinyin:F3[e],probability:1+sl(e),length:sl(e),priority:Mr.Surname,dict:Symbol("surname")})),FC={"bǎng páng pāng":["膀"],líng:["〇","伶","凌","刢","囹","坽","夌","姈","婈","孁","岺","彾","掕","昤","朎","柃","棂","櫺","欞","泠","淩","澪","灵","燯","爧","狑","玲","琌","瓴","皊","砱","祾","秢","竛","笭","紷","綾","绫","羐","羚","翎","聆","舲","苓","菱","蓤","蔆","蕶","蛉","衑","裬","詅","跉","軨","輘","酃","醽","鈴","錂","铃","閝","陵","零","霊","霗","霛","霝","靈","駖","魿","鯪","鲮","鴒","鸰","鹷","麢","齡","齢","龄","龗","㥄"],yī:["一","乊","伊","依","医","吚","咿","噫","壱","壹","夁","嫛","嬄","弌","揖","撎","檹","毉","洢","渏","漪","瑿","畩","祎","禕","稦","繄","蛜","衤","譩","辷","郼","醫","銥","铱","鷖","鹥","黟","黳"],"dīng zhēng":["丁"],"kǎo qiǎo yú":["丂"],qī:["七","倛","僛","凄","嘁","墄","娸","悽","慼","慽","戚","捿","柒","桤","桼","棲","榿","欺","沏","淒","漆","紪","緀","萋","褄","諆","迉","郪","鏚","霋","魌","鶈"],shàng:["丄","尙","尚","恦","緔","绱"],xià:["丅","下","乤","圷","夏","夓","懗","梺","疜","睱","罅","鎼","鏬"],hǎn:["丆","喊","浫","罕","豃","㘎"],"wàn mò":["万"],zhàng:["丈","仗","墇","嶂","帐","帳","幛","扙","杖","涱","痮","瘬","瘴","瞕","粀","胀","脹","賬","账","障"],sān:["三","厁","叁","弎","毵","毶","毿","犙","鬖"],"shàng shǎng shang":["上"],"qí jī":["丌","其","奇"],"bù fǒu":["不"],"yǔ yù yú":["与"],miǎn:["丏","偭","免","冕","勉","勔","喕","娩","愐","汅","沔","湎","睌","緬","缅","腼","葂","靦","鮸","𩾃"],gài:["丐","乢","匃","匄","戤","概","槩","槪","溉","漑","瓂","葢","鈣","钙","𬮿"],chǒu:["丑","丒","侴","吜","杽","瞅","矁","醜","魗"],zhuān:["专","叀","嫥","専","專","瑼","甎","砖","磗","磚","蟤","諯","鄟","顓","颛","鱄","䏝"],"qiě jū":["且"],pī:["丕","伓","伾","噼","坯","岯","憵","批","披","炋","狉","狓","砒","磇","礔","礕","秛","秠","耚","豾","邳","鈚","鉟","銔","錃","錍","霹","駓","髬","魾","𬳵"],shì:["世","丗","亊","事","仕","侍","冟","势","勢","卋","呩","嗜","噬","士","奭","嬕","室","市","式","弑","弒","恀","恃","戺","拭","揓","是","昰","枾","柿","栻","澨","烒","煶","眂","眎","眡","睗","示","礻","筮","簭","舐","舓","襫","視","视","觢","試","誓","諡","謚","试","谥","貰","贳","軾","轼","逝","遾","釈","释","釋","鈰","鉃","鉽","铈","飾","餙","餝","饰","鰘","䏡","𬤊"],qiū:["丘","丠","坵","媝","恘","恷","楸","秋","秌","穐","篍","緧","萩","蘒","蚯","蝵","蟗","蠤","趥","邱","鞦","鞧","鰌","鰍","鳅","鶖","鹙","龝"],bǐng:["丙","屛","怲","抦","昞","昺","柄","棅","炳","禀","秉","稟","苪","蛃","邴","鈵","陃","鞆","餅","餠","饼"],yè:["业","亱","僷","墷","夜","嶪","嶫","抴","捙","擛","擪","擫","晔","曄","曅","曗","曳","曵","枼","枽","業","洂","液","澲","烨","燁","爗","璍","皣","瞱","瞸","礏","腋","葉","謁","谒","邺","鄴","鍱","鐷","靥","靨","頁","页","餣","饁","馌","驜","鵺","鸈"],cóng:["丛","从","叢","婃","孮","従","徔","徖","悰","樷","欉","淙","灇","爜","琮","藂","誴","賨","賩","錝"],dōng:["东","倲","冬","咚","埬","岽","崬","徚","昸","東","氡","氭","涷","笗","苳","菄","蝀","鮗","鯟","鶇","鶫","鸫","鼕","𬟽"],sī:["丝","俬","凘","厮","司","咝","嘶","噝","媤","廝","恖","撕","斯","楒","泀","澌","燍","禗","禠","私","糹","絲","緦","纟","缌","罳","蕬","虒","蛳","蜤","螄","蟖","蟴","鉰","銯","鍶","鐁","锶","颸","飔","騦","鷥","鸶","鼶","㟃"],chéng:["丞","呈","城","埕","堘","塍","塖","宬","峸","惩","懲","成","承","挰","掁","揨","枨","棖","橙","檙","洆","溗","澂","珵","珹","畻","程","窚","筬","絾","脭","荿","誠","诚","郕","酲","鋮","铖","騬","鯎"],diū:["丟","丢","銩","铥"],liǎng:["両","两","兩","唡","啢","掚","緉","脼","蜽","裲","魉","魎","𬜯"],yǒu:["丣","卣","友","梄","湵","牖","禉","羑","聈","苃","莠","蜏","酉","銪","铕","黝"],yán:["严","厳","啱","喦","嚴","塩","壛","壧","妍","姸","娫","娮","岩","嵒","嵓","巌","巖","巗","延","揅","昖","楌","檐","櫩","欕","沿","炎","炏","狿","琂","盐","碞","筵","簷","莚","蔅","虤","蜒","言","訁","訮","詽","讠","郔","閆","閻","闫","阎","顏","顔","颜","鹽","麣","𫄧"],bìng:["並","併","倂","傡","垪","摒","栤","病","窉","竝","誁","靐","鮩"],"sàng sāng":["丧"],gǔn:["丨","惃","滚","滾","磙","緄","绲","蓘","蔉","衮","袞","輥","辊","鮌","鯀","鲧"],jiū:["丩","勼","啾","揪","揫","朻","究","糾","纠","萛","赳","阄","鬏","鬮","鳩","鸠"],"gè gě":["个","個","各"],yā:["丫","圧","孲","庘","押","枒","桠","椏","錏","鐚","鴉","鴨","鵶","鸦","鸭"],pán:["丬","媻","幋","槃","洀","瀊","爿","盘","盤","磐","縏","蒰","蟠","蹒","蹣","鎜","鞶"],"zhōng zhòng":["中"],jǐ:["丮","妀","己","戟","挤","掎","撠","擠","橶","泲","犱","脊","虮","蟣","魢","鱾","麂"],jiè:["丯","介","借","唶","堺","屆","届","岕","庎","徣","戒","楐","犗","玠","琾","界","畍","疥","砎","蚧","蛶","衸","褯","誡","诫","鎅","骱","魪"],fēng:["丰","仹","偑","僼","凨","凬","凮","妦","寷","封","峯","峰","崶","枫","楓","檒","沣","沨","渢","灃","烽","犎","猦","琒","疯","瘋","盽","砜","碸","篈","蘴","蜂","蠭","豐","鄷","酆","鋒","鎽","鏠","锋","霻","靊","飌","麷"],"guàn kuàng":["丱"],chuàn:["串","汌","玔","賗","釧","钏"],chǎn:["丳","产","冁","剷","囅","嵼","旵","浐","滻","灛","產","産","簅","蒇","蕆","諂","譂","讇","谄","鏟","铲","閳","闡","阐","骣","𬊤"],lín:["临","冧","壣","崊","嶙","斴","晽","暽","林","潾","瀶","燐","琳","璘","瞵","碄","磷","粦","粼","繗","翷","臨","轔","辚","遴","邻","鄰","鏻","阾","隣","霖","驎","鱗","鳞","麐","麟","𬴊","𬭸"],zhuó:["丵","劅","卓","啄","圴","妰","娺","撯","擆","擢","斫","斮","斱","斲","斵","晫","椓","浊","浞","濁","灼","烵","琸","硺","禚","窡","籗","籱","罬","茁","蠗","蠿","諁","諑","謶","诼","酌","鐲","镯","鵫","鷟","䓬","𬸦"],zhǔ:["丶","主","劯","嘱","囑","宔","帾","拄","渚","濐","煑","煮","燝","瞩","矚","罜","詝","陼","鸀","麈","𬣞"],bā:["丷","仈","八","叭","哵","夿","岜","巴","捌","朳","玐","疤","笆","粑","羓","芭","蚆","豝","釟"],wán:["丸","刓","完","岏","抏","捖","汍","烷","玩","琓","笂","紈","纨","翫","芄","貦","頑","顽"],dān:["丹","勯","匰","単","妉","媅","殚","殫","甔","眈","砃","箪","簞","耼","耽","聃","聸","褝","襌","躭","郸","鄲","酖","頕"],"wèi wéi":["为"],"jǐng dǎn":["丼"],"lì lí":["丽"],jǔ:["举","弆","挙","擧","椇","榉","榘","櫸","欅","矩","筥","聥","舉","莒","蒟","襷","踽","齟","龃"],piě:["丿","苤","鐅","𬭯"],fú:["乀","伏","俘","凫","刜","匐","咈","哹","垘","孚","岪","巿","帗","幅","幞","弗","彿","怫","扶","柫","栿","桴","氟","泭","浮","涪","澓","炥","玸","甶","畉","癁","祓","福","稪","符","箙","紱","紼","絥","綍","绂","绋","罘","罦","翇","艀","芙","芣","苻","茀","茯","菔","葍","虙","蚨","蜉","蝠","袚","袱","襆","襥","諨","豧","踾","輻","辐","郛","鉘","鉜","韍","韨","颫","髴","鮄","鮲","鳧","鳬","鴔","鵩","黻"],"yí jí":["乁"],yì:["乂","义","亄","亦","亿","伇","伿","佾","俋","億","兿","刈","劓","劮","勚","勩","匇","呓","呭","呹","唈","囈","圛","坄","垼","埸","奕","嫕","嬑","寱","屹","峄","嶧","帟","帠","幆","廙","异","弈","弋","役","忆","怈","怿","悒","意","憶","懌","懿","抑","挹","敡","易","晹","曀","曎","杙","枍","棭","榏","槸","檍","歝","殔","殪","殹","毅","浂","浥","浳","湙","溢","潩","澺","瀷","炈","焲","熠","熤","熼","燚","燡","燱","獈","玴","異","疫","痬","瘗","瘞","瘱","癔","益","瞖","穓","竩","篒","縊","繶","繹","绎","缢","義","羿","翊","翌","翳","翼","耴","肄","肊","膉","臆","艗","艺","芅","苅","萟","蓺","薏","藙","藝","蘙","虉","蜴","螠","衪","袣","裔","裛","褹","襼","訲","訳","詍","詣","誼","譯","議","讛","议","译","诣","谊","豙","豛","豷","貖","贀","跇","轶","逸","邑","鄓","醷","釴","鈠","鎰","鐿","镒","镱","阣","隿","霬","饐","駅","驛","驿","骮","鮨","鶂","鶃","鶍","鷁","鷊","鷧","鷾","鸃","鹝","鹢","黓","齸","𬬩","㑊","𫄷","𬟁"],nǎi:["乃","倷","奶","嬭","廼","氖","疓","艿","迺","釢"],wǔ:["乄","五","仵","伍","侮","倵","儛","午","啎","妩","娬","嫵","庑","廡","忤","怃","憮","摀","武","潕","熓","牾","玝","珷","瑦","甒","碔","舞","躌","迕","逜","陚","鵡","鹉","𣲘"],jiǔ:["久","乆","九","乣","奺","杦","汣","灸","玖","紤","舏","酒","镹","韭","韮"],"tuō zhé":["乇","杔","馲"],"me mó ma yāo":["么"],zhī:["之","倁","卮","巵","搘","支","栀","梔","椥","榰","汁","泜","疷","祗","祬","秓","稙","綕","肢","胑","胝","脂","芝","蘵","蜘","衼","隻","鳷","鴲","鼅","𦭜"],"wū wù":["乌"],zhà:["乍","咤","宱","搾","榨","溠","痄","蚱","詐","诈","醡","霅","䃎"],hū:["乎","乯","匢","匫","呼","唿","嘑","垀","寣","幠","忽","惚","昒","歑","泘","淴","滹","烀","苸","虍","虖","謼","軤","轷","雐"],fá:["乏","伐","傠","坺","垡","墢","姂","栰","浌","瞂","笩","筏","罚","罰","罸","藅","閥","阀"],"lè yuè yào lào":["乐","樂"],yín:["乑","吟","噖","嚚","圁","垠","夤","婬","寅","峾","崟","崯","檭","殥","泿","淫","滛","烎","犾","狺","璌","硍","碒","荶","蔩","訔","訚","訡","誾","鄞","鈝","銀","银","霪","鷣","齦"],pīng:["乒","俜","娉","涄","甹","砯","聠","艵","頩"],pāng:["乓","滂","胮","膖","雱","霶"],qiáo:["乔","侨","僑","嫶","憔","桥","槗","樵","橋","櫵","犞","瞧","硚","礄","荍","荞","蕎","藮","譙","趫","鐈","鞒","鞽","顦"],hǔ:["乕","琥","萀","虎","虝","錿","鯱"],guāi:["乖"],"chéng shèng":["乗","乘","娍"],yǐ:["乙","乛","以","倚","偯","嬟","崺","已","庡","扆","攺","敼","旑","旖","檥","矣","礒","笖","舣","艤","苡","苢","蚁","螘","蟻","裿","踦","輢","轙","逘","酏","釔","鈘","鉯","钇","顗","鳦","齮","𫖮","𬺈"],"háo yǐ":["乚"],"niè miē":["乜"],qǐ:["乞","企","启","唘","啓","啔","啟","婍","屺","杞","棨","玘","盀","綺","绮","芑","諬","起","邔","闙"],yě:["也","冶","嘢","埜","壄","漜","野"],xí:["习","喺","媳","嶍","席","椺","檄","漝","習","蓆","袭","襲","覡","觋","謵","趘","郋","鎴","隰","霫","飁","騱","騽","驨","鰼","鳛","𠅤","𫘬"],xiāng:["乡","厢","廂","忀","楿","欀","湘","瓖","稥","箱","緗","缃","膷","芗","萫","葙","薌","襄","郷","鄉","鄊","鄕","鑲","镶","香","驤","骧","鱜","麘","𬙋"],shū:["书","倏","倐","儵","叔","姝","尗","抒","掓","摅","攄","書","枢","梳","樞","殊","殳","毹","毺","淑","瀭","焂","疎","疏","紓","綀","纾","舒","菽","蔬","踈","軗","輸","输","鄃","陎","鮛","鵨"],dǒu:["乧","抖","枓","蚪","鈄","阧","陡"],shǐ:["乨","使","兘","史","始","宩","屎","榁","矢","笶","豕","鉂","駛","驶"],jī:["乩","僟","击","刉","刏","剞","叽","唧","喞","嗘","嘰","圾","基","墼","姬","屐","嵆","嵇","撃","擊","朞","机","枅","樭","機","毄","激","犄","玑","璣","畸","畿","癪","矶","磯","积","積","笄","筓","箕","簊","緁","羁","羇","羈","耭","肌","芨","虀","覉","覊","譏","譤","讥","賫","賷","赍","跻","踑","躋","躸","銈","錤","鐖","鑇","鑙","隮","雞","鞿","韲","飢","饑","饥","魕","鳮","鶏","鶺","鷄","鸄","鸡","齎","齏","齑","𬯀","𫓯","𫓹","𫌀"],náng:["乪","嚢","欜","蠰","饢"],jiā:["乫","佳","傢","加","嘉","抸","枷","梜","毠","泇","浃","浹","犌","猳","珈","痂","笳","糘","耞","腵","葭","袈","豭","貑","跏","迦","鉫","鎵","镓","鴐","麚","𬂩"],jù:["乬","倨","倶","具","剧","劇","勮","埧","埾","壉","姖","屦","屨","岠","巨","巪","怇","惧","愳","懅","懼","拒","拠","昛","歫","洰","澽","炬","烥","犋","秬","窭","窶","簴","粔","耟","聚","虡","蚷","詎","讵","豦","距","踞","躆","遽","邭","醵","鉅","鐻","钜","颶","飓","駏","鮔"],shí:["乭","十","埘","塒","姼","实","実","寔","實","峕","嵵","时","旹","時","榯","湜","溡","炻","祏","竍","蚀","蝕","辻","遈","鉐","飠","饣","鮖","鰣","鲥","鼫","鼭"],mǎo:["乮","冇","卯","峁","戼","昴","泖","笷","蓩","鉚","铆"],mǎi:["买","嘪","荬","蕒","買","鷶"],luàn:["乱","亂","釠"],rǔ:["乳","擩","汝","肗","辱","鄏"],xué:["乴","学","學","峃","嶨","斈","泶","澩","燢","穴","茓","袕","踅","鷽","鸴"],yǎn:["䶮","乵","俨","偃","儼","兖","兗","厣","厴","噞","孍","嵃","巘","巚","弇","愝","戭","扊","抁","掩","揜","曮","椼","檿","沇","渷","演","琰","甗","眼","罨","萒","蝘","衍","褗","躽","遃","郾","隒","顩","魇","魘","鰋","鶠","黡","黤","黬","黭","黶","鼴","鼹","齴","龑","𬸘","𬙂","𪩘"],fǔ:["乶","俌","俛","俯","府","弣","抚","拊","撫","斧","椨","滏","焤","甫","盙","簠","腐","腑","蜅","輔","辅","郙","釜","釡","阝","頫","鬴","黼","㕮","𫖯"],shā:["乷","唦","杀","桬","殺","毮","猀","痧","砂","硰","紗","繺","纱","蔱","裟","鎩","铩","閷","髿","魦","鯊","鯋","鲨"],nǎ:["乸","雫"],qián:["乹","亁","仱","偂","前","墘","媊","岒","拑","掮","榩","橬","歬","潛","潜","濳","灊","箝","葥","虔","軡","鈐","鉗","銭","錢","鎆","钤","钱","钳","靬","騚","騝","鰬","黔","黚"],suǒ:["乺","唢","嗩","所","暛","溑","溹","琐","琑","瑣","索","褨","鎖","鎻","鏁","锁"],yú:["乻","于","亐","伃","余","堣","堬","妤","娛","娯","娱","嬩","崳","嵎","嵛","愚","扵","揄","旟","楡","楰","榆","欤","歈","歟","歶","渔","渝","湡","漁","澞","牏","狳","玗","玙","瑜","璵","盂","睮","窬","竽","籅","羭","腴","臾","舁","舆","艅","茰","萮","萸","蕍","蘛","虞","虶","蝓","螸","衧","褕","覦","觎","諛","謣","谀","踰","輿","轝","逾","邘","酑","鍝","隅","雓","雩","餘","馀","騟","骬","髃","魚","魣","鮽","鯲","鰅","鱼","鷠","鸆","齵"],zhù:["乼","伫","佇","住","坾","墸","壴","嵀","拀","杼","柱","樦","殶","注","炷","疰","眝","祝","祩","竚","筯","箸","篫","簗","紵","紸","纻","羜","翥","苎","莇","蛀","註","貯","贮","跓","軴","鉒","鋳","鑄","铸","馵","駐","驻"],zhě:["乽","者","褶","襵","赭","踷","鍺","锗"],"qián gān":["乾"],"zhì luàn":["乿"],guī:["亀","圭","妫","媯","嫢","嬀","帰","归","摫","椝","槻","槼","櫷","歸","珪","瑰","璝","瓌","皈","瞡","硅","茥","蘬","規","规","邽","郌","閨","闺","騩","鬶","鬹"],"lǐn lìn":["亃"],jué:["亅","决","刔","劂","匷","厥","噊","孒","孓","崛","崫","嶥","彏","憠","憰","戄","抉","挗","掘","攫","桷","橛","橜","欮","氒","決","灍","焳","熦","爑","爴","爵","獗","玃","玦","玨","珏","瑴","瘚","矍","矡","砄","絕","絶","绝","臄","芵","蕝","蕨","虳","蟨","蟩","觖","觮","觼","訣","譎","诀","谲","貜","赽","趉","蹷","躩","鈌","鐍","鐝","钁","镢","鴂","鴃","鷢","𫘝","㵐","𫔎"],"le liǎo":["了"],"gè mā":["亇"],"yǔ yú":["予","懙"],zhēng:["争","佂","凧","姃","媜","峥","崝","崢","征","徰","炡","烝","爭","狰","猙","癥","眐","睁","睜","筝","箏","篜","聇","脀","蒸","踭","鉦","錚","鏳","鬇"],èr:["二","刵","咡","弍","弐","樲","誀","貮","貳","贰","髶"],chù:["亍","傗","儊","怵","憷","搐","斶","歜","珿","琡","矗","竌","絀","绌","臅","触","觸","豖","鄐","閦","黜"],kuī:["亏","刲","岿","巋","盔","窥","窺","聧","虧","闚","顝"],yún:["云","伝","勻","匀","囩","妘","愪","抣","昀","橒","沄","涢","溳","澐","熉","畇","秐","筼","篔","紜","縜","纭","耘","芸","蒷","蕓","郧","鄖","鋆","雲"],hù:["互","冱","嗀","嚛","婟","嫭","嫮","岵","帍","弖","怙","戶","户","戸","戽","扈","护","昈","槴","沍","沪","滬","熩","瓠","祜","笏","簄","粐","綔","蔰","護","豰","鄠","鍙","頀","鱯","鳠","鳸","鸌","鹱"],qí:["亓","剘","埼","岐","岓","崎","嵜","愭","掑","斉","斊","旂","旗","棊","棋","檱","櫀","歧","淇","濝","猉","玂","琦","琪","璂","畦","疧","碁","碕","祁","祈","祺","禥","竒","簯","簱","籏","粸","綥","綦","肵","脐","臍","艩","芪","萁","萕","蕲","藄","蘄","蚑","蚚","蛴","蜝","蜞","螧","蠐","褀","軝","鄿","釮","錡","锜","陭","頎","颀","騎","騏","騹","骐","骑","鬐","鬿","鯕","鰭","鲯","鳍","鵸","鶀","麒","麡","𨙸","𬨂","䓫"],jǐng:["井","儆","刭","剄","坓","宑","幜","憬","暻","殌","汫","汬","澋","璄","璟","璥","穽","肼","蟼","警","阱","頚","頸"],sì:["亖","佀","価","儩","兕","嗣","四","姒","娰","孠","寺","巳","柶","榹","汜","泗","泤","洍","洠","涘","瀃","牭","祀","禩","竢","笥","耜","肂","肆","蕼","覗","貄","釲","鈶","鈻","飤","飼","饲","駟","騃","驷"],suì:["亗","嬘","岁","嵗","旞","檖","歲","歳","澻","煫","燧","璲","砕","碎","祟","禭","穂","穗","穟","繀","繐","繸","襚","誶","譢","谇","賥","邃","鐆","鐩","隧","韢","𫟦","𬭼"],gèn:["亘","亙","揯","搄","茛"],yà:["亚","亜","俹","冴","劜","圔","圠","埡","娅","婭","揠","氩","氬","犽","砑","稏","聐","襾","覀","訝","讶","迓","齾"],"xiē suò":["些"],"qí zhāi":["亝","齊"],"yā yà":["亞","压","垭","壓","铔"],"jí qì":["亟","焏"],tóu:["亠","投","頭","骰"],"wáng wú":["亡"],"kàng háng gāng":["亢"],dà:["亣","眔"],jiāo:["交","僬","娇","嬌","峧","嶕","嶣","憍","椒","浇","澆","焦","礁","穚","簥","胶","膠","膲","茭","茮","蕉","虠","蛟","蟭","跤","轇","郊","鐎","驕","骄","鮫","鲛","鵁","鷦","鷮","鹪","䴔"],hài:["亥","嗐","害","氦","餀","饚","駭","駴","骇"],"hēng pēng":["亨"],mǔ:["亩","姆","峔","拇","母","牡","牳","畂","畆","畒","畝","畞","畮","砪","胟","踇","鉧","𬭁","𧿹"],ye:["亪"],xiǎng:["享","亯","响","想","晑","蚃","蠁","響","飨","餉","饗","饷","鮝","鯗","鱶","鲞"],jīng:["京","亰","兢","坕","坙","婛","惊","旌","旍","晶","橸","泾","涇","猄","睛","秔","稉","粳","精","経","經","綡","聙","腈","茎","荆","荊","菁","葏","驚","鯨","鲸","鶁","鶄","麖","麠","鼱","䴖"],tíng:["亭","停","婷","嵉","庭","廷","楟","榳","筳","聤","莛","葶","蜓","蝏","諪","邒","霆","鼮","䗴"],liàng:["亮","喨","悢","晾","湸","諒","谅","輌","輛","辆","鍄"],"qīn qìng":["亲","親"],bó:["亳","仢","侼","僰","博","帛","愽","懪","挬","搏","欂","浡","淿","渤","煿","牔","狛","瓝","礴","秡","箔","簙","糪","胉","脖","膊","舶","艊","萡","葧","袯","襏","襮","謈","踣","郣","鈸","鉑","鋍","鎛","鑮","钹","铂","镈","餺","馎","馛","馞","駁","駮","驳","髆","鵓","鹁"],yòu:["亴","佑","佦","侑","又","右","哊","唀","囿","姷","宥","峟","幼","狖","祐","蚴","誘","诱","貁","迶","酭","釉","鼬"],xiè:["亵","伳","偞","偰","僁","卨","卸","噧","塮","夑","媟","屑","屧","廨","徢","懈","暬","械","榍","榭","泻","洩","渫","澥","瀉","瀣","灺","炧","炨","燮","爕","獬","祄","禼","糏","紲","絏","絬","繲","纈","绁","缷","薢","薤","蟹","蠏","褉","褻","謝","谢","躞","邂","靾","韰","齂","齘","齛","齥","𬹼","𤫉"],"dǎn dàn":["亶","馾"],lián:["亷","劆","匲","匳","嗹","噒","奁","奩","嫾","帘","廉","怜","憐","涟","漣","濂","濓","瀮","熑","燫","簾","籢","籨","縺","翴","联","聨","聫","聮","聯","臁","莲","蓮","薕","螊","蠊","裢","褳","覝","謰","蹥","连","連","鎌","鐮","镰","鬑","鰱","鲢"],duǒ:["亸","哚","嚲","埵","崜","朵","朶","綞","缍","趓","躱","躲","軃"],"wěi mén":["亹","斖"],rén:["人","亻","仁","壬","忈","忎","朲","秂","芢","魜","鵀"],jí:["亼","亽","伋","佶","偮","卙","即","卽","及","叝","吉","堲","塉","姞","嫉","岌","嵴","嶯","彶","忣","急","愱","戢","揤","极","棘","楫","極","槉","檝","殛","汲","湒","潗","疾","瘠","皍","笈","箿","籍","級","级","膌","艥","蒺","蕀","蕺","蝍","螏","襋","觙","谻","踖","蹐","躤","輯","轚","辑","郆","銡","鍓","鏶","集","雧","霵","鹡","㴔"],wáng:["亾","仼","兦","莣","蚟"],"shén shí":["什"],lè:["仂","叻","忇","氻","泐","玏","砳","簕","艻","阞","韷","餎","鰳","鱳","鳓"],dīng:["仃","叮","帄","玎","疔","盯","耵","虰","靪"],zè:["仄","崱","庂","捑","昃","昗","汄"],"jǐn jìn":["仅","僅","嫤"],"pú pū":["仆"],"chóu qiú":["仇"],zhǎng:["仉","幥","掌","礃"],jīn:["今","堻","巾","惍","斤","津","珒","琻","璡","砛","筋","荕","衿","襟","觔","金","釒","釿","钅","鹶","黅","𬬱"],bīng:["仌","仒","兵","冫","冰","掤","氷","鋲"],réng:["仍","礽","芿","辸","陾"],fó:["仏","坲","梻"],"jīn sǎn":["仐"],lún:["仑","伦","侖","倫","囵","圇","婨","崘","崙","棆","沦","淪","磮","腀","菕","蜦","踚","輪","轮","錀","陯","鯩","𬬭"],cāng:["仓","仺","倉","凔","嵢","沧","滄","濸","獊","舱","艙","苍","蒼","螥","鸧"],"zǎi zǐ zī":["仔"],tā:["他","塌","它","榙","溻","牠","祂","褟","趿","遢","闧"],fù:["付","偩","傅","冨","副","咐","坿","复","妇","婦","媍","嬔","富","復","椱","祔","禣","竎","緮","縛","缚","腹","萯","蕧","蚹","蛗","蝜","蝮","袝","複","覄","覆","訃","詂","讣","負","賦","賻","负","赋","赙","赴","輹","鍑","鍢","阜","附","馥","駙","驸","鮒","鰒","鲋","鳆","㳇"],xiān:["仙","仚","佡","僊","僲","先","嘕","奾","屳","廯","忺","憸","掀","暹","杴","氙","珗","祆","秈","籼","繊","纎","纖","苮","褼","襳","跹","蹮","躚","酰","鍁","锨","韯","韱","馦","鱻","鶱","𬸣"],"tuō chà duó":["仛"],hóng:["仜","吰","垬","妅","娂","宏","宖","弘","彋","汯","泓","洪","浤","渱","潂","玒","玜","竑","竤","篊","粠","紘","紭","綋","纮","翃","翝","耾","苰","荭","葒","葓","谹","谼","鈜","鉷","鋐","閎","闳","霐","霟","鞃","魟","鴻","鸿","黉","黌","𫟹","𬭎"],tóng:["仝","佟","哃","峂","峝","庝","彤","晍","曈","桐","氃","浵","潼","犝","獞","眮","瞳","砼","秱","童","粡","膧","茼","蚒","詷","赨","酮","鉖","鉵","銅","铜","餇","鮦","鲖","𫍣","𦒍"],rèn:["仞","仭","刃","刄","妊","姙","屻","岃","扨","牣","祍","紉","紝","絍","纫","纴","肕","腍","衽","袵","訒","認","认","讱","軔","轫","鈓","靭","靱","韌","韧","飪","餁","饪"],qiān:["仟","佥","僉","千","圲","奷","孯","岍","悭","愆","慳","扦","拪","搴","撁","攐","攑","攓","杄","櫏","汘","汧","牵","牽","竏","签","簽","籖","籤","粁","芊","茾","蚈","褰","諐","謙","谦","谸","迁","遷","釺","鈆","鉛","鏲","钎","阡","韆","顅","騫","骞","鬜","鬝","鵮","鹐"],"gǎn hàn":["仠"],"yì gē":["仡"],dài:["代","侢","叇","垈","埭","岱","帒","带","帯","帶","廗","怠","戴","曃","柋","殆","瀻","玳","瑇","甙","簤","紿","緿","绐","艜","蝳","袋","襶","貣","贷","蹛","軑","軚","軩","轪","迨","霴","靆","鴏","黛","黱"],"lìng líng lǐng":["令"],chào:["仦","耖","觘"],"cháng zhǎng":["仧","兏","長","长"],sā:["仨"],cháng:["仩","偿","償","嘗","嚐","嫦","尝","常","徜","瑺","瓺","甞","肠","腸","膓","苌","萇","镸","鱨","鲿"],yí:["仪","侇","儀","冝","匜","咦","圯","夷","姨","宐","宜","宧","寲","峓","嶬","嶷","巸","彛","彜","彝","彞","怡","恞","扅","暆","栘","椬","椸","沂","洟","熪","瓵","痍","移","簃","籎","羠","胰","萓","蛦","螔","觺","謻","貽","贻","跠","迻","遺","鏔","頉","頤","頥","顊","颐","饴","鮧","鴺"],mù:["仫","凩","募","墓","幕","幙","慔","慕","暮","暯","木","楘","毣","沐","炑","牧","狇","目","睦","穆","艒","苜","莯","蚞","鉬","钼","雮","霂"],"men mén":["们"],fǎn:["仮","反","橎","返"],"chào miǎo":["仯"],"yǎng áng":["仰"],zhòng:["仲","众","堹","妕","媑","狆","眾","祌","筗","茽","蚛","衆","衶","諥"],"pǐ pí":["仳"],wò:["仴","偓","卧","媉","幄","握","楃","沃","渥","濣","瓁","瞃","硪","肟","腛","臥","齷","龌"],jiàn:["件","俴","健","僭","剑","剣","剱","劍","劎","劒","劔","墹","寋","建","徤","擶","旔","楗","毽","洊","涧","澗","牮","珔","瞷","磵","礀","箭","糋","繝","腱","臶","舰","艦","荐","薦","覸","諓","諫","譛","谏","賎","賤","贱","趝","践","踐","踺","轞","鉴","鍳","鍵","鐱","鑑","鑒","鑬","鑳","键","間","餞","饯","𬣡"],"jià jiè jie":["价"],"yǎo fó":["仸"],"rèn rén":["任"],"fèn bīn":["份"],dī:["仾","低","啲","埞","堤","岻","彽","樀","滴","磾","秪","羝","袛","趆","隄","鞮","䃅"],fǎng:["仿","倣","旊","昉","昘","瓬","眆","紡","纺","舫","訪","访","髣","鶭"],zhōng:["伀","刣","妐","幒","彸","忠","柊","汷","泈","炂","盅","籦","終","终","舯","蔠","蜙","螤","螽","衳","衷","蹱","鈡","鍾","鐘","钟","锺","鴤","鼨"],pèi:["伂","佩","姵","帔","斾","旆","沛","浿","珮","蓜","轡","辔","配","霈","馷"],diào:["伄","吊","弔","掉","瘹","盄","窎","窵","竨","訋","釣","鈟","銱","鋽","鑃","钓","铞","雿","魡"],dùn:["伅","潡","炖","燉","盾","砘","碷","踲","逇","遁","遯","鈍","钝"],wěn:["伆","刎","吻","呅","抆","桽","稳","穏","穩","紊","肳","脗"],xǐn:["伈"],kàng:["伉","匟","囥","抗","炕","鈧","钪"],ài:["伌","僾","塧","壒","嫒","嬡","愛","懓","暧","曖","爱","瑷","璦","皧","瞹","砹","硋","碍","礙","薆","譺","賹","鑀","隘","靉","餲","馤","鱫","鴱"],"jì qí":["伎","薺"],"xiū xǔ":["休"],"jìn yín":["伒"],dǎn:["伔","刐","撢","玬","瓭","紞","胆","膽","衴","賧","赕","黕","𬘘"],fū:["伕","呋","娐","孵","尃","怤","懯","敷","旉","玞","砆","稃","筟","糐","綒","肤","膚","荂","荴","衭","趺","跗","邞","鄜","酜","鈇","麩","麬","麱","麸","𫓧"],tǎng:["伖","傥","儻","埫","戃","曭","爣","矘","躺","鎲","钂","镋"],yōu:["优","優","呦","嚘","峳","幽","忧","悠","憂","攸","櫌","滺","瀀","纋","羪","耰","逌","鄾","麀"],huǒ:["伙","夥","火","煷","邩","鈥","钬"],"huì kuài":["会","會","浍","璯"],yǔ:["伛","俁","俣","偊","傴","匬","噳","圄","圉","宇","寙","屿","嶼","庾","挧","敔","斞","楀","瑀","瘐","祤","禹","穥","窳","羽","與","萭","貐","鄅","頨","麌","齬","龉","㺄"],cuì:["伜","啛","忰","悴","毳","淬","焠","疩","瘁","竁","粋","粹","紣","綷","翆","翠","脃","脆","脺","膬","膵","臎","萃","襊","顇"],sǎn:["伞","傘","糤","繖","饊","馓"],wěi:["伟","伪","偉","偽","僞","儰","娓","寪","屗","崣","嶉","徫","愇","捤","暐","梶","洧","浘","渨","炜","煒","猥","玮","瑋","痿","緯","纬","腲","艉","芛","苇","荱","萎","葦","蒍","蔿","蜼","諉","诿","踓","鍡","韑","韙","韡","韪","頠","颹","骩","骪","骫","鮪","鲔","𫇭","𬀩","𬱟"],"chuán zhuàn":["传","傳"],"chē jū":["伡","俥","车"],"jū chē":["車"],yá:["伢","厑","厓","堐","岈","崕","崖","涯","漄","牙","玡","琊","睚","笌","芽","蚜","衙","齖"],qiàn:["伣","俔","倩","儙","刋","壍","嬱","悓","棈","椠","槧","欠","歉","皘","篏","篟","縴","芡","蒨","蔳","輤","𬘬"],shāng:["伤","傷","商","墒","慯","殇","殤","滳","漡","熵","蔏","螪","觞","觴","謪","鬺"],chāng:["伥","倀","娼","昌","椙","淐","猖","琩","菖","裮","錩","锠","閶","阊","鯧","鲳","鼚"],"chen cāng":["伧"],xùn:["伨","侚","卂","噀","巺","巽","徇","愻","殉","殾","汛","潠","狥","蕈","訊","訓","訙","训","讯","迅","迿","逊","遜","鑂","顨","馴","驯"],xìn:["伩","囟","孞","脪","舋","衅","訫","釁","阠","顖"],chǐ:["伬","侈","卶","叺","呎","垑","恥","歯","耻","肔","胣","蚇","裭","褫","豉","鉹","齒","齿"],"xián xuán":["伭"],"nú nǔ":["伮"],"bó bǎi":["伯"],"gū gù":["估"],nǐ:["伱","你","儞","孴","拟","擬","旎","晲","狔","苨","薿","隬"],"nì ní":["伲"],bàn:["伴","办","半","姅","怑","扮","瓣","秚","絆","绊","辦","鉡","靽"],xù:["伵","侐","勖","勗","卹","叙","垿","壻","婿","序","恤","敍","敘","旭","昫","朂","槒","欰","殈","汿","沀","洫","溆","漵","潊","烅","烼","煦","獝","珬","盢","瞁","稸","絮","続","緒","緖","續","绪","续","聓","聟","蓄","藚","訹","賉","酗","頊","鱮","㳚"],zhòu:["伷","僽","冑","呪","咒","咮","宙","昼","晝","甃","皱","皺","籀","籒","籕","粙","紂","縐","纣","绉","胄","荮","葤","詋","酎","駎","驟","骤","㤘","㑇"],shēn:["伸","侁","兟","呻","堔","妽","娠","屾","峷","扟","敒","曑","柛","氠","深","燊","珅","甡","甧","申","眒","砷","穼","籶","籸","糂","紳","绅","罙","罧","葠","蓡","蔘","薓","裑","訷","詵","诜","身","駪","鯓","鯵","鰺","鲹","鵢","𬳽"],qū:["伹","佉","匤","呿","坥","屈","岖","岴","嶇","憈","抾","敺","浀","煀","祛","筁","粬","胠","蛆","蛐","袪","覻","詘","诎","趍","躯","軀","阹","駆","駈","驅","驱","髷","魼","鰸","鱋","鶌","麯","麴","麹","黢","㭕","𪨰","䓛"],"sì cì":["伺"],bēng:["伻","嘣","奟","崩","嵭","閍"],"sì shì":["似"],"jiā qié gā":["伽"],"yǐ chì":["佁"],"diàn tián":["佃","钿"],"hān gàn":["佄"],mài:["佅","劢","勱","卖","唛","売","脈","衇","賣","迈","邁","霡","霢","麥","麦","鿏"],dàn:["但","僤","啖","啗","啿","噉","嚪","帎","憺","旦","柦","氮","沊","泹","淡","狚","疍","癚","禫","窞","腅","萏","蓞","蛋","蜑","觛","訑","誕","诞","贉","霮","餤","饏","駳","髧","鴠","𫢸"],bù:["佈","勏","吥","咘","埗","埠","布","廍","怖","悑","步","歨","歩","瓿","篰","荹","蔀","踄","部","郶","鈈","钚","餢"],bǐ:["佊","俾","匕","夶","妣","彼","朼","柀","比","毞","沘","疕","秕","笔","筆","粃","聛","舭","貏","鄙"],"zhāo shào":["佋"],cǐ:["佌","此","泚","皉","𫚖"],wèi:["位","卫","味","喂","墛","媦","慰","懀","未","渭","煟","熭","犚","猬","畏","緭","罻","胃","苿","菋","藯","蘶","蝟","螱","衛","衞","褽","謂","讆","讏","谓","躗","躛","軎","轊","鏏","霨","餧","餵","饖","魏","鮇","鳚"],zuǒ:["佐","左","繓"],yǎng:["佒","傟","养","坱","岟","慃","懩","攁","氧","氱","炴","痒","癢","礢","紻","蝆","軮","養","駚"],"tǐ tī":["体","體"],zhàn:["佔","偡","嶘","战","戦","戰","栈","桟","棧","湛","站","綻","绽","菚","蘸","虥","虦","譧","轏","驏"],"hé hē hè":["何"],bì:["佖","咇","哔","嗶","坒","堛","壁","奰","妼","婢","嬖","币","幣","幤","庇","庳","廦","弊","弻","弼","彃","必","怭","愊","愎","敝","斃","梐","毕","毖","毙","湢","滗","滭","潷","煏","熚","狴","獘","獙","珌","璧","畀","畢","疪","痹","痺","皕","睤","碧","筚","箅","箆","篦","篳","粊","綼","縪","繴","罼","腷","苾","荜","萆","萞","蓖","蓽","蔽","薜","蜌","袐","襅","襞","襣","觱","詖","诐","貱","贔","赑","跸","蹕","躃","躄","避","邲","鄨","鄪","鉍","鏎","鐴","铋","閇","閉","閟","闭","陛","韠","飶","饆","馝","駜","驆","髀","魓","鮅","鷝","鷩","鼊"],tuó:["佗","坨","堶","岮","槖","橐","沱","砣","砤","碢","紽","詑","跎","酡","阤","陀","陁","駝","駞","騨","驒","驝","驼","鮀","鴕","鸵","鼉","鼍","鼧","𬶍"],shé:["佘","舌","虵","蛥"],"yì dié":["佚","昳","泆","軼"],"fó fú bì bó":["佛"],"zuò zuō":["作"],gōu:["佝","沟","溝","痀","篝","簼","緱","缑","袧","褠","鈎","鉤","钩","鞲","韝"],nìng:["佞","侫","倿","寕","泞","澝","濘"],qú:["佢","劬","戵","斪","欋","欔","氍","淭","灈","爠","璖","璩","癯","磲","籧","絇","胊","臞","菃","葋","蕖","蘧","蟝","蠷","蠼","衐","衢","躣","軥","鑺","鴝","鸜","鸲","鼩"],"yōng yòng":["佣"],wǎ:["佤","咓","砙","邷"],kǎ:["佧","垰","胩","裃","鉲"],bāo:["佨","勹","包","孢","煲","笣","胞","苞","蕔","裦","褒","襃","闁","齙","龅"],"huái huí":["佪"],"gé hè":["佫"],lǎo:["佬","咾","恅","栳","狫","珯","硓","老","耂","荖","蛯","轑","銠","铑","鮱"],xiáng:["佭","庠","栙","祥","絴","翔","詳","跭"],gé:["佮","匌","呄","嗝","塥","愅","挌","搿","槅","櫊","滆","膈","臵","茖","觡","諽","輵","轕","閣","阁","隔","鞷","韐","韚","騔","骼","鮯"],yáng:["佯","劷","垟","崸","徉","扬","揚","敭","旸","昜","暘","杨","楊","洋","炀","珜","疡","瘍","眻","蛘","諹","輰","鍚","钖","阦","阳","陽","霷","颺","飏","鰑","鴹","鸉"],bǎi:["佰","捭","摆","擺","栢","百","竡","粨","襬"],fǎ:["佱","峜","法","灋","砝","鍅"],mǐng:["佲","凕","姳","慏","酩"],"èr nài":["佴"],hěn:["佷","很","狠","詪","𬣳"],huó:["佸","活"],guǐ:["佹","匦","匭","厬","垝","姽","宄","庋","庪","恑","晷","湀","癸","祪","簋","蛫","蟡","觤","詭","诡","軌","轨","陒","鬼"],quán:["佺","全","啳","埢","姾","峑","巏","拳","搼","权","楾","権","權","泉","洤","湶","牷","犈","瑔","痊","硂","筌","縓","荃","葲","蜷","蠸","觠","詮","诠","跧","踡","輇","辁","醛","銓","铨","闎","顴","颧","駩","騡","鬈","鰁","鳈","齤"],tiāo:["佻","庣","旫","祧","聎"],jiǎo:["佼","儌","孂","挢","搅","撟","撹","攪","敫","敽","敿","晈","暞","曒","灚","燞","狡","璬","皎","皦","絞","纐","绞","腳","臫","蟜","譑","賋","踋","鉸","铰","餃","饺","鱎","龣"],cì:["佽","刾","庛","朿","栨","次","絘","茦","莿","蛓","螆","賜","赐"],xíng:["侀","刑","哘","型","娙","形","洐","硎","蛵","邢","郉","鈃","鉶","銒","钘","铏","陉","陘","餳","𫰛"],tuō:["侂","咃","咜","圫","托","拕","拖","汑","脫","脱","莌","袥","託","讬","飥","饦","魠","鮵"],kǎn:["侃","偘","冚","坎","惂","砍","莰","輡","轗","顑"],zhí:["侄","値","值","埴","執","姪","嬂","戠","执","摭","植","樴","淔","漐","直","禃","絷","縶","聀","职","職","膱","蟙","跖","踯","蹠","躑","軄","釞","馽"],gāi:["侅","垓","姟","峐","晐","畡","祴","荄","該","该","豥","賅","賌","赅","陔"],lái:["來","俫","倈","崃","崍","庲","来","梾","棶","涞","淶","猍","琜","筙","箂","莱","萊","逨","郲","錸","铼","騋","鯠","鶆","麳"],kuǎ:["侉","咵","垮","銙"],gōng:["侊","公","功","匑","匔","塨","宫","宮","工","幊","弓","恭","攻","杛","碽","糼","糿","肱","觥","觵","躬","躳","髸","龔","龚","䢼"],lì:["例","俐","俪","傈","儮","儷","凓","利","力","励","勵","历","厉","厤","厯","厲","叓","吏","呖","唎","唳","嚦","囇","坜","塛","壢","娳","婯","屴","岦","悧","悷","慄","戾","搮","暦","曆","曞","朸","枥","栃","栗","栛","檪","櫔","櫪","欐","歴","歷","沥","沴","涖","溧","濿","瀝","爏","犡","猁","珕","瑮","瓅","瓑","瓥","疬","痢","癧","盭","睙","砅","砺","砾","磿","礪","礫","礰","禲","秝","立","笠","篥","粒","粝","糲","脷","苈","茘","荔","莅","莉","蒚","蒞","藶","蚸","蛎","蛠","蜧","蝷","蠇","蠣","詈","讈","赲","轢","轣","轹","酈","鉝","隶","隷","雳","靂","靋","鬁","鳨","鴗","鷅","麜","𫵷","𬍛"],yīn:["侌","凐","喑","噾","囙","因","垔","堙","姻","婣","愔","慇","栶","氤","洇","溵","濦","瘖","禋","秵","筃","絪","緸","茵","蒑","蔭","裀","諲","銦","铟","闉","阥","阴","陰","陻","隂","霒","霠","鞇","音","韾","駰","骃","齗","𬘡","𬤇","𬮱"],mǐ:["侎","孊","弭","敉","洣","渳","灖","米","粎","羋","脒","芈","葞","蔝","銤"],zhū:["侏","株","槠","橥","櫧","櫫","洙","潴","瀦","猪","珠","硃","秼","絑","茱","蕏","蛛","蝫","蠩","袾","誅","諸","诛","诸","豬","跦","邾","銖","铢","駯","鮢","鯺","鴸","鼄"],ān:["侒","偣","媕","安","峖","庵","桉","氨","盦","盫","腤","菴","萻","葊","蓭","誝","諳","谙","鞌","鞍","韽","馣","鮟","鵪","鶕","鹌","𩽾"],lù:["侓","僇","勎","勠","圥","坴","塶","娽","峍","廘","彔","录","戮","摝","椂","樚","淕","淥","渌","漉","潞","琭","璐","甪","盝","睩","硉","祿","禄","稑","穋","箓","簏","簬","簵","簶","籙","粶","蔍","蕗","虂","螰","賂","赂","趢","路","踛","蹗","輅","轆","辂","辘","逯","醁","錄","録","錴","鏴","陸","騄","騼","鯥","鴼","鵦","鵱","鷺","鹭","鹿","麓","𫘧"],móu:["侔","劺","恈","眸","蛑","謀","谋","踎","鍪","鴾","麰"],ér:["侕","儿","児","兒","峏","栭","洏","粫","而","胹","荋","袻","輀","轜","陑","隭","髵","鮞","鲕","鴯","鸸"],"dòng tǒng tóng":["侗"],chà:["侘","奼","姹","岔","汊","詫","诧"],chì:["侙","傺","勅","勑","叱","啻","彳","恜","慗","憏","懘","抶","敕","斥","杘","湁","灻","炽","烾","熾","痓","痸","瘛","翄","翅","翤","翨","腟","赤","趩","遫","鉓","雴","飭","饬","鶒","鷘"],"gòng gōng":["供","共"],zhōu:["侜","周","喌","州","徟","洲","淍","炿","烐","珘","矪","舟","謅","譸","诌","賙","赒","輈","輖","辀","週","郮","銂","霌","駲","騆","鵃","鸼"],rú:["侞","儒","嚅","如","嬬","孺","帤","曘","桇","渪","濡","筎","茹","蕠","薷","蝡","蠕","袽","襦","邚","醹","銣","铷","顬","颥","鱬","鴑","鴽"],"jiàn cún":["侟"],xiá:["侠","俠","匣","峡","峽","敮","暇","柙","炠","烚","狎","狭","狹","珨","瑕","硖","硤","碬","祫","筪","縖","翈","舝","舺","蕸","赮","轄","辖","遐","鍜","鎋","陜","陿","霞","騢","魻","鶷","黠"],lǚ:["侣","侶","儢","吕","呂","屡","屢","履","挔","捛","旅","梠","焒","祣","稆","穭","絽","縷","缕","膂","膐","褛","褸","郘","鋁","铝"],ta:["侤"],"jiǎo yáo":["侥","僥","徺"],zhēn:["侦","偵","寊","帧","帪","幀","搸","斟","桢","楨","榛","樼","殝","浈","湞","潧","澵","獉","珍","珎","瑧","甄","眞","真","砧","碪","祯","禎","禛","箴","胗","臻","葴","蒖","蓁","薽","貞","贞","轃","遉","酙","針","鉁","錱","鍼","针","鱵"],"cè zè zhāi":["侧","側"],kuài:["侩","儈","凷","哙","噲","圦","块","塊","巜","廥","快","旝","欳","狯","獪","筷","糩","脍","膾","郐","鄶","鱠","鲙"],chái:["侪","儕","喍","柴","犲","祡","豺"],nóng:["侬","儂","农","哝","噥","檂","欁","浓","濃","燶","禯","秾","穠","脓","膿","蕽","襛","譨","農","辳","醲","鬞","𬪩"],jǐn:["侭","儘","卺","厪","巹","槿","漌","瑾","紧","緊","菫","蓳","謹","谨","錦","锦","饉","馑"],"hóu hòu":["侯","矦"],jiǒng:["侰","僒","冏","囧","泂","澃","炯","烱","煚","煛","熲","燛","窘","綗","褧","迥","逈","顈","颎","䌹"],"chěng tǐng":["侱"],"zhèn zhēn":["侲","揕"],zuò:["侳","做","唑","坐","岝","岞","座","祚","糳","胙","葃","葄","蓙","袏","阼"],qīn:["侵","兓","媇","嵚","嶔","欽","衾","誛","钦","顉","駸","骎","鮼"],jú:["侷","啹","婅","局","巈","椈","橘","泦","淗","湨","焗","犑","狊","粷","菊","蘜","趜","跼","蹫","輂","郹","閰","駶","驧","鵙","鵴","鶪","鼰","鼳","䴗"],"shù dōu":["侸"],tǐng:["侹","圢","娗","挺","涏","烶","珽","脡","艇","誔","頲","颋"],shèn:["侺","愼","慎","昚","涁","渗","滲","瘆","瘮","眘","祳","肾","胂","脤","腎","蜃","蜄","鋠"],"tuì tuó":["侻"],nán:["侽","喃","娚","抩","暔","枏","柟","楠","男","畘","莮","萳","遖"],xiāo:["侾","哓","嘵","嚻","囂","婋","宯","宵","庨","彇","揱","枭","枵","梟","櫹","歊","毊","消","潇","瀟","灱","灲","烋","焇","猇","獢","痚","痟","硝","硣","窙","箫","簘","簫","綃","绡","翛","膮","萧","蕭","虈","虓","蟂","蟏","蟰","蠨","踃","逍","銷","销","霄","颵","驍","骁","髇","髐","魈","鴞","鴵","鷍","鸮"],"biàn pián":["便","緶","缏"],tuǐ:["俀","腿","蹆","骽"],xì:["係","匸","卌","呬","墍","屃","屓","屭","忥","怬","恄","椞","潝","潟","澙","熂","犔","磶","禊","細","綌","縘","细","绤","舃","舄","蕮","虩","衋","覤","赩","趇","郤","釳","阋","隙","隟","霼","餼","饩","鬩","黖"],cù:["促","媨","憱","猝","瘄","瘯","簇","縬","脨","蔟","誎","趗","踧","踿","蹙","蹴","蹵","醋","顣","鼀"],é:["俄","囮","娥","峉","峨","峩","涐","珴","皒","睋","磀","莪","訛","誐","譌","讹","迗","鈋","鋨","锇","頟","額","额","魤","鵝","鵞","鹅"],qiú:["俅","叴","唒","囚","崷","巯","巰","扏","梂","殏","毬","求","汓","泅","浗","湭","煪","犰","玌","球","璆","皳","盚","紌","絿","肍","芁","莍","虬","虯","蛷","裘","觓","觩","訄","訅","賕","赇","逎","逑","遒","酋","釚","釻","銶","頄","鮂","鯄","鰽","鼽","𨱇"],xú:["俆","徐","禑"],"guàng kuāng":["俇"],kù:["俈","喾","嚳","库","庫","廤","瘔","絝","绔","袴","裤","褲","酷"],wù:["俉","务","務","勿","卼","坞","塢","奦","婺","寤","屼","岉","嵨","忢","悞","悟","悮","戊","扤","晤","杌","溩","焐","熃","物","痦","矹","窹","粅","蘁","誤","误","鋈","阢","隖","雾","霚","霧","靰","騖","骛","鶩","鹜","鼿","齀"],jùn:["俊","儁","呁","埈","寯","峻","懏","捃","攟","晙","棞","燇","珺","畯","竣","箟","蜠","賐","郡","陖","餕","馂","駿","骏","鵔","鵕","鵘","䐃"],liáng:["俍","墚","梁","椋","樑","粮","粱","糧","良","輬","辌","𫟅"],zǔ:["俎","唨","爼","祖","組","组","詛","诅","鎺","阻","靻"],"qiào xiào":["俏"],yǒng:["俑","勇","勈","咏","埇","塎","嵱","彮","怺","恿","悀","惥","愑","愹","慂","柡","栐","永","泳","湧","甬","蛹","詠","踊","踴","鯒","鲬"],hùn:["俒","倱","圂","尡","慁","掍","溷","焝","睴","觨","諢","诨"],jìng:["俓","傹","境","妌","婙","婧","弪","弳","径","徑","敬","曔","桱","梷","浄","瀞","獍","痉","痙","竞","竟","竫","競","竸","胫","脛","莖","誩","踁","迳","逕","鏡","镜","靖","静","靜","鵛"],sàn:["俕","閐"],pěi:["俖"],sú:["俗"],xī:["俙","僖","兮","凞","卥","厀","吸","唏","唽","嘻","噏","嚱","夕","奚","嬆","嬉","屖","嵠","巇","希","徆","徯","息","悉","悕","惁","惜","昔","晞","晰","晳","曦","析","桸","榽","樨","橀","欷","氥","汐","浠","淅","渓","溪","烯","焁","焈","焟","熄","熈","熙","熹","熺","熻","燨","爔","牺","犀","犠","犧","琋","瘜","皙","睎","瞦","矽","硒","磎","礂","稀","穸","窸","粞","糦","緆","繥","羲","翕","翖","肸","肹","膝","舾","莃","菥","蒠","蜥","螅","蟋","蠵","西","觹","觽","觿","譆","谿","豀","豨","豯","貕","赥","邜","鄎","酅","醯","釸","錫","鏭","鐊","鑴","锡","隵","餏","饎","饻","鯑","鵗","鸂","鼷"],lǐ:["俚","娌","峢","峲","李","欚","浬","澧","理","礼","禮","粴","裏","裡","豊","逦","邐","醴","鋰","锂","鯉","鱧","鱱","鲤","鳢"],bǎo:["保","堢","媬","宝","寚","寳","寶","珤","緥","葆","藵","褓","賲","靌","飹","飽","饱","駂","鳵","鴇","鸨"],"yú shù yù":["俞"],"sì qí":["俟"],"xìn shēn":["信"],xiū:["俢","修","咻","庥","樇","烌","羞","脙","脩","臹","貅","銝","鎀","飍","饈","馐","髤","髹","鮴","鱃","鵂","鸺","䗛"],dì:["俤","偙","僀","埊","墑","墬","娣","帝","怟","旳","梊","焍","玓","甋","眱","睇","碲","祶","禘","第","締","缔","腣","菂","蒂","蔕","蝃","蝭","螮","諦","谛","踶","递","逓","遞","遰","鉪","𤧛","䗖"],chóu:["俦","儔","嬦","惆","愁","懤","栦","燽","畴","疇","皗","稠","筹","籌","絒","綢","绸","菗","詶","讎","讐","踌","躊","酧","酬","醻","雔","雠","雦"],zhì:["俧","偫","儨","制","劕","垁","娡","寘","帙","帜","幟","庢","庤","廌","彘","徏","徝","志","忮","懥","懫","挃","挚","掷","摯","擲","旘","晊","智","栉","桎","梽","櫍","櫛","治","洷","滍","滞","滯","潌","瀄","炙","熫","狾","猘","璏","瓆","痔","痣","礩","祑","秩","秷","稚","稺","穉","窒","紩","緻","置","翐","膣","至","致","芖","蛭","袟","袠","製","覟","觗","觯","觶","誌","豑","豒","貭","質","贄","质","贽","跱","踬","躓","輊","轾","郅","銍","鋕","鑕","铚","锧","陟","隲","雉","駤","騭","騺","驇","骘","鯯","鴙","鷙","鸷","𬃊"],"liǎ liǎng":["俩"],jiǎn:["俭","倹","儉","减","剪","堿","弿","彅","戩","戬","拣","挸","捡","揀","撿","枧","柬","梘","检","検","檢","減","湕","瀽","瑐","睑","瞼","硷","碱","礆","笕","筧","简","簡","絸","繭","翦","茧","藆","蠒","裥","襇","襉","襺","詃","謇","謭","譾","谫","趼","蹇","鐗","鬋","鰎","鹸","鹻","鹼"],huò:["俰","咟","嚯","嚿","奯","彠","惑","或","擭","旤","曤","檴","沎","湱","瀖","獲","癨","眓","矐","祸","禍","穫","窢","耯","臛","艧","获","蒦","藿","蠖","謋","貨","货","鍃","鑊","镬","雘","霍","靃","韄","㸌"],"jù jū":["俱","据","鋸","锯"],xiào:["俲","傚","効","咲","哮","啸","嘋","嘨","嘯","孝","效","斅","斆","歗","涍","熽","笑","詨","誟"],pái:["俳","徘","牌","犤","猅","簰","簲","輫"],biào:["俵","鰾","鳔"],"chù tì":["俶"],fèi:["俷","剕","厞","吠","屝","废","廃","廢","昲","曊","櫠","沸","濷","狒","癈","肺","萉","費","费","鐨","镄","陫","靅","鼣"],fèng:["俸","凤","奉","湗","焨","煈","賵","赗","鳯","鳳","鴌"],ǎn:["俺","唵","埯","揞","罯","銨","铵"],bèi:["俻","倍","偝","偹","備","僃","备","悖","惫","愂","憊","昁","梖","焙","牬","犕","狈","狽","珼","琲","碚","禙","糒","苝","蓓","蛽","褙","貝","贝","軰","輩","辈","邶","郥","鄁","鋇","鐾","钡","鞁","鞴","𬇙"],yù:["俼","儥","喅","喩","喻","域","堉","妪","嫗","寓","峪","嶎","庽","彧","御","愈","慾","戫","昱","棛","棜","棫","櫲","欎","欝","欲","毓","浴","淯","滪","潏","澦","灪","焴","煜","燏","燠","爩","狱","獄","玉","琙","瘉","癒","砡","硢","硲","礇","礖","礜","禦","秗","稢","稶","篽","籞","籲","粖","緎","罭","聿","肀","艈","芋","芌","茟","蒮","蓣","蓹","蕷","蘌","蜟","蜮","袬","裕","誉","諭","譽","谕","豫","軉","輍","逳","遇","遹","郁","醧","鈺","鋊","錥","鐭","钰","閾","阈","雤","霱","預","预","飫","饇","饫","馭","驈","驭","鬰","鬱","鬻","魊","鱊","鳿","鴥","鴧","鴪","鵒","鷸","鸒","鹆","鹬"],xīn:["俽","噺","妡","嬜","廞","心","忄","忻","惞","新","昕","杺","欣","歆","炘","盺","薪","訢","辛","邤","鈊","鋅","鑫","锌","馨","馫","䜣","𫷷"],"hǔ chí":["俿"],jiù:["倃","僦","匓","匛","匶","厩","咎","就","廄","廏","廐","慦","捄","救","旧","柩","柾","桕","欍","殧","疚","臼","舅","舊","鯦","鷲","鹫","麔","齨","㠇"],yáo:["倄","傜","嗂","垚","堯","姚","媱","尧","尭","峣","嶢","嶤","徭","揺","搖","摇","摿","暚","榣","烑","爻","猺","珧","瑤","瑶","磘","窑","窯","窰","肴","蘨","謠","謡","谣","軺","轺","遙","遥","邎","顤","颻","飖","餆","餚","鰩","鱙","鳐"],"cuì zú":["倅"],"liǎng liǎ":["倆"],wǎn:["倇","唍","婉","惋","挽","晚","晥","晩","晼","梚","椀","琬","畹","皖","盌","碗","綩","綰","绾","脘","萖","踠","輓","鋔"],zǒng:["倊","偬","傯","嵸","总","惣","捴","搃","摠","燪","総","緫","縂","總","蓗"],guān:["倌","关","官","棺","瘝","癏","窤","蒄","関","闗","關","鰥","鱞","鳏"],tiǎn:["倎","唺","忝","悿","晪","殄","淟","睓","腆","舔","覥","觍","賟","錪","餂"],mén:["們","扪","捫","璊","菛","虋","鍆","钔","門","閅","门","𫞩"],"dǎo dào":["倒"],"tán tàn":["倓","埮"],"juè jué":["倔"],chuí:["倕","垂","埀","捶","搥","桘","棰","槌","箠","腄","菙","錘","鎚","锤","陲","顀"],xìng:["倖","姓","婞","嬹","幸","性","悻","杏","涬","緈","臖","荇","莕","葕"],péng:["倗","傰","塜","塳","弸","憉","捀","朋","棚","椖","樥","硼","稝","竼","篷","纄","膨","芃","蓬","蘕","蟚","蟛","袶","輣","錋","鑝","韸","韼","騯","髼","鬅","鬔","鵬","鹏"],"tǎng cháng":["倘"],hòu:["候","厚","后","垕","堠","後","洉","茩","豞","逅","郈","鮜","鱟","鲎","鲘"],tì:["倜","剃","嚏","嚔","屉","屜","悌","悐","惕","惖","戻","掦","替","朑","歒","殢","涕","瓋","笹","籊","薙","褅","逖","逷","髰","鬀","鬄"],gàn:["倝","凎","幹","榦","檊","淦","灨","盰","紺","绀","詌","贑","赣","骭","㽏"],"liàng jìng":["倞","靓"],suī:["倠","哸","夊","滖","濉","眭","睢","芕","荽","荾","虽","雖","鞖"],"chàng chāng":["倡"],jié:["倢","偼","傑","刦","刧","刼","劫","劼","卩","卪","婕","媫","孑","岊","崨","嵥","嶻","巀","幯","截","捷","掶","擮","昅","杢","杰","桀","桝","楬","楶","榤","洁","滐","潔","狤","睫","礍","竭","節","羯","莭","蓵","蛣","蜐","蠘","蠞","蠽","衱","袺","訐","詰","誱","讦","踕","迼","鉣","鍻","镼","頡","鮚","鲒","㛃"],"kǒng kōng":["倥"],juàn:["倦","劵","奆","慻","桊","淃","狷","獧","眷","睊","睠","絭","絹","绢","罥","羂","腃","蔨","鄄","餋"],zōng:["倧","堫","宗","嵏","嵕","惾","朡","棕","椶","熧","猣","磫","緃","翪","腙","葼","蝬","豵","踨","踪","蹤","鍐","鑁","騌","騣","骔","鬃","鬉","鬷","鯮","鯼"],ní:["倪","坭","埿","尼","屔","怩","淣","猊","籾","聣","蚭","蜺","觬","貎","跜","輗","郳","鈮","铌","霓","馜","鯢","鲵","麑","齯","𫐐","𫠜"],zhuō:["倬","拙","捉","桌","梲","棁","棳","槕","涿","窧","鐯","䦃"],"wō wēi":["倭"],luǒ:["倮","剆","曪","瘰","癳","臝","蓏","蠃","裸","躶"],sōng:["倯","凇","娀","崧","嵩","庺","憽","松","枀","枩","柗","梥","檧","淞","濍","硹","菘","鬆"],lèng:["倰","堎","愣","睖","踜"],zì:["倳","剚","字","恣","渍","漬","牸","眥","眦","胔","胾","自","茡","荢"],bèn:["倴","坌","捹","撪","渀","笨","逩"],cǎi:["倸","啋","婇","彩","採","棌","毝","睬","綵","跴","踩"],zhài:["债","債","寨","瘵","砦"],yē:["倻","吔","噎","擨","暍","椰","歋","潱","蠮"],shà:["倽","唼","喢","歃","箑","翜","翣","萐","閯","霎"],qīng:["倾","傾","卿","圊","寈","氢","氫","淸","清","蜻","軽","輕","轻","郬","錆","鑋","靑","青","鯖"],yīng:["偀","嘤","噟","嚶","婴","媖","嫈","嬰","孆","孾","愥","撄","攖","朠","桜","樱","櫻","渶","煐","珱","瑛","璎","瓔","甇","甖","碤","礯","緓","纓","绬","缨","罂","罃","罌","膺","英","莺","蘡","蝧","蠳","褮","譻","賏","軈","鑍","锳","霙","韺","鴬","鶑","鶧","鶯","鷪","鷹","鸎","鸚","鹦","鹰","䓨"],"chēng chèn":["偁","爯"],ruǎn:["偄","朊","瑌","瓀","碝","礝","腝","軟","輭","软","阮"],"zhòng tóng":["偅"],chǔn:["偆","惷","睶","萶","蠢","賰"],"jiǎ jià":["假"],"jì jié":["偈"],"bǐng bìng":["偋"],ruò:["偌","叒","嵶","弱","楉","焫","爇","箬","篛","蒻","鄀","鰙","鰯","鶸"],tí:["偍","厗","啼","嗁","崹","漽","瑅","睼","禵","稊","緹","缇","罤","蕛","褆","謕","趧","蹄","蹏","醍","鍗","題","题","騠","鮷","鯷","鳀","鵜","鷤","鹈","𫘨"],wēi:["偎","危","喴","威","媙","嶶","巍","微","愄","揋","揻","椳","楲","溦","烓","煨","燰","癓","縅","葨","葳","薇","蜲","蝛","覣","詴","逶","隇","隈","霺","鰃","鰄","鳂"],piān:["偏","囨","媥","楄","犏","篇","翩","鍂"],yàn:["偐","厌","厭","唁","喭","嚈","嚥","堰","妟","姲","嬊","嬿","宴","彥","彦","敥","晏","暥","曕","曣","滟","灎","灔","灧","灩","焔","焰","焱","熖","燄","牪","猒","砚","硯","艳","艶","艷","覎","觃","觾","諺","讌","讞","谚","谳","豓","豔","贋","贗","赝","軅","酀","酽","醼","釅","雁","餍","饜","騐","験","騴","驗","驠","验","鬳","鳫","鴈","鴳","鷃","鷰","齞"],"tǎng dàng":["偒"],è:["偔","匎","卾","厄","呝","咢","噩","垩","堊","堮","岋","崿","廅","悪","愕","戹","扼","搤","搹","擜","櫮","歞","歺","湂","琧","砈","砐","硆","腭","苊","萼","蕚","蚅","蝁","覨","諤","讍","谔","豟","軛","軶","轭","遌","遏","遻","鄂","鈪","鍔","鑩","锷","阨","阸","頞","顎","颚","餓","餩","饿","鰐","鰪","鱷","鳄","鶚","鹗","齃","齶","𫫇","𥔲"],xié:["偕","勰","协","協","嗋","垥","奊","恊","愶","拹","携","撷","擕","擷","攜","斜","旪","熁","燲","綊","緳","縀","缬","翓","胁","脅","脇","脋","膎","蝢","衺","襭","諧","讗","谐","鞋","鞵","龤","㙦"],chě:["偖","扯","撦"],shěng:["偗","渻","眚"],chā:["偛","嗏","扠","挿","插","揷","疀","臿","艖","銟","鍤","锸","餷"],huáng:["偟","凰","喤","堭","墴","媓","崲","徨","惶","楻","湟","煌","獚","瑝","璜","癀","皇","磺","穔","篁","簧","艎","葟","蝗","蟥","諻","趪","遑","鍠","鐄","锽","隍","韹","餭","騜","鰉","鱑","鳇","鷬","黃","黄","𨱑"],yǎo:["偠","咬","婹","宎","岆","杳","柼","榚","溔","狕","窅","窈","舀","苭","闄","騕","鷕","齩"],"chǒu qiào":["偢"],yóu:["偤","尤","庮","怣","沋","油","浟","游","犹","猶","猷","由","疣","秞","肬","莜","莸","蕕","蚰","蝣","訧","輏","輶","逰","遊","邮","郵","鈾","铀","駀","魷","鮋","鱿","鲉","𬨎"],xū:["偦","墟","媭","嬃","楈","欨","歔","燸","疞","盱","綇","縃","繻","胥","蕦","虗","虚","虛","蝑","裇","訏","許","諝","譃","谞","鑐","需","須","须","顼","驉","鬚","魆","魖","𬣙","𦈡"],zhā:["偧","哳","抯","挓","揸","摣","樝","渣","皶","觰","譇","齄","齇"],cī:["偨","疵","蠀","趀","骴","髊","齹"],bī:["偪","屄","楅","毴","豍","逼","鰏","鲾","鵖"],xún:["偱","噚","寻","尋","峋","巡","廵","循","恂","揗","攳","旬","杊","栒","桪","樳","洵","浔","潯","燅","燖","珣","璕","畃","紃","荀","蟳","詢","询","鄩","鱏","鱘","鲟","𬘓","𬩽","𬍤","𬊈"],"cāi sī":["偲"],duān:["偳","媏","端","褍","鍴"],ǒu:["偶","吘","嘔","耦","腢","蕅","藕","𬉼","𠙶"],tōu:["偷","偸","鍮"],"zán zá zǎ":["偺"],"lǚ lóu":["偻","僂"],fèn:["偾","僨","奋","奮","弅","忿","愤","憤","瀵","瞓","秎","粪","糞","膹","鱝","鲼"],"kuǐ guī":["傀"],sǒu:["傁","叜","叟","嗾","櫢","瞍","薮","藪"],"zhì sī tí":["傂"],sù:["傃","僳","嗉","塐","塑","夙","嫊","愫","憟","榡","樎","樕","殐","泝","涑","溯","溸","潚","潥","玊","珟","璛","簌","粛","粟","素","縤","肃","肅","膆","蔌","藗","觫","訴","謖","诉","谡","趚","蹜","速","遡","遬","鋉","餗","驌","骕","鱐","鷫","鹔","𫗧"],xiā:["傄","煆","瞎","虲","谺","颬","鰕"],"yuàn yuán":["傆","媛"],rǒng:["傇","冗","宂","氄","軵"],nù:["傉","怒"],yùn:["傊","孕","恽","惲","愠","慍","枟","腪","蕴","薀","藴","蘊","褞","貟","运","運","郓","鄆","酝","醖","醞","韗","韞","韵","韻","餫"],"gòu jiǎng":["傋"],mà:["傌","嘜","榪","睰","祃","禡","罵","閁","駡","骂","鬕"],bàng:["傍","塝","棒","玤","稖","艕","蒡","蜯","謗","谤","鎊","镑"],diān:["傎","厧","嵮","巅","巓","巔","掂","攧","敁","槇","滇","癫","癲","蹎","顚","顛","颠","齻"],táng:["傏","唐","啺","坣","堂","塘","搪","棠","榶","溏","漟","煻","瑭","磄","禟","篖","糃","糖","糛","膅","膛","蓎","螗","螳","赯","踼","鄌","醣","鎕","隚","餹","饄","鶶","䣘"],hào:["傐","哠","恏","昊","昦","晧","暠","暤","暭","曍","浩","淏","澔","灏","灝","皓","皜","皞","皡","皥","耗","聕","薃","號","鄗","顥","颢","鰝"],"xī xì":["傒"],shān:["傓","删","刪","剼","圸","山","挻","搧","柵","檆","潸","澘","煽","狦","珊","笘","縿","羴","羶","脠","舢","芟","衫","跚","軕","邖","閊","鯅"],"qiàn jiān":["傔"],"què jué":["傕","埆"],"cāng chen":["傖"],róng:["傛","媶","嫆","嬫","容","峵","嵘","嶸","戎","搈","曧","栄","榕","榮","榵","毧","溶","瀜","烿","熔","狨","瑢","穁","絨","绒","羢","肜","茙","茸","荣","蓉","蝾","融","螎","蠑","褣","鎔","镕","駥"],"tà tàn":["傝"],suō:["傞","唆","嗍","嗦","娑","摍","桫","梭","睃","簑","簔","羧","莏","蓑","趖","鮻"],dǎi:["傣","歹"],zài:["傤","儎","再","在","扗","洅","載","酨"],gǔ:["傦","古","啒","尳","愲","榖","榾","汩","淈","濲","瀔","牯","皷","皼","盬","瞽","穀","罟","羖","股","脵","臌","薣","蛊","蠱","詁","诂","轂","逧","鈷","钴","餶","馉","鼓","鼔","𦙶"],bīn:["傧","宾","彬","斌","椕","滨","濒","濱","濵","瀕","繽","缤","虨","豩","豳","賓","賔","邠","鑌","镔","霦","顮"],chǔ:["储","儲","杵","椘","楚","楮","檚","濋","璴","础","礎","禇","處","齭","齼","𬺓"],nuó:["傩","儺","挪","梛","橠"],"cān càn":["傪"],lěi:["傫","儡","厽","垒","塁","壘","壨","櫐","灅","癗","矋","磊","礨","耒","蕌","蕾","藟","蘽","蠝","誄","讄","诔","鑸","鸓"],cuī:["催","凗","墔","崔","嵟","慛","摧","榱","獕","磪","鏙"],yōng:["傭","嗈","墉","壅","嫞","庸","廱","慵","拥","擁","滽","灉","牅","痈","癕","癰","臃","邕","郺","鄘","鏞","镛","雍","雝","饔","鱅","鳙","鷛"],"zāo cáo":["傮"],sǒng:["傱","嵷","怂","悚","愯","慫","竦","耸","聳","駷","㧐"],ào:["傲","坳","垇","墺","奡","嫯","岙","岰","嶴","懊","擙","澳","鏊","驁","骜"],"qī còu":["傶"],chuǎng:["傸","磢","闖","闯"],shǎ:["傻","儍"],hàn:["傼","垾","悍","憾","扞","捍","撖","撼","旱","晘","暵","汉","涆","漢","瀚","焊","猂","皔","睅","翰","莟","菡","蛿","蜭","螒","譀","輚","釬","銲","鋎","雗","頷","顄","颔","駻","鶾"],zhāng:["傽","嫜","张","張","彰","慞","暲","樟","漳","獐","璋","章","粻","蔁","蟑","遧","鄣","鏱","餦","騿","鱆","麞"],"yān yàn":["傿","墕","嬮"],"piào biāo":["僄","骠"],liàn:["僆","堜","媡","恋","戀","楝","殓","殮","湅","潋","澰","瀲","炼","煉","瑓","練","纞","练","萰","錬","鍊","鏈","链","鰊","𬶠"],màn:["㵘","僈","墁","幔","慢","曼","漫","澷","熳","獌","縵","缦","蔄","蘰","鄤","鏝","镘","𬜬"],"tàn tǎn":["僋"],yíng:["僌","営","塋","嬴","攍","楹","櫿","溁","溋","滢","潆","濙","濚","濴","瀅","瀛","瀠","瀯","灐","灜","熒","營","瑩","盁","盈","禜","籝","籯","縈","茔","荧","莹","萤","营","萦","萾","蓥","藀","蛍","蝇","蝿","螢","蠅","謍","贏","赢","迎","鎣"],dòng:["働","冻","凍","动","動","姛","戙","挏","栋","棟","湩","硐","胨","胴","腖","迵","霘","駧"],zhuàn:["僎","啭","囀","堟","撰","灷","瑑","篆","腞","蒃","襈","譔","饌","馔"],xiàng:["像","勨","向","嚮","姠","嶑","曏","橡","珦","缿","蟓","衖","襐","象","鐌","項","项","鱌"],shàn:["僐","善","墠","墡","嬗","擅","敾","椫","樿","歚","汕","灗","疝","磰","繕","缮","膳","蟮","蟺","訕","謆","譱","讪","贍","赡","赸","鄯","鐥","饍","騸","骟","鱓","鱔","鳝","𫮃"],"tuí tuǐ":["僓"],zǔn:["僔","噂","撙","譐"],pú:["僕","匍","圤","墣","濮","獛","璞","瞨","穙","莆","菐","菩","葡","蒱","蒲","贌","酺","鏷","镤"],láo:["僗","劳","労","勞","哰","崂","嶗","憥","朥","浶","牢","痨","癆","窂","簩","醪","鐒","铹","顟","髝","𫭼"],chǎng:["僘","厰","廠","敞","昶","氅","鋹","𬬮"],guāng:["僙","光","咣","垙","姯","洸","灮","炗","炚","炛","烡","珖","胱","茪","輄","銧","黆","𨐈"],liáo:["僚","嘹","嫽","寥","寮","尞","屪","嵺","嶚","嶛","廫","憀","敹","暸","橑","獠","璙","疗","療","竂","簝","繚","缭","聊","膋","膫","藔","蟟","豂","賿","蹘","辽","遼","飉","髎","鷯","鹩"],dèng:["僜","凳","墱","嶝","櫈","瞪","磴","覴","邓","鄧","隥"],"chán zhàn zhuàn":["僝"],bō:["僠","嶓","拨","撥","播","波","溊","玻","癶","盋","砵","碆","礡","缽","菠","袰","蹳","鉢","钵","餑","饽","驋","鱍","𬭛"],huì:["僡","匯","卉","喙","嘒","嚖","圚","嬒","寭","屶","屷","彗","彙","彚","徻","恚","恵","惠","慧","憓","懳","晦","暳","槥","橞","檅","櫘","汇","泋","滙","潓","烩","燴","獩","璤","瞺","硊","秽","穢","篲","絵","繪","绘","翙","翽","荟","蔧","蕙","薈","薉","蟪","詯","誨","諱","譓","譿","讳","诲","賄","贿","鐬","闠","阓","靧","頮","顪","颒","餯","𬤝","𬭬"],chuǎn:["僢","喘","舛","荈","踳"],"tiě jiàn":["僣"],sēng:["僧","鬙"],xiàn:["僩","僴","哯","垷","塪","姭","娊","宪","岘","峴","憲","撊","晛","橌","橺","涀","瀗","献","獻","现","現","県","睍","粯","糮","絤","綫","線","线","缐","羡","羨","腺","臔","臽","苋","莧","誢","豏","鋧","錎","限","陥","陷","霰","餡","馅","麲","鼸","𬀪","𪾢"],"yù jú":["僪"],"è wū":["僫"],"tóng zhuàng":["僮"],lǐn:["僯","凛","凜","廩","廪","懍","懔","撛","檁","檩","澟","癛","癝"],gù:["僱","凅","固","堌","崓","崮","故","梏","棝","牿","痼","祻","錮","锢","雇","顧","顾","鯝","鲴"],jiāng:["僵","壃","姜","橿","殭","江","畕","疅","礓","繮","缰","翞","茳","葁","薑","螀","螿","豇","韁","鱂","鳉"],mǐn:["僶","冺","刡","勄","悯","惽","愍","慜","憫","抿","敃","敏","敯","泯","潣","皿","笢","笽","簢","蠠","閔","閩","闵","闽","鰵","鳘","黽"],jìn:["僸","凚","噤","嚍","墐","壗","妗","嬧","搢","晉","晋","枃","殣","浕","浸","溍","濅","濜","烬","煡","燼","琎","瑨","璶","盡","祲","縉","缙","荩","藎","覲","觐","賮","贐","赆","近","进","進","靳","齽"],"jià jie":["價"],qiào:["僺","峭","帩","撬","殻","窍","竅","誚","诮","躈","陗","鞩","韒","髚"],pì:["僻","媲","嫓","屁","澼","甓","疈","譬","闢","鷿","鸊","䴙"],sài:["僿","簺","賽","赛"],"chán tǎn shàn":["儃"],"dāng dàng":["儅","当","闣"],xuān:["儇","喧","塇","媗","宣","愃","愋","揎","昍","暄","煊","煖","瑄","睻","矎","禤","箮","翧","翾","萱","萲","蓒","蕿","藼","蘐","蝖","蠉","諠","諼","譞","谖","軒","轩","鍹","駽","鰚","𫓶","𫍽"],"dān dàn":["儋","擔","瘅"],càn:["儏","澯","灿","燦","璨","粲","薒","謲"],"bīn bìn":["儐"],"án àn":["儑"],tái:["儓","坮","嬯","抬","擡","檯","炱","炲","籉","臺","薹","跆","邰","颱","鮐","鲐"],lán:["儖","兰","囒","婪","岚","嵐","幱","拦","攔","斓","斕","栏","欄","欗","澜","瀾","灆","灡","燣","燷","璼","篮","籃","籣","繿","葻","蓝","藍","蘫","蘭","褴","襕","襤","襴","襽","譋","讕","谰","躝","鑭","镧","闌","阑","韊","𬒗"],"nǐ yì ài yí":["儗"],méng:["儚","幪","曚","朦","橗","檬","氋","溕","濛","甍","甿","盟","礞","艨","莔","萌","蕄","虻","蝱","鄳","鄸","霿","靀","顭","饛","鯍","鸏","鹲","𫑡","㠓"],níng:["儜","凝","咛","嚀","嬣","柠","橣","檸","狞","獰","聍","聹","薴","鑏","鬡","鸋"],qióng:["儝","卭","宆","惸","憌","桏","橩","焪","焭","煢","熍","琼","瓊","睘","穷","穹","窮","竆","笻","筇","舼","茕","藑","藭","蛩","蛬","赹","跫","邛","銎","䓖"],liè:["儠","冽","列","劣","劽","埒","埓","姴","峛","巤","挒","捩","栵","洌","浖","烈","烮","煭","犣","猎","猟","獵","聗","脟","茢","蛚","趔","躐","迾","颲","鬛","鬣","鮤","鱲","鴷","䴕","𫚭"],kuǎng:["儣","夼","懭"],bào:["儤","勽","報","忁","报","抱","曓","爆","犦","菢","虣","蚫","豹","鉋","鑤","铇","骲","髱","鮑","鲍"],biāo:["儦","墂","幖","彪","标","標","滮","瀌","熛","爂","猋","瘭","磦","膘","臕","謤","贆","鏢","鑣","镖","镳","颮","颷","飆","飇","飈","飊","飑","飙","飚","驫","骉","髟"],zǎn:["儧","儹","噆","攅","昝","趱","趲"],háo:["儫","嗥","嘷","噑","嚎","壕","椃","毜","毫","濠","獆","獔","竓","籇","蚝","蠔","譹","豪"],qìng:["儬","凊","庆","慶","櫦","濪","碃","磬","罄","靘"],chèn:["儭","嚫","榇","櫬","疢","衬","襯","讖","谶","趁","趂","齓","齔","龀"],téng:["儯","幐","滕","漛","疼","籐","籘","縢","腾","藤","虅","螣","誊","謄","邆","駦","騰","驣","鰧","䲢"],"lǒng lóng lòng":["儱"],"chán chàn":["儳"],"ráng xiāng":["儴","勷"],"huì xié":["儶"],luó:["儸","攞","椤","欏","猡","玀","箩","籮","罗","羅","脶","腡","萝","蘿","螺","覼","逻","邏","鏍","鑼","锣","镙","饠","騾","驘","骡","鸁"],léi:["儽","嫘","檑","欙","瓃","畾","縲","纍","纝","缧","罍","羸","蔂","蘲","虆","轠","鐳","鑘","镭","雷","靁","鱩","鼺"],"nàng nāng":["儾"],"wù wū":["兀"],yǔn:["允","喗","夽","抎","殒","殞","狁","磒","荺","賱","鈗","阭","陨","隕","霣","馻","齫","齳"],zān:["兂","橵","簪","簮","糌","鐕","鐟","鵤"],yuán:["元","円","原","厡","厵","园","圆","圎","園","圓","垣","塬","媴","嫄","援","榞","榬","橼","櫞","沅","湲","源","溒","爰","猨","猿","笎","緣","縁","缘","羱","茒","薗","蝝","蝯","螈","袁","褤","謜","轅","辕","邍","邧","酛","鈨","鎱","騵","魭","鶢","鶰","黿","鼋","𫘪"],xiōng:["兄","兇","凶","匂","匈","哅","忷","恟","汹","洶","胷","胸","芎","訩","詾","讻"],chōng:["充","嘃","忡","憃","憧","摏","沖","浺","珫","罿","翀","舂","艟","茺","衝","蹖","㳘"],zhào:["兆","垗","旐","曌","枛","櫂","照","燳","狣","瞾","笊","罀","罩","羄","肁","肇","肈","詔","诏","赵","趙","鮡","𬶐"],"duì ruì yuè":["兊","兌","兑"],kè:["克","刻","勀","勊","堁","娔","客","恪","愙","氪","溘","碦","緙","缂","艐","衉","課","课","錁","锞","騍","骒"],tù:["兎","兔","堍","迌","鵵"],dǎng:["党","攩","欓","譡","讜","谠","黨","𣗋"],dōu:["兜","兠","唗","橷","篼","蔸"],huǎng:["兤","奛","幌","怳","恍","晄","炾","熀","縨","詤","謊","谎"],rù:["入","嗕","媷","扖","杁","洳","溽","縟","缛","蓐","褥","鳰"],nèi:["內","氝","氞","錗"],"yú shù":["兪"],"liù lù":["六"],han:["兯","爳"],tiān:["兲","天","婖","添","酟","靔","靝","黇"],"xīng xìng":["兴"],diǎn:["典","嚸","奌","婰","敟","椣","点","碘","蒧","蕇","踮","點"],"zī cí":["兹"],jiān:["兼","冿","囏","坚","堅","奸","姦","姧","尖","幵","惤","戋","戔","搛","椾","樫","櫼","歼","殱","殲","湔","瀐","瀸","煎","熞","熸","牋","瑊","睷","礛","礷","笺","箋","緘","縑","缄","缣","肩","艰","艱","菅","菺","葌","蒹","蔪","蕑","蕳","虃","譼","豜","鑯","雃","鞯","韀","韉","餰","馢","鰔","鰜","鰹","鲣","鳒","鵑","鵳","鶼","鹣","麉"],shòu:["兽","受","售","壽","夀","寿","授","狩","獣","獸","痩","瘦","綬","绶","膄"],jì:["兾","冀","剂","剤","劑","勣","坖","垍","塈","妓","季","寂","寄","廭","彑","徛","忌","悸","惎","懻","技","旡","既","旣","暨","暩","曁","梞","檕","檵","洎","漃","漈","瀱","痵","癠","禝","稩","稷","穄","穊","穧","紀","継","績","繋","繼","继","绩","罽","臮","芰","茍","茤","葪","蓟","蔇","薊","蘎","蘮","蘻","裚","襀","覬","觊","計","記","誋","计","记","跡","跽","蹟","迹","际","際","霁","霽","驥","骥","髻","鬾","魝","魥","鯚","鯽","鰶","鰿","鱀","鱭","鲚","鲫","鵋","鷑","齌","𪟝","𬶨","𬶭"],jiōng:["冂","冋","坰","埛","扃","蘏","蘔","駉","駫","𬳶"],mào:["冃","冐","媢","帽","愗","懋","暓","柕","楙","毷","瑁","皃","眊","瞀","耄","茂","萺","蝐","袤","覒","貌","貿","贸","鄚","鄮"],rǎn:["冄","冉","姌","媣","染","珃","苒","蒅","䎃"],"nèi nà":["内"],gāng:["冈","冮","刚","剛","堈","堽","岡","掆","摃","棡","牨","犅","疘","綱","纲","缸","罁","罡","肛","釭","鎠","㭎"],cè:["冊","册","厕","厠","夨","廁","恻","惻","憡","敇","测","測","笧","策","筞","筴","箣","荝","萗","萴","蓛"],guǎ:["冎","剐","剮","叧","寡"],"mào mò":["冒"],gòu:["冓","啂","坸","垢","够","夠","媾","彀","搆","撀","构","構","煹","覯","觏","訽","詬","诟","購","购","遘","雊"],xǔ:["冔","喣","暊","栩","珝","盨","糈","詡","諿","诩","鄦","醑"],mì:["冖","冪","嘧","塓","宻","密","峚","幂","幎","幦","怽","榓","樒","櫁","汨","淧","滵","漞","濗","熐","羃","蔤","蜜","覓","覔","覛","觅","謐","谧","鼏"],"yóu yín":["冘"],xiě:["写","冩","藛"],jūn:["军","君","均","桾","汮","皲","皸","皹","碅","莙","蚐","袀","覠","軍","鈞","銁","銞","鍕","钧","頵","鮶","鲪","麏"],mí:["冞","擟","瀰","爢","猕","獼","祢","禰","縻","蒾","藌","蘪","蘼","袮","詸","謎","迷","醚","醾","醿","釄","镾","鸍","麊","麋","麛"],"guān guàn":["冠","覌","観","觀","观"],měng:["冡","勐","懵","掹","猛","獴","艋","蜢","蠓","錳","锰","鯭","鼆"],zhǒng:["冢","塚","尰","歱","煄","瘇","肿","腫","踵"],zuì:["冣","嶵","晬","最","栬","槜","檇","檌","祽","絊","罪","蕞","辠","酔","酻","醉","錊"],yuān:["冤","剈","囦","嬽","寃","棩","淵","渁","渆","渊","渕","灁","眢","肙","葾","蒬","蜎","蜵","駌","鳶","鴛","鵷","鸢","鸳","鹓","鼘","鼝"],míng:["冥","名","明","暝","朙","榠","洺","溟","猽","眀","眳","瞑","茗","螟","覭","詺","鄍","銘","铭","鳴","鸣"],kòu:["冦","叩","宼","寇","扣","敂","滱","窛","筘","簆","蔲","蔻","釦","鷇"],tài:["冭","太","夳","忲","态","態","汰","汱","泰","溙","肽","舦","酞","鈦","钛"],"féng píng":["冯","馮"],"chōng chòng":["冲"],kuàng:["况","圹","壙","岲","懬","旷","昿","曠","框","況","爌","眖","眶","矿","砿","礦","穬","絋","絖","纊","纩","貺","贶","軦","邝","鄺","鉱","鋛","鑛","黋"],lěng:["冷"],pàn:["冸","判","叛","沜","泮","溿","炍","牉","畔","盼","聁","袢","襻","詊","鋬","鑻","頖","鵥"],fā:["冹","彂","沷","発","發"],xiǎn:["冼","尟","尠","崄","嶮","幰","攇","显","櫶","毨","灦","烍","燹","狝","猃","獫","獮","玁","禒","筅","箲","藓","蘚","蚬","蜆","譣","赻","跣","鍌","险","険","險","韅","顕","顯","㬎"],qià:["冾","圶","帢","恰","殎","洽","硈","胢","髂"],"jìng chēng":["净","凈","淨"],sōu:["凁","嗖","廀","廋","捜","搜","摉","溲","獀","艘","蒐","螋","鄋","醙","鎪","锼","颼","飕","餿","馊","騪"],měi:["凂","媄","媺","嬍","嵄","挴","毎","每","浼","渼","燘","美","躾","鎂","镁","黣"],tú:["凃","図","图","圖","圗","塗","屠","峹","嵞","庩","廜","徒","悇","揬","涂","瘏","筡","腯","荼","蒤","跿","途","酴","鈯","鍎","馟","駼","鵌","鶟","鷋","鷵","𬳿"],zhǔn:["准","凖","埻","準","𬘯"],"liáng liàng":["凉","涼","量"],diāo:["凋","刁","刟","叼","奝","弴","彫","汈","琱","碉","簓","虭","蛁","貂","錭","雕","鮉","鯛","鲷","鵰","鼦"],còu:["凑","湊","腠","輳","辏"],ái:["凒","啀","嘊","捱","溰","癌","皑","皚"],duó:["凙","剫","夺","奪","痥","踱","鈬","鐸","铎"],dú:["凟","匵","嬻","椟","櫝","殰","涜","牍","牘","犊","犢","独","獨","瓄","皾","裻","読","讀","讟","豄","贕","錖","鑟","韇","韣","韥","騳","髑","黩","黷"],"jǐ jī":["几"],fán:["凡","凢","凣","匥","墦","杋","柉","棥","樊","瀿","烦","煩","燔","璠","矾","礬","笲","籵","緐","羳","舤","舧","薠","蘩","蠜","襎","蹯","釩","鐇","鐢","钒","鷭","𫔍","𬸪"],jū:["凥","匊","娵","婮","居","崌","抅","挶","掬","梮","椐","檋","毩","毱","泃","涺","狙","琚","疽","砠","罝","腒","艍","蜛","裾","諊","跔","踘","躹","陱","雎","鞠","鞫","駒","驹","鮈","鴡","鶋","𬶋"],"chù chǔ":["処","处"],zhǐ:["凪","劧","咫","址","坧","帋","恉","扺","指","旨","枳","止","汦","沚","洔","淽","疻","砋","祉","秖","紙","纸","芷","藢","衹","襧","訨","趾","軹","轵","酯","阯","黹"],píng:["凭","凴","呯","坪","塀","岼","帡","帲","幈","平","慿","憑","枰","洴","焩","玶","瓶","甁","竮","箳","簈","缾","荓","萍","蓱","蚲","蛢","評","评","軿","輧","郱","鮃","鲆"],kǎi:["凯","凱","剀","剴","垲","塏","恺","愷","慨","暟","蒈","輆","鍇","鎧","铠","锴","闓","闿","颽"],gān:["凲","坩","尲","尴","尶","尷","柑","泔","漧","玕","甘","疳","矸","竿","筸","粓","肝","苷","迀","酐","魐"],"kǎn qiǎn":["凵"],tū:["凸","堗","嶀","捸","涋","湥","痜","禿","秃","突","葖","鋵","鵚","鼵","㻬"],"āo wā":["凹"],chū:["出","初","岀","摴","榋","樗","貙","齣","䢺","䝙"],dàng:["凼","圵","垱","壋","档","檔","氹","璗","瓽","盪","瞊","砀","碭","礑","簜","荡","菪","蕩","蘯","趤","逿","雼","𬍡"],hán:["函","凾","含","圅","娢","寒","崡","晗","梒","浛","涵","澏","焓","琀","甝","筨","蜬","邗","邯","鋡","韓","韩"],záo:["凿","鑿"],dāo:["刀","刂","忉","氘","舠","螩","釖","魛","鱽"],chuāng:["刅","摐","牎","牕","疮","瘡","窓","窗","窻"],"fēn fèn":["分"],"qiè qiē":["切"],kān:["刊","勘","堪","戡","栞","龕","龛"],cǔn:["刌","忖"],chú:["刍","厨","幮","廚","橱","櫉","櫥","滁","犓","篨","耡","芻","蒢","蒭","蜍","蟵","豠","趎","蹰","躇","躕","鉏","鋤","锄","除","雏","雛","鶵"],"huà huá":["划"],lí:["刕","剓","剺","劙","厘","喱","嚟","囄","嫠","孷","廲","悡","梨","梸","棃","漓","灕","犁","犂","狸","琍","璃","瓈","盠","睝","离","穲","竰","筣","篱","籬","糎","縭","缡","罹","艃","荲","菞","蓠","蔾","藜","蘺","蜊","蟍","蟸","蠫","褵","謧","貍","醨","鋫","錅","鏫","鑗","離","驪","骊","鯏","鯬","鱺","鲡","鵹","鸝","鹂","黎","黧","㰀"],yuè:["刖","嬳","岄","岳","嶽","恱","悅","悦","戉","抈","捳","月","樾","瀹","爚","玥","礿","禴","篗","籆","籥","籰","粤","粵","蘥","蚎","蚏","説","越","跀","跃","躍","軏","鈅","鉞","鑰","钺","閱","閲","阅","鸑","鸙","黦","龠","𫐄","𬸚"],liú:["刘","劉","嚠","媹","嵧","旈","旒","榴","橊","流","浏","瀏","琉","瑠","瑬","璢","畄","留","畱","疁","瘤","癅","硫","蒥","蓅","蟉","裗","鎏","鏐","鐂","镠","飀","飅","飗","駠","駵","騮","驑","骝","鰡","鶹","鹠","麍"],zé:["则","則","啧","嘖","嫧","帻","幘","択","樍","歵","沢","泎","溭","皟","瞔","矠","礋","箦","簀","舴","蔶","蠌","襗","謮","賾","赜","迮","鸅","齚","齰"],"chuàng chuāng":["创","創"],qù:["刞","厺","去","閴","闃","阒","麮","鼁"],"bié biè":["別","别"],"páo bào":["刨"],"chǎn chàn":["刬","剗","幝"],guā:["刮","劀","桰","歄","煱","瓜","胍","踻","颪","颳","騧","鴰","鸹"],gēng:["刯","庚","椩","浭","焿","畊","絚","羮","羹","耕","菮","賡","赓","鶊","鹒"],dào:["到","噵","悼","椡","檤","燾","瓙","盗","盜","稲","稻","纛","翿","艔","菿","衜","衟","軇","道"],chuàng:["刱","剏","剙","怆","愴"],kū:["刳","哭","圐","堀","枯","桍","矻","窟","跍","郀","骷","鮬"],duò:["刴","剁","墯","尮","惰","憜","挅","桗","舵","跥","跺","陊","陏","飿","饳","鵽"],"shuā shuà":["刷"],"quàn xuàn":["券"],"chà shā":["刹","剎"],"cì cī":["刺"],guì:["刽","刿","劊","劌","撌","攰","昋","桂","椢","槶","樻","櫃","猤","禬","筀","蓕","襘","貴","贵","跪","鐀","鑎","鞼","鱖","鱥"],lóu:["剅","娄","婁","廔","楼","樓","溇","漊","熡","耧","耬","艛","蒌","蔞","蝼","螻","謱","軁","遱","鞻","髅","髏","𪣻"],cuò:["剉","剒","厝","夎","挫","措","棤","莝","莡","蓌","逪","銼","錯","锉","错"],"xiāo xuē":["削"],"kēi kè":["剋","尅"],"là lá":["剌"],tī:["剔","梯","踢","銻","锑","鷈","鷉","䏲","䴘"],pōu:["剖"],wān:["剜","塆","壪","帵","弯","彎","湾","潫","灣","睕","蜿","豌"],"bāo bō":["剝","剥"],duō:["剟","咄","哆","嚉","多","夛","掇","毲","畓","裰","㙍"],qíng:["剠","勍","夝","情","擎","晴","暒","棾","樈","檠","氰","甠","硘","葝","黥"],"yǎn shàn":["剡"],"dū zhuó":["剢"],yān:["剦","嫣","崦","嶖","恹","懕","懨","樮","淊","淹","漹","烟","焉","焑","煙","珚","篶","胭","臙","菸","鄢","醃","閹","阉","黫"],huō:["剨","劐","吙","攉","秴","耠","锪","騞","𬴃"],shèng:["剩","剰","勝","圣","墭","嵊","晠","榺","橳","琞","聖","蕂","貹","賸"],"duān zhì":["剬"],wū:["剭","呜","嗚","圬","屋","巫","弙","杇","歍","汙","汚","污","洿","烏","窏","箼","螐","誈","誣","诬","邬","鄔","鎢","钨","鰞","鴮"],gē:["割","哥","圪","彁","戈","戓","戨","歌","滒","犵","肐","袼","謌","鎶","鴚","鴿","鸽"],"dá zhá":["剳"],chuán:["剶","暷","椽","篅","舡","舩","船","輲","遄"],"tuán zhuān":["剸","漙","篿"],"lù jiū":["剹"],pēng:["剻","匉","嘭","怦","恲","抨","梈","烹","砰","軯","駍"],piāo:["剽","勡","慓","旚","犥","翲","螵","飃","飄","飘","魒"],kōu:["剾","彄","抠","摳","眍","瞘","芤","𫸩"],"jiǎo chāo":["剿","劋","勦","摷"],qiāo:["劁","勪","墝","幧","敲","橇","毃","燆","硗","磽","繑","趬","跷","踍","蹺","蹻","郻","鄡","鄥","鍫","鍬","鐰","锹","頝"],"huá huà":["劃"],"zhā zhá":["劄"],"pī pǐ":["劈","悂"],tāng:["劏","嘡","羰","薚","蝪","蹚","鞺","鼞"],chán:["劖","嚵","壥","婵","嬋","巉","廛","棎","毚","湹","潹","潺","澶","瀍","瀺","煘","獑","磛","緾","纏","纒","缠","艬","蝉","蟐","蟬","蟾","誗","讒","谗","躔","鄽","酁","鋋","鑱","镵","饞","馋"],zuān:["劗","躜","躦","鉆","鑚"],mó:["劘","嫫","嬤","嬷","尛","摹","擵","橅","糢","膜","藦","蘑","謨","謩","谟","饃","饝","馍","髍","魔","魹"],zhú:["劚","斸","曯","欘","灟","炢","烛","燭","爥","瘃","竹","笁","笜","舳","茿","蓫","蠋","蠾","躅","逐","逫","钃","鱁"],quàn:["劝","勧","勸","牶","韏"],"jìn jìng":["劤","劲","勁"],kēng:["劥","坑","牼","硁","硜","誙","銵","鍞","鏗","铿","阬"],"xié liè":["劦"],"zhù chú":["助"],nǔ:["努","弩","砮","胬"],shào:["劭","卲","哨","潲","紹","綤","绍","袑","邵"],miǎo:["劰","杪","淼","渺","眇","秒","篎","緲","缈","藐","邈"],kǒu:["劶","口"],wā:["劸","娲","媧","屲","挖","攨","洼","溛","漥","瓾","畖","穵","窊","窪","蛙","韈","鼃"],kuāng:["劻","匡","匩","哐","恇","洭","筐","筺","誆","诓","軭","邼"],hé:["劾","咊","啝","姀","峆","敆","曷","柇","楁","毼","河","涸","渮","澕","熆","皬","盇","盉","盍","盒","禾","篕","籺","粭","翮","菏","萂","覈","訸","詥","郃","釛","鉌","鑉","閡","闔","阂","阖","鞨","頜","餄","饸","魺","鹖","麧","齕","龁","龢","𬌗"],gào:["勂","吿","告","峼","祮","祰","禞","筶","誥","诰","郜","鋯","锆"],"bó bèi":["勃"],láng:["勆","嫏","廊","斏","桹","榔","樃","欴","狼","琅","瑯","硠","稂","艆","蓈","蜋","螂","躴","郒","郞","鋃","鎯","锒"],xūn:["勋","勛","勲","勳","嚑","坃","埙","塤","壎","壦","曛","燻","獯","矄","纁","臐","薫","薰","蘍","醺","𫄸"],"juàn juān":["勌","瓹"],"lè lēi":["勒"],kài:["勓","炌","烗","鎎"],"wěng yǎng":["勜"],qín:["勤","嗪","噙","嶜","庈","懃","懄","捦","擒","斳","檎","澿","珡","琴","琹","瘽","禽","秦","耹","芩","芹","菦","螓","蠄","鈙","鈫","雂","靲","鳹","鵭"],jiàng:["勥","匞","匠","嵹","弜","弶","摾","櫤","洚","滰","犟","糡","糨","絳","绛","謽","酱","醤","醬"],fān:["勫","嬏","帆","幡","忛","憣","旙","旛","繙","翻","藩","轓","颿","飜","鱕"],juān:["勬","姢","娟","捐","涓","蠲","裐","鎸","鐫","镌","鹃"],"tóng dòng":["勭","烔","燑","狪"],lǜ:["勴","垏","嵂","律","慮","氯","滤","濾","爈","箻","綠","繂","膟","葎","虑","鑢"],chè:["勶","坼","彻","徹","掣","撤","澈","烢","爡","瞮","硩","聅","迠","頙","㬚"],sháo:["勺","玿","韶"],"gōu gòu":["勾"],cōng:["匆","囪","囱","忩","怱","悤","暰","樬","漗","瑽","璁","瞛","篵","繱","聡","聦","聪","聰","苁","茐","葱","蓯","蔥","蟌","鍯","鏓","鏦","騘","驄","骢"],"táo yáo":["匋","陶"],páo:["匏","咆","垉","庖","爮","狍","袍","褜","軳","鞄","麅"],dá:["匒","妲","怛","炟","燵","畣","笪","羍","荙","薘","蟽","詚","达","迏","迖","迚","逹","達","鐽","靼","鞑","韃","龖","龘","𫟼"],"huà huā":["化"],"běi bèi":["北"],nǎo:["匘","垴","堖","嫐","恼","悩","惱","瑙","碯","脑","脳","腦"],"chí shi":["匙"],fāng:["匚","堏","方","淓","牥","芳","邡","鈁","錺","钫","鴋"],zā:["匝","咂","帀","沞","臜","臢","迊","鉔","魳"],qiè:["匧","厒","妾","怯","悏","惬","愜","挈","穕","窃","竊","笡","箧","篋","籡","踥","鍥","锲","鯜"],"zāng cáng":["匨"],fěi:["匪","奜","悱","棐","榧","篚","翡","蕜","誹","诽"],"kuì guì":["匮","匱"],suǎn:["匴"],pǐ:["匹","噽","嚭","圮","庀","痞","癖","脴","苉","銢","鴄"],"qū ōu":["区","區"],"kē qià":["匼"],"yǎn yàn":["匽","棪"],biǎn:["匾","惼","揙","碥","稨","窆","藊","褊","貶","贬","鴘"],nì:["匿","堄","嫟","嬺","惄","愵","昵","暱","氼","眤","睨","縌","胒","腻","膩","逆","𨺙"],niàn:["卄","唸","埝","廿","念","惗","艌"],sà:["卅","櫒","脎","萨","蕯","薩","鈒","隡","颯","飒","馺"],zú:["卆","哫","崪","族","箤","足","踤","镞"],shēng:["升","呏","声","斘","昇","曻","枡","殅","泩","湦","焺","牲","珄","生","甥","竔","笙","聲","鉎","鍟","阩","陞","陹","鵿","鼪"],wàn:["卍","卐","忨","杤","瞣","脕","腕","萬","蟃","贎","輐","錽","𬇕"],"huá huà huā":["华","華"],bēi:["卑","悲","揹","杯","桮","盃","碑","藣","鵯","鹎"],"zú cù":["卒"],"dān shàn chán":["单","單"],"nán nā":["南"],"shuài lǜ":["卛"],"bǔ bo pú":["卜"],"kuàng guàn":["卝"],biàn:["卞","变","変","峅","弁","徧","忭","抃","昪","汳","汴","玣","艑","苄","覍","諚","變","辡","辧","辨","辩","辫","辮","辯","遍","釆","𨚕"],bǔ:["卟","哺","捕","补","補","鸔","𬷕"],"zhàn zhān":["占","覱"],"kǎ qiǎ":["卡"],lú:["卢","嚧","垆","壚","庐","廬","曥","枦","栌","櫨","泸","瀘","炉","爐","獹","玈","瓐","盧","矑","籚","纑","罏","胪","臚","舮","舻","艫","芦","蘆","蠦","轤","轳","鈩","鑪","顱","颅","馿","髗","魲","鱸","鲈","鸕","鸬","黸","𬬻"],lǔ:["卤","塷","掳","擄","樐","橹","櫓","氌","滷","澛","瀂","硵","磠","穞","艣","艪","蓾","虏","虜","鏀","鐪","鑥","镥","魯","鲁","鹵"],guà:["卦","啩","挂","掛","罣","褂","詿","诖"],"áng yǎng":["卬"],yìn:["印","垽","堷","廕","慭","憖","憗","懚","洕","湚","猌","癊","胤","茚","酳","鮣","䲟"],què:["却","卻","塙","崅","悫","愨","慤","搉","榷","燩","琷","皵","确","確","礭","闋","阕","鵲","鹊","𬒈"],luǎn:["卵"],"juàn juǎn":["卷","巻"],"chǎng ān hàn":["厂"],"wěi yán":["厃"],tīng:["厅","厛","听","庁","廰","廳","汀","烃","烴","綎","耓","聴","聼","聽","鞓","𬘩"],"zhé zhái":["厇"],"hàn àn":["厈","屽"],yǎ:["厊","唖","庌","痖","瘂","蕥"],shè:["厍","厙","弽","慑","慴","懾","摂","欇","涉","涻","渉","滠","灄","社","舎","蔎","蠂","設","设","赦","騇","麝"],dǐ:["厎","呧","坘","弤","抵","拞","掋","牴","砥","菧","觝","詆","诋","軧","邸","阺","骶","鯳"],"zhǎ zhǎi":["厏"],páng:["厐","嫎","庞","徬","舽","螃","逄","鰟","鳑","龎","龐"],"zhì shī":["厔"],máng:["厖","吂","哤","娏","忙","恾","杗","杧","汒","浝","牻","痝","盲","硭","笀","芒","茫","蘉","邙","釯","鋩","铓","駹"],zuī:["厜","樶","纗","蟕"],"shà xià":["厦","廈"],áo:["厫","嗷","嗸","廒","敖","滶","獒","獓","璈","翱","翶","翺","聱","蔜","螯","謷","謸","遨","鏖","隞","鰲","鳌","鷔","鼇"],"lán qiān":["厱"],"sī mǒu":["厶"],"gōng hóng":["厷"],"lín miǎo":["厸"],"qiú róu":["厹"],dū:["厾","嘟","督","醏"],"xiàn xuán":["县","縣"],"cān shēn cēn sān":["参","參","叄","叅"],"ài yǐ":["叆"],"chā chà chǎ chá":["叉"],shuāng:["双","孀","孇","欆","礵","艭","雙","霜","騻","驦","骦","鷞","鸘","鹴"],shōu:["収","收"],guái:["叏"],bá:["叐","妭","抜","拔","炦","癹","胈","茇","菝","詙","跋","軷","魃","鼥"],"fā fà":["发"],"zhuó yǐ lì jué":["叕"],qǔ:["取","娶","竬","蝺","詓","齲","龋"],"jiǎ xiá":["叚","徦"],"wèi yù":["叞","尉","蔚"],dié:["叠","垤","堞","峌","幉","恎","惵","戜","曡","殜","氎","牃","牒","瓞","畳","疂","疉","疊","碟","絰","绖","耊","耋","胅","艓","苵","蜨","蝶","褋","詄","諜","谍","跮","蹀","迭","镻","鰈","鲽","鴩","𫶇"],ruì:["叡","枘","汭","瑞","睿","芮","蚋","蜹","銳","鋭","锐"],"jù gōu":["句"],lìng:["另","呤","炩","蘦"],"dāo dáo tāo":["叨"],"zhī zhǐ":["只"],jiào:["叫","呌","嘂","嘦","噍","嬓","斍","斠","滘","漖","獥","珓","皭","窖","藠","訆","譥","趭","較","轎","轿","较","酵","醮","釂"],"zhào shào":["召"],"kě kè":["可"],"tái tāi":["台","苔"],pǒ:["叵","尀","笸","箥","鉕","钷","駊"],"yè xié":["叶"],"hào háo":["号"],tàn:["叹","嘆","探","歎","湠","炭","碳","舕"],"hōng hóng":["叿"],miē:["吀","咩","哶","孭"],"xū yū yù":["吁"],chī:["吃","哧","喫","嗤","噄","妛","媸","彨","彲","摛","攡","殦","瓻","痴","癡","眵","瞝","笞","粚","胵","蚩","螭","訵","魑","鴟","鵄","鸱","黐","齝","𫄨"],"xuān sòng":["吅"],yāo:["吆","喓","夭","妖","幺","楆","殀","祅","腰","葽","訞","邀","鴁","鴢","㙘"],zǐ:["吇","姉","姊","子","杍","梓","榟","橴","滓","矷","秭","笫","籽","紫","耔","虸","訿","釨"],"hé gě":["合","鲄"],"cùn dòu":["吋"],"tóng tòng":["同"],"tǔ tù":["吐","唋"],"zhà zhā":["吒","奓"],"xià hè":["吓"],"ā yā":["吖"],"ma má mǎ":["吗"],lìn:["吝","恡","悋","橉","焛","甐","膦","蔺","藺","賃","赁","蹸","躏","躙","躪","轥","閵"],tūn:["吞","暾","朜","焞"],"bǐ pǐ":["吡"],qìn:["吢","吣","唚","抋","揿","搇","撳","沁","瀙","菣","藽"],"jiè gè":["吤"],"fǒu pǐ":["否"],"ba bā":["吧"],dūn:["吨","噸","墩","墪","惇","撉","撴","犜","獤","礅","蜳","蹾","驐"],fēn:["吩","帉","昐","朆","梤","棻","氛","竕","紛","纷","翂","芬","衯","訜","躮","酚","鈖","雰","餴","饙","馚"],"é huā":["吪"],"kēng háng":["吭","妔"],shǔn:["吮"],"zhī zī":["吱"],"yǐn shěn":["吲"],wú:["吳","吴","呉","墲","峿","梧","橆","毋","洖","浯","無","珸","璑","祦","芜","茣","莁","蕪","蜈","蟱","譕","郚","鋙","铻","鯃","鵐","鷡","鹀","鼯"],"chǎo chāo":["吵"],"nà nè":["吶"],"xuè chuò jué":["吷"],chuī:["吹","炊","龡"],"dōu rú":["吺"],hǒu:["吼","犼"],"hōng hǒu ōu":["吽"],"wú yù":["吾"],"ya yā":["呀"],"è e":["呃"],dāi:["呆","懛","獃"],"mèn qǐ":["呇"],hōng:["呍","嚝","揈","灴","烘","焢","硡","薨","訇","谾","軣","輷","轟","轰","鍧"],nà:["呐","捺","笝","納","纳","肭","蒳","衲","豽","貀","軜","郍","鈉","钠","靹","魶"],"tūn tiān":["呑"],"fǔ ḿ":["呒","嘸"],"dāi tǎi":["呔"],"ǒu ōu òu":["呕"],"bài bei":["呗"],"yuán yún yùn":["员","員"],guō:["呙","啯","嘓","埚","堝","墎","崞","彉","彍","懖","猓","瘑","聒","蝈","蟈","郭","鈛","鍋","锅"],"huá qì":["呚"],"qiàng qiāng":["呛","跄"],shī:["呞","失","尸","屍","师","師","施","浉","湤","湿","溮","溼","濕","狮","獅","瑡","絁","葹","蒒","蓍","虱","蝨","褷","襹","詩","诗","邿","釃","鉇","鍦","鯴","鰤","鲺","鳲","鳾","鶳","鸤","䴓","𫚕"],juǎn:["呟","埍","臇","菤","錈","锩"],pěn:["呠","翸"],"wěn mǐn":["呡"],"ne ní":["呢"],"ḿ m̀ móu":["呣"],rán:["呥","嘫","然","燃","繎","肰","蚦","蚺","衻","袇","袡","髥","髯"],"tiè chè":["呫"],"qì zhī":["呮"],"zǐ cī":["呰"],"guā gū guǎ":["呱"],"cī zī":["呲"],"hǒu xǔ gòu":["呴"],"hē ā á ǎ à a":["呵"],náo:["呶","夒","峱","嶩","巎","挠","撓","猱","硇","蛲","蟯","詉","譊","鐃","铙"],"xiā gā":["呷"],pēi:["呸","怌","肧","胚","衃","醅"],"háo xiāo":["呺"],mìng:["命","掵"],"dá dàn":["呾"],"zuǐ jǔ":["咀"],"xián gān":["咁"],pǒu:["咅","哣","犃"],"yǎng yāng":["咉"],"zǎ zé zhā":["咋"],"hé hè huó huò hú":["和"],hāi:["咍"],dā:["咑","哒","噠","墶","搭","撘","耷","褡","鎝","𨱏"],"kǎ kā":["咔"],gū:["咕","唂","唃","姑","嫴","孤","巬","巭","柧","橭","沽","泒","稒","笟","箍","箛","篐","罛","苽","菇","菰","蓇","觚","軱","軲","轱","辜","酤","鈲","鮕","鴣","鸪"],"kā gā":["咖"],zuo:["咗"],lóng:["咙","嚨","嶐","巃","巄","昽","曨","朧","栊","槞","櫳","湰","滝","漋","爖","珑","瓏","癃","眬","矓","砻","礱","礲","窿","竜","聋","聾","胧","茏","蘢","蠪","蠬","襱","豅","鏧","鑨","霳","靇","驡","鸗","龍","龒","龙"],"xiàn xián":["咞"],qì:["咠","唭","噐","器","夡","弃","憇","憩","暣","棄","欫","气","気","氣","汔","汽","泣","湆","湇","炁","甈","盵","矵","碛","碶","磜","磧","罊","芞","葺","藒","蟿","訖","讫","迄","鐑"],"xì dié":["咥"],"liē liě lié lie":["咧"],zī:["咨","嗞","姕","姿","孜","孳","孶","崰","嵫","栥","椔","淄","湽","滋","澬","玆","禌","秶","粢","紎","緇","緕","纃","缁","茊","茲","葘","諮","谘","貲","資","赀","资","赼","趑","趦","輜","輺","辎","鄑","鈭","錙","鍿","鎡","锱","镃","頾","頿","髭","鯔","鰦","鲻","鶅","鼒","齍","齜","龇"],mī:["咪"],"jī xī qià":["咭"],"gē luò kǎ lo":["咯"],"shù xún":["咰"],"zán zá zǎ zan":["咱"],"hāi ké":["咳"],huī:["咴","噅","噕","婎","媈","幑","徽","恢","拻","挥","揮","晖","暉","楎","洃","瀈","灰","灳","烣","睳","禈","翚","翬","蘳","袆","褘","詼","诙","豗","輝","辉","鰴","麾","㧑"],"huài shì":["咶"],táo:["咷","啕","桃","檮","洮","淘","祹","綯","绹","萄","蜪","裪","迯","逃","醄","鋾","鞀","鞉","饀","駣","騊","鼗","𫘦"],xián:["咸","啣","娴","娹","婱","嫌","嫺","嫻","弦","挦","撏","涎","湺","澖","甉","痫","癇","癎","絃","胘","舷","藖","蚿","蛝","衔","衘","誸","諴","賢","贒","贤","輱","醎","銜","鑦","閑","闲","鷳","鷴","鷼","鹇","鹹","麙","𫍯"],"è àn":["咹"],"xuān xuǎn":["咺","烜"],"wāi hé wǒ guǎ guō":["咼"],"yàn yè yān":["咽"],āi:["哀","哎","埃","溾","銰","鎄","锿"],pǐn:["品","榀"],shěn:["哂","婶","嬸","审","宷","審","弞","曋","渖","瀋","瞫","矤","矧","覾","訠","諗","讅","谂","谉","邥","頣","魫"],"hǒng hōng hòng":["哄"],"wā wa":["哇"],"hā hǎ hà":["哈"],zāi:["哉","栽","渽","溨","災","灾","烖","睵","賳"],"dì diè":["哋"],pài:["哌","沠","派","渒","湃","蒎","鎃"],"gén hěn":["哏"],"yǎ yā":["哑","雅"],"yuě huì":["哕","噦"],nián:["哖","年","秊","秥","鮎","鯰","鲇","鲶","鵇","黏"],"huá huā":["哗","嘩"],"jì jiē zhāi":["哜","嚌"],mōu:["哞"],"yō yo":["哟","喲"],lòng:["哢","梇","贚"],"ò ó é":["哦"],"lī lǐ li":["哩"],"nǎ na nǎi né něi":["哪"],hè:["哬","垎","壑","寉","惒","焃","煂","燺","爀","癋","碋","翯","褐","謞","賀","贺","赫","靍","靎","靏","鶴","鸖","鹤"],"bō pò bā":["哱"],zhé:["哲","啠","喆","嚞","埑","悊","摺","晢","晣","歽","矺","砓","磔","籷","粍","虴","蛰","蟄","袩","詟","謫","謺","讁","讋","谪","輒","輙","轍","辄","辙","鮿"],"liàng láng":["哴"],"liè lǜ":["哷"],hān:["哻","憨","蚶","谽","酣","頇","顸","馠","魽","鼾"],"hēng hng":["哼"],gěng:["哽","埂","峺","挭","梗","綆","绠","耿","莄","郠","骾","鯁","鲠","𬒔"],"chuò yuè":["哾"],"gě jiā":["哿"],"bei bài":["唄"],"hán hàn":["唅"],chún:["唇","浱","湻","滣","漘","犉","純","纯","脣","莼","蒓","蓴","醇","醕","錞","陙","鯙","鶉","鹑","𬭚"],"ài āi":["唉"],"jiá qiǎn":["唊"],"yán dàn xián":["唌"],chē:["唓","砗","硨","莗","蛼"],"wú ńg ń":["唔"],zào:["唕","唣","噪","慥","梍","灶","煰","燥","皁","皂","竃","竈","簉","艁","譟","趮","躁","造","𥖨"],dí:["唙","啇","嘀","嚁","嫡","廸","敌","敵","梑","涤","滌","狄","笛","籴","糴","苖","荻","蔋","蔐","藡","覿","觌","豴","迪","靮","頔","馰","髢","鸐","𬱖"],"gòng hǒng gǒng":["唝","嗊"],dóu:["唞"],"lào láo":["唠","嘮","憦"],huàn:["唤","喚","奂","奐","宦","嵈","幻","患","愌","换","換","擐","攌","梙","槵","浣","涣","渙","漶","澣","烉","焕","煥","瑍","痪","瘓","睆","肒","藧","豢","轘","逭","鯇","鯶","鰀","鲩"],léng:["唥","塄","楞","碐","薐"],"wō wěi":["唩"],fěng:["唪","覂","諷","讽"],"yín jìn":["唫"],"hǔ xià":["唬"],wéi:["唯","围","圍","壝","峗","峞","嵬","帏","帷","幃","惟","桅","沩","洈","涠","湋","溈","潍","潙","潿","濰","犩","矀","維","维","蓶","覹","违","違","鄬","醀","鍏","闈","闱","韋","韦","鮠","𣲗","𬶏"],shuā:["唰"],chàng:["唱","怅","悵","暢","焻","畅","畼","誯","韔","鬯"],"ér wā":["唲"],qiàng:["唴","炝","熗","羻"],yō:["唷"],yū:["唹","淤","瘀","盓","箊","紆","纡","込","迂","迃","陓"],lài:["唻","濑","瀨","瀬","癞","癩","睐","睞","籁","籟","藾","賚","賴","赉","赖","頼","顂","鵣"],tuò:["唾","嶞","柝","毤","毻","箨","籜","萚","蘀","跅"],"zhōu zhāo tiào":["啁"],kěn:["啃","垦","墾","恳","懇","肎","肯","肻","豤","錹"],"zhuó zhào":["啅","濯"],"hēng hèng":["啈","悙"],"lín lán":["啉"],"a ā á ǎ à":["啊"],qiāng:["啌","嗴","嶈","戕","摤","斨","枪","槍","溬","牄","猐","獇","羌","羗","腔","蜣","謒","鏘","锖","锵"],"tūn zhūn xiāng duǐ":["啍"],wèn:["問","妏","揾","搵","璺","问","顐"],"cuì qi":["啐"],"dié shà jié tì":["啑"],"yuē wā":["啘"],"zǐ cǐ":["啙"],"bǐ tú":["啚"],"chuò chuài":["啜"],"yǎ yā è":["啞"],fēi:["啡","婓","婔","扉","暃","渄","猆","緋","绯","裶","霏","非","靟","飛","飝","飞","餥","馡","騑","騛","鯡","鲱","𬴂"],pí:["啤","壀","枇","毗","毘","焷","琵","疲","皮","篺","罴","羆","脾","腗","膍","蚍","蚽","蜱","螷","蠯","豼","貔","郫","鈹","阰","陴","隦","魮","鮍","鲏","鵧","鼙"],shá:["啥"],"lā la":["啦"],"yīng qíng":["啨"],pā:["啪","妑","舥","葩","趴"],"zhě shì":["啫"],sè:["啬","嗇","懎","擌","栜","歮","涩","渋","澀","澁","濇","濏","瀒","瑟","璱","瘷","穑","穡","穯","繬","譅","轖","銫","鏼","铯","飋"],niè:["啮","嗫","噛","嚙","囁","囓","圼","孼","孽","嵲","嶭","巕","帇","敜","枿","槷","櫱","涅","湼","痆","篞","籋","糱","糵","聂","聶","臬","臲","蘖","蠥","讘","踂","踗","踙","蹑","躡","錜","鎳","鑈","鑷","钀","镊","镍","闑","陧","隉","顳","颞","齧","𫔶"],"luō luó luo":["啰","囉"],"tān chǎn tuō":["啴"],bo:["啵","蔔"],dìng:["啶","定","椗","矴","碇","碠","磸","聢","腚","萣","蝊","訂","订","錠","锭","顁","飣","饤"],lāng:["啷"],"án ān":["啽"],kā:["喀","擖"],"yóng yú":["喁"],"lā lá lǎ":["喇"],jiē:["喈","喼","嗟","堦","媘","接","掲","擑","湝","煯","疖","痎","癤","皆","秸","稭","脻","蝔","街","謯","阶","階","鞂","鶛"],hóu:["喉","帿","猴","瘊","睺","篌","糇","翭","葔","鄇","鍭","餱","骺","鯸","𬭤"],"dié zhá":["喋"],wāi:["喎","歪","竵"],"nuò rě":["喏"],"xù huò guó":["喐"],zán:["喒"],"wō ō":["喔"],hú:["喖","嘝","囫","壶","壷","壺","媩","弧","搰","斛","楜","槲","湖","瀫","焀","煳","狐","猢","瑚","瓳","箶","絗","縠","胡","葫","蔛","蝴","螜","衚","觳","醐","鍸","頶","餬","鬍","魱","鰗","鵠","鶘","鶦","鹕"],"huàn yuán xuǎn hé":["喛"],xǐ:["喜","囍","壐","屣","徙","憙","枲","橲","歖","漇","玺","璽","矖","禧","縰","葈","葸","蓰","蟢","謑","蹝","躧","鈢","鉨","鉩","鱚","𬭳","𬶮"],"hē hè yè":["喝"],kuì:["喟","嘳","媿","嬇","愦","愧","憒","篑","簣","籄","聩","聭","聵","膭","蕢","謉","餽","饋","馈"],"zhǒng chuáng":["喠"],"wéi wèi":["喡","為","爲"],"duó zhà":["喥"],"sāng sàng":["喪"],"qiáo jiāo":["喬"],"pèn bēn":["喯"],"cān sūn qī":["喰"],"zhā chā":["喳"],miāo:["喵"],"pēn pèn":["喷"],kuí:["喹","夔","奎","巙","戣","揆","晆","暌","楏","楑","櫆","犪","睽","葵","藈","蘷","虁","蝰","躨","逵","鄈","鍨","鍷","頯","馗","騤","骙","魁"],"lou lóu":["喽"],"zào qiāo":["喿"],"hè xiāo xiào hù":["嗃"],"á shà":["嗄"],xiù:["嗅","岫","峀","溴","珛","琇","璓","秀","綉","繍","繡","绣","螑","袖","褎","褏","銹","鏥","鏽","锈","齅"],"qiāng qiàng":["嗆","戗","戧","蹌","蹡"],"ài yì":["嗌","艾"],"má mǎ ma":["嗎"],"kè kē":["嗑"],"dā tà":["嗒","鎉"],sǎng:["嗓","搡","磉","褬","鎟","顙","颡"],chēn:["嗔","抻","琛","瞋","諃","謓","賝","郴","𬘭"],"wā gǔ":["嗗"],"pǎng bēng":["嗙"],"xián qiǎn qiān":["嗛"],lào:["嗠","嫪","橯","涝","澇","耢","耮","躼","軂","酪"],wēng:["嗡","翁","聬","螉","鎓","鶲","鹟","𬭩"],wà:["嗢","腽","膃","袜","襪","韤"],"hēi hāi":["嗨"],hē:["嗬","欱","蠚","訶","诃"],zi:["嗭"],sǎi:["嗮"],"ǹg ńg ňg":["嗯"],gě:["嗰","舸"],ná:["嗱","拏","拿","鎿","镎"],diǎ:["嗲"],"ài ǎi āi":["嗳"],tōng:["嗵","樋","炵","蓪"],"zuī suī":["嗺"],"zhē zhè zhù zhe":["嗻"],mò:["嗼","圽","塻","墨","妺","嫼","寞","帞","昩","末","枺","歿","殁","沫","漠","爅","獏","瘼","皌","眽","眿","瞐","瞙","砞","礳","秣","絈","纆","耱","茉","莈","蓦","蛨","蟔","貃","貊","貘","銆","鏌","镆","陌","靺","驀","魩","默","黙","𬙊"],sòu:["嗽","瘶"],tǎn:["嗿","坦","忐","憳","憻","暺","毯","璮","菼","袒","襢","醓","鉭","钽"],"jiào dǎo":["嘄"],"kǎi gě":["嘅"],"shān càn":["嘇"],cáo:["嘈","嶆","曹","曺","槽","漕","艚","蓸","螬","褿","鏪","𥕢"],piào:["嘌","徱","蔈","驃"],"lóu lou":["嘍"],gǎ:["尕","玍"],"gǔ jiǎ":["嘏"],"jiāo xiāo":["嘐"],"xū shī":["嘘","噓"],pó:["嘙","嚩","婆","櫇","皤","鄱"],"dē dēi":["嘚"],"ma má":["嘛"],"lē lei":["嘞"],"gā gá gǎ":["嘠"],sāi:["嘥","噻","毢","腮","顋","鰓"],"zuō chuài":["嘬"],"cháo zhāo":["嘲","朝","鼂"],zuǐ:["嘴","噿","嶊","璻"],"qiáo qiào":["嘺","翹","谯"],"chù xù shòu":["嘼"],"tān chǎn":["嘽"],"dàn tán":["嘾","弾","彈","惔","澹"],"hēi mò":["嘿"],ě:["噁","砨","頋","騀","鵈"],"fān bo":["噃"],chuáng:["噇","床","牀"],"cù zā hé":["噈"],"tūn kuò":["噋"],"cēng chēng":["噌"],dēng:["噔","嬁","灯","燈","璒","登","竳","簦","艠","豋"],pū:["噗","扑","撲","攴","攵","潽","炇","陠"],juē:["噘","屩","屫","撧"],lū:["噜","嚕","撸","擼","謢"],zhān:["噡","岾","惉","旃","旜","枬","栴","毡","氈","氊","沾","瞻","薝","蛅","詀","詹","譫","谵","趈","邅","閚","霑","飦","饘","驙","魙","鱣","鸇","鹯","𫗴"],ō:["噢"],"zhòu zhuó":["噣"],"jiào qiào chī":["噭"],yuàn:["噮","妴","怨","愿","掾","瑗","禐","苑","衏","裫","褑","院","願"],"ǎi ài āi":["噯"],"yōng yǒng":["噰","澭"],"jué xué":["噱"],"pēn pèn fèn":["噴"],gá:["噶","尜","釓","錷","钆"],"xīn hěn hèn":["噷"],dāng:["噹","澢","珰","璫","筜","簹","艡","蟷","裆","襠"],làn:["嚂","滥","濫","烂","燗","爁","爛","爤","瓓","糷","钄"],tà:["嚃","嚺","崉","挞","搨","撻","榻","橽","毾","涾","澾","濌","禢","粏","誻","譶","蹋","蹹","躂","躢","遝","錔","闒","闥","闼","阘","鞜","鞳"],"huō huò ǒ":["嚄"],hāo:["嚆","茠","蒿","薅"],"hè xià":["嚇"],"xiù pì":["嚊"],"zhōu chóu":["嚋","盩","诪"],mē:["嚒"],"chā cā":["嚓"],"bó pào bào":["嚗"],"me mèi mò":["嚜"],"xié hái":["嚡"],"áo xiāo":["嚣"],mō:["嚤","摸"],pín:["嚬","娦","嫔","嬪","玭","矉","薲","蠙","貧","贫","顰","颦","𬞟"],mè:["嚰","濹"],"rǎng rāng":["嚷"],lá:["嚹","旯"],"jiáo jué jiào":["嚼"],chuò:["嚽","娖","擉","歠","涰","磭","踀","輟","辍","辵","辶","酫","鑡","餟","齪","龊"],"huān huàn":["嚾"],"zá cà":["囃"],chài:["囆","虿","蠆","袃","訍"],"náng nāng":["囊"],"zá zàn cān":["囋"],sū:["囌","櫯","甦","稣","穌","窣","蘇","蘓","酥","鯂"],zèng:["囎","熷","甑","贈","赠","鋥","锃"],"zá niè yàn":["囐"],nāng:["囔"],"luó luō luo":["囖"],"wéi guó":["囗"],huí:["囘","回","囬","廻","廽","恛","洄","痐","茴","蚘","蛔","蛕","蜖","迴","逥","鮰"],nín:["囜","您","脌"],"jiǎn nān":["囝"],nān:["囡"],tuán:["团","団","團","慱","抟","摶","檲","糰","鏄","鷒","鷻"],"tún dùn":["囤","坉"],guó:["囯","囶","囻","国","圀","國","帼","幗","慖","摑","漍","聝","腘","膕","蔮","虢","馘","𬇹"],kùn:["困","涃","睏"],"wéi tōng":["囲"],qūn:["囷","夋","逡"],rì:["囸","日","衵","鈤","馹","驲"],tāi:["囼","孡","胎"],pǔ:["圃","圑","擈","普","暜","樸","檏","氆","浦","溥","烳","諩","譜","谱","蹼","鐠","镨"],"quān juàn juān":["圈","圏"],"chuí chuán":["圌"],tuǎn:["圕","畽","疃"],lüè:["圙","掠","略","畧","稤","鋝","鋢","锊","䂮"],"huán yuán":["圜"],luán:["圝","圞","奱","娈","孌","孪","孿","峦","巒","挛","攣","曫","栾","欒","滦","灤","癴","癵","羉","脔","臠","虊","銮","鑾","鵉","鸞","鸾"],tǔ:["土","圡","釷","钍"],"xū wéi":["圩"],"dì de":["地","嶳"],"qiān sú":["圱"],zhèn:["圳","塦","挋","振","朕","栚","甽","眹","紖","絼","纼","誫","賑","赈","鋴","鎭","鎮","镇","阵","陣","震","鴆","鸩"],"chǎng cháng":["场","場","塲"],"qí yín":["圻"],jiá:["圿","忦","恝","戞","扴","脥","荚","莢","蛱","蛺","裌","跲","郏","郟","鋏","铗","頬","頰","颊","鴶","鵊"],"zhǐ zhì":["坁"],bǎn:["坂","岅","昄","板","版","瓪","粄","舨","蝂","鈑","钣","阪","魬"],qǐn:["坅","寑","寝","寢","昑","梫","笉","螼","赾","鋟","锓"],"méi fén":["坆"],"rǒng kēng":["坈"],"fāng fáng":["坊"],"fèn bèn":["坋"],tān:["坍","怹","摊","擹","攤","滩","灘","瘫","癱","舑","貪","贪"],"huài pēi pī péi":["坏"],"dì làn":["坔"],tán:["坛","墰","墵","壇","壜","婒","憛","昙","曇","榃","檀","潭","燂","痰","磹","罈","罎","藫","談","譚","譠","谈","谭","貚","郯","醰","錟","顃"],bà:["坝","垻","壩","弝","欛","灞","爸","矲","覇","霸","鮁","鲅"],fén:["坟","墳","妢","岎","幩","枌","棼","汾","焚","燌","燓","羒","羵","蒶","蕡","蚠","蚡","豮","豶","轒","鐼","隫","馩","魵","黂","鼖","鼢","𣸣"],zhuì:["坠","墜","惴","甀","畷","礈","綴","縋","缀","缒","腏","膇","諈","贅","赘","醊","錣","鑆"],pō:["坡","岥","泼","溌","潑","釙","鏺","钋","頗","颇","䥽"],"pǎn bàn":["坢"],kūn:["坤","堃","堒","崐","崑","昆","晜","潉","焜","熴","猑","琨","瑻","菎","蜫","裈","裩","褌","醌","錕","锟","騉","髠","髡","髨","鯤","鲲","鵾","鶤","鹍"],diàn:["坫","垫","墊","壂","奠","婝","店","惦","扂","橂","殿","淀","澱","玷","琔","电","癜","簟","蜔","鈿","電","靛","驔"],"mù mǔ":["坶"],"kē kě":["坷","軻"],xuè:["坹","岤","桖","瀥","狘","瞲","謔","谑","趐"],"dǐ chí":["坻","柢"],lā:["垃","柆","菈","邋"],lǒng:["垄","垅","壟","壠","拢","攏","竉","陇","隴","𬕂"],mín:["垊","姄","岷","崏","捪","旻","旼","民","珉","琘","琝","瑉","痻","盿","砇","緍","緡","缗","罠","苠","鈱","錉","鍲","鴖"],"dòng tóng":["垌","峒","洞"],cí:["垐","嬨","慈","柌","濨","珁","瓷","甆","磁","礠","祠","糍","茨","詞","词","辝","辞","辤","辭","雌","飺","餈","鴜","鶿","鷀","鹚"],duī:["垖","堆","塠","痽","磓","鐓","鐜","鴭"],"duò duǒ":["垛"],"duǒ duò":["垜","挆"],chá:["垞","察","嵖","搽","槎","檫","猹","茬","茶","詧","靫","𥻗"],shǎng:["垧","晌","樉","賞","贘","赏","鋿","鏛","鑜"],shǒu:["垨","守","手","扌","艏","首"],da:["垯","繨","跶"],háng:["垳","斻","杭","筕","絎","绗","航","苀","蚢","裄","貥","迒","頏","颃","魧"],"ān ǎn":["垵"],xīng:["垶","惺","星","曐","煋","猩","瑆","皨","篂","腥","興","觪","觲","謃","騂","骍","鮏","鯹"],"yuàn huán":["垸"],bāng:["垹","帮","幇","幚","幫","捠","梆","浜","邦","邫","鞤","𠳐"],"póu fú":["垺"],cén:["埁","岑","涔"],"běng fēng":["埄"],"dì fáng":["埅"],"xiá jiā":["埉"],"mái mán":["埋"],làng:["埌","崀","浪","蒗","閬","㫰"],"shān yán":["埏"],"qín jīn":["埐"],"pǔ bù":["埔"],huā:["埖","婲","椛","硴","糀","花","蒊","蘤","誮","錵"],"suì sù":["埣"],"pí pì":["埤"],"qīng zhēng":["埥","鲭"],"wǎn wān":["埦"],lǔn:["埨","稐","𫭢"],"zhēng chéng":["埩"],kōng:["埪","崆","箜","躻","錓","鵼"],"cǎi cài":["埰","寀","采"],"chù tòu":["埱"],běng:["埲","琫","菶","鞛"],"kǎn xiàn":["埳"],"yì shì":["埶","醳"],péi:["培","毰","裴","裵","賠","赔","錇","锫","阫","陪"],"sào sǎo":["埽"],"jǐn qīn jìn":["堇"],"péng bèng":["堋"],"qiàn zàn jiàn":["堑"],àn:["堓","屵","岸","按","暗","案","胺","荌","豻","貋","錌","闇","隌","黯"],"duò huī":["堕","墮"],huán:["堚","寏","寰","峘","桓","洹","澴","獂","环","環","糫","繯","缳","羦","荁","萈","萑","豲","鍰","鐶","锾","镮","闤","阛","雈","鬟","鹮","𬘫","𤩽"],"bǎo bǔ pù":["堡"],"máo móu wǔ":["堥"],ruán:["堧","壖","撋"],"ài è yè":["堨"],gèng:["堩","暅"],méi:["堳","塺","媒","嵋","徾","攗","枚","栂","梅","楣","楳","槑","湄","湈","煤","猸","玫","珻","瑂","眉","睂","禖","脄","脢","腜","苺","莓","葿","郿","酶","鎇","镅","霉","鶥","鹛","黴"],dǔ:["堵","琽","睹","笃","篤","覩","賭","赌"],féng:["堸","綘","艂","逢"],hèng:["堼"],chūn:["堾","媋","旾","春","暙","杶","椿","槆","橁","櫄","瑃","箺","萅","蝽","輴","鰆","鶞","䲠"],jiǎng:["塂","奖","奨","奬","桨","槳","獎","耩","膙","蒋","蔣","講","讲","顜"],huāng:["塃","巟","慌","肓","荒","衁"],duàn:["塅","断","斷","椴","段","毈","煅","瑖","碫","簖","籪","緞","缎","腶","葮","躖","鍛","锻"],tǎ:["塔","墖","獭","獺","鮙","鰨","鳎"],wěng:["塕","奣","嵡","攚","暡","瞈","蓊"],"sāi sài sè":["塞"],zàng:["塟","弉","臓","臟","葬","蔵","銺"],tián:["塡","屇","恬","沺","湉","璳","甛","甜","田","畋","畑","碵","磌","胋","闐","阗","鴫","鷆","鷏"],zhèng:["塣","幁","政","証","諍","證","证","诤","郑","鄭","靕","鴊"],"tián zhèn":["填"],wēn:["塭","昷","榲","殟","温","溫","瑥","瘟","蕰","豱","輼","轀","辒","鎾","饂","鰛","鰮","鳁"],liù:["塯","廇","磟","翏","雡","霤","餾","鬸","鷚","鹨"],hǎi:["塰","海","烸","酼","醢"],lǎng:["塱","朖","朗","朤","烺","蓢","㮾"],bèng:["塴","揼","泵","甏","綳","蹦","迸","逬","鏰","镚"],chén:["塵","宸","尘","忱","敐","敶","晨","曟","栕","樄","沉","煁","瘎","臣","茞","莀","莐","蔯","薼","螴","訦","諶","軙","辰","迧","鈂","陈","陳","霃","鷐","麎"],"ōu qiū":["塸"],"qiàn jiàn":["塹"],"zhuān tuán":["塼"],shuǎng:["塽","慡","漺","爽","縔","鏯"],shú:["塾","婌","孰","璹","秫","贖","赎"],lǒu:["塿","嵝","嶁","甊","篓","簍"],chí:["墀","弛","持","池","漦","竾","筂","箎","篪","茌","荎","蚳","謘","貾","赿","踟","迟","迡","遅","遟","遲","鍉","馳","驰"],shù:["墅","庶","庻","怷","恕","戍","束","树","樹","沭","漱","潄","濖","竖","竪","絉","腧","荗","蒁","虪","術","裋","豎","述","鉥","錰","鏣","霔","鶐","𬬸"],"dì zhì":["墆","疐"],kàn:["墈","崁","瞰","矙","磡","衎","鬫"],chěn:["墋","夦","硶","碜","磣","贂","趻","踸","鍖"],"zhǐ zhuó":["墌"],qiǎng:["墏","繈","繦","羥","襁"],zēng:["増","增","憎","璔","矰","磳","罾","譄","鄫","鱛","䎖"],qiáng:["墙","墻","嫱","嬙","樯","檣","漒","牆","艢","蔃","蔷","蘠"],"kuài tuí":["墤"],"tuǎn dǒng":["墥"],"qiáo què":["墧"],"zūn dūn":["墫"],"qiāo áo":["墽"],"yì tú":["墿"],"xué bó jué":["壆"],lǎn:["壈","嬾","孄","孏","懒","懶","揽","擥","攬","榄","欖","浨","漤","灠","纜","缆","罱","覧","覽","览","醂","顲"],huài:["壊","壞","蘾"],rǎng:["壌","壤","攘","爙"],"làn xiàn":["壏"],dǎo:["壔","导","導","岛","島","嶋","嶌","嶹","捣","搗","擣","槝","祷","禂","禱","蹈","陦","隝","隯"],ruǐ:["壡","桵","橤","繠","蕊","蕋","蘂","蘃"],san:["壭"],zhuàng:["壮","壯","壵","撞","焋","状","狀"],"ké qiào":["壳","殼"],kǔn:["壸","壼","悃","捆","梱","硱","祵","稇","稛","綑","裍","閫","閸","阃"],mǎng:["壾","漭","茻","莽","莾","蠎"],cún:["壿","存"],"zhǐ zhōng":["夂"],"gǔ yíng":["夃"],"jiàng xiáng":["夅","降"],"páng féng fēng":["夆"],zhāi:["夈","捚","摘","斋","斎","榸","粂","齋"],"xuàn xiòng":["夐"],wài:["外","顡"],"wǎn yuàn wān yuān":["夗"],"mǎo wǎn":["夘"],mèng:["夢","夣","孟","梦","癦","霥"],"dà dài":["大"],"fū fú":["夫","姇","枎","粰"],guài:["夬","怪","恠"],yāng:["央","姎","抰","殃","泱","秧","胦","鉠","鍈","雵","鴦","鸯"],"hāng bèn":["夯"],gǎo:["夰","搞","杲","槀","槁","檺","稁","稾","稿","縞","缟","菒","藁","藳"],"tāo běn":["夲"],"tóu tou":["头"],"yǎn tāo":["夵"],"kuā kuà":["夸","誇"],"jiá jiā gā xiá":["夹"],huà:["夻","婳","嫿","嬅","崋","摦","杹","枠","桦","槬","樺","澅","画","畫","畵","繣","舙","話","諙","譮","话","黊"],"jiā jiá gā xiá":["夾"],ēn:["奀","恩","蒽"],"dī tì":["奃"],"yǎn yān":["奄","渰"],pào:["奅","疱","皰","砲","礟","礮","靤","麭"],nài:["奈","柰","渿","耐","萘","褦","錼","鼐"],"quān juàn":["奍","弮","棬"],zòu:["奏","揍"],"qì qiè xiè":["契"],kāi:["奒","开","揩","鐦","锎","開"],"bēn bèn":["奔","泍"],tào:["套"],"zàng zhuǎng":["奘"],běn:["奙","本","楍","畚","翉","苯"],"xùn zhuì":["奞"],shē:["奢","檨","猞","畭","畲","賒","賖","赊","輋","𪨶"],"hǎ pò tǎi":["奤"],"ào yù":["奥","奧","澚"],yūn:["奫","氲","氳","蒀","蒕","蝹","贇","赟","𫖳"],"duǒ chě":["奲"],"nǚ rǔ":["女"],nú:["奴","孥","笯","駑","驽"],"dīng dǐng tiǎn":["奵"],"tā jiě":["她"],nuán:["奻"],"hǎo hào":["好"],fàn:["奿","嬎","梵","汎","泛","滼","瀪","犯","畈","盕","笵","範","范","訉","販","贩","軬","輽","飯","飰","饭"],shuò:["妁","搠","朔","槊","烁","爍","矟","蒴","鎙","鑠","铄"],"fēi pèi":["妃"],wàng:["妄","忘","旺","望","朢"],zhuāng:["妆","妝","娤","庄","庒","桩","梉","樁","粧","糚","荘","莊","装","裝"],mā:["妈","媽"],"fū yōu":["妋"],"hài jiè":["妎"],dù:["妒","妬","杜","殬","渡","秺","芏","荰","螙","蠧","蠹","鍍","镀","靯","𬭊"],miào:["妙","庙","庿","廟","玅","竗"],"fǒu pēi pī":["妚"],"yuè jué":["妜"],niū:["妞"],"nà nàn":["妠"],tuǒ:["妥","嫷","庹","椭","楕","橢","鬌","鰖","鵎"],"wàn yuán":["妧"],fáng:["妨","房","肪","防","魴","鲂"],nī:["妮"],zhóu:["妯","碡"],zhāo:["妱","巶","招","昭","釗","鉊","鍣","钊","駋","𬬿"],"nǎi nǐ":["妳"],tǒu:["妵","敨","紏","蘣","黈"],"xián xuán xù":["妶"],"zhí yì":["妷","秇"],ē:["妸","妿","婀","屙"],mèi:["妹","媚","寐","抺","旀","昧","沬","煝","痗","眛","睸","祙","篃","蝞","袂","跊","鬽","魅"],"qī qì":["妻"],"xū xǔ":["姁","稰"],"shān shàn":["姍","姗","苫","釤","钐"],mán:["姏","慲","樠","蛮","蠻","謾","饅","馒","鬗","鬘","鰻","鳗"],jiě:["姐","媎","檞","毑","飷"],"wěi wēi":["委"],pīn:["姘","拼","礗","穦","馪","驞"],"huá huó":["姡"],"jiāo xiáo":["姣"],"gòu dù":["姤"],"lǎo mǔ":["姥"],"nián niàn":["姩"],zhěn:["姫","屒","弫","抮","昣","枕","畛","疹","眕","稹","縝","縥","缜","聄","萙","袗","裖","覙","診","诊","軫","轸","辴","駗","鬒"],héng:["姮","恆","恒","烆","珩","胻","蘅","衡","鑅","鴴","鵆","鸻"],"jūn xún":["姰"],"kuā hù":["姱"],"è yà":["姶"],"xiān shēn":["姺"],wá:["娃"],"ráo rǎo":["娆","嬈"],"shào shāo":["娋"],xiē:["娎","揳","楔","歇","蝎","蠍"],"wǔ méi mǔ":["娒"],"chuò lài":["娕"],niáng:["娘","嬢","孃"],"nà nuó":["娜","𦰡"],"pōu bǐ":["娝"],"něi suī":["娞"],tuì:["娧","煺","蛻","蜕","退","駾"],mǎn:["娨","屘","満","满","滿","螨","蟎","襔","鏋"],"wú wù yú":["娪"],"xī āi":["娭"],"zhuì shuì":["娷"],"dōng dòng":["娻"],"ǎi ái è":["娾"],"ē ě":["娿"],mián:["婂","嬵","宀","杣","棉","檰","櫋","眠","矈","矊","矏","綿","緜","绵","芇","蝒"],"pǒu péi bù":["婄"],biǎo:["婊","脿","表","裱","褾","諘","錶"],"fù fàn":["婏"],wǒ:["婐","婑","我"],"ní nǐ":["婗","棿"],"quán juàn":["婘","惓"],hūn:["婚","昏","昬","棔","涽","睧","睯","碈","荤","葷","蔒","轋","閽","阍"],"qiān jǐn":["婜"],"wān wà":["婠"],"lái lài":["婡","徕","徠"],"zhōu chōu":["婤"],"chuò nào":["婥"],"nüè àn":["婩"],"hùn kūn":["婫"],"dàng yáng":["婸"],nàn:["婻"],"ruò chuò":["婼"],jiǎ:["婽","岬","斚","斝","榎","槚","檟","玾","甲","胛","鉀","钾"],"tōu yú":["婾","媮"],"yù yú":["媀"],"wéi wěi":["媁"],"dì tí":["媂","珶","苐"],róu:["媃","揉","柔","渘","煣","瑈","瓇","禸","粈","糅","脜","腬","葇","蝚","蹂","輮","鍒","鞣","騥","鰇","鶔","𫐓"],"ruǎn nèn":["媆"],miáo:["媌","嫹","描","瞄","苗","鶓","鹋"],"yí pèi":["媐"],"mián miǎn":["媔"],"tí shì":["媞","惿"],"duò tuó":["媠","沲"],ǎo:["媪","媼","艹","芺","袄","襖","镺"],"chú zòu":["媰"],yìng:["媵","映","暎","硬","膡","鱦"],"qín shēn":["嫀"],jià:["嫁","幏","架","榢","稼","駕","驾"],sǎo:["嫂"],"zhēn zhěn":["嫃"],"jiē suǒ":["嫅"],"míng mǐng":["嫇"],niǎo:["嫋","嬝","嬲","茑","蔦","袅","裊","褭","鸟"],tāo:["嫍","幍","弢","慆","掏","搯","槄","涛","滔","濤","瑫","絛","縚","縧","绦","詜","謟","轁","鞱","韜","韬","飸","饕"],biáo:["嫑"],"piáo piāo":["嫖","薸"],xuán:["嫙","悬","懸","暶","檈","漩","玄","璇","璿","痃","蜁","𫠊"],"màn mān":["嫚"],kāng:["嫝","嵻","康","慷","槺","漮","砊","穅","糠","躿","鏮","鱇","𡐓","𩾌"],"hān nǎn":["嫨"],nèn:["嫩","嫰"],zhē:["嫬","遮"],"mā má":["嫲"],piè:["嫳"],zhǎn:["嫸","展","搌","斩","斬","琖","盏","盞","輾","醆","颭","飐"],"xiān yǎn jìn":["嬐"],liǎn:["嬚","敛","斂","琏","璉","羷","脸","臉","蔹","蘝","蘞","裣","襝","鄻"],"qióng huán xuān":["嬛"],dǒng:["嬞","懂","箽","董","蕫","諌"],cān:["嬠","湌","爘","飡","餐","驂","骖"],tiǎo:["嬥","宨","晀","朓","窱","脁"],bí:["嬶","荸","鼻"],liǔ:["嬼","柳","栁","桞","桺","橮","熮","珋","綹","绺","罶","羀","鋶","锍"],"qiān xiān":["孅","欦"],"xié huī":["孈"],"huān quán":["孉"],"lí lì":["孋","麗"],"zhú chuò":["孎"],kǒng:["孔","恐"],"mā zī":["孖"],"sūn xùn":["孙","孫"],"bèi bó":["孛","誖"],"yòu niū":["孧"],zhuǎn:["孨","竱","轉"],hái:["孩","骸"],nāo:["孬"],"chán càn":["孱"],bò:["孹","檗","蘗","譒"],nái:["孻","腉"],"níng nìng":["宁","寍","寗","寜","寧","甯"],zhái:["宅"],"tū jiā":["宊"],sòng:["宋","訟","誦","讼","诵","送","鎹","頌","颂","餸"],ròu:["宍","肉","譳"],zhūn:["宒","窀","衠","諄","谆","迍"],"mì fú":["宓"],"dàng tàn":["宕"],"wǎn yuān":["宛"],chǒng:["宠","寵"],qún:["宭","峮","帬","羣","群","裙","裠"],zǎi:["宰","崽"],"bǎo shí":["宲"],"jiā jia jie":["家"],"huāng huǎng":["宺"],kuān:["宽","寛","寬","臗","鑧","髋","髖"],"sù xiǔ xiù":["宿"],"jié zǎn":["寁"],"bìng bǐng":["寎"],"jìn qǐn":["寖"],"lóu jù":["寠"],"xiě xiè":["寫"],"qīn qìn":["寴"],cùn:["寸","籿"],duì:["对","対","對","怼","憝","懟","濧","瀩","碓","祋","綐","薱","譈","譵","轛","队","陮"],"lüè luó":["寽"],"shè yè yì":["射"],"jiāng jiàng qiāng":["将"],"jiāng jiàng":["將","浆","漿","畺"],zūn:["尊","嶟","樽","罇","遵","鐏","鱒","鳟","鶎","鷷","𨱔"],"shù zhù":["尌","澍"],xiǎo:["小","晓","暁","曉","皛","皢","筱","筿","篠","謏","𫍲"],"jié jí":["尐","诘","鞊"],"shǎo shào":["少"],ěr:["尒","尓","尔","栮","毦","洱","爾","珥","耳","薾","衈","趰","迩","邇","鉺","铒","餌","饵","駬"],"wāng yóu":["尢"],wāng:["尣","尩","尪","尫","汪"],liào:["尥","尦","廖","撂","料","炓","窷","鐐","镣","𪤗"],"méng máng lóng páng":["尨"],gà:["尬","魀"],"kuì kuǐ":["尯"],tuí:["尵","弚","穨","蘈","蹪","隤","頹","頺","頽","颓","魋","𬯎"],yǐn:["尹","嶾","引","朄","檃","檼","櫽","淾","濥","瘾","癮","粌","蘟","蚓","螾","讔","赺","趛","輑","鈏","靷"],"chǐ chě":["尺"],kāo:["尻","髛"],"jìn jǐn":["尽"],"wěi yǐ":["尾"],"niào suī":["尿"],céng:["层","層","嶒","驓"],diǎo:["屌"],"píng bǐng bīng":["屏"],lòu:["屚","漏","瘘","瘺","瘻","鏤","镂","陋"],"shǔ zhǔ":["属","屬"],"xiè tì":["屟"],"chè cǎo":["屮"],"tún zhūn":["屯"],"nì jǐ":["屰"],"hóng lóng":["屸"],"qǐ kǎi":["岂","豈"],áng:["岇","昂","昻"],"gǎng gāng":["岗","崗"],kě:["岢","敤","渇","渴","炣"],gǒu:["岣","狗","玽","笱","耇","耈","耉","苟","豿"],tiáo:["岧","岹","樤","祒","笤","芀","萔","蓚","蓨","蜩","迢","鋚","鎥","鞗","髫","鯈","鰷","鲦","齠","龆"],"qū jū":["岨"],lǐng:["岭","嶺","領","领"],pò:["岶","敀","洦","湐","烞","珀","破","砶","粕","蒪","魄"],"bā kè":["峇"],luò:["峈","摞","洛","洜","犖","珞","笿","纙","荦","詻","雒","駱","骆","鵅"],"fù niè":["峊"],ěn:["峎"],"zhì shì":["峙","崻"],qiǎ:["峠","跒","酠","鞐"],"qiáo jiào":["峤","癄"],"xié yé":["峫"],bū:["峬","庯","晡","誧","逋","鈽","錻","钸","餔","鵏"],chóng:["崇","崈","爞","虫","蝩","蟲","褈","隀"],"zú cuì":["崒","椊"],"líng léng":["崚"],"dòng dōng":["崠"],xiáo:["崤","洨","淆","訤","誵"],"pí bǐ":["崥","芘"],"zhǎn chán":["崭","嶃","嶄"],"wǎi wēi":["崴"],"yáng dàng":["崵"],"shì dié":["崼"],yào:["崾","曜","熎","燿","矅","穾","窔","筄","耀","艞","药","葯","薬","藥","袎","覞","詏","讑","靿","鷂","鹞","鼼"],"kān zhàn":["嵁"],"hán dǎng":["嵅"],"qiàn kàn":["嵌"],"wù máo":["嵍"],"kě jié":["嵑","嶱"],"wēi wěi":["嵔"],kē:["嵙","柯","棵","榼","樖","牁","牱","犐","珂","疴","瞌","磕","礚","科","稞","窠","萪","薖","蚵","蝌","趷","轲","醘","鈳","钶","頦","顆","颗","髁"],"dàng táng":["嵣"],"róng yíng":["嵤","爃"],"ái kǎi":["嵦"],"kāo qiāo":["嵪"],cuó:["嵯","嵳","痤","矬","蒫","蔖","虘","鹺","鹾"],"qiǎn qīn":["嵰"],"dì dié":["嵽"],cēn:["嵾"],dǐng:["嵿","艼","薡","鐤","頂","顶","鼎","鼑"],"áo ào":["嶅"],"pǐ pèi":["嶏"],"jiào qiáo":["嶠","潐"],"jué guì":["嶡","鳜"],"zhān shàn":["嶦","鳣"],"xiè jiè":["嶰"],"guī xī juàn":["嶲"],rū:["嶿"],"lì liè":["巁","棙","爄","綟"],"xī guī juàn":["巂"],"yíng hōng":["巆"],yǐng:["巊","廮","影","摬","梬","潁","瘿","癭","矨","穎","郢","鐛","頴","颍","颕","颖"],chǎo:["巐","炒","煼","眧","麨"],cuán:["巑","櫕","欑"],chuān:["巛","川","氚","瑏","穿"],"jīng xíng":["巠"],cháo:["巢","巣","晁","漅","潮","牊","窲","罺","謿","轈","鄛","鼌"],qiǎo:["巧","愀","髜"],gǒng:["巩","廾","拱","拲","栱","汞","珙","輁","鞏"],"chà chā chāi cī":["差"],"xiàng hàng":["巷"],shuài:["帅","帥","蟀"],pà:["帊","帕","怕","袙"],"tǎng nú":["帑"],"mò wà":["帓"],"tiē tiě tiè":["帖"],zhǒu:["帚","晭","疛","睭","箒","肘","菷","鯞"],"juǎn juàn":["帣"],shuì:["帨","涗","涚","睡","稅","税","裞"],"chóu dào":["帱","幬"],"jiǎn jiān sàn":["帴"],"shà qiè":["帹"],"qí jì":["帺","荠"],"shān qiāo shēn":["幓"],"zhuàng chuáng":["幢"],"chān chàn":["幨"],miè:["幭","懱","搣","滅","灭","烕","礣","篾","蔑","薎","蠛","衊","鑖","鱴","鴓"],"gān gàn":["干"],"bìng bīng":["并","幷"],"jī jǐ":["幾"],"guǎng ān":["广"],guǎng:["広","廣","犷","獷"],me:["庅"],"dùn tún":["庉"],"bài tīng":["庍"],"yìng yīng":["应"],"dǐ de":["底"],"dù duó":["度"],"máng méng páng":["庬"],"bìng píng":["庰"],chěng:["庱","悜","睈","逞","騁","骋"],"jī cuò":["庴"],qǐng:["庼","廎","檾","漀","苘","請","謦","请","頃","顷"],"guī wěi huì":["廆"],"jǐn qín":["廑"],kuò:["廓","扩","拡","擴","濶","筈","萿","葀","蛞","闊","阔","霩","鞟","鞹","韕","頢","鬠"],"qiáng sè":["廧","薔"],"yǐn yìn":["廴","隐","隠","隱","飮","飲","饮"],"pò pǎi":["廹","迫"],"nòng lòng":["弄"],"dì tì tuí":["弟"],"jué zhāng":["弡"],"mí mǐ":["弥","彌","靡"],chāo:["弨","怊","抄","欩","訬","超","鈔","钞"],yi:["弬"],shāo:["弰","旓","烧","焼","燒","筲","艄","萷","蕱","輎","髾","鮹"],"xuān yuān":["弲"],"qiáng qiǎng jiàng":["強","强"],"tán dàn":["弹","醈"],biè:["彆"],"qiáng jiàng qiǎng":["彊"],"jì xuě":["彐"],tuàn:["彖","褖"],yuē:["彟","曰","曱","矱"],"shān xiǎn":["彡"],wén:["彣","文","炆","珳","瘒","繧","聞","芠","蚉","蚊","螡","蟁","閺","閿","闅","闦","闻","阌","雯","馼","駇","魰","鳼","鴍","鼤","𫘜"],"péng bāng":["彭"],"piāo piào":["彯"],"zhuó bó":["彴"],"tuǒ yí":["彵"],"páng fǎng":["彷"],wǎng:["彺","往","徃","惘","枉","棢","網","网","罒","罓","罔","罖","菵","蛧","蝄","誷","輞","辋","魍"],cú:["徂","殂"],"dài dāi":["待"],huái:["徊","怀","懐","懷","槐","淮","耲","蘹","褢","褱","踝"],"wā wàng jiā":["徍"],"chěng zhèng":["徎"],"dé děi de":["得"],"cóng zòng":["從"],"shì tǐ":["徥"],"tí chí":["徲","鶗","鶙"],dé:["徳","德","恴","悳","惪","淂","鍀","锝"],"zhǐ zhēng":["徴","徵"],bié:["徶","癿","莂","蛂","襒","蹩"],"chōng zhǒng":["徸"],"jiǎo jiào":["徼","笅","筊"],"lòng lǒng":["徿"],"qú jù":["忂","渠","瞿","螶"],"dìng tìng":["忊"],gǎi:["忋","改"],rěn:["忍","栠","栣","秹","稔","綛","荏","荵","躵"],chàn:["忏","懴","懺","硟","羼","韂","顫"],tè:["忑","慝","特","蟘","鋱","铽"],"tè tēi tuī":["忒"],"gān hàn":["忓","攼"],"yì qì":["忔"],"tài shì":["忕"],"xī liě":["忚"],"yīng yìng":["応","應","譍"],"mǐn wěn mín":["忞","忟"],"sōng zhōng":["忪"],"yù shū":["忬","悆"],"qí shì":["忯","耆"],"tún zhūn dùn":["忳"],"qián qín":["忴","扲"],hún:["忶","浑","渾","餛","馄","魂","鼲"],niǔ:["忸","扭","炄","狃","紐","纽","莥","鈕","钮","靵"],"kuáng wǎng":["忹"],"kāng hàng":["忼"],"kài xì":["忾","愾"],òu:["怄","慪"],"bǎo bào":["怉"],"mín mén":["怋"],"zuò zhà":["怍"],zěn:["怎"],yàng:["怏","恙","样","様","樣","漾","羕","詇"],"kòu jù":["怐"],"náo niú":["怓"],"zhēng zhèng":["怔","掙","钲","铮"],"tiē zhān":["怗"],"hù gù":["怘"],"cū jù zū":["怚"],"sī sāi":["思"],"yóu chóu":["怞"],"tū dié":["怢"],"yōu yào":["怮"],xuàn:["怰","昡","楦","泫","渲","炫","琄","眩","碹","絢","縼","繏","绚","蔙","衒","袨","贙","鉉","鏇","铉","镟","颴"],"xù xuè":["怴"],"bì pī":["怶"],"xī shù":["怸"],"nèn nín":["恁"],"tiāo yáo":["恌"],"xī qī xù":["恓"],"xiào jiǎo":["恔"],"hū kuā":["恗"],nǜ:["恧","朒","衂","衄"],hèn:["恨"],"dòng tōng":["恫"],"quán zhuān":["恮"],"è wù ě wū":["恶","惡"],tòng:["恸","慟","憅","痛","衕"],"yuān juàn":["悁"],"qiāo qiǎo":["悄"],"jiè kè":["悈"],"hào jiào":["悎"],huǐ:["悔","檓","毀","毁","毇","燬","譭"],"mán mèn":["悗","鞔"],"yī yì":["悘","衣"],quān:["悛","箞","鐉","𨟠"],"kuī lǐ":["悝"],"yì niàn":["悥"],"mèn mēn":["悶"],guàn:["悹","悺","惯","慣","掼","摜","樌","欟","泴","涫","潅","灌","爟","瓘","盥","礶","祼","罆","罐","貫","贯","躀","遦","鏆","鑵","鱹","鸛","鹳"],"kōng kǒng":["悾"],"lǔn lùn":["惀"],guǒ:["惈","果","椁","槨","粿","綶","菓","蜾","裹","褁","輠","餜","馃"],"yuān wǎn":["惌","箢"],"lán lín":["惏"],"yù xù":["惐","淢"],"chuò chuì":["惙"],"hūn mèn":["惛"],"chǎng tǎng":["惝"],"suǒ ruǐ":["惢"],cǎn:["惨","慘","憯","黪","黲","䅟"],cán:["惭","慙","慚","残","殘","蚕","蝅","蠶","蠺"],"dàn dá":["惮","憚"],rě:["惹"],"yú tōu":["愉"],"kài qì":["愒"],"dàng táng shāng yáng":["愓"],"chén xìn dān":["愖"],"kè qià":["愘"],nuò:["愞","懦","懧","掿","搦","榒","稬","穤","糑","糥","糯","諾","诺","蹃","逽","鍩","锘"],gǎn:["感","擀","敢","桿","橄","澉","澸","皯","秆","稈","笴","芉","衦","赶","趕","鱤","鳡"],"còng sōng":["愡"],"sāi sī sǐ":["愢"],"gōng gòng hǒng":["愩","慐"],"shuò sù":["愬","洬"],"yáo yào":["愮"],huàng:["愰","曂","榥","滉","皝","皩","鎤","㿠"],zhěng:["愸","抍","拯","整","晸"],cǎo:["愺","艸","草","騲"],"xì xié":["慀"],"cǎo sāo":["慅"],"xù chù":["慉"],"qiè qiàn":["慊"],"cáo cóng":["慒"],"ào áo":["慠"],"lián liǎn":["慩","梿","槤","櫣"],"jìn qín jǐn":["慬"],"dì chì":["慸"],"zhí zhé":["慹"],"lóu lǚ":["慺","鷜"],còng:["憁","謥"],"zhī zhì":["憄","知","織","织"],chēng:["憆","摚","撐","撑","晿","柽","棦","橕","檉","泟","浾","琤","瞠","碀","緽","罉","蛏","蟶","赪","赬","鏿","鐣","阷","靗","頳","饓"],biē:["憋","虌","鱉","鳖","鼈","龞"],"chéng dèng zhèng":["憕"],"xǐ xī":["憘"],"duì dùn tūn":["憞"],"xiāo jiāo":["憢"],"xián xiàn":["憪"],"liáo liǎo":["憭","燎","爎","爒"],shéng:["憴","縄","繉","繩","绳","譝"],"náo nǎo náng":["憹"],"jǐng jìng":["憼"],"jǐ jiǎo":["憿"],"xuān huān":["懁"],"cǎo sāo sào":["懆"],mèn:["懑","懣","暪","焖","燜"],"mèng méng měng":["懜"],"ài yì nǐ":["懝"],"méng měng":["懞","瞢","矒"],"qí jī jì":["懠"],mǒ:["懡"],"lán xiàn":["懢"],"yōu yǒu":["懮"],"liú liǔ":["懰","藰"],ràng:["懹","譲","讓","让"],huān:["懽","欢","歓","歡","獾","讙","貛","酄","驩","鴅","鵍"],nǎn:["戁","揇","湳","煵","腩","蝻","赧"],"mí mó":["戂"],"gàng zhuàng":["戅","戆"],"zhuàng gàng":["戇"],"xū qu":["戌"],"xì hū":["戏","戯","戲"],"jiá gā":["戛"],zéi:["戝","蠈","賊","贼","鰂","鱡","鲗"],děng:["戥","等"],"hū xì":["戱"],chuō:["戳","踔","逴"],"biǎn piān":["扁"],"shǎng jiōng":["扄"],"shàn shān":["扇"],cái:["才","材","纔","裁","財","财"],"zhā zā zhá":["扎"],"lè lì cái":["扐"],"bā pá":["扒"],"dǎ dá":["打"],rēng:["扔"],"fǎn fú":["払"],"diǎo dí yuē lì":["扚"],"káng gāng":["扛"],"yū wū":["扜"],"yū wū kū":["扝"],"tuō chǐ yǐ":["扡"],"gǔ jié xì gē":["扢"],dèn:["扥","扽"],"sǎo sào":["扫","掃"],rǎo:["扰","擾","隢"],"xī chā qì":["扱"],"bān pān":["扳"],"bā ào":["扷"],"xī zhé":["扸"],"zhì sǔn kǎn":["扻"],zhǎo:["找","沼","瑵"],"kuáng wǎng zài":["抂"],"hú gǔ":["抇","鹄","鹘"],"bǎ bà":["把"],"dǎn shěn":["抌"],"nè nì ruì nà":["抐"],zhuā:["抓","檛","簻","膼","髽"],póu:["抔","裒"],"zhé shé zhē":["折"],"póu pōu fū":["抙","捊"],pāo:["抛","拋","脬","萢"],"ǎo ào niù":["抝"],"lūn lún":["抡","掄"],"qiǎng qiāng chēng":["抢"],"zhǐ zhǎi":["抧"],"bù pū":["抪","柨"],"yǎo tāo":["抭"],"hē hè qiā":["抲"],"nǐ ní":["抳"],"pī pēi":["抷"],"mǒ mò mā":["抹"],chōu:["抽","犨","犫","瘳","篘"],"jiā yá":["拁"],"fú bì":["拂","畐","鶝"],zhǎ:["拃","眨","砟","鮺","鲝"],"dān dàn dǎn":["担"],"chāi cā":["拆"],niān:["拈","蔫"],"lā lá lǎ là":["拉"],"bàn pàn":["拌"],pāi:["拍"],līn:["拎"],guǎi:["拐","枴","柺"],"tuò tà zhí":["拓"],"ào ǎo niù":["拗"],"jū gōu":["拘"],"pīn pàn fān":["拚"],"bài bái":["拜"],bài:["拝","敗","稗","粺","薭","贁","败","韛"],qiá:["拤"],"nǐng níng nìng":["拧"],"zé zhái":["择","擇"],hén:["拫","痕","鞎"],"kuò guā":["括"],"jié jiá":["拮"],nǐn:["拰"],shuān:["拴","栓","閂","闩"],"cún zùn":["拵"],"zā zǎn":["拶","桚"],kǎo:["拷","攷","栲","烤","考"],"yí chǐ hài":["拸"],"cè sè chuò":["拺"],"zhuài zhuāi yè":["拽"],"shí shè":["拾"],bāi:["挀","掰"],"kuò guāng":["挄"],nòng:["挊","挵","齈"],"jiào jiāo":["挍","敎","教"],"kuà kū":["挎"],"ná rú":["挐"],"tiāo tiǎo":["挑"],"dié shè":["挕"],liě:["挘","毟"],"yà yǎ":["挜","掗"],"wō zhuā":["挝"],"xié jiā":["挟","挾"],"dǎng dàng":["挡","擋"],"zhèng zhēng":["挣","正","症"],"āi ái":["挨"],"tuō shuì":["挩","捝"],"tǐ tì":["挮"],"suō shā":["挱"],"sā shā suō":["挲"],"kēng qiān":["挳","摼"],"bàng péng":["挷"],"ruó ruá":["挼"],"jiǎo kù":["捁"],"wǔ wú":["捂"],tǒng:["捅","桶","筒","筩","統","綂","统","㛚"],"huò chì":["捇"],"tú shū chá":["捈"],"lǚ luō":["捋"],"shāo shào":["捎","稍"],niē:["捏","揑"],"shù sǒng sōu":["捒"],"yé yú":["捓"],"jué zhuó":["捔"],"bù pú zhì":["捗"],zùn:["捘","銌"],lāo:["捞","撈","粩"],sǔn:["损","損","榫","笋","筍","箰","鎨","隼"],"wàn wǎn wān yù":["捥"],pěng:["捧","淎","皏"],shě:["捨"],"fǔ fù bǔ":["捬"],dáo:["捯"],"luò luǒ wǒ":["捰"],"juǎn quán":["捲"],"chēn tiǎn":["捵"],"niǎn niē":["捻"],"ruó wěi ré":["捼"],zuó:["捽","昨","秨","稓","筰","莋","鈼"],"wò xiá":["捾"],"qìng qiàn":["掅"],"póu pǒu":["掊"],qiā:["掐","葜"],"pái pǎi":["排"],"qiān wàn":["掔"],"yè yē":["掖"],"niè nǐ yì":["掜"],"huò xù":["掝"],"yàn shàn yǎn":["掞"],"zhěng dìng":["掟"],kòng:["控","鞚"],tuī:["推","蓷","藬"],"zōu zhōu chōu":["掫"],tiàn:["掭","舚"],kèn:["掯","裉","褃"],pá:["掱","杷","潖","爬","琶","筢"],"guó guāi":["掴"],"dǎn shàn":["掸","撣"],"chān xiān càn shǎn":["掺"],sāo:["掻","搔","溞","繅","缫","螦","騒","騷","鰠","鱢","鳋"],pèng:["掽","椪","槰","碰","踫"],"zhēng kēng":["揁"],"jiū yóu":["揂"],"jiān jiǎn":["揃","籛"],"pì chè":["揊"],"sāi zǒng cāi":["揌"],"tí dī dǐ":["提"],"zǒng sōng":["揔"],"huáng yóng":["揘"],"zǎn zuàn":["揝"],"xū jū":["揟"],"ké qiā":["揢"],"chuāi chuǎi chuài tuán zhuī":["揣"],"dì tì":["揥"],"lá là":["揦"],là:["揧","楋","溂","瓎","瘌","翋","臘","蝋","蝲","蠟","辢","辣","鑞","镴","鬎","鯻","𬶟"],"jiē qì":["揭"],"chòng dǒng":["揰"],"dié shé yè":["揲"],"jiàn qián jiǎn":["揵"],yé:["揶","爷","爺","瑘","鋣","鎁","铘"],chān:["搀","摻","攙","裧","襜","覘","觇","辿","鋓"],"gē gé":["搁","擱"],"lǒu lōu":["搂","摟"],"chōu zǒu":["搊"],chuāi:["搋"],sūn:["搎","槂","狲","猻","荪","蓀","蕵","薞","飧","飱"],"róng náng nǎng":["搑"],"péng bàng":["搒"],cuō:["搓","瑳","磋","蹉","遳","醝"],"kē è":["搕"],"nù nuò nòu":["搙"],"lā xié xiàn":["搚"],qiǔ:["搝","糗"],"xiǎn xiān":["搟"],"jié zhé":["搩"],"pán bān pó":["搫"],bān:["搬","攽","斑","斒","班","瘢","癍","肦","螁","螌","褩","辬","頒","颁","𨭉"],"zhì nái":["搱"],"wā wǎ wà":["搲"],huá:["搳","撶","滑","猾","蕐","螖","譁","鏵","铧","驊","骅","鷨"],"qiāng qiǎng chēng":["搶"],"tián shēn":["搷"],"ná nuò":["搻"],èn:["摁"],"shè niè":["摄","攝"],bìn:["摈","擯","殡","殯","膑","臏","髌","髕","髩","鬂","鬓","鬢"],"shā sà shǎi":["摋"],"chǎn sùn":["摌"],"jiū liú liáo jiǎo náo":["摎"],"féng pěng":["摓"],shuāi:["摔"],"dì tú zhí":["摕"],"qì jì chá":["摖"],"sōu sǒng":["摗"],"liǎn liàn":["摙"],"gài xì":["摡"],"hù chū":["摢"],tàng:["摥","烫","燙","鐋"],"nái zhì":["摨"],"mó mā":["摩"],"jiāng qiàng":["摪"],"áo qiáo":["摮"],"niè chè":["摰"],"mán màn":["摱"],"chàn cán":["摲"],"sè mí sù":["摵"],"biāo biào":["摽"],"juē jué":["撅"],piē:["撆","暼","氕","瞥"],"piě piē":["撇"],"zǎn zān zēn qián":["撍"],"sā sǎ":["撒"],hòng:["撔","訌","讧","闀","鬨"],"héng guàng":["撗"],niǎn:["撚","撵","攆","涊","焾","碾","簐","蹍","蹨","躎","輦","辇"],"chéng zhěng":["撜"],"huī wéi":["撝"],cāo:["撡","操","糙"],"xiāo sōu":["撨"],"liáo liāo":["撩"],"cuō zuǒ":["撮"],"wěi tuǒ":["撱"],cuān:["撺","攛","汆","蹿","躥","鑹","镩"],"qiào yāo jī":["撽"],"zhuā wō":["撾"],"lèi léi":["擂"],nǎng:["擃","攮","曩","灢"],"qíng jǐng":["擏"],kuǎi:["擓","蒯","㧟"],"pǐ bò":["擗"],"bò bāi":["擘"],"jù jǐ":["據"],mēng:["擝"],"sǒu sòu":["擞"],xǐng:["擤","箵","醒"],cā:["擦"],"níng nǐng nìng":["擰"],"zhì jié":["擳"],"là liè":["擸","爉"],"sòu sǒu":["擻"],"lì luò yuè":["擽"],"tī zhāi zhì":["擿"],pān:["攀","潘","眅","萠"],lèi:["攂","泪","涙","淚","禷","类","纇","蘱","酹","銇","錑","頛","頪","類","颣"],"cā sǎ":["攃"],"jùn pèi":["攈"],"lì luò":["攊","躒"],"là lài":["攋","櫴"],"lú luó":["攎"],"zǎn cuán":["攒"],"xiān jiān":["攕"],"mí mǐ mó":["攠"],"zǎn cuán zàn zuān":["攢"],zuàn:["攥"],"lì shài":["攦"],"lì luǒ":["攭"],"guǐ guì":["攱"],"jī qī yǐ":["攲"],fàng:["放"],"wù móu":["敄"],"chù shōu":["敊"],"gé guó è":["敋"],"duó duì":["敓","敚"],"duō què":["敠","敪"],"sàn sǎn":["散"],"dūn duì":["敦","镦"],"qī yǐ jī":["敧"],"xiào xué":["敩"],"shù shǔ shuò":["数","數"],"ái zhú":["敱","敳"],"xiòng xuàn":["敻"],"zhuó zhú":["斀"],"yì dù":["斁"],"lí tái":["斄"],"fěi fēi":["斐"],"yǔ zhōng":["斔"],"dòu dǒu":["斗"],"wò guǎn":["斡"],"tǒu tiǎo":["斢"],dòu:["斣","梪","浢","痘","窦","竇","脰","荳","豆","逗","郖","酘","閗","闘","餖","饾","鬥","鬦","鬪","鬬","鬭"],"yín zhì":["斦"],"chǎn jiè":["斺"],"wū yū yú":["於"],"yóu liú":["斿"],"páng bàng":["旁"],"máo mào":["旄"],"pī bì":["旇"],"xuán xuàn":["旋"],"wú mó":["无"],zǎo:["早","枣","栆","棗","澡","璪","薻","藻","蚤"],gā:["旮"],"gàn hàn":["旰"],"tái yīng":["旲"],"xū xù":["旴"],"tūn zhùn":["旽"],"wù wǔ":["旿"],"pò pèi":["昢"],zòng:["昮","猔","疭","瘲","粽","糉","糭","縦"],ǎi:["昹","毐","矮","蔼","藹","譪","躷","霭","靄"],"huàng huǎng":["晃"],xuǎn:["晅","癣","癬","选","選"],"xù kuā":["晇"],hǒng:["晎"],shài:["晒","曬"],"yūn yùn":["晕","煴"],"shèng chéng":["晟","椉","盛"],"jǐng yǐng":["景"],shǎn:["晱","熌","睒","覢","閃","闪","陕","陝"],"qǐ dù":["晵"],"ǎn àn yǎn":["晻"],"wǎng wàng":["暀"],zàn:["暂","暫","瓉","瓒","瓚","禶","襸","讃","讚","賛","贊","赞","蹔","鄼","錾","鏨","饡"],"yùn yūn":["暈"],"mín mǐn":["暋"],"dǔ shǔ":["暏"],shǔ:["暑","曙","潻","癙","糬","署","薥","薯","藷","蜀","蠴","襡","襩","鱪","鱰","黍","鼠","鼡"],"jiǎn lán":["暕"],nuǎn:["暖","煗","餪"],"bào pù":["暴"],"xī xǐ":["暿"],"pù bào":["曝","瀑"],"qū qǔ":["紶"],"qǔ qū":["曲"],"gèng gēng":["更"],"hū hù":["曶","雽"],"zēng céng":["曽","橧"],"céng zēng":["曾","竲"],"cǎn qián jiàn":["朁"],"qiè hé":["朅"],"bì pí":["朇","禆","笓","裨"],"yǒu yòu":["有"],"bān fén":["朌","鳻"],"fú fù":["服","洑"],"fěi kū":["朏","胐"],"qú xù chǔn":["朐"],"juān zuī":["朘"],"huāng máng wáng":["朚"],"qī jī":["期"],"tóng chuáng":["朣","橦"],zhá:["札","牐","箚","蚻","譗","鍘","铡","閘","闸"],"zhú shù shú":["朮"],"shù shú zhú":["术"],"zhū shú":["朱"],"pǔ pò pō piáo":["朴"],"dāo tiáo mù":["朷"],"guǐ qiú":["朹"],xiǔ:["朽","滫","潃","糔"],"chéng chēng":["朾"],zá:["杂","沯","砸","襍","雑","雜","雥","韴"],"yú wū":["杅"],"gān gǎn":["杆"],"chā chà":["杈"],"shān shā":["杉"],cūn:["村","皴","竴","膥","踆","邨"],"rèn ér":["杒","梕"],"sháo biāo":["杓"],"dì duò":["杕","枤"],"gū gài":["杚"],"yí zhì lí duò":["杝"],"gàng gāng":["杠"],"tiáo tiāo":["条","條"],"mà mǎ":["杩"],"sì zhǐ xǐ":["杫"],"yuán wán":["杬","蚖"],"bèi fèi":["杮"],"shū duì":["杸"],"niǔ chǒu":["杻"],"wò yuè":["枂","臒"],máo:["枆","毛","氂","渵","牦","矛","罞","茅","茆","蝥","蟊","軞","酕","鉾","錨","锚","髦","鶜"],"pī mì":["枈"],àng:["枊","盎","醠"],"fāng bìng":["枋"],"hù dǐ":["枑"],xín:["枔","襑","鐔","鬵"],"yāo yǎo":["枖"],"ě è":["枙"],"zhī qí":["枝"],"cōng zōng":["枞","樅"],"xiān zhēn":["枮"],"tái sì":["枱"],"gǒu jǔ gōu":["枸"],"bāo fú":["枹"],"yì xiè":["枻","栧"],"tuó duò":["柁","馱","駄","驮"],"yí duò lí":["柂"],"nǐ chì":["柅"],"pán bàn":["柈","跘"],"yǎng yàng yāng yīng":["柍"],"fù fū fǔ":["柎"],"bǎi bó bò":["柏"],mǒu:["某"],"sháo shào":["柖"],zhè:["柘","樜","浙","淛","蔗","蟅","這","鷓","鹧","䗪"],"yòu yóu":["柚","櫾"],"guì jǔ":["柜"],"zhà zuò":["柞"],"dié zhì":["柣","眰"],"zhā zǔ zū":["柤"],"chá zhā":["查","査"],"āo ào":["柪","軪"],"bā fú pèi bó biē":["柭"],"duò zuó wù":["柮"],"bì bié":["柲"],"zhù chù":["柷"],"bēi pēi":["柸"],"shì fèi":["柹"],"shān zhà shi cè":["栅"],"lì yuè":["栎","櫟"],"qì qiè":["栔","砌"],"qī xī":["栖","蹊"],"guā kuò":["栝"],"bīng bēn":["栟"],"xiào jiào":["校"],"jiàn zùn":["栫","袸"],"yǒu yù":["栯"],"hé hú":["核"],gēn:["根","跟"],"zhī yì":["栺"],"gé gē":["格"],"héng háng":["桁"],"guàng guāng":["桄"],"yí tí":["桋","荑"],sāng:["桑","桒","槡"],"jú jié":["桔"],"yú móu":["桙"],"ráo náo":["桡","橈"],"guì huì":["桧","檜"],"chén zhèn":["桭"],"tīng yíng":["桯"],"bó po":["桲"],"bèn fàn":["桳"],"fēng fèng":["桻","葑"],"sù yìn":["梀"],"tǐng tìng":["梃"],"xuān juān xié":["梋"],"tú chá":["梌"],"āo yòu":["梎"],kuǎn:["梡","欵","款","歀"],"shāo sào":["梢"],"qín chén cén":["梣"],"lí sì qǐ":["梩"],"chān yán":["梴"],"bīn bīng":["梹","槟","檳"],"táo chóu dào":["梼"],"cōng sōng":["棇"],"gùn hùn":["棍"],"dé zhé":["棏"],"pái bèi pèi":["棑"],"bàng pǒu bèi bēi":["棓"],"dì dài tì":["棣"],sēn:["森","椮","槮","襂"],"rěn shěn":["棯"],"léng lēng líng":["棱"],"fú sù":["棴"],"zōu sǒu":["棷"],zōu:["棸","箃","緅","諏","诹","邹","郰","鄒","鄹","陬","騶","驺","鯫","鲰","黀","齱","齺"],"zhào zhuō":["棹"],"chēn shēn":["棽"],"jiē qiè":["椄"],"yǐ yī":["椅"],"chóu zhòu diāo":["椆"],"qiāng kōng":["椌"],"zhuī chuí":["椎"],"bēi pí":["椑"],mēn:["椚"],"quān juàn quán":["椦"],"duǒ chuán":["椯"],"wěi huī":["椲"],"jiǎ jiā":["椵"],"hán jiān":["椷"],"shèn zhēn":["椹"],"yàn yà":["椻"],"zhā chá":["楂"],"guō kuǎ":["楇"],"jí zhì":["楖"],"kǔ hù":["楛"],"yóu yǒu":["楢"],"sǒng cōng":["楤"],"yuán xuàn":["楥"],"yǎng yàng yīng":["楧"],pián:["楩","胼","腁","賆","蹁","駢","騈","骈","骿","㛹"],"dié yè":["楪"],"dùn shǔn":["楯"],"còu zòu":["楱"],"dì dǐ shì":["楴"],"kǎi jiē":["楷"],"róu ròu":["楺"],"lè yuè":["楽"],"wēn yùn":["榅","鞰"],lǘ:["榈","櫚","氀","膢","藘","閭","闾","驢","驴"],shén:["榊","神","鉮","鰰","𬬹"],"bī pi":["榌"],"zhǎn niǎn zhèn":["榐"],"fú fù bó":["榑"],"jiàn jìn":["榗"],"bǎng bàng":["榜"],"shā xiè":["榝","樧"],nòu:["槈","耨","鎒","鐞"],"qiǎn lián xiàn":["槏"],gàng:["槓","焵","焹","筻","鿍"],gāo:["槔","槹","橰","櫜","睾","篙","糕","羔","臯","韟","餻","高","髙","鷎","鷱","鼛"],"diān zhěn zhēn":["槙"],"kǎn jiàn":["槛"],"xí dié":["槢"],"jī guī":["槣"],"róng yōng":["槦"],"tuán shuàn quán":["槫"],"qì sè":["槭"],"cuī zhǐ":["槯"],"yǒu chǎo":["槱"],"màn wàn":["槾"],"lí chī":["樆"],"léi lěi":["樏","櫑","礌"],"cháo jiǎo chāo":["樔"],"chēng táng":["樘"],"jiū liáo":["樛"],"mó mú":["模"],"niǎo mù":["樢"],"héng hèng":["横","橫"],xuě:["樰","膤","艝","轌","雪","鱈","鳕"],"fá fèi":["橃"],rùn:["橍","润","潤","膶","閏","閠","闰"],"zhǎn jiǎn":["橏"],shùn:["橓","瞚","瞬","舜","蕣","順","顺","鬊"],"tuí dūn":["橔"],"táng chēng":["橖"],"sù qiū":["橚"],"tán diàn":["橝"],"fén fèn fèi":["橨"],"rǎn yān":["橪"],"cū chu":["橻"],"shū qiāo":["橾"],"píng bò":["檘"],"zhái shì tú":["檡"],"biǎo biāo":["檦"],"qiān lián":["檶"],"nǐ mí":["檷"],"jiàn kǎn":["檻"],"nòu ruǎn rú":["檽"],"jī jì":["櫅","禨"],"huǎng guǒ gǔ":["櫎"],"lǜ chū":["櫖"],"miè mèi":["櫗"],ōu:["櫙","欧","歐","殴","毆","瓯","甌","膒","藲","謳","讴","鏂","鴎","鷗","鸥"],"zhù zhuó":["櫡"],"jué jì":["櫭"],"huái guī":["櫰"],"chán zhàn":["欃"],"wéi zuì":["欈"],cáng:["欌","鑶"],"yù yì":["欥"],"chù qù xì":["欪"],"kài ài":["欬"],"yì yīn":["欭"],"xì kài":["欯"],"shuò sòu":["欶"],"ǎi ēi éi ěi èi ê̄ ế ê̌ ề":["欸"],"qī yī":["欹"],"chuā xū":["欻"],"chǐ chuài":["欼"],"kǎn qiàn":["欿"],"kǎn kè":["歁"],"chuǎn chuán":["歂"],"yīn yān":["歅"],"jìn qūn":["歏"],pēn:["歕"],"xū chuā":["歘"],"xī shè":["歙"],"liǎn hān":["歛"],"zhì chí":["歭"],"sè shà":["歰"],sǐ:["死"],"wěn mò":["歾"],piǎo:["殍","皫","瞟","醥","顠"],"qíng jìng":["殑"],"fǒu bó":["殕"],"zhí shi":["殖"],"yè yān yàn":["殗"],"hūn mèi":["殙"],chòu:["殠","臰","遚"],"kuì huì":["殨","溃","潰"],cuàn:["殩","熶","爨","窜","竄","篡","簒"],"yīn yān yǐn":["殷"],"qìng kēng shēng":["殸"],"yáo xiáo xiào":["殽"],"gū gǔ":["毂","蛄"],"guàn wān":["毌"],"dú dài":["毒"],"xún xùn":["毥"],mú:["毪","氁"],"dòu nuò":["毭"],"sāi suī":["毸"],lu:["氇"],sào:["氉","瘙","矂","髞"],"shì zhī":["氏"],"dī dǐ":["氐"],"máng méng":["氓"],"yáng rì":["氜"],shuǐ:["水","氵","氺","閖"],"zhěng chéng zhèng":["氶"],tǔn:["氽"],"fán fàn":["氾"],"guǐ jiǔ":["氿"],"bīn pà pā":["汃"],"zhuó què":["汋"],"dà tài":["汏"],pìn:["汖","牝","聘"],"hàn hán":["汗","馯"],tu:["汢"],"tāng shāng":["汤","湯"],"zhī jì":["汥"],"gàn hán cén":["汵"],"wèn mén":["汶"],"fāng pāng":["汸"],"hǔ huǎng":["汻"],"niú yóu":["汼"],hàng:["沆"],"shěn chén":["沈"],"dùn zhuàn":["沌"],"nǜ niǔ":["沑"],"méi mò":["沒","没"],"tà dá":["沓"],"mì wù":["沕"],"hóng pāng":["沗"],"shā shà":["沙"],"zhuǐ zǐ":["沝"],"ōu òu":["沤","漚"],"jǔ jù":["沮"],"tuō duó":["沰"],"mǐ lì":["沵"],"yí chí":["沶"],"xiè yì":["泄"],"bó pō":["泊"],"mì bì":["泌","秘"],"chù shè":["泏"],"yōu yòu āo":["泑"],"pēng píng":["泙","硑"],"pào pāo":["泡"],"ní nì":["泥","秜"],"yuè sà":["泧"],"jué xuè":["泬","疦"],"lóng shuāng":["泷","瀧"],"luò pō":["泺","濼"],"zé shì":["泽","澤"],"sǎ xǐ":["洒"],"sè qì zì":["洓"],"xǐ xiǎn":["洗"],"kǎo kào":["洘"],"àn yàn è":["洝"],"lěi lèi":["洡"],"qiè jié":["洯"],"qiǎn jiān":["浅"],"jì jǐ":["济","済","濟","纪"],"hǔ xǔ":["浒","滸"],"jùn xùn":["浚","濬"],"yǐng chéng yíng":["浧"],"liàn lì":["浰"],"féng hóng":["浲","溄"],"jiǒng jiōng":["浻"],"suī něi":["浽"],"yǒng chōng":["涌"],"tūn yūn":["涒"],"wō guō":["涡","渦"],hēng:["涥","脝"],"zhǎng zhàng":["涨","漲"],"shòu tāo":["涭"],shuàn:["涮","腨"],"kōng náng":["涳"],"wò wǎn yuān":["涴"],"tuō tuò":["涶"],wō:["涹","猧","窝","窩","莴","萵","蜗","蝸","踒"],"qiè jí":["淁"],"guǒ guàn":["淉"],"lín lìn":["淋","獜","疄"],"tǎng chǎng":["淌"],"nào chuò zhuō":["淖"],"péng píng":["淜"],féi:["淝","肥","腓","蜰"],"pì pèi":["淠"],"niǎn shěn":["淰"],"biāo hǔ":["淲"],"chún zhūn":["淳"],"hùn hún":["混"],qiǎn:["淺","繾","缱","肷","膁","蜸","譴","谴","遣","鑓"],"wèn mín":["渂"],"rè ruò luò":["渃"],"dú dòu":["渎","瀆","读"],"jiàn jiān":["渐","溅","漸","濺"],"miǎn shéng":["渑","澠"],"nuǎn nuán":["渜"],"qiú wù":["渞"],"tíng tīng":["渟"],"dì tí dī":["渧"],"gǎng jiǎng":["港"],"hōng qìng":["渹"],tuān:["湍","煓"],"huì mǐn xū":["湏"],"xǔ xù":["湑"],pén:["湓","瓫","盆","葐"],"mǐn hūn":["湣"],"tuàn nuǎn":["湪"],"qiū jiǎo":["湫","湬"],"yān yīn":["湮"],"bàn pán":["湴"],"zhuāng hún":["湷"],"yàn guì":["溎"],"lián liǎn nián xián xiàn":["溓"],"dá tǎ":["溚","鿎"],"liū liù":["溜","澑","蹓"],lùn:["溣"],mǎ:["溤","犸","獁","玛","瑪","码","碼","遤","鎷","馬","马","鰢","鷌"],"zhēn qín":["溱"],"nì niào":["溺"],"chù xù":["滀","畜"],"wěng wēng":["滃"],"hào xuè":["滈"],"qì xì xiē":["滊"],"xíng yíng":["滎"],"zé hào":["滜"],"piāo piào piǎo":["漂"],"cóng sǒng":["漎"],"féng péng":["漨"],"luò tà":["漯"],"pēng bēn":["漰"],"chóng shuāng":["漴"],"huǒ kuò huò":["漷"],"liáo liú":["漻"],"cuǐ cuī":["漼"],"cóng zǒng":["潀"],"cóng zōng":["潈"],"pì piē":["潎"],"dàng xiàng":["潒"],"huáng guāng":["潢"],"liáo lào lǎo":["潦"],"cōng zòng":["潨"],"zhí zhì":["潪"],"tān shàn":["潬"],"tú zhā":["潳"],"sàn sǎ":["潵"],hēi:["潶","黑","黒","𬭶"],"chéng dèng":["澄","瀓"],"cūn cún":["澊"],"péng pēng":["澎"],"hòng gǒng":["澒","銾"],"wàn màn":["澫"],"kuài huì":["澮"],"guō wō":["濄"],"pēn fén":["濆"],"jí shà":["濈"],"huì huò":["濊"],"dǐng tìng":["濎"],"mǐ nǐ":["濔"],"bì pì":["濞"],"cuì zuǐ":["濢"],"hù huò":["濩"],"ǎi kài kè":["濭"],"wěi duì":["濻","瀢"],"zàn cuán":["濽","灒"],"yǎng yàng":["瀁"],"wǎng wāng":["瀇"],"mò miè":["瀎","眜"],suǐ:["瀡","膸","髓"],"huái wāi":["瀤"],"zùn jiàn":["瀳"],"yīng yǐng yìng":["瀴"],"ráng ràng":["瀼"],shuàng:["灀"],"zhuó jiào zé":["灂"],sǎ:["灑","訯","靸"],"luán luàn":["灓"],"dǎng tǎng":["灙"],"xún quán quàn":["灥"],"huǒ biāo":["灬"],"zhà yù":["灹"],"fén bèn":["炃"],"jiǒng guì":["炅"],"pàng fēng":["炐"],quē:["炔","缺","缼","蒛"],biān:["炞","煸","甂","砭","笾","箯","籩","編","编","蝙","邉","邊","鍽","鞭","鯾","鯿","鳊"],"zhāo zhào":["炤"],"zhuō chù":["炪"],"pào páo bāo":["炮"],"páo fǒu":["炰"],"shǎn qián shān":["炶"],"zhà zhá":["炸"],"jiǎo yào":["烄"],quǎn:["烇","犬","犭","畎","綣","绻","虇"],"yàng yáng":["烊"],"lào luò":["烙"],"huí huǐ":["烠"],rè:["热","熱"],"fú páo":["烰"],"xiè chè":["烲","焎"],"yàn shān":["烻"],"hūn xūn":["焄"],kào:["焅","犒","銬","铐","靠","鮳","鯌","鲓","㸆"],"juān yè":["焆"],"jùn qū":["焌"],"tāo dào":["焘"],"chǎo jù":["焣"],"wò ài":["焥"],"zǒng cōng":["焧"],"xī yì":["焬"],"xìn xīn":["焮"],"chāo zhuō":["焯"],"xiǒng yīng":["焸","焽"],kuǐ:["煃","跬","蹞","頍","𫠆"],"huī yùn xūn":["煇"],"jiǎo qiāo":["煍"],"qián shǎn shān":["煔"],"xī yí":["煕"],"shà shā":["煞"],"yè zhá":["煠"],"yáng yàng":["煬"],"ēn yūn":["煾"],"yūn yǔn":["熅"],"hè xiāo":["熇"],xióng:["熊","熋","雄"],"xūn xùn":["熏","爋"],gòng:["熕","貢","贡"],liū:["熘"],"cōng zǒng":["熜"],"lù āo":["熝"],"shú shóu":["熟"],"fēng péng":["熢"],"cuǐ suī":["熣"],tēng:["熥","膯","鼟"],"yùn yù":["熨"],"áo āo":["熬"],"hàn rǎn":["熯"],"ōu ǒu":["熰"],"huáng huǎng":["熿"],"chǎn dǎn chàn":["燀"],"jiāo zhuó qiáo jué":["燋"],"yàn yān":["燕"],"tài liè":["燤"],āo:["爊"],"yàn xún":["爓"],"jué jiào":["爝","覐","覚","覺","觉"],"lǎn làn":["爦"],"zhuǎ zhǎo":["爪"],"zhǎo zhuǎ":["爫"],"fù fǔ":["父"],diē:["爹","褺","跌"],zāng:["牂","羘","臧","賍","賘","贓","贜","赃","髒"],"piàn piān":["片"],"biān miàn":["牑"],bǎng:["牓","綁","绑"],"yǒu yōng":["牗"],"chēng chèng":["牚","竀"],niú:["牛","牜"],"jiū lè":["牞"],"mù móu":["牟"],māng:["牤"],"gē qiú":["牫"],"yòu chōu":["牰"],"tè zhí":["犆"],bēn:["犇","錛","锛"],"jiān qián":["犍","玪"],má:["犘","痲","蔴","蟇","麻"],"máo lí":["犛"],"bá quǎn":["犮"],"zhuó bào":["犳"],"àn hān":["犴"],"kàng gǎng":["犺"],"pèi fèi":["犻"],"fān huān":["犿"],kuáng:["狂","狅","誑","诳","軖","軠","鵟","𫛭"],"yí quán chí":["狋"],"xīng shēng":["狌"],"tuó yí":["狏"],kǔ:["狜","苦"],"huán huān":["狟"],"hé mò":["狢"],"tà shì":["狧"],"máng dòu":["狵"],"xī shǐ":["狶"],suān:["狻","痠","酸"],"bài pí":["猈"],"jiān yàn":["猏","豣"],"yī yǐ":["猗"],"yá wèi":["猚"],cāi:["猜"],"māo máo":["猫","貓"],"chuàn chuān":["猭"],"tuān tuàn":["猯","貒"],"yà jiá qiè":["猰"],"hè xiē gé hài":["猲"],"biān piàn":["猵","獱"],"bó pò":["猼"],"háo gāo":["獋"],"fén fèn":["獖"],"yào xiāo":["獟"],"shuò xī":["獡"],"gé liè xiē":["獦"],"nòu rú":["獳"],"náo nǎo yōu":["獶"],ráng:["獽","瓤","禳","穣","穰","蘘","躟","鬤"],"náo yōu":["獿"],"lǜ shuài":["率"],"wáng wàng":["王"],"yáng chàng":["玚"],"mín wén":["玟"],"bīn fēn":["玢"],"mén yǔn":["玧"],"qiāng cāng":["玱","瑲","篬"],"án gān":["玵"],"xuán xián":["玹"],"cī cǐ":["玼","跐"],"yí tāi":["珆"],"zǔ jù":["珇"],fà:["珐","琺","蕟","髪","髮"],"yín kèn":["珢"],"huī hún":["珲"],"xuán qióng":["琁"],"fú fū":["琈"],"bǐng pín":["琕"],"cuì sè":["琗"],"yù wéi":["琟"],"tiǎn tiàn":["琠"],"zhuó zuó":["琢"],"běng pěi":["琣"],guǎn:["琯","璭","痯","筦","管","舘","輨","錧","館","馆","鳤"],"hún huī":["琿"],"xié jiē":["瑎"],"chàng dàng yáng":["瑒"],"tiàn zhèn":["瑱"],"bīn pián":["瑸","璸"],"tú shū":["瑹"],cuǐ:["璀","皠","趡"],"zǎo suǒ":["璅"],"jué qióng":["璚"],"lú fū":["璷"],"jì zī":["璾"],suí:["瓍","綏","绥","遀","随","隨","髄"],"mí xǐ":["瓕"],"qióng wěi wèi":["瓗"],"huán yè yà":["瓛"],"bó páo":["瓟"],"zhí hú":["瓡"],piáo:["瓢","闝"],"wǎ wà":["瓦"],"xiáng hóng":["瓨"],wèng:["瓮","甕","罋","蕹","齆"],"shèn shén":["甚"],ruí:["甤","緌","蕤"],yòng:["用","砽","苚","蒏","醟","㶲"],shuǎi:["甩"],béng:["甭","甮"],"yóu zhá":["甴"],"diàn tián shèng":["甸"],"tǐng dīng":["町","甼"],"zāi zī":["甾"],"bì qí":["畁"],"dá fú":["畗"],"cè jì":["畟"],"zāi zī tián":["畠"],"zhì chóu shì":["畤"],"fān pān":["畨","番"],"shē yú":["畬"],"dāng dàng dǎng":["當"],"jiāng qiáng":["疆"],"pǐ yǎ shū":["疋"],"jié qiè":["疌"],"yí nǐ":["疑"],nè:["疒","眲","訥","讷"],"gē yì":["疙"],"nüè yào":["疟","瘧"],"lì lài":["疠","癘"],"yǎ xiā":["疨"],xuē:["疶","蒆","薛","辥","辪","靴","鞾"],"dǎn da":["疸"],"fá biǎn":["疺"],"fèi féi":["疿","痱"],"shān diàn":["痁"],"téng chóng":["痋"],"tōng tóng":["痌"],"wěi yòu yù":["痏"],"tān shǐ":["痑"],"pū pù":["痡","鋪"],"bēng péng":["痭"],"má lìn":["痳"],"tiǎn diàn":["痶"],"ān yè è":["痷"],"kē ē":["痾"],"zhì chì":["瘈"],"jiǎ xiá xiā":["瘕"],"lěi huì":["瘣"],"chài cuó":["瘥"],"diān chēn":["瘨"],"da dá":["瘩"],"biě biē":["瘪"],qué:["瘸"],"dàn dān":["癉"],"guì wēi":["癐"],"nòng nóng":["癑"],"biē biě":["癟"],"bō bǒ":["癷"],bái:["白"],"jí bī":["皀"],"de dì dí dī":["的"],"pā bà":["皅"],"gāo háo":["皋"],"gāo yáo":["皐"],"lì luò bō":["皪"],"zhā cǔ":["皻"],"zhāo zhǎn dǎn":["皽"],"jiān jiàn":["监","監","鋻","间","鞬"],"gài gě hé":["盖"],"máng wàng":["盳"],yuǎn:["盶","逺","遠"],"tián xián":["盷"],"xiāng xiàng":["相"],dǔn:["盹","趸","躉"],"xì pǎn":["盻"],"shěng xǐng":["省"],"yún hùn":["眃"],"miǎn miàn":["眄"],"kàn kān":["看"],"yìng yāng yǎng":["眏"],"yǎo āo ǎo":["眑"],"jū xū kōu":["眗"],"yí chì":["眙"],"dié tì":["眣"],"bǐng fǎng":["眪"],"pàng pán":["眫"],"mī mí":["眯","瞇"],"xuàn shùn xún":["眴"],tiào:["眺","粜","糶","覜","趒"],"zhe zhuó zháo zhāo":["着"],"qiáo shào xiāo":["睄"],"cuó zhuài":["睉"],gùn:["睔","謴"],"suì zuì":["睟"],"pì bì":["睥","稫","辟"],"yì zé gāo":["睪"],"xǐng xìng":["睲"],"guì wèi kuì":["瞆"],"kòu jì":["瞉"],"qióng huán":["瞏"],"mán mén":["瞒","瞞"],"diāo dōu":["瞗"],"lou lóu lǘ":["瞜"],"shùn rún":["瞤"],"liào liǎo":["瞭","钌"],"jiàn xián":["瞯"],"wǔ mí":["瞴"],"guì kuì":["瞶"],"nǐng chēng":["矃"],"huò yuè":["矆"],"mēng méng":["矇"],"kuàng guō":["矌"],"guàn quán":["矔"],"mǎn mán":["矕"],"jīn guān qín":["矜"],"jīn qín guān":["矝"],"yù xù jué":["矞"],"jiǎo jiáo":["矫","矯"],duǎn:["短"],"shí dàn":["石"],"gāng qiāng kòng":["矼"],"huā xū":["砉"],"pīn bīn fēn":["砏"],"yán yàn":["研","硏"],"luǒ kē":["砢"],"fú fèi":["砩","笰"],"zhǔ zhù":["砫"],"lá lì lā":["砬"],"kuāng guāng":["硄"],"gè luò":["硌"],"shuò shí":["硕","碩"],"wèi wéi ái":["硙"],"què kè kù":["硞"],"mǎng bàng":["硥"],"luò lòng":["硦"],"yǒng tóng":["硧"],nüè:["硸","虐"],"kēng kěng":["硻"],"yān yǎn":["硽"],"zhuì chuí duǒ":["硾"],"kōng kòng":["硿"],"zòng cóng":["碂"],"jiān zhàn":["碊"],"lù liù":["碌","陆"],"què xī":["碏"],"lún lǔn lùn":["碖"],"náo gāng":["碙"],"jié yà":["碣"],"wèi wěi":["碨"],"tí dī":["碮"],"chá chā":["碴"],"qiāo què":["碻"],"sù xiè":["碿"],"liú liù":["磂","遛","鎦","馏"],"sī tí":["磃"],"bàng páng":["磅"],"huá kě gū":["磆"],"wěi kuǐ":["磈"],"xiá qià yà":["磍"],"lián qiān":["磏"],"wèi ái gài":["磑"],"lá lā":["磖"],"áo qiāo":["磝"],"pēng pèng":["磞","閛"],"yīn yǐn":["磤"],"lěi léi":["磥"],"mó mò":["磨"],"qì zhú":["磩"],"láo luò":["磱"],"pán bō":["磻"],"jí shé":["磼"],"hé qiāo qiào":["礉"],"kè huò":["礊"],"què hú":["礐"],"è qì":["礘"],cǎ:["礤","礸"],"xián xín":["礥"],"léi lěi lèi":["礧"],"yán yǎn":["礹"],"qí zhǐ":["祇","蚔"],"bēng fāng":["祊"],"bì mì":["祕"],suàn:["祘","笇","筭","算","蒜"],"piào piāo":["票"],"jì zhài":["祭"],"shuì lèi":["祱"],"jìn jīn":["禁"],"chán shàn":["禅"],"yáng shāng":["禓"],"zhī zhǐ tí":["禔"],"shàn chán":["禪"],"yú yù ǒu":["禺"],"zǐ zì":["秄"],"chá ná":["秅"],"zhǒng zhòng chóng":["种"],"hào mào":["秏"],"kù kū":["秙"],zū:["租","葅"],chèng:["秤","穪"],"huó kuò":["秮","秳"],"chēng chèn chèng":["称","稱"],"shì zhì":["秲","銴"],"fù pū":["秿"],"xùn zè":["稄"],"tú shǔ":["稌"],"zhùn zhǔn":["稕"],"jī qí":["稘","綨","觭"],"léng líng":["稜"],"zuì zú sū":["稡"],"xì qiè":["稧","郄"],"zhǒng zhòng":["種"],"zōng zǒng":["稯"],"xián jiān liàn":["稴"],"zī jiū":["稵"],"jī qǐ":["稽"],ròng:["穃"],"shān cǎn cēn":["穇"],"mén méi":["穈"],"jǐ jì":["穖"],"xiāo rào":["穘"],"zhuō bó":["穛"],"tóng zhǒng zhòng":["穜"],zuō:["穝"],"biāo pāo":["穮","藨"],"zhuō jué":["穱"],"cuán zàn":["穳"],"kōng kòng kǒng":["空"],"yū yǔ":["穻"],zhǎi:["窄","鉙"],báo:["窇","雹"],"kū zhú":["窋"],"jiào liáo liù":["窌"],"wā guī":["窐"],"tiǎo yáo":["窕"],"xūn yìn":["窨"],"yà yē":["窫"],"tián diān yǎn":["窴"],"chāo kē":["窼"],"kuǎn cuàn":["窽","窾"],"chù qì":["竐"],"qǔ kǒu":["竘"],"jìng zhěn":["竧"],"kǎn kàn":["竷"],"zhú dǔ":["竺"],"lè jīn":["竻"],"zhuì ruì":["笍"],"háng hàng":["笐"],"cén jìn hán":["笒"],"dā xiá nà":["笚"],"zé zuó":["笮"],"lóng lǒng":["笼","篭","籠","躘","龓"],"zhù zhú":["筑","築"],"dá dā":["答","荅"],shāi:["筛","篩","簁","籭"],"yún jūn":["筠"],"láng làng":["筤","郎","阆"],"zhì zhǐ":["筫"],o:["筽"],"póu bù fú pú":["箁"],"pái bēi":["箄"],gè:["箇","虼","鉻","铬"],"tái chí":["箈"],"guǎi dài":["箉"],"zhào dào":["箌"],"jīng qìng":["箐"],"lín lǐn":["箖"],"jùn qūn":["箘"],"shī yí":["箷","釶"],"yuē yào chuò":["箹"],"xiāo shuò qiào":["箾"],"gōng gǎn lǒng":["篢"],"páng péng":["篣"],"zhuó huò":["篧"],"jiǎn jiān":["篯"],"dí zhú":["篴"],"zān cēn cǎn":["篸"],"zhuàn suǎn zuàn":["篹"],"piǎo biāo":["篻"],"guó guì":["簂"],"cè jí":["簎"],"mì miè":["簚"],"shāi sī":["簛"],"sǔn zhuàn":["簨"],"gàn gǎn":["簳"],"bò bǒ":["簸"],"bó bù":["簿"],shi:["籂"],"zhēn jiān":["籈"],"zhuàn zuǎn":["籑"],"fān pān biān":["籓"],"sǒu shǔ":["籔"],zuǎn:["籫","繤","纂","纉","纘","缵"],nǚ:["籹","釹","钕"],"shā chǎo":["粆"],"kāng jīng":["粇"],fěn:["粉","黺"],cū:["粗","觕","麁","麄","麤"],"nián zhān":["粘"],"cè sè":["粣"],"zhōu yù":["粥"],"shēn sǎn":["糁"],"biān biǎn":["糄","萹"],miàn:["糆","面","靣","麪","麫","麵","麺"],"hú hū hù":["糊"],"gǔ gòu":["糓"],"mí méi":["糜"],"sǎn shēn":["糝","糣"],zāo:["糟","蹧","遭","醩"],"mì sī":["糸"],"jiū jiǔ":["糺"],"xì jì":["系","繫"],"zhēng zhěng":["糽"],"chà chǎ":["紁","衩"],"yuē yāo":["約","约"],"hóng gōng":["紅","红"],"hé gē":["紇","纥"],"wén wèn":["紋","纹"],fóu:["紑"],"jì jié jiè":["紒"],"pī pí bǐ":["紕","纰"],"jīn jìn":["紟"],"zhā zā":["紥","紮"],hā:["紦"],"fū fù":["紨"],"chōu chóu":["紬"],"lèi léi lěi":["累"],"bō bì":["紴"],"tiǎn zhěn":["紾"],"jiōng jiǒng":["絅"],"jié jiē":["結","结","节"],"guà kuā":["絓"],"bǎi mò":["絔"],"gēng huán":["絙"],"jié xié":["絜"],"quán shuān":["絟"],"gǎi ǎi":["絠"],"luò lào":["絡","络"],"bīng bēng pēng":["絣"],"gěi jǐ":["給","给"],"tóng tōng dòng":["絧"],"tiào diào dào":["絩"],"lěi lèi léi":["絫"],"gāi hài":["絯"],"chī zhǐ":["絺"],"wèn miǎn mán wàn":["絻"],"huán huàn wàn":["綄"],"qīn xiān":["綅"],"tì tí":["綈"],"yán xiàn":["綖"],"zōng zèng zòng":["綜"],"chēn lín":["綝"],"zhǔn zhùn":["綧"],"qiàn qīng zhēng":["綪"],"qìng qǐ":["綮"],"lún guān":["綸","纶"],"chuò chāo":["綽","绰"],"tián tǎn chān":["緂"],"lǜ lù":["緑","绿"],"ruǎn ruàn":["緛"],"jí qī":["緝"],"zhòng chóng":["緟","重"],"miáo máo":["緢"],"xiè yè":["緤"],huǎn:["緩","缓","㬊"],"gēng gèng":["緪","縆"],"tōu xū shū":["緰"],"zōng zòng":["緵","繌"],"yùn gǔn":["緷"],"guā wō":["緺"],"yùn yūn wēn":["緼","縕"],"bāng bàng":["縍"],"gǔ hú":["縎","鶻"],"cī cuò suǒ":["縒"],"cuī shuāi":["縗"],"róng rǒng ròng":["縙"],"zài zēng":["縡"],cài:["縩","菜","蔡"],"féng fèng":["縫"],"suō sù":["縮","缩"],"yǎn yǐn":["縯","酓"],"zòng zǒng":["縱","纵"],"zhuàn juàn":["縳"],"mò mù":["縸","莫"],"piǎo piāo":["縹","缥"],"fán pó":["繁"],"bēng bèng":["繃"],"móu miù miào liǎo":["繆"],"yáo yóu zhòu":["繇"],"zēng zèng":["繒","缯"],"jú jué":["繘"],"chuō chuò":["繛"],"zūn zǔn":["繜"],rào:["繞","绕","遶"],"chǎn chán":["繟"],"huì huí":["繢","缋","藱"],"qiāo sāo zǎo":["繰"],"jiǎo zhuó":["繳","缴"],"dàn tán chán":["繵"],nǒng:["繷"],"pú fú":["纀"],"yào lì":["纅"],"rǎng xiāng":["纕"],"lí sǎ xǐ lǐ":["纚"],"xiān qiàn":["纤"],"jīng jìng":["经"],"tí tì":["绨"],"bēng běng bèng":["绷"],"zōng zèng":["综"],"jī qī":["缉"],"wēn yùn yūn":["缊"],"fèng féng":["缝"],"shuāi cuī suī":["缞"],"miù móu liáo miào mù":["缪"],"qiāo sāo":["缲"],fǒu:["缶","缹","缻","雬","鴀"],"bà ba pí":["罢","罷"],"guà guǎi":["罫"],"yáng xiáng":["羊","羏"],"měi gāo":["羙"],"yì xī":["羛"],"qiǎng qiān":["羟"],"qiāng kòng":["羫"],"qián xián yán":["羬"],nóu:["羺"],"hóng gòng":["羾"],"pī bì pō":["翍"],"qú yù":["翑"],ké:["翗"],"qiào qiáo":["翘"],"zhái dí":["翟"],"dào zhōu":["翢"],"hóu qú":["翵"],shuǎ:["耍"],"ruǎn nuò":["耎"],"ér nài":["耏"],"zhuān duān":["耑"],"pá bà":["耙"],"chí sì":["耛"],"qù chú":["耝"],"lún lǔn":["耣"],"jí jiè":["耤"],"tāng tǎng":["耥"],pǎng:["耪","覫"],"zhá zé":["耫"],"yē yé":["耶"],"yún yíng":["耺"],"wà tuǐ zhuó":["聉"],"ér nǜ":["聏"],"tiē zhé":["聑"],"dǐ zhì":["聜"],qié:["聺"],"nǐ jiàn":["聻"],"lèi lē":["肋"],cào:["肏","襙","鄵","鼜"],"bó dí":["肑"],"xiào xiāo":["肖"],"dù dǔ":["肚"],chāi:["肞","釵","钗"],"hán qín hàn":["肣"],"pàng pán pàn":["肨","胖"],"zhūn chún":["肫"],āng:["肮","骯"],"yù yō":["育"],"pí bǐ bì":["肶"],"fèi bì":["胇"],"bèi bēi":["背"],"fèi zǐ":["胏"],"píng pēng":["胓","苹"],"fū fú zhǒu":["胕"],"shèng shēng":["胜"],kuà:["胯","跨","骻"],"gǎi hǎi":["胲"],"gē gé gā":["胳"],"néng nài":["能"],"guī kuì":["胿"],"mài mò":["脉"],"zāng zàng":["脏"],"jiǎo jué":["脚","角"],cuǒ:["脞"],"de te":["脦"],"zuī juān":["脧"],něi:["脮","腇","餒","馁","鮾","鯘"],"pú fǔ":["脯"],niào:["脲"],shuí:["脽"],guò:["腂","過","鐹"],"là xī":["腊"],"yān ā":["腌"],"gāo gào":["膏"],"lù biāo":["膔"],chuái:["膗"],"zhuān chuán chún zhuǎn":["膞"],chuài:["膪","踹"],"fán pán":["膰"],"wǔ hū":["膴"],"shān dàn":["膻"],tún:["臀","臋","蛌","豘","豚","軘","霕","飩","饨","魨","鲀","黗"],"bì bei":["臂"],"là gé":["臈"],"sào sāo":["臊"],nào:["臑","閙","闹","鬧"],"ní luán":["臡"],"qiān xián":["臤"],"guàng jiǒng":["臦"],"guǎng jiǒng":["臩"],"chòu xiù":["臭"],"mián biān":["臱"],"dié zhí":["臷"],"zhī jìn":["臸"],"shè shě":["舍"],pù:["舖","舗"],"bān bō pán":["般"],kuā:["舿"],"gèn gěn":["艮"],"sè shǎi":["色"],"fú bó":["艴"],"jiāo qiú":["艽"],"chāi chā":["芆"],"sháo què":["芍"],"hù xià":["芐"],"zì zǐ":["芓"],"huì hū":["芔"],"tún chūn":["芚"],"jiè gài":["芥"],"xù zhù":["芧"],"yuán yán":["芫"],"xīn xìn":["芯"],"lún huā":["芲"],"wù hū":["芴"],"gōu gǒu":["芶"],"mào máo":["芼"],"fèi fú":["芾"],"chán yín":["苂"],qiē:["苆"],"sū sù":["苏"],"tiáo sháo":["苕"],"lì jī":["苙"],"kē hē":["苛"],"jù qǔ":["苣"],"ruò rě":["若"],"zhù níng":["苧"],"pā bó":["苩"],xiú:["苬"],"zhǎ zuó":["苲"],"jū chá":["苴"],nié:["苶"],"shēng ruí":["苼"],"qié jiā":["茄"],"zǐ cí":["茈"],"qiàn xī":["茜"],chǎi:["茝"],"fá pèi":["茷"],ráo:["荛","蕘","襓","饒","饶"],"yíng xíng":["荥"],"qián xún":["荨","蕁"],"yìn yīn":["荫"],"hé hè":["荷"],"shā suō":["莎"],"péng fēng":["莑"],"shēn xīn":["莘"],"wǎn guān guǎn":["莞"],"yóu sù":["莤"],"shāo xiāo":["莦","蛸"],"làng liáng":["莨"],"piǎo fú":["莩"],"wèn wǎn miǎn":["莬"],"shì shí":["莳","蒔"],"tù tú":["莵"],"xiān liǎn":["莶","薟"],"wǎn yù":["菀"],"zōu chù":["菆"],"lù lǜ":["菉"],"jūn jùn":["菌"],"niè rěn":["菍"],"zī zì zāi":["菑"],"tú tù":["菟"],"jiē shà":["菨"],"qiáo zhǎo":["菬"],"tái zhī chí":["菭"],"fēi fěi":["菲","蜚"],"qín qīn jīn":["菳"],"zū jù":["菹","蒩"],"lǐn má":["菻"],"tián tiàn":["菾"],tiē:["萜","貼","贴"],"luò là lào luō":["落"],"zhù zhuó zhe":["著"],"shèn rèn":["葚"],"gě gé":["葛"],"jùn suǒ":["葰"],"kuì kuài":["蒉"],"rú ná":["蒘"],"méng mēng měng":["蒙"],"yuán huán":["蒝"],"xú shú":["蒣"],"xí xì":["蒵"],"mì míng":["蓂"],"sōu sǒu":["蓃"],"gài gě hé hài":["蓋"],"yǎo zhuó":["蓔"],"diào tiáo dí":["蓧"],"xū qiū fū":["蓲"],"zí jú":["蓻"],"liǎo lù":["蓼"],xu:["蓿"],"hàn hǎn":["蔊"],"màn wàn mán":["蔓"],"pó bò":["蔢"],"fān fán bō":["蕃"],"hóng hòng":["蕻"],"yù ào":["薁","隩"],"xí xiào":["薂"],"báo bó bò":["薄"],"cí zī":["薋"],"wàn luàn":["薍"],"kǎo hāo":["薧"],"yuǎn wěi":["薳"],"zhòu chóu":["薵"],"wō mái":["薶"],"xiāo hào":["藃"],"yù xù xū":["藇"],"jiè jí":["藉"],"diào zhuó":["藋"],"cáng zàng":["藏"],lǎ:["藞"],"chú zhū":["藸"],"pín píng":["蘋"],"gān hán":["虷"],"hóng jiàng":["虹"],"huī huǐ":["虺"],"xiā há":["虾"],"mǎ mà mā":["蚂"],"fāng bàng":["蚄"],"bàng bèng":["蚌"],"jué quē":["蚗"],"qín qián":["蚙"],"gōng zhōng":["蚣"],"fǔ fù":["蚥"],"dài dé":["蚮"],"gǒu qú xù":["蚼"],"bǒ pí":["蚾"],"shé yí":["蛇"],tiě:["蛈","鉄","銕","鐡","鐵","铁","驖"],"gé luò":["蛒"],"máng bàng":["蛖"],"yì xǔ":["蛡"],"há gé":["蛤"],"qiè ní":["蛪"],"é yǐ":["蛾"],"zhē zhé":["蜇"],"là zhà":["蜡"],suò:["蜶","逤"],"yóu qiú":["蝤"],"xiā hā":["蝦"],"xī qī":["螇"],"bī pí":["螕"],"nài něng":["螚"],"hé xiá":["螛"],"guì huǐ":["螝"],"mǎ mā mà":["螞"],"shì zhē":["螫"],"zhì dié":["螲"],"jiàn chán":["螹"],"ma má mò":["蟆"],"mǎng měng":["蟒"],"biē bié":["蟞"],"bēn fèi":["蟦"],"láo liáo":["蟧"],"yín xún":["蟫"],"lí lǐ":["蠡"],"xuè xiě":["血"],"xíng háng hàng héng":["行"],"shuāi cuī":["衰"],"tuó tuō":["袉"],"lǐng líng":["袊"],"bào páo pào":["袌"],"jù jiē":["袓"],"hè kè":["袔"],"yí yì":["袘","貤"],"nà jué":["袦"],"bèi pī":["被"],"chǐ nuǒ":["袲"],"chǐ qǐ duǒ nuǒ":["袳"],"jiá qiā jié":["袷"],"bó mò":["袹"],"guī guà":["袿"],"liè liě":["裂"],"chéng chěng":["裎"],"jiē gé":["裓"],"dāo chóu":["裯"],"shang cháng":["裳"],"yuān gǔn":["裷"],"yǎn ān":["裺"],"tì xī":["裼"],"fù fú":["褔"],"chǔ zhǔ":["褚"],"tuì tùn":["褪"],lǎi:["襰"],"yào yāo":["要"],"qín tán":["覃"],"jiàn xiàn":["見","见"],piǎn:["覑","諞","谝","貵","𡎚"],"piē miè":["覕"],"yíng yǐng":["覮"],"qù qū":["覰","覷","觑"],"jiàn biǎn":["覵"],"luó luǎn":["覶"],"zī zuǐ":["觜"],"huà xiè":["觟"],"jiě jiè xiè":["解","觧"],"xué hù":["觷"],"lì lù":["觻"],tǎo:["討","讨"],zhùn:["訰"],"zī zǐ":["訾"],"yí dài":["詒","诒"],xiòng:["詗","诇"],"diào tiǎo":["誂"],"yí chǐ chì":["誃"],"lǎng làng":["誏"],"ēi éi ěi èi xī":["誒","诶"],shuà:["誜"],"yǔ yù":["語","语","雨"],"shuō shuì yuè":["說","说"],"shuí shéi":["誰","谁"],"qū juè":["誳"],"chī lài":["誺"],"nì ná":["誽"],"diào tiáo":["調"],"pǐ bēi":["諀"],"jì jī":["諅"],"zé zuò zhǎ cuò":["諎"],"chù jí":["諔"],"háo xià":["諕"],"lùn lún":["論","论"],"shì dì":["諟"],"huà guā":["諣"],"xǐ shāi āi":["諰"],"nán nàn":["諵","難"],miù:["謬","谬"],zèn:["譖","谮"],"shí zhì":["識","识"],"juàn xuān":["讂"],"yí tuī":["讉"],zhán:["讝"],"xǔ hǔ":["许"],"xiáng yáng":["详"],"tiáo diào zhōu":["调"],"chén shèn":["谌"],"mí mèi":["谜"],"màn mán":["谩"],"gǔ yù":["谷"],"huō huò huá":["豁"],"zhì zhài":["豸"],"huān huán":["貆"],"kěn kūn":["貇"],"mò hé":["貈"],"mò hé háo":["貉"],"jù lóu":["貗"],"zé zhài":["責","责"],"dài tè":["貸"],"bì bēn":["賁"],"jiǎ gǔ jià":["賈"],"xiōng mín":["賯"],càng:["賶"],"zhuàn zuàn":["賺","赚"],"wàn zhuàn":["贃"],"gàn gòng zhuàng":["贛"],"yuán yùn":["贠"],"bēn bì":["贲"],"jiǎ gǔ":["贾"],zǒu:["走","赱","鯐"],"dié tú":["趃"],"jū qiè":["趄"],"qū cù":["趋","趨"],"jí jié":["趌"],"guā huó":["趏"],"què qì jí":["趞"],"tàng tāng":["趟"],"chuō zhuó":["趠"],"qù cù":["趣"],"yuè tì":["趯"],"bō bào":["趵"],"kuà wù":["趶"],"guì jué":["趹"],"fāng fàng páng":["趽"],"páo bà":["跁"],"qí qǐ":["跂"],"jiàn chén":["跈"],"pǎo páo":["跑"],"diǎn diē tiē":["跕"],"jū jù qiè":["跙"],bǒ:["跛"],"luò lì":["跞"],"dài duò duō chí":["跢"],zhuǎi:["跩"],"bèng pián":["跰"],"tiào táo":["跳"],"shū chōu":["跾"],"liàng liáng":["踉"],"tà tā":["踏"],chǎ:["蹅","鑔","镲"],"dí zhí":["蹢"],"dēng dèng":["蹬","鐙","镫"],cèng:["蹭"],"dūn cún":["蹲"],"juě jué":["蹶"],liāo:["蹽"],"xiè sǎ":["躠"],tǐ:["躰","軆","骵"],"yà zhá gá":["轧","軋"],"xìn xiàn":["軐"],"fàn guǐ":["軓"],"zhuàn zhuǎn":["転"],"zhóu zhòu":["軸","轴"],bú:["轐","醭","鳪"],"zhuǎn zhuàn zhuǎi":["转"],"zǎi zài":["载"],"niǎn zhǎn":["辗"],"biān bian":["边"],"dào biān":["辺"],"yǐ yí":["迆","迤","迱"],"guò guo guō":["过"],"wàng kuāng":["迋"],"hái huán":["还"],"zhè zhèi":["这"],"yuǎn yuàn":["远"],"zhì lì":["迣"],"zhù wǎng":["迬"],"zhuī duī":["追"],"shì kuò":["适"],tòu:["透"],"tōng tòng":["通"],guàng:["逛"],"dǎi dài":["逮"],"suì suí":["遂"],"tí dì":["遆"],"yí wèi":["遗"],"shì dí zhé":["適"],cà:["遪"],"huán hái":["還"],"lí chí":["邌"],"kàng háng":["邟"],"nà nèi nā":["那"],"xié yá yé yú xú":["邪"],"gāi hái":["郂"],"huán xún":["郇"],"chī xī":["郗"],hǎo:["郝"],"lì zhí":["郦"],"xiáo ǎo":["郩"],"dōu dū":["都"],liǎo:["曢","鄝","镽"],"zàn cuán cuó":["酂","酇"],"dīng dǐng":["酊"],"cù zuò":["酢"],"fā pō":["酦"],"shāi shī":["酾"],niàng:["酿","醸"],"qiú chōu":["醔"],"pō fā":["醗","醱"],"chǎn chěn":["醦"],"yàn liǎn xiān":["醶"],"niàng niáng":["釀"],"lǐ li":["里"],"lí xǐ xī":["釐"],"liǎo liào":["釕"],"dīng dìng":["釘","钉"],"qiǎo jiǎo":["釥"],"yú huá":["釪"],"huá wū":["釫"],"rì rèn jiàn":["釰","釼"],"dì dài":["釱"],"pī zhāo":["釽"],"yá yé":["釾"],"bǎ pá":["鈀","钯"],"tā tuó":["鉈","铊"],běi:["鉳"],"bǐng píng":["鉼"],"hā kē":["鉿","铪"],chòng:["銃","铳"],"xiǎng jiōng":["銄"],"yù sì":["銉"],"xù huì":["銊"],"rén rěn":["銋"],"shàn shuò":["銏"],"chì lì":["銐"],"xiǎn xǐ":["銑","铣"],"hóu xiàng":["銗"],"diào tiáo yáo":["銚"],"xiān kuò tiǎn guā":["銛","銽","铦"],"zhé niè":["銸"],"zhōng yōng":["銿"],"tōu tù dòu":["鋀"],"méi méng":["鋂"],"wàn jiǎn":["鋄","鎫"],"tǐng dìng":["鋌","铤"],"juān jiān cuān":["鋑"],"sī tuó":["鋖"],"juān xuān juàn":["鋗"],"wú huá wū":["鋘"],"zhuó chuò":["鋜"],"xíng xìng jīng":["鋞"],"jū jú":["鋦","锔"],"zuì niè":["鋷"],"yuān yuǎn wǎn wān":["鋺"],"gāng gàng":["鋼","钢"],zhuī:["錐","锥","騅","骓","鵻"],ā:["錒","锕"],"cuō chā":["鎈"],"suǒ sè":["鎍"],"yáo zú":["鎐"],"yè tà gé":["鎑"],"qiāng chēng":["鎗"],"gé lì":["鎘","镉","鬲"],"bī pī bì":["鎞"],"gǎo hào":["鎬"],"zú chuò":["鏃"],"xiū xiù":["鏅"],"shòu sōu":["鏉"],"dí dī":["鏑","镝"],"qiāo sǎn càn":["鏒"],"lù áo":["鏕"],"tāng táng":["鏜"],"jiàn zàn":["鏩"],"huì suì ruì":["鏸"],"qiǎng qiāng":["鏹","镪"],"sǎn xiàn sà":["鏾"],"jiǎn jiàn":["鐧","锏"],"dāng chēng":["鐺","铛"],"zuān zuàn":["鑽"],"sà xì":["钑"],"yào yuè":["钥"],"tǒu dǒu":["钭"],"zuàn zuān":["钻"],"qiān yán":["铅"],"pí pī":["铍"],"yáo diào tiáo":["铫"],"tāng tàng":["铴"],"pù pū":["铺"],"tán xiān":["锬"],"liù liú":["镏"],"hào gǎo":["镐"],"táng tāng":["镗"],"tán chán xín":["镡"],"huò shǎn":["閄"],"hàn bì":["閈","闬"],"kāng kàng":["閌","闶"],"xián jiàn jiān jiǎn":["閒"],"xiā xiǎ":["閕"],"xiǎ kě":["閜"],"biàn guān":["閞"],"hé gé":["閤","颌"],"hòng xiàng":["閧"],"sē xī":["閪"],"tíng tǐng":["閮"],"è yān":["閼","阏"],"hòng juǎn xiàng":["闂"],"bǎn pàn":["闆"],"dū shé":["闍","阇"],"què quē":["闕"],"tāng táng chāng":["闛"],"kàn hǎn":["闞","阚"],"xì sè tà":["闟"],"mēn mèn":["闷"],"quē què":["阙"],"yán diàn":["阽"],"ā ē":["阿"],"bēi pō pí":["陂"],"yàn yǎn":["隁"],"yú yáo shù":["隃"],"lóng lōng":["隆"],"duì zhuì":["隊"],"suí duò":["隋"],"gāi qí ái":["隑"],"huī duò":["隓","隳"],"wěi kuí":["隗"],"lì dài":["隸"],"zhuī cuī wéi":["隹"],"hè hú":["隺","鶮"],"jùn juàn":["隽","雋"],"nán nàn nuó":["难"],"què qiāo qiǎo":["雀"],"guàn huán":["雚"],"guī xī":["雟"],"sè xí":["雭"],án:["雸"],"wù méng":["雺"],tèng:["霯"],"lù lòu":["露"],mái:["霾"],"jìng liàng":["靚"],"gé jí":["革"],bǎ:["靶"],"yāng yàng":["鞅"],"gé tà sǎ":["鞈"],"biān yìng":["鞕"],"qiào shāo":["鞘"],"juān xuān":["鞙"],"shàng zhǎng":["鞝"],"pí bǐng bì bēi":["鞞"],la:["鞡"],"xiè dié":["鞢"],ēng:["鞥"],"móu mù":["鞪"],"bì bǐng":["鞸"],"mèi wà":["韎"],rǒu:["韖"],"shè xiè":["韘"],"yùn wēn":["韫"],"dùn dú":["頓","顿"],duǐ:["頧"],luō:["頱"],"bīn pín":["頻"],yóng:["顒","颙","鰫"],mān:["顢","颟"],"jǐng gěng":["颈"],"jié xié jiá":["颉"],"kē ké":["颏"],"pín bīn":["频"],"chàn zhàn":["颤"],"fēng fěng":["風","风"],"biāo diū":["颩"],"bá fú":["颰"],"sāo sōu":["颾"],"liù liáo":["飂"],"shí sì yì":["食"],"yǎng juàn":["飬"],"zhù tǒu":["飳"],"yí sì":["飴"],"zuò zé zhā":["飵"],tiè:["飻","餮"],"xiǎng náng":["饟"],"táng xíng":["饧"],"gē le":["饹"],"chā zha":["馇"],"náng nǎng":["馕"],"yūn wò":["馧"],"zhī shì":["馶"],"xìn jìn":["馸"],"kuài jué":["駃"],zǎng:["駔","驵"],"tái dài":["駘"],"xún xuān":["駨"],"liáng láng":["駺"],piàn:["騗","騙","骗","魸"],"dài tái":["骀"],"sāo sǎo":["骚"],"gǔ gū":["骨"],"bèi mó":["骳"],"xiāo qiāo":["骹"],"bǎng pǎng":["髈"],"bó jué":["髉"],"bì pǒ":["髲"],"máo méng":["髳"],"kuò yuè":["髺"],"bā bà":["魞","鲃"],"jì cǐ":["鮆"],"bó bà":["鮊"],"zhǎ zhà":["鮓","鲊"],"chóu dài":["鮘"],"luò gé":["鮥"],"guī xié wā kuí":["鮭"],"xiān xiǎn":["鮮","鲜"],"pū bū":["鯆"],"yì sī":["鯣"],"bà bó":["鲌"],"guī xié":["鲑"],"sāi xǐ":["鳃"],"niǎo diǎo":["鳥"],"diāo zhāo":["鳭"],"gān hàn yàn":["鳱"],"fū guī":["鳺"],"jiān qiān zhān":["鳽"],"hé jiè":["鶡"],"piān biǎn":["鶣"],"chuàn zhì":["鶨"],"cāng qiāng":["鶬"],"sǔn xùn":["鶽"],"biāo páo":["麃"],"zhù cū":["麆"],"jūn qún":["麇","麕"],chi:["麶"],"mó me":["麼"],"mó me ma":["麽"],"mí mǒ":["麿"],"dàn shèn":["黮"],"zhěn yān":["黰"],"dǎn zhǎn":["黵"],"miǎn mǐn měng":["黾"],hōu:["齁"],nàng:["齉"],"qí jì zī zhāi":["齐"],"yín kěn yǎn":["龂"],"yín kěn":["龈"],"gōng wò":["龏"],"guī jūn qiū":["龜","龟"],"kuí wā":["䖯"],lōu:["䁖"],"ōu qū":["𫭟"],"lóu lǘ":["𦝼"],"gǎ gā gá":["嘎"],"wā guà":["坬"],"zhǐ dǐ":["茋"],"gǒng hóng":["硔"],"yáo xiào":["滧"]},xu=new ML;Object.keys(FC).forEach(e=>{const t=FC[e];for(let n of t)xu.set(n,e)});const BC={这个:"zhè ge",成为:"chéng wéi",认为:"rèn wéi",作为:"zuò wéi",部分:"bù fen",要求:"yāo qiú",应该:"yīng gāi",增长:"zēng zhǎng",提供:"tí gōng",觉得:"jué de",任务:"rèn wu",那个:"nà ge",称为:"chēng wéi",为主:"wéi zhǔ",了解:"liǎo jiě",处理:"chǔ lǐ",皇上:"huáng shang",只要:"zhǐ yào",大量:"dà liàng",力量:"lì liàng",几乎:"jī hū",干部:"gàn bù",目的:"mù dì",行为:"xíng wéi",只见:"zhǐ jiàn",认识:"rèn shi",市长:"shì zhǎng",师父:"shī fu",调查:"diào chá",重新:"chóng xīn",分为:"fēn wéi",知识:"zhī shi",导弹:"dǎo dàn",质量:"zhì liàng",行款:"háng kuǎn",行列:"háng liè",行话:"háng huà",行业:"háng yè",隔行:"gé háng",在行:"zài háng",行家:"háng jia",内行:"nèi háng",外行:"wài háng",同行:"tóng háng",本行:"běn háng",行伍:"háng wǔ",洋行:"yáng háng",银行:"yín háng",商行:"shāng háng",支行:"zhī háng",总行:"zǒng háng",行情:"háng qíng",懂行:"dǒng háng",行规:"háng guī",行当:"háng dang",行货:"háng huò",太行:"tài háng",入行:"rù háng",中行:"zhōng háng",农行:"nóng háng",工行:"gōng háng",建行:"jiàn háng",各行:"gè háng",行号:"háng hào",行高:"háng gāo",行首:"háng shǒu",行尾:"háng wěi",行末:"háng mò",行长:"háng zhǎng",行距:"háng jù",换行:"huàn háng",行会:"háng huì",行辈:"háng bèi",行道:"háng dào",道行:"dào heng",参与:"cān yù",充分:"chōng fèn",尽管:"jǐn guǎn",生长:"shēng zhǎng",数量:"shù liàng",应当:"yīng dāng",院长:"yuàn zhǎng",强调:"qiáng diào",只能:"zhǐ néng",音乐:"yīn yuè",以为:"yǐ wéi",处于:"chǔ yú",部长:"bù zhǎng",蒙古:"měng gǔ",只有:"zhǐ yǒu",适当:"shì dàng",只好:"zhǐ hǎo",成长:"chéng zhǎng",高兴:"gāo xìng",不了:"bù liǎo",产量:"chǎn liàng",胖子:"pàng zi",显得:"xiǎn de",只是:"zhǐ shì",似的:"shì de",率领:"shuài lǐng",改为:"gǎi wéi",不禁:"bù jīn",成分:"chéng fèn",答应:"dā ying",少年:"shào nián",兴趣:"xìng qù",太监:"tài jian",休息:"xiū xi",校长:"xiào zhǎng",更新:"gēng xīn",合同:"hé tong",喝道:"hè dào",重庆:"chóng qìng",重建:"chóng jiàn",使得:"shǐ de",审查:"shěn chá",累计:"lěi jì",给予:"jǐ yǔ",极为:"jí wéi",冠军:"guàn jūn",仿佛:"fǎng fú",头发:"tóu fa",投降:"tóu xiáng",家长:"jiā zhǎng",仔细:"zǐ xì",要是:"yào shi",将领:"jiàng lǐng",含量:"hán liàng",更为:"gèng wéi",积累:"jī lěi",地处:"dì chǔ",县长:"xiàn zhǎng",少女:"shào nǚ",路上:"lù shang",只怕:"zhǐ pà",能量:"néng liàng",储量:"chǔ liàng",供应:"gōng yìng",挑战:"tiǎo zhàn",西藏:"xī zàng",记得:"jì de",总量:"zǒng liàng",当真:"dàng zhēn",将士:"jiàng shì",差别:"chā bié",较为:"jiào wéi",长老:"zhǎng lǎo",大夫:"dài fu",差异:"chā yì",懂得:"dǒng de",尽量:"jǐn liàng",模样:"mú yàng",的确:"dí què",为首:"wéi shǒu",便宜:"pián yi",更名:"gēng míng",石头:"shí tou",州长:"zhōu zhǎng",为止:"wéi zhǐ",漂亮:"piào liang",炮弹:"pào dàn",藏族:"zàng zú",角色:"jué sè",当作:"dàng zuò",尽快:"jǐn kuài",人为:"rén wéi",重复:"chóng fù",胡同:"hú tòng",差距:"chā jù",弟兄:"dì xiong",大将:"dà jiàng",睡觉:"shuì jiào",一觉:"yí jiào",团长:"tuán zhǎng",队长:"duì zhǎng",区长:"qū zhǎng",难得:"nán dé",丫头:"yā tou",会长:"huì zhǎng",弟弟:"dì di",王爷:"wáng ye",重量:"zhòng liàng",誉为:"yù wéi",家伙:"jiā huo",华山:"huà shān",椅子:"yǐ zi",流量:"liú liàng",长大:"zhǎng dà",勉强:"miǎn qiǎng",会计:"kuài jì",过分:"guò fèn",济南:"jǐ nán",调动:"diào dòng",燕京:"yān jīng",少将:"shào jiàng",中毒:"zhòng dú",晓得:"xiǎo de",变更:"biàn gēng",打更:"dǎ gēng",认得:"rèn de",苹果:"píng guǒ",念头:"niàn tou",挣扎:"zhēng zhá",三藏:"sān zàng",剥削:"bō xuē",丞相:"chéng xiàng",少量:"shǎo liàng",寻思:"xún si",夺得:"duó dé",干线:"gàn xiàn",呼吁:"hū yù",处罚:"chǔ fá",长官:"zhǎng guān",柏林:"bó lín",亲戚:"qīn qi",身分:"shēn fèn",胳膊:"gē bo",着手:"zhuó shǒu",炸弹:"zhà dàn",咳嗽:"ké sou",叶子:"yè zi",外长:"wài zhǎng",供给:"gōng jǐ",师长:"shī zhǎng",变量:"biàn liàng",应有:"yīng yǒu",下载:"xià zài",乐器:"yuè qì",间接:"jiàn jiē",底下:"dǐ xià",打扮:"dǎ bàn",子弹:"zǐ dàn",弹药:"dàn yào",热量:"rè liàng",削弱:"xuē ruò",骨干:"gǔ gàn",容量:"róng liàng",模糊:"mó hu",转动:"zhuàn dòng",称呼:"chēng hu",科长:"kē zhǎng",处置:"chǔ zhì",着重:"zhuó zhòng",着急:"zháo jí",强迫:"qiǎng pò",庭长:"tíng zhǎng",首相:"shǒu xiàng",喇嘛:"lǎ ma",镇长:"zhèn zhǎng",只管:"zhǐ guǎn",重重:"chóng chóng",免得:"miǎn de",着实:"zhuó shí",度假:"dù jià",真相:"zhēn xiàng",相貌:"xiàng mào",处分:"chǔ fèn",委屈:"wěi qu",为期:"wéi qī",伯伯:"bó bo",伯子:"bǎi zi",圈子:"quān zi",见识:"jiàn shi",笼罩:"lǒng zhào",与会:"yù huì",都督:"dū du",都市:"dū shì",成都:"chéng dū",首都:"shǒu dū",帝都:"dì dū",王都:"wáng dū",东都:"dōng dū",都护:"dū hù",都城:"dū chéng",建都:"jiàn dū",迁都:"qiān dū",故都:"gù dū",定都:"dìng dū",中都:"zhōng dū",六安:"lù ān",宰相:"zǎi xiàng",较量:"jiào liàng",对称:"duì chèn",总长:"zǒng zhǎng",相公:"xiàng gong",空白:"kòng bái",打量:"dǎ liang",水分:"shuǐ fèn",舌头:"shé tou",没收:"mò shōu",行李:"xíng li",判处:"pàn chǔ",散文:"sǎn wén",处境:"chǔ jìng",孙子:"sūn zi",拳头:"quán tou",打发:"dǎ fā",组长:"zǔ zhǎng",骨头:"gǔ tou",宁可:"nìng kě",更换:"gēng huàn",薄弱:"bó ruò",还原:"huán yuán",重修:"chóng xiū",重来:"chóng lái",只顾:"zhǐ gù",爱好:"ài hào",馒头:"mán tou",军长:"jūn zhǎng",首长:"shǒu zhǎng",厂长:"chǎng zhǎng",司长:"sī zhǎng",长子:"zhǎng zǐ",强劲:"qiáng jìng",恰当:"qià dàng",头儿:"tóu er",站长:"zhàn zhǎng",折腾:"zhē teng",相处:"xiāng chǔ",统率:"tǒng shuài",中将:"zhōng jiàng",命中:"mìng zhòng",名将:"míng jiàng",木头:"mù tou",动弹:"dòng tan",地壳:"dì qiào",干活:"gàn huó",少爷:"shào ye",水量:"shuǐ liàng",补给:"bǔ jǐ",尾巴:"wěi ba",来得:"lái de",好奇:"hào qí",钥匙:"yào shi",当做:"dàng zuò",沉着:"chén zhuó",哑巴:"yǎ ba",车子:"chē zi",上将:"shàng jiàng",恶心:"ě xīn",担子:"dàn zi",应届:"yīng jiè",主角:"zhǔ jué",运转:"yùn zhuǎn",兄长:"xiōng zhǎng",格式:"gé shì",正月:"zhēng yuè",营长:"yíng zhǎng",当成:"dàng chéng",女婿:"nǚ xu",咽喉:"yān hóu",重阳:"chóng yáng",化为:"huà wéi",吐蕃:"tǔ bō",钻进:"zuān jìn",乐队:"yuè duì",亮相:"liàng xiàng",被子:"bèi zi",舍得:"shě de",杉木:"shā mù",击中:"jī zhòng",排长:"pái zhǎng",假期:"jià qī",分量:"fèn liàng",数次:"shù cì",提防:"dī fáng",吆喝:"yāo he",查处:"chá chǔ",量子:"liàng zǐ",里头:"lǐ tou",调研:"diào yán",伺候:"cì hou",重申:"chóng shēn",枕头:"zhěn tou",拚命:"pīn mìng",社长:"shè zhǎng",归还:"guī huán",批量:"pī liàng",畜牧:"xù mù",点着:"diǎn zháo",甚为:"shèn wéi",小将:"xiǎo jiàng",着眼:"zhuó yǎn",处死:"chǔ sǐ",厌恶:"yàn wù",鼓乐:"gǔ yuè",树干:"shù gàn",秘鲁:"bì lǔ",大方:"dà fāng",外头:"wài tou",班长:"bān zhǎng",星宿:"xīng xiù",宁愿:"nìng yuàn",钦差:"qīn chāi",为数:"wéi shù",勾当:"gòu dàng",削减:"xuē jiǎn",间谍:"jiàn dié",埋怨:"mán yuàn",结实:"jiē shi",计量:"jì liáng",淹没:"yān mò",村长:"cūn zhǎng",连长:"lián zhǎng",自给:"zì jǐ",武将:"wǔ jiàng",温差:"wēn chā",直奔:"zhí bèn",供求:"gōng qiú",剂量:"jì liàng",道长:"dào zhǎng",泄露:"xiè lòu",王八:"wáng ba",切割:"qiē gē",间隔:"jiàn gé",一晃:"yì huǎng",长假:"cháng jià",令狐:"líng hú",为害:"wéi hài",句子:"jù zi",偿还:"cháng huán",疙瘩:"gē da",燕山:"yān shān",堵塞:"dǔ sè",夺冠:"duó guàn",扎实:"zhā shi",电荷:"diàn hè",看守:"kān shǒu",复辟:"fù bì",郁闷:"yù mèn",尽早:"jǐn zǎo",切断:"qiē duàn",指头:"zhǐ tou",为生:"wéi shēng",畜生:"chù sheng",切除:"qiē chú",着力:"zhuó lì",着想:"zhuó xiǎng",级差:"jí chā",投奔:"tóu bèn",棍子:"gùn zi",含糊:"hán hu",少妇:"shào fù",兴致:"xìng zhì",纳闷:"nà mèn",干流:"gàn liú",卷起:"juǎn qǐ",扇子:"shàn zi",更改:"gēng gǎi",笼络:"lǒng luò",喇叭:"lǎ ba",载荷:"zài hè",妥当:"tuǒ dàng",为难:"wéi nán",着陆:"zhuó lù",燕子:"yàn zi",干吗:"gàn má",白发:"bái fà",总得:"zǒng děi",夹击:"jiā jī",曝光:"bào guāng",曲调:"qǔ diào",相机:"xiàng jī",叫化:"jiào huà",角逐:"jué zhú",啊哟:"ā yō",载重:"zài zhòng",长辈:"zhǎng bèi",出差:"chū chāi",垛口:"duǒ kǒu",撇开:"piē kāi",厅长:"tīng zhǎng",组分:"zǔ fèn",误差:"wù chā",家当:"jiā dàng",传记:"zhuàn jì",个子:"gè zi",铺设:"pū shè",干事:"gàn shì",杆菌:"gǎn jūn",定量:"dìng liàng",运载:"yùn zài",会儿:"huì er",酋长:"qiú zhǎng",重返:"chóng fǎn",差额:"chā é",露面:"lòu miàn",钻研:"zuān yán",大城:"dài chéng",上当:"shàng dàng",销量:"xiāo liàng",作坊:"zuō fang",照相:"zhào xiàng",哎呀:"āi yā",调集:"diào jí",看中:"kàn zhòng",议长:"yì zhǎng",风筝:"fēng zheng",辟邪:"bì xié",空隙:"kòng xì",更迭:"gēng dié",偏差:"piān chā",声调:"shēng diào",适量:"shì liàng",屯子:"tún zi",无量:"wú liàng",空地:"kòng dì",调度:"diào dù",散射:"sǎn shè",创伤:"chuāng shāng",海参:"hǎi shēn",满载:"mǎn zài",重叠:"chóng dié",落差:"luò chā",单调:"dān diào",老将:"lǎo jiàng",人参:"rén shēn",间断:"jiàn duàn",重现:"chóng xiàn",夹杂:"jiā zá",调用:"diào yòng",萝卜:"luó bo",附着:"fù zhuó",应声:"yìng shēng",主将:"zhǔ jiàng",罪过:"zuì guo",咀嚼:"jǔ jué",为政:"wéi zhèng",过量:"guò liàng",乐曲:"yuè qǔ",负荷:"fù hè",枪弹:"qiāng dàn",悄然:"qiǎo rán",处方:"chǔ fāng",悄声:"qiǎo shēng",曲子:"qǔ zi",情调:"qíng diào",挑衅:"tiǎo xìn",代为:"dài wéi",了结:"liǎo jié",打中:"dǎ zhòng",酒吧:"jiǔ bā",懒得:"lǎn de",增量:"zēng liàng",衣着:"yī zhuó",部将:"bù jiàng",要塞:"yào sài",茶几:"chá jī",杠杆:"gàng gǎn",出没:"chū mò",鲜有:"xiǎn yǒu",间隙:"jiàn xì",重担:"zhòng dàn",重演:"chóng yǎn",重试:"chóng shì",应酬:"yìng chou",只当:"zhǐ dāng",毋宁:"wú nìng",包扎:"bāo zā",前头:"qián tou",卷烟:"juǎn yān",非得:"fēi děi",弹道:"dàn dào",杆子:"gān zi",门将:"mén jiàng",后头:"hòu tou",喝彩:"hè cǎi",暖和:"nuǎn huo",累积:"lěi jī",调遣:"diào qiǎn",倔强:"jué jiàng",宝藏:"bǎo zàng",丧事:"sāng shì",约莫:"yuē mo",纤夫:"qiàn fū",更替:"gēng tì",装载:"zhuāng zài",背包:"bēi bāo",帖子:"tiě zi",松散:"sōng sǎn",呼喝:"hū hè",可恶:"kě wù",自转:"zì zhuàn",供电:"gōng diàn",反省:"fǎn xǐng",坦率:"tǎn shuài",苏打:"sū dá",本分:"běn fèn",落得:"luò de",鄙薄:"bǐ bó",相间:"xiāng jiàn",单薄:"dān bó",混蛋:"hún dàn",贞观:"zhēn guān",附和:"fù hè",能耐:"néng nài",吓唬:"xià hu",未了:"wèi liǎo",引着:"yǐn zháo",抽调:"chōu diào",沙子:"shā zi",席卷:"xí juǎn",标的:"biāo dì",别扭:"biè niu",思量:"sī liang",喝采:"hè cǎi",论语:"lún yǔ",盖子:"gài zi",分外:"fèn wài",弄堂:"lòng táng",乐舞:"yuè wǔ",雨量:"yǔ liàng",毛发:"máo fà",差遣:"chāi qiǎn",背负:"bēi fù",转速:"zhuàn sù",声乐:"shēng yuè",夹攻:"jiā gōng",供水:"gōng shuǐ",主干:"zhǔ gàn",惩处:"chéng chǔ",长相:"zhǎng xiàng",公差:"gōng chāi",榴弹:"liú dàn",省得:"shěng de",条子:"tiáo zi",重围:"chóng wéi",阻塞:"zǔ sè",劲风:"jìng fēng",纠葛:"jiū gé",颠簸:"diān bǒ",点中:"diǎn zhòng",重创:"zhòng chuāng",姥姥:"lǎo lao",迷糊:"mí hu",公家:"gōng jia",几率:"jī lǜ",苦闷:"kǔ mèn",度量:"dù liàng",差错:"chā cuò",暑假:"shǔ jià",参差:"cēn cī",搭载:"dā zài",助长:"zhù zhǎng",相称:"xiāng chèn",红晕:"hóng yùn",舍命:"shě mìng",喜好:"xǐ hào",列传:"liè zhuàn",劲敌:"jìng dí",蛤蟆:"há ma",请假:"qǐng jià",钉子:"dīng zi",沉没:"chén mò",高丽:"gāo lí",休假:"xiū jià",无为:"wú wéi",巴结:"bā jie",了得:"liǎo dé",变相:"biàn xiàng",核弹:"hé dàn",亲家:"qìng jia",承载:"chéng zài",喝问:"hè wèn",还击:"huán jī",交还:"jiāo huán",将令:"jiàng lìng",单于:"chán yú",空缺:"kòng quē",绿林:"lù lín",胆量:"dǎn liàng",执着:"zhí zhuó",低调:"dī diào",闭塞:"bì sè",轻薄:"qīng bó",得当:"dé dàng",占卜:"zhān bǔ",扫帚:"sào zhou",龟兹:"qiū cí",年长:"nián zhǎng",外传:"wài zhuàn",头子:"tóu zi",裁缝:"cái feng",礼乐:"lǐ yuè",血泊:"xuè pō",散乱:"sǎn luàn",动量:"dòng liàng",倒腾:"dǎo teng",取舍:"qǔ shě",咱家:"zán jiā",长发:"cháng fà",爪哇:"zhǎo wā",弹壳:"dàn ké",省悟:"xǐng wù",嚷嚷:"rāng rang",连累:"lián lèi",应得:"yīng dé",族长:"zú zhǎng",柜子:"guì zi",擂鼓:"léi gǔ",眩晕:"xuàn yùn",调配:"tiáo pèi",躯干:"qū gàn",差役:"chāi yì",坎坷:"kǎn kě",少儿:"shào ér",乐团:"yuè tuán",养分:"yǎng fèn",退还:"tuì huán",格调:"gé diào",语调:"yǔ diào",音调:"yīn diào",乐府:"yuè fǔ",古朴:"gǔ pǔ",打点:"dǎ diǎn",差使:"chāi shǐ",匀称:"yún chèn",瘦削:"shòu xuē",膏药:"gāo yao",吞没:"tūn mò",调任:"diào rèn",散居:"sǎn jū",上头:"shàng tóu",风靡:"fēng mǐ",放假:"fàng jià",估量:"gū liang",失当:"shī dàng",中弹:"zhòng dàn",妄为:"wàng wéi",长者:"zhǎng zhě",起哄:"qǐ hòng",末了:"mò liǎo",相声:"xiàng sheng",校正:"jiào zhèng",劝降:"quàn xiáng",矢量:"shǐ liàng",沉闷:"chén mèn",给与:"jǐ yǔ",解法:"jiě fǎ",塞外:"sài wài",将校:"jiàng xiào",嗜好:"shì hào",没落:"mò luò",朴刀:"pō dāo",片子:"piān zi",切削:"qiē xiāo",弹丸:"dàn wán",稀薄:"xī bó",亏得:"kuī dé",间歇:"jiàn xiē",翘首:"qiáo shǒu",色调:"sè diào",处决:"chǔ jué",表率:"biǎo shuài",尺子:"chǐ zi",招降:"zhāo xiáng",称职:"chèn zhí",斗篷:"dǒu peng",铺子:"pù zi",底子:"dǐ zi",负载:"fù zài",干警:"gàn jǐng",倒数:"dào shǔ",将官:"jiàng guān",锄头:"chú tou",归降:"guī xiáng",疟疾:"nüè ji",唠叨:"láo dao",限量:"xiàn liàng",屏息:"bǐng xī",重逢:"chóng féng",器乐:"qì yuè",氢弹:"qīng dàn",脖颈:"bó gěng",妃子:"fēi zi",处事:"chǔ shì",参量:"cān liàng",轻率:"qīng shuài",缥缈:"piāo miǎo",中奖:"zhòng jiǎng",才干:"cái gàn",施舍:"shī shě",卷子:"juàn zi",游说:"yóu shuì",巷子:"xiàng zi",膀胱:"páng guāng",切勿:"qiè wù",看管:"kān guǎn",风头:"fēng tou",精干:"jīng gàn",高差:"gāo chā",恐吓:"kǒng hè",扁担:"biǎn dàn",给养:"jǐ yǎng",格子:"gé zi",供需:"gōng xū",反差:"fǎn chā",飞弹:"fēi dàn",微薄:"wēi bó",发型:"fà xíng",即兴:"jí xìng",攒动:"cuán dòng",间或:"jiàn huò",浅薄:"qiǎn bó",乐章:"yuè zhāng",顺差:"shùn chā",调子:"diào zi",相位:"xiàng wèi",转子:"zhuàn zǐ",劲旅:"jìng lǚ",咔嚓:"kā chā",了事:"liǎo shì",转悠:"zhuàn you",当铺:"dàng pù",爪子:"zhuǎ zi",单子:"dān zi",好战:"hào zhàn",燕麦:"yàn mài",只许:"zhǐ xǔ",干练:"gàn liàn",女将:"nǚ jiàng",酒量:"jiǔ liàng",划船:"huá chuán",伎俩:"jì liǎng",挑拨:"tiǎo bō",少校:"shào xiào",着落:"zhuó luò",憎恶:"zēng wù",刻薄:"kè bó",要挟:"yāo xié",用处:"yòng chu",还手:"huán shǒu",模具:"mú jù",执著:"zhí zhuó",喝令:"hè lìng",保长:"bǎo zhǎng",吸着:"xī zhe",症结:"zhēng jié",公转:"gōng zhuàn",校勘:"jiào kān",重提:"chóng tí",扫兴:"sǎo xìng",铺盖:"pū gài",长史:"zhǎng shǐ",差价:"chā jià",压根:"yà gēn",怔住:"zhèng zhù",应允:"yīng yǔn",切入:"qiē rù",战将:"zhàn jiàng",年少:"nián shào",舍身:"shě shēn",执拗:"zhí niù",处世:"chǔ shì",中风:"zhòng fēng",等量:"děng liàng",放量:"fàng liàng",腔调:"qiāng diào",老少:"lǎo shào",没入:"mò rù",瓜葛:"guā gé",将帅:"jiàng shuài",车载:"chē zài",窝囊:"wō nang",长进:"zhǎng jìn",可汗:"kè hán",并州:"bīng zhōu",供销:"gōng xiāo",切片:"qiē piàn",差事:"chāi shì",知会:"zhī hui",鹰爪:"yīng zhǎo",处女:"chǔ nǚ",切磋:"qiē cuō",日头:"rì tou",押解:"yā jiè",滋长:"zī zhǎng",道观:"dào guàn",脚色:"jué sè",当量:"dāng liàng",婆家:"pó jia",缘分:"yuán fèn",空闲:"kòng xián",好色:"hào sè",怒喝:"nù hè",笼统:"lǒng tǒng",边塞:"biān sài",何曾:"hé céng",重合:"chóng hé",零散:"líng sǎn",轰隆:"hōng lōng",化子:"huà zi",内蒙:"nèi měng",数落:"shǔ luò",逆差:"nì chā",牟利:"móu lì",栅栏:"zhà lan",中标:"zhòng biāo",调档:"diào dàng",佝偻:"gōu lóu",场子:"chǎng zi",甲壳:"jiǎ qiào",重温:"chóng wēn",炮制:"páo zhì",返还:"fǎn huán",自传:"zì zhuàn",高调:"gāo diào",殷红:"yān hóng",固着:"gù zhuó",强求:"qiǎng qiú",本相:"běn xiàng",骄横:"jiāo hèng",草率:"cǎo shuài",气闷:"qì mèn",着色:"zhuó sè",宁肯:"nìng kěn",兴头:"xìng tou",拘泥:"jū nì",夹角:"jiā jiǎo",发髻:"fà jì",猛将:"měng jiàng",约摸:"yuē mo",拖累:"tuō lěi",呢绒:"ní róng",钻探:"zuān tàn",夹层:"jiā céng",落魄:"luò pò",巷道:"hàng dào",运量:"yùn liàng",解闷:"jiě mèn",空儿:"kòng er",估摸:"gū mo",好客:"hào kè",钻孔:"zuān kǒng",糊弄:"hù nòng",荥阳:"xíng yáng",烦闷:"fán mèn",仓卒:"cāng cù",分叉:"fēn chà",厂子:"chǎng zi",小调:"xiǎo diào",少阳:"shào yáng",受降:"shòu xiáng",染坊:"rǎn fáng",胳臂:"gē bei",将门:"jiàng mén",模板:"mú bǎn",配给:"pèi jǐ",为伍:"wéi wǔ",跟头:"gēn tou",划算:"huá suàn",累赘:"léi zhui",哄笑:"hōng xiào",晕眩:"yūn xuàn",干掉:"gàn diào",缝制:"féng zhì",难处:"nán chù",着意:"zhuó yì",蛮横:"mán hèng",奇数:"jī shù",短发:"duǎn fà",生还:"shēng huán",还清:"huán qīng",看护:"kān hù",直率:"zhí shuài",奏乐:"zòu yuè",载客:"zài kè",专横:"zhuān hèng",湮没:"yān mò",空格:"kòng gé",铺垫:"pū diàn",良将:"liáng jiàng",哗啦:"huā lā",散漫:"sǎn màn",脱发:"tuō fà",送还:"sòng huán",埋没:"mái mò",累及:"lěi jí",薄雾:"bó wù",调离:"diào lí",舌苔:"shé tāi",机长:"jī zhǎng",栓塞:"shuān sè",配角:"pèi jué",切口:"qiē kǒu",创口:"chuāng kǒu",哈欠:"hā qian",实弹:"shí dàn",铺平:"pū píng",哈达:"hǎ dá",懒散:"lǎn sǎn",实干:"shí gàn",填空:"tián kòng",刁钻:"diāo zuān",乐师:"yuè shī",量变:"liàng biàn",诱降:"yòu xiáng",搪塞:"táng sè",征调:"zhēng diào",夹道:"jiā dào",干咳:"gān ké",止咳:"zhǐ ké",乐工:"yuè gōng",划过:"huá guò",着火:"zháo huǒ",更正:"gēng zhèng",给付:"jǐ fù",空子:"kòng zi",哪吒:"né zhā",正着:"zhèng zháo",刷子:"shuā zi",丧葬:"sāng zàng",夹带:"jiā dài",安分:"ān fèn",中意:"zhòng yì",长孙:"zhǎng sūn",校订:"jiào dìng",卷曲:"juǎn qū",载运:"zài yùn",投弹:"tóu dàn",柞蚕:"zuò cán",份量:"fèn liàng",调换:"diào huàn",了然:"liǎo rán",咧嘴:"liě zuǐ",典当:"diǎn dàng",寒假:"hán jià",长兄:"zhǎng xiōng",给水:"jǐ shuǐ",须发:"xū fà",枝干:"zhī gàn",属相:"shǔ xiàng",哄抢:"hōng qiǎng",刻划:"kè huà",塞子:"sāi zi",单干:"dān gàn",还乡:"huán xiāng",兆头:"zhào tou",寺观:"sì guàn",督率:"dū shuài",啊哈:"ā ha",割舍:"gē shě",抹布:"mā bù",好恶:"hào wù",下处:"xià chǔ",消长:"xiāo zhǎng",离间:"lí jiàn",准头:"zhǔn tou",校对:"jiào duì",什物:"shí wù",番禺:"pān yú",佛爷:"fó ye",吗啡:"mǎ fēi",盐分:"yán fèn",虎将:"hǔ jiàng",薄荷:"bò he",独处:"dú chǔ",空位:"kòng wèi",铺路:"pū lù",乌拉:"wū lā",调回:"diào huí",来头:"lái tou",闲散:"xián sǎn",胶卷:"jiāo juǎn",冒失:"mào shi",干劲:"gàn jìn",弦乐:"xián yuè",相国:"xiàng guó",丹参:"dān shēn",助兴:"zhù xìng",铺开:"pū kāi",次长:"cì zhǎng",发卡:"fà qiǎ",拮据:"jié jū",刹车:"shā chē",生发:"shēng fà",重播:"chóng bō",缝合:"féng hé",音量:"yīn liàng",少尉:"shào wèi",冲压:"chòng yā",苍劲:"cāng jìng",厚薄:"hòu báo",威吓:"wēi hè",外相:"wài xiàng",呼号:"hū háo",着迷:"zháo mí",挑担:"tiāo dàn",纹路:"wén lù",还俗:"huán sú",强横:"qiáng hèng",着数:"zhāo shù",降顺:"xiáng shùn",挑明:"tiǎo míng",眯缝:"mī feng",分内:"fèn nèi",更衣:"gēng yī",软和:"ruǎn huo",尽兴:"jìn xìng",号子:"hào zi",爪牙:"zhǎo yá",败将:"bài jiàng",猜中:"cāi zhòng",结扎:"jié zā",没空:"méi kòng",夹缝:"jiā fèng",拾掇:"shí duo",掺和:"chān huo",簸箕:"bò ji",电量:"diàn liàng",荷载:"hè zǎi",调式:"diào shì",处身:"chǔ shēn",打手:"dǎ shǒu",弹弓:"dàn gōng",横蛮:"hèng mán",能干:"néng gàn",校点:"jiào diǎn",加载:"jiā zài",干校:"gàn xiào",哄传:"hōng chuán",校注:"jiào zhù",淤塞:"yū sè",马扎:"mǎ zhá",月氏:"yuè zhī",高干:"gāo gàn",经传:"jīng zhuàn",曾孙:"zēng sūn",好斗:"hào dòu",关卡:"guān qiǎ",逃奔:"táo bèn",磨蹭:"mó ceng",牟取:"móu qǔ",颤栗:"zhàn lì",蚂蚱:"mà zha",撮合:"cuō he",趔趄:"liè qie",摔打:"shuāi dǎ",台子:"tái zi",分得:"fēn de",粘着:"nián zhuó",采邑:"cài yì",散装:"sǎn zhuāng",婀娜:"ē nuó",兴味:"xìng wèi",行头:"xíng tou",气量:"qì liàng",调运:"diào yùn",处治:"chǔ zhì",乐音:"yuè yīn",充塞:"chōng sè",恫吓:"dòng hè",论调:"lùn diào",相中:"xiāng zhòng",民乐:"mín yuè",炮仗:"pào zhang",丧服:"sāng fú",骁将:"xiāo jiàng",量刑:"liàng xíng",缝补:"féng bǔ",财会:"cái kuài",大干:"dà gàn",历数:"lì shǔ",校场:"jiào chǎng",塞北:"sài běi",识相:"shí xiàng",辱没:"rǔ mò",鲜亮:"xiān liàng",语塞:"yǔ sè",露脸:"lòu liǎn",凉快:"liáng kuai",腰杆:"yāo gǎn",溜达:"liū da",嘎嘎:"gā gā",公干:"gōng gàn",桔梗:"jié gěng",挑逗:"tiǎo dòu",看门:"kān mén",乐歌:"yuè gē",拓片:"tà piàn",挑动:"tiǎo dòng",准将:"zhǔn jiàng",遒劲:"qiú jìng",磨坊:"mò fáng",逶迤:"wēi yí",搅和:"jiǎo huo",摩挲:"mó suō",作弄:"zuò nòng",苗头:"miáo tou",打颤:"dǎ zhàn",大藏:"dà zàng",畜牲:"chù shēng",勾搭:"gōu da",树荫:"shù yīn",树杈:"shù chà",铁杆:"tiě gǎn",将相:"jiàng xiàng",份子:"fèn zi",视差:"shì chā",绿荫:"lǜ yīn",枪杆:"qiāng gǎn",缝纫:"féng rèn",愁闷:"chóu mèn",点将:"diǎn jiàng",华佗:"huà tuó",劲射:"jìng shè",箱笼:"xiāng lǒng",终了:"zhōng liǎo",鬓发:"bìn fà",结巴:"jiē ba",苦干:"kǔ gàn",看家:"kān jiā",正旦:"zhēng dàn",中肯:"zhòng kěn",厦门:"xià mén",东莞:"dōng guǎn",食量:"shí liàng",宫调:"gōng diào",间作:"jiàn zuò",弹片:"dàn piàn",差池:"chā chí",漂白:"piǎo bái",杠子:"gàng zi",调处:"tiáo chǔ",好动:"hào dòng",转炉:"zhuàn lú",屏气:"bǐng qì",夹板:"jiā bǎn",哀乐:"āi yuè",干道:"gàn dào",苦处:"kǔ chù",劈柴:"pǐ chái",长势:"zhǎng shì",天华:"tiān huá",共处:"gòng chǔ",校验:"jiào yàn",出塞:"chū sài",磨盘:"mò pán",萎靡:"wěi mǐ",奔丧:"bēn sāng",唱和:"chàng hè",大调:"dà diào",非分:"fēi fèn",钻营:"zuān yíng",夹子:"jiā zi",超载:"chāo zài",更始:"gēng shǐ",铃铛:"líng dang",披散:"pī sàn",发还:"fā huán",转轮:"zhuàn lún",横财:"hèng cái",泡桐:"pāo tóng",抛撒:"pāo sǎ",天呀:"tiān yā",糊糊:"hū hu",躯壳:"qū qiào",通量:"tōng liàng",奉还:"fèng huán",午觉:"wǔ jiào",闷棍:"mèn gùn",浪头:"làng tou",砚台:"yàn tái",油坊:"yóu fáng",学长:"xué zhǎng",过载:"guò zài",笔调:"bǐ diào",衣被:"yī bèi",畜产:"xù chǎn",调阅:"diào yuè",蛮干:"mán gàn",曾祖:"zēng zǔ",提干:"tí gàn",变调:"biàn diào",覆没:"fù mò",模子:"mú zi",乐律:"yuè lǜ",称心:"chèn xīn",木杆:"mù gān",重印:"chóng yìn",自省:"zì xǐng",提调:"tí diào",看相:"kàn xiàng",芋头:"yù tou",下切:"xià qiē",塞上:"sài shàng",铺张:"pū zhāng",藤蔓:"téng wàn",薄幸:"bó xìng",解数:"xiè shù",褪去:"tuì qù",霰弹:"xiàn dàn",柚木:"yóu mù",痕量:"hén liàng",雅乐:"yǎ yuè",号哭:"háo kū",诈降:"zhà xiáng",猪圈:"zhū juàn",咋舌:"zé shé",铣床:"xǐ chuáng",防弹:"fáng dàn",健将:"jiàn jiàng",丽水:"lí shuǐ",削发:"xuē fà",空当:"kòng dāng",多相:"duō xiàng",鲜见:"xiǎn jiàn",划桨:"huá jiǎng",载波:"zài bō",跳蚤:"tiào zao",俏皮:"qiào pí",吧嗒:"bā dā",结发:"jié fà",了断:"liǎo duàn",同调:"tóng diào",石磨:"shí mò",时差:"shí chā",鼻塞:"bí sè",挑子:"tiāo zi",推磨:"tuī mò",武侯:"wǔ hóu",抹煞:"mǒ shā",调转:"diào zhuǎn",籍没:"jí mò",还债:"huán zhài",调演:"diào yǎn",分划:"fēn huá",奇偶:"jī ǒu",断喝:"duàn hè",闷雷:"mèn léi",狼藉:"láng jí",饭量:"fàn liàng",还礼:"huán lǐ",转调:"zhuǎn diào",星相:"xīng xiàng",手相:"shǒu xiàng",配乐:"pèi yuè",盖头:"gài tou",连杆:"lián gǎn",簿记:"bù jì",刀把:"dāo bà",量词:"liàng cí",名角:"míng jué",步调:"bù diào",校本:"jiào běn",账簿:"zhàng bù",隽永:"juàn yǒng",稍为:"shāo wéi",易传:"yì zhuàn",乐谱:"yuè pǔ",牵累:"qiān lěi",答理:"dā li",喝斥:"hè chì",吟哦:"yín é",干渠:"gàn qú",海量:"hǎi liàng",精当:"jīng dàng",着床:"zhuó chuáng",月相:"yuè xiàng",庶几:"shù jī",宫观:"gōng guàn",论处:"lùn chǔ",征辟:"zhēng bì",厚朴:"hòu pò",介壳:"jiè qiào",吭哧:"kēng chī",咯血:"kǎ xiě",铺陈:"pū chén",重生:"chóng shēng",乐理:"yuè lǐ",哀号:"āi háo",藏历:"zàng lì",刚劲:"gāng jìng",削平:"xuē píng",浓荫:"nóng yīn",城垛:"chéng duǒ",当差:"dāng chāi",正传:"zhèng zhuàn",并处:"bìng chǔ",创面:"chuāng miàn",旦角:"dàn jué",薄礼:"bó lǐ",晃荡:"huàng dang",臊子:"sào zi",家什:"jiā shí",闷头:"mēn tóu",美发:"měi fà",度数:"dù shu",着凉:"zháo liáng",闯将:"chuǎng jiàng",几案:"jī àn",姘头:"pīn tou",差数:"chā shù",散碎:"sǎn suì",壅塞:"yōng sè",寒颤:"hán zhàn",牵强:"qiān qiǎng",无间:"wú jiàn",轮转:"lún zhuàn",号叫:"háo jiào",铺排:"pū pái",降伏:"xiáng fú",轧钢:"zhá gāng",东阿:"dōng ē",病假:"bìng jià",累加:"lěi jiā",梗塞:"gěng sè",弹夹:"dàn jiā",钻心:"zuān xīn",晃眼:"huǎng yǎn",魔爪:"mó zhǎo",标量:"biāo liàng",憋闷:"biē mèn",猜度:"cāi duó",处士:"chǔ shì",官差:"guān chāi",讨还:"tǎo huán",长门:"cháng mén",馏分:"liú fēn",里弄:"lǐ lòng",色相:"sè xiàng",雅兴:"yǎ xìng",角力:"jué lì",弹坑:"dàn kēng",枝杈:"zhī chà",夹具:"jiā jù",处刑:"chǔ xíng",悍将:"hàn jiàng",好学:"hào xué",好好:"hǎo hǎo",银发:"yín fà",扫把:"sào bǎ",法相:"fǎ xiàng",贵干:"guì gàn",供气:"gōng qì",空余:"kòng yú",捆扎:"kǔn zā",瘠薄:"jí bó",浆糊:"jiàng hu",嘎吱:"gā zhī",调令:"diào lìng",法帖:"fǎ tiè",淋病:"lìn bìng",调派:"diào pài",转盘:"zhuàn pán",供稿:"gōng gǎo",差官:"chāi guān",忧闷:"yōu mèn",教长:"jiào zhǎng",重唱:"chóng chàng",酒兴:"jiǔ xìng",乐坛:"yuè tán",花呢:"huā ní",叱喝:"chì hè",膀臂:"bǎng bì",得空:"dé kòng",转圈:"zhuàn quān",横暴:"hèng bào",哄抬:"hōng tái",引吭:"yǐn háng",载货:"zài huò",中计:"zhòng jì",官长:"guān zhǎng",相面:"xiàng miàn",看头:"kàn tou",盼头:"pàn tou",意兴:"yì xìng",军乐:"jūn yuè",累次:"lěi cì",骨嘟:"gǔ dū",燕赵:"yān zhào",报丧:"bào sāng",弥撒:"mí sa",挨斗:"ái dòu",扁舟:"piān zhōu",丑角:"chǒu jué",吊丧:"diào sāng",强将:"qiáng jiàng",重奏:"chóng zòu",发辫:"fà biàn",着魔:"zháo mó",着法:"zhāo fǎ",盛放:"shèng fàng",填塞:"tián sè",凶横:"xiōng hèng",稽首:"qǐ shǒu",碑帖:"bēi tiè",冲量:"chōng liàng",发菜:"fà cài",假发:"jiǎ fà",翻卷:"fān juǎn",小量:"xiǎo liàng",胶着:"jiāo zhuó",里子:"lǐ zi",调调:"diào diao",散兵:"sǎn bīng",高挑:"gāo tiǎo",播撒:"bō sǎ",夹心:"jiā xīn",扇动:"shān dòng",叨扰:"tāo rǎo",霓裳:"ní cháng",捻子:"niǎn zi",弥缝:"mí féng",撒布:"sǎ bù",场院:"cháng yuàn",省亲:"xǐng qīn",提拉:"tí lā",惯量:"guàn liàng",强逼:"qiáng bī",强征:"qiáng zhēng",晕车:"yùn chē",数道:"shù dào",带累:"dài lèi",拓本:"tà běn",嫌恶:"xián wù",宿将:"sù jiàng",龟裂:"jūn liè",缠夹:"chán jiā",发式:"fà shì",隔扇:"gé shàn",天分:"tiān fèn",癖好:"pǐ hào",四通:"sì tōng",白术:"bái zhú",划伤:"huá shāng",角斗:"jué dòu",听差:"tīng chāi",岁差:"suì chā",丧礼:"sāng lǐ",脉脉:"mò mò",削瘦:"xuē shòu",撒播:"sǎ bō",莎草:"suō cǎo",犍为:"qián wéi",调头:"diào tóu",龙卷:"lóng juǎn",外调:"wài diào",字帖:"zì tiè",卷发:"juǎn fà",揣度:"chuǎi duó",洋相:"yáng xiàng",散光:"sǎn guāng",骨碌:"gū lu",薄命:"bó mìng",笼头:"lóng tóu",咽炎:"yān yán",碌碡:"liù zhou",片儿:"piàn er",纤手:"qiàn shǒu",散体:"sǎn tǐ",内省:"nèi xǐng",强留:"qiáng liú",解送:"jiè sòng",反间:"fǎn jiàn",少壮:"shào zhuàng",留空:"liú kōng",告假:"gào jià",咳血:"ké xuè",薄暮:"bó mù",铺轨:"pū guǐ",磨削:"mó xuē",治丧:"zhì sāng",叉子:"chā zi",哄动:"hōng dòng",蛾子:"é zi",出落:"chū luò",股长:"gǔ zhǎng",贵处:"guì chù",还魂:"huán hún",例假:"lì jià",刹住:"shā zhù",身量:"shēn liàng",同好:"tóng hào",模量:"mó liàng",更生:"gēng shēng",服丧:"fú sāng",率直:"shuài zhí",字模:"zì mú",散架:"sǎn jià",答腔:"dā qiāng",交恶:"jiāo wù",薄情:"bó qíng",眼泡:"yǎn pāo",袅娜:"niǎo nuó",草垛:"cǎo duò",冲劲:"chòng jìn",呢喃:"ní nán",切中:"qiè zhòng",挑灯:"tiǎo dēng",还愿:"huán yuàn",激将:"jī jiàng",更鼓:"gēng gǔ",没药:"mò yào",败兴:"bài xìng",切面:"qiē miàn",散户:"sǎn hù",累进:"lěi jìn",背带:"bēi dài",秤杆:"chèng gǎn",碾坊:"niǎn fáng",簿子:"bù zi",扳手:"bān shǒu",铅山:"yán shān",儒将:"rú jiàng",重光:"chóng guāng",剪发:"jiǎn fà",长上:"zhǎng shàng",小传:"xiǎo zhuàn",压轴:"yā zhòu",弱冠:"ruò guàn",花卷:"huā juǎn",横祸:"hèng huò",夹克:"jiā kè",光晕:"guāng yùn",披靡:"pī mǐ",对调:"duì diào",夹持:"jiā chí",空额:"kòng é",平调:"píng diào",铺床:"pū chuáng",丧钟:"sāng zhōng",作乐:"zuò lè",少府:"shào fǔ",数数:"shuò shuò",奔头:"bèn tou",进给:"jìn jǐ",率性:"shuài xìng",乐子:"lè zi",绑扎:"bǎng zā",挑唆:"tiǎo suō",漂洗:"piǎo xǐ",夹墙:"jiā qiáng",咳喘:"ké chuǎn",乜斜:"miē xie",错处:"cuò chù",闷酒:"mèn jiǔ",时调:"shí diào",重孙:"chóng sūn",经幢:"jīng chuáng",圩场:"xū chǎng",调门:"diào mén",花头:"huā tóu",划拉:"huá la",套色:"tào shǎi",粗率:"cū shuài",相率:"xiāng shuài",款识:"kuǎn zhì",吁请:"yù qǐng",荫蔽:"yīn bì",文蛤:"wén gé",嘀嗒:"dī dā",调取:"diào qǔ",交差:"jiāo chāi",落子:"luò zǐ",相册:"xiàng cè",絮叨:"xù dao",落发:"luò fà",异相:"yì xiàng",浸没:"jìn mò",角抵:"jué dǐ",卸载:"xiè zài",春卷:"chūn juǎn",扎挣:"zhá zheng",畜养:"xù yǎng",吡咯:"bǐ luò",垛子:"duò zi",恶少:"è shào",发际:"fà jì",红苕:"hóng sháo",糨糊:"jiàng hu",哭丧:"kū sāng",稍息:"shào xī",晕船:"yùn chuán",校样:"jiào yàng",外差:"wài chā",脚爪:"jiǎo zhǎo",铺展:"pū zhǎn",芫荽:"yán sui",夹紧:"jiā jǐn",尿泡:"suī pào",丧乱:"sāng luàn",凶相:"xiōng xiàng",华发:"huá fà",打场:"dǎ cháng",云量:"yún liàng",正切:"zhèng qiē",划拳:"huá quán",划艇:"huá tǐng",评传:"píng zhuàn",拉纤:"lā qiàn",句读:"jù dòu",散剂:"sǎn jì",骨殖:"gǔ shi",塞音:"sè yīn",铺叙:"pū xù",阏氏:"yān zhī",冷颤:"lěng zhàn",煞住:"shā zhù",少男:"shào nán",管乐:"guǎn yuè",号啕:"háo táo",纳降:"nà xiáng",拥塞:"yōng sè",万乘:"wàn shèng",杆儿:"gǎn ér",葛藤:"gé téng",簿籍:"bù jí",皮夹:"pí jiā",校准:"jiào zhǔn",允当:"yǔn dàng",器量:"qì liàng",选调:"xuǎn diào",扮相:"bàn xiàng",干才:"gàn cái",基干:"jī gàn",割切:"gē qiē",国乐:"guó yuè",卡壳:"qiǎ ké",辟谷:"bì gǔ",磨房:"mò fáng",咿呀:"yī yā",芥末:"jiè mo",薄技:"bó jì",产假:"chǎn jià",诗兴:"shī xìng",重出:"chóng chū",转椅:"zhuàn yǐ",酌量:"zhuó liang",簿册:"bù cè",藏青:"zàng qīng",的士:"dī shì",调人:"diào rén",解元:"jiè yuán",茎干:"jīng gàn",巨量:"jù liàng",榔头:"láng tou",率真:"shuài zhēn",喷香:"pèn xiāng",锁钥:"suǒ yuè",虾蟆:"há má",相图:"xiàng tú",兴会:"xìng huì",灶头:"zào tóu",重婚:"chóng hūn",钻洞:"zuān dòng",忖度:"cǔn duó",党参:"dǎng shēn",调温:"diào wēn",杆塔:"gān tǎ",葛布:"gé bù",拱券:"gǒng xuàn",夹生:"jiā shēng",露馅:"lòu xiàn",恰切:"qià qiè",散见:"sǎn jiàn",哨卡:"shào qiǎ",烫发:"tàng fà",体量:"tǐ liàng",挺括:"tǐng kuò",系带:"jì dài",相士:"xiàng shì",羊圈:"yáng juàn",转矩:"zhuàn jǔ",吧台:"bā tái",苍术:"cāng zhú",菲薄:"fěi bó",蛤蚧:"gé jiè",蛤蜊:"gé lí",瓜蔓:"guā wàn",怪相:"guài xiàng",临帖:"lín tiè",女红:"nǚ gōng",刨床:"bào chuáng",翘楚:"qiáo chǔ",数九:"shǔ jiǔ",谈兴:"tán xìng",雄劲:"xióng jìng",扎染:"zā rǎn",遮荫:"zhē yīn",周正:"zhōu zhèng",赚头:"zhuàn tou",扒手:"pá shǒu",搀和:"chān huo",诚朴:"chéng pǔ",肚量:"dù liàng",干结:"gān jié",工尺:"gōng chě",家累:"jiā lěi",曲水:"qū shuǐ",沙参:"shā shēn",挑花:"tiǎo huā",阿门:"ā mén",背篓:"bēi lǒu",瘪三:"biē sān",裁处:"cái chǔ",创痛:"chuāng tòng",福相:"fú xiàng",更动:"gēng dòng",豪兴:"háo xìng",还阳:"huán yáng",还嘴:"huán zuǐ",借调:"jiè diào",卷云:"juǎn yún",流弹:"liú dàn",想头:"xiǎng tou",削价:"xuē jià",校阅:"jiào yuè",雅量:"yǎ liàng",别传:"bié zhuàn",薄酒:"bó jiǔ",春假:"chūn jià",发妻:"fà qī",哗哗:"huā huā",宽绰:"kuān chuo",了悟:"liǎo wù",切花:"qiē huā",审度:"shěn duó",应许:"yīng xǔ",转台:"zhuàn tái",仔猪:"zǐ zhū",裁量:"cái liáng",藏戏:"zàng xì",乘兴:"chéng xìng",绸缪:"chóu móu",摧折:"cuī zhé",调经:"tiáo jīng",调职:"diào zhí",缝缀:"féng zhuì",骨朵:"gū duǒ",核儿:"hú er",恒量:"héng liàng",还价:"huán jià",浑朴:"hún pǔ",苦差:"kǔ chāi",面糊:"miàn hù",煞车:"shā chē",省视:"xǐng shì",什锦:"shí jǐn",信差:"xìn chāi",余切:"yú qiē",攒眉:"cuán méi",炸糕:"zhá gāo",钻杆:"zuàn gǎn",扒灰:"pá huī",拌和:"bàn huò",长调:"cháng diào",大溜:"dà liù",抖搂:"dǒu lōu",飞转:"fēi zhuàn",干仗:"gàn zhàng",好胜:"hào shèng",画片:"huà piàn",搅混:"jiǎo hún",螺杆:"luó gǎn",木模:"mù mú",怒号:"nù háo",频数:"pín shù",无宁:"wú níng",遗少:"yí shào",邮差:"yóu chāi",占卦:"zhān guà",占星:"zhān xīng",重审:"chóng shěn",自量:"zì liàng",调防:"diào fáng",发廊:"fà láng",反调:"fǎn diào",缝子:"fèng zi",更夫:"gēng fū",骨子:"gǔ zi",光杆:"guāng gǎn",夹棍:"jiā gùn",居丧:"jū sāng",巨贾:"jù gǔ",看押:"kān yā",空转:"kōng zhuàn",量力:"liàng lì",炮烙:"páo luò",赔还:"péi huán",扑扇:"pū shān",散记:"sǎn jì",散件:"sǎn jiàn",删削:"shān xuē",射干:"shè gàn",条几:"tiáo jī",偷空:"tōu kòng",削壁:"xuē bì",校核:"jiào hé",阴干:"yīn gān",择菜:"zhái cài",重九:"chóng jiǔ",主调:"zhǔ diào",自禁:"zì jīn",吧唧:"bā jī",便溺:"biàn niào",词调:"cí diào",叨咕:"dáo gu",落枕:"lào zhěn",铺砌:"pū qì",刷白:"shuà bái",委靡:"wěi mǐ",系泊:"xì bó",相马:"xiàng mǎ",熨帖:"yù tiē",转筋:"zhuàn jīn",棒喝:"bàng hè",傧相:"bīn xiàng",镐头:"gǎo tóu",间苗:"jiàn miáo",乐池:"yuè chí",卖相:"mài xiàng",屏弃:"bǐng qì",铅弹:"qiān dàn",切变:"qiē biàn",请调:"qǐng diào",群氓:"qún méng",散板:"sǎn bǎn",省察:"xǐng chá",事假:"shì jià",纤绳:"qiàn shéng",重影:"chóng yǐng",耕种:"gēng zhòng",种地:"zhòng dì",种菜:"zhòng cài",栽种:"zāi zhòng",接种:"jiē zhòng",垦种:"kěn zhòng",种殖:"zhòng zhí",种瓜:"zhòng guā",种豆:"zhòng dòu",种树:"zhòng shù",睡着:"shuì zháo",笼子:"lóng zi",重启:"chóng qǐ",重整:"chóng zhěng",重弹:"chóng tán",重足:"chóng zú",重山:"chóng shān",重游:"chóng yóu",重峦:"chóng luán",爷爷:"yé ye",奶奶:"nǎi nai",姥爷:"lǎo ye",爸爸:"bà ba",妈妈:"mā ma",婶婶:"shěn shen",舅舅:"jiù jiu",姑姑:"gū gu",叔叔:"shū shu",姨夫:"yí fu",舅母:"jiù mu",姑父:"gū fu",姐夫:"jiě fu",婆婆:"pó po",公公:"gōng gong",舅子:"jiù zi",姐姐:"jiě jie",哥哥:"gē ge",妹妹:"mèi mei",妹夫:"mèi fu",姨子:"yí zi",宝宝:"bǎo bao",娃娃:"wá wa",孩子:"hái zi",日子:"rì zi",样子:"yàng zi",狮子:"shī zi",身子:"shēn zi",架子:"jià zi",嫂子:"sǎo zi",鼻子:"bí zi",亭子:"tíng zi",折子:"zhé zi",面子:"miàn zi",脖子:"bó zi",辈子:"bèi zi",帽子:"mào zi",拍子:"pāi zi",柱子:"zhù zi",辫子:"biàn zi",鸽子:"gē zi",房子:"fáng zi",丸子:"wán zi",摊子:"tān zi",牌子:"pái zi",胡子:"hú zi",鬼子:"guǐ zi",矮子:"ǎi zi",鸭子:"yā zi",小子:"xiǎo zi",影子:"yǐng zi",屋子:"wū zi",对子:"duì zi",点子:"diǎn zi",本子:"běn zi",种子:"zhǒng zi",儿子:"ér zi",兔子:"tù zi",骗子:"piàn zi",院子:"yuàn zi",猴子:"hóu zi",嗓子:"sǎng zi",侄子:"zhí zi",柿子:"shì zi",钳子:"qián zi",虱子:"shī zi",瓶子:"píng zi",豹子:"bào zi",筷子:"kuài zi",篮子:"lán zi",绳子:"shéng zi",嘴巴:"zuǐ ba",耳朵:"ěr duo",茄子:"qié zi",蚌埠:"bèng bù",崆峒:"kōng tóng",琵琶:"pí pa",蘑菇:"mó gu",葫芦:"hú lu",狐狸:"hú li",桔子:"jú zi",盒子:"hé zi",桌子:"zhuō zi",竹子:"zhú zi",师傅:"shī fu",衣服:"yī fu",袜子:"wà zi",杯子:"bēi zi",刺猬:"cì wei",麦子:"mài zi",队伍:"duì wu",知了:"zhī liǎo",鱼儿:"yú er",馄饨:"hún tun",灯笼:"dēng long",庄稼:"zhuāng jia",聪明:"cōng ming",镜子:"jìng zi",银子:"yín zi",盘子:"pán zi",了却:"liǎo què",力气:"lì qi",席子:"xí zi",林子:"lín zi",朝霞:"zhāo xiá",朝夕:"zhāo xī",朝气:"zhāo qì",翅膀:"chì bǎng",省长:"shěng zhǎng",臧否:"zāng pǐ",否泰:"pǐ tài",变得:"biàn de",丈夫:"zhàng fu",豆腐:"dòu fu",笔杆:"bǐ gǎn",枞阳:"zōng yáng",行人:"xíng rén",打着:"dǎ zhe",第一:"dì yī",万一:"wàn yī",之一:"zhī yī",得之:"dé zhī",统一:"tǒng yī",唯一:"wéi yī",专一:"zhuān yī",单一:"dān yī",如一:"rú yī",其一:"qí yī",合一:"hé yī",逐一:"zhú yī",周一:"zhōu yī",初一:"chū yī",研一:"yán yī",归一:"guī yī",假一:"jiǎ yī",闻一:"wén yī",了了:"liǎo liǎo",公了:"gōng liǎo",私了:"sī liǎo",一月:"yī yuè",一号:"yī hào",一级:"yī jí",一等:"yī děng",一哥:"yī gē",月一:"yuè yī",一一:"yī yī",二一:"èr yī",三一:"sān yī",四一:"sì yī",五一:"wǔ yī",六一:"liù yī",七一:"qī yī",八一:"bā yī",九一:"jiǔ yī","一〇":"yī líng",一零:"yī líng",一二:"yī èr",一三:"yī sān",一四:"yī sì",一五:"yī wǔ",一六:"yī liù",一七:"yī qī",一八:"yī bā",一九:"yī jiǔ",一又:"yī yòu",一饼:"yī bǐng",一楼:"yī lóu",为例:"wéi lì",为准:"wéi zhǔn",沧海:"cāng hǎi",难为:"nán wéi",责难:"zé nàn",患难:"huàn nàn",磨难:"mó nàn",大难:"dà nàn",刁难:"diāo nàn",殉难:"xùn nàn",落难:"luò nàn",罹难:"lí nàn",灾难:"zāi nàn",难民:"nàn mín",苦难:"kǔ nàn",危难:"wēi nàn",发难:"fā nàn",逃难:"táo nàn",避难:"bì nàn",遇难:"yù nàn",阻难:"zǔ nàn",厄难:"è nàn",徇难:"xùn nàn",空难:"kōng nàn",喜欢:"xǐ huan",朝朝:"zhāo zhāo",不行:"bù xíng",轧轧:"yà yà",弯曲:"wān qū",扭曲:"niǔ qū",曲直:"qū zhí",委曲:"wěi qū",酒曲:"jiǔ qū",曲径:"qū jìng",曲解:"qū jiě",歪曲:"wāi qū",曲线:"qū xiàn",曲阜:"qū fù",九曲:"jiǔ qū",曲折:"qū zhé",曲肱:"qū gōng",曲意:"qū yì",仡佬:"gē lǎo"},Kne=Object.keys(BC).map(e=>({zh:e,pinyin:BC[e],probability:2e-8,length:2,priority:Mr.Normal,dict:Symbol("dict2")})),$C={为什么:"wèi shén me",实际上:"shí jì shang",检察长:"jiǎn chá zhǎng",干什么:"gàn shén me",这会儿:"zhè huì er",尽可能:"jǐn kě néng",董事长:"dǒng shì zhǎng",了不起:"liǎo bù qǐ",参谋长:"cān móu zhǎng",朝鲜族:"cháo xiǎn zú",海内外:"hǎi nèi wài",禁不住:"jīn bú zhù",柏拉图:"bó lā tú",不在乎:"bú zài hu",洛杉矶:"luò shān jī",有点儿:"yǒu diǎn er",迫击炮:"pǎi jī pào",不得了:"bù dé liǎo",马尾松:"mǎ wěi sōng",运输量:"yùn shū liàng",发脾气:"fā pí qi",士大夫:"shì dà fū",鸭绿江:"yā lù jiāng",压根儿:"yà gēn er",对得起:"duì de qǐ",那会儿:"nà huì er",自个儿:"zì gě er",物理量:"wù lǐ liàng",怎么着:"zěn me zhāo",明晃晃:"míng huǎng huǎng",节假日:"jié jià rì",心里话:"xīn lǐ huà",发行量:"fā xíng liàng",兴冲冲:"xìng chōng chōng",分子量:"fēn zǐ liàng",国子监:"guó zǐ jiàn",老大难:"lǎo dà nán",党内外:"dǎng nèi wài",这么着:"zhè me zhāo",少奶奶:"shào nǎi nai",暗地里:"àn dì lǐ",更年期:"gēng nián qī",工作量:"gōng zuò liàng",背地里:"bèi dì lǐ",山里红:"shān li hóng",好好儿:"hǎo hāo er",交响乐:"jiāo xiǎng yuè",好意思:"hǎo yì si",吐谷浑:"tǔ yù hún",没意思:"méi yì si",理发师:"lǐ fà shī",塔什干:"tǎ shí gān",充其量:"chōng qí liàng",靠得住:"kào de zhù",车行道:"chē xíng dào",人行道:"rén xíng dào",中郎将:"zhōng láng jiàng",照明弹:"zhào míng dàn",烟幕弹:"yān mù dàn",没奈何:"mò nài hé",乱哄哄:"luàn hōng hōng",惠更斯:"huì gēng sī",载重量:"zài zhòng liàng",瞧得起:"qiáo de qǐ",纪传体:"jì zhuàn tǐ",阿房宫:"ē páng gōng",卷心菜:"juǎn xīn cài",戏班子:"xì bān zi",过得去:"guò de qù",花岗石:"huā gāng shí",外甥女:"wài sheng nǚ",团团转:"tuán tuán zhuàn",大堡礁:"dà bǎo jiāo",燃烧弹:"rán shāo dàn",劳什子:"láo shí zi",摇滚乐:"yáo gǔn yuè",夹竹桃:"jiā zhú táo",闹哄哄:"nào hōng hōng",三连冠:"sān lián guàn",重头戏:"zhòng tóu xì",二人转:"èr rén zhuàn",节骨眼:"jiē gǔ yǎn",知识面:"zhī shi miàn",护士长:"hù shi zhǎng",信号弹:"xìn hào dàn",干电池:"gān diàn chí",枪杆子:"qiāng gǎn zi",哭丧棒:"kū sāng bàng",鼻咽癌:"bí yān ái",瓦岗军:"wǎ gāng jūn",买得起:"mǎi de qǐ",癞蛤蟆:"lài há ma",脊梁骨:"jǐ liang gǔ",子母弹:"zǐ mǔ dàn",开小差:"kāi xiǎo chāi",女强人:"nǚ qiáng rén",英雄传:"yīng xióng zhuàn",爵士乐:"jué shì yuè",说笑话:"shuō xiào hua",碰头会:"pèng tóu huì",玻璃钢:"bō li gāng",曳光弹:"yè guāng dàn",少林拳:"shào lín quán",咏叹调:"yǒng tàn diào",少先队:"shào xiān duì",灵长目:"líng zhǎng mù",对着干:"duì zhe gàn",蒙蒙亮:"méng méng liàng",软骨头:"ruǎn gǔ tou",铺盖卷:"pū gài juǎn",和稀泥:"huò xī ní",背黑锅:"bēi hēi guō",红彤彤:"hóng tōng tōng",武侯祠:"wǔ hóu cí",打哆嗦:"dǎ duō suo",户口簿:"hù kǒu bù",马尾藻:"mǎ wěi zǎo",夜猫子:"yè māo zi",打手势:"dǎ shǒu shì",龙王爷:"lóng wáng yé",气头上:"qì tóu shang",糊涂虫:"hú tu chóng",笔杆子:"bǐ gǎn zi",占便宜:"zhàn pián yi",打主意:"dǎ zhǔ yì",多弹头:"duō dàn tóu",露一手:"lòu yì shǒu",堰塞湖:"yàn sè hú",保得住:"bǎo de zhù",趵突泉:"bào tū quán",奥得河:"ào de hé",司务长:"sī wù zhǎng",禁不起:"jīn bù qǐ",什刹海:"shí chà hǎi",莲花落:"lián huā lào",见世面:"jiàn shì miàn",豁出去:"huō chū qù",电位差:"diàn wèi chā",挨个儿:"āi gè er",那阵儿:"nà zhèn er",肺活量:"fèi huó liàng",大师傅:"dà shī fu",掷弹筒:"zhì dàn tǒng",打呼噜:"dǎ hū lu",广渠门:"ān qú mén",未见得:"wèi jiàn dé",大婶儿:"dà shěn er",谈得来:"tán de lái",脚丫子:"jiǎo yā zi",空包弹:"kōng bāo dàn",窝里斗:"wō li dòu",弹着点:"dàn zhuó diǎn",个头儿:"gè tóu er",看得起:"kàn de qǐ",糊涂账:"hú tu zhàng",大猩猩:"dà xīng xing",禁得起:"jīn de qǐ",法相宗:"fǎ xiàng zōng",可怜相:"kě lián xiàng",吃得下:"chī de xià",汉堡包:"hàn bǎo bāo",闹嚷嚷:"nào rāng rāng",数来宝:"shǔ lái bǎo",合得来:"hé de lái",干性油:"gān xìng yóu",闷葫芦:"mèn hú lu",呱呱叫:"guā guā jiào",西洋参:"xī yáng shēn",林荫道:"lín yīn dào",拉家常:"lā jiā cháng",卷铺盖:"juǎn pū gài",过得硬:"guò de yìng",飞将军:"fēi jiāng jūn",挑大梁:"tiǎo dà liáng",哈巴狗:"hǎ ba gǒu",过家家:"guò jiā jiā",催泪弹:"cuī lèi dàn",雨夹雪:"yǔ jiā xuě",敲竹杠:"qiāo zhú gàng",列车长:"liè chē zhǎng",华达呢:"huá dá ní",犯得着:"fàn de zháo",土疙瘩:"tǔ gē da",煞风景:"shā fēng jǐng",轻量级:"qīng liàng jí",羞答答:"xiū dā dā",石子儿:"shí zǐ er",达姆弹:"dá mǔ dàn",科教片:"kē jiào piān",侃大山:"kǎn dà shān",丁点儿:"dīng diǎn er",吃得消:"chī de xiāo",捋虎须:"luō hǔ xū",高丽参:"gāo lí shēn",众生相:"zhòng shēng xiàng",咽峡炎:"yān xiá yán",禁得住:"jīn de zhù",吃得开:"chī de kāi",柞丝绸:"zuò sī chóu",应声虫:"yìng shēng chóng",数得着:"shǔ de zháo",傻劲儿:"shǎ jìn er",铅玻璃:"qiān bō li",可的松:"kě dì sōng",划得来:"huá de lái",晕乎乎:"yūn hū hū",屎壳郎:"shǐ ke làng",尥蹶子:"liào juě zi",藏红花:"zàng hóng huā",闷罐车:"mèn guàn chē",卡脖子:"qiǎ bó zi",红澄澄:"hóng deng deng",赶得及:"gǎn de jí",当间儿:"dāng jiàn er",露马脚:"lòu mǎ jiǎo",鸡内金:"jī nèi jīn",犯得上:"fàn de shàng",钉齿耙:"dīng chǐ bà",饱和点:"bǎo hé diǎn",龙爪槐:"lóng zhǎo huái",喝倒彩:"hè dào cǎi",定冠词:"dìng guàn cí",担担面:"dàn dan miàn",吃得住:"chī de zhù",爪尖儿:"zhuǎ jiān er",支着儿:"zhī zhāo er",折跟头:"zhē gēn tou",阴着儿:"yīn zhāo er",烟卷儿:"yān juǎn er",宣传弹:"xuān chuán dàn",信皮儿:"xìn pí er",弦切角:"xián qiē jiǎo",缩砂密:"sù shā mì",说得来:"shuō de lái",水漂儿:"shuǐ piāo er",耍笔杆:"shuǎ bǐ gǎn",数得上:"shǔ de shàng",数不着:"shǔ bù zháo",数不清:"shǔ bù qīng",什件儿:"shí jiàn er",生死簿:"shēng sǐ bù",扇风机:"shān fēng jī",撒呓挣:"sā yì zheng",日记簿:"rì jì bù",热得快:"rè de kuài",亲家公:"qìng jia gōng",奇函数:"jī hán shù",拍纸簿:"pāi zhǐ bù",努劲儿:"nǔ jìn er",泥娃娃:"ní wá wa",内切圆:"nèi qiē yuán",哪会儿:"nǎ huì er",闷头儿:"mēn tóu er",没谱儿:"méi pǔ er",铆劲儿:"mǎo jìn er",溜肩膀:"liū jiān bǎng",了望台:"liào wàng tái",老来少:"lǎo lái shào",坤角儿:"kūn jué er",考勤簿:"kǎo qín bù",卷笔刀:"juǎn bǐ dāo",进给量:"jìn jǐ liàng",划不来:"huá bù lái",汗褂儿:"hàn guà er",鼓囊囊:"gǔ nāng nāng",够劲儿:"gòu jìn er",公切线:"gōng qiē xiàn",搁得住:"gé de zhù",赶浪头:"gǎn làng tóu",赶得上:"gǎn de shàng",干酵母:"gān jiào mǔ",嘎渣儿:"gā zhā er",嘎嘣脆:"gā bēng cuì",对得住:"duì de zhù",逗闷子:"dòu mèn zi",顶呱呱:"dǐng guā guā",滴溜儿:"dī liù er",大轴子:"dà zhòu zi",打板子:"dǎ bǎn zi",寸劲儿:"cùn jìn er",醋劲儿:"cù jìn er",揣手儿:"chuāi shǒu er",冲劲儿:"chòng jìn er",吃得来:"chī de lái",不更事:"bù gēng shì",奔头儿:"bèn tou er",百夫长:"bǎi fū zhǎng",娃娃亲:"wá wa qīn",死劲儿:"sǐ jìn er",骨朵儿:"gū duǒ er",功劳簿:"gōng láo bù",都江堰:"dū jiāng yàn",一担水:"yí dàn shuǐ",否极泰:"pǐ jí tài",泰来否:"tài lái pǐ",咳特灵:"ké tè líng",开户行:"kāi hù háng",郦食其:"lì yì jī",花事了:"huā shì liǎo",一更更:"yì gēng gēng",一重山:"yì chóng shān",风一更:"fēng yì gēng",雪一更:"xuě yì gēng",归一码:"guī yì mǎ",星期一:"xīng qī yī",礼拜一:"lǐ bài yī",一季度:"yī jì dù",一月一:"yī yuè yī",一字马:"yī zì mǎ",一是一:"yī shì yī",一次方:"yī cì fāng",一阳指:"yī yáng zhǐ",一字决:"yī zì jué",一年级:"yī nián jí",一不做:"yī bú zuò",屈戌儿:"qū qu ér",难为水:"nán wéi shuǐ",难为情:"nán wéi qíng",行一行:"xíng yì háng",别别的:"biè bié de",干哪行:"gàn nǎ háng",干一行:"gàn yì háng",曲别针:"qū bié zhēn"},Vne=Object.keys($C).map(e=>({zh:e,pinyin:$C[e],probability:2e-8,length:3,priority:Mr.Normal,dict:Symbol("dict3")})),DC={成吉思汗:"chéng jí sī hán",四通八达:"sì tōng bā dá",一模一样:"yì mú yí yàng",青藏高原:"qīng zàng gāo yuán",阿弥陀佛:"ē mí tuó fó",解放思想:"jiè fàng sī xiǎng",所作所为:"suǒ zuò suǒ wéi",迷迷糊糊:"mí mí hu hū",荷枪实弹:"hè qiāng shí dàn",兴高采烈:"xìng gāo cǎi liè",无能为力:"wú néng wéi lì",布鲁塞尔:"bù lǔ sài ěr",为所欲为:"wéi suǒ yù wéi",克什米尔:"kè shí mǐ ěr",没完没了:"méi wán méi liǎo",不为人知:"bù wéi rén zhī",结结巴巴:"jiē jiē bā bā",前仆后继:"qián pū hòu jì",铺天盖地:"pū tiān gài dì",直截了当:"zhí jié liǎo dàng",供不应求:"gōng bú yìng qiú",御史大夫:"yù shǐ dà fū",不为瓦全:"bù wéi wǎ quán",不可收拾:"bù kě shōu shi",胡作非为:"hú zuò fēi wéi",分毫不差:"fēn háo bú chà",模模糊糊:"mó mó hu hū",不足为奇:"bù zú wéi qí",悄无声息:"qiǎo wú shēng xī",了如指掌:"liǎo rú zhǐ zhǎng",深恶痛绝:"shēn wù tòng jué",高高兴兴:"gāo gāo xìng xìng",唉声叹气:"āi shēng tàn qì",汉藏语系:"hàn zàng yǔ xì",处心积虑:"chǔ xīn jī lǜ",泣不成声:"qì bù chéng shēng",半夜三更:"bàn yè sān gēng",失魂落魄:"shī hún luò pò",二十八宿:"èr shí bā xiù",转来转去:"zhuàn lái zhuàn qù",数以万计:"shǔ yǐ wàn jì",相依为命:"xiāng yī wéi mìng",恋恋不舍:"liàn liàn bù shě",屈指可数:"qū zhǐ kě shǔ",神出鬼没:"shén chū guǐ mò",结结实实:"jiē jiē shí shí",有的放矢:"yǒu dì fàng shǐ",叽哩咕噜:"jī lǐ gū lū",调兵遣将:"diào bīng qiǎn jiàng",载歌载舞:"zài gē zài wǔ",转危为安:"zhuǎn wēi wéi ān",踏踏实实:"tā tā shi shí",桑给巴尔:"sāng jǐ bā ěr",装模作样:"zhuāng mú zuò yàng",见义勇为:"jiàn yì yǒng wéi",相差无几:"xiāng chā wú jǐ",叹为观止:"tàn wéi guān zhǐ",闷闷不乐:"mèn mèn bú lè",喜怒哀乐:"xǐ nù āi lè",鲜为人知:"xiǎn wéi rén zhī",张牙舞爪:"zhāng yá wǔ zhǎo",为非作歹:"wéi fēi zuò dǎi",含糊其辞:"hán hú qí cí",疲于奔命:"pí yú bēn mìng",勉为其难:"miǎn wéi qí nán",依依不舍:"yī yī bù shě",顶头上司:"dǐng tóu shàng si",不着边际:"bù zhuó biān jì",大模大样:"dà mú dà yàng",寻欢作乐:"xún huān zuò lè",一走了之:"yì zǒu liǎo zhī",字里行间:"zì lǐ háng jiān",含含糊糊:"hán hán hu hū",恰如其分:"qià rú qí fèn",破涕为笑:"pò tì wéi xiào",深更半夜:"shēn gēng bàn yè",千差万别:"qiān chā wàn bié",数不胜数:"shǔ bú shèng shǔ",据为己有:"jù wéi jǐ yǒu",天旋地转:"tiān xuán dì zhuàn",养尊处优:"yǎng zūn chǔ yōu",玻璃纤维:"bō li xiān wéi",吵吵闹闹:"chāo chao nào nào",晕头转向:"yūn tóu zhuàn xiàng",土生土长:"tǔ shēng tǔ zhǎng",宁死不屈:"nìng sǐ bù qū",不省人事:"bù xǐng rén shì",尽力而为:"jìn lì ér wéi",精明强干:"jīng míng qiáng gàn",唠唠叨叨:"láo lao dāo dāo",叽叽喳喳:"jī ji zhā zhā",功不可没:"gōng bù kě mò",锲而不舍:"qiè ér bù shě",排忧解难:"pái yōu jiě nàn",稀里糊涂:"xī li hú tú",各有所长:"gè yǒu suǒ cháng",的的确确:"dí dí què què",哄堂大笑:"hōng táng dà xiào",听而不闻:"tīng ér bù wén",刀耕火种:"dāo gēng huǒ zhòng",内分泌腺:"nèi fèn mì xiàn",化险为夷:"huà xiǎn wéi yí",百发百中:"bǎi fā bǎi zhòng",重见天日:"chóng jiàn tiān rì",反败为胜:"fǎn bài wéi shèng",一了百了:"yì liǎo bǎi liǎo",大大咧咧:"dà da liē liē",心急火燎:"xīn jí huǒ liǎo",粗心大意:"cū xīn dà yi",鸡皮疙瘩:"jī pí gē da",夷为平地:"yí wéi píng dì",日积月累:"rì jī yuè lěi",设身处地:"shè shēn chǔ dì",投其所好:"tóu qí suǒ hào",间不容发:"jiān bù róng fà",人满为患:"rén mǎn wéi huàn",穷追不舍:"qióng zhuī bù shě",为时已晚:"wéi shí yǐ wǎn",如数家珍:"rú shǔ jiā zhēn",心里有数:"xīn lǐ yǒu shù",以牙还牙:"yǐ yá huán yá",神不守舍:"shén bù shǒu shě",孟什维克:"mèng shí wéi kè",各自为战:"gè zì wéi zhàn",怨声载道:"yuàn shēng zài dào",救苦救难:"jiù kǔ jiù nàn",好好先生:"hǎo hǎo xiān sheng",怪模怪样:"guài mú guài yàng",抛头露面:"pāo tóu lù miàn",游手好闲:"yóu shǒu hào xián",无所不为:"wú suǒ bù wéi",调虎离山:"diào hǔ lí shān",步步为营:"bù bù wéi yíng",好大喜功:"hào dà xǐ gōng",众矢之的:"zhòng shǐ zhī dì",长生不死:"cháng shēng bù sǐ",蔚为壮观:"wèi wéi zhuàng guān",不可胜数:"bù kě shèng shǔ",鬼使神差:"guǐ shǐ shén chāi",洁身自好:"jié shēn zì hào",敢作敢为:"gǎn zuò gǎn wéi",茅塞顿开:"máo sè dùn kāi",走马换将:"zǒu mǎ huàn jiàng",为时过早:"wéi shí guò zǎo",为人师表:"wéi rén shī biǎo",阴差阳错:"yīn chā yáng cuò",油腔滑调:"yóu qiāng huá diào",重蹈覆辙:"chóng dǎo fù zhé",骂骂咧咧:"mà ma liē liē",絮絮叨叨:"xù xù dāo dāo",如履薄冰:"rú lǚ bó bīng",损兵折将:"sǔn bīng zhé jiàng",拐弯抹角:"guǎi wān mò jiǎo",像模像样:"xiàng mú xiàng yàng",供过于求:"gōng guò yú qiú",开花结果:"kāi huā jiē guǒ",仔仔细细:"zǐ zǐ xì xì",川藏公路:"chuān zàng gōng lù",河北梆子:"hé běi bāng zi",长年累月:"cháng nián lěi yuè",正儿八经:"zhèng er bā jīng",不识抬举:"bù shí tái ju",重振旗鼓:"chóng zhèn qí gǔ",气息奄奄:"qì xī yān yān",紧追不舍:"jǐn zhuī bù shě",服服帖帖:"fú fu tiē tiē",强词夺理:"qiǎng cí duó lǐ",噼里啪啦:"pī li pā lā",人才济济:"rén cái jǐ jǐ",发人深省:"fā rén shēn xǐng",不足为凭:"bù zú wéi píng",为富不仁:"wéi fù bù rén",连篇累牍:"lián piān lěi dú",呼天抢地:"hū tiān qiāng dì",落落大方:"luò luò dà fāng",自吹自擂:"zì chuī zì léi",乐善好施:"lè shàn hào shī",以攻为守:"yǐ gōng wéi shǒu",磨磨蹭蹭:"mó mó cèng cèng",削铁如泥:"xuē tiě rú ní",助纣为虐:"zhù zhòu wéi nüè",以退为进:"yǐ tuì wéi jìn",嘁嘁喳喳:"qī qī chā chā",枪林弹雨:"qiāng lín dàn yǔ",令人发指:"lìng rén fà zhǐ",转败为胜:"zhuǎn bài wéi shèng",转弯抹角:"zhuǎn wān mò jiǎo",在劫难逃:"zài jié nán táo",正当防卫:"zhèng dàng fáng wèi",不足为怪:"bù zú wéi guài",难兄难弟:"nàn xiōng nàn dì",咿咿呀呀:"yī yī yā yā",弹尽粮绝:"dàn jìn liáng jué",阿谀奉承:"ē yú fèng chéng",稀里哗啦:"xī li huā lā",返老还童:"fǎn lǎo huán tóng",好高骛远:"hào gāo wù yuǎn",鹿死谁手:"lù sǐ shéi shǒu",差强人意:"chā qiáng rén yì",大吹大擂:"dà chuī dà léi",成家立业:"chéng jiā lì yè",自怨自艾:"zì yuàn zì yì",负债累累:"fù zhài lěi lěi",古为今用:"gǔ wéi jīn yòng",入土为安:"rù tǔ wéi ān",下不为例:"xià bù wéi lì",一哄而上:"yì hōng ér shàng",没头苍蝇:"méi tóu cāng ying",天差地远:"tiān chā dì yuǎn",风卷残云:"fēng juǎn cán yún",多灾多难:"duō zāi duō nàn",乳臭未干:"rǔ xiù wèi gān",行家里手:"háng jiā lǐ shǒu",狼狈为奸:"láng bèi wéi jiān",处变不惊:"chǔ biàn bù jīng",一唱一和:"yí chàng yí hè",一念之差:"yí niàn zhī chā",金蝉脱壳:"jīn chán tuō qiào",滴滴答答:"dī dī dā dā",硕果累累:"shuò guǒ léi léi",好整以暇:"hào zhěng yǐ xiá",红得发紫:"hóng de fā zǐ",传为美谈:"chuán wéi měi tán",富商大贾:"fù shāng dà gǔ",四海为家:"sì hǎi wéi jiā",了若指掌:"liǎo ruò zhǐ zhǎng",大有可为:"dà yǒu kě wéi",出头露面:"chū tóu lù miàn",鼓鼓囊囊:"gǔ gu nāng nāng",窗明几净:"chuāng míng jī jìng",泰然处之:"tài rán chǔ zhī",怒发冲冠:"nù fà chōng guān",有机玻璃:"yǒu jī bō li",骨头架子:"gǔ tou jià zi",义薄云天:"yì bó yún tiān",一丁点儿:"yī dīng diǎn er",时来运转:"shí lái yùn zhuǎn",陈词滥调:"chén cí làn diào",化整为零:"huà zhěng wéi líng",火烧火燎:"huǒ shāo huǒ liǎo",干脆利索:"gàn cuì lì suǒ",吊儿郎当:"diào er láng dāng",广种薄收:"guǎng zhòng bó shōu",种瓜得瓜:"zhòng guā dé guā",种豆得豆:"zhòng dòu dé dòu",难舍难分:"nán shě nán fēn",歃血为盟:"shà xuè wéi méng",奋发有为:"fèn fā yǒu wéi",阴错阳差:"yīn cuò yáng chā",东躲西藏:"dōng duǒ xī cáng",烟熏火燎:"yān xūn huǒ liǎo",钻牛角尖:"zuān niú jiǎo jiān",乔装打扮:"qiáo zhuāng dǎ bàn",改弦更张:"gǎi xián gēng zhāng",河南梆子:"hé nán bāng zi",好吃懒做:"hào chī lǎn zuò",何乐不为:"hé lè bù wéi",大出风头:"dà chū fēng tóu",攻城掠地:"gōng chéng lüè dì",漂漂亮亮:"piào piào liang liang",折衷主义:"zhé zhōng zhǔ yì",大马哈鱼:"dà mǎ hǎ yú",绿树成荫:"lǜ shù chéng yīn",率先垂范:"shuài xiān chuí fàn",家长里短:"jiā cháng lǐ duǎn",宽大为怀:"kuān dà wéi huái",左膀右臂:"zuǒ bǎng yòu bì",一笑了之:"yí xiào liǎo zhī",天下为公:"tiān xià wéi gōng",还我河山:"huán wǒ hé shān",何足为奇:"hé zú wéi qí",好自为之:"hǎo zì wéi zhī",风姿绰约:"fēng zī chuò yuē",大雨滂沱:"dà yǔ pāng tuó",传为佳话:"chuán wéi jiā huà",吃里扒外:"chī lǐ pá wài",重操旧业:"chóng cāo jiù yè",小家子气:"xiǎo jiā zi qì",少不更事:"shào bù gēng shì",难分难舍:"nán fēn nán shě",添砖加瓦:"tiān zhuān jiā wǎ",是非分明:"shì fēi fēn míng",舍我其谁:"shě wǒ qí shuí",偏听偏信:"piān tīng piān xìn",量入为出:"liàng rù wéi chū",降龙伏虎:"xiáng lóng fú hǔ",钢化玻璃:"gāng huà bō li",正中下怀:"zhèng zhòng xià huái",以身许国:"yǐ shēn xǔ guó",一语中的:"yì yǔ zhòng dì",丧魂落魄:"sàng hún luò pò",三座大山:"sān zuò dà shān",济济一堂:"jǐ jǐ yì táng",好事之徒:"hào shì zhī tú",干净利索:"gàn jìng lì suǒ",出将入相:"chū jiàng rù xiàng",袅袅娜娜:"niǎo niǎo nuó nuó",狐狸尾巴:"hú li wěi ba",好逸恶劳:"hào yì wù láo",大而无当:"dà ér wú dàng",打马虎眼:"dǎ mǎ hu yǎn",板上钉钉:"bǎn shàng dìng dīng",吆五喝六:"yāo wǔ hè liù",虾兵蟹将:"xiā bīng xiè jiàng",水调歌头:"shuǐ diào gē tóu",数典忘祖:"shǔ diǎn wàng zǔ",人事不省:"rén shì bù xǐng",曲高和寡:"qǔ gāo hè guǎ",屡教不改:"lǚ jiào bù gǎi",互为因果:"hù wéi yīn guǒ",互为表里:"hù wéi biǎo lǐ",厚此薄彼:"hòu cǐ bó bǐ",过关斩将:"guò guān zhǎn jiàng",疙疙瘩瘩:"gē ge dā dā",大腹便便:"dà fù pián pián",走为上策:"zǒu wéi shàng cè",冤家对头:"yuān jia duì tóu",有隙可乘:"yǒu xì kě chèng",一鳞半爪:"yì lín bàn zhǎo",片言只语:"piàn yán zhǐ yǔ",开花结实:"kāi huā jié shí",经年累月:"jīng nián lěi yuè",含糊其词:"hán hú qí cí",寡廉鲜耻:"guǎ lián xiǎn chǐ",成年累月:"chéng nián lěi yuè",不徇私情:"bú xùn sī qíng",不当人子:"bù dāng rén zǐ",膀大腰圆:"bǎng dà yāo yuán",指腹为婚:"zhǐ fù wéi hūn",这么点儿:"zhè me diǎn er",意兴索然:"yì xīng suǒ rán",绣花枕头:"xiù huā zhěn tou",无的放矢:"wú dì fàng shǐ",望闻问切:"wàng wén wèn qiè",舍己为人:"shě jǐ wèi rén",穷年累月:"qióng nián lěi yuè",排难解纷:"pái nàn jiě fēn",处之泰然:"chǔ zhī tài rán",指鹿为马:"zhǐ lù wéi mǎ",危如累卵:"wēi rú lěi luǎn",天兵天将:"tiān bīng tiān jiàng",舍近求远:"shě jìn qiú yuǎn",南腔北调:"nán qiāng běi diào",苦中作乐:"kǔ zhōng zuò lè",厚积薄发:"hòu jī bó fā",臭味相投:"xiù wèi xiāng tóu",长幼有序:"zhǎng yòu yǒu xù",逼良为娼:"bī liáng wéi chāng",悲悲切切:"bēi bēi qiè qiē",败军之将:"bài jūn zhī jiàng",欺行霸市:"qī háng bà shì",削足适履:"xuē zú shì lǚ",先睹为快:"xiān dǔ wéi kuài",啼饥号寒:"tí jī háo hán",疏不间亲:"shū bú jiàn qīn",神差鬼使:"shén chāi guǐ shǐ",敲敲打打:"qiāo qiāo dǎ dǎ",平铺直叙:"píng pū zhí xù",没头没尾:"méi tóu mò wěi",寥寥可数:"liáo liáo kě shǔ",哼哈二将:"hēng hā èr jiàng",鹤发童颜:"hè fà tóng yán",各奔前程:"gè bèn qián chéng",弹无虚发:"dàn wú xū fā",大人先生:"dà rén xiān sheng",与民更始:"yǔ mín gēng shǐ",树碑立传:"shù bēi lì zhuàn",是非得失:"shì fēi dé shī",实逼处此:"shí bī chǔ cǐ",塞翁失马:"sài wēng shī mǎ",日薄西山:"rì bó xī shān",切身体会:"qiè shēn tǐ huì",片言只字:"piàn yán zhǐ zì",跑马卖解:"pǎo mǎ mài xiè",宁折不弯:"nìng zhé bù wān",零零散散:"líng líng sǎn sǎn",量体裁衣:"liàng tǐ cái yī",连中三元:"lián zhòng sān yuán",礼崩乐坏:"lǐ bēng yuè huài",不为已甚:"bù wéi yǐ shèn",转悲为喜:"zhuǎn bēi wéi xǐ",以眼还眼:"yǐ yǎn huán yǎn",蔚为大观:"wèi wéi dà guān",未为不可:"wèi wéi bù kě",童颜鹤发:"tóng yán hè fà",朋比为奸:"péng bǐ wéi jiān",莫此为甚:"mò cǐ wéi shèn",夹枪带棒:"jiā qiāng dài bàng",富商巨贾:"fù shāng jù jiǎ",淡然处之:"dàn rán chǔ zhī",箪食壶浆:"dān shí hú jiāng",创巨痛深:"chuāng jù tòng shēn",草长莺飞:"cǎo zhǎng yīng fēi",坐视不救:"zuò shī bú jiù",以己度人:"yǐ jǐ duó rén",随行就市:"suí háng jiù shì",文以载道:"wén yǐ zài dào",文不对题:"wén bú duì tí",铁板钉钉:"tiě bǎn dìng dīng",身体发肤:"shēn tǐ fà fū",缺吃少穿:"quē chī shǎo chuān",目无尊长:"mù wú zūn zhǎng",吉人天相:"jí rén tiān xiàng",毁家纾难:"huǐ jiā shū nàn",钢筋铁骨:"gāng jīn tiě gǔ",丢卒保车:"diū zú bǎo jū",丢三落四:"diū sān là sì",闭目塞听:"bì mù sè tīng",削尖脑袋:"xuē jiān nǎo dài",为非作恶:"wéi fēi zuò è",人才难得:"rén cái nán dé",情非得已:"qíng fēi dé yǐ",切中要害:"qiè zhòng yào hài",火急火燎:"huǒ jí huǒ liǎo",画地为牢:"huà dì wéi láo",好酒贪杯:"hào jiǔ tān bēi",长歌当哭:"cháng gē dàng kū",载沉载浮:"zài chén zài fú",遇难呈祥:"yù nàn chéng xiáng",榆木疙瘩:"yú mù gē da",以邻为壑:"yǐ lín wéi hè",洋为中用:"yáng wéi zhōng yòng",言为心声:"yán wéi xīn shēng",言必有中:"yán bì yǒu zhòng",图穷匕见:"tú qióng bǐ xiàn",滂沱大雨:"páng tuó dà yǔ",目不暇给:"mù bù xiá jǐ",量才录用:"liàng cái lù yòng",教学相长:"jiào xué xiāng zhǎng",悔不当初:"huǐ bù dāng chū",呼幺喝六:"hū yāo hè liù",不足为训:"bù zú wéi xùn",不拘形迹:"bù jū xíng jī",傍若无人:"páng ruò wú rén",罪责难逃:"zuì zé nán táo",自我吹嘘:"zì wǒ chuī xū",转祸为福:"zhuǎn huò wéi fú",勇冠三军:"yǒng guàn sān jūn",易地而处:"yì dì ér chǔ",卸磨杀驴:"xiè mò shā lǘ",玩儿不转:"wán ér bú zhuàn",天道好还:"tiān dào hǎo huán",身单力薄:"shēn dān lì bó",撒豆成兵:"sǎ dòu chéng bīng",片纸只字:"piàn zhǐ zhī zì",宁缺毋滥:"nìng quē wú làn",没没无闻:"mò mò wú wén",量力而为:"liàng lì ér wéi",历历可数:"lì lì kě shǔ",口碑载道:"kǒu bēi zài dào",君子好逑:"jūn zǐ hǎo qiú",好为人师:"hào wéi rén shī",豪商巨贾:"háo shāng jù jiǎ",各有所好:"gè yǒu suǒ hào",度德量力:"duó dé liàng lì",指天为誓:"zhǐ tiān wéi shì",逸兴遄飞:"yì xìng chuán fēi",心宽体胖:"xīn kuān tǐ pán",为德不卒:"wéi dé bù zú",天下为家:"tiān xià wéi jiā",视为畏途:"shì wéi wèi tú",三灾八难:"sān zāi bā nàn",沐猴而冠:"mù hóu ér guàn",哩哩啦啦:"lī li lā lā",见缝就钻:"jiàn fèng jiù zuān",夹层玻璃:"jiā céng bō li",急公好义:"jí gōng hào yì",积年累月:"jī nián lěi yuè",划地为牢:"huá dì wéi láo",更名改姓:"gēng míng gǎi xìng",奉为圭臬:"fèng wéi guī niè",多难兴邦:"duō nàn xīng bāng",不破不立:"bú pò bú lì",坐地自划:"zuò dì zì huá",坐不重席:"zuò bù chóng xí",坐不窥堂:"zuò bù kuī táng",作嫁衣裳:"zuò jià yī shang",左枝右梧:"zuǒ zhī yòu wú",左宜右有:"zuǒ yí yòu yǒu",钻头觅缝:"zuān tóu mì fèng",钻天打洞:"zuān tiān dǎ dòng",钻皮出羽:"zuān pí chū yǔ",钻火得冰:"zuān huǒ dé bīng",钻洞觅缝:"zuàn dòng mì féng",钻冰求火:"zuān bīng qiú huǒ",子为父隐:"zǐ wéi fù yǐn",擢发难数:"zhuó fà nán shǔ",着人先鞭:"zhuó rén xiān biān",斫雕为朴:"zhuó diāo wéi pǔ",锥处囊中:"zhuī chǔ náng zhōng",椎心饮泣:"chuí xīn yǐn qì",椎心泣血:"chuí xīn qì xuè",椎牛飨士:"chuí niú xiǎng shì",椎牛歃血:"chuí niú shà xuè",椎牛发冢:"chuí niú fà zhǒng",椎埋屠狗:"chuí mái tú gǒu",椎埋狗窃:"chuí mái gǒu qiè",壮发冲冠:"zhuàng fā chōng guàn",庄严宝相:"zhuāng yán bǎo xiàng",转愁为喜:"zhuǎn chóu wéi xǐ",转嗔为喜:"zhuǎn chēn wéi xǐ",拽巷啰街:"zhuài xiàng luó jiē",拽耙扶犁:"zhuāi pá fú lí",拽布拖麻:"zhuài bù tuō má",箸长碗短:"zhù cháng wǎn duǎn",铸剑为犁:"zhù jiàn wéi lí",杼柚其空:"zhù yòu qí kōng",杼柚空虚:"zhù yòu kōng xū",助天为虐:"zhù tiān wéi nüè",属垣有耳:"zhǔ yuán yǒu ěr",属毛离里:"zhǔ máo lí lǐ",属辞比事:"zhǔ cí bǐ shì",逐物不还:"zhú wù bù huán",铢量寸度:"zhū liáng cùn duó",铢两悉称:"zhū liǎng xī chèn",侏儒观戏:"zhū rú guān xì",朱轓皁盖:"zhū fān zào gài",昼度夜思:"zhòu duó yè sī",诪张为幻:"zhōu zhāng wéi huàn",重明继焰:"chóng míng jì yàn",众啄同音:"zhòng zhuó tóng yīn",众毛攒裘:"zhòng máo cuán qiú",众好众恶:"zhòng hào zhòng wù",擿埴索涂:"zhāi zhí suǒ tú",稚齿婑媠:"zhì chǐ wǒ tuó",至当不易:"zhì dàng bú yì",指皂为白:"zhǐ zào wéi bái",指雁为羹:"zhǐ yàn wéi gēng",指树为姓:"zhǐ shù wéi xìng",指山说磨:"zhǐ shān shuō mò",止戈为武:"zhǐ gē wéi wǔ",枝干相持:"zhī gàn xiāng chí",枝大于本:"zh dà yú běn",支吾其词:"zhī wú qí cí",正身率下:"zhèng shēn shuài xià",正冠李下:"zhèng guàn lǐ xià",整冠纳履:"zhěng guān nà lǚ",整躬率物:"zhěng gōng shuài wù",整顿干坤:"zhěng dùn gàn kūn",针头削铁:"zhēn tóu xuē tiě",贞松劲柏:"zhēn sōng jìng bǎi",赭衣塞路:"zhě yī sè lù",折箭为誓:"shé jiàn wéi shì",折而族之:"zhé ér zú zhī",昭德塞违:"zhāo dé sè wéi",章句小儒:"zhāng jù xiǎo rú",湛恩汪濊:"zhàn ēn wāng huì",占风望气:"zhān fēng wàng qì",斩将搴旗:"zhǎn jiàng qiān qí",曾母投杼:"zēng mǔ tóu zhù",曾参杀人:"zēng shēn shā rén",造谣中伤:"zào yáo zhòng shāng",早占勿药:"zǎo zhān wù yào",凿龟数策:"záo guī shǔ cè",攒三聚五:"cuán sān jù wǔ",攒眉蹙额:"cuán mei cù é",攒零合整:"cuán líng hé zhěng",攒锋聚镝:"cuán fēng jù dí",载笑载言:"zài xiào zài yán",载酒问字:"zài jiǔ wèn zì",殒身不恤:"yǔn shēn bú xù",云舒霞卷:"yún shū xiá juǎn",月中折桂:"yuè zhōng shé guì",月落参横:"yuè luò shēn héng",鬻驽窃价:"yù nú qiè jià",鬻鸡为凤:"yù jī wéi fèng",遇难成祥:"yù nàn chéng xiáng",郁郁累累:"yù yù lěi lěi",玉卮无当:"yù zhī wú dàng",语笑喧阗:"yǔ xiào xuān tián",与世沉浮:"yǔ shì chén fú",与时消息:"yǔ shí xiāo xi",逾墙钻隙:"yú qiáng zuān xì",渔夺侵牟:"yú duó qīn móu",杅穿皮蠹:"yú chuān pí dù",余勇可贾:"yú yǒng kě gǔ",予智予雄:"yú zhì yú xióng",予取予求:"yú qǔ yú qiú",于家为国:"yú jiā wéi guó",有借无还:"yǒu jiè wú huán",有加无已:"yǒu jiā wú yǐ",有国难投:"yǒu guó nán tóu",游必有方:"yóu bì yǒu fāng",油干灯尽:"yóu gàn dēng jìn",尤云殢雨:"yóu yún tì yǔ",庸中皦皦:"yōng zhōng jiǎo jiǎo",郢书燕说:"yǐng shū yān shuō",营蝇斐锦:"yíng yíng fēi jǐn",鹰心雁爪:"yīng xīn yàn zhǎo",莺吟燕儛:"yīng yín yàn wǔ",应天顺时:"yīng tiān shùn shí",印累绶若:"yìn léi shòu ruò",隐占身体:"yǐn zhàn shēn tǐ",饮犊上流:"yìn dú shàng liú",引绳切墨:"yǐn shéng qiē mò",龈齿弹舌:"yín chǐ dàn shé",因缘为市:"yīn yuán wéi shì",因树为屋:"yīn shù wéi wū",溢美溢恶:"yì měi yì wù",抑塞磊落:"yì sè lěi luò",倚闾望切:"yǐ lǘ wàng qiē",以意为之:"yǐ yì wéi zhī",以言为讳:"yǐ yán wéi huì",以疏间亲:"yǐ shū jiàn qīn",以水济水:"yǐ shuǐ jǐ shuǐ",以书为御:"yǐ shū wéi yù",以守为攻:"yǐ shǒu wéi gōng",以升量石:"yǐ shēng liáng dàn",以慎为键:"yǐ shèn wéi jiàn",以筌为鱼:"yǐ quán wéi yú",以利累形:"yǐ lì lěi xíng",以毁为罚:"yǐ huǐ wéi fá",以黑为白:"yǐ hēi wéi bái",以规为瑱:"yǐ guī wéi tiàn",以古为鉴:"yǐ gǔ wéi jiàn",以宫笑角:"yǐ gōng xiào jué",以法为教:"yǐ fǎ wéi jiào",以大恶细:"yǐ dà wù xì",遗世忘累:"yí shì wàng lěi",遗寝载怀:"yí qǐn zài huái",移的就箭:"yí dì jiù jiàn",依头缕当:"yī tóu lǚ dàng",衣租食税:"yì zū shí shuì",衣轻乘肥:"yì qīng chéng féi",衣裳之会:"yī shang zhī huì",衣单食薄:"yī dān shí bó",一还一报:"yì huán yí bào",叶公好龙:"yè gōng hào lóng",野调无腔:"yě diào wú qiāng",瑶池女使:"yáo chí nǚ shǐ",幺麽小丑:"yāo mó xiǎo chǒu",养精畜锐:"yǎng jīng xù ruì",卬首信眉:"áng shǒu shēn méi",洋洋纚纚:"yáng yáng sǎ sǎ",羊羔美酒:"yáng gāo měi jiǔ",扬风扢雅:"yáng fēng jié yǎ",燕昭市骏:"yān zhāo shì jùn",燕昭好马:"yān zhāo hǎo mǎ",燕石妄珍:"yān shí wàng zhēn",燕骏千金:"yān jùn qiān jīn",燕金募秀:"yān jīn mù xiù",燕驾越毂:"yān jià yuè gǔ",燕歌赵舞:"yān gē zhào wǔ",燕岱之石:"yān dài zhī shí",燕处危巢:"yàn chǔ wēi cháo",掞藻飞声:"shàn zǎo fēi shēng",偃革为轩:"yǎn gé wéi xuān",妍蚩好恶:"yán chī hǎo è",压良为贱:"yā liáng wéi jiàn",搀行夺市:"chān háng duó shì",泣数行下:"qì shù háng xià",当行出色:"dāng háng chū sè",秀出班行:"xiù chū bān háng",儿女成行:"ér nǚ chéng háng",大行大市:"dà háng dà shì",寻行数墨:"xún háng shǔ mò",埙篪相和:"xūn chí xiāng hè",血债累累:"xuè zhài lěi lěi",炫玉贾石:"xuàn yù gǔ shí",炫石为玉:"xuàn shí wéi yù",悬石程书:"xuán dàn chéng shū",悬狟素飡:"xuán huán sù cān",悬龟系鱼:"xuán guī xì yú",揎拳捋袖:"xuān quán luō xiù",轩鹤冠猴:"xuān hè guàn hóu",畜妻养子:"xù qī yǎng zǐ",羞人答答:"xiū rén dā dā",修鳞养爪:"xiū lín yǎng zhǎo",熊据虎跱:"xióng jù hǔ zhì",兄死弟及:"xiōng sǐ dì jí",腥闻在上:"xīng wén zài shàng",兴文匽武:"xīng wén yǎn wǔ",兴观群怨:"xìng guān qún yuàn",兴高彩烈:"xìng gāo cǎi liè",心手相应:"xīn shǒu xiāng yìng",心口相应:"xīn kǒu xiāng yīng",挟势弄权:"xié shì nòng quán",胁肩累足:"xié jiān lěi zú",校短量长:"jiào duǎn liáng cháng",小眼薄皮:"xiǎo yǎn bó pí",硝云弹雨:"xiāo yún dàn yǔ",鸮鸣鼠暴:"xiāo míng shǔ bào",削株掘根:"xuē zhū jué gēn",削铁无声:"xuē tiě wú shēng",削职为民:"xuē zhí wéi mín",削木为吏:"xuē mù wéi lì",想望风褱:"xiǎng wàng fēng huái",香培玉琢:"xiang pei yu zhuó",相鼠有皮:"xiàng shǔ yǒu pí",相时而动:"xiàng shí ér dòng",相切相磋:"xiāng qiē xiāng cuō",相女配夫:"xiàng nǚ pèi fū",相门有相:"xiàng mén yǒu xiàng",挦章撦句:"xián zhāng chě jù",先我着鞭:"xiān wǒ zhuó biān",习焉不察:"xí yān bù chá",歙漆阿胶:"shè qī ē jiāo",晰毛辨发:"xī máo biàn fà",悉索薄赋:"xī suǒ bó fù",雾鳞云爪:"wù lín yún zhǎo",物稀为贵:"wù xī wéi guì",碔砆混玉:"wǔ fū hùn yù",武断专横:"wǔ duàn zhuān héng",五石六鹢:"wǔ shí liù yì",五色相宣:"wǔ sè xiāng xuān",五侯七贵:"wǔ hóu qī guì",五侯蜡烛:"wǔ hòu là zhú",五羖大夫:"wǔ gǔ dà fū",吾自有处:"wú zì yǒu chǔ",无下箸处:"wú xià zhù chǔ",无伤无臭:"wú shāng wú xiù",无能为役:"wú néng wéi yì",无寇暴死:"wú kòu bào sǐ",无孔不钻:"wú kǒng bú zuàn",无间可乘:"wú jiān kě chéng",无间冬夏:"wú jiān dōng xià",无恶不为:"wú è bù wéi",无动为大:"wú dòng wéi dà",诬良为盗:"wū liáng wéi dào",握拳透爪:"wò quán tòu zhǎo",文武差事:"wén wǔ chāi shì",委委佗佗:"wēi wēi tuó tuó",惟日为岁:"wéi rì wéi suì",帷薄不修:"wéi bó bù xiū",为善最乐:"wéi shàn zuì lè",为山止篑:"wéi shān zhǐ kuì",为仁不富:"wéi rén bú fù",为裘为箕:"wéi qiú wéi jī",为民父母:"wéi mín fù mǔ",为虺弗摧:"wéi huǐ fú cuī",为好成歉:"wéi hǎo chéng qiàn",为鬼为蜮:"wéi guǐ wéi yù",望风响应:"wàng fēng xiǎng yīng",望尘僄声:"wàng chén piào shēng",往渚还汀:"wǎng zhǔ huán tīng",王贡弹冠:"wáng gòng dàn guàn",亡国大夫:"wáng guó dà fū",万贯家私:"wàn guàn jiā sī",晚食当肉:"wǎn shí dàng ròu",晚节不保:"wǎn jié bù bǎo",玩岁愒时:"wán suì kài shí",蛙蟆胜负:"wā má shèng fù",吞言咽理:"tūn yán yàn lǐ",颓垣断堑:"tuí yuán duàn qiàn",推干就湿:"tuī gàn jiù shī",剸繁决剧:"tuán fán jué jù",团头聚面:"tuán tóu jù miàn",兔丝燕麦:"tù sī yàn mài",兔头麞脑:"tù tóu zhāng nǎo",兔葵燕麦:"tù kuí yàn mài",吐哺握发:"tǔ bǔ wò fà",投传而去:"tóu zhuàn ér qù",头没杯案:"tóu mò bēi àn",头昏脑闷:"tóu hūn nǎo mèn",头会箕敛:"tóu kuài jī liǎn",头出头没:"tóu chū tóu mò",痛自创艾:"tòng zì chuāng yì",同恶相助:"tóng wù xiāng zhù",同恶相恤:"tóng wù xiāng xù",痌瘝在抱:"tōng guān zài bào",通文调武:"tōng wén diào wǔ",停留长智:"tíng liú zhǎng zhì",铁树开华:"tiě shù kāi huā",条贯部分:"tiáo guàn bù fēn",挑牙料唇:"tiǎo yá liào chún",挑么挑六:"tiāo yāo tiāo liù",挑唇料嘴:"tiǎo chún liào zuǐ",恬不为意:"tián bù wéi yì",恬不为怪:"tián bù wéi guài",天下为笼:"tiān xià wéi lóng",天台路迷:"tiān tái lù mí",天年不遂:"tiān nián bú suì",探囊胠箧:"tàn náng qū qiè",谭言微中:"tán yán wēi zhòng",谈言微中:"tán yán wēi zhòng",狧穅及米:"shì kāng jí mǐ",随物应机:"suí wù yīng jī",搜岩采干:"sōu yán cǎi gàn",宋斤鲁削:"sòng jīn lǔ xuē",松筠之节:"sōng yún zhī jié",四亭八当:"sì tíng bā dàng",四马攒蹄:"sì mǎ cuán tí",四不拗六:"sì bú niù liù",思所逐之:"sī suǒ zhú zhī",丝恩发怨:"sī ēn fà yuàn",硕望宿德:"shuò wàng xiǔ dé",铄古切今:"shuò gǔ qiē jīn",顺风而呼:"shùn fēng ér hū",顺风吹火:"shùn fēng chuī huǒ",水中著盐:"shuǐ zhōng zhuó yán",双柑斗酒:"shuāng gān dǒu jiǔ",数米而炊:"shǔ mǐ ér chuī",数米量柴:"shǔ mǐ liáng chái",数理逻辑:"shù lǐ luó ji",数黑论黄:"shǔ hēi lùn huáng",数白论黄:"shǔ bái lùn huáng",束缊还妇:"shù yūn huán fù",束蒲为脯:"shù pú wéi pú",束椽为柱:"shù chuán wéi zhù",书缺有间:"shū quē yǒu jiàn",手足重茧:"shǒu zú chóng jiǎn",手足异处:"shǒu zú yì chǔ",手脚干净:"shǒu jiǎo gàn jìng",手不应心:"shǒu bù yīng xīn",螫手解腕:"shì shǒu jiě wàn",释知遗形:"shì zhī yí xíng",适时应务:"shì shí yīng wù",适情率意:"shì qíng shuài yì",适当其冲:"shì dāng qí chōng",视为知己:"shì wéi zhī jǐ",使羊将狼:"shǐ yáng jiàng láng",食为民天:"shí wéi mín tiān",拾掇无遗:"shí duō wú yí",实与有力:"shí yù yǒu lì",石英玻璃:"shí yīng bō li",石室金匮:"shí shì jīn guì",什袭珍藏:"shí xí zhēn cáng",什伍东西:"shí wǔ dōng xī",什围伍攻:"shí wéi wǔ gōng",十魔九难:"shí mó jiǔ nàn",诗书发冢:"shī shū fà zhǒng",虱处裈中:"shī chǔ kūn zhōng",师直为壮:"shī zhí wéi zhuàng",尸居龙见:"shī jū lóng xiàn",圣经贤传:"shèng jīng xián zhuàn",圣君贤相:"shèng jūn xián xiàng",生拖死拽:"shēng tuō sǐ zhuài",审己度人:"shěn jǐ duó rén",神武挂冠:"shén wǔ guà guàn",神龙失埶:"shén lóng shī shì",深文曲折:"shēn wén qǔ shé",深厉浅揭:"shēn lì qiǎn qì",深谷为陵:"shēn gǔ wéi líng",深恶痛疾:"shēn wù tòng jí",深仇宿怨:"shēn chóu xiǔ yuàn",舍己为公:"shě jǐ wèi gōng",舍短取长:"shě duǎn qǔ cháng",舍策追羊:"shě cè zhuī yáng",蛇蝎为心:"shé xiē wéi xīn",少成若性:"shào chéng ruò xìng",上当学乖:"shàng dàng xué guāi",赏不当功:"shǎng bù dāng gōng",善自为谋:"shàn zì wéi móu",善为说辞:"shàn wéi shuō cí",善善恶恶:"shàn shàn wù è",善财难舍:"shàn cái nán shě",苫眼铺眉:"shān yǎn pū méi",讪牙闲嗑:"shàn yá xián kē",山阴乘兴:"shān yīn chéng xīng",山殽野湋:"shān yáo yě wéi",山溜穿石:"shān liù chuān shí",山节藻棁:"shān jié zǎo zhuō",杀鸡为黍:"shā jī wéi shǔ",色厉胆薄:"sè lì dǎn bó",桑荫未移:"sāng yīn wèi yí",桑荫不徙:"sāng yīn bù xǐ",桑土绸缪:"sāng tǔ chóu miù",桑户棬枢:"sāng hù juàn shū",三战三北:"sān zhàn sān běi",三瓦两舍:"sān wǎ liǎng shě",三人为众:"sān rén wèi zhòng",三差两错:"sān chā liǎng cuò",塞井焚舍:"sāi jǐng fén shě",洒心更始:"sǎ xīn gèng shǐ",洒扫应对:"sǎ sǎo yìng duì",软红香土:"ruǎn hóng xiāng tǔ",入吾彀中:"rù wú gòu zhōng",入铁主簿:"rù tiě zhǔ bù",入理切情:"rù lǐ qiē qíng",汝成人耶:"rǔ chéng rén yé",如水投石:"rú shuǐ tóu shí",如切如磋:"rú qiē rú cuō",如登春台:"rú dēng chūn tái",肉薄骨并:"ròu bó gǔ bìng",柔情绰态:"róu qíng chuò tài",戎马劻勷:"róng mǎ kuāng ráng",日中为市:"rì zhōng wéi shì",日月参辰:"rì yuè shēn chén",日省月修:"rì xǐng yuè xiū",日削月割:"rì xuē yuè gē",日省月试:"rì xǐng yuè shì",任达不拘:"rèn dá bù jū",人言藉藉:"rén yán jí jí",人模狗样:"rén mú gǒu yàng",人莫予毒:"rén mò yú dú",热熬翻饼:"rè áo fān bǐng",圈牢养物:"juàn láo yǎng wù",取予有节:"qǔ yǔ yǒu jié",诎要桡腘:"qū yāo ráo guó",穷形尽相:"qióng xíng jìn xiàng",情凄意切:"qíng qī yì qiè",情见势屈:"qíng xiàn shì qū",情见乎辞:"qíng xiàn hū cí",清都绛阙:"qīng dōu jiàng què",倾肠倒肚:"qīng cháng dào dǔ",青紫被体:"qīng zǐ pī tǐ",青林黑塞:"qīng lín hēi sài",螓首蛾眉:"qín shǒu é méi",琴瑟之好:"qín sè zhī hào",且住为佳:"qiě zhù wéi jiā",切树倒根:"qiē shù dǎo gēn",切理餍心:"qiē lǐ yàn xīn",切近的当:"qiē jìn de dāng",翘足引领:"qiáo zú yǐn lǐng",巧发奇中:"qiǎo fā qí zhòng",强嘴拗舌:"jiàng zuǐ niù shé",强直自遂:"qiáng zhí zì suí",强死强活:"qiǎng sǐ qiǎng huó",强食自爱:"qiǎng shí zì ài",强食靡角:"qiǎng shí mí jiǎo",强弓劲弩:"qiáng gōng jìng nǔ",强聒不舍:"qiǎng guō bù shě",强凫变鹤:"qiáng fú biàn hè",强而后可:"qiǎng ér hòu kě",强得易贫:"qiǎng dé yì pín",遣兴陶情:"qiǎn xìng táo qíng",牵羊担酒:"qiān yáng dān jiǔ",千了百当:"qiān liǎo bǎi dàng",泣下如雨:"qì xià rú yǔ",起偃为竖:"qǐ yǎn wéi shù",岂弟君子:"kǎi tì jūn zǐ",綦溪利跂:"qí xī lì qí",棋输先著:"qí shū xiān zhuó",齐王舍牛:"qí wáng shě niú",欺天诳地:"qī tiān kuáng dì",普天率土:"pǔ tiān shuài tǔ",铺胸纳地:"pū xiōng nà dì",铺锦列绣:"pū jǐn liè xiù",破家为国:"pò jiā wèi guó",破觚为圜:"pò gū wéi yuán",萍飘蓬转:"píng piāo péng zhuàn",帡天极地:"píng tiān jí dì",屏声息气:"bǐng shēng xī qì",凭几据杖:"píng jī jù zhàng",贫嘴薄舌:"pín zuǐ bó shé",片语只辞:"piàn yǔ zhī cí",披发文身:"pī fà wén shēn",烹龙炮凤:"pēng lóng páo fèng",炰鳖脍鲤:"fǒu biē kuài lǐ",庞眉皓发:"páng méi hào fà",攀花折柳:"pān huā zhé liǔ",攀蟾折桂:"pān chán shé guì",女大难留:"nǚ dà nán liú",弄玉吹箫:"nòng yù chuī xiāo",弄管调弦:"nòng guǎn tiáo xián",弄粉调朱:"nòng fěn diào zhū",浓抹淡妆:"nóng mò dàn zhuāng",捻土为香:"niǎn tǔ wéi xiāng",年谊世好:"nián yì shì hǎo",年华垂暮:"nián huá chuí mù",儗不于伦:"nǐ bù yú lún",泥而不滓:"ní ér bù zǐ",能者为师:"néng zhě wéi shī",能不称官:"néng bú chèn guān",挠直为曲:"náo zhí wéi qū",难进易退:"nán jìn yì tuì",难得糊涂:"nán dé hú tú",南蛮鴂舌:"nán mán jué shé",南贩北贾:"nán fàn běi gǔ",牧猪奴戏:"mù zhū nú xì",目眢心忳:"mù yuān xīn tún",目挑心招:"mù tiǎo xīn zhāo",目量意营:"mù liàng yì yíng",木头木脑:"mù tóu mù nǎo",木干鸟栖:"mù gàn niǎo qī",侔色揣称:"móu sè chuǎi chèn",莫予毒也:"mò yú dú yě",抹粉施脂:"mò fěn shī zhī",磨砻镌切:"mó lóng juān qiē",磨棱刓角:"mó léng wán jiǎo",摸门不着:"mō mén bù zháo",摸不着边:"mō bù zhuó biān",命中注定:"mìng zhōng zhù dìng",鸣鹤之应:"míng hè zhī yìng",明效大验:"míng xiào dà yàn",名我固当:"míng wǒ gù dāng",邈处欿视:"miǎo chǔ kǎn shì",黾穴鸲巢:"měng xué qú cháo",绵里薄材:"mián lǐ bó cái",靡有孑遗:"mǐ yǒu jié yí",靡衣偷食:"mǐ yī tōu shí",迷恋骸骨:"mí liàn hái gǔ",扪参历井:"mén shēn lì jǐng",门单户薄:"mén dān hù bó",昧旦晨兴:"mèi dàn chén xīng",冒名接脚:"mào míng jiē jiǎo",毛遂堕井:"máo suí duò jǐng",毛发倒竖:"máo fā dǎo shù",卖文为生:"mài wén wéi shēng",卖李钻核:"mài lǐ zuān hé",买椟还珠:"mǎi dú huán zhū",埋三怨四:"mán sān yuàn sì",马入华山:"mǎ rù huá shān",落魄江湖:"luò pò jiāng hú",落落难合:"luò luò nán hé",落草为寇:"luò cǎo wéi kòu",罗织构陷:"luó zhī gòu xiàn",鸾凤和鸣:"luán fèng hè míng",率由旧章:"shuài yóu jiù zhāng",率土同庆:"shuài tǔ tóng qìng",率兽食人:"shuài shòu shí rén",率土归心:"shuài tǔ guī xīn",率马以骥:"shuài mǎ yǐ jì",率尔成章:"shuài ěr chéng zhāng",鲁斤燕削:"lǔ jīn yàn xuē",漏尽更阑:"lòu jìn gēng lán",笼鸟槛猿:"lóng niǎo jiàn yuán",笼鸟池鱼:"lóng niǎo chí yú",龙游曲沼:"lóng yóu qū zhǎo",龙血玄黄:"lóng xuè xuán huáng",龙雕凤咀:"lóng diāo fèng jǔ",六尺之讬:"liù chǐ zhī tuō",令原之戚:"líng yuán zhī qī",令人捧腹:"lìng rén pěng fù",陵劲淬砺:"líng jìng cuì lì",临敌易将:"lín dí yì jiàng",裂裳衣疮:"liè shang yī chuāng",裂冠毁冕:"liè guàn huǐ miǎn",了无惧色:"liǎo wú jù sè",了身达命:"liǎo shēn dá mìng",了然无闻:"liǎo rán wú wén",了不可见:"liǎo bù kě jiàn",了不长进:"liǎo bù zhǎng jìn",燎发摧枯:"liǎo fà cuī kū",审时度势:"shěn shí duó shì",量小力微:"liàng xiǎo lì wēi",相时度力:"xiāng shí duó lì",量枘制凿:"liàng ruì zhì záo",量如江海:"liàng rú jiāng hǎi",量金买赋:"liàng jīn mǎi fù",量己审分:"liàng jǐ shěn fēn",敛骨吹魂:"liǎn gǔ chuī hún",詈夷为跖:"lì yí wéi zhí",利令志惛:"lì lìng zhì hūn",李广不侯:"lǐ guǎng bú hòu",礼为情貌:"lǐ wéi qíng mào",礼让为国:"lǐ ràng wéi guó",犁生骍角:"lí shēng xīng jiǎo",离本徼末:"lí běn jiǎo mò",楞眉横眼:"léng méi hèng yǎn",擂天倒地:"léi tiān dǎo dì",累足成步:"lěi zú chéng bù",累瓦结绳:"lěi wǎ jié shéng",累土至山:"lěi tǔ zhì shān",累土聚沙:"lěi tǔ jù shā",累卵之危:"lěi luǎn zhī wēi",累累如珠:"lěi lěi rú zhū",累块积苏:"lěi kuài jī sū",乐山乐水:"lè shān lè shuǐ",潦原浸天:"lǎo yuán jìn tiān",老师宿儒:"lǎo shī xiǔ rú",牢什古子:"láo shí gǔ zi",琅嬛福地:"láng huán fú dì",揆情度理:"kuí qíng duó lǐ",旷日累时:"kuàng rì lěi shí",匡救弥缝:"kuāng jiù mí fèng",枯树生华:"kū shù shēng huā",口轻舌薄:"kǒu qīng shé bó",口角生风:"kǒu jiǎo shēng fēng",口角春风:"kǒu jiǎo chūn fēng",口角风情:"kǒu jiǎo fēng qíng",口干舌焦:"kǒu gān shé jiāo",口腹之累:"kǒu fù zhī lěi",空腹便便:"kōng fù pián pián",嗑牙料嘴:"kē yá liào zuǐ",刻木为鹄:"kè mù wéi hú",咳珠唾玉:"ké zhū tuò yù",咳唾成珠:"ké tuò chéng zhū",抗颜为师:"kàng yán wéi shī",开华结果:"kāi huā jié guǒ",峻阪盐车:"jùn bǎn yán chē",嚼铁咀金:"jiáo tiě jǔ jīn",嚼墨喷纸:"jué mò pēn zhǐ",倔头强脑:"juè tóu jiàng nǎo",倔头倔脑:"juè tóu juè nǎo",倦鸟知还:"juàn niǎo zhī huán",卷席而葬:"juǎn xí ér zàng",卷甲倍道:"juǎn jiǎ bèi dào",聚米为山:"jù mǐ wéi shān",举手相庆:"jǔ shǒu xiāng qìng",举世混浊:"jǔ shì hún zhuó",鞠为茂草:"jū wéi mào cǎo",拘神遣将:"jū shén qiǎn jiàng",居下讪上:"jū xià shàn shàng",久要不忘:"jiǔ yāo bú wàng",九转功成:"jiǔ zhuǎn gōng chéng",九蒸三熯:"jiǔ zhēng sān hàn",敬业乐群:"jìng yè lè qún",井底虾蟆:"jǐng dǐ xiā má",旌旗卷舒:"jīng qí juǎn shū",荆棘载途:"jīng jí zài tú",禁舍开塞:"jìn shě kāi sāi",祲威盛容:"jìn wēi shèng róng",进退消长:"jìn tuì xiāo cháng",进退应矩:"jìn tuì yīng jǔ",进退触籓:"jìn tuì chù fān",进退跋疐:"jìn tuì bá zhì",尽多尽少:"jǐn duō jǐn shǎo",锦囊还矢:"jǐn náng huán shǐ",矜己自饰:"jīn jǐ zì shì",矜功负气:"jīn gōng fù qì",津关险塞:"jīn guān xiǎn sài",金吾不禁:"jīn wú bú jìn",金翅擘海:"jīn chì bāi hǎi",解衣衣人:"jiě yī yī rén",解人难得:"jiě rén nán dé",解铃系铃:"jiě líng xì líng",解发佯狂:"jiě fà yáng kuáng",诘屈磝碻:"jié qū áo qiāo",教猱升木:"jiāo náo shēng mù",较瘦量肥:"jiào shòu liàng féi",角立杰出:"jiǎo lì jié chū",焦沙烂石:"jiāo shā làn shí",骄儿騃女:"jiāo ér sì nǚ",浇风薄俗:"jiāo fēng bó sú",降妖捉怪:"xiáng yāo zhuō guài",将取固予:"jiāng qǔ gù yǔ",将门有将:"jiàng mén yǒu jiàng",将夺固与:"jiāng duó gù yǔ",槛花笼鹤:"jiàn huā lóng hè",鉴影度形:"jiàn yǐng duó xíng",渐不可长:"jiàn bù kě zhǎng",见素抱朴:"xiàn sù bào pǔ",见弃于人:"jiàn qì yú rén",简丝数米:"jiǎn sī shǔ mǐ",俭不中礼:"jiǎn bú zhòng lǐ",间见层出:"jiàn xiàn céng chū",尖嘴薄舌:"jiān zuǐ bó shé",甲冠天下:"jiǎ guàn tiān xià",葭莩之亲:"jiā fú zhī qīn",家累千金:"jiā lèi qiān jīn",家给人足:"jiā jǐ rén zú",家道从容:"jiā dào cóng róng",夹袋人物:"jiā dài rén wù",霁风朗月:"jì fēng lǎng yuè",寄兴寓情:"jì xìng yù qíng",计深虑远:"jì shēn lǜ yuǎn",计功量罪:"jì gōng liàng zuì",掎裳连襼:"jǐ shang lián yì",虮虱相吊:"jǐ shī xiāng diào",疾不可为:"jí bù kě wéi",极深研几:"jí shēn yán jī",及宾有鱼:"jí bīn yǒu yú",激薄停浇:"jī bó tíng jiāo",积素累旧:"jī sù lěi jiù",积时累日:"jī shí lěi rì",积露为波:"jī lù wéi bō",积德累功:"jī dé lěi gōng",积谗糜骨:"jī chán méi gǔ",击排冒没:"jī pái mào mò",祸为福先:"huò wéi fú xiān",祸福相依:"huò fú xiāng yī",获隽公车:"huò jùn gōng chē",混应滥应:"hùn yīng làn yīng",毁舟为杕:"huǐ zhōu wéi duò",毁钟为铎:"huǐ zhōng wéi duó",毁冠裂裳:"huǐ guān liè cháng",晦盲否塞:"huì máng pǐ sè",回船转舵:"huí chuán zhuàn duò",潢池盗弄:"huáng chí dào nòng",黄冠草履:"huáng guàn cǎo lǚ",黄发儿齿:"huáng fà ér chǐ",黄发垂髫:"huáng fà chuí tiáo",还珠返璧:"huán zhū fǎn bì",还年驻色:"huán nián zhù sè",还年却老:"huán nián què lǎo",坏裳为裤:"huài shang wéi kù",画荻和丸:"huà dí huò wán",化枭为鸠:"huà xiāo wéi jiū",化腐为奇:"huà fǔ wéi qí",化鸱为凤:"huà chī wéi fèng",花不棱登:"huā bu lēng dēng",户限为穿:"hù xiàn wéi chuān",呼卢喝雉:"hū lú hè zhì",呼来喝去:"hū lái hè qù",呼不给吸:"hū bù jǐ xī",厚味腊毒:"hòu wèi xī dú",厚德载物:"hòu dé zài wù",鸿渐于干:"hóng jiàn yú gàn",洪炉燎发:"hóng lú liáo fà",红绳系足:"hóng shéng jì zú",红不棱登:"hóng bu lēng dēng",横抢硬夺:"hèng qiǎng yìng duó",横恩滥赏:"hèng ēn làn shǎng",恨海难填:"hèn hǎi nán tián",鹤发鸡皮:"hè fà jī pí",涸思干虑:"hé sī gān lǜ",河涸海干:"hé hé hǎi gān",和颜说色:"hé yán yuè sè",合从连衡:"hé zòng lián héng",浩浩汤汤:"hào hào shāng shāng",好勇斗狠:"hào yǒng dòu hěn",好问则裕:"hào wèn zé yù",好为事端:"hào wéi shì duān",好问决疑:"hào wèn jué yí",好生之德:"hào shēng zhī dé",好奇尚异:"hǎo qí shàng yì",好恶不同:"hǎo è bù tóng",好丹非素:"hào dān fēi sù",豪干暴取:"háo gàn bào qǔ",毫发不爽:"háo fà bù shuǎng",寒酸落魄:"hán suān luò pò",含英咀华:"hán yīng jǔ huá",含糊不明:"hán hú bù míng",过为已甚:"guò wéi yǐ shèn",桂折兰摧:"guì shé lán cuī",规旋矩折:"guī xuán jǔ shé",广文先生:"guǎng wén xiān sheng",广陵散绝:"guǎng líng sǎn jué",冠山戴粒:"guàn shān dài lì",冠屦倒施:"guàn jù dǎo shī",挂席为门:"guà xí wéi mén",寡见鲜闻:"guǎ jiàn xiǎn wén",瓜葛相连:"guā gé xiāng lián",鼓吻奋爪:"gǔ wěn fèn zhǎo",古调单弹:"gǔ diào dān tán",古调不弹:"gǔ diào bù tán",姑射神人:"gū yè shén rén",苟合取容:"gǒu hé qǔ róng",狗续侯冠:"gǒu xù hòu guàn",钩爪锯牙:"gōu zhǎo jù yá",共枝别干:"gòng zhī bié gàn",共为唇齿:"gòng wéi chún chǐ",拱手而降:"gǒng shǒu ér xiáng",拱肩缩背:"gǒng jiān suō bèi",功薄蝉翼:"gōng bó chán yì",弓调马服:"gōng diào mǎ fú",更姓改物:"gēng xìng gǎi wù",更仆难数:"gēng pú nán shǔ",更令明号:"gēng lìng míng hào",更待干罢:"gèng dài gàn bà",更唱迭和:"gēng chàng dié hé",更长梦短:"gēng cháng mèng duǎn",各色名样:"gè sè míng yàng",格格不纳:"gé gé bú nà",格格不吐:"gé gé bù tǔ",告朔饩羊:"gù shuò xì yáng",膏车秣马:"gào chē mò mǎ",高义薄云:"gāo yì bó yún",岗头泽底:"gāng tóu zé dǐ",敢为敢做:"gǎn wéi gǎn zuò",甘分随时:"gān fèn suí shí",甘处下流:"gān chǔ xià liú",干啼湿哭:"gàn tí shī kū",干名犯义:"gàn míng fàn yì",干将莫邪:"gān jiāng mò yé",干城之将:"gān chéng zhī jiàng",腹载五车:"fù zài wǔ chē",父债子还:"fù zhài zǐ huán",父为子隐:"fù wéi zǐ yǐn",辅世长民:"fǔ shì zhǎng mín",福为祸始:"fú wéi huò shǐ",符号逻辑:"fú hào luó jí",浮收勒折:"fú shōu lè shé",肤受之愬:"fū shòu zhī sù",否终则泰:"pǐ zhōng zé tài",佛头著粪:"fó tóu zhuó fèn",奉为楷模:"fèng wéi kǎi mó",凤靡鸾吪:"fèng mǐ luán é",封豨修蛇:"fēng xī xiū shé",风影敷衍:"fēng yǐng fū yǎn",丰屋蔀家:"fēng wū bù jiā",粪土不如:"fèn tǔ bù rú",分风劈流:"fēn fēng pǐ liú",沸沸汤汤:"fèi fèi shāng shāng",菲食薄衣:"fěi shí bó yī",飞将数奇:"fēi jiàng shù qí",放辟邪侈:"fàng pì xié chǐ",方领圆冠:"fāng lǐng yuán guàn",犯而不校:"fàn ér bú jiào",返本还源:"fǎn běn huán yuán",反劳为逸:"fǎn láo wéi yì",法轮常转:"fǎ lún cháng zhuàn",罚不当罪:"fá bù dāng zuì",发引千钧:"fà yǐn qiān jūn",发奸擿伏:"fā jiān tī fú",发短心长:"fà duǎn xīn cháng",二竖为虐:"èr shù wéi nüè",儿女心肠:"ér nǚ xīn cháng",儿女亲家:"ér nǚ qìng jiā",遏恶扬善:"è wù yáng shàn",饿殍枕藉:"è piǎo zhěn jí",饿殍载道:"è piǎo zài dào",恶醉强酒:"wù zuì qiǎng jiǔ",恶意中伤:"è yì zhòng shāng",恶湿居下:"wù shī jū xià",恶居下流:"wù jū xià liú",恶不去善:"wù bú qù shàn",扼吭夺食:"è háng duó shí",扼襟控咽:"è jīn kòng yān",峨峨汤汤:"é é shāng shāng",屙金溺银:"ē jīn niào yín",朵颐大嚼:"duǒ yí dà jiáo",夺人所好:"duó rén suǒ hào",多言数穷:"duō yán shuò qióng",多文为富:"duō wén wéi fù",多端寡要:"duō duān guǎ yào",多财善贾:"duō cái shàn gǔ",遁世无闷:"dùn shì wú mèn",遁迹黄冠:"dùn jì huáng guàn",堆案盈几:"duī àn yíng jī",断还归宗:"duàn huán guī zōng",短见薄识:"duǎn jiàn bó shí",蠹居棊处:"dù jū qí chǔ",度己以绳:"duó jǐ yǐ shéng",杜默为诗:"dù mò wéi shī",杜鹃啼血:"dù juān tí xuè",笃近举远:"dǔ jìn jǔ yuǎn",独有千秋:"dú yǒu qiān qiū",读书得间:"dú shū dé jiàn",斗转参横:"dǒu zhuǎn shēn héng",兜肚连肠:"dōu dǔ lián cháng",洞见症结:"dòng jiàn zhèng jié",恫疑虚喝:"dòng yí xū hè",动中窾要:"dòng zhōng kuǎn yào",东鸣西应:"dōng míng xī yīng",东鳞西爪:"dōng lín xī zhǎo",东量西折:"dōng liàng xī shé",东家西舍:"dōng jiā xī shè",东扯西拽:"dōng chě xī zhuāi",鼎铛有耳:"dǐng chēng yǒu ěr",鼎铛玉石:"dǐng chēng yù shí",钉头磷磷:"dīng tóu lín lín",跌宕不羁:"diē dàng bù jī",跌弹斑鸠:"diē dàn bān jiū",雕心雁爪:"diāo xīn yàn zhǎo",颠倒衣裳:"diān dǎo yī cháng",德薄能鲜:"dé bó néng xiǎn",得马折足:"dé mǎ shé zú",蹈其覆辙:"dǎo qí fù zhé",捣虚撇抗:"dǎo xū piē kàng",倒载干戈:"dào zài gān gē",倒裳索领:"dào cháng suǒ lǐng",倒果为因:"dào guǒ wéi yīn",叨在知己:"tāo zài zhī jǐ",叨陪末座:"tāo péi mò zuò",党豺为虐:"dǎng chái wéi nüè",当轴处中:"dāng zhóu chǔ zhōng",当着不着:"dāng zhuó bù zhuó",当务始终:"dāng wù shǐ zhōng",淡汝浓抹:"dàn rǔ nóng mǒ",弹丸脱手:"tán wán tuō shǒu",弹铗无鱼:"dàn jiá wú yú",箪食瓢饮:"dān sì piáo yǐn",大璞不完:"dà pú bù wán",大明法度:"dà míng fǎ dù",大车以载:"dà chē yǐ zài",打闷葫芦:"dǎ mèn hú lu",沓来踵至:"tà lái zhǒng zhì",厝火燎原:"cuò huǒ liǎo yuán",撮科打哄:"cuō kē dǎ hòng",寸积铢累:"cùn jī zhū lěi",啛啛喳喳:"cuì cuì chā chā",摧折豪强:"cuī zhé háo qiáng",摧刚为柔:"cuī gāng wéi róu",从俗就简:"cóng sú jiù jiǎn",此发彼应:"cǐ fā bǐ yīng",此唱彼和:"cǐ chàng bǐ hè",慈悲为本:"cí bēi wéi běn",纯属骗局:"chún shǔ piàn jú",春笋怒发:"chūn sǔn nù fā",垂头搨翼:"chuí tóu tà yì",传为笑谈:"chuán wéi xiào tán",传风扇火:"chuán fēng shān huǒ",穿红着绿:"chuān hóng zhuó lǜ",触处机来:"chù chǔ jī lái",处尊居显:"chǔ zūn jū xiǎn",处堂燕雀:"chǔ táng yàn què",处实效功:"chǔ shí xiào gōng",处高临深:"chǔ gāo lín shēn",出入无间:"chū rù wú jiān",出门应辙:"chū mén yīng zhé",出处语默:"chū chǔ yǔ mò",出处殊途:"chū chǔ shū tú",出处进退:"chū chǔ jìn tuì",愁山闷海:"chóu shān mèn hǎi",冲冠眦裂:"chōng guàn zì liè",齿牙为祸:"chǐ yá wéi huò",尺二冤家:"chǐ èr yuān jia",尺短寸长:"chǐ duǎn cùn cháng",尺寸之功:"chǐ cùn zhī gōng",城北徐公:"chéng běi xú gōng",成败兴废:"chéng bài xīng fèi",趁水和泥:"chèn shuǐ huò ní",称雨道晴:"chēng yǔ dào qíng",称体载衣:"chēng tǐ zài yī",称体裁衣:"chèn tǐ cái yī",称家有无:"chèn jiā yǒu wú",称德度功:"chēng dé duó gōng",沉吟章句:"chén yín zhāng jù",沉吟不决:"chén yín bù jué",沉疴宿疾:"chén kē sù jí",扯纤拉烟:"chě qiàn lā yān",扯顺风旗:"chě shùn fēng qí",车载船装:"chē zǎi chuán zhuāng",朝升暮合:"zhāo shēng mù gě",朝攀暮折:"zhāo pān mù shé",超今冠古:"chāo jīn guàn gǔ",倡而不和:"chàng ér bú hè",畅所欲为:"chàng suǒ yù wéi",苌弘碧血:"cháng hóng bì xiě",长幼尊卑:"zhǎng yòu zūn bēi",长绳系日:"cháng shéng jì rì",长年三老:"zhǎng nián sān lǎo",长春不老:"cháng chūn bù lǎo",长傲饰非:"zhǎng ào shì fēi",昌亭旅食:"chāng tíng lǚ shí",禅絮沾泥:"chán xù zhān ní",差三错四:"chā sān cuò sì",层台累榭:"céng tái lěi xiè",层见迭出:"céng xiàn dié chū",藏踪蹑迹:"cáng zōng niè jì",苍蝇见血:"cāng yíng jiàn xiě",餐松啖柏:"cān sōng dàn bó",骖风驷霞:"cān fēng sì xiá",参伍错综:"cēn wǔ cuò zōng",参辰卯酉:"shēn chén mǎo yǒu",材优干济:"cái yōu gān jǐ",材薄质衰:"cái bó zhì shuāi",才大难用:"cái dà nán yòng",才薄智浅:"cái bó zhì qiǎn",不足为意:"bù zú wéi yì",不足为据:"bù zú wéi jù",不足为法:"bù zú wéi fǎ",不足齿数:"bù zú chǐ shǔ",不着疼热:"bù zhuó téng rè",不知薡蕫:"bù zhī dǐng dǒng",不越雷池:"bú yuè léi chí",不相为谋:"bù xiāng wéi móu",不贪为宝:"bù tān wéi bǎo",不了而了:"bù liǎo ér liǎo",不可揆度:"bù kě kuí duó",不遑启处:"bù huáng qǐ chǔ",不当不正:"bù dāng bú zhèng",不差什么:"bú chà shén me",不差累黍:"bù chā lěi shǔ",擘两分星:"bò liǎng fēn xīng",簸土扬沙:"bǒ tǔ yáng shā",薄物细故:"bó wù xì gù",薄寒中人:"bó hán zhòng rén",博文约礼:"bó wén yuē lǐ",播糠眯目:"bō kāng mí mù",剥皮抽筋:"bō pí chōu jīn",剥肤椎髓:"bō fū chuí suǐ",波属云委:"bō zhǔ yún wěi",波骇云属:"bō hài yún zhǔ",兵微将寡:"bīng wēi jiàng guǎ",兵强将勇:"bīng qiáng jiàng yǒng",兵多将广:"bīng duō jiàng guǎng",兵不由将:"bīng bù yóu jiàng",冰解的破:"bīng jiě dì pò",彬彬济济:"bīn bīn jǐ jǐ",摽梅之年:"biào méi zhī nián",表里为奸:"biǎo lǐ wéi jiān",飙发电举:"biāo fā diàn jǔ",变贪厉薄:"biàn tān lì bó",敝盖不弃:"bì gài bú qì",秕言谬说:"bǐ yán miù shuō",比物属事:"bǐ wù zhǔ shì",被山带河:"pī shān dài hé",被甲枕戈:"pī jiǎ zhěn gē",被甲据鞍:"pī jiǎ jù ān",被褐怀玉:"pī hè huái yù",被发缨冠:"pī fà yīng guàn",背曲腰躬:"bèi qǔ yāo gōng",北窗高卧:"běi chuāng gāo wò",北辰星拱:"běi chén xīng gǒng",北鄙之音:"běi bǐ zhī yīn",卑宫菲食:"bēi gōng fěi shí",暴衣露冠:"pù yī lù guàn",暴腮龙门:"pù sāi lóng mén",暴露文学:"bào lù wén xué",暴虎冯河:"bào hǔ píng hé",抱蔓摘瓜:"bào wàn zhāi guā",抱法处势:"bào fǎ chǔ shì",褒贬与夺:"bāo biǎn yǔ duó",帮闲钻懒:"bāng xián zuān lǎn",拜将封侯:"bài jiàng fēng hóu",百兽率舞:"bǎi shòu shuài wǔ",百孔千创:"bǎi kǒng qiān chuāng",白衣卿相:"bái yī qīng xiàng",白首为郎:"bái shǒu wéi láng",白首相知:"bái shǒu xiāng zhī",把玩无厌:"bǎ wán wú yàn",拔锅卷席:"bá guō juǎn xí",拔本塞源:"bá běn sè yuán",傲不可长:"ào bù kě zhǎng",熬更守夜:"áo gēng shǒu yè",安时处顺:"ān shí chǔ shùn",安身为乐:"ān shēn wéi lè",安老怀少:"ān lǎo huái shào",安步当车:"ān bù dàng chē",爱人好士:"ài rén hào shì",矮人观场:"ǎi rén guān chǎng",捱风缉缝:"ái fēng jī fèng",挨山塞海:"āi shān sè hǎi",阿家阿翁:"ā jiā ā wēng",阿党相为:"ē dǎng xiāng wéi",追亡逐北:"zhuī wáng zhú běi",竹篮打水:"zhú lán dá shuǐ",知疼着热:"zhī téng zháo rè",语不惊人:"yǔ bù jīng rén",于今为烈:"yú jīn wéi liè",一日三省:"yí rì sān xǐng",穴居野处:"xué jū yě chǔ",五脊六兽:"wǔ jǐ liù shòu",无声无臭:"wú shēng wú xiù",谓予不信:"wèi yú bú xìn",舍身为国:"shě shēn wéi guó",杀妻求将:"shā qī qiú jiàng",强作解人:"qiǎng zuò jiě rén",气冲斗牛:"qì chōng dǒu niú",临深履薄:"lín shēn lǚ bó",钧天广乐:"jūn tiān guǎng yuè",艰难竭蹶:"jiān nán jié jué",夹七夹八:"jiā qī jiā bā",混混噩噩:"hún hún è è",厚古薄今:"hòu gǔ bó jīn",鬼怕恶人:"guǐ pà è rén",伽马射线:"gā mǎ shè xiàn",佛头着粪:"fó tóu zhuó fèn",奉为至宝:"fèng wéi zhì bǎo",登坛拜将:"dēng tán bài jiàng",晨昏定省:"chén hūn dìng xǐng",察察为明:"chá chá wéi míng",博闻强识:"bó wén qiáng zhì",避难就易:"bì nán jiù yì",了无生机:"liǎo wú shēng jī",有一说一:"yǒu yī shuō yī",独一无二:"dú yī wú èr",说一不二:"shuō yī bù èr",举一反三:"jǔ yī fǎn sān",数一数二:"shǔ yī shǔ èr",杀一儆百:"shā yī jǐng bǎi",丁一卯二:"dīng yī mǎo èr",丁一确二:"dīng yī què èr",不一而止:"bù yī ér zhǐ",无一幸免:"wú yī xìng miǎn",表里不一:"biǎo lǐ bù yī",良莠不一:"liáng yǒu bù yī",心口不一:"xīn kǒu bù yī",言行不一:"yán xíng bù yī",政令不一:"zhèng lìng bù yī",参差不一:"cēn cī bù yī",纷纷不一:"fēn fēn bù yī",毁誉不一:"huǐ yù bù yī",不一而三:"bù yī ér sān",百不一遇:"bǎi bù yī yù",言行抱一:"yán xíng bào yī",瑜百瑕一:"yú bǎi xiá yī",背城借一:"bèi chéng jiè yī",凭城借一:"píng chéng jiè yī",劝百讽一:"quàn bǎi fěng yī",群居和一:"qún jū hé yī",百不获一:"bǎi bù huò yī",百不失一:"bǎi bù shī yī",百无失一:"bǎi wú shī yī",万不失一:"wàn bù shī yī",万无失一:"wàn wú shī yī",合而为一:"hé ér wéi yī",合两为一:"hé liǎng wéi yī",合二为一:"hé èr wéi yī",天下为一:"tiān xià wéi yī",相与为一:"xiāng yǔ wéi yī",较若画一:"jiào ruò huà yī",较如画一:"jiào rú huà yī",斠若画一:"jiào ruò huà yī",言行若一:"yán xíng ruò yī",始终若一:"shǐ zhōng ruò yī",终始若一:"zhōng shǐ ruò yī",惟精惟一:"wéi jīng wéi yī",众多非一:"zhòng duō fēi yī",不能赞一:"bù néng zàn yī",问一答十:"wèn yī dá shí",一不扭众:"yī bù niǔ zhòng",一以贯之:"yī yǐ guàn zhī",一以当百:"yī yǐ dāng bǎi",百不当一:"bǎi bù dāng yī",十不当一:"shí bù dāng yī",以一警百:"yǐ yī jǐng bǎi",以一奉百:"yǐ yī fèng bǎi",以一持万:"yǐ yī chí wàn",以一知万:"yǐ yī zhī wàn",百里挑一:"bǎi lǐ tiāo yī",整齐划一:"zhěng qí huà yī",一来二去:"yī lái èr qù",一路公交:"yī lù gōng jiāo",一路汽车:"yī lù qì chē",一路巴士:"yī lù bā shì",朝朝朝落:"zhāo cháo zhāo luò",曲意逢迎:"qū yì féng yíng",一行不行:"yì háng bù xíng",行行不行:"háng háng bù xíng"},Zne=Object.keys(DC).map(e=>({zh:e,pinyin:DC[e],probability:2e-8,length:4,priority:Mr.Normal,dict:Symbol("dict4")})),RC={巴尔干半岛:"bā ěr gàn bàn dǎo",巴尔喀什湖:"bā ěr kā shí hú",不幸而言中:"bú xìng ér yán zhòng",布尔什维克:"bù ěr shí wéi kè",何乐而不为:"hé lè ér bù wéi",苛政猛于虎:"kē zhèng měng yú hǔ",蒙得维的亚:"méng dé wéi dì yà",民以食为天:"mín yǐ shí wéi tiān",事后诸葛亮:"shì hòu zhū gě liàng",物以稀为贵:"wù yǐ xī wéi guì",先下手为强:"xiān xià shǒu wéi qiáng",行行出状元:"háng háng chū zhuàng yuan",亚得里亚海:"yà dé lǐ yà hǎi",眼不见为净:"yǎn bú jiàn wéi jìng",竹筒倒豆子:"zhú tǒng dào dòu zi"},Gne=Object.keys(RC).map(e=>({zh:e,pinyin:RC[e],probability:2e-8,length:5,priority:Mr.Normal,dict:Symbol("dict5")}));function zC(e,t){return e&&(e.decimal<t.decimal||e.decimal===t.decimal&&e.probability>t.probability)?e:t}function OC(e){e.probability<1e-300&&(e.probability*=1e300,e.decimal+=1)}function Qne(e){return e.priority===Mr.Custom?-(e.length*e.length*100):e.priority===Mr.Surname?-(e.length*e.length*10):0}function Yne(e,t){const n=[];let i=e.length-1,s=e[i];for(let o=t-1;o>=0;o--){const r=o+1>=t?{probability:1,decimal:0,patterns:[]}:n[o+1];for(;s&&s.index+s.length-1===o;){const a=s.index,u={probability:s.probability*r.probability,decimal:r.decimal+Qne(s),patterns:r.patterns,concatPattern:s};OC(u),n[a]=zC(n[a],u),s=e[--i]}const l={probability:1e-13*r.probability,decimal:0,patterns:r.patterns};OC(l),n[o]=zC(n[o],l),n[o].concatPattern&&(n[o].patterns=n[o].patterns.concat(n[o].concatPattern),n[o].concatPattern=void 0,delete n[o+1])}return n[0].patterns.reverse()}function PC(e,t){return e&&e.count<=t.count?e:t}function Jne(e){return e.priority===Mr.Custom?-(e.length*e.length*1e5):e.priority===Mr.Surname?-(e.length*e.length*100):1}function Xne(e,t){const n=[];let i=e.length-1,s=e[i];for(let o=t-1;o>=0;o--){const r=o+1>=t?{count:0,patterns:[]}:n[o+1];for(;s&&s.index+s.length-1===o;){const a=s.index,u={count:Jne(s)+r.count,patterns:r.patterns,concatPattern:s};n[a]=PC(n[a],u),s=e[--i]}const l={count:1+r.count,patterns:r.patterns};n[o]=PC(n[o],l),n[o].concatPattern&&(n[o].patterns=n[o].patterns.concat(n[o].concatPattern),n[o].concatPattern=void 0,delete n[o+1])}return n[0].patterns.reverse()}function eie(e,t){return!(t.index+t.length<=e.index||t.priority>e.priority||t.priority===e.priority&&t.length>e.length)}function tie(e){const t=[];for(let n=e.length-1;n>=0;){const{index:i}=e[n];let s=n-1;for(;s>=0&&eie(e[n],e[s]);)s--;(s<0||e[s].index+e[s].length<=i)&&t.push(e[n]),n=s}return t.reverse()}var jC;(function(e){e[e.ReverseMaxMatch=1]="ReverseMaxMatch",e[e.MaxProbability=2]="MaxProbability",e[e.MinTokenization=3]="MinTokenization"})(jC||(jC={}));class HC{constructor(t,n="",i=""){this.children=new Map,this.fail=null,this.patterns=[],this.parent=t,this.prefix=n,this.key=i}}class nie{constructor(){this.dictMap=new Map,this.queues=[],this.root=new HC(null)}build(t){this.buildTrie(t),this.buildFailPointer()}buildTrie(t){for(let n of t){const i=N3(n.zh);let s=this.root;for(let o=0;o<i.length;o++){let r=i[o];if(!s.children.has(r)){const l=new HC(s,i.slice(0,o).join(""),r);s.children.set(r,l),this.addNodeToQueues(l)}s=s.children.get(r)}this.insertPattern(s.patterns,n),n.node=s,this.addPatternToDictMap(n)}}buildFailPointer(){let t=[],n=0;for(this.queues.forEach(i=>{t=t.concat(i)}),this.queues=[];t.length>n;){let i=t[n++],s=i.parent&&i.parent.fail,o=i.key;for(;s&&!s.children.has(o);)s=s.fail;s?i.fail=s.children.get(o):i.fail=this.root}}addPatternToDictMap(t){this.dictMap.has(t.dict)||this.dictMap.set(t.dict,new Set),this.dictMap.get(t.dict).add(t)}addNodeToQueues(t){this.queues[sl(t.prefix)]||(this.queues[sl(t.prefix)]=[]),this.queues[sl(t.prefix)].push(t)}insertPattern(t,n){for(let i=t.length-1;i>=0;i--){const s=t[i];if(n.priority===s.priority&&n.probability>=s.probability)t[i+1]=s;else if(n.priority>s.priority)t[i+1]=s;else{t[i+1]=n;return}}t[0]=n}removeDict(t){this.dictMap.has(t)&&(this.dictMap.get(t).forEach(i=>{i.node.patterns=i.node.patterns.filter(s=>s!==i)}),this.dictMap.delete(t))}match(t,n){let i=this.root,s=[];const o=N3(t);for(let r=0;r<o.length;r++){let l=o[r];for(;i!==null&&!i.children.has(l);)i=i.fail;if(i===null)i=this.root;else{i=i.children.get(l);const a=i.patterns.find(c=>n==="off"?c.priority!==Mr.Surname:n==="head"?c.length-1-r===0:!0);a&&s.push(Object.assign(Object.assign({},a),{index:r-a.length+1}));let u=i.fail;for(;u!==null;){const c=u.patterns.find(d=>n==="off"?d.priority!==Mr.Surname:n==="head"?d.length-1-r===0:!0);c&&s.push(Object.assign(Object.assign({},c),{index:r-c.length+1})),u=u.fail}}}return s}search(t,n,i=2){const s=this.match(t,n);return i===1?tie(s):i===3?Xne(s,sl(t)):Yne(s,sl(t))}}const iie=[...Gne,...Zne,...Vne,...Kne,...Hne,...Une],EL=new nie;EL.build(iie);const sie=new ML,oie=()=>sie,rie=[];function lie(){return rie}const Kh=e=>{const t=xu.get(e);return t?t.split(" ")[0]:e},aie=e=>{const t=[],n=lie();for(let i=0;i<e.length;i++){const s=e[i],o=s.charCodeAt(0);n[o]?t[i]=n[o]:t[i]=s}return t.join("")},uie=(e,t,n,i,s)=>{const o=s?aie(e):e,r=EL.search(o,n,i);let l=0;const a=N3(e);for(let u=0;u<a.length;){const c=r[l];if(c&&u===c.index){if(c.length===1&&c.priority<=Mr.Normal){const p=a[u];c.zh=p;let g="";g=WC(p,a[u-1],a[u+1]),t[u]={origin:p,result:g,isZh:g!==p,originPinyin:g},u++,l++;continue}const d=c.pinyin.split(" ");let f=0;s&&(c.zh=a.slice(c.index,c.index+c.length).join(""));for(let p=0;p<c.length;p++)t[u+p]={origin:a[p+c.index],result:d[f]||"",isZh:!0,originPinyin:d[f]||""},f++;u+=c.length,l++}else{const d=a[u];let f="";f=WC(d,a[u-1],a[u+1]),t[u]={origin:d,result:f,isZh:f!==d,originPinyin:f},u++}}return{list:t,matches:r}},uv=e=>e.replace(/(ā|á|ǎ|à)/g,"a").replace(/(ō|ó|ǒ|ò)/g,"o").replace(/(ē|é|ě|è)/g,"e").replace(/(ī|í|ǐ|ì)/g,"i").replace(/(ū|ú|ǔ|ù)/g,"u").replace(/(ǖ|ǘ|ǚ|ǜ)/g,"ü").replace(/(n̄|ń|ň|ǹ)/g,"n").replace(/(m̄|ḿ|m̌|m̀)/g,"m").replace(/(ê̄|ế|ê̌|ề)/g,"ê"),TL=(e,t="off")=>{const n=oie();let i=xu.get(e)?xu.get(e).split(" "):[];if(n.get(e))i=n.get(e).split(" ");else if(t!=="off"){const s=F3[e];s&&(i=[s].concat(i.filter(o=>o!==s)))}return i},cie=(e,t="off")=>{let n=TL(e,t);return n.length>0?n.map(i=>({origin:e,result:i,isZh:!0,originPinyin:i})):[{origin:e,result:e,isZh:!1,originPinyin:e}]},Mm=(e,t)=>{const n=e.split(" "),i=[],s=[];for(let o of n)for(let r of Dne)if(o.startsWith(r)){let l=o.slice(r.length);Rne.indexOf(r)!==-1&&zne.indexOf(l)!==-1&&(l=One[l]),i.push(r),s.push(l);break}return t==="standard"&&i.forEach((o,r)=>{(o==="y"||o==="w")&&(i[r]="")}),{final:s.join(" "),initial:i.join(" ")}},Sg=e=>{const{final:t}=Mm(e);let n="",i="",s="";return Pne.indexOf(uv(t))!==-1?(n=t[0],i=t[1],s=t.slice(2)):(i=t[0]||"",s=t.slice(1)||""),{head:n,body:i,tail:s}},cv=e=>{const t=/(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/,n=/(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/,i=/(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/,s=/(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/,o=/(a|o|e|i|u|ü|ê)/,r=/(n|m)$/,l=[];return e.split(" ").forEach(u=>{t.test(u)?l.push("1"):n.test(u)?l.push("2"):i.test(u)?l.push("3"):s.test(u)?l.push("4"):o.test(u)||r.test(u)?l.push("0"):l.push("")}),l.join(" ")},die=(e,t)=>{const n=uv(e).split(" "),i=cv(t).split(" "),s=[];return n.forEach((o,r)=>{s.push(`${o}${i[r]}`)}),s.join(" ")},LL=(e,t)=>{const n=[];return e.split(" ").forEach(s=>{n.push(t?s[0]:s)}),n.join(" ")};function fie(e,t,n){if(qne.indexOf(e)===-1)return Kh(e);if(t===n&&t&&Kh(t)!==t)return uv(Kh(e));if(n&&!Wne[e].includes(n)){const i=Kh(n);if(i!==n){const s=cv(i),o=IL[e];for(let r in o)if(o[r].indexOf(Number(s))!==-1)return r}}}function hie(e,t){if(e==="了"&&(!t||!xu.get(t)))return"liǎo"}function pie(e,t){if(e==="々")return!t||!xu.get(t)?"tóng":xu.get(t).split(" ")[0]}function WC(e,t,n){return pie(e,t)||hie(e,t)||fie(e,t,n)||Kh(e)}const gie=e=>typeof e!="string"?(console.error("The first param of pinyin is error: "+e+' is not assignable to type "string".'),!1):!0;function ay(e,t){return t instanceof RegExp?t.test(e):!0}const mie=(e,t)=>{let n=t.nonZh;if(n==="removed")return e.filter(i=>i.isZh||!ay(i.origin,t.nonZhScope));if(n==="consecutive"){for(let i=e.length-2;i>=0;i--){const s=e[i],o=e[i+1];!s.isZh&&!o.isZh&&ay(s.origin,t.nonZhScope)&&ay(o.origin,t.nonZhScope)&&(s.origin+=o.origin,s.result+=o.result,o.delete=!0)}return e.filter(i=>!i.delete)}else return e},qC=(e,t)=>sl(e)===1&&t.multiple?cie(e,t.surname):!1,vie=(e,t)=>{switch(t.pattern){case"pinyin":break;case"num":e.forEach(n=>{n.result=n.isZh?cv(n.result):""});break;case"initial":e.forEach(n=>{n.result=n.isZh?Mm(n.result,t.initialPattern).initial:""});break;case"final":e.forEach(n=>{n.result=n.isZh?Mm(n.result,t.initialPattern).final:""});break;case"first":e.forEach(n=>{n.result=LL(n.result,n.isZh)});break;case"finalHead":e.forEach(n=>{n.result=n.isZh?Sg(n.result).head:""});break;case"finalBody":e.forEach(n=>{n.result=n.isZh?Sg(n.result).body:""});break;case"finalTail":e.forEach(n=>{n.result=n.isZh?Sg(n.result).tail:""});break}},yie=(e,t)=>{switch(t.toneType){case"symbol":break;case"none":e.forEach(n=>{n.isZh&&(n.result=uv(n.result))});break;case"num":{e.forEach(n=>{n.isZh&&(n.result=die(n.result,n.originPinyin))});break}}},bie=(e,t)=>{t.v&&e.forEach(n=>{n.isZh&&(n.result=n.result.replace(/ü/g,typeof t.v=="string"?t.v:"v"))})},kie=(e,t,n)=>{if(t.multiple&&sl(n)===1){let i="";e=e.filter(s=>{const o=s.result!==i;return i=s.result,o})}return t.type==="array"?e.map(i=>i.result):t.type==="all"?e.map(i=>{const s=i.isZh?i.result:"",{initial:o,final:r}=Mm(s,t.initialPattern),{head:l,body:a,tail:u}=Sg(s);let c=[];return s!==""&&(c=[s].concat(TL(i.origin,t.surname).filter(d=>d!==s))),{origin:i.origin,pinyin:s,initial:o,final:r,first:LL(i.result,i.isZh),finalHead:l,finalBody:a,finalTail:u,num:Number(cv(i.originPinyin)),isZh:i.isZh,polyphonic:c,inZhRange:!!xu.get(i.origin),result:i.result}}):e.map(i=>i.result).join(t.separator)},Aie=(e,t)=>(t===!1&&e.forEach(n=>{n.origin==="一"?n.result=n.originPinyin="yī":n.origin==="不"&&(n.result=n.originPinyin="bù")}),e),Cie={pattern:"pinyin",toneType:"symbol",type:"string",multiple:!1,mode:"normal",removeNonZh:!1,nonZh:"spaced",v:!1,separator:" ",toneSandhi:!0,segmentit:2};function Im(e,t){if(t=Object.assign(Object.assign({},Cie),t||{}),!gie(e))return e;if(e==="")return t.type==="array"||t.type==="all"?[]:"";t.surname===void 0&&(t.mode==="surname"?t.surname="all":t.surname="off"),t.type==="all"&&(t.pattern="pinyin"),t.pattern==="num"&&(t.toneType="none"),t.removeNonZh&&(t.nonZh="removed");let i=Array(sl(e)),{list:s}=uie(e,i,t.surname,t.segmentit,t.traditional);return s=Aie(s,t.toneSandhi),s=mie(s,t),qC(e,t)&&(s=qC(e,t)),vie(s,t),yie(s,t),bie(s,t),kie(s,t,e)}var B3;(function(e){e[e.AllSegment=1]="AllSegment",e[e.AllArray=2]="AllArray",e[e.AllString=3]="AllString",e[e.PinyinSegment=4]="PinyinSegment",e[e.PinyinArray=5]="PinyinArray",e[e.PinyinString=6]="PinyinString",e[e.ZhSegment=7]="ZhSegment",e[e.ZhArray=8]="ZhArray",e[e.ZhString=9]="ZhString"})(B3||(B3={}));B3.AllSegment;const NL=[{name:"/new",desc:"commands.new.desc"},{name:"/clear",desc:"commands.clear.desc"},{name:"/login",desc:"commands.login.desc"},{name:"/plan",desc:"commands.plan.desc"},{name:"/swarm",desc:"commands.swarm.desc"},{name:"/goal",desc:"commands.goal.desc"},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0},{name:"/auto",desc:"commands.auto.desc"},{name:"/yolo",desc:"commands.yolo.desc"},{name:"/thinking",desc:"commands.thinking.desc"},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0},{name:"/undo",desc:"commands.undo.desc"},{name:"/fork",desc:"commands.fork.desc"},{name:"/export",desc:"commands.export.desc"},{name:"/status",desc:"commands.status.desc"}];function wie(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}const Em="skill:";function xie(e){return e.startsWith(Em)?e.slice(Em.length):e}function FL(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${Em}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...NL,...t]}const UC=new Map;function BL(e){let t=UC.get(e);if(!t){const n=Im(e,{toneType:"none",type:"array"}),i=Im(e,{pattern:"first",toneType:"none",type:"array"});t=_ie(e,n,i),UC.set(e,t)}return t}const KC={full:[],first:[],offsets:[],literal:[]};function _ie(e,t,n){if(t.length!==n.length)return KC;const i=[],s=[];let o=0;for(let r=0;r<t.length;r++){i.push(o);const l=t[r];l.length>0&&e.slice(o,o+l.length).toLowerCase()===l.toLowerCase()?(s.push(!0),o+=l.length):(s.push(!1),o+=Array.from(e.slice(o))[0]?.length??0)}return i.push(o),o!==e.length?KC:{full:t,first:n,offsets:i,literal:s}}function $3(e,t,n,i){const s=e[t];let o=0,r=-1,l=-1,a=0,u=0;for(let f=0;f<s.length;f++){const p=o+(s[f]?.length??0);if(r<0&&n<p&&(r=f,a=o),i<=p){l=f,u=o;break}o=p}if(r<0||l<0)return;const c=e.literal[r]?e.offsets[r]+(n-a):e.offsets[r],d=e.literal[l]?e.offsets[l]+(i-u):e.offsets[l+1];return[c,d]}const VC=new Map;function Sie(e){let t=VC.get(e);return t||(t={full:Im(e,{toneType:"none",type:"string",separator:""}),first:Im(e,{pattern:"first",toneType:"none",type:"string",separator:""})},VC.set(e,t)),t}function $L(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function Mie(e,t){const n=e.toLowerCase();let i=0,s=-1,o=-1;for(let r=0;r<n.length&&i<t.length;r++)n[r]===t[i]&&(i===0&&(s=r),o=r,i++);return i===t.length?[s,o+1]:void 0}function Iie(e,t){return $L(e,t)??Mie(e,t)}function Eie(e,t){const n=$L(e,t);if(n)return n;if(!/^[\x21-\x7e]+$/.test(t))return;const i=BL(e),s=i.first.join("").indexOf(t);if(s>=0)return $3(i,"first",s,s+t.length);const o=i.full.join("").indexOf(t);if(!(o<0))return $3(i,"full",o,o+t.length)}function Tie(e,t,n){const i=e.trim().replace(/^\//,"").toLowerCase();if(i==="")return{};const s=Iie(t,i),o=Eie(n,i);return{name:s?[s]:void 0,desc:o?[o]:void 0}}const Lie={keys:[{name:"name",weight:3},{name:"desc",weight:1},{name:"pinyinFull",weight:1},{name:"pinyinFirst",weight:1}],includeScore:!0,includeMatches:!0,ignoreLocation:!0,threshold:.4};function Nie(e,t){const n=e.toLowerCase(),i=t.toLowerCase();return n===i?0:n.startsWith(i)?1:2}function ZC(e){const t=[...e].sort((i,s)=>i[0]-s[0]),n=[];for(const i of t){const s=n[n.length-1];s&&i[0]<=s[1]?s[1]=Math.max(s[1],i[1]):n.push([...i])}return n}function Fie(e,t){const n=[],i=[];for(const s of t??[])for(const[o,r]of s.indices)if(s.key==="name")n.push([o+1,r+2]);else if(s.key==="desc")i.push([o,r+1]);else if(s.key==="pinyinFirst"||s.key==="pinyinFull"){const l=$3(BL(e.desc),s.key==="pinyinFirst"?"first":"full",o,r+1);l&&i.push(l)}return{name:n.length>0?ZC(n):void 0,desc:i.length>0?ZC(i):void 0}}function Bie(e,t=NL,n=i=>i.desc){const i=e.trim().replace(/^\//,"");if(i==="")return t.map(o=>({item:o,ranges:{}}));const s=t.map((o,r)=>{const l=n(o),a=Sie(l);return{index:r,item:o,name:o.name.replace(/^\//,""),desc:l,pinyinFull:a.full,pinyinFirst:a.first}});return new Nne(s,Lie).search(i).map(({item:o,score:r,matches:l})=>({doc:o,score:r??1,rank:Nie(o.name,i),ranges:Fie(o,l)})).sort((o,r)=>o.rank!==r.rank?o.rank-r.rank:o.score!==r.score?o.score-r.score:o.doc.index-r.doc.index).map(({doc:o,ranges:r})=>({item:o.item,ranges:r}))}function $ie(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const i=new Set(t.map(r=>r.id)),s=new Set(t.flatMap(r=>r.role==="user"&&r.promptId!==void 0?[r.promptId]:[])),o=e.filter(r=>{const l=Date.parse(r.createdAt);return!(Number.isNaN(l)||l>=n||i.has(r.id)||r.role==="user"&&(r.userMessageId!==void 0&&i.has(r.userMessageId)||r.promptId!==void 0&&s.has(r.promptId)))});return o.length>0?[...o,...t]:t}function Die(e){const t=new Map,n=new Set;function i(o){const r=t.get(o);if(r!==void 0)return r;const l=(async()=>e(o))().finally(()=>{t.delete(o),n.delete(o)&&i(o)});return t.set(o,l),l}function s(o){if(t.has(o)){n.add(o);return}i(o)}return{run:i,request:s}}const un={permission:"kimi-web.permission",activeWorkspace:"kimi-active-workspace",planArmed:"kimi-web.plan-armed",swarmMode:"kimi-web.swarm-mode",goalMode:"kimi-web.goal-mode",fontScale:"kimi-web.font-scale",starredModels:"kimi-web.starred-models",unread:"kimi-web.unread",onboarded:"kimi-web.onboarded",colorScheme:"kimi-web.color-scheme",hiddenWorkspaces:"kimi-web.hidden-workspaces",collapsedWorkspaces:"kimi-web.collapsed-workspaces",workspaceOrder:"kimi-web.workspace-order",workspaceSort:"kimi-web.workspace-sort",workspaceRecencyFloor:"kimi-web.workspace-recency-floor",pinnedSessions:"kimi-web.pinned-sessions",pinnedCollapsed:"kimi-web.pinned-collapsed",workspaceNameOverrides:"kimi-web.workspace-name-overrides",notifyEnabled:"kimi-web.notify-enabled",notifySound:"kimi-web.notify-sound",inputHistory:"kimi-web.input-history",locale:"kimi-locale",clientId:"kimi-web.client-id",debug:"kimi-web.debug",openInDefaultTarget:"kimi-web.open-in.default-target",openInLastTarget:"kimi-web.open-in.last-target",sidebarCollapsed:"kimi-web.sidebar-collapsed",sidebarWidth:"kimi-web.sidebar-width",sidebarViewMode:"kimi-web.sidebar-view-mode",shortcutOverrides:"kimi-web.shortcut-overrides",dockIconChoice:"kimi-web.dock-icon-choice",updateSkippedVersion:"kimi-web.update-skipped-version",planMode:"kimi-web.plan-mode",codeFont:"kimi-web.code-font",contentAlign:"kimi-web.content-align",theme:"kimi-web.theme",thinking:"kimi-web.thinking",accent:"kimi-web.accent",notifyOnComplete:"kimi-web.notify-on-complete",notifyOnQuestion:"kimi-web.notify-on-question",notifyOnApproval:"kimi-web.notify-on-approval",soundOnComplete:"kimi-web.sound-on-complete"};function GC(e){return`kimi-web.draft.${e&&e.length>0?e:"__new__"}`}function uo(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Ns(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function lr(e){try{globalThis.localStorage.removeItem(e)}catch{}}function od(e){const t=uo(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function Pu(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function K5(){const e=uo(un.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[i,s]of Object.entries(t))s===!0&&(n[i]=!0);return n}catch{return{}}}function V5(e){const n={...K5()};for(const[i,s]of Object.entries(e))s?n[i]=!0:delete n[i];Ns(un.unread,JSON.stringify(n))}function Rie(){const e=od(un.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function uy(e){Pu(un.collapsedWorkspaces,Array.from(e))}function zie(){return od(un.pinnedCollapsed)===!0}function D3(e){Pu(un.pinnedCollapsed,e)}function Oie(){return uo(un.sidebarViewMode)==="flat"?"flat":"grouped"}function Pie(e){Ns(un.sidebarViewMode,e)}function jie(){const e=od(un.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function DL(e){Pu(un.workspaceOrder,Array.from(e))}function Hie(){return uo(un.workspaceSort)==="recent"?"recent":"manual"}function Wie(e){Ns(un.workspaceSort,e)}function qie(){const e=od(un.workspaceRecencyFloor);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="number"&&Number.isFinite(i)&&(t[n]=i);return t}function RL(e){Pu(un.workspaceRecencyFloor,e)}function zL(){const e=od(un.pinnedSessions);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function dv(e){Pu(un.pinnedSessions,Array.from(e))}function P0(){const e=od(un.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="string"&&(t[n]=i);return t}function QC(e){Pu(un.workspaceNameOverrides,e)}function YC(e,t){const n=new Set(e.map(a=>a.id)),i=t.filter(a=>a.kind==="subagent"&&!n.has(a.id));if(i.length===0)return e;const s=new Map(e.map(a=>[a.id,a])),o=new Set,r=i.map(a=>{const u=a.backgroundTaskId!==void 0?s.get(a.backgroundTaskId):void 0;if(u===void 0)return a;o.add(u.id);const c=a.status==="running"&&u.status!=="running";return{...a,status:a.status==="running"?u.status:a.status,subagentPhase:c?u.status==="completed"?"completed":"failed":a.subagentPhase,completedAt:u.completedAt??a.completedAt,completedAtEstimated:u.completedAt!==void 0?void 0:a.completedAtEstimated,outputPreview:u.outputPreview??a.outputPreview,outputBytes:u.outputBytes??a.outputBytes,model:a.model??u.model,thinkingEffort:a.thinkingEffort??u.thinkingEffort}});return[...e.filter(a=>!o.has(a.id)),...r]}function Uie(e,t){if(e.length===0)return t;const n=new Map(t.map(r=>[r.id,r])),i=new Set(e.map(r=>r.id)),s=e.map(r=>{const l=n.get(r.id);if(!l)return r;const a=r.completedAt===void 0&&l.completedAt===void 0&&l.status==="running"&&r.status!=="running";return{...r,outputLines:l.outputLines,text:l.text,completedAt:r.completedAt??l.completedAt??(a?new Date().toISOString():void 0),completedAtEstimated:r.completedAt!==void 0?void 0:l.completedAt!==void 0?l.completedAtEstimated:a?!0:void 0,model:r.model??l.model,thinkingEffort:r.thinkingEffort??l.thinkingEffort}}),o=t.filter(r=>!i.has(r.id));return o.length===0?s:[...s,...o]}function Kie(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const e=navigator.userAgentData;return e?.platform==="macOS"||e?.platform==="iOS"}function Vie(e,t=Kie()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyF"||e.key.toLowerCase()==="f")&&!e.defaultPrevented}const Zie=new Map([["ς","σ"],["ß","ss"],["ſ","s"],["ff","ff"],["fi","fi"],["fl","fl"],["ffi","ffi"],["ffl","ffl"],["ſt","st"],["st","st"],["ʼn","ʼn"],["µ","μ"],["K","k"],["Å","å"],["Ω","ω"]]);function Gie(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function Qie(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(r,l)=>l)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let i="";const s=[];let o=!1;for(let r=0;r<e.length;r++)n.test(e[r])?o||(i+=" ",s.push(r),o=!0):(i+=e[r],s.push(r),o=!1);return{text:i,map:s}}function JC(e){let t="";const n=[];let i=0;for(const s of e){const o=s.toLowerCase(),r=Zie.get(o)??o;t+=r;for(let l=0;l<r.length;l++)n.push({start:i,length:s.length});i+=s.length}return{folded:t,map:n}}function*Yie(e,t){if(t.length===0||e.length===0)return;const n=e.map(c=>JC(c.text)),i="\0";let s="";const o=[];for(let c=0;c<e.length;c++)c>0&&e[c].gapBefore&&(s+=i),o[c]=s.length,s+=n[c].folded;const r=Xie(JC(t).folded);if(r===null)return;const l=new RegExp(r,"g");function a(c){let d=0,f=o.length-1,p=0;for(;d<=f;){const g=d+f>>1;o[g]<=c?(p=g,d=g+1):f=g-1}return p}let u;for(;;){const c=l.exec(s);if(c===null)return;const d=c.index,f=d+c[0].length-1,p=a(d),g=a(f),m=n[p].map[d-o[p]],y=n[g].map[f-o[g]],w={startSeg:p,startOffset:m.start,endSeg:g,endOffset:y.start+y.length};u!==void 0&&u.startSeg===w.startSeg&&u.startOffset===w.startOffset&&u.endSeg===w.endSeg&&u.endOffset===w.endOffset||(u=w,yield w)}}const Jie=/[.*+?^${}()|[\]\\]/g;function Xie(e){const t=[];let n=0;for(;n<e.length;){const i=/^\s+/.exec(e.slice(n));if(i!==null){t.push("\\s+"),n+=i[0].length;continue}const s=/^[^\s]+/.exec(e.slice(n));t.push(s[0].replaceAll(Jie,"\\$&")),n+=s[0].length}return t.length===0?null:t.join("")}const XC="script, style, noscript, template, [inert], .top-sentinel",ese=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),tse=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function nse(e,t){const n=t.get(e);if(n!==void 0)return n;const i=ese.has(e.tagName)||!tse.has(getComputedStyle(e).display);return t.set(e,i),i}function ise(e,t,n){let i=e.parentElement;for(;i!==null&&i!==t&&!nse(i,n);)i=i.parentElement;return i??t}const sse=1e3;function ose(e,t){if(t.length===0)return{ranges:[],truncated:!1};const n=e.ownerDocument,i=n.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode(u){return u.nodeType===Node.ELEMENT_NODE?u.matches(XC)?NodeFilter.FILTER_REJECT:u.matches("br, hr, wbr")&&!u.closest(XC)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),s=new WeakMap,o=new WeakMap,r=[];let l=!1;for(let u=i.nextNode();u!==null;u=i.nextNode()){if(u.nodeType===Node.ELEMENT_NODE){l=!0;continue}const c=u.nodeValue??"";if(c.length===0)continue;const d=u.parentElement;if(d===null)continue;let f=o.get(d);f===void 0&&(f=Gie(getComputedStyle(d).whiteSpace),o.set(d,f));let{text:p,map:g}=Qie(c,f);if(p.length===0)continue;const m=ise(u,e,s),y=r.at(-1),w=l||y===void 0||y.block!==m;!w&&y.text.endsWith(" ")&&p.startsWith(" ")&&(p=p.slice(1),g=g.slice(1),p.length===0)||(r.push({text:p,gapBefore:w,node:u,block:m,wsMap:g}),l=!1)}const a=[];for(const u of Yie(r,t)){const c=r[u.startSeg],d=r[u.endSeg],f=n.createRange();if(f.setStart(c.node,c.wsMap[u.startOffset]),f.setEnd(d.node,d.wsMap[u.endOffset-1]+1),f.getClientRects().length!==0){if(a.length>=sse)return{ranges:a,truncated:!0};a.push(f)}}return{ranges:a,truncated:!1}}const OL="kimi-transcript-search",R3="kimi-transcript-search-current";function PL(){return globalThis.CSS?.highlights??null}function cy(e,t){const n=PL(),i=globalThis.Highlight;if(!n||!i)return;if(e.length===0){z3();return}const s=new i;for(const r of e)s.add(r);n.set(OL,s);const o=e[t];if(o!==void 0){const r=new i;r.add(o),n.set(R3,r)}else n.delete(R3)}function z3(){const e=PL();e?.delete(OL),e?.delete(R3)}function rse(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const e=navigator.userAgentData;return e?.platform==="macOS"||e?.platform==="iOS"}function lse(e,t=rse()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyA"||e.key.toLowerCase()==="a")&&!e.defaultPrevented}function ase(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement&&(e.isContentEditable||e.closest("input, textarea")!==null)}function use(e,t){return typeof Element>"u"||!(e instanceof Element)?null:e.closest(t)}function ew(e){e.ownerDocument.getSelection()?.selectAllChildren(e)}const cse=`https://www.kimi.com/code?from=${Wf?"kimi_code_desktop":"kimi_code_web"}`;function Cp(){window.open(cse,"_blank","noopener")}function dse(e,t,n){if(e.length===0)return null;const i=new Set(e),s=t.filter(r=>i.has(r)),o=e.filter(r=>!t.includes(r));return o.length===0&&s.length===t.length?null:t.length===0&&n!==void 0?o.toSorted((r,l)=>(n.get(l)??Number.NEGATIVE_INFINITY)-(n.get(r)??Number.NEGATIVE_INFINITY)):[...o,...s]}function fse(e,t){const n=new Map(t.map((i,s)=>[i,s]));return e.toSorted((i,s)=>(n.get(i.id)??-1)-(n.get(s.id)??-1))}function hse(e,t,n,i="before"){const s=e.indexOf(t),o=e.indexOf(n);if(s===-1||o===-1||s===o)return e;const r=[...e];r.splice(s,1);const l=s<o?o-1:o,a=i==="before"?l:l+1;return r.splice(a,0,t),r}function pse(e,t){return e.toSorted((n,i)=>(t.get(i.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}function gse(e,t){let n=!1;const i={...e};for(const[s,o]of t)o>(i[s]??Number.NEGATIVE_INFINITY)&&(i[s]=o,n=!0);return{next:i,changed:n}}function mse(e,t){const n=new Map;for(const i of e){if(i.parentSessionId||i.archived)continue;const s=new Date(i.updatedAt).getTime();if(Number.isNaN(s))continue;const o=t(i);s>(n.get(o)??Number.NEGATIVE_INFINITY)&&n.set(o,s)}return n}function vse(e,t){const n=new Map;for(const i of e){const s=t[i.id]??Number.NEGATIVE_INFINITY,o=i.lastOpenedAt?Date.parse(i.lastOpenedAt):Number.NaN,r=Number.isNaN(o)?Number.NEGATIVE_INFINITY:o;n.set(i.id,Math.max(s,r))}return n}function yse(e,t){const n=Object.keys(e);if(!n.some(s=>!t.has(s)))return{next:e,changed:!1};const i={};for(const s of n)t.has(s)&&(i[s]=e[s]);return{next:i,changed:!0}}const bse=5;function kse(e,t,n,i=bse){if(e.length<=i)return e;const s=e.slice(0,i);if(t&&!s.some(o=>o.id===t)){const o=e.find(r=>r.id===t);o&&(s[i-1]=o)}return s}const Ase={class:"sd-body"},Cse={class:"sd-search"},wse=["aria-label"],xse={key:0,class:"sd-section","aria-hidden":"true"},_se={class:"sd-section-count"},Sse=["aria-selected","onClick","onMousemove"],Mse=["innerHTML"],Ise=["innerHTML"],Ese=["aria-selected","onClick","onMousemove"],Tse={class:"sd-line1"},Lse=["innerHTML"],Nse={class:"sd-time"},Fse={class:"sd-line2"},Bse=["innerHTML"],$se=["innerHTML"],Dse={key:1,class:"sd-empty"},Rse={class:"sd-foot","aria-hidden":"true"},zse={class:"sd-hint"},Ose={class:"sd-hint"},Pse={class:"sd-hint"},jse=200,Hse=3,Wse=tt({__name:"SearchSessionsDialog",props:{sessions:{},workspaces:{},activeId:{}},emits:["select","selectWorkspace","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=Z(!0),r=Z(""),l=Z(null),a=Z(null),u=F(()=>{const S=r.value.trim().toLowerCase(),M=[];if(S.length===0)for(const N of i.workspaces.slice(0,Hse))M.push({kind:"workspace",key:`ws:${N.id}`,hit:{workspace:N,inName:!1,inPath:!1}});else for(const N of i.workspaces){const D=N.name.toLowerCase().includes(S),T=N.shortPath.toLowerCase().includes(S);!D&&!T||M.push({kind:"workspace",key:`ws:${N.id}`,hit:{workspace:N,inName:D,inPath:T}})}const _=[];for(const N of i.sessions){const D=N.title??"",T=N.lastPrompt??"",$=N.workspaceName??"",P=S.length>0&&D.toLowerCase().includes(S),O=S.length>0&&T.toLowerCase().includes(S),R=S.length>0&&$.toLowerCase().includes(S);if(!(S.length>0&&!P&&!O&&!R)&&(_.push({kind:"session",key:`s:${N.id}`,hit:{session:N,inTitle:P,inWorkspace:R,snippetText:T?wte(T,r.value):""}}),_.length>=jse))break}return M.length>0&&_.length>0&&(M[0].section={label:n("sidebar.workspaces"),count:M.length},_[0].section={label:n("sidebar.sessionsHeader"),count:_.length}),[...M,..._]}),c=Z(0);Qe(r,()=>{c.value=0});function d(S){const M=u.value.length;return M===0?0:Math.max(0,Math.min(M-1,S))}async function f(){await kt(),a.value?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})}function p(S){c.value=d(c.value+S),f()}function g(S){s("select",S),s("close")}function m(S){s("selectWorkspace",S),s("close")}function y(){r.value="",l.value?.focus()}function w(){const S=u.value[c.value];S&&(S.kind==="workspace"?m(S.hit.workspace.id):g(S.hit.session.id))}function k(){return l.value?.el??null}const{handleCompositionStart:A,handleCompositionEnd:v,isComposingKeyEvent:x}=Kr();function E(S){if(x(S)){S.key==="Escape"&&S.stopPropagation();return}S.key==="ArrowDown"?(S.preventDefault(),p(1)):S.key==="ArrowUp"?(S.preventDefault(),p(-1)):S.key==="Enter"&&(S.preventDefault(),w())}return pn(()=>{l.value?.focus()}),(S,M)=>(b(),fe(h(La),{open:o.value,"onUpdate:open":M[1]||(M[1]=_=>o.value=_),title:h(n)("sidebar.searchPlaceholder"),size:"lg",height:"fixed",padded:!1,"initial-focus":k,onClose:M[2]||(M[2]=_=>s("close"))},{default:he(()=>[C("div",Ase,[C("div",Cse,[V(h(io),{ref_key:"inputRef",ref:l,modelValue:r.value,"onUpdate:modelValue":M[0]||(M[0]=_=>r.value=_),placeholder:h(n)("sidebar.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:E,onCompositionstart:h(A),onCompositionend:h(v)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),V(h(gn),{text:h(n)("sidebar.searchClear")},{default:he(()=>[C("button",{type:"button",class:De(["search-clear",{"is-on":r.value.length>0}]),tabindex:"-1","aria-label":h(n)("sidebar.searchClear"),onClick:y},[V(h(Ce),{name:"close",size:"sm"})],10,wse)]),_:1},8,["text"])]),C("div",{ref_key:"listRef",ref:a,class:"sd-list",role:"listbox"},[u.value.length>0?(b(!0),I(Be,{key:0},yt(u.value,(_,N)=>(b(),I(Be,{key:_.key},[_.section?(b(),I("div",xse,[C("span",null,B(_.section.label),1),C("span",_se,B(_.section.count),1)])):ne("",!0),_.kind==="workspace"?(b(),I("button",{key:1,class:De(["sd-row sd-row-ws",{on:N===c.value}]),role:"option","aria-selected":N===c.value,onClick:D=>m(_.hit.workspace.id),onMousemove:D=>c.value=N},[V(h(Ce),{class:"sd-folder",name:"folder-closed",size:"sm"}),C("span",{class:"sd-ws-name",innerHTML:h(_h)(_.hit.workspace.name,_.hit.inName?r.value:"")},null,8,Mse),C("span",{class:"sd-ws-path",innerHTML:h(_h)(_.hit.workspace.shortPath,_.hit.inPath?r.value:"")},null,8,Ise)],42,Sse)):(b(),I("button",{key:2,class:De(["sd-row",{on:N===c.value,active:_.hit.session.id===e.activeId}]),role:"option","aria-selected":N===c.value,onClick:D=>g(_.hit.session.id),onMousemove:D=>c.value=N},[C("span",Tse,[C("span",{class:"sd-title",innerHTML:h(_h)(_.hit.session.title,_.hit.inTitle?r.value:"")},null,8,Lse),C("span",Nse,B(_.hit.session.time),1)]),C("span",Fse,[C("span",{class:"sd-meta-ws",innerHTML:h(_h)(_.hit.session.workspaceName??_.hit.session.workspaceId??"",_.hit.inWorkspace?r.value:"")},null,8,Bse),_.hit.snippetText?(b(),I(Be,{key:0},[M[3]||(M[3]=C("span",{class:"sd-meta-sep","aria-hidden":"true"},"·",-1)),C("span",{class:"sd-meta-snippet",innerHTML:h(_h)(_.hit.snippetText,r.value)},null,8,$se)],64)):ne("",!0)])],42,Ese))],64))),128)):(b(),I("div",Dse,[V(h(eU),{title:r.value.trim()?h(n)("sidebar.searchNoResults"):h(n)("sidebar.searchEmpty")},{icon:he(()=>[V(h(Ce),{name:"search",size:"lg"})]),_:1},8,["title"])]))],512),C("div",Rse,[C("span",zse,[V(h(Aa),{keys:["↑","↓"]}),Ue(B(h(n)("sidebar.searchHintSelect")),1)]),M[4]||(M[4]=C("span",{class:"sd-dot"},"·",-1)),C("span",Ose,[V(h(Aa),{keys:["Enter"]}),Ue(B(h(n)("sidebar.searchHintOpen")),1)]),M[5]||(M[5]=C("span",{class:"sd-dot"},"·",-1)),C("span",Pse,[V(h(Aa),{keys:["Esc"]}),Ue(B(h(n)("sidebar.searchHintClose")),1)])])])]),_:1},8,["open","title"]))}}),qse=vt(Wse,[["__scopeId","data-v-5bf43f78"]]);var Use=Object.create,Z5=Object.defineProperty,Kse=Object.getOwnPropertyDescriptor,jL=Object.getOwnPropertyNames,Vse=Object.getPrototypeOf,Zse=Object.prototype.hasOwnProperty,HL=(e,t)=>function(){return t||(0,e[jL(e)[0]])((t={exports:{}}).exports,t),t.exports},Gse=e=>{let t={};for(var n in e)Z5(t,n,{get:e[n],enumerable:!0});return t},Qse=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=jL(t),o=0,r=s.length,l;o<r;o++)l=s[o],!Zse.call(e,l)&&l!==n&&Z5(e,l,{get:(a=>t[a]).bind(null,l),enumerable:!(i=Kse(t,l))||i.enumerable});return e},WL=(e,t,n)=>(n=e!=null?Use(Vse(e)):{},Qse(Z5(n,"default",{value:e,enumerable:!0}),e));function Yse(e,t,n,i){const s=Number(e[t].meta.id+1).toString();let o="";return typeof i.docId=="string"&&(o=`-${i.docId}-`),o+s}function Jse(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function Xse(e,t,n,i,s){const o=s.rules.footnote_anchor_name(e,t,n,i,s),r=s.rules.footnote_caption(e,t,n,i,s);let l=o;return e[t].meta.subId>0&&(l+=`:${e[t].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${o}" id="fnref${l}">${r}</a></sup>`}function eoe(e,t,n){return(n.xhtmlOut?`<hr class="footnotes-sep" /> -`:`<hr class="footnotes-sep"> -`)+`<section class="footnotes"> -<ol class="footnotes-list"> -`}function toe(){return`</ol> -</section> -`}function noe(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),`<li id="fn${o}" class="footnote-item">`}function ioe(){return`</li> -`}function soe(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),` <a href="#fnref${o}" class="footnote-backref">↩︎</a>`}function ooe(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=Xse,e.renderer.rules.footnote_block_open=eoe,e.renderer.rules.footnote_block_close=toe,e.renderer.rules.footnote_open=noe,e.renderer.rules.footnote_close=ioe,e.renderer.rules.footnote_anchor=soe,e.renderer.rules.footnote_caption=Jse,e.renderer.rules.footnote_anchor_name=Yse;function i(l,a,u,c){const d=l.bMarks[a]+l.tShift[a],f=l.eMarks[a];if(d+4>f||l.src.charCodeAt(d)!==91||l.src.charCodeAt(d+1)!==94)return!1;let p;for(p=d+2;p<f;p++){if(l.src.charCodeAt(p)===32)return!1;if(l.src.charCodeAt(p)===93)break}if(p===d+2||p+1>=f||l.src.charCodeAt(++p)!==58)return!1;if(c)return!0;p++,l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.refs||(l.env.footnotes.refs={});const g=l.src.slice(d+2,p-2);l.env.footnotes.refs[`:${g}`]=-1;const m=new l.Token("footnote_reference_open","",1);m.meta={label:g},m.level=l.level++,l.tokens.push(m);const y=l.bMarks[a],w=l.tShift[a],k=l.sCount[a],A=l.parentType,v=p,x=l.sCount[a]+p-(l.bMarks[a]+l.tShift[a]);let E=x;for(;p<f;){const M=l.src.charCodeAt(p);if(n(M))M===9?E+=4-E%4:E++;else break;p++}l.tShift[a]=p-v,l.sCount[a]=E-x,l.bMarks[a]=v,l.blkIndent+=4,l.parentType="footnote",l.sCount[a]<l.blkIndent&&(l.sCount[a]+=l.blkIndent),l.md.block.tokenize(l,a,u,!0),l.parentType=A,l.blkIndent-=4,l.tShift[a]=w,l.sCount[a]=k,l.bMarks[a]=y;const S=new l.Token("footnote_reference_close","",-1);return S.level=--l.level,l.tokens.push(S),!0}function s(l,a){const u=l.posMax,c=l.pos;if(c+2>=u||l.src.charCodeAt(c)!==94||l.src.charCodeAt(c+1)!==91)return!1;const d=c+2,f=t(l,c+1);if(f<0)return!1;if(!a){l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.list||(l.env.footnotes.list=[]);const p=l.env.footnotes.list.length,g=[];l.md.inline.parse(l.src.slice(d,f),l.md,l.env,g);const m=l.push("footnote_ref","",0);m.meta={id:p},l.env.footnotes.list[p]={content:l.src.slice(d,f),tokens:g}}return l.pos=f+1,l.posMax=u,!0}function o(l,a){const u=l.posMax,c=l.pos;if(c+3>u||!l.env.footnotes||!l.env.footnotes.refs||l.src.charCodeAt(c)!==91||l.src.charCodeAt(c+1)!==94)return!1;let d;for(d=c+2;d<u;d++){if(l.src.charCodeAt(d)===32||l.src.charCodeAt(d)===10)return!1;if(l.src.charCodeAt(d)===93)break}if(d===c+2||d>=u)return!1;d++;const f=l.src.slice(c+2,d-1);if(typeof l.env.footnotes.refs[`:${f}`]>"u")return!1;if(!a){l.env.footnotes.list||(l.env.footnotes.list=[]);let p;l.env.footnotes.refs[`:${f}`]<0?(p=l.env.footnotes.list.length,l.env.footnotes.list[p]={label:f,count:0},l.env.footnotes.refs[`:${f}`]=p):p=l.env.footnotes.refs[`:${f}`];const g=l.env.footnotes.list[p].count;l.env.footnotes.list[p].count++;const m=l.push("footnote_ref","",0);m.meta={id:p,subId:g,label:f}}return l.pos=d,l.posMax=u,!0}function r(l){let a,u,c,d=!1;const f={};if(!l.env.footnotes||(l.tokens=l.tokens.filter(function(g){return g.type==="footnote_reference_open"?(d=!0,u=[],c=g.meta.label,!1):g.type==="footnote_reference_close"?(d=!1,f[":"+c]=u,!1):(d&&u.push(g),!d)}),!l.env.footnotes.list))return;const p=l.env.footnotes.list;l.tokens.push(new l.Token("footnote_block_open","",1));for(let g=0,m=p.length;g<m;g++){const y=new l.Token("footnote_open","",1);if(y.meta={id:g,label:p[g].label},l.tokens.push(y),p[g].tokens){a=[];const A=new l.Token("paragraph_open","p",1);A.block=!0,a.push(A);const v=new l.Token("inline","",0);v.children=p[g].tokens,v.content=p[g].content,a.push(v);const x=new l.Token("paragraph_close","p",-1);x.block=!0,a.push(x)}else p[g].label&&(a=f[`:${p[g].label}`]);a&&(l.tokens=l.tokens.concat(a));let w;l.tokens[l.tokens.length-1].type==="paragraph_close"?w=l.tokens.pop():w=null;const k=p[g].count>0?p[g].count:1;for(let A=0;A<k;A++){const v=new l.Token("footnote_anchor","",0);v.meta={id:g,subId:A,label:p[g].label},l.tokens.push(v)}w&&l.tokens.push(w),l.tokens.push(new l.Token("footnote_close","",-1))}l.tokens.push(new l.Token("footnote_block_close","",-1))}e.block.ruler.before("reference","footnote_def",i,{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",s),e.inline.ruler.after("footnote_inline","footnote_ref",o),e.core.ruler.after("inline","footnote_tail",r)}function roe(e){function t(i,s){const o=i.pos,r=i.src.charCodeAt(o);if(s||r!==43)return!1;const l=i.scanDelims(i.pos,!0);let a=l.length;const u=String.fromCharCode(r);if(a<2)return!1;if(a%2){const c=i.push("text","",0);c.content=u,a--}for(let c=0;c<a;c+=2){const d=i.push("text","",0);d.content=u+u,!(!l.can_open&&!l.can_close)&&i.delimiters.push({marker:r,length:0,jump:c/2,token:i.tokens.length-1,end:-1,open:l.can_open,close:l.can_close})}return i.pos+=l.length,!0}function n(i,s){let o;const r=[],l=s.length;for(let a=0;a<l;a++){const u=s[a];if(u.marker!==43||u.end===-1)continue;const c=s[u.end];o=i.tokens[u.token],o.type="ins_open",o.tag="ins",o.nesting=1,o.markup="++",o.content="",o=i.tokens[c.token],o.type="ins_close",o.tag="ins",o.nesting=-1,o.markup="++",o.content="",i.tokens[c.token-1].type==="text"&&i.tokens[c.token-1].content==="+"&&r.push(c.token-1)}for(;r.length;){const a=r.pop();let u=a+1;for(;u<i.tokens.length&&i.tokens[u].type==="ins_close";)u++;u--,a!==u&&(o=i.tokens[u],i.tokens[u]=i.tokens[a],i.tokens[a]=o)}}e.inline.ruler.before("emphasis","ins",t),e.inline.ruler2.before("emphasis","ins",function(i){const s=i.tokens_meta,o=(i.tokens_meta||[]).length;n(i,i.delimiters);for(let r=0;r<o;r++)s[r]&&s[r].delimiters&&n(i,s[r].delimiters)})}function loe(e){function t(i,s){const o=i.pos,r=i.src.charCodeAt(o);if(s||r!==61)return!1;const l=i.scanDelims(i.pos,!0);let a=l.length;const u=String.fromCharCode(r);if(a<2)return!1;if(a%2){const c=i.push("text","",0);c.content=u,a--}for(let c=0;c<a;c+=2){const d=i.push("text","",0);d.content=u+u,!(!l.can_open&&!l.can_close)&&i.delimiters.push({marker:r,length:0,jump:c/2,token:i.tokens.length-1,end:-1,open:l.can_open,close:l.can_close})}return i.pos+=l.length,!0}function n(i,s){const o=[],r=s.length;for(let l=0;l<r;l++){const a=s[l];if(a.marker!==61||a.end===-1)continue;const u=s[a.end],c=i.tokens[a.token];c.type="mark_open",c.tag="mark",c.nesting=1,c.markup="==",c.content="";const d=i.tokens[u.token];d.type="mark_close",d.tag="mark",d.nesting=-1,d.markup="==",d.content="",i.tokens[u.token-1].type==="text"&&i.tokens[u.token-1].content==="="&&o.push(u.token-1)}for(;o.length;){const l=o.pop();let a=l+1;for(;a<i.tokens.length&&i.tokens[a].type==="mark_close";)a++;if(a--,l!==a){const u=i.tokens[a];i.tokens[a]=i.tokens[l],i.tokens[l]=u}}}e.inline.ruler.before("emphasis","mark",t),e.inline.ruler2.before("emphasis","mark",function(i){let s;const o=i.tokens_meta,r=(i.tokens_meta||[]).length;for(n(i,i.delimiters),s=0;s<r;s++)o[s]&&o[s].delimiters&&n(i,o[s].delimiters)})}const aoe=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function uoe(e,t){const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==94||t||i+2>=n)return!1;e.pos=i+1;let s=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===94){s=!0;break}e.md.inline.skipToken(e)}if(!s||i+1===e.pos)return e.pos=i,!1;const o=e.src.slice(i+1,e.pos);if(o.match(/(^|[^\\])(\\\\)*\s/))return e.pos=i,!1;e.posMax=e.pos,e.pos=i+1;const r=e.push("sup_open","sup",1);r.markup="^";const l=e.push("text","",0);l.content=o.replace(aoe,"$1");const a=e.push("sup_close","sup",-1);return a.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function coe(e){e.inline.ruler.after("emphasis","sup",uoe)}var doe=HL({"../../node_modules/.pnpm/markdown-it-task-checkbox@1.0.6/node_modules/markdown-it-task-checkbox/index.js":((e,t)=>{t.exports=function(m,y){y=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},y),m.core.ruler.after("inline","github-task-lists",function(w){for(var k=w.tokens,A=0,v=2;v<k.length;v++)s(k,v)&&(o(k[v],A,y,w.Token),A+=1,n(k[v-2],"class",y.liClass),n(k[i(k,v-2)],"class",y.ulClass))})};function n(m,y,w){var k=m.attrIndex(y),A=[y,w];k<0?m.attrPush(A):m.attrs[k]=A}function i(m,y){for(var w=m[y].level-1,k=y-1;k>=0;k--)if(m[k].level===w)return k;return-1}function s(m,y){return d(m[y])&&f(m[y-1])&&p(m[y-2])&&g(m[y])}function o(m,y,w,k){var A=w.idPrefix+y;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(l(A,k)),m.children.push(a(k)),m.children.unshift(r(m,A,w,k)),w.divWrap&&(m.children.unshift(u(w,k)),m.children.push(c(k)))}function r(m,y,w,k){var A=new k("checkbox_input","input",0);return A.attrs=[["type","checkbox"],["id",y]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&A.attrs.push(["checked","true"]),w.disabled===!0&&A.attrs.push(["disabled","true"]),A}function l(m,y){var w=new y("label_open","label",1);return w.attrs=[["for",m]],w}function a(m){return new m("label_close","label",-1)}function u(m,y){var w=new y("checkbox_open","div",0);return w.attrs=[["class",m.divClass]],w}function c(m){return new m("checkbox_close","div",-1)}function d(m){return m.type==="inline"}function f(m){return m.type==="paragraph_open"}function p(m){return m.type==="list_item_open"}function g(m){return/^\[[xX \u00A0]\][ \u00A0]/.test(m.content)}})});const foe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function hoe(e){return e>=55296&&e<=57343||e>1114111?65533:foe.get(e)??e}function poe(e){const t=atob(e),n=t.length&-2,i=new Uint16Array(n/2);for(let s=0,o=0;s<n;s+=2){const r=t.charCodeAt(s),l=t.charCodeAt(s+1);i[o++]=r|l<<8}return i}const goe=poe("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");var To;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(To||(To={}));var Ui;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Ui||(Ui={}));const tw=32;function O3(e){return e>=Ui.ZERO&&e<=Ui.NINE}function moe(e){return e>=Ui.UPPER_A&&e<=Ui.UPPER_F||e>=Ui.LOWER_A&&e<=Ui.LOWER_F}function voe(e){return e>=Ui.UPPER_A&&e<=Ui.UPPER_Z||e>=Ui.LOWER_A&&e<=Ui.LOWER_Z||O3(e)}function yoe(e){return e===Ui.EQUALS||voe(e)}var zs;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(zs||(zs={}));var su;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(su||(su={}));var boe=class{decodeTree;emitCodePoint;errors;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}state=zs.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=su.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=zs.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case zs.EntityStart:return e.charCodeAt(t)===Ui.NUM?(this.state=zs.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=zs.NamedEntity,this.stateNamedEntity(e,t));case zs.NumericStart:return this.stateNumericStart(e,t);case zs.NumericDecimal:return this.stateNumericDecimal(e,t);case zs.NumericHex:return this.stateNumericHex(e,t);case zs.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|tw)===Ui.LOWER_X?(this.state=zs.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=zs.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t<e.length;){const n=e.charCodeAt(t);if(O3(n)||moe(n)){const i=n<=Ui.NINE?n-Ui.ZERO:(n|tw)-Ui.LOWER_A+10;this.result=this.result*16+i,this.consumed++,t++}else return this.emitNumericEntity(n,3)}return-1}stateNumericDecimal(e,t){for(;t<e.length;){const n=e.charCodeAt(t);if(O3(n))this.result=this.result*10+(n-Ui.ZERO),this.consumed++,t++;else return this.emitNumericEntity(n,2)}return-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Ui.SEMI)this.consumed+=1;else if(this.decodeMode===su.Strict)return 0;return this.emitCodePoint(hoe(this.result),this.consumed),this.errors&&(e!==Ui.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let i=n[this.treeIndex],s=(i&To.VALUE_LENGTH)>>14;for(;t<e.length;){if(s===0&&(i&To.FLAG13)!==0){const r=(i&To.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const l=i&To.JUMP_TABLE;if(e.charCodeAt(t)!==l)return this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed<r;){if(t>=e.length)return-1;const l=this.runConsumed-1,a=n[this.treeIndex+1+(l>>1)],u=l%2===0?a&255:a>>8&255;if(e.charCodeAt(t)!==u)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(r>>1),i=n[this.treeIndex],s=(i&To.VALUE_LENGTH)>>14}if(t>=e.length)break;const o=e.charCodeAt(t);if(o===Ui.SEMI&&s!==0&&(i&To.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);if(this.treeIndex=Aoe(n,i,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===su.Attribute&&(s===0||yoe(o))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],s=(i&To.VALUE_LENGTH)>>14,s!==0){if(o===Ui.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==su.Strict&&(i&To.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return-1}emitNotTerminatedNamedEntity(){const{result:e,decodeTree:t}=this,n=(t[e]&To.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:i}=this;return this.emitCodePoint(t===1?i[e]&~(To.VALUE_LENGTH|To.FLAG13):i[e+1],n),t===3&&this.emitCodePoint(i[e+2],n),n}end(){switch(this.state){case zs.NamedEntity:return this.result!==0&&(this.decodeMode!==su.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case zs.NumericDecimal:return this.emitNumericEntity(0,2);case zs.NumericHex:return this.emitNumericEntity(0,3);case zs.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case zs.EntityStart:return 0}}};function koe(e){let t="";const n=new boe(e,i=>t+=String.fromCodePoint(i));return function(s,o){let r=0,l=0;for(;(l=s.indexOf("&",l))>=0;){t+=s.slice(r,l),n.startEntity(o);const u=n.write(s,l+1);if(u<0){r=l+n.end();break}r=l+u,l=u===0?r+1:r}const a=t+s.slice(r);return t="",a}}function Aoe(e,t,n,i){const s=(t&To.BRANCH_LENGTH)>>7,o=t&To.JUMP_TABLE;if(s===0)return o!==0&&i===o?n:-1;if(o){const u=i-o;return u<0||u>=s?-1:e[n+u]-1}const r=s+1>>1;let l=0,a=s-1;for(;l<=a;){const u=l+a>>>1,c=e[n+(u>>1)]>>(u&1)*8&255;if(c<i)l=u+1;else if(c>i)a=u-1;else return e[n+r+u]}return-1}const Coe=koe(goe);function G5(e,t=su.Legacy){return Coe(e,t)}var woe=WL(doe());const nw={};function xoe(e){let t=nw[e];if(t)return t;t=nw[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);t.push(i)}for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return t}function fv(e,t){typeof t!="string"&&(t=fv.defaultChars);const n=xoe(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let s="";for(let o=0,r=i.length;o<r;o+=3){const l=parseInt(i.slice(o+1,o+3),16);if(l<128){s+=n[l];continue}if((l&224)===192&&o+3<r){const a=parseInt(i.slice(o+4,o+6),16);if((a&192)===128){const u=l<<6&1984|a&63;u<128?s+="��":s+=String.fromCharCode(u),o+=3;continue}}if((l&240)===224&&o+6<r){const a=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16);if((a&192)===128&&(u&192)===128){const c=l<<12&61440|a<<6&4032|u&63;c<2048||c>=55296&&c<=57343?s+="���":s+=String.fromCharCode(c),o+=6;continue}}if((l&248)===240&&o+9<r){const a=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16),c=parseInt(i.slice(o+10,o+12),16);if((a&192)===128&&(u&192)===128&&(c&192)===128){let d=l<<18&1835008|a<<12&258048|u<<6&4032|c&63;d<65536||d>1114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}s+="�"}return s})}fv.defaultChars=";/?:@&=+$,#";fv.componentChars="";var P3=fv;const iw={};function _oe(e){let t=iw[e];if(t)return t;t=iw[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function hv(e,t,n){typeof t!="string"&&(n=t,t=hv.defaultChars),typeof n>"u"&&(n=!0);const i=_oe(t);let s="";for(let o=0,r=e.length;o<r;o++){const l=e.charCodeAt(o);if(n&&l===37&&o+2<r&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){s+=e.slice(o,o+3),o+=2;continue}if(l<128){s+=i[l];continue}if(l>=55296&&l<=57343){if(l>=55296&&l<=56319&&o+1<r){const a=e.charCodeAt(o+1);if(a>=56320&&a<=57343){s+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[o])}return s}hv.defaultChars=";/?:@&=+$,-_.!~*'()#";hv.componentChars="-_.!~*'()";var qL=hv;function Q5(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Tm(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Soe=/^([a-z0-9.+-]+:)/i,Moe=/:[0-9]*$/,Ioe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Eoe=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` -`," "]),Toe=["'"].concat(Eoe),sw=["%","/","?",";","#"].concat(Toe),ow=["/","?","#"],Loe=255,rw=/^[+a-z0-9A-Z_-]{0,63}$/,Noe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,lw={javascript:!0,"javascript:":!0},aw={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Foe(e,t){if(e&&e instanceof Tm)return e;const n=new Tm;return n.parse(e,t),n}Tm.prototype.parse=function(e,t){let n,i,s,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=Ioe.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let r=Soe.exec(o);if(r&&(r=r[0],n=r.toLowerCase(),this.protocol=r,o=o.substr(r.length)),(t||r||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=o.substr(0,2)==="//",s&&!(r&&lw[r])&&(o=o.substr(2),this.slashes=!0)),!lw[r]&&(s||r&&!aw[r])){let u=-1;for(let g=0;g<ow.length;g++)i=o.indexOf(ow[g]),i!==-1&&(u===-1||i<u)&&(u=i);let c,d;u===-1?d=o.lastIndexOf("@"):d=o.lastIndexOf("@",u),d!==-1&&(c=o.slice(0,d),o=o.slice(d+1),this.auth=c),u=-1;for(let g=0;g<sw.length;g++)i=o.indexOf(sw[g]),i!==-1&&(u===-1||i<u)&&(u=i);u===-1&&(u=o.length),o[u-1]===":"&&u--;const f=o.slice(0,u);o=o.slice(u),this.parseHost(f),this.hostname=this.hostname||"";const p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){const g=this.hostname.split(/\./);for(let m=0,y=g.length;m<y;m++){const w=g[m];if(w&&!w.match(rw)){let k="";for(let A=0,v=w.length;A<v;A++)w.charCodeAt(A)>127?k+="x":k+=w[A];if(!k.match(rw)){const A=g.slice(0,m),v=g.slice(m+1),x=w.match(Noe);x&&(A.push(x[1]),v.unshift(x[2])),v.length&&(o=v.join(".")+o),this.hostname=A.join(".");break}}}}this.hostname.length>Loe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=o.indexOf("#");l!==-1&&(this.hash=o.substr(l),o=o.slice(0,l));const a=o.indexOf("?");return a!==-1&&(this.search=o.substr(a),o=o.slice(0,a)),o&&(this.pathname=o),aw[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Tm.prototype.parseHost=function(e){let t=Moe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var Y5=Foe,UL=Gse({decode:()=>P3,encode:()=>qL,format:()=>Q5,parse:()=>Y5}),Boe=Object.defineProperty,KL=e=>{let t={};for(var n in e)Boe(t,n,{get:e[n],enumerable:!0});return t},Es=class{type;tag;attrs;map;nesting;level;children;content;markup;info;meta;block;hidden;constructor(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,i=t.length;n<i;n++)if(t[n][0]===e)return n;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){const n=this.attrIndex(e),i=[e,t];n<0?this.attrPush(i):this.attrs[n]=i}attrGet(e){const t=this.attrIndex(e);let n=null;return t>=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},$oe=KL({arrayReplaceAt:()=>Hoe,assign:()=>Poe,countLines:()=>es,escapeHtml:()=>Yoe,escapeRE:()=>Xoe,fromCodePoint:()=>J1,has:()=>Ooe,isMdAsciiPunct:()=>Fm,isPunctChar:()=>Nm,isPunctCode:()=>j3,isSpace:()=>joe,isString:()=>Roe,isValidEntityCode:()=>gv,isWhiteSpace:()=>Y1,lib:()=>ere,mdurl:()=>UL,normalizeReference:()=>pv,ucmicro:()=>Lm,unescapeAll:()=>X1,unescapeMd:()=>Koe});const Lm={Any:/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cc:/[\0-\x1F\x7F-\x9F]/,Cf:/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,P:/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,S:/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Z:/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/};function Doe(e){return Object.prototype.toString.call(e)}function Roe(e){return Doe(e)==="[object String]"}const zoe=Object.prototype.hasOwnProperty;function Ooe(e,t){return zoe.call(e,t)}function Poe(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(i=>{e[i]=n[i]})}}),e}function joe(e){return e===9||e===32}function Y1(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Nm(e){return Lm.P.test(e)||Lm.S.test(e)}const uw=new Map;function j3(e){if(Fm(e))return!0;if(e>=0&&e<128)return!1;const t=uw.get(e);if(t!==void 0)return t;const n=Nm(String.fromCharCode(e));return uw.set(e,n),n}function Fm(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function pv(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function Hoe(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function gv(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function J1(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const VL=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,Woe=new RegExp(`${VL.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),qoe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Uoe(e,t){if(t.charCodeAt(0)===35&&qoe.test(t)){const i=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return gv(i)?J1(i):e}const n=G5(e);return n!==e?n:e}function Koe(e){return e.includes("\\")?e.replace(VL,"$1"):e}function X1(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(Woe,(t,n,i)=>n||Uoe(t,i))}const Voe=/[&<>"]/,Zoe=/[&<>"]/g,Goe={"&":"&","<":"<",">":">",'"':"""};function Qoe(e){return Goe[e]}function Yoe(e){return Voe.test(e)?e.replace(Zoe,Qoe):e}const Joe=/[.?*+^$[\]\\(){}|-]/g;function Xoe(e){return e.replace(Joe,"\\$&")}const ere={mdurl:UL,ucmicro:Lm};function es(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` -`,n+1))!==-1;)t++;return t}const tre=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,nre=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,ire=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,J5=["references","footnotes","abbreviations","abbr","abbrs"],X5=Symbol.for("markdown-it-ts.global-state"),eb=Object.prototype.hasOwnProperty;function cw(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function ll(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function pu(e){if(Array.isArray(e))return e.map(t=>pu(t));if(ll(e)){const t={};for(const n of Object.keys(e))t[n]=pu(e[n]);return t}return e}function Bm(e){return Array.isArray(e)?e.map((t,n)=>String(n)):ll(e)?Object.keys(e):[]}function H3(e,t){if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!H3(e[n],t[n]))return!1;return!0}if(ll(e)||ll(t)){if(!ll(e)||!ll(t))return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const s of n)if(!eb.call(t,s)||!H3(e[s],t[s]))return!1;return!0}return Object.is(e,t)}function ZL(e,t){if(Array.isArray(e))return e[Number(t)];if(ll(e))return e[t]}function sre(e,t){if(Array.isArray(e)&&Array.isArray(t)){e.length=t.length;for(let n=0;n<t.length;n++)e[n]=pu(t[n]);return e}if(ll(e)&&ll(t)){for(const n of Object.keys(e))eb.call(t,n)||delete e[n];for(const n of Object.keys(t))e[n]=pu(t[n]);return e}return pu(t)}function ore(e,t,n){const i=n.ownedKeys??[],s=e[t];if(ll(s)||Array.isArray(s)){const o=new Set(Bm(n.value));for(const r of i)n.existed&&o.has(r)?s[r]=pu(ZL(n.value,r)):delete s[r];!n.existed&&Bm(s).length===0&&delete e[t];return}n.existed?e[t]=pu(n.value):delete e[t]}function tb(e){const t=e[X5];return cw(t)?{reason:t,snapshot:{}}:t&&typeof t=="object"&&cw(t.reason)&&t.snapshot&&typeof t.snapshot=="object"?t:null}function rre(e,t){Object.defineProperty(e,X5,{value:t,enumerable:!1,configurable:!0,writable:!0})}function Qo(e){return!e||!e.includes("]:")&&!e.includes("*[")?null:tre.test(e)?"footnote-definition":nre.test(e)?"abbreviation-definition":ire.test(e)?"reference-definition":null}function wp(e){return tb(e)?.reason??null}function ff(e,t,n){if(wp(e)&&Ea(e),!t)return n();nb(e,t);try{const i=n();return ib(e),i}catch(i){throw Ea(e),i}}function nb(e,t){try{Ea(e);const n={};for(const i of J5)n[i]=eb.call(e,i)?{existed:!0,value:pu(e[i])}:{existed:!1};rre(e,{reason:t,snapshot:n})}catch{}}function ib(e){const t=tb(e);if(t)for(const n of J5){const i=t.snapshot[n];if(!i)continue;i.ownedKeys=[];const s=e[n];if(!ll(s)&&!Array.isArray(s))continue;const o=new Set(Bm(i.existed?i.value:void 0));i.ownedKeys=Bm(s).filter(r=>o.has(r)?!H3(s[r],ZL(i.value,r)):!0)}}function Ea(e){const t=tb(e);if(t){for(const n of J5){const i=t.snapshot[n];if(!i){delete e[n];continue}if(i.ownedKeys){ore(e,n,i);continue}i.existed?e[n]=sre(e[n],i.value):delete e[n]}delete e[X5]}}function dy(e){return{area:e,attempted:!0,matched:!1,attemptMs:0,blocks:0,headings:0,paragraphs:0,lists:0,fences:0,paragraphCacheHits:0,paragraphCacheMisses:0,paragraphCacheBypasses:0,listCacheHits:0,listCacheMisses:0,fenceCacheHits:0,fenceCacheMisses:0}}const W3=Symbol.for("markdown-it-ts.diagnostics");function xp(e,t){if(e)try{const n=e[W3];if(n&&typeof n=="object")return n;if(!t)return;const i={};return e[W3]=i,i}catch{return}}function ua(e){return xp(e,!1)}function lre(e){if(e)try{const t=e[W3];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function Lo(e){lre(e)}function Sh(e,t){const n=xp(e,!0);n&&(n.stockFast=t)}function ps(e,t){const n=xp(e,!0);n&&(n.strategy=t)}function fy(e,t){const n=xp(e,!0);n&&(n.chunk=t)}function GL(e,t){const n=xp(e,!0);n&&(n.unbounded=t)}const are=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ure=/[\0-\x1F\x7F-\x9F]/,cre=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,dre=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var fre=class{src_Any=are.source;src_Cc=ure.source;src_Z=dre.source;src_P=cre.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){const i=this.escapeRE(e),s=this.escapeRE(t),o=`(?:(?!${this.src_ZCc}|${i}|${s}).)`;let r=`${i}${o}{0,1000}${s}`;for(let l=2;l<=n;l++)r=`${i}(?:${o}|${r}){0,1000}${s}`;return r}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},hy={validate:(e,t,n)=>{const i=n.re.get_http_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},hre={"http:":hy,"https:":hy,"ftp:":hy,"//":{validate:function(e,t,n){const i=n.re.get_relative_proto_validator();i.lastIndex=t;const s=i.exec(e);return s?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:s[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){const i=n.re.get_mailto_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},pre="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",gre="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function mre(){const e=gre.split("|");return pre.split("|").forEach(t=>{const n=t.indexOf(":"),i=t.slice(0,n);for(const s of t.slice(n+1))e.push(i+s)}),e}var vre={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:mre(),urlAuth:!1,maxLength:1e4},dw=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,i){const s=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=s,this.text=s,this.url=s}},QL=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:t,...n}=e;this.__opts__={...vre,...n},this.__schemas__={...hre},this.re=t||new fre,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{const n={normalize:(i,s)=>s.normalize(i),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const i=this.re.get_fuzzy_mail_host_search(),s=this.re.get_mail_name_validator();for(i.lastIndex=0;(t=i.exec(e))!==null;){const o=e.slice(Math.max(0,t.index-65),t.index);if(s.test(o))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){const t=[],n=this.re.get_schema_search();let i,s,o,r,l,a,u=!1,c=!1,d=!1,f=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,o=this.re.get_mail_name_validator());;){const p=Math.max(f-1,0);if(s&&o&&!d&&(!l||l.index<f))for(s.lastIndex<p&&(s.lastIndex=p);;){const k=s.exec(e);if(!k){d=!0,l=void 0;break}const A=o.exec(e.slice(Math.max(0,k.index-65),k.index));if(A){if(l={schema:"mailto:",index:k.index-A[1].length,lastIndex:k.index+k[0].length},l.index>=f)break;s.lastIndex<p&&(s.lastIndex=p)}}if(i&&!c&&(!r||r.index<f))for(i.lastIndex<p&&(i.lastIndex=p);;){const k=i.exec(e);if(!k){c=!0,r=void 0;break}if(r={schema:"",index:k.index+k[1].length,lastIndex:k.index+k[0].length},r.index>=f)break;i.lastIndex<p&&(i.lastIndex=p)}let g=l;(!g||r&&(r.index<g.index||r.index===g.index&&r.lastIndex>g.lastIndex))&&(g=r);let m;if(!u)for(;;){if(!a){n.lastIndex<p&&(n.lastIndex=p);const v=n.exec(e);if(!v){u=!0;break}a={schema:v[2],index:v.index+v[1].length,lastIndex:v.index+v[0].length}}if(a.index<f){a=void 0;continue}if(g&&a.index>g.index)break;const k=a;a=void 0;const A=this.testSchemaAt(e,k.schema,k.lastIndex);if(A){m={schema:k.schema,index:k.index,lastIndex:k.lastIndex+A};break}}let y=m;if((!y||l&&(l.index<y.index||l.index===y.index&&l.lastIndex>y.lastIndex))&&(y=l),(!y||r&&(r.index<y.index||r.index===y.index&&r.lastIndex>y.lastIndex))&&(y=r),!y)break;y===l?l=void 0:y===r&&(r=void 0);const w=new dw(e,y.schema,y.index,y.lastIndex);w.schema?this.__schemas__[w.schema].normalize(w,this):this.normalize(w),t.push(w),f=y.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;const i=new dw(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[i.schema].normalize(i,this),i}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}},yre=HL({"../../node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.js":((e,t)=>{const d=/^xn--/,f=/[^\0-\x7F]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=35,y=Math.floor,w=String.fromCharCode;function k(O){throw new RangeError(g[O])}function A(O,R){const W=[];let z=O.length;for(;z--;)W[z]=R(O[z]);return W}function v(O,R){const W=O.split("@");let z="";W.length>1&&(z=W[0]+"@",O=W[1]),O=O.replace(p,".");const G=A(O.split("."),R).join(".");return z+G}function x(O){const R=[];let W=0;const z=O.length;for(;W<z;){const G=O.charCodeAt(W++);if(G>=55296&&G<=56319&&W<z){const K=O.charCodeAt(W++);(K&64512)==56320?R.push(((G&1023)<<10)+(K&1023)+65536):(R.push(G),W--)}else R.push(G)}return R}const E=O=>String.fromCodePoint(...O),S=function(O){return O>=48&&O<58?26+(O-48):O>=65&&O<91?O-65:O>=97&&O<123?O-97:36},M=function(O,R){return O+22+75*(O<26)-((R!=0)<<5)},_=function(O,R,W){let z=0;for(O=W?y(O/700):O>>1,O+=y(O/R);O>m*26>>1;z+=36)O=y(O/m);return y(z+(m+1)*O/(O+38))},N=function(O){const R=[],W=O.length;let z=0,G=128,K=72,H=O.lastIndexOf("-");H<0&&(H=0);for(let q=0;q<H;++q)O.charCodeAt(q)>=128&&k("not-basic"),R.push(O.charCodeAt(q));for(let q=H>0?H+1:0;q<W;){const X=z;for(let ue=1,ie=36;;ie+=36){q>=W&&k("invalid-input");const xe=S(O.charCodeAt(q++));xe>=36&&k("invalid-input"),xe>y((2147483647-z)/ue)&&k("overflow"),z+=xe*ue;const ce=ie<=K?1:ie>=K+26?26:ie-K;if(xe<ce)break;const pe=36-ce;ue>y(2147483647/pe)&&k("overflow"),ue*=pe}const ee=R.length+1;K=_(z-X,ee,X==0),y(z/ee)>2147483647-G&&k("overflow"),G+=y(z/ee),z%=ee,R.splice(z++,0,G)}return String.fromCodePoint(...R)},D=function(O){const R=[];O=x(O);const W=O.length;let z=128,G=0,K=72;for(const X of O)X<128&&R.push(w(X));const H=R.length;let q=H;for(H&&R.push("-");q<W;){let X=2147483647;for(const ue of O)ue>=z&&ue<X&&(X=ue);const ee=q+1;X-z>y((2147483647-G)/ee)&&k("overflow"),G+=(X-z)*ee,z=X;for(const ue of O)if(ue<z&&++G>2147483647&&k("overflow"),ue===z){let ie=G;for(let xe=36;;xe+=36){const ce=xe<=K?1:xe>=K+26?26:xe-K;if(ie<ce)break;const pe=ie-ce,Ne=36-ce;R.push(w(M(ce+pe%Ne,0))),ie=y(pe/Ne)}R.push(w(M(ie,0))),K=_(G,ee,q===H),G=0,++q}++G,++z}return R.join("")},P={version:"2.3.1",ucs2:{decode:x,encode:E},decode:N,encode:D,toASCII:function(O){return v(O,function(R){return f.test(R)?"xn--"+D(R):R})},toUnicode:function(O){return v(O,function(R){return d.test(R)?N(R.slice(4).toLowerCase()):R})}};t.exports=P})}),YL=WL(yre());function sb(e,t,n){let i,s=t;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(s)===60){for(s++;s<n;){if(i=e.charCodeAt(s),i===10||i===60)return o;if(i===62)return o.pos=s+1,o.str=X1(e.slice(t+1,s)),o.ok=!0,o;if(i===92&&s+1<n){s+=2;continue}s++}return o}let r=0;for(;s<n&&(i=e.charCodeAt(s),!(i===32||i<32||i===127));){if(i===92&&s+1<n){if(e.charCodeAt(s+1)===32)break;s+=2;continue}if(i===40&&(r++,r>32))return o;if(i===41){if(r===0)break;r--}s++}return t===s||r!==0||(o.str=X1(e.slice(t,s)),o.pos=s,o.ok=!0),o}var JL=sb;const Mg=-2;function bre(e,t,n,i){let s=1,o=t+1;for(;o<n;){const r=e.charCodeAt(o);if(r===93){if(s--,s===0)return o;if(i){const l=o+1<n?e.charCodeAt(o+1):0;if(l===40||l===91)return Mg}o++;continue}if(r===92){o+=2;continue}if(r===96||r===60||r===33&&o+1<n&&e.charCodeAt(o+1)===91)return Mg;if(r===91){s++,o++;continue}o++}return-1}function ob(e,t,n){let i=1,s=!1,o,r;const l=e.src,a=e.posMax,u=e.pos,c=e.linkLabelNoCloseFrom;if(c>=0&&t+1>=c)return-1;const d=l.indexOf("]",t+1);if(d<0||d>=a)return e.linkLabelNoCloseFrom=t+1,-1;const f=bre(l,t,a,n);if(f!==Mg)return f;for(e.pos=t+1;e.pos<a;){if(o=l.charCodeAt(e.pos),o===93&&(i--,i===0)){s=!0;break}if(r=e.pos,e.md.inline.skipToken(e),o===91){if(r===e.pos-1)i++;else if(n)return e.pos=u,-1}}let p=-1;return s&&(p=e.pos),e.pos=u,p}var $m=ob;function rb(e,t,n,i){let s,o=t;const r={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)r.str=i.str,r.marker=i.marker;else{if(o>=n)return r;let l=e.charCodeAt(o);if(l!==34&&l!==39&&l!==40)return r;t++,o++,l===40&&(l=41),r.marker=l}for(;o<n;){if(s=e.charCodeAt(o),s===r.marker)return r.pos=o+1,r.str+=X1(e.slice(t,o)),r.ok=!0,r;if(s===40&&r.marker===41)return r;s===92&&o+1<n&&o++,o++}return r.can_continue=!0,r.str+=X1(e.slice(t,o)),r}var XL=rb;function mv(e,t){if(!e.attrs)return-1;for(let n=0;n<e.attrs.length;n++)if(e.attrs[n][0]===t)return n;return-1}function lb(e,t){e.attrs||(e.attrs=[]),e.attrs.push(t)}function kre(e,t,n){const i=mv(e,t),s=[t,n];i<0?lb(e,s):e.attrs[i]=s}function Are(e,t){const n=mv(e,t);return n>=0?e.attrs[n][1]:null}function Cre(e,t,n){const i=mv(e,t);i<0?lb(e,[t,n]):e.attrs[i][1]=`${e.attrs[i][1]} ${n}`}var wre=KL({attrGet:()=>Are,attrIndex:()=>mv,attrJoin:()=>Cre,attrPush:()=>lb,attrSet:()=>kre,parseLinkDestination:()=>sb,parseLinkLabel:()=>ob,parseLinkTitle:()=>rb});function xre(e){return e.includes("\r")||e.includes("\0")}function eN(e){return typeof e=="string"?e:e.toString()}function _re(e){if(e.inlineMode){const t=new Es("inline","",0);t.content=eN(e.src),t.map=[0,1],t.children=[],t.level=0,e.tokens.push(t)}else e.md&&e.md.block&&e.md.block.parse(e.src,e.md,e.env,e.tokens)}const Sre=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Mre=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Ire(e,t){let n=e.pos;const i=e.src;if(i.charCodeAt(n)!==60)return!1;const s=n,o=e.posMax;for(;;){if(++n>=o)return!1;const l=i.charCodeAt(n);if(l===60)return!1;if(l===62)break}const r=i.slice(s+1,n);if(Mre.test(r)){const l=e.md.normalizeLink(r);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(r);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=r.length+2,!0}if(Sre.test(r)){const l=e.md.normalizeLink(`mailto:${r}`);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(r);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=r.length+2,!0}return!1}var tN=Ire;function Ere(e,t){const n=e.src;let i=e.pos;if(n.charCodeAt(i)!==96)return!1;const s=i;i++;const o=e.posMax;for(;i<o&&n.charCodeAt(i)===96;)i++;const r=n.slice(s,i),l=r.length;if(e.backticksScanned&&(e.backticks[l]||0)<=s)return t||(e.pending+=r),e.pos+=l,!0;let a=i,u;for(;(u=n.indexOf("`",a))!==-1;){for(a=u+1;a<o&&n.charCodeAt(a)===96;)a++;const c=a-u;if(c===l){if(!t){const d=e.push("code_inline","code",0);d.markup=r;let f=n.slice(i,u);f.includes(` -`)&&(f=f.replace(/\n/g," ")),f.length>2&&f.charCodeAt(0)===32&&f.charCodeAt(f.length-1)===32&&(f=f.slice(1,-1)),d.content=f}return e.pos=a,!0}e.backticks[c]=u}return e.backticksScanned=!0,t||(e.pending+=r),e.pos+=l,!0}var nN=Ere;function fw(e){const t={},n=e.length;if(!n)return;let i=0,s=-2;const o=[];for(let r=0;r<n;r++){const l=e[r];if(o.push(0),(e[i].marker!==l.marker||s!==l.token-1)&&(i=r),s=l.token,l.length=l.length||0,!l.close)continue;Object.prototype.hasOwnProperty.call(t,l.marker)||(t[l.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[l.marker][(l.open?3:0)+l.length%3];let u=i-o[i]-1,c=u;for(;u>a;u-=o[u]+1){const d=e[u];if(d.marker===l.marker&&d.open&&d.end<0){let f=!1;if((d.close||l.open)&&(d.length+l.length)%3===0&&(d.length%3!==0||l.length%3!==0)&&(f=!0),!f){const p=u>0&&!e[u-1].open?o[u-1]+1:0;o[r]=r-u+p,o[u]=p,l.open=!1,d.end=r,d.close=!1,c=-1,s=-2;break}}}c!==-1&&(t[l.marker][(l.open?3:0)+(l.length||0)%3]=c)}}function Tre(e){const t=e.tokens_meta,n=e.tokens_meta.length;fw(e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&fw(t[i].delimiters)}var Lre=Tre;const iN="*",sN="_";function Nre(e,t){if(t)return!1;const n=e.src.charCodeAt(e.pos);if(n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);if(!i||i.length===0)return!1;const s=n===42?iN:sN,o=i.length,r=i.can_open,l=i.can_close,a=e.tokens,u=e.delimiters;for(let c=0;c<o;c++){const d=e.push("text","",0);d.content=s,u.push({marker:n,length:o,token:a.length-1,end:-1,open:r,close:l})}return e.pos+=o,!0}function hw(e,t){const n=t.length,i=e.tokens;for(let s=n-1;s>=0;s--){const o=t[s],r=o.marker;if(r!==95&&r!==42||o.end===-1)continue;const l=t[o.end],a=o.token,u=l.token,c=s>0&&t[s-1].end===o.end+1&&t[s-1].marker===r&&t[s-1].token===a-1&&t[o.end+1].token===u+1,d=r===42?iN:sN,f=i[a];c?(f.type="strong_open",f.tag="strong",f.nesting=1,f.markup=d+d,f.content=""):(f.type="em_open",f.tag="em",f.nesting=1,f.markup=d,f.content="");const p=i[u];c?(p.type="strong_close",p.tag="strong",p.nesting=-1,p.markup=d+d,p.content=""):(p.type="em_close",p.tag="em",p.nesting=-1,p.markup=d,p.content=""),c&&(i[t[s-1].token].content="",i[t[o.end+1].token].content="",s--)}}function Fre(e){const t=e.tokens_meta,n=e.tokens_meta.length;hw(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&hw(e,t[i].delimiters)}const q3={tokenize:Nre,postProcess:Fre};function oN(e){return G5(e)}function ab(e){return e>=48&&e<=57}function Bre(e){const t=e|32;return ab(e)||t>=97&&t<=102}function rN(e){const t=e|32;return t>=97&&t<=122}function $re(e){return rN(e)||ab(e)}function Dre(e,t,n){let i=t+2;if(i>=n)return null;let s=!1,o=7,r=i;for((e.charCodeAt(i)|32)===120&&(s=!0,o=6,i++,r=i);i<n&&i-r<o;){const l=e.charCodeAt(i);if(!(s?Bre(l):ab(l)))break;i++}return i===r||i>=n||e.charCodeAt(i)!==59?null:e.slice(t,i+1)}function Rre(e,t,n){let i=t+1;if(i>=n||!rN(e.charCodeAt(i)))return null;for(i++;i<n&&i-t-1<32&&$re(e.charCodeAt(i));)i++;if(i-t-1<2||i>=n||e.charCodeAt(i)!==59)return null;const s=e.slice(t,i+1);return oN(s)!==s?s:null}function zre(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const s=Dre(e.src,n,i);if(s){if(!t){const o=(s.charCodeAt(2)|32)===120?Number.parseInt(s.slice(3,-1),16):Number.parseInt(s.slice(2,-1),10),r=e.push("text_special","",0);r.content=gv(o)?J1(o):J1(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=Rre(e.src,n,i);if(s){const o=oN(s);if(!t){const r=e.push("text_special","",0);r.content=o,r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}return!1}var lN=zre;const aN=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),U3=new Array(128),uN=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);U3[e]=`\\${t}`,uN[e]=aN[e]?t:U3[e]}function pw(e,t,n){e.pending&&e.pushPending();const i=new Es("text_special","",0);i.level=e.level,i.content=t,i.markup=n,i.info="escape",e.pendingLevel=e.level,e.tokens.push(i),e.tokens_meta.push(null)}function Ore(e,t){let n=e.pos;const i=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=i))return!1;let o=s.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(o=s.charCodeAt(n),!(o!==9&&o!==32));)n++;return e.pos=n,!0}if(o<128)return t?(e.pos=n+1,!0):(pw(e,uN[o],U3[o]),e.pos=n+1,!0);if(t){if(o>=55296&&o<=56319&&n+1<i){const a=s.charCodeAt(n+1);a>=56320&&a<=57343&&n++}return e.pos=n+1,!0}let r=s.charAt(n);if(o>=55296&&o<=56319&&n+1<i){const a=s.charCodeAt(n+1);a>=56320&&a<=57343&&(r+=s.charAt(n+1),n++)}const l=`\\${r}`;return pw(e,o<256&&aN[o]?r:l,l),e.pos=n+1,!0}var cN=Ore;function Pre(e){let t,n,i=0;const s=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++){const r=s[t];r&&(r.nesting&&r.nesting<0&&i--,r.level=i,r.nesting&&r.nesting>0&&i++,r.type==="text"&&t+1<o&&s[t+1]?.type==="text"?s[t+1].content=r.content+s[t+1].content:(t!==n&&(s[n]=r),n++))}t!==n&&(s.length=n)}var jre=Pre;const dN=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,fN="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Hre=new RegExp(`^(?:${dN}|${fN}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<\\?[\\s\\S]*?\\?>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),Wre=new RegExp(`^(?:${dN}|${fN})`);function hN(e){return e===32||e===9||e===10||e===12||e===13}function qre(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||hN(t)}function Ure(e){if(e.length<4||e.charCodeAt(0)!==60||e.charCodeAt(1)!==47||(e.charCodeAt(2)|32)!==97)return!1;for(let t=3;t<e.length;t++){const n=e.charCodeAt(t);if(n===62)return!0;if(!hN(n))return!1}return!1}function Kre(e){const t=e|32;return t>=97&&t<=122}function Vre(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos,s=e.src;if(s.charCodeAt(i)!==60||i+2>=n)return!1;const o=s.charCodeAt(i+1);if(o!==33&&o!==63&&o!==47&&!Kre(o))return!1;const r=s.slice(i).match(Hre);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,qre(l)&&e.linkLevel++,Ure(l)&&e.linkLevel--}return e.pos+=l.length,!0}var pN=Vre;function Zre(e,t){let n,i,s,o,r,l,a,u,c="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,g=$m(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o<f&&e.src.charCodeAt(o)===40){for(o++;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);if(o>=f)return!1;if(l=JL(e.src,o,e.posMax),l.ok){for(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?o=l.pos:c="",u=o;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);if(l=XL(e.src,o,e.posMax),o<f&&u!==o&&l.ok)for(a=l.str,o=l.pos;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);else a=""}if(o>=f||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<f&&e.src.charCodeAt(o)===91?(u=o+1,o=$m(e,o),o>=0?s=e.src.slice(u,o++):o=g+1):o=g+1,s||(s=e.src.slice(p,g)),r=e.env.references[pv(s)],!r)return e.pos=d,!1;c=r.href,a=r.title}if(!t){i=e.src.slice(p,g);const m=[];e.md.inline.parse(i,e.md,e.env,m);const y=e.push("image","img",0);y.attrs=[["src",c],["alt",""]],y.children=m,y.content=i,a&&y.attrs.push(["title",a])}return e.pos=o,e.posMax=f,!0}var gN=Zre;function py(e,t,n){for(;t<n;){const i=e.charCodeAt(t);if(i!==32&&i!==10)break;t++}return t}function Gre(e,t){if(e.src.charCodeAt(e.pos)!==91)return!1;const n=e.src,i=e.pos,s=e.posMax,o=e.pos+1,r=$m(e,e.pos,!0);if(r<0)return!1;let l=r+1,a="",u="",c=!0;if(l<s&&n.charCodeAt(l)===40){l=py(n,l+1,s);const d=JL(n,l,s);if(d.ok){const f=e.md.normalizeLink(d.str);e.md.validateLink(f)&&(a=f,l=d.pos,c=!1)}else l<s&&n.charCodeAt(l)===41&&(a="",c=!1);if(!c){if(l=py(n,l,s),l<s&&n.charCodeAt(l)!==41){const f=XL(n,l,s);f.ok&&(u=f.str,l=py(n,f.pos,s))}l<s&&n.charCodeAt(l)===41?l++:c=!0}}if(c){if(typeof e.env.references>"u")return!1;let d;if(l=r+1,l<s&&n.charCodeAt(l)===91){const p=l+1,g=$m(e,l);g>=0?(d=n.slice(p,g),d||(d=n.slice(o,r)),l=g+1):d=n.slice(o,r)}else d=n.slice(o,r);const f=e.env.references[pv(d)];if(!f)return e.pos=i,!1;a=f.href,u=f.title}if(!t){e.pos=o,e.posMax=r;const d=e.push("link_open","a",1);d.attrs=u?[["href",a],["title",u]]:[["href",a]],e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=l,e.posMax=s,!0}var mN=Gre;function vN(e){const t=e|32;return t>=97&&t<=122}function Qre(e){return e>=48&&e<=57}function Yre(e){return vN(e)||Qre(e)||e===43||e===45||e===46}function Jre(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&Yre(e.charCodeAt(t));)t--;return t++,t>=e.length||!vN(e.charCodeAt(t))?null:e.slice(t)}function Xre(e,t,n){let i=t;for(;i<n;){const s=e.charCodeAt(i);if(s<=32||s===127||s===60)break;i++}return e.slice(t,i)}function yN(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=Jre(e.pending);if(!s)return!1;const o=Xre(e.src,n-s.length,i),r=e.md.linkify.matchAtStart(o);if(!r)return!1;let l=r.url;if(l.length<=s.length)return!1;let a=l.length;for(;a>0&&l.charCodeAt(a-1)===42;)a--;a!==l.length&&(l=l.slice(0,a));const u=e.md.normalizeLink(l);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const c=e.push("link_open","a",1);c.attrs=[["href",u]],c.markup="linkify",c.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(l);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=l.length-s.length,!0}function ele(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,s=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.pushSimple("hardbreak","br")}else e.pending=e.pending.slice(0,-1),e.pushSimple("softbreak","br");else e.pushSimple("softbreak","br");for(n++;n<s;){const o=e.src.charCodeAt(n);if(o!==9&&o!==32)break;n++}return e.pos=n,!0}var bN=ele;function tle(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;const s=e.scanDelims(e.pos,!0);if(!s)return!1;let o=s.length;const r=String.fromCharCode(i);if(o<2)return!1;let l;o%2&&(l=e.push("text","",0),l.content=r,o--);for(let a=0;a<o;a+=2)l=e.push("text","",0),l.content=r+r,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function gw(e,t){let n;const i=[],s=t.length;for(let o=0;o<s;o++){const r=t[o];if(r.marker!==126||r.end===-1)continue;const l=t[r.end];n=e.tokens[r.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[l.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[l.token-1].type==="text"&&e.tokens[l.token-1].content==="~"&&i.push(l.token-1)}for(;i.length;){const o=i.pop();let r=o+1;for(;r<e.tokens.length&&e.tokens[r].type==="s_close";)r++;r--,o!==r&&(n=e.tokens[r],e.tokens[r]=e.tokens[o],e.tokens[o]=n)}}function nle(e){const t=e.delimiters;gw(e,t);const n=e.tokens_meta;if(n)for(let i=0;i<n.length;i++)n[i]&&n[i].delimiters&&gw(e,n[i].delimiters)}const K3={tokenize:tle,postProcess:nle};function mw(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function ile(e,t){const n=e.src,i=e.pos,s=e.posMax;if(i>=s||mw(n.charCodeAt(i)))return!1;let o=i+1;for(;o<s&&!mw(n.charCodeAt(o));)o++;return t||(e.pending+=o===i+1?n.charAt(i):n.slice(i,o)),e.pos=o,!0}var kN=ile;function ub(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function sle(e){if(e.length===0)return 0;const t=e.slice().sort((i,s)=>i-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function ole(e,t){return{chain:e,name:t,calls:0,hits:0,inclusiveMs:0,medianMs:0,maxMs:0,normalCalls:0,normalHits:0,silentCalls:0,silentHits:0,samples:[]}}function AN(e){const t=e;if(!t)return null;if(t.__mdtsRuleProfile)return t.__mdtsRuleProfile;if(!t.__mdtsProfileRules)return null;const n=t.__mdtsProfileRules===!0?{}:t.__mdtsProfileRules,i={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:ub(),records:Object.create(null)};return t.__mdtsRuleProfile=i,i}function hf(e,t,n,i,s,o){const r=AN(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=ole(t,n));a.calls++,a.inclusiveMs+=i,i>a.maxMs&&(a.maxMs=i),a.samples.push(i),o?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,r.completedAt=ub()}function rle(e){const t=AN(e);if(!t)return null;const n=Object.keys(t.records);for(let i=0;i<n.length;i++){const s=t.records[n[i]];s.medianMs=sle(s.samples)}return t.completedAt=ub(),t}var vw=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t,n){const i=this.rules.findIndex(s=>s.name===e);i>=0&&this.rules.splice(i,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const i=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(i<0)return;const s=this.rules[i];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(i<0)throw new Error(`Parser rule not found: ${e}`);this.rules[i].fn=t,n?.alt!==void 0&&(this.rules[i].alt=n.alt),this.invalidateCache()}before(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.enabled=s,n=!0)}n&&this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache.get(t)??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache.get(t)??[]}compileCache(){const e=new Set([""]);for(const i of this.rules)if(i.enabled&&i.alt)for(const s of i.alt)e.add(s);const t=new Map,n=new Map;for(const i of e){const s=[],o=[];for(const r of this.rules)r.enabled&&(i!==""&&!r.alt?.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t.set(i,s),n.set(i,o)}this.cache=t,this.namedCache=n}},CN=class{src;md;env;tokens;tokens_meta;pos;posMax;level;pending;pendingLevel;cache;delimiters;_prev_delimiters;backticks;backticksScanned;linkLevel;linkLabelNoCloseFrom;maxNesting;constructor(e,t,n,i){this.src=e,this.md=t,this.env=n,this.tokens=i,this.tokens_meta=new Array(i.length),this.pos=0,this.posMax=e.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0,this.linkLabelNoCloseFrom=-1,this.maxNesting=t.options.maxNesting}pushPending(){const e=new Es("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}pushSimple(e,t){this.pending&&this.pushPending();const n=new Es(e,t,0);return n.level=this.level,this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(null),n}push(e,t,n){if(this.pending&&this.pushPending(),n===0)return this.pushSimple(e,t);const i=new Es(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(s),i}scanDelims(e,t){const{src:n,posMax:i}=this,s=n.charCodeAt(e);let o=e;for(;o<i&&n.charCodeAt(o)===s;)o++;const r=o-e,l=e>0?n.charCodeAt(e-1):32,a=o<i?n.charCodeAt(o):32,u=Y1(l),c=Y1(a),d=j3(l),f=j3(a),p=!c&&(!f||u||d),g=!u&&(!d||c||f);return{can_open:p&&(t||!g||d),can_close:g&&(t||!p||f),length:r}}};CN.prototype.Token=Es;const lle=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/;function yw(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return bN(e,t);case 33:return gN(e,t);case 38:return lN(e,t);case 42:case 95:return q3.tokenize(e,t);case 58:return e.md.options.linkify&&yN(e,t);case 60:return tN(e,t)||pN(e,t);case 91:return mN(e,t);case 92:return cN(e,t);case 96:return nN(e,t);case 126:return K3.tokenize(e,t);default:return kN(e,t)}}function wN(e){return!lle.test(e)}var ale=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new vw,this.ruler2=new vw,this.ruler.push("text",kN),this.ruler.push("linkify",yN),this.ruler.push("newline",bN),this.ruler.push("escape",cN),this.ruler.push("backticks",nN),this.ruler.push("strikethrough",K3.tokenize),this.ruler.push("emphasis",q3.tokenize),this.ruler.push("link",mN),this.ruler.push("image",gN),this.ruler.push("autolink",tN),this.ruler.push("html_inline",pN),this.ruler.push("entity",lN),this.ruler2.push("balance_pairs",Lre),this.ruler2.push("strikethrough",K3.postProcess),this.ruler2.push("emphasis",q3.postProcess),this.ruler2.push("fragments_join",jre),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),i=n.length,s=e.cache,o=s[t],r=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(o!==void 0){e.pos=o;return}let l=!1;if(e.level<e.maxNesting){if(r){const a=this.ruler.getNamedRules("");for(let u=0;u<i;u++){e.level++;const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();l=a[u].fn(e,!0);const d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(hf(e.env,"inline",a[u].name,d-c,!!l,!0),e.level--,l){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}}else if(this.isDefaultRuleset()){if(e.level++,l=yw(e,!0),e.level--,l&&t>=e.pos)throw new Error("inline rule didn't increment state.pos")}else for(let a=0;a<i;a++)if(e.level++,l=n[a](e,!0),e.level--,l){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;l||e.pos++,s[t]=e.pos}tokenize(e){const t=this.getRules(),n=t.length,i=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const o=this.isDefaultRuleset();for(;e.pos<i;){const r=e.pos;let l=!1;if(e.level<e.maxNesting){if(o)l=yw(e,!1);else for(let a=0;a<n&&(l=t[a](e,!1),!l);a++);if(l&&r>=e.pos)throw new Error("inline rule didn't increment state.pos")}if(l){if(e.pos>=i)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending();return}const s=this.ruler.getNamedRules("");for(;e.pos<i;){const o=e.pos;let r=!1;if(e.level<e.maxNesting)for(let l=0;l<n;l++){const a=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();r=s[l].fn(e,!1);const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(hf(e.env,"inline",s[l].name,u-a,!!r,!1),r){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(r){if(e.pos>=i)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending()}isDefaultRuleset(){return this.ruler.version===this.defaultRulerVersion&&this.ruler2.version===this.defaultRuler2Version}parseSource(e,t,n,i){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&wN(e)){const a=new Es("text","",0);a.content=e,i.push(a);return}const s=new CN(e,t,n,i);this.tokenize(s);const o=this.getRules2(),r=o.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a<r;a++)o[a](s,!1);return}const l=this.ruler2.getNamedRules("");for(let a=0;a<r;a++){const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();l[a].fn(s,!1);const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();hf(s.env,"inline2",l[a].name,c-u,!0,!1)}}parse(e,t,n,i){this.parseSource(e,t,n,i)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}getRules2(){return this.cachedRules2Version!==this.ruler2.version&&(this.cachedRules2=this.ruler2.getRules(""),this.cachedRules2Version=this.ruler2.version),this.cachedRules2}};function ule(e){const t=e.tokens,n=!!e.md?.inline?.isDefaultRuleset?.();for(let i=0,s=t.length;i<s;i++){const o=t[i];if(o.type==="inline"&&e.md){if(o.children||(o.children=[]),n&&o.content.length>0&&wN(o.content)){const r=new Es("text","",0);r.content=o.content,o.children.push(r);continue}e.md.inline.parse(o.content,e.md,e.env,o.children)}}}const cle=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,dle=/[0-9a-z]/i;function fle(e){return/^<a[>\s]/i.test(e)}function hle(e){return/^<\/a\s*>/i.test(e)}function ple(e,t){if(t.schema||t.index!==0||!t.raw)return t;for(let n=1;n<t.raw.length;n++){const i=t.raw[n-1],s=t.raw[n];if(!cle.test(i)||!dle.test(s))continue;const o=t.raw.slice(n),r=e.match(o)?.[0];if(!(!r||r.index!==0||r.lastIndex!==o.length))return{...r,index:t.index+n,lastIndex:t.index+n+r.lastIndex}}return t}function gle(e){const t=e.tokens;if(e.md?.options?.linkify)for(let n=0;n<t.length;n++){const i=t[n];if(i.type!=="inline"||!e.md.linkify.test(i.content))continue;let s=i.children;s||(s=[],i.children=s);let o=0;for(let r=s.length-1;r>=0;r--){const l=s[r];if(l.type==="link_close"){for(r--;r>=0&&s[r].level!==l.level&&s[r].type!=="link_open";)r--;continue}if(l.type==="html_inline"&&(fle(l.content)&&o>0&&o--,hle(l.content)&&o++),o>0||l.type!=="text"||!e.md.linkify.test(l.content))continue;const a=l.content;let u=(e.md.linkify.match(a)||[]).map(p=>ple(e.md.linkify,p));if(u.length===0)continue;const c=[];let d=l.level,f=0;u.length>0&&u[0].index===0&&r>0&&s[r-1].type==="text_special"&&(u=u.slice(1));for(let p=0;p<u.length;p++){const g=u[p],m=e.md.normalizeLink(g.url);if(!e.md.validateLink(m))continue;let y=g.text;g.schema?g.schema==="mailto:"&&!/^mailto:/i.test(y)?y=e.md.normalizeLinkText(`mailto:${y}`).replace(/^mailto:/,""):y=e.md.normalizeLinkText(y):y=e.md.normalizeLinkText(`http://${y}`).replace(/^http:\/\//,"");const w=g.index;if(w>f){const x=new Es("text","",0);x.content=a.slice(f,w),x.level=d,c.push(x)}const k=new Es("link_open","a",1);k.attrs=[["href",m]],k.level=d++,k.markup="linkify",k.info="auto",c.push(k);const A=new Es("text","",0);A.content=y,A.level=d,c.push(A);const v=new Es("link_close","a",-1);v.level=--d,v.markup="linkify",v.info="auto",c.push(v),f=g.lastIndex}if(f!==0){if(f<a.length){const p=new Es("text","",0);p.content=a.slice(f),p.level=d,c.push(p)}s.splice(r,1,...c)}}}}const mle=/\r\n?|\n/g,vle=/\0/g;function yle(e){if(!e||typeof e.src!="string")return;const t=e.src,n=t.includes("\r"),i=t.includes("\0");if(!n&&!i)return;let s=t;n&&(s=s.replace(mle,` -`)),i&&(s=s.replace(vle,"�")),e.src=s}const xN=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ble=/\((?:c|tm|r)\)/i,kle=/\((c|tm|r)\)/gi,Ale={c:"©",r:"®",tm:"™"};function Cle(e,t){return Ale[t.toLowerCase()]}function wle(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(kle,Cle)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function xle(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&xN.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function _le(e){if(e.md?.options?.typographer)for(let t=e.tokens.length-1;t>=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const i=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");ble.test(i)&&wle(n.children||[]),xN.test(i)&&xle(n.children||[])}}var Sle=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t){const n=this.rules.findIndex(i=>i.name===e);n>=0&&this.rules.splice(n,1),this.rules.push({name:e,fn:t,enabled:!0}),this.invalidateCache()}at(e,t){const n=this.rules.findIndex(i=>i.name===e);if(n<0)throw new Error(`Parser rule not found: ${e}`);this.rules[n].fn=t,this.invalidateCache()}before(e,t,n){const i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){this.cache=this.rules.filter(e=>e.enabled).map(e=>e.fn),this.namedCache=this.rules.filter(e=>e.enabled).map(e=>({name:e.name,fn:e.fn}))}getRules(e=""){return this.cache||this.compileCache(),this.cache}getNamedRules(e=""){return this.namedCache||this.compileCache(),this.namedCache}};const Mle=/['"]/,bw=/['"]/g,kw="’";function j0(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Ile(e,t){let n;const i=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let o=0;o<e.length;o++){const r=e[o],l=e[o].level;for(n=i.length-1;n>=0&&!(i[n].level<=l);n--);if(i.length=n+1,r.type!=="text")continue;let a=r.content,u=0,c=a.length;e:for(;u<c;){bw.lastIndex=u;const d=bw.exec(a);if(!d)break;let f=!0,p=!0;u=d.index+1;const g=d[0]==="'";let m=32;if(d.index-1>=0)m=a.charCodeAt(d.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let y=32;if(u<c)y=a.charCodeAt(u);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){y=e[n].content.charCodeAt(0);break}const w=Fm(m)||Nm(String.fromCharCode(m)),k=Fm(y)||Nm(String.fromCharCode(y)),A=Y1(m),v=Y1(y);if(v?f=!1:k&&(A||w||(f=!1)),A?p=!1:w&&(v||k||(p=!1)),y===34&&d[0]==='"'&&m>=48&&m<=57&&(p=f=!1),f&&p&&(f=w,p=k),!f&&!p){g&&(r.content=j0(r.content,d.index,kw));continue}if(p)for(n=i.length-1;n>=0;n--){let x=i[n];if(i[n].level<l)break;if(x.single===g&&i[n].level===l){x=i[n];let E,S;g?(E=s[2]||"‘",S=s[3]||"’"):(E=s[0]||"“",S=s[1]||"”"),r.content=j0(r.content,d.index,S),e[x.token].content=j0(e[x.token].content,x.pos,E),u+=S.length-1,x.token===o&&(u+=E.length-1),a=r.content,c=a.length,i.length=n;continue e}}f?i.push({token:o,pos:d.index,single:g,level:l}):p&&g&&(r.content=j0(r.content,d.index,kw))}}}function Ele(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const i=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!Mle.test(i)||!n.children||Ile(n.children,e)}}function Tle(e){const t=e.tokens||[],n=t.length;for(let i=0;i<n;i++){const s=t[i];if(s.type!=="inline"||!Array.isArray(s.children))continue;const o=s.children,r=o.length;for(let u=0;u<r;u++)o[u].type==="text_special"&&(o[u].type="text");let l=0,a=0;for(;a<r;a++)o[a].type==="text"&&a+1<r&&o[a+1].type==="text"?o[a+1].content=o[a].content+o[a+1].content:(a!==l&&(o[l]=o[a]),l++);a!==l&&(o.length=l)}}const Lle=/^(?:vbscript|javascript|file|data):/,Nle=/^data:image\/(?:gif|png|jpeg|webp);/,_N=["http:","https:","mailto:"];function SN(e){const t=e.trim().toLowerCase();return Lle.test(t)?Nle.test(t):!0}function MN(e){const t=Y5(e,!0);if(t.hostname&&(!t.protocol||_N.includes(t.protocol)))try{t.hostname=YL.default.toASCII(t.hostname)}catch{}return qL(Q5(t))}function IN(e){const t=Y5(e,!0);if(t.hostname&&(!t.protocol||_N.includes(t.protocol)))try{t.hostname=YL.default.toUnicode(t.hostname)}catch{}return P3(Q5(t),`${P3.defaultChars}%`)}function Fle(e){switch(e){case 9:case 32:return!0}return!1}function Ble(e,t,n,i){const s=e.src,o=e.bMarks,r=e.eMarks,l=e.tShift,a=e.sCount,u=e.bsCount;let c=o[t]+l[t],d=r[t];const f=e.lineMax;if(a[t]-e.blkIndent>=4||s.charCodeAt(c)!==62)return!1;if(i)return!0;const p=[],g=[],m=[],y=[],w=e.md.block.ruler.getRulesForState(e,"blockquote"),k=e.parentType;e.parentType="blockquote";let A=!1,v;for(v=t;v<n;v++){const _=a[v]<e.blkIndent;if(c=o[v]+l[v],d=r[v],c>=d)break;if(s.charCodeAt(c++)===62&&!_){let D=a[v]+1,T,$;s.charCodeAt(c)===32?(c++,D++,$=!1,T=!0):s.charCodeAt(c)===9?(T=!0,(u[v]+D)%4===3?(c++,D++,$=!1):$=!0):T=!1;let P=D;for(p.push(o[v]),o[v]=c;c<d;){const O=s.charCodeAt(c);if(Fle(O))O===9?P+=4-(P+u[v]+($?1:0))%4:P++;else break;c++}A=c>=d,g.push(u[v]),u[v]=a[v]+1+(T?1:0),m.push(a[v]),a[v]=P-D,y.push(l[v]),l[v]=c-o[v];continue}if(A)break;let N=!1;for(let D=0,T=w.length;D<T;D++)if(w[D](e,v,n,!0)){N=!0;break}if(N){e.lineMax=v,e.blkIndent!==0&&(p.push(o[v]),g.push(u[v]),y.push(l[v]),m.push(a[v]),a[v]-=e.blkIndent);break}p.push(o[v]),g.push(u[v]),y.push(l[v]),m.push(a[v]),a[v]=-1}const x=e.blkIndent;e.blkIndent=0;const E=e.push("blockquote_open","blockquote",1);E.markup=">";const S=[t,0];E.map=S,e.md.block.tokenize(e,t,v);const M=e.push("blockquote_close","blockquote",-1);M.markup=">",e.lineMax=f,e.parentType=k,S[1]=e.line;for(let _=0;_<y.length;_++)o[_+t]=p[_],l[_+t]=y[_],a[_+t]=m[_],u[_+t]=g[_];return e.blkIndent=x,!0}function $le(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,s=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,s=i;continue}break}e.line=s;const o=e.push("code_block","code",0);return o.content=`${e.getLines(t,s,4+e.blkIndent,!1)} -`,o.map=[t,e.line],!0}function Dle(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>o)return!1;const r=e.src.charCodeAt(s);if(r!==126&&r!==96)return!1;let l=s;s=e.skipChars(s,r);let a=s-l;if(a<3)return!1;const u=e.src.slice(l,s),c=e.src.slice(s,o);if(r===96&&c.includes(String.fromCharCode(r)))return!1;if(i)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=l=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],s<o&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(s)===r&&!(e.sCount[d]-e.blkIndent>=4)&&(s=e.skipChars(s,r),!(s-l<a)&&(s=e.skipSpaces(s),!(s<o)))){f=!0;break}a=e.sCount[t],e.line=d+(f?1:0);const p=e.push("fence","code",0);return p.info=c,p.content=e.getLines(t+1,d,a,!0),p.markup=u,p.map=[t,e.line],!0}const Aw=["","h1","h2","h3","h4","h5","h6"],Cw=["","#","##","###","####","#####","######"];function ww(e){switch(e){case 9:case 32:return!0}return!1}function Rle(e,t,n,i){const s=e.src,o=e.bMarks,r=e.tShift,l=e.eMarks;let a=o[t]+r[t],u=l[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let c=s.charCodeAt(a);if(c!==35||a>=u)return!1;let d=1;for(c=s.charCodeAt(++a);c===35&&a<u&&d<=6;)d++,c=s.charCodeAt(++a);if(d>6||a<u&&!ww(c))return!1;if(i)return!0;u=e.skipSpacesBack(u,a);const f=e.skipCharsBack(u,35,a);f>a&&ww(s.charCodeAt(f-1))&&(u=f),e.line=t+1;const p=e.push("heading_open",Aw[d],1);p.markup=Cw[d],p.map=[t,e.line];const g=e.push("inline","",0);g.content=s.slice(a,u).trim(),g.map=[t,e.line],g.children=[];const m=e.push("heading_close",Aw[d],-1);return m.markup=Cw[d],!0}function zle(e){switch(e){case 9:case 32:return!0}return!1}function Ole(e,t,n,i){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(o++);if(r!==42&&r!==45&&r!==95)return!1;let l=1;for(;o<s;){const u=e.src.charCodeAt(o++);if(u!==r&&!zle(u))return!1;u===r&&l++}if(l<3)return!1;if(i)return!0;e.line=t+1;const a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=new Array(l+1).join(String.fromCharCode(r)),!0}const Td=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${["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"].join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${Wre.source}\\s*$`),/^$/,!1]];function Ple(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;let r=e.src.slice(s,o),l=0;for(;l<Td.length&&!Td[l][0].test(r);l++);if(l===Td.length)return!1;if(i)return Td[l][2];let a=t+1;if(!Td[l][1].test(r)){for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(s=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],r=e.src.slice(s,o),Td[l][1].test(r)){r.length!==0&&a++;break}}e.line=a;const u=e.push("html_block","",0);return u.map=[t,a],u.content=e.getLines(t,a,e.blkIndent,!0),!0}function xw(e){switch(e){case 9:case 32:return!0}return!1}const f1={Pipe:1,ParagraphTerminator:2};function jle(e){switch(e){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 124:case 126:return!0}return e>=48&&e<=57}var EN=class{src;md;env;tokens;bMarks=[];eMarks=[];tShift=[];sCount=[];bsCount=[];lineFlags=[];blkIndent=0;line=0;lineMax=0;tight=!1;ddIndent=-1;listIndent=-1;parentType="root";level=0;constructor(e,t,n,i){this.src=e,this.md=t,this.env=n,this.tokens=i;const s=this.src;let o=0,r=0,l=0,a=!1,u=0;for(let c=0,d=s.length;c<d;c++){const f=s.charCodeAt(c);if(f===124&&(u|=f1.Pipe|f1.ParagraphTerminator),!a)if(xw(f)){o++,f===9?r+=4-r%4:r++;continue}else a=!0,jle(f)&&(u|=f1.ParagraphTerminator);(f===10||c===d-1)&&(f!==10&&c++,this.bMarks.push(l),this.eMarks.push(c),this.tShift.push(o),this.sCount.push(r),this.bsCount.push(0),this.lineFlags.push(u),a=!1,o=0,r=0,u=0,l=c+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineFlags.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){if(n===0){const s=new Es(e,t,0);return s.block=!0,s.level=this.level,this.tokens.push(s),s}const i=new Es(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,i=this.eMarks;for(let s=this.lineMax;e<s&&!(t[e]+n[e]<i[e]);e++);return e}skipSpaces(e){const t=this.src;for(let n=t.length;e<n;e++){const i=t.charCodeAt(e);if(i!==9&&i!==32)break}return e}skipSpacesBack(e,t){if(e<=t)return e;const n=this.src;for(;e>t;){const i=n.charCodeAt(--e);if(i!==9&&i!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let i=n.length;e<i&&n.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,n){if(e<=n)return e;const i=this.src;for(;e>n;)if(t!==i.charCodeAt(--e))return e+1;return e}getLines(e,t,n,i){if(e>=t)return"";if(e+1===t){const c=e,d=this.bMarks[c];let f=d;const p=i?this.eMarks[c]+1:this.eMarks[c];let g=0;const m=this.src,y=this.bsCount,w=this.tShift;for(;f<p&&g<n;){const k=m.charCodeAt(f);if(k===9||k===32)k===9?g+=4-(g+y[c])%4:g++;else if(f-d<w[c])g++;else break;f++}return g>n?new Array(g-n+1).join(" ")+m.slice(f,p):m.slice(f,p)}const s=new Array(t-e),o=this.src,r=this.bMarks,l=this.eMarks,a=this.bsCount,u=this.tShift;for(let c=0,d=e;d<t;d++,c++){let f=0;const p=r[d];let g=p,m;for(d+1<t||i?m=l[d]+1:m=l[d];g<m&&f<n;){const y=o.charCodeAt(g);if(xw(y))y===9?f+=4-(f+a[d])%4:f++;else if(g-p<u[d])f++;else break;g++}f>n?s[c]=new Array(f-n+1).join(" ")+o.slice(g,m):s[c]=o.slice(g,m)}return s.join("")}};EN.prototype.Token=Es;function Hle(e,t,n){for(let i=t;i<n;i++)if(e.charCodeAt(i)===124)return!0;return!1}function TN(e){const t=e?.md?.block?.ruler;return t?t.version===t.__mdtsDefaultVersion:!1}function LN(e,t,n,i,s){if(e.lineFlags&&(e.lineFlags[t]&f1.ParagraphTerminator)===0||i>=s)return!1;const o=n.charCodeAt(i);switch(o){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return o>=48&&o<=57?!0:Hle(n,i,s)}const _w=["","h1","h2"];function Wle(e,t,n){const i=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,o=e.bMarks,r=e.tShift,l=e.eMarks,a=e.sCount,u=e.blkIndent,c=TN(e);if(a[t]-u>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,p,g=t+1;for(;g<n;g++){const v=o[g]+r[g],x=l[g];if(v>=x)break;if(a[g]-u>3)continue;if(a[g]>=u&&(p=s.charCodeAt(v),p===45||p===61)){let S=v+1,M=S;for(;S<x&&s.charCodeAt(S)===p;)S++;for(M=S;S<x;){const _=s.charCodeAt(S);if(_!==9&&_!==32)break;S++}if(S>=x){f=p===61?1:2;break}if(M-v>1)continue}if(a[g]<0||c&&!LN(e,g,s,v,x))continue;let E=!1;for(let S=0,M=i.length;S<M;S++)if(i[S](e,g,n,!0)){E=!0;break}if(E)break}if(!f)return!1;let m;if(g===t+1){const v=o[t]+r[t];let x=l[t];for(;x>v;){const E=s.charCodeAt(x-1);if(E!==9&&E!==32)break;x--}m=s.slice(v,x)}else m=e.getLines(t,g,u,!1).trim();e.line=g+1;const y=p===61?"=":"-",w=e.push("heading_open",_w[f],1);w.markup=y,w.map=[t,e.line];const k=e.push("inline","",0);k.content=m,k.map=[t,e.line-1],k.children=[];const A=e.push("heading_close",_w[f],-1);return A.markup=y,e.parentType=d,!0}function NN(e){switch(e){case 9:case 32:return!0}return!1}function Sw(e,t){const n=e.eMarks,i=e.bMarks,s=e.tShift,o=e.src,r=n[t];let l=i[t]+s[t];const a=o.charCodeAt(l++);return a!==42&&a!==45&&a!==43||l<r&&!NN(o.charCodeAt(l))?-1:l}function Mw(e,t){const n=e.bMarks,i=e.tShift,s=e.eMarks,o=e.src,r=n[t]+i[t],l=s[t];let a=r;if(a+1>=l)return-1;let u=o.charCodeAt(a++);if(u<48||u>57)return-1;for(;;){if(a>=l)return-1;if(u=o.charCodeAt(a++),u>=48&&u<=57){if(a-r>=10)return-1;continue}if(u===41||u===46)break;return-1}return a<l&&(u=o.charCodeAt(a),!NN(u))?-1:a}function qle(e,t,n){const i=e.bMarks,s=e.tShift,o=e.src,r=i[t]+s[t];let l=0;for(let a=r;a<n-1;a++)l=l*10+o.charCodeAt(a)-48;return l}const Ule=["0","1","2","3","4","5","6","7","8","9"];function Kle(e,t){const n=e.level+2,i=e.tokens;for(let s=t+2,o=i.length-2;s<o;s++){const r=i[s];if(r.level===n){if(r.type==="paragraph_open"){r.hidden=!0,i[s+2].hidden=!0,s+=2;continue}if(r.nesting===1){let l=1;for(;l>0&&++s<o;)l+=i[s].nesting}}}}function Vle(e,t,n,i){let s,o,r=0,l=t,a=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let u=!1;i&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(u=!0);let c,d,f;const p=e.src,g=e.bMarks,m=e.tShift,y=e.eMarks,w=e.sCount,k=e.bsCount,A=g[l]+m[l];if(A>=y[l])return!1;const v=p.charCodeAt(A);if(v>=48&&v<=57){if(f=Mw(e,l),f<0||(c=!0,r=A,d=qle(e,l,f),u&&d!==1))return!1}else if(v===42||v===45||v===43){if(f=Sw(e,l),f<0)return!1;c=!1}else return!1;if(u&&e.skipSpaces(f)>=y[l])return!1;if(i)return!0;const x=p.charCodeAt(f-1),E=String.fromCharCode(x);if(c){const T=e.push("ordered_list_open","ol",1);d!==void 0&&d!==1&&(T.attrs=[["start",String(d)]])}else e.push("bullet_list_open","ul",1);const S=[l,0];e.tokens[e.tokens.length-1].map=S,e.tokens[e.tokens.length-1].markup=E;let M=!1;const _=e.tokens.length-1,N=e.md.block.ruler.getRulesForState(e,"list"),D=e.parentType;for(e.parentType="list";l<n;){o=f,s=y[l];const T=w[l]+f-(g[l]+m[l]);let $=T;for(;o<s;){const ee=p.charCodeAt(o);if(ee===9)$+=4-($+k[l])%4;else if(ee===32)$++;else break;o++}const P=o;let O;P>=s?O=1:O=$-T,O>4&&(O=1);const R=T+O,W=e.push("list_item_open","li",1);W.markup=E;const z=[l,0];W.map=z,c&&(W.info=f-r-1===1?Ule[p.charCodeAt(r)-48]:p.slice(r,f-1));const G=e.tight,K=e.tShift[l],H=e.sCount[l],q=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=R,e.tight=!0,e.tShift[l]=P-g[l],e.sCount[l]=$,P>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||M)&&(a=!1),M=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=q,e.tShift[l]=K,e.sCount[l]=H,e.tight=G,e.push("list_item_close","li",-1).markup=E,l=e.line,z[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let X=!1;for(let ee=0,ue=N.length;ee<ue;ee++)if(N[ee](e,l,n,!0)){X=!0;break}if(X)break;if(c){if(f=Mw(e,l),f<0)break;r=g[l]+m[l]}else if(f=Sw(e,l),f<0)break;if(x!==p.charCodeAt(f-1))break}return c?e.push("ordered_list_close","ol",-1).markup=E:e.push("bullet_list_close","ul",-1).markup=E,S[1]=l,e.line=l,e.parentType=D,a&&Kle(e,_),!0}function Iw(e){return e===9||e===32}function Zle(e,t,n){const i=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.parentType,o=e.src,r=e.bMarks,l=e.tShift,a=e.eMarks,u=e.sCount,c=e.blkIndent,d=TN(e);let f=t+1;for(e.parentType="paragraph";f<n&&!e.isEmpty(f);f++){if(u[f]-c>3||u[f]<0)continue;if(s==="list"&&u[f]>=c){const A=r[f]+l[f],v=a[f];if(A<v){const x=o.charCodeAt(A);if(x===42||x===45||x===43){if(A+1>=v||Iw(o.charCodeAt(A+1)))break}else if(x>=48&&x<=57&&A+1<v){let E=A+1;for(;;){if(E>=v){E=-1;break}const S=o.charCodeAt(E++);if(S>=48&&S<=57){if(E-A>=10){E=-1;break}continue}if((S===41||S===46)&&(E>=v||Iw(o.charCodeAt(E))))break;E=-1;break}if(E>=0)break}}}const y=r[f]+l[f],w=a[f];if(d&&!LN(e,f,o,y,w))continue;let k=!1;for(let A=0,v=i.length;A<v;A++)if(i[A](e,f,n,!0)){k=!0;break}if(k)break}const p=e.getLines(t,f,c,!1).trim();e.line=f;const g=e.push("paragraph_open","p",1);g.map=[t,e.line];const m=e.push("inline","",0);return m.content=p,m.map=[t,e.line],m.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}function H0(e){switch(e){case 9:case 32:return!0}return!1}function Gle(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],r=t+1;const l=e.md.block.ruler.getRulesForState(e,"reference");if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==91)return!1;function a(A){const v=e.lineMax;if(A>=v||e.isEmpty(A))return null;let x=!1;if(e.sCount[A]-e.blkIndent>3&&(x=!0),e.sCount[A]<0&&(x=!0),!x){const M=e.parentType;e.parentType="reference";let _=!1;for(let N=0,D=l.length;N<D;N++)if(l[N](e,A,v,!0)){_=!0;break}if(e.parentType=M,_)return null}const E=e.bMarks[A]+e.tShift[A],S=e.eMarks[A];return e.src.slice(E,S+1)}let u=e.src.slice(s,o+1);o=u.length;let c=-1;for(s=1;s<o;s++){const A=u.charCodeAt(s);if(A===91)return!1;if(A===93){c=s;break}else if(A===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(A===92&&(s++,s<o&&u.charCodeAt(s)===10)){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(s=c+2;s<o;s++){const A=u.charCodeAt(s);if(A===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(!H0(A))break}const d=e.md.helpers.parseLinkDestination(u,s,o);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;s=d.pos;const p=s,g=r,m=s;for(;s<o;s++){const A=u.charCodeAt(s);if(A===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(!H0(A))break}let y=e.md.helpers.parseLinkTitle(u,s,o);for(;y.can_continue;){const A=a(r);if(A===null)break;u+=A,s=o,o=u.length,r++,y=e.md.helpers.parseLinkTitle(u,s,o,y)}let w;for(s<o&&m!==s&&y.ok?(w=y.str,s=y.pos):(w="",s=p,r=g);s<o&&H0(u.charCodeAt(s));)s++;if(s<o&&u.charCodeAt(s)!==10&&w)for(w="",s=p,r=g;s<o&&H0(u.charCodeAt(s));)s++;if(s<o&&u.charCodeAt(s)!==10)return!1;const k=pv(u.slice(1,c));return k?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[k]>"u"&&(e.env.references[k]={title:w,href:f}),e.line=r),!0):!1}function gy(e){switch(e){case 9:case 32:return!0}return!1}const Qle=65536;function my(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function Yle(e,t){if(e.lineFlags)return(e.lineFlags[t]&f1.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];n<i;n++)if(e.src.charCodeAt(n)===124)return!0;return!1}function Ew(e){const t=[],n=e.length;let i=0,s=e.charCodeAt(i),o=!1,r=0,l="";for(;i<n;)s===124&&(o?(l+=e.substring(r,i-1),r=i):(t.push(l+e.substring(r,i)),l="",r=i+1)),o=s===92,i++,s=e.charCodeAt(i);return t.push(l+e.substring(r)),t}function Jle(e,t,n,i){if(t+2>n)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent||e.sCount[s]-e.blkIndent>=4)return!1;let o=e.bMarks[s]+e.tShift[s];if(o>=e.eMarks[s])return!1;const r=e.src.charCodeAt(o++);if(r!==124&&r!==45&&r!==58||o>=e.eMarks[s])return!1;const l=e.src.charCodeAt(o++);if(l!==124&&l!==45&&l!==58&&!gy(l)||r===45&&gy(l)||!Yle(e,t))return!1;for(;o<e.eMarks[s];){const v=e.src.charCodeAt(o);if(v!==124&&v!==45&&v!==58&&!gy(v))return!1;o++}let a=my(e,t+1),u=a.split("|");const c=[];for(let v=0;v<u.length;v++){const x=u[v].trim();if(!x){if(v===0||v===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(x))return!1;x.charCodeAt(x.length-1)===58?c.push(x.charCodeAt(0)===58?"center":"right"):x.charCodeAt(0)===58?c.push("left"):c.push("")}if(a=my(e,t).trim(),e.sCount[t]-e.blkIndent>=4)return!1;u=Ew(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const d=u.length;if(d===0||d!==c.length)return!1;if(i)return!0;const f=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRulesForState(e,"blockquote"),g=e.push("table_open","table",1),m=[t,0];g.map=m;const y=e.push("thead_open","thead",1);y.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let v=0;v<u.length;v++){const x=e.push("th_open","th",1);c[v]&&(x.attrs=[["style",`text-align:${c[v]}`]]);const E=e.push("inline","",0);E.content=u[v].trim(),E.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let k,A=0;for(s=t+2;s<n&&!(e.sCount[s]<e.blkIndent);s++){let v=!1;for(let E=0,S=p.length;E<S;E++)if(p[E](e,s,n,!0)){v=!0;break}if(v||(a=my(e,s).trim(),!a)||e.sCount[s]-e.blkIndent>=4||(u=Ew(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),A+=d-u.length,A>Qle))break;if(s===t+2){const E=e.push("tbody_open","tbody",1);E.map=k=[t+2,0]}const x=e.push("tr_open","tr",1);x.map=[s,s+1];for(let E=0;E<d;E++){const S=e.push("td_open","td",1);c[E]&&(S.attrs=[["style",`text-align:${c[E]}`]]);const M=e.push("inline","",0);M.content=u[E]?u[E].trim():"",M.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return k&&(e.push("tbody_close","tbody",-1),k[1]=s),e.push("table_close","table",-1),m[1]=s,e.parentType=f,e.line=s,!0}var Xle=class{_rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t,n){this._rules.push({name:e,enabled:!0,fn:t,alt:n?.alt||[]}),this.invalidateCache()}before(e,t,n,i){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:i?.alt||[]}),this.invalidateCache()}after(e,t,n,i){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:i?.alt||[]}),this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache[t]??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache[t]??[]}getRulesForState(e,t){const n=e?.env;return n&&(Object.prototype.hasOwnProperty.call(n,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(n,"__mdtsProfileRules"))?this.getNamedRules(t).map(({name:i,fn:s})=>(o,r,l,a)=>{const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),c=s(o,r,l,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return hf(o?.env,"block",i,d-u,c,!!a),c}):this.getRules(t)}at(e,t,n){const i=this._rules.findIndex(s=>s.name===e);if(i===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[i].fn=t,n?.alt&&(this._rules[i].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled||(this._rules[r].enabled=!0,s=!0)}),s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled&&(this._rules[r].enabled=!1,s=!0)}),s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this._rules){const s=t.has(i.name);i.enabled!==s&&(i.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const i of this._rules)if(i.enabled)for(const s of i.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const i of e){const s=[],o=[];for(const r of this._rules)r.enabled&&(i!==""&&!r.alt.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t[i]=s,n[i]=o}this.cache=t,this.namedCache=n}};const W0=[["table",Jle,["paragraph","reference"]],["code",$le],["fence",Dle,["paragraph","reference","blockquote","list"]],["blockquote",Ble,["paragraph","reference","blockquote","list"]],["hr",Ole,["paragraph","reference","blockquote","list"]],["list",Vle,["paragraph","reference","blockquote"]],["reference",Gle],["html_block",Ple,["paragraph","reference","blockquote"]],["heading",Rle,["paragraph","reference","blockquote"]],["lheading",Wle],["paragraph",Zle]];var eae=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new Xle;for(let e=0;e<W0.length;e++)this.ruler.push(W0[e][0],W0[e][1],{alt:(W0[e][2]||[]).slice()});this.ruler.__mdtsDefaultVersion=this.ruler.version}tokenize(e,t,n){const i=this.getRules(),s=i.length,o=e.md.options.maxNesting,r=e.bMarks,l=e.tShift,a=e.eMarks,u=e.sCount;let c=t,d=!1;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){for(;c<n;){for(;c<n&&r[c]+l[c]>=a[c];)c++;if(e.line=c,c>=n||u[c]<e.blkIndent)break;if(e.level>=o){e.line=n;break}const p=e.line;let g=!1;for(let m=0;m<s;m++)if(g=i[m](e,c,n,!1),g){if(p>=e.line)throw new Error("block rule didn't increment state.line");break}if(!g)throw new Error("none of the block rules matched");e.tight=!d,r[e.line-1]+l[e.line-1]>=a[e.line-1]&&(d=!0),c=e.line,c<n&&r[c]+l[c]>=a[c]&&(d=!0,c++,e.line=c)}return}const f=this.ruler.getNamedRules("");for(;c<n;){for(;c<n&&r[c]+l[c]>=a[c];)c++;if(e.line=c,c>=n||u[c]<e.blkIndent)break;if(e.level>=o){e.line=n;break}const p=e.line;let g=!1;for(let m=0;m<s;m++){const y=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();g=f[m].fn(e,c,n,!1);const w=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(hf(e.env,"block",f[m].name,w-y,g,!1),g){if(p>=e.line)throw new Error("block rule didn't increment state.line");break}}if(!g)throw new Error("none of the block rules matched");e.tight=!d,r[e.line-1]+l[e.line-1]>=a[e.line-1]&&(d=!0),c=e.line,c<n&&r[c]+l[c]>=a[c]&&(d=!0,c++,e.line=c)}}parse(e,t,n,i){if(!e||e.length===0)return;const s=new EN(e,t,n,i);this.tokenize(s,s.line,s.lineMax)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}},FN=class{src;env;tokens;inlineMode;md;constructor(e,t,n={}){this.src=typeof e=="string"?e||"":e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}};FN.prototype.Token=Es;const Tw=[["normalize",yle],["block",_re],["inline",ule],["linkify",gle],["replacements",_le],["smartquotes",Ele],["text_join",Tle]],tae={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},nae={parseLinkLabel:ob,parseLinkDestination:sb,parseLinkTitle:rb};function iae(){return{...tae}}function sae(){return{...nae}}var oae=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new eae,this.inline=new ale,this.ruler=new Sle;for(let e=0;e<Tw.length;e++){const[t,n]=Tw[e];this.ruler.push(t,n)}this.fallbackParser={block:this.block,inline:this.inline,core:this,options:iae(),helpers:sae(),normalizeLink:MN,normalizeLinkText:IN,validateLink:SN,linkify:null}}resolveParser(e){return e||(this.linkifyInstance||(this.linkifyInstance=new QL({fuzzyLink:!0})),this.fallbackParser.block!==this.block&&(this.fallbackParser.block=this.block),this.fallbackParser.inline!==this.inline&&(this.fallbackParser.inline=this.inline),this.fallbackParser.core=this,this.fallbackParser.linkify=this.linkifyInstance,this.fallbackParser)}createState(e,t={},n){return new FN(e,this.resolveParser(n),t)}getCoreRules(){return this.cachedCoreRulesVersion!==this.ruler.version&&(this.cachedCoreRules=this.ruler.getRules(""),this.cachedCoreRulesVersion=this.ruler.version),this.cachedCoreRules}getCoreNamedRules(){return this.cachedCoreNamedRulesVersion!==this.ruler.version&&(this.cachedCoreNamedRules=this.ruler.getNamedRules(""),this.cachedCoreNamedRulesVersion=this.ruler.version),this.cachedCoreNamedRules}process(e){if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const n=this.getCoreRules();for(let i=0;i<n.length;i++)n[i](e);return}const t=this.getCoreNamedRules();for(let n=0;n<t.length;n++){const i=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();t[n].fn(e);const s=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();hf(e.env,"core",t[n].name,s-i,!0,!1)}rle(e.env)}parseSource(e,t={},n){if(typeof e!="string"&&xre(e))return this.parse(eN(e),t,n);const i=this.createState(e,t,n);return this.process(i),this.lastState=i,i}parse(e,t={},n){if(typeof e!="string")throw new TypeError("Input data should be a String");return this.parseSource(e,t,n)}getTokens(){return this.lastState?this.lastState.tokens:[]}};const rae=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/;function Dm(e){return!rae.test(e)}function Vh(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function Ig(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9)return!1}return!0}function Lw(e,t,n){return t+2<n&&e.charCodeAt(t)===96&&e.charCodeAt(t+1)===96&&e.charCodeAt(t+2)===96}function vy(e,t,n){return t+1<n&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===32}function lae(e){if(e.length>3)return Dm(e);for(let t=0;t<e.length;t++)switch(e.charCodeAt(t)){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!1}return!0}const aae=["","h1","h2","h3","h4","h5","h6"],uae=["","#","##","###","####","#####","######"],Nw=0,yy=1,by=2;function Or(e,t,n,i){const s=new Es(e,t,n);return s.level=i,s.block=!0,s}function cb(e,t,n){const i=Or("inline","",0,n);i.map=[t,t+1],i.content=e;const s=new Es("text","",0);return s.content=e,i.children=[s],i}function cae(e,t,n,i,s){let o=0,r=n;for(;r<i&&t.charCodeAt(r)===35&&o<6;)r++,o++;if(o===0||r>=i||t.charCodeAt(r)!==32)return!1;let l=r+1;for(;l<i&&t.charCodeAt(l)===32;)l++;let a=i;for(;a>l&&t.charCodeAt(a-1)===32;)a--;let u=a;for(;u>l&&t.charCodeAt(u-1)===35;)u--;if(u>l&&t.charCodeAt(u-1)===32)for(a=u-1;a>l&&t.charCodeAt(a-1)===32;)a--;const c=t.slice(l,a);if(!Dm(c))return!1;const d=aae[o],f=uae[o],p=Or("heading_open",d,1,0);p.map=[s,s+1],p.markup=f,e.push(p),e.push(cb(c,s,1));const g=Or("heading_close",d,-1,0);return g.markup=f,e.push(g),!0}function dae(e,t,n){const i=Or("paragraph_open","p",1,0);i.map=[n,n+1],e.push(i),e.push(cb(t,n,1)),e.push(Or("paragraph_close","p",-1,0))}function fae(e,t,n){const i=e.charCodeAt(n-1);return i===32||i===9?e.slice(t,n).trim():e.slice(t,n)}function ky(e,t){for(;t<e.length&&e.charCodeAt(t)===10;)t++;return t}function hae(e,t){const n=Or("bullet_list_open","ul",1,0);return n.map=[t,t],n.markup="-",e.push(n),n}function pae(e,t,n){const i=Or("list_item_open","li",1,1);i.map=[n,n+1],i.markup="-",e.push(i);const s=Or("paragraph_open","p",1,2);s.map=[n,n+1],s.hidden=!0,e.push(s),e.push(cb(t,n,3));const o=Or("paragraph_close","p",-1,2);o.hidden=!0,e.push(o);const r=Or("list_item_close","li",-1,1);return r.markup="-",e.push(r),i}function gae(e){const t=Or("bullet_list_close","ul",-1,0);t.markup="-",e.push(t)}function mae(e,t,n,i){if(!Lw(e,t,n))return null;const s=e.slice(t+3,n);if(s.includes("`"))return null;const o=n<e.length?n+1:n;let r=o,l=o,a=i+1;for(;l<e.length;){const u=Vh(e,l);if(Lw(e,l,u)&&Ig(e,l+3,u)){const c=Or("fence","code",0,0);return c.map=[i,a+1],c.markup="```",c.info=s,c.content=e.slice(o,r),{token:c,nextPos:u<e.length?u+1:u,nextLine:a+1}}l=u<e.length?u+1:u,r=l,a++}return null}function vae(e,t){if(e.length===0)return t&&(t.matched=!0),[];if(e.includes("\r")||e.includes("\0"))return null;const n=[];let i=e.length>=1e5?Nw:by,s="",o=!1,r=!1,l=0,a=0;for(;l<e.length;){const u=Vh(e,l);if(l===u){l=u<e.length?u+1:u,a++;continue}const c=e.charCodeAt(l);if(c===32||c===9){if(!Ig(e,l,u))return null;l=u<e.length?u+1:u,a++;continue}if(c===35){if(!cae(n,e,l,u,a))return null;t&&(t.blocks++,t.headings++);const g=u<e.length?u+1:u;l=ky(e,g),a+=1+l-g;continue}if(c===45){if(!vy(e,l,u))return null;const g=a;let m=l,y=a,w=null,k=null;for(;m<e.length;){const x=Vh(e,m);if(!vy(e,m,x))break;const E=m+2,S=x===E+1?e[E]:e.slice(E,x);if(!lae(S))return null;w===null&&(w=hae(n,g)),k=pae(n,S,y),m=x<e.length?x+1:x,y++}if(w===null||k===null)return null;let A=m,v=y;for(;A<e.length;){if(e.charCodeAt(A)===10){A++,v++;continue}const x=Vh(e,A);if(!Ig(e,A,x)){if(vy(e,A,x))return null;break}A=x<e.length?x+1:x,v++}w.map[1]=v,k.map[1]=v,gae(n),t&&(t.blocks++,t.lists++),l=A,a=v;continue}if(c===96){const g=mae(e,l,u,a);if(!g)return null;n.push(g.token),t&&(t.blocks++,t.fences++),l=ky(e,g.nextPos),a=g.nextLine+l-g.nextPos;continue}const d=fae(e,l,u);let f;if(i===by?(t&&t.paragraphCacheBypasses++,f=Dm(d)):i===yy&&d===s?(t&&t.paragraphCacheHits++,f=o):(t&&t.paragraphCacheMisses++,f=Dm(d),i===Nw?(r&&(i=d===s?yy:by),s=d,o=f,r=!0):i===yy&&(s=d,o=f)),!f)return null;const p=u<e.length?u+1:u;if(p<e.length&&e.charCodeAt(p)!==10&&!Ig(e,p,Vh(e,p)))return null;dae(n,d,a),t&&(t.blocks++,t.paragraphs++),l=ky(e,p),a+=1+l-p}return t&&(t.matched=!0),n}const yae=/[&<>"]/,Fw=/[&<>"]/g,bae=/&/g,kae=/[<>"]/g,Aae={"&":"&","<":"<",">":">",'"':"""};function Ay(e){return Aae[e]||e}function pi(e){if(e.length===0)return"";if(e.length<32)return yae.test(e)?e.replace(Fw,Ay):e;const t=e.includes("&"),n=e.includes("<"),i=e.includes(">"),s=e.includes('"');return!t&&!n&&!i&&!s?e:t&&!n&&!i&&!s?e.replace(bae,"&"):t?e.replace(Fw,Ay):e.replace(kae,Ay)}const Cae=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),wae=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function BN(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(Cae,(t,n,i)=>{if(n)return n;if(wae.test(i)){const o=i[1].toLowerCase()==="x"?Number.parseInt(i.slice(2),16):Number.parseInt(i.slice(1),10);return gv(o)?J1(o):"�"}const s=G5(t);return s!==t?s:t})}const xae=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,_ae=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,Sae=/"/g;function Qd(e,t){const n=e.indexOf(` -`,t);return n===-1?e.length:n}function Rm(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9)return!1}return!0}function q0(e,t){for(;t<e.length&&e.charCodeAt(t)===10;)t++;return t}function Mae(e,t){return t>=e.length||e.charCodeAt(t)===10?!1:!Rm(e,t,Qd(e,t))}function Bw(e,t,n){return t+2<n&&e.charCodeAt(t)===96&&e.charCodeAt(t+1)===96&&e.charCodeAt(t+2)===96}function Iae(e,t,n){const i=e.charCodeAt(n-1);return i===32||i===9?e.slice(t,n).trim():e.slice(t,n)}function db(e){return _ae.test(e)?xae.test(e)?null:e.replace(Sae,"""):e}function Eae(e,t,n){let i=0,s=t;for(;s<n&&e.charCodeAt(s)===35&&i<6;)s++,i++;if(i===0||s>=n||e.charCodeAt(s)!==32)return null;let o=s+1;for(;o<n&&e.charCodeAt(o)===32;)o++;let r=n;for(;r>o&&e.charCodeAt(r-1)===32;)r--;let l=r;for(;l>o&&e.charCodeAt(l-1)===35;)l--;if(l>o&&e.charCodeAt(l-1)===32)for(r=l-1;r>o&&e.charCodeAt(r-1)===32;)r--;const a=db(e.slice(o,r));return a===null?null:`<h${i}>${a}</h${i}> -`}function $w(e,t,n){return t+1<n&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===32}function Tae(e,t){switch(e.charCodeAt(t)){case 34:return`<li>"</li> -`;case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return null}return`<li>${e[t]}</li> -`}function Lae(e,t,n){const i=t+2;if(n===i+1)return Tae(e,i);const s=db(e.slice(t+2,n));return s===null?null:`<li>${s}</li> -`}function Nae(e,t,n){for(;t<n;){const s=e.charCodeAt(t);if(s!==32&&s!==9)break;t++}for(;n>t;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let i=n;for(let s=t;s<n;s++){const o=e.charCodeAt(s);if(o===96)return null;if(o===32||o===9){i=s;break}}return e.slice(t,i)}function Fae(e,t,n,i,s){if(!Bw(e,t,n))return null;const o=Nae(e,t+3,n);if(o===null)return null;const r=n<e.length?n+1:n;let l=r,a=r;for(;a<e.length;){const u=Qd(e,a);if(Bw(e,a,u)&&Rm(e,a+3,u)){const c=e.slice(r,l);let d;return o===i.lang?(s&&s.fenceCacheHits++,d=i.open):(s&&s.fenceCacheMisses++,d=o?`<pre><code class="language-${pi(o)}">`:"<pre><code>",i.lang=o,i.open=d),{html:`${d}${pi(c)}</code></pre> -`,nextPos:u<e.length?u+1:u}}a=u<e.length?u+1:u,l=a}return null}function $N(e,t){if(e.length===0)return t&&(t.matched=!0),"";if(e.includes("\r")||e.includes("\0"))return null;let n=0,i="";const s=e.length>=25e4,o=[],r={lang:null,open:""};let l="",a="",u="",c="";for(;n<e.length;){const d=Qd(e,n);if(n===d){n=d<e.length?d+1:d;continue}const f=e.charCodeAt(n);if(f===32||f===9){if(!Rm(e,n,d))return null;n=d<e.length?d+1:d;continue}if(f===35){const y=Eae(e,n,d);if(y===null)return null;t&&(t.blocks++,t.headings++),s?o.push(y):i+=y,n=q0(e,d<e.length?d+1:d);continue}if(f===45){let y=n;for(;y<e.length;){const v=Qd(e,y);if(!$w(e,y,v))break;y=v<e.length?v+1:v}if(y===n)return null;const w=e.slice(n,y);let k;if(w===l)t&&t.listCacheHits++,k=a;else{t&&t.listCacheMisses++;let v=n;for(k=`<ul> -`;v<y;){const x=Qd(e,v),E=Lae(e,v,x);if(E===null)return null;k+=E,v=x<e.length?x+1:x}k+=`</ul> -`,l=w,a=k}let A=q0(e,y);for(;A<e.length;){if(e.charCodeAt(A)===10){A++;continue}const v=Qd(e,A);if(!Rm(e,A,v)){if($w(e,A,v))return null;break}A=v<e.length?v+1:v}t&&(t.blocks++,t.lists++),s?o.push(k):i+=k,n=A;continue}if(f===96){const y=Fae(e,n,d,r,t);if(!y)return null;t&&(t.blocks++,t.fences++),s?o.push(y.html):i+=y.html,n=q0(e,y.nextPos);continue}const p=Iae(e,n,d);let g;if(p===u)t&&t.paragraphCacheHits++,g=c;else{t&&t.paragraphCacheMisses++;const y=db(p);if(y===null)return null;g=`<p>${y}</p> -`,u=p,c=g}const m=d<e.length?d+1:d;if(m<e.length&&e.charCodeAt(m)!==10&&Mae(e,m))return null;t&&(t.blocks++,t.paragraphs++),s?o.push(g):i+=g,n=q0(e,m)}return t&&(t.matched=!0),s?o.join(""):i}function Dw(e){return $N(e)}function Rw(e,t){return $N(e,t)}const Bae={maxChunkChars:1e4,maxChunkLines:200,fenceAware:!0,maxChunks:void 0,fallbackOnGlobalState:!0};function zm(e,t,n={},i){Lo(n);const s={...Bae,...i||{}},o=Qo(t);if(s.fallbackOnGlobalState!==!1&&o)return fy(n,{count:1,fallback:!0,fallbackReason:o,globalStateDetected:o,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),ff(n,o,()=>e.core.parse(t,n,e).tokens);let r=Eg(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=zae(r,s.maxChunks)),Tg(t,r))return fy(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),ff(n,o,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return fy(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:o||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!o}),ff(n,o,()=>{for(let u=0;u<r.length;u++){const c=r[u],d=t.slice(c.start,c.end),f=e.core.parse(d,n,e).tokens;l!==0&&f.length&&Dae(f,l),Rae(a,f),l+=c.lineCount}return a})}function Eg(e,t,n=!0){const i=[];let s=0,o=0,r=0,l=0,a=0,u=0,c=null;function d(f){f<=r||(i.push({start:r,end:f,lineCount:l}),r=f,s=0,o=0,l=0)}for(let f=0;f<e.length;){let p=e.indexOf(` -`,f),g=p;p===-1?(p=e.length,g=e.length):g=p+1;const m=Oae(e,f,p);if(t.fenceAware){let k=f;for(;k<p;){const v=e.charCodeAt(k);if(v===32||v===9)k++;else break}const A=e[k];if(A==="`"||A==="~"){let v=k;for(;v<p&&e[v]===A;)v++;const x=v-k;x>=3&&(c?c.marker===A&&x>=c.length&&(c=null):c={marker:A,length:x})}}const y=g-f;s+=y,o+=1,l+=1,m?(a=0,u=0):(a+=1,u+=y);const w=m;if((s>=t.maxChunkChars||o>=t.maxChunkLines)&&!c)if(w)d(g);else{const k=Math.max(10,Math.floor(t.maxChunkLines*.5)),A=Math.max(t.maxChunkChars,8e3);(a>=k||u>=A)&&d(g)}f=g}return n&&d(e.length),i}function Tg(e,t,n={rangesCoverWholeSource:!0}){const i=n.rangesCoverWholeSource?t.length-1:t.length;for(let s=0;s<i;s++)if(!$ae(e,t[s].end))return!0;return!1}function $ae(e,t){if(t<=0||t>e.length||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;for(let i=n+1;i<t-1;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}function Dae(e,t){if(t===0)return;const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function Rae(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function zae(e,t){if(e.length<=t)return e;const n=[];let i=0;for(let s=0;s<t;s++){const o=t-s,r=e.length-i,l=Math.ceil(r/o),a=e.slice(i,i+l);let u=0;for(let c=0;c<a.length;c++)u+=a[c].lineCount;n.push({start:a[0].start,end:a[a.length-1].end,lineCount:u}),i+=l}return n}function Oae(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}const DN=4e6,RN=8e4,Pae=1e4,jae=200,Hae=1e4,Wae=200;function zN(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function qae(e,t){if(t===0)return;const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function Ua(e){return e.length===0?0:es(e)+(e.charCodeAt(e.length-1)===10?0:1)}function Uae(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}function Kae(e,t){if(!t||e.length===0)return!1;let n=null;for(let i=0;i<e.length;){let s=e.indexOf(` -`,i);s===-1&&(s=e.length);let o=i;for(;o<s;){const l=e.charCodeAt(o);if(l===32||l===9)o++;else break}const r=e[o];if(r==="`"||r==="~"){let l=o;for(;l<s&&e[l]===r;)l++;const a=l-o;a>=3&&(n?n.marker===r&&a>=n.length&&(n=null):n={marker:r,length:a})}i=s===e.length?e.length:s+1}return n!==null}function Vae(e,t){if(e.length===0||e.charCodeAt(e.length-1)!==10)return!1;let n=e.length-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;return Uae(e,n+1,e.length-1)?!Kae(e,t):!1}function Zae(e,t,n,i={}){const s=i.mode??"full",o=i.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(i.maxChunkChars!==void 0||i.maxChunkLines!==void 0||i.autoTune===!1){const r=i.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??Hae:e.options.fullChunkSizeChars??Pae),l=i.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??Wae:e.options.fullChunkSizeLines??jae);return{maxChunkChars:r,maxChunkLines:l,holdBelowChars:r,holdBelowLines:l,fenceAware:o}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:o}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:o}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}}var _p=class{md;options;pending="";tokens=[];committedChars=0;committedLines=0;fedChunks=0;parsedChunks=0;globalStateEnv=null;markedGlobalStateReason=null;constructor(e,t={}){if(this.md=e,this.options={mode:"full",autoTune:!0,retainTokens:!0,...t},this.options.retainTokens===!1&&!this.options.onChunkTokens)throw new Error("UnboundedBuffer with retainTokens=false requires onChunkTokens")}feed(e){e&&(this.pending+=e,this.fedChunks+=1)}flushAvailable(e={}){if(!this.pending)return null;const t=this.resolveWindow(),n=Ua(this.pending);if(this.pending.length<t.holdBelowChars&&n<t.holdBelowLines)return this.updateEnvDiagnostics(e,t,n),null;const i=Eg(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!1);if(!i.length)return this.updateEnvDiagnostics(e,t,n),null;if(Tg(this.pending,i,{rangesCoverWholeSource:!1}))return this.updateEnvDiagnostics(e,t,n),null;const s=this.commitRanges(i,e);return this.pending=this.pending.slice(s),this.updateEnvDiagnostics(e,t,Ua(this.pending)),this.tokens}flushIfBoundary(e={}){if(!this.pending)return null;const t=this.resolveWindow();if(!Vae(this.pending,t.fenceAware))return this.updateEnvDiagnostics(e,t,Ua(this.pending)),null;const n=Eg(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!0);if(!n.length)return this.updateEnvDiagnostics(e,t,Ua(this.pending)),null;const i=Tg(this.pending,n,{rangesCoverWholeSource:!0})?[{start:0,end:this.pending.length,lineCount:Ua(this.pending)}]:n;return this.commitRanges(i,e),this.pending="",this.updateEnvDiagnostics(e,t,0),this.tokens}flushForce(e={}){if(!this.pending){this.prepareGlobalStateEnv(e,"");const i=this.resolveWindow();return this.updateEnvDiagnostics(e,i,0),this.tokens}const t=this.resolveWindow(),n=Eg(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!0);if(n.length){const i=Tg(this.pending,n,{rangesCoverWholeSource:!0})?[{start:0,end:this.pending.length,lineCount:Ua(this.pending)}]:n;this.commitRanges(i,e),this.pending=""}return this.updateEnvDiagnostics(e,t,0),this.tokens}reset(){this.pending="",this.tokens=[],this.committedChars=0,this.committedLines=0,this.fedChunks=0,this.parsedChunks=0,this.globalStateEnv=null,this.markedGlobalStateReason=null}peek(){return this.tokens}pendingText(){return this.pending}stats(){return{mode:this.options.mode??"full",fedChunks:this.fedChunks,parsedChunks:this.parsedChunks,committedChars:this.committedChars,committedLines:this.committedLines,pendingChars:this.pending.length,pendingLines:Ua(this.pending),retainedTokens:this.options.retainTokens!==!1}}resolveWindow(){const e=this.committedChars+this.pending.length,t=this.committedLines+Ua(this.pending);return Zae(this.md,e,t,this.options)}prepareGlobalStateEnv(e,t){if(this.globalStateEnv!==e&&(wp(e)&&Ea(e),this.globalStateEnv=e,this.markedGlobalStateReason=null),this.markedGlobalStateReason)return;const n=Qo(t);n&&(nb(e,n),this.markedGlobalStateReason=n)}commitRanges(e,t){if(!e.length)return 0;this.prepareGlobalStateEnv(t,this.pending);let n=0;try{for(let i=0;i<e.length;i++){const s=e[i],o=this.pending.slice(s.start,s.end),r=this.md.core.parse(o,t,this.md).tokens,l=this.committedChars,a=this.committedLines;a!==0&&r.length&&qae(r,a),this.options.retainTokens!==!1&&zN(this.tokens,r),this.committedChars+=o.length,this.committedLines+=s.lineCount,this.parsedChunks+=1,this.options.onChunkTokens&&this.options.onChunkTokens(r,{chunkIndex:this.parsedChunks,chunkChars:o.length,chunkLines:s.lineCount,tokenCount:r.length,startOffset:l,endOffset:this.committedChars,startLine:a,endLine:this.committedLines}),n=s.end}return this.markedGlobalStateReason&&ib(t),n}catch(i){throw this.markedGlobalStateReason&&(Ea(t),this.globalStateEnv=null,this.markedGlobalStateReason=null),i}}updateEnvDiagnostics(e,t,n){GL(e,{mode:this.options.mode??"full",maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,committedChars:this.committedChars,committedLines:this.committedLines,pendingChars:this.pending.length,pendingLines:n,fedChunks:this.fedChunks,parsedChunks:this.parsedChunks,globalStateDetected:this.markedGlobalStateReason||void 0})}};function Gae(e,t,n={},i={}){Lo(n);const s=new _p(e,{mode:"full",...i});for(const o of t)s.feed(o),s.flushAvailable(n);return s.flushForce(n)}async function Qae(e,t,n={},i={}){Lo(n);const s=new _p(e,{mode:"full",...i});for await(const o of t)s.feed(o),s.flushAvailable(n);return s.flushForce(n)}function Yae(e,t,n,i={},s={}){Lo(i);const o=new _p(e,{mode:"full",...s,retainTokens:!1,onChunkTokens:n});for(const r of t)o.feed(r),o.flushAvailable(i);return o.flushForce(i),o.stats()}async function Jae(e,t,n,i={},s={}){Lo(i);const o=new _p(e,{mode:"full",...s,retainTokens:!1,onChunkTokens:n});for await(const r of t)o.feed(r),o.flushAvailable(i);return o.flushForce(i),o.stats()}function ON(e,t,n){if(e.options.autoUnbounded===!1)return!1;const i=e.options.autoUnboundedThresholdChars??DN,s=e.options.autoUnboundedThresholdLines??RN;return t>=i||n>=s}function PN(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??DN))return"yes";const i=e.options.autoUnboundedThresholdLines??RN;return n!==void 0?n>=i?"yes":"no":t+1<i?"no":"need-lines"}function h1(e,t,n={},i={}){Lo(n);const s=Qo(t);if(wp(n)&&Ea(n),i.fallbackOnGlobalState!==!1&&s)return GL(n,{mode:"full",fallback:!0,fallbackReason:s,committedChars:t.length,committedLines:es(t),pendingChars:0,pendingLines:0,fedChunks:1,parsedChunks:1,globalStateDetected:s}),ff(n,s,()=>e.core.parse(t,n,e).tokens);const o=[],r=new _p(e,{mode:"full",...i,retainTokens:!1,onChunkTokens(l){zN(o,l)}});if(s&&nb(n,s),r.feed(t),r.flushForce(n),s&&(ib(n),i.fallbackOnGlobalState===!1)){const l=ua(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return o}const pf=(e,t,n)=>e<t?t:e>n?n:e;function jN(e){return e.experimental?{...e,...e.experimental}:e}const zw=[{max:5e3,strategy:"discrete",maxChunkChars:32e3,maxChunkLines:150,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:24e3,maxChunkLines:200,maxChunks:12,notes:"<=20k"},{max:1e5,strategy:"plain",notes:"<=100k plain"},{max:2e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:150,maxChunks:12,notes:"<=200k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=5M"}],Ow=[{max:5e3,strategy:"discrete",maxChunkChars:16e3,maxChunkLines:250,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=20k"},{max:1e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=100k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=5M"}];function HN(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function Xae(e,t=Math.max(0,e/40|0),n={}){const i=jN(n),s=i.fullChunkFenceAware??!0,o=i.fullChunkTargetChunks??8,r=i.fullChunkAdaptive!==!1;for(let l=0;l<zw.length;l++){const a=zw[l];if(e<=a.max){if(a.strategy!=="adaptive")return HN(s,a);break}}return e>5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:pf(Math.ceil(e/o),8e3,64e3),maxChunkLines:pf(Math.ceil(t/o),150,700),maxChunks:pf(Math.ceil(e/64e3),o,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.fullChunkSizeChars??1e4,maxChunkLines:i.fullChunkSizeLines??200,fenceAware:s,maxChunks:i.fullChunkMaxChunks}}function Pw(e,t=Math.max(0,e/40|0),n={}){const i=jN(n),s=i.streamChunkFenceAware??!0,o=i.streamChunkTargetChunks??8,r=i.streamChunkAdaptive!==!1;for(let l=0;l<Ow.length;l++){const a=Ow[l];if(e<=a.max){if(a.strategy!=="adaptive")return HN(s,a);break}}return e>5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:pf(Math.ceil(e/o),8e3,64e3),maxChunkLines:pf(Math.ceil(t/o),150,700),maxChunks:pf(Math.ceil(e/64e3),o,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.streamChunkSizeChars??1e4,maxChunkLines:i.streamChunkSizeLines??200,maxChunks:i.streamChunkMaxChunks,fenceAware:s}}var eue={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"]},inline2:{rules:["balance_pairs","emphasis","fragments_join"]}}},tue={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},nue={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"]},inline2:{rules:["balance_pairs","fragments_join"]}}};function vv(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function Lg(e,t){if(vv(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const jw=e=>vv(e)?e:Promise.resolve(e);function p1(e){switch(e){case"alt":case"class":case"href":case"id":case"lang":case"rel":case"src":case"start":case"style":case"target":case"title":return e;default:return pi(e)}}function _u(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${p1(t[0])}="${pi(t[1])}"`;for(let i=1;i<e.length;i++){const s=e[i];n+=` ${p1(s[0])}="${pi(s[1])}"`}return n}function WN(e){if(!e)return{langName:"",langAttrs:""};let t=0;for(;t<e.length;){const i=e.charCodeAt(t);if(i===32||i===9||i===10)break;t++}if(t>=e.length)return{langName:e,langAttrs:""};let n=t;for(;n<e.length;){const i=e.charCodeAt(n);if(i!==32&&i!==9&&i!==10)break;n++}return{langName:e.slice(0,t),langAttrs:n<e.length?e.slice(n):""}}function g1(e,t,n,i,s){if(t.indexOf("<pre")===0)return`${t} -`;if(n){if(!e.attrs||e.attrs.length===0)return`<pre><code class="${pi(`${s.langPrefix??"language-"}${i}`)}">${t}</code></pre> -`;const o=e.attrIndex("class"),r=e.attrs?e.attrs.slice():[],l=`${s.langPrefix??"language-"}${i}`;return o<0?r.push(["class",l]):(r[o]=r[o].slice(),r[o][1]+=` ${l}`),`<pre><code${_u(r)}>${t}</code></pre> -`}return`<pre><code${_u(e.attrs)}>${t}</code></pre> -`}function ep(e){return!e.attrs||e.attrs.length===0?`<code>${pi(e.content)}</code>`:`<code${_u(e.attrs)}>${pi(e.content)}</code>`}function V3(e){const t=pi(e.content);return e.attrs?`<pre${_u(e.attrs)}><code>${t}</code></pre> -`:`<pre><code>${t}</code></pre> -`}function iue(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}<p>`;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}<td>`;case"th_open":return`${t}<th>`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}<td style="${pi(n[0][1])}">`;if(e.type==="th_open")return`${t}<th style="${pi(n[0][1])}">`}return null}function Hw(e){const t=e.attrs;return!t||t.length===0?"<a>":t.length===1?`<a ${p1(t[0][0])}="${pi(t[0][1])}">`:t.length===2?`<a ${p1(t[0][0])}="${pi(t[0][1])}" ${p1(t[1][0])}="${pi(t[1][1])}">`:`<a${_u(t)}>`}function sue(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":case"image":return!0;default:return!1}}function Ww(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":return!0;default:return!1}}function Om(e,t){if(e.hidden)return"";const n=e.attrs,i=e.nesting,s=e.tag;if(!n||n.length===0)return i===0?t?`<${s} />`:`<${s}>`:i===-1?`</${s}>`:`<${s}>`;let o=(i===-1?"</":"<")+s+_u(n);return i===0&&t&&(o+=" /"),`${o}>`}const oue={langPrefix:"language-",xhtmlOut:!1,breaks:!1},U0=Object.prototype.hasOwnProperty,Kn={code_inline(e,t){return ep(e[t])},code_block(e,t){return V3(e[t])},fence(e,t,n,i,s){const o=e[t],r=o.info?BN(o.info).trim():"",{langName:l,langAttrs:a}=WN(r),u=n.highlight,c=pi(o.content);if(!u)return g1(o,c,r,l,n);const d=u(o.content,l,a);return vv(d)?d.then(f=>g1(o,f||c,r,l,n)):g1(o,d||c,r,l,n)},image(e,t,n,i,s){const o=e[t],r=s.renderInlineAsText(o.children||[],n,i),l=o.attrIndex("alt");return l>=0&&o.attrs?o.attrs[l][1]=r:o.attrs?o.attrs.push(["alt",r]):o.attrs=[["alt",r]],Om(o,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`<br /> -`:`<br> -`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`<br /> -`:`<br> -`:` -`},text(e,t){return pi(e[t].content)},text_special(e,t){return pi(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function qw(e,t,n){const i=e.info?BN(e.info).trim():"",{langName:s,langAttrs:o}=WN(i),r=t.highlight,l=pi(e.content);if(!r)return g1(e,l,i,s,t);const a=r(e.content,s,o);if(vv(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return g1(e,a||l,i,s,t)}function Cy(e,t,n,i){switch(e.type){case"text":return t.text===Kn.text?e.content.length===0?"":pi(e.content):null;case"text_special":return t.text_special===Kn.text_special?e.content.length===0?"":pi(e.content):null;case"softbreak":return t.softbreak===Kn.softbreak?i:null;case"hardbreak":return t.hardbreak===Kn.hardbreak?n:null;case"html_inline":return t.html_inline===Kn.html_inline?e.content:null;case"code_inline":return t.code_inline===Kn.code_inline?ep(e):null;default:return null}}function rue(e,t,n,i,s){const o=e[0];switch(o.type){case"text":if(s.text===Kn.text)return o.content.length===0?"":pi(o.content);break;case"text_special":if(s.text_special===Kn.text_special)return o.content.length===0?"":pi(o.content);break;case"softbreak":if(s.softbreak===Kn.softbreak)return t.breaks?t.xhtmlOut?`<br /> -`:`<br> -`:` -`;break;case"hardbreak":if(s.hardbreak===Kn.hardbreak)return t.xhtmlOut?`<br /> -`:`<br> -`;break;case"html_inline":if(s.html_inline===Kn.html_inline)return o.content;break;case"code_inline":if(s.code_inline===Kn.code_inline)return ep(o);break}const r=s[o.type];if(!r)return Om(o,t.xhtmlOut===!0);const l=r(e,0,t,n,i);return typeof l=="string"?l:Lg(l,o.type)}var lue=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...Kn}}set(e){return this.baseOptions={...this.baseOptions,...e},this.normalizedBase=this.buildNormalizedBase(),this}render(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");if(e.length===1)return this.renderSingleToken(e,e[0],t,n);const i=this.mergeOptions(t),s=n??{},o=this.rules,r=i.xhtmlOut===!0;let l,a,u,c,d,f,p="",g="",m=!1,y="";for(let w=0;w<e.length;w++){const k=e[w],A=k.type,v=w>0&&e[w-1].hidden?` -`:"";if(A==="list_item_open"&&(!k.attrs||k.attrs.length===0)&&w+3<e.length){const S=e[w+1],M=e[w+2],_=e[w+3];if(S.type==="paragraph_open"&&S.hidden&&M.type==="inline"&&_.type==="paragraph_close"&&_.hidden){y+=`${v}<li>${this.renderInlineTokens(M.children||[],i,s)}`,w+=3;continue}}if(w+2<e.length){const S=e[w+1],M=e[w+2];if(S.type==="inline"&&M.nesting===-1&&M.tag===k.tag&&!M.hidden){const _=iue(k,v);if(_!==null){y+=`${_+this.renderInlineTokens(S.children||[],i,s)}</${k.tag}> -`,w+=2;continue}}}if(A==="inline"){const S=k.children||[];if(S.length===1){m||(l=o.text,a=o.text_special,u=o.softbreak,c=o.hardbreak,d=o.html_inline,f=o.code_inline,p=i.xhtmlOut?`<br /> -`:`<br> -`,g=i.breaks?p:` -`,m=!0);const M=S[0];switch(M.type){case"text":if(l===Kn.text){y+=pi(M.content);continue}break;case"text_special":if(a===Kn.text_special){y+=pi(M.content);continue}break;case"softbreak":if(u===Kn.softbreak){y+=g;continue}break;case"hardbreak":if(c===Kn.hardbreak){y+=p;continue}break;case"html_inline":if(d===Kn.html_inline){y+=M.content;continue}break;case"code_inline":if(f===Kn.code_inline){y+=ep(M);continue}break}}y+=this.renderInlineTokens(S,i,s);continue}const x=o[A];if(!x){const S=k.attrs;if(!k.hidden){if(!S||S.length===0)switch(A){case"hr":y+=r?`<hr /> -`:`<hr> -`;continue;case"heading_open":y+=`<${k.tag}>`;continue;case"heading_close":y+=`</${k.tag}> -`;continue;case"paragraph_open":y+=`${v}<p>`;continue;case"paragraph_close":y+=`</p> -`;continue;case"list_item_open":{const M=e[w+1];y+=v+(M&&(M.type==="inline"||M.hidden||M.nesting===-1&&M.tag==="li")?"<li>":`<li> -`);continue}case"list_item_close":y+=`</li> -`;continue;case"bullet_list_open":y+=`${v}<ul> -`;continue;case"bullet_list_close":y+=`</ul> -`;continue;case"blockquote_open":y+=v+(e[w+1]&&e[w+1].nesting===-1&&e[w+1].tag==="blockquote"?"<blockquote>":`<blockquote> -`);continue;case"blockquote_close":y+=`</blockquote> -`;continue;case"ordered_list_open":y+=`${v}<ol> -`;continue;case"ordered_list_close":y+=`</ol> -`;continue;case"table_open":y+=`${v}<table> -`;continue;case"table_close":y+=`</table> -`;continue;case"thead_open":y+=`${v}<thead> -`;continue;case"thead_close":y+=`</thead> -`;continue;case"tbody_open":y+=`${v}<tbody> -`;continue;case"tbody_close":y+=`</tbody> -`;continue;case"tr_open":y+=`${v}<tr> -`;continue;case"tr_close":y+=`</tr> -`;continue;case"td_open":y+=`${v}<td>`;continue;case"td_close":y+=`</td> -`;continue;case"th_open":y+=`${v}<th>`;continue;case"th_close":y+=`</th> -`;continue}else if(S.length===1){const M=S[0];if(A==="ordered_list_open"&&M[0]==="start"){y+=`${v}<ol start="${pi(M[1])}"> -`;continue}if(A==="td_open"&&M[0]==="style"){y+=`${v}<td style="${pi(M[1])}">`;continue}if(A==="th_open"&&M[0]==="style"){y+=`${v}<th style="${pi(M[1])}">`;continue}}}y+=this.renderToken(e,w,i);continue}if(A==="code_block"&&x===Kn.code_block){y+=V3(k);continue}if(A==="fence"&&x===Kn.fence){y+=qw(k,i);continue}if(A==="html_block"&&x===Kn.html_block){y+=k.content;continue}const E=x(e,w,i,s,this);typeof E=="string"?y+=E:y+=Lg(E,k.type)}return y}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const i=this.mergeOptions(t),s=n??{},o=this.rules;let r="";for(let l=0;l<e.length;l++){const a=e[l];if(a.type==="inline"){r+=await this.renderInlineTokensAsync(a.children||[],i,s);continue}const u=o[a.type];u?r+=await jw(u(e,l,i,s,this)):r+=this.renderToken(e,l,i)}return r}renderInline(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineTokens(e,i,s)}async renderInlineAsync(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineTokensAsync(e,i,s)}renderInlineAsText(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineAsTextInternal(e,i,s)}renderAttrs(e){return _u(e.attrs)}renderToken(e,t,n){const i=e[t];if(i.hidden)return"";const s=i.block,o=i.nesting,r=i.tag,l=i.attrs;let a=!1;if(s&&(a=!0,o===1&&t+1<e.length)){const f=e[t+1];(f.type==="inline"||f.hidden||f.nesting===-1&&f.tag===r)&&(a=!1)}const u=s&&o!==-1&&t>0&&e[t-1].hidden?` -`:"",c=a?`> -`:">";if(!l||l.length===0)return o===0?n.xhtmlOut?`${u}<${r} /${c}`:`${u}<${r}${c}`:o===-1?`${u}</${r}${c}`:`${u}<${r}${c}`;let d=u+(o===-1?"</":"<")+r+_u(l);return o===0&&n.xhtmlOut&&(d+=" /"),d+c}mergeOptions(e){const t=this.normalizedBase;if(!e||e.highlight===t.highlight&&e.langPrefix===t.langPrefix&&e.xhtmlOut===t.xhtmlOut&&e.breaks===t.breaks)return t;let n=null;const i=()=>(n||(n={...t}),n);if(U0.call(e,"highlight")&&e.highlight!==t.highlight&&(i().highlight=e.highlight),U0.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(i().langPrefix=s)}if(U0.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(i().xhtmlOut=s)}if(U0.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(i().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...oue,...this.baseOptions})}renderSingleToken(e,t,n,i){const s=this.rules,o=t.type;if(o==="code_block"&&s.code_block===Kn.code_block)return V3(t);if(o==="html_block"&&s.html_block===Kn.html_block)return t.content;const r=this.mergeOptions(n),l=i??{};if(o==="inline")return this.renderInlineTokens(t.children||[],r,l);const a=s[o];if(!a)return t.block?this.renderToken(e,0,r):Om(t,r.xhtmlOut===!0);if(o==="fence"&&a===Kn.fence)return qw(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:Lg(u,o)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const i=this.rules;if(e.length===1)return rue(e,t,n,this,i);const s=t.xhtmlOut===!0,o=s?`<br /> -`:`<br> -`,r=t.breaks?o:` -`,l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,p=i.link_open,g=i.link_close,m=i.em_open,y=i.em_close,w=i.strong_open,k=i.strong_close;let A="";for(let v=0;v<e.length;v++){const x=e[v];if(x.type==="link_open"&&!p&&!g&&v+2<e.length){const M=e[v+1];if(e[v+2].type==="link_close"&&sue(M)){const _=Cy(M,i,o,r);if(_!==null){const N=`${Hw(x)+_}</a>`;if(u===Kn.softbreak&&v+3<e.length&&e[v+3].type==="softbreak"){A+=N+r,v+=3;continue}A+=N,v+=2;continue}}}if(x.type==="link_open"&&!p&&!g&&v+1<e.length&&e[v+1].type==="link_close"){A+=`${Hw(x)}</a>`,v+=1;continue}if(x.type==="em_open"&&!m&&!y&&v+2<e.length){const M=e[v+1];if(e[v+2].type==="em_close"&&Ww(M)){const _=Cy(M,i,o,r);if(_!==null){A+=`<em>${_}</em>`,v+=2;continue}}}if(x.type==="strong_open"&&!w&&!k&&v+2<e.length){const M=e[v+1];if(e[v+2].type==="strong_close"&&Ww(M)){const _=Cy(M,i,o,r);if(_!==null){A+=`<strong>${_}</strong>`,v+=2;continue}}}switch(x.type){case"text":if(l===Kn.text){const M=x.content.length===0?"":pi(x.content);if(d===Kn.html_inline&&v+1<e.length&&e[v+1].type==="html_inline"){for(A+=M+e[++v].content;v+1<e.length&&e[v+1].type==="html_inline";)A+=e[++v].content;continue}A+=M;continue}break;case"text_special":if(a===Kn.text_special){x.content.length!==0&&(A+=pi(x.content));continue}break;case"softbreak":if(u===Kn.softbreak){A+=r;continue}break;case"hardbreak":if(c===Kn.hardbreak){A+=o;continue}break;case"html_inline":if(d===Kn.html_inline){for(A+=x.content;v+1<e.length&&e[v+1].type==="html_inline";)A+=e[++v].content;continue}break;case"code_inline":if(f===Kn.code_inline){A+=ep(x);continue}break}const E=i[x.type];if(!E){A+=x.block?this.renderToken(e,v,t):Om(x,s);continue}const S=E(e,v,t,n,this);typeof S=="string"?A+=S:A+=Lg(S,x.type)}return A}async renderInlineTokensAsync(e,t,n){if(!e||e.length===0)return"";const i=this.rules;let s="";for(let o=0;o<e.length;o++){const r=i[e[o].type];r?s+=await jw(r(e,o,t,n,this)):s+=this.renderToken(e,o,t)}return s}renderInlineAsTextInternal(e,t,n){if(!e||e.length===0)return"";let i="";for(let s=0;s<e.length;s++){const o=e[s];switch(o.type){case"text":case"text_special":i+=o.content;break;case"image":i+=this.renderInlineAsTextInternal(o.children||[],t,n);break;case"html_inline":case"html_block":i+=o.content;break;case"softbreak":case"hardbreak":i+=` -`;break}}return i}},aue=lue;const uue=[],wy=4096;function cue(e){const t=e.length;let n=0;for(;n<=t;){let i=e.indexOf(` -`,n);i===-1&&(i=t);const s=i<t;let o=n,r=0;for(;o<i;){const l=e.charCodeAt(o);if(l===32){if(r++,o++,r>=4)return!0;continue}if(l===9){if(r+=4-r%4,o++,r>=4)return!0;continue}break}if(o<i){const l=e.charCodeAt(o);switch(l){case 35:{let a=o;for(;a<i&&e.charCodeAt(a)===35;)a++;const u=a-o;if(u>0&&u<=6){if(a<i){const c=e.charCodeAt(a);if(c===32||c===9||c===13)return!0}else if(a===i&&s)return!0}break}case 62:{const a=o+1;if(a<i){const u=e.charCodeAt(a);if(u===32||u===9||u===13)return!0}else if(a===i&&s)return!0;break}case 45:case 42:case 43:{const a=o+1;if(a<i){const u=e.charCodeAt(a);if(u===32||u===9||u===13)return!0}else if(a===i&&s)return!0;break}case 96:case 126:{let a=o;for(;a<i&&e.charCodeAt(a)===l;)a++;if(a-o>=3)return!0;break}default:if(l>=48&&l<=57){let a=o+1;for(;a<i;){const u=e.charCodeAt(a);if(u<48||u>57)break;a++}if(a<i&&e.charCodeAt(a)===46){const u=a+1;if(u<i){const c=e.charCodeAt(u);if(c===32||c===9||c===13)return!0}else if(u===i&&s)return!0}}break}}if(i===t)break;n=i+1}return!1}function due(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n][0]!==t[n][0]||e[n][1]!==t[n][1])return!1;return!0}function fue(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!qN(e[n],t[n]))return!1;return!0}function qN(e,t){if(!e||!t||e.type!==t.type)return!1;const n=e.map,i=t.map;return!!n!=!!i||n&&i&&(n[0]!==i[0]||n[1]!==i[1])||e.tag!==t.tag||e.nesting!==t.nesting||e.markup!==t.markup||e.info!==t.info||e.block!==t.block||e.hidden!==t.hidden||!due(e.attrs,t.attrs)||!fue(e.children,t.children)?!1:(e.content||"")===(t.content||"")}function Uw(){return{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}}var hue=class{core;cache=null;stats=Uw();MIN_SIZE_FOR_OPTIMIZATION=1e3;DEFAULT_SKIP_CACHE_CHARS=1e6;DEFAULT_SKIP_CACHE_LINES=1e5;IMPLICIT_STREAM_CHUNK_MIN_CHARS=16e4;MIN_LIST_LINES_FOR_MERGE=80;MIN_LIST_CHARS_FOR_MERGE=800;MIN_TABLE_LINES_FOR_MERGE=48;MIN_TABLE_CHARS_FOR_MERGE=1200;MIN_UNBOUNDED_APPEND_TOTAL_CHARS=5e5;MIN_UNBOUNDED_APPEND_CHARS=64e3;MIN_UNBOUNDED_APPEND_LINES=700;constructor(e){this.core=e}reset(){this.cache=null,this.stats.resets+=1,this.stats.lastMode="reset"}resetStats(){const{resets:e}=this.stats;this.stats=Uw(),this.stats.resets=e}parse(e,t,n){const i=t,s=this.cache;if(Lo(i??s?.env),!s||i&&i!==s.env){const $=i??{},P=!!n.__explicitStreamChunkFallbackSetting,O=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,R=!!n.options?.streamChunkedFallback,W=!P&&O,z=R||W,G=n.options?.streamChunkAdaptive!==!1,K=n.options?.streamChunkTargetChunks??8,H=n.options?.streamChunkSizeChars,q=n.options?.streamChunkSizeLines,X=n.options?.streamChunkMaxChunks,ee=!!n.__explicitStreamChunkConfig,ue=n.options?.autoTuneChunks!==!1,ie=n.options?.streamChunkFenceAware??!0,xe=n.options?.streamLargeCachePolicy??"retain",ce=n.options?.streamSkipCacheAboveChars??this.DEFAULT_SKIP_CACHE_CHARS,pe=n.options?.streamSkipCacheAboveLines??this.DEFAULT_SKIP_CACHE_LINES;let Ne,te=!1;if(xe==="skip"&&(te=e.length>=ce,!te&&pe!==void 0&&(Ne=es(e),te=Ne>=pe)),te){const j=this.parseFullDocument(e,$,n,Ne,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ps($,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!ua($)?.unbounded}),j.tokens}else if(z){const j=(de,me,Ie)=>de<me?me:de>Ie?Ie:de;Ne===void 0&&(Ne=es(e));const Y=ue&&!ee?Pw(e.length,Ne,n.options):null,ve=Y?.maxChunkChars??(G?j(Math.ceil(e.length/K),8e3,64e3):H??1e4),re=Y?.maxChunkLines??(G?j(Math.ceil(Ne/K),150,700):q??200),se=Y?.maxChunks??(G?j(Math.ceil(e.length/64e3),K,32):X),U=e.length>0&&e.charCodeAt(e.length-1)===10,J=W&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&Y?.strategy!=="plain";if((R||J)&&(e.length>=ve*2||Ne>=re*2)&&U){const de=zm(n,e,$,{maxChunkChars:ve,maxChunkLines:re,fenceAware:Y?.fenceAware??ie,maxChunks:se});return this.cache={src:e,tokens:de,env:$,lineCount:Ne,lastSegment:void 0,globalStateReason:Qo(e)},this.updateCacheLineCount(this.cache,Ne),this.recordChunkedParseResult($,R?"explicit-initial-large-doc":"default-initial-large-doc"),de}}const ye=this.parseFullDocument(e,$,n,Ne);return Ne=ye.lineCount,this.cache={src:e,tokens:ye.tokens,env:$,lineCount:Ne,lastSegment:void 0,globalStateReason:Qo(e)},this.updateCacheLineCount(this.cache,Ne),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ps($,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!ua($)?.unbounded}),ye.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",ps(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const o=e.startsWith(s.src)?e.slice(s.src.length):null;let r=s.globalStateReason;r===void 0&&(r=Qo(s.src),s.globalStateReason=r);const l=r?null:o!==null?this.detectGlobalStateForAppend(s,o):Qo(e),a=r||l;if(a){const $=i??s.env;Ea($);const P=Qo(e),O=this.parseFullDocument(e,$,n),R=O.tokens,W=O.lineCount;return this.cache={src:e,tokens:R,env:$,lineCount:W,lastSegment:void 0,globalStateReason:P},this.updateCacheLineCount(this.cache,W),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ps($,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!ua($)?.unbounded}),R}const u=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length<u&&e.length<u*1.5&&!e.startsWith(s.src)){const $=i??s.env,P=this.parseFullDocument(e,$,n),O=P.tokens,R=P.lineCount;return this.cache={src:e,tokens:O,env:$,lineCount:R,lastSegment:void 0,globalStateReason:Qo(e)},this.updateCacheLineCount(this.cache,R),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ps($,{area:"stream",path:"stream-full",reason:"small-non-append",unbounded:!!ua($)?.unbounded}),O}const c=this.getAppendedSegment(s.src,e,o);if(c&&!this.shouldPreferTailReparseForAppend(s)){const $=s.lineCount??es(s.src);let P=3;c.length>5e3?P=8:c.length>1e3?P=6:c.length>200&&(P=4),P=Math.min(P,$);let O=null;const R=n.options?.streamContextParseStrategy??"chars",W=n.options?.streamContextParseMinChars??200,z=n.options?.streamContextParseMinLines??2;let G;const K=()=>(G===void 0&&(G=es(c)),G),H=this.canDirectlyParseAppend(s),q=H&&this.shouldUseUnboundedAppend(e,s,c);let X=!1;if(!H)switch(R){case"lines":X=K()>=z;break;case"constructs":if(c.length>=W){X=!0;break}if(cue(c)){X=!0;break}X=K()>=z;break;case"chars":default:X=c.length>=W}if(P>0&&X){const ie=this.getTailLines(s.src,P)+c;try{const xe=this.core.parse(ie,s.env,n).tokens,ce=xe.findIndex(pe=>pe.map&&typeof pe.map[1]=="number"&&pe.map[1]>P);if(ce!==-1){const pe=xe.slice(ce),Ne=$-P;Ne!==0&&this.shiftTokenLines(pe,Ne),O={tokens:pe}}}catch{O=null}}else O=null;if(!O){const ie=$;if(q)O={tokens:h1(n,c,s.env,{mode:"stream"})},ie>0&&this.shiftTokenLines(O.tokens,ie);else{const xe=this.core.parse(c,s.env,n);ie>0&&this.shiftTokenLines(xe.tokens,ie),O=xe}}let ee=0;if(s.tokens.length>0&&O.tokens.length>0){const ie=s.tokens[s.tokens.length-1],xe=O.tokens[0];try{ie.type==="inline"&&xe.type==="inline"&&(xe.children&&xe.children.length>0&&(ie.children||(ie.children=[]),this.appendTokens(ie.children,xe.children)),ie.content=(ie.content||"")+(xe.content||""),ee=1)}catch{ee=0}}const ue=s.tokens.length;if(O.tokens.length>ee){const ie=s.tokens,xe=O.tokens,ce=Math.min(ie.length,xe.length-ee);let pe=0;for(let Ne=ce;Ne>0;Ne--){let te=!0;for(let ye=0;ye<Ne;ye++){const j=ie[ie.length-Ne+ye],Y=xe[ee+ye];if(!qN(j,Y)){te=!1;break}}if(te){pe=Ne;break}}pe>0&&(ee+=pe),xe.length>ee&&this.appendTokens(s.tokens,xe,ee)}if(s.src=e,s.globalStateReason=null,s.lineCount=$+(G??K()),s.tokens.length>ue){const ie=this.getLastSegment(s.tokens,e,ue,s.tokens.length,e.length-c.length,$);ie?s.lastSegment=ie:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,q&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",ps(s.env,{area:"stream",path:q?"stream-unbounded-append":"stream-append",reason:q?"large-delta":"safe-append",unbounded:q}),s.tokens}const d=i??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",ps(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const p=!!n.__explicitStreamChunkFallbackSetting,g=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,y=!p&&!c&&g,w=m||y,k=n.options?.streamChunkAdaptive!==!1,A=n.options?.streamChunkTargetChunks??8,v=n.options?.streamChunkSizeChars,x=n.options?.streamChunkSizeLines,E=n.options?.streamChunkMaxChunks,S=!!n.__explicitStreamChunkConfig,M=n.options?.autoTuneChunks!==!1,_=n.options?.streamChunkFenceAware??!0;let N=c&&s.lineCount!==void 0?s.lineCount+es(c):void 0;if(w){N===void 0&&(N=es(e));const $=(K,H,q)=>K<H?H:K>q?q:K,P=M&&!S?Pw(e.length,N,n.options):null,O=P?.maxChunkChars??(k?$(Math.ceil(e.length/A),8e3,64e3):v??1e4),R=P?.maxChunkLines??(k?$(Math.ceil(N/A),150,700):x??200),W=P?.maxChunks??(k?$(Math.ceil(e.length/64e3),A,32):E),z=e.length>0&&e.charCodeAt(e.length-1)===10,G=y&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&P?.strategy!=="plain";if((m||G)&&(e.length>=O*2||N>=R*2)&&z){const K=zm(n,e,d,{maxChunkChars:O,maxChunkLines:R,fenceAware:P?.fenceAware??_,maxChunks:W});return this.cache={src:e,tokens:K,env:d,lineCount:N,lastSegment:void 0,globalStateReason:Qo(e)},this.updateCacheLineCount(this.cache,N),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),K}}const D=this.parseFullDocument(e,d,n,N),T=D.tokens;return N=D.lineCount,this.cache={src:e,tokens:T,env:d,lineCount:N,lastSegment:void 0,globalStateReason:Qo(e)},this.updateCacheLineCount(this.cache,N),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",ps(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!ua(d)?.unbounded}),T}recordChunkedParseResult(e,t){const n=ua(e)?.chunk,i=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,i){this.stats.fullParses+=1,this.stats.lastMode="full",ps(e,{area:"stream",path:"stream-full",reason:`global-state:${i}`,unbounded:!!ua(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",ps(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,i,s=!0){const o=Qo(e);wp(t)&&Ea(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?PN(n,e.length,i):"no";if(r==="yes"){const a=h1(n,e,t);return ps(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:i??(s?es(e):0)}}let l=i;if(r==="need-lines"&&(l=es(e),ON(n,e.length,l))){const a=h1(n,e,t);return ps(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?es(e):0),{tokens:ff(t,o,()=>this.core.parse(e,t,n).tokens),lineCount:l}}shouldUseUnboundedAppend(e,t,n){return!n||e.length<this.MIN_UNBOUNDED_APPEND_TOTAL_CHARS&&n.length<this.MIN_UNBOUNDED_APPEND_CHARS?!1:n.length>=this.MIN_UNBOUNDED_APPEND_CHARS?!0:es(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` -`))return null;const i=n??t.slice(e.length);if(!i)return null;const s=i.length;if(i.charCodeAt(s-1)!==10)return null;let o=0,r=-1;for(let a=0;a<s&&!(i.charCodeAt(a)===10&&(r===-1&&(r=a),o++,o>=2));a++);if(o<2)return null;const l=(r===-1?i:i.slice(0,r)).trim();if(l.length===0)return null;if(/^[-=]+$/.test(l)){const a=e.slice(0,-1),u=a.lastIndexOf(` -`);if(a.slice(u+1).trim().length>0)return null}return this.endsInsideOpenFence(e)||this.mayContainReferenceDefinition(i)?null:i}tryTailSegmentReparse(e,t,n,i){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const o=t.src.slice(0,s.srcOffset);if(!e.startsWith(o))return null;const r=t.src.slice(s.srcOffset),l=e.slice(s.srcOffset);if(l===r)return null;const a=e.startsWith(t.src)?e.slice(t.src.length):null;if(a){const u=this.tryContainerTailAppendMerge(e,t,n,i,s,a);if(u)return u}if(this.mayContainReferenceDefinition(r)||this.mayContainReferenceDefinition(l))return null;try{const u=this.core.parse(l,n,i),c=this.getLastSegment(u.tokens,l);return s.lineStart>0&&this.shiftTokenLines(u.tokens,s.lineStart),t.src=e,t.env=n,t.globalStateReason=null,t.globalStateCarry=void 0,t.tokens.length=s.tokenStart,this.appendTokens(t.tokens,u.tokens),t.lineCount=s.lineStart+es(l),c?t.lastSegment={tokenStart:s.tokenStart+c.tokenStart,tokenEnd:s.tokenStart+c.tokenEnd,lineStart:s.lineStart+c.lineStart,lineEnd:s.lineStart+c.lineEnd,srcOffset:s.srcOffset+c.srcOffset}:t.lastSegment=null,t.tokens}catch{return null}}getTailLines(e,t){if(t<=0)return"";let n=t;for(let i=e.length-1;i>=0;i--)if(e.charCodeAt(i)===10&&(n--,n===0))return e.slice(i+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,i=e.slice(n),s=i.length;let o=null,r=0;for(;r<=s;){let l=i.indexOf(` -`,r);l===-1&&(l=s);let a=r;for(;a<l;){const u=i.charCodeAt(a);if(u===32||u===9)a++;else break}if(a<l){const u=i.charCodeAt(a);if(u===96||u===126){let c=a;for(;c<l&&i.charCodeAt(c)===u;)c++;const d=c-a;d>=3&&(o?o.marker===u&&d>=o.length&&(o=null):o={marker:u,length:d})}}if(l===s)break;r=l+1}return o!==null}peek(){return this.cache?.tokens??uue}getStats(){return{...this.stats}}appendTokens(e,t,n=0,i=t.length){for(let s=n;s<i;s++)e.push(t[s])}updateCacheLineCount(e,t){e.lineCount=t??es(e.src),e.lastSegment=void 0,e.globalStateCarry=void 0}detectGlobalStateForAppend(e,t){if(e.globalStateReason)return e.globalStateReason;const n=(e.globalStateCarry??e.src.slice(-wy))+t,i=Qo(n);return e.globalStateCarry=n.length>wy?n.slice(n.length-wy):n,i&&(e.globalStateReason=i),i}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,i=e.length,s,o){if(i<=n)return null;let r=Number.POSITIVE_INFINITY,l=-1,a=0;for(let u=i-1;u>=n;u--){const c=e[u];if(c.map&&(c.map[0]<r&&(r=c.map[0]),c.map[1]>l&&(l=c.map[1])),c.nesting<0){a+=-c.nesting;continue}if(c.nesting>0){if(a-=c.nesting,c.level===0&&a<=0){const d=Number.isFinite(r)?r:c.map?.[0]??0,f=l>=d?l:c.map?.[1]??d;return{tokenStart:u,tokenEnd:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}continue}if(c.level===0&&a===0){const d=Number.isFinite(r)?r:c.map?.[0]??0,f=l>=d?l:c.map?.[1]??d;return{tokenStart:u,tokenEnd:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}}return null}getLineStartOffset(e,t,n,i){if(n!==void 0&&i!==void 0&&t>=i)return this.getLineStartOffsetFrom(e,n,t-i);if(t<=0)return 0;let s=t,o=-1;for(;s>0;){if(o=e.indexOf(` -`,o+1),o===-1)return e.length;s--}return o+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let i=n,s=t-1;for(;i>0;){if(s=e.indexOf(` -`,s+1),s===-1)return e.length;i--}return s+1}mayContainReferenceDefinition(e){return e.includes("]:")?/(?:^|\n)[ \t]{0,3}\[[^\]\n]+\]:/.test(e):!1}canDirectlyParseAppend(e){if(!this.endsWithBlankLine(e.src))return!1;const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"paragraph_open":case"heading_open":case"fence":case"code_block":case"html_block":case"hr":case"table_open":return!0;default:return!1}}tryContainerTailAppendMerge(e,t,n,i,s,o){if(!o||this.mayContainReferenceDefinition(o))return null;const r=t.tokens[s.tokenStart];switch(r?.type){case"bullet_list_open":case"ordered_list_open":return this.tryListTailAppendMerge(e,t,n,i,s,o,r);case"table_open":return this.tryTableTailAppendMerge(e,t,n,i,s,o,r);default:return null}}tryListTailAppendMerge(e,t,n,i,s,o,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10)return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l<this.MIN_LIST_LINES_FOR_MERGE&&a<this.MIN_LIST_CHARS_FOR_MERGE)return null;const u=r.type==="bullet_list_open"?"bullet_list_close":"ordered_list_close";let c;try{c=this.core.parse(o,n,i).tokens}catch{return null}if(!this.isSingleTopLevelContainer(c,r.type,u,r.markup))return null;const d=c.slice(1,-1);if(d.length===0)return null;const f=t.lineCount??es(t.src);f>0&&this.shiftTokenLines(d,f);const p=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,r.level),g=this.getListParagraphMode(c,0,c.length,0);(p==="loose"||g==="loose"||this.endsWithBlankLine(t.src)||(c[0]?.map?.[0]??0)>0)&&(this.setListParagraphVisibility(t.tokens,s.tokenStart,t.tokens.length,r.level,!1),this.setListParagraphVisibility(d,0,d.length,r.level,!1)),t.tokens.splice(t.tokens.length-1,0,...d),t.src=e,t.env=n,t.globalStateReason=null;const m=f+es(o);t.lineCount=m;const y=this.getDocLineCount(e,m);return r.map&&(r.map[1]=y),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:y,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,i,s,o,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(o))return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l<this.MIN_TABLE_LINES_FOR_MERGE&&a<this.MIN_TABLE_CHARS_FOR_MERGE)return null;const u=this.getTableHeaderContext(t.src.slice(s.srcOffset));if(!u)return null;const c=`${u}${o}`;let d;try{d=this.core.parse(c,n,i).tokens}catch{return null}if(!this.isSingleTopLevelContainer(d,"table_open","table_close")||(d[0]?.map?.[1]??-1)!==this.getDocLineCount(c))return null;const f=this.getTableBodySection(d,0,d.length,0),p=this.getTableBodySection(t.tokens,s.tokenStart,t.tokens.length,r.level);if(!f||!p||f.tbodyOpenIndex<0||f.tbodyCloseIndex<0)return null;const g=p.tbodyOpenIndex>=0?d.slice(f.tbodyOpenIndex+1,f.tbodyCloseIndex):d.slice(f.tbodyOpenIndex,f.tbodyCloseIndex+1);if(g.length===0)return null;const m=s.lineEnd-2;m!==0&&this.shiftTokenLines(g,m);const y=p.tbodyCloseIndex>=0?p.tbodyCloseIndex:p.tableCloseIndex,w=t.lineCount??es(t.src);t.tokens.splice(y,0,...g),t.src=e,t.env=n,t.globalStateReason=null;const k=w+es(o);t.lineCount=k;const A=this.getDocLineCount(e,k);if(r.map&&(r.map[1]=A),p.tbodyOpenIndex>=0){const v=t.tokens[p.tbodyOpenIndex];v?.map&&(v.map[1]=A)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:A,srcOffset:s.srcOffset},t.tokens}getTableHeaderContext(e){const t=e.indexOf(` -`);if(t<0)return null;const n=e.indexOf(` -`,t+1);return n<0?null:e.slice(0,n+1)}getTableBodySection(e,t,n,i){if(t<0||t>=n||e[t]?.type!=="table_open")return null;let s=-1;for(let l=n-1;l>t;l--){const a=e[l];if(a.type==="table_close"&&a.level===i){s=l;break}}if(s<0)return null;let o=-1,r=-1;for(let l=t+1;l<s;l++){const a=e[l];if(a.type==="tbody_open"&&a.level===i+1){o=l;break}}if(o>=0){for(let l=s-1;l>o;l--){const a=e[l];if(a.type==="tbody_close"&&a.level===i+1){r=l;break}}if(r<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:o,tbodyCloseIndex:r}}isSingleTopLevelContainer(e,t,n,i){if(e.length<2)return!1;const s=e[0],o=e[e.length-1];if(s.type!==t||o.type!==n||s.level!==0||o.level!==0||i!==void 0&&s.markup!==i)return!1;let r=0;for(let l=0;l<e.length;l++){const a=e[l];if(a.level===0&&l>0&&l<e.length-1&&r===0)return!1;(a.nesting>0||a.nesting<0)&&(r+=a.nesting)}return r===0}getListParagraphMode(e,t,n,i){let s=!1,o=!1;const r=i+2;for(let l=t;l<n;l++){const a=e[l];if(!(a.type!=="paragraph_open"||a.level!==r)&&(a.hidden?s=!0:o=!0,s&&o))return"loose"}return o?"loose":s?"tight":"none"}setListParagraphVisibility(e,t,n,i,s){const o=i+2;for(let r=t;r<n;r++){const l=e[r];(l.type==="paragraph_open"||l.type==="paragraph_close")&&l.level===o&&(l.hidden=s)}}shouldPreferTailReparseForAppend(e){const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"bullet_list_open":case"ordered_list_open":case"blockquote_open":case"table_open":return!0;case"paragraph_open":case"code_block":case"html_block":return!this.endsWithBlankLine(e.src);default:return!1}}endsWithBlankLine(e){const t=e.length;if(t<2||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0;){const i=e.charCodeAt(n);if(i===32||i===9){n--;continue}return i===10}return!0}getDocLineCount(e,t=es(e)){return e.length===0?0:e.charCodeAt(e.length-1)===10?t:t+1}shiftTokenLines(e,t){if(t===0)return;let n=null;for(let i=0;i<e.length;i++){const s=e[i];if(s.map&&(s.map[0]+=t,s.map[1]+=t),s.children){n??=[];for(let o=s.children.length-1;o>=0;o--)n.push(s.children[o]);for(;n.length>0;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let r=o.children.length-1;r>=0;r--)n.push(o.children[r])}}}}};const Kw={default:tue,zero:nue,commonmark:eue};function pue(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function gue(e,t){return e.core.ruler.version!==t.core||e.block.ruler.version!==t.block||e.inline.ruler.version!==t.inline||e.inline.ruler2.version!==t.inline2}function Vw(e){return e.experimental?{...e,...e.experimental}:e}function $r(e,t){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0)return!0;const n=e.experimental;return!!n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0}function Zw(e,t,n){for(let i=0;i<n.length;i++){const s=n[i];if($r(t,s)||$r(e,s))return!0}return!1}function Gw(e,t,n){return $r(t,n)||$r(e,n)}function Qw(e,t){const n=ua(e)?.chunk;if(n?.fallback){ps(e,{area:"parse",path:"plain",reason:`global-state:${n.fallbackReason||"unknown"}`});return}ps(e,{area:"parse",path:"full-chunk",chunked:!0,reason:t})}function Ld(){return typeof performance<"u"?performance.now():Date.now()}function mue(e,t){let n={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100,stream:!1,streamOptimizationMinSize:1e3,streamChunkedFallback:!1,streamChunkSizeChars:1e4,streamChunkSizeLines:200,streamChunkFenceAware:!0,streamChunkAdaptive:!0,streamChunkTargetChunks:8,streamChunkMaxChunks:void 0,streamLargeCachePolicy:"retain",streamSkipCacheAboveChars:1e6,streamSkipCacheAboveLines:1e5,fullChunkedFallback:!1,fullChunkThresholdChars:2e4,fullChunkThresholdLines:400,fullChunkSizeChars:1e4,fullChunkSizeLines:200,fullChunkFenceAware:!0,fullChunkAdaptive:!0,fullChunkTargetChunks:8,fullChunkMaxChunks:void 0,autoTuneChunks:!0,autoUnbounded:!0,autoUnboundedThresholdChars:4e6,autoUnboundedThresholdLines:8e4},i="default",s;!t&&typeof e!="string"?(s=e,i="default"):typeof e=="string"&&(i=e,s=t);const o=Kw[i];if(!o)throw new Error(`Wrong \`markdown-it\` preset "${i}", check name`);if(o?.options&&(n={...n,...o.options}),s&&(n={...n,...s}),n=Vw(n),typeof n.quotes=="string"){const M=n.quotes;M.length>=4?n.quotes=[M[0],M[1],M[2],M[3]]:n.quotes=["“","”","‘","’"]}let r=Zw(o?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=Zw(o?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=Gw(o?.options,s,"fullChunkedFallback"),u=Gw(o?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const p=new oae;let g=null;const m=()=>(g||(g=new aue(n)),g);let y=null;const w=()=>(y||(y=new hue(p)),y);let k=null;const A=()=>(k||(k=new QL({fuzzyLink:!0})),k),v=M=>!c&&!!d&&!gue(M,d),x=(M,_)=>i==="default"&&!c&&g===null&&f!==null&&M.parse===f&&v(M)&&!M.stream.enabled&&_<(M.options.autoUnboundedThresholdChars??4e6)&&M.options.html===!1&&M.options.xhtmlOut===!1&&M.options.breaks===!1&&M.options.langPrefix==="language-"&&M.options.linkify===!1&&M.options.typographer===!1&&M.options.highlight===null,E=(M,_)=>i==="default"&&!c&&v(M)&&!M.stream.enabled&&!M.options.fullChunkedFallback&&_<(M.options.autoUnboundedThresholdChars??4e6)&&M.options.html===!1&&M.options.linkify===!1&&M.options.typographer===!1,S={core:p,block:p.block,inline:p.inline,get linkify(){const M=A();return Object.defineProperty(this,"linkify",{value:M,writable:!0,configurable:!0}),M},get renderer(){const M=m();return Object.defineProperty(this,"renderer",{value:M,writable:!0,configurable:!0}),M},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return v(this)},set(M){const _=Vw(M);return this.options={...this.options,..._},($r(M,"fullChunkSizeChars")||$r(M,"fullChunkSizeLines")||$r(M,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),($r(M,"streamChunkSizeChars")||$r(M,"streamChunkSizeLines")||$r(M,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),$r(M,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),$r(M,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),g&&g.set(_),typeof _.stream=="boolean"&&(this.stream.enabled=_.stream,y&&(y.reset(),y.resetStats())),this},configure(M){const _=typeof M=="string"?Kw[M]:M;if(!_)throw new Error("Wrong `markdown-it` preset, can't be empty");if(_.options&&this.set(_.options),_.components){const N=_.components;N.core?.rules&&this.core.ruler.enableOnly(N.core.rules),N.block?.rules&&this.block.ruler.enableOnly(N.block.rules),N.inline?.rules&&this.inline.ruler.enableOnly(N.inline.rules),N.inline2?.rules&&this.inline.ruler2.enableOnly(N.inline2.rules)}return this},enable(M,_){const N=Array.isArray(M)?M:[M],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const $ of D){if(!$)continue;const P=$.enable(N,!0);for(let O=0;O<P.length;O++)T.add(P[O])}if(!_){const $=N.filter(P=>!T.has(P));if($.length)throw new Error(`Rules manager: invalid rule name ${$.join(", ")}`)}return this},disable(M,_){const N=Array.isArray(M)?M:[M],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const $ of D){if(!$)continue;const P=$.disable(N,!0);for(let O=0;O<P.length;O++)T.add(P[O])}if(!_){const $=N.filter(P=>!T.has(P));if($.length)throw new Error(`Rules manager: invalid rule name ${$.join(", ")}`)}return this},use(M,..._){const N=typeof M=="function"?M:M&&typeof M.default=="function"?M.default:void 0;if(!N)throw new TypeError("MarkdownIt.use: plugin must be a function");const D=[this,..._],T=M;return c=!0,N.apply(T,D),this},render(M,_){let N;if(x(this,M.length)){_!==void 0&&(Lo(_),N=dy("render"));const $=N?Ld():0,P=N?Rw(M,N):Dw(M);if(N&&(N.attemptMs=Ld()-$,P===null&&(N.fallbackReason="unsupported-stock-subset"),Sh(_,N)),P!==null)return _!==void 0&&ps(_,{area:"render",path:"stock-fast",reason:"stock-subset"}),P}const D=_??{},T=this.parse(M,D);return N&&Sh(D,N),m().render(T,this.options,D)},async renderAsync(M,_){let N;if(x(this,M.length)){_!==void 0&&(Lo(_),N=dy("render"));const $=N?Ld():0,P=N?Rw(M,N):Dw(M);if(N&&(N.attemptMs=Ld()-$,P===null&&(N.fallbackReason="unsupported-stock-subset"),Sh(_,N)),P!==null)return _!==void 0&&ps(_,{area:"render",path:"stock-fast",reason:"stock-subset"}),P}const D=_??{},T=this.parse(M,D);return N&&Sh(D,N),m().renderAsync(T,this.options,D)},renderIterable(M,_={}){const N=this.parseIterable(M,_);return m().render(N,this.options,_)},async renderAsyncIterable(M,_={}){const N=await this.parseAsyncIterable(M,_);return m().renderAsync(N,this.options,_)},renderInline(M,_={}){const N=this.parseInline(M,_);return m().render(N,this.options,_)},validateLink:SN,normalizeLink:MN,normalizeLinkText:IN,utils:$oe,helpers:{...wre},parse(M,_){if(typeof M!="string")throw new TypeError("Input data should be a String");if(_!==void 0&&Lo(_),E(this,M.length)){const $=_===void 0?void 0:dy("parse"),P=$?Ld():0,O=vae(M,$);if($&&($.attemptMs=Ld()-P,O===null&&($.fallbackReason="unsupported-stock-subset"),Sh(_,$)),O!==null)return _!==void 0&&ps(_,{area:"parse",path:"stock-fast",reason:"stock-subset"}),O}const N=_??{};let D;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&v(this)){const $=PN(this,M.length);if($==="yes"){const P=h1(this,M,N);return ps(_,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),P}$==="need-lines"&&(D=es(M))}if(!this.stream.enabled){const $=M.length,P=this.options.autoTuneChunks!==!1,O=r,R=!a&&v(this),W=!!this.options.fullChunkedFallback,z=R&&$>=2e5;let G;(W||z||D!==void 0)&&(G=D??es(M));const K=(W||z)&&P&&!O?Xae($,G,this.options):null;if(W||z){const H=G??0;if(W?$>=(this.options.fullChunkThresholdChars??2e4)||H>=(this.options.fullChunkThresholdLines??400):z){if(K&&K.strategy!=="plain"){const q=zm(this,M,N,{maxChunkChars:K.maxChunkChars,maxChunkLines:K.maxChunkLines,fenceAware:K.fenceAware,maxChunks:K.maxChunks});return _&&Qw(_,W?"explicit-full-chunk":"default-large-string"),q}if(W){const q=(te,ye,j)=>te<ye?ye:te>j?j:te,X=this.options.fullChunkAdaptive!==!1,ee=this.options.fullChunkTargetChunks??8,ue=q(Math.ceil($/ee),8e3,64e3),ie=q(Math.ceil(H/ee),150,700),xe=X?ue:this.options.fullChunkSizeChars??1e4,ce=X?ie:this.options.fullChunkSizeLines??200,pe=X?q(Math.ceil($/64e3),ee,32):this.options.fullChunkMaxChunks,Ne=zm(this,M,N,{maxChunkChars:xe,maxChunkLines:ce,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:pe});return _&&Qw(_,"explicit-full-chunk"),Ne}}}if(D!==void 0&&v(this)&&ON(this,$,G??D)){const H=h1(this,M,N);return ps(_,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),H}}const T=Qo(M);return ps(_,{area:"parse",path:"plain",reason:"default-plain"}),ff(N,T,()=>p.parse(M,N,this).tokens)},parseIterable(M,_={}){return Lo(_),Gae(this,M,_)},parseAsyncIterable(M,_={}){return Lo(_),Qae(this,M,_)},parseIterableToSink(M,_,N={}){return Lo(N),Yae(this,M,_,N)},parseAsyncIterableToSink(M,_,N={}){return Lo(N),Jae(this,M,_,N)},parseInline(M,_={}){if(typeof M!="string")throw new TypeError("Input data should be a String");Lo(_),wp(_)&&Ea(_);const N=p.createState(M,_,this);return N.inlineMode=!0,p.process(N),N.tokens}};if(S.stream={enabled:!!n.stream,parse(M,_){return S.stream.enabled?w().parse(M,_,S):S.parse(M,_??{})},reset(){w().reset()},peek(){return y?y.peek():[]},stats(){return y?y.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){y&&y.resetStats()}},o?.components){const M=o.components;M.core?.rules&&S.core.ruler.enableOnly(M.core.rules),M.block?.rules&&S.block.ruler.enableOnly(M.block.rules),M.inline?.rules&&S.inline.ruler.enableOnly(M.inline.rules),M.inline2?.rules&&S.inline.ruler2.enableOnly(M.inline2.rules)}return d=pue(S),f=S.parse,S}var vue=mue;const UN=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],yue=["a","abbr","b","bdi","bdo","button","cite","code","data","del","dfn","em","font","i","ins","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var"],KN=["article","aside","blockquote","details","div","figcaption","figure","footer","header","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","tbody","td","th","thead","tr","ul"],bue=["svg","g","path"],kue=["address","audio","body","canvas","caption","colgroup","datalist","dd","dialog","dl","dt","fieldset","form","head","hgroup","html","iframe","legend","map","menu","meter","noscript","object","optgroup","option","output","picture","progress","rp","rt","ruby","script","select","style","template","textarea","tfoot","title","video"],Aue=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onsearch","innerhtml","outerhtml","textcontent","innertext","srcdoc","ping"],Cue=["action","data","href","src","srcset","poster","xlink:href","formaction"],wue=["script"],xue=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],Su=new Set(UN),VN=new Set(KN),tp=new Set([...UN,...yue,...KN,...bue]),ZN=new Set([...tp,...kue]),_ue=new Set(Aue),Sue=new Set(Cue),Sp=new Set(wue),GN=new Set(xue);function QN(e){let t="";for(const n of e){const i=n.charCodeAt(0);i<=31||i>=127&&i<=159||/\s/u.test(n)||(t+=n)}return t}const Mue={amp:"&",bsol:"\\",colon:":",newline:` -`,sol:"/",tab:" "};function YN(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,i,s)=>{const o=n??i;if(o){const r=Number.parseInt(o,n?10:16);try{return Number.isFinite(r)?String.fromCodePoint(r):""}catch{return""}}return Mue[String(s??"").toLowerCase()]??t})}const K0=new Set(["http","https","mailto","tel"]),Iue=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),ac=new Set(["http","https"]);function JN(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const Eue=/^https?:\/\//i;function Tue(e){if(!Eue.test(e))return!1;for(const t of e){const n=t.charCodeAt(0);if(t==="&"||n<=32||n>=127&&n<=159||n>127&&/\s/u.test(t))return!1}return!0}function Lue(e,t,n){if(!m1(t,n)||!e.startsWith("file:///"))return!1;const i=e.charAt(8);return i!=="/"&&i!=="\\"}function m1(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function Nue(e,t){return t==="href"||t==="xlink:href"?m1(e,t)?K0:ac:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?ac:(m1(e,t),K0)}function Rc(e,t={}){if(Tue(e))return!1;const n=QN(YN(e)).toLowerCase(),i=String(t.tagName??"").toLowerCase(),s=String(t.attrName??"").toLowerCase();if(!n)return!1;if(n.startsWith("data:")){const r=/^data:image\/(?:png|gif|jpe?g|webp|avif|bmp);/i.test(n);return i==="img"&&s==="src"?!r:!0}if(/^[\\/]{2}/.test(n))return!0;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||n.startsWith("#")||n.startsWith("?"))return!1;const o=JN(n);return o?o==="file"?!Lue(n,i,s):m1(i,s)?Iue.has(o):!Nue(i,s).has(o):!1}function Fue(e){const t=YN(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=JN(QN(t).toLowerCase());return n==="http"||n==="https"}function Bue(e,t={}){const n=String(e??"").trim();return n?Rc(n,t)?"":n:""}function Yw(e){return Bue(e,{tagName:"img",attrName:"src"})}function $ue(e,t,n){function i(f){return f.trim().split(" ",2)[0]===t}function s(f,p,g,m,y){return f[p].nesting===1&&f[p].attrJoin("class",t),y.renderToken(f,p,g,m,y)}n=n||{};const o=3,r=n.marker||":",l=r.charCodeAt(0),a=r.length,u=n.validate||i,c=n.render||s;function d(f,p,g,m){let y,w=!1,k=f.bMarks[p]+f.tShift[p],A=f.eMarks[p];if(l!==f.src.charCodeAt(k))return!1;for(y=k+1;y<=A&&r[(y-k)%a]===f.src[y];y++);const v=Math.floor((y-k)/a);if(v<o)return!1;y-=(y-k)%a;const x=f.src.slice(k,y),E=f.src.slice(y,A);if(!u(E,x))return!1;if(m)return!0;let S=p;for(;S++,!(S>=g||(k=f.bMarks[S]+f.tShift[S],A=f.eMarks[S],k<A&&f.sCount[S]<f.blkIndent));)if(l===f.src.charCodeAt(k)&&!(f.sCount[S]-f.blkIndent>=4)){for(y=k+1;y<=A&&r[(y-k)%a]===f.src[y];y++);if(!(Math.floor((y-k)/a)<v)&&(y-=(y-k)%a,y=f.skipSpaces(y),!(y<A))){w=!0;break}}const M=f.parentType,_=f.lineMax;f.parentType="container",f.lineMax=S;const N=f.push("container_"+t+"_open","div",1);N.markup=x,N.block=!0,N.info=E,N.map=[p,S],f.md.block.tokenize(f,p+1,S);const D=f.push("container_"+t+"_close","div",-1);return D.markup=f.src.slice(k,y),D.block=!0,f.parentType=M,f.lineMax=_,f.line=S+(w?1:0),!0}e.block.ruler.before("fence","container_"+t,d,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules["container_"+t+"_open"]=c,e.renderer.rules["container_"+t+"_close"]=c}function Due(e){const t=String(e??"").trim();if(!t.startsWith("{")||!t.endsWith("}"))return null;const n=t.slice(1,-1).trim();if(!n)return{};if(n.includes("{")||n.includes("[")||n.includes("]"))return null;const i=[];let s="",o=!1,r=!1;for(let a=0;a<n.length;a++){const u=n[a];if(u==="\\"){s+=u,a+1<n.length&&(s+=n[a+1],a++);continue}if(!r&&u==="'"){o=!o,s+=u;continue}if(!o&&u==='"'){r=!r,s+=u;continue}if(!o&&!r&&u===","){i.push(s.trim()),s="";continue}s+=u}s.trim()&&i.push(s.trim());const l={};for(const a of i){if(!a)continue;let u=!1,c=!1,d=-1;for(let y=0;y<a.length;y++){const w=a[y];if(w==="\\"){y++;continue}if(!c&&w==="'"){u=!u;continue}if(!u&&w==='"'){c=!c;continue}if(!u&&!c&&w===":"){d=y;break}}if(d===-1)return null;const f=a.slice(0,d).trim(),p=a.slice(d+1).trim();if(!f)return null;let g=f;if(g.startsWith('"')&&g.endsWith('"')||g.startsWith("'")&&g.endsWith("'"))try{g=JSON.parse(g.replace(/^'/,'"').replace(/'$/,'"'))}catch{return null}if(!/^[_$A-Z][\w$-]*$/i.test(g))return null;let m;if(!p)m="";else if(p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'"))try{m=JSON.parse(p.replace(/^'/,'"').replace(/'$/,'"'))}catch{m=p}else/^-?\d+(?:\.\d+)?$/.test(p)?m=Number(p):p==="true"||p==="false"?m=p==="true":p==="null"?m=null:m=p;l[g]=m}return l}function XN(e,t,n){for(const i of e){const s=i,o=s.map;if(Array.isArray(o)&&o.length>=2){const r=Number(o[0]),l=Number(o[1]);Number.isFinite(r)&&Number.isFinite(l)&&(s.map=[r+t,Math.min(l+t,n)])}Array.isArray(s.children)&&XN(s.children,t,n)}}function Rue(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use($ue,t,{render(n,i){return n[i].nesting===1?`<div class="vmr-container vmr-container-${t}">`:`</div> -`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,i,s)=>{const o=t,r=o.bMarks[n]+o.tShift[n],l=o.eMarks[n],a=o.src.slice(r,l),u=a.match(/^:::\s*([^\s{]+)/);if(!u)return!1;const c=u[1];if(!c.trim())return!1;const d=a.slice(u[0].length).trim();let f,p;const g=d.indexOf("{"),m=g>=0?d.slice(g).trimStart():void 0;if(g===-1)f=d||void 0;else{if(f=d.slice(0,g).trim()||void 0,m?.startsWith("{")){let E=0,S=-1;for(let M=0;M<m.length;M++)if(m[M]==="{"?E++:m[M]==="}"&&E--,E===0){S=M+1;break}S>0&&(p=m.slice(0,S))}p||(f=d||void 0)}if(s)return!0;const y=!!o.env.__markstreamFinal;let w=n+1,k=!1;for(;w<=i;){const E=o.bMarks[w]+o.tShift[w],S=o.eMarks[w];if(o.src.slice(E,S).trim()===":::"){k=!0;break}w++}k||(w=i);const A=o.push("vmr_container_open","div",1);if(A.attrSet("class",`vmr-container vmr-container-${c}`),A.map=[n,k?w:i],A.meta={...A.meta??{},unclosed:!k&&!y},f&&A.attrSet("data-args",f),p)try{const E=JSON.parse(p);for(const[S,M]of Object.entries(E)){const _=M!=null&&typeof M=="object";A.attrSet(`data-${S}`,_?JSON.stringify(M):String(M))}}catch{const E=Due(p);if(E)for(const[S,M]of Object.entries(E)){const _=M!=null&&typeof M=="object";A.attrSet(`data-${S}`,_?JSON.stringify(M):String(M))}else A.attrSet("data-attrs",p)}const v=[];for(let E=n+1;E<w;E++){const S=o.bMarks[E]+o.tShift[E],M=o.eMarks[E];v.push(o.src.slice(S,M))}if(v.some(E=>E.trim().length>0)){let E=v.join(` -`);E.endsWith(` -`)||(E+=` -`),E.endsWith(` - -`)||(E+=` -`);const S=o.tokens[o.tokens.length-1];S&&(S.raw=E);const M=[];o.md.block.parse(E,o.md,o.env,M),XN(M,n+1,n+1+v.length),o.tokens.push(...M)}const x=o.push("vmr_container_close","div",-1);return k||(x.hidden=!0,x.map=[i,i]),o.line=k?w+1:w,!0},{alt:["paragraph","reference","blockquote","list"]})}function pl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function is(e){let t=!1,n=!1;for(let i=0;i<e.length;i++){const s=e[i];if(s==="\\"){i++;continue}if(!n&&s==="'"){t=!t;continue}if(!t&&s==='"'){n=!n;continue}if(!t&&!n&&s===">")return i}return-1}function yv(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let i;for(;(i=n.exec(e))!==null;){const s=i[1];if(!s)continue;const o=i[2]||i[3]||i[4]||"";t.push([s,o])}return t}const zue=/^[a-z][a-z0-9_-]*$/;function Jw(e){return zue.test(String(e??"").trim().toLowerCase())}function Ur(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return Jw(t)?t.toLowerCase():"";let n=1;for(;n<t.length&&/\s/.test(t[n]);)n++;if(t[n]==="/")for(n++;n<t.length&&/\s/.test(t[n]);)n++;const i=n;for(;n<t.length&&/[\w-]/.test(t[n]);)n++;const s=t.slice(i,n).toLowerCase(),o=t[n]??"";return o&&!/[\s/>]/.test(o)?"":Jw(s)?s:""}function rd(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const i of e){const s=Ur(i);!s||t.has(s)||(t.add(s),n.push(s))}return n}function Oue(...e){const t=new Set,n=[];for(const i of e)for(const s of rd(i))t.has(s)||(t.add(s),n.push(s));return n}function Pue(e){const t=rd(e);return{key:t.join(","),tags:t}}function eF(e){return Ur(e)}function jue(e,t){const n=String(e??""),i=Ur(t);if(!i)return!1;const s=pl(i),o=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return o?o[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function tF(e,t){const n=Ur(t);return!!n&&!tp.has(n)&&!jue(e,n)}function Hue(e,t){const n=String(e??""),i=Ur(t);if(!i)return n;const s=pl(i),o=new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?>\s*`,"i"),r=new RegExp(String.raw`\s*<\s*\/\s*${s}\s*>\s*$`,"i");return n.replace(o,"").replace(r,"")}const nF=Su,Wue=tp,iF=new Set(VN);iF.delete("details");const que=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,Uue=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,Z3=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,Kue=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function Pm(e){return(e.match(Z3)?.[1]??"").toLowerCase()}function fb(e){return/^\s*<\s*\//.test(e)}function hb(e,t){return nF.has(t)||/\/\s*>\s*$/.test(e)}function Vue(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i];if(!s||s.type!=="html_inline")continue;const o=String(s.content??""),r=Pm(o);if(r===t){if(fb(o)){if(n===0)return i;n--;continue}hb(o,r)||n++}}return-1}function Zue(e,t){let n=0;for(const i of e){if(!i||i.type!=="html_inline")continue;const s=String(i.content??""),o=Pm(s);if(o===t){if(fb(s)){n>0&&n--;continue}hb(s,o)||n++}}return n}function Xw(e,t,n=0){const i=new RegExp(String.raw`<\s*(\/?)\s*${pl(t)}(?=[\s>/])[^>]*>`,"gi");i.lastIndex=Math.max(0,n);let s=0,o;for(;(o=i.exec(e))!==null;){const r=o[0]??"",l=!!o[1],a=!l&&/\/\s*>$/.test(r);if(l){if(s===0)return{start:o.index,end:o.index+r.length};s--;continue}a||s++}return null}function Gue(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${pl(t)}(?=[\s>/])[^>]*>`,"gi");let i=0,s;for(;(s=n.exec(e))!==null;){const o=s[0]??"",r=!!s[1],l=!r&&/\/\s*>$/.test(o);if(r){i>0&&i--;continue}l||i++}return i}function jm(e){const t=e;return String(t.raw??t.content??t.markup??"")}function Que(e){const t=e;return t.meta||(t.meta={}),t.meta}function xy(e,t,n){const i=Que(e);i.markstreamCustomHtmlRaw=t,i.markstreamCustomHtmlInner=n}function Yue(e,t){if(!t.size)return;const n=Array.from(t,p=>new RegExp(String.raw`<\s*${pl(p)}(?=[\s>/])`,"i")),i=[];let s=!1;const o=p=>p?n.some(g=>g.test(p)):!1,r=p=>{if(!(!p||!i.length))for(const g of i)g.raw+=p,g.inner+=p},l=()=>{!i.length||!s||(r(` -`),s=!1)},a=p=>{r(p)},u=p=>{for(let m=0;m<i.length;m++)i[m].raw+=p,m<i.length-1&&(i[m].inner+=p);const g=i.pop();xy(g.token,g.raw,g.inner)},c=p=>{const g=i[i.length-1]?.tag;if(!g)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${pl(g)}\s*>`,"i");return p.match(m)?.[0]??null},d=p=>!!c(p),f=(p,g,m)=>{const y=m??(p.type==="html_inline"?Pm(g):"");if(!(y&&t.has(y))){r(g);return}const w=fb(g),k=!w&&hb(g,y);if(w){if(!i.length||i[i.length-1].tag!==y){r(g);return}u(g);return}if(r(g),k){xy(p,g,"");return}i.push({tag:y,token:p,raw:g,inner:""})};for(const p of e){if(p.type==="inline"&&Array.isArray(p.children)){const g=String(p.content??"");if(d(g)?s=!1:l(),!i.length&&!o(g)){s=!1;continue}let m=0,y=!0;for(const w of p.children){const k=jm(w),A=w.type==="html_inline"?Pm(k):"",v=A&&t.has(A);let x=k;if(y&&g&&k&&(i.length||v)){const E=g.indexOf(k,m);if(E!==-1)a(g.slice(m,E)),x=g.slice(E,E+k.length),m=E+k.length;else{if(i.length&&!v)continue;y=!1}}f(w,x,A)}y&&g&&m<g.length&&i.length&&a(g.slice(m)),s=i.length>0;continue}if(i.length&&typeof p.content=="string"){const g=jm(p),m=p.type==="html_block"?c(g):null;if(m){u(`${s?` -`:""}${m}`),s=i.length>0;continue}if(!p.content)continue;l(),r(p.content),s=!0}}for(const p of i)xy(p.token,p.raw,p.inner)}function Jue(e){return/^\s*<\s*[!?]/.test(e)}function Xue(e){const t=new Set(Wue);if(e&&Array.isArray(e))for(const n of e){const i=String(n??"").trim();if(!i)continue;const s=i.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function ex(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function ece(e,t){let n=null;for(const o of e.matchAll(que)){const r=o.index??-1;if(r<0)continue;const l=(o[1]??"").toLowerCase();ex(l,t)&&is(e.slice(r))===-1&&(!n||r<n.index)&&(n={index:r,tag:l,closing:!1})}for(const o of e.matchAll(Uue)){const r=o.index??-1;if(r<0)continue;const l=(o[1]??"").toLowerCase();ex(l,t)&&is(e.slice(r))===-1&&(!n||r<n.index)&&(n={index:r,tag:l,closing:!0})}const i=/<\/\s*$/.exec(e);if(i&&typeof i.index=="number"){const o=i.index;!e.slice(o).includes(">")&&(!n||o<n.index)&&(n={index:o,tag:"",closing:!0})}const s=/<\s*$/.exec(e);if(s&&typeof s.index=="number"){const o=s.index,r=e.slice(o);!r.startsWith("</")&&!r.includes(">")&&(!n||o<n.index)&&(n={index:o,tag:"",closing:!1})}return n}function tce(e,t){const n=e;return Object.assign(Object.create(Object.getPrototypeOf(n)),n,{type:"text",content:t,raw:t})}function nce(e,t){if(!e.length)return{children:e};const n=[];let i=null,s=null;function o(a,u){a&&(u?n.push(tce(u,a)):n.push({type:"text",content:a,raw:a}))}function r(a,u){let c=0;for(;c<a.length;){const d=a.indexOf("<",c);if(d===-1){o(a.slice(c),u);break}o(a.slice(c,d),u);const f=a.slice(d),p=f.match(Z3);if(!p){o("<",u),c=d+1;continue}const g=is(f);if(g===-1){o("<",u),c=d+1;continue}const m=f.slice(0,g+1),y=(p[1]??"").toLowerCase();t.has(y)?n.push({type:"html_inline",tag:"",content:m,raw:m}):o(m,u),c=d+m.length}}function l(a,u){if(!a)return;const c=ece(a,t);if(!c){r(a,u);return}const d=a.slice(0,c.index);d&&r(d,u),i={tag:c.tag,buffer:a.slice(c.index),closing:c.closing},s=i.buffer}for(const a of e){if(i){i.buffer+=jm(a),s=i.buffer;const u=is(i.buffer);if(u===-1)continue;const c=i.buffer.slice(0,u+1),d=i.buffer.slice(u+1);n.push({type:"html_inline",tag:"",content:c,raw:c}),i=null,s=null,d&&l(d);continue}if(a.type==="html_inline"){const u=jm(a),c=(u.match(Z3)?.[1]??"").toLowerCase();if(c&&t.has(c)&&is(u)===-1){i={tag:c,buffer:u,closing:/^<\s*\//.test(u)},s=i.buffer;continue}}if(a.type==="text"){const u=String(a.content??"");if(!u.includes("<")){n.push(a);continue}l(u,a);continue}n.push(a)}return{children:n,pendingBuffer:s??void 0}}const ice=["a","span","strong","em","b","i","u"];function sce(e,t={}){const n=new Set;if(t.customHtmlTags?.length)for(const f of t.customHtmlTags){const p=Ur(f);p&&n.add(p)}const i=f=>{const p=f,g=new Set(n),m=Array.isArray(p.env?.__markstreamCustomHtmlTags)?p.env.__markstreamCustomHtmlTags:[];for(const A of m){const v=Ur(String(A??""));v&&g.add(v)}const y=Xue(Array.from(g)),w=new Set(ice);for(const A of g)w.add(A);return{autoCloseInlineTagSet:w,commonHtmlTags:y,customTagSet:g,shouldMergeHtmlBlockTag:A=>g.has(A)||!y.has(A)||iF.has(A)}},s=f=>{if(f.type==="html_block")return String(f.content??"");if(f.type!=="inline"||!Array.isArray(f.children)||f.children.length!==1)return"";const p=f.children[0];return p?.type!=="html_block"?"":String(f.content??p.content??"")},o=(f,p)=>{f.type="html_block",f.content=p,f.raw=p,f.children=[]},r=f=>f.replace(/^(?:\r?\n)+/,""),l=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),u=(f,p)=>{const g=r(f);if(!/\S/.test(g))return[];if(l(g))return[{type:"code_block",content:a(g),raw:g}];const m=g.replace(/^[\t ]+/,"");if(!m)return[];if(m.startsWith("<"))return[{type:"html_block",content:m}];const y={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return p==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},y,{type:"paragraph_close",tag:"p",nesting:-1}]:p==="text"?[{type:"text",content:m,raw:m}]:[y]},c=(f,p,g)=>f[p-1]?.type==="paragraph_open"&&f[p+1]?.type==="paragraph_close"?"inline":g,d=(f,p)=>{const g=r(p);return!/\S/.test(g)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${g}`,f.children.push({type:"text",content:g,raw:g}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const p=f.tokens??[],{commonHtmlTags:g,customTagSet:m}=i(f);for(const y of p){const w=y;if(w.type!=="inline"||!Array.isArray(w.children))continue;const k=String(w.content??""),A=w.children.length?w.children:k.includes("<")?[{type:"text",content:k,raw:k}]:null;if(A)try{const v=nce(A,g);if(w.children=v.children,v.pendingBuffer){const x=k.lastIndexOf(v.pendingBuffer);if(x!==-1){const E=k.slice(0,x);w.content=E,typeof w.raw=="string"&&(w.raw=E)}}}catch(v){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",v)}}Yue(p,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const p=f.tokens??[],{autoCloseInlineTagSet:g,customTagSet:m,shouldMergeHtmlBlockTag:y}=i(f),w=[];for(let k=0;k<p.length;k++){const A=p[k];if(w.length>0){const[x,E]=w[w.length-1];if(k!==E){if(A.type==="paragraph_open"||A.type==="paragraph_close"){p.splice(k,1),k--;continue}const S=String(A.content??A.raw??"");if(S){const M=p[E],_=`${String(M.content||"")} -${S}`,N=is(_),D=N===-1?null:Xw(_,x,N+1);if(D){const T=_.slice(0,D.end),$=_.slice(D.end);M.content=T,M.loading=!1,p.splice(k,1),w.pop();const P=d(M,$)?[]:u($,c(p,k,"paragraph"));P.length&&p.splice(k,0,...P),k--;continue}M.content=_,M.loading!==!1&&(M.loading=!0)}p.splice(k,1),k--;continue}}const v=s(A);if(v){if(Jue(v))continue;const x=(v.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),E=/^\s*<\s*\//.test(v);if(!x||!y(x))continue;if(o(A,v),!E)x&&!new RegExp(`^\\s*<\\s*${x}\\b[^>]*\\/\\s*>`,"i").test(v)&&Gue(v,x)>0&&w.push([x,k]);else if(w.length>0&&x&&w[w.length-1][0]===x){const[,S]=w[w.length-1],M=p[S];M.content=`${String(M.content||"")} -${v}`,M.loading=!1,w.pop(),p.splice(k,1),k--}continue}else if(w.length>0){if(A.type==="paragraph_open"||A.type==="paragraph_close"){p.splice(k,1),k--;continue}const x=A.content||"",E=new RegExp(`<\\s*\\/\\s*${w[w.length-1][0]}\\s*>`,"i").test(x);if(x){const[,S]=w[w.length-1],M=p[S];M.content=`${M.content||""} -${x}`,M.loading!==!1&&(M.loading=!E)}E&&w.pop(),p.splice(k,1),k--}else continue}if(m.size>0){const k=new Map,A=new Map,v=S=>{let M=k.get(S);return M||(M=new RegExp(`<\\s*${S}\\b`,"i"),k.set(S,M)),M},x=S=>{let M=A.get(S);return M||(M=new RegExp(`<\\s*\\/\\s*${S}\\s*>`,"i"),A.set(S,M)),M},E=[];for(let S=0;S<p.length;S++){const M=p[S],_=String(M.content??"");if(E.length>0){const D=E[E.length-1],T=p[D.index],$=M.type==="html_block"?x(D.tag).exec(_):null;if($){const R=$.index+$[0].length,W=_.slice(0,R),z=_.slice(R);T.content=`${String(T.content??"")} -${W}`,Array.isArray(T.children)&&T.children.push({type:"html_inline",content:`</${D.tag}>`,raw:`</${D.tag}>`}),E.pop();const G=d(T,z)?[]:u(z,c(p,S,"paragraph"));G.length?p.splice(S,1,...G):(p.splice(S,1),S--);continue}if(M.type!=="inline")continue;const P=Array.isArray(M.children)?M.children:[],O=Vue(P,D.tag);if(O!==-1){const R=P.slice(0,O+1),W=P.slice(O+1),z=R.map(G=>String(G?.content??G?.raw??"")).join("");if(T.content=`${String(T.content??"")} -${z}`,Array.isArray(T.children)&&T.children.push(...R),W.length){const G=W.map(K=>String(K.content??K.raw??"")).join("");if(G.trim()){const K=G.replace(/^\s+/,"");if(d(T,G))p.splice(S,1),S--;else if(K.startsWith("<"))p.splice(S,1,{type:"html_block",content:K});else{const H=u(G,c(p,S,"paragraph"));p.splice(S,1,...H)}}else p.splice(S,1),S--}else p.splice(S,1),S--;E.pop();continue}T.content=`${String(T.content??"")} -${_}`,Array.isArray(T.children)&&T.children.push(...P),p.splice(S,1),S--;continue}if(M.type!=="inline")continue;const N=Array.isArray(M.children)?M.children:[];for(const D of m)if((N.length?Zue(N,D):v(D).test(_)&&!x(D).test(_)?1:0)>0){E.push({tag:D,index:S});break}}}{let k=0;for(let A=0;A<p.length;A++){const v=p[A];if(v.type==="paragraph_open"){k++;continue}v.type==="paragraph_close"&&(k>0?k--:(p.splice(A,1),A--))}}for(let k=0;k<p.length;k++){const A=p[k];if(A.type==="html_block"){const M=(A.content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(M.startsWith("!")||M.startsWith("?")){A.loading=!1;continue}if(m.has(M)){const O=String(A.content??""),R=is(O),W=R===-1?null:Xw(O,M,R+1);A.loading=W?!1:A.loading!==void 0?A.loading:!0;const z=W?.start??-1,G=W?W.end-W.start:0;if(z!==-1){const K=O.slice(0,z+G);let H="";R!==-1&&R<z&&(H=O.slice(R+1,z)),A.children=[{type:M,content:H,raw:K,attrs:[],tag:M,loading:!1}],A.content=K,A.raw=K;const q=u(O.slice(z+G)||"","text");q.length&&p.splice(k+1,0,...q)}else A.children=[{type:M,content:"",raw:O,attrs:[],tag:M,loading:!0}];continue}if(["br","hr","img","input","link","meta","div","p","ul","li"].includes(M))continue;A.type="inline";const _=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let N;for(;(N=_.exec(A.content||""))!==null;)N[1],N[2]||N[3]||N[4];const D=String(A.content??""),T=new RegExp(`<\\/\\s*${M}\\s*>`,"i").exec(D),$=T?T.index:-1,P=T?T[0].length:0;if($!==-1){const O=D.slice(0,$+P),R=(D.slice($+P)||"").replace(/^\s+/,"");A.children=[{type:"html_block",content:O,tag:M,loading:!1}],A.content=O,A.raw=O,R&&p.splice(k+1,0,R.startsWith("<")?{type:"html_block",content:R}:{type:"text",content:R,raw:R})}else A.children=[{type:"html_block",content:A.content,tag:M,loading:!0}];continue}if(!A||A.type!=="inline")continue;if(A.children.length===2&&A.children[0].type==="html_inline"){const M=(A.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),_=A.children[1],N=String(_?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(_?.type==="html_inline"&&N===M)continue;g.has(M)?(A.children[0].loading=!0,A.children[0].tag=M,A.children.push({type:"html_inline",tag:M,loading:!0,content:`</${M}>`})):A.children=[{type:"html_block",loading:!0,tag:M,content:String(A.children[0]?.content??"")+String(A.children[1]?.content??"")}];continue}else if(A.children.length===3&&A.children[0].type==="html_inline"&&A.children[2].type==="html_inline"){const M=(A.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(g.has(M))continue;A.children=[{type:"html_block",loading:!1,tag:M,content:A.children.map(_=>_.content).join("")}];continue}if(!A.content?.startsWith("<")||A.children?.length!==1)continue;const v=String(A.content),x=A,E=x.children[0];if(E?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(v)&&(x.children.length=0);continue}const S=String(E.content??v).match(Kue)?.[1]?.toLowerCase()??"";if(S){if(/\/\s*>\s*$/.test(v)||nF.has(S)){x.children=[{type:"html_inline",content:v}];continue}x.children.length=0}}})}function oce(e){const t=e.trim();return!t||/^&[a-z0-9#]+;/i.test(t)?!1:!!(/^(?:const|let|var|function|class|import|export|if|for|while|return|await|async|yield|try|catch|throw|new|typeof|instanceof|switch|case|break|continue|def|ruby|perl|print|echo|true|false|null|undefined|NaN|Infinity|this)\b/.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\])*\s*\(/i.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[[\d+\]])+/i.test(t)||/\w+\s*(?:===?|!==?|<=?|>=?|\+\+|--|&&|\|\||\?\.)/.test(t)||/^(?:!!|\+\+|--)\s*\w/.test(t)||/[\w$]+\s*(?:\+=|-=|\*=|\/=|%=|\*\*=|=)/.test(t)||/^(?:https?:\/\/|ftp:\/\/|file:\/\/|\/\/|www\.)/i.test(t)||/`[^`]*\$\{[^}]*\}[^`]*`/.test(t)||/<\/?[A-Z][a-zA-Z0-9]*/.test(t)||/<[a-z][a-z0-9]*\s[^>]+>/.test(t)||/^(["'`]).*\1\s*[;,]?$/.test(t)||/^\[[\s\S]*\]$/.test(t)||/^\{[\s\S]*\}$/.test(t)||/^\(\s*\)$/.test(t)||/[\w$]+(?:\s*[+\-*/%<>=!&|^~:]+\s*[\w$]+|\s*\.\s*[\w$]+)/.test(t)||/=>|->|::/.test(t)||/^@[\w.$]+$/.test(t)||/^(?:0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+(?:\.\d*)?(?:px|em|rem|%|vh|vw|deg|s|ms)?)$/.test(t)||/^\$[\w$]+\s*[=:]/.test(t)||/\|\s*\w+|\w+\s*\|/.test(t)||/^(?:git|npm|yarn|pnpm|bun|pip|cargo|go|rust|python|node|java|mvn|gradle|docker|kubectl)\s+/.test(t)||/(?:console|window|document|Math|JSON|Date|Array|Object|String|Number|Boolean)\.[a-zA-Z]/.test(t)||/^(?:\/\/|#|\/\*|\*\/|<!--|-->)/.test(t)||/^(?:<<<|<<\s*['"]?\w+['"]?)/.test(t))}function rce(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const i=n.tokens??[];for(let s=0;s<i.length;s++){const o=i[s];if(o.type!=="code_block")continue;const r=String(o.content??"").trim();if(!r)continue;const l=r.split(/\r?\n/).filter(a=>a.trim().length>0);if(l.length===1&&!oce(l[0]??"")){const a=l[0]??"",u=o.level??0;i.splice(s,1,{type:"paragraph_open",tag:"p",nesting:1,level:u},{type:"inline",tag:"",nesting:0,level:u,content:a,children:[{type:"text",content:a,level:u+1,raw:a}],block:!0},{type:"paragraph_close",tag:"p",nesting:-1,level:u}),s+=2}}})}const sF=/\.([a-z0-9]{1,15})$/i,lce=/[_()[\]{}<>]/u,ace=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,uce=/[?#@]/u,cce=/[\\/]/u,dce=/^[\p{L}\p{N}./\\-]+$/u,fce=/^[A-Za-z0-9-]{1,63}$/u,hce=/^xn--[a-z0-9-]{2,59}$/i,pce=/^(?:[A-Z]{1,6}|\d{1,8})$/u,gce=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,mce=/文件名\s*[::]?|附件\s*[::]?|路径\s*[::]?|路徑\s*[::]?|文件列表\s*[::]?|文档列表\s*[::]?|文檔列表\s*[::]?|\bfile\s*names?\b\s*[::]?|\battachments?\b\s*[::]?|\bpaths?\b\s*[::]?|\bfile\s+lists?\b\s*[::]?|\bdocument\s+lists?\b\s*[::]?/iu,vce=/文件名\s*[::]?|文件\s*[::]?|附件\s*[::]?|档案\s*[::]?|檔案\s*[::]?|文档\s*[::]?|文檔\s*[::]?|资料\s*[::]?|資料\s*[::]?|路径\s*[::]?|路徑\s*[::]?|\bfile\s*name\b\s*[::]?|\battachments?\b\s*[::]?|\bfiles?\b\s*[::]?|\bdocuments?\b\s*[::]?|\bdocs?\b\s*[::]?|\bpaths?\b\s*[::]?/iu,yce=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,bce=2e3,kce=512,Ace={},Cce=new Set(["ai","md","py","rs","sh","zip"]),oF=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),wce=new Set([...oF,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),xce=new Set(["com","dev","io","page","site"]),_ce=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),Sce=new Set(["7z","ai","astro","avi","bash","bz2","c","cjs","cpp","cs","csv","doc","docx","fish","flac","gif","go","gz","h","hpp","html","java","jpeg","jpg","js","json","jsx","kt","md","mdx","mjs","mov","mp3","mp4","pdf","php","png","ppt","pptx","ps1","py","rar","rb","rs","sh","sql","svg","swift","svelte","tar","tgz","toml","ts","tsx","txt","vue","wav","webp","xls","xlsx","xml","yaml","yml","zip","zsh"]),Mc=new Map;function tx(e,t){if(!e||e.length>kce)return t;for(Mc.set(e,t);Mc.size>bce;){const n=Mc.keys().next().value;if(!n)break;Mc.delete(n)}return t}function np(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function _y(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return np(n)?n:void 0}function nx(e,t){if(!np(t))return e;const n=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:n?.filename||t?.filename,explicitFilename:n?.explicitFilename||t?.explicitFilename,marketTicker:n?.marketTicker||t?.marketTicker}}}function ix(e){const t=Mp(e);return np(t)?t:void 0}function Mce(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function sx(e,t){if(!np(t))return;const n=String(e??"").trim().split(/\s+/u).map(Mce).filter(Boolean);if(n.length===0)return;const i={};return t?.filename&&n.every(s=>Hm(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(i.filename=!0),t?.explicitFilename&&i.filename&&(i.explicitFilename=!0),t?.marketTicker&&n.every(s=>Hm(s,{marketTicker:!0}))&&(i.marketTicker=!0),np(i)?i:void 0}function ju(e,t=!1){let n;return{options(i){return t||i==null?nx(e,n):nx(e,_y(ix(i),sx(i,n)))},remember(i){const s=ix(i);n=t?_y(n,s):_y(s,sx(i,n))},reset(){n=void 0}}}function ox(e){return fce.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function Ice(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return ox(n)||hce.test(n)?t.every(ox):!1}function rF(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function Ece(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function Tce(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function lF(e,t,n){const i=Ece(t);return rF(e)&&Tce(i)&&String(n??"").toLowerCase().includes(i.toLowerCase())}function Lce(e){if(!e)return!1;if(e.includes("文件")||e.includes("附件")||e.includes("路径")||e.includes("路徑")||e.includes("文档")||e.includes("文檔")||e.includes("档案")||e.includes("檔案")||e.includes("资料")||e.includes("資料")||e.includes("股票")||e.includes("证券")||e.includes("證券")||e.includes("代码")||e.includes("代碼")||e.includes("交易所")||e.includes("后缀")||e.includes("後綴")||e.includes("市场")||e.includes("市場"))return!0;const t=e.toLowerCase();return t.includes("file")||t.includes("attachment")||t.includes("document")||t.includes("doc")||t.includes("path")||t.includes("ticker")||t.includes("symbol")||t.includes("exchange")}function Mp(e){const t=String(e??""),n=Mc.get(t);return n?(Mc.delete(t),Mc.set(t,n),n):Lce(t)?tx(t,{explicitFilename:mce.test(t),filename:vce.test(t),marketTicker:yce.test(t)}):tx(t,Ace)}function Nce(e){return Ice(e.split(/[\\/]/)[0]??"")}function Fce(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function Bce(e){if(lce.test(e)||!dce.test(e))return!0;if(cce.test(e))return!Nce(e);const t=e.replace(sF,"");return rF(t)?!0:t.split(".").filter(Boolean).some(Fce)}function $ce(e,t,n){if(!(n?wce:oF).has(t))return!1;const i=e.slice(0,-(t.length+1));return i===""?e.startsWith("."):(n?gce:pce).test(i)}function Hm(e,t={}){if(!e||ace.test(e)||uce.test(e))return!1;const n=e.match(sF);if(!n)return!1;const i=String(n[1]??"").toLowerCase();return $ce(e,i,t.marketTicker===!0)?!0:Sce.has(i)?!Cce.has(i)||t.filename?!0:Bce(e):!!(t.explicitFilename&&xce.has(i)||t.filename&&_ce.has(i))}const aF=new WeakMap,uF=new WeakSet;function G3(e,t){return aF.set(e,t),e}function Dce(e){return aF.get(e)}function Rce(e){uF.add(e)}function zce(e){return e===void 0||uF.has(e)}const rx=["!"];function lx(e){return e==="linkify"||e==="autolink"?e:"recovery"}function Vo(e){return{type:"text",content:e,raw:e}}function uc(e,t){t===1?e.push({type:"em_open",tag:"em",nesting:1}):t===2?e.push({type:"strong_open",tag:"strong",nesting:1}):t===3&&(e.push({type:"strong_open",tag:"strong",nesting:1}),e.push({type:"em_open",tag:"em",nesting:1}))}function cc(e,t){t===1?e.push({type:"em_close",tag:"em",nesting:-1}):t===2?e.push({type:"strong_close",tag:"strong",nesting:-1}):t===3&&(e.push({type:"em_close",tag:"em",nesting:-1}),e.push({type:"strong_close",tag:"strong",nesting:-1}))}function Ka(e,t,n,i="recovery"){let s="";if(t.includes('"')){const o=t.split('"');t=o[0].trim(),s=o[1].trim()}return G3({type:"link",loading:n,href:t,title:s,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`},i)}function Oce(e,t){if(!(!e||!t)&&(e.href=String(e.href??"")+t,e.text=String(e.text??"")+t,e.raw=`[${e.text}](${e.href})`,Array.isArray(e.children)&&e.children.length)){const n=e.children[e.children.length-1];n?.type==="text"?(n.content=String(n.content??"")+t,n.raw=String(n.raw??"")+t):e.children.push(Vo(t))}}function ax(e,t){let n=-1;for(const i of t){const s=e.indexOf(i);s!==-1&&(n===-1||s<n)&&(n=s)}return n}function Pce(e){const t=e.attrs?.find(n=>n?.[0]==="href")?.[1];return typeof t=="string"?t:""}function jce(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(i=>i?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function ux(e,t,n){let i="";for(let s=t+1;s<n;s++){const o=e[s];if(o?.type!=="text"||typeof o.content!="string")return null;i+=o.content}return i||null}function cx(e){let t=0;for(let n=0;n<e.length;n++){const i=e[n];if(i==="(")t++;else if(i===")"){if(t===0)return n;t--}}return-1}function Hce(e){e.core.ruler.after("inline","fix_link_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=Wce(s.children,typeof s.content=="string"?s.content:void 0)}catch(o){console.error("[applyFixLinkTokens] failed to fix inline children",o)}}})}function Wce(e,t){if(e.length<3)return e;const n=e.some(r=>r.type==="code_inline"),i=new Map;let s=0;for(let r=0;r<e.length;r++){const l=e[r];if(l.type==="link_open"){let a=-1;for(let u=r+1;u<e.length;u++)if(e[u]?.type==="link_close"){a=u;break}if(a!==-1&&l.markup==="linkify"){i.set(l,s);const u=ux(e,r,a),c=s>0&&u?cx(u):-1;if(c!==-1&&u)for(const d of u.slice(c))d==="("?s++:d===")"&&s>0&&s--}a!==-1&&(r=a);continue}if(!(l.type!=="text"||typeof l.content!="string"))for(const a of l.content)a==="("?s++:a===")"&&s>0&&s--}const o=Mp(t);for(let r=0;r<=e.length-1;r++){r<0&&(r=0);const l=e[r];if(!l)break;if(l.type==="link_open"&&(l.markup==="linkify"||l.markup==="autolink")){let a=-1;for(let u=r+1;u<e.length;u++)if(e[u]?.type==="link_close"){a=u;break}if(a!==-1){const u=ux(e,r,a),c=Pce(l);if(!n&&l.markup==="linkify"&&u&&!lF(u,c,t)&&Hm(u,o)){e.splice(r,a-r+1,Vo(u));continue}let d=ax(u??"",rx);if(l.markup==="linkify"&&u?.includes(")")&&(i.get(l)??0)>0){const g=cx(u);g!==-1&&(d===-1||g<d)&&(d=g)}const f=ax(c,rx);let p=d;for(let g=r+1;g<a;g++){const m=e[g];if(m?.type!=="text"||typeof m.content!="string")continue;if(p>=m.content.length){p-=m.content.length;continue}if(p<0)break;const y=m.content[p],w=m.content.slice(0,p);let k=m.content.slice(p);for(let x=g+1;x<a;x++){const E=e[x];E?.type==="text"&&typeof E.content=="string"&&(k+=E.content)}m.content=w,m.raw=w;const A=a-(g+1);A>0&&(e.splice(g+1,A),a=g+1);let v=c;if(y==="!"&&f!==-1)v=c.slice(0,f);else if(k){const x=encodeURI(k);if(x&&c.endsWith(x))v=c.slice(0,c.length-x.length);else{const E=y?encodeURI(y):"",S=E?c.indexOf(E):-1;S!==-1&&(v=c.slice(0,S))}}v!==c&&jce(l,v),k&&e.splice(a+1,0,Vo(k));break}}}if(!n){if(l?.type==="em_open"&&e[r-1]?.type==="text"&&e[r-1].content?.endsWith("*")){const a=e[r-1].content?.replace(/(\*+)$/,"")||"";e[r-1].content=a,l.type="strong_open",l.tag="strong",l.markup="**";for(let u=r+1;u<e.length;u++)if(e[u]?.type==="em_close"){e[u].type="strong_close",e[u].tag="strong",e[u].markup="**";break}}else if(l?.type==="text"&&l.content?.endsWith("(")&&e[r+1]?.type==="link_open"){const a=l.content.match(/\[([^\]]+)\]/);if(a){let u=l.content.slice(0,a.index);const c=u.match(/(\*+)$/),d=lx(e[r+1]?.markup),f=[];if(c){u=u.slice(0,c.index),u&&f.push(Vo(u));const p=a[1],g=c[1].length;uc(f,g);let m=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(m+=e[r+4]?.content||"",e[r+4].content=""),f.push(Ka(p,m,!e[r+4]?.content?.startsWith(")"),d)),cc(f,g),e[r+4]?.type==="text"){const y=e[r+4].content?.replace(/^\)\**/,"");y&&f.push(Vo(y)),e.splice(r,5,...f)}else e.splice(r,4,...f)}else{u&&f.push(Vo(u));let p=a[1];const g=p.match(/^\*+/);if(g){const y=g[0].length;p=p.replace(/^\*+/,"").replace(/\*+$/,"");let w=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(w+=e[r+4]?.content||"",e[r+4].content=""),uc(f,y),f.push(Ka(p,w,!e[r+4]?.content?.startsWith(")"),d)),cc(f,y),e[r+4]?.type==="text"){const k=e[r+4].content?.replace(/^\)/,"");k&&f.push(Vo(k)),e.splice(r,5,...f)}else e.splice(r,4,...f);r===0?r=f.length-1:r-=f.length+1;continue}let m=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(m+=e[r+4]?.content||"",e[r+4].content=""),f.push(Ka(p,m,!e[r+4]?.content?.startsWith(")"),d)),e[r+4]?.type==="text"){const y=e[r+4].content?.replace(/^\)/,"");y&&f.push(Vo(y)),e.splice(r,5,...f)}else e.splice(r,4,...f)}r-=f.length+1;continue}}else if(l.type==="link_open"&&l.markup==="linkify"&&e[r-1]?.type==="text"&&e[r-1].content?.endsWith("(")){if(e[r-2]?.type==="link_close"){const a=[],u=e[r-3].content||"";let c=l.attrs?.find(d=>d[0]==="href")?.[1]||"";if(e[r+3]?.type==="text"){const d=(e[r+3]?.content??"").indexOf(")"),f=d===-1;d===-1&&(c+=e[r+3]?.content?.slice(0,d)||"",e[r+3].content=""),a.push(Ka(u,c,f,"linkify"));const p=e[r+3].content?.replace(/^\)\**/,"");p&&a.push(Vo(p)),e.splice(r-4,8,...a)}else a.push(G3({type:"link",loading:!0,href:c,title:"",text:u,children:[{type:"text",content:c,raw:c}],raw:`[${u}](${c})`},"linkify")),e.splice(r-4,7,...a);continue}else if(e[r-1].content==="]("&&e[r-3]?.type==="text"&&e[r-3].content?.endsWith(")"))if(e[r-2]?.type==="strong_open"){const[a,u]=e[r-3].content?.split("[**")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}else if(e[r-2]?.type==="em_open"){const[a,u]=e[r-3].content?.split("[*")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}else{const[a,u]=e[r-3].content?.split("[")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}}if(l.type==="link_close"&&l.nesting===-1&&e[r-2]?.type==="link_open"&&e[r+1]?.type==="text"&&e[r-1]?.type==="text"){const a=e[r-1].content||"",u=e[r-2].attrs||[],c=u.find(w=>w[0]==="href")?.[1]||"",d=u.find(w=>w[0]==="title")?.[1]||"";let f=3,p=2;const g=(e[r-3]?.content||"").match(/^(\*+)$/),m=[];if(g){p+=1;const w=g[1].length;uc(m,w)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let w=r+1;w<e.length;w++){const k=g?g[1].length:e[r-3].markup.length,A=e[w];if(k===1&&A.type==="em_close")break;if(k===2&&A.type==="strong_close")break;if(k===3&&(A.type==="em_close"||A.type==="strong_close"))break;f+=1}}const y=G3({type:"link",loading:!1,href:c,title:d,text:a,children:[{type:"text",content:a,raw:a}],raw:`[${a}](${c})`},l.markup?lx(l.markup):"explicit");if(m.push(y),g){const w=g[1].length;cc(m,w)}e.splice(r-p,f,...m),r-=m.length+1;continue}else if(l.content?.startsWith("](")&&e[r-1].markup?.includes("*")&&e[r-4]?.type==="text"&&e[r-4].content?.endsWith("[")){const a=e[r-1].markup.length,u=[],c=e[r-4].content.slice(0,e[r-4].content.length-a);c&&u.push(Vo(c)),uc(u,a);const d=e[r-2].content||"";let f=l.content.slice(2),p=!0;if(e[r+1]?.type==="text"){const g=(e[r+1]?.content??"").indexOf(")");p=g===-1,g===-1&&(f+=e[r+1]?.content?.slice(0,g)||"",e[r+1].content="")}if(u.push(Ka(d,f,p)),cc(u,a),e[r+1]?.type==="text"){const g=e[r+1].content?.replace(/^\)\**/,"");g&&u.push(Vo(g)),e.splice(r-4,8,...u)}else e[r+1]?.type==="link_open"?e.splice(r-4,10,...u):e.splice(r-4,7,...u);r-=u.length+1;continue}else if(l.content?.startsWith("](")&&e[r-1].type==="strong_close"&&e[r-4]?.type==="text"&&e[r-4]?.content?.includes("**[")){const a=[],u=e[r-4].content.split("**[")[0];u&&a.push(Vo(u)),uc(a,2);const c=e[r-2].content||"";let d=l.content.slice(2),f=!0;if(e[r+1]?.type==="text"){const p=(e[r+1]?.content??"").indexOf(")");f=p===-1,p===-1&&(d+=e[r+1]?.content?.slice(0,p)||"",e[r+1].content="")}if(a.push(Ka(c,d,f)),cc(a,2),e[r+1]?.type==="text"){const p=e[r+1].content?.replace(/^\)\**/,"");p&&a.push(Vo(p)),e.splice(r-4,8,...a)}else e[r+1]?.type==="link_open"?e.splice(r-4,10,...a):e.splice(r-4,7,...a);r-=a.length+1;continue}else if(l.type==="strong_close"&&e[r+1]?.type==="text"&&e[r+1].content?.includes("](")&&e[r-1].type==="text"&&/\[.*$/.test(e[r-1].content||"")){const a=[],[u,c]=e[r-1].content?.split("[")||["",""];u&&a.push(Vo(u)),uc(a,2);let[d,f]=e[r+1].content.split("](");d=c+d;let p=4;if(e[r+2]?.type==="link_open"){const m=e[r+2].attrs?.find(y=>y[0]==="href")?.[1];e[r+5]?.type==="text"&&e[r+5].content==="."?(f=(m||f)+e[r+5].content,e[r+5].content=""):f=m||f,p+=3}let g=!0;if(l.nesting===-1&&(d=d.replace(/\*+$/,"")),e[r+2]?.type==="text"){const m=(e[r+2]?.content??"").indexOf(")");g=m===-1,m===-1&&(f+=e[r+2]?.content?.slice(0,m)||"",e[r+2].content="")}a.push(Ka(d,f,g)),cc(a,2),e.splice(r-2,p,...a)}if(l.type==="text"&&/\*+\[[^\]]*$/.test(l.content||"")&&e[r+1]?.type==="strong_open"&&e[r+2]?.type==="text"&&e[r+2].content==="]("&&e[r+3]?.type==="link_open"&&e[r+5]?.type==="link_close"&&e[r+6]?.type==="text"&&e[r+6].content===")"&&e[r+7]?.type==="strong_close"){const a=(l.content||"").match(/^(\*+)\[(.*)$/);if(a){const u=(a[2]||"")+a[1];let c=e[r+3]?.attrs?.find(f=>f[0]==="href")?.[1]||"";!c&&e[r+4]?.type==="text"&&(c=e[r+4].content||"");const d=[];uc(d,2),d.push(Ka(u,c,!1)),cc(d,2),e.splice(r,9,...d),r-=d.length-1;continue}}}}if(n)return e;for(let r=0;r<e.length-1;r++){const l=e[r],a=e[r+1];if(l?.type!=="link"||a?.type!=="text"||typeof a.content!="string"||!a.content.startsWith("!"))continue;const u=String(l.href??"");if(String(l.text??"")!==u||!u.endsWith("=")&&!u.endsWith("#"))continue;Oce(l,"!");const c=a.content.slice(1);c?(a.content=c,a.raw=c):e.splice(r+1,1)}return e}function qce(e){e.core.ruler.after("inline","fix_list_item_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=Uce(s.children)}catch(o){console.error("[applyFixListItem] failed to fix inline children",o)}}})}function Uce(e){const t=e[e.length-1],n=String(t?.content??"");return t?.type==="text"&&/^\s*\d+\.\s*$/.test(n)&&e[e.length-2]?.tag==="br"&&e.splice(e.length-1,1),e}function Kce(e){e.core.ruler.after("inline","fix_strong_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=Vce(s.children)}catch(o){console.error("[applyFixStrongTokens] failed to fix inline children",o)}}})}function Vce(e){let t=0;const n=new Set,i=new Set;let s=0;for(let c=0;c<e.length;c++){const d=e[c],f=d.type;if(f==="strong_open"){t++;const p=String(d.markup??"");let g=c-1;for(;g>=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y<e.length&&e[y].type==="text"&&e[y].content==="";)y++;const w=e[y];p==="__"&&(m?.content?.endsWith("_")||w?.content?.startsWith("_")||w?.markup?.includes("_"))&&(d.type="text",d.tag="",d.content=p,d.raw=p,d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null,n.add(t))}else if(f==="strong_close")n.has(t)&&d.markup==="__"&&(d.type="text",d.content=d.markup,d.raw=String(d.markup??""),d.tag="",d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null),t--,t<0&&(t=0);else if(f==="em_open"){s++;const p=String(d.markup??"");let g=c-1;for(;g>=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y<e.length&&e[y].type==="text"&&e[y].content==="";)y++;const w=e[y];p==="_"&&(m?.content?.endsWith("_")||w?.content?.startsWith("_")||w?.markup?.includes("_"))&&(d.type="text",d.tag="",d.content=p,d.raw=p,d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null,i.add(s))}else f==="em_close"&&(i.has(s)&&d.markup==="_"&&(d.type="text",d.content=d.markup,d.raw=String(d.markup??""),d.tag="",d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null),s--,s<0&&(s=0))}if(e.length<5)return e;const o=e.length-4,r=e[o];let l=[...e];const a=e[o+1],u=String(r.content??"");if(r.type==="link_open"&&e[o-1]?.type==="em_open"&&e[o-2]?.type==="text"&&e[o-2].content?.endsWith("*")){const c=String(e[o-2].content??"").slice(0,-1),d=[{type:"strong_open",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""},e[o],e[o+1],e[o+2],{type:"strong_close",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""}];c&&d.unshift({type:"text",content:c,raw:c}),l.splice(o-2,6,...d)}else if(r.type==="text"&&u.endsWith("*")&&a.type==="em_open"){const c=e[o+2],d=c?.type==="text"?4:3,f=[{type:"strong_open",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""},{type:"text",content:c?.type==="text"?String(c.content??""):"",raw:c?.type==="text"?String(c.content??""):""},{type:"strong_close",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""}],p=u.slice(0,-1);p&&f.unshift({type:"text",content:p,raw:p}),l.splice(o,d,...f)}return l=Zce(l),l}function Zce(e){if(e.length<7)return e;const t=[];for(let n=0;n<e.length;n++){const i=e[n],s=e[n+1],o=e[n+2],r=e[n+3],l=e[n+4],a=e[n+5],u=e[n+6];if(i?.type==="strong_open"&&s?.type==="text"&&o?.type==="strong_close"&&r?.type==="strong_open"&&l?.type==="math_inline"&&a?.type==="strong_close"&&u?.type==="text"){const c=String(u.content??""),d=c.indexOf("**");if(d!==-1){const f=c.slice(0,d),p=c.slice(d+2);t.push(i),t.push(s),t.push(l),f&&t.push({...u,type:"text",content:f,raw:f}),t.push(a),p&&t.push({...u,type:"text",content:p,raw:p}),n+=6;continue}}if(i?.type==="strong_open"&&s?.type==="text"&&o?.type==="strong_close"&&r?.type==="strong_open"&&l?.type==="math_inline"&&a?.type==="strong_close"){const c=Gce(e,n+6);if(c){t.push(i),t.push(s),t.push(l);for(let d=n+6;d<c.index;d++)t.push(e[d]);c.beforeClose&&t.push({...e[c.index],type:"text",content:c.beforeClose,raw:c.beforeClose}),t.push(a),c.afterClose&&t.push({...e[c.index],type:"text",content:c.afterClose,raw:c.afterClose}),n=c.index;continue}}t.push(i)}return t}function Gce(e,t){for(let n=t;n<e.length;n++){const i=e[n];if(i?.type==="strong_open")return null;if(i?.type!=="text")continue;const s=String(i.content??""),o=s.indexOf("**");if(o!==-1)return{index:n,beforeClose:s.slice(0,o),afterClose:s.slice(o+2)}}return null}function Qce(e){e.core.ruler.after("block","fix_table_tokens",t=>{const n=t;try{const i=nde(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(i)&&(n.tokens=i)}catch(i){console.error("[applyFixTableTokens] failed to fix table tokens",i)}})}function dx(){return[{type:"table_open",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,loading:!0,meta:null},{type:"thead_open",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"tr_open",tag:"tr",attrs:null,block:!0,level:2,children:null}]}function fx(){return[{type:"tr_close",tag:"tr",attrs:null,block:!0,level:2,children:null},{type:"thead_close",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"table_close",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,meta:null}]}function hx(e){return[{type:"th_open",tag:"th",attrs:null,block:!0,level:3,children:null},{type:"inline",tag:"",children:null,content:e,level:4,attrs:null,block:!0},{type:"th_close",tag:"th",attrs:null,block:!0,level:3,children:null}]}function cF(e,t){if(!e.startsWith("|")||e.includes(` -`)||!e.endsWith("|"))return null;const n=e.slice(1).split("|");return n.at(-1)===""&&n.pop(),n.length>0&&n.every(i=>i.trim().length>0)?n:null}function Sy(e){return cF(e)!==null}function dF(e){return/^:?-+:?$/.test(e.trim())}function Yce(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(dF)}function Jce(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function Xce(e){if(e==="")return!0;if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|"),n=t.at(-1)??"";return t.slice(0,-1).every(dF)&&Jce(n)}function ede(e){return e==="|"||e==="|:"}function tde(e){const t=cF(e);return t!==null&&t.every(n=>!n.includes(":"))}function nde(e,t=!1,n=""){const i=[...e];if(e.length<3)return i;const s=e.length-2,o=e[s];if(o.type==="inline"){const r=String(o.content??""),l=r.split(` -`)[0]??"",[a="",u="",...c]=r.split(` -`),d=!t&&!r.includes(` -`)&&/\r?\n$/.test(n)&&Sy(r);if(!t&&(r.includes(` -`)&&c.length===0&&Sy(a)&&Xce(u)||d)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>hx(g)),p=[...dx(),...f,...fx()];i.splice(s-1,3,...p)}else if(r.includes(` -`)&&c.length===0&&Sy(a)&&Yce(u)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>hx(g)),p=[...dx(),...f,...fx()];i.splice(s-1,3,...p)}else r.includes(` -`)&&c.length===0&&tde(a)&&ede(u)&&(o.content=r.slice(0,-2),o.children.splice(2,1))}return i}function ide(e,t,n,i){const s=e.length;if(n==="$$"&&i==="$$"){let u=t;for(;u<s-1;){if(e[u]==="$"&&e[u+1]==="$"){let c=u-1,d=0;for(;c>=0&&e[c]==="\\";)d++,c--;if(d%2===0)return u}u++}return-1}const o=n[n.length-1],r=i;let l=0,a=t;for(;a<s;){if(e.slice(a,a+r.length)===r){let c=a-1,d=0;for(;c>=0&&e[c]==="\\";)d++,c--;if(d%2===0){if(l===0)return a;l--,a+=r.length;continue}}const u=e[a];if(u==="\\"){a+=2;continue}u===o?l++:u===r[r.length-1]&&l>0&&l--,a++}return-1}var sde=ide;const ode=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],Wm=ode.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),rde=/\\[a-z]+/i,fF="(?:\\\\|\\u0008)",lde=new RegExp(String.raw`${fF}(?:${Wm})\s*\{[^}]+\}`,"i"),ade=new RegExp(String.raw`(?:${fF})?(?:${Wm})\s*\{`,"i"),ude=/\\(?:text|frac|left|right|times)/,cde=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,dde=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,fde=/[A-Z]+\s*\([^)]+\)/i,hde=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,pde=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,gde=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,mde={"\b":"\\b","\v":"\\v","\f":"\\f"};function vde(e){let t="";for(const n of e)t+=mde[n]??n;return t}function ou(e){if(!e)return!1;const t=vde(e),n=t.trim();if(gde.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const i=rde.test(t),s=lde.test(t),o=ade.test(t),r=ude.test(t),l=/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t)||/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t),a=cde.test(t)&&!dde.test(t),u=fde.test(t),c=hde.test(n),d=pde.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),p=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return i||s||o||r||l||a||u||c||d||f||p}const hF="__markstreamMathPluginApplied",Q3=80,pF=2e4,px=pF+4096;function pb(e){return!!e[hF]}function yde(e){e[hF]=!0}const gF=["ldots","cdots","quad","in","displaystyle","int_","lim","lim_","ce","pu","end","infty","perp","mid","operatorname","to","rightarrow","leftarrow","math","mathrm","mathit","mathbb","mathcal","mathfrak","implies","alpha","beta","gamma","delta","epsilon","lambda","sum","sum_","prod","sqrt","fbox","boxed","color","rule","edef","fcolorbox","hline","hdashline","cdot","times","pm","le","ge","neq","sin","cos","tan","log","ln","exp","frac","text","left","right"],bde=["cdot","mathbf{","partial","mu_{"],mF=gF.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),vF="[ \r\b\f\v]",kde=new RegExp(`([^\\\\])(${bde.map(e=>e).join("|")})+`,"g"),Ade=/span\{([^}]+)\}/,Cde=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,wde=/(^|[^\\])\\\r?\n/g,xde=/(^|[^\\])\\$/g,_de=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,Sde=new RegExp(`(${vF})|(${mF})\\b`,"g"),gx=new Map,mx=new Map;function Mde(e){if(!e)return Sde;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),i=gx.get(n);if(i)return i;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,o=new RegExp(`(${vF})|(${s})\\b`,"g");return gx.set(n,o),o}function Ide(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const i=e?"__default__":n.join(""),s=mx.get(i);if(s)return s;const o=e?[Wm,mF].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),Wm].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${o})\\s*\\{`,"g");return mx.set(i,r),r}const vx={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function yx(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function Ede(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&_de.test(n))return t;const i=n?t.slice(n.length):t;return`${n}${"\\!".repeat(i.length)}`})}function bx(e){const t=/(^|[^\\])(__|\*\*)/g;let n,i=null;for(;(n=t.exec(e))!==null;)i={marker:n[2],index:n.index+(n[1]?.length??0)};return i}function Va(e,t){const n=t?.commands??gF,i=t?.escapeExclamation??!0,s=t?.commands==null,o=Mde(s?void 0:n);let r=e.replace(o,(u,c,d,f,p)=>{if(c!==void 0&&vx[c]!==void 0)return`\\${vx[c]}`;if(d&&n.includes(d)){const g=p&&typeof f=="number"?p[f-1]:void 0;return g==="\\"||g&&/\w/.test(g)?u:`\\${d}`}return u});i&&(r=Ede(r));let l=r;const a=Ide(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(Ade,"span\\{$1\\}").replace(Cde,"\\operatorname{span}\\{$1\\}"),l=l.replace(wde,`$1\\\\ -`),l=l.replace(xde,"$1\\\\"),l=l.replace(kde,"$1\\$2"),l}function kx(e){const t=e.trim();return!(!ou(t)||/"[^"\n]{1,80}"\s*:\s*/.test(t)||!(/\\[a-z]+/i.test(t)||/[=+*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/.test(t)||/[_^]/.test(t))&&/\s-\s/.test(t))}function yF(e){const t=[];let n=0;for(;n<e.length;){if(e[n]!=="`"){n++;continue}const i=n;let s=1;for(;i+s<e.length&&e[i+s]==="`";)s++;let o=i+s,r=-1;for(;o<e.length;){if(e[o]!=="`"){o++;continue}let l=1;for(;o+l<e.length&&e[o+l]==="`";)l++;if(l===s){r=o;break}o+=l}if(r!==-1){t.push([i,r+s]),n=r+s;continue}n=i+s}return t}function qm(e,t){for(const n of e)if(t>=n[0]&&t<n[1])return n;return null}function Tde(e,t=!1){const n=[];let i=0;for(;i<e.length-1;){if(e[i]==="!"&&e[i+1]==="["){const s=i;let o=i+2,r=1;for(;o<e.length&&r>0;){if(e[o]==="\\"&&o+1<e.length){o+=2;continue}e[o]==="["?r++:e[o]==="]"&&r--,o++}if(r===0&&o<e.length&&e[o]==="("){let l=o+1,a=1;for(;l<e.length&&a>0;){if(e[l]==="\\"&&l+1<e.length){l+=2;continue}e[l]==="("?a++:e[l]===")"&&a--,l++}if(a===0){n.push([s,l]),i=l;continue}if(t){n.push([s,e.length]),i=e.length;continue}}}i++}return n}function Ip(e,t){let n=t-1,i=0;for(;n>=0&&e[n]==="\\";)i++,n--;return i%2===1}function Y3(e,t){let n=t;for(;n<e.length;){const i=e.indexOf("$",n);if(i===-1)return-1;if(Ip(e,i)){n=i+1;continue}return i}return-1}function My(e,t){let n=t;for(;n<e.length;){const i=Y3(e,n);if(i===-1)return-1;if(i>0&&e[i-1]==="$"||i+1<e.length&&e[i+1]==="$"){n=i+1;continue}return i}return-1}function Pd(e,t,n=0){let i=Math.max(0,n);for(;i<e.length;){const s=e.indexOf(t,i);if(s===-1)return-1;if(!Ip(e,s))return s;i=s+Math.max(1,t.length)}return-1}function Ax(e,t,n=0,i=e.length,s=[]){let o=0,r=Math.max(0,n);const l=Math.min(e.length,Math.max(0,i));for(;r<l;){const a=e.indexOf(t,r);if(a===-1||a>=l)break;const u=qm(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}Ip(e,a)||o++,r=a+Math.max(1,t.length)}return o}function gb(e,t,n){const i=sp(String(e??""));if(!i.endsWith(t))return-1;const s=i.length-t.length;if(s<=0||!sp(i.slice(0,s)).trim()||Ip(i,s))return-1;const o=yF(i);if(qm(o,s))return-1;const r=Ax(i,t,0,s,o);if(t==="$$"){if(r%2===1)return-1}else if(r>Ax(i,n,0,s,o))return-1;return s}function ip(e){return e===" "||e===" "}function sp(e){let t=e.length;for(;t>0&&ip(e[t-1]);)t--;return e.slice(0,t)}function Cx(e){let t=0;for(let n=0;n<e.length;n++)e[n]===` -`&&t++;return t}function wx(e){if(!e)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}function Lde(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let i=0;i<e.length;i++){const s=e[i];if(s===t){n++;continue}if(!ip(s))return!1}return n>=3}function Nde(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let i=0;for(;t[n]==="-";)i++,n++;return i<3?!1:(t[n]===":"&&n++,n===t.length)}function Fde(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(Nde)}function Bde(e){let t=0;if(!wx(e[t]))return!1;for(;wx(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:ip(e[t+1])}function bF(e){const t=e.trimStart();if(!t||t.startsWith("```")||t.startsWith("~~~")||t.startsWith(":::")||t[0]===">"||t[0]==="<")return!0;if(t[0]==="#"){let n=0;for(;t[n]==="#";)n++;if(n>=1&&n<=6&&ip(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&ip(t[1])||Bde(t)||Lde(t)||Fde(t))}function xx(e,t){return e?t?`${e} -${t}`:e:t}function J3(e){const t=String(e??"").trim();return t?ou(t):!1}function _x(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)|0;return t.toString(36)}function kF(e){if(e.length<=px)return{source:e,lineOffset:0};let t=e.length-px;const n=e.indexOf(` -`,t);return n===-1?{source:"",lineOffset:Cx(e)}:(t=n+1,{source:e.slice(t),lineOffset:Cx(e.slice(0,t))})}function AF(e){const t=String(e??"");if(!t||!t.includes("$$")&&!t.includes("\\["))return!1;const{source:n}=kF(t);if(!n)return!1;const i=n.split(/\r?\n/),s=Math.max(0,i.length-Q3-2),o=[["$$","$$"],["\\[","\\]"]];for(let r=s;r<i.length;r++){const l=sp(i[r]);if(l&&!bF(l)){for(const[a,u]of o)if(gb(l,a,u)!==-1)return!0}}return!1}function $de(e){const t=String(e??"");if(!t||!t.includes("$$")&&!t.includes("\\["))return null;const{source:n,lineOffset:i}=kF(t);if(!n)return null;const s=n.split(/\r?\n/),o=Math.max(0,s.length-Q3-2),r=[["$$","$$"],["\\[","\\]"]];for(let l=o;l<s.length-1;l++){const a=sp(s[l]);for(const[u,c]of r){const d=gb(a,u,c);if(d===-1)continue;let f="",p=!1;for(let g=l+1;g<s.length;g++){if(g-l>Q3){p=!0;break}const m=s[g],y=Pd(m,c);if(y!==-1){const w=xx(f,m.slice(0,y));if(!J3(w)){p=!0;break}const k=m.slice(y+c.length),A=k.trim()?`suffix:${_x(k)}`:"nosuffix";return["closed",u,i+l,d,i+g,y,_x(w),A].join(":")}if(bF(m)){p=!0;break}if(f=xx(f,m),f.length>pF){p=!0;break}}if(!p&&J3(f))return["pending",u,i+l,d].join(":")}}return null}function Iy(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function Dde(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const i=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(i)?!1:i===""||/^[)\s,.!?;:]/.test(i)}function Ey(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function Rde(e,t){yde(e);const n=(r,l,a)=>{const u=String(l??"").replace(/^[\t ]+/,"").replace(/[\t ]+$/,"");if(!u)return;const c=r.push("paragraph_open","p",1);c.map=[a,a+1];const d=r.push("inline","",0);d.content=u,d.map=[a,a+1],d.children=[],r.push("paragraph_close","p",-1)},i=(r,l)=>{const a=r,u=!!t?.strictDelimiters,c=!a?.env?.__markstreamFinal,d=(k,A)=>{let v=A;for(;v<k.length&&(k[v]===" "||k[v]===" ");)v++;if(v===A||!(k[v]===` -`||k[v]==="\r"&&k[v+1]===` -`))return A;const x=k.slice(A,v),E=a.push("text","",0);return E.content=x,v};if(/^\*[^*]+/.test(a.src))return!1;if(a.src[a.pos]==="$"){let k=a.pos+1;for(;a.src[k]==="$";)k++;const A=k-a.pos,v=a.src[k];if(A>=3&&(!v||/\s/.test(v))){const x=a.push("text","",0);return x.content=a.src.slice(a.pos,k),a.pos=k,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],p=String(a.pending??""),g=Math.max(0,a.pos-p.length);let m=g,y=g;const w=g;for(const[k,A]of f){const v=a.src,x=yF(v),E=Tde(v,c);let S=!1;k==="$$"&&m!==w&&(m=w);let M=-1,_=-1,N=0;const D=T=>{if((T==="undefined"||T==null)&&(T=""),T==="\\"){a.pos=a.pos+T.length,m=a.pos;return}if(T==="\\)"||T==="\\("){const O=a.push("text_special","",0);O.content=T==="\\)"?")":"(",O.markup=T,a.pos=a.pos+T.length,m=a.pos;return}if(!T)return;if(k==="$$"&&T.includes("$")){let O=0;for(;O<T.length;){const R=Y3(T,O);if(R===-1){const ie=T.slice(O);if(ie){const xe=a.push("text","",0);xe.content=ie,a.pos=a.pos+ie.length,m=a.pos}break}if(R>0&&T[R-1]==="$"||R+1<T.length&&T[R+1]==="$"){const ie=T.slice(O,R+1);if(ie){const xe=a.push("text","",0);xe.content=ie,a.pos=a.pos+ie.length,m=a.pos}O=R+1;continue}const W=T.slice(O,R);if(W){const ie=a.push("text","",0);ie.content=W,a.pos=a.pos+W.length,m=a.pos}const z=My(T,R+1);if(z===-1){const ie=T.slice(R),xe=a.push("text","",0);xe.content=ie,a.pos=a.pos+ie.length,m=a.pos;break}const G=T.slice(R+1,z),K=G.includes("`"),H=!G||!G.trim(),q=T[z+1],X=Iy(G,q),ee=Ey(G);if(!K&&!H&&!X&&!ee){const ie=a.push("math_inline","math",0);ie.content=Va(G,t),ie.markup="$",ie.raw=`$${G}$`,ie.loading=!1,a.pos=a.pos+(z-R+1),m=a.pos,O=z+1;continue}const ue=a.push("text","",0);ue.content="$",a.pos=a.pos+1,m=a.pos,O=R+1}return}const $=T.indexOf("![");if($!==-1){if($>0){const W=T.slice(0,$),z=a.push("text","",0);z.content=W,a.pos=a.pos+W.length,m=a.pos}const O=T.slice($).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(O){const[,W,z]=O,G=z.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),K=G?G[1]:z,H=G&&G[2]?G[2]:null,q=a.push("image","img",0);q.attrs=[["src",K],["alt",W]],H&&q.attrs.push(["title",H]),q.content=W,q.children=[{type:"text",content:W,tag:""}],a.pos=a.pos+O[0].length,m=a.pos;const X=T.slice($+O[0].length);X&&D(X);return}const R=a.push("text","",0);R.content=T,a.pos=a.pos+T.length,m=a.pos;return}const P=a.push("text","",0);P.content=T,a.pos=a.pos+T.length,m=a.pos};for(;!(m>=v.length);){const T=v.indexOf(k,m);if(T===-1)break;if(Ip(v,T)){m=T+Math.max(1,k.length);continue}const $=qm(x,T);if($){m=$[1];continue}const P=qm(E,T);if(P){m=P[1];continue}if(T===M&&m===_){if(N++,N>2){m=T+Math.max(1,k.length);continue}}else N=0,M=T,_=m;if(k==="("&&T>0){let X=T-1;for(;X>=0&&v[X]===" ";)X--;if(X>=0&&v[X]==="]"){m=T+k.length;continue}}if(k==="$"&&T>0&&v[T-1]==="$"){m=T+1;continue}if(k==="$"&&T<v.length-1&&v[T+1]==="$"){m=T+2;continue}const O=k==="$"?My(v,T+k.length):sde(v,T+k.length,k,A);if(O===-1){const X=v.slice(T+k.length);if(X.includes(k)){m=v.indexOf(k,T+k.length);continue}if(O===-1){const ee=k==="$"&&Dde(X);if(c&&!u&&!ee&&ou(X)&&!X.includes("`")){if(m=T+k.length,S=!0,!l){a.pending="";const ue=y?v.slice(y,m):v.slice(0,m),ie=yx(ue)%2===1;if(y)D(v.slice(y,m));else{let xe=v.slice(0,m);xe.endsWith(k)&&(xe=xe.slice(0,xe.length-k.length)),D(xe)}if(ie){const xe=bx(ue)?.marker??"**",ce=a.push("strong_open","",0);ce.markup=xe;const pe=a.push("math_inline","math",0);pe.content=Va(X,t),pe.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",pe.raw=`${k}${X}${A}`,pe.loading=!0,ce.content=X,a.push("strong_close","",0)}else{const xe=a.push("math_inline","math",0);xe.content=Va(X,t),xe.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",xe.raw=`${k}${X}${A}`,xe.loading=!0}a.pos=v.length}m=v.length,y=m}break}}const R=v.slice(T+k.length,O),W=R.includes("`"),z=!R||!R.trim(),G=k==="$",K=v[O+A.length],H=G&&Iy(R,K),q=G&&Ey(R);if(u?W||z||H||q:W||z||H||q||!G&&!ou(R)){m=O+A.length;const X=v.slice(a.pos,m);a.pending||(D(X),y=m);continue}if(S=!0,!l){const X=v.slice(a.pos-(a.pending??"").length,T);let ee=v.slice(0,m)?v.slice(y,T):X;const ue=yx(ee)%2===1;T!==a.pos&&ue&&(ee=a.pending+v.slice(a.pos,T));const ie=ue?bx(ee):null,xe=ie?.marker??"**";if(a.pending!==ee)if(a.pending="",ue)if(ie){const ce=ee.slice(ie.index+xe.length);D(ee.slice(0,ie.index));const pe=a.push("strong_open","",0);pe.markup=xe;const Ne=a.push("text","",0);Ne.content=ce,a.push("strong_close","",0)}else D(ee);else D(ee);if(ue){const ce=a.push("strong_open","",0);ce.markup=xe;const pe=a.push("math_inline","math",0);pe.content=Va(R,t),pe.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",pe.raw=`${k}${R}${A}`,pe.loading=!1;const Ne=v.slice(O+A.length).startsWith(xe);return Ne&&a.push("strong_close","",0),a.pos=d(v,O+A.length),m=a.pos,y=m,Ne||a.push("strong_close","",0),!0}else{const ce=a.push("math_inline","math",0);ce.content=Va(R,t),ce.markup=k==="$$"?"$$":k==="\\("?"\\(\\)":k==="$"?"$":"()",ce.raw=`${k}${R}${A}`,ce.loading=!1}}return m=d(v,O+A.length),y=m,a.pos=m,!0}if(S){if(l)a.pos=m;else{if(k==="$$"&&m<v.length&&v.slice(m).includes("$")){let T=m;for(;!(T>=v.length);){const $=Y3(v,T);if($===-1)break;if($+1<v.length&&v[$+1]==="$"){T=$+2;continue}if($>0&&v[$-1]==="$"){T=$+1;continue}const P=My(v,$+1);if(P===-1)break;const O=v.slice($+1,P),R=O.includes("`"),W=!O||!O.trim(),z=v[P+1],G=Iy(O,z),K=Ey(O);if(!R&&!W&&!G&&!K){const H=v.slice(m,$);H&&D(H);const q=a.push("math_inline","math",0);q.content=Va(O,t),q.markup="$",q.raw=`$${O}$`,q.loading=!1,m=P+1,T=P+1}else D("$"),T=$+1}T<v.length&&D(v.slice(T))}else m<v.length&&D(v.slice(m));a.pos=v.length}return!0}}return!1},s=(r,l,a,u)=>{const c=r,d=!c?.env?.__markstreamFinal,f=t?.strictDelimiters,p=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],g=c.bMarks[l]+c.tShift[l];let m=c.src.slice(g,c.eMarks[l]).trim(),y=!1,w="",k="",A=!1,v="",x=!1;for(const[H,q]of p)if(m.startsWith(H))if(H.includes("[")){const X=H==="\\["?m.slice(H.length):"";if(H==="\\["&&Pd(X,q)===-1&&!/^\s*!\[/.test(X)&&!X.includes("`")&&ou(X)){y=!0,w=H,k=q;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(l+1<a){y=!0,w=H,k=q;break}continue}}else if(m.replace("\\","")==="["){if(l+1<a){y=!0,w=H,k=q;break}continue}else{const ee=c.tokens[c.tokens.length-1];if(ee&&ee.type==="list_item_open"&&ee.mark==="-"&&m.slice(H.length,m.indexOf("]")).trim()==="x")continue;if(m.replace("\\","").startsWith("[")&&!m.includes("](")){const ue=m.indexOf("]");if(m.slice(ue).trim()!=="]")continue;const ie=m.slice(H.length,ue);if(H==="["?kx(ie):ou(ie)){y=!0,w=H,k=q;break}continue}}}else{y=!0,w=H,k=q;break}else if((H==="$$"||H==="\\[")&&m.endsWith(H)&&l+1<a){const X=gb(m,H,q);if(X===-1)continue;v=sp(m.slice(0,X)),x=!0;const ee=c.bMarks[l+1]+c.tShift[l+1];m=c.src.slice(ee,c.eMarks[l+1]).trim(),A=!0,y=!0,w=H,k=q;break}if(!y)return!1;if(u&&!x)return!0;const E=m.indexOf(w),S=E+w.length,M=!f&&w==="["?m.indexOf("\\]",S):-1,_=M>=0?"\\]":k,N=M>=0?M:Pd(m,k,S);if(!A&&N>w.length){const H=m.slice(E+w.length,N),q=c.push("math_block","math",0);q.content=Va(H),q.markup=w==="$$"?"$$":w==="["?"[]":"\\[\\]",q.map=[l,l+1],q.raw=`${w}${H}${_}`,q.block=!0,q.loading=!1,c.line=l+1;const X=m.slice(N+_.length);return X.trim()&&n(c,X,l),!0}let D=l,T="",$=!1,P="",O=l;const R=A?m:m===w?"":m.slice(w.length),W=!f&&w==="\\["?"]":"",z=Pd(R,k);if(z!==-1){const H=z;T=R.slice(0,H),P=R.slice(H+k.length),O=A?l+1:l,$=!0,D=O}else for(R&&!A&&(T=R),D=l+1;D<a;D++){const H=c.bMarks[D]+c.tShift[D],q=c.eMarks[D],X=c.src.slice(H,q),ee=X.trim();if(!f&&w==="["&&ee==="\\]"){k="\\]",$=!0;break}if(W&&X.trim()===W){k=W,$=!0;break}if(ee===k){$=!0;break}else if(!f&&w==="["&&X.includes("\\]")){$=!0;const ue=X.indexOf("\\]");k="\\]";const ie=X.slice(0,ue);ie&&(T+=(T?` -`:"")+ie),P=X.slice(ue+k.length),O=D;break}else if(Pd(X,k)!==-1){$=!0;const ue=Pd(X,k),ie=X.slice(0,ue);ie&&(T+=(T?` -`:"")+ie),P=X.slice(ue+k.length),O=D;break}T+=(T?` -`:"")+X}if((!d||f)&&!$)return!1;const G=/^\s*!\[/.test(T);if(!(x?!G&&J3(T):w==="$$"?!G:w==="["?kx(T):ou(T)))return!1;if(u)return!0;v&&n(c,v,l);const K=c.push("math_block","math",0);return K.content=Va(T),K.markup=w==="$$"?"$$":w==="["?"[]":"\\[\\]",K.raw=`${w}${T}${T.startsWith(` -`)?` -`:""}${k}`,K.map=[l,D+1],K.block=!0,K.loading=!$,c.line=D+1,P.trim()&&n(c,P,O),!0},o=(r,l,a,u)=>{const c=r,d=c.bMarks[l]+c.tShift[l],f=c.src.slice(d,c.eMarks[l]).trim();return!f.startsWith("$$")&&!f.startsWith("\\[")?!1:s(r,l,a,u)};e.inline.ruler.before("escape","math",i),e.block.ruler.before("lheading","explicit_math_block",o,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function zde(e){const t=e.renderer.rules.image||function(n,i,s,o,r){const l=n,a=r;return a.renderToken?a.renderToken(l,i,s):""};e.renderer.rules.image=(n,i,s,o,r)=>{const l=n;return l[i].attrSet?.("loading","lazy"),t(l,i,s,o,r)},e.renderer.rules.fence=e.renderer.rules.fence||((n,i)=>{const s=n[i],o=String(s.info??"").trim();return`<pre class="${o?`language-${e.utils.escapeHtml(o.split(/\s+/g)[0])}`:""}"><code>${e.utils.escapeHtml(String(s.content??""))}</code></pre>`})}const Ode=/^<a[>\s]/i,Pde=/^<\/a\s*>/i;function jde(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.test(String(e.content??""));let i=0;for(let s=n.length-1;s>=0;s--){const o=n[s];if(o?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==o.level&&n[s]?.type!=="link_open";)s--;continue}if(o?.type==="html_inline"){const r=String(o.content??"");Ode.test(r)&&i>0&&i--,Pde.test(r)&&i++}if(!(i>0)&&o?.type==="text"&&t.test(String(o.content??"")))return!0}return!1}function Hde(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(i=>i.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",i=>{if(!i.md?.options?.linkify)return;const s=Array.isArray(i.tokens)?i.tokens:[],o=i.md.linkify;if(!o)return;const r=s.filter(l=>jde(l,o));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(i)),i,{tokens:r}))})}function Wde(e){const t=e.inline.ruler,n=t.getNamedRules?.(),i=n?.find(l=>l.name==="link")?.fn,s=n?.find(l=>l.name==="image")?.fn;if(typeof i!="function"||typeof s!="function")return;const o=e.validateLink,r=e;r.__markstreamOriginalValidateLink=o,t.at("link",(...l)=>{const a=l[0].md,u=a?.validateLink===o?a.options?.validateLink:a?.validateLink;if(!a||typeof u!="function")return i(...l);const c=a.validateLink;a.validateLink=u;try{return i(...l)}finally{a.validateLink=c}}),t.at("image",(...l)=>{const a=l[0].md;if(!a)return s(...l);const u=a.validateLink;a.validateLink=o;try{return s(...l)}finally{a.validateLink=u}})}function qde(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},i=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),o=new vue({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:i,...n}});if(!s){const r=l=>!Rc(l,{tagName:"a",attrName:"href"});Rce(r),o.set({validateLink:r})}return Wde(o),Hde(o),(e.enableMath??!0)&&Rde(o,{...e.mathOptions??{}}),(e.enableContainers??!0)&&Rue(o),e.enableFixIndentedCodeBlock!==!1&&rce(o),Hce(o),Kce(o),qce(o),Qce(o),zde(o),sce(o,{customHtmlTags:e.customHtmlTags}),o}function zc(e){const t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(n=>[...n])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(n=>zc(n))),t}function Ude(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function Kde(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,i=n===""||n==="true";return{type:"checkbox_input",checked:i,raw:i?"[x]":"[ ]"}}function Vde(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function V0(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="em_close";){const l=e[o];s+=String(e[o].content??l.text??""),r.push(e[o]),o++}return i.push(...Ki(r,void 0,void 0,n)),{node:{type:"emphasis",children:i,raw:`*${s}*`},nextIndex:o<e.length?o+1:e.length}}function Zde(e,t){return new RegExp(`\r? -[ \\t]*${e}{${t},}[ \\t]*$`)}const CF=["diff ","index ","--- ","+++ ","@@ "],Gde=/\r?\n/;function Qde(e){const t=String(e??"");return t?CF.some(n=>n.startsWith(t)||t.startsWith(n)):!1}function Sx(e,t,n,i){n.length>0&&e.push(...n),i.length>0&&t.push(...i),n.length=0,i.length=0}function Mx(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function Yde(e,t){const n=[],i=[],s=[],o=[],r=e.split(Gde),l=/\r?\n$/.test(e),a=r.some(p=>p.startsWith("diff ")||p.startsWith("--- ")||p.startsWith("+++ ")||p.startsWith("@@ ")),u=p=>{const g=p;if(!CF.some(m=>g.startsWith(m)))if(g.startsWith("-")){const m=g.slice(1);s.push(Mx(m,a))}else if(g.startsWith("+")){const m=g.slice(1);o.push(Mx(m,a))}else{Sx(n,i,s,o);const m=a&&g.startsWith(" ")?g.slice(1):g;n.push(m),i.push(m)}},c=l?Math.max(0,r.length-1):r.length;for(let p=0;p<c;p++){const g=r[p]??"";!t&&!l&&p===c-1&&Qde(g)||u(g)}(t||s.length>0||o.length>0)&&Sx(n,i,s,o);const d=n.join(` -`),f=i.join(` -`);return{original:t&&l&&d?`${d} -`:d,updated:t&&l&&f?`${f} -`:f}}function mb(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},i=typeof n.closed=="boolean"?n.closed:void 0,s=i===!0||i!==!1&&t,o=String(e.info??""),r=o.startsWith("diff"),l=r?(()=>{const u=o,c=u.indexOf(" ");return c===-1?"":String(u.slice(c+1)??"")})():o;let a=String(e.content??"");if(!s&&e.markup){const u=e.markup[0],c=e.markup.length,d=Zde(u,c);d.test(a)&&(a=a.replace(d,""))}if(r){const{original:u,updated:c}=Yde(a,s===!0);return{type:"code_block",language:l,code:String(c??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t,originalCode:u,updatedCode:c}}return{type:"code_block",language:l,code:String(a??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t}}function Jde(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function Xde(){return{type:"hardbreak",raw:`\\ -`}}function efe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="mark_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Ki(r,void 0,void 0,n)),{node:{type:"highlight",children:i,raw:`==${s}==`},nextIndex:o<e.length?o+1:e.length}}let Ty=null;const Ly=new WeakMap;function Ix(){return Ty||(Ty={customTagSet:null,allowedTagSet:Cv()}),Ty}function wF(e){const t=e.match(/^<\s*(?:\/\s*)?([\w-]+)/);return t?t[1].toLowerCase():""}function xF(e){return/^<\s*\//.test(e)}function _F(e,t){return/\/\s*>\s*$/.test(t)||Su.has(e)}function tfe(e){if(!e||e.length===0)return Ix();const t=Ly.get(e);if(t)return t;const n=e.map(Ur).filter(Boolean);if(!n.length){const s=Ix();return Ly.set(e,s),s}const i={customTagSet:new Set(n),allowedTagSet:Cv({customHtmlTags:e})};return Ly.set(e,i),i}function SF(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function nfe(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,i=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof i=="string"?{raw:n,inner:i}:null}function Um(e,t){const n=t.toLowerCase();for(let i=e.length-1;i>=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function ife(e,t,n){const i=e.slice();return Um(i,"href")||i.push(["href",t]),n!=null&&!Um(i,"title")&&i.push(["title",n]),i}function X3(e){return e.map(SF).join("")}function Ng(e){const t=[],n=i=>{const s=String(i??"");if(!s)return;const o=t[t.length-1];if(o?.type==="text"){o.content=`${o.content}${s}`,o.raw=`${o.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const i of e)if(i){if(i.type==="reference"||i.type==="footnote_reference"){n(String(i.raw??""));continue}if("children"in i&&Array.isArray(i.children)){t.push({...i,children:Ng(i.children)});continue}t.push(i)}return t}function sfe(e,t,n){let i=0;for(let s=t;s<e.length;s++){const o=e[s];if(o.type!=="html_inline")continue;const r=String(o.content??""),l=wF(r),a=xF(r),u=_F(l,r);if(!a&&!u&&l===n){i++;continue}if(a&&l===n){if(i===0)return s;i--}}return-1}function Ny(e,t,n){const i=[e[t]];let s=[],o=t+1,r=!1;const l=n?sfe(e,t+1,n):-1;return l!==-1?(s=e.slice(t+1,l),i.push(...s,e[l]),o=l+1,r=!0):(s=e.slice(t+1),s.length&&i.push(...s),o=e.length),{closed:r,html:X3(i),innerTokens:s,nextIndex:o}}function ofe(e,t,n,i,s,o,r){const l=String(e.content??""),a=wF(l),{customTagSet:u,allowedTagSet:c}=tfe(r?.customHtmlTags);if(!a)return[{type:"inline_code",code:l,raw:l},n+1];if(!c.has(a)&&!Ny(t,n,a).closed){const x=SF(e);return[{type:"text",content:x,raw:x},n+1]}if(a==="br")return[{type:"hardbreak",raw:l},n+1];const d=xF(l),f=_F(a,l);if(d)return[{type:"html_inline",tag:a,content:l,children:[],raw:l,loading:!1},n+1];if(a==="a"){const x=Ny(t,n,a),E=yv(l),S=x.innerTokens,M=String(Um(E,"href")??""),_=Um(E,"title"),N=_==null?null:String(_),D=ife(E,M,N),T=Ng(S.length?i(S,s,o,r):[]),$=S.length?X3(S):M||"";return!T.length&&$&&T.push({type:"text",content:$,raw:$}),[{type:"link",href:M,title:N,text:$,attrs:D,children:T,loading:!x.closed,raw:x.html||l},x.nextIndex]}if(f)return[{type:u?.has(a)?a:"html_inline",tag:a,content:l,children:[],raw:l,loading:!1},n+1];const p=Ny(t,n,a);if(a==="p"||a==="div")return[{type:"paragraph",children:Ng(p.innerTokens.length?i(p.innerTokens,s,o,r):[]),raw:p.html},p.nextIndex];const g=Ng(p.innerTokens.length?i(p.innerTokens,s,o,r):[]);let m=p.html||l,y=!p.closed,w=!1;if(!p.closed){const x=`</${a}>`;m.toLowerCase().includes(x.toLowerCase())||(m+=x),w=!0,y=!0}const k=[],A=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let v;for(;(v=A.exec(l))!==null;){const x=v[1],E=v[2]||v[3]||v[4]||"";k.push([x,E])}if(u?.has(a)){const x=nfe(e);return[{type:a,tag:a,attrs:k,content:x?x.inner:p.innerTokens.length?X3(p.innerTokens):"",children:p.innerTokens.length?i(p.innerTokens,s,o,r):[],raw:x?.raw??m,loading:e.loading||y,autoClosed:w},p.nextIndex]}return[{type:"html_inline",tag:a,attrs:k,content:m,children:g,raw:m,loading:y,autoClosed:w},p.nextIndex]}function MF(e){if(e.type==="math_inline"){if(e.raw)return String(e.raw);const t=e.markup==="$$"?"$$":"$";return`${t}${String(e.content??"")}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(t=>MF(t)).join(""):String(e.content??"")}function rfe(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>MF(t)).join("")}function Ex(e,t=!1){let n=e.attrs??[],i=null;if((!n||n.length===0)&&Array.isArray(e.children))for(const d of e.children){const f=d.attrs;if(Array.isArray(f)&&f.length>0){n=f,i=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),o=n.find(d=>d[0]==="alt")?.[1],r=rfe(i??e);let l="";r?l=r:o!=null&&String(o).length>0?l=String(o):i?.content!=null&&String(i.content).length>0?l=String(i.content):Array.isArray(i?.children)&&i.children[0]?.content?l=String(i.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?l=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(l=String(e.content));const a=n.find(d=>d[0]==="title")?.[1]??null,u=a===null?null:String(a),c=String(e.content??"");return{type:"image",src:s,alt:l,title:u,raw:c,loading:t}}function lfe(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function afe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="ins_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Ki(r,void 0,void 0,n)),{node:{type:"insert",children:i,raw:`++${String(s)}++`},nextIndex:o<e.length?o+1:e.length}}function ufe(e){const t=[];if(!Array.isArray(e))return t;for(const n of e){const i=n?.[0];i&&t.push([String(i),String(n?.[1]??"")])}return t}function Km(e,t){const n=t.toLowerCase();for(let i=e.length-1;i>=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function cfe(e,t,n){const i=e.slice();return Km(i,"href")||i.push(["href",t]),n!=null&&!Km(i,"title")&&i.push(["title",n]),i}function Z0(e,t,n){const i=e[t],s=ufe(i.attrs),o=String(Km(s,"href")??""),r=Km(s,"title"),l=r==null?null:String(r),a=cfe(s,o,l);let u=t+1;const c=[];let d=!0;for(;u<e.length&&e[u].type!=="link_close";)c.push(e[u]),u++;e[u]?.type==="link_close"&&(d=!1);let f=c;const p=c[c.length-1];if(n?.__insideStrong&&p?.type==="text"&&String(p.content??"").endsWith("**")&&!c.some(y=>y.type==="strong_open")){const y=String(p.content??""),w=String(p.raw??y),k=zc(p);k.content=y.slice(0,-2),k.raw=w.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=k}const g=Ki(f,void 0,void 0,n),m=g.map(y=>{const w=y;return"content"in y?String(w.content??""):String(w.raw??"")}).join("");return{node:{type:"link",href:o,title:l,text:m,children:g,raw:`[${m}](${o}${l?` "${l}"`:""})`,loading:d,attrs:a},nextIndex:u<e.length?u+1:e.length}}function Tx(e){const t=e.content??"",n=e.raw==="$$"?`$${t}$`:e.raw||"";return{type:"math_inline",content:t,loading:!!e.loading,raw:n,markup:e.markup}}function dfe(e){return{type:"reference",id:String(e.content??""),raw:String(e.markup??`[${e.content??""}]`)}}function Lx(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="s_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Ki(r,void 0,void 0,n)),{node:{type:"strikethrough",children:i,raw:`~~${s}~~`},nextIndex:o<e.length?o+1:e.length}}const ffe=/\\([\\()[\]`$|*_\-!])/g;function hfe(e,t){if(!e)return;const n=String(e);if(n&&(n===t||n.replace(ffe,"$1")===t))return n}function Mh(e,t,n,i){const s=[];let o="",r=t+1;const l=[];let a=1;for(;r<e.length;){if(e[r].type==="strong_close"){if(a===1)break;a--}e[r].type==="strong_open"&&a++,o+=String(e[r].content??""),l.push(e[r]),r++}const u={...i,__insideStrong:!0};return s.push(...Ki(l,hfe(n,o),void 0,u)),{node:{type:"strong",children:s,raw:`**${String(o)}**`},nextIndex:r<e.length?r+1:e.length}}function pfe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="sub_close";)s+=String(e[o].content??""),r.push(e[o]),o++;i.push(...Ki(r,void 0,void 0,n));const l=String(e[t].content??""),a=s||l;return{node:{type:"subscript",children:i.length>0?i:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:o<e.length?o+1:e.length}}function gfe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="sup_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...Ki(r,void 0,void 0,n)),{node:{type:"superscript",children:i.length>0?i:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:o<e.length?o+1:e.length}}function mfe(e){const t=String(e.content??"");return{type:"text",content:t,raw:t}}const vfe=/[^~]*~{2,}[^~]+/,yfe=/\*\*/,bfe=/[[_*^~]/,kfe=/\\([\\()[\]`$|*_\-!])/g,vb=new Set(["\\","(",")","[","]","`","$","|","*","_","-","!"]),Afe=/\s/u,Cfe=/[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]/,wfe=/\p{P}/u,xfe=/^[\x22\x27《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,_fe=/^[\x22\x27》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,Sfe=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,Mfe=/:\/\//,e8=1,IF=2,Ife=4,Efe=8,EF=16,Ja=32,Fg=64,Zh=128,TF=256,Tfe=512,Gh=1024,Lfe=1982;function G0(e){let t=0;for(let n=0;n<e.length;n++)switch(e.charCodeAt(n)){case 33:t|=Zh;break;case 36:t|=TF;break;case 40:t|=Gh;break;case 42:t|=IF;break;case 91:t|=Ja;break;case 92:t|=e8;break;case 93:t|=Fg;break;case 95:t|=Ife;break;case 96:t|=EF;break;case 124:t|=Tfe;break;case 126:t|=Efe;break}return t}function Nfe(e){let t=0,n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="*"){n+=2;continue}e[n]==="*"&&t++,n++}return t}function LF(e,t=0){if(!e)return-1;let n=0;for(let i=0;i<e.length;i++){const s=e[i],o=e[i+1];if(s==="\\"&&o&&vb.has(o)){if(o==="*"&&n>=t){n++,i++;continue}n++,i++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function Mu(e){return!!e&&Afe.test(e)}function Iu(e){return!!e&&(Cfe.test(e)||wfe.test(e))}function NF(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&xfe.test(e)}function FF(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&_fe.test(e)}function Ffe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!i||Mu(i)?!1:!(Iu(i)&&!NF(i,n)&&n&&!Mu(n)&&!Iu(n))}function Bfe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!n||Mu(n)?!1:!(Iu(n)&&!FF(n,i)&&i&&!Mu(i)&&!Iu(i))}function $fe(e,t,n=0){let i=n,s=!1;for(;i<t.length;){const o=e?LF(e,i):t.indexOf("*",i);if(o===-1)break;if(Bfe(t,o))return{index:o,sawInvalidClose:s};s=!0,i=o+1}return{index:-1,sawInvalidClose:s}}function Dfe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+2];return!i||Mu(i)?!1:!(Iu(i)&&!NF(i,n)&&n&&!Mu(n)&&!Iu(n))}function Rfe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+2];return!n||Mu(n)?!1:!(Iu(n)&&!FF(n,i)&&i&&!Mu(i)&&!Iu(i))}function zfe(e,t=0){let n=t,i=!1;for(;n<e.length;){const s=e.indexOf("**",n);if(s===-1)break;if(Rfe(e,s))return{index:s,sawInvalidClose:i};i=!0,n=s+2}return{index:-1,sawInvalidClose:i}}function Ofe(e){let t="",n=0;for(;n<e.length;){if(e[n]!=="\\"){t+=e[n],n++;continue}let i=0;for(;n+i<e.length&&e[n+i]==="\\";)i++;const s=e[n+i];if(t+="\\".repeat(Math.floor(i/2)),i%2===1){if(s&&vb.has(s)){t+=s,n+=i+1;continue}t+="\\"}n+=i}return t}function Pfe(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i],o=e[i+1];if(s==="\\"&&o&&vb.has(o)){if(n===t)return i+1;n++,i++;continue}if(n===t)return i;n++}return-1}function jfe(e,t,n){const i=Pfe(e,t);if(i===-1||e[i]!==n)return!1;let s=0;for(let o=i-1;o>=0&&e[o]==="\\";o--)s++;return s%2===1}const Hfe=/[\p{L}\p{N}]/u,Wfe=/^[\p{L}\p{N}]+$/u;function t8(e){return e?Hfe.test(e):!1}function BF(e){return e?Wfe.test(e):!1}function v1(e,t){let n=t;for(;n<e.length&&e[n]==="*";)n++;const i=t>0?e[t-1]:void 0,s=n<e.length?e[n]:void 0;return{len:n-t,prev:i,next:s,intraword:t8(i)&&t8(s)}}function qfe(e){const t=[];for(let n=0;n<e.length;){if(e[n]!=="*"){n++;continue}const i=v1(e,n),s=n+i.len;i.len>=2&&i.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n<t.length-1;n++){const i=t[n],s=t[n+1];if(!BF(e.slice(i.end,s.start)))return s.end}return-1}function Ufe(e){return!!e&&e.trim()===e&&/^[\p{L}\p{N}\s]+$/u.test(e)}function Kfe(e,t){let n=t;for(;n<e.length;){const i=e.indexOf("***",n);if(i===-1)return-1;const s=v1(e,i);if(s.len>=3)return i;n=i+s.len}return-1}function Vfe(e){return e?Sfe.test(e)||Mfe.test(e):!1}function Zfe(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function Ki(e,t,n,i){if(!e||e.length===0)return[];const s=i?.__linkifyDemotionContext,o=Mp(t),r={filename:s?.filename||o.filename,explicitFilename:s?.explicitFilename||o.explicitFilename,marketTicker:s?.marketTicker||o.marketTicker};(r.filename||r.explicitFilename||r.marketTicker)&&(i={...i,__linkifyDemotionContext:r});const l=i,a=[];let u=null,c=0;const d=i?.requireClosingStrong,f=e;function p(){return e===f&&(e=e.slice()),e}function g(){u=null}function m(te,ye){const j=e.length===1?t:String(ye.content??""),Y=[],ve=qfe(te);if(ve!==-1){x(te.slice(0,ve),te.slice(0,ve));const se=te.slice(ve);return se&&(D({type:"text",content:se,raw:se}),c--),c++,!0}if(vfe.test(te)){const se=te.indexOf("~~");se!==-1&&Y.push({type:"strikethrough",index:se})}if(yfe.test(te)){const se=te.indexOf("**");se!==-1&&Y.push({type:"strong",index:se})}if(/[^*]*\*[^*]+/.test(te)){const se=j?LF(j,0):te.indexOf("*");if(j&&se===-1)return!1;se!==-1&&Y.push({type:"emphasis",index:se})}Y.sort((se,U)=>se.index!==U.index?se.index-U.index:se.type===U.type?0:se.type==="strong"?-1:U.type==="strong"?1:0);const re=Y[0];if(!re)return!1;if(re.type==="strikethrough"){const se=re.index,U=se>-1?te.slice(0,se):"";if(U&&x(U,U),se===-1)return c++,!0;const J=te.indexOf("~~",se+2),de=J===-1?te.slice(se+2):te.slice(se+2,J),me=J===-1?"":te.slice(J+2),{node:Ie}=Lx([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:de,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,i);return g(),v(Ie),me&&(D({type:"text",content:me,raw:me}),c--),c++,!0}if(re.type==="strong"){const se=re.index,U=se>-1?te.slice(0,se):"";if(U&&x(U,U),se===-1)return c++,!0;if(t&&se===0){let ke=!1,Le=0;for(;Le<te.length&&te[Le]==="*";)Le++;if(t.startsWith("\\*")&&(ke=!0),ke){let it=0,Fe=0;for(;Fe<t.length&&it<Le;)if(t[Fe]==="\\"&&Fe+1<t.length&&t[Fe+1]==="*")it+=1,Fe+=2;else{if(t[Fe]==="*")break;Fe++}if(it>=2)return x(te,te),c++,!0}}if(t&&(te.match(/\*/g)||[]).length>Nfe(t))return x(te.slice(U.length),te.slice(U.length)),c++,!0;const J=v1(te,se);if(J.len>=3){const ke=Kfe(te,se+J.len);if(ke!==-1){const Le=te.slice(se+J.len,ke);if(Ufe(Le)){const{node:it}=Mh([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Le,markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,i);g(),v(it);const Fe=te.slice(ke+3);return Fe&&(D({type:"text",content:Fe,raw:Fe}),c--),c++,!0}}}if(!Dfe(te,se)){const ke=te.slice(se,se+J.len);x(ke,ke);const Le=te.slice(se+J.len);return Le&&(D({type:"text",content:Le,raw:Le}),c--),c++,!0}const de=zfe(te,se+2);let me="",Ie="";if(de.index!==-1){me=te.slice(se+2,de.index),Ie=te.slice(de.index+2);const ke=de.index,Le=v1(te,ke);if(J.intraword&&Le.intraword&&!BF(me)||!me&&J.len>=4&&J.intraword)return x(te.slice(U.length),te.slice(U.length)),c++,!0}else{if(d||de.sawInvalidClose||J.intraword)return x(te.slice(U.length),te.slice(U.length)),c++,!0;me=te.slice(se+2),Ie=""}if(!me&&/^\*+$/.test(Ie))return x(te,te),c++,!0;const{node:je}=Mh([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:me,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,i);return g(),v(je),Ie&&(D({type:"text",content:Ie,raw:Ie}),c--),c++,!0}if(re.type==="emphasis"){let se=re.index;se===-1&&(se=0);const U=te.slice(0,se);if(U&&x(U,U),!Ffe(te,se)){x(te[se],te[se]);const ke=te.slice(se+1);return ke&&(D({type:"text",content:ke,raw:ke}),c--),c++,!0}const J=v1(te,se),de=$fe(j,te,se+1),me=de.index,Ie=e[c+1];if(i?.final&&Ie?.type==="em_open"&&me!==-1&&te.slice(se+1,me).trim()!==te.slice(se+1,me)||me===-1&&(de.sawInvalidClose||i?.final||J.intraword||!t8(te[se+1])))return x(te.slice(se),te.slice(se)),c++,!0;const{node:je}=V0([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:me>-1?te.slice(se+1,me):te.slice(se+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,i);if(g(),v(je),me!==-1&&me<te.length-1){const ke=te.slice(me+1);ke&&(D({type:"text",content:ke,raw:ke}),c--)}return c++,!0}return!1}function y(te,ye){if(!te.includes("`"))return!1;const Y=(Ie=>{for(let je=0;je<Ie.length;je++){if(Ie[je]!=="`")continue;let ke=0;for(let Le=je-1;Le>=0&&Ie[Le]==="\\";Le--)ke++;if(ke%2===0)return je}return-1})(te);if(Y===-1)return!1;let ve=1;for(let Ie=Y+1;Ie<te.length&&te[Ie]==="`";Ie++)ve++;const re="`".repeat(ve),se=Y+ve,U=te.indexOf(re,se);if(U===-1){if(ve===1){const je=te.slice(0,Y),ke=te.slice(Y+1);return je&&(m(je,ye)?c--:x(je,je)),k({type:"inline_code",code:ke,raw:String(ke)}),c++,!0}let Ie=te;for(let je=c+1;je<e.length;je++)Ie+=String((e[je].content??"")+(e[je].markup??""));return c=e.length-1,x(Ie,Ie),c++,!0}g();const J=te.slice(0,Y),de=te.slice(Y+ve,U),me=te.slice(U+ve);return J&&(m(J,ye)?c--:x(J,J)),k({type:"inline_code",code:de,raw:String(de??"")}),me&&(D({type:"text",content:me,raw:me}),c--),c++,!0}function w(te){const ye=l?.__markdownIt;if(!ye||e.length<=1||!e.some(re=>re?.type==="math_inline")||!bfe.test(te))return null;const j=ye.parseInline(te,{__markstreamFinal:!!i?.final});if(!Array.isArray(j)||j.length===0)return null;const Y=(j.find(re=>re?.type==="inline")?.children??[]).filter(re=>!(re?.type==="text"&&String(re.content??"")===""));if(!Y.length||!Y.some(re=>re?.type!=="text")||Y.length===1&&Y[0]?.type==="text"&&String(Y[0].content??"")===te)return null;const ve=Ki(Y,te,n,i);return ve.length?ve:null}function k(te){g(),a.push(te)}function A(te){g();const ye=zc(te);a.push(ye)}function v(te){k(te)}function x(te,ye){u?(u.content+=te,u.raw+=ye??te):(u={type:"text",content:String(te??""),raw:String(ye??te??"")},a.push(u))}function E(te,ye){if(!te)return;const j=Ki([{...ye,type:"text",content:te,raw:te}],te,n,i);if(j.length===1&&j[0]?.type==="text"){const Y=j[0];x(String(Y.content??""),String(Y.raw??Y.content??""));return}for(const Y of j)v(Y)}function S(te,ye){return String(te.markup??"").startsWith(ye)}function M(te){if(!u||te.loading!==!0||te.markup!=="\\(\\)")return;const ye=e[c-1];!ye||ye.type!=="text"||!S(ye,"\\(")||u.content.endsWith("(")&&(u.content=u.content.slice(0,-1),u.raw.endsWith("(")&&(u.raw=u.raw.slice(0,-1)),!u.content&&a[a.length-1]===u&&(a.pop(),u=null))}function _(te){return te.endsWith("](")?e[c+1]?.type==="link_open"&&e[c+1]?.markup==="linkify"&&e[c+2]?.type==="text"&&e[c+3]?.type==="link_close"&&e[c+4]?.type==="text"&&String(e[c+4]?.content??"").startsWith(")"):!1}function N(te,ye,j=G0(te)){let Y=te;const ve=String(ye.content??"");return(j&e8)!==0&&Y.endsWith("\\")&&!S(ye,"\\\\")&&!ve.endsWith("\\\\")&&(Y=Y.slice(0,-1)),(j&Gh)!==0&&Y.endsWith("(")&&!S(ye,"\\(")&&!ve.endsWith("\\(")&&(Y=Y.slice(0,-1)),(j&IF)!==0&&/\*+$/.test(Y)&&!S(ye,"\\*")&&!ve.endsWith("\\*")&&(Y=Y.replace(/\*+$/,"")),Y}for(;c<e.length;){const te=e[c];D(te)}function D(te){switch(te.type){case"text":$(te);break;case"softbreak":u?(u.content+=` -`,u.raw+=` -`):(u={type:"text",content:` -`,raw:` -`},a.push(u)),c++;break;case"code_inline":v(lfe(te)),c++;break;case"html_inline":{const[ye,j]=ofe(te,e,c,Ki,t,n,i);v(ye),c=j;break}case"link_open":P(te);break;case"image":ee(te)||(g(),v(Ex(te)),c++);break;case"strong_open":{g();const{node:ye,nextIndex:j}=Mh(e,c,te.content,i);v(ye),c=j;break}case"em_open":{g();const{node:ye,nextIndex:j}=V0(e,c,i);v(ye),c=j;break}case"s_open":{g();const{node:ye,nextIndex:j}=Lx(e,c,i);v(ye),c=j;break}case"mark_open":{g();const{node:ye,nextIndex:j}=efe(e,c,i);v(ye),c=j;break}case"ins_open":{g();const{node:ye,nextIndex:j}=afe(e,c,i);v(ye),c=j;break}case"sub_open":{g();const{node:ye,nextIndex:j}=pfe(e,c,i);v(ye),c=j;break}case"sup_open":{g();const{node:ye,nextIndex:j}=gfe(e,c,i);v(ye),c=j;break}case"sub":g(),v({type:"subscript",children:[{type:"text",content:String(te.content??""),raw:String(te.content??"")}],raw:`~${String(te.content??"")}~`}),c++;break;case"sup":g(),v({type:"superscript",children:[{type:"text",content:String(te.content??""),raw:String(te.content??"")}],raw:`^${String(te.content??"")}^`}),c++;break;case"emoji":{g();const ye=e[c-1];ye?.type==="text"&&/\|:-+/.test(String(ye.content??""))?x("",""):v(Vde(te)),c++;break}case"checkbox":g(),v(Ude(te)),c++;break;case"checkbox_input":g(),v(Kde(te)),c++;break;case"footnote_ref":g(),v(Jde(te)),c++;break;case"footnote_anchor":{g();const ye=te.meta??{};k({type:"footnote_anchor",id:String(ye.label??te.content??""),raw:String(te.content??"")}),c++;break}case"hardbreak":g(),v(Xde()),c++;break;case"fence":g(),v(mb(e[c])),c++;break;case"math_inline":M(te),g(),!te.content&&te.markup==="$"&&e[c+1]?.type==="text"&&e[c+2]?.type==="math_inline"?(v(Tx({...te,content:e[c+1].content})),c+=2):v(Tx(te)),c++;break;case"reference":R(te);break;case"text_special":x(String(te.content??""),String(te.content??"")),c++;break;default:{const ye=te;if(te.type==="link"&&ye.href!=null&&i?.validateLink&&!i.validateLink(String(ye.href))){g();const j=String(ye.text??"");x(j,j),c++}else ue(te)||z(te)||K(te)||W(te)||A(te),c++;break}}}function T(te,ye,j,Y,ve=G0(te)){const re=mfe({...ye,content:te});if(u){u.content+=i?.final?re.content:N(re.content,ye,ve),u.raw+=re.raw;return}const se=j?.tag==="br"&&e[c-2]?.content==="[";Y||(re.content=i?.final?re.content:N(re.content,ye,ve)),u=re,u.center=se,a.push(u)}function $(te){const ye=String(te.content??""),j=G0(ye),Y=(j&e8)!==0,ve=e.length===1&&Y&&typeof t=="string"?String(t):"";let re=ve?Ofe(ve):Y?ye.replace(kfe,"$1"):ye;const se=re===ye?j:G0(re);if(te.content==="<"||re==="1"&&e[c-1]?.tag==="br"){c++;return}const U=(se&TF)!==0?re.indexOf("$"):-1;U!==-1&&U===re.lastIndexOf("$")&&re.endsWith("$")&&(re=re.slice(0,-1)),re.endsWith("undefined")&&!t?.endsWith("undefined")&&(re=re.slice(0,-9));let J=a.length,de="";for(let ke=a.length-1;ke>=0;ke--){const Le=a[ke];if(Le.type!=="text")break;J=ke,de=String(Le.content??"")+de}J<a.length&&(re.startsWith(de)?(u=null,a.length=J):u=a[a.length-1]);const me=e[c+1];if((re==="`"||re==="|"||re==="$")&&!S(te,`\\${re}`)||/^\*+$/.test(re)&&!S(te,"\\*")){c++;return}if(!me&&i?.final!==!0&&(se&Gh)!==0&&/[^\]]\s*\(\s*$/.test(re)&&(re=re.replace(/\(\s*$/,"")),!re){c++;return}if((se&(Ja|Zh))===(Ja|Zh)&&X(re)||(se&(Fg|Gh))===(Fg|Gh)&&ie(re))return;if((se&Lfe)===0){T(re,te,e[c-1],me,se),c++;return}if((se&Ja)!==0&&Ne(re))return;const Ie=e[c-1];if((se&Ja)!==0&&re==="["&&!me?.markup?.includes("*")&&!S(te,"\\[")||(se&Fg)!==0&&re==="]"&&!Ie?.markup?.includes("*")&&!S(te,"\\]")){c++;return}if((se&EF)!==0&&y(ye,te)||(se&(Zh|Ja))===(Zh|Ja)&&pe(re)||(se&Ja)!==0&&(e[c+1]?.type!=="link_open"||_(re))&&ce(re,te))return;const je=w(ye);if(je){g();for(const ke of je)v(ke);c++;return}m(re,te)||(T(re,te,Ie,me,se),c++)}function P(te){if(O(te))return;if(xe()){const{node:J,nextIndex:de}=Z0(e,c,i),me=String(J.text||J.href||"");x(me,me),c=de;return}g();const ye=c,{node:j,nextIndex:Y}=Z0(e,c,i);c=Y;const ve=j.text||j.href||"";if(te.markup==="linkify"&&!lF(ve,j.href,t)&&Hm(ve,l?.__linkifyDemotionContext)){x(ve,ve);return}const re=j.children.length===1&&j.children[0]?.type==="text";if(j.loading&&t&&j.text===j.href&&re){const J=Zfe(t,j.href);J&&(j.text=J,j.children=[{type:"text",content:J,raw:J}],j.raw=`[${J}](${j.href}${j.title?` "${j.title}"`:""})`)}if(i?.validateLink&&!i.validateLink(j.href)){x(j.text,j.text);return}const se=te.attrs?.find(([J])=>J==="href")?.[1],U=String(se??"");if(t&&U){const J=t.indexOf("](");if(J!==-1){const de=t.indexOf(")",J+2);de===-1?j.loading=!0:j.loading&&t.slice(J+2,de).includes(U)&&(j.loading=!1)}}/^file:\/\/\/[a-z]:\//i.test(j.href)&&K(j,ye-1)||W(j)||k(j)}function O(te){if(te.markup!=="linkify")return!1;const{node:ye,nextIndex:j}=Z0(e,c,i);return G(ye,j)?(c=j,!0):!1}function R(te){g(),v(dfe(te)),c++}function W(te){if(te.type!=="link")return!1;const ye=a[a.length-1];if(!ye||ye.type!=="text")return!1;const j=String(ye.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!j)return!1;const Y=te,ve=String(Y.href??""),re=String(Y.text??""),se=String(j[2]??""),U=ve.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!ve||!(re===ve||re===U||Vfe(re)))return!1;const J=String(j[1]??"");return J?(ye.content=J,ye.raw=J):a.pop(),k({...te,text:se,children:[{type:"text",content:se,raw:se}],raw:`[${se}](${ve}${Y.title?` "${Y.title}"`:""})`}),!0}function z(te){if(te.type!=="link")return!1;const ye=te,j=String(ye.href??"");return j?G({href:j,title:ye.title==null||ye.title===""?null:String(ye.title),loading:!!ye.loading},c+1):!1}function G(te,ye){const j=a[a.length-1];if(j?.type!=="image"||j.src||!j.loading||!String(j.raw??"").endsWith("]("))return!1;const Y=e[ye],ve=String(Y?.content??"");if(Y?.type!=="text"||!ve.startsWith(")"))return!1;a.pop(),u=null;const re=String(j.alt??"");k({type:"image",src:te.href,alt:re,title:te.title,raw:`![${re}](${te.href}${te.title?` "${te.title}"`:""})`,loading:!!te.loading});const se=ve.slice(1),U=zc(Y);return U.content=se,U.raw=se,p()[ye]=U,!0}function K(te,ye=c-1){if(te.type!=="link")return!1;const j=a[a.length-1],Y=e[ye];if(!j||j.type!=="text"||Y?.type!=="text")return!1;const ve=String(j.content??""),re=String(Y.content??"");if(!ve.endsWith("!")||!re.endsWith("!")||S(Y,"\\!"))return!1;const se=ve.slice(0,-1);se?(j.content=se,j.raw=se,u=j):(a.pop(),u=null);const U=te,J=String(U.text??U.children?.map(Ie=>String(Ie?.content??Ie?.raw??"")).join("")??""),de=String(U.href??""),me=U.title==null||U.title===""?null:String(U.title);return k({type:"image",src:de,alt:J,title:me,raw:`![${J}](${de}${me?` "${me}"`:""})`,loading:!!U.loading}),!0}function H(te,ye="",j=null){const Y=String(te.alt??te.raw??"");return{type:"link",href:ye,title:j,text:Y,children:[te],raw:`[${Y}](${ye}${j?` "${j}"`:""})`,loading:!0}}function q(te){const ye=te.startsWith("![")?te:`![${te}`,j=ye.slice(2),Y=j.indexOf("](");return{type:"image",src:"",alt:Y===-1?j.replace(/\]$/,""):j.slice(0,Y),title:null,raw:ye,loading:!0}}function X(te){const ye=te.indexOf("[![");if(ye===-1||typeof t=="string"&&e.length===1&&jfe(t,ye,"["))return!1;const j=te.slice(0,ye);return j&&x(j,j),k(H(q(te.slice(ye+1)))),c++,!0}function ee(te){if(i?.final)return!1;const ye=e[c-1];if(ye?.type!=="text"||!String(ye.content??"").endsWith("[")||S(ye,"\\["))return!1;const j=a[a.length-1];if(j?.type==="text"&&j.content.endsWith("[")){const Y=j.content.slice(0,-1);Y?(j.content=Y,j.raw=Y,u=j):(a.pop(),u=null)}return k(H(Ex(te))),c++,!0}function ue(te){if(te.type!=="link")return!1;const ye=te,j=String(ye.raw??""),Y=String(ye.text??"");if(!j.startsWith("[![")&&!Y.startsWith("!["))return!1;const ve=ye.title==null||ye.title===""?null:String(ye.title);return k(H({type:"image",src:String(ye.href??""),alt:Y.replace(/^!\[/,"").replace(/\]$/,""),title:ve,raw:j.startsWith("[![")?j.slice(1):j,loading:!0})),!0}function ie(te){if(!te.startsWith("]("))return!1;const ye=e[c-2];if(ye?.type==="text"&&String(ye.content??"").endsWith("[")&&S(ye,"\\["))return!1;const j=a[a.length-1];if(j?.type!=="image"&&j?.type!=="link")return!1;const Y=j,ve=j?.type==="link"&&Array.isArray(Y.children)&&Y.children.length===1&&Y.children[0]?.type==="image"?a.pop():null,re=ve?ve.children[0]:a.pop();if(!re||re.type!=="image")return!1;const se=e[c+1];let U=String(ve?.href??""),J=ve?.title==null?null:String(ve.title),de=!0;if(se?.type==="link_open"){const{node:Ie,nextIndex:je}=Z0(e,c+1,i);U=Ie.href,J=Ie.title,de=!0,c=je}else{if(U=te.slice(2),U.includes('"')){const Ie=U.split('"');U=String(Ie[0]??"").trim(),J=Ie[1]==null?null:String(Ie[1]).trim()}c++}const me=H(re,U,J);return me.loading=de,k(me),!0}function xe(){const te=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&te?.type==="text"&&String(te.content??"").endsWith("[")&&S(te,"\\[")}function ce(te,ye){const j=te.indexOf("[");if(j===-1)return!1;let Y=te.slice(0,j);const ve=te.indexOf("](",j);if(ve!==-1){const re=e[c+2];let se=te.slice(j+1,ve);if(se.includes("[")){const ke=se.indexOf("[");Y+=te.slice(0,j+ke+1);const Le=j+ke+1;se=te.slice(Le+1,ve)}const U=e[c+1];if(te.endsWith("](")&&U?.type==="link_open"&&re){const ke=e[c+4];let Le=4,it=!0;if(ke?.type==="text"){const Re=String(ke.content??"");if(Re.startsWith(")")){it=!1;const Ke=Re.slice(1);if(Ke){const ht=zc(ke);ht.content=Ke,ht.raw=Ke,p()[c+4]=ht}else Le++}else Re==="."&&Le++}E(Y,ye);const Fe=String(re.content??"");return i?.validateLink&&!i.validateLink(Fe)?x(se,se):k({type:"link",href:Fe,title:null,text:se,children:[{type:"text",content:se,raw:se}],loading:it}),c+=Le,!0}const J=te.indexOf(")",ve),de=J!==-1?te.slice(ve+2,J):"",me=J===-1;let Ie=Y.match(/\*+$/);if(Ie&&(Y=Y.replace(/\*+$/,"")),E(Y,ye),Ie||(Ie=se.match(/^\*+/)),!d&&Ie){const ke=Ie[0].length;se=se.replace(/^\*+/,"").replace(/\*+$/,"");const Le=[];if(ke===1?Le.push({type:"em_open",tag:"em",nesting:1}):ke===2?Le.push({type:"strong_open",tag:"strong",nesting:1}):ke===3&&(Le.push({type:"strong_open",tag:"strong",nesting:1}),Le.push({type:"em_open",tag:"em",nesting:1})),Le.push({type:"link",href:de,title:null,text:se,children:[{type:"text",content:se,raw:se}],loading:me}),ke===1){Le.push({type:"em_close",tag:"em",nesting:-1});const{node:it}=V0(Le,0,i);v(it)}else if(ke===2){Le.push({type:"strong_close",tag:"strong",nesting:-1});const{node:it}=Mh(Le,0,void 0,i);v(it)}else if(ke===3){Le.push({type:"em_close",tag:"em",nesting:-1}),Le.push({type:"strong_close",tag:"strong",nesting:-1});const{node:it}=Mh(Le,0,void 0,i);v(it)}else{const{node:it}=V0(Le,0,i);v(it)}}else i?.validateLink&&!i.validateLink(de)?x(se,se):k({type:"link",href:de,title:null,text:se,children:[{type:"text",content:se,raw:se}],loading:me});const je=J!==-1?te.slice(J+1):"";return je&&(D({type:"text",content:je,raw:je}),c--),c++,!0}return!1}function pe(te){const ye=te.indexOf("![");if(ye===-1)return!1;const j=te.slice(0,ye);return j&&!u?u={type:"text",content:j,raw:j}:j&&u&&(u.content+=j),u&&(a.push(u),u=null),k(q(te.slice(ye))),c++,!0}function Ne(te){if(!(te?.startsWith("[")&&n?.type==="list_item_open"))return!1;const ye=te.slice(1).match(/[^\s\]]/);if(ye===null)return c++,!0;if(ye&&/x/i.test(ye[0])){const j=ye[0]==="x"||ye[0]==="X";return k({type:"checkbox_input",checked:j,raw:j?"[x]":"[ ]"}),c++,!0}return!1}return a}function yb(e,t,n){const i=n?.__sourceLineMapper;if(!i)return{startLine:e,endLine:t};const s=i(e),o=t>e?i(t-1).endLine:i(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,o)}}function Nx(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let i=0;for(let s=0;s<n;s++)e[s]===` -`&&i++;return i}function Gfe(e,t,n){const i=Math.max(0,Math.min(e.length,Math.trunc(t))),s=Math.max(i,Math.min(e.length,Math.trunc(n))),o=Nx(e,i);let r=Nx(e,s);return s>i&&e[s-1]!==` -`&&r++,{startLine:o,endLine:r}}function op(e,t,n,i){const s=Gfe(e,t,n);return yb(s.startLine,s.endLine,i)}function Qfe(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const i=Number(n[0]),s=Number(n[1]);return!Number.isFinite(i)||!Number.isFinite(s)?null:yb(i,s,t)}function Zn(e,t,n){if(!n?.includeSourceMap)return e;const i=Qfe(t,n);if(!i)return e;if(e.sourceMap=i,e.type==="code_block"){const s=e;s.startLine=i.startLine,s.endLine=i.endLine}return e}function Yfe(e,t,n,i){if(!i?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const o=Number(s[0]),r=Number(s[1]),l=Number(n);return!Number.isFinite(o)||!Number.isFinite(r)||!Number.isFinite(l)||(e.sourceMap=yb(o,Math.max(r,l),i)),e}function Jfe(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??""),r=o.replace(/[ \t\r\n]+$/g,"");if(r===o)break;if(r){s.content=r;break}i.pop();continue}break}}function Xfe(e){const t=String(e.content??""),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!="number")return;e.content=t.slice(0,n.index);const i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(o)){i.pop();continue}const r=o.replace(/[ \t\r\n\d.)]+$/g,"");r!==o&&(r?s.content=r:i.pop())}break}}function ehe(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Uf(e,t,n){const i=e[t],s=[],o=ju(n,!0);let r=t+1;for(;r<e.length&&e[r].type!=="bullet_list_close"&&e[r].type!=="ordered_list_close";)if(e[r].type==="list_item_open"){const a=[];let u=r+1;for(;u<e.length&&e[u].type!=="list_item_close";)if(e[u].type==="paragraph_open"){const d=e[u+1],f=ehe(d)?zc(d):d,p=e[u-1];f!==d&&(Xfe(f),Jfe(f));const g=String(f.content??""),m={type:"paragraph",children:Ki(f.children||[],g,p,o.options()),raw:g};n?.includeSourceMap&&Zn(m,e[u],n),a.push(m),o.remember(g),u+=3}else if(e[u].type==="blockquote_open"){const[d,f]=Kf(e,u,o.options());a.push(d),o.remember(d.raw),u=f}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=Uf(e,u,o.options());a.push(d),o.remember(d.raw),u=f}else{const d=kb(e,u,o.options(),bb);d?(a.push(d[0]),o.remember(d[0].raw),u=d[1]):u+=1}const c={type:"list_item",children:a,raw:a.map(d=>d.raw).join("")};n?.includeSourceMap&&Zn(c,e[r],n),s.push(c),r=u+1}else r+=1;const l={type:"list",ordered:i.type==="ordered_list_open",start:(()=>{if(i.attrs&&i.attrs.length){const a=i.attrs.find(u=>u[0]==="start");if(a){const u=Number(a[1]);return Number.isFinite(u)&&u!==0?u:1}}})(),items:s,raw:s.map(a=>a.raw).join(` -`)};return n?.includeSourceMap&&Zn(l,i,n),[l,r+1]}function the(e,t,n,i){const s=String(n[1]??"note"),o=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=ju(i,!0);let a=t+1;for(;a<e.length&&e[a].type!=="container_close";)if(e[a].type==="paragraph_open"){const u=e[a+1];if(u){const c={type:"paragraph",children:Ki(u.children||[],String(u.content??""),void 0,l.options()),raw:String(u.content??"")};i?.includeSourceMap&&Zn(c,e[a],i),r.push(c),l.remember(c.raw)}a+=3}else if(e[a].type==="bullet_list_open"||e[a].type==="ordered_list_open"){const[u,c]=Uf(e,a,l.options());i?.includeSourceMap&&Zn(u,e[a],i),r.push(u),l.remember(u.raw),a=c}else if(e[a].type==="blockquote_open"){const[u,c]=Kf(e,a,l.options());i?.includeSourceMap&&Zn(u,e[a],i),r.push(u),l.remember(u.raw),a=c}else{const u=bv(e,a,l.options());u?(r.push(u[0]),l.remember(u[0].raw),a=u[1]):a++}return[{type:"admonition",kind:s,title:o,children:r,raw:`:::${s} ${o} -${r.map(u=>u.raw).join(` -`)} -:::`},a+1]}const nhe=new Set(["warning","info","note","tip","danger","caution"]);function ihe(e){let t=0;for(;t<e.length&&t<3&&e[t]===":";)t++;if(t===0||e[t]===":")return null;const n=e.slice(t).trimStart();if(!n)return null;const i=n.search(/\s/),s=(i===-1?n:n.slice(0,i)).toLowerCase();return nhe.has(s)?{kind:s,title:i===-1?"":n.slice(i).trim()}:null}function she(e,t,n){const i=e[t];let s="note",o="";const r=i.type.match(/^container_(\w+)_open$/);if(r){s=r[1];const d=String(i.info??"").trim();if(d&&!d.startsWith(":::")&&d.toLowerCase().startsWith(s)){const f=d.slice(s.length).trim();f&&(o=f)}}else{const d=ihe(String(i.info??"").trim());d&&(s=d.kind,o=d.title)}o||(o=s.charAt(0).toUpperCase()+s.slice(1));const l=[],a=ju(n,!0);let u=t+1;const c=new RegExp(`^container_${s}_close$`);for(;u<e.length&&e[u].type!=="container_close"&&!c.test(e[u].type);)if(e[u].type==="paragraph_open"){const d=e[u+1];if(d){const f=d.children||[];let p=-1;for(let m=f.length-1;m>=0;m--){const y=f[m];if(y.type==="text"&&/:+/.test(y.content)){p=m;break}}const g={type:"paragraph",children:Ki((p!==-1?f.slice(0,p):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&Zn(g,e[u],n),l.push(g),a.remember(g.raw)}u+=3}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=Uf(e,u,a.options());n?.includeSourceMap&&Zn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=Kf(e,u,a.options());n?.includeSourceMap&&Zn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=bv(e,u,a.options());d?(l.push(d[0]),a.remember(d[0].raw),u=d[1]):u++}return[{type:"admonition",kind:s,title:o,children:l,raw:`:::${s} ${o} -${l.map(d=>d.raw).join(` -`)} -:::`},u+1]}const ohe=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function rhe(e,t,n){const i=e[t];if(i.type!=="container_open")return null;const s=ohe.exec(String(i.info??""));return s?the(e,t,s,n):null}const bb={parseContainer:(e,t,n)=>she(e,t,n),matchAdmonition:rhe};function Kf(e,t,n){const i=[],s=ju(n,!0);let o=t+1;for(;o<e.length&&e[o].type!=="blockquote_close";){const l=e[o];switch(l.type){case"paragraph_open":{const a=e[o+1],u={type:"paragraph",children:Ki(a.children||[],String(a.content??""),void 0,s.options()),raw:String(a.content??"")};n?.includeSourceMap&&Zn(u,l,n),i.push(u),s.remember(u.raw),o+=3;break}case"bullet_list_open":case"ordered_list_open":{const[a,u]=Uf(e,o,s.options());i.push(a),s.remember(a.raw),o=u;break}case"blockquote_open":{const[a,u]=Kf(e,o,s.options());i.push(a),s.remember(a.raw),o=u;break}default:{const a=kb(e,o,s.options(),bb);a?(i.push(a[0]),s.remember(a[0].raw),o=a[1]):o++;break}}}const r={type:"blockquote",children:i,raw:i.map(l=>l.raw).join(` -`)};return n?.includeSourceMap&&Zn(r,e[t],n),[r,o+1]}function lhe(e){if(e.info?.startsWith("diff"))return mb(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let i=t;n?.[1]&&(i=t.replace(/<antArtifact[^>]*>/g,"").replace(/<\/antArtifact>/g,""));const s=Array.isArray(e.map)&&e.map.length===2;return{type:"code_block",language:n?n[1]:String(e.info??""),code:i,raw:i,loading:!s}}function ahe(e,t,n){const i=[];let s=t+1,o=[],r=[];const l=ju(n,!0);for(;s<e.length&&e[s].type!=="dl_close";)if(e[s].type==="dt_open"){const a=e[s+1];o=Ki(a.children||[],void 0,void 0,l.options()),l.remember(o.map(u=>u.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(r=[];a<e.length&&e[a].type!=="dd_close";)if(e[a].type==="paragraph_open"){const u=e[a+1];r.push({type:"paragraph",children:Ki(u.children||[],String(u.content??""),void 0,l.options()),raw:String(u.content??"")}),l.remember(String(u.content??"")),a+=3}else a++;o.length>0&&(i.push({type:"definition_item",term:o,definition:r,raw:`${o.map(u=>u.raw).join("")}: ${r.map(u=>u.raw).join(` -`)}`}),o=[]),s=a+1}else s++;return[{type:"definition_list",items:i,raw:i.map(a=>a.raw).join(` -`)},s+1]}function uhe(e,t,n){const i=e[t].meta??{},s=String(i?.label??"0"),o=[],r=ju(n,!0);let l=t+1;for(;l<e.length&&e[l].type!=="footnote_close";)if(e[l].type==="paragraph_open"){const a=e[l+1],u=a.children?[...a.children]:[];e[l+2].type==="footnote_anchor"&&u.push(e[l+2]);const c={type:"paragraph",children:Ki(u,String(a.content??""),void 0,r.options()),raw:String(a.content??"")};o.push(c),r.remember(c.raw),l+=3}else l++;return[{type:"footnote",id:s,children:o,raw:`[^${s}]: ${o.map(a=>a.raw).join(` -`)}`},l+1]}function che(e,t,n){const i=e[t],s=i.attrs,o=Array.isArray(s)&&s.length?Object.fromEntries(s.filter(c=>Array.isArray(c)&&c.length>=1&&c[0]).map(([c,d])=>[String(c),d==null||d===""?!0:String(d)])):void 0,r=String(i.tag?.substring(1)??"1"),l=Number.parseInt(r,10),a=e[t+1],u=String(a.content??"");return{type:"heading",level:l,text:u,...o?{attrs:o}:{},children:Ki(a.children||[],u,void 0,n),raw:u}}function dhe(e,t,n){const i=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${i}(?=\s|>|/)`,"i"),o=new RegExp(String.raw`^<\s*\/\s*${i}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l<e.length;){const a=e.indexOf("<",l);if(a===-1)return-1;const u=e.slice(a);if(o.test(u)){const c=is(u);if(c===-1)return-1;if(r===0)return a+c+1;r--,l=a+c+1;continue}if(s.test(u)){const c=is(u);if(c===-1)return-1;const d=u.slice(0,c+1);/\/\s*>$/.test(d)||r++,l=a+c+1;continue}l=a+1}return-1}function $F(e){const t=String(e.content??"");if(/^\s*<!--/.test(t)||/^\s*<!/.test(t)||/^\s*<\?/.test(t))return{type:"html_block",content:t,raw:t,tag:"",loading:!1};const n=(t.match(/^\s*<([A-Z][\w:-]*)/i)?.[1]||"").toLowerCase();if(!n)return{type:"html_block",content:t,raw:t,tag:"",loading:!1};const i=is(t),s=i===-1?t:t.slice(0,i+1),o=i!==-1&&/\/\s*>$/.test(s),r=Su.has(n),l=yv(s),a=(i===-1?-1:dhe(t,n,i+1))!==-1,u=!(r||o||a);return{type:"html_block",content:u?`${t.replace(/<[^>]*$/,"")} -</${n}>`:t,raw:t,tag:n,attrs:l.length?l:void 0,loading:u}}function fhe(e){const t=String(e.content??""),n=e.raw==="$$"?`$$${t}$$`:String(e.raw??"");return{type:"math_block",content:t,loading:!!e.loading,raw:n,markup:e.markup}}function hhe(e){if(!e)return"left";for(const t of e){if(!t)continue;const[n,i]=t;if(!i)continue;const s=String(i).trim().toLowerCase();if(n==="style"){const o=/text-align\s*:\s*(left|right|center)/i.exec(s);if(o)return o[1].toLowerCase()}}return"left"}function DF(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function RF(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return DF(n)?n:void 0}function phe(e,t,n){const i=RF(Mp(t),n);if(!DF(i))return e;const s=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:s?.filename||i?.filename,explicitFilename:s?.explicitFilename||i?.explicitFilename,marketTicker:s?.marketTicker||i?.marketTicker}}}function ghe(e,t,n){let i=t+1,s=null;const o=[];let r=!1;for(;i<e.length&&e[i].type!=="table_close";)if(e[i].type==="thead_open")r=!0,i++;else if(e[i].type==="thead_close")r=!1,i++;else if(e[i].type==="tbody_open"||e[i].type==="tbody_close")i++;else if(e[i].type==="tr_open"){const a=[];let u=i+1,c;for(;u<e.length&&e[u].type!=="tr_close";)if(e[u].type==="th_open"||e[u].type==="td_open"){const f=e[u].type==="th_open",p=e[u+1],g=String(p.content??""),m=hhe(e[u].attrs),y=a.length,w=!f&&!r,k=w?s?.cells[y]?.raw:void 0;a.push({type:"table_cell",header:f||r,children:Ki(p.children||[],g,void 0,phe(n,k,w?c:void 0)),raw:g,align:m}),w&&(c=RF(c,Mp(g))),u+=3}else u++;const d={type:"table_row",cells:a,raw:a.map(f=>f.raw).join("|")};r?s=d:o.push(d),i=u+1}else i++;s||(s={type:"table_row",cells:[],raw:""});const l=e[t].loading===!0;return[{type:"table",header:s,rows:o,loading:l&&!n?.final&&o.length===0,raw:[s,...o].map(a=>a.raw).join(` -`)},i+1]}function mhe(){return{type:"thematic_break",raw:"---"}}let Fy=null;const By=new WeakMap;function Fx(){return Fy||(Fy={allowedTagSet:Cv(),customTagSet:null}),Fy}function vhe(e){if(!e||e.length===0)return Fx();const t=By.get(e);if(t)return t;const n=e.map(Ur).filter(Boolean);if(!n.length){const s=Fx();return By.set(e,s),s}const i={allowedTagSet:Cv({customHtmlTags:e}),customTagSet:new Set(n)};return By.set(e,i),i}function yhe(e,t,n){const i=e[t],s=i.attrs;let o="";const r={};if(s){for(const[p,g]of s)if(p==="class"){const m=g.match(/(?:\s|^)vmr-container-(\S+)/);m&&(o=m[1])}else if(p.startsWith("data-")){const m=p.slice(5);try{r[m]=JSON.parse(g)}catch{r[m]=g}}}const l=[],a=ju(n,!0);let u=t+1;for(;u<e.length&&e[u].type!=="vmr_container_close";)if(e[u].type==="paragraph_open"){const p=e[u+1];if(p){const g={type:"paragraph",children:Ki(p.children||[],void 0,void 0,a.options()),raw:String(p.content??"")};n?.includeSourceMap&&Zn(g,e[u],n),l.push(g),a.remember(g.raw)}u+=3}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[p,g]=Uf(e,u,a.options());n?.includeSourceMap&&Zn(p,e[u],n),l.push(p),a.remember(p.raw),u=g}else if(e[u].type==="blockquote_open"){const[p,g]=Kf(e,u,a.options());n?.includeSourceMap&&Zn(p,e[u],n),l.push(p),a.remember(p.raw),u=g}else{const p=bv(e,u,a.options());p?(l.push(p[0]),a.remember(p[0].raw),u=p[1]):u++}const c=u<e.length&&e[u].type==="vmr_container_close",d=c&&i.meta?.unclosed!==!0||!!n?.final;let f=`::: ${o}`;return Object.keys(r).length>0&&(f+=` ${JSON.stringify(r)}`),f+=` -`,l.length>0&&(f+=i.raw??l.map(p=>p.raw).join(` -`),f+=` -`),f+=":::",[{type:"vmr_container",name:o,loading:!d,attrs:Object.keys(r).length>0?r:void 0,children:l,raw:f},c?u+1:u]}function $y(e,t,n,i){if(n?.type.endsWith("_close")){let s=Array.isArray(n.map)?Number(n.map[1]):NaN;return Number.isFinite(s)||(s=Array.isArray(t.map)?Number(t.map[1])+1:NaN),Yfe(e,t,s,i)}return Zn(e,t,i)}function bhe(e){return e.replace(/^\r?\n/,"").replace(/\r?\n$/,"")}function khe(e,t){if(!e||!t)return e;const n=new RegExp(String.raw`[\t ]*<\s*\/\s*${t}[^>]*$`,"i");return e.replace(n,"")}function Ahe(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${pl(i)}(?=\s|>|/)`,"i"),o=new RegExp(String.raw`^<\s*\/\s*${pl(i)}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l<e.length;){const a=e.indexOf("<",l);if(a===-1)break;const u=e.slice(a);if(o.test(u)){const c=is(u);if(c===-1)return null;if(r===0)return{start:a,end:a+c+1};r--,l=a+c+1;continue}if(s.test(u)){const c=is(u);if(c===-1)return null;const d=u.slice(0,c+1);/\/\s*>$/.test(d)||r++,l=a+c+1;continue}l=a+1}return null}function Che(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=new RegExp(String.raw`<\s*${i}(?=\s|>|/)`,"gi");s.lastIndex=Math.max(0,n||0);const o=s.exec(e);if(!o||o.index==null)return null;const r=o.index,l=e.slice(r),a=is(l);if(a===-1)return null;const u=r+a;if(/\/\s*>\s*$/.test(l.slice(0,a+1))){const g=u+1;return{raw:e.slice(r,g),start:r,end:g}}let c=1,d=u+1;const f=g=>{const m=e.slice(g);return new RegExp(String.raw`^<\s*${i}(?=\s|>|/)`,"i").test(m)},p=g=>{const m=e.slice(g);return new RegExp(String.raw`^<\s*\/\s*${i}(?=\s|>)`,"i").test(m)};for(;d<e.length;){const g=e.indexOf("<",d);if(g===-1)return{raw:e.slice(r),start:r,end:e.length};if(p(g)){const m=e.indexOf(">",g);if(m===-1)return null;if(c--,c===0){const y=m+1;return{raw:e.slice(r,y),start:r,end:y}}d=m+1;continue}if(f(g)){const m=is(e.slice(g));if(m===-1)return null;c++,d=g+m+1;continue}d=g+1}return{raw:e.slice(r),start:r,end:e.length}}function n8(e){return Number.isFinite(e)&&e>0?e:0}function whe(e,t){const n=n8(t);if(!e||n<=0)return 0;let i=0;for(let s=0;s<e.length;s++)if(e[s]===` -`&&(i++,i===n))return s+1;return e.length}function bv(e,t,n){const i=e[t],s=n?.includeSourceMap===!0;switch(i.type){case"heading_open":{const o=che(e,t,n);return s&&Zn(o,i,n),[o,t+3]}case"code_block":{const o=lhe(i);return s&&Zn(o,i,n),[o,t+1]}case"fence":{const o=mb(i);return s&&Zn(o,i,n),[o,t+1]}case"math_block":{const o=fhe(i);return s&&Zn(o,i,n),[o,t+1]}case"html_block":{const o=$F(i),r=o.tag?vhe(n?.customHtmlTags):null;if(o.tag&&o.loading&&r&&!r.allowedTagSet.has(o.tag)){const l=String(i.content??"").replace(/\n+$/,""),a={type:"paragraph",children:l?[{type:"text",content:l,raw:l}]:[],raw:l};return s&&Zn(a,i,n),[a,t+1]}if(o.tag&&r?.customTagSet?.has(o.tag)){const l=o.tag,a=String(n?.__sourceMarkdown??""),u=Number(n?.__customHtmlBlockCursor??0),c=Array.isArray(i.map)?whe(a,Number(i.map?.[0]??0)):0,d=Che(a,l,Math.max(n8(u),n8(c)));d&&n&&(n.__customHtmlBlockCursor=d.end);const f=String(d?.raw??o.raw??""),p=is(f),g=p!==-1?f.slice(0,p+1):f,m=p!==-1&&/\/\s*>\s*$/.test(g),y=p===-1?null:Ahe(f,l,p+1),w=y?.start??-1;let k="";p!==-1&&(w!==-1&&p<w?k=f.slice(p+1,w):k=f.slice(p+1)),w===-1&&(k=khe(k,l));const A=[],v=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let x;for(;(x=v.exec(g))!==null;){const M=x[1];if(!M||M.toLowerCase()===l)continue;const _=x[2]||x[3]||x[4]||"";A.push([M,_])}const E=!n?.final&&!m&&y==null,S={type:l,tag:l,content:bhe(k),raw:String(d?.raw??o.raw??f),loading:E,attrs:A.length?A:void 0};return s&&(d?S.sourceMap=op(a,d.start,d.end,n):Zn(S,i,n)),[S,t+1]}return s&&Zn(o,i,n),[o,t+1]}case"table_open":{const[o,r]=ghe(e,t,n);return s&&Zn(o,i,n),[o,r]}case"dl_open":{const[o,r]=ahe(e,t,n);return s&&Zn(o,i,n),[o,r]}case"footnote_open":{const[o,r]=uhe(e,t,n);return s&&Zn(o,i,n),[o,r]}case"hr":{const o=mhe();return s&&Zn(o,i,n),[o,t+1]}}return null}function kb(e,t,n,i){const s=bv(e,t,n);if(s)return s;const o=e[t],r=n?.includeSourceMap===!0;switch(o.type){case"container_warning_open":case"container_info_open":case"container_note_open":case"container_tip_open":case"container_danger_open":case"container_caution_open":case"container_error_open":if(i?.parseContainer){const l=i.parseContainer(e,t,n);return r&&$y(l[0],o,e[l[1]-1],n),l}break;case"container_open":if(i?.matchAdmonition){const l=i.matchAdmonition(e,t,n);if(l)return r&&$y(l[0],o,e[l[1]-1],n),l}break;case"vmr_container_open":{const l=yhe(e,t,n);return r&&$y(l[0],o,e[l[1]-1],n),l}}return null}function xhe(){return{type:"hardbreak",raw:`\\ -`}}function _he(e,t,n){const i=e[t+1],s=String(i.content??"");return{type:"paragraph",children:Ki(i.children||[],s,void 0,n),raw:s}}const Bx=new WeakMap,zF=new WeakMap,$x=new WeakMap,Dx=new WeakMap;function Il(e,t,n){const i=t?.map,s=n?.__sourceMarkdown;if(!Array.isArray(i)||i.length<2||typeof s!="string"||!n)return;const o=Number(i[0]),r=Number(i[1]);if(!Number.isFinite(o)||!Number.isFinite(r))return;let l=$x.get(n);if(!l){l=[0];for(let a=0;a<s.length;a++)s[a]===` -`&&l.push(a+1);$x.set(n,l)}zF.set(e,{start:l[Math.max(0,Math.trunc(o))]??s.length,end:l[Math.max(0,Math.trunc(r))]??s.length})}const kv=new WeakMap,Rx=new WeakMap,She=["$","\\["],Mhe=/(^|\r?\n)[\t ]*:::[\t ]*(?:warning|info|note|tip|danger|caution|error)(?=[\t ]|\r?\n|$)[^\r\n]*(?:\r?\n[\t ]*)*$/,Ihe=1024,Ehe=16,i8=new WeakMap,y1=new WeakMap,Qh=new WeakMap,The=new Set(["code_inline","em_close","em_open","emoji","hardbreak","html_block","html_inline","image","ins_close","ins_open","link","link_close","link_open","mark_close","mark_open","math_inline","s_close","s_open","softbreak","strong_close","strong_open","sub","sup","text"]),Lhe=new Map([["paragraph_open","paragraph_close"],["heading_open","heading_close"],["bullet_list_open","bullet_list_close"],["ordered_list_open","ordered_list_close"],["blockquote_open","blockquote_close"],["table_open","table_close"]]),Nhe=new Set(["code_block","fence","hr","inline","math_block"]);function tl(){return typeof performance<"u"?performance.now():Date.now()}function gu(e,t,n){e&&(e[t]=(e[t]??0)+n)}function OF(e){return e.__timing}function PF(e,t,n){return t&&gu(t,"parseMarkdownToStructureTotalMs",tl()-n),e}function jF(e,t){const n=t.postTransformNodes;if(typeof n!="function")return e;const i=n(e);return Array.isArray(i)?i:e}function zx(e,t,n,i){return PF(jF(e,t),n,i)}function jd(e,t,n){if(!n)return Yx(e,t);gu(n,"processTokensInputTokens",e.length);const i=tl(),s=Yx(e,t);return gu(n,"processTokensMs",tl()-i),s}function HF(e,t){return e.every(n=>{if(!The.has(n.type)||(n.type==="link"||n.type==="link_open"||n.type==="link_close")&&!zce(t))return!1;if(n.type==="link"){const s=Dce(n);if(s!=="explicit"&&s!=="linkify"&&s!=="autolink")return!1}if(n.type==="link_open"||n.type==="link_close"){const s=n.markup??"";if(s!==""&&s!=="linkify"&&s!=="autolink")return!1}const i=n.children;return!Array.isArray(i)||HF(i,t)})}function Fhe(e){const t=Lhe.get(e);if(t)return t;const n=/^container_(.+)_open$/.exec(e);return n?`container_${n[1]}_close`:void 0}function Bhe(e,t){const n=[];let i=!1,s=0;for(;s<e.length;){const o=e[s];if(!o||o.level!==0)return null;const r=Fhe(o.type);let l=s+1;if(r){if(o.nesting!==1)return null;for(;l<e.length;){const a=e[l];if(a.level===0){if(a.type!==r||a.nesting!==-1)return null;l++;break}l++}if(e[l-1]?.type!==r)return null;if(o.type==="paragraph_open"||o.type==="heading_open"){if(l!==s+3||e[s+1]?.type!=="inline")return null}else i=!0}else if(Nhe.has(o.type)){if(o.nesting!==0)return null;i=!0}else return null;for(let a=s;a<l;a++){const u=e[a];if(u.type!=="inline")continue;const c=u.children;if(!Array.isArray(c)||!HF(c,t))return null}n.push(s),s=l}return{mixed:i,starts:n}}function $he(e){return/\r?\n[\t ]*\r?\n[\t ]*$/.test(e)}function Dhe(e){return e.__reuseStableTopLevelNodes===!0&&e.final!==!0&&!e.preTransformTokens&&!e.postTransformTokens&&!e.postTransformNodes&&!e.customHtmlTags?.length&&e.includeSourceMap!==!0}function Ox(e,t,n,i,s,o){const r=i.starts;if(r.length===0||s.length!==r.length){y1.delete(e);return}const l=r.map((a,u)=>{const c=r[u+1]??n.length;return{firstToken:n[a],lastToken:n[c-1],tokenCount:c-a}});y1.set(e,{groupBoundaries:l,source:t,nodes:s,stableGroupCount:i.mixed?Math.max(0,r.length-1):$he(t)?r.length:Math.max(0,r.length-1),requireClosingStrong:o.requireClosingStrong,validateLink:o.validateLink})}function Rhe(e,t,n,i){const s=n.length-1;for(let o=0;o<i;o++){const r=n[o],l=n[o+1]??t.length,a=e.groupBoundaries[o];if(!a||a.tokenCount!==l-r)return!1;if(!(a.firstToken===t[r]&&a.lastToken===t[l-1])&&(o>=s||!Hx(a.firstToken,t[r])||!Hx(a.lastToken,t[l-1])))return!1}return!0}function zhe(e,t,n,i,s){const o=e,r=i.__disableStructuredReuse===!0;if(!(Ab(e,i)&&Dhe(i)))return r||y1.delete(o),jd(n,i,s);if(r)return jd(n,i,s);const l=Bhe(n,i.validateLink);if(!l)return y1.delete(o),jd(n,i,s);const a=l.starts,u=y1.get(o),c=Qh.get(o),d=u&&l.mixed?Math.min(u.stableGroupCount,Math.max(0,u.groupBoundaries.length-1)):u?.stableGroupCount??0;if(u&&d>0&&u.requireClosingStrong===i.requireClosingStrong&&u.validateLink===i.validateLink&&t.startsWith(u.source)&&a.length>=d&&(c==="append"||c==="tail")&&Rhe(u,n,a,d)){const p=a[d]??n.length,g=jd(n.slice(p),{...i,__linkifyDemotionSeed:u.nodes.slice(0,d).map(y=>String(y.raw??""))},s),m=a.length-d;if(g.length===m){const y=u.nodes.slice(0,d).concat(g);return gu(s,"processTokensReusedTopLevelNodes",d),Ox(e,t,n,l,y,i),y}}const f=jd(n,i,s);return Ox(e,t,n,l,f,i),f}function Ohe(e){const t=e?.customHtmlTags;if(!Array.isArray(t)||t.length===0)return null;const n=rd(t);return n.length?new Set(n):null}function Phe(e,t){const n=e;let i=Bx.get(n);i||(i=new Map,Bx.set(n,i));const s=t.__markstreamFinal===!0?"final":"streaming";let o=i.get(s);o||(o={},i.set(s,o));for(const r of Object.keys(o))Object.prototype.hasOwnProperty.call(t,r)||delete o[r];return Object.assign(o,t),o}function jhe(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Q0(e,t,n){for(const i of Reflect.ownKeys(e)){const s=Object.getOwnPropertyDescriptor(e,i);if(!s||!("value"in s))continue;const o=Object.getOwnPropertyDescriptor(t,i);o&&(!("value"in o)||o.writable===!1)||(t[i]=wc(s.value,n))}}function wc(e,t=new WeakMap){if(!e||typeof e!="object")return e;const n=e,i=t.get(n);if(i)return i;if(Array.isArray(e)){const r=[];t.set(n,r);for(const l of e)r.push(wc(l,t));return r}if(e instanceof Map){const r=new Map;t.set(n,r);for(const[l,a]of e)r.set(wc(l,t),wc(a,t));return r}if(e instanceof Set){const r=new Set;t.set(n,r);for(const l of e)r.add(wc(l,t));return r}if(e instanceof Date){const r=new Date(e.getTime());return t.set(n,r),r}if(e instanceof RegExp){const r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,t.set(n,r),r}if(typeof URL<"u"&&e instanceof URL){const r=new URL(e.href);return t.set(n,r),Q0(n,r,t),r}if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams){const r=new URLSearchParams(e.toString());return t.set(n,r),Q0(n,r,t),r}if(e instanceof Error){let r;const l=e.constructor;try{r=new l(e.message)}catch{r=new Error(e.message)}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),t.set(n,r),Q0(n,r,t),r}if(typeof Promise<"u"&&e instanceof Promise||typeof Node<"u"&&e instanceof Node)return t.set(n,e),e;if(!jhe(e)){const r=Object.create(Object.getPrototypeOf(e));return t.set(n,r),Q0(n,r,t),r}const s={};t.set(n,s);const o=e;for(const r of Object.keys(o))s[r]=wc(o[r],t);return s}function WF(e,t=!0){if(!t)return zc(e);const n=Object.create(Object.getPrototypeOf(e)),i=new WeakMap;for(const s of Reflect.ownKeys(e)){const o=Object.getOwnPropertyDescriptor(e,s);if(!o)continue;if(!("value"in o)){Object.defineProperty(n,s,o);continue}const r=o.value;let l=r;s==="attrs"&&Array.isArray(r)?l=r.map(a=>[...a]):s==="map"&&Array.isArray(r)?l=[...r]:s==="children"&&Array.isArray(r)?l=r.map(a=>WF(a,t)):t&&r&&typeof r=="object"&&(l=wc(r,i)),Object.defineProperty(n,s,{...o,value:l})}return n}function Px(e,t=!0){return e.map(n=>WF(n,t))}function Ab(e,t){const n=t,i=e.stream,s=t.streamParse??"auto";return n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&(s===!0||s==="auto"&&t.final!==!0)&&i?.enabled===!0&&typeof i.parse=="function"}function Hhe(e,t){const n=t,i=t.streamParse??"auto",s=e.stream;return t.final===!0&&i==="auto"&&n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&s?.enabled===!0&&typeof s.reset=="function"}function Whe(e){kv.delete(e)}function qhe(){return{fenceChar:"",fenceInBlockquote:!1,fenceInList:!1,fenceLen:0,fenceListIndent:0,inDollarMath:!1,inFence:!1,inMath:!1,listContentIndent:null,dollarMathOpenOffset:null,mathOpenOffset:null}}function b1(e){return{...e}}function Uhe(e,t,n,i=Av(t).state){kv.set(e,{explicitBracketMath:i,source:t,key:n,pendingCandidate:n===null&&AF(t)})}function Khe(e){return e.endsWith("$")||e.endsWith("\\")}function Vhe(e){const t=Math.max(e.lastIndexOf(` -`)+1,0),n=e.slice(t).replace(/[\t ]+$/,"");return She.some(i=>n.endsWith(i))}function Zhe(e,t){return t?!!(t.includes("$$")||t.includes("\\[")||e.endsWith("$")&&t[0]==="$"||e.endsWith("\\")&&t[0]==="["||Vhe(e)&&/[\r\n]/.test(t)):!1}function Rl(e,t){let n=t-1,i=0;for(;n>=0&&e[n]==="\\";)i++,n--;return i%2===1}function s8(e){return e===" "||e===" "}function qF(e,t){return t===" "?e+1:e+4-e%4}function Cb(e){let t=0,n=0;for(;t<e.length&&s8(e[t]);)n=qF(n,e[t]),t++;return{index:t,column:n}}function Vf(e){const t=Cb(e);return t.column>3?null:t}function Dy(e){const t=Vf(e);if(!t)return null;const n=t.index,i=e[n];if(i!=="`"&&i!=="~")return null;let s=n;for(;s<e.length&&e[s]===i;)s++;const o=s-n;if(o<3)return null;const r=e.slice(s);return i==="`"&&r.includes("`")?null:{markerChar:i,markerLen:o,rest:r}}function wb(e){const t=Vf(e);if(!t)return null;const n=e.slice(t.index),i=/^(?:[-+*]|\d{1,9}[.)])(?=[\t ]|$)/.exec(n)?.[0];if(!i)return null;let s=t.index+i.length,o=t.column+i.length;if(!s8(e[s]))return null;for(;s<e.length&&s8(e[s]);)o=qF(o,e[s]),s++;return{content:e.slice(s),contentIndent:o}}function xb(e){let t=e,n=!1;for(;;){const i=Vf(t);if(!i)return n?t:null;let s=i.index;if(t[s]!==">")return n?t:null;n=!0,s++,(t[s]===" "||t[s]===" ")&&s++,t=t.slice(s)}}function _b(e){const t=Dy(e);if(t)return{...t,inBlockquote:!1,inList:!1,listIndent:0};const n=xb(e),i=n==null?null:Dy(n);if(i)return{...i,inBlockquote:!0,inList:!1,listIndent:0};const s=wb(e);if(!s)return null;const o=Dy(s.content);return o==null?null:{...o,inBlockquote:!1,inList:!0,listIndent:s.contentIndent}}function UF(e,t){let n=!1,i="",s=0,o=!1,r=!1,l=0,a=null,u=0;for(;u<t;){const c=e.indexOf(` -`,u),d=c===-1||c>=t?t:c,f=e.slice(u,d),p=f.endsWith("\r")?f.slice(0,-1):f,g=Cb(p),m=wb(p);n&&o&&p.trim()&&xb(p)==null&&(n=!1,i="",s=0,o=!1,r=!1,l=0),n&&r&&p.trim()&&g.column<l&&!m&&(n=!1,i="",s=0,o=!1,r=!1,l=0),m?a=m.contentIndent:p.trim()&&a!=null&&g.column<a&&!n&&(a=null);const y=_b(p);if(y&&(n?y.markerChar===i&&y.markerLen>=s&&/^\s*$/.test(y.rest)&&(n=!1,i="",s=0,o=!1,r=!1,l=0):(n=!0,i=y.markerChar,s=y.markerLen,o=y.inBlockquote,r=y.inList||a!=null&&!y.inBlockquote&&g.column>=a,l=y.listIndent||a||0)),c===-1||c>=t)break;u=c+1}return n}function Ghe(e,t){const n=d=>d===" "||d===" ",i=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"||d===":"},s=d=>{if(d[0]!=="<")return null;let f=1;for(;f<d.length&&n(d[f]);)f++;const p=d[f]==="/";if(p)for(f++;f<d.length&&n(d[f]);)f++;const g=f;for(;f<d.length&&i(d[f]);)f++;if(f===g)return null;const m=d.slice(g,f).toLowerCase();if(!VN.has(m))return null;const y=d[f];if(y&&y!==" "&&y!==" "&&y!==">"&&y!=="/")return null;const w=is(d);if(w===-1)return null;let k=w-1;for(;k>=0&&n(d[k]);)k--;return{closing:p,tag:m,selfClosing:!p&&d[k]==="/",after:d.slice(w+1)}},o=(d,f)=>{const p=d.toLowerCase();let g=0;for(;g<p.length;){const m=p.indexOf("</",g);if(m===-1)return!1;for(g=m+2;g<p.length&&n(p[g]);)g++;if(p.startsWith(f,g)){const y=p[g+f.length];if(!y||y===" "||y===" "||y===">")return!0}}return!1},r=[];let l=!1,a=!1,u=!1,c=0;for(;c<t;){const d=e.indexOf(` -`,c),f=d===-1||d>=t?t:d,p=e.slice(c,f),g=p.endsWith("\r")?p.slice(0,-1):p,m=Vf(g);if(m){const y=g.slice(m.index);if(l)l=!y.includes("-->");else if(a)a=!y.includes(">");else if(u)u=!y.includes("?>");else if(y.startsWith("<!--"))l=!y.includes("-->");else if(y.startsWith("<?"))u=!y.includes("?>");else if(y.startsWith("<!"))a=!y.includes(">");else{const w=s(y);if(w)if(w.closing){for(let k=r.length-1;k>=0;k--)if(r[k]===w.tag){r.length=k;break}}else w.selfClosing||o(w.after,w.tag)||r.push(w.tag)}}if(d===-1||d>=t)break;c=d+1}return l||a||u||r.length>0}function Qhe(e,t,n){if(!n?.length)return!1;const i=new Set(rd(n));if(!i.size)return!1;const s=c=>{const d=c.charCodeAt(0);return d>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||c==="_"||c==="-"||c===":"},o=c=>c===" "||c===" ",r=c=>{if(c[0]!=="<")return null;let d=1;for(;d<c.length&&o(c[d]);)d++;const f=c[d]==="/";if(f)for(d++;d<c.length&&o(c[d]);)d++;const p=d;for(;d<c.length&&s(c[d]);)d++;if(d===p)return null;const g=c.slice(p,d).toLowerCase();if(!i.has(g))return null;const m=c[d];if(m&&m!==" "&&m!==" "&&m!==">"&&m!=="/")return null;const y=c.indexOf(">",d);if(y===-1)return null;let w=y-1;for(;w>=0&&o(c[w]);)w--;return{closing:f,tag:g,selfClosing:!f&&c[w]==="/",after:c.slice(y+1)}},l=(c,d)=>{const f=c.toLowerCase();let p=0;for(;p<f.length;){const g=f.indexOf("</",p);if(g===-1)return!1;for(p=g+2;p<f.length&&o(f[p]);)p++;if(f.startsWith(d,p)){const m=f[p+d.length];if(!m||m===" "||m===" "||m===">")return!0}}return!1},a=[];let u=0;for(;u<t;){const c=e.indexOf(` -`,u),d=c===-1||c>=t?t:c,f=e.slice(u,d),p=f.endsWith("\r")?f.slice(0,-1):f,g=Vf(p);if(g){const m=r(p.slice(g.index));if(m)if(m.closing){for(let y=a.length-1;y>=0;y--)if(a[y]===m.tag){a.length=y;break}}else m.selfClosing||l(m.after,m.tag)||a.push(m.tag)}if(c===-1||c>=t)break;u=c+1}return a.length>0}function Yhe(e,t){const n=Mhe.exec(e);if(!n)return null;const i=n[1]??"",s=n.index+i.length,o=e.indexOf(` -`,s),r=e.slice(s,o===-1?e.length:o);return!Vf(r.endsWith("\r")?r.slice(0,-1):r)||UF(e,s)||Ghe(e,s)||Qhe(e,s,t)?null:`${e.slice(0,n.index)}${i}`}function Sb(e,t,n){let i=t;for(;i<e.length&&e[i]===n;)i++;return i-t}function KF(e,t,n){let i=t;for(;i<e.length;){const s=e.indexOf("`",i);if(s===-1)return-1;const o=Sb(e,s,"`");if(o===n)return s;i=s+o}return-1}function Ry(e){e.inFence=!1,e.fenceChar="",e.fenceLen=0,e.fenceInBlockquote=!1,e.fenceInList=!1,e.fenceListIndent=0}function jx(e,t,n,i,s){let o=0,r=!1;for(;o<e.length;){const l=o;if(t.inMath){if(e.startsWith("\\]",o)&&!Rl(e,l)){i!=null&&s&&n+o+2>i&&(r=!0),t.inMath=!1,t.mathOpenOffset=null,o+=2;continue}o++;continue}if(t.inDollarMath){if(e.startsWith("$$",o)&&!Rl(e,l)){i!=null&&s&&n+o+2>i&&(r=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,o+=2;continue}o++;continue}if(e[o]==="`"&&!Rl(e,l)){const a=Sb(e,o,"`"),u=KF(e,o+a,a);if(u===-1)break;o=u+a;continue}if(e.startsWith("\\[",o)&&!Rl(e,l)){t.inMath=!0,t.mathOpenOffset=n+o,o+=2;continue}if(e.startsWith("$$",o)&&!Rl(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+o,o+=2;continue}o++}return r}function Jhe(e,t){if(!pb(t))return e;const n=t,i=Rx.get(n),s=i?.source===e?i.state:i&&e.startsWith(i.source)?VF(i.state,e.slice(i.source.length),i.source.length-i.state.lineBuffer.length).state:Av(e).state;Rx.set(n,{source:e,state:s});const{context:o}=s,r=o.inMath?o.mathOpenOffset:o.inDollarMath?o.dollarMathOpenOffset:null;if(r==null)return e;const l=e.slice(r+2),a=e.lastIndexOf(` -`,r-1)+1;if(e.slice(a,r).trim()!==""&&!/^\r?\n/.test(l)||/^\s*!\[/.test(l))return e;const u=l.trim(),c=/^(?:[a-z]|pi)$/i.test(u);return ou(l)&&!c?e:e.slice(0,r)}function Xhe(e,t,n,i,s){const o=Cb(e),r=wb(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&xb(e)==null&&Ry(t),t.inFence&&t.fenceInList&&e.trim()&&o.column<t.fenceListIndent&&!r&&Ry(t),r?t.listContentIndent=r.contentIndent:e.trim()&&t.listContentIndent!=null&&o.column<t.listContentIndent&&!t.inFence&&(t.listContentIndent=null),!t.inMath&&!t.inDollarMath){const l=_b(e);if(l)t.inFence?l.markerChar===t.fenceChar&&l.markerLen>=t.fenceLen&&/^\s*$/.test(l.rest)&&Ry(t):(t.inFence=!0,t.fenceChar=l.markerChar,t.fenceLen=l.markerLen,t.fenceInBlockquote=l.inBlockquote,t.fenceInList=l.inList||t.listContentIndent!=null&&!l.inBlockquote&&o.column>=t.listContentIndent,t.fenceListIndent=l.listIndent||t.listContentIndent||0);else if(!t.inFence)return jx(e,t,n,i,s)}else return jx(e,t,n,i,s);return!1}function Av(e,t=qhe(),n=null,i=!1,s=0){const o=b1(t);let r=b1(t),l="",a=!1,u=0;for(;u<e.length;){const c=e.indexOf(` -`,u),d=c!==-1,f=d&&c>u&&e[c-1]==="\r"?c-1:d?c:e.length,p=e.slice(u,f);Xhe(p,o,s+u,n,i)&&(a=!0),d?(r=b1(o),l=""):l=p,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:o,lineBuffer:l}}}function VF(e,t,n=0){return t&&!e.context.inMath&&!e.context.inDollarMath&&!e.context.inFence&&!e.committedContext.inFence&&!/[\\$`~\r\n]/.test(t)&&!(e.lineBuffer.endsWith("\\")&&(t[0]==="["||t[0]==="]"))?{closedOpenMath:!1,state:{committedContext:b1(e.committedContext),context:b1(e.context),lineBuffer:e.lineBuffer+t}}:Av(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function e1e(e,t){if(!pb(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const i=e,s=kv.get(i);if(s?.source===t)return;const o=s?t.startsWith(s.source):!1,r=o&&s?t.slice(s.source.length):"",l=o&&s?VF(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):Av(t),a=l.state,u=o&&s?l.closedOpenMath:!1;if(s&&o&&s.key===null&&s.pendingCandidate===!1&&!u&&!Zhe(s.source,r)&&!Khe(t)){s.source=t,s.explicitBracketMath=a;return}const c=$de(t);(s&&(s&&!o||s.key!==c||u)||!s&&c)&&n.reset(),Uhe(e,t,c,a)}function t1e(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function ZF(e,t){const n=e?.map,i=t?.map;return n===i?!0:!Array.isArray(n)||!Array.isArray(i)?!1:n.length===i.length&&n.every((s,o)=>s===i[o])}function n1e(e,t){const n=e?.attrs,i=t?.attrs;if(n===i)return!0;if(!Array.isArray(n)||!Array.isArray(i)||n.length!==i.length)return!1;for(let s=0;s<n.length;s++){const o=n[s],r=i[s];if(o[0]!==r[0]||o[1]!==r[1])return!1}return!0}function Hx(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.level===t.level&&e.markup===t.markup&&e.content===t.content&&e.info===t.info&&ZF(e,t)&&n1e(e,t)}function zy(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.markup===t.markup&&e.content===t.content&&ZF(e,t)}function Wx(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function i1e(e){for(let t=0;t+5<e.length;t++)if(Wx(e,t)&&Wx(e,t+3)&&zy(e[t],e[t+3])&&zy(e[t+1],e[t+4])&&zy(e[t+2],e[t+5]))return!0;return!1}function s1e(e,t,n){return pb(e)&&AF(t)&&i1e(n)}function o1e(e){const t=kv.get(e);return typeof t?.key=="string"&&t.key.startsWith("pending:")}function qx(e,t,n,i){const s=e;if(i.customHtmlTags?.length&&(n.__markstreamCustomHtmlTags=i.customHtmlTags),!Ab(e,i)||(e1e(e,t),o1e(e)))return Qh.set(s,"sync"),e.parse(t,n);const o=e.stream.parse(t,Phe(e,n));if(s1e(e,t,o))return e.stream?.reset?.(),Qh.set(s,"sync"),e.parse(t,n);const r=e.stream?.stats?.();if(Qh.set(s,r?.lastMode??"stream"),!t1e(i))return o;const l=OF(i);if(!l)return Px(o,!0);const a=tl(),u=Px(o,!0);return gu(l,"tokenCloneMs",tl()-a),u}function Cv(e){const t=e?.customHtmlTags;if(!Array.isArray(t)||t.length===0)return tp;const n=new Set(tp);for(const i of rd(t))i&&n.add(i);return n}function r1e(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:e.type==="hardbreak"?"<br>":""}function Ux(e){return{type:"paragraph",children:e,raw:e.map(r1e).join("")}}function Kx(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function Vx(e,t){if(e.type!=="paragraph")return null;const n=e.children,i=Array.isArray(n)?n:[];if(i.length===0)return null;const s=Ohe(t);if(!s?.size)return null;let o=-1;for(let c=0;c<i.length;c++){const d=i[c];if(!s.has(String(d?.type??"").toLowerCase()))continue;const f=i.slice(0,c);if(String(d.content??"").trim()&&f.some(p=>p?.type==="hardbreak")){o=c;break}}if(o===-1)return null;const r=i.slice(0,o),l=i[o];if(!l)return null;const a=[];r.length&&a.push(Ux(r)),a.push(l);const u=i.slice(o+1);return u.length&&a.push(Ux(u)),a}function l1e(e){const t=e.trim();if(!t)return null;const n=/^(?:<!doctype\s+html[^>]*>\s*)?<html(?:\s[^>]*)?>/i.test(t),i=/<\/html>\s*$/i.test(t);return!n||!i?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function k1(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function a1e(e,t){if(e.type!=="html_block"||!t)return!1;const n=String(e.raw??e.content??"");return new RegExp(String.raw`^\s*<\s*\/\s*${pl(t)}\s*>\s*$`,"i").test(n)}const Oy=new Set(["iframe","script","style","textarea","title"]);function Ep(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=f=>{if(e.startsWith("<!--",f)){const A=e.indexOf("-->",f+4);return{closing:!1,end:A===-1?e.length:A+3,selfClosing:!1,tag:""}}if(e.startsWith("<![CDATA[",f)){const A=e.indexOf("]]>",f+9);return{closing:!1,end:A===-1?e.length:A+3,selfClosing:!1,tag:""}}const p=is(e.slice(f));if(p===-1)return null;const g=f+p+1,m=e.slice(f,g);if(/^<\s*[!?]/.test(m))return{closing:!1,end:g,selfClosing:!1,tag:""};let y=m.slice(1).trimStart();const w=y.startsWith("/");w&&(y=y.slice(1).trimStart());const k=y.match(/^([A-Z][\w:-]*)/i);return k?.[1]?{closing:w,end:g,selfClosing:/\/\s*>$/.test(m),tag:k[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},o=(f,p)=>{const g=new RegExp(String.raw`<\s*\/\s*${pl(f)}(?=\s|>)`,"gi");g.lastIndex=p;const m=g.exec(e);if(!m||m.index==null)return null;const y=s(m.index);return y?{start:m.index,end:y.end}:null};let r=-1,l=-1,a=Math.max(0,n);for(;a<e.length;){const f=e.indexOf("<",a);if(f===-1)return null;const p=s(f);if(!p)return null;if(!p.closing&&p.tag===i){r=f,l=p.end-1;break}if(!p.closing&&Oy.has(p.tag)){a=o(p.tag,p.end)?.end??e.length;continue}a=p.end}if(r===-1||l===-1)return null;const u=e.slice(r,l+1);if(Su.has(i)||/\/\s*>$/.test(u))return{raw:u,start:r,end:l+1,closed:!0};if(Oy.has(i)){const f=o(i,l+1);return f?{raw:e.slice(r,f.end),start:r,end:f.end,closeStart:f.start,closed:!0}:{raw:e.slice(r),start:r,end:e.length,closed:!1}}let c=1,d=l+1;for(;d<e.length;){const f=e.indexOf("<",d);if(f===-1)return{raw:e.slice(r),start:r,end:e.length,closed:!1};const p=s(f);if(!p)return null;if(p.closing&&p.tag===i){c--;const g=p.end;if(c===0)return{raw:e.slice(r,g),start:r,end:g,closeStart:f,closed:!0};d=g;continue}if(!p.closing&&p.tag===i){!p.selfClosing&&!Su.has(p.tag)&&c++,d=p.end;continue}if(!p.closing&&Oy.has(p.tag)){d=o(p.tag,p.end)?.end??e.length;continue}d=p.end}return{raw:e.slice(r),start:r,end:e.length,closed:!1}}function u1e(e,t){if(!t)return 0;let n=0,i=0;for(;n<e.length&&i<t.length;){if(e[n]===t[i]){n++,i++;continue}if(e[n]==="\r"||e[n]===` -`){n++;continue}return-1}return i===t.length?n:-1}function c1e(e,t,n){return n?e:`${e.replace(/<[^>]*$/,"")} -</${t}>`}function Zx(e){return e.replace(/\r\n/g,` -`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function d1e(e,t,n){return n?e.includes(n,t)?!0:Zx(e.slice(Math.max(0,t))).includes(Zx(n)):!1}function f1e(e,t){let n=Math.max(0,t);for(;n<e.length&&(e[n]===" "||e[n]===" ");)n++;return e[n]==="\r"?(n++,e[n]===` -`&&n++,n):e[n]===` -`?n+1:t}function Gx(e){if(e.type!=="html_block"||String(e.tag??"").toLowerCase()!=="details")return!1;const t=String(e.raw??e.content??"");return/^\s*<details\b/i.test(t)}function h1e(e){if(e.type!=="html_block")return!1;const t=String(e.raw??e.content??"");return/^\s*<\/details\b/i.test(t)}function GF(e,t){const n=new RegExp(String.raw`<\s*\/\s*${pl(t)}(?=\s|>)`,"gi");let i=-1,s;for(;(s=n.exec(e))!==null;)i=s.index;return i}function QF(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const p1e=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),g1e=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function m1e(e){return/\n\s*\n/.test(e)||g1e.test(e)}function v1e(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(i=>p1e.has(String(i?.type??"").toLowerCase()))||t.some(i=>{if(i?.type!=="html_block")return!1;const s=i;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!m1e(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function y1e(e){const t=[];let n=0;for(;n<e.length;){for(;/\s/.test(e[n]??"");)n++;if(n>=e.length)break;const i=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!i?.[1])return null;const s=Ep(e,i[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function b1e(e,t,n,i){const s=n.customHtmlTags?.join("\0")??"",o=t,r=Dx.get(o),l=r&&r.final===i&&r.customHtmlTags===s&&r.requireClosingStrong===n.requireClosingStrong&&r.validateLink===n.validateLink,a=e.map((u,c)=>l&&r.blocks[c]===u?r.children[c]:gf(u,t,n));return Dx.set(o,{blocks:e,children:a,customHtmlTags:s,final:i,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function k1e(e,t,n,i){return e.map(s=>{if(s?.type!=="html_block")return s;const o=s,r=String(o.tag??"").toLowerCase();if(!r||r==="details"||GN.has(r)||Array.isArray(o.children))return s;const l=String(s.raw??o.content??"");if(!l)return s;const a=is(l);if(a===-1)return s;const u=Ep(l,r,0),c=u?.closeStart??-1,d=u?.closed===!0&&c>=a+1,f=d?l.slice(a+1,c):l.slice(a+1);if(!f.trim())return s;const p=QF(n,i),g=d?null:y1e(f),m=g?b1e(g,t,p,i):gf(f,t,p);return v1e(f,m)?{...s,children:m}:s})}function A1e(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function gf(e,t,n){return e.trim()?JF(e,t,{...n,__disableStreamParse:!0,__disableStructuredReuse:!0}):[]}function C1e(e,t,n){const i=gf(e,t,n),s=i[0];return i.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:i}function w1e(e,t,n){const i=$F({content:e}),s=is(e),o=GF(e,"summary");if(s!==-1&&o!==-1&&o>=s+1){const r=C1e(e.slice(s+1,o),t,n);r.length>0&&(i.children=r)}return i.raw=e,i}function x1e(e,t,n){const i=is(e);if(i===-1)return[];const s=e.slice(i+1);if(!s.trim())return[];const o=Ep(s,"summary",0);if(!o)return gf(s,t,n);const r=s.slice(0,o.start),l=s.slice(o.end);return[...gf(r,t,n),w1e(o.raw,t,n),...gf(l,t,n)]}function YF(e,t,n,i,s,o=0){const r=[];let l=o;for(let a=0;a<e.length;a++){const u=e[a],c=k1(u);let d=-1;if(c&&(d=t.indexOf(c,l),d!==-1&&(l=d+c.length)),!Gx(u)){r.push(u);continue}const f=String(u.raw??k1(u)??""),p=d!==-1?d:t.indexOf(f,Math.max(0,l-f.length));if(p===-1){r.push(u);continue}let g=1,m=-1;for(let K=a+1;K<e.length;K++){const H=e[K];if(Gx(H)){g++;continue}if(h1e(H)&&(g--,g===0)){m=K;break}}const y=Ep(t,"details",p),w=m===-1&&y?.closed===!0,k=w?(()=>{const K=GF(f,"details");return K!==-1?f.slice(0,K):f})():f,[A]=YF(w?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,i,s,p+f.length),v=x1e(k,n,QF(i,s)),x=m===-1?"</details>":String(e[m].raw??k1(e[m])??"</details>"),E=w||m!==-1&&y?.closed===!0,S=x.replace(/[\t\r\n ]+$/,""),M=E?(()=>{const K=(y?.raw??"").lastIndexOf(S);return K===-1?t.length:p+K})():t.length,_=is(f),N=w&&_!==-1?p+_+1:p+f.length,D=t.slice(N,M===-1?t.length:M),T=n.parse(D,{__markstreamFinal:s}),$=n.renderer.render(T,n.options,{__markstreamFinal:s}),P=M+S.length,O=E?Math.max(M+x.length,f1e(t,P)):t.length,R=E?t.slice(M,O):x,W=E?t.slice(p,O):t.slice(p),z=w&&_!==-1?f.slice(0,_+1):f,G={...u,tag:"details",attrs:yv(f.slice(0,_+1)),raw:W,content:`${z}${$}${R}`,children:[...v,...A],loading:!s&&!E};if(i.includeSourceMap&&(G.sourceMap=op(t,p,E?O:t.length,i)),r.push(G),l=E?O:t.length,m===-1&&!w)break;m!==-1&&(a=m)}return[r,l]}function _1e(e,t,n,i){if(!n)return e;const s=e.slice();let o=0;for(let r=0;r<s.length;r++){const l=s[r],a=k1(l),u=a?n.indexOf(a,o):-1;if(l?.type!=="html_block"){u!==-1&&(o=u+a.length);continue}const c=String(l.tag??"").toLowerCase();if(!c)continue;if(c==="details"){u!==-1&&(o=u+a.length);continue}const d=Ep(n,c,u!==-1?u:o);if(!d)continue;o=d.end;const f=String(l.content??a),p=String(l.raw??f),g=u+p.length;if(u!==-1&&d.end<g&&n.slice(u,g)===p){o=g,i?.includeSourceMap&&(l.sourceMap=op(n,u,g,i));continue}const m=c1e(d.raw,c,d.closed),y=!t&&!d.closed,w=f!==m||p!==d.raw||!!l.loading!==y,k=is(d.raw),A=k===-1?"":d.raw.slice(0,k+1),v=A?yv(A):[];if(l.content=m,l.raw=d.raw,l.loading=y,l.attrs=v.length?v:void 0,i?.includeSourceMap&&(l.sourceMap=op(n,d.start,d.end,i)),!w)continue;let x=u1e(d.raw,p);x===-1&&(x=0);const E=r+1;for(;E<s.length;){if(d.closed&&a1e(s[E],c)){s.splice(E,1);continue}const S=k1(s[E]);if(!S)break;const M=d.raw.indexOf(S,x);if(M===-1){if(d1e(n,d.end,S))break;const _=zF.get(s[E]);if(!_)break;if(_.start>=d.start&&_.end<=d.end){s.splice(E,1);continue}break}x=M+S.length,s.splice(E,1)}}return s}function S1e(e){const t=l=>l===" "||l===" "||l===` -`||l==="\r",n=l=>{if(!l||l[0]!=="<"||l.includes(">"))return!1;let a=1;if(a<l.length&&t(l[a])||l.startsWith("<!--")||l.startsWith("<?")||l.startsWith("<!")||l[a]==="/"&&(a++,a<l.length&&t(l[a])))return!1;const u=m=>{const y=m.charCodeAt(0);return y>=65&&y<=90||y>=97&&y<=122},c=m=>{const y=m.charCodeAt(0);return y>=48&&y<=57},d=m=>m==="!"||u(m),f=m=>u(m)||c(m)||m===":"||m==="-",p=m=>u(m)||c(m)||m==="_"||m==="."||m===":"||m==="-",g=p;if(a>=l.length||!d(l[a]))return!1;for(a++;a<l.length&&f(l[a]);)a++;for(;a<l.length;){for(;a<l.length&&t(l[a]);)a++;if(a>=l.length)return!0;if(l[a]==="/"){for(a++;a<l.length&&t(l[a]);)a++;return a>=l.length}if(!p(l[a]))return!1;for(a++;a<l.length&&g(l[a]);)a++;for(;a<l.length&&t(l[a]);)a++;if(a<l.length&&l[a]==="="){for(a++;a<l.length&&t(l[a]);)a++;if(a>=l.length)return!0;const m=l[a];if(m==='"'||m==="'"){for(a++;a<l.length&&l[a]!==m;)a++;if(a>=l.length)return!0;a++}else{for(;a<l.length;){const y=l[a];if(t(y)||y==="<"||y===">"||y==='"'||y==="'"||y==="`")break;a++}if(a>=l.length)return!0}}}return!0},i=(l,a)=>UF(l,a),s=String(e??""),o=s.lastIndexOf("<");if(o===-1||i(s,o))return s;if(o>0){const l=s[o-1],a=l===" "||l===" "||l===` -`||l==="\r",u=s[o-2];if(!a&&!((l==="n"||l==="r")&&u==="\\"))return s}const r=s.slice(o);return r.includes(">")||r.length>1&&(r[1]===" "||r[1]===" "||r[1]===` -`||r[1]==="\r")||!n(r)?s:s.slice(0,o)}function Qx(e,t){if(e===t)return;const n=e.split(/\r?\n/),i=t.split(/\r?\n/),s=[];let o=0;for(let r=0;r<i.length;r++){const l=i[r]??"";if(n[o]===l){s[r]={startLine:o,endLine:o+1},o++;continue}const a=n[o]??"";if(l!==""&&a!==l&&a.startsWith(l)){let p=l,g=-1;for(let m=r+1;m<i.length;m++){if(p+=i[m]??"",p===a){g=m;break}if(!a.startsWith(p))break}if(g!==-1){for(let m=r;m<=g;m++)s[m]={startLine:o,endLine:o+1};o++,r=g;continue}s[r]={startLine:o,endLine:o+1};continue}let u=n[o]??"",c=-1;for(let p=o+1;p<n.length;p++){if(u+=`\\n${n[p]??""}`,u===l){c=p+1;break}if(!l.startsWith(u))break}if(c!==-1){s[r]={startLine:o,endLine:c},o=c;continue}let d=-1;if(l!==""){const p=Math.min(n.length,o+80);for(let g=o;g<p;g++)if(n[g]===l){d=g;break}}if(d!==-1){s[r]={startLine:d,endLine:d+1},o=d+1;continue}const f=Math.min(Math.max(0,n.length-1),Math.max(0,o-1));s[r]={startLine:f,endLine:f+1}}return r=>{const l=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0;if(l<s.length)return s[l]??{startLine:0,endLine:0};const a=s[s.length-1]??{startLine:Math.max(0,n.length-1),endLine:n.length},u=Math.min(n.length,a.endLine+l-s.length);return{startLine:u,endLine:Math.min(n.length,u+1)}}}function M1e(e,t){if(!e||!t.length)return e;const n=new Set(t.map(g=>String(g??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const i=g=>g===" "||g===" ",s=g=>{const m=g.charCodeAt(0);return m>=65&&m<=90||m>=97&&m<=122||m>=48&&m<=57||g==="_"||g==="-"||g===":"},o=g=>{if(!g)return!1;if(g[0]===" ")return!0;let m=0;for(let y=0;y<g.length;y++){const w=g[y];if(w===" "){if(m++,m>=4)return!0;continue}if(w===" ")return!0;break}return!1},r=g=>{let m=!1,y=!1;for(let w=0;w<g.length;w++){const k=g[w];if(k==="\\"){w++;continue}if(!y&&k==="'"){m=!m;continue}if(!m&&k==='"'){y=!y;continue}if(!m&&!y&&k===">")return w}return-1},l=g=>{let m=0;for(;m<g.length&&i(g[m]);)m++;const y=g[m];if(y!=="`"&&y!=="~")return null;let w=m;for(;w<g.length&&g[w]===y;)w++;const k=w-m;return k<3?null:{markerChar:y,markerLen:k,rest:g.slice(w)}},a=(g,m)=>{if(o(g))return-1;const y=g.replace(/^[ \t]+/,"");if(!y||y.startsWith(">")||y.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(y))return-1;let w=!1,k=0;for(;k<g.length;){const A=g[k];if(A!=="<"){i(A)||(w=!0),k++;continue}const v=r(g.slice(k));if(v===-1){w=!0,k++;continue}const x=g.slice(k,k+v+1);let E=1;for(;E<x.length&&i(x[E]);)E++;if(E>=x.length){w=!0,k++;continue}const S=x[E];if(S==="!"||S==="?"){w=!0,k+=v+1;continue}if(S==="/"){w=!0,k+=v+1;continue}const M=E;for(;E<x.length&&s(x[E]);)E++;if(E===M){w=!0,k++;continue}const _=x.slice(M,E).toLowerCase(),N=x[E];if(N&&N!==" "&&N!==" "&&N!==">"&&N!=="/"){w=!0,k++;continue}const D=new RegExp(String.raw`<\s*\/\s*${_}\s*>`,"i"),T=/\/\s*>$/.test(x),$=D.test(g.slice(k+v+1)),P=D.test(e.slice(m+k+v+1)),O=/[\r\n]/.test(e.slice(m+k+v+1));if(w&&n.has(_)&&!T&&!$&&(P||O))return k;w=!0,k+=v+1}return-1};let u=!1,c="",d=0,f="",p=0;for(;p<e.length;){const g=e.indexOf(` -`,p),m=g!==-1,y=m&&g>p&&e[g-1]==="\r",w=m?y?g-1:g:e.length,k=e.slice(p,w),A=m?y?`\r -`:` -`:"",v=l(k);let x=k;if(!u&&!v){const E=a(k,p);if(E!==-1){const S=A||` -`;x=`${k.slice(0,E).replace(/[ \t]+$/,"")}${S}${S}${k.slice(E).replace(/^[ \t]+/,"")}`}}f+=x,f+=A,v&&(u?v.markerChar===c&&v.markerLen>=d&&/^\s*$/.test(v.rest)&&(u=!1,c="",d=0):(u=!0,c=v.markerChar,d=v.markerLen)),p=m?g+1:e.length}return f}function I1e(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const i=d=>d===" "||d===" ",s=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"},o=d=>{let f=0;for(;f<d.length&&i(d[f]);)f++;return d.slice(f)},r=d=>{let f=!1,p=!1;for(let g=0;g<d.length;g++){const m=d[g];if(m==="\\"){g++;continue}if(!p&&m==="'"){f=!f;continue}if(!f&&m==='"'){p=!p;continue}if(!f&&!p&&m===">")return g}return-1},l=(d,f,p)=>{const g=p.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let y=m+1;for(;y<d.length&&i(d[y]);)y++;if(y>=d.length||d[y]!=="/"){m=d.indexOf("<",m+1);continue}for(y++;y<d.length&&i(d[y]);)y++;if(y+g.length>d.length){m=d.indexOf("<",m+1);continue}let w=!0;for(let A=0;A<g.length;A++){const v=d[y+A];if((v>="A"&&v<="Z"?String.fromCharCode(v.charCodeAt(0)+32):v)!==g[A]){w=!1;break}}if(!w){m=d.indexOf("<",m+1);continue}let k=y+g.length;if(k<d.length&&s(d[k])){m=d.indexOf("<",m+1);continue}for(;k<d.length&&i(d[k]);)k++;if(k<d.length&&d[k]===">")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f<d.length&&i(d[f]);)f++;if(f>=d.length||d[f]!=="<")return d;for(f++;f<d.length&&i(d[f]);)f++;if(f>=d.length||d[f]==="/")return d;const p=f;for(;f<d.length&&s(d[f]);)f++;if(f===p)return d;const g=d.slice(p,f).toLowerCase();if(!n.has(g))return d;const m=r(d.slice(f));if(m===-1)return d;const y=f+m;if(l(d,y+1,g))return d;const w=o(d.slice(y+1));return w?`${d.slice(0,y+1)} -${w}`:d};let u="",c=0;for(;c<e.length;){const d=e.indexOf(` -`,c);if(d===-1){u+=a(e.slice(c));break}const f=d>c&&e[d-1]==="\r",p=f?d-1:d,g=e.slice(c,p);u+=a(g),u+=f?`\r -`:` -`,c=d+1}return u}function E1e(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const i=f=>f===" "||f===" ",s=f=>{let p=0,g=!1,m=0;for(;p<f.length;){for(;p<f.length&&i(f[p]);)p++;if(p>=f.length||f[p]!==">")break;for(g=!0,p++;p<f.length&&i(f[p]);)p++;m=p}return g?{prefix:f.slice(0,m),content:f.slice(m)}:null},o=f=>{let p=0;for(;p<f.length&&i(f[p]);)p++;const g=f[p];if(g!=="`"&&g!=="~")return null;let m=p;for(;m<f.length&&f[m]===g;)m++;const y=m-p;return y<3?null:{markerChar:g,markerLen:y,rest:f.slice(m)}},r=Array.from(n).map(f=>new RegExp(String.raw`(<\s*\/\s*${f}\s*>)${"(?=[\\t ]*(?:#{1,6}[\\t ]+|>|(?:[*+-]|\\d+[.)])[\\t ]+|(?:`{3,}|~{3,})|\\||\\$\\$|:{3,}|\\[\\^[^\\]]+\\]:|(?:-{3,}|\\*{3,}|_{3,})))"}`,"gi"));let l=!1,a="",u=0,c="",d=0;for(;d<e.length;){const f=e.indexOf(` -`,d),p=f!==-1,g=p&&f>d&&e[f-1]==="\r",m=p?g?f-1:f:e.length,y=e.slice(d,m),w=p?g?`\r -`:` -`:"",k=s(y),A=k?.prefix??"",v=k?.content??y,x=o(v);x&&(l?x.markerChar===a&&x.markerLen>=u&&/^\s*$/.test(x.rest)&&(l=!1,a="",u=0):(l=!0,a=x.markerChar,u=x.markerLen));let E=v;if(!l&&E.includes("</"))for(const S of r)E=E.replace(S,(M,_,N,D)=>{if(D.replace(/^[\t ]+/,"").startsWith("|"))return M;const T=D.slice(0,N).replace(/^[\t ]+/,"");if(T.length>0){const $=_.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",P=T.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!$||!P||$!==P)return M}return`${_} - -`});if(A){const S=A+E.split(` -`).join(` -${A}`);c+=S}else c+=E;c+=w,d=p?f+1:e.length}return c}function T1e(e,t){if(!e||!t.length)return e;const n=new Set(t.map(T=>String(T??"").toLowerCase()));if(!n.size)return e;const i=T=>T===" "||T===" ",s=T=>{if(!T)return!1;if(T[0]===" ")return!0;let $=0;for(let P=0;P<T.length;P++){const O=T[P];if(O===" "){if($++,$>=4)return!0;continue}if(O===" ")return!0;break}return!1},o=T=>{const $=T.charCodeAt(0);return $>=65&&$<=90||$>=97&&$<=122||$>=48&&$<=57||T==="_"||T==="-"||T===":"},r=T=>{let $=0;for(;$<T.length&&i(T[$]);)$++;return T.slice($)},l=T=>{let $=0,P=!1,O=0;for(;$<T.length;){for(;$<T.length&&i(T[$]);)$++;if($>=T.length||T[$]!==">")break;for(P=!0,$++;$<T.length&&i(T[$]);)$++;O=$}if(!P)return null;const R=T.slice(0,O);return{prefix:R,key:R.replace(/[ \t]+$/,""),content:T.slice(O)}},a=T=>r(T).startsWith("<"),u=T=>{for(let $=0;$<T.length;$++){const P=T[$];if(P!==" "&&P!==" ")return!1}return!0},c=T=>{if(s(T))return"";const $=r(T);if(!$.startsWith("<"))return"";let P=1;for(;P<$.length&&i($[P]);)P++;if(P>=$.length||$[P]==="/"||$[P]==="!"||$[P]==="?")return"";const O=P;for(;P<$.length&&o($[P]);)P++;if(P===O)return"";const R=$.slice(O,P).toLowerCase();if(!n.has(R))return"";const W=$[P];return W&&W!==" "&&W!==" "&&W!==">"&&W!=="/"?"":R},d=T=>{if(s(T))return null;const $=r(T);if(!$.startsWith("<"))return null;let P=1;for(;P<$.length&&i($[P]);)P++;if(P>=$.length)return null;const O=$[P]==="/";if(O)for(P++;P<$.length&&i($[P]);)P++;const R=$[P];if(!R||R==="!"||R==="?")return null;const W=P;for(;P<$.length&&o($[P]);)P++;if(P===W)return null;const z=$.slice(W,P).toLowerCase();if(!n.has(z))return null;const G=$[P];if(G&&G!==" "&&G!==" "&&G!==">"&&G!=="/")return null;if(O)return{type:"close",name:z};if(/\/\s*>\s*$/.test($))return{type:"open",name:z,complete:!0};const K=$.indexOf(">",P);if(K!==-1){const H=$.slice(K+1);if(new RegExp(`<\\s*\\/\\s*${z}\\s*>`,"i").test(H))return{type:"open",name:z,complete:!0}}return{type:"open",name:z,complete:!1}},f=T=>{if(s(T))return null;const $=r(T).replace(/[ \t]+$/,"");if(!$.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test($))return null;const P=$.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(P?.[1])return P[1].toLowerCase();const O=$.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!O?.[1]||!O[2])return null;const R=O[1].toLowerCase();return R===O[2].toLowerCase()?R:null};let p=!1,g="",m=0;const y=T=>{let $=0;for(;$<T.length&&i(T[$]);)$++;const P=T[$];if(P!=="`"&&P!=="~")return null;let O=$;for(;O<T.length&&T[O]===P;)O++;const R=O-$;return R<3?null:{markerChar:P,markerLen:R,rest:T.slice(O)}},w=T=>y(T),k=T=>{const $=r(T);return $?s(T)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test($):!1},A=(T,$,P)=>{let O=T,R=0;for(;O<e.length;){const W=e.indexOf(` -`,O),z=W!==-1,G=z&&W>O&&e[W-1]==="\r",K=z?G?W-1:W:e.length,H=e.slice(O,K),q=l(H),X=q?.key??"";if(R>0&&$&&X!==$)break;const ee=q?.content??H,ue=d(ee);if(ue?.name===P){if(ue.type==="open")ue.complete||R++;else if(R>0&&(R--,R===0))return!1}else if(R>0&&(u(ee)||k(ee)))return!0;if(z)O=W+1;else break}return!1};let v="",x=0,E=!0,S=!1,M=!1,_=` -`;const N=[];let D="";for(;x<e.length;){const T=e.indexOf(` -`,x),$=T!==-1,P=$&&T>x&&e[T-1]==="\r",O=$?P?T-1:T:e.length,R=e.slice(x,O),W=$?P?`\r -`:` -`:"",z=l(R),G=z?.key??"",K=z?.content??R,H=w(K);H&&(p?H.markerChar===g&&H.markerLen>=m&&/^\s*$/.test(H.rest)&&(p=!1,g="",m=0):(p=!0,g=H.markerChar,m=H.markerLen));const q=N.length>0;if(!p&&!q){const ee=c(K),ue=!!ee&&!E&&S&&M&&A(x,G,ee);ee&&!E&&(!S||ue)&&(G&&D&&G===D?v+=`${G}${_}`:G||(v+=_))}if(v+=R,v+=W,W&&(_=W),!p){const ee=d(K);if(ee){if(ee.type==="open")ee.complete||N.push(ee.name);else for(let ue=N.length-1;ue>=0;ue--)if(N[ue]===ee.name){N.length=ue;break}}}const X=u(K);E=X,S=!X&&a(K),M=!X&&!!f(K),D=G,x=$?T+1:e.length}return v}function L1e(e){let t=!1,n="",i=0,s=!1,o=!1,r=!1,l=0;const a=(c,d)=>{const f=_b(c);if(f){t?f.markerChar===n&&f.markerLen>=i&&/^\s*$/.test(f.rest)&&(t=!1,n="",i=0):(t=!0,n=f.markerChar,i=f.markerLen);return}if(t)return;let p=0;for(;p<c.length;){if(s){c.startsWith("$$",p)&&!Rl(c,p)?(s=!1,p+=2):p++;continue}if(o){c.startsWith("\\]",p)&&!Rl(c,p)?(o=!1,p+=2):p++;continue}const g=c[p];if(g==="`"){const m=Sb(c,p,"`"),y=KF(c,p+m,m);if(y===-1)break;p=y+m;continue}if(g==="\\"){const m=c[p+1];m==="["&&!Rl(c,p)?(o=!0,p+=2):(m==="]"&&Rl(c,p),p+=2);continue}if(g==="$"){if(c[p+1]==="$"&&!Rl(c,p)){s=!0,r=!1,p+=2;continue}if(r){r=!1,p++;continue}const m=c[p+1];(m===void 0||m!==" "&&m!==" "&&!/\d/.test(m))&&(r=!0),p++;continue}p++}};return{scanTo:c=>{for(;l<c;){const d=e.indexOf(` -`,l),f=d===-1||d>=c?c:d,p=f>l&&e[f-1]==="\r"?f-1:f;if(a(e.slice(l,p)),d===-1||d>=c){l=c;break}r=!1,l=d+1}},inMath:()=>s||o||r}}function Py(e,t,n,i){let s=e.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2");const o=L1e(s);if(s=s.replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,(r,l,a,u)=>{o.scanTo(u+1);const c=o.inMath();return o.scanTo(u+r.length),c?`${l}\\n${a}`:r}),t||(s.endsWith("- *")&&(s=s.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*-\s*$/,r=>r.startsWith(` -`)?` -`:""):/(?:^|\n)\s*--\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*--\s*$/,r=>r.startsWith(` -`)?` -`:""):/(?:^|\n)\s*>\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*>\s*$/,r=>r.startsWith(` -`)?` -`:""):/\n\s*[*+]\s*$/.test(s)?s=s.replace(/\n\s*[*+]\s*$/,` -`):/(?:^|\n)\s*\d+\s*$/.test(s)?/^\d+$/.test(s.trim())||(s=s.replace(/(?:^|\n)\s*\d+\s*$/,r=>r.startsWith(` -`)?` -`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(s)?s=s.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(r,l,a)=>`${l}${a.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*\d+[.)]\s*$/,r=>r.startsWith(` -`)?` -`:""):/\n[[(]\n*$/.test(s)&&(s=s.replace(/(\n\[|\n\()+\n*$/g,` -`)),s=Yhe(s,i.customHtmlTags)??s),i.customHtmlTags?.length&&s.includes("<")){const r=rd(i.customHtmlTags);if(r.length&&(s=M1e(s,r),s=I1e(s,r),s=T1e(s,r),s=E1e(s,r),s.includes("</")))for(const l of r){const a=new RegExp(String.raw`(^[\t ]*<\s*\/\s*${l}\s*>[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");s=s.replace(a,"$1$2$2")}}return t||(s=S1e(s)),s}function N1e(e,t,n,i){const s=e,o=`${n?"final":"stream"}:${(i.customHtmlTags??[]).join(",")}`,r=i8.get(s);let l;if(!n&&!i.customHtmlTags?.length&&r&&r.mode===o&&t.length>=r.source.length&&t.startsWith(r.source)){const a=Math.max(0,r.source.length-Ihe-Ehe),u=Py(t.slice(a),n,e,i),c=r.source.length-a;l=u.length>=c&&u.slice(0,c)===r.safeMarkdown.slice(-c)?r.safeMarkdown.slice(0,r.safeMarkdown.length-c)+u:Py(t,n,e,i)}else l=Py(t,n,e,i);return n||(l=Jhe(l,e)),i8.set(s,{source:t,safeMarkdown:l,mode:o}),l}function JF(e,t,n={}){const i=OF(n),s=i?tl():0,o=!!n.final,r=(e??"").toString();Hhe(t,n)&&(t.stream.reset(),Whe(t),i8.delete(t));const l=N1e(t,r,o,n);i&&gu(i,"safeMarkdownMs",tl()-s);const a=l1e(l);if(a){if(n.includeSourceMap){const x={...n,__sourceLineMapper:Qx(r,l)};a[0].sourceMap=op(l,0,l.length,x)}const A=n.preTransformTokens,v=n.postTransformTokens;if(Ab(t,n)||typeof A=="function"||typeof v=="function"){const x=qx(t,l,{__markstreamFinal:o},n),E=typeof A=="function"&&A(x)||x;typeof v=="function"&&v(E)}return zx(a,n,i,s)}const u=i?tl():0,c=qx(t,l,{__markstreamFinal:o},n);if(i&&gu(i,"tokenizeMs",tl()-u),!c||!Array.isArray(c))return zx([],n,i,s);const d=n.preTransformTokens,f=n.postTransformTokens;let p=c;d&&typeof d=="function"&&(p=d(p)||p);const g=t,m=typeof g.validateLink=="function"&&g.__markstreamOriginalValidateLink&&g.validateLink!==g.__markstreamOriginalValidateLink?g.validateLink:void 0,y=n.validateLink??m??g.options?.validateLink??(typeof g.validateLink=="function"?g.validateLink:void 0),w={...n,validateLink:y,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?Qx(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let k=zhe(t,l,p,w,i);if(f&&typeof f=="function"){const A=f(p);if(Array.isArray(A)){const v=A[0],x=v?.type;v&&typeof x=="string"?k=jd(A,{...w,__customHtmlBlockCursor:0},i):k=A}}if(A1e(k)){const A=i?tl():0;k=_1e(k,o,l,w),k=YF(k,l,t,w,o)[0],k=k1e(k,t,w,o),i&&gu(i,"htmlBlockPassesMs",tl()-A)}if(o){const A=new WeakSet,v=x=>{if(!x||typeof x!="object"||A.has(x))return;if(A.add(x),Array.isArray(x)){for(const S of x)v(S);return}const E=x;E.type==="html_block"&&E.loading===!0&&(E.loading=!1);for(const S of Object.values(E))v(S)};v(k)}return k=jF(k,n),n.debug&&console.log("Parsed Markdown Tree Structure:",k),PF(k,i,s)}function Yx(e,t){if(!e||!Array.isArray(e))return[];const n=[],i=ju(t),s=t?.__linkifyDemotionSeed;if(Array.isArray(s)&&s.length)for(const l of s)i.remember(String(l??""));const o=t?.includeSourceMap===!0;let r=0;for(;r<e.length;){const l=kb(e,r,i.options(),bb);if(l){Il(l[0],e[r],t),n.push(l[0]),i.remember(l[0].raw),r=l[1];continue}const a=e[r];switch(a.type){case"paragraph_open":{const u=String(e[r+1]?.content??""),c=_he(e,r,i.options(u));o&&Zn(c,a,t);const d=Vx(c,t);if(d){o&&Kx(d,c);for(const f of d)Il(f,a,t);n.push(...d)}else Il(c,a,t),n.push(c);i.remember(c.raw),r+=3;break}case"bullet_list_open":case"ordered_list_open":{const[u,c]=Uf(e,r,i.options());o&&Zn(u,a,t),Il(u,a,t),n.push(u),i.remember(u.raw),r=c;break}case"blockquote_open":{const[u,c]=Kf(e,r,i.options());o&&Zn(u,a,t),Il(u,a,t),n.push(u),i.remember(u.raw),r=c;break}case"footnote_anchor":{const u=a.meta??{},c={type:"footnote_anchor",id:String(u.label??a.content??""),raw:String(a.content??"")};o&&Zn(c,a,t),Il(c,a,t),n.push(c),i.remember(String(a.content??"")),r++;break}case"hardbreak":n.push(xhe()),i.reset(),r++;break;case"text":{const u=String(a.content??""),c={type:"paragraph",raw:u,children:u?[{type:"text",content:u,raw:u}]:[]};o&&Zn(c,a,t),Il(c,a,t),n.push(c),i.remember(u),r++;break}case"inline":{const u=String(a.content??""),c=Ki(a.children||[],u,void 0,i.options(u));if(c.length!==0)if(c.every(d=>d.type==="html_block")){if(o)for(const d of c)Zn(d,a,t);for(const d of c)Il(d,a,t);n.push(...c)}else{const d={type:"paragraph",raw:u,children:c};o&&Zn(d,a,t);const f=Vx(d,t);if(f){o&&Kx(f,d);for(const p of f)Il(p,a,t);n.push(...f)}else Il(d,a,t),n.push(d)}i.remember(u)}r+=1;break;default:r+=1;break}}return n}const F1e=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g,A1=/\d/u,B1e=/[,.!?;:,。;、!?:]/u,$1e=/\d\p{Script=Han}{1,3}$/u;function D1e(e){return e.pos>0&&e.pos+1<e.posMax&&A1.test(e.src[e.pos-1])&&A1.test(e.src[e.pos+1])}function R1e(e,t,n,i,s,o={}){const r=e.charCodeAt(0);return(l,a)=>{const u=l,c=u.posMax,d=u.pos;if(u.src.charCodeAt(d)!==r||a||o.refuseDigitRange&&D1e(u))return!1;u.pos=d+1;let f=!1;for(;u.pos<c;){if(u.src.charCodeAt(u.pos)===r){f=!0;break}u.md.inline.skipToken(u)}if(!f||d+1===u.pos)return u.pos=d,!1;const p=u.src.slice(d+1,u.pos);if(!p||p.match(/(^|[^\\])(\\\\)*\s/))return u.pos=d,!1;const g=u.src[u.pos+1],m=A1.test(p[0]),y=g!==void 0&&A1.test(g);if(m&&y&&($1e.test(u.src.slice(0,d))||B1e.test(p)||A1.test(p[p.length-1])))return u.pos=d,!1;const w=u.push(n,s,1);w.markup=t;const k=u.push("text","",0);k.content=p.replace(F1e,"$1");const A=u.push(i,s,-1);return A.markup=t,u.pos=u.pos+1,!0}}function z1e(e){const t=R1e("~","~","sub_open","sub_close","sub",{refuseDigitRange:!0});e.inline.ruler.after("emphasis","sub",t)}const O1e=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,P1e=new Set([...Sp,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),j1e=new Set(["a","abbr","b","blockquote","br","caption","code","col","colgroup","dd","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","picture","pre","s","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","ul"]);function Jx(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function H1e(e){return typeof e=="string"?e:e==null?"":String(e)}function XF(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function ru(e){return H1e(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function eB(e){return ru(e).replace(/`/g,"`")}function wv(e){return String(e??"").trim().toLowerCase()}function Mb(e,t="safe"){const n=wv(e);return n?t==="escape"?!0:t==="trusted"?Sp.has(n):!j1e.has(n):!1}function tB(e,t="safe"){const n=wv(e);return n?t==="escape"?!0:t==="trusted"?Sp.has(n):P1e.has(n):!1}function Xx(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,i])=>i===""?` ${n}`:` ${n}="${eB(i)}"`).join("")}function nB(e){const t=e.startsWith("/"),n=t?e.slice(1):e,i=n.match(O1e);return i?{attrsStr:t?"":n.slice(i[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:i[1]}:null}function W1e(e,t){const n=e.split(",").map(i=>i.trim()).filter(Boolean);return n.length===0?!1:n.some(i=>{const s=i.split(/\s+/,1)[0]??"";return!s||Rc(s,{tagName:t,attrName:"srcset"})})}function iB(e,t,n,i){return _ue.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?W1e(t,i):!!(Sue.has(e)&&t&&Rc(t,{tagName:i,attrName:e}))}function xc(e,t){const n=t.toLowerCase();return Object.keys(e).find(i=>i.toLowerCase()===n)}function sB(e,t,n,i=!1){if(t!=="safe"||wv(n)!=="a")return e;const s=xc(e,"href");if(i&&(!s||!e[s])){const a=xc(e,"target"),u=xc(e,"rel");return a&&delete e[a],u&&delete e[u],e}const o=xc(e,"target");if((o?String(e[o]).trim():"").toLowerCase()!=="_blank")return e;const r=xc(e,"rel"),l=new Set(String(r?e[r]:"").split(/\s+/).map(a=>a.trim()).filter(Boolean).filter(a=>a.toLowerCase()!=="opener"));return l.add("noopener"),l.add("noreferrer"),r&&r!=="rel"&&delete e[r],e.rel=Array.from(l).join(" "),e}function e_(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!XF(r)||iB(l,o,t,n)||(i[r]=o)}return sB(i,t,n,!!xc(e,"href"))}function oB(e,t){const n=e.toLowerCase();return ZN.has(n)?!1:Jx(t,n)||Jx(t,e)}function Ib(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!XF(r)||iB(l,o,t,n)||(i[r]=o)}return sB(i,t,n,!!xc(e,"href"))}function C1(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,i]of e)n&&(t[String(n)]=i==null?"":String(i));return t}function Bg(e,t="safe",n){const i=Ib(C1(e),t,n),s=Object.entries(i).map(([o,r])=>[o,r]);return s.length>0?s:void 0}function q1e(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return e==="true"||e===""||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const i=Number(e);if(e!==""&&!Number.isNaN(i))return i}return e}function U1e(e){const t={};for(const[n,i]of Object.entries(e))t[n]=q1e(i,n);return t}function jy(e){return e.trim().length>0}function rB(e){const t=[];let n=0;for(;n<e.length;){if(e.startsWith("<!--",n)){const r=e.indexOf("-->",n);if(r!==-1){n=r+3;continue}break}const i=e.indexOf("<",n);if(i===-1){if(n<e.length){const r=e.slice(n);jy(r)&&t.push({type:"text",content:r})}break}if(i>n){const r=e.slice(n,i);jy(r)&&t.push({type:"text",content:r})}if(e.startsWith("![CDATA[",i+1)){const r=e.indexOf("]]>",i);if(r!==-1){t.push({type:"text",content:e.slice(i,r+3)}),n=r+3;continue}break}if(e.startsWith("!",i+1)){const r=e.indexOf(">",i);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=nB(e.slice(i+1,s));if(!o){const r=e.slice(i,s+1);jy(r)&&t.push({type:"text",content:r}),n=s+1;continue}if(o.isClosing)t.push({type:"tag_close",tagName:o.tagName});else{const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||Su.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r})}n=s+1}return t}function K1e(e){const t=[];let n=0;for(;n<e.length;){if(e.startsWith("<!--",n)){const l=e.indexOf("-->",n);if(l!==-1){n=l+3;continue}break}const i=e.indexOf("<",n);if(i===-1){n<e.length&&t.push({type:"text",content:e.slice(n)});break}if(i>n&&t.push({type:"text",content:e.slice(n,i)}),e.startsWith("![CDATA[",i+1)){const l=e.indexOf("]]>",i);if(l!==-1){t.push({type:"text",content:e.slice(i,l+3)}),n=l+3;continue}break}if(e.startsWith("!",i+1)){const l=e.indexOf(">",i);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=nB(e.slice(i+1,s));if(!o){t.push({type:"text",content:e.slice(i,s+1)}),n=s+1;continue}if(o.isClosing){t.push({type:"tag_close",tagName:o.tagName}),n=s+1;continue}const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||Su.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r}),n=s+1}return t}function V1e(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${ru(t)}>`;const n=Object.entries(e.attrs??{}).map(([i,s])=>s===""?` ${ru(i)}`:` ${ru(i)}="${eB(s)}"`).join("");return e.type==="self_closing"?`<${ru(t)}${n} />`:`<${ru(t)}${n}>`}function Z1e(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of rB(e))if((n.type==="tag_open"||n.type==="self_closing")&&oB(n.tagName??"",t))return!0;return!1}function mf(e,t="safe"){if(!e)return"";if(t==="escape")return ru(e);const n=K1e(e),i=[],s=[],o=[];for(const r of n){if(r.type==="text"){o.length===0&&s.push(ru(r.content??""));continue}const l=wv(r.tagName);if(!l)continue;if(tB(l,t)){r.type==="tag_open"?o.push(l):r.type==="tag_close"&&o[o.length-1]===l&&o.pop();continue}if(o.length>0)continue;if(t==="safe"&&Mb(l,t)){s.push(V1e(r));continue}if(r.type==="self_closing"){s.push(`<${l}${Xx(e_(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${Xx(e_(r.attrs??{},t,l))}>`),Su.has(l)||i.push(l);continue}const a=i.lastIndexOf(l);if(a===-1)continue;for(;i.length>a+1;){const c=i.pop();c&&s.push(`</${c}>`)}const u=i.pop();u&&s.push(`</${u}>`)}for(;i.length>0;){const r=i.pop();r&&s.push(`</${r}>`)}return s.join("")}const G1e=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],t_="http://www.w3.org/2000/svg",Q1e=new Set(["script","style","iframe","object","embed","link","meta"]),Y1e=new Set(["svg","style","g","a","defs","marker","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","use","image","lineargradient","radialgradient","stop","clippath","mask","pattern"]),J1e=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),X1e=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),epe=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function tpe(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function npe(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function ipe(e){const t=e.nodeName.toLowerCase();return t==="use"?tpe(e):t==="image"?npe(e):t==="text"||t==="tspan"?!!e.textContent?.trim():epe.has(t)}function spe(e){return e.replace(/(["'])\s*javascript:/gi,"$1#").replace(/\bjavascript:/gi,"#").replace(/(["'])\s*vbscript:/gi,"$1#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function ope(e,t,n){const i=e.toLowerCase(),s=t.toLowerCase(),o=String(n??"").trim();return o?(i==="use"||i==="marker"||i==="clippath"||i==="mask")&&(s==="href"||s==="xlink:href")?o.startsWith("#")?o:"":i==="a"&&(s==="href"||s==="xlink:href")?Rc(o,{tagName:"a",attrName:"href"})?"":o:i==="image"&&(s==="href"||s==="xlink:href"||s==="src")?Rc(o,{tagName:"img",attrName:"src"})?"":o:s==="href"||s==="xlink:href"?o.startsWith("#")?o:"":Rc(o,{tagName:i,attrName:s})?"":o:""}function rpe(e,t){let n=t+4;for(;n<e.length&&/\s/.test(e[n]??"");)n++;const i=e[n];if(i==='"'||i==="'"){const o=n+1,r=e.indexOf(i,o);if(r===-1)return{next:e.length,url:""};for(n=r+1;n<e.length&&/\s/.test(e[n]??"");)n++;return{next:n<e.length&&e[n]===")"?n+1:n,url:e.slice(o,r)}}const s=n;for(;n<e.length&&e[n]!==")";)n++;return{next:n<e.length?n+1:n,url:e.slice(s,n)}}function lB(e){return e.replace(/\\([0-9a-f]{1,6}\s?|.)/gi,(t,n)=>{const i=n.trim();if(/^[0-9a-f]+$/i.test(i)){const s=Number.parseInt(i,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function aB(e){const t=lB(e),n=t.toLowerCase();let i=0;for(;i<n.length;){const s=n.indexOf("url(",i);if(s===-1)return!1;const o=rpe(t,s);if(i=Math.max(o.next,s+4),!o.url.trim().startsWith("#"))return!0}return!1}function n_(e){const t=lB(e);return G1e.some(n=>n.test(t))||aB(t)}function lpe(e){if(e.tagName.toLowerCase()!=="a"||e.getAttribute("target")?.trim().toLowerCase()!=="_blank")return;const t=new Set(String(e.getAttribute("rel")??"").split(/\s+/).map(n=>n.trim()).filter(Boolean).filter(n=>n.toLowerCase()!=="opener"));t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",Array.from(t).join(" "))}function Y0(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function uB(e,t){if(e.nodeType===Node.TEXT_NODE){const s=e.textContent??"";s&&t.push(s);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const n=e,i=n.tagName.toLowerCase();if(!Q1e.has(i)){if(i==="br"){t.push(` -`);return}for(const s of Array.from(n.childNodes))uB(s,t)}}function ape(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];uB(t,n);const i=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!i.length){t.remove();continue}const s=Y0(t.getAttribute("width")),o=Y0(t.getAttribute("height")),r=Y0(t.getAttribute("x")),l=Y0(t.getAttribute("y")),a=e.ownerDocument.createElementNS(t_,"text");a.setAttribute("x",String(r+s/2)),a.setAttribute("y",String(l+o/2)),a.setAttribute("text-anchor","middle"),a.setAttribute("dominant-baseline","central");const u=t.querySelector(".nodeLabel");if(u?.getAttribute("class")&&a.setAttribute("class",u.getAttribute("class")),i.length===1)a.textContent=i[0];else{const c=-.6*(i.length-1);for(const[d,f]of i.entries()){const p=e.ownerDocument.createElementNS(t_,"tspan");p.setAttribute("x",String(r+s/2)),p.setAttribute("dy",d===0?`${c}em`:"1.2em"),p.textContent=f,a.appendChild(p)}}t.parentNode?.replaceChild(a,t)}}function upe(e){ape(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const i=n.tagName.toLowerCase();if(!Y1e.has(i)){n.remove();continue}if(i==="style"&&n_(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const o of s){const r=o.name.toLowerCase();if(/^on/i.test(r)){n.removeAttribute(o.name);continue}if(r==="style"&&o.value&&n_(o.value)){n.removeAttribute(o.name);continue}if(r==="srcdoc"){n.removeAttribute(o.name);continue}if(J1e.has(r)&&o.value){const l=ope(i,r,o.value);if(!l){n.removeAttribute(o.name);continue}l!==o.value&&n.setAttribute(o.name,l);continue}if(X1e.has(r)&&o.value&&aB(o.value)){n.removeAttribute(o.name);continue}if(o.value){const l=spe(o.value);l!==o.value&&n.setAttribute(o.name,l)}}lpe(n)}}function AYe(e){if(typeof DOMParser>"u"||!e)return null;try{const t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.nodeName.toLowerCase()!=="svg")return null;const n=t;return upe(n),cpe(n)?null:n}catch{return null}}function cpe(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const o=Number.parseFloat(s[2]||""),r=Number.parseFloat(s[3]||"");if(!Number.isFinite(o)||!Number.isFinite(r)||o<=0||r<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let i=!1;for(const s of n){ipe(s)&&(i=!0);for(const o of Array.from(s.attributes))if(/\bNaN\b/i.test(o.value)||o.name==="style"&&/max-width:\s*0(?:px)?/i.test(o.value))return!0}return!i}const J0=[];function Hy(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function dpe(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function fpe(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function i_(e=`editor-${Date.now()}`,t={}){const n=qde(t),i=n;i.__markstreamRegisteredPluginCount=J0.length,i.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||J0.length);const s={"common.copy":"Copy"};let o;if(typeof t.i18n=="function")o=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const p=t.i18n;o=g=>p[g]??s[g]??g}else o=p=>s[p]??p;if(Array.isArray(t.plugin))for(const p of t.plugin){const g=p;if(Array.isArray(g)){const[m,...y]=g;typeof m=="function"&&n.use(m,...y)}else typeof g=="function"&&n.use(g)}if(Array.isArray(t.apply))for(const p of t.apply)try{p(n)}catch(g){console.error("[getMarkdown] apply function threw an error",g)}if(J0.length)for(const p of J0)if(Array.isArray(p)){const[g,...m]=p;typeof g=="function"&&n.use(g,...m)}else typeof p=="function"&&n.use(p);n.use(z1e),n.use(coe),n.use(loe);const r=woe,l=r.default??r;n.use(l),n.use(roe),n.use(ooe),n.core.ruler.after("block","mark_fence_closed",p=>{const g=p,m=g.src,y=!!g.env?.__markstreamFinal,w=m.split(/\r?\n/);for(const k of g.tokens){if(k.type!=="fence"||!k.map||!k.markup)continue;const A=k.map[0],v=k.map[1],x=k.markup,E=x[0],S=x.length,M=w[Math.max(0,v-1)]??"";let _=0;for(;_<M.length&&(M[_]===" "||M[_]===" ");)_++;let N=0;for(;_+N<M.length&&M[_+N]===E;)N++;let D=_+N;for(;D<M.length&&(M[D]===" "||M[D]===" ");)D++;const T=y?!0:v>A+1&&N>=S&&D===M.length,$=k;$.meta=$.meta??{},$.meta.unclosed=!T,$.meta.closed=!!T}}),n.renderer.rules.fence=(p,g)=>{const m=p[g],y=String(m.info??"").trim(),w=String(m.content??""),k=btoa(unescape(encodeURIComponent(w))),A=dpe(y),v=Hy(A),x=fpe(`editor-${e}-${g}-${A}`),E=Hy(o("common.copy"));return`<div class="code-block" data-code="${k}" data-lang="${v}" id="${x}"> - <div class="code-header"> - <span class="code-lang">${Hy(A.toUpperCase())}</span> - <button class="copy-button" data-code="${k}">${E}</button> - </div> - <div class="code-editor"></div> - </div>`};const a=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,c=p=>{if(!p.startsWith("["))return!1;const g=u.exec(p);if(!g)return p!=="["&&!/^\[\d+$/.test(p);const m=String(g[1]??"");return p.slice(g[0].length).startsWith("(")?!1:!/^\d+$/.test(m)},d=(p,g)=>{const m=p;if(m.src[m.pos]!=="[")return!1;const y=a.exec(m.src.slice(m.pos));if(!y)return!1;const w=m.src.slice(Math.max(0,m.pos-120),m.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(w))return!1;const k=m.src.slice(m.pos+y[0].length);if(k.startsWith("](")||k.startsWith("(")||c(k))return!1;if(!g){const A=y[1],v=m.push("reference","span",0);v.content=A,v.markup=y[0],v.raw=y[0]}return m.pos+=y[0].length,!0};n.inline.ruler.before("escape","reference",d),n.renderer.rules.reference=(p,g)=>{const y=String(p[g].content??"");return`<span class="reference-link" data-reference-id="${y}" role="button" tabindex="0" title="Click to view reference">${y}</span>`};const f=n.use.bind(n);return n.use=((...p)=>(i.__markstreamHasCustomParserExtensions=!0,f(...p))),n}function hpe({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function cB({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:i,streamRenderVersionChanged:s=!1}){const o=`${n.settledContent}${n.streamedDelta}`;return i?n.streamedDelta&&o===e?s?{settledContent:o,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:hpe({nextContent:e,previousContent:t??o,typewriterEnabled:i}):{settledContent:e,streamedDelta:"",appended:!1}}const ppe={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function gpe(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function dB(e){const t=gpe(e);return ppe[t]??t}function mpe(e){if(!Array.isArray(e))return;const t=e.filter(i=>typeof i=="string").map(i=>dB(i)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function vpe(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const i of e){if(typeof i!="string")continue;const s=i.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function ype(e){return vpe(e)?.join("\0")??""}function bpe(e,t){return`${ype(e)}\0\0${mpe(t)?.join("\0")??""}`}function Nd(e,t,n=1){const i=Number(e);return Number.isFinite(i)?Math.max(n,i):t}function s_(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var kpe=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,p=this.pendingChars<=0;if(this.source+=d,p){const g=o_();this.startedAt=f&&this.hasStarted?g-this.normalizedStartDelayMs:g,this.lastTick=g,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=o_();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAt<this.normalizedStartDelayMs){this.rafId=requestAnimationFrame(this.tick);return}const f=1e3/Math.max(1,this.maxCommitFps),p=Math.min(100,Math.max(0,d-this.lastTick));if(p<f){this.rafId=requestAnimationFrame(this.tick);return}this.lastTick=d;const g=this.pendingChars,m=g>this.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,y=xpe(g/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(y-this.currentCps)*.2,this.charBudget+=this.currentCps*(p/1e3),this.charBudget<1){this.ensureLoop();return}const w=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),k=wpe(this.source.slice(this.visible.length),w,this.segmenter);k.text&&(this.visible+=k.text,this.charBudget=Math.max(0,this.charBudget-k.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:i=1e3,targetLatencyMs:s=900,catchUpLatencyMs:o=350,catchUpThreshold:r=600,maxCommitFps:l=30,startDelayMs:a=80,maxCharsPerCommit:u=80,flushOnFinish:c=!1}=e;this.minCharsPerSecond=Nd(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Nd(i,1e3,1)),this.normalizedTargetLatencyMs=Nd(s,900,1),this.normalizedCatchUpLatencyMs=Nd(o,350,1),this.normalizedCatchUpThreshold=s_(r,600),this.normalizedStartDelayMs=s_(a,80),this.maxCommitFps=Math.trunc(Nd(l,30,1)),this.maxCharsPerCommit=Math.trunc(Nd(u,80,1)),this.flushOnFinish=c,this.segmenter=Cpe(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function Ape(e={},t){const n=new kpe(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function Cpe(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function wpe(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const o=Array.from(e).slice(0,t);return{text:o.join(""),graphemeCount:o.length}}let i="",s=0;for(const o of n.segment(e)){if(s>=t)break;i+=o.segment,s++}return{text:i,graphemeCount:s}}function o_(){return typeof performance<"u"?performance.now():Date.now()}function xpe(e,t,n){return Math.min(n,Math.max(t,e))}var _pe=(e,t,n)=>new Promise((i,s)=>{var o=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const o8=Symbol.for("markstream-vue:node-lifecycle");function CYe(){}const Eb=new Map;let fB="material";const Yd=new Map,r_=new Map;let r8=null;function Spe(e){Eb.set(e.id,e)}function Mpe(e){const t=Eb.get(fB);if(!t)return;const n=t.core[e];if(n)return n;const i=Yd.get(t.id);if(i){const s=i[e];if(s)return s}t.loadExtended&&!Yd.has(t.id)&&Epe(t)}function Ipe(){var e,t;return(t=(e=Eb.get(fB))==null?void 0:e.fallback)!=null?t:""}function Epe(e){return _pe(this,null,function*(){var t,n,i;if(Yd.has(e.id))return(t=Yd.get(e.id))!=null?t:null;let s=r_.get(e.id);return s||(s=((i=(n=e.loadExtended)==null?void 0:n.call(e))!=null?i:Promise.resolve(null)).then(o=>(Yd.set(e.id,o),r8?.(),o)).catch(()=>(Yd.set(e.id,null),null)),r_.set(e.id,s)),s})}const l_='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>',a_='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>',Tpe={id:"material",core:{"":a_,plain:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>',text:a_,javascript:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ffca28" d="M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>',typescript:'<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><path fill="#0288d1" d="M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>',jsx:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00bcd4" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#00bcd4" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#00bcd4" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#00bcd4" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>',tsx:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#0288d1" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#0288d1" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#0288d1" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>',html:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e65100" d="m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z"/></svg>',css:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/></svg>',scss:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ec407a" d="M27.837 5.673a4.33 4.33 0 0 0-2.293-2.701c-2.362-1.261-6.11-1.298-9.548-.092a26.3 26.3 0 0 0-8.76 4.966c-2.752 2.542-3.438 4.925-3.189 6.194.523 2.668 3.274 4.539 5.485 6.042.418.284.822.559 1.175.816-1.429.76-4.261 2.444-5.088 4.248a3.88 3.88 0 0 0-.118 3.332A2.37 2.37 0 0 0 6.869 29.8a5.6 5.6 0 0 0 1.49.2 6.35 6.35 0 0 0 5.19-2.856 6.74 6.74 0 0 0 .864-5.382 7.3 7.3 0 0 1 2.044-.03 3.92 3.92 0 0 1 2.816 1.311 1.82 1.82 0 0 1 .423 1.262 1.55 1.55 0 0 1-.772 1.05c-.234.14-.586.355-.504.803.036.194.198.633.894.512a2.93 2.93 0 0 0 2.145-2.651 4 4 0 0 0-1.197-2.904 5.94 5.94 0 0 0-4.396-1.626 10.6 10.6 0 0 0-2.672.304 20 20 0 0 0-2.203-1.846c-1.712-1.3-3.33-2.529-3.235-4.26.125-2.263 2.468-4.532 6.964-6.744 4.016-1.976 7.254-2.037 8.944-1.438a2 2 0 0 1 1.204.883 2.77 2.77 0 0 1-.36 2.47 9.71 9.71 0 0 1-7.425 4.304 3.86 3.86 0 0 1-3.238-.757c-.278-.302-.593-.645-1.074-.383q-.565.31-.225 1.189a3.9 3.9 0 0 0 2.407 1.92 11.7 11.7 0 0 0 7.128-.671c3.527-1.35 6.681-5.202 5.756-8.787M11.895 24.475a4 4 0 0 1-.192.468 4.5 4.5 0 0 1-.753 1.081 2.83 2.83 0 0 1-2.533 1.107c-.056-.032-.078-.146-.085-.193a3.28 3.28 0 0 1 1.076-2.284 11.3 11.3 0 0 1 2.644-1.933 3.85 3.85 0 0 1-.157 1.754"/></svg>',json:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="#f9a825" d="M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z"/></svg>',python:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711"/><path fill="#fdd835" d="M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89"/></svg>',ruby:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#f44336" d="M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z"/></svg>',go:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00acc1" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#00acc1" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/></svg>',java:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z"/></svg>',kotlin:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><defs><linearGradient id="a" x1="1.725" x2="22.185" y1="22.67" y2="1.982" gradientTransform="translate(1.306 1.129)scale(.89324)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7c4dff"/><stop offset=".5" stop-color="#d500f9"/><stop offset="1" stop-color="#ef5350"/></linearGradient></defs><path fill="url(#a)" d="M2.975 2.976v18.048h18.05v-.03l-4.478-4.511-4.48-4.515 4.48-4.515 4.443-4.477z"/></svg>',c:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>',cpp:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>',cs:l_,csharp:l_,php:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1e88e5" d="M12 18.08c-6.63 0-12-2.72-12-6.08s5.37-6.08 12-6.08S24 8.64 24 12s-5.37 6.08-12 6.08m-5.19-7.95c.54 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.58 1.09q-.42.33-1.29.33h-.87l.53-2.76zm-3.5 5.55h1.44l.34-1.75h1.23c.54 0 .98-.06 1.33-.17.35-.12.67-.31.96-.58.24-.22.43-.46.58-.73.15-.26.26-.56.31-.88.16-.78.05-1.39-.33-1.82-.39-.44-.99-.65-1.82-.65H4.59zm7.25-8.33-1.28 6.58h1.42l.74-3.77h1.14c.36 0 .6.06.71.18s.13.34.07.66l-.57 2.93h1.45l.59-3.07c.13-.62.03-1.07-.27-1.36-.3-.27-.85-.4-1.65-.4h-1.27L12 7.35zM18 10.13c.55 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.57 1.09-.29.22-.72.33-1.3.33h-.85l.5-2.76zm-3.5 5.55h1.44l.34-1.75h1.22c.55 0 1-.06 1.35-.17.35-.12.65-.31.95-.58.24-.22.44-.46.58-.73.15-.26.26-.56.32-.88.15-.78.04-1.39-.34-1.82-.36-.44-.99-.65-1.82-.65h-2.75z"/></svg>',shell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>',powershell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#03a9f4" d="M29.07 6H7.677A1.535 1.535 0 0 0 6.24 7.113l-4.2 17.774A.852.852 0 0 0 2.93 26h21.393a1.535 1.535 0 0 0 1.436-1.113L29.96 7.112A.852.852 0 0 0 29.07 6M8.626 23.797a1.4 1.4 0 0 1-1.814-.31l-.007-.009a1.075 1.075 0 0 1 .315-1.599l9.6-6.061-6.102-5.852-.01-.01a1.068 1.068 0 0 1 .084-1.625l.037-.03a1.38 1.38 0 0 1 1.8.07l7.233 6.957a1.1 1.1 0 0 1 .236.739 1.08 1.08 0 0 1-.412.79c-.074.04-.146.119-10.951 6.935ZM24 22.94A1.135 1.135 0 0 1 22.803 24h-5.634a1.061 1.061 0 1 1 .001-2.112h5.633A1.134 1.134 0 0 1 24 22.938Z"/></svg>',sql:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2"/></svg>',yaml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff5252" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z"/></svg>',markdown:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>',xml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>',rust:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10"/></svg>',vue:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#41b883" d="M1.791 3.851 12 21.471 22.209 3.936V3.85H18.24l-6.18 10.616L5.906 3.851z"/><path fill="#35495e" d="m5.907 3.851 6.152 10.617L18.24 3.851h-3.723L12.084 8.03 9.66 3.85z"/></svg>',mermaid:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>'},fallback:'<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>',loadExtended:()=>ns(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Lpe=vl(0);r8=()=>{Lpe.value++},Spe(Tpe);const Npe={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function xv(e){var t;const n=(function(i){if(!i)return"";const s=i.trim();if(!s)return"";const[o]=s.split(/\s+/),[r]=o.split(":");return r.toLowerCase()})(e);return(t=Npe[n])!=null?t:n}function wYe(e){const t=xv(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function xYe(e){return Mpe(xv(e))||Ipe()}const u_={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var _v=(e,t,n)=>new Promise((i,s)=>{var o=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});let Fo=null,Ic=!1,Ec=null,Sv=Lb;function Tp(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function Tb(){try{const e=globalThis;return Tp(e?.katex)}catch{return null}}function Lb(){return _v(null,null,function*(){const e=Tb();if(e)return e;const t=yield ns(()=>import("./katex-DnlPpQZa.js"),[]);try{yield ns(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([0,1]))}catch{}return Tp(t)})}function hB(e){const t=Promise.resolve(e).then(n=>{var i;return Ec===t&&n?(Fo=(i=Tp(n))!=null?i:n,Fo):null}).catch(()=>null).finally(()=>{Ec===t&&(Ec=null)});return Ec=t,Ic=!0,t}function Fpe(e){Sv=e,Fo=null,Ic=!1,Ec=null}function Bpe(e){Fpe(Lb)}function pB(){return typeof Sv=="function"}function _Ye(){var e;const t=Sv;if(!t||t===Lb)return null;if(Fo)return Fo;const n=Tb();if(n)return Fo=n,Fo;if(Ic)return null;try{const i=t();return i?typeof i?.then=="function"?(hB(i),null):(Fo=(e=Tp(i))!=null?e:i,Fo):null}catch{return null}}function gB(){return _v(this,null,function*(){var e;const t=Tb();if(t)return Fo=t,Fo;if(Fo)return Fo;if(Ec)return Ec;if(Ic)return null;const n=Sv;if(!n)return Ic=!0,null;try{const i=n();if(typeof i?.then=="function")return hB(i);if(i)return Fo=(e=Tp(i))!=null?e:i,Ic=!0,Fo}catch{}return Ic=!0,null})}function mB(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let uu=null,nu=null;const no=new Map,ya=new Map;let rp=5;const Oc=new Set;function w1(){if(no.size<rp&&Oc.size){let e=rp-no.size;for(const t of Array.from(Oc)){if(e<=0)break;Oc.delete(t),e--;try{t()}catch{}}}}function vB(){for(const e of Array.from(Oc)){Oc.delete(e);try{e()}catch{}}}function $pe(e){uu=e,nu=null,uu.onmessage=t=>{const{id:n,html:i,error:s}=t.data,o=no.get(n);if(o)if(no.delete(n),clearTimeout(o.timeoutId),o.cleanup(),w1(),s)o.aborted||o.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(ya.set(a,i),ya.size>200){const u=ya.keys().next().value;ya.delete(u)}}o.aborted||o.resolve(i)}},uu.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,i]of no.entries())clearTimeout(i.timeoutId),i.cleanup(),i.aborted||i.reject(new Error(`Worker error: ${t.message}`));no.clear(),vB()}}function Dpe(){var e;for(const t of no.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));no.clear(),vB(),uu&&((e=uu.terminate)==null||e.call(uu)),uu=null,nu=null}function Rpe(e,t=!0,n=2e3,i){return _v(this,null,function*(){performance.now();const s=mB(e);if(!pB()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(nu)return Promise.reject(nu);const o=`${t?"d":"i"}:${s}`,r=ya.get(o);if(r)return w1(),Promise.resolve(r);const l=uu||(nu=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),nu.name="WorkerInitError",nu.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(nu);if(no.size>=rp){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=no.size,a.max=rp,Promise.reject(a)}return new Promise((a,u)=>{if(i?.aborted){const m=new Error("Aborted");return m.name="AbortError",void u(m)}const c=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const m=no.get(c);if(!m)return;no.delete(c),m.cleanup();const y=new Error("Worker render timed out");y.name="WorkerTimeout",y.code="WORKER_TIMEOUT",m.aborted||m.reject(y),w1()},n);d=()=>{const m=no.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const y=new Error("Aborted");y.name="AbortError",u(y)},i&&i.addEventListener("abort",d,{once:!0});const p=a,g=u;no.set(c,{resolve:m=>{p(m)},reject:m=>{g(m)},timeoutId:f,aborted:!1,cleanup:()=>{i&&d&&i.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(m){const y=no.get(c);no.delete(c),clearTimeout(f),y?.cleanup(),y?.reject(m),w1()}})})}function SYe(e,t=!0,n){const i=`${t?"d":"i"}:${mB(e)}`;if(ya.set(i,n),ya.size>200){const s=ya.keys().next().value;ya.delete(s)}}const zpe="WORKER_BUSY";function Ope(e=2e3,t){return no.size<rp?Promise.resolve():new Promise((n,i)=>{let s,o=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),Oc.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{o||(o=!0,a(),n())},Oc.add(l),s=globalThis.setTimeout(()=>{if(o)return;o=!0,a();const u=new Error("Wait for worker slot timed out");u.name="WorkerBusyTimeout",u.code="WORKER_BUSY_TIMEOUT",i(u)},e),queueMicrotask(()=>w1()),t&&(r=()=>{if(o)return;o=!0,a();const u=new Error("Aborted");u.name="AbortError",i(u)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const Ih={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function MYe(e){return _v(this,arguments,function*(t,n=!0,i={}){var s,o,r,l;if(!pB()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=i.timeout)!=null?s:Ih.timeout,u=(o=i.waitTimeout)!=null?o:Ih.waitTimeout,c=(r=i.backoffMs)!=null?r:Ih.backoffMs,d=(l=i.maxRetries)!=null?l:Ih.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):Ih.maxRetries,p=i.signal;let g=0;for(;;){if(p?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield Rpe(t,n,a,p)}catch(m){if(m?.code!==zpe||g>=f)throw m;if(g++,yield Ope(u,p).catch(()=>{}),p?.aborted){const y=new Error("Aborted");throw y.name="AbortError",y}c>0&&(yield new Promise(y=>globalThis.setTimeout(y,c*g)))}}})}function Jd(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function Ppe(e){var t;for(const n of e.split(/\r?\n/)){const i=n.trim();if(!i||i.startsWith("%%"))continue;const s=i.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function Vm(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),i=Ppe(e);return i==="gantt"?220+28*n:i==="sequencediagram"?180+26*n:i==="classdiagram"||i==="statediagram"||i==="erdiagram"?180+24*n:i==="flowchart"||i==="graph"?170+28*n:200+22*n}function Zm(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function yB(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function Gm(e,t=360,n=500){return yB(e,t,n)}function Qm(e,t=360,n=500){return yB(e,t,n)}var jpe=Object.defineProperty,Hpe=Object.defineProperties,Wpe=Object.getOwnPropertyDescriptors,c_=Object.getOwnPropertySymbols,qpe=Object.prototype.hasOwnProperty,Upe=Object.prototype.propertyIsEnumerable,d_=(e,t,n)=>t in e?jpe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bB=(e,t)=>{for(var n in t||(t={}))qpe.call(t,n)&&d_(e,n,t[n]);if(c_)for(var n of c_(t))Upe.call(t,n)&&d_(e,n,t[n]);return e},f_=(e,t,n)=>new Promise((i,s)=>{var o=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const Ym=()=>ns(()=>import("./mermaid.core-DpBz6UHc.js").then(e=>e.bp),__vite__mapDeps([2,3]));let la=null,Xd=Ym,Yh=null,l8=!1,a8=!1,Jh=0;function Kpe(e){Xd=e,Jh++,la=null,Yh=null,l8=!1,a8=!1}function Vpe(e){Kpe(Ym)}function h_(){return typeof Xd=="function"}function p_(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=bB({},t),i={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:o=>typeof t.initialize=="function"?t.initialize(o):s.initialize?s.initialize(o):void 0},Hpe(n,Wpe(i))}var n,i;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function g_(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const i=bB({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,i):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(i):void 0}}catch{}}function IYe(){return f_(this,null,function*(){if(la)return la;const e=(function(){try{const i=globalThis;return p_(i?.mermaid)}catch{return null}})();if(e)return la=e,g_(la),la;const t=Xd,n=Jh;return t?t===Ym&&l8?null:Yh||(Yh=f_(null,null,function*(){let i;try{i=yield t()}catch(s){if(t===Ym)return n===Jh&&t===Xd&&(l8=!0,(function(o){a8||(a8=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',o))})(s)),null;throw s}finally{n===Jh&&t===Xd&&(Yh=null)}return n!==Jh||t!==Xd?null:i?(la=p_(i),g_(la),la):null}),Yh):null})}let Yo=null,iu=null;const nl=new Map,yc=new Map;function $g(e){for(const t of nl.values())t.reject(e);nl.clear(),yc.clear()}let m_=5,v_=!1;const Zpe="WORKER_BUSY",y_="MERMAID_DISABLED";function Gpe(e){if(Yo&&Yo!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",$g(n)}Yo=e,iu=null;const t=e;Yo.onmessage=n=>{if(Yo!==t)return;const{id:i,ok:s,result:o,error:r}=n.data,l=nl.get(i);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(o))},Yo.onerror=n=>{var i,s;if(Yo===t)if(nl.size!==0){try{v_?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}$g(new Error(`Worker error: ${n.message}`))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},Yo.onmessageerror=n=>{var i,s;if(Yo===t)if(nl.size!==0){try{v_?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}$g(new Error("Worker messageerror"))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function Qpe(){var e;if(Yo)try{$g(new Error("Worker cleared")),(e=Yo.terminate)==null||e.call(Yo)}catch{}Yo=null,iu=null}function kB(e,t,n,i){if(!h_()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=y_,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let o=yc.get(s);return o||(o=(function(r,l,a=1400){if(!h_()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=y_,Promise.reject(c)}if(iu)return Promise.reject(iu);const u=Yo||(iu=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),iu.name="WorkerInitError",iu.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(iu);if(nl.size>=m_){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=Zpe,c.inFlight=nl.size,c.max=m_,Promise.reject(c)}return new Promise((c,d)=>{const f=Math.random().toString(36).slice(2);let p,g=!1;const m=()=>{g||(g=!0,p!=null&&globalThis.clearTimeout(p),nl.delete(f))},y={resolve:w=>{m(),c(w)},reject:w=>{m(),d(w)}};nl.set(f,y);try{u.postMessage({id:f,action:r,payload:l})}catch(w){return nl.delete(f),void d(w)}p=globalThis.setTimeout(()=>{const w=new Error("Worker call timed out");w.name="WorkerTimeout",w.code="WORKER_TIMEOUT";const k=nl.get(f);k&&k.reject(w)},a)})})(e,t,n),yc.set(s,o),o.then(()=>{yc.get(s)===o&&yc.delete(s)},()=>{yc.get(s)===o&&yc.delete(s)})),(function(r,l){if(!l)return r;if(l.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,u)=>{let c=()=>{};const d=()=>l.removeEventListener("abort",c);c=()=>{d();const f=new Error("Aborted");f.name="AbortError",u(f)},l.addEventListener("abort",c,{once:!0}),r.then(f=>{d(),a(f)},f=>{d(),u(f)})})})(o,i)}function EYe(e,t,n=1400,i){return kB("canParse",{code:e,theme:t},n,i)}function TYe(e,t,n=1400,i){return kB("findPrefix",{code:e,theme:t},n,i)}var Ype=Object.defineProperty,Jpe=Object.defineProperties,Xpe=Object.getOwnPropertyDescriptors,b_=Object.getOwnPropertySymbols,e0e=Object.prototype.hasOwnProperty,t0e=Object.prototype.propertyIsEnumerable,k_=(e,t,n)=>t in e?Ype(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t)=>{for(var n in t||(t={}))e0e.call(t,n)&&k_(e,n,t[n]);if(b_)for(var n of b_(t))t0e.call(t,n)&&k_(e,n,t[n]);return e},dn=(e,t)=>Jpe(e,Xpe(t)),Ti=(e,t,n)=>new Promise((i,s)=>{var o=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const n0e="__global__",Wy="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",u8=(()=>{const e=globalThis;if(e[Wy])return e[Wy];const t={scopedCustomComponents:{},revision:vl(0)};return e[Wy]=t,t})(),A_=u8.revision,i0e=Symbol("markstreamCustomComponents"),s0e=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function Lp(e){return s0e.has(String(e).trim().toLowerCase())}function o0e(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function qy(e={}){const t={};for(const[n,i]of Object.entries(e))if(i!=null){t[n]=i;for(const s of new Set([Ur(n),Ur(o0e(n))]))!s||Lp(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=i)}return t}function Cs(e){const t=an(i0e,null);return F(()=>{var n;return A_.value,(function(i,s={}){return A_.value,At(At(At({},qy(u8.scopedCustomComponents[n0e]||{})),qy(s)),qy((function(o){return o&&u8.scopedCustomComponents[o]||{}})(i)))})(e?.(),(n=t?.value)!=null?n:{})})}const r0e=["aria-label"],l0e={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},a0e={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},oi=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},kr=oi(tt({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(b(),I("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(b(),I("svg",a0e,[...n[1]||(n[1]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),C("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(b(),I("svg",l0e,[...n[0]||(n[0]=[C("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,r0e))}),[["__scopeId","data-v-be21ab83"]]);kr.install=e=>{e.component(kr.__name,kr)};const u0e={class:"emoji-node"},nr=oi(tt({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(b(),I("span",u0e,B(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);nr.install=e=>{e.component(nr.__name,nr)};const c0e=["id"],d0e=["title"],Ar=oi(tt({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const i=document.querySelector(t);i?i.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(i,s)=>(b(),I("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[C("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+B(e.node.id)+"]",9,d0e)],8,c0e))}}),[["__scopeId","data-v-c1463a29"]]);Ar.install=e=>{e.component(Ar.__name,Ar)};const AB=(()=>{try{return!1}catch{}return!1})();function Uy(e){AB&&console.warn(e)}function C_(e,t="safe",n){return Ib(e,t,n)}function CB(e){return U1e(e)}function Ky(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function Nb(e,t="safe"){const n=String(e.tag||e.type||"").trim(),i=Bg((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),Ky(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),Ky(r.value)]):Object.entries(s).map(([r,l])=>[r,Ky(l)]):null,t,n);var s;if(!i)return;const o=CB(C1(i));return Object.keys(o).length>0?o:void 0}function w_(e,t,n=!1){const i=Object.entries(t??{}),s=i.length>0?i.map(([o,r])=>r===""?` ${o}`:` ${o}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function Eh(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function Vy(e,t,n,i,s,o,r=!1){const l=(function(d,f){return oB(d,f)})(e,i);if(Sp.has(e.toLowerCase())||!l&&tB(e,o))return null;if(!l&&Mb(e,o))return r?[w_(e,t,!0)]:[w_(e,t),...n,`</${e}>`];const a=Ib(t,o,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=i[e]||i[e.toLowerCase()],f=CB(a);return cn(d,dn(At({},f),{key:c}),n.length>0?n:void 0)}return cn(e,dn(At({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function wB(e,t){return Z1e(e,t)}function Jm(e,t,n="safe"){if(!e)return[];try{return(function(o,r,l="safe"){let a=0;const u=[],c=[];for(const d of o)if(d.type==="text")(u.length>0?u[u.length-1].children:c).push(d.content);else if(d.type==="self_closing"){const f=Vy(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);Eh(u.length>0?u[u.length-1].children:c,f)}else if(d.type==="tag_open")u.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let p=-1;for(let g=u.length-1;g>=0;g--)if(u[g].tagName.toLowerCase()===f){p=g;break}if(p!==-1)for(;u.length>p;){const g=u.pop(),m=Vy(g.tagName,g.attrs||{},g.children,r,g.autoKey,l);u.length>0?Eh(u[u.length-1].children,m):Eh(c,m),g.tagName.toLowerCase()!==f&&u.length>p&&Uy(`Auto-closing unclosed tag: <${g.tagName}>`)}else Uy(`Ignoring closing tag with no matching opening tag: </${d.tagName}>`)}for(;u.length>0;){const d=u.pop(),f=Vy(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?Eh(u[u.length-1].children,f):Eh(c,f),Uy(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(rB(e),t,n)}catch(s){return i=s,AB&&console.error("Failed to parse HTML to VNodes:",i),null}var i}const f0e=["innerHTML"],Cr=oi(tt({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=an("markstreamHtmlPolicy",void 0),i=F(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=Cs(()=>t.customId),o=tt({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=F(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(i.value==="escape")return{mode:"html",content:mf(l,i.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=Jm(l,s.value,i.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!wB(l,s.value))return{mode:"html",content:mf(l,i.value)};const a=Jm(l,s.value,i.value);return a===null?{mode:"html",content:mf(l,i.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(b(),I("span",{key:0,class:De(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[V(h(o),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(b(),I("span",{key:1,class:De(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},B(r.value.content),3)):(b(),I("span",{key:2,class:De(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,f0e))}}),[["__scopeId","data-v-d17f12b0"]]);Cr.install=e=>{e.component(Cr.__name,Cr)};const h0e={class:"inline-code"},p0e={key:0},xo=oi(tt({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=Of(),i=an("markstreamFade",void 0),s=an("markstreamTextStreamState",void 0),o=an("markstreamStreamVersion",void 0),r=F(()=>{const k=n.fade;return k===""||k===!0||k==="true"||k!==!1&&k!=="false"&&void 0}),l=F(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=F(()=>{var k;return String((k=t.node.code)!=null?k:"")}),u=F(()=>!l.value),c=F(()=>{var k;const A=(k=n["index-key"])!=null?k:n.indexKey;return A==null||A===""?"":String(A)}),d=Z(t.node.code),f=Z(""),p=Z(0);let g;function m(){g?.(),g=void 0}function y(){m(),f.value&&(d.value=d.value+f.value,f.value="")}Qe([()=>t.node.code,c,l],([k])=>{const A=String(k??""),v=c.value,x=cB({nextContent:A,persistedContent:v?s?.get(v):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=x.settledContent,f.value=x.streamedDelta,x.appended?(p.value+=1,(function(){if(!f.value||g||!o)return;const E=o.value;g=Qe(()=>o.value,S=>{S!==E&&y()},{flush:"sync"})})()):f.value||m(),v&&s?.set(v,A)},{immediate:!0}),Rf(m);const w=F(()=>p.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(k,A)=>(b(),I("code",h0e,[u.value?(b(),I(Be,{key:0},[Ue(B(a.value),1)],64)):(b(),I(Be,{key:1},[d.value?(b(),I("span",p0e,B(d.value),1)):ne("",!0),f.value?(b(),I("span",{key:1,class:De(["inline-code-stream-delta",[w.value]]),onAnimationend:y},B(f.value),35)):ne("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);xo.install=e=>{e.component(xo.__name,xo)};const c8=Z(!1),x_=Z(""),__=Z("top"),x1=Z(null),_1=Z(null),d8=Z(null),f8=Z(null),S_=Z(null);let Dg=null,Rg=null,h8=0;function xB(){Dg&&(clearTimeout(Dg),Dg=null),Rg&&(clearTimeout(Rg),Rg=null)}let X0=!1,eg=null,M_=!1;function g0e(e,t,n="top",i=!1,s,o){if(!e)return;const r=++h8;xB();const l=()=>Ti(null,null,function*(){var a,u;if(yield(function(){return Ti(this,null,function*(){if(!X0&&!M_&&typeof document<"u"){eg!=null||(eg=Ti(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([ns(()=>import("./vue.runtime.esm-bundler-D5Z_EMXj.js"),[]),ns(()=>import("./Tooltip-CbHFsn-6.js"),[])]),p=document.createElement("div");p.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(p),c({setup:()=>()=>{var g;return d(f,{visible:c8.value,"anchor-el":x1.value,content:x_.value,placement:__.value,id:_1.value,originX:d8.value,originY:f8.value,isDark:(g=S_.value)!=null?g:void 0})}}).mount(p),X0=!0}));try{yield eg}catch(c){X0=!1,eg=null,M_=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),X0&&r===h8){_1.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,x1.value=e,x_.value=t,__.value=n,d8.value=(a=s?.x)!=null?a:null,f8.value=(u=s?.y)!=null?u:null,S_.value=typeof o=="boolean"?o:null,c8.value=!0;try{e.setAttribute("aria-describedby",_1.value)}catch{}}});i?l():Dg=setTimeout(l,80)}function m0e(e=!1){h8+=1,xB();const t=()=>{if(x1.value&&_1.value)try{x1.value.removeAttribute("aria-describedby")}catch{}c8.value=!1,x1.value=null,_1.value=null,d8.value=null,f8.value=null};e?t():Rg=setTimeout(t,120)}const v0e={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},y0e=Symbol("markstreamI18nFallback");function _B(e,t){var n;return(n=t?.[e])!=null?n:v0e[e]}const p8=(e,t)=>{var n;return(n=_B(e,t))!=null?n:(function(i){return(i.split(".").pop()||i).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function I_(e,t){return{t(n){const i=_B(n,t);if(e.te&&i!=null&&!e.te(n))return p8(n,t);const s=e.t(n);return s===n&&i!=null?p8(n,t):s}}}function b0e(){const e=(function(){var n,i,s;try{const o=As(),r=y0e,l=o?.provides,a=(n=o?.appContext)==null?void 0:n.provides;return(s=(i=l?.[r])!=null?i:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,i;try{const s=As(),o=s?.proxy,r=o?.$t;if(typeof r=="function"){const u=o?.$te;return{t:r.bind(o),te:typeof u=="function"?u.bind(o):void 0}}const l=(i=(n=s?.appContext)==null?void 0:n.config)==null?void 0:i.globalProperties,a=l?.$t;if(typeof a=="function"){const u=l?.$te;return{t:a.bind(l),te:typeof u=="function"?u.bind(l):void 0}}}catch{}return null})();if(t)return I_(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const i=n();if(i&&typeof i.t=="function")return I_({t:i.t.bind(i),te:typeof i.te=="function"?i.te.bind(i):void 0},e)}catch{}}catch{}return{t:n=>p8(n,e)}}const SB=Symbol("ViewportPriority"),MB=Symbol("ViewportPriorityOptions"),IB=Symbol("OffscreenHeavyNodeDeferral"),k0e=F(()=>!1),Zc="400px";function Fb(){return an(MB,void 0)}function Bb(){return an(IB,k0e)}function A0e(e,t){var n,i;const s=typeof window<"u"&&typeof document<"u",o=typeof t=="boolean"?Z(t):t,r=s?(n=window.requestIdleCallback)!=null?n:S=>window.setTimeout(()=>S({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(i=window.cancelIdleCallback)!=null?i:S=>window.clearTimeout(S):null,a=new WeakMap;let u=1;const c=new Map,d=new Map,f=new Set;let p=null,g=null;function m(S){if(!S)return"viewport";let M=a.get(S);return M||(M=u++,a.set(S,M)),String(M)}function y(){if(p!=null){try{l?.(p)}catch{}p=null}}function w(S){if(S){const M=c.get(S);if(M&&!M.targets.size){try{M.io.disconnect()}catch{}c.delete(S)}}d.size||f.size||y()}function k(S){const M=d.get(S);if(!M)return;const _=c.get(M.bucketKey);if(!M.visible.value){M.visible.value=!0;try{M.resolve()}catch{}}try{_?.io.unobserve(S)}catch{}_?.targets.delete(S),d.delete(S),f.delete(S),w(M.bucketKey)}function A(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&p==null&&f.size&&(p=r(()=>{p=null;const S=f.values().next().value;S&&(f.delete(S),k(S),f.size&&A())},{timeout:1200}))}function v(S,M){if(!s||typeof IntersectionObserver>"u")return null;const _=(function(O,R){var W,z,G;return{root:(W=e?.(O??null))!=null?W:null,rootMargin:(z=R?.rootMargin)!=null?z:Zc,threshold:(G=R?.threshold)!=null?G:0}})(S,M),N=[m((D=_).root),D.rootMargin,D.threshold].join("\0");var D;const T=c.get(N);if(T)return{key:N,bucket:T};let $;try{$=new IntersectionObserver(O=>{for(const R of O)(R.isIntersecting||R.intersectionRatio>0)&&k(R.target)},{root:_.root,rootMargin:_.rootMargin,threshold:_.threshold})}catch{return null}const P={io:$,targets:new Map};return c.set(N,P),{key:N,bucket:P}}function x(){if(s&&o.value)for(const[S,M]of Array.from(d.entries())){const _=v(S,M.opts);if(!_){k(S);continue}if(_.key===M.bucketKey)continue;const N=M.bucketKey,D=c.get(N);try{D?.io.unobserve(S)}catch{}D?.targets.delete(S),M.bucketKey=_.key,_.bucket.targets.set(S,M),_.bucket.io.observe(S),w(N)}}Qe(o,S=>{if(!S){for(const M of Array.from(d.keys()))k(M);y()}},{flush:"sync"});const E=(S,M)=>{const _=Z(!1);let N,D=!1;const T=new Promise(R=>{N=()=>{D||(D=!0,R())}}),$=()=>{const R=d.get(S);if(!R)return f.delete(S),void w();const W=c.get(R.bucketKey);try{W?.io.unobserve(S)}catch{}W?.targets.delete(S),d.delete(S),f.delete(S),w(R.bucketKey)};if(!s||!o.value)return _.value=!0,N(),{isVisible:_,whenVisible:T,destroy:$};const P=v(S,M);if(!P)return _.value=!0,N(),{isVisible:_,whenVisible:T,destroy:$};const O={resolve:N,visible:_,bucketKey:P.key,opts:M};return d.set(S,O),P.bucket.targets.set(S,O),P.bucket.io.observe(S),s&&g==null&&(g=window.requestAnimationFrame(()=>{g=null,x()})),M?.allowIdle!==!1&&(f.add(S),A()),{isVisible:_,whenVisible:T,destroy:$}};return E.refresh=x,Pn(SB,E),E}function $b(){var e,t;const n=an(SB,void 0);if(n)return n;const i=new WeakMap,s=new Map,o=new Set;let r=null;const l=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:p=>window.setTimeout(()=>p({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:p=>window.clearTimeout(p):null,u=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},c=p=>{if(!p)return;const g=s.get(p);if(g&&!g.targets.size){try{g.io.disconnect()}catch{}s.delete(p)}},d=p=>{const g=i.get(p);if(!g)return;const m=s.get(g.bucketKey);if(!g.visible.value){g.visible.value=!0;try{g.resolve()}catch{}}try{m?.io.unobserve(p)}catch{}i.delete(p),m?.targets.delete(p),o.delete(p),c(g.bucketKey),o.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&o.size&&(r=l(()=>{r=null;const p=o.values().next().value;p&&(o.delete(p),d(p),o.size&&f())},{timeout:1200}))};return(p,g)=>{const m=Z(!1);let y,w=!1;const k=new Promise(x=>{y=()=>{w||(w=!0,x())}}),A=()=>{const x=i.get(p);if(!x)return o.delete(p),void(o.size||u());const E=s.get(x.bucketKey);try{E?.io.unobserve(p)}catch{}i.delete(p),E?.targets.delete(p),o.delete(p),c(x.bucketKey),o.size||u()},v=(x=>{var E,S;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const M=($=>{var P,O;return[(P=$?.rootMargin)!=null?P:Zc,(O=$?.threshold)!=null?O:0].join("\0")})(x),_=s.get(M);if(_)return{key:M,bucket:_};const N=(E=x?.rootMargin)!=null?E:Zc;let D;try{D=new IntersectionObserver($=>{for(const P of $)(P.isIntersecting||P.intersectionRatio>0)&&d(P.target)},{root:null,rootMargin:N,threshold:(S=x?.threshold)!=null?S:0})}catch{return null}const T={io:D,targets:new Set};return s.set(M,T),{key:M,bucket:T}})(g);return v?(i.set(p,{resolve:y,visible:m,bucketKey:v.key}),v.bucket.targets.add(p),v.bucket.io.observe(p),g?.allowIdle!==!1&&(o.add(p),f()),{isVisible:m,whenVisible:k,destroy:A}):(m.value=!0,y(),{isVisible:m,whenVisible:k,destroy:A})}}function C0e(e,t){var n,i;const s=(i=(n=e.indexKey)!=null?n:t["index-key"])!=null?i:t.indexKey;return s==null||s===""?"":String(s)}const w0e=["data-markstream-viewport-pending"],x0e=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],_0e={key:1,class:"image-placeholder"},S0e={key:1,class:"image-node__raw-text"},M0e={key:2,class:"image-shimmer-overlay"},I0e={key:1,class:"image-node__raw-text"},E0e={key:3,class:"image-error"},mu=oi(tt({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,i,s;const o=e,r=t,l=Z(!1),a=Z(!1),u=Z(""),c=Z("primary"),d=Z(null),f=Of(),p=an(o8,null),g=$b(),m=Fb(),y=Bb(),w=F(()=>Yw(o.node.src)),k=F(()=>Yw(o.fallbackSrc)),A=(s=(i=(n=As())==null?void 0:n.vnode.el)==null?void 0:i.querySelector)==null?void 0:s.call(i,"img"),v=typeof window<"u"&&A?.getAttribute("src")===(w.value||k.value),x=Z(typeof window>"u"||v||!y.value),E=vl(null);let S="",M=null;const _=F(()=>u.value),N=F(()=>!o.lazy),D=F(()=>typeof window<"u"&&y.value&&!v),T=F(()=>!D.value||x.value),$=F(()=>T.value?_.value:""),P=F(()=>{var ce,pe;return(pe=(ce=m?.value.heavyBlockMargin)!=null?ce:m?.value.rootMargin)!=null?pe:Zc}),O=F(()=>!o.node.loading&&c.value!=="failed"&&u.value.length>0),R=F(()=>c.value==="failed"),W=F(()=>(!N.value||D.value&&!x.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),z=F(()=>C0e(o,f));function G(ce=z.value){ce&&d.value&&p?.reportHeight(ce,d.value.offsetHeight)}function K(ce=z.value){ce&&kt(()=>{G(ce)})}function H(){M&&(clearTimeout(M),M=null)}function q(){const ce=z.value;ce&&S!==ce&&(S&&p?.markSettled(S),H(),S=ce,p?.markPending(ce),typeof window<"u"&&(M=window.setTimeout(()=>{S===ce&&(K(ce),X())},8e3)))}function X(){return Ti(this,null,function*(){const ce=S;ce&&(H(),S="",yield kt(),G(ce),p?.markSettled(ce))})}function ee(){if(c.value==="primary"&&k.value&&k.value!==u.value)return c.value="fallback",u.value=k.value,l.value=!1,a.value=!1,void K();c.value="failed",a.value=!0,r("error",u.value),K()}function ue(){l.value=!0,a.value=!1,r("load",_.value),K()}function ie(ce){ce.preventDefault(),l.value&&!a.value&&r("click",[ce,_.value])}const{t:xe}=b0e();return Qe([w,k,()=>o.node.loading],()=>(l.value=!1,a.value=!1,o.node.loading||w.value?(u.value=w.value,void(c.value="primary")):k.value?(u.value=k.value,void(c.value="fallback")):(u.value="",c.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&Qe([d,D],([ce,pe],Ne,te)=>{var ye;if((ye=E.value)==null||ye.destroy(),E.value=null,!pe||x.value)return void(x.value=!0);if(!ce)return void(x.value=!1);let j=!0;const Y=g(ce,{rootMargin:P.value,allowIdle:!1});E.value=Y,x.value=Y.isVisible.value,Y.whenVisible.then(()=>{j&&E.value===Y&&(x.value=!0)}),te(()=>{j=!1,Y.destroy(),E.value===Y&&(E.value=null)})},{immediate:!0}),Qe([O,l,a,_,()=>o.lazy,T],([ce,pe,Ne,te,ye,j])=>ce&&te&&!Ne&&j?pe?(X(),void K()):ye?(q(),void K()):void(pe||Ne||q()):(X(),void K()),{flush:"post",immediate:!0}),Gn(()=>{var ce;(ce=E.value)==null||ce.destroy(),E.value=null,(function(){const pe=S;pe&&(H(),S="",p?.markSettled(pe))})()}),(ce,pe)=>{var Ne,te,ye,j,Y;return b(),I("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":D.value&&!x.value?"true":void 0},[O.value?(b(),I("img",{key:0,src:$.value||void 0,alt:String((te=(Ne=o.node.alt)!=null?Ne:o.node.title)!=null?te:""),title:String((j=(ye=o.node.title)!=null?ye:o.node.alt)!=null?j:""),class:De(["image-node__img",{"is-loading":!N.value&&!l.value,"is-loaded":N.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:o.lazy?"lazy":void 0,fetchpriority:N.value?"high":void 0,decoding:N.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(Y=o.node.alt)!=null?Y:h(xe)("image.preview"),onError:ee,onLoad:ue,onClick:ie},null,42,x0e)):ne("",!0),e.node.loading&&!a.value?(b(),I("span",_0e,[o.usePlaceholder?En(ce.$slots,"placeholder",{key:0,node:o.node,displaySrc:_.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[pe[0]||(pe[0]=C("span",{class:"image-shimmer"},null,-1))],!0):(b(),I("span",S0e,B(e.node.raw),1))])):ne("",!0),W.value&&!e.node.loading?(b(),I("span",M0e,[o.usePlaceholder?En(ce.$slots,"placeholder",{key:0,node:o.node,displaySrc:_.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[pe[1]||(pe[1]=C("span",{class:"image-shimmer"},null,-1))],!0):(b(),I("span",I0e,B(e.node.raw),1))])):ne("",!0),R.value?(b(),I("span",E0e,[En(ce.$slots,"error",{node:o.node,displaySrc:_.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[pe[2]||(pe[2]=C("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[C("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),C("span",null,B(h(xe)("image.loadError")),1)],!0)])):ne("",!0)],8,w0e)}}}),[["__scopeId","data-v-046e82ac"]]);mu.install=e=>{e.component(mu.__name,mu)};const T0e={key:2},Zl=tt({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=Cs(()=>t.customId),i=an("markstreamHtmlPolicy",void 0),s=an("markstreamNestedRendererProps",void 0),o=F(()=>{var g;return(g=i?.value)!=null?g:"safe"}),r=F(()=>{var g,m;const y=(g=s?.value)!=null?g:{};return dn(At({},y),{customId:(m=t.customId)!=null?m:y.customId,htmlPolicy:o.value})}),l=rl({loader:()=>Promise.resolve().then(()=>Kb),suspensible:!1}),a=F(()=>t.components[String(t.node.type)]),u=F(()=>!!(a.value&&n.value[t.node.type]&&!Lp(String(t.node.type)))),c=F(()=>u.value?Nb(t.node,o.value):void 0),d=F(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=F(()=>{var g;return String((g=t.node.content)!=null?g:"")}),p=F(()=>{var g,m;return String((m=(g=t.node.content)!=null?g:t.node.raw)!=null?m:"")});return(g,m)=>a.value&&u.value?(b(),fe(Ms(a.value),Yn({key:0},c.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":r.value.isDark}),{default:he(()=>[d.value?(b(),fe(h(l),Yn({key:0},r.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(b(),fe(h(l),Yn({key:1},r.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ne("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(b(),fe(Ms(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(b(),I("span",T0e,B(p.value),1)):ne("",!0)}}),E_=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function L0e(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return dn(At(At({},E_),n),{enabled:(t=n.enabled)==null||t})}return At({},E_)}function Db(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,i=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=i}function EB(e){var t,n;const i=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(i.length<3)return"";const s=i[0];if(s!=="`"&&s!=="~"||i[1]!==s||i[2]!==s)return"";let o=3;for(;i[o]===s;)o+=1;return i.slice(o).trim()}function T_(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function N0e(e){var t;return e.diff===!0||T_(e.language)||T_(EB(String((t=e.raw)!=null?t:"")))}function F0e(e,t,n){const i=(function(s){const o=EB(s);if(!o)return"";const r=o.split(/\s+/).filter(Boolean);if(!r.length)return"";const l=r[0]==="diff"?r.slice(1):r;for(const a of l){const u=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(u&&/[./\\-]/.test(u))return u}return""})(e);return{title:i||t,caption:i?n?`Diff / ${t}`:t:""}}const B0e=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],$0e={key:0,translate:"no",class:"markstream-pre__diff-code"},D0e={class:"markstream-pre__diff-pane-content"},R0e={class:"markstream-pre__diff-number","aria-hidden":"true"},z0e={class:"markstream-pre__diff-content"},O0e={class:"markstream-pre__diff-content-inner"},P0e={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},j0e=["textContent"],H0e=["textContent"],Jo=tt({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(ie,xe){const ce=String(ie??"");return xe?ce:ce.replace(/\r\n$|\n$|\r$/,"")}const i=F(()=>{var ie,xe,ce;const pe=String((xe=(ie=t.node)==null?void 0:ie.language)!=null?xe:"");return String((ce=String(pe).split(/\s+/g)[0])!=null?ce:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=F(()=>`language-${i.value}`),o=F(()=>{var ie;return t.loading===!0||((ie=t.node)==null?void 0:ie.loading)===!0}),r=F(()=>{var ie;return n((ie=t.node)==null?void 0:ie.code,o.value)});let l="",a=1;const u=F(()=>(function(ie){let xe=0,ce=1;ie.startsWith(l)&&(xe=l.length,ce=a,xe>0&&ie[xe-1]==="\r"&&ie[xe]===` -`&&xe++);for(let pe=xe;pe<ie.length;pe++)ie[pe]===` -`?ce++:ie[pe]==="\r"&&(ce++,ie[pe+1]===` -`&&pe++);return l=ie,a=ce,ce})(r.value)),c=F(()=>r.value.split(/\r\n|\n|\r/));let d=0,f="";const p=F(()=>{const ie=u.value;ie<d&&(d=0,f="");for(let xe=d+1;xe<=ie;xe++)f+=`${f?` -`:""}${xe}`;return d=ie,f}),g=F(()=>{var ie;return t.showLineNumbers===!0&&((ie=t.node)==null?void 0:ie.diff)===!0}),m=F(()=>g.value&&t.diffInline===!0),y=F(()=>{const ie=Number(t.reservedHeightPx);if(!Number.isFinite(ie)||ie<=0)return;const xe=`${Math.ceil(ie)}px`;return o.value?{maxHeight:xe,overflow:"auto"}:{height:xe,minHeight:xe,maxHeight:xe,overflow:"auto"}}),w=["diff ","index ","--- ","+++ ","@@ "];function k(ie){return String(ie??"").trim().length===0}function A(ie,xe="context",ce={}){const pe=k(ie);return{code:ie,kind:pe&&xe!=="hunk"&&xe!=="spacer"&&!ce.preserveBlankKind?"context":xe,empty:pe}}function v(ie){const xe=n(ie,o.value);return xe?xe.split(/\r\n|\n|\r/):[]}function x(ie,xe){return!k(ie[xe])||xe<ie.length-1}function E(ie){return ie.startsWith("-")&&!ie.startsWith("---")}function S(ie){return ie.startsWith("+")&&!ie.startsWith("+++")}function M(ie){return ie.some(xe=>w.some(ce=>xe.startsWith(ce)))}function _(ie,xe){return xe||!ie.startsWith(" ")||ie.startsWith(" ")?ie:` ${ie}`}function N(ie,xe){const ce=ie.length,pe=xe.length,Ne=[];let te=0;for(;te<ce&&te<pe&&ie[te]===xe[te];)Ne.push({originalIndex:te,modifiedIndex:te}),te++;const ye=[];let j=ce-1,Y=pe-1;for(;j>=te&&Y>=te&&ie[j]===xe[Y];)ye.unshift({originalIndex:j,modifiedIndex:Y}),j--,Y--;const ve=j-te+1,re=Y-te+1;if(ve<=0||re<=0||o.value||(ve+1)*(re+1)>15e5)return Ne.concat(ye);const se=re+1,U=new Uint32Array((ve+1)*(re+1));for(let Ie=ve-1;Ie>=0;Ie--)for(let je=re-1;je>=0;je--){const ke=Ie*se+je;if(ie[te+Ie]===xe[te+je])U[ke]=U[(Ie+1)*se+je+1]+1;else{const Le=U[(Ie+1)*se+je],it=U[Ie*se+je+1];U[ke]=Le>=it?Le:it}}const J=[];let de=0,me=0;for(;de<ve&&me<re;)ie[te+de]===xe[te+me]?(J.push({originalIndex:te+de,modifiedIndex:te+me}),de++,me++):U[(de+1)*se+me]>=U[de*se+me+1]?de++:me++;return Ne.concat(J,ye)}function D(ie){var xe;const ce=(function(){var Y,ve;const re=t.diffHideUnchangedRegions;if(re==null||re===!1)return null;const se=re===!0?{}:re;return se.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((Y=se.contextLineCount)!=null?Y:2)),minimumLineCount:Math.max(1,Math.floor((ve=se.minimumLineCount)!=null?ve:4))}})();if(!ce||ie.length<1||ie.length>2||ie.length===2&&ie[0].lines.length!==ie[1].lines.length)return ie;const pe=ie[0].lines,Ne=(xe=ie[1])==null?void 0:xe.lines,te=Y=>pe[Y].kind==="context"&&(Ne===void 0||Ne[Y].kind==="context"&&pe[Y].code===Ne[Y].code),ye=[];let j=0;for(;j<pe.length;){const Y=j;for(;j<pe.length&&te(j);)j++;const ve=j;if(ve-Y>=ce.minimumLineCount){const re=Y+(Y===0?0:ce.contextLineCount),se=ve-(ve===pe.length?0:ce.contextLineCount);se-re>=ce.minimumLineCount&&ye.push({start:re,end:se})}j===Y&&j++}return ye.length?ie.map((Y,ve)=>{const re=[];let se=0;for(const U of ye)re.push(...Y.lines.slice(se,U.start)),re.push({code:ve===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${Y.key}-collapsed-${U.start}-${U.end}`,number:""}),se=U.end;return re.push(...Y.lines.slice(se)),dn(At({},Y),{lines:re})}):ie}const T=F(()=>{var ie,xe,ce,pe;if(!g.value)return[];const Ne=(function(ve){const re=ve.some(U=>E(U)),se=ve.some(U=>S(U));return re&&se||(function(){var U,J,de,me;if(i.value==="diff")return!0;const Ie=(me=(de=String((J=(U=t.node)==null?void 0:U.raw)!=null?J:"").split(/\r?\n/,1)[0])==null?void 0:de.trim())!=null?me:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(Ie)})()&&(re||se)})(c.value),te=(function(){var ve,re;return((ve=t.node)==null?void 0:ve.originalCode)!=null||((re=t.node)==null?void 0:re.updatedCode)!=null})();if(m.value){const ve=te?(function(re,se){const U=v(re),J=v(se),de=N(U,J);if(de.length>0){const it=[];let Fe=0,Re=0;for(const Ke of de){for(;Fe<Ke.originalIndex;)it.push(dn(At({},A(U[Fe],"removed",{preserveBlankKind:x(U,Fe)})),{key:`inline-removed-source-${Fe}`,number:Fe+1})),Fe++;for(;Re<Ke.modifiedIndex;)it.push(dn(At({},A(J[Re],"added",{preserveBlankKind:x(J,Re)})),{key:`inline-added-source-${Re}`,number:Re+1})),Re++;it.push(dn(At({},A(J[Ke.modifiedIndex])),{key:`inline-context-source-${Ke.originalIndex}-${Ke.modifiedIndex}`,number:Ke.modifiedIndex+1})),Fe=Ke.originalIndex+1,Re=Ke.modifiedIndex+1}for(;Fe<U.length;)it.push(dn(At({},A(U[Fe],"removed",{preserveBlankKind:x(U,Fe)})),{key:`inline-removed-source-${Fe}`,number:Fe+1})),Fe++;for(;Re<J.length;)it.push(dn(At({},A(J[Re],"added",{preserveBlankKind:x(J,Re)})),{key:`inline-added-source-${Re}`,number:Re+1})),Re++;return it}const me=[];let Ie=0,je=U.length-1,ke=J.length-1;for(;Ie<=je&&Ie<=ke&&U[Ie]===J[Ie];)me.push(dn(At({},A(J[Ie])),{key:`inline-prefix-${Ie}`,number:Ie+1})),Ie++;const Le=[];for(;je>=Ie&&ke>=Ie&&U[je]===J[ke];)Le.unshift(dn(At({},A(J[ke])),{key:`inline-suffix-${ke}`,number:ke+1})),je--,ke--;for(let it=Ie;it<=je;it++)me.push(dn(At({},A(U[it],"removed",{preserveBlankKind:x(U,it)})),{key:`inline-removed-source-${it}`,number:it+1}));for(let it=Ie;it<=ke;it++)me.push(dn(At({},A(J[it],"added",{preserveBlankKind:x(J,it)})),{key:`inline-added-source-${it}`,number:it+1}));return me.concat(Le)})((ie=t.node)==null?void 0:ie.originalCode,(xe=t.node)==null?void 0:xe.updatedCode):(function(re){const se=[];let U=1,J=1;const de=M(re);for(const[me,Ie]of re.entries())if(Ie.startsWith("@@")){const je=Ie.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);je&&(U=Number(je[1]),J=Number(je[2])),se.push(dn(At({},A(Ie,"hunk")),{key:`inline-hunk-${me}`,number:""}))}else if(E(Ie))se.push(dn(At({},A(_(Ie.slice(1),de),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${me}`,number:U++}));else if(S(Ie))se.push(dn(At({},A(_(Ie.slice(1),de),"added",{preserveBlankKind:!0})),{key:`inline-added-${me}`,number:J++}));else{const je=de&&Ie.startsWith(" ")?Ie.slice(1):Ie;se.push(dn(At({},A(je)),{key:`inline-context-${me}`,number:J})),U++,J++}return se})(c.value);return D([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:ve}])}if(!Ne&&te)return(function(ve,re){const se=v(ve),U=v(re),J=N(se,U),de=[],me=[];let Ie=0,je=0,ke=0;const Le=(it,Fe)=>{const Re=Math.max(it-Ie,Fe-je);for(let Ke=0;Ke<Re;Ke++){const ht=Ie+Ke,ot=je+Ke;de.push(ht<it?dn(At({},A(se[ht],"removed",{preserveBlankKind:x(se,ht)})),{key:`original-changed-${ke}-${ht}`,number:ht+1}):dn(At({},A("","spacer")),{key:`original-spacer-${ke}-${Ke}`,number:""})),me.push(ot<Fe?dn(At({},A(U[ot],"added",{preserveBlankKind:x(U,ot)})),{key:`modified-changed-${ke}-${ot}`,number:ot+1}):dn(At({},A("","spacer")),{key:`modified-spacer-${ke}-${Ke}`,number:""}))}Ie=it,je=Fe,ke++};for(const it of J)Le(it.originalIndex,it.modifiedIndex),de.push(dn(At({},A(se[it.originalIndex])),{key:`original-context-${it.originalIndex}-${it.modifiedIndex}`,number:it.originalIndex+1})),me.push(dn(At({},A(U[it.modifiedIndex])),{key:`modified-context-${it.originalIndex}-${it.modifiedIndex}`,number:it.modifiedIndex+1})),Ie=it.originalIndex+1,je=it.modifiedIndex+1;return Le(se.length,U.length),D([{key:"original",className:"markstream-pre__diff-pane--original",lines:de},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:me}])})((ce=t.node)==null?void 0:ce.originalCode,(pe=t.node)==null?void 0:pe.updatedCode);const ye=[],j=[],Y=M(c.value);for(const ve of c.value)if(ve.startsWith("@@"))ye.push(A(ve,"hunk")),j.push(A(ve,"hunk"));else if(ve.startsWith("-")&&!ve.startsWith("---"))ye.push(A(_(ve.slice(1),Y),"removed",{preserveBlankKind:!0}));else if(ve.startsWith("+")&&!ve.startsWith("+++"))j.push(A(_(ve.slice(1),Y),"added",{preserveBlankKind:!0}));else{const re=Y&&ve.startsWith(" ")?ve.slice(1):ve;ye.push(A(re)),j.push(A(re))}return D([{key:"original",className:"markstream-pre__diff-pane--original",lines:ye.map((ve,re)=>dn(At({},ve),{key:`original-${re}`,number:re+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:j.map((ve,re)=>dn(At({},ve),{key:`modified-${re}`,number:re+1}))}])}),$=F(()=>{var ie,xe;if(t.showLineNumbers!==!0)return;let ce=g.value?1:u.value;if(g.value){ce=Math.max(ce,v((ie=t.node)==null?void 0:ie.originalCode).length,v((xe=t.node)==null?void 0:xe.updatedCode).length);for(const Ne of T.value)for(const te of Ne.lines)typeof te.number=="number"&&(ce=Math.max(ce,te.number))}const pe=`${Math.max(2,String(ce).length)}ch`;return{"--markstream-pre-line-number-width":pe,"--markstream-pre-diff-line-number-width":pe,"--markstream-code-padding-left":"calc(var(--markstream-pre-line-number-padding-left, 2ch) + var(--markstream-pre-line-number-width, 2ch) + var(--markstream-pre-line-number-padding-right, 1ch) + var(--markstream-pre-line-number-separator-width, 2px) + var(--markstream-pre-line-number-gap-to-code, 1ch))"}}),P=F(()=>T.value.some(ie=>ie.lines.some(xe=>xe.kind==="collapsed"))),O=F(()=>{const ie=i.value;return ie?`Code block: ${ie}`:"Code block"}),R=Z(null),W=Z([]);let z=null,G=!1,K=null;function H(ie){const xe=Number.parseFloat(String(ie??""));return Number.isFinite(xe)&&xe>0?xe:0}function q(ie,xe){var ce;if(!ie)return xe;if(ie.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const pe=ie.querySelector(".markstream-pre__diff-content"),Ne=pe?.getBoundingClientRect(),te=(ce=Ne?.height)!=null?ce:0;return Math.max(xe,Math.ceil(te))}function X(){G||typeof window>"u"||(z!=null&&window.cancelAnimationFrame(z),z=window.requestAnimationFrame(()=>{z=null,G||(function(){var ie,xe;z=null;const ce=R.value;if(!ce||!g.value||m.value||!ce.classList.contains("is-wrap"))return void(W.value.length&&(W.value=[]));const pe=(function(re){const se=window.getComputedStyle(re),U=H(se.getPropertyValue("--markstream-pre-diff-line-height"));if(U>0)return U;const J=H(se.lineHeight);return J>0?J:18})(ce),Ne=Array.from(ce.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),te=Array.from(ce.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),ye=Math.max(Ne.length,te.length),j=[];for(let re=0;re<ye;re++){const se=q((ie=Ne[re])!=null?ie:null,pe),U=q((xe=te[re])!=null?xe:null,pe),J=Math.max(pe,se,U);j.push({rowHeight:J,originalHeight:se,modifiedHeight:U})}var Y,ve;Y=W.value,ve=j,Y.length===ve.length&&Y.every((re,se)=>{const U=ve[se];return U&&Math.abs(re.rowHeight-U.rowHeight)<=.5&&Math.abs(re.originalHeight-U.originalHeight)<=.5&&Math.abs(re.modifiedHeight-U.modifiedHeight)<=.5})||(W.value=j)})()}))}function ee(ie){K?.disconnect(),K=null,ie&&g.value&&!m.value&&typeof ResizeObserver<"u"&&(K=new ResizeObserver(()=>{X()}),K.observe(ie))}function ue(ie,xe){const ce=W.value[ie];if(!ce)return;const pe=xe==="original"?ce.originalHeight:ce.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(ce.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(pe)}px`}}return Qe(R,ie=>{ee(ie),kt(()=>X())},{flush:"post"}),Qe([g,m,T],()=>{ee(R.value),kt(()=>X())},{flush:"post",immediate:!0}),Gn(()=>{G=!0,z!=null&&(window.cancelAnimationFrame(z),z=null),K?.disconnect(),K=null}),(ie,xe)=>(b(),I("pre",{ref_key:"preRef",ref:R,style:Vt([y.value,$.value]),class:De([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":g.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":P.value}]),"aria-busy":o.value,"aria-label":O.value,"data-language":i.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[g.value?(b(),I("code",$0e,[(b(!0),I(Be,null,yt(T.value,ce=>(b(),I("span",{key:ce.key,class:De(["markstream-pre__diff-pane",ce.className])},[C("span",D0e,[(b(!0),I(Be,null,yt(ce.lines,(pe,Ne)=>(b(),I("span",{key:pe.key,class:De(["markstream-pre__diff-line",[`markstream-pre__diff-line--${pe.kind}`,{"markstream-pre__diff-line--empty":pe.empty}]]),style:Vt(ue(Ne,ce.key))},[xe[0]||(xe[0]=C("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),C("span",R0e,B(pe.number),1),C("span",z0e,[C("span",O0e,B(pe.code),1)])],6))),128))])],2))),128))])):(b(),I(Be,{key:1},[t.showLineNumbers?(b(),I("span",P0e,[C("span",{class:"markstream-pre__line-numbers-text",textContent:B(p.value)},null,8,j0e)])):ne("",!0),C("code",{translate:"no",class:"markstream-pre__code",textContent:B(r.value)},null,8,H0e)],64))],14,B0e))}});Jo.install=e=>{e.component(Jo.__name,Jo)};const ss=oi(tt({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=Of(),i=an("markstreamFade",void 0),s=an("markstreamTextStreamState",void 0),o=an("markstreamStreamVersion",void 0),r=F(()=>{const x=n.fade;return x===""||x===!0||x==="true"||x!==!1&&x!=="false"&&void 0}),l=F(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=F(()=>{var x;const E=(x=n["index-key"])!=null?x:n.indexKey;return E==null||E===""?"":String(E)}),u=Z(t.node.content),c=Z(""),d=Z(0),f=Z(t.node.content);let p;const g=Z(null),m=Z(null);let y="",w=null;function k(){p?.(),p=void 0}function A(){k(),c.value&&(u.value=u.value+c.value,c.value="")}Qe([u,g,m],function(){var x,E;const S=g.value;if(!S)return;const M=String((x=u.value)!=null?x:""),_=m.value;return w||(w=S.firstChild,y=(E=w?.data)!=null?E:""),M.startsWith(y)?!w&&M?(S.textContent=M,w=S.firstChild,void(y=M)):void(M.length>y.length&&_&&(_.appendChild(document.createTextNode(M.slice(y.length))),y=M)):(S.textContent=M,w=S.firstChild,_&&(_.textContent=""),void(y=M))},{immediate:!0}),Qe([()=>t.node.content,a,l],([x])=>{const E=String(x??""),S=a.value,M=cB({nextContent:E,persistedContent:S?s?.get(S):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=M.settledContent,c.value=M.streamedDelta,M.appended?(d.value+=1,(function(){if(!c.value||p||!o)return;const _=o.value;p=Qe(()=>o.value,N=>{N!==_&&A()},{flush:"sync"})})()):c.value||k(),S&&s?.set(S,E)},{immediate:!0}),Rf(k);const v=F(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(x,E)=>(b(),I("span",{class:De([[e.node.center?"text-node-center":""],"text-node"])},[Bn(C("span",{ref_key:"settledTextEl",ref:g},B(f.value),513),[[rs,u.value!==""]]),Bn(C("span",{ref_key:"settledAppendsEl",ref:m},null,512),[[rs,u.value!==""]]),c.value?(b(),I("span",{key:0,class:De(["text-node-stream-delta",[v.value]]),onAnimationend:A},B(c.value),35)):ne("",!0)],2))}}),[["__scopeId","data-v-fd79037c"]]);function Xh(e,t,n){return tt({name:e,inheritAttrs:!1,setup(i,{attrs:s,slots:o}){var r,l;const a=$b(),u=Fb(),c=Bb(),d=typeof window<"u"&&((l=(r=As())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=Z(typeof window>"u"||d||!c.value),p=vl(null);let g=null;function m(y){const w=y&&"$el"in y?y.$el:y;p.value=w instanceof HTMLElement?w:null}return typeof window<"u"&&Qe([p,c],([y,w],k,A)=>{if(g?.destroy(),g=null,!w||f.value)return void(f.value=!0);if(!y)return;let v=!0;const x=a(y,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});g=x,f.value=x.isVisible.value,x.whenVisible.then(()=>{v&&g===x&&(f.value=!0)}),A(()=>{v=!1,x.destroy(),g===x&&(g=null)})},{immediate:!0}),Gn(()=>{g?.destroy(),g=null}),()=>cn(f.value?t:n,dn(At({},s),{ref:m}),o)}})}ss.install=e=>{e.component(ss.__name,ss)};const Xm=tt({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var i,s,o,r,l,a,u;const c=xv(String((s=(i=n.node)==null?void 0:i.language)!=null?s:"")),d=u_[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):u_[""]),f=N0e(n.node),p=F0e(String((r=(o=n.node)==null?void 0:o.raw)!=null?r:""),d,f),g=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:Db(g??{},typeof window>"u"?0:window.innerWidth)),y=g?.diffAppearance,w=y==="dark"||y!=="light"&&n.isDark===!0,k=typeof g?.fontSize=="number"&&Number.isFinite(g.fontSize)&&g.fontSize>0?g.fontSize:12,A=typeof g?.lineHeight=="number"&&Number.isFinite(g.lineHeight)&&g.lineHeight>0?g.lineHeight:k===12?18:Math.max(12,Math.round(1.5*k)),v=typeof g?.tabSize=="number"&&Number.isFinite(g.tabSize)&&g.tabSize>0?g.tabSize:4,x=f?0:8,E=typeof((a=g?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(g.padding.top)&&g.padding.top>=0?g.padding.top:x,S=typeof((u=g?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(g.padding.bottom)&&g.padding.bottom>=0?g.padding.bottom:x,M=typeof g?.fontFamily=="string"?g.fontFamily.trim():"",_=At(At({fontSize:`${k}px`,lineHeight:`${A}px`,tabSize:v,paddingTop:`${E}px`,paddingBottom:`${S}px`,"--markstream-pre-line-number-top":`${E}px`},f?{"--markstream-pre-diff-line-height":`${A}px`}:{}),M?{"--markstream-code-font-family":M}:{}),N=()=>cn("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[cn("svg",{class:"action-icon",width:"14",height:"14"})]),D=n.isShowPreview!==!1&&(c==="html"||c==="svg"),T=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||D&&n.showPreviewButton!==!1,$=O=>{if(O!=null)return typeof O=="number"?`${O}px`:String(O)},P=At(At(At({"--markstream-code-layout-character-width":"1ch"},$(n.minWidth)?{minWidth:$(n.minWidth)}:{}),$(n.maxWidth)?{maxWidth:$(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--markstream-code-fallback-bg, var(--code-bg, #fff))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return cn("div",dn(At({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":w,"is-diff":f,"is-plain-text":c===""||c==="plaintext"||c==="text"},t.class],style:[P,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:cn("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[cn("div",{class:"code-header-main",style:{minWidth:0,flex:"1 1 auto",display:"flex",alignItems:"center",gap:"var(--ms-gap-header-main, 0.625rem)",overflow:"hidden"}},[cn("span",{class:"icon-slot h-4 w-4 flex-shrink-0","aria-hidden":"true",style:{display:"inline-flex",width:"1rem",height:"1rem",flex:"0 0 auto"}}),cn("div",{class:"code-header-copy",style:{minWidth:0,display:"grid",gap:"2px"}},[cn("div",{class:"code-header-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--ms-text-label, 0.75rem)",fontWeight:"500",color:"var(--code-action-fg)"}},p.title),p.caption?cn("div",{class:"code-header-caption",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.75rem",color:"var(--code-line-number)"}},p.caption):null])]),cn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?cn("div",{class:"code-diff-stats","aria-hidden":"true"},[cn("span",{class:"code-diff-stat removed"},"-0"),cn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:N(),n.showCollapseButton===!1?null:N(),T?cn("div",{class:"relative"},[N()]):null])]),cn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[cn(Jo,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?L0e(g?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:_,"data-markstream-code-loading":"1"})]),cn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[cn("div",{class:"loading-skeleton"},[cn("div",{class:"skeleton-line"}),cn("div",{class:"skeleton-line"}),cn("div",{class:"skeleton-line short"})])]),cn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),Zy=Xh("ViewportDeferredCodeBlockNode",rl({loader:()=>Ti(null,null,function*(){try{return(yield ns(()=>import("./CodeBlockNode-CZYIqTV_.js"),__vite__mapDeps([4,5]))).default}catch(e){return console.warn('[markstream-vue] Failed to load the enhanced CodeBlockNode chunk; falling back to preformatted code rendering. Enhanced code blocks require the optional "stream-diffs" peer (or "stream-monaco" as a fallback).',e),Jo}}),loadingComponent:Xm,delay:0,suspensible:!1}),Xm),yl=rl(()=>Ti(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,i,s,o;return cn(ss,dn(At({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield gB(),(yield ns(()=>import("./index7-DyLV34jk.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,i,s,o;return cn(ss,dn(At({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))}})),TB=rl(()=>Ti(null,null,function*(){try{return yield gB(),(yield ns(()=>import("./index6-DeApd9L_.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,i,s;return cn(ss,dn(At({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(i=e.node.content)!=null?i:""}$$`}}))}})),Do=oi(tt({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(b(),I("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=i=>t.$emit("click",i,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=i=>t.$emit("mouseEnter",i,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=i=>t.$emit("mouseLeave",i,e.node.id,e.messageId,e.threadId))},B(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);Do.install=e=>{e.component(Do.__name,Do)};const W0e={class:"superscript-node"},ir=oi(tt({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,emphasis:Po,footnote_reference:Ar,strikethrough:zo,highlight:wr,insert:or,subscript:sr,emoji:nr,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("sup",W0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"superscript"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);ir.install=e=>{e.component(ir.__name,ir)};const q0e={class:"subscript-node"},sr=oi(tt({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,emphasis:Po,footnote_reference:Ar,strikethrough:zo,highlight:wr,insert:or,superscript:ir,emoji:nr,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("sub",q0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"subscript"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);sr.install=e=>{e.component(sr.__name,sr)};const U0e={class:"strong-node"},Ro=oi(tt({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,emphasis:Po,strikethrough:zo,highlight:wr,insert:or,subscript:sr,superscript:ir,emoji:nr,footnote_reference:Ar,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("strong",U0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"strong"}-${l}`,components:i.value,node:r,"index-key":`${e.indexKey||"strong"}-${l}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);Ro.install=e=>{e.component(Ro.__name,Ro)};const K0e={class:"strikethrough-node"},zo=oi(tt({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,emphasis:Po,highlight:wr,insert:or,subscript:sr,superscript:ir,emoji:nr,footnote_reference:Ar,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("del",K0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"strikethrough"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);zo.install=e=>{e.component(zo.__name,zo)};const V0e=["href","title","aria-label","aria-hidden","target","rel"],Z0e=["aria-hidden"],G0e={class:"link-text-wrapper relative inline-flex"},Q0e={class:"leading-[normal] link-text"},Oo=oi(tt({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=an("markstreamShowTooltips",void 0),i=F(()=>{const w=n?.value;return typeof w=="boolean"?w:t.showTooltip}),s=F(()=>{var w,k,A,v,x;const E=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",S=(w=t.animationOpacity)!=null?w:.35,M=Math.max(.12,Math.min(.5*S,S)),_={"--underline-height":`${(k=t.underlineHeight)!=null?k:2}px`,"--underline-bottom":E,"--underline-opacity":String(S),"--underline-rest-opacity":String(M),"--underline-duration":`${(A=t.animationDuration)!=null?A:1.6}s`,"--underline-timing":(v=t.animationTiming)!=null?v:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(x=t.animationIteration)!=null?x:"infinite"};return t.color&&(_["--link-color"]=t.color),_}),o=Cs(()=>t.customId),r=F(()=>At({text:ss,strong:Ro,strikethrough:zo,emphasis:Po,image:mu,html_inline:Cr,inline_code:xo},o.value)),l=Of(),a=F(()=>{var w,k;const A=(w=t.node)==null?void 0:w.attrs;if(!A||typeof A!="object")return{};const v={};if(Array.isArray(A))for(const x of A)Array.isArray(x)&&x[0]&&(v[String(x[0])]=String((k=x[1])!=null?k:""));else for(const[x,E]of Object.entries(A))x&&E!=null&&E!==!1&&(v[x]=E===!0?"":String(E));return C_(v,"safe","a")}),u=F(()=>At(At({},l),a.value)),c=F(()=>{var w,k;return C_({href:String((k=(w=t.node)==null?void 0:w.href)!=null?k:"")},"safe","a").href}),d=F(()=>{if(!c.value)return;const w=u.value.target;return(typeof w=="string"?w.trim():String(w??"").trim())||(Fue(c.value)?"_blank":void 0)}),f=F(()=>{var w;return String((w=d.value)!=null?w:"").trim().toLowerCase()==="_blank"}),p=F(()=>{if(!c.value)return;const w=u.value.rel,k=new Set((typeof w=="string"?w:String(w??"")).split(/\s+/).filter(Boolean)),A=new Set(Array.from(k).filter(v=>v.toLowerCase()!=="opener"));return f.value&&(A.add("noopener"),A.add("noreferrer")),A.size>0?Array.from(A).join(" "):void 0}),g=F(()=>{const w=At({},u.value);return delete w.title,delete w.href,delete w.target,delete w.rel,w});function m(){i.value&&m0e()}const y=F(()=>{var w,k;const A=(w=t.node)==null?void 0:w.title;return typeof A=="string"&&A.trim().length>0?A:String((k=c.value)!=null?k:"")});return(w,k)=>{var A,v;return e.node.loading?(b(),I("span",Yn({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},h(l),{style:s.value}),[C("span",G0e,[C("span",Q0e,[V(h(ss),{class:"leading-[normal] link-text",node:{type:"text",content:String((A=e.node.text)!=null?A:""),raw:String((v=e.node.text)!=null?v:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),k[1]||(k[1]=C("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,Z0e)):(b(),I("a",Yn({key:0,class:"link-node",href:c.value,title:i.value?"":y.value,"aria-label":`Link: ${y.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:p.value},g.value,{style:s.value,onMouseenter:k[0]||(k[0]=x=>(function(E){var S,M,_,N;if(!i.value)return;const D=E,T=D?.clientX!=null&&D?.clientY!=null?{x:D.clientX,y:D.clientY}:void 0,$=((S=t.node)==null?void 0:S.title)||((M=c.value)!=null&&M.includes("xn--")&&((N=(_=t.node)==null?void 0:_.text)!=null&&N.includes("://"))?t.node.text:c.value)||"";g0e(E.currentTarget,$,"top",!1,T)})(x)),onMouseleave:m}),[(b(!0),I(Be,null,yt(e.node.children,(x,E)=>(b(),fe(h(Zl),{key:`${e.indexKey||"emphasis"}-${E}`,components:r.value,node:x,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${E}`},null,8,["components","node","custom-id","index-key"]))),128))],16,V0e))}}}),[["__scopeId","data-v-367e6ca4"]]);Oo.install=e=>{e.component(Oo.__name,Oo)};const Y0e={class:"insert-node"},or=oi(tt({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,emphasis:Po,strikethrough:zo,highlight:wr,subscript:sr,superscript:ir,emoji:nr,footnote_reference:Ar,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("ins",Y0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"insert"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);or.install=e=>{e.component(or.__name,or)};const J0e={class:"highlight-node"},wr=oi(tt({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,emphasis:Po,strikethrough:zo,insert:or,subscript:sr,superscript:ir,emoji:nr,footnote_reference:Ar,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("mark",J0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"highlight"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);wr.install=e=>{e.component(wr.__name,wr)};const X0e={class:"emphasis-node"},Po=oi(tt({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>At({text:ss,inline_code:xo,link:Oo,html_inline:Cr,strong:Ro,strikethrough:zo,highlight:wr,insert:or,subscript:sr,superscript:ir,emoji:nr,footnote_reference:Ar,math_inline:yl,reference:Do},n.value));return(s,o)=>(b(),I("em",X0e,[(b(!0),I(Be,null,yt(e.node.children,(r,l)=>(b(),fe(h(Zl),{key:`${e.indexKey||"emphasis"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);Po.install=e=>{e.component(Po.__name,Po)};const ege={class:"hard-break"},vu=oi(tt({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(b(),I("br",ege))}),[["__scopeId","data-v-50c58f70"]]);vu.install=e=>{e.component(vu.__name,vu)};const lp=tt({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=wt({checkbox:kr,checkbox_input:kr,emoji:nr,emphasis:Po,hardbreak:vu,highlight:wr,inline_code:xo,insert:or,link:Oo,reference:Do,strikethrough:zo,strong:Ro,subscript:sr,superscript:ir,text:ss}),i=Cs(()=>t.customId),s=F(()=>{const o=i.value;return Object.keys(o).length>0?At(At({},n),o):n});return(o,r)=>(b(!0),I(Be,null,yt(e.nodes,(l,a)=>(b(),fe(h(Zl),{key:a,components:s.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function g8(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(g8)}function e2(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(g8))return e;if(!t||e.length!==1)return null;const i=e[0];if(i?.type!=="paragraph"||!Array.isArray(i.children))return null;const s=i.children;return(n||s.length>0)&&s.every(g8)?s:null}function Gc(e){var t,n;if(!e?.length)return null;let i="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;i+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return i}const tge=["cite"],nge={key:0,dir:"auto",class:"paragraph-node"},ige=["custom-id"],zg=oi(tt({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=Cs(()=>t.customId),i=F(()=>!!n.value.paragraph),s=F(()=>!!n.value.text),o=F(()=>e2(t.node.children,!i.value)),r=F(()=>t.fade!==!1||s.value?null:Gc(o.value));return Pn("markstreamShowTooltips",F(()=>t.showTooltips)),Pn("markstreamFade",F(()=>t.fade)),(l,a)=>(b(),I("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[o.value?(b(),I("p",nge,[r.value!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(r.value),9,ige)):(b(),fe(h(lp),{key:1,nodes:o.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(b(),fe(h(rr),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=u=>l.$emit("copy",u))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,tge))}}),[["__scopeId","data-v-abfecebc"]]);zg.install=e=>{e.component(zg.__name,zg)};const sge={class:"definition-list"},oge={class:"definition-term"},rge={class:"definition-desc"},Og=oi(tt({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(b(),I("dl",sge,[(b(!0),I(Be,null,yt(t.node.items,(s,o)=>(b(),I(Be,{key:o},[C("dt",oge,[V(h(rr),{"index-key":`definition-term-${t.indexKey}-${o}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),C("dd",rge,[V(h(rr),{"index-key":`definition-desc-${t.indexKey}-${o}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[1]||(i[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);Og.install=e=>{e.component(Og.__name,Og)};const lge=["href","title"],S1=oi(tt({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(i){var s;if(i.preventDefault(),typeof document>"u")return;const o=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(o);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(i,s)=>(b(),I("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,lge))}}),[["__scopeId","data-v-e1eb37b6"]]);S1.install=e=>{e.component(S1.__name,S1)};const age=["id"],uge={class:"flex-1"},Pg=tt({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(b(),I("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[C("div",uge,[V(h(rr),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,age))}});Pg.install=e=>{e.component(Pg.__name,Pg)};const cge=["custom-id"],m8=oi(tt({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=Cs(()=>t.customId),i=an("markstreamFade",void 0),s=F(()=>i?.value!==!1||n.value.text?null:Gc(t.node.children)),o=F(()=>At({text:ss,inline_code:xo,link:Oo,image:mu,strong:Ro,emphasis:Po,strikethrough:zo,highlight:wr,insert:or,subscript:sr,superscript:ir,emoji:nr,checkbox:kr,checkbox_input:kr,footnote_reference:Ar,hardbreak:vu,math_inline:yl,reference:Do},n.value));return(r,l)=>(b(),fe(Ms(`h${e.node.level}`),Yn({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:he(()=>[s.value!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(s.value),9,cge)):(b(!0),I(Be,{key:1},yt(e.node.children,(a,u)=>(b(),fe(h(Zl),{key:u,components:o.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${u}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),Mv=m8;Mv.install=e=>{e.component(m8.__name,m8)};const dge={key:0,dir:"auto",class:"paragraph-node"},fge=["custom-id"],hge={dir:"auto",class:"paragraph-node"},pge=["custom-id"],vf=oi(tt({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=F(()=>{var p;return(p=t.node)!=null?p:t.item}),i=Cs(()=>t.customId),s=F(()=>!!i.value.paragraph),o=F(()=>!!i.value.text),r=F(()=>{var p;return e2((p=n.value)==null?void 0:p.children,!s.value)}),l=F(()=>{var p;if(s.value)return null;const g=(p=n.value)==null?void 0:p.children;if(!Array.isArray(g)||g.length<2)return null;const m=g[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const y=g.slice(1);if(!y.every(k=>k?.type==="list"))return null;const w=e2([m]);return w?{paragraphChildren:w,nestedLists:y}:null});function a(){return t.fade===!1&&!o.value}const u=F(()=>a()?Gc(r.value):null),c=F(()=>{var p;return a()?Gc((p=l.value)==null?void 0:p.paragraphChildren):null}),d=Object.freeze({}),f=F(()=>{const{value:p}=t;return typeof p=="number"&&Number.isFinite(p)?{value:p}:d});return Pn("markstreamShowTooltips",F(()=>t.showTooltips)),Pn("markstreamFade",F(()=>t.fade)),(p,g)=>{var m,y;return b(),I("li",Yn({class:"list-item",dir:"auto"},f.value),[r.value?(b(),I("p",dge,[u.value!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(u.value),9,fge)):(b(),fe(h(lp),{key:1,nodes:r.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):l.value?(b(),I(Be,{key:1},[C("p",hge,[c.value!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(c.value),9,pge)):(b(),fe(h(lp),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(b(!0),I(Be,null,yt(l.value.nestedLists,(w,k)=>(b(),fe(h(rr),{key:k,nodes:[w],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${k}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:g[0]||(g[0]=A=>p.$emit("copy",A))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(b(),fe(h(rr),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(y=(m=n.value)==null?void 0:m.children)!=null?y:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:g[1]||(g[1]=w=>p.$emit("copy",w))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);vf.install=e=>{e.component(vf.__name,vf)};const yf=oi(tt({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=Cs(()=>e.customId),n=F(()=>t.value.list_item||vf);return(i,s)=>(b(),fe(Ms(e.node.ordered?"ol":"ul"),{class:De(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:he(()=>[(b(!0),I(Be,null,yt(e.node.items,(o,r)=>{var l;return b(),fe(Ms(n.value),Yn({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:o,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((l=e.node.start)!=null?l:1)+r:void 0,onCopy:s[0]||(s[0]=a=>i.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);yf.install=e=>{e.component(yf.__name,yf)};const gge={key:2,class:"html-block-node__raw"},mge=["innerHTML"],vge={key:1,class:"html-block-node__placeholder"},M1=oi(tt({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=an("markstreamHtmlPolicy",void 0),i=an("markstreamNestedRendererProps",void 0),s=F(()=>{var T,$;return($=(T=t.htmlPolicy)!=null?T:n?.value)!=null?$:"safe"}),o=F(()=>{var T,$;const P=(T=i?.value)!=null?T:{};return dn(At({},P),{customId:($=t.customId)!=null?$:P.customId,htmlPolicy:s.value})}),r=rl({loader:()=>Promise.resolve().then(()=>Kb),suspensible:!1}),l=F(()=>{const T=Bg(t.node.attrs,s.value);if(!T)return;const $=C1(T);return Object.keys($).length>0?$:void 0}),a=F(()=>{const T=String(t.node.tag||"").trim(),$=Bg(t.node.attrs,s.value,T);if(!$)return;const P=C1($);return Object.keys(P).length>0?P:void 0}),u=Cs(()=>t.customId),c=tt({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=Z(null),f=Z(typeof window>"u"),p=Z(t.node.content),g=F(()=>Array.isArray(t.node.children)?t.node.children:[]),m=F(()=>String(t.node.tag||"div")),y=F(()=>{var T;if(m.value.trim().toLowerCase()!=="details"||(T=t.node.attrs)!=null&&T.some(([P])=>String(P).toLowerCase()==="open"))return null;const $=g.value[0];return $?.type==="html_block"&&String($.tag||"").toLowerCase()==="summary"?$:null}),w=F(()=>{var T;return Gc((T=y.value)==null?void 0:T.children)}),k=F(()=>{const T=y.value;if(!T)return;const $=Bg(T.attrs,s.value,"summary");if(!$)return;const P=C1($);return Object.keys(P).length>0?P:void 0}),A=F(()=>w.value==null?g.value:g.value.slice(1)),v=F(()=>{const T=m.value.trim().toLowerCase();return GN.has(T)||Mb(T,s.value)}),x=F(()=>g.value.length>0&&!!t.node.tag&&!v.value),E=F(()=>{var T,$,P;if(x.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(T=p.value)!=null?T:""};const O=($=p.value)!=null?$:t.node.content;if(!O)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:mf(O,s.value)};if(t.node.loading){const W=Jm(O,u.value,s.value);return W===null?{mode:"text",content:(P=t.node.raw)!=null?P:O}:{mode:"dynamic",nodes:W}}if(!wB(O,u.value))return{mode:"html",content:mf(O,s.value)};const R=Jm(O,u.value,s.value);return R===null?{mode:"html",content:mf(O,s.value)}:{mode:"dynamic",nodes:R}}),S=$b(),M=Fb(),_=Bb(),N=vl(null),D=!!t.node.loading;return typeof window<"u"?(Qe([()=>d.value,()=>M?.value.heavyBlockMargin,()=>M?.value.rootMargin],([T],$,P)=>{var O,R,W,z;if((R=(O=N.value)==null?void 0:O.destroy)==null||R.call(O),N.value=null,!D)return f.value=!0,void(p.value=t.node.content);if(!T)return void(f.value=!1);let G=!0;const K=(z=(W=M?.value.heavyBlockMargin)!=null?W:M?.value.rootMargin)!=null?z:Zc,H=S(T,{rootMargin:K,allowIdle:!_.value});N.value=H,f.value=f.value||H.isVisible.value,H.whenVisible.then(()=>{G&&N.value===H&&(f.value=!0)}),P(()=>{G=!1,H.destroy(),N.value===H&&(N.value=null)})},{immediate:!0}),Qe(()=>t.node.content,T=>{D&&!f.value||(p.value=T)})):f.value=!0,Gn(()=>{var T,$;($=(T=N.value)==null?void 0:T.destroy)==null||$.call(T),N.value=null}),(T,$)=>(b(),fe(Ms(x.value?m.value:"div"),Yn({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":h(_)&&!f.value?"true":void 0},x.value?a.value:void 0),{default:he(()=>[f.value?(b(),I(Be,{key:0},[E.value.mode==="structured"?(b(),I(Be,{key:0},[w.value!==null?(b(),I(Be,{key:0},[C("summary",XR(DI(k.value)),B(w.value),17),A.value.length?(b(),fe(h(r),Yn({key:0},o.value,{nodes:A.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):ne("",!0)],64)):(b(),fe(h(r),Yn({key:1},o.value,{nodes:g.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):E.value.mode==="dynamic"?(b(),fe(h(c),{key:1,nodes:E.value.nodes},null,8,["nodes"])):E.value.mode==="text"?(b(),I("pre",gge,B(E.value.content),1)):(b(),I("div",Yn({key:3},l.value,{innerHTML:E.value.content}),null,16,mge))],64)):(b(),I("div",vge,[En(T.$slots,"placeholder",{node:e.node},()=>[$[0]||($[0]=C("span",{class:"html-block-node__placeholder-bar"},null,-1)),$[1]||($[1]=C("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),$[2]||($[2]=C("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);M1.install=e=>{e.component(M1.__name,M1)};const yge={dir:"auto",class:"paragraph-node"},bge=["custom-id"],Pc=oi(tt({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=Cs(()=>t.customId),i=an("markstreamHtmlPolicy",void 0),s=an("markstreamFade",void 0),o=an("markstreamParseOptions",void 0),r=an("markstreamCustomMarkdownIt",void 0),l=an("markstreamNestedRendererProps",void 0),a=F(()=>{var M;return(M=i?.value)!=null?M:"safe"}),u=F(()=>{var M;return(M=t.parseOptions)!=null?M:o?.value}),c=F(()=>{var M;return(M=t.customMarkdownIt)!=null?M:r?.value}),d=F(()=>{var M,_;return(_=t.customHtmlTags)!=null?_:(M=l?.value)==null?void 0:M.customHtmlTags}),f=F(()=>{var M,_;const N=(M=l?.value)!=null?M:{};return dn(At({},N),{customId:(_=t.customId)!=null?_:N.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),p=rl({loader:()=>Promise.resolve().then(()=>Kb),suspensible:!1});function g(M){var _;return M.type==="text"&&String((_=M.content)!=null?_:"").trim()===""}const m=F(()=>t.node.children.filter(M=>!g(M))),y=F(()=>m.value.length>0&&m.value.every(M=>M.type==="image"||(function(_){var N;const D=(function(T){return T.type==="link"&&Array.isArray(T.children)?T.children.filter($=>!g($)):[]})(_);return D.length===1&&((N=D[0])==null?void 0:N.type)==="image"})(M))),w=F(()=>new Set(rd(d.value))),k=F(()=>{if(!y.value||m.value.length<=1)return t.node.children;const M=[];for(let _=0;_<t.node.children.length;_++){const N=t.node.children[_];if(!g(N)){M.push(N);continue}const D=M.length>0,T=t.node.children.slice(_+1).some($=>!g($));D&&T&&M.push(dn(At({},N),{content:" ",raw:" "}))}return M}),A=F(()=>s?.value===!1&&!n.value.text),v=F(()=>A.value?Gc(k.value):null);function x(M,_){return{node:M,"index-key":`${t.indexKey}-${_}`,"custom-id":t.customId,"custom-html-tags":d.value}}const E=F(()=>At({inline_code:xo,image:mu,link:Oo,hardbreak:vu,emphasis:Po,strong:Ro,strikethrough:zo,highlight:wr,insert:or,subscript:sr,superscript:ir,html_inline:Cr,html_block:M1,emoji:nr,checkbox:kr,math_inline:yl,checkbox_input:kr,reference:Do,footnote_anchor:S1,footnote_reference:Ar,text:ss},n.value)),S=F(()=>k.value.map((M,_)=>{var N;const D=(function(T){var $,P,O,R;if(T.type==="html_block"||T.type==="html_inline"){const W=String(($=T.tag)!=null?$:"").trim().toLowerCase()||eF(T.content);if(W&&!w.value.has(W)&&tF((P=T.content)!=null?P:T.raw,W)){const z=String((R=(O=T.content)!=null?O:T.raw)!=null?R:"");return{child:{type:"text",content:z,raw:z},component:ss,isCustomComponent:!1}}}return{child:T,component:E.value[T.type],isCustomComponent:!!(n.value[T.type]&&!Lp(String(T.type)))}})(M);return dn(At({},D),{index:_,key:`${t.indexKey||"paragraph"}-${_}`,customAttrs:D.isCustomComponent?Nb(D.child,a.value):void 0,hasSlotChildren:Array.isArray(D.child.children)&&D.child.children.length>0,slotContent:String((N=D.child.content)!=null?N:""),originalChild:M})}));return(M,_)=>(b(),I("p",yge,[v.value!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(v.value),9,bge)):(b(!0),I(Be,{key:1},yt(S.value,N=>{return b(),I(Be,{key:N.key},[y.value&&g(N.originalChild)?(b(),I(Be,{key:0},[Ue(B((D=N.originalChild,String((T=D.content)!=null?T:""))),1)],64)):N.isCustomComponent?(b(),fe(Ms(N.component),Yn({key:1,ref_for:!0},N.customAttrs,{node:N.child,loading:N.child.loading,"index-key":N.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:he(()=>[N.hasSlotChildren?(b(),fe(h(p),Yn({key:0,ref_for:!0},f.value,{nodes:N.child.children,"index-key":N.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):N.slotContent?(b(),fe(h(p),Yn({key:1,ref_for:!0},f.value,{content:N.slotContent,final:!N.child.loading,"index-key":`${N.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ne("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(b(),fe(Ms(N.component),Yn({key:2,ref_for:!0},x(N.child,N.index)),null,16))],64);var D,T}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);Pc.install=e=>{e.component(Pc.__name,Pc)};const kge={class:"table-node-wrapper"},Age=["aria-busy"],Cge={key:0},wge=["custom-id"],xge=["aria-label","onPointerdown"],_ge=["custom-id"],Sge={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},I1=oi(tt({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=F(()=>{var w;return(w=t.node.loading)!=null&&w}),i=F(()=>{var w;return(w=t.node.rows)!=null?w:[]}),s=Z(null),o=Z([]);let r=null;const l=F(()=>t.node.header.cells.length),a=F(()=>o.value.some(w=>Number.isFinite(w)&&w>0)),u=F(()=>a.value?o.value.map(w=>w>0?{width:`${w}px`}:void 0):[]);Pn("markstreamShowTooltips",F(()=>t.showTooltips)),Pn("markstreamFade",F(()=>t.fade));const c=Cs(()=>t.customId),d=F(()=>!!c.value.text),f=F(()=>!!c.value.paragraph),p=new WeakMap;function g(w){const k=t.fade===!1&&!d.value,A=!f.value,v=p.get(w);if(v?.children===w.children&&v.textFastPath===k&&v.paragraphFastPath===A)return v.info;const x=e2(w.children,A,!0),E={simpleChildren:x,plainText:x&&k?Gc(x):null};return p.set(w,{children:w.children,textFastPath:k,paragraphFastPath:A,info:E}),E}function m(w){if(!r)return;w.preventDefault();const k=r.startWidth+r.nextStartWidth,A=Math.min(48,Math.floor(k/2)),v=Math.max(A,Math.min(k-A,Math.round(r.startWidth+w.clientX-r.startX))),x=[...r.widths];x[r.index]=v,x[r.index+1]=k-v,o.value=x}function y(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),r=null)}return Qe(l,()=>{y(),o.value=[]}),Gn(y),(w,k)=>(b(),I("div",kge,[C("table",{ref_key:"tableRef",ref:s,class:De(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(b(),I("colgroup",Cge,[(b(!0),I(Be,null,yt(e.node.header.cells,(A,v)=>(b(),I("col",{key:v,style:Vt(u.value[v])},null,4))),128))])):ne("",!0),C("thead",null,[C("tr",null,[(b(!0),I(Be,null,yt(e.node.header.cells,(A,v)=>(b(),I("th",{key:v,dir:"auto",class:De([A.align==="right"?"text-right":A.align==="center"?"text-center":"text-left"])},[g(A).plainText!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(g(A).plainText),9,wge)):g(A).simpleChildren?(b(),fe(h(lp),{key:1,nodes:g(A).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${v}`},null,8,["nodes","custom-id","index-key"])):(b(),fe(h(rr),{key:2,nodes:A.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:k[0]||(k[0]=x=>w.$emit("copy",x))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),v<e.node.header.cells.length-1?(b(),I("button",{key:3,type:"button",class:"table-node__resize-handle","aria-label":`Resize columns ${v+1} and ${v+2}`,onPointerdown:x=>(function(E,S){if(S.button!==0)return;const M=(function(){var D;const T=(D=s.value)==null?void 0:D.querySelectorAll("thead th");return Array.from(T??[],$=>Math.round($.getBoundingClientRect().width))})(),_=M[E],N=M[E+1];_&&N&&(S.preventDefault(),r={index:E,startX:S.clientX,startWidth:_,nextStartWidth:N,widths:M},o.value=M,window.addEventListener("pointermove",m),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y))})(v,x)},null,40,xge)):ne("",!0)],2))),128))])]),C("tbody",null,[(b(!0),I(Be,null,yt(i.value,(A,v)=>(b(),I("tr",{key:v},[(b(!0),I(Be,null,yt(A.cells,(x,E)=>(b(),I("td",{key:E,class:De([x.align==="right"?"text-right":x.align==="center"?"text-center":"text-left"]),dir:"auto"},[g(x).plainText!==null?(b(),I("span",{key:0,class:"text-node","custom-id":t.customId},B(g(x).plainText),9,_ge)):g(x).simpleChildren?(b(),fe(h(lp),{key:1,nodes:g(x).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${v}-${E}`},null,8,["nodes","custom-id","index-key"])):(b(),fe(h(rr),{key:2,nodes:x.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:k[1]||(k[1]=S=>w.$emit("copy",S))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,Age),V(ys,{name:"table-node-fade"},{default:he(()=>[n.value?(b(),I("div",Sge,[En(w.$slots,"loading",{isLoading:n.value},()=>[k[2]||(k[2]=C("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),k[3]||(k[3]=C("span",{class:"sr-only"},"Loading",-1))],!0)])):ne("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);I1.install=e=>{e.component(I1.__name,I1)};const Mge={class:"hr-node"},jg=oi({},[["render",function(e,t){return b(),I("hr",Mge)}],["__scopeId","data-v-39b2349c"]]);jg.install=e=>{e.component(jg.__name,jg)};const Ige={class:"unknown-node"},v8=tt({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(b(),I("div",Ige,B(e.node.raw),1))}),Hg=oi(tt({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=F(()=>`vmr-container vmr-container-${t.node.name}`),i=Cs(()=>t.customId),s=F(()=>At({text:ss,paragraph:Pc,heading:Mv,inline_code:xo,link:Oo,image:mu,strong:Ro,emphasis:Po,strikethrough:zo,insert:or,subscript:sr,superscript:ir,checkbox:kr,checkbox_input:kr,hardbreak:vu,math_inline:yl,reference:Do,list:yf,math_block:TB,table:I1},i.value));return(o,r)=>(b(),I("div",Yn({class:n.value},e.node.attrs),[(b(!0),I(Be,null,yt(e.node.children,(l,a)=>{return b(),fe(Ms((u=l.type,s.value[u]||v8)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:l,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var u}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);Hg.install=e=>{e.component(Hg.__name,Hg)};const Ege=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],L_=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Tge(e){if(e<=255)return Ege[e];let t=0,n=L_.length-1;for(;t<=n;){const i=t+n>>1,s=L_[i];if(e<s[0])n=i-1;else{if(!(e>s[1]))return s[2];t=i+1}}return"L"}const Lge=/[ \t\n\r\f]+/g,Nge=/[\t\n\r\f]| {2,}|^ | $/;let Gy=null;const Fge=new RegExp("\\p{Script=Arabic}","u"),Eu=new RegExp("\\p{M}","u"),Rb=new RegExp("\\p{Nd}","u");function N_(e){return Fge.test(e)}function F_(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Pl(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){const i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){if(F_(i-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(F_(n))return!0}}return!1}const Bge=new Set([" "," ","⁠","\uFEFF"]),$ge=new Set(["-","‐","–","—"]);function LB(e,t){return!((function(n){const i=E1(n);return i!==null&&Bge.has(i)})(e)||t&&((function(n){const i=E1(n);return i!==null&&(zb.has(i)||Qc.has(i))})(e)||(function(n){const i=E1(n);return i!==null&&$ge.has(i)})(e)))}const zb=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Iv=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),Ob=new Set(["'","’"]),Qc=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),Dge=new Set([":",".","،","؛"]),Rge=new Set(["၏"]),zge=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function Oge(e){if(Pb(e))return!0;let t=!1;for(const n of e)if(Qc.has(n)||n2(n))t=!0;else if(!t||!Eu.test(n))return!1;return t}function Pge(e){for(const t of e)if(!zb.has(t)&&!Qc.has(t))return!1;return e.length>0}function jge(e){if(Pb(e))return!0;for(const t of e)if(!(Iv.has(t)||Ob.has(t)||Eu.test(t)||n2(t)))return!1;return e.length>0}function Pb(e){let t=!1;for(const n of e)if(n!=="\\"&&!Eu.test(n)){if(!(Iv.has(n)||Qc.has(n)||Ob.has(n)))return!1;t=!0}return t}function t2(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const i=e.charCodeAt(n);if(i<56320||i>57343)return n;const s=n-1;if(s<0)return n;const o=e.charCodeAt(s);return o>=55296&&o<=56319?s:n}function E1(e){if(e.length===0)return null;const t=t2(e,e.length);return e.slice(t)}const Hge=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function n2(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,i){for(let s=0;s<i.length;s+=2)if(n>=i[s]&&n<=i[s+1])return!0;return!1})(t,Hge)}function Wge(e){const t=(function(n){for(const i of n)if(!Eu.test(i))return i;return null})(e);return t!==null&&Rb.test(t)}function qge(e){const t=Array.from(e);let n=t.length;for(;n>0;){const i=t[n-1];if(Eu.test(i))n--;else{if(!Iv.has(i)&&!Ob.has(i))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function Uge(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function B_(e,t,n,i){const s=t[i],o=e[i];if(s==null)return o;const r=n[i];if(o.length===r)return o;const l=s.repeat(r);return e[i]=l,l}function $_(e,t){return e&&t!==null&&Dge.has(t)}function Kge(e){const t=E1(e);return t!==null&&Rge.has(t)}function Vge(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function y8(e){let t=e.length;for(;t>0;){const n=t2(e,t),i=e.slice(n,t);if(zge.has(i))return!0;if(!Qc.has(i))return!1;t=n}return!1}function Zge(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const Gge=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Xr(e){return e.length===1?e[0]:e.join("")}function Qge(e,t){const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),Xr(n)}function Yge(e,t,n,i){if(!Gge.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let o=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=Zge(c,i),f=d==="text"&&t;o===null||d!==o||f!==a?(o!==null&&s.push({text:Xr(r),isWordLike:a,kind:o,start:l}),o=d,r=[c],l=n+u,a=f,u+=c.length):(r.push(c),u+=c.length)}return o!==null&&s.push({text:Xr(r),isWordLike:a,kind:o,start:l}),s}function Qy(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const Jge=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Xge(e,t){const n=e.texts[t];return!!n.startsWith("www.")||Jge.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function eme(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}const tme=new Set([":","-","/","×",",",".","+","–","—"]),nme=/[\p{P}\p{S}\p{Co}]/u,ime=new RegExp("\\p{Emoji_Presentation}","u"),sme=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function NB(e){const t=e.charCodeAt(0);return t<128?(function(n){return n>=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!sme.has(e)&&!ime.test(e)&&nme.test(e)}function D_(e){let t=!1;for(const n of e)if(!Eu.test(n)){if(!NB(n))return!1;t=!0}return t}function ome(e,t,n,i){const s=!t&&D_(e),o=!i&&D_(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=t2(c,d),p=c.slice(f,d);if(!Eu.test(p))return p;d=f}return null})(a);return u!==null&&n2(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=t2(a,u),d=a.slice(c,u);if(!Eu.test(d))return NB(d)||n2(d);u=c}return!1})(e);return!!(s||o||l)&&!Pl(e)&&!Pl(n)&&(t||s||r)&&(i||o)}function R_(e){for(const t of e)if(Rb.test(t))return!0;return!1}function Wg(e){if(e.length===0)return!1;for(const t of e)if(!Rb.test(t)&&!tme.has(t))return!1;return!0}function rme(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let i=0;for(let s=0;s<e.len;s++)e.kinds[s]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:s,consumedEndSegmentIndex:s+1}),i=s+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function lme(e,t,n="normal",i="normal"){const s=(function(a){const u=a??"normal";return u==="pre-wrap"?{mode:u,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:u,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}})(n),o=s.mode==="pre-wrap"?(function(a){return/[\r\f]/.test(a)?a.replace(/\r\n/g,` -`).replace(/[\r\f]/g,` -`):a})(e):(function(a){if(!Nge.test(a))return a;let u=a.replace(Lge," ");return u.charCodeAt(0)===32&&(u=u.slice(1)),u.length>0&&u.charCodeAt(u.length-1)===32&&(u=u.slice(0,-1)),u})(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,u,c){var d,f,p;const g=(Gy===null&&(Gy=new Intl.Segmenter(void 0,{granularity:"word"})),Gy);let m=0;const y=[],w=[],k=[],A=[],v=[],x=[],E=[],S=[],M=[],_=[],N=[],D=[];for(const R of g.segment(a))for(const W of Yge(R.segment,(d=R.isWordLike)!=null&&d,R.index,c)){let z=function(){x[ie]!==null&&(w[ie]=[B_(y,x,E,ie)],x[ie]=null),w[ie].push(W.text),k[ie]=k[ie]||W.isWordLike,S[ie]=S[ie]||H,M[ie]=M[ie]||q,_[ie]=ee,N[ie]=ue,D[ie]=$_(M[ie],X)};const G=W.kind==="text",K=Uge(W.text,W.isWordLike,W.kind),H=Pl(W.text),q=N_(W.text),X=E1(W.text),ee=y8(W.text),ue=Kge(W.text),ie=m-1;u.carryCJKAfterClosingQuote&&G&&m>0&&A[ie]==="text"&&H&&S[ie]&&_[ie]||G&&m>0&&A[ie]==="text"&&Pge(W.text)&&S[ie]||G&&m>0&&A[ie]==="text"&&N[ie]?z():G&&m>0&&A[ie]==="text"&&W.isWordLike&&q&&D[ie]?(z(),k[ie]=!0):K!==null&&m>0&&A[ie]==="text"&&x[ie]===K?E[ie]=((f=E[ie])!=null?f:1)+1:G&&!W.isWordLike&&m>0&&A[ie]==="text"&&!S[ie]&&(Oge(W.text)||W.text==="-"&&k[ie])?z():(y[m]=W.text,w[m]=[W.text],k[m]=W.isWordLike,A[m]=W.kind,v[m]=W.start,x[m]=K,E[m]=K===null?0:1,S[m]=H,M[m]=q,_[m]=ee,N[m]=ue,D[m]=$_(q,X),m++)}for(let R=0;R<m;R++)x[R]===null?y[R]=Xr(w[R]):y[R]=B_(y,x,E,R);for(let R=1;R<m;R++)A[R]!=="text"||k[R]||!Pb(y[R])||A[R-1]!=="text"||S[R-1]||(y[R-1]+=y[R],k[R-1]=k[R-1]||k[R],y[R]="");const T=Array.from({length:m},()=>null);let $=-1;for(let R=m-1;R>=0;R--){const W=y[R];if(W.length!==0){if(A[R]==="text"&&!k[R]&&$>=0&&A[$]==="text"&&(jge(W)||W==="-"&&Wge(y[$]))){const z=(p=T[$])!=null?p:[];z.push(W),T[$]=z,v[$]=v[R],y[R]="";continue}$=R}}for(let R=0;R<m;R++){const W=T[R];W!=null&&(y[R]=Qge(W,y[R]))}let P=0;for(let R=0;R<m;R++){const W=y[R];W.length!==0&&(P!==R&&(y[P]=W,k[P]=k[R],A[P]=A[R],v[P]=v[R]),P++)}y.length=P,k.length=P,A.length=P,v.length=P;const O=(function(R){const W=R.texts.slice(),z=R.isWordLike.slice(),G=R.kinds.slice(),K=R.starts.slice();for(let H=0;H<W.length-1;H++){if(G[H]!=="text"||G[H+1]!=="text"||!Pl(W[H])||!Pl(W[H+1]))continue;const q=qge(W[H]);q!==null&&(W[H]=q.head,W[H+1]=q.tail+W[H+1],K[H+1]=K[H]+q.head.length)}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=[],z=[],G=[],K=[];let H=0;for(;H<R.len;){const q=R.texts[H],X=R.kinds[H],ee=R.isWordLike[H];if(X==="text"){const ue=[q];let ie=H+1,xe=ee;for(;ie<R.len&&R.kinds[ie]==="text"&&ome(R.texts[ie-1],R.isWordLike[ie-1],R.texts[ie],R.isWordLike[ie]);){const ce=R.texts[ie];ue.push(ce),xe=xe||R.isWordLike[ie],ie++}if(ie>H+1){W.push(Xr(ue)),z.push(xe),G.push("text"),K.push(R.starts[H]),H=ie;continue}}W.push(q),z.push(ee),G.push(X),K.push(R.starts[H]),H++}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=[],z=[],G=[],K=[];for(let H=0;H<R.len;H++){const q=R.texts[H];if(R.kinds[H]==="text"&&q.includes("-")){const X=q.split("-");let ee=X.length>1;for(let ue=0;ue<X.length;ue++){const ie=X[ue];if(!ee)break;ie.length!==0&&R_(ie)&&Wg(ie)||(ee=!1)}if(ee){let ue=0;for(let ie=0;ie<X.length;ie++){const xe=X[ie],ce=ie<X.length-1?`${xe}-`:xe;W.push(ce),z.push(!0),G.push("text"),K.push(R.starts[H]+ue),ue+=ce.length}continue}}W.push(q),z.push(R.isWordLike[H]),G.push(R.kinds[H]),K.push(R.starts[H])}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=[],z=[],G=[],K=[];for(let H=0;H<R.len;H++){const q=R.texts[H],X=R.kinds[H];if(X==="text"&&Wg(q)&&R_(q)){const ee=[q];let ue=H+1;for(;ue<R.len&&R.kinds[ue]==="text"&&Wg(R.texts[ue]);)ee.push(R.texts[ue]),ue++;W.push(Xr(ee)),z.push(!0),G.push("text"),K.push(R.starts[H]),H=ue-1;continue}W.push(q),z.push(R.isWordLike[H]),G.push(X),K.push(R.starts[H])}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=[],z=[],G=[],K=[];for(let H=0;H<R.len;H++){const q=R.texts[H];if(W.push(q),z.push(R.isWordLike[H]),G.push(R.kinds[H]),K.push(R.starts[H]),!eme(q))continue;const X=H+1;if(X>=R.len||Qy(R.kinds[X]))continue;const ee=[],ue=R.starts[X];let ie=X;for(;ie<R.len&&!Qy(R.kinds[ie]);)ee.push(R.texts[ie]),ie++;ee.length>0&&(W.push(Xr(ee)),z.push(!0),G.push("text"),K.push(ue),H=ie-1)}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=R.texts.slice(),z=R.isWordLike.slice(),G=R.kinds.slice(),K=R.starts.slice();for(let q=0;q<R.len;q++){if(G[q]!=="text"||!Xge(R,q))continue;const X=[W[q]];let ee=q+1;for(;ee<R.len&&!Qy(G[ee]);){X.push(W[ee]),z[q]=!0;const ue=W[ee].includes("?");if(G[ee]="text",W[ee]="",ee++,ue)break}W[q]=Xr(X)}let H=0;for(let q=0;q<W.length;q++){const X=W[q];X.length!==0&&(H!==q&&(W[H]=X,z[H]=z[q],G[H]=G[q],K[H]=K[q]),H++)}return W.length=H,z.length=H,G.length=H,K.length=H,{len:H,texts:W,isWordLike:z,kinds:G,starts:K}})((function(R){const W=[],z=[],G=[],K=[];let H=0;for(;H<R.len;){const q=[R.texts[H]];let X=R.isWordLike[H],ee=R.kinds[H],ue=R.starts[H];if(ee==="glue"){const ie=[q[0]],xe=ue;for(H++;H<R.len&&R.kinds[H]==="glue";)ie.push(R.texts[H]),H++;const ce=Xr(ie);if(!(H<R.len&&R.kinds[H]==="text")){W.push(ce),z.push(!1),G.push("glue"),K.push(xe);continue}q[0]=ce,q.push(R.texts[H]),X=R.isWordLike[H],ee="text",ue=xe,H++}else H++;if(ee==="text")for(;H<R.len&&R.kinds[H]==="glue";){const ie=[];for(;H<R.len&&R.kinds[H]==="glue";)ie.push(R.texts[H]),H++;const xe=Xr(ie);H<R.len&&R.kinds[H]==="text"?(q.push(xe,R.texts[H]),X=X||R.isWordLike[H],H++):q.push(xe)}W.push(Xr(q)),z.push(X),G.push(ee),K.push(ue)}return{len:W.length,texts:W,isWordLike:z,kinds:G,starts:K}})({len:P,texts:y,isWordLike:k,kinds:A,starts:v})))))));for(let R=0;R<O.len-1;R++){const W=Vge(O.texts[R]);W!==null&&(O.kinds[R]!=="space"&&O.kinds[R]!=="preserved-space"||O.kinds[R+1]!=="text"||!N_(O.texts[R+1])||(O.texts[R]=W.space,O.isWordLike[R]=!1,O.kinds[R]=O.kinds[R]==="preserved-space"?"preserved-space":"space",O.texts[R+1]=W.marks+O.texts[R+1],O.starts[R+1]=O.starts[R]+W.space.length))}return O})(o,t,s),l=i==="keep-all"?(function(a,u,c){if(u.len<=1)return u;const d=[],f=[],p=[],g=[];let m=-1,y=!1;function w(A){d.push(u.texts[A]),f.push(u.isWordLike[A]),p.push("text"),g.push(u.starts[A])}function k(A){if(!(m<0)){if(y)m+1===A?w(m):(function(v,x){let E=!1;for(let _=v;_<x;_++)E=E||u.isWordLike[_];const S=u.starts[v],M=x<u.len?u.starts[x]:a.length;d.push(a.slice(S,M)),f.push(E),p.push("text"),g.push(S)})(m,A);else for(let v=m;v<A;v++)w(v);m=-1,y=!1}}for(let A=0;A<u.len;A++){const v=u.texts[A],x=u.kinds[A];x!=="text"?(k(A),d.push(v),f.push(u.isWordLike[A]),p.push(x),g.push(u.starts[A])):(m>=0&&!LB(u.texts[A-1],c)&&k(A),m<0&&(m=A),y=y||Pl(v))}return k(u.len),{len:d.length,texts:d,isWordLike:f,kinds:p,starts:g}})(o,r,t.breakKeepAllAfterPunctuation):r;return At({normalized:o,chunks:rme(l,s)},l)}let Fd=null;const z_=new Map;let Bd=null;const ame=new RegExp("\\p{Emoji_Presentation}","u"),ume=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let Yy=null;const O_=new Map;function b8(){if(Fd!==null)return Fd;if(typeof OffscreenCanvas<"u")return Fd=new OffscreenCanvas(1,1).getContext("2d"),Fd;if(typeof document<"u")return Fd=document.createElement("canvas").getContext("2d"),Fd;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Za(e,t){let n=t.get(e);return n===void 0&&(n={width:b8().measureText(e).width,containsCJK:Pl(e)},t.set(e,n)),n}function i2(){if(Bd!==null)return Bd;if(typeof navigator>"u")return Bd={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Bd;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Bd={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Bd}function FB(){return Yy===null&&(Yy=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Yy}function cme(e){return ame.test(e)||e.includes("️")}function dc(e,t,n){return n===0?t.width:t.width-(function(i,s){return s.emojiCount===void 0&&(s.emojiCount=(function(o){let r=0;const l=FB();for(const a of l.segment(o))cme(a.segment)&&r++;return r})(i)),s.emojiCount})(e,t)*n}function dme(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function P_(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function j_(e,t,n=e.widths.length){for(;t<n&&dme(e.kinds[t]);)t++;return t}function fme(e,t){if(t<=0)return 0;const n=e%t;return Math.abs(n)<=1e-6?t:t-n}function hme(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function jb(e,t){return t===0?0:e+t}function pme(e,t,n,i,s){return jb(i,t==="tab"?s+(function(o,r){return o.letterSpacing!==0&&o.spacingGraphemeCounts[r]>0?o.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function H_(e,t,n,i){return jb(i,t==="tab"?0:e.lineEndFitAdvances[n])}function W_(e,t,n,i,s){return jb(i,t==="tab"?s:e.lineEndPaintAdvances[n])}function gme(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function mme(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function tg(e,t,n){let i=t;for(;i<e.length&&e[i]<n;)i++;return i}function vme(e,t){return(function(n,i){if(n.simpleLineWalkFastPath)return(function(T,$){const{widths:P,kinds:O,breakableFitAdvances:R,breakablePreferredBreaks:W}=T;if(P.length===0)return 0;const z=$+i2().lineFitEpsilon;let G=0,K=0,H=!1,q=0,X=0,ee=-1,ue=0;function ie(ye=q,j=X,Y=K){G++,K=0,H=!1,ee=-1,ue=0}function xe(ye,j){H=!0,q=ye+1,X=0,K=j}function ce(ye,j,Y){H=!0,q=ye,X=j+1,K=Y}function pe(ye,j){H?(K+=j,q=ye+1,X=0):xe(ye,j)}function Ne(ye,j){var Y;const ve=R[ye],re=(Y=W[ye])!=null?Y:null;let se=re===null?-1:tg(re,0,j+1),U=-1,J=0,de=j;for(;de<ve.length;){const me=ve[de];if(H)if(K+me>z){if(re!==null&&U>j){ie(ye,U,J),de=U,se=tg(re,se,de+1),U=-1,J=0;continue}ie(),ce(ye,de,me)}else K+=me,q=ye,X=de+1;else ce(ye,de,me);const Ie=de+1;re!==null&&re[se]===Ie&&(U=Ie,J=K,se++),de++}H&&q===ye&&X===ve.length&&(q=ye+1,X=0)}let te=0;for(;te<P.length&&(H||(te=j_(T,te),!(te>=P.length)));){const ye=P[te],j=P_(O[te]);if(H)if(K+ye>z){if(j){pe(te,ye),ie(te+1,0,K-ye),te++;continue}if(ee>=0){if(q>ee||q===ee&&X>0){ie();continue}ie(ee,0,ue);continue}if(ye>z&&R[te]!==null){ie(),Ne(te,0),te++;continue}ie()}else pe(te,ye),j&&(ee=te+1,ue=K-ye),te++;else ye>z&&R[te]!==null?Ne(te,0):xe(te,ye),j&&(ee=te+1,ue=K-ye),te++}return H&&ie(),G})(n,i);const{widths:s,kinds:o,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:u}=n;if(s.length===0||u.length===0)return 0;const c=i2(),d=i+c.lineFitEpsilon;let f=0,p=0,g=!1,m=0,y=0,w=-1,k=0,A=null;function v(){w=-1,k=0,A=null}function x(T=m,$=y,P){f++,p=0,g=!1,v()}function E(T,$){g=!0,m=T+1,y=0,p=$}function S(T,$,P){g=!0,m=T,y=$+1,p=P}function M(T,$){g?(p+=$,m=T+1,y=0):E(T,$)}function _(T,$,P,O,R,W){if(!$)return;const z=H_(n,T,P,R);W_(n,T,P,R,O),w=P+1,k=p-W+z,A=T}function N(T,$){var P;const O=r[T],R=(P=l[T])!=null?P:null;let W=R===null?-1:tg(R,0,$+1),z=-1,G=$;for(;G<O.length;){const K=O[G];if(g){const q=gme(n,!0,K),X=p+q;if(mme(n,X)>d){if(R!==null&&z>$){x(T,z),G=z,W=tg(R,W,G+1),z=-1;continue}x(),S(T,G,K)}else p=X,m=T,y=G+1}else S(T,G,K);const H=G+1;R!==null&&R[W]===H&&(z=H,W++),G++}g&&m===T&&y===O.length&&(m=T+1,y=0)}function D(T){f++,v()}for(let T=0;T<u.length;T++){const $=u[T];if($.startSegmentIndex===$.endSegmentIndex){D();continue}g=!1,p=0,$.startSegmentIndex,m=$.startSegmentIndex,y=0,v();let P=$.startSegmentIndex;for(;P<$.endSegmentIndex&&(g||(P=j_(n,P,$.endSegmentIndex),!(P>=$.endSegmentIndex)));){const O=o[P],R=P_(O),W=hme(n,g,P),z=O==="tab"?fme(p+W,n.tabStopAdvance):s[P],G=W+z,K=pme(n,O,P,W,z);if(O!=="soft-hyphen")if(g){if(p+K>d){const H=p+H_(n,O,P,W);if(W_(n,O,P,W,z),A==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&k<=d){x(w,0);continue}if(R&&H<=d){M(P,G),x(P+1,0),P++;continue}if(w>=0&&k<=d){if(m>w||m===w&&y>0){x();continue}const q=w;x(q,0),P=q;continue}if(K>d&&r[P]!==null){x(),N(P,0),P++;continue}x();continue}M(P,G),_(O,R,P,z,W,G),P++}else K>d&&r[P]!==null?N(P,0):E(P,z),_(O,R,P,z,W,G),P++;else g&&(m=P+1,y=0,w=P+1,k=p+a,A=O),P++}g&&($.consumedEndSegmentIndex,x($.consumedEndSegmentIndex,0))}return f})(e,t)}let Jy=null;function Hb(){return Jy===null&&(Jy=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Jy}function yme(e,t){const n=[];let i=[],s=0,o=!1,r=!1,l=!1;function a(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:s}),i=[],o=!1,r=!1,l=!1)}function u(d,f,p){i=[d],s=f,o=p,r=y8(d),l=Iv.has(d)}function c(d,f){i.push(d),o=o||f;const p=y8(d);r=d.length===1&&Qc.has(d)&&r||p,l=!1}for(const d of Hb().segment(e)){const f=d.segment,p=Pl(f);i.length!==0?l||zb.has(f)||Qc.has(f)||t.carryCJKAfterClosingQuote&&p&&r?c(f,p):o||p?(a(),u(f,d.index,p)):c(f,p):u(f,d.index,p)}return a(),n}function bme(e,t,n){if(t.length<=1)return t;const i=[];let s=-1,o=!1;function r(l){if(!(s<0)){if(o)s+1===l?i.push(t[s]):(function(a,u){const c=t[a].start,d=u<t.length?t[u].start:e.length;i.push({text:e.slice(c,d),start:c})})(s,l);else for(let a=s;a<l;a++)i.push(t[a]);s=-1,o=!1}}for(let l=0;l<t.length;l++){const a=t[l];s>=0&&!LB(t[l-1].text,n)&&r(l),s<0&&(s=l),o=o||Pl(a.text)}return r(t.length),i}function q_(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const i=Hb();for(const s of i.segment(e))n++;return n}function kme(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function Ame(e,t,n,i,s){const o=i2(),{cache:r,emojiCorrection:l}=(function(D,T){b8().font=D;const $=(function(R){let W=z_.get(R);return W||(W=new Map,z_.set(R,W)),W})(D),P=(function(R){const W=R.match(/(\d+(?:\.\d+)?)\s*px/);return W?parseFloat(W[1]):16})(D),O=T?(function(R,W){let z=O_.get(R);if(z!==void 0)return z;const G=b8();G.font=R;const K=G.measureText("😀").width;if(z=0,K>W+.5&&typeof document<"u"&&document.body!==null){const H=document.createElement("span");H.style.font=R,H.style.display="inline-block",H.style.visibility="hidden",H.style.position="absolute",H.textContent="😀",document.body.appendChild(H);const q=H.getBoundingClientRect().width;document.body.removeChild(H),K-q>.5&&(z=K-q)}return O_.set(R,z),z})(D,P):0;return{cache:$,fontSize:P,emojiCorrection:O}})(t,(a=e.normalized,ume.test(a)));var a;const u=dc("-",Za("-",r),l)+(s===0?0:2*s),c=8*dc(" ",Za(" ",r),l),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],p=[],g=[],m=[];let y=e.chunks.length<=1&&!d;const w=null,k=[],A=[],v=[],x=null,E=Array.from({length:e.len});function S(D,T,$,P,O,R,W,z,G){O!=="text"&&O!=="space"&&O!=="zero-width-break"&&(y=!1),f.push(T),p.push($),g.push(P),m.push(O),k.push(W),A.push(z),d&&v.push(G)}function M(D,T,$,P,O){const R=Za(D,r),W=d?q_(D,T):0,z=(function(q,X,ee){return X>1?q+(X-1)*ee:q})(dc(D,R,l),W,s),G=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:z,K=G===0?0:G+(W>0?s:0),H=T==="space"||T==="zero-width-break"?0:z;if(O&&P&&D.length>1){let q="sum-graphemes";s!==0?q="segment-prefixes":Wg(D)?q="pair-context":o.preferPrefixWidthsForBreakableRuns&&(q="segment-prefixes");const X=(function(ue,ie,xe,ce,pe){if(ie.breakableFitAdvances!==void 0&&ie.breakableFitMode===pe)return ie.breakableFitAdvances;ie.breakableFitMode=pe;const Ne=FB(),te=[];for(const ve of Ne.segment(ue))te.push(ve.segment);if(te.length<=1)return ie.breakableFitAdvances=null,ie.breakableFitAdvances;if(pe==="sum-graphemes"){const ve=[];for(const re of te){const se=Za(re,xe);ve.push(dc(re,se,ce))}return ie.breakableFitAdvances=ve,ie.breakableFitAdvances}if(pe==="pair-context"||te.length>96){const ve=[];let re=null,se=0;for(const U of te){const J=dc(U,Za(U,xe),ce);if(re===null)ve.push(J);else{const de=re+U,me=Za(de,xe);ve.push(dc(de,me,ce)-se)}re=U,se=J}return ie.breakableFitAdvances=ve,ie.breakableFitAdvances}const ye=[];let j="",Y=0;for(const ve of te){j+=ve;const re=dc(j,Za(j,xe),ce);ye.push(re-Y),Y=re}return ie.breakableFitAdvances=ye,ie.breakableFitAdvances})(D,R,r,l,q),ee=X===null||i==="keep-all"?null:(function(ue){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(ue))return null;const ie=[];let xe=0;for(const ce of Hb().segment(ue))xe++,kme(ce.segment)&&ie.push(xe);return ie.length===0?null:ie})(D);return void S(D,z,K,H,T,$,X,ee,W)}S(D,z,K,H,T,$,null,null,W)}for(let D=0;D<e.len;D++){E[D]=f.length;const T=e.texts[D],$=e.isWordLike[D],P=e.kinds[D],O=e.starts[D];if(P==="soft-hyphen"){S(T,0,u,u,P,O,null,null,0);continue}if(P==="hard-break"){S(T,0,0,0,P,O,null,null,0);continue}if(P==="tab"){S(T,0,0,0,P,O,null,null,d?q_(T,P):0);continue}const R=Za(T,r);if(P==="text"&&R.containsCJK){const W=yme(T,o),z=i==="keep-all"?bme(T,W,o.breakKeepAllAfterPunctuation):W;for(let G=0;G<z.length;G++){const K=z[G];M(K.text,"text",O+K.start,$,i==="keep-all"||!Pl(K.text))}continue}M(T,P,O,$,!0)}const _=(function(D,T,$){const P=[];for(let O=0;O<D.length;O++){const R=D[O],W=R.startSegmentIndex<T.length?T[R.startSegmentIndex]:$,z=R.endSegmentIndex<T.length?T[R.endSegmentIndex]:$,G=R.consumedEndSegmentIndex<T.length?T[R.consumedEndSegmentIndex]:$;P.push({startSegmentIndex:W,endSegmentIndex:z,consumedEndSegmentIndex:G})}return P})(e.chunks,E,f.length),N=w===null?null:(function(D,T){const $=(function(O){const R=O.length;if(R===0)return null;const W=new Array(R);let z=!1;for(let ee=0;ee<R;){const ue=O.charCodeAt(ee);let ie=ue,xe=1;if(ue>=55296&&ue<=56319&&ee+1<R){const pe=O.charCodeAt(ee+1);pe>=56320&&pe<=57343&&(ie=pe-56320+(ue-55296<<10)+65536,xe=2)}const ce=Tge(ie);ce!=="R"&&ce!=="AL"&&ce!=="AN"||(z=!0);for(let pe=0;pe<xe;pe++)W[ee+pe]=ce;ee+=xe}if(!z)return null;let G=0;for(let ee=0;ee<R;ee++){const ue=W[ee];if(ue==="L"){G=0;break}if(ue==="R"||ue==="AL"){G=1;break}}const K=new Int8Array(R);for(let ee=0;ee<R;ee++)K[ee]=G;const H=1&G?"R":"L",q=H;let X=q;for(let ee=0;ee<R;ee++)W[ee]==="NSM"?W[ee]=X:X=W[ee];X=q;for(let ee=0;ee<R;ee++){const ue=W[ee];ue==="EN"?W[ee]=X==="AL"?"AN":"EN":ue!=="R"&&ue!=="L"&&ue!=="AL"||(X=ue)}for(let ee=0;ee<R;ee++)W[ee]==="AL"&&(W[ee]="R");for(let ee=1;ee<R-1;ee++)W[ee]==="ES"&&W[ee-1]==="EN"&&W[ee+1]==="EN"&&(W[ee]="EN"),W[ee]!=="CS"||W[ee-1]!=="EN"&&W[ee-1]!=="AN"||W[ee+1]!==W[ee-1]||(W[ee]=W[ee-1]);for(let ee=0;ee<R;ee++){if(W[ee]!=="EN")continue;let ue;for(ue=ee-1;ue>=0&&W[ue]==="ET";ue--)W[ue]="EN";for(ue=ee+1;ue<R&&W[ue]==="ET";ue++)W[ue]="EN"}for(let ee=0;ee<R;ee++){const ue=W[ee];ue!=="WS"&&ue!=="ES"&&ue!=="ET"&&ue!=="CS"||(W[ee]="ON")}X=q;for(let ee=0;ee<R;ee++){const ue=W[ee];ue==="EN"?W[ee]=X==="L"?"L":"EN":ue!=="R"&&ue!=="L"||(X=ue)}for(let ee=0;ee<R;ee++){if(W[ee]!=="ON")continue;let ue=ee+1;for(;ue<R&&W[ue]==="ON";)ue++;const ie=(ee>0?W[ee-1]:q)!=="L"?"R":"L";if(ie===((ue<R?W[ue]:q)!=="L"?"R":"L"))for(let xe=ee;xe<ue;xe++)W[xe]=ie;ee=ue-1}for(let ee=0;ee<R;ee++)W[ee]==="ON"&&(W[ee]=H);for(let ee=0;ee<R;ee++){const ue=W[ee];1&K[ee]?ue!=="L"&&ue!=="AN"&&ue!=="EN"||K[ee]++:ue==="R"?K[ee]++:ue!=="AN"&&ue!=="EN"||(K[ee]+=2)}return K})(D);if($===null)return null;const P=new Int8Array(T.length);for(let O=0;O<T.length;O++)P[O]=$[T[O]];return P})(e.normalized,w);return x!==null?{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:u,tabStopAdvance:c,chunks:_,segments:x}:{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:u,tabStopAdvance:c,chunks:_}}const Xy="__MARKSTREAM_VUE_HEIGHT_ESTIMATION_EXPERIMENT__",Cme=["diff ","index ","--- ","+++ ","@@ "],_s=(()=>{const e=globalThis;if(e[Xy])return e[Xy];const t={configs:{},controllers:{},revision:vl(0),preparedCache:new Map,blockEstimateCache:new Map};return e[Xy]=t,t})();let Th=null;const e4=_s.revision;function U_(e){var t;return e&&(t=_s.configs[e])!=null?t:null}function K_(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function wme(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function t4(e){var t,n,i;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const o of e){if(!wme(o))return null;o.type==="text"?s+=String((t=o.content)!=null?t:""):o.type==="emoji"?s+=String((i=(n=o.name)!=null?n:o.raw)!=null?i:""):o.type==="hardbreak"&&(s+=` -`)}return s.length>0?s:null}function n4(e,t,n){var i,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var o;if(Th!=null)return Th;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return Th=!!((o=r.getContext)!=null&&o.call(r,"2d")),Th}catch{return Th=!1,!1}})())return null;try{const o=Math.round(100*t)/100,r=[(i=n.whiteSpace)!=null?i:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,o,e].join("\0"),l=_s.blockEstimateCache.get(r);if(l)return _s.blockEstimateCache.delete(r),_s.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",u=(function(p,g,m){const y=`${m}\0${g}\0${p}`,w=_s.preparedCache.get(y);if(w)return _s.preparedCache.delete(y),_s.preparedCache.set(y,w),w.prepared;const k=(function(A,v,x){return(function(E,S,M,_){var N,D;const T=(N=_?.wordBreak)!=null?N:"normal",$=(D=_?.letterSpacing)!=null?D:0;return Ame(lme(E,i2(),_?.whiteSpace,T),S,!1,T,$)})(A,v,0,x)})(p,g,{whiteSpace:m});for(_s.preparedCache.set(y,{prepared:k});_s.preparedCache.size>240;){const A=_s.preparedCache.keys().next().value;if(!A)break;_s.preparedCache.delete(A)}return k})(e,n.font,a),c=(function(p,g,m){const y=vme(p,g);return{lineCount:y,height:y*m}})(u,Math.max(24,o-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,c.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(_s.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});_s.blockEstimateCache.size>4e3;){const p=_s.blockEstimateCache.keys().next().value;if(!p)break;_s.blockEstimateCache.delete(p)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function BB(e,t,n){var i,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const o=t4(e.children);return o&&n.paragraph?n4(o,t,n.paragraph):null}if(e.type==="heading"){const o=Number(e.level||0),r=t4(e.children),l=n.headings[o];return r&&l?n4(r,t,l):null}if(e.type==="list_item"){const o=Array.isArray(e.children)?e.children:[];if(o.length!==1||((i=o[0])==null?void 0:i.type)!=="paragraph"||!n.listItem)return null;const r=t4((s=o[0])==null?void 0:s.children);return r?n4(r,t,n.listItem):null}if(e.type==="list"){const o=Array.isArray(e.items)?e.items:[];if(!o.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of o){const a=BB(l,t,n);if(!a)return null;r+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(r)),contentHeight:Math.max(1,Math.round(r))}}return null}function Lh(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function fc(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function i4(e,t,n=0){return e.diff?Db(t??{},n)?(function(i){const s=fc(i.raw);if(s){const o=s.split(/\r?\n/);return i.originalCode!=null||i.updatedCode!=null?Math.max(1,o.filter(r=>!Cme.some(l=>r.startsWith(l))).length):Math.max(1,o.length)}return Lh(fc(i.originalCode))+Lh(fc(i.updatedCode))})(e):(function(i){const s=i.originalCode,o=i.updatedCode;if(s!=null||o!=null)return Math.max(Lh(fc(s)),Lh(fc(o)));const r=fc(i.code).split(/\r?\n/);let l=0,a=0;for(const u of r)u.startsWith("+")&&!u.startsWith("+++")?a++:u.startsWith("-")&&!u.startsWith("---")?l++:(l++,a++);return Math.max(1,l,a)})(e):Lh(fc(e.code,e.loading===!0))}function xme(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function s4(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const i=window.getComputedStyle(t),s=e.offsetHeight,o=K_(i.lineHeight,1.5*K_(i.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:xme(i),lineHeight:o,wrapperOverhead:Math.max(0,s-o),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const _me=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function V_(e,t={}){var n;const i={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return i;const o=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(o))_me.has(r)||s.has(r)||l.enumerable&&"value"in l&&(i[r]=l.value);return i}function Z_(e,t,n,i){var s;const o=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),r=(function(f,p){return Number.isFinite(f)?Math.min(Math.max(0,f),p):0})(n,o);if(!i.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,o-r),a=[-l,l];let u=a[0],c=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const p=i.getNormalizedScrollTop(e,t,!1),g=Math.abs(p-r);g<c&&(c=g,u=f)}e.scrollTop=u;const d=(s=i.epsilonPx)!=null?s:2;Math.abs(i.getNormalizedScrollTop(e,t,!1)-r)>d&&(e.scrollTop=u)}function G_(e,t){let n=0,i=null,s=null;const o=()=>{const r=s;s=null,i=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(i&&(clearTimeout(i),i=null),n=l,s=null,e(...r)):i||(i=setTimeout(o,a))}}function Q_(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const $B=Symbol("MarkstreamMathBlockMinHeightCache");function LYe(){return an($B,null)}const Sme=new Set(["text","inline_code","emoji","footnote_reference"]),Mme=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function Nh(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function hc(e,t,n,i=22){const s=String(e??"");if(!s)return n;const o=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/o),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*i+12))}function DB(e){var t;if(!e||typeof e!="object")return!1;const n=e,i=String((t=n.type)!=null?t:"");if(Sme.has(i))return!0;if(!Mme.has(i))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(DB)}function k8(e){var t,n,i,s,o,r,l,a;if(!e||typeof e!="object")return"";const u=e,c=String((t=u.type)!=null?t:"");if(c==="text")return String((i=(n=u.content)!=null?n:u.raw)!=null?i:"");if(c==="inline_code")return String((r=(o=(s=u.code)!=null?s:u.content)!=null?o:u.raw)!=null?r:"");if(c==="emoji")return String((a=(l=u.name)!=null?l:u.raw)!=null?a:"");if(typeof u.text=="string")return u.text;const d=[];for(const f of["children","items","cells","rows"]){const p=u[f];if(Array.isArray(p)){const g=p.map(k8).filter(Boolean).join(" ");g&&d.push(g)}}return d.join(" ").replace(/\s+/g," ").trim()}function RB(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const i=t[n];return Array.isArray(i)&&i.some(RB)})}function Ime(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),i=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),o=Math.max(1,i,s);return 30+26*Math.max(0,o-1)}function Eme(e,t){var n,i,s,o,r,l,a,u,c,d,f,p,g,m;if(!e||typeof e!="object")return 32;const y=e,w=String((n=y.type)!=null?n:""),k=Number.isFinite(t)&&t>0?t:640;switch(w){case"heading":return(function(A){var v;const x=Number((v=A.level)!=null?v:A.depth);return x>=4?20:x===3?30:x===2?32:44})(y);case"paragraph":return(function(A,v){const x=String(A??"");if(!x)return 28;const E=Math.max(18,Math.floor(Math.max(320,v)/8)),S=x.split(/\r?\n/).length,M=Math.ceil(x.length/E);return Math.max(1,S,M)<=1?28:hc(x,v,34)})(String((s=(i=y.raw)!=null?i:y.content)!=null?s:""),k);case"list":return(function(A,v){var x;const E=Array.isArray(A.items)?A.items:[];if(!E.length)return 48;const S=Math.max(48,30*E.length+12);let M=12;for(const D of E)M+=Ime(k8(D)||String((x=D.raw)!=null?x:""),v);const _=Math.max(0,M-S);if(E.length>20){const D=Math.round(2.4*E.length);return Math.round(S+Math.max(D,Math.min(_,3*E.length)))}if(_<=0)return S;const N=E.length>8?8*E.length:_;return Math.round(S+Math.min(_,N))})(y,k);case"list_item":return hc(String((r=(o=y.raw)!=null?o:y.content)!=null?r:""),k,34);case"blockquote":return hc(String((a=(l=y.raw)!=null?l:y.content)!=null?a:""),k,56);case"table":return(function(A,v){const x=[...A.header?[A.header]:[],...Array.isArray(A.rows)?A.rows:[]];if(!x.length){const E=Array.isArray(A.children)?A.children.length:3;return Math.max(120,38*E+48)}return Math.max(120,Math.round(4+x.reduce((E,S)=>E+(function(M,_){const N=Math.max(1,M.length),D=Math.max(80,(_-32)/N),T=Math.max(10,Math.floor(D/8)),$=Math.max(1,...M.map(P=>{var O;const R=k8(P)||String((O=P?.raw)!=null?O:"");return Math.ceil(R.length/T)||1}));return 54+34*Math.max(0,$-1)+(N<=3&&M.some(RB)?14:0)})((function(M){var _;return Array.isArray(M?.cells)&&(_=M.cells)!=null?_:[]})(S),v),0)))})(y,k);case"code_block":{const A=String((u=y.language)!=null?u:"").trim().toLowerCase(),v=String((d=(c=y.code)!=null?c:y.raw)!=null?d:"");return A==="mermaid"?Gm(Vm(v)):A==="infographic"?Qm(Zm(v)):hc(v,k,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(A,v){var x,E,S;const M=A.match(/^\s*<details\b([^>]*)>/i);return M&&!/(?:^|\s)open(?:\s|=|$)/i.test((x=M[1])!=null?x:"")?hc(((S=(E=A.match(/<summary\b[^>]*>([\s\S]*?)<\/summary>/i))==null?void 0:E[1])==null?void 0:S.replace(/<[^>]*>/g,"").trim())||"Details",v,28,28):hc(A,v,96)})(String((p=(f=y.raw)!=null?f:y.content)!=null?p:""),k);case"thematic_break":return 24;default:return hc(String((m=(g=y.raw)!=null?g:y.content)!=null?m:""),k,40)}}function Y_(e,t,n){return Math.min(Math.max(e,t),n)}const Tme=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],Lme=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","safeMarkdownMs","tokenizeMs","htmlBlockPassesMs","parseMarkdownToStructureTotalMs"],Nme=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),zB=["raw","content","code","originalCode","updatedCode"],J_=new WeakMap,X_=new WeakMap;let Fme=1;function Jr(){return typeof performance<"u"?performance.now():Date.now()}function eS(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function vr(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=J_.get(t);return n||(n=Fme++,J_.set(t,n)),String(n)}function tS(e,t,n,i={}){var s,o;const r=i.includeFinal!==!1,l={md:vr(t),customMarkdownIt:vr(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(o=e.streamParse)!=null?o:"auto",validateLink:vr(e.validateLink),preTransformTokens:vr(e.preTransformTokens),postTransformTokens:vr(e.postTransformTokens),postTransformNodes:vr(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function nS(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` -`,t-1)+1;return e.slice(n,t).trim()}function iS(e){const t=OB(e);return t.length>=2&&t.every(n=>{const i=n.trim();return i.length>=1&&i.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function OB(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function PB(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Wb(e){const t=String(e??"");return`${t.length}:${PB(t)}`}function A8(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(r){return r.length<=8192?Wb(r):`${r.length}:${PB(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${vr(e)}`;if(typeof e!="object")return typeof e;const i=e,s=t.get(i);if(s)return`cycle:${s}`;if(n>=6)return`object:${vr(i)}`;const o=vr(i);if(t.set(i,o),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>A8(l,t,n+1)).join(",")}`}if(typeof e=="object"){const r=e,l=Object.keys(r).sort(),a=l.slice(0,80);return`o:${l.length}:${a.sort().map(u=>`${u}:${A8(r[u],t,n+1)}`).join(";")}`}return typeof e}function s2(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function jB(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(i=>s2(i)?Tu(i,t,n+1):jB(i,t,n+1)).join(",")}`:s2(e)?Tu(e,t,n):A8(e,t,n)}function Bme(e,t,n){return Object.keys(e).sort().filter(i=>i!=="children"&&!zB.includes(i)).map(i=>{const s=e[i];return typeof s=="string"?`${i}=s:${Wb(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${i}=${String(s)}`:typeof s=="function"?`${i}=fn:${vr(s)}`:Nme.has(i)&&(Array.isArray(s)||typeof s=="object")?`${i}=${jB(s,t,n+1)}`:s&&typeof s=="object"?`${i}=object:${vr(s)}`:""}).filter(Boolean).join(";")}function $me(e){return zB.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${Wb(n)}`:""}).filter(Boolean).join(";")}function Tu(e,t=new WeakMap,n=0){const i=X_.get(e);if(i)return i;const s=e,o=t.get(s);if(o)return`node-cycle:${o}`;if(n>=6)return`node:${e.type}:${vr(s)}`;const r=vr(s);t.set(s,r);const l=(function(a,u,c){const d=a,f=Array.isArray(d.children)?d.children:[],p=f.length?f.slice(0,200).map(g=>Tu(g,u,c+1)).join("|"):"";return[a.type,$me(d),Bme(d,u,c),f.length,p].join(":")})(e,t,n);return X_.set(s,l),l}function HB(e,t){return Tu(e)===Tu(t)}function qb(e,t,n){const i=Jr(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=Jr()-i,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function sS(e,t,n){return qb(t,n,()=>Tu(e))}function WB(e,t,n){return sS(e,n,"stabilizeSignatureMs")===sS(t,n,"stabilizeSignatureMs")}function ng(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function oS(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function rS(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function Dme(e,t){return e.length===t.length&&e===t}function Ub(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const i=e,s=t,o=Object.keys(i).filter(c=>c!=="type"&&c!=="children").sort(),r=Object.keys(s).filter(c=>c!=="type"&&c!=="children").sort();if(o.length!==r.length)return!1;for(let c=0;c<o.length;c++){const d=o[c];if(d!==r[c])return!1;const f=i[d],p=s[d];if(typeof f!=typeof p)return!1;if(typeof f!="string"){if(typeof f!="number"&&typeof f!="boolean"&&f!=null)return null;if(!Object.is(f,p))return!1}else if(typeof p!="string"||!Dme(f,p))return!1}const l=Object.prototype.hasOwnProperty.call(i,"children");if(l!==Object.prototype.hasOwnProperty.call(s,"children"))return!1;if(!l)return!0;const a=i.children,u=s.children;if(!Array.isArray(a)||!Array.isArray(u))return null;if(a.length!==u.length)return!1;for(let c=0;c<a.length;c++){const d=a[c],f=u[c];if(!s2(d)||!s2(f))return null;const p=Ub(d,f,n+1);if(p==null)return null;if(!p)return!1}return!0}function Rme(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.type!==t.type)return!1;const n=Ub(e,t);return n??HB(e,t)}function zme(e,t,n){if(!e||!t)return!1;if(e===t)return!0;if(e.type!==t.type)return!1;let i=null;return qb(n,"stabilizeSignatureMs",()=>{i=Ub(e,t)}),i??WB(e,t,n)}function Ome(e,t){const n={};for(const i of Tme){const s=e[i],o=t?.[i];typeof s=="number"&&(n[i]=s-(typeof o=="number"?o:0))}return n}function Pme(e,t){var n;const i=i_(t.instanceMsgId),s=new Map,o=(n=t.smoothStreamingEnabled)!=null?n:F(()=>!1),r=Z(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let P="",O=0,R=!1,W=!1,z=!1,G=!1;function K(){P="",O=0,R=!1,W=!1,z=!1,G=!1}function H(q){let X=!1;for(let ee=0;ee<q.length;ee++){const ue=q.charCodeAt(ee);if(ue===10||ue===13){const xe=ue===10&&G;G=ue===13,R=!1,xe||(z||(W=!1,O=0),z=!1);continue}G=!1;const ie=ue===9||ue===32;if(ie||(z=!0,W&&(X=!0)),O)if(O!==1)ie||(ue!==58?O=ue===91?1:0:(X=!0,W=!0));else{if(R){R=!1;continue}if(ue===92){R=!0;continue}ue===93&&(O=2)}else ue===91&&(O=1)}return X}return(q,X)=>{if(!q||!X.startsWith(q)||X.length<=q.length)return K(),[!0,0];let ee=0;P!==q&&(K(),H(q),ee=q.length);const ue=X.slice(q.length),ie=H(ue);return P=X,[ie,ee+ue.length]}})();let p,g=0,m=0,y=Jr(),w=-1,k=0;function A(P){w=Number.isInteger(P)?P:0,k+=1}function v(){p&&(clearTimeout(p),p=void 0)}function x(){v();const P=t.renderContent.value;r.value!==P&&(r.value=P),y=Jr()}Qe([t.renderContent,t.effectiveFinal,o],([P,O,R])=>{r.value!==P&&(!R||O||(function(W,z){if(!W&&z||z.length<=80||z.length<W.length||!z.startsWith(W))return!0;const G=z.slice(W.length);return!!G&&(!!iS(nS(z))||!(!G.includes(` - -`)&&!/(?:^|\n)(?:#{1,6}\s|[-+*]\s+|\d+[.)]\s+|>\s*|`{3,}|~{3,})/.test(G))||G.endsWith(` -`)&&!(function(K){const H=nS(K);if(iS(H))return!1;const q=OB(H);return q.length>=2&&q.some(X=>X.trim())})(z))})(r.value,P)?x():(function(){if(m+=1,p)return;const W=Math.max(0,(function(z){const G=z.parseCoalesceMs;return typeof G=="number"&&Number.isFinite(G)&&G>=0?G:80})(e)-(Jr()-y));W<=0?x():p=setTimeout(x,W)})())},{flush:"sync",immediate:!0}),Rf(v);const E=F(()=>{var P,O,R,W;return Oue(e.customHtmlTags,(P=e.parseOptions)==null?void 0:P.customHtmlTags,(W=(R=(O=t.customComponentsMap)==null?void 0:O.value)!=null?R:{},Object.entries(W).map(([z,G])=>{const K=Ur(z);return G==null||!K||Lp(K)||ZN.has(K)||Sp.has(K)?"":K}).filter(Boolean)))}),S=F(()=>{const{key:P,tags:O}=Pue(E.value);if(!P)return i;const R=s.get(P);if(R)return R;const W=i_(t.instanceMsgId,{customHtmlTags:O});return s.set(P,W),W}),M=F(()=>{const P=S.value;if(!e.customMarkdownIt)return P;const O=e.customMarkdownIt(P);return P.__markstreamHasCustomParserExtensions=!0,O.__markstreamHasCustomParserExtensions=!0,O}),_=F(()=>{var P,O;const R=(P=e.parseOptions)!=null?P:{},W=t.effectiveFinal.value,z=E.value,G=W!=null,K=z.length>0;return G||K||R.streamParse==null?At(At(dn(At({},R),{streamParse:(O=R.streamParse)==null||O}),G?{final:W}:{}),K?{customHtmlTags:z}:{}):R}),N=F(()=>{var P;return new Set(((P=_.value.customHtmlTags)!=null?P:[]).map(O=>String(O).trim().toLowerCase()).filter(Boolean))}),D=F(()=>tS(_.value,M.value,e.customMarkdownIt,{includeFinal:!0})),T=F(()=>tS(_.value,M.value,e.customMarkdownIt,{includeFinal:!1}));Qe([D,T],([P,O],[R,W])=>{R&&(P===R&&O===W||(x(),O!==W&&(l=[],c="")))},{flush:"sync"});const $=F(()=>{var P,O,R,W,z,G,K,H,q,X,ee;if((P=e.nodes)!=null&&P.length)return l=[],c="",A(0),wt(e.nodes.slice());const ue=r.value;if(!ue)return l=[],c="",A(-1),[];const ie=t.debugPerformanceEnabled.value,xe=ie?Jr():0,ce=M.value,pe=D.value,Ne=T.value;a&&pe!==a&&(function(Fe){var Re,Ke;(Ke=(Re=Fe.stream)==null?void 0:Re.reset)==null||Ke.call(Re)})(ce),u&&Ne!==u&&(l=[],c="");const te=Object.keys((R=(O=t.customComponentsMap)==null?void 0:O.value)!=null?R:{}).length>0||typeof _.value.postTransformNodes=="function";te!==d&&(l=[],c="");const ye=!te&&l.length>0&&ue.startsWith(c)&&Ne===u,j=ie?eS(ce):null,Y=ie?{}:void 0,ve=rS(ce),re=!ve&&!te,se=At(At(dn(At({},_.value),{__reuseStableTopLevelNodes:re}),ve?{__disableStreamParse:!0}:{}),Y?{__timing:Y}:{}),U=JF(ue,ce,se),J=ie?Jr():0,de=ie?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let me,Ie=ie?ng(U.length):void 0,je=0,ke=0,Le=0;if(ye){const Fe=ie?Jr():0,[Re,Ke]=(function(ot){var gt,Tt;const[yn,Gt]=ot.scanGlobalReferenceAppend(ot.previousContent,ot.content),Kt=ot.parseOptions;return[ot.previousDirtyStartIndex>0&&Kt.final!==!0&&!ot.customMarkdownIt&&!rS(ot.md)&&!yn&&typeof Kt.preTransformTokens!="function"&&typeof Kt.postTransformTokens!="function"&&typeof Kt.postTransformNodes!="function"&&((Tt=(gt=Kt.customHtmlTags)==null?void 0:gt.length)!=null?Tt:0)===0?ot.previousDirtyStartIndex:0,Gt]})({content:ue,previousContent:c,previousDirtyStartIndex:w,parseOptions:_.value,customMarkdownIt:e.customMarkdownIt,md:ce,scanGlobalReferenceAppend:f});Le=Ke;const ht=Re<=0;if(de){const ot=(function(gt,Tt,yn,Gt={}){var Kt;if(!Tt.length)return{nodes:gt,metrics:ng(gt.length)};const mn=(Kt=Gt.scanStartIndex)!=null?Kt:0,_n=Gt.reuseDirtyTail!==!1,He=(function(Rt,Ct,Fn,Tn=0){const as=Math.min(Rt.length,Ct.length);for(let Qt=Math.min(as,Math.max(0,Tn));Qt<as;Qt++)if(!zme(Ct[Qt],Rt[Qt],Fn))return Qt;return Rt.length===Ct.length?-1:as})(gt,Tt,yn,mn);if(He<0)return{nodes:Tt,metrics:{reusedNodeCount:gt.length,dirtyStartIndex:He,stablePrefixNodeCount:gt.length,dirtyTailNodeCount:0}};const st=gt.slice();let Ve=He;for(let Rt=0;Rt<He;Rt++)st[Rt]=Tt[Rt];if(_n)for(let Rt=He;Rt<gt.length;Rt++){const Ct=Tt[Rt],Fn=gt[Rt];Ct&&WB(Ct,Fn,yn)&&(st[Rt]=Ct,Ve+=1)}return{nodes:st,metrics:{reusedNodeCount:Ve,dirtyStartIndex:He,stablePrefixNodeCount:He,dirtyTailNodeCount:oS(He,gt,Tt)}}})(U,l,de,{reuseDirtyTail:ht,scanStartIndex:Re});me=ot.nodes,Ie=ot.metrics}else{const ot=(function(gt,Tt,yn={}){var Gt;if(!Tt.length)return{nodes:gt,metrics:ng(gt.length)};const Kt=(Gt=yn.scanStartIndex)!=null?Gt:0,mn=yn.reuseDirtyTail!==!1,_n=(function(Ve,Rt,Ct=0){const Fn=Math.min(Ve.length,Rt.length);for(let Tn=Math.min(Fn,Math.max(0,Ct));Tn<Fn;Tn++)if(!Rme(Rt[Tn],Ve[Tn]))return Tn;return Ve.length===Rt.length?-1:Fn})(gt,Tt,Kt);if(_n<0)return{nodes:Tt,metrics:{reusedNodeCount:gt.length,dirtyStartIndex:_n,stablePrefixNodeCount:gt.length,dirtyTailNodeCount:0}};const He=gt.slice();let st=_n;for(let Ve=0;Ve<_n;Ve++)He[Ve]=Tt[Ve];if(mn)for(let Ve=_n;Ve<gt.length;Ve++){const Rt=Tt[Ve],Ct=gt[Ve];Rt&&HB(Rt,Ct)&&(He[Ve]=Rt,st+=1)}return{nodes:He,metrics:{reusedNodeCount:st,dirtyStartIndex:_n,stablePrefixNodeCount:_n,dirtyTailNodeCount:oS(_n,gt,Tt)}}})(U,l,{reuseDirtyTail:ht,scanStartIndex:Re});me=ot.nodes,Ie=ot.metrics}je=ie?Jr()-Fe:0,ke=ht?Ie?.dirtyStartIndex==null||Ie.dirtyStartIndex<0?me.length:Ie.dirtyStartIndex:me.length}else me=U,Ie=ng(me.length);t.effectiveFinal.value!==!0&&(de?(function(Fe,Re,Ke=0){for(let ht=Math.max(0,Ke);ht<Fe.length;ht++)qb(Re,"primeSignatureMs",()=>Tu(Fe[ht]))})(me,de,ke):(function(Fe,Re=0){for(let Ke=Math.max(0,Re);Ke<Fe.length;Ke++)Tu(Fe[Ke])})(me,ke));const it=ie?Jr()-J:0;if(g+=1,c=ue,a=pe,u=Ne,d=te,l=me,A((W=Ie?.dirtyStartIndex)!=null?W:0),ie){const Fe=eS(ce),Re=typeof Fe?.total=="number"&&Fe.total>((z=j?.total)!=null?z:0);t.logPerf(Re?"parse(stream)":"parse(sync)",At(At(At({rendererId:t.instanceMsgId,ms:Math.round(Jr()-xe),nodes:me.length,contentLength:ue.length,parseCommitCount:g,parseCoalescedCount:m,nodeReuseMs:it,referenceDefinitionScanChars:Le,signatureMs:(G=de?.signatureMs)!=null?G:0,stabilizeSignatureMs:(K=de?.stabilizeSignatureMs)!=null?K:0,primeSignatureMs:(H=de?.primeSignatureMs)!=null?H:0,signatureCallCount:(q=de?.signatureCallCount)!=null?q:0,stabilizeSignatureCallCount:(X=de?.stabilizeSignatureCallCount)!=null?X:0,primeSignatureCallCount:(ee=de?.primeSignatureCallCount)!=null?ee:0,stabilizeMs:je},Ie??{}),Y?Object.fromEntries(Lme.map(Ke=>{var ht;return[Ke,(ht=Y[Ke])!=null?ht:0]})):{}),Fe?{streamMode:Fe.lastMode,streamDelta:Ome(Fe,j),streamStats:Fe}:{}))}return wt(me)});return{effectiveCustomHtmlTags:E,effectiveCustomHtmlTagsSet:N,mdBase:S,mdInstance:M,mergedParseOptions:_,getParsedNodesDirtyStartIndex:()=>w,getParsedNodesRevision:()=>k,parsedNodes:$}}function jme(e){const{isClient:t}=e,n=Z(new Set),i=new Map,s=new Map,o=new Map;function r(u){if(!t)return;const c=o.get(u);c!=null&&(window.clearTimeout(c),o.delete(u))}function l(){if(t)for(const u of o.values())window.clearTimeout(u);o.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:i,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:o,clearVisibilityFallback:r,clearAllVisibilityFallbacks:l,markNodeVisible:function(u,c=!0){var d;c&&r(u),(function(f,p){if((m=(g=e.shouldTrackVisibleNodeIndices)==null?void 0:g.call(e))!=null&&!m)return;var g,m;const y=n.value,w=y.has(f);if(p){if(w)return;const A=new Set(y);return A.add(f),void(n.value=A)}if(!w)return;const k=new Set(y);k.delete(f),n.value=k})(u,c),c&&((d=e.onNodeMarkedVisible)==null||d.call(e,u))},resetNodeVisibleState:a,cleanupNodeVisibility:function(u){var c;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,p]of s.entries())f<u||(p(),s.delete(f));for(const[f,p]of i.entries())f<u||(p.destroy(),i.delete(f),r(f),(c=e.onNodeVisibilityCleaned)==null||c.call(e,f));for(const f of Array.from(o.keys()))f<u||r(f);if(!n.value.size)return;const d=new Set;for(const f of n.value)f<u&&d.add(f);n.value=d},destroyNodeVisibilityState:function(){a();for(const u of s.values())u();s.clear();for(const u of i.values())u.destroy();i.clear(),l()}}}function Hme(e={}){const t=Z(""),n=Z(""),i=Z(!1),s=Ape(e),o=()=>{const c=s.getSnapshot();t.value=c.source,n.value=c.visible,i.value=c.done},r=s.subscribe(o);o();const l=F(()=>Math.max(0,t.value.length-n.value.length)),a=F(()=>l.value===0),u=F(()=>i.value&&a.value);return P2()&&Rf(()=>{r(),s.destroy()}),{source:t,visible:n,done:i,final:u,caughtUp:a,pendingChars:l,enqueue:c=>s.enqueue(c),finish:c=>s.finish(c),flush:()=>s.flush(),reset:c=>s.reset(c),pause:()=>s.pause(),resume:()=>s.resume()}}const Wme={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},lS=/auto|scroll|overlay/i;function qme(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return lS.test(t)||lS.test(n)}function Ume(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const Kme={class:"m-0 p-0"},Vme=["data-probe"],Zme=oi(tt(dn(At({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(i){var s,o;return(o=(s=t.headingNodes)==null?void 0:s[i])!=null?o:null}return(i,s)=>(b(),I("div",{class:"height-estimation-probes",style:Vt({width:`${e.width}px`}),"aria-hidden":"true"},[C("div",{ref:o=>e.setParagraphWrapper(o),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[V(h(Pc),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),C("div",{ref:o=>e.setListItemWrapper(o),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[C("ul",Kme,[V(h(vf),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),C("div",{ref:o=>e.setListWrapper(o),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[V(h(yf),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(b(),I(Be,null,yt(6,o=>C("div",{key:`probe-heading-${o}`,ref_for:!0,ref:r=>e.setHeadingWrapper(o,r),class:De(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${o}`},[V(h(Mv),{node:n(o),"index-key":`probe-heading-${o}`},null,8,["node","index-key"])],10,Vme)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),aS=tt({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=F(()=>{var n,i;return Qm((i=Jd(e.estimatedPreviewHeightPx))!=null?i:Zm(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return cn("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?cn("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[cn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[cn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),cn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),cn("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>cn("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,cn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[cn("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),cn("div",{class:"absolute inset-0"},[cn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),uS=tt({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=F(()=>{var n,i;return Gm((i=Jd(e.estimatedPreviewHeightPx))!=null?i:Vm(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return cn("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?cn("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[cn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[cn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),cn("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>cn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[cn("span",{class:"action-icon block"})])))]):null,cn("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[cn("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),cn("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),Gme={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function Rs(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const Qme=["data-custom-id"],Yme=["data-node-index","data-node-type"],cS="typewriter-simple-cursor-target",qB=oi(tt(dn(At({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const i=e,s=n;function o(L){if(!(typeof Event<"u"&&L instanceof Event))return typeof L=="string"&&s("copy-code",L),void s("copy",L)}const r=As(),l=an("markstreamNestedRendererProps",void 0);function a(L){const Q=r?.vnode.props;return!!Q&&(Object.prototype.hasOwnProperty.call(Q,L)||Object.prototype.hasOwnProperty.call(Q,String(L).replace(/[A-Z]/g,le=>`-${le.toLowerCase()}`)))}function u(L){var Q,le;const ae=i[L];return a(L)?ae:(le=(Q=l?.value)==null?void 0:Q[L])!=null?le:ae}const c=F(()=>{return(L=u("mode"))==="chat"||L==="minimal"||L==="docs"?L:"docs";var L}),d=F(()=>Q_(u("typewriter"))),f=F(()=>d.value!=="off"),p=F(()=>u("domMode")==="minimal"?"minimal":"full"),g=F(()=>{return(L={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":L.codeRenderer==="pre"||L.codeRenderer==="shiki"||L.codeRenderer==="monaco"?L.codeRenderer:L.renderCodeBlocksAsPre===!1||L.mode==="docs"?"monaco":"pre";var L}),m=F(()=>Gme[c.value]),y=F(()=>{var L;return(L=u("showTooltips"))!=null?L:m.value.showTooltips}),w=F(()=>{var L;return(L=u("fade"))!=null?L:m.value.fade}),k=F(()=>{var L;return(L=u("batchRendering"))!=null?L:m.value.batchRendering}),A=F(()=>{var L;return(L=u("initialRenderBatchSize"))!=null?L:m.value.initialRenderBatchSize}),v=F(()=>{var L;return(L=u("renderBatchSize"))!=null?L:m.value.renderBatchSize}),x=F(()=>{var L;return(L=u("renderBatchDelay"))!=null?L:m.value.renderBatchDelay}),E=F(()=>{var L;return(L=u("renderBatchBudgetMs"))!=null?L:m.value.renderBatchBudgetMs}),S=F(()=>{var L;return(L=u("renderBatchIdleTimeoutMs"))!=null?L:m.value.renderBatchIdleTimeoutMs}),M=F(()=>{var L;return(L=u("deferNodesUntilVisible"))!=null?L:m.value.deferNodesUntilVisible}),_=F(()=>{var L;return(L=u("maxLiveNodes"))!=null?L:m.value.maxLiveNodes}),N=F(()=>{var L;return(L=u("liveNodeBuffer"))!=null?L:m.value.liveNodeBuffer}),D=F(()=>{var L;return(L=u("nodeVirtual"))!=null?L:m.value.nodeVirtual}),T={get content(){return i.content},get nodes(){return i.nodes},get final(){return i.final},get parseOptions(){return u("parseOptions")},get customMarkdownIt(){return u("customMarkdownIt")},get debugPerformance(){return i.debugPerformance},get customHtmlTags(){return u("customHtmlTags")},get mode(){return u("mode")},get domMode(){return p.value},get htmlPolicy(){return u("htmlPolicy")},get viewportPriority(){return u("viewportPriority")},get viewportPriorityOptions(){return u("viewportPriorityOptions")},get codeBlockStream(){return u("codeBlockStream")},get codeBlockDarkTheme(){return u("codeBlockDarkTheme")},get codeBlockLightTheme(){return u("codeBlockLightTheme")},get codeBlockMonacoOptions(){return u("codeBlockMonacoOptions")},get codeRenderer(){return u("codeRenderer")},get renderCodeBlocksAsPre(){return u("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return u("codeBlockMinWidth")},get codeBlockMaxWidth(){return u("codeBlockMaxWidth")},get codeBlockProps(){return u("codeBlockProps")},get mermaidProps(){return u("mermaidProps")},get d2Props(){return u("d2Props")},get infographicProps(){return u("infographicProps")},get showTooltips(){return y.value},get themes(){return u("themes")},get langs(){return u("langs")},get isDark(){return u("isDark")},get customId(){return u("customId")},get indexKey(){return i.indexKey},get typewriter(){return u("typewriter")},get smoothStreaming(){return i.smoothStreaming},get smoothStreamingOptions(){return u("smoothStreamingOptions")},get parseCoalesceMs(){return u("parseCoalesceMs")},get fade(){return w.value},get batchRendering(){return k.value},get initialRenderBatchSize(){return A.value},get renderBatchSize(){return v.value},get renderBatchDelay(){return x.value},get renderBatchBudgetMs(){return E.value},get renderBatchIdleTimeoutMs(){return S.value},get deferNodesUntilVisible(){return M.value},get maxLiveNodes(){return _.value},get liveNodeBuffer(){return N.value},get nodeVirtual(){return D.value},get virtualScroll(){return i.virtualScroll},get renderAsFragment(){return i.renderAsFragment}};function $(L){s("height-change",L)}function P(L){s("virtual-state-change",L)}function O(L){s("anchor-change",L)}const R=Z(),W=Z(null),z=Z(null),G=Z(null),K=Ts({1:null,2:null,3:null,4:null,5:null,6:null}),H=Z(!1),q=new Map,X=Z(0),ee=Z(0),ue=Z({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function ie(L,Q){return typeof L!="string"?Q:L.trim()||Q}function xe(L){const Q=Number(L);return Number.isFinite(Q)&&Q>0?Math.max(1,Math.trunc(Q)):640}const ce=F(()=>{var L;const Q=(L=T.viewportPriorityOptions)!=null?L:{},le=ie(Q.rootMargin,Zc);return{rootMargin:le,heavyBlockMargin:ie(Q.heavyBlockMargin,le),maxTargets:xe(Q.maxTargets)}}),pe=F(()=>{var L;return(L=ce.value.rootMargin)!=null?L:Zc}),Ne=F(()=>{var L;return(L=ce.value.maxTargets)!=null?L:640});function te(){var L,Q;if(((L=i.virtualScroll)==null?void 0:L.enabled)!==!0)return null;const le=(Q=i.virtualScroll)==null?void 0:Q.scrollRoot;return ye(typeof le=="function"?le():le)}function ye(L){return L?typeof HTMLElement<"u"&&L instanceof HTMLElement?L:typeof L=="object"&&"value"in L?ye(L.value):typeof L=="object"&&"$el"in L?ye(L.$el):null:null}Pn(MB,ce);const{isClient:j,renderAsFragment:Y,debugPerformanceEnabled:ve,resolvedShowTooltips:re,resolvedHtmlPolicy:se,inheritedSmoothStreaming:U,ownsTypewriterCursor:J}=(function(L){const Q=typeof window<"u",le=Of(),ae=an("markstreamHtmlPolicy",void 0),be=an("markstreamTypewriterCursor",void 0),Te=an("markstreamSmoothStreaming",void 0),ze=F(()=>L.renderAsFragment===!0),We=F(()=>!!(L.debugPerformance&&Q&&typeof console<"u")),lt=F(()=>{var rt;if(typeof L.showTooltips=="boolean")return L.showTooltips;const Oe=(rt=le.showTooltips)!=null?rt:le["show-tooltips"];return Oe===""||Oe===!0||Oe==="true"||Oe!==!1&&Oe!=="false"&&void 0}),qe=F(()=>{var rt,Oe;return(Oe=(rt=L.htmlPolicy)!=null?rt:ae?.value)!=null?Oe:"safe"}),Xe=F(()=>be?.value!==!0);return{isClient:Q,renderAsFragment:ze,debugPerformanceEnabled:We,resolvedShowTooltips:lt,resolvedHtmlPolicy:qe,inheritedSmoothStreaming:Te,inheritedTypewriterCursor:be,ownsTypewriterCursor:Xe}})(T),{resolveViewportRoot:de,resolveScrollContainer:me,isReverseFlexScrollRoot:Ie,getNormalizedScrollTop:je,getOffsetTopWithinRoot:ke}=(function(L,Q){function le(){var We,lt;return(lt=(We=Q.scrollRoot)==null?void 0:We.call(Q))!=null?lt:null}function ae(We){if(typeof window>"u")return null;const lt=le();if(lt)return lt;const qe=We??L.value;if(!qe)return null;const Xe=qe.ownerDocument||document,rt=Xe.scrollingElement||Xe.documentElement;let Oe=qe;for(;Oe&&Oe!==Xe.body&&Oe!==rt;){if(qme(window.getComputedStyle(Oe))&&Ume(Oe))return Oe;Oe=Oe.parentElement}return null}function be(We){if(!Q.isClient)return!1;try{const lt=window.getComputedStyle(We);return!!(lt.display||"").toLowerCase().includes("flex")&&(lt.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function Te(We,lt,qe){var Xe,rt;if(qe)return ze(lt);const Oe=We.scrollTop;if(!be(We))return Oe;const et=Oe<0?-Oe:Oe;return Math.max(0,((Xe=We.scrollHeight)!=null?Xe:0)-((rt=We.clientHeight)!=null?rt:0))-et}function ze(We){var lt,qe,Xe,rt,Oe;const et=Number((lt=We.scrollingElement)==null?void 0:lt.scrollTop),ut=Number((Xe=(qe=We.documentElement)==null?void 0:qe.scrollTop)!=null?Xe:0),at=Number((Oe=(rt=We.body)==null?void 0:rt.scrollTop)!=null?Oe:0);return Math.max(0,Number.isFinite(et)?et:0,Number.isFinite(ut)?ut:0,Number.isFinite(at)?at:0)}return{resolveViewportRoot:ae,resolveScrollContainer:function(We){var lt,qe,Xe,rt;const Oe=le();if(Oe)return Oe;const et=ae((lt=We??L.value)!=null?lt:null);if(et)return et;const ut=(rt=(Xe=We?.ownerDocument)!=null?Xe:(qe=L.value)==null?void 0:qe.ownerDocument)!=null?rt:typeof document<"u"?document:null;return ut?.scrollingElement||ut?.documentElement||null},isReverseFlexScrollRoot:be,getNormalizedScrollTop:Te,getOffsetTopWithinRoot:function(We,lt){const qe=lt.ownerDocument||We.ownerDocument||document;if((function(et,ut){return et===ut.documentElement||et===ut.body||et===ut.scrollingElement})(lt,qe))return We.getBoundingClientRect().top+ze(qe);const Xe=lt.getBoundingClientRect(),rt=We.getBoundingClientRect(),Oe=Te(lt,qe,!1);return rt.top-Xe.top+Oe}}})(R,{isClient:j,scrollRoot:te});Pn("markstreamShowTooltips",re),Pn("markstreamHtmlPolicy",se),Pn("markstreamTypewriter",f),Pn("markstreamFade",F(()=>T.fade!==!1)),Pn("markstreamTypewriterCursor",F(()=>!0)),Pn("markstreamTextStreamState",q),Pn("markstreamStreamVersion",X),Pn("markstreamParseOptions",F(()=>T.parseOptions)),Pn("markstreamCustomMarkdownIt",F(()=>T.customMarkdownIt));const{smoothStreamingEnabled:Le,renderContent:it,requestedFinal:Fe,effectiveFinal:Re}=(function(L,Q){const le=Hme(At(At({},Wme),L.smoothStreamingOptions)),ae=F(()=>{var Oe,et,ut;return L.smoothStreaming!==!1&&!((Oe=L.nodes)!=null&&Oe.length)&&(L.smoothStreaming===!0||!((et=Q.inheritedSmoothStreaming)!=null&&et.value))&&(L.smoothStreaming===!0||Q_(L.typewriter)!=="off"||((ut=L.maxLiveNodes)!=null?ut:0)<=0)}),be=Z(!Q.isClient||L.smoothStreaming===!0);pn(()=>{be.value=!0});const Te=F(()=>be.value&&ae.value),ze=F(()=>{var Oe;return Te.value?le.visible.value:(Oe=L.content)!=null?Oe:""}),We=F(()=>{var Oe,et;const ut=(Oe=L.parseOptions)!=null?Oe:{};return(et=L.final)!=null?et:ut.final}),lt=F(()=>{const Oe=We.value;return Te.value&&Oe!=null?!!Oe&&le.caughtUp.value:Oe});let qe=0,Xe=!1;function rt(){qe=0,Xe=!1}return Qe([()=>L.content,()=>L.nodes,Te,We],([Oe,et,ut,at])=>{if(et?.length)return rt(),void le.reset("");const Mt=Oe??"";if(!ut)return rt(),le.reset(Mt),void(at&&le.finish({flush:!0}));const mt=le.source.value;if(Mt){if(Mt!==mt)if(Mt.startsWith(mt)){const zt=Mt.slice(mt.length),qt=le.pendingChars.value;zt.length<=8?(qe++,Xe||qe>=2&&qt<=8?(Xe=!0,le.reset(Mt)):le.enqueue(zt)):(rt(),le.enqueue(zt))}else rt(),le.reset(Mt)}else rt(),le.reset("");at&&le.finish()},{immediate:!0}),{smoothStream:le,smoothStreamingEligible:ae,smoothStreamingEnabled:Te,renderContent:ze,requestedFinal:We,effectiveFinal:lt}})(T,{isClient:j,inheritedSmoothStreaming:U}),Ke=Fe.value===!0;Pn("markstreamSmoothStreaming",Le);const ht=Z(!1),ot=Z(!1),gt=Z(!1);let Tt="",yn=!1,Gt=null;function Kt(){j&&Gt!=null&&(window.clearTimeout(Gt),Gt=null)}function mn(){ht.value=!1,Kt()}function _n(L,Q){if(!ve.value)return;const le=(function(){if(!ve.value)return null;const ae=Ct(He),be=Ct(st),Te=Math.max(Rt,be);if(ae<=0&&Te<=0)return null;const ze={total:ae,maxPerFrame:Te,byLabel:(We=He,Object.fromEntries(Array.from(We.entries()).sort((lt,qe)=>qe[1]-lt[1]||lt[0].localeCompare(qe[0]))))};var We;return He.clear(),st.clear(),Rt=0,ze})();console.info(`[markstream-vue][perf] ${L}`,le?dn(At({},Q),{layoutReads:le}):Q)}Qe([()=>T.indexKey,()=>T.customId],()=>{var L,Q;mn(),ot.value=!1,gt.value=!((L=i.nodes)!=null&&L.length)&&Fe.value!==!0&&!!i.content,Tt=(Q=it.value)!=null?Q:"",yn=Tt.length>0},{flush:"sync"}),Qe([()=>i.content,()=>i.nodes,Fe],([L,Q,le])=>{!Q?.length&&le!==!0&&L&&(gt.value=!0)},{flush:"sync",immediate:!0}),Qe([it,()=>i.nodes,Fe],([L,Q,le])=>{const ae=L??"";return Q?.length||le===!0?(mn(),ot.value=!1,Tt=ae,void(yn=!0)):(ae.length>0&&(gt.value=!0),yn?(Tt&&ae.length>Tt.length&&ae.startsWith(Tt)?(ht.value=!0,ot.value=!0,j&&(Kt(),Gt=window.setTimeout(()=>{var be;Gt=null,Re.value===!0||(be=i.nodes)!=null&&be.length||(bd(),ht.value=!1,ea())},1200))):(ae.length<Tt.length||!ae.startsWith(Tt))&&(mn(),ot.value=!1),void(Tt=ae)):(Tt=ae,void(yn=!0)))},{flush:"sync",immediate:!0});const He=new Map,st=new Map;let Ve=!1,Rt=0;function Ct(L){let Q=0;for(const le of L.values())Q+=le;return Q}function Fn(){Rt=Math.max(Rt,Ct(st)),st.clear(),Ve=!1}function Tn(L){L.maxPerFrame=Math.max(Number(L.maxPerFrame||0),Number(L.currentFrameTotal||0)),L.currentFrameTotal=0,L.frameScheduled=!1}function as(L){var Q,le;ve.value&&(He.set(L,((Q=He.get(L))!=null?Q:0)+1),st.set(L,((le=st.get(L))!=null?le:0)+1),(function(ae){const be=(function(){if(!j||typeof window>"u")return null;const Te=window;if(Te.__markstreamLayoutReadPerformance)return Te.__markstreamLayoutReadPerformance;const ze={total:0,maxPerFrame:0,byLabel:{}};return Te.__markstreamLayoutReadPerformance=ze,ze})();be&&(be.total=Number(be.total||0)+1,be.byLabel[ae]=Number(be.byLabel[ae]||0)+1,be.currentFrameTotal=Number(be.currentFrameTotal||0)+1,be.frameScheduled||(be.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Tn(be),0):queueMicrotask(()=>Tn(be)):window.requestAnimationFrame(()=>Tn(be))))})(L),Ve||(Ve=!0,j&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(Fn):typeof queueMicrotask!="function"?setTimeout(Fn,0):queueMicrotask(Fn)))}function Qt(L,Q){return as(L),Q()}const ni=T.customId?`renderer-${T.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,zn=(function(L){const Q=new Map;return{scope:L,cache:Q,clear:()=>Q.clear()}})(ni),Sn=ni;Pn($B,zn);const mi=Cs(()=>T.customId),{effectiveCustomHtmlTagsSet:Ws,mergedParseOptions:Li,parsedNodes:Lt,getParsedNodesDirtyStartIndex:xi,getParsedNodesRevision:Qi}=Pme(T,{instanceMsgId:ni,renderContent:it,effectiveFinal:Re,smoothStreamingEnabled:Le,debugPerformanceEnabled:ve,customComponentsMap:mi,logPerf:_n});Qe(Lt,()=>{ht.value||zn.clear(),X.value+=1},{immediate:!0});const ci=F(()=>({customId:T.customId,customHtmlTags:Li.value.customHtmlTags,parseOptions:T.parseOptions,customMarkdownIt:T.customMarkdownIt,htmlPolicy:se.value,viewportPriority:T.viewportPriority,viewportPriorityOptions:ce.value,mode:c.value,domMode:T.domMode,codeRenderer:g.value,codeBlockStream:T.codeBlockStream,codeBlockDarkTheme:T.codeBlockDarkTheme,codeBlockLightTheme:T.codeBlockLightTheme,codeBlockMonacoOptions:T.codeBlockMonacoOptions,renderCodeBlocksAsPre:T.renderCodeBlocksAsPre,codeBlockMinWidth:T.codeBlockMinWidth,codeBlockMaxWidth:T.codeBlockMaxWidth,codeBlockProps:T.codeBlockProps,mermaidProps:T.mermaidProps,d2Props:T.d2Props,infographicProps:T.infographicProps,showTooltips:re.value,themes:T.themes,langs:T.langs,isDark:T.isDark,typewriter:f.value,smoothStreamingOptions:T.smoothStreamingOptions,parseCoalesceMs:T.parseCoalesceMs,fade:T.fade}));Pn("markstreamNestedRendererProps",ci);const Fs=F(()=>Lt.value),Ni=F(()=>Lt.value.length),$i=Z(null),So=Z(null),_i=Z(null),Yi=Z(null),co=i.indexKey!=null&&String(i.indexKey).startsWith("list-item-"),Bs=!co&&T.customId?U_(T.customId):null,Hi=F(()=>Bs?(e4.value,U_(T.customId)):null),vi=F(()=>{var L;return!!(!Y.value&&T.customId&&!co&&((L=Hi.value)!=null&&L.enabled))}),Mn=F(()=>!!(j&&vi.value)),Dn=F(()=>{var L;return!!(!Y.value&&((L=i.virtualScroll)!=null&&L.enabled))}),Ln=F(()=>Dn.value),ws=Z(!1);pn(()=>{ws.value=!0});const Cn=F(()=>!!(j&&Dn.value));Pn("markstreamHostScrollManaged",Cn);const Di=F(()=>!!(ws.value&&Cn.value)),ri=F(()=>Mn.value||Cn.value),ur=F(()=>Mn.value||Di.value),jo=F(()=>{var L;return ri.value&&((L=Hi.value)==null?void 0:L.textEstimation)!==!1});function On(){const L=ee.value||Qt("getMeasuredContainerWidth.clientWidth",()=>{var Q;return((Q=R.value)==null?void 0:Q.clientWidth)||0});return Number.isFinite(L)&&L>0?L:0}const us=F(()=>{const L=On();return L>0?Math.max(1,Math.round(L)):640}),qs=F(()=>{var L,Q;return!(Re.value!==!0||Dn.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(L=i.nodes)!=null&&L.length||gt.value||!(((Q=T.maxLiveNodes)!=null?Q:0)<=0))}),Us=F(()=>{var L;return qs.value?50:Math.max(1,(L=T.maxLiveNodes)!=null?L:320)}),Ji=F(()=>{var L;return qs.value?16:Math.max(0,(L=T.liveNodeBuffer)!=null?L:60)}),$e=F(()=>{var L;return!Y.value&&T.nodeVirtual!==!1&&!(((L=T.maxLiveNodes)!=null?L:0)<=0&&!qs.value)&&(T.nodeVirtual===!0?Lt.value.length>0:Lt.value.length>Us.value)}),nt=F(()=>$e.value||Mn.value||Cn.value),Nt=F(()=>T.viewportPriority!==!1),Zt=F(()=>!!Nt.value&&!H.value);var Nn;Nn=F(()=>Nt.value),Pn(IB,Nn);const cs=F(()=>{var L;return!(Y.value||T.deferNodesUntilVisible===!1||((L=T.maxLiveNodes)!=null?L:0)<=0||$e.value||Lt.value.length>900||T.viewportPriority===!1)}),Fi=A0e(L=>{var Q;return de((Q=L??R.value)!=null?Q:null)},Nt),{requestFrame:di,cancelFrame:fi,hasIdleCallback:Ks,isTestEnv:Si}=(function(L){const Q=L.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,le=L.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ae=L.isClient&&typeof window.requestIdleCallback=="function",be=(function(){var Te;if(typeof globalThis>"u"||!("process"in globalThis))return;const ze=(Te=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:Te.value;return ze?.env})();return{requestFrame:Q,cancelFrame:le,hasIdleCallback:ae,isTestEnv:be?.NODE_ENV==="test"}})({isClient:j}),Vs=F(()=>Re.value===!0&&!Dn.value),{resolvedBatchSize:Zs,resolvedInitialBatch:Wi,batchingEnabled:xs,incrementalRenderingActive:fo,renderedCount:yi,previousRenderContext:Mo,adaptiveBatchSize:ho,previousBatchConfig:Gs}=(function(L,Q){var le;const ae=F(()=>{var rt;const Oe=Math.trunc((rt=L.renderBatchSize)!=null?rt:80);return Number.isFinite(Oe)?Math.max(0,Oe):0}),be=F(()=>{var rt;const Oe=Math.trunc((rt=L.initialRenderBatchSize)!=null?rt:ae.value);return Number.isFinite(Oe)?Math.max(0,Oe):ae.value}),Te=F(()=>!Q.renderAsFragment.value&&L.batchRendering!==!1&&ae.value>0&&Q.isClient&&!Q.isTestEnv),ze=Z(0),We=Z({key:L.indexKey,total:0}),lt=Z(Math.max(1,ae.value||1)),qe=F(()=>{var rt,Oe,et;return Te.value&&!((rt=Q.continuousStreaming)!=null&&rt.value)&&!((Oe=Q.forceFullRenderFinalContent)!=null&&Oe.value)&&((et=L.maxLiveNodes)!=null?et:0)<=0}),Xe=Z({batchSize:ae.value,initial:be.value,delay:(le=L.renderBatchDelay)!=null?le:16,enabled:qe.value});return{resolvedBatchSize:ae,resolvedInitialBatch:be,batchingEnabled:Te,incrementalRenderingActive:qe,renderedCount:ze,previousRenderContext:We,adaptiveBatchSize:lt,previousBatchConfig:Xe}})(T,{isClient:j,isTestEnv:Si,renderAsFragment:Y,forceFullRenderFinalContent:Vs,continuousStreaming:F(()=>ot.value&&Re.value!==!0)}),ds=F(()=>{var L;return!Y.value&&T.batchRendering!==!1&&Zs.value>0&&!Si&&((L=T.maxLiveNodes)!=null?L:0)<=0&&!Vs.value}),Ho=F(()=>ds.value),cr=F(()=>ri.value||Ho.value),ft=F(()=>{var L;return cr.value&&((L=Hi.value)==null?void 0:L.codeBlockEstimation)!==!1}),Me=new Map,Ze=new Map,on=new WeakMap;let Mi=null;const Wo=new WeakMap,bi=new Map,Al=[];let qo=[],Er=[],dr=-1;const fr=vl(Al),po=new Set,Gl=Z(0);let oe=0;const Ae=Z(0),Se=F(()=>(Ae.value,Array.from(Me.entries()).sort((L,Q)=>L[0]-Q[0]))),Pe=Z(null),Ye=Z(null);let Je,xt=null,bt=0,nn=null;function Ot(){Je.markFallbackHeightPrefixDirty()}function wn(L){return Je.getFallbackNodeHeight(L)}function Qn(L,Q){return Je.estimateHeightRange(L,Q)}function $t(L){return Je.estimateIndexForOffset(L)}const{activeRestoreAnchor:Ht,getRelativeScrollTopWithinContainer:Wn,setRelativeScrollTopWithinContainer:Ee,resolveAnchorOffset:ct,clearRestoreReconcile:dt,scheduleRestoreReconcile:Wt,captureRestoreAnchor:ki,restoreAnchor:$s,getAnchorDrift:Ql}=(function(L){const{isClient:Q,containerRef:le,parsedNodeCount:ae,requestFrame:be,cancelFrame:Te,resolveScrollContainer:ze,getNormalizedScrollTop:We,getOffsetTopWithinRoot:lt,isReverseFlexScrollRoot:qe,estimateIndexForOffset:Xe,estimateHeightRange:rt,getFallbackNodeHeight:Oe,clamp:et}=L,ut=Z(null);let at=null,Mt=[];function mt(){const tn=ze(),kn=le.value;if(!tn||!kn)return null;const In=tn.ownerDocument||kn.ownerDocument||document;if(tn===In.documentElement||tn===In.body||tn===In.scrollingElement){const hi=kn.getBoundingClientRect();return Math.max(0,-hi.top)}return Math.max(0,We(tn,In,!1)-lt(kn,tn))}function zt(tn){var kn;const In=ze(),hi=le.value;if(!In||!hi)return;const Xs=Math.max(0,tn),Ds=In.ownerDocument||hi.ownerDocument||document,Gr=Ds.defaultView||(typeof window<"u"?window:null);if(In===Ds.documentElement||In===Ds.body||In===Ds.scrollingElement){const _l=We(In,Ds,!0)+hi.getBoundingClientRect().top;return void((kn=Gr?.scrollTo)==null||kn.call(Gr,0,Math.max(0,_l+Xs)))}Z_(In,Ds,lt(hi,In)+Xs,{isReverseFlexScrollRoot:_l=>{var vh;return(vh=qe?.(_l))!=null&&vh},getNormalizedScrollTop:We})}function qt(tn){const kn=ae.value,In=et(tn.nodeIndex,0,Math.max(0,kn-1));return rt(0,In)+Math.max(0,tn.offsetWithinNodePx)}function en(){if(at!=null&&(Te?.(at),at=null),Q)for(const tn of Mt)window.clearTimeout(tn);Mt=[]}function Yt(tn){const kn=qt(tn),In=mt();In!=null&&Math.abs(In-kn)<=.5||zt(kn)}return{activeRestoreAnchor:ut,getRelativeScrollTopWithinContainer:mt,setRelativeScrollTopWithinContainer:zt,resolveAnchorOffset:qt,clearRestoreReconcile:en,applyRestoreAnchor:Yt,scheduleRestoreReconcile:function(){ut.value&&Q&&at==null&&(at=be?be(()=>{at=null,ut.value&&Yt(ut.value)}):null,at==null&&ut.value&&Yt(ut.value))},captureRestoreAnchor:function(){const tn=mt(),kn=ae.value;if(tn==null||kn<=0)return null;const In=et(Xe(tn+1),0,kn-1),hi=rt(0,In),Xs=Oe(In);return{nodeIndex:In,offsetWithinNodePx:et(tn-hi,0,Math.max(0,Xs-1))}},restoreAnchor:function(tn){const kn=ae.value;if(ut.value={nodeIndex:et(tn.nodeIndex,0,Math.max(0,kn-1)),offsetWithinNodePx:Math.max(0,tn.offsetWithinNodePx)},en(),Yt(ut.value),Q)for(const In of[0,120,280,480])Mt.push(window.setTimeout(()=>{ut.value&&Yt(ut.value)},In))},getAnchorDrift:function(tn){const kn=mt();return kn==null?null:kn-qt(tn)}}})({isClient:j,containerRef:R,parsedNodeCount:Ni,requestFrame:di,cancelFrame:fi,resolveScrollContainer:()=>Pe.value||me(),getNormalizedScrollTop:je,getOffsetTopWithinRoot:ke,isReverseFlexScrollRoot:Ie,estimateIndexForOffset:$t,estimateHeightRange:Qn,getFallbackNodeHeight:wn,clamp:Js}),{nodeHeights:Xi,heightStats:os,heightTreeSize:Ku,heightSumTree:ld,heightKnownTree:Hp,averageNodeHeight:Gf,resetHeightMeasurements:Wp,pruneHeightMeasurements:qp,rebuildHeightTrees:ad,recordNodeHeight:Ov,removeNodeHeights:Pv,exportHeightCache:ge,importHeightCache:we,fenwickRangeSum:Ge}=(function(L={}){const Q=Ts({}),le=Ts({total:0,count:0}),ae=Z(0),be=Z([]),Te=Z([]);function ze(){for(const Oe of Object.keys(Q))delete Q[Number(Oe)];le.total=0,le.count=0,ae.value=0,be.value=[],Te.value=[]}function We(Oe,et,ut){for(let at=et+1;at<Oe.length;at+=at&-at)Oe[at]+=ut}function lt(Oe,et){let ut=0;for(let at=et+1;at>0;at-=at&-at)ut+=Oe[at];return ut}function qe(Oe){ae.value=Oe;const et=new Array(Oe+1).fill(0),ut=new Array(Oe+1).fill(0);for(const[at,Mt]of Object.entries(Q)){const mt=Number(at),zt=Number(Mt);!Number.isFinite(mt)||mt<0||mt>=Oe||!Number.isFinite(zt)||zt<=0||(We(et,mt,zt),We(ut,mt,1))}be.value=et,Te.value=ut}function Xe(Oe){if(!Number.isInteger(Oe)||Oe<0)return!1;const et=Q[Oe];if(!Number.isFinite(et)||et<=0)return!1;if(delete Q[Oe],le.total=Math.max(0,le.total-et),le.count=Math.max(0,le.count-1),ae.value>Oe){const ut=be.value,at=Te.value;ut.length&&at.length&&(We(ut,Oe,-et),We(at,Oe,-1))}return!0}const rt=F(()=>le.count>0?Math.max(12,le.total/le.count):32);return{nodeHeights:Q,heightStats:le,heightTreeSize:ae,heightSumTree:be,heightKnownTree:Te,averageNodeHeight:rt,resetHeightMeasurements:ze,pruneHeightMeasurements:function(Oe){if(Oe<=0)return void ze();let et=0,ut=0;for(const[at,Mt]of Object.entries(Q)){const mt=Number(at),zt=Number(Mt);!Number.isFinite(mt)||mt<0||mt>=Oe||!Number.isFinite(zt)||zt<=0?delete Q[mt]:(et+=zt,ut++)}le.total=et,le.count=ut},rebuildHeightTrees:qe,recordNodeHeight:function(Oe,et,ut={}){(function(at,Mt,mt={}){var zt;if(!Number.isFinite(Mt)||Mt<=0)return!1;const qt=Q[at];if(qt&&(mt.allowShrink===!1&&Mt<qt||Math.abs(Mt-qt)<=1))return!1;if(Q[at]=Mt,qt?le.total+=Mt-qt:(le.total+=Mt,le.count++),ae.value>at){const en=be.value,Yt=Te.value;if(en.length&&Yt.length)if(qt){const tn=Mt-qt;tn!==0&&We(en,at,tn)}else We(en,at,Mt),We(Yt,at,1)}mt.notify!==!1&&((zt=L.onHeightRecorded)==null||zt.call(L))})(Oe,et,dn(At({},ut),{notify:!0}))},removeNodeHeight:function(Oe,et={}){var ut;const at=Xe(Oe);return at&&et.notify!==!1&&((ut=L.onHeightRecorded)==null||ut.call(L)),at},removeNodeHeights:function(Oe,et={}){var ut;let at=0;for(const Mt of Oe)Xe(Number(Mt))&&at++;return at>0&&et.notify!==!1&&((ut=L.onHeightRecorded)==null||ut.call(L)),at},exportHeightCache:function(){return Object.entries(Q).map(([Oe,et])=>({index:Number(Oe),height:Number(et)})).filter(Oe=>Number.isFinite(Oe.index)&&Oe.index>=0&&Number.isFinite(Oe.height)&&Oe.height>0).sort((Oe,et)=>Oe.index-et.index)},importHeightCache:function(Oe,et={}){var ut;if(!Array.isArray(Oe))return;const at=ae.value;let Mt=!1;if(et.mode!=="merge"){const mt=Object.keys(Q);if(mt.length>0){for(const zt of mt)delete Q[Number(zt)];Mt=!0}}for(const mt of Oe){const zt=Number(mt.index),qt=Number(mt.height);if(!Number.isInteger(zt)||zt<0||at>0&&zt>=at||!Number.isFinite(qt)||qt<=0)continue;const en=Q[zt];en&&Math.abs(en-qt)<=1||(Q[zt]=qt,Mt=!0)}Mt&&((function(){let mt=0,zt=0;const qt=ae.value;for(const[en,Yt]of Object.entries(Q)){const tn=Number(en),kn=Number(Yt);!Number.isFinite(tn)||tn<0||qt>0&&tn>=qt||!Number.isFinite(kn)||kn<=0?delete Q[tn]:(mt+=kn,zt++)}le.total=mt,le.count=zt})(),at>0&&qe(at),(ut=L.onHeightRecorded)==null||ut.call(L))},fenwickRangeSum:function(Oe,et,ut){if(ut<=et)return 0;const at=lt(Oe,ut-1);return et<=0?at:at-lt(Oe,et-1)}}})({onHeightRecorded:()=>{Ot(),Cn.value&&dh(),Ht.value&&Wt(),Ye.value&&md(),Ii("node-resize")}});function Ft(L){Number.isInteger(L)&&L>=0&&po.add(L)}function sn(L){for(const Q of L)Ft(Number(Q))}function fn(L){oe++;let Q=!0;try{const le=L();return Q=le!==!1,le}finally{oe--,oe===0&&Q&&Gl.value++}}function qn(){qo=[],Er=[],dr=-1,po.clear(),fr.value=Al}function Ai(){qn(),fn(()=>Wp()),bi.clear()}function Qs(L){!Number.isInteger(L)||L<0||L>=Lt.value.length||bi.set(L,eh(L))}function Vu(L,Q,le={}){const ae=Xi[L];Ft(L),Ov(L,Q,le);const be=Xi[L];return Object.is(ae,be)?(po.delete(L),!1):(be&&be>0?Qs(L):ae&&bi.delete(L),!0)}function Qf(L,Q){const le=Qt("getNodeLayoutHeight.slot.offsetHeight",()=>{var ae,be;return(be=(ae=Me.get(L))==null?void 0:ae.offsetHeight)!=null?be:0});return le>0?le:Qt("getNodeLayoutHeight.content.offsetHeight",()=>Q.offsetHeight)}function Ek(L,Q={}){Q.mode!=="merge"?qn():sn(L.map(le=>le.index)),fn(()=>we(L,Q)),p9()}const Cl=F(()=>cs.value&&Zt.value),YD=F(()=>{var L;return!Y.value&&T.batchRendering!==!1&&Zs.value>0&&((L=T.maxLiveNodes)!=null?L:0)<=0}),JD=F(()=>!Y.value&&Ke&&Re.value===!0&&!$e.value&&!Dn.value&&!vi.value&&!Cl.value&&!YD.value),Tk=F(()=>!!Fi&&Cl.value),Lk=F(()=>$e.value||Cn.value),{focusIndex:Yl,liveRange:Ys,updateLiveRange:Yf}=(function(L,Q){const{parsedNodeCount:le,virtualizationEnabled:ae,maxLiveNodesResolved:be,liveNodeBufferResolved:Te,clamp:ze}=Q,We=Te??F(()=>{var Xe;return Math.max(0,(Xe=L.liveNodeBuffer)!=null?Xe:60)}),lt=Z(0),qe=Ts({start:0,end:0});return{liveNodeBufferResolved:We,focusIndex:lt,liveRange:qe,updateLiveRange:function(){const Xe=le.value;if(!ae.value||Xe===0)return qe.start=0,void(qe.end=Xe);const rt=Math.min(be.value,Xe),Oe=We.value,et=ze(lt.value-Oe,0,Math.max(0,Xe-rt));qe.start=et,qe.end=Math.min(Xe,et+rt)}}})(T,{parsedNodeCount:Ni,virtualizationEnabled:$e,maxLiveNodesResolved:Us,liveNodeBufferResolved:Ji,clamp:Js}),wl=new Map,Zu=new Map,Ba=new Map,Up=[],Jl=new Map,$a=new Set,Nk=Z(0);let jv=!1;const Fk=F(()=>(Nk.value,$a.size)),hr=new Map,xl=new Map,Bk=Z(0),Hv=F(()=>{Bk.value;let L=0;for(const Q of hr.values())L+=Math.max(0,Q);return L});let pr=null;const Kp=F(()=>{if(!$e.value)return Lt.value.length;const L=Ji.value,Q=Math.max(Ys.end+L,Wi.value),le=Math.min(Lt.value.length,Q);return Math.max(yi.value,le)});function Vp(){jv||(jv=!0,queueMicrotask(()=>{jv=!1,Nk.value+=1}))}function $k(L,Q,le="node-resize"){if(!j||typeof window>"u")return null;const ae=window.setTimeout(()=>{$a.delete(ae)&&Vp();try{Q()}finally{Ii(le)}},Math.max(0,L));return $a.add(ae),Vp(),ae}function Zp(L){j&&L!=null&&($a.delete(L)&&Vp(),window.clearTimeout(L))}function Dk(){if(j&&typeof window<"u")for(const L of $a)window.clearTimeout(L);$a.size&&($a.clear(),Vp()),Up.length=0,Ba.clear()}function XD(L){W.value=L}function eR(L){z.value=L}function tR(L){G.value=L}const{cancelScheduledFocusSync:Wv,scheduleFocusSync:Zr}=(function(L){const{isClient:Q,containerRef:le,virtualizationEnabled:ae,requestFrame:be,cancelFrame:Te,syncFocusToScroll:ze}=L;let We=null;function lt(){var Xe,rt,Oe;return(Oe=(rt=(Xe=le.value)==null?void 0:Xe.ownerDocument)==null?void 0:rt.defaultView)!=null?Oe:typeof window<"u"?window:null}function qe(){if(!We)return;const Xe=lt();We.viaTimeout?Xe?Xe.clearTimeout(We.id):clearTimeout(We.id):Te?.(We.id),We=null}return{cancelScheduledFocusSync:qe,scheduleFocusSync:function(Xe={}){if(!ae.value)return;if(!Q)return void ze(!0);if(Xe.immediate)return qe(),void ze(!0);if(We)return;const rt=()=>{We=null,ze()};if(be)return void(We={id:be(rt),viaTimeout:!1});const Oe=lt();We={id:Oe?Oe.setTimeout(rt,16):setTimeout(rt,16),viaTimeout:!0}}}})({isClient:j,containerRef:R,virtualizationEnabled:$e,requestFrame:di,cancelFrame:fi,syncFocusToScroll:function(L=!1){var Q;if(!$e.value)return;const le=Pe.value||me();if(!le)return;const ae=le.ownerDocument||((Q=R.value)==null?void 0:Q.ownerDocument)||document,be=ae?.defaultView||(typeof window<"u"?window:null),Te=le===ae?.documentElement||le===ae?.body,ze=Lt.value.length;if(ze<=0)return;if(!Te&&ze>0&&Ie(le)){const at=Qt("syncFocusToScroll.clientHeight",()=>le.clientHeight||0),Mt=Qt("syncFocusToScroll.scrollTop",()=>le.scrollTop),mt=Mt<0?-Mt:Mt;return void Yp(Js((We=Math.max(0,mt)+.5*Math.max(0,at),Je.estimateIndexForOffsetFromEnd(We)),0,Math.max(0,ze-1)),L)}var We;const lt=(function(at,Mt,mt,zt){const qt=R.value;if(!qt)return null;const en=zt?0:Qt("syncFocusToScroll.model.root.getBoundingClientRect",()=>at.getBoundingClientRect().top),Yt=Qt("syncFocusToScroll.model.container.getBoundingClientRect",()=>qt.getBoundingClientRect().top),tn=Math.max(0,en-Yt),kn=zt?Qt("syncFocusToScroll.model.viewport.clientHeight",()=>{var In,hi,Xs,Ds;return(Ds=(Xs=(hi=mt?.innerHeight)!=null?hi:(In=Mt.documentElement)==null?void 0:In.clientHeight)!=null?Xs:at.clientHeight)!=null?Ds:0}):Qt("syncFocusToScroll.model.root.clientHeight",()=>at.clientHeight);return Js($t(tn+.5*Math.max(0,kn)),0,Math.max(0,Lt.value.length-1))})(le,ae,be,Te);if(lt!=null)return void Yp(lt,L);const qe=Te?null:Qt("syncFocusToScroll.root.getBoundingClientRect",()=>le.getBoundingClientRect()),Xe=Te?0:qe.top,rt=Te?Qt("syncFocusToScroll.viewport.clientHeight",()=>{var at,Mt;return(Mt=(at=be?.innerHeight)!=null?at:le.clientHeight)!=null?Mt:0}):qe.bottom,Oe=Se.value;let et=null,ut=null;for(const[at,Mt]of Oe){if(!Mt)continue;const mt=Qt("syncFocusToScroll.slot.getBoundingClientRect",()=>Mt.getBoundingClientRect());mt.bottom<=Xe||mt.top>=rt||(et==null&&(et=at),ut=at)}if(et==null||ut==null){const at=R.value;if(!at)return;const Mt=Te?{top:0}:Qt("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>le.getBoundingClientRect()),mt=Qt("syncFocusToScroll.fallback.scrollTop",()=>je(le,ae,Te)),zt=Te?(()=>{const en=Qt("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>at.getBoundingClientRect()),Yt=(Te?0:Mt.top)-en.top;return Math.max(0,Yt)})():(()=>{const en=ke(at,le);return Math.max(0,mt-en)})(),qt=Te?Qt("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var en,Yt,tn,kn;return(kn=(tn=(Yt=be?.innerHeight)!=null?Yt:(en=ae?.documentElement)==null?void 0:en.clientHeight)!=null?tn:le.clientHeight)!=null?kn:0}):Qt("syncFocusToScroll.fallback.root.clientHeight",()=>le.clientHeight);return void Yp(Js($t(zt+.5*Math.max(0,qt)),0,Math.max(0,Lt.value.length-1)),!0)}Yp(Math.round((et+ut)/2),L)}}),{visibleNodeIndices:qv,nodeVisibilityHandles:ud,nodeVisibilityWatchStops:Gp,nodeVisibilityFallbackTimers:Rk,clearVisibilityFallback:Qp,markNodeVisible:Da,cleanupNodeVisibility:nR,destroyNodeVisibilityState:Uv}=jme({isClient:j,shouldTrackVisibleNodeIndices:()=>Cl.value,shouldCleanupNodeVisibility:()=>$e.value,onNodeMarkedVisible:L=>{$e.value?Zr():Yl.value=Js(L,0,Math.max(0,Lt.value.length-1))},onNodeVisibilityCleaned:L=>{Me.delete(L)&&d6()}}),{cleanupScrollListener:zk,setupScrollListener:iR}=(function(L){const{isClient:Q,virtualizationEnabled:le,listenerEnabled:ae,scrollRootElement:be,resolveScrollContainer:Te,scheduleFocusSync:ze,onScroll:We}=L;let lt=null,qe=null;function Xe(){lt&&(lt(),lt=null),qe=null,be.value=null}function rt(Oe){const et=L.getScrollTop?L.getScrollTop(Oe):Oe.scrollTop;return Math.max(0,Number.isFinite(et)?Math.abs(et):0)}return{cleanupScrollListener:Xe,setupScrollListener:function(){if(!Q)return;if(!((Oe=ae?.value)!=null?Oe:le.value))return void Xe();var Oe;const et=Te();if(!et)return void Xe();if(be.value===et&<)return;Xe(),qe=rt(et);const ut=()=>{if(We?.(),le.value){const at=(function(Mt){const mt=rt(Mt),zt=qe;qe=mt;const qt=Math.max(480,.75*(Mt.clientHeight||0));return zt==null?mt>qt?{immediate:!0}:void 0:Math.abs(mt-zt)>qt?{immediate:!0}:void 0})(et);at?ze(at):ze()}};et.addEventListener("scroll",ut,{passive:!0}),be.value=et,lt=()=>{et.removeEventListener("scroll",ut)}}}})({isClient:j,virtualizationEnabled:$e,listenerEnabled:Lk,scrollRootElement:Pe,resolveScrollContainer:me,scheduleFocusSync:Zr,onScroll:function(){const L=Ye.value;if(!L)return;const Q=Xf();if(!Q||(function(ae){if(oh()>=bt)return nn=null,!1;const be=nn;if(be==null)return!0;const Te=Math.abs(ae.scrollTop-be)<=2;return Te||(nn=null),Te})(Q))return;const le=Xk(Q);le!=null?(le<-32||Math.abs(Math.max(0,le)-Math.max(0,L.distanceFromBottomPx))>32)&&gd("restore"):gd("restore")},getScrollTop:L=>{var Q;const le=L.ownerDocument||((Q=R.value)==null?void 0:Q.ownerDocument)||document,ae=L===le.documentElement||L===le.body||L===le.scrollingElement;return Qt("scrollListener.getScrollTop",()=>je(L,le,ae))}});function Yp(L,Q=!1){const le=Js(L,0,Math.max(0,Lt.value.length-1));!Q&&Math.abs(le-Yl.value)<=1||(Yl.value=le,Yf())}function Js(L,Q,le){return Math.min(Math.max(L,Q),le)}function Kv(L=Lt.value.length){const Q=xi();return!Number.isInteger(Q)||Q<0?L:Js(Q,0,L)}function Vv(L){return L?.firstElementChild}function Ok(L,Q){var le;return L?(le=L.matches)!=null&&le.call(L,Q)?L:L.querySelector(Q):null}function sR(L,Q){L<1||L>6||(K[L]=Q)}function Pk(){if(!ri.value)return void(ee.value=0);const L=Qt("updateExperimentContainerWidth.clientWidth",()=>{var Q,le;return(le=(Q=R.value)==null?void 0:Q.clientWidth)!=null?le:0});ee.value=L>0?L:0}let Jf=null;function Zv(){Jf?.disconnect(),Jf=null}const jk=Xh("ViewportDeferredMarkdownCodeBlockNode",rl({loader:()=>Ti(null,null,function*(){return(yield ns(()=>import("./index5-BHVixm2V.js"),__vite__mapDeps([6,4,5]))).default}),loadingComponent:Xm,delay:0,suspensible:!1}),Xm);function Hk(L){return L===jk}const Wk=F(()=>g.value==="pre"?Jo:g.value==="shiki"?jk:Zy);function qk(){var L;return((L=T.codeBlockProps)==null?void 0:L.showHeader)!==!1}function Uk(L,Q,le){const ae=Xi[Q],be=typeof ae=="number"&&ae>0;if(jo.value&&!be&&!(function(Te){return!!mi.value.paragraph&&(Te.type==="paragraph"||Te.type==="list_item"||Te.type==="list")})(L)){const Te=BB(L,le,ue.value);if(Te)return Te}if(ft.value&&L.type==="code_block"){const Te=(function(ze){if(ze.type!=="code_block")return null;const We=w6(ze,l0(ze));return Hk(We)?"markdown":We===Jo?"pre":We===Wk.value||We===Zy?"monaco":null})(L);if(Te==="monaco"||Te==="markdown"||Te==="pre")return(function(ze,We){var lt,qe,Xe;if(!ze||ze.type!=="code_block")return null;const rt=We.rendererKind,Oe=rt!=="pre"&&We.showHeader!==!1,et=!!ze.diff;let ut=0,at=500;if(rt==="monaco"){const mt=(lt=We.monacoOptions)!=null?lt:{},zt=i4(ze,mt,We.width),qt=(function(Yt){const tn=typeof Yt?.fontSize=="number"&&Yt.fontSize>0?Yt.fontSize:12;return typeof Yt?.lineHeight=="number"&&Yt.lineHeight>0?Yt.lineHeight:Math.round(1.5*tn)})(mt),en=(function(Yt,tn){var kn,In;const hi=typeof((kn=Yt?.padding)==null?void 0:kn.top)=="number"?Yt.padding.top:tn?0:8,Xs=typeof((In=Yt?.padding)==null?void 0:In.bottom)=="number"?Yt.padding.bottom:tn?0:8;return Math.max(0,hi)+Math.max(0,Xs)})(mt,et);at=typeof mt.MAX_HEIGHT=="number"&&mt.MAX_HEIGHT>0?mt.MAX_HEIGHT:500,ut=Math.round(zt*qt+en)}else if(rt==="markdown"){const mt=i4(ze);ut=Math.round(21*mt+32)}else{const mt=i4(ze);ut=Math.round(28*mt),at=Number.POSITIVE_INFINITY}const Mt=Math.max(1,Math.min(ut,at));return At({kind:"code-block",height:Math.round(Mt+(Oe?40:0)),contentHeight:Mt,rendererKind:rt},et&&rt==="monaco"?{diffInline:Db((qe=We.monacoOptions)!=null?qe:{},(Xe=We.width)!=null?Xe:0)}:{})})(L,{rendererKind:Te,monacoOptions:T.codeBlockMonacoOptions,showHeader:qk(),width:le})}return null}I4(()=>{if(Gl.value,oe>0)return;const L=Lt.value,Q=Qi();if(!L.length||!cr.value)return qo=[],Er=[],dr=-1,po.clear(),void(fr.value=Al);const le=ee.value||Qt("estimatedNodeHeights.clientWidth",()=>{var qe;return((qe=R.value)==null?void 0:qe.clientWidth)||0});if(!Number.isFinite(le)||le<=0)return qo=[],Er=[],dr=-1,po.clear(),void(fr.value=Al);const ae=(function(qe){return[Math.round(qe),jo.value,ft.value,ue.value,T.codeBlockMonacoOptions,qk(),g.value,mi.value,e4.value]})(le),be=qo.length<=L.length&&(ze=ae,(Te=Er).length===ze.length&&Te.every((qe,Xe)=>Object.is(qe,ze[Xe])));var Te,ze;const We=be&&dr===Q?L.length:be?Kv(L.length):0,lt=be?Array.from(po):[];qo.length=L.length;for(let qe=We;qe<L.length;qe++)qo[qe]=Uk(L[qe],qe,le);for(const qe of lt)qe>=0&&qe<L.length&&qe<We&&(qo[qe]=Uk(L[qe],qe,le));po.clear(),Er=ae,dr=Q,fr.value=qo,xz(fr)},{flush:"sync"});const cd=F(()=>fr.value);Je=(function(L){let Q=!0,le=[0],ae="";function be(Xe){var rt;const Oe=L.nodeHeights[Xe];if(Number.isFinite(Oe)&&Oe>0)return Oe;const et=L.parsedNodes.value[Xe],ut=et?.type,at=!!((rt=L.hasCustomParagraphComponent)!=null&&rt.call(L)),Mt=L.estimatedNodeHeights.value[Xe],mt=Mt?.height;if(!(function(qt,en,Yt){return!!(Yt&&en?.kind==="simple-text"&&(qt==="paragraph"||qt==="list_item"||qt==="list"))})(ut,Mt,at)&&Number.isFinite(mt)&&mt>0)return mt;const zt=Eme(et,L.getContainerWidth()||640);return ut==="heading"||ut==="paragraph"&&zt<=28&&(function(qt,en){if(en)return!1;const Yt=qt.children;return!Array.isArray(Yt)||!Yt.length||Yt.every(DB)})(et,at)?zt:Math.max(L.averageNodeHeight.value,zt)}function Te(){var Xe;const rt=L.parsedNodes.value.length,Oe=L.getPrefixCacheKeyParts().join(":");if(!Q&&ae===Oe)return le;const et=new Array(rt+1);et[0]=0;for(let ut=0;ut<rt;ut++)et[ut+1]=et[ut]+(L.heightEstimationActive.value?be(ut):(Xe=L.nodeHeights[ut])!=null?Xe:L.averageNodeHeight.value);return le=et,ae=Oe,Q=!1,et}function ze(Xe){var rt,Oe;const et=L.parsedNodes.value.length;if(et<=0||Xe<=0)return 0;const ut=Te();if(Xe>=((rt=ut[et])!=null?rt:0))return et-1;let at=0,Mt=et-1,mt=et-1;for(;at<=Mt;){const zt=at+Mt>>1;((Oe=ut[zt+1])!=null?Oe:0)>=Xe?(mt=zt,Mt=zt-1):at=zt+1}return mt}function We(Xe,rt){var Oe,et;if(Xe>=rt)return 0;if(L.heightEstimationActive.value)return(function(Mt,mt){var zt,qt;const en=L.parsedNodes.value.length,Yt=Y_(Math.trunc(Mt),0,en),tn=Y_(Math.trunc(mt),Yt,en);if(Yt>=tn)return 0;const kn=Te();return((zt=kn[tn])!=null?zt:0)-((qt=kn[Yt])!=null?qt:0)})(Xe,rt);if(L.heightTreeSize.value!==L.parsedNodes.value.length){let Mt=0;for(let mt=Xe;mt<rt;mt++)Mt+=(Oe=L.nodeHeights[mt])!=null?Oe:L.averageNodeHeight.value;return Mt}const ut=L.heightSumTree.value,at=L.heightKnownTree.value;if(!ut.length||!at.length){let Mt=0;for(let mt=Xe;mt<rt;mt++)Mt+=(et=L.nodeHeights[mt])!=null?et:L.averageNodeHeight.value;return Mt}return L.fenwickRangeSum(ut,Xe,rt)+(rt-Xe-L.fenwickRangeSum(at,Xe,rt))*L.averageNodeHeight.value}function lt(Xe){var rt;if(Xe<=0)return 0;const Oe=L.parsedNodes.value;if(L.heightEstimationActive.value)return ze(Xe);if(L.heightTreeSize.value===Oe.length&&L.heightSumTree.value.length&&L.heightKnownTree.value.length){const ut=L.averageNodeHeight.value,at=L.heightSumTree.value,Mt=L.heightKnownTree.value,mt=Yt=>Yt<=0?0:L.fenwickRangeSum(at,0,Yt)+(Yt-L.fenwickRangeSum(Mt,0,Yt))*ut;let zt=0,qt=Oe.length-1,en=Oe.length-1;for(;zt<=qt;){const Yt=zt+qt>>1;mt(Yt+1)>=Xe?(en=Yt,qt=Yt-1):zt=Yt+1}return en}let et=Xe;for(let ut=0;ut<Oe.length;ut++){const at=(rt=L.nodeHeights[ut])!=null?rt:L.averageNodeHeight.value;if(et<=at)return ut;et-=at}return Math.max(0,Oe.length-1)}function qe(){if(!L.heightEstimationActive.value)return 0;let Xe=0;const rt=L.estimatedNodeHeights.value;for(let Oe=0;Oe<rt.length;Oe++){if(!rt[Oe])continue;const et=L.nodeHeights[Oe];Number.isFinite(et)&&et>0||Xe++}return Xe}return{markFallbackHeightPrefixDirty:function(){Q=!0},getFallbackNodeHeight:be,estimateHeightRange:We,estimateIndexForOffset:lt,estimateIndexForOffsetFromEnd:function(Xe){var rt,Oe;const et=L.parsedNodes.value;if(!et.length)return 0;if(Xe<=0)return Math.max(0,et.length-1);if(L.heightEstimationActive.value){const at=(rt=Te()[et.length])!=null?rt:0;return ze(Math.max(0,at-Xe))}if(L.heightTreeSize.value===et.length){const at=We(0,et.length);return lt(Math.max(0,at-Xe))}let ut=Xe;for(let at=et.length-1;at>=0;at--){const Mt=(Oe=L.nodeHeights[at])!=null?Oe:L.averageNodeHeight.value;if(ut<=Mt)return at;ut-=Mt}return 0},getEstimatedNodeHeightCount:qe,buildVirtualHeightSummary:function(Xe){var rt;const Oe=L.parsedNodes.value.length;return{totalNodes:Oe,measuredCount:L.heightStats.count,estimatedCount:qe(),averageNodeHeight:L.averageNodeHeight.value,topSpacerHeight:Xe.topSpacerHeight,bottomSpacerHeight:Xe.bottomSpacerHeight,estimatedTotalHeight:We(0,Oe),width:(rt=Xe.width)!=null?rt:L.getContainerWidth()}}}})({parsedNodes:Lt,nodeHeights:Xi,heightStats:os,heightTreeSize:Ku,heightSumTree:ld,heightKnownTree:Hp,averageNodeHeight:Gf,heightEstimationActive:ri,estimatedNodeHeights:cd,getContainerWidth:On,hasCustomParagraphComponent:()=>!!mi.value.paragraph,getPrefixCacheKeyParts:()=>{var L;const Q=Nh(ee.value||Qt("getFallbackHeightPrefix.clientWidth",()=>{var ae;return((ae=R.value)==null?void 0:ae.clientWidth)||0})),le=((L=i.virtualScroll)==null?void 0:L.measurementKey)==null?"":String(i.virtualScroll.measurementKey);return[Lt.value.length,os.count,Math.round(os.total),Math.round(100*Gf.value),le,Q,ri.value?1:0,e4.value,X.value,mi.value.paragraph?1:0]},fenwickRangeSum:Ge}),Qe(()=>Lt.value.length,L=>{var Q;Ot(),L<=0?Ai():(L<Ku.value&&(Q=L,qn(),fn(()=>qp(Q))),L!==Ku.value&&ad(L))},{immediate:!0});const oR=F(()=>{if(!$e.value)return Lt.value.map((ae,be)=>({node:ae,index:be}));const L=Lt.value.length,Q=Js(Ys.start,0,L),le=Js(Ys.end,Q,L);return Lt.value.slice(Q,le).map((ae,be)=>({node:ae,index:Q+be}))}),Gv=F(()=>$e.value?Qn(0,Math.min(Ys.start,Lt.value.length)):0),Qv=F(()=>{if(!$e.value)return 0;const L=Lt.value.length;return Qn(Math.min(Ys.end,L),L)});function Kk(){return Je.buildVirtualHeightSummary({topSpacerHeight:Gv.value,bottomSpacerHeight:Qv.value,width:Gu()})}function rR(){const L=Lt.value,Q=Kk();return dn(At({},Q),{probe:{paragraphReady:!!ue.value.paragraph,listItemReady:!!ue.value.listItem,listWrapperOverhead:ue.value.listWrapperOverhead,headingReadyLevels:Object.entries(ue.value.headings).filter(([,le])=>!!le).map(([le])=>Number(le))},nodes:L.map((le,ae)=>{var be,Te,ze,We,lt,qe,Xe,rt,Oe;return{index:ae,type:le.type,estimateKind:(Te=(be=cd.value[ae])==null?void 0:be.kind)!=null?Te:null,rendererKind:(We=(ze=cd.value[ae])==null?void 0:ze.rendererKind)!=null?We:null,estimatedHeight:(qe=(lt=cd.value[ae])==null?void 0:lt.height)!=null?qe:null,estimatedContentHeight:(rt=(Xe=cd.value[ae])==null?void 0:Xe.contentHeight)!=null?rt:null,measuredHeight:(Oe=Xi[ae])!=null?Oe:null}})})}function Yv(){return i.indexKey!=null?String(i.indexKey):Dn.value?`virtual-${Ri()}`:"markdown-renderer"}function Vk(L){const Q=String(L),le=`${Yv()}-`;if(!Q.startsWith(le))return null;const ae=Q.slice(le.length).match(/^(\d+)(?:$|-)/);if(!ae)return null;const be=Number(ae[1]);return!Number.isInteger(be)||be<0||be>=Lt.value.length?null:be}function Ri(){var L,Q,le;const ae=(L=i.virtualScroll)==null?void 0:L.sessionKey;return String(ae!=null&&ae!==""?ae:(le=(Q=i.indexKey)!=null?Q:T.customId)!=null?le:ni)}function fs(){var L;const Q=(L=i.virtualScroll)==null?void 0:L.threadKey;return Q==null||Q===""?void 0:String(Q)}const lR=F(()=>{var L,Q,le;return(le=fs())!=null?le:String((Q=(L=i.indexKey)!=null?L:T.customId)!=null?Q:ni)});function Jv(L){var Q;return(L??"")===((Q=fs())!=null?Q:"")}function Xl(){var L,Q,le;return Q=(L=i.virtualScroll)==null?void 0:L.measurementKey,le=(function(){const ae=g.value;return(function(be){var Te,ze;const We=be.renderer,lt=We==="monaco"?be.codeBlockMonacoOptions:void 0,qe=be.codeBlockProps,Xe=We==="shiki";return[be.isDark?"dark":"light",We==="monaco"?"code-rich":We==="pre"?"code-pre":"code-shiki",be.codeBlockStream===!1?"code-static":"code-stream",Rs(be.codeBlockMinWidth),Rs(be.codeBlockMaxWidth),...Xe?[bpe((Te=qe?.themes)!=null?Te:be.themes,(ze=qe?.langs)!=null?ze:be.langs)]:[],Rs(lt?.fontSize),Rs(lt?.lineHeight),Rs(lt?.fontFamily),Rs(lt?.tabSize),Rs(lt?.MAX_HEIGHT),Rs(lt?.wordWrap),Rs(lt?.wrappingIndent),Rs(lt?.padding),Rs(qe?.showHeader),Rs(qe?.showCopyButton),Rs(qe?.showExpandButton),Rs(qe?.showPreviewButton),Rs(qe?.showCollapseButton),Rs(qe?.showFontSizeButtons)].join("\0")})({renderer:ae,isDark:T.isDark,codeBlockStream:T.codeBlockStream,codeBlockMinWidth:T.codeBlockMinWidth,codeBlockMaxWidth:T.codeBlockMaxWidth,codeBlockMonacoOptions:ae==="monaco"?T.codeBlockMonacoOptions:void 0,codeBlockProps:T.codeBlockProps,themes:ae==="shiki"?T.themes:void 0,langs:ae==="shiki"?T.langs:void 0})})(),[Q==null?"":String(Q),le].join("\0")}function Gu(){return On()}const Jp=F(()=>Nh(Gu())),gr=F(()=>[Xl(),Jp.value].join("\0")),aR=F(()=>{var L;return Dn.value?["virtual",(L=fs())!=null?L:"",Ri(),gr.value].join("\0"):i.indexKey});function dd(){Bk.value+=1}function Xv(L){return!(!L||!Number.isInteger(L.index)||L.index<0||L.index>=Lt.value.length||L.sessionKey!==Ri()||L.threadKey!==fs()||L.layoutEpochKey!==gr.value)}function Zk(L){const Q=String(L),le=xl.get(Q);return le?Xv(le)?le.index:null:Vk(Q)}function Gk(L="async-node"){(hr.size||xl.size)&&(hr.clear(),xl.clear(),dd(),Ii(L))}const fd=an(o8,null),e9={reportHeight(L,Q){if(!Cn.value)return;const le=Zk(L);if(le==null)return;const ae=wl.get(le);if(!ae)return;const be=Number(Q),Te=Qf(le,ae);(function(ze,We,lt={}){fn(()=>Vu(ze,We,lt))})(le,Number.isFinite(be)&&be>0?Math.max(be,Te||0):Te)},markPending(L){if(!Cn.value)return;const Q=Vk(L);Q!=null&&(function(le,ae){var be;const Te=xl.get(le);if(Te&&Xv(Te))return hr.set(le,Math.max(0,(be=hr.get(le))!=null?be:0)+1),dd(),void Ii("async-node");hr.set(le,1),xl.set(le,(function(ze){return{index:ze,sessionKey:Ri(),threadKey:fs(),layoutEpochKey:gr.value}})(ae)),dd(),Ii("async-node")})(String(L),Q)},markSettled(L){if(!Cn.value)return;const Q=String(L),le=Zk(L);(le!=null||(function(ae){return hr.has(String(ae))})(Q))&&(function(ae){var be;const Te=(be=hr.get(ae))!=null?be:0;return!(Te<=0||(Te<=1?(hr.delete(ae),xl.delete(ae)):hr.set(ae,Te-1),dd(),Te===1&&Ii("async-node"),0))})(Q)&&le!=null&&ea()}};function uR(){let L=0;for(const Q of wl.values())L+=Qt("getVisibleDomHeight.offsetHeight",()=>{var le;return(le=Q?.offsetHeight)!=null?le:0});return Math.ceil(Math.max(0,L))}Pn(o8,{reportHeight(L,Q){e9.reportHeight(L,Q),fd?.reportHeight(L,Q)},markPending(L){e9.markPending(L),fd?.markPending(L)},markSettled(L){e9.markSettled(L),fd?.markSettled(L)}});let t9,n9=null,hd=null;function Xp(L){return L!==!1&&L!=null&&L!==""}function Qk(){return $e.value?(function(){if(!$e.value)return!0;const L=Lt.value.length,Q=Js(Ys.start,0,L),le=Js(Ys.end,Q,L);if(Q>=le)return!0;for(let ae=Q;ae<le;ae++)if(!Me.has(ae)||i0(ae)&&!wl.has(ae))return!1;return!0})():yi.value>=Kp.value}function i9(){return Re.value===!0&&!ht.value&&Hv.value===0&&$a.size===0&&Jl.size===0&&pr==null&&Qk()}function Yk(){var L,Q;if(((L=i.virtualScroll)==null?void 0:L.settleMode)!=="manual"||n9===Ri()&&t9===fs())return!0;const le=(Q=i.virtualScroll)==null?void 0:Q.settledToken;return!!Xp(le)&&hd===fh(le)}function s9(){return i9()&&Yk()}function cR(L,Q){return Q.totalNodes<=0?L==="final"?"final":"estimate":Q.measuredCount>=Q.totalNodes?L==="final"?"final":"measured":Q.measuredCount>0||Q.estimatedCount>0?"mixed":"estimate"}function Qu(L="manual",Q){const le=Kk(),ae=(function(be){return be||(Re.value!==!0?Lt.value.length>0?"streaming":"estimating":!Qk()||Jl.size>0||pr!=null?"measuring":s9()?"settled":"settling")})(Q);return{sessionKey:Ri(),threadKey:fs(),phase:ae,nodeCount:le.totalNodes,liveRange:{start:Ys.start,end:Ys.end},renderedCount:yi.value,measuredCount:le.measuredCount,estimatedCount:le.estimatedCount,averageNodeHeight:le.averageNodeHeight,topSpacerHeight:le.topSpacerHeight,bottomSpacerHeight:le.bottomSpacerHeight,visibleDomHeight:uR(),totalHeight:Jk(),width:le.width,final:Re.value===!0,stable:s9(),confidence:cR(ae,le),reason:L}}function Xf(){const L=Pe.value||me(),Q=R.value;if(!L||!Q)return null;const le=L.ownerDocument||Q.ownerDocument||document,ae=L===le.documentElement||L===le.body||L===le.scrollingElement,be=Qt("getScrollBox.scrollTop",()=>je(L,le,ae)),Te=Qt("getScrollBox.scrollHeight",()=>{var We,lt,qe,Xe,rt;return ae?Math.max((lt=(We=le.documentElement)==null?void 0:We.scrollHeight)!=null?lt:0,(Xe=(qe=le.body)==null?void 0:qe.scrollHeight)!=null?Xe:0,(rt=L.scrollHeight)!=null?rt:0):L.scrollHeight}),ze=Qt("getScrollBox.clientHeight",()=>{var We;return ae?((We=le.documentElement)==null?void 0:We.clientHeight)||L.clientHeight||0:L.clientHeight});return{root:L,doc:le,isViewportRoot:ae,scrollTop:be,scrollHeight:Te,clientHeight:ze}}function Jk(){const L=Lt.value.length,Q=Math.max(0,Qn(0,L)),le=Qt("getRendererLogicalHeight.offsetHeight",()=>{var be,Te;return(Te=(be=R.value)==null?void 0:be.offsetHeight)!=null?Te:0}),ae=Math.max(0,le>0?le:Qt("getRendererLogicalHeight.scrollHeight",()=>{var be,Te;return(Te=(be=R.value)==null?void 0:be.scrollHeight)!=null?Te:0}));return L<=0?Math.ceil(le):$e.value?Q>0?Math.max(1,Math.ceil(Q),(function(){let be=Gv.value+Qv.value;for(const Te of Me.values())Te&&(be+=Math.max(0,Qt("getVirtualizedDomLogicalHeight.offsetHeight",()=>Te.offsetHeight||0)));return Math.ceil(Math.max(0,be))})(),(function(be,Te){return be<=0||Te<=0?0:Te<=be+Math.max(512,.05*be)?Math.ceil(Te):0})(Q,ae)):Math.max(1,Math.ceil(ae)):Cn.value?Q>0||os.count>0||Je.getEstimatedNodeHeightCount()>0?(fo.value&&yi.value,Math.max(1,Math.ceil(ae),Math.ceil(Q))):Math.ceil(ae):Math.max(1,Math.ceil(ae),Math.ceil(Q))}function Xk(L){const Q=R.value;if(!Q)return null;const le=Qt("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>Q.getBoundingClientRect());return(function(be){return be.isViewportRoot?be.clientHeight:Qt("getViewportBottomInRoot.getBoundingClientRect",()=>be.root.getBoundingClientRect().bottom)})(L)-le.bottom}function dR(L={}){const Q=L.requireViewport!==!1,le=(function(Te=64){const ze=Xf(),We=R.value;if(!ze||!We)return!1;const lt=(function(Xe){if(Xe.isViewportRoot)return{top:0,bottom:Xe.clientHeight};const rt=Qt("getVirtualViewportRect.getBoundingClientRect",()=>Xe.root.getBoundingClientRect());return{top:rt.top,bottom:rt.bottom}})(ze),qe=Qt("isRendererNearVirtualViewport.getBoundingClientRect",()=>We.getBoundingClientRect());return qe.bottom>=lt.top-Te&&qe.top<=lt.bottom+Te})();if(Q&&!le)return null;const ae=(function(){const Te=Xf(),ze=R.value;if(!Te||!ze||Math.max(0,Te.scrollHeight-Te.scrollTop-Te.clientHeight)>64)return null;const We=Xk(Te);return We==null?null:We>=-8&&We<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,We)}:null})();if(ae)return{anchor:ae,captured:!0};const be=ki();if(be)return{anchor:{type:"node",nodeIndex:be.nodeIndex,offsetWithinNodePx:be.offsetWithinNodePx},captured:le};if(L.allowFallback===!0){const Te=(function(){const ze=Lt.value.length;return ze<=0?null:{type:"node",nodeIndex:Js(Yl.value,0,Math.max(0,ze-1)),offsetWithinNodePx:0}})();return Te?{anchor:Te,captured:!1}:null}return null}function o9(L){let Q=2166136261;for(let le=0;le<L.length;le++)Q^=L.charCodeAt(le),Q=Math.imul(Q,16777619);return(Q>>>0).toString(36)}function fR(L,Q){let le=L;for(let ae=0;ae<Q.length;ae++)le^=Q.charCodeAt(ae),le=Math.imul(le,16777619);return le^=31,le=Math.imul(le,16777619),le}const hR=new Set(["children","items","header","rows","cells","attrs","data","term","definition"]);function e0(L,Q=new WeakSet,le=0){if(L==null||typeof L=="number"||typeof L=="boolean")return String(L);if(typeof L=="string")return`s:${(function(ae){const be=ae.length>8192?`${ae.slice(0,8192)}...${ae.length}`:ae;return`${ae.length}:${o9(be)}`})(L)}`;if(typeof L=="function")return"fn";if(typeof L!="object")return typeof L;if(Q.has(L))return"cycle";if(le>=6)return"max-depth";Q.add(L);try{if(Array.isArray(L)){if(L.length<=160){const qe=[];for(let Xe=0;Xe<L.length;Xe++)qe.push(e0(L[Xe],Q,le+1));return`a:${L.length}:${qe.join(",")}`}const Te=[],ze=[],We=Math.max(0,L.length-32);let lt=2166136261;for(let qe=0;qe<L.length;qe++){const Xe=e0(L[qe],Q,le+1);lt=fR(lt,Xe),qe<32&&Te.push(Xe),qe>=We&&ze.push(Xe)}return[`a:${L.length}`,`h=${Te.join(",")}`,`t=${ze.join(",")}`,`all=${(lt>>>0).toString(36)}`].join(":")}const ae=L,be=Object.keys(ae).filter(Te=>{const ze=ae[Te];return Te!=="parent"&&Te!=="el"&&Te!=="component"&&(ze==null||typeof ze=="string"||typeof ze=="number"||typeof ze=="boolean"||hR.has(Te))}).sort();return`o:${be.length}:${be.map(Te=>`${Te}=${e0(ae[Te],Q,le+1)}`).join(";")}`}finally{Q.delete(L)}}let r9=-1,l9="",Yu=[2166136261];function eh(L){const Q=Lt.value[L];return Q?o9(e0(Q)):""}function pR(L,Q){let le=L;for(let ae=0;ae<Q.length;ae++)le^=Q.charCodeAt(ae),le=Math.imul(le,16777619);return le>>>0}function a9(){var L,Q;const le=X.value;if(r9===le)return l9;const ae=Lt.value.length;let be=Kv(ae);(r9!==le-1||be>ae||Yu.length<be+1)&&(be=0),be===0?Yu=[2166136261]:Yu.length=be+1;for(let Te=be;Te<ae;Te++){const ze=eh(Te);Yu[Te+1]=pR((L=Yu[Te])!=null?L:2166136261,ze)}return Yu.length=ae+1,l9=(((Q=Yu[ae])!=null?Q:2166136261)>>>0).toString(36),r9=le,l9}function pd(L,Q={}){var le;const ae=Q.includeHeightCache===!0,be=(le=Q.includeContentHash)!=null?le:ae,Te=ae?(function(We){const lt=(function(){var at,Mt;const mt=Number((Mt=(at=i.virtualScroll)==null?void 0:at.heightCacheLimit)!=null?Mt:5e3);return!Number.isFinite(mt)||mt<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(mt))})();if(!Number.isFinite(lt)||We.length<=lt)return We;const qe=new Map,Xe=at=>{!at||qe.size>=lt||qe.set(at.index,at)},rt=Lt.value.length,Oe=Js(Ys.start-2*Ji.value,0,rt),et=Js(Ys.end+2*Ji.value,Oe,rt);for(const at of We)at.index>=Oe&&at.index<et&&Xe(at);const ut=Math.max(1,Math.ceil(We.length/lt));for(let at=0;at<We.length&&qe.size<lt;at+=ut)Xe(We[at]);for(let at=We.length-1;at>=0&&qe.size<lt;at-=ut)Xe(We[at]);return Array.from(qe.values()).sort((at,Mt)=>at.index-Mt.index).slice(0,lt)})(ge().map(We=>{var lt;const qe=Lt.value[We.index];return qe?dn(At({},We),{nodeType:String((lt=qe.type)!=null?lt:""),signature:eh(We.index)}):null}).filter(We=>!!We)):[],ze=dR({allowFallback:Q.allowAnchorFallback===!0,requireViewport:Q.requireViewport});return ze||Te.length||Q.includeEmptyState===!0?dn(At({sessionKey:L.sessionKey,threadKey:L.threadKey},ze?{anchor:ze.anchor,anchorCaptured:ze.captured}:{anchorCaptured:!1}),{metrics:L,width:L.width,contentHash:be?a9():void 0,measurementKey:Xl()||void 0,heightCache:Te.length?Te:void 0}):null}function u9(L){var Q,le;const ae=Xf();if(!ae)return;const be=(function(We){const lt=R.value;if(!lt)return null;const qe=ke(lt,We.root),Xe=Lt.value.length,rt=Qt("getRendererBottomOffsetWithinRoot.offsetHeight",()=>lt.offsetHeight||0),Oe=Math.max(0,rt>0?rt:Xe>0?Qt("getRendererBottomOffsetWithinRoot.scrollHeight",()=>lt.scrollHeight||0):0),et=Jk();return qe+Math.max(Oe,et)})(ae);if(be==null)return;const Te=Math.max(0,L.distanceFromBottomPx),ze=Math.max(0,be-ae.clientHeight-Te);(function(We){bt=oh()+120,nn=We})(ze),ae.isViewportRoot?(le=(Q=ae.doc.defaultView)==null?void 0:Q.scrollTo)==null||le.call(Q,0,ze):Z_(ae.root,ae.doc,ze,{isReverseFlexScrollRoot:Ie,getNormalizedScrollTop:je})}const c9=[];function e6(){if(j)for(xt!=null&&(fi?.(xt),xt=null);c9.length;){const L=c9.pop();L!=null&&window.clearTimeout(L)}}function gd(L){const Q=!!Ye.value;Ye.value=null,bt=0,nn=null,e6(),Q&&L&&Ii(L)}function md(){if(!Ye.value||!j||xt!=null)return;const L=()=>{xt=null;const Q=Ye.value;Q&&u9(Q)};xt=di?di(L):null,xt==null&&L()}function t6(L,Q={}){const le=Lt.value.length;return le<=0?[]:L.filter(ae=>!(!Number.isInteger(ae.index)||ae.index<0||ae.index>=le)&&!(!Number.isFinite(ae.height)||ae.height<=0)&&!(Q.requireSignature&&!ae.signature)&&!(Q.requireCompatibilityMetadata&&!ae.nodeType&&!ae.signature)&&(function(be){var Te;const ze=Lt.value[be.index];return!(!ze||be.nodeType&&be.nodeType!==String((Te=ze.type)!=null?Te:"")||be.signature&&be.signature!==eh(be.index))})(ae))}function n6(L){const Q=Nh(Gu()),le=Nh(L);return Q!==-1&&le!==-1&&Q===le}function d9(L){var Q;const le=Number(L?.width);if(Number.isFinite(le)&&le>0)return le;const ae=Number((Q=L?.metrics)==null?void 0:Q.width);return Number.isFinite(ae)&&ae>0?ae:null}function i6(L){var Q;return L.sessionKey===Ri()&&!!Jv(L.threadKey)&&((Q=L.measurementKey)!=null?Q:"")===Xl()&&!!n6(d9(L))&&!!(function(le){const ae=le.heightCache;return!!ae?.length&&(s6(le)?ae.some(be=>!!(be.nodeType||be.signature)):ae.some(be=>!!be.signature))})(L)}function s6(L){return!!(L.contentHash&&L.contentHash===a9())}function gR(L){return!s6(L)}let Ju=null,Xu=null,t0=null,th=null,nh=null;function f9(L){var Q;const le=L.map(be=>{var Te,ze;return[be.index,Math.round(10*be.height),(Te=be.nodeType)!=null?Te:"",(ze=be.signature)!=null?ze:""].join("")}).join(""),ae=Nh(Gu());return[(Q=fs())!=null?Q:"",Ri(),Xl(),Lt.value.length,ae,L.length,o9(le)].join(":")}function o6(L=(Q=>(Q=i.virtualScroll)==null?void 0:Q.heightCache)()){if(!Cn.value||!L?.length||Lt.value.length<=0||!n6((Q=i.virtualScroll)==null?void 0:Q.heightCacheWidth))return!1;var Q;const le=t6(L,{requireSignature:!0});if(!le.length)return!1;const ae=f9(le);return ae===Ju?(Xu="standalone",!0):(Ek(le,{mode:"merge"}),Ot(),Ju=ae,Xu="standalone",lh(),Ii("restore"),!0)}function h9(L,Q={}){var le,ae,be;if(!Cn.value||!L||L.sessionKey!==Ri()||!Jv(L.threadKey)||Lt.value.length<=0)return!1;const Te=!!((le=L.heightCache)!=null&&le.length)&&!n0(),ze=!L.anchor||L.anchorCaptured===!1&&Q.allowUncapturedAnchor!==!0?null:L.anchor,We=Q.restoreAnchor===!0&&!!ze&&!n0()&&Number(d9(L))>0;let lt=!1;if((ae=L.heightCache)!=null&&ae.length&&i6(L)){const Xe=t6(L.heightCache,{requireCompatibilityMetadata:!L.contentHash,requireSignature:gR(L)});Xe.length&&(Ek(Xe,{mode:"merge"}),Ot(),Ju=f9(Xe),Xu="restore",lh(),lt=!0)}if(Te||We)return!1;if(!Q.restoreAnchor||!ze)return lt&&Ii("restore"),!0;const qe=(function(Xe,rt){var Oe;const et=Xe.anchor,ut=et?et.type==="bottom"?`bottom:${Math.round(et.distanceFromBottomPx)}`:`node:${et.nodeIndex}:${Math.round(et.offsetWithinNodePx)}`:"none";return[(Oe=fs())!=null?Oe:"",Ri(),Xl(),Jp.value,rt,ut].join(":")})(L,(be=Q.restoreToken)!=null?be:"imperative");return t0===qe?(lt&&Ii("restore"),!0):(t0=qe,(function(Xe){const rt=()=>{if(Xe.type==="node")return gd(),void $s({nodeIndex:Xe.nodeIndex,offsetWithinNodePx:Xe.offsetWithinNodePx});if(dt(),Ht.value=null,Ye.value=Xe,e6(),u9(Xe),j)for(const Oe of[0,120,280,480])c9.push(window.setTimeout(()=>{const et=Ye.value;et&&u9(et)},Oe))};(function(Oe){if(!$e.value)return!1;const et=Lt.value.length;return!(et<=0||(Yl.value=Oe.type==="node"?Js(Oe.nodeIndex,0,et-1):et-1,Yf(),0))})(Xe)?kt(rt):rt()})(ze),Ii("restore"),!0)}function n0(){const L=Gu();return Number.isFinite(L)&&L>0}function r6(L){var Q;return L.sessionKey===Ri()&&!!Jv(L.threadKey)&&(Lt.value.length<=0||!(!((Q=L.heightCache)!=null&&Q.length)||n0())||!(!(L.anchor&&Number(d9(L))>0)||n0()))}function p9(){bi.clear();for(const L of Object.keys(Xi)){const Q=Number(L);Number.isInteger(Q)&&Q>=0&&Q<Lt.value.length&&Qs(Q)}}function ih(){pr!=null&&(fi?.(pr),pr=null),w9()}function l6(){return!j||Si?Promise.resolve():new Promise(L=>{let Q=!1,le=null;const ae=()=>{Q||(Q=!0,le!=null&&window.clearTimeout(le),L())};if(di)return di(ae),void(le=window.setTimeout(ae,50));le=window.setTimeout(ae,0)})}function g9(L,Q=fs(),le=gr.value){return Ri()===L&&fs()===Q&&gr.value===le}function m9(){return Ti(this,arguments,function*(L={}){var Q,le,ae,be,Te;const ze=Ri(),We=fs(),lt=gr.value,qe=(Q=L.frames)!=null?Q:2,Xe=(le=L.timeoutMs)!=null?le:120,rt=(ae=L.reason)!=null?ae:"manual",Oe=L.expectedSettledTokenKey,et=L.flushPendingTimers===!0,ut=Qu(rt),at=()=>dn(At({},ut),{phase:ut.final?"settling":ut.phase,stable:!1,confidence:ut.confidence==="final"?"mixed":ut.confidence,reason:rt}),Mt=()=>g9(ze,We,lt)&&(Oe==null||rh()===Oe);for(let en=0;en<qe;en++){if(yield kt(),!Mt()||(yield l6(),!Mt()))return at();ea(),ih()}if(yield(function(en){return!j||en<=0?Promise.resolve():new Promise(Yt=>window.setTimeout(Yt,en))})(Xe),!Mt()||(et&&Dk(),ea(),ih(),!Mt()))return at();const mt=i9();mt&&(n9=ze,t9=We,((be=i.virtualScroll)==null?void 0:be.settleMode)==="manual"&&Oe!=null&&Xp((Te=i.virtualScroll)==null?void 0:Te.settledToken)&&rh()===Oe&&(hd=fh(i.virtualScroll.settledToken)));const zt=Mt()&&mt&&Yk(),qt=Qu(rt,zt?"final":void 0);return A9(qt,!0),qt})}let v9="content",ec=null,tc=null,y9=0,sh=null,vd=null,b9=null,k9=null;function oh(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function a6(L){var Q,le;const ae=sh;if(!ae)return!0;const be=(le=(Q=i.virtualScroll)==null?void 0:Q.heightDiffThresholdPx)!=null?le:1;return Math.abs(L.totalHeight-ae.totalHeight)>be||L.sessionKey!==ae.sessionKey||L.phase!==ae.phase||L.stable!==ae.stable||L.final!==ae.final||L.threadKey!==ae.threadKey||L.nodeCount!==ae.nodeCount||L.measuredCount!==ae.measuredCount||L.width!==ae.width}function rh(L=(Q=>(Q=i.virtualScroll)==null?void 0:Q.settledToken)()){return Rs(L)}function u6(L,Q){var le,ae;return[L,Q.sessionKey,(le=Q.threadKey)!=null?le:"",Xl(),a9(),Rs((ae=i.virtualScroll)==null?void 0:ae.settledToken),Math.round(Q.totalHeight),Math.round(Q.width)].join("\0")}function lh(){b9=null,k9=null,vd=null}function mR(L){const Q=L.heightCache;return Q?.length?f9(Q):""}function ah(L){var Q,le,ae;const be=L.metrics,Te=L.anchor?(ze=L.anchor).type==="bottom"?`bottom:${Math.round(ze.distanceFromBottomPx)}`:`node:${ze.nodeIndex}:${Math.round(ze.offsetWithinNodePx)}`:"none";var ze;return[L.sessionKey,(Q=L.threadKey)!=null?Q:"",(le=L.measurementKey)!=null?le:Xl(),(ae=L.contentHash)!=null?ae:"",mR(L),Te,L.anchorCaptured?1:0,be.liveRange.start,be.liveRange.end,be.renderedCount,be.nodeCount,Math.round(be.totalHeight),Math.round(be.width),be.phase,be.stable?1:0].join("\0")}function A9(L,Q=!1){if(!Cn.value||(function(ze=!1){return!ze&&Dn.value&&!Di.value})(Q))return;const le=Q||a6(L),ae=(function(ze,We=!1){return We||ze.stable||ze.phase==="final"?{state:pd(ze,{includeHeightCache:!0})}:{state:pd(ze)}})(L,Q),be=ae.state,Te=!!(be&&(le||(function(ze,We=!1){return!!We||ah(ze)!==vd})(be,Q)));if(le&&($(L),sh=L,y9=oh()),be&&Te&&(P(be),be.anchor&&O(be.anchor),vd=ah(be)),L.stable){const ze=u6("settled",L);if(ze!==b9){b9=ze;const We=pd(L,{includeHeightCache:!0});We&&(P(We),vd=ah(We)),(function(lt){s("render-settled",lt)})(L)}}if(L.phase==="final"){const ze=u6("final",L);if(ze!==k9){k9=ze;const We=pd(L,{includeHeightCache:!0});We&&(P(We),vd=ah(We)),(function(lt){s("render-final",lt)})(L)}}}function C9(){ec!=null&&(fi?.(ec),ec=null),tc!=null&&j&&(window.clearTimeout(tc),tc=null)}function c6(){ec=null,tc=null,(function(L){if(Jl.size>0||pr!=null)return!0;switch(L){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(v9)&&(ea(),ih()),A9(Qu(v9))}function Ii(L){var Q,le;if(!Cn.value||(v9=L,ec!=null||tc!=null))return;const ae=Math.max(0,(le=(Q=i.virtualScroll)==null?void 0:Q.emitIntervalMs)!=null?le:32),be=Math.max(0,ae-(oh()-y9)),Te=()=>{tc=null,ec=di?di(c6):null,ec==null&&c6()};j&&be>0?tc=window.setTimeout(Te,be):Te()}function d6(){Ae.value+=1}function i0(L){if(fo.value&&L>=yi.value){const Q=Lt.value[L],le=Fe.value===!0&&Re.value!==!0&&L>=Lt.value.length-2,ae=Q?.type==="code_block"||Q?.type==="image"||Q?.type==="mermaid"||Q?.type==="infographic";if(!le||ae)return!1}return!Cl.value||L<Wi.value||qv.value.has(L)}function yd(L){const Q=Gp.get(L);Q&&(Q(),Gp.delete(L));const le=ud.get(L);le&&(le.destroy(),ud.delete(L)),Qp(L)}function s0(L,Q){let le=!1;if(Q){const Te=Me.get(L);Me.set(L,Q),Te!==Q&&(le=!0)}else Me.delete(L)&&(le=!0);if(le&&d6(),Q||Qp(L),!Tk.value||!Fi)return yd(L),void(Q&&Cl.value&&Da(L,!0));if(!$e.value&&Cl.value&&!H.value&&ud.size>=Ne.value&&(H.value||(H.value=!0,Uv()),!Tk.value||!Fi))return yd(L),void(Q&&Da(L,!0));if(L<Wi.value&&!$e.value||qv.value.has(L))return yd(L),void Da(L,!0);if(!Q)return void yd(L);yd(L);const ae=Fi(Q,{rootMargin:pe.value});if(!ae)return;ud.set(L,ae),Da(L,ae.isVisible.value),Cl.value&&(function(Te){if(!j||!Cl.value)return;Qp(Te);const ze=Te%17*23,We=window.setTimeout(()=>{if(Rk.delete(Te),!Cl.value||qv.value.has(Te))return;const lt=Me.get(Te);if(!lt)return;const qe=me(lt),Xe=lt.ownerDocument||document,rt=Xe.defaultView||window,Oe=!qe||qe===Xe.documentElement||qe===Xe.body,et=!Oe&&qe?Qt("nodeVisibilityFallback.root.getBoundingClientRect",()=>qe.getBoundingClientRect()):null,ut=Oe?0:et.top,at=Oe?Qt("nodeVisibilityFallback.clientHeight",()=>{var mt,zt;return(zt=(mt=rt.innerHeight)!=null?mt:qe?.clientHeight)!=null?zt:0}):et.bottom,Mt=Qt("nodeVisibilityFallback.node.getBoundingClientRect",()=>lt.getBoundingClientRect());Mt.bottom>=ut-500&&Mt.top<=at+500&&Da(Te,!0)},1800+ze);Rk.set(Te,We)})(L);let be=null;be=Qe(()=>ae.isVisible.value,Te=>{if(Te){Qp(L),Da(L,!0),be?.(),Gp.delete(L),ud.get(L)===ae&&ud.delete(L);try{ae.destroy()}catch{}}},{immediate:!0}),Gp.set(L,be),$e.value&&Zr()}function w9(){pr=null,fn(()=>{let L=!1;for(const[Q,le]of Jl)Jl.delete(Q),wl.get(Q)===le.el&&Zu.get(Q)===le.version&&(L=Vu(Q,le.height,{allowShrink:le.allowShrink})||L);return L})}function bd(){pr!=null&&(fi?.(pr),pr=null),Jl.clear()}function o0(L,Q){(function(le,ae,be){var Te;if(!Number.isFinite(be)||be<=0||wl.get(le)!==ae)return;const ze=Zu.get(le);if(ze==null)return;const We=Lt.value[le],lt=ht.value&&Re.value!==!0&&!((Te=i.nodes)!=null&&Te.length)&&le>=Lt.value.length-2,qe=!(We?.loading===!0||lt),Xe=Jl.get(le),rt=Xe?Xe.allowShrink&&qe:qe,Oe=Xe&&!rt?Math.max(Xe.height,be):be;Jl.set(le,{height:Oe,allowShrink:rt,version:ze,el:ae}),pr==null&&(pr=di?di(w9):null,pr==null&&w9())})(L,Q,Qf(L,Q))}function ea(){for(const[L,Q]of wl)Q&&o0(L,Q)}function f6(){Mi?.disconnect(),Mi=null,Ze.clear()}function x9(){for(;Up.length;)Zp(Up.pop())}Qe(Di,L=>{L&&Ii("content")},{flush:"post"}),t({getVirtualMetrics:Qu,captureVirtualState:function(L={}){var Q;return pd(Qu("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:L.allowFallbackAnchor===!0,requireViewport:L.requireViewport===!0,includeEmptyState:(Q=L.includeEmptyState)==null||Q})},restoreVirtualState:function(L,Q={}){const le=Q.restoreAnchor===!0,ae=Q.restoreToken==null?"imperative":String(Q.restoreToken);th=L,nh={restoreAnchor:le,restoreToken:ae,allowUncapturedAnchor:Q.allowUncapturedAnchor===!0},!h9(L,{restoreAnchor:le,restoreToken:ae,allowUncapturedAnchor:Q.allowUncapturedAnchor===!0})&&r6(L)||(th=null,nh=null)},forceMeasure:function(L="manual"){return Ti(this,null,function*(){yield kt(),yield l6(),ea(),ih(),yield kt();const Q=Qu(L);return A9(Q,!0),Q})},settle:m9,scrollToNode:function(L,Q="start"){gd(),dt();const le=Lt.value.length;if(le<=0)return;const ae=Js(L,0,le-1),be=()=>{var Te;const ze=ct({nodeIndex:ae,offsetWithinNodePx:0}),We=wn(ae),lt=Xf(),qe=(Te=lt?.clientHeight)!=null?Te:0,Xe=Wn();let rt=ze;if(Q==="center")rt=ze-qe/2+We/2;else if(Q==="end")rt=ze-qe+We;else if(Q==="nearest"&&Xe!=null){if(ze>=Xe&&ze+We<=Xe+qe)return;rt=ze<Xe?ze:ze-qe+We}Ee(Math.max(0,rt)),Zr({immediate:!0}),$e.value&&(Yl.value=ae,Yf())};if($e.value)return Yl.value=ae,Yf(),void kt(be);be()}}),Qe(()=>nt.value,L=>{if(!L){f6();for(const Q of Ba.values())for(const le of Q)Zp(le);Ba.clear(),Zu.clear(),x9(),bd()}},{immediate:!0}),Qe(Re,L=>{L&&(function(){if(j&&Re.value&&wl.size){x9();for(const Q of[80,240,640]){const le=$k(Q,()=>{for(const[ae,be]of wl)be&&o0(ae,be)},"final");le!=null&&Up.push(le)}}})(),Ii(L?"final":"content")});const vR=G_(()=>Ii("content"),16),yR=G_(()=>Ii("batch"),16);Qe([()=>Lt.value.length,()=>yi.value],()=>{Ye.value&&md(),vR()},{flush:"post",immediate:!0}),Qe([()=>Ys.start,()=>Ys.end],()=>{yR()},{flush:"post"});const{cleanupBatchScheduler:bR}=(function(L){const{props:Q,isClient:le,isTestEnv:ae,parsedNodesIdentity:be,parsedNodeCount:Te,desiredRenderedCount:ze,datasetKey:We,batchingEnabled:lt,incrementalRenderingActive:qe,resolvedBatchSize:Xe,resolvedInitialBatch:rt,renderedCount:Oe,adaptiveBatchSize:et,previousRenderContext:ut,previousBatchConfig:at,requestFrame:Mt,cancelFrame:mt,hasIdleCallback:zt,cleanupNodeVisibility:qt,onDatasetKeyChanged:en,onDatasetChanged:Yt}=L;let tn=null,kn="raf",In=null,hi=0,Xs=!1,Ds=!1;const Gr=new Set,_l=new Set;function vh(){if(le){tn!=null&&(kn==="raf"&&mt?mt(tn):kn==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(tn):kn==="timeout"&&window.clearTimeout(tn),tn=null),hi+=1;for(const go of Gr)mt&&mt(go);for(const go of _l)window.clearTimeout(go);Gr.clear(),_l.clear(),In=null,Xs=!1,Ds=!1}}function p0(){return typeof performance<"u"?performance.now():Date.now()}function T6(go){(function(ta){var za;if(!qe.value)return;const na=Math.max(2,(za=Q.renderBatchBudgetMs)!=null?za:6),ia=Math.max(1,Xe.value||1),Qr=Math.max(1,Math.floor(ia/4));ta>1.5*na?et.value=Math.max(Qr,Math.floor(.8*et.value)):ta<.6*na&&et.value<ia&&(et.value=Math.min(ia,Math.ceil(1.2*et.value)))})(go),Xs=!1;const Ko=Ds||Oe.value<ze.value;Ds=!1,Ko&&F6()}function L6(go,Ko={}){var ta,za;if(!qe.value)return;const na=ze.value;if(Oe.value>=na)return;const ia=Math.max(1,go),Qr=()=>{const Cd=p0();tn=null;const yh=In??ia;In=null;const wd=p0();Oe.value=Math.min(na,Oe.value+yh),qt(Oe.value),(function(L9,g0){if(!le)return void T6(g0);Xs=!0;const B6=++hi;kt().then(()=>{var $6;if(B6!==hi)return;const PR=p0(),jR=Math.max(g0,PR-L9),D6=()=>{B6===hi&&T6(jR)};if(Mt){let ic=null,xd=null,z6=!1;const O6=()=>{z6||(z6=!0,ic!==null&&(Gr.delete(ic),ic=null),xd!==null&&(_l.delete(xd),window.clearTimeout(xd),xd=null),D6())};return ic=Mt(()=>{O6()}),Gr.add(ic),xd=window.setTimeout(()=>{ic!==null&&mt&&mt(ic),O6()},Math.max(32,($6=Q.renderBatchIdleTimeoutMs)!=null?$6:120)),void _l.add(xd)}const R6=window.setTimeout(()=>{_l.delete(R6),D6()},0);_l.add(R6)})})(Cd,p0()-wd)};if(!le||Ko.immediate)return void Qr();const Oa=Math.max(0,(ta=Q.renderBatchDelay)!=null?ta:16);if(In=In!=null?Math.max(In,ia):ia,tn==null){if(!ae&&zt&&window.requestIdleCallback){const Cd=Math.max(0,(za=Q.renderBatchIdleTimeoutMs)!=null?za:120);return kn="idle",void(tn=window.requestIdleCallback(()=>Qr(),{timeout:Cd}))}if(Mt&&!ae)return kn="raf",void(tn=Mt(()=>{Oa===0?Qr():(kn="timeout",tn=window.setTimeout(()=>Qr(),Oa))}));kn="timeout",tn=window.setTimeout(()=>Qr(),Oa)}}function N6(go,Ko={}){Xs?Ds=!0:go==null?F6():L6(go,Ko)}function F6(){qe.value&&L6(lt.value?Math.max(1,Math.round(et.value)):Math.max(1,Xe.value))}return Qe([be,Te,We,qe,Xe,rt,()=>Q.renderBatchDelay],()=>{var go;const Ko=Te.value,ta=ut.value,za=We.value,na=!Object.is(za,ta.key),ia=Ko!==ta.total,Qr=na||ia;ut.value={key:za,total:Ko};const Oa=at.value,Cd=(go=Q.renderBatchDelay)!=null?go:16,yh=Oa.batchSize!==Xe.value||Oa.initial!==rt.value||Oa.delay!==Cd||Oa.enabled!==qe.value;at.value={batchSize:Xe.value,initial:rt.value,delay:Cd,enabled:qe.value},na&&en(Ko),(Qr||yh||!qe.value)&&vh(),(Qr||yh)&&(et.value=Math.max(1,Xe.value||1)),Qr&&Yt();const wd=ze.value;if(!Ko)return Oe.value=0,void qt(0);if(!qe.value)return Oe.value=wd,void qt(Oe.value);const L9=na||ta.total===0;Oe.value=L9||yh?Math.min(wd,rt.value):Math.min(Oe.value,wd);const g0=Math.max(1,rt.value||Xe.value||Ko);Oe.value<wd?N6(g0,{immediate:!le}):qt(Oe.value)},{immediate:!0}),Qe(ze,(go,Ko)=>{qe.value&&(typeof Ko=="number"&&go<=Ko||go>Oe.value&&N6())}),{cleanupBatchScheduler:vh}})({props:T,isClient:j,isTestEnv:Si,parsedNodesIdentity:Fs,parsedNodeCount:Ni,desiredRenderedCount:Kp,datasetKey:aR,batchingEnabled:xs,incrementalRenderingActive:fo,resolvedBatchSize:Zs,resolvedInitialBatch:Wi,renderedCount:yi,adaptiveBatchSize:ho,previousRenderContext:Mo,previousBatchConfig:Gs,requestFrame:di,cancelFrame:fi,hasIdleCallback:Ks,cleanupNodeVisibility:nR,onDatasetKeyChanged:L=>{bd(),Ai(),Ot(),lh(),L>0&&ad(L)},onDatasetChanged:()=>{$e.value&&Zr({immediate:!0})}});Qe([Lk,$e,()=>R.value,()=>te()],([L,Q])=>{if(!L)return zk(),void Wv();iR(),Q?Zr({immediate:!0}):Wv()},{flush:"post",immediate:!0}),Qe([()=>Lt.value.length,()=>$e.value],L=>Ti(null,[L],function*([Q,le]){le&&Q&&j&&(yield kt(),Zr({immediate:!0}))}),{flush:"post"}),Qe(ri,L=>{L&&(function(){var Q;if($i.value&&So.value&&_i.value&&((Q=Yi.value)!=null&&Q[1]))return;const le=wt({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ae=wt({type:"list_item",children:[le],raw:"- Probe paragraph text"}),be=wt({type:"list",ordered:!1,items:[ae],raw:"- Probe paragraph text"});$i.value=le,So.value=ae,_i.value=be;const Te={1:null,2:null,3:null,4:null,5:null,6:null};for(let ze=1;ze<=6;ze++)Te[ze]=wt({type:"heading",level:ze,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(ze)} Probe heading`});Yi.value=Te})()},{immediate:!0}),Qe([()=>R.value,ri],()=>{if(!ri.value)return Zv(),void(ee.value=0);Pk(),Zv(),ri.value&&R.value&&typeof ResizeObserver<"u"&&(Jf=new ResizeObserver(()=>{Pk(),Ht.value&&Wt(),Ye.value&&md(),Ii("resize")}),Jf.observe(R.value))},{immediate:!0}),Qe([ri,us,gr],()=>Ti(null,null,function*(){if(!ri.value)return ue.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Ot();yield kt(),(function(){if(!ri.value||typeof window>"u")return ue.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Ot();const L={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},Q=Ok(Vv(W.value),".paragraph-node");L.paragraph=s4(W.value,Q,"pre-wrap");const le=Vv(z.value),ae=le?.querySelector(".paragraph-node");L.listItem=s4(z.value,ae,"pre-wrap");const be=Qt("readSimpleTextProbeProfile.list.offsetHeight",()=>{var ze,We;return(We=(ze=G.value)==null?void 0:ze.offsetHeight)!=null?We:0}),Te=Qt("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var ze,We;return(We=(ze=z.value)==null?void 0:ze.offsetHeight)!=null?We:0});L.listWrapperOverhead=Math.max(0,be-Te);for(let ze=1;ze<=6;ze++){const We=Ok(Vv(K[ze]),`h${ze}`);L.headings[ze]=s4(K[ze],We,"pre-wrap")}ue.value=L,Ot()})()}),{flush:"post",immediate:!0}),Qe(()=>Lt.value.length,()=>{$e.value&&Zr({immediate:!0})}),Qe([ri,ee],()=>{Ot(),$e.value&&Zr({immediate:!0}),Ht.value&&Wt(),Ye.value&&md(),Ii("resize")},{immediate:!1}),Qe(()=>Cl.value,L=>{if(L)for(const[Q,le]of Me)s0(Q,le);else if(Uv(),$e.value)Zr({immediate:!0});else for(const[Q,le]of Me)le&&Da(Q,!0)},{immediate:!1}),Qe([pe,Ne,()=>te()],()=>{var L;(L=Fi.refresh)==null||L.call(Fi);for(const[Q,le]of Me)s0(Q,le)},{immediate:!1}),Qe([()=>T.viewportPriority,()=>Lt.value.length,Ne],([L,Q,le])=>{if(L!==!1){if(H.value&&(Q<=200||Q<=le)){H.value=!1;for(const[ae,be]of Me)s0(ae,be)}}else H.value=!1}),Qe(()=>yi.value,()=>{$e.value&&Zr({immediate:!0})}),Qe([Yl,Us,Ji,()=>Lt.value.length,$e],()=>{Yf()},{immediate:!0});let uh=null,ch=!1,kd=null;function dh(){uh=null,n9=null,t9=void 0,hd=null,lh()}function _9(){bd(),Ai(),Ot(),bi.clear();const L=Lt.value.length;L>0&&ad(L),p9()}function S9(){C9(),Dk(),sh=null,Ju=null,Xu=null,t0=null,th=null,nh=null,ch=!1,dh(),Gk("restore"),dt(),gd()}function fh(L){var Q;return[(Q=fs())!=null?Q:"",Ri(),Xl(),Jp.value,rh(L),Lt.value.length,Math.round(Qn(0,Lt.value.length)),Math.round(Gu()),os.count,Math.round(os.total)].join(":")}function h6(){return Ti(this,null,function*(){var L,Q,le,ae;const be=(L=i.virtualScroll)==null?void 0:L.settledToken,Te=rh(be),ze=Ri(),We=fs(),lt=gr.value;if(Cn.value&&((Q=i.virtualScroll)==null?void 0:Q.settleMode)==="manual"&&Xp(be))if(i9()){if(fh(be)!==hd&&!ch){ch=!0;try{const qe=yield m9({reason:"manual",expectedSettledTokenKey:Te}),Xe=rh()===Te;g9(ze,We,lt)&&qe.sessionKey===ze&&qe.threadKey===We&&Xe&&qe.stable&&qe.phase==="final"&&(hd=fh((le=i.virtualScroll)==null?void 0:le.settledToken))}finally{ch=!1,yield kt();const qe=(ae=i.virtualScroll)==null?void 0:ae.settledToken,Xe=Xp(qe)?fh(qe):"";g9(ze,We,lt)&&Xe&&hd!==Xe&&h6()}}}else Ii("manual")})}Qe(Cn,(L,Q)=>{if(L!==Q){if(!L)return S9(),void C9();S9(),_9(),kd=gr.value,Ii("content")}},{flush:"post"}),Qe([Cn,gr],([L,Q])=>{L?kd!=null?kd!==Q&&(kd=Q,(function(le="resize"){bd(),Ai(),Ot(),bi.clear();const ae=Lt.value.length;ae>0&&ad(ae),p9(),Ju=null,Xu=null,t0=null,sh=null,ch=!1,dh(),o6(),kt(()=>{ea(),Ht.value&&Wt(),Ye.value&&md(),Ii(le)})})("resize")):kd=Q:kd=null},{flush:"post",immediate:!0}),Qe([Cn,()=>Ri(),()=>fs()],([L])=>{L&&(S9(),_9(),Gk("content"),Ii("content"))}),Qe([Cn,()=>Ri(),()=>fs(),gr,()=>Lt.value.length],([L])=>{L&&(function(Q="async-node"){let le=!1;for(const[ae,be]of Array.from(xl.entries()))Xv(be)||(xl.delete(ae),hr.delete(ae),le=!0);le&&(dd(),Ii(Q))})("async-node")},{flush:"post"}),Qe([Cn,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.sessionKey},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey},()=>i.indexKey,()=>X.value],([L])=>{L&&(lh(),(function(Q="content"){if(!Cn.value)return;const le=[],ae=Lt.value.length,be=Kv(ae);for(const Te of Array.from(bi.keys())){if(Te>=ae){le.push(Te);continue}if(Te<be)continue;const ze=eh(Te),We=bi.get(Te);We!=null&&We!==ze&&le.push(Te),bi.set(Te,ze)}for(const Te of Array.from(bi.keys()))Te>=ae&&bi.delete(Te);le.length&&((function(Te,ze={}){const We=Array.from(Te,Number);sn(We);let lt=0;if(fn(()=>(lt=Pv(We,ze),lt>0)),lt>0)(function(qe){for(const Xe of qe)bi.delete(Xe)})(We);else for(const qe of We)po.delete(qe)})(le,{notify:!1}),Ot(),dh(),Ht.value&&Wt(),Ye.value&&md(),Ii(Q))})("content"))},{flush:"post",immediate:!0}),Qe([Cn,()=>Lt.value.length,()=>Ri(),()=>fs()],([L,Q,le,ae],[be,Te,ze,We])=>{L&&be&&le===ze&&ae===We&&Q!==Te&&dh()},{flush:"post"}),Qe([Cn,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.heightCache},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.heightCacheWidth},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey},()=>Lt.value.length,()=>Ri(),ee],()=>{o6()},{flush:"post",immediate:!0}),Qe([Cn,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreAnchor},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey},()=>Lt.value.length,()=>Ri(),ee],L=>Ti(null,[L],function*([Q,le]){if(!Q||!le)return;yield kt();const ae=(function(){var be;const Te=(be=i.virtualScroll)==null?void 0:be.restoreAnchor;return Te==null||Te===!1?null:Te===!0?"true":String(Te)})();h9(le,{restoreAnchor:ae!=null,restoreToken:ae??void 0})}),{flush:"post",immediate:!0}),Qe([Cn,ee,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.restoreState},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.measurementKey}],([L])=>{var Q;if(!L)return;const le=(Q=i.virtualScroll)==null?void 0:Q.restoreState;le&&Ju&&Xu==="restore"&&(i6(le)||(_9(),Ju=null,Xu=null,Ii("resize")))},{flush:"post"}),Qe([Cn,()=>Lt.value.length,()=>Ri(),ee],L=>Ti(null,[L],function*([Q]){var le;const ae=th,be=nh;Q&&ae&&(yield kt(),!h9(ae,{restoreAnchor:be?.restoreAnchor===!0,restoreToken:(le=be?.restoreToken)!=null?le:"imperative",allowUncapturedAnchor:be?.allowUncapturedAnchor===!0})&&r6(ae)||(th=null,nh=null))}),{flush:"post",immediate:!0}),Qe([Cn,Re,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.settleMode},()=>Ri(),()=>fs(),gr,Hv,Fk,()=>yi.value,Kp,()=>os.count,()=>os.total],([L,Q,le])=>{if(!L||Q!==!0||le==="manual"||!s9())return;const ae=(function(){var be;const Te=Lt.value.length;return[(be=fs())!=null?be:"",Ri(),Xl(),Jp.value,Te,Math.round(Qn(0,Te)),Math.round(Gu()),os.count,Math.round(os.total)].join(":")})();uh!==ae&&(uh=ae,m9({reason:"final"}).then(be=>{be.stable||uh!==ae||(uh=null)}))},{flush:"post",immediate:!0}),Qe([Cn,Re,()=>{var L;return(L=i.virtualScroll)==null?void 0:L.settleMode},()=>{var L;return(L=i.virtualScroll)==null?void 0:L.settledToken},()=>Ri(),()=>fs(),gr,Hv,Fk,()=>yi.value,Kp,()=>Lt.value.length,()=>os.count,()=>os.total],()=>{h6()},{flush:"post",immediate:!0}),Qe([()=>Lt.value.length,$e,Us,Ji,()=>Ys.start,()=>Ys.end],([L,Q,le,ae,be,Te])=>{ve.value&&_n("virtualization",{nodes:L,virtualization:Q,maxLiveNodes:le,buffer:ae,focusIndex:Yl.value,scroll:Q?(()=>{const ze=Pe.value||me();return ze?{reverse:Ie(ze),scrollTop:Math.round(ze.scrollTop),scrollTopAbs:Math.round(Math.abs(ze.scrollTop)),scrollHeight:Math.round(ze.scrollHeight),clientHeight:Math.round(ze.clientHeight)}:null})():null,liveRange:{start:be,end:Te},rendered:yi.value})}),Qe([()=>T.customId],([L],Q,le)=>{if(!L||co)return;const ae=(function(be,Te){return be?(_s.controllers[be]=Te,()=>{_s.controllers[be]===Te&&delete _s.controllers[be]}):()=>{}})(L,{captureRestoreAnchor:ki,restoreAnchor:$s,getAnchorDrift:Ql,getReport:rR});le(()=>{ae()})},{immediate:!0}),Gn(()=>{(function(){if(Cn.value)try{ea(),ih();const L=Qu("manual");a6(L)&&($(L),sh=L,y9=oh());const Q=pd(L,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});Q&&(P(Q),Q.anchor&&O(Q.anchor),vd=ah(Q))}catch{}})(),bR(),Uv(),Kt(),f6();for(const L of Ba.values())for(const Q of L)Zp(Q);Ba.clear(),Zu.clear(),bi.clear(),x9(),bd(),Zv(),dt(),gd(),C9(),zk(),Wv()});const kR=Xh("ViewportDeferredMermaidBlockNode",rl({loader:()=>Ti(null,null,function*(){try{return(yield ns(()=>import("./index11-Cx5Yh-Ch.js"),__vite__mapDeps([7,5]))).default}catch(L){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',L),Jo}}),loadingComponent:uS,delay:0}),uS),AR=Xh("ViewportDeferredInfographicBlockNode",rl({loader:()=>Ti(null,null,function*(){try{return(yield ns(()=>import("./index10-C561zpWg.js"),[])).default}catch(L){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',L),Jo}}),loadingComponent:aS,delay:0}),aS),CR=Xh("ViewportDeferredD2BlockNode",rl(()=>Ti(null,null,function*(){try{return(yield ns(()=>import("./index8-B1ktcQVe.js"),[])).default}catch(L){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',L),Jo}})),Jo),p6={text:ss,paragraph:Pc,heading:Mv,code_block:Zy,list:yf,list_item:vf,blockquote:zg,table:I1,definition_list:Og,footnote:Pg,footnote_reference:Ar,footnote_anchor:S1,admonition:qg,vmr_container:Hg,hardbreak:vu,link:Oo,image:mu,thematic_break:jg,math_inline:yl,math_block:TB,strong:Ro,emphasis:Po,strikethrough:zo,highlight:wr,insert:or,subscript:sr,superscript:ir,emoji:nr,checkbox:kr,checkbox_input:kr,inline_code:xo,html_inline:Cr,reference:Do,html_block:M1},wR=F(()=>Yv()),g6=F(()=>V_(T.codeBlockProps)),xR=F(()=>V_(T.codeBlockProps,{omit:["langs"]})),m6=F(()=>At(At({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,monacoOptions:T.codeBlockMonacoOptions,themes:T.themes,langs:g.value==="shiki"?T.langs:void 0,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof re.value=="boolean"?{showTooltips:re.value}:{}),xR.value)),v6=F(()=>At(dn(At({},m6.value),{langs:T.langs}),g6.value));function y6(L){return typeof L=="boolean"?L:void 0}const _R=F(()=>{const L=T.codeBlockProps||{},Q={},le=y6(L.showLineNumbers);le!==void 0&&(Q.showLineNumbers=le);const ae=y6(L.diffInline);ae!==void 0&&(Q.diffInline=ae);const be=(function(Te){const ze=Number(Te);return Number.isFinite(ze)&&ze>0?ze:void 0})(L.reservedHeightPx);return be!==void 0&&(Q.reservedHeightPx=be),Q}),SR=F(()=>At(At({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,themes:T.themes,langs:T.langs,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof re.value=="boolean"?{showTooltips:re.value}:{}),g6.value)),MR=F(()=>At({},T.mermaidProps||{})),b6=F(()=>At({},T.d2Props||{})),IR=F(()=>At({},T.infographicProps||{})),hh=F(()=>({typewriter:f.value,fade:T.fade,customHtmlTags:Li.value.customHtmlTags})),ER=F(()=>At(At({},hh.value),typeof re.value=="boolean"?{showTooltip:re.value}:{})),TR=F(()=>At(At({},hh.value),typeof re.value=="boolean"?{showTooltips:re.value}:{})),LR=F(()=>At(At({},hh.value),typeof re.value=="boolean"?{showTooltips:re.value}:{})),NR=F(()=>At(At({},hh.value),typeof re.value=="boolean"?{showTooltips:re.value}:{}));function FR(L){return Array.isArray(L.children)&&L.children.length>0}const r0=F(()=>oR.value.map(L=>{var Q,le,ae,be,Te,ze,We,lt;let qe=(function(mt){var zt,qt,en,Yt,tn,kn,In;if(mt.type!=="code_block")return mt;const hi=mt,Xs=[String((zt=hi.language)!=null?zt:""),String((qt=hi.loading)!=null?qt:""),String((en=hi.diff)!=null?en:""),String((Yt=hi.code)!=null?Yt:""),String((tn=hi.originalCode)!=null?tn:""),String((kn=hi.updatedCode)!=null?kn:""),String((In=hi.raw)!=null?In:"")].join("\0"),Ds=Wo.get(hi);if(Ds&&Ds.signature===Xs)return Ds.node;const Gr=At({},hi);return Wo.set(hi,{signature:Xs,node:Gr}),Gr})(L.node);const Xe=l0(qe);let rt=w6(qe,Xe);if((qe.type==="html_block"||qe.type==="html_inline")&&rt===p6[qe.type]){const mt=qe,zt=String((Q=mt.tag)!=null?Q:"").trim().toLowerCase()||eF(mt.content);if(zt){const qt=mi.value[zt];if(Ws.value.has(zt)&&qt)rt=qt,qe=dn(At({},mt),{type:zt,tag:zt,content:Hue(mt.content,zt)});else if(tF((le=mt.content)!=null?le:mt.raw,zt)){const en=String((be=(ae=mt.content)!=null?ae:mt.raw)!=null?be:"");qe.type==="html_inline"?(rt=ss,qe={type:"text",content:en,raw:en}):(rt=Pc,qe={type:"paragraph",children:[{type:"text",content:en,raw:en}],raw:en})}}}const Oe=qe.type==="code_block"&&g.value==="pre"&&rt===Jo&&!M9(mi.value,Xe);let et=At({},(function(mt,zt,qt){const en=zt??l0(mt);if(mt.type==="code_block"){const Yt=en?M9(mi.value,en):void 0;if(qt&&g.value==="pre"&&!Yt&&qt===Jo)return _R.value;if(qt&&en&&qt===Yt)return en==="mermaid"?A6(mt):en==="infographic"?C6(mt):en==="d2"||en==="d2lang"?b6.value:v6.value;if(qt&&qt===mi.value.code_block)return v6.value;if(Hk(qt))return SR.value}return en==="mermaid"?A6(mt):en==="infographic"?C6(mt):en==="d2"||en==="d2lang"?b6.value:mt.type==="link"?ER.value:mt.type==="list"?TR.value:mt.type==="blockquote"?LR.value:mt.type==="table"?NR.value:mt.type==="code_block"?m6.value:hh.value})(qe,Xe,rt));const ut=ri.value?cd.value[L.index]:null;qe.type==="code_block"&&ut?.kind==="code-block"&&(et=dn(At({},et),Oe?{reservedHeightPx:(Te=ut.height)!=null?Te:ut.contentHeight}:{estimatedHeightPx:ut.height,estimatedContentHeightPx:ut.contentHeight,estimatedDiffInline:ut.diffInline})),Oe||qe.type!=="code_block"||Xe!=="mermaid"||Jd(et.estimatedPreviewHeightPx)!=null||(et=dn(At({},et),{estimatedPreviewHeightPx:Gm(Vm(String((ze=qe.code)!=null?ze:"")))})),Oe||qe.type!=="code_block"||Xe!=="infographic"||Jd(et.estimatedPreviewHeightPx)!=null||(et=dn(At({},et),{estimatedPreviewHeightPx:Qm(Zm(String((We=qe.code)!=null?We:"")))})),qe.type==="math_block"&&(et=dn(At({},et),{cacheScope:Sn}));const at=(function(mt,zt){const qt=String(mt.type);return!Lp(qt)&&mi.value[qt]===zt})(qe,rt),Mt=at?Nb(qe,se.value):void 0;return dn(At({},L),{node:qe,component:rt,bindings:et,customBindings:At(At({},Mt??{}),et),rendersCustomNode:at,hasSlotChildren:FR(qe),slotContent:String((lt=qe.content)!=null?lt:""),isCodeBlock:qe.type==="code_block",indexKey:`${wR.value}-${L.index}`,vnodeKey:`${lR.value}\0${L.index}\0${qe.type}`})}));function l0(L){var Q;return L?.type==="code_block"?String((Q=L.language)!=null?Q:"").trim().toLowerCase():""}function M9(L,Q){const le=Q.trim().toLowerCase();if(le)for(const ae of[le,xv(le),dB(le)]){const be=ae&&L[ae];if(be)return be}}function k6(L,Q,le,ae){var be,Te;const ze=At({},L.value);return Jd(ze.estimatedPreviewHeightPx)==null&&(ze.estimatedPreviewHeightPx=ae(le(String((be=Q?.code)!=null?be:"")),void 0,ze.maxHeight==="none"?null:(Te=Jd(ze.maxHeight))!=null?Te:void 0)),ze}function A6(L){return k6(MR,L,Vm,Gm)}function C6(L){return k6(IR,L,Zm,Qm)}function w6(L,Q){if(!L)return v8;const le=mi.value,ae=le[String(L.type)];if(L.type==="code_block"){const be=Q??l0(L),Te=be?M9(le,be):void 0;return Te||(g.value==="pre"?le.code_block||Jo:be==="mermaid"?le.mermaid||kR:be==="infographic"?le.infographic||AR:be==="d2"||be==="d2lang"?le.d2||CR:ae||le.code_block||Wk.value)}return ae||p6[String(L.type)]||v8}function I9(L){s("click",L)}function BR(L){var Q;(Q=L.target)!=null&&Q.closest("[data-node-index]")&&s("mouseover",L)}function $R(L){var Q;(Q=L.target)!=null&&Q.closest("[data-node-index]")&&s("mouseout",L)}function x6(L){s("mouseover",L)}function _6(L){s("mouseout",L)}const nc=Z(null),Uo=Z(!1),ph=Z(null),DR=F(()=>!(T.domMode!=="minimal"||Y.value||T.fade!==!1||f.value||Uo.value||ds.value||$e.value||Ln.value||vi.value||cs.value||Object.keys(mi.value).length!==0));let gh,Ad=null,E9=0,a0=0,u0=0;const S6=["code_block","admonition","table","math_block","html_block","image","thematic_break"],RR=new Set(S6),M6=[".typewriter-cursor",".height-estimation-probes",...S6.map(L=>`[data-node-type="${L}"]`),"script","style"].join(",");function I6(L){if(!L||typeof L!="object")return!1;const Q=L.type;return typeof Q=="string"&&RR.has(Q)}function c0(L){var Q,le;if(!L||typeof L!="object")return 0;const ae=L,be=(le=(Q=ae.raw)!=null?Q:ae.content)!=null?le:ae.code;if(typeof be=="string")return be.length;const Te=ae.children;if(Array.isArray(Te))return Te.reduce((We,lt)=>We+c0(lt),0);const ze=ae.items;return Array.isArray(ze)?ze.reduce((We,lt)=>We+c0(lt),0):0}function d0(){gh&&(clearTimeout(gh),gh=void 0)}function T9(){E9+=1,Ad!=null&&(fi?.(Ad),Ad=null)}function mh(){T9(),Ra(),nc.value&&(nc.value.style.visibility="hidden")}function zR(L){var Q;if(L.nodeType!==Node.TEXT_NODE||!((Q=L.textContent)!=null?Q:"").trim())return!1;const le=L.parentElement;return!!le&&!le.closest(M6)}function OR(L){let Q=L.lastChild;for(;Q;){if(zR(Q))return Q;if(Q.nodeType===Node.ELEMENT_NODE){const le=Q;if(!le.matches(M6)&&le.lastChild){Q=le.lastChild;continue}}for(;Q&&Q!==L&&!Q.previousSibling;)Q=Q.parentNode;if(!Q||Q===L)break;Q=Q.previousSibling}return null}function E6(){const L=r0.value;for(let Q=L.length-1;Q>=0;Q--){const le=L[Q];if(!le||I6(le.node)||!i0(le.index))continue;const ae=Me.get(le.index);if(!ae)continue;const be=OR(ae);if(be)return be}return null}function Ra(){ph.value&&(ph.value.classList.remove(cS),ph.value=null)}function f0(){if(d.value!=="simple"||!j||!Uo.value||!R.value)return void Ra();const L=E6(),Q=L?(function(le){var ae;const be=(ae=le.parentElement)==null?void 0:ae.closest(".text-node");return be instanceof HTMLElement?be:le.parentElement})(L):null;Q!==ph.value&&(Ra(),Q&&(Q.classList.add(cS),ph.value=Q))}function h0(){if(d.value!=="precise"||!j||!Uo.value||Ad!=null)return;const L=E9,Q=()=>{Ad=null,L===E9&&(function(){var le,ae;if(d.value!=="precise"||!(j&&Uo.value&&R.value&&nc.value))return;const be=R.value,Te=nc.value;Te.style.visibility="hidden";const ze=E6();if(!ze)return;let We=0,lt=0,qe=20,Xe=!1;if(ze?.textContent){const rt=ze.textContent.length,Oe=document.createRange();Oe.setStart(ze,Math.max(0,rt-1)),Oe.setEnd(ze,rt);const et=typeof Oe.getClientRects=="function"?Oe.getClientRects():void 0,ut=(ae=et?.[et.length-1])!=null?ae:(le=ze.parentElement)==null?void 0:le.getBoundingClientRect();if(ut){const at=Qt("typewriterCursor.root.getBoundingClientRect",()=>be.getBoundingClientRect());We=ut.right-at.left+be.scrollLeft,lt=ut.top-at.top+be.scrollTop,qe=ut.height||qe,Xe=!0}Oe.detach()}Xe&&(Te.style.transform=`translate(${Math.max(0,We)}px, ${Math.max(0,lt)}px)`,Te.style.height=`${qe}px`,Te.style.visibility="visible")})()};di?Ad=di(Q):Q()}return Qe([it,()=>i.content,()=>i.nodes,()=>T.typewriter,Re],()=>Ti(null,null,function*(){var L,Q;if(!j||Y.value||!J.value)return;if(Re.value)return Uo.value=!1,d0(),void mh();if((L=i.nodes)!=null&&L.length)return Uo.value=!1,d0(),mh(),a0=((Q=i.content)!=null?Q:"").length,void(u0=it.value.length);const le=(function(){var We,lt;return(We=i.nodes)!=null&&We.length?i.nodes.reduce((qe,Xe)=>qe+c0(Xe),0):((lt=i.content)!=null?lt:"").length})(),ae=(function(){var We;return(We=i.nodes)!=null&&We.length?i.nodes.reduce((lt,qe)=>lt+c0(qe),0):it.value.length})(),be=!I6(Lt.value[Lt.value.length-1]),Te=le>a0,ze=ae>u0;if(!f.value||!be||!Te&&!ze)return f.value&&be||(Uo.value=!1,mh()),a0=le,void(u0=ae);a0=le,u0=ae,Uo.value=!0,d.value==="precise"&&nc.value&&(nc.value.style.visibility="hidden"),d0(),yield kt(),d.value==="simple"?f0():(Ra(),h0()),gh=setTimeout(()=>{gh=void 0,Uo.value=!1},3e3)}),{flush:"post",immediate:!0}),Qe(Uo,L=>Ti(null,null,function*(){L?(yield kt(),d.value!=="simple"?(Ra(),d.value==="precise"&&h0()):f0()):mh()}),{flush:"post"}),Qe(d,()=>Ti(null,null,function*(){if(j&&!Y.value&&J.value&&Uo.value){if(yield kt(),d.value==="simple")return T9(),void f0();Ra(),d.value!=="precise"?mh():h0()}}),{flush:"post"}),Qe([()=>yi.value,()=>Ys.start,()=>Ys.end],()=>Ti(null,null,function*(){j&&!Y.value&&J.value&&Uo.value&&(yield kt(),d.value!=="simple"?(Ra(),d.value==="precise"&&h0()):f0())}),{flush:"post"}),Gn(()=>{d0(),T9(),Ra(),zn.clear()}),(L,Q)=>{const le=mO("NodeRenderer",!0);return h(Y)?(b(!0),I(Be,{key:0},yt(r0.value,ae=>(b(),I(Be,{key:ae.vnodeKey},[ae.rendersCustomNode?(b(),fe(Ms(ae.component),Yn({key:0,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onClick:I9,onMouseover:x6,onMouseout:_6,onCopy:Q[0]||(Q[0]=be=>o(be)),onHandleArtifactClick:Q[1]||(Q[1]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ae.hasSlotChildren?(b(),fe(le,Yn({key:0,ref_for:!0},ci.value,{nodes:ae.node.children,"index-key":ae.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ae.slotContent?(b(),fe(le,Yn({key:1,ref_for:!0},ci.value,{content:ae.slotContent,final:!ae.node.loading,"index-key":`${ae.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ne("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),fe(Ms(ae.component),Yn({key:1,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onClick:I9,onMouseover:x6,onMouseout:_6,onCopy:Q[2]||(Q[2]=be=>o(be)),onHandleArtifactClick:Q[3]||(Q[3]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(b(),I("div",{key:1,ref_key:"containerRef",ref:R,class:De(["markstream-vue markdown-renderer",[{dark:T.isDark},{virtualized:$e.value},{"virtual-scroll-coordinated":Di.value},{"stable-layout":JD.value},{"typewriter-simple-cursor":Uo.value&&d.value==="simple"}]]),"data-custom-id":T.customId,onClick:I9,onMouseover:BR,onMouseout:$R},[ur.value||$e.value?(b(),I(Be,{key:0},[ur.value?(b(),fe(Zme,{key:0,width:us.value,"flow-root":$e.value||Di.value,"paragraph-node":$i.value,"list-item-node":So.value,"list-node":_i.value,"heading-nodes":Yi.value,"set-paragraph-wrapper":XD,"set-list-item-wrapper":eR,"set-list-wrapper":tR,"set-heading-wrapper":sR},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):ne("",!0),$e.value?(b(),I("div",{key:1,class:"node-spacer",style:Vt({height:`${Gv.value}px`}),"aria-hidden":"true"},null,4)):ne("",!0)],64)):ne("",!0),DR.value?(b(!0),I(Be,{key:1},yt(r0.value,ae=>(b(),I(Be,{key:ae.vnodeKey},[i0(ae.index)?(b(),fe(Ms(ae.component),Yn({key:0,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onMouseover:Q[4]||(Q[4]=be=>s("mouseover",be)),onMouseout:Q[5]||(Q[5]=be=>s("mouseout",be)),onCopy:Q[6]||(Q[6]=be=>o(be)),onHandleArtifactClick:Q[7]||(Q[7]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):ne("",!0)],64))),128)):(b(!0),I(Be,{key:2},yt(r0.value,ae=>(b(),I("div",{key:ae.vnodeKey,ref_for:!0,ref:be=>s0(ae.index,be),class:"node-slot","data-node-index":ae.index,"data-node-type":ae.node.type},[i0(ae.index)?(b(),I("div",{key:0,ref_for:!0,ref:be=>(function(Te,ze){var We;ze||(function(rt){const Oe=`${Yv()}-${rt}`;let et=!1;for(const ut of Array.from(hr.keys())){const at=xl.get(ut);(at?.index===rt||ut===Oe||ut.startsWith(`${Oe}-`))&&(hr.delete(ut),xl.delete(ut),et=!0)}et&&(dd(),Ii("async-node"))})(Te),Jl.delete(Te),(function(rt){var Oe;const et=((Oe=Zu.get(rt))!=null?Oe:0)+1;Zu.set(rt,et)})(Te);const lt=Ba.get(Te);if(lt){for(const rt of lt)Zp(rt);Ba.delete(Te)}if((function(rt){const Oe=Ze.get(rt);Oe&&(Mi?.unobserve(Oe),on.delete(Oe),Ze.delete(rt))})(Te),!ze||!nt.value)return wl.delete(Te),void Zu.delete(Te);wl.set(Te,ze);const qe=()=>{o0(Te,ze)};queueMicrotask(qe);const Xe=(Mi||typeof ResizeObserver>"u"||(Mi=new ResizeObserver(rt=>{if(rt.length)for(const Oe of rt){const et=on.get(Oe.target),ut=Ze.get(et??-1);et!=null&&ut&&o0(et,ut)}else ea()})),Mi);if(Xe&&(Ze.set(Te,ze),on.set(ze,Te),Xe.observe(ze)),typeof window<"u"){const rt=((We=Lt.value[Te])==null?void 0:We.type)==="code_block"?[16,80,240,800]:Re.value?[80]:[];if(rt.length){const Oe=rt.map(et=>$k(et,qe,"node-resize")).filter(et=>et!=null);Oe.length&&Ba.set(Te,Oe)}}})(ae.index,be),class:"node-content"},[ae.isCodeBlock?ae.rendersCustomNode?(b(),fe(Ms(ae.component),Yn({key:1,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:Q[12]||(Q[12]=be=>o(be)),onHandleArtifactClick:Q[13]||(Q[13]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ae.hasSlotChildren?(b(),fe(le,Yn({key:0,ref_for:!0},ci.value,{nodes:ae.node.children,"index-key":ae.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ae.slotContent?(b(),fe(le,Yn({key:1,ref_for:!0},ci.value,{content:ae.slotContent,final:!ae.node.loading,"index-key":`${ae.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ne("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),fe(Ms(ae.component),Yn({key:2,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:Q[14]||(Q[14]=be=>o(be)),onHandleArtifactClick:Q[15]||(Q[15]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(b(),fe(ys,{key:0,name:"fade",css:T.fade!==!1,appear:T.fade!==!1},{default:he(()=>[ae.rendersCustomNode?(b(),fe(Ms(ae.component),Yn({key:0,ref_for:!0},ae.customBindings,{node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:Q[8]||(Q[8]=be=>o(be)),onHandleArtifactClick:Q[9]||(Q[9]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ae.hasSlotChildren?(b(),fe(le,Yn({key:0,ref_for:!0},ci.value,{nodes:ae.node.children,"index-key":ae.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ae.slotContent?(b(),fe(le,Yn({key:1,ref_for:!0},ci.value,{content:ae.slotContent,final:!ae.node.loading,"index-key":`${ae.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):ne("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(b(),fe(Ms(ae.component),Yn({key:1,node:ae.node,loading:ae.node.loading,"index-key":ae.indexKey},{ref_for:!0},ae.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:Q[10]||(Q[10]=be=>o(be)),onHandleArtifactClick:Q[11]||(Q[11]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(b(),I("div",{key:1,class:"node-placeholder",style:Vt({height:`${wn(ae.index)}px`})},null,4))],8,Yme))),128)),Uo.value&&d.value==="precise"?(b(),I("span",{key:3,ref_key:"typewriterCursorRef",ref:nc,class:"typewriter-cursor","aria-hidden":"true"},null,512)):ne("",!0),$e.value?(b(),I("div",{key:4,class:"node-spacer",style:Vt({height:`${Qv.value}px`}),"aria-hidden":"true"},null,4)):ne("",!0)],42,Qme))}}})),[["__scopeId","data-v-a9489508"]]),rr=qB;rr.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",rr.__name,rr.name].filter(n=>!!n));for(const n of t)e.component(n,qB)};const Kb=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"})),Jme={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},Xme={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},e2e={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},t2e={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},n2e={class:"admonition-title"},i2e=["aria-expanded","aria-controls"],s2e=["id"],qg=oi(tt({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const i=e,s=t,o=F(()=>{if(i.node.title&&i.node.title.trim().length)return i.node.title;const u=i.node.kind||"note";return u.charAt(0).toUpperCase()+u.slice(1)}),r=Z(!!i.node.collapsible&&!((n=i.node.open)==null||n));function l(){i.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(u,c)=>(b(),I("div",{class:De(["admonition",[`admonition-${i.node.kind}`]])},[C("div",{id:a,class:"admonition-legend"},[i.node.kind==="note"||i.node.kind==="info"?(b(),I("svg",Jme,[...c[1]||(c[1]=[C("circle",{cx:"12",cy:"12",r:"10"},null,-1),C("path",{d:"M12 16v-4"},null,-1),C("path",{d:"M12 8h.01"},null,-1)])])):i.node.kind==="tip"?(b(),I("svg",Xme,[...c[2]||(c[2]=[C("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),C("path",{d:"M9 18h6"},null,-1),C("path",{d:"M10 22h4"},null,-1)])])):i.node.kind==="warning"||i.node.kind==="caution"?(b(),I("svg",e2e,[...c[3]||(c[3]=[C("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-3"},null,-1),C("path",{d:"M12 9v4"},null,-1),C("path",{d:"M12 17h.01"},null,-1)])])):i.node.kind==="danger"||i.node.kind==="error"?(b(),I("svg",t2e,[...c[4]||(c[4]=[C("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),C("path",{d:"M12 8v4"},null,-1),C("path",{d:"M12 16h.01"},null,-1)])])):ne("",!0),C("span",n2e,B(o.value),1),i.node.collapsible?(b(),I("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(b(),I("svg",{style:Vt({rotate:r.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...c[5]||(c[5]=[C("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,i2e)):ne("",!0)]),Bn(C("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[V(h(rr),{"index-key":`admonition-${e.indexKey}`,nodes:i.node.children,"custom-id":i.customId,typewriter:i.typewriter,fade:i.fade,onCopy:c[0]||(c[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,s2e),[[rs,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);qg.install=e=>{e.component(qg.__name,qg)};const C8=()=>ns(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let ig=null,sg=C8,og=null,dS=!1,fS=!1;function NYe(){return Ti(this,null,function*(){if(ig)return ig;const e=sg;return e?e===C8&&dS?null:og||(og=Ti(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===C8)return e===sg&&(dS=!0,(function(i){fS||(fS=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',i))})(n)),null;throw n}finally{e===sg&&(og=null)}return e!==sg?null:t?(ig=(function(n){var i;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(i=n.default)!=null?i:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),ig):null}),og):null})}let rg=null,UB=null,lg=null;function FYe(){return typeof UB=="function"}function BYe(){return Ti(this,null,function*(){if(rg)return rg;const e=UB;return e?lg||(lg=Ti(null,null,function*(){const t=yield e(),n=(function(i){var s,o,r;if(!i)return null;const l=(s=i.default)!=null?s:i,a=typeof l=="function"&&typeof((o=l.prototype)==null?void 0:o.render)=="function"?l:(r=i.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(rg=n,rg):null}).finally(()=>{lg=null}),lg):null})}const $Ye=Symbol("markstreamLanguageIconResolver"),KB=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],o2e=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),w8=[...KB].sort((e,t)=>t.length-e.length).join("|"),o4=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${w8}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${w8})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?,。;!?)])`].join(""),"gi"),VB=/[),.;!?,。;!?)]+$/;function r2e(e){const t=e.toLowerCase();return KB.some(n=>t.endsWith(`.${n}`))}function l2e(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${w8}))["']`,"gi");let i;for(;(i=n.exec(e))!==null;){const s=i[1];if(!s)continue;const o=s.split("/").pop();o&&t.set(o,s)}return t}function a2e(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const i=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!i)return null;let s=(i[1]??"").replace(VB,"");if(!s)return null;const o=s.split("/").pop()??s,r=s.includes("/"),l=o2e.has(o),a=r2e(o);if(r&&!l&&!a)return null;if(!r&&!l){const d=t.aliases?.get(o);if(!d)return null;s=d}const u=i[2]??i[3],c=u?Number(u):void 0;return{path:s,line:c!==void 0&&Number.isFinite(c)&&c>0?c:void 0}}function u2e(e,t={}){const n=[];o4.lastIndex=0;let i;for(;(i=o4.exec(e))!==null;){const s=i[0]??"",o=i[1]??"",r=s.indexOf(o);if(r<0)continue;const l=i[2]??i[3];let a=o+(l?s.slice(r+o.length):"");const u=a.replace(VB,""),c=a.length-u.length;a=u;const d=a2e(a,t);if(!d)continue;const f=i.index+r,p=f+a.length;n.push({...d,start:f,end:p,text:a}),c>0&&(o4.lastIndex-=c)}return n}const c2e=/^---[ \t]*$/,d2e=/^---[ \t]*(?:\r\n|\n)/;function f2e(e){const t=d2e.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length;const i=n;for(;n<=e.length;){let s=e.indexOf(` -`,n);s===-1&&(s=e.length);let o=e.slice(n,s);if(o.endsWith("\r")&&(o=o.slice(0,-1)),c2e.test(o)){const r=e.slice(i,n);if(r==="")return{frontmatter:null,body:e};const l=s<e.length?e.slice(s+1):"";return{frontmatter:r,body:l}}if(s===e.length)break;n=s+1}return{frontmatter:null,body:e}}function ag(e,t){let n=0,i=t-1;for(;i>=0&&e[i]==="\\";)n++,i--;return n%2===1}const h2e=/\s/,p2e=/\p{Nd}/u;function Yc(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function g2e(e,t){if(t<=0)return;const n=e.charCodeAt(t-1),i=n>=56320&&n<=57343&&t>1?t-2:t-1,s=e.codePointAt(i);return s===void 0?void 0:String.fromCodePoint(s)}function hS(e){return e!==void 0&&h2e.test(e)}function Bf(e){return e!==void 0&&p2e.test(e)}function m2e(e,t){const n=e[t+1];return Bf(Yc(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&Bf(Yc(e,t+2))}function o2(e){return e!==void 0&&e>="A"&&e<="Z"}const ZB=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function v2e(e,t){if(!o2(e[t-1]))return!1;let n=t-1;for(;n>0&&o2(e[n-1]);)n--;return ZB.test(e.slice(n,t))||Bf(Yc(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(Yc(e,t+1)??"")}function y2e(e,t){if(!o2(e[t-1]))return!1;let n=t-1;for(;n>0&&o2(e[n-1]);)n--;return ZB.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}const b2e=/^[-–—,,、;;::~~(([【//]$/;function k2e(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!Bf(Yc(e,t+2)))return!1;const i=e[t-1];return i!==void 0&&b2e.test(i)}function A2e(e){const t=String.raw`[、,,;;::~~\-–—至到//\s()()=*×=]|和|跟|与|及|或|and|or`;let n=e.replace(new RegExp(String.raw`^(?:${t})+`,"u"),"");for(;;){const s=n.replace(new RegExp(String.raw`^\p{L}+(?:${t})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(s===n)break;n=s}if(!/\p{Nd}/u.test(n))return!1;const i=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${i}(?:\p{L}+)?(?:(?:${t})+${i}(?:\p{L}+)?)*$`,"u").test(n)}const El=-1,pS=1,gS=2,mS=3;function C2e(e){const t=e.length,n=new Uint8Array(t),i=new Int32Array(t+1).fill(El),s=new Int32Array(t+1),o=new Int32Array(t+1),r=[],l=[];{const z=[];for(let q=0;q<t;q++)if(e[q]==="`"){if(ag(e,q))continue;let X=q+1;for(;X<t&&e[X]==="`";)X++;z.push([q,X]),q=X-1}const G=new Map;for(let q=0;q<z.length;q++){const X=z[q][1]-z[q][0],ee=G.get(X);ee?ee.push(q):G.set(X,[q])}const K=new Map;let H=0;for(;H<z.length;){const[q,X]=z[H],ee=X-q,ue=G.get(ee);let ie=K.get(ee)??0;for(;ie<ue.length&&ue[ie]<=H;)ie++;K.set(ee,ie),ie<ue.length?(l.push([q,z[ue[ie]][1]]),H=ue[ie]+1):H++}}let a=0;const u=z=>{for(;a<l.length&&z>=(l[a]?.[1]??0);)a++;const G=l[a];return G!==void 0&&z>=G[0]},c=new Set(' \n\r)。,、;:!?"<>`「」『』【】〔〕()*—–“”‘’'),d=[];for(const z of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))d.push(z.index);for(const z of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))d.push(z.index);for(const z of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(z.index===0||!/[\w~/.-]/.test(e[z.index-1]))&&d.push(z.index);d.sort((z,G)=>z-G);let f=-1;for(const z of d){if(z<f)continue;let G=z,K=0,H=0,q=0;for(;G<t;){const X=e[G];if(X==="(")K++;else if(X===")"){if(K===0)break;K--}else if(X==="[")H++;else if(X==="]"){if(H===0)break;H--}else if(X==="{")q++;else if(X==="}"){if(q===0)break;q--}else{if(c.has(X))break;if((X===","||X===";"||X==="!"||X==="?")&&!/[A-Za-z0-9$]/.test(e[G+1]??""))break;if(X===":"&&H===0&&G>z+7&&!/[\w/?#@~.+&=%-]/.test(e[G+1]??""))break}G++}r.push([z,G]),f=G}const p=[];for(let z=0;z<t;z++){if(e[z]!=="<"||e[z+1]===void 0||!/[a-zA-Z/]/.test(e[z+1]))continue;let G=z+1;const K=e[G]==="/";K&&G++;const H=/^[a-zA-Z][a-zA-Z0-9-]*/.exec(e.slice(G));if(!H)continue;G+=H[0].length;const q=e[G];if(q===void 0||!/[\s/>]/.test(q))continue;let X=G,ee=El,ue=El;for(;X<t;){const ie=e[X];if(ie===">"){ue=X;break}if(!K&&ie==="/"&&e[X+1]===">"){ue=X+1;break}if(!/\s/.test(ie)){ee=X;break}for(;X<t&&/\s/.test(e[X]);)X++;const xe=e[X];if(xe===void 0)break;if(xe===">"){ue=X;break}if(K){ee=X;break}if(xe==="/"&&e[X+1]===">"){ue=X+1;break}const ce=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(X));if(!ce){ee=X;break}X+=ce[0].length;let pe=X;for(;pe<t&&/\s/.test(e[pe]);)pe++;if(e[pe]==="="){for(pe++;pe<t&&/\s/.test(e[pe]);)pe++;const Ne=e[pe];if(Ne==='"'||Ne==="'"){const te=e.indexOf(Ne,pe+1);if(te===-1){ee=pe;break}X=te+1}else{const te=/^[^\s"'=<>`]+/.exec(e.slice(pe));if(!te){ee=pe;break}X=pe+te[0].length}}}if(ue!==El)p.push([z,ue+1]),z=ue;else if(ee!==El){const ie=e.indexOf("<",z+1);z=(ie!==-1&&ie<ee?ie:ee)-1}else break}let g=!0,m=!0,y=!0,w=!0;for(let z=0;z<t;z++){if(e[z]!=="<")continue;const G=e[z+1];let K=!1;if(G==="?"&&m){const ee=e.indexOf("?>",z+2);ee===-1?m=!1:(p.push([z,ee+2]),z=ee+1,K=!0)}else if(G==="!"){if(e[z+2]==="-"&&e[z+3]==="-"){if(g){const ee=e.indexOf("-->",z+4);ee===-1?g=!1:(p.push([z,ee+3]),z=ee+2,K=!0)}}else if(e.startsWith("[CDATA[",z+2)){if(y){const ee=e.indexOf("]]>",z+9);ee===-1?y=!1:(p.push([z,ee+3]),z=ee+2,K=!0)}}else if(w&&/[A-Z]/.test(e[z+2]??"")){const ee=e.indexOf(">",z+3);ee===-1?w=!1:(p.push([z,ee+1]),z=ee,K=!0)}}if(K)continue;if(G!==void 0&&/[a-zA-Z]/.test(G)){const ee=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(z+1));if(ee){let ue=z+1+ee[0].length;for(;ue<t&&e[ue]!==">"&&e[ue]!=="<"&&!/\s/.test(e[ue]);)ue++;if(e[ue]===">"){p.push([z,ue+1]),z=ue;continue}}}if(G===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(G))continue;let H=z+1;for(;H<t&&/[\w.!#$%&'*+/=?^`{|}~-]/.test(e[H]);)H++;if(e[H]!=="@")continue;H++;const q=/^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?/;let X=q.exec(e.slice(H));if(X){for(H+=X[0].length;e[H]==="."&&(X=q.exec(e.slice(H+1)),!!X);)H+=1+X[0].length;e[H]===">"&&(p.push([z,H+1]),z=H)}}p.sort((z,G)=>z[0]-G[0]);const k=[];for(const[z,G]of p){const K=k[k.length-1];K&&z<=K[1]?K[1]=Math.max(K[1],G):k.push([z,G])}r.push(...k);let A=0;const v=z=>{for(;A<k.length&&z>=(k[A]?.[1]??0);)A++;const G=k[A];return G!==void 0&&z>=G[0]},x=[];let E=null,S=0,M=!1;for(let z=0;z<t;z++)if(e[z]==="\\")z++;else if(M)e[z]===">"&&(M=!1);else if(!(u(z)||v(z))){if(E!==null)e[z]===E&&(E=null);else if(x.length>0&&(e[z]==='"'||e[z]==="'")&&z>0&&/\s/.test(e[z-1]))E=e[z];else if(e[z]==="[")S++;else if(e[z]==="]")S>0&&e[z+1]==="("&&(x.push(z),M=e[z+2]==="<",z++),S=Math.max(0,S-1);else if(e[z]==="("&&x.length>0)x.push(-1);else if(e[z]===")"&&x.length>0){const G=x.pop();if(G!==void 0&&G>=0){const K=e.slice(G+2,z);(/\s/.exec(K)===null||K.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(K)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(K))&&r.push([G,z+1])}}}r.sort((z,G)=>z[0]-G[0]);const _=[];for(const[z,G]of r){const K=_[_.length-1];K&&z<=K[1]?K[1]=Math.max(K[1],G):_.push([z,G])}const N=z=>{let G=0,K=_.length-1;for(;G<=K;){const H=G+K>>1,q=_[H];if(q===void 0)return!1;if(z<q[0])K=H-1;else if(z>=q[1])G=H+1;else return!0}return!1},D=new Uint8Array(t);{let z=-1,G=!1,K=!1,H=0;for(let q=0;q<=t;q++){const X=q<t&&e[q]==="`";if(q===t||X){if(X&&z!==-1&&K&&!G&&H===0)for(let ue=z+1;ue<q;ue++)D[ue]=1;z=q,G=!1,K=!1,H=0;continue}if(z===-1)continue;const ee=e[q];ee==="$"?ag(e,q)||(e[q+1]==="{"?(K=!0,H++,q++):H===0&&(G=!0)):H>0&&(ee==="{"?H++:ee==="}"&&H--)}}for(let z=0;z<t;z++)o[z+1]=(o[z]??0)+(e[z]==="`"&&!ag(e,z)?1:0),e[z]==="$"&&(ag(e,z)||N(z)||D[z]===1?n[z]=pS:hS(e[z-1])||Bf(Yc(e,z+1))||k2e(e,z)?n[z]=gS:n[z]=mS),s[z+1]=(s[z]??0)+(n[z]===gS?1:0);let T=El;for(let z=t-1;z>=0;z--)n[z]===mS&&(T=z),i[z]=T;const $=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,P=/[^\p{L}\p{Nd}\s]$/u,O=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,R=/(?:^|\s)[a-z]{2,}/,W=(z,G)=>{const K=Yc(e,z+1);if(K===void 0||!$.test(K))return!1;const H=i[z+1]??El;if(H!==El){const q=e.slice(z+1,H);return!(q.length===((q.codePointAt(0)??0)>65535?2:1))&&O.test(q)||/[,;:!?]$/.test(q)||/^[a-z]{2,}$/.test(q)?!1:(s[H]??0)-(s[z+1]??0)===0&&(o[H]??0)-(o[z+1]??0)===0}return P.test(G)||O.test(G)||R.test(G)};return(z,G=-1)=>{if(e[z]!=="$"||n[z]===pS||e[z+1]==="$"||e[z-1]==="$"&&G!==z||v2e(e,z)||z+1>=t||hS(e[z+1]))return null;const K=i[z+1]??El;if(K===El||(s[K]??0)-(s[z+1]??0)>0||(o[K]??0)-(o[z+1]??0)>0)return null;const H=e.slice(z+1,K);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(H)||e[K+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(H)||Bf(g2e(e,z))&&A2e(H)||m2e(e,z)&&(W(K,H)||y2e(e,K)||/\s/.test(H)&&/\p{Nd}$/u.test(H)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(H)||e[K+1]==="$"&&!/\p{L}/u.test(H)&&/[^\p{L}\p{Nd}\s]$/u.test(H))?null:{content:H,end:K+1}}}const vS=new WeakMap;function w2e(e,t){if(e.src[e.pos]!=="$")return!1;let n=vS.get(e);(!n||n.src!==e.src)&&(n={src:e.src,match:C2e(e.src),lastEnd:-1},vS.set(e,n));const i=n.match(e.pos,n.lastEnd);if(!i||i.end>e.posMax)return!1;if(n.lastEnd=i.end,t)return e.pos=i.end,!0;const s=e.push("math_inline","math",0);return s.content=i.content,s.markup="$",s.raw=e.src.slice(e.pos,i.end),s.loading=!1,e.pos=i.end,!0}function x2e(e){return e.inline.ruler.disable("math"),e.inline.ruler.before("escape","math",w2e),e}const _2e=12e4,S2e=6e4,M2e=32,I2e=3e4,yS=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function E2e(e){let t=0,n=0,i=0;yS.lastIndex=0;let s;for(;(s=yS.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,i=Math.max(i,r.length)}return{codeRenderer:e.length>=_2e||n>=S2e||t>=M2e||i>=I2e?"pre":"shiki",codeFenceCount:t,codeChars:n}}async function GB(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return L2e(e)}function T2e(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||GB(e)}function L2e(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const QB="md-table-wide",YB="md-table-toggle",JB="md-table-fade",bS="md-table-toggle--show",N2e="md-table-at-end",F2e="kimi-table-layout",XB='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>',B2e='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" y1="10" x2="21" y2="3"/><line x1="3" y1="21" x2="10" y2="14"/></svg>';function Np(e){return e.querySelector(`button.${YB}`)}function e$(e){return e.querySelector(`.${JB}`)}const $2e=26;function D2e(e){const t=Np(e);if(!t)return;const n=e.querySelector("thead tr")??e.querySelector("tr");if(!n)return;const i=n.getBoundingClientRect(),s=e.getBoundingClientRect().top,o=Math.max(2,Math.round(i.top-s+(i.height-$2e)/2));t.style.top=`${o}px`,t.style.right=`${o}px`}function R2e(e){return e.closest(".a-msg .msg")!==null}function z2e(e){const t=e.querySelector("table");return t!==null&&t.scrollWidth>e.clientWidth+1}function t$(e){const t=`translateX(${e.scrollLeft}px)`,n=e$(e);n&&(n.style.transform=t);const i=Np(e);i&&(i.style.transform=t);const s=e.scrollLeft+e.clientWidth>=e.scrollWidth-2;e.classList.toggle(N2e,s)}function O2e(e,t){const n=Np(e);if(n)return n;if(!R2e(e))return null;const i=document.createElement("div");i.className=JB,i.setAttribute("aria-hidden","true");const s=document.createElement("button");return s.type="button",s.className=YB,s.innerHTML=XB,s.setAttribute("aria-label",t.widen),s.title=t.widen,s.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),P2e(e,t)}),e.appendChild(i),e.appendChild(s),e.addEventListener("scroll",()=>t$(e),{passive:!0}),Vb(e),s}function P2e(e,t){const n=e.classList.toggle(QB),i=Np(e);if(i){i.innerHTML=n?B2e:XB;const s=n?t.restore:t.widen;i.setAttribute("aria-label",s),i.title=s}Vb(e),e.dispatchEvent(new CustomEvent(F2e,{bubbles:!0}))}function Vb(e){const t=Np(e);if(!t)return;const n=z2e(e),i=e.classList.contains(QB);t.classList.toggle(bS,n||i);const s=e$(e);s&&s.classList.toggle(bS,n),D2e(e),t$(e)}function j2e(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function H2e(e){return new Worker("/assets/mermaidParser.worker-BFSlSHEW.js",{type:"module",name:e?.name})}const W2e={key:0,class:"md-frontmatter"},q2e={key:1,class:"diff-wrap"},U2e={class:"diff-bar"},K2e=["aria-label","onClick"],V2e={class:"diff-pre"},Z2e={key:0,class:"diff-sign"},G2e={class:"diff-text"},Q2e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",kS="github-light",AS="github-dark",Y2e=tt({__name:"Markdown",props:{text:{},openFile:{},streaming:{type:Boolean,default:!1}},setup(e){Bpe(),Vpe(),Dpe(),Qpe(),$pe(new j2e),Gpe(new H2e);const{t}=jf(),n=an("resolveImage"),i=Z(null),s=e,o=F(()=>!s.streaming),r=F(()=>f2e(s.text??"")),l=F(()=>r.value.frontmatter),a=F(()=>r.value.body),u=F(()=>l2e(a.value)),c=F(()=>s.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:E2e(a.value)),d=rv(),f=F(()=>!s.streaming),p=Ts(new Map),g=new Set,m=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,y=/(<img\b[^>]*?\bsrc=")([^"]+)(")/gi;function w(K){return!/^(https?:|data:|blob:)/i.test(K)}function k(K){if(!n)return;const H=[];for(const q of[m,y]){q.lastIndex=0;let X;for(;(X=q.exec(K))!==null;)H.push(X[2]??"")}for(const q of H)!q||!w(q)||p.has(q)||g.has(q)||(g.add(q),n(q).then(X=>{p.set(q,X!==q?X:"")}).catch(()=>{p.set(q,"")}).finally(()=>{g.delete(q)}))}function A(K){if(!n)return K;const H=q=>{if(!w(q))return null;const X=p.get(q);return X===void 0?Q2e:X===""?null:X};return K.replace(m,(q,X,ee,ue)=>{const ie=H(ee);return ie===null?q:`${X}${ie}${ue}`}).replace(y,(q,X,ee,ue)=>{const ie=H(ee);return ie===null?q:`${X}${ie}${ue}`})}Qe(a,K=>k(K),{immediate:!0});function v(){if(!i.value||!s.openFile||s.streaming)return;const K=document.createTreeWalker(i.value,NodeFilter.SHOW_TEXT),H=[];let q=K.nextNode();for(;q;){const X=q,ee=X.parentElement;ee&&!ee.closest("a, pre, .md-file-link, svg")&&X.data.trim().length>0&&H.push(X),q=K.nextNode()}for(const X of H){const ee=u2e(X.data,{aliases:u.value});if(ee.length===0||!X.parentNode)continue;const ue=document.createDocumentFragment();let ie=0;for(const xe of ee){xe.start>ie&&ue.append(document.createTextNode(X.data.slice(ie,xe.start)));const ce=document.createElement("button");ce.type="button",ce.className="md-file-link",ce.textContent=xe.text,ce.title=xe.line?`${xe.path}:${xe.line}`:xe.path,ce.addEventListener("click",pe=>{pe.preventDefault(),pe.stopPropagation(),s.openFile?.({path:xe.path,line:xe.line})}),ue.append(ce),ie=xe.end}ie<X.data.length&&ue.append(document.createTextNode(X.data.slice(ie))),X.parentNode.replaceChild(ue,X)}}function x(K){return!(!K||/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(K))}function E(K){let H=K.length;for(const q of["#","?"]){const X=K.indexOf(q);X!==-1&&X<H&&(H=X)}return K.slice(0,H)}function S(){if(!i.value||!s.openFile||s.streaming)return;const K=i.value.querySelectorAll("a[href]");for(const H of K){if(H.dataset.mdLinkHandled==="true"||H.closest("svg"))continue;const q=H.getAttribute("href")??"";x(q)&&(H.dataset.mdLinkHandled="true",H.addEventListener("click",X=>{X.preventDefault(),X.stopPropagation(),s.openFile?.({path:E(q)})}))}}function M(){return{widen:t("conversation.widenTable"),restore:t("conversation.restoreTableWidth")}}function _(){if(!i.value||s.streaming)return;const K=M();for(const H of i.value.querySelectorAll(".table-node-wrapper"))O2e(H,K)}function N(){if(!(!i.value||s.streaming))for(const K of i.value.querySelectorAll(".table-node-wrapper"))Vb(K)}function D(){kt().then(()=>{v(),S(),_()})}Qe(()=>s.text,D),Qe(()=>s.streaming,D);let T=null,$=null;pn(()=>{D(),i.value&&(T=new MutationObserver(D),T.observe(i.value,{childList:!0,subtree:!0}),$=new ResizeObserver(N),$.observe(i.value))}),An(()=>{T?.disconnect(),$?.disconnect()});const P={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},O=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,R=F(()=>{const K=A(a.value),H=[];let q=0;O.lastIndex=0;let X;for(;(X=O.exec(K))!==null;){const ue=X[1]??"",ie=K.slice(q,X.index)+(ue||"");ie.trim()&&H.push({kind:"md",text:ie}),H.push({kind:"diff",code:X[2]??""}),q=O.lastIndex}const ee=K.slice(q);return(ee.trim()||H.length===0)&&H.push({kind:"md",text:ee}),H});function W(K){return K.split(` -`).map(H=>H.startsWith("@@")?{type:"hunk",sign:"",text:H}:/^\+(?!\+\+)/.test(H)?{type:"add",sign:"+",text:H.slice(1)}:/^-(?!--)/.test(H)?{type:"del",sign:"-",text:H.slice(1)}:H.startsWith(" ")?{type:"ctx",sign:"",text:H.slice(1)}:{type:"ctx",sign:"",text:H})}const z=Z(null);function G(K,H){GB(K).then(q=>{q&&(z.value=H,setTimeout(()=>{z.value=null},1400))})}return(K,H)=>(b(),I("div",{ref_key:"mdRef",ref:i,class:"md"},[l.value!==null?(b(),I("pre",W2e,B(l.value),1)):ne("",!0),(b(!0),I(Be,null,yt(R.value,(q,X)=>(b(),I(Be,{key:X},[q.kind==="md"?(b(),fe(h(rr),{key:0,content:q.text,"custom-markdown-it":h(x2e),mode:"chat","code-renderer":c.value.codeRenderer,"is-dark":h(d),"code-block-light-theme":kS,"code-block-dark-theme":AS,themes:[kS,AS],"code-block-props":P,final:o.value,"smooth-streaming":e.streaming,"batch-rendering":f.value,"defer-nodes-until-visible":!1,onCopy:h(T2e)},null,8,["content","custom-markdown-it","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(b(),I("div",q2e,[C("div",U2e,[H[0]||(H[0]=C("span",{class:"diff-lang"},"diff",-1)),V(h(gn),{text:h(t)("filePreview.copyCode")},{default:he(()=>[C("button",{class:"diff-copy","aria-label":h(t)("filePreview.copyCode"),onClick:ee=>G(q.code,X)},[V(h(Ce),{name:z.value===X?"check":"copy",size:"sm"},null,8,["name"])],8,K2e)]),_:2},1032,["text"])]),C("pre",V2e,[C("code",null,[(b(!0),I(Be,null,yt(W(q.code),(ee,ue)=>(b(),I("span",{key:ue,class:De(["diff-line",`diff-${ee.type}`])},[ee.type!=="hunk"?(b(),I("span",Z2e,B(ee.sign),1)):ne("",!0),C("span",G2e,B(ee.text),1)],2))),128))])])]))],64))),128))],512))}}),Kl=vt(Y2e,[["__scopeId","data-v-f0354d0f"]]),J2e=640,X2e=`(max-width: ${J2e}px)`;function eve(){const e=Z(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(X2e);e.value=t.matches;const n=i=>{e.value=i.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),An(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),An(()=>t.removeListener(n))),e}const n$=Z(typeof window>"u"?0:window.innerWidth);let ug=0,r2=!1;function x8(){n$.value=window.innerWidth}function tve(){r2||typeof window>"u"||(window.addEventListener("resize",x8),r2=!0,x8())}function nve(){!r2||typeof window>"u"||(window.removeEventListener("resize",x8),r2=!1)}function i$(e,t,n){return Math.max(t,e-n)}function _8(e,t,n){return Math.min(n,Math.max(t,e))}function s$(){return pn(()=>{ug+=1,tve()}),Gn(()=>{ug=Math.max(0,ug-1),ug===0&&nve()}),{viewportWidth:n$}}const ive=24;function sve(e){const t=Z(null),n=Z(!0);let i=null,s=null,o=null,r=0,l=0,a=!1,u=0;function c(){const y=t.value;y&&(y.scrollTop=Math.max(y.scrollTop,r))}function d(){const w=t.value?.firstElementChild??null;w!==o&&(o&&i?.unobserve(o),o=w,w&&i?.observe(w))}function f(){const y=t.value;!y||a||(n.value=r-y.scrollTop-l<ive)}function p(y){y!==u||!a||(a=!1,f())}function g(){n.value=!1,a=!0;const y=++u;if(typeof requestAnimationFrame!="function"){queueMicrotask(()=>p(y));return}requestAnimationFrame(()=>{requestAnimationFrame(()=>p(y))})}function m(){const y=t.value;y&&(i?.disconnect(),s?.disconnect(),o=null,a=!1,u++,r=0,l=0,typeof ResizeObserver=="function"?(i=new ResizeObserver(()=>{const w=t.value;if(!w)return;const{scrollHeight:k,clientHeight:A}=w,v=k>r+1,x=A<l-1;if(r=k,l=A,a){p(u);return}n.value&&(v||x)&&c()}),i.observe(y),d()):(r=y.scrollHeight,l=y.clientHeight,c()),typeof MutationObserver=="function"&&(s=new MutationObserver(d),s.observe(y,{childList:!0})))}return Qe(e,()=>{n.value=!0,kt(m)}),Qe(t,()=>void kt(m)),pn(()=>void kt(m)),An(()=>{u++,i?.disconnect(),s?.disconnect()}),{scroller:t,following:n,onScroll:f,pinScroll:g}}function ove(e){try{const t=uo(e);if(t===null)return null;const n=Number(t);return Number.isFinite(n)?n:null}catch{return null}}function CS(e,t){try{Ns(e,String(t))}catch{}}function rve(e){const{storageKey:t,defaultWidth:n,min:i,max:s,reverse:o=!1,axis:r="x",applyLive:l}=e;function a(D){return Number.isFinite(D)?Math.min(fu(s),Math.max(i,Math.round(D))):n}const u=Z(a(ove(t)??n)),c=Z(!1);function d(D){const T=D<=i,$=D>=fu(s),P=r==="x"?"col-resize":"row-resize";if(T&&$)return P;const[O,R]=r==="x"?["e-resize","w-resize"]:["s-resize","n-resize"];return $?o?O:R:T?o?R:O:P}const f=Z(null),p=F(()=>d(f.value??u.value));function g(D){typeof document>"u"||(document.body.style.cursor=d(D))}function m(D){const T=a(D);u.value=T,CS(t,T)}Qe(()=>fu(s),D=>{!c.value&&u.value>D&&m(D)});let y=0,w=0,k=null,A=-1,v=0,x=0,E=0;function S(){if(x=0,!c.value)return;const D=v-y;E=a(w+(o?-D:D)),f.value=E,g(E),l?l(E):u.value=E}function M(D){if(c.value&&(v=r==="x"?D.clientX:D.clientY,x===0)){if(typeof requestAnimationFrame!="function"){S();return}x=requestAnimationFrame(S)}}function _(){if(c.value){if(x!==0&&(cancelAnimationFrame(x),S()),c.value=!1,l?m(E):CS(t,u.value),f.value=null,typeof document<"u"&&(document.body.style.userSelect="",document.body.style.cursor=""),k){try{k.releasePointerCapture(A)}catch{}k.removeEventListener("pointermove",M),k.removeEventListener("pointerup",_),k.removeEventListener("pointercancel",_)}k=null,A=-1}}function N(D){D.preventDefault(),c.value=!0,y=r==="x"?D.clientX:D.clientY,w=a(u.value),E=w,k=D.currentTarget,A=D.pointerId,typeof document<"u"&&(document.body.style.userSelect="none"),g(w);try{k.setPointerCapture(A)}catch{}k.addEventListener("pointermove",M),k.addEventListener("pointerup",_),k.addEventListener("pointercancel",_)}return Gn(_),{width:u,dragging:c,cursor:p,clamp:a,setWidth:m,onPointerDown:N}}const ol=Z(null),bf=Z(!1),lve=F(()=>ol.value!==null);function Zb(e){const t=ol.value;!t||bf.value||(ol.value=null,t.resolve(e))}async function ave(){const e=ol.value;if(!(!e||bf.value)){if(!e.action){Zb(!0);return}bf.value=!0;try{await e.action(),ol.value===e&&(ol.value=null),e.resolve(!0)}catch(t){ol.value===e&&(ol.value=null),e.reject(t)}finally{bf.value=!1}}}function uve(e){return bf.value?Promise.resolve(!1):(ol.value&&Zb(!1),new Promise((t,n)=>{ol.value={...e,resolve:t,reject:n}}))}function Hu(){return{current:ol,busy:bf,isConfirmOpen:lve,confirm:uve,settle:Zb,runAction:ave}}function cve(e){const{sessionId:t}=e;function n(a){return uo(GC(a))??""}function i(a,u){const c=GC(a);u?Ns(c,u):lr(c)}const s=Z(n(t())),o=Z(null);Qe(s,a=>{i(t(),a)}),Qe(t,(a,u)=>{a!==u&&(i(u,s.value),s.value=n(a))});function r(a){s.value=a,kt(()=>{const u=o.value;if(!u)return;u.focus();const c=a.length;u.setSelectionRange(c,c)})}function l(){i(t(),"")}return{text:s,editorRef:o,loadForEdit:r,clearDraft:l}}function dve(e){return e?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable===!0:!1}function fve(e){const{sessionId:t,mobile:n,starting:i,dockedComposer:s,emptyComposer:o}=e,r=Z(!1);Qe(t,()=>{n()||(r.value=!0)}),Qe([r,s,o,i],()=>{if(!r.value)return;const l=s.value??o.value;if(!l)return;const a=typeof document<"u"?document.activeElement:null;if(dve(a)){r.value=!1;return}l.focus(),(typeof document>"u"||document.activeElement!==a)&&(r.value=!1)},{flush:"post"})}const l2=100;function hve(e){const t=od(un.inputHistory);if(Array.isArray(t)){const n=t.filter(o=>typeof o=="string"&&o.length>0);if(!e||n.length===0)return{};const i=n.length>l2?n.slice(-l2):n,s={[e]:i};return Pu(un.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function pve(e){const{text:t,editorRef:n,sessionId:i}=e,s=Z(hve(i())),o=F(()=>s.value[i()??""]??[]);let r=-1,l="";function a(y){const w=i();if(r=-1,!w)return;const k=y.trim();if(!k)return;const A=s.value[w]??[];if(A.at(-1)===k)return;const v=[...A,k],x=v.length>l2?v.slice(-l2):v;s.value={...s.value,[w]:x},Pu(un.inputHistory,s.value)}function u(){const y=n.value;return y?(y.selectionStart??0)===0:!1}function c(y){t.value=y,kt(()=>{const w=n.value;if(!w)return;const k=y.length;w.setSelectionRange(k,k)})}function d(){const y=o.value;if(y.length!==0){if(r===-1)l=t.value,r=y.length-1;else if(r>0)r-=1;else return;c(y[r])}}function f(){if(r===-1)return;const y=o.value;r<y.length-1?(r+=1,c(y[r])):(r=-1,c(l))}function p(){r=-1}function g(){return r!==-1}function m(){return o.value.length>0}return Qe(i,()=>{r=-1}),{push:a,caretAtTextStart:u,recallOlder:d,recallNewer:f,resetBrowsing:p,isBrowsing:g,hasHistory:m}}function gve(e){const{text:t,editorRef:n,skills:i,emitCommand:s,historyPush:o,clearDraft:r,resolveDesc:l}=e,a=Z(!1),u=Z([]),c=Z([]),d=Z(0);function f(){const g=t.value;if(/^\/\S*$/.test(g)){const m=Bie(g,FL(i()),l);u.value=m.map(y=>y.item),c.value=m.map(y=>y.ranges),d.value=0,a.value=!0}else a.value=!1}function p(g){if(a.value=!1,g.acceptsInput){t.value=`${g.name} `,kt(()=>{const m=n.value;if(!m)return;const y=t.value.length;m.setSelectionRange(y,y),m.focus()});return}t.value="",r?.(),o(g.name),s(g.name)}return{open:a,items:u,ranges:c,active:d,update:f,select:p}}function mve(e){const{text:t,editorRef:n,searchFiles:i}=e,s=Z(!1),o=Z([]),r=Z(0),l=Z(!1);let a=null;function u(){const p=t.value,g=n.value?.selectionStart??p.length;let m=g-1;for(;m>=0&&!/\s/.test(p[m]);)m--;m++;const y=p.slice(m,g);return y.startsWith("@")?{token:y.slice(1),start:m,end:g}:null}function c(){const p=u(),g=i();if(a!==null&&clearTimeout(a),!p||!g||p.token.length===0){s.value=!1,l.value=!1;return}const m=p.token;a=setTimeout(async()=>{l.value=!0,s.value=!0,r.value=0;const y=()=>{const w=u();return w!==null&&w.token===m&&s.value};try{const w=await g(m);y()&&(o.value=w)}catch{y()&&(o.value=[])}finally{y()&&(l.value=!1)}},200)}function d(){a!==null&&(clearTimeout(a),a=null),s.value=!1,l.value=!1}function f(p){const g=u();if(!g)return;const m=t.value;t.value=m.slice(0,g.start)+p.path+m.slice(g.end),s.value=!1,kt(()=>{const y=n.value;if(!y)return;const w=g.start+p.path.length;y.setSelectionRange(w,w),y.focus()})}return{open:s,items:o,active:r,loading:l,update:c,close:d,select:f}}const vve="kimi-web.file-preview-width",Hd=320;function yve({client:e,sideWidth:t,detailTarget:n,closeFilePreview:i}){const{viewportWidth:s}=s$(),o=F(()=>Math.max(0,s.value-t.value)),r=F(()=>i$(o.value,Hd,Hd));function l(re){return _8(Math.round(re),Hd,r.value)}function a(){return l(o.value/2)}const u=F(()=>a()),c=Z(u.value),d=F(()=>_8(c.value,Hd,r.value)),f=Z(null),p=F(()=>{const re=f.value;if(!re)return null;const se=e.turns.value.find(U=>U.id===re.turnId);return se?.role==="compaction"&&se.text?se.text:null}),g=F(()=>p.value!==null);function m(re){if(f.value?.turnId===re.turnId){f.value=null,n.value==="compaction"&&(n.value=null);return}n.value="compaction",f.value=re}function y(){f.value=null,n.value==="compaction"&&(n.value=null)}const w=Z(null),k=F(()=>{const re=w.value;if(!re)return{entry:void 0,version:0};const se=e.auxiliaryTranscripts.getEntry(re.sessionId,re.subagentId);return{entry:se,version:se?.version.value??0}});function A(re){const se=e.turns.value.flatMap(U=>U.tools??[]).find(U=>U.agentId===re);if(!se)return{};try{const U=JSON.parse(se.arg);return{name:typeof U.description=="string"?U.description:void 0,subagentType:typeof U.subagent_type=="string"?U.subagent_type:void 0,status:se.status,outputLines:se.output}}catch{return{}}}const v=F(()=>{const re=w.value;if(!re)return null;const se=e.activeAppTasks.value.find(Ke=>Ke.agentId===re.subagentId||Ke.id===re.subagentId||Ke.backgroundTaskId===re.subagentId);if(se)return AX(se,e.findBashCommandForTask(se));const U=k.value.entry?.channel,J=U?.agents.find(Ke=>Ke.agentId===re.subagentId),de=U?.refreshError??!1,me=U===void 0||U.loading,Ie=U?.snapshot.meta.activity==="turn",je=A(re.subagentId),ke=U?.snapshot.items.findLast(Ke=>Ke.kind==="turn"),Le=ke?.kind==="turn"&&ke.state==="cancelled",it=ke?.kind==="turn"&&ke.state==="failed"||je.status==="error",Fe=Ie?"working":Le?"cancelled":it?"failed":me?"queued":de&&je.status===void 0?"failed":"completed",Re=Ie?"running":Le?"cancelled":it?"failed":me?"running":de&&je.status===void 0?"failed":"completed";return{id:re.subagentId,name:J?.label??je.name??re.subagentId,subagentType:je.subagentType??(J?.type==="sub"?"subagent":J?.type),phase:Fe,status:Re,outputLines:je.outputLines}}),x=F(()=>{const re=k.value.entry;if(!re)return[];const se=w.value,U=re.channel.agents.find(J=>J.agentId===se?.subagentId);return BX(re.channel.snapshot,e.getFileUrl,U)}),E=F(()=>k.value.entry?.channel.loading??!1),S=F(()=>k.value.entry?.channel.refreshError??!1),M=F(()=>k.value.entry?.channel.loadingOlder??!1),_=F(()=>k.value.entry?.channel.loadOlderError??!1),N=F(()=>k.value.entry?.channel.snapshot.hasMoreOlder??!1),D=F(()=>k.value.entry?.channel.snapshot.meta.activity==="turn"),T=F(()=>v.value!==null);function $(re){const se=e.activeAppTasks.value.find(U=>U.agentId===re||U.id===re||U.backgroundTaskId===re);return!se||se.kind==="subagent"&&se.agentId===re}function P(re){return e.activeAppTasks.value.find(U=>U.agentId===re||U.id===re||U.backgroundTaskId===re)?.agentId??re}function O(re){const se=e.activeSessionId.value;if(!re||!se)return;const U=P(re);if(n.value==="agent"&&w.value?.sessionId===se&&w.value.subagentId===U){R();return}const J=w.value;J&&J.subagentId!==U&&e.auxiliaryTranscripts.deactivate(J.sessionId,J.subagentId),w.value={sessionId:se,subagentId:U},n.value="agent",$(U)&&e.auxiliaryTranscripts.activate(se,U)}Qe(()=>e.activeAppTasks.value,re=>{const se=w.value;if(!se)return;const U=re.find(J=>J.backgroundTaskId===se.subagentId&&J.agentId!==void 0);!U||U.agentId===se.subagentId||(w.value={sessionId:se.sessionId,subagentId:U.agentId},n.value==="agent"&&e.auxiliaryTranscripts.activate(se.sessionId,U.agentId))});function R(){const re=w.value;re&&e.auxiliaryTranscripts.deactivate(re.sessionId,re.subagentId),w.value=null,n.value==="agent"&&(n.value=null)}Qe(n,(re,se)=>{if(se!=="agent"||re==="agent")return;const U=w.value;U&&e.auxiliaryTranscripts.deactivate(U.sessionId,U.subagentId)});function W(){const re=k.value.entry;re&&re.channel.loadOlder().catch(()=>{})}const z=Z("list"),G=Z(null);function K(){if(n.value==="diff"){H();return}n.value="diff",z.value="list",G.value=null,e.loadGitStatus(e.activeSessionId.value)}function H(){n.value==="diff"&&(n.value=null),z.value="list",G.value=null,e.clearFileDiff()}async function q(re){z.value="detail",G.value=re,await e.loadFileDiff(re)}const X=vl(null);function ee(re){if(X.value===re&&n.value==="turn-diff"){ue();return}X.value=re,n.value="turn-diff"}function ue(){X.value=null,n.value==="turn-diff"&&(n.value=null)}async function ie(re){if(!e.activeSessionId.value&&e.activeWorkspaceId.value){const se=await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,re);return n.value="btw",se}return await e.openSideChat(re),n.value="btw",null}function xe(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function ce(){n.value==="btw"&&(n.value=null)}const pe=F(()=>e.sideChatVisible.value),Ne=F(()=>n.value!==null&&(n.value!=="compaction"||g.value)&&(n.value!=="agent"||T.value)&&(n.value!=="btw"||pe.value)),te=Z(!1),ye=Z({});function j(){switch(n.value){case"compaction":return f.value?{kind:"compaction",...f.value}:null;case"agent":return w.value?{kind:"agent",...w.value}:null;case"btw":return{kind:"btw"};default:return null}}function Y(re){if(re)switch(re.kind){case"compaction":f.value={turnId:re.turnId},n.value="compaction";break;case"agent":if(e.activeSessionId.value){const se=P(re.subagentId);w.value={sessionId:e.activeSessionId.value,subagentId:se},n.value="agent",$(se)&&e.auxiliaryTranscripts.activate(e.activeSessionId.value,se)}break;case"btw":e.sideChatVisible.value&&(n.value="btw");break}}function ve(){return n.value==="compaction"&&g.value?(y(),!0):n.value==="agent"&&T.value?(R(),!0):n.value==="file"?(i(),!0):n.value==="diff"?(H(),!0):n.value==="turn-diff"?(ue(),!0):n.value==="btw"?(xe(),!0):!1}return Qe(e.activeSessionId,(re,se)=>{if(se){const U=j();U?ye.value[se]=U:delete ye.value[se]}i(),y(),R(),H(),ue(),ce(),re&&Y(ye.value[re])}),{PREVIEW_WIDTH_KEY:vve,PREVIEW_MIN:Hd,previewDefaultWidth:u,previewMax:r,previewWidth:c,previewPanelWidth:d,compactionPanelText:p,compactionPanelVisible:g,openCompactionPanel:m,closeCompactionPanel:y,agentPanelMember:v,agentPanelTurns:x,agentPanelLoading:E,agentPanelLoadError:S,agentPanelLoadingMore:M,agentPanelLoadMoreError:_,agentPanelHasMore:N,agentPanelRunning:D,agentPanelVisible:T,openAgentPanel:O,closeAgentPanel:R,loadOlderAgentMessages:W,detailDiffMode:z,detailDiffPath:G,openDiffDetail:K,closeDiffDetail:H,selectDiffFile:q,turnDiffChange:X,openTurnDiff:ee,closeTurnDiff:ue,btwVisible:pe,openSideChatTab:ie,closeSideChat:xe,hideSideChatPanel:ce,sidePanelVisible:Ne,panelDragging:te,closeOpenSidePanel:ve}}const bve=un.sidebarWidth,wS=un.sidebarCollapsed,xS=270,r4=220,kve=480,Ave=320;function Cve(e={}){const{viewportWidth:t}=s$(),n=Z(xS),i=Z(!1),s=Z(!1),o=F(()=>{const c=Ave+(fu(e.previewOpen)?Hd:0);return Math.min(kve,i$(t.value,r4,c))}),r=F(()=>_8(n.value,r4,o.value));function l(){try{i.value=uo(wS)==="true"}catch{i.value=!1}}function a(){try{Ns(wS,String(i.value))}catch{}}function u(){i.value=!i.value,a()}return{SIDEBAR_WIDTH_KEY:bve,SIDEBAR_DEFAULT:xS,SIDEBAR_MIN:r4,sidebarMax:o,sessionColWidth:n,sidebarCollapsed:i,sidebarDragging:s,sideWidth:r,loadSidebarCollapsed:l,toggleSidebarCollapse:u}}const wve=40409;function _S(e){return Ps(e)&&e.code===wve}function SS(e){return e.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(e)||e.startsWith("\\\\")}function MS(e){if(e.startsWith("\\\\"))return e;const t=/^[a-zA-Z]:/.test(e)?e.slice(0,2):"",n=[];for(const i of e.slice(t.length).split(/[\\/]+/))if(!(!i||i===".")){if(i===".."){n.pop();continue}n.push(i)}return t?`${t}/${n.join("/")}`:`/${n.join("/")}`}function xve({client:e,detailTarget:t,t:n}){const i=Z(null),s=Z(null),o=Z(!1),r=Z(null),l=Z(null);let a=0;const u=F(()=>{const v=l.value;return v?e.getFileDownloadUrl(v):null}),c=F(()=>i.value!==null&&l.value!==null);function d(v){return v.length>1?v.replace(/\/+$/,""):v}function f(v){const x=av(v,e.status.value.cwd);return x===null||x.split(/[\\/]+/).includes("..")?null:p(x)||null}function p(v){const x=[];for(const E of v.split(/[\\/]+/))if(!(!E||E===".")){if(E===".."){x.pop();continue}x.push(E)}return x.join("/")}function g(v){const x=v.trim();if(!x)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(x))return{error:n("filePreview.errors.unsupportedPath")};if(x.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const E=d(e.status.value.cwd);if(x.startsWith("/")){if(!E||x!==E&&!x.startsWith(`${E}/`))return{error:n("filePreview.errors.outsideWorkspace")};const M=x===E?"":x.slice(E.length+1);if(M.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const _=p(M);return _?{path:_}:{error:n("filePreview.errors.isDirectory")}}if(x.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const S=p(x);return S?{path:S}:{error:n("filePreview.errors.emptyPath")}}async function m(v){const x=i.value;if(t.value==="file"&&x&&x.path===v.path&&x.line===v.line&&(x.content??"")===(v.content??"")){w();return}const E=++a;if(t.value="file",s.value=null,r.value=null,o.value=!0,i.value=v,l.value=null,typeof v.content=="string"){o.value=!1,s.value={path:v.path,content:v.content,encoding:"utf-8",mime:"text/markdown",isBinary:!1,size:v.content.length};return}if(!SS(v.path)&&v.path.split(/[\\/]+/).includes("..")){const M=d(e.status.value.cwd);M&&(v={...v,path:MS(`${M}/${v.path}`)})}if(SS(v.path)){v={...v,path:MS(v.path)};const M=f(v.path);if(M!==null)v={...v,path:M};else{try{const _=await e.readHostFileContent(v.path);if(E!==a)return;l.value=null,s.value={path:v.path,content:_.content,encoding:_.encoding,mime:_.mime,isBinary:_.isBinary,size:_.size}}catch(_){if(E!==a)return;r.value=_S(_)?n("filePreview.errors.notFound"):WU(_)?n("filePreview.errors.tooLarge"):_ instanceof Error?_.message:n("filePreview.errors.loadFailed")}finally{E===a&&(o.value=!1)}return}}const S=g(v.path);if("error"in S){o.value=!1,r.value=S.error;return}l.value=S.path;try{const M=await e.readFileContent(S.path);if(E!==a)return;M?s.value={...M,path:M.path||S.path}:r.value=n("filePreview.errors.loadFailed")}catch(M){if(E!==a)return;r.value=_S(M)?n("filePreview.errors.notFound"):M instanceof Error?M.message:n("filePreview.errors.loadFailed")}finally{E===a&&(o.value=!1)}}function y(){a+=1,i.value=null,l.value=null,s.value=null,r.value=null,o.value=!1}function w(){y(),t.value==="file"&&(t.value=null)}Qe(t,(v,x)=>{x==="file"&&v!=="file"&&y()});function k(){const v=s.value?.path??i.value?.path;v&&e.openWorkspaceFile(v,i.value?.line)}function A(){const v=s.value?.path??i.value?.path;v&&e.revealWorkspaceFile(v)}return{previewTarget:i,previewFile:s,previewLoading:o,previewError:r,previewDownloadUrl:u,previewExternalActions:c,openFilePreview:m,closeFilePreview:w,openPreviewInEditor:k,revealPreviewFile:A}}function _ve({running:e,title:t="Kimi Code"}){if(Wf){I4(()=>{typeof document<"u"&&(document.title=fu(t))});return}const n=["◐","◓","◑","◒"],i=Z(0);let s=null;function o(){s===null&&(i.value=0,s=setInterval(()=>{i.value=(i.value+1)%n.length},250))}function r(){s!==null&&(clearInterval(s),s=null),i.value=0}Qe(e,a=>{a?o():r()},{immediate:!0});const l=F(()=>`${e.value?`${n[i.value]} `:""}${fu(t)}`);I4(()=>{typeof document<"u"&&(document.title=l.value)}),An(()=>{r()})}function Sve(e){if(e.startsWith("kimi-complete-"))return"turn_complete";if(e.startsWith("kimi-question-"))return"question";if(e.startsWith("kimi-approval-"))return"approval"}function Mve(e,t,n){return e==="idle"&&!t&&!n}function o$(e,t){const n=uo(e);return n===null?t:n==="1"}const a2=Z(o$(un.notifyEnabled,!0)),Gb=Z(o$(un.notifySound,!0)),Qb=Z(typeof Notification<"u"?Notification.permission:"denied"),Ive="/favicon.ico";async function Eve(e){if(!e){a2.value=!1,Ns(un.notifyEnabled,"0");return}if(typeof Notification>"u")return;let t=Notification.permission;if(t==="default")try{t=await Notification.requestPermission()}catch{}Qb.value=t,t==="granted"&&(a2.value=!0,Ns(un.notifyEnabled,"1"))}function Tve(e){Gb.value=e,Ns(un.notifySound,e?"1":"0")}function Yb(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function Lve(e,t){return{title:e("settings.notifyTitle"),body:Yb(t,e("settings.notifyFallback"))}}function Nve(e,t,n){return{title:e("settings.notifyQuestionTitle"),body:Yb(n,t,e("settings.notifyQuestionFallback"))}}function Fve(e,t,n){return{title:e("settings.notifyApprovalTitle"),body:Yb(n,t,e("settings.notifyApprovalFallback"))}}function l4(e,t,n){if(!a2.value||typeof Notification>"u")return;const i=Notification.permission;if(i!=="denied"){if(i==="default"){Notification.requestPermission().then(s=>{Qb.value=s,s==="granted"&&IS(e,t,n)});return}IS(e,t,n)}}function IS(e,t,n){if(!e.isUserWatching)try{const i=new Notification(t.title,{body:t.body,tag:n,icon:Ive,silent:!Gb.value}),s=Sve(n);s!==void 0&&void 0,i.onclick=()=>{try{window.kimiDesktop?.showWindow?.(),window.focus()}catch{}s!==void 0&&void 0,e.onClick(),i.close()}}catch{}}function Bve(e){function t(s,o){l4(o,Lve(e.t,o.sessionTitle),`kimi-complete-${s}-${o.promptId??Date.now()}`)}function n(s){l4(s,Nve(e.t,s.sessionTitle,s.questionPreview),`kimi-question-${s.questionId}`)}function i(s){l4(s,Fve(e.t,s.sessionTitle,s.toolName),`kimi-approval-${s.approvalId}`)}return{notifyEnabled:a2,notifySound:Gb,notifyPermission:Qb,setNotifyEnabled:Eve,setNotifySound:Tve,maybeNotifyCompletion:t,maybeNotifyQuestion:n,maybeNotifyApproval:i}}function $ve(e){const{api:t,uploadImage:n,sessionId:i,insertFolderPaths:s}=e,o=Z({}),r=F(()=>o.value[i()??""]??[]),l=Z(null),a=Z(null),u=Z(!1);let c=0;function d(){return`att_${++c}`}function f(H,q){o.value={...o.value,[H]:q}}function p(H){if(H.previewUrl!==void 0)try{URL.revokeObjectURL(H.previewUrl)}catch{}}function g(H){return H.startsWith("image/")?"image":H.startsWith("video/")?"video":"file"}function m(H){return H<1024*1024?"<1mb":H<10*1024*1024?"1-10mb":H<50*1024*1024?"10-50mb":"50mb+"}async function y(H,q){const X=n();if(!X)return;const ee=i()??"";if(H.length!==0)for(const ue of H){const ie=g(ue.type);m(ue.size),Math.min(H.length,100);const xe=d(),ce=ie==="file"?void 0:URL.createObjectURL(ue),pe={localId:xe,name:ue.name,kind:ie,previewUrl:ce,mediaType:ue.type||"application/octet-stream",size:ue.size,uploading:!0};f(ee,[...o.value[ee]??[],pe]),X(ue,ue.name).then(Ne=>{const te=o.value[ee]??[];f(ee,te.map(ye=>ye.localId===xe?{...ye,uploading:!1,fileId:Ne?.fileId,mediaType:Ne?.mediaType??ye.mediaType,error:Ne===null}:ye))}).catch(()=>{const Ne=o.value[ee]??[];f(ee,Ne.map(te=>te.localId===xe?{...te,uploading:!1,error:!0}:te))})}}function w(H){const q=i()??"",X=o.value[q]??[],ee=X.find(ue=>ue.localId===H);l.value?.localId===H&&(l.value=null),ee&&p(ee),f(q,X.filter(ue=>ue.localId!==H))}function k(H){l.value=H}function A(){l.value=null}function v(){a.value?.click()}function x(H){const q=H.target,X=Array.from(q.files??[]);y(X),q.value=""}function E(H){if(!n())return;const q=H.clipboardData;if(!q)return;const X=[],ee=new Set,ue=(ie,xe)=>{const ce=`${ie.size}:${ie.type}:${xe}`;if(ee.has(ce))return;ee.add(ce);const pe=ie.type.split("/")[1]??"png",Ne=xe.includes(".")?xe:`paste-${Date.now()}.${pe}`;X.push(ie instanceof File?ie:new File([ie],Ne,{type:ie.type}))};for(const ie of Array.from(q.items))if(ie.kind==="file"){const xe=ie.getAsFile();xe&&ue(xe,xe.name||`paste-${Date.now()}.${ie.type.split("/")[1]??"png"}`)}for(const ie of Array.from(q.files))ue(ie,ie.name);X.length!==0&&(H.preventDefault(),y(X))}let S=0;function M(H){!n()||!Array.from(H.dataTransfer?.items??[]).some(X=>X.kind==="file")||(H.preventDefault(),H.stopPropagation(),u.value=!0)}function _(){u.value=!1}function N(H){S=0,u.value=!1;const{files:q,folderPaths:X}=v3(H);X.length>0&&(s?.(X),H.preventDefault(),H.stopPropagation()),n()&&(H.preventDefault(),H.stopPropagation(),y(q))}function D(H){return Array.from(H.dataTransfer?.items??[]).some(q=>q.kind==="file")}function T(H){!n()||!D(H)||(H.preventDefault(),S+=1,u.value=!0)}function $(H){!n()||!D(H)||H.preventDefault()}function P(H){!n()||!D(H)||(S=Math.max(0,S-1),S===0&&(u.value=!1))}function O(H){S=0,u.value=!1;const{files:q,folderPaths:X}=v3(H);X.length>0&&(s?.(X),H.preventDefault()),n()&&(H.preventDefault(),y(q))}function R(){const H=i()??"";for(const q of o.value[H]??[])p(q);f(H,[])}function W(){l.value=null,R()}function z(H,q,X){const ee=o.value[H]??[];ee.some(ue=>ue.localId===q)&&f(H,ee.map(ue=>ue.localId===q?{...ue,...X}:ue))}function G(H){return fetch(H).then(q=>{if(!q.ok)throw new Error(`fetch failed: ${q.status}`);return q.blob()})}function K(H,q,X){const ee=q??i()??"";if(X?.append!==!0){for(const ue of o.value[ee]??[])p(ue);f(ee,[])}for(const ue of H){const ie=d(),xe=/^data:/i.test(ue.url),ce=/^blob:/i.test(ue.url),pe=ue.name??ue.kind;if(ue.fileId){const Ne={localId:ie,name:pe,kind:ue.kind,previewUrl:ue.kind==="file"?void 0:ue.url,uploading:!1,fileId:ue.fileId};f(ee,[...o.value[ee]??[],Ne]),ue.kind==="image"&&!xe&&!ce&&t.getFileBlob(ue.fileId).then(te=>{const ye=URL.createObjectURL(te);if(!(o.value[ee]??[]).some(Y=>Y.localId===ie)){URL.revokeObjectURL(ye);return}z(ee,ie,{previewUrl:ye})}).catch(()=>{})}else{if(!ue.url)continue;const Ne=n();if(!Ne)continue;const te={localId:ie,name:pe,kind:ue.kind,previewUrl:ue.url,uploading:!0};f(ee,[...o.value[ee]??[],te]),G(ue.url).then(ye=>{const j=pe.includes(".")?pe:`${pe}.${ye.type.split("/")[1]??"bin"}`;return Ne(ye,j)}).then(ye=>{if(ye===null){const j=o.value[ee]??[];f(ee,j.filter(Y=>Y.localId!==ie));return}z(ee,ie,{uploading:!1,fileId:ye.fileId})}).catch(()=>{const ye=o.value[ee]??[];f(ee,ye.filter(j=>j.localId!==ie))})}}}return Qe(i,()=>{l.value=null}),pn(()=>{document.addEventListener("paste",E),document.addEventListener("dragenter",T),document.addEventListener("dragover",$),document.addEventListener("dragleave",P),document.addEventListener("drop",O)}),An(()=>{document.removeEventListener("paste",E),document.removeEventListener("dragenter",T),document.removeEventListener("dragover",$),document.removeEventListener("dragleave",P),document.removeEventListener("drop",O);for(const H of Object.values(o.value))for(const q of H)p(q);l.value=null}),{attachments:r,previewAttachment:l,fileInputRef:a,isDragOver:u,removeAttachment:w,openAttachmentPreview:k,closeAttachmentPreview:A,openFilePicker:v,handleFileInputChange:x,handleDragOver:M,handleDragLeave:_,handleDrop:N,clearAfterSubmit:R,clearAttachments:W,loadAttachments:K}}const Dve=3;function r$(e){const t=Z("starting"),n=Z(!1),i=Z(null),s=Z(0);let o=null,r=null,l=null,a=0,u=!1,c=!1;function d(){o&&(clearTimeout(o),o=null),r&&(clearInterval(r),r=null),l&&(clearTimeout(l),l=null)}function f(w){d(),t.value="success",l=setTimeout(()=>{l=null,e.onSuccess?.()},w)}function p(){r&&clearInterval(r),r=setInterval(()=>{s.value>0?s.value--:(r&&clearInterval(r),r=null)},1e3)}function g(w){o&&clearTimeout(o),o=setTimeout(async()=>{const k=await e.onPollOAuthLogin();if(!c&&!u){if(k===null){if(a+=1,a>=Dve){d(),n.value=!0,t.value="error";return}g(w);return}a=0,k.status==="authenticated"?f(1200):k.status==="expired"||k.status==="cancelled"?(d(),t.value="expired",k.status,void 0):g(w)}},w*1e3)}async function m(){d(),i.value=null,n.value=!1,a=0,u=!1,t.value="starting";const w=await e.onStartOAuthLogin();if(c){w!==null&&w.status!=="authenticated"&&e.onCancelOAuthLogin();return}if(!w){t.value="error";return}if(w.status==="authenticated"){f(800);return}i.value={flowId:w.flowId,verificationUri:w.verificationUri,verificationUriComplete:w.verificationUriComplete,userCode:w.userCode,expiresIn:w.expiresIn,interval:w.interval},s.value=w.expiresIn,t.value="device-code",p(),g(w.interval)}function y(){t.value!=="success"&&(d(),t.value==="device-code"&&!u&&(u=!0,e.onCancelOAuthLogin()))}return P2()&&Rf(()=>{c=!0,y()}),{step:t,pollError:n,flow:i,secondsLeft:s,startFlow:m,cancelFlow:y}}const Rve={state:"idle"};function zve(e){const t=Z(Rve),n=Z(uo(un.updateSkippedVersion)),i=Z(!1);if(typeof e?.getUpdateAutoDownload=="function"&&e.getUpdateAutoDownload().then(o=>{i.value=o}).catch(()=>{}),e!==void 0){let o=!1;e.onUpdateStatus(r=>{o=!0,t.value=r}),e.getUpdateStatus().then(r=>{o||(t.value=r)}).catch(()=>{})}const s=F(()=>{const o=t.value;return!(o.state==="idle"||o.state==="available"&&o.version!==void 0&&o.version===n.value)});return{status:t,visible:s,canCheck:typeof e?.checkForUpdates=="function",autoDownload:i,canToggleAutoDownload:typeof e?.getUpdateAutoDownload=="function"&&typeof e?.setUpdateAutoDownload=="function",setAutoDownload:(o,r)=>{i.value=o,typeof e?.setUpdateAutoDownload=="function"&&e.setUpdateAutoDownload(o).then(()=>{}).catch(()=>{})},skipVersion:()=>{const o=t.value.version;t.value.state==="available"&&o!==void 0&&(n.value=o,Ns(un.updateSkippedVersion,o))},check:async()=>{if(typeof e?.checkForUpdates!="function")return Promise.resolve({outcome:"unsupported"});const o=await e.checkForUpdates().catch(()=>({outcome:"error",message:"bridge call failed"}));return o.outcome==="available"&&o.version!==void 0&&o.version===n.value&&(n.value=null,lr(un.updateSkippedVersion)),o},download:()=>{e?.downloadUpdate().catch(()=>{})},install:()=>{e?.installUpdate().catch(()=>{})}}}let a4=null;function l$(){return a4===null&&(a4=zve(window.kimiDesktop)),a4}class Ove{transcript;sessionId;agentId;fetchPage;pageSize;onChange;onGap;refreshPromise=null;buffered=[];agents_=[];seq_;loadingOlder_=!1;loadOlderError_=!1;refreshError_=!1;constructor(t){this.sessionId=t.sessionId,this.agentId=t.agentId,this.transcript=new FK(t.agentId),this.fetchPage=t.fetchPage,this.pageSize=t.pageSize??20,this.onChange=t.onChange,this.onGap=t.onGap}get snapshot(){return this.transcript.snapshot()}get seq(){return this.seq_}get agents(){return this.agents_}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlder_}get loadOlderError(){return this.loadOlderError_}get refreshError(){return this.refreshError_}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshError_=!1;const t=this.fetchPage({pageSize:this.pageSize}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshError_=!0,n}).finally(()=>{this.refreshPromise=null;const n=this.buffered;this.buffered=[];for(const i of n)this.applyOps(i.ops,i.seq);this.onChange?.()});return this.refreshPromise=t,this.onChange?.(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seq_=n),this.refreshError_=!1,this.onChange?.()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlder_)return this.buffered.push({ops:t,...n!==void 0?{seq:n}:{}}),!1;if(n!==void 0&&this.seq_!==void 0){if(n<=this.seq_)return!0;if(n!==this.seq_+1)return this.onGap?.(),!1}const i=this.transcript.apply(t);return n!==void 0&&(this.seq_=n),i.gap!==void 0&&this.onGap?.(),i.accepted.length>0&&this.onChange?.(),i.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlder_)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlder_=!0,this.loadOlderError_=!1,this.onChange?.();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:this.pageSize});this.applyPage(n,!1)}catch(n){throw this.loadOlderError_=!0,n}finally{this.loadingOlder_=!1;const n=this.buffered;this.buffered=[];for(const i of n)this.applyOps(i.ops,i.seq);this.onChange?.()}}}applyPage(t,n){this.agents_=t.agents;const i=this.snapshot,s=n?t:{...t,items:Pve(t.items,i.items),hasMoreOlder:t.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}}function Pve(e,t){const n=new Set,i=[];for(const s of[...e,...t]){const o=s.kind==="turn"?s.turnId:s.kind==="marker"?s.markerId:s.refId;n.has(o)||(n.add(o),i.push(s))}return i}function jve(e){const t=KM(new Map),n=new Map,i=new Map,s=new Set;let o=null,r=null;function l(){o!==null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(o),o=null),r!==null&&(clearTimeout(r),r=null);for(const A of s)A.version.value+=1;s.clear()}function a(A){s.add(A),!(o!==null||r!==null)&&(typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(l)),r=setTimeout(l,50))}function u(A,v){return`${A}\0${v}`}function c(A,v,x){const E=e.getEventConnection();E!==null&&(E.subscribeTranscript(A,v,x),i.set(A,v))}function d(A,v){const x=u(A,v),E=t.get(x);if(E!==void 0)return E;const S={channel:new Ove({sessionId:A,agentId:v,fetchPage:M=>e.api.getSessionTranscript(A,{...M,agentId:v}),onChange:()=>{a(S)},onGap:()=>{f(S)}}),version:Z(0),baselineLoaded:!1,resumePromise:null};return t.set(x,S),S}async function f(A){if(A.resumePromise!==null)return A.resumePromise;const v=p(A).finally(()=>{A.resumePromise===v&&(A.resumePromise=null)});return A.resumePromise=v,v}async function p(A){try{await A.channel.refresh(),A.baselineLoaded=!0,n.get(A.channel.sessionId)===A.channel.agentId&&c(A.channel.sessionId,A.channel.agentId,A.channel.seq)}catch{n.get(A.channel.sessionId)===A.channel.agentId&&c(A.channel.sessionId,A.channel.agentId)}}function g(A,v){e.connectEventsIfNeeded(),n.set(A,v);const x=d(A,v);return x.baselineLoaded?c(A,v,x.channel.seq):f(x),x}function m(A,v){if(n.get(A)!==v)return;n.delete(A);const x=i.get(A);x!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(A,[x]),i.delete(A))}function y(A,v,x,E){if(n.get(A)!==v)return;const S=d(A,v);S.channel.receiveReset(x,E),S.baselineLoaded=!0}function w(A,v,x,E){return n.get(A)!==v?!0:d(A,v).channel.applyOps(x,E)}function k(A){n.delete(A),i.delete(A)&&e.getEventConnection()?.unsubscribeTranscript(A);for(const[v,x]of t)x.channel.sessionId===A&&(t.delete(v),s.delete(x))}return{getEntry:(A,v)=>t.get(u(A,v)),activate:g,deactivate:m,receiveReset:y,applyOps:w,forgetSession:k}}const Hve=["data-state"],Wve=["aria-label"],qve={class:"upd-pill-text"},Uve={key:0,class:"upd-meta"},Kve={key:1,class:"upd-notes"},Vve={class:"upd-notes-title"},Zve={key:2,class:"upd-progress"},Gve={key:3,class:"upd-message"},Qve={class:"upd-foot"},Yve={class:"upd-foot-actions"},Jve=tt({__name:"UpdateIndicator",setup(e){const{t,locale:n}=Bt(),{status:i,visible:s,skipVersion:o,download:r,install:l,autoDownload:a,setAutoDownload:u,canToggleAutoDownload:c}=l$(),d=Z(!1),f="0.36.0".trim()?"0.36.0":"",p=F(()=>{switch(i.value.state){case"available":return t("sidebar.update");case"downloading":return`${i.value.percent??0}%`;case"downloaded":return t("sidebar.updateDone");case"error":return t("sidebar.updateFailed");default:return""}}),g=F(()=>{switch(i.value.state){case"available":return t("sidebar.updateAvailable",{version:i.value.version??""});case"downloading":return t("sidebar.updateDownloading",{percent:i.value.percent??0});case"downloaded":return t("sidebar.updateReady",{version:i.value.version??""});case"error":return t("sidebar.updateFailed");default:return""}}),m=F(()=>{const S=i.value.releaseDate;if(S===void 0||S==="")return"";const M=new Date(S),_=Number.isNaN(M.getTime())?S:M.toLocaleDateString();return t("sidebar.updateReleaseDate",{date:_})}),y=F(()=>{const S=[];return m.value!==""&&S.push(m.value),f!==""&&S.push(t("sidebar.updateCurrentVersion",{version:f})),S.join(" · ")}),w=F(()=>i.value.percent??0),k=F(()=>{const S=i.value.releaseNotes;return S===void 0?"":((n.value.toLowerCase().startsWith("zh")?S.zh:S.en)??S.zh??S.en??"").trim()}),A=F(()=>{switch(i.value.state){case"error":return"alert-triangle";default:return"download"}});function v(){r()}function x(){o(),d.value=!1}function E(){l(),d.value=!1}return(S,M)=>h(s)?(b(),I("span",{key:0,class:"upd","data-state":h(i).state},[C("button",{class:"upd-pill",type:"button","aria-label":p.value,onClick:M[0]||(M[0]=_=>d.value=!0)},[V(h(Ce),{class:"upd-pill-icon",name:A.value,size:"sm"},null,8,["name"]),C("span",qve,B(p.value),1)],8,Wve),V(h(La),{open:d.value,title:g.value,size:"lg","onUpdate:open":M[4]||(M[4]=_=>d.value=_)},{foot:he(()=>[C("div",Qve,[C("div",Yve,[h(i).state==="available"?(b(),I(Be,{key:0},[V(h(jt),{variant:"ghost",onClick:x},{default:he(()=>[Ue(B(h(t)("sidebar.updateSkip")),1)]),_:1}),V(h(jt),{onClick:v},{default:he(()=>[Ue(B(h(t)("sidebar.updateDownloadNow")),1)]),_:1})],64)):h(i).state==="downloading"?(b(),fe(h(jt),{key:1,variant:"secondary",onClick:M[1]||(M[1]=_=>d.value=!1)},{default:he(()=>[Ue(B(h(t)("sidebar.updateBackground")),1)]),_:1})):h(i).state==="downloaded"?(b(),I(Be,{key:2},[V(h(jt),{variant:"ghost",onClick:M[2]||(M[2]=_=>d.value=!1)},{default:he(()=>[Ue(B(h(t)("sidebar.updateRestartLater")),1)]),_:1}),V(h(jt),{onClick:E},{default:he(()=>[Ue(B(h(t)("sidebar.updateRestartNow")),1)]),_:1})],64)):h(i).state==="error"?(b(),fe(h(jt),{key:3,variant:"danger-soft",onClick:v},{default:he(()=>[Ue(B(h(t)("sidebar.updateRetry")),1)]),_:1})):ne("",!0)]),h(c)?(b(),fe(h($q),{key:0,class:"upd-auto","model-value":h(a),"onUpdate:modelValue":M[3]||(M[3]=_=>h(u)(_,"update_prompt"))},{default:he(()=>[Ue(B(h(t)("sidebar.updateAutoDownload")),1)]),_:1},8,["model-value"])):ne("",!0)])]),default:he(()=>[(h(i).state==="available"||h(i).state==="downloaded")&&y.value?(b(),I("p",Uve,B(y.value),1)):ne("",!0),k.value?(b(),I("section",Kve,[C("h4",Vve,B(h(t)("sidebar.updateWhatsNew")),1),V(h(Kl),{text:k.value},null,8,["text"])])):ne("",!0),h(i).state==="downloading"?(b(),I("div",Zve,[C("div",{class:"upd-progress-fill",style:Vt({width:`${w.value}%`})},null,4)])):ne("",!0),h(i).state==="error"&&h(i).message?(b(),I("p",Gve,B(h(i).message),1)):ne("",!0)]),_:1},8,["open","title"])],8,Hve)):ne("",!0)}}),Xve=vt(Jve,[["__scopeId","data-v-2b5c23f7"]]),u2=[{code:"en",label:"English"},{code:"zh",label:"简体中文"}],jn=nq({locale:NE()});function Jb(e){jn.global.locale.value=e,Ns(un.locale,e)}const e9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function t9e(e,t){return b(),I("svg",e9e,[...t[0]||(t[0]=[C("path",{d:"M12.0684 2.03418C12.5654 2.03421 12.9687 2.43755 12.9688 2.93457V11.0996H21.0654C21.5625 11.0996 21.9658 11.503 21.9658 12C21.9658 12.497 21.5625 12.9004 21.0654 12.9004H12.9688V21.0654C12.9687 21.5624 12.5654 21.9658 12.0684 21.9658C11.5713 21.9658 11.168 21.5625 11.168 21.0654V12.9004H2.93457C2.43751 12.9004 2.03418 12.4971 2.03418 12C2.03418 11.5029 2.43751 11.0996 2.93457 11.0996H11.168V2.93457C11.168 2.43753 11.5713 2.03418 12.0684 2.03418Z",fill:"currentColor"},null,-1)])])}const n9e=wt({name:"kimi-add",render:t9e}),i9e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function s9e(e,t){return b(),I("svg",i9e,[...t[0]||(t[0]=[C("path",{id:"p0",d:"M 0 -9.9 C -5.468 -9.9 -9.9 -5.468 -9.9 0 C -9.9 1.923 -9.351 3.719 -8.402 5.239 C -8.402 5.239 -9.483 7.821 -9.483 7.821 C -9.896 8.809 -9.171 9.9 -8.099 9.9 C -8.099 9.9 0 9.9 0 9.9 C 5.468 9.9 9.9 5.468 9.9 0 C 9.9 -5.468 5.468 -9.9 0 -9.9 Z M -8.1 0 C -8.1 -4.474 -4.474 -8.1 0 -8.1 C 4.473 -8.1 8.1 -4.474 8.1 0 C 8.1 4.473 4.473 8.1 -0.001 8.1 C -0.001 8.1 -7.648 8.1 -7.648 8.1 L -6.365 5.035 C -6.365 5.035 -6.648 4.629 -6.648 4.629 C -7.563 3.317 -8.1 1.723 -8.1 0 Z",transform:"matrix(1 0 0 1 12 12)",fill:"currentColor","fill-rule":"evenodd"},null,-1),C("path",{id:"p1",d:"M 3.6 0.5 L -2.6 0.5 M 0.5 -2.573 L 0.5 3.573",transform:"translate(11.5 11.5)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"},null,-1)])])}const o9e=wt({name:"kimi-add-conversation",render:s9e}),r9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function l9e(e,t){return b(),I("svg",r9e,[...t[0]||(t[0]=[C("path",{d:"M15.0996 12C15.5967 12 16 12.4033 16 12.9004C15.9998 13.3973 15.5965 13.7998 15.0996 13.7998H8.90039C8.40346 13.7998 8.00021 13.3973 8 12.9004C8 12.4033 8.40333 12 8.90039 12H15.0996Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 3.2002C20.5464 3.2002 21.7998 4.4536 21.7998 6V7C21.7998 8.03565 21.2363 8.93754 20.4004 9.42188V17C20.4004 19.1539 18.6539 20.9004 16.5 20.9004H7.5C5.34609 20.9004 3.59961 19.1539 3.59961 17V9.42188C2.76374 8.93754 2.2002 8.03565 2.2002 7V6C2.2002 4.4536 3.4536 3.2002 5 3.2002H19ZM5.40039 17C5.40039 18.1598 6.3402 19.0996 7.5 19.0996H16.5C17.6598 19.0996 18.5996 18.1598 18.5996 17V9.7998H5.40039V17ZM4.89746 5.00488C4.39333 5.05621 4 5.48232 4 6V7L4.00488 7.10254C4.05278 7.57297 4.42703 7.94722 4.89746 7.99512L5 8H19C19.5523 8 20 7.55228 20 7V6C20 5.44772 19.5523 5 19 5H5L4.89746 5.00488Z",fill:"currentColor"},null,-1)])])}const a9e=wt({name:"kimi-archive",render:l9e}),u9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function c9e(e,t){return b(),I("svg",u9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 21.6387C11.7378 21.988 12.3059 21.987 12.6565 21.6364L18.1949 16.098C18.5464 15.7465 18.5464 15.1766 18.1949 14.8252C17.8434 14.4737 17.2736 14.4737 16.9221 14.8252L12.9201 18.8272V3.00002C12.9201 2.50297 12.5171 2.10003 12.0201 2.10003C11.523 2.10003 11.1201 2.50297 11.1201 3.00002V18.8383L7.07554 14.8229C6.7228 14.4727 6.15295 14.4747 5.80275 14.8275C5.45255 15.1802 5.45461 15.7501 5.80735 16.1003L11.386 21.6387Z",fill:"currentColor"},null,-1)])])}const d9e=wt({name:"kimi-arrow-down",render:c9e}),f9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function h9e(e,t){return b(),I("svg",f9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.16127 12.814C1.81197 12.4622 1.81299 11.8941 2.16357 11.5435L7.70203 6.00506C8.0535 5.65359 8.62335 5.65359 8.97482 6.00506C9.32629 6.35653 9.32629 6.92638 8.97482 7.27785L4.97276 11.2799H20.8C21.297 11.2799 21.7 11.6829 21.7 12.1799C21.7 12.677 21.297 13.0799 20.8 13.0799H4.96171L8.97712 17.1244C9.32732 17.4772 9.32526 18.047 8.97252 18.3972C8.61978 18.7474 8.04993 18.7454 7.69973 18.3926L2.16127 12.814Z",fill:"currentColor"},null,-1)])])}const p9e=wt({name:"kimi-arrow-left",render:h9e}),g9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function m9e(e,t){return b(),I("svg",g9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.4387 12.814C21.788 12.4622 21.787 11.8941 21.4364 11.5436L15.8979 6.0051C15.5464 5.65363 14.9766 5.65363 14.6251 6.0051C14.2737 6.35657 14.2737 6.92642 14.6251 7.27789L18.6272 11.28H2.79998C2.30293 11.28 1.89998 11.6829 1.89998 12.18C1.89998 12.677 2.30293 13.08 2.79998 13.08H18.6382L14.6228 17.1245C14.2726 17.4772 14.2747 18.0471 14.6274 18.3973C14.9802 18.7475 15.55 18.7454 15.9002 18.3927L21.4387 12.814Z",fill:"currentColor"},null,-1)])])}const v9e=wt({name:"kimi-arrow-right",render:m9e}),y9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function b9e(e,t){return b(),I("svg",y9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 2.36129C11.7378 2.01198 12.3059 2.013 12.6565 2.36358L18.1949 7.90204C18.5464 8.25351 18.5464 8.82336 18.1949 9.17483C17.8434 9.52631 17.2736 9.52631 16.9221 9.17483L12.9201 5.17277V21C12.9201 21.497 12.5171 21.9 12.0201 21.9C11.523 21.9 11.1201 21.497 11.1201 21V5.16172L7.07554 9.17713C6.7228 9.52733 6.15295 9.52527 5.80275 9.17253C5.45255 8.81979 5.45461 8.24995 5.80735 7.89975L11.386 2.36129Z",fill:"currentColor"},null,-1)])])}const k9e=wt({name:"kimi-arrow-up",render:b9e}),A9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function C9e(e,t){return b(),I("svg",A9e,[...t[0]||(t[0]=[C("path",{d:"M19.3027 5.9053C19.6542 5.55397 20.2247 5.55388 20.5761 5.9053C20.9273 6.25675 20.9273 6.82734 20.5761 7.17874L9.65911 18.0948C9.30773 18.4461 8.73814 18.446 8.38665 18.0948L3.42376 13.1328C3.0726 12.7814 3.07263 12.2118 3.42376 11.8604C3.77524 11.509 4.34575 11.5089 4.6972 11.8604L9.02239 16.1856L19.3027 5.9053Z",fill:"currentColor"},null,-1)])])}const w9e=wt({name:"kimi-check",render:C9e}),x9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _9e(e,t){return b(),I("svg",x9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 16.7134C11.743 17.0627 12.3111 17.0617 12.6617 16.7111L19.6364 9.73641C19.9878 9.38494 19.9878 8.81509 19.6364 8.46362C19.2849 8.11215 18.7151 8.11215 18.3636 8.46362L12.023 14.8042L5.63407 8.46132C5.28133 8.11112 4.71149 8.11318 4.36129 8.46592C4.01109 8.81866 4.01314 9.3885 4.36588 9.73871L11.3912 16.7134Z",fill:"currentColor"},null,-1)])])}const S9e=wt({name:"kimi-chevron-down",render:_9e}),M9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function I9e(e,t){return b(),I("svg",M9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.1261 12.6088C16.4754 12.257 16.4743 11.6889 16.1238 11.3383L9.14904 4.36363C8.79757 4.01216 8.22772 4.01216 7.87625 4.36363C7.52477 4.7151 7.52477 5.28495 7.87625 5.63642L14.2169 11.977L7.87395 18.3659C7.52375 18.7187 7.52581 19.2885 7.87855 19.6387C8.23129 19.9889 8.80113 19.9869 9.15133 19.6341L16.1261 12.6088Z",fill:"currentColor"},null,-1)])])}const E9e=wt({name:"kimi-chevron-right",render:I9e}),T9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L9e(e,t){return b(),I("svg",T9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 8.46132C11.743 8.11202 12.3111 8.11304 12.6617 8.46362L19.6364 15.4383C19.9878 15.7898 19.9878 16.3597 19.6364 16.7111C19.2849 17.0626 18.7151 17.0626 18.3636 16.7111L12.023 10.3705L5.63407 16.7134C5.28133 17.0636 4.71149 17.0616 4.36129 16.7088C4.01109 16.3561 4.01314 15.7862 4.36588 15.436L11.3912 8.46132Z",fill:"currentColor"},null,-1)])])}const N9e=wt({name:"kimi-chevron-up",render:L9e}),F9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function B9e(e,t){return b(),I("svg",F9e,[...t[0]||(t[0]=[C("circle",{cx:"12",cy:"12",r:"10.875",stroke:"currentColor","stroke-width":"2.25"},null,-1),C("path",{d:"M7.125 12.6L10.65 16.125L17.025 8.85",stroke:"currentColor","stroke-width":"2.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const $9e=wt({name:"kimi-circle-check",render:B9e}),D9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function R9e(e,t){return b(),I("svg",D9e,[...t[0]||(t[0]=[C("path",{d:"M11.8999 6.79965C12.397 6.79965 12.7997 7.20235 12.7997 7.69941V11.7266L14.7359 13.6629C15.0873 14.0143 15.0879 14.584 14.7366 14.9355C14.3852 15.287 13.8148 15.287 13.4633 14.9355L11.2632 12.7355C11.0947 12.5668 11.0002 12.338 11.0001 12.0995V7.69941C11.0001 7.20238 11.4029 6.7997 11.8999 6.79965Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 1.89893C17.4677 1.89893 21.9001 6.33147 21.9002 11.7991C21.9002 17.2669 17.4678 21.6993 12 21.6993C6.53228 21.6993 2.09985 17.2669 2.09985 11.7991C2.09998 6.33147 6.53236 1.89893 12 1.89893ZM20.1 11.7998C20.1 7.32616 16.4737 3.69984 12 3.69984C7.5264 3.69984 3.90008 7.32616 3.90008 11.7998C3.90032 16.2732 7.52655 19.8998 12 19.8998C16.4735 19.8998 20.0998 16.2732 20.1 11.7998Z",fill:"currentColor"},null,-1)])])}const z9e=wt({name:"kimi-clock",render:R9e}),O9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P9e(e,t){return b(),I("svg",O9e,[...t[0]||(t[0]=[C("path",{d:"M17.9542 4.77253C18.3056 4.42106 18.8761 4.42106 19.2276 4.77253C19.579 5.12401 19.579 5.69452 19.2276 6.04597L13.2735 12.0001L19.2276 17.9542C19.5791 18.3056 19.5791 18.8761 19.2276 19.2276C18.8761 19.5791 18.3056 19.5791 17.9542 19.2276L12.0001 13.2735L6.04595 19.2276C5.69451 19.5791 5.12399 19.579 4.77252 19.2276C4.42104 18.8761 4.42104 18.3056 4.77252 17.9542L10.7266 12.0001L4.77252 6.04597C4.42104 5.6945 4.42104 5.124 4.77252 4.77253C5.12399 4.42107 5.69448 4.42106 6.04595 4.77253L12.0001 10.7266L17.9542 4.77253Z",fill:"currentColor"},null,-1)])])}const j9e=wt({name:"kimi-close",render:P9e}),H9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function W9e(e,t){return b(),I("svg",H9e,[...t[0]||(t[0]=[C("path",{d:"M9.85815 11.957C10.9074 11.957 11.7583 12.8083 11.7585 13.8574V19.8574C11.7585 20.3545 11.3552 20.7578 10.8582 20.7578C10.3611 20.7578 9.95776 20.3545 9.95776 19.8574V13.8574C9.95755 13.8024 9.91325 13.7578 9.85815 13.7578H3.85815C3.3611 13.7578 2.95776 13.3545 2.95776 12.8574C2.95798 12.3605 3.36123 11.957 3.85815 11.957H9.85815Z",fill:"currentColor"},null,-1),C("path",{d:"M12.8582 2.95703C13.3551 2.95703 13.7583 3.36054 13.7585 3.85742V9.85742C13.7585 9.91265 13.8029 9.95703 13.8582 9.95703H19.8582C20.3551 9.95703 20.7583 10.3605 20.7585 10.8574C20.7585 11.3545 20.3552 11.7578 19.8582 11.7578H13.8582C12.8088 11.7578 11.9578 10.9068 11.9578 9.85742V3.85742C11.958 3.36054 12.3612 2.95703 12.8582 2.95703Z",fill:"currentColor"},null,-1)])])}const q9e=wt({name:"kimi-collapse",render:W9e}),U9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function K9e(e,t){return b(),I("svg",U9e,[...t[0]||(t[0]=[C("path",{d:"M11.9004 2.19995C17.3678 2.20016 21.7998 6.63285 21.7998 12.1003C21.7996 17.5677 17.3677 21.9995 11.9004 21.9998H3.80078C2.72946 21.9996 2.00334 20.9089 2.41699 19.9207L3.49805 17.3386C2.54871 15.8189 2.00007 14.0226 2 12.1003C2 6.63272 6.43277 2.19995 11.9004 2.19995ZM11.9004 3.99976C7.42688 3.99976 3.7998 7.62684 3.7998 12.1003C3.79989 13.8228 4.33669 15.4175 5.25195 16.7292L5.53516 17.1345L4.25195 20.2H11.8994C16.3727 20.1999 19.9998 16.5736 20 12.1003C20 7.62697 16.3737 3.99997 11.9004 3.99976ZM8.9541 10.8005C9.75473 10.8006 10.4041 11.4491 10.4043 12.2498C10.4043 13.0505 9.75482 13.6998 8.9541 13.7C8.15329 13.7 7.50391 13.0506 7.50391 12.2498C7.50406 11.4491 8.15339 10.8005 8.9541 10.8005ZM15.1533 10.8005C15.9539 10.8006 16.6034 11.4491 16.6035 12.2498C16.6035 13.0505 15.954 13.6998 15.1533 13.7C14.3525 13.7 13.7031 13.0506 13.7031 12.2498C13.7033 11.4491 14.3526 10.8005 15.1533 10.8005Z",fill:"currentColor"},null,-1)])])}const V9e=wt({name:"kimi-comment",render:K9e}),Z9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function G9e(e,t){return b(),I("svg",Z9e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 7.09961C19.1539 7.09961 20.9004 8.84609 20.9004 11V17C20.9004 19.1539 19.1539 20.9004 17 20.9004H11C8.84609 20.9004 7.09961 19.1539 7.09961 17V11C7.09961 8.84609 8.84609 7.09961 11 7.09961H17ZM11 8.90039C9.8402 8.90039 8.90039 9.8402 8.90039 11V17C8.90039 18.1598 9.8402 19.0996 11 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V11C19.0996 9.8402 18.1598 8.90039 17 8.90039H11Z",fill:"currentColor"},null,-1),C("path",{d:"M13 3.09961C14.4447 3.09961 15.705 3.88644 16.3779 5.0498C16.6265 5.47999 16.4789 6.03049 16.0488 6.2793C15.6186 6.52781 15.0681 6.38029 14.8193 5.9502C14.4548 5.32041 13.776 4.90039 13 4.90039H7C5.8402 4.90039 4.90039 5.8402 4.90039 7V13C4.90039 13.776 5.32041 14.4548 5.9502 14.8193C6.38029 15.0681 6.52781 15.6186 6.2793 16.0488C6.03049 16.4789 5.47999 16.6265 5.0498 16.3779C3.88644 15.705 3.09961 14.4447 3.09961 13V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H13Z",fill:"currentColor"},null,-1)])])}const Q9e=wt({name:"kimi-copy",render:G9e}),Y9e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J9e(e,t){return b(),I("svg",Y9e,[...t[0]||(t[0]=[C("path",{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 10.2797 2.43414 8.66074 3.19922 7.24707C3.20172 7.24246 3.20453 7.23801 3.20703 7.2334C3.33385 6.99995 3.47181 6.77351 3.61621 6.55176C3.73214 6.37355 3.85079 6.19744 3.97754 6.02734C5.35905 4.17471 7.36856 2.81959 9.68945 2.27051C9.69952 2.26813 9.70965 2.26602 9.71973 2.26367C9.85224 2.23276 9.98563 2.2043 10.1201 2.17871C10.1542 2.17221 10.1884 2.16631 10.2227 2.16016C10.3466 2.13791 10.4712 2.11724 10.5967 2.09961C10.6301 2.09489 10.6637 2.0913 10.6973 2.08691C10.8216 2.07073 10.9465 2.05552 11.0723 2.04395C11.1125 2.04022 11.153 2.0384 11.1934 2.03516C11.4595 2.0139 11.7284 2 12 2ZM11.9941 3.7998C11.9968 3.86623 12 3.93292 12 4C12 6.76142 9.76142 9 7 9C6.14209 9 5.33517 8.78324 4.62988 8.40234C4.09862 9.48861 3.7998 10.7093 3.7998 12C3.7998 12.4438 3.83644 12.8791 3.9043 13.3037C4.52807 12.5673 5.45945 12.0996 6.5 12.0996C8.37777 12.0996 9.90039 13.6222 9.90039 15.5C9.90039 17.0702 8.83532 18.3903 7.38867 18.7812C8.70267 19.6765 10.2901 20.2002 12 20.2002C12.468 20.2002 12.9264 20.1583 13.373 20.083C13.1323 19.4342 13 18.7327 13 18C13 14.6863 15.6863 12 19 12C19.4098 12 19.8098 12.0416 20.1963 12.1201C20.1969 12.0801 20.2002 12.0401 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998H11.9941ZM19 13.7998C16.6804 13.7998 14.7998 15.6804 14.7998 18C14.7998 18.5617 14.9112 19.0972 15.1113 19.5869C17.5225 18.597 19.3558 16.4929 19.9727 13.9141C19.6605 13.8399 19.3349 13.7998 19 13.7998ZM6.5 13.9004C5.61634 13.9004 4.90039 14.6163 4.90039 15.5C4.90039 16.3837 5.61634 17.0996 6.5 17.0996C7.38366 17.0996 8.09961 16.3837 8.09961 15.5C8.09961 14.6163 7.38366 13.9004 6.5 13.9004ZM15.5 6.09961C16.8255 6.09961 17.9004 7.17452 17.9004 8.5C17.9004 9.82548 16.8255 10.9004 15.5 10.9004C14.1745 10.9004 13.0996 9.82548 13.0996 8.5C13.0996 7.17452 14.1745 6.09961 15.5 6.09961ZM15.5 7.90039C15.1686 7.90039 14.9004 8.16863 14.9004 8.5C14.9004 8.83137 15.1686 9.09961 15.5 9.09961C15.8314 9.09961 16.0996 8.83137 16.0996 8.5C16.0996 8.16863 15.8314 7.90039 15.5 7.90039ZM10.1992 4C8.35326 4.41375 6.74333 5.44923 5.59961 6.87598C6.02235 7.08306 6.49716 7.2002 7 7.2002C8.76731 7.2002 10.1992 5.76731 10.1992 4Z",fill:"currentColor"},null,-1)])])}const X9e=wt({name:"kimi-dark-mode",render:J9e}),eye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tye(e,t){return b(),I("svg",eye,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2.90002C12.4971 2.90002 12.9 3.30297 12.9 3.80002V12.2939L15.8081 9.38585C16.1595 9.03438 16.7294 9.03438 17.0808 9.38585C17.4323 9.73732 17.4323 10.3072 17.0808 10.6586L12.6364 15.1031C12.4676 15.2719 12.2387 15.3667 12 15.3667C11.7613 15.3667 11.5324 15.2719 11.3636 15.1031L6.91917 10.6586C6.5677 10.3072 6.5677 9.73732 6.91917 9.38585C7.27064 9.03438 7.84049 9.03438 8.19196 9.38585L11.1 12.2939V3.80002C11.1 3.30297 11.503 2.90002 12 2.90002ZM4.00001 13.5874C4.49706 13.5874 4.90001 13.9903 4.90001 14.4874V18.043C4.90001 18.2758 4.99249 18.499 5.1571 18.6636C5.32172 18.8282 5.54498 18.9207 5.77778 18.9207H18.2222C18.455 18.9207 18.6783 18.8283 18.8429 18.6636C19.0075 18.499 19.1 18.2758 19.1 18.043V14.4874C19.1 13.9903 19.5029 13.5874 20 13.5874C20.4971 13.5874 20.9 13.9903 20.9 14.4874V18.043C20.9 18.7531 20.6179 19.4342 20.1157 19.9364C19.6135 20.4386 18.9324 20.7207 18.2222 20.7207H5.77778C5.06759 20.7207 4.38649 20.4386 3.88431 19.9364C3.38213 19.4342 3.10001 18.7531 3.10001 18.043V14.4874C3.10001 13.9903 3.50295 13.5874 4.00001 13.5874Z",fill:"currentColor"},null,-1)])])}const nye=wt({name:"kimi-download",render:tye}),iye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sye(e,t){return b(),I("svg",iye,[...t[0]||(t[0]=[C("path",{d:"M18.0179 3.09998C18.3963 3.10003 18.7709 3.17491 19.1205 3.31971C19.4701 3.46454 19.7884 3.67614 20.056 3.94373C20.3237 4.21144 20.5362 4.52965 20.681 4.87928C20.8258 5.22887 20.8997 5.60423 20.8997 5.9828C20.8997 6.36118 20.8257 6.73591 20.681 7.08533C20.5362 7.43497 20.3237 7.75317 20.056 8.02088L17.639 10.4379L9.15756 18.9183C8.5296 19.5463 7.74274 19.992 6.8812 20.2074L4.21811 20.8734C3.91148 20.95 3.5871 20.8596 3.36362 20.6361C3.14017 20.4126 3.05063 20.0883 3.12729 19.7816L3.79233 17.1185C4.00771 16.257 4.45344 15.4701 5.08139 14.8422L15.9798 3.94373C16.5203 3.40346 17.2536 3.09998 18.0179 3.09998ZM19.0003 19.1C19.4972 19.1002 19.8997 19.5034 19.8997 20.0004C19.8995 20.4971 19.4971 20.8996 19.0003 20.8998H12.0003C11.5034 20.8998 11.1001 20.4973 11.0999 20.0004C11.0999 19.5033 11.5033 19.1 12.0003 19.1H19.0003ZM18.0179 4.89979C17.7309 4.89979 17.4553 5.01417 17.2523 5.21717L6.35385 16.1146C5.95661 16.5119 5.67469 17.01 5.53842 17.5551L5.23666 18.7631L6.44467 18.4613C6.98971 18.3251 7.48782 18.0431 7.8851 17.6459L18.7826 6.74744C18.883 6.64702 18.9635 6.52821 19.0179 6.39686C19.0723 6.26558 19.0999 6.1247 19.0999 5.9828C19.0999 5.84075 19.0723 5.69916 19.0179 5.56776C18.9635 5.43645 18.883 5.31757 18.7826 5.21717C18.6821 5.11678 18.5631 5.03716 18.432 4.9828C18.3008 4.92845 18.16 4.89983 18.0179 4.89979Z",fill:"currentColor"},null,-1)])])}const oye=wt({name:"kimi-edit",render:sye}),rye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lye(e,t){return b(),I("svg",rye,[...t[0]||(t[0]=[C("path",{d:"M5 11.0996C5.49693 11.0996 5.90018 11.5031 5.90039 12V18C5.90039 18.0552 5.94477 18.0996 6 18.0996H12C12.4969 18.0996 12.9002 18.5031 12.9004 19C12.9004 19.4971 12.4971 19.9004 12 19.9004H6C4.95066 19.9004 4.09961 19.0493 4.09961 18V12C4.09982 11.5031 4.50307 11.0996 5 11.0996ZM18 4.09961C19.0492 4.09961 19.9002 4.95084 19.9004 6V12C19.9004 12.4971 19.4971 12.9004 19 12.9004C18.5029 12.9004 18.0996 12.4971 18.0996 12V6C18.0994 5.94495 18.0551 5.90039 18 5.90039H12C11.5029 5.90039 11.0996 5.49706 11.0996 5C11.0998 4.50312 11.5031 4.09961 12 4.09961H18Z",fill:"currentColor"},null,-1)])])}const aye=wt({name:"kimi-expand",render:lye}),uye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function cye(e,t){return b(),I("svg",uye,[...t[0]||(t[0]=[C("g",null,[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1723 2.1001C13.9413 2.10018 14.6793 2.40592 15.2231 2.94971L19.0512 6.77783C19.595 7.32162 19.9007 8.0596 19.9008 8.82861V18.0005C19.9008 20.1544 18.1543 21.9009 16.0004 21.9009H8.0004C5.84649 21.9009 4.10001 20.1544 4.10001 18.0005V6.00049C4.10001 3.84658 5.84649 2.1001 8.0004 2.1001H13.1723ZM8.0004 3.90088C6.8406 3.90088 5.90079 4.84069 5.90079 6.00049V18.0005C5.90079 19.1603 6.8406 20.1001 8.0004 20.1001H16.0004C17.1602 20.1001 18.1 19.1603 18.1 18.0005V9.90088H15.0004C13.3988 9.90088 12.1 8.60211 12.1 7.00049V3.90088H8.0004ZM13.9008 7.00049C13.9008 7.608 14.3929 8.1001 15.0004 8.1001H17.8217C17.8072 8.08375 17.7933 8.06681 17.7777 8.05127L13.9496 4.22314C13.9339 4.20745 13.9173 4.19286 13.9008 4.17822V7.00049Z",fill:"currentColor"})],-1)])])}const ES=wt({name:"kimi-file",render:cye}),dye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fye(e,t){return b(),I("svg",dye,[...t[0]||(t[0]=[C("path",{d:"M15.4795 15.4971C15.9765 15.4971 16.3799 15.9004 16.3799 16.3975C16.3799 16.8945 15.9765 17.2978 15.4795 17.2979H8.52051C8.02345 17.2979 7.62012 16.8945 7.62012 16.3975C7.62012 15.9004 8.02345 15.4971 8.52051 15.4971H15.4795Z",fill:"currentColor"},null,-1),C("path",{d:"M12.3359 11.0996C12.8329 11.0997 13.2354 11.503 13.2354 12C13.2354 12.497 12.8329 12.9003 12.3359 12.9004H8.52051C8.02345 12.9004 7.62012 12.4971 7.62012 12C7.62012 11.5029 8.02345 11.0996 8.52051 11.0996H12.3359Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1719 2.09961C13.9408 2.09969 14.6789 2.40555 15.2227 2.94922L19.0508 6.77734C19.5946 7.32113 19.9003 8.05911 19.9004 8.82812V18C19.9004 20.1539 18.1539 21.9004 16 21.9004H8C5.84626 21.9002 4.09961 20.1538 4.09961 18V6C4.09961 3.84621 5.84626 2.09981 8 2.09961H13.1719ZM8 3.90039C6.84037 3.90059 5.90039 4.84032 5.90039 6V18C5.90039 19.1597 6.84037 20.0994 8 20.0996H16C17.1598 20.0996 18.0996 19.1598 18.0996 18V9.90039H15C13.3985 9.90019 12.0996 8.6015 12.0996 7V3.90039H8ZM13.9004 7C13.9004 7.60739 14.3927 8.09941 15 8.09961H17.8213C17.8068 8.08333 17.7928 8.06626 17.7773 8.05078L13.9492 4.22266C13.9335 4.20696 13.9169 4.19237 13.9004 4.17773V7Z",fill:"currentColor"},null,-1)])])}const hye=wt({name:"kimi-file-text",render:fye}),pye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gye(e,t){return b(),I("svg",pye,[...t[0]||(t[0]=[C("path",{d:"M9.2373 3.7002C10.4169 3.7002 11.5297 4.24779 12.249 5.18262L12.4424 5.43359H18C20.0987 5.43359 21.7998 7.13472 21.7998 9.2334V16.5C21.7998 18.5987 20.0987 20.2998 18 20.2998H6C3.90132 20.2998 2.2002 18.5987 2.2002 16.5V7.5C2.2002 5.40132 3.90132 3.7002 6 3.7002H9.2373ZM6 5.5C4.89543 5.5 4 6.39543 4 7.5V16.5C4 17.6046 4.89543 18.5 6 18.5H18C19.0357 18.5 19.887 17.7128 19.9893 16.7041L20 16.5V9.2334C20 8.19775 19.2128 7.34641 18.2041 7.24414L18 7.2334H12.0479L11.9326 7.22656C11.666 7.19561 11.4205 7.05812 11.2549 6.84277L10.8223 6.28027C10.4437 5.78834 9.85808 5.5 9.2373 5.5H6ZM16 9.59961C16.4971 9.59961 16.9004 10.0029 16.9004 10.5C16.9004 10.9971 16.4971 11.4004 16 11.4004H8C7.50294 11.4004 7.09961 10.9971 7.09961 10.5C7.09961 10.0029 7.50294 9.59961 8 9.59961H16Z",fill:"currentColor"},null,-1)])])}const mye=wt({name:"kimi-folder",render:gye}),vye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yye(e,t){return b(),I("svg",vye,[...t[0]||(t[0]=[C("g",null,[C("path",{d:"M18.3623 9.99976L18.209 8.48999C18.2031 8.43161 18.2004 8.37289 18.2002 8.31421C18.1988 8.31196 18.1956 8.30842 18.1904 8.30347C18.1718 8.28559 18.1302 8.26245 18.0713 8.26245H11C10.261 8.26245 9.59753 7.81016 9.32617 7.1228L8.9082 6.06421C8.88101 5.9953 8.85737 5.92501 8.83887 5.85327C8.83778 5.85099 8.833 5.84268 8.81836 5.83179C8.79454 5.81475 8.7549 5.79939 8.70605 5.80054H3.92871C3.86986 5.80054 3.82825 5.82368 3.80957 5.84155C3.80816 5.8429 3.80675 5.84428 3.80566 5.84546L4.47559 14.0955L3.62109 17.5154L5.12109 11.5154C5.34367 10.6251 6.1438 9.99977 7.06152 9.99976H18.3623ZM7.06152 11.7996C6.96976 11.7996 6.88944 11.8629 6.86719 11.9519L5.36719 17.9519C5.33598 18.078 5.43158 18.1999 5.56152 18.2H19.4385C19.5302 18.1999 19.6106 18.1376 19.6328 18.0486L21.1328 12.0486C21.1644 11.9224 21.0686 11.7996 20.9385 11.7996H7.06152ZM20.9385 9.99976C22.2396 9.99977 23.1945 11.2228 22.8789 12.4851L21.3789 18.4851C21.1563 19.3754 20.3562 19.9997 19.4385 19.9998H4.92871C4.41722 19.9998 3.92613 19.8059 3.56445 19.4597C3.20281 19.1135 3.00004 18.6436 3 18.1541L2 5.84644C2.00006 5.35711 2.20311 4.88786 2.56445 4.54175C2.92613 4.19554 3.41722 4.00073 3.92871 4.00073H8.66406C9.10133 3.99051 9.5296 4.1225 9.87793 4.37573C10.2285 4.63118 10.4767 4.99457 10.582 5.40405L11 6.46167H18.0713C18.5828 6.46167 19.0739 6.65648 19.4355 7.00269C19.7971 7.34888 20 7.81883 20 8.30835L20.1719 9.99976H20.9385Z",fill:"currentColor"})],-1)])])}const bye=wt({name:"kimi-folder-open",render:yye}),kye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Aye(e,t){return b(),I("svg",kye,[...t[0]||(t[0]=[C("path",{d:"M9.5 3Q10.8 8.2 16 9.5Q10.8 10.8 9.5 16Q8.2 10.8 3 9.5Q8.2 8.2 9.5 3Z",fill:"currentColor"},null,-1),C("path",{d:"M17.25 13.5Q18 16.5 21 17.25Q18 18 17.25 21Q16.5 18 13.5 17.25Q16.5 16.5 17.25 13.5Z",fill:"currentColor"},null,-1)])])}const Cye=wt({name:"kimi-gen-title",render:Aye}),wye={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function xye(e,t){return b(),I("svg",wye,[...t[0]||(t[0]=[C("path",{id:"af-p0",d:"M -2.619 -8.3 C -1.815 -8.3 -1.048 -7.97 -0.499 -7.39 C -0.499 -7.39 0.141 -6.712 0.141 -6.712 C 0.141 -6.712 5.75 -6.712 5.75 -6.712 C 7.904 -6.712 9.65 -4.986 9.65 -2.858 C 9.65 -2.858 9.65 -1.71 9.65 -1.71 C 9.65 -1.219 9.247 -0.821 8.75 -0.821 C 8.253 -0.821 7.85 -1.219 7.85 -1.71 C 7.85 -1.71 7.85 -2.858 7.85 -2.858 C 7.849 -4.004 6.91 -4.934 5.75 -4.934 C 5.75 -4.934 -0.207 -4.934 -0.207 -4.934 C -0.484 -4.934 -0.749 -5.047 -0.938 -5.247 C -0.938 -5.247 -1.815 -6.177 -1.815 -6.177 C -2.023 -6.397 -2.315 -6.521 -2.619 -6.521 C -2.619 -6.521 -6.25 -6.521 -6.25 -6.521 C -7.41 -6.521 -8.35 -5.592 -8.35 -4.446 C -8.35 -4.446 -8.35 4.446 -8.35 4.446 C -8.35 5.592 -7.41 6.521 -6.25 6.521 C -6.25 6.521 1.25 6.521 1.25 6.521 C 1.747 6.521 2.15 6.919 2.15 7.41 C 2.15 7.901 1.747 8.3 1.25 8.3 C 1.25 8.3 -6.25 8.3 -6.25 8.3 C -8.404 8.3 -10.15 6.574 -10.15 4.446 C -10.15 4.446 -10.15 -4.446 -10.15 -4.446 C -10.15 -6.574 -8.404 -8.3 -6.25 -8.3 C -6.25 -8.3 -2.619 -8.3 -2.619 -8.3 Z M 3.75 -2.5 C 4.247 -2.5 4.65 -2.097 4.65 -1.6 C 4.65 -1.103 4.247 -0.699 3.75 -0.699 C 3.75 -0.699 -4.25 -0.699 -4.25 -0.699 C -4.747 -0.699 -5.15 -1.103 -5.15 -1.6 C -5.15 -2.097 -4.747 -2.5 -4.25 -2.5 C -4.25 -2.5 3.75 -2.5 3.75 -2.5 Z",transform:"matrix(1 0 0 1 11.75 12)",fill:"currentColor"},null,-1),C("g",{id:"af-p1"},[C("path",{d:"M 2.635 0 L -2.635 0 M 0 -2.635 L 0 2.635",transform:"matrix(1 0 0 1 18.4 16.3)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1)])])}const _ye=wt({name:"kimi-folder-plus",render:xye}),Sye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Mye(e,t){return b(),I("svg",Sye,[...t[0]||(t[0]=[C("path",{d:"M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM12 19.2002C15.9764 19.2002 19.2002 15.9764 19.2002 12C19.2002 8.02355 15.9764 4.7998 12 4.7998V19.2002Z",fill:"currentColor"},null,-1)])])}const Iye=wt({name:"kimi-follow-system",render:Mye}),Eye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tye(e,t){return b(),I("svg",Eye,[...t[0]||(t[0]=[C("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7ZM12 15.6992C12.4968 15.6992 12.8994 16.1028 12.8994 16.5996C12.8994 17.0964 12.4968 17.5 12 17.5C11.5024 17.5 11.0996 17.0964 11.0996 16.5996C11.0996 16.1028 11.5024 15.6992 12 15.6992ZM12 6.49902C12.4969 6.49922 12.8994 6.86908 12.8994 7.3252V13.6729C12.8994 14.129 12.4969 14.4988 12 14.499C11.5029 14.499 11.0996 14.1291 11.0996 13.6729V7.3252C11.0996 6.86896 11.5029 6.49902 12 6.49902Z",fill:"currentColor"},null,-1)])])}const Lye=wt({name:"kimi-full-access",render:Tye}),Nye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fye(e,t){return b(),I("svg",Nye,[...t[0]||(t[0]=[C("path",{d:"M12.5092 2.11279C17.7402 2.37781 21.8998 6.70364 21.8998 12.0005C21.8996 17.4153 17.5524 21.8108 12.1576 21.895C12.1056 21.898 12.0532 21.8999 12.0004 21.8999C11.948 21.8999 11.8954 21.8968 11.8432 21.896L11.8422 21.895C6.44751 21.8107 2.10022 17.4152 2.10001 12.0005C2.10001 6.53287 6.53278 2.1001 12.0004 2.1001L12.5092 2.11279ZM8.92715 13.0005C9.02896 14.9787 9.42581 16.721 9.99356 17.9985C10.3249 18.7441 10.6971 19.292 11.0639 19.6411C11.4259 19.9855 11.741 20.1001 12.0004 20.1001C12.2598 20.1 12.5749 19.9856 12.9369 19.6411C13.3037 19.292 13.6749 18.7441 14.0063 17.9985C14.574 16.721 14.9718 14.9788 15.0736 13.0005H8.92715ZM3.96329 13.0005C4.31462 15.8522 6.14714 18.2427 8.66837 19.3823C8.55544 19.1733 8.44916 18.9552 8.34903 18.73C7.66574 17.1926 7.22657 15.1926 7.12344 13.0005H3.96329ZM16.8764 13.0005C16.7732 15.1926 16.3341 17.1926 15.6508 18.73C15.5506 18.9554 15.4435 19.1732 15.3305 19.3823C17.8522 18.2429 19.6851 15.8525 20.0365 13.0005H16.8764ZM8.66934 4.6167C6.08869 5.78266 4.22826 8.25964 3.93985 11.1997H7.11661C7.20176 8.92954 7.64512 6.85497 8.34903 5.271C8.4494 5.04516 8.5561 4.82619 8.66934 4.6167ZM12.0004 3.8999C11.7411 3.8999 11.4259 4.01454 11.0639 4.35889C10.6971 4.70797 10.3249 5.25587 9.99356 6.00146C9.40671 7.32188 9.00186 9.13885 8.91739 11.1997H15.0834C14.9989 9.13884 14.5931 7.32189 14.0063 6.00146C13.6749 5.2559 13.3037 4.70796 12.9369 4.35889C12.5749 4.0144 12.2598 3.90002 12.0004 3.8999ZM15.3295 4.61572C15.443 4.82559 15.5502 5.04471 15.6508 5.271C16.3547 6.85498 16.799 8.92949 16.8842 11.1997H20.06C19.7715 8.25914 17.9108 5.78143 15.3295 4.61572Z",fill:"currentColor"},null,-1)])])}const Bye=wt({name:"kimi-globe",render:Fye}),$ye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dye(e,t){return b(),I("svg",$ye,[...t[0]||(t[0]=[C("path",{d:"M8 17C8.82834 17 9.5 17.6717 9.5 18.5C9.5 19.3283 8.82834 20 8 20C7.17166 20 6.5 19.3283 6.5 18.5C6.5 17.6717 7.17166 17 8 17ZM16 17C16.8283 17 17.5 17.6717 17.5 18.5C17.5 19.3283 16.8283 20 16 20C15.1717 20 14.5 19.3283 14.5 18.5C14.5 17.6717 15.1717 17 16 17ZM8 10.5C8.82834 10.5 9.5 11.1717 9.5 12C9.5 12.8283 8.82834 13.5 8 13.5C7.17166 13.5 6.5 12.8283 6.5 12C6.5 11.1717 7.17166 10.5 8 10.5ZM16 10.5C16.8283 10.5 17.5 11.1717 17.5 12C17.5 12.8283 16.8283 13.5 16 13.5C15.1717 13.5 14.5 12.8283 14.5 12C14.5 11.1717 15.1717 10.5 16 10.5ZM8 4C8.82834 4 9.5 4.67166 9.5 5.5C9.5 6.32834 8.82834 7 8 7C7.17166 7 6.5 6.32834 6.5 5.5C6.5 4.67166 7.17166 4 8 4ZM16 4C16.8283 4 17.5 4.67166 17.5 5.5C17.5 6.32834 16.8283 7 16 7C15.1717 7 14.5 6.32834 14.5 5.5C14.5 4.67166 15.1717 4 16 4Z",fill:"currentColor"},null,-1)])])}const Rye=wt({name:"kimi-grip",render:Dye}),zye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Oye(e,t){return b(),I("svg",zye,[...t[0]||(t[0]=[C("path",{d:"M7.22264 6.10352C7.22264 5.5078 7.48259 4.95449 7.91405 4.56055C8.34271 4.16918 8.90831 3.96198 9.48241 3.96191C9.64155 3.96191 9.80001 3.97936 9.95507 4.01074C10.0127 3.5042 10.2586 3.04178 10.6338 2.69922C11.0625 2.30778 11.6279 2.09961 12.2021 2.09961C12.7763 2.09966 13.3418 2.30783 13.7705 2.69922C13.9947 2.90401 14.1709 3.15244 14.29 3.42676C14.4947 3.37044 14.7071 3.34182 14.9209 3.3418C15.4951 3.3418 16.0605 3.549 16.4892 3.94043C16.8644 4.28293 17.1093 4.74548 17.167 5.25195C17.3223 5.22045 17.4812 5.20312 17.6406 5.20312C18.2147 5.20318 18.7803 5.41135 19.209 5.80273C19.6402 6.19663 19.9004 6.74922 19.9004 7.34473V14.6543C19.9004 17.413 19.2914 19.0434 18.0137 20.21C16.82 21.2998 15.2175 21.9004 13.5615 21.9004C11.7538 21.9004 10.2315 21.5696 8.95702 20.8535C7.67664 20.1341 6.71683 19.0652 5.97362 17.708L3.3496 12.916C3.18848 12.6213 3.10112 12.2914 3.0996 11.9531C3.09812 11.6147 3.18309 11.2835 3.34179 10.9873C3.5001 10.692 3.72639 10.4416 3.99706 10.251C4.26771 10.0604 4.57776 9.93235 4.90136 9.87305C5.56617 9.75102 6.25934 9.84517 6.86425 10.1445C6.9942 10.2088 7.11461 10.2788 7.22264 10.3477V6.10352ZM9.02343 12.7969C9.02336 13.1912 8.76624 13.5395 8.38964 13.6562C8.0129 13.773 7.60387 13.6309 7.38085 13.3057L6.53514 12.0723C6.51218 12.0529 6.48411 12.0282 6.45018 12.002C6.34595 11.9213 6.20986 11.8289 6.06639 11.7578C5.81525 11.6335 5.51637 11.5904 5.22655 11.6436H5.22557C5.15055 11.6573 5.08558 11.6865 5.03417 11.7227C4.98289 11.7588 4.94815 11.7998 4.92772 11.8379C4.90762 11.8755 4.90023 11.9122 4.90038 11.9453C4.90057 11.9782 4.9084 12.0144 4.9287 12.0518L7.55272 16.8438C8.16912 17.9693 8.90989 18.7622 9.83886 19.2842C10.7737 19.8094 11.9704 20.0996 13.5615 20.0996C14.7902 20.0996 15.9536 19.6533 16.7998 18.8809C17.5619 18.185 18.0996 17.1383 18.0996 14.6543V7.34473C18.0996 7.28204 18.0734 7.20342 17.9951 7.13184C17.9139 7.05771 17.7875 7.00396 17.6406 7.00391C17.4937 7.00391 17.3674 7.05771 17.2861 7.13184C17.2077 7.20347 17.1807 7.28199 17.1807 7.34473V11.0693C17.1805 11.5661 16.778 11.9685 16.2812 11.9688C15.7843 11.9688 15.381 11.5662 15.3808 11.0693V5.48242C15.3808 5.41973 15.3537 5.34107 15.2754 5.26953C15.1941 5.19547 15.0677 5.1416 14.9209 5.1416C14.774 5.14166 14.6476 5.19541 14.5664 5.26953C14.4881 5.34105 14.462 5.41974 14.4619 5.48242V11.0693C14.4617 11.5662 14.0584 11.9688 13.5615 11.9688C13.0646 11.9687 12.6613 11.5662 12.6611 11.0693V4.24121C12.6611 4.17852 12.635 4.09989 12.5566 4.02832C12.4754 3.95419 12.349 3.90045 12.2021 3.90039C12.0552 3.90039 11.9289 3.95421 11.8476 4.02832C11.7692 4.09992 11.7422 4.17849 11.7422 4.24121V11.0693C11.742 11.5661 11.3395 11.9685 10.8428 11.9688C10.3458 11.9688 9.94257 11.5662 9.94237 11.0693V6.10352L9.93651 6.05371C9.92534 6.00177 9.89573 5.94433 9.8369 5.89062C9.75567 5.81647 9.62938 5.76172 9.48241 5.76172C9.33554 5.76179 9.2091 5.81651 9.12792 5.89062C9.04964 5.96222 9.02343 6.04084 9.02343 6.10352V12.7969Z",fill:"currentColor"},null,-1)])])}const Pye=wt({name:"kimi-hand",render:Oye}),jye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hye(e,t){return b(),I("svg",jye,[...t[0]||(t[0]=[C("path",{d:"M4 3.33203C4.55224 3.33203 4.99993 3.7798 5 4.33203V18.0908H20.0674C20.6195 18.0908 21.0671 18.5388 21.0674 19.0908C21.0674 19.6431 20.6197 20.0908 20.0674 20.0908H5C3.89543 20.0908 3 19.1954 3 18.0908V4.33203C3.00007 3.7798 3.44776 3.33203 4 3.33203ZM8.19922 9.28418C8.7515 9.28418 9.19922 9.73189 9.19922 10.2842V15.6045C9.19908 16.1567 8.75142 16.6045 8.19922 16.6045C7.64719 16.6043 7.19936 16.1565 7.19922 15.6045V10.2842C7.19922 9.73202 7.6471 9.28438 8.19922 9.28418ZM17.2227 6.85645C17.7748 6.85658 18.2226 7.3043 18.2227 7.85645V15.6045C18.2225 16.1566 17.7747 16.6044 17.2227 16.6045C16.6705 16.6045 16.2228 16.1566 16.2227 15.6045V7.85645C16.2227 7.30422 16.6704 6.85645 17.2227 6.85645ZM12.7109 3.96387C13.2631 3.96387 13.7107 4.41175 13.7109 4.96387V15.6035C13.7109 16.1558 13.2632 16.6035 12.7109 16.6035C12.1587 16.6035 11.7109 16.1558 11.7109 15.6035V4.96387C11.7111 4.41175 12.1588 3.96387 12.7109 3.96387Z",fill:"currentColor"},null,-1)])])}const Wye=wt({name:"kimi-histogram",render:Hye}),qye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Uye(e,t){return b(),I("svg",qye,[...t[0]||(t[0]=[C("path",{d:"M8.00916 7.50488C8.47326 7.50488 8.91828 7.68943 9.24646 8.01758C9.57465 8.34577 9.75916 8.79075 9.75916 9.25488C9.75916 9.71901 9.57465 10.164 9.24646 10.4922C8.91828 10.8203 8.47326 11.0049 8.00916 11.0049C7.54507 11.0049 7.10001 10.8203 6.77185 10.4922C6.4437 10.164 6.25916 9.71898 6.25916 9.25488C6.25916 8.79078 6.4437 8.34576 6.77185 8.01758C7.10001 7.68942 7.54507 7.50492 8.00916 7.50488Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8998 4.09961C20.0537 4.09961 21.8002 5.84609 21.8002 8V16C21.8002 18.1539 20.0537 19.9004 17.8998 19.9004H5.89978C3.74598 19.9003 1.99939 18.1538 1.99939 16V8C1.99939 5.84617 3.74598 4.09974 5.89978 4.09961H17.8998ZM15.4867 12.2539C15.448 12.2184 15.3885 12.2192 15.351 12.2559L11.7338 15.8027C11.0146 16.5079 9.87305 16.5222 9.13708 15.835L6.98669 13.8262C6.95049 13.7924 6.89516 13.791 6.85681 13.8223L3.82361 16.2988C3.96873 17.3168 4.84165 18.0995 5.89978 18.0996H17.8998C18.9375 18.0996 19.7964 17.3466 19.9662 16.3574L15.4867 12.2539ZM5.89978 5.90039C4.74009 5.90052 3.80017 6.84028 3.80017 8V14.002L5.73181 12.4238C6.46046 11.8286 7.51253 11.8634 8.20056 12.5059L10.351 14.5146C10.3897 14.5508 10.4498 14.5497 10.4877 14.5127L14.1049 10.9658C14.819 10.2656 15.9506 10.2466 16.6879 10.9219L19.9994 13.9551V8C19.9994 6.8402 19.0596 5.90039 17.8998 5.90039H5.89978Z",fill:"currentColor"},null,-1)])])}const Kye=wt({name:"kimi-image",render:Uye}),Vye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zye(e,t){return b(),I("svg",Vye,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.09375 2.81174C5.4825 2.50796 6.04376 2.56488 6.34766 2.93869L20.1855 19.9602C20.4895 20.3341 20.421 20.8836 20.0322 21.1877C19.6435 21.4917 19.0823 21.4355 18.7783 21.0617L17.9971 20.1008H5.99609C3.84224 20.1008 2.0958 18.3552 2.0957 16.2014V8.13889C2.09589 6.26755 3.41429 4.70428 5.17285 4.32639L4.93945 4.03928C4.63577 3.66536 4.7051 3.11573 5.09375 2.81174ZM7.13184 14.1096C7.09416 14.0738 7.03659 14.0713 6.99609 14.1037L3.92871 16.5569C4.09761 17.5472 4.95753 18.301 5.99609 18.301H16.5342L13.373 14.4133L11.9072 15.9455C11.1531 16.7324 9.92202 16.7621 9.13281 16.0119L7.13184 14.1096ZM5.99609 6.03928C4.83643 6.03928 3.89669 6.97927 3.89648 8.13889V14.1408L5.83496 12.5901C6.60469 11.9742 7.69929 12.022 8.41504 12.7024L10.416 14.6037C10.4575 14.6431 10.5218 14.642 10.5615 14.6008L12.1641 12.926L9.78906 10.0051C9.70282 10.2646 9.55682 10.5038 9.35645 10.7004C9.02202 11.0285 8.56767 11.2131 8.09473 11.2131C7.62195 11.213 7.1683 11.0284 6.83398 10.7004C6.49961 10.3724 6.31152 9.92701 6.31152 9.46311C6.3116 8.99941 6.49981 8.55474 6.83398 8.22678C7.12986 7.93654 7.51931 7.75901 7.93262 7.7219L6.56543 6.03928H5.99609Z",fill:"currentColor"},null,-1),C("path",{d:"M18.0049 4.31272C20.1587 4.31288 21.9043 6.0593 21.9043 8.21311V13.718C21.9039 15.4743 19.7248 16.2906 18.5713 14.966L14.9141 10.7658C14.5882 10.3912 14.6278 9.82271 15.002 9.49631C15.3768 9.16994 15.9451 9.20948 16.2715 9.5842L19.9287 13.7844C19.9528 13.812 19.9696 13.8167 19.9775 13.8186C19.9908 13.8216 20.0141 13.8213 20.04 13.8117C20.0655 13.8021 20.0826 13.7875 20.0908 13.7766C20.0955 13.7702 20.1044 13.7552 20.1045 13.718V8.21311C20.1045 7.05341 19.1645 6.11366 18.0049 6.1135H10.6328C10.1361 6.11327 9.73267 5.70981 9.73242 5.21311C9.73242 4.71619 10.136 4.31295 10.6328 4.31272H18.0049Z",fill:"currentColor"},null,-1)])])}const Gye=wt({name:"kimi-image-failed",render:Zye}),Qye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Yye(e,t){return b(),I("svg",Qye,[...t[0]||(t[0]=[C("path",{d:"M12 2.1001C17.4676 2.10031 21.8994 6.53286 21.8994 12.0005C21.8992 17.4679 17.4674 21.8997 12 21.8999C6.53237 21.8999 2.09982 17.4681 2.09961 12.0005C2.09961 6.53273 6.53224 2.1001 12 2.1001ZM12 3.8999C7.52636 3.8999 3.89941 7.52684 3.89941 12.0005C3.89963 16.474 7.52649 20.1001 12 20.1001C16.4733 20.0999 20.0994 16.4738 20.0996 12.0005C20.0996 7.52697 16.4735 3.90011 12 3.8999ZM12 9.50049C12.4969 9.50068 12.8994 9.87055 12.8994 10.3267V16.6743C12.8992 17.1303 12.4968 17.5003 12 17.5005C11.503 17.5005 11.0998 17.1304 11.0996 16.6743V10.3267C11.0996 9.87043 11.5029 9.50049 12 9.50049ZM12 6.49951C12.4968 6.49951 12.8994 6.90313 12.8994 7.3999C12.8992 7.8965 12.4966 8.30029 12 8.30029C11.5025 8.30028 11.0998 7.8965 11.0996 7.3999C11.0996 6.90313 11.5024 6.49952 12 6.49951Z",fill:"currentColor"},null,-1)])])}const Jye=wt({name:"kimi-info",render:Yye}),Xye={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e4e(e,t){return b(),I("svg",Xye,[...t[0]||(t[0]=[Lu('<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.09998C6.53222 2.09998 2.09998 6.53222 2.09998 12C2.09998 17.4677 6.53222 21.9 12 21.9C17.4677 21.9 21.9 17.4677 21.9 12C21.9 6.53222 17.4677 2.09998 12 2.09998ZM3.89998 12C3.89998 7.52633 7.52633 3.89998 12 3.89998C16.4736 3.89998 20.1 7.52633 20.1 12C20.1 16.4736 16.4736 20.1 12 20.1C7.52633 20.1 3.89998 16.4736 3.89998 12Z" fill="currentColor"></path><path d="M9.4286 9.47153C9.4286 8.97448 9.83154 8.57153 10.3286 8.57153H11.1C11.5971 8.57153 12 8.97448 12 9.47153C12 9.96859 11.5971 10.3715 11.1 10.3715H10.3286C9.83154 10.3715 9.4286 9.96859 9.4286 9.47153Z" fill="currentColor"></path><path d="M5.14289 9.47155C5.14289 8.97449 5.54583 8.57155 6.04289 8.57155H7.67146C8.16851 8.57155 8.57146 8.97449 8.57146 9.47155C8.57146 9.9686 8.16851 10.3715 7.67146 10.3715H6.04289C5.54583 10.3715 5.14289 9.9686 5.14289 9.47155Z" fill="currentColor"></path><path d="M8.57146 16.3287C8.57146 15.8316 8.9744 15.4287 9.47145 15.4287H14.5286C15.0257 15.4287 15.4286 15.8316 15.4286 16.3287C15.4286 16.8257 15.0257 17.2287 14.5286 17.2287H9.47145C8.9744 17.2287 8.57146 16.8257 8.57146 16.3287Z" fill="currentColor"></path><path d="M6.04288 12.0001C5.54583 12.0001 5.14288 12.403 5.14288 12.9001C5.14288 13.3972 5.54583 13.8001 6.04288 13.8001H6.81431C7.31137 13.8001 7.71431 13.3972 7.71431 12.9001C7.71431 12.403 7.31137 12.0001 6.81431 12.0001H6.04288Z" fill="currentColor"></path><path d="M9.47145 12.0001C8.9744 12.0001 8.57146 12.403 8.57146 12.9001C8.57146 13.3972 8.9744 13.8001 9.47146 13.8001H10.2429C10.7399 13.8001 11.1429 13.3972 11.1429 12.9001C11.1429 12.403 10.7399 12.0001 10.2429 12.0001H9.47145Z" fill="currentColor"></path><path d="M12.8572 9.47153C12.8572 8.97448 13.2601 8.57153 13.7572 8.57153H14.5286C15.0257 8.57153 15.4286 8.97448 15.4286 9.47153C15.4286 9.96859 15.0257 10.3715 14.5286 10.3715H13.7572C13.2601 10.3715 12.8572 9.96859 12.8572 9.47153Z" fill="currentColor"></path><path d="M12.9 12.0001C12.403 12.0001 12 12.403 12 12.9001C12 13.3972 12.403 13.8001 12.9 13.8001H13.6715C14.1685 13.8001 14.5715 13.3972 14.5715 12.9001C14.5715 12.403 14.1685 12.0001 13.6715 12.0001H12.9Z" fill="currentColor"></path><path d="M16.2857 9.47153C16.2857 8.97448 16.6887 8.57153 17.1857 8.57153H17.9572C18.4542 8.57153 18.8572 8.97448 18.8572 9.47153C18.8572 9.96859 18.4542 10.3715 17.9572 10.3715H17.1857C16.6887 10.3715 16.2857 9.96859 16.2857 9.47153Z" fill="currentColor"></path><path d="M16.3286 12.0001C15.8315 12.0001 15.4286 12.403 15.4286 12.9001C15.4286 13.3972 15.8315 13.8001 16.3286 13.8001H17.9572C18.4542 13.8001 18.8572 13.3972 18.8572 12.9001C18.8572 12.403 18.4542 12.0001 17.9572 12.0001H16.3286Z" fill="currentColor"></path>',10)])])}const t4e=wt({name:"kimi-keyboard",render:e4e}),n4e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function i4e(e,t){return b(),I("svg",n4e,[...t[0]||(t[0]=[C("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),C("path",{id:"bar-arrow",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const s4e=wt({name:"kimi-left-panel",render:i4e}),o4e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function r4e(e,t){return b(),I("svg",o4e,[...t[0]||(t[0]=[C("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),C("path",{id:"bar-arrow-expand",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const l4e=wt({name:"kimi-left-panel-expand",render:r4e}),a4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function u4e(e,t){return b(),I("svg",a4e,[...t[0]||(t[0]=[Lu('<g><path d="M12.9 1.7999C12.9 1.30285 12.4971 0.899902 12 0.899902C11.5029 0.899902 11.1 1.30285 11.1 1.7999V2.7999C11.1 3.29696 11.5029 3.6999 12 3.6999C12.4971 3.6999 12.9 3.29696 12.9 2.7999V1.7999Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.1 11.9999C6.1 8.7414 8.74152 6.09988 12 6.09988C15.2585 6.09988 17.9 8.7414 17.9 11.9999C17.9 15.2584 15.2585 17.8999 12 17.8999C8.74152 17.8999 6.1 15.2584 6.1 11.9999ZM12 7.89988C9.73563 7.89988 7.9 9.73551 7.9 11.9999C7.9 14.2642 9.73563 16.0999 12 16.0999C14.2644 16.0999 16.1 14.2642 16.1 11.9999C16.1 9.73551 14.2644 7.89988 12 7.89988Z" fill="currentColor"></path><path d="M0.899994 11.9999C0.899994 11.5028 1.30294 11.0999 1.79999 11.0999H2.79999C3.29705 11.0999 3.69999 11.5028 3.69999 11.9999C3.69999 12.4969 3.29705 12.8999 2.79999 12.8999H1.79999C1.30294 12.8999 0.899994 12.4969 0.899994 11.9999Z" fill="currentColor"></path><path d="M12 20.2991C12.4971 20.2991 12.9 20.702 12.9 21.1991V22.1991C12.9 22.6961 12.4971 23.0991 12 23.0991C11.5029 23.0991 11.1 22.6961 11.1 22.1991V21.1991C11.1 20.702 11.5029 20.2991 12 20.2991Z" fill="currentColor"></path><path d="M21.2016 11.0999C20.7045 11.0999 20.3016 11.5028 20.3016 11.9999C20.3016 12.4969 20.7045 12.8999 21.2016 12.8999H22.2016C22.6986 12.8999 23.1016 12.4969 23.1016 11.9999C23.1016 11.5028 22.6986 11.0999 22.2016 11.0999H21.2016Z" fill="currentColor"></path><path d="M20.1995 3.79903C20.551 4.1505 20.551 4.72035 20.1995 5.07182L19.4924 5.77893C19.141 6.1304 18.5711 6.1304 18.2196 5.77893C17.8682 5.42746 17.8682 4.85761 18.2196 4.50614L18.9268 3.79903C19.2782 3.44756 19.8481 3.44756 20.1995 3.79903Z" fill="currentColor"></path><path d="M19.4942 18.2215C19.1427 17.87 18.5729 17.87 18.2214 18.2215C17.87 18.573 17.87 19.1428 18.2214 19.4943L18.9285 20.2014C19.28 20.5529 19.8498 20.5529 20.2013 20.2014C20.5528 19.8499 20.5528 19.2801 20.2013 18.9286L19.4942 18.2215Z" fill="currentColor"></path><path d="M5.78079 18.2213C6.13227 18.5727 6.13227 19.1426 5.78079 19.4941L5.07369 20.2012C4.72222 20.5526 4.15237 20.5526 3.8009 20.2012C3.44942 19.8497 3.44942 19.2798 3.8009 18.9284L4.508 18.2213C4.85947 17.8698 5.42932 17.8698 5.78079 18.2213Z" fill="currentColor"></path><path d="M5.07077 3.79912C4.7193 3.44764 4.14945 3.44764 3.79798 3.79912C3.4465 4.15059 3.4465 4.72044 3.79798 5.07191L4.50508 5.77901C4.85655 6.13049 5.4264 6.13049 5.77787 5.77902C6.12935 5.42754 6.12935 4.85769 5.77787 4.50622L5.07077 3.79912Z" fill="currentColor"></path></g>',1)])])}const c4e=wt({name:"kimi-light-mode",render:u4e}),d4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f4e(e,t){return b(),I("svg",d4e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.97427 8.06961C4.99348 7.33581 6.18946 7.1 7.00001 7.1H9.00001C9.49706 7.1 9.90001 7.50294 9.90001 8C9.90001 8.49706 9.49706 8.9 9.00001 8.9H7.00001C6.47755 8.9 5.67353 9.06419 5.02599 9.53039C4.42434 9.96356 3.90001 10.6934 3.90001 12C3.90001 13.3066 4.42434 14.0364 5.02599 14.4696C5.67353 14.9358 6.47755 15.1 7.00001 15.1H9.00001C9.49706 15.1 9.90001 15.5029 9.90001 16C9.90001 16.4971 9.49706 16.9 9.00001 16.9H7.00001C6.18946 16.9 4.99348 16.6642 3.97427 15.9304C2.90917 15.1636 2.10001 13.8934 2.10001 12C2.10001 10.1066 2.90917 8.83644 3.97427 8.06961ZM14.1 8C14.1 7.50294 14.5029 7.1 15 7.1H17C17.8105 7.1 19.0065 7.33581 20.0257 8.06961C21.0908 8.83644 21.9 10.1066 21.9 12C21.9 13.8934 21.0908 15.1636 20.0257 15.9304C19.0065 16.6642 17.8105 16.9 17 16.9H15C14.5029 16.9 14.1 16.4971 14.1 16C14.1 15.5029 14.5029 15.1 15 15.1H17C17.5225 15.1 18.3265 14.9358 18.974 14.4696C19.5757 14.0364 20.1 13.3066 20.1 12C20.1 10.6934 19.5757 9.96356 18.974 9.53039C18.3265 9.06419 17.5225 8.9 17 8.9H15C14.5029 8.9 14.1 8.49706 14.1 8ZM7.10001 12C7.10001 11.5029 7.50295 11.1 8.00001 11.1H16C16.4971 11.1 16.9 11.5029 16.9 12C16.9 12.4971 16.4971 12.9 16 12.9H8.00001C7.50295 12.9 7.10001 12.4971 7.10001 12Z",fill:"currentColor"},null,-1)])])}const h4e=wt({name:"kimi-link",render:f4e}),p4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g4e(e,t){return b(),I("svg",p4e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.10001 5.99998C4.10001 5.50292 4.50295 5.09998 5.00001 5.09998H19C19.4971 5.09998 19.9 5.50292 19.9 5.99998C19.9 6.49703 19.4971 6.89998 19 6.89998H5.00001C4.50295 6.89998 4.10001 6.49703 4.10001 5.99998ZM4.10001 12C4.10001 11.5029 4.50295 11.1 5.00001 11.1H19C19.4971 11.1 19.9 11.5029 19.9 12C19.9 12.497 19.4971 12.9 19 12.9H5.00001C4.50295 12.9 4.10001 12.497 4.10001 12ZM4.10001 18C4.10001 17.5029 4.50295 17.1 5.00001 17.1H19C19.4971 17.1 19.9 17.5029 19.9 18C19.9 18.497 19.4971 18.9 19 18.9H5.00001C4.50295 18.9 4.10001 18.497 4.10001 18Z",fill:"currentColor"},null,-1)])])}const m4e=wt({name:"kimi-list",render:g4e}),v4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y4e(e,t){return b(),I("svg",v4e,[...t[0]||(t[0]=[C("g",null,[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 4.09961C20.1539 4.09961 21.9004 5.84609 21.9004 8V16C21.9004 18.1539 20.1539 19.9004 18 19.9004H6C3.84609 19.9004 2.09961 18.1539 2.09961 16V8C2.09961 5.84609 3.84609 4.09961 6 4.09961H18ZM3.90039 16C3.90039 17.1598 4.8402 18.0996 6 18.0996H18C19.1598 18.0996 20.0996 17.1598 20.0996 16V9.49805L13.5361 13.5361C12.5955 14.1147 11.4075 14.1084 10.4727 13.5205L3.90039 9.38672V16ZM6 5.90039C5.0746 5.90039 4.29039 6.49909 4.01074 7.33008L11.4316 11.9971C11.7861 12.2199 12.2361 12.2222 12.5928 12.0029L20.0195 7.43457C19.7725 6.54993 18.9636 5.90039 18 5.90039H6Z",fill:"currentColor"})],-1)])])}const b4e=wt({name:"kimi-mail",render:y4e}),k4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A4e(e,t){return b(),I("svg",k4e,[...t[0]||(t[0]=[C("path",{d:"M17 11.0996C17.4971 11.0996 17.9004 11.5029 17.9004 12C17.9004 12.4971 17.4971 12.9004 17 12.9004H7C6.50294 12.9004 6.09961 12.4971 6.09961 12C6.09961 11.5029 6.50294 11.0996 7 11.0996H17Z",fill:"currentColor"},null,-1)])])}const C4e=wt({name:"kimi-minus",render:A4e}),w4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x4e(e,t){return b(),I("svg",w4e,[...t[0]||(t[0]=[C("path",{d:"M15.182 3.32802C15.9304 2.72235 17.0309 2.76978 17.724 3.46767L18.5424 4.29189L18.6722 4.43642C19.2377 5.13495 19.234 6.1404 18.6635 6.83486L18.5326 6.97841L18.0248 7.48232C17.9549 7.55172 17.8793 7.61254 17.8021 7.66884C17.9794 8.18027 17.9316 8.7498 17.6595 9.22841C17.6847 9.24522 17.7091 9.2635 17.7328 9.2831L17.8002 9.3456L17.9847 9.53798C19.8515 11.5442 20.4549 14.0022 19.6224 16.2196C19.1921 17.3657 18.4025 18.3827 17.2992 19.203H19.0873L19.1801 19.2079C19.6337 19.2542 19.9877 19.6375 19.9877 20.1034C19.9876 20.5692 19.6337 20.9527 19.1801 20.9989L19.0873 21.0028H13.0385C13.0244 21.0033 13.0104 21.0031 12.9965 21.0028H4.9115C4.41448 21.0028 4.01117 20.6004 4.01111 20.1034C4.01111 19.6064 4.41444 19.203 4.9115 19.203H12.9047C15.7614 18.5471 17.3679 17.1023 17.9369 15.5868C18.4678 14.1726 18.179 12.4782 16.807 10.9188L16.5189 10.6093L16.4574 10.5399C16.4549 10.5368 16.453 10.5333 16.4506 10.5302L12.3011 14.6522C11.6031 15.3454 10.5023 15.3845 9.75818 14.7733L9.61365 14.6425L7.31091 12.3231C6.5717 11.5786 6.57617 10.376 7.32068 9.63662L12.3676 4.62392L12.5121 4.49404C13.0358 4.06988 13.7318 3.96755 14.3402 4.18251C14.3969 4.10597 14.4591 4.03197 14.5287 3.96279L15.0365 3.45791L15.182 3.32802ZM4.83044 12.9335C5.16112 12.6052 5.68305 12.5863 6.03552 12.8759L6.10291 12.9384L9.07361 15.9286L9.13513 15.997C9.42218 16.3514 9.3992 16.8727 9.06873 17.2011C8.7381 17.5294 8.21712 17.5482 7.86462 17.2587L7.79626 17.1972L4.82654 14.2069L4.76501 14.1376C4.47792 13.7831 4.49979 13.2619 4.83044 12.9335ZM13.6693 5.87978L13.6361 5.90126L8.58826 10.914C8.54935 10.9529 8.54943 11.0165 8.58826 11.0556L10.891 13.3739L10.9242 13.3964C10.9602 13.4111 11.0032 13.404 11.0326 13.3749L16.0795 8.3622L16.1019 8.329C16.1117 8.3049 16.1117 8.2779 16.1019 8.2538L16.0804 8.2206L13.7777 5.90224C13.7486 5.87289 13.7054 5.86535 13.6693 5.87978ZM16.3383 4.71376L16.3051 4.73525L15.7972 5.24013C15.7584 5.27904 15.7585 5.34166 15.7972 5.38076L16.6146 6.20498L16.6478 6.22744C16.6838 6.24221 16.7268 6.23487 16.7562 6.20595L17.264 5.70107L17.2865 5.66787C17.2962 5.64382 17.2963 5.61672 17.2865 5.59267L17.265 5.55947L16.4467 4.73623C16.4174 4.70681 16.3744 4.6992 16.3383 4.71376Z",fill:"currentColor"},null,-1)])])}const _4e=wt({name:"kimi-microscope",render:x4e}),S4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M4e(e,t){return b(),I("svg",S4e,[...t[0]||(t[0]=[C("path",{d:"M6 12C6 12.8283 5.32834 13.5 4.5 13.5C3.67166 13.5 3 12.8283 3 12C3 11.1717 3.67166 10.5 4.5 10.5C5.32834 10.5 6 11.1717 6 12Z",fill:"currentColor"},null,-1),C("path",{d:"M13.5 12C13.5 12.8283 12.8283 13.5 12 13.5C11.1717 13.5 10.5 12.8283 10.5 12C10.5 11.1717 11.1717 10.5 12 10.5C12.8283 10.5 13.5 11.1717 13.5 12Z",fill:"currentColor"},null,-1),C("path",{d:"M19.5002 13.5C20.3287 13.5 21 12.8287 21 12.0002C21 11.1718 20.3287 10.5 19.5002 10.5C18.6718 10.5 18 11.1718 18 12.0002C18 12.8287 18.6718 13.5 19.5002 13.5Z",fill:"currentColor"},null,-1)])])}const I4e=wt({name:"kimi-more",render:M4e}),E4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T4e(e,t){return b(),I("svg",E4e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 12.0993C8.49691 12.0993 8.90016 12.5028 8.90039 12.9997V17.9997C8.90039 19.6013 7.60163 20.9001 6 20.9001C4.39837 20.9001 3.09961 19.6013 3.09961 17.9997C3.09984 16.3982 4.39852 15.0993 6 15.0993C6.38939 15.0993 6.76033 15.1778 7.09961 15.317V12.9997C7.09984 12.5028 7.50309 12.0993 8 12.0993ZM6 16.9001C5.39263 16.9001 4.90062 17.3923 4.90039 17.9997C4.90039 18.6072 5.39249 19.0993 6 19.0993C6.60751 19.0993 7.09961 18.6072 7.09961 17.9997C7.09938 17.3923 6.60737 16.9001 6 16.9001Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.627 3.35611C19.8025 3.12106 20.9001 4.02068 20.9004 5.21939V15.9997C20.9004 17.6013 19.6016 18.9001 18 18.9001C16.3984 18.9001 15.0996 17.6013 15.0996 15.9997C15.0998 14.3982 16.3985 13.0993 18 13.0993C18.3894 13.0993 18.7603 13.1778 19.0996 13.317V9.21939C19.0993 9.15657 19.0421 9.10946 18.9805 9.12173L12.6768 10.3825C12.1894 10.4799 11.7148 10.1637 11.6172 9.67642C11.52 9.18922 11.8361 8.71439 12.3232 8.61685L18.627 7.35611C18.7868 7.32415 18.9452 7.31502 19.0996 7.32291V5.21939C19.0993 5.15657 19.0421 5.10946 18.9805 5.12173L12.6768 6.38248C12.1894 6.47994 11.7148 6.16372 11.6172 5.67642C11.52 5.18922 11.8361 4.71439 12.3232 4.61685L18.627 3.35611ZM18 14.9001C17.3926 14.9001 16.9006 15.3923 16.9004 15.9997C16.9004 16.6072 17.3925 17.0993 18 17.0993C18.6075 17.0993 19.0996 16.6072 19.0996 15.9997C19.0994 15.3923 18.6074 14.9001 18 14.9001Z",fill:"currentColor"},null,-1),C("path",{d:"M7.32422 5.38931C7.61669 4.87032 8.38346 4.87015 8.67578 5.38931L8.73047 5.50845L8.89551 5.95376L8.97949 6.1481C9.19937 6.58817 9.57968 6.93145 10.0459 7.10415L10.4912 7.26919C11.127 7.50461 11.1666 8.36217 10.6104 8.67544L10.4912 8.73013L10.0459 8.89517C9.5799 9.06783 9.19939 9.41141 8.97949 9.85123L8.89551 10.0456L8.73047 10.4909C8.49495 11.1267 7.63737 11.1665 7.32422 10.61L7.26953 10.4909L7.10449 10.0456C6.93172 9.57931 6.58767 9.19898 6.14746 8.97916L5.9541 8.89517L5.50879 8.73013C4.83054 8.47903 4.83061 7.52037 5.50879 7.26919L5.9541 7.10415L6.14746 7.02017C6.58757 6.80032 6.93176 6.41995 7.10449 5.95376L7.26953 5.50845L7.32422 5.38931Z",fill:"currentColor"},null,-1)])])}const L4e=wt({name:"kimi-music",render:T4e}),N4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F4e(e,t){return b(),I("svg",N4e,[...t[0]||(t[0]=[C("path",{d:"M17.9551 6.32648C17.955 5.82951 17.5517 5.42706 17.0547 5.42706H15.4844C14.9875 5.42717 14.5851 5.82958 14.585 6.32648V17.6732C14.585 18.1701 14.9874 18.5734 15.4844 18.5735H17.0547C17.5518 18.5735 17.9551 18.1702 17.9551 17.6732V6.32648ZM19.7549 17.6732C19.7549 19.1643 18.5459 20.3734 17.0547 20.3734H15.4844C13.9933 20.3732 12.7842 19.1643 12.7842 17.6732V6.32648C12.7843 4.83546 13.9934 3.62639 15.4844 3.62628H17.0547C18.5458 3.62628 19.7548 4.8354 19.7549 6.32648V17.6732Z",fill:"currentColor"},null,-1),C("path",{d:"M9.41571 6.32648C9.41561 5.82951 9.01231 5.42706 8.51532 5.42706H6.94501C6.44811 5.42717 6.0457 5.82958 6.04559 6.32648V17.6732C6.04559 18.1701 6.44804 18.5734 6.94501 18.5735H8.51532C9.01238 18.5735 9.41571 18.1702 9.41571 17.6732V6.32648ZM11.2155 17.6732C11.2155 19.1643 10.0065 20.3734 8.51532 20.3734H6.94501C5.45393 20.3732 4.24481 19.1643 4.24481 17.6732V6.32648C4.24492 4.83546 5.45399 3.62639 6.94501 3.62628H8.51532C10.0064 3.62628 11.2154 4.8354 11.2155 6.32648V17.6732Z",fill:"currentColor"},null,-1)])])}const B4e=wt({name:"kimi-pause",render:F4e}),$4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D4e(e,t){return b(),I("svg",$4e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.0176 4.89998C17.7305 4.89998 17.4552 5.014 17.2522 5.217L6.35429 16.1149C5.957 16.5122 5.67517 17.01 5.53889 17.5551L5.23691 18.763L6.44486 18.4611C6.98994 18.3248 7.48773 18.0429 7.88502 17.6456L18.783 6.74773C18.8834 6.64728 18.9631 6.52797 19.0176 6.39658C19.072 6.26517 19.1 6.12441 19.1 5.98236C19.1 5.84031 19.072 5.69956 19.0176 5.56815C18.9631 5.43676 18.8834 5.31745 18.783 5.217C18.6825 5.11649 18.5631 5.03676 18.4318 4.98237C18.3005 4.92798 18.1597 4.89998 18.0176 4.89998ZM15.9794 3.94421C16.52 3.40366 17.2531 3.09998 18.0176 3.09998C18.3961 3.09998 18.7709 3.17452 19.1207 3.31938C19.4704 3.46424 19.7881 3.67656 20.0558 3.94421C20.3235 4.21192 20.5357 4.52969 20.6805 4.87932C20.8254 5.22895 20.9 5.60375 20.9 5.98236C20.9 6.36098 20.8254 6.73578 20.6805 7.08541C20.5357 7.43504 20.3235 7.75281 20.0558 8.02052L17.6385 10.4378L9.15781 18.9184C8.52984 19.5464 7.74301 19.9919 6.88142 20.2073L4.21828 20.8731C3.91158 20.9498 3.58714 20.8599 3.3636 20.6364C3.14006 20.4128 3.05019 20.0884 3.12686 19.7817L3.79264 17.1185C4.00803 16.257 4.45351 15.4701 5.0815 14.8421L15.9794 3.94421Z",fill:"currentColor"},null,-1)])])}const R4e=wt({name:"kimi-pencil",render:D4e}),z4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O4e(e,t){return b(),I("svg",z4e,[...t[0]||(t[0]=[C("path",{d:"M7.76251 3.10547C8.25776 3.10552 8.74422 3.23849 9.17072 3.49023L19.533 9.60742C20.8536 10.3869 21.2922 12.0901 20.5174 13.4121C20.2785 13.8195 19.9398 14.1604 19.533 14.4004L9.16974 20.5156C7.84721 21.2958 6.14595 20.8511 5.36993 19.5273C5.1196 19.1003 4.98719 18.6142 4.98712 18.1191V5.88672C4.98716 4.3537 6.2273 3.10547 7.76251 3.10547ZM6.7879 18.1191C6.78797 18.2945 6.8343 18.4664 6.92267 18.6172C7.19638 19.0841 7.79336 19.2377 8.25568 18.9648L18.618 12.8496C18.7607 12.7654 18.8803 12.6458 18.9647 12.502C19.2393 12.0334 19.082 11.4311 18.618 11.1572L8.25568 5.04102C8.1061 4.95273 7.93562 4.9063 7.76251 4.90625C7.22703 4.90625 6.78794 5.34218 6.7879 5.88672V18.1191Z",fill:"currentColor"},null,-1)])])}const P4e=wt({name:"kimi-play",render:O4e}),j4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H4e(e,t){return b(),I("svg",j4e,[...t[0]||(t[0]=[C("path",{d:"M18.36 6.64a9 9 0 1 1-12.73 0",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),C("path",{d:"M12 2v10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const W4e=wt({name:"kimi-power",render:H4e}),q4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U4e(e,t){return b(),I("svg",q4e,[...t[0]||(t[0]=[C("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1),C("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 3.7998C7.47126 3.7998 3.7998 7.47126 3.7998 12C3.7998 16.5287 7.47126 20.2002 12 20.2002C16.5287 20.2002 20.2002 16.5287 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998Z",fill:"currentColor"},null,-1)])])}const K4e=wt({name:"kimi-question",render:U4e}),V4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Z4e(e,t){return b(),I("svg",V4e,[...t[0]||(t[0]=[C("path",{d:"M12 2C13.1046 2 14 2.89543 14 4C14 4.78019 13.552 5.45353 12.9004 5.7832V7H16.5C18.1569 7 19.5 8.34315 19.5 10V17C19.5 18.6051 18.2394 19.9158 16.6543 19.9961L16.5 20H7.5L7.3457 19.9961C5.81166 19.9184 4.58163 18.6883 4.50391 17.1543L4.5 17V10C4.5 8.34315 5.84315 7 7.5 7H11.0996V5.7832C10.448 5.45353 10 4.78019 10 4C10 2.89543 10.8954 2 12 2ZM7.5 8.7998C6.83726 8.7998 6.2998 9.33726 6.2998 10V17C6.2998 17.6627 6.83726 18.2002 7.5 18.2002H16.5C17.1627 18.2002 17.7002 17.6627 17.7002 17V10C17.7002 9.33726 17.1627 8.7998 16.5 8.7998H7.5ZM3 10.7666C3.49706 10.7666 3.90039 11.1699 3.90039 11.667V15C3.90039 15.4971 3.49706 15.9004 3 15.9004C2.50294 15.9004 2.09961 15.4971 2.09961 15V11.667C2.09961 11.1699 2.50294 10.7666 3 10.7666ZM21 10.7666C21.4971 10.7666 21.9004 11.1699 21.9004 11.667V15C21.9004 15.4971 21.4971 15.9004 21 15.9004C20.5029 15.9004 20.0996 15.4971 20.0996 15V11.667C20.0996 11.1699 20.5029 10.7666 21 10.7666ZM9.5 11.0996C9.99706 11.0996 10.4004 11.5029 10.4004 12V14.5C10.4004 14.9971 9.99706 15.4004 9.5 15.4004C9.00294 15.4004 8.59961 14.9971 8.59961 14.5V12C8.59961 11.5029 9.00294 11.0996 9.5 11.0996ZM14.5 11.0996C14.9971 11.0996 15.4004 11.5029 15.4004 12V14.5C15.4004 14.9971 14.9971 15.4004 14.5 15.4004C14.0029 15.4004 13.5996 14.9971 13.5996 14.5V12C13.5996 11.5029 14.0029 11.0996 14.5 11.0996ZM12 3.5C11.7239 3.5 11.5 3.72386 11.5 4C11.5 4.27614 11.7239 4.5 12 4.5C12.2761 4.5 12.5 4.27614 12.5 4C12.5 3.72386 12.2761 3.5 12 3.5Z",fill:"currentColor"},null,-1)])])}const G4e=wt({name:"kimi-robot",render:Z4e}),Q4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Y4e(e,t){return b(),I("svg",Q4e,[...t[0]||(t[0]=[C("path",{d:"M11.5 3C16.1944 3 20 6.80558 20 11.5C20 13.523 19.2933 15.381 18.1132 16.8404L21.1364 19.8636C21.4879 20.2151 21.4879 20.7849 21.1364 21.1364C20.7849 21.4879 20.2151 21.4879 19.8636 21.1364L16.8404 18.1132C15.381 19.2933 13.523 20 11.5 20C6.80558 20 3 16.1944 3 11.5C3 6.80558 6.80558 3 11.5 3ZM11.5 18.2C15.2003 18.2 18.2 15.2003 18.2 11.5C18.2 7.79969 15.2003 4.8 11.5 4.8C7.79969 4.8 4.8 7.79969 4.8 11.5C4.8 15.2003 7.79969 18.2 11.5 18.2Z",fill:"currentColor"},null,-1)])])}const J4e=wt({name:"kimi-search",render:Y4e}),X4e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e3e(e,t){return b(),I("svg",X4e,[...t[0]||(t[0]=[C("path",{d:"M16.5364 10.1636C16.8879 10.5151 16.8879 11.0849 16.5364 11.4364C16.1849 11.7879 15.6151 11.7879 15.2636 11.4364L12.9 9.07281V17.1C12.9 17.597 12.4971 18 12 18C11.503 18 11.1 17.597 11.1 17.1V9.07281L8.73641 11.4364C8.38494 11.7879 7.81509 11.7879 7.46362 11.4364C7.11214 11.0849 7.11214 10.5151 7.46362 10.1636L11.3636 6.2636C11.7151 5.91211 12.2849 5.91211 12.6364 6.2636L16.5364 10.1636Z",fill:"currentColor"},null,-1)])])}const t3e=wt({name:"kimi-send",render:e3e}),n3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function i3e(e,t){return b(),I("svg",n3e,[...t[0]||(t[0]=[C("path",{d:"M16.0404 12C16.0404 9.76874 14.2313 7.9596 12.0001 7.9596C9.76883 7.9596 7.95972 9.76874 7.95972 12C7.95972 14.2313 9.76883 16.0404 12.0001 16.0404C14.2313 16.0404 16.0404 14.2313 16.0404 12ZM14.2222 12C14.2222 13.2271 13.2271 14.2222 12 14.2222C10.7729 14.2222 9.77783 13.2271 9.77783 12C9.77783 10.7729 10.7729 9.77778 12 9.77778C13.2271 9.77778 14.2222 10.7729 14.2222 12Z",fill:"currentColor"},null,-1),C("path",{d:"M9.91145 21.8009C9.29001 21.6797 8.76914 21.2612 8.50632 20.6922L8.07372 19.7556C7.88838 19.3544 7.43553 19.1048 6.95371 19.1549L5.89572 19.2647C5.2733 19.3293 4.64823 19.114 4.22298 18.6611C3.74343 18.1504 3.32454 17.6037 2.97033 17.0181C2.61571 16.4318 2.32839 15.8106 2.10407 15.1566C1.89769 14.5549 2.02148 13.8954 2.4089 13.3902L3.0376 12.5704C3.30043 12.2277 3.30042 11.7722 3.03758 11.4295L2.40413 10.6035C2.01474 10.0958 1.891 9.43198 2.10208 8.82826C2.55037 7.54612 3.27017 6.35997 4.22 5.34259C4.64518 4.8872 5.27275 4.67067 5.89701 4.73544L6.95383 4.84514C7.43561 4.89515 7.88844 4.6456 8.07377 4.24441L8.50266 3.31593C8.76494 2.74818 9.28448 2.33019 9.90423 2.20761C11.2916 1.9332 12.7148 1.93127 14.0885 2.19913C14.7099 2.32029 15.2308 2.73881 15.4937 3.3078L15.9263 4.24441C16.1116 4.6456 16.5644 4.89514 17.0462 4.84514L18.1043 4.73532C18.7267 4.67072 19.3518 4.88603 19.777 5.33886C20.2566 5.84953 20.6755 6.3963 21.0297 6.98193C21.3843 7.56823 21.6716 8.18942 21.8959 8.84339C22.1023 9.44509 21.9785 10.1046 21.5911 10.6098L20.9624 11.4295C20.6996 11.7722 20.6996 12.2278 20.9624 12.5705L21.5959 13.3964C21.9853 13.9042 22.109 14.568 21.8979 15.1717C21.4497 16.4538 20.7299 17.6399 19.7801 18.6573C19.3549 19.1128 18.7273 19.3294 18.103 19.2646L17.0462 19.1549C16.5645 19.1049 16.1116 19.3544 15.9263 19.7556L15.4974 20.6841C15.2351 21.2518 14.7156 21.6698 14.0958 21.7924C12.7083 22.0668 11.2852 22.0687 9.91145 21.8009ZM13.7432 20.0088C13.7844 20.0006 13.8259 19.9673 13.847 19.9216L14.2758 18.9931C14.7915 17.8768 15.9886 17.2171 17.2341 17.3464L18.2909 17.4561C18.3649 17.4638 18.4272 17.4423 18.4512 17.4166C19.2296 16.5828 19.8171 15.6146 20.1817 14.5716C20.1845 14.5636 20.1796 14.5373 20.1532 14.5029L19.5198 13.677C18.7564 12.6815 18.7564 11.3185 19.5198 10.323L20.1485 9.5033C20.1746 9.46927 20.1795 9.4429 20.1762 9.43327C19.9932 8.89965 19.7603 8.39623 19.4741 7.92293C19.1873 7.4489 18.846 7.00333 18.4517 6.58351C18.4272 6.55739 18.3656 6.53616 18.2921 6.54378L17.234 6.65361C15.9886 6.78287 14.7915 6.12317 14.2758 5.00689L13.8432 4.07027C13.822 4.02448 13.7811 3.9916 13.7406 3.98371C12.5983 3.76097 11.4132 3.76258 10.2571 3.99124C10.2158 3.99941 10.1744 4.03271 10.1533 4.07842L9.72441 5.00689C9.20875 6.12317 8.01164 6.7829 6.76619 6.6536L5.70942 6.54391C5.63535 6.53623 5.573 6.55774 5.54905 6.5834C4.77067 7.41713 4.18312 8.38534 3.81845 9.42835C3.81564 9.43637 3.82054 9.46265 3.84693 9.49706L4.48038 10.323C5.24381 11.3185 5.24383 12.6815 4.48041 13.6769L3.85171 14.4967C3.82561 14.5307 3.82066 14.5571 3.82396 14.5667C4.00701 15.1004 4.23986 15.6038 4.52613 16.0771C4.81284 16.5511 5.15421 16.9967 5.54845 17.4165C5.57298 17.4426 5.63461 17.4638 5.70811 17.4562L6.76608 17.3464C8.01157 17.2171 9.20871 17.8768 9.72438 18.9932L10.157 19.9297C10.1781 19.9755 10.2191 20.0084 10.2595 20.0163C11.4018 20.239 12.587 20.2374 13.7432 20.0088Z",fill:"currentColor"},null,-1)])])}const s3e=wt({name:"kimi-setting",render:i3e}),o3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function r3e(e,t){return b(),I("svg",o3e,[...t[0]||(t[0]=[C("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7Z",fill:"currentColor"},null,-1),C("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),C("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1)])])}const l3e=wt({name:"kimi-shield-question",render:r3e}),a3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function u3e(e,t){return b(),I("svg",a3e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.90005 12C2.90005 11.503 3.303 11.1 3.80005 11.1H12.2939L9.38588 8.19197C9.03441 7.8405 9.03441 7.27065 9.38588 6.91918C9.73735 6.56771 10.3072 6.56771 10.6587 6.91918L15.1031 11.3636C15.2719 11.5324 15.3667 11.7613 15.3667 12C15.3667 12.2387 15.2719 12.4676 15.1031 12.6364L10.6587 17.0809C10.3072 17.4323 9.73735 17.4323 9.38588 17.0809C9.03441 16.7294 9.03441 16.1595 9.38588 15.8081L12.2939 12.9H3.80005C3.303 12.9 2.90005 12.4971 2.90005 12ZM13.5874 20C13.5874 19.503 13.9904 19.1 14.4874 19.1H18.043C18.2758 19.1 18.4991 19.0075 18.6637 18.8429C18.8283 18.6783 18.9208 18.455 18.9208 18.2222V5.7778C18.9208 5.545 18.8283 5.32174 18.6637 5.15712C18.499 4.9925 18.2758 4.90002 18.043 4.90002H14.4874C13.9904 4.90002 13.5874 4.49708 13.5874 4.00002C13.5874 3.50297 13.9904 3.10003 14.4874 3.10003H18.043C18.7532 3.10003 19.4343 3.38215 19.9365 3.88433C20.4386 4.38651 20.7208 5.06761 20.7208 5.7778V18.2222C20.7208 18.9324 20.4386 19.6135 19.9365 20.1157C19.4343 20.6179 18.7532 20.9 18.043 20.9H14.4874C13.9904 20.9 13.5874 20.4971 13.5874 20Z",fill:"currentColor"},null,-1)])])}const c3e=wt({name:"kimi-sign-in",render:u3e}),d3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f3e(e,t){return b(),I("svg",d3e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.6364 11.3636C20.9879 11.7151 20.9879 12.2849 20.6364 12.6364L16.1919 17.0808C15.8405 17.4323 15.2706 17.4323 14.9192 17.0808C14.5677 16.7293 14.5677 16.1595 14.9192 15.808L17.8272 12.9H9.33333C8.83627 12.9 8.43333 12.497 8.43333 12C8.43333 11.5029 8.83627 11.1 9.33333 11.1H17.8272L14.9192 8.19193C14.5677 7.84046 14.5677 7.27061 14.9192 6.91914C15.2706 6.56766 15.8405 6.56766 16.1919 6.91914L20.6364 11.3636ZM10.2333 3.99998C10.2333 4.49703 9.83038 4.89998 9.33333 4.89998H5.77777C5.54497 4.89998 5.3217 4.99246 5.15709 5.15707C4.99247 5.32169 4.89999 5.54495 4.89999 5.77775V18.2222C4.89999 18.455 4.99247 18.6783 5.15709 18.8429C5.32171 19.0075 5.54497 19.1 5.77777 19.1H9.33333C9.83038 19.1 10.2333 19.5029 10.2333 20C10.2333 20.497 9.83038 20.9 9.33333 20.9H5.77777C5.06758 20.9 4.38648 20.6179 3.8843 20.1157C3.38212 19.6135 3.09999 18.9324 3.09999 18.2222V5.77775C3.09999 5.06756 3.38212 4.38646 3.8843 3.88428C4.38648 3.3821 5.06758 3.09998 5.77777 3.09998H9.33333C9.83038 3.09998 10.2333 3.50292 10.2333 3.99998Z",fill:"currentColor"},null,-1)])])}const h3e=wt({name:"kimi-sign-out",render:f3e}),p3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g3e(e,t){return b(),I("svg",p3e,[...t[0]||(t[0]=[Lu('<path d="M4 6H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M18.0 6H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="16" cy="6" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle><path d="M4 12H6.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M10.5 12H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="8.5" cy="12" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle><path d="M4 18H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M18.0 18H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="16" cy="18" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle>',9)])])}const m3e=wt({name:"kimi-sliders",render:g3e}),v3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y3e(e,t){return b(),I("svg",v3e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.78027 8.90405C7.5 9.45411 7.5 10.1742 7.5 11.6144V12.3856C7.5 13.8258 7.5 14.5459 7.78027 15.096C8.02681 15.5798 8.42019 15.9732 8.90405 16.2197C9.45411 16.5 10.1742 16.5 11.6144 16.5H12.3856C13.8258 16.5 14.5459 16.5 15.096 16.2197C15.5798 15.9732 15.9732 15.5798 16.2197 15.096C16.5 14.5459 16.5 13.8258 16.5 12.3856V11.6144C16.5 10.1742 16.5 9.45411 16.2197 8.90405C15.9732 8.42019 15.5798 8.02681 15.096 7.78027C14.5459 7.5 13.8258 7.5 12.3856 7.5H11.6144C10.1742 7.5 9.45411 7.5 8.90405 7.78027C8.42019 8.02681 8.02681 8.42019 7.78027 8.90405Z",fill:"currentColor"},null,-1)])])}const b3e=wt({name:"kimi-stop",render:y3e}),k3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A3e(e,t){return b(),I("svg",k3e,[...t[0]||(t[0]=[C("path",{d:"M7.01562 3.41459C7.4446 3.16449 7.9954 3.30924 8.24609 3.73784C8.49645 4.167 8.35189 4.71868 7.92285 4.96928C5.51497 6.37506 3.90054 8.98498 3.90039 11.9703C3.90076 16.4435 7.52672 20.0699 12 20.0699C16.4733 20.0699 20.0992 16.4435 20.0996 11.9703C20.0996 11.2291 20 10.5116 19.8145 9.83159C19.6838 9.35222 19.967 8.85702 20.4463 8.72612C20.9256 8.59541 21.4207 8.87778 21.5518 9.35698C21.7792 10.1901 21.9004 11.0674 21.9004 11.9703C21.9 17.4376 17.4674 21.8697 12 21.8697C6.53261 21.8697 2.09998 17.4376 2.09961 11.9703C2.09976 8.31904 4.07782 5.12972 7.01562 3.41459ZM8.39258 8.24077C8.75015 7.89591 9.3199 7.90591 9.66504 8.26323C10.01 8.62076 9.99985 9.19051 9.64258 9.53569C9.00203 10.1541 8.60558 11.02 8.60547 11.979C8.60584 13.8536 10.1253 15.3736 12 15.3736C13.8746 15.3735 15.3942 13.8536 15.3945 11.979C15.3945 11.6847 15.3577 11.3989 15.2881 11.1285C15.1646 10.6474 15.4536 10.1568 15.9346 10.0328C16.4158 9.9089 16.9071 10.1991 17.0312 10.6802C17.1383 11.096 17.1943 11.5321 17.1943 11.979C17.194 14.8477 14.8688 17.1733 12 17.1734C9.1312 17.1734 6.80506 14.8478 6.80469 11.979C6.8048 10.5117 7.41519 9.18431 8.39258 8.24077ZM11.5459 1.12651C11.8216 0.965605 12.1631 0.963306 12.4414 1.11967L19.1953 4.91752C19.4859 5.08108 19.662 5.39277 19.6533 5.72612C19.6443 6.05972 19.4515 6.36154 19.1523 6.50932L12.9004 9.5933V12.2583C12.9004 12.7554 12.4971 13.1587 12 13.1587C11.5029 13.1587 11.0996 12.7554 11.0996 12.2583V1.90385C11.0999 1.58444 11.2702 1.2878 11.5459 1.12651ZM12.9004 7.58549L16.8252 5.64897L12.9004 3.44194V7.58549Z",fill:"currentColor"},null,-1)])])}const C3e=wt({name:"kimi-target",render:A3e}),w3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x3e(e,t){return b(),I("svg",w3e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.9893 6.60743C20.5897 6.60757 21.8877 7.8926 21.8877 9.47736C21.8877 10.7416 21.0607 11.8129 19.9141 12.1955V14.257C19.914 15.8428 18.6152 17.1288 17.0137 17.1289H12.8438V20.1381C12.8437 20.6301 12.4412 21.0293 11.9443 21.0296C11.4473 21.0296 11.044 20.6302 11.0439 20.1381V16.4356C11.0441 15.8343 11.5363 15.3461 12.1436 15.3458H17.0137C17.6211 15.3457 18.1133 14.8585 18.1133 14.257V12.2129C16.9408 11.8451 16.0909 10.7598 16.0908 9.47736C16.0908 7.89251 17.3887 6.60743 18.9893 6.60743ZM18.9893 8.38953C18.3828 8.38953 17.8906 8.87684 17.8906 9.47736C17.8907 10.0778 18.3828 10.5642 18.9893 10.5642C19.5956 10.5641 20.0869 10.0777 20.0869 9.47736C20.0869 8.87693 19.5956 8.38967 18.9893 8.38953Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.89844 6.60743C6.49899 6.60747 7.79688 7.89254 7.79688 9.47736C7.79684 10.7388 6.97371 11.8078 5.83105 12.1926V14.4021C5.83105 15.0036 6.32315 15.4918 6.93066 15.4918H8.37109C8.86789 15.492 9.27038 15.8905 9.27051 16.3824C9.27051 16.8744 8.86797 17.2737 8.37109 17.2739H6.93066C5.32904 17.2739 4.03027 15.9879 4.03027 14.4021V12.2158C2.85382 11.8504 2.00004 10.7627 2 9.47736C2 7.89251 3.29784 6.60743 4.89844 6.60743ZM4.89844 8.38953C4.29196 8.38953 3.7998 8.87684 3.7998 9.47736C3.79985 10.0778 4.29198 10.5642 4.89844 10.5642C5.50485 10.5642 5.99605 10.0778 5.99609 9.47736C5.99609 8.87687 5.50488 8.38958 4.89844 8.38953Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.9434 2.9707C13.5439 2.97075 14.8418 4.25581 14.8418 5.84063C14.8418 7.11413 14.0035 8.1923 12.8438 8.56745V13.0135C12.8436 13.5056 12.4403 13.9041 11.9434 13.9041C11.4466 13.9039 11.0431 13.5055 11.043 13.0135V8.56745C9.8836 8.19209 9.04496 7.11387 9.04492 5.84063C9.04492 4.25592 10.343 2.97093 11.9434 2.9707ZM11.9434 4.75281C11.3371 4.75303 10.8447 5.24026 10.8447 5.84063C10.8448 6.44097 11.3371 6.92726 11.9434 6.92749C12.5498 6.92745 13.041 6.44108 13.041 5.84063C13.041 5.24014 12.5498 4.75285 11.9434 4.75281Z",fill:"currentColor"},null,-1)])])}const _3e=wt({name:"kimi-task",render:x3e}),S3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M3e(e,t){return b(),I("svg",S3e,[...t[0]||(t[0]=[C("path",{d:"M16.5293 15.0596C16.9496 15.1021 17.2772 15.4572 17.2773 15.8887C17.2773 16.3202 16.9497 16.6753 16.5293 16.7178L16.4443 16.7217H12C11.5399 16.7216 11.167 16.3488 11.167 15.8887C11.1671 15.4286 11.54 15.0558 12 15.0557H16.4443L16.5293 15.0596Z",fill:"currentColor"},null,-1),C("path",{d:"M6.96582 7.52246C7.27077 7.21751 7.75375 7.1983 8.08105 7.46484L8.14453 7.52246L10.8232 10.2002C11.5102 10.8872 11.5102 12.0014 10.8232 12.6885L8.14453 15.3672L8.08105 15.4248C7.75377 15.6913 7.27075 15.6721 6.96582 15.3672C6.66114 15.0621 6.64234 14.5791 6.90918 14.252L6.96582 14.1885L9.64453 11.5098C9.68057 11.4736 9.68062 11.415 9.64453 11.3789L6.96582 8.7002C6.64116 8.37488 6.6411 7.84774 6.96582 7.52246Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 3.09961C19.1539 3.09966 20.9004 4.84612 20.9004 7V17C20.9004 19.1539 19.1539 20.9003 17 20.9004H7C4.84609 20.9004 3.09961 19.1539 3.09961 17V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H17ZM7 4.90039C5.8402 4.90039 4.90039 5.8402 4.90039 7V17C4.90039 18.1598 5.8402 19.0996 7 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V7C19.0996 5.84024 18.1598 4.90044 17 4.90039H7Z",fill:"currentColor"},null,-1)])])}const I3e=wt({name:"kimi-terminal",render:M3e}),E3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T3e(e,t){return b(),I("svg",E3e,[...t[0]||(t[0]=[C("path",{d:"M16.9971 3.90597C15.9799 2.99725 14.7342 2.38312 13.394 2.12966C12.0538 1.8762 10.6699 1.99301 9.39111 2.46751C8.11236 2.94202 6.98721 3.75626 6.13676 4.82261C5.2863 5.88896 4.74274 7.16703 4.56457 8.5193C4.40455 9.70501 4.53253 10.9118 4.93767 12.0376C5.34281 13.1634 6.01318 14.175 6.89207 14.9868C7.43557 15.4634 7.87413 16.0477 8.17997 16.7027C8.48581 17.3577 8.65224 18.0691 8.66873 18.7918V18.926C8.66962 19.7412 8.99387 20.5229 9.57035 21.0993C10.1468 21.6758 10.9285 22.0001 11.7437 22.001H12.2604C13.0757 22.0001 13.8573 21.6758 14.4338 21.0993C15.0103 20.5229 15.3345 19.7412 15.3354 18.926V18.4685C15.3479 17.8297 15.4982 17.2011 15.7761 16.6258C16.0539 16.0505 16.4528 15.542 16.9454 15.1351C17.7442 14.4355 18.3853 13.5741 18.826 12.608C19.2668 11.642 19.4973 10.5932 19.5022 9.53136C19.5071 8.46948 19.2863 7.41869 18.8544 6.4486C18.4225 5.4785 17.7894 4.61125 16.9971 3.9043V3.90597ZM12.2604 20.3343H11.7437C11.3704 20.3339 11.0124 20.1853 10.7484 19.9213C10.4844 19.6573 10.3358 19.2993 10.3354 18.926C10.3354 18.926 10.3296 18.7093 10.3287 18.6676H13.6687V18.926C13.6683 19.2993 13.5198 19.6573 13.2558 19.9213C12.9917 20.1853 12.6338 20.3339 12.2604 20.3343ZM15.8437 13.8835C14.8949 14.7064 14.2097 15.7908 13.8737 17.001H12.8354V11.0143C13.3212 10.8426 13.742 10.5249 14.0403 10.1049C14.3387 9.68482 14.4999 9.18285 14.5021 8.66763C14.5021 8.44662 14.4143 8.23466 14.258 8.07838C14.1017 7.9221 13.8897 7.8343 13.6687 7.8343C13.4477 7.8343 13.2358 7.9221 13.0795 8.07838C12.9232 8.23466 12.8354 8.44662 12.8354 8.66763C12.8354 8.88865 12.7476 9.10061 12.5913 9.25689C12.435 9.41317 12.2231 9.50097 12.0021 9.50097C11.7811 9.50097 11.5691 9.41317 11.4128 9.25689C11.2565 9.10061 11.1687 8.88865 11.1687 8.66763C11.1687 8.44662 11.0809 8.23466 10.9247 8.07838C10.7684 7.9221 10.5564 7.8343 10.3354 7.8343C10.1144 7.8343 9.90242 7.9221 9.74614 8.07838C9.58986 8.23466 9.50207 8.44662 9.50207 8.66763C9.5042 9.18285 9.66547 9.68482 9.96381 10.1049C10.2621 10.5249 10.683 10.8426 11.1687 11.0143V17.001H10.0671C9.69123 15.7586 8.98633 14.6411 8.02707 13.7668C7.21286 13.0081 6.63267 12.0324 6.35496 10.9547C6.07725 9.87703 6.1136 8.7424 6.45974 7.68471C6.80588 6.62702 7.44735 5.69042 8.30846 4.98543C9.16956 4.28045 10.2144 3.83649 11.3196 3.70597C11.5487 3.68039 11.779 3.66759 12.0096 3.66763C13.4409 3.66338 14.8226 4.19149 15.8862 5.1493C16.5026 5.69896 16.9952 6.37337 17.3312 7.12782C17.6672 7.88227 17.839 8.69952 17.8352 9.5254C17.8314 10.3513 17.6522 11.1669 17.3092 11.9183C16.9663 12.6696 16.4677 13.3395 15.8462 13.8835H15.8437Z",fill:"currentColor"},null,-1)])])}const L3e=wt({name:"kimi-thinking",render:T3e}),N3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F3e(e,t){return b(),I("svg",N3e,[...t[0]||(t[0]=[Lu('<path d="M9.28994 4.92561C9.6436 4.57634 9.64716 4.0065 9.29789 3.65284C8.94862 3.29918 8.37878 3.29563 8.02512 3.6449L5.91339 5.73041L5.16642 4.95888C4.82067 4.60177 4.2509 4.59256 3.89379 4.9383C3.53668 5.28404 3.52747 5.85382 3.87321 6.21093L5.25245 7.63551C5.41956 7.80811 5.64874 7.90674 5.88897 7.90943C6.1292 7.91213 6.36053 7.81866 6.53146 7.64985L9.28994 4.92561Z" fill="currentColor"></path><path d="M12 5.10022C11.503 5.10022 11.1 5.50316 11.1 6.00022C11.1 6.49728 11.503 6.90022 12 6.90022L19.9965 6.90022C20.4935 6.90022 20.8965 6.49728 20.8965 6.00022C20.8965 5.50316 20.4935 5.10022 19.9965 5.10022L12 5.10022Z" fill="currentColor"></path><path d="M12 11.1002C11.503 11.1002 11.1 11.5032 11.1 12.0002C11.1 12.4973 11.503 12.9002 12 12.9002H19.9965C20.4935 12.9002 20.8965 12.4973 20.8965 12.0002C20.8965 11.5032 20.4935 11.1002 19.9965 11.1002L12 11.1002Z" fill="currentColor"></path><path d="M11.1 18.0002C11.1 17.5032 11.503 17.1002 12 17.1002L19.9965 17.1002C20.4935 17.1002 20.8965 17.5032 20.8965 18.0002C20.8965 18.4973 20.4935 18.9002 19.9965 18.9002H12C11.503 18.9002 11.1 18.4973 11.1 18.0002Z" fill="currentColor"></path><path d="M9.29789 9.77064C9.64716 10.1243 9.6436 10.6941 9.28994 11.0434L6.53146 13.7676C6.36053 13.9365 6.1292 14.0299 5.88897 14.0272C5.64874 14.0245 5.41956 13.9259 5.25245 13.7533L3.87321 12.3287C3.52747 11.9716 3.53668 11.4018 3.89379 11.0561C4.2509 10.7104 4.82067 10.7196 5.16642 11.0767L5.91339 11.8482L8.02512 9.76269C8.37878 9.41342 8.94862 9.41698 9.29789 9.77064Z" fill="currentColor"></path><path d="M9.29789 15.7436C9.64716 16.0973 9.6436 16.6671 9.28994 17.0164L6.53146 19.7406C6.36053 19.9094 6.1292 20.0029 5.88897 20.0002C5.64874 19.9975 5.41956 19.8989 5.25245 19.7263L3.87321 18.3017C3.52747 17.9446 3.53668 17.3748 3.89379 17.0291C4.2509 16.6833 4.82067 16.6926 5.16642 17.0497L5.91339 17.8212L8.02512 15.7357C8.37878 15.3864 8.94862 15.39 9.29789 15.7436Z" fill="currentColor"></path>',6)])])}const B3e=wt({name:"kimi-todo",render:F3e}),$3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D3e(e,t){return b(),I("svg",$3e,[...t[0]||(t[0]=[C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.09752 2.19507C8.5421 1.97278 9.08271 2.15298 9.305 2.59756L10.0562 4.10005H13.5C13.9971 4.10005 14.4 4.50299 14.4 5.00005C14.4 5.49711 13.9971 5.90005 13.5 5.90005H12.3106C12.2556 6.2319 12.1667 6.64073 12.0226 7.0987C11.7254 8.04355 11.191 9.20402 10.2334 10.3239C11.4166 11.196 12.5606 11.7524 13.4512 12.0987C13.978 12.3036 14.4136 12.434 14.7124 12.5122L14.7348 12.5181L15.695 10.5976C15.8475 10.2927 16.1591 10.1 16.5 10.1C16.8409 10.1 17.1525 10.2927 17.305 10.5976L20.7969 17.5814L20.8044 17.5959L20.8137 17.615L21.805 19.5976C22.0273 20.0421 21.8471 20.5827 21.4025 20.805C20.9579 21.0273 20.4173 20.8471 20.195 20.4025L19.4438 18.9H13.5562L12.805 20.4025C12.5827 20.8471 12.0421 21.0273 11.5975 20.805C11.1529 20.5827 10.9727 20.0421 11.195 19.5976L12.1863 17.615C12.1917 17.6036 12.1973 17.5924 12.2031 17.5814L13.9146 14.1583C13.6034 14.0667 13.2256 13.9423 12.7988 13.7764C11.7294 13.3605 10.3442 12.6802 8.92538 11.5924C7.79753 12.5167 6.69473 13.0764 5.83285 13.4112C5.33899 13.603 4.92286 13.7216 4.62401 13.7931C4.47449 13.8288 4.35399 13.8529 4.26741 13.8684C4.2241 13.8762 4.18924 13.8818 4.16343 13.8858L4.13156 13.8904L4.12084 13.8919L4.11682 13.8924L4.11514 13.8927C4.11514 13.8927 4.11368 13.8928 4.00001 13L4.11368 13.8928C3.62061 13.9556 3.17 13.6068 3.10722 13.1137C3.0446 12.6219 3.39148 12.1723 3.88256 12.1077L3.94947 12.0967C4.00428 12.0869 4.09114 12.0698 4.20543 12.0424C4.43422 11.9877 4.77156 11.8924 5.18106 11.7334C5.84103 11.477 6.68484 11.0564 7.56458 10.3753C7.15054 9.93496 6.78945 9.48388 6.50421 9.10102C6.26672 8.78224 6.07517 8.50172 5.94227 8.29973C5.87571 8.19858 5.82359 8.11671 5.78748 8.05909C5.76942 8.03027 5.75535 8.00749 5.74545 7.99135L5.73377 7.9722L5.73032 7.96651L5.72864 7.96371C5.71133 7.9349 5.69582 7.9055 5.68208 7.87566C5.49265 7.46416 5.6393 6.96717 6.03659 6.72853C6.09037 6.69623 6.14617 6.6702 6.20315 6.65023C6.59739 6.51205 7.04758 6.66421 7.27129 7.03623L7.27266 7.0385L7.28001 7.05054C7.28695 7.06186 7.29793 7.07964 7.31274 7.10328C7.34239 7.15059 7.38731 7.2212 7.44595 7.31032C7.56343 7.48886 7.73484 7.73997 7.94765 8.02562C8.21085 8.37889 8.52772 8.77187 8.8756 9.14201C9.64226 8.24147 10.0681 7.3133 10.3056 6.55854C10.381 6.3186 10.4372 6.09683 10.4791 5.90005H9.51951C9.50696 5.90031 9.49442 5.90031 9.48191 5.90005H4.00001C3.50296 5.90005 3.10001 5.49711 3.10001 5.00005C3.10001 4.50299 3.50296 4.10005 4.00001 4.10005H8.04378L7.69503 3.40254C7.67314 3.35877 7.65516 3.31407 7.64094 3.26883C7.51078 2.8546 7.69671 2.39547 8.09752 2.19507ZM16.5 13.0125L18.5438 17.1H14.4562L16.5 13.0125Z",fill:"currentColor"},null,-1),C("path",{d:"M15.1 4.00007C15.1 3.50301 15.5029 3.10007 16 3.10007H18C19.6016 3.10007 20.9 4.39844 20.9 6.00007V8.00007C20.9 8.49712 20.497 8.90007 20 8.90007C19.5029 8.90007 19.1 8.49712 19.1 8.00007V6.00007C19.1 5.39255 18.6075 4.90007 18 4.90007H16C15.5029 4.90007 15.1 4.49712 15.1 4.00007Z",fill:"currentColor"},null,-1),C("path",{d:"M3.99998 15.1001C4.49703 15.1001 4.89998 15.503 4.89998 16.0001V18.0001C4.89998 18.6076 5.39246 19.1001 5.99998 19.1001H7.99998C8.49703 19.1001 8.89998 19.503 8.89998 20.0001C8.89998 20.4971 8.49703 20.9001 7.99998 20.9001H5.99998C4.39835 20.9001 3.09998 19.6017 3.09998 18.0001V16.0001C3.09998 15.503 3.50292 15.1001 3.99998 15.1001Z",fill:"currentColor"},null,-1)])])}const R3e=wt({name:"kimi-translate",render:D3e}),z3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O3e(e,t){return b(),I("svg",z3e,[...t[0]||(t[0]=[C("path",{d:"M8.10001 3C8.10001 2.50294 8.50295 2.1 9.00001 2.1H15C15.4971 2.1 15.9 2.50294 15.9 3C15.9 3.49706 15.4971 3.9 15 3.9H9.00001C8.50295 3.9 8.10001 3.49706 8.10001 3Z",fill:"currentColor"},null,-1),C("path",{d:"M10 15.9C9.50295 15.9 9.10001 15.4971 9.10001 15L9.10001 10C9.10001 9.50294 9.50295 9.1 10 9.1C10.4971 9.1 10.9 9.50294 10.9 10L10.9 15C10.9 15.4971 10.4971 15.9 10 15.9Z",fill:"currentColor"},null,-1),C("path",{d:"M13.1 15C13.1 15.4971 13.5029 15.9 14 15.9C14.4971 15.9 14.9 15.4971 14.9 15L14.9 10C14.9 9.50294 14.4971 9.1 14 9.1C13.5029 9.1 13.1 9.50294 13.1 10V15Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.10001 6C2.10001 5.50294 2.50295 5.1 3.00001 5.1H4.99152C4.99785 5.09993 5.00417 5.09993 5.01048 5.1H18.9895C18.9958 5.09993 19.0021 5.09993 19.0085 5.1H21C21.4971 5.1 21.9 5.50294 21.9 6C21.9 6.49706 21.4971 6.9 21 6.9H19.8281L18.8448 18.6993C18.7412 19.9432 17.7013 20.9 16.4531 20.9H7.54686C6.29865 20.9 5.25881 19.9432 5.15515 18.6993L4.17188 6.9H3.00001C2.50295 6.9 2.10001 6.49706 2.10001 6ZM5.97811 6.9L18.0219 6.9L17.0511 18.5498C17.0251 18.8608 16.7652 19.1 16.4531 19.1H7.54686C7.23481 19.1 6.97485 18.8608 6.94893 18.5498L5.97811 6.9Z",fill:"currentColor"},null,-1)])])}const P3e=wt({name:"kimi-trash",render:O3e}),j3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H3e(e,t){return b(),I("svg",j3e,[...t[0]||(t[0]=[C("path",{d:"M7.36336 3.3634C7.71483 3.01192 8.28533 3.01192 8.6368 3.3634C8.98817 3.71488 8.98824 4.2854 8.6368 4.63683L6.17391 7.09972H15.0001C18.2585 7.09977 20.9005 9.74166 20.9005 13.0001C20.9004 16.2585 18.2585 18.9005 15.0001 18.9005H7.00008C6.50307 18.9005 6.09976 18.4971 6.09969 18.0001C6.09969 17.5031 6.50302 17.0997 7.00008 17.0997H15.0001C17.2644 17.0997 19.0996 15.2644 19.0997 13.0001C19.0997 10.7358 17.2644 8.90055 15.0001 8.90051H6.17391L8.6368 11.3634L8.69832 11.4318C8.98668 11.7853 8.96632 12.3073 8.6368 12.6368C8.30728 12.9663 7.78521 12.9867 7.43172 12.6984L7.36336 12.6368L3.36336 8.63683C3.33098 8.60445 3.30286 8.56908 3.27645 8.53332C3.25597 8.50559 3.23607 8.47741 3.21883 8.44738C3.20492 8.42311 3.19221 8.39837 3.18074 8.37316C3.1764 8.36365 3.17109 8.35453 3.16707 8.34484C3.1627 8.33427 3.1593 8.32331 3.15535 8.31261C3.12946 8.24274 3.11237 8.16872 3.10457 8.09191C3.09258 7.97426 3.10262 7.85446 3.1368 7.74035C3.14281 7.72035 3.15094 7.70114 3.15828 7.68176C3.16165 7.67283 3.16341 7.66325 3.16707 7.65441C3.17216 7.64216 3.17806 7.63025 3.18367 7.61828C3.19055 7.60356 3.19744 7.58874 3.20516 7.57433C3.24709 7.49624 3.3012 7.42556 3.36336 7.3634L7.36336 3.3634Z",fill:"currentColor"},null,-1)])])}const W3e=wt({name:"kimi-undo",render:H3e}),q3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U3e(e,t){return b(),I("svg",q3e,[...t[0]||(t[0]=[C("path",{d:"M11.9997 12.8779C16.0197 12.878 19.4393 15.3848 20.7048 18.8828C21.0812 19.9234 20.2782 20.8962 19.2038 21.0137L18.9861 21.0264H5.0134L4.79562 21.0137C3.7213 20.8961 2.91743 19.9233 3.29367 18.8828C4.55905 15.3847 7.9797 12.8781 11.9997 12.8779ZM11.9997 14.6777C8.84467 14.6779 6.17462 16.5794 5.09152 19.2256H18.9079C17.8248 16.5793 15.1549 14.6778 11.9997 14.6777ZM12.2312 3.00586C14.6088 3.1264 16.4997 5.09239 16.4997 7.5L16.4939 7.73145C16.3734 10.1091 14.4073 11.9999 11.9997 12C9.59225 11.9998 7.62604 10.109 7.50558 7.73145L7.49973 7.5C7.49973 5.01485 9.51462 3.00021 11.9997 3L12.2312 3.00586ZM11.9997 4.7998C10.5087 4.80001 9.29953 6.00896 9.29953 7.5C9.29953 8.99104 10.5087 10.2 11.9997 10.2002C13.4908 10.2001 14.6999 8.99112 14.6999 7.5C14.6999 6.00888 13.4908 4.79989 11.9997 4.7998Z",fill:"currentColor"},null,-1)])])}const K3e=wt({name:"kimi-user",render:U3e}),V3e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Z3e(e,t){return b(),I("svg",V3e,[...t[0]||(t[0]=[C("path",{d:"M11.9996 7C11.5026 7 11.0996 7.36985 11.0996 7.82609V14.1739C11.0996 14.6301 11.5026 15 11.9996 15C12.4967 15 12.8996 14.6301 12.8996 14.1739V7.82609C12.8996 7.36985 12.4967 7 11.9996 7Z",fill:"currentColor"},null,-1),C("path",{d:"M12.8996 17.1006C12.8996 17.5974 12.4968 18.001 11.9992 18.001C11.5024 18.001 11.0996 17.5974 11.0996 17.1006C11.0996 16.6038 11.5024 16.2002 11.9992 16.2002C12.4968 16.2002 12.8996 16.6038 12.8996 17.1006Z",fill:"currentColor"},null,-1),C("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.5108 3.5501C13.3946 1.61676 10.6041 1.61676 9.48786 3.5501L1.69363 17.0501C0.577423 18.9834 1.97269 21.4001 4.20511 21.4001H19.7936C22.026 21.4001 23.4212 18.9834 22.305 17.0501L14.5108 3.5501ZM11.0467 4.4501C11.4701 3.71676 12.5286 3.71676 12.952 4.4501L20.7462 17.9501C21.1696 18.6834 20.6403 19.6001 19.7936 19.6001H4.20511C3.35833 19.6001 2.82909 18.6834 3.25248 17.9501L11.0467 4.4501Z",fill:"currentColor"},null,-1)])])}const G3e=wt({name:"kimi-warning",render:Z3e}),Q3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Y3e(e,t){return b(),I("svg",Q3e,[...t[0]||(t[0]=[C("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[C("path",{d:"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm11-2v16"}),C("path",{d:"m9 10l2 2l-2 2"})],-1)])])}const J3e=wt({name:"tabler-layout-sidebar-right-collapse",render:Y3e}),X3e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function e8e(e,t){return b(),I("svg",X3e,[...t[0]||(t[0]=[C("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3L18 10a3 3 0 0 0-6-6l-6.5 6.5a4.5 4.5 0 0 0 9 9L21 13"},null,-1)])])}const t8e=wt({name:"tabler-paperclip",render:e8e}),n8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function i8e(e,t){return b(),I("svg",n8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12A2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3m16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5"},null,-1)])])}const s8e=wt({name:"ri-braces-line",render:i8e}),o8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function r8e(e,t){return b(),I("svg",o8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M9 3V1H7v2H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-4V1h-2v2zm-5 7h16v9H4zm0-5h3v1h2V5h6v1h2V5h3v3H4zm5.879 5.964L12 13.086l2.121-2.122l1.415 1.415l-2.122 2.121l2.121 2.121l-1.414 1.414L12 15.915l-2.121 2.12l-1.415-1.414l2.122-2.12l-2.122-2.122z"},null,-1)])])}const l8e=wt({name:"ri-calendar-close-line",render:r8e}),a8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function u8e(e,t){return b(),I("svg",a8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M7 3V1h2v2h6V1h2v2h4a1 1 0 0 1 1 1v5h-2V5h-3v2h-2V5H9v2H7V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm10 9a4 4 0 1 0 0 8a4 4 0 0 0 0-8m-6 4a6 6 0 1 1 12 0a6 6 0 0 1-12 0m5-3v3.414l2.293 2.293l1.414-1.414L18 15.586V13z"},null,-1)])])}const c8e=wt({name:"ri-calendar-schedule-line",render:u8e}),d8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function f8e(e,t){return b(),I("svg",d8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1zm11 10H4v8h16zM8 14v2H6v-2zm10 0v2h-8v-2zM7 5H4v4h16V5h-3v2h-2V5H9v2H7z"},null,-1)])])}const h8e=wt({name:"ri-calendar-todo-line",render:f8e}),p8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function g8e(e,t){return b(),I("svg",p8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m23 12l-7.071 7.071l-1.414-1.414L20.172 12l-5.657-5.657l1.414-1.414zM3.828 12l5.657 5.657l-1.414 1.414L1 12l7.071-7.071l1.414 1.414z"},null,-1)])])}const m8e=wt({name:"ri-code-line",render:g8e}),v8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function y8e(e,t){return b(),I("svg",v8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-4-7h8a4 4 0 0 1-8 0m0-2a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8 0a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3"},null,-1)])])}const b8e=wt({name:"ri-emotion-line",render:y8e}),k8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function A8e(e,t){return b(),I("svg",k8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z"},null,-1)])])}const C8e=wt({name:"ri-external-link-line",render:A8e}),w8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function x8e(e,t){return b(),I("svg",w8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M12 3c5.392 0 9.878 3.88 10.819 9c-.94 5.12-5.427 9-10.819 9s-9.878-3.88-10.818-9C2.122 6.88 6.608 3 12 3m0 16a9.005 9.005 0 0 0 8.778-7a9.005 9.005 0 0 0-17.555 0A9.005 9.005 0 0 0 12 19m0-2.5a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5"},null,-1)])])}const _8e=wt({name:"ri-eye-line",render:x8e}),S8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function M8e(e,t){return b(),I("svg",S8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M17.883 19.297A10.95 10.95 0 0 1 12 21c-5.392 0-9.878-3.88-10.818-9A11 11 0 0 1 4.52 5.935L1.394 2.808l1.414-1.414l19.799 19.798l-1.414 1.415zM5.936 7.35A8.97 8.97 0 0 0 3.223 12a9.005 9.005 0 0 0 13.201 5.838l-2.028-2.028A4.5 4.5 0 0 1 8.19 9.604zm6.978 6.978l-3.242-3.241a2.5 2.5 0 0 0 3.241 3.241m7.893 2.265l-1.431-1.431A8.9 8.9 0 0 0 20.778 12A9.005 9.005 0 0 0 9.552 5.338L7.974 3.76C9.221 3.27 10.58 3 12 3c5.392 0 9.878 3.88 10.819 9a10.95 10.95 0 0 1-2.012 4.593m-9.084-9.084Q11.86 7.5 12 7.5a4.5 4.5 0 0 1 4.492 4.778z"},null,-1)])])}const I8e=wt({name:"ri-eye-off-line",render:M8e}),E8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function T8e(e,t){return b(),I("svg",E8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M15 4H5v16h14V8h-4zM3 2.992C3 2.444 3.447 2 3.999 2H16l5 5v13.993A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008zM11 11V8h2v3h3v2h-3v3h-2v-3H8v-2z"},null,-1)])])}const L8e=wt({name:"ri-file-add-line",render:T8e}),N8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function F8e(e,t){return b(),I("svg",N8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"},null,-1)])])}const B8e=wt({name:"ri-flashlight-line",render:F8e}),$8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function D8e(e,t){return b(),I("svg",$8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])}const R8e=wt({name:"ri-folder-fill",render:D8e}),z8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function O8e(e,t){return b(),I("svg",z8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2M3 6a3 3 0 1 1 4 2.83V9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-.17a3.001 3.001 0 1 1 2 0V9a4 4 0 0 1-4 4h-2v2.17a3.001 3.001 0 1 1-2 0V13H9a4 4 0 0 1-4-4v-.17A3 3 0 0 1 3 6m15-1a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-6 12a1 1 0 1 0 0 2a1 1 0 0 0 0-2"},null,-1)])])}const P8e=wt({name:"ri-git-fork-line",render:O8e}),j8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function H8e(e,t){return b(),I("svg",j8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M15 5h2a2 2 0 0 1 2 2v8.17a3.001 3.001 0 1 1-2 0V7h-2v3l-4.5-4L15 2zM5 8.83a3.001 3.001 0 1 1 2 0v6.34a3.001 3.001 0 1 1-2 0zM6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 12a1 1 0 1 0 0-2a1 1 0 0 0 0 2m12 0a1 1 0 1 0 0-2a1 1 0 0 0 0 2"},null,-1)])])}const W8e=wt({name:"ri-git-pull-request-line",render:H8e}),q8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function U8e(e,t){return b(),I("svg",q8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M2 18h7v2H2zm0-7h9v2H2zm0-7h20v2H2zm18.674 9.025l1.156-.391l1 1.732l-.916.805a4 4 0 0 1 0 1.658l.916.805l-1 1.732l-1.156-.391a4 4 0 0 1-1.435.83L19 21h-2l-.24-1.196a4 4 0 0 1-1.434-.83l-1.156.392l-1-1.732l.916-.805a4 4 0 0 1 0-1.658l-.916-.805l1-1.732l1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196a4 4 0 0 1 1.434.83M18 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4"},null,-1)])])}const K8e=wt({name:"ri-list-settings-line",render:U8e}),V8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Z8e(e,t){return b(),I("svg",V8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M10 2a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H8v2h5V9a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H8v6h5v-1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H7a1 1 0 0 1-1-1V8H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm9 16h-4v2h4zm0-8h-4v2h4zM9 4H5v2h4z"},null,-1)])])}const G8e=wt({name:"ri-node-tree",render:Z8e}),Q8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Y8e(e,t){return b(),I("svg",Q8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m13.827 1.69l8.486 8.485l-1.415 1.414l-.707-.707l-4.242 4.243l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243l1.414-1.414l3.536-.707l4.242-4.243l-.707-.707zm.707 3.536l-4.67 4.67l-2.822.565l6.5 6.5l.564-2.822l4.671-4.67z"},null,-1)])])}const J8e=wt({name:"ri-pushpin-line",render:Y8e}),X8e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function e5e(e,t){return b(),I("svg",X8e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const t5e=wt({name:"ri-sort-desc",render:e5e}),n5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function i5e(e,t){return b(),I("svg",n5e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928z"},null,-1)])])}const s5e=wt({name:"ri-star-fill",render:i5e}),o5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function r5e(e,t){return b(),I("svg",o5e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928zm0-2.292l4.247 2.377l-.948-4.773l3.573-3.305l-4.833-.573l-2.038-4.419l-2.039 4.42l-4.833.572l3.573 3.305l-.948 4.773z"},null,-1)])])}const l5e=wt({name:"ri-star-line",render:r5e}),a5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function u5e(e,t){return b(),I("svg",a5e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"M5.33 3.272a3.5 3.5 0 0 1 4.254 4.962l10.709 10.71l-1.414 1.414l-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 0 0 2.121-2.121zm10.367 1.883l3.182-1.768l1.414 1.415l-1.768 3.182l-1.768.353l-2.12 2.121l-1.415-1.414l2.121-2.121zm-6.718 8.132l1.415 1.414l-5.304 5.303a1 1 0 0 1-1.492-1.327l.078-.087z"},null,-1)])])}const c5e=wt({name:"ri-tools-line",render:u5e}),d5e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function f5e(e,t){return b(),I("svg",d5e,[...t[0]||(t[0]=[C("path",{fill:"currentColor",d:"m20.97 17.172l-1.414 1.414l-3.535-3.535l-.073.074l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243L5.34 8.761l3.536-.707l.073-.074l-3.536-3.536L6.828 3.03zM10.365 9.394l-.502.502l-2.822.565l6.5 6.5l.564-2.822l.502-.502zm8.411.074l-1.34 1.34l1.414 1.415l1.34-1.34l.707.707l1.415-1.415l-8.486-8.485l-1.414 1.414l.707.707l-1.34 1.34l1.414 1.415l1.34-1.34z"},null,-1)])])}const h5e=wt({name:"ri-unpin-line",render:f5e}),p5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M12.0684 2.03418C12.5654 2.03421 12.9687 2.43755 12.9688 2.93457V11.0996H21.0654C21.5625 11.0996 21.9658 11.503 21.9658 12C21.9658 12.497 21.5625 12.9004 21.0654 12.9004H12.9688V21.0654C12.9687 21.5624 12.5654 21.9658 12.0684 21.9658C11.5713 21.9658 11.168 21.5625 11.168 21.0654V12.9004H2.93457C2.43751 12.9004 2.03418 12.4971 2.03418 12C2.03418 11.5029 2.43751 11.0996 2.93457 11.0996H11.168V2.93457C11.168 2.43753 11.5713 2.03418 12.0684 2.03418Z" fill="currentColor"/> -</svg> -`,g5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> - <path id="p0" d="M 0 -9.9 C -5.468 -9.9 -9.9 -5.468 -9.9 0 C -9.9 1.923 -9.351 3.719 -8.402 5.239 C -8.402 5.239 -9.483 7.821 -9.483 7.821 C -9.896 8.809 -9.171 9.9 -8.099 9.9 C -8.099 9.9 0 9.9 0 9.9 C 5.468 9.9 9.9 5.468 9.9 0 C 9.9 -5.468 5.468 -9.9 0 -9.9 Z M -8.1 0 C -8.1 -4.474 -4.474 -8.1 0 -8.1 C 4.473 -8.1 8.1 -4.474 8.1 0 C 8.1 4.473 4.473 8.1 -0.001 8.1 C -0.001 8.1 -7.648 8.1 -7.648 8.1 L -6.365 5.035 C -6.365 5.035 -6.648 4.629 -6.648 4.629 C -7.563 3.317 -8.1 1.723 -8.1 0 Z" transform="matrix(1 0 0 1 12 12)" fill="currentColor" fill-rule="evenodd"/> - <path id="p1" d="M 3.6 0.5 L -2.6 0.5 M 0.5 -2.573 L 0.5 3.573" transform="translate(11.5 11.5)" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/> -</svg> -`,m5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M15.0996 12C15.5967 12 16 12.4033 16 12.9004C15.9998 13.3973 15.5965 13.7998 15.0996 13.7998H8.90039C8.40346 13.7998 8.00021 13.3973 8 12.9004C8 12.4033 8.40333 12 8.90039 12H15.0996Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M19 3.2002C20.5464 3.2002 21.7998 4.4536 21.7998 6V7C21.7998 8.03565 21.2363 8.93754 20.4004 9.42188V17C20.4004 19.1539 18.6539 20.9004 16.5 20.9004H7.5C5.34609 20.9004 3.59961 19.1539 3.59961 17V9.42188C2.76374 8.93754 2.2002 8.03565 2.2002 7V6C2.2002 4.4536 3.4536 3.2002 5 3.2002H19ZM5.40039 17C5.40039 18.1598 6.3402 19.0996 7.5 19.0996H16.5C17.6598 19.0996 18.5996 18.1598 18.5996 17V9.7998H5.40039V17ZM4.89746 5.00488C4.39333 5.05621 4 5.48232 4 6V7L4.00488 7.10254C4.05278 7.57297 4.42703 7.94722 4.89746 7.99512L5 8H19C19.5523 8 20 7.55228 20 7V6C20 5.44772 19.5523 5 19 5H5L4.89746 5.00488Z" fill="currentColor"/> -</svg> -`,v5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M11.386 21.6387C11.7378 21.988 12.3059 21.987 12.6565 21.6364L18.1949 16.098C18.5464 15.7465 18.5464 15.1766 18.1949 14.8252C17.8434 14.4737 17.2736 14.4737 16.9221 14.8252L12.9201 18.8272V3.00002C12.9201 2.50297 12.5171 2.10003 12.0201 2.10003C11.523 2.10003 11.1201 2.50297 11.1201 3.00002V18.8383L7.07554 14.8229C6.7228 14.4727 6.15295 14.4747 5.80275 14.8275C5.45255 15.1802 5.45461 15.7501 5.80735 16.1003L11.386 21.6387Z" fill="currentColor"/> -</svg> -`,y5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16127 12.814C1.81197 12.4622 1.81299 11.8941 2.16357 11.5435L7.70203 6.00506C8.0535 5.65359 8.62335 5.65359 8.97482 6.00506C9.32629 6.35653 9.32629 6.92638 8.97482 7.27785L4.97276 11.2799H20.8C21.297 11.2799 21.7 11.6829 21.7 12.1799C21.7 12.677 21.297 13.0799 20.8 13.0799H4.96171L8.97712 17.1244C9.32732 17.4772 9.32526 18.047 8.97252 18.3972C8.61978 18.7474 8.04993 18.7454 7.69973 18.3926L2.16127 12.814Z" fill="currentColor"/> -</svg> -`,b5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M21.4387 12.814C21.788 12.4622 21.787 11.8941 21.4364 11.5436L15.8979 6.0051C15.5464 5.65363 14.9766 5.65363 14.6251 6.0051C14.2737 6.35657 14.2737 6.92642 14.6251 7.27789L18.6272 11.28H2.79998C2.30293 11.28 1.89998 11.6829 1.89998 12.18C1.89998 12.677 2.30293 13.08 2.79998 13.08H18.6382L14.6228 17.1245C14.2726 17.4772 14.2747 18.0471 14.6274 18.3973C14.9802 18.7475 15.55 18.7454 15.9002 18.3927L21.4387 12.814Z" fill="currentColor"/> -</svg> -`,k5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M11.386 2.36129C11.7378 2.01198 12.3059 2.013 12.6565 2.36358L18.1949 7.90204C18.5464 8.25351 18.5464 8.82336 18.1949 9.17483C17.8434 9.52631 17.2736 9.52631 16.9221 9.17483L12.9201 5.17277V21C12.9201 21.497 12.5171 21.9 12.0201 21.9C11.523 21.9 11.1201 21.497 11.1201 21V5.16172L7.07554 9.17713C6.7228 9.52733 6.15295 9.52527 5.80275 9.17253C5.45255 8.81979 5.45461 8.24995 5.80735 7.89975L11.386 2.36129Z" fill="currentColor"/> -</svg> -`,A5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M19.3027 5.9053C19.6542 5.55397 20.2247 5.55388 20.5761 5.9053C20.9273 6.25675 20.9273 6.82734 20.5761 7.17874L9.65911 18.0948C9.30773 18.4461 8.73814 18.446 8.38665 18.0948L3.42376 13.1328C3.0726 12.7814 3.07263 12.2118 3.42376 11.8604C3.77524 11.509 4.34575 11.5089 4.6972 11.8604L9.02239 16.1856L19.3027 5.9053Z" fill="currentColor"/> -</svg> -`,C5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M11.3912 16.7134C11.743 17.0627 12.3111 17.0617 12.6617 16.7111L19.6364 9.73641C19.9878 9.38494 19.9878 8.81509 19.6364 8.46362C19.2849 8.11215 18.7151 8.11215 18.3636 8.46362L12.023 14.8042L5.63407 8.46132C5.28133 8.11112 4.71149 8.11318 4.36129 8.46592C4.01109 8.81866 4.01314 9.3885 4.36588 9.73871L11.3912 16.7134Z" fill="currentColor"/> -</svg> -`,w5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M16.1261 12.6088C16.4754 12.257 16.4743 11.6889 16.1238 11.3383L9.14904 4.36363C8.79757 4.01216 8.22772 4.01216 7.87625 4.36363C7.52477 4.7151 7.52477 5.28495 7.87625 5.63642L14.2169 11.977L7.87395 18.3659C7.52375 18.7187 7.52581 19.2885 7.87855 19.6387C8.23129 19.9889 8.80113 19.9869 9.15133 19.6341L16.1261 12.6088Z" fill="currentColor"/> -</svg> -`,x5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M11.3912 8.46132C11.743 8.11202 12.3111 8.11304 12.6617 8.46362L19.6364 15.4383C19.9878 15.7898 19.9878 16.3597 19.6364 16.7111C19.2849 17.0626 18.7151 17.0626 18.3636 16.7111L12.023 10.3705L5.63407 16.7134C5.28133 17.0636 4.71149 17.0616 4.36129 16.7088C4.01109 16.3561 4.01314 15.7862 4.36588 15.436L11.3912 8.46132Z" fill="currentColor"/> -</svg> -`,_5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<circle cx="12" cy="12" r="10.875" stroke="currentColor" stroke-width="2.25"/> -<path d="M7.125 12.6L10.65 16.125L17.025 8.85" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"/> -</svg> -`,S5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M11.8999 6.79965C12.397 6.79965 12.7997 7.20235 12.7997 7.69941V11.7266L14.7359 13.6629C15.0873 14.0143 15.0879 14.584 14.7366 14.9355C14.3852 15.287 13.8148 15.287 13.4633 14.9355L11.2632 12.7355C11.0947 12.5668 11.0002 12.338 11.0001 12.0995V7.69941C11.0001 7.20238 11.4029 6.7997 11.8999 6.79965Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M12 1.89893C17.4677 1.89893 21.9001 6.33147 21.9002 11.7991C21.9002 17.2669 17.4678 21.6993 12 21.6993C6.53228 21.6993 2.09985 17.2669 2.09985 11.7991C2.09998 6.33147 6.53236 1.89893 12 1.89893ZM20.1 11.7998C20.1 7.32616 16.4737 3.69984 12 3.69984C7.5264 3.69984 3.90008 7.32616 3.90008 11.7998C3.90032 16.2732 7.52655 19.8998 12 19.8998C16.4735 19.8998 20.0998 16.2732 20.1 11.7998Z" fill="currentColor"/> -</svg> -`,M5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M17.9542 4.77253C18.3056 4.42106 18.8761 4.42106 19.2276 4.77253C19.579 5.12401 19.579 5.69452 19.2276 6.04597L13.2735 12.0001L19.2276 17.9542C19.5791 18.3056 19.5791 18.8761 19.2276 19.2276C18.8761 19.5791 18.3056 19.5791 17.9542 19.2276L12.0001 13.2735L6.04595 19.2276C5.69451 19.5791 5.12399 19.579 4.77252 19.2276C4.42104 18.8761 4.42104 18.3056 4.77252 17.9542L10.7266 12.0001L4.77252 6.04597C4.42104 5.6945 4.42104 5.124 4.77252 4.77253C5.12399 4.42107 5.69448 4.42106 6.04595 4.77253L12.0001 10.7266L17.9542 4.77253Z" fill="currentColor"/> -</svg> -`,I5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M9.85815 11.957C10.9074 11.957 11.7583 12.8083 11.7585 13.8574V19.8574C11.7585 20.3545 11.3552 20.7578 10.8582 20.7578C10.3611 20.7578 9.95776 20.3545 9.95776 19.8574V13.8574C9.95755 13.8024 9.91325 13.7578 9.85815 13.7578H3.85815C3.3611 13.7578 2.95776 13.3545 2.95776 12.8574C2.95798 12.3605 3.36123 11.957 3.85815 11.957H9.85815Z" fill="currentColor"/> -<path d="M12.8582 2.95703C13.3551 2.95703 13.7583 3.36054 13.7585 3.85742V9.85742C13.7585 9.91265 13.8029 9.95703 13.8582 9.95703H19.8582C20.3551 9.95703 20.7583 10.3605 20.7585 10.8574C20.7585 11.3545 20.3552 11.7578 19.8582 11.7578H13.8582C12.8088 11.7578 11.9578 10.9068 11.9578 9.85742V3.85742C11.958 3.36054 12.3612 2.95703 12.8582 2.95703Z" fill="currentColor"/> -</svg> -`,E5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M11.9004 2.19995C17.3678 2.20016 21.7998 6.63285 21.7998 12.1003C21.7996 17.5677 17.3677 21.9995 11.9004 21.9998H3.80078C2.72946 21.9996 2.00334 20.9089 2.41699 19.9207L3.49805 17.3386C2.54871 15.8189 2.00007 14.0226 2 12.1003C2 6.63272 6.43277 2.19995 11.9004 2.19995ZM11.9004 3.99976C7.42688 3.99976 3.7998 7.62684 3.7998 12.1003C3.79989 13.8228 4.33669 15.4175 5.25195 16.7292L5.53516 17.1345L4.25195 20.2H11.8994C16.3727 20.1999 19.9998 16.5736 20 12.1003C20 7.62697 16.3737 3.99997 11.9004 3.99976ZM8.9541 10.8005C9.75473 10.8006 10.4041 11.4491 10.4043 12.2498C10.4043 13.0505 9.75482 13.6998 8.9541 13.7C8.15329 13.7 7.50391 13.0506 7.50391 12.2498C7.50406 11.4491 8.15339 10.8005 8.9541 10.8005ZM15.1533 10.8005C15.9539 10.8006 16.6034 11.4491 16.6035 12.2498C16.6035 13.0505 15.954 13.6998 15.1533 13.7C14.3525 13.7 13.7031 13.0506 13.7031 12.2498C13.7033 11.4491 14.3526 10.8005 15.1533 10.8005Z" fill="currentColor"/> -</svg> -`,T5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M17 7.09961C19.1539 7.09961 20.9004 8.84609 20.9004 11V17C20.9004 19.1539 19.1539 20.9004 17 20.9004H11C8.84609 20.9004 7.09961 19.1539 7.09961 17V11C7.09961 8.84609 8.84609 7.09961 11 7.09961H17ZM11 8.90039C9.8402 8.90039 8.90039 9.8402 8.90039 11V17C8.90039 18.1598 9.8402 19.0996 11 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V11C19.0996 9.8402 18.1598 8.90039 17 8.90039H11Z" fill="currentColor"/> -<path d="M13 3.09961C14.4447 3.09961 15.705 3.88644 16.3779 5.0498C16.6265 5.47999 16.4789 6.03049 16.0488 6.2793C15.6186 6.52781 15.0681 6.38029 14.8193 5.9502C14.4548 5.32041 13.776 4.90039 13 4.90039H7C5.8402 4.90039 4.90039 5.8402 4.90039 7V13C4.90039 13.776 5.32041 14.4548 5.9502 14.8193C6.38029 15.0681 6.52781 15.6186 6.2793 16.0488C6.03049 16.4789 5.47999 16.6265 5.0498 16.3779C3.88644 15.705 3.09961 14.4447 3.09961 13V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H13Z" fill="currentColor"/> -</svg> -`,L5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 10.2797 2.43414 8.66074 3.19922 7.24707C3.20172 7.24246 3.20453 7.23801 3.20703 7.2334C3.33385 6.99995 3.47181 6.77351 3.61621 6.55176C3.73214 6.37355 3.85079 6.19744 3.97754 6.02734C5.35905 4.17471 7.36856 2.81959 9.68945 2.27051C9.69952 2.26813 9.70965 2.26602 9.71973 2.26367C9.85224 2.23276 9.98563 2.2043 10.1201 2.17871C10.1542 2.17221 10.1884 2.16631 10.2227 2.16016C10.3466 2.13791 10.4712 2.11724 10.5967 2.09961C10.6301 2.09489 10.6637 2.0913 10.6973 2.08691C10.8216 2.07073 10.9465 2.05552 11.0723 2.04395C11.1125 2.04022 11.153 2.0384 11.1934 2.03516C11.4595 2.0139 11.7284 2 12 2ZM11.9941 3.7998C11.9968 3.86623 12 3.93292 12 4C12 6.76142 9.76142 9 7 9C6.14209 9 5.33517 8.78324 4.62988 8.40234C4.09862 9.48861 3.7998 10.7093 3.7998 12C3.7998 12.4438 3.83644 12.8791 3.9043 13.3037C4.52807 12.5673 5.45945 12.0996 6.5 12.0996C8.37777 12.0996 9.90039 13.6222 9.90039 15.5C9.90039 17.0702 8.83532 18.3903 7.38867 18.7812C8.70267 19.6765 10.2901 20.2002 12 20.2002C12.468 20.2002 12.9264 20.1583 13.373 20.083C13.1323 19.4342 13 18.7327 13 18C13 14.6863 15.6863 12 19 12C19.4098 12 19.8098 12.0416 20.1963 12.1201C20.1969 12.0801 20.2002 12.0401 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998H11.9941ZM19 13.7998C16.6804 13.7998 14.7998 15.6804 14.7998 18C14.7998 18.5617 14.9112 19.0972 15.1113 19.5869C17.5225 18.597 19.3558 16.4929 19.9727 13.9141C19.6605 13.8399 19.3349 13.7998 19 13.7998ZM6.5 13.9004C5.61634 13.9004 4.90039 14.6163 4.90039 15.5C4.90039 16.3837 5.61634 17.0996 6.5 17.0996C7.38366 17.0996 8.09961 16.3837 8.09961 15.5C8.09961 14.6163 7.38366 13.9004 6.5 13.9004ZM15.5 6.09961C16.8255 6.09961 17.9004 7.17452 17.9004 8.5C17.9004 9.82548 16.8255 10.9004 15.5 10.9004C14.1745 10.9004 13.0996 9.82548 13.0996 8.5C13.0996 7.17452 14.1745 6.09961 15.5 6.09961ZM15.5 7.90039C15.1686 7.90039 14.9004 8.16863 14.9004 8.5C14.9004 8.83137 15.1686 9.09961 15.5 9.09961C15.8314 9.09961 16.0996 8.83137 16.0996 8.5C16.0996 8.16863 15.8314 7.90039 15.5 7.90039ZM10.1992 4C8.35326 4.41375 6.74333 5.44923 5.59961 6.87598C6.02235 7.08306 6.49716 7.2002 7 7.2002C8.76731 7.2002 10.1992 5.76731 10.1992 4Z" fill="currentColor"/> -</svg> -`,N5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.90002C12.4971 2.90002 12.9 3.30297 12.9 3.80002V12.2939L15.8081 9.38585C16.1595 9.03438 16.7294 9.03438 17.0808 9.38585C17.4323 9.73732 17.4323 10.3072 17.0808 10.6586L12.6364 15.1031C12.4676 15.2719 12.2387 15.3667 12 15.3667C11.7613 15.3667 11.5324 15.2719 11.3636 15.1031L6.91917 10.6586C6.5677 10.3072 6.5677 9.73732 6.91917 9.38585C7.27064 9.03438 7.84049 9.03438 8.19196 9.38585L11.1 12.2939V3.80002C11.1 3.30297 11.503 2.90002 12 2.90002ZM4.00001 13.5874C4.49706 13.5874 4.90001 13.9903 4.90001 14.4874V18.043C4.90001 18.2758 4.99249 18.499 5.1571 18.6636C5.32172 18.8282 5.54498 18.9207 5.77778 18.9207H18.2222C18.455 18.9207 18.6783 18.8283 18.8429 18.6636C19.0075 18.499 19.1 18.2758 19.1 18.043V14.4874C19.1 13.9903 19.5029 13.5874 20 13.5874C20.4971 13.5874 20.9 13.9903 20.9 14.4874V18.043C20.9 18.7531 20.6179 19.4342 20.1157 19.9364C19.6135 20.4386 18.9324 20.7207 18.2222 20.7207H5.77778C5.06759 20.7207 4.38649 20.4386 3.88431 19.9364C3.38213 19.4342 3.10001 18.7531 3.10001 18.043V14.4874C3.10001 13.9903 3.50295 13.5874 4.00001 13.5874Z" fill="currentColor"/> -</svg> -`,F5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M18.0179 3.09998C18.3963 3.10003 18.7709 3.17491 19.1205 3.31971C19.4701 3.46454 19.7884 3.67614 20.056 3.94373C20.3237 4.21144 20.5362 4.52965 20.681 4.87928C20.8258 5.22887 20.8997 5.60423 20.8997 5.9828C20.8997 6.36118 20.8257 6.73591 20.681 7.08533C20.5362 7.43497 20.3237 7.75317 20.056 8.02088L17.639 10.4379L9.15756 18.9183C8.5296 19.5463 7.74274 19.992 6.8812 20.2074L4.21811 20.8734C3.91148 20.95 3.5871 20.8596 3.36362 20.6361C3.14017 20.4126 3.05063 20.0883 3.12729 19.7816L3.79233 17.1185C4.00771 16.257 4.45344 15.4701 5.08139 14.8422L15.9798 3.94373C16.5203 3.40346 17.2536 3.09998 18.0179 3.09998ZM19.0003 19.1C19.4972 19.1002 19.8997 19.5034 19.8997 20.0004C19.8995 20.4971 19.4971 20.8996 19.0003 20.8998H12.0003C11.5034 20.8998 11.1001 20.4973 11.0999 20.0004C11.0999 19.5033 11.5033 19.1 12.0003 19.1H19.0003ZM18.0179 4.89979C17.7309 4.89979 17.4553 5.01417 17.2523 5.21717L6.35385 16.1146C5.95661 16.5119 5.67469 17.01 5.53842 17.5551L5.23666 18.7631L6.44467 18.4613C6.98971 18.3251 7.48782 18.0431 7.8851 17.6459L18.7826 6.74744C18.883 6.64702 18.9635 6.52821 19.0179 6.39686C19.0723 6.26558 19.0999 6.1247 19.0999 5.9828C19.0999 5.84075 19.0723 5.69916 19.0179 5.56776C18.9635 5.43645 18.883 5.31757 18.7826 5.21717C18.6821 5.11678 18.5631 5.03716 18.432 4.9828C18.3008 4.92845 18.16 4.89983 18.0179 4.89979Z" fill="currentColor"/> -</svg> -`,B5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M5 11.0996C5.49693 11.0996 5.90018 11.5031 5.90039 12V18C5.90039 18.0552 5.94477 18.0996 6 18.0996H12C12.4969 18.0996 12.9002 18.5031 12.9004 19C12.9004 19.4971 12.4971 19.9004 12 19.9004H6C4.95066 19.9004 4.09961 19.0493 4.09961 18V12C4.09982 11.5031 4.50307 11.0996 5 11.0996ZM18 4.09961C19.0492 4.09961 19.9002 4.95084 19.9004 6V12C19.9004 12.4971 19.4971 12.9004 19 12.9004C18.5029 12.9004 18.0996 12.4971 18.0996 12V6C18.0994 5.94495 18.0551 5.90039 18 5.90039H12C11.5029 5.90039 11.0996 5.49706 11.0996 5C11.0998 4.50312 11.5031 4.09961 12 4.09961H18Z" fill="currentColor"/> -</svg> -`,TS=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g> -<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1723 2.1001C13.9413 2.10018 14.6793 2.40592 15.2231 2.94971L19.0512 6.77783C19.595 7.32162 19.9007 8.0596 19.9008 8.82861V18.0005C19.9008 20.1544 18.1543 21.9009 16.0004 21.9009H8.0004C5.84649 21.9009 4.10001 20.1544 4.10001 18.0005V6.00049C4.10001 3.84658 5.84649 2.1001 8.0004 2.1001H13.1723ZM8.0004 3.90088C6.8406 3.90088 5.90079 4.84069 5.90079 6.00049V18.0005C5.90079 19.1603 6.8406 20.1001 8.0004 20.1001H16.0004C17.1602 20.1001 18.1 19.1603 18.1 18.0005V9.90088H15.0004C13.3988 9.90088 12.1 8.60211 12.1 7.00049V3.90088H8.0004ZM13.9008 7.00049C13.9008 7.608 14.3929 8.1001 15.0004 8.1001H17.8217C17.8072 8.08375 17.7933 8.06681 17.7777 8.05127L13.9496 4.22314C13.9339 4.20745 13.9173 4.19286 13.9008 4.17822V7.00049Z" fill="currentColor"/> -</g> -</svg> -`,$5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M15.4795 15.4971C15.9765 15.4971 16.3799 15.9004 16.3799 16.3975C16.3799 16.8945 15.9765 17.2978 15.4795 17.2979H8.52051C8.02345 17.2979 7.62012 16.8945 7.62012 16.3975C7.62012 15.9004 8.02345 15.4971 8.52051 15.4971H15.4795Z" fill="currentColor"/> -<path d="M12.3359 11.0996C12.8329 11.0997 13.2354 11.503 13.2354 12C13.2354 12.497 12.8329 12.9003 12.3359 12.9004H8.52051C8.02345 12.9004 7.62012 12.4971 7.62012 12C7.62012 11.5029 8.02345 11.0996 8.52051 11.0996H12.3359Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1719 2.09961C13.9408 2.09969 14.6789 2.40555 15.2227 2.94922L19.0508 6.77734C19.5946 7.32113 19.9003 8.05911 19.9004 8.82812V18C19.9004 20.1539 18.1539 21.9004 16 21.9004H8C5.84626 21.9002 4.09961 20.1538 4.09961 18V6C4.09961 3.84621 5.84626 2.09981 8 2.09961H13.1719ZM8 3.90039C6.84037 3.90059 5.90039 4.84032 5.90039 6V18C5.90039 19.1597 6.84037 20.0994 8 20.0996H16C17.1598 20.0996 18.0996 19.1598 18.0996 18V9.90039H15C13.3985 9.90019 12.0996 8.6015 12.0996 7V3.90039H8ZM13.9004 7C13.9004 7.60739 14.3927 8.09941 15 8.09961H17.8213C17.8068 8.08333 17.7928 8.06626 17.7773 8.05078L13.9492 4.22266C13.9335 4.20696 13.9169 4.19237 13.9004 4.17773V7Z" fill="currentColor"/> -</svg> -`,D5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M9.2373 3.7002C10.4169 3.7002 11.5297 4.24779 12.249 5.18262L12.4424 5.43359H18C20.0987 5.43359 21.7998 7.13472 21.7998 9.2334V16.5C21.7998 18.5987 20.0987 20.2998 18 20.2998H6C3.90132 20.2998 2.2002 18.5987 2.2002 16.5V7.5C2.2002 5.40132 3.90132 3.7002 6 3.7002H9.2373ZM6 5.5C4.89543 5.5 4 6.39543 4 7.5V16.5C4 17.6046 4.89543 18.5 6 18.5H18C19.0357 18.5 19.887 17.7128 19.9893 16.7041L20 16.5V9.2334C20 8.19775 19.2128 7.34641 18.2041 7.24414L18 7.2334H12.0479L11.9326 7.22656C11.666 7.19561 11.4205 7.05812 11.2549 6.84277L10.8223 6.28027C10.4437 5.78834 9.85808 5.5 9.2373 5.5H6ZM16 9.59961C16.4971 9.59961 16.9004 10.0029 16.9004 10.5C16.9004 10.9971 16.4971 11.4004 16 11.4004H8C7.50294 11.4004 7.09961 10.9971 7.09961 10.5C7.09961 10.0029 7.50294 9.59961 8 9.59961H16Z" fill="currentColor"/> -</svg> -`,R5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g> -<path d="M18.3623 9.99976L18.209 8.48999C18.2031 8.43161 18.2004 8.37289 18.2002 8.31421C18.1988 8.31196 18.1956 8.30842 18.1904 8.30347C18.1718 8.28559 18.1302 8.26245 18.0713 8.26245H11C10.261 8.26245 9.59753 7.81016 9.32617 7.1228L8.9082 6.06421C8.88101 5.9953 8.85737 5.92501 8.83887 5.85327C8.83778 5.85099 8.833 5.84268 8.81836 5.83179C8.79454 5.81475 8.7549 5.79939 8.70605 5.80054H3.92871C3.86986 5.80054 3.82825 5.82368 3.80957 5.84155C3.80816 5.8429 3.80675 5.84428 3.80566 5.84546L4.47559 14.0955L3.62109 17.5154L5.12109 11.5154C5.34367 10.6251 6.1438 9.99977 7.06152 9.99976H18.3623ZM7.06152 11.7996C6.96976 11.7996 6.88944 11.8629 6.86719 11.9519L5.36719 17.9519C5.33598 18.078 5.43158 18.1999 5.56152 18.2H19.4385C19.5302 18.1999 19.6106 18.1376 19.6328 18.0486L21.1328 12.0486C21.1644 11.9224 21.0686 11.7996 20.9385 11.7996H7.06152ZM20.9385 9.99976C22.2396 9.99977 23.1945 11.2228 22.8789 12.4851L21.3789 18.4851C21.1563 19.3754 20.3562 19.9997 19.4385 19.9998H4.92871C4.41722 19.9998 3.92613 19.8059 3.56445 19.4597C3.20281 19.1135 3.00004 18.6436 3 18.1541L2 5.84644C2.00006 5.35711 2.20311 4.88786 2.56445 4.54175C2.92613 4.19554 3.41722 4.00073 3.92871 4.00073H8.66406C9.10133 3.99051 9.5296 4.1225 9.87793 4.37573C10.2285 4.63118 10.4767 4.99457 10.582 5.40405L11 6.46167H18.0713C18.5828 6.46167 19.0739 6.65648 19.4355 7.00269C19.7971 7.34888 20 7.81883 20 8.30835L20.1719 9.99976H20.9385Z" fill="currentColor"/> -</g> -</svg> -`,z5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M9.5 3Q10.8 8.2 16 9.5Q10.8 10.8 9.5 16Q8.2 10.8 3 9.5Q8.2 8.2 9.5 3Z" fill="currentColor"/> -<path d="M17.25 13.5Q18 16.5 21 17.25Q18 18 17.25 21Q16.5 18 13.5 17.25Q16.5 16.5 17.25 13.5Z" fill="currentColor"/> -</svg> -`,O5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> - <path id="af-p0" d="M -2.619 -8.3 C -1.815 -8.3 -1.048 -7.97 -0.499 -7.39 C -0.499 -7.39 0.141 -6.712 0.141 -6.712 C 0.141 -6.712 5.75 -6.712 5.75 -6.712 C 7.904 -6.712 9.65 -4.986 9.65 -2.858 C 9.65 -2.858 9.65 -1.71 9.65 -1.71 C 9.65 -1.219 9.247 -0.821 8.75 -0.821 C 8.253 -0.821 7.85 -1.219 7.85 -1.71 C 7.85 -1.71 7.85 -2.858 7.85 -2.858 C 7.849 -4.004 6.91 -4.934 5.75 -4.934 C 5.75 -4.934 -0.207 -4.934 -0.207 -4.934 C -0.484 -4.934 -0.749 -5.047 -0.938 -5.247 C -0.938 -5.247 -1.815 -6.177 -1.815 -6.177 C -2.023 -6.397 -2.315 -6.521 -2.619 -6.521 C -2.619 -6.521 -6.25 -6.521 -6.25 -6.521 C -7.41 -6.521 -8.35 -5.592 -8.35 -4.446 C -8.35 -4.446 -8.35 4.446 -8.35 4.446 C -8.35 5.592 -7.41 6.521 -6.25 6.521 C -6.25 6.521 1.25 6.521 1.25 6.521 C 1.747 6.521 2.15 6.919 2.15 7.41 C 2.15 7.901 1.747 8.3 1.25 8.3 C 1.25 8.3 -6.25 8.3 -6.25 8.3 C -8.404 8.3 -10.15 6.574 -10.15 4.446 C -10.15 4.446 -10.15 -4.446 -10.15 -4.446 C -10.15 -6.574 -8.404 -8.3 -6.25 -8.3 C -6.25 -8.3 -2.619 -8.3 -2.619 -8.3 Z M 3.75 -2.5 C 4.247 -2.5 4.65 -2.097 4.65 -1.6 C 4.65 -1.103 4.247 -0.699 3.75 -0.699 C 3.75 -0.699 -4.25 -0.699 -4.25 -0.699 C -4.747 -0.699 -5.15 -1.103 -5.15 -1.6 C -5.15 -2.097 -4.747 -2.5 -4.25 -2.5 C -4.25 -2.5 3.75 -2.5 3.75 -2.5 Z" transform="matrix(1 0 0 1 11.75 12)" fill="currentColor"/> - <g id="af-p1"> - <path d="M 2.635 0 L -2.635 0 M 0 -2.635 L 0 2.635" transform="matrix(1 0 0 1 18.4 16.3)" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/> - </g> -</svg> -`,P5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM12 19.2002C15.9764 19.2002 19.2002 15.9764 19.2002 12C19.2002 8.02355 15.9764 4.7998 12 4.7998V19.2002Z" fill="currentColor"/> -</svg> -`,j5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7ZM12 15.6992C12.4968 15.6992 12.8994 16.1028 12.8994 16.5996C12.8994 17.0964 12.4968 17.5 12 17.5C11.5024 17.5 11.0996 17.0964 11.0996 16.5996C11.0996 16.1028 11.5024 15.6992 12 15.6992ZM12 6.49902C12.4969 6.49922 12.8994 6.86908 12.8994 7.3252V13.6729C12.8994 14.129 12.4969 14.4988 12 14.499C11.5029 14.499 11.0996 14.1291 11.0996 13.6729V7.3252C11.0996 6.86896 11.5029 6.49902 12 6.49902Z" fill="currentColor"/> -</svg> -`,H5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M12.5092 2.11279C17.7402 2.37781 21.8998 6.70364 21.8998 12.0005C21.8996 17.4153 17.5524 21.8108 12.1576 21.895C12.1056 21.898 12.0532 21.8999 12.0004 21.8999C11.948 21.8999 11.8954 21.8968 11.8432 21.896L11.8422 21.895C6.44751 21.8107 2.10022 17.4152 2.10001 12.0005C2.10001 6.53287 6.53278 2.1001 12.0004 2.1001L12.5092 2.11279ZM8.92715 13.0005C9.02896 14.9787 9.42581 16.721 9.99356 17.9985C10.3249 18.7441 10.6971 19.292 11.0639 19.6411C11.4259 19.9855 11.741 20.1001 12.0004 20.1001C12.2598 20.1 12.5749 19.9856 12.9369 19.6411C13.3037 19.292 13.6749 18.7441 14.0063 17.9985C14.574 16.721 14.9718 14.9788 15.0736 13.0005H8.92715ZM3.96329 13.0005C4.31462 15.8522 6.14714 18.2427 8.66837 19.3823C8.55544 19.1733 8.44916 18.9552 8.34903 18.73C7.66574 17.1926 7.22657 15.1926 7.12344 13.0005H3.96329ZM16.8764 13.0005C16.7732 15.1926 16.3341 17.1926 15.6508 18.73C15.5506 18.9554 15.4435 19.1732 15.3305 19.3823C17.8522 18.2429 19.6851 15.8525 20.0365 13.0005H16.8764ZM8.66934 4.6167C6.08869 5.78266 4.22826 8.25964 3.93985 11.1997H7.11661C7.20176 8.92954 7.64512 6.85497 8.34903 5.271C8.4494 5.04516 8.5561 4.82619 8.66934 4.6167ZM12.0004 3.8999C11.7411 3.8999 11.4259 4.01454 11.0639 4.35889C10.6971 4.70797 10.3249 5.25587 9.99356 6.00146C9.40671 7.32188 9.00186 9.13885 8.91739 11.1997H15.0834C14.9989 9.13884 14.5931 7.32189 14.0063 6.00146C13.6749 5.2559 13.3037 4.70796 12.9369 4.35889C12.5749 4.0144 12.2598 3.90002 12.0004 3.8999ZM15.3295 4.61572C15.443 4.82559 15.5502 5.04471 15.6508 5.271C16.3547 6.85498 16.799 8.92949 16.8842 11.1997H20.06C19.7715 8.25914 17.9108 5.78143 15.3295 4.61572Z" fill="currentColor"/> -</svg> -`,W5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M8 17C8.82834 17 9.5 17.6717 9.5 18.5C9.5 19.3283 8.82834 20 8 20C7.17166 20 6.5 19.3283 6.5 18.5C6.5 17.6717 7.17166 17 8 17ZM16 17C16.8283 17 17.5 17.6717 17.5 18.5C17.5 19.3283 16.8283 20 16 20C15.1717 20 14.5 19.3283 14.5 18.5C14.5 17.6717 15.1717 17 16 17ZM8 10.5C8.82834 10.5 9.5 11.1717 9.5 12C9.5 12.8283 8.82834 13.5 8 13.5C7.17166 13.5 6.5 12.8283 6.5 12C6.5 11.1717 7.17166 10.5 8 10.5ZM16 10.5C16.8283 10.5 17.5 11.1717 17.5 12C17.5 12.8283 16.8283 13.5 16 13.5C15.1717 13.5 14.5 12.8283 14.5 12C14.5 11.1717 15.1717 10.5 16 10.5ZM8 4C8.82834 4 9.5 4.67166 9.5 5.5C9.5 6.32834 8.82834 7 8 7C7.17166 7 6.5 6.32834 6.5 5.5C6.5 4.67166 7.17166 4 8 4ZM16 4C16.8283 4 17.5 4.67166 17.5 5.5C17.5 6.32834 16.8283 7 16 7C15.1717 7 14.5 6.32834 14.5 5.5C14.5 4.67166 15.1717 4 16 4Z" fill="currentColor"/> -</svg> -`,q5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M7.22264 6.10352C7.22264 5.5078 7.48259 4.95449 7.91405 4.56055C8.34271 4.16918 8.90831 3.96198 9.48241 3.96191C9.64155 3.96191 9.80001 3.97936 9.95507 4.01074C10.0127 3.5042 10.2586 3.04178 10.6338 2.69922C11.0625 2.30778 11.6279 2.09961 12.2021 2.09961C12.7763 2.09966 13.3418 2.30783 13.7705 2.69922C13.9947 2.90401 14.1709 3.15244 14.29 3.42676C14.4947 3.37044 14.7071 3.34182 14.9209 3.3418C15.4951 3.3418 16.0605 3.549 16.4892 3.94043C16.8644 4.28293 17.1093 4.74548 17.167 5.25195C17.3223 5.22045 17.4812 5.20312 17.6406 5.20312C18.2147 5.20318 18.7803 5.41135 19.209 5.80273C19.6402 6.19663 19.9004 6.74922 19.9004 7.34473V14.6543C19.9004 17.413 19.2914 19.0434 18.0137 20.21C16.82 21.2998 15.2175 21.9004 13.5615 21.9004C11.7538 21.9004 10.2315 21.5696 8.95702 20.8535C7.67664 20.1341 6.71683 19.0652 5.97362 17.708L3.3496 12.916C3.18848 12.6213 3.10112 12.2914 3.0996 11.9531C3.09812 11.6147 3.18309 11.2835 3.34179 10.9873C3.5001 10.692 3.72639 10.4416 3.99706 10.251C4.26771 10.0604 4.57776 9.93235 4.90136 9.87305C5.56617 9.75102 6.25934 9.84517 6.86425 10.1445C6.9942 10.2088 7.11461 10.2788 7.22264 10.3477V6.10352ZM9.02343 12.7969C9.02336 13.1912 8.76624 13.5395 8.38964 13.6562C8.0129 13.773 7.60387 13.6309 7.38085 13.3057L6.53514 12.0723C6.51218 12.0529 6.48411 12.0282 6.45018 12.002C6.34595 11.9213 6.20986 11.8289 6.06639 11.7578C5.81525 11.6335 5.51637 11.5904 5.22655 11.6436H5.22557C5.15055 11.6573 5.08558 11.6865 5.03417 11.7227C4.98289 11.7588 4.94815 11.7998 4.92772 11.8379C4.90762 11.8755 4.90023 11.9122 4.90038 11.9453C4.90057 11.9782 4.9084 12.0144 4.9287 12.0518L7.55272 16.8438C8.16912 17.9693 8.90989 18.7622 9.83886 19.2842C10.7737 19.8094 11.9704 20.0996 13.5615 20.0996C14.7902 20.0996 15.9536 19.6533 16.7998 18.8809C17.5619 18.185 18.0996 17.1383 18.0996 14.6543V7.34473C18.0996 7.28204 18.0734 7.20342 17.9951 7.13184C17.9139 7.05771 17.7875 7.00396 17.6406 7.00391C17.4937 7.00391 17.3674 7.05771 17.2861 7.13184C17.2077 7.20347 17.1807 7.28199 17.1807 7.34473V11.0693C17.1805 11.5661 16.778 11.9685 16.2812 11.9688C15.7843 11.9688 15.381 11.5662 15.3808 11.0693V5.48242C15.3808 5.41973 15.3537 5.34107 15.2754 5.26953C15.1941 5.19547 15.0677 5.1416 14.9209 5.1416C14.774 5.14166 14.6476 5.19541 14.5664 5.26953C14.4881 5.34105 14.462 5.41974 14.4619 5.48242V11.0693C14.4617 11.5662 14.0584 11.9688 13.5615 11.9688C13.0646 11.9687 12.6613 11.5662 12.6611 11.0693V4.24121C12.6611 4.17852 12.635 4.09989 12.5566 4.02832C12.4754 3.95419 12.349 3.90045 12.2021 3.90039C12.0552 3.90039 11.9289 3.95421 11.8476 4.02832C11.7692 4.09992 11.7422 4.17849 11.7422 4.24121V11.0693C11.742 11.5661 11.3395 11.9685 10.8428 11.9688C10.3458 11.9688 9.94257 11.5662 9.94237 11.0693V6.10352L9.93651 6.05371C9.92534 6.00177 9.89573 5.94433 9.8369 5.89062C9.75567 5.81647 9.62938 5.76172 9.48241 5.76172C9.33554 5.76179 9.2091 5.81651 9.12792 5.89062C9.04964 5.96222 9.02343 6.04084 9.02343 6.10352V12.7969Z" fill="currentColor"/> -</svg> -`,U5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M4 3.33203C4.55224 3.33203 4.99993 3.7798 5 4.33203V18.0908H20.0674C20.6195 18.0908 21.0671 18.5388 21.0674 19.0908C21.0674 19.6431 20.6197 20.0908 20.0674 20.0908H5C3.89543 20.0908 3 19.1954 3 18.0908V4.33203C3.00007 3.7798 3.44776 3.33203 4 3.33203ZM8.19922 9.28418C8.7515 9.28418 9.19922 9.73189 9.19922 10.2842V15.6045C9.19908 16.1567 8.75142 16.6045 8.19922 16.6045C7.64719 16.6043 7.19936 16.1565 7.19922 15.6045V10.2842C7.19922 9.73202 7.6471 9.28438 8.19922 9.28418ZM17.2227 6.85645C17.7748 6.85658 18.2226 7.3043 18.2227 7.85645V15.6045C18.2225 16.1566 17.7747 16.6044 17.2227 16.6045C16.6705 16.6045 16.2228 16.1566 16.2227 15.6045V7.85645C16.2227 7.30422 16.6704 6.85645 17.2227 6.85645ZM12.7109 3.96387C13.2631 3.96387 13.7107 4.41175 13.7109 4.96387V15.6035C13.7109 16.1558 13.2632 16.6035 12.7109 16.6035C12.1587 16.6035 11.7109 16.1558 11.7109 15.6035V4.96387C11.7111 4.41175 12.1588 3.96387 12.7109 3.96387Z" fill="currentColor"/> -</svg> -`,K5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M8.00916 7.50488C8.47326 7.50488 8.91828 7.68943 9.24646 8.01758C9.57465 8.34577 9.75916 8.79075 9.75916 9.25488C9.75916 9.71901 9.57465 10.164 9.24646 10.4922C8.91828 10.8203 8.47326 11.0049 8.00916 11.0049C7.54507 11.0049 7.10001 10.8203 6.77185 10.4922C6.4437 10.164 6.25916 9.71898 6.25916 9.25488C6.25916 8.79078 6.4437 8.34576 6.77185 8.01758C7.10001 7.68942 7.54507 7.50492 8.00916 7.50488Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M17.8998 4.09961C20.0537 4.09961 21.8002 5.84609 21.8002 8V16C21.8002 18.1539 20.0537 19.9004 17.8998 19.9004H5.89978C3.74598 19.9003 1.99939 18.1538 1.99939 16V8C1.99939 5.84617 3.74598 4.09974 5.89978 4.09961H17.8998ZM15.4867 12.2539C15.448 12.2184 15.3885 12.2192 15.351 12.2559L11.7338 15.8027C11.0146 16.5079 9.87305 16.5222 9.13708 15.835L6.98669 13.8262C6.95049 13.7924 6.89516 13.791 6.85681 13.8223L3.82361 16.2988C3.96873 17.3168 4.84165 18.0995 5.89978 18.0996H17.8998C18.9375 18.0996 19.7964 17.3466 19.9662 16.3574L15.4867 12.2539ZM5.89978 5.90039C4.74009 5.90052 3.80017 6.84028 3.80017 8V14.002L5.73181 12.4238C6.46046 11.8286 7.51253 11.8634 8.20056 12.5059L10.351 14.5146C10.3897 14.5508 10.4498 14.5497 10.4877 14.5127L14.1049 10.9658C14.819 10.2656 15.9506 10.2466 16.6879 10.9219L19.9994 13.9551V8C19.9994 6.8402 19.0596 5.90039 17.8998 5.90039H5.89978Z" fill="currentColor"/> -</svg> -`,V5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M5.09375 2.81174C5.4825 2.50796 6.04376 2.56488 6.34766 2.93869L20.1855 19.9602C20.4895 20.3341 20.421 20.8836 20.0322 21.1877C19.6435 21.4917 19.0823 21.4355 18.7783 21.0617L17.9971 20.1008H5.99609C3.84224 20.1008 2.0958 18.3552 2.0957 16.2014V8.13889C2.09589 6.26755 3.41429 4.70428 5.17285 4.32639L4.93945 4.03928C4.63577 3.66536 4.7051 3.11573 5.09375 2.81174ZM7.13184 14.1096C7.09416 14.0738 7.03659 14.0713 6.99609 14.1037L3.92871 16.5569C4.09761 17.5472 4.95753 18.301 5.99609 18.301H16.5342L13.373 14.4133L11.9072 15.9455C11.1531 16.7324 9.92202 16.7621 9.13281 16.0119L7.13184 14.1096ZM5.99609 6.03928C4.83643 6.03928 3.89669 6.97927 3.89648 8.13889V14.1408L5.83496 12.5901C6.60469 11.9742 7.69929 12.022 8.41504 12.7024L10.416 14.6037C10.4575 14.6431 10.5218 14.642 10.5615 14.6008L12.1641 12.926L9.78906 10.0051C9.70282 10.2646 9.55682 10.5038 9.35645 10.7004C9.02202 11.0285 8.56767 11.2131 8.09473 11.2131C7.62195 11.213 7.1683 11.0284 6.83398 10.7004C6.49961 10.3724 6.31152 9.92701 6.31152 9.46311C6.3116 8.99941 6.49981 8.55474 6.83398 8.22678C7.12986 7.93654 7.51931 7.75901 7.93262 7.7219L6.56543 6.03928H5.99609Z" fill="currentColor"/> -<path d="M18.0049 4.31272C20.1587 4.31288 21.9043 6.0593 21.9043 8.21311V13.718C21.9039 15.4743 19.7248 16.2906 18.5713 14.966L14.9141 10.7658C14.5882 10.3912 14.6278 9.82271 15.002 9.49631C15.3768 9.16994 15.9451 9.20948 16.2715 9.5842L19.9287 13.7844C19.9528 13.812 19.9696 13.8167 19.9775 13.8186C19.9908 13.8216 20.0141 13.8213 20.04 13.8117C20.0655 13.8021 20.0826 13.7875 20.0908 13.7766C20.0955 13.7702 20.1044 13.7552 20.1045 13.718V8.21311C20.1045 7.05341 19.1645 6.11366 18.0049 6.1135H10.6328C10.1361 6.11327 9.73267 5.70981 9.73242 5.21311C9.73242 4.71619 10.136 4.31295 10.6328 4.31272H18.0049Z" fill="currentColor"/> -</svg> -`,Z5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M12 2.1001C17.4676 2.10031 21.8994 6.53286 21.8994 12.0005C21.8992 17.4679 17.4674 21.8997 12 21.8999C6.53237 21.8999 2.09982 17.4681 2.09961 12.0005C2.09961 6.53273 6.53224 2.1001 12 2.1001ZM12 3.8999C7.52636 3.8999 3.89941 7.52684 3.89941 12.0005C3.89963 16.474 7.52649 20.1001 12 20.1001C16.4733 20.0999 20.0994 16.4738 20.0996 12.0005C20.0996 7.52697 16.4735 3.90011 12 3.8999ZM12 9.50049C12.4969 9.50068 12.8994 9.87055 12.8994 10.3267V16.6743C12.8992 17.1303 12.4968 17.5003 12 17.5005C11.503 17.5005 11.0998 17.1304 11.0996 16.6743V10.3267C11.0996 9.87043 11.5029 9.50049 12 9.50049ZM12 6.49951C12.4968 6.49951 12.8994 6.90313 12.8994 7.3999C12.8992 7.8965 12.4966 8.30029 12 8.30029C11.5025 8.30028 11.0998 7.8965 11.0996 7.3999C11.0996 6.90313 11.5024 6.49952 12 6.49951Z" fill="currentColor"/> -</svg> -`,G5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.09998C6.53222 2.09998 2.09998 6.53222 2.09998 12C2.09998 17.4677 6.53222 21.9 12 21.9C17.4677 21.9 21.9 17.4677 21.9 12C21.9 6.53222 17.4677 2.09998 12 2.09998ZM3.89998 12C3.89998 7.52633 7.52633 3.89998 12 3.89998C16.4736 3.89998 20.1 7.52633 20.1 12C20.1 16.4736 16.4736 20.1 12 20.1C7.52633 20.1 3.89998 16.4736 3.89998 12Z" fill="currentColor"/> -<path d="M9.4286 9.47153C9.4286 8.97448 9.83154 8.57153 10.3286 8.57153H11.1C11.5971 8.57153 12 8.97448 12 9.47153C12 9.96859 11.5971 10.3715 11.1 10.3715H10.3286C9.83154 10.3715 9.4286 9.96859 9.4286 9.47153Z" fill="currentColor"/> -<path d="M5.14289 9.47155C5.14289 8.97449 5.54583 8.57155 6.04289 8.57155H7.67146C8.16851 8.57155 8.57146 8.97449 8.57146 9.47155C8.57146 9.9686 8.16851 10.3715 7.67146 10.3715H6.04289C5.54583 10.3715 5.14289 9.9686 5.14289 9.47155Z" fill="currentColor"/> -<path d="M8.57146 16.3287C8.57146 15.8316 8.9744 15.4287 9.47145 15.4287H14.5286C15.0257 15.4287 15.4286 15.8316 15.4286 16.3287C15.4286 16.8257 15.0257 17.2287 14.5286 17.2287H9.47145C8.9744 17.2287 8.57146 16.8257 8.57146 16.3287Z" fill="currentColor"/> -<path d="M6.04288 12.0001C5.54583 12.0001 5.14288 12.403 5.14288 12.9001C5.14288 13.3972 5.54583 13.8001 6.04288 13.8001H6.81431C7.31137 13.8001 7.71431 13.3972 7.71431 12.9001C7.71431 12.403 7.31137 12.0001 6.81431 12.0001H6.04288Z" fill="currentColor"/> -<path d="M9.47145 12.0001C8.9744 12.0001 8.57146 12.403 8.57146 12.9001C8.57146 13.3972 8.9744 13.8001 9.47146 13.8001H10.2429C10.7399 13.8001 11.1429 13.3972 11.1429 12.9001C11.1429 12.403 10.7399 12.0001 10.2429 12.0001H9.47145Z" fill="currentColor"/> -<path d="M12.8572 9.47153C12.8572 8.97448 13.2601 8.57153 13.7572 8.57153H14.5286C15.0257 8.57153 15.4286 8.97448 15.4286 9.47153C15.4286 9.96859 15.0257 10.3715 14.5286 10.3715H13.7572C13.2601 10.3715 12.8572 9.96859 12.8572 9.47153Z" fill="currentColor"/> -<path d="M12.9 12.0001C12.403 12.0001 12 12.403 12 12.9001C12 13.3972 12.403 13.8001 12.9 13.8001H13.6715C14.1685 13.8001 14.5715 13.3972 14.5715 12.9001C14.5715 12.403 14.1685 12.0001 13.6715 12.0001H12.9Z" fill="currentColor"/> -<path d="M16.2857 9.47153C16.2857 8.97448 16.6887 8.57153 17.1857 8.57153H17.9572C18.4542 8.57153 18.8572 8.97448 18.8572 9.47153C18.8572 9.96859 18.4542 10.3715 17.9572 10.3715H17.1857C16.6887 10.3715 16.2857 9.96859 16.2857 9.47153Z" fill="currentColor"/> -<path d="M16.3286 12.0001C15.8315 12.0001 15.4286 12.403 15.4286 12.9001C15.4286 13.3972 15.8315 13.8001 16.3286 13.8001H17.9572C18.4542 13.8001 18.8572 13.3972 18.8572 12.9001C18.8572 12.403 18.4542 12.0001 17.9572 12.0001H16.3286Z" fill="currentColor"/> -</svg> -`,Q5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> - <path id="bar-divider" d="M 9.3 18.951 L 9.3 4.3" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> - <path id="bar-box" d="M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="butt" stroke-linejoin="miter" transform="matrix(1 0 0 1 11.8 11.8)"/> - <path id="bar-arrow" d="M -1.25 -2.5 L 1.25 0 L -1.25 2.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> -</svg> -`,Y5e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> - <path id="bar-divider" d="M 9.3 18.951 L 9.3 4.3" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> - <path id="bar-box" d="M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="butt" stroke-linejoin="miter" transform="matrix(1 0 0 1 11.8 11.8)"/> - <path id="bar-arrow-expand" d="M -1.25 -2.5 L 1.25 0 L -1.25 2.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> -</svg> -`,J5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g> -<path d="M12.9 1.7999C12.9 1.30285 12.4971 0.899902 12 0.899902C11.5029 0.899902 11.1 1.30285 11.1 1.7999V2.7999C11.1 3.29696 11.5029 3.6999 12 3.6999C12.4971 3.6999 12.9 3.29696 12.9 2.7999V1.7999Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M6.1 11.9999C6.1 8.7414 8.74152 6.09988 12 6.09988C15.2585 6.09988 17.9 8.7414 17.9 11.9999C17.9 15.2584 15.2585 17.8999 12 17.8999C8.74152 17.8999 6.1 15.2584 6.1 11.9999ZM12 7.89988C9.73563 7.89988 7.9 9.73551 7.9 11.9999C7.9 14.2642 9.73563 16.0999 12 16.0999C14.2644 16.0999 16.1 14.2642 16.1 11.9999C16.1 9.73551 14.2644 7.89988 12 7.89988Z" fill="currentColor"/> -<path d="M0.899994 11.9999C0.899994 11.5028 1.30294 11.0999 1.79999 11.0999H2.79999C3.29705 11.0999 3.69999 11.5028 3.69999 11.9999C3.69999 12.4969 3.29705 12.8999 2.79999 12.8999H1.79999C1.30294 12.8999 0.899994 12.4969 0.899994 11.9999Z" fill="currentColor"/> -<path d="M12 20.2991C12.4971 20.2991 12.9 20.702 12.9 21.1991V22.1991C12.9 22.6961 12.4971 23.0991 12 23.0991C11.5029 23.0991 11.1 22.6961 11.1 22.1991V21.1991C11.1 20.702 11.5029 20.2991 12 20.2991Z" fill="currentColor"/> -<path d="M21.2016 11.0999C20.7045 11.0999 20.3016 11.5028 20.3016 11.9999C20.3016 12.4969 20.7045 12.8999 21.2016 12.8999H22.2016C22.6986 12.8999 23.1016 12.4969 23.1016 11.9999C23.1016 11.5028 22.6986 11.0999 22.2016 11.0999H21.2016Z" fill="currentColor"/> -<path d="M20.1995 3.79903C20.551 4.1505 20.551 4.72035 20.1995 5.07182L19.4924 5.77893C19.141 6.1304 18.5711 6.1304 18.2196 5.77893C17.8682 5.42746 17.8682 4.85761 18.2196 4.50614L18.9268 3.79903C19.2782 3.44756 19.8481 3.44756 20.1995 3.79903Z" fill="currentColor"/> -<path d="M19.4942 18.2215C19.1427 17.87 18.5729 17.87 18.2214 18.2215C17.87 18.573 17.87 19.1428 18.2214 19.4943L18.9285 20.2014C19.28 20.5529 19.8498 20.5529 20.2013 20.2014C20.5528 19.8499 20.5528 19.2801 20.2013 18.9286L19.4942 18.2215Z" fill="currentColor"/> -<path d="M5.78079 18.2213C6.13227 18.5727 6.13227 19.1426 5.78079 19.4941L5.07369 20.2012C4.72222 20.5526 4.15237 20.5526 3.8009 20.2012C3.44942 19.8497 3.44942 19.2798 3.8009 18.9284L4.508 18.2213C4.85947 17.8698 5.42932 17.8698 5.78079 18.2213Z" fill="currentColor"/> -<path d="M5.07077 3.79912C4.7193 3.44764 4.14945 3.44764 3.79798 3.79912C3.4465 4.15059 3.4465 4.72044 3.79798 5.07191L4.50508 5.77901C4.85655 6.13049 5.4264 6.13049 5.77787 5.77902C6.12935 5.42754 6.12935 4.85769 5.77787 4.50622L5.07077 3.79912Z" fill="currentColor"/> -</g> -</svg> -`,X5e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M3.97427 8.06961C4.99348 7.33581 6.18946 7.1 7.00001 7.1H9.00001C9.49706 7.1 9.90001 7.50294 9.90001 8C9.90001 8.49706 9.49706 8.9 9.00001 8.9H7.00001C6.47755 8.9 5.67353 9.06419 5.02599 9.53039C4.42434 9.96356 3.90001 10.6934 3.90001 12C3.90001 13.3066 4.42434 14.0364 5.02599 14.4696C5.67353 14.9358 6.47755 15.1 7.00001 15.1H9.00001C9.49706 15.1 9.90001 15.5029 9.90001 16C9.90001 16.4971 9.49706 16.9 9.00001 16.9H7.00001C6.18946 16.9 4.99348 16.6642 3.97427 15.9304C2.90917 15.1636 2.10001 13.8934 2.10001 12C2.10001 10.1066 2.90917 8.83644 3.97427 8.06961ZM14.1 8C14.1 7.50294 14.5029 7.1 15 7.1H17C17.8105 7.1 19.0065 7.33581 20.0257 8.06961C21.0908 8.83644 21.9 10.1066 21.9 12C21.9 13.8934 21.0908 15.1636 20.0257 15.9304C19.0065 16.6642 17.8105 16.9 17 16.9H15C14.5029 16.9 14.1 16.4971 14.1 16C14.1 15.5029 14.5029 15.1 15 15.1H17C17.5225 15.1 18.3265 14.9358 18.974 14.4696C19.5757 14.0364 20.1 13.3066 20.1 12C20.1 10.6934 19.5757 9.96356 18.974 9.53039C18.3265 9.06419 17.5225 8.9 17 8.9H15C14.5029 8.9 14.1 8.49706 14.1 8ZM7.10001 12C7.10001 11.5029 7.50295 11.1 8.00001 11.1H16C16.4971 11.1 16.9 11.5029 16.9 12C16.9 12.4971 16.4971 12.9 16 12.9H8.00001C7.50295 12.9 7.10001 12.4971 7.10001 12Z" fill="currentColor"/> -</svg> -`,ebe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M4.10001 5.99998C4.10001 5.50292 4.50295 5.09998 5.00001 5.09998H19C19.4971 5.09998 19.9 5.50292 19.9 5.99998C19.9 6.49703 19.4971 6.89998 19 6.89998H5.00001C4.50295 6.89998 4.10001 6.49703 4.10001 5.99998ZM4.10001 12C4.10001 11.5029 4.50295 11.1 5.00001 11.1H19C19.4971 11.1 19.9 11.5029 19.9 12C19.9 12.497 19.4971 12.9 19 12.9H5.00001C4.50295 12.9 4.10001 12.497 4.10001 12ZM4.10001 18C4.10001 17.5029 4.50295 17.1 5.00001 17.1H19C19.4971 17.1 19.9 17.5029 19.9 18C19.9 18.497 19.4971 18.9 19 18.9H5.00001C4.50295 18.9 4.10001 18.497 4.10001 18Z" fill="currentColor"/> -</svg> -`,tbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<g> -<path fill-rule="evenodd" clip-rule="evenodd" d="M18 4.09961C20.1539 4.09961 21.9004 5.84609 21.9004 8V16C21.9004 18.1539 20.1539 19.9004 18 19.9004H6C3.84609 19.9004 2.09961 18.1539 2.09961 16V8C2.09961 5.84609 3.84609 4.09961 6 4.09961H18ZM3.90039 16C3.90039 17.1598 4.8402 18.0996 6 18.0996H18C19.1598 18.0996 20.0996 17.1598 20.0996 16V9.49805L13.5361 13.5361C12.5955 14.1147 11.4075 14.1084 10.4727 13.5205L3.90039 9.38672V16ZM6 5.90039C5.0746 5.90039 4.29039 6.49909 4.01074 7.33008L11.4316 11.9971C11.7861 12.2199 12.2361 12.2222 12.5928 12.0029L20.0195 7.43457C19.7725 6.54993 18.9636 5.90039 18 5.90039H6Z" fill="currentColor"/> -</g> -</svg> -`,nbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M17 11.0996C17.4971 11.0996 17.9004 11.5029 17.9004 12C17.9004 12.4971 17.4971 12.9004 17 12.9004H7C6.50294 12.9004 6.09961 12.4971 6.09961 12C6.09961 11.5029 6.50294 11.0996 7 11.0996H17Z" fill="currentColor"/> -</svg> -`,ibe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M15.182 3.32802C15.9304 2.72235 17.0309 2.76978 17.724 3.46767L18.5424 4.29189L18.6722 4.43642C19.2377 5.13495 19.234 6.1404 18.6635 6.83486L18.5326 6.97841L18.0248 7.48232C17.9549 7.55172 17.8793 7.61254 17.8021 7.66884C17.9794 8.18027 17.9316 8.7498 17.6595 9.22841C17.6847 9.24522 17.7091 9.2635 17.7328 9.2831L17.8002 9.3456L17.9847 9.53798C19.8515 11.5442 20.4549 14.0022 19.6224 16.2196C19.1921 17.3657 18.4025 18.3827 17.2992 19.203H19.0873L19.1801 19.2079C19.6337 19.2542 19.9877 19.6375 19.9877 20.1034C19.9876 20.5692 19.6337 20.9527 19.1801 20.9989L19.0873 21.0028H13.0385C13.0244 21.0033 13.0104 21.0031 12.9965 21.0028H4.9115C4.41448 21.0028 4.01117 20.6004 4.01111 20.1034C4.01111 19.6064 4.41444 19.203 4.9115 19.203H12.9047C15.7614 18.5471 17.3679 17.1023 17.9369 15.5868C18.4678 14.1726 18.179 12.4782 16.807 10.9188L16.5189 10.6093L16.4574 10.5399C16.4549 10.5368 16.453 10.5333 16.4506 10.5302L12.3011 14.6522C11.6031 15.3454 10.5023 15.3845 9.75818 14.7733L9.61365 14.6425L7.31091 12.3231C6.5717 11.5786 6.57617 10.376 7.32068 9.63662L12.3676 4.62392L12.5121 4.49404C13.0358 4.06988 13.7318 3.96755 14.3402 4.18251C14.3969 4.10597 14.4591 4.03197 14.5287 3.96279L15.0365 3.45791L15.182 3.32802ZM4.83044 12.9335C5.16112 12.6052 5.68305 12.5863 6.03552 12.8759L6.10291 12.9384L9.07361 15.9286L9.13513 15.997C9.42218 16.3514 9.3992 16.8727 9.06873 17.2011C8.7381 17.5294 8.21712 17.5482 7.86462 17.2587L7.79626 17.1972L4.82654 14.2069L4.76501 14.1376C4.47792 13.7831 4.49979 13.2619 4.83044 12.9335ZM13.6693 5.87978L13.6361 5.90126L8.58826 10.914C8.54935 10.9529 8.54943 11.0165 8.58826 11.0556L10.891 13.3739L10.9242 13.3964C10.9602 13.4111 11.0032 13.404 11.0326 13.3749L16.0795 8.3622L16.1019 8.329C16.1117 8.3049 16.1117 8.2779 16.1019 8.2538L16.0804 8.2206L13.7777 5.90224C13.7486 5.87289 13.7054 5.86535 13.6693 5.87978ZM16.3383 4.71376L16.3051 4.73525L15.7972 5.24013C15.7584 5.27904 15.7585 5.34166 15.7972 5.38076L16.6146 6.20498L16.6478 6.22744C16.6838 6.24221 16.7268 6.23487 16.7562 6.20595L17.264 5.70107L17.2865 5.66787C17.2962 5.64382 17.2963 5.61672 17.2865 5.59267L17.265 5.55947L16.4467 4.73623C16.4174 4.70681 16.3744 4.6992 16.3383 4.71376Z" fill="currentColor"/> -</svg> -`,sbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M6 12C6 12.8283 5.32834 13.5 4.5 13.5C3.67166 13.5 3 12.8283 3 12C3 11.1717 3.67166 10.5 4.5 10.5C5.32834 10.5 6 11.1717 6 12Z" fill="currentColor"/> -<path d="M13.5 12C13.5 12.8283 12.8283 13.5 12 13.5C11.1717 13.5 10.5 12.8283 10.5 12C10.5 11.1717 11.1717 10.5 12 10.5C12.8283 10.5 13.5 11.1717 13.5 12Z" fill="currentColor"/> -<path d="M19.5002 13.5C20.3287 13.5 21 12.8287 21 12.0002C21 11.1718 20.3287 10.5 19.5002 10.5C18.6718 10.5 18 11.1718 18 12.0002C18 12.8287 18.6718 13.5 19.5002 13.5Z" fill="currentColor"/> -</svg> -`,obe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M8 12.0993C8.49691 12.0993 8.90016 12.5028 8.90039 12.9997V17.9997C8.90039 19.6013 7.60163 20.9001 6 20.9001C4.39837 20.9001 3.09961 19.6013 3.09961 17.9997C3.09984 16.3982 4.39852 15.0993 6 15.0993C6.38939 15.0993 6.76033 15.1778 7.09961 15.317V12.9997C7.09984 12.5028 7.50309 12.0993 8 12.0993ZM6 16.9001C5.39263 16.9001 4.90062 17.3923 4.90039 17.9997C4.90039 18.6072 5.39249 19.0993 6 19.0993C6.60751 19.0993 7.09961 18.6072 7.09961 17.9997C7.09938 17.3923 6.60737 16.9001 6 16.9001Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M18.627 3.35611C19.8025 3.12106 20.9001 4.02068 20.9004 5.21939V15.9997C20.9004 17.6013 19.6016 18.9001 18 18.9001C16.3984 18.9001 15.0996 17.6013 15.0996 15.9997C15.0998 14.3982 16.3985 13.0993 18 13.0993C18.3894 13.0993 18.7603 13.1778 19.0996 13.317V9.21939C19.0993 9.15657 19.0421 9.10946 18.9805 9.12173L12.6768 10.3825C12.1894 10.4799 11.7148 10.1637 11.6172 9.67642C11.52 9.18922 11.8361 8.71439 12.3232 8.61685L18.627 7.35611C18.7868 7.32415 18.9452 7.31502 19.0996 7.32291V5.21939C19.0993 5.15657 19.0421 5.10946 18.9805 5.12173L12.6768 6.38248C12.1894 6.47994 11.7148 6.16372 11.6172 5.67642C11.52 5.18922 11.8361 4.71439 12.3232 4.61685L18.627 3.35611ZM18 14.9001C17.3926 14.9001 16.9006 15.3923 16.9004 15.9997C16.9004 16.6072 17.3925 17.0993 18 17.0993C18.6075 17.0993 19.0996 16.6072 19.0996 15.9997C19.0994 15.3923 18.6074 14.9001 18 14.9001Z" fill="currentColor"/> -<path d="M7.32422 5.38931C7.61669 4.87032 8.38346 4.87015 8.67578 5.38931L8.73047 5.50845L8.89551 5.95376L8.97949 6.1481C9.19937 6.58817 9.57968 6.93145 10.0459 7.10415L10.4912 7.26919C11.127 7.50461 11.1666 8.36217 10.6104 8.67544L10.4912 8.73013L10.0459 8.89517C9.5799 9.06783 9.19939 9.41141 8.97949 9.85123L8.89551 10.0456L8.73047 10.4909C8.49495 11.1267 7.63737 11.1665 7.32422 10.61L7.26953 10.4909L7.10449 10.0456C6.93172 9.57931 6.58767 9.19898 6.14746 8.97916L5.9541 8.89517L5.50879 8.73013C4.83054 8.47903 4.83061 7.52037 5.50879 7.26919L5.9541 7.10415L6.14746 7.02017C6.58757 6.80032 6.93176 6.41995 7.10449 5.95376L7.26953 5.50845L7.32422 5.38931Z" fill="currentColor"/> -</svg> -`,rbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M17.9551 6.32648C17.955 5.82951 17.5517 5.42706 17.0547 5.42706H15.4844C14.9875 5.42717 14.5851 5.82958 14.585 6.32648V17.6732C14.585 18.1701 14.9874 18.5734 15.4844 18.5735H17.0547C17.5518 18.5735 17.9551 18.1702 17.9551 17.6732V6.32648ZM19.7549 17.6732C19.7549 19.1643 18.5459 20.3734 17.0547 20.3734H15.4844C13.9933 20.3732 12.7842 19.1643 12.7842 17.6732V6.32648C12.7843 4.83546 13.9934 3.62639 15.4844 3.62628H17.0547C18.5458 3.62628 19.7548 4.8354 19.7549 6.32648V17.6732Z" fill="currentColor"/> -<path d="M9.41571 6.32648C9.41561 5.82951 9.01231 5.42706 8.51532 5.42706H6.94501C6.44811 5.42717 6.0457 5.82958 6.04559 6.32648V17.6732C6.04559 18.1701 6.44804 18.5734 6.94501 18.5735H8.51532C9.01238 18.5735 9.41571 18.1702 9.41571 17.6732V6.32648ZM11.2155 17.6732C11.2155 19.1643 10.0065 20.3734 8.51532 20.3734H6.94501C5.45393 20.3732 4.24481 19.1643 4.24481 17.6732V6.32648C4.24492 4.83546 5.45399 3.62639 6.94501 3.62628H8.51532C10.0064 3.62628 11.2154 4.8354 11.2155 6.32648V17.6732Z" fill="currentColor"/> -</svg> -`,lbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M18.0176 4.89998C17.7305 4.89998 17.4552 5.014 17.2522 5.217L6.35429 16.1149C5.957 16.5122 5.67517 17.01 5.53889 17.5551L5.23691 18.763L6.44486 18.4611C6.98994 18.3248 7.48773 18.0429 7.88502 17.6456L18.783 6.74773C18.8834 6.64728 18.9631 6.52797 19.0176 6.39658C19.072 6.26517 19.1 6.12441 19.1 5.98236C19.1 5.84031 19.072 5.69956 19.0176 5.56815C18.9631 5.43676 18.8834 5.31745 18.783 5.217C18.6825 5.11649 18.5631 5.03676 18.4318 4.98237C18.3005 4.92798 18.1597 4.89998 18.0176 4.89998ZM15.9794 3.94421C16.52 3.40366 17.2531 3.09998 18.0176 3.09998C18.3961 3.09998 18.7709 3.17452 19.1207 3.31938C19.4704 3.46424 19.7881 3.67656 20.0558 3.94421C20.3235 4.21192 20.5357 4.52969 20.6805 4.87932C20.8254 5.22895 20.9 5.60375 20.9 5.98236C20.9 6.36098 20.8254 6.73578 20.6805 7.08541C20.5357 7.43504 20.3235 7.75281 20.0558 8.02052L17.6385 10.4378L9.15781 18.9184C8.52984 19.5464 7.74301 19.9919 6.88142 20.2073L4.21828 20.8731C3.91158 20.9498 3.58714 20.8599 3.3636 20.6364C3.14006 20.4128 3.05019 20.0884 3.12686 19.7817L3.79264 17.1185C4.00803 16.257 4.45351 15.4701 5.0815 14.8421L15.9794 3.94421Z" fill="currentColor"/> -</svg> -`,abe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M7.76251 3.10547C8.25776 3.10552 8.74422 3.23849 9.17072 3.49023L19.533 9.60742C20.8536 10.3869 21.2922 12.0901 20.5174 13.4121C20.2785 13.8195 19.9398 14.1604 19.533 14.4004L9.16974 20.5156C7.84721 21.2958 6.14595 20.8511 5.36993 19.5273C5.1196 19.1003 4.98719 18.6142 4.98712 18.1191V5.88672C4.98716 4.3537 6.2273 3.10547 7.76251 3.10547ZM6.7879 18.1191C6.78797 18.2945 6.8343 18.4664 6.92267 18.6172C7.19638 19.0841 7.79336 19.2377 8.25568 18.9648L18.618 12.8496C18.7607 12.7654 18.8803 12.6458 18.9647 12.502C19.2393 12.0334 19.082 11.4311 18.618 11.1572L8.25568 5.04102C8.1061 4.95273 7.93562 4.9063 7.76251 4.90625C7.22703 4.90625 6.78794 5.34218 6.7879 5.88672V18.1191Z" fill="currentColor"/> -</svg> -`,ube=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M18.36 6.64a9 9 0 1 1-12.73 0" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> -<path d="M12 2v10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> -</svg> -`,cbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z" fill="currentColor"/> -<path d="M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 3.7998C7.47126 3.7998 3.7998 7.47126 3.7998 12C3.7998 16.5287 7.47126 20.2002 12 20.2002C16.5287 20.2002 20.2002 16.5287 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998Z" fill="currentColor"/> -</svg> -`,dbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M12 2C13.1046 2 14 2.89543 14 4C14 4.78019 13.552 5.45353 12.9004 5.7832V7H16.5C18.1569 7 19.5 8.34315 19.5 10V17C19.5 18.6051 18.2394 19.9158 16.6543 19.9961L16.5 20H7.5L7.3457 19.9961C5.81166 19.9184 4.58163 18.6883 4.50391 17.1543L4.5 17V10C4.5 8.34315 5.84315 7 7.5 7H11.0996V5.7832C10.448 5.45353 10 4.78019 10 4C10 2.89543 10.8954 2 12 2ZM7.5 8.7998C6.83726 8.7998 6.2998 9.33726 6.2998 10V17C6.2998 17.6627 6.83726 18.2002 7.5 18.2002H16.5C17.1627 18.2002 17.7002 17.6627 17.7002 17V10C17.7002 9.33726 17.1627 8.7998 16.5 8.7998H7.5ZM3 10.7666C3.49706 10.7666 3.90039 11.1699 3.90039 11.667V15C3.90039 15.4971 3.49706 15.9004 3 15.9004C2.50294 15.9004 2.09961 15.4971 2.09961 15V11.667C2.09961 11.1699 2.50294 10.7666 3 10.7666ZM21 10.7666C21.4971 10.7666 21.9004 11.1699 21.9004 11.667V15C21.9004 15.4971 21.4971 15.9004 21 15.9004C20.5029 15.9004 20.0996 15.4971 20.0996 15V11.667C20.0996 11.1699 20.5029 10.7666 21 10.7666ZM9.5 11.0996C9.99706 11.0996 10.4004 11.5029 10.4004 12V14.5C10.4004 14.9971 9.99706 15.4004 9.5 15.4004C9.00294 15.4004 8.59961 14.9971 8.59961 14.5V12C8.59961 11.5029 9.00294 11.0996 9.5 11.0996ZM14.5 11.0996C14.9971 11.0996 15.4004 11.5029 15.4004 12V14.5C15.4004 14.9971 14.9971 15.4004 14.5 15.4004C14.0029 15.4004 13.5996 14.9971 13.5996 14.5V12C13.5996 11.5029 14.0029 11.0996 14.5 11.0996ZM12 3.5C11.7239 3.5 11.5 3.72386 11.5 4C11.5 4.27614 11.7239 4.5 12 4.5C12.2761 4.5 12.5 4.27614 12.5 4C12.5 3.72386 12.2761 3.5 12 3.5Z" fill="currentColor"/> -</svg> -`,fbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M11.5 3C16.1944 3 20 6.80558 20 11.5C20 13.523 19.2933 15.381 18.1132 16.8404L21.1364 19.8636C21.4879 20.2151 21.4879 20.7849 21.1364 21.1364C20.7849 21.4879 20.2151 21.4879 19.8636 21.1364L16.8404 18.1132C15.381 19.2933 13.523 20 11.5 20C6.80558 20 3 16.1944 3 11.5C3 6.80558 6.80558 3 11.5 3ZM11.5 18.2C15.2003 18.2 18.2 15.2003 18.2 11.5C18.2 7.79969 15.2003 4.8 11.5 4.8C7.79969 4.8 4.8 7.79969 4.8 11.5C4.8 15.2003 7.79969 18.2 11.5 18.2Z" fill="currentColor"/> -</svg> -`,hbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M16.5364 10.1636C16.8879 10.5151 16.8879 11.0849 16.5364 11.4364C16.1849 11.7879 15.6151 11.7879 15.2636 11.4364L12.9 9.07281V17.1C12.9 17.597 12.4971 18 12 18C11.503 18 11.1 17.597 11.1 17.1V9.07281L8.73641 11.4364C8.38494 11.7879 7.81509 11.7879 7.46362 11.4364C7.11214 11.0849 7.11214 10.5151 7.46362 10.1636L11.3636 6.2636C11.7151 5.91211 12.2849 5.91211 12.6364 6.2636L16.5364 10.1636Z" fill="currentColor"/> -</svg> -`,pbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M16.0404 12C16.0404 9.76874 14.2313 7.9596 12.0001 7.9596C9.76883 7.9596 7.95972 9.76874 7.95972 12C7.95972 14.2313 9.76883 16.0404 12.0001 16.0404C14.2313 16.0404 16.0404 14.2313 16.0404 12ZM14.2222 12C14.2222 13.2271 13.2271 14.2222 12 14.2222C10.7729 14.2222 9.77783 13.2271 9.77783 12C9.77783 10.7729 10.7729 9.77778 12 9.77778C13.2271 9.77778 14.2222 10.7729 14.2222 12Z" fill="currentColor"/> -<path d="M9.91145 21.8009C9.29001 21.6797 8.76914 21.2612 8.50632 20.6922L8.07372 19.7556C7.88838 19.3544 7.43553 19.1048 6.95371 19.1549L5.89572 19.2647C5.2733 19.3293 4.64823 19.114 4.22298 18.6611C3.74343 18.1504 3.32454 17.6037 2.97033 17.0181C2.61571 16.4318 2.32839 15.8106 2.10407 15.1566C1.89769 14.5549 2.02148 13.8954 2.4089 13.3902L3.0376 12.5704C3.30043 12.2277 3.30042 11.7722 3.03758 11.4295L2.40413 10.6035C2.01474 10.0958 1.891 9.43198 2.10208 8.82826C2.55037 7.54612 3.27017 6.35997 4.22 5.34259C4.64518 4.8872 5.27275 4.67067 5.89701 4.73544L6.95383 4.84514C7.43561 4.89515 7.88844 4.6456 8.07377 4.24441L8.50266 3.31593C8.76494 2.74818 9.28448 2.33019 9.90423 2.20761C11.2916 1.9332 12.7148 1.93127 14.0885 2.19913C14.7099 2.32029 15.2308 2.73881 15.4937 3.3078L15.9263 4.24441C16.1116 4.6456 16.5644 4.89514 17.0462 4.84514L18.1043 4.73532C18.7267 4.67072 19.3518 4.88603 19.777 5.33886C20.2566 5.84953 20.6755 6.3963 21.0297 6.98193C21.3843 7.56823 21.6716 8.18942 21.8959 8.84339C22.1023 9.44509 21.9785 10.1046 21.5911 10.6098L20.9624 11.4295C20.6996 11.7722 20.6996 12.2278 20.9624 12.5705L21.5959 13.3964C21.9853 13.9042 22.109 14.568 21.8979 15.1717C21.4497 16.4538 20.7299 17.6399 19.7801 18.6573C19.3549 19.1128 18.7273 19.3294 18.103 19.2646L17.0462 19.1549C16.5645 19.1049 16.1116 19.3544 15.9263 19.7556L15.4974 20.6841C15.2351 21.2518 14.7156 21.6698 14.0958 21.7924C12.7083 22.0668 11.2852 22.0687 9.91145 21.8009ZM13.7432 20.0088C13.7844 20.0006 13.8259 19.9673 13.847 19.9216L14.2758 18.9931C14.7915 17.8768 15.9886 17.2171 17.2341 17.3464L18.2909 17.4561C18.3649 17.4638 18.4272 17.4423 18.4512 17.4166C19.2296 16.5828 19.8171 15.6146 20.1817 14.5716C20.1845 14.5636 20.1796 14.5373 20.1532 14.5029L19.5198 13.677C18.7564 12.6815 18.7564 11.3185 19.5198 10.323L20.1485 9.5033C20.1746 9.46927 20.1795 9.4429 20.1762 9.43327C19.9932 8.89965 19.7603 8.39623 19.4741 7.92293C19.1873 7.4489 18.846 7.00333 18.4517 6.58351C18.4272 6.55739 18.3656 6.53616 18.2921 6.54378L17.234 6.65361C15.9886 6.78287 14.7915 6.12317 14.2758 5.00689L13.8432 4.07027C13.822 4.02448 13.7811 3.9916 13.7406 3.98371C12.5983 3.76097 11.4132 3.76258 10.2571 3.99124C10.2158 3.99941 10.1744 4.03271 10.1533 4.07842L9.72441 5.00689C9.20875 6.12317 8.01164 6.7829 6.76619 6.6536L5.70942 6.54391C5.63535 6.53623 5.573 6.55774 5.54905 6.5834C4.77067 7.41713 4.18312 8.38534 3.81845 9.42835C3.81564 9.43637 3.82054 9.46265 3.84693 9.49706L4.48038 10.323C5.24381 11.3185 5.24383 12.6815 4.48041 13.6769L3.85171 14.4967C3.82561 14.5307 3.82066 14.5571 3.82396 14.5667C4.00701 15.1004 4.23986 15.6038 4.52613 16.0771C4.81284 16.5511 5.15421 16.9967 5.54845 17.4165C5.57298 17.4426 5.63461 17.4638 5.70811 17.4562L6.76608 17.3464C8.01157 17.2171 9.20871 17.8768 9.72438 18.9932L10.157 19.9297C10.1781 19.9755 10.2191 20.0084 10.2595 20.0163C11.4018 20.239 12.587 20.2374 13.7432 20.0088Z" fill="currentColor"/> -</svg> -`,gbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7Z" fill="currentColor"/> -<path d="M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z" fill="currentColor"/> -<path d="M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z" fill="currentColor"/> -</svg> -`,mbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M2.90005 12C2.90005 11.503 3.303 11.1 3.80005 11.1H12.2939L9.38588 8.19197C9.03441 7.8405 9.03441 7.27065 9.38588 6.91918C9.73735 6.56771 10.3072 6.56771 10.6587 6.91918L15.1031 11.3636C15.2719 11.5324 15.3667 11.7613 15.3667 12C15.3667 12.2387 15.2719 12.4676 15.1031 12.6364L10.6587 17.0809C10.3072 17.4323 9.73735 17.4323 9.38588 17.0809C9.03441 16.7294 9.03441 16.1595 9.38588 15.8081L12.2939 12.9H3.80005C3.303 12.9 2.90005 12.4971 2.90005 12ZM13.5874 20C13.5874 19.503 13.9904 19.1 14.4874 19.1H18.043C18.2758 19.1 18.4991 19.0075 18.6637 18.8429C18.8283 18.6783 18.9208 18.455 18.9208 18.2222V5.7778C18.9208 5.545 18.8283 5.32174 18.6637 5.15712C18.499 4.9925 18.2758 4.90002 18.043 4.90002H14.4874C13.9904 4.90002 13.5874 4.49708 13.5874 4.00002C13.5874 3.50297 13.9904 3.10003 14.4874 3.10003H18.043C18.7532 3.10003 19.4343 3.38215 19.9365 3.88433C20.4386 4.38651 20.7208 5.06761 20.7208 5.7778V18.2222C20.7208 18.9324 20.4386 19.6135 19.9365 20.1157C19.4343 20.6179 18.7532 20.9 18.043 20.9H14.4874C13.9904 20.9 13.5874 20.4971 13.5874 20Z" fill="currentColor"/> -</svg> -`,vbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M20.6364 11.3636C20.9879 11.7151 20.9879 12.2849 20.6364 12.6364L16.1919 17.0808C15.8405 17.4323 15.2706 17.4323 14.9192 17.0808C14.5677 16.7293 14.5677 16.1595 14.9192 15.808L17.8272 12.9H9.33333C8.83627 12.9 8.43333 12.497 8.43333 12C8.43333 11.5029 8.83627 11.1 9.33333 11.1H17.8272L14.9192 8.19193C14.5677 7.84046 14.5677 7.27061 14.9192 6.91914C15.2706 6.56766 15.8405 6.56766 16.1919 6.91914L20.6364 11.3636ZM10.2333 3.99998C10.2333 4.49703 9.83038 4.89998 9.33333 4.89998H5.77777C5.54497 4.89998 5.3217 4.99246 5.15709 5.15707C4.99247 5.32169 4.89999 5.54495 4.89999 5.77775V18.2222C4.89999 18.455 4.99247 18.6783 5.15709 18.8429C5.32171 19.0075 5.54497 19.1 5.77777 19.1H9.33333C9.83038 19.1 10.2333 19.5029 10.2333 20C10.2333 20.497 9.83038 20.9 9.33333 20.9H5.77777C5.06758 20.9 4.38648 20.6179 3.8843 20.1157C3.38212 19.6135 3.09999 18.9324 3.09999 18.2222V5.77775C3.09999 5.06756 3.38212 4.38646 3.8843 3.88428C4.38648 3.3821 5.06758 3.09998 5.77777 3.09998H9.33333C9.83038 3.09998 10.2333 3.50292 10.2333 3.99998Z" fill="currentColor"/> -</svg> -`,ybe='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M18.0 6H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="16" cy="6" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M4 12H6.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M10.5 12H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="8.5" cy="12" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M4 18H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M18.0 18H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="16" cy="18" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/></svg>',bbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M7.78027 8.90405C7.5 9.45411 7.5 10.1742 7.5 11.6144V12.3856C7.5 13.8258 7.5 14.5459 7.78027 15.096C8.02681 15.5798 8.42019 15.9732 8.90405 16.2197C9.45411 16.5 10.1742 16.5 11.6144 16.5H12.3856C13.8258 16.5 14.5459 16.5 15.096 16.2197C15.5798 15.9732 15.9732 15.5798 16.2197 15.096C16.5 14.5459 16.5 13.8258 16.5 12.3856V11.6144C16.5 10.1742 16.5 9.45411 16.2197 8.90405C15.9732 8.42019 15.5798 8.02681 15.096 7.78027C14.5459 7.5 13.8258 7.5 12.3856 7.5H11.6144C10.1742 7.5 9.45411 7.5 8.90405 7.78027C8.42019 8.02681 8.02681 8.42019 7.78027 8.90405Z" fill="currentColor"/> -</svg> -`,kbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M7.01562 3.41459C7.4446 3.16449 7.9954 3.30924 8.24609 3.73784C8.49645 4.167 8.35189 4.71868 7.92285 4.96928C5.51497 6.37506 3.90054 8.98498 3.90039 11.9703C3.90076 16.4435 7.52672 20.0699 12 20.0699C16.4733 20.0699 20.0992 16.4435 20.0996 11.9703C20.0996 11.2291 20 10.5116 19.8145 9.83159C19.6838 9.35222 19.967 8.85702 20.4463 8.72612C20.9256 8.59541 21.4207 8.87778 21.5518 9.35698C21.7792 10.1901 21.9004 11.0674 21.9004 11.9703C21.9 17.4376 17.4674 21.8697 12 21.8697C6.53261 21.8697 2.09998 17.4376 2.09961 11.9703C2.09976 8.31904 4.07782 5.12972 7.01562 3.41459ZM8.39258 8.24077C8.75015 7.89591 9.3199 7.90591 9.66504 8.26323C10.01 8.62076 9.99985 9.19051 9.64258 9.53569C9.00203 10.1541 8.60558 11.02 8.60547 11.979C8.60584 13.8536 10.1253 15.3736 12 15.3736C13.8746 15.3735 15.3942 13.8536 15.3945 11.979C15.3945 11.6847 15.3577 11.3989 15.2881 11.1285C15.1646 10.6474 15.4536 10.1568 15.9346 10.0328C16.4158 9.9089 16.9071 10.1991 17.0312 10.6802C17.1383 11.096 17.1943 11.5321 17.1943 11.979C17.194 14.8477 14.8688 17.1733 12 17.1734C9.1312 17.1734 6.80506 14.8478 6.80469 11.979C6.8048 10.5117 7.41519 9.18431 8.39258 8.24077ZM11.5459 1.12651C11.8216 0.965605 12.1631 0.963306 12.4414 1.11967L19.1953 4.91752C19.4859 5.08108 19.662 5.39277 19.6533 5.72612C19.6443 6.05972 19.4515 6.36154 19.1523 6.50932L12.9004 9.5933V12.2583C12.9004 12.7554 12.4971 13.1587 12 13.1587C11.5029 13.1587 11.0996 12.7554 11.0996 12.2583V1.90385C11.0999 1.58444 11.2702 1.2878 11.5459 1.12651ZM12.9004 7.58549L16.8252 5.64897L12.9004 3.44194V7.58549Z" fill="currentColor"/> -</svg> -`,Abe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M18.9893 6.60743C20.5897 6.60757 21.8877 7.8926 21.8877 9.47736C21.8877 10.7416 21.0607 11.8129 19.9141 12.1955V14.257C19.914 15.8428 18.6152 17.1288 17.0137 17.1289H12.8438V20.1381C12.8437 20.6301 12.4412 21.0293 11.9443 21.0296C11.4473 21.0296 11.044 20.6302 11.0439 20.1381V16.4356C11.0441 15.8343 11.5363 15.3461 12.1436 15.3458H17.0137C17.6211 15.3457 18.1133 14.8585 18.1133 14.257V12.2129C16.9408 11.8451 16.0909 10.7598 16.0908 9.47736C16.0908 7.89251 17.3887 6.60743 18.9893 6.60743ZM18.9893 8.38953C18.3828 8.38953 17.8906 8.87684 17.8906 9.47736C17.8907 10.0778 18.3828 10.5642 18.9893 10.5642C19.5956 10.5641 20.0869 10.0777 20.0869 9.47736C20.0869 8.87693 19.5956 8.38967 18.9893 8.38953Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M4.89844 6.60743C6.49899 6.60747 7.79688 7.89254 7.79688 9.47736C7.79684 10.7388 6.97371 11.8078 5.83105 12.1926V14.4021C5.83105 15.0036 6.32315 15.4918 6.93066 15.4918H8.37109C8.86789 15.492 9.27038 15.8905 9.27051 16.3824C9.27051 16.8744 8.86797 17.2737 8.37109 17.2739H6.93066C5.32904 17.2739 4.03027 15.9879 4.03027 14.4021V12.2158C2.85382 11.8504 2.00004 10.7627 2 9.47736C2 7.89251 3.29784 6.60743 4.89844 6.60743ZM4.89844 8.38953C4.29196 8.38953 3.7998 8.87684 3.7998 9.47736C3.79985 10.0778 4.29198 10.5642 4.89844 10.5642C5.50485 10.5642 5.99605 10.0778 5.99609 9.47736C5.99609 8.87687 5.50488 8.38958 4.89844 8.38953Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9434 2.9707C13.5439 2.97075 14.8418 4.25581 14.8418 5.84063C14.8418 7.11413 14.0035 8.1923 12.8438 8.56745V13.0135C12.8436 13.5056 12.4403 13.9041 11.9434 13.9041C11.4466 13.9039 11.0431 13.5055 11.043 13.0135V8.56745C9.8836 8.19209 9.04496 7.11387 9.04492 5.84063C9.04492 4.25592 10.343 2.97093 11.9434 2.9707ZM11.9434 4.75281C11.3371 4.75303 10.8447 5.24026 10.8447 5.84063C10.8448 6.44097 11.3371 6.92726 11.9434 6.92749C12.5498 6.92745 13.041 6.44108 13.041 5.84063C13.041 5.24014 12.5498 4.75285 11.9434 4.75281Z" fill="currentColor"/> -</svg> -`,Cbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M16.5293 15.0596C16.9496 15.1021 17.2772 15.4572 17.2773 15.8887C17.2773 16.3202 16.9497 16.6753 16.5293 16.7178L16.4443 16.7217H12C11.5399 16.7216 11.167 16.3488 11.167 15.8887C11.1671 15.4286 11.54 15.0558 12 15.0557H16.4443L16.5293 15.0596Z" fill="currentColor"/> -<path d="M6.96582 7.52246C7.27077 7.21751 7.75375 7.1983 8.08105 7.46484L8.14453 7.52246L10.8232 10.2002C11.5102 10.8872 11.5102 12.0014 10.8232 12.6885L8.14453 15.3672L8.08105 15.4248C7.75377 15.6913 7.27075 15.6721 6.96582 15.3672C6.66114 15.0621 6.64234 14.5791 6.90918 14.252L6.96582 14.1885L9.64453 11.5098C9.68057 11.4736 9.68062 11.415 9.64453 11.3789L6.96582 8.7002C6.64116 8.37488 6.6411 7.84774 6.96582 7.52246Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M17 3.09961C19.1539 3.09966 20.9004 4.84612 20.9004 7V17C20.9004 19.1539 19.1539 20.9003 17 20.9004H7C4.84609 20.9004 3.09961 19.1539 3.09961 17V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H17ZM7 4.90039C5.8402 4.90039 4.90039 5.8402 4.90039 7V17C4.90039 18.1598 5.8402 19.0996 7 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V7C19.0996 5.84024 18.1598 4.90044 17 4.90039H7Z" fill="currentColor"/> -</svg> -`,wbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M16.9971 3.90597C15.9799 2.99725 14.7342 2.38312 13.394 2.12966C12.0538 1.8762 10.6699 1.99301 9.39111 2.46751C8.11236 2.94202 6.98721 3.75626 6.13676 4.82261C5.2863 5.88896 4.74274 7.16703 4.56457 8.5193C4.40455 9.70501 4.53253 10.9118 4.93767 12.0376C5.34281 13.1634 6.01318 14.175 6.89207 14.9868C7.43557 15.4634 7.87413 16.0477 8.17997 16.7027C8.48581 17.3577 8.65224 18.0691 8.66873 18.7918V18.926C8.66962 19.7412 8.99387 20.5229 9.57035 21.0993C10.1468 21.6758 10.9285 22.0001 11.7437 22.001H12.2604C13.0757 22.0001 13.8573 21.6758 14.4338 21.0993C15.0103 20.5229 15.3345 19.7412 15.3354 18.926V18.4685C15.3479 17.8297 15.4982 17.2011 15.7761 16.6258C16.0539 16.0505 16.4528 15.542 16.9454 15.1351C17.7442 14.4355 18.3853 13.5741 18.826 12.608C19.2668 11.642 19.4973 10.5932 19.5022 9.53136C19.5071 8.46948 19.2863 7.41869 18.8544 6.4486C18.4225 5.4785 17.7894 4.61125 16.9971 3.9043V3.90597ZM12.2604 20.3343H11.7437C11.3704 20.3339 11.0124 20.1853 10.7484 19.9213C10.4844 19.6573 10.3358 19.2993 10.3354 18.926C10.3354 18.926 10.3296 18.7093 10.3287 18.6676H13.6687V18.926C13.6683 19.2993 13.5198 19.6573 13.2558 19.9213C12.9917 20.1853 12.6338 20.3339 12.2604 20.3343ZM15.8437 13.8835C14.8949 14.7064 14.2097 15.7908 13.8737 17.001H12.8354V11.0143C13.3212 10.8426 13.742 10.5249 14.0403 10.1049C14.3387 9.68482 14.4999 9.18285 14.5021 8.66763C14.5021 8.44662 14.4143 8.23466 14.258 8.07838C14.1017 7.9221 13.8897 7.8343 13.6687 7.8343C13.4477 7.8343 13.2358 7.9221 13.0795 8.07838C12.9232 8.23466 12.8354 8.44662 12.8354 8.66763C12.8354 8.88865 12.7476 9.10061 12.5913 9.25689C12.435 9.41317 12.2231 9.50097 12.0021 9.50097C11.7811 9.50097 11.5691 9.41317 11.4128 9.25689C11.2565 9.10061 11.1687 8.88865 11.1687 8.66763C11.1687 8.44662 11.0809 8.23466 10.9247 8.07838C10.7684 7.9221 10.5564 7.8343 10.3354 7.8343C10.1144 7.8343 9.90242 7.9221 9.74614 8.07838C9.58986 8.23466 9.50207 8.44662 9.50207 8.66763C9.5042 9.18285 9.66547 9.68482 9.96381 10.1049C10.2621 10.5249 10.683 10.8426 11.1687 11.0143V17.001H10.0671C9.69123 15.7586 8.98633 14.6411 8.02707 13.7668C7.21286 13.0081 6.63267 12.0324 6.35496 10.9547C6.07725 9.87703 6.1136 8.7424 6.45974 7.68471C6.80588 6.62702 7.44735 5.69042 8.30846 4.98543C9.16956 4.28045 10.2144 3.83649 11.3196 3.70597C11.5487 3.68039 11.779 3.66759 12.0096 3.66763C13.4409 3.66338 14.8226 4.19149 15.8862 5.1493C16.5026 5.69896 16.9952 6.37337 17.3312 7.12782C17.6672 7.88227 17.839 8.69952 17.8352 9.5254C17.8314 10.3513 17.6522 11.1669 17.3092 11.9183C16.9663 12.6696 16.4677 13.3395 15.8462 13.8835H15.8437Z" fill="currentColor"/> -</svg> -`,xbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M9.28994 4.92561C9.6436 4.57634 9.64716 4.0065 9.29789 3.65284C8.94862 3.29918 8.37878 3.29563 8.02512 3.6449L5.91339 5.73041L5.16642 4.95888C4.82067 4.60177 4.2509 4.59256 3.89379 4.9383C3.53668 5.28404 3.52747 5.85382 3.87321 6.21093L5.25245 7.63551C5.41956 7.80811 5.64874 7.90674 5.88897 7.90943C6.1292 7.91213 6.36053 7.81866 6.53146 7.64985L9.28994 4.92561Z" fill="currentColor"/> -<path d="M12 5.10022C11.503 5.10022 11.1 5.50316 11.1 6.00022C11.1 6.49728 11.503 6.90022 12 6.90022L19.9965 6.90022C20.4935 6.90022 20.8965 6.49728 20.8965 6.00022C20.8965 5.50316 20.4935 5.10022 19.9965 5.10022L12 5.10022Z" fill="currentColor"/> -<path d="M12 11.1002C11.503 11.1002 11.1 11.5032 11.1 12.0002C11.1 12.4973 11.503 12.9002 12 12.9002H19.9965C20.4935 12.9002 20.8965 12.4973 20.8965 12.0002C20.8965 11.5032 20.4935 11.1002 19.9965 11.1002L12 11.1002Z" fill="currentColor"/> -<path d="M11.1 18.0002C11.1 17.5032 11.503 17.1002 12 17.1002L19.9965 17.1002C20.4935 17.1002 20.8965 17.5032 20.8965 18.0002C20.8965 18.4973 20.4935 18.9002 19.9965 18.9002H12C11.503 18.9002 11.1 18.4973 11.1 18.0002Z" fill="currentColor"/> -<path d="M9.29789 9.77064C9.64716 10.1243 9.6436 10.6941 9.28994 11.0434L6.53146 13.7676C6.36053 13.9365 6.1292 14.0299 5.88897 14.0272C5.64874 14.0245 5.41956 13.9259 5.25245 13.7533L3.87321 12.3287C3.52747 11.9716 3.53668 11.4018 3.89379 11.0561C4.2509 10.7104 4.82067 10.7196 5.16642 11.0767L5.91339 11.8482L8.02512 9.76269C8.37878 9.41342 8.94862 9.41698 9.29789 9.77064Z" fill="currentColor"/> -<path d="M9.29789 15.7436C9.64716 16.0973 9.6436 16.6671 9.28994 17.0164L6.53146 19.7406C6.36053 19.9094 6.1292 20.0029 5.88897 20.0002C5.64874 19.9975 5.41956 19.8989 5.25245 19.7263L3.87321 18.3017C3.52747 17.9446 3.53668 17.3748 3.89379 17.0291C4.2509 16.6833 4.82067 16.6926 5.16642 17.0497L5.91339 17.8212L8.02512 15.7357C8.37878 15.3864 8.94862 15.39 9.29789 15.7436Z" fill="currentColor"/> -</svg> -`,_be=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path fill-rule="evenodd" clip-rule="evenodd" d="M8.09752 2.19507C8.5421 1.97278 9.08271 2.15298 9.305 2.59756L10.0562 4.10005H13.5C13.9971 4.10005 14.4 4.50299 14.4 5.00005C14.4 5.49711 13.9971 5.90005 13.5 5.90005H12.3106C12.2556 6.2319 12.1667 6.64073 12.0226 7.0987C11.7254 8.04355 11.191 9.20402 10.2334 10.3239C11.4166 11.196 12.5606 11.7524 13.4512 12.0987C13.978 12.3036 14.4136 12.434 14.7124 12.5122L14.7348 12.5181L15.695 10.5976C15.8475 10.2927 16.1591 10.1 16.5 10.1C16.8409 10.1 17.1525 10.2927 17.305 10.5976L20.7969 17.5814L20.8044 17.5959L20.8137 17.615L21.805 19.5976C22.0273 20.0421 21.8471 20.5827 21.4025 20.805C20.9579 21.0273 20.4173 20.8471 20.195 20.4025L19.4438 18.9H13.5562L12.805 20.4025C12.5827 20.8471 12.0421 21.0273 11.5975 20.805C11.1529 20.5827 10.9727 20.0421 11.195 19.5976L12.1863 17.615C12.1917 17.6036 12.1973 17.5924 12.2031 17.5814L13.9146 14.1583C13.6034 14.0667 13.2256 13.9423 12.7988 13.7764C11.7294 13.3605 10.3442 12.6802 8.92538 11.5924C7.79753 12.5167 6.69473 13.0764 5.83285 13.4112C5.33899 13.603 4.92286 13.7216 4.62401 13.7931C4.47449 13.8288 4.35399 13.8529 4.26741 13.8684C4.2241 13.8762 4.18924 13.8818 4.16343 13.8858L4.13156 13.8904L4.12084 13.8919L4.11682 13.8924L4.11514 13.8927C4.11514 13.8927 4.11368 13.8928 4.00001 13L4.11368 13.8928C3.62061 13.9556 3.17 13.6068 3.10722 13.1137C3.0446 12.6219 3.39148 12.1723 3.88256 12.1077L3.94947 12.0967C4.00428 12.0869 4.09114 12.0698 4.20543 12.0424C4.43422 11.9877 4.77156 11.8924 5.18106 11.7334C5.84103 11.477 6.68484 11.0564 7.56458 10.3753C7.15054 9.93496 6.78945 9.48388 6.50421 9.10102C6.26672 8.78224 6.07517 8.50172 5.94227 8.29973C5.87571 8.19858 5.82359 8.11671 5.78748 8.05909C5.76942 8.03027 5.75535 8.00749 5.74545 7.99135L5.73377 7.9722L5.73032 7.96651L5.72864 7.96371C5.71133 7.9349 5.69582 7.9055 5.68208 7.87566C5.49265 7.46416 5.6393 6.96717 6.03659 6.72853C6.09037 6.69623 6.14617 6.6702 6.20315 6.65023C6.59739 6.51205 7.04758 6.66421 7.27129 7.03623L7.27266 7.0385L7.28001 7.05054C7.28695 7.06186 7.29793 7.07964 7.31274 7.10328C7.34239 7.15059 7.38731 7.2212 7.44595 7.31032C7.56343 7.48886 7.73484 7.73997 7.94765 8.02562C8.21085 8.37889 8.52772 8.77187 8.8756 9.14201C9.64226 8.24147 10.0681 7.3133 10.3056 6.55854C10.381 6.3186 10.4372 6.09683 10.4791 5.90005H9.51951C9.50696 5.90031 9.49442 5.90031 9.48191 5.90005H4.00001C3.50296 5.90005 3.10001 5.49711 3.10001 5.00005C3.10001 4.50299 3.50296 4.10005 4.00001 4.10005H8.04378L7.69503 3.40254C7.67314 3.35877 7.65516 3.31407 7.64094 3.26883C7.51078 2.8546 7.69671 2.39547 8.09752 2.19507ZM16.5 13.0125L18.5438 17.1H14.4562L16.5 13.0125Z" fill="currentColor"/> -<path d="M15.1 4.00007C15.1 3.50301 15.5029 3.10007 16 3.10007H18C19.6016 3.10007 20.9 4.39844 20.9 6.00007V8.00007C20.9 8.49712 20.497 8.90007 20 8.90007C19.5029 8.90007 19.1 8.49712 19.1 8.00007V6.00007C19.1 5.39255 18.6075 4.90007 18 4.90007H16C15.5029 4.90007 15.1 4.49712 15.1 4.00007Z" fill="currentColor"/> -<path d="M3.99998 15.1001C4.49703 15.1001 4.89998 15.503 4.89998 16.0001V18.0001C4.89998 18.6076 5.39246 19.1001 5.99998 19.1001H7.99998C8.49703 19.1001 8.89998 19.503 8.89998 20.0001C8.89998 20.4971 8.49703 20.9001 7.99998 20.9001H5.99998C4.39835 20.9001 3.09998 19.6017 3.09998 18.0001V16.0001C3.09998 15.503 3.50292 15.1001 3.99998 15.1001Z" fill="currentColor"/> -</svg> -`,Sbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M8.10001 3C8.10001 2.50294 8.50295 2.1 9.00001 2.1H15C15.4971 2.1 15.9 2.50294 15.9 3C15.9 3.49706 15.4971 3.9 15 3.9H9.00001C8.50295 3.9 8.10001 3.49706 8.10001 3Z" fill="currentColor"/> -<path d="M10 15.9C9.50295 15.9 9.10001 15.4971 9.10001 15L9.10001 10C9.10001 9.50294 9.50295 9.1 10 9.1C10.4971 9.1 10.9 9.50294 10.9 10L10.9 15C10.9 15.4971 10.4971 15.9 10 15.9Z" fill="currentColor"/> -<path d="M13.1 15C13.1 15.4971 13.5029 15.9 14 15.9C14.4971 15.9 14.9 15.4971 14.9 15L14.9 10C14.9 9.50294 14.4971 9.1 14 9.1C13.5029 9.1 13.1 9.50294 13.1 10V15Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M2.10001 6C2.10001 5.50294 2.50295 5.1 3.00001 5.1H4.99152C4.99785 5.09993 5.00417 5.09993 5.01048 5.1H18.9895C18.9958 5.09993 19.0021 5.09993 19.0085 5.1H21C21.4971 5.1 21.9 5.50294 21.9 6C21.9 6.49706 21.4971 6.9 21 6.9H19.8281L18.8448 18.6993C18.7412 19.9432 17.7013 20.9 16.4531 20.9H7.54686C6.29865 20.9 5.25881 19.9432 5.15515 18.6993L4.17188 6.9H3.00001C2.50295 6.9 2.10001 6.49706 2.10001 6ZM5.97811 6.9L18.0219 6.9L17.0511 18.5498C17.0251 18.8608 16.7652 19.1 16.4531 19.1H7.54686C7.23481 19.1 6.97485 18.8608 6.94893 18.5498L5.97811 6.9Z" fill="currentColor"/> -</svg> -`,Mbe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M7.36336 3.3634C7.71483 3.01192 8.28533 3.01192 8.6368 3.3634C8.98817 3.71488 8.98824 4.2854 8.6368 4.63683L6.17391 7.09972H15.0001C18.2585 7.09977 20.9005 9.74166 20.9005 13.0001C20.9004 16.2585 18.2585 18.9005 15.0001 18.9005H7.00008C6.50307 18.9005 6.09976 18.4971 6.09969 18.0001C6.09969 17.5031 6.50302 17.0997 7.00008 17.0997H15.0001C17.2644 17.0997 19.0996 15.2644 19.0997 13.0001C19.0997 10.7358 17.2644 8.90055 15.0001 8.90051H6.17391L8.6368 11.3634L8.69832 11.4318C8.98668 11.7853 8.96632 12.3073 8.6368 12.6368C8.30728 12.9663 7.78521 12.9867 7.43172 12.6984L7.36336 12.6368L3.36336 8.63683C3.33098 8.60445 3.30286 8.56908 3.27645 8.53332C3.25597 8.50559 3.23607 8.47741 3.21883 8.44738C3.20492 8.42311 3.19221 8.39837 3.18074 8.37316C3.1764 8.36365 3.17109 8.35453 3.16707 8.34484C3.1627 8.33427 3.1593 8.32331 3.15535 8.31261C3.12946 8.24274 3.11237 8.16872 3.10457 8.09191C3.09258 7.97426 3.10262 7.85446 3.1368 7.74035C3.14281 7.72035 3.15094 7.70114 3.15828 7.68176C3.16165 7.67283 3.16341 7.66325 3.16707 7.65441C3.17216 7.64216 3.17806 7.63025 3.18367 7.61828C3.19055 7.60356 3.19744 7.58874 3.20516 7.57433C3.24709 7.49624 3.3012 7.42556 3.36336 7.3634L7.36336 3.3634Z" fill="currentColor"/> -</svg> -`,Ibe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M11.9997 12.8779C16.0197 12.878 19.4393 15.3848 20.7048 18.8828C21.0812 19.9234 20.2782 20.8962 19.2038 21.0137L18.9861 21.0264H5.0134L4.79562 21.0137C3.7213 20.8961 2.91743 19.9233 3.29367 18.8828C4.55905 15.3847 7.9797 12.8781 11.9997 12.8779ZM11.9997 14.6777C8.84467 14.6779 6.17462 16.5794 5.09152 19.2256H18.9079C17.8248 16.5793 15.1549 14.6778 11.9997 14.6777ZM12.2312 3.00586C14.6088 3.1264 16.4997 5.09239 16.4997 7.5L16.4939 7.73145C16.3734 10.1091 14.4073 11.9999 11.9997 12C9.59225 11.9998 7.62604 10.109 7.50558 7.73145L7.49973 7.5C7.49973 5.01485 9.51462 3.00021 11.9997 3L12.2312 3.00586ZM11.9997 4.7998C10.5087 4.80001 9.29953 6.00896 9.29953 7.5C9.29953 8.99104 10.5087 10.2 11.9997 10.2002C13.4908 10.2001 14.6999 8.99112 14.6999 7.5C14.6999 6.00888 13.4908 4.79989 11.9997 4.7998Z" fill="currentColor"/> -</svg> -`,Ebe=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> -<path d="M11.9996 7C11.5026 7 11.0996 7.36985 11.0996 7.82609V14.1739C11.0996 14.6301 11.5026 15 11.9996 15C12.4967 15 12.8996 14.6301 12.8996 14.1739V7.82609C12.8996 7.36985 12.4967 7 11.9996 7Z" fill="currentColor"/> -<path d="M12.8996 17.1006C12.8996 17.5974 12.4968 18.001 11.9992 18.001C11.5024 18.001 11.0996 17.5974 11.0996 17.1006C11.0996 16.6038 11.5024 16.2002 11.9992 16.2002C12.4968 16.2002 12.8996 16.6038 12.8996 17.1006Z" fill="currentColor"/> -<path fill-rule="evenodd" clip-rule="evenodd" d="M14.5108 3.5501C13.3946 1.61676 10.6041 1.61676 9.48786 3.5501L1.69363 17.0501C0.577423 18.9834 1.97269 21.4001 4.20511 21.4001H19.7936C22.026 21.4001 23.4212 18.9834 22.305 17.0501L14.5108 3.5501ZM11.0467 4.4501C11.4701 3.71676 12.5286 3.71676 12.952 4.4501L20.7462 17.9501C21.1696 18.6834 20.6403 19.6001 19.7936 19.6001H4.20511C3.35833 19.6001 2.82909 18.6834 3.25248 17.9501L11.0467 4.4501Z" fill="currentColor"/> -</svg> -`,Tbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm11-2v16"/><path d="m9 10l2 2l-2 2"/></g></svg>',Lbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3L18 10a3 3 0 0 0-6-6l-6.5 6.5a4.5 4.5 0 0 0 9 9L21 13"/></svg>',Nbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12A2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3m16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5"/></svg>',Fbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M9 3V1H7v2H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-4V1h-2v2zm-5 7h16v9H4zm0-5h3v1h2V5h6v1h2V5h3v3H4zm5.879 5.964L12 13.086l2.121-2.122l1.415 1.415l-2.122 2.121l2.121 2.121l-1.414 1.414L12 15.915l-2.121 2.12l-1.415-1.414l2.122-2.12l-2.122-2.122z"/></svg>',Bbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M7 3V1h2v2h6V1h2v2h4a1 1 0 0 1 1 1v5h-2V5h-3v2h-2V5H9v2H7V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm10 9a4 4 0 1 0 0 8a4 4 0 0 0 0-8m-6 4a6 6 0 1 1 12 0a6 6 0 0 1-12 0m5-3v3.414l2.293 2.293l1.414-1.414L18 15.586V13z"/></svg>',$be='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1zm11 10H4v8h16zM8 14v2H6v-2zm10 0v2h-8v-2zM7 5H4v4h16V5h-3v2h-2V5H9v2H7z"/></svg>',Dbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="m23 12l-7.071 7.071l-1.414-1.414L20.172 12l-5.657-5.657l1.414-1.414zM3.828 12l5.657 5.657l-1.414 1.414L1 12l7.071-7.071l1.414 1.414z"/></svg>',Rbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-4-7h8a4 4 0 0 1-8 0m0-2a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8 0a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3"/></svg>',zbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z"/></svg>',Obe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M12 3c5.392 0 9.878 3.88 10.819 9c-.94 5.12-5.427 9-10.819 9s-9.878-3.88-10.818-9C2.122 6.88 6.608 3 12 3m0 16a9.005 9.005 0 0 0 8.778-7a9.005 9.005 0 0 0-17.555 0A9.005 9.005 0 0 0 12 19m0-2.5a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5"/></svg>',Pbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M17.883 19.297A10.95 10.95 0 0 1 12 21c-5.392 0-9.878-3.88-10.818-9A11 11 0 0 1 4.52 5.935L1.394 2.808l1.414-1.414l19.799 19.798l-1.414 1.415zM5.936 7.35A8.97 8.97 0 0 0 3.223 12a9.005 9.005 0 0 0 13.201 5.838l-2.028-2.028A4.5 4.5 0 0 1 8.19 9.604zm6.978 6.978l-3.242-3.241a2.5 2.5 0 0 0 3.241 3.241m7.893 2.265l-1.431-1.431A8.9 8.9 0 0 0 20.778 12A9.005 9.005 0 0 0 9.552 5.338L7.974 3.76C9.221 3.27 10.58 3 12 3c5.392 0 9.878 3.88 10.819 9a10.95 10.95 0 0 1-2.012 4.593m-9.084-9.084Q11.86 7.5 12 7.5a4.5 4.5 0 0 1 4.492 4.778z"/></svg>',jbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M15 4H5v16h14V8h-4zM3 2.992C3 2.444 3.447 2 3.999 2H16l5 5v13.993A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008zM11 11V8h2v3h3v2h-3v3h-2v-3H8v-2z"/></svg>',Hbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"/></svg>',Wbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"/></svg>',qbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2M3 6a3 3 0 1 1 4 2.83V9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-.17a3.001 3.001 0 1 1 2 0V9a4 4 0 0 1-4 4h-2v2.17a3.001 3.001 0 1 1-2 0V13H9a4 4 0 0 1-4-4v-.17A3 3 0 0 1 3 6m15-1a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-6 12a1 1 0 1 0 0 2a1 1 0 0 0 0-2"/></svg>',Ube='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M15 5h2a2 2 0 0 1 2 2v8.17a3.001 3.001 0 1 1-2 0V7h-2v3l-4.5-4L15 2zM5 8.83a3.001 3.001 0 1 1 2 0v6.34a3.001 3.001 0 1 1-2 0zM6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 12a1 1 0 1 0 0-2a1 1 0 0 0 0 2m12 0a1 1 0 1 0 0-2a1 1 0 0 0 0 2"/></svg>',Kbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2 18h7v2H2zm0-7h9v2H2zm0-7h20v2H2zm18.674 9.025l1.156-.391l1 1.732l-.916.805a4 4 0 0 1 0 1.658l.916.805l-1 1.732l-1.156-.391a4 4 0 0 1-1.435.83L19 21h-2l-.24-1.196a4 4 0 0 1-1.434-.83l-1.156.392l-1-1.732l.916-.805a4 4 0 0 1 0-1.658l-.916-.805l1-1.732l1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196a4 4 0 0 1 1.434.83M18 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4"/></svg>',Vbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M10 2a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H8v2h5V9a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H8v6h5v-1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H7a1 1 0 0 1-1-1V8H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm9 16h-4v2h4zm0-8h-4v2h4zM9 4H5v2h4z"/></svg>',Zbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="m13.827 1.69l8.486 8.485l-1.415 1.414l-.707-.707l-4.242 4.243l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243l1.414-1.414l3.536-.707l4.242-4.243l-.707-.707zm.707 3.536l-4.67 4.67l-2.822.565l6.5 6.5l.564-2.822l4.671-4.67z"/></svg>',Gbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"/></svg>',Qbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928z"/></svg>',Ybe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928zm0-2.292l4.247 2.377l-.948-4.773l3.573-3.305l-4.833-.573l-2.038-4.419l-2.039 4.42l-4.833.572l3.573 3.305l-.948 4.773z"/></svg>',Jbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M5.33 3.272a3.5 3.5 0 0 1 4.254 4.962l10.709 10.71l-1.414 1.414l-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 0 0 2.121-2.121zm10.367 1.883l3.182-1.768l1.414 1.415l-1.768 3.182l-1.768.353l-2.12 2.121l-1.415-1.414l2.121-2.121zm-6.718 8.132l1.415 1.414l-5.304 5.303a1 1 0 0 1-1.492-1.327l.078-.087z"/></svg>',Xbe='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="m20.97 17.172l-1.414 1.414l-3.535-3.535l-.073.074l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243L5.34 8.761l3.536-.707l.073-.074l-3.536-3.536L6.828 3.03zM10.365 9.394l-.502.502l-2.822.565l6.5 6.5l.564-2.822l.502-.502zm8.411.074l-1.34 1.34l1.414 1.415l1.34-1.34l.707.707l1.415-1.415l-8.486-8.485l-1.414 1.414l.707.707l-1.34 1.34l1.414 1.415l1.34-1.34z"/></svg>',eke={sm:14,md:16,lg:20};function St(e,t){return{component:e,svg:t}}const a$={plus:St(n9e,p5e),"chat-new":St(o9e,g5e),"calendar-close":St(l8e,Fbe),"calendar-schedule":St(c8e,Bbe),"calendar-todo":St(h8e,$be),close:St(j9e,M5e),check:St(w9e,A5e),"circle-check":St($9e,_5e),archive:St(a9e,m5e),search:St(J4e,fbe),copy:St(Q9e,T5e),link:St(h4e,X5e),"external-link":St(C8e,zbe),download:St(nye,N5e),undo:St(W3e,Mbe),send:St(t3e,hbe),image:St(Kye,K5e),settings:St(s3e,pbe),sliders:St(m3e,ybe),"light-mode":St(c4e,J5e),"dark-mode":St(X9e,L5e),"follow-system":St(Iye,P5e),"log-in":St(c3e,mbe),"log-out":St(h3e,vbe),hand:St(Pye,q5e),"full-access":St(Lye,j5e),"shield-question":St(l3e,gbe),"chevron-down":St(S9e,C5e),"chevron-right":St(E9e,w5e),"chevron-up":St(N9e,x5e),"arrow-up":St(k9e,k5e),"arrow-down":St(d9e,v5e),"arrow-right":St(v9e,b5e),"arrow-left":St(p9e,y5e),minus:St(C4e,nbe),microscope:St(_4e,ibe),"panel-collapse":St(s4e,Q5e),"panel-collapse-right":St(J3e,Tbe),"panel-expand":St(l4e,Y5e),expand:St(aye,B5e),collapse:St(q9e,I5e),list:St(m4e,ebe),"list-settings":St(K8e,Kbe),"tree-view":St(G8e,Vbe),sort:St(t5e,Gbe),grip:St(Rye,W5e),folder:St(bye,R5e),"folder-closed":St(mye,D5e),"folder-plus":St(_ye,O5e),"folder-solid":St(R8e,Wbe),file:St(ES,TS),"file-text":St(hye,$5e),"file-edit":St(oye,F5e),"file-plus":St(L8e,jbe),"file-off":St(ES,TS),attachment:St(t8e,Lbe),"image-off":St(Gye,V5e),eye:St(_8e,Obe),"eye-off":St(I8e,Pbe),code:St(m8e,Dbe),terminal:St(I3e,Cbe),pencil:St(R4e,lbe),tool:St(c5e,Jbe),glob:St(s8e,Nbe),globe:St(Bye,H5e),translate:St(R3e,_be),"check-list":St(B3e,xbe),bolt:St(B8e,Hbe),keyboard:St(t4e,G5e),trash:St(P3e,Sbe),"git-fork":St(P8e,qbe),"git-pull-request":St(W8e,Ube),message:St(V9e,E5e),mail:St(b4e,tbe),user:St(K3e,Ibe),info:St(Jye,Z5e),"help-circle":St(K4e,cbe),"alert-triangle":St(G3e,Ebe),clock:St(z9e,S5e),robot:St(G4e,dbe),sparkles:St(_3e,Abe),"gen-title":St(Cye,z5e),histogram:St(Wye,U5e),music:St(L4e,obe),emoji:St(b8e,Rbe),target:St(C3e,kbe),pause:St(B4e,rbe),play:St(P4e,abe),power:St(W4e,ube),pin:St(J8e,Zbe),stop:St(b3e,bbe),star:St(s5e,Qbe),"star-outline":St(l5e,Ybe),unpin:St(h5e,Xbe),"dots-horizontal":St(I4e,sbe),thinking:St(L3e,wbe)};function tke(e){return a$[e]}function nke(e,t){return e.replace(/<svg\b[^>]*>/,n=>n.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^<svg\b/,`<svg class="kw-icon" width="${t}" height="${t}" aria-hidden="true"`)}function Wd(e,t="md"){const n=a$[e];return n?nke(n.svg,eke[t]):""}const DYe=[["Actions",["plus","attachment","chat-new","close","check","search","copy","link","external-link","download","undo","send","image","settings","sliders","log-in","log-out","eye","eye-off"]],["Navigation & layout",["chevron-down","chevron-right","chevron-up","arrow-up","arrow-down","arrow-right","arrow-left","minus","panel-collapse","panel-collapse-right","panel-expand","expand","collapse","list","list-settings","tree-view","sort","grip"]],["Files & tools",["folder","folder-closed","folder-plus","folder-solid","file","file-text","file-edit","file-plus","file-off","image-off","code","terminal","pencil","tool","glob","globe","check-list","bolt","git-fork","git-pull-request","archive","pin","unpin","target","calendar-schedule","calendar-todo","calendar-close","keyboard","trash","microscope"]],["Communication",["message","mail","user","robot","emoji","translate"]],["Status & media",["info","help-circle","alert-triangle","hand","full-access","shield-question","clock","histogram","music","sparkles","gen-title","pause","play","stop","star","star-outline","dots-horizontal","thinking","light-mode","dark-mode","follow-system"]]],Xb=(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t);function Zf(e){return DT(Xb,e)}function LS(e,t,n=!1){return F5(Xb,e,t,n)}function ike(e){return yJ(Xb,e)}const ske={read:"file-text",bash:"terminal",edit:"pencil",multi_edit:"pencil",write:"file-plus",grep:"search",search:"search",glob:"glob",ls:"folder",web_fetch:"globe",todo:"check-list",task:"sparkles",agentswarm:"sparkles",askuserquestion:"help-circle",exitplanmode:"file-text",creategoal:"target",getgoal:"target",setgoalbudget:"target",updategoal:"target",croncreate:"calendar-schedule",cronlist:"calendar-todo",crondelete:"calendar-close"};function u$(e){const t=ao(e);let n=ske[t];return!n&&(e??"").trim().toLowerCase().includes("skill")&&(n="bolt"),n||(n="tool"),n}function c$(e){return Wd(u$(e),"sm")}function ba(e){if(e.blocks)return e.blocks;const t=[];e.thinking&&t.push({kind:"thinking",thinking:e.thinking}),e.text&&t.push({kind:"text",text:e.text});for(const n of e.tools??[])t.push({kind:"tool",tool:n});return t}function d$(e){return!(e.tool.status==="ok"&&e.tool.media)}function oke(e){const t=ba(e),n=[];let i=[],s=null;const o=()=>{const[l]=i;i.length===1&&l?n.push(l):i.length>1&&n.push({kind:"activity-run",items:i}),i=[]},r=()=>{s&&n.push({kind:"notification",items:s.items,sourceIndex:s.sourceIndex}),s=null};return t.forEach((l,a)=>{if(l.kind==="notification"){o(),s?s.items.push(l.notification):s={items:[l.notification],sourceIndex:a};return}if(r(),l.kind==="thinking"){i.push({kind:"thinking",thinking:l.thinking,startedAt:l.startedAt,durationMs:l.durationMs,sourceIndex:a});return}if(l.kind==="tool"&&d$(l)){i.push({kind:"tool",tool:l.tool,sourceIndex:a});return}o(),l.kind==="text"?n.push({kind:"text",text:l.text,sourceIndex:a}):l.kind==="tool"&&n.push({kind:"tool",tool:l.tool,sourceIndex:a})}),o(),r(),n}const NS=new WeakMap;function f$(e){const t=NS.get(e);if(t!==void 0)return t;const n=rke(e);return NS.set(e,n),n}function rke(e){const t=oke(e);let n=-1;for(let r=t.length-1;r>=0;r--){const l=t[r];if(l?.kind==="text"&&l.text.trim().length>0){n=r;break}}if(n===-1){for(let r=0;r<t.length;r++){const l=t[r];if(l?.kind==="tool"&&!d$(l)){n=r;break}if(l?.kind==="notification"){n=r;break}}if(n===-1)return{folded:t,visible:[]}}const i=t.slice(0,n),s=t.slice(n),o=i.filter(r=>r.kind==="notification");return o.length>0?{folded:i.filter(r=>r.kind!=="notification"),visible:[...o,...s]}:{folded:i,visible:s}}function lke(e){let t;for(const n of e){if(n.kind!=="thinking"||n.startedAt===void 0)continue;const i=Date.parse(n.startedAt);Number.isNaN(i)||(t===void 0||i<t)&&(t=i)}return t}function FS(e){if(e===void 0)return;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function ake(e){if(e.state.phase==="settled")return e.durationMs!==void 0?Math.max(0,e.durationMs):e.startMs===void 0||e.endedMs===void 0?void 0:Math.max(0,e.endedMs-e.startMs);if(e.startMs!==void 0)return Math.max(0,e.state.nowMs-e.startMs)}function uke(e){return f$(e).visible.flatMap(t=>t.kind==="text"&&t.text?[t.text]:[]).join(` - -`)}function cke(e){const t=[];for(const n of ba(e))if(n.kind==="thinking"&&n.thinking)t.push(`> **Thinking** -> ${n.thinking.split(` -`).join(` -> `)}`);else if(n.kind==="text"&&n.text)t.push(n.text);else if(n.kind==="tool"&&n.tool.output&&n.tool.output.length>0){const i=n.tool.output.join(` -`);t.push(`\`\`\` -[${n.tool.name}] -${i} -\`\`\``)}else if(n.kind==="notification"){const i=n.notification,s=[i.title,i.type,...i.body.split(` -`)].filter(o=>o!=="");s.length>0&&t.push(`> **Notification** -> ${s.join(` -> `)}`)}return t.join(` - -`)}function h$(e){return e.tool.id||`tool-${e.sourceIndex}`}function p$(e,t){return e.kind==="activity-run"?`activity-run-${e.items[0]?.sourceIndex??t}`:e.kind==="tool"?h$({tool:e.tool,sourceIndex:e.sourceIndex}):`${e.kind}-${e.sourceIndex}`}function dke(e){const t=new Map;for(const n of ba(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const i=n.tool,s=ao(i.name);if(s!=="edit"&&s!=="multi_edit"&&s!=="write")continue;let o,r=0,l=0,a=!1,u=!1,c=null;if(s==="write")o=rC(i),a=!0,u=!0;else if(c=KT(i),o=rC(i),c){const p=jT(c);r=p.added,l=p.removed}else u=!0;if(!o)continue;const d=fke(o),f=t.get(d);if(f)if(f.added+=r,f.removed+=l,f.hasWrite||=a,f.statsIncomplete||=u,f.diff!==null&&c!==null){let p=0,g=0;for(const y of f.diff)y.oldNo!==void 0&&y.oldNo>p&&(p=y.oldNo),y.newNo!==void 0&&y.newNo>g&&(g=y.newNo);const m=c.map(y=>({...y,oldNo:y.oldNo!==void 0?y.oldNo+p:void 0,newNo:y.newNo!==void 0?y.newNo+g:void 0}));f.diff=[...f.diff,{type:"hunk",text:"···"},...m]}else f.diff=null;else t.set(d,{path:o,added:r,removed:l,hasWrite:a,statsIncomplete:u,diff:c})}return[...t.values()]}function fke(e){const t=e.replace(/\\/g,"/");let n="",i=t,s=!1;const o=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);o?(n=`//${o[1].toLowerCase()}/`,i=t.slice(o[0].length-(o[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,i=t.slice(3),s=!0):t.startsWith("/")&&(n="/",i=t.slice(1));const r=n!=="",l=[];for(const c of i.split("/"))if(!(!c||c===".")){if(c===".."){l.length>0&&l[l.length-1]!==".."?l.pop():r||l.push(c);continue}l.push(c)}const a=l.join("/"),u=n+a;return s?u.toLowerCase():u}const hke=2e3,Fh=new Map;function pke(e){const t=[];for(const n of ba(e)){if(n.kind!=="tool")continue;const i=n.tool,s=ao(i.name);s!=="edit"&&s!=="multi_edit"&&s!=="write"||t.push(`${i.id}:${i.status}:${i.arg.length}`)}return t.join("|")}function gke(e){const t=pke(e),n=Fh.get(e.id);if(n&&n.key===t)return n.changes;const i=dke(e);if(Fh.set(e.id,{key:t,changes:i}),Fh.size>hke){const s=Fh.keys().next().value;s!==void 0&&Fh.delete(s)}return i}const mke=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],g$=500,c2=256*1024,BS=200,u4=16384,c4=500,d4=50,f4=50,vke=6,yke=/api[_-]?key|authorization|token|secret|password|cookie|credential|email|phone|nickname|avatar/i,bke=/^[A-Za-z0-9+/=_-]{200,}$/;let h4=null;function bl(){if(h4!==null)return h4;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=uo(un.debug)==="1"),h4=e,e}const yu=[],ef=[];let e1=0;const _c=[];let t1=0,kke=1;const d2=new TextEncoder,Ake=new Set(mke),ek=Z(0),n1=vl(!1);function Cke(){return yu}function wke(){yu.length=0,ef.length=0,e1=0,_c.length=0,t1=0,ek.value++}function Na(e){if(!n1.value){try{const t={id:kke++,ts:Date.now(),source:e.source,kind:String(kf(e.kind)),label:String(kf(e.label)),sessionId:e.sessionId===void 0?void 0:String(kf(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:Wu(e.detail)},n=JSON.stringify(t),i=d2.encode(n).byteLength;if(i>c2)return;for(yu.push(t),ef.push(n),e1+=i+(ef.length>1?1:0);yu.length>g$||e1>c2;){const s=ef.shift();yu.shift(),s!==void 0&&(e1-=d2.encode(s).byteLength,ef.length>0&&(e1-=1))}}catch{return}ek.value++}}function pc(e){if(typeof e=="string")return e.length<=BS?e:e.slice(0,BS)}function Fr(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function xke(e,t){if(Ake.has(e))try{const n={ts:Date.now(),event:e,sessionId:pc(t?.sessionId),status:pc(t?.status),operation:pc(t?.operation),seq:Fr(t?.seq),durationMs:Fr(t?.durationMs),messageCount:Fr(t?.messageCount),contentCount:Fr(t?.contentCount),mediaCount:Fr(t?.mediaCount),sessionCount:Fr(t?.sessionCount),workspaceCount:Fr(t?.workspaceCount),promptId:pc(t?.promptId),zipBytes:Fr(t?.zipBytes),errorName:pc(t?.errorName),errorCode:Fr(t?.errorCode),requestId:pc(t?.requestId),phase:pc(t?.phase),httpStatus:Fr(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:Fr(t?.line),col:Fr(t?.col)},i=JSON.stringify(n),s=d2.encode(i).byteLength;if(s>c2)return;for(_c.push(i),t1+=s+(_c.length>1?1:0);_c.length>g$||t1>c2;){const o=_c.shift();o!==void 0&&(t1-=d2.encode(o).byteLength,_c.length>0&&(t1-=1))}}catch{return}}function kf(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const o=e;return bke.test(o)?`[base64-like, ${o.length} chars omitted]`:o.length>c4?`${o.slice(0,c4)}… [+${o.length-c4} chars]`:o}if(n!=="object")return String(e);if(t>=vke)return"[max depth]";if(Array.isArray(e)){const o=e.slice(0,d4).map(r=>kf(r,t+1));return e.length>d4&&o.push(`[+${e.length-d4} more items]`),o}const i={},s=Object.entries(e);for(const[o,r]of s.slice(0,f4))i[o]=yke.test(o)?"[redacted]":kf(r,t+1);return s.length>f4&&(i._truncatedKeys=s.length-f4),i}function Wu(e){if(e===void 0)return;const t=kf(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>u4)return{_truncated:`detail JSON was ${n.length} chars; first ${u4} kept`,preview:n.slice(0,u4)}}catch{return"[unserializable detail]"}return t}function _ke(e){bl()&&Na({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:Wu(e.body)}})}function Ske(e){if(!bl())return;const t=e.code!==0;Na({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:Wu(e.data)}})}function Mke(e){bl()&&Na({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Ike(e,t){bl()&&Na({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:Wu(t)})}function Eke(e){if(!bl())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",i=t.payload,s=typeof i?.session_id=="string"?i.session_id:void 0;Na({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:Wu(e)})}function Tke(e){if(!bl())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",i=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,o=typeof t.offset=="number"?t.offset:void 0,r=[i,s!==void 0?`seq=${s}`:void 0,o!==void 0?`offset=${o}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);Na({source:"ws",kind:"ws:in",eventType:n,sessionId:i,seq:s,offset:o,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:Wu(t.payload)})}const Lke={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function Nke(e,t,n){bl()&&Na({source:"client",kind:`client:${e}`,label:`${Lke[e]} ${t}`,detail:Wu(n)})}function Fke(e,t){bl()&&Na({source:"client",kind:"client:event",label:`· ${e}`,detail:Wu(t)})}function Bo(e,t){xke(e,t),Na({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let p4=!1,cg=null;function Bke(){if(p4)return()=>cg?.();p4=!0;const e=[];try{if(typeof window<"u"){const n=s=>{Bo("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno}),ga(`[kimi-web] window error: ${s.message}`,s.error instanceof Error?s.error.stack:void 0)},i=s=>{const o=s.reason;Bo("window:unhandled-rejection",{status:"failed",errorName:o instanceof Error?o.name:typeof o}),ga(`[kimi-web] unhandled rejection: ${Dke(o)}`,o instanceof Error?o.stack:void 0)};window.addEventListener("error",n),window.addEventListener("unhandledrejection",i),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",i)})}}catch{}if(bl())for(const n of["error","warn","log","info","debug"]){const i=console[n];if(typeof i!="function")continue;const s=(...o)=>{try{Nke(n,o.map($ke).join(" "),o.length>1?o:o[0])}catch{}i.apply(console,o)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=i)})}const t=()=>{if(cg===t){for(const n of e.toReversed())n();cg=null,p4=!1}};return cg=t,t}function $ke(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function Dke(e){if(e instanceof Error)return e.message;try{return String(e)}catch{return"[unstringifiable reason]"}}function m$(e=yu){if(typeof document>"u")return;const t=new Blob([Rke(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let i;try{i=document.createElement("a"),i.href=n,i.download=`kimi-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(i),i.click()}finally{i?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Rke(e=yu){return e===yu?ef.join(` -`):e.map(t=>JSON.stringify(t)).join(` -`)}function zke(){return _c.join(` -`)}const $S=un.clientId,Oke="kimi-code-web",Pke="web";function jke(){return{serverHttpUrl:Wke(),clientId:Uke(),clientName:Oke,clientVersion:Kke(),clientUiMode:Pke}}function Hke(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function Wke(){const e=v$();return S8(e||void 0)}const DS="kimi-desktop-server-origin";function v$(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search).get("kimi_origin");try{return e?(window.sessionStorage.setItem(DS,e),e):window.sessionStorage.getItem(DS)??void 0}catch{return e??void 0}}function S8(e){const t=e&&e.trim()?e:Hke(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function RS(e){return e.replace(/^https?:\/\//,"").replace(/\/$/,"")}function qke(){if(typeof window<"u"){const t=v$();if(t)return RS(S8(t))}const e=typeof window<"u"&&window.location?.origin?window.location.origin:"";return RS(e)}function Uke(){const e=uo($S);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Ns($S,t),t}function Kke(){return"0.36.0".trim()?"0.36.0":"0.0.0-dev"}const Vke={restRequest:e=>_ke(e),restResponse:e=>Ske(e),restFailure:e=>Mke(e),wsEvent:e=>{switch(e.kind){case"lifecycle":Ike(e.event,e.detail);break;case"in":Tke(e.frame);break;case"out":Eke(e.frame);break}},traceKeyEvent:(e,t)=>Bo(e,t)},Zke={getToken:Tte,markAuthRequired:Bte},Gke=(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t);function Qke(){const e=jke();return NJ({origin:e.serverHttpUrl,identity:{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode},tracer:Vke,credentialStore:Zke,t:Gke})}const Yke=Qke();function Pt(){return Yke}function M8(e){const t=[];for(const n of e??[])n.kind==="video"?t.push({type:"video",source:{kind:"file",fileId:n.fileId}}):n.kind==="file"?t.push({type:"file",fileId:n.fileId,name:n.name??"",mediaType:n.mediaType||"application/octet-stream",size:n.size??0}):t.push({type:"image",source:{kind:"file",fileId:n.fileId}});return t}const Jke=1e3,Xke=4096,zS=32*1024;function e6e(e,t,n){let i=null,s;const o=new Set;async function r(p){try{const m=await n.api.listTasks(p),y=e.tasksBySession[p]??[],w=new Map(y.map(v=>[v.id,v])),k=new Map(y.filter(v=>v.backgroundTaskId!==void 0).map(v=>[v.backgroundTaskId,v])),A=m.map(v=>{const x=w.get(v.id)??k.get(v.id),E=v.completedAt===void 0&&x?.completedAt===void 0&&x?.status==="running"&&v.status!=="running";return{...v,completedAt:v.completedAt??x?.completedAt??(E?new Date().toISOString():void 0),completedAtEstimated:v.completedAt!==void 0?void 0:x?.completedAt!==void 0?x.completedAtEstimated:E?!0:void 0}});e.tasksBySession={...e.tasksBySession,[p]:YC(A,y)},await l(p,m)}catch{}}async function l(p,g){if(e.activeSessionId!==p)return;const m=g??e.tasksBySession[p]??[],y=n.api,w=new Map;if(await Promise.all(m.map(async A=>{if((A.status==="completed"||A.status==="failed"||A.status==="cancelled")&&!o.has(A.id)&&!((A.outputLines?.length??0)>0))try{const x=await y.getTask(p,A.id,{withOutput:!0,outputBytes:zS});x.outputPreview!==void 0&&w.set(A.id,{preview:x.outputPreview,bytes:x.outputBytes}),o.add(A.id)}catch{}})),w.size===0)return;const k=e.tasksBySession[p]??[];e.tasksBySession={...e.tasksBySession,[p]:k.map(A=>{const v=w.get(A.id)??(A.backgroundTaskId!==void 0?w.get(A.backgroundTaskId):void 0);return v?{...A,outputPreview:v.preview,outputBytes:v.bytes}:A})}}async function a(p){if(e.activeSessionId!==p)return;const g=n.api;let m;try{m=await g.listTasks(p)}catch{return}const y=new Map;await Promise.all(m.map(async x=>{const E=x.status==="running",S=x.status==="completed"||x.status==="failed"||x.status==="cancelled";if(!(!E&&!S)&&!(S&&(o.has(x.id)||(x.outputLines?.length??0)>0)))try{const M=await g.getTask(p,x.id,{withOutput:!0,outputBytes:E?Xke:zS});M.outputPreview!==void 0&&y.set(x.id,{preview:M.outputPreview,bytes:M.outputBytes}),S&&o.add(x.id)}catch{}}));const w=e.tasksBySession[p]??[],k=new Map(w.map(x=>[x.id,x])),A=new Map(w.filter(x=>x.backgroundTaskId!==void 0).map(x=>[x.backgroundTaskId,x])),v=m.map(x=>{const E=k.get(x.id)??A.get(x.id),S=y.get(x.id),M=x.completedAt===void 0&&E?.completedAt===void 0&&E?.status==="running"&&x.status!=="running";return{...x,outputLines:E?.outputLines,text:E?.text,completedAt:x.completedAt??E?.completedAt??(M?new Date().toISOString():void 0),completedAtEstimated:x.completedAt!==void 0?void 0:E?.completedAt!==void 0?E.completedAtEstimated:M?!0:void 0,outputPreview:S?.preview??E?.outputPreview,outputBytes:S?.bytes??E?.outputBytes}});e.tasksBySession={...e.tasksBySession,[p]:YC(v,w)}}function u(p){i!==null&&s===p||(c(),s=p,a(p),i=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||(e.activeSessionId===p?a(p):c())},Jke))}function c(){i!==null&&(clearInterval(i),i=null),s=void 0,o.clear()}const d=Z(0);let f=null;return Qe(()=>t.value.some(p=>p.status==="running"),p=>{p&&f===null?f=setInterval(()=>{d.value=(d.value+1)%Number.MAX_SAFE_INTEGER},1e3):!p&&f!==null&&(clearInterval(f),f=null)},{immediate:!0}),Qe(()=>{const p=e.activeSessionId;if(!p)return{sid:void 0,hasRunning:!1};const g=e.tasksBySession[p]??[];return{sid:p,hasRunning:g.some(m=>m.status==="running")}},({sid:p,hasRunning:g},m,y)=>{let w;g&&p!==void 0?u(p):p!==void 0?w=setTimeout(()=>{(e.tasksBySession[p]??[]).some(A=>A.status==="running")||c()},1500):c(),y(()=>{w!==void 0&&clearTimeout(w)})},{deep:!0,immediate:!0}),{taskClock:F(()=>d.value),loadTasksForSession:r}}function t6e(e,t){const{api:n,pushOperationFailure:i,nextOptimisticMsgId:s,connectEventsIfNeeded:o,getEventConn:r,resolveThinkingForPrompt:l,refreshSessionStatus:a}=t,u=Z({}),c=F(()=>{const W=e.activeSessionId;if(!W)return null;const z=u.value[W];return z?{parentId:W,agentId:z.agentId}:null}),d=F(()=>c.value?.parentId??null),f=F(()=>c.value!==null),p=F(()=>{const W=c.value;return W?!!e.sideChatSendingByAgent[W.agentId]:!1}),g=F(()=>{const W=c.value;return W?e.sideChatSendingByAgent[W.agentId]?!0:(e.tasksBySession[W.parentId]??[]).some(z=>z.id===W.agentId&&z.status==="running"):!1}),m=W=>n.getFileUrl(W),y=[],w=VT(),k=F(()=>{const W=c.value;return W?w({messages:e.sideChatMessagesByAgent[W.agentId]??[],approvals:y,getFileUrl:m,sessionActive:g.value}):[]});function A(W,z){e.sideChatMessagesByAgent[W]=z(e.sideChatMessagesByAgent[W]??[])}function v(W,z){A(W,G=>[...G,z])}function x(W,z){A(W,G=>{const K=G.find(H=>H.id===z);return K?.promptId!==void 0||K?.userMessageId!==void 0?G:G.filter(H=>H.id!==z)})}function E(W,z){const G=e.sideChatUserMessageIdsBySession[W]??[];G.includes(z)||(e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[W]:[...G,z]})}function S(W,z,G,K){A(W,H=>{const q=H.findIndex(ie=>ie.id===z);if(q===-1)return H;const X=H.findIndex((ie,xe)=>xe!==q&&ie.role==="user"&&(ie.id===K||ie.userMessageId===K||ie.promptId===G)),ee=H[q],ue=X===-1?ee:H[X];return H.flatMap((ie,xe)=>xe===X?[]:xe!==q?[ie]:[{...ue,id:ee.id,promptId:G,userMessageId:K,metadata:{...ue.metadata,...ee.metadata}}])})}function M(W,z){E(z.sessionId,z.userMessageId??z.id),A(W,G=>{const K=G.findIndex(X=>X.role==="user"&&(X.userMessageId===(z.userMessageId??z.id)||X.promptId!==void 0&&X.promptId===z.promptId));if(K===-1)return[...G,z];const H=G[K],q=[...G];return q[K]={...z,id:H.id,promptId:z.promptId??H.promptId,userMessageId:z.userMessageId??z.id,metadata:{...z.metadata,...H.metadata}},q})}function _(W,z,G){G&&A(W,K=>{const H=K.at(-1);if(H?.role==="assistant"){const q=H.content[0],X=q?.type==="text"?q.text:"";return[...K.slice(0,-1),{...H,content:[{type:"text",text:`${X}${G}`}]}]}return[...K,{id:s(),sessionId:z,role:"assistant",content:[{type:"text",text:G}],createdAt:new Date().toISOString()}]})}function N(W,z,G){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[W]:!1},!G)return;const H=(e.sideChatMessagesByAgent[W]??[]).at(-1);(H?.role==="assistant"&&H.content[0]?.type==="text"?H.content[0].text:"").trim().length>0||_(W,z,G)}async function D(W){const z=e.activeSessionId;return z?T(z,W):!1}async function T(W,z){if(!u.value[W]){let G;try{({agentId:G}=await n.startBtw(W))}catch(K){return i("openSideChat",K,{sessionId:W}),!1}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[G]:e.sideChatMessagesByAgent[G]??[]},u.value={...u.value,[W]:{agentId:G}},o(),r()?.markSideChannelAgent(W,G)}return z&&z.trim()?$(W,z.trim()):!0}async function $(W,z){const G=u.value[W],K=z.trim();if(!G||!K)return!1;const H=W,q=G.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[q]:!0};const X=s(),ee={id:X,sessionId:H,role:"user",content:[{type:"text",text:K}],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};v(q,ee);let ue,ie=!1;try{const xe=e.sessions.find(te=>te.id===H),ce=(xe?.model&&xe.model.length>0?xe.model:e.defaultModel)??void 0,pe=await l(H,ce)??e.thinking;ue=e.pendingThinkingBySession[H],ie=!0;const Ne=await n.submitPrompt(H,{content:[{type:"text",text:K}],agentId:q,model:ce,thinking:pe,permissionMode:e.permission,planMode:e.planModeBySession[H]??!1,swarmMode:e.swarmModeBySession[H]??!1});return pe!==void 0&&Ca(e,H,ue),S(q,X,Ne.promptId,Ne.userMessageId),E(H,Ne.userMessageId),!0}catch(xe){return Ca(e,H,ue)&&a(H),i("sendSideChatPrompt",xe,{sessionId:H}),x(q,X),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[q]:!1},!(!ie||xe instanceof au)}}function P(){const W=e.activeSessionId;if(!W)return;const{[W]:z,...G}=u.value;u.value=G}async function O(W){const z=c.value;return z?$(z.parentId,W):!1}function R(W){if(!u.value[W])return;const{[W]:z,...G}=u.value;u.value=G}return{sideChatTargetBySession:u,sideChatSessionId:d,sideChatVisible:f,sideChatSending:p,sideChatRunning:g,sideChatTurns:k,appendSideChatAssistantText:_,finishSideChatAgent:N,reconcileSideChatUserMessage:M,openSideChat:D,openSideChatOn:T,closeSideChat:P,sendSideChatPrompt:O,clearSideChatForSession:R}}const y$=un.starredModels,OS=new Error("profile persist failed");function n6e(){try{const e=uo(y$);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function i6e(e){try{Ns(y$,JSON.stringify(e))}catch{}}function s6e(e,t){const{api:n,pushOperationFailure:i,refreshSessionStatus:s,persistSessionProfile:o,savePlanModeToStorage:r,activity:l,updateSession:a,updateSessionMessages:u,loadConfig:c,checkAuth:d,beginLocalTurn:f,settleLocalTurn:p}=t,g=Z([]),m=Z(n6e()),y=Z({}),w=Z({}),k=Z([]),A=Z(null);function v(j){if(!(j==null||j.length===0))return g.value.find(Y=>Y.id===j)??g.value.find(Y=>Y.model===j)}function x(){const j=e.activeSessionId?e.sessions.find(ve=>ve.id===e.activeSessionId):void 0,Y=j===void 0?A.value??e.defaultModel:j.model||e.defaultModel;return v(Y)?.id??Y??void 0}function E(j){if(j===void 0)return;const Y=v(j);return Y===void 0?void 0:G1(Y)}function S(j,Y){const ve=j==null?void 0:e.thinkingBySession[j];return ve!==void 0&&Vee(Y,ve)?ve:G1(Y)}function M(j,Y){if(Y===void 0)return;const ve=v(Y);return ve===void 0?void 0:S(j,ve)}async function _(j,Y){return j!=null&&e.thinkingBySession[j]===void 0&&await s(j),M(j,Y)}function N(j){e.thinking=j;const Y=e.activeSessionId;return j!==void 0&&Y!==null&&Y!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Y]:j},m3(e,Y)),j}Qe([()=>e.activeSessionId,()=>x(),()=>{const j=e.activeSessionId;return j==null?void 0:e.thinkingBySession[j]}],()=>{const j=v(x());j!==void 0&&(e.thinking=S(e.activeSessionId,j))});function D(j){n.setConfig({thinking:Zee(j,v(x())?.supportEfforts)}).catch(Y=>i("setConfig",Y))}async function T(j){try{const Y=await n.listSkills(j);y.value={...y.value,[j]:Y}}catch{}}async function $(j){try{const Y=await n.listSkillsForWorkspace(j);w.value={...w.value,[j]:Y}}catch{}}async function P(){try{g.value=await n.listModels();const j=v(x());j!==void 0&&(e.thinking=S(e.activeSessionId,j))}catch(j){i("loadModels",j)}}async function O(){try{k.value=await n.listProviders()}catch(j){i("loadProviders",j)}}async function R(j){const Y=e.activeSessionId,ve=v(j),re=e.thinking,se=Y?e.sessions.find(me=>me.id===Y)?.model:void 0,U=x()!==(ve?.id??j),J=Gee(ve,re,U);if(!Y)return A.value=j,e.thinking=J,J!==re&&J!==void 0&&D(J),!0;a(Y,me=>({...me,model:j}));let de;J!==re&&(e.thinking=J,J!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Y]:J},de=m3(e,Y)));try{await n.updateSession(Y,{model:j,thinking:J!==re?J:void 0})}catch(me){return a(Y,Ie=>({...Ie,model:se??Ie.model})),J!==re&&(e.thinking=re,re!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Y]:re}),Ca(e,Y,de)&&s(Y)),i("setModel",me,{sessionId:Y}),!1}return J!==re&&J!==void 0&&D(J),Ca(e,Y,de),await s(Y),!0}function W(j){const Y=new Set(m.value);Y.has(j)?Y.delete(j):Y.add(j),m.value=Array.from(Y),i6e(m.value)}async function z(j,Y,ve,re,se){const U=re??e.activeSessionId;if(!U)return!1;const J=l.value==="idle"&&!e.inFlightBySession[U],de=`msg_skill_opt_${Date.now().toString(36)}`,me=J?f(U):void 0;let Ie=!1;if(J){e.inFlightBySession={...e.inFlightBySession,[U]:!0};const je={id:de,sessionId:U,role:"user",content:[{type:"text",text:`/${j}${Y?` ${Y}`:""}`},...M8(ve)],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:j,skillArgs:Y}}};u(U,ke=>[...ke,je])}try{if(se?.skipThinkingPersist!==!0){const je=e.sessions.find(Fe=>Fe.id===U)?.model,ke=(je&&je.length>0?je:e.defaultModel)??void 0,Le=e.planArmedBySession[U]??!1;if(!await o({thinking:await _(U,ke)??e.thinking,swarmMode:e.swarmModeBySession?.[U]??!1,permissionMode:e.permission,...Le?{planMode:!0}:{}},U))throw OS;Le&&(e.planArmedBySession={...e.planArmedBySession,[U]:!1},r(),e.planModeBySession={...e.planModeBySession,[U]:!0})}return Ie=!0,await n.activateSkill(U,j,Y,M8(ve)),!0}catch(je){return J&&(e.inFlightBySession={...e.inFlightBySession,[U]:!1},u(U,ke=>ke.filter(Le=>Le.id!==de))),je!==OS&&i("activateSkill",je,{sessionId:U}),!(!Ie||je instanceof au)}finally{me!==void 0&&p(U,me)}}async function G(j){return n.getProvider(j)}async function K(j){try{return await n.addProvider(j),await Promise.all([O(),P(),c()]),await d(),null}catch(Y){return ga("[kimi-code] operation failed: addProvider",Y),Y instanceof Error?Y.message:String(Y)}}async function H(j,Y){try{return await n.updateProvider(j,Y),await Promise.all([O(),P(),c()]),null}catch(ve){return ga("[kimi-code] operation failed: updateProvider",ve),ve instanceof Error?ve.message:String(ve)}}async function q(j){try{const Y=await n.deleteProvider(j);return await Promise.all([O(),P(),c()]),await d(),Y}catch(Y){return i("deleteProvider",Y),null}}async function X(j){try{const Y=await n.refreshProvider(j);for(const ve of Y.failed)i("refreshProvider",new Error(ve.reason),{message:ve.provider});await Promise.all([O(),P(),c()])}catch(Y){i("refreshProvider",Y)}}async function ee(){try{const j=await n.refreshAllProviders();for(const Y of j.failed)i("refreshAllProviders",new Error(Y.reason),{message:Y.provider});await Promise.all([O(),P(),c()])}catch(j){i("refreshAllProviders",j)}}async function ue(){try{return{kind:"ok",items:await n.listCatalogProviders()}}catch(j){return j instanceof au&&j.code===void 0?{kind:"unsupported"}:(ga("[kimi-code] operation failed: loadCatalogProviders",j),{kind:"error"})}}async function ie(j){try{return await n.importCatalogProvider(j),await Promise.all([O(),P(),c()]),await d(),null}catch(Y){return ga("[kimi-code] operation failed: importCatalogProvider",Y),Y instanceof Error?Y.message:String(Y)}}async function xe(j){try{const Y=await n.importCustomRegistry(j);return await Promise.all([O(),P(),c()]),await d(),Y}catch(Y){return ga("[kimi-code] operation failed: importCustomRegistry",Y),Y instanceof Error?Y.message:String(Y)}}async function ce(){try{return await n.startOAuthLogin()}catch{return null}}async function pe(){try{return await n.pollOAuthLogin()}catch(j){return Dl("[kimi-code] pollOAuthLogin failed",j),null}}async function Ne(){try{await n.cancelOAuthLogin()}catch{}}async function te(){try{return await n.getUsage()}catch(j){return{kind:"error",message:j instanceof Error?j.message:String(j)}}}function ye(j){const Y=N(j);o({thinking:Y}),Y!==void 0&&D(Y)}return{models:g,starredModelIds:m,providers:k,draftModel:A,skillsBySession:y,skillsByWorkspace:w,loadSkillsForSession:T,loadSkillsForWorkspace:$,loadModels:P,loadProviders:O,setModel:R,thinkingLevelForModelId:E,thinkingLevelForSessionId:M,resolveThinkingForPrompt:_,toggleStarModel:W,activateSkill:z,addProvider:K,updateProvider:H,deleteProvider:q,getProvider:G,loadCatalogProviders:ue,importCatalogProvider:ie,importCustomRegistry:xe,refreshProvider:X,refreshAllProviders:ee,startOAuthLogin:ce,pollOAuthLogin:pe,cancelOAuthLogin:Ne,getUsage:te,setThinking:ye}}const o6e=50,Ug=5,tk=5,f2=50,r6e=40401,l6e=40402,a6e=40410,u6e=40409,c6e=40902,d6e=2e3,f6e=10;function g4(e){return Ps(e)&&e.code===c6e}const h6e=40904;function p6e(e){return Ps(e)&&e.code===h6e}function g6e(e){return!e||e.state!=="open"&&e.state!=="closed"&&e.state!=="merged"?null:{number:e.number,state:e.state,url:e.url}}function m6e(e,t){return e==null||t==null?e==null&&t==null:e.number===t.number&&e.state===t.state&&e.url===t.url}const gc=Ts({}),dg=Ts({}),m4=Ts({}),Tl=Ts(new Set),Ev=new Map,Jc=new Map,h2=new Map;let v6e=0;const bc=new Map,y6e=3,b6e=3,Kg=new Map;function k6e(e){const t=Kg.get(e);if(!(t!==void 0&&(t.done||t.attempts>=b6e))){Kg.set(e,{attempts:(t?.attempts??0)+1,done:!1});try{Pt().generateSessionTitle(e,{source:"first_turn"}).then(n=>{n!==null&&Kg.set(e,{attempts:0,done:!0})}).catch(()=>{})}catch{}}}let PS=0;function A6e(){return PS+=1,`${Date.now().toString(36)}-${PS}`}function C6e(e){return{generation:Ev.get(e)??0,pending:(Jc.get(e)?.size??0)>0}}function I8(e){const t=++v6e;Ev.set(e,t);const n=Jc.get(e)??new Set;return n.add(t),Jc.set(e,n),t}function E8(e,t){const n=Jc.get(e);if(n===void 0||(n.delete(t),n.size>0))return;Jc.delete(e);const i=h2.get(e);h2.delete(e),i?.()}function w6e(e){Ev.delete(e),Jc.delete(e),h2.delete(e),bc.delete(e)}function x6e(e,t){return!t.pending&&t.generation===(Ev.get(e)??0)}function _6e(e,t){if((Jc.get(e)?.size??0)===0){t();return}h2.set(e,t)}function S6e(e,t){const{t:n}=jn.global,{confirm:i}=Hu(),{taskPoller:s,sideChat:o,modelProvider:r,pushOperationFailure:l,notify:a,activity:u,sessionsKnownEmpty:c,setSessions:d,updateSession:f,upsertSessionSorted:p,appendSession:g,forgetSession:m,unpinSessions:y,setActiveSessionId:w,updateSessionMessages:k,nextOptimisticMsgId:A,getEventConn:v,syncSessionFromSnapshot:x,reopenSession:E,hasLoadedMessages:S,refreshSessionStatus:M,refreshSessionGoal:_,refillSessionGoalOnReload:N,refreshSessionPlans:D,settlePlanReviewLocally:T,persistSessionProfile:$,mergedWorkspaces:P,workspacesView:O,status:R,workspaceIdForSession:W,savePermissionToStorage:z,savePlanModeToStorage:G,saveSwarmModeToStorage:K,saveGoalModeToStorage:H,draftModes:q,saveUnread:X,saveActiveWorkspaceToStorage:ee,saveHiddenWorkspacesToStorage:ue,goalErrorMessage:ie,initialized:xe,connectIssue:ce,selectedDiffPath:pe,fileDiffLines:Ne,fileDiffLoading:te,fileDiffTexts:ye,fileDiffEmptyFile:j}=t;let Y=0,ve=!1;function re(oe,Ae,Se,Pe){k(oe,Ye=>{const Je=Ye.findIndex(Ot=>Ot.id===Ae);if(Je===-1)return Ye;const xt=Ye.findIndex((Ot,wn)=>wn!==Je&&Ot.role==="user"&&(Ot.id===Pe||Ot.userMessageId===Pe||Ot.promptId===Se)),bt=Ye[Je],nn=xt===-1?bt:Ye[xt];return Ye.flatMap((Ot,wn)=>wn===xt?[]:wn!==Je?[Ot]:[{...nn,id:bt.id,promptId:Se,userMessageId:Pe,metadata:{...nn.metadata,...bt.metadata}}])})}async function se(oe){if(e.messagesLoadingMoreBySession[oe])return;const Ae=e.messagesBySession[oe];if(!Ae||Ae.length===0)return;const Se=Ae[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[oe]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[oe]:!1};try{const Pe=await Pt().listMessages(oe,{beforeId:Se,pageSize:o6e}),Ye=[...Pe.items].reverse();k(oe,Je=>[...Ye,...Je]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[oe]:Pe.hasMore}}catch(Pe){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[oe]:!0},l("loadOlderMessages",Pe,{sessionId:oe})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[oe]:!1}}}function U(oe,Ae){s.loadTasksForSession(oe),me(oe),Ae?.skipStatus!==!0&&M(oe),_(oe),D(oe),Object.prototype.hasOwnProperty.call(r.skillsBySession.value,oe)||r.loadSkillsForSession(oe)}async function J(oe){const Ae=e.activeSessionId;if(Ae){pe.value=oe,Ne.value=[],ye.value=null,j.value=!1,te.value=!0;try{const Pe=await Pt().getFileDiff(Ae,oe);if(pe.value!==oe||e.activeSessionId!==Ae)return;const Ye=eee(Pe.diff);if(Ne.value=Ye,Ye.length===0){const xt=await Mi(oe).catch(()=>null);if(pe.value!==oe||e.activeSessionId!==Ae)return;j.value=xt!==null&&xt.size===0;return}te.value=!1;const Je=await HX(Ye,{truncated:Pe.truncated,readNewText:async()=>{const xt=await Mi(oe).catch(()=>null);return!xt||xt.isBinary||xt.encoding!=="utf-8"?null:xt.content}});if(pe.value!==oe||e.activeSessionId!==Ae)return;ye.value=Je}catch(Se){pe.value===oe&&(Ne.value=[]),Dl("[loadFileDiff] diff unavailable for",oe,Se)}finally{pe.value===oe&&(te.value=!1)}}}function de(){pe.value=null,Ne.value=[],ye.value=null,j.value=!1,te.value=!1}async function me(oe){try{const Se=await Pt().getGitStatus(oe);e.gitStatusBySession={...e.gitStatusBySession,[oe]:Se};const Pe=g6e(Se.pullRequest);f(oe,Ye=>m6e(Ye.pullRequest,Pe)?Ye:{...Ye,pullRequest:Pe})}catch{}}let Ie=0;async function je(oe){try{const Ae=await Pt().getUserInfo();if(oe!==Ie||e.managedProviderStatus!=="authenticated")return;e.managedUserInfo=Ae.kind==="ok"?Ae.userInfo:null,Ae.kind==="ok"?e.managedMembership=Ae.userInfo.userLevel===f6e?"free":"member":e.managedMembership=Ae.status===402?"free":null}catch{if(oe!==Ie)return;e.managedProviderStatus==="authenticated"&&(e.managedUserInfo=null,e.managedMembership=null)}}async function ke(){e.managedProviderStatus==="authenticated"&&await je(++Ie)}async function Le(){const oe=++Ie;try{const Se=await Pt().getAuth();return e.authReady=Se.ready,e.defaultModel=Se.defaultModel,e.managedProviderStatus=Se.managedProvider?.status??null,e.managedProviderStatus==="authenticated"?je(oe):(e.managedUserInfo=null,e.managedMembership=null),ce.value=null,"proceed"}catch(Ae){return Ps(Ae)&&(Ae.code===401||Ae.code===zE)?(ce.value=null,"server-auth-required"):(ce.value=(Ae instanceof Error?Ae.message:String(Ae)).slice(0,140),"retry")}}async function it(){let oe=!0;for(;;){const Ae=await Le();if(Ae!=="retry")return Ae;oe&&(ce.value=null,oe=!1),await new Promise(Se=>{setTimeout(Se,d6e)})}}async function Fe(){try{const oe=Pt();e.config=await oe.getConfig()}catch{}}async function Re(oe){try{const Se=await Pt().setConfig(oe);return e.config=Se,e.defaultModel=Se.defaultModel??null,!0}catch(Ae){return l("setConfig",Ae),!1}}const Ke=100,ht=720*60*1e3;async function ot(oe){const Ae=Pt(),Se=[];let Pe,Ye;for(;oe?.shouldContinue?.()!==!1;){let Je;try{Je=await Ae.listSessions({pageSize:Ke,beforeId:Pe,excludeEmpty:!0})}catch(xt){if(Se.length===0)throw xt;Ye=xt;break}if(Se.push(...Je.items),!Je.hasMore||Je.items.length===0)break;Pe=Je.items[Je.items.length-1].id}return{sessions:Se,error:Ye}}function gt(oe){const Ae=new Map(e.sessions.map(Se=>[Se.id,Se]));d(oe.map(Se=>{const Pe=Ae.get(Se.id);if(Pe===void 0)return Se;const Ye=ym(Se.usage)&&!ym(Pe.usage),Je=Se.pullRequest??Pe.pullRequest;return!Ye&&Je===Se.pullRequest?Se:{...Se,usage:Ye?Pe.usage:Se.usage,pullRequest:Je}}))}function Tt(oe){const Ae=[...oe],Se=new Set(Ae.map(Pe=>Pe.id));for(const Pe of e.sessions)Se.has(Pe.id)||(Ae.push(Pe),Se.add(Pe.id));return Ae.sort((Pe,Ye)=>new Date(Ye.updatedAt).getTime()-new Date(Pe.updatedAt).getTime()),Ae}async function yn(oe){const Ae=Pt(),Se=[],Pe=Date.now(),Ye=Ot=>Pe-new Date(Ot.updatedAt).getTime();let Je,xt=!1,bt=!0,nn;for(;;){let Ot;try{Ot=await Ae.listSessions({workspaceId:oe,pageSize:Ug,beforeId:Je,excludeEmpty:!0})}catch($t){if(bt)throw $t;nn=$t,xt=!0;break}if(xt=Ot.hasMore,Ot.items.length===0)break;const wn=Ot.items[Ot.items.length-1],Qn=Ye(wn)>=ht;if(!bt&&Qn){const $t=Ot.items.findIndex(Wn=>Ye(Wn)>=ht),Ht=$t>=0?$t+1:Ot.items.length;Se.push(...Ot.items.slice(0,Ht)),xt=Ot.hasMore||Ht<Ot.items.length;break}if(Se.push(...Ot.items),bt=!1,!Ot.hasMore||Qn)break;Je=wn.id}return{workspaceId:oe,page:{items:Se,hasMore:xt},error:nn}}async function Gt(){const oe=e.workspaces;if(oe.length===0){const $t=await ot(),Ht=$t.error===void 0?$t.sessions:Tt($t.sessions);return e.sessionsHasMoreByWorkspace={},e.sessionsCursorByWorkspace={},e.sessionsInitialCountByWorkspace={},e.sessionsFullyLoaded=$t.error===void 0,$t.error!==void 0&&l("load",$t.error),Ht}const Ae=await Promise.allSettled(oe.map($t=>yn($t.id))),Se=[],Pe=new Set,Ye=new Map,Je=new Set;let xt;for(let $t=0;$t<Ae.length;$t++){const Ht=Ae[$t];if(Ht.status==="fulfilled"){Ye.set(Ht.value.workspaceId,Ht.value.page),Ht.value.error!==void 0&&(Je.size===0&&(xt=Ht.value.error),Je.add(Ht.value.workspaceId));for(const Wn of Ht.value.page.items)Pe.has(Wn.id)||(Se.push(Wn),Pe.add(Wn.id));continue}Je.size===0&&(xt=Ht.reason),Je.add(oe[$t].id)}if(Ye.size===0){l("load",xt);return}const bt=new Set(oe.filter($t=>Je.has($t.id)).map($t=>$t.root)),nn=new Set(oe.map($t=>$t.id));for(const $t of e.sessions)!($t.workspaceId!==void 0&&nn.has($t.workspaceId)?Je.has($t.workspaceId):bt.has($t.cwd)||Je.has(W($t)))||Pe.has($t.id)||(Se.push($t),Pe.add($t.id));const Ot={},wn={},Qn={};for(const{id:$t}of oe){const Ht=Ye.get($t);if(Ht===void 0){const Wn=e.sessionsHasMoreByWorkspace[$t],Ee=e.sessionsCursorByWorkspace[$t],ct=e.sessionsInitialCountByWorkspace[$t];Wn!==void 0&&(Ot[$t]=Wn),Ee!==void 0&&(wn[$t]=Ee),ct!==void 0&&(Qn[$t]=ct);continue}Ot[$t]=Ht.hasMore,wn[$t]=Ht.items.length>0?Ht.items[Ht.items.length-1].id:void 0,Qn[$t]=Math.max(Ht.items.length,Ug)}return e.sessionsHasMoreByWorkspace=Ot,e.sessionsCursorByWorkspace=wn,e.sessionsInitialCountByWorkspace=Qn,e.sessionsFullyLoaded=!1,Se.sort(($t,Ht)=>new Date(Ht.updatedAt).getTime()-new Date($t.updatedAt).getTime()),Je.size>0&&l("load",xt),Se}async function Kt(oe){if(!e.sessionsLoadingMoreByWorkspace[oe]&&e.sessionsHasMoreByWorkspace[oe]!==!1&&e.sessionsCursorByWorkspace[oe]!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[oe]:!0};try{let Ae=e.sessionsCursorByWorkspace[oe],Se;for(let Je=0;Je<3&&Ae!==void 0&&(Se=await Pt().listSessions({workspaceId:oe,pageSize:tk,beforeId:Ae,excludeEmpty:!0}),e.sessionsCursorByWorkspace[oe]!==Ae);Je+=1)Se=void 0,Ae=e.sessionsCursorByWorkspace[oe];if(Se===void 0)return;const Pe=new Set(e.sessions.map(Je=>Je.id)),Ye=Se.items.filter(Je=>!Pe.has(Je.id));Ye.length>0&&d([...e.sessions,...Ye]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[oe]:Se.items.length>0?Se.items[Se.items.length-1].id:Ae},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[oe]:Se.hasMore}}catch(Ae){l("loadMoreSessions",Ae)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[oe]:!1}}}}function mn(oe){return e.sessions.filter(Ae=>!Ae.parentSessionId&&W(Ae)===oe)}const _n=5;function He(oe,Ae){const Se=new Set(e.sessions.map(Je=>Je.id)),Pe=oe.items.filter(Je=>!Se.has(Je.id)&&(Je.meta.last_prompt??"").length>0).map(YU);Pe.length>0&&d([...e.sessions,...Pe]);for(const Je of oe.items)if(Se.has(Je.id)&&Je.git!==void 0){const xt=Je.git.pull_request;f(Je.id,bt=>bt.pullRequest===xt?bt:{...bt,pullRequest:xt})}if(oe.items.length>0){const Je=Math.min(...oe.items.map(xt=>xt.meta.updated_at));e.flatSessionsFrontier=Ae?.resetFrontier===!0||e.flatSessionsFrontier===null?Je:Math.min(e.flatSessionsFrontier,Je)}e.flatSessionsNextPageToken=oe.nextPageToken,e.flatSessionsHasMore=oe.hasMore;const Ye=new Set(O.value.map(Je=>Je.id));return oe.items.filter(Je=>(Je.meta.last_prompt??"").length>0&&Ye.has(W({workspaceId:Je.workspace.id,cwd:Je.workspace.cwd??""}))).length}async function st(){const oe=await Pt().listSessionsV2({pageSize:f2,include:"git"});He(oe,{resetFrontier:!0}),e.flatSessionsSeeded=!0}async function Ve(){if(!(e.flatSessionsSeeded||e.flatSessionsLoading)){e.flatSessionsLoading=!0;try{await st()}catch(oe){l("ensureFlatSessions",oe)}finally{e.flatSessionsLoading=!1}}}async function Rt(){if(!(e.flatSessionsLoading||e.flatSessionsLoadingMore)&&e.flatSessionsHasMore){e.flatSessionsLoadingMore=!0;try{if(!e.flatSessionsSeeded){await st();return}if(e.flatSessionsNextPageToken===null)return;for(let oe=0;oe<_n;oe+=1){const Ae=e.flatSessionsNextPageToken;if(Ae===null||!e.flatSessionsHasMore)break;let Se;try{Se=await Pt().listSessionsV2({pageSize:f2,pageToken:Ae,include:"git"})}catch(Pe){if(!KU(Pe))throw Pe;e.flatSessionsNextPageToken=null,await st();break}if(He(Se)>0)break}}catch(oe){l("loadMoreFlatSessions",oe)}finally{e.flatSessionsLoadingMore=!1}}}async function Ct(oe,Ae,Se,Pe){if(e.sessionsCursorByWorkspace[oe]===Ae){const Je=new Date(Se).getTime();let xt;for(const bt of e.sessions){if(W(bt)!==oe)continue;const nn=new Date(bt.updatedAt).getTime();nn<=Je||(xt===void 0||nn<new Date(xt.updatedAt).getTime())&&(xt=bt)}e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[oe]:xt?.id}}let Ye=3;for(;Ye>0&&mn(oe).length<Pe&&(e.sessionsHasMoreByWorkspace[oe]??!1);){const Je=e.sessionsCursorByWorkspace[oe],xt=mn(oe).length;if(Je===void 0)try{const bt=await Pt().listSessions({workspaceId:oe,pageSize:Ug,excludeEmpty:!0}),nn=new Set(e.sessions.map(wn=>wn.id)),Ot=bt.items.filter(wn=>!nn.has(wn.id));Ot.length>0&&d([...e.sessions,...Ot].sort((wn,Qn)=>new Date(Qn.updatedAt).getTime()-new Date(wn.updatedAt).getTime())),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[oe]:bt.items.length>0?bt.items[bt.items.length-1].id:void 0},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[oe]:bt.hasMore}}catch(bt){l("loadMoreSessions",bt);break}else await Kt(oe);if(Ye-=1,mn(oe).length===xt&&e.sessionsCursorByWorkspace[oe]===Je)break}}async function Fn(){if(e.sessionsFullyLoaded)return;const oe=await ot().catch(Pe=>(Dl("[kimi-web] loadAllSessions failed; search covers only loaded sessions",Pe),null));if(oe===null)return;const Ae=oe.error===void 0?oe.sessions:Tt(oe.sessions);if(gt(Ae),e.sessionsFullyLoaded=oe.error===void 0,oe.error!==void 0)return;const Se={};for(const Pe of e.workspaces)Se[Pe.id]=!1;e.sessionsHasMoreByWorkspace=Se}async function Tn(){const oe=await Pt().getMeta().catch(()=>null);oe!==null&&(e.serverVersion=oe.serverVersion,e.availableOpenInApps=oe.openInApps,e.dangerousBypassAuth=oe.dangerousBypassAuth,e.experimentalFlags=oe.experimentalFlags,e.backend=oe.backend,e.webTitle=oe.webTitle)}async function as(){const oe=Date.now();let Ae="accepted";Bo("app:load:start"),e.loading=!0;const Se=!xe.value;let Pe=!0;try{if(Se&&await it()==="server-auth-required"){Pe=!1,Ae="auth-required";return}const Ye=Pt();await Promise.all([Ye.getHealth().catch(()=>null),Tn(),r.loadModels()]),Se||await Le(),await Fe(),await Qt();const Je=await Gt(),xt=Je??e.sessions;if(Je!==void 0&>(Je),!Se&&Je!==void 0&&e.flatSessionsSeeded){e.flatSessionsSeeded=!1,e.flatSessionsNextPageToken=null,e.flatSessionsHasMore=!0,e.flatSessionsFrontier=null;try{await st()}catch($t){l("ensureFlatSessions",$t)}}const bt=zL().filter($t=>!e.sessions.some(Ht=>Ht.id===$t));if(bt.length>0){const $t=await Promise.all(bt.map(Wn=>co(Wn))),Ht=bt.filter((Wn,Ee)=>$t[Ee]==="stale");Ht.length>0&&y(Ht)}for(const $t of e.sessions)($t.mainTurnActive??$t.busy)&&e.goalBySession[$t.id]===void 0&&N($t.id);const nn=xt[0],Ot=e.activeWorkspaceId;!(Ot!==null&&P.value.some($t=>$t.id===Ot))&&nn&&zn(W(nn)),vi();const Qn=typeof window<"u"?AC(window.location):void 0;!e.activeSessionId&&Qn!==void 0&&(e.sessions.some(Ht=>Ht.id===Qn)||await Yi(Qn))&&await Mn(Qn,{urlMode:"replace"}),!e.activeSessionId&&xt.length>0&&await Mn(xt[0].id,{urlMode:"replace"})}catch(Ye){Ae="failed",l("load",Ye)}finally{e.loading=!1,Pe&&(xe.value=!0),Bo("app:load:complete",{status:Ae,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-oe})}}async function Qt(){try{const oe=Pt(),[Ae,Se]=await Promise.all([oe.listWorkspaces().catch(()=>[]),oe.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=ni(Ae),e.fsHome=Se.home||null,e.recentRoots=Se.recentRoots}catch{}}function ni(oe){const Ae=P0();return Object.keys(Ae).length===0?oe:oe.map(Se=>{const Pe=Ae[Se.root];return Pe!==void 0?{...Se,name:Pe}:Se})}function zn(oe){e.activeWorkspaceId=oe,ee(oe)}function Sn(oe){zn(oe);const Ae=e.sessions.filter(Se=>W(Se)===oe);if(Ae.length>0){const Se=Ae[0];Se&&Se.id!==e.activeSessionId&&Mn(Se.id)}else w(void 0),_i(void 0,"push")}function mi(oe){const Ae=P0()[oe.root],Se=Ae!==void 0?{...oe,name:Ae}:oe,Pe=el(Se.root);e.hiddenWorkspaceRoots.some(xt=>el(xt)===Pe)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(xt=>el(xt)!==Pe),ue(e.hiddenWorkspaceRoots));const Ye=e.workspaces.findIndex(xt=>xt.id===Se.id||xt.root===Se.root);if(Ye===-1){e.workspaces=[Se,...e.workspaces];return}const Je=[...e.workspaces];Je[Ye]=Se,e.workspaces=Je}function Ws(oe){if(oe.type==="workspaceCreated"||oe.type==="workspaceUpdated"){mi(oe.workspace);return}const Ae=e.workspaces.find(Pe=>Pe.id===oe.workspaceId)?.root??oe.root;if(Ae&&!e.hiddenWorkspaceRoots.includes(Ae)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Ae],ue(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(Pe=>Pe.id!==oe.workspaceId&&Pe.root!==Ae),e.activeWorkspaceId===oe.workspaceId||e.activeWorkspaceId===Ae){const Pe=O.value[0]?.id??null;if(e.activeWorkspaceId=Pe,Pe)ee(Pe);else try{lr(un.activeWorkspace)}catch{}w(void 0),e.sessionLoading=!1,de(),_i(void 0,"replace")}}function Li(){w(void 0),_i(void 0,"push")}function Lt(oe){zn(oe),Li(),de()}async function xi(oe){const Ae=P.value.find(wn=>wn.id===oe);if(!Ae)return null;const Se=e.thinking,Pe=Pt();let Ye,Je=Ae.root;try{const wn=await Pe.addWorkspace({root:Ae.root});Ye=wn.id,Je=wn.root,mi(wn)}catch{}const xt=r.draftModel.value??void 0,bt=await Pe.createSession({workspaceId:Ye,cwd:Je,model:xt});r.draftModel.value=null;const nn=xt!==void 0&&(!bt.model||bt.model.length===0)?{...bt,model:xt}:bt;p(nn);const Ot=bt.id;return Se!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Ot]:Se},m3(e,Ot)),zn(bt.workspaceId??Ye??oe),await Mn(bt.id,{skipStatusRefresh:!0}),q.planMode&&(e.planArmedBySession={...e.planArmedBySession,[Ot]:!0},G()),q.swarmMode&&(e.swarmModeBySession={...e.swarmModeBySession,[Ot]:!0},K()),q.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[Ot]:!0},H()),q.planMode=!1,q.swarmMode=!1,q.goalMode=!1,Ot}async function Qi(oe,Ae,Se){if(Tl.has(oe))return null;Tl.add(oe);let Pe=null;try{const Ye=await xi(oe);return Ye?(Pe=Ye,await Dn(Ye,Ae,Se),Ye):null}catch(Ye){return l("startSessionAndSendPrompt",Ye),Pe}finally{Tl.delete(oe)}}async function ci(oe,Ae,Se,Pe){if(Tl.has(oe))return null;Tl.add(oe);let Ye=null;try{const Je=await xi(oe);if(!Je)return null;Ye=Je;const xt=e.planArmedBySession[Je]??!1,bt=e.swarmModeBySession[Je]??!1,nn=e.sessions.find($t=>$t.id===Je),Ot=(nn?.model&&nn.model.length>0?nn.model:e.defaultModel)??void 0,wn=await r.resolveThinkingForPrompt(Je,Ot)??e.thinking;return await $({model:Ot,planMode:xt,swarmMode:bt,permissionMode:e.permission,thinking:wn},Je)&&(xt&&(e.planArmedBySession={...e.planArmedBySession,[Je]:!1},G(),e.planModeBySession={...e.planModeBySession,[Je]:!0}),await r.activateSkill(Ae,Se,Pe,Je,{skipThinkingPersist:!0})),Je}catch(Je){return l("startSessionAndActivateSkill",Je),Ye}finally{Tl.delete(oe)}}async function Fs(oe,Ae){if(Tl.has(oe))return null;Tl.add(oe);let Se=null;try{const Pe=await xi(oe);return Pe?(Se=Pe,await o.openSideChatOn(Pe,Ae),Pe):null}catch(Pe){return l("startSessionAndOpenSideChat",Pe),Se}finally{Tl.delete(oe)}}async function Ni(oe){const Ae=oe.trim();if(!Ae)return!1;const Se=Pt();try{const Pe=await Se.addWorkspace({root:Ae});return mi(Pe),Lt(Pe.id),!0}catch(Pe){return Dl("[kimi-web] addWorkspaceByPath failed for",Ae,Pe),!1}}async function $i(oe){try{return await Pt().browseFs(oe)}catch{return{path:"",parent:null,entries:[]}}}async function So(){try{return await Pt().getFsHome()}catch{return{home:"",recentRoots:[]}}}function _i(oe,Ae){if(Ae==="none"||typeof window>"u"||!window.history)return;const Se=Wte(oe);if(window.location.pathname!==Se)try{Ae==="push"?window.history.pushState(null,"",Se):window.history.replaceState(null,"",Se)}catch{}}async function Yi(oe){try{const Ae=await Pt().getSession(oe);return e.sessions.some(Se=>Se.id===Ae.id)||g(Ae),!0}catch{return!1}}async function co(oe){try{const Ae=await Pt().getSession(oe);return Ae.archived?"stale":(e.sessions.some(Se=>Se.id===Ae.id)||g(Ae),"ok")}catch(Ae){return Ps(Ae)&&Ae.code===r6e?"stale":"retry"}}function Bs(){const oe=AC(window.location);if(oe===void 0){w(void 0);return}if(oe!==e.activeSessionId){if(e.sessions.some(Ae=>Ae.id===oe)){Mn(oe,{urlMode:"none"});return}(async()=>{if(await Yi(oe)){await Mn(oe,{urlMode:"none"});return}const Ae=e.sessions[0];Ae?await Mn(Ae.id,{urlMode:"replace"}):(w(void 0),_i(void 0,"replace"))})()}}let Hi=!1;function vi(){Hi||typeof window>"u"||(Hi=!0,window.addEventListener("popstate",Bs))}async function Mn(oe,Ae){if(!e.sessions.some(Ye=>Ye.id===oe)){const Ye=++Y;if(!await Yi(oe)||Ye!==Y)return}const Se=S(oe),Pe=!Se&&c.has(oe);c.delete(oe);try{_i(oe,Ae?.urlMode??"push"),e.sessionLoading=!Se&&!Pe,w(oe),e.unreadBySession[oe]&&(e.unreadBySession={...e.unreadBySession,[oe]:!1},X({[oe]:!1})),de();const Ye=e.sessions.find(Je=>Je.id===oe);if(Ye){const Je=W(Ye);e.activeWorkspaceId!==Je&&zn(Je)}if(Se){if(await E(oe)==="not-found")return}else if(await x(oe,{skipStatusRefresh:Ae?.skipStatusRefresh===!0})==="not-found")return;U(oe,{skipStatus:Ae?.skipStatusRefresh===!0})}catch(Ye){l("selectSession",Ye,{sessionId:oe})}finally{e.activeSessionId===oe&&(e.sessionLoading=!1)}}async function Dn(oe,Ae,Se){const Pe=I8(oe);e.inFlightBySession={...e.inFlightBySession,[oe]:!0};const Ye=A();let Je=e.pendingThinkingBySession[oe];try{const xt=Pt(),bt=[];if(Ae&&bt.push({type:"text",text:Ae}),bt.push(...M8(Se)),bt.length===0)return e.inFlightBySession={...e.inFlightBySession,[oe]:!1},"rejected";const nn={id:Ye,sessionId:oe,role:"user",content:bt,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};k(oe,dt=>[...dt,nn]);const Ot=e.sessions.find(dt=>dt.id===oe),wn=(Ot?.model&&Ot.model.length>0?Ot.model:e.defaultModel)??void 0,Qn=e.planArmedBySession[oe]??!1,$t=Qn||(e.planModeBySession[oe]??!1),Ht=e.swarmModeBySession[oe]??!1,Wn=e.goalModeBySession[oe]??!1;Qn&&(e.planArmedBySession={...e.planArmedBySession,[oe]:!1},G(),(e.planModeBySession[oe]??!1)||(await xt.updateSession(oe,{planMode:!0}),e.planModeBySession={...e.planModeBySession,[oe]:!0})),Wn&&Ae&&(await xt.updateSession(oe,{goalObjective:Ae.trim(),planMode:!1}),e.planModeBySession={...e.planModeBySession,[oe]:!1});const Ee=await r.resolveThinkingForPrompt(oe,wn)??e.thinking;Je=e.pendingThinkingBySession[oe];const ct=await xt.submitPrompt(oe,{content:bt,model:wn,thinking:Ee,permissionMode:e.permission,planMode:$t&&!(Wn&&Ae),swarmMode:Ht});return Ee!==void 0&&Ca(e,oe,Je),Wn&&Ae&&(e.goalModeBySession={...e.goalModeBySession,[oe]:!1},H()),e.promptIdBySession={...e.promptIdBySession,[oe]:ct.promptId},re(oe,Ye,ct.promptId,ct.userMessageId),v()?.bindNextPromptId(oe,ct.promptId),"ok"}catch(xt){return e.inFlightBySession={...e.inFlightBySession,[oe]:!1},k(oe,bt=>bt.some(nn=>nn.id===Ye)?bt.filter(nn=>nn.id!==Ye||nn.promptId!==void 0||nn.userMessageId!==void 0):bt),Ca(e,oe,Je)&&M(oe),l("sendPrompt",xt,{sessionId:oe}),Ps(xt)?"rejected":"uncertain"}finally{E8(oe,Pe)}}async function Ln(oe,Ae){const Se=e.activeSessionId;if(Se){if(u.value!=="idle"||e.inFlightBySession[Se]){Di(oe,Ae);return}if((e.queuedBySession[Se]?.length??0)>0){Di(oe,Ae),ri(Se);return}await Dn(Se,oe,Ae)}}async function ws(oe,Ae){const Se=e.activeSessionId;if(!Se)return;const Pe=e.queuedBySession[Se]??[],Ye=[],Je=[];for(const Ht of Pe){const Wn=Ht.text.trim();Wn&&Ye.push(Wn),Ht.attachments?.length&&Je.push(...Ht.attachments)}const xt=oe.trim();if(xt&&Ye.push(xt),Ae?.length&&Je.push(...Ae),Ye.length===0&&Je.length===0)return;Pe.length>0&&(e.queuedBySession={...e.queuedBySession,[Se]:[]});const bt=Ye.join(` - -`),nn=()=>{if(Pe.length===0)return;const Ht=e.queuedBySession[Se]??[];e.queuedBySession={...e.queuedBySession,[Se]:[...Pe,...Ht]}};if(u.value==="idle"&&!e.inFlightBySession[Se]){await Dn(Se,bt,Je)==="rejected"&&nn();return}const Ot=[];bt&&Ot.push({type:"text",text:bt});for(const Ht of Je)Ht.kind==="video"?Ot.push({type:"video",source:{kind:"file",fileId:Ht.fileId}}):Ht.kind==="file"?Ot.push({type:"file",fileId:Ht.fileId,name:Ht.name??"",mediaType:Ht.mediaType||"application/octet-stream",size:Ht.size??0}):Ot.push({type:"image",source:{kind:"file",fileId:Ht.fileId}});const wn=A(),Qn={id:wn,sessionId:Se,role:"user",content:Ot,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};k(Se,Ht=>[...Ht,Qn]);const $t=I8(Se);try{const Ht=Pt(),Wn=e.sessions.find(ki=>ki.id===Se),Ee=(Wn?.model&&Wn.model.length>0?Wn.model:e.defaultModel)??void 0,ct=await r.resolveThinkingForPrompt(Se,Ee)??e.thinking,dt=e.pendingThinkingBySession[Se],Wt=await Ht.submitPrompt(Se,{content:Ot,model:Ee,thinking:ct,permissionMode:e.permission,planMode:e.planModeBySession[Se]??!1,swarmMode:e.swarmModeBySession[Se]??!1});if(ct!==void 0&&Ca(e,Se,dt),re(Se,wn,Wt.promptId,Wt.userMessageId),Wt.status!=="queued"){e.promptIdBySession={...e.promptIdBySession,[Se]:Wt.promptId},v()?.bindNextPromptId(Se,Wt.promptId);return}try{await Ht.steerPrompts(Se,[Wt.promptId])}catch{}}catch(Ht){k(Se,Wn=>Wn.filter(Ee=>Ee.id!==wn||Ee.promptId!==void 0||Ee.userMessageId!==void 0)),Ps(Ht)&&nn(),l("steer",Ht,{sessionId:Se})}finally{E8(Se,$t)}}async function Cn(oe,Ae){try{const Pe=await Pt().uploadFile({file:oe,name:Ae});return{fileId:Pe.id,name:Pe.name,mediaType:Pe.mediaType}}catch(Se){return l("uploadImage",Se),null}}function Di(oe,Ae){const Se=e.activeSessionId;if(!Se)return;const Pe=e.queuedBySession[Se]??[],Ye={text:oe,attachments:Ae,id:A6e()};e.queuedBySession={...e.queuedBySession,[Se]:[...Pe,Ye]}}function ri(oe){const[Ae,...Se]=e.queuedBySession[oe]??[];Ae!==void 0&&(e.queuedBySession={...e.queuedBySession,[oe]:Se},Dn(oe,Ae.text,Ae.attachments).then(Pe=>{if(Pe==="ok"){bc.delete(oe);return}if(Pe==="uncertain"){bc.delete(oe);return}if(!e.sessions.some(nn=>nn.id===oe)){bc.delete(oe);return}const Ye=Ae.id??Ae.text,Je=bc.get(oe),xt=Je!==void 0&&Je.key===Ye?Je.count+1:1;if(xt>=y6e){bc.delete(oe),(e.queuedBySession[oe]?.length??0)>0&&ri(oe);return}bc.set(oe,{key:Ye,count:xt});const bt=e.queuedBySession[oe]??[];e.queuedBySession={...e.queuedBySession,[oe]:[Ae,...bt]}}))}function ur(oe,Ae){const Se=e.inFlightBySession[oe]===!0;if(e.inFlightBySession={...e.inFlightBySession,[oe]:!1},e.promptIdBySession[oe]!==void 0){const Ye={...e.promptIdBySession};delete Ye[oe],e.promptIdBySession=Ye}return(Se||Ae?.turnWasActive===!0||(e.turnActiveBySession[oe]??!1))&&ri(oe),Se}function jo(oe,Ae){Ae.inFlightTurn!==null&&Ae.busy||ur(oe)}async function On(){const oe=e.activeSessionId;if(!oe)return!1;const Ae=e.sessions.find(bt=>bt.id===oe);let Se=e.promptIdBySession[oe];if(Se===void 0){const bt=Ae?.currentPromptId;bt!==void 0&&bt.length>0&&!bt.startsWith("pr_")&&(Se=bt)}const Pe=Pt();let Ye=!1;const Je=()=>{e.inFlightBySession={...e.inFlightBySession,[oe]:!1},e.turnActiveBySession={...e.turnActiveBySession,[oe]:!1}};if(Se!==void 0)try{if((await Pe.abortPrompt(oe,Se)).aborted)return!0;Ye=!0;const nn={...e.promptIdBySession};delete nn[oe],e.promptIdBySession=nn,Je()}catch(bt){if(Ps(bt)&&bt.code===l6e){Ye=!0;const nn={...e.promptIdBySession};delete nn[oe],e.promptIdBySession=nn,Je()}else return l("abortCurrentPrompt",bt,{sessionId:oe}),!1}if(Ye||!((e.inFlightBySession[oe]??!1)||(e.turnActiveBySession[oe]??!1)||(Ae?.mainTurnActive??!1)))return!1;try{return(await Pe.abortSession(oe)).aborted===!0}catch(bt){return l("abortCurrentPrompt",bt,{sessionId:oe}),!1}}function us(oe,Ae){const Se=e.approvalsBySession[oe]??[];e.approvalsBySession={...e.approvalsBySession,[oe]:Se.filter(Pe=>Pe.approvalId!==Ae)}}function qs(oe,Ae){const Se=e.questionsBySession[oe]??[];e.questionsBySession={...e.questionsBySession,[oe]:Se.filter(Pe=>Pe.questionId!==Ae)}}async function Us(oe,Ae){const Se=e.activeSessionId;if(!Se||dg[oe])return;dg[oe]=!0;const Pe=e.approvalsBySession[Se]?.find(Ye=>Ye.approvalId===oe&&Ye.toolName==="ExitPlanMode")?.toolCallId;try{const Ye=Pt(),Je={decision:Ae.decision,scope:Ae.scope,feedback:Ae.feedback,selectedLabel:Ae.selectedLabel};await Ye.respondApproval(Se,oe,Je),us(Se,oe),Pe!==void 0&&(T(Se,Pe,{state:Ae.decision,selectedOption:Ae.selectedLabel,feedback:Ae.feedback}),D(Se,Pe))}catch(Ye){g4(Ye)?(us(Se,oe),Pe!==void 0&&D(Se,Pe)):l("respondApproval",Ye,{sessionId:Se})}finally{delete dg[oe]}}async function Ji(oe,Ae){const Se=e.activeSessionId;if(Se&&!gc[oe]){gc[oe]="answer";try{await Pt().respondQuestion(Se,oe,Ae),qs(Se,oe)}catch(Pe){g4(Pe)?qs(Se,oe):l("respondQuestion",Pe,{sessionId:Se})}finally{delete gc[oe]}}}async function $e(oe){const Ae=e.activeSessionId;if(Ae&&!gc[oe]){gc[oe]="dismiss";try{await Pt().dismissQuestion(Ae,oe),qs(Ae,oe)}catch(Se){g4(Se)?qs(Ae,oe):l("dismissQuestion",Se,{sessionId:Ae})}finally{delete gc[oe]}}}async function nt(oe){const Ae=e.activeSessionId;if(Ae&&!m4[oe]){m4[oe]=!0;try{const Se=Pt(),Pe=(e.tasksBySession[Ae]??[]).find(Je=>Je.id===oe)?.backgroundTaskId;await Se.cancelTask(Ae,Pe??oe);const Ye=e.tasksBySession[Ae]??[];e.tasksBySession={...e.tasksBySession,[Ae]:Ye.map(Je=>Je.id===oe?{...Je,status:"cancelled",completedAt:Je.completedAt??new Date().toISOString(),completedAtEstimated:Je.completedAt===void 0?!0:Je.completedAtEstimated}:Je)}}catch(Se){p6e(Se)||l("cancelTask",Se,{sessionId:Ae})}finally{delete m4[oe]}}}function Nt(oe){const Ae=e.activeSessionId;Ae?(e.planArmedBySession={...e.planArmedBySession,[Ae]:oe},G(),!oe&&(e.planModeBySession[Ae]??!1)&&(e.planModeBySession={...e.planModeBySession,[Ae]:!1},$({planMode:!1},Ae))):q.planMode=oe}function Zt(){const oe=e.activeSessionId,Ae=oe?(e.planArmedBySession[oe]??!1)||(e.planModeBySession[oe]??!1):q.planMode;Nt(!Ae)}function Nn(oe){const Ae=e.activeSessionId;Ae?(e.swarmModeBySession={...e.swarmModeBySession,[Ae]:oe},K(),$({swarmMode:oe})):q.swarmMode=oe}async function cs(){const oe=e.activeSessionId,Se=!(oe?e.swarmModeBySession[oe]??!1:q.swarmMode);Se&&e.permission==="manual"&&!await i({title:n("workspace.swarmEnableTitle"),message:n("workspace.swarmEnableConfirm"),variant:"primary"})||Nn(Se)}function Fi(oe){const Ae=e.activeSessionId;Ae?(e.goalModeBySession={...e.goalModeBySession,[Ae]:oe},H()):q.goalMode=oe}function di(){const oe=e.activeSessionId,Ae=oe?e.goalModeBySession[oe]??!1:q.goalMode;Fi(!Ae)}async function fi(oe){const Ae=oe.trim();if(!Ae||e.permission==="manual"&&!await i({title:n("workspace.goalStartTitle"),message:n("workspace.goalStartConfirm",{objective:Ae}),variant:"primary"}))return null;let Se=e.activeSessionId,Pe=null;if(!Se){const Ye=e.activeWorkspaceId,Je=Ye&&O.value.some(xt=>xt.id===Ye)?Ye:O.value[0]?.id??null;if(!Je)return null;try{Se=await xi(Je)??void 0,Pe=Se??null}catch(xt){return l("createGoal",xt),null}if(!Se)return null}try{await Pt().updateSession(Se,{goalObjective:Ae,planMode:!1}),e.planModeBySession={...e.planModeBySession,[Se]:!1}}catch(Ye){return l("createGoal",Ye,{sessionId:Se,message:ie(Ye)}),Pe}return e.goalModeBySession[Se]&&(e.goalModeBySession={...e.goalModeBySession,[Se]:!1},H()),e.activeSessionId===Se?await Ln(Ae):await Dn(Se,Ae),Pe}function Ks(oe){const Ae=e.activeSessionId;Ae&&Promise.resolve(Pt().updateSession(Ae,{goalControl:oe})).catch(Se=>{l("controlGoal",Se,{sessionId:Ae,message:ie(Se)})})}function Si(oe){e.permission=oe,z(oe),$({permissionMode:oe})}function Vs(oe){const Ae=[...e.warnings];Ae.splice(oe,1),e.warnings=Ae}async function Zs(oe,Ae){try{await Pt().updateSession(oe,{title:Ae}),f(oe,Pe=>({...Pe,title:Ae}))}catch(Se){l("renameSession",Se,{sessionId:oe})}}async function Wi(oe){const Ae=await Pt().generateSessionTitle(oe,{force:!0,source:"digest"});return Ae===null&&a({severity:"info",title:n("sidebar.genTitleUnavailable")}),Ae}async function xs(oe,Ae){const Se=e.workspaces.find(Ye=>Ye.id===oe)?.root,Pe=()=>{e.workspaces=e.workspaces.map(Ye=>Ye.id===oe?{...Ye,name:Ae}:Ye)};try{if(await Pt().updateWorkspace(oe,{name:Ae}),Se!==void 0){const Ye=P0();Se in Ye&&(delete Ye[Se],QC(Ye))}Pe()}catch(Ye){if(Se!==void 0&&Ps(Ye)&&Ye.code===a6e){QC({...P0(),[Se]:Ae}),Pe();return}l("renameWorkspace",Ye)}}async function fo(oe){const Ae=e.workspaces.find(Je=>Je.id===oe)?.root??P.value.find(Je=>Je.id===oe)?.root??oe,Se=e.activeSessionId?e.sessions.find(Je=>Je.id===e.activeSessionId):void 0,Pe=e.activeWorkspaceId===oe||e.activeWorkspaceId===Ae,Ye=!!(Se&&(Se.cwd===Ae||Se.workspaceId===oe||W(Se)===oe));Ae&&!e.hiddenWorkspaceRoots.includes(Ae)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,Ae],ue(e.hiddenWorkspaceRoots));try{await Pt().deleteWorkspace(oe)}catch(Je){Dl("[kimi-web] deleteWorkspace registry cleanup failed for",oe,Je)}if(e.workspaces=e.workspaces.filter(Je=>Je.id!==oe&&Je.root!==Ae),Pe||Ye){const Je=O.value[0]?.id??null;if(e.activeWorkspaceId=Je,Je)ee(Je);else try{lr(un.activeWorkspace)}catch{}}(Pe||Ye)&&(w(void 0),e.sessionLoading=!1,de(),_i(void 0,"replace"))}async function yi(oe){try{const Ae=Pt(),Se=e.sessions.find(bt=>bt.id===oe),Pe=Se!==void 0?W(Se):void 0,Ye=Pe!==void 0?mn(Pe).length:0;await Ae.archiveSession(oe),m(oe),Kg.delete(oe),Se!==void 0&&Pe!==void 0&&Ct(Pe,oe,Se.updatedAt,Ye),o.clearSideChatForSession(oe);const{[oe]:Je,...xt}=e.sideChatUserMessageIdsBySession;if(e.sideChatUserMessageIdsBySession=xt,e.activeSessionId===oe){const bt=e.sessions[0];bt?await Mn(bt.id,{urlMode:"replace"}):(w(void 0),_i(void 0,"replace"))}}catch(Ae){l("archiveSession",Ae,{sessionId:oe})}}async function Mo(oe){if(ve)return!1;const Ae=oe??e.activeSessionId;if(!Ae){const Pe=n("commands.export.noSession");return Bo("export:failed",{status:"no-session"}),l("exportSession",new Error(Pe),{message:Pe}),!1}ve=!0;const Se=Date.now();Bo("export:start",{sessionId:Ae});try{const Pe=zke(),{blob:Ye,fileName:Je}=await Pt().exportSession(Ae,Pe,{desktop:Wf});if(typeof document>"u")throw new Error("Document is unavailable");const xt=URL.createObjectURL(Ye);let bt;try{bt=document.createElement("a"),bt.href=xt,bt.download=Je,document.body.append(bt),bt.click()}finally{bt?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(xt)}catch{}},0)}return Bo("export:accepted",{sessionId:Ae,status:"accepted",zipBytes:Ye.size,durationMs:Date.now()-Se}),!0}catch(Pe){const Ye=typeof Pe=="object"&&Pe!==null?Pe:void 0;return Bo("export:failed",{sessionId:Ae,status:"failed",durationMs:Date.now()-Se,errorName:typeof Ye?.name=="string"?Ye.name:typeof Pe,errorCode:typeof Ye?.code=="number"?Ye.code:void 0,requestId:typeof Ye?.requestId=="string"?Ye.requestId:void 0,phase:typeof Ye?.phase=="string"?Ye.phase:void 0,httpStatus:typeof Ye?.status=="number"?Ye.status:void 0}),l("exportSession",Pe,{sessionId:Ae,...Ps(Pe)&&Pe.code===qU?{message:n("commands.export.tooLarge",{sessionId:Ae})}:{}}),!1}finally{ve=!1}}async function ho(oe){try{const Ae=await Pt().restoreSession(oe);return p(Ae),!0}catch(Ae){return l("restoreSession",Ae,{sessionId:oe}),!1}}function Gs(oe){return Pt().listSessions({archivedOnly:!0,beforeId:oe?.beforeId,pageSize:oe?.pageSize??50})}async function ds(){try{await Pt().logout(),await Le(),await as()}catch(oe){l("logout",oe)}}function Ho(oe){const Ae=e.activeSessionId;Ae&&Pt().compactSession(Ae,oe).catch(Se=>{l("compact",Se,{sessionId:Ae})})}async function cr(oe){const Ae=oe??e.activeSessionId;if(Ae)try{const Se=await Pt().forkSession(Ae);p(Se),await Mn(Se.id)}catch(Se){l("fork",Se,{sessionId:Ae})}}async function ft(oe=1){const Ae=e.activeSessionId;if(!Ae)return null;const Se=e.messagesBySession[Ae]??[];let Pe=-1;for(let bt=Se.length-1;bt>=0;bt--){const nn=Se[bt];if(nn.role==="user"&&!(nn.metadata?.origin&&nn.metadata.origin.kind!=="user")){Pe=bt;break}}const Ye=Pe>=0?Se[Pe].content.filter(bt=>bt.type==="text").map(bt=>bt.text).join(` -`):null,Je=oe===1&&Pe>=0&&Se.slice(Pe+1).every(bt=>bt.role!=="user"),xt=Je?e.sessions.find(bt=>bt.id===Ae):void 0;if(Je&&(e.messagesBySession={...e.messagesBySession,[Ae]:Se.slice(0,Pe)},xt!==void 0)){const bt={...xt};delete bt.lastTurnReason,p(bt)}try{return await Pt().undoSession(Ae,oe),await x(Ae),{text:Ye}}catch(bt){return Je&&(e.messagesBySession={...e.messagesBySession,[Ae]:Se},xt!==void 0&&p(xt),await x(Ae).catch(()=>{})),l("undo",bt,{sessionId:Ae}),null}}function Me(oe){const Ae=e.activeSessionId;if(!Ae)return;const Se=e.queuedBySession[Ae]??[];if(oe<0||oe>=Se.length)return;const Pe=[...Se];Pe.splice(oe,1),e.queuedBySession={...e.queuedBySession,[Ae]:Pe}}function Ze(oe,Ae){const Se=e.activeSessionId;if(!Se)return;const Pe=e.queuedBySession[Se]??[];if(oe===Ae||oe<0||oe>=Pe.length||Ae<0||Ae>=Pe.length)return;const Ye=[...Pe],[Je]=Ye.splice(oe,1);Je!==void 0&&(Ye.splice(Ae,0,Je),e.queuedBySession={...e.queuedBySession,[Se]:Ye})}async function on(oe){const Ae=e.activeSessionId;if(!Ae)return[];try{return(await Pt().listDirectory(Ae,{path:oe,includeGitStatus:!0})).items}catch{return[]}}async function Mi(oe){const Ae=e.activeSessionId;if(!Ae)return null;try{const Pe=await Pt().readFile(Ae,{path:oe});return{path:Pe.path,content:Pe.content,encoding:Pe.encoding,mime:Pe.mime,languageId:Pe.languageId,isBinary:Pe.isBinary,size:Pe.size,lineCount:Pe.lineCount}}catch(Se){if(Dl("[kimi-web] readFileContent failed for",oe,Se),Ps(Se)&&Se.code===u6e)throw Se;return null}}async function Wo(oe){return Pt().readHostFileContent(oe)}const bi=10485760;function Al(oe){const Ae=e.activeSessionId;return Ae?Pt().getFileDownloadUrl(Ae,oe):null}async function qo(oe,Ae){const Se=e.activeSessionId;if(!Se)return!1;try{return await Pt().openFile(Se,{path:oe,line:Ae}),!0}catch(Pe){return l("openFile",Pe,{sessionId:Se}),!1}}async function Er(oe){const Ae=e.activeSessionId;if(!Ae)return;const Se=R.value.cwd||".";try{await Pt().openInApp(Ae,oe,Se)}catch(Pe){l("openInApp",Pe,{sessionId:Ae})}}async function dr(oe){const Ae=e.activeSessionId;if(!Ae)return!1;try{return await Pt().revealFile(Ae,{path:oe}),!0}catch(Se){return l("revealFile",Se,{sessionId:Ae}),!1}}function fr(oe){return oe.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(oe)||oe.startsWith("\\\\")}async function po(oe){if(/^(https?:|data:|blob:)/i.test(oe))return oe;const Ae=e.activeSessionId;if(!Ae)return oe;let Se=oe;if(fr(Se)){const Pe=e.sessions.find(Je=>Je.id===Ae)?.cwd,Ye=Pe?av(Se,Pe):null;if(Ye)Se=Ye;else try{const Je=await Wo(Se);return!Je.isBinary||Je.encoding!=="base64"?oe:`data:${Je.mime};base64,${Je.content}`}catch{return oe}}try{const Ye=await Pt().readFile(Ae,{path:Se,length:bi});return!Ye.isBinary||Ye.encoding!=="base64"||Ye.truncated?oe:`data:${Ye.mime};base64,${Ye.content}`}catch{return oe}}async function Gl(oe){const Ae=e.sessions.find(Pe=>Pe.id===e.activeSessionId),Se=Ae===void 0?e.activeWorkspaceId:W(Ae);if(!Se)return[];try{return(await Pt().searchFiles(Se,{query:oe,limit:20})).items.map(Je=>({path:Je.path,name:Je.name}))}catch{return[]}}return{loadFileDiff:J,clearFileDiff:de,loadGitStatus:me,checkAuth:Le,probeManagedMembership:ke,loadConfig:Fe,updateConfig:Re,listAllSessionsGlobal:ot,load:as,refreshServerMeta:Tn,loadWorkspaces:Qt,loadMoreSessions:Kt,loadAllSessions:Fn,ensureFlatSessions:Ve,loadMoreFlatSessions:Rt,selectWorkspace:zn,openWorkspace:Sn,upsertWorkspacePreserveOrder:mi,applyWorkspaceEvent:Ws,clearActiveSession:Li,openWorkspaceDraft:Lt,startSessionAndSendPrompt:Qi,startSessionAndActivateSkill:ci,startSessionAndOpenSideChat:Fs,addWorkspaceByPath:Ni,browseFs:$i,getFsHome:So,writeSessionUrl:_i,fetchSessionIntoList:Yi,onSessionRoutePopState:Bs,bindSessionRoute:vi,selectSession:Mn,submitPromptInternal:Dn,finishPromptLocal:ur,maybeGenerateSessionTitle:k6e,localTurnStartState:C6e,isLocalTurnSnapshotCurrent:x6e,afterLocalTurnStartsSettle:_6e,handleSessionSnapshot:jo,sendPrompt:Ln,steerPrompt:ws,uploadImage:Cn,enqueue:Di,unqueue:Me,reorderQueue:Ze,abortCurrentPrompt:On,respondApproval:Us,respondQuestion:Ji,dismissQuestion:$e,pendingQuestionActions:gc,pendingApprovalActions:dg,cancelTask:nt,setPlanMode:Nt,togglePlanMode:Zt,setSwarmMode:Nn,toggleSwarmMode:cs,setGoalMode:Fi,toggleGoalMode:di,createGoal:fi,controlGoal:Ks,setPermission:Si,dismissWarning:Vs,renameSession:Zs,regenerateSessionTitle:Wi,renameWorkspace:xs,deleteWorkspace:fo,archiveSession:yi,exportSession:Mo,restoreSession:ho,loadArchivedSessions:Gs,logout:ds,compact:Ho,forkSession:cr,undo:ft,listDir:on,readFileContent:Mi,readHostFileContent:Wo,getFileDownloadUrl:Al,openWorkspaceFile:qo,openInApp:Er,revealWorkspaceFile:dr,resolveImageUrl:po,searchFiles:Gl,loadOlderMessages:se,refreshSessionSidecars:U,isStartingFirstPrompt:()=>Tl.size>0}}function M6e(e){const t=e.replace(/[/\\]+$/,"");return t===""?e:t.split(/[/\\]/).pop()??t}function I6e(e,t){return e!==""?e:t?`${M6e(t)} | Kimi Code`:"Kimi Code"}function E6e(e){return F(()=>I6e(fu(e.webTitle),fu(e.activeWorkspaceRoot)))}const fg=YT(),lu=Bve({t:(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t)}),b$=un.permission,k$=un.activeWorkspace,A$=un.planArmed,C$=un.swarmMode,w$=un.goalMode,jS=40401,p2=un.onboarded;lr(un.codeFont);lr(un.accent);lr(un.theme);lr(un.thinking);lr(un.notifyOnComplete);lr(un.notifyOnQuestion);lr(un.notifyOnApproval);lr(un.soundOnComplete);function T6e(){try{const e=uo(b$);if(e==="auto"||e==="yolo"||e==="manual")return e}catch{}return"manual"}function L6e(e){try{Ns(b$,e)}catch{}}function hg(e){const t=uo(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const i={};for(const[s,o]of Object.entries(n))o===!0&&(i[s]=!0);return i}catch{return{}}}function nk(e,t){try{const n={};for(const[i,s]of Object.entries(t))s&&(n[i]=!0);Ns(e,JSON.stringify(n))}catch{}}function ik(){nk(A$,_e.planArmedBySession)}function x$(){nk(C$,_e.swarmModeBySession)}function _$(){nk(w$,_e.goalModeBySession)}function N6e(){try{return uo(k$)}catch{return null}}const S$=un.hiddenWorkspaces;function F6e(){try{const e=uo(S$);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function B6e(e){try{Ns(S$,JSON.stringify(e))}catch{}}function $6e(e){try{Ns(k$,e)}catch{}}function D6e(e,t){if(t&&e.startsWith(t)){const i=e.slice(t.length);return i?`~${i}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const _e=Ts({...$J(),connected:!1,serverVersion:"",webTitle:"",dangerousBypassAuth:!1,backend:"v1",experimentalFlags:{},workspaceName:"kimi-web",connection:"disconnected",permission:T6e(),thinking:void 0,thinkingBySession:{},pendingThinkingBySession:{},planModeBySession:hg(un.planMode),planArmedBySession:hg(A$),swarmModeBySession:hg(C$),goalModeBySession:hg(w$),loading:!1,sessionLoading:!1,queuedBySession:{},gitStatusBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:K5(),authReady:!1,defaultModel:null,managedProviderStatus:null,managedUserInfo:null,managedMembership:null,workspaces:[],activeWorkspaceId:N6e(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:F6e(),availableOpenInApps:[],config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1,flatSessionsNextPageToken:null,flatSessionsHasMore:!0,flatSessionsLoading:!1,flatSessionsLoadingMore:!1,flatSessionsSeeded:!1,flatSessionsFrontier:null}),wa=Ts({}),sk=Ts({}),T1=new Map,i1=new Map;function R6e(e,t){return`${e}\0${t??"*"}`}function M$(e,t,n){sk[t]=n;const i=wa[e]?.[t];i&&(wa[e]={...wa[e],[t]:{...i,review:n}})}async function ap(e,t){if(t!==void 0){ap(e);return}const n=R6e(e,t),i=(T1.get(n)??0)+1;T1.set(n,i),t!==void 0&&i1.set(e,(i1.get(e)??0)+1);const s=i1.get(e)??0;try{const o=await Pt().getSessionPlans(e,{agentId:"main",toolCallId:t});if(T1.get(n)!==i||t===void 0&&(i1.get(e)??0)!==s||!_e.sessions.some(l=>l.id===e))return;const r=Object.fromEntries(o.map(l=>[l.toolCallId,l]));for(const[l,a]of Object.entries(r)){const u=sk[l];u&&(!a.review||a.review.state==="pending")&&(r[l]={...a,review:u})}wa[e]=t===void 0?r:{...wa[e],...r}}catch(o){Dl("[refreshSessionPlans] plan history unavailable for",e,o)}}function z6e(e){const t=`${e}\0`;for(const n of T1.keys())n.startsWith(t)&&T1.delete(n);i1.delete(e),delete wa[e]}function O6e(e){delete wa[e]}const Fp=Ts({planMode:!1,swarmMode:!1,goalMode:!1});function ok(e){_e.sessions=e}function Tv(e,t){_e.sessions=_e.sessions.map(n=>n.id===e?t(n):n)}function P6e(e){_e.sessions=Hte(_e.sessions,e)}function j6e(e){_e.sessions=[..._e.sessions,e]}function H6e(e){_e.sessions=_e.sessions.filter(t=>t.id!==e)}function I$(){const e=_e.activeSessionId;e&&_e.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(_e.unreadBySession[e]=!1,V5({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===un.unread&&(_e.unreadBySession=K5(),I$())});function T8(){if(xr===null||!xr.health().stale)return;Bo("ws:stale-reconnect",{sessionId:_e.activeSessionId,status:"stale"}),Fke("ws: stale socket on focus, reconnecting",{activeSessionId:_e.activeSessionId}),xr.reconnect();const e=_e.activeSessionId;e&&b2.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(I$(),T8())});typeof window<"u"&&(window.addEventListener("focus",T8),window.addEventListener("online",T8));function rk(e){_e.activeSessionId=e}function W6e(e){Zo(_e.messagesBySession,e)}function q6e(e,t){_e.messagesBySession[e]=t}function E$(e,t){_e.messagesBySession[e]=t(_e.messagesBySession[e]??[])}function U6e(e){delete _e.messagesBySession[e]}function T$(e){xr?.unsubscribe(e),m2.forgetSession(e),N8.delete(e),g7e(e),Af.discard(({meta:t})=>t.sessionId===e),H6e(e),U6e(e),z6e(e),delete _e.approvalsBySession[e],delete _e.questionsBySession[e],delete _e.tasksBySession[e],delete _e.goalBySession[e],delete _e.gitStatusBySession[e],delete _e.lastSeqBySession[e],delete _e.compactionBySession[e],delete _e.messagesLoadingMoreBySession[e],delete _e.messagesHasMoreBySession[e],delete _e.messagesLoadMoreErrorBySession[e],delete L8[e],y2.delete(e),Vg.delete(e),U$.delete(e),w6e(e),delete _e.queuedBySession[e],delete _e.promptIdBySession[e],delete _e.inFlightBySession[e],delete _e.turnActiveBySession[e],delete _e.turnEndedPromptIdBySession[e],delete _e.turnErrorBySession[e],delete _e.turnRetryBySession[e],delete _e.planModeBySession[e],delete _e.planArmedBySession[e],delete _e.swarmModeBySession[e],delete _e.goalModeBySession[e],delete _e.thinkingBySession[e],delete _e.pendingThinkingBySession[e],ik(),x$(),_$(),lo.value.includes(e)&&(lo.value=cL(lo.value,e),dv(lo.value))}const L$=Z(null),N$=Z([]),F$=Z(!1),B$=Z(null),$$=Z(!1),D$=Z(!1),R$=Z(null);async function Xc(e){let t;try{t=await Pt().getSessionStatus(e)}catch{return}Tv(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),_e.swarmModeBySession[e]=t.swarmMode,_e.planModeBySession[e]=t.planMode,lr(un.planMode),t.thinkingEffort.length>0&&lL(_e,e,t.thinkingEffort)}const g2=new Set;function K6e(e){g2.add(e),z$(e).finally(()=>{g2.delete(e)})}async function z$(e){const t=_e.goalVersionBySession[e]??0;let n;try{n=await Pt().getSessionGoal(e)}catch{return}(_e.goalVersionBySession[e]??0)===t&&(n===null||n.status==="complete"?delete _e.goalBySession[e]:_e.goalBySession[e]=n)}function O$(e,t){const n=t??_e.activeSessionId;if(!n)return Promise.resolve(!1);const i=e.thinking!==void 0?_e.pendingThinkingBySession[n]:void 0;return Promise.resolve(Pt().updateSession(n,e)).then(()=>(Ca(_e,n,i),Xc(n))).then(()=>!0).catch(s=>(Ca(_e,n,i)&&Xc(n),$p("persistSessionProfile",s,{sessionId:n}),!1))}function P$(e){try{return uo(e)??""}catch{return""}}function V6e(){return typeof window>"u"?!1:new URLSearchParams(window.location.search).get("kimi_onboarded")==="1"}const j$=V6e();if(j$&&P$(p2)!=="1")try{Ns(p2,"1")}catch{}const H$=Z(j$||P$(p2)==="1");function Z6e(e){H$.value=e;try{Ns(p2,e?"1":"0")}catch{}e&&window.kimiDesktop?.setOnboarded?.()}let xr=null;const m2=jve({api:Pt(),connectEventsIfNeeded:lk,getEventConnection:()=>xr});let HS=0;function W$(){return HS+=1,`msg_opt_${Date.now().toString(36)}_${HS}`}function WS(e,t,n){const i={sessions:_e.sessions,activeSessionId:_e.activeSessionId,messagesBySession:_e.messagesBySession,approvalsBySession:_e.approvalsBySession,planReviewByToolCallId:_e.planReviewByToolCallId,questionsBySession:_e.questionsBySession,tasksBySession:_e.tasksBySession,goalBySession:_e.goalBySession,goalVersionBySession:_e.goalVersionBySession,lastSeqBySession:_e.lastSeqBySession,turnActiveBySession:_e.turnActiveBySession,turnEndedPromptIdBySession:_e.turnEndedPromptIdBySession,turnErrorBySession:_e.turnErrorBySession,turnRetryBySession:_e.turnRetryBySession,compactionBySession:_e.compactionBySession,config:_e.config,warnings:_e.warnings},s=qJ(i,e,{sessionId:t,seq:n},{t:(o,r)=>r===void 0?jn.global.t(o):jn.global.t(o,r)});s.sessions!==i.sessions&&ok(s.sessions),s.activeSessionId!==i.activeSessionId&&rk(s.activeSessionId),W6e(s.messagesBySession),Zo(_e.approvalsBySession,s.approvalsBySession),Zo(_e.planReviewByToolCallId,s.planReviewByToolCallId),Zo(_e.questionsBySession,s.questionsBySession),Zo(_e.tasksBySession,s.tasksBySession),Zo(_e.goalBySession,s.goalBySession),Zo(_e.goalVersionBySession,s.goalVersionBySession),Zo(_e.lastSeqBySession,s.lastSeqBySession),Zo(_e.turnActiveBySession,s.turnActiveBySession),Zo(_e.turnEndedPromptIdBySession,s.turnEndedPromptIdBySession),Zo(_e.turnErrorBySession,s.turnErrorBySession),Zo(_e.turnRetryBySession,s.turnRetryBySession),Zo(_e.compactionBySession,s.compactionBySession),s.config!==i.config&&(_e.config=s.config??null),UJ(s.warnings,i.warnings)||(_e.warnings=s.warnings),e.type==="goalUpdated"&&g2.delete(t),e.type==="configChanged"&&(_e.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(Un.loadModels(),Un.loadProviders()),e.type==="sessionUsageUpdated"&&(e.swarmMode!==void 0&&(_e.swarmModeBySession[e.sessionId]=e.swarmMode),e.planMode!==void 0&&(_e.planModeBySession[e.sessionId]=e.planMode),e.thinking!==void 0&&lL(_e,e.sessionId,e.thinking)),e.type==="sessionDeleted"&&dk(e.sessionId)}function G6e(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="user")return;if(n.role==="assistant")for(let i=n.content.length-1;i>=0;i--){const s=n.content[i];if(s.type==="toolUse"&&s.toolName==="ExitPlanMode")return s.toolCallId}}}function Q6e(e,t){const n=_e.lastSeqBySession[t.sessionId]??0,i=_e.turnActiveBySession[t.sessionId]??!1,s=e.type==="approvalResolved"||e.type==="approvalExpired"?_e.approvalsBySession[t.sessionId]?.find(r=>r.approvalId===e.approvalId&&r.toolName==="ExitPlanMode")?.toolCallId:void 0,o=yo.sideChatTargetBySession.value[t.sessionId];if(e.type==="messageCreated"&&e.message.role==="user"&&e.agentId!==void 0&&Object.prototype.hasOwnProperty.call(_e.sideChatMessagesByAgent,e.agentId)){WS({type:"unknown",raw:{_noop:!0}},t.sessionId,t.seq),yo.reconcileSideChatUserMessage(e.agentId,e.message);return}if(WS(e,t.sessionId,t.seq),o){const{agentId:r}=o,l=t.sessionId;e.type==="agentDelta"&&e.agentId===r?e.delta.text&&yo.appendSideChatAssistantText(r,l,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===r?yo.finishSideChatAgent(r,l):e.type==="taskProgress"&&e.taskId===r?yo.appendSideChatAssistantText(r,l,e.outputChunk):e.type==="taskCompleted"&&e.taskId===r&&yo.finishSideChatAgent(r,l,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const r=e.message.sessionId;_e.promptIdBySession[r]!==e.message.promptId&&(_e.promptIdBySession[r]=e.message.promptId)}if(e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const r=e.reason;zAe(e.sessionId,r==="cancelled"||r==="failed"||r==="blocked"?"aborted":"idle",i);const l=G6e(_e.messagesBySession[e.sessionId]??[]);l!==void 0&&ap(e.sessionId,l)}if(e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&i||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&RAe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&_e.promptIdBySession[e.sessionId]===e.promptId&&Et.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&OAe(e.sessionId,e.question),e.type==="approvalRequested"&&PAe(e.sessionId,e.approval),s!==void 0){const r=e.type==="approvalResolved"?{state:e.decision,selectedOption:e.selectedLabel,feedback:e.feedback}:{state:"cancelled"};M$(t.sessionId,s,r),ap(t.sessionId,s)}}const Af=ZX(({appEvent:e,meta:t})=>Q6e(e,t),({appEvent:e})=>qX(e),{coalesce:QX}),Y6e=3e4;let qS=0,vo=null;const L1=new Map;let v2=0,Cf=null;function J6e(){Cf!==null&&(clearTimeout(Cf),Cf=null)}function US(e){if(!_e.connected||Cf!==null)return;const t=Math.min(Y6e,1e3*2**v2);v2+=1,Dl("[kimi-web] session work reconciliation incomplete; retrying",e),Cf=setTimeout(()=>{Cf=null,_e.connected&&q$()},t)}function X6e(e,t){const n=new Map(e.map(u=>[u.id,u]));let i=!1,s=!1;const o={..._e.turnActiveBySession},r=[],l=new Map,a=_e.sessions.map(u=>{const c=n.get(u.id);if(c===void 0)return u;const d=t.workEventSeqBySession.get(u.id)??0,f=t.turnEventSeqBySession.get(u.id)??0,p=t.pendingEventBySession.get(u.id),g=d>c.lastSeq,m=f>c.lastSeq,y=p!==void 0&&p.seq>c.lastSeq,w=g||m&&u.mainTurnActive===!0?u.busy||u.mainTurnActive===!0:c.busy,k=g||m?u.mainTurnActive:c.mainTurnActive??(w?u.mainTurnActive:!1),A=y?p.source==="work"?u.pendingInteraction:(_e.approvalsBySession[u.id]?.length??0)>0?"approval":(_e.questionsBySession[u.id]?.length??0)>0?"question":"none":c.pendingInteraction??(w?u.pendingInteraction:"none");(y&&p.source==="work"||!y&&(c.pendingInteraction!==void 0||c.busy===!1))&&A!==void 0&&l.set(u.id,A);const v=g?u.lastTurnReason:c.lastTurnReason;L1.set(u.id,Math.max(L1.get(u.id)??0,c.lastSeq));const x=t.turnStartBySession.get(u.id);return(k===!1||k===void 0&&!w)&&t.witnessedTurnBySession.has(u.id)&&x!==void 0&&Et.isLocalTurnSnapshotCurrent(u.id,x)&&r.push(u.id),k===!0&&!o[u.id]?(o[u.id]=!0,s=!0):(k===!1||!w)&&o[u.id]&&(delete o[u.id],s=!0),u.busy===w&&u.mainTurnActive===k&&u.pendingInteraction===A&&u.lastTurnReason===v?u:(i=!0,{...u,busy:w,mainTurnActive:k,pendingInteraction:A,lastTurnReason:v})});i&&ok(a),s&&Zo(_e.turnActiveBySession,o);for(const[u,c]of l)c==="none"?(delete _e.approvalsBySession[u],delete _e.questionsBySession[u]):c==="question"&&delete _e.approvalsBySession[u];for(const u of r)Et.finishPromptLocal(u,{turnWasActive:!0})}async function q$(){const e={workEventSeqBySession:new Map,turnEventSeqBySession:new Map,pendingEventBySession:new Map,turnStartBySession:new Map(_e.sessions.map(t=>[t.id,Et.localTurnStartState(t.id)])),witnessedTurnBySession:new Set(_e.sessions.filter(t=>_e.inFlightBySession[t.id]||_e.turnActiveBySession[t.id]).map(t=>t.id))};vo=e;try{const t=await Et.listAllSessionsGlobal({shouldContinue:()=>vo===e&&_e.connected});if(vo!==e||!_e.connected)return;Af.flush(),X6e(t.sessions,e),vo=null,t.error!==void 0?US(t.error):v2=0}catch(t){if(vo!==e||!_e.connected)return;vo=null,US(t)}}function lk(){if(xr!==null||typeof WebSocket>"u")return;Bo("ws:connection",{status:"connecting"}),_e.connection="connecting",xr=Pt().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){Et.applyWorkspaceEvent(t);return}const i=t.type==="sessionWorkChanged",s=t.type==="turnActiveChanged",o=t.type==="approvalRequested"||t.type==="approvalResolved"||t.type==="approvalExpired"||t.type==="questionRequested"||t.type==="questionAnswered"||t.type==="questionDismissed";if((i||s||o)&&n.seq>0){const r=L1.get(n.sessionId)??0;if(n.seq<=r)return;L1.set(n.sessionId,n.seq)}if(vo!==null&&(i||s||o))if(i){const r=vo.workEventSeqBySession.get(n.sessionId)??0;if(n.seq>r&&vo.workEventSeqBySession.set(n.sessionId,n.seq),t.pendingInteraction!==void 0||!t.busy){const l=vo.pendingEventBySession.get(n.sessionId);(l===void 0||n.seq>l.seq)&&vo.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"work"})}}else if(s){const r=vo.turnEventSeqBySession.get(n.sessionId)??0;n.seq>r&&vo.turnEventSeqBySession.set(n.sessionId,n.seq)}else{const r=vo.pendingEventBySession.get(n.sessionId);(r===void 0||n.seq>r.seq)&&vo.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"interaction"})}for(const r of GX({appEvent:t,meta:n}))Af(r)},onResync(t,n,i){Bo("ws:resync",{sessionId:t,status:"required",seq:n}),Af.flush(),y2.add(t),b2.request(t)},onError(t,n,i){Bo("ws:error",{status:"failed",errorCode:t,fatal:i}),Bp({severity:"error",title:jn.global.t("warnings.wsTitle"),message:n,details:[qi("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){Bo("ws:connection",{status:t?"connected":"disconnected"}),_e.connected=t,_e.connection=t?"connected":"disconnected",t||(vo=null,L1.clear(),J6e(),v2=0),t&&(qS+=1,l7e(),Et.refreshServerMeta())},onReplayComplete(){Af.flush(),qS>1&&q$()},onTranscriptReset(t,n,i,s){m2.receiveReset(t,n,i,s)},onTranscriptOps(t,n,i,s){return m2.applyOps(t,n,i,s)}})}const L8={},y2=new Set,Vg=new Set,U$=new Set;function e7e(e){return Ps(e)&&e.code===jS?!0:typeof e=="object"&&e!==null&&e.code===jS}function qi(e,t){if(!(t==null||t===""))return{label:jn.global.t(`warnings.details.${e}`),value:K$(t)}}function K$(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function t7e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function n7e(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function i7e(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function s7e(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function KS(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function o7e(e,t,n){const i=X2(t),s=Ps(t),o=i||s?t.timestamp:void 0,r=i||s?t.durationMs:void 0,l=[qi("operation",e),qi("sessionId",n??_e.activeSessionId),qi("connection",_e.connection),qi("timestamp",s7e(o??Date.now()))];return i?l.push(qi("duration",KS(r)),qi("request",`${t.method} ${t.path}`),qi("endpoint",t.url),qi("requestId",t.requestId),qi("phase",t.phase),qi("timeout",`${t.timeoutMs}ms`),qi("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),qi("contentType",t.contentType),qi("responsePreview",t.bodyPreview),qi("cause",t.cause)):s?l.push(qi("duration",KS(r)),qi("code",t.code),qi("requestId",t.requestId),qi("message",t.message),qi("details",t.details)):l.push(qi("errorName",t7e(t)),qi("message",n7e(t)??K$(t)),qi("stack",i7e(t))),l.filter(a=>a!==void 0)}function r7e(e,t,n={}){const i=X2(t),s=Ps(t),o=HU(t),r=n.title??(i?o?jn.global.t("warnings.daemonTimeoutTitle"):jn.global.t("warnings.daemonNetworkTitle"):s?jn.global.t("warnings.daemonApiTitle"):jn.global.t("warnings.operationFailedTitle")),l=n.message??(i?o?jn.global.t("warnings.daemonTimeoutMessage"):jn.global.t("warnings.daemonNetworkMessage"):s?t.message:jn.global.t("warnings.operationFailedMessage"));return{severity:"error",title:r,message:l,details:o7e(e,t,n.sessionId)}}function Bp(e){_e.warnings=[..._e.warnings,e]}function l7e(){const e=jn.global.t("warnings.wsTitle"),t=_e.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==_e.warnings.length&&(_e.warnings=t)}function $p(e,t,n){ga(`[kimi-web] operation failed: ${e}`,t);const i=Ps(t),s=X2(t);Bo("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:i?t.code:void 0,requestId:i||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),Bp(r7e(e,t,n))}const a7e={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function u7e(e){if(!Ps(e)||e.code===void 0)return;const t=a7e[e.code];return t?jn.global.t(t):void 0}async function c7e(e){if(T$(e),_e.activeSessionId!==e)return;const t=_e.sessions[0];t?await Et.selectSession(t.id,{urlMode:"replace"}):(rk(void 0),_e.sessionLoading=!1,Et.writeSessionUrl(void 0,"replace"))}const VS=new Set;async function d7e(e){if(!VS.has(e)){VS.add(e);try{const t=await Pt().getSessionWarnings(e),n=jn.global.t("warnings.noteLabel");for(const i of t)Bp(`${n}: ${i.message}`)}catch{}}}async function ak(e,t){const n=Et.localTurnStartState(e);try{const s=await Pt().getSessionSnapshot(e);if(!_e.sessions.some(d=>d.id===e))return"ok";Af.flush();const o=_e.lastSeqBySession[e]??0,r=L8[e],l=y2.has(e)||k2.has(e);if(!l&&r!==void 0&&r===s.epoch&&o>s.asOfSeq)return Vg.delete(e)||(Vg.add(e),b2.request(e)),"ok";if(!Et.isLocalTurnSnapshotCurrent(e,n))return Et.afterLocalTurnStartsSettle(e,()=>{b2.request(e)}),"ok";const a=_e.turnRetryBySession[e];a!==void 0&&a.turnId!==s.inFlightTurn?.turnId&&delete _e.turnRetryBySession[e],(l||s.session.lastTurnReason!=="failed")&&delete _e.turnErrorBySession[e];const u=ym(s.session.usage),c=s.session.mainTurnActive??(s.inFlightTurn!==null&&s.session.busy);Tv(e,d=>QU(d,s.session,c)),q6e(e,$ie(_e.messagesBySession[e]??[],s.messages)),_e.tasksBySession[e]=Uie(s.subagents,_e.tasksBySession[e]??[]),_e.messagesHasMoreBySession[e]=s.hasMoreMessages,_e.approvalsBySession[e]=s.pendingApprovals;for(const d of s.pendingApprovals){const f=d.display;f?.kind==="plan_review"&&typeof f.plan=="string"&&f.plan.length>0&&(_e.planReviewByToolCallId[d.toolCallId]={plan:f.plan,path:typeof f.path=="string"?f.path:void 0})}return _e.questionsBySession[e]=s.pendingQuestions,_e.lastSeqBySession[e]=s.asOfSeq,L8[e]=s.epoch,y2.delete(e),Vg.delete(e),Et.handleSessionSnapshot(e,{inFlightTurn:s.inFlightTurn,busy:s.session.busy}),c?_e.turnActiveBySession[e]=!0:delete _e.turnActiveBySession[e],lk(),xr&&(xr.seedSnapshot(e,s),xr.subscribe(e,{seq:s.asOfSeq,epoch:s.epoch}),p7e(e)),k2.delete(e),u&&t?.skipStatusRefresh!==!0&&Xc(e),d7e(e),"ok"}catch(i){return e7e(i)?(await c7e(e),"not-found"):($p("getSessionSnapshot",i,{title:jn.global.t("warnings.sessionSnapshotTitle"),message:jn.global.t("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const b2=Die(ak);function f7e(e){return Object.prototype.hasOwnProperty.call(_e.messagesBySession,e)}const h7e=4,ca=[],k2=new Set;function p7e(e){const t=ca.indexOf(e);for(t!==-1&&ca.splice(t,1),ca.unshift(e);ca.length>h7e;){let n=-1;for(let s=ca.length-1;s>=0;s--)if(ca[s]!==_e.activeSessionId){n=s;break}if(n===-1)break;const[i]=ca.splice(n,1);if(i===void 0)break;xr?.unsubscribe(i),k2.add(i)}}function g7e(e){const t=ca.indexOf(e);t!==-1&&ca.splice(t,1),k2.delete(e)}async function m7e(e){return ak(e)}function $f(e,t){return(_e.inFlightBySession[e]??!1)||(_e.turnActiveBySession[e]??!1)||(t??_e.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function Dp(e){try{const t=new Date(e),i=Date.now()-t.getTime(),s=i/36e5;if(i<6e4)return jn.global.t("sessions.justNow");if(s<1)return`${Math.round(i/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const o=i/864e5;return o<7?`${Math.round(o)}d`:o<30?`${Math.round(o/7)}w`:o<365?`${Math.round(o/30)}mo`:`${Math.round(o/365)}y`}catch{return e}}const v7e=3e4,ed=Z(0);let v4=null;function y7e(){v4===null&&(v4=setInterval(()=>{ed.value=(ed.value+1)%Number.MAX_SAFE_INTEGER},v7e),v4.unref?.())}function b7e(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const i=typeof t.path=="string"?t.path:"";if(Array.isArray(t.diff))return{kind:"diff",path:i,diff:t.diff};const s=typeof t.old_text=="string"?t.old_text:typeof t.before=="string"?t.before:void 0,o=typeof t.new_text=="string"?t.new_text:typeof t.after=="string"?t.after:void 0;if(s!==void 0&&o!==void 0){const r=Ff(s,o)??Cm(s,o);return{kind:"diff",path:i,diff:r}}return{kind:"diff",path:i,diff:[]}}if(n==="file_io"){const i=typeof t.path=="string"?t.path:"",s=typeof t.operation=="string"?t.operation:"";if(s==="write"&&typeof t.content=="string")return{kind:"file",path:i,content:t.content};if(s==="edit"&&typeof t.before=="string"&&typeof t.after=="string"){const r=Ff(t.before,t.after)??Cm(t.before,t.after);return{kind:"diff",path:i,diff:r}}const o=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:s||n,path:i,detail:o}}if(n==="shell"||n==="command"){const i=typeof t.command=="string"?t.command:e.action,s=typeof t.cwd=="string"?t.cwd:void 0,o=typeof t.danger=="string"?t.danger:OT(i);return{kind:"shell",command:i,cwd:s,danger:o}}if(n==="file_content"||n==="file"){const i=typeof t.path=="string"?t.path:"",s=typeof t.content=="string"?t.content:"",o=typeof t.language=="string"?t.language:void 0;return{kind:"file",path:i,content:s,language:o}}if(n==="file_op"||n==="fileop"){const i=typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,s=typeof t.path=="string"?t.path:"",o=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:i,path:s,detail:o}}if(n==="url_fetch"||n==="url"){const i=typeof t.url=="string"?t.url:e.action;return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:i}}if(n==="search"){const i=typeof t.query=="string"?t.query:e.action,s=typeof t.scope=="string"?t.scope:void 0;return{kind:"search",query:i,scope:s}}if(n==="invocation"||n==="agent_call"||n==="skill_call"){const i=typeof t.kind=="string"?t.kind:n,s=typeof t.name=="string"?t.name:e.toolName,o=typeof t.description=="string"?t.description:void 0;return{kind:"invocation",kind2:i,name:s,description:o}}if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(o=>{const r=o??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const i=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:i,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function k7e(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel}))}}const A7e=F(()=>{const e=_e.activeSessionId,t=e?_e.messagesBySession[e]??[]:[],n=new Map;for(const s of t)if(s.role==="assistant")for(const o of s.content){if(o.type!=="toolUse"||o.toolName!=="Bash"&&o.toolName!=="bash")continue;const r=o.input,l=r&&typeof r.command=="string"?r.command:void 0;l&&n.set(o.toolCallId,l)}const i=new Map;if(n.size===0)return i;for(const s of t)if(s.role==="tool")for(const o of s.content){if(o.type!=="toolResult")continue;const r=B5(o.output);if(!r)continue;let l;for(const u of r){const c=/task_id:\s*(\S+)/.exec(u);if(c?.[1]){l=c[1];break}}if(!l)continue;const a=n.get(o.toolCallId);a&&i.set(l,a)}return i});function V$(e){return A7e.value.get(e.id)}const C7e=F(()=>{const e=_e.activeSessionId,t=e?_e.messagesBySession[e]??[]:[],n=new Map;for(const i of t)if(i.role==="assistant")for(const s of i.content){if(s.type!=="toolUse")continue;const o=s.input,r=o&&typeof o.prompt=="string"?o.prompt:void 0;r&&!n.has(s.toolCallId)&&n.set(s.toolCallId,r);const l=o?.items;if(!r&&Array.isArray(l)&&!n.has(s.toolCallId)){const a=l.filter(u=>typeof u=="string");a.length>0&&n.set(s.toolCallId,a)}}return n});function w7e(e){if(!e.parentToolCallId)return;const t=C7e.value.get(e.parentToolCallId);return Array.isArray(t)?e.swarmIndex!==void 0?t[e.swarmIndex]:void 0:t}function x7e(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",i;if(e.status==="running"&&e.startedAt){i=Date.now()-new Date(e.startedAt).getTime();const l=Math.round(i/1e3),a=Math.floor(l/60),u=l%60;n=jn.global.t("tasks.timingRunning",{time:`${a}:${String(u).padStart(2,"0")}`})}else e.completedAt&&e.startedAt&&!e.completedAtEstimated?(i=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime(),n=jn.global.t("tasks.timingDone",{time:Ma(i,{h:jn.global.t("status.timeUnitHour"),m:jn.global.t("status.timeUnitMinute"),s:jn.global.t("status.timeUnitSecond")})})):n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,o=e.command??V$(e),r=e.kind==="bash"&&o?`$ ${o}`:e.kind==="subagent"?w7e(e)??e.subagentType:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:i,meta:r,output:s,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,swarmIndex:e.swarmIndex,completedAt:e.completedAt,createdAt:e.createdAt,model:e.model,thinkingEffort:e.thinkingEffort}}const _7e=F(()=>{const e=_e.sessions.find(n=>n.id===_e.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:_e.workspaceName,branch:t}}),S7e=F(()=>(ed.value,_e.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:Dp(e.updatedAt),busy:$f(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason,workspaceId:gl(e),cwd:e.cwd})))),M7e=F(()=>_e.activeSessionId??""),I7e=F(()=>{const e=_e.activeSessionId;if(e)return Un.skillsBySession.value[e]??[];const t=Nv.value;return t?Un.skillsByWorkspace.value[t]??[]:[]}),uk=F(()=>{const e=_e.activeSessionId;return e?_e.inFlightBySession[e]??!1:!1}),E7e=F(()=>Et.isStartingFirstPrompt()),yo=t6e(_e,{api:Pt(),pushOperationFailure:$p,nextOptimisticMsgId:W$,connectEventsIfNeeded:lk,getEventConn:()=>xr,resolveThinkingForPrompt:(e,t)=>Un.resolveThinkingForPrompt(e,t),refreshSessionStatus:Xc}),Rp=F(()=>{const e=_e.activeSessionId;if(!e)return[];const t=yo.sideChatTargetBySession.value[e]?.agentId;return(_e.tasksBySession[e]??[]).filter(n=>n.id!==t)}),Z$=e6e(_e,Rp,{api:Pt()}),zp=F(()=>{const e=_e.activeSessionId;return e?(_e.turnActiveBySession[e]??!1)||(_e.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),T7e=F(()=>{const e=_e.activeSessionId;if(e)return _e.turnErrorBySession[e]}),L7e=F(()=>{const e=_e.activeSessionId;if(e&&zp.value)return _e.turnRetryBySession[e]}),G$=e=>Pt().getFileUrl(e),N7e=[],F7e=VT(),Q$=F(()=>{const e=_e.activeSessionId;if(!e)return[];const t=new Set(_e.sideChatUserMessageIdsBySession[e]??[]);return F7e({messages:(_e.messagesBySession[e]??[]).filter(n=>!t.has(n.id)),approvals:_e.approvalsBySession[e]??N7e,getFileUrl:G$,sessionActive:zp.value,planReviewByToolCallId:_e.planReviewByToolCallId,plansByToolCallId:wa[e]})}),B7e=F(()=>uk.value||zp.value),N8=new Map,$7e=F(()=>{Z$.taskClock.value;const e=Rp.value.map(x7e),t=_e.activeSessionId;if(t){let n=N8.get(t);n||(n=new Map,N8.set(t,n));const i=e.filter(r=>r.kind==="subagent"&&r.runInBackground);for(const r of i){const l=r.agentId??r.id;if(r.agentId!==void 0&&r.backgroundTaskId!==void 0&&!n.has(l)){const a=n.get(r.backgroundTaskId);a!==void 0&&(n.delete(r.backgroundTaskId),n.set(l,a))}}const s=i.filter(r=>!n.has(r.agentId??r.id)).sort((r,l)=>(r.createdAt??"").localeCompare(l.createdAt??""));let o=n.size===0?0:Math.max(...n.values())+1;for(const r of s)n.set(r.agentId??r.id,o++);for(const r of i)r.swarmIndex=n.get(r.agentId??r.id)}return e}),Y$=F(()=>aee(Rp.value)),D7e=F(()=>cee(Rp.value)),qd=F(()=>{const e=_e.activeSessionId;return e?_e.goalBySession[e]??null:null}),R7e=F(()=>{const e=_e.activeSessionId;return e?JX(_e.messagesBySession[e]??[]):[]}),z7e=F(()=>{const e=_e.activeSessionId;return e?_e.compactionBySession[e]??null:null}),O7e=F(()=>_e.connection),P7e=F(()=>_e.loading),j7e=F(()=>_e.sessionLoading),H7e=F(()=>{const e=_e.activeSessionId;return e?_e.messagesLoadingMoreBySession[e]??!1:!1}),W7e=F(()=>{const e=_e.activeSessionId;return e?_e.messagesHasMoreBySession[e]??!1:!1}),q7e=F(()=>{const e=_e.activeSessionId;return e?_e.messagesLoadMoreErrorBySession[e]??!1:!1}),U7e=F(()=>_e.serverVersion),J$=F(()=>_e.webTitle),K7e=F(()=>_e.experimentalFlags),V7e=F(()=>_e.backend),Z7e=F(()=>_e.dangerousBypassAuth);function G7e(){_e.dangerousBypassAuth=!1}const Q7e=F(()=>_e.permission),Y7e=F(()=>_e.thinking),X$=F(()=>{const e=_e.activeSessionId;return e?_e.planModeBySession[e]??!1:Fp.planMode}),J7e=F(()=>{const e=_e.activeSessionId;return e?_e.planArmedBySession[e]??!1:Fp.planMode}),X7e=F(()=>{const e=_e.activeSessionId;return e?_e.swarmModeBySession[e]??!1:Fp.swarmMode}),eAe=F(()=>{const e=_e.activeSessionId;return e?_e.goalModeBySession[e]??!1:Fp.goalMode}),tAe=F(()=>{const e=_e.activeSessionId,t=(e?wa[e]:void 0)??{},n={},i=new Set;for(const o of Q$.value)for(const r of o.tools??[]){if(r.name!=="ExitPlanMode")continue;i.add(r.id);const l=t[r.id];if(l){n[r.id]=l;continue}const a=_e.planReviewByToolCallId[r.id],u=nAe(r.arg),c=a?.plan??u?.plan,d=r.planPath??a?.path;!c&&!d||(n[r.id]={agentId:"main",toolCallId:r.id,turnId:o.id,source:"interaction",plan:c??"",path:d,options:u?.options,review:sk[r.id]})}return{...Object.fromEntries(Object.entries(t).filter(([o])=>!i.has(o))),...n}});function nAe(e){try{const t=JSON.parse(e);return{plan:typeof t.plan=="string"?t.plan:void 0,options:Array.isArray(t.options)?t.options:void 0}}catch{return}}const iAe=F(()=>{const e=uee(Y$.value);return{plan:X$.value,goal:qd.value&&qd.value.status!=="complete"?{status:qd.value.status,turnsUsed:qd.value.turnsUsed,elapsedMs:qd.value.wallClockMs}:null,swarm:e.total>0?e:null}}),sAe=F(()=>{const e=_e.activeSessionId;if(!e)return[];const t=Pt();return(_e.queuedBySession[e]??[]).map(n=>({id:n.id??n.text,text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(i=>({fileId:i.fileId,kind:i.kind,url:t.getFileUrl(i.fileId),name:i.name}))}))}),oAe=F(()=>_e.warnings),rAe=F(()=>{const e=_e.activeSessionId;return e?(_e.questionsBySession[e]??[]).map(k7e):[]}),lAe=F(()=>{const e=_e.activeSessionId;return e?(_e.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:b7e(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),ck=F(()=>{const e=_e.activeSessionId;return e?(_e.approvalsBySession[e]??[]).length>0?"awaiting-approval":(_e.questionsBySession[e]??[]).length>0?"awaiting-question":uk.value||zp.value?"running":"idle":"idle"}),Un=s6e(_e,{api:Pt(),pushOperationFailure:$p,refreshSessionStatus:Xc,persistSessionProfile:O$,savePlanModeToStorage:ik,activity:ck,updateSession:Tv,updateSessionMessages:E$,loadConfig:()=>Et.loadConfig(),checkAuth:()=>Et.checkAuth(),beginLocalTurn:I8,settleLocalTurn:E8}),F8=F(()=>{const e=_e.activeSessionId;if(!e)return null;const t=_e.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),aAe=F(()=>{const e=_e.activeSessionId;return e?_e.gitStatusBySession[e]?.pullRequest??null:null}),uAe=F(()=>{const e=_e.activeSessionId;if(!e)return[];const t=_e.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,i])=>({path:n,status:i})).sort((n,i)=>n.path.localeCompare(i.path)):[]}),cAe=F(()=>{const e=_e.activeSessionId;if(!e)return null;const t=_e.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),eD=F(()=>{const e=_e.sessions.find(r=>r.id===_e.activeSessionId),t=F8.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?Un.draftModel.value:null,i=(e?.model&&e.model.length>0?e.model:n??_e.defaultModel)??"—",s=Un.models.value.find(r=>r.id===i)??Un.models.value.find(r=>r.model===i);return{model:s?.displayName||s?.model||(i.includes("/")?i.split("/").pop():i),modelId:s?.id??i,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:_e.permission,branch:t,cwd:e?.cwd??"",isGitRepo:F8.value!==null}}),dAe=F(()=>N$.value),fAe=F(()=>_e.sessions.find(t=>t.id===_e.activeSessionId)?.usage.totalCostUsd??0),hAe=F(()=>_e.authReady),pAe=F(()=>_e.defaultModel),gAe=F(()=>_e.managedProviderStatus),mAe=F(()=>_e.managedUserInfo),vAe=F(()=>_e.managedMembership),yAe=F(()=>_e.config),bAe=F(()=>{const e=_e.activeSessionId;if(!e)return{};const t=_e.gitStatusBySession[e];return t?{...t.entries}:{}}),kAe=F(()=>{const e=new Map;for(const t of _e.workspaces){const n=el(t.root);e.has(n)||e.set(n,t.id)}return e});function gl(e){return kAe.value.get(el(e.cwd))??e.workspaceId??e.cwd}const Lv=F(()=>Hee({workspaces:_e.workspaces,sessions:_e.sessions,hiddenWorkspaceRoots:_e.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:_e.sessionsHasMoreByWorkspace})),A2=Z(jie()),C2=Z(Hie());function AAe(e){C2.value!==e&&(C2.value=e,Wie(e))}const up=Z(qie());Qe(()=>_e.sessions,e=>{const t=mse(e,gl),{next:n,changed:i}=gse(up.value,t);i&&(up.value=n,RL(n))});const tD=F(()=>vse(Lv.value,up.value));Qe(()=>[Lv.value.map(e=>e.id).join("\0"),_e.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],i=dse(n,A2.value,tD.value);i!==null&&(A2.value=i,DL(i));const{next:s,changed:o}=yse(up.value,new Set(n));o&&(up.value=s,RL(s))});const lo=Z(zL());function nD(e){const t=ate(lo.value,e);t!==lo.value&&(lo.value=t,dv(t))}function dk(e){const t=cL(lo.value,e);t!==lo.value&&(lo.value=t,dv(t))}function CAe(e){const t=new Set(e),n=lo.value.filter(i=>!t.has(i));n.length!==lo.value.length&&(lo.value=n,dv(n))}function wAe(e){lo.value.includes(e)?dk(e):nD(e)}const ml=F(()=>{const e=Lv.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:D6e(t.root,_e.fsHome),sessionCount:t.sessionCount}));return C2.value==="recent"?pse(e,tD.value):fse(e,A2.value)}),Nv=F(()=>{const e=_e.activeWorkspaceId,t=ml.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});Qe(Nv,e=>{e&&(Object.prototype.hasOwnProperty.call(Un.skillsByWorkspace.value,e)||Un.loadSkillsForWorkspace(e))},{immediate:!0});const iD=F(()=>{const e=Nv.value;return e?ml.value.find(t=>t.id===e)??null:null}),xAe=E6e({webTitle:J$,activeWorkspaceRoot:()=>iD.value?.root??null}),_Ae=F(()=>{ed.value;const e=new Set(ml.value.map(n=>n.id)),t=new Map(ml.value.map(n=>[n.id,n.name]));return _e.sessions.filter(n=>!n.parentSessionId&&e.has(gl(n))).map(n=>{const i=gl(n);return{id:n.id,title:n.title,time:Dp(n.updatedAt),busy:$f(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:i,workspaceName:t.get(i)}})}),B8=Z(f2),Fv=F(()=>{ed.value;const e=new Set(ml.value.map(r=>r.id)),t=new Map(ml.value.map(r=>[r.id,r.name])),n=new Set(lo.value),i=(r,l)=>new Date(l.updatedAt).getTime()-new Date(r.updatedAt).getTime(),s=_e.flatSessionsFrontier,o=[];for(const r of _e.sessions)r.parentSessionId||r.archived||n.has(r.id)||!e.has(gl(r))||!(j5({busy:$f(r.id,r.mainTurnActive),unread:hk.value[r.id]??!1,questionCount:cp.value[r.id]?.questions??0,approvalCount:cp.value[r.id]?.approvals??0,pendingInteraction:r.pendingInteraction,lastTurnReason:r.lastTurnReason})!=="idle")&&s!==null&&new Date(r.updatedAt).getTime()<s||o.push(r);return o.sort(i),o.map(r=>{const l=gl(r);return{id:r.id,title:r.title,time:Dp(r.updatedAt),busy:$f(r.id,r.mainTurnActive),pendingInteraction:r.pendingInteraction,lastTurnReason:r.lastTurnReason,lastPrompt:r.lastPrompt,updatedAt:r.updatedAt,workspaceId:l,workspaceName:t.get(l),cwdLabel:r.cwd?qf(r.cwd):"-",pullRequest:r.pullRequest}})});function SAe(e){return j5({busy:e.busy,unread:hk.value[e.id]??!1,questionCount:cp.value[e.id]?.questions??0,approvalCount:cp.value[e.id]?.approvals??0,pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})!=="idle"}const fk=F(()=>{const e=Fv.value;let t=B8.value;for(let n=e.length-1;n>=t;n--)if(SAe(e[n])){t=n+1;break}return t}),MAe=F(()=>Fv.value.slice(0,fk.value)),IAe=F(()=>_e.flatSessionsHasMore||fk.value<Fv.value.length);function EAe(){B8.value=fk.value+f2,B8.value>Fv.value.length&&_e.flatSessionsHasMore&&Et.loadMoreFlatSessions()}function sD(e){ed.value;const t=new Set(lo.value),n=new Map,i=new Map;for(const s of _e.sessions.toSorted((o,r)=>new Date(r.updatedAt).getTime()-new Date(o.updatedAt).getTime())){if(s.parentSessionId)continue;const o=gl(s);if(e&&t.has(s.id)){i.set(o,(i.get(o)??0)+1);continue}const r={id:s.id,title:s.title,time:Dp(s.updatedAt),busy:$f(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt},l=n.get(o)??[];l.push(r),n.set(o,l)}return ml.value.map(s=>({workspace:s,sessions:n.get(s.id)??[],pinnedCount:i.get(s.id)??0,hasMore:_e.sessionsHasMoreByWorkspace[s.id]??!1,loadingMore:_e.sessionsLoadingMoreByWorkspace[s.id]??!1,initialCount:_e.sessionsInitialCountByWorkspace[s.id]??Ug}))}const TAe=F(()=>sD(!0)),LAe=F(()=>sD(!1)),NAe=F(()=>{ed.value;const e=new Set(ml.value.map(s=>s.id)),t=new Map(ml.value.map(s=>[s.id,s.name])),n=_e.sessions.filter(s=>!s.parentSessionId&&!s.archived&&e.has(gl(s)));return ute(n,lo.value).pinned.toSorted((s,o)=>new Date(o.updatedAt).getTime()-new Date(s.updatedAt).getTime()).map(s=>{const o=gl(s);return{id:s.id,title:s.title,time:Dp(s.updatedAt),busy:$f(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt,workspaceId:o,workspaceName:t.get(o),pinned:!0,cwdLabel:s.cwd?qf(s.cwd):"-",pullRequest:s.pullRequest}})});function FAe(e){A2.value=e,DL(e)}const oD=F(()=>{const e={};for(const[t,n]of Object.entries(_e.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(_e.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),cp=F(()=>{const e={};for(const[t,n]of Object.entries(_e.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(_e.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),hk=F(()=>{const e={};for(const[t,n]of Object.entries(_e.unreadBySession))n&&(e[t]=!0);return e}),BAe=F(()=>{const e={},t=oD.value;for(const n of _e.sessions){const i=t[n.id]??0;if(i<=0)continue;const s=gl(n);e[s]=(e[s]??0)+i}return e}),$Ae=F(()=>_e.recentRoots),DAe=F(()=>_e.availableOpenInApps),Et=S6e(_e,{taskPoller:Z$,sideChat:yo,modelProvider:Un,pushOperationFailure:$p,notify:Bp,activity:ck,sessionsKnownEmpty:U$,setSessions:ok,updateSession:Tv,upsertSessionSorted:P6e,appendSession:j6e,forgetSession:T$,unpinSessions:CAe,setActiveSessionId:rk,updateSessionMessages:E$,nextOptimisticMsgId:W$,getEventConn:()=>xr,syncSessionFromSnapshot:ak,reopenSession:m7e,hasLoadedMessages:f7e,refreshSessionStatus:Xc,refreshSessionGoal:z$,refillSessionGoalOnReload:K6e,refreshSessionPlans:ap,settlePlanReviewLocally:M$,persistSessionProfile:O$,mergedWorkspaces:Lv,workspacesView:ml,status:eD,workspaceIdForSession:gl,savePermissionToStorage:L6e,savePlanModeToStorage:ik,saveSwarmModeToStorage:x$,saveGoalModeToStorage:_$,draftModes:Fp,saveUnread:V5,saveActiveWorkspaceToStorage:$6e,saveHiddenWorkspacesToStorage:B6e,goalErrorMessage:u7e,initialized:D$,connectIssue:R$,selectedDiffPath:L$,fileDiffLines:N$,fileDiffLoading:F$,fileDiffTexts:B$,fileDiffEmptyFile:$$});function pk(e){return e===_e.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function RAe(e){_e.turnActiveBySession[e]&&delete _e.turnActiveBySession[e],_e.inFlightBySession[e]&&(_e.inFlightBySession[e]=!1)}function zAe(e,t,n){const i=_e.promptIdBySession[e],s=_e.goalBySession[e]?.status==="active"||g2.has(e);Et.finishPromptLocal(e,{turnWasActive:n}),(_e.experimentalFlags?.auto_session_title??_e.config?.experimental?.auto_session_title)===!0&&Et.maybeGenerateSessionTitle(e),Et.loadGitStatus(e),e===_e.activeSessionId?Xc(e):t==="idle"&&!s&&(_e.unreadBySession[e]=!0,V5({[e]:!0}));const o=(_e.approvalsBySession[e]??[]).length>0,r=(_e.questionsBySession[e]??[]).length>0;!s&&Mve(t,o,r)&&lu.maybeNotifyCompletion(e,{isUserWatching:pk(e),sessionTitle:_e.sessions.find(l=>l.id===e)?.title??"",promptId:i,onClick:()=>{Et.selectSession(e)}})}function OAe(e,t){const n=t.questions[0],i=n?.header?.trim()??"",s=n?.question?.trim()??"",o=i&&s?`${i}: ${s}`:s||i;lu.maybeNotifyQuestion({isUserWatching:pk(e),sessionTitle:_e.sessions.find(r=>r.id===e)?.title??"",questionPreview:o,questionId:t.questionId,onClick:()=>{Et.selectSession(e)}})}function PAe(e,t){lu.maybeNotifyApproval({isUserWatching:pk(e),sessionTitle:_e.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Et.selectSession(e)}})}function Fa(){return y7e(),{workspace:_7e,sessions:S7e,activeSessionId:M7e,workspacesView:ml,workspaceSortMode:C2,visibleWorkspace:iD,activeWorkspaceId:Nv,sessionsForView:_Ae,workspaceGroups:TAe,mobileWorkspaceGroups:LAe,pinnedSessions:NAe,flatSessions:MAe,flatSessionsHasMore:IAe,flatSessionsLoadingMore:F(()=>_e.flatSessionsLoadingMore),attentionBySession:oD,pendingBySession:cp,attentionByWorkspace:BAe,unreadBySession:hk,recentRoots:$Ae,turns:Q$,tasks:$7e,activeAppTasks:Rp,findBashCommandForTask:V$,auxiliaryTranscripts:m2,getFileUrl:G$,todos:R7e,goal:qd,sessionPlans:tAe,refreshSessionPlans:ap,invalidateSessionPlans:O6e,swarms:Y$,swarmMembersByToolCallId:D7e,activationBadges:iAe,compaction:z7e,status:eD,sessionCost:fAe,fileDiff:dAe,selectedDiffPath:L$,fileDiffLoading:F$,fileDiffTexts:B$,fileDiffEmptyFile:$$,changes:uAe,gitInfo:F8,gitDiffStats:cAe,activePullRequest:aAe,changesByPath:bAe,pendingApprovals:lAe,availableOpenInApps:DAe,connection:O7e,loading:P7e,sessionLoading:j7e,loadingMoreMessages:H7e,hasMoreMessages:W7e,loadMoreMessagesError:q7e,serverVersion:U7e,webTitle:J$,documentBaseTitle:xAe,backend:V7e,dangerousBypassAuth:Z7e,experimentalFlags:K7e,clearDangerousBypassAuth:G7e,initialized:D$,connectIssue:R$,permission:Q7e,thinking:Y7e,planMode:X$,planArmed:J7e,swarmMode:X7e,goalMode:eAe,queued:sAe,warnings:oAe,questions:rAe,activity:ck,turnActive:zp,activeTurnError:T7e,activeTurnRetry:L7e,inFlight:uk,working:B7e,isStartingFirstPrompt:E7e,models:Un.models,starredModelIds:Un.starredModelIds,providers:Un.providers,fontScale:fg.fontScale,setFontScale:fg.setFontScale,colorScheme:fg.colorScheme,setColorScheme:fg.setColorScheme,notifyEnabled:lu.notifyEnabled,notifySound:lu.notifySound,notifyPermission:lu.notifyPermission,setNotifyEnabled:lu.setNotifyEnabled,setNotifySound:lu.setNotifySound,onboarded:H$,setOnboarded:Z6e,load:Et.load,selectSession:Et.selectSession,clearActiveSession:Et.clearActiveSession,loadOlderMessages:Et.loadOlderMessages,loadWorkspaces:Et.loadWorkspaces,loadMoreSessions:Et.loadMoreSessions,loadAllSessions:Et.loadAllSessions,ensureFlatSessions:Et.ensureFlatSessions,loadMoreFlatSessions:EAe,selectWorkspace:Et.selectWorkspace,openWorkspace:Et.openWorkspace,openWorkspaceDraft:Et.openWorkspaceDraft,startSessionAndSendPrompt:Et.startSessionAndSendPrompt,startSessionAndActivateSkill:Et.startSessionAndActivateSkill,startSessionAndOpenSideChat:Et.startSessionAndOpenSideChat,addWorkspaceByPath:Et.addWorkspaceByPath,browseFs:Et.browseFs,getFsHome:Et.getFsHome,sendPrompt:Et.sendPrompt,steerPrompt:Et.steerPrompt,sideChatVisible:yo.sideChatVisible,sideChatSessionId:yo.sideChatSessionId,sideChatTurns:yo.sideChatTurns,sideChatRunning:yo.sideChatRunning,sideChatSending:yo.sideChatSending,openSideChat:yo.openSideChat,closeSideChat:yo.closeSideChat,sendSideChatPrompt:yo.sendSideChatPrompt,uploadImage:Et.uploadImage,abortCurrentPrompt:Et.abortCurrentPrompt,respondApproval:Et.respondApproval,respondQuestion:Et.respondQuestion,dismissQuestion:Et.dismissQuestion,pendingQuestionActions:Et.pendingQuestionActions,pendingApprovalActions:Et.pendingApprovalActions,cancelTask:Et.cancelTask,setPermission:Et.setPermission,setThinking:Un.setThinking,setPlanMode:Et.setPlanMode,togglePlanMode:Et.togglePlanMode,setSwarmMode:Et.setSwarmMode,toggleSwarmMode:Et.toggleSwarmMode,setGoalMode:Et.setGoalMode,toggleGoalMode:Et.toggleGoalMode,createGoal:Et.createGoal,controlGoal:Et.controlGoal,enqueue:Et.enqueue,dismissWarning:Et.dismissWarning,renameSession:Et.renameSession,regenerateSessionTitle:Et.regenerateSessionTitle,renameWorkspace:Et.renameWorkspace,deleteWorkspace:Et.deleteWorkspace,reorderWorkspaces:FAe,setWorkspaceSortMode:AAe,pinSession:nD,unpinSession:dk,togglePinSession:wAe,archiveSession:Et.archiveSession,exportSession:Et.exportSession,restoreSession:Et.restoreSession,loadArchivedSessions:Et.loadArchivedSessions,compact:Et.compact,forkSession:Et.forkSession,undo:Et.undo,unqueue:Et.unqueue,reorderQueue:Et.reorderQueue,searchFiles:Et.searchFiles,loadGitStatus:Et.loadGitStatus,loadFileDiff:Et.loadFileDiff,clearFileDiff:Et.clearFileDiff,listDir:Et.listDir,readFileContent:Et.readFileContent,readHostFileContent:Et.readHostFileContent,getFileDownloadUrl:Et.getFileDownloadUrl,openWorkspaceFile:Et.openWorkspaceFile,openInApp:Et.openInApp,revealWorkspaceFile:Et.revealWorkspaceFile,resolveImageUrl:Et.resolveImageUrl,loadModels:Un.loadModels,loadProviders:Un.loadProviders,skills:I7e,activateSkill:Un.activateSkill,setModel:Un.setModel,toggleStarModel:Un.toggleStarModel,addProvider:Un.addProvider,updateProvider:Un.updateProvider,getProvider:Un.getProvider,deleteProvider:Un.deleteProvider,refreshProvider:Un.refreshProvider,refreshAllProviders:Un.refreshAllProviders,loadCatalogProviders:Un.loadCatalogProviders,importCatalogProvider:Un.importCatalogProvider,importCustomRegistry:Un.importCustomRegistry,authReady:hAe,defaultModel:pAe,managedProviderStatus:gAe,managedUserInfo:mAe,managedMembership:vAe,notify:Bp,config:yAe,loadConfig:Et.loadConfig,updateConfig:Et.updateConfig,checkAuth:Et.checkAuth,probeManagedMembership:Et.probeManagedMembership,startOAuthLogin:Un.startOAuthLogin,pollOAuthLogin:Un.pollOAuthLogin,cancelOAuthLogin:Un.cancelOAuthLogin,getUsage:Un.getUsage,logout:Et.logout}}const jAe=["aria-expanded"],HAe={class:"user-menu-avatar","aria-hidden":"true"},WAe=["src"],qAe={class:"user-menu-name"},UAe={class:"user-menu-name"},KAe={class:"user-menu-item-label"},VAe={class:"user-menu-item-label"},ZAe={class:"user-menu-item-label user-menu-login-label"},GAe={class:"user-menu-item-label"},QAe={class:"user-menu-row-value"},YAe={class:"user-menu-item-label"},JAe={class:"user-menu-row-value"},XAe={class:"user-menu-item-label"},eCe={key:0,class:"user-menu-usage"},tCe={key:0,class:"user-menu-usage-state"},nCe={key:1,class:"user-menu-usage-state"},iCe={class:"user-menu-usage-error"},sCe={key:2,class:"user-menu-usage-state user-menu-usage-empty"},oCe={class:"user-menu-usage-main"},rCe={class:"user-menu-usage-label"},lCe={key:0,class:"user-menu-usage-hint"},aCe={class:"user-menu-item-label"},uCe={class:"user-menu-item-label"},cCe=tt({__name:"UserMenu",emits:["login","openSettings"],setup(e,{emit:t}){const n=t,{t:i,locale:s}=Bt(),o=Fa(),{confirm:r}=Hu(),l=F(()=>o.managedProviderStatus.value==="authenticated"),a=o.managedUserInfo,u=o.managedMembership,c=F(()=>a.value?.nickname||i("sidebar.defaultUserName")),d=F(()=>u.value==="free"||fte(a.value?.userLevel)),f=F(()=>u.value!=="free"),p=Z(!1);Qe(()=>a.value?.avatar,()=>{p.value=!1});const g=F(()=>!!a.value?.avatar&&!p.value),m=o.colorScheme,y=F(()=>i(`theme.${m.value}`)),w=F(()=>m.value==="light"?"light-mode":m.value==="dark"?"dark-mode":"follow-system"),k=[{value:"light",labelKey:"theme.light",icon:"light-mode"},{value:"dark",labelKey:"theme.dark",icon:"dark-mode"},{value:"system",labelKey:"theme.system",icon:"follow-system"}];function A(J){o.setColorScheme(J)}const v=F(()=>u2.find(J=>J.code===s.value)?.label??s.value);function x(J){s.value!==J&&Jb(J)}const E=Z(!1),S=Z({}),M=Z(null),_=Z(null);let N=null;function D(J){const de=J.target;de.closest(".user-menu")||de.closest(".user-menu-trigger")||de.closest(".user-submenu")||R()}function T(J){J.key==="Escape"&&(J.stopPropagation(),R())}async function $(){if(E.value){R();return}E.value=!0,document.addEventListener("mousedown",D),document.addEventListener("keydown",T,!0),window.addEventListener("resize",R),l.value&&te(),await kt(),P();const J=_.value;J&&(N=new ResizeObserver(O),N.observe(J))}function P(){const J=_.value,de=M.value?.el;if(!J||!de)return;const me=J.getBoundingClientRect(),Ie=4,je=8,ke=de.offsetHeight,Le={left:`${Math.round(me.left)}px`,width:`${Math.round(me.width)}px`};me.top-ke-Ie<je?S.value={...Le,top:`${Math.round(Math.min(me.bottom+Ie,window.innerHeight-ke-je))}px`,bottom:"auto",transformOrigin:"top left","--menu-pop-shift":"-2px"}:S.value={...Le,top:"auto",bottom:`${Math.round(window.innerHeight-me.top+Ie)}px`,transformOrigin:"bottom left","--menu-pop-shift":"2px"}}function O(){const J=_.value;if(!J)return;W.value=null;const de=J.getBoundingClientRect();S.value={...S.value,left:`${Math.round(de.left)}px`,width:`${Math.round(de.width)}px`}}function R(){E.value=!1,W.value=null,ie(),N?.disconnect(),N=null,document.removeEventListener("mousedown",D),document.removeEventListener("keydown",T,!0),window.removeEventListener("resize",R)}Gn(R);const W=Z(null),z=Z({}),G=Z(null),K={usage:null,theme:null,language:null};let H=null;function q(J){return de=>{K[J]=de instanceof HTMLElement?de:de?.$el??null}}function X(J){ie(),W.value!==J&&(W.value=J,kt(xe))}function ee(J,de){J.key!=="Enter"&&J.key!==" "&&J.key!=="ArrowRight"||(J.preventDefault(),X(de))}function ue(){ie(),H=setTimeout(()=>{W.value=null,H=null},250)}function ie(){H!==null&&(clearTimeout(H),H=null)}function xe(){const J=W.value,de=M.value?.el,me=G.value?.el,Ie=J!==null?K[J]:null;if(!de||!me||!Ie)return;const je=4,ke=8,Le=de.getBoundingClientRect(),it=Ie.getBoundingClientRect(),Fe=me.offsetHeight,Re=Math.min(me.offsetWidth,Le.width);let Ke=Le.right+je,ht=!1;Ke+Re>window.innerWidth-ke&&(Ke=Math.max(ke,Le.left-Re-je),ht=!0);const ot=Math.max(ke,Math.min(it.top,window.innerHeight-Fe-ke));z.value={top:`${Math.round(ot)}px`,left:`${Math.round(Ke)}px`,maxWidth:`${Math.round(Le.width)}px`,transformOrigin:ht?"top right":"top left","--menu-pop-shift":"-2px"}}const ce=Z(!1),pe=Z(null);let Ne=0;async function te(){const J=++Ne;ce.value=!0;try{const de=await o.getUsage();J===Ne&&(pe.value=de)}finally{J===Ne&&(ce.value=!1)}}const ye=F(()=>{if(pe.value?.kind!=="ok")return[];const{summary:J,limits:de}=pe.value,me=cte(de,5,"hour");return[J,me].filter(Ie=>Ie!=null)}),j=F(()=>pe.value?.kind==="error"?pe.value.message:i("settings.planUsage.loadFailed"));function Y(J){return J.resetAt===void 0?"":fL(J.resetAt,i)}function ve(){R(),Cp()}function re(){R(),n("login")}function se(){R(),n("openSettings")}async function U(){R(),await r({title:i("sidebar.logoutConfirmTitle"),message:i("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>o.logout()})}return(J,de)=>(b(),I(Be,null,[C("button",{ref_key:"triggerRef",ref:_,class:"user-menu-trigger",type:"button","aria-haspopup":"menu","aria-expanded":E.value,onClick:It($,["stop"])},[l.value?(b(),I(Be,{key:0},[C("span",HAe,[g.value?(b(),I("img",{key:0,src:h(a)?.avatar,alt:"",onError:de[0]||(de[0]=me=>p.value=!0)},null,40,WAe)):(b(),fe(h(Ce),{key:1,name:"user",size:"sm"}))]),C("span",qAe,B(c.value),1)],64)):(b(),I(Be,{key:1},[V(h(Ce),{name:"user"}),C("span",UAe,B(h(i)("sidebar.notSignedIn")),1)],64))],8,jAe),(b(),fe(Wr,{to:"body"},[V(ys,{name:"menu-pop"},{default:he(()=>[E.value?(b(),fe(h(cl),{key:0,ref_key:"menuRef",ref:M,class:"user-menu",style:Vt(S.value),onClick:de[14]||(de[14]=It(()=>{},["stop"]))},{default:he(()=>[l.value?(b(),I(Be,{key:0},[f.value?(b(),fe(h(bn),{key:0,ref:q("usage"),"aria-haspopup":"true","aria-expanded":W.value==="usage",onMouseenter:de[1]||(de[1]=me=>X("usage")),onMouseleave:ue,onFocus:de[2]||(de[2]=me=>X("usage")),onBlur:ue,onClick:de[3]||(de[3]=me=>X("usage")),onKeydown:de[4]||(de[4]=me=>ee(me,"usage"))},{default:he(()=>[V(h(Ce),{name:"histogram",size:"sm"}),C("span",KAe,B(h(i)("settings.planUsage.title")),1),V(h(Ce),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"])):ne("",!0),d.value?(b(),fe(h(bn),{key:1,onClick:ve,onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"music",size:"sm"}),C("span",VAe,B(h(i)("sidebar.upgradeMembership")),1),V(h(Ce),{name:"external-link",size:"sm"})]),_:1})):ne("",!0),V(h(bn),{separator:""})],64)):(b(),I(Be,{key:1},[V(h(bn),{class:"user-menu-login",onClick:re,onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"log-in",size:"sm"}),C("span",ZAe,B(h(i)("sidebar.signIn")),1)]),_:1}),V(h(bn),{separator:""})],64)),V(h(bn),{ref:q("theme"),"aria-haspopup":"true","aria-expanded":W.value==="theme",onMouseenter:de[5]||(de[5]=me=>X("theme")),onMouseleave:ue,onFocus:de[6]||(de[6]=me=>X("theme")),onBlur:ue,onClick:de[7]||(de[7]=me=>X("theme")),onKeydown:de[8]||(de[8]=me=>ee(me,"theme"))},{default:he(()=>[V(h(Ce),{name:w.value,size:"sm"},null,8,["name"]),C("span",GAe,B(h(i)("theme.colorSchemeLabel")),1),C("span",QAe,B(y.value),1),V(h(Ce),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),V(h(bn),{ref:q("language"),"aria-haspopup":"true","aria-expanded":W.value==="language",onMouseenter:de[9]||(de[9]=me=>X("language")),onMouseleave:ue,onFocus:de[10]||(de[10]=me=>X("language")),onBlur:ue,onClick:de[11]||(de[11]=me=>X("language")),onKeydown:de[12]||(de[12]=me=>ee(me,"language"))},{default:he(()=>[V(h(Ce),{name:"translate",size:"sm"}),C("span",YAe,B(h(i)("sidebar.language")),1),C("span",JAe,B(v.value),1),V(h(Ce),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),V(h(bn),{onClick:se,onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"settings",size:"sm"}),C("span",XAe,B(h(i)("settings.title")),1)]),_:1}),l.value?(b(),I(Be,{key:2},[V(h(bn),{separator:""}),V(h(bn),{onClick:de[13]||(de[13]=me=>void U()),onMouseenter:ue},{default:he(()=>[V(h(Ce),{name:"log-out",size:"sm"}),Ue(" "+B(h(i)("sidebar.signOut")),1)]),_:1})],64)):ne("",!0)]),_:1},8,["style"])):ne("",!0)]),_:1})])),(b(),fe(Wr,{to:"body"},[V(ys,{name:"menu-pop"},{default:he(()=>[W.value!==null?(b(),fe(h(cl),{key:0,ref_key:"submenuRef",ref:G,class:"user-submenu",style:Vt(z.value),role:W.value==="usage"?"dialog":"menu",onClick:de[16]||(de[16]=It(()=>{},["stop"])),onMouseenter:ie,onMouseleave:ue,onFocusin:ie,onFocusout:ue},{default:he(()=>[W.value==="usage"?(b(),I("div",eCe,[ce.value?(b(),I("div",tCe,[V(h(Bi),{size:"sm"})])):pe.value?.kind!=="ok"?(b(),I("div",nCe,[C("span",iCe,B(j.value),1),V(h(jt),{variant:"ghost",size:"sm",onClick:de[15]||(de[15]=me=>void te())},{default:he(()=>[Ue(B(h(i)("settings.planUsage.retry")),1)]),_:1})])):ye.value.length===0?(b(),I("span",sCe,B(h(i)("settings.planUsage.empty")),1)):(b(!0),I(Be,{key:3},yt(ye.value,(me,Ie)=>(b(),I("div",{key:Ie,class:"user-menu-usage-row"},[C("span",oCe,[C("span",rCe,B(h(dL)(me,h(i))),1),Y(me)?(b(),I("span",lCe,B(Y(me)),1)):ne("",!0)]),C("span",{class:De(["user-menu-usage-value",`sev-${h(y3)(me.used,me.limit)}`])},B(h(i)("settings.planUsage.usedPct",{pct:h(wg)(me.used,me.limit)})),3)]))),128))])):W.value==="theme"?(b(),I(Be,{key:1},yt(k,me=>V(h(bn),{key:me.value,onClick:Ie=>A(me.value)},{default:he(()=>[V(h(Ce),{name:me.icon,size:"sm"},null,8,["name"]),C("span",aCe,B(h(i)(me.labelKey)),1),h(m)===me.value?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)]),_:2},1032,["onClick"])),64)):(b(!0),I(Be,{key:2},yt(h(u2),me=>(b(),fe(h(bn),{key:me.code,onClick:Ie=>x(me.code)},{default:he(()=>[C("span",uCe,B(me.label),1),h(s)===me.code?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)]),_:2},1032,["onClick"]))),128))]),_:1},8,["style","role"])):ne("",!0)]),_:1})]))],64))}}),dCe=vt(cCe,[["__scopeId","data-v-ee9821b4"]]),fCe={class:"ep-search"},hCe=["placeholder"],pCe={class:"ep-scroll"},gCe={key:0,class:"ep-grid"},mCe=["onClick"],vCe={key:1,class:"ep-empty"},yCe={class:"ep-label"},bCe={class:"ep-grid"},kCe=["onClick"],ACe={class:"ep-label"},CCe={class:"ep-grid"},wCe=["onClick"],ZS="kimi-web.recent-emojis",xCe=tt({__name:"SessionEmojiPicker",props:{current:{default:null},removable:{type:Boolean,default:!0}},emits:["pick"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),{handleCompositionStart:s,handleCompositionEnd:o,isComposingKeyEvent:r}=Kr(),l=e,a=n,u=["⏳","⚠️","🐛","✨","🔥","🚀","🎯","🧪","📝","🔍","🛠️","💡","📦","🎨","🔒","📈","🧹","🚧","✅","❓","🌙","☕","🐳","🗂️","📊","🤖","🧩","⚙️","🌱","📌","💥","🕐"],c={faces:"sidebar.emojiGroupFaces",nature:"sidebar.emojiGroupNature",food:"sidebar.emojiGroupFood",activity:"sidebar.emojiGroupActivity",objects:"sidebar.emojiGroupObjects",symbols:"sidebar.emojiGroupSymbols"},d=Dee.map(E=>({id:E,labelKey:c[E],emojis:sL.filter(S=>S.group===E).map(S=>S.emoji)})),f=Z(p());function p(){try{const E=JSON.parse(localStorage.getItem(ZS)??"[]");return Array.isArray(E)?E.filter(S=>typeof S=="string"):[]}catch{return[]}}function g(E,S){f.value=Pee(f.value,E);try{localStorage.setItem(ZS,JSON.stringify(f.value))}catch{}a("pick",E,S)}const m=Z(""),y=F(()=>m.value.trim().length>0),w=F(()=>zee(m.value)),k=Z(null);pn(()=>k.value?.focus());function A(E){if(r(E))return;const S=w.value[0];y.value&&S&&g(S)}function v(){let E=l.current??void 0;for(;E===void 0||E===l.current;)E=u[Math.floor(Math.random()*u.length)];g(E,"random")}const x=Z(null);return t({el:F(()=>x.value?.el),isComposingKeyEvent:r}),(E,S)=>(b(),fe(h(cl),{ref_key:"menuRef",ref:x,class:"emoji-picker",role:"dialog","aria-label":h(i)("sidebar.sessionEmojiTitle"),onKeydown:S[4]||(S[4]=It(()=>{},["stop"]))},{default:he(()=>[C("div",fCe,[V(h(Ce),{name:"search",size:"sm"}),Bn(C("input",{ref_key:"inputRef",ref:k,"onUpdate:modelValue":S[0]||(S[0]=M=>m.value=M),class:"ep-input",type:"text",placeholder:h(i)("sidebar.searchEmoji"),autocomplete:"off",spellcheck:"false",onKeydown:qr(A,["enter"]),onCompositionstart:S[1]||(S[1]=(...M)=>h(s)&&h(s)(...M)),onCompositionend:S[2]||(S[2]=(...M)=>h(o)&&h(o)(...M))},null,40,hCe),[[_o,m.value]])]),C("div",pCe,[y.value?(b(),I(Be,{key:0},[w.value.length?(b(),I("div",gCe,[(b(!0),I(Be,null,yt(w.value,M=>(b(),I("button",{key:M,class:De(["ep-e",{sel:M===e.current}]),type:"button",onClick:_=>g(M)},B(M),11,mCe))),128))])):(b(),I("div",vCe,B(h(i)("sidebar.noEmojiResults")),1))],64)):(b(),I(Be,{key:1},[f.value.length?(b(),I(Be,{key:0},[C("div",yCe,B(h(i)("sidebar.recentEmojis")),1),C("div",bCe,[(b(!0),I(Be,null,yt(f.value,M=>(b(),I("button",{key:M,class:De(["ep-e",{sel:M===e.current}]),type:"button",onClick:_=>g(M)},B(M),11,kCe))),128))])],64)):ne("",!0),(b(!0),I(Be,null,yt(h(d),M=>(b(),I(Be,{key:M.id},[C("div",ACe,B(h(i)(M.labelKey)),1),C("div",CCe,[(b(!0),I(Be,null,yt(M.emojis,_=>(b(),I("button",{key:_,class:De(["ep-e",{sel:_===e.current}]),type:"button",onClick:N=>g(_)},B(_),11,wCe))),128))])],64))),128))],64))]),V(h(bn),{separator:""}),V(h(bn),{role:"button",disabled:!(e.current&&e.removable),onClick:S[3]||(S[3]=M=>a("pick",null))},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"}),Ue(" "+B(h(i)("sidebar.removeEmoji")),1)]),_:1},8,["disabled"]),V(h(bn),{role:"button",onClick:v},{default:he(()=>[V(h(Ce),{name:"sparkles",size:"sm"}),Ue(" "+B(h(i)("sidebar.randomEmoji")),1)]),_:1})]),_:1},8,["aria-label"]))}}),_Ce=vt(xCe,[["__scopeId","data-v-b0dbbae4"]]),SCe={class:"row"},MCe={key:0,class:"lead","aria-hidden":"true"},ICe={key:1,class:"unread-dot"},ECe={class:"left"},TCe=["readonly","onKeydown"],LCe={key:0,class:"gen-dots","aria-hidden":"true"},NCe=["aria-label"],FCe={key:1,class:"act"},BCe={key:0,class:"ts"},$Ce={key:1,class:"st"},DCe={key:1,class:"unread-dot"},RCe={key:2,class:"ha"},zCe={key:0,class:"sub"},OCe={class:"sub-text"},PCe=["aria-label"],jCe={class:"menu-time"},HCe=tt({__name:"SessionRow",props:{session:{},active:{type:Boolean},approvalCount:{default:0},questionCount:{default:0},unread:{type:Boolean,default:!1}},emits:["select","rename","generateTitle","renameStateChange","archive","fork","export","pin"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=e,o=n;function r(ot){const gt=new Date(ot);if(Number.isNaN(gt.getTime()))return ot;const Tt=yn=>String(yn).padStart(2,"0");return`${gt.getFullYear()}-${Tt(gt.getMonth()+1)}-${Tt(gt.getDate())} ${Tt(gt.getHours())}:${Tt(gt.getMinutes())}`}const l=F(()=>s.session.updatedAt?r(s.session.updatedAt):s.session.time),a=F(()=>s.session.cwdLabel!==void 0),u=F(()=>X.value?"idle":j5({busy:s.session.busy,unread:s.unread,questionCount:s.questionCount,approvalCount:s.approvalCount,pendingInteraction:s.session.pendingInteraction,lastTurnReason:s.session.lastTurnReason})),c=F(()=>u.value==="awaiting-question"),d=F(()=>u.value==="awaiting-approval"),f=F(()=>u.value==="aborted"),p=F(()=>u.value==="running"),g=F(()=>u.value==="unread"),m=F(()=>u.value!=="idle"),y=Z(!1),w=Z(null),k=Z({});function A(ot){const gt=ot.target;w.value?.el?.contains(gt)||x()}async function v(){P(),y.value=!0,setTimeout(()=>document.addEventListener("mousedown",A),0),window.addEventListener("resize",x),await kt()}function x(){y.value=!1,document.removeEventListener("mousedown",A),window.removeEventListener("resize",x)}An(()=>{document.removeEventListener("mousedown",A),document.removeEventListener("mousedown",O),window.removeEventListener("keydown",R,!0),window.removeEventListener("resize",x),window.removeEventListener("resize",P)});const E=F(()=>bL(s.session.title)),S=F(()=>{const ot=E.value.emoji;return ot?s.session.title.slice(ot.length):s.session.title}),M=Z(!1),_=Z(null),N=Z({});let D=null;function T(ot,gt,Tt){const yn=_.value?.el,Gt=4,Kt=8,mn=yn?.offsetHeight??0,_n=yn?.offsetWidth??0;let He=ot.bottom+Gt,st=!1;He+mn>window.innerHeight-Kt&&(He=Math.max(Kt,ot.top-mn-Gt),st=!0);const Ve=Tt??(gt==="left"?ot.left:ot.right-_n),Rt=Math.max(Kt,Math.min(Ve,window.innerWidth-_n-Kt)),Ct=Tt===void 0?gt:`${Math.round(Math.min(Math.max(Tt-Rt,0),_n))}px`;N.value={top:`${Math.round(He)}px`,left:`${Math.round(Rt)}px`,transformOrigin:`${Ct} ${st?"bottom":"top"}`,"--menu-pop-shift":st?"2px":"-2px"}}async function $(ot,gt,Tt="left",yn){const Gt=gt??ot?.getBoundingClientRect();if(Gt){if(M.value){P();return}x(),D=ot??null,M.value=!0,setTimeout(()=>document.addEventListener("mousedown",O),0),window.addEventListener("keydown",R,!0),window.addEventListener("resize",P),await kt(),T(Gt,Tt,yn)}}function P(){M.value=!1,D=null,document.removeEventListener("mousedown",O),window.removeEventListener("keydown",R,!0),window.removeEventListener("resize",P)}function O(ot){const gt=ot.target;_.value?.el?.contains(gt)||D?.contains(gt)||P()}function R(ot){ot.key==="Escape"&&(_.value?.isComposingKeyEvent(ot)||(ot.preventDefault(),ot.stopPropagation(),P()))}function W(ot){return ot.clientX||ot.clientY?new DOMRect(ot.clientX,ot.clientY,0,0):void 0}function z(ot){ot.stopPropagation();const gt=ot;$(gt.currentTarget,W(gt),"left",gt.clientX||void 0)}function G(ot){const gt=w.value?.el,Tt=ot,yn=W(Tt)??gt?.getBoundingClientRect();x(),$(gt,yn,"left",Tt.clientX||void 0)}function K(ot){if(P(),ot===E.value.emoji)return;const gt=jte(s.session.title,ot);gt&>!==s.session.title&&o("rename",s.session.id,gt)}const H=Fa(),q=F(()=>(H.experimentalFlags.value.auto_session_title??H.config.value?.experimental?.auto_session_title)===!0),X=Z(!1),ee=Z(""),ue=Z(null),ie=Z(null),xe=Z(!1);let ce="",pe=null;const{handleCompositionStart:Ne,handleCompositionEnd:te,isComposingKeyEvent:ye}=Kr();async function j(){x(),P(),X.value=!0,ee.value=s.session.title,await kt();try{ue.value?.focus(),ue.value?.select()}catch{}}function Y(){if(!X.value)return;const ot=ee.value.trim();ot&&ot!==pe&&ot!==s.session.title&&o("rename",s.session.id,ot),X.value=!1}function ve(){xe.value||Y()}function re(ot){ye(ot)||xe.value||Y()}function se(ot){ye(ot)||U()}function U(){xe.value=!1,X.value=!1}function J(ot){const gt=ie.value;if(!(gt===null||!(ot.target instanceof Node)||gt.contains(ot.target))){if(xe.value){xe.value=!1,X.value=!1;return}Y()}}Qe(X,ot=>{ot?document.addEventListener("pointerdown",J,!0):document.removeEventListener("pointerdown",J,!0)}),An(()=>document.removeEventListener("pointerdown",J,!0));function de(){xe.value||(xe.value=!0,ce=ee.value,pe=null,ee.value="",o("generateTitle",s.session.id,ot=>{xe.value=!1,X.value&&(ee.value=ot??ce,pe=ot,kt(()=>{try{ue.value?.focus(),ue.value?.select()}catch{}}))}))}Qe(X,ot=>o("renameStateChange",ot));async function me(ot){X.value||(ot.preventDefault(),ot.stopPropagation(),y.value&&x(),await v(),Ie(ot))}function Ie(ot){const gt=w.value?.el,Tt=8,yn=gt?.offsetHeight??0,Gt=gt?.offsetWidth??0;let Kt=ot.clientY,mn=!1;Kt+yn>window.innerHeight-Tt&&(Kt=Math.max(Tt,ot.clientY-yn),mn=!0);let _n=ot.clientX,He=!1;_n+Gt>window.innerWidth-Tt&&(_n=Math.max(Tt,ot.clientX-Gt),He=!0),k.value={top:`${Math.round(Kt)}px`,left:`${Math.round(_n)}px`,transformOrigin:`${mn?"bottom":"top"} ${He?"right":"left"}`,"--menu-pop-shift":mn?"2px":"-2px"}}const je=Z(!1),ke=Z(!1);async function Le(){const ot=await ro(s.session.id);je.value=ot,ke.value=!ot,setTimeout(()=>{je.value=!1,ke.value=!1,x()},1500)}function it(){x(),o("fork",s.session.id)}function Fe(){x(),o("export",s.session.id)}function Re(){x(),o("pin",s.session.id)}function Ke(){x(),o("archive",s.session.id)}t({closeMenu:x});function ht(){const ot=s.session.pullRequest?.url;ot&&window.open(ot,"_blank","noopener")}return(ot,gt)=>(b(),I("div",{class:De(["se",{on:e.active,flat:a.value}]),onClick:gt[8]||(gt[8]=Tt=>o("select",e.session.id)),onContextmenu:me},[C("div",SCe,[a.value?ne("",!0):(b(),I("span",MCe,[p.value?(b(),fe(h(Bi),{key:0,size:"sm"})):g.value?(b(),I("span",ICe)):ne("",!0)])),C("div",ECe,[X.value?(b(),I("div",{key:0,ref_key:"renameWrapRef",ref:ie,class:De(["rename-wrap",{generating:xe.value}]),onClick:gt[4]||(gt[4]=It(()=>{},["stop"]))},[Bn(C("input",{ref_key:"renameInputRef",ref:ue,"onUpdate:modelValue":gt[0]||(gt[0]=Tt=>ee.value=Tt),class:"rename-input",readonly:xe.value,onKeydown:[qr(It(re,["stop"]),["enter"]),qr(It(se,["stop"]),["esc"])],onCompositionstart:gt[1]||(gt[1]=(...Tt)=>h(Ne)&&h(Ne)(...Tt)),onCompositionend:gt[2]||(gt[2]=(...Tt)=>h(te)&&h(te)(...Tt)),onBlur:ve},null,40,TCe),[[_o,ee.value]]),xe.value?(b(),I("span",LCe,[...gt[9]||(gt[9]=[C("i",null,null,-1),C("i",null,null,-1),C("i",null,null,-1)])])):ne("",!0),q.value?(b(),fe(h(gn),{key:1,text:h(i)("sidebar.genTitle")},{default:he(()=>[V(h(rn),{class:"gen-title-btn",size:"sm",label:h(i)("sidebar.genTitle"),disabled:xe.value,onMousedown:gt[3]||(gt[3]=It(()=>{},["prevent","stop"])),onClick:It(de,["stop"])},{default:he(()=>[V(h(Ce),{name:"gen-title"})]),_:1},8,["label","disabled"])]),_:1},8,["text"])):ne("",!0)],2)):(b(),I("span",{key:1,class:"t",onDblclick:It(j,["stop"])},[E.value.emoji?(b(),I("button",{key:0,type:"button",class:"emoji","aria-label":h(i)("sidebar.setEmoji"),onClick:It(z,["stop"]),onDblclick:gt[5]||(gt[5]=It(()=>{},["stop"]))},B(E.value.emoji),41,NCe)):ne("",!0),Ue(B(S.value),1)],32))]),X.value?ne("",!0):(b(),I("span",FCe,[V(h(gn),{text:h(i)("workspace.awaitingAnswerTitle")},{default:he(()=>[c.value?(b(),fe(h(Hl),{key:0,variant:"info",size:"sm"},{default:he(()=>[Ue(B(h(i)("workspace.awaitingAnswer")),1)]),_:1})):ne("",!0)]),_:1},8,["text"]),V(h(gn),{text:h(i)("workspace.awaitingPermissionTitle")},{default:he(()=>[d.value?(b(),fe(h(Hl),{key:0,variant:"warning",size:"sm"},{default:he(()=>[Ue(B(h(i)("workspace.awaitingPermission")),1)]),_:1})):ne("",!0)]),_:1},8,["text"]),V(h(gn),{text:h(i)("workspace.abortedTitle")},{default:he(()=>[f.value?(b(),fe(h(Hl),{key:0,variant:"danger",size:"sm"},{default:he(()=>[Ue(B(h(i)("workspace.aborted")),1)]),_:1})):ne("",!0)]),_:1},8,["text"]),!a.value||!m.value?(b(),I("span",BCe,B(e.session.time),1)):p.value||g.value?(b(),I("span",$Ce,[p.value?(b(),fe(h(Bi),{key:0,size:"sm"})):(b(),I("span",DCe))])):ne("",!0),X.value?ne("",!0):(b(),I("span",RCe,[V(h(gn),{text:e.session.pinned?h(i)("sidebar.unpin"):h(i)("sidebar.pin")},{default:he(()=>[V(h(rn),{class:"pin-btn",size:"sm",label:e.session.pinned?h(i)("sidebar.unpin"):h(i)("sidebar.pin"),onClick:It(Re,["stop"])},{default:he(()=>[V(h(Ce),{name:e.session.pinned?"unpin":"pin"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"]),V(h(gn),{text:h(i)("sidebar.archive")},{default:he(()=>[V(h(rn),{class:"archive-btn",size:"sm",label:h(i)("sidebar.archive"),onClick:It(Ke,["stop"])},{default:he(()=>[V(h(Ce),{name:"archive"})]),_:1},8,["label"])]),_:1},8,["text"])]))]))]),e.session.cwdLabel!==void 0?(b(),I("div",zCe,[V(h(Ce),{class:"sub-icon",name:"folder-closed",size:"sm"}),C("span",OCe,B(e.session.cwdLabel),1),e.session.pullRequest?(b(),I("button",{key:0,type:"button",class:De(["pr",`pr--${e.session.pullRequest.state}`]),"aria-label":`PR #${e.session.pullRequest.number}`,onClick:It(ht,["stop"])},[V(h(Ce),{name:"git-pull-request",size:"sm"}),C("span",null,"#"+B(e.session.pullRequest.number),1)],10,PCe)):ne("",!0)])):ne("",!0),(b(),fe(Wr,{to:"body"},[V(ys,{name:"menu-pop"},{default:he(()=>[y.value?(b(),fe(h(cl),{key:0,ref_key:"menuRef",ref:w,class:"menu",style:Vt(k.value),onClick:gt[6]||(gt[6]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{danger:ke.value,onClick:Le},{default:he(()=>[V(h(Ce),{name:"copy",size:"sm"}),Ue(" "+B(ke.value?h(i)("sidebar.copyFailed"):je.value?h(i)("sidebar.copied"):h(i)("sidebar.copySessionId")),1)]),_:1},8,["danger"]),V(h(bn),{separator:""}),V(h(bn),{onClick:j},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),Ue(" "+B(h(i)("sidebar.rename")),1)]),_:1}),V(h(bn),{onClick:G},{default:he(()=>[V(h(Ce),{name:"emoji",size:"sm"}),Ue(" "+B(h(i)("sidebar.setEmoji")),1)]),_:1}),V(h(bn),{onClick:it},{default:he(()=>[V(h(Ce),{name:"git-fork",size:"sm"}),Ue(" "+B(h(i)("sidebar.fork")),1)]),_:1}),V(h(bn),{onClick:Fe},{default:he(()=>[V(h(Ce),{name:"download",size:"sm"}),Ue(" "+B(h(i)("sidebar.export")),1)]),_:1}),V(h(bn),{onClick:Re},{default:he(()=>[V(h(Ce),{name:e.session.pinned?"unpin":"pin",size:"sm"},null,8,["name"]),Ue(" "+B(e.session.pinned?h(i)("sidebar.unpin"):h(i)("sidebar.pin")),1)]),_:1}),V(h(bn),{onClick:Ke},{default:he(()=>[V(h(Ce),{name:"archive",size:"sm"}),Ue(" "+B(h(i)("sidebar.archive")),1)]),_:1}),V(h(bn),{separator:""}),C("div",jCe,B(l.value),1)]),_:1},8,["style"])):ne("",!0)]),_:1})])),(b(),fe(Wr,{to:"body"},[V(ys,{name:"menu-pop"},{default:he(()=>[M.value?(b(),fe(_Ce,{key:0,ref_key:"pickerRef",ref:_,class:"picker",style:Vt(N.value),current:E.value.emoji,removable:E.value.rest.length>0,onClick:gt[7]||(gt[7]=It(()=>{},["stop"])),onPick:K},null,8,["style","current","removable"])):ne("",!0)]),_:1})]))],34))}}),gk=vt(HCe,[["__scopeId","data-v-8cccabc6"]]),WCe=["draggable"],qCe={class:"gh-top"},UCe={class:"gh-name"},KCe=["inert"],VCe={key:0,class:"show-more-row"},ZCe=["disabled"],GCe={class:"show-more-label"},QCe={key:1,class:"show-more-sep","aria-hidden":"true"},YCe={class:"show-more-label"},JCe={key:1,class:"group-empty"},XCe=tt({__name:"WorkspaceGroup",props:{group:{},activeWorkspaceId:{},activeId:{},renamingId:{},renameValue:{},renameInputRef:{},pendingBySession:{},unreadBySession:{},wsMenuOpenId:{},dragging:{type:Boolean},sortable:{type:Boolean},isCollapsed:{type:Function},visibleLimit:{type:Function},flashSessionId:{},pinnedDragSession:{}},emits:["groupClick","groupContextmenu","toggleWsMenu","createInWorkspace","selectSession","renameSession","generateSessionTitle","archiveSession","forkSession","exportSession","pinSession","dropPinnedSession","expand","collapse","confirmRename","cancelRename","updateRenameValue","wsDragstart","wsDragend"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=F({get:()=>i.renameValue,set:N=>s("updateRenameValue",N)}),r=Z(!1),l=F(()=>i.pinnedDragSession!=null),a=F(()=>i.pinnedDragSession?.workspaceId===i.group.workspace.id);function u(N){if(i.pinnedDragSession!=null){if(!a.value){N.dataTransfer&&(N.dataTransfer.dropEffect="none");return}N.preventDefault(),N.dataTransfer&&(N.dataTransfer.dropEffect="move"),r.value=!0}}function c(N){i.pinnedDragSession==null||!a.value||(N.preventDefault(),r.value=!1,s("dropPinnedSession",i.pinnedDragSession.id))}function d(N){N.currentTarget.contains(N.relatedTarget)||(r.value=!1)}const f=F(()=>i.visibleLimit(i.group.workspace.id)??i.group.initialCount),p=F(()=>{const N=i.group.sessions.slice(0,f.value);if(i.activeId&&!N.some(D=>D.id===i.activeId)){const D=i.group.sessions.find(T=>T.id===i.activeId);if(D)return[...N,D]}return N}),g=F(()=>i.group.sessions.length>f.value||i.group.hasMore||i.group.loadingMore),m=F(()=>f.value>i.group.initialCount);function y(N){i.renameInputRef.value=N instanceof HTMLInputElement?N:null}const{handleCompositionStart:w,handleCompositionEnd:k,isComposingKeyEvent:A}=Kr();function v(N){A(N)||s("confirmRename")}function x(N){A(N)||s("cancelRename")}const E=Z(null);function S(N){i.renamingId!==i.group.workspace.id&&s("groupContextmenu",i.group.workspace,N)}function M(N){i.sortable!==!1&&N.dataTransfer&&(N.dataTransfer.effectAllowed="move",N.dataTransfer.setData("text/plain",i.group.workspace.id),s("wsDragstart",i.group.workspace.id))}function _(N,D){D.dataTransfer&&(D.dataTransfer.effectAllowed="move",D.dataTransfer.setData(xm,N),D.dataTransfer.setData("text/plain",N))}return(N,D)=>(b(),I("div",{class:De(["group",{dragging:e.dragging,"pinned-drag-active":l.value&&a.value,"pinned-drop-hover":r.value,"pinned-drop-blocked":l.value&&!a.value}]),onDragover:u,onDrop:c,onDragleave:d},[C("div",{class:De(["gh",{on:e.group.workspace.id===e.activeWorkspaceId&&e.activeId==="",collapsed:e.isCollapsed(e.group.workspace.id)}]),draggable:e.sortable!==!1&&e.renamingId!==e.group.workspace.id,onClick:D[7]||(D[7]=It(T=>s("groupClick",e.group.workspace.id,T),["stop"])),onContextmenu:S,onDragstart:M,onDragend:D[8]||(D[8]=T=>s("wsDragend"))},[C("div",qCe,[e.isCollapsed(e.group.workspace.id)?(b(),fe(h(Ce),{key:0,class:"gh-folder",name:"folder-closed"})):(b(),fe(h(Ce),{key:1,class:"gh-folder",name:"folder"})),e.renamingId!==e.group.workspace.id?(b(),fe(h(gn),{key:2,text:e.group.workspace.root},{default:he(()=>[C("span",UCe,B(e.group.workspace.name),1)]),_:1},8,["text"])):Bn((b(),I("input",{key:3,ref:y,"onUpdate:modelValue":D[0]||(D[0]=T=>o.value=T),class:"gh-rename",type:"text",onKeydown:[qr(v,["enter"]),qr(x,["esc"])],onCompositionstart:D[1]||(D[1]=(...T)=>h(w)&&h(w)(...T)),onCompositionend:D[2]||(D[2]=(...T)=>h(k)&&h(k)(...T)),onBlur:D[3]||(D[3]=T=>s("cancelRename")),onClick:D[4]||(D[4]=It(()=>{},["stop"]))},null,544)),[[_o,o.value]]),e.renamingId!==e.group.workspace.id?(b(),I("div",{key:4,class:De(["gh-actions",{open:e.wsMenuOpenId===e.group.workspace.id}])},[V(h(rn),{class:De(["gh-more",{open:e.wsMenuOpenId===e.group.workspace.id}]),size:"sm",label:h(n)("sidebar.options"),tooltip:h(n)("sidebar.options"),"aria-haspopup":"menu","aria-expanded":e.wsMenuOpenId===e.group.workspace.id,onClick:D[5]||(D[5]=It(T=>s("toggleWsMenu",e.group.workspace,T),["stop"]))},{default:he(()=>[V(h(Ce),{name:"dots-horizontal"})]),_:1},8,["class","label","tooltip","aria-expanded"]),V(h(rn),{class:"gh-add",size:"sm",label:h(n)("workspace.newInGroup"),tooltip:h(n)("workspace.newInGroup"),onClick:D[6]||(D[6]=It(T=>s("createInWorkspace",e.group.workspace.id),["stop"]))},{default:he(()=>[V(h(Ce),{name:"chat-new"})]),_:1},8,["label","tooltip"])],2)):ne("",!0)])],42,WCe),C("div",{class:De(["group-sessions",{collapsed:e.isCollapsed(e.group.workspace.id)}]),inert:e.isCollapsed(e.group.workspace.id)},[(b(!0),I(Be,null,yt(p.value,T=>(b(),fe(gk,{key:T.id,session:T,active:T.id===e.activeId,"approval-count":e.pendingBySession[T.id]?.approvals??0,"question-count":e.pendingBySession[T.id]?.questions??0,unread:e.unreadBySession[T.id]??!1,draggable:E.value!==T.id,"data-session-id":T.id,class:De({"se-locate-flash":e.flashSessionId===T.id}),onDragstart:$=>_(T.id,$),onRenameStateChange:$=>E.value=$?T.id:null,onSelect:D[9]||(D[9]=$=>s("selectSession",$)),onRename:D[10]||(D[10]=($,P)=>s("renameSession",$,P)),onGenerateTitle:D[11]||(D[11]=($,P)=>s("generateSessionTitle",$,P)),onArchive:D[12]||(D[12]=$=>s("archiveSession",$)),onFork:D[13]||(D[13]=$=>s("forkSession",$)),onExport:D[14]||(D[14]=$=>s("exportSession",$)),onPin:D[15]||(D[15]=$=>s("pinSession",$))},null,8,["session","active","approval-count","question-count","unread","draggable","data-session-id","class","onDragstart","onRenameStateChange"]))),128)),g.value||m.value?(b(),I("div",VCe,[g.value?(b(),I("button",{key:0,class:"show-more",disabled:e.group.loadingMore,onClick:D[16]||(D[16]=It(T=>s("expand",e.group.workspace.id),["stop"]))},[V(h(Ce),{name:"chevron-down",size:"sm"}),C("span",GCe,B(e.group.loadingMore?h(n)("sidebar.loadingMore"):h(n)("sidebar.showMore")),1)],8,ZCe)):ne("",!0),g.value&&m.value?(b(),I("span",QCe,"·")):ne("",!0),m.value?(b(),I("button",{key:2,class:"show-more",onClick:D[17]||(D[17]=It(T=>s("collapse",e.group.workspace.id),["stop"]))},[V(h(Ce),{name:"chevron-up",size:"sm"}),C("span",YCe,B(h(n)("sidebar.showLess")),1)])):ne("",!0)])):ne("",!0),e.group.sessions.length===0?(b(),I("div",JCe,B(e.group.pinnedCount>0?h(n)("sidebar.allPinned",{count:e.group.pinnedCount}):h(n)("sidebar.noSessions")),1)):ne("",!0)],10,KCe)],34))}}),ewe=vt(XCe,[["__scopeId","data-v-08d57eaf"]]),twe={class:"pinned-label"},nwe={class:"pinned-title"},iwe={key:0,class:"pinned-rows"},swe=["draggable","onDragstart"],owe=tt({__name:"PinnedSessionList",props:{sessions:{},activeId:{},pendingBySession:{},unreadBySession:{},flashSessionId:{}},emits:["selectSession","renameSession","generateSessionTitle","archiveSession","forkSession","exportSession","pinSession","dropPin","sessionDragStart","sessionDragEnd"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=e,o=n,r=Z(zie());function l(){r.value=!r.value,D3(r.value)}function a(){r.value&&(r.value=!1,D3(!1))}t({expand:a});const u=Z(null),c=Z(null);function d(k,A){if(!A.dataTransfer)return;A.dataTransfer.effectAllowed="move",A.dataTransfer.setData("text/plain",k),u.value=k;const v=s.sessions.find(x=>x.id===k)?.workspaceId;v!==void 0&&o("sessionDragStart",k,v)}function f(){u.value=null,o("sessionDragEnd")}Qe(()=>s.sessions,k=>{u.value!==null&&!k.some(A=>A.id===u.value)&&(u.value=null)});const p=Z(!1);function g(k){return k.dataTransfer?.types.includes(xm)??!1}function m(k){g(k)&&(k.preventDefault(),k.dataTransfer&&(k.dataTransfer.dropEffect="move"),p.value=!0)}function y(k){p.value=!1;const A=k.dataTransfer?.getData(xm);A&&o("dropPin",A)}function w(k){k.currentTarget.contains(k.relatedTarget)||(p.value=!1)}return(k,A)=>(b(),I("div",{class:De(["pinned",{"drop-active":p.value}]),onDragover:m,onDrop:y,onDragleave:w},[C("div",twe,[C("span",nwe,B(h(i)("sidebar.pinned")),1),V(h(rn),{class:De(["pinned-toggle",{"pinned-toggle--on":r.value}]),size:"sm",label:r.value?h(i)("sidebar.expandPinned"):h(i)("sidebar.collapsePinned"),tooltip:r.value?h(i)("sidebar.expandPinned"):h(i)("sidebar.collapsePinned"),onClick:It(l,["stop"])},{default:he(()=>[r.value?(b(),fe(h(Ce),{key:0,name:"chevron-right"})):(b(),fe(h(Ce),{key:1,name:"chevron-down"}))]),_:1},8,["class","label","tooltip"])]),r.value?ne("",!0):(b(),I("div",iwe,[(b(!0),I(Be,null,yt(e.sessions,v=>(b(),I("div",{key:v.id,class:De(["pin-row",{dragging:u.value===v.id}]),draggable:c.value!==v.id,onDragstart:x=>d(v.id,x),onDragend:f},[V(gk,{session:v,active:v.id===e.activeId,"approval-count":e.pendingBySession[v.id]?.approvals??0,"question-count":e.pendingBySession[v.id]?.questions??0,unread:e.unreadBySession[v.id]??!1,"data-session-id":v.id,class:De({"se-locate-flash":e.flashSessionId===v.id}),onRenameStateChange:x=>c.value=x?v.id:null,onSelect:A[0]||(A[0]=x=>o("selectSession",x)),onRename:A[1]||(A[1]=(x,E)=>o("renameSession",x,E)),onGenerateTitle:A[2]||(A[2]=(x,E)=>o("generateSessionTitle",x,E)),onArchive:A[3]||(A[3]=x=>o("archiveSession",x)),onFork:A[4]||(A[4]=x=>o("forkSession",x)),onExport:A[5]||(A[5]=x=>o("exportSession",x)),onPin:A[6]||(A[6]=x=>o("pinSession",x))},null,8,["session","active","approval-count","question-count","unread","data-session-id","class","onRenameStateChange"])],42,swe))),128))]))],34))}}),rwe=vt(owe,[["__scopeId","data-v-728c6a88"]]),lwe={class:"ch"},awe={class:"ch-brand"},uwe={class:"ch-tail"},cwe={class:"search-input"},dwe={class:"side-section-label"},fwe={class:"side-section-title"},hwe={class:"side-section-actions"},pwe={key:0,class:"empty"},gwe=["data-ws-id","onDragover","onDrop"],mwe={key:0,class:"empty"},vwe={key:1,class:"show-more-row"},ywe=["disabled"],bwe={class:"show-more-label"},kwe={class:"folder-drop-card"},Awe={class:"view-menu-label"},Cwe={class:"view-menu-check"},wwe={class:"view-menu-check"},xwe={class:"view-menu-label"},_we={class:"view-menu-check"},Swe={class:"view-menu-check"},Mwe=!1,Iwe=1e3,Ewe=tt({__name:"Sidebar",props:{activeWorkspace:{default:null},activeWorkspaceId:{default:null},sessions:{},groups:{},workspaceSortMode:{default:"manual"},pinnedSessions:{default:()=>[]},flatSessions:{default:()=>[]},flatHasMore:{type:Boolean,default:!1},flatLoadingMore:{type:Boolean,default:!1},initialized:{type:Boolean,default:!1},activeId:{},attentionBySession:{default:()=>({})},pendingBySession:{default:()=>({})},unreadBySession:{default:()=>({})},colWidth:{default:220},collapsed:{type:Boolean,default:!1},dragging:{type:Boolean,default:!1}},emits:["select","create","createInWorkspace","selectWorkspace","addWorkspace","addWorkspacePaths","rename","generateTitle","archive","fork","export","pin","dropPin","unpin","renameWorkspace","deleteWorkspace","reorderWorkspaces","setWorkspaceSortMode","loadMoreSessions","loadAllSessions","ensureFlatSessions","loadMoreFlatSessions","openSettings","login","collapse"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=Z(!1),r=c()?["⌘","K"]:["Ctrl","K"],l=c()?["⌃","⇧","O"]:["Ctrl","Shift","O"];function a(){s("loadAllSessions"),o.value=!0}function u($e){($e.metaKey||$e.ctrlKey)&&($e.key.toLowerCase()==="k"?($e.preventDefault(),a()):!$e.metaKey&&$e.ctrlKey&&$e.shiftKey&&$e.key.toLowerCase()==="o"&&($e.preventDefault(),s("create")))}pn(()=>window.addEventListener("keydown",u)),Gn(()=>window.removeEventListener("keydown",u));function c(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const $e=navigator.userAgentData;return $e?.platform==="macOS"||$e?.platform==="iOS"}const d=Z(null),f=Z(!1),p=Z(!1),g=Z(!1);let m=null;function y($e=d.value){$e&&(f.value=$e.scrollTop>0,p.value=$e.scrollTop+$e.clientHeight<$e.scrollHeight-1)}function w($e){y($e.target),g.value=!0,m&&clearTimeout(m),m=setTimeout(()=>{g.value=!1,m=null},900)}let k=null;pn(()=>{kt(()=>{y(),typeof ResizeObserver=="function"&&d.value&&(k=new ResizeObserver(()=>y()),k.observe(d.value))})}),vp(()=>y()),Gn(()=>{k?.disconnect(),m&&clearTimeout(m),ot&&clearTimeout(ot),ke&&clearTimeout(ke)});const A=Z(new Set(Rie()));function v($e){return A.value.has($e)}function x($e){const nt=new Set(A.value);nt.has($e)?nt.delete($e):nt.add($e),A.value=nt,uy(nt)}function E(){const $e=new Set(i.groups.map(nt=>nt.workspace.id));A.value=$e,uy($e)}function S(){const $e=new Set;A.value=$e,uy($e)}const M=F(()=>i.groups.length>0&&i.groups.every($e=>A.value.has($e.workspace.id))),_=Z(new Map);function N($e){return _.value.get($e)}function D($e){const nt=i.groups.find(Nn=>Nn.workspace.id===$e);if(!nt)return;const Nt=(_.value.get($e)??nt.initialCount)+tk,Zt=new Map(_.value);Zt.set($e,Nt),_.value=Zt,nt.sessions.length<Nt&&nt.hasMore&&s("loadMoreSessions",$e)}function T($e){if(!_.value.has($e))return;const nt=new Map(_.value);nt.delete($e),_.value=nt}const $=Z(null),P=Z(null);function O($e){$.value=$e}function R(){$.value=null,P.value=null}function W($e){const nt=$e.currentTarget.getBoundingClientRect();return $e.clientY<nt.top+nt.height/2?"before":"after"}function z($e,nt){$.value===null||$.value===nt||($e.preventDefault(),$e.dataTransfer&&($e.dataTransfer.dropEffect="move"),P.value={id:nt,position:W($e)})}function G($e){const nt=$.value,Nt=P.value?.id===$e?P.value.position:"before";if(P.value=null,$.value=null,!nt||nt===$e)return;const Zt=hse(i.groups.map(Nn=>Nn.workspace.id),nt,$e,Nt);s("reorderWorkspaces",Zt)}const K=Z(null);function H($e,nt){K.value={id:$e,workspaceId:nt}}function q(){K.value=null}function X($e){K.value=null,s("unpin",$e)}const ee=Z(Oie());function ue($e){ee.value!==$e&&(ee.value=$e,Pie($e),$e==="flat"&&s("ensureFlatSessions"))}Qe(()=>i.initialized,$e=>{$e&&ee.value==="flat"&&s("ensureFlatSessions")},{immediate:!0});const ie=Z(!1),xe=Z({}),ce=Z(null);function pe($e){const nt=$e.target;nt.closest(".view-menu")||nt.closest(".side-section-view")||te()}async function Ne($e){if(ie.value){te();return}const nt=$e.currentTarget;ie.value=!0,document.addEventListener("mousedown",pe),window.addEventListener("resize",te),await kt();const Nt=ce.value?.el,Zt=nt.getBoundingClientRect(),Nn=4,cs=8,Fi=Nt?.offsetHeight??0,di=Nt?.offsetWidth??0;let fi=Zt.bottom+Nn,Ks=!1;fi+Fi>window.innerHeight-cs&&(fi=Math.max(cs,Zt.top-Fi-Nn),Ks=!0);let Si=Zt.right-di;Si<cs&&(Si=cs),xe.value={top:`${Math.round(fi)}px`,left:`${Math.round(Si)}px`,transformOrigin:Ks?"bottom right":"top right","--menu-pop-shift":Ks?"2px":"-2px"}}function te(){ie.value=!1,document.removeEventListener("mousedown",pe),window.removeEventListener("resize",te)}function ye($e){ue($e),te()}function j($e){s("setWorkspaceSortMode",$e),te()}const Y=Z(null);function ve($e,nt){nt.dataTransfer&&(nt.dataTransfer.effectAllowed="move",nt.dataTransfer.setData(xm,$e),nt.dataTransfer.setData("text/plain",$e))}const re=Z(!1);function se($e){ee.value!=="flat"||K.value===null||($e.preventDefault(),$e.dataTransfer&&($e.dataTransfer.dropEffect="move"),re.value=!0)}function U($e){ee.value!=="flat"||K.value===null||($e.preventDefault(),re.value=!1,X(K.value.id))}function J($e){$e.currentTarget.contains($e.relatedTarget)||(re.value=!1)}function de($e,nt){nt.target.closest(".gh-more, .gh-add")||x($e)}function me($e){s("select",$e)}function Ie($e){s("select",$e),Ke($e)}const je=Z(null);let ke=null;const Le=F(()=>i.groups.map($e=>$e.workspace));function it($e,nt){const Nt=getComputedStyle($e).getPropertyValue(nt).trim(),Zt=/^([\d.]+)(ms|s)$/.exec(Nt);if(!Zt)return 0;const Nn=Number.parseFloat(Zt[1]);return Zt[2]==="s"?Nn*1e3:Nn}function Fe(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}function Re($e,nt){je.value=$e,ke&&clearTimeout(ke),ke=setTimeout(()=>{je.value=null,ke=null},it(nt,"--duration-flash"))}function Ke($e){const nt=i.groups.find(Nt=>Nt.sessions.some(Zt=>Zt.id===$e));if(!nt){Tt.value?.expand(),kt(()=>{const Zt=[...Tt.value?.$el?.querySelectorAll("[data-session-id]")??[]].find(Nn=>Nn.dataset.sessionId===$e);Zt?.scrollIntoView({block:"nearest",behavior:Fe()}),Zt&&Re($e,Zt)});return}ee.value!=="grouped"&&ue("grouped"),v(nt.workspace.id)&&x(nt.workspace.id),kt(()=>{const Nt=[...d.value?.querySelectorAll("[data-session-id]")??[]].find(Zt=>Zt.dataset.sessionId===$e);Nt?.scrollIntoView({block:"start",behavior:Fe()}),Nt&&Re($e,Nt)})}const ht=Z(null);let ot=null;function gt($e){ee.value!=="grouped"&&ue("grouped"),v($e)&&x($e),s("selectWorkspace",$e),kt(()=>{const nt=[...d.value?.querySelectorAll("[data-ws-id]")??[]].find(Nt=>Nt.dataset.wsId===$e);nt?.scrollIntoView({block:"start",behavior:Fe()}),nt&&(ht.value=$e,ot&&clearTimeout(ot),ot=setTimeout(()=>{ht.value=null,ot=null},it(nt,"--duration-flash")))})}const Tt=Z(null);function yn($e){Tt.value?Tt.value.expand():D3(!1),s("pin",$e)}function Gt($e){Tt.value?.expand(),s("dropPin",$e)}const Kt=Z(0),mn=Z(!1);function _n(){Kt.value=0,mn.value=!1}function He($e){!R0()||!sy($e)||($e.preventDefault(),$e.stopPropagation(),Kt.value+=1,mn.value=!0)}function st($e){!R0()||!sy($e)||($e.preventDefault(),$e.stopPropagation(),$e.dataTransfer&&($e.dataTransfer.dropEffect="copy"))}function Ve($e){!R0()||!sy($e)||(Kt.value=Math.max(0,Kt.value-1),Kt.value===0&&(mn.value=!1))}function Rt($e){if(_n(),!R0())return;const nt=Yee($e);nt.length!==0&&($e.preventDefault(),$e.stopPropagation(),s("addWorkspacePaths",nt))}const Ct=Z(null),Fn=Z(""),Tn=Z(""),as=Z(null);function Qt(){return as}function ni($e,nt){Ct.value=$e,Tn.value=nt,Fn.value=nt,kt().then(()=>as.value?.focus())}function zn(){const $e=Ct.value,nt=Fn.value.trim();$e&&nt&&nt!==Tn.value&&s("renameWorkspace",$e,nt),Ct.value=null}function Sn(){Ct.value=null}function mi($e){Fn.value=$e}const Ws=Z(!1),Li=Z(null),Lt=Z({}),xi=Z(null);function Qi($e){xi.value?.el&&!xi.value.el.contains($e.target)&&Fs()}function ci($e,nt){nt.preventDefault(),nt.stopPropagation(),Li.value=$e,Lt.value={top:`${nt.clientY}px`,left:`${nt.clientX}px`,transformOrigin:"top left","--menu-pop-shift":"-2px"},Ws.value=!0,document.addEventListener("mousedown",Qi,!0)}function Fs(){Ws.value=!1,document.removeEventListener("mousedown",Qi,!0),Li.value=null}function Ni(){Li.value&&ro(Li.value.root),Fs()}function $i(){Li.value&&ni(Li.value.id,Li.value.name),Fs()}function So(){const $e=Li.value;$e&&(Fs(),s("deleteWorkspace",$e.id))}const _i=Z(null),Yi=Z(null),co=Z({}),Bs=Z(null);function Hi($e){const nt=$e.target;nt.closest(".gh-more")||nt.closest(".ws-menu")||Mn()}async function vi($e,nt){if(_i.value===$e.id){Mn();return}const Nt=nt.currentTarget;Yi.value=$e,_i.value=$e.id,document.addEventListener("mousedown",Hi),window.addEventListener("resize",Mn),await kt();const Zt=Bs.value?.el,Nn=Nt.getBoundingClientRect(),cs=4,Fi=8,di=Zt?.offsetHeight??0,fi=Zt?.offsetWidth??0;let Ks=Nn.bottom+cs,Si=!1;Ks+di>window.innerHeight-Fi&&(Ks=Math.max(Fi,Nn.top-di-cs),Si=!0);let Vs=Nn.right-fi;Vs<Fi&&(Vs=Fi),co.value={top:`${Math.round(Ks)}px`,left:`${Math.round(Vs)}px`,transformOrigin:Si?"bottom right":"top right","--menu-pop-shift":Si?"2px":"-2px"}}function Mn(){_i.value=null,Yi.value=null,document.removeEventListener("mousedown",Hi),window.removeEventListener("resize",Mn)}function Dn($e){ro($e.root),Mn()}function Ln($e){ni($e.id,$e.name),Mn()}function ws($e){Mn(),s("deleteWorkspace",$e.id)}Gn(()=>{document.removeEventListener("mousedown",Qi,!0),document.removeEventListener("mousedown",Hi),document.removeEventListener("mousedown",pe),window.removeEventListener("resize",Mn),window.removeEventListener("resize",te)});const Cn=Z(null);let Di;function ri(){const $e=Cn.value;$e&&($e.classList.remove("blink-now"),$e.getBoundingClientRect(),$e.classList.add("blink-now"),clearTimeout(Di),Di=setTimeout(()=>$e.classList.remove("blink-now"),300))}const ur=rl(()=>ns(()=>import("./DesignSystemView-C2ybIYYn.js"),__vite__mapDeps([8,9]))),jo=Z(!1);let On,us=!1;function qs($e){us=!1,clearTimeout(On),$e.currentTarget.setPointerCapture?.($e.pointerId),On=setTimeout(()=>{us=!0,jo.value=!0},Iwe)}function Us($e){clearTimeout(On);const nt=$e.currentTarget;nt.hasPointerCapture?.($e.pointerId)&&nt.releasePointerCapture($e.pointerId)}function Ji(){if(us){us=!1;return}ri()}return Gn(()=>{clearTimeout(On)}),($e,nt)=>(b(),I("aside",{class:De(["side",{"macos-desktop":h(Dc),collapsed:e.collapsed,"no-anim":e.dragging}]),style:Vt({width:e.collapsed?"0px":e.colWidth+"px"})},[C("div",{class:"col",style:Vt({width:e.colWidth+"px"}),onDragenter:He,onDragover:st,onDragleave:Ve,onDrop:Rt},[C("div",lwe,[C("div",awe,[h(Dc)?ne("",!0):(b(),I(Be,{key:0},[(b(),I("svg",{ref_key:"logoRef",ref:Cn,class:"ch-logo",viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Kimi Code",onClick:Ji,onPointerdown:qs,onPointerup:Us,onPointercancel:Us},[...nt[35]||(nt[35]=[Lu('<defs data-v-fb698df7><mask id="kimiEyes" maskUnits="userSpaceOnUse" data-v-fb698df7><rect x="0" y="0" width="32" height="22" fill="#fff" data-v-fb698df7></rect><g class="ch-eyes" fill="#000" data-v-fb698df7><rect class="ch-eye" x="11.8" y="7" width="2.8" height="8" rx="1.4" data-v-fb698df7></rect><rect class="ch-eye" x="17.4" y="7" width="2.8" height="8" rx="1.4" data-v-fb698df7></rect></g></mask></defs><rect x="1" y="1" width="30" height="20" rx="6" fill="var(--logo)" mask="url(#kimiEyes)" data-v-fb698df7></rect>',2)])],544)),nt[36]||(nt[36]=C("span",{class:"ch-name"},"Kimi Code",-1))],64))]),C("div",uwe,[h(Dc)?ne("",!0):(b(),fe(h(rn),{key:0,class:"ch-collapse",size:"sm",label:h(n)("sidebar.collapseSidebar"),tooltip:h(n)("sidebar.collapseSidebar"),onClick:nt[0]||(nt[0]=It(Nt=>s("collapse"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"panel-collapse"})]),_:1},8,["label","tooltip"])),V(Xve)])]),C("div",{class:De(["sidebar-actions",{"sidebar-actions--has-workspace-action":Mwe}])},[C("button",{class:"btn-new-chat",type:"button",onClick:nt[1]||(nt[1]=It(Nt=>s("create"),["stop"]))},[V(h(Ce),{name:"chat-new"}),C("span",null,B(h(n)("sidebar.newChat")),1),V(h(Aa),{keys:h(l)},null,8,["keys"])]),ne("",!0),C("button",{class:"search",type:"button",onClick:a},[V(h(Ce),{class:"search-icon",name:"search"}),C("span",cwe,B(h(n)("sidebar.search")),1),V(h(Aa),{keys:h(r)},null,8,["keys"])])],2),ee.value==="flat"||e.groups.length>0?(b(),I("div",{key:0,class:De(["sessions-head",{"sessions-head--scrolled":f.value}])},[e.pinnedSessions.length>0?(b(),fe(rwe,{key:0,ref_key:"pinnedListRef",ref:Tt,sessions:e.pinnedSessions,"active-id":e.activeId,"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,"flash-session-id":je.value,onSelectSession:me,onRenameSession:nt[3]||(nt[3]=(Nt,Zt)=>s("rename",Nt,Zt)),onGenerateSessionTitle:nt[4]||(nt[4]=(Nt,Zt)=>s("generateTitle",Nt,Zt)),onArchiveSession:nt[5]||(nt[5]=Nt=>s("archive",Nt)),onForkSession:nt[6]||(nt[6]=Nt=>s("fork",Nt)),onExportSession:nt[7]||(nt[7]=Nt=>s("export",Nt)),onPinSession:yn,onDropPin:Gt,onSessionDragStart:H,onSessionDragEnd:q},null,8,["sessions","active-id","pending-by-session","unread-by-session","flash-session-id"])):ne("",!0),C("div",dwe,[C("span",fwe,B(h(n)("sidebar.sessionsHeader")),1),C("div",hwe,[ee.value==="grouped"?(b(),fe(h(rn),{key:0,class:"side-section-toggle",size:"sm",label:M.value?h(n)("sidebar.expandAll"):h(n)("sidebar.collapseAll"),tooltip:M.value?h(n)("sidebar.expandAll"):h(n)("sidebar.collapseAll"),onClick:nt[8]||(nt[8]=It(Nt=>M.value?S():E(),["stop"]))},{default:he(()=>[M.value?(b(),fe(h(Ce),{key:0,name:"expand"})):(b(),fe(h(Ce),{key:1,name:"collapse"}))]),_:1},8,["label","tooltip"])):ne("",!0),V(h(gn),{text:h(n)("sidebar.viewSwitcher")},{default:he(()=>[V(h(rn),{class:"side-section-toggle side-section-view",size:"sm",label:h(n)("sidebar.viewSwitcher"),onClick:It(Ne,["stop"])},{default:he(()=>[V(h(Ce),{name:"list-settings"})]),_:1},8,["label"])]),_:1},8,["text"])])])],2)):ne("",!0),C("div",{ref_key:"sessionsEl",ref:d,class:De(["sessions",{scrolling:g.value,"pinned-drag-active":ee.value==="flat"&&K.value!==null,"flat-pinned-drop-hover":re.value}]),onScroll:w,onDragover:se,onDrop:U,onDragleave:J},[ee.value==="grouped"?(b(),I(Be,{key:0},[e.groups.length===0?(b(),I("div",pwe,B(h(n)("workspace.noWorkspace")),1)):(b(!0),I(Be,{key:1},yt(e.groups,Nt=>(b(),I("div",{key:Nt.workspace.id,class:De(["ws-drop-target",{"drop-before":P.value?.id===Nt.workspace.id&&P.value.position==="before","drop-after":P.value?.id===Nt.workspace.id&&P.value.position==="after","ws-locate-flash":ht.value===Nt.workspace.id}]),"data-ws-id":Nt.workspace.id,onDragover:Zt=>z(Zt,Nt.workspace.id),onDrop:Zt=>G(Nt.workspace.id)},[V(ewe,{group:Nt,"active-workspace-id":e.activeWorkspaceId,"active-id":e.activeId,"renaming-id":Ct.value,"rename-value":Fn.value,"rename-input-ref":Qt(),"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,"ws-menu-open-id":_i.value,dragging:$.value===Nt.workspace.id,sortable:e.workspaceSortMode==="manual","is-collapsed":v,"visible-limit":N,"flash-session-id":je.value,"pinned-drag-session":K.value,onGroupClick:de,onGroupContextmenu:ci,onToggleWsMenu:vi,onCreateInWorkspace:nt[9]||(nt[9]=Zt=>s("createInWorkspace",Zt)),onSelectSession:me,onRenameSession:nt[10]||(nt[10]=(Zt,Nn)=>s("rename",Zt,Nn)),onGenerateSessionTitle:nt[11]||(nt[11]=(Zt,Nn)=>s("generateTitle",Zt,Nn)),onArchiveSession:nt[12]||(nt[12]=Zt=>s("archive",Zt)),onForkSession:nt[13]||(nt[13]=Zt=>s("fork",Zt)),onExportSession:nt[14]||(nt[14]=Zt=>s("export",Zt)),onPinSession:yn,onDropPinnedSession:X,onExpand:D,onCollapse:T,onConfirmRename:zn,onCancelRename:Sn,onUpdateRenameValue:mi,onWsDragstart:O,onWsDragend:R},null,8,["group","active-workspace-id","active-id","renaming-id","rename-value","rename-input-ref","pending-by-session","unread-by-session","ws-menu-open-id","dragging","sortable","flash-session-id","pinned-drag-session"])],42,gwe))),128))],64)):(b(),I(Be,{key:1},[(b(!0),I(Be,null,yt(e.flatSessions,Nt=>(b(),fe(gk,{key:Nt.id,session:Nt,active:Nt.id===e.activeId,"approval-count":e.pendingBySession[Nt.id]?.approvals??0,"question-count":e.pendingBySession[Nt.id]?.questions??0,unread:e.unreadBySession[Nt.id]??!1,draggable:Y.value!==Nt.id,onDragstart:Zt=>ve(Nt.id,Zt),onRenameStateChange:Zt=>Y.value=Zt?Nt.id:null,onSelect:me,onRename:nt[15]||(nt[15]=(Zt,Nn)=>s("rename",Zt,Nn)),onGenerateTitle:nt[16]||(nt[16]=(Zt,Nn)=>s("generateTitle",Zt,Nn)),onArchive:nt[17]||(nt[17]=Zt=>s("archive",Zt)),onFork:nt[18]||(nt[18]=Zt=>s("fork",Zt)),onExport:nt[19]||(nt[19]=Zt=>s("export",Zt)),onPin:yn},null,8,["session","active","approval-count","question-count","unread","draggable","onDragstart","onRenameStateChange"]))),128)),e.flatSessions.length===0&&!e.flatHasMore&&e.pinnedSessions.length===0?(b(),I("div",mwe,B(h(n)("sidebar.noSessions")),1)):ne("",!0),e.flatHasMore?(b(),I("div",vwe,[C("button",{class:"show-more",disabled:e.flatLoadingMore,onClick:nt[20]||(nt[20]=It(Nt=>s("loadMoreFlatSessions"),["stop"]))},[C("span",bwe,B(e.flatLoadingMore?h(n)("sidebar.loadingMore"):h(n)("sidebar.loadMore")),1),V(h(Ce),{name:"chevron-down",size:"sm"})],8,ywe)])):ne("",!0)],64))],34),C("div",{class:De(["side-footer",{"side-footer--shadowed":p.value}])},[V(dCe,{onLogin:nt[21]||(nt[21]=Nt=>s("login")),onOpenSettings:nt[22]||(nt[22]=Nt=>s("openSettings"))})],2),C("div",{class:De(["folder-drop-overlay",{show:mn.value}]),"aria-hidden":"true"},[C("div",kwe,[V(h(Ce),{name:"folder",size:"lg"}),C("span",null,B(h(n)("sidebar.dropToAddWorkspace")),1)])],2)],36),V(ys,{name:"menu-pop"},{default:he(()=>[Ws.value?(b(),fe(h(cl),{key:0,ref_key:"ghMenuRef",ref:xi,class:"gh-menu",style:Vt(Lt.value),onClick:nt[23]||(nt[23]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{onClick:Ni},{default:he(()=>[V(h(Ce),{name:"copy",size:"sm"}),Ue(" "+B(h(n)("sidebar.copyPath")),1)]),_:1}),V(h(bn),{class:"workspace-rename-item",onClick:$i},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),Ue(" "+B(h(n)("sidebar.rename")),1)]),_:1}),V(h(bn),{danger:"",onClick:So},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"}),Ue(" "+B(h(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):ne("",!0)]),_:1}),V(ys,{name:"menu-pop"},{default:he(()=>[_i.value!==null&&Yi.value?(b(),fe(h(cl),{key:0,ref_key:"wsMenuRef",ref:Bs,class:"ws-menu",style:Vt(co.value),onClick:nt[27]||(nt[27]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{onClick:nt[24]||(nt[24]=Nt=>Dn(Yi.value))},{default:he(()=>[V(h(Ce),{name:"copy",size:"sm"}),Ue(" "+B(h(n)("sidebar.copyPath")),1)]),_:1}),V(h(bn),{class:"workspace-rename-item",onClick:nt[25]||(nt[25]=Nt=>Ln(Yi.value))},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),Ue(" "+B(h(n)("sidebar.rename")),1)]),_:1}),V(h(bn),{danger:"",onClick:nt[26]||(nt[26]=Nt=>ws(Yi.value))},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"}),Ue(" "+B(h(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):ne("",!0)]),_:1}),V(ys,{name:"menu-pop"},{default:he(()=>[ie.value?(b(),fe(h(cl),{key:0,ref_key:"viewMenuRef",ref:ce,class:"view-menu",style:Vt(xe.value),onClick:nt[32]||(nt[32]=It(()=>{},["stop"]))},{default:he(()=>[C("div",Awe,B(h(n)("sidebar.viewGroup")),1),V(h(bn),{onClick:nt[28]||(nt[28]=Nt=>ye("flat"))},{default:he(()=>[V(h(Ce),{name:"list",size:"sm"}),Ue(" "+B(h(n)("sidebar.viewFlat"))+" ",1),C("span",Cwe,[ee.value==="flat"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)])]),_:1}),V(h(bn),{onClick:nt[29]||(nt[29]=Nt=>ye("grouped"))},{default:he(()=>[V(h(Ce),{name:"tree-view",size:"sm"}),Ue(" "+B(h(n)("sidebar.viewGrouped"))+" ",1),C("span",wwe,[ee.value==="grouped"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)])]),_:1}),ee.value==="grouped"?(b(),I(Be,{key:0},[C("div",xwe,B(h(n)("sidebar.sortGroup")),1),V(h(bn),{onClick:nt[30]||(nt[30]=Nt=>j("manual"))},{default:he(()=>[V(h(Ce),{name:"grip",size:"sm"}),Ue(" "+B(h(n)("sidebar.sortManual"))+" ",1),C("span",_we,[e.workspaceSortMode==="manual"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)])]),_:1}),V(h(bn),{onClick:nt[31]||(nt[31]=Nt=>j("recent"))},{default:he(()=>[V(h(Ce),{name:"clock",size:"sm"}),Ue(" "+B(h(n)("sidebar.sortRecent"))+" ",1),C("span",Swe,[e.workspaceSortMode==="recent"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)])]),_:1})],64)):ne("",!0)]),_:1},8,["style"])):ne("",!0)]),_:1}),o.value?(b(),fe(qse,{key:0,sessions:e.sessions,workspaces:Le.value,"active-id":e.activeId,onSelect:Ie,onSelectWorkspace:gt,onClose:nt[33]||(nt[33]=Nt=>o.value=!1)},null,8,["sessions","workspaces","active-id"])):ne("",!0),(b(),fe(Wr,{to:"body"},[jo.value?(b(),fe(h(ur),{key:0,onClose:nt[34]||(nt[34]=Nt=>jo.value=!1)})):ne("",!0)]))],6))}}),Twe=vt(Ewe,[["__scopeId","data-v-fb698df7"]]),Lwe=["aria-label"],Nwe=tt({__name:"ResizeHandle",props:{storageKey:{},defaultWidth:{},min:{},max:{},reverse:{type:Boolean},ariaLabel:{},applyLive:{}},emits:["update:width","update:dragging"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),{width:o,dragging:r,cursor:l,onPointerDown:a}=rve({storageKey:n.storageKey,defaultWidth:n.defaultWidth,min:n.min,max:()=>n.max,reverse:n.reverse,applyLive:n.applyLive});return i("update:width",o.value),Qe(o,u=>i("update:width",u)),Qe(r,u=>i("update:dragging",u)),(u,c)=>(b(),I("div",{class:De(["rh",{dragging:h(r)}]),style:Vt({cursor:h(l)}),role:"separator","aria-orientation":"vertical","aria-label":e.ariaLabel??h(s)("layout.resizeHandleAria"),onPointerdown:c[0]||(c[0]=(...d)=>h(a)&&h(a)(...d))},[...c[1]||(c[1]=[C("span",{class:"rh-bar","aria-hidden":"true"},null,-1)])],46,Lwe))}}),GS=vt(Nwe,[["__scopeId","data-v-1c6dfdc5"]]),Fwe={class:"op"},Bwe={key:0,class:"op-empty"},$we=tt({__name:"OutputPanel",props:{lines:{default:void 0},emptyText:{default:""}},setup(e){const t=e,n=F(()=>t.lines??[]);return(i,s)=>(b(),I("div",Fwe,[n.value.length===0&&e.emptyText?(b(),I("div",Bwe,B(e.emptyText),1)):ne("",!0),(b(!0),I(Be,null,yt(n.value,(o,r)=>(b(),I("div",{key:r},B(o),1))),128))]))}}),Ir=vt($we,[["__scopeId","data-v-ab413c67"]]),Dwe=["disabled","aria-label","aria-expanded"],Rwe={class:"lead","aria-hidden":"true"},zwe={class:"main"},Owe={class:"task"},Pwe={key:0,class:"type"},jwe={class:"tail"},Hwe=["aria-label"],Wwe=["aria-expanded"],qwe=tt({__name:"AgentTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openAgent"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(v){if(!v)return{};try{const x=JSON.parse(v);return{description:typeof x.description=="string"?x.description:void 0,subagentType:typeof x.subagent_type=="string"?x.subagent_type:void 0}}catch{return{}}}const r=F(()=>o(i.tool.arg)),l=F(()=>i.tool.status),a=F(()=>r.value.description||r.value.subagentType||Zf(i.tool.name)),u=F(()=>r.value.description?r.value.subagentType:""),c=an("resolveAgentTaskId"),d=an("resolveAgentModel"),f=F(()=>i.tool.agentId??c?.(i.tool.id)),p=F(()=>f.value!==void 0),g=F(()=>d?.(i.tool.id,f.value)),m=F(()=>[u.value,g.value?.display,g.value?.effort].filter(v=>v).join(" · ")),y=F(()=>!!i.tool.output&&i.tool.output.length>0),w=F(()=>p.value||y.value),k=Z(!1);function A(){if(f.value!==void 0){s("openAgent",f.value);return}y.value&&(k.value=!k.value)}return(v,x)=>(b(),I("div",{class:De(["agent-card",{err:l.value==="error"}])},[C("button",{class:"head",type:"button",disabled:!w.value,"aria-label":p.value?h(n)("tasks.openDetail"):void 0,"aria-expanded":p.value?void 0:k.value,onClick:A},[C("span",Rwe,[V(h(Ce),{name:"robot",size:"sm"})]),C("span",zwe,[C("span",Owe,B(a.value),1),m.value?(b(),I("span",Pwe,B(m.value),1)):ne("",!0)]),C("span",jwe,[C("span",{class:De(["st",l.value]),role:"status","aria-label":l.value},[l.value==="ok"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):l.value==="error"?(b(),fe(h(Ce),{key:1,name:"close",size:"sm"})):(b(),fe(h(hl),{key:2,status:"running"}))],10,Hwe),p.value?(b(),fe(h(Ce),{key:0,class:"go",name:"arrow-right",size:"sm","aria-hidden":"true"})):y.value?(b(),fe(h(Ce),{key:1,class:De(["go car",{open:k.value}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"])):ne("",!0)])],8,Dwe),p.value&&y.value?(b(),I("button",{key:0,class:"saved-result",type:"button","aria-expanded":k.value,onClick:x[0]||(x[0]=E=>k.value=!k.value)},[V(h(Ce),{class:De(["saved-result__chevron",{open:k.value}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"]),C("span",null,B(h(n)("tools.output.saved")),1)],8,Wwe)):ne("",!0),y.value&&k.value?(b(),I("div",{key:1,class:De(["result",{"result--legacy":!p.value}])},[V(Ir,{lines:e.tool.output},null,8,["lines"])],2)):ne("",!0)],2))}}),Uwe=vt(qwe,[["__scopeId","data-v-5bbb3a70"]]);function Kwe(e){if(!e)return[];try{const n=JSON.parse(e).questions;if(!Array.isArray(n))return[];const i=[];for(const s of n){if(!s||typeof s!="object")continue;const o=s,r=Array.isArray(o.options)?o.options.map(l=>{const a=l&&typeof l=="object"?l:{};return{label:typeof a.label=="string"?a.label:"",description:typeof a.description=="string"?a.description:""}}):[];i.push({question:typeof o.question=="string"?o.question:"",header:typeof o.header=="string"?o.header:"",options:r,multiSelect:o.multi_select===!0})}return i}catch{return[]}}const pg={recognized:!1,answers:{},note:""};function Vwe(e){const t=e?.[0];if(!t)return pg;let n;try{n=JSON.parse(t)}catch{return pg}if(!n||typeof n!="object"||Array.isArray(n))return pg;const i=n.answers;if(!i||typeof i!="object"||Array.isArray(i))return pg;const s={};for(const[o,r]of Object.entries(i))typeof r=="string"?s[o]=r:r===!0&&(s[o]=!0);return{recognized:!0,answers:s,note:typeof n.note=="string"?n.note:""}}function Zwe(e,t,n){return e[t]??e[`q_${n}`]}const Gwe=/^opt_\d+_(\d+)$/;function Qwe(e,t=[]){if(e===void 0)return{selected:new Set,otherText:"",indeterminate:!1};if(e===!0)return{selected:new Set,otherText:"",indeterminate:!0};const n=new Map;t.forEach((r,l)=>{r.label.length>0&&!n.has(r.label)&&n.set(r.label,l)});const i=n.get(e);if(i!==void 0)return{selected:new Set([i]),otherText:"",indeterminate:!1};const s=new Set,o=[];for(const r of e.split(",")){const l=r.trim(),a=n.get(l);if(a!==void 0){s.add(a);continue}const u=Gwe.exec(l);u?s.add(Number(u[1])):l.length>0&&o.push(l)}return{selected:s,otherText:o.join(", "),indeterminate:!1}}const Ywe={class:"tl-ic","aria-hidden":"true"},Jwe={class:"tl-main"},Xwe=["aria-expanded","aria-label"],exe={class:"tl-tail"},txe=["aria-label"],nxe=["inert"],ixe={class:"tl-body-inner"},sxe=tt({__name:"ToolDisclosure",props:{status:{},open:{type:Boolean,default:!1},expandable:{type:Boolean,default:!1}},emits:["toggle"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=an("pinScroll",()=>{}),r=Z(null);function l(){if(!n.expandable)return;i("toggle");const u=r.value;u&&kt(()=>o(u))}const a=F(()=>n.open?s("tools.disclosure.collapse"):s("tools.disclosure.expand"));return(u,c)=>(b(),I("div",{class:De(["tool-line",{open:e.open,expandable:e.expandable,err:e.status==="error"}])},[C("div",{ref_key:"headEl",ref:r,class:De(["tl-head",{clickable:e.expandable}]),onClick:l},[C("span",Ywe,[En(u.$slots,"leading")]),C("span",Jwe,[En(u.$slots,"default"),V(h(gn),{text:a.value},{default:he(()=>[e.expandable?(b(),I("button",{key:0,class:"tl-car",type:"button","aria-expanded":e.open,"aria-label":a.value,onClick:It(l,["stop"])},[V(h(Ce),{class:"tl-car-ic",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,Xwe)):ne("",!0)]),_:1},8,["text"])]),C("span",exe,[En(u.$slots,"trailing"),C("span",{class:De(["tl-status",e.status]),role:"status","aria-label":e.status},[e.status==="ok"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):e.status==="error"?(b(),fe(h(Ce),{key:1,name:"close",size:"sm"})):e.status==="suspended"?(b(),fe(h(hl),{key:2,status:"suspended"})):(b(),fe(h(hl),{key:3,status:"running"}))],10,txe)])],2),e.expandable?(b(),I("div",{key:0,class:De(["tl-body",{open:e.open}]),inert:!e.open},[C("div",ixe,[En(u.$slots,"body")])],10,nxe)):ne("",!0)],2))}}),kl=vt(sxe,[["__scopeId","data-v-58658159"]]),oxe={key:0,class:"rc-flat"},rxe={class:"rc-head"},lxe={class:"rc-st"},axe={class:"rc-qtext"},uxe={class:"rc-lb"},cxe={key:0,class:"rc-opt"},dxe={class:"rc-lb"},fxe={class:"rc-ds"},hxe={key:1,class:"rc-opt"},pxe={class:"rc-lb"},gxe={key:2,class:"rc-qskip"},mxe={class:"tl-name"},vxe={key:0,class:"tl-dim"},yxe={key:0,class:"tl-chip"},bxe=80,kxe=tt({__name:"AskUserTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile"],setup(e){const t=e,{t:n}=Bt();function i(S,M=bxe){const _=S.trim();return _.length>M?_.slice(0,M-1)+"…":_}const s=F(()=>Kwe(t.tool.arg)),o=F(()=>Vwe(t.tool.output)),r=F(()=>o.value.recognized),l=F(()=>r.value&&Object.keys(o.value.answers).length===0&&o.value.note.length>0),a=F(()=>s.value.map((S,M)=>Qwe(Zwe(o.value.answers,S.question,M),S.options))),u=F(()=>Object.keys(o.value.answers).length);function c(S,M){return a.value[S]?.selected.has(M)??!1}function d(S){return a.value[S]?.otherText??""}function f(S){return a.value[S]?.indeterminate??!1}const p=F(()=>t.tool.status),g=F(()=>s.value.map((S,M)=>({q:S,selected:S.options.map((_,N)=>({o:_,oi:N})).filter(({oi:_})=>c(M,_))}))),m=F(()=>s.value.length===1?n("tools.ask.question",{count:1}):n("tools.ask.questions",{count:s.value.length})),y=F(()=>{const S=s.value[0]?.question??"",M=n("tools.ask.unanswered");return S?`${S} —— ${M}`:M}),w=F(()=>{if(!r.value)return i(t.tool.output?.[0]??"");if(l.value)return n("tools.ask.dismissed");const S=s.value[0]?.question??"",M=i(S);return s.value.length<=1?M:`${M} ${n("tools.ask.more",{count:s.value.length-1})}`}),k=F(()=>r.value?l.value?n("tools.ask.dismissed"):u.value===0?"":u.value===1?n("tools.ask.answer",{count:1}):n("tools.ask.answers",{count:u.value}):""),A=F(()=>!!t.tool.output&&t.tool.output.length>0),v=F(()=>r.value&&(s.value.length>0||l.value)||A.value),x=Z(t.tool.defaultExpanded===!0&&v.value),E=F(()=>Zf(t.tool.name));return Qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&v.value&&(x.value=!0)}),(S,M)=>r.value&&p.value==="ok"?(b(),I("div",{key:0,class:De(["ask-receipt",{flat:l.value||u.value===0}])},[l.value||u.value===0?(b(),I("span",oxe,B(y.value),1)):(b(),I(Be,{key:1},[C("div",rxe,[C("span",null,B(h(n)("tools.ask.collected"))+" · "+B(m.value),1),C("span",lxe,[V(h(Ce),{name:"check",size:"sm"})])]),(b(!0),I(Be,null,yt(g.value,(_,N)=>(b(),I("div",{key:N,class:"rc-q"},[C("div",axe,[C("span",null,B(_.q.question),1)]),(b(!0),I(Be,null,yt(_.selected,D=>(b(),I("div",{key:D.oi,class:"rc-opt"},[C("span",{class:De(["rc-g on",_.q.multiSelect?"chk":"rad"])},null,2),C("span",uxe,B(D.o.label),1)]))),128)),d(N)?(b(),I("div",cxe,[C("span",{class:De(["rc-g on",_.q.multiSelect?"chk":"rad"])},null,2),C("span",dxe,B(d(N)),1),C("span",fxe,B(h(n)("tools.ask.freeInput")),1)])):ne("",!0),f(N)?(b(),I("div",hxe,[M[1]||(M[1]=C("span",{class:"rc-g rad on"},null,-1)),C("span",pxe,B(h(n)("tools.ask.answered")),1)])):ne("",!0),_.selected.length===0&&!d(N)&&!f(N)?(b(),I("div",gxe,B(h(n)("tools.ask.unanswered")),1)):ne("",!0)]))),128))],64))],2)):(b(),fe(kl,{key:1,status:p.value,open:x.value,expandable:v.value,onToggle:M[0]||(M[0]=_=>x.value=!x.value)},{leading:he(()=>[V(h(Ce),{name:"help-circle",size:"sm"})]),trailing:he(()=>[k.value?(b(),I("span",yxe,B(k.value),1)):ne("",!0)]),body:he(()=>[V(Ir,{lines:e.tool.output},null,8,["lines"])]),default:he(()=>[C("span",mxe,B(E.value),1),w.value?(b(),I("span",vxe,B(w.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),Axe=vt(kxe,[["__scopeId","data-v-f29eda04"]]);function qu(e){const t=(e??"").trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function ei(e){return typeof e=="string"&&e.length>0?e:void 0}function Xa(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function rD(e){if(e)return ei(e.path)??ei(e.file_path)??ei(e.filePath)??ei(e.filename)}function lD(e){return/^(.*)[\\/][^\\/]+[\\/]?$/.exec(e)?.[1]??""}function Cxe(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean)[0];return n?`${t.host}/${n}`:t.host}catch{return e.replace(/^https?:\/\//,"")}}const wxe={class:"tl-name"},xxe={class:"tl-mono"},_xe={key:0,class:"tl-chip"},Sxe={class:"cmd-echo"},Mxe=tt({__name:"BashTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>{const u=qu(t.tool.arg);return(ei(u?.command)??ei(u?.cmd)??ei(u?.script)??t.tool.arg.replace(/^·\s*/,"")).trim()}),o=F(()=>t.tool.status==="running"),r=F(()=>!!t.tool.output&&t.tool.output.length>0),l=F(()=>r.value||o.value||s.value.length>0),a=Z(t.tool.defaultExpanded===!0&&l.value);return Qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&l.value&&(a.value=!0)}),(u,c)=>(b(),fe(kl,{status:i.value,open:a.value,expandable:l.value,onToggle:c[0]||(c[0]=d=>a.value=!a.value)},{leading:he(()=>[V(h(Ce),{name:"terminal",size:"sm"})]),trailing:he(()=>[e.tool.timing?(b(),I("span",_xe,B(e.tool.timing),1)):ne("",!0)]),body:he(()=>[C("div",Sxe,B(s.value),1),V(Ir,{lines:e.tool.output,"empty-text":o.value?h(n)("tools.output.waiting"):h(n)("tools.output.empty")},null,8,["lines","empty-text"])]),default:he(()=>[C("span",wxe,B(h(n)("tools.label.bash")),1),C("span",xxe,B(s.value),1)]),_:1},8,["status","open","expandable"]))}}),Ixe=vt(Mxe,[["__scopeId","data-v-8869dd42"]]),Exe={class:"hl-body"},Txe={key:0,class:"hl-gutter"},Lxe={key:1,class:"hl-gutter new"},Nxe={class:"hl-sign"},Fxe={class:"hl-text"},Bxe=["data-line"],$xe={key:0,class:"hl-gutter"},Dxe={class:"hl-text"},Rxe=200,zxe=tt({__name:"HighlightedCode",props:{code:{default:void 0},lines:{default:void 0},path:{default:void 0},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{type:Function,default:void 0}},setup(e){const t=e,n=rv(),i=F(()=>Nee(t.path)),s=F(()=>t.lines!==void 0),o=F(()=>t.lineNumbers===!0&&s.value),r=F(()=>(t.lines??[]).some($=>$.oldNo!==void 0)),l=F(()=>(t.lines??[]).some($=>$.newNo!==void 0)),a=F(()=>Array.isArray(t.lineNumbers)?t.lineNumbers:null),u=F(()=>Array.isArray(t.code)?t.code:Ul(t.code??"")),c=F(()=>{const $=t.lines;return $?t.fullTexts?t.fullTexts:{before:$.filter(P=>P.oldNo!==void 0).map(P=>P.text).join(` -`),after:$.filter(P=>P.newNo!==void 0).map(P=>P.text).join(` -`)}:null}),d=Z(null),f=Z(null),p=Z(null);function g(){d.value=null,f.value=null,p.value=null}let m=null,y=0,w=0;async function k(){const $=++w;y=Date.now();const P=i.value;if(!P){$===w&&g();return}try{const{codeToTokens:O}=await ns(async()=>{const{codeToTokens:z}=await import("./index-DcbRorFd.js").then(G=>G.i);return{codeToTokens:z}},[]),R=n.value?"github-dark":"github-light",W=c.value;if(W){const[z,G]=await Promise.all([W.before?O(W.before,{lang:P,theme:R}):Promise.resolve(null),W.after?O(W.after,{lang:P,theme:R}):Promise.resolve(null)]);if($!==w)return;f.value=z?.tokens??null,p.value=G?.tokens??null}else{const z=u.value.length>0?await O(u.value.join(` -`),{lang:P,theme:R}):null;if($!==w)return;d.value=z?.tokens??null}}catch{$===w&&g()}}function A(){if(m!==null)return;const $=Math.max(0,Rxe-(Date.now()-y));m=setTimeout(()=>{m=null,k()},$)}const v=F(()=>u.value.join(` -`)),x=F(()=>c.value?.before??null),E=F(()=>c.value?.after??null);Qe([v,x,E],A),Qe([i,n,()=>t.fullTexts],()=>{w++,g(),A()}),pn(k),An(()=>{w++,m!==null&&clearTimeout(m),m=null});const S=F(()=>{let $=0;if(Array.isArray(t.lineNumbers))for(const P of t.lineNumbers)P>$&&($=P);else for(const P of t.lines??[])P.oldNo!==void 0&&P.oldNo>$&&($=P.oldNo),P.newNo!==void 0&&P.newNo>$&&($=P.newNo);return Math.max(4,String($).length)});function M($){if($.type==="del"){if($.oldNo===void 0)return null;const O=t.fullTexts?$.oldNo-1:_.value.get($.oldNo);return O===void 0?null:f.value?.[O]??null}if($.newNo===void 0)return null;const P=t.fullTexts?$.newNo-1:N.value.get($.newNo);return P===void 0?null:p.value?.[P]??null}const _=F(()=>{const $=new Map;let P=0;for(const O of t.lines??[])O.oldNo!==void 0&&$.set(O.oldNo,P++);return $}),N=F(()=>{const $=new Map;let P=0;for(const O of t.lines??[])O.newNo!==void 0&&$.set(O.newNo,P++);return $});function D($){const P={};$.color&&(P.color=$.color);const O=$.fontStyle??0;return O&1&&(P.fontStyle="italic"),O&2&&(P.fontWeight="var(--weight-semibold)"),O&4&&(P.textDecoration="underline"),P}function T($){return $.type==="add"?"+":$.type==="del"?"-":" "}return($,P)=>(b(),I("div",{class:De(["hl-code",{gutter:o.value,"plain-pad":!s.value&&!a.value,framed:e.framed}]),style:Vt({"--gutter-ch":`${S.value}ch`})},[C("div",Exe,[s.value?(b(!0),I(Be,{key:0},yt(e.lines??[],(O,R)=>(b(),I("div",{key:R,class:De(["hl-row",`row-${O.type}`])},[o.value?(b(),I(Be,{key:0},[r.value?(b(),I("span",Txe,B(O.oldNo??""),1)):ne("",!0),l.value?(b(),I("span",Lxe,B(O.newNo??""),1)):ne("",!0)],64)):ne("",!0),C("span",Nxe,B(T(O)),1),C("span",Fxe,[M(O)?(b(!0),I(Be,{key:0},yt(M(O)??[],(W,z)=>(b(),I("span",{key:z,style:Vt(D(W))},B(W.content),5))),128)):(b(),I(Be,{key:1},[Ue(B(O.text),1)],64))])],2))),128)):(b(!0),I(Be,{key:1},yt(u.value,(O,R)=>(b(),I("div",{key:R,class:De(["hl-row",e.lineClass?.(a.value?.[R]??-1)]),"data-line":a.value?.[R]},[a.value?(b(),I("span",$xe,B(a.value[R]??""),1)):ne("",!0),C("span",Dxe,[d.value?.[R]?(b(!0),I(Be,{key:0},yt(d.value[R]??[],(W,z)=>(b(),I("span",{key:z,style:Vt(D(W))},B(W.content),5))),128)):(b(),I(Be,{key:1},[Ue(B(O),1)],64))])],10,Bxe))),128))])],6))}}),al=vt(zxe,[["__scopeId","data-v-6735e4da"]]),Oxe={class:"tl-name"},Pxe={key:1,class:"tl-dim"},jxe={key:2,class:"tl-faint"},Hxe={key:0,class:"tl-add"},Wxe={key:1,class:"tl-del"},qxe={class:"diffbar","aria-hidden":"true"},Uxe={key:1,class:"tl-chip"},Kxe=tt({__name:"EditTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>ao(n.tool.name)==="write"),l=F(()=>rD(qu(n.tool.arg))??""),a=F(()=>l.value?qf(l.value):""),u=F(()=>l.value?lD(l.value):""),c=F(()=>KT(n.tool)),d=F(()=>fee(n.tool)),f=F(()=>{const x=c.value;return!x||n.tool.status==="error"?{added:0,removed:0}:jT(x)}),p=F(()=>f.value.added>0||f.value.removed>0),g=F(()=>!!n.tool.output&&n.tool.output.length>0),m=F(()=>c.value!==null&&n.tool.status!=="error"),y=F(()=>d.value!==null&&n.tool.status!=="error"),w=F(()=>m.value||y.value||g.value),k=Z(!1),A=Z(k.value);Qe(k,x=>{x&&(A.value=!0)});function v(){l.value&&i("openFile",{path:l.value})}return(x,E)=>(b(),fe(kl,{status:o.value,open:k.value,expandable:w.value,onToggle:E[0]||(E[0]=S=>k.value=!k.value)},{leading:he(()=>[V(h(Ce),{name:r.value?"file-plus":"pencil",size:"sm"},null,8,["name"])]),trailing:he(()=>[p.value?(b(),I(Be,{key:0},[f.value.added>0?(b(),I("span",Hxe,"+"+B(f.value.added),1)):ne("",!0),f.value.removed>0?(b(),I("span",Wxe,"−"+B(f.value.removed),1)):ne("",!0),C("span",qxe,[C("span",{class:"seg-add",style:Vt({flexGrow:f.value.added})},null,4),C("span",{class:"seg-del",style:Vt({flexGrow:f.value.removed})},null,4)])],64)):r.value&&o.value==="ok"?(b(),I("span",Uxe,B(h(s)("tools.chip.created")),1)):ne("",!0)]),body:he(()=>[m.value&&A.value?(b(),fe(al,{key:0,lines:c.value??[],path:l.value},null,8,["lines","path"])):y.value&&A.value?(b(),fe(al,{key:1,code:d.value?.content??"",path:d.value?.path},null,8,["code","path"])):(b(),fe(Ir,{key:2,lines:e.tool.output,"empty-text":h(s)("tools.output.waiting")},null,8,["lines","empty-text"]))]),default:he(()=>[C("span",Oxe,B(r.value?h(s)("tools.label.write"):h(s)("tools.label.edit")),1),a.value?(b(),I("button",{key:0,class:"tl-file",type:"button",onClick:It(v,["stop"])},B(a.value),1)):(b(),I("span",Pxe,B(l.value||e.tool.arg),1)),u.value?(b(),I("span",jxe,B(u.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),Vxe=vt(Kxe,[["__scopeId","data-v-bbf61950"]]),Zxe=["innerHTML"],Gxe={class:"tl-name"},Qxe={key:0,class:"tl-dim"},Yxe={key:0,class:"tl-chip"},Jxe={key:1,class:"tl-chip"},Xxe={key:0,class:"arg-full"},e_e=tt({__name:"GenericTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile"],setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>Zf(t.tool.name)),o=F(()=>c$(t.tool.name)),r=F(()=>LS(t.tool.name,t.tool.arg)),l=F(()=>LS(t.tool.name,t.tool.arg,!0)),a=F(()=>ike({name:t.tool.name,arg:t.tool.arg,output:t.tool.output,timing:t.tool.timing,status:t.tool.status})),u=F(()=>!!t.tool.output&&t.tool.output.length>0),c=F(()=>u.value||!!l.value&&l.value!==r.value),d=Z(t.tool.defaultExpanded===!0&&c.value);return Qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status,t.tool.name],()=>{t.tool.defaultExpanded===!0&&c.value&&(d.value=!0)}),(f,p)=>(b(),fe(kl,{status:i.value,open:d.value,expandable:c.value,onToggle:p[0]||(p[0]=g=>d.value=!d.value)},{leading:he(()=>[C("span",{class:"gl",innerHTML:o.value},null,8,Zxe)]),trailing:he(()=>[a.value?(b(),I("span",Yxe,B(a.value),1)):e.tool.timing?(b(),I("span",Jxe,B(e.tool.timing),1)):ne("",!0)]),body:he(()=>[l.value&&l.value!==r.value?(b(),I("div",Xxe,B(l.value),1)):ne("",!0),V(Ir,{lines:e.tool.output,"empty-text":i.value==="running"?h(n)("tools.output.waiting"):h(n)("tools.output.empty")},null,8,["lines","empty-text"])]),default:he(()=>[C("span",Gxe,B(s.value),1),r.value?(b(),I("span",Qxe,B(r.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),t_e=vt(e_e,[["__scopeId","data-v-b12a8498"]]),n_e={class:"tl-name"},i_e={key:0,class:"tl-mono"},s_e={key:1,class:"tl-mono"},o_e={key:2,class:"tl-dim"},r_e={key:3,class:"tl-faint"},l_e={key:0,class:"tl-chip"},a_e={key:0,class:"file-list"},u_e=["onClick"],c_e=tt({__name:"GlobTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>ao(n.tool.name)==="glob"),l=F(()=>qu(n.tool.arg)),a=F(()=>{const m=l.value;return ei(m?.pattern)??ei(m?.glob)??ei(m?.query)??""}),u=F(()=>{const m=l.value;return ei(m?.path)??ei(m?.dir)??ei(m?.directory)??ei(m?.cwd)??""}),c=F(()=>(n.tool.output??[]).filter(m=>m.trim().length>0)),d=F(()=>c.value.length>0),f=F(()=>d.value),p=Z(n.tool.defaultExpanded===!0&&f.value);Qe(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&f.value&&(p.value=!0)});function g(m){const y=m.trim();y&&i("openFile",{path:y})}return(m,y)=>(b(),fe(kl,{status:o.value,open:p.value,expandable:f.value,onToggle:y[0]||(y[0]=w=>p.value=!p.value)},{leading:he(()=>[V(h(Ce),{name:r.value?"tree-view":"list",size:"sm"},null,8,["name"])]),trailing:he(()=>[r.value&&c.value.length>0?(b(),I("span",l_e,B(h(s)("tools.chip.files",{count:c.value.length})),1)):ne("",!0)]),body:he(()=>[r.value?(b(),I("div",a_e,[(b(!0),I(Be,null,yt(c.value,(w,k)=>(b(),I("button",{key:k,class:"file-row",type:"button",onClick:A=>g(w)},B(w),9,u_e))),128))])):(b(),fe(Ir,{key:1,lines:e.tool.output},null,8,["lines"]))]),default:he(()=>[C("span",n_e,B(h(s)(r.value?"tools.label.glob":"tools.label.ls")),1),r.value&&a.value?(b(),I("span",i_e,B(a.value),1)):!r.value&&u.value?(b(),I("span",s_e,B(u.value),1)):(b(),I("span",o_e,B(e.tool.arg),1)),r.value&&u.value?(b(),I("span",r_e,B(u.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),d_e=vt(c_e,[["__scopeId","data-v-3936099e"]]),f_e={class:"tl-name"},h_e={key:0,class:"tl-dim"},p_e={key:1,class:"tl-pill pill-active"},g_e={key:0,class:"goal-block"},m_e={class:"goal-text"},v_e={key:0,class:"goal-criterion"},y_e=tt({__name:"GoalTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>ao(t.tool.name)),o=F(()=>qu(t.tool.arg)),r=F(()=>ei(o.value?.objective)??""),l=F(()=>ei(o.value?.completionCriterion)??ei(o.value?.completion_criterion)??""),a={active:"status.goalStatusActive",blocked:"status.goalStatusBlocked",complete:"status.goalStatusComplete"},u=F(()=>ei(o.value?.status)??""),c=F(()=>{const k=a[u.value];return k?n(k):u.value}),d=F(()=>{switch(u.value){case"complete":return"pill-done";case"blocked":return"pill-blocked";default:return"pill-active"}}),f=F(()=>{const k=Xa(o.value?.value),A=ei(o.value?.unit);return k===void 0||!A?"":["turns","tokens","milliseconds","seconds","minutes","hours"].includes(A)?n(`tools.goal.${A}`,{value:k}):n("tools.goal.budget",{value:k,unit:A})}),p=F(()=>{switch(s.value){case"creategoal":return r.value;case"updategoal":return c.value;case"setgoalbudget":return f.value;default:return""}}),g=F(()=>!!t.tool.output&&t.tool.output.length>0),m=F(()=>!!l.value||s.value==="creategoal"&&g.value),y=F(()=>m.value||g.value),w=Z(t.tool.defaultExpanded===!0&&y.value);return Qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&y.value&&(w.value=!0)}),(k,A)=>(b(),fe(kl,{status:i.value,open:w.value,expandable:y.value,onToggle:A[0]||(A[0]=v=>w.value=!w.value)},{leading:he(()=>[V(h(Ce),{name:"target",size:"sm"})]),trailing:he(()=>[s.value==="updategoal"&&c.value?(b(),I("span",{key:0,class:De(["tl-pill",d.value])},B(c.value),3)):s.value==="creategoal"?(b(),I("span",p_e,B(h(n)("status.goalStatusActive")),1)):ne("",!0)]),body:he(()=>[r.value?(b(),I("div",g_e,[C("div",m_e,B(r.value),1),l.value?(b(),I("div",v_e,B(l.value),1)):ne("",!0)])):ne("",!0),g.value?(b(),fe(Ir,{key:1,lines:e.tool.output},null,8,["lines"])):ne("",!0)]),default:he(()=>[C("span",f_e,B(h(Zf)(e.tool.name)),1),p.value?(b(),I("span",h_e,B(p.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),b_e=vt(y_e,[["__scopeId","data-v-862274de"]]),k_e={class:"tl-name"},A_e={key:0,class:"tl-mono"},C_e={key:1,class:"tl-dim"},w_e={key:2,class:"tl-faint"},x_e={key:0,class:"tl-chip"},__e={key:0,class:"match-list"},S_e=["onClick"],M_e={key:0,class:"mref"},I_e={class:"mtext"},E_e=tt({__name:"GrepTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>ao(n.tool.name)==="grep"),l=F(()=>qu(n.tool.arg)),a=F(()=>{const y=l.value;return ei(y?.pattern)??ei(y?.query)??ei(y?.regex)??""}),u=F(()=>{const y=l.value;return ei(y?.path)??ei(y?.glob)??ei(y?.include)??""}),c=F(()=>(n.tool.output??[]).filter(y=>y.trim().length>0).map(y=>{const w=/^(.+?):(\d+)[:-](.*)$/.exec(y);return w?{path:w[1],line:Number(w[2]),text:(w[3]??"").trim()}:{text:y}})),d=F(()=>c.value.length),f=F(()=>d.value>0),p=F(()=>f.value),g=Z(n.tool.defaultExpanded===!0&&p.value);Qe(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&p.value&&(g.value=!0)});function m(y){y.path&&i("openFile",{path:y.path,line:y.line})}return(y,w)=>(b(),fe(kl,{status:o.value,open:g.value,expandable:p.value,onToggle:w[0]||(w[0]=k=>g.value=!g.value)},{leading:he(()=>[V(h(Ce),{name:"search",size:"sm"})]),trailing:he(()=>[d.value>0?(b(),I("span",x_e,B(h(s)("tools.chip.results",{count:d.value})),1)):ne("",!0)]),body:he(()=>[r.value?(b(),I("div",__e,[(b(!0),I(Be,null,yt(c.value,(k,A)=>(b(),I("button",{key:A,class:De(["match-row",{link:k.path}]),type:"button",onClick:v=>m(k)},[k.path?(b(),I("span",M_e,B(k.path)+":"+B(k.line),1)):ne("",!0),C("span",I_e,B(k.text),1)],10,S_e))),128))])):(b(),fe(Ir,{key:1,lines:e.tool.output},null,8,["lines"]))]),default:he(()=>[C("span",k_e,B(h(s)(r.value?"tools.label.grep":"tools.label.search")),1),a.value?(b(),I("span",A_e,B(a.value),1)):(b(),I("span",C_e,B(e.tool.arg),1)),u.value?(b(),I("span",w_e,B(u.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),T_e=vt(E_e,[["__scopeId","data-v-899c1a48"]]),L_e=["src","controls","muted"],N_e=["src","alt"],F_e=tt({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=Z(t.fileId?"":t.url),i=Z(null),s=Z(!t.fileId);let o=null,r=0,l=!1,a=null;function u(){o!==null&&(URL.revokeObjectURL(o),o=null)}async function c(){const d=++r;if(u(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=await Pt().getFileBlob(t.fileId),p=URL.createObjectURL(f);if(l||d!==r){URL.revokeObjectURL(p);return}o=p,n.value=o}catch{if(l||d!==r)return;n.value=t.url}}return Qe(()=>[t.fileId,t.url,s.value],c,{immediate:!0}),pn(()=>{typeof IntersectionObserver=="function"&&i.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(i.value)):s.value=!0}),Gn(()=>{l=!0,a?.disconnect(),a=null,u()}),(d,f)=>e.kind==="video"?(b(),I("video",{key:0,ref_key:"mediaEl",ref:i,class:De(e.mediaClass),src:n.value||void 0,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,L_e)):(b(),I("img",{key:1,ref_key:"mediaEl",ref:i,class:De([e.mediaClass,{"is-resolving":!n.value}]),src:n.value||void 0,alt:e.alt||"",loading:"lazy"},null,10,N_e))}}),Op=vt(F_e,[["__scopeId","data-v-0826404b"]]),B_e={class:"media-title"},$_e=["src","alt"],D_e=["aria-label"],R_e={key:0,class:"media-video-tile","aria-hidden":"true"},z_e={class:"media-play-badge","aria-hidden":"true"},O_e=["src"],P_e=tt({__name:"MediaTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia"],setup(e,{emit:t}){const n=e,i=t,s=F(()=>n.tool.status==="ok"?n.tool.media:void 0);function o(d){return d.split(/[\\/]+/).pop()||d}function r(d){return d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/1024/1024).toFixed(1)} MB`}const l=F(()=>{const d=s.value;if(!d)return"";const f=[d.path?o(d.path):n.tool.name];return d.mimeType&&f.push(d.mimeType),d.bytes!==void 0&&f.push(r(d.bytes)),d.dimensions&&f.push(d.dimensions),f.join(" · ")}),a=F(()=>s.value?.url.startsWith("blob:")??!1),u=F(()=>{const d=s.value;return d?.kind==="video"&&d.fileId!==void 0&&!a.value});function c(d){const f=s.value;if(f?.kind!=="image"&&f?.kind!=="video")return;const p=f.kind==="image"?d.currentTarget.querySelector("img"):null;i("openMedia",{media:f,originImg:p})}return(d,f)=>s.value?(b(),I("div",{key:0,class:De(["media-tool",{mob:e.mobile}])},[V(h(gn),{text:s.value.path||l.value},{default:he(()=>[C("div",B_e,B(l.value),1)]),_:1},8,["text"]),s.value.kind==="image"?(b(),fe(h(gn),{key:0,text:s.value.path||l.value},{default:he(()=>[C("button",{type:"button",class:"media-image-button",onClick:c},[C("img",{class:"media-image",src:s.value.url,alt:s.value.path?o(s.value.path):l.value,loading:"lazy"},null,8,$_e)])]),_:1},8,["text"])):s.value.kind==="video"?(b(),fe(h(gn),{key:1,text:s.value.path||l.value},{default:he(()=>[C("button",{type:"button",class:"media-image-button media-video-button","aria-label":s.value.path?o(s.value.path):l.value,onClick:c},[u.value?(b(),I("span",R_e)):(b(),fe(Op,{key:1,url:s.value.url,kind:"video","file-id":a.value?void 0:s.value.fileId,"media-class":"media-video",controls:!1,muted:""},null,8,["url","file-id"])),C("span",z_e,[V(h(Ce),{name:"play",size:"sm"})])],8,D_e)]),_:1},8,["text"])):(b(),I("audio",{key:2,class:"media-audio",src:s.value.url,controls:""},null,8,O_e))],2)):ne("",!0)}}),j_e=vt(P_e,[["__scopeId","data-v-3bc3ee1a"]]),H_e=["innerHTML"],W_e={class:"tl-name"},q_e={key:0,class:"tl-faint"},U_e={key:0,class:"tl-chip"},K_e=["title"],V_e={key:1,class:"plan-content"},Z_e={key:2,class:"plan-review"},G_e={key:0},Q_e={class:"review-label"},Y_e={key:1},J_e={class:"review-label"},X_e={class:"review-feedback"},eSe=tt({__name:"PlanTool",props:{tool:{},mobile:{type:Boolean}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(n.tool.defaultExpanded===!0),r=F(()=>n.tool.plan),l=F(()=>r.value?.path??n.tool.planPath),a=F(()=>r.value!==void 0||l.value!==void 0||(n.tool.output?.length??0)>0),u=F(()=>{const d=r.value?.review?.state;return d?s(`tools.plan.review.${d}`):void 0});function c(){l.value&&i("openFile",{path:l.value,content:r.value?.plan})}return(d,f)=>(b(),fe(kl,{status:e.tool.status,open:o.value,expandable:a.value,onToggle:f[0]||(f[0]=p=>o.value=!o.value)},{leading:he(()=>[C("span",{class:"plan-glyph",innerHTML:h(c$)(e.tool.name)},null,8,H_e)]),trailing:he(()=>[e.tool.timing?(b(),I("span",U_e,B(e.tool.timing),1)):ne("",!0)]),body:he(()=>[l.value?(b(),I("button",{key:0,type:"button",class:"plan-path",title:l.value,onClick:c},B(l.value),9,K_e)):ne("",!0),r.value?(b(),I("div",V_e,[V(h(Kl),{text:r.value.plan,"open-file":p=>i("openFile",p)},null,8,["text","open-file"])])):ne("",!0),r.value?.review?.selectedOption||r.value?.review?.feedback?(b(),I("div",Z_e,[r.value.review.selectedOption?(b(),I("div",G_e,[C("span",Q_e,B(h(s)("tools.plan.selectedOption")),1),C("span",null,B(r.value.review.selectedOption),1)])):ne("",!0),r.value.review.feedback?(b(),I("div",Y_e,[C("span",J_e,B(h(s)("tools.plan.feedback")),1),C("span",X_e,B(r.value.review.feedback),1)])):ne("",!0)])):ne("",!0),r.value?ne("",!0):(b(),fe(Ir,{key:3,lines:e.tool.output,"empty-text":h(s)("tools.output.empty")},null,8,["lines","empty-text"]))]),default:he(()=>[C("span",W_e,B(h(Zf)(e.tool.name)),1),u.value?(b(),I("span",q_e,B(u.value),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),tSe=vt(eSe,[["__scopeId","data-v-8dff80a1"]]),nSe={class:"tl-name"},iSe={key:1,class:"tl-faint"},sSe={key:2,class:"tl-faint"},oSe={key:3,class:"tl-dim"},rSe={key:0,class:"tl-chip"},lSe=tt({__name:"ReadTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.tool.status),r=F(()=>qu(n.tool.arg)),l=F(()=>rD(r.value)??""),a=F(()=>l.value?qf(l.value):""),u=F(()=>l.value?lD(l.value):""),c=F(()=>{const E=r.value;if(E)return Xa(E.offset)??Xa(E.line_start)??Xa(E.start_line)}),d=F(()=>{const E=r.value;if(!E)return;const S=Xa(E.limit)??Xa(E.length);return Xa(E.line_end)??Xa(E.end_line)??(c.value!==void 0&&S!==void 0?c.value+S:void 0)}),f=F(()=>c.value!==void 0&&d.value!==void 0?`:${c.value}-${d.value}`:c.value!==void 0?`:${c.value}`:""),p=F(()=>n.tool.status==="ok"?bte(n.tool.output??[]):null),g=F(()=>p.value?.contents??[]),m=F(()=>p.value?.lineNumbers),y=F(()=>p.value?.contents.length??n.tool.output?.length??0),w=F(()=>!!n.tool.output&&n.tool.output.length>0),k=F(()=>p.value!==null||w.value),A=Z(n.tool.defaultExpanded===!0&&k.value),v=Z(A.value);Qe(A,E=>{E&&(v.value=!0)}),Qe(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&k.value&&(A.value=!0)});function x(){l.value&&i("openFile",{path:l.value,line:c.value})}return(E,S)=>(b(),fe(kl,{status:o.value,open:A.value,expandable:k.value,onToggle:S[0]||(S[0]=M=>A.value=!A.value)},{leading:he(()=>[V(h(Ce),{name:"file-text",size:"sm"})]),trailing:he(()=>[y.value>0?(b(),I("span",rSe,B(h(s)("tools.chip.lines",{count:y.value})),1)):ne("",!0)]),body:he(()=>[l.value?(b(),I("button",{key:0,class:"path-link",type:"button",onClick:x},B(l.value),1)):ne("",!0),p.value&&v.value?(b(),fe(al,{key:1,code:g.value,path:l.value,"line-numbers":m.value},null,8,["code","path","line-numbers"])):(b(),fe(Ir,{key:2,lines:e.tool.output,"empty-text":h(s)("tools.output.waiting")},null,8,["lines","empty-text"]))]),default:he(()=>[C("span",nSe,B(h(s)("tools.label.read")),1),a.value?(b(),I("button",{key:0,class:"tl-file",type:"button",onClick:It(x,["stop"])},B(a.value),1)):ne("",!0),u.value?(b(),I("span",iSe,B(u.value),1)):ne("",!0),f.value?(b(),I("span",sSe,B(f.value),1)):ne("",!0),a.value?ne("",!0):(b(),I("span",oSe,B(l.value||e.tool.arg),1))]),_:1},8,["status","open","expandable"]))}}),aSe=vt(lSe,[["__scopeId","data-v-0edbdd82"]]),uSe=["aria-expanded"],cSe={class:"title"},dSe={key:0,class:"meta"},fSe={key:1,class:"sum-txt"},hSe={class:"rt"},pSe={class:"status"},gSe={key:0,class:"chip"},mSe={key:1,class:"tm"},vSe={class:"body"},ySe={class:"overview"},bSe={class:"overview-line"},kSe={class:"big"},ASe={key:0,class:"lbl"},CSe={key:1,class:"lbl"},wSe={key:2,class:"lbl"},xSe={key:3,class:"lbl"},_Se={key:0,class:"seg","aria-hidden":"true"},SSe={key:1,class:"legend"},MSe=["disabled","aria-label","aria-expanded","onClick"],ISe={class:"mname"},ESe={class:"mact"},TSe={class:"mphase"},LSe=["aria-expanded","onClick"],NSe={key:1,class:"fallback-output"},FSe={key:2,class:"waiting"},BSe=tt({__name:"SwarmTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(z){if(!z)return{};try{const G=JSON.parse(z),K=Array.isArray(G.items)?G.items:void 0;return{description:typeof G.description=="string"?G.description:void 0,itemCount:K?.length}}catch{return{}}}const r=an("resolveSwarmMembers"),l=F(()=>o(i.tool.arg)),a=F(()=>Zf(i.tool.name)),u=F(()=>l.value.description??""),c=F(()=>r?.(i.tool.id)??[]),d=F(()=>rte(i.tool.output)),f=an("modelDisplay"),p=an("subagentEffort"),g=F(()=>{let z;for(const G of c.value){const K=f?.(G.model),H=p?.(G.thinkingEffort),q=[K,H].filter(ee=>ee!==void 0);if(q.length===0)continue;const X=q.join(" · ");if(z===void 0)z=X;else if(z!==X)return}return z}),m=F(()=>i.tool.status),y=F(()=>m.value==="running"?"running":m.value==="error"||(d.value?.failed??0)>0?"error":"ok"),w=F(()=>oee(c.value,d.value)),k=F(()=>{const z={completed:0,working:0,suspended:0,queued:0,failed:0,cancelled:0};for(const G of w.value)z[G.phase]++;return z}),A=F(()=>w.value.length||l.value.itemCount||0),v=F(()=>k.value.completed+k.value.failed+k.value.cancelled),x=F(()=>{const z=d.value;if(!z)return"";const G=z.aborted??0;return G>0?n("tools.swarm.doneSubWithCancelled",{completed:z.completed,failed:z.failed,cancelled:G}):n("tools.swarm.doneSub",{completed:z.completed,failed:z.failed})}),E=F(()=>k.value.working+k.value.suspended+k.value.queued),S=[{phase:"completed",cls:"s-ok"},{phase:"working",cls:"s-run"},{phase:"suspended",cls:"s-warn"},{phase:"failed",cls:"s-fail"},{phase:"cancelled",cls:"s-queue"},{phase:"queued",cls:"s-queue"}],M=F(()=>S.map(({phase:z,cls:G})=>({phase:z,count:k.value[z],cls:G})).filter(z=>z.count>0)),_=Z(m.value==="running"||E.value>0);function N(){_.value=!_.value}const D=F(()=>w.value.length>0||d.value||m.value==="running"?"":(i.tool.output??[]).join(` -`).trim()),T=Z(new Set);function $(z){return T.value.has(z)}function P(z){const G=new Set(T.value);G.has(z)?G.delete(z):G.add(z),T.value=G}function O(z){if(z.agentId){s("openAgent",z.agentId);return}z.body&&P(z.id)}function R(z){return z.agentId!==void 0&&z.body.length>0&&(z.phase==="completed"||z.phase==="failed"||z.phase==="cancelled")}function W(z){return n(`tools.swarm.phase${z[0].toUpperCase()}${z.slice(1)}`)}return(z,G)=>(b(),I("div",{class:De(["swarm-card",{open:_.value,err:y.value==="error"}])},[C("button",{class:"head",type:"button","aria-expanded":_.value,onClick:N},[V(h(Ce),{class:"ic",name:"sparkles",size:"sm"}),C("span",cSe,B(a.value),1),u.value?(b(),I("span",dSe,"·")):ne("",!0),u.value?(b(),I("span",fSe,B(u.value),1)):ne("",!0),C("span",hSe,[C("span",pSe,[y.value==="ok"?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):y.value==="error"?(b(),fe(h(Ce),{key:1,name:"close",size:"sm"})):(b(),fe(h(hl),{key:2,status:"running"}))]),v.value>0||A.value>0?(b(),I("span",gSe,B(v.value)+" / "+B(A.value),1)):ne("",!0),e.tool.timing?(b(),I("span",mSe,B(e.tool.timing),1)):ne("",!0)]),V(h(Ce),{class:"car",name:"chevron-right",size:"sm"})],8,uSe),Bn(C("div",vSe,[C("div",ySe,[C("div",bSe,[C("span",kSe,B(h(n)("tools.swarm.progress",{done:v.value,total:A.value})),1),g.value?(b(),I("span",ASe,B(g.value),1)):ne("",!0),y.value==="running"&&A.value>0?(b(),I("span",CSe,B(h(n)("tools.swarm.runningSub",{count:E.value})),1)):d.value?(b(),I("span",wSe,B(x.value),1)):(b(),I("span",xSe,B(h(n)("tools.swarm.waiting")),1))]),A.value>0&&M.value.length>0?(b(),I("div",_Se,[(b(!0),I(Be,null,yt(M.value,K=>(b(),I("span",{key:K.phase,class:De(K.cls),style:Vt({flex:K.count})},null,6))),128))])):ne("",!0),M.value.length>1?(b(),I("div",SSe,[(b(!0),I(Be,null,yt(M.value,K=>(b(),I("span",{key:K.phase},[C("i",{class:De(["lg-dot",K.cls])},null,2),Ue(B(W(K.phase))+" "+B(K.count),1)]))),128))])):ne("",!0)]),w.value.length>0?(b(!0),I(Be,{key:0},yt(w.value,K=>(b(),I("div",{key:K.id,class:De(["member",[`phase-${K.phase}`,{open:!K.agentId&&$(K.id)}]])},[C("button",{class:"member-head",type:"button",disabled:!K.agentId&&!K.body,"aria-label":K.agentId?h(n)("tasks.openDetail"):void 0,"aria-expanded":!K.agentId&&K.body?$(K.id):void 0,onClick:H=>O(K)},[V(h(hl),{class:"row-dot",status:K.phase},null,8,["status"]),V(h(gn),{text:K.name},{default:he(()=>[C("span",ISe,B(K.name),1)]),_:2},1032,["text"]),K.activity?(b(),fe(h(gn),{key:0,text:K.activity},{default:he(()=>[C("span",ESe,B(K.activity),1)]),_:2},1032,["text"])):ne("",!0),C("span",TSe,B(W(K.phase)),1),K.agentId?(b(),fe(h(Ce),{key:1,class:"mcar",name:"arrow-right",size:"sm"})):K.body?(b(),fe(h(Ce),{key:2,class:"mcar",name:"chevron-right",size:"sm"})):ne("",!0)],8,MSe),R(K)?(b(),I("button",{key:0,class:"member-saved",type:"button","aria-expanded":$(K.id),onClick:H=>P(K.id)},[V(h(Ce),{class:De(["member-saved-car",{open:$(K.id)}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"]),C("span",null,B(h(n)("tools.output.saved")),1)],8,LSe)):ne("",!0),K.body&&(!K.agentId||R(K))?Bn((b(),I("div",{key:1,class:"member-body"},B(K.body),513)),[[rs,$(K.id)]]):ne("",!0)],2))),128)):D.value?(b(),I("div",NSe,B(D.value),1)):(b(),I("div",FSe,B(h(n)("tools.swarm.waiting")),1))],512),[[rs,_.value]])],2))}}),$Se=vt(BSe,[["__scopeId","data-v-f7b643ea"]]),DSe=tt({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e;return(n,i)=>(b(),I("span",{class:De(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},[t.status==="run"?(b(),fe(h(hl),{key:0,status:"running"})):t.status==="pending"?(b(),fe(h(hl),{key:1,status:"idle"})):t.status==="done"?(b(),fe(h(Ce),{key:2,name:"check",size:"sm"})):(b(),fe(h(Ce),{key:3,name:"close",size:"sm"}))],2))}}),RSe=vt(DSe,[["__scopeId","data-v-f1aedfd0"]]),zSe={class:"tl-name"},OSe={key:0,class:"tl-dim"},PSe={key:0,class:"tl-chip"},jSe={key:1,class:"todo-bar","aria-hidden":"true"},HSe={key:0,class:"todo-list"},WSe={class:"todo-title"},qSe=tt({__name:"TodoTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt();function i(g){const m=qu(g),y=m&&Array.isArray(m.todos)?m.todos:m&&Array.isArray(m.items)?m.items:void 0;if(!y)return[];const w=[];for(const k of y){if(!k||typeof k!="object")continue;const A=k,v=ei(A.title)??ei(A.content)??ei(A.activeForm)??ei(A.text);if(!v)continue;const x=ei(A.status)??"pending";w.push({title:v,status:x==="in_progress"?"in_progress":x==="done"||x==="completed"?"done":"pending"})}return w}const s=F(()=>t.tool.status),o=F(()=>i(t.tool.arg)),r=F(()=>o.value.filter(g=>g.status==="done").length),l=F(()=>o.value.length),a=F(()=>o.value.find(g=>g.status==="in_progress")),u=F(()=>l.value>0?r.value/l.value:0),c=F(()=>!!t.tool.output&&t.tool.output.length>0),d=F(()=>l.value>0||c.value),f=Z(t.tool.defaultExpanded===!0&&d.value);Qe(()=>[t.tool.defaultExpanded,t.tool.status],()=>{t.tool.defaultExpanded===!0&&d.value&&(f.value=!0)});function p(g){return g.status==="in_progress"?"run":g.status}return(g,m)=>(b(),fe(kl,{status:s.value,open:f.value,expandable:d.value,onToggle:m[0]||(m[0]=y=>f.value=!f.value)},{leading:he(()=>[V(h(Ce),{name:"check-list",size:"sm"})]),trailing:he(()=>[l.value>0?(b(),I("span",PSe,B(r.value)+"/"+B(l.value),1)):ne("",!0),l.value>0?(b(),I("span",jSe,[C("span",{class:"todo-fill",style:Vt({width:`${u.value*100}%`})},null,4)])):ne("",!0)]),body:he(()=>[l.value>0?(b(),I("div",HSe,[(b(!0),I(Be,null,yt(o.value,(y,w)=>(b(),I("div",{key:w,class:De(["todo-row",`s-${y.status}`])},[V(RSe,{status:p(y)},null,8,["status"]),C("span",WSe,B(y.title),1)],2))),128))])):c.value?(b(),fe(Ir,{key:1,lines:e.tool.output},null,8,["lines"])):ne("",!0)]),default:he(()=>[C("span",zSe,B(h(n)("tools.label.todo")),1),a.value?(b(),I("span",OSe,B(a.value.title),1)):ne("",!0)]),_:1},8,["status","open","expandable"]))}}),USe=vt(qSe,[["__scopeId","data-v-1b7f51f3"]]),KSe={class:"tl-name"},VSe={key:0},ZSe={key:1,class:"tl-dim"},GSe={key:0,class:"fetch-url"},QSe=tt({__name:"WebFetchTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.tool.status),s=F(()=>{const u=qu(t.tool.arg);return ei(u?.url)??ei(u?.uri)??""}),o=F(()=>s.value?Cxe(s.value):""),r=F(()=>!!t.tool.output&&t.tool.output.length>0),l=F(()=>r.value),a=Z(t.tool.defaultExpanded===!0&&l.value);return Qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&l.value&&(a.value=!0)}),(u,c)=>(b(),fe(kl,{status:i.value,open:a.value,expandable:l.value,onToggle:c[0]||(c[0]=d=>a.value=!a.value)},{leading:he(()=>[V(h(Ce),{name:"globe",size:"sm"})]),body:he(()=>[s.value?(b(),I("div",GSe,B(s.value),1)):ne("",!0),V(Ir,{lines:e.tool.output,"empty-text":h(n)("tools.output.waiting")},null,8,["lines","empty-text"])]),default:he(()=>[C("span",KSe,B(h(n)("tools.label.web_fetch")),1),o.value?(b(),I("span",VSe,B(o.value),1)):(b(),I("span",ZSe,B(e.tool.arg),1))]),_:1},8,["status","open","expandable"]))}}),YSe=vt(QSe,[["__scopeId","data-v-8c248fcc"]]);function JSe(e){if(e.media&&e.status==="ok")return j_e;switch(ao(e.name)){case"bash":return Ixe;case"read":return aSe;case"edit":case"write":case"multi_edit":return Vxe;case"grep":case"search":return T_e;case"glob":case"ls":return d_e;case"web_fetch":return YSe;case"todo":return USe;case"task":return Uwe;case"agentswarm":return $Se;case"askuserquestion":return Axe;case"exitplanmode":return tSe;case"creategoal":case"getgoal":case"setgoalbudget":case"updategoal":return b_e;default:return t_e}}const mk=tt({__name:"ToolCall",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,i=t,s=F(()=>JSe(n.tool));return(o,r)=>(b(),fe(Ms(s.value),{tool:e.tool,mobile:e.mobile,onOpenMedia:r[0]||(r[0]=l=>i("openMedia",l)),onOpenFile:r[1]||(r[1]=l=>i("openFile",l)),onOpenAgent:r[2]||(r[2]=l=>i("openAgent",l))},null,40,["tool","mobile"]))}}),XSe=["aria-expanded"],eMe={class:"think-title"},tMe={key:0,class:"think-time"},nMe=["inert"],iMe={class:"think-text"},sMe=tt({__name:"ThinkingBlock",props:{text:{},mobile:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1},startedAt:{default:void 0},durationMs:{default:void 0}},setup(e){const t=e,n=Z(!1),{t:i}=Bt();Qe(()=>t.streaming,(d,f)=>{f&&!d&&(n.value=!1)});const s=Z(Date.now());Qe(()=>[t.streaming,t.startedAt],([d,f],p,g)=>{if(!d||!f)return;s.value=Date.now();const m=setInterval(()=>{s.value=Date.now()},1e3);g(()=>clearInterval(m))},{immediate:!0});const o=F(()=>{if(t.streaming&&t.startedAt){const d=Date.parse(t.startedAt);return Number.isFinite(d)?Ma(s.value-d):""}if(t.durationMs!==void 0){const d=Ma(t.durationMs);return d?`· ${d}`:""}return""}),r=an("pinScroll",()=>{}),l=Z(null),a=Z(null),u=Z(!1);function c(){if(!n.value){const f=(a.value?.scrollHeight??0)>(typeof window<"u"?window.innerHeight:0);u.value=t.streaming&&f}if(n.value=!n.value,t.streaming)return;const d=l.value;d&&kt(()=>r(d))}return(d,f)=>(b(),I("div",{class:De(["think",{mob:e.mobile,open:n.value,streaming:e.streaming}])},[C("button",{ref_key:"headEl",ref:l,class:"think-head",type:"button","aria-expanded":n.value,onClick:c},[V(h(Ce),{class:"think-bulb",name:"thinking",size:"sm"}),C("span",eMe,B(e.streaming?h(i)("thinking.streaming"):h(i)("thinking.panelTitle")),1),o.value?(b(),I("span",tMe,B(o.value),1)):ne("",!0),V(h(Ce),{class:"think-car",name:"chevron-right",size:"sm"})],8,XSe),C("div",{class:De(["think-body",{open:n.value,instant:u.value}]),inert:!n.value},[C("div",{ref_key:"bodyInnerEl",ref:a,class:"think-body-inner"},[C("pre",iMe,B(e.text),1)],512)],10,nMe)],2))}}),vk=vt(sMe,[["__scopeId","data-v-7d463c2a"]]),aD=(e,t)=>t===void 0?jn.global.t(e):jn.global.t(e,t);function oMe(e,t={}){return See(aD,e,t)}function rMe(e,t){return Iee(aD,e,t)}const lMe=["aria-expanded"],aMe=["aria-label"],uMe=["title"],cMe={key:0,class:"ar-sep"},dMe=["inert"],fMe={class:"ar-body-inner"},hMe=tt({__name:"ActivityRun",props:{items:{},mobile:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,i=t,s=F(()=>n.items.at(-1)),o=F(()=>{const M=s.value;if(n.streaming&&M?.kind==="thinking")return M;for(let _=n.items.length-1;_>=0;_--){const N=n.items[_];if(N?.kind==="tool"&&N.tool.status==="running")return N}return null}),r=F(()=>{if(n.streaming)return"running";for(const M of n.items)if(M.kind==="tool"&&M.tool.status==="running")return"running";for(const M of n.items)if(M.kind==="tool"&&M.tool.status==="error")return"error";return"done"}),l=Z(r.value==="running"),a=an("pinScroll",()=>{}),u=Z(null),c=Z(null),d=Z(void 0),f=Z(Date.now()),p=F(()=>{let M=null;for(const _ of n.items)if(_.kind==="thinking"&&_.startedAt!==void 0){const N=Date.parse(_.startedAt);Number.isFinite(N)&&(M===null||N<M)&&(M=N)}return M});Qe(r,(M,_,N)=>{if(M==="running"){_!==void 0&&_!=="running"&&(l.value=!0),c.value===null&&(c.value=p.value??Date.now()),d.value=void 0,f.value=Date.now();const D=setInterval(()=>{f.value=Date.now()},1e3);N(()=>clearInterval(D));return}_==="running"&&(l.value=!1,c.value!==null&&(d.value=Date.now()-c.value),c.value=null)},{immediate:!0});function g(){if(l.value=!l.value,n.streaming)return;const M=u.value;M&&kt(()=>a(M))}const m=F(()=>{if(r.value==="done")return"check";if(r.value==="error")return"close";const M=o.value??s.value;return M?M.kind==="thinking"?"thinking":u$(M.tool.name):"tool"}),y=F(()=>rMe(n.items,o.value)),w=F(()=>oMe(n.items,{durationMs:d.value})),k=F(()=>r.value!=="running"||c.value===null?"":Ma(f.value-c.value)),A=F(()=>{if(r.value!=="running")return w.value.clauses;const M=[];return y.value.current&&M.push(y.value.current),M.push(...y.value.done),k.value&&M.push({fragments:[{text:k.value,tone:"faint"}]}),M}),v=F(()=>r.value!=="running"?w.value.plain:[y.value.plain,k.value].filter(Boolean).join(" · "));function x(M){if(M==="danger")return"ar-danger";if(M==="faint")return"ar-faint"}function E(M){return M.kind==="tool"?h$(M):`thinking-${M.sourceIndex}`}function S(M){return n.streaming&&M.kind==="thinking"&&M.durationMs===void 0&&M.sourceIndex===s.value?.sourceIndex}return(M,_)=>(b(),I("div",{class:De(["activity-run",{open:l.value}])},[C("button",{ref_key:"headEl",ref:u,class:"ar-head",type:"button","aria-expanded":l.value,onClick:g},[C("span",{class:De(["ar-glyph",{run:r.value==="running",err:r.value==="error",ok:r.value==="done"}]),role:"status","aria-label":r.value},[V(h(Ce),{name:m.value,size:"sm","aria-hidden":"true"},null,8,["name"])],10,aMe),C("span",{class:"ar-sum",title:v.value},[(b(!0),I(Be,null,yt(A.value,(N,D)=>(b(),I(Be,{key:D},[D>0?(b(),I("span",cMe," · ")):ne("",!0),(b(!0),I(Be,null,yt(N.fragments,(T,$)=>(b(),I("span",{key:$,class:De(x(T.tone))},B(T.text),3))),128))],64))),128))],8,uMe),V(h(Ce),{class:"ar-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,lMe),C("div",{class:De(["ar-body",{open:l.value}]),inert:!l.value},[C("div",fMe,[(b(!0),I(Be,null,yt(e.items,N=>(b(),I(Be,{key:E(N)},[N.kind==="thinking"?(b(),fe(vk,{key:0,text:N.thinking,mobile:e.mobile,streaming:S(N),"started-at":N.startedAt,"duration-ms":N.durationMs},null,8,["text","mobile","streaming","started-at","duration-ms"])):(b(),fe(mk,{key:1,tool:N.tool,mobile:e.mobile,onOpenMedia:_[0]||(_[0]=D=>i("openMedia",D)),onOpenFile:_[1]||(_[1]=D=>i("openFile",D)),onOpenAgent:_[2]||(_[2]=D=>i("openAgent",D))},null,8,["tool","mobile"]))],64))),128))])],10,dMe)],2))}}),uD=vt(hMe,[["__scopeId","data-v-91eb361a"]]),pMe={class:"msg-time"},gMe=tt({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>oL(t.time,n("conversation.yesterday")));return(s,o)=>(b(),I("span",pMe,B(i.value),1))}}),w2=vt(gMe,[["__scopeId","data-v-9153170e"]]),mMe=["aria-expanded"],vMe={class:"ntf-chip"},yMe={class:"ntf-main"},bMe={class:"ntf-title"},kMe={class:"ntf-sub"},AMe={class:"ntf-side"},CMe={class:"ng-dots"},wMe={class:"ng-list"},xMe=["aria-expanded","onClick"],_Me={class:"ntf-chip"},SMe={class:"ntf-main"},MMe={class:"ntf-title"},IMe={class:"ntf-sub"},EMe={class:"ntf-side"},TMe={class:"st"},LMe={class:"ntf-body"},NMe={class:"ntf-body-in"},FMe={class:"nd-fields"},BMe={class:"k"},$Me={class:"v"},DMe={class:"k"},RMe={class:"v"},zMe={class:"k"},OMe={class:"v"},PMe={key:0,class:"nd-body"},jMe={key:1,class:"nd-out"},HMe=["title"],WMe=["onClick"],qMe={class:"nd-raw"},UMe=["aria-expanded"],KMe={class:"ntf-chip"},VMe={class:"ntf-main"},ZMe={class:"ntf-title"},GMe={class:"ntf-sub"},QMe={class:"ntf-side"},YMe={class:"st"},JMe={class:"ntf-body"},XMe={class:"ntf-body-in"},eIe={class:"nd-fields"},tIe={class:"k"},nIe={class:"v"},iIe={class:"k"},sIe={class:"v"},oIe={class:"k"},rIe={class:"v"},lIe={key:0,class:"nd-body"},aIe={key:1,class:"nd-out"},uIe=["title"],cIe={class:"nd-raw"},dIe=tt({__name:"NotificationCard",props:{items:{}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.items.length>1),s=Z(!1),o=Z(new Set);function r(A,v){return A.id!==""?`${A.id}#${v}`:`ntf-${v}`}function l(A){const v=new Set(o.value);v.has(A)?v.delete(A):v.add(A),o.value=v}const a={completed:"check",failed:"alert-triangle",timed_out:"clock",killed:"stop",lost:"alert-triangle",info:"info"};function u(A){const v=Cg(A);return v==="info"&&A.sourceKind==="subagent"?"robot":a[v]}function c(A){return A.sourceKind==="subagent"?n("conversation.notification.kindSubagent"):n("conversation.notification.kindTask")}function d(A){return n(`conversation.notification.title.${Cg(A)}`,{kind:c(A)})}function f(A){return n(`conversation.notification.status.${Cg(A)}`)}function p(A){return tX(A)}function g(A){return A==="ok"?"done":A==="err"?"error":A==="warn"?"warn":""}const m=F(()=>t.items.map(A=>A.title).filter(A=>A!=="").join(" · ")),y=Z(null);let w=null;async function k(A,v){await ro(A)&&(y.value=v,w!==null&&clearTimeout(w),w=setTimeout(()=>{w=null,y.value=null},1200))}return(A,v)=>i.value?(b(),I("div",{key:0,class:De(["ntf-group-card",{open:s.value}])},[C("button",{class:"ntf-head",type:"button","aria-expanded":s.value,onClick:v[0]||(v[0]=x=>s.value=!s.value)},[C("span",vMe,[V(h(Ce),{name:"terminal",size:"sm"})]),C("span",yMe,[C("span",bMe,B(h(n)("conversation.notification.groupTitle",{n:e.items.length})),1),C("span",kMe,B(m.value),1)]),C("span",AMe,[C("span",CMe,[(b(!0),I(Be,null,yt(e.items,(x,E)=>(b(),I("span",{key:r(x,E),class:De(["dot",g(p(x))])},null,2))),128))]),V(h(Ce),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,mMe),Bn(C("div",wMe,[(b(!0),I(Be,null,yt(e.items,(x,E)=>(b(),I("div",{key:r(x,E),class:De(["ng-item",[p(x),{open:o.value.has(r(x,E))}]])},[C("button",{class:"ntf-head",type:"button","aria-expanded":o.value.has(r(x,E)),onClick:S=>l(r(x,E))},[C("span",_Me,[V(h(Ce),{name:u(x),size:"sm"},null,8,["name"])]),C("span",SMe,[C("span",MMe,B(d(x)),1),C("span",IMe,B(x.title),1)]),C("span",EMe,[C("span",TMe,B(f(x)),1),x.createdAt?(b(),fe(w2,{key:0,time:x.createdAt},null,8,["time"])):ne("",!0),V(h(Ce),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,xMe),Bn(C("div",LMe,[C("div",NMe,[C("div",FMe,[C("span",BMe,B(h(n)("conversation.notification.fields.type")),1),C("span",$Me,B(x.type),1),C("span",DMe,B(h(n)("conversation.notification.fields.source")),1),C("span",RMe,B(x.sourceKind)+" · "+B(x.sourceId),1),C("span",zMe,B(h(n)("conversation.notification.fields.severity")),1),C("span",OMe,B(x.severity||"—"),1)]),x.body?(b(),I("div",PMe,B(x.body),1)):ne("",!0),x.outputFile?(b(),I("div",jMe,[V(h(Ce),{class:"nd-out-ic",name:"file-text",size:"sm"}),C("span",{class:"path",title:x.outputFile.path},B(x.outputFile.path),9,HMe),C("button",{class:"nd-act",type:"button",onClick:It(S=>k(x.outputFile.path,r(x,E)),["stop"])},B(y.value===r(x,E)?h(n)("conversation.notification.copied"):h(n)("conversation.notification.copyPath")),9,WMe)])):ne("",!0),C("details",qMe,[C("summary",null,[V(h(Ce),{class:"nd-raw-car",name:"chevron-right",size:"sm"}),C("span",null,B(h(n)("conversation.notification.rawPayload")),1)]),C("pre",null,B(x.raw),1)])])],512),[[rs,o.value.has(r(x,E))]])],2))),128))],512),[[rs,s.value]])],2)):e.items[0]?(b(),I("div",{key:1,class:De(["ntf",[p(e.items[0]),{open:o.value.has(r(e.items[0],0))}]])},[C("button",{class:"ntf-head",type:"button","aria-expanded":o.value.has(r(e.items[0],0)),onClick:v[1]||(v[1]=x=>l(r(e.items[0],0)))},[C("span",KMe,[V(h(Ce),{name:u(e.items[0]),size:"sm"},null,8,["name"])]),C("span",VMe,[C("span",ZMe,B(d(e.items[0])),1),C("span",GMe,B(e.items[0].title),1)]),C("span",QMe,[C("span",YMe,B(f(e.items[0])),1),e.items[0].createdAt?(b(),fe(w2,{key:0,time:e.items[0].createdAt},null,8,["time"])):ne("",!0),V(h(Ce),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,UMe),Bn(C("div",JMe,[C("div",XMe,[C("div",eIe,[C("span",tIe,B(h(n)("conversation.notification.fields.type")),1),C("span",nIe,B(e.items[0].type),1),C("span",iIe,B(h(n)("conversation.notification.fields.source")),1),C("span",sIe,B(e.items[0].sourceKind)+" · "+B(e.items[0].sourceId),1),C("span",oIe,B(h(n)("conversation.notification.fields.severity")),1),C("span",rIe,B(e.items[0].severity||"—"),1)]),e.items[0].body?(b(),I("div",lIe,B(e.items[0].body),1)):ne("",!0),e.items[0].outputFile?(b(),I("div",aIe,[V(h(Ce),{class:"nd-out-ic",name:"file-text",size:"sm"}),C("span",{class:"path",title:e.items[0].outputFile.path},B(e.items[0].outputFile.path),9,uIe),C("button",{class:"nd-act",type:"button",onClick:v[2]||(v[2]=It(x=>k(e.items[0].outputFile.path,r(e.items[0],0)),["stop"]))},B(y.value===r(e.items[0],0)?h(n)("conversation.notification.copied"):h(n)("conversation.notification.copyPath")),1)])):ne("",!0),C("details",cIe,[C("summary",null,[V(h(Ce),{class:"nd-raw-car",name:"chevron-right",size:"sm"}),C("span",null,B(h(n)("conversation.notification.rawPayload")),1)]),C("pre",null,B(e.items[0].raw),1)])])],512),[[rs,o.value.has(r(e.items[0],0))]])],2)):ne("",!0)}}),cD=vt(dIe,[["__scopeId","data-v-69e0a1db"]]),fIe=["aria-expanded"],hIe=["title"],pIe=["inert"],gIe={class:"tf-body-inner"},mIe={key:1,class:"msg"},vIe=tt({__name:"TurnFold",props:{items:{},mobile:{type:Boolean,default:!1},streamingTailIndex:{default:null},live:{type:Boolean,default:!1},parked:{type:Boolean,default:!1},seedMs:{default:void 0},createdMs:{default:void 0},endedMs:{default:void 0},durationMs:{default:void 0}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.streamingTailIndex!==null),r=F(()=>n.live?n.parked?"parked":"live":"settled"),l=Z(!1),a=F(()=>o.value||l.value),u=Z(a.value),c=Z(a.value);let d=null;Qe(a,S=>{if(S){if(d!==null&&(clearTimeout(d),d=null),u.value){c.value=!0;return}u.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.value=!0})});return}c.value=!1,d=setTimeout(()=>{d=null,u.value=!1},200)});const f=an("pinScroll",()=>{}),p=Z(null),g=Z(Date.now());let m=null;function y(){m!==null&&(clearInterval(m),m=null)}An(()=>{y(),d!==null&&clearTimeout(d)}),Qe(r,(S,M)=>{S!=="settled"?(g.value=Date.now(),m===null&&(m=setInterval(()=>{g.value=Date.now()},1e3))):y(),M==="live"&&S!=="live"&&(l.value=!1)},{immediate:!0});const w=F(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),k=F(()=>ake({startMs:w.value,endedMs:n.endedMs,durationMs:n.durationMs,state:r.value==="settled"?{phase:"settled"}:{phase:"live",nowMs:g.value}}));function A(){l.value=!l.value,kt(()=>{const S=p.value;S&&f(S)})}const v=F(()=>{const S=k.value===void 0?"":Ma(k.value);return S?s("conversation.fold.worked",{duration:S}):s("conversation.fold.workedUnknown")});function x(S){return n.streamingTailIndex===null||S.kind==="thinking"&&S.durationMs!==void 0?!1:S.sourceIndex===n.streamingTailIndex}function E(S){if(n.streamingTailIndex===null)return!1;const M=S.items.at(-1);return M?.kind==="thinking"&&M.durationMs!==void 0?!1:M!==void 0&&M.sourceIndex===n.streamingTailIndex}return(S,M)=>e.items.length>0?(b(),I("div",{key:0,class:De(["turn-fold",{open:a.value,streaming:o.value}])},[o.value?ne("",!0):(b(),I("button",{key:0,ref_key:"headEl",ref:p,class:"tf-head",type:"button","aria-expanded":l.value,onClick:A},[C("span",{class:"tf-sum",title:v.value},B(v.value),9,hIe),V(h(Ce),{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,fIe)),u.value?(b(),I("div",{key:1,class:De(["tf-body",{open:c.value}]),inert:!a.value},[C("div",gIe,[(b(!0),I(Be,null,yt(e.items,(_,N)=>(b(),I(Be,{key:h(p$)(_,N)},[_.kind==="thinking"?(b(),fe(vk,{key:0,text:_.thinking,mobile:e.mobile,streaming:x(_),"started-at":_.startedAt,"duration-ms":_.durationMs},null,8,["text","mobile","streaming","started-at","duration-ms"])):_.kind==="text"&&_.text?(b(),I("div",mIe,[V(h(Kl),{text:_.text,streaming:x(_),"open-file":D=>i("openFile",D)},null,8,["text","streaming","open-file"])])):_.kind==="activity-run"?(b(),fe(uD,{key:2,items:_.items,mobile:e.mobile,streaming:E(_),onOpenMedia:M[0]||(M[0]=D=>i("openMedia",D)),onOpenFile:M[1]||(M[1]=D=>i("openFile",D)),onOpenAgent:M[2]||(M[2]=D=>i("openAgent",D))},null,8,["items","mobile","streaming"])):_.kind==="tool"?(b(),fe(mk,{key:3,tool:_.tool,mobile:e.mobile,onOpenMedia:M[3]||(M[3]=D=>i("openMedia",D)),onOpenFile:M[4]||(M[4]=D=>i("openFile",D)),onOpenAgent:M[5]||(M[5]=D=>i("openAgent",D))},null,8,["tool","mobile"])):_.kind==="notification"?(b(),fe(cD,{key:4,items:_.items},null,8,["items"])):ne("",!0)],64))),128))])],10,pIe)):ne("",!0)],2)):ne("",!0)}}),yIe=vt(vIe,[["__scopeId","data-v-66797f5d"]]),bIe={class:"turn-files"},kIe={class:"tf-ic","aria-hidden":"true"},AIe={class:"tf-title"},CIe={key:0,class:"tf-stats"},wIe={key:0,class:"tf-add"},xIe={key:1,class:"tf-del"},_Ie={class:"diffbar","aria-hidden":"true"},SIe={class:"tf-list"},MIe={key:0,class:"tf-dir"},IIe={class:"tf-base"},EIe={key:0,class:"tf-stats"},TIe={key:0,class:"tf-add"},LIe={key:1,class:"tf-del"},y4=3,NIe=tt({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.interactive!==!1),r=F(()=>{const v=n.changes.length;return s(v===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:v})}),l=F(()=>n.changes.some(v=>v.statsIncomplete)),a=F(()=>{let v=0,x=0;for(const E of n.changes)v+=E.added,x+=E.removed;return{added:v,removed:x}}),u=F(()=>!l.value&&(a.value.added>0||a.value.removed>0)),c=Z(!1),d=F(()=>c.value?n.changes:n.changes.slice(0,y4)),f=F(()=>Math.max(0,n.changes.length-y4)),p=F(()=>n.changes.length>y4),g=F(()=>c.value?s("conversation.turnFiles.showLess"):f.value===1?s("conversation.turnFiles.moreOne"):s("conversation.turnFiles.more",{number:f.value}));function m(v){const x=n.cwd?av(v,n.cwd):null;return x!==null?x||qf(v):v}function y(v){const x=m(v),E=Math.max(x.lastIndexOf("/"),x.lastIndexOf("\\"));return E>0?x.slice(0,E+1):""}function w(v){const x=m(v),E=Math.max(x.lastIndexOf("/"),x.lastIndexOf("\\"));return E>=0?x.slice(E+1):x}function k(v){return v.statsIncomplete||v.added===0&&v.removed===0?null:{added:v.added,removed:v.removed}}function A(v){v.hasWrite?i("openFile",{path:v.path}):i("openDiff",v)}return(v,x)=>(b(),I("div",bIe,[V(h(Tq),null,fI({head:he(()=>[C("span",kIe,[V(h(Ce),{name:"pencil",size:"sm"})]),C("span",AIe,B(r.value),1),u.value?(b(),I("span",CIe,[a.value.added>0?(b(),I("span",wIe,"+"+B(a.value.added),1)):ne("",!0),a.value.removed>0?(b(),I("span",xIe,"−"+B(a.value.removed),1)):ne("",!0),C("span",_Ie,[C("span",{class:"seg-add",style:Vt({flexGrow:a.value.added})},null,4),C("span",{class:"seg-del",style:Vt({flexGrow:a.value.removed})},null,4)])])):ne("",!0)]),default:he(()=>[C("ul",SIe,[(b(!0),I(Be,null,yt(d.value,E=>(b(),I("li",{key:E.path,class:"tf-row"},[(b(),fe(Ms(o.value?"button":"span"),{class:"tf-file",type:o.value?"button":void 0,onClick:S=>o.value&&A(E)},{default:he(()=>[y(E.path)?(b(),I("span",MIe,B(y(E.path)),1)):ne("",!0),C("span",IIe,B(w(E.path)),1)]),_:2},1032,["type","onClick"])),k(E)?(b(),I("span",EIe,[k(E).added>0?(b(),I("span",TIe,"+"+B(k(E).added),1)):ne("",!0),k(E).removed>0?(b(),I("span",LIe,"−"+B(k(E).removed),1)):ne("",!0)])):ne("",!0)]))),128))])]),_:2},[p.value?{name:"foot",fn:he(()=>[V(h(jt),{variant:"ghost",size:"sm",class:"tf-more","aria-expanded":c.value,onClick:x[0]||(x[0]=E=>c.value=!c.value)},{default:he(()=>[Ue(B(g.value)+" ",1),V(h(Ce),{class:De(["tf-more-car",{open:c.value}]),name:"chevron-down",size:"sm","aria-hidden":"true"},null,8,["class"])]),_:1},8,["aria-expanded"])]),key:"0"}:void 0]),1024)]))}}),FIe=vt(NIe,[["__scopeId","data-v-f37da416"]]),BIe={class:"activity-notice",role:"status"},$Ie={"aria-hidden":"true"},DIe={class:"an-label"},RIe=tt({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(b(),I("div",BIe,[C("span",$Ie,[V(h(Bi),{size:"sm"})]),C("span",DIe,B(e.label),1)]))}}),zIe=vt(RIe,[["__scopeId","data-v-cc29061f"]]),OIe=["data-turn-id"],PIe=["title"],jIe={class:"cn-head-text"},HIe={key:0,class:"cn-bubble"},WIe={class:"cn-prompt"},qIe={key:1,class:"cn-meta"},UIe=tt({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.cron),s=F(()=>i.value?.missedCount!==void 0),o=F(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),r=F(()=>{const f=i.value;return!f?.cron||f.recurring===!1?"":f.cron}),l=F(()=>s.value?"error":"ok"),a=F(()=>{const f=i.value;if(!f)return"";const p=[];return f.recurring===!1&&p.push(n("conversation.cron.oneShot")),typeof f.coalescedCount=="number"&&f.coalescedCount>1&&p.push(n("conversation.cron.coalesced",{n:f.coalescedCount})),f.missedCount!==void 0&&p.push(n("conversation.cron.missedCount",{n:f.missedCount})),f.stale===!0&&p.push(n("conversation.cron.finalDelivery")),p.join(" · ")}),u=F(()=>{const f=[o.value];return r.value&&f.push(r.value),a.value&&f.push(a.value),f.join(" · ")}),c=F(()=>{const f=i.value?.jobId;return f?n("conversation.cron.job",{id:f}):void 0}),d=F(()=>t.text??"");return(f,p)=>(b(),I("div",{class:De(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[C("div",{class:De(["cn-head",l.value]),title:c.value},[V(h(Ce),{name:"clock",size:"sm",class:"cn-head-ico","aria-hidden":"true"}),C("span",jIe,B(u.value),1)],10,PIe),d.value?(b(),I("div",HIe,[C("span",WIe,B(d.value),1)])):ne("",!0),e.createdAt?(b(),I("div",qIe,[V(w2,{time:e.createdAt},null,8,["time"])])):ne("",!0)],10,OIe))}}),KIe=vt(UIe,[["__scopeId","data-v-9f79345d"]]);let yk=!1,Tc=null,QS=!1;function VIe(){Tc!==null&&(clearTimeout(Tc),Tc=null),yk=!0}function ZIe(){Tc!==null&&clearTimeout(Tc),Tc=setTimeout(()=>{Tc=null,yk=!1},0)}function GIe(){QS||typeof document>"u"||(QS=!0,document.addEventListener("compositionstart",VIe,!0),document.addEventListener("compositionend",ZIe,!0))}function QIe(e){return yk||e.isComposing||e.keyCode===229}const YIe=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,JIe=/^(txt|md|markdown|log|json|ya?ml|csv|tsv|ts|mts|tsx|jsx|css|py|go|rs|java|c|h|cc|cpp|hpp|sh|zsh|sql|toml|ini|cfg|conf|vue)$/i,XIe=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,YS="text/plain;charset=utf-8";function eEe(e,t){const n=(t??"").toLowerCase();if(YIe.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:YS;const i=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return i===void 0?null:JIe.test(i)?YS:XIe.test(i)?`image/${i==="jpg"?"jpeg":i==="ico"?"x-icon":i}`:i==="pdf"?"application/pdf":null}async function dD(e,t,n,i){const s=eEe(n,i);if(s===null)return"unsupported";const o=window.open("","_blank");o!==null&&(o.opener=null);const r=await e.getFileBlob(t).catch(()=>null);if(r===null)return o?.close(),"failed";const l=URL.createObjectURL(new Blob([r],{type:s}));if(o!==null)o.location.href=l;else{const a=document.createElement("a");a.href=l,a.download=n??t,a.click()}return setTimeout(()=>{URL.revokeObjectURL(l)},6e4),"previewed"}/*! - * PhotoSwipe 5.4.4 - https://photoswipe.com - * (c) 2024 Dmytro Semenov - */function yr(e,t,n){const i=document.createElement(t);return e&&(i.className=e),n&&n.appendChild(i),i}function gs(e,t){return e.x=t.x,e.y=t.y,t.id!==void 0&&(e.id=t.id),e}function fD(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function $8(e,t){const n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.sqrt(n*n+i*i)}function N1(e,t){return e.x===t.x&&e.y===t.y}function Pp(e,t,n){return Math.min(Math.max(e,t),n)}function dp(e,t,n){let i=`translate3d(${e}px,${t||0}px,0)`;return n!==void 0&&(i+=` scale3d(${n},${n},1)`),i}function Lc(e,t,n,i){e.style.transform=dp(t,n,i)}const tEe="cubic-bezier(.4,0,.22,1)";function hD(e,t,n,i){e.style.transition=t?`${t} ${n}ms ${i||tEe}`:"none"}function D8(e,t,n){e.style.width=typeof t=="number"?`${t}px`:t,e.style.height=typeof n=="number"?`${n}px`:n}function nEe(e){hD(e)}function iEe(e){return"decode"in e?e.decode().catch(()=>{}):e.complete?Promise.resolve(e):new Promise((t,n)=>{e.onload=()=>t(e),e.onerror=n})}const Br={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function sEe(e){return"button"in e&&e.button===1||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}function oEe(e,t,n=document){let i=[];if(e instanceof Element)i=[e];else if(e instanceof NodeList||Array.isArray(e))i=Array.from(e);else{const s=typeof e=="string"?e:t;s&&(i=Array.from(n.querySelectorAll(s)))}return i}function JS(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let pD=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{pD=!0}}))}catch{}class rEe{constructor(){this._pool=[]}add(t,n,i,s){this._toggleListener(t,n,i,s)}remove(t,n,i,s){this._toggleListener(t,n,i,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,n,i,s,o,r){if(!t)return;const l=o?"removeEventListener":"addEventListener";n.split(" ").forEach(u=>{if(u){r||(o?this._pool=this._pool.filter(d=>d.type!==u||d.listener!==i||d.target!==t):this._pool.push({target:t,type:u,listener:i,passive:s}));const c=pD?{passive:s||!1}:!1;t[l](u,i,c)}})}}function gD(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function s1(e,t,n,i,s){let o=0;if(t.paddingFn)o=t.paddingFn(n,i,s)[e];else if(t.padding)o=t.padding[e];else{const r="padding"+e[0].toUpperCase()+e.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function mD(e,t,n,i){return{x:t.x-s1("left",e,t,n,i)-s1("right",e,t,n,i),y:t.y-s1("top",e,t,n,i)-s1("bottom",e,t,n,i)}}class lEe{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:n}=this.slide,i=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,o=s1(t==="x"?"left":"top",n.options,n.viewportSize,this.slide.data,this.slide.index),r=this.slide.panAreaSize[t];this.center[t]=Math.round((r-i)/2)+o,this.max[t]=i>r?Math.round(r-i)+o:this.center[t],this.min[t]=i>r?o:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,n){return Pp(n,this.max[t],this.min[t])}}const XS=4e3;class vD{constructor(t,n,i,s){this.pswp=s,this.options=t,this.itemData=n,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,n,i){const s={x:t,y:n};this.elementSize=s,this.panAreaSize=i;const o=i.x/s.x,r=i.y/s.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const n=t+"ZoomLevel",i=this.options[n];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>XS&&(t=XS/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}class aEe{constructor(t,n,i){this.data=t,this.index=n,this.pswp=i,this.isActive=n===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new vD(i.options,t,n,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:n}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=yr("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new lEe(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||!this.isActive&&!1||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel===this.zoomLevels.initial||!this.isActive?(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}updateContentSize(t){const n=this.currentResolution||this.zoomLevels.initial;if(!n)return;const i=Math.round(this.width*n)||this.pswp.viewportSize.x,s=Math.round(this.height*n)||this.pswp.viewportSize.y;!this.sizeChanged(i,s)&&!t||this.content.setDisplayedSize(i,s)}sizeChanged(t,n){return t!==this.prevDisplayedWidth||n!==this.prevDisplayedHeight?(this.prevDisplayedWidth=t,this.prevDisplayedHeight=n,!0):!1}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}zoomTo(t,n,i,s){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:n,transitionDuration:i}),o.animations.stopAllPan();const r=this.currZoomLevel;s||(t=Pp(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",n,r),this.pan.y=this.calculateZoomToPanOffset("y",n,r),fD(this.pan);const l=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:l,duration:i,easing:o.options.easing}):l()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,n,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];n||(n=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const o=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-n[t])*o+n[t])}panTo(t,n){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",n),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),gs(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,n,i){i/=this.currentResolution||this.zoomLevels.initial,Lc(this.container,t,n,i)}calculateSize(){const{pswp:t}=this;gs(this.panAreaSize,mD(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return dp(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const uEe=.35,cEe=.6,eM=.4,tM=.5;function dEe(e,t){return e*t/(1-t)}class fEe{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&gs(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:n,dragAxis:i}=this.gestures,{currSlide:s}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const o=s.pan.y+(t.y-n.y);if(!this.pswp.dispatch("verticalDrag",{panY:o}).defaultPrevented){this._setPanWithFriction("y",o,cEe);const r=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(r),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(fD(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:n,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),n.isShifted()){const r=(n.x-n.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-tM&&r<0||t.x<.1&&r<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>tM&&r>0||t.x>-.1&&r>.5)&&(s=-1,t.x=Math.max(t.x,0)),n.moveIndexBy(s,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:n}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:o}=i,r=s[t],l=this.pswp.bgOpacity<1&&t==="y",u=r+dEe(n[t],.995);if(l){const g=this._getVerticalDragRatio(r),m=this._getVerticalDragRatio(u);if(g<0&&m<-eM||g>0&&m>eM){this.pswp.close();return}}const c=o.correctPan(t,u);if(r===c)return;const d=c===u?1:.82,f=this.pswp.bgOpacity,p=c-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:c,velocity:n[t],dampingRatio:d,onUpdate:g=>{if(l&&this.pswp.bgOpacity<1){const m=1-(c-g)/p;this.pswp.applyBgOpacity(Pp(f+(1-f)*m,0,1))}s[t]=Math.floor(g),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:n,dragAxis:i,prevP1:s,isMultitouch:o}=this.gestures,{currSlide:r,mainScroll:l}=this.pswp,a=n[t]-s[t],u=l.x+a;if(!a||!r)return!1;if(t==="x"&&!r.isPannable()&&!o)return l.moveTo(u,!0),!0;const{bounds:c}=r,d=r.pan[t]+a;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!o){const f=l.getCurrSlideX(),p=l.x-f,g=a>0,m=!g;if(d>c.min[t]&&g){if(c.min[t]<=this.startPan[t])return l.moveTo(u,!0),!0;this._setPanWithFriction(t,d)}else if(d<c.max[t]&&m){if(this.startPan[t]<=c.max[t])return l.moveTo(u,!0),!0;this._setPanWithFriction(t,d)}else if(p!==0){if(p>0)return l.moveTo(Math.max(u,f),!0),!0;if(p<0)return l.moveTo(Math.min(u,f),!0),!0}else this._setPanWithFriction(t,d)}else t==="y"?!l.isShifted()&&c.min.y!==c.max.y&&this._setPanWithFriction(t,d):this._setPanWithFriction(t,d);return!1}_getVerticalDragRatio(t){var n,i;return(t-((n=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&n!==void 0?n:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,n,i){const{currSlide:s}=this.pswp;if(!s)return;const{pan:o,bounds:r}=s;if(r.correctPan(t,n)!==n||i){const a=Math.round(n-o[t]);o[t]+=a*(i||uEe)}else o[t]=n}}const hEe=.05,pEe=.15;function nM(e,t,n){return e.x=(t.x+n.x)/2,e.y=(t.y+n.y)/2,e}class gEe{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,gs(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:n,p2:i,startP2:s,pswp:o}=this.gestures,{currSlide:r}=o;if(!r)return;const l=r.zoomLevels.min,a=r.zoomLevels.max;if(!r.isZoomable()||o.mainScroll.isShifted())return;nM(this._startZoomPoint,n,s),nM(this._zoomPoint,t,i);let u=1/$8(n,s)*$8(t,i)*this._startZoomLevel;if(u>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),u<l)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const c=1-(l-u)/(l/1.2);o.dispatch("pinchClose",{bgOpacity:c}).defaultPrevented||o.applyBgOpacity(c)}else u=l-(l-u)*pEe;else u>a&&(u=a+(u-a)*hEe);r.pan.x=this._calculatePanForZoomLevel("x",u),r.pan.y=this._calculatePanForZoomLevel("y",u),r.setZoomLevel(u),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:n}=t;(!n||n.currZoomLevel<n.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,n){const i=n/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:n}=this.gestures,{currSlide:i}=n;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);const s=i.currZoomLevel;let o,r=!0;s<i.zoomLevels.initial?o=i.zoomLevels.initial:s>i.zoomLevels.max?o=i.zoomLevels.max:(r=!1,o=s);const l=n.bgOpacity,a=n.bgOpacity<1,u=gs({x:0,y:0},i.pan);let c=gs({x:0,y:0},u);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,gs(this._startPan,u)),r&&(c={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),c={x:i.bounds.correctPan("x",c.x),y:i.bounds.correctPan("y",c.y)},i.setZoomLevel(s);const d=!N1(c,u);if(!d&&!r&&!a){i._setResolution(o),i.applyCurrentZoomPan();return}n.animations.stopAllPan(),n.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:f=>{if(f/=1e3,d||r){if(d&&(i.pan.x=u.x+(c.x-u.x)*f,i.pan.y=u.y+(c.y-u.y)*f),r){const p=s+(o-s)*f;i.setZoomLevel(p)}i.applyCurrentZoomPan()}a&&n.bgOpacity<1&&n.applyBgOpacity(Pp(l+(1-l)*f,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}}function iM(e){return!!e.target.closest(".pswp__container")}class mEe{constructor(t){this.gestures=t}click(t,n){const i=n.target.classList,s=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,n):o&&this._doClickOrTapAction("bgClick",t,n)}tap(t,n){iM(n)&&this._doClickOrTapAction("tap",t,n)}doubleTap(t,n){iM(n)&&this._doClickOrTapAction("doubleTap",t,n)}_doClickOrTapAction(t,n,i){var s;const{pswp:o}=this.gestures,{currSlide:r}=o,l=t+"Action",a=o.options[l];if(!o.dispatch(l,{point:n,originalEvent:i}).defaultPrevented){if(typeof a=="function"){a.call(o,n,i);return}switch(a){case"close":case"next":o[a]();break;case"zoom":r?.toggleZoom(n);break;case"zoom-or-close":r!=null&&r.isZoomable()&&r.zoomLevels.secondary!==r.zoomLevels.initial?r.toggleZoom(n):o.options.clickToCloseNonZoomable&&o.close();break;case"toggle-controls":(s=this.gestures.pswp.element)===null||s===void 0||s.classList.toggle("pswp--ui-visible");break}}}}const vEe=10,yEe=300,bEe=25;class kEe{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new fEe(this),this.zoomLevels=new gEe(this),this.tapHandler=new mEe(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,n,i,s){const{pswp:o}=this,{events:r}=o,l=s?t+s:"";r.add(o.scrollWrap,t+n,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+i,this.onPointerUp.bind(this)),l&&r.add(o.scrollWrap,l,this.onPointerUp.bind(this))}onPointerDown(t){const n=t.type==="mousedown"||t.pointerType==="mouse";if(n&&t.button>0)return;const{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(n&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,gs(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,gs(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?N1(this.p1,this.prevP1)||this.drag.change():(!N1(this.p1,this.prevP1)||!N1(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const n=Date.now(),i=n-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=n,gs(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:n}=this.pswp;if(n.isShifted()){n.moveIndexBy(0,!0);return}if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse"){this.tapHandler.click(this.startP1,t);return}const i=this.pswp.options.doubleTapAction?yEe:0;this._tapTimer?(this._clearTapTimer(),$8(this._lastStartP1,this.startP1)<bEe&&this.tapHandler.doubleTap(this.startP1,t)):(gs(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,n){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&n>5?i/n:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,n){this.pswp.applyFilters("preventPointerEvent",!0,t,n)&&t.preventDefault()}_updatePoints(t,n){if(this._pointerEventEnabled){const i=t,s=this._ongoingPointers.findIndex(o=>o.id===i.pointerId);n==="up"&&s>-1?this._ongoingPointers.splice(s,1):n==="down"&&s===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&gs(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&gs(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),n==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){gs(this.prevP1,this.p1),gs(this.prevP2,this.p2)}_updateStartPoints(){gs(this.startP1,this.p1),gs(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(t!==0){const n=t>0?"x":"y";Math.abs(this.p1[n]-this.startP1[n])>=vEe&&(this.dragAxis=n)}}}_convertEventPosToPoint(t,n){return n.x=t.pageX-this.pswp.offset.x,n.y=t.pageY-this.pswp.offset.y,"pointerId"in t?n.id=t.pointerId:t.identifier!==void 0&&(n.id=t.identifier),n}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const AEe=.35;class CEe{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:n}=this,i=Math.round(n.viewportSize.x+n.viewportSize.x*n.options.spacing),s=i!==this.slideWidth;s&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((o,r)=>{s&&Lc(o.el,(r+this._containerShiftIndex)*this.slideWidth),t&&o.slide&&o.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const n=yr("pswp__item","div",this.pswp.container);n.setAttribute("role","group"),n.setAttribute("aria-roledescription","slide"),n.setAttribute("aria-hidden","true"),n.style.display=t===1?"block":"none",this.itemHolders.push({el:n})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,n,i){const{pswp:s}=this;let o=s.potentialIndex+t;const r=s.getNumItems();if(s.canLoop()){o=s.getLoopedIndex(o);const a=(t+r)%r;a<=r/2?t=a:t=a-r}else o<0?o=0:o>=r&&(o=r-1),t=o-s.potentialIndex;s.potentialIndex=o,this._currPositionIndex-=t,s.animations.stopMainScroll();const l=this.getCurrSlideX();if(!n)this.moveTo(l),this.updateCurrItem();else{s.animations.startSpring({isMainScroll:!0,start:this.x,end:l,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:u=>{this.moveTo(u)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let a=s.potentialIndex-s.currIndex;if(s.canLoop()){const u=(a+r)%r;u<=r/2?a=u:a=u-r}Math.abs(a)>1&&this.updateCurrItem()}return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:n}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,n.currIndex=n.potentialIndex;let s=Math.abs(i),o;s>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),s=3,this.itemHolders.forEach(r=>{var l;(l=r.slide)===null||l===void 0||l.destroy(),r.slide=void 0}));for(let r=0;r<s;r++)i>0?(o=this.itemHolders.shift(),o&&(this.itemHolders[2]=o,this._containerShiftIndex++,Lc(o.el,(this._containerShiftIndex+2)*this.slideWidth),n.setContent(o,n.currIndex-s+r+2))):(o=this.itemHolders.pop(),o&&(this.itemHolders.unshift(o),this._containerShiftIndex--,Lc(o.el,this._containerShiftIndex*this.slideWidth),n.setContent(o,n.currIndex+s-r-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),n.animations.stopAllPan(),this.itemHolders.forEach((r,l)=>{r.slide&&r.slide.setIsActive(l===1)}),n.currSlide=(t=this.itemHolders[1])===null||t===void 0?void 0:t.slide,n.contentLoader.updateLazy(i),n.currSlide&&n.currSlide.applyCurrentZoomPan(),n.dispatch("change")}moveTo(t,n){if(!this.pswp.canLoop()&&n){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+s*AEe)}this.x=t,this.pswp.container&&Lc(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:n??!1})}}const wEe={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},mc=(e,t)=>t?e:wEe[e];class xEe{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const n=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&n&&this._wasFocused&&n.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:n}=this;if(n.dispatch("keydown",{originalEvent:t}).defaultPrevented||sEe(t))return;let i,s,o=!1;const r="key"in t;switch(r?t.key:t.keyCode){case mc("Escape",r):n.options.escKey&&(i="close");break;case mc("z",r):i="toggleZoom";break;case mc("ArrowLeft",r):s="x";break;case mc("ArrowUp",r):s="y";break;case mc("ArrowRight",r):s="x",o=!0;break;case mc("ArrowDown",r):o=!0,s="y";break;case mc("Tab",r):this._focusRoot();break}if(s){t.preventDefault();const{currSlide:l}=n;n.options.arrowKeys&&s==="x"&&n.getNumItems()>1?i=o?"next":"prev":l&&l.currZoomLevel>l.zoomLevels.fit&&(l.pan[s]+=o?-80:80,l.panTo(l.pan.x,l.pan.y))}i&&(t.preventDefault(),n[i]())}_onFocusIn(t){const{template:n}=this.pswp;n&&document!==t.target&&n!==t.target&&!n.contains(t.target)&&n.focus()}}const _Ee="cubic-bezier(.4,0,.22,1)";class SEe{constructor(t){var n;this.props=t;const{target:i,onComplete:s,transform:o,onFinish:r=()=>{},duration:l=333,easing:a=_Ee}=t;this.onFinish=r;const u=o?"transform":"opacity",c=(n=t[u])!==null&&n!==void 0?n:"";this._target=i,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{hD(i,u,l,a),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},l+500),i.style[u]=c},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),nEe(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const MEe=12,IEe=.75;class EEe{constructor(t,n,i){this.velocity=t*1e3,this._dampingRatio=n||IEe,this._naturalFrequency=i||MEe,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,n){let i=0,s;n/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*n);if(this._dampingRatio===1)s=this.velocity+this._naturalFrequency*t,i=(t+s*n)*o,this.velocity=i*-this._naturalFrequency+s*o;else if(this._dampingRatio<1){s=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const r=Math.cos(this._dampedFrequency*n),l=Math.sin(this._dampedFrequency*n);i=o*(t*r+s*l),this.velocity=i*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*l+this._dampedFrequency*s*r)}return i}}class TEe{constructor(t){this.props=t,this._raf=0;const{start:n,end:i,velocity:s,onUpdate:o,onComplete:r,onFinish:l=()=>{},dampingRatio:a,naturalFrequency:u}=t;this.onFinish=l;const c=new EEe(s,a,u);let d=Date.now(),f=n-i;const p=()=>{this._raf&&(f=c.easeFrame(f,Date.now()-d),Math.abs(f)<1&&Math.abs(c.velocity)<50?(o(i),r&&r(),this.onFinish()):(d=Date.now(),o(f+i),this._raf=requestAnimationFrame(p)))};this._raf=requestAnimationFrame(p)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class LEe{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,n){const i=n?new TEe(t):new SEe(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const n=this.activeAnimations.indexOf(t);n>-1&&this.activeAnimations.splice(n,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isPan?(t.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isMainScroll?(t.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}class NEe{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:n}=this.pswp;let{deltaX:i,deltaY:s}=t;if(n&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(n.isZoomable()){let o=-s;t.deltaMode===1?o*=.05:o*=t.deltaMode?1:.002,o=2**o;const r=n.currZoomLevel*o;n.zoomTo(r,{x:t.clientX,y:t.clientY})}}else n.isPannable()&&(t.deltaMode===1&&(i*=18,s*=18),n.panTo(n.pan.x-i,n.pan.y-s))}}function FEe(e){if(typeof e=="string")return e;if(!e||!e.isCustomSVG)return"";const t=e;let n='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return n=n.split("%d").join(t.size||32),t.outlineID&&(n+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),n+=t.inner,n+="</svg>",n}class BEe{constructor(t,n){var i;const s=n.name||n.className;let o=n.html;if(t.options[s]===!1)return;typeof t.options[s+"SVG"]=="string"&&(o=t.options[s+"SVG"]),t.dispatch("uiElementCreate",{data:n});let r="";n.isButton?(r+="pswp__button ",r+=n.className||`pswp__button--${n.name}`):r+=n.className||`pswp__${n.name}`;let l=n.isButton?n.tagName||"button":n.tagName||"div";l=l.toLowerCase();const a=yr(r,l);if(n.isButton){l==="button"&&(a.type="button");let{title:d}=n;const{ariaLabel:f}=n;typeof t.options[s+"Title"]=="string"&&(d=t.options[s+"Title"]),d&&(a.title=d);const p=f||d;p&&a.setAttribute("aria-label",p)}a.innerHTML=FEe(o),n.onInit&&n.onInit(a,t),n.onClick&&(a.onclick=d=>{typeof n.onClick=="string"?t[n.onClick]():typeof n.onClick=="function"&&n.onClick(d,a,t)});const u=n.appendTo||"bar";let c=t.element;u==="bar"?(t.topBar||(t.topBar=yr("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),c=t.topBar):(a.classList.add("pswp__hide-on-close"),u==="wrapper"&&(c=t.scrollWrap)),(i=c)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",a,n))}}function yD(e,t,n){e.classList.add("pswp__button--arrow"),e.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(n?e.disabled=!(t.currIndex<t.getNumItems()-1):e.disabled=!(t.currIndex>0))})}const $Ee={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:yD},DEe={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(e,t)=>{yD(e,t,!0)}},REe={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},zEe={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},OEe={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(e,t)=>{let n,i=null;const s=(l,a)=>{e.classList.toggle("pswp__preloader--"+l,a)},o=l=>{n!==l&&(n=l,s("active",l))},r=()=>{var l;if(!((l=t.currSlide)!==null&&l!==void 0&&l.content.isLoading())){o(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var a;o(!!(!((a=t.currSlide)===null||a===void 0)&&a.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",r),t.on("loadComplete",l=>{t.currSlide===l.slide&&r()}),t.ui&&(t.ui.updatePreloaderVisibility=r)}},PEe={name:"counter",order:5,onInit:(e,t)=>{t.on("change",()=>{e.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function sM(e,t){e.classList.toggle("pswp--zoomed-in",t)}class jEe{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[REe,$Ee,DEe,zEe,OEe,PEe],t.dispatch("uiRegister"),this.uiElementsData.sort((n,i)=>(n.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(n=>{this.registerElement(n)}),t.on("change",()=>{var n;(n=t.element)===null||n===void 0||n.classList.toggle("pswp--one-slide",t.getNumItems()===1)}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new BEe(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:n,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!n)return;let{currZoomLevel:s}=n;if(this.pswp.opener.isOpen||(s=n.zoomLevels.initial),s===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const o=n.zoomLevels.initial-n.zoomLevels.secondary;if(Math.abs(o)<.01||!n.isZoomable()){sM(t,!1),t.classList.remove("pswp--zoom-allowed");return}t.classList.add("pswp--zoom-allowed");const r=s===n.zoomLevels.initial?n.zoomLevels.secondary:n.zoomLevels.initial;sM(t,r<=s),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--click-to-zoom")}}function HEe(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function WEe(e,t,n){const i=e.getBoundingClientRect(),s=i.width/t,o=i.height/n,r=s>o?s:o,l=(i.width-t*r)/2,a=(i.height-n*r)/2,u={x:i.left+l,y:i.top+a,w:t*r};return u.innerRect={w:i.width,h:i.height,x:l,y:a},u}function qEe(e,t,n){const i=n.dispatch("thumbBounds",{index:e,itemData:t,instance:n});if(i.thumbBounds)return i.thumbBounds;const{element:s}=t;let o,r;if(s&&n.options.thumbSelector!==!1){const l=n.options.thumbSelector||"img";r=s.matches(l)?s:s.querySelector(l)}return r=n.applyFilters("thumbEl",r,t,e),r&&(t.thumbCropped?o=WEe(r,t.width||t.w||0,t.height||t.h||0):o=HEe(r)),n.applyFilters("thumbBounds",o,t,e)}class UEe{constructor(t,n){this.type=t,this.defaultPrevented=!1,n&&Object.assign(this,n)}preventDefault(){this.defaultPrevented=!0}}class KEe{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,n,i=100){var s,o,r;this._filters[t]||(this._filters[t]=[]),(s=this._filters[t])===null||s===void 0||s.push({fn:n,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((l,a)=>l.priority-a.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,n,i)}removeFilter(t,n){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==n)),this.pswp&&this.pswp.removeFilter(t,n)}applyFilters(t,...n){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(s=>{n[0]=s.fn.apply(this,n)}),n[0]}on(t,n){var i,s;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(n),(s=this.pswp)===null||s===void 0||s.on(t,n)}off(t,n){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(s=>n!==s)),(i=this.pswp)===null||i===void 0||i.off(t,n)}dispatch(t,n){var i;if(this.pswp)return this.pswp.dispatch(t,n);const s=new UEe(t,n);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,s)}),s}}class VEe{constructor(t,n){if(this.element=yr("pswp__img pswp__img--placeholder",t?"img":"div",n),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,n){this.element&&(this.element.tagName==="IMG"?(D8(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=dp(0,0,t/250)):D8(this.element,t,n))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class ZEe{constructor(t,n,i){this.instance=n,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=Br.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,n){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new VEe(i,this.slide.container)}this.element&&!n||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=yr("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=yr("pswp__content","div"),this.element.innerHTML=this.data.html||""),n&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var n,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=(n=this.data.src)!==null&&n!==void 0?n:"",s.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=Br.LOADING,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=Br.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===Br.LOADED||this.state===Br.ERROR)&&this.removePlaceholder())}onError(){this.state=Br.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===Br.LOADING,this)}isError(){return this.state===Br.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,n){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,n),!this.instance.dispatch("contentResize",{content:this,width:t,height:n}).defaultPrevented&&(D8(this.element,t,n),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=n,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:n,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==Br.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,n=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||n>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=n+"px",t.dataset.largestUsedSize=String(n))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,n;let i=yr("pswp__error-msg","div");i.innerText=(t=(n=this.instance.options)===null||n===void 0?void 0:n.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=yr("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===Br.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||JS())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!JS()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===Br.LOADED||this.state===Br.ERROR)&&this.removePlaceholder()))}}const GEe=5;function bD(e,t,n){const i=t.createContentFromData(e,n);let s;const{options:o}=t;if(o){s=new vD(o,e,-1);let r;t.pswp?r=t.pswp.viewportSize:r=gD(o,t);const l=mD(o,r,e,n);s.update(i.width,i.height,l)}return i.lazyLoad(),s&&i.setDisplayedSize(Math.ceil(i.width*s.initial),Math.ceil(i.height*s.initial)),i}function QEe(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return bD(n,t,e)}class YEe{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,GEe),this._cachedItems=[]}updateLazy(t){const{pswp:n}=this;if(n.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=n.options,s=t===void 0?!0:t>=0;let o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(n.currIndex+(s?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(n.currIndex+(s?-o:o))}loadSlideByIndex(t){const n=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(n);i||(i=QEe(n,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let n=this.getContentByIndex(t.index);return n||(n=this.pswp.createContentFromData(t.data,t.index),this.addToCache(n)),n.setSlide(t),n}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const n=this._cachedItems.findIndex(i=>!i.isAttached&&!i.hasSlide);n!==-1&&this._cachedItems.splice(n,1)[0].destroy()}}removeByIndex(t){const n=this._cachedItems.findIndex(i=>i.index===t);n!==-1&&this._cachedItems.splice(n,1)}getContentByIndex(t){return this._cachedItems.find(n=>n.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}}class JEe extends KEe{getNumItems(){var t;let n=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?n=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(n=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:n});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,n){return new ZEe(t,this,n)}getItemData(t){var n;const i=(n=this.options)===null||n===void 0?void 0:n.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),s=i.items[t]);let o=s;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var n,i;return(n=this.options)!==null&&n!==void 0&&n.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?oEe(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const n={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){n.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(n.srcset=i.dataset.pswpSrcset),n.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,n.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,n.w=n.width,n.h=n.height,i.dataset.pswpType&&(n.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var s;n.msrc=o.currentSrc||o.src,n.alt=(s=o.getAttribute("alt"))!==null&&s!==void 0?s:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(n.thumbCropped=!0)}return this.applyFilters("domItemData",n,t,i)}lazyLoadData(t,n){return bD(t,this,n)}}const Bh=.003;class XEe{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,n=this.pswp.currSlide,{options:i}=t;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=n?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&n?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&n&&(n.zoomAndPanToInitial(),n.applyCurrentZoomPan());else{var s;this._animateRootOpacity=(s=i.showHideOpacity)!==null&&s!==void 0?s:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>Bh,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String(Bh)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var o;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(o=this.pswp.currSlide)===null||o===void 0?void 0:o.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(Bh)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(Bh)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(Bh)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(t=>{let n=!1,i=!0;iEe(this._placeholder).finally(()=>{n=!0,i||t(!0)}),setTimeout(()=>{i=!1,n&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var t,n;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(n=this.pswp.element)===null||n===void 0||n.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var n;this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),(n=t.currSlide)===null||n===void 0||n.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:n}=this,{innerRect:i}=this._thumbBounds,{currSlide:s,viewportSize:o}=n;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const r=-o.x+(this._thumbBounds.x-i.x)+i.w,l=-o.y+(this._thumbBounds.y-i.y)+i.h,a=o.x-i.w,u=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",dp(r,l)),this._animateTo(this._cropContainer2,"transform",dp(a,u))):(Lc(this._cropContainer1,r,l),Lc(this._cropContainer2,a,u))}s&&(gs(s.pan,i||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,n,i){if(!this._duration){t.style[n]=i;return}const{animations:s}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};o[n]=i,s.startTransition(o)}}const eTe={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class tTe extends JEe{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new rEe,this.animations=new LEe,this.mainScroll=new CEe(this),this.gestures=new kEe(this),this.opener=new XEe(this),this.keyboard=new xEe(this),this.contentLoader=new YEe(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new NEe(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:n}=this.mainScroll;n[0]&&(n[0].el.style.display="block",this.setContent(n[0],this.currIndex-1)),n[2]&&(n[2].el.style.display="block",this.setContent(n[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const n=this.getNumItems();return this.options.loop&&(t>n-1&&(t-=n),t<0&&(t+=n)),Pp(t,0,n-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{var n;(n=t.slide)===null||n===void 0||n.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var n;(n=this.currSlide)===null||n===void 0||n.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||t.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach(n=>{var i;(i=n.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((n,i)=>{var s,o;let r=((s=(o=this.currSlide)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:0)-1+i;if(this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(n,t,!0),i===1)){var l;this.currSlide=n.slide,(l=n.slide)===null||l===void 0||l.setIsActive(!0)}}),this.dispatch("change")}setContent(t,n,i){if(this.canLoop()&&(n=this.getLoopedIndex(n)),t.slide){if(t.slide.index===n&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(n<0||n>=this.getNumItems()))return;const s=this.getItemData(n);t.slide=new aEe(s,n,this),n===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const n=gD(this.options,this);!t&&N1(n,this._prevViewportSize)||(gs(this._prevViewportSize,n),this.dispatch("beforeResize"),gs(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var t;this.hasMouse=!0,(t=this.element)===null||t===void 0||t.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,n){this.offset.x=t,this.offset.y=n,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=yr("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=yr("pswp__bg","div",this.element),this.scrollWrap=yr("pswp__scroll-wrap","section",this.element),this.container=yr("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new jEe(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return qEe(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...eTe,...t}}}function nTe(e){return new Promise(t=>{const n=new Image;n.onload=()=>t(n.naturalWidth>0?{w:n.naturalWidth,h:n.naturalHeight}:null),n.onerror=()=>t(null),n.src=e})}async function iTe(e,t,n){if(n?.currentSrc&&n.naturalWidth>0)return{src:n.currentSrc,w:n.naturalWidth,h:n.naturalHeight,objectUrl:null};let i=t.url,s=null;if(t.fileId)try{const r=await e.getFileBlob(t.fileId);s=URL.createObjectURL(r),i=s}catch{}const o=await nTe(i);return o?{src:i,...o,objectUrl:s}:(s&&URL.revokeObjectURL(s),null)}function sTe(e){const t=(s,o)=>{const r=parseFloat(e(s));return Number.isFinite(r)&&r>0?r:o},n=t("--space-6",24),i=t("--space-8",32)+n;return{top:i,bottom:i,left:n,right:n}}function oTe(e){let t=!1,n=!1,i=null;return(async()=>{const s=await iTe(e.api,e.media,e.thumbImg);if(t){s?.objectUrl&&URL.revokeObjectURL(s.objectUrl);return}if(!s){e.onClose();return}const o=e.thumbImg?.currentSrc===s.src?e.thumbImg:null;i=new tTe({dataSource:[{src:s.src,w:s.w,h:s.h,thumbCropped:!0,...o?{msrc:o.currentSrc,element:o}:{}}],index:0,showHideAnimationType:o?"zoom":"fade",arrowPrev:!1,arrowNext:!1,counter:!1,close:!1,zoom:!1,wheelToZoom:!0,escKey:!0,trapFocus:!1,bgOpacity:1,padding:sTe(l=>getComputedStyle(document.documentElement).getPropertyValue(l))}),i.addFilter("thumbEl",l=>l?.isConnected?l:null);const r=e.media.path;i.on("uiRegister",()=>{const l=i?.ui;!l||!r||l.registerElement({name:"caption",className:"media-preview-caption",isButton:!1,appendTo:"root",onInit:a=>{a.textContent=r}})}),i.on("openingAnimationStart",()=>{Ao.value+=1,e.onOpen?.()}),i.on("destroy",()=>{n=!0,Ao.value=Math.max(0,Ao.value-1),s.objectUrl&&URL.revokeObjectURL(s.objectUrl),e.onClose()}),i.init()})(),()=>{t=!0,i&&!n&&i.close()}}function eo(e){this.content=e}eo.prototype={constructor:eo,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,s=i.find(e),o=i.content.slice();return s==-1?o.push(n||e,t):(o[s+1]=t,n&&(o[s]=n)),new eo(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new eo(n)},addToStart:function(e,t){return new eo([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new eo(n)},addBefore:function(e,t,n){var i=this.remove(t),s=i.content.slice(),o=i.find(e);return s.splice(o==-1?s.length:o,0,t,n),new eo(s)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=eo.from(e),e.size?new eo(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=eo.from(e),e.size?new eo(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=eo.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};eo.from=function(e){if(e instanceof eo)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new eo(t)};function kD(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let s=e.child(i),o=t.child(i);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){let r=s.text,l=o.text,a=0;for(;r[a]==l[a];a++)n++;return a&&a<r.length&&a<l.length&&wD(r.charCodeAt(a-1))&&CD(r.charCodeAt(a))&&n--,n}if(s.content.size||o.content.size){let r=kD(s.content,o.content,n+1);if(r!=null)return r}n+=s.nodeSize}}function AD(e,t,n,i){for(let s=e.childCount,o=t.childCount;;){if(s==0||o==0)return s==o?null:{a:n,b:i};let r=e.child(--s),l=t.child(--o),a=r.nodeSize;if(r==l){n-=a,i-=a;continue}if(!r.sameMarkup(l))return{a:n,b:i};if(r.isText&&r.text!=l.text){let u=r.text,c=l.text,d=u.length,f=c.length;for(;d>0&&f>0&&u[d-1]==c[f-1];)d--,f--,n--,i--;return d&&f&&d<u.length&&wD(u.charCodeAt(d-1))&&CD(u.charCodeAt(d))&&(n++,i++),{a:n,b:i}}if(r.content.size||l.content.size){let u=AD(r.content,l.content,n-1,i-1);if(u)return u}n-=a,i-=a}}function CD(e){return e>=56320&&e<57344}function wD(e){return e>=55296&&e<56320}class ai{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;i<t.length;i++)this.size+=t[i].nodeSize}nodesBetween(t,n,i,s=0,o){for(let r=0,l=0;l<n;r++){let a=this.content[r],u=l+a.nodeSize;if(u>t&&i(a,s+l,o||null,r)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),i,s+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,s){let o="",r=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&i&&(r?r=!1:o+=i),o+=u},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(s[s.length-1]=n.withText(n.text+i.text),o=1);o<t.content.length;o++)s.push(t.content[o]);return new ai(s,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let i=[],s=0;if(n>t)for(let o=0,r=0;r<n;o++){let l=this.content[o],a=r+l.nodeSize;a>t&&((r<t||a>n)&&(l.isText?l=l.cut(Math.max(0,t-r),Math.min(l.text.length,n-r)):l=l.cut(Math.max(0,t-r-1),Math.min(l.content.size,n-r-1))),i.push(l),s+=l.nodeSize),r=a}return new ai(i,s)}cutByIndex(t,n){return t==n?ai.empty:t==0&&n==this.content.length?this:new ai(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return s[t]=n,new ai(s,o)}addToStart(t){return new ai([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ai(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,i=0;n<this.content.length;n++){let s=this.content[n];t(s,i,n),i+=s.nodeSize}}findDiffStart(t,n=0){return kD(this,t,n)}findDiffEnd(t,n=this.size,i=t.size){return AD(this,t,n,i)}findIndex(t){if(t==0)return gg(0,t);if(t==this.size)return gg(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let s=this.child(n),o=i+s.nodeSize;if(o>=t)return o==t?gg(n+1,o):gg(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return ai.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return ai.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ai.empty;let n,i=0;for(let s=0;s<t.length;s++){let o=t[s];i+=o.nodeSize,s&&o.isText&&t[s-1].sameMarkup(o)?(n||(n=t.slice(0,s)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new ai(n||t,i)}static from(t){if(!t)return ai.empty;if(t instanceof ai)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new ai([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ai.empty=new ai([],0);const b4={index:0,offset:0};function gg(e,t){return b4.index=e,b4.offset=t,b4}function x2(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!x2(e[i],t[i]))return!1}else{for(let i in e)if(!(i in t)||!x2(e[i],t[i]))return!1;for(let i in t)if(!(i in e))return!1}return!0}class Hs{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,i=!1;for(let s=0;s<t.length;s++){let o=t[s];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,s));else{if(o.type.excludes(this.type))return t;!i&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,s)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&x2(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=t.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=i.create(n.attrs);return i.checkAttrs(s.attrs),s}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].eq(n[i]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return Hs.none;if(t instanceof Hs)return[t];let n=t.slice();return n.sort((i,s)=>i.type.rank-s.type.rank),n}}Hs.none=[];class _2 extends Error{}class zl{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=_D(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return i&&new zl(i,this.openStart,this.openEnd)}removeBetween(t,n){return new zl(xD(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return zl.empty;let i=n.openStart||0,s=n.openEnd||0;if(typeof i!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new zl(ai.fromJSON(t,n.content),i,s)}static maxOpen(t,n=!0){let i=0,s=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new zl(t,i,s)}}zl.empty=new zl(ai.empty,0,0);function xD(e,t,n){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i),{index:r,offset:l}=e.findIndex(n);if(s==t||o.isText){if(l!=n&&!e.child(r).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=r)throw new RangeError("Removing non-flat range");return e.replaceChild(i,o.copy(xD(o.content,t-s-1,n-s-1)))}function _D(e,t,n,i,s,o){let{index:r,offset:l}=e.findIndex(t),a=e.maybeChild(r);if(l==t||a.isText)return o&&i<=0&&s<=0&&!o.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=_D(a.content,t-l-1,n,r==0?i-1:0,r==e.childCount-1?s-1:0,a);return u&&e.replaceChild(r,a.copy(u))}function rTe(e,t,n){if(n.openStart>e.depth)throw new _2("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new _2("Inconsistent open depths");return SD(e,t,n,0)}function SD(e,t,n,i){let s=e.index(i),o=e.node(i);if(s==t.index(i)&&i<e.depth-n.openStart){let r=SD(e,t,n,i+1);return o.copy(o.content.replaceChild(s,r))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==i&&t.depth==i){let r=e.parent,l=r.content;return Hc(r,l.cut(0,e.parentOffset).append(n.content).append(l.cut(t.parentOffset)))}else{let{start:r,end:l}=lTe(n,e);return Hc(o,ID(e,r,l,t,i))}else return Hc(o,S2(e,t,i))}function MD(e,t){if(!t.type.compatibleContent(e.type))throw new _2("Cannot join "+t.type.name+" onto "+e.type.name)}function R8(e,t,n){let i=e.node(n);return MD(i,t.node(n)),i}function jc(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function F1(e,t,n,i){let s=(t||e).node(n),o=0,r=t?t.index(n):s.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(jc(e.nodeAfter,i),o++));for(let l=o;l<r;l++)jc(s.child(l),i);t&&t.depth==n&&t.textOffset&&jc(t.nodeBefore,i)}function Hc(e,t){if(!e.type.validContent(t))throw new _2("Invalid content for node "+e.type.name);return e.copy(t)}function ID(e,t,n,i,s){let o=e.depth>s&&R8(e,t,s+1),r=i.depth>s&&R8(n,i,s+1),l=[];return F1(null,e,s,l),o&&r&&t.index(s)==n.index(s)?(MD(o,r),jc(Hc(o,ID(e,t,n,i,s+1)),l)):(o&&jc(Hc(o,S2(e,t,s+1)),l),F1(t,n,s,l),r&&jc(Hc(r,S2(n,i,s+1)),l)),F1(i,null,s,l),new ai(l)}function S2(e,t,n){let i=[];if(F1(null,e,n,i),e.depth>n){let s=R8(e,t,n+1);jc(Hc(s,S2(e,t,n+1)),i)}return F1(t,null,n,i),new ai(i)}function lTe(e,t){let n=t.depth-e.openStart,s=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)s=t.node(o).copy(ai.from(s));return{start:s.resolveNoCache(e.openStart+n),end:s.resolveNoCache(s.content.size-e.openEnd-n)}}class fp{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],s=t.child(n);return i?t.child(n).cut(i):s}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)s+=i.child(o).nodeSize;return s}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Hs.none;if(this.textOffset)return t.child(n).marks;let i=t.maybeChild(n-1),s=t.maybeChild(n);if(!i){let l=i;i=s,s=l}let o=i.marks;for(var r=0;r<o.length;r++)o[r].type.spec.inclusive===!1&&(!s||!o[r].isInSet(s.marks))&&(o=o[r--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,s=t.parent.maybeChild(t.index());for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);i>=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new cTe(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],s=0,o=n;for(let r=t;;){let{index:l,offset:a}=r.content.findIndex(o),u=o-a;if(i.push(r,l,s+a),!u||(r=r.child(l),r.isText))break;o=u-1,s+=a+1}return new fp(n,i,o)}static resolveCached(t,n){let i=oM.get(t);if(i)for(let o=0;o<i.elts.length;o++){let r=i.elts[o];if(r.pos==n)return r}else oM.set(t,i=new aTe);let s=i.elts[i.i]=fp.resolve(t,n);return i.i=(i.i+1)%uTe,s}}class aTe{constructor(){this.elts=[],this.i=0}}const uTe=12,oM=new WeakMap;class cTe{constructor(t,n,i){this.$from=t,this.$to=n,this.depth=i}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const dTe=Object.create(null);let wf=class z8{constructor(t,n,i,s=Hs.none){this.type=t,this.attrs=n,this.marks=s,this.content=i||ai.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,i,s=0){this.content.nodesBetween(t,n,i,s,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,i,s){return this.content.textBetween(t,n,i,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,i){return this.type==t&&x2(this.attrs,n||t.defaultAttrs||dTe)&&Hs.sameSet(this.marks,i||Hs.none)}copy(t=null){return t==this.content?this:new z8(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new z8(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,i=!1){if(t==n)return zl.empty;let s=this.resolve(t),o=this.resolve(n),r=i?0:s.sharedDepth(n),l=s.start(r),u=s.node(r).content.cut(s.pos-l,o.pos-l);return new zl(u,s.depth-r,o.depth-r)}replace(t,n,i){return rTe(this.resolve(t),this.resolve(n),i)}nodeAt(t){for(let n=this;;){let{index:i,offset:s}=n.content.findIndex(t);if(n=n.maybeChild(i),!n)return null;if(s==t||n.isText)return n;t-=s+1}}childAfter(t){let{index:n,offset:i}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(t);if(i<t)return{node:this.content.child(n),index:n,offset:i};let s=this.content.child(n-1);return{node:s,index:n-1,offset:i-s.nodeSize}}resolve(t){return fp.resolveCached(this,t)}resolveNoCache(t){return fp.resolve(this,t)}rangeHasMark(t,n,i){let s=!1;return n>t&&this.nodesBetween(t,n,o=>(i.isInSet(o.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),ED(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=ai.empty,s=0,o=i.childCount){let r=this.contentMatchAt(t).matchFragment(i,s,o),l=r&&r.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=s;a<o;a++)if(!this.type.allowsMarks(i.child(a).marks))return!1;return!0}canReplaceWith(t,n,i,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(t).matchType(i),r=o&&o.matchFragment(this.content,n);return r?r.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Hs.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),t=i.addToSet(t)}if(!Hs.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let s=ai.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,s,i);return o.type.checkAttrs(o.attrs),o}};wf.prototype.text=void 0;class M2 extends wf{constructor(t,n,i,s){if(super(t,n,null,s),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ED(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new M2(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new M2(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function ED(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class td{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new fTe(t,n);if(i.next==null)return td.empty;let s=TD(i);i.next&&i.err("Unexpected trailing text");let o=bTe(yTe(s));return kTe(o,i),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,i=t.childCount){let s=this;for(let o=n;s&&o<i;o++)s=s.matchType(t.child(o).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let i=0;i<t.next.length;i++)if(this.next[n].type==t.next[i].type)return!0;return!1}fillBefore(t,n=!1,i=0){let s=[this];function o(r,l){let a=r.matchFragment(t,i);if(a&&(!n||a.validEnd))return ai.from(l.map(u=>u.createAndFill()));for(let u=0;u<r.next.length;u++){let{type:c,next:d}=r.next[u];if(!(c.isText||c.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=o(d,l.concat(c));if(f)return f}}return null}return o(this,[])}findWrapping(t){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==t)return this.wrapCache[i+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let s=i.shift(),o=s.match;if(o.matchType(t)){let r=[];for(let l=s;l.type;l=l.via)r.push(l.type);return r.reverse()}for(let r=0;r<o.next.length;r++){let{type:l,next:a}=o.next[r];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!s.type||a.validEnd)&&(i.push({match:l.contentMatch,type:l,via:s}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let s=0;s<i.next.length;s++)t.indexOf(i.next[s].next)==-1&&n(i.next[s].next)}return n(this),t.map((i,s)=>{let o=s+(i.validEnd?"*":" ")+" ";for(let r=0;r<i.next.length;r++)o+=(r?", ":"")+i.next[r].type.name+"->"+t.indexOf(i.next[r].next);return o}).join(` -`)}}td.empty=new td(!0);class fTe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function TD(e){let t=[];do t.push(hTe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function hTe(e){let t=[];do t.push(pTe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function pTe(e){let t=vTe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=gTe(e,t);else break;return t}function rM(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function gTe(e,t){let n=rM(e),i=n;return e.eat(",")&&(e.next!="}"?i=rM(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function mTe(e,t){let n=e.nodeTypes,i=n[t];if(i)return[i];let s=[];for(let o in n){let r=n[o];r.isInGroup(t)&&s.push(r)}return s.length==0&&e.err("No node type or group '"+t+"' found"),s}function vTe(e){if(e.eat("(")){let t=TD(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=mTe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function yTe(e){let t=[[]];return s(o(e,0),n()),t;function n(){return t.push([])-1}function i(r,l,a){let u={term:a,to:l};return t[r].push(u),u}function s(r,l){r.forEach(a=>a.to=l)}function o(r,l){if(r.type=="choice")return r.exprs.reduce((a,u)=>a.concat(o(u,l)),[]);if(r.type=="seq")for(let a=0;;a++){let u=o(r.exprs[a],l);if(a==r.exprs.length-1)return u;s(u,l=n())}else if(r.type=="star"){let a=n();return i(l,a),s(o(r.expr,a),a),[i(a)]}else if(r.type=="plus"){let a=n();return s(o(r.expr,l),a),s(o(r.expr,a),a),[i(a)]}else{if(r.type=="opt")return[i(l)].concat(o(r.expr,l));if(r.type=="range"){let a=l;for(let u=0;u<r.min;u++){let c=n();s(o(r.expr,a),c),a=c}if(r.max==-1)s(o(r.expr,a),a);else for(let u=r.min;u<r.max;u++){let c=n();i(a,c),s(o(r.expr,a),c),a=c}return[i(a)]}else{if(r.type=="name")return[i(l,void 0,r.value)];throw new Error("Unknown expr type")}}}}function LD(e,t){return t-e}function lM(e,t){let n=[];return i(t),n.sort(LD);function i(s){let o=e[s];if(o.length==1&&!o[0].term)return i(o[0].to);n.push(s);for(let r=0;r<o.length;r++){let{term:l,to:a}=o[r];!l&&n.indexOf(a)==-1&&i(a)}}}function bTe(e){let t=Object.create(null);return n(lM(e,0));function n(i){let s=[];i.forEach(r=>{e[r].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c<s.length;c++)s[c][0]==l&&(u=s[c][1]);lM(e,a).forEach(c=>{u||s.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=t[i.join(",")]=new td(i.indexOf(e.length-1)>-1);for(let r=0;r<s.length;r++){let l=s[r][1].sort(LD);o.next.push({type:s[r][0],next:t[l.join(",")]||n(l)})}return o}}function kTe(e,t){for(let n=0,i=[e];n<i.length;n++){let s=i[n],o=!s.validEnd,r=[];for(let l=0;l<s.next.length;l++){let{type:a,next:u}=s.next[l];r.push(a.name),o&&!(a.isText||a.hasRequiredAttrs())&&(o=!1),i.indexOf(u)==-1&&i.push(u)}o&&t.err("Only non-generatable nodes ("+r.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ND(e){let t=Object.create(null);for(let n in e){let i=e[n];if(!i.hasDefault)return null;t[n]=i.default}return t}function FD(e,t){let n=Object.create(null);for(let i in e){let s=t&&t[i];if(s===void 0){let o=e[i];if(o.hasDefault)s=o.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=s}return n}function BD(e,t,n,i){for(let s in t)if(!(s in e))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${i}`);for(let s in e)e[s].validate&&e[s].validate(t[s])}function $D(e,t){let n=Object.create(null);if(t)for(let i in t)n[i]=new CTe(e,i,t[i]);return n}class I2{constructor(t,n,i){this.name=t,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=$D(t,i.attrs),this.defaultAttrs=ND(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==td.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:FD(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new wf(this,this.computeAttrs(t),ai.from(n),Hs.setFrom(i))}createChecked(t=null,n,i){return n=ai.from(n),this.checkContent(n),new wf(this,this.computeAttrs(t),n,Hs.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=ai.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let s=this.contentMatch.matchFragment(n),o=s&&s.fillBefore(ai.empty,!0);return o?new wf(this,t,n.append(o),Hs.setFrom(i)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let i=0;i<t.childCount;i++)if(!this.allowsMarks(t.child(i).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){BD(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let i=0;i<t.length;i++)this.allowsMarkType(t[i].type)?n&&n.push(t[i]):n||(n=t.slice(0,i));return n?n.length?n:Hs.none:t}static compile(t,n){let i=Object.create(null);t.forEach((o,r)=>i[o]=new I2(o,n,r));let s=n.spec.topNode||"doc";if(!i[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}}function ATe(e,t,n){let i=n.split("|");return s=>{let o=s===null?"null":typeof s;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${o}`)}}class CTe{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?ATe(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class bk{constructor(t,n,i,s){this.name=t,this.rank=n,this.schema=i,this.spec=s,this.attrs=$D(t,s.attrs),this.excluded=null;let o=ND(this.attrs);this.instance=o?new Hs(this,o):null}create(t=null){return!t&&this.instance?this.instance:new Hs(this,FD(this.attrs,t))}static compile(t,n){let i=Object.create(null),s=0;return t.forEach((o,r)=>i[o]=new bk(o,s++,n,r)),i}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){BD(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class wTe{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in t)n[s]=t[s];n.nodes=eo.from(t.nodes),n.marks=eo.from(t.marks||{}),this.nodes=I2.compile(this.spec.nodes,this),this.marks=bk.compile(this.spec.marks,this);let i=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],r=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=i[r]||(i[r]=td.parse(r,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?aM(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],r=o.spec.excludes;o.excluded=r==null?[o]:r==""?[]:aM(this,r.split(" "))}this.nodeFromJSON=s=>wf.fromJSON(this,s),this.markFromJSON=s=>Hs.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,i,s){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof I2){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,i,s)}text(t,n){let i=this.nodes.text;return new M2(i,i.defaultAttrs,t,Hs.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function aM(e,t){let n=[];for(let i=0;i<t.length;i++){let s=t[i],o=e.marks[s],r=o;if(o)n.push(o);else for(let l in e.marks){let a=e.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&n.push(r=a)}if(!r)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}new wTe({nodes:{doc:{content:"block+"},paragraph:{group:"block",content:"inline*",toDOM:()=>["p",0],parseDOM:[{tag:"p"}]},text:{group:"inline"}}});const xTe=["aria-label"],_Te=["aria-label"],STe={class:"media-lightbox-card"},MTe={class:"media-lightbox-frame"},ITe={key:0,class:"media-lightbox-name"},ETe=["aria-label"],TTe='button:not([disabled]), video[controls], [tabindex]:not([tabindex="-1"])',LTe=tt({__name:"MediaLightbox",props:{media:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.media.kind==="image"),r=F(()=>n.media.path??null),l=F(()=>r.value??(n.media.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentImage"))),a=Z(null),u=Z(null),c=Z(!1);let d=null,f=null;function p(g){if(g.key==="Escape"){g.preventDefault(),i("close");return}if(g.key!=="Tab"||!a.value)return;const m=a.value.querySelectorAll(TTe),y=m[0],w=m[m.length-1];!y||!w||(a.value.contains(document.activeElement)?g.shiftKey&&document.activeElement===y?(g.preventDefault(),w.focus()):!g.shiftKey&&document.activeElement===w&&(g.preventDefault(),y.focus()):(g.preventDefault(),(g.shiftKey?w:y).focus()))}return pn(()=>{if(o.value){f=oTe({api:Pt(),media:n.media,thumbImg:n.originImg??null,onOpen:()=>{c.value=!0},onClose:()=>i("close")});return}Ao.value+=1,d=document.activeElement instanceof HTMLElement?document.activeElement:null,window.addEventListener("keydown",p),u.value?.focus()}),Gn(()=>{if(f){f(),f=null;return}Ao.value=Math.max(0,Ao.value-1),window.removeEventListener("keydown",p),d?.focus()}),(g,m)=>(b(),fe(Wr,{to:"body"},[o.value?c.value?(b(),fe(h(gn),{key:1,text:h(s)("model.close")},{default:he(()=>[C("button",{type:"button",class:"media-lightbox-close","aria-label":h(s)("model.close"),onClick:m[2]||(m[2]=y=>i("close"))},[V(h(Ce),{name:"close",size:"sm"})],8,ETe)]),_:1},8,["text"])):ne("",!0):(b(),I("div",{key:0,ref_key:"overlayRef",ref:a,class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":l.value,onMousedown:m[1]||(m[1]=It(y=>i("close"),["self"]))},[V(h(gn),{text:h(s)("model.close")},{default:he(()=>[C("button",{ref_key:"closeRef",ref:u,type:"button",class:"media-lightbox-close","aria-label":h(s)("model.close"),onClick:m[0]||(m[0]=y=>i("close"))},[V(h(Ce),{name:"close",size:"sm"})],8,_Te)]),_:1},8,["text"]),C("div",STe,[C("div",MTe,[V(Op,{url:e.media.url,kind:e.media.kind==="video"?"video":"image","file-id":e.media.fileId,"media-class":"media-lightbox-media",controls:e.media.kind==="video"},null,8,["url","kind","file-id","controls"])]),r.value?(b(),I("div",ITe,B(r.value),1)):ne("",!0)])],40,xTe))]))}}),kk=vt(LTe,[["__scopeId","data-v-6c0c564d"]]),NTe=["title","aria-label"],FTe={key:1,class:"media-thumb-media media-thumb-tile","aria-hidden":"true"},BTe={key:2,class:"media-thumb-badge","aria-hidden":"true"},$Te={key:3,class:"media-thumb-badge is-error","aria-hidden":"true"},DTe={key:4,class:"media-thumb-badge","aria-hidden":"true"},RTe=["aria-label"],zTe=tt({__name:"MediaThumb",props:{kind:{},name:{},url:{},fileId:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,i=t;function s(u){i("activate",u.currentTarget.querySelector("img"))}const{t:o}=Bt(),r=F(()=>n.name?n.name:n.kind==="video"?o("composer.attachmentVideo"):o("composer.attachmentImage")),l=F(()=>n.url?.startsWith("blob:")??!1),a=F(()=>!n.url||n.kind==="video"&&n.fileId!==void 0&&!l.value);return(u,c)=>(b(),I("span",{class:De(["media-thumb",{"is-error":e.error,uploading:e.uploading}])},[C("button",{type:"button",class:"media-thumb-btn",title:r.value,"aria-label":r.value,onClick:s},[a.value?(b(),I("span",FTe)):(b(),fe(Op,{key:0,url:e.url,kind:e.kind,"file-id":l.value?void 0:e.fileId,"media-class":"media-thumb-media",controls:!1,muted:""},null,8,["url","kind","file-id"])),e.uploading?(b(),I("span",BTe,[V(h(Bi),{size:"sm",label:h(o)("composer.uploading")},null,8,["label"])])):e.error?(b(),I("span",$Te,[V(h(Ce),{name:"info",size:"sm"})])):e.kind==="video"?(b(),I("span",DTe,[V(h(Ce),{name:"play",size:"sm"})])):ne("",!0)],8,NTe),e.removable?(b(),fe(h(gn),{key:0,text:e.removeLabel??h(o)("composer.remove")},{default:he(()=>[C("button",{type:"button",class:"media-thumb-rm","aria-label":e.removeLabel??h(o)("composer.remove"),onClick:c[0]||(c[0]=d=>i("remove"))},[V(h(Ce),{name:"close",size:"sm"})],8,RTe)]),_:1},8,["text"])):ne("",!0)],2))}}),DD=vt(zTe,[["__scopeId","data-v-a7ab7e98"]]),OTe=["title","data-kind"],PTe=["aria-label"],jTe={class:"att-tile"},HTe={class:"att-name"},WTe={key:1,class:"att-err"},qTe=["aria-label"],UTe=tt({__name:"AttachmentChip",props:{kind:{},name:{},url:{},fileId:{},mediaType:{},size:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>{const d=n.name?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??n.mediaType?.split("/")[1]?.split("+")[0];return d?d.toUpperCase():void 0}),r=F(()=>{const c=o.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(c)?"file-text":"file"}),l=F(()=>n.name?n.name:n.kind==="image"?s("composer.attachmentImage"):n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentFile"));function a(c){return c<1024?`${c} B`:c<1024*1024?`${Math.round(c/1024)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`}const u=F(()=>{const c=[l.value];return n.size!==void 0&&c.push(a(n.size)),c.join(" · ")});return(c,d)=>(b(),I("span",{class:De(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:u.value,"data-kind":e.kind},[C("button",{type:"button",class:"att-activate","aria-label":u.value,onClick:d[0]||(d[0]=f=>i("activate"))},[C("span",jTe,[e.kind==="image"&&e.url?(b(),fe(Op,{key:0,url:e.url,kind:"image",alt:e.name,"file-id":e.fileId,"media-class":"att-thumb"},null,8,["url","alt","file-id"])):e.kind==="video"?(b(),fe(h(Ce),{key:1,name:"play",size:"sm"})):e.kind==="image"?(b(),fe(h(Ce),{key:2,name:"image",size:"sm"})):(b(),fe(h(Ce),{key:3,name:r.value,size:"sm"},null,8,["name"]))]),C("span",HTe,B(l.value),1),e.uploading?(b(),fe(h(Bi),{key:0,size:"sm",label:h(s)("composer.uploading")},null,8,["label"])):e.error?(b(),I("span",WTe,[V(h(Ce),{name:"info",size:"sm"})])):ne("",!0)],8,PTe),e.removable?(b(),fe(h(gn),{key:0,text:e.removeLabel??h(s)("composer.remove")},{default:he(()=>[C("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??h(s)("composer.remove"),onClick:d[1]||(d[1]=f=>i("remove"))},[V(h(Ce),{name:"close",size:"sm"})],8,qTe)]),_:1},8,["text"])):ne("",!0)],10,OTe))}}),RD=vt(UTe,[["__scopeId","data-v-f3a3043a"]]),KTe="/assets/kimi_avatar_default-srYjF2HV.riv",VTe={key:0,class:"mascot-fallback",viewBox:"5 0 240.776 240.776","aria-hidden":"true"},ZTe="light/dark",GTe="click_avator",QTe="hoverspace",YTe=tt({__name:"KimiMascot",setup(e){const t=Z(!1),n=Z(null),i=rv();let s=null,o=null,r=null;function l(){s!==null&&vC(s,ZTe,i.value?1:0)}pn(async()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)try{const[{Rive:c,RuntimeLoader:d},f,p]=await Promise.all([ns(()=>import("./rive-CeXCFBdn.js").then(k=>k.r),__vite__mapDeps([10,3])),ns(()=>import("./rive-BxcgqsjB.js"),[]).then(k=>k.default),ns(()=>import("./rive_fallback-ByshBW-N.js"),[]).then(k=>k.default)]),g=n.value;if(!g)return;d.setWasmUrl(f),d.setWasmFallbackUrl(p);const m=new c({canvas:g,src:KTe,autoplay:!0,onLoad(){const k=m.stateMachineNames[0];k!==void 0&&m.play(k),requestAnimationFrame(()=>{n.value&&(l(),m.resizeDrawingSurfaceToCanvas(),r=vL(m,g),t.value=!0)})}});s=m;const y=Qe(i,l),w=()=>m.resizeDrawingSurfaceToCanvas();window.addEventListener("resize",w),o=()=>{r?.(),r=null,y(),window.removeEventListener("resize",w),m.cleanup(),s=null}}catch{}}),Gn(()=>{o?.(),o=null});function a(c){s!==null&&vC(s,QTe,c)}function u(){s!==null&&kte(s,GTe)}return(c,d)=>(b(),I("div",{class:"mascot-host",role:"img","aria-label":"Kimi mascot",onPointerenter:d[0]||(d[0]=f=>a(!0)),onPointerleave:d[1]||(d[1]=f=>a(!1)),onClick:u},[t.value?ne("",!0):(b(),I("svg",VTe,[...d[2]||(d[2]=[Lu('<defs data-v-27600ac7><radialGradient id="mascot-body-gradient" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(125.388 105.735) scale(121.866)" data-v-27600ac7><stop stop-color="#117DFB" data-v-27600ac7></stop><stop stop-color="#449BFF" offset="0.759254" data-v-27600ac7></stop><stop stop-color="#77B6FF" offset="1" data-v-27600ac7></stop></radialGradient></defs><g data-v-27600ac7><path d="M125.388 0C191.877 0 245.776 53.8995 245.776 120.388C245.776 186.877 191.877 240.776 125.388 240.776C58.8996 240.776 5 186.877 5 120.388C5 53.8995 58.8996 0 125.388 0Z" fill="#2389FF" data-v-27600ac7></path><path d="M125.388 0C191.877 0 245.776 53.8995 245.776 120.388C245.776 186.877 191.877 240.776 125.388 240.776C58.8996 240.776 5 186.877 5 120.388C5 53.8995 58.8996 0 125.388 0Z" fill="url(#mascot-body-gradient)" data-v-27600ac7></path></g><g transform="translate(-33.4 0)" data-v-27600ac7><g transform="rotate(7.8 127.94 83.94)" data-v-27600ac7><path d="M111.089 73.2179C109.935 64.8166 115.756 57.078 124.091 55.9333C132.426 54.7886 140.117 60.6713 141.271 69.0726L144.785 94.6564C145.939 103.058 140.118 110.796 131.783 111.941C123.449 113.086 115.757 107.203 114.603 98.8018L111.089 73.2179Z" fill="#FFFFFF" data-v-27600ac7></path></g><g transform="translate(0 8.5) rotate(7.8 189.67 75.44)" data-v-27600ac7><path d="M174.422 65.1492C173.326 57.1679 178.518 49.8626 186.019 48.8324C193.52 47.8021 200.489 53.4371 201.586 61.4184L204.924 85.723C206.02 93.7042 200.828 101.01 193.327 102.04C185.825 103.07 178.856 97.435 177.76 89.4538L174.422 65.1492Z" fill="#FFFFFF" data-v-27600ac7></path></g></g>',3)])])),C("canvas",{ref_key:"canvasRef",ref:n,class:De(["mascot-canvas",{ready:t.value}])},null,2)],32))}}),JTe=vt(YTe,[["__scopeId","data-v-27600ac7"]]),XTe={class:"working-indicator",role:"status"},eLe={class:"wi-mascot","aria-hidden":"true"},tLe={class:"wi-label"},nLe=tt({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(b(),I("div",XTe,[C("span",eLe,[V(JTe)]),C("span",tLe,B(e.label),1)]))}}),zD=vt(nLe,[["__scopeId","data-v-8abb44ef"]]),iLe={class:"chat"},sLe={key:0,class:"chat-loading"},oLe={class:"chat-loading-text"},rLe={key:1,class:"chat-empty"},lLe={key:1,class:"top-sentinel-text"},aLe={key:0,class:"u-turn"},uLe=["data-turn-id"],cLe={key:0,class:"u-media"},dLe={key:1,class:"u-atts"},fLe={key:2,class:"skill-act"},hLe={class:"skill-act-head"},pLe={key:3,class:"skill-act"},gLe={class:"skill-act-head"},mLe=["aria-expanded","onClick"],vLe={key:0,class:"u-meta"},yLe=["aria-label","onClick"],bLe={class:"u-edit-hint"},kLe=["aria-label","onClick"],ALe=["aria-label","onClick"],CLe=["data-turn-id"],wLe=["onClick"],xLe={class:"cd-view"},_Le={key:1,class:"cd-label"},SLe=["data-turn-id"],MLe={key:0,class:"goal-prov"},ILe={key:1,class:"msg"},ELe={key:3,class:"a-msg-ft"},TLe={key:0,class:"a-time"},LLe=["aria-label","onClick"],NLe={key:4,class:"compact-divider",role:"separator"},FLe={class:"cd-label",role:"status"},BLe={key:3,class:"turn-failed",role:"alert"},$Le={class:"tf-chip","aria-hidden":"true"},DLe={class:"tf-main"},RLe={class:"tf-title"},zLe=["title"],OLe=["title"],PLe={key:5,class:"sending-placeholder"},jLe={key:6,class:"q-stack"},HLe={class:"q-head"},WLe={class:"q-title"},qLe={class:"q-hint"},ULe=["onDragover","onDrop"],KLe={class:"u-bub q-bub"},VLe=["title","onDragstart"],ZLe=["title","onClick"],GLe={key:0,class:"u-text q-text"},QLe={key:1,class:"q-text q-text-placeholder"},YLe=["aria-expanded","onClick"],JLe={key:0,class:"q-imgs"},XLe={key:0,class:"q-file"},eNe={key:1,class:"q-tag q-tag-next"},tNe={key:2,class:"q-tag q-tag-idx"},nNe=["aria-label","onClick"],iNe={key:0,class:"open-unsupported",role:"status"},sNe=2500,oNe=10,rNe=tt({__name:"ChatPane",props:{turns:{},cwd:{},turnFilesInteractive:{type:Boolean,default:!0},approvals:{default:()=>[]},questions:{default:()=>[]},turnActive:{type:Boolean,default:!1},working:{type:Boolean,default:!1},sessionLoading:{type:Boolean},compaction:{default:null},hasMoreMessages:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},loadingMoreError:{type:Boolean,default:!1},isFollowing:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},queued:{default:()=>[]},undoHintTurnId:{default:null},interruptedTurnId:{default:null},turnFailed:{type:Boolean,default:!1},turnError:{default:null},turnRetry:{default:null}},emits:["openFile","openMedia","openTurnDiff","copyConversationCopied","openCompaction","openAgent","editMessage","armedUndo","loadOlderMessages","unqueue","editQueued","reorderQueue","resumeTurn"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),{confirm:s}=Hu();An(()=>{pe!==null&&(clearTimeout(pe),pe=null),q!==null&&(clearTimeout(q),q=null),z!==null&&(clearTimeout(z),z=null),ht!==null&&(clearTimeout(ht),ht=null)});const o=e,r=Z(null);let l=null;function a(){!r.value||typeof IntersectionObserver>"u"||(l?.disconnect(),l=new IntersectionObserver(He=>{He[0]?.isIntersecting&&o.hasMoreMessages&&!o.loadingMore&&!o.loadingMoreError&&!o.sessionLoading&&!o.isFollowing&&m("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),l.observe(r.value))}pn(a),An(()=>{l?.disconnect(),l=null}),Qe(()=>[o.hasMoreMessages,o.loadingMore,o.loadingMoreError],()=>{kt().then(a)});const u=F(()=>{if(!o.turnActive||o.turns.length===0)return null;const He=o.turns.at(-1);return He.role==="assistant"?He.id:null}),c=F(()=>{const He=new Map;for(const st of o.turns){if(st.role!=="assistant"||st.id===u.value)continue;const Ve=gke(st);Ve.length>0&&He.set(st.id,Ve)}return He}),d=F(()=>o.working),f=F(()=>{const He=o.turnRetry;if(He!=null)return i("conversation.workingRetry",{n:He.nextAttempt,max:He.maxAttempts});const st=o.turns.at(-1),Ve=st?.role==="assistant"&&(st.text.trim().length>0||(st.thinking?.trim().length??0)>0||(st.tools?.length??0)>0);return i(Ve?"conversation.working":"conversation.requesting")}),p=F(()=>o.turnError?.code==="loop.max_steps_exceeded"?i("conversation.turnFailedMaxSteps"):i("conversation.turnFailed")),g=F(()=>{const He=o.turnError;if(!He)return"";const st=[];return He.code!==void 0&&He.code.length>0&&st.push(He.code),He.statusCode!==void 0&&st.push(`HTTP ${He.statusCode}`),He.requestId!==void 0&&He.requestId.length>0&&st.push(He.requestId),st.join(" · ")}),m=n,y=He=>m("openFile",He),w=He=>m("openMedia",He),k=He=>m("openAgent",He),A=He=>m("openTurnDiff",He),v=Z(null),x=Z(null);function E(He){return(He.attachments?.length??0)>0}function S(He){m("editQueued",He)}function M(He,st){if(v.value=He,!st.dataTransfer)return;st.dataTransfer.effectAllowed="move",st.dataTransfer.setData("text/plain",String(He));const Ve=st.currentTarget?.closest(".q-turn");Ve&&st.dataTransfer.setDragImage(Ve,24,24)}function _(He,st){if(v.value===null)return;st.preventDefault(),st.dataTransfer&&(st.dataTransfer.dropEffect="move");const Ve=st.currentTarget.getBoundingClientRect(),Rt=st.clientY<Ve.top+Ve.height/2?"before":"after";x.value={index:He,position:Rt}}function N(He,st){st.preventDefault();const Ve=v.value,Rt=x.value?.position??"before";if(v.value=null,x.value=null,Ve===null)return;let Ct=Rt==="before"?He:He+1;Ve<Ct&&(Ct-=1),Ve!==Ct&&m("reorderQueue",{from:Ve,to:Ct})}function D(){v.value=null,x.value=null}const T=F(()=>{for(let He=o.turns.length-1;He>=0;He--){const st=o.turns[He];if(st.goalContinuation)return null;if(st.role==="user")return st.id}return null});function $(He){return!o.readOnly&&He.role==="user"&&He.id===T.value&&!o.working&&!He.skillActivation&&!He.pluginCommand}function P(He){const st=He.compaction,Ve=st?.trigger==="auto"?i("conversation.compactedAuto"):i("conversation.compactedPlain");return typeof st?.tokensBefore=="number"&&typeof st?.tokensAfter=="number"?Ve+i("conversation.compactedTokens",{before:Ia(st.tokensBefore),after:Ia(st.tokensAfter)}):Ve}const O=Z(null);function R(He){const st=He.createdAt===void 0?NaN:Date.parse(He.createdAt),Ve=He.endedAt??(Number.isFinite(st)&&He.durationMs!==void 0?new Date(st+He.durationMs).toISOString():He.createdAt);return Ve===void 0?"":oL(Ve,i("conversation.yesterday"))}const W=Z(null);let z=null;async function G(He){await s({title:i("conversation.undo"),message:i("conversation.undoConfirm"),variant:"primary"})&&K(He)}function K(He){W.value===null&&(W.value=He.id,m("editMessage",{text:He.text,attachments:He.attachments}),z=setTimeout(()=>{z=null,W.value=null},sNe))}Qe(()=>o.turns,He=>{W.value!==null&&(He.some(st=>st.id===W.value)||(W.value=null,z!==null&&(clearTimeout(z),z=null)))},{flush:"post"});const H=Z(!1);let q=null;function X(){if(o.turns.length===0)return;const He=[];for(const Ve of o.turns){if(Ve.role==="compaction"||Ve.role==="cron")continue;const Rt=Ve.role==="user"?"User":"Assistant",Ct=cke(Ve);Ct.trim()&&He.push(`**${Rt}** - -${Ct}`)}const st=He.join(` - ---- - -`);ro(st).then(Ve=>{Ve&&(H.value=!0,m("copyConversationCopied"),q!==null&&clearTimeout(q),q=setTimeout(()=>{q=null,H.value=!1},2e3))}).catch(()=>{})}function ee(He){const st=[];for(let Ve=He;Ve>=0;Ve--){const Rt=o.turns[Ve];if(!Rt||Rt.role!=="assistant")break;st.unshift(Rt)}return st}function ue(He){return ee(He).map(st=>uke(st)).filter(Boolean).join(` - -`)}function ie(){for(let He=o.turns.length-1;He>=0;He-=1)if(o.turns[He]?.role==="assistant")return ue(He);return""}function xe(){const He=ie();He.trim()&&ro(He).then(st=>{st&&(H.value=!0,m("copyConversationCopied"),q!==null&&clearTimeout(q),q=setTimeout(()=>{q=null,H.value=!1},2e3))}).catch(()=>{})}t({copyConversation:X,copyFinalSummary:xe});function ce(He){const st=o.turns[He];if(!st||st.role!=="assistant")return!1;const Ve=o.turns[He+1];return!Ve||Ve.role!=="assistant"}let pe=null;function Ne(He){const st=o.turns[He];if(!st)return;const Ve=ue(He);Ve.trim()&&ro(Ve).then(Rt=>{Rt&&(O.value=st.id,pe!==null&&clearTimeout(pe),pe=setTimeout(()=>{pe=null,O.value=null},1400))}).catch(()=>{})}function te(He){const st=He.text;st.trim()&&ro(st).then(Ve=>{Ve&&(O.value=He.id,pe!==null&&clearTimeout(pe),pe=setTimeout(()=>{pe=null,O.value=null},1400))}).catch(()=>{})}const ye=Ts(new Set),j=Ts(new Set),Y=new Map,ve=new WeakMap,re=an("pinScroll",()=>{}),se=new ResizeObserver(He=>{for(const st of He){const Ve=st.target,Rt=ve.get(Ve);Rt!==void 0&&U(Rt,Ve)}});An(()=>se.disconnect());function U(He,st){const Ve=parseFloat(getComputedStyle(st).lineHeight);if(!Number.isFinite(Ve)||Ve<=0)return;const Ct=(st.textContent??"").match(/\n+$/)?.[0].length??0;st.scrollHeight-Math.max(0,Ct-1)*Ve>Ve*oNe+1?ye.add(He):ye.delete(He)}function J(He,st){if(!(st instanceof HTMLElement)||Y.get(He)===st)return;const Ve=Y.get(He);Ve!==void 0&&se.unobserve(Ve),Y.set(He,st),ve.set(st,He),se.observe(st),U(He,st)}function de(He){return`queue:${He.id}`}Qe([()=>o.turns,()=>o.queued],()=>{const He=new Set(o.turns.map(st=>st.id));for(const st of o.queued)He.add(de(st));for(const[st,Ve]of Y)He.has(st)||(se.unobserve(Ve),Y.delete(st),ye.delete(st),j.delete(st))});function me(He){return He.skillActivation?He.skillActivation.args||null:He.pluginCommand?He.pluginCommand.args||null:He.text||null}function Ie(He){return He.skillActivation!==void 0||He.pluginCommand!==void 0}function je(He){return ye.has(He)&&!j.has(He)}function ke(He,st){const Ve=j.has(He);Ve&&st.currentTarget instanceof HTMLElement&&re(st.currentTarget),Ve?j.delete(He):j.add(He)}function Le(He){return He.kind==="image"||He.kind==="video"}function it(He){return(He.attachments??[]).filter(Le)}function Fe(He){return(He.attachments??[]).filter(st=>!Le(st))}function Re(He){return{kind:He.kind==="video"?"video":"image",url:He.url,path:He.name,fileId:He.fileId}}const Ke=Z(null);let ht=null;const ot=Z(null),gt=Z(null);function Tt(He,st){if(He.kind==="image"||He.kind==="video"){gt.value=st??null,ot.value=Re(He);return}He.fileId!==void 0&&dD(Pt(),He.fileId,He.name,He.mediaType).then(Ve=>{Ve==="unsupported"&&(Ke.value=He.name??He.fileId??"",ht!==null&&clearTimeout(ht),ht=setTimeout(()=>{ht=null,Ke.value=null},2400))})}function yn(He,st){return He.id!==u.value||st.kind==="thinking"&&st.durationMs!==void 0?!1:st.sourceIndex===ba(He).length-1}function Gt(He,st){if(He.id!==u.value)return!1;const Ve=st.items.at(-1);return Ve?.kind==="thinking"&&Ve.durationMs!==void 0?!1:Ve!==void 0&&Ve.sourceIndex===ba(He).length-1}const Kt={folded:[],visible:[]};function mn(He){return He.role!=="assistant"?Kt:f$(He)}function _n(He){if(He.id!==u.value)return null;const st=ba(He),Ve=st.at(-1);if(Ve?.kind==="thinking"&&Ve.durationMs!==void 0)return null;if(Ve?.kind==="tool"&&Ve.tool.status==="running"){const Rt=Ve.tool.id;if(o.approvals?.some(Ct=>Ct.toolCallId===Rt)||o.questions?.some(Ct=>Ct.toolCallId===Rt))return null}return st.length-1}return(He,st)=>(b(),I(Be,null,[C("div",iLe,[e.sessionLoading?(b(),I("div",sLe,[V(h(Bi),{size:"sm"}),C("span",oLe,B(h(i)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(b(),I("div",rLe)):ne("",!0),e.hasMoreMessages||e.loadingMore?(b(),I("div",{key:2,ref_key:"topSentinelRef",ref:r,class:De(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(b(),I("span",lLe,[V(h(Bi),{size:"sm"}),Ue(" "+B(h(i)("conversation.loadingOlder")),1)])):(b(),I("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:st[0]||(st[0]=Ve=>m("loadOlderMessages"))},B(h(i)("conversation.loadOlder")),1))],2)):ne("",!0),(b(!0),I(Be,null,yt(e.turns,(Ve,Rt)=>(b(),I(Be,{key:Ve.id},[Ve.role==="user"?(b(),I("div",aLe,[C("div",{class:De(["u-bub turn-anchor",{undoing:W.value===Ve.id}]),"data-turn-id":Ve.id},[it(Ve).length>0?(b(),I("div",cLe,[(b(!0),I(Be,null,yt(it(Ve),(Ct,Fn)=>(b(),fe(DD,{key:Fn,kind:Ct.kind,name:Ct.name,url:Ct.url,"file-id":Ct.fileId,onActivate:Tn=>Tt(Ct,Tn)},null,8,["kind","name","url","file-id","onActivate"]))),128))])):ne("",!0),Fe(Ve).length>0?(b(),I("div",dLe,[(b(!0),I(Be,null,yt(Fe(Ve),(Ct,Fn)=>(b(),fe(RD,{key:Fn,kind:Ct.kind,name:Ct.name,url:Ct.url,"file-id":Ct.fileId,"media-type":Ct.mediaType,size:Ct.size,onActivate:Tn=>Tt(Ct)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):ne("",!0),Ve.skillActivation?(b(),I("div",fLe,[C("div",hLe,[st[3]||(st[3]=C("span",{class:"skill-act-arrow"},"▶",-1)),C("span",null,B(h(i)("conversation.activatedSkill",{name:Ve.skillActivation.name})),1)])])):Ve.pluginCommand?(b(),I("div",pLe,[C("div",gLe,[st[4]||(st[4]=C("span",{class:"skill-act-arrow"},"▶",-1)),C("span",null,"/"+B(Ve.pluginCommand.pluginId)+":"+B(Ve.pluginCommand.commandName),1)])])):ne("",!0),me(Ve)!==null?(b(),I("div",{key:4,class:De(["u-text-wrap",{"is-clamped":je(Ve.id),"u-text-wrap-args":Ie(Ve)}])},[C("div",{class:De(Ie(Ve)?"skill-act-args":"u-text"),ref_for:!0,ref:Ct=>J(Ve.id,Ct)},B(me(Ve)),3),ye.has(Ve.id)?(b(),I("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!je(Ve.id),onClick:Ct=>ke(Ve.id,Ct)},[C("span",null,B(je(Ve.id)?h(i)("conversation.userMessage.expand"):h(i)("conversation.userMessage.collapse")),1),V(h(Ce),{class:"u-text-toggle-car",name:"chevron-down",size:"sm","aria-hidden":"true"})],8,mLe)):ne("",!0)],2)):ne("",!0)],10,uLe),Ve.createdAt||$(Ve)||!e.readOnly&&e.undoHintTurnId===Ve.id?(b(),I("div",vLe,[$(Ve)||!e.readOnly&&e.undoHintTurnId===Ve.id?(b(),I("div",{key:0,class:De(["u-edit-wrap",{undoing:W.value===Ve.id}])},[e.undoHintTurnId===Ve.id?(b(),fe(h(gn),{key:0,text:h(i)("conversation.undoTooltip")},{default:he(()=>[C("button",{type:"button",class:"u-edit u-edit-armed","aria-label":h(i)("conversation.undoTooltip"),onClick:Ct=>m("armedUndo",Ve.id)},[V(h(Ce),{name:"undo",size:"sm"}),C("span",bLe,[Ue(B(h(i)("conversation.escUndoHintPre")),1),V(h(Aa),{keys:["Esc"]}),Ue(B(h(i)("conversation.escUndoHintPost")),1)])],8,yLe)]),_:2},1032,["text"])):(b(),fe(h(gn),{key:1,text:h(i)("conversation.undoTooltip")},{default:he(()=>[C("button",{type:"button",class:"u-edit","aria-label":h(i)("conversation.undoTooltip"),onClick:Ct=>G(Ve)},[V(h(Ce),{name:"undo",size:"sm"})],8,kLe)]),_:2},1032,["text"]))],2)):ne("",!0),V(h(gn),{text:h(i)("filePreview.copy")},{default:he(()=>[Ve.text.trim().length>0?(b(),I("button",{key:0,type:"button",class:"u-copy","aria-label":h(i)("filePreview.copy"),onClick:It(Ct=>te(Ve),["stop"])},[O.value!==Ve.id?(b(),fe(h(Ce),{key:0,name:"copy",size:"sm"})):(b(),fe(h(Ce),{key:1,name:"check",size:"sm"}))],8,ALe)):ne("",!0)]),_:2},1032,["text"]),Ve.createdAt?(b(),fe(w2,{key:1,time:Ve.createdAt},null,8,["time"])):ne("",!0)])):ne("",!0)])):Ve.role==="compaction"?(b(),I("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":Ve.id,role:"separator"},[st[5]||(st[5]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1)),Ve.text?(b(),I("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:Ct=>m("openCompaction",{turnId:Ve.id})},[C("span",null,B(P(Ve)),1),C("span",xLe,B(h(i)("conversation.viewSummary")),1)],8,wLe)):(b(),I("span",_Le,B(P(Ve)),1)),st[6]||(st[6]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,CLe)):Ve.role==="cron"?(b(),fe(KIe,{key:2,text:Ve.text,cron:Ve.cron,"turn-id":Ve.id,"created-at":Ve.createdAt},null,8,["text","cron","turn-id","created-at"])):(b(),I("div",{key:3,class:"a-msg turn-anchor","data-turn-id":Ve.id},[Ve.goalContinuation?(b(),I("div",MLe,[V(h(Ce),{name:"target",size:"sm","aria-hidden":"true"}),C("span",null,B(h(i)("conversation.goal.continuation")),1)])):ne("",!0),mn(Ve).folded.length>0?(b(),fe(yIe,{key:1,items:mn(Ve).folded,mobile:"","streaming-tail-index":_n(Ve),live:Ve.id===u.value,parked:Ve.id===u.value&&_n(Ve)===null,"seed-ms":h(lke)(h(ba)(Ve)),"created-ms":h(FS)(Ve.createdAt),"ended-ms":h(FS)(Ve.endedAt),"duration-ms":Ve.durationMs,onOpenMedia:w,onOpenFile:y,onOpenAgent:k},null,8,["items","streaming-tail-index","live","parked","seed-ms","created-ms","ended-ms","duration-ms"])):ne("",!0),(b(!0),I(Be,null,yt(mn(Ve).visible,(Ct,Fn)=>(b(),I(Be,{key:h(p$)(Ct,Fn)},[Ct.kind==="thinking"?(b(),fe(vk,{key:0,text:Ct.thinking,mobile:"",streaming:yn(Ve,Ct),"started-at":Ct.startedAt,"duration-ms":Ct.durationMs},null,8,["text","streaming","started-at","duration-ms"])):Ct.kind==="text"&&Ct.text?(b(),I("div",ILe,[V(h(Kl),{text:Ct.text,streaming:yn(Ve,Ct),"open-file":y},null,8,["text","streaming"])])):Ct.kind==="activity-run"?(b(),fe(uD,{key:2,items:Ct.items,mobile:"",streaming:Gt(Ve,Ct),onOpenMedia:w,onOpenFile:y,onOpenAgent:k},null,8,["items","streaming"])):Ct.kind==="tool"?(b(),fe(mk,{key:3,tool:Ct.tool,mobile:"",onOpenMedia:w,onOpenFile:y,onOpenAgent:k},null,8,["tool"])):Ct.kind==="notification"?(b(),fe(cD,{key:4,items:Ct.items},null,8,["items"])):ne("",!0)],64))),128)),c.value.get(Ve.id)?(b(),fe(FIe,{key:2,changes:c.value.get(Ve.id),cwd:o.cwd,interactive:e.turnFilesInteractive,onOpenDiff:A,onOpenFile:y},null,8,["changes","cwd","interactive"])):ne("",!0),Ve.id!==u.value&&ce(Rt)&&(ue(Rt).trim().length>0||R(Ve))?(b(),I("div",ELe,[R(Ve)?(b(),I("span",TLe,B(R(Ve)),1)):ne("",!0),V(h(gn),{text:h(i)("filePreview.copy")},{default:he(()=>[ue(Rt).trim().length>0?(b(),I("button",{key:0,class:"a-cpbtn","aria-label":h(i)("filePreview.copy"),onClick:Ct=>Ne(Rt)},[O.value!==Ve.id?(b(),fe(h(Ce),{key:0,name:"copy",size:"sm"})):(b(),fe(h(Ce),{key:1,name:"check",size:"sm"}))],8,LLe)):ne("",!0)]),_:2},1032,["text"])])):ne("",!0)],8,SLe)),Ve.role==="assistant"&&Ve.id===e.interruptedTurnId?(b(),I("div",NLe,[st[7]||(st[7]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1)),C("span",FLe,B(h(i)("conversation.turnInterrupted")),1),st[8]||(st[8]=C("span",{class:"cd-line","aria-hidden":"true"},null,-1))])):ne("",!0)],64))),128)),e.turnFailed?(b(),I("div",BLe,[C("span",$Le,[V(h(Ce),{name:"alert-triangle",size:"sm"})]),C("div",DLe,[C("span",RLe,B(p.value),1),e.turnError?.message?(b(),I("span",{key:0,class:"tf-sub",title:e.turnError.message},B(e.turnError.message),9,zLe)):ne("",!0),g.value?(b(),I("span",{key:1,class:"tf-meta",title:g.value},B(g.value),9,OLe)):ne("",!0)]),e.readOnly?ne("",!0):(b(),fe(h(jt),{key:0,variant:"secondary",size:"sm",onClick:st[1]||(st[1]=Ve=>m("resumeTurn"))},{default:he(()=>[Ue(B(h(i)("conversation.turnFailedResume")),1)]),_:1}))])):ne("",!0),e.compaction?(b(),fe(zIe,{key:4,label:h(i)("conversation.compacting")},null,8,["label"])):ne("",!0),d.value?(b(),I("div",PLe,[V(zD,{label:f.value},null,8,["label"])])):ne("",!0),e.queued.length>0?(b(),I("div",jLe,[C("div",HLe,[C("span",WLe,[V(h(Ce),{name:"mail",size:"sm"}),Ue(" "+B(h(i)("composer.queueLabel"))+" · ",1),C("b",null,B(e.queued.length),1)]),C("span",qLe,B(h(i)("composer.queueAutoDrain")),1)]),(b(!0),I(Be,null,yt(e.queued,(Ve,Rt)=>(b(),I("div",{key:Ve.id,class:De(["u-turn q-turn",{"q-dragging":v.value===Rt,"drop-before":x.value?.index===Rt&&x.value.position==="before","drop-after":x.value?.index===Rt&&x.value.position==="after"}]),onDragover:Ct=>_(Rt,Ct),onDrop:Ct=>N(Rt,Ct)},[C("div",KLe,[C("span",{class:"q-grip",title:h(i)("composer.queueDragTitle"),draggable:"true",onDragstart:Ct=>M(Rt,Ct),onDragend:D},[V(h(Ce),{name:"grip",size:"sm"})],40,VLe),C("div",{class:De(["q-clamp u-text-wrap",{"is-clamped":je(de(Ve))}])},[C("button",{type:"button",class:"q-body",title:h(i)("composer.editQueued"),ref_for:!0,ref:Ct=>J(de(Ve),Ct),onClick:Ct=>S(Rt)},[Ve.text?(b(),I("span",GLe,B(Ve.text),1)):(b(),I("span",QLe,[V(h(Ce),{name:"file",size:"sm"}),Ue(" "+B(h(i)("composer.queuedAttachments",{n:Ve.attachments?.length??0})),1)]))],8,ZLe),ye.has(de(Ve))?(b(),I("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!je(de(Ve)),onClick:Ct=>ke(de(Ve),Ct)},[C("span",null,B(je(de(Ve))?h(i)("conversation.userMessage.expand"):h(i)("conversation.userMessage.collapse")),1),V(h(Ce),{class:"u-text-toggle-car",name:"chevron-down",size:"sm","aria-hidden":"true"})],8,YLe)):ne("",!0)],2),E(Ve)?(b(),I("div",JLe,[(b(!0),I(Be,null,yt(Ve.attachments,(Ct,Fn)=>(b(),I(Be,{key:Fn},[Ct.kind==="file"?(b(),I("span",XLe,[V(h(Ce),{name:"file",size:"sm"}),Ue(" "+B(Ct.name??Ct.fileId),1)])):(b(),fe(Op,{key:1,url:Ct.url,kind:Ct.kind,"file-id":Ct.fileId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id"]))],64))),128))])):ne("",!0),Rt===0?(b(),I("span",eNe,B(h(i)("composer.queueNext")),1)):(b(),I("span",tNe,"#"+B(Rt+1),1)),V(h(gn),{text:h(i)("composer.remove")},{default:he(()=>[C("button",{type:"button",class:"q-rm","aria-label":h(i)("composer.remove"),onClick:It(Ct=>m("unqueue",Rt),["stop"])},[V(h(Ce),{name:"close",size:"sm"})],8,nNe)]),_:2},1032,["text"])])],42,ULe))),128))])):ne("",!0)]),Ke.value!==null?(b(),I("div",iNe,B(h(i)("composer.attachmentOpenUnsupported",{name:Ke.value})),1)):ne("",!0),ot.value?(b(),fe(kk,{key:1,media:ot.value,"origin-img":gt.value,onClose:st[2]||(st[2]=Ve=>{ot.value=null,gt.value=null})},null,8,["media","origin-img"])):ne("",!0)],64))}}),Ak=vt(rNe,[["__scopeId","data-v-2304fd80"]]),lNe={class:"ch-id"},aNe=["title"],uNe={key:1,class:"ch-ws"},cNe={key:2,class:"ch-sep"},dNe=["onKeydown"],fNe={class:"ch-ses"},hNe={key:0,class:"ch-pill ch-sync-pill"},pNe={key:0,class:"ch-ahead"},gNe={key:1,class:"ch-behind"},mNe={key:1,class:"ch-pill ch-diff-pill"},vNe={key:0,class:"ch-add"},yNe={key:1,class:"ch-del"},bNe=tt({__name:"ChatHeader",props:{sessionId:{},workspaceName:{},workspaceRoot:{},sessionTitle:{},branch:{},ahead:{},behind:{},changesCount:{},gitDiffStats:{},isGitRepo:{type:Boolean},pr:{},copied:{type:Boolean}},emits:["copyAll","copyFinalSummary","openChanges","openPr","renameSession","forkSession","archiveSession","exportSession"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=F(()=>i.ahead??0),r=F(()=>i.behind??0),l=F(()=>i.gitDiffStats?.totalAdditions??0),a=F(()=>i.gitDiffStats?.totalDeletions??0),u=F(()=>l.value>0||a.value>0),c={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function d(ee){return ee.trim().toLowerCase().replaceAll("_","-")}function f(ee){const ue=d(ee);return c[ue]?`pr-${ue}`:"pr-unknown"}function p(ee){return n(c[d(ee)]??"header.prStatusUnknown")}const g=Z(!1),m=Z(null),y=Z(null),w=Z({});function k(ee){const ue=ee.target;y.value?.el?.contains(ue)||m.value?.el?.contains(ue)||x()}function A(){x()}async function v(ee){if(ee.stopPropagation(),g.value){x();return}g.value=!0,document.addEventListener("mousedown",k),window.addEventListener("resize",A),await kt();const ue=m.value?.el,ie=y.value?.el;if(!ue||!ie)return;const xe=ue.getBoundingClientRect(),ce=4,pe=8,Ne=ie.offsetWidth,te=ie.offsetHeight;let ye=xe.bottom+ce,j=!1;ye+te>window.innerHeight-pe&&(ye=Math.max(pe,xe.top-te-ce),j=!0);let Y=xe.left,ve=!1;Y+Ne>window.innerWidth-pe&&(Y=Math.max(pe,xe.right-Ne),ve=!0),w.value={top:`${Math.round(ye)}px`,left:`${Math.round(Y)}px`,transformOrigin:`${j?"bottom":"top"} ${ve?"right":"left"}`,"--menu-pop-shift":j?"2px":"-2px"}}function x(){g.value=!1,document.removeEventListener("mousedown",k),window.removeEventListener("resize",A)}An(()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",A)});function E(){s("copyAll"),x()}function S(){s("copyFinalSummary"),x()}const M=Z(!1);function _(){i.sessionId&&ro(i.sessionId).then(ee=>{ee&&(M.value=!0,setTimeout(()=>{M.value=!1},1200))})}const N=Z(!1),D=Z(""),T=Z(null),{handleCompositionStart:$,handleCompositionEnd:P,isComposingKeyEvent:O}=Kr();async function R(){if(x(),!!i.sessionId){N.value=!0,D.value=i.sessionTitle??"",await kt();try{T.value?.focus(),T.value?.select()}catch{}}}function W(){const ee=D.value.trim();ee&&i.sessionId&&ee!==(i.sessionTitle??"").trim()&&s("renameSession",i.sessionId,ee),N.value=!1}function z(ee){O(ee)||W()}function G(){N.value=!1}function K(){i.sessionId&&(x(),s("forkSession",i.sessionId))}function H(){i.sessionId&&(x(),s("exportSession",i.sessionId))}function q(){i.sessionId&&(x(),s("archiveSession",i.sessionId))}const X=!1;return(ee,ue)=>(b(),I("header",{class:De(["chat-header",{"macos-desktop":h(Dc)}])},[C("div",lNe,[h(X)?(b(),I("span",{key:0,class:"ch-dev",title:h(n)("header.devBadge")},"DEV",8,aNe)):ne("",!0),e.workspaceName?(b(),I("span",uNe,B(e.workspaceName),1)):ne("",!0),e.workspaceName&&e.sessionTitle?(b(),I("span",cNe,"/")):ne("",!0),N.value?Bn((b(),I("input",{key:3,ref_key:"renameInputRef",ref:T,"onUpdate:modelValue":ue[0]||(ue[0]=ie=>D.value=ie),class:"ch-rename",type:"text",onKeydown:[qr(It(z,["stop"]),["enter"]),qr(It(G,["stop"]),["esc"])],onCompositionstart:ue[1]||(ue[1]=(...ie)=>h($)&&h($)(...ie)),onCompositionend:ue[2]||(ue[2]=(...ie)=>h(P)&&h(P)(...ie)),onBlur:W,onClick:ue[3]||(ue[3]=It(()=>{},["stop"]))},null,40,dNe)),[[_o,D.value]]):e.sessionTitle?(b(),fe(h(gn),{key:4,text:e.sessionTitle},{default:he(()=>[C("span",fNe,B(e.sessionTitle),1)]),_:1},8,["text"])):ne("",!0)]),V(h(rn),{ref_key:"kebabRef",ref:m,class:De(["ch-act-more",{open:g.value}]),label:h(n)("header.options"),tooltip:h(n)("header.options"),"aria-expanded":g.value,"aria-haspopup":"menu",onClick:ue[4]||(ue[4]=It(ie=>v(ie),["stop"]))},{default:he(()=>[V(h(Ce),{name:"dots-horizontal",size:"sm"})]),_:1},8,["class","label","tooltip","aria-expanded"]),V(ys,{name:"menu-pop"},{default:he(()=>[g.value?(b(),fe(h(cl),{key:0,ref_key:"menuRef",ref:y,class:"ch-menu",style:Vt(w.value),onClick:ue[5]||(ue[5]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{onClick:E},{default:he(()=>[V(h(Ce),{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),Ue(" "+B(e.copied?h(n)("header.copied"):h(n)("header.copyAll")),1)]),_:1}),V(h(bn),{onClick:S},{default:he(()=>[V(h(Ce),{name:"file-text",size:"sm"}),Ue(" "+B(h(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(b(),I(Be,{key:0},[V(h(bn),{separator:""}),V(h(bn),{onClick:_},{default:he(()=>[V(h(Ce),{name:M.value?"check":"copy",size:"sm"},null,8,["name"]),Ue(" "+B(M.value?h(n)("header.copied"):h(n)("header.copySessionId")),1)]),_:1}),V(h(bn),{onClick:R},{default:he(()=>[V(h(Ce),{name:"pencil",size:"sm"}),Ue(" "+B(h(n)("header.renameSession")),1)]),_:1}),V(h(bn),{onClick:K},{default:he(()=>[V(h(Ce),{name:"git-fork",size:"sm"}),Ue(" "+B(h(n)("header.forkSession")),1)]),_:1}),V(h(bn),{onClick:H},{default:he(()=>[V(h(Ce),{name:"download",size:"sm"}),Ue(" "+B(h(n)("header.exportSession")),1)]),_:1}),V(h(bn),{onClick:q},{default:he(()=>[V(h(Ce),{name:"archive",size:"sm"}),Ue(" "+B(h(n)("header.archiveSession")),1)]),_:1})],64)):ne("",!0)]),_:1},8,["style"])):ne("",!0)]),_:1}),ue[8]||(ue[8]=C("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(b(),I("button",{key:0,type:"button",class:"ch-git",onClick:ue[6]||(ue[6]=ie=>s("openChanges"))},[V(h(Ce),{class:"ch-branch-icon",name:"git-fork",size:"sm"}),C("span",{class:De(["ch-branch",{"ch-detached":!e.branch}])},B(e.branch||h(n)("header.detached")),3),o.value>0||r.value>0?(b(),I("span",hNe,[o.value>0?(b(),I("span",pNe,"↑"+B(o.value),1)):ne("",!0),r.value>0?(b(),I("span",gNe,"↓"+B(r.value),1)):ne("",!0)])):ne("",!0),u.value?(b(),I("span",mNe,[l.value>0?(b(),I("span",vNe,"+"+B(l.value),1)):ne("",!0),a.value>0?(b(),I("span",yNe,"-"+B(a.value),1)):ne("",!0)])):ne("",!0)])):ne("",!0),e.pr?(b(),I("button",{key:1,type:"button",class:De(["ch-pill ch-pr",f(e.pr.state)]),onClick:ue[7]||(ue[7]=ie=>e.pr&&s("openPr",e.pr.url))},[V(h(Ce),{name:"git-pull-request",size:"sm"}),C("span",null,"PR #"+B(e.pr.number)+" · "+B(p(e.pr.state)),1)],2)):ne("",!0)],2))}}),kNe=vt(bNe,[["__scopeId","data-v-cac58d83"]]),ANe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],uM=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function CNe(e){if(e<=255)return ANe[e];let t=0,n=uM.length-1;for(;t<=n;){const i=t+n>>1,s=uM[i];if(e<s[0]){n=i-1;continue}if(e>s[1]){t=i+1;continue}return s[2]}return"L"}function wNe(e){const t=e.length;if(t===0)return null;const n=new Array(t);let i=!1;for(let u=0;u<t;){const c=e.charCodeAt(u);let d=c,f=1;if(c>=55296&&c<=56319&&u+1<t){const g=e.charCodeAt(u+1);g>=56320&&g<=57343&&(d=(c-55296<<10)+(g-56320)+65536,f=2)}const p=CNe(d);(p==="R"||p==="AL"||p==="AN")&&(i=!0);for(let g=0;g<f;g++)n[u+g]=p;u+=f}if(!i)return null;let s=0;for(let u=0;u<t;u++){const c=n[u];if(c==="L"){s=0;break}if(c==="R"||c==="AL"){s=1;break}}const o=new Int8Array(t);for(let u=0;u<t;u++)o[u]=s;const r=s&1?"R":"L",l=r;let a=l;for(let u=0;u<t;u++)n[u]==="NSM"?n[u]=a:a=n[u];a=l;for(let u=0;u<t;u++){const c=n[u];c==="EN"?n[u]=a==="AL"?"AN":"EN":(c==="R"||c==="L"||c==="AL")&&(a=c)}for(let u=0;u<t;u++)n[u]==="AL"&&(n[u]="R");for(let u=1;u<t-1;u++)n[u]==="ES"&&n[u-1]==="EN"&&n[u+1]==="EN"&&(n[u]="EN"),n[u]==="CS"&&(n[u-1]==="EN"||n[u-1]==="AN")&&n[u+1]===n[u-1]&&(n[u]=n[u-1]);for(let u=0;u<t;u++){if(n[u]!=="EN")continue;let c;for(c=u-1;c>=0&&n[c]==="ET";c--)n[c]="EN";for(c=u+1;c<t&&n[c]==="ET";c++)n[c]="EN"}for(let u=0;u<t;u++){const c=n[u];(c==="WS"||c==="ES"||c==="ET"||c==="CS")&&(n[u]="ON")}a=l;for(let u=0;u<t;u++){const c=n[u];c==="EN"?n[u]=a==="L"?"L":"EN":(c==="R"||c==="L")&&(a=c)}for(let u=0;u<t;u++){if(n[u]!=="ON")continue;let c=u+1;for(;c<t&&n[c]==="ON";)c++;const d=u>0?n[u-1]:l,f=c<t?n[c]:l,p=d!=="L"?"R":"L";if(p===(f!=="L"?"R":"L"))for(let m=u;m<c;m++)n[m]=p;u=c-1}for(let u=0;u<t;u++)n[u]==="ON"&&(n[u]=r);for(let u=0;u<t;u++){const c=n[u];(o[u]&1)===0?c==="R"?o[u]++:(c==="AN"||c==="EN")&&(o[u]+=2):(c==="L"||c==="AN"||c==="EN")&&o[u]++}return o}function xNe(e,t){const n=wNe(e);if(n===null)return null;const i=new Int8Array(t.length);for(let s=0;s<t.length;s++)i[s]=n[t[s]];return i}const _Ne=/[ \t\n\r\f]+/g,SNe=/[\t\n\r\f]| {2,}|^ | $/;function MNe(e){const t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function INe(e){if(!SNe.test(e))return e;let t=e.replace(_Ne," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function ENe(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` -`).replace(/[\r\f]/g,` -`):e}let k4=null,TNe;function LNe(){return k4===null&&(k4=new Intl.Segmenter(TNe,{granularity:"word"})),k4}const NNe=/\p{Script=Arabic}/u,Uu=/\p{M}/u,Ck=/\p{Nd}/u;function cM(e){return NNe.test(e)}function dM(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Vl(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){const i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){const s=(n-55296<<10)+(i-56320)+65536;if(dM(s))return!0;t++;continue}}if(dM(n))return!0}}return!1}function FNe(e){const t=jp(e);return t!==null&&(wk.has(t)||nd.has(t))}const BNe=new Set([" "," ","⁠","\uFEFF"]),$Ne=new Set(["-","‐","–","—"]);function DNe(e){const t=jp(e);return t!==null&&BNe.has(t)}function RNe(e){const t=jp(e);return t!==null&&$Ne.has(t)}function OD(e,t){return DNe(e)?!1:t?!(FNe(e)||RNe(e)):!0}const wk=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),Bv=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),xk=new Set(["'","’"]),nd=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),zNe=new Set([":",".","،","؛"]),ONe=new Set(["၏"]),PNe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function jNe(e){if(_k(e))return!0;let t=!1;for(const n of e){if(nd.has(n)||Dv(n)){t=!0;continue}if(!(t&&Uu.test(n)))return!1}return t}function HNe(e){for(const t of e)if(!wk.has(t)&&!nd.has(t))return!1;return e.length>0}function WNe(e){if(_k(e))return!0;for(const t of e)if(!Bv.has(t)&&!xk.has(t)&&!Uu.test(t)&&!Dv(t))return!1;return e.length>0}function _k(e){let t=!1;for(const n of e)if(!(n==="\\"||Uu.test(n))){if(Bv.has(n)||nd.has(n)||xk.has(n)){t=!0;continue}return!1}return t}function $v(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const i=e.charCodeAt(n);if(i<56320||i>57343)return n;const s=n-1;if(s<0)return n;const o=e.charCodeAt(s);return o>=55296&&o<=56319?s:n}function jp(e){if(e.length===0)return null;const t=$v(e,e.length);return e.slice(t)}function qNe(e){for(const t of e)if(!Uu.test(t))return t;return null}function UNe(e){for(let t=e.length;t>0;){const n=$v(e,t),i=e.slice(n,t);if(!Uu.test(i))return i;t=n}return null}const KNe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function VNe(e,t){for(let n=0;n<t.length;n+=2)if(e>=t[n]&&e<=t[n+1])return!0;return!1}function Dv(e){const t=e.codePointAt(0);return t!==void 0&&VNe(t,KNe)}function ZNe(e){const t=UNe(e);return t!==null&&Dv(t)}function GNe(e){const t=qNe(e);return t!==null&&Ck.test(t)}function QNe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const i=t[n-1];if(Uu.test(i)){n--;continue}if(Bv.has(i)||xk.has(i)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function YNe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function fM(e,t,n,i){const s=t[i],o=e[i];if(s==null)return o;const r=n[i];if(o.length===r)return o;const l=s.repeat(r);return e[i]=l,l}function hM(e,t){return e&&t!==null&&zNe.has(t)}function JNe(e){const t=jp(e);return t!==null&&ONe.has(t)}function XNe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function O8(e){let t=e.length;for(;t>0;){const n=$v(e,t),i=e.slice(n,t);if(PNe.has(i))return!0;if(!nd.has(i))return!1;t=n}return!1}function eFe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` -`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const tFe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function dl(e){return e.length===1?e[0]:e.join("")}function nFe(e,t){const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),dl(n)}function iFe(e,t,n,i){if(!tFe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let o=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=eFe(c,i),f=d==="text"&&t;if(o!==null&&d===o&&f===a){r.push(c),u+=c.length;continue}o!==null&&s.push({text:dl(r),isWordLike:a,kind:o,start:l}),o=d,r=[c],l=n+u,a=f,u+=c.length}return o!==null&&s.push({text:dl(r),isWordLike:a,kind:o,start:l}),s}function P8(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const sFe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function oFe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:sFe.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function rFe(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function lFe(e){const t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),s=e.starts.slice();for(let r=0;r<e.len;r++){if(i[r]!=="text"||!oFe(e,r))continue;const l=[t[r]];let a=r+1;for(;a<e.len&&!P8(i[a]);){l.push(t[a]),n[r]=!0;const u=t[a].includes("?");if(i[a]="text",t[a]="",a++,u)break}t[r]=dl(l)}let o=0;for(let r=0;r<t.length;r++){const l=t[r];l.length!==0&&(o!==r&&(t[o]=l,n[o]=n[r],i[o]=i[r],s[o]=s[r]),o++)}return t.length=o,n.length=o,i.length=o,s.length=o,{len:o,texts:t,isWordLike:n,kinds:i,starts:s}}function aFe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o];if(t.push(r),n.push(e.isWordLike[o]),i.push(e.kinds[o]),s.push(e.starts[o]),!rFe(r))continue;const l=o+1;if(l>=e.len||P8(e.kinds[l]))continue;const a=[],u=e.starts[l];let c=l;for(;c<e.len&&!P8(e.kinds[c]);)a.push(e.texts[c]),c++;a.length>0&&(t.push(dl(a)),n.push(!0),i.push("text"),s.push(u),o=c-1)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}const uFe=new Set([":","-","/","×",",",".","+","–","—"]),cFe=/[\p{P}\p{S}\p{Co}]/u,dFe=/\p{Emoji_Presentation}/u,fFe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function hFe(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function PD(e){const t=e.charCodeAt(0);return t<128?hFe(t):!fFe.has(e)&&!dFe.test(e)&&cFe.test(e)}function pM(e){let t=!1;for(const n of e)if(!Uu.test(n)){if(!PD(n))return!1;t=!0}return t}function pFe(e){for(let t=e.length;t>0;){const n=$v(e,t),i=e.slice(n,t);if(Uu.test(i)){t=n;continue}return PD(i)||Dv(i)}return!1}function gFe(e,t,n,i){const s=!t&&pM(e),o=!i&&pM(n),r=ZNe(e),l=(t||r)&&pFe(e);return!s&&!o&&!l||Vl(e)||Vl(n)?!1:(t||s||r)&&(i||o)}function jD(e){for(const t of e)if(Ck.test(t))return!0;return!1}function E2(e){if(e.length===0)return!1;for(const t of e)if(!(Ck.test(t)||uFe.has(t)))return!1;return!0}function mFe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o],l=e.kinds[o];if(l==="text"&&E2(r)&&jD(r)){const a=[r];let u=o+1;for(;u<e.len&&e.kinds[u]==="text"&&E2(e.texts[u]);)a.push(e.texts[u]),u++;t.push(dl(a)),n.push(!0),i.push("text"),s.push(e.starts[o]),o=u-1;continue}t.push(r),n.push(e.isWordLike[o]),i.push(l),s.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function vFe(e){const t=[],n=[],i=[],s=[];let o=0;for(;o<e.len;){const r=e.texts[o],l=e.kinds[o],a=e.isWordLike[o];if(l==="text"){const u=[r];let c=o+1,d=a;for(;c<e.len&&e.kinds[c]==="text"&&gFe(e.texts[c-1],e.isWordLike[c-1],e.texts[c],e.isWordLike[c]);){const f=e.texts[c];u.push(f),d=d||e.isWordLike[c],c++}if(c>o+1){t.push(dl(u)),n.push(d),i.push("text"),s.push(e.starts[o]),o=c;continue}}t.push(r),n.push(a),i.push(l),s.push(e.starts[o]),o++}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function yFe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o];if(e.kinds[o]==="text"&&r.includes("-")){const l=r.split("-");let a=l.length>1;for(let u=0;u<l.length;u++){const c=l[u];if(!a)break;(c.length===0||!jD(c)||!E2(c))&&(a=!1)}if(a){let u=0;for(let c=0;c<l.length;c++){const d=l[c],f=c<l.length-1?`${d}-`:d;t.push(f),n.push(!0),i.push("text"),s.push(e.starts[o]+u),u+=f.length}continue}}t.push(r),n.push(e.isWordLike[o]),i.push(e.kinds[o]),s.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function bFe(e){const t=[],n=[],i=[],s=[];let o=0;for(;o<e.len;){const r=[e.texts[o]];let l=e.isWordLike[o],a=e.kinds[o],u=e.starts[o];if(a==="glue"){const c=[r[0]],d=u;for(o++;o<e.len&&e.kinds[o]==="glue";)c.push(e.texts[o]),o++;const f=dl(c);if(o<e.len&&e.kinds[o]==="text")r[0]=f,r.push(e.texts[o]),l=e.isWordLike[o],a="text",u=d,o++;else{t.push(f),n.push(!1),i.push("glue"),s.push(d);continue}}else o++;if(a==="text")for(;o<e.len&&e.kinds[o]==="glue";){const c=[];for(;o<e.len&&e.kinds[o]==="glue";)c.push(e.texts[o]),o++;const d=dl(c);if(o<e.len&&e.kinds[o]==="text"){r.push(d,e.texts[o]),l=l||e.isWordLike[o],o++;continue}r.push(d)}t.push(dl(r)),n.push(l),i.push(a),s.push(u)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function kFe(e){const t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),s=e.starts.slice();for(let o=0;o<t.length-1;o++){if(i[o]!=="text"||i[o+1]!=="text"||!Vl(t[o])||!Vl(t[o+1]))continue;const r=QNe(t[o]);r!==null&&(t[o]=r.head,t[o+1]=r.tail+t[o+1],s[o+1]=s[o]+r.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function AFe(e,t,n){const i=LNe();let s=0;const o=[],r=[],l=[],a=[],u=[],c=[],d=[],f=[],p=[],g=[],m=[],y=[];for(const E of i.segment(e))for(const S of iFe(E.segment,E.isWordLike??!1,E.index,n)){let R=function(){c[O]!==null&&(r[O]=[fM(o,c,d,O)],c[O]=null),r[O].push(S.text),l[O]=l[O]||S.isWordLike,f[O]=f[O]||N,p[O]=p[O]||D,g[O]=$,m[O]=P,y[O]=hM(p[O],T)};const M=S.kind==="text",_=YNe(S.text,S.isWordLike,S.kind),N=Vl(S.text),D=cM(S.text),T=jp(S.text),$=O8(S.text),P=JNe(S.text),O=s-1;t.carryCJKAfterClosingQuote&&M&&s>0&&a[O]==="text"&&N&&f[O]&&g[O]||M&&s>0&&a[O]==="text"&&HNe(S.text)&&f[O]||M&&s>0&&a[O]==="text"&&m[O]?R():M&&s>0&&a[O]==="text"&&S.isWordLike&&D&&y[O]?(R(),l[O]=!0):_!==null&&s>0&&a[O]==="text"&&c[O]===_?d[O]=(d[O]??1)+1:M&&!S.isWordLike&&s>0&&a[O]==="text"&&!f[O]&&(jNe(S.text)||S.text==="-"&&l[O])?R():(o[s]=S.text,r[s]=[S.text],l[s]=S.isWordLike,a[s]=S.kind,u[s]=S.start,c[s]=_,d[s]=_===null?0:1,f[s]=N,p[s]=D,g[s]=$,m[s]=P,y[s]=hM(D,T),s++)}for(let E=0;E<s;E++){if(c[E]!==null){o[E]=fM(o,c,d,E);continue}o[E]=dl(r[E])}for(let E=1;E<s;E++)a[E]==="text"&&!l[E]&&_k(o[E])&&a[E-1]==="text"&&!f[E-1]&&(o[E-1]+=o[E],l[E-1]=l[E-1]||l[E],o[E]="");const w=Array.from({length:s},()=>null);let k=-1;for(let E=s-1;E>=0;E--){const S=o[E];if(S.length!==0){if(a[E]==="text"&&!l[E]&&k>=0&&a[k]==="text"&&(WNe(S)||S==="-"&&GNe(o[k]))){const M=w[k]??[];M.push(S),w[k]=M,u[k]=u[E],o[E]="";continue}k=E}}for(let E=0;E<s;E++){const S=w[E];S!=null&&(o[E]=nFe(S,o[E]))}let A=0;for(let E=0;E<s;E++){const S=o[E];S.length!==0&&(A!==E&&(o[A]=S,l[A]=l[E],a[A]=a[E],u[A]=u[E]),A++)}o.length=A,l.length=A,a.length=A,u.length=A;const v=bFe({len:A,texts:o,isWordLike:l,kinds:a,starts:u}),x=kFe(vFe(yFe(mFe(aFe(lFe(v))))));for(let E=0;E<x.len-1;E++){const S=XNe(x.texts[E]);S!==null&&(x.kinds[E]!=="space"&&x.kinds[E]!=="preserved-space"||x.kinds[E+1]!=="text"||!cM(x.texts[E+1])||(x.texts[E]=S.space,x.isWordLike[E]=!1,x.kinds[E]=x.kinds[E]==="preserved-space"?"preserved-space":"space",x.texts[E+1]=S.marks+x.texts[E+1],x.starts[E+1]=x.starts[E]+S.space.length))}return x}function CFe(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let i=0;for(let s=0;s<e.len;s++)e.kinds[s]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:s,consumedEndSegmentIndex:s+1}),i=s+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function wFe(e,t,n){if(t.len<=1)return t;const i=[],s=[],o=[],r=[];let l=-1,a=!1;function u(f){i.push(t.texts[f]),s.push(t.isWordLike[f]),o.push("text"),r.push(t.starts[f])}function c(f,p){let g=!1;for(let w=f;w<p;w++)g=g||t.isWordLike[w];const m=t.starts[f],y=p<t.len?t.starts[p]:e.length;i.push(e.slice(m,y)),s.push(g),o.push("text"),r.push(m)}function d(f){if(!(l<0)){if(a)l+1===f?u(l):c(l,f);else for(let p=l;p<f;p++)u(p);l=-1,a=!1}}for(let f=0;f<t.len;f++){const p=t.texts[f],g=t.kinds[f];if(g==="text"){l>=0&&!OD(t.texts[f-1],n)&&d(f),l<0&&(l=f),a=a||Vl(p);continue}d(f),i.push(p),s.push(t.isWordLike[f]),o.push(g),r.push(t.starts[f])}return d(t.len),{len:i.length,texts:i,isWordLike:s,kinds:o,starts:r}}function xFe(e,t,n="normal",i="normal"){const s=MNe(n),o=s.mode==="pre-wrap"?ENe(e):INe(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=AFe(o,t,s),l=i==="keep-all"?wFe(o,r,t.breakKeepAllAfterPunctuation):r;return{normalized:o,chunks:CFe(l,s),...l}}let $d=null;const gM=new Map;let Dd=null;const _Fe=96,SFe=/\p{Emoji_Presentation}/u,MFe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let A4=null;const mM=new Map;function Sk(){if($d!==null)return $d;if(typeof OffscreenCanvas<"u")return $d=new OffscreenCanvas(1,1).getContext("2d"),$d;if(typeof document<"u")return $d=document.createElement("canvas").getContext("2d"),$d;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function IFe(e){let t=gM.get(e);return t||(t=new Map,gM.set(e,t)),t}function cu(e,t){let n=t.get(e);return n===void 0&&(n={width:Sk().measureText(e).width,containsCJK:Vl(e)},t.set(e,n)),n}function Rv(){if(Dd!==null)return Dd;if(typeof navigator>"u")return Dd={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Dd;const e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),i=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Dd={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:i,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Dd}function EFe(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function HD(){return A4===null&&(A4=new Intl.Segmenter(void 0,{granularity:"grapheme"})),A4}function TFe(e){return SFe.test(e)||e.includes("️")}function LFe(e){return MFe.test(e)}function NFe(e,t){let n=mM.get(e);if(n!==void 0)return n;const i=Sk();i.font=e;const s=i.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const o=document.createElement("span");o.style.font=e,o.style.display="inline-block",o.style.visibility="hidden",o.style.position="absolute",o.textContent="😀",document.body.appendChild(o);const r=o.getBoundingClientRect().width;document.body.removeChild(o),s-r>.5&&(n=s-r)}return mM.set(e,n),n}function FFe(e){let t=0;const n=HD();for(const i of n.segment(e))TFe(i.segment)&&t++;return t}function BFe(e,t){return t.emojiCount===void 0&&(t.emojiCount=FFe(e)),t.emojiCount}function Nc(e,t,n){return n===0?t.width:t.width-BFe(e,t)*n}function $Fe(e,t,n,i,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const o=HD(),r=[];for(const c of o.segment(e))r.push(c.segment);if(r.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const c=[];for(const d of r){const f=cu(d,n);c.push(Nc(d,f,i))}return t.breakableFitAdvances=c,t.breakableFitAdvances}if(s==="pair-context"||r.length>_Fe){const c=[];let d=null,f=0;for(const p of r){const g=cu(p,n),m=Nc(p,g,i);if(d===null)c.push(m);else{const y=d+p,w=cu(y,n);c.push(Nc(y,w,i)-f)}d=p,f=m}return t.breakableFitAdvances=c,t.breakableFitAdvances}const l=[];let a="",u=0;for(const c of r){a+=c;const d=cu(a,n),f=Nc(a,d,i);l.push(f-u),u=f}return t.breakableFitAdvances=l,t.breakableFitAdvances}function DFe(e,t){const n=Sk();n.font=e;const i=IFe(e),s=EFe(e),o=t?NFe(e,s):0;return{cache:i,fontSize:s,emojiCorrection:o}}function RFe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function WD(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function qD(e,t,n=e.widths.length){for(;t<n;){const i=e.kinds[t];if(!RFe(i))break;t++}return t}function zFe(e,t){if(t<=0)return 0;const n=e%t;return Math.abs(n)<=1e-6?t:t-n}function OFe(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function Mk(e,t){return t===0?0:e+t}function PFe(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function jFe(e,t,n,i,s){const o=t==="tab"?s+PFe(e,n):e.lineEndFitAdvances[n];return Mk(i,o)}function vM(e,t,n,i){const s=t==="tab"?0:e.lineEndFitAdvances[n];return Mk(i,s)}function yM(e,t,n,i,s){const o=t==="tab"?s:e.lineEndPaintAdvances[n];return Mk(i,o)}function HFe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function WFe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function T2(e,t,n){let i=t;for(;i<e.length&&e[i]<n;)i++;return i}function qFe(e,t,n,i,s){if(e.letterSpacing===0)return 0;if(s>0)return e.spacingGraphemeCounts[i]>0?e.letterSpacing:0;for(let o=i-1;o>=t;o--){const r=e.kinds[o];if(!(r==="space"||r==="zero-width-break"||r==="hard-break")){if(r==="soft-hyphen"){if(o===i-1)return 0;continue}return o===t&&n>0||e.spacingGraphemeCounts[o]>0?e.letterSpacing:0}}return 0}function UFe(e,t,n,i,s,o){return t+qFe(e,n,i,s,o)}function KFe(e,t,n){const{widths:i,kinds:s,breakableFitAdvances:o,breakablePreferredBreaks:r}=e;if(i.length===0)return 0;const a=Rv().lineFitEpsilon,u=t+a;let c=0,d=0,f=!1,p=0,g=0,m=0,y=0,w=-1,k=0;function A(){w=-1,k=0}function v(N=m,D=y,T=d){c++,n?.(T,p,g,N,D),d=0,f=!1,A()}function x(N,D){f=!0,p=N,g=0,m=N+1,y=0,d=D}function E(N,D,T){f=!0,p=N,g=D,m=N,y=D+1,d=T}function S(N,D){if(!f){x(N,D);return}d+=D,m=N+1,y=0}function M(N,D){const T=o[N],$=r[N]??null;let P=$===null?-1:T2($,0,D+1),O=-1,R=0,W=D;for(;W<T.length;){const z=T[W];if(!f)E(N,W,z);else if(d+z>u){if($!==null&&O>D){v(N,O,R),W=O,P=T2($,P,W+1),O=-1,R=0;continue}v(),E(N,W,z)}else d+=z,m=N,y=W+1;const G=W+1;$!==null&&$[P]===G&&(O=G,R=d,P++),W++}f&&m===N&&y===T.length&&(m=N+1,y=0)}let _=0;for(;_<i.length&&!(!f&&(_=qD(e,_),_>=i.length));){const N=i[_],D=s[_],T=WD(D);if(!f){N>u&&o[_]!==null?M(_,0):x(_,N),T&&(w=_+1,k=d-N),_++;continue}if(d+N>u){if(T){S(_,N),v(_+1,0,d-N),_++;continue}if(w>=0){if(m>w||m===w&&y>0){v();continue}v(w,0,k);continue}if(N>u&&o[_]!==null){v(),M(_,0),_++;continue}v();continue}S(_,N),T&&(w=_+1,k=d-N),_++}return f&&v(),c}function VFe(e,t,n){if(e.simpleLineWalkFastPath)return KFe(e,t,n);const{widths:i,kinds:s,breakableFitAdvances:o,breakablePreferredBreaks:r,discretionaryHyphenWidth:l,chunks:a}=e;if(i.length===0||a.length===0)return 0;const u=Rv(),c=u.lineFitEpsilon,d=t+c;let f=0,p=0,g=!1,m=0,y=0,w=0,k=0,A=-1,v=0,x=0,E=null;function S(){A=-1,v=0,x=0,E=null}function M(){return E==="soft-hyphen"&&A===w&&k===0?x:p}function _(R=w,W=k,z){f++,n!==void 0&&n(UFe(e,z??M(),m,y,R,W),m,y,R,W),p=0,g=!1,S()}function N(R,W){g=!0,m=R,y=0,w=R+1,k=0,p=W}function D(R,W,z){g=!0,m=R,y=W,w=R,k=W+1,p=z}function T(R,W){if(!g){N(R,W);return}p+=W,w=R+1,k=0}function $(R,W,z,G,K,H){if(!W)return;const q=vM(e,R,z,K),X=yM(e,R,z,K,G);A=z+1,v=p-H+q,x=p-H+X,E=R}function P(R,W){const z=o[R],G=r[R]??null;let K=G===null?-1:T2(G,0,W+1),H=-1,q=0,X=W;for(;X<z.length;){const ee=z[X];if(!g)D(R,X,ee);else{const ie=HFe(e,!0,ee),xe=p+ie;if(WFe(e,xe)>d){if(G!==null&&H>W){_(R,H,q),X=H,K=T2(G,K,X+1),H=-1,q=0;continue}_(),D(R,X,ee)}else p=xe,w=R,k=X+1}const ue=X+1;G!==null&&G[K]===ue&&(H=ue,q=p,K++),X++}g&&w===R&&k===z.length&&(w=R+1,k=0)}function O(R){f++,n?.(0,R.startSegmentIndex,0,R.consumedEndSegmentIndex,0),S()}for(let R=0;R<a.length;R++){const W=a[R];if(W.startSegmentIndex===W.endSegmentIndex){O(W);continue}g=!1,p=0,m=W.startSegmentIndex,y=0,w=W.startSegmentIndex,k=0,S();let z=W.startSegmentIndex;for(;z<W.endSegmentIndex&&!(!g&&(z=qD(e,z,W.endSegmentIndex),z>=W.endSegmentIndex));){const G=s[z],K=WD(G),H=OFe(e,g,z),q=G==="tab"?zFe(p+H,e.tabStopAdvance):i[z],X=H+q,ee=jFe(e,G,z,H,q);if(G==="soft-hyphen"){g&&(w=z+1,k=0,A=z+1,v=p+l,x=p+l,E=G),z++;continue}if(!g){ee>d&&o[z]!==null?P(z,0):N(z,q),$(G,K,z,q,H,X),z++;continue}if(p+ee>d){const ie=p+vM(e,G,z,H),xe=p+yM(e,G,z,H,q);if(E==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&v<=d){_(A,0,x);continue}if(K&&ie<=d){T(z,X),_(z+1,0,xe),z++;continue}if(A>=0&&v<=d){if(w>A||w===A&&k>0){_();continue}const ce=A;_(ce,0,x),z=ce;continue}if(ee>d&&o[z]!==null){_(),P(z,0),z++;continue}_();continue}T(z,X),$(G,K,z,q,H,X),z++}if(g){const G=A===W.consumedEndSegmentIndex?x:p;_(W.consumedEndSegmentIndex,0,G)}}return f}let C4=null;function Ik(){return C4===null&&(C4=new Intl.Segmenter(void 0,{granularity:"grapheme"})),C4}function ZFe(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function GFe(e,t){const n=[];let i=[],s=0,o=!1,r=!1,l=!1;function a(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:s}),i=[],o=!1,r=!1,l=!1)}function u(d,f,p){i=[d],s=f,o=p,r=O8(d),l=Bv.has(d)}function c(d,f){i.push(d),o=o||f;const p=O8(d);d.length===1&&nd.has(d)?r=r||p:r=p,l=!1}for(const d of Ik().segment(e)){const f=d.segment,p=Vl(f);if(i.length===0){u(f,d.index,p);continue}if(l||wk.has(f)||nd.has(f)||t.carryCJKAfterClosingQuote&&p&&r){c(f,p);continue}if(!o&&!p){c(f,p);continue}a(),u(f,d.index,p)}return a(),n}function QFe(e,t,n){if(t.length<=1)return t;const i=[];let s=-1,o=!1;function r(a,u){const c=t[a].start,d=u<t.length?t[u].start:e.length;i.push({text:e.slice(c,d),start:c})}function l(a){if(!(s<0)){if(o)s+1===a?i.push(t[s]):r(s,a);else for(let u=s;u<a;u++)i.push(t[u]);s=-1,o=!1}}for(let a=0;a<t.length;a++){const u=t[a];s>=0&&!OD(t[a-1].text,n)&&l(a),s<0&&(s=a),o=o||Vl(u.text)}return l(t.length),i}function bM(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const i=Ik();for(const s of i.segment(e))n++;return n}function YFe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function JFe(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const i of Ik().segment(e))n++,YFe(i.segment)&&t.push(n);return t.length===0?null:t}function XFe(e,t,n){return t>1?e+(t-1)*n:e}function eBe(e,t,n,i,s){const o=Rv(),{cache:r,emojiCorrection:l}=DFe(t,LFe(e.normalized)),a=Nc("-",cu("-",r),l)+(s===0?0:s*2),c=Nc(" ",cu(" ",r),l)*8,d=s!==0;if(e.len===0)return ZFe();const f=[],p=[],g=[],m=[];let y=e.chunks.length<=1&&!d;const w=n?[]:null,k=[],A=[],v=[],x=n?[]:null,E=Array.from({length:e.len});function S(D,T,$,P,O,R,W,z,G){O!=="text"&&O!=="space"&&O!=="zero-width-break"&&(y=!1),f.push(T),p.push($),g.push(P),m.push(O),w?.push(R),k.push(W),A.push(z),d&&v.push(G),x!==null&&x.push(D)}function M(D,T,$,P,O){const R=cu(D,r),W=d?bM(D,T):0,z=XFe(Nc(D,R,l),W,s),G=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:z,K=G===0?0:G+(W>0?s:0),H=T==="space"||T==="zero-width-break"?0:z;if(O&&P&&D.length>1){let q="sum-graphemes";s!==0?q="segment-prefixes":E2(D)?q="pair-context":o.preferPrefixWidthsForBreakableRuns&&(q="segment-prefixes");const X=$Fe(D,R,r,l,q),ee=X===null||i==="keep-all"?null:JFe(D);S(D,z,K,H,T,$,X,ee,W);return}S(D,z,K,H,T,$,null,null,W)}for(let D=0;D<e.len;D++){E[D]=f.length;const T=e.texts[D],$=e.isWordLike[D],P=e.kinds[D],O=e.starts[D];if(P==="soft-hyphen"){S(T,0,a,a,P,O,null,null,0);continue}if(P==="hard-break"){S(T,0,0,0,P,O,null,null,0);continue}if(P==="tab"){S(T,0,0,0,P,O,null,null,d?bM(T,P):0);continue}const R=cu(T,r);if(P==="text"&&R.containsCJK){const W=GFe(T,o),z=i==="keep-all"?QFe(T,W,o.breakKeepAllAfterPunctuation):W;for(let G=0;G<z.length;G++){const K=z[G];M(K.text,"text",O+K.start,$,i==="keep-all"||!Vl(K.text))}continue}M(T,P,O,$,!0)}const _=tBe(e.chunks,E,f.length),N=w===null?null:xNe(e.normalized,w);return x!==null?{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:a,tabStopAdvance:c,chunks:_,segments:x}:{widths:f,lineEndFitAdvances:p,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:N,breakableFitAdvances:k,breakablePreferredBreaks:A,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:a,tabStopAdvance:c,chunks:_}}function tBe(e,t,n){const i=[];for(let s=0;s<e.length;s++){const o=e[s],r=o.startSegmentIndex<t.length?t[o.startSegmentIndex]:n,l=o.endSegmentIndex<t.length?t[o.endSegmentIndex]:n,a=o.consumedEndSegmentIndex<t.length?t[o.consumedEndSegmentIndex]:n;i.push({startSegmentIndex:r,endSegmentIndex:l,consumedEndSegmentIndex:a})}return i}function nBe(e,t,n,i){const s=i?.wordBreak??"normal",o=i?.letterSpacing??0,r=xFe(e,Rv(),i?.whiteSpace,s);return eBe(r,t,n,s,o)}function iBe(e,t,n){return nBe(e,t,!0,n)}function sBe(e){let t=0;return VFe(e,Number.POSITIVE_INFINITY,n=>{n>t&&(t=n)}),t}const oBe={class:"slash-menu","data-menu-frame":""},rBe={key:0,class:"slash-empty",role:"status"},lBe=["id","aria-selected","onMouseenter","onMousedown"],aBe={class:"slash-name"},uBe={key:0,class:"slash-match"},cBe={class:"slash-desc"},dBe={key:0,class:"slash-desc-match"},fBe=tt({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{}},emits:["select","hover"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(A,v){if(!v||v.length===0)return[{text:A,hit:!1}];const x=[];let E=0;for(const[S,M]of[...v].sort((_,N)=>_[0]-N[0]))S>E&&x.push({text:A.slice(E,S),hit:!1}),x.push({text:A.slice(S,M),hit:!0}),E=M;return E<A.length&&x.push({text:A.slice(E),hit:!1}),x}function r(A){return A.isSkill?A.desc:n(A.desc)}const l=F(()=>i.items.map((A,v)=>{const x=r(A),E=i.ranges?.[v]??Tie(i.query,A.name,x);return{item:A,namePieces:o(A.name,E.name),desc:x,descPieces:o(x,E.desc)}})),a=Z(null),u=Z(!1),c=Z(!1);let d=null;const f=Z(null);function p(){const A=a.value;if(!A)return;u.value=A.scrollTop>0,c.value=A.scrollTop+A.clientHeight<A.scrollHeight-1;const{scrollTop:v,scrollHeight:x,clientHeight:E}=A;if(x<=E+1){f.value=null;return}const S=getComputedStyle(A),M=parseFloat(S.getPropertyValue("--menu-scrollbar-track-inset"))||0,_=parseFloat(S.getPropertyValue("--menu-scrollbar-thumb-min"))||24,N=E-M*2,D=Math.max(_,E/x*N),T=x-E,$=A.offsetTop+M+v/T*(N-D);f.value={top:$,height:D}}function g(){p()}let m=null;function y(A){const v=a.value,x=f.value;if(!v||!x)return;A.preventDefault(),m?.();const E=A.pointerId;A.target.setPointerCapture?.(A.pointerId);const S=getComputedStyle(v),M=parseFloat(S.getPropertyValue("--menu-scrollbar-track-inset"))||0,_=v.clientHeight-M*2-x.height,N=v.scrollHeight-v.clientHeight,D=A.clientY,T=v.scrollTop,$=R=>{R.pointerId!==E||_<=0||(v.scrollTop=T+(R.clientY-D)/_*N)},P=R=>{R.pointerId===E&&O()},O=()=>{window.removeEventListener("pointerup",P),window.removeEventListener("pointermove",$),window.removeEventListener("pointercancel",P),m===O&&(m=null)};m=O,window.addEventListener("pointermove",$),window.addEventListener("pointerup",P),window.addEventListener("pointercancel",P)}const w=F(()=>{const A=u.value,v=c.value,x="var(--menu-scroll-fade)";if(A&&v)return`linear-gradient(to bottom, transparent 0, black ${x}, black calc(100% - ${x}), transparent 100%)`;if(A)return`linear-gradient(to bottom, transparent, black ${x})`;if(v)return`linear-gradient(to top, transparent, black ${x})`});pn(()=>{p(),typeof ResizeObserver=="function"&&a.value&&(d=new ResizeObserver(p),d.observe(a.value))}),An(()=>{d?.disconnect(),d=null,m?.()});function k(){const A=a.value;if(!A)return;const v=A.querySelectorAll('[role="option"]')[i.activeIndex];if(!v)return;const x=A.getBoundingClientRect(),E=v.getBoundingClientRect(),S=E.top-x.top+A.scrollTop,M=S+E.height;S<A.scrollTop?A.scrollTop=S:M>A.scrollTop+A.clientHeight&&(A.scrollTop=M-A.clientHeight)}return Qe(()=>i.activeIndex,()=>{kt(k)}),Qe(()=>i.items,()=>{kt(()=>{p(),k()})}),(A,v)=>(b(),I("div",oBe,[e.items.length===0?(b(),I("div",rBe,B(h(n)("composer.noCommands")),1)):ne("",!0),Bn(C("div",{id:"composer-slash-menu",ref_key:"scrollEl",ref:a,class:"slash-scroll",role:"listbox",style:Vt({maskImage:w.value}),onScroll:g},[(b(!0),I(Be,null,yt(l.value,(x,E)=>(b(),I("div",{key:`${x.item.name}-${E}`,id:`composer-slash-option-${E}`,class:De(["slash-item",{active:E===i.activeIndex}]),role:"option","aria-selected":E===i.activeIndex,onMouseenter:S=>s("hover",E),onMousedown:It(S=>s("select",x.item),["prevent"])},[C("span",aBe,[(b(!0),I(Be,null,yt(x.namePieces,(S,M)=>(b(),I(Be,{key:M},[S.hit?(b(),I("span",uBe,B(S.text),1)):(b(),I(Be,{key:1},[Ue(B(S.text),1)],64))],64))),128))]),C("span",cBe,[(b(!0),I(Be,null,yt(x.descPieces,(S,M)=>(b(),I(Be,{key:M},[S.hit?(b(),I("span",dBe,B(S.text),1)):(b(),I(Be,{key:1},[Ue(B(S.text),1)],64))],64))),128))])],42,lBe))),128))],36),[[rs,e.items.length>0]]),f.value&&e.items.length>0?(b(),I("div",{key:1,class:"scroll-thumb",onPointerdown:y,style:Vt({top:`${f.value.top}px`,height:`${f.value.height}px`})},null,36)):ne("",!0)]))}}),hBe=vt(fBe,[["__scopeId","data-v-98398dd7"]]),pBe={class:"mention-menu","data-menu-frame":""},gBe={key:0,class:"mention-state dim",role:"status"},mBe={key:1,class:"mention-state dim",role:"status"},vBe=["id","aria-selected","onMouseenter","onMousedown"],yBe=["innerHTML"],bBe={class:"mention-name"},kBe={class:"mention-path"},ABe=tt({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean}},emits:["select","hover"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(null),r=Z(!1),l=Z(!1);let a=null;const u=Z(null);function c(){const _=o.value;if(!_)return;r.value=_.scrollTop>0,l.value=_.scrollTop+_.clientHeight<_.scrollHeight-1;const{scrollTop:N,scrollHeight:D,clientHeight:T}=_;if(D<=T+1){u.value=null;return}const $=getComputedStyle(_),P=parseFloat($.getPropertyValue("--menu-scrollbar-track-inset"))||0,O=parseFloat($.getPropertyValue("--menu-scrollbar-thumb-min"))||24,R=T-P*2,W=Math.max(O,T/D*R),z=D-T,G=_.offsetTop+P+N/z*(R-W);u.value={top:G,height:W}}function d(){c()}let f=null;function p(_){const N=o.value,D=u.value;if(!N||!D)return;_.preventDefault(),f?.();const T=_.pointerId;_.target.setPointerCapture?.(_.pointerId);const $=getComputedStyle(N),P=parseFloat($.getPropertyValue("--menu-scrollbar-track-inset"))||0,O=N.clientHeight-P*2-D.height,R=N.scrollHeight-N.clientHeight,W=_.clientY,z=N.scrollTop,G=q=>{q.pointerId!==T||O<=0||(N.scrollTop=z+(q.clientY-W)/O*R)},K=q=>{q.pointerId===T&&H()},H=()=>{window.removeEventListener("pointerup",K),window.removeEventListener("pointermove",G),window.removeEventListener("pointercancel",K),f===H&&(f=null)};f=H,window.addEventListener("pointermove",G),window.addEventListener("pointerup",K),window.addEventListener("pointercancel",K)}const g=F(()=>{const _=r.value,N=l.value,D="var(--menu-scroll-fade)";if(_&&N)return`linear-gradient(to bottom, transparent 0, black ${D}, black calc(100% - ${D}), transparent 100%)`;if(_)return`linear-gradient(to bottom, transparent, black ${D})`;if(N)return`linear-gradient(to top, transparent, black ${D})`});pn(()=>{c(),typeof ResizeObserver=="function"&&o.value&&(a=new ResizeObserver(c),a.observe(o.value))}),An(()=>{a?.disconnect(),a=null,f?.()});function m(){const _=o.value;if(!_)return;const N=_.querySelectorAll('[role="option"]')[n.activeIndex];if(!N)return;const D=_.getBoundingClientRect(),T=N.getBoundingClientRect(),$=T.top-D.top+_.scrollTop,P=$+T.height;$<_.scrollTop?_.scrollTop=$:P>_.scrollTop+_.clientHeight&&(_.scrollTop=P-_.clientHeight)}Qe(()=>n.activeIndex,()=>{kt(m)}),Qe(()=>n.items,()=>{kt(()=>{c(),m()})});const y=Wd("folder","sm"),w=Wd("code","sm"),k=Wd("file-text","sm"),A=Wd("image","sm"),v=Wd("file","sm"),x=new Set(["ts","tsx","js","jsx","mjs","cjs","vue","json","py","go","rs","java","kt","c","h","cpp","cc","hpp","cs","rb","php","swift","sh","bash","zsh","css","scss","less","html","htm","xml","sql","yaml","yml","toml","lua","dart","scala","clj","ex","exs"]),E=new Set(["md","markdown","mdx","txt","rst","adoc","pdf","doc","docx"]),S=new Set(["png","jpg","jpeg","gif","svg","webp","bmp","ico","avif"]);function M(_){const N=_.path;if(N.endsWith("/"))return y;const D=_.name||N.split("/").pop()||N,T=D.lastIndexOf("."),$=T>0?D.slice(T+1).toLowerCase():"";return $?x.has($)?w:E.has($)?k:S.has($)?A:v:v}return(_,N)=>(b(),I("div",pBe,[n.loading?(b(),I("div",gBe,B(h(s)("mention.searching")),1)):n.items.length===0?(b(),I("div",mBe,B(h(s)("mention.noMatch")),1)):ne("",!0),Bn(C("div",{id:"composer-mention-menu",ref_key:"scrollEl",ref:o,class:"mention-scroll",role:"listbox",style:Vt({maskImage:g.value}),onScroll:d},[(b(!0),I(Be,null,yt(n.items,(D,T)=>(b(),I("div",{key:D.path,id:`composer-mention-option-${T}`,class:De(["mention-item",{active:T===n.activeIndex}]),role:"option","aria-selected":T===n.activeIndex,onMouseenter:$=>i("hover",T),onMousedown:It($=>i("select",D),["prevent"])},[C("span",{class:"mention-icon",innerHTML:M(D),"aria-hidden":"true"},null,8,yBe),C("span",bBe,B(D.name),1),C("span",kBe,B(D.path),1)],42,vBe))),128))],36),[[rs,!n.loading&&n.items.length>0]]),u.value&&!n.loading&&n.items.length>0?(b(),I("div",{key:2,class:"scroll-thumb",onPointerdown:p,style:Vt({top:`${u.value.top}px`,height:`${u.value.height}px`})},null,36)):ne("",!0)]))}}),CBe=vt(ABe,[["__scopeId","data-v-53eca905"]]),wBe={class:"composer-card"},xBe={key:0,class:"att-strip"},_Be={key:1,class:"att-row"},SBe={key:0,class:"att-more"},MBe={class:"cin-wrap"},IBe=["onClick"],EBe={class:"am-icon"},TBe={class:"am-name"},LBe={key:0,class:"am-desc"},NBe={class:"input-row"},FBe=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],BBe=["aria-label"],$Be={class:"toolbar-left"},DBe=["aria-label","onKeydown"],RBe={class:"perm-pill-label"},zBe=["onClick"],OBe={class:"pd-info"},PBe={class:"pd-desc"},jBe={class:"pd-check"},HBe={key:1,class:"swarm-chip"},WBe={class:"swarm-label"},qBe={class:"toolbar-right"},UBe=["aria-label"],KBe=["aria-expanded"],VBe={class:"mp-name"},ZBe={key:0,class:"think-suffix"},GBe={class:"mp-name"},QBe={class:"mp-name"},YBe=["aria-label"],JBe=["aria-label","disabled"],XBe={class:"md-list"},e$e={key:0,class:"md-section"},t$e=["onClick"],n$e={class:"md-check"},i$e={class:"md-name"},s$e={class:"md-provider"},o$e={key:1,class:"md-divider"},r$e={key:2,class:"md-section"},l$e=["onClick"],a$e={class:"md-check"},u$e={class:"md-name"},c$e={key:0,class:"md-divider"},d$e={class:"md-thinking"},f$e={class:"md-name"},h$e={key:0,class:"md-note"},p$e={key:2,class:"md-note"},g$e={class:"md-cache-note"},m$e={class:"md-check md-more-icon"},v$e={class:"md-name"},y$e={key:1,class:"composer-footer"},b$e={class:"drop-card"},kM=36,k$e=tt({__name:"Composer",props:{running:{type:Boolean,default:!1},working:{type:Boolean,default:!1},starting:{type:Boolean,default:!1},sessionId:{},queued:{default:()=>[]},searchFiles:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},swarmMode:{type:Boolean},goalMode:{type:Boolean},goal:{},activationBadges:{},models:{default:()=>[]},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{default:()=>[]},skills:{default:()=>[]},hideContext:{type:Boolean}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleSwarm","toggleGoal","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","login"],setup(e,{expose:t,emit:n}){const i=e,s=F(()=>i.starting?r("composer.starting"):i.running?r("composer.placeholderRunning"):i.goalMode?r("status.goalPlaceholder"):i.planArmed||i.planMode?r("status.planPlaceholder"):r("composer.placeholder")),o=n,{t:r,locale:l}=Bt(),{text:a,editorRef:u,loadForEdit:c,clearDraft:d}=cve({sessionId:()=>i.sessionId}),f=u;function p(){const Ee=f.value;Ee&&(Ee.style.height="auto",Ee.style.height=`${Ee.scrollHeight}px`)}Qe(a,()=>void kt(p));const g=Z(!1);function m(){g.value=!g.value,kt(()=>{p(),A(),f.value?.focus()})}function y(){g.value&&(g.value=!1,kt(p))}function w(Ee){if(typeof getComputedStyle>"u")return kM;const ct=Number.parseFloat(getComputedStyle(Ee).minHeight);return Number.isFinite(ct)&&ct>0?ct:kM}const k=Z(!1);function A(){const Ee=f.value;k.value=!!Ee&&Ee.scrollHeight>w(Ee)}Qe(a,()=>{kt(A)});const v=pve({text:a,editorRef:f,sessionId:()=>i.sessionId});function x(){Si.value||(i.goalMode&&o("toggleGoal"),o("togglePlan"))}function E(){if(Wi.value){o("focusGoal");return}i.goalMode||(Si.value&&o("togglePlan"),o("toggleGoal"))}const{open:S,items:M,ranges:_,active:N,update:D,select:T}=gve({text:a,editorRef:f,skills:()=>i.skills,emitCommand:Ee=>{if(Ee==="/plan"){x();return}if(Ee==="/goal"){E();return}if(Ee==="/swarm"){Vs.value||o("toggleSwarm");return}o("command",{cmd:Ee,attachments:[]})},historyPush:Ee=>v.push(Ee),clearDraft:d,resolveDesc:Ee=>Ee.isSkill?Ee.desc:r(Ee.desc)}),$=F(()=>a.value.startsWith("/")&&!a.value.includes(" ")?a.value.slice(1):""),P=F(()=>{if(S.value)return"composer-slash-menu";if(R.value)return"composer-mention-menu"}),O=F(()=>{if(S.value&&M.value.length>0)return`composer-slash-option-${N.value}`;if(R.value&&!G.value&&W.value.length>0)return`composer-mention-option-${z.value}`}),{open:R,items:W,active:z,loading:G,update:K,close:H,select:q}=mve({text:a,editorRef:f,searchFiles:()=>i.searchFiles});Qe(()=>i.sessionId,()=>{g.value=!1,S.value=!1,H()});function X(){S.value=!1,H()}function ee(){v.resetBrowsing(),D(),K(),(S.value||R.value||Sn.value)&&Dn()}function ue(Ee){const ct=Ee.map(Xi=>/\s/.test(Xi)?`"${Xi}"`:Xi).join(" "),dt=f.value,Wt=a.value,ki=dt&&document.activeElement===dt?dt.selectionStart:Wt.length,$s=ki>0&&!/\s/.test(Wt[ki-1])?" ":"",Ql=ki<Wt.length&&!/\s/.test(Wt[ki])?" ":"";v.resetBrowsing(),a.value=Wt.slice(0,ki)+$s+ct+Ql+Wt.slice(ki),kt(()=>{const Xi=f.value;if(!Xi)return;const os=ki+$s.length+ct.length;Xi.setSelectionRange(os,os),Xi.focus(),p()})}const{attachments:ie,previewAttachment:xe,fileInputRef:ce,isDragOver:pe,removeAttachment:Ne,openAttachmentPreview:te,closeAttachmentPreview:ye,openFilePicker:j,handleFileInputChange:Y,handleDragOver:ve,handleDragLeave:re,handleDrop:se,clearAfterSubmit:U,clearAttachments:J,loadAttachments:de}=$ve({api:Pt(),uploadImage:()=>i.uploadImage,sessionId:()=>i.sessionId,insertFolderPaths:ue}),me=Ee=>Ee.kind==="image"||Ee.kind==="video",Ie=F(()=>ie.value.filter(me)),je=F(()=>ie.value.filter(Ee=>!me(Ee))),ke=Z(null),Le=Z(null),it=Z(!1);function Fe(){const Ee=ke.value,ct=Le.value;it.value=Ee!==null&&ct!==null&&ct.scrollHeight>Ee.clientHeight+1}let Re=null;Qe(ke,Ee=>{if(Re?.disconnect(),Re=null,Ee){const ct=new ResizeObserver(Fe);ct.observe(Ee),Re=ct}Fe()},{immediate:!0}),Qe(ie,()=>void kt(Fe),{deep:!0}),An(()=>Re?.disconnect());const Ke=Z(null);Qe(()=>[Ie.value.length,je.value.length],([Ee,ct],[dt,Wt])=>{Ee<=dt&&ct<=Wt||kt(()=>{const ki=ke.value;ki&&(Ee>dt&&Ke.value?ki.scrollTop=Ke.value.offsetHeight-ki.clientHeight:ki.scrollTop=ki.scrollHeight)})}),pn(()=>{a.value&&kt(()=>{p(),A()})}),An(()=>{Ve()});function ht(){f.value?.focus({preventScroll:!0})}function ot(Ee){de(Ee)}function gt(Ee){return{fileId:Ee.fileId,kind:Ee.kind,name:Ee.name,mediaType:Ee.mediaType,size:Ee.size}}const Tt=Z(null);function yn(Ee,ct){if(Ee.kind==="file"){Ee.fileId!==void 0&&dD(Pt(),Ee.fileId,Ee.name,Ee.mediaType);return}Tt.value=ct??null,te(Ee)}const Gt=F(()=>{const Ee=xe.value;return!Ee||!Ee.previewUrl?null:{kind:Ee.kind==="video"?"video":"image",url:Ee.previewUrl,path:Ee.name,fileId:Ee.previewUrl.startsWith("blob:")?void 0:Ee.fileId}}),Kt=F(()=>!ie.value.some(Ee=>Ee.uploading)&&(a.value.trim()!==""||ie.value.some(Ee=>!Ee.error&&Ee.fileId)));function mn(){const Ee=a.value.trim();if(ie.value.some(Wt=>Wt.uploading))return;const ct=ie.value.filter(Wt=>!Wt.uploading&&!Wt.error&&Wt.fileId);if(!Ee&&ct.length===0)return;if(v.push(Ee),Ee==="/plan"){a.value="",d(),S.value=!1,y(),x();return}if(Ee==="/goal"){a.value="",d(),S.value=!1,y(),E();return}if(Ee==="/swarm"){a.value="",d(),S.value=!1,y(),Vs.value||o("toggleSwarm");return}if(Ee){const Wt=wie(Ee),ki=Wt?FL(i.skills).find($s=>$s.name===Wt.cmd||$s.name===`/${Em}${Wt.cmd.slice(1)}`):void 0;if(Wt&&ki){const $s=Wt.arg?`${Wt.cmd} ${Wt.arg}`:Wt.cmd,Ql=ki.isSkill===!0;a.value="",d(),S.value=!1,y(),Ql?(xe.value=null,Tt.value=null,U(),H(),o("command",{cmd:$s,attachments:ct.map(Xi=>gt(Xi))})):o("command",{cmd:$s,attachments:[]});return}}const dt={text:Ee,attachments:ct.map(Wt=>gt(Wt))};xe.value=null,Tt.value=null,U(),a.value="",d(),S.value=!1,H(),y(),o("submit",dt)}function _n(){if(!i.running||ie.value.some(Wt=>Wt.uploading))return;const Ee=a.value.trim(),ct=ie.value.filter(Wt=>!Wt.uploading&&!Wt.error&&Wt.fileId);if(!Ee&&ct.length===0&&i.queued.length===0)return;const dt={text:Ee,attachments:ct.map(Wt=>gt(Wt))};U(),v.push(Ee),a.value="",d(),S.value=!1,H(),y(),o("steer",dt)}let He=!1,st=null;function Ve(){st!==null&&(clearTimeout(st),st=null)}function Rt(){Ve(),He=!0}function Ct(){Ve(),st=setTimeout(()=>{st=null,He=!1},0)}function Fn(Ee){return He||Ee.isComposing||Ee.keyCode===229}function Tn(Ee){if(Fn(Ee))return;if(xs.value&&Ee.key==="Backspace"&&!Ee.shiftKey&&!Ee.altKey&&!Ee.metaKey&&!Ee.ctrlKey){const dt=f.value;if(dt&&dt.selectionStart===0&&dt.selectionEnd===0){Ee.preventDefault(),fo();return}}if(Ee.key==="Escape"){if(Sn.value){Ee.preventDefault(),Dn();return}if(ni.value){Ee.preventDefault(),Bs();return}if(zn.value){Ee.preventDefault(),vi();return}}if(S.value){if(Ee.key==="Escape"){Ee.preventDefault(),S.value=!1;return}if(Ee.key==="Tab"&&M.value.length===0){S.value=!1;return}}if(S.value&&M.value.length>0){if(Ee.key==="ArrowDown"){Ee.preventDefault(),N.value=(N.value+1)%M.value.length;return}if(Ee.key==="ArrowUp"){Ee.preventDefault(),N.value=(N.value-1+M.value.length)%M.value.length;return}if(Ee.key==="Enter"||Ee.key==="Tab"){Ee.preventDefault();const dt=M.value[N.value];dt&&T(dt);return}}if(R.value&&!G.value){if(Ee.key==="Escape"){Ee.preventDefault(),H();return}if(W.value.length>0){if(Ee.key==="ArrowDown"){Ee.preventDefault(),z.value=(z.value+1)%W.value.length;return}if(Ee.key==="ArrowUp"){Ee.preventDefault(),z.value=(z.value-1+W.value.length)%W.value.length;return}if(Ee.key==="Enter"||Ee.key==="Tab"){Ee.preventDefault();const dt=W.value[z.value];dt&&q(dt);return}}}if(Ee.key==="s"&&(Ee.ctrlKey||Ee.metaKey)&&!Ee.shiftKey&&!Ee.altKey){i.running&&(Ee.preventDefault(),_n());return}const ct=S.value&&M.value.length>0;if(!g.value&&!ct&&!R.value&&!Ee.shiftKey&&!Ee.altKey&&!Ee.metaKey&&!Ee.ctrlKey){const dt=v.isBrowsing();if(Ee.key==="ArrowUp"&&v.hasHistory()&&(dt||v.caretAtTextStart())){Ee.preventDefault(),v.recallOlder(),S.value=!1;return}if(Ee.key==="ArrowDown"&&dt){Ee.preventDefault(),v.recallNewer(),S.value=!1;return}}if(Ee.key==="Enter"&&!Ee.shiftKey){if(g.value&&!(Ee.metaKey||Ee.ctrlKey))return;Ee.preventDefault(),mn()}}const as=F(()=>r("composer.send")),Qt=F(()=>!!i.uploadImage),ni=Z(!1),zn=Z(!1),Sn=Z(!1),mi=Z(null),Ws=Z(null),Li=Z(null),Lt=Z(null),xi=Z(null),Qi=Z(null);let ci=null;function Fs(){const Ee=xi.value;if(!Ee)return;const{scrollTop:ct,scrollHeight:dt,clientHeight:Wt}=Ee;if(dt<=Wt+1){Qi.value=null;return}const ki=getComputedStyle(Ee),$s=parseFloat(ki.getPropertyValue("--menu-scrollbar-track-inset"))||0,Ql=parseFloat(ki.getPropertyValue("--menu-scrollbar-thumb-min"))||24,Xi=Wt-$s*2,os=Math.max(Ql,Wt/dt*Xi),Ku=dt-Wt,ld=Ee.offsetTop+$s+ct/Ku*(Xi-os);Qi.value={top:ld,height:os}}function Ni(){Fs()}Qe(Sn,async Ee=>{ci?.disconnect(),ci=null,Qi.value=null,Ee&&(await kt(),Fs(),typeof ResizeObserver=="function"&&xi.value&&(ci=new ResizeObserver(Fs),ci.observe(xi.value)))}),An(()=>{ci?.disconnect(),ci=null});const $i=Z(""),So=F(()=>{const Ee={};return $i.value&&(Ee.right=$i.value),Ee}),_i=F(()=>ni.value||zn.value||Sn.value||S.value||R.value);t({loadForEdit:c,loadAttachmentsForEdit:ot,focus:ht,anyPopupOpen:_i,isEmpty:()=>a.value.trim().length===0&&ie.value.length===0});function co(){ni.value=!ni.value,ni.value?(Wo(),zn.value=!1,Sn.value=!1,document.addEventListener("click",On,!0)):document.removeEventListener("click",On,!0)}function Bs(){ni.value=!1,!zn.value&&!Sn.value&&document.removeEventListener("click",On,!0)}function Hi(){zn.value=!zn.value,zn.value?(Mi(),ni.value=!1,Sn.value=!1,document.addEventListener("click",On,!0)):document.removeEventListener("click",On,!0)}function vi(){zn.value=!1,!ni.value&&!Sn.value&&document.removeEventListener("click",On,!0)}function Mn(){Sn.value=!Sn.value,Sn.value?(ni.value=!1,zn.value=!1,S.value=!1,R.value=!1,document.addEventListener("click",On,!0),kt(()=>{Ws.value?.querySelector(".am-row")?.focus()})):document.removeEventListener("click",On,!0)}function Dn(){Sn.value=!1,!ni.value&&!zn.value&&document.removeEventListener("click",On,!0)}const Ln=F(()=>{const Ee=[];return Qt.value&&Ee.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:Di}),Ee.push({id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:ri}),Ee.push({id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:ur}),Ee.push({id:"swarm",icon:"sparkles",nameKey:"status.swarmLabel",descKey:"composer.addSwarmDesc",action:jo}),Ee});function ws(Ee){Ee.action(),f.value?.focus()}function Cn(Ee){if(Ee.key==="Escape"){Ee.preventDefault(),Dn(),f.value?.focus();return}if(Ee.key==="Tab"){Dn();return}if(Ee.key!=="ArrowDown"&&Ee.key!=="ArrowUp")return;Ee.preventDefault();const ct=Array.from(Ws.value?.querySelectorAll(".am-row")??[]);if(ct.length===0)return;const dt=ct.indexOf(document.activeElement),Wt=Ee.key==="ArrowDown"?(dt+1)%ct.length:(dt-1+ct.length)%ct.length;ct[Wt]?.focus()}function Di(){Dn(),j()}function ri(){Dn(),i.goalMode||E()}function ur(){Dn(),Si.value||x()}function jo(){Dn(),Vs.value||o("toggleSwarm")}function On(Ee){const ct=Ee.target,dt=mi.value?.contains(ct)??!1,Wt=Ws.value?.contains(ct)??!1;!dt&&!Wt&&(Bs(),vi(),Dn())}An(()=>{document.removeEventListener("click",On,!0)});const us=F(()=>{const Ee=i.status?.ctxMax??0;return Ee<=0?0:Math.min(100,Math.max(0,Math.ceil((i.status?.ctxUsed??0)/Ee*100)))}),qs=F(()=>{const Ee=Ia(i.status?.ctxUsed??0),ct=Ia(i.status?.ctxMax??0);return r("status.ctxTooltip",{used:Ee,max:ct,pct:us.value})}),Us=F(()=>us.value>=80),Ji=F(()=>i.models?.find(Ee=>Ee.id===i.status?.modelId)),$e=F(()=>lv(Ji.value)),nt=F(()=>Ap(Ji.value)),Nt=F(()=>wm(Ji.value,i.thinking)),Zt=F(()=>nt.value.includes(Nt.value)?Nt.value:""),Nn=F(()=>Kee(Nt.value)),cs=F(()=>$e.value==="unsupported"||nt.value.length<=1),Fi=F(()=>{if(!Nn.value)return"";const Ee=(Ji.value?.supportEfforts?.length??0)>0,ct=Nt.value;return Ee&&ct!=="on"?r("composer.thinkingSuffixEffort",{level:ct}):r("composer.thinkingSuffix")});function di(Ee){cs.value||o("setThinking",O5(Ji.value,Ee))}function fi(Ee){return Ee==="on"?r("status.thinkingOn"):Ee==="off"?r("status.thinkingOff"):g3(Ee)}const Ks=F(()=>nt.value.map(Ee=>({value:Ee,label:fi(Ee)}))),Si=F(()=>i.planArmed===!0||i.planMode===!0),Vs=F(()=>i.swarmMode===!0),Zs=F(()=>i.goal?.status??i.activationBadges?.goal?.status??null),Wi=F(()=>Zs.value!==null&&Zs.value!=="complete"),xs=F(()=>i.goalMode?"goal":i.planArmed?"plan":null);function fo(){xs.value==="goal"?o("toggleGoal"):xs.value==="plan"&&o("togglePlan")}const yi=Z(null),Mo=Z(""),ho=F(()=>Mo.value?{textIndent:Mo.value}:void 0);let Gs=null;function ds(){const Ee=yi.value;Mo.value=Ee?`calc(${Ee.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}Qe(xs,async Ee=>{if(Gs?.disconnect(),Gs=null,!Ee){Mo.value="";return}await kt(),ds(),typeof ResizeObserver=="function"&&yi.value&&(Gs=new ResizeObserver(ds),Gs.observe(yi.value))},{immediate:!0}),An(()=>{Gs?.disconnect(),Gs=null});const Ho=[{mode:"manual",icon:"hand",color:"var(--color-text)",labelKey:"status.permissionManual",descKey:"status.permissionManualDesc"},{mode:"yolo",icon:"shield-question",color:"var(--color-warning)",labelKey:"status.permissionYolo",descKey:"status.permissionYoloDesc"},{mode:"auto",icon:"full-access",color:"var(--color-danger)",labelKey:"status.permissionAuto",descKey:"status.permissionAutoDesc"}],cr=Z(null),ft=Z(""),Me=Z("");function Ze(Ee){const ct={};return Ee&&(ct["--composer-menu-desc-width"]=Ee),ct}const on=F(()=>({...Ze(ft.value),...Me.value?{left:Me.value}:{}}));function Mi(){const Ee=Li.value,ct=mi.value;if(!Ee||!ct){Me.value="";return}Me.value=`${Math.round(Ee.getBoundingClientRect().left-ct.getBoundingClientRect().left)}px`}function Wo(){const Ee=Lt.value,ct=mi.value;if(!Ee||!ct){$i.value="";return}$i.value=`${Math.round(ct.getBoundingClientRect().right-Ee.getBoundingClientRect().right)}px`}let bi=null;function Al(Ee){const ct=Number.parseFloat(Ee);return Number.isFinite(ct)?ct:0}function qo(Ee){return`${Ee.fontStyle||"normal"} ${Ee.fontWeight||"400"} ${Ee.fontSize} ${Ee.fontFamily}`}function Er(Ee){return Ee.letterSpacing==="normal"?0:Al(Ee.letterSpacing)}function dr(Ee,ct){if(!Ee)return 0;const dt=iBe(Ee,qo(ct),{letterSpacing:Er(ct)});return sBe(dt)}function fr(){const Ee=cr.value?.querySelector(".pd-desc");if(!Ee)return;const ct=getComputedStyle(Ee),dt=Math.max(0,...Ho.map(Wt=>dr(r(Wt.descKey),ct)));ft.value=dt>0?`${Math.ceil(dt)}px`:""}function po(){typeof window>"u"||(bi!==null&&window.cancelAnimationFrame(bi),kt(()=>{bi=window.requestAnimationFrame(()=>{bi=null,fr()})}))}Qe(l,()=>{po(),S.value&&D()},{immediate:!0}),pn(()=>{po(),document.fonts?.ready.then(po)}),An(()=>{bi!==null&&(window.cancelAnimationFrame(bi),bi=null)});function Gl(Ee){o("setPermission",Ee),vi()}const oe=F(()=>Ho.find(Ee=>Ee.mode===i.status?.permission)),Ae=F(()=>oe.value?r(oe.value.labelKey):""),Se=F(()=>oe.value?.icon??"hand"),Pe=F(()=>Ji.value?.provider??""),Ye=F(()=>!Pe.value||!i.models?.length?[]:i.models.filter(Ee=>Ee.provider===Pe.value)),Je=F(()=>(i.models?.length??0)>0),xt=F(()=>i.authReady===!1&&!Je.value),bt=F(()=>xt.value&&!(i.managedSignedIn??!1)),nn=F(()=>xt.value&&(i.managedSignedIn??!1)&&i.managedMembership==="free"),Ot=F(()=>new Set(i.starredIds??[]));function wn(Ee){return Ot.value.has(Ee)}const Qn=F(()=>i.models?.length?i.models.filter(Ee=>wn(Ee.id)&&Ee.provider!==Pe.value):[]),$t=Z(null);Qe(ni,async Ee=>{if(!Ee)return;await kt(),($t.value?.querySelector(".md-row.is-current")??$t.value?.querySelector(".md-row"))?.focus()});function Ht(Ee){if(Ee.key!=="ArrowDown"&&Ee.key!=="ArrowUp")return;const ct=Array.from($t.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(!ct.length)return;Ee.preventDefault();const dt=ct.indexOf(document.activeElement),Wt=Ee.key==="ArrowDown"?(dt+1)%ct.length:(dt-1+ct.length)%ct.length;ct[Wt]?.focus()}function Wn(Ee){o("selectModel",Ee),Bs()}return(Ee,ct)=>(b(),I("div",{class:De(["composer",{"drag-over":h(pe),expanded:g.value}]),onDragover:ct[19]||(ct[19]=(...dt)=>h(ve)&&h(ve)(...dt)),onDragleave:ct[20]||(ct[20]=(...dt)=>h(re)&&h(re)(...dt)),onDrop:ct[21]||(ct[21]=(...dt)=>h(se)&&h(se)(...dt))},[Gt.value?(b(),fe(kk,{key:0,media:Gt.value,"origin-img":Tt.value,onClose:ct[0]||(ct[0]=dt=>{Tt.value=null,h(ye)()})},null,8,["media","origin-img"])):ne("",!0),C("div",wBe,[h(ie).length>0?(b(),I("div",xBe,[C("div",{ref_key:"attScrollRef",ref:ke,class:De(["att-scroll",{"is-overflowing":it.value}])},[C("div",{ref_key:"attScrollContentRef",ref:Le,class:"att-scroll-content"},[Ie.value.length>0?(b(),I("div",{key:0,ref_key:"attMediaRowRef",ref:Ke,class:"att-row att-row-media"},[(b(!0),I(Be,null,yt(Ie.value,dt=>(b(),fe(DD,{key:dt.localId,kind:dt.kind,name:dt.name,url:dt.previewUrl,"file-id":dt.fileId,uploading:dt.uploading,error:dt.error,removable:"","remove-label":h(r)("composer.removeNamed",{name:dt.name}),onActivate:Wt=>yn(dt,Wt),onRemove:Wt=>h(Ne)(dt.localId)},null,8,["kind","name","url","file-id","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):ne("",!0),je.value.length>0?(b(),I("div",_Be,[(b(!0),I(Be,null,yt(je.value,dt=>(b(),fe(RD,{key:dt.localId,kind:"file",name:dt.name,"media-type":dt.mediaType,size:dt.size,uploading:dt.uploading,error:dt.error,removable:"","remove-label":h(r)("composer.removeNamed",{name:dt.name}),onActivate:Wt=>yn(dt),onRemove:Wt=>h(Ne)(dt.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):ne("",!0)],512)],2),it.value?(b(),I("span",SBe,B(h(r)("composer.attachmentCount",{n:h(ie).length})),1)):ne("",!0),h(ie).length>=2?(b(),fe(h(gn),{key:1,text:h(r)("composer.clearAll")},{default:he(()=>[V(h(rn),{class:"att-clear",size:"sm",label:h(r)("composer.clearAll"),onClick:h(J)},{default:he(()=>[V(h(Ce),{name:"trash"})]),_:1},8,["label","onClick"])]),_:1},8,["text"])):ne("",!0)])):ne("",!0),C("div",MBe,[h(S)?(b(),fe(hBe,{key:0,items:h(M),ranges:h(_),"active-index":h(N),query:$.value,onSelect:h(T),onHover:ct[1]||(ct[1]=dt=>N.value=dt)},null,8,["items","ranges","active-index","query","onSelect"])):ne("",!0),h(R)?(b(),fe(CBe,{key:1,items:h(W),"active-index":h(z),loading:h(G),onSelect:h(q),onHover:ct[2]||(ct[2]=dt=>z.value=dt)},null,8,["items","active-index","loading","onSelect"])):ne("",!0),V(ys,{name:"composer-menu-pop"},{default:he(()=>[Sn.value?(b(),I("div",{key:0,ref_key:"addMenuRef",ref:Ws,class:"add-menu",onClick:ct[4]||(ct[4]=It(()=>{},["stop"])),onKeydown:Cn},[C("div",{ref_key:"addScrollRef",ref:xi,class:"am-scroll",role:"menu",onScroll:Ni},[(b(!0),I(Be,null,yt(Ln.value,dt=>(b(),I("button",{key:dt.id,type:"button",class:"am-row",role:"menuitem",onMousedown:ct[3]||(ct[3]=It(()=>{},["prevent"])),onClick:Wt=>ws(dt)},[C("span",EBe,[V(h(Ce),{name:dt.icon,size:"sm"},null,8,["name"])]),C("span",TBe,B(h(r)(dt.nameKey)),1),dt.descKey?(b(),I("span",LBe,B(h(r)(dt.descKey)),1)):ne("",!0)],40,IBe))),128))],544),Qi.value?(b(),I("div",{key:0,class:"scroll-thumb",style:Vt({top:`${Qi.value.top}px`,height:`${Qi.value.height}px`})},null,4)):ne("",!0)],544)):ne("",!0)]),_:1}),C("div",NBe,[xs.value?(b(),I("span",{key:0,ref_key:"wmPillRef",ref:yi,class:"wm-pill"},[V(h(Ce),{name:xs.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),C("span",null,B(xs.value==="goal"?h(r)("status.goalLabel"):h(r)("status.planLabel")),1),V(h(rn),{class:"wm-x",size:"sm",label:h(r)("status.workModeDismiss"),tooltip:h(r)("status.workModeDismiss"),onMousedown:ct[5]||(ct[5]=It(()=>{},["prevent"])),onClick:fo},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],512)):ne("",!0),Bn(C("textarea",{ref_key:"textareaRef",ref:f,"onUpdate:modelValue":ct[6]||(ct[6]=dt=>ls(a)?a.value=dt:null),class:"ph",style:Vt(ho.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!P.value,"aria-controls":P.value,"aria-activedescendant":O.value,onKeydown:Tn,onCompositionstart:Rt,onCompositionend:Ct,onInput:ee,onBlur:X},null,44,FBe),[[_o,h(a)]]),V(h(gn),{text:g.value?h(r)("composer.collapseTitle"):h(r)("composer.expandTitle")},{default:he(()=>[g.value||k.value?(b(),I("button",{key:0,class:"expand-btn",type:"button","aria-label":g.value?h(r)("composer.collapseTitle"):h(r)("composer.expandTitle"),onClick:m},[g.value?(b(),fe(h(Ce),{key:0,name:"collapse",size:"sm"})):(b(),fe(h(Ce),{key:1,name:"expand",size:"sm"}))],8,BBe)):ne("",!0)]),_:1},8,["text"])])]),Qt.value?(b(),I("input",{key:1,ref_key:"fileInputRef",ref:ce,type:"file",multiple:"",class:"file-input-hidden",onChange:ct[7]||(ct[7]=(...dt)=>h(Y)&&h(Y)(...dt))},null,544)):ne("",!0),C("div",{ref_key:"toolbarRef",ref:mi,class:"toolbar"},[C("div",{ref_key:"menuMeasureRef",ref:cr,class:"menu-measure","aria-hidden":"true"},[...ct[22]||(ct[22]=[C("span",{class:"pd-desc"},null,-1)])],512),C("div",$Be,[V(h(rn),{class:"composer-attach",size:"md",label:h(r)("composer.addMenu"),tooltip:h(r)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":Sn.value,onMousedown:ct[8]||(ct[8]=It(()=>{},["prevent"])),onClick:It(Mn,["stop"])},{default:he(()=>[V(h(Ce),{name:"plus"})]),_:1},8,["label","tooltip","aria-expanded"]),e.status?(b(),I("span",{key:0,ref_key:"permPillRef",ref:Li,class:De(["perm-pill",["perm-"+e.status.permission,{open:zn.value}]]),role:"button",tabindex:"0","aria-label":Ae.value,onClick:It(Hi,["stop"]),onKeydown:[qr(Hi,["enter"]),qr(It(Hi,["prevent"]),["space"])]},[V(h(Ce),{class:"perm-pill-icon",name:Se.value,size:"md"},null,8,["name"]),C("span",RBe,B(Ae.value),1)],42,DBe)):ne("",!0),V(ys,{name:"composer-menu-pop"},{default:he(()=>[zn.value&&e.status?(b(),I("div",{key:0,class:"perm-dropdown",style:Vt(on.value),role:"menu",onClick:ct[9]||(ct[9]=It(()=>{},["stop"]))},[(b(),I(Be,null,yt(Ho,dt=>C("button",{key:dt.mode,class:De(["pd-row",{"is-current":dt.mode===e.status.permission}]),role:"menuitem",onClick:Wt=>Gl(dt.mode)},[C("span",{class:"pd-icon",style:Vt({color:dt.color})},[V(h(Ce),{name:dt.icon,size:"md"},null,8,["name"])],4),C("span",OBe,[C("span",{class:"pd-name",style:Vt({color:dt.color})},B(h(r)(dt.labelKey)),5),C("span",PBe,B(h(r)(dt.descKey)),1)]),C("span",jBe,[dt.mode===e.status.permission?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)])],10,zBe)),64))],4)):ne("",!0)]),_:1}),Vs.value?(b(),I("span",HBe,[V(h(Ce),{class:"swarm-ic",name:"sparkles",size:"md"}),C("span",WBe,B(h(r)("status.swarmLabel")),1),V(h(rn),{class:"swarm-x",size:"sm",label:h(r)("status.swarmDismiss"),tooltip:h(r)("status.swarmDismiss"),onMousedown:ct[10]||(ct[10]=It(()=>{},["prevent"])),onClick:ct[11]||(ct[11]=It(dt=>o("toggleSwarm"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])])):ne("",!0)]),C("div",qBe,[Us.value?(b(),I("button",{key:0,class:"compact-chip",onClick:ct[12]||(ct[12]=It(dt=>o("compact"),["stop"]))},"/compact")):ne("",!0),V(h(gn),{text:qs.value},{default:he(()=>[e.status&&!e.hideContext?(b(),I("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":qs.value},[V(h(Oq),{pct:us.value},null,8,["pct"])],8,UBe)):ne("",!0)]),_:1},8,["text"]),e.status&&!bt.value&&!nn.value?(b(),I("button",{key:1,ref_key:"modelPillRef",ref:Lt,type:"button",class:De(["model-pill",{open:ni.value}]),"aria-haspopup":"menu","aria-expanded":ni.value,onClick:It(co,["stop"])},[C("span",VBe,B(e.status.model),1),Fi.value?(b(),I("span",ZBe,B(Fi.value),1)):ne("",!0),V(h(Ce),{class:"cv",name:"chevron-down",size:"sm"})],10,KBe)):e.status&&nn.value?(b(),I("button",{key:2,type:"button",class:"model-pill login-pill",onClick:ct[13]||(ct[13]=It(dt=>h(Cp)(),["stop"]))},[V(h(Ce),{name:"music",size:"sm"}),C("span",GBe,B(h(r)("sidebar.upgrade")),1)])):e.status&&bt.value?(b(),I("button",{key:3,type:"button",class:"model-pill login-pill",onClick:ct[14]||(ct[14]=It(dt=>o("login"),["stop"]))},[V(h(Ce),{name:"log-in",size:"sm"}),C("span",QBe,B(h(r)("login.action")),1)])):ne("",!0),e.working?(b(),fe(h(gn),{key:4,text:h(r)("composer.interruptTitle")},{default:he(()=>[C("button",{class:"stop","aria-label":h(r)("composer.interrupt"),onClick:ct[15]||(ct[15]=dt=>o("interrupt"))},[V(h(Ce),{name:"stop",size:"sm"})],8,YBe)]),_:1},8,["text"])):ne("",!0),V(h(gn),{text:as.value},{default:he(()=>[C("button",{class:De(["send",{"is-starting":e.starting}]),"aria-label":as.value,disabled:e.starting||!Kt.value,onClick:ct[16]||(ct[16]=dt=>mn())},[e.starting?(b(),fe(h(Bi),{key:0,size:"sm"})):(b(),fe(h(Ce),{key:1,name:"send",size:"sm"}))],10,JBe)]),_:1},8,["text"])]),V(ys,{name:"composer-menu-pop"},{default:he(()=>[ni.value&&e.status?(b(),I("div",{key:0,ref_key:"modelDropdownRef",ref:$t,class:"model-dropdown",style:Vt(So.value),role:"menu",onClick:ct[18]||(ct[18]=It(()=>{},["stop"])),onKeydown:Ht},[C("div",XBe,[Qn.value.length>0?(b(),I("div",e$e,B(h(r)("status.starredModels")),1)):ne("",!0),(b(!0),I(Be,null,yt(Qn.value,dt=>(b(),I("button",{key:dt.id,class:De(["md-row",{"is-current":dt.id===e.status.modelId}]),role:"menuitem",onClick:Wt=>Wn(dt.id)},[C("span",n$e,[dt.id===e.status.modelId?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)]),C("span",i$e,B(dt.displayName??dt.model),1),C("span",s$e,B(dt.provider),1),V(h(Ce),{class:"md-star",name:"star",size:"sm"})],10,t$e))),128)),Qn.value.length>0?(b(),I("div",o$e)):ne("",!0),Ye.value.length>0?(b(),I("div",r$e,B(Pe.value),1)):ne("",!0),(b(!0),I(Be,null,yt(Ye.value,dt=>(b(),I("button",{key:dt.id,class:De(["md-row",{"is-current":dt.id===e.status.modelId}]),role:"menuitem",onClick:Wt=>Wn(dt.id)},[C("span",a$e,[dt.id===e.status.modelId?(b(),fe(h(Ce),{key:0,name:"check",size:"sm"})):ne("",!0)]),C("span",u$e,B(dt.displayName??dt.model),1),wn(dt.id)?(b(),fe(h(Ce),{key:0,class:"md-star",name:"star",size:"sm"})):ne("",!0)],10,l$e))),128))]),Ye.value.length>0?(b(),I("div",c$e)):ne("",!0),C("div",d$e,[C("span",f$e,B(h(r)("status.thinkingLabel")),1),$e.value==="unsupported"?(b(),I("span",h$e,B(h(r)("status.modeNotSupported")),1)):nt.value.length>1?(b(),fe(h(wo),{key:1,"model-value":Zt.value,options:Ks.value,size:"xs","onUpdate:modelValue":di},null,8,["model-value","options"])):(b(),I("span",p$e,B(fi(nt.value[0]??Nt.value)),1))]),ct[23]||(ct[23]=C("div",{class:"md-divider"},null,-1)),C("div",g$e,B(h(r)("status.cacheNote")),1),ct[24]||(ct[24]=C("div",{class:"md-divider"},null,-1)),C("button",{class:"md-row md-row-more",role:"menuitem",onClick:ct[17]||(ct[17]=dt=>{Bs(),o("pickModel")})},[C("span",m$e,[V(h(Ce),{name:"list",size:"sm"})]),C("span",v$e,B(h(r)("status.moreModels")),1),V(h(Ce),{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],36)):ne("",!0)]),_:1})],512)]),Ee.$slots.footer?(b(),I("div",y$e,[En(Ee.$slots,"footer",{},void 0,!0)])):ne("",!0),C("div",{class:De(["drop-overlay",{show:h(pe)}]),"aria-hidden":"true"},[C("div",b$e,[V(h(Ce),{name:"file-plus",size:"lg"}),C("span",null,B(h(r)("composer.dropToAttach")),1)])],2)],34))}}),UD=vt(k$e,[["__scopeId","data-v-a4ef2d7c"]]),A$e={class:"goal-panel"},C$e={key:0,class:"goal-criterion"},w$e={class:"goal-criterion-label"},x$e=tt({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=Bt();return(n,i)=>(b(),I("div",A$e,[V(h(Kl),{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(b(),I("div",C$e,[C("span",w$e,[V(h(Ce),{name:"check-list",size:"sm"}),Ue(" "+B(h(t)("status.goalDoneWhen")),1)]),V(h(Kl),{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):ne("",!0)]))}}),_$e=vt(x$e,[["__scopeId","data-v-cdb3e8b0"]]),S$e={class:"plan-panel"},M$e={key:0,class:"plan-review-row"},I$e={class:"plan-review-label"},E$e={key:1,class:"plan-review-row"},T$e={class:"plan-review-label"},L$e={class:"plan-review-feedback"},N$e={key:3,class:"plan-path-only"},F$e={class:"plan-path-hint"},B$e={key:1,class:"plan-empty"},$$e=tt({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function}},setup(e){const t=e,{t:n}=Bt(),i=F(()=>t.plan&&!t.plan.plan&&t.plan.path?t.plan.path:void 0);function s(){i.value&&t.openFile?.({path:i.value})}return(o,r)=>(b(),I("div",S$e,[e.plan?(b(),I(Be,{key:0},[e.plan.review?.selectedOption?(b(),I("div",M$e,[C("span",I$e,B(h(n)("tools.plan.selectedOption")),1),C("span",null,B(e.plan.review.selectedOption),1)])):ne("",!0),e.plan.review?.feedback?(b(),I("div",E$e,[C("span",T$e,B(h(n)("tools.plan.feedback")),1),C("span",L$e,B(e.plan.review.feedback),1)])):ne("",!0),e.plan.plan?(b(),fe(h(Kl),{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):ne("",!0),i.value?(b(),I("div",N$e,[C("span",F$e,B(h(n)("tools.plan.pathOnlyHint")),1),V(h(jt),{variant:"ghost",size:"sm",class:"plan-path",onClick:s},{default:he(()=>[Ue(B(i.value),1)]),_:1})])):ne("",!0)],64)):(b(),I("div",B$e,[V(h(Ce),{name:"file-edit",size:"lg",class:"plan-empty-ico"}),C("span",null,B(e.planModeOn?h(n)("status.planEmptyArmed"):h(n)("status.planEmptyIdle")),1)]))]))}}),D$e=vt($$e,[["__scopeId","data-v-dea23306"]]),R$e={key:0,class:"qh-chip"},z$e={class:"qtitle"},O$e={class:"qbody"},P$e={class:"qopts"},j$e=["onClick"],H$e={class:"qopt-key"},W$e={class:"qopt-text"},q$e={class:"qopt-label"},U$e={key:0,class:"qopt-desc"},K$e={class:"qopt-label"},V$e=["placeholder"],Z$e={class:"qfoot"},G$e={class:"qbtns"},Q$e={class:"qhint"},Y$e=tt({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:i}=Bt(),s=t,o=Z(0),r=Z(!1);function l(){r.value&&(r.value=!1)}const a=F(()=>n.question.questions[o.value]),u=F(()=>n.question.questions.length);function c(){o.value>0&&o.value--}function d(){o.value<u.value-1&&o.value++}function f(K){const H=g.value[K];return H?H.kind==="multi"?H.optionIds.length>0:H.kind==="multiWithOther"?H.optionIds.length>0||H.otherText.trim().length>0:H.kind==="other"?H.text.trim().length>0:!0:!1}function p(){return f(a.value.id)}const g=Z({});function m(K){return K.recommended===!0?!0:/\b(?:recommended|recommend)\b|推荐/.test(`${K.label} ${K.description??""}`.toLowerCase())}function y(){const K={...g.value};let H=!1;for(const q of n.question.questions){if(K[q.id])continue;const X=q.options.filter(m);X.length!==0&&(K[q.id]=q.multiSelect?{kind:"multi",optionIds:X.map(ee=>ee.id)}:{kind:"single",optionId:X[0].id},H=!0)}H&&(g.value=K)}Qe(()=>n.question.questionId,()=>{o.value=0,r.value=!1,g.value={},A.value={}}),Qe(()=>n.question,()=>{o.value>=n.question.questions.length&&(o.value=0),y()},{immediate:!0,deep:!0});function w(K,H){const q=g.value[K];if(q&&q.kind==="single"&&q.optionId===H){const X={...g.value};delete X[K],g.value=X}else g.value={...g.value,[K]:{kind:"single",optionId:H}}}function k(K,H){const q=g.value[K],X=q&&(q.kind==="multi"||q.kind==="multiWithOther")?q.kind==="multi"?[...q.optionIds]:[...q.optionIds]:[],ee=X.indexOf(H);ee>=0?X.splice(ee,1):X.push(H);const ue=g.value[K],ie=ue&&ue.kind==="multiWithOther"?ue.otherText:"";ie?g.value={...g.value,[K]:{kind:"multiWithOther",optionIds:X,otherText:ie}}:g.value={...g.value,[K]:{kind:"multi",optionIds:X}}}const A=Z({}),v=Z(null);function x(K){const H=n.question.questions.find(X=>X.id===K),q=A.value[K]??"";if(H.multiSelect){const X=g.value[K],ee=X&&(X.kind==="multi"||X.kind==="multiWithOther")?X.kind==="multi"?[...X.optionIds]:[...X.optionIds]:[];g.value={...g.value,[K]:{kind:"multiWithOther",optionIds:ee,otherText:q}}}else g.value={...g.value,[K]:{kind:"other",text:q}}}function E(K){x(K),kt(()=>v.value?.focus())}function S(K,H){const q=g.value[K];return q?q.kind==="single"?q.optionId===H:q.kind==="multi"||q.kind==="multiWithOther"?q.optionIds.includes(H):!1:!1}function M(K){const H=g.value[K];return!!(H&&(H.kind==="other"||H.kind==="multiWithOther"))}function _(){return n.question.questions.every(K=>f(K.id))}const N=F(()=>n.busyKind==="answer"),D=F(()=>n.busyKind==="dismiss"),T=F(()=>!!n.busyKind);function $(){if(T.value||!_())return;const K={answers:g.value,method:"click"};s("answer",n.question.questionId,K)}function P(){T.value||s("dismiss",n.question.questionId)}const O=Z(0);Qe([o,()=>n.question.questionId],()=>{O.value=0});const{handleCompositionStart:R,handleCompositionEnd:W,isComposingKeyEvent:z}=Kr();function G(K){const H=(document.activeElement?.tagName??"").toLowerCase(),q=H==="input"||H==="textarea";if(K.metaKey||K.ctrlKey||K.altKey||T.value||z(K)||Ao.value>0)return;if(K.key==="Enter"){if(K.preventDefault(),r.value)return;o.value<u.value-1&&p()?d():_()&&$();return}if(q)return;if(K.key==="Escape"){if(Ao.value>0||K.defaultPrevented)return;K.preventDefault(),P();return}if(r.value)return;if(K.key==="ArrowDown"||K.key==="ArrowUp"){const ee=a.value,ue=ee.options.length+(ee.allowOther?1:0);if(ue===0)return;K.preventDefault();const ie=K.key==="ArrowDown"?1:-1,xe=Math.min(ue-1,Math.max(0,O.value+ie));if(xe===O.value)return;O.value=xe;const ce=ee.options[O.value];ce?ee.multiSelect||w(ee.id,ce.id):ee.allowOther&&!ee.multiSelect&&x(ee.id);return}if(K.key===" "&&a.value.multiSelect){K.preventDefault();const ee=a.value,ue=ee.options[O.value];ue?k(ee.id,ue.id):ee.allowOther&&x(ee.id);return}const X=parseInt(K.key,10);if(!isNaN(X)&&X>=1&&X<=9){K.preventDefault();const ee=a.value,ue=X-1,ie=ee.options[ue];ie&&(O.value=ue,ee.multiSelect?k(ee.id,ie.id):w(ee.id,ie.id))}}return pn(()=>document.addEventListener("keydown",G)),An(()=>document.removeEventListener("keydown",G)),(K,H)=>(b(),I("div",{class:De(["qcard",{minimized:r.value}])},[C("div",{class:De(["qh",{clickable:r.value}]),onClick:l},[u.value>1?(b(),I("span",R$e,B(o.value+1),1)):ne("",!0),C("span",z$e,B(a.value.question),1),V(h(rn),{class:"qmin",size:"sm",label:r.value?h(i)("question.expand"):h(i)("question.minimize"),tooltip:r.value?h(i)("question.expand"):h(i)("question.minimize"),onClick:H[0]||(H[0]=It(q=>r.value=!r.value,["stop"]))},{default:he(()=>[r.value?(b(),fe(h(Ce),{key:0,name:"chevron-up",size:"md"})):(b(),fe(h(Ce),{key:1,name:"minus",size:"md"}))]),_:1},8,["label","tooltip"]),V(h(rn),{class:"qclose",size:"sm",label:h(i)("question.dismiss"),tooltip:h(i)("question.dismiss"),disabled:T.value,onClick:It(P,["stop"])},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip","disabled"])],2),r.value?ne("",!0):(b(),I(Be,{key:0},[C("div",O$e,[a.value.body?(b(),fe(h(Kl),{key:0,text:a.value.body,class:"qmdbody"},null,8,["text"])):ne("",!0),C("div",P$e,[(b(!0),I(Be,null,yt(a.value.options,(q,X)=>(b(),I("label",{key:q.id,class:De(["qopt",{selected:S(a.value.id,q.id),highlighted:a.value.multiSelect&&X===O.value}]),onClick:It(ee=>{O.value=X,a.value.multiSelect?k(a.value.id,q.id):w(a.value.id,q.id)},["prevent"])},[C("span",H$e,B(X+1),1),C("span",{class:De(["qopt-glyph",a.value.multiSelect?"chk":"rad"])},null,2),C("span",W$e,[C("span",q$e,B(q.label),1),q.description?(b(),I("span",U$e,B(q.description),1)):ne("",!0)])],10,j$e))),128)),a.value.allowOther?(b(),I("label",{key:0,class:De(["qopt",{selected:M(a.value.id),highlighted:a.value.multiSelect&&O.value===a.value.options.length}]),onClick:H[6]||(H[6]=It(q=>{O.value=a.value.options.length,E(a.value.id)},["prevent"]))},[H[7]||(H[7]=C("span",{class:"qopt-key"},null,-1)),C("span",{class:De(["qopt-glyph",a.value.multiSelect?"chk":"rad"])},null,2),C("span",K$e,B(a.value.otherLabel??h(i)("question.otherDefault")),1),Bn(C("input",{ref_key:"otherInputEl",ref:v,"onUpdate:modelValue":H[1]||(H[1]=q=>A.value[a.value.id]=q),class:"other-input",type:"text",placeholder:a.value.otherLabel??h(i)("question.otherDefault"),onInput:H[2]||(H[2]=q=>x(a.value.id)),onFocus:H[3]||(H[3]=q=>x(a.value.id)),onCompositionstart:H[4]||(H[4]=(...q)=>h(R)&&h(R)(...q)),onCompositionend:H[5]||(H[5]=(...q)=>h(W)&&h(W)(...q))},null,40,V$e),[[_o,A.value[a.value.id]]])],2)):ne("",!0)])]),C("div",Z$e,[C("div",G$e,[o.value<u.value-1?(b(),fe(h(jt),{key:0,class:"qmain",size:"md",variant:"primary",disabled:!p(),onClick:d},{default:he(()=>[Ue(B(h(i)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(b(),fe(h(jt),{key:1,class:"qmain",size:"md",variant:"primary",disabled:!_(),loading:N.value,onClick:$},{default:he(()=>[Ue(B(h(i)("question.submit")),1)]),_:1},8,["disabled","loading"])),u.value>1?(b(),fe(h(jt),{key:2,size:"md",variant:"ghost",disabled:o.value===0||T.value,onClick:c},{default:he(()=>[Ue(B(h(i)("question.back")),1)]),_:1},8,["disabled"])):ne("",!0),V(h(jt),{size:"md",variant:"ghost",loading:D.value,disabled:T.value,onClick:P},{default:he(()=>[Ue(B(h(i)("question.dismiss")),1)]),_:1},8,["loading","disabled"])]),C("span",Q$e,B(h(i)("question.hint")),1)])],64))],2))}}),J$e=vt(Y$e,[["__scopeId","data-v-ca95f2cd"]]),X$e={class:"akind"},eDe={key:1,class:"apeek"},tDe={class:"ab"},nDe=["title"],iDe={class:"code-path"},sDe={key:2,class:"body-shell"},oDe={class:"shell-cmd"},rDe={key:0,class:"shell-cwd"},lDe={key:1,class:"shell-danger"},aDe={class:"code-path"},uDe={key:4,class:"body-chip"},cDe={class:"chip-label"},dDe={class:"chip-value"},fDe={key:0,class:"chip-detail"},hDe={key:5,class:"body-chip"},pDe={key:0,class:"chip-label"},gDe={class:"chip-value"},mDe={key:6,class:"body-chip"},vDe={class:"chip-label"},yDe={class:"chip-value"},bDe={key:0,class:"chip-detail"},kDe={key:7,class:"body-chip"},ADe={class:"chip-label"},CDe={class:"chip-value"},wDe={key:0,class:"chip-detail"},xDe={key:8,class:"body-todo"},_De={class:"todo-glyph"},SDe={key:0,class:"plan-opts"},MDe=["disabled","onClick"],IDe={class:"popt-key"},EDe={class:"popt-text"},TDe={class:"popt-label"},LDe={key:0,class:"popt-desc"},NDe={key:10,class:"body-generic"},FDe={class:"gen-text"},BDe={key:11,class:"feedback-wrap"},$De=["placeholder"],DDe={class:"feedback-hint"},RDe={class:"af"},zDe={class:"abtns"},ODe={key:0,class:"knum"},PDe={key:0,class:"knum"},jDe=tt({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean},openFile:{type:Function}},emits:["decide"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>{const q=n.block;return q.kind!=="plan_review"?null:{plan:q.plan,path:q.path,options:q.options??[]}}),r=Z(!1),l=Z(null),a=Z(!1);function u(){a.value=(l.value?.scrollTop??0)>0}function c(q){a.value=q.target.scrollTop>0}const d=Z(!1),f=F(()=>{const q=n.block.kind;return q==="plan_review"||q==="diff"||q==="file"});function p(){r.value&&(r.value=!1)}const g=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function m(){return g.includes(n.block.kind)?n.block.kind:"generic"}function y(){return s(`approval.title.${m()}`)}const w=F(()=>{const q=n.block;switch(q.kind){case"diff":case"file":case"fileop":return q.path;case"shell":return q.command;case"url":return q.url;case"search":return q.query;case"invocation":return q.name;case"generic":return q.summary;default:return""}}),k=Z(!1),A=Z(""),v=Z(null);function x(){n.busy||(k.value=!0,A.value="",setTimeout(()=>v.value?.focus(),0))}function E(){if(n.busy)return;const q=A.value.trim();o.value?$("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:q||void 0}):$("feedback",{decision:"rejected",feedback:q||void 0}),k.value=!1,A.value=""}function S(){n.busy||(k.value=!1,A.value="")}const{handleCompositionStart:M,handleCompositionEnd:_,isComposingKeyEvent:N}=Kr();function D(q){N(q)||(q.key==="Enter"&&!q.shiftKey?(q.preventDefault(),E()):q.key==="Escape"&&(q.preventDefault(),S()))}const T=Z(null);Qe(()=>n.busy,q=>{q||(T.value=null)});function $(q,X){n.busy||(T.value=q,i("decide",X))}function P(){$("approve",{decision:"approved"})}function O(){$("approveSession",{decision:"approved",scope:"session"})}function R(){$("reject",{decision:"rejected"})}function W(){$("approvePlan",{decision:"approved"})}function z(q){$(`option:${q}`,{decision:"approved",selectedLabel:q})}function G(){n.busy||x()}function K(){$("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function H(q){const X=(document.activeElement?.tagName??"").toLowerCase();if(X==="input"||X==="textarea"||q.metaKey||q.ctrlKey||q.altKey||Ao.value>0||q.defaultPrevented)return;if(k.value){q.key==="Escape"&&(q.preventDefault(),S());return}if(n.busy||r.value)return;const ee=o.value;if(ee){if(ee.options.length===0){q.key==="1"?(q.preventDefault(),W()):q.key==="2"?(q.preventDefault(),G()):q.key==="3"&&(q.preventDefault(),K());return}q.key==="1"&&ee.options[0]?(q.preventDefault(),z(ee.options[0].label)):q.key==="2"&&ee.options[1]?(q.preventDefault(),z(ee.options[1].label)):q.key==="3"&&ee.options[2]&&(q.preventDefault(),z(ee.options[2].label));return}q.key==="1"?(q.preventDefault(),P()):q.key==="2"?(q.preventDefault(),O()):q.key==="3"?(q.preventDefault(),R()):q.key==="4"&&(q.preventDefault(),x())}return pn(()=>document.addEventListener("keydown",H)),An(()=>document.removeEventListener("keydown",H)),vp(u),(q,X)=>(b(),I("div",{class:De(["appr",{minimized:r.value}])},[C("div",{class:De(["ah",{clickable:r.value}]),onClick:p},[C("span",X$e,B(y()),1),e.agentName&&!r.value?(b(),fe(h(Hl),{key:0,variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(h(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):ne("",!0),r.value&&w.value?(b(),I("span",eDe,B(w.value),1)):ne("",!0),f.value&&!r.value?(b(),fe(h(rn),{key:2,class:"aexpand",size:"sm",label:d.value?h(s)("approval.collapsePlan"):h(s)("approval.expandPlan"),tooltip:d.value?h(s)("approval.collapsePlan"):h(s)("approval.expandPlan"),onClick:X[0]||(X[0]=ee=>d.value=!d.value)},{default:he(()=>[V(h(Ce),{name:d.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):ne("",!0),V(h(rn),{class:"amin",size:"sm",label:r.value?h(s)("question.expand"):h(s)("question.minimize"),tooltip:r.value?h(s)("question.expand"):h(s)("question.minimize"),onClick:X[1]||(X[1]=It(ee=>r.value=!r.value,["stop"]))},{default:he(()=>[r.value?(b(),fe(h(Ce),{key:0,name:"chevron-up",size:"md"})):(b(),fe(h(Ce),{key:1,name:"minus",size:"md"}))]),_:1},8,["label","tooltip"])],2),r.value?ne("",!0):(b(),I(Be,{key:0},[C("div",tDe,[e.block.kind==="plan_review"&&e.block.path?(b(),I("button",{key:0,type:"button",class:"plan-path",title:e.block.path,onClick:X[2]||(X[2]=ee=>n.openFile?.({path:e.block.path,content:e.block.plan}))},B(e.block.path),9,nDe)):ne("",!0),e.block.kind==="diff"?(b(),I("div",{key:1,class:De(["body-code",{expanded:d.value}])},[C("div",iDe,B(e.block.path),1),e.block.diff.length>0?(b(),fe(al,{key:0,lines:e.block.diff,path:e.block.path},null,8,["lines","path"])):ne("",!0)],2)):e.block.kind==="shell"?(b(),I("div",sDe,[C("div",oDe,[X[6]||(X[6]=C("span",{class:"shell-dollar"},"$",-1)),Ue(" "+B(e.block.command),1)]),e.block.cwd?(b(),I("div",rDe,"cwd: "+B(e.block.cwd),1)):ne("",!0),e.block.danger?(b(),I("div",lDe,[V(h(Ce),{name:"alert-triangle",size:"sm",class:"shell-danger-ic"}),C("span",null,B(h(s)("approval.danger",{detail:e.block.danger})),1)])):ne("",!0)])):e.block.kind==="file"?(b(),I("div",{key:3,class:De(["body-code",{expanded:d.value}])},[C("div",aDe,B(e.block.path),1),V(al,{code:e.block.content,path:e.block.path},null,8,["code","path"])],2)):e.block.kind==="fileop"?(b(),I("div",uDe,[C("span",cDe,B(e.block.op),1),C("span",dDe,B(e.block.path),1),e.block.detail?(b(),I("span",fDe,B(e.block.detail),1)):ne("",!0)])):e.block.kind==="url"?(b(),I("div",hDe,[e.block.method?(b(),I("span",pDe,B(e.block.method),1)):ne("",!0),C("span",gDe,B(e.block.url),1)])):e.block.kind==="search"?(b(),I("div",mDe,[C("span",vDe,B(h(s)("approval.searchQueryLabel")),1),C("span",yDe,B(e.block.query),1),e.block.scope?(b(),I("span",bDe,B(h(s)("approval.searchScope",{scope:e.block.scope})),1)):ne("",!0)])):e.block.kind==="invocation"?(b(),I("div",kDe,[C("span",ADe,B(e.block.kind2),1),C("span",CDe,B(e.block.name),1),e.block.description?(b(),I("span",wDe,B(e.block.description),1)):ne("",!0)])):e.block.kind==="todo"?(b(),I("div",xDe,[(b(!0),I(Be,null,yt(e.block.items,(ee,ue)=>(b(),I("div",{key:ue,class:"todo-item"},[C("span",_De,B(ee.status==="done"||ee.status==="completed"?"✓":"○"),1),C("span",{class:De(["todo-title",{"todo-done":ee.status==="done"||ee.status==="completed"}])},B(ee.title),3)]))),128))])):e.block.kind==="plan_review"?(b(),I("div",{key:9,class:De(["body-plan-wrap",{scrolled:a.value}])},[C("div",{ref_key:"planBodyEl",ref:l,class:De(["body-plan",{expanded:d.value}]),onScroll:c},[V(h(Kl),{text:e.block.plan,"open-file":n.openFile},null,8,["text","open-file"])],34),o.value&&o.value.options.length>0?(b(),I("div",SDe,[(b(!0),I(Be,null,yt(o.value.options,(ee,ue)=>(b(),I("button",{key:ue,type:"button",class:"popt",disabled:e.busy,onClick:ie=>z(ee.label)},[C("span",IDe,B(ue+1),1),C("span",EDe,[C("span",TDe,B(ee.label),1),ee.description?(b(),I("span",LDe,B(ee.description),1)):ne("",!0)]),T.value===`option:${ee.label}`?(b(),fe(h(Bi),{key:0,size:"sm",class:"popt-spin"})):ne("",!0)],8,MDe))),128))])):ne("",!0)],2)):(b(),I("div",NDe,[C("span",FDe,B(e.block.summary),1)])),k.value?(b(),I("div",BDe,[Bn(C("textarea",{ref_key:"feedbackRef",ref:v,"onUpdate:modelValue":X[3]||(X[3]=ee=>A.value=ee),class:"feedback-ta",placeholder:h(s)("approval.feedbackPlaceholder"),rows:"2",onKeydown:D,onCompositionstart:X[4]||(X[4]=(...ee)=>h(M)&&h(M)(...ee)),onCompositionend:X[5]||(X[5]=(...ee)=>h(_)&&h(_)(...ee))},null,40,$De),[[_o,A.value]]),C("div",DDe,B(h(s)("approval.feedbackHint")),1)])):ne("",!0)]),C("div",RDe,[C("div",zDe,[k.value?(b(),I(Be,{key:0},[V(h(jt),{size:"md",variant:"danger-soft",loading:T.value==="feedback",disabled:e.busy,onClick:E},{default:he(()=>[Ue(B(h(s)("approval.feedbackSubmit")),1)]),_:1},8,["loading","disabled"]),V(h(jt),{size:"md",variant:"ghost",disabled:e.busy,onClick:S},{default:he(()=>[Ue(B(h(s)("approval.feedbackCancel")),1)]),_:1},8,["disabled"])],64)):o.value?(b(),I(Be,{key:1},[o.value.options.length===0?(b(),fe(h(jt),{key:0,class:"amain",size:"md",variant:"primary",loading:T.value==="approvePlan",disabled:e.busy,onClick:W},{default:he(()=>[X[7]||(X[7]=C("span",{class:"knum"},"1",-1)),Ue(B(h(s)("approval.approvePlan")),1)]),_:1},8,["loading","disabled"])):ne("",!0),V(h(jt),{size:"md",variant:"ghost",disabled:e.busy,onClick:G},{default:he(()=>[o.value.options.length===0?(b(),I("span",ODe,"2")):ne("",!0),Ue(B(h(s)("approval.revise")),1)]),_:1},8,["disabled"]),V(h(jt),{size:"md",variant:"ghost",loading:T.value==="rejectAndExit",disabled:e.busy,onClick:K},{default:he(()=>[o.value.options.length===0?(b(),I("span",PDe,"3")):ne("",!0),Ue(B(h(s)("approval.rejectAndExit")),1)]),_:1},8,["loading","disabled"])],64)):(b(),I(Be,{key:2},[V(h(jt),{class:"amain",size:"md",variant:"primary",loading:T.value==="approve",disabled:e.busy,onClick:P},{default:he(()=>[X[8]||(X[8]=C("span",{class:"knum"},"1",-1)),Ue(B(h(s)("approval.approve")),1)]),_:1},8,["loading","disabled"]),V(h(jt),{size:"md",variant:"ghost",loading:T.value==="approveSession",disabled:e.busy,onClick:O},{default:he(()=>[X[9]||(X[9]=C("span",{class:"knum"},"2",-1)),Ue(B(h(s)("approval.approveSession")),1)]),_:1},8,["loading","disabled"]),V(h(jt),{size:"md",variant:"ghost",loading:T.value==="reject",disabled:e.busy,onClick:R},{default:he(()=>[X[10]||(X[10]=C("span",{class:"knum"},"3",-1)),Ue(B(h(s)("approval.reject")),1)]),_:1},8,["loading","disabled"]),V(h(jt),{size:"md",variant:"ghost",disabled:e.busy,onClick:x},{default:he(()=>[X[11]||(X[11]=C("span",{class:"knum"},"4",-1)),Ue(B(h(s)("approval.feedback")),1)]),_:1},8,["disabled"])],64))])])],64))],2))}}),HDe=vt(jDe,[["__scopeId","data-v-cd852243"]]),WDe={class:"taskspane"},qDe={class:"tp-list"},UDe={key:0,class:"tp-empty"},KDe={class:"tp-main"},VDe=["aria-label","onClick"],ZDe=["aria-label"],GDe={class:"tp-name"},QDe={key:1,class:"tp-meta"},YDe={key:2,class:"tp-model"},JDe={key:3,class:"tp-model"},XDe={key:4,class:"tp-time"},eRe=tt({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=e,i={active:"tasks.emptyRecent",running:"tasks.emptyRunning",done:"tasks.emptyDone",all:"tasks.emptyTasks"},s=F(()=>i[n.filter??"all"]),o=t,{t:r}=Bt();function l(y){return!!(y.output&&y.output.length>0||y.meta)}function a(y){u(y)&&o("open",y.agentId??y.id)}function u(y){return y.kind==="subagent"||l(y)}function c(y){return typeof y.durationMs!="number"?"":Ma(y.durationMs,{h:r("status.timeUnitHour"),m:r("status.timeUnitMinute"),s:r("status.timeUnitSecond")})}function d(y){return y.state==="done"?r("tasks.stateDone"):y.state==="fail"?r("tasks.stateFail"):y.state==="cancelled"?r("tasks.stateCancelled"):r("tasks.running")}const f=an("modelDisplay"),p=an("subagentEffort");function g(y){if(y.kind==="subagent")return f?.(y.model)}function m(y){if(y.kind==="subagent")return p?.(y.thinkingEffort)}return(y,w)=>(b(),I("div",WDe,[C("div",qDe,[e.tasks.length===0?(b(),I("div",UDe,B(h(r)(s.value)),1)):(b(!0),I(Be,{key:1},yt(e.tasks,k=>(b(),I("div",{key:k.id,class:De(["tp-row",{fail:k.state==="fail",expandable:u(k)}])},[C("div",KDe,[u(k)?(b(),I("button",{key:0,type:"button",class:"tp-open","aria-label":k.name,onClick:A=>a(k)},null,8,VDe)):ne("",!0),C("span",{class:"tp-glyph",role:"img","aria-label":d(k)},[k.state==="run"?(b(),fe(h(hl),{key:0,status:"running"})):k.state==="done"?(b(),fe(h(Ce),{key:1,class:"tp-done",name:"circle-check",size:"sm"})):k.state==="cancelled"?(b(),fe(h(Ce),{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(b(),fe(h(Ce),{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,ZDe),C("span",GDe,B(k.name),1),k.meta?(b(),I("span",QDe,B(k.meta),1)):ne("",!0),g(k)?(b(),I("span",YDe,B(g(k)),1)):ne("",!0),m(k)?(b(),I("span",JDe,B(m(k)),1)):ne("",!0),c(k)?(b(),I("span",XDe,B(c(k)),1)):ne("",!0),k.state==="run"?(b(),fe(h(rn),{key:5,class:"tp-stop",size:"sm",label:h(r)("tasks.stop"),tooltip:h(r)("tasks.stop"),onClick:It(A=>o("cancel",k.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip","onClick"])):ne("",!0),u(k)?(b(),fe(h(Ce),{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):ne("",!0)])],2))),128))])]))}}),tRe=vt(eRe,[["__scopeId","data-v-d5a5712a"]]),nRe={key:0,class:"sg-empty"},iRe={key:1,class:"sg-grid"},sRe=["aria-label","onClick"],oRe={class:"sg-top"},rRe={class:"sg-num"},lRe={class:"sg-name"},aRe={key:1,class:"sg-desc"},uRe={class:"sg-foot"},cRe={key:0,class:"sg-model"},dRe={class:"sg-status"},fRe={class:"sg-state"},hRe={key:0,class:"sg-time"},pRe=tt({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["open","cancel"],setup(e,{emit:t}){const n=e,i={active:"tasks.emptyRecent",running:"tasks.emptyRunning",done:"tasks.emptyDone",all:"tasks.emptyTasks"},s=F(()=>i[n.filter??"all"]),o=t,{t:r}=Bt(),l=an("modelDisplay"),a=an("subagentEffort");function u(g){const m=[l?.(g.model),a?.(g.thinkingEffort)].filter(y=>y!==void 0);return m.length>0?m.join(" · "):void 0}function c(g){return r(g==="done"?"tasks.stateDone":g==="fail"?"tasks.stateFail":g==="cancelled"?"tasks.stateCancelled":"tasks.running")}function d(g){return typeof g.durationMs!="number"?"":Ma(g.durationMs,{h:r("status.timeUnitHour"),m:r("status.timeUnitMinute"),s:r("status.timeUnitSecond")})}function f(g,m){return String((g.swarmIndex??m)+1).padStart(2,"0")}function p(g){return!!g.agentId||!!(g.output&&g.output.length>0)}return(g,m)=>e.tasks.length===0?(b(),I("div",nRe,B(h(r)(s.value)),1)):(b(),I("div",iRe,[(b(!0),I(Be,null,yt(e.tasks,(y,w)=>(b(),I("div",{key:y.id,class:De(["sg-card",[`s-${y.state}`,{openable:p(y)}]])},[p(y)?(b(),I("button",{key:0,type:"button",class:"sg-open","aria-label":y.name,onClick:k=>o("open",y.agentId??y.id)},null,8,sRe)):ne("",!0),C("div",oRe,[C("span",rRe,B(f(y,w)),1),C("span",lRe,B(y.name),1)]),y.meta?(b(),I("div",aRe,B(y.meta),1)):ne("",!0),C("div",uRe,[u(y)?(b(),I("div",cRe,[V(h(Ce),{name:"robot",size:"sm"}),C("span",null,B(u(y)),1)])):ne("",!0),C("div",dRe,[C("span",fRe,[y.state==="run"?(b(),fe(h(hl),{key:0,status:"running"})):y.state==="done"?(b(),fe(h(Ce),{key:1,class:"sg-ic-done",name:"circle-check",size:"sm"})):(b(),fe(h(Ce),{key:2,name:"close",size:"sm"})),Ue(" "+B(c(y.state)),1)]),d(y)?(b(),I("span",hRe,[V(h(Ce),{name:"clock",size:"sm"}),Ue(B(d(y)),1)])):ne("",!0)])]),y.state==="run"?(b(),fe(h(rn),{key:2,class:"sg-cancel",size:"sm",label:h(r)("tasks.stop"),tooltip:h(r)("tasks.stop"),onClick:It(k=>o("cancel",y.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"close",size:"sm"})]),_:1},8,["label","tooltip","onClick"])):ne("",!0)],2))),128))]))}}),gRe=vt(pRe,[["__scopeId","data-v-f7e4b600"]]),mRe={class:"todo-card"},vRe={key:0,class:"tc-empty"},yRe={class:"tc-name"},bRe=tt({__name:"TodoCard",props:{todos:{}},setup(e){const t=e,{t:n}=Bt();return(i,s)=>(b(),I("div",mRe,[t.todos.length===0?(b(),I("div",vRe,[V(h(Ce),{name:"check-list",size:"lg",class:"tc-empty-ico"}),C("span",null,B(h(n)("tasks.emptyTodo")),1)])):ne("",!0),(b(!0),I(Be,null,yt(t.todos,(o,r)=>(b(),I("div",{key:r,class:De(["tc-row",`s-${o.status}`])},[C("span",{class:De(["tc-glyph",`g-${o.status}`]),"aria-hidden":"true"},[o.status==="in_progress"?(b(),fe(h(Bi),{key:0,size:"xs",class:"tc-spin"})):o.status==="done"?(b(),fe(h(Ce),{key:1,name:"circle-check",size:"md"})):ne("",!0)],2),C("span",yRe,B(o.title),1)],2))),128))]))}}),kRe=vt(bRe,[["__scopeId","data-v-f090f678"]]),$h=tt({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e,{emit:t}){const n=t;return(i,s)=>(b(),fe(h(DE),{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:s[0]||(s[0]=o=>n("click",o))},{default:he(()=>[V(h(Ce),{name:e.icon,size:"md"},null,8,["name"]),C("span",null,[En(i.$slots,"default")]),En(i.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),ARe={class:"wp-head-tab"},CRe={key:0,class:"wp-head-meta"},wRe={key:0,class:"wp-head-actions"},xRe=tt({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(b(),I(Be,null,[C("span",ARe,[V(h(Ce),{name:e.icon,size:"md"},null,8,["name"]),C("span",null,B(e.title),1),e.meta?(b(),I("span",CRe,B(e.meta),1)):ne("",!0)]),t.$slots.actions?(b(),I("span",wRe,[En(t.$slots,"actions",{},void 0,!0)])):ne("",!0)],64))}}),Dh=vt(xRe,[["__scopeId","data-v-82048a74"]]),_Re={class:"fc-label"},SRe=tt({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,s=F(()=>n.options.find(N=>N.value===n.modelValue)),o=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",r=Z(null),l=Z(!1);let a=0,u=null;async function c(){const N=r.value?.closest(".dock-work-head");if(!N)return;const D=N.querySelector(".wp-head-tab"),T=getComputedStyle(N),$=(parseFloat(T.columnGap)||0)*2,P=N.clientWidth-parseFloat(T.paddingLeft)-parseFloat(T.paddingRight)-$,O=D?.scrollWidth??0;if(!l.value){const W=r.value?.querySelector(".ui-seg");W!==null&&W.offsetWidth>0&&(a=W.offsetWidth)}const R=O+a>P;if(l.value=R,!R){await kt();const W=r.value?.querySelector(".ui-seg");W!==null&&W.offsetWidth>0&&(a=W.offsetWidth),l.value=O+a>P}}pn(()=>{const N=r.value?.closest(".dock-work-head");!N||typeof ResizeObserver!="function"||(u=new ResizeObserver(c),u.observe(N),c())}),Qe(l,N=>{!N&&d.value&&w()}),Qe(Ao,N=>{N>0&&d.value&&w()}),Qe(()=>n.options,async()=>{a=0,await kt(),c()},{flush:"post"});const d=Z(!1),f=Z(null);function p(){return f.value?.$el??null}const g=Z(null),m=Z({left:"0px",top:"0px"});async function y(){if(d.value){w();return}d.value=!0,await kt(),k(),A(),window.addEventListener("mousedown",E,!0),window.addEventListener("keydown",S,!0),window.addEventListener("resize",k),window.addEventListener("scroll",k,!0)}function w(N){d.value=!1,window.removeEventListener("mousedown",E,!0),window.removeEventListener("keydown",S,!0),window.removeEventListener("resize",k),window.removeEventListener("scroll",k,!0),N?.refocus&&p()?.focus()}function k(){const N=p();if(!N)return;const D=N.getBoundingClientRect(),T=g.value?.offsetHeight??0,$=getComputedStyle(document.documentElement),P=Number.parseFloat($.getPropertyValue("--space-2"))||0,O=Number.parseFloat($.getPropertyValue("--space-1"))||0,R=g.value?.offsetWidth??0,W=Math.min(D.left,Math.max(P,window.innerWidth-R-P));D.bottom+O+T<=window.innerHeight-P?m.value={left:`${W}px`,top:`${D.bottom+O}px`}:m.value={left:`${W}px`,bottom:`${window.innerHeight-D.top+O}px`}}function A(){const N=g.value;if(!N)return;(N.querySelector(".ui-menu-item.is-active")??N.querySelector(".ui-menu-item"))?.focus()}function v(){d.value||y()}function x(N){const D=N.relatedTarget;D&&(g.value?.contains(D)||p()?.contains(D))||w()}function E(N){const D=N.target;if(D){if(g.value?.contains(D)){N.stopImmediatePropagation();return}p()?.contains(D)||w()}}function S(N){N.key==="Escape"&&(N.preventDefault(),N.stopImmediatePropagation(),w({refocus:!0}))}function M(N){if(N.key!=="ArrowDown"&&N.key!=="ArrowUp")return;N.preventDefault();const D=Array.from(g.value?.querySelectorAll(".ui-menu-item")??[]);if(D.length===0)return;const T=D.indexOf(document.activeElement),$=N.key==="ArrowDown"?(T+1)%D.length:(T-1+D.length)%D.length;D[$]?.focus()}function _(N){i("update:modelValue",N),w({refocus:!0})}return Gn(()=>{u?.disconnect(),d.value&&w()}),(N,D)=>(b(),I("span",{ref_key:"root",ref:r,class:"filter-control"},[l.value?(b(),I(Be,{key:0},[V(h(DE),{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:y,onKeydown:[qr(It(v,["prevent"]),["down"]),qr(It(v,["prevent"]),["up"])],onFocusout:x},{default:he(()=>[s.value?.icon?(b(),fe(h(Ce),{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):ne("",!0),C("span",null,B(s.value?.label),1),V(h(Ce),{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(b(),fe(Wr,{to:"body"},[d.value?(b(),I("div",{key:0,ref_key:"menuBoxRef",ref:g,class:"fc-menu",style:Vt(m.value),onKeydown:M,onFocusout:x},[V(h(cl),null,{default:he(()=>[(b(!0),I(Be,null,yt(e.options,T=>(b(),fe(h(bn),{key:T.value,role:"menuitemradio",active:T.value===e.modelValue,"aria-checked":T.value===e.modelValue,size:h(o),onClick:$=>_(T.value)},{default:he(()=>[T.icon?(b(),fe(h(Ce),{key:0,name:T.icon,size:"sm","data-icon":T.icon},null,8,["name","data-icon"])):ne("",!0),C("span",_Re,B(T.label),1),T.value===e.modelValue?(b(),fe(h(Ce),{key:1,class:"fc-check",name:"check",size:"sm"})):ne("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):ne("",!0)]))],64)):(b(),fe(h(wo),{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":D[0]||(D[0]=T=>i("update:modelValue",T))},null,8,["model-value","options"]))],512))}}),AM=vt(SRe,[["__scopeId","data-v-153e0d9c"]]),MRe={class:"dock-work-head"},IRe={key:0,class:"dock-workbar"},ERe={key:0,class:"dw-running"},TRe={key:0,class:"dw-running"},LRe={class:"dw-count"},NRe=tt({__name:"ChatDock",props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},swarmMode:{type:Boolean},goalMode:{type:Boolean},activationBadges:{},models:{},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{},skills:{},goal:{},dockPanel:{},overlayOpen:{type:Boolean},sessionPlans:{},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},openFile:{type:Function},mobile:{type:Boolean}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleSwarm","toggleGoal","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","login","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const i=e,s=n,{t:o}=Bt(),{confirm:r,isConfirmOpen:l}=Hu(),a=F(()=>{switch(i.goal?.status){case"active":return o("status.goalStatusActive");case"paused":return o("status.goalStatusPaused");case"blocked":return o("status.goalStatusBlocked");case"complete":return o("status.goalStatusComplete");default:return""}}),u=F(()=>i.goal?Ma(i.goal.wallClockMs,{h:o("status.timeUnitHour"),m:o("status.timeUnitMinute"),s:o("status.timeUnitSecond")}):"");async function c(){await r({title:o("status.goalCancel"),message:o("status.goalCancelConfirm"),confirmLabel:o("status.goalCancelConfirmYes"),cancelLabel:o("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const d=[{id:"active",labelKey:"tasks.filterRecent",icon:"clock"},{id:"running",labelKey:"tasks.filterRunning",icon:"play"},{id:"done",labelKey:"tasks.filterDone",icon:"circle-check"},{id:"all",labelKey:"tasks.filterAll",icon:"list"}];function f(re,se){return(se.completedAt??se.createdAt??"").localeCompare(re.completedAt??re.createdAt??"")||(se.createdAt??"").localeCompare(re.createdAt??"")}function p(re,se){if(se==="all")return re;if(se==="running")return re.filter(J=>J.state==="run");if(se==="done")return re.filter(J=>J.state!=="run");const U=[];for(const J of re){if(J.state==="run")continue;let de=U.length;for(;de>0&&f(U[de-1],J)>0;)de--;U.splice(de,0,J),U.length>5&&(U.length=5)}return[...re.filter(J=>J.state==="run"),...U]}const g=Z("active"),m=Z("active"),y=F(()=>p(i.bashTasks,g.value)),w=F(()=>p(i.subagentTasks,m.value)),k=F(()=>d.map(re=>({value:re.id,label:o(re.labelKey),icon:re.icon}))),A=F({get:()=>g.value,set:re=>{g.value=re}}),v=F({get:()=>m.value,set:re=>{m.value=re}}),x=F(()=>(i.todos?.length??0)>0&&i.todoDoneCount===(i.todos?.length??0)),E=F(()=>i.bashTasks.some(re=>re.kind==="tool")),S=F(()=>E.value?"tasks.dockTasks":"tasks.dockBash"),M=F(()=>`${o("status.goalLabel")} ${a.value}`.trim()),_=F(()=>i.bashRunning>0?`${o(S.value)} ${i.bashRunning} ${o("tasks.running")}`:o(S.value)),N=F(()=>i.subagentRunning>0?`${o("tasks.dockSubagent")} ${i.subagentRunning} ${o("tasks.running")}`:o("tasks.dockSubagent")),D=F(()=>`${o("tasks.todoProgressTitle")} ${i.todoDoneCount}/${i.todos?.length??0}`),T=F(()=>Object.values(i.sessionPlans??{}).at(-1)),$=F(()=>{const re=T.value?.review?.state;return re?o(`tools.plan.review.${re}`):""});function P(){const re=T.value;re?.path&&i.openFile?.(re.plan?{path:re.path,content:re.plan}:{path:re.path})}const O=Z(null),R=F(()=>O.value?.anyPopupOpen===!0),W=F(()=>R.value||i.dockPanel!=null),z=Z(null),G=Z(null),K=Z(!1),H=Z("50%");function q(re,se){const U=se.currentTarget;if(U&&G.value){const J=U.getBoundingClientRect(),de=G.value.getBoundingClientRect();H.value=`${J.left+J.width/2-de.left}px`}s("toggle-dock-panel",re)}function X(re){return O.value?(O.value.loadForEdit(re),!0):!1}function ee(re){O.value?.loadAttachmentsForEdit(re)}function ue(){O.value?.focus()}const ie=()=>O.value?.isEmpty?.()??!1;function xe(re){if(!i.dockPanel)return;const se=re.target;se&&(z.value?.contains(se)||se instanceof Element&&se.closest(".ui-pill")||s("close-dock-panel"))}function ce(re){re.key!=="Escape"||re.repeat||QIe(re)||re.defaultPrevented||R.value||l.value||i.overlayOpen||(re.preventDefault(),re.stopImmediatePropagation(),s("close-dock-panel"))}const pe=Z(null),Ne=Z(!1);function te(){const re=pe.value;Ne.value=re?re.scrollTop>0:!1}function ye(re){Ne.value=re.target.scrollTop>0}let j=null;Qe(()=>i.dockPanel,async re=>{typeof document<"u"&&(document.removeEventListener("mousedown",xe,!0),document.removeEventListener("keydown",ce,!0),re&&(document.addEventListener("mousedown",xe,!0),document.addEventListener("keydown",ce,!0))),j?.disconnect(),j=null,re?(await kt(),te(),typeof ResizeObserver=="function"&&pe.value&&(j=new ResizeObserver(te),j.observe(pe.value))):Ne.value=!1},{immediate:!0});let Y=null;function ve(){const re=G.value?.offsetHeight??0;document.documentElement.style.setProperty("--dock-h",`${re}px`);const se=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--p-bp-sm"));K.value=(G.value?.offsetWidth??0)<(Number.isFinite(se)?se:640)}return pn(()=>{GIe(),!(typeof ResizeObserver!="function"||!G.value)&&(Y=new ResizeObserver(ve),Y.observe(G.value),ve())}),An(()=>{typeof document<"u"&&(document.removeEventListener("mousedown",xe,!0),document.removeEventListener("keydown",ce,!0)),Y?.disconnect(),Y=null,j?.disconnect(),j=null}),t({loadForEdit:X,loadAttachmentsForEdit:ee,focus:ue,anyPopupOpen:R,isEmpty:ie}),(re,se)=>(b(),I("div",{ref_key:"dockRef",ref:G,class:De(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":W.value,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":K.value}]]),onClick:se[36]||(se[36]=It(()=>{},["stop"]))},[V(ys,{name:"dock-panel"},{default:he(()=>[e.dockPanel?(b(),I("div",{ref_key:"workPanelRef",ref:z,key:e.dockPanel,class:De(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":Ne.value}]]),style:Vt({transformOrigin:`${H.value} 100%`}),onClick:se[11]||(se[11]=It(()=>{},["stop"]))},[C("div",MRe,[e.dockPanel==="bash"?(b(),fe(Dh,{key:0,icon:"terminal",title:h(o)(S.value),meta:`${e.bashRunning} ${h(o)("tasks.running")}`},{actions:he(()=>[V(AM,{modelValue:A.value,"onUpdate:modelValue":se[0]||(se[0]=U=>A.value=U),options:k.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(b(),fe(Dh,{key:1,icon:"sparkles",title:h(o)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${h(o)("tasks.running")}`},{actions:he(()=>[V(AM,{modelValue:v.value,"onUpdate:modelValue":se[1]||(se[1]=U=>v.value=U),options:k.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(b(),fe(Dh,{key:2,icon:x.value?"check-list":"list",title:h(o)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(b(),fe(Dh,{key:3,icon:"target",title:h(o)("status.goalLabel"),meta:u.value},{actions:he(()=>[e.goal?(b(),I(Be,{key:0},[e.goal.status==="active"?(b(),fe(h(rn),{key:0,size:"sm",label:h(o)("status.goalPause"),tooltip:h(o)("status.goalPause"),onClick:se[2]||(se[2]=It(U=>s("controlGoal","pause"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"pause",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),e.goal.status==="paused"||e.goal.status==="blocked"?(b(),fe(h(rn),{key:1,size:"sm",label:h(o)("status.goalResume"),tooltip:h(o)("status.goalResume"),onClick:se[3]||(se[3]=It(U=>s("controlGoal","resume"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"play",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),V(h(rn),{size:"sm",label:h(o)("status.goalCancel"),tooltip:h(o)("status.goalCancel"),onClick:It(c,["stop"])},{default:he(()=>[V(h(Ce),{name:"power",size:"md"})]),_:1},8,["label","tooltip"]),V(h(rn),{size:"sm",label:h(o)("tasks.closePanel"),tooltip:h(o)("tasks.closePanel"),onClick:se[4]||(se[4]=It(U=>s("close-dock-panel"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])],64)):ne("",!0)]),_:1},8,["title","meta"])):e.dockPanel==="plan"?(b(),fe(Dh,{key:4,icon:"file-edit",title:h(o)("status.planLabel"),meta:$.value},{actions:he(()=>[T.value?.path?(b(),fe(h(rn),{key:0,size:"sm",label:h(o)("tasks.openPanel"),tooltip:h(o)("tasks.openPanel"),onClick:It(P,["stop"])},{default:he(()=>[V(h(Ce),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),e.planArmed||e.planMode?(b(),fe(h(rn),{key:1,size:"sm",label:h(o)("status.workModeDismiss"),tooltip:h(o)("status.workModeDismiss"),onClick:se[5]||(se[5]=It(U=>s("togglePlan"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"power",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),V(h(rn),{size:"sm",label:h(o)("tasks.closePanel"),tooltip:h(o)("tasks.closePanel"),onClick:se[6]||(se[6]=It(U=>s("close-dock-panel"),["stop"]))},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])]),_:1},8,["title","meta"])):ne("",!0)]),C("div",{ref_key:"workBodyRef",ref:pe,class:"dock-work-body",onScroll:ye},[e.dockPanel==="bash"?(b(),fe(tRe,{key:0,tasks:y.value,filter:g.value,onCancel:se[7]||(se[7]=U=>s("cancelTask",U)),onOpen:se[8]||(se[8]=U=>s("openAgent",U))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(b(),fe(gRe,{key:1,tasks:w.value,filter:m.value,onCancel:se[9]||(se[9]=U=>s("cancelTask",U)),onOpen:se[10]||(se[10]=U=>s("openAgent",U))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(b(),fe(kRe,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(b(),fe(_$e,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):e.dockPanel==="plan"?(b(),fe(D$e,{key:4,plan:T.value,"plan-mode-on":e.planMode,"open-file":e.openFile},null,8,["plan","plan-mode-on","open-file"])):ne("",!0)],544)],6)):ne("",!0)]),_:1}),e.hasDockWork||e.planMode||T.value?(b(),I("div",IRe,[e.goal?(b(),fe($h,{key:0,icon:"target",label:M.value,active:e.dockPanel==="goal",onClick:se[12]||(se[12]=U=>q("goal",U))},{meta:he(()=>[C("span",{class:De(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},B(a.value),3)]),default:he(()=>[Ue(B(h(o)("status.goalLabel"))+" ",1)]),_:1},8,["label","active"])):ne("",!0),e.planMode||T.value?(b(),fe($h,{key:1,icon:"file-edit",label:h(o)("status.planLabel"),active:e.dockPanel==="plan",onClick:se[13]||(se[13]=U=>q("plan",U))},{default:he(()=>[Ue(B(h(o)("status.planLabel")),1)]),_:1},8,["label","active"])):ne("",!0),e.bashTasks.length>0?(b(),fe($h,{key:2,icon:"terminal",label:_.value,active:e.dockPanel==="bash",onClick:se[14]||(se[14]=U=>q("bash",U))},{meta:he(()=>[e.bashRunning>0?(b(),I("span",ERe,[V(h(hl),{status:"running"}),Ue(B(e.bashRunning),1)])):ne("",!0)]),default:he(()=>[Ue(B(h(o)(S.value))+" ",1)]),_:1},8,["label","active"])):ne("",!0),e.subagentTasks.length>0?(b(),fe($h,{key:3,icon:"sparkles",label:N.value,active:e.dockPanel==="subagent",onClick:se[15]||(se[15]=U=>q("subagent",U))},{meta:he(()=>[e.subagentRunning>0?(b(),I("span",TRe,[V(h(hl),{status:"running"}),Ue(B(e.subagentRunning),1)])):ne("",!0)]),default:he(()=>[Ue(B(h(o)("tasks.dockSubagent"))+" ",1)]),_:1},8,["label","active"])):ne("",!0),(e.todos?.length??0)>0?(b(),fe($h,{key:4,icon:x.value?"check-list":"list",label:D.value,active:e.dockPanel==="todos",onClick:se[16]||(se[16]=U=>q("todos",U))},{meta:he(()=>[C("span",LRe,B(e.todoDoneCount)+"/"+B(e.todos?.length??0),1)]),default:he(()=>[Ue(B(h(o)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","label","active"])):ne("",!0)])):ne("",!0),e.pendingQuestion?(b(),fe(J$e,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:se[17]||(se[17]=(U,J)=>s("answer",U,J)),onDismiss:se[18]||(se[18]=U=>s("dismiss",U))},null,8,["question","busy-kind"])):e.pendingApproval?(b(),fe(HDe,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,"open-file":e.openFile,onDecide:se[19]||(se[19]=U=>s("approval",e.pendingApproval.approvalId,U))},null,8,["block","agent-name","busy","open-file"])):(b(),fe(UD,{key:3,ref_key:"composerRef",ref:O,"session-id":e.sessionId,running:e.running,working:e.working,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"swarm-mode":e.swarmMode,"goal-mode":e.goalMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"auth-ready":e.authReady,"managed-signed-in":e.managedSignedIn,"managed-membership":e.managedMembership,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,onSubmit:se[20]||(se[20]=U=>s("submit",U)),onSteer:se[21]||(se[21]=U=>s("steer",U)),onCommand:se[22]||(se[22]=U=>s("command",U)),onInterrupt:se[23]||(se[23]=U=>s("interrupt")),onSetPermission:se[24]||(se[24]=U=>s("setPermission",U)),onSetThinking:se[25]||(se[25]=U=>s("setThinking",U)),onTogglePlan:se[26]||(se[26]=U=>s("togglePlan")),onToggleSwarm:se[27]||(se[27]=U=>s("toggleSwarm")),onToggleGoal:se[28]||(se[28]=U=>s("toggleGoal")),onCreateGoal:se[29]||(se[29]=U=>s("createGoal",U)),onControlGoal:se[30]||(se[30]=U=>s("controlGoal",U)),onFocusGoal:se[31]||(se[31]=U=>s("focusGoal")),onCompact:se[32]||(se[32]=U=>s("compact")),onPickModel:se[33]||(se[33]=U=>s("pickModel")),onSelectModel:se[34]||(se[34]=U=>s("selectModel",U)),onLogin:se[35]||(se[35]=U=>s("login"))},null,8,["session-id","running","working","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","goal","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","starting"]))],2))}}),FRe=vt(NRe,[["__scopeId","data-v-e91fb967"]]),BRe=["aria-label","aria-hidden"],$Re={class:"toc-scroll"},DRe=["onClick"],RRe={class:"toc-label"},zRe=240,ORe=tt({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(null),r=Z(!0);let l=null;function a(){const c=o.value,d=c?.offsetParent;if(!c||!d)return;const f=c.getBoundingClientRect().left,p=d.getBoundingClientRect().right;r.value=p-f>=zRe}const u=F(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1);return Qe(u,c=>{l?.disconnect(),l=null,c&&kt(()=>{const d=o.value,f=d?.offsetParent;!d||!f||(typeof ResizeObserver<"u"&&(l=new ResizeObserver(a),l.observe(f)),a())})},{immediate:!0}),Gn(()=>{l?.disconnect(),l=null}),(c,d)=>u.value?(b(),I("nav",{key:0,ref_key:"navRef",ref:o,class:De(["conversation-toc",{"toc-clipped":!r.value||e.occluded}]),"aria-label":h(s)("conversation.toc"),"aria-hidden":r.value&&!e.occluded?void 0:!0},[C("div",$Re,[(b(!0),I(Be,null,yt(e.items,f=>(b(),I("button",{key:f.id,type:"button",class:De(["toc-row",{active:e.activeTurnId===f.id}]),onClick:p=>i("select",f.id)},[d[0]||(d[0]=C("span",{class:"toc-bar"},null,-1)),C("span",RRe,B(f.title),1)],10,DRe))),128))])],10,BRe)):ne("",!0)}}),PRe=vt(ORe,[["__scopeId","data-v-b8ba267a"]]),jRe={class:"tsearch-main"},HRe=["placeholder"],WRe={key:0,class:"tsearch-spin"},qRe=["inert"],URe={class:"tsearch-foot"},KRe={class:"tsearch-count",role:"status"},VRe={class:"tsearch-rings","aria-hidden":"true"},ZRe=800,GRe=400,QRe=1500,YRe=tt({__name:"TranscriptSearch",props:{pane:{},reveal:{},mobile:{type:Boolean,default:!1}},emits:["close"],setup(e,{expose:t,emit:n}){const i=e,s=n,{t:o}=Bt(),{handleCompositionStart:r,handleCompositionEnd:l,isComposingKeyEvent:a}=Kr(),u=Z(""),c=Z(!1),d=Z([]),f=Z(0),p=Z(null),g=F(()=>d.value.length),m=F(()=>u.value.trim()!==""&&!c.value),y=Z(!1),w=F(()=>{if(g.value===0)return o("conversation.search.noResults");const q={current:f.value+1,total:g.value};return y.value?o("conversation.search.resultsCapped",q):o("conversation.search.results",q)});let k=null,A=null,v=null,x=null,E=null,S=0;const M=Z([]);function _(){const q=i.pane,X=d.value[f.value];if(!q||X===void 0){M.value=[];return}const ee=q.getBoundingClientRect(),ue=[];for(const ie of X.getClientRects())ue.push({top:`${ie.top-ee.top+q.scrollTop}px`,left:`${ie.left-ee.left}px`,width:`${ie.width}px`,height:`${ie.height}px`});M.value=ue}function N(q,X){return q.type==="attributes"&&q.target===X?!0:D(q)}function D(q){const X=ee=>ee instanceof Element&&(ee.classList.contains("tsearch-rings")||ee.closest(".tsearch-rings")!==null);if(X(q.target))return!0;if(q.type==="childList"){const ee=[...q.addedNodes,...q.removedNodes];if(ee.length>0&&ee.every(X))return!0}return!1}function T(){M.value.length!==0&&(E!==null&&clearTimeout(E),E=setTimeout(()=>{E=null,_()},120))}function $(){return i.pane?.querySelector(".chat")??null}function P(){if(k!==null&&(clearTimeout(k),k=null),u.value.trim()===""){c.value=!1,O();return}c.value=!0,k=setTimeout(O,ZRe)}function O(q="first"){k!==null&&(clearTimeout(k),k=null),c.value=!1;const X=$();if(u.value.trim()===""||X===null){d.value=[],y.value=!1,f.value=0,z3(),_();return}const ee=d.value[f.value],ue=ee?.startContainer??null,ie=ee?.startOffset??0,xe=ose(X,u.value.trim()),ce=xe.ranges;if(y.value=xe.truncated,d.value=ce,ce.length===0){f.value=0,cy([],0),_();return}if(q!==!1){const Ne=R(ce);f.value=q==="backward"?(Ne-1+ce.length)%ce.length:Ne,W();return}const pe=ue!==null?ce.findIndex(Ne=>Ne.startContainer===ue&&Ne.startOffset===ie):-1;f.value=pe>=0?pe:R(ce),cy(ce,f.value),_()}function R(q){const X=i.pane?.getBoundingClientRect().top??0,ee=q.findIndex(ue=>{const ie=ue.getClientRects(),xe=ie[ie.length-1];return xe!==void 0&&xe.bottom>=X});return ee===-1?0:ee}function W(){const q=d.value[f.value];cy(d.value,f.value),q!==void 0&&i.reveal(q),_()}function z(q){g.value!==0&&(f.value=(f.value+q+g.value)%g.value,W())}function G(q){if(q.key==="Enter"&&!a(q)){if(q.preventDefault(),k!==null){O(q.shiftKey?"backward":"first");return}z(q.shiftKey?-1:1)}}function K(q){q.key==="Escape"&&(a(q)||(q.preventDefault(),q.stopPropagation(),s("close")))}function H(){const q=p.value;q&&(q.focus(),q.select())}return t({focusInput:H}),pn(()=>{kt(()=>p.value?.focus()),i.pane&&typeof MutationObserver=="function"&&(v=new MutationObserver(X=>{if(u.value.trim()!==""&&!X.every(ee=>N(ee,i.pane))&&k===null){if(Date.now()-S>=QRe){S=Date.now(),A!==null&&(clearTimeout(A),A=null),O(!1);return}A!==null&&clearTimeout(A),A=setTimeout(()=>{A=null,k===null&&(S=Date.now(),O(!1))},GRe)}}),v.observe(i.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),i.pane?.addEventListener("scroll",T,{passive:!0});const q=[i.pane,i.pane?.querySelector(".content-wrap")??null];if(typeof ResizeObserver=="function"){x=new ResizeObserver(()=>_());for(const X of q)X&&x.observe(X)}}),An(()=>{k!==null&&clearTimeout(k),A!==null&&clearTimeout(A),E!==null&&clearTimeout(E),v?.disconnect(),v=null,x?.disconnect(),x=null,i.pane?.removeEventListener("scroll",T),z3()}),(q,X)=>(b(),I("div",{class:De(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:K},[C("div",jRe,[V(h(Ce),{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),Bn(C("input",{ref_key:"inputRef",ref:p,"onUpdate:modelValue":X[0]||(X[0]=ee=>u.value=ee),type:"text",class:"tsearch-input",placeholder:h(o)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:P,onKeydown:G,onCompositionstart:X[1]||(X[1]=(...ee)=>h(r)&&h(r)(...ee)),onCompositionend:X[2]||(X[2]=(...ee)=>h(l)&&h(l)(...ee))},null,40,HRe),[[_o,u.value]]),c.value?(b(),I("span",WRe,[V(h(Bi),{size:"sm",label:h(o)("conversation.search.searching")},null,8,["label"])])):ne("",!0),X[6]||(X[6]=C("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),V(h(rn),{class:"tsearch-close",size:"sm",label:h(o)("conversation.search.close"),tooltip:h(o)("conversation.search.close"),onClick:X[3]||(X[3]=ee=>s("close"))},{default:he(()=>[V(h(Ce),{name:"close"})]),_:1},8,["label","tooltip"])]),C("div",{class:De(["tsearch-foot-wrap",{open:m.value}]),inert:!m.value},[C("div",URe,[V(h(rn),{size:"sm",label:h(o)("conversation.search.previous"),tooltip:h(o)("conversation.search.previous"),disabled:g.value===0,onClick:X[4]||(X[4]=ee=>z(-1))},{default:he(()=>[V(h(Ce),{name:"arrow-up"})]),_:1},8,["label","tooltip","disabled"]),V(h(rn),{size:"sm",label:h(o)("conversation.search.next"),tooltip:h(o)("conversation.search.next"),disabled:g.value===0,onClick:X[5]||(X[5]=ee=>z(1))},{default:he(()=>[V(h(Ce),{name:"arrow-down"})]),_:1},8,["label","tooltip","disabled"]),C("span",KRe,B(w.value),1)])],10,qRe),e.pane?(b(),fe(Wr,{key:0,to:e.pane},[C("div",VRe,[(b(!0),I(Be,null,yt(M.value,(ee,ue)=>(b(),I("div",{key:ue,class:"tsearch-ring",style:Vt(ee)},null,4))),128))])],8,["to"])):ne("",!0)],34))}}),JRe=vt(YRe,[["__scopeId","data-v-26f3fed5"]]),XRe="/assets/k3_doodle1-27EZ2HSw.riv",eze={class:"doodle-host"},tze={key:0,class:"doodle-fallback"},nze=tt({__name:"KimiDoodle",setup(e){const t=Z(!1),n=Z(null),i=rv();let s=null,o=null;return pn(async()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)try{let r=function(){const m=f.stateMachineNames[0];if(!m)return;const y=(f.stateMachineInputs(m)??[]).find(w=>w.name==="light/dark");y&&(y.value=i.value?1:0)};const[{Rive:l,RuntimeLoader:a},u,c]=await Promise.all([ns(()=>import("./rive-CeXCFBdn.js").then(m=>m.r),__vite__mapDeps([10,3])),ns(()=>import("./rive-BxcgqsjB.js"),[]).then(m=>m.default),ns(()=>import("./rive_fallback-ByshBW-N.js"),[]).then(m=>m.default)]),d=n.value;if(!d)return;a.setWasmUrl(u),a.setWasmFallbackUrl(c);const f=new l({canvas:d,src:XRe,autoplay:!0,onLoad(){const m=f.stateMachineNames[0];m&&f.play(m),requestAnimationFrame(()=>{n.value&&(r(),f.resizeDrawingSurfaceToCanvas(),o=vL(f,d),t.value=!0)})}}),p=Qe(i,r),g=()=>f.resizeDrawingSurfaceToCanvas();window.addEventListener("resize",g),s=()=>{o?.(),o=null,p(),window.removeEventListener("resize",g),f.cleanup()}}catch{}}),Gn(()=>{s?.(),s=null}),(r,l)=>(b(),I("div",eze,[t.value?ne("",!0):(b(),I("div",tze,[En(r.$slots,"fallback",{},void 0,!0)])),C("canvas",{ref_key:"canvasRef",ref:n,class:De(["doodle-canvas",{ready:t.value}]),role:"img","aria-label":"Kimi"},null,2)]))}}),ize=vt(nze,[["__scopeId","data-v-694a2ad0"]]),sze={class:"empty-hint"},oze={class:"empty-hint-title"},rze={key:1,class:"empty-hint-title is-starting"},lze={key:2,class:"empty-hint-text"},aze={key:0,class:"upgrade-banner"},uze={class:"upgrade-banner-text"},cze={class:"ws-bar"},dze={key:0,class:"ws-anchor"},fze=["aria-expanded"],hze={class:"ws-chip-name"},pze={class:"ws-caption"},gze=["onClick"],mze={class:"ws-info"},vze={class:"ws-name"},yze={class:"ws-path"},bze=["aria-label"],kze={key:0,class:"undo-toast",role:"status","aria-live":"polite"},Aze={class:"undo-toast-text"},Cze=48,Rh=80,CM=1e3,wze=420,xze=3e3,_ze=5e3,Sze=1e4,Mze=2500,Ize=tt({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},swarmMode:{type:Boolean},goalMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},lastTurnReason:{},turnError:{},turnRetry:{},overlayOpen:{type:Boolean},starting:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},sessionTitle:{},pr:{}},emits:["submit","steer","approval","cancelTask","answer","dismiss","command","interrupt","unqueue","editQueued","reorderQueue","setPermission","setThinking","togglePlan","toggleSwarm","toggleGoal","createGoal","controlGoal","compact","pickModel","selectModel","login","openFile","openMedia","openTurnDiff","openCompaction","openAgent","openChanges","refreshGitStatus","editMessage","selectWorkspace","addWorkspace","openPr","renameSession","forkSession","archiveSession","exportSession"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=e,o=n,r=Z(!1),l=Z(!1),a=Z(null),u=F(()=>s.workspaces?.find(we=>we.id===s.activeWorkspaceId)?.name??s.workspaceName??""),c=F(()=>(s.workspaces?.length??0)>0),d=F(()=>s.authReady===!1&&(s.models?.length??0)===0&&s.managedSignedIn===!0&&s.managedMembership==="free"),f=F(()=>kse(s.workspaces??[],s.activeWorkspaceId));function p(ge){if(r.value){r.value=!1;return}const we=ge.currentTarget?.closest(".ws-anchor"),Ge=we?.closest(".panes");if(we instanceof HTMLElement&&Ge instanceof HTMLElement){const Ft=we.getBoundingClientRect(),sn=Ge.getBoundingClientRect(),fn=sn.bottom-Ft.bottom-4,qn=Ft.top-sn.top-4;l.value=qn>fn;const Ai=Math.max(0,Math.floor(l.value?qn:fn));a.value=`min(calc(var(--space-8) * 10), ${Ai}px)`}else l.value=!1,a.value=null;r.value=!0}function g(ge){r.value=!1,ge!==s.activeWorkspaceId&&o("selectWorkspace",ge)}lr(un.contentAlign);const m=Z(null),y=Z(null),w=Z(null),k=Z(!1);let A=null;function v(ge,we){const Ge=w.value??y.value;return!Ge||Ge.loadForEdit(ge)===!1?!1:(Ge.loadAttachmentsForEdit(we??[]),!0)}function x(){k.value=!0,A!==null&&clearTimeout(A),A=setTimeout(()=>{A=null,k.value=!1},2e3)}const E=F(()=>s.tasks.filter(ge=>ge.kind==="bash"||ge.kind==="tool"&&!ge.id.startsWith("question-"))),S=F(()=>s.tasks.filter(ge=>ge.kind==="subagent"&&ge.runInBackground)),M=F(()=>E.value.filter(ge=>ge.state==="run").length),_=F(()=>S.value.filter(ge=>ge.state==="run").length);function N(ge){const we=s.tasks,Ge=we.find(sn=>sn.id===ge)??we.find(sn=>sn.parentToolCallId===ge);if(Ge?.agentId)return Ge.agentId;const Ft=we.filter(sn=>sn.kind==="subagent"&&!sn.parentToolCallId&&sn.agentId);if(Ft.length===1)return Ft[0].agentId}Pn("resolveAgentTaskId",N);const D=an("modelDisplay"),T=an("subagentEffort");function $(ge,we){const Ge=we??N(ge);if(Ge===void 0)return;const Ft=s.tasks.find(qn=>qn.agentId===Ge||qn.id===Ge),sn=D?.(Ft?.model),fn=T?.(Ft?.thinkingEffort);if(!(sn===void 0&&fn===void 0))return{display:sn,effort:fn}}Pn("resolveAgentModel",$),Pn("pinScroll",ur);const P=F(()=>(s.todos??[]).filter(ge=>ge.status==="done").length),O=F(()=>s.goal!=null||E.value.length>0||S.value.length>0||(s.todos?.length??0)>0),R=Z(null),W=F(()=>s.gitInfo?s.changes?.length??0:0);function z(ge){R.value=R.value===ge?null:ge}function G(){R.value=null}function K(){s.goal&&(R.value="goal")}Qe(()=>[s.goal,E.value.length,S.value.length,s.todos?.length,s.planMode,s.sessionPlans],()=>{const ge=R.value;if(ge===null)return;ge==="goal"&&s.goal!=null||ge==="bash"&&E.value.length>0||ge==="subagent"&&S.value.length>0||ge==="todos"&&(s.todos?.length??0)>0||ge==="plan"&&(s.planMode===!0||Object.keys(s.sessionPlans??{}).length>0)||G()});function H(ge){if(ge.role==="compaction")return i("conversation.compactedPlain");if(ge.role==="user"){if(ge.skillActivation)return`/${ge.skillActivation.name}`;if(ge.pluginCommand)return`/${ge.pluginCommand.pluginId}:${ge.pluginCommand.commandName}`;const Ge=ge.text.trim().replaceAll(/\s+/g," ");return Ge.length>0?Ge:"user"}const we=(ge.text||ge.thinking||"").trim().replaceAll(/\s+/g," ");return we.length>0?we:(ge.tools?.length??0)>0?`${ge.tools.length} tools`:"kimi"}const q=F(()=>s.turns.filter(ge=>ge.role==="user").map((ge,we)=>({id:ge.id,role:ge.role,no:we+1,title:H(ge)}))),X=Z(null);function ee(){const ge=J.value;if(!ge)return;const we=q.value;if(we.length===0)return;if(He()<=Rh){X.value=we[we.length-1].id;return}if(ie||ue===null){const fn=ge.scrollTop,qn=ge.getBoundingClientRect().top,Ai=[];for(const Qs of ge.querySelectorAll(".turn-anchor[data-turn-id]")){const Vu=Qs.dataset.turnId;Vu&&Ai.push({id:Vu,top:Qs.getBoundingClientRect().top-qn+fn})}ue=Ai,ie=!1}const Ge=new Set(we.map(fn=>fn.id)),Ft=ge.scrollTop+ge.clientHeight/2;let sn=null;for(const fn of ue)Ge.has(fn.id)&&fn.top<=Ft&&(sn=fn.id);X.value=sn??we[0].id}let ue=null,ie=!0;function xe(){ie=!0}let ce=0;function pe(){ce||(ce=vi(()=>{ce=0,ee()}))}const Ne=Z(!1);let te=0;function ye(){te||(te=vi(()=>{te=0,Y()}))}function j(){ye(),xe()}function Y(){const ge=J.value,we=!s.mobile&&ge?ge.closest(".con")?.querySelector(".conversation-toc"):null,Ge=we?.querySelector(".toc-bar");let Ft=!1;if(ge&&we&&Ge){const sn=Ge.getBoundingClientRect(),fn=we.getBoundingClientRect(),qn=sn.left+sn.width/2;Ft=Array.from(ge.querySelectorAll(".table-node-wrapper")).some(Ai=>{const Qs=Ai.getBoundingClientRect();return Qs.left<=qn&&qn<=Qs.right&&Qs.top<fn.bottom&&Qs.bottom>fn.top})}Ne.value!==Ft&&(Ne.value=Ft)}const ve=F(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),re=F(()=>{const ge=ve.value;if(ge)return s.pendingQuestionActions?.[ge.questionId]}),se=F(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),U=F(()=>{const ge=se.value;return ge?!!s.pendingApprovalActions?.[ge.approvalId]:!1}),J=Z(null),de=Z(null),me=Z(0),Ie=Z(0),je=Z(!1),ke=Z(null);let Le=null;function it(){if(s.turns.length!==0){if(je.value){ke.value?.focusInput();return}Le=document.activeElement,je.value=!0}}function Fe(){je.value=!1,kt(()=>{Le instanceof HTMLElement&&Le.isConnected&&Le.focus(),Le=null})}Qe(()=>s.turns.length===0&&!s.sessionLoading,ge=>{ge&&je.value&&Fe()});const Re=F(()=>({"--panes-scrollbar-width":`${me.value}px`})),Ke=F(()=>({"--chat-dock-height":`${Ie.value+Cze}px`}));function ht(ge){return ge instanceof HTMLElement?ge:ge&&"$el"in ge&&ge.$el instanceof HTMLElement?ge.$el:null}let ot=0;function gt(){ot||(ot=vi(()=>{ot=0;const ge=J.value,we=ge?Math.max(0,ge.offsetWidth-ge.clientWidth):0;we!==me.value&&(me.value=we);const Ge=de.value?.offsetHeight??0;Ge!==Ie.value&&(Ie.value=Ge)}))}function Tt(ge){const we=ht(ge);we!==J.value&&(J.value=we,we&&fr())}function yn(ge){const we=ht(ge);we!==de.value&&(de.value=we??null,ge&&"loadForEdit"in ge&&typeof ge.loadForEdit=="function"&&"focus"in ge&&typeof ge.focus=="function"?w.value={loadForEdit:ge.loadForEdit.bind(ge),loadAttachmentsForEdit:"loadAttachmentsForEdit"in ge&&typeof ge.loadAttachmentsForEdit=="function"?ge.loadAttachmentsForEdit.bind(ge):()=>{},focus:ge.focus.bind(ge),get anyPopupOpen(){return"anyPopupOpen"in ge&&ge.anyPopupOpen===!0},isEmpty:"isEmpty"in ge&&typeof ge.isEmpty=="function"?ge.isEmpty.bind(ge):void 0}:w.value=null,dr())}const Gt=Z(!0),Kt=Z(!1),mn=Z(!1);let _n=null;function He(){const ge=J.value;return ge?yi-ge.scrollTop-Mo:0}let st=0,Ve=0,Rt=0,Ct=0,Fn=0,Tn=0,as=0;function Qt(){return Date.now()<Ve}function ni(){ye(),mn.value=!0,_n&&clearTimeout(_n),_n=setTimeout(()=>{mn.value=!1,_n=null},900);const ge=J.value;if(!ge)return;const we=ge.scrollTop;if(ri()){st=we;return}if(performance.now()-Rt<100){st=we;return}const Ge=He();if(Qt()){Gt.value=!0,Kt.value=!1,st=we;return}we<st-1&&Ge>1?ge.scrollHeight-we-ge.clientHeight>1&&(Gt.value=!1,Kt.value=!0):Ge<=Rh&&we>st+1&&Date.now()>=Ct&&(Gt.value=!0,Kt.value=!1),st=we,pe()}function zn(ge=!1){const we=J.value;Gt.value=!0,Kt.value=!1,$i(),we&&(!ge&&performance.now()<Fn||(ge?mi():we.scrollTop=Math.max(we.scrollTop,yi),st=we.scrollTop))}let Sn=0;function mi(ge=320){const we=J.value;if(!we)return;if(Sn&&(Mn(Sn),Sn=0),typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){we.scrollTop=we.scrollHeight,st=we.scrollTop;return}const Ge=we.scrollTop,Ft=performance.now();Rt=Ft,Fn=Ft+ge+wze;const sn=()=>{Sn=0;const fn=Math.min(1,(performance.now()-Ft)/ge),qn=1-Math.pow(1-fn,3);we.scrollTop=Ge+(we.scrollHeight-Ge)*qn,st=we.scrollTop,fn<1?Sn=vi(sn):Fn=0};Sn=vi(sn)}function Ws(ge,we){return(we.closest("[inert]")?.closest(".tool-group, .activity-run, .turn-fold")??we).getBoundingClientRect().top-ge.getBoundingClientRect().top+ge.scrollTop}function Li(ge,we){const Ge=Array.from(ge.querySelectorAll(".turn-anchor[data-turn-id], [data-scroll-anchor-id]")).map(fn=>({node:fn,top:Ws(ge,fn)})),Ft=Ge.findIndex(fn=>fn.top>=we),sn=Ft<0?Math.max(0,Ge.length-1):Ft;return Ge.slice(sn,sn+2).flatMap(fn=>{const qn=fn.node.dataset.scrollAnchorId,Ai=qn??fn.node.dataset.turnId;return Ai?[{kind:qn?"tool":"turn",id:Ai,top:fn.top}]:[]})}const Lt=new Map;function xi(ge,we){for(const Ge of we.anchors){const Ft=Ge.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",sn=ge.querySelector(`[${Ft}="${Fs(Ge.id)}"]`);if(sn)return Ws(ge,sn)-Ge.top}return ge.scrollHeight-we.oldHeight}function Qi(ge,we,Ge=ge.scrollTop){return ge.scrollTop=Ge+xi(ge,we),st=ge.scrollTop,ge.scrollTop}async function ci(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||ds.value||!s.hasMoreMessages)return;const ge=s.sessionId,we=J.value,Ge=we?.scrollTop??0,Ft={anchors:we?Li(we,Ge):[],oldHeight:we?.scrollHeight??0};Ho(ge,!0),ft();try{if(await kt(),await s.loadOlderMessages(ge),await kt(),s.sessionId!==ge){Lt.set(ge,Ft);return}const sn=J.value;if(!sn)return;Qi(sn,Ft),Lt.delete(ge)}finally{Ho(ge,!1)}}function Fs(ge){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(ge):ge.replaceAll(/["\\]/g,"\\$&")}let Ni=null;function $i(){Ni!==null&&(clearTimeout(Ni),Ni=null)}function So(ge){Me(),Gt.value=!1,Kt.value=He()>Rh,ge.scrollIntoView({behavior:"smooth",block:"center"}),$i(),Ni=setTimeout(()=>{Ni=null;const we=J.value;if(!we||!ge.isConnected)return;const Ge=ge.getBoundingClientRect().top+ge.offsetHeight/2-(we.getBoundingClientRect().top+we.clientHeight/2);Math.abs(Ge)>48&&(we.scrollTop+=Ge)},480)}function _i(ge){const we=J.value;if(!we)return;const Ge=we.querySelector(`.turn-anchor[data-turn-id="${Fs(ge)}"]`);Ge&&So(Ge)}function Yi(ge,we){const Ge=ge.startContainer.parentElement;if(Ge!==null)for(let Ft=Ge;Ft!==null&&Ft!==we;Ft=Ft.parentElement){const sn=getComputedStyle(Ft),fn=/(auto|scroll)/.test(sn.overflowY)&&Ft.scrollHeight>Ft.clientHeight,qn=/(auto|scroll)/.test(sn.overflowX)&&Ft.scrollWidth>Ft.clientWidth;if(!fn&&!qn)continue;const Ai=ge.getClientRects()[0];if(!Ai)return;const Qs=Ft.getBoundingClientRect();fn&&(Ft.scrollTop+=Ai.top+Ai.height/2-(Qs.top+Ft.clientHeight/2)),qn&&(Ft.scrollLeft+=Ai.left+Ai.width/2-(Qs.left+Ft.clientWidth/2))}}function co(ge){const we=J.value;if(!we)return;const Ge=ge.startContainer.parentElement;Me(),Gt.value=!1,Kt.value=He()>Rh,Ct=Date.now()+700;const Ft=Ge?.closest(".u-text-wrap.is-clamped");if(Ft){Ft.querySelector(".u-text-toggle")?.click(),kt(()=>Bs(ge,we));return}Bs(ge,we)}function Bs(ge,we){const Ge=ge.startContainer.parentElement;Yi(ge,we);const Ft=ge.getClientRects()[0];if(!Ft){Ge instanceof HTMLElement&&So(Ge);return}const sn=we.getBoundingClientRect(),fn=Ft.top+Ft.height/2-(sn.top+we.clientHeight/2),qn=typeof window>"u"||!window.matchMedia("(prefers-reduced-motion: reduce)").matches;we.scrollTo({top:we.scrollTop+fn,behavior:qn?"smooth":"auto"}),$i(),Ni=setTimeout(()=>{Ni=null;const Ai=J.value,Qs=ge.getClientRects()[0];if(!Ai||!Qs)return;const Vu=Ai.getBoundingClientRect(),Qf=Qs.top+Qs.height/2-(Vu.top+Ai.clientHeight/2);Math.abs(Qf)>48&&(Ai.scrollTop+=Qf)},480)}function Hi(){const ge=J.value;if(!ge)return"none";const we=ge.firstElementChild,Ge=we instanceof HTMLElement?we.offsetHeight:0,Ft=de.value?.offsetHeight??0;return`${ge.scrollHeight}:${ge.clientHeight}:${Ge}:${Ft}`}function vi(ge){return typeof requestAnimationFrame=="function"?requestAnimationFrame(ge):setTimeout(ge,16)}function Mn(ge){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(ge):clearTimeout(ge)}let Dn=0,Ln=0,ws=null,Cn=0;const Di=Z(!1);function ri(){return performance.now()<Dn}function ur(ge,we=200){const Ge=J.value;if(!Ge||ds.value||(Me(),Gt.value=!1,ws=ge,Cn=ge.getBoundingClientRect().top,Dn=performance.now()+we,Di.value=!0,Ln))return;const Ft=()=>{if(Ln=0,!ws)return;if(Gt.value){ws=null,Di.value=!1;return}if(performance.now()>=Dn){ws=null,Di.value=!1,jo();return}const sn=ws.getBoundingClientRect().top-Cn;sn&&(Ge.scrollTop+=sn),Ln=vi(Ft)};Ln=vi(Ft)}function jo(){He()<=Rh?(Gt.value=!0,Kt.value=!1):(Gt.value=!1,Kt.value=!0)}function On(ge=36,we){if(!Gt.value&&!Qt()){we?.();return}const Ge=++as;let Ft="",sn=0,fn=0;Tn&&(Mn(Tn),Tn=0);const qn=()=>{if(Tn=0,Ge!==as)return;if(!Gt.value&&!Qt()){we?.();return}zn(!1);const Ai=Hi();sn=Ai===Ft?sn+1:0,Ft=Ai,fn++,sn<3&&fn<ge?Tn=vi(qn):we?.()};Tn=vi(qn)}function us(ge,we){return ge!==void 0&&ge.length>0&&we.length>=ge.length&&ge.firstId!==we.firstId&&ge.lastId===we.lastId&&ge.lastTextLen===we.lastTextLen&&ge.lastThinkingLen===we.lastThinkingLen&&ge.lastToolsLen===we.lastToolsLen&&ge.approvalIds===we.approvalIds}const qs=F(()=>{const ge=(s.approvals??[]).map(fn=>fn.approvalId).join(","),we=s.turns,Ge=we.at(-1),Ft=Ge?.thinking?.length??0,sn=Ge?.tools?.reduce((fn,qn)=>fn+qn.name.length+(qn.arg?.length??0)+(qn.output?.join("").length??0),0)??0;return{length:we.length,firstId:we[0]?.id??"",lastId:Ge?.id??"",lastTextLen:Ge?.text.length??0,lastThinkingLen:Ft,lastToolsLen:sn,approvalIds:ge}});let Us=s.fileReloadKey;Qe(qs,async(ge,we)=>{const Ge=s.fileReloadKey,Ft=Ge!==Us;if(Us=Ge,ds.value&&us(we,ge)){pe();return}if(Ft){pe();return}await kt(),Gt.value||Qt()?zn(ge.length<we.length):Kt.value=!0,pe()}),Qe(de,()=>{dr()}),Qe(()=>s.mobile,async()=>{await kt(),gt()});const Ji=new Map,$e=Z(!1);let nt=0,Nt=null;function Zt(){$e.value=!0,nt&&(Mn(nt),nt=0),Nt&&clearTimeout(Nt),Nt=setTimeout(()=>{$e.value=!1,Nt=null},1200)}function Nn(){if(!$e.value)return;let ge=2;const we=()=>{if(nt=0,ge--,ge>0){nt=vi(we);return}$e.value=!1,Nt&&(clearTimeout(Nt),Nt=null)};nt&&Mn(nt),nt=vi(we)}Qe(()=>s.fileReloadKey,async(ge,we)=>{const Ge=J.value;we&&Ge&&Ji.set(String(we),{top:Ge.scrollTop,following:Gt.value}),Me(),Zt(),await kt();const Ft=J.value,sn=ge?Ji.get(String(ge)):void 0;if(sn&&Ft){const fn=Lt.get(String(ge)),qn=fn?Qi(Ft,fn,sn.top):sn.top;fn&&Lt.delete(String(ge)),Gt.value=sn.following,Ft.scrollTop=qn,st=Ft.scrollTop,Kt.value=!sn.following&&He()>1,sn.following?On(36,Nn):Nn()}else Gt.value=!0,st=0,zn(!1),On(36,Nn);xe(),ee()}),Qe(()=>s.sessionLoading,async(ge,we)=>{ge||!we||(Gt.value=!0,await kt(),On(36,Nn),pe())}),Qe(()=>s.turnActive,async(ge,we)=>{ge||!we||!Gt.value&&!Qt()||(await kt(),On(48),pe())});function cs(){Gt.value=!0,Kt.value=!1,Ve=Date.now()+CM,kt(()=>{zn(!0),On(16)})}function Fi(ge){cs(),o("submit",ge)}function di(ge){Gt.value=!0,Kt.value=!1,Ve=Date.now()+CM,o("editMessage",ge)}function fi(ge){const we=s.queued?.[ge],Ge=we?.text??"";v(Ge,we?.attachments)&&o("editQueued",ge)}function Ks(ge){o("reorderQueue",ge)}function Si(ge,we){cs(),o("answer",ge,we)}function Vs(ge,we){!ge||!we||o("approval",ge,we)}let Zs=null,Wi=null,xs=null,fo=null,yi=0,Mo=0,ho=0;const Gs=Z(new Set),ds=F(()=>!!s.sessionId&&Gs.value.has(s.sessionId));function Ho(ge,we){const Ge=new Set(Gs.value);we?Ge.add(ge):Ge.delete(ge),Gs.value=Ge}function cr(){ds.value||ho||(ho=vi(()=>{ho=0,!ds.value&&(ri()||(Gt.value||Qt())&&zn(!1))}))}function ft(){as++,Tn&&(Mn(Tn),Tn=0),ho&&(Mn(ho),ho=0)}function Me(){const ge=J.value;if(Ve=0,Ct=0,ft(),Dn=0,ws=null,Di.value=!1,Sn&&(Mn(Sn),Sn=0),$i(),ge){const we=ge.scrollTop;typeof ge.scrollTo=="function"?ge.scrollTo({top:we,behavior:"auto"}):ge.scrollTop=we}Fn=0,Rt=Number.NEGATIVE_INFINITY,ge&&(st=ge.scrollTop)}function Ze(){const ge=J.value;!ge||ge.scrollHeight-ge.clientHeight<=1&&!s.hasMoreMessages||(Gt.value=!1,Me(),ge.scrollHeight-ge.clientHeight>1&&(Kt.value=!0))}function on(ge){const we=J.value;if(!we)return!1;for(const Ge of ge.composedPath()){if(Ge===we)return!1;if(Ge instanceof HTMLElement&&Ge.scrollHeight>Ge.clientHeight+1&&Ge.scrollTop>1)return!0}return!1}function Mi(ge){ge.defaultPrevented||ge.ctrlKey||ge.shiftKey||($i(),!(ge.deltaY>=0||on(ge))&&Ze())}function Wo(ge){const we=J.value;if(!we||ge.defaultPrevented||ge.button!==0||ge.pointerType==="touch")return;const Ge=we.getBoundingClientRect(),Ft=we.offsetWidth-we.clientWidth,sn=Ft>0?Ft:12;ge.target===we&&ge.clientX>=Ge.right-sn&&Ze()}let bi=null;function Al(ge){bi=ge.touches.length===1?ge.touches[0].clientY:null}function qo(ge){const we=ge.touches.length===1?ge.touches[0].clientY:null;$i(),we!==null&&bi!==null&&we>bi+2&&!on(ge)&&Ze(),bi=we}function Er(){if(!Wi)return;const ge=J.value?.firstElementChild??null;ge!==xs&&(xs&&Wi.unobserve(xs),xs=ge,ge&&Wi.observe(ge))}function dr(){if(!Wi)return;const ge=de.value;ge!==fo&&(fo&&Wi.unobserve(fo),fo=ge,ge&&Wi.observe(ge))}function fr(){const ge=J.value;gt(),Zs&&(Zs.disconnect(),ge&&Zs.observe(ge,{childList:!0,subtree:!0,characterData:!0})),Wi&&(Wi.disconnect(),xs=null,fo=null,ge&&Wi.observe(ge),Er(),dr()),yi=ge?.scrollHeight??0,Mo=ge?.clientHeight??0,ye(),xe()}function po(){Er(),cr(),ye(),xe()}function Gl(){typeof document>"u"||document.visibilityState==="visible"&&Gt.value&&On()}const oe=Z(!1);let Ae=null;function Se(){oe.value=!0,Ae!==null&&clearTimeout(Ae),Ae=setTimeout(()=>{oe.value=!1},xze)}const Pe=Z(null);let Ye=null;const Je=Z(null);let xt=null,bt=!1;function nn(){Pe.value=null,Je.value=null,bt=!1,Ye!==null&&(clearTimeout(Ye),Ye=null),xt!==null&&(clearTimeout(xt),xt=null)}function Ot(){for(let ge=s.turns.length-1;ge>=0;ge--){const we=s.turns[ge];if(we.goalContinuation)return null;if(we.role==="user")return we}return null}function wn(ge){return ba(ge).some(we=>we.kind==="thinking"&&we.thinking.trim().length>0||we.kind==="text"&&we.text.trim().length>0||we.kind==="tool")}function Qn(){if(Pe.value!==null||Je.value!==null||!s.working||(s.queued?.length??0)>0)return;const ge=Ot();if(ge===null||ge.skillActivation!==void 0||ge.pluginCommand!==void 0)return;s.turns.slice(s.turns.indexOf(ge)+1).every(Ge=>Ge.role==="assistant"&&!wn(Ge))?(Je.value=ge.id,bt=!1,xt=setTimeout(()=>{Je.value=null},Sze)):Pe.value=ge.id}let $t=!1,Ht=null;function Wn(ge){if($t)return;nn();const we=s.turns.find(Ft=>Ft.id===ge);we===void 0||we.role!=="user"||Ot()?.id!==we.id||(w.value??y.value)?.isEmpty?.()===!1||($t=!0,Ht=setTimeout(()=>{$t=!1,Ht=null},Mze),di({text:we.text,attachments:we.attachments}))}function Ee(){Je.value===null||s.working||!bt||Wn(Je.value)}Qe(()=>s.working,(ge,we)=>{if(!(we!==!0||ge)){if(Je.value!==null){Ee();return}Pe.value!==null&&Ye===null&&(Ye=setTimeout(()=>{Pe.value=null,Ye=null},_ze))}}),Qe(()=>Ot()?.id??null,(ge,we)=>{ge!==we&&nn()}),Qe(()=>s.sessionId,nn),Qe(()=>s.queued?.length,ge=>{(ge??0)>0&&nn()});const ct=F(()=>{if(s.lastTurnReason!=="cancelled"||s.working||s.turnActive)return null;const ge=s.turns[s.turns.length-1];return ge?.role==="assistant"&&wn(ge)?ge.id:null}),dt=F(()=>s.lastTurnReason==="failed"&&!s.working&&!s.turnActive&&s.turns.length>0);function Wt(){cs(),o("submit",{text:i("conversation.turnFailedResumeText"),attachments:[]})}const ki=F(()=>s.working?null:Pe.value);function $s(){o("interrupt")}function Ql(){return(w.value?.anyPopupOpen??y.value?.anyPopupOpen)===!0}const{handleCompositionStart:Xi,handleCompositionEnd:os,isComposingKeyEvent:Ku}=Kr();let ld=null;function Hp(ge){ld=ge.target}function Gf(ge){const we=ge instanceof Element&&ge!==document.body?ge:ld,Ge=use(we,".global-preview");if(Ge){ew(Ge);return}const Ft=J.value?.querySelector(".chat");Ft&&ew(Ft)}function Wp(ge){if(!(ge.target instanceof Element&&ge.target.closest(".terminal-host")!==null)){if(ge.key==="Escape"&&!s.overlayOpen&&!Ql()&&!ge.defaultPrevented&&!ge.repeat&&!Ku(ge)){ki.value!==null?(ge.preventDefault(),Wn(ki.value)):s.working&&(ge.preventDefault(),Qn(),$s());return}if(Vie(ge)&&!s.overlayOpen&&s.turns.length>0){ge.preventDefault(),it();return}lse(ge)&&!s.overlayOpen&&!ase(ge.target)&&(ge.preventDefault(),Gf(ge.target))}}function qp(){Gt.value&&cr()}pn(()=>{kt(()=>{typeof MutationObserver=="function"&&(Zs=new MutationObserver(po)),typeof ResizeObserver=="function"&&(Wi=new ResizeObserver(()=>{ye(),xe(),gt();const ge=J.value;if(!ge)return;const{scrollHeight:we,clientHeight:Ge}=ge,Ft=we>yi+1,sn=Ge<Mo-1;yi=we,Mo=Ge,!ri()&&(Ft||sn)&&cr()})),fr(),On(48),ee(),J.value?.addEventListener("kimi-table-layout",j),typeof document<"u"&&(document.addEventListener("visibilitychange",Gl),document.addEventListener("keydown",Wp),document.addEventListener("pointerdown",Hp,!0),document.addEventListener("compositionstart",Xi),document.addEventListener("compositionend",os)),window.visualViewport?.addEventListener("resize",qp)})}),An(()=>{J.value?.removeEventListener("kimi-table-layout",j),Zs&&Zs.disconnect(),Wi&&Wi.disconnect(),ho&&Mn(ho),Tn&&Mn(Tn),Ln&&Mn(Ln),Sn&&Mn(Sn),te&&Mn(te),ce&&Mn(ce),Ni!==null&&clearTimeout(Ni),_n&&clearTimeout(_n),Ae!==null&&clearTimeout(Ae),Ye!==null&&clearTimeout(Ye),xt!==null&&clearTimeout(xt),Ht!==null&&clearTimeout(Ht),A!==null&&(clearTimeout(A),A=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",Gl),document.removeEventListener("keydown",Wp),document.removeEventListener("pointerdown",Hp,!0),document.removeEventListener("compositionstart",Xi),document.removeEventListener("compositionend",os)),window.visualViewport?.removeEventListener("resize",qp)});function ad(){(w.value??y.value)?.focus()}fve({sessionId:()=>s.sessionId,mobile:()=>s.mobile===!0,starting:()=>s.starting===!0,dockedComposer:w,emptyComposer:y});function Ov(){Se()}function Pv(ge){if(Je.value!==null){if(!ge){bt||nn();return}bt=!0,Ee()}}return t({loadComposerForEdit:v,focusComposer:ad,notifyUndone:Ov,onAbortOutcome:Pv,selectAllRegion:Gf,focusGoal:K}),(ge,we)=>(b(),I("section",{class:De(["con",{mobile:e.mobile}])},[!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(b(),fe(kNe,{key:0,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":W.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:k.value,onOpenChanges:we[0]||(we[0]=Ge=>o("openChanges")),onCopyAll:we[1]||(we[1]=Ge=>m.value?.copyConversation()),onCopyFinalSummary:we[2]||(we[2]=Ge=>m.value?.copyFinalSummary()),onOpenPr:we[3]||(we[3]=Ge=>e.pr&&o("openPr",e.pr.url)),onRenameSession:we[4]||(we[4]=(Ge,Ft)=>o("renameSession",Ge,Ft)),onForkSession:we[5]||(we[5]=Ge=>o("forkSession",Ge)),onArchiveSession:we[6]||(we[6]=Ge=>o("archiveSession",Ge)),onExportSession:we[7]||(we[7]=Ge=>o("exportSession",Ge))},null,8,["session-id","workspace-name","workspace-root","session-title","branch","ahead","behind","changes-count","git-diff-stats","is-git-repo","pr","copied"])):e.mobile?ne("",!0):(b(),I("div",{key:1,class:De(["empty-drag",{"macos-desktop":h(Dc)}])},null,2)),V(PRe,{items:q.value,"active-turn-id":X.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:Ne.value,onSelect:_i},null,8,["items","active-turn-id","mobile","session-loading","occluded"]),C("div",{class:"chat-layout",style:Vt(Ke.value)},[C("div",{ref:Tt,class:De(["panes chat-scroll",{"is-following":Gt.value,"history-prepending":ds.value,"is-pinned":Di.value,scrolling:mn.value,"session-settling":$e.value}]),onScrollPassive:ni,onWheelPassive:Mi,onPointerdownPassive:Wo,onTouchstartPassive:Al,onTouchmovePassive:qo},[C("div",{class:De(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(b(),I(Be,{key:0},[we[55]||(we[55]=C("div",{class:"empty-spacer"},null,-1)),C("div",sze,[e.starting?(b(),I("span",rze,[V(h(Bi),{size:"sm"}),C("span",null,B(h(i)("conversation.starting")),1)])):(b(),fe(ize,{key:0,class:"empty-doodle"},{fallback:he(()=>[C("span",oze,B(h(i)("composer.emptyConversationTitle")),1)]),_:1})),e.starting?ne("",!0):(b(),I("span",lze,B(h(i)("composer.emptyConversation")),1))]),d.value?(b(),I("div",aze,[V(h(Ce),{class:"upgrade-banner-icon",name:"music",size:"sm"}),C("span",uze,B(h(i)("composer.upgradeBanner")),1),C("button",{type:"button",class:"upgrade-banner-cta",onClick:we[8]||(we[8]=Ge=>h(Cp)())},B(h(i)("sidebar.upgrade")),1)])):ne("",!0),V(UD,{ref_key:"emptyComposerRef",ref:y,class:"empty-composer","session-id":e.sessionId,running:e.running,working:e.working,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"swarm-mode":e.swarmMode,"goal-mode":e.goalMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"auth-ready":e.authReady,"managed-signed-in":e.managedSignedIn,"managed-membership":e.managedMembership,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":"",onSubmit:Fi,onSteer:we[11]||(we[11]=Ge=>o("steer",Ge)),onCommand:we[12]||(we[12]=Ge=>o("command",Ge)),onInterrupt:$s,onUnqueue:we[13]||(we[13]=Ge=>o("unqueue",Ge)),onEditQueued:we[14]||(we[14]=Ge=>o("editQueued",Ge)),onSetPermission:we[15]||(we[15]=Ge=>o("setPermission",Ge)),onSetThinking:we[16]||(we[16]=Ge=>o("setThinking",Ge)),onTogglePlan:we[17]||(we[17]=Ge=>o("togglePlan")),onToggleSwarm:we[18]||(we[18]=Ge=>o("toggleSwarm")),onToggleGoal:we[19]||(we[19]=Ge=>o("toggleGoal")),onOpenBtw:we[20]||(we[20]=Ge=>o("command",{cmd:"/btw",attachments:[]})),onCreateGoal:we[21]||(we[21]=Ge=>o("createGoal",Ge)),onControlGoal:we[22]||(we[22]=Ge=>o("controlGoal",Ge)),onFocusGoal:K,onCompact:we[23]||(we[23]=Ge=>o("compact")),onPickModel:we[24]||(we[24]=Ge=>o("pickModel")),onSelectModel:we[25]||(we[25]=Ge=>o("selectModel",Ge)),onLogin:we[26]||(we[26]=Ge=>o("login"))},fI({_:2},[e.starting?void 0:{name:"footer",fn:he(()=>[C("div",cze,[c.value?(b(),I("div",dze,[V(h(gn),{text:h(i)("conversation.switchWorkspace")},{default:he(()=>[C("button",{type:"button",class:De(["ws-chip",{open:r.value}]),"aria-expanded":r.value,onClick:It(p,["stop"])},[V(h(Ce),{name:"folder"}),C("span",hze,B(u.value),1),V(h(Ce),{class:"ws-chip-chev",name:"chevron-down",size:"sm"})],10,fze)]),_:1},8,["text"]),r.value?(b(),I("div",{key:0,class:De(["ws-panel",{up:l.value}]),style:Vt(a.value?{maxHeight:a.value}:void 0),role:"menu"},[C("div",pze,B(h(i)("workspace.recentLabel")),1),(b(!0),I(Be,null,yt(f.value,Ge=>(b(),I("button",{key:Ge.id,type:"button",class:De(["ws-row",{on:Ge.id===e.activeWorkspaceId}]),role:"menuitem",onClick:It(Ft=>g(Ge.id),["stop"])},[V(h(Ce),{name:"folder"}),C("span",mze,[C("span",vze,B(Ge.name),1),C("span",yze,B(Ge.shortPath),1)]),Ge.id===e.activeWorkspaceId?(b(),fe(h(Ce),{key:0,class:"ws-check",name:"check",size:"sm"})):ne("",!0)],10,gze))),128)),we[54]||(we[54]=C("div",{class:"ws-divider"},null,-1)),C("button",{type:"button",class:"ws-action",role:"menuitem",onClick:we[9]||(we[9]=It(Ge=>{r.value=!1,o("addWorkspace")},["stop"]))},[V(h(Ce),{name:"folder-plus"}),C("span",null,B(h(i)("conversation.pickFolder")),1)])],6)):ne("",!0)])):(b(),I("button",{key:1,type:"button",class:"ws-chip ws-ghost",onClick:we[10]||(we[10]=Ge=>o("addWorkspace"))},[V(h(Ce),{name:"folder-plus"}),C("span",null,B(h(i)("conversation.pickFolder")),1)]))])]),key:"0"}]),1032,["session-id","running","working","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","goal","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","starting"]),r.value?(b(),I("div",{key:1,class:"ws-backdrop",onClick:we[27]||(we[27]=Ge=>r.value=!1)})):ne("",!0),we[56]||(we[56]=C("div",{class:"empty-spacer"},null,-1))],64)):(b(),fe(Ak,{ref_key:"chatPaneRef",ref:m,key:e.fileReloadKey??"no-session",turns:e.turns,cwd:e.status.cwd,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":Gt.value,queued:e.queued,"undo-hint-turn-id":ki.value,"interrupted-turn-id":ct.value,"turn-failed":dt.value,"turn-error":e.turnError??null,"turn-retry":e.turnRetry??null,onResumeTurn:Wt,onOpenFile:we[28]||(we[28]=Ge=>o("openFile",Ge)),onOpenMedia:we[29]||(we[29]=Ge=>o("openMedia",Ge)),onOpenTurnDiff:we[30]||(we[30]=Ge=>o("openTurnDiff",Ge)),onCopyConversationCopied:x,onOpenCompaction:we[31]||(we[31]=Ge=>o("openCompaction",Ge)),onOpenAgent:we[32]||(we[32]=Ge=>o("openAgent",Ge)),onEditMessage:di,onArmedUndo:Wn,onLoadOlderMessages:ci,onUnqueue:we[33]||(we[33]=Ge=>o("unqueue",Ge)),onEditQueued:fi,onReorderQueue:Ks},null,8,["turns","cwd","approvals","questions","turn-active","working","session-loading","compaction","has-more-messages","loading-more","loading-more-error","is-following","queued","undo-hint-turn-id","interrupted-turn-id","turn-failed","turn-error","turn-retry"]))],2)],34),e.turns.length===0&&!e.sessionLoading?ne("",!0):(b(),fe(FRe,{key:0,ref:yn,style:Vt(Re.value),"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"swarm-mode":e.swarmMode,"goal-mode":e.goalMode,"activation-badges":e.activationBadges,models:e.models,"auth-ready":e.authReady,"managed-signed-in":e.managedSignedIn,"managed-membership":e.managedMembership,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"session-plans":e.sessionPlans,"dock-panel":R.value,"overlay-open":e.overlayOpen,"bash-tasks":E.value,"subagent-tasks":S.value,"bash-running":M.value,"subagent-running":_.value,"todo-done-count":P.value,"has-dock-work":O.value,todos:e.todos,"pending-question":ve.value,"question-busy-kind":re.value,"pending-approval":se.value,"approval-busy":U.value,mobile:e.mobile,onToggleDockPanel:we[34]||(we[34]=Ge=>z(Ge)),onCloseDockPanel:we[35]||(we[35]=Ge=>G()),onOpenAgent:we[36]||(we[36]=Ge=>o("openAgent",Ge)),"open-file":Ge=>o("openFile",Ge),onAnswer:Si,onDismiss:we[37]||(we[37]=Ge=>o("dismiss",Ge)),onApproval:Vs,onCancelTask:we[38]||(we[38]=Ge=>o("cancelTask",Ge)),onControlGoal:we[39]||(we[39]=Ge=>o("controlGoal",Ge)),onSubmit:Fi,onSteer:we[40]||(we[40]=Ge=>o("steer",Ge)),onCommand:we[41]||(we[41]=Ge=>o("command",Ge)),onInterrupt:$s,onSetPermission:we[42]||(we[42]=Ge=>o("setPermission",Ge)),onSetThinking:we[43]||(we[43]=Ge=>o("setThinking",Ge)),onTogglePlan:we[44]||(we[44]=Ge=>o("togglePlan")),onToggleSwarm:we[45]||(we[45]=Ge=>o("toggleSwarm")),onToggleGoal:we[46]||(we[46]=Ge=>o("toggleGoal")),onOpenBtw:we[47]||(we[47]=Ge=>o("command",{cmd:"/btw",attachments:[]})),onCreateGoal:we[48]||(we[48]=Ge=>o("createGoal",Ge)),onFocusGoal:K,onCompact:we[49]||(we[49]=Ge=>o("compact")),onPickModel:we[50]||(we[50]=Ge=>o("pickModel")),onSelectModel:we[51]||(we[51]=Ge=>o("selectModel",Ge)),onLogin:we[52]||(we[52]=Ge=>o("login"))},null,8,["style","session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","goal","session-plans","dock-panel","overlay-open","bash-tasks","subagent-tasks","bash-running","subagent-running","todo-done-count","has-dock-work","todos","pending-question","question-busy-kind","pending-approval","approval-busy","mobile","open-file"]))],4),je.value?(b(),fe(JRe,{key:2,ref_key:"transcriptSearchRef",ref:ke,pane:J.value,mobile:e.mobile,reveal:co,onClose:Fe},null,8,["pane","mobile"])):ne("",!0),V(ys,{name:"pill"},{default:he(()=>[Kt.value?(b(),I("button",{key:0,class:"newmsg-pill",style:Vt({bottom:`${Ie.value+12}px`}),"aria-label":h(i)("conversation.jumpToLatestAria"),onClick:we[53]||(we[53]=Ge=>zn(!0))},[V(h(Ce),{class:"pill-chevron",name:"arrow-down",size:"sm"}),Ue(" "+B(h(i)("conversation.newMessages")),1)],12,bze)):ne("",!0)]),_:1}),V(ys,{name:"undo-toast"},{default:he(()=>[oe.value?(b(),I("div",kze,[C("span",Aze,B(h(i)("conversation.undone")),1)])):ne("",!0)]),_:1})],2))}}),Eze=vt(Ize,[["__scopeId","data-v-8c7ebe8d"]]),Tze={key:0,class:"fp-empty fp-error"},Lze={key:1,class:"fp-empty"},Nze={key:2,class:"fp-loading"},Fze={class:"fp-path"},Bze={class:"fp-meta"},$ze={key:0,class:"fp-lines"},Dze={class:"fp-size"},Rze={key:3,class:"fp-search"},zze=["placeholder"],Oze={key:0,class:"fp-search-count"},Pze=["href","aria-label"],jze={key:1,class:"fp-code"},Hze={key:1,class:"fp-body fp-code"},Wze={key:2,class:"fp-body"},qze=["srcdoc","title"],Uze={key:1,class:"fp-code"},Kze={key:3,class:"fp-body fp-pdf-wrap"},Vze=["src","title"],Zze={key:1,class:"fp-binary-card"},Gze={class:"fp-binary-label"},Qze={key:4,class:"fp-body fp-table-wrap"},Yze={class:"fp-table"},Jze=["data-line"],Xze={key:5,class:"fp-body fp-image-wrap"},eOe=["src","alt"],tOe={key:1,class:"fp-binary-card"},nOe={class:"fp-binary-icon"},iOe={class:"fp-binary-label"},sOe={key:6,class:"fp-body fp-code"},oOe={key:7,class:"fp-body fp-binary-wrap"},rOe={class:"fp-binary-card"},lOe={class:"fp-binary-icon"},aOe={class:"fp-binary-label"},uOe=tt({__name:"FilePreview",props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},openFile:{type:Function}},emits:["close","openExternal","reveal"],setup(e,{emit:t}){const{t:n}=Bt();function i(ce,pe){const Ne=pe.startsWith("/"),te=pe.split("/").filter(Boolean);for(const ye of ce.split("/"))ye===""||ye==="."||(ye===".."?te.pop():te.push(ye));return(Ne?"/":"")+te.join("/")}const s=an("resolveImage",async ce=>ce),o=F(()=>{const ce=u.file?.path??"",pe=ce.lastIndexOf("/");return pe>0?ce.slice(0,pe):""});function r(ce){if(/^(https?:|data:|blob:)/i.test(ce)||ce.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(ce)||ce.startsWith("\\\\"))return ce;const pe=o.value;return pe?i(ce,pe):ce}async function l(ce){const pe=r(ce);return s?s(pe):pe}Pn("resolveImage",l);function a(ce){let pe=ce.path;if(/^(https?:|mailto:|tel:|data:|blob:|#)/i.test(pe)||pe.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(pe)||pe.startsWith("\\\\"))return ce;for(const te of["#","?"]){const ye=pe.indexOf(te);ye!==-1&&(pe=pe.slice(0,ye))}const Ne=o.value;return{...ce,path:i(pe,Ne)}}const u=e,c=t;function d(ce){u.openFile?.(a(ce))}const f=Z(null),p=F(()=>{const ce=u.file;if(!ce)return"binary";const pe=ce.mime??"",Ne=ce.languageId??"",te=ce.path.toLowerCase();return pe==="text/markdown"||Ne==="markdown"||Ne==="md"||te.endsWith(".mdx")?"markdown":pe==="application/json"||Ne==="json"?"json":pe==="text/html"||Ne==="html"||te.endsWith(".html")||te.endsWith(".htm")?"html":pe==="application/pdf"||te.endsWith(".pdf")?"pdf":pe==="text/csv"||Ne==="csv"||te.endsWith(".csv")?"csv":pe.startsWith("image/")?"image":ce.isBinary?"binary":pe.startsWith("text/")||Ne!==""?"text":"binary"});function g(ce){const pe=atob(ce),Ne=Uint8Array.from(pe,te=>te.charCodeAt(0));return new TextDecoder().decode(Ne)}const m=F(()=>{const ce=u.file;if(!ce)return"";if(ce.encoding==="base64")try{return g(ce.content)}catch{return ce.content}return ce.content}),y=F(()=>{if(p.value!=="json"||!u.file)return"";try{return JSON.stringify(JSON.parse(m.value),null,2)}catch{return m.value}}),w=F(()=>u.file?(p.value==="json"?y.value:m.value).split(` -`):[]),k=F(()=>u.file?p.value==="json"?y.value:m.value:""),A=F(()=>w.value.map((ce,pe)=>pe+1)),v=F(()=>u.file&&k.value.length<=u3?u.file.path:void 0),x=Z(""),E=Z(0),S=F(()=>{const ce=x.value.trim().toLowerCase();if(!ce)return[];const pe=[];return w.value.forEach((Ne,te)=>{Ne.toLowerCase().includes(ce)&&pe.push(te+1)}),pe});Qe(x,()=>{E.value=0});function M(ce,pe=!1){ce&&kt(()=>{const Ne=f.value?.querySelector(".fp-body"),te=Ne?.querySelector(`[data-line="${ce}"]`);if(!Ne||!te)return;pe&&(Ne.scrollTop=0);const ye=Ne.getBoundingClientRect(),j=te.getBoundingClientRect(),Y=j.top-ye.top+Ne.scrollTop;Ne.scrollTop=Y-Ne.clientHeight/2+j.height/2})}Qe(()=>[u.file?.path,u.line],()=>M(u.line,!0),{immediate:!0});function _(ce){const pe=S.value;pe.length!==0&&(E.value=(E.value+ce+pe.length)%pe.length,M(pe[E.value]))}function N(ce){const pe=S.value;return{target:u.line===ce,hit:pe.includes(ce),active:pe[E.value]===ce}}function D(ce){return ce<1024?`${ce} B`:ce<1024*1024?`${(ce/1024).toFixed(1)} KB`:`${(ce/(1024*1024)).toFixed(1)} MB`}const T=Z(!1),$=Z(!1);function P(){u.file&&ro(k.value).then(ce=>{ce&&(T.value=!0,setTimeout(()=>{T.value=!1},1400))})}function O(){u.file&&ro(u.file.path).then(ce=>{ce&&($.value=!0,setTimeout(()=>{$.value=!1},1400))})}const R=Z("preview"),W=Z("preview"),z=Z("fit");function G(ce){R.value=ce}function K(ce){W.value=ce}function H(ce){z.value=ce}Qe(p,ce=>{R.value=ce==="html"?"preview":"source",W.value="preview",z.value="fit"});const q=F(()=>{const ce=u.file;return!ce||p.value!=="image"?null:ce.encoding==="base64"?`data:${ce.mime};base64,${ce.content}`:ce.mime==="image/svg+xml"?`data:${ce.mime};charset=utf-8,${encodeURIComponent(ce.content)}`:null}),X=F(()=>{const ce=u.file;return!ce||p.value!=="pdf"?null:u.downloadUrl?u.downloadUrl:ce.encoding==="base64"?`data:${ce.mime};base64,${ce.content}`:null}),ee=F(()=>u.file?["<!doctype html>",'<meta charset="utf-8">',`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: blob:; style-src 'unsafe-inline'; font-src data:;">`,m.value].join(""):"");function ue(ce){const pe=[];let Ne="",te=!1;for(let ye=0;ye<ce.length;ye++){const j=ce[ye];j==='"'&&ce[ye+1]==='"'?(Ne+='"',ye++):j==='"'?te=!te:j===","&&!te?(pe.push(Ne),Ne=""):Ne+=j}return pe.push(Ne),pe}const ie=F(()=>w.value.slice(0,200).map(ue));function xe(ce,pe=55){return!ce||ce.length<=pe?ce:"…"+ce.slice(ce.length-pe+1)}return(ce,pe)=>(b(),I("div",{ref_key:"rootRef",ref:f,class:"file-preview"},[e.error&&!e.loading?(b(),I("div",Tze,[C("span",null,B(e.error),1),e.closable?(b(),fe(h(jt),{key:0,variant:"secondary",size:"sm",onClick:pe[0]||(pe[0]=Ne=>c("close"))},{default:he(()=>[Ue(B(h(n)("filePreview.close")),1)]),_:1})):ne("",!0)])):!e.file&&!e.loading?(b(),I("div",Lze,B(h(n)("filePreview.empty")),1)):e.loading?(b(),I("div",Nze,[pe[7]||(pe[7]=C("span",{class:"spinner"},null,-1)),C("span",null,B(h(n)("filePreview.loading")),1)])):e.file?(b(),I(Be,{key:3},[V(h(Uc),{wrap:"",title:h(n)("common.preview"),closable:e.closable,"close-label":h(n)("filePreview.close"),onClose:pe[6]||(pe[6]=Ne=>c("close"))},{default:he(()=>[V(h(gn),{text:e.file.path},{default:he(()=>[C("span",Fze,B(xe(e.file.path)),1)]),_:1},8,["text"]),C("span",Bze,[e.file.lineCount?(b(),I("span",$ze,B(h(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):ne("",!0),C("span",Dze,B(D(e.file.size)),1)]),p.value==="html"?(b(),fe(h(wo),{key:0,"model-value":R.value,size:"sm",options:[{value:"preview",label:h(n)("filePreview.preview")},{value:"source",label:h(n)("filePreview.source")}],"onUpdate:modelValue":G},null,8,["model-value","options"])):ne("",!0),p.value==="markdown"?(b(),fe(h(wo),{key:1,"model-value":W.value,size:"sm",options:[{value:"preview",label:h(n)("filePreview.preview")},{value:"source",label:h(n)("filePreview.source")}],"onUpdate:modelValue":K},null,8,["model-value","options"])):ne("",!0),p.value==="image"?(b(),fe(h(wo),{key:2,"model-value":z.value,size:"sm",options:[{value:"fit",label:h(n)("filePreview.fit")},{value:"actual",label:h(n)("filePreview.actual")}],"onUpdate:modelValue":H},null,8,["model-value","options"])):ne("",!0),p.value==="text"||p.value==="json"||p.value==="html"||p.value==="csv"?(b(),I("div",Rze,[Bn(C("input",{"onUpdate:modelValue":pe[1]||(pe[1]=Ne=>x.value=Ne),class:"fp-search-input",type:"search",placeholder:h(n)("filePreview.search")},null,8,zze),[[_o,x.value]]),x.value.trim()?(b(),I("span",Oze,B(S.value.length),1)):ne("",!0),V(h(rn),{size:"sm",disabled:S.value.length===0,label:h(n)("filePreview.prevMatch"),tooltip:h(n)("filePreview.prevMatch"),onClick:pe[2]||(pe[2]=Ne=>_(-1))},{default:he(()=>[V(h(Ce),{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label","tooltip"]),V(h(rn),{size:"sm",disabled:S.value.length===0,label:h(n)("filePreview.nextMatch"),tooltip:h(n)("filePreview.nextMatch"),onClick:pe[3]||(pe[3]=Ne=>_(1))},{default:he(()=>[V(h(Ce),{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label","tooltip"])])):ne("",!0),V(h(rn),{size:"sm",class:De({copied:$.value}),label:$.value?h(n)("filePreview.copied"):h(n)("filePreview.copyPath"),tooltip:$.value?h(n)("filePreview.copied"):h(n)("filePreview.copyPath"),onClick:O},{default:he(()=>[$.value?(b(),fe(h(Ce),{key:1,class:"fp-check",name:"check",size:"md"})):(b(),fe(h(Ce),{key:0,name:"link",size:"md"}))]),_:1},8,["class","label","tooltip"]),e.externalActions?(b(),fe(h(rn),{key:4,size:"sm",label:h(n)("filePreview.openInEditor"),tooltip:h(n)("filePreview.openInEditor"),onClick:pe[4]||(pe[4]=Ne=>c("openExternal"))},{default:he(()=>[V(h(Ce),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),e.externalActions?(b(),fe(h(rn),{key:5,size:"sm",label:h(n)("filePreview.reveal"),tooltip:h(n)("filePreview.reveal"),onClick:pe[5]||(pe[5]=Ne=>c("reveal"))},{default:he(()=>[V(h(Ce),{name:"folder",size:"md"})]),_:1},8,["label","tooltip"])):ne("",!0),e.downloadUrl?(b(),fe(h(gn),{key:6,text:h(n)("filePreview.download")},{default:he(()=>[C("a",{class:"fp-download",href:e.downloadUrl,target:"_blank",rel:"noreferrer",download:"","aria-label":h(n)("filePreview.download")},[V(h(Ce),{name:"download",size:"md"})],8,Pze)]),_:1},8,["text"])):ne("",!0),!e.file.isBinary&&p.value!=="image"?(b(),fe(h(rn),{key:7,size:"sm",class:De({copied:T.value}),label:T.value?h(n)("filePreview.copied"):h(n)("filePreview.copy"),tooltip:T.value?h(n)("filePreview.copied"):h(n)("filePreview.copy"),onClick:P},{default:he(()=>[T.value?(b(),fe(h(Ce),{key:1,class:"fp-check",name:"check",size:"md"})):(b(),fe(h(Ce),{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label","tooltip"])):ne("",!0)]),_:1},8,["title","closable","close-label"]),p.value==="markdown"?(b(),I("div",{key:0,class:De(["fp-body",{"fp-markdown":W.value==="preview"}])},[W.value==="preview"?(b(),fe(h(Kl),{key:0,text:m.value,"open-file":u.openFile?d:void 0},null,8,["text","open-file"])):(b(),I("div",jze,[V(al,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])]))],2)):p.value==="json"?(b(),I("div",Hze,[V(al,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])])):p.value==="html"?(b(),I("div",Wze,[R.value==="preview"?(b(),I("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:ee.value,title:e.file.path},null,8,qze)):(b(),I("div",Uze,[V(al,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])]))])):p.value==="pdf"?(b(),I("div",Kze,[X.value?(b(),I("iframe",{key:0,class:"fp-pdf-frame",src:X.value,title:e.file.path},null,8,Vze)):(b(),I("div",Zze,[C("span",Gze,B(h(n)("filePreview.pdfNoPreview")),1)]))])):p.value==="csv"?(b(),I("div",Qze,[C("table",Yze,[C("tbody",null,[(b(!0),I(Be,null,yt(ie.value,(Ne,te)=>(b(),I("tr",{key:te,class:De(N(te+1)),"data-line":te+1},[C("th",null,B(te+1),1),(b(!0),I(Be,null,yt(Ne,(ye,j)=>(b(),I("td",{key:j},B(ye),1))),128))],10,Jze))),128))])])])):p.value==="image"?(b(),I("div",Xze,[q.value?(b(),I("img",{key:0,src:q.value,alt:e.file.path,class:De(["fp-image",{actual:z.value==="actual"}])},null,10,eOe)):(b(),I("div",tOe,[C("span",nOe,[V(h(Ce),{name:"image-off",size:"lg"})]),C("span",iOe,B(h(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:D(e.file.size)})),1)]))])):p.value==="text"?(b(),I("div",sOe,[V(al,{code:w.value,path:v.value,"line-numbers":A.value,framed:!1,"line-class":N},null,8,["code","path","line-numbers"])])):(b(),I("div",oOe,[C("div",rOe,[C("span",lOe,[V(h(Ce),{name:"file-off",size:"lg"})]),C("span",aOe,B(h(n)("filePreview.binaryNoPreview",{mime:e.file.mime||h(n)("filePreview.unknownType"),size:D(e.file.size)})),1)])]))],64)):ne("",!0)],512))}}),cOe=vt(uOe,[["__scopeId","data-v-4c55a361"]]),dOe={class:"tp"},fOe=tt({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(null);return Qe(()=>n.text,()=>{const r=o.value;!r||!(r.scrollHeight-r.scrollTop-r.clientHeight<24)||kt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})},{immediate:!0}),(r,l)=>(b(),I("div",dOe,[V(h(Uc),{title:h(s)("common.preview"),subtitle:e.subtitle??h(s)("thinking.panelTitle"),"close-label":h(s)("thinking.close"),onClose:l[0]||(l[0]=a=>i("close"))},null,8,["title","subtitle","close-label"]),C("pre",{ref_key:"bodyEl",ref:o,class:"tp-body"},B(e.text),513)]))}}),hOe=vt(fOe,[["__scopeId","data-v-afb1f46f"]]),pOe={class:"agent-panel"},gOe={key:0,class:"agent-fallback"},mOe={key:0,class:"agent-error"},vOe=tt({__name:"AgentDetailPanel",props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:["close","loadOlderMessages","openAgent","openFile","openMedia","openTurnDiff"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(null),r=F(()=>{const M=n.member.prompt?.trim(),_=M?`$ ${M}`:null;return A.value.filter(N=>N!==M&&N!==_).join(` -`)});let l=null,a=0;function u(M){const _=M==="command"?n.member.prompt:r.value;if(!_)return;const N=a;ro(_).then(D=>{!D||N!==a||(l!==null&&clearTimeout(l),o.value=M,l=setTimeout(()=>{l=null,o.value=null},1400))})}const c=F(()=>n.member.id),{scroller:d,following:f,onScroll:p,pinScroll:g}=sve(c);Qe(c,()=>{a++,l!==null&&clearTimeout(l),l=null,o.value=null});const m=Z(!1);let y=null,w=null;function k(){y!==null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(y),w!==null&&clearTimeout(w),y=null,w=null}Qe(c,()=>{m.value=!1,k();const M=()=>{k(),m.value=!0};typeof requestAnimationFrame=="function"?y=requestAnimationFrame(()=>{y=requestAnimationFrame(M)}):w=setTimeout(M,32)},{immediate:!0}),Gn(k);const A=F(()=>{const M=new Set,_=[],N=n.member.prompt?.trim(),D=N?`$ ${N}`:null;for(const T of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` -`),n.member.summary]){const $=T?.trim();!$||M.has($)||D!==null&&$===D||(M.add($),_.push($))}return _});Pn("pinScroll",()=>{d.value&&g()});function v(M){switch(M){case"queued":return s("tools.swarm.phaseQueued");case"working":return s("tools.swarm.phaseWorking");case"suspended":return s("tools.swarm.phaseSuspended");case"completed":return s("tools.swarm.phaseCompleted");case"failed":return s("tools.swarm.phaseFailed");case"cancelled":return s("tools.swarm.phaseCancelled")}}const x=an("modelDisplay"),E=an("subagentEffort"),S=F(()=>{const M=[n.member.subagentType,x?.(n.member.model),E?.(n.member.thinkingEffort)].filter(_=>!!_);return M.length>0?M.join(" · "):void 0});return(M,_)=>(b(),I("div",pOe,[V(h(Uc),{title:e.member.name,subtitle:S.value,"close-label":h(s)("thinking.close"),onClose:_[2]||(_[2]=N=>i("close"))},{default:he(()=>[V(h(Hl),{variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(v(e.member.phase)),1)]),_:1}),e.member.prompt?(b(),fe(h(gn),{key:0,text:h(s)("tasks.copyCommand")},{default:he(()=>[V(h(rn),{size:"sm",label:h(s)("tasks.copyCommand"),onClick:_[0]||(_[0]=N=>u("command"))},{default:he(()=>[V(h(Ce),{name:o.value==="command"?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"])):ne("",!0),r.value?(b(),fe(h(gn),{key:1,text:h(s)("tasks.copyOutput")},{default:he(()=>[V(h(rn),{size:"sm",label:h(s)("tasks.copyOutput"),onClick:_[1]||(_[1]=N=>u("output"))},{default:he(()=>[V(h(Ce),{name:o.value==="output"?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"])):ne("",!0)]),_:1},8,["title","subtitle","close-label"]),C("div",{ref_key:"scroller",ref:d,class:"agent-transcript",onScrollPassive:_[8]||(_[8]=(...N)=>h(p)&&h(p)(...N))},[m.value?(b(),I(Be,{key:0},[e.turns.length===0&&!e.loading&&(e.loadError||A.value.length>0)?(b(),I("div",gOe,[e.loadError?(b(),I("div",mOe,B(h(s)("tasks.transcriptLoadError")),1)):ne("",!0),A.value.length>0?(b(),fe(Ir,{key:1,lines:A.value},null,8,["lines"])):ne("",!0)])):(b(),fe(Ak,{key:1,turns:e.turns,"turn-active":e.running,"session-loading":e.loading&&e.turns.length===0,"has-more-messages":e.hasMore,"loading-more":e.loadingMore,"loading-more-error":e.loadMoreError,"is-following":h(f),"read-only":"",onLoadOlderMessages:_[3]||(_[3]=N=>i("loadOlderMessages")),onOpenAgent:_[4]||(_[4]=N=>i("openAgent",N)),onOpenFile:_[5]||(_[5]=N=>i("openFile",N)),onOpenMedia:_[6]||(_[6]=N=>i("openMedia",N)),onOpenTurnDiff:_[7]||(_[7]=N=>i("openTurnDiff",N))},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))],64)):ne("",!0)],544)]))}}),yOe=vt(vOe,[["__scopeId","data-v-84a2873f"]]),bOe={class:"sc"},kOe={key:0,class:"sc-empty"},AOe={key:2,class:"sc-loading"},COe={class:"sc-composer"},wOe=["placeholder"],xOe=["disabled"],_Oe=tt({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{},onSend:{type:Function}},emits:["close","openMedia"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>n.turns.find(E=>E.role==="user")?.text?.trim()??""),r=F(()=>n.title?.trim()||s("sideChat.title")),l=F(()=>n.subtitle?.trim()?n.subtitle.trim():o.value||s("sideChat.subtitle")),a=Z(""),u=Z(null),c=Z(null),d=Z(!1);async function f(){const x=a.value,E=x.trim();if(!(!E||d.value)){d.value=!0;try{if(!await n.onSend(E)||a.value!==x)return;a.value="",kt(()=>{u.value&&(u.value.style.height="auto"),p()})}finally{d.value=!1}}}function p(){const x=c.value;x&&(x.scrollTop=x.scrollHeight)}Pn("pinScroll",x=>{const E=c.value;if(!E)return;const S=x.getBoundingClientRect().top;requestAnimationFrame(()=>{E.scrollTop+=x.getBoundingClientRect().top-S})});const g=F(()=>{const x=n.turns;if(x.length===0)return"0";const E=x.at(-1),S=E.thinking?.length??0,M=E.tools?.reduce((_,N)=>_+N.name.length+(N.arg?.length??0)+(N.output?.join("").length??0),0)??0;return`${x.length}:${E.text.length}:${S}:${M}`});Qe(g,async()=>{!n.running&&!n.sending||(await kt(),p())});const m=F(()=>n.sending?n.turns.at(-1)?.role==="user":!1),{handleCompositionStart:y,handleCompositionEnd:w,isComposingKeyEvent:k}=Kr();function A(x){x.key==="Enter"&&!x.shiftKey&&!k(x)&&(x.preventDefault(),f())}function v(){const x=u.value;x&&(x.style.height="auto",x.style.height=`${Math.min(x.scrollHeight,160)}px`)}return(x,E)=>(b(),I("div",bOe,[V(h(Uc),{title:r.value,subtitle:l.value,"close-label":h(s)("thinking.close"),onClose:E[0]||(E[0]=S=>i("close"))},null,8,["title","subtitle","close-label"]),C("div",{ref_key:"bodyRef",ref:c,class:"sc-body"},[e.turns.length===0?(b(),I("div",kOe,B(h(s)("sideChat.empty")),1)):(b(),fe(Ak,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running,"turn-files-interactive":!1,onOpenMedia:E[1]||(E[1]=S=>i("openMedia",S))},null,8,["turns","turn-active","working"])),m.value?(b(),I("div",AOe,[V(zD,{label:h(s)("conversation.requesting")},null,8,["label"])])):ne("",!0)],512),C("div",COe,[Bn(C("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":E[2]||(E[2]=S=>a.value=S),class:"sc-input",rows:"1",placeholder:h(s)("sideChat.placeholder"),onInput:v,onKeydown:A,onCompositionstart:E[3]||(E[3]=(...S)=>h(y)&&h(y)(...S)),onCompositionend:E[4]||(E[4]=(...S)=>h(w)&&h(w)(...S))},null,40,wOe),[[_o,a.value]]),V(h(gn),{text:h(s)("sideChat.send")},{default:he(()=>[C("button",{type:"button",class:"sc-send",disabled:!a.value.trim(),onClick:f},[V(h(Ce),{name:"arrow-right",size:"sm"})],8,xOe)]),_:1},8,["text"])])]))}}),SOe=vt(_Oe,[["__scopeId","data-v-bb28a4e0"]]),MOe={class:"changes-pane"},IOe={class:"dv-path"},EOe={class:"diff-head"},TOe={class:"back-label"},LOe={key:"loading",class:"empty-state diff-loading"},NOe={key:"lines",class:"dv-lines-wrap"},FOe={key:"empty",class:"empty-state"},BOe={class:"dv-change-count"},$Oe={class:"ch-head"},DOe={class:"br-heading"},ROe={class:"br-label"},zOe={class:"br-name"},OOe={key:0,class:"sync-info"},POe={key:0,class:"ahead"},jOe={key:0,class:"behind"},HOe={key:1,class:"empty-head"},WOe={class:"ch-list-content"},qOe=["onClick"],UOe={class:"fpath"},KOe=["onClick"],VOe={class:"tree-name"},ZOe=["onClick"],GOe={class:"tree-name"},QOe={key:2,class:"empty-state"},YOe={class:"empty-state-icon","aria-hidden":"true"},JOe={key:3,class:"empty-state"},XOe=tt({__name:"DiffView",props:{changes:{},gitInfo:{},fileDiff:{},fullTexts:{},emptyFile:{type:Boolean},selectedDiffPath:{},fileDiffLoading:{type:Boolean},mode:{default:"full"},hideBack:{type:Boolean,default:!1},closable:{type:Boolean,default:!0}},emits:["open","back","close"],setup(e,{emit:t}){const{t:n}=Bt();function i($){return n($===1?"diff.fileCountOne":"diff.fileCountOther",{number:$})}const s=e,o=t;function r($){const P=$.toLowerCase();return P==="modified"?"modified":P==="added"?"added":P==="deleted"?"deleted":P==="renamed"?"renamed":P==="untracked"?"untracked":P==="conflicted"?"conflicted":P==="ignored"?"ignored":P==="clean"?"clean":"unknown"}const l={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function a($){return l[r($)]??"?"}function u($,P=60){return $.length<=P?$:"…"+$.slice($.length-P+1)}const c=F(()=>s.gitInfo!==null),d=F(()=>s.changes.length>0),f=F(()=>(s.selectedDiffPath??null)!==null),p=F(()=>s.mode==="detail"||s.mode==="full"&&f.value),g=F(()=>s.fileDiff??[]),m=F(()=>s.fileDiffLoading===!0);function y($){o("open",$)}function w(){o("back")}function k(){o("close")}const A=Z("list");function v($){A.value=$}function x($){const P={children:[]},O=[...$].sort((R,W)=>R.path.localeCompare(W.path));for(const R of O){const W=R.path.endsWith("/"),z=R.path.split("/").filter(Boolean);if(z.length===0)continue;let G=P;for(let K=0;K<z.length;K++){const H=z[K],q=K===z.length-1&&!W,X=z.slice(0,K+1).join("/");let ee=G.children.find(ue=>ue.name===H&&ue.kind===(q?"file":"folder"));ee||(ee={name:H,path:X,kind:q?"file":"folder",status:q?R.status:void 0,children:[]},G.children.push(ee)),G=ee}}return P.children}const E=F(()=>x(s.changes)),S=Z(new Set);function M($){return!S.value.has($)}const _=F(()=>{const $=[];function P(O,R){for(const W of O)$.push({node:W,depth:R}),W.kind==="folder"&&M(W.path)&&P(W.children,R+1)}return P(E.value,0),$});function N($){const P=new Set(S.value);P.has($.path)?P.delete($.path):P.add($.path),S.value=P}function D($){return`calc(var(--tree-base-indent) + ${$} * var(--tree-indent-step))`}function T($){return{paddingLeft:D($),"--tree-depth":String($)}}return($,P)=>(b(),I("div",MOe,[p.value?(b(),I(Be,{key:0},[V(h(Uc),{title:h(n)("diff.title"),closable:e.closable,"close-label":h(n)("diff.close"),onClose:k},{default:he(()=>[V(h(gn),{text:e.selectedDiffPath??""},{default:he(()=>[C("span",IOe,B(u(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),C("div",EOe,[e.hideBack?ne("",!0):(b(),fe(h(jt),{key:0,variant:"ghost",size:"sm",onClick:w},{default:he(()=>[V(h(Ce),{name:"arrow-left",size:"sm"}),C("span",TOe,B(h(n)("diff.back")),1)]),_:1}))]),V(ys,{name:"diff-content",mode:"out-in"},{default:he(()=>[m.value?(b(),I("div",LOe,[V(h(Bi),{size:"md"}),C("span",null,B(h(n)("diff.loading")),1)])):g.value.length>0?(b(),I("div",NOe,[V(al,{lines:g.value,path:e.selectedDiffPath??void 0,"line-numbers":"",framed:!1,"full-texts":e.fullTexts??null},null,8,["lines","path","full-texts"])])):(b(),I("div",FOe,B(e.emptyFile?h(n)("diff.emptyFile"):h(n)("diff.noDiff")),1))]),_:1})],64)):(b(),I(Be,{key:1},[V(h(Uc),{title:h(n)("diff.title"),closable:e.closable,"close-label":h(n)("diff.close"),onClose:k},{default:he(()=>[C("span",BOe,B(i(e.changes.length)),1),V(h(wo),{"model-value":A.value,size:"sm",options:[{value:"list",label:h(n)("diff.list"),icon:"list"},{value:"tree",label:h(n)("diff.tree"),icon:"tree-view"}],"onUpdate:modelValue":v},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),C("div",$Oe,[c.value?(b(),I(Be,{key:0},[C("span",DOe,[V(h(Ce),{class:"br-icon",name:"git-fork",size:"sm"}),C("span",ROe,B(h(n)("diff.branch")),1)]),C("span",zOe,B(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(b(),I("span",OOe,[V(h(gn),{text:h(n)("diff.aheadTitle")},{default:he(()=>[e.gitInfo.ahead>0?(b(),I("span",POe,"↑"+B(e.gitInfo.ahead),1)):ne("",!0)]),_:1},8,["text"]),V(h(gn),{text:h(n)("diff.behindTitle")},{default:he(()=>[e.gitInfo.behind>0?(b(),I("span",jOe,"↓"+B(e.gitInfo.behind),1)):ne("",!0)]),_:1},8,["text"])])):ne("",!0)],64)):(b(),I("span",HOe,B(h(n)("diff.empty")),1))]),d.value&&A.value==="list"?(b(),fe(h(sA),{key:0,class:"ch-list"},{default:he(()=>[C("div",WOe,[(b(!0),I(Be,null,yt(e.changes,O=>(b(),fe(h(gn),{key:O.path,text:O.path},{default:he(()=>[C("button",{type:"button",class:"ch-row",onClick:R=>y(O.path)},[C("span",{class:De(["badge",r(O.status)])},B(a(O.status)),3),C("span",UOe,B(u(O.path)),1)],8,qOe)]),_:2},1032,["text"]))),128))])]),_:1})):d.value&&A.value==="tree"?(b(),fe(h(sA),{key:1,class:"ch-list ch-tree"},{default:he(()=>[V(QI,{name:"tree-collapse",tag:"ul",class:"tree-list ch-list-content"},{default:he(()=>[(b(!0),I(Be,null,yt(_.value,({node:O,depth:R})=>(b(),I("li",{key:O.path,class:"tree-node"},[O.kind==="folder"?(b(),I("button",{key:0,type:"button",class:"tree-row tree-folder",style:Vt(T(R)),onClick:W=>N(O)},[V(h(Ce),{class:"tree-icon",name:"folder-solid",size:"sm"}),C("span",VOe,B(O.name),1)],12,KOe)):(b(),fe(h(gn),{key:1,text:O.path},{default:he(()=>[C("button",{type:"button",class:"tree-row tree-file",style:Vt(T(R)),onClick:W=>y(O.path)},[C("span",{class:De(["badge",r(O.status)])},B(a(O.status)),3),C("span",GOe,B(O.name),1)],12,ZOe)]),_:2},1032,["text"]))]))),128))]),_:1})]),_:1})):c.value?(b(),I("div",QOe,[C("span",YOe,[V(h(Ce),{name:"check",size:"lg"})]),Ue(" "+B(h(n)("diff.clean")),1)])):(b(),I("div",JOe,B(h(n)("diff.empty")),1))],64))]))}}),ePe=vt(XOe,[["__scopeId","data-v-7d5ab9c7"]]),tPe={class:"td"},nPe={class:"td-path"},iPe={class:"td-body"},sPe={key:1,class:"td-empty"},oPe=tt({__name:"TurnDiffPanel",props:{change:{},cwd:{},closable:{type:Boolean}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=F(()=>{const a=n.cwd?av(n.change.path,n.cwd):null;return r(a??n.change.path)});function r(a,u=48){return!a||a.length<=u?a:"…"+a.slice(a.length-u+1)}const l=F(()=>n.change.diff!==null&&n.change.diff.length>0);return(a,u)=>(b(),I("div",tPe,[V(h(Uc),{title:h(s)("conversation.turnFiles.diffTitle"),closable:e.closable,"close-label":h(s)("filePreview.close"),onClose:u[1]||(u[1]=c=>i("close"))},{default:he(()=>[V(h(gn),{text:e.change.path},{default:he(()=>[C("span",nPe,B(o.value),1)]),_:1},8,["text"]),V(h(rn),{size:"sm",label:h(s)("conversation.turnFiles.openFile"),tooltip:h(s)("conversation.turnFiles.openFile"),onClick:u[0]||(u[0]=c=>i("openFile",e.change.path))},{default:he(()=>[V(h(Ce),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])]),_:1},8,["title","closable","close-label"]),C("div",iPe,[l.value?(b(),fe(al,{key:0,lines:e.change.diff,path:e.change.path,framed:!1},null,8,["lines","path"])):(b(),I("div",sPe,[C("p",null,B(h(s)("conversation.turnFiles.diffUnavailable")),1),V(h(jt),{variant:"ghost",size:"sm",onClick:u[2]||(u[2]=c=>i("openFile",e.change.path))},{default:he(()=>[Ue(B(h(s)("conversation.turnFiles.openFile")),1)]),_:1})]))])]))}}),rPe=vt(oPe,[["__scopeId","data-v-fdd0bc05"]]);function KD(e,t){let n=null;pn(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,kt(()=>{const i=t?.value??e.value;try{i?.focus()}catch{}})}),Gn(()=>{const i=n;if(n=null,!(!i||typeof document>"u"||!document.contains(i)))try{i.focus()}catch{}})}const lPe={class:"search-wrap"},aPe=["aria-label"],uPe=["aria-label"],cPe=["aria-pressed","onClick"],dPe={key:1,class:"state-row"},fPe={key:2,class:"state-row unavail"},hPe=["aria-label"],pPe=["aria-selected","onClick","onMouseenter"],gPe={class:"model-main"},mPe={class:"model-name"},vPe={class:"model-meta"},yPe={class:"model-side"},bPe={key:0,class:"empty"},kPe={class:"footer-hint","aria-hidden":"true"},APe=tt({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=F(()=>new Set(i.starredIds??[]));function r(D){return o.value.has(D)}const l=Z(""),a=Z(null),u=Z(null),c=Z(null),d=Z("all"),f={image_in:"model.capabilityImageInput",video_in:"model.capabilityVideoInput",tool_use:"model.capabilityToolUse",thinking:"model.capabilityThinking",always_thinking:"model.capabilityAlwaysThinking"};function p(D){const T=f[D];return T?n(T):D.replaceAll("_"," ")}function g(D){const T=[D.provider,n("model.contextSuffix",{size:Ia(D.maxContextSize)})];for(const $ of D.capabilities??[])T.push(p($));return T.join(" · ")}KD(u,a);const m=F(()=>{const D=new Set,T=[{id:"all",label:n("model.allTab")}];for(const $ of i.models)D.has($.provider)||(D.add($.provider),T.push({id:$.provider,label:$.provider}));return T}),y=F(()=>{const D=l.value.toLowerCase().trim(),T=i.models.filter($=>{if(d.value!=="all"&&$.provider!==d.value)return!1;const P=($.displayName??$.model).toLowerCase().includes(D),O=$.provider.toLowerCase().includes(D),R=$.id.toLowerCase().includes(D);return!D||P||O||R});return d.value!=="all"?T:T.sort(($,P)=>{const O=r($.id)?1:0;return(r(P.id)?1:0)-O})}),w=F(()=>y.value),k=Z(0);Qe([l,d],()=>{k.value=0}),Qe(m,D=>{D.some(T=>T.id===d.value)||(d.value="all")}),Qe(w,D=>{k.value=Math.min(k.value,Math.max(D.length-1,0))}),Qe(k,async()=>{await kt(),c.value?.querySelector(".model-row.is-selected")?.scrollIntoView({block:"nearest"})});const{handleCompositionStart:A,handleCompositionEnd:v,isComposingKeyEvent:x}=Kr();function E(D){if(!x(D)){if(D.key==="Escape"){s("close");return}if(D.key==="ArrowDown")D.preventDefault(),k.value=Math.min(k.value+1,w.value.length-1);else if(D.key==="ArrowUp")D.preventDefault(),k.value=Math.max(k.value-1,0);else if(D.key==="Enter"){const T=w.value[k.value];T&&s("select",T.id)}}}pn(()=>{document.addEventListener("keydown",E)}),An(()=>{document.removeEventListener("keydown",E)});function S(D){s("select",D)}function M(){l.value="",a.value?.focus()}function _(D){return w.value.indexOf(D)}function N(D){d.value=D}return(D,T)=>(b(),fe(h(La),{open:!0,"close-on-esc":!1,title:h(n)("model.title"),size:"lg",height:"fixed",padded:!1,onClose:T[1]||(T[1]=$=>s("close"))},{default:he(()=>[C("div",{ref_key:"dialogRef",ref:u,class:"mp"},[C("div",lPe,[V(h(io),{ref_key:"searchRef",ref:a,modelValue:l.value,"onUpdate:modelValue":T[0]||(T[0]=$=>l.value=$),placeholder:h(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:"",onCompositionstart:h(A),onCompositionend:h(v)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),V(h(gn),{text:h(n)("model.clearSearch")},{default:he(()=>[C("button",{type:"button",class:De(["search-clear",{"is-on":l.value.length>0}]),tabindex:"-1","aria-label":h(n)("model.clearSearch"),onClick:M},[V(h(Ce),{name:"close",size:"sm"})],10,aPe)]),_:1},8,["text"])]),m.value.length>1?(b(),I("div",{key:0,class:"chip-strip","aria-label":h(n)("model.providerTabs")},[(b(!0),I(Be,null,yt(m.value,$=>(b(),I("button",{key:$.id,type:"button",class:De(["chip",{"is-active":$.id===d.value}]),"aria-pressed":$.id===d.value,onClick:P=>N($.id)},B($.label),11,cPe))),128))],8,uPe)):ne("",!0),e.loading?(b(),I("div",dPe,[V(h(Bi),{size:"sm"}),C("span",null,B(h(n)("model.loading")),1)])):e.unavailable?(b(),I("div",fPe,[V(h(Ce),{name:"alert-triangle",size:"lg"}),C("span",null,B(h(n)("model.unavailable")),1)])):(b(),I("div",{key:3,ref_key:"listRef",ref:c,class:"model-list",role:"listbox","aria-label":h(n)("model.title")},[(b(!0),I(Be,null,yt(w.value,$=>(b(),I("div",{key:$.id,class:De(["model-row",{"is-current":$.id===e.current,"is-selected":_($)===k.value}]),role:"option","aria-selected":$.id===e.current,onClick:P=>S($.id),onMouseenter:P=>k.value=_($)},[C("span",gPe,[C("span",mPe,B($.displayName??$.model),1),C("span",vPe,B(g($)),1)]),C("span",yPe,[$.id===e.current?(b(),fe(h(Ce),{key:0,class:"model-check",name:"check",size:"sm"})):ne("",!0),V(h(rn),{class:De(["model-star",{"is-starred":r($.id)}]),size:"sm",label:r($.id)?h(n)("model.unstarTitle"):h(n)("model.starTitle"),tooltip:r($.id)?h(n)("model.unstarTitle"):h(n)("model.starTitle"),onClick:It(P=>s("toggle-star",$.id),["stop"])},{default:he(()=>[r($.id)?(b(),fe(h(Ce),{key:0,name:"star",size:"md"})):(b(),fe(h(Ce),{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["class","label","tooltip","onClick"])])],42,pPe))),128)),w.value.length===0?(b(),I("div",bPe,B(i.models.length===0?h(n)("model.emptyNoModels"):h(n)("model.emptyNoMatch")),1)):ne("",!0)],8,hPe)),C("div",kPe,[V(h(Aa),{keys:["↑","↓"]}),C("span",null,B(h(n)("model.hintNavigate")),1),T[2]||(T[2]=C("span",{class:"hint-dot"},"·",-1)),V(h(Aa),{keys:["Enter"]}),C("span",null,B(h(n)("model.hintSelect")),1),T[3]||(T[3]=C("span",{class:"hint-dot"},"·",-1)),V(h(Aa),{keys:["Esc"]}),C("span",null,B(h(n)("model.hintClose")),1)])],512)]),_:1},8,["title"]))}}),CPe=vt(APe,[["__scopeId","data-v-3ba22330"]]),wPe={key:0,class:"center-body"},xPe={class:"center-text"},_Pe={key:1,class:"nb"},SPe={class:"nb-lead"},MPe=["href"],IPe={class:"nb-code-row"},EPe=["title"],TPe={class:"nb-status"},LPe={class:"nb-status-text"},NPe={class:"nb-countdown"},FPe={key:2,class:"center-body"},BPe={class:"center-text success-text"},$Pe={class:"center-hint"},DPe={class:"center-body"},RPe={class:"center-text err-text"},zPe={class:"center-hint"},OPe={class:"actions"},PPe={class:"center-body"},jPe={class:"center-text warn-text"},HPe={class:"center-hint"},WPe={class:"actions"},qPe=tt({__name:"LoginDialog",props:{onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["success","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=Z(!0),s=t,o=e,{step:r,pollError:l,flow:a,secondsLeft:u,startFlow:c,cancelFlow:d}=r$({onStartOAuthLogin:o.onStartOAuthLogin,onPollOAuthLogin:o.onPollOAuthLogin,onCancelOAuthLogin:o.onCancelOAuthLogin,onSuccess:()=>{s("success"),s("close")}}),f=Z(!1);pn(async()=>{await c()});async function p(){!a.value||!await ro(a.value.verificationUriComplete)||(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}async function g(){d(),s("close")}function m(y){const w=Math.floor(y/60),k=y%60;return`${w}:${String(k).padStart(2,"0")}`}return(y,w)=>(b(),fe(h(La),{open:i.value,"onUpdate:open":w[0]||(w[0]=k=>i.value=k),title:h(n)("login.title"),"close-on-overlay":!1,onClose:g},{default:he(()=>[h(r)==="starting"?(b(),I("div",wPe,[V(h(Bi),{size:"md"}),C("span",xPe,B(h(n)("login.starting")),1)])):h(r)==="device-code"&&h(a)?(b(),I("div",_Pe,[C("div",SPe,B(h(n)("login.lead")),1),C("a",{class:"nb-primary",href:h(a).verificationUriComplete,target:"_blank",rel:"noopener noreferrer"},[Ue(B(h(n)("login.authorizeInBrowser"))+" ",1),V(h(Ce),{name:"external-link",size:"sm"})],8,MPe),C("div",IPe,[C("span",{class:"nb-link",title:h(a).verificationUriComplete},B(h(a).verificationUriComplete),9,EPe),V(h(jt),{class:De(["nb-copy",{"is-copied":f.value}]),variant:"secondary",size:"sm",onClick:p},{default:he(()=>[f.value?(b(),I(Be,{key:0},[V(h(Ce),{name:"check",size:"sm"}),Ue(" "+B(h(n)("login.copied")),1)],64)):(b(),I(Be,{key:1},[V(h(Ce),{name:"copy",size:"sm"}),Ue(" "+B(h(n)("login.copyLink")),1)],64))]),_:1},8,["class"])]),C("div",TPe,[V(h(Bi),{size:"sm",label:h(n)("login.waitingAuth")},null,8,["label"]),C("span",LPe,B(h(n)("login.waitingAutoClose")),1),C("span",NPe,B(m(h(u))),1)])])):h(r)==="success"?(b(),I("div",FPe,[V(h(cf),{kind:"success"}),C("span",BPe,B(h(n)("login.success")),1),C("span",$Pe,B(h(n)("login.successHint")),1)])):h(r)==="expired"?(b(),I(Be,{key:3},[C("div",DPe,[V(h(cf),{kind:"expired"}),C("span",RPe,B(h(n)("login.expiredTitle")),1),C("span",zPe,B(h(n)("login.expiredHint")),1)]),C("div",OPe,[V(h(jt),{variant:"primary",onClick:h(c)},{default:he(()=>[Ue(B(h(n)("login.retry")),1)]),_:1},8,["onClick"]),V(h(jt),{variant:"secondary",onClick:g},{default:he(()=>[Ue(B(h(n)("login.closeBtn")),1)]),_:1})])],64)):h(r)==="error"?(b(),I(Be,{key:4},[C("div",PPe,[V(h(cf),{kind:"error"}),C("span",jPe,B(h(l)?h(n)("login.pollErrorTitle"):h(n)("login.errorTitle")),1),C("span",HPe,B(h(l)?h(n)("login.pollErrorHint"):h(n)("login.errorHint")),1)]),C("div",WPe,[V(h(jt),{variant:"primary",onClick:h(c)},{default:he(()=>[Ue(B(h(n)("login.retry")),1)]),_:1},8,["onClick"]),V(h(jt),{variant:"secondary",onClick:g},{default:he(()=>[Ue(B(h(n)("login.closeBtn")),1)]),_:1})])],64)):ne("",!0)]),_:1},8,["open","title"]))}}),UPe=vt(qPe,[["__scopeId","data-v-0b06fca3"]]),VD=tt({__name:"LanguageSwitcher",props:{size:{default:"md"}},setup(e){const{locale:t}=Bt(),n=u2.map(s=>({value:s.code,label:s.label}));function i(s){t.value!==s&&Jb(s)}return(s,o)=>(b(),fe(h(wo),{"model-value":h(t),options:h(n),size:e.size,"onUpdate:modelValue":i},null,8,["model-value","options","size"]))}}),KPe={class:"msg"},VPe={class:"pf-field"},ZPe={class:"pf-field-label"},GPe={class:"pf-field"},QPe={class:"pf-field-label"},YPe={class:"pf-field"},JPe={class:"pf-field-label"},XPe={class:"pf-key-wrap"},eje={class:"pf-field"},tje={class:"pf-field-label"},nje={class:"pf-field"},ije={class:"pf-field-label"},sje={class:"pf-models"},oje={key:0,class:"pf-models-empty"},rje={class:"pf-model-grid pf-model-head"},lje={key:1},aje={key:0},uje={class:"pf-foot"},cje={key:0,class:"pf-managed-note"},dje={class:"pf-confirm-msg"},fje=tt({__name:"ProviderForm",props:{mode:{},provider:{},guard:{type:Boolean}},emits:["dirtyChange","guardStay","guardDiscard","added","saved","deleting","deleted","cancel"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Fa(),r=Ts({id:"",type:"openai",apiKey:"",baseUrl:"",models:[z0()]}),l=Z(""),a=Z(!1),u=Z(!1),c=Z(!1),d=F(()=>n.mode==="add"),f=F(()=>n.provider!==void 0&&gL(n.provider)),p=F(()=>{const $=n.provider;return $===void 0?0:b3($,o.config.value?.models).length}),g=F(()=>f.value&&p.value===0),m=F(()=>pte.map($=>({value:$,label:s(`providers.types.${$}`)}))),y=F(()=>f.value?s("providers.apiKeyManaged"):!d.value&&n.provider?.hasApiKey===!0?s("providers.apiKeySet"):"sk-…");function w(){l.value="",u.value=!1;const $=n.provider;if(d.value||$===void 0){r.id="",r.type="openai",r.apiKey="",r.baseUrl="",r.models=[z0()];return}r.id=$.id,r.type=$.type,r.apiKey="",r.baseUrl=$.baseUrl??"";const P=b3($,o.config.value?.models);r.models=P.length>0?P:[z0()]}pn(()=>{w(),v()});const k=Z(!1),A=Z(!1);async function v(){const $=n.provider;if(!(d.value||$===void 0||f.value||$.hasApiKey!==!0))try{const P=await o.getProvider($.id);if(A.value)return;P.apiKey!==void 0&&P.apiKey!==""&&(r.apiKey=P.apiKey,k.value=!0)}catch{}}function x(){i("dirtyChange",!0)}const E=Z(!1),S=Z();function M($){l.value=$,kt(()=>S.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}async function _(){if(a.value)return;const $=gte(r,{requireApiKey:d.value,requireBaseUrl:d.value});if($!==null){M(s(`providers.error.${$}`));return}l.value="",a.value=!0;try{if(d.value){const P=await o.addProvider(mte(r));if(P!==null){M(P);return}i("dirtyChange",!1),o.notify({severity:"success",title:s("providers.added")}),i("added",r.id.trim())}else{const P=n.provider;if(P===void 0)return;const O=o.config.value?.providers?.[P.id]?.defaultModel,R=await o.updateProvider(P.id,vte(r,P,{includeBlankApiKey:k.value,existingDefaultModel:O}));if(R!==null){M(R);return}await o.checkAuth(),o.notify({severity:"success",title:s("providers.saved")}),i("dirtyChange",!1),i("saved",r.id.trim())}}finally{a.value=!1}}async function N(){const $=n.provider;if(!($===void 0||c.value)){c.value=!0,i("deleting"),await new Promise(P=>setTimeout(P,300));try{if(await o.deleteProvider($.id)===null){u.value=!1;return}i("dirtyChange",!1),i("deleted",$.id)}finally{c.value=!1}}}function D(){r.models.push(z0()),x()}function T($){r.models.length<=1||(r.models.splice($,1),x())}return($,P)=>(b(),I("div",{class:"pf-form",onInput:x},[e.guard?(b(),fe(h(Ac),{key:0,variant:"warning",class:"pf-guard"},{default:he(()=>[C("span",KPe,B(h(s)("providers.unsavedGuard")),1),V(h(jt),{variant:"secondary",size:"sm",onClick:P[0]||(P[0]=O=>i("guardStay"))},{default:he(()=>[Ue(B(h(s)("providers.guardStay")),1)]),_:1}),V(h(jt),{variant:"danger",size:"sm",onClick:P[1]||(P[1]=O=>i("guardDiscard"))},{default:he(()=>[Ue(B(h(s)("providers.guardDiscard")),1)]),_:1})]),_:1})):ne("",!0),l.value?(b(),I("div",{key:1,ref_key:"errorBox",ref:S},[V(h(Ac),{variant:"danger"},{default:he(()=>[Ue(B(l.value),1)]),_:1})],512)):ne("",!0),C("div",VPe,[C("label",ZPe,[Ue(B(h(s)("providers.fieldId")),1),P[11]||(P[11]=C("span",{class:"req"}," *",-1))]),V(h(io),{modelValue:r.id,"onUpdate:modelValue":P[2]||(P[2]=O=>r.id=O),placeholder:"my-openai",disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled"])]),C("div",GPe,[C("label",QPe,[Ue(B(h(s)("providers.fieldType")),1),P[12]||(P[12]=C("span",{class:"req"}," *",-1))]),V(h(e3),{"model-value":r.type,options:m.value,disabled:f.value,"onUpdate:modelValue":P[3]||(P[3]=O=>{r.type=O,x()})},null,8,["model-value","options","disabled"])]),C("div",YPe,[C("label",JPe,[Ue(B(h(s)("providers.fieldApiKey")),1),P[13]||(P[13]=C("span",{class:"req"}," *",-1))]),C("div",XPe,[V(h(io),{modelValue:r.apiKey,"onUpdate:modelValue":P[4]||(P[4]=O=>r.apiKey=O),type:E.value?"text":"password",placeholder:y.value,disabled:f.value,autocomplete:"off",spellcheck:"false",onInput:P[5]||(P[5]=O=>A.value=!0)},null,8,["modelValue","type","placeholder","disabled"]),f.value?ne("",!0):(b(),fe(h(rn),{key:0,class:"pf-key-eye",size:"sm",label:h(s)(E.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:h(s)(E.value?"providers.hideApiKey":"providers.showApiKey"),onClick:P[6]||(P[6]=O=>E.value=!E.value)},{default:he(()=>[V(h(Ce),{name:E.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"]))])]),C("div",eje,[C("label",tje,[Ue(B(h(s)("providers.fieldBaseUrl")),1),P[14]||(P[14]=C("span",{class:"req"}," *",-1))]),V(h(io),{modelValue:r.baseUrl,"onUpdate:modelValue":P[7]||(P[7]=O=>r.baseUrl=O),placeholder:h(s)("providers.baseUrlPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder","disabled"])]),C("div",nje,[C("label",ije,[Ue(B(h(s)("providers.fieldModels")),1),P[15]||(P[15]=C("span",{class:"req"}," *",-1))]),C("div",sje,[g.value?(b(),I("div",oje,B(h(s)("providers.noModels")),1)):(b(),I(Be,{key:1},[C("div",rje,[C("span",null,[Ue(B(h(s)("providers.colModelId")),1),P[16]||(P[16]=C("span",{class:"req"}," *",-1))]),C("span",null,[Ue(B(h(s)("providers.colContext")),1),P[17]||(P[17]=C("span",{class:"req"}," *",-1))]),C("span",null,B(h(s)("providers.colDisplayName")),1),P[18]||(P[18]=C("span",null,null,-1))]),(b(!0),I(Be,null,yt(r.models,(O,R)=>(b(),I("div",{key:R,class:"pf-model-grid"},[V(h(io),{modelValue:O.model,"onUpdate:modelValue":W=>O.model=W,placeholder:h(s)("providers.modelIdPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),V(h(io),{modelValue:O.maxContextSize,"onUpdate:modelValue":W=>O.maxContextSize=W,inputmode:"numeric",placeholder:h(s)("providers.modelContextPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),V(h(io),{modelValue:O.displayName,"onUpdate:modelValue":W=>O.displayName=W,placeholder:h(s)("providers.modelNamePlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),f.value?(b(),I("span",lje)):(b(),fe(h(rn),{key:0,size:"sm",label:h(s)("providers.removeModel"),tooltip:h(s)("providers.removeModel"),disabled:r.models.length<=1,onClick:W=>T(R)},{default:he(()=>[V(h(Ce),{name:"trash",size:"sm"})]),_:1},8,["label","tooltip","disabled","onClick"]))]))),128)),f.value?ne("",!0):(b(),I("div",aje,[V(h(jt),{variant:"ghost",size:"sm",onClick:D},{default:he(()=>[V(h(Ce),{name:"plus",size:"sm"}),Ue(" "+B(h(s)("providers.addModel")),1)]),_:1})]))],64))])]),C("div",uje,[f.value?(b(),I("span",cje,B(h(s)("providers.managedHint")),1)):d.value?(b(),I(Be,{key:1},[V(h(jt),{variant:"secondary",size:"sm",onClick:P[8]||(P[8]=O=>i("cancel"))},{default:he(()=>[Ue(B(h(s)("common.cancel")),1)]),_:1}),V(h(jt),{variant:"primary",size:"sm",disabled:a.value,onClick:_},{default:he(()=>[Ue(B(h(s)("providers.addProvider")),1)]),_:1},8,["disabled"])],64)):u.value&&n.provider!==void 0?(b(),I(Be,{key:2},[C("span",dje,B(h(s)("providers.deleteConfirm",{id:n.provider.id,count:p.value})),1),P[19]||(P[19]=C("span",{class:"spacer"},null,-1)),V(h(jt),{variant:"secondary",size:"sm",disabled:c.value,onClick:P[9]||(P[9]=O=>u.value=!1)},{default:he(()=>[Ue(B(h(s)("common.cancel")),1)]),_:1},8,["disabled"]),V(h(jt),{variant:"danger",size:"sm",disabled:c.value,onClick:N},{default:he(()=>[Ue(B(h(s)("providers.deleteConfirmYes")),1)]),_:1},8,["disabled"])],64)):(b(),I(Be,{key:3},[V(h(jt),{variant:"danger-soft",size:"sm",onClick:P[10]||(P[10]=O=>u.value=!0)},{default:he(()=>[Ue(B(h(s)("providers.deleteProvider")),1)]),_:1}),P[20]||(P[20]=C("span",{class:"spacer"},null,-1)),V(h(jt),{variant:"primary",size:"sm",disabled:a.value,onClick:_},{default:he(()=>[Ue(B(h(s)("providers.save")),1)]),_:1},8,["disabled"])],64))])],32))}}),ZD=vt(fje,[["__scopeId","data-v-ac0597e3"]]),hje={class:"af"},pje={class:"msg"},gje={key:2,class:"af-catalog"},mje={key:0,class:"af-center"},vje={key:1,class:"af-error"},yje={class:"af-list"},bje=["disabled","onClick"],kje={class:"af-entry-name"},Aje={key:1,class:"af-entry-reason"},Cje={key:2,class:"af-entry-count"},wje={key:0,class:"af-empty"},xje={class:"af-field"},_je={class:"af-label"},Sje={class:"af-field"},Mje={class:"af-label"},Ije={class:"af-key-wrap"},Eje={key:0,class:"af-field"},Tje={class:"af-label"},Lje={class:"af-note"},Nje={class:"af-foot"},Fje={class:"af-hint"},Bje={class:"af-field"},$je={class:"af-label"},Dje={class:"af-field"},Rje={class:"af-label"},zje={class:"af-key-wrap"},Oje={class:"af-foot"},Pje={class:"af-manual"},jje=tt({__name:"AddProviderFlow",props:{guard:{type:Boolean}},emits:["dirtyChange","guardStay","guardDiscard","added","cancel"],setup(e,{emit:t}){const n=t,{t:i,te:s}=Bt(),o=Fa(),r=Z("catalog"),l=F(()=>[{value:"catalog",label:i("providers.catalog.sourceCatalog")},{value:"registry",label:i("providers.catalog.sourceRegistry")},{value:"manual",label:i("providers.catalog.sourceManual")}]),a=Z("loading"),u=Z([]);async function c(){a.value="loading";const z=await o.loadCatalogProviders();z.kind==="ok"?(u.value=z.items,a.value="ready"):z.kind==="unsupported"?(a.value="unsupported",r.value==="catalog"&&(r.value="manual")):a.value="error"}pn(c);const d=Z(""),f=F(()=>{const z=d.value.trim().toLowerCase();return z===""?u.value:u.value.filter(G=>G.name.toLowerCase().includes(z)||G.id.toLowerCase().includes(z))});function p(z){const G=z.rejectReason;return G!==null&&s(`providers.catalog.rejectReason.${G}`)?i(`providers.catalog.rejectReason.${G}`):i("providers.catalog.rejected")}const g=Z(null),m=Z({id:"",apiKey:"",baseUrl:""}),y=Z(!1),w=Z(!1),k=Z("");function A(z){g.value=z,m.value={id:z.id,apiKey:"",baseUrl:""},k.value="",y.value=!1}function v(){g.value=null,k.value="",n("dirtyChange",!1)}function x(){n("dirtyChange",!0)}const E=F(()=>{if(g.value===null)return!1;const G=m.value.id.trim();return G!==""&&o.providers.value.some(K=>K.id===G)}),S=Z();function M(z){k.value=z,kt(()=>S.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}function _(){const z=m.value,G=z.id.trim();return G===""?i("providers.error.idRequired"):hL.test(G)?z.apiKey.trim()===""?i("providers.error.apiKeyRequired"):g.value?.needsBaseUrl===!0&&z.baseUrl.trim()===""?i("providers.error.baseUrlRequired"):null:i("providers.error.idInvalid")}async function N(){const z=g.value;if(z===null||w.value)return;const G=_();if(G!==null){M(G);return}k.value="",w.value=!0;try{const K=m.value,H=K.id.trim(),q=K.baseUrl.trim(),X=await o.importCatalogProvider({catalogId:z.id,apiKey:K.apiKey.trim(),...q===""?{}:{baseUrl:q},...H===z.id?{}:{id:H}});if(X!==null){M(X);return}o.notify({severity:"success",title:i("providers.added")}),n("dirtyChange",!1),n("added",H)}finally{w.value=!1}}const D=Z({url:"",apiKey:""}),T=Z(!1),$=Z(!1),P=Z(""),O=Z();function R(z){P.value=z,kt(()=>O.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}async function W(){if($.value)return;const z=D.value.url.trim();if(z===""){R(i("providers.error.registryUrlRequired"));return}P.value="",$.value=!0;try{const G=D.value.apiKey.trim(),K=await o.importCustomRegistry({url:z,...G===""?{}:{apiKey:G}});if(typeof K=="string"){R(K);return}o.notify({severity:"success",title:i("providers.catalog.registryImported",{count:K.providers.length})}),n("dirtyChange",!1);const H=K.providers[0];H!==void 0?n("added",H.id):n("cancel")}finally{$.value=!1}}return(z,G)=>(b(),I("div",hje,[e.guard?(b(),fe(h(Ac),{key:0,variant:"warning",class:"af-guard"},{default:he(()=>[C("span",pje,B(h(i)("providers.unsavedGuard")),1),V(h(jt),{variant:"secondary",size:"sm",onClick:G[0]||(G[0]=K=>n("guardStay"))},{default:he(()=>[Ue(B(h(i)("providers.guardStay")),1)]),_:1}),V(h(jt),{variant:"danger",size:"sm",onClick:G[1]||(G[1]=K=>n("guardDiscard"))},{default:he(()=>[Ue(B(h(i)("providers.guardDiscard")),1)]),_:1})]),_:1})):ne("",!0),a.value!=="unsupported"?(b(),fe(h(wo),{key:1,modelValue:r.value,"onUpdate:modelValue":G[2]||(G[2]=K=>r.value=K),size:"sm",options:l.value},null,8,["modelValue","options"])):ne("",!0),a.value!=="unsupported"?Bn((b(),I("div",gje,[a.value==="loading"?(b(),I("div",mje,[V(h(Bi),{size:"sm"}),C("span",null,B(h(i)("providers.catalog.loading")),1)])):a.value==="error"?(b(),I("div",vje,[V(h(Ac),{variant:"danger"},{default:he(()=>[Ue(B(h(i)("providers.catalog.loadError")),1)]),_:1}),C("div",null,[V(h(jt),{variant:"secondary",size:"sm",onClick:c},{default:he(()=>[Ue(B(h(i)("providers.catalog.retry")),1)]),_:1})])])):g.value===null?(b(),I(Be,{key:2},[V(h(io),{modelValue:d.value,"onUpdate:modelValue":G[3]||(G[3]=K=>d.value=K),placeholder:h(i)("providers.catalog.searchPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"]),C("div",yje,[(b(!0),I(Be,null,yt(f.value,K=>(b(),I("button",{key:K.id,type:"button",class:"af-entry",disabled:K.rejected,onClick:H=>A(K)},[C("span",kje,B(K.name),1),K.wireType!==null?(b(),fe(h(Hl),{key:0,variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(K.wireType),1)]),_:2},1024)):ne("",!0),G[16]||(G[16]=C("span",{class:"grow"},null,-1)),K.rejected?(b(),I("span",Aje,B(p(K)),1)):(b(),I("span",Cje,B(h(i)("providers.modelCount",{count:K.models.length})),1))],8,bje))),128)),f.value.length===0?(b(),I("div",wje,B(h(i)("providers.catalog.empty")),1)):ne("",!0)])],64)):(b(),I("div",{key:3,class:"af-import",onInput:x},[C("button",{type:"button",class:"af-back",onClick:v},[V(h(Ce),{name:"arrow-left",size:"sm"}),Ue(" "+B(h(i)("providers.catalog.backToList")),1)]),C("div",xje,[C("label",_je,[Ue(B(h(i)("providers.fieldId")),1),G[17]||(G[17]=C("span",{class:"req"}," *",-1))]),V(h(io),{modelValue:m.value.id,"onUpdate:modelValue":G[4]||(G[4]=K=>m.value.id=K),autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),C("div",Sje,[C("label",Mje,[Ue(B(h(i)("providers.fieldApiKey")),1),G[18]||(G[18]=C("span",{class:"req"}," *",-1))]),C("div",Ije,[V(h(io),{modelValue:m.value.apiKey,"onUpdate:modelValue":G[5]||(G[5]=K=>m.value.apiKey=K),type:y.value?"text":"password",placeholder:"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type"]),V(h(rn),{class:"af-key-eye",size:"sm",label:h(i)(y.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:h(i)(y.value?"providers.hideApiKey":"providers.showApiKey"),onClick:G[6]||(G[6]=K=>y.value=!y.value)},{default:he(()=>[V(h(Ce),{name:y.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])])]),g.value.needsBaseUrl?(b(),I("div",Eje,[C("label",Tje,[Ue(B(h(i)("providers.fieldBaseUrl")),1),G[19]||(G[19]=C("span",{class:"req"}," *",-1))]),V(h(io),{modelValue:m.value.baseUrl,"onUpdate:modelValue":G[7]||(G[7]=K=>m.value.baseUrl=K),placeholder:h(i)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])])):ne("",!0),E.value?(b(),fe(h(Ac),{key:1,variant:"warning"},{default:he(()=>[Ue(B(h(i)("providers.catalog.overwriteWarning")),1)]),_:1})):ne("",!0),C("div",Lje,B(h(i)("providers.catalog.willImport",{count:g.value.models.length})),1),k.value?(b(),I("div",{key:2,ref_key:"importErrorBox",ref:S},[V(h(Ac),{variant:"danger"},{default:he(()=>[Ue(B(k.value),1)]),_:1})],512)):ne("",!0),C("div",Nje,[V(h(jt),{variant:"secondary",size:"sm",onClick:G[8]||(G[8]=K=>n("cancel"))},{default:he(()=>[Ue(B(h(i)("common.cancel")),1)]),_:1}),V(h(jt),{variant:"primary",size:"sm",disabled:w.value,onClick:N},{default:he(()=>[Ue(B(h(i)("providers.catalog.importAction")),1)]),_:1},8,["disabled"])])],32))],512)),[[rs,r.value==="catalog"]]):ne("",!0),Bn(C("div",{class:"af-registry",onInput:x},[C("div",Fje,B(h(i)("providers.catalog.registryHint")),1),C("div",Bje,[C("label",$je,[Ue(B(h(i)("providers.catalog.registryUrlLabel")),1),G[20]||(G[20]=C("span",{class:"req"}," *",-1))]),V(h(io),{modelValue:D.value.url,"onUpdate:modelValue":G[9]||(G[9]=K=>D.value.url=K),placeholder:"https://example.com/api.json",autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),C("div",Dje,[C("label",Rje,B(h(i)("providers.fieldApiKey")),1),C("div",zje,[V(h(io),{modelValue:D.value.apiKey,"onUpdate:modelValue":G[10]||(G[10]=K=>D.value.apiKey=K),type:T.value?"text":"password",placeholder:h(i)("providers.modelNamePlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","placeholder"]),V(h(rn),{class:"af-key-eye",size:"sm",label:h(i)(T.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:h(i)(T.value?"providers.hideApiKey":"providers.showApiKey"),onClick:G[11]||(G[11]=K=>T.value=!T.value)},{default:he(()=>[V(h(Ce),{name:T.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])])]),P.value?(b(),I("div",{key:0,ref_key:"registryErrorBox",ref:O},[V(h(Ac),{variant:"danger"},{default:he(()=>[Ue(B(P.value),1)]),_:1})],512)):ne("",!0),C("div",Oje,[V(h(jt),{variant:"secondary",size:"sm",onClick:G[12]||(G[12]=K=>n("cancel"))},{default:he(()=>[Ue(B(h(i)("common.cancel")),1)]),_:1}),V(h(jt),{variant:"primary",size:"sm",disabled:$.value,onClick:W},{default:he(()=>[Ue(B(h(i)("providers.catalog.importAction")),1)]),_:1},8,["disabled"])])],544),[[rs,r.value==="registry"]]),Bn(C("div",Pje,[V(ZD,{mode:"add",guard:!1,onDirtyChange:G[13]||(G[13]=K=>n("dirtyChange",K)),onAdded:G[14]||(G[14]=K=>n("added",K)),onCancel:G[15]||(G[15]=K=>n("cancel"))})],512),[[rs,r.value==="manual"]])]))}}),Hje=vt(jje,[["__scopeId","data-v-9e5ec0a8"]]),Wje={class:"pp"},qje={class:"pp-head"},Uje={class:"pp-title"},Kje={key:0,class:"pp-loading"},Vje={key:1,class:"pp-group"},Zje={class:"pp-add-label"},Gje={class:"pp-chev"},Qje={class:"pp-acc"},Yje={class:"pp-acc-in"},Jje={key:1,class:"pp-empty"},Xje=["onClick"],eHe={class:"grow"},tHe={class:"pp-id"},nHe={class:"pp-count"},iHe={class:"pp-chev"},sHe={class:"pp-acc"},oHe={class:"pp-acc-in"},vc="$add",rHe=tt({__name:"ProvidersPanel",setup(e){const{t}=Bt(),n=Fa(),i=Z(!0),s=Z(null),o=Z(null);let r=0;const l=Z(!1),a=Z(!1),u=Z(null),c=Z("");let d=0;const f=F(()=>[...n.providers.value].sort((E,S)=>E.id.localeCompare(S.id)));function p(E){return b3(E,n.config.value?.models).length}Qe(s,(E,S)=>{S!==null&&S!==E&&(o.value=S,window.clearTimeout(r),r=window.setTimeout(()=>{o.value=null},300)),l.value=!1}),Qe(l,E=>{E||(a.value=!1,u.value=null)}),An(()=>{window.clearTimeout(r),window.clearTimeout(d)});const g=Z(!1);Qe(s,E=>{E===vc?(g.value=!1,kt(()=>requestAnimationFrame(()=>{g.value=!0}))):g.value=!1}),pn(async()=>{i.value=!0;try{await Promise.all([n.loadProviders(),n.loadModels(),n.loadConfig()])}finally{i.value=!1}});function m(E){const S=s.value===E?null:E;if(l.value){u.value=S,a.value=!0;return}s.value=S}function y(){a.value=!1,u.value=null}function w(){a.value=!1,s.value=u.value,u.value=null}function k(E){c.value=E,window.clearTimeout(d),d=window.setTimeout(()=>{c.value=""},1200)}function A(E){s.value=E}function v(E){s.value=E,k(E)}function x(){s.value=null}return(E,S)=>(b(),I("section",Wje,[C("div",qje,[C("h3",Uje,B(h(t)("settings.tabs.providers")),1),V(h(jt),{variant:"secondary",size:"sm",onClick:S[0]||(S[0]=M=>m(vc))},{default:he(()=>[V(h(Ce),{name:"plus",size:"sm"}),Ue(" "+B(h(t)("providers.addProvider")),1)]),_:1})]),i.value?(b(),I("div",Kje,[V(h(Bi),{size:"sm"}),C("span",null,B(h(t)("providers.loading")),1)])):(b(),I("div",Vje,[s.value===vc||o.value===vc?(b(),I("div",{key:0,class:De(["pp-item pp-add-item",{open:s.value===vc&&g.value}])},[C("button",{type:"button",class:"pp-row pp-add-row",onClick:S[1]||(S[1]=M=>m(vc))},[C("span",Zje,B(h(t)("providers.addProvider")),1),S[6]||(S[6]=C("span",{class:"grow"},null,-1)),C("span",Gje,[V(h(Ce),{name:"chevron-right",size:"sm"})])]),C("div",Qje,[C("div",Yje,[V(Hje,{guard:a.value&&s.value===vc,onDirtyChange:S[2]||(S[2]=M=>l.value=M),onGuardStay:y,onGuardDiscard:w,onAdded:v,onCancel:S[3]||(S[3]=M=>s.value=null)},null,8,["guard"])])])],2)):ne("",!0),f.value.length===0?(b(),I("div",Jje,B(h(t)("providers.empty")),1)):ne("",!0),(b(!0),I(Be,null,yt(f.value,M=>(b(),I("div",{key:M.id,class:De(["pp-item",{open:s.value===M.id,flash:c.value===M.id}])},[C("button",{type:"button",class:"pp-row",onClick:_=>m(M.id)},[C("div",eHe,[C("span",tHe,B(M.id),1),V(h(Hl),{variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(M.type),1)]),_:2},1024),h(gL)(M)?(b(),fe(h(Hl),{key:0,variant:"info",size:"sm"},{default:he(()=>[Ue(B(h(t)("providers.managedBadge")),1)]),_:1})):ne("",!0)]),C("span",nHe,B(h(t)("providers.modelCount",{count:p(M)})),1),C("span",iHe,[V(h(Ce),{name:"chevron-right",size:"sm"})])],8,Xje),C("div",sHe,[C("div",oHe,[s.value===M.id||o.value===M.id?(b(),fe(ZD,{key:0,mode:"edit",provider:M,guard:a.value&&s.value===M.id,onDirtyChange:S[4]||(S[4]=_=>l.value=_),onGuardStay:y,onGuardDiscard:w,onSaved:A,onDeleting:S[5]||(S[5]=_=>s.value=null),onDeleted:x},null,8,["provider","guard"])):ne("",!0)])])],2))),128))]))]))}}),lHe=vt(rHe,[["__scopeId","data-v-9aa0e3a8"]]),aHe={class:"sec"},uHe={class:"sec-title"},cHe={class:"pu-group"},dHe={class:"pu-row"},fHe={class:"pu-main"},hHe={class:"pu-label"},pHe={class:"pu-hint"},gHe=tt({__name:"PlanUpgradeCard",setup(e){const{t}=Bt();return(n,i)=>(b(),I("section",aHe,[C("h3",uHe,B(h(t)("settings.planUsage.title")),1),C("div",cHe,[C("div",dHe,[C("span",fHe,[C("span",hHe,B(h(t)("settings.planUsage.freeTitle")),1),C("span",pHe,B(h(t)("settings.planUsage.freeHint")),1)]),V(h(jt),{variant:"primary",size:"sm",onClick:i[0]||(i[0]=s=>h(Cp)())},{default:he(()=>[Ue(B(h(t)("sidebar.upgrade")),1)]),_:1})])])]))}}),GD=vt(gHe,[["__scopeId","data-v-5711dff8"]]),mHe={class:"sec"},vHe={class:"sec-title"},yHe={class:"pu-group"},bHe={key:0,class:"pu-row pu-state"},kHe={key:1,class:"pu-row pu-state"},AHe={class:"pu-error-text"},CHe={key:2,class:"pu-row pu-state pu-empty"},wHe={class:"pu-main"},xHe={class:"pu-label"},_He={key:0,class:"pu-hint"},SHe={class:"pu-value"},MHe=["aria-valuenow","aria-valuemax"],IHe={key:0,class:"sec"},EHe={class:"sec-title"},THe={class:"pu-group"},LHe={class:"pu-row"},NHe={class:"pu-main"},FHe={class:"pu-label"},BHe={class:"pu-value"},$He={key:0,class:"pu-value-sub"},DHe={key:0,class:"pu-meter"},RHe={class:"pu-row"},zHe={class:"pu-main"},OHe={class:"pu-label"},PHe={class:"pu-value"},jHe={class:"pu-row"},HHe={class:"pu-main"},WHe={class:"pu-label"},qHe={class:"pu-value"},UHe={class:"pu-value-sub"},KHe=tt({__name:"PlanUsageCard",props:{onFetchUsage:{type:Function}},setup(e){const t=e,{t:n}=Bt(),i=Z(!0),s=Z(null);async function o(){i.value=!0;try{s.value=await t.onFetchUsage()}finally{i.value=!1}}pn(o);const r=F(()=>s.value?.kind==="ok"?s.value:null),l=F(()=>r.value?.extraUsage??null),a=F(()=>{const m=r.value;return m===null?[]:m.summary===null?m.limits:[m.summary,...m.limits]}),u=F(()=>a.value.length>0),c=F(()=>s.value?.kind==="error"?s.value.message:n("settings.planUsage.loadFailed")),d=F(()=>s.value?.kind==="error"&&(s.value.status===402||s.value.status===403)),f=F(()=>l.value!==null&&l.value.monthlyChargeLimitEnabled&&l.value.monthlyChargeLimitCents>0);function p(m,y){const w=hte(m,y);return`${w.symbol}${w.number}`}function g(m){return m.resetAt===void 0?"":fL(m.resetAt,n)}return(m,y)=>d.value?(b(),fe(GD,{key:0})):(b(),I(Be,{key:1},[C("section",mHe,[C("h3",vHe,B(h(n)("settings.planUsage.title")),1),C("div",yHe,[i.value?(b(),I("div",bHe,[V(h(Bi),{size:"sm"})])):r.value===null?(b(),I("div",kHe,[C("span",AHe,B(c.value),1),V(h(jt),{variant:"ghost",size:"sm",onClick:o},{default:he(()=>[Ue(B(h(n)("settings.planUsage.retry")),1)]),_:1})])):u.value?(b(!0),I(Be,{key:3},yt(a.value,(w,k)=>(b(),I("div",{key:k,class:"pu-row"},[C("span",wHe,[C("span",xHe,B(h(dL)(w,h(n))),1),g(w)?(b(),I("span",_He,B(g(w)),1)):ne("",!0)]),C("span",SHe,B(h(n)("settings.planUsage.usedPct",{pct:h(wg)(w.used,w.limit)})),1),C("span",{class:"pu-meter",role:"progressbar","aria-valuenow":w.used,"aria-valuemax":w.limit},[C("i",{class:De(`sev-${h(y3)(w.used,w.limit)}`),style:Vt({width:`${h(wg)(w.used,w.limit)}%`})},null,6)],8,MHe)]))),128)):(b(),I("div",CHe,B(h(n)("settings.planUsage.empty")),1))])]),l.value!==null?(b(),I("section",IHe,[C("h3",EHe,B(h(n)("settings.planUsage.boosterTitle")),1),C("div",THe,[C("div",LHe,[C("span",NHe,[C("span",FHe,B(h(n)("settings.planUsage.monthlyUsed")),1)]),C("span",BHe,[Ue(B(p(l.value.monthlyUsedCents,l.value.currency)),1),f.value?(b(),I("span",$He," / "+B(p(l.value.monthlyChargeLimitCents,l.value.currency)),1)):ne("",!0)]),f.value?(b(),I("span",DHe,[C("i",{class:De(`sev-${h(y3)(l.value.monthlyUsedCents,l.value.monthlyChargeLimitCents)}`),style:Vt({width:`${h(wg)(l.value.monthlyUsedCents,l.value.monthlyChargeLimitCents)}%`})},null,6)])):ne("",!0)]),C("div",RHe,[C("span",zHe,[C("span",OHe,B(h(n)("settings.planUsage.monthlyLimit")),1)]),C("span",PHe,[f.value?(b(),I(Be,{key:0},[Ue(B(p(l.value.monthlyChargeLimitCents,l.value.currency)),1)],64)):(b(),I(Be,{key:1},[Ue(B(h(n)("settings.planUsage.unlimited")),1)],64))])]),C("div",jHe,[C("span",HHe,[C("span",WHe,B(h(n)("settings.planUsage.boosterBalance")),1)]),C("span",qHe,[Ue(B(p(l.value.balanceCents,l.value.currency)),1),C("span",UHe," / "+B(p(l.value.totalCents,l.value.currency)),1)])])])])):ne("",!0)],64))}}),VHe=vt(KHe,[["__scopeId","data-v-f39cdded"]]),ZHe=["aria-expanded","aria-label"],GHe={class:"sm-picker__value-text"},QHe=["aria-label"],YHe=["aria-label"],JHe={class:"sm-picker__group"},XHe=["aria-selected","onMouseenter","onClick"],eWe={class:"sm-picker__option-label"},tWe=["aria-label"],nWe={class:"sm-picker__group"},iWe=["aria-selected","onMouseenter","onClick"],sWe={class:"sm-picker__option-label"},oWe=188,rWe=250,w4=8,lWe=tt({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{}},emits:["select"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Z(null),r=Z(null),l=Z(null),a=Z(null),u=new Map,c=Z(!1),d=Z(!1),f=Z({}),p=`sm-picker-${Math.random().toString(36).slice(2,9)}`,g=Z(""),m=Z(null),y=Z("right"),w=Z(0),k=Z("models"),A=Z(0),v=Z(0);let x=null;const E=F(()=>n.groups.flatMap(te=>te.options)),S=F(()=>n.modelValue?E.value.find(te=>te.id===n.modelValue)?.label??n.modelValue:""),M=F(()=>n.modelValue?n.effort?`${S.value} · ${n.effort}`:S.value:s("settings.noSecondaryModel")),_=F(()=>{const te=m.value;if(te===null)return[];const ye=Ap(n.modelInfoById[te]),j=n.effort===""?[null,...ye]:[...ye];return n.modelValue===te&&n.effort!==""&&!ye.includes(n.effort)&&j.push(n.effort),j});function N(te){return n.modelValue!==m.value?!1:te===null?n.effort==="":n.effort===te}function D(){const te=_.value.findIndex(ye=>N(ye));return te>=0?te:0}function T(te,ye){te instanceof HTMLElement?u.set(ye,te):u.delete(ye)}function $(){x!==null&&(clearTimeout(x),x=null)}function P(){$(),x=setTimeout(()=>{m.value=null,k.value==="efforts"&&(k.value="models")},rWe)}function O(te){te!==g.value&&(g.value=te,A.value=Math.max(0,E.value.findIndex(ye=>ye.id===te)))}function R(){const te=r.value,ye=l.value;if(!te||!ye)return;const j=te.getBoundingClientRect(),Y=ye.offsetHeight,ve=window.innerHeight-j.bottom;d.value=ve<Y+w4&&j.top>Y;const re=Math.max(w4,window.innerWidth-j.right);f.value=d.value?{right:`${re}px`,bottom:`${window.innerHeight-j.top+4}px`,top:"auto"}:{right:`${re}px`,top:`${j.bottom+4}px`,bottom:"auto"}}function W(){const te=l.value,ye=m.value===null?void 0:u.get(m.value);if(!te||!ye)return;const j=te.getBoundingClientRect(),Y=ye.getBoundingClientRect(),ve=a.value?.offsetHeight??0,re=Math.max(0,window.innerHeight-w4-ve-j.top);w.value=Math.max(0,Math.min(Y.top-j.top-4,te.offsetHeight-40,re));const se=window.innerWidth-j.right,U=j.left;y.value=se>=oWe||se>=U?"right":"left"}function z(te,{moveFocus:ye=!1}={}){O(te),$(),m.value=te,ye&&(k.value="efforts",v.value=D()),kt(W)}function G(){m.value=null,k.value="models"}function K(){c.value||(c.value=!0,g.value=n.modelValue||(E.value[0]?.id??""),A.value=Math.max(0,E.value.findIndex(te=>te.id===g.value)),m.value=null,k.value="models",kt(R))}function H({restoreFocus:te=!1}={}){c.value&&($(),c.value=!1,m.value=null,te&&kt(()=>r.value?.focus()))}function q(){c.value?H():K()}function X(te){if(m.value===null)return;const ye={model:m.value,effort:te??void 0};(ye.model!==n.modelValue||(ye.effort??"")!==n.effort)&&i("select",ye),H({restoreFocus:!0})}function ee(){kt(()=>{l.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function ue(te){const ye=E.value;if(ye.length===0)return;const j=(A.value+te+ye.length)%ye.length,Y=ye[j].id;O(Y),m.value!==null&&z(Y),ee()}function ie(te){const ye=_.value;ye.length!==0&&(v.value=(v.value+te+ye.length)%ye.length,ee())}function xe(te){if(!c.value){(te.key==="Enter"||te.key===" "||te.key==="ArrowDown")&&(te.preventDefault(),K());return}if(te.key==="ArrowDown")te.preventDefault(),k.value==="models"?ue(1):ie(1);else if(te.key==="ArrowUp")te.preventDefault(),k.value==="models"?ue(-1):ie(-1);else if(te.key==="ArrowRight")te.preventDefault(),z(g.value,{moveFocus:!0});else if(te.key==="ArrowLeft")te.preventDefault(),m.value!==null&&G();else if(te.key==="Enter"||te.key===" ")te.preventDefault(),k.value==="models"?z(g.value,{moveFocus:!0}):X(_.value[v.value]??null);else if(te.key==="Home"||te.key==="End"){te.preventDefault();const ye=te.key==="Home";if(k.value==="models"){const j=E.value;if(j.length===0)return;const Y=(ye?j[0]:j.at(-1)).id;O(Y),m.value!==null&&z(Y)}else v.value=ye?0:_.value.length-1;ee()}else te.key==="Escape"&&(te.preventDefault(),H({restoreFocus:!0}))}function ce(te){const ye=te.target;o.value?.contains(ye)||l.value?.contains(ye)||H()}function pe(te){if(c.value){if(l.value?.contains(te.target)){W();return}R(),W()}}function Ne(){H()}return pn(()=>{document.addEventListener("pointerdown",ce),document.addEventListener("scroll",pe,!0),window.addEventListener("resize",Ne)}),An(()=>{document.removeEventListener("pointerdown",ce),document.removeEventListener("scroll",pe,!0),window.removeEventListener("resize",Ne),$()}),(te,ye)=>(b(),I("div",{ref_key:"rootRef",ref:o,class:De(["sm-picker",{"is-open":c.value}])},[C("button",{ref_key:"triggerRef",ref:r,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":p,"aria-expanded":c.value,"aria-haspopup":"dialog","aria-label":h(s)("settings.secondaryModel"),onClick:q,onKeydown:xe},[C("span",{class:De(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[C("span",GHe,B(M.value),1)],2),V(h(Ce),{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,ZHe),(b(),fe(Wr,{to:"body"},[c.value?(b(),I("div",{key:0,id:p,ref_key:"menuRef",ref:l,class:De(["sm-picker__menu",{"sm-picker__menu--up":d.value}]),style:Vt(f.value),role:"dialog","aria-label":h(s)("settings.secondaryModel")},[C("div",{class:"sm-picker__models",role:"listbox","aria-label":h(s)("settings.secondaryModel")},[(b(!0),I(Be,null,yt(e.groups,j=>(b(),I(Be,{key:j.provider},[C("div",JHe,B(j.provider),1),(b(!0),I(Be,null,yt(j.options,Y=>(b(),I("button",{key:Y.id,ref_for:!0,ref:ve=>T(ve,Y.id),class:De(["sm-picker__option",{"is-selected":Y.id===e.modelValue,"is-active":Y.id===g.value,"is-kb-active":k.value==="models"&&Y.id===g.value}]),type:"button",role:"option","aria-selected":Y.id===e.modelValue,onMouseenter:ve=>z(Y.id),onMouseleave:P,onClick:ve=>z(Y.id,{moveFocus:!0})},[V(h(Ce),{class:"sm-picker__check",name:"check",size:"sm"}),C("span",eWe,B(Y.label),1),V(h(Ce),{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,XHe))),128))],64))),128))],8,YHe),m.value!==null?(b(),I("div",{key:0,ref_key:"flyoutRef",ref:a,class:De(["sm-picker__flyout",`sm-picker__flyout--${y.value}`]),style:Vt({top:`${w.value}px`}),role:"listbox","aria-label":h(s)("settings.secondaryModelEffort"),onMouseenter:$,onMouseleave:P},[C("div",nWe,B(h(s)("settings.secondaryModelEffort")),1),(b(!0),I(Be,null,yt(_.value,(j,Y)=>(b(),I("button",{key:j??"__default__",class:De(["sm-picker__option",{"is-selected":N(j),"is-active":k.value==="efforts"&&Y===v.value,"is-kb-active":k.value==="efforts"&&Y===v.value,"is-muted":j===null}]),type:"button",role:"option","aria-selected":N(j),onMouseenter:ve=>{k.value="efforts",v.value=Y},onClick:ve=>X(j)},[V(h(Ce),{class:"sm-picker__check",name:"check",size:"sm"}),C("span",sWe,B(j??h(s)("settings.secondaryModelEffortAuto")),1)],42,iWe))),128))],46,tWe)):ne("",!0)],14,QHe)):ne("",!0)]))],2))}}),aWe=vt(lWe,[["__scopeId","data-v-eb75e643"]]),uWe=["aria-label"],cWe={class:"settings-tabs-header"},dWe={class:"settings-dialog-title"},fWe={class:"settings-tab-list"},hWe=["aria-selected","onClick"],pWe={class:"settings-region"},gWe={class:"settings-region-header"},mWe={class:"panel"},vWe={class:"sec"},yWe={class:"sec-title"},bWe={class:"settings-group"},kWe={class:"row"},AWe={class:"rlabel"},CWe={class:"hint"},wWe={class:"row language-row"},xWe={class:"rlabel"},_We={class:"hint"},SWe={class:"row font-size-row"},MWe={class:"rlabel"},IWe={class:"hint"},EWe={class:"sec notification-settings"},TWe={class:"sec-title"},LWe={class:"settings-group"},NWe={class:"row"},FWe={class:"rlabel"},BWe={class:"hint"},$We={key:0,class:"hint"},DWe={class:"row"},RWe={class:"rlabel"},zWe={class:"hint"},OWe={class:"panel"},PWe={class:"sec"},jWe={class:"sec-title"},HWe={class:"settings-group"},WWe={class:"account-row"},qWe={class:"account-avatar","aria-hidden":"true"},UWe=["src"],KWe={class:"account-meta"},VWe={class:"account-name-row"},ZWe={class:"account-name"},GWe={class:"account-sub"},QWe={key:0,class:"panel"},YWe={class:"panel"},JWe={class:"sec"},XWe={class:"sec-head"},eqe={class:"sec-title"},tqe={class:"settings-group"},nqe={class:"row"},iqe={class:"rlabel"},sqe={class:"hint"},oqe={key:0,class:"select-wrap"},rqe={key:1,class:"rvalue mono"},lqe={class:"row"},aqe={class:"rlabel"},uqe={class:"hint"},cqe={class:"row"},dqe={class:"rlabel"},fqe={class:"hint"},hqe={class:"row"},pqe={class:"rlabel"},gqe={class:"hint"},mqe={key:1,class:"empty-config"},vqe={key:0,class:"sec"},yqe={class:"sec-head"},bqe={class:"sec-title"},kqe={class:"settings-group"},Aqe={class:"row"},Cqe={class:"rlabel"},wqe={class:"hint"},xqe={key:0,class:"select-wrap"},_qe={key:1,class:"rvalue mono"},Sqe={class:"panel"},Mqe={class:"sec"},Iqe={class:"sec-title"},Eqe={class:"settings-group"},Tqe={class:"row"},Lqe={class:"rlabel"},Nqe={class:"hint"},Fqe={class:"rvalue"},Bqe={class:"row"},$qe={class:"rlabel"},Dqe={class:"hint"},Rqe={class:"rvalue"},zqe={class:"row"},Oqe={class:"rlabel"},Pqe={class:"hint"},jqe={class:"rvalue"},Hqe={key:0,class:"row"},Wqe={class:"rlabel"},qqe={key:0,class:"hint"},Uqe={key:1,class:"hint"},Kqe={key:1,class:"row"},Vqe={class:"rlabel"},Zqe={class:"hint"},Gqe={key:0,class:"sec"},Qqe={class:"sec-title"},Yqe={class:"settings-group"},Jqe={class:"row"},Xqe={class:"rlabel"},eUe={class:"hint"},tUe={class:"hint"},nUe={class:"sec"},iUe={class:"sec-title"},sUe={class:"settings-group"},oUe={class:"row"},rUe={class:"rlabel"},lUe={class:"hint"},aUe={key:0,class:"hint"},uUe={class:"panel"},cUe={class:"panel-head"},dUe={class:"panel-title"},fUe={class:"panel-desc"},hUe={class:"archive-toolbar"},pUe={class:"archive-search"},gUe=["placeholder"],mUe={key:0,class:"archive-empty"},vUe={key:0,class:"archive-list"},yUe={class:"archive-workspace"},bUe={class:"path"},kUe={class:"count"},AUe={class:"setting-card"},CUe={class:"archive-meta"},wUe={class:"archive-name"},xUe={class:"archive-time"},_Ue={key:1,class:"archive-empty"},SUe=100,MUe=tt({__name:"SettingsDialog",props:{colorScheme:{},fontScale:{},initialTab:{},managedProviderStatus:{},managedUserInfo:{},onFetchUsage:{type:Function},notify:{type:Boolean},notifyPermission:{},notifySound:{type:Boolean},config:{},models:{},configSaving:{type:Boolean},serverVersion:{},experimentalFlags:{}},emits:["setColorScheme","setFontScale","setNotify","setNotifySound","login","logout","updateConfig","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=F(()=>i.managedProviderStatus==="authenticated"),r=F(()=>o.value?i.managedUserInfo?.nickname||n("sidebar.defaultUserName"):n("sidebar.notSignedIn")),l=F(()=>i.managedUserInfo?.userLevelName?.trim()??""),a=Z(!1);Qe(()=>i.managedUserInfo?.avatar,()=>{a.value=!1});const u=F(()=>!!i.managedUserInfo?.avatar&&!a.value),c=F(()=>o.value?n("settings.signedIn"):n("settings.signedOutHint")),d=Z(i.initialTab??"general"),f=Z(!1);let p=null;function g(){f.value=!0,p&&clearTimeout(p),p=setTimeout(()=>{f.value=!1,p=null},900)}const m=[{id:"general",labelKey:"settings.tabs.general",icon:"sliders"},{id:"agent",labelKey:"settings.tabs.agent",icon:"robot"},{id:"account",labelKey:"settings.tabs.account",icon:"user"},{id:"providers",labelKey:"settings.tabs.providers",icon:"bolt"},{id:"advanced",labelKey:"settings.tabs.advanced",icon:"microscope"},{id:"archived",labelKey:"settings.tabs.archived",icon:"archive"}],y=qke(),w=["manual","yolo","auto"],k={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},A=Z(null);KD(A);const{isConfirmOpen:v}=Hu();function x(Fe){Fe.key==="Escape"&&!Fe.defaultPrevented&&!v.value&&s("close")}pn(()=>document.addEventListener("keydown",x)),An(()=>{document.removeEventListener("keydown",x),p&&clearTimeout(p)});function E(){m$()}const S=(()=>{const Fe="0.36.0".trim()?"0.36.0":"";let Re="";if("2026-08-16T05:28:28.514Z".trim()){const ht=new Date("2026-08-16T05:28:28.514Z");if(!Number.isNaN(ht.getTime())){const ot=gt=>String(gt).padStart(2,"0");Re=`${ht.getFullYear()}-${ot(ht.getMonth()+1)}-${ot(ht.getDate())} ${ot(ht.getHours())}:${ot(ht.getMinutes())}`}}const Ke=Re===""?Fe:`${Fe} · ${Re}`;return Ke===""?"-":Ke})(),M=l$(),_=Z(!1),N=Z(null);async function D(){if(!_.value){_.value=!0,N.value=null;try{N.value=await M.check()}finally{_.value=!1}}}const T=F(()=>{const Fe=N.value;if(Fe===null)return"";switch(Fe.outcome){case"available":return M.status.value.state==="downloaded"?n("settings.updateCheckDownloaded",{version:Fe.version??""}):M.autoDownload.value?n("settings.updateCheckAvailableAuto",{version:Fe.version??""}):n("settings.updateCheckAvailable",{version:Fe.version??""});case"latest":return n("settings.updateCheckLatest");case"unsupported":return n("settings.updateCheckUnsupported");case"error":return n("settings.updateCheckFailed")}}),$=F(()=>{const Fe=new Map;for(const Re of i.models??[])Fe.set(Re.id,{id:Re.id,label:Re.displayName??Re.model??Re.id,provider:Re.provider});for(const[Re,Ke]of Object.entries(i.config?.models??{})){if(Fe.has(Re))continue;const ht=W(Ke);Fe.set(Re,{id:Re,label:z(Re,Ke,ht),provider:ht??Re})}return Array.from(Fe.values())}),P=F(()=>{const Fe=new Map;for(const Re of $.value){const Ke=Fe.get(Re.provider)??[];Ke.push(Re),Fe.set(Re.provider,Ke)}for(const Re of Fe.values())Re.sort((Ke,ht)=>Ke.label.localeCompare(ht.label));return Array.from(Fe.entries()).toSorted(([Re],[Ke])=>Re.localeCompare(Ke)).map(([Re,Ke])=>({provider:Re,options:Ke}))}),O=F(()=>{const Fe=P.value.flatMap(Re=>Re.options.map(Ke=>({value:Ke.id,label:Ke.label,group:Re.provider})));return i.config?.defaultModel||Fe.unshift({value:"",label:n("settings.noDefaultModel"),group:"",disabled:!0}),Fe}),R=F(()=>{const Fe=i.config?.defaultPermissionMode;return Fe==="auto"||Fe==="yolo"||Fe==="manual"?Fe:"manual"});function W(Fe){if(!Fe||typeof Fe!="object")return;const Re=Fe;return typeof Re.provider=="string"?Re.provider:void 0}function z(Fe,Re,Ke){if(!Re||typeof Re!="object")return Fe;const ht=Re,ot=typeof ht.model=="string"?ht.model:void 0,gt=Ke??W(Re);return ot&>?`${Fe} (${gt}/${ot})`:ot?`${Fe} (${ot})`:Fe}function G(Fe){return Fe===!0}function K(Fe){!Fe||Fe===i.config?.defaultModel||s("updateConfig",{defaultModel:Fe})}function H(Fe){Fe!==R.value&&s("updateConfig",{defaultPermissionMode:Fe})}const q=F(()=>(i.experimentalFlags?.["secondary-model"]??i.config?.experimental?.["secondary-model"])===!0),X=F(()=>i.config?.secondaryModel?.model??""),ee=F(()=>i.config?.secondaryModel?.defaultEffort??""),ue=F(()=>Object.fromEntries((i.models??[]).map(Fe=>[Fe.id,Fe])));function ie(Fe){Fe.model===X.value&&(Fe.effort??"")===ee.value||s("updateConfig",{secondaryModel:Fe.effort?{model:Fe.model,defaultEffort:Fe.effort}:{model:Fe.model}})}function xe(Fe){const Re=i.config?.[Fe];s("updateConfig",{[Fe]:!G(Re)})}function ce(){const Fe=i.config?.thinking;return!Fe||typeof Fe!="object"?!0:Fe.enabled!==!1}function pe(){s("updateConfig",{thinking:{enabled:!ce()}})}function Ne(){const Fe=i.config?.telemetry!==!1;s("updateConfig",{telemetry:!Fe})}function te(Fe){d.value=Fe}const ye=Fa(),j=F(()=>o.value&&ye.managedMembership.value==="free"),Y=Z([]),ve=Z(!1),re=Z(!1),se=Z(""),U=Z("all"),J=Z("archived-desc");async function de(){if(!(ve.value||re.value)){ve.value=!0;try{const Fe=[];let Re;for(;;){const Ke=await ye.loadArchivedSessions({beforeId:Re,pageSize:SUe});if(Fe.push(...Ke.items),!Ke.hasMore||Ke.items.length===0)break;const ht=Ke.items.at(-1)?.id;if(ht===void 0)break;Re=ht}Y.value=Fe,re.value=!0}catch(Fe){Dl("loadAllArchived failed",Fe)}finally{ve.value=!1}}}Qe(d,Fe=>{Fe==="archived"&&!re.value&&de()},{immediate:!0});const me=F(()=>{const Fe=new Set;for(const Re of Y.value)Fe.add(Re.cwd);return Array.from(Fe).sort((Re,Ke)=>Re.localeCompare(Ke))}),Ie=F(()=>[{value:"all",label:n("settings.archivedAllWorkspaces")},...me.value.map(Fe=>({value:Fe,label:Fe}))]),je=F(()=>{const Fe=se.value.trim().toLowerCase();let Re=Y.value.filter(Ke=>Ke.archived===!0);return U.value!=="all"&&(Re=Re.filter(Ke=>Ke.cwd===U.value)),Fe&&(Re=Re.filter(Ke=>Ke.title.toLowerCase().includes(Fe))),Re=Re.slice(),J.value==="archived-desc"?Re.sort((Ke,ht)=>(ht.archivedAt??ht.updatedAt).localeCompare(Ke.archivedAt??Ke.updatedAt)):J.value==="created-desc"?Re.sort((Ke,ht)=>ht.createdAt.localeCompare(Ke.createdAt)):Re.sort((Ke,ht)=>Ke.title.localeCompare(ht.title,"zh")),Re}),ke=F(()=>{const Fe=new Map;for(const Re of je.value){const Ke=Fe.get(Re.cwd)??[];Ke.push(Re),Fe.set(Re.cwd,Ke)}return Array.from(Fe.entries()).map(([Re,Ke])=>({cwd:Re,items:Ke}))});async function Le(Fe){await ye.restoreSession(Fe)&&(Y.value=Y.value.filter(Ke=>Ke.id!==Fe))}function it(Fe){const Re=new Date(Fe);if(Number.isNaN(Re.getTime()))return Fe;const Ke=ht=>String(ht).padStart(2,"0");return`${Re.getFullYear()}-${Ke(Re.getMonth()+1)}-${Ke(Re.getDate())} ${Ke(Re.getHours())}:${Ke(Re.getMinutes())}`}return(Fe,Re)=>(b(),fe(h(La),{open:!0,"close-on-esc":!1,"aria-label":h(n)("settings.title"),size:"xl",height:"fixed",padded:!1,level:"grouped",onClose:Re[16]||(Re[16]=Ke=>s("close"))},{default:he(()=>[C("div",{ref_key:"dialogRef",ref:A,class:"sd"},[C("nav",{class:"settings-tabs",role:"tablist","aria-label":h(n)("settings.title")},[C("header",cWe,[C("h2",dWe,B(h(n)("settings.title")),1)]),C("div",fWe,[(b(),I(Be,null,yt(m,Ke=>C("button",{key:Ke.id,type:"button",class:De(["tab",{on:d.value===Ke.id}]),role:"tab","aria-selected":d.value===Ke.id,onClick:ht=>te(Ke.id)},[V(h(Ce),{name:Ke.icon,size:"md"},null,8,["name"]),C("span",null,B(h(n)(Ke.labelKey)),1)],10,hWe)),64))])],8,uWe),C("section",pWe,[C("header",gWe,[V(h(rn),{size:"sm",label:h(n)("settings.close"),tooltip:h(n)("settings.close"),onClick:Re[0]||(Re[0]=Ke=>s("close"))},{default:he(()=>[V(h(Ce),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])]),C("div",{class:De(["body",{scrolling:f.value}]),onScroll:g},[Bn(C("section",mWe,[C("section",vWe,[C("h3",yWe,B(h(n)("settings.appearance")),1),C("div",bWe,[C("div",kWe,[C("span",AWe,[Ue(B(h(n)("theme.colorSchemeLabel"))+" ",1),C("span",CWe,B(h(n)("settings.colorSchemeHint")),1)]),V(h(wo),{"model-value":e.colorScheme,options:[{value:"light",label:h(n)("theme.light"),icon:"light-mode"},{value:"dark",label:h(n)("theme.dark"),icon:"dark-mode"},{value:"system",label:h(n)("theme.system")}],"onUpdate:modelValue":Re[1]||(Re[1]=Ke=>s("setColorScheme",Ke))},null,8,["model-value","options"])]),C("div",wWe,[C("span",xWe,[Ue(B(h(n)("sidebar.language"))+" ",1),C("span",_We,B(h(n)("settings.languageHint")),1)]),V(VD)]),C("div",SWe,[C("span",MWe,[Ue(B(h(n)("settings.uiFontSize"))+" ",1),C("span",IWe,B(h(n)("settings.uiFontSizeHint")),1)]),V(h(wo),{"model-value":e.fontScale,options:[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],"aria-label":h(n)("settings.uiFontSize"),"onUpdate:modelValue":Re[2]||(Re[2]=Ke=>s("setFontScale",Ke))},null,8,["model-value","aria-label"])])])]),C("section",EWe,[C("h3",TWe,B(h(n)("settings.notifications")),1),C("div",LWe,[C("div",NWe,[C("span",FWe,[Ue(B(h(n)("settings.notifyEnabled"))+" ",1),C("span",BWe,B(h(n)("settings.notifyEnabledHint")),1),e.notifyPermission==="denied"?(b(),I("span",$We,B(h(n)("settings.notifyDenied")),1)):ne("",!0)]),V(h(Md),{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:h(n)("settings.notifyEnabled"),"onUpdate:modelValue":Re[3]||(Re[3]=Ke=>s("setNotify",Ke))},null,8,["model-value","disabled","label"])]),C("div",DWe,[C("span",RWe,[Ue(B(h(n)("settings.notifySound"))+" ",1),C("span",zWe,B(h(n)("settings.notifySoundHint")),1)]),V(h(Md),{"model-value":e.notifySound,label:h(n)("settings.notifySound"),"onUpdate:modelValue":Re[4]||(Re[4]=Ke=>s("setNotifySound",Ke))},null,8,["model-value","label"])])])])],512),[[rs,d.value==="general"]]),Bn(C("section",OWe,[C("section",PWe,[C("h3",jWe,B(h(n)("settings.account")),1),C("div",HWe,[C("div",WWe,[C("span",qWe,[u.value?(b(),I("img",{key:0,src:i.managedUserInfo?.avatar,alt:"",onError:Re[5]||(Re[5]=Ke=>a.value=!0)},null,40,UWe)):(b(),fe(h(Ce),{key:1,name:"user",size:"md"}))]),C("span",KWe,[C("span",VWe,[C("span",ZWe,B(r.value),1),l.value?(b(),fe(h(Hl),{key:0,class:"account-level",variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(l.value),1)]),_:1})):ne("",!0)]),C("span",GWe,B(c.value),1)]),o.value?(b(),fe(h(jt),{key:0,variant:"danger-soft",size:"sm",onClick:Re[6]||(Re[6]=Ke=>s("logout"))},{default:he(()=>[Ue(B(h(n)("sidebar.signOut")),1)]),_:1})):(b(),fe(h(jt),{key:1,variant:"primary",size:"sm",onClick:Re[7]||(Re[7]=Ke=>s("login"))},{default:he(()=>[Ue(B(h(n)("sidebar.signIn")),1)]),_:1}))])])]),j.value?(b(),fe(GD,{key:0})):o.value?(b(),fe(VHe,{key:1,"on-fetch-usage":i.onFetchUsage},null,8,["on-fetch-usage"])):ne("",!0)],512),[[rs,d.value==="account"]]),d.value==="providers"?(b(),I("section",QWe,[V(lHe)])):ne("",!0),Bn(C("section",YWe,[C("section",JWe,[C("div",XWe,[C("h3",eqe,B(h(n)("settings.agentDefaults")),1)]),C("div",tqe,[e.config?(b(),I(Be,{key:0},[C("div",nqe,[C("span",iqe,[Ue(B(h(n)("settings.defaultModel"))+" ",1),C("span",sqe,B(h(n)("settings.defaultModelHint")),1)]),P.value.length>0?(b(),I("div",oqe,[V(h(e3),{"model-value":e.config.defaultModel??"",options:O.value,"aria-label":h(n)("settings.defaultModel"),"onUpdate:modelValue":K},null,8,["model-value","options","aria-label"])])):(b(),I("span",rqe,B(e.config.defaultModel??h(n)("settings.noDefaultModel")),1))]),C("div",lqe,[C("span",aqe,[Ue(B(h(n)("settings.defaultPermission"))+" ",1),C("span",uqe,B(h(n)("settings.defaultPermissionHint")),1)]),V(h(wo),{"model-value":R.value,options:w.map(Ke=>({value:Ke,label:h(n)(k[Ke])})),"onUpdate:modelValue":Re[8]||(Re[8]=Ke=>H(Ke))},null,8,["model-value","options"])]),C("div",cqe,[C("span",dqe,[Ue(B(h(n)("settings.defaultThinking"))+" ",1),C("span",fqe,B(h(n)("settings.defaultThinkingHint")),1)]),V(h(Md),{"model-value":ce(),label:h(n)("settings.defaultThinking"),"onUpdate:modelValue":Re[9]||(Re[9]=Ke=>pe())},null,8,["model-value","label"])]),C("div",hqe,[C("span",pqe,[Ue(B(h(n)("settings.defaultPlanMode"))+" ",1),C("span",gqe,B(h(n)("settings.defaultPlanModeHint")),1)]),V(h(Md),{"model-value":G(e.config.defaultPlanMode),label:h(n)("settings.defaultPlanMode"),"onUpdate:modelValue":Re[10]||(Re[10]=Ke=>xe("defaultPlanMode"))},null,8,["model-value","label"])])],64)):(b(),I("div",mqe,B(h(n)("settings.configUnavailable")),1))])]),e.config&&q.value?(b(),I("section",vqe,[C("div",yqe,[C("h3",bqe,B(h(n)("settings.secondaryModelSection")),1)]),C("div",kqe,[C("div",Aqe,[C("span",Cqe,[Ue(B(h(n)("settings.secondaryModel"))+" ",1),C("span",wqe,B(h(n)("settings.secondaryModelHint")),1)]),P.value.length>0?(b(),I("div",xqe,[V(aWe,{"model-value":X.value,effort:ee.value,groups:P.value,"model-info-by-id":ue.value,onSelect:ie},null,8,["model-value","effort","groups","model-info-by-id"])])):(b(),I("span",_qe,B(X.value||h(n)("settings.noSecondaryModel")),1))])])])):ne("",!0)],512),[[rs,d.value==="agent"]]),Bn(C("section",Sqe,[C("section",Mqe,[C("h3",Iqe,B(h(n)("settings.versionAndUpdates")),1),C("div",Eqe,[C("div",Tqe,[C("span",Lqe,[Ue(B(h(n)("settings.appVersion"))+" ",1),C("span",Nqe,B(h(n)("settings.appVersionHint")),1)]),C("span",Fqe,B(h(S)),1)]),C("div",Bqe,[C("span",$qe,[Ue(B(h(n)("settings.serverVersion"))+" ",1),C("span",Dqe,B(h(n)("settings.serverVersionHint")),1)]),C("span",Rqe,B(e.serverVersion||"-"),1)]),C("div",zqe,[C("span",Oqe,[Ue(B(h(n)("settings.serverAddress"))+" ",1),C("span",Pqe,B(h(n)("settings.serverAddressHint")),1)]),C("span",jqe,B(h(y)),1)]),h(M).canCheck?(b(),I("div",Hqe,[C("span",Wqe,[Ue(B(h(n)("settings.checkUpdate"))+" ",1),T.value?(b(),I("span",qqe,B(T.value),1)):(b(),I("span",Uqe,B(h(n)("settings.checkUpdateHint")),1))]),V(h(jt),{variant:"secondary",size:"sm",disabled:_.value,onClick:D},{default:he(()=>[Ue(B(_.value?h(n)("settings.updateChecking"):h(n)("settings.checkUpdateBtn")),1)]),_:1},8,["disabled"])])):ne("",!0),h(M).canToggleAutoDownload?(b(),I("div",Kqe,[C("span",Vqe,[Ue(B(h(n)("settings.autoDownloadUpdate"))+" ",1),C("span",Zqe,B(h(n)("settings.autoDownloadUpdateHint")),1)]),V(h(Md),{"model-value":h(M).autoDownload.value,label:h(n)("settings.autoDownloadUpdate"),"onUpdate:modelValue":Re[11]||(Re[11]=Ke=>h(M).setAutoDownload(Ke,"settings"))},null,8,["model-value","label"])])):ne("",!0)])]),e.config?(b(),I("section",Gqe,[C("h3",Qqe,B(h(n)("settings.privacy")),1),C("div",Yqe,[C("div",Jqe,[C("span",Xqe,[Ue(B(h(n)("settings.telemetry"))+" ",1),C("span",eUe,B(h(n)("settings.telemetryHint")),1),C("span",tUe,B(h(n)("settings.telemetryRestartHint")),1)]),V(h(Md),{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:h(n)("settings.telemetry"),"onUpdate:modelValue":Re[12]||(Re[12]=Ke=>Ne())},null,8,["model-value","disabled","label"])])])])):ne("",!0),C("section",nUe,[C("h3",iUe,B(h(n)("settings.diagnostics")),1),C("div",sUe,[C("div",oUe,[C("span",rUe,[Ue(B(h(n)("settings.exportLog"))+" ",1),C("span",lUe,B(h(n)("settings.exportLogHint")),1),h(bl)()?ne("",!0):(b(),I("span",aUe,B(h(n)("settings.logHint")),1))]),V(h(jt),{variant:"secondary",size:"sm",onClick:E},{default:he(()=>[Ue(B(h(n)("settings.exportLogBtn")),1)]),_:1})])])])],512),[[rs,d.value==="advanced"]]),Bn(C("section",uUe,[C("div",cUe,[C("h4",dUe,B(h(n)("settings.archivedTitle")),1),C("p",fUe,B(h(n)("settings.archivedDesc")),1)]),C("div",hUe,[C("label",pUe,[Re[17]||(Re[17]=C("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[C("circle",{cx:"11",cy:"11",r:"7"}),C("path",{d:"m21 21-4.3-4.3"})],-1)),Bn(C("input",{"onUpdate:modelValue":Re[13]||(Re[13]=Ke=>se.value=Ke),placeholder:h(n)("settings.archivedSearch")},null,8,gUe),[[_o,se.value]])]),V(h(e3),{"model-value":U.value,options:Ie.value,size:"sm","aria-label":h(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":Re[14]||(Re[14]=Ke=>U.value=Ke)},null,8,["model-value","options","aria-label"]),V(h(wo),{size:"sm","model-value":J.value,options:[{value:"archived-desc",label:h(n)("settings.archivedSortArchived"),icon:"clock"},{value:"created-desc",label:h(n)("settings.archivedSortCreated"),icon:"calendar-schedule"},{value:"name-asc",label:h(n)("settings.archivedSortName"),icon:"sort"}],"onUpdate:modelValue":Re[15]||(Re[15]=Ke=>J.value=Ke)},null,8,["model-value","options"])]),ve.value?(b(),I("div",mUe,B(h(n)("settings.archivedLoadingAll")),1)):(b(),I(Be,{key:1},[ke.value.length>0?(b(),I("div",vUe,[(b(!0),I(Be,null,yt(ke.value,Ke=>(b(),I("section",{key:Ke.cwd,class:"archive-card"},[C("div",yUe,[V(h(Ce),{name:"folder-closed",size:"md"}),C("span",bUe,B(Ke.cwd),1),C("span",kUe,B(h(n)("settings.archivedSessionsCount",{count:Ke.items.length})),1)]),C("div",AUe,[(b(!0),I(Be,null,yt(Ke.items,ht=>(b(),I("div",{key:ht.id,class:"archive-row"},[C("div",CUe,[C("div",wUe,B(ht.title),1),C("div",xUe,B(h(n)("settings.archivedAt",{time:it(ht.archivedAt??ht.updatedAt)})),1)]),V(h(jt),{variant:"secondary",size:"sm",onClick:ot=>Le(ht.id)},{default:he(()=>[V(h(Ce),{name:"undo",size:"sm"}),C("span",null,B(h(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(b(),I("div",_Ue,B(Y.value.length===0?h(n)("settings.archivedEmpty"):h(n)("settings.archivedNoMatch")),1))],64))],512),[[rs,d.value==="archived"]])],34)])],512)]),_:1},8,["aria-label"]))}}),IUe=vt(MUe,[["__scopeId","data-v-ca0381a0"]]),EUe={class:"aw"},TUe={class:"crumbbar"},LUe={class:"crumbs"},NUe={key:0,class:"crumb-sep"},FUe=["onClick"],BUe={key:0,class:"filterbar"},$Ue=["placeholder"],DUe={class:"folder-list"},RUe={key:0,class:"fl-loading"},zUe=["onClick"],OUe={class:"folder-name search-rel"},PUe={key:0,class:"fl-empty"},jUe={key:1,class:"fl-loading"},HUe=["onClick"],WUe={class:"folder-name"},qUe={key:0,class:"fl-empty"},UUe={class:"paste-row"},KUe={class:"paste-input-wrap"},VUe={key:1,class:"add-error",role:"alert"},ZUe={class:"actions"},GUe={class:"footer-hint"},QUe=600,YUe=6,wM=150,JUe=tt({__name:"AddWorkspaceDialog",props:{browseFs:{type:Function},getFsHome:{type:Function},defaultPath:{},error:{}},emits:["add","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=Z(!0),r=Z(!1),l=Z(!1),a=Z(""),u=Z(null),c=Z([]),d=Z(""),f=Z(!1),p=Z([]),g=F(()=>d.value.trim().length>0);let m=0,y=null;function w(z,G){const K=z.toLowerCase(),H=G.toLowerCase();let q=0;for(let X=0;X<H.length&&q<K.length;X++)H[X]===K[q]&&q++;return q===K.length}async function k(z){const G=a.value,K=z.trim();if(!G||K===""){p.value=[],f.value=!1;return}const H=++m;f.value=!0;const q=[],X=[{path:G,depth:0}];let ee=0;for(;X.length>0&&ee<QUe&&q.length<wM;){if(H!==m)return;const ue=X.shift();ee++;let ie;try{ie=await i.browseFs(ue.path)}catch{continue}if(H!==m)return;for(const xe of ie.entries){if(!xe.isDir)continue;const ce=xe.path.startsWith(G)?xe.path.slice(G.length).replace(/^\/+/,""):xe.path;if(w(K,ce||xe.name)&&(q.push({path:xe.path,name:xe.name,rel:ce||xe.name}),q.length>=wM))break;ue.depth+1<YUe&&X.push({path:xe.path,depth:ue.depth+1})}H===m&&(p.value=[...q])}H===m&&(f.value=!1)}Qe(d,z=>{if(y&&clearTimeout(y),z.trim()===""){m++,p.value=[],f.value=!1;return}y=setTimeout(()=>void k(z),220)});const A=Z(!1),v=Z(""),x=F(()=>v.value.trim()),E=F(()=>{const z=a.value;if(!z)return[];const G=z.split("/").filter(Boolean),K=[{label:"/",path:"/"}];let H="";for(const q of G)H+=`/${q}`,K.push({label:q,path:H});return K}),S=F(()=>a.value.length>0);async function M(z){r.value=!0;try{const G=await i.browseFs(z);if(!G.path){l.value=!0;return}a.value=G.path,u.value=G.parent,c.value=G.entries,d.value="",l.value=!1}catch{l.value=!0}finally{r.value=!1}}function _(z){z.isDir&&M(z.path)}function N(){u.value&&M(u.value)}function D(){S.value&&s("add",a.value)}function T(){x.value.length!==0&&s("add",x.value)}const{handleCompositionStart:$,handleCompositionEnd:P,isComposingKeyEvent:O}=Kr();function R(z){O(z)||T()}function W(z){z.key==="Escape"&&O(z)&&z.stopPropagation()}return pn(async()=>{r.value=!0;try{if(i.defaultPath&&(await M(i.defaultPath),!l.value))return;const z=await i.getFsHome();z.home?await M(z.home):l.value=!0}catch{l.value=!0}finally{r.value=!1}}),An(()=>{y&&clearTimeout(y)}),(z,G)=>(b(),fe(h(La),{open:o.value,"onUpdate:open":G[5]||(G[5]=K=>o.value=K),title:h(n)("workspace.addTitle"),size:"lg",height:"fixed",padded:!1,onClose:G[6]||(G[6]=K=>s("close"))},{default:he(()=>[C("div",EUe,[l.value?ne("",!0):(b(),I(Be,{key:0},[C("div",TUe,[V(h(rn),{size:"sm",disabled:!u.value,label:h(n)("workspace.up"),tooltip:h(n)("workspace.up"),onClick:N},{default:he(()=>[V(h(Ce),{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label","tooltip"]),C("div",LUe,[(b(!0),I(Be,null,yt(E.value,(K,H)=>(b(),I(Be,{key:K.path},[H>1?(b(),I("span",NUe,"/")):ne("",!0),C("button",{class:De(["crumb",{last:H===E.value.length-1}]),onClick:q=>M(K.path)},B(K.label),11,FUe)],64))),128))])]),r.value?ne("",!0):(b(),I("div",BUe,[V(h(Ce),{class:"filter-icon",name:"search",size:"md"}),Bn(C("input",{"onUpdate:modelValue":G[0]||(G[0]=K=>d.value=K),class:"filter-input",type:"text",placeholder:h(n)("workspace.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:G[1]||(G[1]=It(()=>{},["stop"]))},null,40,$Ue),[[_o,d.value]]),f.value?(b(),fe(h(Bi),{key:0,size:"sm"})):ne("",!0)])),C("div",DUe,[r.value?(b(),I("div",RUe,B(h(n)("workspace.browsing")),1)):g.value?(b(),I(Be,{key:1},[(b(!0),I(Be,null,yt(p.value,K=>(b(),I("button",{key:K.path,class:"folder-row",onClick:H=>M(K.path)},[V(h(Ce),{class:"dir-icon",name:"folder-closed",size:"sm"}),C("span",OUe,B(K.rel),1)],8,zUe))),128)),!f.value&&p.value.length===0?(b(),I("div",PUe,B(h(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&p.value.length===0?(b(),I("div",jUe,B(h(n)("workspace.searching")),1)):ne("",!0)],64)):(b(),I(Be,{key:2},[(b(!0),I(Be,null,yt(c.value,K=>(b(),I("button",{key:K.path,class:"folder-row",onClick:H=>_(K)},[V(h(Ce),{class:"dir-icon",name:"folder-closed",size:"sm"}),C("span",WUe,B(K.name),1)],8,HUe))),128)),c.value.length===0?(b(),I("div",qUe,B(h(n)("workspace.noSubfolders")),1)):ne("",!0)],64))])],64)),C("div",{class:De(["paste-section",{"paste-only":l.value}])},[!l.value&&!A.value?(b(),fe(h(jt),{key:0,variant:"ghost",size:"sm",onClick:G[2]||(G[2]=K=>A.value=!0)},{default:he(()=>[Ue(B(h(n)("workspace.pasteToggle")),1)]),_:1})):(b(),fe(h(oU),{key:1,label:h(n)("workspace.pathLabel")},{default:he(()=>[C("div",UUe,[C("div",KUe,[V(h(io),{modelValue:v.value,"onUpdate:modelValue":G[3]||(G[3]=K=>v.value=K),placeholder:h(n)("workspace.pathPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:[qr(It(R,["stop"]),["enter"]),W],onCompositionstart:h($),onCompositionend:h(P)},null,8,["modelValue","placeholder","onKeydown","onCompositionstart","onCompositionend"])]),V(h(rn),{disabled:x.value.length===0,label:h(n)("workspace.add"),tooltip:h(n)("workspace.add"),onClick:T},{default:he(()=>[V(h(Ce),{name:"plus",size:"md"})]),_:1},8,["disabled","label","tooltip"])])]),_:1},8,["label"]))],2),e.error?(b(),I("div",VUe,B(e.error),1)):ne("",!0),C("div",ZUe,[V(h(gn),{text:a.value},{default:he(()=>[l.value?ne("",!0):(b(),fe(h(jt),{key:0,variant:"primary",disabled:!S.value,onClick:D},{default:he(()=>[Ue(B(h(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),V(h(jt),{variant:"secondary",onClick:G[4]||(G[4]=K=>s("close"))},{default:he(()=>[Ue(B(h(n)("workspace.cancel")),1)]),_:1})]),C("div",GUe,B(h(n)("workspace.browseHint")),1)])]),_:1},8,["open","title"]))}}),XUe=vt(JUe,[["__scopeId","data-v-fea98be5"]]),eKe={key:0,class:"confirm-dialog__message"},tKe=tt({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmLabel:{},cancelLabel:{},variant:{default:"danger"},loading:{type:Boolean}},emits:["update:open","confirm","cancel"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt();function o(){n.loading||(i("update:open",!1),i("cancel"))}function r(l){if(l.key!=="Enter"||!n.open||n.loading)return;const a=l.target;a instanceof HTMLButtonElement||a instanceof HTMLAnchorElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLInputElement||(l.preventDefault(),i("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",r),Gn(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(l,a)=>(b(),fe(h(La),{open:e.open,title:e.title,height:"auto","initial-focus":".confirm-dialog__confirm","close-on-esc":!e.loading,"close-on-overlay":!e.loading,"onUpdate:open":a[1]||(a[1]=u=>i("update:open",u)),onClose:o},{foot:he(()=>[V(h(jt),{variant:"secondary",disabled:e.loading,onClick:o},{default:he(()=>[Ue(B(e.cancelLabel??h(s)("common.cancel")),1)]),_:1},8,["disabled"]),V(h(jt),{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=u=>i("confirm"))},{default:he(()=>[Ue(B(e.confirmLabel??h(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:he(()=>[e.message?(b(),I("p",eKe,B(e.message),1)):ne("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),nKe=vt(tKe,[["__scopeId","data-v-aa5422da"]]),iKe=tt({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:i,runAction:s}=Hu();function o(){s()}return(r,l)=>h(t)!==null?(b(),fe(nKe,{key:0,open:!0,title:h(t).title,message:h(t).message,"confirm-label":h(t).confirmLabel,"cancel-label":h(t).cancelLabel,variant:h(t).variant,loading:h(n),onConfirm:o,onCancel:l[0]||(l[0]=a=>h(i)(!1))},null,8,["title","message","confirm-label","cancel-label","variant","loading"])):ne("",!0)}}),sKe={class:"rows"},oKe={class:"row"},rKe={class:"row"},lKe={class:"row"},aKe={class:"row"},uKe={class:"row"},cKe={class:"row"},dKe={class:"ctx-text"},fKe={key:0,class:"bar"},hKe={class:"row"},pKe=tt({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},swarmMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=Z(!0),r=F(()=>i.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(i.status.ctxUsed/i.status.ctxMax*100)))),l=F(()=>i.status.ctxMax>0?n("status.statusContextValue",{used:Ia(i.status.ctxUsed),max:Ia(i.status.ctxMax),pct:r.value}):n("status.statusNone"));function a(g){return n(g==="yolo"?"status.permissionYolo":g==="auto"?"status.permissionAuto":"status.permissionManual")}const u=F(()=>{const g=i.status.permission;return g==="auto"?"var(--color-danger)":g==="yolo"?"var(--color-warning)":"var(--color-text)"}),c=F(()=>i.planMode?n("status.planOn"):n("status.planOff")),d=F(()=>i.swarmMode?n("status.swarmOn"):n("status.swarmOff")),f=F(()=>typeof i.costUsd=="number"&&i.costUsd>0),p=F(()=>f.value?`$${i.costUsd.toFixed(4)}`:n("status.statusNone"));return(g,m)=>(b(),fe(h(La),{open:o.value,"onUpdate:open":m[0]||(m[0]=y=>o.value=y),title:h(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=y=>s("close"))},{default:he(()=>[C("dl",sKe,[C("div",oKe,[C("dt",null,B(h(n)("status.statusModel")),1),C("dd",null,B(e.status.model),1)]),C("div",rKe,[C("dt",null,B(h(n)("status.statusThinking")),1),C("dd",null,B(e.thinking),1)]),C("div",lKe,[C("dt",null,B(h(n)("status.statusPermission")),1),C("dd",{style:Vt({color:u.value})},B(a(e.status.permission)),5)]),C("div",aKe,[C("dt",null,B(h(n)("status.statusPlanMode")),1),C("dd",{class:De({"plan-on":e.planMode})},B(c.value),3)]),C("div",uKe,[C("dt",null,B(h(n)("status.statusSwarmMode")),1),C("dd",{class:De({"swarm-on":e.swarmMode})},B(d.value),3)]),C("div",cKe,[C("dt",null,B(h(n)("status.statusContext")),1),C("dd",null,[C("span",dKe,B(l.value),1),e.status.ctxMax>0?(b(),I("span",fKe,[C("i",{style:Vt({width:r.value+"%"})},null,4)])):ne("",!0)])]),C("div",hKe,[C("dt",null,B(h(n)("status.statusCost")),1),C("dd",null,B(p.value),1)])])]),_:1},8,["open","title"]))}}),gKe=vt(pKe,[["__scopeId","data-v-340d1b31"]]),mKe={key:0,class:"actions"},vKe=["onClick"],yKe=["onClick"],bKe={key:1,class:"details"},kKe=tt({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt();function o(_){return typeof _=="object"&&_!==null}function r(_){return o(_)?_.title:_}function l(_){return o(_)?_.message??"":""}function a(_){return o(_)?_.details:void 0}function u(_){return o(_)?_.severity==="error":_.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|失败|failed/i.test(_)}function c(_){return o(_)?_.severity==="error"?"danger":_.severity==="success"?"success":_.severity==="info"?"info":"warning":u(_)?"danger":"warning"}function d(_){return o(_)?`notice:${_.severity}:${_.title}:${_.message??""}:${JSON.stringify(_.details??[])}`:`text:${_}`}function f(_){if(!o(_))return _;const N=[_.title];_.message&&N.push(_.message);const D=_.details??[];if(D.length>0){N.push("",`${s("warnings.diagnostics")}:`);for(const T of D)N.push(`${T.label}: ${T.value}`)}return N.join(` -`)}let p=1;const g=Z([]),m=new Map,y=new Map;function w(_){const N=u(_)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?N+5e3:N}function k(_,N){const D=m.get(_)??{handle:null,deadline:0,remaining:0};D.handle=setTimeout(()=>M(_),N),D.deadline=Date.now()+N,m.set(_,D)}function A(_){const N=m.get(_);N&&N.handle!==null&&clearTimeout(N.handle),m.delete(_)}function v(_){const N=m.get(_);!N||N.handle===null||(clearTimeout(N.handle),N.handle=null,N.remaining=Math.max(0,N.deadline-Date.now()))}function x(_){if(g.value.find(T=>T.id===_)?.detailsOpen)return;const D=m.get(_);!D||D.handle!==null||k(_,D.remaining)}function E(_){_.detailsOpen=!_.detailsOpen,_.detailsOpen?v(_.id):x(_.id)}async function S(_){if(!await ro(f(_.warning)))return;_.copied=!0;const D=y.get(_.id);D&&clearTimeout(D),y.set(_.id,setTimeout(()=>{_.copied=!1,y.delete(_.id)},1400))}function M(_){A(_);const N=y.get(_);N&&clearTimeout(N),y.delete(_);const D=g.value.findIndex(T=>T.id===_);D!==-1&&(g.value=g.value.filter(T=>T.id!==_),i("dismiss",D))}return Qe(()=>n.warnings,_=>{const N=[...g.value];g.value=_.map(D=>{const T=d(D),$=N.findIndex(R=>R.key===T),P=$===-1?void 0:N.splice($,1)[0];if(P)return P.warning=D,P;const O={id:p++,key:T,warning:D,detailsOpen:!1,copied:!1};return k(O.id,w(D)),O});for(const D of N){A(D.id);const T=y.get(D.id);T&&clearTimeout(T),y.delete(D.id)}},{immediate:!0,flush:"post"}),An(()=>{m.forEach(_=>{_.handle!==null&&clearTimeout(_.handle)}),m.clear(),y.forEach(_=>clearTimeout(_)),y.clear()}),(_,N)=>(b(),fe(QI,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:he(()=>[(b(!0),I(Be,null,yt(g.value,D=>(b(),fe(h(OU),{key:D.id,variant:c(D.warning),title:r(D.warning),message:l(D.warning),"dismiss-label":h(s)("warnings.dismiss"),onDismiss:T=>M(D.id),onPointerenter:T=>v(D.id),onPointerleave:T=>x(D.id)},{default:he(()=>[a(D.warning)?.length?(b(),I("div",mKe,[C("button",{class:"link",type:"button",onClick:T=>E(D)},B(D.detailsOpen?h(s)("warnings.hideDetails"):h(s)("warnings.showDetails")),9,vKe),C("button",{class:"link",type:"button",onClick:T=>S(D)},B(D.copied?h(s)("warnings.copied"):h(s)("warnings.copyDetails")),9,yKe)])):ne("",!0),D.detailsOpen&&a(D.warning)?.length?(b(),I("dl",bKe,[(b(!0),I(Be,null,yt(a(D.warning),T=>(b(),I("div",{key:`${T.label}:${T.value}`,class:"detail-row"},[C("dt",null,B(T.label),1),C("dd",null,B(T.value),1)]))),128))])):ne("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),AKe=vt(kKe,[["__scopeId","data-v-ac44e9ef"]]),CKe={class:"topbar"},wKe={class:"wsq"},xKe=["aria-label"],_Ke={class:"tb-path"},SKe={class:"ws"},MKe={class:"se"},IKe={class:"tb-sub"},EKe=tt({__name:"MobileTopBar",props:{workspace:{default:null},sessionTitle:{default:""},running:{type:Boolean,default:!1},branch:{default:""},sessionCount:{default:0}},emits:["openSwitcher","openSettings"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=F(()=>{const a=i.workspace,c=(a?.name||a?.root||"").trim().charAt(0);return c?c.toUpperCase():"K"}),r=F(()=>i.workspace?.name??n("workspace.noWorkspace")),l=F(()=>i.running?n("mobile.running"):n("mobile.idle"));return(a,u)=>(b(),I("div",CKe,[C("span",wKe,B(o.value),1),C("button",{type:"button",class:"tb-mid","aria-label":h(n)("mobile.openSwitcher"),onClick:u[0]||(u[0]=c=>s("openSwitcher"))},[C("span",_Ke,[C("span",SKe,B(r.value),1),e.sessionTitle?(b(),I(Be,{key:0},[u[2]||(u[2]=C("span",{class:"sl"},"/",-1)),C("span",MKe,B(e.sessionTitle),1)],64)):ne("",!0),u[3]||(u[3]=C("span",{class:"cv"},"⌄",-1))]),C("span",IKe,[C("span",{class:De(["rd",{on:e.running}])},null,2),C("span",null,B(l.value),1),e.branch?(b(),I(Be,{key:0},[Ue(" · "+B(e.branch),1)],64)):ne("",!0),e.sessionCount>0?(b(),I(Be,{key:1},[Ue(" · "+B(h(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):ne("",!0)])],8,xKe),V(h(rn),{size:"lg",label:h(n)("mobile.openSettings"),onClick:u[1]||(u[1]=c=>s("openSettings"))},{default:he(()=>[V(h(Ce),{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),TKe=vt(EKe,[["__scopeId","data-v-7f357087"]]),LKe={key:0,class:"sheet-root"},NKe=["aria-label"],FKe=["aria-label"],BKe={key:0,class:"sheet-head"},$Ke={class:"sheet-title"},DKe={class:"sheet-body"},RKe=tt({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(){s("update:modelValue",!1),s("close")}function r(l){l.key==="Escape"&&i.closeOnEsc&&o()}return Qe(()=>i.modelValue,l=>{typeof document>"u"||(l?document.addEventListener("keydown",r):document.removeEventListener("keydown",r))},{immediate:!0}),An(()=>{typeof document<"u"&&document.removeEventListener("keydown",r)}),(l,a)=>(b(),fe(ys,{name:"sheet"},{default:he(()=>[e.modelValue?(b(),I("div",LKe,[C("div",{class:"sheet-scrim",onClick:o}),C("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||h(n)("mobile.sheetLabel")},[C("button",{type:"button",class:"sheet-grab","aria-label":h(n)("mobile.closeSheet"),onClick:o},null,8,FKe),e.title?(b(),I("div",BKe,[C("span",$Ke,B(e.title),1)])):ne("",!0),C("div",DKe,[En(l.$slots,"default",{},void 0,!0)])],8,NKe)])):ne("",!0)]),_:3}))}}),QD=vt(RKe,[["__scopeId","data-v-c3d5dadc"]]),zKe={class:"mlist"},OKe={key:0,class:"mempty"},PKe=["onClick"],jKe={class:"mgh-main"},HKe={class:"mgh-name"},WKe={class:"mgh-path"},qKe={key:2,class:"att"},UKe={key:0,class:"mempty small"},KKe=["onClick"],VKe={class:"m"},ZKe={class:"s"},GKe={key:0,class:"att"},QKe={key:1,class:"mshow-more-row"},YKe=["disabled","onClick"],JKe={key:1,class:"mshow-more-sep","aria-hidden":"true"},XKe=["onClick"],eVe=tt({__name:"MobileSwitcherSheet",props:{modelValue:{type:Boolean},groups:{},activeWorkspaceId:{default:null},activeId:{},attentionBySession:{default:()=>({})},attentionByWorkspace:{default:()=>({})}},emits:["update:modelValue","select","create","createInWorkspace","addWorkspace","rename","archive","deleteWorkspace","loadMore"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(){s("update:modelValue",!1)}function r($){s("select",$),o()}function l($){s("createInWorkspace",$),o()}function a(){s("create"),o()}function u(){s("addWorkspace"),o()}const c=Z(new Set);function d($){return c.value.has($)}function f($){const P=new Set(c.value);P.has($)?P.delete($):P.add($),c.value=P,x.value=null,_.value=null}const p=Z(new Map);function g($){return p.value.get($.workspace.id)??$.initialCount}function m($){const P=$.sessions.slice(0,g($));if(i.activeId&&!P.some(O=>O.id===i.activeId)){const O=$.sessions.find(R=>R.id===i.activeId);if(O)return[...P,O]}return P}function y($){return $.sessions.length>g($)||$.hasMore||$.loadingMore}function w($){return g($)>$.initialCount}function k($){const P=i.groups.find(W=>W.workspace.id===$);if(!P)return;const O=g(P)+tk,R=new Map(p.value);R.set($,O),p.value=R,P.sessions.length<O&&P.hasMore&&s("loadMore",$)}function A($){if(!p.value.has($))return;const P=new Map(p.value);P.delete($),p.value=P}function v($){return i.attentionByWorkspace[$]??0}const x=Z(null);function E($){x.value=x.value===$?null:$,_.value=null}function S($){x.value=null;const O=(typeof window<"u"?window.prompt(n("sidebar.rename"),$.title):null)?.trim();O&&s("rename",$.id,O)}function M($){x.value=null,s("archive",$)}const _=Z(null);function N($){_.value=_.value===$?null:$,x.value=null}function D($){ro($.root),_.value=null}function T($){_.value=null,s("deleteWorkspace",$.id)}return($,P)=>(b(),fe(QD,{"model-value":e.modelValue,"onUpdate:modelValue":P[2]||(P[2]=O=>s("update:modelValue",O))},{default:he(()=>[C("button",{type:"button",class:"newrow",onClick:a},[V(h(Ce),{name:"message",size:"sm"}),Ue(" "+B(h(n)("sidebar.newChat")),1)]),C("button",{type:"button",class:"newrow secondary",onClick:u},[V(h(Ce),{name:"folder",size:"sm"}),Ue(" "+B(h(n)("sidebar.newWorkspace")),1)]),C("div",zKe,[e.groups.length===0?(b(),I("div",OKe,B(h(n)("workspace.noWorkspace")),1)):ne("",!0),(b(!0),I(Be,null,yt(e.groups,O=>(b(),I("div",{key:O.workspace.id,class:"mgroup"},[C("div",{class:De(["mgh",{on:O.workspace.id===e.activeWorkspaceId}]),onClick:R=>f(O.workspace.id)},[d(O.workspace.id)?(b(),fe(h(Ce),{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(b(),fe(h(Ce),{key:1,class:"mgh-folder",name:"folder",size:"sm"})),C("div",jKe,[C("span",HKe,B(O.workspace.name),1),V(h(gn),{text:O.workspace.root},{default:he(()=>[C("span",WKe,B(O.workspace.shortPath),1)]),_:2},1032,["text"])]),d(O.workspace.id)&&v(O.workspace.id)>0?(b(),I("span",qKe,B(v(O.workspace.id)),1)):ne("",!0),V(h(rn),{size:"lg",class:"mgh-more",label:h(n)("sidebar.options"),onClick:It(R=>N(O.workspace.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),V(h(rn),{size:"lg",class:"mgh-add",label:h(n)("workspace.newInGroup"),onClick:It(R=>l(O.workspace.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),_.value===O.workspace.id?(b(),fe(h(cl),{key:3,class:"kmenu wsmenu",onClick:P[0]||(P[0]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{size:"lg",onClick:R=>D(O.workspace)},{default:he(()=>[Ue(B(h(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),V(h(bn),{size:"lg",danger:"",onClick:R=>T(O.workspace)},{default:he(()=>[Ue(B(h(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):ne("",!0)],10,PKe),Bn(C("div",null,[O.sessions.length===0?(b(),I("div",UKe,B(h(n)("sidebar.noSessions")),1)):ne("",!0),(b(!0),I(Be,null,yt(m(O),R=>(b(),I("div",{key:R.id,class:De(["srow",{cur:R.id===e.activeId}]),onClick:W=>r(R.id)},[C("div",VKe,[C("div",{class:De(["t",{run:R.busy,aborted:!R.busy&&(e.attentionBySession[R.id]??0)===0&&R.lastTurnReason==="failed"}])},B(R.title),3),C("div",ZKe,B(R.time),1)]),(e.attentionBySession[R.id]??0)>0?(b(),I("span",GKe,B(e.attentionBySession[R.id]),1)):ne("",!0),V(h(rn),{size:"lg",class:"kb",label:h(n)("sidebar.options"),onClick:It(W=>E(R.id),["stop"])},{default:he(()=>[V(h(Ce),{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),x.value===R.id?(b(),fe(h(cl),{key:1,class:"kmenu",onClick:P[1]||(P[1]=It(()=>{},["stop"]))},{default:he(()=>[V(h(bn),{size:"lg",onClick:W=>S(R)},{default:he(()=>[Ue(B(h(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),V(h(bn),{size:"lg",onClick:W=>M(R.id)},{default:he(()=>[Ue(B(h(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):ne("",!0)],10,KKe))),128)),y(O)||w(O)?(b(),I("div",QKe,[y(O)?(b(),I("button",{key:0,type:"button",class:"mshow-more",disabled:O.loadingMore,onClick:It(R=>k(O.workspace.id),["stop"])},[V(h(Ce),{name:"chevron-down",size:"sm"}),Ue(" "+B(O.loadingMore?h(n)("sidebar.loadingMore"):h(n)("sidebar.showMore")),1)],8,YKe)):ne("",!0),y(O)&&w(O)?(b(),I("span",JKe,"·")):ne("",!0),w(O)?(b(),I("button",{key:2,type:"button",class:"mshow-more",onClick:It(R=>A(O.workspace.id),["stop"])},[V(h(Ce),{name:"chevron-up",size:"sm"}),Ue(" "+B(h(n)("sidebar.showLess")),1)],8,XKe)):ne("",!0)])):ne("",!0)],512),[[rs,!d(O.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),tVe=vt(eVe,[["__scopeId","data-v-67278201"]]),nVe={class:"group-title"},iVe={class:"srow-main"},sVe={class:"srow-label"},oVe={class:"srow-sub"},rVe={class:"srow read-only"},lVe={class:"srow-main"},aVe={class:"srow-label"},uVe={key:0,class:"srow-sub"},cVe={class:"cache-note"},dVe=["aria-checked"],fVe={class:"srow-main"},hVe={class:"srow-label"},pVe={class:"srow-sub"},gVe=["aria-checked"],mVe={class:"srow-main"},vVe={class:"srow-label"},yVe={class:"srow-sub"},bVe={class:"srow-main"},kVe={class:"srow-label"},AVe={class:"srow-sub"},CVe=["aria-checked"],wVe={class:"srow-main"},xVe={class:"srow-label"},_Ve={class:"srow-sub"},SVe={class:"srow-main"},MVe={class:"srow-label"},IVe={class:"srow read-only"},EVe={class:"srow-main"},TVe={class:"srow-label"},LVe={class:"srow-sub"},NVe=["aria-label"],FVe={class:"group-title"},BVe={class:"srow-main"},$Ve={class:"srow-label"},DVe={class:"srow-sub"},RVe={class:"srow read-only pref"},zVe={class:"srow-main"},OVe={class:"srow-label"},PVe={class:"srow read-only pref"},jVe={class:"srow-main"},HVe={class:"srow-label"},WVe={class:"srow read-only pref"},qVe={class:"srow-main"},UVe={class:"srow-label"},KVe={key:2,class:"srow read-only acct-profile"},VVe={class:"acct-avatar","aria-hidden":"true"},ZVe=["src"],GVe={class:"srow-main"},QVe={class:"acct-name-row"},YVe={class:"srow-label"},JVe={class:"srow-sub"},XVe={class:"srow-main"},eZe={class:"srow-label"},tZe={class:"srow-main"},nZe={class:"srow-label"},iZe={key:5,class:"srow read-only"},sZe={class:"srow-main"},oZe={class:"srow-label"},rZe={class:"srow-val dim"},lZe={class:"arch-subhead"},aZe={class:"arch-count"},uZe={class:"arch-tools"},cZe={key:0,class:"arch-empty"},dZe={class:"arch-meta"},fZe={class:"arch-name"},hZe={class:"arch-time"},pZe={key:2,class:"arch-empty"},gZe=100,mZe=tt({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},initialView:{},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goalActive:{type:Boolean},swarmMode:{type:Boolean},colorScheme:{default:"system"},fontScale:{default:"medium"},managedProviderStatus:{default:null},managedUserInfo:{default:null},serverVersion:{default:""},models:{default:()=>[]}},emits:["update:modelValue","pickModel","setThinking","togglePlan","toggleGoal","focusGoal","toggleSwarm","setPermission","setColorScheme","setFontScale","login","logout"],setup(e,{emit:t}){const{t:n}=Bt(),{isConfirmOpen:i}=Hu(),s=e,o=t;function r(ce){o("setColorScheme",ce)}const l=["manual","yolo","auto"],a=F(()=>s.models?.find(ce=>ce.id===s.status?.modelId)),u=F(()=>lv(a.value)),c=F(()=>Ap(a.value)),d=F(()=>wm(a.value,s.thinking)),f=F(()=>c.value.includes(d.value)?d.value:""),p=F(()=>c.value.map(ce=>({value:ce,label:g3(ce)}))),g=F(()=>s.planMode===!0),m=F(()=>s.goalMode===!0);function y(){if(s.goalActive){o("focusGoal");return}!m.value&&g.value&&o("togglePlan"),o("toggleGoal")}function w(){!g.value&&m.value&&o("toggleGoal"),o("togglePlan")}const k=F(()=>s.swarmMode===!0),A=Z(!1);Qe(()=>s.managedUserInfo?.avatar,()=>{A.value=!1});const v=F(()=>!!s.managedUserInfo?.avatar&&!A.value),x=F(()=>s.managedUserInfo?.userLevelName?.trim()??""),E=F(()=>{const ce=s.status.permission;return ce==="auto"?"var(--color-danger)":ce==="yolo"?"var(--color-warning)":"var(--color-text-muted)"}),S=F(()=>{const ce=s.status.permission,pe=n(ce==="yolo"?"mobile.permYoloSub":ce==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${ce} · ${pe}`}),M=F(()=>s.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(s.status.ctxUsed/s.status.ctxMax*100))):0),_=F(()=>s.status.ctxMax>0?`${Ia(s.status.ctxUsed)}/${Ia(s.status.ctxMax)}`:n("status.statusNone"));function N(ce){o("setThinking",O5(a.value,ce))}function D(){const ce=l.indexOf(s.status.permission),pe=l[(ce+1)%l.length];o("setPermission",pe)}function T(){o("pickModel"),o("update:modelValue",!1)}function $(){o("login"),o("update:modelValue",!1)}function P(){o("logout"),o("update:modelValue",!1)}const O=Fa(),R=Z("main"),W=Z([]),z=Z(!1),G=Z(!1),K=Z(""),H=Z("archived-desc");async function q(){if(!z.value){z.value=!0,G.value=!1;try{const ce=[];let pe;for(;;){const Ne=await O.loadArchivedSessions({beforeId:pe,pageSize:gZe});if(ce.push(...Ne.items),!Ne.hasMore||Ne.items.length===0)break;const te=Ne.items.at(-1)?.id;if(te===void 0)break;pe=te}W.value=ce,G.value=!0}catch(ce){Dl("loadAllArchived failed",ce)}finally{z.value=!1}}}function X(){R.value="archived",K.value="",q()}Qe(()=>s.modelValue,ce=>{ce&&s.initialView==="archived"&&X()});function ee(){R.value="main"}const ue=F(()=>{const ce=K.value.trim().toLowerCase();let pe=W.value.filter(Ne=>Ne.archived===!0);return ce&&(pe=pe.filter(Ne=>Ne.title.toLowerCase().includes(ce))),pe=pe.slice(),H.value==="archived-desc"?pe.sort((Ne,te)=>(te.archivedAt??te.updatedAt).localeCompare(Ne.archivedAt??Ne.updatedAt)):H.value==="created-desc"?pe.sort((Ne,te)=>te.createdAt.localeCompare(Ne.createdAt)):pe.sort((Ne,te)=>Ne.title.localeCompare(te.title,"zh")),pe});async function ie(ce){await O.restoreSession(ce)&&(W.value=W.value.filter(Ne=>Ne.id!==ce))}function xe(ce){const pe=new Date(ce);if(Number.isNaN(pe.getTime()))return ce;const Ne=te=>String(te).padStart(2,"0");return`${pe.getFullYear()}-${Ne(pe.getMonth()+1)}-${Ne(pe.getDate())} ${Ne(pe.getHours())}:${Ne(pe.getMinutes())}`}return Qe(()=>s.modelValue,ce=>{ce||(R.value="main")}),(ce,pe)=>(b(),fe(QD,{"model-value":e.modelValue,title:h(n)("mobile.settingsTitle"),"close-on-esc":!h(i),"onUpdate:modelValue":pe[5]||(pe[5]=Ne=>o("update:modelValue",Ne))},{default:he(()=>[R.value==="main"?(b(),I(Be,{key:0},[C("div",nVe,B(h(n)("mobile.groupSession")),1),C("button",{type:"button",class:"srow",onClick:T},[C("span",iVe,[C("span",sVe,B(h(n)("status.statusModel")),1),C("span",oVe,B(e.status.model),1)]),pe[6]||(pe[6]=C("span",{class:"chev"},"›",-1))]),C("div",rVe,[C("span",lVe,[C("span",aVe,B(h(n)("status.statusThinking")),1),u.value==="unsupported"?(b(),I("span",uVe,B(h(n)("status.modeNotSupported")),1)):ne("",!0)]),c.value.length>1?(b(),fe(h(wo),{key:0,"model-value":f.value,options:p.value,size:"sm","onUpdate:modelValue":N},null,8,["model-value","options"])):(b(),I("span",{key:1,class:De(["srow-val",{dim:d.value==="off"}])},B(d.value==="off"?h(n)("status.planOff"):h(g3)(d.value)),3))]),C("div",cVe,B(h(n)("status.cacheNote")),1),C("button",{type:"button",class:"srow",role:"switch","aria-checked":g.value,onClick:w},[C("span",fVe,[C("span",hVe,B(h(n)("status.statusPlanMode")),1),C("span",pVe,B(h(n)("mobile.planModeSub")),1)]),C("span",{class:De(["toggle",{on:g.value}]),"aria-hidden":"true"},null,2)],8,dVe),e.goalActive?(b(),I("button",{key:1,type:"button",class:"srow",onClick:y},[C("span",bVe,[C("span",kVe,B(h(n)("status.goalLabel")),1),C("span",AVe,B(h(n)("mobile.goalModeSub")),1)]),V(h(Ce),{class:"srow-chevron",name:"chevron-right",size:"sm","aria-hidden":"true"})])):(b(),I("button",{key:0,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:y},[C("span",mVe,[C("span",vVe,B(h(n)("status.goalLabel")),1),C("span",yVe,B(h(n)("mobile.goalModeSub")),1)]),C("span",{class:De(["toggle",{on:m.value}]),"aria-hidden":"true"},null,2)],8,gVe)),C("button",{type:"button",class:"srow",role:"switch","aria-checked":k.value,onClick:pe[0]||(pe[0]=Ne=>o("toggleSwarm"))},[C("span",wVe,[C("span",xVe,B(h(n)("status.statusSwarmMode")),1),C("span",_Ve,B(h(n)("mobile.swarmModeSub")),1)]),C("span",{class:De(["toggle",{on:k.value}]),"aria-hidden":"true"},null,2)],8,CVe),C("button",{type:"button",class:"srow",onClick:D},[C("span",SVe,[C("span",MVe,B(h(n)("status.statusPermission")),1),C("span",{class:"srow-sub",style:Vt({color:E.value})},B(S.value),5)]),pe[7]||(pe[7]=C("span",{class:"chev"},"›",-1))]),C("div",IVe,[C("span",EVe,[C("span",TVe,B(h(n)("status.statusContext")),1),C("span",LVe,B(_.value),1)]),C("span",{class:"ctx-meter","aria-label":_.value},[C("i",{style:Vt({width:M.value+"%"})},null,4)],8,NVe)]),C("div",FVe,B(h(n)("mobile.groupApp")),1),C("button",{type:"button",class:"srow",onClick:X},[C("span",BVe,[C("span",$Ve,B(h(n)("mobile.archivedSessions")),1),C("span",DVe,B(h(n)("mobile.archivedSessionsSub")),1)]),pe[8]||(pe[8]=C("span",{class:"chev"},"›",-1))]),C("div",RVe,[C("span",zVe,[C("span",OVe,B(h(n)("theme.colorSchemeLabel")),1)]),V(h(wo),{"model-value":e.colorScheme??"system",options:[{value:"light",label:h(n)("theme.light"),icon:"light-mode"},{value:"dark",label:h(n)("theme.dark"),icon:"dark-mode"},{value:"system",label:h(n)("theme.system")}],"onUpdate:modelValue":r},null,8,["model-value","options"])]),C("div",PVe,[C("span",jVe,[C("span",HVe,B(h(n)("sidebar.language")),1)]),V(VD)]),C("div",WVe,[C("span",qVe,[C("span",UVe,B(h(n)("settings.uiFontSize")),1)]),V(h(wo),{"model-value":e.fontScale,options:[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],"aria-label":h(n)("settings.uiFontSize"),"onUpdate:modelValue":pe[1]||(pe[1]=Ne=>o("setFontScale",Ne))},null,8,["model-value","aria-label"])]),e.managedProviderStatus==="authenticated"?(b(),I("div",KVe,[C("span",VVe,[v.value?(b(),I("img",{key:0,src:e.managedUserInfo?.avatar,alt:"",onError:pe[2]||(pe[2]=Ne=>A.value=!0)},null,40,ZVe)):(b(),fe(h(Ce),{key:1,name:"user",size:"md"}))]),C("span",GVe,[C("span",QVe,[C("span",YVe,B(e.managedUserInfo?.nickname||h(n)("sidebar.defaultUserName")),1),x.value?(b(),fe(h(Hl),{key:0,class:"acct-level",variant:"neutral",size:"sm"},{default:he(()=>[Ue(B(x.value),1)]),_:1})):ne("",!0)]),C("span",JVe,B(h(n)("settings.signedIn")),1)])])):ne("",!0),e.managedProviderStatus==="authenticated"?(b(),I("button",{key:3,type:"button",class:"srow acct out",onClick:P},[C("span",XVe,[C("span",eZe,B(h(n)("sidebar.signOut")),1)])])):(b(),I("button",{key:4,type:"button",class:"srow acct in",onClick:$},[C("span",tZe,[C("span",nZe,B(h(n)("sidebar.signIn")),1)])])),e.serverVersion?(b(),I("div",iZe,[C("span",sZe,[C("span",oZe,B(h(n)("settings.serverVersion")),1)]),C("span",rZe,B(e.serverVersion),1)])):ne("",!0)],64)):(b(),I(Be,{key:1},[C("div",lZe,[C("button",{type:"button",class:"arch-back",onClick:ee},[pe[9]||(pe[9]=C("span",{class:"chev back"},"‹",-1)),Ue(" "+B(h(n)("mobile.archivedBack")),1)]),C("span",aZe,B(h(n)("mobile.sessionCount",{n:ue.value.length})),1)]),C("div",uZe,[V(h(io),{class:"arch-search-input","model-value":K.value,size:"sm",placeholder:h(n)("settings.archivedSearch"),"onUpdate:modelValue":pe[3]||(pe[3]=Ne=>K.value=Ne)},null,8,["model-value","placeholder"]),V(h(wo),{size:"sm","model-value":H.value,options:[{value:"archived-desc",label:h(n)("settings.archivedSortArchived")},{value:"created-desc",label:h(n)("settings.archivedSortCreated")},{value:"name-asc",label:h(n)("settings.archivedSortName")}],"onUpdate:modelValue":pe[4]||(pe[4]=Ne=>H.value=Ne)},null,8,["model-value","options"])]),z.value?(b(),I("div",cZe,B(h(n)("settings.archivedLoadingAll")),1)):ue.value.length>0?(b(!0),I(Be,{key:1},yt(ue.value,Ne=>(b(),I("div",{key:Ne.id,class:"arch-row"},[C("div",dZe,[C("div",fZe,B(Ne.title),1),C("div",hZe,B(h(n)("settings.archivedAt",{time:xe(Ne.archivedAt??Ne.updatedAt)})),1)]),V(h(jt),{variant:"secondary",size:"sm",onClick:te=>ie(Ne.id)},{default:he(()=>[Ue(B(h(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(b(),I("div",pZe,B(W.value.length===0?h(n)("settings.archivedEmpty"):h(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title","close-on-esc"]))}}),vZe=vt(mZe,[["__scopeId","data-v-81e94fd3"]]),yZe=["mask"],bZe=tt({__name:"BrandLogo",props:{size:{default:64}},setup(e){const t=`bl-eyes-${Zz()}`,n=Z(null);let i;function s(){const o=n.value;o&&(o.classList.remove("blink-now"),o.getBoundingClientRect(),o.classList.add("blink-now"),clearTimeout(i),i=setTimeout(()=>o.classList.remove("blink-now"),300))}return Gn(()=>clearTimeout(i)),(o,r)=>(b(),I("svg",{ref_key:"logoRef",ref:n,class:"brand-logo",style:Vt({width:`${e.size}px`,height:`${e.size*22/32}px`}),viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Kimi Code",onClick:s},[C("defs",null,[C("mask",{id:t,maskUnits:"userSpaceOnUse"},[...r[0]||(r[0]=[C("rect",{x:"0",y:"0",width:"32",height:"22",fill:"#fff"},null,-1),C("g",{class:"ch-eyes",fill:"#000"},[C("rect",{class:"ch-eye",x:"11.8",y:"7",width:"2.8",height:"8",rx:"1.4"}),C("rect",{class:"ch-eye",x:"17.4",y:"7",width:"2.8",height:"8",rx:"1.4"})],-1)])])]),C("rect",{x:"1",y:"1",width:"30",height:"20",rx:"6",fill:"var(--logo)",mask:`url(#${t})`},null,8,yZe)],4))}}),j8=vt(bZe,[["__scopeId","data-v-f04205a8"]]),kZe={key:0,class:"ls-done-card"},AZe={class:"ls-done-badge"},CZe={class:"ls-card-text"},wZe={class:"ls-card-title"},xZe={class:"ls-card-hint"},_Ze={key:1,class:"ls-cards"},SZe={class:"ls-card-text"},MZe={class:"ls-card-title"},IZe={class:"ls-reco"},EZe={class:"ls-card-hint"},TZe={class:"ls-card-logo ls-card-icon"},LZe={class:"ls-card-text"},NZe={class:"ls-card-title"},FZe={class:"ls-card-hint"},BZe={key:2,class:"ls-flow"},$Ze={key:0,class:"ls-center"},DZe={class:"ls-center-text"},RZe={key:1,class:"ls-device"},zZe={class:"ls-lead"},OZe=["href"],PZe={class:"ls-code-row"},jZe=["title"],HZe={class:"ls-status"},WZe={class:"ls-status-text"},qZe={class:"ls-countdown"},UZe={key:2,class:"ls-center"},KZe={class:"ls-center-text ls-success-text"},VZe={class:"ls-center-hint"},ZZe={class:"ls-center"},GZe={class:"ls-center-text ls-err-text"},QZe={class:"ls-center-hint"},YZe={class:"ls-actions"},JZe={class:"ls-center"},XZe={class:"ls-center-text ls-warn-text"},eGe={class:"ls-center-hint"},tGe={class:"ls-actions"},nGe=tt({__name:"OnboardingLoginStep",props:{authReady:{type:Boolean},onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["success","addProvider"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=Z("choice"),{step:r,pollError:l,flow:a,secondsLeft:u,startFlow:c,cancelFlow:d}=r$({onStartOAuthLogin:i.onStartOAuthLogin,onPollOAuthLogin:i.onPollOAuthLogin,onCancelOAuthLogin:i.onCancelOAuthLogin,onSuccess:()=>s("success")}),f=Z(!1);function p(){o.value="flow",c()}function g(){d(),o.value="choice"}async function m(){!a.value||!await ro(a.value.verificationUriComplete)||(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}function y(w){const k=Math.floor(w/60),A=w%60;return`${k}:${String(A).padStart(2,"0")}`}return(w,k)=>e.authReady?(b(),I("div",kZe,[C("span",AZe,[V(h(Ce),{name:"check",size:"sm"})]),C("div",CZe,[C("div",wZe,B(h(n)("onboarding.login.loggedInTitle")),1),C("div",xZe,B(h(n)("onboarding.login.loggedInHint")),1)])])):o.value==="choice"?(b(),I("div",_Ze,[C("button",{class:"ls-card",type:"button",onClick:p},[V(j8,{size:40,class:"ls-card-logo"}),C("div",SZe,[C("div",MZe,[Ue(B(h(n)("onboarding.login.kimiTitle"))+" ",1),C("span",IZe,B(h(n)("onboarding.login.recommended")),1)]),C("div",EZe,B(h(n)("onboarding.login.kimiHint")),1)]),V(h(Ce),{name:"chevron-right",size:"lg",class:"ls-card-chevron"})]),C("button",{class:"ls-card",type:"button",onClick:k[0]||(k[0]=A=>s("addProvider"))},[C("span",TZe,[V(h(Ce),{name:"bolt",size:"lg"})]),C("div",LZe,[C("div",NZe,B(h(n)("onboarding.login.customProviderTitle")),1),C("div",FZe,B(h(n)("onboarding.login.customProviderHint")),1)]),V(h(Ce),{name:"chevron-right",size:"lg",class:"ls-card-chevron"})])])):(b(),I("div",BZe,[h(r)==="starting"?(b(),I("div",$Ze,[V(h(Bi),{size:"md"}),C("span",DZe,B(h(n)("login.starting")),1)])):h(r)==="device-code"&&h(a)?(b(),I("div",RZe,[C("div",zZe,B(h(n)("login.lead")),1),C("a",{class:"ls-primary",href:h(a).verificationUriComplete,target:"_blank",rel:"noopener noreferrer"},[Ue(B(h(n)("login.authorizeInBrowser"))+" ",1),V(h(Ce),{name:"external-link",size:"sm"})],8,OZe),C("div",PZe,[C("span",{class:"ls-link",title:h(a).verificationUriComplete},B(h(a).verificationUriComplete),9,jZe),V(h(jt),{class:De(["ls-copy",{"is-copied":f.value}]),variant:"secondary",size:"sm",onClick:m},{default:he(()=>[f.value?(b(),I(Be,{key:0},[V(h(Ce),{name:"check",size:"sm"}),Ue(" "+B(h(n)("login.copied")),1)],64)):(b(),I(Be,{key:1},[V(h(Ce),{name:"copy",size:"sm"}),Ue(" "+B(h(n)("login.copyLink")),1)],64))]),_:1},8,["class"])]),C("div",HZe,[V(h(Bi),{size:"sm",label:h(n)("login.waitingAuth")},null,8,["label"]),C("span",WZe,B(h(n)("login.waitingAutoClose")),1),C("span",qZe,B(y(h(u))),1)])])):h(r)==="success"?(b(),I("div",UZe,[V(h(cf),{kind:"success"}),C("span",KZe,B(h(n)("login.success")),1),C("span",VZe,B(h(n)("login.successHint")),1)])):h(r)==="expired"?(b(),I(Be,{key:3},[C("div",ZZe,[V(h(cf),{kind:"expired"}),C("span",GZe,B(h(n)("login.expiredTitle")),1),C("span",QZe,B(h(n)("login.expiredHint")),1)]),C("div",YZe,[V(h(jt),{variant:"secondary",onClick:g},{default:he(()=>[Ue(B(h(n)("onboarding.back")),1)]),_:1}),V(h(jt),{variant:"primary",onClick:h(c)},{default:he(()=>[Ue(B(h(n)("login.retry")),1)]),_:1},8,["onClick"])])],64)):h(r)==="error"?(b(),I(Be,{key:4},[C("div",JZe,[V(h(cf),{kind:"error"}),C("span",XZe,B(h(l)?h(n)("login.pollErrorTitle"):h(n)("login.errorTitle")),1),C("span",eGe,B(h(l)?h(n)("login.pollErrorHint"):h(n)("login.errorHint")),1)]),C("div",tGe,[V(h(jt),{variant:"secondary",onClick:g},{default:he(()=>[Ue(B(h(n)("onboarding.back")),1)]),_:1}),V(h(jt),{variant:"primary",onClick:h(c)},{default:he(()=>[Ue(B(h(n)("login.retry")),1)]),_:1},8,["onClick"])])],64)):ne("",!0)]))}}),iGe=vt(nGe,[["__scopeId","data-v-1ff21828"]]),sGe=["aria-label"],oGe={class:"wiz-body"},rGe={key:0,class:"wiz-step"},lGe={class:"wiz-title"},aGe={class:"wiz-sub"},uGe={class:"pref-group"},cGe={class:"pref-label"},dGe={class:"lang-cards"},fGe=["onClick"],hGe={class:"opt-label"},pGe={class:"pref-group"},gGe={class:"pref-label"},mGe={class:"theme-cards"},vGe=["onClick"],yGe={class:"opt-label"},bGe={key:1,class:"wiz-step"},kGe={class:"wiz-title"},AGe={class:"wiz-sub"},CGe={class:"wiz-step-fill"},wGe={class:"wiz-foot"},xGe={class:"wiz-foot-ghost"},_Ge=tt({__name:"OnboardingWizard",props:{authReady:{type:Boolean},onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["complete","loginSuccess","addProvider"],setup(e,{emit:t}){const{t:n,locale:i}=Bt(),s=e,o=t;function r(){o("addProvider")}const l=["preferences","login"],a=Z(0),u=F(()=>l[a.value]??"preferences");function c(){a.value<l.length-1&&a.value++}function d(){a.value>0&&a.value--}function f(w){i.value!==w&&Jb(w)}const{colorScheme:p,setColorScheme:g}=YT(),m=[{value:"system",labelKey:"theme.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function y(){o("loginSuccess")}return(w,k)=>(b(),I("div",{class:"wizard",role:"dialog","aria-modal":"true","aria-label":h(n)("onboarding.welcome.title")},[C("div",oGe,[u.value==="preferences"?(b(),I("section",rGe,[V(j8,{size:72}),C("h1",lGe,B(h(n)("onboarding.welcome.title")),1),C("p",aGe,B(h(n)("onboarding.welcome.subtitle")),1),C("div",uGe,[C("div",cGe,B(h(n)("onboarding.welcome.languageLabel")),1),C("div",dGe,[(b(!0),I(Be,null,yt(h(u2),A=>(b(),I("button",{key:A.code,class:De(["opt-card lang-card",{selected:h(i)===A.code}]),type:"button",onClick:v=>f(A.code)},[C("span",{class:De(["opt-radio",{on:h(i)===A.code}])},null,2),C("span",hGe,B(A.label),1)],10,fGe))),128))])]),C("div",pGe,[C("div",gGe,B(h(n)("onboarding.welcome.themeLabel")),1),C("div",mGe,[(b(),I(Be,null,yt(m,A=>C("button",{key:A.value,class:De(["opt-card theme-card",{selected:h(p)===A.value}]),type:"button",onClick:v=>h(g)(A.value)},[C("span",{class:De(["tp",`tp-${A.value}`]),"aria-hidden":"true"},[A.value==="system"?(b(),I(Be,{key:0},[k[2]||(k[2]=Lu('<span class="tp-half tp-half-light" data-v-6546a2d8><span class="tp-side" data-v-6546a2d8></span><span class="tp-lines" data-v-6546a2d8><span data-v-6546a2d8></span><span data-v-6546a2d8></span><span data-v-6546a2d8></span></span></span><span class="tp-half tp-half-dark" data-v-6546a2d8><span class="tp-side" data-v-6546a2d8></span><span class="tp-lines" data-v-6546a2d8><span data-v-6546a2d8></span><span data-v-6546a2d8></span><span data-v-6546a2d8></span></span></span>',2))],64)):(b(),I(Be,{key:1},[k[3]||(k[3]=C("span",{class:"tp-side"},null,-1)),k[4]||(k[4]=C("span",{class:"tp-lines"},[C("span"),C("span"),C("span")],-1))],64))],2),C("span",yGe,B(h(n)(A.labelKey)),1)],10,vGe)),64))])])])):(b(),I("section",bGe,[V(j8,{size:72}),C("h1",kGe,B(h(n)("onboarding.login.title")),1),C("p",AGe,B(h(n)("onboarding.login.subtitle")),1),C("div",CGe,[V(iGe,{"auth-ready":s.authReady,"on-start-o-auth-login":s.onStartOAuthLogin,"on-poll-o-auth-login":s.onPollOAuthLogin,"on-cancel-o-auth-login":s.onCancelOAuthLogin,onSuccess:y,onAddProvider:r},null,8,["auth-ready","on-start-o-auth-login","on-poll-o-auth-login","on-cancel-o-auth-login"])])])),C("div",wGe,[u.value==="preferences"?(b(),fe(h(jt),{key:0,variant:"primary",size:"lg",class:"wiz-primary",onClick:c},{default:he(()=>[Ue(B(h(n)("onboarding.continue")),1)]),_:1})):u.value==="login"&&s.authReady?(b(),fe(h(jt),{key:1,variant:"primary",size:"lg",class:"wiz-primary",onClick:k[0]||(k[0]=A=>o("complete"))},{default:he(()=>[Ue(B(h(n)("onboarding.login.finish")),1)]),_:1})):ne("",!0),C("div",xGe,[a.value>0?(b(),fe(h(jt),{key:0,variant:"ghost",onClick:d},{default:he(()=>[Ue(B(h(n)("onboarding.back")),1)]),_:1})):ne("",!0),u.value==="login"&&s.authReady?ne("",!0):(b(),fe(h(jt),{key:1,variant:"ghost",onClick:k[1]||(k[1]=A=>o("complete"))},{default:he(()=>[Ue(B(u.value==="login"?h(n)("onboarding.login.skip"):h(n)("onboarding.skip")),1)]),_:1}))])])])],8,sGe))}}),SGe=vt(_Ge,[["__scopeId","data-v-6546a2d8"]]),MGe=["aria-label"],IGe={class:"gload-box"},EGe={class:"gload-text"},TGe=tt({__name:"GlobalLoading",setup(e){const{t}=Bt();return(n,i)=>(b(),I("div",{class:"gload",role:"status","aria-label":h(t)("app.connecting")},[C("div",IGe,[i[0]||(i[0]=Lu('<svg class="gload-logo" viewBox="0 0 96 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-v-ab85ede1><path fill="currentColor" d="M35.767 31.329c0 .37.3.671.67.671h4.305c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.672-.671h-4.304c-.37 0-.671.3-.671.671z" data-v-ab85ede1></path><path fill="currentColor" d="M90.353 31.329c0 .37.3.671.67.671h4.305c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.672-.671h-4.304a.67.67 0 0 0-.671.671z" data-v-ab85ede1></path><path fill="currentColor" d="M73.256 0a.67.67 0 0 0-.652.512l-6.366 26.1c-.106.428-.607.428-.71 0L59.159.512A.67.67 0 0 0 58.511 0H47.725c-.37 0-.668.3-.668.671V31.33c0 .37.3.671.67.671h4.781c.37 0 .671-.292.671-.662V5.554c0-.515.604-.622.726-.127l6.358 26.06a.67.67 0 0 0 .653.513h9.931c.31 0 .58-.212.653-.512L77.855 5.43c.122-.495.726-.388.726.127v25.772c0 .37.3.671.671.671h4.78c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.671-.671z" data-v-ab85ede1></path><path fill="currentColor" d="M15.279 14.837 28.264 1.133A.671.671 0 0 0 27.777 0h-6.043a.67.67 0 0 0-.477.199L6.374 15.223c-.231.234-.573.025-.573-.35V.672c0-.37-.3-.671-.671-.671H.67a.67.67 0 0 0-.67.67V31.33c0 .37.3.671.671.671H5.13c.37 0 .671-.3.671-.671v-6.114a.5.5 0 0 1 .13-.35l4.594-4.69a.293.293 0 0 1 .386-.045l12.286 9.305c1.796 1.245 4.083 2.06 6.178 2.401a.645.645 0 0 0 .743-.648v-5.537a.7.7 0 0 0-.562-.677c-1.215-.262-2.565-.758-3.59-1.468L15.332 15.58c-.22-.152-.248-.544-.052-.744" data-v-ab85ede1></path></svg>',1)),V(h(Bi),{size:"md",label:h(t)("app.connecting")},null,8,["label"]),C("div",EGe,B(h(t)("app.connecting")),1)])],8,MGe))}}),LGe=vt(TGe,[["__scopeId","data-v-ab85ede1"]]),NGe={class:"kap-root"},FGe={class:"kap-head"},BGe={class:"kap-count"},$Ge={class:"kap-head-actions"},DGe={class:"kap-filters"},RGe=["value"],zGe={class:"kap-check"},OGe={class:"kap-check"},PGe={class:"kap-view-toggle",role:"group"},jGe={key:0,class:"kap-empty"},HGe=["onClick"],WGe={class:"kap-ts"},qGe={class:"kap-label"},UGe={key:0,class:"kap-detail"},KGe={class:"kap-detail-actions"},VGe=["onClick"],ZGe={key:1,class:"kap-agg"},GGe={class:"mono"},QGe={class:"mono"},YGe={class:"num"},JGe={class:"num"},XGe={key:0},eQe={class:"mono"},tQe={class:"num"},nQe={class:"num"},iQe={key:0},sQe=tt({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,i=Z("all"),s=Z(""),o=Z(""),r=Z(!1),l=Z("timeline"),a=F(()=>(ek.value,[...Cke()])),u=F(()=>{const _=new Set;for(const N of a.value)N.sessionId&&_.add(N.sessionId);return[..._].sort()});function c(_){return _.kind==="rest:error"||_.code!==void 0&&_.code!==0||_.eventType==="error"||_.eventType==="parse-error"}const d=F(()=>{const _=s.value.trim().toLowerCase();return a.value.filter(N=>!(i.value!=="all"&&N.source!==i.value||o.value&&N.sessionId!==o.value||r.value&&!c(N)||_&&!`${N.label} ${N.kind} ${N.eventType??""} ${N.sessionId??""} ${N.requestId??""}`.toLowerCase().includes(_)))}),f=F(()=>{const _=new Map;for(const N of d.value){if(N.kind!=="ws:in"&&N.kind!=="ws:out")continue;const D=N.kind==="ws:in"?"←":"→",T=`${D} ${N.eventType??"?"} @ ${N.sessionId??"-"}`,$=_.get(T)??{key:T,sessionId:N.sessionId??"-",eventType:N.eventType??"?",dir:D,count:0};$.count++,N.seq!==void 0&&($.lastSeq=N.seq),_.set(T,$)}return[..._.values()].sort((N,D)=>D.count-N.count)}),p=F(()=>{const _=new Map;for(const N of d.value){if(N.source!=="rest"||N.kind==="rest:request")continue;const D=`${N.method??"?"} ${N.path??"?"}`,T=_.get(D)??{count:0,errors:0,totalMs:0,timed:0};T.count++,c(N)&&T.errors++,N.durationMs!==void 0&&(T.totalMs+=N.durationMs,T.timed++),_.set(D,T)}return[..._.entries()].map(([N,D])=>({key:N,count:D.count,errors:D.errors,avgMs:D.timed>0?Math.round(D.totalMs/D.timed):0})).sort((N,D)=>D.count-N.count)}),g=Z(null),m=Z(!0),y=Z(null),w=Z(null);Qe(()=>d.value.length,async()=>{if(!m.value||l.value!=="timeline")return;await kt();const _=y.value;_&&(_.scrollTop=_.scrollHeight)});function k(_){g.value=g.value===_?null:_}function A(_){const N=new Date(_),D=(T,$=2)=>String(T).padStart($,"0");return`${D(N.getHours())}:${D(N.getMinutes())}:${D(N.getSeconds())}.${D(N.getMilliseconds(),3)}`}function v(_){return JSON.stringify(_,null,2)}async function x(_){await ro(v(_))&&(w.value=_.id,setTimeout(()=>{w.value===_.id&&(w.value=null)},1500))}function E(){m$(d.value)}function S(_){return c(_)||_.source==="client"?"b-err":_.source==="rest"?"b-rest":_.kind==="ws:lifecycle"?"b-life":_.kind==="ws:out"?"b-out":"b-in"}function M(_){return _.source==="rest"?"REST":_.source==="client"?"APP":"WS"}return(_,N)=>(b(),I("section",NGe,[C("header",FGe,[N[11]||(N[11]=C("strong",null,"KAP debug",-1)),C("span",BGe,B(d.value.length)+"/"+B(a.value.length),1),C("div",$Ge,[C("button",{type:"button",class:De({on:h(n1)}),onClick:N[0]||(N[0]=D=>n1.value=!h(n1))},B(h(n1)?"resume":"pause"),3),C("button",{type:"button",onClick:N[1]||(N[1]=D=>h(wke)())},"clear"),C("button",{type:"button",onClick:N[2]||(N[2]=D=>E())},"export jsonl"),V(h(gn),{text:"Close window"},{default:he(()=>[C("button",{type:"button",onClick:N[3]||(N[3]=D=>n("close"))},"✕")]),_:1})])]),C("div",DGe,[Bn(C("select",{"onUpdate:modelValue":N[4]||(N[4]=D=>i.value=D),"aria-label":"Source filter"},[...N[12]||(N[12]=[C("option",{value:"all"},"rest + ws + app",-1),C("option",{value:"rest"},"rest",-1),C("option",{value:"ws"},"ws",-1),C("option",{value:"client"},"app errors",-1)])],512),[[W4,i.value]]),Bn(C("select",{"onUpdate:modelValue":N[5]||(N[5]=D=>o.value=D),"aria-label":"Session filter"},[N[13]||(N[13]=C("option",{value:""},"all sessions",-1)),(b(!0),I(Be,null,yt(u.value,D=>(b(),I("option",{key:D,value:D},B(D),9,RGe))),128))],512),[[W4,o.value]]),Bn(C("input",{"onUpdate:modelValue":N[6]||(N[6]=D=>s.value=D),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[_o,s.value]]),C("label",zGe,[Bn(C("input",{"onUpdate:modelValue":N[7]||(N[7]=D=>r.value=D),type:"checkbox"},null,512),[[hm,r.value]]),N[14]||(N[14]=Ue(" errors",-1))]),C("label",OGe,[Bn(C("input",{"onUpdate:modelValue":N[8]||(N[8]=D=>m.value=D),type:"checkbox"},null,512),[[hm,m.value]]),N[15]||(N[15]=Ue(" follow",-1))]),C("div",PGe,[C("button",{type:"button",class:De({on:l.value==="timeline"}),onClick:N[9]||(N[9]=D=>l.value="timeline")},"timeline",2),C("button",{type:"button",class:De({on:l.value==="aggregate"}),onClick:N[10]||(N[10]=D=>l.value="aggregate")},"aggregate",2)])]),l.value==="timeline"?(b(),I("div",{key:0,ref_key:"listRef",ref:y,class:"kap-list"},[d.value.length===0?(b(),I("div",jGe," No trace entries yet. REST calls and WS frames will appear here. ")):ne("",!0),(b(!0),I(Be,null,yt(d.value,D=>(b(),I("div",{key:D.id,class:"kap-row-wrap"},[C("button",{type:"button",class:De(["kap-row",{expanded:g.value===D.id}]),onClick:T=>k(D.id)},[C("span",WGe,B(A(D.ts)),1),C("span",{class:De(["kap-badge",S(D)])},B(M(D)),3),C("span",qGe,B(D.label),1)],10,HGe),g.value===D.id?(b(),I("div",UGe,[C("div",KGe,[C("button",{type:"button",onClick:T=>x(D)},B(w.value===D.id?"copied ✓":"copy json"),9,VGe)]),C("pre",null,B(v(D)),1)])):ne("",!0)]))),128))],512)):(b(),I("div",ZGe,[N[20]||(N[20]=C("h4",null,"WS frames by session / type",-1)),C("table",null,[N[17]||(N[17]=C("thead",null,[C("tr",null,[C("th",null,"dir"),C("th",null,"type"),C("th",null,"session"),C("th",null,"count"),C("th",null,"last seq")])],-1)),C("tbody",null,[(b(!0),I(Be,null,yt(f.value,D=>(b(),I("tr",{key:D.key},[C("td",null,B(D.dir),1),C("td",GGe,B(D.eventType),1),C("td",QGe,B(D.sessionId),1),C("td",YGe,B(D.count),1),C("td",JGe,B(D.lastSeq??"—"),1)]))),128)),f.value.length===0?(b(),I("tr",XGe,[...N[16]||(N[16]=[C("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):ne("",!0)])]),N[21]||(N[21]=C("h4",null,"REST by endpoint",-1)),C("table",null,[N[19]||(N[19]=C("thead",null,[C("tr",null,[C("th",null,"endpoint"),C("th",null,"count"),C("th",null,"errors"),C("th",null,"avg ms")])],-1)),C("tbody",null,[(b(!0),I(Be,null,yt(p.value,D=>(b(),I("tr",{key:D.key},[C("td",eQe,B(D.key),1),C("td",tQe,B(D.count),1),C("td",{class:De(["num",{err:D.errors>0}])},B(D.errors),3),C("td",nQe,B(D.avgMs),1)]))),128)),p.value.length===0?(b(),I("tr",iQe,[...N[18]||(N[18]=[C("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):ne("",!0)])])]))]))}}),oQe=vt(sQe,[["__scopeId","data-v-2b13888e"]]),rQe=tt({__name:"DebugPanel",setup(e){const t=Z(!1);let n=null,i=null,s=null;const o=["data-color-scheme"];function r(c){const d=document.documentElement,f=c.documentElement;for(const p of o){const g=d.getAttribute(p);g!==null?f.setAttribute(p,g):f.removeAttribute(p)}}function l(c){const d=c.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const g of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(g.cloneNode(!0));r(d),d.body.style.margin="0";const p=d.createElement("div");return p.style.height="100vh",d.body.appendChild(p),p}function a(){s?.disconnect(),s=null;try{i?.unmount()}catch{}i=null,n=null,t.value=!1}function u(){if(n&&!n.closed){n.focus();return}const c=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!c)return;n=c;const d=l(c),f=pm(oQe,{onClose:()=>c.close()});f.mount(d),i=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&r(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...o]}),c.addEventListener("pagehide",a),c.addEventListener("beforeunload",a)}return pn(()=>{u()}),Gn(()=>{n&&!n.closed&&n.close(),a()}),(c,d)=>(b(),fe(h(gn),{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:he(()=>[C("button",{class:"kap-fab",type:"button",onClick:u}," KAP ")]),_:1},8,["text"]))}}),lQe=vt(rQe,[["__scopeId","data-v-21de79fc"]]),aQe=tt({__name:"ServerAuthDialog",setup(e){const t=Z(""),n=Z(null),i=Z(!1);pn(()=>{kt(()=>n.value?.focus())});function s(){const r=t.value;!r||i.value||(i.value=!0,yL(r),window.location.reload())}function o(r){r.key==="Enter"&&(r.preventDefault(),s())}return(r,l)=>(b(),fe(h(La),{open:!0,title:"Server token required","hide-close":!0,"close-on-overlay":!1,"close-on-esc":!1},{foot:he(()=>[V(h(jt),{variant:"primary",disabled:!t.value||i.value,loading:i.value,onClick:s},{default:he(()=>[Ue(B(i.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])]),default:he(()=>[l[1]||(l[1]=C("p",{class:"server-auth-hint"},[Ue(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),C("code",null,"KIMI_CODE_PASSWORD"),Ue("). ")],-1)),V(h(io),{ref_key:"inputRef",ref:n,modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"password",autocomplete:"current-password",placeholder:"Token",disabled:i.value,onKeydown:o},null,8,["modelValue","disabled"])]),_:1}))}}),uQe=vt(aQe,[["__scopeId","data-v-331563ff"]]),cQe=["aria-label"],dQe=tt({__name:"InternalBuildBanner",setup(e){const{t}=Bt(),n=Wf;return(i,s)=>h(n)?(b(),I("span",{key:0,class:"internal-build-tag",role:"note","aria-label":h(t)("app.internalBuildBanner")},[s[0]||(s[0]=C("svg",{viewBox:"0 0 16 16",width:"11",height:"11",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[C("path",{d:"M8 2 14 13H2L8 2Z"}),C("path",{d:"M8 6v3.5"}),C("path",{d:"M8 11.5h.01"})],-1)),C("span",null,B(h(t)("app.internalBuildBanner")),1)],8,cQe)):ne("",!0)}}),fQe=vt(dQe,[["__scopeId","data-v-14c3d0e0"]]),hQe={class:"app-shell"},pQe=["inert"],gQe=["aria-label","aria-hidden"],mQe=tt({__name:"App",setup(e){Ete();const t=Z(!1);let n=null;const i=Fa(),s=F(()=>!i.dangerousBypassAuth.value&&t.value);Pn("resolveImage",i.resolveImageUrl),Pn("resolveSwarmMembers",ft=>i.swarmMembersByToolCallId.value.get(ft)??[]),Pn("modelDisplay",ft=>Wee(ft,i.models.value));const{t:o}=Bt();Pn("subagentEffort",ft=>qee(ft));const{confirm:r}=Hu(),l=bl(),a=eve(),u=Z(!1),c=Z(!1),d=F(()=>{const ft=i.activeSessionId.value;return i.sessions.value.find(Me=>Me.id===ft)?.title??""}),f=F(()=>{const ft=i.activeSessionId.value;return i.sessions.value.find(Me=>Me.id===ft)?.lastTurnReason??null}),p=F(()=>i.visibleWorkspace.value?.sessionCount??0),g=F(()=>i.activity.value!=="idle");_ve({running:g,title:i.documentBaseTitle});function m(ft){const Me=i.models.value.find(Wo=>Wo.id===i.status.value.modelId),Ze=Ap(Me),on=Ze.indexOf(wm(Me,ft)),Mi=Ze[(on+1)%Ze.length]??Ze[0]??"off";return O5(Me,Mi)}const y=F(()=>{const ft=i.models.value.find(Me=>Me.id===i.status.value.modelId);return wm(ft,i.thinking.value)}),w=Z(!i.onboarded.value);function k(){i.setOnboarded(!0),w.value=!1}function A(){k(),On.value="providers",ci.value=!0}let v=0;function x(){const ft=window.visualViewport,Me=document.documentElement.style;Me.setProperty("--app-height",`${ft?.height??window.innerHeight}px`),Me.setProperty("--app-top",`${ft?.offsetTop??0}px`)}function E(){v||(v=requestAnimationFrame(()=>{v=0,x()}))}pn(()=>{n=Fte(()=>{t.value=!0,i.clearDangerousBypassAuth()}),i.load(),te(),x(),window.visualViewport?.addEventListener("resize",E),window.visualViewport?.addEventListener("scroll",E),window.addEventListener("resize",E),document.addEventListener("keydown",S,!0)}),An(()=>{document.removeEventListener("keydown",S,!0),window.visualViewport?.removeEventListener("resize",E),window.visualViewport?.removeEventListener("scroll",E),window.removeEventListener("resize",E),v&&(cancelAnimationFrame(v),v=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function S(ft){ft.key==="Escape"&&(So.value||ft.defaultPrevented||Qt()&&(ft.stopImmediatePropagation(),ft.preventDefault()))}const M=Z(null),{previewTarget:_,previewFile:N,previewLoading:D,previewError:T,previewDownloadUrl:$,previewExternalActions:P,openFilePreview:O,closeFilePreview:R,openPreviewInEditor:W,revealPreviewFile:z}=xve({client:i,detailTarget:M,t:(ft,Me)=>Me===void 0?o(ft):o(ft,Me)}),G=F(()=>M.value!==null),K=Z(null),H=Z(null);function q(ft){H.value=ft.originImg??null,K.value=ft.media}const{SIDEBAR_WIDTH_KEY:X,SIDEBAR_DEFAULT:ee,SIDEBAR_MIN:ue,sidebarMax:ie,sessionColWidth:xe,sidebarCollapsed:ce,sidebarDragging:pe,sideWidth:Ne,loadSidebarCollapsed:te,toggleSidebarCollapse:ye}=Cve({previewOpen:G}),{PREVIEW_WIDTH_KEY:j,PREVIEW_MIN:Y,previewDefaultWidth:ve,previewMax:re,previewWidth:se,previewPanelWidth:U,compactionPanelText:J,compactionPanelVisible:de,openCompactionPanel:me,closeCompactionPanel:Ie,agentPanelMember:je,agentPanelTurns:ke,agentPanelLoading:Le,agentPanelLoadError:it,agentPanelLoadingMore:Fe,agentPanelLoadMoreError:Re,agentPanelHasMore:Ke,agentPanelRunning:ht,openAgentPanel:ot,closeAgentPanel:gt,loadOlderAgentMessages:Tt,detailDiffMode:yn,detailDiffPath:Gt,openDiffDetail:Kt,closeDiffDetail:mn,selectDiffFile:_n,turnDiffChange:He,openTurnDiff:st,closeTurnDiff:Ve,btwVisible:Rt,openSideChatTab:Ct,closeSideChat:Fn,sidePanelVisible:Tn,panelDragging:as,closeOpenSidePanel:Qt}=yve({client:i,sideWidth:Ne,detailTarget:M,closeFilePreview:R}),ni=Z(null);function zn(ft){ni.value?.style.setProperty("--preview-w",`${ft}px`)}Qe([ni,U],([ft,Me])=>ft?.style.setProperty("--preview-w",`${Me}px`),{immediate:!0});const Sn=Z(null),mi=F(()=>{const ft=i.goal.value?.status;return ft==="active"||ft==="paused"||ft==="blocked"});function Ws(){c.value=!1,Sn.value?.focusGoal()}const Li=Z(!1),Lt=Z(!1),xi=Z(!1),Qi=Z(!1),ci=Z(!1);let Fs;pn(()=>{Fs=window.kimiDesktop?.onMenuAction?.(ft=>{ft==="open-settings"?ci.value=!0:ft==="new-chat"&&ds()})}),An(()=>{Fs?.()});const Ni=Z(null),$i=Z(null),So=F(()=>Ao.value>0||Li.value||Lt.value||xi.value||Qi.value||ci.value||w.value||u.value||c.value),_i=Z(!1),Yi=Z(!1),co=Z(!1);async function Bs(){_i.value=!0,Yi.value=!1,Li.value=!0;try{await i.refreshAllProviders()}catch{Yi.value=!0}finally{_i.value=!1}}function Hi(){Lt.value=!0}async function vi(){await r({title:o("sidebar.logoutConfirmTitle"),message:o("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>i.logout()})}async function Mn(ft){Li.value=!1,await Dn(ft)}async function Dn(ft){await i.setModel(ft)&&ft!==i.defaultModel.value&&i.updateConfig({defaultModel:ft})}const Ln=Z(null);let ws=0;async function Cn(ft){await i.archiveSession(ft),!i.sessionsForView.value.some(Me=>Me.id===ft)&&(Ln.value={kind:"archive",id:ft,key:++ws})}let Di=!1;async function ri(ft){if(Di)return;Di=!0;const Me=++ws,Ze=setTimeout(()=>{(Ln.value===null||Ln.value.key<=Me)&&(Ln.value={kind:"export",state:"running",key:Me})},400);try{await i.exportSession(ft)&&!Wf?(Ln.value===null||Ln.value.key<=Me)&&(Ln.value={kind:"export",state:"done",key:++ws}):Ln.value?.kind==="export"&&Ln.value.key===Me&&(Ln.value=null)}finally{clearTimeout(Ze),Di=!1}}async function ur(){const ft=Ln.value;!ft||ft.kind!=="archive"||await i.restoreSession(ft.id)&&Ln.value?.key===ft.key&&(Ln.value=null)}function jo(ft){ft!==void 0&&Ln.value?.key===ft&&(Ln.value=null)}const On=Z(void 0),us=Z(void 0);Qe(c,ft=>{ft||(us.value=void 0)});function qs(){Ln.value=null,a.value?(us.value="archived",c.value=!0):(On.value="archived",ci.value=!0)}async function Us(ft){const Me=i.workspacesView.value.find(Ze=>Ze.id===ft)?.name??ft;await r({title:o("sidebar.removeWorkspace"),message:o("workspace.removeWorkspaceConfirm",{name:Me}),variant:"danger",action:()=>i.deleteWorkspace(ft)})}async function Ji(ft){co.value=!0;try{await i.updateConfig(ft)&&await i.checkAuth()}finally{co.value=!1}}async function $e(){return i.startOAuthLogin()}async function nt(){return i.pollOAuthLogin()}async function Nt(){return i.cancelOAuthLogin()}async function Zt(){Lt.value=!1,await i.checkAuth(),await i.load()}async function Nn(){k(),await i.checkAuth(),await i.load()}async function cs(ft){const Me=i.activeSessionId.value;await i.undo(1)!==null&&(Me&&(i.invalidateSessionPlans(Me),i.refreshSessionPlans(Me)),await kt(),Sn.value?.loadComposerForEdit(ft.text,ft.attachments),Sn.value?.notifyUndone())}async function Fi(){const ft=await i.abortCurrentPrompt();Sn.value?.onAbortOutcome(ft)}function di(ft){const Me=Pt();return ft.map(Ze=>({kind:Ze.kind,url:Me.getFileUrl(Ze.fileId),fileId:Ze.fileId,name:Ze.name}))}async function fi(ft,Me){if(i.authReady.value)return!0;const Ze=i.managedProviderStatus.value==="authenticated";Ze&&i.managedMembership.value===null&&await i.probeManagedMembership();const on=Ze&&i.managedMembership.value==="free",Mi=await r(on?{title:o("login.upgradeRequiredTitle"),message:o("login.upgradeRequiredMessage"),confirmLabel:o("sidebar.upgrade"),variant:"primary"}:{title:o("login.requiredTitle"),message:o("login.requiredMessage"),confirmLabel:o("login.goToLogin"),variant:"primary"});return Sn.value?.loadComposerForEdit(ft,di(Me)),Mi&&(on?Cp():Hi()),!1}async function Ks(ft,Me=[]){if(i.activeSessionId.value||i.activeWorkspaceId.value)return!0;const Ze=await r({title:o("workspace.requiredTitle"),message:o("workspace.requiredMessage"),confirmLabel:o("conversation.pickFolder"),variant:"primary"});return Sn.value?.loadComposerForEdit(ft,di(Me)),Ze&&(xi.value=!0),!1}async function Si(ft,Me=[]){return await fi(ft,Me)?Ks(ft,Me):!1}async function Vs(ft){const{cmd:Me,attachments:Ze}=ft;if(Me==="/compact"||Me.startsWith("/compact ")){if(!await Si(Me))return;i.compact(Me.slice(8).trim()||void 0);return}if(Me==="/swarm"||Me.startsWith("/swarm ")){const on=Me.slice(6).trim();if(on==="on")i.setSwarmMode(!0);else if(on==="off")i.setSwarmMode(!1);else if(on){if(!await Si(Me))return;i.setSwarmMode(!0),i.sendPrompt(on)}else i.toggleSwarmMode();return}if(Me==="/goal"||Me.startsWith("/goal ")){const on=Me.slice(5).trim();if(on==="pause"||on==="resume"||on==="cancel")i.controlGoal(on);else if(on){if(!await Si(Me))return;i.createGoal(on)}else i.toggleGoalMode();return}if(Me==="/btw"||Me.startsWith("/btw ")){const on=Me.slice(4).trim();if(!on&&i.sideChatVisible.value)Fn();else{if(on&&!await Si(Me))return;Ct(on||void 0)}return}switch(Me){case"/new":case"/clear":ds();break;case"/fork":i.forkSession();break;case"/export":ri();break;case"/undo":{const on=i.activeSessionId.value;i.undo().then(Mi=>{Mi&&on&&(i.invalidateSessionPlans(on),i.refreshSessionPlans(on))});break}case"/auto":i.setPermission("auto");break;case"/yolo":i.setPermission("yolo");break;case"/thinking":i.setThinking(m(i.thinking.value));break;case"/status":Qi.value=!0;break;case"/login":Hi();break;default:{const on=Me.indexOf(" "),Mi=xie((on===-1?Me:Me.slice(0,on)).slice(1)),Wo=on===-1?void 0:Me.slice(on+1).trim()||void 0;if(!Mi)break;if(!await Si(Me,Ze))return;!i.activeSessionId.value&&i.activeWorkspaceId.value?i.startSessionAndActivateSkill(i.activeWorkspaceId.value,Mi,Wo,Ze):i.activateSkill(Mi,Wo,Ze);break}}}function Zs(ft){i.unqueue(ft)}function Wi(ft){i.unqueue(ft)}function xs(ft){i.reorderQueue(ft.from,ft.to)}async function fo(ft){if(!await fi(ft.text,ft.attachments))return;const Me=i.activeWorkspaceId.value;if(!i.activeSessionId.value&&Me){await i.startSessionAndSendPrompt(Me,ft.text,ft.attachments);return}if(!i.activeSessionId.value&&!Me){Ni.value=ft,await r({title:o("workspace.requiredTitle"),message:o("workspace.requiredMessage"),confirmLabel:o("conversation.pickFolder"),variant:"primary"})?xi.value=!0:yi();return}i.sendPrompt(ft.text,ft.attachments)}function yi(){const ft=Ni.value;Ni.value=null,ft&&Sn.value?.loadComposerForEdit(ft.text,di(ft.attachments))}async function Mo(ft){if($i.value=null,!await i.addWorkspaceByPath(ft)){$i.value=o("workspace.addFailed");return}xi.value=!1;const Ze=Ni.value;Ni.value=null;const on=i.activeWorkspaceId.value;Ze&&on&&await i.startSessionAndSendPrompt(on,Ze.text,Ze.attachments)}function ho(){yi(),$i.value=null,xi.value=!1}function Gs(){kt(()=>{Sn.value?.focusComposer()})}function ds(){const ft=i.activeWorkspaceId.value;ft?i.openWorkspaceDraft(ft):i.clearActiveSession(),Gs()}function Ho(ft){i.openWorkspaceDraft(ft),Gs()}function cr(ft){ft&&window.open(ft,"_blank","noopener")}return(ft,Me)=>(b(),I("div",hQe,[s.value?(b(),fe(uQe,{key:0})):ne("",!0),C("div",{class:De(["app",{mobile:h(a),"sidebar-collapsed":h(ce)&&!h(a),"macos-desktop":h(Dc)}]),inert:w.value},[h(a)?(b(),fe(TKe,{key:1,workspace:h(i).visibleWorkspace.value,"session-title":d.value,running:g.value,branch:h(i).status.value.branch,"session-count":p.value,onOpenSwitcher:Me[23]||(Me[23]=Ze=>u.value=!0),onOpenSettings:Me[24]||(Me[24]=Ze=>c.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(b(),I(Be,{key:0},[V(Twe,{collapsed:h(ce),dragging:h(pe),"col-width":h(Ne),"active-workspace":h(i).visibleWorkspace.value,"active-workspace-id":h(i).activeWorkspaceId.value,sessions:h(i).sessionsForView.value,groups:h(i).workspaceGroups.value,"workspace-sort-mode":h(i).workspaceSortMode.value,"pinned-sessions":h(i).pinnedSessions.value,"flat-sessions":h(i).flatSessions.value,"flat-has-more":h(i).flatSessionsHasMore.value,"flat-loading-more":h(i).flatSessionsLoadingMore.value,initialized:h(i).initialized.value,"active-id":h(i).activeSessionId.value,"attention-by-session":h(i).attentionBySession.value,"pending-by-session":h(i).pendingBySession.value,"unread-by-session":h(i).unreadBySession.value,onSelect:Me[0]||(Me[0]=Ze=>h(i).selectSession(Ze)),onCreate:ds,onCreateInWorkspace:Me[1]||(Me[1]=Ze=>Ho(Ze)),onSelectWorkspace:Me[2]||(Me[2]=Ze=>h(i).openWorkspace(Ze)),onAddWorkspace:Me[3]||(Me[3]=Ze=>xi.value=!0),onRename:Me[4]||(Me[4]=(Ze,on)=>h(i).renameSession(Ze,on)),onGenerateTitle:Me[5]||(Me[5]=(Ze,on)=>void h(i).regenerateSessionTitle(Ze).then(on)),onArchive:Me[6]||(Me[6]=Ze=>Cn(Ze)),onFork:Me[7]||(Me[7]=Ze=>h(i).forkSession(Ze)),onExport:Me[8]||(Me[8]=Ze=>void ri(Ze)),onPin:Me[9]||(Me[9]=Ze=>h(i).togglePinSession(Ze)),onUnpin:Me[10]||(Me[10]=Ze=>h(i).unpinSession(Ze)),onDropPin:Me[11]||(Me[11]=Ze=>h(i).pinSession(Ze)),onRenameWorkspace:Me[12]||(Me[12]=(Ze,on)=>h(i).renameWorkspace(Ze,on)),onDeleteWorkspace:Me[13]||(Me[13]=Ze=>Us(Ze)),onReorderWorkspaces:Me[14]||(Me[14]=Ze=>h(i).reorderWorkspaces(Ze)),onSetWorkspaceSortMode:Me[15]||(Me[15]=Ze=>h(i).setWorkspaceSortMode(Ze)),onLoadMoreSessions:Me[16]||(Me[16]=Ze=>void h(i).loadMoreSessions(Ze)),onLoadAllSessions:Me[17]||(Me[17]=Ze=>void h(i).loadAllSessions()),onEnsureFlatSessions:Me[18]||(Me[18]=Ze=>void h(i).ensureFlatSessions()),onLoadMoreFlatSessions:Me[19]||(Me[19]=Ze=>void h(i).loadMoreFlatSessions()),onOpenSettings:Me[20]||(Me[20]=Ze=>ci.value=!0),onLogin:Hi,onCollapse:h(ye)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","groups","workspace-sort-mode","pinned-sessions","flat-sessions","flat-has-more","flat-loading-more","initialized","active-id","attention-by-session","pending-by-session","unread-by-session","onCollapse"]),Bn(V(GS,{class:"side-handle","storage-key":h(X),"default-width":h(ee),min:h(ue),max:h(ie),"onUpdate:width":Me[21]||(Me[21]=Ze=>xe.value=Ze),"onUpdate:dragging":Me[22]||(Me[22]=Ze=>pe.value=Ze)},null,8,["storage-key","default-width","min","max"]),[[rs,!h(ce)]])],64)),V(Eze,{ref_key:"conversationPaneRef",ref:Sn,mobile:h(a),turns:h(i).turns.value,"session-id":h(i).activeSessionId.value,approvals:h(i).pendingApprovals.value,changes:h(i).changes.value,"git-info":h(i).gitInfo.value,tasks:h(i).tasks.value,todos:h(i).todos.value,goal:h(i).goal.value,"session-plans":h(i).sessionPlans.value,"activation-badges":h(i).activationBadges.value,status:h(i).status.value,thinking:h(i).thinking.value,"plan-mode":h(i).planMode.value,"plan-armed":h(i).planArmed.value,"swarm-mode":h(i).swarmMode.value,"goal-mode":h(i).goalMode.value,models:h(i).models.value,"auth-ready":h(i).authReady.value,"managed-signed-in":h(i).managedProviderStatus.value==="authenticated","managed-membership":h(i).managedMembership.value,"starred-ids":h(i).starredModelIds.value,skills:h(i).skills.value,questions:h(i).questions.value,"pending-question-actions":h(i).pendingQuestionActions,"pending-approval-actions":h(i).pendingApprovalActions,running:g.value,"overlay-open":So.value,"turn-active":h(i).turnActive.value,queued:h(i).queued.value,"search-files":h(i).searchFiles,"upload-image":h(i).uploadImage,working:h(i).working.value,"last-turn-reason":f.value,"turn-error":h(i).activeTurnError.value??null,"turn-retry":h(i).activeTurnRetry.value??null,starting:h(i).isStartingFirstPrompt.value,"file-reload-key":h(i).activeSessionId.value,"session-loading":h(i).sessionLoading.value,compaction:h(i).compaction.value,"has-more-messages":h(i).hasMoreMessages.value,"loading-more":h(i).loadingMoreMessages.value,"loading-more-error":h(i).loadMoreMessagesError.value,"load-older-messages":h(i).loadOlderMessages,"workspace-name":h(i).visibleWorkspace.value?.name,"workspace-root":h(i).visibleWorkspace.value?.root??h(i).status.value.cwd,"git-diff-stats":h(i).gitDiffStats.value,workspaces:h(i).workspacesView.value,"active-workspace-id":h(i).activeWorkspaceId.value,"session-title":d.value,pr:h(i).activePullRequest.value,onOpenChanges:Me[25]||(Me[25]=Ze=>h(Kt)()),onSelectWorkspace:Me[26]||(Me[26]=Ze=>Ho(Ze)),onAddWorkspace:Me[27]||(Me[27]=Ze=>xi.value=!0),onOpenPr:cr,onSubmit:Me[28]||(Me[28]=Ze=>fo(Ze)),onLogin:Me[29]||(Me[29]=Ze=>Hi()),onSteer:Me[30]||(Me[30]=Ze=>h(i).steerPrompt(Ze.text,Ze.attachments)),onApproval:Me[31]||(Me[31]=(Ze,on)=>h(i).respondApproval(Ze,on)),onCancelTask:Me[32]||(Me[32]=Ze=>h(i).cancelTask(Ze)),onAnswer:Me[33]||(Me[33]=(Ze,on)=>h(i).respondQuestion(Ze,on)),onDismiss:Me[34]||(Me[34]=Ze=>h(i).dismissQuestion(Ze)),onCommand:Vs,onInterrupt:Fi,onUnqueue:Zs,onEditQueued:Wi,onReorderQueue:xs,onSetPermission:Me[35]||(Me[35]=Ze=>h(i).setPermission(Ze)),onSetThinking:Me[36]||(Me[36]=Ze=>h(i).setThinking(Ze)),onTogglePlan:Me[37]||(Me[37]=Ze=>h(i).togglePlanMode()),onToggleSwarm:Me[38]||(Me[38]=Ze=>h(i).toggleSwarmMode()),onToggleGoal:Me[39]||(Me[39]=Ze=>h(i).toggleGoalMode()),onCreateGoal:Me[40]||(Me[40]=Ze=>h(i).createGoal(Ze)),onControlGoal:Me[41]||(Me[41]=Ze=>h(i).controlGoal(Ze)),onRefreshGitStatus:Me[42]||(Me[42]=Ze=>h(i).activeSessionId.value&&h(i).loadGitStatus(h(i).activeSessionId.value)),onRenameSession:Me[43]||(Me[43]=(Ze,on)=>h(i).renameSession(Ze,on)),onForkSession:Me[44]||(Me[44]=Ze=>h(i).forkSession(Ze)),onArchiveSession:Me[45]||(Me[45]=Ze=>Cn(Ze)),onExportSession:Me[46]||(Me[46]=Ze=>void ri(Ze)),onCompact:Me[47]||(Me[47]=Ze=>h(i).compact()),onPickModel:Me[48]||(Me[48]=Ze=>Bs()),onSelectModel:Me[49]||(Me[49]=Ze=>Dn(Ze)),onOpenFile:Me[50]||(Me[50]=Ze=>h(O)(Ze)),onOpenMedia:q,onOpenTurnDiff:Me[51]||(Me[51]=Ze=>h(st)(Ze)),onOpenCompaction:Me[52]||(Me[52]=Ze=>h(me)(Ze)),onOpenAgent:Me[53]||(Me[53]=Ze=>h(ot)(Ze)),onEditMessage:cs},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","session-plans","activation-badges","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","questions","pending-question-actions","pending-approval-actions","running","overlay-open","turn-active","queued","search-files","upload-image","working","last-turn-reason","turn-error","turn-retry","starting","file-reload-key","session-loading","compaction","has-more-messages","loading-more","loading-more-error","load-older-messages","workspace-name","workspace-root","git-diff-stats","workspaces","active-workspace-id","session-title","pr"]),!h(a)&&(h(Dc)||h(ce))?(b(),fe(h(rn),{key:2,class:"sidebar-toggle-btn",size:"sm",label:h(ce)?h(o)("sidebar.expandSidebar"):h(o)("sidebar.collapseSidebar"),tooltip:h(ce)?h(o)("sidebar.expandSidebar"):h(o)("sidebar.collapseSidebar"),onClick:h(ye)},{default:he(()=>[V(h(Ce),{name:h(ce)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","tooltip","onClick"])):ne("",!0),!h(a)&&h(ce)?(b(),fe(h(rn),{key:3,class:"new-chat-btn",size:"sm",label:h(o)("sidebar.newChat"),tooltip:h(o)("sidebar.newChat"),onClick:ds},{default:he(()=>[V(h(Ce),{name:"chat-new"})]),_:1},8,["label","tooltip"])):ne("",!0),h(Tn)&&!h(a)?(b(),fe(GS,{key:4,class:"preview-handle","storage-key":h(j),"default-width":h(ve),min:h(Y),max:h(re),reverse:"","aria-label":h(o)("layout.resizePreviewAria"),"apply-live":zn,"onUpdate:width":Me[54]||(Me[54]=Ze=>se.value=Ze),"onUpdate:dragging":Me[55]||(Me[55]=Ze=>as.value=Ze)},null,8,["storage-key","default-width","min","max","aria-label"])):ne("",!0),!h(a)||h(Tn)?(b(),I("aside",{key:5,ref_key:"previewPanelEl",ref:ni,class:De(["global-preview",{open:h(Tn),mobile:h(a)}]),role:"complementary","aria-label":h(o)("layout.detailPanelAria"),"aria-hidden":!h(Tn)},[M.value==="compaction"&&h(de)?(b(),fe(hOe,{key:0,text:h(J)??"",subtitle:h(o)("conversation.summaryTitle"),onClose:h(Ie)},null,8,["text","subtitle","onClose"])):M.value==="agent"&&h(je)?(b(),fe(yOe,{key:1,member:h(je),turns:h(ke),running:h(ht),loading:h(Le),"load-error":h(it),"has-more":h(Ke),"loading-more":h(Fe),"load-more-error":h(Re),onClose:h(gt),onLoadOlderMessages:h(Tt),onOpenAgent:h(ot),onOpenFile:h(O),onOpenMedia:q,onOpenTurnDiff:Me[56]||(Me[56]=Ze=>h(st)(Ze))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onClose","onLoadOlderMessages","onOpenAgent","onOpenFile"])):M.value==="btw"&&h(Rt)?(b(),fe(SOe,{key:2,turns:h(i).sideChatTurns.value,running:h(i).sideChatRunning.value,sending:h(i).sideChatSending.value,"on-send":h(i).sendSideChatPrompt,onClose:h(Fn),onOpenMedia:q},null,8,["turns","running","sending","on-send","onClose"])):M.value==="diff"?(b(),fe(ePe,{key:3,mode:h(yn),changes:h(i).changes.value,"git-info":h(i).gitInfo.value,"file-diff":h(i).fileDiff.value,"full-texts":h(i).fileDiffTexts.value,"empty-file":h(i).fileDiffEmptyFile.value,"selected-diff-path":h(i).selectedDiffPath.value,"file-diff-loading":h(i).fileDiffLoading.value,closable:"",onOpen:h(_n),onBack:Me[57]||(Me[57]=Ze=>{yn.value="list",Gt.value=null,h(i).clearFileDiff()}),onClose:h(mn)},null,8,["mode","changes","git-info","file-diff","full-texts","empty-file","selected-diff-path","file-diff-loading","onOpen","onClose"])):M.value==="file"?(b(),fe(cOe,{key:4,file:h(N),loading:h(D),error:h(T),line:h(_)?.line,"download-url":h($),closable:"","external-actions":h(P),"open-file":h(O),onClose:h(R),onOpenExternal:h(W),onReveal:h(z)},null,8,["file","loading","error","line","download-url","external-actions","open-file","onClose","onOpenExternal","onReveal"])):M.value==="turn-diff"&&h(He)?(b(),fe(rPe,{key:5,change:h(He),cwd:h(i).status.value.cwd,closable:"",onClose:h(Ve),onOpenFile:Me[58]||(Me[58]=Ze=>h(O)({path:Ze}))},null,8,["change","cwd","onClose"])):ne("",!0)],10,gQe)):ne("",!0),V(fQe,{class:"internal-build-fab"}),Li.value?(b(),fe(CPe,{key:6,models:h(i).models.value,current:h(i).status.value.modelId,"starred-ids":h(i).starredModelIds.value,loading:_i.value,unavailable:Yi.value,onSelect:Me[59]||(Me[59]=Ze=>Mn(Ze)),onToggleStar:Me[60]||(Me[60]=Ze=>h(i).toggleStarModel(Ze)),onClose:Me[61]||(Me[61]=Ze=>Li.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):ne("",!0),ci.value?(b(),fe(IUe,{key:7,"color-scheme":h(i).colorScheme.value,"font-scale":h(i).fontScale.value,"managed-provider-status":h(i).managedProviderStatus.value,"managed-user-info":h(i).managedUserInfo.value,"on-fetch-usage":h(i).getUsage,notify:h(i).notifyEnabled.value,"notify-permission":h(i).notifyPermission.value,"notify-sound":h(i).notifySound.value,config:h(i).config.value,models:h(i).models.value,"config-saving":co.value,"server-version":h(i).serverVersion.value,backend:h(i).backend.value,"experimental-flags":h(i).experimentalFlags.value,"initial-tab":On.value,onSetColorScheme:Me[62]||(Me[62]=Ze=>h(i).setColorScheme(Ze)),onSetFontScale:Me[63]||(Me[63]=Ze=>h(i).setFontScale(Ze)),onSetNotify:Me[64]||(Me[64]=Ze=>h(i).setNotifyEnabled(Ze)),onSetNotifySound:Me[65]||(Me[65]=Ze=>h(i).setNotifySound(Ze)),onUpdateConfig:Me[66]||(Me[66]=Ze=>Ji(Ze)),onLogin:Me[67]||(Me[67]=()=>{ci.value=!1,Hi()}),onLogout:vi,onClose:Me[68]||(Me[68]=Ze=>{ci.value=!1,On.value=void 0})},null,8,["color-scheme","font-scale","managed-provider-status","managed-user-info","on-fetch-usage","notify","notify-permission","notify-sound","config","models","config-saving","server-version","backend","experimental-flags","initial-tab"])):ne("",!0),Qi.value?(b(),fe(gKe,{key:8,status:h(i).status.value,thinking:y.value,"plan-mode":h(i).planMode.value,"swarm-mode":h(i).swarmMode.value,"cost-usd":h(i).sessionCost.value,onClose:Me[69]||(Me[69]=Ze=>Qi.value=!1)},null,8,["status","thinking","plan-mode","swarm-mode","cost-usd"])):ne("",!0),xi.value?(b(),fe(XUe,{key:9,"browse-fs":h(i).browseFs,"get-fs-home":h(i).getFsHome,"default-path":h(i).visibleWorkspace.value?.root??h(i).status.value.cwd,error:$i.value,onAdd:Me[70]||(Me[70]=Ze=>Mo(Ze)),onClose:ho},null,8,["browse-fs","get-fs-home","default-path","error"])):ne("",!0),V(ys,{name:"gload-fade"},{default:he(()=>[h(i).initialized.value?ne("",!0):(b(),fe(LGe,{key:0,issue:h(i).connectIssue.value},null,8,["issue"]))]),_:1}),V(AKe,{warnings:h(i).warnings.value,onDismiss:h(i).dismissWarning},null,8,["warnings","onDismiss"]),(b(),fe(Wr,{to:"body"},[V(ys,{name:"action-toast"},{default:he(()=>[Ln.value?(b(),fe(h(fq),{key:Ln.value.key,duration:Ln.value.kind==="export"?Ln.value.state==="running"?6e4:4e3:8e3,"dismiss-token":Ln.value.key,onDismiss:jo},{default:he(()=>[Ln.value.kind==="archive"?(b(),I(Be,{key:0},[C("button",{type:"button",onClick:ur},B(h(o)("sidebar.archiveToastUndo")),1),Ue(" "+B(h(o)("sidebar.archiveToastMid"))+" ",1),C("button",{type:"button",onClick:qs},B(h(o)("sidebar.archiveToastSettings")),1),Ue(" "+B(h(o)("sidebar.archiveToastTail")),1)],64)):(b(),I(Be,{key:1},[Ue(B(Ln.value.state==="running"?h(o)("commands.export.started"):h(o)("commands.export.done")),1)],64))]),_:1},8,["duration","dismiss-token"])):ne("",!0)]),_:1})])),h(l)?(b(),fe(lQe,{key:10})):ne("",!0),V(iKe),h(a)?(b(),fe(tVe,{key:11,modelValue:u.value,"onUpdate:modelValue":Me[71]||(Me[71]=Ze=>u.value=Ze),groups:h(i).mobileWorkspaceGroups.value,"active-workspace-id":h(i).activeWorkspaceId.value,"active-id":h(i).activeSessionId.value,"attention-by-session":h(i).attentionBySession.value,"attention-by-workspace":h(i).attentionByWorkspace.value,onSelect:Me[72]||(Me[72]=Ze=>h(i).selectSession(Ze)),onCreate:ds,onCreateInWorkspace:Me[73]||(Me[73]=Ze=>Ho(Ze)),onAddWorkspace:Me[74]||(Me[74]=Ze=>xi.value=!0),onRename:Me[75]||(Me[75]=(Ze,on)=>h(i).renameSession(Ze,on)),onArchive:Me[76]||(Me[76]=Ze=>Cn(Ze)),onDeleteWorkspace:Me[77]||(Me[77]=Ze=>Us(Ze)),onLoadMore:Me[78]||(Me[78]=Ze=>void h(i).loadMoreSessions(Ze))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):ne("",!0),h(a)?(b(),fe(vZe,{key:12,modelValue:c.value,"onUpdate:modelValue":Me[79]||(Me[79]=Ze=>c.value=Ze),"initial-view":us.value,status:h(i).status.value,thinking:h(i).thinking.value,models:h(i).models.value,"plan-mode":h(i).planArmed.value||h(i).planMode.value,"goal-mode":h(i).goalMode.value,"goal-active":mi.value,"swarm-mode":h(i).swarmMode.value,"color-scheme":h(i).colorScheme.value,"font-scale":h(i).fontScale.value,"managed-provider-status":h(i).managedProviderStatus.value,"managed-user-info":h(i).managedUserInfo.value,"server-version":h(i).serverVersion.value,onPickModel:Me[80]||(Me[80]=Ze=>Bs()),onSetThinking:Me[81]||(Me[81]=Ze=>h(i).setThinking(Ze)),onTogglePlan:Me[82]||(Me[82]=Ze=>h(i).togglePlanMode()),onToggleGoal:Me[83]||(Me[83]=Ze=>h(i).toggleGoalMode()),onFocusGoal:Ws,onToggleSwarm:Me[84]||(Me[84]=Ze=>h(i).toggleSwarmMode()),onSetPermission:Me[85]||(Me[85]=Ze=>h(i).setPermission(Ze)),onSetColorScheme:Me[86]||(Me[86]=Ze=>h(i).setColorScheme(Ze)),onSetFontScale:Me[87]||(Me[87]=Ze=>h(i).setFontScale(Ze)),onLogin:Me[88]||(Me[88]=()=>{c.value=!1,Hi()}),onLogout:vi},null,8,["modelValue","initial-view","status","thinking","models","plan-mode","goal-mode","goal-active","swarm-mode","color-scheme","font-scale","managed-provider-status","managed-user-info","server-version"])):ne("",!0)],10,pQe),h(i).initialized.value&&w.value?(b(),fe(SGe,{key:1,"auth-ready":h(i).managedProviderStatus.value==="authenticated","on-start-o-auth-login":$e,"on-poll-o-auth-login":nt,"on-cancel-o-auth-login":Nt,onComplete:k,onLoginSuccess:Nn,onAddProvider:A},null,8,["auth-ready"])):ne("",!0),Lt.value?(b(),fe(UPe,{key:2,"on-start-o-auth-login":$e,"on-poll-o-auth-login":nt,"on-cancel-o-auth-login":Nt,onSuccess:Zt,onClose:Me[89]||(Me[89]=Ze=>Lt.value=!1)})):ne("",!0),K.value?(b(),fe(kk,{key:3,media:K.value,"origin-img":H.value,onClose:Me[90]||(Me[90]=Ze=>{K.value=null,H.value=null})},null,8,["media","origin-img"])):ne("",!0)]))}}),vQe=vt(mQe,[["__scopeId","data-v-01f1cfe9"]]);Bke();const zv=pm(vQe).use(jn),yQe={t:(e,t)=>jn.global.t(e,t)};zv.provide(FE,yQe);zv.provide($E,e=>tke(e)?.component);zv.provide(wee,Fa());zv.mount("#app");if(Wf){const e=window.kimiDesktop;if(e){const t=()=>{const n=document.documentElement.dataset.colorScheme;e.setTheme(n==="light"||n==="dark"?n:"system")};new MutationObserver(t).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),t()}}export{sz as $,fI as A,Vz as B,ms as C,pYe as D,TM as E,Be as F,Lu as G,Ue as H,V as I,Mz as J,OQe as K,rl as L,tt as M,xP as N,WQe as O,qQe as P,VQe as Q,Gg as R,af as S,Wr as T,UQe as U,o5 as V,HQe as W,mYe as X,KQe as Y,uYe as Z,bQe as _,oI as a,Ms as a$,As as a0,P2 as a1,SQe as a2,Z8 as a3,DI as a4,cn as a5,zf as a6,NQe as a7,bYe as a8,$Qe as a9,cI as aA,aO as aB,pO as aC,pn as aD,hO as aE,fO as aF,Rf as aG,dO as aH,An as aI,vp as aJ,Nz as aK,b as aL,AP as aM,TQe as aN,Pn as aO,ZM as aP,EQe as aQ,Xg as aR,Ts as aS,M4 as aT,Z as aU,iYe as aV,OP as aW,yt as aX,En as aY,mO as aZ,PQe as a_,zQe as aa,RQe as ab,DQe as ac,oYe as ad,kYe as ae,an as af,JO as ag,U2 as ah,du as ai,_a as aj,ls as ak,sYe as al,br as am,ku as an,wt as ao,QQe as ap,YQe as aq,Yn as ar,kt as as,iP as at,De as au,XR as av,Vt as aw,lO as ax,cO as ay,Gn as az,IQe as b,b0e as b$,fYe as b0,z1 as b1,rm as b2,cYe as b3,bu as b4,KM as b5,AQe as b6,vl as b7,Oz as b8,dYe as b9,_o as bA,rs as bB,XO as bC,lYe as bD,Qe as bE,I4 as bF,FQe as bG,jz as bH,XQe as bI,he as bJ,ZQe as bK,Bn as bL,qr as bM,rYe as bN,It as bO,LQe as bP,oi as bQ,ns as bR,_Ye as bS,SYe as bT,mB as bU,MYe as bV,zpe as bW,gB as bX,o8 as bY,LYe as bZ,C0e as b_,kQe as ba,B as bb,mg as bc,jQe as bd,Vn as be,wQe as bf,CQe as bg,fu as bh,nYe as bi,xz as bj,h as bk,Of as bl,yYe as bm,gYe as bn,SP as bo,Zz as bp,eYe as bq,Pz as br,vYe as bs,GQe as bt,BQe as bu,sI as bv,hm as bw,BP as bx,JI as by,W4 as bz,aYe as c,$b as c0,Fb as c1,Bb as c2,FYe as c3,Qm as c4,Jd as c5,Zm as c6,g0e as c7,m0e as c8,BYe as c9,FIe as cA,hl as cB,Bi as cC,vt as cD,NYe as ca,CYe as cb,$Ye as cc,xv as cd,Jo as ce,N0e as cf,L0e as cg,Lpe as ch,xYe as ci,Mpe as cj,Ipe as ck,wYe as cl,Db as cm,F0e as cn,E_ as co,u_ as cp,Ppe as cq,Gm as cr,Vm as cs,IYe as ct,TYe as cu,AYe as cv,EYe as cw,Ce as cx,DYe as cy,zD as cz,tYe as d,hu as e,xQe as f,ys as g,QI as h,_Qe as i,MQe as j,Hr as k,pp as l,Ls as m,D2 as n,Sa as o,hYe as p,F as q,pm as r,fe as s,ne as t,I as u,C as v,zO as w,JQe as x,RO as y,PP as z}; diff --git a/apps/kimi-code/dist-web/assets/index-yKYHPeXU.js b/apps/kimi-code/dist-web/assets/index-yKYHPeXU.js new file mode 100644 index 000000000..e911d89ee --- /dev/null +++ b/apps/kimi-code/dist-web/assets/index-yKYHPeXU.js @@ -0,0 +1,669 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DesignSystemView-B4B2cx0C.js","assets/DesignSystemView-BxQYZjpo.css","assets/mhchem-DtR62fUK.js","assets/katex-DnlPpQZa.js","assets/mermaid.core-BKBZnrB_.js","assets/_commonjsHelpers-CqkleIqs.js","assets/CodeBlockNode-EUGAgT_h.js","assets/safeRaf-DGuzXxDK.js","assets/index5-D0Y6cLP4.js","assets/index11-D6nykIM1.js","assets/rive-CeXCFBdn.js"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();/** +* @vue/shared v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function hy(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const jn={},nh=[],gl=()=>{},nL=()=>!1,I0=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),py=e=>e.startsWith("onUpdate:"),bi=Object.assign,s5=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},xH=Object.prototype.hasOwnProperty,ai=(e,t)=>xH.call(e,t),nn=Array.isArray,ih=e=>Bh(e)==="[object Map]",Jd=e=>Bh(e)==="[object Set]",vC=e=>Bh(e)==="[object Date]",SH=e=>Bh(e)==="[object RegExp]",xn=e=>typeof e=="function",Ii=e=>typeof e=="string",Zr=e=>typeof e=="symbol",ci=e=>e!==null&&typeof e=="object",o5=e=>(ci(e)||xn(e))&&xn(e.then)&&xn(e.catch),iL=Object.prototype.toString,Bh=e=>iL.call(e),_H=e=>Bh(e).slice(8,-1),gy=e=>Bh(e)==="[object Object]",my=e=>Ii(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Id=hy(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),vy=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},IH=/-\w/g,Ys=vy(e=>e.replace(IH,t=>t.slice(1).toUpperCase())),MH=/\B([A-Z])/g,Cr=vy(e=>e.replace(MH,"-$1").toLowerCase()),yy=vy(e=>e.charAt(0).toUpperCase()+e.slice(1)),Wm=vy(e=>e?`on${yy(e)}`:""),ro=(e,t)=>!Object.is(e,t),sh=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},sL=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},ky=e=>{const t=parseFloat(e);return isNaN(t)?e:t},x2=e=>{const t=Ii(e)?Number(e):NaN;return isNaN(t)?e:t};let yC;const by=()=>yC||(yC=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),EH="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",TH=hy(EH);function qt(e){if(nn(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],s=Ii(i)?DH(i):qt(i);if(s)for(const o in s)t[o]=s[o]}return t}else if(Ii(e)||ci(e))return e}const LH=/;(?![^(]*\))/g,NH=/:([^]+)/,FH=/\/\*[^]*?\*\//g;function DH(e){const t={};return e.replace(FH,"").split(LH).forEach(n=>{if(n){const i=n.split(NH);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function Fe(e){let t="";if(Ii(e))t=e;else if(nn(e))for(let n=0;n<e.length;n++){const i=Fe(e[n]);i&&(t+=i+" ")}else if(ci(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function $H(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Ii(t)&&(e.class=Fe(t)),n&&(e.style=qt(n)),e}const BH="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",zH=hy(BH);function oL(e){return!!e||e===""}function RH(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=tu(e[i],t[i]);return n}function tu(e,t){if(e===t)return!0;let n=vC(e),i=vC(t);if(n||i)return n&&i?e.getTime()===t.getTime():!1;if(n=Zr(e),i=Zr(t),n||i)return e===t;if(n=nn(e),i=nn(t),n||i)return n&&i?RH(e,t):!1;if(n=ci(e),i=ci(t),n||i){if(!n||!i)return!1;const s=Object.keys(e).length,o=Object.keys(t).length;if(s!==o)return!1;for(const r in e){const l=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(l&&!a||!l&&a||!tu(e[r],t[r]))return!1}}return String(e)===String(t)}function Ay(e,t){return e.findIndex(n=>tu(n,t))}const rL=e=>!!(e&&e.__v_isRef===!0),F=e=>Ii(e)?e:e==null?"":nn(e)||ci(e)&&(e.toString===iL||!xn(e.toString))?rL(e)?F(e.value):JSON.stringify(e,lL,2):String(e),lL=(e,t)=>rL(t)?lL(e,t.value):ih(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,s],o)=>(n[k4(i,o)+" =>"]=s,n),{})}:Jd(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>k4(n))}:Zr(t)?k4(t):ci(t)&&!nn(t)&&!gy(t)?String(t):t,k4=(e,t="")=>{var n;return Zr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function OH(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/** +* @vue/reactivity v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Zs;class aL{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Zs&&(Zs.active?(this.parent=Zs,this.index=(Zs.scopes||(Zs.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Zs;try{return Zs=this,t()}finally{Zs=n}}}on(){++this._on===1&&(this.prevScope=Zs,Zs=this)}off(){if(this._on>0&&--this._on===0){if(Zs===this)Zs=this.prevScope;else{let t=Zs;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function r5(e){return new aL(e)}function M0(){return Zs}function Xd(e,t=!1){Zs&&Zs.cleanups.push(e)}let $i;const b4=new WeakSet;class S2{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Zs&&(Zs.active?Zs.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,b4.has(this)&&(b4.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||cL(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,kC(this),dL(this);const t=$i,n=Rl;$i=this,Rl=!0;try{return this.fn()}finally{fL(this),$i=t,Rl=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)u5(t);this.deps=this.depsTail=void 0,kC(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?b4.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ck(this)&&this.run()}get dirty(){return Ck(this)}}let uL=0,ap,up;function cL(e,t=!1){if(e.flags|=8,t){e.next=up,up=e;return}e.next=ap,ap=e}function l5(){uL++}function a5(){if(--uL>0)return;if(up){let t=up;for(up=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ap;){let t=ap;for(ap=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function dL(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function fL(e){let t,n=e.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),u5(i),PH(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}e.deps=t,e.depsTail=n}function Ck(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(hL(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function hL(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Hp)||(e.globalVersion=Hp,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ck(e))))return;e.flags|=2;const t=e.dep,n=$i,i=Rl;$i=e,Rl=!0;try{dL(e);const s=e.fn(e._value);(t.version===0||ro(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{$i=n,Rl=i,fL(e),e.flags&=-3}}function u5(e,t=!1){const{dep:n,prevSub:i,nextSub:s}=e;if(i&&(i.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)u5(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function PH(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function _lt(e,t){e.effect instanceof S2&&(e=e.effect.fn);const n=new S2(e);t&&bi(n,t);try{n.run()}catch(s){throw n.stop(),s}const i=n.run.bind(n);return i.effect=n,i}function Ilt(e){e.effect.stop()}let Rl=!0;const pL=[];function ba(){pL.push(Rl),Rl=!1}function Aa(){const e=pL.pop();Rl=e===void 0?!0:e}function kC(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=$i;$i=void 0;try{t()}finally{$i=n}}}let Hp=0;class jH{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Cy{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!$i||!Rl||$i===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==$i)n=this.activeLink=new jH($i,this),$i.deps?(n.prevDep=$i.depsTail,$i.depsTail.nextDep=n,$i.depsTail=n):$i.deps=$i.depsTail=n,gL(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=$i.depsTail,n.nextDep=void 0,$i.depsTail.nextDep=n,$i.depsTail=n,$i.deps===n&&($i.deps=i)}return n}trigger(t){this.version++,Hp++,this.notify(t)}notify(t){l5();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{a5()}}}function gL(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)gL(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const _2=new WeakMap,Md=Symbol(""),wk=Symbol(""),Wp=Symbol("");function jo(e,t,n){if(Rl&&$i){let i=_2.get(e);i||_2.set(e,i=new Map);let s=i.get(n);s||(i.set(n,s=new Cy),s.map=i,s.key=n),s.track()}}function Ha(e,t,n,i,s,o){const r=_2.get(e);if(!r){Hp++;return}const l=a=>{a&&a.trigger()};if(l5(),t==="clear")r.forEach(l);else{const a=nn(e),u=a&&my(n);if(a&&n==="length"){const c=Number(i);r.forEach((d,f)=>{(f==="length"||f===Wp||!Zr(f)&&f>=c)&&l(d)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),u&&l(r.get(Wp)),t){case"add":a?u&&l(r.get("length")):(l(r.get(Md)),ih(e)&&l(r.get(wk)));break;case"delete":a||(l(r.get(Md)),ih(e)&&l(r.get(wk)));break;case"set":ih(e)&&l(r.get(Md));break}}a5()}function HH(e,t){const n=_2.get(e);return n&&n.get(t)}function xf(e){const t=Vn(e);return t===e?t:(jo(t,"iterate",Wp),Hr(e)?t:t.map(Pl))}function wy(e){return jo(e=Vn(e),"iterate",Wp),e}function ua(e,t){return nu(e)?Sh(ga(e)?Pl(t):t):Pl(t)}const WH={__proto__:null,[Symbol.iterator](){return A4(this,Symbol.iterator,e=>ua(this,e))},concat(...e){return xf(this).concat(...e.map(t=>nn(t)?xf(t):t))},entries(){return A4(this,"entries",e=>(e[1]=ua(this,e[1]),e))},every(e,t){return Da(this,"every",e,t,void 0,arguments)},filter(e,t){return Da(this,"filter",e,t,n=>n.map(i=>ua(this,i)),arguments)},find(e,t){return Da(this,"find",e,t,n=>ua(this,n),arguments)},findIndex(e,t){return Da(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Da(this,"findLast",e,t,n=>ua(this,n),arguments)},findLastIndex(e,t){return Da(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Da(this,"forEach",e,t,void 0,arguments)},includes(...e){return C4(this,"includes",e)},indexOf(...e){return C4(this,"indexOf",e)},join(e){return xf(this).join(e)},lastIndexOf(...e){return C4(this,"lastIndexOf",e)},map(e,t){return Da(this,"map",e,t,void 0,arguments)},pop(){return k1(this,"pop")},push(...e){return k1(this,"push",e)},reduce(e,...t){return bC(this,"reduce",e,t)},reduceRight(e,...t){return bC(this,"reduceRight",e,t)},shift(){return k1(this,"shift")},some(e,t){return Da(this,"some",e,t,void 0,arguments)},splice(...e){return k1(this,"splice",e)},toReversed(){return xf(this).toReversed()},toSorted(e){return xf(this).toSorted(e)},toSpliced(...e){return xf(this).toSpliced(...e)},unshift(...e){return k1(this,"unshift",e)},values(){return A4(this,"values",e=>ua(this,e))}};function A4(e,t,n){const i=wy(e),s=i[t]();return i!==e&&!Hr(e)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const qH=Array.prototype;function Da(e,t,n,i,s,o){const r=wy(e),l=r!==e&&!Hr(e),a=r[t];if(a!==qH[t]){const d=a.apply(e,o);return l?Pl(d):d}let u=n;r!==e&&(l?u=function(d,f){return n.call(this,ua(e,d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=a.call(r,u,i);return l&&s?s(c):c}function bC(e,t,n,i){const s=wy(e),o=s!==e&&!Hr(e);let r=n,l=!1;s!==e&&(o?(l=i.length===0,r=function(u,c,d){return l&&(l=!1,u=ua(e,u)),n.call(this,u,ua(e,c),d,e)}):n.length>3&&(r=function(u,c,d){return n.call(this,u,c,d,e)}));const a=s[t](r,...i);return l?ua(e,a):a}function C4(e,t,n){const i=Vn(e);jo(i,"iterate",Wp);const s=i[t](...n);return(s===-1||s===!1)&&_y(n[0])?(n[0]=Vn(n[0]),i[t](...n)):s}function k1(e,t,n=[]){ba(),l5();const i=Vn(e)[t].apply(e,n);return a5(),Aa(),i}const UH=hy("__proto__,__v_isRef,__isVue"),mL=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Zr));function KH(e){Zr(e)||(e=String(e));const t=Vn(this);return jo(t,"has",e),t.hasOwnProperty(e)}class vL{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return i===(s?o?wL:CL:o?AL:bL).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const r=nn(t);if(!s){let a;if(r&&(a=WH[n]))return a;if(n==="hasOwnProperty")return KH}const l=Reflect.get(t,n,Hi(t)?t:i);if((Zr(n)?mL.has(n):UH(n))||(s||jo(t,"get",n),o))return l;if(Hi(l)){const a=r&&my(n)?l:l.value;return s&&ci(a)?Sk(a):a}return ci(l)?s?Sk(l):Ss(l):l}}class yL extends vL{constructor(t=!1){super(!1,t)}set(t,n,i,s){let o=t[n];const r=nn(t)&&my(n);if(!this._isShallow){const u=nu(o);if(!Hr(i)&&!nu(i)&&(o=Vn(o),i=Vn(i)),!r&&Hi(o)&&!Hi(i))return u||(o.value=i),!0}const l=r?Number(n)<t.length:ai(t,n),a=Reflect.set(t,n,i,Hi(t)?t:s);return t===Vn(s)&&a&&(l?ro(i,o)&&Ha(t,"set",n,i):Ha(t,"add",n,i)),a}deleteProperty(t,n){const i=ai(t,n);t[n];const s=Reflect.deleteProperty(t,n);return s&&i&&Ha(t,"delete",n,void 0),s}has(t,n){const i=Reflect.has(t,n);return(!Zr(n)||!mL.has(n))&&jo(t,"has",n),i}ownKeys(t){return jo(t,"iterate",nn(t)?"length":Md),Reflect.ownKeys(t)}}class kL extends vL{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const VH=new yL,ZH=new kL,GH=new yL(!0),QH=new kL(!0),xk=e=>e,zg=e=>Reflect.getPrototypeOf(e);function YH(e,t,n){return function(...i){const s=this.__v_raw,o=Vn(s),r=ih(o),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,u=s[e](...i),c=n?xk:t?Sh:Pl;return!t&&jo(o,"iterate",a?wk:Md),bi(Object.create(u),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}}})}}function Rg(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function JH(e,t){const n={get(s){const o=this.__v_raw,r=Vn(o),l=Vn(s);e||(ro(s,l)&&jo(r,"get",s),jo(r,"get",l));const{has:a}=zg(r),u=t?xk:e?Sh:Pl;if(a.call(r,s))return u(o.get(s));if(a.call(r,l))return u(o.get(l));o!==r&&o.get(s)},get size(){const s=this.__v_raw;return!e&&jo(Vn(s),"iterate",Md),s.size},has(s){const o=this.__v_raw,r=Vn(o),l=Vn(s);return e||(ro(s,l)&&jo(r,"has",s),jo(r,"has",l)),s===l?o.has(s):o.has(s)||o.has(l)},forEach(s,o){const r=this,l=r.__v_raw,a=Vn(l),u=t?xk:e?Sh:Pl;return!e&&jo(a,"iterate",Md),l.forEach((c,d)=>s.call(o,u(c),u(d),r))}};return bi(n,e?{add:Rg("add"),set:Rg("set"),delete:Rg("delete"),clear:Rg("clear")}:{add(s){const o=Vn(this),r=zg(o),l=Vn(s),a=!t&&!Hr(s)&&!nu(s)?l:s;return r.has.call(o,a)||ro(s,a)&&r.has.call(o,s)||ro(l,a)&&r.has.call(o,l)||(o.add(a),Ha(o,"add",a,a)),this},set(s,o){!t&&!Hr(o)&&!nu(o)&&(o=Vn(o));const r=Vn(this),{has:l,get:a}=zg(r);let u=l.call(r,s);u||(s=Vn(s),u=l.call(r,s));const c=a.call(r,s);return r.set(s,o),u?ro(o,c)&&Ha(r,"set",s,o):Ha(r,"add",s,o),this},delete(s){const o=Vn(this),{has:r,get:l}=zg(o);let a=r.call(o,s);a||(s=Vn(s),a=r.call(o,s)),l&&l.call(o,s);const u=o.delete(s);return a&&Ha(o,"delete",s,void 0),u},clear(){const s=Vn(this),o=s.size!==0,r=s.clear();return o&&Ha(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=YH(s,e,t)}),n}function xy(e,t){const n=JH(e,t);return(i,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?i:Reflect.get(ai(n,s)&&s in i?n:i,s,o)}const XH={get:xy(!1,!1)},eW={get:xy(!1,!0)},tW={get:xy(!0,!1)},nW={get:xy(!0,!0)},bL=new WeakMap,AL=new WeakMap,CL=new WeakMap,wL=new WeakMap;function iW(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ss(e){return nu(e)?e:Sy(e,!1,VH,XH,bL)}function xL(e){return Sy(e,!1,GH,eW,AL)}function Sk(e){return Sy(e,!0,ZH,tW,CL)}function Mlt(e){return Sy(e,!0,QH,nW,wL)}function Sy(e,t,n,i,s){if(!ci(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=s.get(e);if(o)return o;const r=iW(_H(e));if(r===0)return e;const l=new Proxy(e,r===2?i:n);return s.set(e,l),l}function ga(e){return nu(e)?ga(e.__v_raw):!!(e&&e.__v_isReactive)}function nu(e){return!!(e&&e.__v_isReadonly)}function Hr(e){return!!(e&&e.__v_isShallow)}function _y(e){return e?!!e.__v_raw:!1}function Vn(e){const t=e&&e.__v_raw;return t?Vn(t):e}function xt(e){return!ai(e,"__v_skip")&&Object.isExtensible(e)&&sL(e,"__v_skip",!0),e}const Pl=e=>ci(e)?Ss(e):e,Sh=e=>ci(e)?Sk(e):e;function Hi(e){return e?e.__v_isRef===!0:!1}function G(e){return SL(e,!1)}function Ul(e){return SL(e,!0)}function SL(e,t){return Hi(e)?e:new sW(e,t)}class sW{constructor(t,n){this.dep=new Cy,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Vn(t),this._value=n?t:Pl(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||Hr(t)||nu(t);t=i?t:Vn(t),ro(t,n)&&(this._rawValue=t,this._value=i?t:Pl(t),this.dep.trigger())}}function oW(e){e.dep&&e.dep.trigger()}function p(e){return Hi(e)?e.value:e}function Vu(e){return xn(e)?e():p(e)}const rW={get:(e,t,n)=>t==="__v_raw"?e:p(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const s=e[t];return Hi(s)&&!Hi(n)?(s.value=n,!0):Reflect.set(e,t,n,i)}};function _L(e){return ga(e)?e:new Proxy(e,rW)}class lW{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Cy,{get:i,set:s}=t(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(t){this._set(t)}}function aW(e){return new lW(e)}function uW(e){const t=nn(e)?new Array(e.length):{};for(const n in e)t[n]=IL(e,n);return t}class cW{constructor(t,n,i){this._object=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._key=Zr(n)?n:String(n),this._raw=Vn(t);let s=!0,o=t;if(!nn(t)||Zr(this._key)||!my(this._key))do s=!_y(o)||Hr(o);while(s&&(o=o.__v_raw));this._shallow=s}get value(){let t=this._object[this._key];return this._shallow&&(t=p(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&Hi(this._raw[this._key])){const n=this._object[this._key];if(Hi(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return HH(this._raw,this._key)}}class dW{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Elt(e,t,n){return Hi(e)?e:xn(e)?new dW(e):ci(e)&&arguments.length>1?IL(e,t,n):G(e)}function IL(e,t,n){return new cW(e,t,n)}class fW{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Cy(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Hp-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&$i!==this)return cL(this,!0),!0}get value(){const t=this.dep.track();return hL(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function hW(e,t,n=!1){let i,s;return xn(e)?i=e:(i=e.get,s=e.set),new fW(i,s,n)}const Tlt={GET:"get",HAS:"has",ITERATE:"iterate"},Llt={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Og={},I2=new WeakMap;let Fu;function Nlt(){return Fu}function pW(e,t=!1,n=Fu){if(n){let i=I2.get(n);i||I2.set(n,i=[]),i.push(e)}}function gW(e,t,n=jn){const{immediate:i,deep:s,once:o,scheduler:r,augmentJob:l,call:a}=n,u=v=>s?v:Hr(v)||s===!1||s===0?Wa(v,1):Wa(v);let c,d,f,h,g=!1,m=!1;if(Hi(e)?(d=()=>e.value,g=Hr(e)):ga(e)?(d=()=>u(e),g=!0):nn(e)?(m=!0,g=e.some(v=>ga(v)||Hr(v)),d=()=>e.map(v=>{if(Hi(v))return v.value;if(ga(v))return u(v);if(xn(v))return a?a(v,2):v()})):xn(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){ba();try{f()}finally{Aa()}}const v=Fu;Fu=c;try{return a?a(e,3,[h]):e(h)}finally{Fu=v}}:d=gl,t&&s){const v=d,x=s===!0?1/0:s;d=()=>Wa(v(),x)}const y=M0(),A=()=>{c.stop(),y&&y.active&&s5(y.effects,c)};if(o&&t){const v=t;t=(...x)=>{const S=v(...x);return A(),S}}let b=m?new Array(e.length).fill(Og):Og;const C=v=>{if(!(!(c.flags&1)||!c.dirty&&!v))if(t){const x=c.run();if(v||s||g||(m?x.some((S,_)=>ro(S,b[_])):ro(x,b))){f&&f();const S=Fu;Fu=c;try{const _=[x,b===Og?void 0:m&&b[0]===Og?[]:b,h];b=x,a?a(t,3,_):t(..._)}finally{Fu=S}}}else c.run()};return l&&l(C),c=new S2(d),c.scheduler=r?()=>r(C,!1):C,h=v=>pW(v,!1,c),f=c.onStop=()=>{const v=I2.get(c);if(v){if(a)a(v,4);else for(const x of v)x();I2.delete(c)}},t?i?C(!0):b=c.run():r?r(C.bind(null,!0),!0):c.run(),A.pause=c.pause.bind(c),A.resume=c.resume.bind(c),A.stop=A,A}function Wa(e,t=1/0,n){if(t<=0||!ci(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Hi(e))Wa(e.value,t,n);else if(nn(e))for(let i=0;i<e.length;i++)Wa(e[i],t,n);else if(Jd(e)||ih(e))e.forEach(i=>{Wa(i,t,n)});else if(gy(e)){for(const i in e)Wa(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Wa(e[i],t,n)}return e}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const ML=[];function mW(e){ML.push(e)}function vW(){ML.pop()}function Flt(e,t){}const Dlt={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},yW={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function E0(e,t,n,i){try{return i?e(...i):e()}catch(s){zh(s,t,n)}}function vl(e,t,n,i){if(xn(e)){const s=E0(e,t,n,i);return s&&o5(s)&&s.catch(o=>{zh(o,t,n)}),s}if(nn(e)){const s=[];for(let o=0;o<e.length;o++)s.push(vl(e[o],t,n,i));return s}}function zh(e,t,n,i=!0){const s=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||jn;if(t){let l=t.parent;const a=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,a,u)===!1)return}l=l.parent}if(o){ba(),E0(o,null,10,[e,a,u]),Aa();return}}kW(e,n,s,i,r)}function kW(e,t,n,i=!0,s=!1){if(s)throw e;console.error(e)}const tr=[];let ra=-1;const oh=[];let Du=null,zf=0;const EL=Promise.resolve();let M2=null;function kt(e){const t=M2||EL;return e?t.then(this?e.bind(this):e):t}function bW(e){let t=ra+1,n=tr.length;for(;t<n;){const i=t+n>>>1,s=tr[i],o=qp(s);o<e||o===e&&s.flags&2?t=i+1:n=i}return t}function c5(e){if(!(e.flags&1)){const t=qp(e),n=tr[tr.length-1];!n||!(e.flags&2)&&t>=qp(n)?tr.push(e):tr.splice(bW(t),0,e),e.flags|=1,TL()}}function TL(){M2||(M2=EL.then(LL))}function E2(e){nn(e)?oh.push(...e):Du&&e.id===-1?Du.splice(zf+1,0,e):e.flags&1||(oh.push(e),e.flags|=1),TL()}function AC(e,t,n=ra+1){for(;n<tr.length;n++){const i=tr[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;tr.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function T2(e){if(oh.length){const t=[...new Set(oh)].sort((n,i)=>qp(n)-qp(i));if(oh.length=0,Du){Du.push(...t);return}for(Du=t,zf=0;zf<Du.length;zf++){const n=Du[zf];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Du=null,zf=0}}const qp=e=>e.id==null?e.flags&2?-1:1/0:e.id;function LL(e){try{for(ra=0;ra<tr.length;ra++){const t=tr[ra];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),E0(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ra<tr.length;ra++){const t=tr[ra];t&&(t.flags&=-2)}ra=-1,tr.length=0,T2(),M2=null,(tr.length||oh.length)&&LL()}}let Rf,Pg=[];function NL(e,t){var n,i;Rf=e,Rf?(Rf.enabled=!0,Pg.forEach(({event:s,args:o})=>Rf.emit(s,...o)),Pg=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{NL(o,t)}),setTimeout(()=>{Rf||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Pg=[])},3e3)):Pg=[]}let Io=null,Iy=null;function Up(e){const t=Io;return Io=e,Iy=e&&e.type.__scopeId||null,t}function $lt(e){Iy=e}function Blt(){Iy=null}const zlt=e=>he;function he(e,t=Io,n){if(!t||e._n)return e;const i=(...s)=>{i._d&&B2(-1);const o=Up(t);let r;try{r=e(...s)}finally{Up(o),i._d&&B2(1)}return r};return i._n=!0,i._c=!0,i._d=!0,i}function $n(e,t){if(Io===null)return e;const n=F0(Io),i=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[o,r,l,a=jn]=t[s];o&&(xn(o)&&(o={mounted:o,updated:o}),o.deep&&Wa(r),i.push({dir:o,instance:n,value:r,oldValue:void 0,arg:l,modifiers:a}))}return e}function aa(e,t,n,i){const s=e.dirs,o=t&&t.dirs;for(let r=0;r<s.length;r++){const l=s[r];o&&(l.oldValue=o[r].value);let a=l.dir[i];a&&(ba(),vl(a,n,8,[e.el,l,e,t]),Aa())}}function Kn(e,t){if(So){let n=So.provides;const i=So.parent&&So.parent.provides;i===n&&(n=So.provides=Object.create(i)),n[e]=t}}function cn(e,t,n=!1){const i=Ws();if(i||Ed){let s=Ed?Ed._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&e in s)return s[e];if(arguments.length>1)return n&&xn(t)?t.call(i&&i.proxy):t}}function AW(){return!!(Ws()||Ed)}const CW=Symbol.for("v-scx"),wW=()=>cn(CW);function _k(e,t){return T0(e,null,t)}function Rlt(e,t){return T0(e,null,{flush:"post"})}function xW(e,t){return T0(e,null,{flush:"sync"})}function qe(e,t,n){return T0(e,t,n)}function T0(e,t,n=jn){const{immediate:i,deep:s,flush:o,once:r}=n,l=bi({},n),a=t&&i||!t&&o!=="post";let u;if(Od){if(o==="sync"){const h=wW();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=gl,h.resume=gl,h.pause=gl,h}}const c=So;l.call=(h,g,m)=>vl(h,c,g,m);let d=!1;o==="post"?l.scheduler=h=>{Ds(h,c&&c.suspense)}:o!=="sync"&&(d=!0,l.scheduler=(h,g)=>{g?h():c5(h)}),l.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=gW(e,t,l);return Od&&(u?u.push(f):a&&f()),f}function SW(e,t,n){const i=this.proxy,s=Ii(e)?e.includes(".")?FL(i,e):()=>i[e]:e.bind(i,i);let o;xn(t)?o=t:(o=t.handler,n=t);const r=Oh(this),l=T0(s,o.bind(i),n);return r(),l}function FL(e,t){const n=t.split(".");return()=>{let i=e;for(let s=0;s<n.length&&i;s++)i=i[n[s]];return i}}const Iu=new WeakMap,DL=Symbol("_vte"),$L=e=>e.__isTeleport,cd=e=>e&&(e.disabled||e.disabled===""),_W=e=>e&&(e.defer||e.defer===""),CC=e=>typeof SVGElement<"u"&&e instanceof SVGElement,wC=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ik=(e,t)=>{const n=e&&e.to;return Ii(n)?t?t(n):null:n},IW={name:"Teleport",__isTeleport:!0,process(e,t,n,i,s,o,r,l,a,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:g,createText:m,createComment:y,parentNode:A}}=u,b=cd(t.props);let{dynamicChildren:C}=t;const v=(_,I,M)=>{_.shapeFlag&16&&c(_.children,I,M,s,o,r,l,a)},x=(_=t)=>{const I=cd(_.props),M=_.target=Ik(_.props,g),$=Mk(M,_,m,h);M&&(r!=="svg"&&CC(M)?r="svg":r!=="mathml"&&wC(M)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(M),I||(v(_,M,$),P1(_,!1)))},S=_=>{const I=()=>{if(Iu.get(_)===I){if(Iu.delete(_),cd(_.props)){const M=A(_.el)||n;v(_,M,_.anchor),P1(_,!0)}x(_)}};Iu.set(_,I),Ds(I,o)};if(e==null){const _=t.el=m(""),I=t.anchor=m("");if(h(_,n,i),h(I,n,i),_W(t.props)||o&&o.pendingBranch){S(t);return}b&&(v(t,n,I),P1(t,!0)),x()}else{t.el=e.el;const _=t.anchor=e.anchor,I=Iu.get(e);if(I){I.flags|=8,Iu.delete(e),S(t);return}t.targetStart=e.targetStart;const M=t.target=e.target,$=t.targetAnchor=e.targetAnchor,D=cd(e.props),T=D?n:M,N=D?_:$;if(r==="svg"||CC(M)?r="svg":(r==="mathml"||wC(M))&&(r="mathml"),C?(f(e.dynamicChildren,C,T,s,o,r,l),b5(e,t,!0)):a||d(e,t,T,N,s,o,r,l,!1),b)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):jg(t,n,_,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const O=Ik(t.props,g);O&&(t.target=O,jg(t,O,null,u,0))}else D&&jg(t,M,$,u,1);P1(t,b)}},remove(e,t,n,{um:i,o:{remove:s}},o){const{shapeFlag:r,children:l,anchor:a,targetStart:u,targetAnchor:c,target:d,props:f}=e,h=cd(f),g=o||!h,m=Iu.get(e);if(m&&(m.flags|=8,Iu.delete(e)),d&&(s(u),s(c)),o&&s(a),!m&&(h||d)&&r&16)for(let y=0;y<l.length;y++){const A=l[y];i(A,t,n,g,!!A.dynamicChildren)}},move:jg,hydrate:MW};function jg(e,t,n,{o:{insert:i},m:s},o=2){o===0&&i(e.targetAnchor,t,n);const{el:r,anchor:l,shapeFlag:a,children:u,props:c}=e,d=o===2;if(d&&i(r,t,n),!Iu.has(e)&&(!d||cd(c))&&a&16)for(let f=0;f<u.length;f++)s(u[f],t,n,2);d&&i(l,t,n)}function MW(e,t,n,i,s,o,{o:{nextSibling:r,parentNode:l,querySelector:a,insert:u,createText:c}},d){function f(y,A){let b=A;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")t.targetStart=b;else if(b.data==="teleport anchor"){t.targetAnchor=b,y._lpa=t.targetAnchor&&r(t.targetAnchor);break}}b=r(b)}}function h(y,A){A.anchor=d(r(y),A,l(y),n,i,s,o)}const g=t.target=Ik(t.props,a),m=cd(t.props);if(g){const y=g._lpa||g.firstChild;t.shapeFlag&16&&(m?(h(e,t),f(g,y),t.targetAnchor||Mk(g,t,c,u,l(e)===g?e:null)):(t.anchor=r(e),f(g,y),t.targetAnchor||Mk(g,t,c,u),d(y&&r(y),t,g,n,i,s,o))),P1(t,m)}else m&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=r(e));return t.anchor&&r(t.anchor)}const Gr=IW;function P1(e,t){const n=e.ctx;if(n&&n.ut){let i,s;for(t?(i=e.el,s=e.anchor):(i=e.targetStart,s=e.targetAnchor);i&&i!==s;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function Mk(e,t,n,i,s=null){const o=t.targetStart=n(""),r=t.targetAnchor=n("");return o[DL]=r,e&&(i(o,e,s),i(r,e,s)),r}const al=Symbol("_leaveCb"),b1=Symbol("_enterCb");function BL(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return mn(()=>{e.isMounted=!0}),Gn(()=>{e.isUnmounting=!0}),e}const nl=[Function,Array],zL={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nl,onEnter:nl,onAfterEnter:nl,onEnterCancelled:nl,onBeforeLeave:nl,onLeave:nl,onAfterLeave:nl,onLeaveCancelled:nl,onBeforeAppear:nl,onAppear:nl,onAfterAppear:nl,onAppearCancelled:nl},RL=e=>{const t=e.subTree;return t.component?RL(t.component):t},EW={name:"BaseTransition",props:zL,setup(e,{slots:t}){const n=Ws(),i=BL();return()=>{const s=t.default&&d5(t.default(),!0),o=s&&s.length?OL(s):n.subTree?te():void 0;if(!o)return;const r=Vn(e),{mode:l}=r;if(i.isLeaving)return w4(o);const a=xC(o);if(!a)return w4(o);let u=Kp(a,r,i,n,d=>u=d);a.type!==Rs&&nc(a,u);let c=n.subTree&&xC(n.subTree);if(c&&c.type!==Rs&&!Ll(c,a)&&RL(n).type!==Rs){let d=Kp(c,r,i,n);if(nc(c,d),l==="out-in"&&a.type!==Rs)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},w4(o);l==="in-out"&&a.type!==Rs?d.delayLeave=(f,h,g)=>{const m=PL(i,c);m[String(c.key)]=c,f[al]=()=>{h(),f[al]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{g(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return o}}};function OL(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Rs){t=n;break}}return t}const TW=EW;function PL(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function Kp(e,t,n,i,s){const{appear:o,mode:r,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:g,onLeaveCancelled:m,onBeforeAppear:y,onAppear:A,onAfterAppear:b,onAppearCancelled:C}=t,v=String(e.key),x=PL(n,e),S=(M,$)=>{M&&vl(M,i,9,$)},_=(M,$)=>{const D=$[1];S(M,$),nn(M)?M.every(T=>T.length<=1)&&D():M.length<=1&&D()},I={mode:r,persisted:l,beforeEnter(M){let $=a;if(!n.isMounted)if(o)$=y||a;else return;M[al]&&M[al](!0);const D=x[v];D&&Ll(e,D)&&D.el[al]&&D.el[al](),S($,[M])},enter(M){if(x[v]===e)return;let $=u,D=c,T=d;if(!n.isMounted)if(o)$=A||u,D=b||c,T=C||d;else return;let N=!1;M[b1]=P=>{N||(N=!0,P?S(T,[M]):S(D,[M]),I.delayedLeave&&I.delayedLeave(),M[b1]=void 0)};const O=M[b1].bind(null,!1);$?_($,[M,O]):O()},leave(M,$){const D=String(e.key);if(M[b1]&&M[b1](!0),n.isUnmounting)return $();S(f,[M]);let T=!1;M[al]=O=>{T||(T=!0,$(),O?S(m,[M]):S(g,[M]),M[al]=void 0,x[D]===e&&delete x[D])};const N=M[al].bind(null,!1);x[D]=e,h?_(h,[M,N]):N()},clone(M){const $=Kp(M,t,n,i,s);return s&&s($),$}};return I}function w4(e){if(L0(e))return e=iu(e),e.children=null,e}function xC(e){if(!L0(e))return $L(e.type)&&e.children?OL(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&xn(n.default))return n.default()}}function nc(e,t){e.shapeFlag&6&&e.component?(e.transition=t,nc(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function d5(e,t=!1,n){let i=[],s=0;for(let o=0;o<e.length;o++){let r=e[o];const l=n==null?r.key:String(n)+String(r.key!=null?r.key:o);r.type===Te?(r.patchFlag&128&&s++,i=i.concat(d5(r.children,t,l))):(t||r.type!==Rs)&&i.push(l!=null?iu(r,{key:l}):r)}if(s>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}function Qe(e,t){return xn(e)?bi({name:e.name},t,{setup:e}):e}function LW(){const e=Ws();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function f5(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Olt(e){const t=Ws(),n=Ul(null);if(t){const s=t.refs===jn?t.refs={}:t.refs;Object.defineProperty(s,e,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}function SC(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const L2=new WeakMap;function rh(e,t,n,i,s=!1){if(nn(e)){e.forEach((m,y)=>rh(m,t&&(nn(t)?t[y]:t),n,i,s));return}if(Ya(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&rh(e,t,n,i.component.subTree);return}const o=i.shapeFlag&4?F0(i.component):i.el,r=s?null:o,{i:l,r:a}=e,u=t&&t.r,c=l.refs===jn?l.refs={}:l.refs,d=l.setupState,f=Vn(d),h=d===jn?nL:m=>SC(c,m)?!1:ai(f,m),g=(m,y)=>!(y&&SC(c,y));if(u!=null&&u!==a){if(_C(t),Ii(u))c[u]=null,h(u)&&(d[u]=null);else if(Hi(u)){const m=t;g(u,m.k)&&(u.value=null),m.k&&(c[m.k]=null)}}if(xn(a)){ba();try{E0(a,l,12,[r,c])}finally{Aa()}}else{const m=Ii(a),y=Hi(a);if(m||y){const A=()=>{if(e.f){const b=m?h(a)?d[a]:c[a]:g()||!e.k?a.value:c[e.k];if(s)nn(b)&&s5(b,o);else if(nn(b))b.includes(o)||b.push(o);else if(m)c[a]=[o],h(a)&&(d[a]=c[a]);else{const C=[o];g(a,e.k)&&(a.value=C),e.k&&(c[e.k]=C)}}else m?(c[a]=r,h(a)&&(d[a]=r)):y&&(g(a,e.k)&&(a.value=r),e.k&&(c[e.k]=r))};if(r){const b=()=>{A(),L2.delete(e)};b.id=-1,L2.set(e,b),Ds(b,n)}else _C(e),A()}}}function _C(e){const t=L2.get(e);t&&(t.flags|=8,L2.delete(e))}let IC=!1;const Sf=()=>{IC||(console.error("Hydration completed but contains mismatches."),IC=!0)},NW=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",FW=e=>e.namespaceURI.includes("MathML"),Hg=e=>{if(e.nodeType===1){if(NW(e))return"svg";if(FW(e))return"mathml"}},Vf=e=>e.nodeType===8;function DW(e){const{mt:t,p:n,o:{patchProp:i,createText:s,nextSibling:o,parentNode:r,remove:l,insert:a,createComment:u}}=e,c=(C,v)=>{if(!v.hasChildNodes()){n(null,C,v),T2(),v._vnode=C;return}d(v.firstChild,C,null,null,null),T2(),v._vnode=C},d=(C,v,x,S,_,I=!1)=>{I=I||!!v.dynamicChildren;const M=Vf(C)&&C.data==="[",$=()=>m(C,v,x,S,_,M),{type:D,ref:T,shapeFlag:N,patchFlag:O}=v;let P=C.nodeType;v.el=C,O===-2&&(I=!1,v.dynamicChildren=null);let R=null;switch(D){case Zu:P!==3?v.children===""?(a(v.el=s(""),r(C),C),R=C):R=$():(C.data!==v.children&&(Sf(),C.data=v.children),R=o(C));break;case Rs:b(C)?(R=o(C),A(v.el=C.content.firstChild,C,x)):P!==8||M?R=$():R=o(C);break;case ah:if(M&&(C=o(C),P=C.nodeType),P===1||P===3){R=C;const q=!v.children.length;for(let j=0;j<v.staticCount;j++)q&&(v.children+=R.nodeType===1?R.outerHTML:R.data),j===v.staticCount-1&&(v.anchor=R),R=o(R);return M?o(R):R}else $();break;case Te:M?R=g(C,v,x,S,_,I):R=$();break;default:if(N&1)(P!==1||v.type.toLowerCase()!==C.tagName.toLowerCase())&&!b(C)?R=$():R=f(C,v,x,S,_,I);else if(N&6){v.slotScopeIds=_;const q=r(C);if(M?R=y(C):Vf(C)&&C.data==="teleport start"?R=y(C,C.data,"teleport end"):R=o(C),t(v,q,null,x,S,Hg(q),I),Ya(v)&&!v.type.__asyncResolved){let j;M?(j=K(Te),j.anchor=R?R.previousSibling:q.lastChild):j=C.nodeType===3?$e(""):K("div"),j.el=C,v.component.subTree=j}}else N&64?P!==8?R=$():R=v.type.hydrate(C,v,x,S,_,I,e,h):N&128&&(R=v.type.hydrate(C,v,x,S,Hg(r(C)),_,I,e,d))}return T!=null&&rh(T,null,S,v),R},f=(C,v,x,S,_,I)=>{I=I||!!v.dynamicChildren;const{type:M,dynamicProps:$,props:D,patchFlag:T,shapeFlag:N,dirs:O,transition:P}=v,R=M==="input"||M==="option",q=!!$;if(R||q||T!==-1){O&&aa(v,null,x,"created");let j=!1;if(b(C)){j=lN(null,P)&&x&&x.vnode.props&&x.vnode.props.appear;const z=C.content.firstChild;if(j){const H=z.getAttribute("class");H&&(z.$cls=H),P.beforeEnter(z)}A(z,C,x),v.el=C=z}if(N&16&&!(D&&(D.innerHTML||D.textContent))){let z=h(C.firstChild,v,C,x,S,_,I);for(z&&!qm(C,1)&&Sf();z;){const H=z;z=z.nextSibling,l(H)}}else if(N&8){let z=v.children;z[0]===` +`&&(C.tagName==="PRE"||C.tagName==="TEXTAREA")&&(z=z.slice(1));const{textContent:H}=C;H!==z&&H!==z.replace(/\r\n|\r/g,` +`)&&(qm(C,0)||Sf(),C.textContent=v.children)}if(D){if(R||q||!I||T&48){const z=C.tagName.includes("-");for(const H in D)(R&&(H.endsWith("value")||H==="indeterminate")||I0(H)&&!Id(H)||H[0]==="."||z&&!Id(H)||$&&$.includes(H))&&i(C,H,null,D[H],void 0,x)}else if(D.onClick)i(C,"onClick",null,D.onClick,void 0,x);else if(T&4&&ga(D.style))for(const z in D.style)D.style[z]}let W;(W=D&&D.onVnodeBeforeMount)&&mr(W,x,v),O&&aa(v,null,x,"beforeMount"),((W=D&&D.onVnodeMounted)||O||j)&&dN(()=>{W&&mr(W,x,v),j&&P.enter(C),O&&aa(v,null,x,"mounted")},S)}return C.nextSibling},h=(C,v,x,S,_,I,M)=>{M=M||!!v.dynamicChildren;const $=v.children,D=$.length;let T=!1;for(let N=0;N<D;N++){const O=M?$[N]:$[N]=Ar($[N]),P=O.type===Zu;C?(P&&!M&&N+1<D&&Ar($[N+1]).type===Zu&&(a(s(C.data.slice(O.children.length)),x,o(C)),C.data=O.children),C=d(C,O,S,_,I,M)):P&&!O.children?a(O.el=s(""),x):(T||(T=!0,qm(x,1)||Sf()),n(null,O,x,null,S,_,Hg(x),I))}return C},g=(C,v,x,S,_,I)=>{const{slotScopeIds:M}=v;M&&(_=_?_.concat(M):M);const $=r(C),D=h(o(C),v,$,x,S,_,I);return D&&Vf(D)&&D.data==="]"?o(v.anchor=D):(Sf(),a(v.anchor=u("]"),$,D),D)},m=(C,v,x,S,_,I)=>{if(BW(C,v)||Sf(),v.el=null,I){const D=y(C);for(;;){const T=o(C);if(T&&T!==D)l(T);else break}}const M=o(C),$=r(C);return l(C),n(null,v,$,M,x,S,Hg($),_),x&&(x.vnode.el=v.el,Ty(x,v.el)),M},y=(C,v="[",x="]")=>{let S=0;for(;C;)if(C=o(C),C&&Vf(C)&&(C.data===v&&S++,C.data===x)){if(S===0)return o(C);S--}return C},A=(C,v,x)=>{const S=v.parentNode;S&&S.replaceChild(C,v);let _=x;for(;_;)_.vnode.el===v&&(_.vnode.el=_.subTree.el=C),_=_.parent},b=C=>C.nodeType===1&&C.tagName==="TEMPLATE";return[c,d]}const N2="data-allow-mismatch",$W={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function qm(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(N2);)e=e.parentElement;return h5(e&&e.getAttribute(N2),t)}function h5(e,t){if(e==null)return!1;if(e==="")return!0;{const n=e.split(",");return t===0&&n.includes("children")?!0:n.includes($W[t])}}function BW(e,t){return qm(e.parentElement,1)||zW(e)||RW(t)}function zW(e){return e.nodeType===1&&h5(e.getAttribute(N2),1)}function RW({props:e}){const t=e&&e[N2];return typeof t=="string"&&h5(t,1)}const OW=by().requestIdleCallback||(e=>setTimeout(e,1)),PW=by().cancelIdleCallback||(e=>clearTimeout(e)),Plt=(e=1e4)=>t=>{const n=OW(t,{timeout:e});return()=>PW(n)};function jW(e){const{top:t,left:n,bottom:i,right:s}=e.getBoundingClientRect(),{innerHeight:o,innerWidth:r}=window;return(t>0&&t<o||i>0&&i<o)&&(n>0&&n<r||s>0&&s<r)}const jlt=e=>(t,n)=>{const i=new IntersectionObserver(s=>{for(const o of s)if(o.isIntersecting){i.disconnect(),t();break}},e);return n(s=>{if(s instanceof Element){if(jW(s))return t(),i.disconnect(),!1;i.observe(s)}}),()=>i.disconnect()},Hlt=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},Wlt=(e=[])=>(t,n)=>{Ii(e)&&(e=[e]);let i=!1;const s=r=>{i||(i=!0,o(),t(),r.target.dispatchEvent(new r.constructor(r.type,r)))},o=()=>{n(r=>{for(const l of e)r.removeEventListener(l,s)})};return n(r=>{for(const l of e)r.addEventListener(l,s,{once:!0})}),o};function HW(e,t){if(Vf(e)&&e.data==="["){let n=1,i=e.nextSibling;for(;i;){if(i.nodeType===1){if(t(i)===!1)break}else if(Vf(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else t(e)}const Ya=e=>!!e.type.__asyncLoader;function Dl(e){xn(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:i,delay:s=200,hydrate:o,timeout:r,suspensible:l=!0,onError:a}=e;let u=null,c,d=0;const f=()=>(d++,u=null,h()),h=()=>{let g;return u||(g=u=t().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),a)return new Promise((y,A)=>{a(m,()=>y(f()),()=>A(m),d+1)});throw m}).then(m=>g!==u&&u?u:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),c=m,m)))};return Qe({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(g,m,y){let A=!1;(m.bu||(m.bu=[])).push(()=>A=!0);const b=()=>{A||y()},C=o?()=>{const v=o(b,x=>HW(g,x));v&&(m.bum||(m.bum=[])).push(v)}:b;c?C():h().then(()=>!m.isUnmounted&&C())},get __asyncResolved(){return c},setup(){const g=So;if(f5(g),c)return()=>Wg(c,g);const m=x=>{u=null,zh(x,g,13,!i)};if(l&&g.suspense||Od)return h().then(x=>()=>Wg(x,g)).catch(x=>(m(x),()=>i?K(i,{error:x}):null));const y=G(!1),A=G(),b=G(!!s);let C,v;return Mn(()=>{C!=null&&clearTimeout(C),v!=null&&clearTimeout(v)}),s&&(v=setTimeout(()=>{g.isUnmounted||(b.value=!1)},s)),r!=null&&(C=setTimeout(()=>{if(!g.isUnmounted&&!y.value&&!A.value){const x=new Error(`Async component timed out after ${r}ms.`);m(x),A.value=x}},r)),h().then(()=>{g.isUnmounted||(y.value=!0,g.parent&&L0(g.parent.vnode)&&g.parent.update())}).catch(x=>{if(g.isUnmounted){u=null;return}m(x),A.value=x}),()=>{if(y.value&&c)return Wg(c,g);if(A.value&&i)return K(i,{error:A.value});if(n&&!b.value)return Wg(n,g)}}})}function Wg(e,t){const{ref:n,props:i,children:s,ce:o}=t.vnode,r=K(e,i,s);return r.ref=n,r.ce=o,delete t.vnode.ce,r}const L0=e=>e.type.__isKeepAlive,WW={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ws(),i=n.ctx;if(!i.renderer)return()=>{const b=t.default&&t.default();return b&&b.length===1?b[0]:b};const s=new Map,o=new Set;let r=null;const l=n.suspense,{renderer:{p:a,m:u,um:c,o:{createElement:d}}}=i,f=d("div");i.activate=(b,C,v,x,S)=>{const _=b.component;u(b,C,v,0,l),a(_.vnode,b,C,v,_,l,x,b.slotScopeIds,S),Ds(()=>{_.isDeactivated=!1,_.a&&sh(_.a);const I=b.props&&b.props.onVnodeMounted;I&&mr(I,_.parent,b)},l)},i.deactivate=b=>{const C=b.component;D2(C.m),D2(C.a),u(b,f,null,1,l),Ds(()=>{C.da&&sh(C.da);const v=b.props&&b.props.onVnodeUnmounted;v&&mr(v,C.parent,b),C.isDeactivated=!0},l)};function h(b){x4(b),c(b,n,l,!0)}function g(b){s.forEach((C,v)=>{const x=zk(Ya(C)?C.type.__asyncResolved||{}:C.type);x&&!b(x)&&m(v)})}function m(b){const C=s.get(b);C&&(!r||!Ll(C,r))?h(C):r&&x4(r),s.delete(b),o.delete(b)}qe(()=>[e.include,e.exclude],([b,C])=>{b&&g(v=>j1(b,v)),C&&g(v=>!j1(C,v))},{flush:"post",deep:!0});let y=null;const A=()=>{y!=null&&($2(n.subTree.type)?Ds(()=>{s.set(y,qg(n.subTree))},n.subTree.suspense):s.set(y,qg(n.subTree)))};return mn(A),N0(A),Gn(()=>{s.forEach(b=>{const{subTree:C,suspense:v}=n,x=qg(C);if(b.type===x.type&&b.key===x.key){x4(x);const S=x.component.da;S&&Ds(S,v);return}h(b)})}),()=>{if(y=null,!t.default)return r=null;const b=t.default(),C=b[0];if(b.length>1)return r=null,b;if(!ic(C)||!(C.shapeFlag&4)&&!(C.shapeFlag&128))return r=null,C;let v=qg(C);if(v.type===Rs)return r=null,v;const x=v.type,S=zk(Ya(v)?v.type.__asyncResolved||{}:x),{include:_,exclude:I,max:M}=e;if(_&&(!S||!j1(_,S))||I&&S&&j1(I,S))return v.shapeFlag&=-257,r=v,C;const $=v.key==null?x:v.key,D=s.get($);return v.el&&(v=iu(v),C.shapeFlag&128&&(C.ssContent=v)),y=$,D?(v.el=D.el,v.component=D.component,v.transition&&nc(v,v.transition),v.shapeFlag|=512,o.delete($),o.add($)):(o.add($),M&&o.size>parseInt(M,10)&&m(o.values().next().value)),v.shapeFlag|=256,r=v,$2(C.type)?C:v}}},qlt=WW;function j1(e,t){return nn(e)?e.some(n=>j1(n,t)):Ii(e)?e.split(",").includes(t):SH(e)?(e.lastIndex=0,e.test(t)):!1}function qW(e,t){jL(e,"a",t)}function UW(e,t){jL(e,"da",t)}function jL(e,t,n=So){const i=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(My(t,i,n),n){let s=n.parent;for(;s&&s.parent;)L0(s.parent.vnode)&&KW(i,t,n,s),s=s.parent}}function KW(e,t,n,i){const s=My(t,e,i,!0);Mn(()=>{s5(i[t],s)},n)}function x4(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function qg(e){return e.shapeFlag&128?e.ssContent:e}function My(e,t,n=So,i=!1){if(n){const s=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...r)=>{ba();const l=Oh(n),a=vl(t,n,e,r);return l(),Aa(),a});return i?s.unshift(o):s.push(o),o}}const au=e=>(t,n=So)=>{(!Od||e==="sp")&&My(e,(...i)=>t(...i),n)},VW=au("bm"),mn=au("m"),HL=au("bu"),N0=au("u"),Gn=au("bum"),Mn=au("um"),ZW=au("sp"),GW=au("rtg"),QW=au("rtc");function YW(e,t=So){My("ec",e,t)}const p5="components",JW="directives";function WL(e,t){return g5(p5,e,!0,t)||e}const qL=Symbol.for("v-ndc");function xs(e){return Ii(e)?g5(p5,e,!1)||e:e||qL}function Ult(e){return g5(JW,e)}function g5(e,t,n=!0,i=!1){const s=Io||So;if(s){const o=s.type;if(e===p5){const l=zk(o,!1);if(l&&(l===t||l===Ys(t)||l===yy(Ys(t))))return o}const r=MC(s[e]||o[e],t)||MC(s.appContext[e],t);return!r&&i?o:r}}function MC(e,t){return e&&(e[t]||e[Ys(t)]||e[yy(Ys(t))])}function ht(e,t,n,i){let s;const o=n&&n[i],r=nn(e);if(r||Ii(e)){const l=r&&ga(e);let a=!1,u=!1;l&&(a=!Hr(e),u=nu(e),e=wy(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(a?u?Sh(Pl(e[c])):Pl(e[c]):e[c],c,void 0,o&&o[c])}else if(typeof e=="number"){s=new Array(e);for(let l=0;l<e;l++)s[l]=t(l+1,l,void 0,o&&o[l])}else if(ci(e))if(e[Symbol.iterator])s=Array.from(e,(l,a)=>t(l,a,void 0,o&&o[a]));else{const l=Object.keys(e);s=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];s[a]=t(e[c],c,a,o&&o[a])}}else s=[];return n&&(n[i]=s),s}function UL(e,t){for(let n=0;n<t.length;n++){const i=t[n];if(nn(i))for(let s=0;s<i.length;s++)e[i[s].name]=i[s].fn;else i&&(e[i.name]=i.key?(...s)=>{const o=i.fn(...s);return o&&(o.key=i.key),o}:i.fn)}return e}function Rn(e,t,n={},i,s){if(Io.ce||Io.parent&&Ya(Io.parent)&&Io.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),k(),de(Te,null,[K("slot",n,i&&i())],u?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),k();const r=o&&m5(o(n)),l=n.key||r&&r.key,a=de(Te,{key:(l&&!Zr(l)?l:`_${t}`)+(!r&&i?"_fb":"")},r||(i?i():[]),r&&e._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function m5(e){return e.some(t=>ic(t)?!(t.type===Rs||t.type===Te&&!m5(t.children)):!0)?e:null}function Klt(e,t){const n={};for(const i in e)n[t&&/[A-Z]/.test(i)?`on:${i}`:Wm(i)]=e[i];return n}const Ek=e=>e?vN(e)?F0(e):Ek(e.parent):null,cp=bi(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ek(e.parent),$root:e=>Ek(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>v5(e),$forceUpdate:e=>e.f||(e.f=()=>{c5(e.update)}),$nextTick:e=>e.n||(e.n=kt.bind(e.proxy)),$watch:e=>SW.bind(e)}),S4=(e,t)=>e!==jn&&!e.__isScriptSetup&&ai(e,t),Tk={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:o,accessCache:r,type:l,appContext:a}=e;if(t[0]!=="$"){const f=r[t];if(f!==void 0)switch(f){case 1:return i[t];case 2:return s[t];case 4:return n[t];case 3:return o[t]}else{if(S4(i,t))return r[t]=1,i[t];if(s!==jn&&ai(s,t))return r[t]=2,s[t];if(ai(o,t))return r[t]=3,o[t];if(n!==jn&&ai(n,t))return r[t]=4,n[t];Lk&&(r[t]=0)}}const u=cp[t];let c,d;if(u)return t==="$attrs"&&jo(e.attrs,"get",""),u(e);if((c=l.__cssModules)&&(c=c[t]))return c;if(n!==jn&&ai(n,t))return r[t]=4,n[t];if(d=a.config.globalProperties,ai(d,t))return d[t]},set({_:e},t,n){const{data:i,setupState:s,ctx:o}=e;return S4(s,t)?(s[t]=n,!0):i!==jn&&ai(i,t)?(i[t]=n,!0):ai(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:s,props:o,type:r}},l){let a;return!!(n[l]||e!==jn&&l[0]!=="$"&&ai(e,l)||S4(t,l)||ai(o,l)||ai(i,l)||ai(cp,l)||ai(s.config.globalProperties,l)||(a=r.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ai(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},XW=bi({},Tk,{get(e,t){if(t!==Symbol.unscopables)return Tk.get(e,t,e)},has(e,t){return t[0]!=="_"&&!TH(t)}});function Vlt(){return null}function Zlt(){return null}function Glt(e){}function Qlt(e){}function Ylt(){return null}function Jlt(){}function Xlt(e,t){return null}function eat(){return KL().slots}function Rh(){return KL().attrs}function KL(e){const t=Ws();return t.setupContext||(t.setupContext=bN(t))}function Vp(e){return nn(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function tat(e,t){const n=Vp(e);for(const i in t){if(i.startsWith("__skip"))continue;let s=n[i];s?nn(s)||xn(s)?s=n[i]={type:s,default:t[i]}:s.default=t[i]:s===null&&(s=n[i]={default:t[i]}),s&&t[`__skip_${i}`]&&(s.skipFactory=!0)}return n}function nat(e,t){return!e||!t?e||t:nn(e)&&nn(t)?e.concat(t):bi({},Vp(e),Vp(t))}function iat(e,t){const n={};for(const i in e)t.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>e[i]});return n}function sat(e){const t=Ws(),n=Od;let i=e();Gp(),n&&uh(!1);const s=()=>{Oh(t),n&&uh(!0)},o=()=>{Ws()!==t&&t.scope.off(),Gp(),n&&uh(!1)};return o5(i)&&(i=i.catch(r=>{throw s(),Promise.resolve().then(()=>Promise.resolve().then(o)),r})),[i,()=>{s(),Promise.resolve().then(o)}]}let Lk=!0;function eq(e){const t=v5(e),n=e.proxy,i=e.ctx;Lk=!1,t.beforeCreate&&EC(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:r,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:g,activated:m,deactivated:y,beforeDestroy:A,beforeUnmount:b,destroyed:C,unmounted:v,render:x,renderTracked:S,renderTriggered:_,errorCaptured:I,serverPrefetch:M,expose:$,inheritAttrs:D,components:T,directives:N,filters:O}=t;if(u&&tq(u,i,null),r)for(const q in r){const j=r[q];xn(j)&&(i[q]=j.bind(n))}if(s){const q=s.call(n,n);ci(q)&&(e.data=Ss(q))}if(Lk=!0,o)for(const q in o){const j=o[q],W=xn(j)?j.bind(n,n):xn(j.get)?j.get.bind(n,n):gl,z=!xn(j)&&xn(j.set)?j.set.bind(n):gl,H=L({get:W,set:z});Object.defineProperty(i,q,{enumerable:!0,configurable:!0,get:()=>H.value,set:ee=>H.value=ee})}if(l)for(const q in l)VL(l[q],i,n,q);if(a){const q=xn(a)?a.call(n):a;Reflect.ownKeys(q).forEach(j=>{Kn(j,q[j])})}c&&EC(c,e,"c");function R(q,j){nn(j)?j.forEach(W=>q(W.bind(n))):j&&q(j.bind(n))}if(R(VW,d),R(mn,f),R(HL,h),R(N0,g),R(qW,m),R(UW,y),R(YW,I),R(QW,S),R(GW,_),R(Gn,b),R(Mn,v),R(ZW,M),nn($))if($.length){const q=e.exposed||(e.exposed={});$.forEach(j=>{Object.defineProperty(q,j,{get:()=>n[j],set:W=>n[j]=W,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===gl&&(e.render=x),D!=null&&(e.inheritAttrs=D),T&&(e.components=T),N&&(e.directives=N),M&&f5(e)}function tq(e,t,n=gl){nn(e)&&(e=Nk(e));for(const i in e){const s=e[i];let o;ci(s)?"default"in s?o=cn(s.from||i,s.default,!0):o=cn(s.from||i):o=cn(s),Hi(o)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[i]=o}}function EC(e,t,n){vl(nn(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function VL(e,t,n,i){let s=i.includes(".")?FL(n,i):()=>n[i];if(Ii(e)){const o=t[e];xn(o)&&qe(s,o)}else if(xn(e))qe(s,e.bind(n));else if(ci(e))if(nn(e))e.forEach(o=>VL(o,t,n,i));else{const o=xn(e.handler)?e.handler.bind(n):t[e.handler];xn(o)&&qe(s,o,e)}}function v5(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,l=o.get(t);let a;return l?a=l:!s.length&&!n&&!i?a=t:(a={},s.length&&s.forEach(u=>F2(a,u,r,!0)),F2(a,t,r)),ci(t)&&o.set(t,a),a}function F2(e,t,n,i=!1){const{mixins:s,extends:o}=t;o&&F2(e,o,n,!0),s&&s.forEach(r=>F2(e,r,n,!0));for(const r in t)if(!(i&&r==="expose")){const l=nq[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const nq={data:TC,props:LC,emits:LC,methods:H1,computed:H1,beforeCreate:Qo,created:Qo,beforeMount:Qo,mounted:Qo,beforeUpdate:Qo,updated:Qo,beforeDestroy:Qo,beforeUnmount:Qo,destroyed:Qo,unmounted:Qo,activated:Qo,deactivated:Qo,errorCaptured:Qo,serverPrefetch:Qo,components:H1,directives:H1,watch:sq,provide:TC,inject:iq};function TC(e,t){return t?e?function(){return bi(xn(e)?e.call(this,this):e,xn(t)?t.call(this,this):t)}:t:e}function iq(e,t){return H1(Nk(e),Nk(t))}function Nk(e){if(nn(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Qo(e,t){return e?[...new Set([].concat(e,t))]:t}function H1(e,t){return e?bi(Object.create(null),e,t):t}function LC(e,t){return e?nn(e)&&nn(t)?[...new Set([...e,...t])]:bi(Object.create(null),Vp(e),Vp(t??{})):t}function sq(e,t){if(!e)return t;if(!t)return e;const n=bi(Object.create(null),e);for(const i in t)n[i]=Qo(e[i],t[i]);return n}function ZL(){return{app:null,config:{isNativeTag:nL,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let oq=0;function rq(e,t){return function(i,s=null){xn(i)||(i=bi({},i)),s!=null&&!ci(s)&&(s=null);const o=ZL(),r=new WeakSet,l=[];let a=!1;const u=o.app={_uid:oq++,_component:i,_props:s,_container:null,_context:o,_instance:null,version:$q,get config(){return o.config},set config(c){},use(c,...d){return r.has(c)||(c&&xn(c.install)?(r.add(c),c.install(u,...d)):xn(c)&&(r.add(c),c(u,...d))),u},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),u},component(c,d){return d?(o.components[c]=d,u):o.components[c]},directive(c,d){return d?(o.directives[c]=d,u):o.directives[c]},mount(c,d,f){if(!a){const h=u._ceVNode||K(i,s);return h.appContext=o,f===!0?f="svg":f===!1&&(f=void 0),d&&t?t(h,c):e(h,c,f),a=!0,u._container=c,c.__vue_app__=u,F0(h.component)}},onUnmount(c){l.push(c)},unmount(){a&&(vl(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return o.provides[c]=d,u},runWithContext(c){const d=Ed;Ed=u;try{return c()}finally{Ed=d}}};return u}}let Ed=null;function oat(e,t,n=jn){const i=Ws(),s=Ys(t),o=Cr(t),r=GL(e,s),l=aW((a,u)=>{let c,d=jn,f;return xW(()=>{const h=e[s];ro(c,h)&&(c=h,u())}),{get(){return a(),n.get?n.get(c):c},set(h){const g=n.set?n.set(h):h;if(!ro(g,c)&&!(d!==jn&&ro(h,d)))return;const m=i.vnode.props,y=!!(m&&(t in m||s in m||o in m)&&(`onUpdate:${t}`in m||`onUpdate:${s}`in m||`onUpdate:${o}`in m));y||(c=h,u()),i.emit(`update:${t}`,g),ro(h,d)&&(ro(h,g)&&!ro(g,f)||y&&d!==jn&&!ro(g,c))&&u(),d=h,f=g}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?r||jn:l,done:!1}:{done:!0}}}},l}const GL=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ys(t)}Modifiers`]||e[`${Cr(t)}Modifiers`];function lq(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||jn;let s=n;const o=t.startsWith("update:"),r=o&&GL(i,t.slice(7));r&&(r.trim&&(s=n.map(c=>Ii(c)?c.trim():c)),r.number&&(s=n.map(ky)));let l,a=i[l=Wm(t)]||i[l=Wm(Ys(t))];!a&&o&&(a=i[l=Wm(Cr(t))]),a&&vl(a,e,6,s);const u=i[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,vl(u,e,6,s)}}const aq=new WeakMap;function QL(e,t,n=!1){const i=n?aq:t.emitsCache,s=i.get(e);if(s!==void 0)return s;const o=e.emits;let r={},l=!1;if(!xn(e)){const a=u=>{const c=QL(u,t,!0);c&&(l=!0,bi(r,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(ci(e)&&i.set(e,null),null):(nn(o)?o.forEach(a=>r[a]=null):bi(r,o),ci(e)&&i.set(e,r),r)}function Ey(e,t){return!e||!I0(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ai(e,t[0].toLowerCase()+t.slice(1))||ai(e,Cr(t))||ai(e,t))}function Um(e){const{type:t,vnode:n,proxy:i,withProxy:s,propsOptions:[o],slots:r,attrs:l,emit:a,render:u,renderCache:c,props:d,data:f,setupState:h,ctx:g,inheritAttrs:m}=e,y=Up(e);let A,b;try{if(n.shapeFlag&4){const v=s||i,x=v;A=Ar(u.call(x,v,c,d,h,f,g)),b=l}else{const v=t;A=Ar(v.length>1?v(d,{attrs:l,slots:r,emit:a}):v(d,null)),b=t.props?l:cq(l)}}catch(v){dp.length=0,zh(v,e,1),A=K(Rs)}let C=A;if(b&&m!==!1){const v=Object.keys(b),{shapeFlag:x}=C;v.length&&x&7&&(o&&v.some(py)&&(b=dq(b,o)),C=iu(C,b,!1,!0))}return n.dirs&&(C=iu(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&nc(C,n.transition),A=C,Up(y),A}function uq(e,t=!0){let n;for(let i=0;i<e.length;i++){const s=e[i];if(ic(s)){if(s.type!==Rs||s.children==="v-if"){if(n)return;n=s}}else return}return n}const cq=e=>{let t;for(const n in e)(n==="class"||n==="style"||I0(n))&&((t||(t={}))[n]=e[n]);return t},dq=(e,t)=>{const n={};for(const i in e)(!py(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function fq(e,t,n){const{props:i,children:s,component:o}=e,{props:r,children:l,patchFlag:a}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return i?NC(i,r,u):!!r;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(YL(r,i,f)&&!Ey(u,f))return!0}}}else return(s||l)&&(!l||!l.$stable)?!0:i===r?!1:i?r?NC(i,r,u):!0:!!r;return!1}function NC(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let s=0;s<i.length;s++){const o=i[s];if(YL(t,e,o)&&!Ey(n,o))return!0}return!1}function YL(e,t,n){const i=e[n],s=t[n];return n==="style"&&ci(i)&&ci(s)?!tu(i,s):i!==s}function Ty({vnode:e,parent:t,suspense:n},i){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.suspense.vnode.el=s.el=i,e=s),s===e)(e=t.vnode).el=i,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=i)}const JL={},XL=()=>Object.create(JL),eN=e=>Object.getPrototypeOf(e)===JL;function hq(e,t,n,i=!1){const s={},o=XL();e.propsDefaults=Object.create(null),tN(e,t,s,o);for(const r in e.propsOptions[0])r in s||(s[r]=void 0);n?e.props=i?s:xL(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function pq(e,t,n,i){const{props:s,attrs:o,vnode:{patchFlag:r}}=e,l=Vn(s),[a]=e.propsOptions;let u=!1;if((i||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(Ey(e.emitsOptions,f))continue;const h=t[f];if(a)if(ai(o,f))h!==o[f]&&(o[f]=h,u=!0);else{const g=Ys(f);s[g]=Fk(a,l,g,h,e,!1)}else h!==o[f]&&(o[f]=h,u=!0)}}}else{tN(e,t,s,o)&&(u=!0);let c;for(const d in l)(!t||!ai(t,d)&&((c=Cr(d))===d||!ai(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(s[d]=Fk(a,l,d,void 0,e,!0)):delete s[d]);if(o!==l)for(const d in o)(!t||!ai(t,d))&&(delete o[d],u=!0)}u&&Ha(e.attrs,"set","")}function tN(e,t,n,i){const[s,o]=e.propsOptions;let r=!1,l;if(t)for(let a in t){if(Id(a))continue;const u=t[a];let c;s&&ai(s,c=Ys(a))?!o||!o.includes(c)?n[c]=u:(l||(l={}))[c]=u:Ey(e.emitsOptions,a)||(!(a in i)||u!==i[a])&&(i[a]=u,r=!0)}if(o){const a=Vn(n),u=l||jn;for(let c=0;c<o.length;c++){const d=o[c];n[d]=Fk(s,a,d,u[d],e,!ai(u,d))}}return r}function Fk(e,t,n,i,s,o){const r=e[n];if(r!=null){const l=ai(r,"default");if(l&&i===void 0){const a=r.default;if(r.type!==Function&&!r.skipFactory&&xn(a)){const{propsDefaults:u}=s;if(n in u)i=u[n];else{const c=Oh(s);i=u[n]=a.call(null,t),c()}}else i=a;s.ce&&s.ce._setProp(n,i)}r[0]&&(o&&!l?i=!1:r[1]&&(i===""||i===Cr(n))&&(i=!0))}return i}const gq=new WeakMap;function nN(e,t,n=!1){const i=n?gq:t.propsCache,s=i.get(e);if(s)return s;const o=e.props,r={},l=[];let a=!1;if(!xn(e)){const c=d=>{a=!0;const[f,h]=nN(d,t,!0);bi(r,f),h&&l.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!o&&!a)return ci(e)&&i.set(e,nh),nh;if(nn(o))for(let c=0;c<o.length;c++){const d=Ys(o[c]);FC(d)&&(r[d]=jn)}else if(o)for(const c in o){const d=Ys(c);if(FC(d)){const f=o[c],h=r[d]=nn(f)||xn(f)?{type:f}:bi({},f),g=h.type;let m=!1,y=!0;if(nn(g))for(let A=0;A<g.length;++A){const b=g[A],C=xn(b)&&b.name;if(C==="Boolean"){m=!0;break}else C==="String"&&(y=!1)}else m=xn(g)&&g.name==="Boolean";h[0]=m,h[1]=y,(m||ai(h,"default"))&&l.push(d)}}const u=[r,l];return ci(e)&&i.set(e,u),u}function FC(e){return e[0]!=="$"&&!Id(e)}const y5=e=>e==="_"||e==="_ctx"||e==="$stable",k5=e=>nn(e)?e.map(Ar):[Ar(e)],mq=(e,t,n)=>{if(t._n)return t;const i=he((...s)=>k5(t(...s)),n);return i._c=!1,i},iN=(e,t,n)=>{const i=e._ctx;for(const s in e){if(y5(s))continue;const o=e[s];if(xn(o))t[s]=mq(s,o,i);else if(o!=null){const r=k5(o);t[s]=()=>r}}},sN=(e,t)=>{const n=k5(t);e.slots.default=()=>n},oN=(e,t,n)=>{for(const i in t)(n||!y5(i))&&(e[i]=t[i])},vq=(e,t,n)=>{const i=e.slots=XL();if(e.vnode.shapeFlag&32){const s=t._;s?(oN(i,t,n),n&&sL(i,"_",s,!0)):iN(t,i)}else t&&sN(e,t)},yq=(e,t,n)=>{const{vnode:i,slots:s}=e;let o=!0,r=jn;if(i.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:oN(s,t,n):(o=!t.$stable,iN(t,s)),r=t}else t&&(sN(e,t),r={default:1});if(o)for(const l in s)!y5(l)&&r[l]==null&&delete s[l]},Ds=dN;function kq(e){return rN(e)}function bq(e){return rN(e,DW)}function rN(e,t){const n=by();n.__VUE__=!0;const{insert:i,remove:s,patchProp:o,createElement:r,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=gl,insertStaticContent:g}=e,m=(Y,le,Ce,ae=null,oe=null,Q=null,ne=void 0,ge=null,Ae=!!le.dynamicChildren)=>{if(Y===le)return;Y&&!Ll(Y,le)&&(ae=pe(Y),ee(Y,oe,Q,!0),Y=null),le.patchFlag===-2&&(Ae=!1,le.dynamicChildren=null);const{type:_e,ref:Ke,shapeFlag:xe}=le;switch(_e){case Zu:y(Y,le,Ce,ae);break;case Rs:A(Y,le,Ce,ae);break;case ah:Y==null&&b(le,Ce,ae,ne);break;case Te:T(Y,le,Ce,ae,oe,Q,ne,ge,Ae);break;default:xe&1?x(Y,le,Ce,ae,oe,Q,ne,ge,Ae):xe&6?N(Y,le,Ce,ae,oe,Q,ne,ge,Ae):(xe&64||xe&128)&&_e.process(Y,le,Ce,ae,oe,Q,ne,ge,Ae,Ee)}Ke!=null&&oe?rh(Ke,Y&&Y.ref,Q,le||Y,!le):Ke==null&&Y&&Y.ref!=null&&rh(Y.ref,null,Q,Y,!0)},y=(Y,le,Ce,ae)=>{if(Y==null)i(le.el=l(le.children),Ce,ae);else{const oe=le.el=Y.el;le.children!==Y.children&&u(oe,le.children)}},A=(Y,le,Ce,ae)=>{Y==null?i(le.el=a(le.children||""),Ce,ae):le.el=Y.el},b=(Y,le,Ce,ae)=>{[Y.el,Y.anchor]=g(Y.children,le,Ce,ae,Y.el,Y.anchor)},C=({el:Y,anchor:le},Ce,ae)=>{let oe;for(;Y&&Y!==le;)oe=f(Y),i(Y,Ce,ae),Y=oe;i(le,Ce,ae)},v=({el:Y,anchor:le})=>{let Ce;for(;Y&&Y!==le;)Ce=f(Y),s(Y),Y=Ce;s(le)},x=(Y,le,Ce,ae,oe,Q,ne,ge,Ae)=>{if(le.type==="svg"?ne="svg":le.type==="math"&&(ne="mathml"),Y==null)S(le,Ce,ae,oe,Q,ne,ge,Ae);else{const _e=Y.el&&Y.el._isVueCE?Y.el:null;try{_e&&_e._beginPatch(),M(Y,le,oe,Q,ne,ge,Ae)}finally{_e&&_e._endPatch()}}},S=(Y,le,Ce,ae,oe,Q,ne,ge)=>{let Ae,_e;const{props:Ke,shapeFlag:xe,transition:Ne,dirs:et}=Y;if(Ae=Y.el=r(Y.type,Q,Ke&&Ke.is,Ke),xe&8?c(Ae,Y.children):xe&16&&I(Y.children,Ae,null,ae,oe,_4(Y,Q),ne,ge),et&&aa(Y,null,ae,"created"),_(Ae,Y,Y.scopeId,ne,ae),Ke){for(const yt in Ke)yt!=="value"&&!Id(yt)&&o(Ae,yt,null,Ke[yt],Q,ae);"value"in Ke&&o(Ae,"value",null,Ke.value,Q),(_e=Ke.onVnodeBeforeMount)&&mr(_e,ae,Y)}et&&aa(Y,null,ae,"beforeMount");const ut=lN(oe,Ne);ut&&Ne.beforeEnter(Ae),i(Ae,le,Ce),((_e=Ke&&Ke.onVnodeMounted)||ut||et)&&Ds(()=>{try{_e&&mr(_e,ae,Y),ut&&Ne.enter(Ae),et&&aa(Y,null,ae,"mounted")}finally{}},oe)},_=(Y,le,Ce,ae,oe)=>{if(Ce&&h(Y,Ce),ae)for(let Q=0;Q<ae.length;Q++)h(Y,ae[Q]);if(oe){let Q=oe.subTree;if(le===Q||$2(Q.type)&&(Q.ssContent===le||Q.ssFallback===le)){const ne=oe.vnode;_(Y,ne,ne.scopeId,ne.slotScopeIds,oe.parent)}}},I=(Y,le,Ce,ae,oe,Q,ne,ge,Ae=0)=>{for(let _e=Ae;_e<Y.length;_e++){const Ke=Y[_e]=ge?ja(Y[_e]):Ar(Y[_e]);m(null,Ke,le,Ce,ae,oe,Q,ne,ge)}},M=(Y,le,Ce,ae,oe,Q,ne)=>{const ge=le.el=Y.el;let{patchFlag:Ae,dynamicChildren:_e,dirs:Ke}=le;Ae|=Y.patchFlag&16;const xe=Y.props||jn,Ne=le.props||jn;let et;if(Ce&&Vc(Ce,!1),(et=Ne.onVnodeBeforeUpdate)&&mr(et,Ce,le,Y),Ke&&aa(le,Y,Ce,"beforeUpdate"),Ce&&Vc(Ce,!0),_e&&(!Y.dynamicChildren||Y.dynamicChildren.length!==_e.length)&&(Ae=0,ne=!1,_e=null),(xe.innerHTML&&Ne.innerHTML==null||xe.textContent&&Ne.textContent==null)&&c(ge,""),_e?$(Y.dynamicChildren,_e,ge,Ce,ae,_4(le,oe),Q):ne||j(Y,le,ge,null,Ce,ae,_4(le,oe),Q,!1),Ae>0){if(Ae&16)D(ge,xe,Ne,Ce,oe);else if(Ae&2&&xe.class!==Ne.class&&o(ge,"class",null,Ne.class,oe),Ae&4&&o(ge,"style",xe.style,Ne.style,oe),Ae&8){const ut=le.dynamicProps;for(let yt=0;yt<ut.length;yt++){const Mt=ut[yt],Ze=xe[Mt],Ge=Ne[Mt];(Ge!==Ze||Mt==="value")&&o(ge,Mt,Ze,Ge,oe,Ce)}}Ae&1&&Y.children!==le.children&&c(ge,le.children)}else!ne&&_e==null&&D(ge,xe,Ne,Ce,oe);((et=Ne.onVnodeUpdated)||Ke)&&Ds(()=>{et&&mr(et,Ce,le,Y),Ke&&aa(le,Y,Ce,"updated")},ae)},$=(Y,le,Ce,ae,oe,Q,ne)=>{for(let ge=0;ge<le.length;ge++){const Ae=Y[ge],_e=le[ge],Ke=Ae.el&&(Ae.type===Te||!Ll(Ae,_e)||Ae.shapeFlag&198)?d(Ae.el):Ce;m(Ae,_e,Ke,null,ae,oe,Q,ne,!0)}},D=(Y,le,Ce,ae,oe)=>{if(le!==Ce){if(le!==jn)for(const Q in le)!Id(Q)&&!(Q in Ce)&&o(Y,Q,le[Q],null,oe,ae);for(const Q in Ce){if(Id(Q))continue;const ne=Ce[Q],ge=le[Q];ne!==ge&&Q!=="value"&&o(Y,Q,ge,ne,oe,ae)}"value"in Ce&&o(Y,"value",le.value,Ce.value,oe)}},T=(Y,le,Ce,ae,oe,Q,ne,ge,Ae)=>{const _e=le.el=Y?Y.el:l(""),Ke=le.anchor=Y?Y.anchor:l("");let{patchFlag:xe,dynamicChildren:Ne,slotScopeIds:et}=le;et&&(ge=ge?ge.concat(et):et),Y==null?(i(_e,Ce,ae),i(Ke,Ce,ae),I(le.children||[],Ce,Ke,oe,Q,ne,ge,Ae)):xe>0&&xe&64&&Ne&&Y.dynamicChildren&&Y.dynamicChildren.length===Ne.length?($(Y.dynamicChildren,Ne,Ce,oe,Q,ne,ge),(le.key!=null||oe&&le===oe.subTree)&&b5(Y,le,!0)):j(Y,le,Ce,Ke,oe,Q,ne,ge,Ae)},N=(Y,le,Ce,ae,oe,Q,ne,ge,Ae)=>{le.slotScopeIds=ge,Y==null?le.shapeFlag&512?oe.ctx.activate(le,Ce,ae,ne,Ae):O(le,Ce,ae,oe,Q,ne,Ae):P(Y,le,Ae)},O=(Y,le,Ce,ae,oe,Q,ne)=>{const ge=Y.component=mN(Y,ae,oe);if(L0(Y)&&(ge.ctx.renderer=Ee),yN(ge,!1,ne),ge.asyncDep){if(oe&&oe.registerDep(ge,R,ne),!Y.el){const Ae=ge.subTree=K(Rs);A(null,Ae,le,Ce),Y.placeholder=Ae.el}}else R(ge,Y,le,Ce,oe,Q,ne)},P=(Y,le,Ce)=>{const ae=le.component=Y.component;if(fq(Y,le,Ce))if(ae.asyncDep&&!ae.asyncResolved){q(ae,le,Ce);return}else ae.next=le,ae.update();else le.el=Y.el,ae.vnode=le},R=(Y,le,Ce,ae,oe,Q,ne)=>{const ge=()=>{if(Y.isMounted){let{next:xe,bu:Ne,u:et,parent:ut,vnode:yt}=Y;{const tt=aN(Y);if(tt){xe&&(xe.el=yt.el,q(Y,xe,ne)),tt.asyncDep.then(()=>{Ds(()=>{Y.isUnmounted||_e()},oe)});return}}let Mt=xe,Ze;Vc(Y,!1),xe?(xe.el=yt.el,q(Y,xe,ne)):xe=yt,Ne&&sh(Ne),(Ze=xe.props&&xe.props.onVnodeBeforeUpdate)&&mr(Ze,ut,xe,yt),Vc(Y,!0);const Ge=Um(Y),lt=Y.subTree;Y.subTree=Ge,m(lt,Ge,d(lt.el),pe(lt),Y,oe,Q),xe.el=Ge.el,Mt===null&&Ty(Y,Ge.el),et&&Ds(et,oe),(Ze=xe.props&&xe.props.onVnodeUpdated)&&Ds(()=>mr(Ze,ut,xe,yt),oe)}else{let xe;const{el:Ne,props:et}=le,{bm:ut,m:yt,parent:Mt,root:Ze,type:Ge}=Y,lt=Ya(le);if(Vc(Y,!1),ut&&sh(ut),!lt&&(xe=et&&et.onVnodeBeforeMount)&&mr(xe,Mt,le),Vc(Y,!0),Ne&&we){const tt=()=>{Y.subTree=Um(Y),we(Ne,Y.subTree,Y,oe,null)};lt&&Ge.__asyncHydrate?Ge.__asyncHydrate(Ne,Y,tt):tt()}else{Ze.ce&&Ze.ce._hasShadowRoot()&&Ze.ce._injectChildStyle(Ge,Y.parent?Y.parent.type:void 0);const tt=Y.subTree=Um(Y);m(null,tt,Ce,ae,Y,oe,Q),le.el=tt.el}if(yt&&Ds(yt,oe),!lt&&(xe=et&&et.onVnodeMounted)){const tt=le;Ds(()=>mr(xe,Mt,tt),oe)}(le.shapeFlag&256||Mt&&Ya(Mt.vnode)&&Mt.vnode.shapeFlag&256)&&Y.a&&Ds(Y.a,oe),Y.isMounted=!0,le=Ce=ae=null}};Y.scope.on();const Ae=Y.effect=new S2(ge);Y.scope.off();const _e=Y.update=Ae.run.bind(Ae),Ke=Y.job=Ae.runIfDirty.bind(Ae);Ke.i=Y,Ke.id=Y.uid,Ae.scheduler=()=>c5(Ke),Vc(Y,!0),_e()},q=(Y,le,Ce)=>{le.component=Y;const ae=Y.vnode.props;Y.vnode=le,Y.next=null,pq(Y,le.props,ae,Ce),yq(Y,le.children,Ce),ba(),AC(Y),Aa()},j=(Y,le,Ce,ae,oe,Q,ne,ge,Ae=!1)=>{const _e=Y&&Y.children,Ke=Y?Y.shapeFlag:0,xe=le.children,{patchFlag:Ne,shapeFlag:et}=le;if(Ne>0){if(Ne&128){z(_e,xe,Ce,ae,oe,Q,ne,ge,Ae);return}else if(Ne&256){W(_e,xe,Ce,ae,oe,Q,ne,ge,Ae);return}}et&8?(Ke&16&&Z(_e,oe,Q),xe!==_e&&c(Ce,xe)):Ke&16?et&16?z(_e,xe,Ce,ae,oe,Q,ne,ge,Ae):Z(_e,oe,Q,!0):(Ke&8&&c(Ce,""),et&16&&I(xe,Ce,ae,oe,Q,ne,ge,Ae))},W=(Y,le,Ce,ae,oe,Q,ne,ge,Ae)=>{Y=Y||nh,le=le||nh;const _e=Y.length,Ke=le.length,xe=Math.min(_e,Ke);let Ne;for(Ne=0;Ne<xe;Ne++){const et=le[Ne]=Ae?ja(le[Ne]):Ar(le[Ne]);m(Y[Ne],et,Ce,null,oe,Q,ne,ge,Ae)}_e>Ke?Z(Y,oe,Q,!0,!1,xe):I(le,Ce,ae,oe,Q,ne,ge,Ae,xe)},z=(Y,le,Ce,ae,oe,Q,ne,ge,Ae)=>{let _e=0;const Ke=le.length;let xe=Y.length-1,Ne=Ke-1;for(;_e<=xe&&_e<=Ne;){const et=Y[_e],ut=le[_e]=Ae?ja(le[_e]):Ar(le[_e]);if(Ll(et,ut))m(et,ut,Ce,null,oe,Q,ne,ge,Ae);else break;_e++}for(;_e<=xe&&_e<=Ne;){const et=Y[xe],ut=le[Ne]=Ae?ja(le[Ne]):Ar(le[Ne]);if(Ll(et,ut))m(et,ut,Ce,null,oe,Q,ne,ge,Ae);else break;xe--,Ne--}if(_e>xe){if(_e<=Ne){const et=Ne+1,ut=et<Ke?le[et].el:ae;for(;_e<=Ne;)m(null,le[_e]=Ae?ja(le[_e]):Ar(le[_e]),Ce,ut,oe,Q,ne,ge,Ae),_e++}}else if(_e>Ne)for(;_e<=xe;)ee(Y[_e],oe,Q,!0),_e++;else{const et=_e,ut=_e,yt=new Map;for(_e=ut;_e<=Ne;_e++){const fn=le[_e]=Ae?ja(le[_e]):Ar(le[_e]);fn.key!=null&&yt.set(fn.key,_e)}let Mt,Ze=0;const Ge=Ne-ut+1;let lt=!1,tt=0;const It=new Array(Ge);for(_e=0;_e<Ge;_e++)It[_e]=0;for(_e=et;_e<=xe;_e++){const fn=Y[_e];if(Ze>=Ge){ee(fn,oe,Q,!0);continue}let Nn;if(fn.key!=null)Nn=yt.get(fn.key);else for(Mt=ut;Mt<=Ne;Mt++)if(It[Mt-ut]===0&&Ll(fn,le[Mt])){Nn=Mt;break}Nn===void 0?ee(fn,oe,Q,!0):(It[Nn-ut]=_e+1,Nn>=tt?tt=Nn:lt=!0,m(fn,le[Nn],Ce,null,oe,Q,ne,ge,Ae),Ze++)}const Ut=lt?Aq(It):nh;for(Mt=Ut.length-1,_e=Ge-1;_e>=0;_e--){const fn=ut+_e,Nn=le[fn],Qt=le[fn+1],un=fn+1<Ke?Qt.el||uN(Qt):ae;It[_e]===0?m(null,Nn,Ce,un,oe,Q,ne,ge,Ae):lt&&(Mt<0||_e!==Ut[Mt]?H(Nn,Ce,un,2):Mt--)}}},H=(Y,le,Ce,ae,oe=null)=>{const{el:Q,type:ne,transition:ge,children:Ae,shapeFlag:_e}=Y;if(_e&6){H(Y.component.subTree,le,Ce,ae);return}if(_e&128){Y.suspense.move(le,Ce,ae);return}if(_e&64){ne.move(Y,le,Ce,Ee);return}if(ne===Te){i(Q,le,Ce);for(let xe=0;xe<Ae.length;xe++)H(Ae[xe],le,Ce,ae);i(Y.anchor,le,Ce);return}if(ne===ah){C(Y,le,Ce);return}if(ae!==2&&_e&1&&ge)if(ae===0)ge.persisted&&!Q[al]?i(Q,le,Ce):(ge.beforeEnter(Q),i(Q,le,Ce),Ds(()=>ge.enter(Q),oe));else{const{leave:xe,delayLeave:Ne,afterLeave:et}=ge,ut=()=>{Y.ctx.isUnmounted?s(Q):i(Q,le,Ce)},yt=()=>{const Mt=Q._isLeaving||!!Q[al];Q._isLeaving&&Q[al](!0),ge.persisted&&!Mt?ut():xe(Q,()=>{ut(),et&&et()})};Ne?Ne(Q,ut,yt):yt()}else i(Q,le,Ce)},ee=(Y,le,Ce,ae=!1,oe=!1)=>{const{type:Q,props:ne,ref:ge,children:Ae,dynamicChildren:_e,shapeFlag:Ke,patchFlag:xe,dirs:Ne,cacheIndex:et,memo:ut}=Y;if(xe===-2&&(oe=!1),ge!=null&&(ba(),rh(ge,null,Ce,Y,!0),Aa()),et!=null&&(le.renderCache[et]=void 0),Ke&256){le.ctx.deactivate(Y);return}const yt=Ke&1&&Ne,Mt=!Ya(Y);let Ze;if(Mt&&(Ze=ne&&ne.onVnodeBeforeUnmount)&&mr(Ze,le,Y),Ke&6)se(Y.component,Ce,ae);else{if(Ke&128){Y.suspense.unmount(Ce,ae);return}yt&&aa(Y,null,le,"beforeUnmount"),Ke&64?Y.type.remove(Y,le,Ce,Ee,ae):_e&&!_e.hasOnce&&(Q!==Te||xe>0&&xe&64)?Z(_e,le,Ce,!1,!0):(Q===Te&&xe&384||!oe&&Ke&16)&&Z(Ae,le,Ce),ae&&V(Y)}const Ge=ut!=null&&et==null;(Mt&&(Ze=ne&&ne.onVnodeUnmounted)||yt||Ge)&&Ds(()=>{Ze&&mr(Ze,le,Y),yt&&aa(Y,null,le,"unmounted"),Ge&&(Y.el=null)},Ce)},V=Y=>{const{type:le,el:Ce,anchor:ae,transition:oe}=Y;if(le===Te){ie(Ce,ae);return}if(le===ah){v(Y);return}const Q=()=>{s(Ce),oe&&!oe.persisted&&oe.afterLeave&&oe.afterLeave()};if(Y.shapeFlag&1&&oe&&!oe.persisted){const{leave:ne,delayLeave:ge}=oe,Ae=()=>ne(Ce,Q);ge?ge(Y.el,Q,Ae):Ae()}else Q()},ie=(Y,le)=>{let Ce;for(;Y!==le;)Ce=f(Y),s(Y),Y=Ce;s(le)},se=(Y,le,Ce)=>{const{bum:ae,scope:oe,job:Q,subTree:ne,um:ge,m:Ae,a:_e}=Y;D2(Ae),D2(_e),ae&&sh(ae),oe.stop(),Q&&(Q.flags|=8,ee(ne,Y,le,Ce)),ge&&Ds(ge,le),Ds(()=>{Y.isUnmounted=!0},le)},Z=(Y,le,Ce,ae=!1,oe=!1,Q=0)=>{for(let ne=Q;ne<Y.length;ne++)ee(Y[ne],le,Ce,ae,oe)},pe=Y=>{if(Y.shapeFlag&6)return pe(Y.component.subTree);if(Y.shapeFlag&128)return Y.suspense.next();const le=f(Y.anchor||Y.el),Ce=le&&le[DL];return Ce?f(Ce):le};let re=!1;const fe=(Y,le,Ce)=>{let ae;Y==null?le._vnode&&(ee(le._vnode,null,null,!0),ae=le._vnode.component):m(le._vnode||null,Y,le,null,null,null,Ce),le._vnode=Y,re||(re=!0,AC(ae),T2(),re=!1)},Ee={p:m,um:ee,m:H,r:V,mt:O,mc:I,pc:j,pbc:$,n:pe,o:e};let X,we;return t&&([X,we]=t(Ee)),{render:fe,hydrate:X,createApp:rq(fe,X)}}function _4({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Vc({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function lN(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function b5(e,t,n=!1){const i=e.children,s=t.children;if(nn(i)&&nn(s))for(let o=0;o<i.length;o++){const r=i[o];let l=s[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=s[o]=ja(s[o]),l.el=r.el),!n&&l.patchFlag!==-2&&b5(r,l)),l.type===Zu&&(l.patchFlag===-1&&(l=s[o]=ja(l)),l.el=r.el),l.type===Rs&&!l.el&&(l.el=r.el)}}function Aq(e){const t=e.slice(),n=[0];let i,s,o,r,l;const a=e.length;for(i=0;i<a;i++){const u=e[i];if(u!==0){if(s=n[n.length-1],e[s]<u){t[i]=s,n.push(i);continue}for(o=0,r=n.length-1;o<r;)l=o+r>>1,e[n[l]]<u?o=l+1:r=l;u<e[n[o]]&&(o>0&&(t[i]=n[o-1]),n[o]=i)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=t[r];return n}function aN(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:aN(t)}function D2(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function uN(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?uN(t.subTree):null}const $2=e=>e.__isSuspense;let Dk=0;const Cq={name:"Suspense",__isSuspense:!0,process(e,t,n,i,s,o,r,l,a,u){if(e==null)wq(t,n,i,s,o,r,l,a,u);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}xq(e,t,n,i,s,r,l,a,u)}},hydrate:Sq,normalize:_q},rat=Cq;function Zp(e,t){const n=e.props&&e.props[t];xn(n)&&n()}function wq(e,t,n,i,s,o,r,l,a){const{p:u,o:{createElement:c}}=a,d=c("div"),f=e.suspense=cN(e,s,i,t,d,n,o,r,l,a);u(null,f.pendingBranch=e.ssContent,d,null,i,f,o,r),f.deps>0?(Zp(e,"onPending"),Zp(e,"onFallback"),u(null,e.ssFallback,t,n,i,null,o,r),lh(f,e.ssFallback)):f.resolve(!1,!0)}function xq(e,t,n,i,s,o,r,l,{p:a,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const f=t.ssContent,h=t.ssFallback,{activeBranch:g,pendingBranch:m,isInFallback:y,isHydrating:A}=d;if(m)d.pendingBranch=f,Ll(m,f)?(a(m,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0?d.resolve():y&&(A||(a(g,h,n,i,s,null,o,r,l),lh(d,h)))):(d.pendingId=Dk++,A?(d.isHydrating=!1,d.activeBranch=m):u(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),y?(a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0?d.resolve():(a(g,h,n,i,s,null,o,r,l),lh(d,h))):g&&Ll(g,f)?(a(g,f,n,i,s,d,o,r,l),d.resolve(!0)):(a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0&&d.resolve()));else if(g&&Ll(g,f))a(g,f,n,i,s,d,o,r,l),lh(d,f);else if(Zp(t,"onPending"),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=Dk++,a(null,f,d.hiddenContainer,null,s,d,o,r,l),d.deps<=0)d.resolve();else{const{timeout:b,pendingId:C}=d;b>0?setTimeout(()=>{d.pendingId===C&&d.fallback(h)},b):b===0&&d.fallback(h)}}function cN(e,t,n,i,s,o,r,l,a,u,c=!1){const{p:d,m:f,um:h,n:g,o:{parentNode:m,remove:y}}=u;let A;const b=Iq(e);b&&t&&t.pendingBranch&&(A=t.pendingId,t.deps++);const C=e.props?x2(e.props.timeout):void 0,v=o,x={vnode:e,parent:t,parentComponent:n,namespace:r,container:i,hiddenContainer:s,deps:0,pendingId:Dk++,timeout:typeof C=="number"?C:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(S=!1,_=!1){const{vnode:I,activeBranch:M,pendingBranch:$,pendingId:D,effects:T,parentComponent:N,container:O,isInFallback:P}=x;let R=!1;if(x.isHydrating)x.isHydrating=!1;else if(!S){R=M&&$.transition&&$.transition.mode==="out-in";let W=!1;R&&(M.transition.afterLeave=()=>{D===x.pendingId&&(f($,O,o===v&&!W?g(M):o,0),E2(T),P&&I.ssFallback&&(I.ssFallback.el=null))}),M&&!x.isFallbackMountPending&&(m(M.el)===O&&(o=g(M),W=!0),h(M,N,x,!0),!R&&P&&I.ssFallback&&Ds(()=>I.ssFallback.el=null,x)),R||f($,O,o,0)}x.isFallbackMountPending=!1,lh(x,$),x.pendingBranch=null,x.isInFallback=!1;let q=x.parent,j=!1;for(;q;){if(q.pendingBranch){q.effects.push(...T),j=!0;break}q=q.parent}!j&&!R&&E2(T),x.effects=[],b&&t&&t.pendingBranch&&A===t.pendingId&&(t.deps--,t.deps===0&&!_&&t.resolve()),Zp(I,"onResolve")},fallback(S){if(!x.pendingBranch)return;const{vnode:_,activeBranch:I,parentComponent:M,container:$,namespace:D}=x;Zp(_,"onFallback");const T=g(I),N=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,S,$,T,M,null,D,l,a),lh(x,S))},O=S.transition&&S.transition.mode==="out-in";O&&(x.isFallbackMountPending=!0,I.transition.afterLeave=N),x.isInFallback=!0,h(I,M,null,!0),O||N()},move(S,_,I){x.activeBranch&&f(x.activeBranch,S,_,I),x.container=S},next(){return x.activeBranch&&g(x.activeBranch)},registerDep(S,_,I){const M=!!x.pendingBranch;M&&x.deps++;const $=S.vnode.el;S.asyncDep.catch(D=>{zh(D,S,0)}).then(D=>{if(S.isUnmounted||x.isUnmounted||x.pendingId!==S.suspenseId)return;Gp(),S.asyncResolved=!0;const{vnode:T}=S;$k(S,D,!1),$&&(T.el=$);const N=!$&&S.subTree.el;_(S,T,m($||S.subTree.el),$?null:g(S.subTree),x,r,I),N&&(T.placeholder=null,y(N)),Ty(S,T.el),M&&--x.deps===0&&x.resolve()})},unmount(S,_){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,n,S,_),x.pendingBranch&&h(x.pendingBranch,n,S,_)}};return x}function Sq(e,t,n,i,s,o,r,l,a){const u=t.suspense=cN(t,i,n,e.parentNode,document.createElement("div"),null,s,o,r,l,!0),c=a(e,u.pendingBranch=t.ssContent,n,u,o,r);return u.deps===0&&u.resolve(!1,!0),c}function _q(e){const{shapeFlag:t,children:n}=e,i=t&32;e.ssContent=DC(i?n.default:n),e.ssFallback=i?DC(n.fallback):K(Rs)}function DC(e){let t;if(xn(e)){const n=Rd&&e._c;n&&(e._d=!1,k()),e=e(),n&&(e._d=!0,t=qo,fN())}return nn(e)&&(e=uq(e)),e=Ar(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function dN(e,t){t&&t.pendingBranch?nn(e)?t.effects.push(...e):t.effects.push(e):E2(e)}function lh(e,t){e.activeBranch=t;const{vnode:n,parentComponent:i}=e;let s=t.el;for(;!s&&t.component;)t=t.component.subTree,s=t.el;n.el=s,i&&i.subTree===n&&(i.vnode.el=s,Ty(i,s))}function Iq(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Te=Symbol.for("v-fgt"),Zu=Symbol.for("v-txt"),Rs=Symbol.for("v-cmt"),ah=Symbol.for("v-stc"),dp=[];let qo=null;function k(e=!1){dp.push(qo=e?null:[])}function fN(){dp.pop(),qo=dp[dp.length-1]||null}let Rd=1;function B2(e,t=!1){Rd+=e,e<0&&qo&&t&&(qo.hasOnce=!0)}function hN(e){return e.dynamicChildren=Rd>0?qo||nh:null,fN(),Rd>0&&qo&&qo.push(e),e}function E(e,t,n,i,s,o){return hN(w(e,t,n,i,s,o,!0))}function de(e,t,n,i,s){return hN(K(e,t,n,i,s,!0))}function ic(e){return e?e.__v_isVNode===!0:!1}function Ll(e,t){return e.type===t.type&&e.key===t.key}function lat(e){}const pN=({key:e})=>e??null,Km=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ii(e)||Hi(e)||xn(e)?{i:Io,r:e,k:t,f:!!n}:e:null);function w(e,t=null,n=null,i=0,s=null,o=e===Te?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&pN(t),ref:t&&Km(t),scopeId:Iy,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Io};return l?(z2(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=Ii(n)?8:16),Rd>0&&!r&&qo&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&qo.push(a),a}const K=Mq;function Mq(e,t=null,n=null,i=0,s=null,o=!1){if((!e||e===qL)&&(e=Rs),ic(e)){const l=iu(e,t,!0);return n&&z2(l,n),Rd>0&&!o&&qo&&(l.shapeFlag&6?qo[qo.indexOf(e)]=l:qo.push(l)),l.patchFlag=-2,l}if(Fq(e)&&(e=e.__vccOpts),t){t=gN(t);let{class:l,style:a}=t;l&&!Ii(l)&&(t.class=Fe(l)),ci(a)&&(_y(a)&&!nn(a)&&(a=bi({},a)),t.style=qt(a))}const r=Ii(e)?1:$2(e)?128:$L(e)?64:ci(e)?4:xn(e)?2:0;return w(e,t,n,i,s,r,o,!0)}function gN(e){return e?_y(e)||eN(e)?bi({},e):e:null}function iu(e,t,n=!1,i=!1){const{props:s,ref:o,patchFlag:r,children:l,transition:a}=e,u=t?Un(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&pN(u),ref:t&&t.ref?n&&o?nn(o)?o.concat(Km(t)):[o,Km(t)]:Km(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Te?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&iu(e.ssContent),ssFallback:e.ssFallback&&iu(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&i&&nc(c,a.clone(c)),c}function $e(e=" ",t=0){return K(Zu,null,e,t)}function mc(e,t){const n=K(ah,null,e);return n.staticCount=t,n}function te(e="",t=!1){return t?(k(),de(Rs,null,e)):K(Rs,null,e)}function Ar(e){return e==null||typeof e=="boolean"?K(Rs):nn(e)?K(Te,null,e.slice()):ic(e)?ja(e):K(Zu,null,String(e))}function ja(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:iu(e)}function z2(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(nn(t))n=16;else if(typeof t=="object")if(i&65){const s=t.default;s&&(s._c&&(s._d=!1),z2(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!eN(t)?t._ctx=Io:s===3&&Io&&(Io.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(xn(t)){if(i&65){z2(e,{default:t});return}t={default:t,_ctx:Io},n=32}else t=String(t),i&64?(n=16,t=[$e(t)]):n=8;e.children=t,e.shapeFlag|=n}function Un(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const s in i)if(s==="class")t.class!==i.class&&(t.class=Fe([t.class,i.class]));else if(s==="style")t.style=qt([t.style,i.style]);else if(I0(s)){const o=t[s],r=i[s];r&&o!==r&&!(nn(o)&&o.includes(r))?t[s]=o?[].concat(o,r):r:r==null&&o==null&&!py(s)&&(t[s]=r)}else s!==""&&(t[s]=i[s])}return t}function mr(e,t,n,i=null){vl(e,t,7,[n,i])}const Eq=ZL();let Tq=0;function mN(e,t,n){const i=e.type,s=(t?t.appContext:e.appContext)||Eq,o={uid:Tq++,vnode:e,type:i,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new aL(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(s.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:nN(i,s),emitsOptions:QL(i,s),emit:null,emitted:null,propsDefaults:jn,inheritAttrs:i.inheritAttrs,ctx:jn,data:jn,props:jn,attrs:jn,slots:jn,refs:jn,setupState:jn,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=lq.bind(null,o),e.ce&&e.ce(o),o}let So=null;const Ws=()=>So||Io;let R2,uh;{const e=by(),t=(n,i)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(i),o=>{s.length>1?s.forEach(r=>r(o)):s[0](o)}};R2=t("__VUE_INSTANCE_SETTERS__",n=>So=n),uh=t("__VUE_SSR_SETTERS__",n=>Od=n)}const Oh=e=>{const t=So;return R2(e),e.scope.on(),()=>{e.scope.off(),R2(t)}},Gp=()=>{So&&So.scope.off(),R2(null)};function vN(e){return e.vnode.shapeFlag&4}let Od=!1;function yN(e,t=!1,n=!1){t&&uh(t);const{props:i,children:s}=e.vnode,o=vN(e);hq(e,i,o,t),vq(e,s,n||t);const r=o?Lq(e,t):void 0;return t&&uh(!1),r}function Lq(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Tk);const{setup:i}=n;if(i){ba();const s=e.setupContext=i.length>1?bN(e):null,o=Oh(e),r=E0(i,e,0,[e.props,s]),l=o5(r);if(Aa(),o(),(l||e.sp)&&!Ya(e)&&f5(e),l){if(r.then(Gp,Gp),t)return r.then(a=>{$k(e,a,t)}).catch(a=>{zh(a,e,0)});e.asyncDep=r}else $k(e,r,t)}else kN(e,t)}function $k(e,t,n){xn(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ci(t)&&(e.setupState=_L(t)),kN(e,n)}let O2,Bk;function aat(e){O2=e,Bk=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,XW))}}const uat=()=>!O2;function kN(e,t,n){const i=e.type;if(!e.render){if(!t&&O2&&!i.render){const s=i.template||v5(e).template;if(s){const{isCustomElement:o,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:a}=i,u=bi(bi({isCustomElement:o,delimiters:l},r),a);i.render=O2(s,u)}}e.render=i.render||gl,Bk&&Bk(e)}{const s=Oh(e);ba();try{eq(e)}finally{Aa(),s()}}}const Nq={get(e,t){return jo(e,"get",""),e[t]}};function bN(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Nq),slots:e.slots,emit:e.emit,expose:t}}function F0(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(_L(xt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in cp)return cp[n](e)},has(t,n){return n in t||n in cp}})):e.proxy}function zk(e,t=!0){return xn(e)?e.displayName||e.name:e.name||t&&e.__name}function Fq(e){return xn(e)&&"__vccOpts"in e}const L=(e,t)=>hW(e,t,Od);function gn(e,t,n){try{B2(-1);const i=arguments.length;return i===2?ci(t)&&!nn(t)?ic(t)?K(e,null,[t]):K(e,t):K(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&ic(n)&&(n=[n]),K(e,t,n))}finally{B2(1)}}function cat(){}function dat(e,t,n,i){const s=n[i];if(s&&Dq(s,e))return s;const o=t();return o.memo=e.slice(),o.cacheIndex=i,n[i]=o}function Dq(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let i=0;i<n.length;i++)if(ro(n[i],t[i]))return!1;return Rd>0&&qo&&qo.push(e),!0}const $q="3.5.39",fat=gl,hat=yW,pat=Rf,gat=NL,Bq={createComponentInstance:mN,setupComponent:yN,renderComponentRoot:Um,setCurrentRenderingInstance:Up,isVNode:ic,normalizeVNode:Ar,getComponentPublicInstance:F0,ensureValidVNode:m5,pushWarningContext:mW,popWarningContext:vW},mat=Bq,vat=null,yat=null,kat=null;/** +* @vue/runtime-dom v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Rk;const $C=typeof window<"u"&&window.trustedTypes;if($C)try{Rk=$C.createPolicy("vue",{createHTML:e=>e})}catch{}const AN=Rk?e=>Rk.createHTML(e):e=>e,zq="http://www.w3.org/2000/svg",Rq="http://www.w3.org/1998/Math/MathML",Ra=typeof document<"u"?document:null,BC=Ra&&Ra.createElement("template"),Oq={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const s=t==="svg"?Ra.createElementNS(zq,e):t==="mathml"?Ra.createElementNS(Rq,e):n?Ra.createElement(e,{is:n}):Ra.createElement(e);return e==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:e=>Ra.createTextNode(e),createComment:e=>Ra.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ra.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,s,o){const r=n?n.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{BC.innerHTML=AN(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const l=BC.content;if(i==="svg"||i==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},yu="transition",A1="animation",_h=Symbol("_vtc"),CN={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},wN=bi({},zL,CN),Pq=e=>(e.displayName="Transition",e.props=wN,e),ls=Pq((e,{slots:t})=>gn(TW,xN(e),t)),Zc=(e,t=[])=>{nn(e)?e.forEach(n=>n(...t)):e&&e(...t)},zC=e=>e?nn(e)?e.some(t=>t.length>1):e.length>1:!1;function xN(e){const t={};for(const T in e)T in CN||(t[T]=e[T]);if(e.css===!1)return t;const{name:n="v",type:i,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:u=r,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,g=jq(s),m=g&&g[0],y=g&&g[1],{onBeforeEnter:A,onEnter:b,onEnterCancelled:C,onLeave:v,onLeaveCancelled:x,onBeforeAppear:S=A,onAppear:_=b,onAppearCancelled:I=C}=t,M=(T,N,O,P)=>{T._enterCancelled=P,Mu(T,N?c:l),Mu(T,N?u:r),O&&O()},$=(T,N)=>{T._isLeaving=!1,Mu(T,d),Mu(T,h),Mu(T,f),N&&N()},D=T=>(N,O)=>{const P=T?_:b,R=()=>M(N,T,O);Zc(P,[N,R]),RC(()=>{Mu(N,T?a:o),oa(N,T?c:l),zC(P)||OC(N,i,m,R)})};return bi(t,{onBeforeEnter(T){Zc(A,[T]),oa(T,o),oa(T,r)},onBeforeAppear(T){Zc(S,[T]),oa(T,a),oa(T,u)},onEnter:D(!1),onAppear:D(!0),onLeave(T,N){T._isLeaving=!0;const O=()=>$(T,N);oa(T,d),T._enterCancelled?(oa(T,f),Ok(T)):(Ok(T),oa(T,f)),RC(()=>{T._isLeaving&&(Mu(T,d),oa(T,h),zC(v)||OC(T,i,y,O))}),Zc(v,[T,O])},onEnterCancelled(T){M(T,!1,void 0,!0),Zc(C,[T])},onAppearCancelled(T){M(T,!0,void 0,!0),Zc(I,[T])},onLeaveCancelled(T){$(T),Zc(x,[T])}})}function jq(e){if(e==null)return null;if(ci(e))return[I4(e.enter),I4(e.leave)];{const t=I4(e);return[t,t]}}function I4(e){return x2(e)}function oa(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[_h]||(e[_h]=new Set)).add(t)}function Mu(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[_h];n&&(n.delete(t),n.size||(e[_h]=void 0))}function RC(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Hq=0;function OC(e,t,n,i){const s=e._endId=++Hq,o=()=>{s===e._endId&&i()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:l,propCount:a}=SN(e,t);if(!r)return i();const u=r+"end";let c=0;const d=()=>{e.removeEventListener(u,f),o()},f=h=>{h.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(u,f)}function SN(e,t){const n=window.getComputedStyle(e),i=g=>(n[g]||"").split(", "),s=i(`${yu}Delay`),o=i(`${yu}Duration`),r=PC(s,o),l=i(`${A1}Delay`),a=i(`${A1}Duration`),u=PC(l,a);let c=null,d=0,f=0;t===yu?r>0&&(c=yu,d=r,f=o.length):t===A1?u>0&&(c=A1,d=u,f=a.length):(d=Math.max(r,u),c=d>0?r>u?yu:A1:null,f=c?c===yu?o.length:a.length:0);const h=c===yu&&/\b(?:transform|all)(?:,|$)/.test(i(`${yu}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function PC(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>jC(n)+jC(e[i])))}function jC(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ok(e){return(e?e.ownerDocument:document).body.offsetHeight}function Wq(e,t,n){const i=e[_h];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const P2=Symbol("_vod"),A5=Symbol("_vsh"),Qi={name:"show",beforeMount(e,{value:t},{transition:n}){e[P2]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):C1(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:i}){!t!=!n&&(i?t?(i.beforeEnter(e),C1(e,!0),i.enter(e)):i.leave(e,()=>{C1(e,!1)}):C1(e,t))},beforeUnmount(e,{value:t}){C1(e,t)}};function C1(e,t){e.style.display=t?e[P2]:"none",e[A5]=!t}function qq(){Qi.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const _N=Symbol("");function bat(e){const t=Ws();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>j2(o,s))},i=()=>{const s=e(t.proxy);t.ce?j2(t.ce,s):Pk(t.subTree,s),n(s)};HL(()=>{E2(i)}),mn(()=>{qe(i,gl,{flush:"post"});const s=new MutationObserver(i);s.observe(t.subTree.el.parentNode,{childList:!0}),Mn(()=>s.disconnect())})}function Pk(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Pk(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)j2(e.el,t);else if(e.type===Te)e.children.forEach(n=>Pk(n,t));else if(e.type===ah){let{el:n,anchor:i}=e;for(;n&&(j2(n,t),n!==i);)n=n.nextSibling}}function j2(e,t){if(e.nodeType===1){const n=e.style;let i="";for(const s in t){const o=OH(t[s]);n.setProperty(`--${s}`,o),i+=`--${s}: ${o};`}n[_N]=i}}const Uq=/(?:^|;)\s*display\s*:/;function Kq(e,t,n){const i=e.style,s=Ii(n);let o=!1;if(n&&!s){if(t)if(Ii(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&W1(i,l,"")}else for(const r in t)n[r]==null&&W1(i,r,"");for(const r in n){r==="display"&&(o=!0);const l=n[r];l!=null?Zq(e,r,!Ii(t)&&t?t[r]:void 0,l)||W1(i,r,l):W1(i,r,"")}}else if(s){if(t!==n){const r=i[_N];r&&(n+=";"+r),i.cssText=n,o=Uq.test(n)}}else t&&e.removeAttribute("style");P2 in e&&(e[P2]=o?i.display:"",e[A5]&&(i.display="none"))}const HC=/\s*!important$/;function W1(e,t,n){if(nn(n))n.forEach(i=>W1(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=Vq(e,t);HC.test(n)?e.setProperty(Cr(i),n.replace(HC,""),"important"):e[i]=n}}const WC=["Webkit","Moz","ms"],M4={};function Vq(e,t){const n=M4[t];if(n)return n;let i=Ys(t);if(i!=="filter"&&i in e)return M4[t]=i;i=yy(i);for(let s=0;s<WC.length;s++){const o=WC[s]+i;if(o in e)return M4[t]=o}return t}function Zq(e,t,n,i){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ii(i)&&n===i}const qC="http://www.w3.org/1999/xlink";function UC(e,t,n,i,s,o=zH(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(qC,t.slice(6,t.length)):e.setAttributeNS(qC,t,n):n==null||o&&!oL(n)?e.removeAttribute(t):e.setAttribute(t,o?"":Zr(n)?String(n):n)}function KC(e,t,n,i,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?AN(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=oL(n):n==null&&l==="string"?(n="",r=!0):l==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(s||t)}function qa(e,t,n,i){e.addEventListener(t,n,i)}function Gq(e,t,n,i){e.removeEventListener(t,n,i)}const VC=Symbol("_vei");function Qq(e,t,n,i,s=null){const o=e[VC]||(e[VC]={}),r=o[t];if(i&&r)r.value=i;else{const[l,a]=Xq(t);if(i){const u=o[t]=nU(i,s);qa(e,l,u,a)}else r&&(Gq(e,l,r,a),o[t]=void 0)}}const Yq=/(Once|Passive|Capture)$/,Jq=/^on:?(?:Once|Passive|Capture)$/;function Xq(e){let t,n;for(;(n=e.match(Yq))&&!Jq.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Cr(e.slice(2)),t]}let E4=0;const eU=Promise.resolve(),tU=()=>E4||(eU.then(()=>E4=0),E4=Date.now());function nU(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;const s=n.value;if(nn(s)){const o=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{o.call(i),i._stopped=!0};const r=s.slice(),l=[i];for(let a=0;a<r.length&&!i._stopped;a++){const u=r[a];u&&vl(u,t,5,l)}}else vl(s,t,5,[i])};return n.value=e,n.attached=tU(),n}const ZC=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,iU=(e,t,n,i,s,o)=>{const r=s==="svg";t==="class"?Wq(e,i,r):t==="style"?Kq(e,n,i):I0(t)?py(t)||Qq(e,t,n,i,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):sU(e,t,i,r))?(KC(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&UC(e,t,i,r,o,t!=="value")):e._isVueCE&&(oU(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ii(i)))?KC(e,Ys(t),i,o,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),UC(e,t,i,r))};function sU(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&ZC(t)&&xn(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return ZC(t)&&Ii(n)?!1:t in e}function oU(e,t){const n=e._def.props;if(!n)return!1;const i=Ys(t);return Array.isArray(n)?n.some(s=>Ys(s)===i):Object.keys(n).some(s=>Ys(s)===i)}const GC={};function rU(e,t,n){let i=Qe(e,t);gy(i)&&(i=bi({},i,t));class s extends C5{constructor(r){super(i,r,n)}}return s.def=i,s}const Aat=((e,t)=>rU(e,t,CU)),lU=typeof HTMLElement<"u"?HTMLElement:class{};class C5 extends lU{constructor(t,n={},i=q2){super(),this._def=t,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&i!==q2?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(bi({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.assignedSlot||t.parentNode||t.host);)if(t instanceof C5){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,kt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(i,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:r}=i;let l;if(o&&!nn(o))for(const a in o){const u=o[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=x2(this._props[a])),(l||(l=Object.create(null)))[Ys(a)]=!0)}this._numberProps=l,this._resolveProps(i),this.shadowRoot&&this._applyStyles(r),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>{i.configureApp=this._def.configureApp,t(this._def=i,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const i in n)ai(this,i)||Object.defineProperty(this,i,{get:()=>p(n[i])})}_resolveProps(t){const{props:n}=t,i=nn(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&i.includes(s)&&this._setProp(s,this[s]);for(const s of i.map(Ys))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(o){this._setProp(s,o,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let i=n?this.getAttribute(t):GC;const s=Ys(t);n&&this._numberProps&&this._numberProps[s]&&(i=x2(i)),this._setProp(s,i,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,i=!0,s=!1){if(n!==this._props[t]&&(this._dirty=!0,n===GC?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),i)){const o=this._ob;o&&(this._processMutations(o.takeRecords()),o.disconnect()),n===!0?this.setAttribute(Cr(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Cr(t),n+""):n||this.removeAttribute(Cr(t)),o&&o.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),AU(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=K(this._def,bi(t,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const s=(o,r)=>{this.dispatchEvent(new CustomEvent(o,gy(r[0])?bi({detail:r},r[0]):{detail:r}))};i.emit=(o,...r)=>{s(o,r),Cr(o)!==o&&s(Cr(o),r)},this._setParent()}),n}_applyStyles(t,n,i){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce,o=this.shadowRoot,r=i?this._getStyleAnchor(i)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(o);let l=null;for(let a=t.length-1;a>=0;a--){const u=document.createElement("style");s&&u.setAttribute("nonce",s),u.textContent=t[a],o.insertBefore(u,l||r),l=u,a===0&&(i||this._styleAnchors.set(this._def,u),n&&this._styleAnchors.set(n,u))}}_getStyleAnchor(t){if(!t)return null;const n=this._styleAnchors.get(t);return n&&n.parentNode===this.shadowRoot?n:(n&&this._styleAnchors.delete(t),null)}_getRootStyleInsertionAnchor(t){for(let n=0;n<t.childNodes.length;n++){const i=t.childNodes[n];if(!(i instanceof HTMLStyleElement))return i}return null}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(t[i]||(t[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let i=0;i<t.length;i++){const s=t[i],o=s.getAttribute("name")||"default",r=this._slots[o],l=s.parentNode;if(r)for(const a of r){if(n&&a.nodeType===1){const u=n+"-s",c=document.createTreeWalker(a,1);a.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}l.insertBefore(a,s)}else for(;s.firstChild;)l.insertBefore(s.firstChild,s);l.removeChild(s)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const n=new Set;for(const i of t){const s=i.querySelectorAll("slot");for(let o=0;o<s.length;o++)n.add(s[o])}return Array.from(n)}_injectChildStyle(t,n){this._applyStyles(t.styles,t,n)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(t){}}function aU(e){const t=Ws(),n=t&&t.ce;return n||null}function Cat(){const e=aU();return e&&e.shadowRoot}function wat(e="$style"){{const t=Ws();if(!t)return jn;const n=t.type.__cssModules;if(!n)return jn;const i=n[e];return i||jn}}const IN=new WeakMap,MN=new WeakMap,H2=Symbol("_moveCb"),QC=Symbol("_enterCb"),uU=e=>(delete e.props.mode,e),cU=uU({name:"TransitionGroup",props:bi({},wN,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ws(),i=BL();let s,o;return N0(()=>{if(!s.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!pU(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(dU),s.forEach(fU);const l=s.filter(hU);Ok(n.vnode.el),l.forEach(a=>{const u=a.el,c=u.style;oa(u,r),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[H2]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[H2]=null,Mu(u,r))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const r=Vn(e),l=xN(r);let a=r.tag||Te;if(s=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&!c.el[A5]&&(s.push(c),nc(c,Kp(c,l,i,n)),IN.set(c,TN(c.el)))}o=t.default?d5(t.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&nc(c,Kp(c,l,i,n))}return K(a,null,o)}}}),EN=cU;function dU(e){const t=e.el;t[H2]&&t[H2](),t[QC]&&t[QC]()}function fU(e){MN.set(e,TN(e.el))}function hU(e){const t=IN.get(e),n=MN.get(e),i=t.left-n.left,s=t.top-n.top;if(i||s){const o=e.el,r=o.style,l=o.getBoundingClientRect();let a=1,u=1;return o.offsetWidth&&(a=l.width/o.offsetWidth),o.offsetHeight&&(u=l.height/o.offsetHeight),(!Number.isFinite(a)||a===0)&&(a=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(a-1)<.01&&(a=1),Math.abs(u-1)<.01&&(u=1),r.transform=r.webkitTransform=`translate(${i/a}px,${s/u}px)`,r.transitionDuration="0s",e}}function TN(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function pU(e,t,n){const i=e.cloneNode(),s=e[_h];s&&s.forEach(l=>{l.split(/\s+/).forEach(a=>a&&i.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&i.classList.add(l)),i.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(i);const{hasTransform:r}=SN(i);return o.removeChild(i),r}const sc=e=>{const t=e.props["onUpdate:modelValue"]||!1;return nn(t)?n=>sh(t,n):t};function gU(e){e.target.composing=!0}function YC(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ml=Symbol("_assign");function JC(e,t,n){return t&&(e=e.trim()),n&&(e=ky(e)),e}const uo={created(e,{modifiers:{lazy:t,trim:n,number:i}},s){e[ml]=sc(s);const o=i||s.props&&s.props.type==="number";qa(e,t?"change":"input",r=>{r.target.composing||e[ml](JC(e.value,n,o))}),(n||o)&&qa(e,"change",()=>{e.value=JC(e.value,n,o)}),t||(qa(e,"compositionstart",gU),qa(e,"compositionend",YC),qa(e,"change",YC))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:s,number:o}},r){if(e[ml]=sc(r),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?ky(e.value):e.value,a=t??"";if(l===a)return;const u=e.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===e&&e.type!=="range"&&(i&&t===n||s&&e.value.trim()===a)||(e.value=a)}},W2={deep:!0,created(e,t,n){e[ml]=sc(n),qa(e,"change",()=>{const i=e._modelValue,s=Ih(e),o=e.checked,r=e[ml];if(nn(i)){const l=Ay(i,s),a=l!==-1;if(o&&!a)r(i.concat(s));else if(!o&&a){const u=[...i];u.splice(l,1),r(u)}}else if(Jd(i)){const l=new Set(i);o?l.add(s):l.delete(s),r(l)}else r(NN(e,o))})},mounted:XC,beforeUpdate(e,t,n){e[ml]=sc(n),XC(e,t,n)}};function XC(e,{value:t,oldValue:n},i){e._modelValue=t;let s;if(nn(t))s=Ay(t,i.props.value)>-1;else if(Jd(t))s=t.has(i.props.value);else{if(t===n)return;s=tu(t,NN(e,!0))}e.checked!==s&&(e.checked=s)}const LN={created(e,{value:t},n){e.checked=tu(t,n.props.value),e[ml]=sc(n),qa(e,"change",()=>{e[ml](Ih(e))})},beforeUpdate(e,{value:t,oldValue:n},i){e[ml]=sc(i),t!==n&&(e.checked=tu(t,i.props.value))}},jk={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const s=Jd(t);qa(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?ky(Ih(r)):Ih(r));e[ml](e.multiple?s?new Set(o):o:o[0]),e._assigning=!0,kt(()=>{e._assigning=!1})}),e[ml]=sc(i)},mounted(e,{value:t}){ew(e,t)},beforeUpdate(e,t,n){e[ml]=sc(n)},updated(e,{value:t}){e._assigning||ew(e,t)}};function ew(e,t){const n=e.multiple,i=nn(t);if(!(n&&!i&&!Jd(t))){for(let s=0,o=e.options.length;s<o;s++){const r=e.options[s],l=Ih(r);if(n)if(i){const a=typeof l;a==="string"||a==="number"?r.selected=t.some(u=>String(u)===String(l)):r.selected=Ay(t,l)>-1}else r.selected=t.has(l);else if(tu(Ih(r),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ih(e){return"_value"in e?e._value:e.value}function NN(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const mU={created(e,t,n){Ug(e,t,n,null,"created")},mounted(e,t,n){Ug(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){Ug(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){Ug(e,t,n,i,"updated")}};function FN(e,t){switch(e){case"SELECT":return jk;case"TEXTAREA":return uo;default:switch(t){case"checkbox":return W2;case"radio":return LN;default:return uo}}}function Ug(e,t,n,i,s){const r=FN(e.tagName,n.props&&n.props.type)[s];r&&r(e,t,n,i)}function vU(){uo.getSSRProps=({value:e})=>({value:e}),LN.getSSRProps=({value:e},t)=>{if(t.props&&tu(t.props.value,e))return{checked:!0}},W2.getSSRProps=({value:e},t)=>{if(nn(e)){if(t.props&&Ay(e,t.props.value)>-1)return{checked:!0}}else if(Jd(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},mU.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=FN(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const yU=["ctrl","shift","alt","meta"],kU={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>yU.some(n=>e[`${n}Key`]&&!t.includes(n))},Ct=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=((s,...o)=>{for(let r=0;r<t.length;r++){const l=kU[t[r]];if(l&&l(s,t))return}return e(s,...o)}))},bU={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},_s=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=(s=>{if(!("key"in s))return;const o=Cr(s.key);if(t.some(r=>r===o||bU[r]===o))return e(s)}))},DN=bi({patchProp:iU},Oq);let fp,tw=!1;function $N(){return fp||(fp=kq(DN))}function BN(){return fp=tw?fp:bq(DN),tw=!0,fp}const AU=((...e)=>{$N().render(...e)}),xat=((...e)=>{BN().hydrate(...e)}),q2=((...e)=>{const t=$N().createApp(...e),{mount:n}=t;return t.mount=i=>{const s=RN(i);if(!s)return;const o=t._component;!xn(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,zN(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t}),CU=((...e)=>{const t=BN().createApp(...e),{mount:n}=t;return t.mount=i=>{const s=RN(i);if(s)return n(s,!0,zN(s))},t});function zN(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function RN(e){return Ii(e)?document.querySelector(e):e}let nw=!1;const Sat=()=>{nw||(nw=!0,vU(),qq())};/*! + * shared v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function wU(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const U2=typeof window<"u",vc=(e,t=!1)=>t?Symbol.for(e):Symbol(e),xU=(e,t,n)=>SU({l:e,k:t,s:n}),SU=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Os=e=>typeof e=="number"&&isFinite(e),ON=e=>x5(e)==="[object Date]",Mh=e=>x5(e)==="[object RegExp]",Ly=e=>Zn(e)&&Object.keys(e).length===0,js=Object.assign,_U=Object.create,_i=(e=null)=>_U(e);let iw;const md=()=>iw||(iw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:_i());function sw(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function IU(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}const MU=/^\s*javascript\s*(?::|�*58;?|�*3a;?|:?)/i,EU=/^(?:href|src|action|formaction)$/i;function w5(e){return MU.test(e)}function TU(e){const t=/url\s*\(/gi;let n="",i=0,s;for(;(s=t.exec(e))!==null;){const o=s.index,r=t.lastIndex-1;let l=r+1,a=1,u=null;for(;l<e.length;l++){const f=e[l];if(u){f===u&&(u=null);continue}if(f==='"'||f==="'")u=f;else if(f==="(")a++;else if(f===")"&&(a--,a===0))break}if(a!==0)break;const c=e.slice(r+1,l).trim(),d=c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'")?c.slice(1,-1).trim():c;n+=e.slice(i,o),n+=w5(d)?"url(about:blank)":e.slice(o,l+1),i=l+1}return n+e.slice(i)}function ow(e,t){if(EU.test(e)&&w5(t))return"about:blank";const n=e.toLowerCase()==="style"?TU(t):t;return IU(n)}function LU(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(n,i,s)=>`${i}="${ow(i,s)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(n,i,s)=>`${i}='${ow(i,s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),e=e.replace(/(\s+(?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi,(n,i,s)=>w5(s)?`${i}about:blank`:n),e}const NU=Object.prototype.hasOwnProperty;function hl(e,t){return NU.call(e,t)}const ms=Array.isArray,Gi=e=>typeof e=="function",Vt=e=>typeof e=="string",ii=e=>typeof e=="boolean",ri=e=>e!==null&&typeof e=="object",FU=e=>ri(e)&&Gi(e.then)&&Gi(e.catch),PN=Object.prototype.toString,x5=e=>PN.call(e),Zn=e=>x5(e)==="[object Object]",DU=e=>e==null?"":ms(e)||Zn(e)&&e.toString===PN?JSON.stringify(e,null,2):String(e);function S5(e,t=""){return e.reduce((n,i,s)=>s===0?n+i:n+t+i,"")}const Kg=e=>!ri(e)||ms(e);function Vm(e,t){if(Kg(e)||Kg(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:i,des:s}=n.pop();Object.keys(i).forEach(o=>{o!=="__proto__"&&(ri(i[o])&&!ri(s[o])&&(s[o]=Array.isArray(i[o])?[]:_i()),Kg(s[o])||Kg(i[o])?s[o]=i[o]:n.push({src:i[o],des:s[o]}))})}}/*! + * message-compiler v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function $U(e,t,n){return{line:e,column:t,offset:n}}function Hk(e,t,n){return{start:e,end:t}}const gi={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},BU=17;function Ny(e,t,n={}){const{domain:i,messages:s,args:o}=n,r=e,l=new SyntaxError(String(r));return l.code=e,t&&(l.location=t),l.domain=i,l}function zU(e){throw e}const ea=" ",RU="\r",Ro=` +`,OU="\u2028",PU="\u2029";function jU(e){const t=e;let n=0,i=1,s=1,o=0;const r=_=>t[_]===RU&&t[_+1]===Ro,l=_=>t[_]===Ro,a=_=>t[_]===PU,u=_=>t[_]===OU,c=_=>r(_)||l(_)||a(_)||u(_),d=()=>n,f=()=>i,h=()=>s,g=()=>o,m=_=>r(_)||a(_)||u(_)?Ro:t[_],y=()=>m(n),A=()=>m(n+o);function b(){return o=0,c(n)&&(i++,s=0),r(n)&&n++,n++,s++,t[n]}function C(){return r(n+o)&&o++,o++,t[n+o]}function v(){n=0,i=1,s=1,o=0}function x(_=0){o=_}function S(){const _=n+o;for(;_!==n;)b();o=0}return{index:d,line:f,column:h,peekOffset:g,charAt:m,currentChar:y,currentPeek:A,next:b,peek:C,reset:v,resetPeek:x,skipToPeek:S}}const $a=void 0,HU=".",rw="'",WU="tokenizer";function qU(e,t={}){const n=t.location!==!1,i=jU(e),s=()=>i.index(),o=()=>$U(i.line(),i.column(),i.index()),r=o(),l=s(),a={currentType:13,offset:l,startLoc:r,endLoc:r,lastType:13,lastOffset:l,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},u=()=>a,{onError:c}=t;function d(Q,ne,ge,...Ae){const _e=u();if(ne.column+=ge,ne.offset+=ge,c){const Ke=n?Hk(_e.startLoc,ne):null,xe=Ny(Q,Ke,{domain:WU,args:Ae});c(xe)}}function f(Q,ne,ge){Q.endLoc=o(),Q.currentType=ne;const Ae={type:ne};return n&&(Ae.loc=Hk(Q.startLoc,Q.endLoc)),ge!=null&&(Ae.value=ge),Ae}const h=Q=>f(Q,13);function g(Q,ne){return Q.currentChar()===ne?(Q.next(),ne):(d(gi.EXPECTED_TOKEN,o(),0,ne),"")}function m(Q){let ne="";for(;Q.currentPeek()===ea||Q.currentPeek()===Ro;)ne+=Q.currentPeek(),Q.peek();return ne}function y(Q){const ne=m(Q);return Q.skipToPeek(),ne}function A(Q){if(Q===$a)return!1;const ne=Q.charCodeAt(0);return ne>=97&&ne<=122||ne>=65&&ne<=90||ne===95}function b(Q){if(Q===$a)return!1;const ne=Q.charCodeAt(0);return ne>=48&&ne<=57}function C(Q,ne){const{currentType:ge}=ne;if(ge!==2)return!1;m(Q);const Ae=A(Q.currentPeek());return Q.resetPeek(),Ae}function v(Q,ne){const{currentType:ge}=ne;if(ge!==2)return!1;m(Q);const Ae=Q.currentPeek()==="-"?Q.peek():Q.currentPeek(),_e=b(Ae);return Q.resetPeek(),_e}function x(Q,ne){const{currentType:ge}=ne;if(ge!==2)return!1;m(Q);const Ae=Q.currentPeek()===rw;return Q.resetPeek(),Ae}function S(Q,ne){const{currentType:ge}=ne;if(ge!==7)return!1;m(Q);const Ae=Q.currentPeek()===".";return Q.resetPeek(),Ae}function _(Q,ne){const{currentType:ge}=ne;if(ge!==8)return!1;m(Q);const Ae=A(Q.currentPeek());return Q.resetPeek(),Ae}function I(Q,ne){const{currentType:ge}=ne;if(!(ge===7||ge===11))return!1;m(Q);const Ae=Q.currentPeek()===":";return Q.resetPeek(),Ae}function M(Q,ne){const{currentType:ge}=ne;if(ge!==9)return!1;const Ae=()=>{const Ke=Q.currentPeek();return Ke==="{"?A(Q.peek()):Ke==="@"||Ke==="|"||Ke===":"||Ke==="."||Ke===ea||!Ke?!1:Ke===Ro?(Q.peek(),Ae()):D(Q,!1)},_e=Ae();return Q.resetPeek(),_e}function $(Q){m(Q);const ne=Q.currentPeek()==="|";return Q.resetPeek(),ne}function D(Q,ne=!0){const ge=(_e=!1,Ke="")=>{const xe=Q.currentPeek();return xe==="{"||xe==="@"||!xe?_e:xe==="|"?!(Ke===ea||Ke===Ro):xe===ea?(Q.peek(),ge(!0,ea)):xe===Ro?(Q.peek(),ge(!0,Ro)):!0},Ae=ge();return ne&&Q.resetPeek(),Ae}function T(Q,ne){const ge=Q.currentChar();return ge===$a?$a:ne(ge)?(Q.next(),ge):null}function N(Q){const ne=Q.charCodeAt(0);return ne>=97&&ne<=122||ne>=65&&ne<=90||ne>=48&&ne<=57||ne===95||ne===36}function O(Q){return T(Q,N)}function P(Q){const ne=Q.charCodeAt(0);return ne>=97&&ne<=122||ne>=65&&ne<=90||ne>=48&&ne<=57||ne===95||ne===36||ne===45}function R(Q){return T(Q,P)}function q(Q){const ne=Q.charCodeAt(0);return ne>=48&&ne<=57}function j(Q){return T(Q,q)}function W(Q){const ne=Q.charCodeAt(0);return ne>=48&&ne<=57||ne>=65&&ne<=70||ne>=97&&ne<=102}function z(Q){return T(Q,W)}function H(Q){let ne="",ge="";for(;ne=j(Q);)ge+=ne;return ge}function ee(Q){let ne="";for(;;){const ge=Q.currentChar();if(ge==="\\"){const Ae=Q.peek();Ae==="{"||Ae==="}"||Ae==="@"||Ae==="|"||Ae==="\\"?(ne+=ge+Ae,Q.next(),Q.next()):(Q.resetPeek(),ne+=ge,Q.next())}else{if(ge==="{"||ge==="}"||ge==="@"||ge==="|"||!ge)break;if(ge===ea||ge===Ro)if(D(Q))ne+=ge,Q.next();else{if($(Q))break;ne+=ge,Q.next()}else ne+=ge,Q.next()}}return ne}function V(Q){y(Q);let ne="",ge="";for(;ne=R(Q);)ge+=ne;const Ae=Q.currentChar();if(Ae&&Ae!=="}"&&Ae!==$a&&Ae!==ea&&Ae!==Ro&&Ae!==" "){const _e=Ee(Q);return d(gi.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,ge+_e),ge+_e}return Q.currentChar()===$a&&d(gi.UNTERMINATED_CLOSING_BRACE,o(),0),ge}function ie(Q){y(Q);let ne="";return Q.currentChar()==="-"?(Q.next(),ne+=`-${H(Q)}`):ne+=H(Q),Q.currentChar()===$a&&d(gi.UNTERMINATED_CLOSING_BRACE,o(),0),ne}function se(Q){return Q!==rw&&Q!==Ro}function Z(Q){y(Q),g(Q,"'");let ne="",ge="";for(;ne=T(Q,se);)ne==="\\"?ge+=pe(Q):ge+=ne;const Ae=Q.currentChar();return Ae===Ro||Ae===$a?(d(gi.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),Ae===Ro&&(Q.next(),g(Q,"'")),ge):(g(Q,"'"),ge)}function pe(Q){const ne=Q.currentChar();switch(ne){case"\\":case"'":return Q.next(),`\\${ne}`;case"u":return re(Q,ne,4);case"U":return re(Q,ne,6);default:return d(gi.UNKNOWN_ESCAPE_SEQUENCE,o(),0,ne),""}}function re(Q,ne,ge){g(Q,ne);let Ae="";for(let _e=0;_e<ge;_e++){const Ke=z(Q);if(!Ke){d(gi.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${ne}${Ae}${Q.currentChar()}`);break}Ae+=Ke}return`\\${ne}${Ae}`}function fe(Q){return Q!=="{"&&Q!=="}"&&Q!==ea&&Q!==Ro}function Ee(Q){y(Q);let ne="",ge="";for(;ne=T(Q,fe);)ge+=ne;return ge}function X(Q){let ne="",ge="";for(;ne=O(Q);)ge+=ne;return ge}function we(Q){const ne=ge=>{const Ae=Q.currentChar();return Ae==="{"||Ae==="@"||Ae==="|"||Ae==="("||Ae===")"||!Ae||Ae===ea?ge:(ge+=Ae,Q.next(),ne(ge))};return ne("")}function Y(Q){y(Q);const ne=g(Q,"|");return y(Q),ne}function le(Q,ne){let ge=null;switch(Q.currentChar()){case"{":return ne.braceNest>=1&&d(gi.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),Q.next(),ge=f(ne,2,"{"),y(Q),ne.braceNest++,ge;case"}":return ne.braceNest>0&&ne.currentType===2&&d(gi.EMPTY_PLACEHOLDER,o(),0),Q.next(),ge=f(ne,3,"}"),ne.braceNest--,ne.braceNest>0&&y(Q),ne.inLinked&&ne.braceNest===0&&(ne.inLinked=!1),ge;case"@":return ne.braceNest>0&&d(gi.UNTERMINATED_CLOSING_BRACE,o(),0),ge=Ce(Q,ne)||h(ne),ne.braceNest=0,ge;default:{let _e=!0,Ke=!0,xe=!0;if($(Q))return ne.braceNest>0&&d(gi.UNTERMINATED_CLOSING_BRACE,o(),0),ge=f(ne,1,Y(Q)),ne.braceNest=0,ne.inLinked=!1,ge;if(ne.braceNest>0&&(ne.currentType===4||ne.currentType===5||ne.currentType===6))return d(gi.UNTERMINATED_CLOSING_BRACE,o(),0),ne.braceNest=0,ae(Q,ne);if(_e=C(Q,ne))return ge=f(ne,4,V(Q)),y(Q),ge;if(Ke=v(Q,ne))return ge=f(ne,5,ie(Q)),y(Q),ge;if(xe=x(Q,ne))return ge=f(ne,6,Z(Q)),y(Q),ge;if(!_e&&!Ke&&!xe)return ge=f(ne,12,Ee(Q)),d(gi.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,ge.value),y(Q),ge;break}}return ge}function Ce(Q,ne){const{currentType:ge}=ne;let Ae=null;const _e=Q.currentChar();switch((ge===7||ge===8||ge===11||ge===9)&&(_e===Ro||_e===ea)&&d(gi.INVALID_LINKED_FORMAT,o(),0),_e){case"@":return Q.next(),Ae=f(ne,7,"@"),ne.inLinked=!0,Ae;case".":return y(Q),Q.next(),f(ne,8,".");case":":return y(Q),Q.next(),f(ne,9,":");default:return $(Q)?(Ae=f(ne,1,Y(Q)),ne.braceNest=0,ne.inLinked=!1,Ae):S(Q,ne)||I(Q,ne)?(y(Q),Ce(Q,ne)):_(Q,ne)?(y(Q),f(ne,11,X(Q))):M(Q,ne)?(y(Q),_e==="{"?le(Q,ne)||Ae:f(ne,10,we(Q))):(ge===7&&d(gi.INVALID_LINKED_FORMAT,o(),0),ne.braceNest=0,ne.inLinked=!1,ae(Q,ne))}}function ae(Q,ne){let ge={type:13};if(ne.braceNest>0)return le(Q,ne)||h(ne);if(ne.inLinked)return Ce(Q,ne)||h(ne);switch(Q.currentChar()){case"{":return le(Q,ne)||h(ne);case"}":return d(gi.UNBALANCED_CLOSING_BRACE,o(),0),Q.next(),f(ne,3,"}");case"@":return Ce(Q,ne)||h(ne);default:{if($(Q))return ge=f(ne,1,Y(Q)),ne.braceNest=0,ne.inLinked=!1,ge;if(D(Q))return f(ne,0,ee(Q));break}}return ge}function oe(){const{currentType:Q,offset:ne,startLoc:ge,endLoc:Ae}=a;return a.lastType=Q,a.lastOffset=ne,a.lastStartLoc=ge,a.lastEndLoc=Ae,a.offset=s(),a.startLoc=o(),i.currentChar()===$a?f(a,13):ae(i,a)}return{nextToken:oe,currentOffset:s,currentPosition:o,context:u}}const UU="parser",KU=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,VU=/\\([\\@{}|])/g;function ZU(e,t){return t}function GU(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(t||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function QU(e={}){const t=e.location!==!1,{onError:n}=e;function i(A,b,C,v,...x){const S=A.currentPosition();if(S.offset+=v,S.column+=v,n){const _=t?Hk(C,S):null,I=Ny(b,_,{domain:UU,args:x});n(I)}}function s(A,b,C){const v={type:A};return t&&(v.start=b,v.end=b,v.loc={start:C,end:C}),v}function o(A,b,C,v){t&&(A.end=b,A.loc&&(A.loc.end=C))}function r(A,b){const C=A.context(),v=s(3,C.offset,C.startLoc);return v.value=b.replace(VU,ZU),o(v,A.currentOffset(),A.currentPosition()),v}function l(A,b){const C=A.context(),{lastOffset:v,lastStartLoc:x}=C,S=s(5,v,x);return S.index=parseInt(b,10),A.nextToken(),o(S,A.currentOffset(),A.currentPosition()),S}function a(A,b){const C=A.context(),{lastOffset:v,lastStartLoc:x}=C,S=s(4,v,x);return S.key=b,A.nextToken(),o(S,A.currentOffset(),A.currentPosition()),S}function u(A,b){const C=A.context(),{lastOffset:v,lastStartLoc:x}=C,S=s(9,v,x);return S.value=b.replace(KU,GU),A.nextToken(),o(S,A.currentOffset(),A.currentPosition()),S}function c(A){const b=A.nextToken(),C=A.context(),{lastOffset:v,lastStartLoc:x}=C,S=s(8,v,x);return b.type!==11?(i(A,gi.UNEXPECTED_EMPTY_LINKED_MODIFIER,C.lastStartLoc,0),S.value="",o(S,v,x),{nextConsumeToken:b,node:S}):(b.value==null&&i(A,gi.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ta(b)),S.value=b.value||"",o(S,A.currentOffset(),A.currentPosition()),{node:S})}function d(A,b){const C=A.context(),v=s(7,C.offset,C.startLoc);return v.value=b,o(v,A.currentOffset(),A.currentPosition()),v}function f(A){const b=A.context(),C=s(6,b.offset,b.startLoc);let v=A.nextToken();if(v.type===8){const x=c(A);C.modifier=x.node,v=x.nextConsumeToken||A.nextToken()}switch(v.type!==9&&i(A,gi.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ta(v)),v=A.nextToken(),v.type===2&&(v=A.nextToken()),v.type){case 10:v.value==null&&i(A,gi.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ta(v)),C.key=d(A,v.value||"");break;case 4:v.value==null&&i(A,gi.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ta(v)),C.key=a(A,v.value||"");break;case 5:v.value==null&&i(A,gi.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ta(v)),C.key=l(A,v.value||"");break;case 6:v.value==null&&i(A,gi.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ta(v)),C.key=u(A,v.value||"");break;default:{i(A,gi.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const x=A.context(),S=s(7,x.offset,x.startLoc);return S.value="",o(S,x.offset,x.startLoc),C.key=S,o(C,x.offset,x.startLoc),{nextConsumeToken:v,node:C}}}return o(C,A.currentOffset(),A.currentPosition()),{node:C}}function h(A){const b=A.context(),C=b.currentType===1?A.currentOffset():b.offset,v=b.currentType===1?b.endLoc:b.startLoc,x=s(2,C,v);x.items=[];let S=null;do{const M=S||A.nextToken();switch(S=null,M.type){case 0:M.value==null&&i(A,gi.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ta(M)),x.items.push(r(A,M.value||""));break;case 5:M.value==null&&i(A,gi.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ta(M)),x.items.push(l(A,M.value||""));break;case 4:M.value==null&&i(A,gi.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ta(M)),x.items.push(a(A,M.value||""));break;case 6:M.value==null&&i(A,gi.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,ta(M)),x.items.push(u(A,M.value||""));break;case 7:{const $=f(A);x.items.push($.node),S=$.nextConsumeToken||null;break}}}while(b.currentType!==13&&b.currentType!==1);const _=b.currentType===1?b.lastOffset:A.currentOffset(),I=b.currentType===1?b.lastEndLoc:A.currentPosition();return o(x,_,I),x}function g(A,b,C,v){const x=A.context();let S=v.items.length===0;const _=s(1,b,C);_.cases=[],_.cases.push(v);do{const I=h(A);S||(S=I.items.length===0),_.cases.push(I)}while(x.currentType!==13);return S&&i(A,gi.MUST_HAVE_MESSAGES_IN_PLURAL,C,0),o(_,A.currentOffset(),A.currentPosition()),_}function m(A){const b=A.context(),{offset:C,startLoc:v}=b,x=h(A);return b.currentType===13?x:g(A,C,v,x)}function y(A){const b=qU(A,js({},e)),C=b.context(),v=s(0,C.offset,C.startLoc);return t&&v.loc&&(v.loc.source=A),v.body=m(b),e.onCacheKey&&(v.cacheKey=e.onCacheKey(A)),C.currentType!==13&&i(b,gi.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,A[C.offset]||""),o(v,b.currentOffset(),b.currentPosition()),v}return{parse:y}}function ta(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function YU(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:o=>(n.helpers.add(o),o)}}function lw(e,t){for(let n=0;n<e.length;n++)_5(e[n],t)}function _5(e,t){switch(e.type){case 1:lw(e.cases,t),t.helper("plural");break;case 2:lw(e.items,t);break;case 6:{_5(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function JU(e,t={}){const n=YU(e);n.helper("normalize"),e.body&&_5(e.body,n);const i=n.context();e.helpers=Array.from(i.helpers)}function XU(e){const t=e.body;return t.type===2?aw(t):t.cases.forEach(n=>aw(n)),e}function aw(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const i=e.items[n];if(!(i.type===3||i.type===9)||i.value==null)break;t.push(i.value)}if(t.length===e.items.length){e.static=S5(t);for(let n=0;n<e.items.length;n++){const i=e.items[n];(i.type===3||i.type===9)&&delete i.value}}}}function Of(e){switch(e.t=e.type,e.type){case 0:{const t=e;Of(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let i=0;i<n.length;i++)Of(n[i]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let i=0;i<n.length;i++)Of(n[i]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Of(t.key),t.k=t.key,delete t.key,t.modifier&&(Of(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function eK(e,t){const{filename:n,breakLineCode:i,needIndent:s}=t,o=t.location!==!1,r={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:s,indentLevel:0};o&&e.loc&&(r.source=e.loc.source);const l=()=>r;function a(m,y){r.code+=m}function u(m,y=!0){const A=y?i:"";a(s?A+" ".repeat(m):A)}function c(m=!0){const y=++r.indentLevel;m&&u(y)}function d(m=!0){const y=--r.indentLevel;m&&u(y)}function f(){u(r.indentLevel)}return{context:l,push:a,indent:c,deindent:d,newline:f,helper:m=>`_${m}`,needIndent:()=>r.needIndent}}function tK(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Eh(e,t.key),t.modifier?(e.push(", "),Eh(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function nK(e,t){const{helper:n,needIndent:i}=e;e.push(`${n("normalize")}([`),e.indent(i());const s=t.items.length;for(let o=0;o<s&&(Eh(e,t.items[o]),o!==s-1);o++)e.push(", ");e.deindent(i()),e.push("])")}function iK(e,t){const{helper:n,needIndent:i}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(i());const s=t.cases.length;for(let o=0;o<s&&(Eh(e,t.cases[o]),o!==s-1);o++)e.push(", ");e.deindent(i()),e.push("])")}}function sK(e,t){t.body?Eh(e,t.body):e.push("null")}function Eh(e,t){const{helper:n}=e;switch(t.type){case 0:sK(e,t);break;case 1:iK(e,t);break;case 2:nK(e,t);break;case 6:tK(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const oK=(e,t={})=>{const n=Vt(t.mode)?t.mode:"normal",i=Vt(t.filename)?t.filename:"message.intl";t.sourceMap;const s=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":` +`,o=t.needIndent?t.needIndent:n!=="arrow",r=e.helpers||[],l=eK(e,{filename:i,breakLineCode:s,needIndent:o});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(o),r.length>0&&(l.push(`const { ${S5(r.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),Eh(l,e),l.deindent(o),l.push("}"),delete e.helpers;const{code:a,map:u}=l.context();return{ast:e,code:a,map:u?u.toJSON():void 0}};function rK(e,t={}){const n=js({},t),i=!!n.jit,s=!!n.minify,o=n.optimize==null?!0:n.optimize,l=QU(n).parse(e);return i?(o&&XU(l),s&&Of(l),{ast:l,code:""}):(JU(l,n),oK(l,n))}/*! + * core-base v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */function lK(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(md().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(md().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function ma(e){return ri(e)&&I5(e)===0&&(hl(e,"b")||hl(e,"body"))}const jN=["b","body"];function aK(e){return yc(e,jN)}const HN=["c","cases"];function uK(e){return yc(e,HN,[])}const WN=["s","static"];function cK(e){return yc(e,WN)}const qN=["i","items"];function dK(e){return yc(e,qN,[])}const UN=["t","type"];function I5(e){return yc(e,UN)}const KN=["v","value"];function Vg(e,t){const n=yc(e,KN);if(n!=null)return n;throw Qp(t)}const VN=["m","modifier"];function fK(e){return yc(e,VN)}const ZN=["k","key"];function hK(e){const t=yc(e,ZN);if(t)return t;throw Qp(6)}function yc(e,t,n){for(let i=0;i<t.length;i++){const s=t[i];if(hl(e,s)&&e[s]!=null)return e[s]}return n}const GN=[...jN,...HN,...WN,...qN,...ZN,...VN,...KN,...UN];function Qp(e){return new Error(`unhandled node type: ${e}`)}function T4(e){return n=>pK(n,e)}function pK(e,t){const n=aK(t);if(n==null)throw Qp(0);if(I5(n)===1){const o=uK(n);return e.plural(o.reduce((r,l)=>[...r,uw(e,l)],[]))}else return uw(e,n)}function uw(e,t){const n=cK(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const i=dK(t).reduce((s,o)=>[...s,Wk(e,o)],[]);return e.normalize(i)}}function Wk(e,t){const n=I5(t);switch(n){case 3:return Vg(t,n);case 9:return Vg(t,n);case 4:{const i=t;if(hl(i,"k")&&i.k)return e.interpolate(e.named(i.k));if(hl(i,"key")&&i.key)return e.interpolate(e.named(i.key));throw Qp(n)}case 5:{const i=t;if(hl(i,"i")&&Os(i.i))return e.interpolate(e.list(i.i));if(hl(i,"index")&&Os(i.index))return e.interpolate(e.list(i.index));throw Qp(n)}case 6:{const i=t,s=fK(i),o=hK(i);return e.linked(Wk(e,o),s?Wk(e,s):void 0,e.type)}case 7:return Vg(t,n);case 8:return Vg(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const gK=e=>e;let Zg=_i();function mK(e,t={}){let n=!1;const i=t.onError||zU;return t.onError=s=>{n=!0,i(s)},{...rK(e,t),detectError:n}}function vK(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Vt(e)){ii(t.warnHtmlMessage)&&t.warnHtmlMessage;const i=(t.onCacheKey||gK)(e),s=Zg[i];if(s)return s;const{ast:o,detectError:r}=mK(e,{...t,location:!1,jit:!0}),l=T4(o);return r?l:Zg[i]=l}else{const n=e.cacheKey;if(n){const i=Zg[n];return i||(Zg[n]=T4(e))}else return T4(e)}}let Yp=null;function yK(e){Yp=e}function kK(e,t,n){Yp&&Yp.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const bK=AK("function:translate");function AK(e){return t=>Yp&&Yp.emit(e,t)}const Ka={INVALID_ARGUMENT:BU,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},CK=24;function Va(e){return Ny(e,null,void 0)}function M5(e,t){return t.locale!=null?cw(t.locale):cw(e.locale)}let L4;function cw(e){if(Vt(e))return e;if(Gi(e)){if(e.resolvedOnce&&L4!=null)return L4;if(e.constructor.name==="Function"){const t=e();if(FU(t))throw Va(Ka.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return L4=t}else throw Va(Ka.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Va(Ka.NOT_SUPPORT_LOCALE_TYPE)}function wK(e,t,n){return[...new Set([n,...ms(t)?t:ri(t)?Object.keys(t):Vt(t)?[t]:[n]])]}function qk(e,t,n){const i=Vt(n)?n:Jp,s=e;s.__localeChainCache||(s.__localeChainCache=new Map);let o=s.__localeChainCache.get(i);if(!o){o=[];let r=[n];for(;ms(r);)r=dw(o,r,t);const l=ms(t)||!Zn(t)?t:t.default?t.default:null;r=Vt(l)?[l]:l,ms(r)&&dw(o,r,!1),s.__localeChainCache.set(i,o)}return o}function dw(e,t,n){let i=!0;for(let s=0;s<t.length&&ii(i);s++){const o=t[s];Vt(o)&&(i=xK(e,t[s],n))}return i}function xK(e,t,n){let i;const s=t.split("-");do{const o=s.join("-");i=SK(e,o,n),s.splice(-1,1)}while(s.length&&i===!0);return i}function SK(e,t,n){let i=!1;if(!e.includes(t)&&(i=!0,t)){i=t[t.length-1]!=="!";const s=t.replace(/!/g,"");e.push(s),(ms(n)||Zn(n))&&n[s]&&(i=n[s])}return i}const kc=[];kc[0]={w:[0],i:[3,0],"[":[4],o:[7]};kc[1]={w:[1],".":[2],"[":[4],o:[7]};kc[2]={w:[2],i:[3,0],0:[3,0]};kc[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};kc[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};kc[5]={"'":[4,0],o:8,l:[5,0]};kc[6]={'"':[4,0],o:8,l:[6,0]};const _K=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function IK(e){return _K.test(e)}function MK(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function EK(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function TK(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:IK(t)?MK(t):"*"+t}function LK(e){const t=[];let n=-1,i=0,s=0,o,r,l,a,u,c,d;const f=[];f[0]=()=>{r===void 0?r=l:r+=l},f[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},f[2]=()=>{f[0](),s++},f[3]=()=>{if(s>0)s--,i=4,f[0]();else{if(s=0,r===void 0||(r=TK(r),r===!1))return!1;f[1]()}};function h(){const g=e[n+1];if(i===5&&g==="'"||i===6&&g==='"')return n++,l="\\"+g,f[0](),!0}for(;i!==null;)if(n++,o=e[n],!(o==="\\"&&h())){if(a=EK(o),d=kc[i],u=d[a]||d.l||8,u===8||(i=u[0],u[1]!==void 0&&(c=f[u[1]],c&&(l=o,c()===!1))))return;if(i===7)return t}}const fw=new Map;function NK(e,t){return ri(e)?e[t]:null}function FK(e,t){if(!ri(e))return null;let n=fw.get(t);if(n||(n=LK(t),n&&fw.set(t,n)),!n)return null;const i=n.length;let s=e,o=0;for(;o<i;){const r=n[o];if(GN.includes(r)&&ma(s)||!ri(s)||!hl(s,r))return null;const l=s[r];if(l===void 0||Gi(s))return null;s=l,o++}return s}const DK="11.4.6",Fy=-1,Jp="en-US",K2="",hw=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function $K(){return{upper:(e,t)=>t==="text"&&Vt(e)?e.toUpperCase():t==="vnode"&&ri(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Vt(e)?e.toLowerCase():t==="vnode"&&ri(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Vt(e)?hw(e):t==="vnode"&&ri(e)&&"__v_isVNode"in e?hw(e.children):e}}let QN;function BK(e){QN=e}let YN;function zK(e){YN=e}let JN;function RK(e){JN=e}let XN=null;const OK=e=>{XN=e},PK=()=>XN;let eF=null;const pw=e=>{eF=e},jK=()=>eF;let gw=0;function HK(e={}){const t=Gi(e.onWarn)?e.onWarn:wU,n=Vt(e.version)?e.version:DK,i=Vt(e.locale)||Gi(e.locale)?e.locale:Jp,s=Gi(i)?Jp:i,o=ms(e.fallbackLocale)||Zn(e.fallbackLocale)||Vt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s,r=Zn(e.messages)?e.messages:N4(s),l=Zn(e.datetimeFormats)?e.datetimeFormats:N4(s),a=Zn(e.numberFormats)?e.numberFormats:N4(s),u=js(_i(),e.modifiers,$K()),c=e.pluralRules||_i(),d=Gi(e.missing)?e.missing:null,f=ii(e.missingWarn)||Mh(e.missingWarn)?e.missingWarn:!0,h=ii(e.fallbackWarn)||Mh(e.fallbackWarn)?e.fallbackWarn:!0,g=!!e.fallbackFormat,m=!!e.unresolving,y=Gi(e.postTranslation)?e.postTranslation:null,A=Zn(e.processor)?e.processor:null,b=ii(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter,v=Gi(e.messageCompiler)?e.messageCompiler:QN,x=Gi(e.messageResolver)?e.messageResolver:YN||NK,S=Gi(e.localeFallbacker)?e.localeFallbacker:JN||wK,_=ri(e.fallbackContext)?e.fallbackContext:void 0,I=e,M=ri(I.__datetimeFormatters)?I.__datetimeFormatters:new Map,$=ri(I.__numberFormatters)?I.__numberFormatters:new Map,D=ri(I.__meta)?I.__meta:{};gw++;const T={version:n,cid:gw,locale:i,fallbackLocale:o,messages:r,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:h,fallbackFormat:g,unresolving:m,postTranslation:y,processor:A,warnHtmlMessage:b,escapeParameter:C,messageCompiler:v,messageResolver:x,localeFallbacker:S,fallbackContext:_,onWarn:t,__meta:D};return T.datetimeFormats=l,T.numberFormats=a,T.__datetimeFormatters=M,T.__numberFormatters=$,__INTLIFY_PROD_DEVTOOLS__&&kK(T,n,D),T}const N4=e=>({[e]:_i()});function E5(e,t,n,i,s){const{missing:o,onWarn:r}=e;if(o!==null){const l=o(e,n,t,s);return Vt(l)?l:t}else return t}function w1(e,t,n){const i=e;i.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function WK(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function qK(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let i=n+1;i<t.length;i++)if(WK(e,t[i]))return!0;return!1}function mw(e,...t){const{datetimeFormats:n,unresolving:i,fallbackLocale:s,onWarn:o,localeFallbacker:r}=e,{__datetimeFormatters:l}=e;if(!Vt(t[0])&&!ON(t[0])&&!Os(t[0]))return K2;const[a,u,c,d]=Uk(...t),f=ii(c.missingWarn)?c.missingWarn:e.missingWarn;ii(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const h=!!c.part,g=M5(e,c),m=r(e,s,g);if(!Vt(a)||a===""){const S=new Intl.DateTimeFormat(g.replace(/!/g,""),d);return h?S.formatToParts(u):S.format(u)}let y={},A,b=null;const C="datetime format";for(let S=0;S<m.length&&(A=m[S],y=n[A]||{},b=y[a],!Zn(b));S++)E5(e,a,A,f,C);if(!Zn(b)||!Vt(A))return i?Fy:a;let v=`${A}__${a}`;Ly(d)||(v=`${v}__${JSON.stringify(d)}`);let x=l.get(v);return x||(x=new Intl.DateTimeFormat(A,js({},b,d)),l.set(v,x)),h?x.formatToParts(u):x.format(u)}const tF=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Uk(...e){const[t,n,i,s]=e,o=_i();let r=_i(),l;if(Vt(t)){const a=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!a)throw Va(Ka.INVALID_ISO_DATE_ARGUMENT);const u=a[3]?a[3].trim().startsWith("T")?`${a[1].trim()}${a[3].trim()}`:`${a[1].trim()}T${a[3].trim()}`:a[1].trim();l=new Date(u);try{l.toISOString()}catch{throw Va(Ka.INVALID_ISO_DATE_ARGUMENT)}}else if(ON(t)){if(isNaN(t.getTime()))throw Va(Ka.INVALID_DATE_ARGUMENT);l=t}else if(Os(t))l=t;else throw Va(Ka.INVALID_ARGUMENT);return Vt(n)?o.key=n:Zn(n)&&Object.keys(n).forEach(a=>{tF.includes(a)?r[a]=n[a]:o[a]=n[a]}),Vt(i)?o.locale=i:Zn(i)&&(r=i),Zn(s)&&(r=s),[o.key||"",l,o,r]}function vw(e,t,n){const i=e;for(const s in n){const o=`${t}__${s}`;i.__datetimeFormatters.has(o)&&i.__datetimeFormatters.delete(o)}}function yw(e,...t){const{numberFormats:n,unresolving:i,fallbackLocale:s,onWarn:o,localeFallbacker:r}=e,{__numberFormatters:l}=e;if(!Os(t[0]))return K2;const[a,u,c,d]=Kk(...t),f=ii(c.missingWarn)?c.missingWarn:e.missingWarn;ii(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const h=!!c.part,g=M5(e,c),m=r(e,s,g);if(!Vt(a)||a===""){const S=new Intl.NumberFormat(g.replace(/!/g,""),d);return h?S.formatToParts(u):S.format(u)}let y={},A,b=null;const C="number format";for(let S=0;S<m.length&&(A=m[S],y=n[A]||{},b=y[a],!Zn(b));S++)E5(e,a,A,f,C);if(!Zn(b)||!Vt(A))return i?Fy:a;let v=`${A}__${a}`;Ly(d)||(v=`${v}__${JSON.stringify(d)}`);let x=l.get(v);return x||(x=new Intl.NumberFormat(A,js({},b,d)),l.set(v,x)),h?x.formatToParts(u):x.format(u)}const nF=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Kk(...e){const[t,n,i,s]=e,o=_i();let r=_i();if(!Os(t))throw Va(Ka.INVALID_ARGUMENT);const l=t;return Vt(n)?o.key=n:Zn(n)&&Object.keys(n).forEach(a=>{nF.includes(a)?r[a]=n[a]:o[a]=n[a]}),Vt(i)?o.locale=i:Zn(i)&&(r=i),Zn(s)&&(r=s),[o.key||"",l,o,r]}function kw(e,t,n){const i=e;for(const s in n){const o=`${t}__${s}`;i.__numberFormatters.has(o)&&i.__numberFormatters.delete(o)}}const UK=e=>e,KK=e=>"",VK="text",ZK=e=>e.length===0?"":S5(e),GK=DU;function F4(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function QK(e){const t=Os(e.pluralIndex)?e.pluralIndex:-1;return Os(e.named?.count)?e.named.count:Os(e.named?.n)?e.named.n:t}function YK(e={}){const t=e.locale,n=QK(e),i=Vt(t)&&Gi(e.pluralRules?.[t])?e.pluralRules[t]:F4,s=i===F4?void 0:F4,o=A=>A[i(n,A.length,s)],r=e.list||[],l=A=>r[A],a=e.named||_i();Os(e.pluralIndex)&&(a.count||=e.pluralIndex,a.n||=e.pluralIndex);const u=A=>a[A];function c(A,b){const C=Gi(e.messages)?e.messages(A,!!b):ri(e.messages)?e.messages[A]:!1;return C||(e.parent?e.parent.message(A):KK)}const d=A=>e.modifiers?e.modifiers[A]:UK,f=Gi(e.processor?.normalize)?e.processor.normalize:ZK,h=Gi(e.processor?.interpolate)?e.processor.interpolate:GK,g=Vt(e.processor?.type)?e.processor.type:VK,y={list:l,named:u,plural:o,linked:(A,...b)=>{const[C,v]=b;let x="text",S="";b.length===1?ri(C)?(S=C.modifier||S,x=C.type||x):Vt(C)&&(S=C||S):b.length===2&&(Vt(C)&&(S=C||S),Vt(v)&&(x=v||x));const _=c(A,!0)(y),I=_===""||_===void 0?A:_,M=x==="vnode"&&ms(I)&&S?I[0]:I;return S?d(S)(M,x):M},message:c,type:g,interpolate:h,normalize:f,values:js(_i(),r,a)};return y}const bw=()=>"",cl=e=>Gi(e);function Aw(e,...t){const{fallbackFormat:n,postTranslation:i,unresolving:s,messageCompiler:o,fallbackLocale:r,messages:l}=e,[a,u]=Vk(...t),c=ii(u.missingWarn)?u.missingWarn:e.missingWarn,d=ii(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,f=ii(u.escapeParameter)?u.escapeParameter:e.escapeParameter,h=!!u.resolvedMessage,g=Vt(u.default)||ii(u.default)?ii(u.default)?o?a:()=>a:u.default:n?o?a:()=>a:null,m=n||g!=null&&(Vt(g)||Gi(g)),y=M5(e,u);f&&JK(u);let[A,b,C]=h?[a,y,l[y]||_i()]:iF(e,a,y,r,d,c),v=A,x=a;if(!h&&!(Vt(v)||ma(v)||cl(v))&&m&&(v=g,x=v),!h&&(!(Vt(v)||ma(v)||cl(v))||!Vt(b)))return s?Fy:a;let S=!1;const _=()=>{S=!0},I=cl(v)?v:sF(e,a,b,v,x,_);if(S)return v;const M=tV(e,b,C,u),$=YK(M),D=XK(e,I,$);let T=i?i(D,a):D;if(f&&Vt(T)&&(T=LU(T)),__INTLIFY_PROD_DEVTOOLS__){const N={timestamp:Date.now(),key:Vt(a)?a:cl(v)?v.key:"",locale:b||(cl(v)?v.locale:""),format:Vt(v)?v:cl(v)?v.source:"",message:T};N.meta=js({},e.__meta,PK()||{}),bK(N)}return T}function JK(e){ms(e.list)?e.list=e.list.map(t=>Vt(t)?sw(t):t):ri(e.named)&&Object.keys(e.named).forEach(t=>{Vt(e.named[t])&&(e.named[t]=sw(e.named[t]))})}function iF(e,t,n,i,s,o){const{messages:r,onWarn:l,messageResolver:a,localeFallbacker:u}=e,c=u(e,i,n);let d=_i(),f,h=null;const g="translate";for(let m=0;m<c.length&&(f=c[m],d=r[f]||_i(),(h=a(d,t))===null&&(h=d[t]),!(Vt(h)||ma(h)||cl(h)));m++)if(!qK(f,c)){const y=E5(e,t,f,o,g);y!==t&&(h=y)}return[h,f,d]}function sF(e,t,n,i,s,o){const{messageCompiler:r,warnHtmlMessage:l}=e;if(cl(i)){const u=i;return u.locale=u.locale||n,u.key=u.key||t,u}if(r==null){const u=(()=>i);return u.locale=n,u.key=t,u}const a=r(i,eV(e,n,s,i,l,o));return a.locale=n,a.key=t,a.source=i,a}function XK(e,t,n){return t(n)}function Vk(...e){const[t,n,i]=e,s=_i();if(!Vt(t)&&!Os(t)&&!cl(t)&&!ma(t))throw Va(Ka.INVALID_ARGUMENT);const o=Os(t)?String(t):(cl(t),t);return Os(n)?s.plural=n:Vt(n)?s.default=n:Zn(n)&&!Ly(n)?s.named=n:ms(n)&&(s.list=n),Os(i)?s.plural=i:Vt(i)?s.default=i:Zn(i)&&js(s,i),[o,s]}function eV(e,t,n,i,s,o){return{locale:t,key:n,warnHtmlMessage:s,onError:r=>{throw o&&o(r),r},onCacheKey:r=>xU(t,n,r)}}function tV(e,t,n,i){const{modifiers:s,pluralRules:o,messageResolver:r,fallbackLocale:l,fallbackWarn:a,missingWarn:u,fallbackContext:c}=e,f={locale:t,modifiers:s,pluralRules:o,messages:(h,g)=>{let m=r(n,h);if(m==null&&(c||g)){const[y,,A]=iF(c||e,h,t,l,a,u);m=y??r(A,h)}if(Vt(m)||ma(m)){let y=!1;const b=sF(e,h,t,m,h,()=>{y=!0});return y?bw:b}else return cl(m)?m:bw}};return e.processor&&(f.processor=e.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),Os(i.plural)&&(f.pluralIndex=i.plural),f}lK();/*! + * vue-i18n v11.4.6 + * (c) 2026 kazuya kawaguchi + * Released under the MIT License. + */const nV="11.4.6";function iV(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(md().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(md().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(md().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(md().__INTLIFY_PROD_DEVTOOLS__=!1)}const ir={UNEXPECTED_RETURN_TYPE:CK,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function wr(e,...t){return Ny(e,null,void 0)}const Zk=vc("__translateVNode"),Gk=vc("__datetimeParts"),Qk=vc("__numberParts"),oF=vc("__setPluralRules"),rF=vc("__injectWithOption"),Zf=vc("__dispose");function Xp(e){if(!ri(e)||ma(e))return e;for(const t in e)if(hl(e,t))if(!t.includes("."))ri(e[t])&&Xp(e[t]);else{const n=t.split("."),i=n.length-1;let s=e,o=!1;for(let r=0;r<i;r++){if(n[r]==="__proto__")throw new Error(`unsafe key: ${n[r]}`);if(n[r]in s||(s[n[r]]=_i()),!ri(s[n[r]])){o=!0;break}s=s[n[r]]}if(o||(ma(s)?GN.includes(n[i])||delete e[t]:(s[n[i]]=e[t],delete e[t])),!ma(s)){const r=s[n[i]];ri(r)&&Xp(r)}}return e}function T5(e,t){const{messages:n,__i18n:i,messageResolver:s,flatJson:o}=t,r=Zn(n)?n:ms(i)?_i():{[e]:_i()};if(ms(i)&&i.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:a,resource:u}=l;a?(r[a]=r[a]||_i(),Vm(u,r[a])):Vm(u,r)}else Vt(l)&&Vm(JSON.parse(l),r)}),s==null&&o)for(const l in r)hl(r,l)&&Xp(r[l]);return r}function lF(e){return e.type}function aF(e,t,n){let i=ri(t.messages)?t.messages:_i();"__i18nGlobal"in n&&(i=T5(e.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(o=>{e.mergeLocaleMessage(o,i[o])});{if(ri(t.datetimeFormats)){const o=Object.keys(t.datetimeFormats);o.length&&o.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(ri(t.numberFormats)){const o=Object.keys(t.numberFormats);o.length&&o.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function Cw(e){return K(Zu,null,e,0)}function e0(){return Ws()}const ww="__INTLIFY_META__",xw=()=>[],sV=()=>!1;let Sw=0;function _w(e){return((t,n,i,s)=>e(n,i,e0()||void 0,s))}const oV=()=>{const e=e0();let t=null;return e&&(t=lF(e)[ww])?{[ww]:t}:null};function V2(e={}){const{__root:t,__injectWithOption:n}=e,i=t===void 0,s=e.flatJson,o=U2?G:Ul;let r=ii(e.inheritLocale)?e.inheritLocale:!0;const l=o(t&&r?t.locale.value:Vt(e.locale)?e.locale:Jp),a=o(t&&r?t.fallbackLocale.value:Vt(e.fallbackLocale)||ms(e.fallbackLocale)||Zn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),u=o(T5(l.value,e)),c=o(Zn(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=o(Zn(e.numberFormats)?e.numberFormats:{[l.value]:{}});let f=t?t.missingWarn:ii(e.missingWarn)||Mh(e.missingWarn)?e.missingWarn:!0,h=t?t.fallbackWarn:ii(e.fallbackWarn)||Mh(e.fallbackWarn)?e.fallbackWarn:!0,g=t?t.fallbackRoot:ii(e.fallbackRoot)?e.fallbackRoot:!0,m=!!e.fallbackFormat,y=Gi(e.missing)?e.missing:null,A=Gi(e.missing)?_w(e.missing):null,b=Gi(e.postTranslation)?e.postTranslation:null,C=t?t.warnHtmlMessage:ii(e.warnHtmlMessage)?e.warnHtmlMessage:!0,v=!!e.escapeParameter;const x=t?t.modifiers:Zn(e.modifiers)?e.modifiers:{};let S=e.pluralRules||t&&t.pluralRules,_;_=(()=>{i&&pw(null);const xe={version:nV,locale:l.value,fallbackLocale:a.value,messages:u.value,modifiers:x,pluralRules:S,missing:A===null?void 0:A,missingWarn:f,fallbackWarn:h,fallbackFormat:m,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:C,escapeParameter:v,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};xe.datetimeFormats=c.value,xe.numberFormats=d.value,xe.__datetimeFormatters=Zn(_)?_.__datetimeFormatters:void 0,xe.__numberFormatters=Zn(_)?_.__numberFormatters:void 0;const Ne=HK(xe);return i&&pw(Ne),Ne})(),w1(_,l.value,a.value);function M(){return[l.value,a.value,u.value,c.value,d.value]}const $=L({get:()=>l.value,set:xe=>{_.locale=xe,l.value=xe}}),D=L({get:()=>a.value,set:xe=>{_.fallbackLocale=xe,a.value=xe,w1(_,l.value,xe)}}),T=L(()=>u.value),N=L(()=>c.value),O=L(()=>d.value);function P(){return Gi(b)?b:null}function R(xe){b=xe,_.postTranslation=xe}function q(){return y}function j(xe){xe!==null&&(A=_w(xe)),y=xe,_.missing=A}const W=(xe,Ne,et,ut,yt,Mt)=>{M();let Ze;try{__INTLIFY_PROD_DEVTOOLS__,i||(_.fallbackContext=t?jK():void 0),Ze=xe(_)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(_.fallbackContext=void 0)}if(et!=="translate exists"&&Os(Ze)&&Ze===Fy||et==="translate exists"&&!Ze){const[Ge,lt]=Ne();return t&&g?ut(t):yt(Ge)}else{if(Mt(Ze))return Ze;throw wr(ir.UNEXPECTED_RETURN_TYPE)}};function z(...xe){return W(Ne=>Reflect.apply(Aw,null,[Ne,...xe]),()=>Vk(...xe),"translate",Ne=>Reflect.apply(Ne.t,Ne,[...xe]),Ne=>Ne,Ne=>Vt(Ne))}function H(...xe){const[Ne,et,ut]=xe;if(ut&&!ri(ut))throw wr(ir.INVALID_ARGUMENT);return z(Ne,et,js({resolvedMessage:!0},ut||{}))}function ee(...xe){return W(Ne=>Reflect.apply(mw,null,[Ne,...xe]),()=>Uk(...xe),"datetime format",Ne=>Reflect.apply(Ne.d,Ne,[...xe]),()=>K2,Ne=>Vt(Ne)||ms(Ne))}function V(...xe){return W(Ne=>Reflect.apply(yw,null,[Ne,...xe]),()=>Kk(...xe),"number format",Ne=>Reflect.apply(Ne.n,Ne,[...xe]),()=>K2,Ne=>Vt(Ne)||ms(Ne))}function ie(xe){return xe.map(Ne=>Vt(Ne)||Os(Ne)||ii(Ne)?Cw(String(Ne)):Ne)}const Z={normalize:ie,interpolate:xe=>xe,type:"vnode"};function pe(...xe){return W(Ne=>{let et;const ut=Ne;try{ut.processor=Z,et=Reflect.apply(Aw,null,[ut,...xe])}finally{ut.processor=null}return et},()=>Vk(...xe),"translate",Ne=>Ne[Zk](...xe),Ne=>[Cw(Ne)],Ne=>ms(Ne))}function re(...xe){return W(Ne=>Reflect.apply(yw,null,[Ne,...xe]),()=>Kk(...xe),"number format",Ne=>Ne[Qk](...xe),xw,Ne=>Vt(Ne)||ms(Ne))}function fe(...xe){return W(Ne=>Reflect.apply(mw,null,[Ne,...xe]),()=>Uk(...xe),"datetime format",Ne=>Ne[Gk](...xe),xw,Ne=>Vt(Ne)||ms(Ne))}function Ee(xe){S=xe,_.pluralRules=S}function X(xe,Ne){return W(()=>{if(!xe)return!1;const et=Vt(Ne)?Ne:l.value,ut=Vt(Ne)?[et]:qk(_,a.value,et);for(let yt=0;yt<ut.length;yt++){const Mt=le(ut[yt]);let Ze=_.messageResolver(Mt,xe);if(Ze===null&&(Ze=Mt[xe]),ma(Ze)||cl(Ze)||Vt(Ze))return!0}return!1},()=>[xe],"translate exists",et=>Reflect.apply(et.te,et,[xe,Ne]),sV,et=>ii(et))}function we(xe){let Ne=null;const et=qk(_,a.value,l.value);for(let ut=0;ut<et.length;ut++){const yt=u.value[et[ut]]||{},Mt=_.messageResolver(yt,xe);if(Mt!=null){Ne=Mt;break}}return Ne}function Y(xe){const Ne=we(xe);return Ne??(t?t.tm(xe)||{}:{})}function le(xe){return u.value[xe]||{}}function Ce(xe,Ne){if(s){const et={[xe]:Ne};for(const ut in et)hl(et,ut)&&Xp(et[ut]);Ne=et[xe]}u.value[xe]=Ne,_.messages=u.value}function ae(xe,Ne){u.value[xe]=u.value[xe]||{};const et={[xe]:Ne};if(s)for(const ut in et)hl(et,ut)&&Xp(et[ut]);Ne=et[xe],Vm(Ne,u.value[xe]),_.messages=u.value}function oe(xe){return c.value[xe]||{}}function Q(xe,Ne){c.value[xe]=Ne,_.datetimeFormats=c.value,vw(_,xe,Ne)}function ne(xe,Ne){c.value[xe]=js(c.value[xe]||{},Ne),_.datetimeFormats=c.value,vw(_,xe,Ne)}function ge(xe){return d.value[xe]||{}}function Ae(xe,Ne){d.value[xe]=Ne,_.numberFormats=d.value,kw(_,xe,Ne)}function _e(xe,Ne){d.value[xe]=js(d.value[xe]||{},Ne),_.numberFormats=d.value,kw(_,xe,Ne)}Sw++,t&&U2&&(qe(t.locale,xe=>{r&&(l.value=xe,_.locale=xe,w1(_,l.value,a.value))}),qe(t.fallbackLocale,xe=>{r&&(a.value=xe,_.fallbackLocale=xe,w1(_,l.value,a.value))}));const Ke={id:Sw,locale:$,fallbackLocale:D,get inheritLocale(){return r},set inheritLocale(xe){r=xe,xe&&t&&(l.value=t.locale.value,a.value=t.fallbackLocale.value,w1(_,l.value,a.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:T,get modifiers(){return x},get pluralRules(){return S||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(xe){f=xe,_.missingWarn=f},get fallbackWarn(){return h},set fallbackWarn(xe){h=xe,_.fallbackWarn=h},get fallbackRoot(){return g},set fallbackRoot(xe){g=xe},get fallbackFormat(){return m},set fallbackFormat(xe){m=xe,_.fallbackFormat=m},get warnHtmlMessage(){return C},set warnHtmlMessage(xe){C=xe,_.warnHtmlMessage=xe},get escapeParameter(){return v},set escapeParameter(xe){v=xe,_.escapeParameter=xe},t:z,getLocaleMessage:le,setLocaleMessage:Ce,mergeLocaleMessage:ae,getPostTranslationHandler:P,setPostTranslationHandler:R,getMissingHandler:q,setMissingHandler:j,[oF]:Ee};return Ke.datetimeFormats=N,Ke.numberFormats=O,Ke.rt=H,Ke.te=X,Ke.tm=Y,Ke.d=ee,Ke.n=V,Ke.getDateTimeFormat=oe,Ke.setDateTimeFormat=Q,Ke.mergeDateTimeFormat=ne,Ke.getNumberFormat=ge,Ke.setNumberFormat=Ae,Ke.mergeNumberFormat=_e,Ke[rF]=n,Ke[Zk]=pe,Ke[Gk]=fe,Ke[Qk]=re,Ke}function rV(e){const t=Vt(e.locale)?e.locale:Jp,n=Vt(e.fallbackLocale)||ms(e.fallbackLocale)||Zn(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,i=Gi(e.missing)?e.missing:void 0,s=ii(e.silentTranslationWarn)||Mh(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,o=ii(e.silentFallbackWarn)||Mh(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=ii(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,a=Zn(e.modifiers)?e.modifiers:{},u=e.pluralizationRules,c=Gi(e.postTranslation)?e.postTranslation:void 0,d=Vt(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,f=!!e.escapeParameterHtml,h=ii(e.sync)?e.sync:!0;let g=e.messages;if(Zn(e.sharedMessages)){const x=e.sharedMessages;g=Object.keys(x).reduce((_,I)=>{const M=_[I]||(_[I]={});return js(M,x[I]),_},g||{})}const{__i18n:m,__root:y,__injectWithOption:A}=e,b=e.datetimeFormats,C=e.numberFormats,v=e.flatJson;return{locale:t,fallbackLocale:n,messages:g,flatJson:v,datetimeFormats:b,numberFormats:C,missing:i,missingWarn:s,fallbackWarn:o,fallbackRoot:r,fallbackFormat:l,modifiers:a,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:h,__i18n:m,__root:y,__injectWithOption:A}}function Yk(e={}){const t=V2(rV(e)),{__extender:n}=e,i={id:t.id,get locale(){return t.locale.value},set locale(s){t.locale.value=s},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(s){t.fallbackLocale.value=s},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(s){t.setMissingHandler(s)},get silentTranslationWarn(){return ii(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(s){t.missingWarn=ii(s)?!s:s},get silentFallbackWarn(){return ii(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(s){t.fallbackWarn=ii(s)?!s:s},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(s){t.fallbackFormat=s},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(s){t.setPostTranslationHandler(s)},get sync(){return t.inheritLocale},set sync(s){t.inheritLocale=s},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){t.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(s){t.escapeParameter=s},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...s){return Reflect.apply(t.t,t,[...s])},rt(...s){return Reflect.apply(t.rt,t,[...s])},te(s,o){return t.te(s,o)},tm(s){return t.tm(s)},getLocaleMessage(s){return t.getLocaleMessage(s)},setLocaleMessage(s,o){t.setLocaleMessage(s,o)},mergeLocaleMessage(s,o){t.mergeLocaleMessage(s,o)},d(...s){return Reflect.apply(t.d,t,[...s])},getDateTimeFormat(s){return t.getDateTimeFormat(s)},setDateTimeFormat(s,o){t.setDateTimeFormat(s,o)},mergeDateTimeFormat(s,o){t.mergeDateTimeFormat(s,o)},n(...s){return Reflect.apply(t.n,t,[...s])},getNumberFormat(s){return t.getNumberFormat(s)},setNumberFormat(s,o){t.setNumberFormat(s,o)},mergeNumberFormat(s,o){t.mergeNumberFormat(s,o)}};return i.__extender=n,i}function lV(e,t,n){return{beforeCreate(){const i=e0();if(!i)throw wr(ir.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const o=s.i18n;if(s.__i18n&&(o.__i18n=s.__i18n),o.__root=t,this===this.$root)this.$i18n=Iw(e,o);else{o.__injectWithOption=!0,o.__extender=n.__vueI18nExtend,this.$i18n=Yk(o);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=Iw(e,s);else{this.$i18n=Yk({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}else this.$i18n=e;s.__i18nGlobal&&aF(t,s,s),this.$t=(...o)=>this.$i18n.t(...o),this.$rt=(...o)=>this.$i18n.rt(...o),this.$te=(o,r)=>this.$i18n.te(o,r),this.$d=(...o)=>this.$i18n.d(...o),this.$n=(...o)=>this.$i18n.n(...o),this.$tm=o=>this.$i18n.tm(o),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=e0();if(!i)throw wr(ir.UNEXPECTED_ERROR);const s=this.$i18n;s&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s?.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(i),delete this.$i18n)}}}function Iw(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[oF](t.pluralizationRules||e.pluralizationRules);const n=T5(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(i=>e.mergeLocaleMessage(i,n[i])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(i=>e.mergeDateTimeFormat(i,t.datetimeFormats[i])),t.numberFormats&&Object.keys(t.numberFormats).forEach(i=>e.mergeNumberFormat(i,t.numberFormats[i])),e}const L5={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function aV({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((i,s)=>[...i,...s.type===Te?s.children:[s]],[]):t.reduce((n,i)=>{const s=e[i];return s&&(n[i]=s()),n},_i())}function uF(){return Te}const uV=Qe({name:"i18n-t",props:js({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Os(e)||!isNaN(e)}},L5),setup(e,t){const{slots:n,attrs:i}=t,s=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return()=>{const o=()=>{const a=Object.keys(n).filter(d=>d[0]!=="_"),u=_i();e.locale&&(u.locale=e.locale),e.plural!==void 0&&(u.plural=Vt(e.plural)?+e.plural:e.plural);const c=aV(t,a);return s[Zk](e.keypath,c,u)},r=js(_i(),i),l=Vt(e.tag)||ri(e.tag)?e.tag:uF();return ri(l)?gn(l,r,{default:o}):gn(l,r,o())}}}),Mw=uV;function cV(e){return ms(e)&&!Vt(e[0])}function cF(e,t,n,i){const{slots:s,attrs:o}=t;return()=>{const r=()=>{const u={part:!0};let c=_i();e.locale&&(u.locale=e.locale),Vt(e.format)?u.key=e.format:ri(e.format)&&(Vt(e.format.key)&&(u.key=e.format.key),c=Object.keys(e.format).reduce((h,g)=>n.includes(g)?js(_i(),h,{[g]:e.format[g]}):h,_i()));const d=i(e.value,u,c);let f=[u.key];return ms(d)?f=d.map((h,g)=>{const m=s[h.type],y=m?m({[h.type]:h.value,index:g,parts:d}):[h.value];return cV(y)&&(y[0].key=`${h.type}-${g}`),y}):Vt(d)&&(f=[d]),f},l=js(_i(),o),a=Vt(e.tag)||ri(e.tag)?e.tag:uF();return ri(a)?gn(a,l,{default:r}):gn(a,l,r())}}const dV=Qe({name:"i18n-n",props:js({value:{type:Number,required:!0},format:{type:[String,Object]}},L5),setup(e,t){const n=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return cF(e,t,nF,(...i)=>n[Qk](...i))}}),Ew=dV;function fV(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const i=n.__getInstance(t);return i!=null?i.__composer:e.global.__composer}}function hV(e){const t=r=>{const{instance:l,value:a}=r;if(!l||!l.$)throw wr(ir.UNEXPECTED_ERROR);const u=fV(e,l.$),c=Tw(a);return[Reflect.apply(u.t,u,[...Lw(c)]),u]};return{created:(r,l)=>{const[a,u]=t(l);U2&&(r.__i18nWatcher=qe(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),r.__composer=u,r.textContent=a},unmounted:r=>{U2&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:l})=>{if(r.__composer){const a=r.__composer,u=Tw(l);r.textContent=Reflect.apply(a.t,a,[...Lw(u)])}},getSSRProps:r=>{const[l]=t(r);return{textContent:l}}}}function Tw(e){if(Vt(e))return{path:e};if(Zn(e)){if(!("path"in e))throw wr(ir.REQUIRED_VALUE,"path");return e}else throw wr(ir.INVALID_VALUE)}function Lw(e){const{path:t,locale:n,args:i,choice:s,plural:o}=e,r={},l=i||{};return Vt(n)&&(r.locale=n),Os(s)&&(r.plural=s),Os(o)&&(r.plural=o),[t,l,r]}function pV(e,t,...n){const i=Zn(n[0])?n[0]:{};(ii(i.globalInstall)?i.globalInstall:!0)&&([Mw.name,"I18nT"].forEach(o=>e.component(o,Mw)),[Ew.name,"I18nN"].forEach(o=>e.component(o,Ew)),[Dw.name,"I18nD"].forEach(o=>e.component(o,Dw))),e.directive("t",hV(t))}const gV=vc("global-vue-i18n");function mV(e={}){const t=__VUE_I18N_LEGACY_API__&&ii(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=ii(e.globalInjection)?e.globalInjection:!0,i=new Map,[s,o]=vV(e,t),r=vc("");function l(d){return i.get(d)||null}function a(d,f){i.set(d,f)}function u(d){i.delete(d)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...f){if(d.__VUE_I18N_SYMBOL__=r,d.provide(d.__VUE_I18N_SYMBOL__,c),Zn(f[0])){const m=f[0];c.__composerExtend=m.__composerExtend,c.__vueI18nExtend=m.__vueI18nExtend}let h=null;!t&&n&&(h=xV(d,c.global)),__VUE_I18N_FULL_INSTALL__&&pV(d,c,...f),__VUE_I18N_LEGACY_API__&&t&&d.mixin(lV(o,o.__composer,c));const g=d.unmount;d.unmount=()=>{h&&h(),c.dispose(),g()}},get global(){return o},dispose(){s.stop()},__instances:i,__getInstance:l,__setInstance:a,__deleteInstance:u};return c}function Bt(e={}){const t=e0();if(t==null)throw wr(ir.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw wr(ir.NOT_INSTALLED);const n=yV(t),i=bV(n),s=lF(t),o=kV(e,s);if(o==="global")return aF(i,e,s),i;if(o==="parent"){let a=Nw(n,t,e.__useComponent);return a==null&&(a=i),a}if(o==="isolated"){if(n.mode!=="composition")throw wr(ir.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const a=n,u=js({},e),c=Nw(n,t);u.__root=c||i;const d=V2(u);return a.__composerExtend&&(d[Zf]=a.__composerExtend(d)),M0()&&Xd(()=>{const h=d[Zf];h&&(h(),delete d[Zf])}),d}const r=n;let l=r.__getInstance(t);if(l==null){const a=js({},e);"__i18n"in s&&(a.__i18n=s.__i18n),i&&(a.__root=i),l=V2(a),r.__composerExtend&&(l[Zf]=r.__composerExtend(l)),CV(r,t,l),r.__setInstance(t,l)}return l}function vV(e,t){const n=r5(),i=__VUE_I18N_LEGACY_API__&&t?n.run(()=>Yk(e)):n.run(()=>V2(e));if(i==null)throw wr(ir.UNEXPECTED_ERROR);return[n,i]}function yV(e){const t=cn(e.isCE?gV:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw wr(e.isCE?ir.NOT_INSTALLED_WITH_PROVIDE:ir.UNEXPECTED_ERROR);return t}function kV(e,t){return Ly(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function bV(e){return e.mode==="composition"?e.global:e.global.__composer}function Nw(e,t,n=!1){let i=null;const s=t.root;let o=AV(t,n);for(;o!=null;){const r=e;if(e.mode==="composition")i=r.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const l=r.__getInstance(o);l!=null&&(i=l.__composer,n&&i&&!i[rF]&&(i=null))}if(i!=null||s===o)break;o=o.parent}return i}function AV(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function CV(e,t,n){mn(()=>{},t),Mn(()=>{const i=n;e.__deleteInstance(t);const s=i[Zf];s&&(s(),delete i[Zf])},t)}const wV=["locale","fallbackLocale","availableLocales"],Fw=["t","rt","d","n","tm","te"];function xV(e,t){const n=Object.create(null);return wV.forEach(s=>{const o=Object.getOwnPropertyDescriptor(t,s);if(!o)throw wr(ir.UNEXPECTED_ERROR);const r=Hi(o.value)?{get(){return o.value.value},set(l){o.value.value=l}}:{get(){return o.get&&o.get()}};Object.defineProperty(n,s,r)}),e.config.globalProperties.$i18n=n,Fw.forEach(s=>{const o=Object.getOwnPropertyDescriptor(t,s);if(!o||!o.value)throw wr(ir.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${s}`,o)}),()=>{delete e.config.globalProperties.$i18n,Fw.forEach(s=>{delete e.config.globalProperties[`$${s}`]})}}const SV=Qe({name:"i18n-d",props:js({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},L5),setup(e,t){const n=e.i18n||Bt({useScope:e.scope,__useComponent:!0});return cF(e,t,tF,(...i)=>n[Gk](...i))}}),Dw=SV;iV();BK(vK);zK(FK);RK(qk);if(__INTLIFY_PROD_DEVTOOLS__){const e=md();e.__INTLIFY__=!0,yK(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const _V={preview:"Preview",confirm:"Confirm",cancel:"Cancel",close:"Close",dismiss:"Dismiss",loading:"Loading",copy:"Copy"},IV={authBannerMessage:"Not signed in · Sign in to Kimi Code to start a conversation",authBannerLogin:"Sign in",connecting:"Connecting…",internalBuildBanner:"Internal testing only",menuFile:"File",menuEdit:"Edit",menuView:"View",menuHelp:"Help",applicationMenu:"Application menu"},MV={workspaceMeta:"workspace · {branch}",sessionsHeader:"sessions",viewSwitcher:"List options",viewGroup:"View",viewFlat:"Flat list",viewGrouped:"Group by workspace",sortGroup:"Sort order",sortManual:"Manual",sortRecent:"Recent activity",sessionAdmin:"Manage Sessions",collapseAll:"Collapse all workspaces",expandAll:"Expand all workspaces",newSession:"New Session",newChat:"New Session",newWorkspace:"New Workspace",dropToAddWorkspace:"Drop to add workspace",emptyState:"No sessions yet · click New Session to start",options:"Options",rename:"Rename",genTitle:"Gen Title",genTitleUnavailable:"Title generation unavailable — needs a managed Kimi Code login and at least one message",setEmoji:"Set Emoji…",sessionEmojiTitle:"Pick an emoji",removeEmoji:"Remove emoji",randomEmoji:"Random",searchEmoji:"Search emoji",recentEmojis:"Recently used",noEmojiResults:"No matching emoji",emojiGroupFaces:"Smileys & People",emojiGroupNature:"Animals & Nature",emojiGroupFood:"Food & Drink",emojiGroupActivity:"Activities & Travel",emojiGroupObjects:"Objects & Work",emojiGroupSymbols:"Symbols & Status",copyPath:"Copy path",copySessionId:"Copy session ID",copied:"Copied ✓",copyFailed:"Copy failed",archive:"Archive",archiveToastUndo:"Undo",archiveToastMid:"or view archived chats in",archiveToastSettings:"Settings",archiveToastTail:"",tabOpen:"Open",tabDone:"Done",tabWorkspaces:"Workspaces",tagOpen:"Open",tagDone:"Done",complete:"Done",markDone:"Mark as done",reopen:"Mark as open",noDoneSessions:"No completed sessions yet",noOpenSessions:"No open sessions yet",completeToastLead:"Done",reopenToastLead:"Back to open",fork:"Fork session",export:"Export session",pin:"Pin",unpin:"Unpin",pinned:"Pinned",collapsePinned:"Collapse pinned",expandPinned:"Expand pinned",delete:"Delete",removeWorkspace:"Remove workspace",brand:"Kimi Code",signedIn:"Signed in",signOut:"Sign out",notSignedIn:"Not signed in",signIn:"Sign in",defaultUserName:"Kimi User",upgrade:"Upgrade",upgradeMembership:"Upgrade membership",logoutConfirmTitle:"Sign out",logoutConfirmMessage:"Are you sure you want to sign out?",language:"Language",backendTitle:"Backend {backend} · {endpoint} — click to switch",noSessions:"No conversations yet",allPinned:"{count} conversations pinned",showMore:"Show more",loadMore:"Load more",showLess:"Show less",loadingMore:"Loading…",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",searchPlaceholder:"Search sessions and workspaces",search:"Search",searchHint:"↑↓ navigate · ↵ open · Esc close",searchHintSelect:"navigate",searchHintOpen:"open",searchHintClose:"close",searchClear:"Clear search",searchNoResults:"No matching sessions or workspaces",searchEmpty:"No sessions yet",update:"Upgrade",updateAvailable:"v{version} available",updateDownloadingButton:"Downloading… ({percent}%)",updateReady:"v{version} ready",updateDone:"Restart",updateFailed:"Download failed",updateRetry:"Retry",updateDownloadNow:"Download & Update",updateSkip:"Skip This Version",updateRestartNow:"Restart Now",updateRestartLater:"Later",updateReleaseDate:"Released {date}",updateCurrentVersion:"Current v{version}",updateWhatsNew:"What’s new",updateBackground:"Download in Background",updateAutoDownload:"Automatically download and install updates"},EV={title:"Session Management",subtitle:"Manage all sessions. Mark the finished ones as done. Filter by last updated to clean up old sessions in bulk.",back:"Back",filterWorkspace:"Workspace",filterStatus:"Status",filterTime:"Updated",allWorkspaces:"All workspaces",selectAll:"Select all",searchWorkspace:"Search workspaces",noWorkspaceMatch:"No matching workspaces",removeTag:"Remove {name}",statusAll:"All statuses",statusOpen:"Open",statusDone:"Done",timeAll:"Any time",timeDaysAgo:"{n} days ago",query:"Query",reset:"Reset",colStatus:"Status",colTitle:"Title",colWorkspace:"Workspace",colPrompt:"Last prompt",colUpdated:"Updated",colCompleted:"Completed",colActions:"Actions",empty:"No sessions match the current filters",loading:"Loading…",total:"{n} total",pageSize:"{n} / page",prevPage:"Previous page",nextPage:"Next page",selectPageAll:"Select all on this page",batchSelected:"{n} selected",selectAllMatching:"Select all {total} matching sessions",materializingAll:"Selecting…",allMatchingSelected:"All {n} selected",clearSelection:"Clear selection",markDone:"Mark as done",reopen:"Mark as open",markDoneCount:"Mark as done ({n})",reopenCount:"Mark as open ({n})",batchDoneToast:"{n} marked as done",batchReopenedToast:"{n} moved back to open",batchFailedSuffix:", {n} failed",batchDoneFailedNotice:"Could not mark {n} as done",batchReopenFailedNotice:"Could not move {n} back to open",undo:"Undo",open:"Open session",rename:"Rename…",fork:"Fork",export:"Export",moreActions:"More actions"},TV={switcherTitle:"Switch workspace",switchTooltip:"Switch workspace",eyebrow:"Workspace",branchLabel:"branch: {branch}",noBranch:"no branch",sessionCount:"{count} session | {count} sessions",allWorkspaces:"All workspaces",currentWorkspace:"Current workspace only",addWorkspace:"Add workspace…",noWorkspace:"No workspace",deleteHasSessions:"This workspace still has sessions — archive them before deleting it",removeWorkspaceConfirm:'Remove workspace "{name}"?',swarmEnableTitle:"Enable swarm mode?",swarmEnableConfirm:"The agent will run multiple sub-agents in parallel.",goalStartTitle:"Start goal?",goalStartConfirm:'"{objective}" — the agent will run autonomously toward it.',scopeCurrent:"this workspace",scopeAll:"all workspaces",newInGroup:"New session in this workspace",addTitle:"Add workspace",pathLabel:"Path",pathPlaceholder:"/absolute/path/to/project",recentLabel:"Recent folders",add:"Add",cancel:"Cancel",addHint:"Paste an absolute folder path, or pick a recent one.",addFailed:"Couldn't open this folder. Check the path and try again.",requiredTitle:"Choose a workspace first",requiredMessage:"Pick a folder to use as your workspace before sending a message.",openThisFolder:"Open this folder",up:"Up",browsing:"Browsing…",filterPlaceholder:"Filter subfolders…",searchPlaceholder:"Fuzzy-search under this folder…",searching:"Searching…",pasteToggle:"Enter an absolute path",noFilterMatch:"No subfolders match “{q}”",noSubfolders:"No subfolders here",browseHint:'Click a folder to enter it, then "Open this folder" to add it as a workspace.',attentionTitle:"{count} item needs your attention | {count} items need your attention",awaitingAnswer:"Answer",awaitingAnswerTitle:"A question is waiting for your answer",awaitingPermission:"Approve",awaitingPermissionTitle:"An action is waiting for your approval",aborted:"Failed",abortedTitle:"This session's latest turn ended on an error"},LV={jumpToLatestAria:"Jump to latest message",toc:"Conversation outline",newMessages:"Latest messages",loading:"Loading…",starting:"Starting conversation…",requesting:"Requesting…",working:"Working…",workingRetry:"Model request failed — retrying ({n}/{max})…",emptyWorkspaceHint:"Send in {name}",switchWorkspace:"Switch workspace",recentSessions:"Recent sessions",viewMoreSessions:"View more",sessionAdminTooltip:"View and manage more sessions in Session Management",addWorkspace:"New workspace",moreWorkspaces:"More workspaces ({count})",pickFolder:"Choose folder…",compacting:"Compacting context…",compactedPlain:"Context compacted",compactedAuto:"Context auto-compacted",compactedTokens:" ({before} → {after} tokens)",viewSummary:"View summary",summaryTitle:"Compaction summary",activatedSkill:"Activated skill: {name}",undo:"Undo",undoTooltip:"Undo edit",undoConfirm:"Undo last message?",escUndoHintPre:"Press",escUndoHintPost:"again to undo",undone:"Undone — the message is back in the composer",turnInterrupted:"Manually stopped",turnFailed:"Model request failed — this turn was interrupted",turnFailedMaxSteps:"Step limit reached — this turn was interrupted",turnFailedResume:"Continue",turnFailedResumeText:"Continue",yesterday:"Yesterday",loadOlder:"Load earlier messages",loadingOlder:"Loading earlier messages…",widenTable:"Widen table",restoreTableWidth:"Restore default width",cron:{fired:"Scheduled reminder fired",missed:"Missed scheduled reminders",job:"job {id}",oneShot:"one-shot",coalesced:"{n} fires coalesced",missedCount:"{n} missed",finalDelivery:"final delivery",expand:"Show more",collapse:"Show less"},fold:{worked:"Worked {duration}",workedUnknown:"Work details"},turnFiles:{titleOne:"{number} file changed",titleOther:"{number} files changed",more:"{number} more files",moreOne:"1 more file",showLess:"Show less",diffTitle:"Changes this turn",diffUnavailable:"This file’s changes can’t be shown line by line",openFile:"Open file"},goal:{continuation:"Goal continuation"},notification:{kindTask:"Background task",kindSubagent:"Subagent",title:{completed:"{kind} completed",failed:"{kind} failed",timed_out:"{kind} timed out",killed:"{kind} killed",lost:"{kind} lost",info:"{kind} notification"},status:{completed:"completed",failed:"failed",timed_out:"timed out",killed:"killed",lost:"lost",info:"info"},groupTitle:"{n} notifications",copyPath:"Copy path",copied:"Copied",rawPayload:"Raw payload",fields:{type:"Type",source:"Source",severity:"Severity"}},userMessage:{expand:"Show more",collapse:"Show less"},search:{placeholder:"Search chat…",searching:"Searching…",results:"{current}/{total} results",resultsCapped:"{current}/{total}+ results",noResults:"No results",previous:"Previous match",next:"Next match",close:"Close search"}},NV={connectionConnected:"Connected",connectionConnecting:"Connecting…",connectionDisconnected:"Disconnected",ctxTooltip:"Used {used} / {max} tokens ({pct}%)",modelLabel:"Model",permissionManual:"Manual",permissionAuto:"Auto",permissionYolo:"YOLO",permissionManualDesc:"Ask for approval on every tool action",permissionAutoDesc:"Fully autonomous — agent decides everything without asking",permissionYoloDesc:"Auto-approve tool actions, but agent may still ask questions",planLabel:"Plan",planOn:"on",planOff:"off",planTooltip:"Toggle plan mode (research before editing)",workModeDismiss:"Exit mode",goalLabel:"Goal",timeUnitHour:"h",timeUnitMinute:"m",timeUnitSecond:"s",planEmptyArmed:"Plan mode is on — the plan the agent writes will show up here.",planEmptyIdle:"No plan yet — turn plan mode on and the agent’s plan will show up here.",swarmLabel:"Swarm",swarmDismiss:"Turn off Swarm",modeOff:"Off",goalPlaceholder:"What should the agent achieve?",planPlaceholder:"What should the agent plan for?",goalStart:"Start",goalPause:"Pause",goalResume:"Resume",goalCancel:"Cancel",goalCancelConfirm:"Cancel this goal? It cannot be resumed afterwards.",goalCancelConfirmYes:"Yes",goalCancelConfirmNo:"No",goalDoneWhen:"Done when",goalStatusActive:"Active",goalStatusPaused:"Paused",goalStatusBlocked:"Blocked",goalStatusComplete:"Complete",modeNotSupported:"Not supported",thinkingLabel:"Thinking",thinkingTooltip:"Toggle thinking mode",thinkingOn:"On",thinkingOff:"Off",cacheNote:"Note: Switching models or thinking effort invalidates the existing prompt cache. Start a new chat to avoid extra token costs.",starredModels:"Starred",moreModels:"More models…",statusPanelTitle:"Session status",statusPanelClose:"Close",statusModel:"Model",statusThinking:"Thinking",statusPermission:"Permission",statusPlanMode:"Plan mode",statusSwarmMode:"Swarm mode",swarmOn:"on",swarmOff:"off",statusContext:"Context",statusCost:"Cost",statusContextValue:"{used} / {max} ({pct}%)",statusNone:"—",activityRunning:"Running…",activityAwaitingApproval:"Awaiting approval",activityAwaitingQuestion:"Awaiting answer",interrupt:"Interrupt",runningShort:"in progress"},FV={placeholder:"Type a message…",send:"Send ↵",queueLabel:"Queue",placeholderRunning:"Press Enter to queue · Ctrl+S to inject into the running turn",starting:"Sending…",queueAutoDrain:"sends automatically when the current turn ends",queueNext:"Up next",queueDragTitle:"Drag to reorder",editQueued:"Edit (load back into the input)",queuedAttachments:"attachment ×{n}",queuedHasImage:"Contains {n} image(s) — remove only, not editable",attachmentImage:"Image",attachmentVideo:"Video",attachmentFile:"File",attachmentOpenUnsupported:"Can’t open {name} — this file type isn’t supported",dropToAttach:"Drop files to attach",remove:"Remove",removeNamed:"Remove {name}",clearAll:"Clear all attachments",attachmentCount:"{n} attachments",uploading:"Uploading",uploadFailed:"Upload failed",attachFile:"Attach file",addMenu:"Add",addFiles:"Files",addGoalDesc:"Set a goal to keep pursuing",addPlanDesc:"Turn plan mode on",addSwarmDesc:"Turn swarm mode on",noCommands:"No commands",previewAttachment:"Preview {name}",interrupt:"Interrupt",interruptTitle:"Interrupt current operation",expandTitle:"Expand input for multi-line editing",collapseTitle:"Collapse input",emptyConversationTitle:"Kimi Code",emptyConversation:"No messages yet — type below to start the conversation",upgradeBanner:"Upgrade your Kimi account to use Kimi Code",quickStartPlaceholder:"Type a message to start a new conversation…",thinkingSuffix:" · thinking",thinkingSuffixEffort:" · {level}"},DV={title:"Sign in to Kimi Code",close:"Close (Esc)",starting:"Starting sign-in flow…",lead:"Click the button below to sign in from a new browser tab.",authorizeInBrowser:"Sign in via browser",orDivider:"or",fallbackPrefix:"On another device? Open ",fallbackSuffix:" and enter the device code:",copy:"Copy",copied:"Copied",copyLink:"Copy link",waitingAuth:"Waiting for sign-in",waitingAutoClose:"Waiting for sign-in, closes automatically…",success:"Signed in",successHint:"Loading, will close automatically…",expiredTitle:"Device code expired",expiredHint:"Please restart the sign-in flow",retry:"Retry",closeBtn:"Close",errorTitle:"The current version does not support login yet",errorHint:"Please upgrade kimi-code and try again",pollErrorTitle:"Lost connection",pollErrorHint:"Sign-in polling failed repeatedly. Check the kimi-code process and try again.",action:"Sign in",requiredTitle:"Sign in required",requiredMessage:"Sign in to your Kimi account and set up a model to start chatting.",goToLogin:"Sign in",upgradeRequiredTitle:"Upgrade required",upgradeRequiredMessage:"Your account is on the free plan. Upgrade to a membership to start chatting with Kimi models.",rcSubtitle:"Remote Control session",rcChecking:"Checking sign-in status…",rcLead:"This Remote Control session requires authorization. Sign in with your Kimi account to continue.",rcAuthorize:"Open authorization page",rcUserCodeLabel:"Authorization code",rcSuccessHint:"Redirecting…",rcExpiredTitle:"Authorization expired or declined",rcStartErrorTitle:"Could not start sign-in",rcConnectionErrorHint:"Check your connection and try again.",rcSuccessNoRedirect:"You can close this page now."},$V={title:"Provider management",loading:"Loading providers…",unavailable:"Provider management is not available yet",empty:"No providers yet",status:{connected:"Connected",error:"Error",unconfigured:"Not configured"},keySet:"key set",keyNotSet:"key not set",managedBadge:"OAuth",modelCount:"{count} models",confirmDelete:"Confirm delete?",refresh:"Refresh",delete:"Delete",refreshTitle:"Refresh {type}",deleteTitle:"Delete {type}",loginKimi:"Sign in to Kimi",loginAnthropic:"Sign in to Anthropic",addProvider:"Add provider",added:"Provider added",enterApiKey:"Enter API Key",optional:"Optional",apiKeyRequired:"API Key cannot be empty",fieldId:"Name",fieldType:"API Protocol",types:{kimi:"Kimi",openai:"OpenAI",openai_responses:"OpenAI Responses",anthropic:"Anthropic","google-genai":"Google GenAI",vertexai:"Vertex AI"},fieldApiKey:"API Key",apiKeyManaged:"Signed in with OAuth",apiKeySet:"Set — enter a new key to replace",showApiKey:"Show API key",hideApiKey:"Hide API key",fieldBaseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com/v1",fieldModels:"Models",colModelId:"Model ID",colContext:"Context",colDisplayName:"Display name",modelIdPlaceholder:"kimi-k3",modelContextPlaceholder:"1048576",modelNamePlaceholder:"Optional",noModels:"No models",addModel:"Add model",removeModel:"Remove model",fieldDefaultModel:"Default model",save:"Save",saved:"Provider saved",deleteProvider:"Delete provider",deleteConfirm:"Delete {id} and its {count} models?",deleteConfirmYes:"Delete",managedHint:"Managed providers sign in and out on the Account tab",unsavedGuard:"You have unsaved changes.",guardStay:"Keep editing",guardDiscard:"Discard",add:"Add",catalog:{sourceCatalog:"From directory",sourceManual:"Manual",sourceRegistry:"Registry",registryHint:"Import providers and models from an api.json registry; re-importing the same URL refreshes it",registryUrlLabel:"Registry URL",registryImported:"{count} providers imported",searchPlaceholder:"Search providers",loading:"Loading directory…",loadError:"Failed to load the directory. Check your network and retry.",retry:"Retry",empty:"No matching providers",rejected:"Not importable",rejectReason:{"unknown-explicit-type":"Unsupported protocol","proprietary-sdk":"Proprietary SDK — cannot be imported","empty-base-url":"Blank base URL","placeholder-base-url":"Endpoint contains an env placeholder"},backToList:"Back to directory",willImport:"{count} models will be imported from the directory",overwriteWarning:"A provider with this name already exists; importing overwrites its config and models",importAction:"Import"},error:{idRequired:"Name cannot be empty",idInvalid:'Name must start with a letter or digit and may only contain letters, digits, "-", "_" and spaces',apiKeyRequired:"API Key cannot be empty",baseUrlRequired:"Base URL cannot be empty",registryUrlRequired:"Registry URL cannot be empty",modelRequired:"Model ID cannot be empty",contextSizeRequired:"Max context size cannot be empty",contextSizeInvalid:"Max context size must be a positive integer"},hintClose:"Close"},BV={dialogLabel:"Switch model",title:"Switch model",close:"Close (Esc)",allTab:"All",providerTabs:"Model providers",searchPlaceholder:"Search models or providers…",clearSearch:"Clear search",loading:"Loading models…",unavailable:"Model list is unavailable",contextSuffix:"{size} ctx",capabilityImageInput:"Image input",capabilityVideoInput:"Video input",capabilityToolUse:"Tool use",capabilityThinking:"Thinking",capabilityAlwaysThinking:"Always thinking",emptyNoModels:"No models available",emptyNoMatch:"No matching models",starTitle:"Add to favorites",unstarTitle:"Remove from favorites",hintNavigate:"Navigate",hintSelect:"Select",hintClose:"Close"},zV={justNow:"just now"},RV={title:{shell:"Run command?",diff:"Apply changes?",file:"Write file?",fileop:"File operation?",url:"Fetch URL?",search:"Search?",invocation:"Invoke?",todo:"Update todo?",plan_review:"Ready to build with this plan?",generic:"Approve action?"},subagentBadge:"sub agent · {name}",danger:"Danger: {detail}",searchQueryLabel:"query",searchScope:"scope: {scope}",feedbackPlaceholder:"Explain why you are rejecting… (Enter to submit, Shift+Enter for a new line, Esc to cancel)",feedbackHint:"Enter to submit · Shift+Enter for a new line · Esc to cancel",approve:"Approve",approveSession:"Approve for session",reject:"Reject",feedback:"Feedback",feedbackSubmit:"Reject with feedback",feedbackCancel:"Cancel",approvePlan:"Approve plan",revise:"Revise",rejectAndExit:"Reject and Exit",expandPlan:"Expand",collapsePlan:"Collapse"},OV={back:"‹ Previous question",nextQuestion:"Next question ›",otherDefault:"Other…",submit:"Submit",dismiss:"Dismiss",minimize:"Minimize",expand:"Expand",hint:"↑↓ to choose · Enter to confirm"},PV={tag:"tasks",summary:"{run} running · {done} done",copy:"Copy",calling:"Calling {label}",fieldTask:"Task",fieldOutput:"Output",fieldProgress:"Progress",fieldResult:"Result",moreLines:"… ({count} more)",copied:"Copied",stop:"stop",defaultDescription:"Background task",dockTasks:"Background tasks",dockBash:"Bash",dockSubagent:"Background Agent",dockTodos:"Todos",todoProgressTitle:"Progress",stateDone:"Done",stateFail:"Failed",stateCancelled:"Cancelled",filterRecent:"Recent",filterRunning:"Running",filterDone:"Done",filterAll:"All",running:"running",closePanel:"Close panel",openPanel:"Open in the side panel",timingRunning:"Running · {time}",timingDone:"Done · {time}",emptyTasks:"No background tasks running",emptyRecent:"No recent tasks",emptyRunning:"No running tasks",emptyDone:"No completed tasks",emptyBash:"No bash tasks running",emptySubagent:"No background agent tasks running",emptyTodo:"No todos yet",openTab:"Open the tasks tab",openDetail:"Open",collapse:"Collapse",expand:"Expand",transcriptLoadError:"Failed to load this sub agent’s conversation.",copyCommand:"Copy command",copyOutput:"Copy output",copyAll:"Copy all"},jV={panelTitle:"Thinking",streaming:"Thinking…",close:"Close"},HV={title:"Changes",branch:"branch",aheadTitle:"ahead of remote",behindTitle:"behind remote",fileCountOne:"{number} file",fileCountOther:"{number} files",empty:"No git changes",clean:"Working tree clean, no changes",back:"Back",loading:"Loading diff…",noDiff:"No line changes for this file",emptyFile:"Empty file",list:"List",tree:"Tree",close:"Close"},WV={},qV={empty:"Select a file on the left to preview",loading:"Loading…",lineCount:"{count} lines",copy:"Copy",copied:"Copied",copyPath:"Copy path",openInEditor:"Open",reveal:"Reveal",download:"Download",close:"Close",search:"Search",prevMatch:"Previous match",nextMatch:"Next match",htmlMode:"HTML preview mode",markdownMode:"Markdown preview mode",preview:"Preview",source:"Source",imageFit:"Image sizing",fit:"Fit",actual:"Actual",pdfNoPreview:"This PDF cannot be embedded here. Download it to view.",imageNoPreview:"Image file · {mime} · {size} · preview unavailable",binaryNoPreview:"Binary file · {mime} · {size} bytes · preview unavailable",unknownType:"unknown type",copyCode:"Copy code",enlargeImage:"Enlarge image",errors:{emptyPath:"File path is empty",unsupportedPath:"URLs and remote paths cannot be previewed",outsideWorkspace:"Only files inside the current workspace can be previewed",isDirectory:"Select a file instead of a directory",notFound:"File no longer exists or was moved",tooLarge:"File is too large to preview",loadFailed:"Unable to read this file"}},UV={searching:"Searching…",noMatch:"No matches",files:"Files",skills:"Skills",openSkill:"Open skill file",copyPath:"Copy path"},KV={dismiss:"Close",errorLabel:"Error",noteLabel:"Note",agentWarningFallback:"agent warning",unhandledEvent:"Unhandled event: {type}",agentError:{title:"Model request failed",connection:"Cannot connect to the model service",auth:"Model authentication failed",rateLimit:"Model rate limit reached",overloaded:"Model overloaded",filtered:"Response filtered by the provider",api:"Model API error",contextOverflow:"Context size exceeded"},details:{cause:"Cause",code:"Error code",connection:"Connection",contentType:"Content type",details:"Server details",duration:"Duration",endpoint:"Endpoint",errorName:"Error type",message:"Message",operation:"Operation",phase:"Failure phase",request:"Request",requestId:"Request ID",responsePreview:"Response preview",sessionId:"Session ID",stack:"Stack",status:"HTTP status",timeout:"Timeout",timestamp:"Time"},daemonApiTitle:"Kimi server returned an error",daemonNetworkMessage:"Web did not receive a response from the Kimi server. Check that it is still running, or refresh the page.",daemonNetworkTitle:"Cannot connect to Kimi server",daemonTimeoutMessage:"The Kimi server did not respond within the wait limit. The operation may still complete in the background — refresh later to check, or try again.",daemonTimeoutTitle:"Kimi server response timed out",diagnostics:"Diagnostics",hideDetails:"Hide details",operationFailedMessage:"The last operation did not finish. Try again later.",operationFailedTitle:"Operation failed",sessionSnapshotMessage:"Web could not load the current conversation. Check that the Kimi server is still running, or refresh the page.",sessionSnapshotTitle:"Cannot load current conversation",showDetails:"Show details",copyDetails:"Copy diagnostics",copied:"Copied",wsTitle:"Realtime connection error",goal:{alreadyExists:"This session already has an active goal. Cancel it before starting a new one.",notFound:"No goal to act on — it may have already finished or been cancelled.",statusInvalid:"The current goal state does not allow this action.",notResumable:"This goal cannot be resumed (it may be cancelled or completed).",objectiveTooLong:"The objective is too long. Please shorten it and try again."}},VV={new:{desc:"Create a new session"},clear:{desc:"Clear and start a new session"},login:{desc:"Sign in to Kimi in the browser"},plan:{desc:"Toggle plan mode on/off"},swarm:{desc:"Toggle swarm mode; /swarm <task> runs a task in swarm"},goal:{desc:"Create/control a goal: /goal <objective>, /goal pause{'|'}resume{'|'}cancel"},btw:{desc:"Side chat: /btw <question> asks a forked side session"},yolo:{desc:"Auto-approve tool actions; the agent may still ask questions"},auto:{desc:"Fully autonomous — the agent never asks questions"},thinking:{desc:"Set the thinking level"},compact:{desc:"Compact the conversation history"},fork:{desc:"Fork this session into a new one"},export:{desc:"Download this session and troubleshooting logs as a ZIP",noSession:"Open a session before exporting it.",started:"Exporting session…",done:"Session exported.",tooLarge:"Session data exceeds the export size limit. Export it from a terminal instead: kimi export {sessionId} -o session.zip"},status:{desc:"View session status"},undo:{desc:"Undo the last message"}},ZV={label:{read:"Read",bash:"Run",edit:"Edit",write:"Write",grep:"Search",glob:"Find",ls:"List",web_fetch:"Fetch",search:"Search",todo:"Todo",task:"Task",swarm:"Swarm",ask_user:"Question",plan:"Plan",goal_create:"Start Goal",goal_get:"Read Goal",goal_budget:"Set Goal Budget",goal_update:"Update Goal"},swarm:{progress:"{done} / {total}",runningSub:"{count} in progress",doneSub:"{completed} completed · {failed} failed",doneSubWithCancelled:"{completed} completed · {failed} failed · {cancelled} cancelled",phaseQueued:"Queued",phaseWorking:"Working",phaseSuspended:"Suspended",phaseCompleted:"Completed",phaseFailed:"Failed",phaseCancelled:"Cancelled",waiting:"Waiting for subagents…"},chip:{lines:"{count} lines",results:"{count} results",files:"{count} files",edited:"edited",created:"created",todos:"{count} items"},disclosure:{expand:"Expand details",collapse:"Collapse details"},output:{waiting:"Waiting for output…",empty:"No output",saved:"Saved result"},plan:{review:{pending:"Pending review",approved:"Approved",rejected:"Rejected",cancelled:"Cancelled"},selectedOption:"Selected",pathOnlyHint:"No inline content — open it in the side panel:",feedback:"Feedback"},summary:{inScope:"{value} in {scope}"},goal:{objectiveWithCriterion:"{objective} · {criterion}",status:"Status: {status}",budget:"{value} {unit}",turns:"{value} turns",tokens:"{value} tokens",milliseconds:"{value} ms",seconds:"{value} sec",minutes:"{value} min",hours:"{value} hr"},group:{countOther:"{count} tool call | {count} tool calls",typed:{read:{done:"Read {count} file | Read {count} files"},bash:{done:"Ran {count} command | Ran {count} commands"},grep:{done:"Searched {count} pattern | Searched {count} patterns"},search:{done:"Ran {count} web search | Ran {count} web searches"},glob:{done:"Matched {count} file pattern | Matched {count} file patterns"},ls:{done:"Listed {count} directory | Listed {count} directories"},web_fetch:{done:"Fetched {count} page | Fetched {count} pages"},edit:{done:"Made {count} edit | Made {count} edits"},write:{done:"Wrote {count} file | Wrote {count} files"}}},activity:{failedClause:" ({count} failed)",liveDonePrefix:"",busy:"Working…",doing:{read:"Reading {subject}",bash:"Running {subject}",grep:"Searching {subject}",search:"Searching {subject}",glob:"Matching {subject}",ls:"Listing {subject}",web_fetch:"Fetching {subject}",edit:"Editing {subject}",write:"Writing {subject}"}},ask:{dismissed:"Dismissed",answer:"{count} answer",answers:"{count} answers",answered:"Answered",more:"(+{count} more)",collected:"Collected your answers",question:"{count} question",questions:"{count} questions",freeInput:"(free text)",unanswered:"No answer"}},GV={resizeHandleAria:"Resize sidebar width",resizePreviewAria:"Resize preview panel width",detailPanelAria:"Detail panel"},QV={openSwitcher:"Switch session / workspace",openSettings:"Session settings",settingsTitle:"Session settings",groupSession:"Current session",groupApp:"App preferences",sheetLabel:"Sheet",closeSheet:"Close",tapToCycle:"tap to cycle",running:"running",idle:"idle",sessionCount:"{n} sessions",newSession:"New session",permManualSub:"confirm every tool",permAutoSub:"fully autonomous, never asks",permYoloSub:"auto-approve tools, may still ask",planModeSub:"Plan mode",goalModeSub:"Goal mode",swarmModeSub:"Swarm mode",archivedSessions:"Archived sessions",archivedSessionsSub:"Browse and restore archived sessions",archivedBack:"Back"},YV={colorSchemeLabel:"Appearance",light:"Moon bright",dark:"Moon dark",system:"System"},JV={continue:"Continue",back:"Back",skip:"Skip",welcome:{title:"Welcome to Kimi Code",subtitle:"The AI coding workbench for professional developers",languageLabel:"Language",themeLabel:"Appearance"},login:{title:"Configure Model",subtitle:"Choose the model service that powers Kimi Code. You can change it later in Settings",kimiTitle:"Sign in with Kimi",kimiHint:"Ready out of the box with Kimi membership benefits",recommended:"Recommended",customProviderTitle:"Add a custom provider",customProviderHint:"Bring your own API key for OpenAI-compatible and other services",loggedInTitle:"Logged in with Kimi",loggedInHint:"Your model service is ready to use",finish:"Finish",skip:"Skip for now"}},XV={title:"Settings",internalTest:"Internal Test",close:"Close (Esc)",tabs:{general:"General",agent:"Agent",account:"Account",providers:"Providers",advanced:"Advanced",archived:"Archived",shortcuts:"Hotkeys",plugins:"Plugins",lab:"Lab"},lab:{sidebarTabs:"Multi-tab sidebar",sidebarTabsHint:"The sidebar shows Open / Done / Workspaces tabs"},plugins:{retry:"Retry",builtIn:"Built-in",official:"Official",thirdParty:"Third-party",installed:"Installed",install:"Install",update:"Update",remove:"Remove",enabled:"Enabled",homepage:"Homepage",empty:"No plugins found",hasErrors:"Error",customInstall:"Install custom plugin",customInstallPlaceholder:"https://… or /path/to/plugin",customInstallHint:"Accepts an https zip URL, a GitHub repo URL, or a local directory path.",extensionHintTitle:"One step left: install the browser extension",extensionGuide:"Manual install",dismissHint:"Dismiss",catalogUnavailable:"The marketplace catalog is currently unreachable; installed plugins remain manageable below.",source:{"local-path":"Local","zip-url":"ZIP",github:"GitHub"},counts:{skill:"1 skill | {n} skills",mcp:"1 MCP server | {n} MCP servers",mcpEnabled:"{n} on",hook:"1 hook | {n} hooks",command:"1 command | {n} commands"}},appearance:"Appearance",notifications:"Notifications",notifyEnabled:"System notifications",notifyEnabledHint:"Send a system notification when a turn completes, needs an answer, or needs approval",notifySound:"Notification sound",notifySoundHint:"Play the system sound with notifications",notifyDenied:"Blocked in browser settings",notifyTitle:"Kimi Code · Turn finished",notifyQuestionTitle:"Kimi Code · Needs answer",notifyApprovalTitle:"Kimi Code · Approval required",notifyFallback:"View result",notifyQuestionFallback:"A question is waiting for your answer",notifyApprovalFallback:"A tool needs your approval",account:"Account",signedIn:"Signed in",signedOutHint:"Sign in to view your account and model access",planUsage:{title:"Plan Usage",retry:"Retry",loadFailed:"Failed to load",empty:"No usage data yet",weekLimit:"Weekly limit",genericLimit:"Limit",hourLimit:"{n}h limit",dayLimit:"{n}d limit",minuteLimit:"{n}m limit",resetsIn:"resets in {duration}",resetDone:"reset",durationDay:"{n}d",durationHour:"{n}h",durationMinute:"{n}m",durationSecond:"{n}s",usedPct:"{pct}% used",boosterTitle:"Booster",boosterBalance:"Balance",monthlyUsed:"Used this month",monthlyLimit:"Monthly limit",unlimited:"Unlimited",freeTitle:"Free account",freeHint:"Upgrade to a membership to use Kimi models and see plan usage"},colorSchemeHint:"Choose the app’s light or dark appearance",appIcon:"Dock icon",appIconHint:"Choose the icon shown in the Dock",appIconDefault:"Default",appIconBlack:"Black",uiFontSize:"Font size",uiFontSizeHint:"Adjust interface and message text size",vibrancy:"Frosted sidebar",vibrancyHint:"Use the native macOS frosted-glass material behind the sidebar — turn it off if the translucency is hard to read",languageHint:"Choose the interface language",defaultOpenInApp:"Default open-in app",defaultOpenInAppHint:"App used when opening files and folders from the header menu",openWith:"Open with",agentDefaults:"Agent defaults",saving:"Saving",defaultModel:"Default model",defaultModelHint:"New sessions prefer this model",noDefaultModel:"No default model",defaultPermission:"Default permission",defaultPermissionHint:"Only affects newly-created sessions",defaultThinking:"Thinking by default",defaultThinkingHint:"Whether new sessions start with thinking enabled",defaultPlanMode:"Plan mode by default",defaultPlanModeHint:"Whether new sessions start in plan mode",secondaryModelSection:"Subagents",secondaryModel:"Subagent model",secondaryModelHint:"Model and thinking effort that subagents use by default",secondaryModelEffort:"Thinking effort",noSecondaryModel:"Not set (inherit primary)",secondaryModelEffortAuto:"Model default",telemetry:"Improve product with usage data",telemetryHint:"When on, we collect anonymous interaction data (such as clicks, interruptions, and feature usage) to improve the product experience. You can turn it off at any time.",telemetryRestartHint:"Takes effect after restarting the service.",credentialReady:"Credential configured",credentialMissing:"Missing credential",configUnavailable:"The server did not return config yet. These settings are unavailable.",versionAndUpdates:"Version & updates",appVersion:"App version",appVersionHint:"The running app’s version and build time",checkUpdate:"Check for updates",checkUpdateHint:"Manually check whether a new version is available",checkUpdateBtn:"Check now",updateChecking:"Checking…",updateCheckLatest:"You’re on the latest version",updateCheckAvailable:"Version {version} is available — download it from the update entry in the sidebar",updateCheckUnsupported:"This build does not support update checks",updateCheckFailed:"Check failed. Please try again later.",updateCheckAvailableAuto:"Version {version} found — downloading in the background",updateCheckDownloaded:"Version {version} is ready — restart from the update entry in the sidebar",autoDownloadUpdate:"Auto-download updates",autoDownloadUpdateHint:"Download new versions in the background and install them on the next restart",privacy:"Data & privacy",diagnostics:"Diagnostics",build:"Build",serverVersion:"Server version",serverAddress:"Server address",serverAddressHint:"The address of the connected server",serverVersionHint:"The version of the connected service",exportLog:"Troubleshooting log",exportLogHint:"Export the troubleshooting log collected by the app",logHint:"Enable with ?debug=1 to capture",exportLogBtn:"Export log",archivedTitle:"Archived sessions",archivedDesc:"Browse archived sessions, see their workspace path, name, and archive time, and restore them to the session list.",archivedSearch:"Search archived sessions",archivedAllWorkspaces:"All workspaces",archivedSortLabel:"Sort by",archivedSortArchived:"Archive time",archivedSortCreated:"Created time",archivedSortName:"Name",archivedRestore:"Restore",archivedEmpty:"No archived sessions yet",archivedNoMatch:"No matching archived sessions",archivedSessionsCount:"{count} sessions",archivedAt:"Archived {time}",archivedLoadMore:"Load more",archivedLoading:"Loading…",archivedLoadingAll:"Loading all archived sessions…"},eZ={openInEditor:"Open in editor",openInEditorShort:"Open",openInApp:"Open in {app}",chooseOpenApp:"Choose application",copyAll:"Copy all as Markdown",copyFinalSummary:"Copy final summary",copied:"Copied",lastUsed:"Last used",copyPath:"Copy path",changed:"{n} changed",gitTooltip:"Open Files > Changed",detached:"detached",openPr:"Open pull request",prStatusOpen:"open",prStatusClosed:"closed",prStatusMerged:"merged",prStatusDraft:"draft",prStatusUnknown:"unknown",options:"Options",copySessionId:"Copy session ID",renameSession:"Rename",forkSession:"Fork session",archiveSession:"Archive",markSessionDone:"Mark as done",sessionDone:"Done",reopenSession:"Mark as open",exportSession:"Export session",devBadge:"Running in development mode"},tZ={title:"Side chat",subtitle:"forked from this session",empty:"Ask a quick question on the side — it shares this session’s context.",placeholder:"Ask the side chat…",send:"Send"},nZ={actions:{summonApp:{label:"Show App Window",desc:"Bring the app window to the foreground from anywhere"},newSession:{label:"New Session",desc:"Start a new session in the current workspace"},searchSessions:{label:"Search Chats",desc:"Open the session search dialog"},archiveSession:{label:"Complete Chat",desc:"Mark the current chat as done right away (find it under Done)"},toggleSideChat:{label:"Toggle Side Chat",desc:"Open or close the /btw side chat"},toggleSidebar:{label:"Toggle Sidebar",desc:"Collapse or expand the session sidebar"},openFolder:{label:"Open Folder",desc:"Add a workspace folder with the native picker"},openInDefaultApp:{label:"Open in App",desc:"Open the workspace in your default editor/terminal"},openSettings:{label:"Open Settings",desc:"Show or hide the settings dialog"},toggleTerminal:{label:"Toggle Terminal",desc:"Show or hide the bottom terminal panel"},sidebarTabOpen:{label:"Open Tab",desc:"Switch to the Open list in the sidebar"},sidebarTabDone:{label:"Done Tab",desc:"Switch to the Done list in the sidebar"},sidebarTabWorkspaces:{label:"Workspaces Tab",desc:"Switch to the workspace directory in the sidebar"},selectPrevSibling:{label:"Previous Item",desc:"Select the previous chat / workspace in the current tab"},selectNextSibling:{label:"Next Item",desc:"Select the next chat / workspace in the current tab"},send:{label:"Send Message",desc:"Send the composer input"},newline:{label:"Newline",desc:"Insert a newline in the composer"}},searchPlaceholder:"Search shortcuts",unassigned:"Unassigned",unassign:"Unassign shortcut",edit:"Edit shortcut",reset:"Reset to default",resetAll:"Reset all to defaults",recording:"Press the new shortcut…",invalid:"This key combination can’t be used as a shortcut",notGlobal:"This key combination can’t be registered as a system-wide shortcut",globalTaken:"This shortcut is already taken by the system or another app",reserved:"Reserved by the system menu",reservedSteer:"Reserved for steer (Ctrl/Cmd+S)",reservedFind:"Reserved for transcript find (Ctrl/Cmd+F)",conflict:"Already used by “{action}”",customBadge:"Custom"},iZ={panelAria:"Terminal",toolbarAria:"Terminal tabs",resizeAria:"Resize terminal panel height",toggle:"Toggle terminal",open:"Open terminal",close:"Close terminal",newTab:"New terminal",closeTab:"Close terminal",restartTab:"Restart terminal",collapse:"Collapse terminal panel",empty:"No terminal yet — click to start one",processExited:"[process exited]",processExitedWithCode:"[process exited with code {code}]"},sZ={common:_V,app:IV,sidebar:MV,admin:EV,workspace:TV,conversation:LV,status:NV,composer:FV,login:DV,providers:$V,model:BV,sessions:zV,approval:RV,question:OV,tasks:PV,thinking:jV,diff:HV,fileTree:WV,filePreview:qV,mention:UV,warnings:KV,commands:VV,tools:ZV,layout:GV,mobile:QV,theme:YV,onboarding:JV,settings:XV,header:eZ,sideChat:tZ,shortcuts:nZ,terminal:iZ},oZ={preview:"预览",confirm:"确认",cancel:"取消",close:"关闭",dismiss:"关闭",loading:"加载中",copy:"复制"},rZ={authBannerMessage:"未登录 · 需要登录 Kimi Code 才能开始对话",authBannerLogin:"登录",connecting:"连接中…",internalBuildBanner:"仅供内部测试",menuFile:"文件",menuEdit:"编辑",menuView:"视图",menuHelp:"帮助",applicationMenu:"应用菜单"},lZ={workspaceMeta:"workspace · {branch}",sessionsHeader:"会话",viewSwitcher:"列表管理",viewGroup:"视图",viewFlat:"平铺列表",viewGrouped:"按工作区分组",sortGroup:"排序",sortManual:"手动排序",sortRecent:"按最近活动",sessionAdmin:"会话管理",collapseAll:"折叠全部工作区",expandAll:"展开全部工作区",newSession:"新建会话",newChat:"新建会话",newWorkspace:"新建工作空间",dropToAddWorkspace:"松开鼠标添加工作区",emptyState:"还没有会话 · 点击 新建会话 开始",options:"选项",rename:"重命名",genTitle:"生成标题",genTitleUnavailable:"无法生成标题:需要登录 Kimi Code 托管账号,且会话中已有消息",setEmoji:"设置 Emoji…",sessionEmojiTitle:"选择 Emoji",removeEmoji:"移除 Emoji",randomEmoji:"随机",searchEmoji:"搜索 Emoji",recentEmojis:"最近使用",noEmojiResults:"没有匹配的 Emoji",emojiGroupFaces:"笑脸与人物",emojiGroupNature:"动物与自然",emojiGroupFood:"美食饮品",emojiGroupActivity:"活动与出行",emojiGroupObjects:"物品与工作",emojiGroupSymbols:"符号与状态",copyPath:"复制路径",copySessionId:"复制 Session ID",copied:"已复制 ✓",copyFailed:"复制失败",archive:"归档",archiveToastUndo:"撤销",archiveToastMid:"或到",archiveToastSettings:"设置",archiveToastTail:"查看已归档的会话",tabOpen:"进行中",tabDone:"已完成",tabWorkspaces:"工作空间",tagOpen:"Open",tagDone:"Done",complete:"完成",markDone:"标记为完成",reopen:"恢复进行中",noDoneSessions:"还没有已完成的会话",noOpenSessions:"还没有进行中的会话",completeToastLead:"已完成",reopenToastLead:"已恢复进行中",fork:"分叉会话",export:"导出会话",pin:"置顶",unpin:"取消置顶",pinned:"置顶",collapsePinned:"折叠置顶区",expandPinned:"展开置顶区",delete:"删除",removeWorkspace:"移除工作区",brand:"Kimi Code",signedIn:"已登录",signOut:"退出登录",notSignedIn:"未登录",signIn:"登录",defaultUserName:"Kimi 用户",upgrade:"升级",upgradeMembership:"会员升级",logoutConfirmTitle:"退出登录",logoutConfirmMessage:"确定要退出当前账号吗?",language:"语言",backendTitle:"后端 {backend} · {endpoint} — 点击切换",noSessions:"暂无对话",allPinned:"有 {count} 条对话被置顶",showMore:"展开更多",loadMore:"加载更多",showLess:"收起",loadingMore:"加载中…",collapseSidebar:"收起侧边栏",expandSidebar:"展开侧边栏",searchPlaceholder:"搜索会话或工作区",search:"搜索",searchHint:"↑↓ 选择 · ↵ 打开 · Esc 关闭",searchHintSelect:"选择",searchHintOpen:"打开",searchHintClose:"关闭",searchClear:"清除搜索",searchNoResults:"没有匹配的会话或工作区",searchEmpty:"暂无会话",update:"更新",updateAvailable:"发现新版本 v{version}",updateDownloadingButton:"下载中({percent}%)",updateReady:"v{version} 已就绪",updateDone:"重启并更新",updateFailed:"下载失败",updateRetry:"重试",updateDownloadNow:"下载并更新",updateSkip:"本次跳过",updateRestartNow:"立即重启",updateRestartLater:"下次启动",updateReleaseDate:"发布于 {date}",updateCurrentVersion:"当前版本 v{version}",updateWhatsNew:"更新内容",updateBackground:"后台下载",updateAutoDownload:"以后自动下载并安装更新"},aZ={title:"会话管理",subtitle:"管理所有会话,把任务完成的会话标记完成。旧会话按更新时间筛选,即可批量清理。",back:"返回",filterWorkspace:"工作空间",filterStatus:"状态",filterTime:"更新时间",allWorkspaces:"全部工作空间",selectAll:"全选",searchWorkspace:"搜索工作空间",noWorkspaceMatch:"没有匹配的工作空间",removeTag:"移除 {name}",statusAll:"全部状态",statusOpen:"进行中",statusDone:"已完成",timeAll:"全部时间",timeDaysAgo:"{n} 天以前",query:"查询",reset:"重置",colStatus:"状态",colTitle:"会话名",colWorkspace:"工作空间",colPrompt:"最后一条 prompt",colUpdated:"最后更新",colCompleted:"完成时间",colActions:"操作",empty:"没有符合当前筛选条件的会话",loading:"加载中…",total:"共 {n} 条",pageSize:"{n} 条/页",prevPage:"上一页",nextPage:"下一页",selectPageAll:"全选本页",batchSelected:"已选 {n} 项",selectAllMatching:"选中当前条件下的全部 {total} 项",materializingAll:"正在选中…",allMatchingSelected:"已选中全部 {n} 项",clearSelection:"清除选择",markDone:"标记完成",reopen:"恢复进行中",markDoneCount:"标记完成({n})",reopenCount:"恢复进行中({n})",batchDoneToast:"已标记完成 {n} 个会话",batchReopenedToast:"已将 {n} 个会话恢复为进行中",batchFailedSuffix:",{n} 个失败",batchDoneFailedNotice:"{n} 个会话未能标记完成",batchReopenFailedNotice:"{n} 个会话未能恢复为进行中",undo:"撤销",open:"打开会话",rename:"重命名…",fork:"Fork",export:"导出",moreActions:"更多操作"},uZ={switcherTitle:"切换工作区",switchTooltip:"切换工作区",eyebrow:"工作区",branchLabel:"分支: {branch}",noBranch:"无分支",sessionCount:"{count} 个会话",allWorkspaces:"全部工作区",currentWorkspace:"仅当前工作区",addWorkspace:"添加工作区…",noWorkspace:"暂无工作区",deleteHasSessions:"工作区内还有会话,请先归档这些会话再删除",removeWorkspaceConfirm:"移除工作区「{name}」?",swarmEnableTitle:"启用 swarm 模式?",swarmEnableConfirm:"Agent 将并行运行多个子 agent。",goalStartTitle:"启动 goal?",goalStartConfirm:"「{objective}」——Agent 将自主执行。",scopeCurrent:"当前工作区",scopeAll:"全部工作区",newInGroup:"在此工作区新建会话",addTitle:"添加工作区",pathLabel:"路径",pathPlaceholder:"/项目的绝对路径",recentLabel:"最近的文件夹",add:"添加",cancel:"取消",addHint:"粘贴一个绝对路径,或从最近用过的文件夹中选择。",addFailed:"无法打开此文件夹,请检查路径后重试。",requiredTitle:"请先选择工作空间",requiredMessage:"发送消息前,需要先选择一个文件夹作为工作区。",openThisFolder:"打开此文件夹",up:"上一级",browsing:"加载中…",filterPlaceholder:"过滤子文件夹…",searchPlaceholder:"在此目录下模糊搜索…",searching:"搜索中…",pasteToggle:"直接输入绝对路径",noFilterMatch:"没有匹配「{q}」的子文件夹",noSubfolders:"此处没有子文件夹",browseHint:'点击文件夹进入,再点"打开此文件夹"将其添加为工作区。',attentionTitle:"{count} 项待处理",awaitingAnswer:"待回答",awaitingAnswerTitle:"有提问等待你回答",awaitingPermission:"待授权",awaitingPermissionTitle:"有操作等待你授权",aborted:"失败",abortedTitle:"此会话的上一轮对话因错误中断"},cZ={jumpToLatestAria:"跳到最新消息",toc:"对话目录",newMessages:"最新消息",loading:"加载中…",starting:"正在创建对话…",requesting:"请求中…",working:"工作中…",workingRetry:"模型请求失败,正在重试(第 {n}/{max} 次)…",emptyWorkspaceHint:"在 {name} 中发送",switchWorkspace:"切换工作区",recentSessions:"最近会话",viewMoreSessions:"查看更多",sessionAdminTooltip:"在会话管理页面查看并管理更多会话",addWorkspace:"添加工作区",moreWorkspaces:"更多工作区 ({count})",pickFolder:"选择文件夹…",compacting:"正在压缩上下文…",compactedPlain:"上下文已压缩",compactedAuto:"已自动压缩上下文",compactedTokens:"({before} → {after} tokens)",viewSummary:"查看摘要",summaryTitle:"压缩摘要",activatedSkill:"已激活技能: {name}",undo:"撤销",undoTooltip:"撤回编辑",undoConfirm:"撤销上一条消息?",escUndoHintPre:"再按",escUndoHintPost:"撤销本条",undone:"已撤销,原文已放回输入框",turnInterrupted:"已手动终止",turnFailed:"模型请求失败,本轮对话已中断",turnFailedMaxSteps:"达到本轮步数上限,对话已中断",turnFailedResume:"继续",turnFailedResumeText:"继续",yesterday:"昨天",loadOlder:"加载更早的消息",loadingOlder:"正在加载更早的消息…",widenTable:"加宽表格",restoreTableWidth:"恢复默认宽度",cron:{fired:"定时任务已触发",missed:"错过的定时提醒",job:"任务 {id}",oneShot:"单次",coalesced:"已合并 {n} 次触发",missedCount:"错过 {n} 次",finalDelivery:"最后一次投递",expand:"展开",collapse:"收起"},fold:{worked:"已工作 {duration}",workedUnknown:"工作过程"},turnFiles:{titleOne:"{number} 个文件已修改",titleOther:"{number} 个文件已修改",more:"还有 {number} 个文件",moreOne:"还有 1 个文件",showLess:"收起",diffTitle:"本次改动",diffUnavailable:"此文件的改动无法逐项展示",openFile:"打开文件"},goal:{continuation:"目标续跑"},notification:{kindTask:"后台任务",kindSubagent:"子代理",title:{completed:"{kind}完成",failed:"{kind}失败",timed_out:"{kind}超时",killed:"{kind}被终止",lost:"{kind}丢失",info:"{kind}通知"},status:{completed:"完成",failed:"失败",timed_out:"超时",killed:"已终止",lost:"丢失",info:"信息"},groupTitle:"{n} 条通知",copyPath:"复制路径",copied:"已复制",rawPayload:"原始 payload",fields:{type:"类型",source:"来源",severity:"严重度"}},userMessage:{expand:"展开",collapse:"收起"},search:{placeholder:"搜索对话…",searching:"搜索中…",results:"{current}/{total} 条结果",resultsCapped:"{current}/{total}+ 条结果",noResults:"无结果",previous:"上一个匹配",next:"下一个匹配",close:"关闭搜索"}},dZ={connectionConnected:"已连接",connectionConnecting:"连接中…",connectionDisconnected:"未连接",ctxTooltip:"使用 {used} / {max} tokens ({pct}%)",modelLabel:"模型",permissionManual:"逐条确认",permissionAuto:"完全自主",permissionYolo:"自动通过",permissionManualDesc:"每个工具操作都需要你手动确认",permissionAutoDesc:"完全自主运行,智能体自己做决定,不再询问",permissionYoloDesc:"自动批准工具操作,但遇到关键问题仍会询问",planLabel:"计划",planOn:"开",planOff:"关",planTooltip:"切换计划模式(先调研再修改)",workModeDismiss:"退出模式",goalLabel:"目标",timeUnitHour:"小时",timeUnitMinute:"分",timeUnitSecond:"秒",planEmptyArmed:"计划模式已开启,智能体写出计划后会显示在这里",planEmptyIdle:"还没有计划——开启计划模式后,智能体写出的计划会显示在这里",swarmLabel:"Swarm",swarmDismiss:"关闭 Swarm",modeOff:"未启用",goalPlaceholder:"让智能体完成什么目标?",planPlaceholder:"让智能体先规划什么?",goalStart:"开始",goalPause:"暂停",goalResume:"继续",goalCancel:"取消",goalCancelConfirm:"是否需要取消当前目标?取消后将无法恢复。",goalCancelConfirmYes:"是",goalCancelConfirmNo:"否",goalDoneWhen:"完成条件",goalStatusActive:"进行中",goalStatusPaused:"已暂停",goalStatusBlocked:"已阻塞",goalStatusComplete:"已完成",modeNotSupported:"暂不支持",thinkingLabel:"思考",thinkingTooltip:"切换思考模式",thinkingOn:"开",thinkingOff:"关",cacheNote:"提示:切换模型或思考程度会使已有的提示词缓存失效。建议新建会话,避免额外的 token 消耗。",starredModels:"收藏",moreModels:"更多模型…",statusPanelTitle:"会话状态",statusPanelClose:"关闭",statusModel:"模型",statusThinking:"思考强度",statusPermission:"权限",statusPlanMode:"计划模式",statusSwarmMode:"Swarm 模式",swarmOn:"开",swarmOff:"关",statusContext:"上下文",statusCost:"花费",statusContextValue:"{used} / {max} ({pct}%)",statusNone:"—",activityRunning:"运行中…",activityAwaitingApproval:"等待批准",activityAwaitingQuestion:"等待回答",interrupt:"中断",runningShort:"进行中"},fZ={placeholder:"输入消息…",send:"发送 ↵",queueLabel:"队列",placeholderRunning:"输入会加入队列 · Ctrl+S 立即插入运行中的回合",starting:"正在发送…",queueAutoDrain:"当前回合结束后自动逐条发送",queueNext:"下一条",queueDragTitle:"拖拽排序",editQueued:"编辑(载入到输入框)",queuedAttachments:"附件 ×{n}",queuedHasImage:"包含 {n} 张图片 — 只能移除,不能编辑",attachmentImage:"图片",attachmentVideo:"视频",attachmentFile:"文件",attachmentOpenUnsupported:"无法打开 {name}:暂不支持此文件类型",dropToAttach:"松开鼠标添加附件",remove:"移除",removeNamed:"移除 {name}",clearAll:"清空全部附件",attachmentCount:"共 {n} 个附件",uploading:"上传中",uploadFailed:"上传失败",attachFile:"添加附件",addMenu:"添加",addFiles:"文件",addGoalDesc:"设定目标并持续推进",addPlanDesc:"启用计划模式",addSwarmDesc:"启用 swarm 模式",noCommands:"无匹配命令",previewAttachment:"预览 {name}",interrupt:"中断",interruptTitle:"中断当前操作",expandTitle:"展开输入框进行多行编辑",collapseTitle:"收起输入框",emptyConversationTitle:"Kimi Code",emptyConversation:"还没有消息 —— 在下方输入开始对话",upgradeBanner:"升级你的 Kimi 账户来使用 Kimi Code",quickStartPlaceholder:"输入消息开始新对话…",thinkingSuffix:" · 思考",thinkingSuffixEffort:" · {level}"},hZ={title:"登录 Kimi Code",close:"关闭 (Esc)",starting:"正在启动登录流程…",lead:"点击下方按钮,在新标签页中完成登录。",authorizeInBrowser:"在浏览器中登录",orDivider:"或者",fallbackPrefix:"换个设备?在浏览器打开 ",fallbackSuffix:" 输入设备码:",copy:"复制",copied:"已复制",copyLink:"复制链接",waitingAuth:"等待登录",waitingAutoClose:"等待登录,完成后自动关闭…",success:"已登录",successHint:"正在加载,稍后自动关闭…",expiredTitle:"设备码已过期",expiredHint:"请重新开始登录流程",retry:"重试",closeBtn:"关闭",errorTitle:"当前版本暂不支持登录",errorHint:"请升级 kimi-code 后重试",pollErrorTitle:"连接已断开",pollErrorHint:"登录轮询连续失败,请检查 kimi-code 进程后重试",action:"登录",requiredTitle:"请先登录",requiredMessage:"登录 Kimi 账号并配置模型后,才能开始对话。",goToLogin:"去登录",upgradeRequiredTitle:"请升级会员",upgradeRequiredMessage:"当前为免费账户,升级会员后即可使用 Kimi 模型开始对话。",rcSubtitle:"远程控制会话",rcChecking:"正在检查登录状态…",rcLead:"此远程控制会话需要授权。使用 Kimi 账号登录后即可继续。",rcAuthorize:"打开授权页",rcUserCodeLabel:"授权码",rcSuccessHint:"正在跳转…",rcExpiredTitle:"授权已过期或被取消",rcStartErrorTitle:"无法开始登录",rcConnectionErrorHint:"请检查网络连接后重试。",rcSuccessNoRedirect:"现在可以关闭本页了。"},pZ={title:"供应商管理",loading:"加载提供商中…",unavailable:"暂不支持提供商管理",empty:"暂无提供商",status:{connected:"已连接",error:"错误",unconfigured:"未配置"},keySet:"key 已设置",keyNotSet:"未设置 key",managedBadge:"OAuth",modelCount:"{count} 个模型",confirmDelete:"确认删除?",refresh:"刷新",delete:"删除",refreshTitle:"刷新 {type}",deleteTitle:"删除 {type}",loginKimi:"登录 Kimi",loginAnthropic:"登录 Anthropic",addProvider:"添加供应商",added:"已添加",enterApiKey:"填写 API Key",optional:"可选",apiKeyRequired:"API Key 不能为空",fieldId:"名称",fieldType:"API 协议",types:{kimi:"Kimi",openai:"OpenAI",openai_responses:"OpenAI Responses",anthropic:"Anthropic","google-genai":"Google GenAI",vertexai:"Vertex AI"},fieldApiKey:"API Key",apiKeyManaged:"OAuth 托管登录",apiKeySet:"已设置,输入以更换",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",fieldBaseUrl:"Base URL",baseUrlPlaceholder:"https://api.example.com/v1",fieldModels:"模型",colModelId:"模型 ID",colContext:"上下文",colDisplayName:"显示名",modelIdPlaceholder:"kimi-k3",modelContextPlaceholder:"1048576",modelNamePlaceholder:"可选",noModels:"暂无模型",addModel:"添加模型",removeModel:"移除模型",fieldDefaultModel:"默认模型",save:"保存",saved:"已保存",deleteProvider:"删除供应商",deleteConfirm:"确认删除 {id} 及其 {count} 个模型?",deleteConfirmYes:"确认删除",managedHint:"托管供应商在账户页登录 / 登出",unsavedGuard:"有未保存的修改。",guardStay:"继续编辑",guardDiscard:"丢弃",add:"添加",catalog:{sourceCatalog:"从目录添加",sourceManual:"手动添加",sourceRegistry:"注册表",registryHint:"从 api.json 注册表导入供应商与模型;同一 URL 重复导入即为刷新",registryUrlLabel:"注册表 URL",registryImported:"已导入 {count} 个供应商",searchPlaceholder:"搜索供应商",loading:"加载目录中…",loadError:"目录加载失败,请检查网络后重试",retry:"重试",empty:"没有匹配的供应商",rejected:"不可导入",rejectReason:{"unknown-explicit-type":"协议不受支持","proprietary-sdk":"私有协议,无法导入","empty-base-url":"Base URL 为空","placeholder-base-url":"端点包含环境变量占位符"},backToList:"返回目录列表",willImport:"将从目录导入 {count} 个模型",overwriteWarning:"已存在同名供应商,导入将覆盖其配置与模型",importAction:"导入"},error:{idRequired:"名称不能为空",idInvalid:'名称需以字母或数字开头,只能包含字母、数字、"-"、"_" 和空格',apiKeyRequired:"API Key 不能为空",baseUrlRequired:"Base URL 不能为空",registryUrlRequired:"注册表 URL 不能为空",modelRequired:"模型 ID 不能为空",contextSizeRequired:"上下文长度不能为空",contextSizeInvalid:"上下文长度需为正整数"},hintClose:"关闭"},gZ={dialogLabel:"切换模型",title:"切换模型",close:"关闭 (Esc)",allTab:"全部",providerTabs:"模型提供商",searchPlaceholder:"搜索模型或提供商…",clearSearch:"清除搜索",loading:"加载模型中…",unavailable:"暂无可用模型列表",contextSuffix:"{size} ctx",capabilityImageInput:"图片输入",capabilityVideoInput:"视频输入",capabilityToolUse:"工具调用",capabilityThinking:"思考",capabilityAlwaysThinking:"始终思考",emptyNoModels:"暂无可用模型",emptyNoMatch:"无匹配模型",starTitle:"添加到收藏",unstarTitle:"取消收藏",hintNavigate:"导航",hintSelect:"选择",hintClose:"关闭"},mZ={justNow:"刚刚"},vZ={title:{shell:"运行命令?",diff:"应用修改?",file:"写入文件?",fileop:"文件操作?",url:"抓取 URL?",search:"搜索?",invocation:"调用?",todo:"更新 todo?",plan_review:"按这份 plan 开始实现?",generic:"批准操作?"},subagentBadge:"子 agent · {name}",danger:"危险: {detail}",searchQueryLabel:"查询",searchScope:"范围:{scope}",feedbackPlaceholder:"说明拒绝原因… (Enter 提交, Shift+Enter 换行, Esc 取消)",feedbackHint:"Enter 提交 · Shift+Enter 换行 · Esc 取消",approve:"批准",approveSession:"本会话内批准",reject:"拒绝",feedback:"反馈",feedbackSubmit:"提交并拒绝",feedbackCancel:"取消",approvePlan:"批准 plan",revise:"修改",rejectAndExit:"拒绝并退出",expandPlan:"放大",collapsePlan:"还原"},yZ={back:"‹ 上一题",nextQuestion:"下一题 ›",otherDefault:"其他…",submit:"提交",dismiss:"放弃",minimize:"最小化",expand:"展开",hint:"↑↓ 选择 · Enter 确认"},kZ={tag:"任务",summary:"{run} 运行中 · {done} 完成",copy:"复制",calling:"调用 {label}",fieldTask:"任务",fieldOutput:"输出",fieldProgress:"进度",fieldResult:"结果",moreLines:"…(还有 {count} 行)",copied:"已复制",stop:"stop",defaultDescription:"后台任务",dockTasks:"后台任务",dockBash:"后台 Bash",dockSubagent:"后台 Agent",dockTodos:"待办",todoProgressTitle:"当前进度",stateDone:"完成",stateFail:"失败",stateCancelled:"已取消",filterRecent:"最近",filterRunning:"进行中",filterDone:"已完成",filterAll:"全部",running:"运行中",closePanel:"关闭面板",openPanel:"在侧边栏打开",timingRunning:"运行中 · {time}",timingDone:"完成 · {time}",emptyTasks:"暂无后台任务",emptyRecent:"暂无最近任务",emptyRunning:"暂无运行中的任务",emptyDone:"暂无已完成的任务",emptyBash:"暂无后台 Bash 任务",emptySubagent:"暂无后台 Agent 任务",emptyTodo:"暂无待办事项",openTab:"查看全部后台任务",openDetail:"查看",collapse:"折叠",expand:"展开",transcriptLoadError:"无法加载这个子 Agent 的对话。",copyCommand:"复制命令",copyOutput:"复制输出",copyAll:"复制全部"},bZ={panelTitle:"思考过程",streaming:"思考中…",close:"关闭"},AZ={title:"改动",branch:"分支",aheadTitle:"领先远程",behindTitle:"落后远程",fileCountOne:"{number} 个文件",fileCountOther:"{number} 个文件",empty:"无 git 改动",clean:"工作区干净,无改动",back:"返回",loading:"正在加载 diff…",noDiff:"该文件没有行级改动",emptyFile:"空文件",list:"列表",tree:"树形",close:"关闭"},CZ={},wZ={empty:"选择左侧文件预览",loading:"加载中…",lineCount:"{count} 行",copy:"复制",copied:"已复制",copyPath:"复制路径",openInEditor:"打开",reveal:"显示",download:"下载",close:"关闭",search:"搜索",prevMatch:"上一个匹配",nextMatch:"下一个匹配",htmlMode:"HTML 预览模式",markdownMode:"Markdown 预览模式",preview:"预览",source:"源码",imageFit:"图片缩放",fit:"适应",actual:"原始",pdfNoPreview:"无法内嵌预览此 PDF,可以下载后查看",imageNoPreview:"图片文件 · {mime} · {size} · 暂不预览",binaryNoPreview:"二进制文件 · {mime} · {size} 字节 · 暂不预览",unknownType:"未知类型",copyCode:"复制代码",enlargeImage:"放大图片",errors:{emptyPath:"文件路径为空",unsupportedPath:"不支持预览 URL 或远程路径",outsideWorkspace:"只能预览当前 workspace 内的文件",isDirectory:"请选择具体文件,而不是目录",notFound:"文件不存在或已被移动",tooLarge:"文件过大,暂不支持预览",loadFailed:"无法读取这个文件"}},xZ={searching:"搜索中…",noMatch:"无匹配",files:"文件",skills:"技能",openSkill:"打开技能文件",copyPath:"复制路径"},SZ={dismiss:"关闭",errorLabel:"错误",noteLabel:"提示",agentWarningFallback:"agent 警告",unhandledEvent:"未处理的事件:{type}",agentError:{title:"模型请求失败",connection:"无法连接模型服务",auth:"模型认证失败",rateLimit:"模型请求被限流",overloaded:"模型服务过载",filtered:"响应被提供方过滤",api:"模型接口返回错误",contextOverflow:"上下文超出模型限制"},details:{cause:"底层原因",code:"错误码",connection:"连接状态",contentType:"响应类型",details:"服务端详情",duration:"耗时",endpoint:"请求地址",errorName:"错误类型",message:"错误信息",operation:"操作",phase:"失败阶段",request:"请求",requestId:"Request ID",responsePreview:"响应预览",sessionId:"Session ID",stack:"堆栈",status:"HTTP 状态",timeout:"超时设置",timestamp:"时间"},daemonApiTitle:"Kimi 服务器返回错误",daemonNetworkMessage:"Web 没有拿到 Kimi 服务器的响应。请确认它仍在运行,或刷新页面重试。",daemonNetworkTitle:"无法连接到 Kimi 服务器",daemonTimeoutMessage:"Kimi 服务器在等待时限内没有响应。操作可能仍在后台执行,请稍后刷新确认结果,或重试。",daemonTimeoutTitle:"Kimi 服务器响应超时",diagnostics:"诊断信息",hideDetails:"收起详情",operationFailedMessage:"刚才的操作没有完成,请稍后重试。",operationFailedTitle:"操作失败",sessionSnapshotMessage:"Web 没能加载当前会话内容。请确认 Kimi 服务器仍在运行,或刷新页面重试。",sessionSnapshotTitle:"无法加载当前会话内容",showDetails:"查看详情",copyDetails:"复制诊断信息",copied:"已复制",wsTitle:"实时连接出错",goal:{alreadyExists:"当前会话已有一个进行中的目标,请先取消它再创建新目标。",notFound:"没有找到可操作的目标,可能它已经结束或被取消。",statusInvalid:"当前目标状态不支持这个操作。",notResumable:"这个目标无法恢复(可能已取消或已完成)。",objectiveTooLong:"目标描述太长了,请精简后重试。"}},_Z={new:{desc:"创建新会话"},clear:{desc:"清空并新建会话"},login:{desc:"在浏览器中登录 Kimi"},plan:{desc:"切换计划模式 开/关"},swarm:{desc:"切换 swarm 模式;/swarm <任务> 直接在 swarm 下执行"},goal:{desc:"创建/控制目标:/goal <目标>、/goal pause{'|'}resume{'|'}cancel"},btw:{desc:"侧边聊天:/btw <问题> 向 fork 的侧边会话提问"},yolo:{desc:"自动批准工具操作,Agent 仍可能提问"},auto:{desc:"完全自主,Agent 不再提问"},thinking:{desc:"设置思考强度"},compact:{desc:"压缩会话历史"},fork:{desc:"把当前会话 fork 出一个新会话"},export:{desc:"将当前会话和排障日志下载为 ZIP 压缩包",noSession:"请先打开一个会话再导出。",started:"正在导出会话…",done:"会话导出完成。",tooLarge:"会话数据超过导出大小限制,可在终端用 CLI 导出:kimi export {sessionId} -o session.zip"},status:{desc:"查看会话状态"},undo:{desc:"撤销上一条消息"}},IZ={label:{read:"读取",bash:"运行",edit:"编辑",write:"写入",grep:"搜索",glob:"查找",ls:"列目录",web_fetch:"抓取",search:"搜索",todo:"待办",task:"任务",swarm:"Swarm",ask_user:"提问",plan:"计划",goal_create:"启动目标",goal_get:"读取目标",goal_budget:"设置目标预算",goal_update:"更新目标"},swarm:{progress:"{done} / {total}",runningSub:"{count} 个进行中",doneSub:"完成 {completed} · 失败 {failed}",doneSubWithCancelled:"完成 {completed} · 失败 {failed} · 已取消 {cancelled}",phaseQueued:"排队",phaseWorking:"运行中",phaseSuspended:"暂停",phaseCompleted:"完成",phaseFailed:"失败",phaseCancelled:"已取消",waiting:"等待子任务加入…"},chip:{lines:"{count} 行",results:"{count} 结果",files:"{count} 个文件",edited:"已编辑",created:"已创建",todos:"{count} 项"},disclosure:{expand:"展开详情",collapse:"收起详情"},output:{waiting:"等待输出…",empty:"(无输出)",saved:"已保存的结果"},plan:{review:{pending:"待确认",approved:"已通过",rejected:"已拒绝",cancelled:"已取消"},selectedOption:"已选择",pathOnlyHint:"该计划未保存内联内容,可在侧边栏打开:",feedback:"反馈"},summary:{inScope:"{value} 在 {scope} 中"},goal:{objectiveWithCriterion:"{objective} · {criterion}",status:"状态:{status}",budget:"{value} {unit}",turns:"{value} 轮",tokens:"{value} token",milliseconds:"{value} 毫秒",seconds:"{value} 秒",minutes:"{value} 分钟",hours:"{value} 小时"},group:{countOther:"执行了 {count} 次工具调用",typed:{read:{done:"读取了 {count} 个文件"},bash:{done:"运行了 {count} 条命令"},grep:{done:"搜索了 {count} 个模式"},search:{done:"网络搜索了 {count} 次"},glob:{done:"找了 {count} 次文件"},ls:{done:"列出了 {count} 个目录"},web_fetch:{done:"抓取了 {count} 个页面"},edit:{done:"编辑了 {count} 处"},write:{done:"写入了 {count} 个文件"}}},activity:{failedClause:"({count} 失败)",liveDonePrefix:"已",busy:"正在执行…",doing:{read:"正在读取 {subject}",bash:"正在运行 {subject}",grep:"正在搜索 {subject}",search:"正在搜索 {subject}",glob:"正在匹配 {subject}",ls:"正在列出 {subject}",web_fetch:"正在抓取 {subject}",edit:"正在编辑 {subject}",write:"正在写入 {subject}"}},ask:{dismissed:"已忽略",answer:"{count} 个回答",answers:"{count} 个回答",answered:"已回答",more:"(还有 {count} 个)",collected:"已收集回答",question:"{count} 个问题",questions:"{count} 个问题",freeInput:"(自由输入)",unanswered:"未作答"}},MZ={resizeHandleAria:"调整侧栏宽度",resizePreviewAria:"调整预览面板宽度",detailPanelAria:"详情面板"},EZ={openSwitcher:"切换会话 / 工作区",openSettings:"会话设置",settingsTitle:"会话设置",groupSession:"当前会话",groupApp:"应用偏好",sheetLabel:"面板",closeSheet:"关闭",tapToCycle:"点击切换",running:"运行中",idle:"空闲",sessionCount:"{n} 个会话",newSession:"新建会话",permManualSub:"每个工具都确认",permAutoSub:"完全自主,不再提问",permYoloSub:"自动批准工具,仍可能提问",planModeSub:"计划模式",goalModeSub:"目标模式",swarmModeSub:"Swarm 模式",archivedSessions:"已归档会话",archivedSessionsSub:"查看并恢复已归档会话",archivedBack:"返回"},TZ={colorSchemeLabel:"外观",light:"月之亮面",dark:"月之暗面",system:"跟随系统"},LZ={continue:"继续",back:"上一步",skip:"跳过",welcome:{title:"欢迎使用 Kimi Code",subtitle:"为专业开发者打造的 AI 编程工作台",languageLabel:"语言",themeLabel:"外观"},login:{title:"选择配置模型",subtitle:"选择驱动 Kimi Code 的模型服务,之后可在「设置」中更改。",kimiTitle:"登录 Kimi 账号",kimiHint:"使用 Kimi 会员权益,开箱即用",recommended:"推荐",customProviderTitle:"添加自定义供应商",customProviderHint:"使用自己的 API Key,接入 OpenAI 兼容等模型服务",loggedInTitle:"已登录 Kimi 账号",loggedInHint:"模型服务已就绪,可以开始使用",finish:"完成",skip:"跳过,稍后再说"}},NZ={title:"设置",internalTest:"内部测试",close:"关闭 (Esc)",tabs:{general:"通用",agent:"Agent",account:"账户",providers:"供应商",advanced:"高级",archived:"已归档",shortcuts:"快捷键",plugins:"插件",lab:"实验室"},lab:{sidebarTabs:"多标签页侧边栏",sidebarTabsHint:"侧边栏显示「进行中 / 已完成 / 工作空间」三个标签页"},plugins:{retry:"重试",builtIn:"内置",official:"官方",thirdParty:"第三方",installed:"已安装",install:"安装",update:"更新",remove:"移除",enabled:"启用",homepage:"主页",empty:"没有找到插件",hasErrors:"错误",customInstall:"安装自定义插件",customInstallPlaceholder:"https://… 或 /本地/目录",customInstallHint:"支持 https zip 链接、GitHub 仓库地址或本地目录路径。",extensionHintTitle:"还差一步:安装浏览器扩展",extensionGuide:"手动安装",dismissHint:"知道了",catalogUnavailable:"插件市场目录暂时不可达;已安装的插件仍可正常管理。",source:{"local-path":"本地","zip-url":"ZIP",github:"GitHub"},counts:{skill:"{n} 个技能",mcp:"{n} 个 MCP 服务",mcpEnabled:"启用 {n} 个",hook:"{n} 个钩子",command:"{n} 个命令"}},appearance:"外观",notifications:"通知",notifyEnabled:"系统通知",notifyEnabledHint:"回合完成、待回答或待审批时发送系统通知",notifySound:"通知提示音",notifySoundHint:"系统通知随附提示音",notifyDenied:"已在浏览器设置中被阻止",notifyTitle:"Kimi Code · 回合完成",notifyQuestionTitle:"Kimi Code · 待回答",notifyApprovalTitle:"Kimi Code · 等待审批",notifyFallback:"点击查看结果",notifyQuestionFallback:"有提问等待你回答",notifyApprovalFallback:"有工具等待你审批",account:"账户",signedIn:"已登录",signedOutHint:"登录后可查看账户和模型权益",planUsage:{title:"套餐用量",retry:"重试",loadFailed:"加载失败",empty:"暂无用量数据",weekLimit:"每周限额",genericLimit:"限额",hourLimit:"{n} 小时限额",dayLimit:"{n} 天限额",minuteLimit:"{n} 分钟限额",resetsIn:"{duration}后重置",resetDone:"已重置",durationDay:"{n} 天",durationHour:"{n} 小时",durationMinute:"{n} 分钟",durationSecond:"{n} 秒",usedPct:"已使用 {pct}%",boosterTitle:"加油包",boosterBalance:"余额",monthlyUsed:"本月已用",monthlyLimit:"每月上限",unlimited:"不限",freeTitle:"免费账户",freeHint:"升级会员后即可使用 Kimi 模型并查看套餐用量"},colorSchemeHint:"选择应用的明暗外观",appIcon:"程序坞图标",appIconHint:"选择程序坞中显示的图标",appIconDefault:"默认",appIconBlack:"黑色",uiFontSize:"字体大小",uiFontSizeHint:"调整界面和消息文字大小",vibrancy:"毛玻璃侧栏",vibrancyHint:"在侧栏使用 macOS 原生毛玻璃材质——如果半透明影响阅读可以关闭",languageHint:"选择界面显示语言",defaultOpenInApp:"默认打开应用",defaultOpenInAppHint:"从顶栏菜单打开文件和文件夹时默认使用的应用",openWith:"打开方式",agentDefaults:"Agent 默认值",saving:"保存中",defaultModel:"默认模型",defaultModelHint:"新会话会优先使用这个模型",noDefaultModel:"未设置默认模型",defaultPermission:"默认权限",defaultPermissionHint:"只影响之后新建的会话",defaultThinking:"默认开启思考",defaultThinkingHint:"新会话默认是否开启思考",defaultPlanMode:"默认计划模式",defaultPlanModeHint:"新会话默认进入计划模式",secondaryModelSection:"子智能体",secondaryModel:"子智能体模型",secondaryModelHint:"子智能体默认使用的模型与思考强度",secondaryModelEffort:"思考强度",noSecondaryModel:"未设置(跟随主模型)",secondaryModelEffortAuto:"模型默认",telemetry:"使用数据改进产品",telemetryHint:"开启后,我们会收集您的匿名交互数据(如点击、打断、功能使用等),用于改进产品体验。您可以随时关闭。",telemetryRestartHint:"更改后需重启服务生效。",credentialReady:"凭据已配置",credentialMissing:"缺少凭据",configUnavailable:"当前服务端没有返回 config,设置项暂不可用。",versionAndUpdates:"版本与更新",appVersion:"应用版本",appVersionHint:"当前应用的版本号和构建时间",checkUpdate:"检查更新",checkUpdateHint:"手动检查是否有新版本",checkUpdateBtn:"立即检查",updateChecking:"检查中…",updateCheckLatest:"已是最新版本",updateCheckAvailable:"发现新版本 {version},可从侧边栏的更新入口下载",updateCheckUnsupported:"当前构建不支持检查更新",updateCheckFailed:"检查失败,请稍后重试",updateCheckAvailableAuto:"发现新版本 {version},正在后台下载",updateCheckDownloaded:"新版本 {version} 已就绪,可从侧边栏的更新入口重启安装",autoDownloadUpdate:"自动下载更新",autoDownloadUpdateHint:"发现新版本时在后台自动下载,重启后完成安装",privacy:"数据与隐私",diagnostics:"诊断",build:"构建",serverVersion:"服务端版本",serverAddress:"服务器地址",serverAddressHint:"当前连接的服务器地址",serverVersionHint:"当前连接服务的版本",exportLog:"故障排查日志",exportLogHint:"导出已采集的故障排查日志",logHint:"加 ?debug=1 开启采集",exportLogBtn:"导出日志",archivedTitle:"已归档会话",archivedDesc:"查看已归档会话,确认其所属工作区路径、会话名称和归档时间,并可恢复到会话列表。",archivedSearch:"搜索已归档会话",archivedAllWorkspaces:"所有工作区",archivedSortLabel:"排序方式",archivedSortArchived:"归档时间",archivedSortCreated:"创建时间",archivedSortName:"按字母顺序",archivedRestore:"恢复",archivedEmpty:"还没有归档的会话",archivedNoMatch:"没有匹配的已归档会话",archivedSessionsCount:"{count} 个会话",archivedAt:"归档于 {time}",archivedLoadMore:"加载更多",archivedLoading:"加载中…",archivedLoadingAll:"正在加载全部归档会话…"},FZ={openInEditor:"在编辑器中打开",openInEditorShort:"打开",openInApp:"用 {app} 打开",chooseOpenApp:"选择应用",copyAll:"复制全部对话为 Markdown",copyFinalSummary:"仅复制最终总结",copied:"已复制",lastUsed:"上次使用",copyPath:"复制路径",changed:"{n} 处改动",gitTooltip:"打开「文件 > 改动」",detached:"游离",openPr:"打开 Pull Request",prStatusOpen:"已打开",prStatusClosed:"已关闭",prStatusMerged:"已合并",prStatusDraft:"草稿",prStatusUnknown:"未知",options:"选项",copySessionId:"复制 Session ID",renameSession:"重命名",forkSession:"分叉会话",archiveSession:"归档",markSessionDone:"标记为完成",sessionDone:"已完成",reopenSession:"恢复进行中",exportSession:"导出会话",devBadge:"开发环境运行中"},DZ={title:"侧边聊天",subtitle:"从当前会话 fork",empty:"在侧边随手问一句 —— 它共享当前会话的上下文。",placeholder:"问问侧边聊天…",send:"发送"},$Z={actions:{summonApp:{label:"显示应用窗口",desc:"从任意位置将应用窗口唤起到前台"},newSession:{label:"新建会话",desc:"在当前工作区开始一个新会话"},searchSessions:{label:"搜索会话",desc:"打开会话搜索弹窗"},archiveSession:{label:"完成任务",desc:"立即完成当前会话(可在已完成列表找回)"},toggleSideChat:{label:"侧边聊天",desc:"打开或关闭 /btw 侧边聊天"},toggleSidebar:{label:"展开/收起侧边栏",desc:"收起或展开会话侧边栏"},openFolder:{label:"打开文件夹",desc:"通过系统原生选择器添加工作目录"},openInDefaultApp:{label:"在默认应用中打开",desc:"在默认编辑器或终端中打开当前工作目录"},openSettings:{label:"打开设置",desc:"显示或隐藏设置窗口"},toggleTerminal:{label:"切换终端",desc:"显示或隐藏底部终端面板"},sidebarTabOpen:{label:"进行中标签页",desc:"切换到侧栏的进行中列表"},sidebarTabDone:{label:"已完成标签页",desc:"切换到侧栏的已完成列表"},sidebarTabWorkspaces:{label:"工作空间标签页",desc:"切换到侧栏的工作空间目录"},selectPrevSibling:{label:"上一条",desc:"在当前标签页中选中上一条会话 / 上一个工作空间"},selectNextSibling:{label:"下一条",desc:"在当前标签页中选中下一条会话 / 下一个工作空间"},send:{label:"发送消息",desc:"发送输入框中的内容"},newline:{label:"换行",desc:"在输入框中插入换行"}},searchPlaceholder:"搜索快捷键",unassigned:"未分配",unassign:"取消分配",edit:"编辑快捷键",reset:"恢复默认",resetAll:"全部恢复默认",recording:"按下新的快捷键…",invalid:"该按键组合不能用作快捷键",notGlobal:"该按键组合无法注册为系统级快捷键",globalTaken:"该快捷键已被系统或其他应用占用",reserved:"系统菜单已占用该快捷键",reservedSteer:"steer 固定快捷键(Ctrl/Cmd+S),不可占用",reservedFind:"对话搜索固定快捷键(Ctrl/Cmd+F),不可占用",conflict:"已被「{action}」占用",customBadge:"自定义"},BZ={panelAria:"终端",toolbarAria:"终端标签页",resizeAria:"调整终端面板高度",toggle:"切换终端",open:"打开终端",close:"关闭终端",newTab:"新建终端",closeTab:"关闭终端",restartTab:"重启终端",collapse:"收起终端面板",empty:"还没有终端,点击新建一个",processExited:"[进程已退出]",processExitedWithCode:"[进程已退出,退出码 {code}]"},zZ={common:oZ,app:rZ,sidebar:lZ,admin:aZ,workspace:uZ,conversation:cZ,status:dZ,composer:fZ,login:hZ,providers:pZ,model:gZ,sessions:mZ,approval:vZ,question:yZ,tasks:kZ,thinking:bZ,diff:AZ,fileTree:CZ,filePreview:wZ,mention:xZ,warnings:SZ,commands:_Z,tools:IZ,layout:MZ,mobile:EZ,theme:TZ,onboarding:LZ,settings:NZ,header:FZ,sideChat:DZ,shortcuts:$Z,terminal:BZ},RZ={en:sZ,zh:zZ},OZ="kimi-locale";function dF(){let e=null;try{e=globalThis.localStorage?.getItem(OZ)??null}catch{e=null}return e==="en"||e==="zh"?e:globalThis.navigator?.language?.toLowerCase().startsWith("zh")?"zh":"en"}function PZ(e){const t=e.locale??dF();return mV({legacy:!1,locale:t,fallbackLocale:"en",messages:RZ})}const fF=Symbol("KimiI18n"),jZ={t:e=>e};function Ph(){const e=cn(fF,null);if(e)return e;try{const t=Bt();return{t:(n,i)=>t.t(n,i),locale:t.locale.value}}catch{return jZ}}const ku=6,bu=8,HZ=150,WZ=Qe({__name:"TooltipBubble",props:{target:{default:null},delegate:{default:null},text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=e,n=G(),i=G(!1),s=G(!1),o=G({maxWidth:`${t.maxWidth}px`});let r,l=null,a;function u(){if(t.target)return t.target;const _=t.delegate;return _?_.firstElementChild??_:null}function c(_){const I=n.value;if(!I)return;const M=_.getBoundingClientRect(),$=I.offsetWidth,D=I.offsetHeight,T=window.innerWidth,N=window.innerHeight;let O=t.placement;O==="top"&&M.top-ku-D<bu?O="bottom":O==="bottom"&&M.bottom+ku+D>N-bu?O="top":O==="left"&&M.left-ku-$<bu?O="right":O==="right"&&M.right+ku+$>T-bu&&(O="left");let P=0,R=0;O==="top"?(P=M.top-ku-D,R=M.left+M.width/2-$/2):O==="bottom"?(P=M.bottom+ku,R=M.left+M.width/2-$/2):O==="left"?(P=M.top+M.height/2-D/2,R=M.left-ku-$):(P=M.top+M.height/2-D/2,R=M.right+ku),R=Math.min(Math.max(R,bu),T-bu-$),P=Math.min(Math.max(P,bu),N-bu-D),o.value={maxWidth:`${t.maxWidth}px`,top:`${Math.round(P)}px`,left:`${Math.round(R)}px`}}function d(){if(!t.text)return;const _=u();_&&(window.clearTimeout(r),r=window.setTimeout(()=>{i.value=!0,s.value=!1,kt(()=>{c(_),s.value=!0})},HZ))}function f(){window.clearTimeout(r),i.value=!1,s.value=!1}function h(){d()}function g(){f()}function m(_){return _ instanceof Element?_.closest(".ui-tip"):null}function y(_){const I=t.delegate;if(!I)return;if(m(_.target)!==I){f();return}const M=_.relatedTarget;M instanceof Element&&I.contains(M)&&m(M)===I||d()}function A(_){const I=t.delegate;if(!I)return;const M=_.relatedTarget;M instanceof Element&&I.contains(M)||f()}function b(_){m(_.target)===t.delegate&&d()}function C(){f()}function v(){l&&(t.delegate?(l.removeEventListener("mouseover",y),l.removeEventListener("mouseout",A),l.removeEventListener("focusin",b),l.removeEventListener("focusout",C)):(l.removeEventListener("mouseenter",h),l.removeEventListener("mouseleave",g),l.removeEventListener("focusin",h),l.removeEventListener("focusout",g)),l=null)}function x(){v(),a?.disconnect(),a=void 0;const _=t.target??t.delegate;_&&(l=_,t.delegate?(_.addEventListener("mouseover",y),_.addEventListener("mouseout",A),_.addEventListener("focusin",b),_.addEventListener("focusout",C),a=new MutationObserver(()=>{i.value&&f()}),a.observe(_,{childList:!0})):(_.addEventListener("mouseenter",h),_.addEventListener("mouseleave",g),_.addEventListener("focusin",h),_.addEventListener("focusout",g)))}qe(()=>[t.target,t.delegate],()=>{f(),x()});function S(){i.value&&f()}return mn(()=>{x(),window.addEventListener("scroll",S,!0),window.addEventListener("resize",S)}),Gn(()=>{window.clearTimeout(r),a?.disconnect(),v(),window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S)}),(_,I)=>i.value?(k(),de(Gr,{key:0,to:"body"},[w("div",{ref_key:"bubble",ref:n,class:Fe(["ui-tip__bubble",{positioned:s.value}]),style:qt([o.value,{"--tip-lines":e.maxLines}]),role:"tooltip"},F(e.text),7)])):te("",!0)}}),gt=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},hF=gt(WZ,[["__scopeId","data-v-93bacf6d"]]),qZ=["type","disabled","aria-label"],UZ=Qe({__name:"IconButton",props:{size:{default:"md"},disabled:{type:Boolean},label:{},tooltip:{},type:{default:"button"}},setup(e,{expose:t}){const n=G();return t({el:n}),(i,s)=>(k(),E("button",{ref_key:"el",ref:n,class:Fe(["ui-icon-button",`ui-icon-button--${e.size}`]),type:e.type,disabled:e.disabled,"aria-label":e.label},[Rn(i.$slots,"default",{},void 0,!0),e.tooltip?(k(),de(hF,{key:0,target:n.value??null,text:e.tooltip},null,8,["target","text"])):te("",!0)],10,qZ))}}),tn=gt(UZ,[["__scopeId","data-v-2cbeca98"]]),pF=Symbol("IconResolver"),KZ={sm:14,md:16,lg:20},ve=Qe({__name:"Icon",props:{name:{},size:{default:"md"},label:{}},setup(e){const t=e,n=cn(pF,()=>{}),i=L(()=>n(t.name)),s=L(()=>KZ[t.size]);return(o,r)=>i.value?(k(),de(xs(i.value),{key:0,class:"kw-icon",width:s.value,height:s.value,"aria-label":e.label,"aria-hidden":e.label?void 0:!0},null,8,["width","height","aria-label","aria-hidden"])):te("",!0)}}),VZ={class:"ui-action-toast-host"},ZZ={class:"ui-action-toast__body"},GZ=Qe({__name:"ActionToast",props:{duration:{default:8e3},dismissLabel:{},dismissToken:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Ph();let o=null,r=0,l=0;function a(d){o=setTimeout(()=>i("dismiss",n.dismissToken),d),r=Date.now()+d}function u(){o!==null&&(clearTimeout(o),o=null,l=Math.max(0,r-Date.now()))}function c(){o===null&&a(l)}return a(n.duration),Mn(()=>{o!==null&&clearTimeout(o)}),(d,f)=>(k(),E("div",VZ,[w("div",{class:"ui-action-toast",role:"status",onPointerenter:u,onPointerleave:c},[w("span",ZZ,[Rn(d.$slots,"default")]),K(tn,{class:"ui-action-toast__close",size:"sm",label:e.dismissLabel??p(s)("common.dismiss"),tooltip:e.dismissLabel??p(s)("common.dismiss"),onClick:f[0]||(f[0]=h=>i("dismiss",e.dismissToken))},{default:he(()=>[K(ve,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],32)]))}}),QZ=gt(GZ,[["__scopeId","data-v-e67fcfa0"]]),YZ={key:0,width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",stroke:"var(--color-success)","stroke-width":"2","aria-hidden":"true"},JZ={key:1,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-danger)","stroke-width":"1.5","aria-hidden":"true"},XZ={key:2,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",stroke:"var(--color-warning)","stroke-width":"1.5","aria-hidden":"true"},ch=Qe({__name:"AuthStateIcon",props:{kind:{}},setup(e){return(t,n)=>e.kind==="success"?(k(),E("svg",YZ,[...n[0]||(n[0]=[w("circle",{cx:"18",cy:"18",r:"15"},null,-1),w("polyline",{points:"10,18 15,24 26,12"},null,-1)])])):e.kind==="expired"?(k(),E("svg",JZ,[...n[1]||(n[1]=[w("circle",{cx:"14",cy:"14",r:"12"},null,-1),w("line",{x1:"14",y1:"8",x2:"14",y2:"15"},null,-1),w("circle",{cx:"14",cy:"19",r:"1.2",fill:"var(--color-danger)"},null,-1)])])):(k(),E("svg",XZ,[...n[2]||(n[2]=[w("path",{d:"M14 3 L26 24 H2 Z"},null,-1),w("line",{x1:"14",y1:"12",x2:"14",y2:"18"},null,-1),w("circle",{cx:"14",cy:"21.5",r:"1",fill:"var(--color-warning)"},null,-1)])]))}}),eG={key:0,class:"ui-badge__dot","aria-hidden":"true"},tG=Qe({__name:"Badge",props:{variant:{default:"neutral"},size:{default:"md"},dot:{type:Boolean}},setup(e){return(t,n)=>(k(),E("span",{class:Fe(["ui-badge",[`ui-badge--${e.variant}`,`ui-badge--${e.size}`]])},[e.dot?(k(),E("span",eG)):te("",!0),Rn(t.$slots,"default",{},void 0,!0)],2))}}),va=gt(tG,[["__scopeId","data-v-d879fe18"]]),nG={class:"ui-banner__icon","aria-hidden":"true"},iG={class:"ui-banner__text"},sG=Qe({__name:"Banner",props:{variant:{default:"info"}},setup(e){return(t,n)=>(k(),E("div",{class:Fe(["ui-banner",`ui-banner--${e.variant}`]),role:"status"},[w("span",nG,[Rn(t.$slots,"icon",{},()=>[e.variant==="info"?(k(),de(ve,{key:0,name:"info",size:"md"})):(k(),de(ve,{key:1,name:"alert-triangle",size:"md"}))],!0)]),w("span",iG,[Rn(t.$slots,"default",{},void 0,!0)])],2))}}),dd=gt(sG,[["__scopeId","data-v-6d739c6d"]]),oG=["aria-label"],rG=Qe({__name:"Spinner",props:{size:{default:"md"},label:{}},setup(e){const{t}=Ph(),n=G(null);let i,s;function o(){const r=n.value;if(r){if(s?.matches){i?.cancel(),i=void 0;return}i||(i=r.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:850,iterations:1/0}),i.startTime=0)}}return mn(()=>{const r=n.value;!r||typeof r.animate!="function"||(s=window.matchMedia("(prefers-reduced-motion: reduce)"),s.addEventListener("change",o),o())}),Gn(()=>{s?.removeEventListener("change",o),s=void 0,i?.cancel(),i=void 0}),(r,l)=>(k(),E("span",{ref_key:"boxRef",ref:n,class:Fe(["ui-spinner",`ui-spinner--${e.size}`]),role:"status","aria-label":e.label??p(t)("common.loading")},[...l[0]||(l[0]=[w("svg",{class:"ui-spinner__svg",viewBox:"0 0 24 24","aria-hidden":"true"},[w("circle",{class:"ui-spinner__track",cx:"12",cy:"12",r:"9"}),w("circle",{class:"ui-spinner__arc",cx:"12",cy:"12",r:"9"})],-1)])],10,oG))}}),Mi=gt(rG,[["__scopeId","data-v-476ed1b4"]]),lG=["type","disabled"],aG={class:"ui-button__content"},uG=Qe({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},loading:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(k(),E("button",{class:Fe(["ui-button",[`ui-button--${e.variant}`,`ui-button--${e.size}`,{"is-loading":e.loading}]]),type:e.type,disabled:e.disabled||e.loading},[e.loading?(k(),de(Mi,{key:0,size:"sm",class:"ui-button__spinner"})):te("",!0),w("span",aG,[Rn(t.$slots,"default",{},void 0,!0)])],10,lG))}}),Zt=gt(uG,[["__scopeId","data-v-01b5ec22"]]),cG={key:0,class:"ui-card__head"},dG={class:"ui-card__body"},fG={key:1,class:"ui-card__foot"},hG=Qe({__name:"Card",props:{elevated:{type:Boolean,default:!1}},setup(e){return(t,n)=>(k(),E("div",{class:Fe(["ui-card",{"is-elevated":e.elevated}])},[t.$slots.head?(k(),E("div",cG,[Rn(t.$slots,"head",{},void 0,!0)])):te("",!0),w("div",dG,[Rn(t.$slots,"default",{},void 0,!0)]),t.$slots.foot?(k(),E("div",fG,[Rn(t.$slots,"foot",{},void 0,!0)])):te("",!0)],2))}}),pG=gt(hG,[["__scopeId","data-v-fbd05138"]]),gG={class:"ctx-ring",viewBox:"0 0 20 20","aria-hidden":"true"},mG=["stroke-dasharray","stroke-dashoffset"],D4=7,vG=Qe({__name:"ContextRing",props:{pct:{}},setup(e){const t=e,n=2*Math.PI*D4;return(i,s)=>(k(),E("svg",gG,[w("circle",{class:"ctx-ring-track",cx:"10",cy:"10",r:D4,fill:"none","stroke-width":"2.5"}),w("circle",{class:"ctx-ring-fill",cx:"10",cy:"10",r:D4,fill:"none","stroke-width":"2.5","stroke-linecap":"round","stroke-dasharray":`${n}`,"stroke-dashoffset":`${n*(1-t.pct/100)}`},null,8,mG)]))}}),yG=gt(vG,[["__scopeId","data-v-de787cf2"]]),_o=G(0),kG=["aria-label"],bG={key:0,class:"ui-dialog__head"},AG={class:"ui-dialog__titles"},CG={key:0,class:"ui-dialog__title"},wG={key:1,class:"ui-dialog__desc"},xG={class:"ui-dialog__body"},SG={key:1,class:"ui-dialog__foot"},_G='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',IG=Qe({__name:"Dialog",props:{open:{type:Boolean},title:{},ariaLabel:{},description:{},closeOnOverlay:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},size:{default:"md"},height:{default:"auto"},padded:{type:Boolean,default:!0},hideClose:{type:Boolean},level:{default:"raised"},initialFocus:{}},emits:["update:open","close"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Ph(),o=G(null);let r=null;function l(){i("update:open",!1),i("close")}function a(){return o.value?Array.from(o.value.querySelectorAll(_G)):[]}function u(){const{initialFocus:f}=n;return f?typeof f=="function"?f()??null:typeof f=="string"?o.value?.querySelector(f)??null:o.value?.contains(f)?f:null:null}function c(f){if(!n.open)return;if(f.key==="Escape"&&n.closeOnEsc){f.preventDefault(),l();return}if(f.key!=="Tab")return;const h=a(),g=h[0],m=h[h.length-1];if(!g||!m){f.preventDefault(),o.value?.focus();return}const y=document.activeElement;f.shiftKey&&y===g?(f.preventDefault(),m.focus()):!f.shiftKey&&y===m&&(f.preventDefault(),g.focus())}function d(f){n.closeOnOverlay&&f.target===f.currentTarget&&l()}return qe(()=>n.open,async f=>{if(f){_o.value+=1,r=document.activeElement,await kt();const h=u(),g=a();(h??g[0]??o.value)?.focus()}else _o.value=Math.max(0,_o.value-1),r instanceof HTMLElement&&(r.focus(),r=null)},{immediate:!0}),typeof window<"u"&&window.addEventListener("keydown",c),Gn(()=>{typeof window<"u"&&window.removeEventListener("keydown",c),n.open&&(_o.value=Math.max(0,_o.value-1),r instanceof HTMLElement&&r.focus())}),(f,h)=>(k(),de(Gr,{to:"body"},[e.open?(k(),E("div",{key:0,class:"ui-dialog__overlay",onMousedown:d},[w("div",{ref_key:"panel",ref:o,class:Fe(["ui-dialog",[`ui-dialog--${e.size}`,{"ui-dialog--flush":!e.padded,"ui-dialog--fixed-height":e.height==="fixed","ui-dialog--grouped":e.level==="grouped"}]]),role:"dialog","aria-modal":"true","aria-label":e.ariaLabel??e.title,tabindex:"-1"},[e.title||f.$slots.head?(k(),E("div",bG,[Rn(f.$slots,"head",{},()=>[w("div",AG,[e.title?(k(),E("div",CG,F(e.title),1)):te("",!0),e.description?(k(),E("div",wG,F(e.description),1)):te("",!0)])],!0),e.hideClose?te("",!0):(k(),de(tn,{key:0,class:"ui-dialog__close",size:"sm",label:p(s)("common.close"),tooltip:p(s)("common.close"),onClick:l},{default:he(()=>[K(ve,{name:"close",size:"md"})]),_:1},8,["label","tooltip"]))])):te("",!0),w("div",xG,[Rn(f.$slots,"default",{},void 0,!0)]),f.$slots.foot?(k(),E("div",SG,[Rn(f.$slots,"foot",{},void 0,!0)])):te("",!0)],10,kG)],32)):te("",!0)]))}}),bc=gt(IG,[["__scopeId","data-v-ebbc1a68"]]),MG={class:"ui-empty"},EG={key:0,class:"ui-empty__icon","aria-hidden":"true"},TG={key:1,class:"ui-empty__title"},LG={key:2,class:"ui-empty__hint"},NG=Qe({__name:"EmptyState",props:{title:{},hint:{}},setup(e){return(t,n)=>(k(),E("div",MG,[t.$slots.icon?(k(),E("span",EG,[Rn(t.$slots,"icon",{},void 0,!0)])):te("",!0),e.title?(k(),E("div",TG,F(e.title),1)):te("",!0),e.hint?(k(),E("div",LG,F(e.hint),1)):te("",!0),Rn(t.$slots,"default",{},void 0,!0)]))}}),FG=gt(NG,[["__scopeId","data-v-6da80932"]]),DG={key:0,class:"ui-field__label"},$G={key:1,class:"ui-field__error"},BG={key:2,class:"ui-field__hint"},zG=Qe({__name:"Field",props:{label:{},hint:{},error:{}},setup(e){return(t,n)=>(k(),E("div",{class:Fe(["ui-field",{"has-error":!!e.error}])},[e.label?(k(),E("label",DG,F(e.label),1)):te("",!0),Rn(t.$slots,"default",{},void 0,!0),e.error?(k(),E("span",$G,F(e.error),1)):e.hint?(k(),E("span",BG,F(e.hint),1)):te("",!0)],2))}}),RG=gt(zG,[["__scopeId","data-v-a8de5f7f"]]),OG=["type","value","placeholder","disabled","readonly"],PG=Qe({__name:"Input",props:{modelValue:{},size:{default:"md"},type:{default:"text"},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue","focus","blur"],setup(e,{expose:t,emit:n}){const i=n,s=G();function o(a){i("update:modelValue",a.target.value)}function r(){s.value?.focus()}function l(){s.value?.select()}return t({focus:r,select:l,el:s}),(a,u)=>(k(),E("input",{ref_key:"el",ref:s,class:Fe(["ui-input",[`ui-input--${e.size}`,{"has-error":e.error}]]),type:e.type,value:e.modelValue,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,onInput:o,onFocus:u[0]||(u[0]=c=>a.$emit("focus",c)),onBlur:u[1]||(u[1]=c=>a.$emit("blur",c))},null,42,OG))}}),wo=gt(PG,[["__scopeId","data-v-f1cdf732"]]),jG={class:"ui-kbd"},HG=Qe({__name:"Kbd",props:{keys:{}},setup(e){return(t,n)=>(k(),E("span",jG,[(k(!0),E(Te,null,ht(e.keys,i=>(k(),E("kbd",{key:i,class:"ui-kbd__key"},F(i),1))),128))]))}}),Ja=gt(HG,[["__scopeId","data-v-04b30ce2"]]),WG=["role"],qG=Qe({__name:"Menu",props:{role:{default:"menu"}},setup(e,{expose:t}){const n=G();return t({el:n}),(i,s)=>(k(),E("div",{ref_key:"el",ref:n,class:"ui-menu",role:e.role},[Rn(i.$slots,"default",{},void 0,!0)],8,WG))}}),sr=gt(qG,[["__scopeId","data-v-9be2c64a"]]),UG={key:0,class:"ui-menu-sep",role:"separator"},KG=["role","disabled"],VG=Qe({__name:"MenuItem",props:{active:{type:Boolean},danger:{type:Boolean},disabled:{type:Boolean},separator:{type:Boolean},size:{default:"md"},role:{default:"menuitem"}},emits:["click"],setup(e){return(t,n)=>e.separator?(k(),E("div",UG)):(k(),E("button",{key:1,class:Fe(["ui-menu-item",[`ui-menu-item--${e.size}`,{"is-active":e.active,"is-danger":e.danger}]]),type:"button",role:e.role,disabled:e.disabled,onClick:n[0]||(n[0]=i=>t.$emit("click",i))},[Rn(t.$slots,"default",{},void 0,!0)],10,KG))}}),Wt=gt(VG,[["__scopeId","data-v-3427559a"]]),ZG=Qe({__name:"Tooltip",props:{text:{},placement:{default:"top"},maxWidth:{default:280},maxLines:{default:6}},setup(e){const t=G();return(n,i)=>(k(),E(Te,null,[w("span",{ref_key:"trigger",ref:t,class:"ui-tip"},[Rn(n.$slots,"default",{},void 0,!0)],512),K(hF,{delegate:t.value??null,text:e.text,placement:e.placement,"max-width":e.maxWidth,"max-lines":e.maxLines},null,8,["delegate","text","placement","max-width","max-lines"])],64))}}),kn=gt(ZG,[["__scopeId","data-v-414bd903"]]),GG={class:"ui-panel-header__title"},QG={key:0,class:"ui-panel-header__sub"},YG=Qe({__name:"PanelHeader",props:{title:{},subtitle:{},closable:{type:Boolean,default:!0},closeLabel:{},closeIcon:{default:"close"},wrap:{type:Boolean}},emits:["close"],setup(e){const{t}=Ph();return(n,i)=>(k(),E("div",{class:Fe(["ui-panel-header",{wrap:e.wrap}])},[K(kn,{text:e.title},{default:he(()=>[w("span",GG,F(e.title),1)]),_:1},8,["text"]),K(kn,{text:e.subtitle},{default:he(()=>[e.subtitle?(k(),E("span",QG,F(e.subtitle),1)):te("",!0)]),_:1},8,["text"]),Rn(n.$slots,"default",{},void 0,!0),e.closable?(k(),de(tn,{key:0,class:"ui-panel-header__close",size:"sm",label:e.closeLabel??p(t)("common.close"),tooltip:e.closeLabel??p(t)("common.close"),onClick:i[0]||(i[0]=s=>n.$emit("close"))},{default:he(()=>[K(ve,{name:e.closeIcon,size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])):te("",!0)],2))}}),Pd=gt(YG,[["__scopeId","data-v-2650aff3"]]),JG=["disabled","aria-pressed"],XG=Qe({__name:"Pill",props:{clickable:{type:Boolean,default:!0},active:{type:Boolean},disabled:{type:Boolean},ariaPressed:{type:Boolean}},emits:["click"],setup(e){return(t,n)=>e.clickable?(k(),E("button",{key:0,class:Fe(["ui-pill",{"is-active":e.active}]),type:"button",disabled:e.disabled,"aria-pressed":e.ariaPressed,onClick:n[0]||(n[0]=i=>t.$emit("click",i))},[Rn(t.$slots,"default",{},void 0,!0)],10,JG)):(k(),E("span",{key:1,class:Fe(["ui-pill",{"is-active":e.active}])},[Rn(t.$slots,"default",{},void 0,!0)],2))}}),gF=gt(XG,[["__scopeId","data-v-fe6a2873"]]),eQ=Qe({__name:"ScrollArea",props:{orientation:{default:"vertical"},hideDelay:{default:600}},setup(e,{expose:t}){const n=e,i=G(null),s=G(null),o=G(!1),r=G({overflow:!1,size:0,offset:0}),l=G({overflow:!1,size:0,offset:0}),a=G(null);let u=null,c=null,d=null;const f=L(()=>({overflowX:n.orientation==="vertical"?"hidden":"auto",overflowY:n.orientation==="horizontal"?"hidden":"auto"})),h=L(()=>({height:`${r.value.size}px`,transform:`translateY(${r.value.offset}px)`})),g=L(()=>({width:`${l.value.size}px`,transform:`translateX(${l.value.offset}px)`}));function m(M,$,D){if(!($>M+1)||M<=0)return{overflow:!1,size:0,offset:0};const N=Math.max(0,M-4),O=Math.min(N,Math.max(24,N*M/$)),P=Math.max(0,N-O),R=Math.max(1,$-M);return{overflow:!0,size:O,offset:P*D/R}}function y(){const M=s.value;if(!M)return;const $=m(M.clientHeight,M.scrollHeight,M.scrollTop),D=m(M.clientWidth,M.scrollWidth,M.scrollLeft);($.overflow!==r.value.overflow||$.size!==r.value.size||$.offset!==r.value.offset)&&(r.value=$),(D.overflow!==l.value.overflow||D.size!==l.value.size||D.offset!==l.value.offset)&&(l.value=D)}function A(){u!==null&&clearTimeout(u),u=null}function b(){A(),o.value=!0}function C(){A(),!(a.value||i.value?.matches(":hover, :focus-within"))&&(u=setTimeout(()=>{o.value=!1,u=null},n.hideDelay))}function v(){y(),b(),C()}function x(M,$){const D=s.value;D&&($.preventDefault(),b(),a.value={axis:M,pointerId:$.pointerId,startPointer:M==="vertical"?$.clientY:$.clientX,startScroll:M==="vertical"?D.scrollTop:D.scrollLeft},$.currentTarget.setPointerCapture($.pointerId))}function S(M){const $=a.value,D=s.value;if(!$||$.pointerId!==M.pointerId||!D)return;const T=$.axis==="vertical"?M.clientY:M.clientX,N=$.axis==="vertical"?D.clientHeight:D.clientWidth,O=$.axis==="vertical"?D.scrollHeight:D.scrollWidth,P=$.axis==="vertical"?r.value.size:l.value.size,R=Math.max(1,N-4-P),q=(T-$.startPointer)*(O-N)/R;$.axis==="vertical"?D.scrollTop=$.startScroll+q:D.scrollLeft=$.startScroll+q}function _(M){!a.value||a.value.pointerId!==M.pointerId||(a.value=null,C())}function I(){const M=s.value;if(!(!M||!c))for(const $ of M.children)c.observe($)}return mn(async()=>{await kt();const M=s.value;M&&(c=new ResizeObserver(y),c.observe(M),I(),d=new MutationObserver(()=>{I(),y()}),d.observe(M,{childList:!0,subtree:!0,characterData:!0}),y())}),Gn(()=>{A(),c?.disconnect(),d?.disconnect()}),t({viewport:s,updateMetrics:y}),(M,$)=>(k(),E("div",{ref_key:"root",ref:i,class:"ui-scroll-area",onPointerenter:b,onPointerleave:C,onFocusin:b,onFocusout:C},[w("div",{ref_key:"viewport",ref:s,class:"ui-scroll-area__viewport",style:qt(f.value),tabindex:"0",onScroll:v},[Rn(M.$slots,"default",{},void 0,!0)],36),r.value.overflow&&n.orientation!=="horizontal"?(k(),E("div",{key:0,class:Fe(["ui-scroll-area__bar ui-scroll-area__bar--vertical",{"is-visible":o.value}]),"aria-hidden":"true"},[w("span",{class:"ui-scroll-area__thumb",style:qt(h.value),onPointerdown:$[0]||($[0]=D=>x("vertical",D)),onPointermove:S,onPointerup:_,onPointercancel:_},null,36)],2)):te("",!0),l.value.overflow&&n.orientation!=="vertical"?(k(),E("div",{key:1,class:Fe(["ui-scroll-area__bar ui-scroll-area__bar--horizontal",{"is-visible":o.value}]),"aria-hidden":"true"},[w("span",{class:"ui-scroll-area__thumb",style:qt(g.value),onPointerdown:$[1]||($[1]=D=>x("horizontal",D)),onPointermove:S,onPointerup:_,onPointercancel:_},null,36)],2)):te("",!0)],544))}}),$w=gt(eQ,[["__scopeId","data-v-9c504ebc"]]),tQ=["data-icon","aria-selected","onClick"],nQ=Qe({__name:"SegmentedControl",props:{modelValue:{},options:{},size:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,s=G(null),o=G([]),r=G(!1),l=G({});let a=null;function u(d,f){d instanceof HTMLElement&&(o.value[f]=d)}async function c(){await kt();const d=n.options.findIndex(h=>h.value===n.modelValue),f=o.value[d];f&&(l.value={width:`${f.offsetWidth}px`,height:`${f.offsetHeight}px`,transform:`translate(${f.offsetLeft}px, ${f.offsetTop}px)`},r.value=!0)}return qe(()=>[n.modelValue,n.options.length],c,{immediate:!0}),mn(()=>{a=new ResizeObserver(()=>c()),s.value&&a.observe(s.value);for(const d of o.value)a.observe(d);c()}),Gn(()=>a?.disconnect()),(d,f)=>(k(),E("div",{ref_key:"root",ref:s,class:Fe(["ui-seg",`ui-seg--${e.size??"md"}`]),role:"tablist"},[w("span",{class:Fe(["ui-seg__indicator",{"is-ready":r.value}]),style:qt(l.value),"aria-hidden":"true"},null,6),(k(!0),E(Te,null,ht(e.options,(h,g)=>(k(),E("button",{key:h.value,ref_for:!0,ref:m=>u(m,g),class:Fe(["ui-seg__item",{"is-on":h.value===e.modelValue}]),"data-icon":h.icon,type:"button",role:"tab","aria-selected":h.value===e.modelValue,onClick:m=>i("update:modelValue",h.value)},[h.icon?(k(),de(ve,{key:0,class:"ui-seg__icon",name:h.icon,size:"sm"},null,8,["name"])):te("",!0),h.swatch?(k(),E("span",{key:1,class:"ui-seg__swatch",style:qt({backgroundColor:h.swatch})},null,4)):te("",!0),$e(" "+F(h.label),1)],10,tQ))),128))],2))}}),Mo=gt(nQ,[["__scopeId","data-v-b09ef1d1"]]),iQ=["aria-expanded","disabled"],sQ=["src"],oQ={class:"ui-select__value-text"},rQ={key:0,class:"ui-select__group"},lQ=["aria-selected","disabled","onMouseenter","onClick"],aQ=["src"],uQ=Qe({inheritAttrs:!1,__name:"Select",props:{modelValue:{},options:{},placeholder:{default:""},size:{default:"md"},disabled:{type:Boolean},error:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,s=Rh(),o=G(null),r=G(null),l=G(null),a=G([]),u=G(!1),c=G(-1),d=`ui-select-${Math.random().toString(36).slice(2,9)}`,f=L(()=>n.options.findIndex(I=>String(I.value)===String(n.modelValue??""))),h=L(()=>n.options[f.value]),g=L(()=>h.value?.label??n.placeholder);function m(I,M){a.value[M]=I instanceof HTMLElement?I:null}function y(){const I=l.value,M=a.value[c.value];!I||!M||(I.scrollTop=M.offsetTop-(I.clientHeight-M.offsetHeight)/2)}function A(){n.disabled||u.value||(u.value=!0,c.value=f.value>=0?f.value:n.options.findIndex(I=>!I.disabled),kt(y))}function b({restoreFocus:I=!1}={}){u.value&&(u.value=!1,I&&kt(()=>r.value?.focus()))}function C(){u.value?b():A()}function v(I){I.disabled||(String(I.value)!==String(n.modelValue??"")&&i("update:modelValue",I.value),b({restoreFocus:!0}))}function x(I){if(u.value||A(),n.options.length===0)return;let M=c.value;for(let $=0;$<n.options.length;$+=1)if(M=(M+I+n.options.length)%n.options.length,!n.options[M]?.disabled){c.value=M,kt(y);return}}function S(I){if(I.key==="ArrowDown")I.preventDefault(),x(1);else if(I.key==="ArrowUp")I.preventDefault(),x(-1);else if(I.key==="Enter"||I.key===" ")if(I.preventDefault(),!u.value)A();else{const M=n.options[c.value];M&&v(M)}else if(I.key==="Escape")I.preventDefault(),b();else if(I.key==="Home"||I.key==="End"){I.preventDefault();const M=n.options.map(($,D)=>$.disabled?-1:D).filter($=>$>=0);c.value=I.key==="Home"?M[0]??-1:M.at(-1)??-1,kt(y)}}function _(I){o.value?.contains(I.target)||b()}return mn(()=>document.addEventListener("pointerdown",_)),Mn(()=>document.removeEventListener("pointerdown",_)),(I,M)=>(k(),E("div",{ref_key:"rootRef",ref:o,class:Fe(["ui-select",[`ui-select--${e.size}`,{"has-error":e.error,"is-open":u.value,"is-disabled":e.disabled}]])},[w("button",Un({ref_key:"triggerRef",ref:r},p(s),{class:"ui-select__trigger",type:"button",role:"combobox","aria-controls":d,"aria-expanded":u.value,"aria-haspopup":"listbox",disabled:e.disabled,onClick:C,onKeydown:S}),[w("span",{class:Fe(["ui-select__value",{"is-placeholder":!h.value}])},[h.value?.icon?(k(),E("img",{key:0,class:"ui-select__icon",src:h.value.icon,alt:""},null,8,sQ)):te("",!0),w("span",oQ,F(g.value),1)],2),K(ve,{class:"ui-select__chevron",name:"chevron-down",size:"sm"})],16,iQ),u.value?(k(),E("div",{key:0,id:d,ref_key:"listRef",ref:l,class:"ui-select__menu",role:"listbox"},[(k(!0),E(Te,null,ht(e.options,($,D)=>(k(),E(Te,{key:`${$.group??""}:${$.value}`},[$.group&&$.group!==e.options[D-1]?.group?(k(),E("div",rQ,F($.group),1)):te("",!0),w("button",{ref_for:!0,ref:T=>m(T,D),class:Fe(["ui-select__option",{"is-selected":D===f.value,"is-active":D===c.value}]),type:"button",role:"option","aria-selected":D===f.value,disabled:$.disabled,onMouseenter:T=>c.value=D,onClick:T=>v($)},[K(ve,{class:"ui-select__check",name:"check",size:"sm"}),$.icon?(k(),E("img",{key:0,class:"ui-select__icon ui-select__icon--option",src:$.icon,alt:""},null,8,aQ)):te("",!0),w("span",null,F($.label),1)],42,lQ)],64))),128))],512)):te("",!0)],2))}}),Jk=gt(uQ,[["__scopeId","data-v-63f5dcbc"]]),cQ=Qe({__name:"StatusDot",props:{status:{}},setup(e){const t=e;function n(s){switch(s){case"ok":case"done":case"completed":case"success":return"ok";case"error":case"failed":case"fail":case"danger":return"error";case"running":case"run":case"working":case"in_progress":case"active":return"running";case"suspended":return"suspended";default:return"idle"}}const i=L(()=>n(t.status));return(s,o)=>(k(),E("span",{class:Fe(["kw-dot",`kw-dot--${i.value}`]),"aria-hidden":"true"},null,2))}}),jl=gt(cQ,[["__scopeId","data-v-390a778a"]]),dQ=["aria-checked","aria-label","disabled"],fQ=Qe({__name:"Switch",props:{modelValue:{type:Boolean},disabled:{type:Boolean},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(i,s)=>(k(),E("button",{class:Fe(["ui-switch",{"is-on":e.modelValue}]),type:"button",role:"switch","aria-checked":e.modelValue,"aria-label":e.label,disabled:e.disabled,onClick:s[0]||(s[0]=o=>n("update:modelValue",!e.modelValue))},[...s[1]||(s[1]=[w("span",{class:"ui-switch__thumb"},null,-1)])],10,dQ))}}),Gc=gt(fQ,[["__scopeId","data-v-2fc56545"]]),hQ=["value","rows","placeholder","disabled","readonly"],pQ=Qe({__name:"Textarea",props:{modelValue:{},rows:{default:3},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},error:{type:Boolean},resize:{type:Boolean,default:!0}},emits:["update:modelValue","focus","blur"],setup(e,{expose:t,emit:n}){const i=n;function s(r){i("update:modelValue",r.target.value)}const o=G(null);return t({el:o}),(r,l)=>(k(),E("textarea",{ref_key:"textareaRef",ref:o,class:Fe(["ui-textarea",{"has-error":e.error,"no-resize":!e.resize}]),value:e.modelValue,rows:e.rows,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,onInput:s,onFocus:l[0]||(l[0]=a=>r.$emit("focus",a)),onBlur:l[1]||(l[1]=a=>r.$emit("blur",a))},null,42,hQ))}}),gQ=gt(pQ,[["__scopeId","data-v-07cc9fb9"]]),mQ={class:"ui-toast__icon","aria-hidden":"true"},vQ={class:"ui-toast__body"},yQ={class:"ui-toast__title"},kQ={key:0,class:"ui-toast__msg"},bQ=Qe({__name:"Toast",props:{variant:{default:"info"},title:{},message:{},dismissLabel:{}},emits:["dismiss"],setup(e){const{t}=Ph();return(n,i)=>(k(),E("div",{class:Fe(["ui-toast",`ui-toast--${e.variant}`])},[w("span",mQ,[Rn(n.$slots,"icon",{},()=>[e.variant==="success"?(k(),de(ve,{key:0,name:"check"})):e.variant==="danger"?(k(),de(ve,{key:1,name:"close"})):e.variant==="warning"?(k(),de(ve,{key:2,name:"alert-triangle"})):(k(),de(ve,{key:3,name:"info"}))],!0)]),w("div",vQ,[w("div",yQ,F(e.title),1),e.message?(k(),E("div",kQ,F(e.message),1)):te("",!0),Rn(n.$slots,"default",{},void 0,!0)]),K(tn,{class:"ui-toast__close",size:"sm",label:e.dismissLabel??p(t)("common.dismiss"),tooltip:e.dismissLabel??p(t)("common.dismiss"),onClick:i[0]||(i[0]=s=>n.$emit("dismiss"))},{default:he(()=>[K(ve,{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],2))}}),AQ=gt(bQ,[["__scopeId","data-v-62bc76d1"]]),CQ=100;function Xr(){let e=!1,t=0;function n(){e=!0,t=0}function i(){e=!1,t=Date.now()}function s(){e=!1,t=0}function o(r){return e||r.isComposing||r.keyCode===229||Date.now()-t<CQ}return typeof window<"u"&&(window.addEventListener("focusin",s,!0),window.addEventListener("focusout",s,!0)),Mn(()=>{typeof window<"u"&&(window.removeEventListener("focusin",s,!0),window.removeEventListener("focusout",s,!0))}),{handleCompositionStart:n,handleCompositionEnd:i,resetComposition:s,isComposingKeyEvent:o}}function vd(e,t,n="/api/v1"){return`${e}${n}${t.startsWith("/")?t:`/${t}`}`}function wQ(e,t){const n=new URL(`${e}/api/v1/ws`);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.searchParams.set("client_id",t),n.toString()}const N5={};class Wu extends Error{code;requestId;details;timestamp;durationMs;constructor(t){super(t.msg),this.name="DaemonApiError",this.code=t.code,this.requestId=t.requestId,this.details=t.details,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class Ba extends Error{cause;method;path;url;requestId;phase;timeoutMs;status;statusText;contentType;bodyPreview;timestamp;durationMs;constructor(t){super(t.message),this.name="DaemonNetworkError",this.cause=t.cause,this.method=t.method,this.path=t.path,this.url=t.url,this.requestId=t.requestId,this.phase=t.phase,this.timeoutMs=t.timeoutMs,this.status=t.status,this.statusText=t.statusText,this.contentType=t.contentType,this.bodyPreview=t.bodyPreview,this.timestamp=t.timestamp,this.durationMs=t.durationMs}}class F5 extends Error{size;limit;constructor(t){super(`file too large to preview: ${t.size} bytes (limit ${t.limit})`),this.name="FileTooLargeError",this.size=t.size,this.limit=t.limit}}function zs(e){return e instanceof Wu||typeof e=="object"&&e!==null&&e.name==="DaemonApiError"&&typeof e.code=="number"}function Dy(e){return e instanceof Ba||typeof e=="object"&&e!==null&&e.name==="DaemonNetworkError"&&typeof e.method=="string"&&typeof e.path=="string"}function xQ(e){return Dy(e)&&typeof e.cause=="object"&&e.cause!==null&&e.cause.name==="TimeoutError"}function SQ(e){return e instanceof F5||typeof e=="object"&&e!==null&&e.name==="FileTooLargeError"&&typeof e.limit=="number"}const _Q=41301,IQ=40922;function Bw(e){return zs(e)&&e.code===IQ}const q1=3e4,Gg=5*6e4,zw=5*6e4,mF="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Rw=500,vF=40101;function Ow(e,t){for(const[n,i]of Object.entries(t))if(i!==void 0)if(Array.isArray(i))for(const s of i)s!==void 0&&e.append(n,String(s));else e.set(n,String(i))}function Qg(e=q1){try{return AbortSignal.timeout(e)}catch{return}}function MQ(e,t){let n="",i=e;for(let s=0;s<t;s++)n=mF[i%32]+n,i=Math.floor(i/32);return n}function EQ(e){const t=new Uint8Array(e);if(globalThis.crypto?.getRandomValues)globalThis.crypto.getRandomValues(t);else for(let n=0;n<t.length;n++)t[n]=Math.floor(Math.random()*256);return Array.from(t,n=>mF[n%32]).join("")}function Yg(){return`${MQ(Date.now(),10)}${EQ(16)}`}function TQ(e){try{const t=[];return e.forEach((n,i)=>{typeof n=="string"?t.push({field:i,value:n}):t.push({field:i,file:n.name,size:n.size,type:n.type})}),{formData:t}}catch{return"[FormData]"}}async function $4(e){try{const t=await e.text();return t?t.length>Rw?`${t.slice(0,Rw)}...`:t:void 0}catch{return}}class Pw{constructor(t){this.opts=t,this.tracer=t.tracer??N5}tracer;async get(t,n){return this.request("GET",t,void 0,n)}async getBlob(t,n,i){let s=vd(this.opts.origin,t,this.opts.restBasePath);if(n){const c=new URLSearchParams;Ow(c,n);const d=c.toString();d&&(s=`${s}?${d}`)}const o=Yg(),r={"X-Request-Id":o};this.addClientHeaders(r);const l=Date.now();this.tracer.restRequest?.({method:"GET",path:t,url:s,requestId:o});let a;try{a=await fetch(s,{method:"GET",headers:r,signal:Qg()})}catch(c){throw this.tracer.restFailure?.({method:"GET",path:t,requestId:o,phase:"fetch",durationMs:Date.now()-l,error:c}),new Ba({message:`Network error calling GET ${t}`,cause:c,method:"GET",path:t,url:s,requestId:o,phase:"fetch",timeoutMs:q1,timestamp:Date.now(),durationMs:Date.now()-l})}if(a.ok){this.tracer.restResponse?.({method:"GET",path:t,requestId:o,status:a.status,durationMs:Date.now()-l,code:0,msg:""});const c=Number(a.headers.get("content-length")??0);if(i?.maxBytes!==void 0&&c>i.maxBytes)throw a.body?.cancel(),new F5({size:c,limit:i.maxBytes});return a.blob()}let u;try{u=await a.clone().json()}catch{}throw this.checkAuthRequired(a,u?.code??0),this.tracer.restResponse?.({method:"GET",path:t,requestId:o,status:a.status,durationMs:Date.now()-l,code:u?.code??a.status,msg:u?.msg??a.statusText,envelopeRequestId:u?.request_id}),new Wu({code:u?.code??a.status,msg:u?.msg??a.statusText,requestId:u?.request_id??o,details:u?.details,timestamp:Date.now(),durationMs:Date.now()-l})}async post(t,n,i){return this.request("POST",t,n,void 0,i?.allowCodes,i?.timeoutMs)}async postZip(t,n,i){const s="POST",o=vd(this.opts.origin,t,this.opts.restBasePath),r=Yg(),l={"X-Request-Id":r,"Content-Type":"application/json; charset=utf-8"};this.addClientHeaders(l);const a=Date.now();this.tracer.restRequest?.({method:s,path:t,url:o,requestId:r,body:i});let u;try{u=await fetch(o,{method:s,headers:l,body:JSON.stringify(n),signal:Qg(Gg)})}catch(h){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"fetch",durationMs:Date.now()-a,error:h}),new Ba({message:`Network error calling ${s} ${t}`,cause:h,method:s,path:t,url:o,requestId:r,phase:"fetch",timeoutMs:Gg,timestamp:Date.now(),durationMs:Date.now()-a})}const c=u.headers.get("content-type")??void 0,d=c?.split(";",1)[0]?.trim().toLowerCase();if(!u.ok||d!=="application/zip"){let h;try{h=await u.clone().json()}catch{}if(this.checkAuthRequired(u,h?.code??0),!u.ok||h!==void 0&&h.code!==0){const y=h?.code??u.status,A=h?.msg??u.statusText;throw this.tracer.restResponse?.({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:y,msg:A,envelopeRequestId:h?.request_id}),new Wu({code:y,msg:A,requestId:h?.request_id??r,details:h?.details,timestamp:Date.now(),durationMs:Date.now()-a})}const g=u.clone(),m=new TypeError(`Expected application/zip, received ${c??"no content type"}`);throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:m}),new Ba({message:`Invalid ZIP response from ${s} ${t}`,cause:m,method:s,path:t,url:o,requestId:r,phase:"parse",timeoutMs:Gg,status:u.status,statusText:u.statusText,contentType:c,bodyPreview:await $4(g),timestamp:Date.now(),durationMs:Date.now()-a})}let f;try{f=await u.blob()}catch(h){throw this.tracer.restFailure?.({method:s,path:t,requestId:r,phase:"parse",durationMs:Date.now()-a,status:u.status,error:h}),new Ba({message:`Failed to read ZIP response from ${s} ${t}`,cause:h,method:s,path:t,url:o,requestId:r,phase:"parse",timeoutMs:Gg,status:u.status,statusText:u.statusText,contentType:c,timestamp:Date.now(),durationMs:Date.now()-a})}return this.tracer.restResponse?.({method:s,path:t,requestId:r,status:u.status,durationMs:Date.now()-a,code:0,msg:""}),{blob:f,contentDisposition:u.headers.get("content-disposition")??void 0}}async postForm(t,n){const i=vd(this.opts.origin,t,this.opts.restBasePath),s=Yg(),o={"X-Request-Id":s};this.addClientHeaders(o);const r=Date.now();this.tracer.restRequest?.({method:"POST",path:t,url:i,requestId:s,body:TQ(n)});let l;try{l=await fetch(i,{method:"POST",headers:o,body:n,signal:Qg()})}catch(c){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"fetch",durationMs:Date.now()-r,error:c}),new Ba({message:`Network error calling POST ${t}`,cause:c,method:"POST",path:t,url:i,requestId:s,phase:"fetch",timeoutMs:q1,timestamp:Date.now(),durationMs:Date.now()-r})}let a;const u=l.clone();try{a=await l.json()}catch(c){throw this.tracer.restFailure?.({method:"POST",path:t,requestId:s,phase:"parse",durationMs:Date.now()-r,status:l.status,error:c}),new Ba({message:`Failed to parse JSON response from POST ${t}`,cause:c,method:"POST",path:t,url:i,requestId:s,phase:"parse",timeoutMs:q1,status:l.status,statusText:l.statusText,contentType:l.headers.get("content-type")??void 0,bodyPreview:await $4(u),timestamp:Date.now(),durationMs:Date.now()-r})}if(this.tracer.restResponse?.({method:"POST",path:t,requestId:s,status:l.status,durationMs:Date.now()-r,code:a.code,msg:a.msg,envelopeRequestId:a.request_id,data:a.data}),this.checkAuthRequired(l,a.code),a.code!==0){const c=a.code??l.status;throw new Wu({code:c,msg:a.msg??l.statusText,requestId:a.request_id??s,details:a.details,timestamp:Date.now(),durationMs:Date.now()-r})}return a.data}async patch(t,n){return this.request("PATCH",t,n)}async put(t,n){return this.request("PUT",t,n)}async delete(t){return this.request("DELETE",t)}async request(t,n,i,s,o=[],r=q1){let l=vd(this.opts.origin,n,this.opts.restBasePath);if(s){const g=new URLSearchParams;Ow(g,s);const m=g.toString();m&&(l=`${l}?${m}`)}const a=Yg(),u={"X-Request-Id":a};this.addClientHeaders(u),i!==void 0&&(u["Content-Type"]="application/json; charset=utf-8");const c=Date.now();this.tracer.restRequest?.({method:t,path:n,url:l,requestId:a,body:i});let d;try{d=await fetch(l,{method:t,headers:u,body:i!==void 0?JSON.stringify(i):void 0,signal:Qg(r)})}catch(g){throw this.tracer.restFailure?.({method:t,path:n,requestId:a,phase:"fetch",durationMs:Date.now()-c,error:g}),new Ba({message:`Network error calling ${t} ${n}`,cause:g,method:t,path:n,url:l,requestId:a,phase:"fetch",timeoutMs:r,timestamp:Date.now(),durationMs:Date.now()-c})}let f;const h=d.clone();try{const g=await d.text();f=d.status===204&&g===""?{code:0,msg:"",data:null,request_id:a}:JSON.parse(g)}catch(g){throw this.tracer.restFailure?.({method:t,path:n,requestId:a,phase:"parse",durationMs:Date.now()-c,status:d.status,error:g}),new Ba({message:`Failed to parse JSON response from ${t} ${n}`,cause:g,method:t,path:n,url:l,requestId:a,phase:"parse",timeoutMs:r,status:d.status,statusText:d.statusText,contentType:d.headers.get("content-type")??void 0,bodyPreview:await $4(h),timestamp:Date.now(),durationMs:Date.now()-c})}if(this.tracer.restResponse?.({method:t,path:n,requestId:a,status:d.status,durationMs:Date.now()-c,code:f.code,msg:f.msg,envelopeRequestId:f.request_id,data:f.data}),this.checkAuthRequired(d,f.code),f.code!==0&&!o.includes(f.code))throw new Wu({code:typeof f.code=="number"?f.code:d.status,msg:typeof f.msg=="string"&&f.msg.length>0?f.msg:`HTTP ${d.status}${d.statusText?` ${d.statusText}`:""}`,requestId:f.request_id??a,details:f.details,timestamp:Date.now(),durationMs:Date.now()-c});return f.data}addClientHeaders(t){const n=this.opts.credentialStore?.getToken();n!==void 0&&(t.Authorization=`Bearer ${n}`);const i=this.opts.identity;i!==void 0&&(t["X-Kimi-Client-Id"]=i.clientId,t["X-Kimi-Client-Name"]=i.clientName,t["X-Kimi-Client-Version"]=i.clientVersion,t["X-Kimi-Client-Ui-Mode"]=i.clientUiMode)}checkAuthRequired(t,n){(t.status===401||n===vF)&&this.opts.credentialStore?.markAuthRequired?.()}}function yF(e){return{inputTokens:e.input_tokens,outputTokens:e.output_tokens,cacheReadTokens:e.cache_read_tokens,cacheCreationTokens:e.cache_creation_tokens,totalCostUsd:e.total_cost_usd,contextTokens:e.context_tokens,contextLimit:e.context_limit,turnCount:e.turn_count}}function Z2(e){return e.contextTokens===0&&e.contextLimit===0&&e.inputTokens===0&&e.outputTokens===0&&e.turnCount===0}function LQ(e,t,n){return{...t,model:t.model.length>0?t.model:e.model,usage:Z2(t.usage)?e.usage:t.usage,updatedAt:!n&&t.updatedAt>e.updatedAt?t.updatedAt:e.updatedAt,pullRequest:t.pullRequest??e.pullRequest}}function xl(e){return{id:e.id,title:e.title,createdAt:e.created_at,updatedAt:e.updated_at,busy:e.busy,mainTurnActive:e.main_turn_active,pendingInteraction:e.pending_interaction,lastTurnReason:e.last_turn_reason,archived:e.archived??!1,archivedAt:e.archived_at,currentPromptId:e.current_prompt_id,lastPrompt:e.last_prompt,cwd:e.metadata.cwd,model:e.agent_config.model,usage:yF(e.usage),messageCount:e.message_count,lastSeq:e.last_seq,workspaceId:e.workspace_id,parentSessionId:typeof e.metadata.parent_session_id=="string"?e.metadata.parent_session_id:void 0}}function B4(e){const t=e.activity.status;return{id:e.id,title:e.meta.title??e.meta.last_prompt??e.id.slice(0,12),createdAt:new Date(e.meta.created_at).toISOString(),updatedAt:new Date(e.meta.updated_at).toISOString(),busy:t==="running",pendingInteraction:t==="approval"?"approval":t==="question"?"question":void 0,lastTurnReason:t==="failed"?"failed":void 0,archived:e.meta.archived,archivedAt:e.meta.archived_at==null?void 0:new Date(e.meta.archived_at).toISOString(),lastPrompt:e.meta.last_prompt??void 0,cwd:e.workspace.cwd??"",model:"",pullRequest:e.git===void 0?void 0:e.git.pull_request,usage:{inputTokens:0,outputTokens:0,cacheReadTokens:0,cacheCreationTokens:0,totalCostUsd:0,contextTokens:0,contextLimit:0,turnCount:0},messageCount:0,lastSeq:0,workspaceId:e.workspace.id.length>0?e.workspace.id:void 0}}function hp(e){return{id:e.id,root:e.root,name:e.name,lastOpenedAt:e.last_opened_at,sessionCount:e.session_count}}function jw(e){return e.kind==="base64"?{kind:"base64",mediaType:e.media_type,data:e.data}:e.kind==="file"?{kind:"file",fileId:e.file_id}:e.kind==="session_media"?{kind:"sessionMedia",fileId:e.file_id}:{kind:"url",url:e.url}}function D5(e){switch(e.type){case"text":return{type:"text",text:e.text};case"tool_use":return{type:"toolUse",toolCallId:e.tool_call_id,toolName:e.tool_name,input:e.input};case"tool_result":return{type:"toolResult",toolCallId:e.tool_call_id,output:e.output,isError:e.is_error};case"image":return{type:"image",source:jw(e.source)};case"video":return{type:"video",source:jw(e.source)};case"file":return{type:"file",fileId:e.file_id,name:e.name,mediaType:e.media_type,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};default:return{type:"unknown",raw:e}}}function Xk(e){return{id:e.id,sessionId:e.session_id,role:e.role,content:e.content.map(D5),createdAt:e.created_at,promptId:e.prompt_id,parentMessageId:e.parent_message_id,metadata:e.metadata}}function kF(e){switch(e.type){case"text":return{type:"text",text:e.text};case"toolUse":return{type:"tool_use",tool_call_id:e.toolCallId,tool_name:e.toolName,input:e.input};case"toolResult":return{type:"tool_result",tool_call_id:e.toolCallId,output:e.output,is_error:e.isError};case"image":case"video":{const t=e.source;let n;return t.kind==="base64"?n={kind:"base64",media_type:t.mediaType,data:t.data}:t.kind==="file"?n={kind:"file",file_id:t.fileId}:t.kind==="sessionMedia"?n={kind:"session_media",file_id:t.fileId}:n={kind:"url",url:t.url},{type:e.type,source:n}}case"file":return{type:"file",file_id:e.fileId,name:e.name,media_type:e.mediaType,size:e.size};case"thinking":return{type:"thinking",thinking:e.thinking,signature:e.signature};case"unknown":return e.raw}}function NQ(e){return{content:e.content.map(kF),metadata:e.metadata,agent_id:e.agentId,model:e.model,thinking:e.thinking,permission_mode:e.permissionMode,plan_mode:e.planMode,swarm_mode:e.swarmMode,goal_objective:e.goalObjective,goal_control:e.goalControl}}function FQ(e){return{decision:e.decision,scope:e.scope,feedback:e.feedback,selected_label:e.selectedLabel}}function bF(e){return{approvalId:e.approval_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,toolName:e.tool_name,action:e.action,display:e.tool_input_display??e.display,expiresAt:e.expires_at,createdAt:e.created_at}}function DQ(e){return{id:e.id,label:e.label,description:e.description,recommended:e.recommended===!0||e.is_recommended===!0}}function $Q(e){return{id:e.id,question:e.question,header:e.header,body:e.body,options:e.options.map(DQ),multiSelect:e.multi_select,allowOther:e.allow_other,otherLabel:e.other_label,otherDescription:e.other_description}}function AF(e){return{questionId:e.question_id,sessionId:e.session_id,turnId:e.turn_id,toolCallId:e.tool_call_id,questions:e.questions.map($Q),createdAt:e.created_at}}function BQ(e){switch(e.kind){case"single":return{kind:"single",option_id:e.optionId};case"multi":return{kind:"multi",option_ids:e.optionIds};case"other":return{kind:"other",text:e.text};case"multiWithOther":return{kind:"multi_with_other",option_ids:e.optionIds,other_text:e.otherText};case"skipped":return{kind:"skipped"}}}function zQ(e){const t={};for(const[n,i]of Object.entries(e.answers))t[n]=BQ(i);return{answers:t,method:e.method,note:e.note}}function Zm(e,t){return{id:e.id,agentId:e.agent_id??t,sessionId:e.session_id,kind:e.kind,description:e.description,status:e.status,command:e.command,createdAt:e.created_at,startedAt:e.started_at,completedAt:e.completed_at,outputPreview:e.output_preview,outputBytes:e.output_bytes,subagentPhase:e.subagent_phase,subagentType:e.subagent_type,model:e.model,thinkingEffort:e.thinking_effort,parentToolCallId:e.parent_tool_call_id,suspendedReason:e.suspended_reason,swarmIndex:e.swarm_index,runInBackground:e.run_in_background??(e.kind==="subagent"?!0:void 0)}}function Hw(e){return{path:e.path,name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modified_at,etag:e.etag,mime:e.mime,languageId:e.language_id,isBinary:e.is_binary,isSymlinkTo:e.is_symlink_to,gitStatus:e.git_status,childCount:e.child_count}}function Au(e,t){const n=e[t];return typeof n=="string"?n:void 0}function _f(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function il(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function CF(e){if(!e||typeof e!="object")return null;const t=e,n=Au(t,"status");if(n!=="active"&&n!=="paused"&&n!=="blocked"&&n!=="complete")return null;const i=t.budget,s=i&&typeof i=="object"?i:{};return{goalId:Au(t,"goalId")??Au(t,"goal_id")??"goal",objective:Au(t,"objective")??"",completionCriterion:Au(t,"completionCriterion")??Au(t,"completion_criterion"),status:n,turnsUsed:_f(t,"turnsUsed")??_f(t,"turns_used")??0,tokensUsed:_f(t,"tokensUsed")??_f(t,"tokens_used")??0,wallClockMs:_f(t,"wallClockMs")??_f(t,"wall_clock_ms")??0,terminalReason:Au(t,"terminalReason")??Au(t,"terminal_reason"),budget:{tokenBudget:il(s,"tokenBudget")??il(s,"token_budget"),remainingTokens:il(s,"remainingTokens")??il(s,"remaining_tokens"),turnBudget:il(s,"turnBudget")??il(s,"turn_budget"),remainingTurns:il(s,"remainingTurns")??il(s,"remaining_turns"),wallClockBudgetMs:il(s,"wallClockBudgetMs")??il(s,"wall_clock_budget_ms"),remainingWallClockMs:il(s,"remainingWallClockMs")??il(s,"remaining_wall_clock_ms"),overBudget:s.overBudget===!0||s.over_budget===!0}}}function RQ(e){const t=e;switch(e.type){case"event.session.created":return{type:"sessionCreated",session:xl(t.payload.session)};case"event.session.updated":return{type:"sessionUpdated",session:xl(t.payload.session),changedFields:t.payload.changed_fields};case"event.session.deleted":return{type:"sessionDeleted",sessionId:t.session_id};case"event.workspace.created":return{type:"workspaceCreated",workspace:hp(t.payload.workspace)};case"event.workspace.updated":return{type:"workspaceUpdated",workspace:hp(t.payload.workspace)};case"event.workspace.deleted":return{type:"workspaceDeleted",workspaceId:t.payload.workspace_id,root:t.payload.root};case"event.session.work_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.busy,mainTurnActive:t.payload.main_turn_active,pendingInteraction:t.payload.pending_interaction,lastTurnReason:t.payload.last_turn_reason};case"event.session.status_changed":return{type:"sessionWorkChanged",sessionId:t.session_id,busy:t.payload.status!=="idle"&&t.payload.status!=="aborted",mainTurnActive:t.payload.status!=="idle"&&t.payload.status!=="aborted",pendingInteraction:t.payload.status==="awaiting_approval"?"approval":t.payload.status==="awaiting_question"?"question":"none",lastTurnReason:t.payload.status==="aborted"?"cancelled":void 0};case"event.session.usage_updated":return{type:"sessionUsageUpdated",sessionId:t.session_id,usage:yF(t.payload.usage)};case"event.session.history_compacted":return{type:"historyCompacted",sessionId:t.session_id,beforeSeq:t.payload.before_seq,reason:t.payload.reason,summaryMessageId:t.payload.summary_message_id};case"event.goal.updated":{const n=CF(t.payload.snapshot??null);return{type:"goalUpdated",sessionId:t.session_id,goal:n?.status==="complete"?null:n}}case"event.message.created":return{type:"messageCreated",message:Xk(t.payload.message)};case"event.message.updated":return{type:"messageUpdated",sessionId:t.session_id,messageId:t.payload.message_id,content:t.payload.content.map(D5),status:t.payload.status};case"event.assistant.delta":return{type:"assistantDelta",sessionId:t.session_id,messageId:t.payload.message_id,contentIndex:t.payload.content_index,delta:t.payload.delta};case"event.assistant.tool_use_started":case"event.assistant.tool_use_delta":case"event.assistant.tool_use_completed":case"event.assistant.completed":case"event.tool.started":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.output":return{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.chunk,stream:t.payload.stream};case"event.tool.progress":return typeof t.payload.message=="string"&&t.payload.message.length>0?{type:"toolOutput",sessionId:t.session_id,toolCallId:t.payload.tool_call_id,outputChunk:t.payload.message,stream:"stdout"}:{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.tool.completed":return{type:"unknown",raw:{_noop:!0,_wireType:t.type}};case"event.approval.requested":return{type:"approvalRequested",sessionId:t.session_id,approval:bF(t.payload)};case"event.approval.resolved":return{type:"approvalResolved",sessionId:t.session_id,approvalId:t.payload.approval_id,decision:t.payload.decision,resolvedAt:t.payload.resolved_at,feedback:t.payload.feedback,selectedLabel:t.payload.selected_label};case"event.approval.expired":return{type:"approvalExpired",sessionId:t.session_id,approvalId:t.payload.approval_id};case"event.question.requested":return{type:"questionRequested",sessionId:t.session_id,question:AF(t.payload)};case"event.question.answered":return{type:"questionAnswered",sessionId:t.session_id,questionId:t.payload.question_id,resolvedAt:t.payload.resolved_at};case"event.question.dismissed":return{type:"questionDismissed",sessionId:t.session_id,questionId:t.payload.question_id,dismissedAt:t.payload.dismissed_at};case"event.task.created":return{type:"taskCreated",sessionId:t.session_id,task:Zm(t.payload.task)};case"event.task.progress":return{type:"taskProgress",sessionId:t.session_id,taskId:t.payload.task_id,outputChunk:t.payload.output_chunk,stream:t.payload.stream};case"event.task.completed":return{type:"taskCompleted",sessionId:t.session_id,taskId:t.payload.task_id,status:t.payload.status,outputPreview:t.payload.output_preview,outputBytes:t.payload.output_bytes};case"event.plugin.changed":return{type:"pluginsChanged"};case"event.capability.changed":return{type:"capabilityChanged",capabilityId:t.payload.capability_id,install:t.payload.install};case"event.config.changed":return{type:"configChanged",changedFields:t.payload.changed_fields,config:eb(t.payload.config)};case"event.model_catalog.changed":return{type:"modelCatalogChanged",changed:t.payload.changed.map(n=>({providerId:n.provider_id,providerName:n.provider_name,added:n.added,removed:n.removed})),unchanged:t.payload.unchanged,failed:t.payload.failed};default:return{type:"unknown",raw:e}}}function OQ(e){return{id:e.model,provider:e.provider,model:e.model,displayName:e.display_name,maxContextSize:e.max_context_size,capabilities:e.capabilities,supportEfforts:e.support_efforts,defaultEffort:e.default_effort}}function If(e){return{id:e.id,type:e.type,baseUrl:e.base_url,defaultModel:e.default_model,hasApiKey:e.has_api_key,status:e.status,models:e.models}}function Ww(e){return{id:e.id,name:e.name,wireType:e.wire_type,guessed:e.guessed,needsBaseUrl:e.needs_base_url,rejected:e.rejected,rejectReason:e.reject_reason,envKey:e.env_key,models:e.models.map(t=>({id:t.id,name:t.name,maxContextSize:t.max_context_size,capabilities:t.capabilities,reasoning:t.reasoning}))}}function eb(e){const t={};for(const[n,i]of Object.entries(e.providers))t[n]={type:i.type,baseUrl:i.base_url,defaultModel:i.default_model,hasApiKey:i.has_api_key};return{providers:t,defaultProvider:e.default_provider,defaultModel:e.default_model,secondaryModel:e.secondary_model,models:e.models,thinking:e.thinking,planMode:e.plan_mode,yolo:e.yolo,defaultPermissionMode:e.default_permission_mode,defaultPlanMode:e.default_plan_mode,permission:e.permission,hooks:e.hooks,services:e.services,mergeAllAvailableSkills:e.merge_all_available_skills,extraSkillDirs:e.extra_skill_dirs,loopControl:e.loop_control,background:e.background,experimental:e.experimental,telemetry:e.telemetry,raw:e.raw}}function PQ(e){return e.session_id}function jQ(e){return e.seq}function HQ(e){const t=Number(e.slice(1));return Number.isFinite(t)?t:0}const WQ={items:[],tasks:new Map,interactions:new Map,attachments:new Map,todos:new Map,prompts:new Map,meta:{},pendingInteractions:new Set,hasMoreOlder:!1};function qQ(e,t){switch(t.op){case"reset":return UQ(e,t);case"turn.upsert":return VQ(e,t.turn);case"step.upsert":return GQ(e,t.turnId,t.step);case"frame.upsert":return YQ(e,t);case"append":return XQ(e,t);case"marker.upsert":return Uw(e,t.item,t.item.markerId,t.beforeTurn);case"taskref.upsert":return Uw(e,t.item,t.item.refId,t.beforeTurn);case"task.upsert":return nY(e,t.task);case"interaction.upsert":return iY(e,t.interaction);case"attachment.upsert":return oY(e,t.attachment);case"todo.upsert":return lY(e,t.todo);case"prompt.upsert":return uY(e,t.prompt);case"meta.merge":return fY(e,t.meta);case"items.remove":return tY(e,t.ids)}}function UQ(e,t){const n=new Set;for(const i of t.snapshot.interactions)i.state==="pending"&&n.add(i.interactionId);return{state:{items:t.snapshot.items,tasks:new Map(t.snapshot.tasks.map(i=>[i.taskId,i])),interactions:new Map(t.snapshot.interactions.map(i=>[i.interactionId,i])),attachments:new Map(t.snapshot.attachments.map(i=>[i.attachmentId,i])),todos:new Map(t.snapshot.todos.map(i=>[i.todoId,i])),prompts:new Map(t.snapshot.prompts.map(i=>[i.promptId,i])),meta:t.snapshot.meta,pendingInteractions:n,hasMoreOlder:t.snapshot.hasMoreOlder??!1},changed:!0}}function qw(e,t){return{...e,kind:"turn",steps:[...t]}}function wF(e){return{kind:"turn",turnId:e,ordinal:HQ(e),state:"running",origin:{kind:"other"},steps:[]}}function KQ(e,t){const n=Number(e.slice(t.length+1))||0;return{kind:"step",stepId:e,turnId:t,ordinal:n,state:"running",frames:[]}}function Th(e,t){const n=e.items.find(i=>i.kind==="turn"&&i.turnId===t);return n?.kind==="turn"?n:void 0}function $5(e,t){const n=[...e];let i=n.length;for(let s=0;s<n.length;s+=1){const o=n[s];if(o?.kind==="turn"&&o.ordinal>t.ordinal){i=s;break}}return n.splice(i,0,t),n}function $y(e,t,n){return e.map(i=>i.kind==="turn"&&i.turnId===t?n(i):i)}function VQ(e,t){const n=Th(e,t.turnId);return n?ZQ(n,t)?{state:e,changed:!1}:{state:{...e,items:$y(e.items,t.turnId,i=>qw(t,i.steps))},changed:!0}:{state:{...e,items:$5(e.items,qw(t,[]))},changed:!0}}function ZQ(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.prompt===t.prompt&&e.attachmentIds===t.attachmentIds&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.origin.kind===t.origin.kind&&e.origin.payload===t.origin.payload&&e.usage===t.usage&&e.durationMs===t.durationMs&&e.error===t.error}function GQ(e,t,n){const i=Th(e,t)??wF(t),s=i.steps.findIndex(u=>u.stepId===n.stepId);let o,r=!0;if(s>=0){const u=i.steps[s];u&&QQ(u,n)?(r=!1,o=i.steps):o=i.steps.map(c=>c.stepId===n.stepId?{...n,kind:"step",frames:c.frames}:c)}else o=[...i.steps,{...n,kind:"step",frames:[]}].toSorted((u,c)=>u.ordinal-c.ordinal);if(!r)return{state:e,changed:!1};const l={...i,steps:[...o]},a=Th(e,t)?$y(e.items,t,()=>l):$5(e.items,l);return{state:{...e,items:a},changed:!0}}function QQ(e,t){return e.ordinal===t.ordinal&&e.state===t.state&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.usage===t.usage&&e.finishReason===t.finishReason&&e.timing===t.timing&&e.retry===t.retry&&e.endReason===t.endReason&&e.endMessage===t.endMessage}function YQ(e,t){const n=Th(e,t.turnId)??wF(t.turnId),i=n.steps.find(c=>c.stepId===t.stepId)??KQ(t.stepId,t.turnId),s=i.frames.findIndex(c=>c.frameId===t.frame.frameId);let o;if(s>=0){const c=i.frames[s];if(c!==void 0&&JQ(c,t.frame))return{state:e,changed:!1};o=i.frames.map(d=>d.frameId===t.frame.frameId?t.frame:d)}else o=[...i.frames,t.frame];const r={...i,frames:[...o]},l=n.steps.some(c=>c.stepId===t.stepId)?n.steps.map(c=>c.stepId===t.stepId?r:c):[...n.steps,r].toSorted((c,d)=>c.ordinal-d.ordinal),a={...n,steps:l},u=Th(e,t.turnId)?$y(e.items,t.turnId,()=>a):$5(e.items,a);return{state:{...e,items:u},changed:!0}}function JQ(e,t){return e.kind!==t.kind?!1:e.kind==="text"&&t.kind==="text"?e.text===t.text&&e.role===t.role&&e.attachmentIds===t.attachmentIds&&e.taskId===t.taskId:e.kind==="thinking"&&t.kind==="thinking"?e.text===t.text:e.kind==="tool"&&t.kind==="tool"?e.state===t.state&&e.toolCallId===t.toolCallId&&e.name===t.name&&e.view===t.view&&e.input===t.input&&e.output===t.output&&e.display===t.display&&e.error===t.error&&e.inputText===t.inputText&&e.progress===t.progress&&e.taskId===t.taskId&&e.approvalId===t.approvalId&&e.todoId===t.todoId&&e.agentRefs===t.agentRefs:e.kind==="notice"&&t.kind==="notice"?e.message===t.message&&e.level===t.level&&e.detail===t.detail:!1}function XQ(e,t){if(t.target.type==="task")return eY(e,t);const{turnId:n,stepId:i,frameId:s}=t.target,o=Th(e,n),r=o?.steps.find(f=>f.stepId===i),l=r?.frames.find(f=>f.frameId===s);if(!o||!r||!l||l.kind!=="text"&&l.kind!=="thinking")return{state:e,changed:!1,gap:{expected:0,got:t.offset}};const a=xF(l.text,t.offset,t.text);if(a.gap)return{state:e,changed:!1,gap:a.gap};if(!a.changed)return{state:e,changed:!1};const u={...l,text:a.text},c={...r,frames:r.frames.map(f=>f.frameId===s?u:f)},d={...o,steps:o.steps.map(f=>f.stepId===i?c:f)};return{state:{...e,items:$y(e.items,n,()=>d)},changed:!0}}function eY(e,t){if(t.target.type!=="task")throw new Error("unreachable");const n=t.target.taskId,i=e.tasks.get(n),s=i?.outputTail??"",o=xF(s,t.offset,t.text);if(o.gap)return{state:e,changed:!1,gap:o.gap};if(!o.changed)return{state:e,changed:!1};const r=i?{...i,outputTail:o.text}:{taskId:n,kind:"other",state:"running",detached:!1,outputTail:o.text},l=new Map(e.tasks);return l.set(n,r),{state:{...e,tasks:l},changed:!0}}function xF(e,t,n){if(t>e.length)return{text:e,changed:!1,gap:{expected:e.length,got:t}};if(e.slice(t,t+n.length)===n)return{text:e,changed:!1};const i=e.length-t;return e.slice(t)!==n.slice(0,i)?{text:e,changed:!1,gap:{expected:e.length,got:t}}:(i>0?n.slice(i):n).length===0?{text:e,changed:!1}:{text:e.slice(0,t)+n,changed:!0}}function Uw(e,t,n,i){if(e.items.some(o=>tb(o)===n)){let o=!1;const r=e.items.map(l=>tb(l)!==n||l===t?l:(o=!0,t));return o?{state:{...e,items:r},changed:!0}:{state:e,changed:!1}}if(i!==void 0){const o=[...e.items];let r=o.length;for(let l=0;l<o.length;l+=1){const a=o[l];if(a?.kind==="turn"&&a.ordinal>=i){r=l;break}}return o.splice(r,0,t),{state:{...e,items:o},changed:!0}}return{state:{...e,items:[...e.items,t]},changed:!0}}function tb(e){switch(e.kind){case"turn":return e.turnId;case"marker":return e.markerId;case"taskref":return e.refId}}function tY(e,t){const n=new Set(t),i=e.items.filter(l=>l.kind==="turn"&&n.has(l.turnId)),s=e.items.filter(l=>!n.has(tb(l)));if(s.length===e.items.length)return{state:e,changed:!1};let o=e.pendingInteractions,r=e.interactions;if(i.length>0){const l=new Set,a=new Set(o),u=new Set;for(const c of i)for(const d of c.steps)for(const f of d.frames)f.kind==="tool"&&l.add(f.toolCallId);for(const c of r.values())c.toolCallId!==void 0&&l.has(c.toolCallId)&&(u.add(c.interactionId),a.delete(c.interactionId));if(u.size>0){const c=new Map(r);for(const d of u)c.delete(d);r=c}o=a}return{state:{...e,items:s,interactions:r,pendingInteractions:o},changed:!0}}function nY(e,t){const n=e.tasks.get(t.taskId);if(n&&dY(n,t))return{state:e,changed:!1};const i=new Map(e.tasks);return i.set(t.taskId,t),{state:{...e,tasks:i},changed:!0}}function iY(e,t){const n=e.interactions.get(t.interactionId);if(n&&sY(n,t))return{state:e,changed:!1};const i=new Map(e.interactions);i.set(t.interactionId,t);let s=e.pendingInteractions;if(t.state==="pending"){if(!s.has(t.interactionId)){const o=new Set(s);o.add(t.interactionId),s=o}}else if(s.has(t.interactionId)){const o=new Set(s);o.delete(t.interactionId),s=o}return{state:{...e,interactions:i,pendingInteractions:s},changed:!0}}function sY(e,t){return e.interactionKind===t.interactionKind&&e.toolCallId===t.toolCallId&&e.state===t.state&&e.request===t.request&&e.response===t.response}function oY(e,t){const n=e.attachments.get(t.attachmentId);if(n&&rY(n,t))return{state:e,changed:!1};const i=new Map(e.attachments);return i.set(t.attachmentId,t),{state:{...e,attachments:i},changed:!0}}function rY(e,t){return e.mediaType===t.mediaType&&e.name===t.name&&e.size===t.size&&e.source===t.source&&e.placeholder===t.placeholder}function lY(e,t){const n=e.todos.get(t.todoId);if(n&&aY(n,t))return{state:e,changed:!1};const i=new Map(e.todos);return i.set(t.todoId,t),{state:{...e,todos:i},changed:!0}}function aY(e,t){return e.items===t.items&&e.updatedAt===t.updatedAt}function uY(e,t){const n=e.prompts.get(t.promptId);if(n&&cY(n,t))return{state:e,changed:!1};const i=new Map(e.prompts);return i.set(t.promptId,t),{state:{...e,prompts:i},changed:!0}}function cY(e,t){return e.status===t.status&&e.userMessageId===t.userMessageId&&e.content===t.content&&e.createdAt===t.createdAt&&e.finishedAt===t.finishedAt&&e.steeredAt===t.steeredAt}function dY(e,t){return e.kind===t.kind&&e.state===t.state&&e.detached===t.detached&&e.description===t.description&&e.agentId===t.agentId&&e.outputTail===t.outputTail&&e.startedAt===t.startedAt&&e.endedAt===t.endedAt&&e.resultSummary===t.resultSummary&&e.error===t.error&&e.stateReason===t.stateReason&&e.usage===t.usage}function fY(e,t){const n=t.modes!==void 0?{plan:t.modes.plan===null?void 0:t.modes.plan??e.meta.modes?.plan,swarm:t.modes.swarm===null?void 0:t.modes.swarm??e.meta.modes?.swarm}:e.meta.modes,i=t.agent!==void 0?{...e.meta.agent,...t.agent}:e.meta.agent,s={goal:t.goal??e.meta.goal,activity:t.activity??e.meta.activity,modes:n!==void 0&&n.plan===void 0&&n.swarm===void 0?void 0:n,agent:i};return s.goal===e.meta.goal&&s.activity===e.meta.activity&&s.modes===e.meta.modes&&s.agent===e.meta.agent?{state:e,changed:!1}:{state:{...e,meta:s},changed:!0}}class hY{constructor(t){this.agentId=t}#e=WQ;#t=new Set;receive(t){return this.apply(t)}apply(t){const n=[];let i,s=this.#e;for(const o of t){const r=qQ(s,o);if(r.gap){i={target:o.target,...r.gap};continue}r.changed&&(s=r.state,n.push(o))}if(this.#e=s,n.length>0){const o={agentId:this.agentId,ops:n};for(const r of this.#t)r(o)}return{accepted:n,gap:i}}onChange(t){return this.#t.add(t),{dispose:()=>void this.#t.delete(t)}}getItems(){return this.#e.items}getTurn(t){const n=this.#e.items.find(i=>i.kind==="turn"&&i.turnId===t);return n?.kind==="turn"?n:void 0}getTasks(){return this.#e.tasks}getTask(t){return this.#e.tasks.get(t)}getInteractions(){return this.#e.interactions}getInteraction(t){return this.#e.interactions.get(t)}getAttachments(){return this.#e.attachments}getAttachment(t){return this.#e.attachments.get(t)}getTodos(){return this.#e.todos}getTodo(t){return this.#e.todos.get(t)}getPrompts(){return this.#e.prompts}getPrompt(t){return this.#e.prompts.get(t)}getMeta(){return this.#e.meta}listPendingInteractions(){return[...this.#e.pendingInteractions]}get hasMoreOlder(){return this.#e.hasMoreOlder}snapshot(t){let n=this.#e.items,i=this.#e.hasMoreOlder;if(t!==void 0){const s=n.reduce((o,r)=>r.kind==="turn"?o+1:o,0);if(s>t.tailTurns){const o=s-t.tailTurns,r=[];let l=0;for(const a of n)if(a.kind==="turn"){if(l+=1,l<=o)continue;r.push(a)}else l>o&&r.push(a);n=r,i=!0}}return{items:n,tasks:[...this.#e.tasks.values()],interactions:[...this.#e.interactions.values()],attachments:[...this.#e.attachments.values()],todos:[...this.#e.todos.values()],prompts:[...this.#e.prompts.values()],meta:this.#e.meta,hasMoreOlder:i}}}function bt(e,t,n){function i(l,a){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:a,constr:r,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,a);const u=r.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){const f=c[d];f in l||(l[f]=u[f].bind(l))}}const s=n?.Parent??Object;class o extends s{}Object.defineProperty(o,"name",{value:e});function r(l){var a;const u=n?.Parent?new o:this;i(u,l),(a=u._zod).deferred??(a.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(r,"init",{value:i}),Object.defineProperty(r,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(r,"name",{value:e}),r}class dh extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class SF extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const _F={};function oc(e){return _F}function IF(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,s])=>t.indexOf(+i)===-1).map(([i,s])=>s)}function nb(e,t){return typeof t=="bigint"?t.toString():t}function By(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function B5(e){return e==null}function z5(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function pY(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let s=(i.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(i)){const a=i.match(/\d?e-(\d?)/);a?.[1]&&(s=Number.parseInt(a[1]))}const o=n>s?n:s,r=Number.parseInt(e.toFixed(o).replace(".","")),l=Number.parseInt(t.toFixed(o).replace(".",""));return r%l/10**o}const Kw=Symbol("evaluating");function mi(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==Kw)return i===void 0&&(i=Kw,i=n()),i},set(s){Object.defineProperty(e,t,{value:s})},configurable:!0})}function ef(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ac(...e){const t={};for(const n of e){const i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function Vw(e){return JSON.stringify(e)}function gY(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const MF="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function t0(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const mY=By(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Lh(e){if(t0(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(t0(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function EF(e){return Lh(e)?{...e}:Array.isArray(e)?[...e]:e}const vY=new Set(["string","number","symbol"]);function Nh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cc(e,t,n){const i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function dn(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function yY(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const kY={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function bY(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=Ac(e._zod.def,{get shape(){const r={};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(r[l]=n.shape[l])}return ef(this,"shape",r),r},checks:[]});return Cc(e,o)}function AY(e,t){const n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=Ac(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete r[l]}return ef(this,"shape",r),r},checks:[]});return Cc(e,o)}function CY(e,t){if(!Lh(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const r in t)if(Object.getOwnPropertyDescriptor(o,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=Ac(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return ef(this,"shape",o),o}});return Cc(e,s)}function wY(e,t){if(!Lh(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Ac(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return ef(this,"shape",i),i}});return Cc(e,n)}function xY(e,t){const n=Ac(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return ef(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Cc(e,n)}function SY(e,t,n){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=Ac(t._zod.def,{get shape(){const l=t._zod.def.shape,a={...l};if(n)for(const u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(a[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(const u in l)a[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return ef(this,"shape",a),a},checks:[]});return Cc(t,r)}function _Y(e,t,n){const i=Ac(t._zod.def,{get shape(){const s=t._zod.def.shape,o={...s};if(n)for(const r in n){if(!(r in o))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(o[r]=new e({type:"nonoptional",innerType:s[r]}))}else for(const r in s)o[r]=new e({type:"nonoptional",innerType:s[r]});return ef(this,"shape",o),o}});return Cc(t,i)}function Gf(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Qf(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Jg(e){return typeof e=="string"?e:e?.message}function rc(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const s=Jg(e.inst?._zod.def?.error?.(e))??Jg(t?.error?.(e))??Jg(n.customError?.(e))??Jg(n.localeError?.(e))??"Invalid input";i.message=s}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function R5(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function n0(...e){const[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}const TF=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,nb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},LF=bt("$ZodError",TF),NF=bt("$ZodError",TF,{Parent:Error});function IY(e,t=n=>n.message){const n={},i=[];for(const s of e.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):i.push(t(s));return{formErrors:i,fieldErrors:n}}function MY(e,t=n=>n.message){const n={_errors:[]},i=s=>{for(const o of s.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(r=>i({issues:r}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let r=n,l=0;for(;l<o.path.length;){const a=o.path[l];l===o.path.length-1?(r[a]=r[a]||{_errors:[]},r[a]._errors.push(t(o))):r[a]=r[a]||{_errors:[]},r=r[a],l++}}};return i(e),n}const O5=e=>(t,n,i,s)=>{const o=i?Object.assign(i,{async:!1}):{async:!1},r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise)throw new dh;if(r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>rc(a,o,oc())));throw MF(l,s?.callee),l}return r.value},P5=e=>async(t,n,i,s)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise&&(r=await r),r.issues.length){const l=new(s?.Err??e)(r.issues.map(a=>rc(a,o,oc())));throw MF(l,s?.callee),l}return r.value},zy=e=>(t,n,i)=>{const s=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new dh;return o.issues.length?{success:!1,error:new(e??LF)(o.issues.map(r=>rc(r,s,oc())))}:{success:!0,data:o.value}},EY=zy(NF),Ry=e=>async(t,n,i)=>{const s=i?Object.assign(i,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},s);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(r=>rc(r,s,oc())))}:{success:!0,data:o.value}},TY=Ry(NF),LY=e=>(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return O5(e)(t,n,s)},NY=e=>(t,n,i)=>O5(e)(t,n,i),FY=e=>async(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return P5(e)(t,n,s)},DY=e=>async(t,n,i)=>P5(e)(t,n,i),$Y=e=>(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return zy(e)(t,n,s)},BY=e=>(t,n,i)=>zy(e)(t,n,i),zY=e=>async(t,n,i)=>{const s=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ry(e)(t,n,s)},RY=e=>async(t,n,i)=>Ry(e)(t,n,i),OY=/^[cC][^\s-]{8,}$/,PY=/^[0-9a-z]+$/,jY=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,HY=/^[0-9a-vA-V]{20}$/,WY=/^[A-Za-z0-9]{27}$/,qY=/^[a-zA-Z0-9_-]{21}$/,UY=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,KY=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Zw=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,VY=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ZY="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function GY(){return new RegExp(ZY,"u")}const QY=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,YY=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,JY=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,XY=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eJ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,FF=/^[A-Za-z0-9_-]*$/,tJ=/^\+[1-9]\d{6,14}$/,DF="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",nJ=new RegExp(`^${DF}$`);function $F(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function iJ(e){return new RegExp(`^${$F(e)}$`)}function sJ(e){const t=$F({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${DF}T(?:${i})$`)}const oJ=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},rJ=/^-?\d+$/,BF=/^-?\d+(?:\.\d+)?$/,lJ=/^(?:true|false)$/i,aJ=/^[^A-Z]*$/,uJ=/^[^a-z]*$/,Nr=bt("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),zF={number:"number",bigint:"bigint",object:"date"},RF=bt("$ZodCheckLessThan",(e,t)=>{Nr.init(e,t);const n=zF[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,o=(t.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),OF=bt("$ZodCheckGreaterThan",(e,t)=>{Nr.init(e,t);const n=zF[typeof t.value];e._zod.onattach.push(i=>{const s=i._zod.bag,o=(t.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cJ=bt("$ZodCheckMultipleOf",(e,t)=>{Nr.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):pY(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),dJ=bt("$ZodCheckNumberFormat",(e,t)=>{Nr.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[s,o]=kY[t.format];e._zod.onattach.push(r=>{const l=r._zod.bag;l.format=t.format,l.minimum=s,l.maximum=o,n&&(l.pattern=rJ)}),e._zod.check=r=>{const l=r.value;if(n){if(!Number.isInteger(l)){r.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?r.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):r.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}l<s&&r.issues.push({origin:"number",input:l,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),l>o&&r.issues.push({origin:"number",input:l,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),fJ=bt("$ZodCheckMaxLength",(e,t)=>{var n;Nr.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!B5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<s&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const s=i.value;if(s.length<=t.maximum)return;const r=R5(s);i.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),hJ=bt("$ZodCheckMinLength",(e,t)=>{var n;Nr.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!B5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>s&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const s=i.value;if(s.length>=t.minimum)return;const r=R5(s);i.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:s,inst:e,continue:!t.abort})}}),pJ=bt("$ZodCheckLengthEquals",(e,t)=>{var n;Nr.init(e,t),(n=e._zod.def).when??(n.when=i=>{const s=i.value;return!B5(s)&&s.length!==void 0}),e._zod.onattach.push(i=>{const s=i._zod.bag;s.minimum=t.length,s.maximum=t.length,s.length=t.length}),e._zod.check=i=>{const s=i.value,o=s.length;if(o===t.length)return;const r=R5(s),l=o>t.length;i.issues.push({origin:r,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Oy=bt("$ZodCheckStringFormat",(e,t)=>{var n,i;Nr.init(e,t),e._zod.onattach.push(s=>{const o=s._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),gJ=bt("$ZodCheckRegex",(e,t)=>{Oy.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),mJ=bt("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=aJ),Oy.init(e,t)}),vJ=bt("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=uJ),Oy.init(e,t)}),yJ=bt("$ZodCheckIncludes",(e,t)=>{Nr.init(e,t);const n=Nh(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(s=>{const o=s._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=s=>{s.value.includes(t.includes,t.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:s.value,inst:e,continue:!t.abort})}}),kJ=bt("$ZodCheckStartsWith",(e,t)=>{Nr.init(e,t);const n=new RegExp(`^${Nh(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),bJ=bt("$ZodCheckEndsWith",(e,t)=>{Nr.init(e,t);const n=new RegExp(`.*${Nh(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}}),AJ=bt("$ZodCheckOverwrite",(e,t)=>{Nr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class CJ{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const i=t.split(` +`).filter(r=>r),s=Math.min(...i.map(r=>r.length-r.trimStart().length)),o=i.map(r=>r.slice(s)).map(r=>" ".repeat(this.indent*2)+r);for(const r of o)this.content.push(r)}compile(){const t=Function,n=this?.args,s=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,s.join(` +`))}}const wJ={major:4,minor:3,patch:6},us=bt("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wJ;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const s of i)for(const o of s._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(r,l,a)=>{let u=Gf(r),c;for(const d of l){if(d._zod.def.when){if(!d._zod.def.when(r))continue}else if(u)continue;const f=r.issues.length,h=d._zod.check(r);if(h instanceof Promise&&a?.async===!1)throw new dh;if(c||h instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await h,r.issues.length!==f&&(u||(u=Gf(r,f)))});else{if(r.issues.length===f)continue;u||(u=Gf(r,f))}}return c?c.then(()=>r):r},o=(r,l,a)=>{if(Gf(r))return r.aborted=!0,r;const u=s(l,i,a);if(u instanceof Promise){if(a.async===!1)throw new dh;return u.then(c=>e._zod.parse(c,a))}return e._zod.parse(u,a)};e._zod.run=(r,l)=>{if(l.skipChecks)return e._zod.parse(r,l);if(l.direction==="backward"){const u=e._zod.parse({value:r.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(c=>o(c,r,l)):o(u,r,l)}const a=e._zod.parse(r,l);if(a instanceof Promise){if(l.async===!1)throw new dh;return a.then(u=>s(u,i,l))}return s(a,i,l)}}mi(e,"~standard",()=>({validate:s=>{try{const o=EY(e,s);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return TY(e,s).then(r=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),j5=bt("$ZodString",(e,t)=>{us.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??oJ(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Xi=bt("$ZodStringFormat",(e,t)=>{Oy.init(e,t),j5.init(e,t)}),xJ=bt("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=KY),Xi.init(e,t)}),SJ=bt("$ZodUUID",(e,t)=>{if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Zw(i))}else t.pattern??(t.pattern=Zw());Xi.init(e,t)}),_J=bt("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=VY),Xi.init(e,t)}),IJ=bt("$ZodURL",(e,t)=>{Xi.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),s=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(s.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=s.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),MJ=bt("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=GY()),Xi.init(e,t)}),EJ=bt("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=qY),Xi.init(e,t)}),TJ=bt("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=OY),Xi.init(e,t)}),LJ=bt("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=PY),Xi.init(e,t)}),NJ=bt("$ZodULID",(e,t)=>{t.pattern??(t.pattern=jY),Xi.init(e,t)}),FJ=bt("$ZodXID",(e,t)=>{t.pattern??(t.pattern=HY),Xi.init(e,t)}),DJ=bt("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=WY),Xi.init(e,t)}),$J=bt("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=sJ(t)),Xi.init(e,t)}),BJ=bt("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=nJ),Xi.init(e,t)}),zJ=bt("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=iJ(t)),Xi.init(e,t)}),RJ=bt("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=UY),Xi.init(e,t)}),OJ=bt("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=QY),Xi.init(e,t),e._zod.bag.format="ipv4"}),PJ=bt("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=YY),Xi.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),jJ=bt("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=JY),Xi.init(e,t)}),HJ=bt("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=XY),Xi.init(e,t),e._zod.check=n=>{const i=n.value.split("/");try{if(i.length!==2)throw new Error;const[s,o]=i;if(!o)throw new Error;const r=Number(o);if(`${r}`!==o)throw new Error;if(r<0||r>128)throw new Error;new URL(`http://[${s}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function PF(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const WJ=bt("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=eJ),Xi.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{PF(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function qJ(e){if(!FF.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return PF(n)}const UJ=bt("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=FF),Xi.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{qJ(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),KJ=bt("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tJ),Xi.init(e,t)});function VJ(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[i]=n;if(!i)return!1;const s=JSON.parse(atob(i));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||t&&(!("alg"in s)||s.alg!==t))}catch{return!1}}const ZJ=bt("$ZodJWT",(e,t)=>{Xi.init(e,t),e._zod.check=n=>{VJ(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),jF=bt("$ZodNumber",(e,t)=>{us.init(e,t),e._zod.pattern=e._zod.bag.pattern??BF,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const o=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...o?{received:o}:{}}),n}}),GJ=bt("$ZodNumberFormat",(e,t)=>{dJ.init(e,t),jF.init(e,t)}),QJ=bt("$ZodBoolean",(e,t)=>{us.init(e,t),e._zod.pattern=lJ,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}const s=n.value;return typeof s=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),n}}),YJ=bt("$ZodUnknown",(e,t)=>{us.init(e,t),e._zod.parse=n=>n}),JJ=bt("$ZodNever",(e,t)=>{us.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Gw(e,t,n){e.issues.length&&t.issues.push(...Qf(n,e.issues)),t.value[n]=e.value}const XJ=bt("$ZodArray",(e,t)=>{us.init(e,t),e._zod.parse=(n,i)=>{const s=n.value;if(!Array.isArray(s))return n.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),n;n.value=Array(s.length);const o=[];for(let r=0;r<s.length;r++){const l=s[r],a=t.element._zod.run({value:l,issues:[]},i);a instanceof Promise?o.push(a.then(u=>Gw(u,n,r))):Gw(a,n,r)}return o.length?Promise.all(o).then(()=>n):n}});function G2(e,t,n,i,s){if(e.issues.length){if(s&&!(n in i))return;t.issues.push(...Qf(n,e.issues))}e.value===void 0?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function HF(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const n=yY(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function WF(e,t,n,i,s,o){const r=[],l=s.keySet,a=s.catchall._zod,u=a.def.type,c=a.optout==="optional";for(const d in t){if(l.has(d))continue;if(u==="never"){r.push(d);continue}const f=a.run({value:t[d],issues:[]},i);f instanceof Promise?e.push(f.then(h=>G2(h,n,d,t,c))):G2(f,n,d,t,c)}return r.length&&n.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const eX=bt("$ZodObject",(e,t)=>{if(us.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const a={...l};return Object.defineProperty(t,"shape",{value:a}),a}})}const i=By(()=>HF(t));mi(e._zod,"propValues",()=>{const l=t.shape,a={};for(const u in l){const c=l[u]._zod;if(c.values){a[u]??(a[u]=new Set);for(const d of c.values)a[u].add(d)}}return a});const s=t0,o=t.catchall;let r;e._zod.parse=(l,a)=>{r??(r=i.value);const u=l.value;if(!s(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const c=[],d=r.shape;for(const f of r.keys){const h=d[f],g=h._zod.optout==="optional",m=h._zod.run({value:u[f],issues:[]},a);m instanceof Promise?c.push(m.then(y=>G2(y,l,f,u,g))):G2(m,l,f,u,g)}return o?WF(c,u,l,a,i.value,e):c.length?Promise.all(c).then(()=>l):l}}),tX=bt("$ZodObjectJIT",(e,t)=>{eX.init(e,t);const n=e._zod.parse,i=By(()=>HF(t)),s=f=>{const h=new CJ(["shape","payload","ctx"]),g=i.value,m=C=>{const v=Vw(C);return`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};h.write("const input = payload.value;");const y=Object.create(null);let A=0;for(const C of g.keys)y[C]=`key_${A++}`;h.write("const newResult = {};");for(const C of g.keys){const v=y[C],x=Vw(C),_=f[C]?._zod?.optout==="optional";h.write(`const ${v} = ${m(C)};`),_?h.write(` + if (${v}.issues.length) { + if (${x} in input) { + payload.issues = payload.issues.concat(${v}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${x}, ...iss.path] : [${x}] + }))); + } + } + + if (${v}.value === undefined) { + if (${x} in input) { + newResult[${x}] = undefined; + } + } else { + newResult[${x}] = ${v}.value; + } + + `):h.write(` + if (${v}.issues.length) { + payload.issues = payload.issues.concat(${v}.issues.map(iss => ({ + ...iss, + path: iss.path ? [${x}, ...iss.path] : [${x}] + }))); + } + + if (${v}.value === undefined) { + if (${x} in input) { + newResult[${x}] = undefined; + } + } else { + newResult[${x}] = ${v}.value; + } + + `)}h.write("payload.value = newResult;"),h.write("return payload;");const b=h.compile();return(C,v)=>b(f,C,v)};let o;const r=t0,l=!_F.jitless,u=l&&mY.value,c=t.catchall;let d;e._zod.parse=(f,h)=>{d??(d=i.value);const g=f.value;return r(g)?l&&u&&h?.async===!1&&h.jitless!==!0?(o||(o=s(t.shape)),f=o(f,h),c?WF([],g,f,h,d,e):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function Qw(e,t,n,i){for(const o of e)if(o.issues.length===0)return t.value=o.value,t;const s=e.filter(o=>!Gf(o));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(r=>rc(r,i,oc())))}),t)}const qF=bt("$ZodUnion",(e,t)=>{us.init(e,t),mi(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),mi(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),mi(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),mi(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${s.map(o=>z5(o.source)).join("|")})$`)}});const n=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(s,o)=>{if(n)return i(s,o);let r=!1;const l=[];for(const a of t.options){const u=a._zod.run({value:s.value,issues:[]},o);if(u instanceof Promise)l.push(u),r=!0;else{if(u.issues.length===0)return u;l.push(u)}}return r?Promise.all(l).then(a=>Qw(a,s,e,o)):Qw(l,s,e,o)}}),nX=bt("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,qF.init(e,t);const n=e._zod.parse;mi(e._zod,"propValues",()=>{const s={};for(const o of t.options){const r=o._zod.propValues;if(!r||Object.keys(r).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[l,a]of Object.entries(r)){s[l]||(s[l]=new Set);for(const u of a)s[l].add(u)}}return s});const i=By(()=>{const s=t.options,o=new Map;for(const r of s){const l=r._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(const a of l){if(o.has(a))throw new Error(`Duplicate discriminator value "${String(a)}"`);o.set(a,r)}}return o});e._zod.parse=(s,o)=>{const r=s.value;if(!t0(r))return s.issues.push({code:"invalid_type",expected:"object",input:r,inst:e}),s;const l=i.value.get(r?.[t.discriminator]);return l?l._zod.run(s,o):t.unionFallback?n(s,o):(s.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:r,path:[t.discriminator],inst:e}),s)}}),iX=bt("$ZodIntersection",(e,t)=>{us.init(e,t),e._zod.parse=(n,i)=>{const s=n.value,o=t.left._zod.run({value:s,issues:[]},i),r=t.right._zod.run({value:s,issues:[]},i);return o instanceof Promise||r instanceof Promise?Promise.all([o,r]).then(([a,u])=>Yw(n,a,u)):Yw(n,o,r)}});function ib(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Lh(e)&&Lh(t)){const n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),s={...e,...t};for(const o of i){const r=ib(e[o],t[o]);if(!r.valid)return{valid:!1,mergeErrorPath:[o,...r.mergeErrorPath]};s[o]=r.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const s=e[i],o=t[i],r=ib(s,o);if(!r.valid)return{valid:!1,mergeErrorPath:[i,...r.mergeErrorPath]};n.push(r.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Yw(e,t,n){const i=new Map;let s;for(const l of t.issues)if(l.code==="unrecognized_keys"){s??(s=l);for(const a of l.keys)i.has(a)||i.set(a,{}),i.get(a).l=!0}else e.issues.push(l);for(const l of n.issues)if(l.code==="unrecognized_keys")for(const a of l.keys)i.has(a)||i.set(a,{}),i.get(a).r=!0;else e.issues.push(l);const o=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(o.length&&s&&e.issues.push({...s,keys:o}),Gf(e))return e;const r=ib(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const sX=bt("$ZodRecord",(e,t)=>{us.init(e,t),e._zod.parse=(n,i)=>{const s=n.value;if(!Lh(s))return n.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),n;const o=[],r=t.keyType._zod.values;if(r){n.value={};const l=new Set;for(const u of r)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);const c=t.valueType._zod.run({value:s[u],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&n.issues.push(...Qf(u,d.issues)),n.value[u]=d.value})):(c.issues.length&&n.issues.push(...Qf(u,c.issues)),n.value[u]=c.value)}let a;for(const u in s)l.has(u)||(a=a??[],a.push(u));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:a})}else{n.value={};for(const l of Reflect.ownKeys(s)){if(l==="__proto__")continue;let a=t.keyType._zod.run({value:l,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&BF.test(l)&&a.issues.length){const d=t.keyType._zod.run({value:Number(l),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(a=d)}if(a.issues.length){t.mode==="loose"?n.value[l]=s[l]:n.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(d=>rc(d,i,oc())),input:l,path:[l],inst:e});continue}const c=t.valueType._zod.run({value:s[l],issues:[]},i);c instanceof Promise?o.push(c.then(d=>{d.issues.length&&n.issues.push(...Qf(l,d.issues)),n.value[a.value]=d.value})):(c.issues.length&&n.issues.push(...Qf(l,c.issues)),n.value[a.value]=c.value)}}return o.length?Promise.all(o).then(()=>n):n}}),oX=bt("$ZodEnum",(e,t)=>{us.init(e,t);const n=IF(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(s=>vY.has(typeof s)).map(s=>typeof s=="string"?Nh(s):s.toString()).join("|")})$`),e._zod.parse=(s,o)=>{const r=s.value;return i.has(r)||s.issues.push({code:"invalid_value",values:n,input:r,inst:e}),s}}),rX=bt("$ZodLiteral",(e,t)=>{if(us.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Nh(i):i?Nh(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,s)=>{const o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),lX=bt("$ZodTransform",(e,t)=>{us.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new SF(e.constructor.name);const s=t.transform(n.value,n);if(i.async)return(s instanceof Promise?s:Promise.resolve(s)).then(r=>(n.value=r,n));if(s instanceof Promise)throw new dh;return n.value=s,n}});function Jw(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const UF=bt("$ZodOptional",(e,t)=>{us.init(e,t),e._zod.optin="optional",e._zod.optout="optional",mi(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),mi(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${z5(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>Jw(o,n.value)):Jw(s,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),aX=bt("$ZodExactOptional",(e,t)=>{UF.init(e,t),mi(e._zod,"values",()=>t.innerType._zod.values),mi(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),uX=bt("$ZodNullable",(e,t)=>{us.init(e,t),mi(e._zod,"optin",()=>t.innerType._zod.optin),mi(e._zod,"optout",()=>t.innerType._zod.optout),mi(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${z5(n.source)}|null)$`):void 0}),mi(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),cX=bt("$ZodDefault",(e,t)=>{us.init(e,t),e._zod.optin="optional",mi(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>Xw(o,t)):Xw(s,t)}});function Xw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const dX=bt("$ZodPrefault",(e,t)=>{us.init(e,t),e._zod.optin="optional",mi(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),fX=bt("$ZodNonOptional",(e,t)=>{us.init(e,t),mi(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>ex(o,e)):ex(s,e)}});function ex(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const hX=bt("$ZodCatch",(e,t)=>{us.init(e,t),mi(e._zod,"optin",()=>t.innerType._zod.optin),mi(e._zod,"optout",()=>t.innerType._zod.optout),mi(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(r=>rc(r,i,oc()))},input:n.value}),n.issues=[]),n)):(n.value=s.value,s.issues.length&&(n.value=t.catchValue({...n,error:{issues:s.issues.map(o=>rc(o,i,oc()))},input:n.value}),n.issues=[]),n)}}),pX=bt("$ZodPipe",(e,t)=>{us.init(e,t),mi(e._zod,"values",()=>t.in._zod.values),mi(e._zod,"optin",()=>t.in._zod.optin),mi(e._zod,"optout",()=>t.out._zod.optout),mi(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){const o=t.out._zod.run(n,i);return o instanceof Promise?o.then(r=>Xg(r,t.in,i)):Xg(o,t.in,i)}const s=t.in._zod.run(n,i);return s instanceof Promise?s.then(o=>Xg(o,t.out,i)):Xg(s,t.out,i)}});function Xg(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const gX=bt("$ZodReadonly",(e,t)=>{us.init(e,t),mi(e._zod,"propValues",()=>t.innerType._zod.propValues),mi(e._zod,"values",()=>t.innerType._zod.values),mi(e._zod,"optin",()=>t.innerType?._zod?.optin),mi(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);const s=t.innerType._zod.run(n,i);return s instanceof Promise?s.then(tx):tx(s)}});function tx(e){return e.value=Object.freeze(e.value),e}const mX=bt("$ZodCustom",(e,t)=>{Nr.init(e,t),us.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{const i=n.value,s=t.fn(i);if(s instanceof Promise)return s.then(o=>nx(o,n,i,e));nx(s,n,i,e)}});function nx(e,t,n,i){if(!e){const s={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(s.params=i._zod.def.params),t.issues.push(n0(s))}}var ix;class vX{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const i={...this.get(n)??{}};delete i.id;const s={...i,...this._map.get(t)};return Object.keys(s).length?s:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function yX(){return new vX}(ix=globalThis).__zod_globalRegistry??(ix.__zod_globalRegistry=yX());const U1=globalThis.__zod_globalRegistry;function kX(e,t){return new e({type:"string",...dn(t)})}function bX(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...dn(t)})}function sx(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...dn(t)})}function AX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...dn(t)})}function CX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...dn(t)})}function wX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...dn(t)})}function xX(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...dn(t)})}function SX(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...dn(t)})}function _X(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...dn(t)})}function IX(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...dn(t)})}function MX(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...dn(t)})}function EX(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...dn(t)})}function TX(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...dn(t)})}function LX(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...dn(t)})}function NX(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...dn(t)})}function FX(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...dn(t)})}function DX(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...dn(t)})}function $X(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...dn(t)})}function BX(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...dn(t)})}function zX(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...dn(t)})}function RX(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...dn(t)})}function OX(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...dn(t)})}function PX(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...dn(t)})}function jX(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...dn(t)})}function HX(e,t){return new e({type:"string",format:"date",check:"string_format",...dn(t)})}function WX(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...dn(t)})}function qX(e,t){return new e({type:"string",format:"duration",check:"string_format",...dn(t)})}function UX(e,t){return new e({type:"number",checks:[],...dn(t)})}function KX(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...dn(t)})}function VX(e,t){return new e({type:"boolean",...dn(t)})}function ZX(e){return new e({type:"unknown"})}function GX(e,t){return new e({type:"never",...dn(t)})}function ox(e,t){return new RF({check:"less_than",...dn(t),value:e,inclusive:!1})}function z4(e,t){return new RF({check:"less_than",...dn(t),value:e,inclusive:!0})}function rx(e,t){return new OF({check:"greater_than",...dn(t),value:e,inclusive:!1})}function R4(e,t){return new OF({check:"greater_than",...dn(t),value:e,inclusive:!0})}function lx(e,t){return new cJ({check:"multiple_of",...dn(t),value:e})}function KF(e,t){return new fJ({check:"max_length",...dn(t),maximum:e})}function Q2(e,t){return new hJ({check:"min_length",...dn(t),minimum:e})}function VF(e,t){return new pJ({check:"length_equals",...dn(t),length:e})}function QX(e,t){return new gJ({check:"string_format",format:"regex",...dn(t),pattern:e})}function YX(e){return new mJ({check:"string_format",format:"lowercase",...dn(e)})}function JX(e){return new vJ({check:"string_format",format:"uppercase",...dn(e)})}function XX(e,t){return new yJ({check:"string_format",format:"includes",...dn(t),includes:e})}function eee(e,t){return new kJ({check:"string_format",format:"starts_with",...dn(t),prefix:e})}function tee(e,t){return new bJ({check:"string_format",format:"ends_with",...dn(t),suffix:e})}function jh(e){return new AJ({check:"overwrite",tx:e})}function nee(e){return jh(t=>t.normalize(e))}function iee(){return jh(e=>e.trim())}function see(){return jh(e=>e.toLowerCase())}function oee(){return jh(e=>e.toUpperCase())}function ree(){return jh(e=>gY(e))}function lee(e,t,n){return new e({type:"array",element:t,...dn(n)})}function aee(e,t,n){return new e({type:"custom",check:"custom",fn:t,...dn(n)})}function uee(e){const t=cee(n=>(n.addIssue=i=>{if(typeof i=="string")n.issues.push(n0(i,n.value,t._zod.def));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),n.issues.push(n0(s))}},e(n.value,n)));return t}function cee(e,t){const n=new Nr({check:"custom",...dn(t)});return n._zod.check=e,n}function ZF(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??U1,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Hs(e,t,n={path:[],schemaPath:[]}){var i;const s=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;const r={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,r);const l=e._zod.toJSONSchema?.();if(l)r.schema=l;else{const c={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,r.schema,c);else{const f=r.schema,h=t.processors[s.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);h(e,t,f,c)}const d=e._zod.parent;d&&(r.ref||(r.ref=d),Hs(d,t,c),t.seen.get(d).isParent=!0)}const a=t.metadataRegistry.get(e);return a&&Object.assign(r.schema,a),t.io==="input"&&Yo(e)&&(delete r.schema.examples,delete r.schema.default),t.io==="input"&&r.schema._prefault&&((i=r.schema).default??(i.default=r.schema._prefault)),delete r.schema._prefault,t.seen.get(e).schema}function GF(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const r of e.seen.entries()){const l=e.metadataRegistry.get(r[0])?.id;if(l){const a=i.get(l);if(a&&a!==r[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(l,r[0])}}const s=r=>{const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(r[0])?.id,f=e.external.uri??(g=>g);if(d)return{ref:f(d)};const h=r[1].defId??r[1].schema.id??`schema${e.counter++}`;return r[1].defId=h,{defId:h,ref:`${f("__shared")}#/${l}/${h}`}}if(r[1]===n)return{ref:"#"};const u=`#/${l}/`,c=r[1].schema.id??`__schema${e.counter++}`;return{defId:c,ref:u+c}},o=r=>{if(r[1].schema.$ref)return;const l=r[1],{ref:a,defId:u}=s(r);l.def={...l.schema},u&&(l.defId=u);const c=l.schema;for(const d in c)delete c[d];c.$ref=a};if(e.cycles==="throw")for(const r of e.seen.entries()){const l=r[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root> + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const r of e.seen.entries()){const l=r[1];if(t===r[0]){o(r);continue}if(e.external){const u=e.external.registry.get(r[0])?.id;if(t!==r[0]&&u){o(r);continue}}if(e.metadataRegistry.get(r[0])?.id){o(r);continue}if(l.cycle){o(r);continue}if(l.count>1&&e.reused==="ref"){o(r);continue}}}function QF(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=r=>{const l=e.seen.get(r);if(l.ref===null)return;const a=l.def??l.schema,u={...a},c=l.ref;if(l.ref=null,c){i(c);const f=e.seen.get(c),h=f.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(a.allOf=a.allOf??[],a.allOf.push(h)):Object.assign(a,h),Object.assign(a,u),r._zod.parent===c)for(const m in a)m==="$ref"||m==="allOf"||m in u||delete a[m];if(h.$ref&&f.def)for(const m in a)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(a[m])===JSON.stringify(f.def[m])&&delete a[m]}const d=r._zod.parent;if(d&&d!==c){i(d);const f=e.seen.get(d);if(f?.schema.$ref&&(a.$ref=f.schema.$ref,f.def))for(const h in a)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(a[h])===JSON.stringify(f.def[h])&&delete a[h]}e.override({zodSchema:r,jsonSchema:a,path:l.path??[]})};for(const r of[...e.seen.entries()].reverse())i(r[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const r=e.external.registry.get(t)?.id;if(!r)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(r)}Object.assign(s,n.def??n.schema);const o=e.external?.defs??{};for(const r of e.seen.entries()){const l=r[1];l.def&&l.defId&&(o[l.defId]=l.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?s.$defs=o:s.definitions=o);try{const r=JSON.parse(JSON.stringify(s));return Object.defineProperty(r,"~standard",{value:{...t["~standard"],jsonSchema:{input:Y2(t,"input",e.processors),output:Y2(t,"output",e.processors)}},enumerable:!1,writable:!1}),r}catch{throw new Error("Error converting schema to JSON.")}}function Yo(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Yo(i.element,n);if(i.type==="set")return Yo(i.valueType,n);if(i.type==="lazy")return Yo(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Yo(i.innerType,n);if(i.type==="intersection")return Yo(i.left,n)||Yo(i.right,n);if(i.type==="record"||i.type==="map")return Yo(i.keyType,n)||Yo(i.valueType,n);if(i.type==="pipe")return Yo(i.in,n)||Yo(i.out,n);if(i.type==="object"){for(const s in i.shape)if(Yo(i.shape[s],n))return!0;return!1}if(i.type==="union"){for(const s of i.options)if(Yo(s,n))return!0;return!1}if(i.type==="tuple"){for(const s of i.items)if(Yo(s,n))return!0;return!!(i.rest&&Yo(i.rest,n))}return!1}const dee=(e,t={})=>n=>{const i=ZF({...n,processors:t});return Hs(e,i),GF(i,e),QF(i,e)},Y2=(e,t,n={})=>i=>{const{libraryOptions:s,target:o}=i??{},r=ZF({...s??{},target:o,io:t,processors:n});return Hs(e,r),GF(r,e),QF(r,e)},fee={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},hee=(e,t,n,i)=>{const s=n;s.type="string";const{minimum:o,maximum:r,format:l,patterns:a,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(s.minLength=o),typeof r=="number"&&(s.maxLength=r),l&&(s.format=fee[l]??l,s.format===""&&delete s.format,l==="time"&&delete s.format),u&&(s.contentEncoding=u),a&&a.size>0){const c=[...a];c.length===1?s.pattern=c[0].source:c.length>1&&(s.allOf=[...c.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},pee=(e,t,n,i)=>{const s=n,{minimum:o,maximum:r,format:l,multipleOf:a,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof l=="string"&&l.includes("int")?s.type="integer":s.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.minimum=c,s.exclusiveMinimum=!0):s.exclusiveMinimum=c),typeof o=="number"&&(s.minimum=o,typeof c=="number"&&t.target!=="draft-04"&&(c>=o?delete s.minimum:delete s.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(s.maximum=u,s.exclusiveMaximum=!0):s.exclusiveMaximum=u),typeof r=="number"&&(s.maximum=r,typeof u=="number"&&t.target!=="draft-04"&&(u<=r?delete s.maximum:delete s.exclusiveMaximum)),typeof a=="number"&&(s.multipleOf=a)},gee=(e,t,n,i)=>{n.type="boolean"},mee=(e,t,n,i)=>{n.not={}},vee=(e,t,n,i)=>{},yee=(e,t,n,i)=>{const s=e._zod.def,o=IF(s.entries);o.every(r=>typeof r=="number")&&(n.type="number"),o.every(r=>typeof r=="string")&&(n.type="string"),n.enum=o},kee=(e,t,n,i)=>{const s=e._zod.def,o=[];for(const r of s.values)if(r===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof r=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(r))}else o.push(r);if(o.length!==0)if(o.length===1){const r=o[0];n.type=r===null?"null":typeof r,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[r]:n.const=r}else o.every(r=>typeof r=="number")&&(n.type="number"),o.every(r=>typeof r=="string")&&(n.type="string"),o.every(r=>typeof r=="boolean")&&(n.type="boolean"),o.every(r=>r===null)&&(n.type="null"),n.enum=o},bee=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Aee=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Cee=(e,t,n,i)=>{const s=n,o=e._zod.def,{minimum:r,maximum:l}=e._zod.bag;typeof r=="number"&&(s.minItems=r),typeof l=="number"&&(s.maxItems=l),s.type="array",s.items=Hs(o.element,t,{...i,path:[...i.path,"items"]})},wee=(e,t,n,i)=>{const s=n,o=e._zod.def;s.type="object",s.properties={};const r=o.shape;for(const u in r)s.properties[u]=Hs(r[u],t,{...i,path:[...i.path,"properties",u]});const l=new Set(Object.keys(r)),a=new Set([...l].filter(u=>{const c=o.shape[u]._zod;return t.io==="input"?c.optin===void 0:c.optout===void 0}));a.size>0&&(s.required=Array.from(a)),o.catchall?._zod.def.type==="never"?s.additionalProperties=!1:o.catchall?o.catchall&&(s.additionalProperties=Hs(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(s.additionalProperties=!1)},xee=(e,t,n,i)=>{const s=e._zod.def,o=s.inclusive===!1,r=s.options.map((l,a)=>Hs(l,t,{...i,path:[...i.path,o?"oneOf":"anyOf",a]}));o?n.oneOf=r:n.anyOf=r},See=(e,t,n,i)=>{const s=e._zod.def,o=Hs(s.left,t,{...i,path:[...i.path,"allOf",0]}),r=Hs(s.right,t,{...i,path:[...i.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,a=[...l(o)?o.allOf:[o],...l(r)?r.allOf:[r]];n.allOf=a},_ee=(e,t,n,i)=>{const s=n,o=e._zod.def;s.type="object";const r=o.keyType,a=r._zod.bag?.patterns;if(o.mode==="loose"&&a&&a.size>0){const c=Hs(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});s.patternProperties={};for(const d of a)s.patternProperties[d.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(s.propertyNames=Hs(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),s.additionalProperties=Hs(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});const u=r._zod.values;if(u){const c=[...u].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(s.required=c)}},Iee=(e,t,n,i)=>{const s=e._zod.def,o=Hs(s.innerType,t,i),r=t.seen.get(e);t.target==="openapi-3.0"?(r.ref=s.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Mee=(e,t,n,i)=>{const s=e._zod.def;Hs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType},Eee=(e,t,n,i)=>{const s=e._zod.def;Hs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,n.default=JSON.parse(JSON.stringify(s.defaultValue))},Tee=(e,t,n,i)=>{const s=e._zod.def;Hs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},Lee=(e,t,n,i)=>{const s=e._zod.def;Hs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType;let r;try{r=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=r},Nee=(e,t,n,i)=>{const s=e._zod.def,o=t.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;Hs(o,t,i);const r=t.seen.get(e);r.ref=o},Fee=(e,t,n,i)=>{const s=e._zod.def;Hs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType,n.readOnly=!0},YF=(e,t,n,i)=>{const s=e._zod.def;Hs(s.innerType,t,i);const o=t.seen.get(e);o.ref=s.innerType},Dee=bt("ZodISODateTime",(e,t)=>{$J.init(e,t),ds.init(e,t)});function $ee(e){return jX(Dee,e)}const Bee=bt("ZodISODate",(e,t)=>{BJ.init(e,t),ds.init(e,t)});function zee(e){return HX(Bee,e)}const Ree=bt("ZodISOTime",(e,t)=>{zJ.init(e,t),ds.init(e,t)});function Oee(e){return WX(Ree,e)}const Pee=bt("ZodISODuration",(e,t)=>{RJ.init(e,t),ds.init(e,t)});function jee(e){return qX(Pee,e)}const Hee=(e,t)=>{LF.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>MY(e,n)},flatten:{value:n=>IY(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,nb,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,nb,2)}},isEmpty:{get(){return e.issues.length===0}}})},kl=bt("ZodError",Hee,{Parent:Error}),Wee=O5(kl),qee=P5(kl),Uee=zy(kl),Kee=Ry(kl),Vee=LY(kl),Zee=NY(kl),Gee=FY(kl),Qee=DY(kl),Yee=$Y(kl),Jee=BY(kl),Xee=zY(kl),ete=RY(kl),cs=bt("ZodType",(e,t)=>(us.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Y2(e,"input"),output:Y2(e,"output")}}),e.toJSONSchema=dee(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Ac(t,{checks:[...t.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(n,i)=>Cc(e,n,i),e.brand=()=>e,e.register=((n,i)=>(n.add(e,i),e)),e.parse=(n,i)=>Wee(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Uee(e,n,i),e.parseAsync=async(n,i)=>qee(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Kee(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Vee(e,n,i),e.decode=(n,i)=>Zee(e,n,i),e.encodeAsync=async(n,i)=>Gee(e,n,i),e.decodeAsync=async(n,i)=>Qee(e,n,i),e.safeEncode=(n,i)=>Yee(e,n,i),e.safeDecode=(n,i)=>Jee(e,n,i),e.safeEncodeAsync=async(n,i)=>Xee(e,n,i),e.safeDecodeAsync=async(n,i)=>ete(e,n,i),e.refine=(n,i)=>e.check(Zte(n,i)),e.superRefine=n=>e.check(Gte(n)),e.overwrite=n=>e.check(jh(n)),e.optional=()=>cx(e),e.exactOptional=()=>$te(e),e.nullable=()=>dx(e),e.nullish=()=>cx(dx(e)),e.nonoptional=n=>jte(e,n),e.array=()=>ni(e),e.or=n=>_te([e,n]),e.and=n=>Ete(e,n),e.transform=n=>fx(e,Fte(n)),e.default=n=>Rte(e,n),e.prefault=n=>Pte(e,n),e.catch=n=>Wte(e,n),e.pipe=n=>fx(e,n),e.readonly=()=>Kte(e),e.describe=n=>{const i=e.clone();return U1.add(i,{description:n}),i},Object.defineProperty(e,"description",{get(){return U1.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return U1.get(e);const i=e.clone();return U1.add(i,n[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),JF=bt("_ZodString",(e,t)=>{j5.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(i,s,o)=>hee(e,i,s);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...i)=>e.check(QX(...i)),e.includes=(...i)=>e.check(XX(...i)),e.startsWith=(...i)=>e.check(eee(...i)),e.endsWith=(...i)=>e.check(tee(...i)),e.min=(...i)=>e.check(Q2(...i)),e.max=(...i)=>e.check(KF(...i)),e.length=(...i)=>e.check(VF(...i)),e.nonempty=(...i)=>e.check(Q2(1,...i)),e.lowercase=i=>e.check(YX(i)),e.uppercase=i=>e.check(JX(i)),e.trim=()=>e.check(iee()),e.normalize=(...i)=>e.check(nee(...i)),e.toLowerCase=()=>e.check(see()),e.toUpperCase=()=>e.check(oee()),e.slugify=()=>e.check(ree())}),tte=bt("ZodString",(e,t)=>{j5.init(e,t),JF.init(e,t),e.email=n=>e.check(bX(nte,n)),e.url=n=>e.check(SX(ite,n)),e.jwt=n=>e.check(PX(yte,n)),e.emoji=n=>e.check(_X(ste,n)),e.guid=n=>e.check(sx(ax,n)),e.uuid=n=>e.check(AX(em,n)),e.uuidv4=n=>e.check(CX(em,n)),e.uuidv6=n=>e.check(wX(em,n)),e.uuidv7=n=>e.check(xX(em,n)),e.nanoid=n=>e.check(IX(ote,n)),e.guid=n=>e.check(sx(ax,n)),e.cuid=n=>e.check(MX(rte,n)),e.cuid2=n=>e.check(EX(lte,n)),e.ulid=n=>e.check(TX(ate,n)),e.base64=n=>e.check(zX(gte,n)),e.base64url=n=>e.check(RX(mte,n)),e.xid=n=>e.check(LX(ute,n)),e.ksuid=n=>e.check(NX(cte,n)),e.ipv4=n=>e.check(FX(dte,n)),e.ipv6=n=>e.check(DX(fte,n)),e.cidrv4=n=>e.check($X(hte,n)),e.cidrv6=n=>e.check(BX(pte,n)),e.e164=n=>e.check(OX(vte,n)),e.datetime=n=>e.check($ee(n)),e.date=n=>e.check(zee(n)),e.time=n=>e.check(Oee(n)),e.duration=n=>e.check(jee(n))});function Tt(e){return kX(tte,e)}const ds=bt("ZodStringFormat",(e,t)=>{Xi.init(e,t),JF.init(e,t)}),nte=bt("ZodEmail",(e,t)=>{_J.init(e,t),ds.init(e,t)}),ax=bt("ZodGUID",(e,t)=>{xJ.init(e,t),ds.init(e,t)}),em=bt("ZodUUID",(e,t)=>{SJ.init(e,t),ds.init(e,t)}),ite=bt("ZodURL",(e,t)=>{IJ.init(e,t),ds.init(e,t)}),ste=bt("ZodEmoji",(e,t)=>{MJ.init(e,t),ds.init(e,t)}),ote=bt("ZodNanoID",(e,t)=>{EJ.init(e,t),ds.init(e,t)}),rte=bt("ZodCUID",(e,t)=>{TJ.init(e,t),ds.init(e,t)}),lte=bt("ZodCUID2",(e,t)=>{LJ.init(e,t),ds.init(e,t)}),ate=bt("ZodULID",(e,t)=>{NJ.init(e,t),ds.init(e,t)}),ute=bt("ZodXID",(e,t)=>{FJ.init(e,t),ds.init(e,t)}),cte=bt("ZodKSUID",(e,t)=>{DJ.init(e,t),ds.init(e,t)}),dte=bt("ZodIPv4",(e,t)=>{OJ.init(e,t),ds.init(e,t)}),fte=bt("ZodIPv6",(e,t)=>{PJ.init(e,t),ds.init(e,t)}),hte=bt("ZodCIDRv4",(e,t)=>{jJ.init(e,t),ds.init(e,t)}),pte=bt("ZodCIDRv6",(e,t)=>{HJ.init(e,t),ds.init(e,t)}),gte=bt("ZodBase64",(e,t)=>{WJ.init(e,t),ds.init(e,t)}),mte=bt("ZodBase64URL",(e,t)=>{UJ.init(e,t),ds.init(e,t)}),vte=bt("ZodE164",(e,t)=>{KJ.init(e,t),ds.init(e,t)}),yte=bt("ZodJWT",(e,t)=>{ZJ.init(e,t),ds.init(e,t)}),XF=bt("ZodNumber",(e,t)=>{jF.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(i,s,o)=>pee(e,i,s),e.gt=(i,s)=>e.check(rx(i,s)),e.gte=(i,s)=>e.check(R4(i,s)),e.min=(i,s)=>e.check(R4(i,s)),e.lt=(i,s)=>e.check(ox(i,s)),e.lte=(i,s)=>e.check(z4(i,s)),e.max=(i,s)=>e.check(z4(i,s)),e.int=i=>e.check(ux(i)),e.safe=i=>e.check(ux(i)),e.positive=i=>e.check(rx(0,i)),e.nonnegative=i=>e.check(R4(0,i)),e.negative=i=>e.check(ox(0,i)),e.nonpositive=i=>e.check(z4(0,i)),e.multipleOf=(i,s)=>e.check(lx(i,s)),e.step=(i,s)=>e.check(lx(i,s)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function en(e){return UX(XF,e)}const kte=bt("ZodNumberFormat",(e,t)=>{GJ.init(e,t),XF.init(e,t)});function ux(e){return KX(kte,e)}const bte=bt("ZodBoolean",(e,t)=>{QJ.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>gee(e,n,i)});function D0(e){return VX(bte,e)}const Ate=bt("ZodUnknown",(e,t)=>{YJ.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>vee()});function Gs(){return ZX(Ate)}const Cte=bt("ZodNever",(e,t)=>{JJ.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>mee(e,n,i)});function wte(e){return GX(Cte,e)}const xte=bt("ZodArray",(e,t)=>{XJ.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Cee(e,n,i,s),e.element=t.element,e.min=(n,i)=>e.check(Q2(n,i)),e.nonempty=n=>e.check(Q2(1,n)),e.max=(n,i)=>e.check(KF(n,i)),e.length=(n,i)=>e.check(VF(n,i)),e.unwrap=()=>e.element});function ni(e,t){return lee(xte,e,t)}const Ste=bt("ZodObject",(e,t)=>{tX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>wee(e,n,i,s),mi(e,"shape",()=>t.shape),e.keyof=()=>Ji(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Gs()}),e.loose=()=>e.clone({...e._zod.def,catchall:Gs()}),e.strict=()=>e.clone({...e._zod.def,catchall:wte()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>CY(e,n),e.safeExtend=n=>wY(e,n),e.merge=n=>xY(e,n),e.pick=n=>bY(e,n),e.omit=n=>AY(e,n),e.partial=(...n)=>SY(tD,e,n[0]),e.required=(...n)=>_Y(nD,e,n[0])});function zt(e,t){const n={type:"object",shape:e??{},...dn(t)};return new Ste(n)}const eD=bt("ZodUnion",(e,t)=>{qF.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>xee(e,n,i,s),e.options=t.options});function _te(e,t){return new eD({type:"union",options:e,...dn(t)})}const Ite=bt("ZodDiscriminatedUnion",(e,t)=>{eD.init(e,t),nX.init(e,t)});function wc(e,t,n){return new Ite({type:"union",options:t,discriminator:e,...dn(n)})}const Mte=bt("ZodIntersection",(e,t)=>{iX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>See(e,n,i,s)});function Ete(e,t){return new Mte({type:"intersection",left:e,right:t})}const Tte=bt("ZodRecord",(e,t)=>{sX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>_ee(e,n,i,s),e.keyType=t.keyType,e.valueType=t.valueType});function H5(e,t,n){return new Tte({type:"record",keyType:e,valueType:t,...dn(n)})}const sb=bt("ZodEnum",(e,t)=>{oX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(i,s,o)=>yee(e,i,s),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(i,s)=>{const o={};for(const r of i)if(n.has(r))o[r]=t.entries[r];else throw new Error(`Key ${r} not found in enum`);return new sb({...t,checks:[],...dn(s),entries:o})},e.exclude=(i,s)=>{const o={...t.entries};for(const r of i)if(n.has(r))delete o[r];else throw new Error(`Key ${r} not found in enum`);return new sb({...t,checks:[],...dn(s),entries:o})}});function Ji(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new sb({type:"enum",entries:n,...dn(t)})}const Lte=bt("ZodLiteral",(e,t)=>{rX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>kee(e,n,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Fn(e,t){return new Lte({type:"literal",values:Array.isArray(e)?e:[e],...dn(t)})}const Nte=bt("ZodTransform",(e,t)=>{lX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Aee(e,n),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new SF(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(n0(o,n.value,t));else{const r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=e),n.issues.push(n0(r))}};const s=t.transform(n.value,n);return s instanceof Promise?s.then(o=>(n.value=o,n)):(n.value=s,n)}});function Fte(e){return new Nte({type:"transform",transform:e})}const tD=bt("ZodOptional",(e,t)=>{UF.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>YF(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function cx(e){return new tD({type:"optional",innerType:e})}const Dte=bt("ZodExactOptional",(e,t)=>{aX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>YF(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function $te(e){return new Dte({type:"optional",innerType:e})}const Bte=bt("ZodNullable",(e,t)=>{uX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Iee(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function dx(e){return new Bte({type:"nullable",innerType:e})}const zte=bt("ZodDefault",(e,t)=>{cX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Eee(e,n,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Rte(e,t){return new zte({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():EF(t)}})}const Ote=bt("ZodPrefault",(e,t)=>{dX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Tee(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function Pte(e,t){return new Ote({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():EF(t)}})}const nD=bt("ZodNonOptional",(e,t)=>{fX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Mee(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function jte(e,t){return new nD({type:"nonoptional",innerType:e,...dn(t)})}const Hte=bt("ZodCatch",(e,t)=>{hX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Lee(e,n,i,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Wte(e,t){return new Hte({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const qte=bt("ZodPipe",(e,t)=>{pX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Nee(e,n,i,s),e.in=t.in,e.out=t.out});function fx(e,t){return new qte({type:"pipe",in:e,out:t})}const Ute=bt("ZodReadonly",(e,t)=>{gX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>Fee(e,n,i,s),e.unwrap=()=>e._zod.def.innerType});function Kte(e){return new Ute({type:"readonly",innerType:e})}const Vte=bt("ZodCustom",(e,t)=>{mX.init(e,t),cs.init(e,t),e._zod.processJSONSchema=(n,i,s)=>bee(e,n)});function Zte(e,t={}){return aee(Vte,e,t)}function Gte(e){return uee(e)}const jd=Tt().min(1),W5=Tt().min(1),$0=Tt().min(1),Hd=Tt().min(1),Qr=Tt().min(1),Qte=/^[A-Za-z0-9._-]{1,128}$/;function Yte(e){return Qte.test(e)&&e!=="."&&e!==".."}const iD=wc("kind",[zt({kind:Fn("user"),payload:Gs().optional()}),zt({kind:Fn("cron"),taskId:Hd.optional(),payload:Gs().optional()}),zt({kind:Fn("task"),taskId:Hd,payload:Gs().optional()}),zt({kind:Fn("hook"),payload:Gs().optional()}),zt({kind:Fn("compaction"),payload:Gs().optional()}),zt({kind:Fn("side"),payload:Gs().optional()}),zt({kind:Fn("other"),payload:Gs().optional()})]),Jte=zt({inputTokens:en().optional(),outputTokens:en().optional(),cachedTokens:en().optional(),cost:en().optional()}),pp=zt({inputOther:en(),output:en(),inputCacheRead:en(),inputCacheCreation:en()}),Xte=zt({llmFirstTokenLatencyMs:en().optional(),llmStreamDurationMs:en().optional(),llmRequestBuildMs:en().optional(),llmServerFirstTokenMs:en().optional(),llmServerDecodeMs:en().optional(),llmClientConsumeMs:en().optional()}),ene=zt({failedAttempt:en(),nextAttempt:en(),maxAttempts:en(),delayMs:en(),errorName:Tt(),errorMessage:Tt(),statusCode:en().optional()}),sD=Ji(["queued","running","completed","failed","cancelled"]),tne=Ji(["running","completed","interrupted","failed"]),nne=zt({kind:Fn("text"),frameId:$0,role:Ji(["assistant","user"]),text:Tt(),attachmentIds:ni(Tt()).optional(),taskId:Hd.optional()}),ine=zt({kind:Fn("thinking"),frameId:$0,text:Tt()}),sne=zt({agentId:Qr,role:Ji(["child","member"]).optional()}),one=zt({kind:Ji(["stdout","stderr","progress","status","custom"]),text:Tt().optional(),percent:en().optional(),customKind:Tt().optional(),customData:Gs().optional()}),rne=zt({kind:Fn("tool"),frameId:$0,toolCallId:Tt(),name:Tt(),view:Tt().optional(),state:Ji(["running","done","error"]),input:Gs().optional(),output:Gs().optional(),display:Gs().optional(),error:Tt().optional(),inputText:Tt().optional(),progress:one.optional(),taskId:Hd.optional(),approvalId:Tt().optional(),todoId:Tt().optional(),agentRefs:ni(sne).optional()}),q5=zt({interactionId:Tt(),interactionKind:Ji(["approval","question"]),toolCallId:Tt().optional(),state:Ji(["pending","approved","rejected","cancelled","answered","dismissed"]),request:Gs().optional(),response:Gs().optional()}),lne=zt({kind:Fn("notice"),frameId:$0,level:Ji(["error","warning","info"]),source:Tt().optional(),message:Tt(),detail:Gs().optional()}),oD=wc("kind",[nne,ine,rne,lne]),rD=zt({kind:Fn("step"),stepId:W5,turnId:jd,ordinal:en().int(),state:tne,frames:ni(oD),startedAt:Tt().optional(),endedAt:Tt().optional(),usage:pp.optional(),finishReason:Tt().optional(),timing:Xte.optional(),retry:ene.optional(),endReason:Tt().optional(),endMessage:Tt().optional()}),lD=zt({kind:Fn("turn"),turnId:jd,ordinal:en().int(),state:sD,origin:iD,prompt:Tt().optional(),attachmentIds:ni(Tt()).optional(),steps:ni(rD),startedAt:Tt().optional(),endedAt:Tt().optional(),usage:Jte.optional(),durationMs:en().optional(),error:Tt().optional()}),aD=zt({kind:Fn("marker"),markerId:Tt(),marker:Tt(),payload:Gs().optional(),at:Tt().optional()}),uD=zt({kind:Fn("taskref"),refId:Tt(),taskId:Hd,at:Tt().optional()}),cD=wc("kind",[lD,aD,uD]),U5=zt({taskId:Hd,kind:Ji(["shell","subagent","tool","other"]),state:Ji(["running","completed","failed","timed_out","killed","lost"]),detached:D0(),description:Tt().optional(),agentId:Qr.optional(),outputTail:Tt(),startedAt:Tt().optional(),endedAt:Tt().optional(),resultSummary:Tt().optional(),error:Tt().optional(),stateReason:Tt().optional(),usage:pp.optional()}),ane=zt({objective:Tt(),status:Ji(["active","paused","blocked","complete"]),completionCriterion:Tt().optional(),budgetUsed:en().optional(),budgetLimit:en().optional()}),une=zt({plan:zt({reviewPath:Tt().optional(),version:en().optional()}).optional(),swarm:zt({trigger:Tt().optional()}).optional()}),cne=zt({plan:zt({reviewPath:Tt().optional(),version:en().optional()}).nullable().optional(),swarm:zt({trigger:Tt().optional()}).nullable().optional()}),dne=wc("kind",[zt({kind:Fn("idle")}),zt({kind:Fn("running"),turnId:en(),step:en(),stepId:Tt(),since:en()}),zt({kind:Fn("streaming"),turnId:en(),step:en(),stepId:Tt(),stream:Ji(["assistant","thinking","tool_call"]),toolCallId:Tt().optional(),toolName:Tt().optional(),since:en()}),zt({kind:Fn("tool_call"),turnId:en(),step:en(),toolCallId:Tt(),name:Tt(),since:en()}),zt({kind:Fn("retrying"),turnId:en(),step:en(),stepId:Tt(),failedAttempt:en(),nextAttempt:en(),maxAttempts:en(),delayMs:en(),errorName:Tt().optional(),statusCode:en().optional(),since:en()}),zt({kind:Fn("awaiting_approval"),turnId:en(),step:en().optional(),approval:Gs().optional(),since:en()}),zt({kind:Fn("interrupted"),turnId:en(),step:en().optional(),reason:Ji(["aborted","max_steps","error"]),message:Tt().optional(),at:en()}),zt({kind:Fn("ended"),turnId:en(),reason:Ji(["completed","cancelled","failed","blocked"]),durationMs:en().optional(),at:en()})]),fne=zt({byModel:H5(Tt(),pp).optional(),currentTurn:pp.optional(),total:pp.optional()}),hne=zt({model:Tt().optional(),thinkingEffort:Tt().optional(),usage:fne.optional(),contextTokens:en().optional(),maxContextTokens:en().optional(),contextUsage:en().optional(),permission:Ji(["manual","yolo","auto"]).optional(),phase:dne.optional()}),K5=zt({goal:ane.optional(),modes:une.optional(),activity:Ji(["idle","turn","disposing","unknown"]).optional(),agent:hne.optional()}),pne=K5.extend({modes:cne.optional()}),Py=zt({attachmentId:Tt(),mediaType:Tt(),name:Tt().optional(),size:en().optional(),source:wc("kind",[zt({kind:Fn("url"),url:Tt()}),zt({kind:Fn("file"),fileId:Tt()}),zt({kind:Fn("session_media"),fileId:Tt()})]).optional(),placeholder:Tt().optional()}),gne=zt({title:Tt(),status:Ji(["pending","in_progress","done"])}),V5=zt({todoId:Tt(),items:ni(gne),updatedAt:Tt().optional()}),Z5=zt({promptId:Tt(),status:Ji(["running","queued","blocked","completed","failed","aborted"]),userMessageId:Tt().optional(),content:Gs().optional(),createdAt:Tt(),finishedAt:Tt().optional(),steeredAt:Tt().optional()}),dD=zt({items:ni(cD),tasks:ni(U5),interactions:ni(q5).default([]),attachments:ni(Py).default([]),todos:ni(V5).default([]),prompts:ni(Z5).default([]),meta:K5,hasMoreOlder:D0().optional()}),mne=lD.omit({steps:!0}),vne=rD.omit({frames:!0}),yne=wc("type",[zt({type:Fn("frame"),turnId:jd,stepId:W5,frameId:$0}),zt({type:Fn("task"),taskId:Hd})]),G5=wc("op",[zt({op:Fn("reset"),agentId:Qr,snapshot:dD}),zt({op:Fn("turn.upsert"),turn:mne}),zt({op:Fn("step.upsert"),turnId:jd,step:vne}),zt({op:Fn("frame.upsert"),turnId:jd,stepId:W5,frame:oD}),zt({op:Fn("append"),target:yne,offset:en().int().nonnegative(),text:Tt()}),zt({op:Fn("marker.upsert"),item:aD,beforeTurn:en().int().optional()}),zt({op:Fn("taskref.upsert"),item:uD,beforeTurn:en().int().optional()}),zt({op:Fn("task.upsert"),task:U5}),zt({op:Fn("interaction.upsert"),interaction:q5}),zt({op:Fn("attachment.upsert"),attachment:Py}),zt({op:Fn("todo.upsert"),todo:V5}),zt({op:Fn("prompt.upsert"),prompt:Z5}),zt({op:Fn("meta.merge"),meta:pne}),zt({op:Fn("items.remove"),ids:ni(Tt())})]);zt({agentId:Qr,ops:ni(G5)});const kne=Ji(["off","turn","block","delta"]),Fh=en().int().nonnegative(),bne=H5(Tt(),kne);zt({session_id:Tt().min(1),transcript:bne,transcript_since:H5(Tt(),Fh).optional()});zt({agent_id:Qr,before_turn:Tt().min(1).optional(),after_turn:Tt().min(1).optional(),page_size:en().int().min(1).max(100).optional()}).superRefine((e,t)=>{e.before_turn!==void 0&&e.after_turn!==void 0&&t.addIssue({code:"custom",message:"before_turn and after_turn are mutually exclusive",path:["before_turn"]}),Yte(e.agent_id)||t.addIssue({code:"custom",message:"agent_id must be a plain agent id (no path separators)",path:["agent_id"]})});const Ane=zt({agentId:Qr,type:Ji(["main","sub","independent"]).optional(),parentAgentId:Qr.optional(),label:Tt().optional(),createdAt:Tt().optional(),disposedAt:Tt().optional()}),Cne=zt({agent_id:Qr,items:ni(cD),has_more:D0(),tasks:ni(U5),interactions:ni(q5).default([]),attachments:ni(Py).default([]),todos:ni(V5).default([]),prompts:ni(Z5).default([]),meta:K5,agents:ni(Ane),pending_interactions:ni(Tt()),seq:Fh.optional()});zt({agent_id:Qr,batches:ni(zt({seq:Fh,ops:ni(G5)})),latest_seq:Fh,complete:D0()});const wne=zt({turn_id:jd,ordinal:en().int(),state:sD,origin:iD,prompt:Tt(),attachment_ids:ni(Tt()).optional(),started_at:Tt().optional()});zt({agents:ni(zt({agent_id:Qr,messages:ni(wne),attachments:ni(Py).default([])}))});const xne=zt({state:Ji(["pending","approved","rejected","cancelled"]),selected_option:Tt().optional(),feedback:Tt().optional()}),Sne=zt({tool_call_id:Tt(),turn_id:jd,source:Ji(["interaction","display","output"]),plan:Tt(),path:Tt().optional(),options:ni(zt({label:Tt(),description:Tt().optional()})).optional(),review:xne.optional()});zt({agent_id:Qr,plans:ni(Sne)});const _ne=zt({agent_id:Qr,snapshot:dD,has_more_older:D0(),seq:Fh.optional()}),Ine=zt({agent_id:Qr,ops:ni(G5),seq:Fh.optional()}),fD=_ne.extend({type:Fn("transcript.reset")}),hD=Ine.extend({type:Fn("transcript.ops")});wc("type",[fD,hD]);const hx=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.call.started","tool.use","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.submitted","prompt.completed","prompt.aborted","session.meta.updated","compaction.started","compaction.completed","compaction.cancelled","goal.updated","error","warning","subagent.spawned","subagent.started","subagent.suspended","subagent.completed","subagent.failed","task.started","task.terminated","background.task.started","background.task.terminated","cron.fired"]),Mne=new Set(["session.created","session.updated","session.deleted","session.status_changed","session.usage_updated","session.history_compacted","message.created","message.updated","approval.requested","approval.resolved","approval.expired","question.requested","question.answered","question.dismissed","task.created","task.progress","task.completed","assistant.tool_use_started","assistant.tool_use_delta","assistant.tool_use_completed","assistant.completed","tool.started","tool.output","tool.completed"]),Ene=new Set(["server_hello","ack","ping","resync_required","error","pong"]),Tne=new Set(["assistant.delta","thinking.delta"]);function Lne(e,t){if(Ene.has(e))return{route:"ignore"};const n=e.startsWith("event."),i=n?e.slice(6):e;return Tne.has(i)?Nne(t)?{route:"agent",agentType:i}:{route:"protocol"}:n?Mne.has(i)?{route:"protocol"}:hx.has(i)?{route:"agent",agentType:i}:{route:"protocol"}:hx.has(i)?{route:"agent",agentType:i}:{route:"agent",agentType:i}}function Nne(e){if(!e||typeof e!="object")return!1;const t=e;return"message_id"in t||"content_index"in t?!1:typeof t.delta=="string"}const Fne="kimi-code.bearer.",Dne=3e4;class $ne{constructor(t){this.opts=t,this.tracer=t.tracer??N5}ws=null;connected=!1;closed=!1;subscriptions=new Map;transcriptSubscriptions=new Map;sideChannelAgents=new Map;pendingSubscriptions=[];terminalAttachments=new Map;msgSeq=0;clientHelloId=null;reconnectAttempts=0;reconnectTimer=null;heartbeatMs=3e4;lastActivityAt=0;tracer;connect(){if(this.ws!==null||this.closed)return;this.lastActivityAt=Date.now(),this.tracer.wsEvent?.({kind:"lifecycle",event:"connect",detail:{url:this.opts.wsUrl,attempt:this.reconnectAttempts}});const t=this.opts.credentialStore?.getToken(),n=t!==void 0?[`${Fne}${t}`]:void 0,i=new WebSocket(this.opts.wsUrl,n);this.ws=i,i.onopen=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"open"})},i.onmessage=s=>{this.lastActivityAt=Date.now();try{const o=JSON.parse(String(s.data));this.tracer.wsEvent?.({kind:"in",frame:o}),this.handleFrame(o)}catch(o){this.tracer.wsEvent?.({kind:"lifecycle",event:"parse-error",detail:{error:String(o)}}),this.opts.handlers.onError(0,`Failed to parse WS frame: ${String(o)}`,!1)}},i.onerror=()=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"error"}),this.opts.handlers.onError(0,"WebSocket error",!1)},i.onclose=s=>{this.tracer.wsEvent?.({kind:"lifecycle",event:"close",detail:s?{code:s.code,reason:s.reason,wasClean:s.wasClean}:void 0}),this.connected=!1,this.ws=null,this.opts.handlers.onConnectionState(!1),this.scheduleReconnect()}}scheduleReconnect(){if(this.closed||this.reconnectTimer!==null)return;const n=Math.min(3e4,1e3*2**this.reconnectAttempts)+Math.floor(Math.random()*250);this.reconnectAttempts+=1,this.tracer.wsEvent?.({kind:"lifecycle",event:"reconnect-scheduled",detail:{delayMs:n,attempt:this.reconnectAttempts}}),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}subscribe(t,n={seq:0}){if(this.subscriptions.set(t,{...n}),this.connected)this.sendSubscribe([t],{[t]:n});else{const i=this.pendingSubscriptions.findIndex(s=>s.sessionId===t);i!==-1&&this.pendingSubscriptions.splice(i,1),this.pendingSubscriptions.push({sessionId:t,cursor:{...n}})}}unsubscribe(t){this.subscriptions.delete(t);const n=this.pendingSubscriptions.findIndex(i=>i.sessionId===t);n!==-1&&this.pendingSubscriptions.splice(n,1),this.connected&&this.ws&&this.send({type:"unsubscribe",id:this.nextId(),payload:{session_ids:[t]}})}subscribeTranscript(t,n,i){this.transcriptSubscriptions.set(t,{agentId:n,...i!==void 0?{sinceSeq:i}:{}}),this.connected&&this.sendTranscriptSubscribe(t,n,i)}unsubscribeTranscript(t,n){const i=this.transcriptSubscriptions.get(t);(n===void 0||i===void 0||n.includes(i.agentId))&&this.transcriptSubscriptions.delete(t),!(!this.connected||!this.ws)&&this.send({type:"unsubscribe_v2",id:this.nextId(),payload:{session_id:t,...n!==void 0?{agent_ids:n}:{}}})}markSideChannelAgent(t,n){if(!this.opts.mainAgentOnly)return;let i=this.sideChannelAgents.get(t);if(i===void 0&&(i=new Set,this.sideChannelAgents.set(t,i)),i.has(n))return;i.add(n);const s=this.subscriptions.get(t);this.connected&&s!==void 0&&this.sendSubscribe([t],{[t]:s})}abort(t,n){!this.connected||!this.ws||this.send({type:"abort",id:this.nextId(),payload:{session_id:t,prompt_id:n}})}terminalAttach(t,n,i){const s=tm(t,n),o=this.terminalAttachments.get(s),r=i??o?.lastSeq??0;this.terminalAttachments.set(s,{sessionId:t,terminalId:n,lastSeq:r}),!(!this.connected||!this.ws)&&this.sendTerminalAttach(t,n,r)}terminalInput(t,n,i){!this.connected||!this.ws||this.send({type:"terminal_input",id:this.nextId(),payload:{session_id:t,terminal_id:n,data:i}})}terminalResize(t,n,i,s){!this.connected||!this.ws||this.send({type:"terminal_resize",id:this.nextId(),payload:{session_id:t,terminal_id:n,cols:i,rows:s}})}terminalDetach(t,n){this.terminalAttachments.delete(tm(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_detach",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}terminalClose(t,n){this.terminalAttachments.delete(tm(t,n)),!(!this.connected||!this.ws)&&this.send({type:"terminal_close",id:this.nextId(),payload:{session_id:t,terminal_id:n}})}close(){this.closed=!0,this.connected=!1,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(1e3),this.ws=null)}health(){const t=this.ws!==null&&this.ws.readyState===WebSocket.OPEN,n=Math.max(this.heartbeatMs*2,Dne),i=this.lastActivityAt>0&&Date.now()-this.lastActivityAt>n;return{connected:this.connected,open:t,stale:i}}reconnect(){if(this.closed)return;this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;if(t!==null){t.onopen=null,t.onmessage=null,t.onerror=null,t.onclose=null;try{t.close(1e3,"reconnect")}catch{}}const n=this.connected;this.ws=null,this.connected=!1,n&&this.opts.handlers.onConnectionState(!1),this.connect()}handleFrame(t){const n=t,i=t.type;if(i==="transcript.reset"){const s=fD.safeParse({type:i,...n.payload}),o=n.session_id;if(!s.success||typeof o!="string"){this.opts.handlers.onError(0,"Invalid transcript.reset frame",!1);return}const r=s.data;this.opts.handlers.onTranscriptReset?.(o,r.agent_id,{...r.snapshot,hasMoreOlder:r.has_more_older},r.seq);const l=this.transcriptSubscriptions.get(o);l?.agentId===r.agent_id&&r.seq!==void 0&&(l.sinceSeq=r.seq);return}if(i==="transcript.ops"){const s=hD.safeParse({type:i,...n.payload}),o=n.session_id;if(!s.success||typeof o!="string"){this.opts.handlers.onError(0,"Invalid transcript.ops frame",!1);return}const r=s.data,l=this.opts.handlers.onTranscriptOps?.(o,r.agent_id,r.ops,r.seq),a=this.transcriptSubscriptions.get(o);l!==!1&&a?.agentId===r.agent_id&&r.seq!==void 0&&(a.sinceSeq=r.seq);return}switch(i){case"server_hello":{const s=n.payload?.heartbeat_ms;typeof s=="number"&&s>0&&(this.heartbeatMs=s),this.onServerHello();break}case"ping":this.send({type:"pong",payload:{nonce:n.payload.nonce}});break;case"resync_required":{const s=n.payload.session_id,o=n.payload.epoch;this.subscriptions.set(s,{seq:n.payload.current_seq,epoch:o}),this.opts.handlers.onResync(s,n.payload.current_seq,o);break}case"error":{const s=n.session_id;typeof s=="string"&&this.opts.handlers.onRawAgentEvent?this.opts.handlers.onRawAgentEvent({type:"error",seq:n.seq,session_id:s,timestamp:n.timestamp,payload:n.payload}):this.opts.handlers.onError(n.payload.code,n.payload.msg,n.payload.fatal);break}case"ack":n.id===this.clientHelloId&&(this.clientHelloId=null,n.code===0&&this.opts.handlers.onReplayComplete?.());break;case"terminal_output":{const s=n.session_id,o=n.terminal_id,r=n.seq,l=tm(s,o),a=this.terminalAttachments.get(l);a&&this.terminalAttachments.set(l,{...a,lastSeq:Math.max(a.lastSeq,r)});const u=typeof n.payload?.data=="string"?n.payload.data:"";this.opts.handlers.onTerminalOutput?.(s,o,u,r);break}case"terminal_exit":{const s=n.session_id,o=n.terminal_id,r=n.payload?.exit_code,l=typeof r=="number"?r:null;this.opts.handlers.onTerminalExit?.(s,o,l);break}default:{this.trackCursor(n);const s=n.type,o=Lne(s,n.payload);if(o.route==="protocol"){this.opts.handlers.onWireEvent(n);break}if(o.route==="agent"){if(this.opts.handlers.onRawAgentEvent&&typeof n.session_id=="string"){const r=n,l=n;this.opts.handlers.onRawAgentEvent({type:o.agentType,seq:r.seq,session_id:r.session_id,timestamp:r.timestamp,payload:r.payload,...l.volatile!==void 0?{volatile:l.volatile}:{},...l.offset!==void 0?{offset:l.offset}:{}})}break}break}}}onServerHello(){this.connected=!0,this.reconnectAttempts=0,this.opts.handlers.onConnectionState(!0);const t=Array.from(this.subscriptions.keys());for(const s of this.pendingSubscriptions)this.subscriptions.set(s.sessionId,s.cursor),t.includes(s.sessionId)||t.push(s.sessionId);this.pendingSubscriptions.length=0;const n={};for(const[s,o]of this.subscriptions.entries())n[s]=o;const i=this.nextId();this.clientHelloId=i,this.send({type:"client_hello",id:i,payload:{client_id:this.opts.clientId,subscriptions:t,cursors:n,...this.opts.mainAgentOnly?{agent_filter:this.rawAgentFilter(t)}:{}}});for(const[s,o]of this.transcriptSubscriptions)this.sendTranscriptSubscribe(s,o.agentId,o.sinceSeq);for(const s of this.terminalAttachments.values())this.sendTerminalAttach(s.sessionId,s.terminalId,s.lastSeq)}sendSubscribe(t,n){this.send({type:"subscribe",id:this.nextId(),payload:{session_ids:t,cursors:n,...this.opts.mainAgentOnly?{agent_filter:this.rawAgentFilter(t)}:{}}})}rawAgentFilter(t){return Object.fromEntries(t.map(n=>[n,["main",...this.sideChannelAgents.get(n)??[]]]))}sendTranscriptSubscribe(t,n,i){this.send({type:"subscribe_v2",id:this.nextId(),payload:{session_id:t,transcript:{[n]:"delta"},...i!==void 0?{transcript_since:{[n]:i}}:{}}})}sendTerminalAttach(t,n,i){this.send({type:"terminal_attach",id:this.nextId(),payload:{session_id:t,terminal_id:n,since_seq:i>0?i:void 0}})}trackCursor(t){if(t.volatile===!0)return;const n=t.session_id,i=t.seq;if(typeof n!="string"||typeof i!="number")return;const s=this.subscriptions.get(n);if(!s||i<=s.seq&&s.epoch!==void 0)return;const o=typeof t.epoch=="string"?t.epoch:s.epoch;this.subscriptions.set(n,{seq:Math.max(i,s.seq),epoch:o})}send(t){if(!(!this.ws||this.ws.readyState!==WebSocket.OPEN))try{this.ws.send(JSON.stringify(t)),this.tracer.wsEvent?.({kind:"out",frame:t})}catch{}}nextId(){return`c_${++this.msgSeq}`}}function tm(e,t){return`${e}\0${t}`}async function Bne(e,t,n){const i=await e.get(`/sessions/${encodeURIComponent(t)}/transcript`,{agent_id:n.agentId,before_turn:n.beforeTurn,after_turn:n.afterTurn,page_size:n.pageSize}),s=Cne.parse(i),o={items:s.items,tasks:s.tasks,interactions:s.interactions,attachments:s.attachments,todos:s.todos,prompts:s.prompts,meta:s.meta,hasMoreOlder:s.has_more};return{agentId:s.agent_id,...o,agents:s.agents,pendingInteractions:s.pending_interactions,...s.seq!==void 0?{seq:s.seq}:{}}}const O4=10485760,zne=40001;function Rne(e,t){if(e===void 0)return t;let n;const i=/filename\*\s*=\s*UTF-8''([^;]+)/i.exec(e)?.[1]?.trim();if(i!==void 0)try{n=decodeURIComponent(i.replaceAll(/^"|"$/g,""))}catch{return t}else n=/filename\s*=\s*"([^"]*)"/i.exec(e)?.[1]??/filename\s*=\s*([^;]+)/i.exec(e)?.[1]?.trim();return n===void 0||n.length===0||n.length>200||n==="."||n===".."||/[\u0000-\u001F\u007F/\\]/.test(n)||!n.toLowerCase().endsWith(".zip")?t:n}function px(e){if(typeof e!="object"||e===null)return{errorName:typeof e};const t=e;return{errorName:typeof t.name=="string"?t.name:"Error",errorCode:typeof t.code=="number"?t.code:void 0,requestId:typeof t.requestId=="string"?t.requestId:void 0,phase:typeof t.phase=="string"?t.phase:void 0,httpStatus:typeof t.status=="number"?t.status:void 0}}function P4(e){return{id:e.id,sessionId:e.session_id,cwd:e.cwd,shell:e.shell,cols:e.cols,rows:e.rows,status:e.status,createdAt:e.created_at,exitedAt:e.exited_at,exitCode:e.exit_code}}function gx(e){return e==="auto_compact"||e==="manual_compact"}class One{constructor(t){this.opts=t,this.tracer=t.tracer??N5,this.http=new Pw({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore}),this.httpV2=new Pw({origin:t.origin,identity:t.identity,tracer:this.tracer,credentialStore:t.credentialStore,restBasePath:"/api/v2"})}http;httpV2;tracer;async getHealth(){return{status:"ok",uptimeSec:(await this.http.get("/healthz")).uptime_sec??0}}async getMeta(){const t=await this.http.get("/meta");return{serverVersion:t.server_version,serverId:t.server_id,startedAt:t.started_at,capabilities:t.capabilities,openInApps:Array.isArray(t.open_in_apps)?t.open_in_apps:[],dangerousBypassAuth:t.dangerous_bypass_auth===!0,experimentalFlags:t.experimental_flags??{},backend:t.backend==="v2"?"v2":"v1",webTitle:t.web_title??""}}async listSessions(t){const n={before_id:t?.beforeId,after_id:t?.afterId,page_size:t?.pageSize,busy:t?.busy,include_archive:t?.includeArchive,archived_only:t?.archivedOnly,exclude_empty:t?.excludeEmpty,workspace_id:t?.workspaceId},i=await this.http.get("/sessions",n);return{items:i.items.map(xl),hasMore:i.has_more}}async listSessionsV2(t){const n={sort:t?.sort,page_size:t?.pageSize,page_token:t?.pageToken,page:t?.page,"meta.updated_after":t?.updatedAfter,"meta.updated_before":t?.updatedBefore,"meta.archived":t?.archived===void 0?void 0:String(t.archived),include:t?.include,"workspace.id":t?.workspaceIds,"activity.status":t?.statuses},i=await this.httpV2.get("/sessions",n);return{items:i.items,hasMore:i.has_more,nextPageToken:i.next_page_token,total:i.total}}async listSessionIdsV2(t){const n={sort:t?.sort,page_size:t?.pageSize,page_token:t?.pageToken,page:t?.page,"meta.updated_after":t?.updatedAfter,"meta.updated_before":t?.updatedBefore,"meta.archived":t?.archived===void 0?void 0:String(t.archived),fields:"id,archived","workspace.id":t?.workspaceIds,"activity.status":t?.statuses},i=await this.httpV2.get("/sessions",n);return{items:i.items,hasMore:i.has_more,nextPageToken:i.next_page_token,total:i.total}}async createSession(t){const n={metadata:t.cwd!==void 0?{cwd:t.cwd}:{}};t.workspaceId!==void 0&&(n.workspace_id=t.workspaceId),t.title!==void 0&&(n.title=t.title),t.model!==void 0&&(n.agent_config={model:t.model});const i=await this.http.post("/sessions",n);return xl(i)}async getSession(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}`);return xl(n)}async updateSession(t,n){const i={};n.title!==void 0&&(i.title=n.title),n.cwd!==void 0&&(i.metadata={cwd:n.cwd});const s={};n.model!==void 0&&(s.model=n.model),n.permissionMode!==void 0&&(s.permission_mode=n.permissionMode),n.planMode!==void 0&&(s.plan_mode=n.planMode),n.swarmMode!==void 0&&(s.swarm_mode=n.swarmMode),n.goalObjective!==void 0&&(s.goal_objective=n.goalObjective),n.goalControl!==void 0&&(s.goal_control=n.goalControl),n.thinking!==void 0&&(s.thinking=n.thinking),Object.keys(s).length>0&&(i.agent_config=s);const o=await this.http.post(`/sessions/${encodeURIComponent(t)}/profile`,i);return xl(o)}async getSessionStatus(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/status`);return{model:n.model&&n.model.length>0?n.model:null,thinkingEffort:n.thinking_level,permission:n.permission,planMode:n.plan_mode===!0,swarmMode:n.swarm_mode===!0,contextTokens:n.context_tokens??0,maxContextTokens:n.max_context_tokens??0,contextUsage:n.context_usage??0}}async getSessionGoal(t){const n=await this.http.get(`/sessions/${encodeURIComponent(t)}/goal`);return CF(n)}async getSessionPlans(t,n){const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/transcript/plan`,{agent_id:n.agentId,tool_call_id:n.toolCallId});return i.plans.map(s=>({agentId:i.agent_id,toolCallId:s.tool_call_id,turnId:s.turn_id,source:s.source,plan:s.plan,...s.path!==void 0?{path:s.path}:{},...s.options!==void 0?{options:s.options.map(o=>({label:o.label,...o.description!==void 0?{description:o.description}:{}}))}:{},...s.review!==void 0?{review:{state:s.review.state,...s.review.selected_option!==void 0?{selectedOption:s.review.selected_option}:{},...s.review.feedback!==void 0?{feedback:s.review.feedback}:{}}}:{}}))}async getSessionWarnings(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/warnings`)).warnings??[]}async archiveSession(t){return await this.http.post(`/sessions/${encodeURIComponent(t)}:archive`,{})}async restoreSession(t){const n=await this.http.post(`/sessions/${encodeURIComponent(t)}:restore`,{});return xl(n)}async archiveSessions(t){return this.httpV2.post("/sessions:archive",{ids:t})}async restoreSessions(t){return this.httpV2.post("/sessions:restore",{ids:t})}async listMessages(t,n){const i={before_id:n?.beforeId,after_id:n?.afterId,page_size:n?.pageSize,role:n?.role},s=await this.http.get(`/sessions/${encodeURIComponent(t)}/messages`,i);return{items:s.items.map(Xk),hasMore:s.has_more}}async getSessionSnapshot(t){const n=Date.now();this.tracer.traceKeyEvent?.("session:snapshot:start",{sessionId:t});try{const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/snapshot`),s={asOfSeq:i.as_of_seq,epoch:i.epoch,session:xl(i.session),messages:i.messages.items.map(Xk),hasMoreMessages:i.messages.has_more,inFlightTurn:i.in_flight_turn===null?null:{turnId:i.in_flight_turn.turn_id,assistantText:i.in_flight_turn.assistant_text,thinkingText:i.in_flight_turn.thinking_text,runningTools:i.in_flight_turn.running_tools.map(o=>({toolCallId:o.tool_call_id,name:o.name,args:o.args,description:o.description,lastProgress:o.last_progress})),promptId:i.in_flight_turn.current_prompt_id},pendingApprovals:i.pending_approvals.map(bF),pendingQuestions:i.pending_questions.map(AF),subagents:(i.subagents??[]).map(o=>Zm(o,o.id))};return this.tracer.traceKeyEvent?.("session:snapshot:accepted",{sessionId:t,busy:s.session.busy,seq:s.asOfSeq,messageCount:s.messages.length,durationMs:Date.now()-n}),s}catch(i){throw this.tracer.traceKeyEvent?.("session:snapshot:failed",{sessionId:t,status:"failed",durationMs:Date.now()-n,...px(i)}),i}}async getSessionTranscript(t,n){return Bne(this.http,t,n)}async exportSession(t,n,i){const s=n===void 0?0:new TextEncoder().encode(n).byteLength,o=n===void 0||n.length===0?0:n.split(` +`).length,r=`/sessions/${encodeURIComponent(t)}/export`,l={web_log_bytes:s,web_log_entries:o},a=i?.desktop===!0;let u;try{u=await this.http.postZip(r,{web_log:n,...a?{desktop:!0}:{}},l)}catch(d){if(a&&zs(d)&&d.code===zne)u=await this.http.postZip(r,{web_log:n},l);else throw d}const c=`${t}.zip`;return{blob:u.blob,fileName:Rne(u.contentDisposition,c)}}async submitPrompt(t,n){const i=Date.now();this.tracer.traceKeyEvent?.("prompt:start",{sessionId:t,contentCount:n.content.length,mediaCount:n.content.filter(s=>s.type==="image"||s.type==="video"||s.type==="file").length});try{const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts`,NQ(n));return this.tracer.traceKeyEvent?.("prompt:accepted",{sessionId:t,promptId:s.prompt_id,status:s.status,durationMs:Date.now()-i}),{promptId:s.prompt_id,userMessageId:s.user_message_id,status:s.status}}catch(s){throw this.tracer.traceKeyEvent?.("prompt:failed",{sessionId:t,status:"failed",durationMs:Date.now()-i,...px(s)}),s}}async steerPrompts(t,n){const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts:steer`,{prompt_ids:n});return{steered:i.steered,promptIds:i.prompt_ids}}async abortPrompt(t,n){const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/prompts/${encodeURIComponent(n)}:abort`,void 0,{allowCodes:[40903]});return{aborted:i.aborted,atSeq:i.at_seq}}async abortSession(t){return{aborted:(await this.http.post(`/sessions/${encodeURIComponent(t)}:abort`,{})).aborted}}async compactSession(t,n){await this.http.post(`/sessions/${encodeURIComponent(t)}:compact`,n?{instruction:n}:{})}async undoSession(t,n=1){await this.http.post(`/sessions/${encodeURIComponent(t)}:undo`,{count:n})}async generateSessionTitle(t,n){try{const i={};n?.force===!0&&(i.force=!0),n?.source!==void 0&&(i.source=n.source);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/title/generate`,i);return typeof s?.title=="string"&&s.title.length>0?s.title:null}catch{return null}}async forkSession(t,n){const i={};n?.title!==void 0&&(i.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}:fork`,i,{timeoutMs:zw});return xl(s)}async createChildSession(t,n){const i={};n?.title!==void 0&&(i.title=n.title);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/children`,i,{timeoutMs:zw});return xl(s)}async listChildSessions(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/children`)).items.map(xl)}async startBtw(t){return{agentId:(await this.http.post(`/sessions/${encodeURIComponent(t)}:btw`,{})).agent_id}}async respondApproval(t,n,i){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,FQ(i));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async respondQuestion(t,n,i){const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}`,zQ(i));return{resolved:s.resolved,resolvedAt:s.resolved_at}}async dismissQuestion(t,n){return{dismissed:!0,dismissedAt:(await this.http.post(`/sessions/${encodeURIComponent(t)}/questions/${encodeURIComponent(n)}:dismiss`,void 0,{allowCodes:[40909]})).dismissed_at}}async listTasks(t,n){const i={status:n};return(await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks`,i)).items.map(o=>Zm(o))}async getTask(t,n,i){const s={with_output:i?.withOutput,output_bytes:i?.outputBytes},o=await this.http.get(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}`,s);return Zm(o)}async cancelTask(t,n){return await this.http.post(`/sessions/${encodeURIComponent(t)}/tasks/${encodeURIComponent(n)}:cancel`)}async listTerminals(t){return(await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals`)).items.map(P4)}async createTerminal(t,n={}){const i={cwd:n.cwd,shell:n.shell,cols:n.cols,rows:n.rows},s=await this.http.post(`/sessions/${encodeURIComponent(t)}/terminals`,i);return P4(s)}async getTerminal(t,n){const i=await this.http.get(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}`);return P4(i)}async closeTerminal(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/terminals/${encodeURIComponent(n)}:close`)}async listSkills(t){return((await this.http.get(`/sessions/${encodeURIComponent(t)}/skills`)).skills??[]).map(i=>({name:i.name,description:i.description,path:i.path,source:i.source}))}async listSkillsForWorkspace(t){return((await this.http.get(`/workspaces/${encodeURIComponent(t)}/skills`)).skills??[]).map(i=>({name:i.name,description:i.description,path:i.path,source:i.source}))}async activateSkill(t,n,i,s){const o={};i!==void 0&&i.length>0&&(o.args=i),s!==void 0&&s.length>0&&(o.attachments=s.map(kF));const r=await this.http.post(`/sessions/${encodeURIComponent(t)}/skills/${encodeURIComponent(n)}:activate`,o);return{activated:r.activated,skillName:r.skill_name}}async listCapabilities(){return(await this.http.get("/capabilities")).capabilities??[]}async getCapability(t){return this.http.get(`/capabilities/${encodeURIComponent(t)}`)}async installCapability(t){return this.http.post(`/capabilities/${encodeURIComponent(t)}:install`,{})}async listPlugins(){return(await this.http.get("/plugins")).plugins??[]}async listPluginMarketplace(){return(await this.http.get("/plugins/marketplace")).entries??[]}async installPlugin(t){return this.http.post("/plugins",{source:t})}async setPluginEnabled(t,n){return this.http.post(`/plugins/${encodeURIComponent(t)}:${n?"enable":"disable"}`,{})}async removePlugin(t){return this.http.post(`/plugins/${encodeURIComponent(t)}:remove`,{})}async listDirectory(t,n){const i={};n.path!==void 0&&(i.path=n.path),n.depth!==void 0&&(i.depth=n.depth),n.includeGitStatus!==void 0&&(i.include_git_status=n.includeGitStatus);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:list`,i),o=s.children_by_path?Object.fromEntries(Object.entries(s.children_by_path).map(([r,l])=>[r,l.map(Hw)])):void 0;return{items:s.items.map(Hw),childrenByPath:o,truncated:s.truncated}}async readFile(t,n){const i={path:n.path};n.offset!==void 0&&(i.offset=n.offset),n.length!==void 0&&(i.length=n.length);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:read`,i);return{path:s.path,content:s.content,encoding:s.encoding,size:s.size,truncated:s.truncated,etag:s.etag,mime:s.mime,languageId:s.language_id,lineCount:s.line_count,isBinary:s.is_binary}}async searchFiles(t,n){const i={workspace:t,query:n.query};n.limit!==void 0&&(i.limit=n.limit);const s=await this.http.post("/workspace/fs:search",i);return{items:s.items.map(o=>({path:o.path,name:o.name,kind:o.kind,score:o.score,matchPositions:o.match_positions})),truncated:s.truncated}}async grepFiles(t,n){const i={pattern:n.pattern};n.regex!==void 0&&(i.regex=n.regex),n.caseSensitive!==void 0&&(i.case_sensitive=n.caseSensitive);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:grep`,i);return{files:s.files,filesScanned:s.files_scanned,truncated:s.truncated,elapsedMs:s.elapsed_ms}}async getGitStatus(t,n){const i={};n!==void 0&&(i.paths=n);const s=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:git_status`,i);return{branch:s.branch,ahead:s.ahead,behind:s.behind,entries:s.entries,additions:s.additions,deletions:s.deletions,pullRequest:s.pullRequest??null}}async getFileDiff(t,n){const i=await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:diff`,{path:n});return{path:i.path,diff:i.diff,truncated:i.truncated??!1}}getFileDownloadUrl(t,n){const i=n.split("/").map(s=>encodeURIComponent(s)).join("/");return vd(this.opts.origin,`/sessions/${encodeURIComponent(t)}/fs/${i}:download`)}async openFile(t,n){const i={path:n.path};return n.line!==void 0&&(i.line=n.line),this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open`,i)}async revealFile(t,n){return this.http.post(`/sessions/${encodeURIComponent(t)}/fs:reveal`,{path:n.path})}async openInApp(t,n,i,s){const o={app_id:n,path:i};s!==void 0&&(o.line=s),await this.http.post(`/sessions/${encodeURIComponent(t)}/fs:open-in`,o)}async listWorkspaces(){try{return((await this.http.get("/workspaces")).items??[]).map(hp)}catch{return[]}}async addWorkspace(t){const n={root:t.root};t.name!==void 0&&(n.name=t.name);const i=await this.http.post("/workspaces",n);return hp(i)}async deleteWorkspace(t){await this.http.delete(`/workspaces/${encodeURIComponent(t)}`)}async updateWorkspace(t,n){const i=await this.http.patch(`/workspaces/${encodeURIComponent(t)}`,{name:n.name});return hp(i)}async browseFs(t){try{const n=await this.http.get("/fs:browse",{path:t});return{path:n.path,parent:n.parent,entries:(n.entries??[]).map(i=>({name:i.name,path:i.path,isDir:i.is_dir}))}}catch{return{path:"",parent:null,entries:[]}}}async getFsHome(){try{const t=await this.http.get("/fs:home");return{home:t.home,recentRoots:t.recent_roots??[]}}catch{return{home:"",recentRoots:[]}}}async listModels(){return(await this.http.get("/models")).items.map(OQ)}async listProviders(){return(await this.http.get("/providers")).items.map(If)}async getProvider(t){const n=await this.http.get(`/providers/${encodeURIComponent(t)}`),i=If(n);return n.api_key!==void 0?{...i,apiKey:n.api_key}:i}async addProvider(t){const n={id:t.id??"",type:t.type,models:(t.models??[]).map(s=>{const o={model:s.model,max_context_size:s.maxContextSize};return s.displayName!==void 0&&(o.display_name=s.displayName),s.capabilities!==void 0&&(o.capabilities=s.capabilities),s.maxOutputSize!==void 0&&(o.max_output_size=s.maxOutputSize),s.supportEfforts!==void 0&&(o.support_efforts=s.supportEfforts),s.adaptiveThinking!==void 0&&(o.adaptive_thinking=s.adaptiveThinking),o})};t.apiKey!==void 0&&(n.api_key=t.apiKey),t.baseUrl!==void 0&&(n.base_url=t.baseUrl),t.defaultModel!==void 0&&(n.default_model=t.defaultModel);const i=await this.http.post("/providers",n);return If(i)}async updateProvider(t,n){const i={type:n.type,models:(n.models??[]).map(o=>{const r={model:o.model,max_context_size:o.maxContextSize};return o.displayName!==void 0&&(r.display_name=o.displayName),o.capabilities!==void 0&&(r.capabilities=o.capabilities),o.maxOutputSize!==void 0&&(r.max_output_size=o.maxOutputSize),o.supportEfforts!==void 0&&(r.support_efforts=o.supportEfforts),o.adaptiveThinking!==void 0&&(r.adaptive_thinking=o.adaptiveThinking),r})};n.newId!==void 0&&(i.new_id=n.newId),n.apiKey!==void 0&&(i.api_key=n.apiKey),n.baseUrl!==void 0&&(i.base_url=n.baseUrl),n.defaultModel!==void 0&&(i.default_model=n.defaultModel);const s=await this.http.put(`/providers/${encodeURIComponent(t)}`,i);return{provider:If(s.provider)}}async deleteProvider(t){return await this.http.delete(`/providers/${encodeURIComponent(t)}`),{deleted:t}}async listCatalogProviders(){return(await this.http.get("/catalog/providers")).items.map(Ww)}async getCatalogProvider(t){const n=await this.http.get(`/catalog/providers/${encodeURIComponent(t)}`);return Ww(n)}async importCatalogProvider(t){const n={catalog_id:t.catalogId};t.apiKey!==void 0&&(n.api_key=t.apiKey),t.baseUrl!==void 0&&(n.base_url=t.baseUrl),t.id!==void 0&&(n.id=t.id);const i=await this.http.post("/providers:import_catalog",n);return{provider:If(i.provider),modelsImported:i.models_imported}}async importCustomRegistry(t){const n={url:t.url};t.apiKey!==void 0&&(n.api_key=t.apiKey);const i=await this.http.post("/providers:import_registry",n);return{providers:i.providers.map(If),modelsImported:i.models_imported}}async refreshProvider(t){const n=await this.http.post(`/providers/${encodeURIComponent(t)}:refresh`);return j4(n)}async refreshAllProviders(){const t=await this.http.post("/providers:refresh");return j4(t)}async refreshOAuthProviderModels(){const t=await this.http.post("/providers:refresh_oauth");return j4(t)}async getConfig(){const t=await this.http.get("/config");return eb(t)}async setConfig(t){const n={},i={providers:"providers",defaultProvider:"default_provider",defaultModel:"default_model",secondaryModel:"secondary_model",models:"models",thinking:"thinking",planMode:"plan_mode",yolo:"yolo",defaultPermissionMode:"default_permission_mode",defaultPlanMode:"default_plan_mode",permission:"permission",hooks:"hooks",services:"services",mergeAllAvailableSkills:"merge_all_available_skills",extraSkillDirs:"extra_skill_dirs",loopControl:"loop_control",background:"background",experimental:"experimental",telemetry:"telemetry",raw:"raw"};for(const[o,r]of Object.entries(t)){const l=i[o];l!==void 0&&(n[l]=r)}const s=await this.http.post("/config",n);return eb(s)}async getAuth(){const t=await this.http.get("/auth");return{ready:t.ready,providersCount:t.providers_count,defaultModel:t.default_model,managedProvider:t.managed_provider?{status:t.managed_provider.status}:null}}async startOAuthLogin(){const t=await this.http.post("/oauth/login",{});return t.status==="authenticated"?{flowId:t.flow_id,provider:t.provider,status:"authenticated"}:{flowId:t.flow_id,provider:t.provider,status:"pending",verificationUri:t.verification_uri,verificationUriComplete:t.verification_uri_complete,userCode:t.user_code,expiresIn:t.expires_in,interval:t.interval,expiresAt:t.expires_at}}async pollOAuthLogin(){const t=await this.http.get("/oauth/login");return t?{flowId:t.flow_id,status:t.status,resolvedAt:t.resolved_at}:null}async cancelOAuthLogin(){const t=await this.http.delete("/oauth/login");return{cancelled:t.cancelled,status:t.status}}async logout(){return{loggedOut:(await this.http.post("/oauth/logout",{})).logged_out}}async getUsage(){const t=await this.http.get("/oauth/usage");if(t.kind==="error")return{kind:"error",message:t.message,status:t.status};const n=i=>({name:i.name,window:i.window,used:i.used,limit:i.limit,resetAt:i.reset_at});return{kind:"ok",summary:t.summary===null?null:n(t.summary),limits:t.limits.map(n),extraUsage:t.extra_usage===null?null:{balanceCents:t.extra_usage.balance_cents,totalCents:t.extra_usage.total_cents,monthlyChargeLimitEnabled:t.extra_usage.monthly_charge_limit_enabled,monthlyChargeLimitCents:t.extra_usage.monthly_charge_limit_cents,monthlyUsedCents:t.extra_usage.monthly_used_cents,currency:t.extra_usage.currency}}}async getUserInfo(){return this.http.get("/oauth/userinfo")}async uploadFile(t){const n=new FormData;n.append("file",t.file,t.name??(t.file instanceof File?t.file.name:"upload")),t.name!==void 0&&n.append("name",t.name);const i=await this.http.postForm("/files",n);return{id:i.id,name:i.name,mediaType:i.media_type,size:i.size}}getFileUrl(t){return vd(this.opts.origin,`/files/${encodeURIComponent(t)}`)}async getFileBlob(t){return this.http.getBlob(`/files/${encodeURIComponent(t)}`)}getSessionMediaUrl(t,n){return vd(this.opts.origin,`/sessions/${encodeURIComponent(t)}/media/${encodeURIComponent(n)}`)}async getSessionMediaBlob(t,n){return this.http.getBlob(`/sessions/${encodeURIComponent(t)}/media/${encodeURIComponent(n)}`)}async readHostFileContent(t){const n=await this.http.getBlob("/fs:content",{path:t},{maxBytes:O4});if(n.size>O4)throw new F5({size:n.size,limit:O4});const i=n.type,s=!Pne(i),o=i||(s?"application/octet-stream":"text/plain");if(s){const l=await jne(n);return{path:t,content:l,encoding:"base64",mime:o,isBinary:!0,size:n.size}}const r=await n.text();return{path:t,content:r,encoding:"utf-8",mime:o,isBinary:!1,size:n.size}}connectEvents(t){const n=wQ(this.opts.origin,this.opts.identity.clientId),i=this.opts.projectorFactory(),s=new $ne({wsUrl:n,clientId:this.opts.identity.clientId,tracer:this.tracer,credentialStore:this.opts.credentialStore,mainAgentOnly:this.opts.mainAgentOnly,handlers:{onWireEvent:o=>{const r=PQ(o),l=jQ(o),a=RQ(o);a.type==="historyCompacted"&&!gx(a.reason)&&t.onResync(a.sessionId,a.beforeSeq),t.onEvent(a,{sessionId:r,seq:l})},onRawAgentEvent:o=>{const{type:r,seq:l,session_id:a,payload:u,offset:c}=o,d=i.project(r,u,a,{offset:c});for(const f of d){const h=u?.turnId,g=f.type==="assistantDelta"&&typeof h=="number"&&typeof c=="number"&&(r==="assistant.delta"||r==="thinking.delta")?{turnId:h,offset:c,kind:r==="assistant.delta"?"text":"thinking"}:void 0;f.type==="historyCompacted"&&!gx(f.reason)&&t.onResync(a,l),t.onEvent(f,{sessionId:a,seq:l,stream:g})}},onResync:(o,r,l)=>{i.reset(o),t.onResync(o,r,l)},onConnectionState:o=>{t.onConnectionChange(o)},onReplayComplete:()=>{t.onReplayComplete?.()},onError:(o,r,l)=>{t.onError(o,r,l)},onTerminalOutput:(o,r,l,a)=>{t.onTerminalOutput?.(o,r,l,a)},onTerminalExit:(o,r,l)=>{t.onTerminalExit?.(o,r,l)},onTranscriptReset:(o,r,l,a)=>{t.onTranscriptReset?.(o,r,l,a)},onTranscriptOps:(o,r,l,a)=>t.onTranscriptOps?.(o,r,l,a)??!0}});return s.connect(),{subscribe(o,r){s.subscribe(o,r??{seq:0})},unsubscribe(o){s.unsubscribe(o)},subscribeTranscript(o,r,l){s.subscribeTranscript(o,r,l)},unsubscribeTranscript(o,r){s.unsubscribeTranscript(o,r)},seedSnapshot(o,r){if(r.inFlightTurn===null){i.reset(o);return}const l=i.seedInFlight(o,r.inFlightTurn);for(const a of l)t.onEvent(a,{sessionId:o,seq:r.asOfSeq})},bindNextPromptId(o,r){i.bindNextPromptId(o,r)},abort(o,r){s.abort(o,r)},terminalAttach(o,r,l){s.terminalAttach(o,r,l)},terminalInput(o,r,l){s.terminalInput(o,r,l)},terminalResize(o,r,l,a){s.terminalResize(o,r,l,a)},terminalDetach(o,r){s.terminalDetach(o,r)},terminalClose(o,r){s.terminalClose(o,r)},markSideChannelAgent(o,r){s.markSideChannelAgent(o,r),i.markSideChannelAgent(r)},health(){return s.health()},reconnect(){s.reconnect()},close(){s.close()}}}}function j4(e){return{changed:e.changed.map(t=>({providerId:t.provider_id,providerName:t.provider_name,added:t.added,removed:t.removed})),unchanged:e.unchanged,failed:e.failed}}function Pne(e){const t=e.toLowerCase().split(";")[0].trim();return t===""||t==="text/plain"||t.startsWith("text/")?!0:/(json|xml|javascript|typescript|x-yaml|yaml|svg|x-sh|x-python|markdown|csv|html|css)$/.test(t)}function jne(e){return new Promise((t,n)=>{const i=new FileReader;i.onload=()=>{const s=String(i.result);t(s.slice(s.indexOf(",")+1))},i.onerror=()=>n(i.error),i.readAsDataURL(e)})}function Hne(){return window.kimiDesktop}function pD(e,t,n){const i=n.length===0?void 0:n.length===1?n[0]:n;try{Hne()?.log?.(e,t,i)}catch{}}function ya(e,...t){console.warn(e,...t),pD("warn",e,t)}function Ua(e,...t){console.error(e,...t),pD("error",e,t)}const Wne={multiedit:"multi_edit",multiedits:"multi_edit",shell:"bash",run:"bash",exec:"bash",ripgrep:"grep",rg:"grep",find:"glob",fetch:"web_fetch",webfetch:"web_fetch",url_fetch:"web_fetch",urlfetch:"web_fetch",list:"ls",listdir:"ls",list_dir:"ls",todowrite:"todo",todo_write:"todo",todoread:"todo",todolist:"todo",todo_list:"todo",agent:"task",subagent:"task",websearch:"search",web_search:"search",create_goal:"creategoal",get_goal:"getgoal",set_goal_budget:"setgoalbudget",update_goal:"updategoal"};function Eo(e){const t=(e??"").trim().toLowerCase().replace(/[\s-]+/g,"_");return Wne[t]??t}const qne={read:"tools.label.read",bash:"tools.label.bash",edit:"tools.label.edit",multi_edit:"tools.label.edit",write:"tools.label.write",grep:"tools.label.grep",glob:"tools.label.glob",ls:"tools.label.ls",web_fetch:"tools.label.web_fetch",search:"tools.label.search",todo:"tools.label.todo",task:"tools.label.task",agentswarm:"tools.label.swarm",askuserquestion:"tools.label.ask_user",exitplanmode:"tools.label.plan",creategoal:"tools.label.goal_create",getgoal:"tools.label.goal_get",setgoalbudget:"tools.label.goal_budget",updategoal:"tools.label.goal_update"};function gD(e,t){const n=qne[Eo(t)];return n?e(n):t}const mD=80;function Une(e,t=mD){const n=e.trim();return n.length>t?n.slice(0,t-1)+"…":n}function Kne(e,t){const n=e.trim();return!!(n===""||n==="{}"||n==="[]"||n==="null"||t&&Object.keys(t).length===0)}function Vne(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function Wn(e){return typeof e=="string"&&e.length>0?e:void 0}function Eu(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Zne(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean)[0];return n?`${t.host}/${n}`:t.host}catch{return e.replace(/^https?:\/\//,"")}}function H4(e){return Wn(e.path)??Wn(e.file_path)??Wn(e.filePath)??Wn(e.filename)}const Gne={active:"status.goalStatusActive",blocked:"status.goalStatusBlocked",complete:"status.goalStatusComplete"};function Qne(e,t){const n=Wn(t);if(!n)return;const i=Gne[n];return i?e(i):n}function Yne(e,t){const n=Eu(t.value),i=Wn(t.unit);if(!(n===void 0||!i))switch(i){case"turns":return e("tools.goal.turns",{value:n});case"tokens":return e("tools.goal.tokens",{value:n});case"milliseconds":return e("tools.goal.milliseconds",{value:n});case"seconds":return e("tools.goal.seconds",{value:n});case"minutes":return e("tools.goal.minutes",{value:n});case"hours":return e("tools.goal.hours",{value:n});default:return e("tools.goal.budget",{value:n,unit:i})}}function Q5(e,t,n,i=!1){const s=(o,r=mD)=>i?o.trim():Une(o,r);try{const o=Vne(n);if(!i&&Kne(n,o))return"";const r=()=>s(n.replace(/^·\s*/,""));if(!o)return r();switch(Eo(t)){case"read":{const l=H4(o);if(!l)return r();const a=Eu(o.offset)??Eu(o.line_start)??Eu(o.start_line),u=Eu(o.limit)??Eu(o.length),c=Eu(o.line_end)??Eu(o.end_line)??(a!==void 0&&u!==void 0?a+u:void 0);return s(a!==void 0&&c!==void 0?`${l}:${a}-${c}`:a!==void 0?`${l}:${a}`:l)}case"write":{const l=H4(o);return l?s(`${l} ${e("tools.chip.created")}`):r()}case"edit":case"multi_edit":{const l=H4(o);return l?s(l):r()}case"bash":{const l=Wn(o.command)??Wn(o.cmd)??Wn(o.script);return l?l.trim():r()}case"grep":case"search":{const l=Wn(o.pattern)??Wn(o.query)??Wn(o.regex),a=Wn(o.path)??Wn(o.glob)??Wn(o.include);return l&&a?s(e("tools.summary.inScope",{value:l,scope:a})):l?s(l):r()}case"glob":{const l=Wn(o.pattern)??Wn(o.glob)??Wn(o.query),a=Wn(o.path)??Wn(o.cwd);return l&&a?s(e("tools.summary.inScope",{value:l,scope:a})):l?s(l):Wn(o.path)?s(Wn(o.path)):r()}case"ls":{const l=Wn(o.path)??Wn(o.dir)??Wn(o.directory)??Wn(o.cwd);return l?s(l):r()}case"web_fetch":{const l=Wn(o.url)??Wn(o.uri);return l?s(Zne(l)):r()}case"todo":case"task":{const l=Wn(o.description)??Wn(o.title)??Wn(o.prompt)??Wn(o.name)??Wn(o.subagent_type);if(l)return s(l);const a=Array.isArray(o.todos)?o.todos:Array.isArray(o.items)?o.items:void 0;return a?s(e("tools.chip.todos",{count:a.length})):r()}case"creategoal":{if(i)return r();const l=Wn(o.objective),a=Wn(o.completionCriterion);return l&&a?s(e("tools.goal.objectiveWithCriterion",{objective:l,criterion:a})):l?s(l):r()}case"getgoal":return i?r():"";case"setgoalbudget":{if(i)return r();const l=Yne(e,o);return l?s(l):r()}case"updategoal":{if(i)return r();const l=Qne(e,o.status);return l?s(e("tools.goal.status",{status:l})):r()}default:return r()}}catch{return n}}function Jne(e,t){try{switch(Eo(t.name)){case"bash":return t.timing?t.timing:"";case"read":{if(t.output&&t.output.length>0){const n=t.output.length;return e("tools.chip.lines",{count:n})}return""}case"edit":case"multi_edit":case"write":{if(t.output){for(const i of t.output){const s=i.match(/\+(\d+).*[-−](\d+)/);if(s)return`+${s[1]} −${s[2]}`}const n=t.output.find(i=>/\d+/.test(i));if(n){const i=n.match(/\+(\d+)/),s=n.match(/[-−](\d+)/);if(i||s)return`${i?`+${i[1]}`:""} ${s?`−${s[1]}`:""}`.trim()}if(t.status!=="error")return e("tools.chip.edited")}return""}case"grep":case"search":return t.output&&t.output.length>0?e("tools.chip.results",{count:t.output.length}):"";default:return""}}catch{return""}}const Xne="main",eie=new Set(["turn.started","turn.step.started","turn.step.completed","turn.step.retrying","turn.step.interrupted","turn.ended","thinking.delta","assistant.delta","tool.use","tool.call.started","tool.call.delta","tool.progress","tool.result","agent.status.updated","prompt.completed","prompt.aborted","error"]);function la(e="msg_"){const t=Date.now().toString(36).padStart(10,"0"),n=Math.random().toString(36).slice(2,12).padEnd(10,"0");return`${e}${t}${n}`}function tie(e){if(!e||typeof e!="object")return{input:0,output:0,cacheRead:0,cacheCreate:0};const t=e;return{input:t.inputOther??t.input_tokens??0,output:t.output??t.output_tokens??0,cacheRead:t.inputCacheRead??t.cache_read_input_tokens??0,cacheCreate:t.inputCacheCreation??t.cache_creation_input_tokens??0}}function mx(){return{turnPromptId:new Map,currentPromptId:void 0,currentAssistantMsgId:void 0,turnTextLen:0,turnThinkLen:0,toolStartTimes:new Map,totalInput:0,totalOutput:0,totalCacheRead:0,totalCacheCreate:0,contextTokens:0,contextLimit:0,turnCount:0,model:"",messages:[],subagentMeta:new Map,restartedThisRun:new Set,settledByKernel:new Set,retiredBindings:new Set,registrationSeq:0,registrationOrderByKey:new Map,retryReuseMsgId:void 0,retryActive:!1}}function Zi(e,t){const n=e[t];return typeof n=="string"?n:void 0}function oo(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:void 0}function sl(e,t){const n=e[t];return typeof n=="number"&&Number.isFinite(n)?n:null}function nie(e){if(!e||typeof e!="object")return null;const t=e,n=t.budget,i=n&&typeof n=="object"?n:{},s=Zi(t,"status");if(s!=="active"&&s!=="paused"&&s!=="blocked"&&s!=="complete")return null;const o=Zi(t,"goalId")??Zi(t,"goal_id")??"goal",r=Zi(t,"objective")??"";return{goalId:o,objective:r,completionCriterion:Zi(t,"completionCriterion")??Zi(t,"completion_criterion"),status:s,turnsUsed:oo(t,"turnsUsed")??oo(t,"turns_used")??0,tokensUsed:oo(t,"tokensUsed")??oo(t,"tokens_used")??0,wallClockMs:oo(t,"wallClockMs")??oo(t,"wall_clock_ms")??0,terminalReason:Zi(t,"terminalReason")??Zi(t,"terminal_reason"),budget:{tokenBudget:sl(i,"tokenBudget")??sl(i,"token_budget"),remainingTokens:sl(i,"remainingTokens")??sl(i,"remaining_tokens"),turnBudget:sl(i,"turnBudget")??sl(i,"turn_budget"),remainingTurns:sl(i,"remainingTurns")??sl(i,"remaining_turns"),wallClockBudgetMs:sl(i,"wallClockBudgetMs")??sl(i,"wall_clock_budget_ms"),remainingWallClockMs:sl(i,"remainingWallClockMs")??sl(i,"remaining_wall_clock_ms"),overBudget:i.overBudget===!0||i.over_budget===!0}}}function $u(e,t,n,i,s){if(typeof i!="string"||i.length===0)return null;const r={...t.subagentMeta.get(i)??{id:i,agentId:i,sessionId:n,kind:"subagent",description:e("tasks.dockSubagent"),status:"running",createdAt:new Date().toISOString(),subagentPhase:"queued"},...s,id:i,sessionId:n,kind:"subagent"};return t.subagentMeta.set(i,r),r}function iie(e,t,n){if(t==="turn.step.started")return null;if(t==="tool.use"||t==="tool.call.started"){const i=Zi(n,"name")??Zi(n,"toolName")??"tool",s=gD(e,sie(i)),o=oie(e,i,n.args??n.input);return o?`Calling ${s}: ${o}`:`Calling ${s}`}if(t==="tool.progress"){const i=n.update;if(i&&typeof i=="object"){const o=Zi(i,"text");if(o)return W4(o);const r=Zi(i,"message");if(r)return W4(r)}const s=Zi(n,"message");if(s)return W4(s)}return null}function sie(e){return e.replace(/_\d+$/,"")}const vx=2e3;function W4(e){return e.length>vx?`${e.slice(0,vx)}…`:e}function oie(e,t,n){if(n==null)return"";const i=typeof n=="string"?n:JSON.stringify(n);return Q5(e,t,i)}function rie(e,t,n,i,s,o,r){if(r.has(i)&&s==="turn.step.started")return[];if(s==="assistant.delta"){const d=Zi(o,"delta");if(!d)return[];const f=t.subagentMeta.get(i),h=$u(e,t,n,i,{status:"running",subagentPhase:"working",startedAt:f?.startedAt??new Date().toISOString()}),g=[];return h&&g.push({type:"taskCreated",sessionId:n,task:h}),g.push({type:"taskProgress",sessionId:n,taskId:i,outputChunk:d,stream:"stdout",kind:"text"}),g}const l=iie(e,s,o);if(l===null||l.length===0)return[];const a=t.subagentMeta.get(i),u=$u(e,t,n,i,{status:"running",subagentPhase:"working",startedAt:a?.startedAt??new Date().toISOString()}),c=[];return u&&c.push({type:"taskCreated",sessionId:n,task:u}),c.push({type:"taskProgress",sessionId:n,taskId:i,outputChunk:l,stream:"stdout"}),c}function Qc(e){return{...e,content:e.content.map(t=>({...t}))}}function yx(e,t,n){const i={id:la("msg_"),sessionId:t,role:"assistant",content:[],createdAt:new Date().toISOString(),promptId:n};return e.messages.push(i),i}function lie(e,t,n,i,s,o){const r={id:i,sessionId:t,role:"user",content:s,createdAt:o,promptId:n};return e.messages.push(r),r}function kx(e){return Array.isArray(e)?e.map(t=>D5(t)):[]}function bx(e,t,n,i){const s=e.messages.find(r=>r.id===t);if(!s)return-1;const o=s.content.at(-1);return o&&o.type===n?(n==="text"?o.text+=i:o.thinking+=i,s.content.length-1):(s.content.push(n==="text"?{type:"text",text:i}:{type:"thinking",thinking:i}),s.content.length-1)}function aie(e,t,n,i,s,o){const r=e.messages.find(l=>l.id===t);r&&r.content.push({type:"toolUse",toolCallId:n,toolName:i,input:s,outputLines:o})}function uie(e){const t=e.update,n=t&&typeof t=="object"?t:null,s=(n?.stream??n?.kind??e.stream)==="stderr"?"stderr":"stdout",o=typeof n?.text=="string"&&n.text||typeof n?.message=="string"&&n.message||typeof e.chunk=="string"&&e.chunk||typeof e.output=="string"&&e.output||typeof e.message=="string"&&e.message||"";return o.length>0?{outputChunk:o,stream:s}:null}function Ax(e,t){e.messages.find(n=>n.id===t)}function cie(e,t,n,i,s,o){const r={id:la("msg_"),sessionId:t,role:"tool",content:[{type:"toolResult",toolCallId:n,output:i,isError:s}],createdAt:new Date().toISOString(),promptId:o};return e.messages.push(r),r}function x1(e,t){return e.messages.find(n=>n.id===t)}function Cx(e){return{inputTokens:e.totalInput,outputTokens:e.totalOutput,cacheReadTokens:e.totalCacheRead,cacheCreationTokens:e.totalCacheCreate,totalCostUsd:0,contextTokens:e.contextTokens,contextLimit:e.contextLimit,turnCount:e.turnCount}}function die(e){const{t}=e,n=new Map,i=new Set;function s(f){let h=n.get(f);return h||(h=mx(),n.set(f,h)),h}function o(f){n.set(f,mx())}function r(f){i.add(f)}function l(f,h){const g=s(f);g.currentPromptId=h}function a(f,h){o(f);const g=s(f),m=h.promptId??la("pr_");g.currentPromptId=m,g.turnPromptId.set(h.turnId,m);const y=yx(g,f,m);h.thinkingText.length>0&&y.content.push({type:"thinking",thinking:h.thinkingText}),h.assistantText.length>0&&y.content.push({type:"text",text:h.assistantText});for(const A of h.runningTools){const b=typeof A.lastProgress?.text=="string"&&A.lastProgress.text.length>0?[A.lastProgress.text]:void 0;y.content.push({type:"toolUse",toolCallId:A.toolCallId,toolName:A.name,input:A.args??{},outputLines:b}),g.toolStartTimes.set(A.toolCallId,Date.now())}return g.currentAssistantMsgId=y.id,g.turnTextLen=h.assistantText.length,g.turnThinkLen=h.thinkingText.length,[{type:"messageCreated",message:Qc(y)}]}function u(f,h,g,m){try{return d(f,h,g,m)}catch(y){return Ua("[agentProjector] Error projecting event:",f,y instanceof Error?y.message:y),[]}}function c(f,h){return h===void 0?"append":h<f?"skip":h>f?"gap":"append"}function d(f,h,g,m){const y=s(g),A=h,b=[],C=A?.agentId;if(typeof C=="string"&&C!==Xne){const v=i.has(C);if(f==="prompt.submitted"){if(!v)return[];const x=A?.promptId,S=A?.userMessageId;if(!x||!S)return[];const _=kx(A?.content);return _.length===0?[]:[{type:"messageCreated",agentId:C,message:{id:S,sessionId:g,role:"user",content:_,createdAt:typeof A?.createdAt=="string"?A.createdAt:new Date().toISOString(),promptId:x}}]}if(v&&(f==="thinking.delta"||f==="assistant.delta")){const x=A?.delta??"";return x?[{type:"agentDelta",sessionId:g,agentId:C,delta:{[f==="thinking.delta"?"thinking":"text"]:x}}]:[]}if(v&&f==="turn.ended")return[{type:"agentTurnEnded",sessionId:g,agentId:C,reason:A?.reason}];if(eie.has(f))return rie(t,y,g,C,f,A??{},i)}switch(f){case"session.meta.updated":{const v=A?.patch?.title??A?.title,x=A?.patch?.lastPrompt,S={};typeof v=="string"&&v.length>0&&(S.title=v),typeof x=="string"&&(S.lastPrompt=x),(S.title!==void 0||S.lastPrompt!==void 0)&&b.push({type:"sessionMetaUpdated",sessionId:g,...S});break}case"prompt.submitted":{const v=A?.promptId,x=A?.userMessageId;if(!v||!x)break;const S=kx(A?.content);if(S.length===0)break;y.currentPromptId=v;const _=lie(y,g,v,x,S,typeof A?.createdAt=="string"?A.createdAt:new Date().toISOString());b.push({type:"messageCreated",message:Qc(_),...typeof C=="string"?{agentId:C}:{}});break}case"turn.started":{const v=A?.turnId,x=y.currentPromptId??la("pr_");y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x),y.turnTextLen=0,y.turnThinkLen=0;const S=A?.origin;if(S&&typeof S=="object"&&S.kind==="system_trigger"&&S.name==="goal_continuation"){const _={id:v!==void 0?`goal_cont_${v}`:la("goal_"),sessionId:g,role:"user",content:[{type:"text",text:Zi(A??{},"prompt")??""}],createdAt:new Date().toISOString(),metadata:{origin:S}};y.messages.push(_),b.push({type:"turnActiveChanged",sessionId:g,active:!0}),b.push({type:"messageCreated",message:Qc(_)});break}b.push({type:"turnActiveChanged",sessionId:g,active:!0});break}case"turn.step.started":{const v=A?.turnId;y.retryActive&&(y.retryActive=!1,b.push({type:"turnRetry",sessionId:g,retry:void 0}));let x=y.turnPromptId.get(v)??y.currentPromptId;if(x||(x=la("pr_"),y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x)),y.turnTextLen=0,y.turnThinkLen=0,y.retryReuseMsgId!==void 0){const _=y.retryReuseMsgId;if(y.retryReuseMsgId=void 0,x1(y,_)!==void 0){y.currentAssistantMsgId=_;break}}const S=yx(y,g,x);y.currentAssistantMsgId=S.id,b.push({type:"messageCreated",message:Qc(S)});break}case"thinking.delta":{const v=y.currentAssistantMsgId;if(!v)break;const x=A?.delta??"";if(!x)break;m?.offset===0&&y.turnThinkLen>0&&(y.turnThinkLen=0);const S=c(y.turnThinkLen,m?.offset);if(S==="skip")break;if(S==="gap"){b.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"delta_gap"});break}const _=bx(y,v,"thinking",x);if(_<0)break;y.turnThinkLen+=x.length,b.push({type:"assistantDelta",sessionId:g,messageId:v,contentIndex:_,delta:{thinking:x}});break}case"assistant.delta":{const v=y.currentAssistantMsgId;if(!v)break;const x=A?.delta??"";if(!x)break;m?.offset===0&&y.turnTextLen>0&&(y.turnTextLen=0);const S=c(y.turnTextLen,m?.offset);if(S==="skip")break;if(S==="gap"){b.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"delta_gap"});break}const _=bx(y,v,"text",x);if(_<0)break;y.turnTextLen+=x.length,b.push({type:"assistantDelta",sessionId:g,messageId:v,contentIndex:_,delta:{text:x}});break}case"tool.use":case"tool.call.started":{const v=y.currentAssistantMsgId,x=A?.turnId,S=y.turnPromptId.get(x)??y.currentPromptId;if(!v||!S)break;const _=A?.toolCallId,I=A?.name??A?.toolName??"",M=A?.args??A?.input??{};aie(y,v,_,I,M);const $=x1(y,v);$&&$.content.length-1,y.toolStartTimes.set(_,Date.now()),$&&b.push({type:"messageUpdated",sessionId:g,messageId:v,content:$.content.map(D=>({...D})),status:"pending"});break}case"tool.call.delta":break;case"tool.progress":{const v=A?.toolCallId,x=uie(A??{});v&&x&&b.push({type:"toolOutput",sessionId:g,toolCallId:v,outputChunk:x.outputChunk,stream:x.stream});break}case"tool.result":{const v=A?.turnId;let x=y.turnPromptId.get(v)??y.currentPromptId;x||(x=la("pr_"),y.currentPromptId=x,v!==void 0&&y.turnPromptId.set(v,x));const S=A?.toolCallId,_=A?.output,I=A?.isError??!1;y.toolStartTimes.get(S)??Date.now(),y.toolStartTimes.delete(S);const M=cie(y,g,S,_,I,x);b.push({type:"messageCreated",message:Qc(M)}),y.currentAssistantMsgId=void 0;break}case"turn.step.completed":{const v=y.currentAssistantMsgId,x=tie(A?.usage);if(y.totalInput+=x.input,y.totalOutput+=x.output,y.totalCacheRead+=x.cacheRead,y.totalCacheCreate+=x.cacheCreate,v){Ax(y,v);const S=x1(y,v);S&&b.push({type:"messageUpdated",sessionId:g,messageId:v,content:S.content.map(_=>({..._})),status:"completed"})}break}case"agent.status.updated":{A?.model&&(y.model=A.model),A?.contextTokens!==void 0&&(y.contextTokens=A.contextTokens),A?.maxContextTokens!==void 0&&(y.contextLimit=A.maxContextTokens);const v=A?.phase;v!=null&&v.kind==="retrying"?(y.retryActive=!0,b.push({type:"turnRetry",sessionId:g,retry:{failedAttempt:oo(v,"failedAttempt")??0,nextAttempt:oo(v,"nextAttempt")??0,maxAttempts:oo(v,"maxAttempts")??0,delayMs:oo(v,"delayMs")??0,errorName:Zi(v,"errorName"),statusCode:oo(v,"statusCode"),turnId:oo(v,"turnId")}})):y.retryActive&&v!==void 0&&v!==null&&typeof v.kind=="string"&&(y.retryActive=!1,b.push({type:"turnRetry",sessionId:g,retry:void 0})),b.push({type:"sessionUsageUpdated",sessionId:g,usage:Cx(y),model:y.model||void 0,swarmMode:A?.swarmMode===!0?!0:A?.swarmMode===!1?!1:void 0,planMode:A?.planMode===!0?!0:A?.planMode===!1?!1:void 0,thinking:typeof A?.thinkingEffort=="string"&&A.thinkingEffort.length>0?A.thinkingEffort:void 0});break}case"turn.ended":{const v=y.currentAssistantMsgId,x=A?.reason??"completed",S=oo(A??{},"durationMs"),_=A?.turnId,I=(_!==void 0?y.turnPromptId.get(_):void 0)??y.currentPromptId;if(b.push({type:"turnActiveChanged",sessionId:g,active:!1,reason:A?.reason,promptId:I}),v){Ax(y,v);const $=x1(y,v);$&&b.push({type:"messageUpdated",sessionId:g,messageId:v,content:$.content.map(D=>({...D})),status:x==="failed"||x==="blocked"?"error":"completed",durationMs:S})}y.turnCount++;const M=Cx(y);b.push({type:"sessionUsageUpdated",sessionId:g,usage:M}),y.currentAssistantMsgId=void 0,y.currentPromptId=void 0,y.turnTextLen=0,y.turnThinkLen=0,y.retryReuseMsgId=void 0;break}case"prompt.completed":{const v=A?.promptId;typeof v=="string"&&v.length>0&&b.push({type:"promptCompleted",sessionId:g,promptId:v,reason:A?.reason??"completed"});break}case"prompt.aborted":{const v=A?.promptId;typeof v=="string"&&v.length>0&&b.push({type:"promptAborted",sessionId:g,promptId:v});break}case"turn.step.retrying":{y.retryActive=!0,b.push({type:"turnRetry",sessionId:g,retry:{failedAttempt:oo(A??{},"failedAttempt")??0,nextAttempt:oo(A??{},"nextAttempt")??0,maxAttempts:oo(A??{},"maxAttempts")??0,delayMs:oo(A??{},"delayMs")??0,errorName:Zi(A??{},"errorName"),statusCode:oo(A??{},"statusCode"),turnId:typeof A?.turnId=="number"?A.turnId:void 0}});const v=y.currentAssistantMsgId;if(v!==void 0){const x=x1(y,v);x!==void 0&&(x.content=x.content.filter(S=>S.type!=="text"&&S.type!=="thinking"&&S.type!=="toolUse"),b.push({type:"messageUpdated",sessionId:g,messageId:v,content:x.content.map(S=>({...S})),status:"pending"}),y.retryReuseMsgId=v)}y.turnTextLen=0,y.turnThinkLen=0,y.toolStartTimes.clear();break}case"turn.step.interrupted":{y.currentAssistantMsgId=void 0,y.retryReuseMsgId=void 0;break}case"subagent.spawned":{const v=typeof A?.subagentId=="string"&&A.subagentId.length>0?A.subagentId:la("task_"),x=typeof A?.taskId=="string"&&A.taskId.length>0?A.taskId:void 0,S=x!==void 0&&x!==v?y.subagentMeta.get(x):void 0,_=y.subagentMeta.get(v);S!==void 0&&y.subagentMeta.delete(x),x!==void 0&&!y.registrationOrderByKey.has(x)&&y.registrationOrderByKey.set(x,++y.registrationSeq);const I=_===void 0||S===void 0?_??S:{..._,createdAt:S.createdAt,startedAt:S.startedAt??_.startedAt,runInBackground:!0,backgroundTaskId:_.backgroundTaskId??x},M=I?.backgroundTaskId??(I!==void 0&&x!==void 0&&I.id===x?x:void 0),$=x!==void 0?y.registrationOrderByKey.get(x):void 0,D=M!==void 0?y.registrationOrderByKey.get(M):void 0,T=y.retiredBindings.has(x??"")||$!==void 0&&D!==void 0&&$<D,N=I!==void 0&&(x===void 0&&(I.status!=="running"?!0:M!==void 0&&y.restartedThisRun.has(v))||x!==void 0&&x!==M&&!T&&!(I.status==="running"&&M===void 0)),O=I?.subagentPhase==="working"&&(x===void 0||x===M||y.restartedThisRun.has(v));N&&(y.restartedThisRun.delete(v),M!==void 0&&M!==x&&y.retiredBindings.add(M));const P={id:v,agentId:I?.agentId??v,sessionId:g,kind:"subagent",description:typeof A?.description=="string"?A.description:A?.subagentName??I?.description??t("tasks.dockSubagent"),status:N?"running":I?.status??"running",createdAt:N&&!O?new Date().toISOString():I?.createdAt??new Date().toISOString(),startedAt:N&&!O?void 0:I?.startedAt,completedAt:N?void 0:I?.completedAt,completedAtEstimated:N?void 0:I?.completedAtEstimated,subagentPhase:N?O?"working":"queued":I?.subagentPhase??"queued",subagentType:typeof A?.subagentName=="string"?A.subagentName:I?.subagentType,model:typeof A?.model=="string"&&A.model.length>0?A.model:I?.model,thinkingEffort:typeof A?.thinkingEffort=="string"&&A.thinkingEffort.length>0?A.thinkingEffort:I?.thinkingEffort,parentToolCallId:typeof A?.parentToolCallId=="string"?A.parentToolCallId:I?.parentToolCallId,swarmIndex:typeof A?.swarmIndex=="number"?A.swarmIndex:I?.swarmIndex,runInBackground:N?A?.runInBackground===!0||A?.runInBackground===void 0&&I?.runInBackground===!0:A?.runInBackground===!0||I?.runInBackground===!0,outputPreview:N?void 0:I?.outputPreview,outputBytes:N?void 0:I?.outputBytes,outputLines:N?void 0:I?.outputLines,suspendedReason:N?void 0:I?.suspendedReason,text:N?void 0:I?.text,backgroundTaskId:T?I?.backgroundTaskId:N?x:x??I?.backgroundTaskId};y.subagentMeta.set(P.id,P),b.push({type:"taskCreated",sessionId:g,task:P});break}case"subagent.started":{const v=typeof A?.subagentId=="string"?A.subagentId:void 0,x=v!==void 0&&(y.subagentMeta.get(v)?.status!==void 0&&y.subagentMeta.get(v).status!=="running"||y.settledByKernel.has(v));x&&y.settledByKernel.delete(v);const S=$u(t,y,g,A?.subagentId,{subagentPhase:"working",status:"running",startedAt:new Date().toISOString(),suspendedReason:void 0,...x?{createdAt:new Date().toISOString(),completedAt:void 0,completedAtEstimated:void 0,outputPreview:void 0,outputBytes:void 0,outputLines:void 0,text:void 0}:{}});x&&v!==void 0&&y.restartedThisRun.add(v),S&&b.push({type:"taskCreated",sessionId:g,task:S});break}case"subagent.suspended":{const v=$u(t,y,g,A?.subagentId,{subagentPhase:"suspended",status:"running",suspendedReason:typeof A?.reason=="string"?A.reason:void 0});v&&b.push({type:"taskCreated",sessionId:g,task:v});break}case"subagent.completed":{const v=typeof A?.resultSummary=="string"?A.resultSummary:void 0,x=$u(t,y,g,A?.subagentId,{subagentPhase:"completed",status:"completed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:v});x&&b.push({type:"taskCreated",sessionId:g,task:x}),x!==null&&y.restartedThisRun.delete(x.id),b.push({type:"taskCompleted",sessionId:g,taskId:A?.subagentId??"",status:"completed",outputPreview:v});break}case"subagent.failed":{const v=typeof A?.error=="string"?A.error:void 0,x=$u(t,y,g,A?.subagentId,{subagentPhase:"failed",status:"failed",completedAt:new Date().toISOString(),completedAtEstimated:!0,outputPreview:v});x&&b.push({type:"taskCreated",sessionId:g,task:x}),x!==null&&y.restartedThisRun.delete(x.id),b.push({type:"taskCompleted",sessionId:g,taskId:A?.subagentId??"",status:"failed",outputPreview:v});break}case"error":{b.push({type:"unknown",raw:{_agentError:!0,code:A?.code,message:A?.message,name:A?.name,details:A?.details,retryable:A?.retryable}});break}case"task.notified":{const v=Zi(A??{},"notificationType"),x=Zi(A??{},"sourceKind"),S=Zi(A??{},"sourceId");if(!v||!x||!S)break;const _=v.startsWith("task.")?v.slice(5):v,I=`task:${S}:${_}`,M=P=>P.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">"),$=Zi(A??{},"title")??"",D=Zi(A??{},"severity")??"",T=Zi(A??{},"body")??"",N=`<notification id="${I}" category="task" type="${M(v)}" source_kind="${M(x)}" source_id="${M(S)}"> +`+($!==""?`Title: ${M($)} +`:"")+(D!==""?`Severity: ${M(D)} +`:"")+(T!==""?`${M(T)} +`:"")+"</notification>",O={id:`task_ntf_${I}`,sessionId:g,role:"user",content:[{type:"text",text:N}],createdAt:new Date().toISOString(),metadata:{origin:{kind:"task",taskId:S,status:_,notificationId:I}}};y.messages.push(O),b.push({type:"messageCreated",message:Qc(O)});break}case"warning":{b.push({type:"unknown",raw:{_agentWarning:!0,message:A?.message}});break}case"task.started":case"background.task.started":{const v=A?.info??{},x=typeof v.startedAt=="number"?new Date(v.startedAt).toISOString():void 0,S=typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):la("task_"),_=typeof v.description=="string"?v.description:typeof v.command=="string"?v.command:t("tasks.defaultDescription");if(v.kind==="agent"){const M=typeof v.agentId=="string"&&v.agentId.length>0?v.agentId:void 0;if(M!==void 0){const $=y.subagentMeta.get(M),D=y.registrationOrderByKey.get(S),T=$?.backgroundTaskId!==void 0?y.registrationOrderByKey.get($.backgroundTaskId):void 0;if(y.retiredBindings.has(S)||D!==void 0&&T!==void 0&&D<T){$!==void 0&&b.push({type:"taskCreated",sessionId:g,task:$});break}y.registrationOrderByKey.has(S)||y.registrationOrderByKey.set(S,++y.registrationSeq);const N=$!==void 0&&$.backgroundTaskId!==S&&!($.status==="running"&&$.backgroundTaskId===void 0),O=$u(t,y,g,M,{description:_,backgroundTaskId:S,runInBackground:!0,...$===void 0||$.status==="running"?{status:"running",subagentPhase:"working",startedAt:$?.startedAt??x}:{},...N?{status:"running",subagentPhase:"working",createdAt:x??new Date().toISOString(),startedAt:x,completedAt:void 0,completedAtEstimated:void 0,outputPreview:void 0,outputBytes:void 0,outputLines:void 0,suspendedReason:void 0,text:void 0}:{}});O&&b.push({type:"taskCreated",sessionId:g,task:O}),y.restartedThisRun.delete(M)}else{const $=[...y.subagentMeta.values()].find(T=>T.backgroundTaskId===S);if($===void 0&&(y.retiredBindings.has(S)||y.registrationOrderByKey.has(S)&&y.registrationOrderByKey.get(S)<y.registrationSeq))break;if($!==void 0){const T=$u(t,y,g,$.agentId??$.id,{description:typeof v.description=="string"||typeof v.command=="string"?_:$.description,status:"running",subagentPhase:"working",runInBackground:!0,startedAt:$.startedAt??x});T&&b.push({type:"taskCreated",sessionId:g,task:T});break}const D={id:S,sessionId:g,kind:"subagent",description:_,status:"running",createdAt:x??new Date().toISOString(),startedAt:x,subagentPhase:"working",runInBackground:!0};y.subagentMeta.set(S,D),y.registrationOrderByKey.has(S)||y.registrationOrderByKey.set(S,++y.registrationSeq),b.push({type:"taskCreated",sessionId:g,task:D})}break}const I=typeof v.command=="string"?v.command:void 0;b.push({type:"taskCreated",sessionId:g,task:{id:S,sessionId:g,kind:"bash",description:_,command:I,status:"running",createdAt:x??new Date().toISOString(),startedAt:x,outputPreview:I!==void 0?`$ ${I}`:void 0}});break}case"task.terminated":case"background.task.terminated":{const v=A?.info??{},x=v.status==="failed"||v.status==="timed_out"||v.status==="lost"||typeof v.exitCode=="number"&&v.exitCode!==0;v.kind==="agent"&&typeof v.agentId=="string"&&v.agentId.length>0&&y.settledByKernel.add(v.agentId),b.push({type:"taskCompleted",sessionId:g,taskId:typeof v.taskId=="string"?v.taskId:typeof v.taskId=="number"?String(v.taskId):"",status:v.status==="killed"?"cancelled":x?"failed":"completed"});break}case"compaction.completed":{const v=A?.result??{};b.push({type:"compactionCompleted",sessionId:g,tokensBefore:typeof v.tokensBefore=="number"?v.tokensBefore:void 0,tokensAfter:typeof v.tokensAfter=="number"?v.tokensAfter:void 0,summary:typeof v.summary=="string"?v.summary:void 0}),b.push({type:"historyCompacted",sessionId:g,beforeSeq:0,reason:"auto_compact"});break}case"compaction.started":{b.push({type:"compactionStarted",sessionId:g,trigger:A?.trigger==="manual"?"manual":"auto",instruction:typeof A?.instruction=="string"?A.instruction:void 0});break}case"compaction.cancelled":{b.push({type:"compactionCancelled",sessionId:g});break}case"goal.updated":{const v=nie(A?.snapshot??null);b.push({type:"goalUpdated",sessionId:g,goal:v?.status==="complete"?null:v});break}case"cron.fired":{const v=A?.origin,x=Zi(A??{},"prompt");if(v&&typeof v=="object"&&v.kind==="cron_job"&&x){const S={id:la("cron_"),sessionId:g,role:"user",content:[{type:"text",text:x}],createdAt:new Date().toISOString(),metadata:{origin:v}};y.messages.push(S),b.push({type:"messageCreated",message:Qc(S)})}break}}return b}return{project:u,bindNextPromptId:l,seedInFlight:a,reset:o,markSideChannelAgent:r}}function fie(e){return new One({origin:e.origin,identity:e.identity,tracer:e.tracer,credentialStore:e.credentialStore,projectorFactory:()=>die({t:e.t}),mainAgentOnly:e.mainAgentOnly})}const vD="kimiWeb.compaction",hie={t:e=>e},pie="kimiWeb.optimisticUserMessage",wx="Sub Agent";function K1(e,t,n=e.length){for(let i=0;i<n;i++){const s=e[i];s.type==="thinking"&&s.startedAt!==void 0&&s.durationMs===void 0&&(e[i]={...s,durationMs:Math.max(0,t-Date.parse(s.startedAt))})}}function xx(e,t,n){const i=e.messagesBySession[t];if(i)for(let s=i.length-1;s>=0;s--){const o=i[s];if(o.role!=="assistant")continue;if(!o.content.some(u=>u.type==="thinking"&&u.startedAt!==void 0&&u.durationMs===void 0))return;const l=[...o.content];K1(l,n);const a=[...i];a[s]={...o,content:l},e.messagesBySession[t]=a;return}}function Sx(e){const t=Date.parse(e);return Number.isNaN(t)?Date.now():t}function gie(){return{sessions:[],activeSessionId:void 0,messagesBySession:{},approvalsBySession:{},planReviewByToolCallId:{},questionsBySession:{},tasksBySession:{},goalBySession:{},goalVersionBySession:{},lastSeqBySession:{},turnActiveBySession:{},turnEndedPromptIdBySession:{},turnErrorBySession:{},turnRetryBySession:{},compactionBySession:{},warnings:[]}}function mie(e){return{...e,sessions:e.sessions,messagesBySession:{...e.messagesBySession},approvalsBySession:{...e.approvalsBySession},planReviewByToolCallId:{...e.planReviewByToolCallId},questionsBySession:{...e.questionsBySession},tasksBySession:{...e.tasksBySession},goalBySession:{...e.goalBySession},goalVersionBySession:{...e.goalVersionBySession},lastSeqBySession:{...e.lastSeqBySession},turnActiveBySession:{...e.turnActiveBySession},turnEndedPromptIdBySession:{...e.turnEndedPromptIdBySession},turnErrorBySession:{...e.turnErrorBySession},turnRetryBySession:{...e.turnRetryBySession},compactionBySession:{...e.compactionBySession},warnings:[...e.warnings]}}function vie(e,t,n){if(t!==void 0&&n!==void 0&&n>0){const i=e.lastSeqBySession[t]??0;n>i&&(e.lastSeqBySession[t]=n)}}function Yc(e,t){const n=new Date().toISOString();e.sessions=e.sessions.map(i=>i.id===t&&n>i.updatedAt?{...i,updatedAt:n}:i)}function Cu(e,t){return t.seq>(e.lastSeqBySession[t.sessionId]??0)}function _x(e){return e.role==="user"&&e.metadata?.[pie]===!0}function yie(e){const t=e.metadata?.origin;return t?.kind==="cron_job"||t?.kind==="cron_missed"}function kie(e){return e.metadata?.origin?.kind==="system_trigger"}function bie(e,t){const n=t.userMessageId??t.id;for(let s=e.length-1;s>=0;s--){const o=e[s];if(_x(o)&&o.userMessageId===n)return s}const i=t.promptId;if(i!==void 0)for(let s=e.length-1;s>=0;s--){const o=e[s];if(_x(o)&&o.promptId===i)return s}return-1}function Aie(e,t,n){let i=!1;const s=e.map(o=>{let r=!1;const l=o.content.map(a=>a.type!=="toolUse"||a.toolCallId!==t?a:(r=!0,{...a,outputLines:[...a.outputLines??[],n]}));return r?(i=!0,{...o,content:l}):o});return i?s:e}const Cie={"provider.connection_error":"connection","provider.auth_error":"auth","provider.rate_limit":"rateLimit","provider.overloaded":"overloaded","provider.filtered":"filtered","provider.api_error":"api","context.overflow":"contextOverflow"};function wie(e,t){const n=[],i=(r,l)=>{typeof l=="number"||typeof l=="boolean"?n.push({label:r,value:String(l)}):typeof l=="string"&&l.length>0&&n.push({label:r,value:l})};i(t("warnings.details.code"),e.code);const s=e.details??{};i(t("warnings.details.status"),s.statusCode),i(t("warnings.details.requestId"),s.requestId),i(t("warnings.details.errorName"),e.name);for(const[r,l]of Object.entries(s))r==="statusCode"||r==="requestId"||i(r,l);const o=(e.code!==void 0?Cie[e.code]:void 0)??"title";return{severity:"error",title:t(`warnings.agentError.${o}`),message:e.message,details:n.length>0?n:void 0}}function xie(e,t,n,i=hie){const s=mie(e);switch(vie(s,n.sessionId,n.seq),t.type){case"sessionCreated":{s.sessions.some(r=>r.id===t.session.id)||(s.sessions=[t.session,...s.sessions]);break}case"sessionUpdated":{s.sessions=s.sessions.map(o=>o.id===t.session.id?{...t.session,pullRequest:o.pullRequest}:o);break}case"sessionDeleted":{const o=t.sessionId;s.sessions=s.sessions.filter(r=>r.id!==o),delete s.messagesBySession[o],delete s.tasksBySession[o],delete s.goalBySession[o],delete s.approvalsBySession[o],delete s.questionsBySession[o],delete s.lastSeqBySession[o],delete s.turnActiveBySession[o],delete s.turnEndedPromptIdBySession[o],delete s.turnErrorBySession[o],delete s.turnRetryBySession[o],s.activeSessionId===o&&(s.activeSessionId=void 0);break}case"sessionWorkChanged":{if(!Cu(e,n))break;let o;s.sessions=s.sessions.map(r=>r.id!==t.sessionId?r:(o=t.pendingInteraction??(t.busy?r.pendingInteraction:"none"),{...r,busy:t.busy,mainTurnActive:t.mainTurnActive??(t.busy?r.mainTurnActive:!1),pendingInteraction:o,lastTurnReason:t.lastTurnReason})),o==="none"?(delete s.approvalsBySession[t.sessionId],delete s.questionsBySession[t.sessionId]):o==="question"&&delete s.approvalsBySession[t.sessionId],t.mainTurnActive===!0?s.turnActiveBySession[t.sessionId]=!0:(t.mainTurnActive===!1||!t.busy)&&(e.turnActiveBySession[t.sessionId]&&Yc(s,t.sessionId),delete s.turnActiveBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId]);break}case"sessionMetaUpdated":{s.sessions=s.sessions.map(o=>o.id===t.sessionId?{...o,title:t.title??o.title,lastPrompt:t.lastPrompt??o.lastPrompt}:o);break}case"sessionUsageUpdated":{s.sessions=s.sessions.map(o=>{if(o.id!==t.sessionId)return o;const r=t.model&&t.model.length>0?t.model:o.model;return{...o,usage:t.usage,model:r}});break}case"historyCompacted":break;case"compactionStarted":{s.compactionBySession={...s.compactionBySession,[t.sessionId]:{status:"running",trigger:t.trigger}};break}case"compactionCompleted":{const o=t.sessionId,r=s.compactionBySession[o],{[o]:l,...a}=s.compactionBySession;if(s.compactionBySession=a,Object.prototype.hasOwnProperty.call(s.messagesBySession,o)){const u=s.messagesBySession[o]??[],c=`compaction_${o}_${n.seq}`;if(!u.some(d=>d.id===c)){const d={trigger:r?.trigger??"auto",tokensBefore:t.tokensBefore,tokensAfter:t.tokensAfter};s.messagesBySession[o]=[...u,{id:c,sessionId:o,role:"assistant",content:t.summary?[{type:"text",text:t.summary}]:[],createdAt:new Date().toISOString(),metadata:{origin:{kind:"compaction_summary"},[vD]:d}}]}}break}case"compactionCancelled":{const{[t.sessionId]:o,...r}=s.compactionBySession;s.compactionBySession=r;break}case"messageCreated":{const o=t.message.sessionId,r=s.messagesBySession[o]??[];if(!r.some(a=>a.id===t.message.id)){if(t.message.role==="user"&&!yie(t.message)&&!kie(t.message)){const a=bie(r,t.message);if(a!==-1){const u=[...r],c=u[a];u[a]={...t.message,id:c.id,promptId:t.message.promptId??c.promptId,userMessageId:t.message.userMessageId??t.message.id,metadata:{...t.message.metadata,...c.metadata}},s.messagesBySession[o]=u;break}}s.messagesBySession[o]=[...r,t.message]}break}case"messageUpdated":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=r.map(l=>{if(l.id!==t.messageId)return l;const a=t.content.map((c,d)=>{const f=l.content[d];return c.type==="thinking"&&f?.type==="thinking"?{...c,startedAt:f.startedAt,durationMs:f.durationMs}:c}),u=Date.now();return K1(a,u,a.length-1),(t.status!=="pending"||t.durationMs!==void 0)&&K1(a,u),{...l,content:a,durationMs:t.durationMs??l.durationMs,endedAt:t.durationMs!==void 0?l.endedAt??new Date(u).toISOString():l.endedAt}});break}case"assistantDelta":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=r.map(l=>{if(l.id!==t.messageId)return l;const a=[...l.content],u=t.contentIndex,c=a.length<=u;for(;a.length<=u;)a.push({type:"text",text:""});const d=a[u];let f;return t.delta.text!==void 0?d.type==="text"&&!c?f={type:"text",text:d.text+t.delta.text}:(f={type:"text",text:t.delta.text},K1(a,Date.now(),u)):t.delta.thinking!==void 0?d.type==="thinking"?f={type:"thinking",thinking:d.thinking+t.delta.thinking,signature:d.signature,startedAt:d.startedAt,durationMs:d.durationMs}:(f={type:"thinking",thinking:t.delta.thinking,startedAt:new Date().toISOString()},K1(a,Date.now(),u)):f=d,a[u]=f,{...l,content:a}});break}case"toolOutput":{const o=t.sessionId,r=s.messagesBySession[o]??[];s.messagesBySession[o]=Aie(r,t.toolCallId,t.outputChunk);break}case"approvalRequested":{const o=t.sessionId,r=s.approvalsBySession[o]??[];r.some(u=>u.approvalId===t.approval.approvalId)||(s.approvalsBySession[o]=[...r,t.approval],Cu(e,n)&&(xx(s,o,Sx(t.approval.createdAt)),Yc(s,o)));const a=t.approval.display;a?.kind==="plan_review"&&typeof a.plan=="string"&&a.plan.length>0&&(s.planReviewByToolCallId={...s.planReviewByToolCallId,[t.approval.toolCallId]:{plan:a.plan,path:typeof a.path=="string"?a.path:void 0}});break}case"approvalResolved":case"approvalExpired":{const o=t.sessionId,r=t.approvalId,l=s.approvalsBySession[o]??[];s.approvalsBySession[o]=l.filter(a=>a.approvalId!==r);break}case"questionRequested":{const o=t.sessionId,r=s.questionsBySession[o]??[];r.some(a=>a.questionId===t.question.questionId)||(s.questionsBySession[o]=[...r,t.question],Cu(e,n)&&(xx(s,o,Sx(t.question.createdAt)),Yc(s,o)));break}case"questionAnswered":case"questionDismissed":{const o=t.sessionId,r=t.questionId,l=s.questionsBySession[o]??[];s.questionsBySession[o]=l.filter(a=>a.questionId!==r);break}case"taskCreated":{const o=t.sessionId,r=s.tasksBySession[o]??[],l=r.findIndex(f=>f.id===t.task.id),a=t.task.backgroundTaskId===void 0?-1:r.findIndex(f=>f.id===t.task.backgroundTaskId),u=a!==-1&&l!==-1&&a!==l?r[a]:void 0,c=u!==void 0?r.filter((f,h)=>h!==a):r,d=c.findIndex(f=>f.id===t.task.id||t.task.backgroundTaskId!==void 0&&f.id===t.task.backgroundTaskId);if(d===-1)s.tasksBySession[o]=[...c,t.task];else{const f=[...c],h=c[d],g=t.task.backgroundTaskId!==void 0&&(t.task.backgroundTaskId===h.backgroundTaskId||h.id===t.task.backgroundTaskId)||h.id===t.task.id&&(h.kind!=="subagent"||h.agentId===void 0),m=(g&&h.status!=="running"?h:void 0)??(u!==void 0&&u.status!=="running"?u:void 0),y=m!==void 0&&(t.task.status==="running"||t.task.status!==m.status),A=!g&&h.status!=="running"||t.task.backgroundTaskId!==void 0&&h.backgroundTaskId!==void 0&&t.task.backgroundTaskId!==h.backgroundTaskId,b=g&&h.completedAt!==void 0&&h.completedAtEstimated!==!0;f[d]={...t.task,status:y?m.status:t.task.status,subagentPhase:y?m.subagentPhase:t.task.subagentPhase,completedAt:y?m.completedAt:b?h.completedAt:t.task.completedAt,completedAtEstimated:y?m.completedAtEstimated:b?h.completedAtEstimated:t.task.completedAtEstimated,outputLines:y?m.outputLines:A?u?.outputLines??t.task.outputLines:h.outputLines??u?.outputLines??t.task.outputLines,text:y?m.text:A?u?.text??t.task.text:h.text??u?.text??t.task.text,outputPreview:y?m.outputPreview:t.task.outputPreview??(A?u?.outputPreview:h.outputPreview??u?.outputPreview),outputBytes:y?m.outputBytes:t.task.outputBytes??(A?u?.outputBytes:h.outputBytes??u?.outputBytes),description:t.task.description===wx&&h.description!==wx?h.description:t.task.description,swarmIndex:t.task.swarmIndex??h.swarmIndex,parentToolCallId:t.task.parentToolCallId??h.parentToolCallId,subagentType:t.task.subagentType??h.subagentType,model:t.task.model??h.model,thinkingEffort:t.task.thinkingEffort??h.thinkingEffort,runInBackground:A?t.task.runInBackground:t.task.runInBackground??h.runInBackground,backgroundTaskId:A?t.task.backgroundTaskId:t.task.backgroundTaskId??h.backgroundTaskId,agentId:t.task.agentId??h.agentId},s.tasksBySession[o]=f}break}case"taskProgress":{const o=t.sessionId,r=s.tasksBySession[o]??[];s.tasksBySession[o]=r.map(l=>{if(l.id!==t.taskId)return l;if(l.kind==="subagent"&&t.kind==="text")return{...l,text:(l.text??"")+t.outputChunk};const a=l.outputLines??[];if(a.at(-1)===t.outputChunk)return l;const u=[...a,t.outputChunk];return{...l,outputLines:l.kind==="subagent"?u:u.slice(-40)}});break}case"taskCompleted":{const o=t.sessionId,r=s.tasksBySession[o]??[];s.tasksBySession[o]=r.map(l=>l.id!==t.taskId&&l.backgroundTaskId!==t.taskId||t.status==="completed"&&(l.status==="cancelled"||l.status==="failed")||t.status==="failed"&&l.status==="cancelled"?l:{...l,status:t.status,completedAt:l.completedAt??new Date().toISOString(),completedAtEstimated:l.completedAt===void 0?!0:l.completedAtEstimated,outputPreview:t.outputPreview??l.outputPreview,outputBytes:t.outputBytes??l.outputBytes});break}case"goalUpdated":{const o=t.sessionId;s.goalVersionBySession[o]=(s.goalVersionBySession[o]??0)+1,t.goal===null||t.goal.status==="complete"?delete s.goalBySession[o]:s.goalBySession[o]=t.goal;break}case"configChanged":{s.config=t.config;break}case"modelCatalogChanged":break;case"agentDelta":case"agentTurnEnded":break;case"promptCompleted":{t.reason==="blocked"&&Cu(e,n)&&Yc(s,t.sessionId);break}case"promptAborted":{if(t.promptId===e.turnEndedPromptIdBySession[t.sessionId])break;Cu(e,n)&&Yc(s,t.sessionId);break}case"turnActiveChanged":{if(!Cu(e,n))break;if(s.sessions=s.sessions.map(o=>o.id===t.sessionId?{...o,mainTurnActive:t.active}:o),t.active)s.turnActiveBySession[t.sessionId]=!0,delete s.turnEndedPromptIdBySession[t.sessionId],delete s.turnErrorBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId],Yc(s,t.sessionId);else{delete s.turnActiveBySession[t.sessionId],delete s.turnRetryBySession[t.sessionId],t.promptId!==void 0&&(s.turnEndedPromptIdBySession[t.sessionId]=t.promptId);const o=t.reason===void 0||t.reason==="completed"?"completed":"failed",r=s.tasksBySession[t.sessionId];r!==void 0&&(s.tasksBySession[t.sessionId]=r.map(l=>l.kind!=="subagent"||l.status!=="running"||l.runInBackground===!0?l:{...l,status:o,subagentPhase:o,completedAt:l.completedAt??new Date().toISOString(),completedAtEstimated:l.completedAt===void 0?!0:l.completedAtEstimated,suspendedReason:void 0})),Yc(s,t.sessionId)}break}case"turnRetry":{if(!Cu(e,n))break;t.retry===void 0?delete s.turnRetryBySession[t.sessionId]:s.turnRetryBySession[t.sessionId]=t.retry;break}case"unknown":{const o=t.raw;if(!(o&&o._noop===!0))if(o&&o._agentError){if(Cu(e,n)){if(n.sessionId!==void 0){const r=o.details??{};s.turnErrorBySession[n.sessionId]={code:o.code,message:o.message,name:o.name,retryable:o.retryable,statusCode:typeof r.statusCode=="number"?r.statusCode:void 0,requestId:typeof r.requestId=="string"?r.requestId:void 0}}(n.sessionId===void 0||n.sessionId!==e.activeSessionId)&&(s.warnings=[...s.warnings,wie(o,i.t)])}}else if(o&&o._agentWarning){const r=o.message??o.code??i.t("warnings.agentWarningFallback");s.warnings=[...s.warnings,`${i.t("warnings.noteLabel")}: ${r}`]}else{const r=o?.type??"(unknown)";s.warnings=[...s.warnings,i.t("warnings.unhandledEvent",{type:r})]}break}}return s}function Sie(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function vr(e,t){for(const n of Object.keys(t))Object.is(e[n],t[n])||(e[n]=t[n]);for(const n of Object.keys(e))n in t||delete e[n]}const _ie=[{pattern:/\brm\s+(?:-[a-zA-Z]*[rf][a-zA-Z]*|--recursive|--force)\b/,detail:"rm -rf"},{pattern:/\bsudo\b/,detail:"sudo"},{pattern:/\bmkfs(?:\.[a-z0-9]+)?\b/,detail:"mkfs"},{pattern:/\bdd\b[^|;&]*\bof=/,detail:"dd of=…"},{pattern:/>\s*\/dev\/(?:sd|nvme|disk|hd)/,detail:"> /dev/…"},{pattern:/:\(\)\s*\{/,detail:"fork bomb"},{pattern:/\bgit\s+push\b[^|;&]*(?:--force(?:-with-lease)?\b|\s-f\b)/,detail:"git push --force"},{pattern:/\bchmod\s+(?:-[a-zA-Z]+\s+)*777\b/,detail:"chmod 777"},{pattern:/\b(?:curl|wget)\b[^|;&]*\|\s*(?:sudo\s+)?(?:ba|z)?sh\b/,detail:"curl | sh"},{pattern:/\b(?:shutdown|reboot|poweroff|halt)\b/,detail:"shutdown / reboot"}];function Iie(e){const t=e.replace(/"[^"]*"|'[^']*'/g," ");for(const{pattern:n,detail:i}of _ie)if(n.test(t))return i}const yD="kimiWeb.taskNotification",Mie=/<notification\b([^>]*)>([\s\S]*?)<\/notification>/g,Eie=/([\w-]+)="([^"]*)"/g,Tie=/<output-file\b([^>]*)>[\s\S]*?<\/output-file>/,Lie=/^Title: (.*)$/m,Nie=/^Severity: (.*)$/m;function ob(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function Ix(e){const t={};for(const n of e.matchAll(Eie))n[1]!==void 0&&n[2]!==void 0&&(t[n[1]]=ob(n[2]));return t}function Fie(e,t,n){const i=Ix(e),s=Lie.exec(t)?.[1]?.trim()??"",o=Nie.exec(t)?.[1]?.trim()??"";let r=t.split(` +`).filter(c=>!c.startsWith("Title: ")&&!c.startsWith("Severity: ")).join(` +`);const l=r.search(/^<\w/m);l!==-1&&(r=r.slice(0,l)),r=r.trim();const a=Tie.exec(t),u=a?(()=>{const c=Ix(a[1]??""),d=Number(c.bytes);return c.path!==void 0&&c.path!==""?{path:c.path,bytes:Number.isFinite(d)?d:void 0}:void 0})():void 0;return{id:i.id??"",category:i.category??"",type:i.type??"",sourceKind:i.source_kind??"",sourceId:i.source_id??"",agentId:i.agent_id,title:ob(s),severity:o,body:ob(r),outputFile:u,raw:n}}function Die(e){if(!e.includes("<notification"))return[];const t=[];for(const n of e.matchAll(Mie))n[1]===void 0||n[2]===void 0||t.push(Fie(n[1],n[2],n[0]));return t}function $ie(e){const t=e?.[yD];if(typeof t!="object"||t===null)return;const n=t;for(const i of["id","category","type","sourceKind","sourceId","title","severity","body","raw"])if(typeof n[i]!="string")return;return t}function Gm(e){for(const t of["completed","failed","timed_out","killed","lost"])if(e.type.endsWith(`.${t}`))return t;return"info"}function Bie(e){const t=Gm(e);return t==="completed"?"ok":t==="failed"||t==="timed_out"||t==="lost"?"err":t==="killed"?"warn":e.severity==="error"?"err":e.severity==="warning"?"warn":"info"}const zie=1e6,Mx=5e3;function Ca(e){return e===""?[]:e.endsWith(` +`)?e.slice(0,-1).split(` +`):e.split(` +`)}function J2(e,t){const n=Ca(e),i=Ca(t),s=n.length,o=i.length;if(s===0&&o===0)return[];if(s>Mx||o>Mx||(s+1)*(o+1)>zie)return null;const r=Array.from({length:s+1},()=>Array.from({length:o+1},()=>0));for(let h=1;h<=s;h++)for(let g=1;g<=o;g++)r[h][g]=n[h-1]===i[g-1]?r[h-1][g-1]+1:Math.max(r[h-1][g],r[h][g-1]);const l=[];let a=s,u=o;for(;a>0||u>0;)a>0&&u>0&&n[a-1]===i[u-1]?(l.push({type:"context",text:n[a-1]}),a--,u--):u>0&&(a===0||r[a][u-1]>=r[a-1][u])?(l.push({type:"add",text:i[u-1]}),u--):(l.push({type:"del",text:n[a-1]}),a--);l.reverse();const c=[];let d=1,f=1;for(const h of l)h.type==="context"?(c.push({type:"context",text:h.text,oldNo:d,newNo:f}),d++,f++):h.type==="add"?(c.push({type:"add",text:h.text,newNo:f}),f++):(c.push({type:"del",text:h.text,oldNo:d}),d++);return c}const Ex=500;function Tx(e,t){const n=[],i=Ca(e),s=Ca(t),o=Math.min(i.length,Ex),r=Math.min(s.length,Ex);for(let l=1;l<=o;l++)n.push({type:"del",text:i[l-1],oldNo:l});i.length>o&&n.push({type:"context",text:`… ${i.length-o} more lines …`});for(let l=1;l<=r;l++)n.push({type:"add",text:s[l-1],newNo:l});return s.length>r&&n.push({type:"context",text:`… ${s.length-r} more lines …`}),n}function kD(e){let t=0,n=0;for(const i of e)i.type==="add"?t++:i.type==="del"&&n++;return{added:t,removed:n}}const Rie=/^read[_-]?media(?:file)?$/i,Oie=/^data:([^;]+);base64,(.*)$/s,Pie=/^<(image|video|audio)\s+path="([^"]+)">$/,jie=/^<(image|video|audio)\s+path="([^"]+)">(?:<\/\1>)?$/,Hie=/Mime type:\s*([^.\s]+)/i,Wie=/Size:\s*(\d+)\s*bytes/i,qie=/Original dimensions:\s*(\d+)x(\d+)\s*pixels/i,Uie="<system>Image compressed to fit model limits:",Kie=/<system>Image compressed to fit model limits:[\s\S]*?<\/system>/g;function Vie(e){return e.includes(Uie)?e.replace(Kie,""):e}function Zie(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function Lx(e){const t=jie.exec(e.trim());return t?{kind:t[1],path:Zie(t[2])}:null}const bD=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})$/,Gie=/^f_(?:[0-9A-Za-z]{26}|[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12})(?=-)/;function rb(e){const t=e.split(/[\\/]/).at(-1)??"",n=t.lastIndexOf("."),i=n>0?t.slice(0,n):t;return bD.test(i)?i:void 0}const Qie=/^Attached file "(.+)" \(([^,]+), (\d+) bytes\): (.+) — open it with the Read tool$/;function Nx(e){const t=Qie.exec(e.trim());if(!t)return null;const n=(t[4]??"").split(/[\\/]/).at(-1)??"",i=Gie.exec(n)?.[0];return{name:t[1],mediaType:t[2],size:Number(t[3]),fileId:i!==void 0&&bD.test(i)?i:void 0}}function Yie(e){if(e.length===0)return 0;const t=e.endsWith("==")?2:e.endsWith("=")?1:0;return Math.floor(e.length*3/4)-t}function Jie(e){if(Array.isArray(e))return e;if(typeof e!="string")return null;try{const t=JSON.parse(e);return Array.isArray(t)?t:null}catch{return null}}function Xie(e){const t=e.type,n=t==="image_url"?"image":t==="video_url"?"video":t==="audio_url"?"audio":null;if(n===null)return null;const s=e[n==="image"?"imageUrl":n==="video"?"videoUrl":"audioUrl"];if(typeof s!="object"||s===null)return null;const o=s.url;return typeof o=="string"?{kind:n,url:o}:null}function ese(e,t){if(!Rie.test(e))return;const n=Jie(t);if(n===null)return;let i,s,o,r,l,a=null;for(const c of n){if(typeof c!="object"||c===null)continue;const d=c;if(d.type==="text"&&typeof d.text=="string"){const h=d.text,g=Pie.exec(h);g&&(s=g[1],i=g[2]);const m=Hie.exec(h);m?.[1]&&(o=m[1]);const y=Wie.exec(h);y?.[1]&&(r=Number(y[1]));const A=qie.exec(h);A?.[1]&&A[2]&&(l=`${A[1]}x${A[2]}`);continue}const f=Xie(d);f&&(a=f)}if(a===null)return;const u=Oie.exec(a.url);return u?.[1]&&(o=u[1]),u?.[2]&&(r=Yie(u[2])),{kind:a.kind??s??"image",url:a.url,path:i,fileId:a.url.startsWith("ms://")&&i!==void 0?rb(i):void 0,mimeType:o,bytes:Number.isFinite(r)?r:void 0,dimensions:l}}function Y5(e){if(e!=null){if(typeof e=="string")return e.split(` +`);if(Array.isArray(e)){const t=[];for(const n of e)if(typeof n=="string")t.push(...n.split(` +`));else if(n&&typeof n=="object"){const i=n;i.type==="text"&&typeof i.text=="string"?t.push(...i.text.split(` +`)):i.type==="think"&&typeof i.think=="string"?t.push(...i.think.split(` +`)):i.type==="image_url"||i.type==="image"?t.push("[image]"):typeof i.type=="string"?t.push(`[${i.type}]`):t.push(JSON.stringify(n))}return t.length>0?t:void 0}return[JSON.stringify(e)]}}function tse(e,t){if(Eo(e)==="task")for(const n of t??[]){const i=/^agent_id:\s*(\S+)\s*$/.exec(n);if(i?.[1])return i[1]}}function nse(e,t){return{id:e.agentId??e.id,toolCallId:e.parentToolCallId,name:e.description,subagentType:e.subagentType,prompt:e.command??t,model:e.model,thinkingEffort:e.thinkingEffort,phase:e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase??"working",status:e.status,summary:e.outputPreview,outputLines:e.outputLines,text:e.text,suspendedReason:e.suspendedReason,swarmIndex:e.swarmIndex}}function AD(e){const t=e.display??{},n=typeof t.kind=="string"?t.kind:"";if(n==="diff"){const i=typeof t.path=="string"?t.path:"";if(Array.isArray(t.diff))return{kind:"diff",path:i,diff:t.diff};const s=typeof t.old_text=="string"?t.old_text:typeof t.before=="string"?t.before:void 0,o=typeof t.new_text=="string"?t.new_text:typeof t.after=="string"?t.after:void 0;if(s!==void 0&&o!==void 0){const r=J2(s,o)??Tx(s,o);return{kind:"diff",path:i,diff:r}}return{kind:"diff",path:i,diff:[]}}if(n==="file_io"){const i=typeof t.path=="string"?t.path:"",s=typeof t.operation=="string"?t.operation:"";if(s==="write"&&typeof t.content=="string")return{kind:"file",path:i,content:t.content};if(s==="edit"&&typeof t.before=="string"&&typeof t.after=="string"){const r=J2(t.before,t.after)??Tx(t.before,t.after);return{kind:"diff",path:i,diff:r}}const o=typeof t.detail=="string"?t.detail:void 0;return{kind:"fileop",op:s||n,path:i,detail:o}}if(n==="shell"||n==="command"){const i=typeof t.command=="string"?t.command:e.action;return{kind:"shell",command:i,cwd:typeof t.cwd=="string"?t.cwd:void 0,danger:typeof t.danger=="string"?t.danger:Iie(i)}}if(n==="file_content"||n==="file")return{kind:"file",path:typeof t.path=="string"?t.path:"",content:typeof t.content=="string"?t.content:"",language:typeof t.language=="string"?t.language:void 0};if(n==="file_op"||n==="fileop")return{kind:"fileop",op:typeof t.operation=="string"?t.operation:typeof t.op=="string"?t.op:n,path:typeof t.path=="string"?t.path:"",detail:typeof t.detail=="string"?t.detail:void 0};if(n==="url_fetch"||n==="url")return{kind:"url",method:typeof t.method=="string"?t.method:void 0,url:typeof t.url=="string"?t.url:e.action};if(n==="search")return{kind:"search",query:typeof t.query=="string"?t.query:e.action,scope:typeof t.scope=="string"?t.scope:void 0};if(n==="invocation"||n==="agent_call"||n==="skill_call")return{kind:"invocation",kind2:typeof t.kind=="string"?t.kind:n,name:typeof t.name=="string"?t.name:e.toolName,description:typeof t.description=="string"?t.description:void 0};if(n==="todo"||n==="todo_list")return{kind:"todo",items:(Array.isArray(t.items)?t.items:[]).map(o=>{const r=o??{};return{title:typeof r.title=="string"?r.title:"",status:typeof r.status=="string"?r.status:"pending"}})};if(n==="plan_review"){const i=typeof t.plan=="string"?t.plan:"",s=typeof t.path=="string"?t.path:void 0,r=(Array.isArray(t.options)?t.options:[]).map(l=>{const a=l??{},u=typeof a.label=="string"?a.label:"";if(!u)return null;const c=typeof a.description=="string"?a.description:void 0;return{label:u,description:c}}).filter(l=>l!==null);return{kind:"plan_review",plan:i,path:s,options:r.length>0?r:void 0}}return{kind:"generic",summary:e.action}}function ise(e){const t=`<prompt> +`,n=` +</prompt>`,i=e.indexOf(t),s=e.lastIndexOf(n);return i>=0&&s>=i+t.length?e.slice(i+t.length,s):sse(e)}function sse(e){const t=e.split(` +`);return t.length>=2&&t[0]?.startsWith("<cron-fire ")&&t.at(-1)==="</cron-fire>"?t.slice(1,-1).join(` +`):e}function ose(e){const t=e.metadata?.origin;if(t?.kind==="cron_job"||t?.kind==="cron_missed")return t.kind}function rse(e){const t=e.content.filter(n=>n.type==="text").map(n=>n.text).join(` +`);return ise(t)}function lse(e,t){const n=e.metadata?.origin??{},i=rse(e);return t==="cron_missed"?{text:i,cron:{missedCount:typeof n.count=="number"?n.count:void 0}}:{text:i,cron:{jobId:typeof n.jobId=="string"?n.jobId:void 0,cron:typeof n.cron=="string"?n.cron:void 0,recurring:typeof n.recurring=="boolean"?n.recurring:void 0,coalescedCount:typeof n.coalescedCount=="number"?n.coalescedCount:void 0,stale:typeof n.stale=="boolean"?n.stale:void 0}}}function ase(e,t,n){const{text:i,cron:s}=lse(e,n);return{id:e.id,role:"cron",no:t,text:i,createdAt:e.createdAt,cron:s}}function use(e){const t=e.metadata?.origin,n=t?.kind;return n===void 0||n==="user"?!0:n==="skill_activation"||n==="plugin_command"?t?.trigger==="user-slash":!1}function cse(e){return e.metadata?.origin?.kind==="compaction_summary"}function dse(e,t){return e===null?!1:e.promptId===void 0||t===void 0||e.promptId===t}function fse(e){if(!e||e.length===0)return;const t="Plan saved to: ";for(const n of e)if(n.startsWith(t))return n.slice(t.length).trim()}function hse(e){const t=[];for(const n of e){const i=t.at(-1);n.type==="text"&&i?.type==="text"?i.text+=n.text:n.type==="thinking"&&i?.type==="thinking"?i.thinking+=n.thinking:n.type==="thinking"?t.push({type:"thinking",thinking:n.thinking}):t.push({...n})}return JSON.stringify(t)}function CD(e,t,n,i=!0,s={},o={},r){const l=[];let a=r?.startNo??1;const u=r?.collect,c=new Map;for(const m of t)c.set(m.toolCallId,m);let d=null;function f(m=!1){if(!d)return;const y=d;if(d=null,!m&&y.blocks.length===0&&y.textParts.length===0&&y.thinkingParts.length===0&&y.tools.length===0)return;if(!m||!i)for(let b=0;b<y.tools.length;b++){const C=y.tools[b];if(C.status!=="running")continue;const v={...C,status:"ok"};y.tools[b]=v;const x=y.blocks.find(S=>S.kind==="tool"&&S.tool.id===v.id);x&&x.kind==="tool"&&(x.tool=v)}const A={id:y.id,role:"assistant",no:a++,text:y.textParts.join(` +`),thinking:y.thinkingParts.length>0?y.thinkingParts.join(` +`):void 0,tools:y.tools.length>0?y.tools:void 0,blocks:y.blocks.length>0?y.blocks:void 0,approval:y.approval,approvalId:y.approvalId,durationMs:y.durationMs,createdAt:y.createdAt,endedAt:y.endedAt,goalContinuation:y.goalContinuation};l.push(A),u?.(A,y.sources)}function h(m,y){let A=null;for(const b of y)if(b.type==="text"){if(b.text){A==="text"?m.textParts[m.textParts.length-1]+=b.text:m.textParts.push(b.text);const C=m.blocks.at(-1);C&&C.kind==="text"?C.text+=(A==="text"?"":` +`)+b.text:m.blocks.push({kind:"text",text:b.text}),A="text"}}else if(b.type==="thinking"){if(b.thinking){A==="thinking"?m.thinkingParts[m.thinkingParts.length-1]+=b.thinking:m.thinkingParts.push(b.thinking);const C=m.blocks.at(-1);if(C&&C.kind==="thinking"){C.thinking+=(A==="thinking"?"":` +`)+b.thinking;const v=[C.startedAt,b.startedAt].filter(_=>_!==void 0).sort()[0],x=C.startedAt!==void 0&&C.durationMs===void 0||b.startedAt!==void 0&&b.durationMs===void 0,S=[C,b].flatMap(_=>_.startedAt!==void 0&&_.durationMs!==void 0?[Date.parse(_.startedAt)+_.durationMs]:[]);C.startedAt=v,C.durationMs=!x&&v!==void 0&&S.length>0?Math.max(...S)-Date.parse(v):void 0}else m.blocks.push({kind:"thinking",thinking:b.thinking,startedAt:b.startedAt,durationMs:b.durationMs});A="thinking"}}else if(b.type==="toolUse"){A=null;const C=c.get(b.toolCallId),v=b.toolName==="ExitPlanMode"?o[b.toolCallId]:void 0,x={id:b.toolCallId,name:b.toolName,arg:typeof b.input=="string"?b.input:JSON.stringify(b.input),agentId:Eo(b.toolName)==="task"?b.agentRefs?.find(S=>S.role!=="member")?.agentId??b.agentRefs?.[0]?.agentId:void 0,status:"running",output:b.outputLines,plan:v,planPath:b.toolName==="ExitPlanMode"?v?.path??s[b.toolCallId]?.path:void 0};m.tools.push(x),m.blocks.push({kind:"tool",tool:x}),C&&(m.approval=AD(C),m.approvalId=C.approvalId)}else if(b.type==="toolResult"){A=null;const C=m.tools.findIndex(v=>v.id===b.toolCallId);if(C!==-1){const v=m.tools[C],x=Y5(b.output),S={...v,status:b.isError?"error":"ok",output:x,media:b.isError?void 0:ese(v.name,b.output),agentId:v.agentId??tse(v.name,x)};S.name==="ExitPlanMode"&&!S.planPath&&(S.planPath=fse(S.output)),m.tools[C]=S;const _=m.blocks.find(I=>I.kind==="tool"&&I.tool.id===b.toolCallId);_&&_.kind==="tool"&&(_.tool=S)}}else A=null}function g(m,y){if(m.type==="image"||m.type==="video"){const A=m.type,b=m.source;if(b.kind==="url")return{url:b.url,kind:A};if(b.kind==="base64")return{url:`data:${b.mediaType};base64,${b.data}`,kind:A};if(b.kind==="file"&&n)return{url:n(b.fileId),kind:A,fileId:b.fileId};if(b.kind==="sessionMedia")return{url:r?.getSessionMediaUrl?.(y,b.fileId)??"",kind:A,fileId:b.fileId,sessionId:y}}if(m.type==="file"&&n){if(m.mediaType.startsWith("image/"))return{url:n(m.fileId),kind:"image",fileId:m.fileId};if(m.mediaType.startsWith("video/"))return{url:n(m.fileId),kind:"video",fileId:m.fileId}}}for(const m of e){if(m.role==="system")continue;if(cse(m)){f();const v=m.metadata?.[vD],x={id:m.id,role:"compaction",no:a,text:m.content.filter(S=>S.type==="text").map(S=>S.text).join(` +`),compaction:{trigger:v?.trigger,tokensBefore:v?.tokensBefore,tokensAfter:v?.tokensAfter}};l.push(x),u?.(x,[m]);continue}if(m.role==="user"){const v=ose(m),x=m.metadata?.origin?.kind,S=x==="skill_activation"&&m.metadata?.origin?.trigger!=="user-slash";if(v===void 0&&(x==="injection"||S))continue;if(v===void 0&&(x==="task"||x==="background_task"||x==="task_notification")){const N=m.content.filter(R=>R.type==="text").map(R=>R.text).join(` +`),O=$ie(m.metadata),P=O!==void 0?[O]:Die(N);if(P.length>0){d??={id:m.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[m],createdAt:m.createdAt};for(const R of P)d.blocks.push({kind:"notification",notification:{...R,createdAt:m.createdAt}})}continue}if(f(),v!==void 0){const N=ase(m,a++,v);l.push(N),u?.(N,[m]);continue}if(x==="system_trigger"&&m.metadata?.origin?.name==="goal_continuation"){d={id:m.id,promptId:void 0,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[m],createdAt:m.createdAt,goalContinuation:!0};continue}if(!use(m))continue;const _=m.metadata?.origin,I=_?.kind==="skill_activation"&&_?.trigger==="user-slash",M=_?.kind==="plugin_command"&&_?.trigger==="user-slash",$=[],D=[];for(const N of m.content){if(N.type==="text")if(I){const P=Lx(N.text);if(P&&(P.kind==="video"||P.kind==="image")&&n){const q=rb(P.path);if(q){D.push({url:n(q),kind:P.kind,fileId:q});continue}}const R=Nx(N.text);R&&D.push({kind:"file",url:R.fileId&&n?n(R.fileId):"",fileId:R.fileId,name:R.name,mediaType:R.mediaType,size:R.size})}else if(M)$.push(_.commandArgs??"");else{const P=Lx(N.text);if(P&&(P.kind==="video"||P.kind==="image")&&n){const j=rb(P.path);if(j){D.push({url:n(j),kind:P.kind,fileId:j});continue}}const R=Nx(N.text);if(R){D.push({kind:"file",url:R.fileId&&n?n(R.fileId):"",fileId:R.fileId,name:R.name,mediaType:R.mediaType,size:R.size});continue}const q=Vie(N.text);if(q!==N.text&&q.trim().length===0)continue;$.push(q)}const O=g(N,m.sessionId);if(O){D.push({url:O.url,kind:O.kind,name:N.type==="file"?N.name:void 0,fileId:O.fileId,sessionId:O.sessionId});continue}N.type==="file"&&n&&D.push({kind:"file",url:n(N.fileId),fileId:N.fileId,name:N.name,mediaType:N.mediaType||void 0,size:N.size})}const T={id:m.id,role:"user",no:a++,text:I?_?.skillArgs??"":$.join(` +`),attachments:D.length>0?D:void 0,skillActivation:I?{name:_.skillName,args:_.skillArgs}:void 0,pluginCommand:M?{pluginId:_.pluginId,commandName:_.commandName,args:_.commandArgs}:void 0,createdAt:m.createdAt};l.push(T),u?.(T,[m]);continue}if(m.role==="tool"){d&&(d.sources.push(m),h(d,m.content),d.endedAt=m.createdAt);continue}const y=m.promptId;dse(d,y)?d!==null&&d.promptId===void 0&&y!==void 0&&(d.promptId=y):(f(),d={id:m.id,promptId:y,textParts:[],thinkingParts:[],tools:[],blocks:[],approval:void 0,approvalId:void 0,seenSigs:new Set,sources:[],durationMs:m.durationMs,createdAt:m.createdAt});const b=d;if(b===null)continue;const C=hse(m.content);b.promptId!==void 0&&b.seenSigs.has(C)||(b.seenSigs.add(C),b.sources.push(m),m.durationMs!==void 0&&(b.durationMs=m.durationMs),h(b,m.content),m.endedAt!==void 0?b.endedAt=m.endedAt:m.id!==b.id&&(b.endedAt=m.createdAt))}return f(!0),l}function pse(e,t,n,i){const s=e.items.filter(c=>c.kind==="turn"),o=s[0]?.turnId,r=s.length===1?o:void 0,l=new Map(e.tasks.map(c=>[c.taskId,c])),a=e.items.flatMap(c=>c.kind==="turn"?gse(c,e.attachments,l,c.turnId===o?n?.createdAt:void 0,c.turnId===r?n?.disposedAt:void 0,i?.sessionId):[]),u=e.meta.activity==="turn";return CD(a,[],t,u,{},{},{getSessionMediaUrl:i?.getSessionMediaUrl}).map(vse)}function gse(e,t,n,i,s,o=""){const r=[],l=new Map(t.map(f=>[f.attachmentId,f])),a=yse([e.startedAt,...e.steps.map(f=>f.startedAt),i])??"",u=Fx(e.endedAt)??Fx(s),c=e.turnId;if(e.prompt!==void 0&&e.prompt.length>0){const f=[{type:"text",text:e.prompt}];for(const h of e.attachmentIds??[]){const g=kse(l.get(h));g!==void 0&&f.push(g)}r.push({id:`${e.turnId}:input`,sessionId:o,role:"user",content:f,createdAt:a,promptId:c,metadata:e.origin.kind==="task"&&e.prompt.includes("<notification")?{origin:e.origin.payload??e.origin}:void 0})}for(const f of e.steps)for(const h of f.frames)if(h.kind==="text"){if(h.text.length===0)continue;if(h.role==="user"){if(h.taskId===void 0)continue;const g=mse(h.taskId,h.text,n.get(h.taskId));r.push({id:h.frameId,sessionId:"",role:"user",content:[{type:"text",text:h.text}],createdAt:f.startedAt??a,promptId:c,metadata:{origin:{kind:"task",taskId:h.taskId},[yD]:g}});continue}r.push({id:h.frameId,sessionId:"",role:"assistant",content:[{type:"text",text:h.text}],createdAt:f.startedAt??a,promptId:c})}else if(h.kind==="thinking"){if(h.text.length===0)continue;r.push({id:h.frameId,sessionId:"",role:"assistant",content:[{type:"thinking",thinking:h.text,startedAt:f.startedAt,durationMs:Dx(f.startedAt,f.endedAt)}],createdAt:f.startedAt??a,promptId:c})}else h.kind==="tool"&&(r.push({id:`${h.frameId}:call`,sessionId:"",role:"assistant",content:[{type:"toolUse",toolCallId:h.toolCallId,toolName:h.name,input:h.input??h.display??{},outputLines:h.state==="running"?Y5(h.output):void 0,agentRefs:h.agentRefs}],createdAt:f.startedAt??a,promptId:c}),h.state!=="running"&&r.push({id:`${h.frameId}:result`,sessionId:"",role:"tool",content:[{type:"toolResult",toolCallId:h.toolCallId,output:h.output??h.error??"",isError:h.state==="error"}],createdAt:f.endedAt??f.startedAt??a,promptId:c}));const d=e.durationMs??Dx(a||void 0,u);if(d!==void 0){const f=r.findLastIndex(h=>h.role==="assistant");f>=0&&(r[f]={...r[f],durationMs:d})}return r}function mse(e,t,n){const[i="",...s]=t.split(` +`),o=n?.state??"info";return{id:`task:${e}:${o}`,category:"task",type:`task.${o}`,sourceKind:n?.kind==="subagent"?"subagent":"background_task",sourceId:e,agentId:n?.agentId,title:i.trim(),severity:o==="completed"?"info":"warning",body:s.join(` +`).trim(),raw:t}}function vse(e){if(e.createdAt!==""&&e.endedAt!=="")return e;const t={...e};return t.createdAt===""&&delete t.createdAt,t.endedAt===""&&delete t.endedAt,t}function yse(e){let t;for(const n of e){if(n===void 0)continue;const i=Date.parse(n);Number.isFinite(i)&&(t===void 0||i<t.time)&&(t={value:n,time:i})}return t?.value}function Fx(e){return e!==void 0&&Number.isFinite(Date.parse(e))?e:void 0}function kse(e){if(e?.source===void 0)return;const t=e.source.kind==="url"?{kind:"url",url:e.source.url}:e.source.kind==="session_media"?{kind:"sessionMedia",fileId:e.source.fileId}:{kind:"file",fileId:e.source.fileId};if(e.mediaType.startsWith("image/"))return{type:"image",source:t};if(e.mediaType.startsWith("video/"))return{type:"video",source:t};if(e.source.kind==="file")return{type:"file",fileId:e.source.fileId,name:e.name??e.attachmentId,mediaType:e.mediaType,size:e.size??0}}function Dx(e,t){if(e===void 0||t===void 0)return;const n=Date.parse(t)-Date.parse(e);return Number.isFinite(n)&&n>=0?n:void 0}const $x=6e3,lb=256*1024,bse=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/;function Bx(e,t){return t===0?e:e-1}function Ase(e,t){const n=Ca(t),i=[];let s=0;for(const o of e){if(o.type==="hunk"){const r=bse.exec(o.text);if(!r)return null;const l=Bx(Number(r[1]),r[2]===void 0?1:Number(r[2])),a=Bx(Number(r[3]),r[4]===void 0?1:Number(r[4]));if(a<s||a>n.length)return null;for(;s<a;)i.push(n[s++]);if(i.length!==l)return null;continue}if(o.oldNo===void 0&&o.newNo===void 0)return null;if(o.type==="del"){i.push(o.text);continue}if(s>=n.length||n[s]!==o.text)return null;s++,o.type==="context"&&i.push(o.text)}for(;s<n.length;)i.push(n[s++]);return i.join(` +`)}async function Cse(e,t){if(t.truncated||e.length===0)return null;const n=await t.readNewText()??"";if(n.length>lb||Ca(n).length>$x)return null;const i=Ase(e,n);return i===null||i.length>lb||Ca(i).length>$x?null:{before:i,after:n}}const wse=new Set(["assistantDelta","agentDelta","toolOutput","taskProgress"]);function xse(e){return wse.has(e.type)}const Sse=50,_se=100,ab=32*1024,Ise={requestFrame(e){return typeof requestAnimationFrame=="function"?requestAnimationFrame(e):null},cancelFrame(e){typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e)},requestTask(e){return setTimeout(e,Sse)},cancelTask(e){clearTimeout(e)}};function Mse(e,t,n={}){const i=n.scheduler??Ise,s=Math.max(1,Math.floor(n.maxItemsPerSlice??_se)),o=[];let r=0,l=null,a=null,u=0,c=!1;const d=()=>o.length-r,f=()=>{u+=1,l!==null&&(i.cancelFrame(l),l=null),a!==null&&(i.cancelTask(a),a=null)},h=()=>{r===o.length?(o.length=0,r=0):r>=1024&&(o.splice(0,r),r=0)};let g;const m=()=>{if(c||l!==null||a!==null||d()===0)return;const A=++u,b=()=>{A===u&&g()};l=i.requestFrame(b),a=i.requestTask(b)};g=()=>{f();let A=0;for(;!c&&A<s&&r<o.length;){const b=o[r++];e(b),A+=1}h(),m()};const y=(A=>{if(!c){if(t(A)){const b=o.length>r?o.at(-1):void 0,C=b===void 0?void 0:n.coalesce?.(b,A);C===void 0?o.push(A):o[o.length-1]=C,m();return}if(d()===0){e(A);return}o.push(A),g()}});return y.flush=()=>{if(!c){for(f();!c&&r<o.length;)e(o[r++]);h()}},y.discard=A=>{if(c||d()===0)return;let b=r;for(let C=r;C<o.length;C+=1){const v=o[C];A(v)||(o[b++]=v)}o.length=b,h(),d()===0?f():m()},y.dispose=()=>{c||(c=!0,f(),o.length=0,r=0)},y}function ub(e){if(e.type==="assistantDelta"){if(e.delta.text!==void 0&&e.delta.thinking===void 0)return{kind:"text",value:e.delta.text};if(e.delta.thinking!==void 0&&e.delta.text===void 0)return{kind:"thinking",value:e.delta.thinking}}}function Ese(e){if(e.appEvent.type!=="assistantDelta")return[e];const t=e.appEvent,n=e.meta.stream,i=ub(t);if(n===void 0||i===void 0||n.kind!==i.kind||i.value.length<=ab)return[e];const s=[];let o=0;for(;o<i.value.length;){let r=Math.min(o+ab,i.value.length);r<i.value.length&&r>o&&/[\uD800-\uDBFF]/u.test(i.value[r-1])&&/[\uDC00-\uDFFF]/u.test(i.value[r])&&(r-=1);const l=i.value.slice(o,r);s.push({appEvent:{...t,delta:i.kind==="text"?{text:l}:{thinking:l}},meta:{...e.meta,stream:{...n,offset:n.offset+o}}}),o=r}return s}function Tse(e,t){if(e.appEvent.type!=="assistantDelta"||t.appEvent.type!=="assistantDelta")return;const n=e.meta.stream,i=t.meta.stream,s=ub(e.appEvent),o=ub(t.appEvent);if(n===void 0||i===void 0||s===void 0||o===void 0||e.meta.sessionId!==t.meta.sessionId||e.appEvent.sessionId!==t.appEvent.sessionId||e.appEvent.messageId!==t.appEvent.messageId||e.appEvent.contentIndex!==t.appEvent.contentIndex||n.turnId!==i.turnId||n.kind!==i.kind||s.kind!==o.kind||n.kind!==s.kind||i.kind!==o.kind||i.offset!==n.offset+s.value.length||s.value.length+o.value.length>ab)return;const r=s.value+o.value;return{appEvent:{...e.appEvent,delta:s.kind==="text"?{text:r}:{thinking:r}},meta:{...t.meta,stream:{...n}}}}function Lse(e){return e==="in_progress"?"in_progress":e==="done"||e==="completed"?"done":"pending"}function Nse(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="assistant")for(let i=n.content.length-1;i>=0;i--){const s=n.content[i];if(s.type!=="toolUse"||Eo(s.toolName)!=="todo")continue;let o=s.input;if(typeof o=="string")try{o=JSON.parse(o)}catch{continue}const r=o?.todos;if(Array.isArray(r))return r.flatMap(l=>{const a=l??{},u=typeof a.title=="string"?a.title:typeof a.content=="string"?a.content:"";return u?[{title:u,status:Lse(a.status)}]:[]})}}return[]}function Fse(e){return e.startsWith("diff --git")||e.startsWith("index ")||e.startsWith("--- ")||e.startsWith("+++ ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("old mode")||e.startsWith("new mode")||e.startsWith("similarity index")||e.startsWith("dissimilarity index")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("copy from")||e.startsWith("copy to")||e.startsWith("Binary files")}function Dse(e){const t=[];if(!e)return t;let n=0,i=0,s=!1;for(const o of e.split(` +`)){if(o.startsWith("diff --git")){s=!1;continue}if(!s&&Fse(o))continue;if(o.startsWith("@@")){const a=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(o);a&&(n=Number.parseInt(a[1],10),i=Number.parseInt(a[2],10)),s=!0,t.push({type:"hunk",text:o});continue}if(!s||o.startsWith("\\"))continue;const r=o.charAt(0),l=o.slice(1);r==="+"?(t.push({type:"add",text:l,newNo:i}),i+=1):r==="-"?(t.push({type:"del",text:l,oldNo:n}),n+=1):r===" "&&(t.push({type:"context",text:l,oldNo:n,newNo:i}),n+=1,i+=1)}return t}function zx(e){return e?e.split(` +`).map(t=>t.trimEnd()).filter(Boolean).at(-1)??"":""}function $se(e){return e.suspendedReason||zx(e.text)||zx(e.outputLines?.join(` +`))||e.summary||""}function Bse(e){return e.suspendedReason?e.suspendedReason:e.text?e.text:e.outputLines&&e.outputLines.length>0?e.outputLines.join(` +`):e.summary??""}function zse(e){return e==="completed"?"completed":e==="failed"?"failed":e==="aborted"?"cancelled":"working"}function Rx(e,t){return{id:e.agentId??e.item??`result-${t}`,agentId:e.agentId,name:e.item??`subagent ${t+1}`,activity:e.body.split(` +`)[0]??"",phase:zse(e.outcome),body:e.body}}function Rse(e,t){return!!(t.agentId&&e.agentId===t.agentId||t.item&&e.name.includes(t.item))}function Ose(e,t){const n=e.map(s=>({id:s.id,agentId:s.agentId,name:s.name,activity:$se(s),phase:s.phase,body:Bse(s)}));if(!t)return n;const i=t.subagents.filter(s=>(s.outcome==="aborted"||s.state==="not_started")&&!e.some(o=>Rse(o,s))).map((s,o)=>Rx(s,o));return n.length>0?[...n,...i]:t.subagents.map((s,o)=>Rx(s,o))}const Pse=["queued","working","suspended","completed","failed","cancelled"];function wD(e){return e.status==="completed"?"completed":e.status==="failed"?"failed":e.status==="cancelled"?"cancelled":e.subagentPhase?e.subagentPhase:"working"}function jse(){return{queued:0,working:0,suspended:0,completed:0,failed:0,cancelled:0}}function Hse(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||n.swarmIndex===void 0)continue;const i=n.parentToolCallId??"swarm",s=t.get(i)??[];s.push({id:n.id,agentId:n.agentId,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,phase:wD(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,swarmIndex:n.swarmIndex}),t.set(i,s)}return[...t.entries()].map(([n,i])=>{const s=i.toSorted((r,l)=>r.swarmIndex-l.swarmIndex||r.id.localeCompare(l.id)),o=jse();for(const r of s)o[r.phase]++;return{id:n,members:s,counts:o}}).filter(n=>n.members.length>1).toSorted((n,i)=>{const s=n.members.at(0)?.swarmIndex??0,o=i.members.at(0)?.swarmIndex??0;return s!==o?s-o:n.id.localeCompare(i.id)})}function Wse(e){let t=0,n=0;for(const i of e){n+=i.members.length;for(const s of Pse)(s==="completed"||s==="failed"||s==="cancelled")&&(t+=i.counts[s])}return{done:t,total:n}}function qse(e){const t=new Map;for(const n of e){if(n.kind!=="subagent"||!n.parentToolCallId)continue;const i=t.get(n.parentToolCallId)??[];i.push({id:n.id,agentId:n.agentId,name:n.description,subagentType:n.subagentType,model:n.model,thinkingEffort:n.thinkingEffort,phase:wD(n),summary:n.outputPreview,outputLines:n.outputLines,text:n.text,suspendedReason:n.suspendedReason,swarmIndex:n.swarmIndex??Number.MAX_SAFE_INTEGER}),t.set(n.parentToolCallId,i)}for(const[n,i]of t)t.set(n,i.toSorted((s,o)=>s.swarmIndex-o.swarmIndex||s.id.localeCompare(o.id)));return t}function J5(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function xD(e){for(const t of["path","file_path","filePath","filename"]){const n=e[t];if(typeof n=="string"&&n.length>0)return n}}const V1=100*1024;function SD(e){const t=Eo(e.name);if(t!=="edit"&&t!=="multi_edit")return null;const n=J5(e.arg);if(!n)return null;if(t==="edit"){if(n.replace_all===!0)return null;const l=typeof n.old_string=="string"?n.old_string:void 0,a=typeof n.new_string=="string"?n.new_string:void 0;return l===void 0||a===void 0||l.length>V1||a.length>V1?null:J2(l,a)}const i=Array.isArray(n.edits)?n.edits:void 0;if(!i||i.length===0)return null;const s=[];let o=0,r=0;for(const l of i){if(!l||typeof l!="object")return null;const a=l;if(a.replace_all===!0)return null;const u=typeof a.old_string=="string"?a.old_string:void 0,c=typeof a.new_string=="string"?a.new_string:void 0;if(u===void 0||c===void 0||u.length>V1||c.length>V1)return null;const d=J2(u,c);if(d===null)return null;s.length>0&&s.push({type:"hunk",text:"···"});for(const f of d)s.push({...f,oldNo:f.oldNo!==void 0?f.oldNo+o:void 0,newNo:f.newNo!==void 0?f.newNo+r:void 0});o+=Ca(u).length,r+=Ca(c).length}return s}const Use=5e3;function Kse(e){if(Eo(e.name)!=="write")return null;const t=J5(e.arg);return!t||typeof t.content!="string"||t.content.length>V1||t.content.split(` +`).length>Use?null:{content:t.content,path:xD(t)}}function Ox(e){const t=J5(e.arg);return t?xD(t):void 0}function _D(){let e=[],t=null,n=null,i=null,s,o,r=!0;const l=new WeakMap,a=u=>{const{messages:c,approvals:d}=u,f=u.sessionActive??!0,h=u.planReviewByToolCallId??{},g=u.plansByToolCallId??{},m=(I,M)=>l.set(I,M);let y=n!==null;if(y){const I=n,M=Object.keys(h);y=M.length===Object.keys(I).length&&M.every($=>h[$]===I[$])}let A=i!==null;if(A){const I=i,M=Object.keys(g);A=M.length===Object.keys(I).length&&M.every($=>g[$]===I[$])}const b=e.length>0&&d===t&&y&&A&&u.getFileUrl===s&&u.getSessionMediaUrl===o;let C=0,v=0,x=1;if(b){let I=-1;for(let M=e.length-1;M>=0;M--)if(e[M].role==="assistant"){I=M;break}for(let M=0;M<e.length;M++){const $=e[M],D=l.get($);if(!D||D.length===0||M===I&&f!==r)break;let T=v+D.length<=c.length;for(let N=0;T&&N<D.length;N++)c[v+N]!==D[N]&&(T=!1);if(!T||M===I&&v+D.length!==c.length)break;C++,v+=D.length,$.role!=="compaction"&&x++}}const S=CD(c.slice(v),d,u.getFileUrl,f,h,g,{startNo:x,collect:m,getSessionMediaUrl:u.getSessionMediaUrl}),_=C>0?[...e.slice(0,C),...S]:S;return e=_,t=d,n={...h},i={...g},s=u.getFileUrl,o=u.getSessionMediaUrl,r=f,_};return a.reset=()=>{e=[],t=null,n=null,i=null,s=void 0,r=!0},a}const ID=["light","dark","system"],Vse=["small","medium","large","xlarge"],q4="medium",MD="kimi-web.color-scheme",cb="kimi-web.font-scale",Px="kimi-web.ui-font-size";function db(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function X5(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function Zse(e){try{globalThis.localStorage.removeItem(e)}catch{}}function Gse(){const e=db(MD);return e&&ID.includes(e)?e:"system"}const nm={light:"#ffffff",dark:"#121212"};function Qse(e){if(typeof document>"u"||!document.documentElement)return;document.documentElement.dataset.colorScheme=e;const t=document.querySelectorAll('meta[name="theme-color"]');if(t.length===0)return;const n=e==="dark"?nm.dark:e==="light"?nm.light:null;t.forEach(i=>{const o=(i.getAttribute("media")??"").includes("dark")?nm.dark:nm.light;i.setAttribute("content",n??o)})}function ED(e){return Vse.includes(e)}function Yse(e){return e<=13?"small":e<=15?"medium":e<=17?"large":"xlarge"}function Jse(){const e=db(cb);if(e==="xxlarge")return"xlarge";if(e!==null)return ED(e)?e:q4;const t=db(Px);if(t===null)return q4;const n=Number(t),i=Number.isFinite(n)?Yse(n):q4;return X5(cb,i),Zse(Px),i}function Xse(e){typeof document>"u"||!document.documentElement||(document.documentElement.dataset.fontScale=e)}const e6=G(Gse()),t6=G(Jse());let jx=!1;function eoe(){jx||(jx=!0,qe(e6,Qse,{immediate:!0}),qe(t6,Xse,{immediate:!0}))}function toe(e){ID.includes(e)&&(e6.value=e,X5(MD,e))}function noe(e){ED(e)&&(t6.value=e,X5(cb,e))}function n6(){return eoe(),{colorScheme:e6,fontScale:t6,setColorScheme:toe,setFontScale:noe}}const im=G(!1);let Hx=!1;function U4(){const e=document.documentElement.dataset.colorScheme;return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function jy(){return!Hx&&typeof window<"u"&&typeof document<"u"&&(Hx=!0,im.value=U4(),new MutationObserver(()=>{im.value=U4()}).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{im.value=U4()})),im}const TD="kimi-web.sidebar-multi-tab";function ioe(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function soe(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function ooe(){return ioe(TD)==="1"}const LD=G(ooe());function roe(e){LD.value=e,soe(TD,e?"1":"0")}function Hh(){return{sidebarTabs:LD,setSidebarTabs:roe}}const loe=Symbol("KimiWebClientFacade"),aoe="modulepreload",uoe=function(e){return"/"+e},Wx={},vs=function(t,n,i){let s=Promise.resolve();if(n&&n.length>0){let r=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),a=l?.nonce||l?.getAttribute("nonce");s=r(n.map(u=>{if(u=uoe(u),u in Wx)return;Wx[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":aoe,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,g)=>{f.addEventListener("load",h),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return s.then(r=>{for(const l of r||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};function su(e,t){const n=t??{h:"h",m:"m",s:"s"},i=Math.max(0,Math.floor(e/1e3));if(i<60)return i===0?"":`${i}${n.s}`;const s=Math.floor(i/60);if(s<60){const l=i%60;return l===0?`${s}${n.m}`:`${s}${n.m}${l}${n.s}`}const o=Math.floor(s/60),r=s%60;return r===0?`${o}${n.h}`:`${o}${n.h}${r}${n.m}`}const ND=new Set(["read","bash","grep","search","glob","ls","web_fetch","edit","write"]);function FD(e){const t=Eo(e);return t==="multi_edit"?"edit":t}function DD(e){const t=[],n=new Map;for(const i of e){if(i.kind==="thinking")continue;const s=FD(i.tool.name);let o=n.get(s);o||(o={count:0,errors:0},n.set(s,o),t.push(s)),o.count++,i.tool.status==="error"&&o.errors++}return{order:t,byKind:n}}function $D(e,t,n){return ND.has(t)?e(`tools.group.typed.${t}.done`,{count:n}):e("tools.group.countOther",{count:n})}function BD(e,t){return{text:e("tools.activity.failedClause",{count:t}),tone:"danger"}}function zD(e){return e.map(t=>t.fragments.map(n=>n.text).join("")).join(" · ")}function coe(e,t,n={}){const{order:i,byKind:s}=DD(t),o=[];let r=!1;for(const l of i){const a=s.get(l);if(!a)continue;const u=[{text:$D(e,l,a.count),tone:"normal"}];a.errors>0&&(r=!0,u.push(BD(e,a.errors))),o.push({fragments:u})}if(n.durationMs!==void 0){const l=su(n.durationMs);l&&o.push({fragments:[{text:l,tone:"faint"}]})}return{clauses:o,plain:zD(o),hasError:r}}function doe(e,t){if(t.kind==="thinking")return{fragments:[{text:e("thinking.streaming"),tone:"normal"}]};const n=FD(t.tool.name);let i=Q5(e,t.tool.name,t.tool.arg);if(n==="write"&&i){const o=e("tools.chip.created");i.endsWith(o)&&(i=i.slice(0,i.length-o.length).trimEnd())}return{fragments:[{text:i&&ND.has(n)?e(`tools.activity.doing.${n}`,{subject:i}):e("tools.activity.busy"),tone:"normal"}]}}function foe(e,t,n){const i=t.filter(c=>c!==n&&!(c.kind==="tool"&&c.tool.status==="running")),{order:s,byKind:o}=DD(i),r=e("tools.activity.liveDonePrefix"),l=[];for(const c of s){const d=o.get(c);if(!d)continue;const f=[{text:`${r}${$D(e,c,d.count)}`,tone:"faint"}];d.errors>0&&f.push(BD(e,d.errors)),l.push({fragments:f})}const a=n===null?null:doe(e,n),u=a?[a,...l]:l;return{current:a,done:l,plain:zD(u)}}async function ao(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return hoe(e)}function hoe(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const poe={ts:"ts",tsx:"tsx",js:"js",jsx:"jsx",mjs:"js",cjs:"js",vue:"vue",svelte:"svelte",py:"py",rb:"rb",go:"go",rs:"rs",java:"java",kt:"kt",kts:"kts",scala:"scala",swift:"swift",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"cs",php:"php",sh:"sh",bash:"bash",zsh:"zsh",fish:"fish",ps1:"ps1",bat:"bat",cmd:"bat",sql:"sql",graphql:"graphql",prisma:"prisma",html:"html",htm:"html",xml:"xml",svg:"xml",css:"css",scss:"scss",sass:"sass",less:"less",json:"json",jsonc:"jsonc",json5:"json5",yaml:"yaml",yml:"yml",toml:"toml",ini:"ini",md:"md",markdown:"markdown",mdx:"mdx",lua:"lua",r:"r",dart:"dart",zig:"zig",mk:"makefile",cmake:"cmake",diff:"diff",proto:"proto"},goe={dockerfile:"dockerfile",makefile:"makefile","cmakelists.txt":"cmake"};function moe(e){const t=e?.split(/[\\/]/).pop()?.toLowerCase()??"";if(!t)return;const n=goe[t];if(n)return n;const i=t.lastIndexOf(".");if(!(i<=0))return poe[t.slice(i+1)]}const voe="kimi_desktop",yoe="platform",qx="kimi-desktop",Ux="kimi-desktop-platform";function koe(){let e=!1,t=null;try{const n=new URLSearchParams(window.location.search);n.has(voe)?(sessionStorage.setItem(qx,"1"),e=!0):e=e||sessionStorage.getItem(qx)==="1";const i=n.get(yoe);i?(sessionStorage.setItem(Ux,i),t=i):t=sessionStorage.getItem(Ux)}catch{}return{isDesktop:e,platform:t}}const fb=koe(),Wh=fb.isDesktop,Gu=fb.isDesktop&&fb.platform==="darwin",boe=["faces","nature","food","activity","objects","symbols"],Aoe=[["😀","faces","grinning smile happy 笑 开心"],["😄","faces","smile happy joy 笑 开心 高兴"],["😁","faces","grin beaming 咧嘴笑 开心"],["😂","faces","joy laugh tears 笑哭 爆笑"],["🤣","faces","rofl laugh rolling 笑翻 爆笑"],["😊","faces","blush shy happy 微笑 害羞"],["😉","faces","wink 眨眼"],["😍","faces","heart eyes love 爱心眼 喜欢 爱"],["🥰","faces","smiling hearts love 爱心 喜欢"],["😘","faces","kiss 飞吻 亲亲"],["😋","faces","yum tongue 好吃 馋"],["🤪","faces","zany crazy 鬼脸 疯"],["🤔","faces","thinking hmm consider 思考 想"],["🤨","faces","skeptical eyebrow 怀疑 挑眉"],["😐","faces","neutral meh 面无表情 无语"],["😑","faces","expressionless 面无表情 无语"],["🙄","faces","eye roll 翻白眼 无语"],["😶","faces","no mouth silent 无言 沉默"],["🫡","faces","salute 敬礼 收到"],["🤫","faces","shush quiet 嘘 安静"],["🤭","faces","oops giggle 捂嘴 偷笑"],["😴","faces","sleeping sleepy 睡觉 困"],["😪","faces","sleepy tired 困 疲惫"],["😷","faces","mask sick 口罩 生病"],["🤒","faces","sick fever 生病 发烧"],["🤕","faces","hurt bandage 受伤"],["🤢","faces","nauseated 恶心"],["🤯","faces","mind blown explode 震惊 爆炸"],["🥳","faces","party celebrate 庆祝 派对"],["🤩","faces","star struck 星星眼 激动"],["😎","faces","cool sunglasses 酷 墨镜"],["🥸","faces","disguise 伪装 假扮"],["🤓","faces","nerd geek 书呆子 学霸"],["😢","faces","cry sad 哭 难过"],["😭","faces","sob cry loudly 大哭 痛哭"],["😤","faces","triumph huff 哼 生气"],["😡","faces","angry rage mad 生气 愤怒"],["🤬","faces","swearing cursing 骂人 爆粗"],["😱","faces","scream fear 尖叫 害怕"],["😨","faces","fearful 害怕 恐惧"],["🥵","faces","hot heat 热 出汗"],["🥶","faces","cold freezing 冷 冻"],["🥴","faces","woozy drunk 晕 醉"],["😇","faces","angel innocent 天使 无辜"],["🙃","faces","upside down silly 倒脸 哭笑不得"],["💀","faces","skull dead 骷髅 笑死"],["👻","faces","ghost 鬼 幽灵"],["👍","faces","thumbs up like good 赞 好"],["👎","faces","thumbs down dislike 踩 差"],["👏","faces","clap applause 鼓掌 厉害"],["🙌","faces","raise hands celebrate 举手 庆祝"],["🙏","faces","pray thanks please 拜托 感谢 祈祷"],["💪","faces","muscle strong flex 加油 强壮 肌肉"],["👀","faces","eyes look watch 看 围观 眼睛"],["🤝","faces","handshake deal 握手 合作"],["✌️","faces","victory peace 胜利 耶"],["👋","faces","wave hello bye 挥手 你好 再见"],["🤞","faces","crossed fingers luck 祈祷 好运"],["👌","faces","ok okay 好的 可以"],["🫶","faces","heart hands love 比心 爱心"],["✍️","faces","writing hand 写字 记录"],["🧠","faces","brain smart 大脑 聪明"],["🦾","faces","mechanical arm 机械臂 力量"],["👤","faces","person user profile 个人 用户"],["👥","faces","people team group 团队 多人"],["🐶","nature","dog puppy 狗 小狗"],["🐱","nature","cat kitten 猫 小猫"],["🐭","nature","mouse rat 老鼠"],["🐹","nature","hamster 仓鼠"],["🐰","nature","rabbit bunny 兔子"],["🦊","nature","fox 狐狸"],["🐻","nature","bear 熊"],["🐼","nature","panda 熊猫"],["🐨","nature","koala 考拉"],["🐯","nature","tiger 老虎"],["🦁","nature","lion 狮子"],["🐮","nature","cow 牛"],["🐷","nature","pig 猪"],["🐸","nature","frog 青蛙"],["🐵","nature","monkey 猴子"],["🐔","nature","chicken 鸡"],["🐧","nature","penguin 企鹅"],["🐦","nature","bird 鸟"],["🐣","nature","chick hatching 小鸡 孵化"],["🦆","nature","duck 鸭子"],["🦉","nature","owl 猫头鹰"],["🐝","nature","bee 蜜蜂"],["🐛","nature","bug caterpillar 虫子 毛虫"],["🦋","nature","butterfly 蝴蝶"],["🐌","nature","snail slow 蜗牛 慢"],["🐢","nature","turtle slow 乌龟 慢"],["🐍","nature","snake 蛇"],["🐙","nature","octopus 章鱼"],["🦑","nature","squid 鱿鱼"],["🦐","nature","shrimp 虾"],["🦀","nature","crab 螃蟹"],["🐠","nature","tropical fish 鱼 热带鱼"],["🐳","nature","whale 鲸鱼"],["🦈","nature","shark 鲨鱼"],["🐊","nature","crocodile 鳄鱼"],["🦄","nature","unicorn 独角兽"],["🐴","nature","horse 马"],["🐑","nature","sheep 羊 绵羊"],["🐐","nature","goat 山羊"],["🦜","nature","parrot 鹦鹉"],["🌸","nature","blossom flower sakura 樱花 花"],["🌹","nature","rose flower 玫瑰 花"],["🌻","nature","sunflower 向日葵"],["🌷","nature","tulip 郁金香"],["🌱","nature","seedling sprout 发芽 幼苗"],["🌲","nature","tree evergreen 树 松树"],["🌳","nature","deciduous tree 树 大树"],["🌵","nature","cactus 仙人掌"],["🍀","nature","clover luck 四叶草 幸运"],["🍁","nature","maple leaf autumn 枫叶 秋天"],["🍄","nature","mushroom 蘑菇"],["🌈","nature","rainbow 彩虹"],["☀️","nature","sun sunny 太阳 晴"],["🌙","nature","moon crescent 月亮"],["⭐","nature","star 星星"],["🌟","nature","glowing star 星星 闪亮"],["☁️","nature","cloud 云"],["⛅","nature","partly cloudy 多云"],["🌧️","nature","rain rainy 下雨"],["❄️","nature","snowflake snow 雪 雪花"],["⛄","nature","snowman 雪人"],["⚡","nature","lightning bolt 闪电"],["🔥","nature","fire hot 火 燃"],["🌊","nature","wave ocean sea 海浪"],["🏔️","nature","mountain snow 雪山 山"],["☕","food","coffee 咖啡"],["🍵","food","tea 茶"],["🧋","food","bubble tea boba 奶茶"],["🥛","food","milk 牛奶"],["🍺","food","beer 啤酒"],["🍷","food","wine 红酒"],["🥂","food","champagne cheers 香槟 干杯"],["🥤","food","cup straw soda 饮料 可乐"],["🧃","food","juice box 果汁"],["🍎","food","apple 苹果"],["🍊","food","orange tangerine 橙子 橘子"],["🍋","food","lemon 柠檬"],["🍉","food","watermelon 西瓜"],["🍓","food","strawberry 草莓"],["🍑","food","peach 桃子"],["🥭","food","mango 芒果"],["🍍","food","pineapple 菠萝"],["🥝","food","kiwi 猕猴桃"],["🍇","food","grapes 葡萄"],["🍒","food","cherries 樱桃"],["🥑","food","avocado 牛油果"],["🥦","food","broccoli 西兰花"],["🌽","food","corn 玉米"],["🌶️","food","hot pepper spicy 辣椒 辣"],["🍔","food","burger hamburger 汉堡"],["🍟","food","fries 薯条"],["🍕","food","pizza 披萨"],["🌭","food","hot dog 热狗"],["🥪","food","sandwich 三明治"],["🌮","food","taco 墨西哥卷"],["🍜","food","ramen noodles 拉面 面条"],["🍝","food","spaghetti pasta 意面"],["🍣","food","sushi 寿司"],["🍱","food","bento 便当"],["🥟","food","dumpling 饺子"],["🍚","food","rice 米饭"],["🍞","food","bread 面包"],["🥐","food","croissant 可颂 牛角包"],["🧀","food","cheese 奶酪 芝士"],["🍳","food","cooking egg 煎蛋 做饭"],["🍦","food","ice cream 冰淇淋"],["🍰","food","cake 蛋糕"],["🎂","food","birthday cake 生日蛋糕"],["🍫","food","chocolate 巧克力"],["🍩","food","donut doughnut 甜甜圈"],["🍪","food","cookie 饼干"],["🍭","food","lollipop 棒棒糖"],["⚽","activity","soccer football 足球"],["🏀","activity","basketball 篮球"],["🏈","activity","american football 橄榄球"],["⚾","activity","baseball 棒球"],["🎾","activity","tennis 网球"],["🏐","activity","volleyball 排球"],["🏓","activity","ping pong 乒乓球"],["🏸","activity","badminton 羽毛球"],["🥊","activity","boxing 拳击"],["⛳","activity","golf 高尔夫"],["🎣","activity","fishing 钓鱼"],["🏊","activity","swim 游泳"],["🏄","activity","surf 冲浪"],["🚴","activity","cycling 骑行"],["🏋️","activity","weightlifting gym 举重 健身"],["🧘","activity","yoga meditation 瑜伽 冥想"],["🎮","activity","video game controller 游戏 游戏机"],["🎲","activity","dice 骰子"],["🎯","activity","target bullseye 目标 靶心"],["🎳","activity","bowling 保龄球"],["🎰","activity","slot machine 老虎机"],["♟️","activity","chess 国际象棋 棋"],["🎸","activity","guitar 吉他"],["🎹","activity","piano keyboard 钢琴"],["🥁","activity","drum 鼓"],["🎤","activity","microphone sing 麦克风 唱歌"],["🎧","activity","headphones 耳机"],["🎬","activity","clapper movie 电影 拍摄"],["🎨","activity","art palette paint 画画 艺术"],["🎭","activity","theater masks 戏剧 面具"],["🎪","activity","circus 马戏团"],["🎡","activity","ferris wheel 摩天轮"],["✈️","activity","airplane travel flight 飞机 旅行"],["🚗","activity","car drive 汽车 车"],["🚕","activity","taxi 出租车"],["🚌","activity","bus 公交车"],["🚑","activity","ambulance 救护车"],["🚒","activity","fire engine 消防车"],["🚀","activity","rocket launch ship 火箭 发射"],["🛸","activity","ufo flying saucer 飞碟"],["🚲","activity","bicycle bike 自行车"],["🛴","activity","scooter 滑板车"],["🚄","activity","bullet train 高铁 动车"],["🚢","activity","ship 船 轮船"],["⛵","activity","sailboat 帆船"],["🏠","activity","house home 房子 家"],["🏢","activity","office building 公司 办公楼"],["🏥","activity","hospital 医院"],["🏫","activity","school 学校"],["🏖️","activity","beach vacation 海滩 度假"],["⛺","activity","camping tent 露营 帐篷"],["🌋","activity","volcano 火山"],["🗺️","activity","map world 地图"],["🧭","activity","compass 指南针"],["💻","objects","laptop computer 电脑 笔记本"],["🖥️","objects","desktop computer 台式机 电脑"],["⌨️","objects","keyboard 键盘"],["🖱️","objects","computer mouse 鼠标"],["📱","objects","phone mobile 手机"],["🔋","objects","battery 电池"],["🔌","objects","plug electric 插头"],["💾","objects","floppy save 软盘 保存"],["📀","objects","cd disc 光盘"],["🎥","objects","movie camera 摄像机"],["📷","objects","camera 相机"],["🔭","objects","telescope 望远镜"],["📡","objects","satellite antenna 卫星 天线"],["🌐","objects","globe web internet 网络 全球 互联网"],["🕯️","objects","candle 蜡烛"],["💡","objects","bulb idea light 灯泡 点子"],["🔦","objects","flashlight 手电筒"],["📁","objects","folder 文件夹"],["📂","objects","open folder 文件夹 打开"],["🗂️","objects","card index archive 归档 索引"],["📅","objects","calendar date 日历 日期"],["📌","objects","pin pushpin 图钉 置顶"],["📍","objects","round pin location 定位 位置"],["📎","objects","paperclip attachment 回形针 附件"],["✂️","objects","scissors cut 剪刀 剪切"],["📏","objects","ruler 尺子"],["📝","objects","memo note write 备忘 记录"],["✏️","objects","pencil edit write 铅笔 编辑"],["📄","objects","document page 文档 文件"],["📃","objects","page curl 文档 文件"],["📑","objects","bookmark tabs 标签页 文档"],["📚","objects","books 书 书籍"],["📖","objects","open book 打开的书 阅读"],["🔖","objects","bookmark 书签"],["🏷️","objects","label tag 标签"],["📊","objects","bar chart stats 图表 统计"],["📈","objects","chart up growth 上涨 增长"],["📉","objects","chart down 下跌 下降"],["🔍","objects","search magnifier 搜索 查找"],["🔎","objects","search magnifier right 搜索 查找"],["🔒","objects","lock locked 锁 锁定"],["🔓","objects","unlock open 解锁"],["🔑","objects","key 钥匙 密钥"],["🔧","objects","wrench tool 扳手 工具"],["🔨","objects","hammer 锤子"],["🛠️","objects","tools hammer wrench 工具 修理"],["🧰","objects","toolbox 工具箱 工具"],["🪛","objects","screwdriver 螺丝刀 工具"],["🔩","objects","nut and bolt screw 螺母 螺栓"],["🏗️","objects","building construction crane 施工 建造"],["⚙️","objects","gear settings 齿轮 设置"],["🧲","objects","magnet 磁铁"],["⚗️","objects","alembic 蒸馏器 实验"],["🧪","objects","test tube experiment 实验 试管"],["🔬","objects","microscope science 显微镜 科学"],["🤖","objects","robot bot 机器人"],["👾","objects","alien monster game 外星人 游戏"],["💣","objects","bomb 炸弹"],["🧨","objects","firecracker 爆竹"],["🗑️","objects","trash delete 垃圾桶 删除"],["🧹","objects","broom clean 扫帚 清理"],["🧻","objects","toilet paper 纸巾"],["🧽","objects","sponge 海绵"],["📦","objects","package box 包裹 箱子"],["✉️","objects","envelope mail 邮件 信封"],["📮","objects","mailbox postbox 邮箱"],["📧","objects","email mail 邮件"],["📥","objects","inbox tray receive 收件箱 接收"],["📤","objects","outbox tray send 发件箱 发送"],["📞","objects","telephone receiver call phone 电话 通话"],["💬","objects","speech balloon chat message bubble 聊天 对话 气泡 消息"],["💭","objects","thought balloon thinking 思考 想法 气泡"],["📣","objects","megaphone announcement 喇叭 公告"],["📢","objects","loudspeaker broadcast 广播 喇叭 通知"],["🚨","objects","police light alert emergency 警报 告警 紧急"],["🗳️","objects","ballot box vote 投票箱 投票"],["🔗","objects","link chain 链接 连接"],["🧩","objects","puzzle piece plugin 拼图 插件"],["🪄","objects","magic wand 魔法 魔杖"],["🛡️","objects","shield security 盾牌 安全"],["⚔️","objects","crossed swords 交叉剑 战斗"],["💳","objects","credit card 信用卡"],["💰","objects","money bag 钱袋 钱"],["🧾","objects","receipt 收据 小票"],["📿","objects","prayer beads 念珠"],["💍","objects","ring 戒指"],["👑","objects","crown 皇冠"],["🎩","objects","top hat 礼帽"],["🎒","objects","backpack 背包 书包"],["👓","objects","glasses 眼镜"],["🌂","objects","umbrella 雨伞"],["🕰️","objects","mantel clock 座钟"],["⌚","objects","watch 手表"],["⏱️","objects","stopwatch 秒表"],["🧯","objects","fire extinguisher 灭火器"],["🩹","objects","bandage patch fix 创可贴 补丁 修复"],["🎓","objects","graduation cap study learn 毕业 学习"],["🎫","objects","ticket 票 门票 工单"],["✅","symbols","check done complete 完成 对勾"],["✔️","symbols","checkmark correct 对勾 正确"],["❌","symbols","cross x wrong 错误 叉"],["❓","symbols","question help 问题 问号"],["❔","symbols","white question 问题 问号"],["❗","symbols","exclamation important 感叹号 重要"],["❕","symbols","white exclamation 感叹号"],["⚠️","symbols","warning caution 警告 注意"],["🚧","symbols","construction wip 施工 进行中"],["🚫","symbols","prohibited no 禁止"],["💥","symbols","boom explosion 爆炸"],["✨","symbols","sparkles shiny 闪亮 星星"],["🎉","symbols","tada party celebrate 庆祝 撒花"],["🎊","symbols","confetti party 庆祝 彩带"],["🏆","symbols","trophy champion 奖杯 冠军"],["🥇","symbols","gold medal first 金牌 第一"],["🥈","symbols","silver medal second 银牌 第二"],["🥉","symbols","bronze medal third 铜牌 第三"],["🎖️","symbols","military medal 勋章"],["🚩","symbols","red flag mark 红旗 标记"],["🏁","symbols","checkered flag finish 终点 完成"],["⏳","symbols","hourglass time waiting 沙漏 时间"],["⌛","symbols","hourglass done 沙漏 时间"],["🕐","symbols","clock one time 时钟 一点"],["⏰","symbols","alarm clock 闹钟"],["🔔","symbols","bell notification 铃铛 通知"],["🔕","symbols","bell slash mute 静音 免打扰"],["🕹️","symbols","joystick game 摇杆 游戏"],["🔴","symbols","red circle record 红圆 录制"],["🟢","symbols","green circle online 绿圆 在线"],["🟡","symbols","yellow circle 黄圆"],["🟠","symbols","orange circle 橙圆"],["🔵","symbols","blue circle 蓝圆"],["🟣","symbols","purple circle 紫圆"],["⚫","symbols","black circle 黑圆"],["⚪","symbols","white circle 白圆"],["🟥","symbols","red square 红方"],["🟩","symbols","green square 绿方"],["🟦","symbols","blue square 蓝方"],["🔺","symbols","red triangle up 三角 上"],["🔻","symbols","triangle down 三角 下"],["🔸","symbols","diamond orange 菱形"],["🔹","symbols","diamond blue 菱形"],["💠","symbols","diamond dot 菱形 花"],["🔶","symbols","diamond orange big 菱形"],["🔷","symbols","diamond blue big 菱形"],["▶️","symbols","play 播放"],["⏸️","symbols","pause 暂停"],["⏹️","symbols","stop 停止"],["⏺️","symbols","record 录制"],["⏩","symbols","fast forward 快进"],["⏪","symbols","rewind 快退"],["🔀","symbols","shuffle 随机 打乱"],["🔁","symbols","repeat 重复 循环"],["🔂","symbols","repeat one 单曲循环"],["🔄","symbols","refresh sync 刷新 同步"],["🔃","symbols","reload 重载"],["➕","symbols","plus add 加 新增"],["➖","symbols","minus 减"],["➗","symbols","divide 除"],["✖️","symbols","multiply 乘"],["💲","symbols","dollar money 美元 钱"],["™️","symbols","trademark 商标"],["©️","symbols","copyright 版权"],["®️","symbols","registered 注册商标"],["↔️","symbols","left right arrow 左右箭头"],["⬆️","symbols","up arrow 上箭头"],["⬇️","symbols","down arrow 下箭头"],["➡️","symbols","right arrow 右箭头"],["⬅️","symbols","left arrow 左箭头"],["🔙","symbols","back 返回"],["🔜","symbols","soon 很快"],["🔝","symbols","top 置顶 顶部"],["💤","symbols","zzz sleep 睡觉"],["🆕","symbols","new 新 新品"],["🆒","symbols","cool 酷"],["🆓","symbols","free 免费"],["🆗","symbols","ok 可以"],["🆙","symbols","up 提升"],["🆚","symbols","vs versus 对比"],["♾️","symbols","infinity 无限"],["💯","symbols","hundred perfect 满分 一百"],["💢","symbols","anger 生气"],["♨️","symbols","hot springs 温泉"],["🚸","symbols","children crossing 注意儿童"],["🔞","symbols","no one under eighteen 十八禁"],["📵","symbols","no mobile phones 禁止手机"],["❤️","symbols","red heart love 红心 爱"],["🧡","symbols","orange heart 橙心"],["💛","symbols","yellow heart 黄心"],["💚","symbols","green heart 绿心"],["💙","symbols","blue heart 蓝心"],["💜","symbols","purple heart 紫心"],["🖤","symbols","black heart 黑心"],["🤍","symbols","white heart 白心"],["🤎","symbols","brown heart 棕心"],["💔","symbols","broken heart 心碎"],["💕","symbols","two hearts 双心 爱心"],["💖","symbols","sparkling heart 闪亮的心"],["💗","symbols","growing heart 心动"]],RD=Aoe.map(([e,t,n])=>({emoji:e,group:t,keywords:n}));function Coe(e,t=24){const n=e.trim().toLowerCase();if(!n)return[];const i=[];for(const s of RD)if((s.keywords.includes(n)||s.emoji===n)&&(i.push(s.emoji),i.length>=t))break;return i}const woe=8;function xoe(e,t,n=woe){return[t,...e.filter(i=>i!==t)].slice(0,n)}function OD(e,t){try{const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const i=new Date,s=c=>String(c).padStart(2,"0"),o=`${s(n.getHours())}:${s(n.getMinutes())}`,r=n.getFullYear()===i.getFullYear(),l=n.getMonth()===i.getMonth(),a=n.getDate()===i.getDate();if(r&&l&&a)return o;const u=new Date(i);return u.setDate(i.getDate()-1),n.getFullYear()===u.getFullYear()&&n.getMonth()===u.getMonth()&&n.getDate()===u.getDate()?`${t} ${o}`:r?`${s(n.getMonth()+1)}-${s(n.getDate())} ${o}`:`${n.getFullYear()}-${s(n.getMonth()+1)}-${s(n.getDate())} ${o}`}catch{return e}}function ou(e){if(e>=1024*1024)return`${Kx(e/(1024*1024))}M`;if(e>=1024){const t=e/1024;return`${t>=100?Math.round(t):Kx(t)}k`}return String(e)}function Kx(e){const t=e.toFixed(1);return t.endsWith(".0")?t.slice(0,-2):t}function uu(e){const t=e.split("/").filter(Boolean);return t.length>0?t[t.length-1]:e}const Soe=/^(?:[A-Za-z]:[\\/]|\\\\|\/\/)/;function Ml(e){const t=e.replaceAll("\\","/"),n=Soe.test(t),i=t.replace(/\/+$/,"");return n?i.toLowerCase():i}function _oe(e){const{workspaces:t,sessions:n,hiddenWorkspaceRoots:i,sessionsHasMoreByWorkspace:s}=e,o=new Set(i.map(Ml)),r=new Map;for(const f of t){const h=Ml(f.root);o.has(h)||r.has(h)||r.set(h,{...f})}for(const f of n){const h=f.cwd;if(!h)continue;const g=Ml(h);o.has(g)||r.has(g)||r.set(g,{id:f.workspaceId??h,root:h,name:uu(h),sessionCount:0})}const l=new Map;for(const f of t){const h=Ml(f.root);l.has(h)||l.set(h,f.id)}const a=new Map;for(const f of n){const h=l.get(Ml(f.cwd))??f.workspaceId??f.cwd;a.set(h,(a.get(h)??0)+1)}const u=[];for(const f of t){const h=Ml(f.root);!o.has(h)&&!u.includes(h)&&u.push(h)}const c=[...r.keys()].filter(f=>!u.includes(f));c.sort((f,h)=>r.get(f).root.localeCompare(r.get(h).root));const d=[];for(const f of[...u,...c]){const h=r.get(f),g=a.get(h.id)??a.get(h.root)??0,m=s[h.id]===!1?g:Math.max(h.sessionCount,g);d.push({...h,sessionCount:m})}return d}function Ioe(e,t){if(e===void 0||e.length===0)return;const n=t?.find(i=>i.id===e)??t?.find(i=>i.model===e);return n?.displayName||n?.model||(e.includes("/")?e.split("/").pop():e)}function Moe(e){if(!(e===void 0||e.length===0||e==="off"||e==="on"))return e}function Hy(e){if(e===void 0)return"toggle";const t=e.capabilities??[];return t.includes("always_thinking")?"always-on":t.includes("thinking")||e.adaptiveThinking===!0?"toggle":"unsupported"}function PD(e){return e?.supportEfforts??[]}function Eoe(e){return e[Math.floor(e.length/2)]}function i0(e){if(Hy(e)==="unsupported")return"off";const t=PD(e);return t.length>0?e?.defaultEffort??Eoe(t):"on"}function B0(e){const t=PD(e),n=Hy(e);return t.length>0?n==="always-on"?[...t]:["off",...t]:n==="always-on"?["on"]:n==="unsupported"?["off"]:["on","off"]}function hb(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function Toe(e){return e!=="off"}function Loe(e,t){return B0(e).includes(t)}function i6(e,t){return t==="off"?"off":t==="on"?i0(e):t}function X2(e,t){return t??i0(e)}function Noe(e,t){if(e==="off")return{enabled:!1};if(e==="on")return{enabled:!0};const n=t?.at(-1);return n!==void 0&&e===n?{enabled:!0}:{enabled:!0,effort:e}}function Foe(e,t,n){return!n||e===void 0?t:i0(e)}let Doe=0;function pb(e,t){const n=++Doe;return e.pendingThinkingBySession[t]=n,n}function Xa(e,t,n){return n===void 0||e.pendingThinkingBySession[t]!==n?!1:(delete e.pendingThinkingBySession[t],!0)}function jD(e,t,n){e.pendingThinkingBySession[t]===void 0&&(e.thinkingBySession[t]=n)}function HD(){return window.kimiDesktop}function sm(){return typeof HD()?.getPathForFile=="function"}function s6(e){const t=HD()?.getPathForFile;if(typeof t!="function")return null;try{return t(e)}catch{return null}}function K4(e){return Array.from(e.dataTransfer?.items??[]).some(t=>t.kind==="file"&&t.type==="")}function gb(e,t=s6){const n=Array.from(e.dataTransfer?.items??[]);if(n.length===0)return{files:Array.from(e.dataTransfer?.files??[]),folderPaths:[]};const i=[],s=[],o=new Set;for(const r of n){if(r.kind!=="file")continue;const l=r.getAsFile();if(l)if(r.webkitGetAsEntry()?.isDirectory===!0){const a=t(l);if(!a||o.has(a))continue;o.add(a),s.push(a)}else i.push(l)}return{files:i,folderPaths:s}}function $oe(e,t=s6){return gb(e,t).folderPaths}function Boe(e,t=s6){const n=u=>`${u.size}:${u.type}:${u.name}`,i=[],s=new Set,o=new Set,r=[],l=new Set;let a=!1;for(const u of Array.from(e.items??[])){if(u.kind!=="file")continue;const c=u.getAsFile();if(u.webkitGetAsEntry?.()?.isDirectory===!0){a=!0,c&&o.add(n(c));const f=c?t(c):null;if(!f||l.has(f))continue;l.add(f),r.push(f);continue}if(!c)continue;const d=n(c);s.has(d)||(s.add(d),i.push(c))}for(const u of Array.from(e.files??[])){const c=n(u);o.has(c)||s.has(c)||(s.add(c),i.push(u))}return{files:i,folderPaths:r,hasFolders:a}}const zoe=/<summary>([\s\S]*?)<\/summary>/,Roe=/<resume_hint>([\s\S]*?)<\/resume_hint>/,V4=/<subagent\b([^>]*)>|<\/subagent>/g,Ooe="</subagent>",Vx=/(completed|failed|aborted):\s*(\d+)/g,Zx=/([a-z_]+)="([^"]*)"/g;function Poe(e){return e.replaceAll(""",'"').replaceAll("<","<").replaceAll(">",">").replaceAll("&","&")}function joe(e){const t={};Zx.lastIndex=0;let n;for(;(n=Zx.exec(e))!==null;)t[n[1]]=Poe(n[2]);return t}function Hoe(e){const t={completed:0,failed:0,aborted:0};Vx.lastIndex=0;let n;for(;(n=Vx.exec(e))!==null;){const i=n[1];t[i]=Number(n[2])}return t}function Woe(e,t){const n=joe(e);return{outcome:n.outcome??"completed",item:n.item,agentId:n.agent_id,mode:n.mode,state:n.state,body:t.trim()}}function qoe(e){const t=[],n=[];V4.lastIndex=0;let i;for(;(i=V4.exec(e))!==null;)if(i[0]===Ooe){if(n.length===0)continue;const s=n.pop();s&&n.length===0&&t.push(Woe(s.attrs,e.slice(s.bodyStart,i.index)))}else n.length===0?n.push({attrs:i[1]??"",bodyStart:V4.lastIndex}):n.push(null);return t}function Uoe(e){if(e==null)return null;const t=Array.isArray(e)?e.join(` +`):e;if(!t.includes("<agent_swarm_result>"))return null;const n=zoe.exec(t)?.[1]?.trim()??"",{completed:i,failed:s,aborted:o}=Hoe(n),r=Roe.exec(t)?.[1]?.trim(),l=qoe(t),a=i+s+o;return{summary:n,completed:i,failed:s,aborted:o,total:a>0?a:l.length,subagents:l,resumeHint:r}}function Koe(e){const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t<0?"":t===0?e[0]:e.slice(0,t)}const Voe=/^[A-Za-z]:[\\/]/;function Gx(e){return Voe.test(e)||e.startsWith("\\\\")||e.startsWith("//")}function Wy(e,t){if(!t)return null;const n=c=>c.replace(/\\/g,"/"),i=n(e);let s=n(t);s.length>1&&(s=s.replace(/\/+$/,""));const o=Gx(s)||Gx(i),r=o?s.toLowerCase():s,l=o?i.toLowerCase():i,a=r.endsWith("/")?r:`${r}/`;if(l!==r&&!l.startsWith(a))return null;const u=l===r?"":i.slice(a.length);return u.split("/").includes("..")?null:u||null}const ev="application/x-kimi-session-row";function Zoe(e,t){return e.includes(t)?e:[...e,t]}function Goe(e,t){return e.includes(t)?e.filter(n=>n!==t):e}function Qoe(e,t){const n=new Set(t),i=new Map,s=[];for(const r of e)n.has(r.id)?i.set(r.id,r):s.push(r);const o=[];for(const r of t){const l=i.get(r);l!==void 0&&o.push(l)}return{pinned:o,unpinned:s}}function Yoe(e,t,n){return e.find(i=>i.window?.duration===t&&i.window?.unit===n)}const Joe=30;function Xoe(e){return e!==void 0&&e<Joe}function WD(e,t){if(e.window!==void 0){const{duration:n,unit:i}=e.window;return i==="week"?t("settings.planUsage.weekLimit",{n}):i==="day"?t("settings.planUsage.dayLimit",{n}):i==="hour"?t("settings.planUsage.hourLimit",{n}):t("settings.planUsage.minuteLimit",{n})}return e.name??t("settings.planUsage.genericLimit")}function qD(e,t){const n=Date.parse(e);if(Number.isNaN(n))return"";const i=Math.floor((n-Date.now())/1e3);if(i<=0)return t("settings.planUsage.resetDone");const s=Math.floor(i/86400),o=Math.floor(i%86400/3600),r=Math.floor(i%3600/60),l=[];return s>0?(l.push(t("settings.planUsage.durationDay",{n:s})),l.push(t("settings.planUsage.durationHour",{n:o})),l.push(t("settings.planUsage.durationMinute",{n:r}))):o>0?(l.push(t("settings.planUsage.durationHour",{n:o})),l.push(t("settings.planUsage.durationMinute",{n:r}))):r>0?l.push(t("settings.planUsage.durationMinute",{n:r})):l.push(t("settings.planUsage.durationSecond",{n:i})),t("settings.planUsage.resetsIn",{duration:l.join(" ")})}function mb(e,t){if(t<=0)return"ok";const n=e/t;return n>=.85?"danger":n>=.5?"warn":"ok"}function Qm(e,t){return t<=0?0:Math.min(100,Math.round(e/t*100))}function ere(e,t){const n=(e/100).toFixed(2);switch(t.toUpperCase()){case"CNY":return{symbol:"¥",number:n};case"USD":return{symbol:"$",number:n};default:return{symbol:"",number:`${n} ${t}`}}}const tre=["kimi","openai","openai_responses","anthropic","google-genai","vertexai"];function om(){return{model:"",maxContextSize:"",displayName:"",capabilities:["tool_use","thinking"],supportEfforts:[],adaptiveThinking:!0}}function vb(e,t){const n=[];for(const i of Object.values(t??{})){if(i===null||typeof i!="object")continue;const s=i;s.provider===e.id&&n.push({model:typeof s.model=="string"?s.model:"",maxContextSize:typeof s.maxContextSize=="number"?String(s.maxContextSize):"",displayName:typeof s.displayName=="string"?s.displayName:"",capabilities:Array.isArray(s.capabilities)?s.capabilities.filter(o=>typeof o=="string"):[],supportEfforts:Array.isArray(s.supportEfforts)?s.supportEfforts.filter(o=>typeof o=="string"):[],...typeof s.adaptiveThinking=="boolean"?{adaptiveThinking:s.adaptiveThinking}:{}})}return n}const UD=/^[\p{L}\p{N}][\p{L}\p{N}\-_ ]*$/u;function nre(e,t={}){const n=e.id.trim();if(n==="")return"idRequired";if(!UD.test(n))return"idInvalid";if(t.requireApiKey===!0&&e.apiKey.trim()==="")return"apiKeyRequired";if(t.requireBaseUrl===!0&&e.baseUrl.trim()==="")return"baseUrlRequired";if(e.models.length===0)return"modelRequired";for(const i of e.models){if(i.model.trim()==="")return"modelRequired";const s=i.maxContextSize.trim();if(s==="")return"contextSizeRequired";if(!/^\d+$/.test(s)||Number(s)<1)return"contextSizeInvalid"}return null}function KD(e){return e.map(t=>{const n=t.displayName.trim();return{model:t.model.trim(),maxContextSize:Number(t.maxContextSize.trim()),...t.capabilities.length>0?{capabilities:[...t.capabilities]}:{},...t.supportEfforts.length>0?{supportEfforts:[...t.supportEfforts]}:{},...t.adaptiveThinking!==void 0?{adaptiveThinking:t.adaptiveThinking}:{},...n===""?{}:{displayName:n}}})}function ire(e){const t=e.apiKey.trim(),n=e.baseUrl.trim();return{id:e.id.trim(),type:e.type,models:KD(e.models),...t===""?{}:{apiKey:t},...n===""?{}:{baseUrl:n}}}function sre(e,t,n){const i=KD(e.models),s=e.id.trim(),o=e.apiKey.trim(),r=e.baseUrl.trim(),l=n?.existingDefaultModel?.trim()??"",a=l.indexOf("/")>=0?l.slice(l.indexOf("/")+1):l;return{...t!==void 0&&s!==""&&s!==t.id?{newId:s}:{},type:e.type,models:i,...o===""&&n?.includeBlankApiKey!==!0?{}:{apiKey:o},...r===""?{}:{baseUrl:r},...a!==""&&i.some(u=>u.model===a)?{defaultModel:a}:{}}}function VD(e){return e.id==="managed:kimi-code"&&e.type==="kimi"}const ore=/^(\d+)\t(.*)$/;function rre(e){const t=e.at(-1)===""?e.slice(0,-1):e;if(t.length===0)return null;const n=[],i=[];for(const s of t){const o=ore.exec(s);if(!o)return null;i.push(Number(o[1])),n.push(o[2]??"")}return{contents:n,lineNumbers:i}}function Qx(e,t){let n="",i=t;const s=/^((?:\\\\|\/\/)[^\\/]+[\\/][^\\/]+)/.exec(t),o=/^([a-zA-Z]:)[\\/]?/.exec(t);s?(n=s[1],i=t.slice(s[1].length)):t.startsWith("/")?(n="/",i=t.slice(1)):o&&(n=o[1],i=t.slice(o[0].length));const r=n!=="",l=i.split(/[\\/]+/).filter(Boolean);for(const u of e.split("/"))u===""||u==="."||(u===".."?l.length>0&&l[l.length-1]!==".."?l.pop():r||l.push(".."):l.push(u));const a=l.join("/");return n==="/"?`/${a}`:n!==""?a?`${n}/${a}`:`${n}/`:a}function ZD(e,t){for(const n of e.stateMachineNames){const i=(e.stateMachineInputs(n)??[]).find(s=>s.name===t);if(i!==void 0)return i}return null}function lre(e,t){const n=ZD(e,t);return n!==null&&typeof n.fire=="function"?(n.fire(),!0):!1}function Yx(e,t,n){const i=ZD(e,t);return i!==null&&typeof i.value==typeof n?(i.value=n,!0):!1}const Z4={isPageHidden:()=>typeof document<"u"&&document.hidden,onVisibilityChange:e=>typeof document>"u"?()=>{}:(document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)),observeIntersection:(e,t)=>{if(typeof IntersectionObserver!="function")return()=>{};const n=new IntersectionObserver(i=>{const s=i[0];s!==void 0&&t(s.isIntersecting)});return n.observe(e),()=>n.disconnect()}};function GD(e,t,n={}){const i=n.isPageHidden??Z4.isPageHidden,s=n.onVisibilityChange??Z4.onVisibilityChange,o=n.observeIntersection??Z4.observeIntersection;let r=!i(),l=!0,a=!1;function u(){const f=!r||!l;f!==a&&(a=f,a?e.pause():e.play())}const c=s(()=>{r=!i(),u()}),d=o(t,f=>{l=f,u()});return u(),()=>{c(),d()}}const are={"&":"&","<":"<",">":">",'"':""","'":"'"};function Jx(e){return e.replace(/[&<>"']/g,t=>are[t]??t)}function ure(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cre(e,t,n=40){const i=e.replace(/\s+/g," ").trim();if(i.length===0)return"";const s=t.trim();if(s.length===0)return Xx(i,n*2);const o=i.toLowerCase().indexOf(s.toLowerCase());if(o<0)return Xx(i,n*2);const r=Math.max(0,o-n),l=Math.min(i.length,o+s.length+n),a=r>0,u=l<i.length;return`${a?"…":""}${i.slice(r,l)}${u?"…":""}`}function Xx(e,t){return e.length<=t?e:`${e.slice(0,t)}…`}function S1(e,t){const n=Jx(e),i=t.trim();if(i.length===0)return n;const s=new RegExp(ure(Jx(i)),"gi");return n.replace(s,o=>`<mark>${o}</mark>`)}const bo="kimi-web.server-credential",dre="token",fre=10080*60*1e3;let fa;const yb=new Set;function hre(){if(typeof window>"u")return;const e=window.location.hash??"";if(!e.startsWith("#"))return;const n=new URLSearchParams(e.slice(1)).get(dre);if(!n)return;const i=new URL(window.location.href);return i.hash="",window.history.replaceState(window.history.state,"",`${i.pathname}${i.search}`),n}function kb(e){return{version:1,credential:e,expiresAt:Date.now()+fre}}function pre(e){return JSON.stringify(e)}function o6(e){try{const t=JSON.parse(e);if(typeof t!="object"||t===null)return;const n=t;return n.version!==1||typeof n.credential!="string"||n.credential.length===0||typeof n.expiresAt!="number"||!Number.isFinite(n.expiresAt)?void 0:{version:1,credential:n.credential,expiresAt:n.expiresAt}}catch{return}}function bb(e){globalThis.localStorage?.setItem(bo,pre(e))}function gre(){try{const e=globalThis.localStorage?.getItem(bo);if(e){const n=o6(e);if(n===void 0){const i=kb(e);let s=!1;try{bb(i),s=!0}catch{}if(!s)try{globalThis.localStorage?.getItem(bo)===e&&globalThis.localStorage?.removeItem(bo),s=!0}catch{}try{globalThis.sessionStorage?.removeItem(bo)}catch{}return s?i:void 0}if(n.expiresAt>Date.now())return n;globalThis.sessionStorage?.removeItem(bo),globalThis.localStorage?.getItem(bo)===e&&globalThis.localStorage?.removeItem(bo);return}const t=globalThis.sessionStorage?.getItem(bo);if(t){const n=kb(t);let i=!1;try{bb(n),i=!0}catch{}try{globalThis.sessionStorage?.removeItem(bo),i=!0}catch{}return i?n:void 0}return}catch{return}}function mre(){const e=hre();return e?(QD(e),!0):(fa=gre(),fa!==void 0)}function vre(){if(fa!==void 0){if(fa.expiresAt<=Date.now()){yre(fa);return}return fa.credential}}function yre(e){fa=void 0;try{globalThis.sessionStorage?.removeItem(bo);const t=globalThis.localStorage?.getItem(bo),n=t==null?void 0:o6(t);(n===void 0?t===e.credential:n.credential===e.credential&&n.expiresAt===e.expiresAt)&&globalThis.localStorage?.removeItem(bo)}catch{}}function QD(e){const t=kb(e);fa=t;try{bb(t)}catch{}try{globalThis.sessionStorage?.removeItem(bo)}catch{}}function kre(){const e=fa;fa=void 0;try{const t=globalThis.localStorage?.getItem(bo),i=(t==null?void 0:o6(t))?.credential??t;e!==void 0&&i===e.credential&&globalThis.localStorage?.removeItem(bo),globalThis.sessionStorage?.removeItem(bo)}catch{}}function bre(e){return yb.add(e),()=>{yb.delete(e)}}function Are(){kre();for(const e of yb)try{e()}catch{}}function qy(e){return e.approvalCount>0?"awaiting-approval":e.questionCount>0?"awaiting-question":e.pendingInteraction==="approval"?"awaiting-approval":e.pendingInteraction==="question"?"awaiting-question":e.busy?"running":e.lastTurnReason==="failed"?"aborted":e.unread?"unread":"idle"}function eS(e){let t=null;for(const n of e){const i=qy(n);if(i==="awaiting-approval")return"approval";i==="awaiting-question"?t="question":i==="aborted"?t!=="question"&&(t="aborted"):i==="unread"&&t===null&&(t="unread")}return t}let tS;function Cre(e){if(typeof Intl.Segmenter=="function")return tS??=new Intl.Segmenter("und",{granularity:"grapheme"}),tS.segment(e)}const wre=/\p{Emoji_Presentation}/u,xre=/\p{Regional_Indicator}/u,Sre=/\p{Extended_Pictographic}/u,_re="️";function Ire(e){return wre.test(e)||xre.test(e)?!0:Sre.test(e)&&e.includes(_re)}function YD(e){const t=Cre(e)?.[Symbol.iterator]().next().value;if(t===void 0||!Ire(t.segment))return{emoji:null,rest:e};const n=e.slice(t.index+t.segment.length).replace(/^\s+/,"");return{emoji:t.segment,rest:n}}function Mre(e,t){const{rest:n}=YD(e),i=t?.trim()??"";return i?n?`${i} ${n}`:i:n}function JD(e,t){const n=e.findIndex(o=>o.id===t.id);if(n!==-1&&e[n].updatedAt===t.updatedAt)return e.map(o=>o.id===t.id?t:o);const i=e.filter(o=>o.id!==t.id),s=i.findIndex(o=>o.updatedAt<t.updatedAt);return s===-1?[...i,t]:[...i.slice(0,s),t,...i.slice(s)]}const Ab="/sessions/",XD="/admin/sessions";function nS(e){return e.pathname===XD}function iS(e){const{pathname:t}=e;if(!t.startsWith(Ab))return;const n=t.slice(Ab.length);if(!(!n||n.includes("/")))try{const i=decodeURIComponent(n);return i.length>0?i:void 0}catch{return}}function Ere(e){return e===void 0||e.length===0?"/":`${Ab}${encodeURIComponent(e)}`}function e$(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const e=navigator.userAgentData;return e?.platform==="macOS"||e?.platform==="iOS"}function Tre(e,t=e$()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyA"||e.key.toLowerCase()==="a")&&!e.defaultPrevented}function Lre(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement&&(e.isContentEditable||e.closest("input, textarea")!==null)}function Nre(e,t){return typeof Element>"u"||!(e instanceof Element)?null:e.closest(t)}function sS(e){e.ownerDocument.getSelection()?.selectAllChildren(e)}function Fre(e,t=e$()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyK"||e.key.toLowerCase()==="k")&&!e.defaultPrevented}function xc(e){return Array.isArray?Array.isArray(e):n$(e)==="[object Array]"}function Dre(e){if(typeof e=="string")return e;if(typeof e=="bigint")return e.toString();const t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Cb(e){return e==null?"":Dre(e)}function Ho(e){return typeof e=="string"}function Ym(e){return typeof e=="number"}function $re(e){return e===!0||e===!1||Bre(e)&&n$(e)=="[object Boolean]"}function t$(e){return typeof e=="object"}function Bre(e){return t$(e)&&e!==null}function Rr(e){return e!=null}function rm(e){return!e.trim().length}function n$(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const zre="Incorrect 'index' type",wb="Invalid doc index: must be a non-negative integer within the bounds of the docs array",Rre=e=>`Invalid value for key ${e}`,Ore=e=>`Pattern length exceeds max of ${e}.`,Pre=e=>`Missing ${e} property in key`,jre=e=>`Property 'weight' in key '${e}' must be a positive integer`,Hre="Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.",oS=Object.prototype.hasOwnProperty;var Wre=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{const i=i$(n);this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function i$(e){let t=null,n=null,i=null,s=1,o=null;if(Ho(e)||xc(e))i=e,t=rS(e),n=Jm(e);else{if(!oS.call(e,"name"))throw new Error(Pre("name"));const r=e.name;if(i=r,oS.call(e,"weight")&&e.weight!==void 0&&(s=e.weight,s<=0))throw new Error(jre(Jm(r)));t=rS(r),n=Jm(r),o=e.getFn??null}return{path:t,id:n,weight:s,src:i,getFn:o}}function rS(e){return xc(e)?e:e.split(".")}function Jm(e){return xc(e)?e.join("."):e}function qre(e,t){const n=[];let i=!1;const s=(o,r,l,a)=>{if(Rr(o))if(!r[l])n.push(a!==void 0?{v:o,i:a}:o);else{const u=o[r[l]];if(!Rr(u))return;if(l===r.length-1&&(Ho(u)||Ym(u)||$re(u)||typeof u=="bigint"))n.push(a!==void 0?{v:Cb(u),i:a}:Cb(u));else if(xc(u)){i=!0;for(let c=0,d=u.length;c<d;c+=1)s(u[c],r,l+1,c)}else r.length&&s(u,r,l+1,a)}};return s(e,Ho(t)?t.split("."):t,0),i?n:n[0]}const Ure={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Kre={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},Vre={location:0,threshold:.6,distance:100},Zre={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:qre,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},_n=Object.freeze({...Kre,...Ure,...Vre,...Zre});function Gre(e){return e>=9&&e<=13||e===32||e===160}function Qre(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(s){let o=0,r=!1;for(let a=0;a<s.length;a++)Gre(s.charCodeAt(a))?r=!1:r||(o++,r=!0);if(o===0&&(o=1),n.has(o))return n.get(o);const l=Math.round(i/Math.pow(o,.5*e))/i;return n.set(o,l),l},clear(){n.clear()}}}var r6=class{constructor({getFn:e=_n.getFn,fieldNormWeight:t=_n.fieldNormWeight}={}){this.norm=Qre(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,n)=>{this._keysMap[t.id]=n})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(Ho(this.docs[0]))for(let n=0;n<e;n++){const i=this._createStringRecord(this.docs[n],n);i&&(this.records[t++]=i)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(wb);if(Ho(e)){const i=this._createStringRecord(e,t);return i&&this.records.push(i),i}const n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(wb);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const i of e)Number.isInteger(i)&&i>=0&&t.add(i);if(t.size===0)return;this.records=this.records.filter(i=>!t.has(i.i));const n=Array.from(t).sort((i,s)=>i-s);for(const i of this.records){let s=0,o=n.length;for(;s<o;){const r=s+o>>>1;n[r]<i.i?s=r+1:o=r}i.i-=s}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!Rr(e)||rm(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const n={i:t,$:{}};for(let i=0,s=this.keys.length;i<s;i++){const o=this.keys[i],r=o.getFn?o.getFn(e):this.getFn(e,o.path);if(Rr(r)){if(xc(r)){const l=[];for(let a=0,u=r.length;a<u;a+=1){const c=r[a];if(Rr(c)){if(Ho(c)){if(!rm(c)){const d={v:c,i:a,n:this.norm.get(c)};l.push(d)}}else if(Rr(c.v)){const d=Ho(c.v)?c.v:Cb(c.v);if(!rm(d)){const f={v:d,i:c.i,n:this.norm.get(d)};l.push(f)}}}}n.$[i]=l}else if(Ho(r)&&!rm(r)){const l={v:r,n:this.norm.get(r)};n.$[i]=l}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function s$(e,t,{getFn:n=_n.getFn,fieldNormWeight:i=_n.fieldNormWeight}={}){const s=new r6({getFn:n,fieldNormWeight:i});return s.setKeys(e.map(i$)),s.setSources(t),s.create(),s}function Yre(e,{getFn:t=_n.getFn,fieldNormWeight:n=_n.fieldNormWeight}={}){const{keys:i,records:s}=e,o=new r6({getFn:t,fieldNormWeight:n});return o.setKeys(i),o.setIndexRecords(s),o}function Jre(e=[],t=_n.minMatchCharLength){const n=[];let i=-1,s=-1,o=0;for(let r=e.length;o<r;o+=1){const l=e[o];l&&i===-1?i=o:!l&&i!==-1&&(s=o-1,s-i+1>=t&&n.push([i,s]),i=-1)}return e[o-1]&&o-i>=t&&n.push([i,o-1]),n}function Xre(e,t,n,{location:i=_n.location,distance:s=_n.distance,threshold:o=_n.threshold,findAllMatches:r=_n.findAllMatches,minMatchCharLength:l=_n.minMatchCharLength,includeMatches:a=_n.includeMatches,ignoreLocation:u=_n.ignoreLocation}={}){if(t.length>32)throw new Error(Ore(32));const c=t.length,d=e.length,f=Math.max(0,Math.min(i,d));let h=o,g=f;const m=(M,$)=>{const D=M/c;if(u)return D;const T=Math.abs(f-$);return s?D+T/s:T?1:D},y=l>1||a,A=y?Array(d):[];let b;for(;(b=e.indexOf(t,g))>-1;){const M=m(0,b);if(h=Math.min(M,h),g=b+c,y){let $=0;for(;$<c;)A[b+$]=1,$+=1}}g=-1;let C=[],v=1,x=0,S=c+d;const _=1<<c-1;for(let M=0;M<c;M+=1){let $=0,D=S;for(;$<D;)m(M,f+D)<=h?$=D:S=D,D=Math.floor((S-$)/2+$);S=D;let T=Math.max(1,f-D+1);const N=r?d:Math.min(f+D,d)+c,O=Array(N+2);O[N+1]=(1<<M)-1;for(let P=N;P>=T;P-=1){const R=P-1,q=n[e[R]];if(O[P]=(O[P+1]<<1|1)&q,M&&(O[P]|=(C[P+1]|C[P])<<1|1|C[P+1]),O[P]&_&&(v=m(M,R),v<=h)){if(h=v,g=R,x=M,g<=f)break;T=Math.max(1,2*f-g)}}if(m(M+1,f)>h)break;C=O}if(y&&g>=0){const M=Math.min(d-1,g+c-1+x);for(let $=g;$<=M;$+=1)n[e[$]]&&(A[$]=1)}const I={isMatch:g>=0,score:Math.max(.001,v)};if(y){const M=Jre(A,l);M.length?a&&(I.indices=M):I.isMatch=!1}return I}function ele(e){const t={};for(let n=0,i=e.length;n<i;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<i-n-1}return t}function l6(e){if(e.length<=1)return e;e.sort((n,i)=>n[0]-i[0]||n[1]-i[1]);const t=[e[0]];for(let n=1,i=e.length;n<i;n+=1){const s=t[t.length-1],o=e[n];o[0]<=s[1]+1?s[1]=Math.max(s[1],o[1]):t.push(o)}return t}const o$={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},tle=new RegExp("["+Object.keys(o$).join("")+"]","g"),s0=typeof String.prototype.normalize=="function"?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(tle,t=>o$[t]):e=>e;var a6=class{constructor(e,{location:t=_n.location,threshold:n=_n.threshold,distance:i=_n.distance,includeMatches:s=_n.includeMatches,findAllMatches:o=_n.findAllMatches,minMatchCharLength:r=_n.minMatchCharLength,isCaseSensitive:l=_n.isCaseSensitive,ignoreDiacritics:a=_n.ignoreDiacritics,ignoreLocation:u=_n.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:i,includeMatches:s,findAllMatches:o,minMatchCharLength:r,isCaseSensitive:l,ignoreDiacritics:a,ignoreLocation:u},e=l?e:e.toLowerCase(),e=a?s0(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const c=(f,h)=>{this.chunks.push({pattern:f,alphabet:ele(f),startIndex:h})},d=this.pattern.length;if(d>32){let f=0;const h=d%32,g=d-h;for(;f<g;)c(this.pattern.substr(f,32),f),f+=32;if(h){const m=d-32;c(this.pattern.substr(m),m)}}else c(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i}=this.options;if(e=t?e:e.toLowerCase(),e=n?s0(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const g={isMatch:!0,score:0};return i&&(g.indices=[[0,e.length-1]]),g}const{location:s,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:a,ignoreLocation:u}=this.options,c=[];let d=0,f=!1;this.chunks.forEach(({pattern:g,alphabet:m,startIndex:y})=>{const{isMatch:A,score:b,indices:C}=Xre(e,g,m,{location:s+y,distance:o,threshold:r,findAllMatches:l,minMatchCharLength:a,includeMatches:i,ignoreLocation:u});A&&(f=!0),d+=b,A&&C&&c.push(...C)});const h={isMatch:f,score:f?d/this.chunks.length:1};return f&&i&&(h.indices=l6(c)),h}};const nle=new Set(["fuzzy","include"]);function ile(e){return e.startsWith("inverse")}const xb=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const n=t===e;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n=0,i;const s=[],o=e.length;for(;(i=t.indexOf(e,n))>-1;)n=i+o,s.push([i,n-1]);const r=!!s.length;return{isMatch:r,score:r?0:1,indices:s}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const n=t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const n=!t.startsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const n=!t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const n=t.endsWith(e);return{isMatch:n,score:n?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const n=t.indexOf(e)===-1;return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const n=new a6(e,{location:t.location??_n.location,threshold:t.threshold??_n.threshold,distance:t.distance??_n.distance,includeMatches:t.includeMatches??_n.includeMatches,findAllMatches:t.findAllMatches??_n.findAllMatches,minMatchCharLength:t.minMatchCharLength??_n.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??_n.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??_n.ignoreDiacritics,ignoreLocation:t.ignoreLocation??_n.ignoreLocation});return{type:"fuzzy",search(i){return n.searchIn(i)}}}}],lS=xb.length,sle="\0",ole="|";function rle(e){const t=[],n=e.length;let i=0;for(;i<n;){for(;i<n&&e[i]===" ";)i++;if(i>=n)break;let s=i;for(;s<n&&e[s]!==" "&&e[s]!=='"';)s++;if(s<n&&e[s]==='"'){for(s++;s<n;){if(e[s]==='"'){const o=s+1;if(o>=n||e[o]===" "){s++;break}if(e[o]==="$"&&(o+1>=n||e[o+1]===" ")){s+=2;break}}s++}t.push(e.substring(i,s)),i=s}else{for(;s<n&&e[s]!==" ";)s++;t.push(e.substring(i,s)),i=s}}return t}function aS(e,t){const n=e.match(t);return n?n[1]:null}function lle(e,t={}){return e.replace(/\\\|/g,sle).split(ole).map(n=>{const i=rle(n.replace(/\u0000/g,"|").trim()).filter(o=>o&&!!o.trim()),s=[];for(let o=0,r=i.length;o<r;o+=1){const l=i[o];let a=!1,u=-1;for(;!a&&++u<lS;){const c=xb[u],d=aS(l,c.multiRegex);d&&(s.push(c.create(d,t)),a=!0)}if(!a)for(u=-1;++u<lS;){const c=xb[u],d=aS(l,c.singleRegex);if(d){s.push(c.create(d,t));break}}}return s})}var ale=class{constructor(e,{isCaseSensitive:t=_n.isCaseSensitive,ignoreDiacritics:n=_n.ignoreDiacritics,includeMatches:i=_n.includeMatches,minMatchCharLength:s=_n.minMatchCharLength,ignoreLocation:o=_n.ignoreLocation,findAllMatches:r=_n.findAllMatches,location:l=_n.location,threshold:a=_n.threshold,distance:u=_n.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i,minMatchCharLength:s,findAllMatches:r,ignoreLocation:o,location:l,threshold:a,distance:u},e=t?e:e.toLowerCase(),e=n?s0(e):e,this.pattern=e,this.query=lle(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:i,ignoreDiacritics:s}=this.options;e=i?e:e.toLowerCase(),e=s?s0(e):e;let o=0;const r=[];let l=0,a=!1;for(let u=0,c=t.length;u<c;u+=1){const d=t[u];r.length=0,o=0,a=!1;for(let f=0,h=d.length;f<h;f+=1){const g=d[f],{isMatch:m,indices:y,score:A}=g.search(e);if(m)o+=1,l+=A,ile(g.type)&&(a=!0),n&&(nle.has(g.type)?r.push(...y):r.push(y));else{l=0,o=0,r.length=0,a=!1;break}}if(o){const f={isMatch:!0,score:l/o};return a&&(f.hasInverse=!0),n&&(f.indices=l6(r)),f}}return{isMatch:!1,score:1}}};const Sb=[];function u6(...e){Sb.push(...e)}function tv(e,t){for(let n=0,i=Sb.length;n<i;n+=1){const s=Sb[n];if(s.condition(e,t))return new s(e,t)}return new a6(e,t)}const nv={AND:"$and",OR:"$or"},_b={PATH:"$path",PATTERN:"$val"},Ib=e=>!!(e[nv.AND]||e[nv.OR]),ule=e=>!!e[_b.PATH],cle=e=>!xc(e)&&t$(e)&&!Ib(e),uS=e=>({[nv.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function r$(e,t,{auto:n=!0}={}){const i=s=>{if(Ho(s)){const a={keyId:null,pattern:s};return n&&(a.searcher=tv(s,t)),a}const o=Object.keys(s),r=ule(s);if(!r&&o.length>1&&!Ib(s))return i(uS(s));if(cle(s)){const a=r?s[_b.PATH]:o[0],u=r?s[_b.PATTERN]:s[a];if(!Ho(u))throw new Error(Rre(a));const c={keyId:Jm(a),pattern:u};return n&&(c.searcher=tv(u,t)),c}const l={children:[],operator:o[0]};return o.forEach(a=>{const u=s[a];xc(u)&&u.forEach(c=>{l.children.push(i(c))})}),l};return Ib(e)||(e=uS(e)),i(e)}function Mb(e,{ignoreFieldNorm:t=_n.ignoreFieldNorm}){let n=1;return e.forEach(({key:i,norm:s,score:o})=>{const r=i?i.weight:null;n*=Math.pow(o===0&&r?Number.EPSILON:o,(r||1)*(t?1:s))}),n}function dle(e,{ignoreFieldNorm:t=_n.ignoreFieldNorm}){e.forEach(n=>{n.score=Mb(n.matches,{ignoreFieldNorm:t})})}var fle=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){const t=this.heap;for(;e>0;){const n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;const i=t[e];t[e]=t[n],t[n]=i,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let i=e;do{e=i;const s=2*e+1,o=2*e+2;if(s<n&&this.comparator(t[s],t[i])>0&&(i=s),o<n&&this.comparator(t[o],t[i])>0&&(i=o),i!==e){const r=t[e];t[e]=t[i],t[i]=r}}while(i!==e)}};function hle(e){const t=[];return e.matches.forEach(n=>{if(!Rr(n.indices)||!n.indices.length)return;const i={indices:n.indices,value:n.value};n.key&&(i.key=n.key.id),n.idx>-1&&(i.refIndex=n.idx),t.push(i)}),t}function ple(e,t,{includeMatches:n=_n.includeMatches,includeScore:i=_n.includeScore}={}){return e.map(s=>{const{idx:o}=s,r={item:t[o],refIndex:o};return n&&(r.matches=hle(s)),i&&(r.score=s.score),r})}const gle=/[\p{L}\p{M}\p{N}_]+/gu,cS=new WeakSet;function mle(e){cS.has(e)||(cS.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function vle(e){if(typeof e=="function"){let t=!1;return n=>{const i=e(n);if(!t&&(t=!0,!Array.isArray(i)||i.some(s=>typeof s!="string")))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(i)?"array containing non-strings":typeof i}.`);return i}}return e instanceof RegExp?(e.global||mle(e),t=>t.match(e)||[]):t=>t.match(gle)||[]}function Eb({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){const i=vle(n);return{tokenize(s){return e||(s=s.toLowerCase()),t&&(s=s0(s)),i(s)}}}var yle=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Eb({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const n=this.analyzer.tokenize(e),{df:i,fieldCount:s}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const o of n){this.termSearchers.push(new a6(o,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=i.get(o)||0,l=Math.log(1+(s-r+.5)/(r+.5));this.idfWeights.push(l)}this.combineAll=t.tokenMatch==="all",this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,i=0,s=0,o=0;const r=this.combineAll&&!this.useMask?new Set:null;for(let u=0;u<this.termSearchers.length;u++){const c=this.termSearchers[u].searchIn(e),d=this.idfWeights[u];i+=d,c.isMatch&&(s++,n+=d*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?o|=1<<u:r.add(u)))}if(s===0)return{isMatch:!1,score:1};const l=i>0?1-n/i:0,a={isMatch:!0,score:Math.max(.001,l)};return this.options.includeMatches&&t.length&&(a.indices=l6(t)),this.combineAll&&(this.useMask?a.matchedMask=o:a.matchedTerms=r,a.termCount=this.numTerms),a}};function G4(e,t,n,i){const s=i.tokenize(t);if(!s.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);const o=new Set(s);let r=e.docTermFieldHits.get(n);r||(r=new Map,e.docTermFieldHits.set(n,r));for(const l of o)r.set(l,(r.get(l)||0)+1),e.df.set(l,(e.df.get(l)||0)+1)}function l$(e,t,n,i){const{i:s,v:o,$:r}=t;if(o!==void 0){G4(e,o,s,i);return}if(r)for(let l=0;l<n;l++){const a=r[l];if(a)if(Array.isArray(a))for(const u of a)G4(e,u.v,s,i);else G4(e,a.v,s,i)}}function kle(e,t,n){const i={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const s of e)l$(i,s,t,n);return i}function ble(e,t,n,i){l$(e,t,n,i)}function Ale(e,t){const n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);const i=e.docTermFieldHits.get(t);if(i){for(const[s,o]of i){const r=(e.df.get(s)||0)-o;r<=0?e.df.delete(s):e.df.set(s,r)}e.docTermFieldHits.delete(t)}}function dS(e,t){if(t.length===0)return;const n=Array.from(new Set(t)).sort((l,a)=>l-a);for(const l of n)Ale(e,l);const i=l=>{let a=0,u=n.length;for(;a<u;){const c=a+u>>>1;n[c]<l?a=c+1:u=c}return l-a},s=n[0],o=new Map;for(const[l,a]of e.docFieldCount)o.set(l>s?i(l):l,a);e.docFieldCount=o;const r=new Map;for(const[l,a]of e.docTermFieldHits)r.set(l>s?i(l):l,a);e.docTermFieldHits=r}var Sc=class{constructor(e,t,n){this.options={..._n,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Wre(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=tv(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof r6))throw new Error(zre);if(this._myIndex=t||s$(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=Eb({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=kle(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(e){if(!Rr(e))return;this._docs.push(e);const t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){const n=Eb({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});ble(this._invertedIndex,t,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(e=()=>!1){const t=[],n=[];for(let i=0,s=this._docs.length;i<s;i+=1)e(this._docs[i],i)&&(t.push(this._docs[i]),n.push(i));if(n.length){this._invertedIndex&&dS(this._invertedIndex,n);const i=new Set(n);this._docs=this._docs.filter((s,o)=>!i.has(o)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw new Error(wb);this._invertedIndex&&dS(this._invertedIndex,[e]);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){const{limit:n=-1}=t||{},{includeMatches:i,includeScore:s,shouldSort:o,sortFn:r,ignoreFieldNorm:l}=this.options;if(Ho(e)&&!e.trim()){let f=this._docs.map((h,g)=>({item:h,refIndex:g}));return Ym(n)&&n>-1&&(f=f.slice(0,n)),f}const a=o&&Ym(n)&&n>0&&Ho(e),u=r,c=(f,h)=>u(f,h)||f.idx-h.idx;let d;if(a){const f=new fle(n,c);Ho(this._docs[0])?this._searchStringList(e,{heap:f,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:f,ignoreFieldNorm:l}),d=f.extractSorted()}else d=Ho(e)?Ho(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),dle(d,{ignoreFieldNorm:l}),o&&d.sort(Ho(e)?c:u),Ym(n)&&n>-1&&(d=d.slice(0,n));return ple(d,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:o}=this._myIndex,r=t?null:[];return o.forEach(({v:l,i:a,n:u})=>{if(!Rr(l))return;const c=i.searchIn(l);if(c.isMatch){const d={score:c.score,value:l,norm:u,indices:c.indices};s&&(d.matchedMask=c.matchedMask,d.matchedTerms=c.matchedTerms,d.termCount=c.termCount);const f=[d];if(!s||this._coversAllTokens(f)){const h={item:l,idx:a,matches:f};t?(h.score=Mb(h.matches,{ignoreFieldNorm:n}),t.insert(h)):r.push(h)}}}),r}_searchLogical(e){const t=r$(e,this.options),n=this._normalizedKeys(),i=(l,a,u)=>{if(!("children"in l)){const{keyId:h,searcher:g}=l;let m;return h===null?(m=[],n.forEach((y,A)=>{m.push(...this._findMatches({key:y,value:a[A],searcher:g}))})):m=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(a,h),searcher:g}),m&&m.length?[{idx:u,item:a,matches:m}]:[]}const{children:c,operator:d}=l,f=[];for(let h=0,g=c.length;h<g;h+=1){const m=c[h],y=i(m,a,u);if(y.length)f.push(...y);else if(d===nv.AND)return[]}return f},s=this._myIndex.records,o=new Map,r=[];return s.forEach(({$:l,i:a})=>{if(Rr(l)){const u=i(t,l,a);u.length&&(o.has(a)||(o.set(a,{idx:a,item:l,matches:[]}),r.push(o.get(a))),u.forEach(({matches:c})=>{o.get(a).matches.push(...c)}))}}),r}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),s=this.options.useTokenSearch&&this.options.tokenMatch==="all",{records:o}=this._myIndex,r=this._normalizedKeys(),l=t?null:[];return o.forEach(({$:a,i:u})=>{if(!Rr(a))return;const c=[];let d=!1,f=!1;if(r.forEach((h,g)=>{const m=this._findMatches({key:h,value:a[g],searcher:i});m.length?(c.push(...m),m[0].hasInverse&&(f=!0)):d=!0}),!(f&&d)&&c.length&&(!s||this._coversAllTokens(c))){const h={idx:u,item:a,matches:c};t?(h.score=Mb(h.matches,{ignoreFieldNorm:n}),t.insert(h)):l.push(h)}}),l}_findMatches({key:e,value:t,searcher:n}){if(!Rr(t))return[];const i=[];if(xc(t))t.forEach(({v:s,i:o,n:r})=>{if(!Rr(s))return;const l=n.searchIn(s);if(l.isMatch){const a={score:l.score,key:e,value:s,idx:o,norm:r,indices:l.indices,hasInverse:l.hasInverse};l.termCount!==void 0&&(a.matchedMask=l.matchedMask,a.matchedTerms=l.matchedTerms,a.termCount=l.termCount),i.push(a)}});else{const{v:s,n:o}=t,r=n.searchIn(s);if(r.isMatch){const l={score:r.score,key:e,value:s,norm:o,indices:r.indices,hasInverse:r.hasInverse};r.termCount!==void 0&&(l.matchedMask=r.matchedMask,l.matchedTerms=r.matchedTerms,l.termCount=r.termCount),i.push(l)}}return i}_coversAllTokens(e){const t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let i=0;for(let s=0;s<e.length;s++)i|=e[s].matchedMask||0;return i===2**t-1}const n=new Set;for(let i=0;i<e.length;i++){const s=e[i].matchedTerms;if(s)for(const o of s)n.add(o)}return n.size===t}};Sc.version="7.5.0";Sc.createIndex=s$;Sc.parseIndex=Yre;Sc.config=_n;Sc.match=function(e,t,n){if(n&&n.useTokenSearch)throw new Error(Hre);return tv(e,{..._n,...n}).searchIn(t)};Sc.parseQuery=r$;u6(ale);u6(yle);Sc.use=function(...e){e.forEach(t=>u6(t))};var Cle=Sc;const wle=/^[\uD800-\uDBFF]$/,xle=/^[\uDC00-\uDFFF]$/,Sle=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;var fS;(function(e){e[e.Unknown=1e-13]="Unknown",e[e.Rule=1e-12]="Rule",e[e.DICT=2e-8]="DICT",e[e.Surname=1]="Surname",e[e.Custom=1]="Custom"})(fS||(fS={}));const Yr={Normal:1,Surname:10,Custom:100};function Nl(e){var t;return e.length-(((t=e.match(Sle))===null||t===void 0?void 0:t.length)||0)}function Tb(e){const t=[];let n=0;for(;n<e.length;){const i=e[n];wle.test(i)&&xle.test(e[n+1])?(t.push(e.substring(n,n+2)),n+=2):(t.push(i),n+=1)}return t}class a${constructor(){this.NumberDICT=[],this.StringDICT=new Map}get(t){if(t.length>1)return this.StringDICT.get(t);{const n=t.charCodeAt(0);return this.NumberDICT[n]}}set(t,n){if(t.length>1)this.StringDICT.set(t,n);else{const i=t.charCodeAt(0);this.NumberDICT[i]=n}}clear(){this.NumberDICT=[],this.StringDICT.clear()}}const _le=["zh","ch","sh","z","c","s","b","p","m","f","d","t","n","l","g","k","h","j","q","x","r","y","w",""],Ile=["j","q","x"],Mle=["uān","uán","uǎn","uàn","uan","uē","ué","uě","uè","ue","ūn","ún","ǔn","ùn","un","ū","ú","ǔ","ù","u"],Ele={uān:"üān",uán:"üán",uǎn:"üǎn",uàn:"üàn",uan:"üan",uē:"üē",ué:"üé",uě:"üě",uè:"üè",ue:"üe",ūn:"ǖn",ún:"ǘn",ǔn:"ǚn",ùn:"ǜn",un:"ün",ū:"ǖ",ú:"ǘ",ǔ:"ǚ",ù:"ǜ",u:"ü"},Tle=["ia","ian","iang","iao","ie","iu","iong","ua","uai","uan","uang","ue","ui","uo","üan","üe","van","ve"],hS={一:"yì",二:"èr",三:"sān",四:"sì",五:"wǔ",六:"liù",七:"qī",八:"bā",九:"jiǔ",十:"shí",百:"bǎi",千:"qiān",万:"wàn",亿:"yì",单:"dān",两:"liǎng",双:"shuāng",多:"duō",几:"jǐ",十一:"shí yī",零一:"líng yī",第一:"dì yī",一十:"yī shí",一十一:"yī shí yī"},pS={重:"chóng",行:"háng",斗:"dǒu",更:"gēng"};function Lle(){const e={零一:"líng yī","〇一":"líng yī",十一:"shí yī",一十:"yī shí",第一:"dì yī",一十一:"yī shí yī"};for(let t in hS)for(let n in pS){const i=`${t}${n}`,s=`${hS[t]} ${pS[n]}`;e[i]=s}return e}const gS=Lle(),Nle=Object.keys(gS).map(e=>({zh:e,pinyin:gS[e],probability:1e-12,length:Nl(e),priority:Yr.Normal,dict:Symbol("rule")})),u$={不:{bú:[4]},一:{yí:[4],yì:[1,2,3]}},Fle={不:["的","而","之","后","也","还","地"],一:["的","而","之","后","也","还","是"]},Dle=Object.keys(u$),Lb={南宫:"nán gōng",第五:"dì wǔ",万俟:"mò qí",司马:"sī mǎ",上官:"shàng guān",欧阳:"ōu yáng",夏侯:"xià hóu",诸葛:"zhū gě",闻人:"wén rén",东方:"dōng fāng",赫连:"hè lián",皇甫:"huáng fǔ",尉迟:"yù chí",公羊:"gōng yáng",澹台:"tán tái",公冶:"gōng yě",宗政:"zōng zhèng",濮阳:"pú yáng",淳于:"chún yú",太叔:"tài shū",申屠:"shēn tú",公孙:"gōng sūn",仲孙:"zhòng sūn",轩辕:"xuān yuán",令狐:"líng hú",钟离:"zhōng lí",宇文:"yǔ wén",长孙:"zhǎng sūn",慕容:"mù róng",鲜于:"xiān yú",闾丘:"lǘ qiū",司徒:"sī tú",司空:"sī kōng",亓官:"qí guān",司寇:"sī kòu",仉督:"zhǎng dū",子车:"zǐ jū",颛孙:"zhuān sūn",端木:"duān mù",巫马:"wū mǎ",公西:"gōng xī",漆雕:"qī diāo",乐正:"yuè zhèng",壤驷:"rǎng sì",公良:"gōng liáng",拓跋:"tuò bá",夹谷:"jiá gǔ",宰父:"zǎi fǔ",榖梁:"gǔ liáng",段干:"duàn gān",百里:"bǎi lǐ",东郭:"dōng guō",南门:"nán mén",呼延:"hū yán",羊舌:"yáng shé",梁丘:"liáng qiū",左丘:"zuǒ qiū",东门:"dōng mén",西门:"xī mén",句龙:"gōu lóng",毌丘:"guàn qiū",赵:"zhào",钱:"qián",孙:"sūn",李:"lǐ",周:"zhōu",吴:"wú",郑:"zhèng",王:"wáng",冯:"féng",陈:"chén",褚:"chǔ",卫:"wèi",蒋:"jiǎng",沈:"shěn",韩:"hán",杨:"yáng",朱:"zhū",秦:"qín",尤:"yóu",许:"xǔ",何:"hé",吕:"lǚ",施:"shī",张:"zhāng",孔:"kǒng",曹:"cáo",严:"yán",华:"huà",金:"jīn",魏:"wèi",陶:"táo",姜:"jiāng",戚:"qī",谢:"xiè",邹:"zōu",喻:"yù",柏:"bǎi",水:"shuǐ",窦:"dòu",章:"zhāng",云:"yún",苏:"sū",潘:"pān",葛:"gě",奚:"xī",范:"fàn",彭:"péng",郎:"láng",鲁:"lǔ",韦:"wéi",昌:"chāng",马:"mǎ",苗:"miáo",凤:"fèng",花:"huā",方:"fāng",俞:"yú",任:"rén",袁:"yuán",柳:"liǔ",酆:"fēng",鲍:"bào",史:"shǐ",唐:"táng",费:"fèi",廉:"lián",岑:"cén",薛:"xuē",雷:"léi",贺:"hè",倪:"ní",汤:"tāng",滕:"téng",殷:"yīn",罗:"luó",毕:"bì",郝:"hǎo",邬:"wū",安:"ān",常:"cháng",乐:"yuè",于:"yú",时:"shí",傅:"fù",皮:"pí",卞:"biàn",齐:"qí",康:"kāng",伍:"wǔ",余:"yú",元:"yuán",卜:"bǔ",顾:"gù",孟:"mèng",平:"píng",黄:"huáng",和:"hé",穆:"mù",萧:"xiāo",尹:"yǐn",姚:"yáo",邵:"shào",湛:"zhàn",汪:"wāng",祁:"qí",毛:"máo",禹:"yǔ",狄:"dí",米:"mǐ",贝:"bèi",明:"míng",臧:"zāng",计:"jì",伏:"fú",成:"chéng",戴:"dài",谈:"tán",宋:"sòng",茅:"máo",庞:"páng",熊:"xióng",纪:"jǐ",舒:"shū",屈:"qū",项:"xiàng",祝:"zhù",董:"dǒng",梁:"liáng",杜:"dù",阮:"ruǎn",蓝:"lán",闵:"mǐn",席:"xí",季:"jì",麻:"má",强:"qiáng",贾:"jiǎ",路:"lù",娄:"lóu",危:"wēi",江:"jiāng",童:"tóng",颜:"yán",郭:"guō",梅:"méi",盛:"shèng",林:"lín",刁:"diāo",钟:"zhōng",徐:"xú",邱:"qiū",骆:"luò",高:"gāo",夏:"xià",蔡:"cài",田:"tián",樊:"fán",胡:"hú",凌:"líng",霍:"huò",虞:"yú",万:"wàn",支:"zhī",柯:"kē",昝:"zǎn",管:"guǎn",卢:"lú",莫:"mò",经:"jīng",房:"fáng",裘:"qiú",缪:"miào",干:"gān",解:"xiè",应:"yīng",宗:"zōng",丁:"dīng",宣:"xuān",贲:"bēn",邓:"dèng",郁:"yù",单:"shàn",杭:"háng",洪:"hóng",包:"bāo",诸:"zhū",左:"zuǒ",石:"shí",崔:"cuī",吉:"jí",钮:"niǔ",龚:"gōng",程:"chéng",嵇:"jī",邢:"xíng",滑:"huá",裴:"péi",陆:"lù",荣:"róng",翁:"wēng",荀:"xún",羊:"yáng",於:"yū",惠:"huì",甄:"zhēn",曲:"qū",家:"jiā",封:"fēng",芮:"ruì",羿:"yì",储:"chǔ",靳:"jìn",汲:"jí",邴:"bǐng",糜:"mí",松:"sōng",井:"jǐng",段:"duàn",富:"fù",巫:"wū",乌:"wū",焦:"jiāo",巴:"bā",弓:"gōng",牧:"mù",隗:"wěi",山:"shān",谷:"gǔ",车:"chē",侯:"hóu",宓:"mì",蓬:"péng",全:"quán",郗:"xī",班:"bān",仰:"yǎng",秋:"qiū",仲:"zhòng",伊:"yī",宫:"gōng",宁:"nìng",仇:"qiú",栾:"luán",暴:"bào",甘:"gān",钭:"tǒu",厉:"lì",戎:"róng",祖:"zǔ",武:"wǔ",符:"fú",刘:"liú",景:"jǐng",詹:"zhān",束:"shù",龙:"lóng",叶:"yè",幸:"xìng",司:"sī",韶:"sháo",郜:"gào",黎:"lí",蓟:"jì",薄:"bó",印:"yìn",宿:"sù",白:"bái",怀:"huái",蒲:"pú",邰:"tái",从:"cóng",鄂:"è",索:"suǒ",咸:"xián",籍:"jí",赖:"lài",卓:"zhuó",蔺:"lìn",屠:"tú",蒙:"méng",池:"chí",乔:"qiáo",阴:"yīn",鬱:"yù",胥:"xū",能:"nài",苍:"cāng",双:"shuāng",闻:"wén",莘:"shēn",党:"dǎng",翟:"zhái",谭:"tán",贡:"gòng",劳:"láo",逄:"páng",姬:"jī",申:"shēn",扶:"fú",堵:"dǔ",冉:"rǎn",宰:"zǎi",郦:"lì",雍:"yōng",郤:"xì",璩:"qú",桑:"sāng",桂:"guì",濮:"pú",牛:"niú",寿:"shòu",通:"tōng",边:"biān",扈:"hù",燕:"yān",冀:"jì",郏:"jiá",浦:"pǔ",尚:"shàng",农:"nóng",温:"wēn",别:"bié",庄:"zhuāng",晏:"yàn",柴:"chái",瞿:"qú",阎:"yán",充:"chōng",慕:"mù",连:"lián",茹:"rú",习:"xí",宦:"huàn",艾:"ài",鱼:"yú",容:"róng",向:"xiàng",古:"gǔ",易:"yì",慎:"shèn",戈:"gē",廖:"liào",庾:"yǔ",终:"zhōng",暨:"jì",居:"jū",衡:"héng",步:"bù",都:"dū",耿:"gěng",满:"mǎn",弘:"hóng",匡:"kuāng",国:"guó",文:"wén",寇:"kòu",广:"guǎng",禄:"lù",阙:"quē",东:"dōng",欧:"ōu",殳:"shū",沃:"wò",利:"lì",蔚:"wèi",越:"yuè",夔:"kuí",隆:"lóng",师:"shī",巩:"gǒng",厍:"shè",聂:"niè",晁:"cháo",勾:"gōu",敖:"áo",融:"róng",冷:"lěng",訾:"zī",辛:"xīn",阚:"kàn",那:"nā",简:"jiǎn",饶:"ráo",空:"kōng",曾:"zēng",母:"mǔ",沙:"shā",乜:"niè",养:"yǎng",鞠:"jū",须:"xū",丰:"fēng",巢:"cháo",关:"guān",蒯:"kuǎi",相:"xiàng",查:"zhā",后:"hòu",荆:"jīng",红:"hóng",游:"yóu",竺:"zhú",权:"quán",逯:"lù",盖:"gě",益:"yì",桓:"huán",公:"gōng",牟:"móu",哈:"hǎ",言:"yán",福:"fú",肖:"xiāo",区:"ōu",覃:"qín",朴:"piáo",繁:"pó",员:"yùn",句:"gōu",要:"yāo",过:"guō",钻:"zuān",谌:"chén",折:"shé",召:"shào",郄:"qiè",撒:"sǎ",甯:"nìng",六:"lù",啜:"chuài",行:"xíng"},$le=Object.keys(Lb).map(e=>({zh:e,pinyin:Lb[e],probability:1+Nl(e),length:Nl(e),priority:Yr.Surname,dict:Symbol("surname")})),mS={"bǎng páng pāng":["膀"],líng:["〇","伶","凌","刢","囹","坽","夌","姈","婈","孁","岺","彾","掕","昤","朎","柃","棂","櫺","欞","泠","淩","澪","灵","燯","爧","狑","玲","琌","瓴","皊","砱","祾","秢","竛","笭","紷","綾","绫","羐","羚","翎","聆","舲","苓","菱","蓤","蔆","蕶","蛉","衑","裬","詅","跉","軨","輘","酃","醽","鈴","錂","铃","閝","陵","零","霊","霗","霛","霝","靈","駖","魿","鯪","鲮","鴒","鸰","鹷","麢","齡","齢","龄","龗","㥄"],yī:["一","乊","伊","依","医","吚","咿","噫","壱","壹","夁","嫛","嬄","弌","揖","撎","檹","毉","洢","渏","漪","瑿","畩","祎","禕","稦","繄","蛜","衤","譩","辷","郼","醫","銥","铱","鷖","鹥","黟","黳"],"dīng zhēng":["丁"],"kǎo qiǎo yú":["丂"],qī:["七","倛","僛","凄","嘁","墄","娸","悽","慼","慽","戚","捿","柒","桤","桼","棲","榿","欺","沏","淒","漆","紪","緀","萋","褄","諆","迉","郪","鏚","霋","魌","鶈"],shàng:["丄","尙","尚","恦","緔","绱"],xià:["丅","下","乤","圷","夏","夓","懗","梺","疜","睱","罅","鎼","鏬"],hǎn:["丆","喊","浫","罕","豃","㘎"],"wàn mò":["万"],zhàng:["丈","仗","墇","嶂","帐","帳","幛","扙","杖","涱","痮","瘬","瘴","瞕","粀","胀","脹","賬","账","障"],sān:["三","厁","叁","弎","毵","毶","毿","犙","鬖"],"shàng shǎng shang":["上"],"qí jī":["丌","其","奇"],"bù fǒu":["不"],"yǔ yù yú":["与"],miǎn:["丏","偭","免","冕","勉","勔","喕","娩","愐","汅","沔","湎","睌","緬","缅","腼","葂","靦","鮸","𩾃"],gài:["丐","乢","匃","匄","戤","概","槩","槪","溉","漑","瓂","葢","鈣","钙","𬮿"],chǒu:["丑","丒","侴","吜","杽","瞅","矁","醜","魗"],zhuān:["专","叀","嫥","専","專","瑼","甎","砖","磗","磚","蟤","諯","鄟","顓","颛","鱄","䏝"],"qiě jū":["且"],pī:["丕","伓","伾","噼","坯","岯","憵","批","披","炋","狉","狓","砒","磇","礔","礕","秛","秠","耚","豾","邳","鈚","鉟","銔","錃","錍","霹","駓","髬","魾","𬳵"],shì:["世","丗","亊","事","仕","侍","冟","势","勢","卋","呩","嗜","噬","士","奭","嬕","室","市","式","弑","弒","恀","恃","戺","拭","揓","是","昰","枾","柿","栻","澨","烒","煶","眂","眎","眡","睗","示","礻","筮","簭","舐","舓","襫","視","视","觢","試","誓","諡","謚","试","谥","貰","贳","軾","轼","逝","遾","釈","释","釋","鈰","鉃","鉽","铈","飾","餙","餝","饰","鰘","䏡","𬤊"],qiū:["丘","丠","坵","媝","恘","恷","楸","秋","秌","穐","篍","緧","萩","蘒","蚯","蝵","蟗","蠤","趥","邱","鞦","鞧","鰌","鰍","鳅","鶖","鹙","龝"],bǐng:["丙","屛","怲","抦","昞","昺","柄","棅","炳","禀","秉","稟","苪","蛃","邴","鈵","陃","鞆","餅","餠","饼"],yè:["业","亱","僷","墷","夜","嶪","嶫","抴","捙","擛","擪","擫","晔","曄","曅","曗","曳","曵","枼","枽","業","洂","液","澲","烨","燁","爗","璍","皣","瞱","瞸","礏","腋","葉","謁","谒","邺","鄴","鍱","鐷","靥","靨","頁","页","餣","饁","馌","驜","鵺","鸈"],cóng:["丛","从","叢","婃","孮","従","徔","徖","悰","樷","欉","淙","灇","爜","琮","藂","誴","賨","賩","錝"],dōng:["东","倲","冬","咚","埬","岽","崬","徚","昸","東","氡","氭","涷","笗","苳","菄","蝀","鮗","鯟","鶇","鶫","鸫","鼕","𬟽"],sī:["丝","俬","凘","厮","司","咝","嘶","噝","媤","廝","恖","撕","斯","楒","泀","澌","燍","禗","禠","私","糹","絲","緦","纟","缌","罳","蕬","虒","蛳","蜤","螄","蟖","蟴","鉰","銯","鍶","鐁","锶","颸","飔","騦","鷥","鸶","鼶","㟃"],chéng:["丞","呈","城","埕","堘","塍","塖","宬","峸","惩","懲","成","承","挰","掁","揨","枨","棖","橙","檙","洆","溗","澂","珵","珹","畻","程","窚","筬","絾","脭","荿","誠","诚","郕","酲","鋮","铖","騬","鯎"],diū:["丟","丢","銩","铥"],liǎng:["両","两","兩","唡","啢","掚","緉","脼","蜽","裲","魉","魎","𬜯"],yǒu:["丣","卣","友","梄","湵","牖","禉","羑","聈","苃","莠","蜏","酉","銪","铕","黝"],yán:["严","厳","啱","喦","嚴","塩","壛","壧","妍","姸","娫","娮","岩","嵒","嵓","巌","巖","巗","延","揅","昖","楌","檐","櫩","欕","沿","炎","炏","狿","琂","盐","碞","筵","簷","莚","蔅","虤","蜒","言","訁","訮","詽","讠","郔","閆","閻","闫","阎","顏","顔","颜","鹽","麣","𫄧"],bìng:["並","併","倂","傡","垪","摒","栤","病","窉","竝","誁","靐","鮩"],"sàng sāng":["丧"],gǔn:["丨","惃","滚","滾","磙","緄","绲","蓘","蔉","衮","袞","輥","辊","鮌","鯀","鲧"],jiū:["丩","勼","啾","揪","揫","朻","究","糾","纠","萛","赳","阄","鬏","鬮","鳩","鸠"],"gè gě":["个","個","各"],yā:["丫","圧","孲","庘","押","枒","桠","椏","錏","鐚","鴉","鴨","鵶","鸦","鸭"],pán:["丬","媻","幋","槃","洀","瀊","爿","盘","盤","磐","縏","蒰","蟠","蹒","蹣","鎜","鞶"],"zhōng zhòng":["中"],jǐ:["丮","妀","己","戟","挤","掎","撠","擠","橶","泲","犱","脊","虮","蟣","魢","鱾","麂"],jiè:["丯","介","借","唶","堺","屆","届","岕","庎","徣","戒","楐","犗","玠","琾","界","畍","疥","砎","蚧","蛶","衸","褯","誡","诫","鎅","骱","魪"],fēng:["丰","仹","偑","僼","凨","凬","凮","妦","寷","封","峯","峰","崶","枫","楓","檒","沣","沨","渢","灃","烽","犎","猦","琒","疯","瘋","盽","砜","碸","篈","蘴","蜂","蠭","豐","鄷","酆","鋒","鎽","鏠","锋","霻","靊","飌","麷"],"guàn kuàng":["丱"],chuàn:["串","汌","玔","賗","釧","钏"],chǎn:["丳","产","冁","剷","囅","嵼","旵","浐","滻","灛","產","産","簅","蒇","蕆","諂","譂","讇","谄","鏟","铲","閳","闡","阐","骣","𬊤"],lín:["临","冧","壣","崊","嶙","斴","晽","暽","林","潾","瀶","燐","琳","璘","瞵","碄","磷","粦","粼","繗","翷","臨","轔","辚","遴","邻","鄰","鏻","阾","隣","霖","驎","鱗","鳞","麐","麟","𬴊","𬭸"],zhuó:["丵","劅","卓","啄","圴","妰","娺","撯","擆","擢","斫","斮","斱","斲","斵","晫","椓","浊","浞","濁","灼","烵","琸","硺","禚","窡","籗","籱","罬","茁","蠗","蠿","諁","諑","謶","诼","酌","鐲","镯","鵫","鷟","䓬","𬸦"],zhǔ:["丶","主","劯","嘱","囑","宔","帾","拄","渚","濐","煑","煮","燝","瞩","矚","罜","詝","陼","鸀","麈","𬣞"],bā:["丷","仈","八","叭","哵","夿","岜","巴","捌","朳","玐","疤","笆","粑","羓","芭","蚆","豝","釟"],wán:["丸","刓","完","岏","抏","捖","汍","烷","玩","琓","笂","紈","纨","翫","芄","貦","頑","顽"],dān:["丹","勯","匰","単","妉","媅","殚","殫","甔","眈","砃","箪","簞","耼","耽","聃","聸","褝","襌","躭","郸","鄲","酖","頕"],"wèi wéi":["为"],"jǐng dǎn":["丼"],"lì lí":["丽"],jǔ:["举","弆","挙","擧","椇","榉","榘","櫸","欅","矩","筥","聥","舉","莒","蒟","襷","踽","齟","龃"],piě:["丿","苤","鐅","𬭯"],fú:["乀","伏","俘","凫","刜","匐","咈","哹","垘","孚","岪","巿","帗","幅","幞","弗","彿","怫","扶","柫","栿","桴","氟","泭","浮","涪","澓","炥","玸","甶","畉","癁","祓","福","稪","符","箙","紱","紼","絥","綍","绂","绋","罘","罦","翇","艀","芙","芣","苻","茀","茯","菔","葍","虙","蚨","蜉","蝠","袚","袱","襆","襥","諨","豧","踾","輻","辐","郛","鉘","鉜","韍","韨","颫","髴","鮄","鮲","鳧","鳬","鴔","鵩","黻"],"yí jí":["乁"],yì:["乂","义","亄","亦","亿","伇","伿","佾","俋","億","兿","刈","劓","劮","勚","勩","匇","呓","呭","呹","唈","囈","圛","坄","垼","埸","奕","嫕","嬑","寱","屹","峄","嶧","帟","帠","幆","廙","异","弈","弋","役","忆","怈","怿","悒","意","憶","懌","懿","抑","挹","敡","易","晹","曀","曎","杙","枍","棭","榏","槸","檍","歝","殔","殪","殹","毅","浂","浥","浳","湙","溢","潩","澺","瀷","炈","焲","熠","熤","熼","燚","燡","燱","獈","玴","異","疫","痬","瘗","瘞","瘱","癔","益","瞖","穓","竩","篒","縊","繶","繹","绎","缢","義","羿","翊","翌","翳","翼","耴","肄","肊","膉","臆","艗","艺","芅","苅","萟","蓺","薏","藙","藝","蘙","虉","蜴","螠","衪","袣","裔","裛","褹","襼","訲","訳","詍","詣","誼","譯","議","讛","议","译","诣","谊","豙","豛","豷","貖","贀","跇","轶","逸","邑","鄓","醷","釴","鈠","鎰","鐿","镒","镱","阣","隿","霬","饐","駅","驛","驿","骮","鮨","鶂","鶃","鶍","鷁","鷊","鷧","鷾","鸃","鹝","鹢","黓","齸","𬬩","㑊","𫄷","𬟁"],nǎi:["乃","倷","奶","嬭","廼","氖","疓","艿","迺","釢"],wǔ:["乄","五","仵","伍","侮","倵","儛","午","啎","妩","娬","嫵","庑","廡","忤","怃","憮","摀","武","潕","熓","牾","玝","珷","瑦","甒","碔","舞","躌","迕","逜","陚","鵡","鹉","𣲘"],jiǔ:["久","乆","九","乣","奺","杦","汣","灸","玖","紤","舏","酒","镹","韭","韮"],"tuō zhé":["乇","杔","馲"],"me mó ma yāo":["么"],zhī:["之","倁","卮","巵","搘","支","栀","梔","椥","榰","汁","泜","疷","祗","祬","秓","稙","綕","肢","胑","胝","脂","芝","蘵","蜘","衼","隻","鳷","鴲","鼅","𦭜"],"wū wù":["乌"],zhà:["乍","咤","宱","搾","榨","溠","痄","蚱","詐","诈","醡","霅","䃎"],hū:["乎","乯","匢","匫","呼","唿","嘑","垀","寣","幠","忽","惚","昒","歑","泘","淴","滹","烀","苸","虍","虖","謼","軤","轷","雐"],fá:["乏","伐","傠","坺","垡","墢","姂","栰","浌","瞂","笩","筏","罚","罰","罸","藅","閥","阀"],"lè yuè yào lào":["乐","樂"],yín:["乑","吟","噖","嚚","圁","垠","夤","婬","寅","峾","崟","崯","檭","殥","泿","淫","滛","烎","犾","狺","璌","硍","碒","荶","蔩","訔","訚","訡","誾","鄞","鈝","銀","银","霪","鷣","齦"],pīng:["乒","俜","娉","涄","甹","砯","聠","艵","頩"],pāng:["乓","滂","胮","膖","雱","霶"],qiáo:["乔","侨","僑","嫶","憔","桥","槗","樵","橋","櫵","犞","瞧","硚","礄","荍","荞","蕎","藮","譙","趫","鐈","鞒","鞽","顦"],hǔ:["乕","琥","萀","虎","虝","錿","鯱"],guāi:["乖"],"chéng shèng":["乗","乘","娍"],yǐ:["乙","乛","以","倚","偯","嬟","崺","已","庡","扆","攺","敼","旑","旖","檥","矣","礒","笖","舣","艤","苡","苢","蚁","螘","蟻","裿","踦","輢","轙","逘","酏","釔","鈘","鉯","钇","顗","鳦","齮","𫖮","𬺈"],"háo yǐ":["乚"],"niè miē":["乜"],qǐ:["乞","企","启","唘","啓","啔","啟","婍","屺","杞","棨","玘","盀","綺","绮","芑","諬","起","邔","闙"],yě:["也","冶","嘢","埜","壄","漜","野"],xí:["习","喺","媳","嶍","席","椺","檄","漝","習","蓆","袭","襲","覡","觋","謵","趘","郋","鎴","隰","霫","飁","騱","騽","驨","鰼","鳛","𠅤","𫘬"],xiāng:["乡","厢","廂","忀","楿","欀","湘","瓖","稥","箱","緗","缃","膷","芗","萫","葙","薌","襄","郷","鄉","鄊","鄕","鑲","镶","香","驤","骧","鱜","麘","𬙋"],shū:["书","倏","倐","儵","叔","姝","尗","抒","掓","摅","攄","書","枢","梳","樞","殊","殳","毹","毺","淑","瀭","焂","疎","疏","紓","綀","纾","舒","菽","蔬","踈","軗","輸","输","鄃","陎","鮛","鵨"],dǒu:["乧","抖","枓","蚪","鈄","阧","陡"],shǐ:["乨","使","兘","史","始","宩","屎","榁","矢","笶","豕","鉂","駛","驶"],jī:["乩","僟","击","刉","刏","剞","叽","唧","喞","嗘","嘰","圾","基","墼","姬","屐","嵆","嵇","撃","擊","朞","机","枅","樭","機","毄","激","犄","玑","璣","畸","畿","癪","矶","磯","积","積","笄","筓","箕","簊","緁","羁","羇","羈","耭","肌","芨","虀","覉","覊","譏","譤","讥","賫","賷","赍","跻","踑","躋","躸","銈","錤","鐖","鑇","鑙","隮","雞","鞿","韲","飢","饑","饥","魕","鳮","鶏","鶺","鷄","鸄","鸡","齎","齏","齑","𬯀","𫓯","𫓹","𫌀"],náng:["乪","嚢","欜","蠰","饢"],jiā:["乫","佳","傢","加","嘉","抸","枷","梜","毠","泇","浃","浹","犌","猳","珈","痂","笳","糘","耞","腵","葭","袈","豭","貑","跏","迦","鉫","鎵","镓","鴐","麚","𬂩"],jù:["乬","倨","倶","具","剧","劇","勮","埧","埾","壉","姖","屦","屨","岠","巨","巪","怇","惧","愳","懅","懼","拒","拠","昛","歫","洰","澽","炬","烥","犋","秬","窭","窶","簴","粔","耟","聚","虡","蚷","詎","讵","豦","距","踞","躆","遽","邭","醵","鉅","鐻","钜","颶","飓","駏","鮔"],shí:["乭","十","埘","塒","姼","实","実","寔","實","峕","嵵","时","旹","時","榯","湜","溡","炻","祏","竍","蚀","蝕","辻","遈","鉐","飠","饣","鮖","鰣","鲥","鼫","鼭"],mǎo:["乮","冇","卯","峁","戼","昴","泖","笷","蓩","鉚","铆"],mǎi:["买","嘪","荬","蕒","買","鷶"],luàn:["乱","亂","釠"],rǔ:["乳","擩","汝","肗","辱","鄏"],xué:["乴","学","學","峃","嶨","斈","泶","澩","燢","穴","茓","袕","踅","鷽","鸴"],yǎn:["䶮","乵","俨","偃","儼","兖","兗","厣","厴","噞","孍","嵃","巘","巚","弇","愝","戭","扊","抁","掩","揜","曮","椼","檿","沇","渷","演","琰","甗","眼","罨","萒","蝘","衍","褗","躽","遃","郾","隒","顩","魇","魘","鰋","鶠","黡","黤","黬","黭","黶","鼴","鼹","齴","龑","𬸘","𬙂","𪩘"],fǔ:["乶","俌","俛","俯","府","弣","抚","拊","撫","斧","椨","滏","焤","甫","盙","簠","腐","腑","蜅","輔","辅","郙","釜","釡","阝","頫","鬴","黼","㕮","𫖯"],shā:["乷","唦","杀","桬","殺","毮","猀","痧","砂","硰","紗","繺","纱","蔱","裟","鎩","铩","閷","髿","魦","鯊","鯋","鲨"],nǎ:["乸","雫"],qián:["乹","亁","仱","偂","前","墘","媊","岒","拑","掮","榩","橬","歬","潛","潜","濳","灊","箝","葥","虔","軡","鈐","鉗","銭","錢","鎆","钤","钱","钳","靬","騚","騝","鰬","黔","黚"],suǒ:["乺","唢","嗩","所","暛","溑","溹","琐","琑","瑣","索","褨","鎖","鎻","鏁","锁"],yú:["乻","于","亐","伃","余","堣","堬","妤","娛","娯","娱","嬩","崳","嵎","嵛","愚","扵","揄","旟","楡","楰","榆","欤","歈","歟","歶","渔","渝","湡","漁","澞","牏","狳","玗","玙","瑜","璵","盂","睮","窬","竽","籅","羭","腴","臾","舁","舆","艅","茰","萮","萸","蕍","蘛","虞","虶","蝓","螸","衧","褕","覦","觎","諛","謣","谀","踰","輿","轝","逾","邘","酑","鍝","隅","雓","雩","餘","馀","騟","骬","髃","魚","魣","鮽","鯲","鰅","鱼","鷠","鸆","齵"],zhù:["乼","伫","佇","住","坾","墸","壴","嵀","拀","杼","柱","樦","殶","注","炷","疰","眝","祝","祩","竚","筯","箸","篫","簗","紵","紸","纻","羜","翥","苎","莇","蛀","註","貯","贮","跓","軴","鉒","鋳","鑄","铸","馵","駐","驻"],zhě:["乽","者","褶","襵","赭","踷","鍺","锗"],"qián gān":["乾"],"zhì luàn":["乿"],guī:["亀","圭","妫","媯","嫢","嬀","帰","归","摫","椝","槻","槼","櫷","歸","珪","瑰","璝","瓌","皈","瞡","硅","茥","蘬","規","规","邽","郌","閨","闺","騩","鬶","鬹"],"lǐn lìn":["亃"],jué:["亅","决","刔","劂","匷","厥","噊","孒","孓","崛","崫","嶥","彏","憠","憰","戄","抉","挗","掘","攫","桷","橛","橜","欮","氒","決","灍","焳","熦","爑","爴","爵","獗","玃","玦","玨","珏","瑴","瘚","矍","矡","砄","絕","絶","绝","臄","芵","蕝","蕨","虳","蟨","蟩","觖","觮","觼","訣","譎","诀","谲","貜","赽","趉","蹷","躩","鈌","鐍","鐝","钁","镢","鴂","鴃","鷢","𫘝","㵐","𫔎"],"le liǎo":["了"],"gè mā":["亇"],"yǔ yú":["予","懙"],zhēng:["争","佂","凧","姃","媜","峥","崝","崢","征","徰","炡","烝","爭","狰","猙","癥","眐","睁","睜","筝","箏","篜","聇","脀","蒸","踭","鉦","錚","鏳","鬇"],èr:["二","刵","咡","弍","弐","樲","誀","貮","貳","贰","髶"],chù:["亍","傗","儊","怵","憷","搐","斶","歜","珿","琡","矗","竌","絀","绌","臅","触","觸","豖","鄐","閦","黜"],kuī:["亏","刲","岿","巋","盔","窥","窺","聧","虧","闚","顝"],yún:["云","伝","勻","匀","囩","妘","愪","抣","昀","橒","沄","涢","溳","澐","熉","畇","秐","筼","篔","紜","縜","纭","耘","芸","蒷","蕓","郧","鄖","鋆","雲"],hù:["互","冱","嗀","嚛","婟","嫭","嫮","岵","帍","弖","怙","戶","户","戸","戽","扈","护","昈","槴","沍","沪","滬","熩","瓠","祜","笏","簄","粐","綔","蔰","護","豰","鄠","鍙","頀","鱯","鳠","鳸","鸌","鹱"],qí:["亓","剘","埼","岐","岓","崎","嵜","愭","掑","斉","斊","旂","旗","棊","棋","檱","櫀","歧","淇","濝","猉","玂","琦","琪","璂","畦","疧","碁","碕","祁","祈","祺","禥","竒","簯","簱","籏","粸","綥","綦","肵","脐","臍","艩","芪","萁","萕","蕲","藄","蘄","蚑","蚚","蛴","蜝","蜞","螧","蠐","褀","軝","鄿","釮","錡","锜","陭","頎","颀","騎","騏","騹","骐","骑","鬐","鬿","鯕","鰭","鲯","鳍","鵸","鶀","麒","麡","𨙸","𬨂","䓫"],jǐng:["井","儆","刭","剄","坓","宑","幜","憬","暻","殌","汫","汬","澋","璄","璟","璥","穽","肼","蟼","警","阱","頚","頸"],sì:["亖","佀","価","儩","兕","嗣","四","姒","娰","孠","寺","巳","柶","榹","汜","泗","泤","洍","洠","涘","瀃","牭","祀","禩","竢","笥","耜","肂","肆","蕼","覗","貄","釲","鈶","鈻","飤","飼","饲","駟","騃","驷"],suì:["亗","嬘","岁","嵗","旞","檖","歲","歳","澻","煫","燧","璲","砕","碎","祟","禭","穂","穗","穟","繀","繐","繸","襚","誶","譢","谇","賥","邃","鐆","鐩","隧","韢","𫟦","𬭼"],gèn:["亘","亙","揯","搄","茛"],yà:["亚","亜","俹","冴","劜","圔","圠","埡","娅","婭","揠","氩","氬","犽","砑","稏","聐","襾","覀","訝","讶","迓","齾"],"xiē suò":["些"],"qí zhāi":["亝","齊"],"yā yà":["亞","压","垭","壓","铔"],"jí qì":["亟","焏"],tóu:["亠","投","頭","骰"],"wáng wú":["亡"],"kàng háng gāng":["亢"],dà:["亣","眔"],jiāo:["交","僬","娇","嬌","峧","嶕","嶣","憍","椒","浇","澆","焦","礁","穚","簥","胶","膠","膲","茭","茮","蕉","虠","蛟","蟭","跤","轇","郊","鐎","驕","骄","鮫","鲛","鵁","鷦","鷮","鹪","䴔"],hài:["亥","嗐","害","氦","餀","饚","駭","駴","骇"],"hēng pēng":["亨"],mǔ:["亩","姆","峔","拇","母","牡","牳","畂","畆","畒","畝","畞","畮","砪","胟","踇","鉧","𬭁","𧿹"],ye:["亪"],xiǎng:["享","亯","响","想","晑","蚃","蠁","響","飨","餉","饗","饷","鮝","鯗","鱶","鲞"],jīng:["京","亰","兢","坕","坙","婛","惊","旌","旍","晶","橸","泾","涇","猄","睛","秔","稉","粳","精","経","經","綡","聙","腈","茎","荆","荊","菁","葏","驚","鯨","鲸","鶁","鶄","麖","麠","鼱","䴖"],tíng:["亭","停","婷","嵉","庭","廷","楟","榳","筳","聤","莛","葶","蜓","蝏","諪","邒","霆","鼮","䗴"],liàng:["亮","喨","悢","晾","湸","諒","谅","輌","輛","辆","鍄"],"qīn qìng":["亲","親"],bó:["亳","仢","侼","僰","博","帛","愽","懪","挬","搏","欂","浡","淿","渤","煿","牔","狛","瓝","礴","秡","箔","簙","糪","胉","脖","膊","舶","艊","萡","葧","袯","襏","襮","謈","踣","郣","鈸","鉑","鋍","鎛","鑮","钹","铂","镈","餺","馎","馛","馞","駁","駮","驳","髆","鵓","鹁"],yòu:["亴","佑","佦","侑","又","右","哊","唀","囿","姷","宥","峟","幼","狖","祐","蚴","誘","诱","貁","迶","酭","釉","鼬"],xiè:["亵","伳","偞","偰","僁","卨","卸","噧","塮","夑","媟","屑","屧","廨","徢","懈","暬","械","榍","榭","泻","洩","渫","澥","瀉","瀣","灺","炧","炨","燮","爕","獬","祄","禼","糏","紲","絏","絬","繲","纈","绁","缷","薢","薤","蟹","蠏","褉","褻","謝","谢","躞","邂","靾","韰","齂","齘","齛","齥","𬹼","𤫉"],"dǎn dàn":["亶","馾"],lián:["亷","劆","匲","匳","嗹","噒","奁","奩","嫾","帘","廉","怜","憐","涟","漣","濂","濓","瀮","熑","燫","簾","籢","籨","縺","翴","联","聨","聫","聮","聯","臁","莲","蓮","薕","螊","蠊","裢","褳","覝","謰","蹥","连","連","鎌","鐮","镰","鬑","鰱","鲢"],duǒ:["亸","哚","嚲","埵","崜","朵","朶","綞","缍","趓","躱","躲","軃"],"wěi mén":["亹","斖"],rén:["人","亻","仁","壬","忈","忎","朲","秂","芢","魜","鵀"],jí:["亼","亽","伋","佶","偮","卙","即","卽","及","叝","吉","堲","塉","姞","嫉","岌","嵴","嶯","彶","忣","急","愱","戢","揤","极","棘","楫","極","槉","檝","殛","汲","湒","潗","疾","瘠","皍","笈","箿","籍","級","级","膌","艥","蒺","蕀","蕺","蝍","螏","襋","觙","谻","踖","蹐","躤","輯","轚","辑","郆","銡","鍓","鏶","集","雧","霵","鹡","㴔"],wáng:["亾","仼","兦","莣","蚟"],"shén shí":["什"],lè:["仂","叻","忇","氻","泐","玏","砳","簕","艻","阞","韷","餎","鰳","鱳","鳓"],dīng:["仃","叮","帄","玎","疔","盯","耵","虰","靪"],zè:["仄","崱","庂","捑","昃","昗","汄"],"jǐn jìn":["仅","僅","嫤"],"pú pū":["仆"],"chóu qiú":["仇"],zhǎng:["仉","幥","掌","礃"],jīn:["今","堻","巾","惍","斤","津","珒","琻","璡","砛","筋","荕","衿","襟","觔","金","釒","釿","钅","鹶","黅","𬬱"],bīng:["仌","仒","兵","冫","冰","掤","氷","鋲"],réng:["仍","礽","芿","辸","陾"],fó:["仏","坲","梻"],"jīn sǎn":["仐"],lún:["仑","伦","侖","倫","囵","圇","婨","崘","崙","棆","沦","淪","磮","腀","菕","蜦","踚","輪","轮","錀","陯","鯩","𬬭"],cāng:["仓","仺","倉","凔","嵢","沧","滄","濸","獊","舱","艙","苍","蒼","螥","鸧"],"zǎi zǐ zī":["仔"],tā:["他","塌","它","榙","溻","牠","祂","褟","趿","遢","闧"],fù:["付","偩","傅","冨","副","咐","坿","复","妇","婦","媍","嬔","富","復","椱","祔","禣","竎","緮","縛","缚","腹","萯","蕧","蚹","蛗","蝜","蝮","袝","複","覄","覆","訃","詂","讣","負","賦","賻","负","赋","赙","赴","輹","鍑","鍢","阜","附","馥","駙","驸","鮒","鰒","鲋","鳆","㳇"],xiān:["仙","仚","佡","僊","僲","先","嘕","奾","屳","廯","忺","憸","掀","暹","杴","氙","珗","祆","秈","籼","繊","纎","纖","苮","褼","襳","跹","蹮","躚","酰","鍁","锨","韯","韱","馦","鱻","鶱","𬸣"],"tuō chà duó":["仛"],hóng:["仜","吰","垬","妅","娂","宏","宖","弘","彋","汯","泓","洪","浤","渱","潂","玒","玜","竑","竤","篊","粠","紘","紭","綋","纮","翃","翝","耾","苰","荭","葒","葓","谹","谼","鈜","鉷","鋐","閎","闳","霐","霟","鞃","魟","鴻","鸿","黉","黌","𫟹","𬭎"],tóng:["仝","佟","哃","峂","峝","庝","彤","晍","曈","桐","氃","浵","潼","犝","獞","眮","瞳","砼","秱","童","粡","膧","茼","蚒","詷","赨","酮","鉖","鉵","銅","铜","餇","鮦","鲖","𫍣","𦒍"],rèn:["仞","仭","刃","刄","妊","姙","屻","岃","扨","牣","祍","紉","紝","絍","纫","纴","肕","腍","衽","袵","訒","認","认","讱","軔","轫","鈓","靭","靱","韌","韧","飪","餁","饪"],qiān:["仟","佥","僉","千","圲","奷","孯","岍","悭","愆","慳","扦","拪","搴","撁","攐","攑","攓","杄","櫏","汘","汧","牵","牽","竏","签","簽","籖","籤","粁","芊","茾","蚈","褰","諐","謙","谦","谸","迁","遷","釺","鈆","鉛","鏲","钎","阡","韆","顅","騫","骞","鬜","鬝","鵮","鹐"],"gǎn hàn":["仠"],"yì gē":["仡"],dài:["代","侢","叇","垈","埭","岱","帒","带","帯","帶","廗","怠","戴","曃","柋","殆","瀻","玳","瑇","甙","簤","紿","緿","绐","艜","蝳","袋","襶","貣","贷","蹛","軑","軚","軩","轪","迨","霴","靆","鴏","黛","黱"],"lìng líng lǐng":["令"],chào:["仦","耖","觘"],"cháng zhǎng":["仧","兏","長","长"],sā:["仨"],cháng:["仩","偿","償","嘗","嚐","嫦","尝","常","徜","瑺","瓺","甞","肠","腸","膓","苌","萇","镸","鱨","鲿"],yí:["仪","侇","儀","冝","匜","咦","圯","夷","姨","宐","宜","宧","寲","峓","嶬","嶷","巸","彛","彜","彝","彞","怡","恞","扅","暆","栘","椬","椸","沂","洟","熪","瓵","痍","移","簃","籎","羠","胰","萓","蛦","螔","觺","謻","貽","贻","跠","迻","遺","鏔","頉","頤","頥","顊","颐","饴","鮧","鴺"],mù:["仫","凩","募","墓","幕","幙","慔","慕","暮","暯","木","楘","毣","沐","炑","牧","狇","目","睦","穆","艒","苜","莯","蚞","鉬","钼","雮","霂"],"men mén":["们"],fǎn:["仮","反","橎","返"],"chào miǎo":["仯"],"yǎng áng":["仰"],zhòng:["仲","众","堹","妕","媑","狆","眾","祌","筗","茽","蚛","衆","衶","諥"],"pǐ pí":["仳"],wò:["仴","偓","卧","媉","幄","握","楃","沃","渥","濣","瓁","瞃","硪","肟","腛","臥","齷","龌"],jiàn:["件","俴","健","僭","剑","剣","剱","劍","劎","劒","劔","墹","寋","建","徤","擶","旔","楗","毽","洊","涧","澗","牮","珔","瞷","磵","礀","箭","糋","繝","腱","臶","舰","艦","荐","薦","覸","諓","諫","譛","谏","賎","賤","贱","趝","践","踐","踺","轞","鉴","鍳","鍵","鐱","鑑","鑒","鑬","鑳","键","間","餞","饯","𬣡"],"jià jiè jie":["价"],"yǎo fó":["仸"],"rèn rén":["任"],"fèn bīn":["份"],dī:["仾","低","啲","埞","堤","岻","彽","樀","滴","磾","秪","羝","袛","趆","隄","鞮","䃅"],fǎng:["仿","倣","旊","昉","昘","瓬","眆","紡","纺","舫","訪","访","髣","鶭"],zhōng:["伀","刣","妐","幒","彸","忠","柊","汷","泈","炂","盅","籦","終","终","舯","蔠","蜙","螤","螽","衳","衷","蹱","鈡","鍾","鐘","钟","锺","鴤","鼨"],pèi:["伂","佩","姵","帔","斾","旆","沛","浿","珮","蓜","轡","辔","配","霈","馷"],diào:["伄","吊","弔","掉","瘹","盄","窎","窵","竨","訋","釣","鈟","銱","鋽","鑃","钓","铞","雿","魡"],dùn:["伅","潡","炖","燉","盾","砘","碷","踲","逇","遁","遯","鈍","钝"],wěn:["伆","刎","吻","呅","抆","桽","稳","穏","穩","紊","肳","脗"],xǐn:["伈"],kàng:["伉","匟","囥","抗","炕","鈧","钪"],ài:["伌","僾","塧","壒","嫒","嬡","愛","懓","暧","曖","爱","瑷","璦","皧","瞹","砹","硋","碍","礙","薆","譺","賹","鑀","隘","靉","餲","馤","鱫","鴱"],"jì qí":["伎","薺"],"xiū xǔ":["休"],"jìn yín":["伒"],dǎn:["伔","刐","撢","玬","瓭","紞","胆","膽","衴","賧","赕","黕","𬘘"],fū:["伕","呋","娐","孵","尃","怤","懯","敷","旉","玞","砆","稃","筟","糐","綒","肤","膚","荂","荴","衭","趺","跗","邞","鄜","酜","鈇","麩","麬","麱","麸","𫓧"],tǎng:["伖","傥","儻","埫","戃","曭","爣","矘","躺","鎲","钂","镋"],yōu:["优","優","呦","嚘","峳","幽","忧","悠","憂","攸","櫌","滺","瀀","纋","羪","耰","逌","鄾","麀"],huǒ:["伙","夥","火","煷","邩","鈥","钬"],"huì kuài":["会","會","浍","璯"],yǔ:["伛","俁","俣","偊","傴","匬","噳","圄","圉","宇","寙","屿","嶼","庾","挧","敔","斞","楀","瑀","瘐","祤","禹","穥","窳","羽","與","萭","貐","鄅","頨","麌","齬","龉","㺄"],cuì:["伜","啛","忰","悴","毳","淬","焠","疩","瘁","竁","粋","粹","紣","綷","翆","翠","脃","脆","脺","膬","膵","臎","萃","襊","顇"],sǎn:["伞","傘","糤","繖","饊","馓"],wěi:["伟","伪","偉","偽","僞","儰","娓","寪","屗","崣","嶉","徫","愇","捤","暐","梶","洧","浘","渨","炜","煒","猥","玮","瑋","痿","緯","纬","腲","艉","芛","苇","荱","萎","葦","蒍","蔿","蜼","諉","诿","踓","鍡","韑","韙","韡","韪","頠","颹","骩","骪","骫","鮪","鲔","𫇭","𬀩","𬱟"],"chuán zhuàn":["传","傳"],"chē jū":["伡","俥","车"],"jū chē":["車"],yá:["伢","厑","厓","堐","岈","崕","崖","涯","漄","牙","玡","琊","睚","笌","芽","蚜","衙","齖"],qiàn:["伣","俔","倩","儙","刋","壍","嬱","悓","棈","椠","槧","欠","歉","皘","篏","篟","縴","芡","蒨","蔳","輤","𬘬"],shāng:["伤","傷","商","墒","慯","殇","殤","滳","漡","熵","蔏","螪","觞","觴","謪","鬺"],chāng:["伥","倀","娼","昌","椙","淐","猖","琩","菖","裮","錩","锠","閶","阊","鯧","鲳","鼚"],"chen cāng":["伧"],xùn:["伨","侚","卂","噀","巺","巽","徇","愻","殉","殾","汛","潠","狥","蕈","訊","訓","訙","训","讯","迅","迿","逊","遜","鑂","顨","馴","驯"],xìn:["伩","囟","孞","脪","舋","衅","訫","釁","阠","顖"],chǐ:["伬","侈","卶","叺","呎","垑","恥","歯","耻","肔","胣","蚇","裭","褫","豉","鉹","齒","齿"],"xián xuán":["伭"],"nú nǔ":["伮"],"bó bǎi":["伯"],"gū gù":["估"],nǐ:["伱","你","儞","孴","拟","擬","旎","晲","狔","苨","薿","隬"],"nì ní":["伲"],bàn:["伴","办","半","姅","怑","扮","瓣","秚","絆","绊","辦","鉡","靽"],xù:["伵","侐","勖","勗","卹","叙","垿","壻","婿","序","恤","敍","敘","旭","昫","朂","槒","欰","殈","汿","沀","洫","溆","漵","潊","烅","烼","煦","獝","珬","盢","瞁","稸","絮","続","緒","緖","續","绪","续","聓","聟","蓄","藚","訹","賉","酗","頊","鱮","㳚"],zhòu:["伷","僽","冑","呪","咒","咮","宙","昼","晝","甃","皱","皺","籀","籒","籕","粙","紂","縐","纣","绉","胄","荮","葤","詋","酎","駎","驟","骤","㤘","㑇"],shēn:["伸","侁","兟","呻","堔","妽","娠","屾","峷","扟","敒","曑","柛","氠","深","燊","珅","甡","甧","申","眒","砷","穼","籶","籸","糂","紳","绅","罙","罧","葠","蓡","蔘","薓","裑","訷","詵","诜","身","駪","鯓","鯵","鰺","鲹","鵢","𬳽"],qū:["伹","佉","匤","呿","坥","屈","岖","岴","嶇","憈","抾","敺","浀","煀","祛","筁","粬","胠","蛆","蛐","袪","覻","詘","诎","趍","躯","軀","阹","駆","駈","驅","驱","髷","魼","鰸","鱋","鶌","麯","麴","麹","黢","㭕","𪨰","䓛"],"sì cì":["伺"],bēng:["伻","嘣","奟","崩","嵭","閍"],"sì shì":["似"],"jiā qié gā":["伽"],"yǐ chì":["佁"],"diàn tián":["佃","钿"],"hān gàn":["佄"],mài:["佅","劢","勱","卖","唛","売","脈","衇","賣","迈","邁","霡","霢","麥","麦","鿏"],dàn:["但","僤","啖","啗","啿","噉","嚪","帎","憺","旦","柦","氮","沊","泹","淡","狚","疍","癚","禫","窞","腅","萏","蓞","蛋","蜑","觛","訑","誕","诞","贉","霮","餤","饏","駳","髧","鴠","𫢸"],bù:["佈","勏","吥","咘","埗","埠","布","廍","怖","悑","步","歨","歩","瓿","篰","荹","蔀","踄","部","郶","鈈","钚","餢"],bǐ:["佊","俾","匕","夶","妣","彼","朼","柀","比","毞","沘","疕","秕","笔","筆","粃","聛","舭","貏","鄙"],"zhāo shào":["佋"],cǐ:["佌","此","泚","皉","𫚖"],wèi:["位","卫","味","喂","墛","媦","慰","懀","未","渭","煟","熭","犚","猬","畏","緭","罻","胃","苿","菋","藯","蘶","蝟","螱","衛","衞","褽","謂","讆","讏","谓","躗","躛","軎","轊","鏏","霨","餧","餵","饖","魏","鮇","鳚"],zuǒ:["佐","左","繓"],yǎng:["佒","傟","养","坱","岟","慃","懩","攁","氧","氱","炴","痒","癢","礢","紻","蝆","軮","養","駚"],"tǐ tī":["体","體"],zhàn:["佔","偡","嶘","战","戦","戰","栈","桟","棧","湛","站","綻","绽","菚","蘸","虥","虦","譧","轏","驏"],"hé hē hè":["何"],bì:["佖","咇","哔","嗶","坒","堛","壁","奰","妼","婢","嬖","币","幣","幤","庇","庳","廦","弊","弻","弼","彃","必","怭","愊","愎","敝","斃","梐","毕","毖","毙","湢","滗","滭","潷","煏","熚","狴","獘","獙","珌","璧","畀","畢","疪","痹","痺","皕","睤","碧","筚","箅","箆","篦","篳","粊","綼","縪","繴","罼","腷","苾","荜","萆","萞","蓖","蓽","蔽","薜","蜌","袐","襅","襞","襣","觱","詖","诐","貱","贔","赑","跸","蹕","躃","躄","避","邲","鄨","鄪","鉍","鏎","鐴","铋","閇","閉","閟","闭","陛","韠","飶","饆","馝","駜","驆","髀","魓","鮅","鷝","鷩","鼊"],tuó:["佗","坨","堶","岮","槖","橐","沱","砣","砤","碢","紽","詑","跎","酡","阤","陀","陁","駝","駞","騨","驒","驝","驼","鮀","鴕","鸵","鼉","鼍","鼧","𬶍"],shé:["佘","舌","虵","蛥"],"yì dié":["佚","昳","泆","軼"],"fó fú bì bó":["佛"],"zuò zuō":["作"],gōu:["佝","沟","溝","痀","篝","簼","緱","缑","袧","褠","鈎","鉤","钩","鞲","韝"],nìng:["佞","侫","倿","寕","泞","澝","濘"],qú:["佢","劬","戵","斪","欋","欔","氍","淭","灈","爠","璖","璩","癯","磲","籧","絇","胊","臞","菃","葋","蕖","蘧","蟝","蠷","蠼","衐","衢","躣","軥","鑺","鴝","鸜","鸲","鼩"],"yōng yòng":["佣"],wǎ:["佤","咓","砙","邷"],kǎ:["佧","垰","胩","裃","鉲"],bāo:["佨","勹","包","孢","煲","笣","胞","苞","蕔","裦","褒","襃","闁","齙","龅"],"huái huí":["佪"],"gé hè":["佫"],lǎo:["佬","咾","恅","栳","狫","珯","硓","老","耂","荖","蛯","轑","銠","铑","鮱"],xiáng:["佭","庠","栙","祥","絴","翔","詳","跭"],gé:["佮","匌","呄","嗝","塥","愅","挌","搿","槅","櫊","滆","膈","臵","茖","觡","諽","輵","轕","閣","阁","隔","鞷","韐","韚","騔","骼","鮯"],yáng:["佯","劷","垟","崸","徉","扬","揚","敭","旸","昜","暘","杨","楊","洋","炀","珜","疡","瘍","眻","蛘","諹","輰","鍚","钖","阦","阳","陽","霷","颺","飏","鰑","鴹","鸉"],bǎi:["佰","捭","摆","擺","栢","百","竡","粨","襬"],fǎ:["佱","峜","法","灋","砝","鍅"],mǐng:["佲","凕","姳","慏","酩"],"èr nài":["佴"],hěn:["佷","很","狠","詪","𬣳"],huó:["佸","活"],guǐ:["佹","匦","匭","厬","垝","姽","宄","庋","庪","恑","晷","湀","癸","祪","簋","蛫","蟡","觤","詭","诡","軌","轨","陒","鬼"],quán:["佺","全","啳","埢","姾","峑","巏","拳","搼","权","楾","権","權","泉","洤","湶","牷","犈","瑔","痊","硂","筌","縓","荃","葲","蜷","蠸","觠","詮","诠","跧","踡","輇","辁","醛","銓","铨","闎","顴","颧","駩","騡","鬈","鰁","鳈","齤"],tiāo:["佻","庣","旫","祧","聎"],jiǎo:["佼","儌","孂","挢","搅","撟","撹","攪","敫","敽","敿","晈","暞","曒","灚","燞","狡","璬","皎","皦","絞","纐","绞","腳","臫","蟜","譑","賋","踋","鉸","铰","餃","饺","鱎","龣"],cì:["佽","刾","庛","朿","栨","次","絘","茦","莿","蛓","螆","賜","赐"],xíng:["侀","刑","哘","型","娙","形","洐","硎","蛵","邢","郉","鈃","鉶","銒","钘","铏","陉","陘","餳","𫰛"],tuō:["侂","咃","咜","圫","托","拕","拖","汑","脫","脱","莌","袥","託","讬","飥","饦","魠","鮵"],kǎn:["侃","偘","冚","坎","惂","砍","莰","輡","轗","顑"],zhí:["侄","値","值","埴","執","姪","嬂","戠","执","摭","植","樴","淔","漐","直","禃","絷","縶","聀","职","職","膱","蟙","跖","踯","蹠","躑","軄","釞","馽"],gāi:["侅","垓","姟","峐","晐","畡","祴","荄","該","该","豥","賅","賌","赅","陔"],lái:["來","俫","倈","崃","崍","庲","来","梾","棶","涞","淶","猍","琜","筙","箂","莱","萊","逨","郲","錸","铼","騋","鯠","鶆","麳"],kuǎ:["侉","咵","垮","銙"],gōng:["侊","公","功","匑","匔","塨","宫","宮","工","幊","弓","恭","攻","杛","碽","糼","糿","肱","觥","觵","躬","躳","髸","龔","龚","䢼"],lì:["例","俐","俪","傈","儮","儷","凓","利","力","励","勵","历","厉","厤","厯","厲","叓","吏","呖","唎","唳","嚦","囇","坜","塛","壢","娳","婯","屴","岦","悧","悷","慄","戾","搮","暦","曆","曞","朸","枥","栃","栗","栛","檪","櫔","櫪","欐","歴","歷","沥","沴","涖","溧","濿","瀝","爏","犡","猁","珕","瑮","瓅","瓑","瓥","疬","痢","癧","盭","睙","砅","砺","砾","磿","礪","礫","礰","禲","秝","立","笠","篥","粒","粝","糲","脷","苈","茘","荔","莅","莉","蒚","蒞","藶","蚸","蛎","蛠","蜧","蝷","蠇","蠣","詈","讈","赲","轢","轣","轹","酈","鉝","隶","隷","雳","靂","靋","鬁","鳨","鴗","鷅","麜","𫵷","𬍛"],yīn:["侌","凐","喑","噾","囙","因","垔","堙","姻","婣","愔","慇","栶","氤","洇","溵","濦","瘖","禋","秵","筃","絪","緸","茵","蒑","蔭","裀","諲","銦","铟","闉","阥","阴","陰","陻","隂","霒","霠","鞇","音","韾","駰","骃","齗","𬘡","𬤇","𬮱"],mǐ:["侎","孊","弭","敉","洣","渳","灖","米","粎","羋","脒","芈","葞","蔝","銤"],zhū:["侏","株","槠","橥","櫧","櫫","洙","潴","瀦","猪","珠","硃","秼","絑","茱","蕏","蛛","蝫","蠩","袾","誅","諸","诛","诸","豬","跦","邾","銖","铢","駯","鮢","鯺","鴸","鼄"],ān:["侒","偣","媕","安","峖","庵","桉","氨","盦","盫","腤","菴","萻","葊","蓭","誝","諳","谙","鞌","鞍","韽","馣","鮟","鵪","鶕","鹌","𩽾"],lù:["侓","僇","勎","勠","圥","坴","塶","娽","峍","廘","彔","录","戮","摝","椂","樚","淕","淥","渌","漉","潞","琭","璐","甪","盝","睩","硉","祿","禄","稑","穋","箓","簏","簬","簵","簶","籙","粶","蔍","蕗","虂","螰","賂","赂","趢","路","踛","蹗","輅","轆","辂","辘","逯","醁","錄","録","錴","鏴","陸","騄","騼","鯥","鴼","鵦","鵱","鷺","鹭","鹿","麓","𫘧"],móu:["侔","劺","恈","眸","蛑","謀","谋","踎","鍪","鴾","麰"],ér:["侕","儿","児","兒","峏","栭","洏","粫","而","胹","荋","袻","輀","轜","陑","隭","髵","鮞","鲕","鴯","鸸"],"dòng tǒng tóng":["侗"],chà:["侘","奼","姹","岔","汊","詫","诧"],chì:["侙","傺","勅","勑","叱","啻","彳","恜","慗","憏","懘","抶","敕","斥","杘","湁","灻","炽","烾","熾","痓","痸","瘛","翄","翅","翤","翨","腟","赤","趩","遫","鉓","雴","飭","饬","鶒","鷘"],"gòng gōng":["供","共"],zhōu:["侜","周","喌","州","徟","洲","淍","炿","烐","珘","矪","舟","謅","譸","诌","賙","赒","輈","輖","辀","週","郮","銂","霌","駲","騆","鵃","鸼"],rú:["侞","儒","嚅","如","嬬","孺","帤","曘","桇","渪","濡","筎","茹","蕠","薷","蝡","蠕","袽","襦","邚","醹","銣","铷","顬","颥","鱬","鴑","鴽"],"jiàn cún":["侟"],xiá:["侠","俠","匣","峡","峽","敮","暇","柙","炠","烚","狎","狭","狹","珨","瑕","硖","硤","碬","祫","筪","縖","翈","舝","舺","蕸","赮","轄","辖","遐","鍜","鎋","陜","陿","霞","騢","魻","鶷","黠"],lǚ:["侣","侶","儢","吕","呂","屡","屢","履","挔","捛","旅","梠","焒","祣","稆","穭","絽","縷","缕","膂","膐","褛","褸","郘","鋁","铝"],ta:["侤"],"jiǎo yáo":["侥","僥","徺"],zhēn:["侦","偵","寊","帧","帪","幀","搸","斟","桢","楨","榛","樼","殝","浈","湞","潧","澵","獉","珍","珎","瑧","甄","眞","真","砧","碪","祯","禎","禛","箴","胗","臻","葴","蒖","蓁","薽","貞","贞","轃","遉","酙","針","鉁","錱","鍼","针","鱵"],"cè zè zhāi":["侧","側"],kuài:["侩","儈","凷","哙","噲","圦","块","塊","巜","廥","快","旝","欳","狯","獪","筷","糩","脍","膾","郐","鄶","鱠","鲙"],chái:["侪","儕","喍","柴","犲","祡","豺"],nóng:["侬","儂","农","哝","噥","檂","欁","浓","濃","燶","禯","秾","穠","脓","膿","蕽","襛","譨","農","辳","醲","鬞","𬪩"],jǐn:["侭","儘","卺","厪","巹","槿","漌","瑾","紧","緊","菫","蓳","謹","谨","錦","锦","饉","馑"],"hóu hòu":["侯","矦"],jiǒng:["侰","僒","冏","囧","泂","澃","炯","烱","煚","煛","熲","燛","窘","綗","褧","迥","逈","顈","颎","䌹"],"chěng tǐng":["侱"],"zhèn zhēn":["侲","揕"],zuò:["侳","做","唑","坐","岝","岞","座","祚","糳","胙","葃","葄","蓙","袏","阼"],qīn:["侵","兓","媇","嵚","嶔","欽","衾","誛","钦","顉","駸","骎","鮼"],jú:["侷","啹","婅","局","巈","椈","橘","泦","淗","湨","焗","犑","狊","粷","菊","蘜","趜","跼","蹫","輂","郹","閰","駶","驧","鵙","鵴","鶪","鼰","鼳","䴗"],"shù dōu":["侸"],tǐng:["侹","圢","娗","挺","涏","烶","珽","脡","艇","誔","頲","颋"],shèn:["侺","愼","慎","昚","涁","渗","滲","瘆","瘮","眘","祳","肾","胂","脤","腎","蜃","蜄","鋠"],"tuì tuó":["侻"],nán:["侽","喃","娚","抩","暔","枏","柟","楠","男","畘","莮","萳","遖"],xiāo:["侾","哓","嘵","嚻","囂","婋","宯","宵","庨","彇","揱","枭","枵","梟","櫹","歊","毊","消","潇","瀟","灱","灲","烋","焇","猇","獢","痚","痟","硝","硣","窙","箫","簘","簫","綃","绡","翛","膮","萧","蕭","虈","虓","蟂","蟏","蟰","蠨","踃","逍","銷","销","霄","颵","驍","骁","髇","髐","魈","鴞","鴵","鷍","鸮"],"biàn pián":["便","緶","缏"],tuǐ:["俀","腿","蹆","骽"],xì:["係","匸","卌","呬","墍","屃","屓","屭","忥","怬","恄","椞","潝","潟","澙","熂","犔","磶","禊","細","綌","縘","细","绤","舃","舄","蕮","虩","衋","覤","赩","趇","郤","釳","阋","隙","隟","霼","餼","饩","鬩","黖"],cù:["促","媨","憱","猝","瘄","瘯","簇","縬","脨","蔟","誎","趗","踧","踿","蹙","蹴","蹵","醋","顣","鼀"],é:["俄","囮","娥","峉","峨","峩","涐","珴","皒","睋","磀","莪","訛","誐","譌","讹","迗","鈋","鋨","锇","頟","額","额","魤","鵝","鵞","鹅"],qiú:["俅","叴","唒","囚","崷","巯","巰","扏","梂","殏","毬","求","汓","泅","浗","湭","煪","犰","玌","球","璆","皳","盚","紌","絿","肍","芁","莍","虬","虯","蛷","裘","觓","觩","訄","訅","賕","赇","逎","逑","遒","酋","釚","釻","銶","頄","鮂","鯄","鰽","鼽","𨱇"],xú:["俆","徐","禑"],"guàng kuāng":["俇"],kù:["俈","喾","嚳","库","庫","廤","瘔","絝","绔","袴","裤","褲","酷"],wù:["俉","务","務","勿","卼","坞","塢","奦","婺","寤","屼","岉","嵨","忢","悞","悟","悮","戊","扤","晤","杌","溩","焐","熃","物","痦","矹","窹","粅","蘁","誤","误","鋈","阢","隖","雾","霚","霧","靰","騖","骛","鶩","鹜","鼿","齀"],jùn:["俊","儁","呁","埈","寯","峻","懏","捃","攟","晙","棞","燇","珺","畯","竣","箟","蜠","賐","郡","陖","餕","馂","駿","骏","鵔","鵕","鵘","䐃"],liáng:["俍","墚","梁","椋","樑","粮","粱","糧","良","輬","辌","𫟅"],zǔ:["俎","唨","爼","祖","組","组","詛","诅","鎺","阻","靻"],"qiào xiào":["俏"],yǒng:["俑","勇","勈","咏","埇","塎","嵱","彮","怺","恿","悀","惥","愑","愹","慂","柡","栐","永","泳","湧","甬","蛹","詠","踊","踴","鯒","鲬"],hùn:["俒","倱","圂","尡","慁","掍","溷","焝","睴","觨","諢","诨"],jìng:["俓","傹","境","妌","婙","婧","弪","弳","径","徑","敬","曔","桱","梷","浄","瀞","獍","痉","痙","竞","竟","竫","競","竸","胫","脛","莖","誩","踁","迳","逕","鏡","镜","靖","静","靜","鵛"],sàn:["俕","閐"],pěi:["俖"],sú:["俗"],xī:["俙","僖","兮","凞","卥","厀","吸","唏","唽","嘻","噏","嚱","夕","奚","嬆","嬉","屖","嵠","巇","希","徆","徯","息","悉","悕","惁","惜","昔","晞","晰","晳","曦","析","桸","榽","樨","橀","欷","氥","汐","浠","淅","渓","溪","烯","焁","焈","焟","熄","熈","熙","熹","熺","熻","燨","爔","牺","犀","犠","犧","琋","瘜","皙","睎","瞦","矽","硒","磎","礂","稀","穸","窸","粞","糦","緆","繥","羲","翕","翖","肸","肹","膝","舾","莃","菥","蒠","蜥","螅","蟋","蠵","西","觹","觽","觿","譆","谿","豀","豨","豯","貕","赥","邜","鄎","酅","醯","釸","錫","鏭","鐊","鑴","锡","隵","餏","饎","饻","鯑","鵗","鸂","鼷"],lǐ:["俚","娌","峢","峲","李","欚","浬","澧","理","礼","禮","粴","裏","裡","豊","逦","邐","醴","鋰","锂","鯉","鱧","鱱","鲤","鳢"],bǎo:["保","堢","媬","宝","寚","寳","寶","珤","緥","葆","藵","褓","賲","靌","飹","飽","饱","駂","鳵","鴇","鸨"],"yú shù yù":["俞"],"sì qí":["俟"],"xìn shēn":["信"],xiū:["俢","修","咻","庥","樇","烌","羞","脙","脩","臹","貅","銝","鎀","飍","饈","馐","髤","髹","鮴","鱃","鵂","鸺","䗛"],dì:["俤","偙","僀","埊","墑","墬","娣","帝","怟","旳","梊","焍","玓","甋","眱","睇","碲","祶","禘","第","締","缔","腣","菂","蒂","蔕","蝃","蝭","螮","諦","谛","踶","递","逓","遞","遰","鉪","𤧛","䗖"],chóu:["俦","儔","嬦","惆","愁","懤","栦","燽","畴","疇","皗","稠","筹","籌","絒","綢","绸","菗","詶","讎","讐","踌","躊","酧","酬","醻","雔","雠","雦"],zhì:["俧","偫","儨","制","劕","垁","娡","寘","帙","帜","幟","庢","庤","廌","彘","徏","徝","志","忮","懥","懫","挃","挚","掷","摯","擲","旘","晊","智","栉","桎","梽","櫍","櫛","治","洷","滍","滞","滯","潌","瀄","炙","熫","狾","猘","璏","瓆","痔","痣","礩","祑","秩","秷","稚","稺","穉","窒","紩","緻","置","翐","膣","至","致","芖","蛭","袟","袠","製","覟","觗","觯","觶","誌","豑","豒","貭","質","贄","质","贽","跱","踬","躓","輊","轾","郅","銍","鋕","鑕","铚","锧","陟","隲","雉","駤","騭","騺","驇","骘","鯯","鴙","鷙","鸷","𬃊"],"liǎ liǎng":["俩"],jiǎn:["俭","倹","儉","减","剪","堿","弿","彅","戩","戬","拣","挸","捡","揀","撿","枧","柬","梘","检","検","檢","減","湕","瀽","瑐","睑","瞼","硷","碱","礆","笕","筧","简","簡","絸","繭","翦","茧","藆","蠒","裥","襇","襉","襺","詃","謇","謭","譾","谫","趼","蹇","鐗","鬋","鰎","鹸","鹻","鹼"],huò:["俰","咟","嚯","嚿","奯","彠","惑","或","擭","旤","曤","檴","沎","湱","瀖","獲","癨","眓","矐","祸","禍","穫","窢","耯","臛","艧","获","蒦","藿","蠖","謋","貨","货","鍃","鑊","镬","雘","霍","靃","韄","㸌"],"jù jū":["俱","据","鋸","锯"],xiào:["俲","傚","効","咲","哮","啸","嘋","嘨","嘯","孝","效","斅","斆","歗","涍","熽","笑","詨","誟"],pái:["俳","徘","牌","犤","猅","簰","簲","輫"],biào:["俵","鰾","鳔"],"chù tì":["俶"],fèi:["俷","剕","厞","吠","屝","废","廃","廢","昲","曊","櫠","沸","濷","狒","癈","肺","萉","費","费","鐨","镄","陫","靅","鼣"],fèng:["俸","凤","奉","湗","焨","煈","賵","赗","鳯","鳳","鴌"],ǎn:["俺","唵","埯","揞","罯","銨","铵"],bèi:["俻","倍","偝","偹","備","僃","备","悖","惫","愂","憊","昁","梖","焙","牬","犕","狈","狽","珼","琲","碚","禙","糒","苝","蓓","蛽","褙","貝","贝","軰","輩","辈","邶","郥","鄁","鋇","鐾","钡","鞁","鞴","𬇙"],yù:["俼","儥","喅","喩","喻","域","堉","妪","嫗","寓","峪","嶎","庽","彧","御","愈","慾","戫","昱","棛","棜","棫","櫲","欎","欝","欲","毓","浴","淯","滪","潏","澦","灪","焴","煜","燏","燠","爩","狱","獄","玉","琙","瘉","癒","砡","硢","硲","礇","礖","礜","禦","秗","稢","稶","篽","籞","籲","粖","緎","罭","聿","肀","艈","芋","芌","茟","蒮","蓣","蓹","蕷","蘌","蜟","蜮","袬","裕","誉","諭","譽","谕","豫","軉","輍","逳","遇","遹","郁","醧","鈺","鋊","錥","鐭","钰","閾","阈","雤","霱","預","预","飫","饇","饫","馭","驈","驭","鬰","鬱","鬻","魊","鱊","鳿","鴥","鴧","鴪","鵒","鷸","鸒","鹆","鹬"],xīn:["俽","噺","妡","嬜","廞","心","忄","忻","惞","新","昕","杺","欣","歆","炘","盺","薪","訢","辛","邤","鈊","鋅","鑫","锌","馨","馫","䜣","𫷷"],"hǔ chí":["俿"],jiù:["倃","僦","匓","匛","匶","厩","咎","就","廄","廏","廐","慦","捄","救","旧","柩","柾","桕","欍","殧","疚","臼","舅","舊","鯦","鷲","鹫","麔","齨","㠇"],yáo:["倄","傜","嗂","垚","堯","姚","媱","尧","尭","峣","嶢","嶤","徭","揺","搖","摇","摿","暚","榣","烑","爻","猺","珧","瑤","瑶","磘","窑","窯","窰","肴","蘨","謠","謡","谣","軺","轺","遙","遥","邎","顤","颻","飖","餆","餚","鰩","鱙","鳐"],"cuì zú":["倅"],"liǎng liǎ":["倆"],wǎn:["倇","唍","婉","惋","挽","晚","晥","晩","晼","梚","椀","琬","畹","皖","盌","碗","綩","綰","绾","脘","萖","踠","輓","鋔"],zǒng:["倊","偬","傯","嵸","总","惣","捴","搃","摠","燪","総","緫","縂","總","蓗"],guān:["倌","关","官","棺","瘝","癏","窤","蒄","関","闗","關","鰥","鱞","鳏"],tiǎn:["倎","唺","忝","悿","晪","殄","淟","睓","腆","舔","覥","觍","賟","錪","餂"],mén:["們","扪","捫","璊","菛","虋","鍆","钔","門","閅","门","𫞩"],"dǎo dào":["倒"],"tán tàn":["倓","埮"],"juè jué":["倔"],chuí:["倕","垂","埀","捶","搥","桘","棰","槌","箠","腄","菙","錘","鎚","锤","陲","顀"],xìng:["倖","姓","婞","嬹","幸","性","悻","杏","涬","緈","臖","荇","莕","葕"],péng:["倗","傰","塜","塳","弸","憉","捀","朋","棚","椖","樥","硼","稝","竼","篷","纄","膨","芃","蓬","蘕","蟚","蟛","袶","輣","錋","鑝","韸","韼","騯","髼","鬅","鬔","鵬","鹏"],"tǎng cháng":["倘"],hòu:["候","厚","后","垕","堠","後","洉","茩","豞","逅","郈","鮜","鱟","鲎","鲘"],tì:["倜","剃","嚏","嚔","屉","屜","悌","悐","惕","惖","戻","掦","替","朑","歒","殢","涕","瓋","笹","籊","薙","褅","逖","逷","髰","鬀","鬄"],gàn:["倝","凎","幹","榦","檊","淦","灨","盰","紺","绀","詌","贑","赣","骭","㽏"],"liàng jìng":["倞","靓"],suī:["倠","哸","夊","滖","濉","眭","睢","芕","荽","荾","虽","雖","鞖"],"chàng chāng":["倡"],jié:["倢","偼","傑","刦","刧","刼","劫","劼","卩","卪","婕","媫","孑","岊","崨","嵥","嶻","巀","幯","截","捷","掶","擮","昅","杢","杰","桀","桝","楬","楶","榤","洁","滐","潔","狤","睫","礍","竭","節","羯","莭","蓵","蛣","蜐","蠘","蠞","蠽","衱","袺","訐","詰","誱","讦","踕","迼","鉣","鍻","镼","頡","鮚","鲒","㛃"],"kǒng kōng":["倥"],juàn:["倦","劵","奆","慻","桊","淃","狷","獧","眷","睊","睠","絭","絹","绢","罥","羂","腃","蔨","鄄","餋"],zōng:["倧","堫","宗","嵏","嵕","惾","朡","棕","椶","熧","猣","磫","緃","翪","腙","葼","蝬","豵","踨","踪","蹤","鍐","鑁","騌","騣","骔","鬃","鬉","鬷","鯮","鯼"],ní:["倪","坭","埿","尼","屔","怩","淣","猊","籾","聣","蚭","蜺","觬","貎","跜","輗","郳","鈮","铌","霓","馜","鯢","鲵","麑","齯","𫐐","𫠜"],zhuō:["倬","拙","捉","桌","梲","棁","棳","槕","涿","窧","鐯","䦃"],"wō wēi":["倭"],luǒ:["倮","剆","曪","瘰","癳","臝","蓏","蠃","裸","躶"],sōng:["倯","凇","娀","崧","嵩","庺","憽","松","枀","枩","柗","梥","檧","淞","濍","硹","菘","鬆"],lèng:["倰","堎","愣","睖","踜"],zì:["倳","剚","字","恣","渍","漬","牸","眥","眦","胔","胾","自","茡","荢"],bèn:["倴","坌","捹","撪","渀","笨","逩"],cǎi:["倸","啋","婇","彩","採","棌","毝","睬","綵","跴","踩"],zhài:["债","債","寨","瘵","砦"],yē:["倻","吔","噎","擨","暍","椰","歋","潱","蠮"],shà:["倽","唼","喢","歃","箑","翜","翣","萐","閯","霎"],qīng:["倾","傾","卿","圊","寈","氢","氫","淸","清","蜻","軽","輕","轻","郬","錆","鑋","靑","青","鯖"],yīng:["偀","嘤","噟","嚶","婴","媖","嫈","嬰","孆","孾","愥","撄","攖","朠","桜","樱","櫻","渶","煐","珱","瑛","璎","瓔","甇","甖","碤","礯","緓","纓","绬","缨","罂","罃","罌","膺","英","莺","蘡","蝧","蠳","褮","譻","賏","軈","鑍","锳","霙","韺","鴬","鶑","鶧","鶯","鷪","鷹","鸎","鸚","鹦","鹰","䓨"],"chēng chèn":["偁","爯"],ruǎn:["偄","朊","瑌","瓀","碝","礝","腝","軟","輭","软","阮"],"zhòng tóng":["偅"],chǔn:["偆","惷","睶","萶","蠢","賰"],"jiǎ jià":["假"],"jì jié":["偈"],"bǐng bìng":["偋"],ruò:["偌","叒","嵶","弱","楉","焫","爇","箬","篛","蒻","鄀","鰙","鰯","鶸"],tí:["偍","厗","啼","嗁","崹","漽","瑅","睼","禵","稊","緹","缇","罤","蕛","褆","謕","趧","蹄","蹏","醍","鍗","題","题","騠","鮷","鯷","鳀","鵜","鷤","鹈","𫘨"],wēi:["偎","危","喴","威","媙","嶶","巍","微","愄","揋","揻","椳","楲","溦","烓","煨","燰","癓","縅","葨","葳","薇","蜲","蝛","覣","詴","逶","隇","隈","霺","鰃","鰄","鳂"],piān:["偏","囨","媥","楄","犏","篇","翩","鍂"],yàn:["偐","厌","厭","唁","喭","嚈","嚥","堰","妟","姲","嬊","嬿","宴","彥","彦","敥","晏","暥","曕","曣","滟","灎","灔","灧","灩","焔","焰","焱","熖","燄","牪","猒","砚","硯","艳","艶","艷","覎","觃","觾","諺","讌","讞","谚","谳","豓","豔","贋","贗","赝","軅","酀","酽","醼","釅","雁","餍","饜","騐","験","騴","驗","驠","验","鬳","鳫","鴈","鴳","鷃","鷰","齞"],"tǎng dàng":["偒"],è:["偔","匎","卾","厄","呝","咢","噩","垩","堊","堮","岋","崿","廅","悪","愕","戹","扼","搤","搹","擜","櫮","歞","歺","湂","琧","砈","砐","硆","腭","苊","萼","蕚","蚅","蝁","覨","諤","讍","谔","豟","軛","軶","轭","遌","遏","遻","鄂","鈪","鍔","鑩","锷","阨","阸","頞","顎","颚","餓","餩","饿","鰐","鰪","鱷","鳄","鶚","鹗","齃","齶","𫫇","𥔲"],xié:["偕","勰","协","協","嗋","垥","奊","恊","愶","拹","携","撷","擕","擷","攜","斜","旪","熁","燲","綊","緳","縀","缬","翓","胁","脅","脇","脋","膎","蝢","衺","襭","諧","讗","谐","鞋","鞵","龤","㙦"],chě:["偖","扯","撦"],shěng:["偗","渻","眚"],chā:["偛","嗏","扠","挿","插","揷","疀","臿","艖","銟","鍤","锸","餷"],huáng:["偟","凰","喤","堭","墴","媓","崲","徨","惶","楻","湟","煌","獚","瑝","璜","癀","皇","磺","穔","篁","簧","艎","葟","蝗","蟥","諻","趪","遑","鍠","鐄","锽","隍","韹","餭","騜","鰉","鱑","鳇","鷬","黃","黄","𨱑"],yǎo:["偠","咬","婹","宎","岆","杳","柼","榚","溔","狕","窅","窈","舀","苭","闄","騕","鷕","齩"],"chǒu qiào":["偢"],yóu:["偤","尤","庮","怣","沋","油","浟","游","犹","猶","猷","由","疣","秞","肬","莜","莸","蕕","蚰","蝣","訧","輏","輶","逰","遊","邮","郵","鈾","铀","駀","魷","鮋","鱿","鲉","𬨎"],xū:["偦","墟","媭","嬃","楈","欨","歔","燸","疞","盱","綇","縃","繻","胥","蕦","虗","虚","虛","蝑","裇","訏","許","諝","譃","谞","鑐","需","須","须","顼","驉","鬚","魆","魖","𬣙","𦈡"],zhā:["偧","哳","抯","挓","揸","摣","樝","渣","皶","觰","譇","齄","齇"],cī:["偨","疵","蠀","趀","骴","髊","齹"],bī:["偪","屄","楅","毴","豍","逼","鰏","鲾","鵖"],xún:["偱","噚","寻","尋","峋","巡","廵","循","恂","揗","攳","旬","杊","栒","桪","樳","洵","浔","潯","燅","燖","珣","璕","畃","紃","荀","蟳","詢","询","鄩","鱏","鱘","鲟","𬘓","𬩽","𬍤","𬊈"],"cāi sī":["偲"],duān:["偳","媏","端","褍","鍴"],ǒu:["偶","吘","嘔","耦","腢","蕅","藕","𬉼","𠙶"],tōu:["偷","偸","鍮"],"zán zá zǎ":["偺"],"lǚ lóu":["偻","僂"],fèn:["偾","僨","奋","奮","弅","忿","愤","憤","瀵","瞓","秎","粪","糞","膹","鱝","鲼"],"kuǐ guī":["傀"],sǒu:["傁","叜","叟","嗾","櫢","瞍","薮","藪"],"zhì sī tí":["傂"],sù:["傃","僳","嗉","塐","塑","夙","嫊","愫","憟","榡","樎","樕","殐","泝","涑","溯","溸","潚","潥","玊","珟","璛","簌","粛","粟","素","縤","肃","肅","膆","蔌","藗","觫","訴","謖","诉","谡","趚","蹜","速","遡","遬","鋉","餗","驌","骕","鱐","鷫","鹔","𫗧"],xiā:["傄","煆","瞎","虲","谺","颬","鰕"],"yuàn yuán":["傆","媛"],rǒng:["傇","冗","宂","氄","軵"],nù:["傉","怒"],yùn:["傊","孕","恽","惲","愠","慍","枟","腪","蕴","薀","藴","蘊","褞","貟","运","運","郓","鄆","酝","醖","醞","韗","韞","韵","韻","餫"],"gòu jiǎng":["傋"],mà:["傌","嘜","榪","睰","祃","禡","罵","閁","駡","骂","鬕"],bàng:["傍","塝","棒","玤","稖","艕","蒡","蜯","謗","谤","鎊","镑"],diān:["傎","厧","嵮","巅","巓","巔","掂","攧","敁","槇","滇","癫","癲","蹎","顚","顛","颠","齻"],táng:["傏","唐","啺","坣","堂","塘","搪","棠","榶","溏","漟","煻","瑭","磄","禟","篖","糃","糖","糛","膅","膛","蓎","螗","螳","赯","踼","鄌","醣","鎕","隚","餹","饄","鶶","䣘"],hào:["傐","哠","恏","昊","昦","晧","暠","暤","暭","曍","浩","淏","澔","灏","灝","皓","皜","皞","皡","皥","耗","聕","薃","號","鄗","顥","颢","鰝"],"xī xì":["傒"],shān:["傓","删","刪","剼","圸","山","挻","搧","柵","檆","潸","澘","煽","狦","珊","笘","縿","羴","羶","脠","舢","芟","衫","跚","軕","邖","閊","鯅"],"qiàn jiān":["傔"],"què jué":["傕","埆"],"cāng chen":["傖"],róng:["傛","媶","嫆","嬫","容","峵","嵘","嶸","戎","搈","曧","栄","榕","榮","榵","毧","溶","瀜","烿","熔","狨","瑢","穁","絨","绒","羢","肜","茙","茸","荣","蓉","蝾","融","螎","蠑","褣","鎔","镕","駥"],"tà tàn":["傝"],suō:["傞","唆","嗍","嗦","娑","摍","桫","梭","睃","簑","簔","羧","莏","蓑","趖","鮻"],dǎi:["傣","歹"],zài:["傤","儎","再","在","扗","洅","載","酨"],gǔ:["傦","古","啒","尳","愲","榖","榾","汩","淈","濲","瀔","牯","皷","皼","盬","瞽","穀","罟","羖","股","脵","臌","薣","蛊","蠱","詁","诂","轂","逧","鈷","钴","餶","馉","鼓","鼔","𦙶"],bīn:["傧","宾","彬","斌","椕","滨","濒","濱","濵","瀕","繽","缤","虨","豩","豳","賓","賔","邠","鑌","镔","霦","顮"],chǔ:["储","儲","杵","椘","楚","楮","檚","濋","璴","础","礎","禇","處","齭","齼","𬺓"],nuó:["傩","儺","挪","梛","橠"],"cān càn":["傪"],lěi:["傫","儡","厽","垒","塁","壘","壨","櫐","灅","癗","矋","磊","礨","耒","蕌","蕾","藟","蘽","蠝","誄","讄","诔","鑸","鸓"],cuī:["催","凗","墔","崔","嵟","慛","摧","榱","獕","磪","鏙"],yōng:["傭","嗈","墉","壅","嫞","庸","廱","慵","拥","擁","滽","灉","牅","痈","癕","癰","臃","邕","郺","鄘","鏞","镛","雍","雝","饔","鱅","鳙","鷛"],"zāo cáo":["傮"],sǒng:["傱","嵷","怂","悚","愯","慫","竦","耸","聳","駷","㧐"],ào:["傲","坳","垇","墺","奡","嫯","岙","岰","嶴","懊","擙","澳","鏊","驁","骜"],"qī còu":["傶"],chuǎng:["傸","磢","闖","闯"],shǎ:["傻","儍"],hàn:["傼","垾","悍","憾","扞","捍","撖","撼","旱","晘","暵","汉","涆","漢","瀚","焊","猂","皔","睅","翰","莟","菡","蛿","蜭","螒","譀","輚","釬","銲","鋎","雗","頷","顄","颔","駻","鶾"],zhāng:["傽","嫜","张","張","彰","慞","暲","樟","漳","獐","璋","章","粻","蔁","蟑","遧","鄣","鏱","餦","騿","鱆","麞"],"yān yàn":["傿","墕","嬮"],"piào biāo":["僄","骠"],liàn:["僆","堜","媡","恋","戀","楝","殓","殮","湅","潋","澰","瀲","炼","煉","瑓","練","纞","练","萰","錬","鍊","鏈","链","鰊","𬶠"],màn:["㵘","僈","墁","幔","慢","曼","漫","澷","熳","獌","縵","缦","蔄","蘰","鄤","鏝","镘","𬜬"],"tàn tǎn":["僋"],yíng:["僌","営","塋","嬴","攍","楹","櫿","溁","溋","滢","潆","濙","濚","濴","瀅","瀛","瀠","瀯","灐","灜","熒","營","瑩","盁","盈","禜","籝","籯","縈","茔","荧","莹","萤","营","萦","萾","蓥","藀","蛍","蝇","蝿","螢","蠅","謍","贏","赢","迎","鎣"],dòng:["働","冻","凍","动","動","姛","戙","挏","栋","棟","湩","硐","胨","胴","腖","迵","霘","駧"],zhuàn:["僎","啭","囀","堟","撰","灷","瑑","篆","腞","蒃","襈","譔","饌","馔"],xiàng:["像","勨","向","嚮","姠","嶑","曏","橡","珦","缿","蟓","衖","襐","象","鐌","項","项","鱌"],shàn:["僐","善","墠","墡","嬗","擅","敾","椫","樿","歚","汕","灗","疝","磰","繕","缮","膳","蟮","蟺","訕","謆","譱","讪","贍","赡","赸","鄯","鐥","饍","騸","骟","鱓","鱔","鳝","𫮃"],"tuí tuǐ":["僓"],zǔn:["僔","噂","撙","譐"],pú:["僕","匍","圤","墣","濮","獛","璞","瞨","穙","莆","菐","菩","葡","蒱","蒲","贌","酺","鏷","镤"],láo:["僗","劳","労","勞","哰","崂","嶗","憥","朥","浶","牢","痨","癆","窂","簩","醪","鐒","铹","顟","髝","𫭼"],chǎng:["僘","厰","廠","敞","昶","氅","鋹","𬬮"],guāng:["僙","光","咣","垙","姯","洸","灮","炗","炚","炛","烡","珖","胱","茪","輄","銧","黆","𨐈"],liáo:["僚","嘹","嫽","寥","寮","尞","屪","嵺","嶚","嶛","廫","憀","敹","暸","橑","獠","璙","疗","療","竂","簝","繚","缭","聊","膋","膫","藔","蟟","豂","賿","蹘","辽","遼","飉","髎","鷯","鹩"],dèng:["僜","凳","墱","嶝","櫈","瞪","磴","覴","邓","鄧","隥"],"chán zhàn zhuàn":["僝"],bō:["僠","嶓","拨","撥","播","波","溊","玻","癶","盋","砵","碆","礡","缽","菠","袰","蹳","鉢","钵","餑","饽","驋","鱍","𬭛"],huì:["僡","匯","卉","喙","嘒","嚖","圚","嬒","寭","屶","屷","彗","彙","彚","徻","恚","恵","惠","慧","憓","懳","晦","暳","槥","橞","檅","櫘","汇","泋","滙","潓","烩","燴","獩","璤","瞺","硊","秽","穢","篲","絵","繪","绘","翙","翽","荟","蔧","蕙","薈","薉","蟪","詯","誨","諱","譓","譿","讳","诲","賄","贿","鐬","闠","阓","靧","頮","顪","颒","餯","𬤝","𬭬"],chuǎn:["僢","喘","舛","荈","踳"],"tiě jiàn":["僣"],sēng:["僧","鬙"],xiàn:["僩","僴","哯","垷","塪","姭","娊","宪","岘","峴","憲","撊","晛","橌","橺","涀","瀗","献","獻","现","現","県","睍","粯","糮","絤","綫","線","线","缐","羡","羨","腺","臔","臽","苋","莧","誢","豏","鋧","錎","限","陥","陷","霰","餡","馅","麲","鼸","𬀪","𪾢"],"yù jú":["僪"],"è wū":["僫"],"tóng zhuàng":["僮"],lǐn:["僯","凛","凜","廩","廪","懍","懔","撛","檁","檩","澟","癛","癝"],gù:["僱","凅","固","堌","崓","崮","故","梏","棝","牿","痼","祻","錮","锢","雇","顧","顾","鯝","鲴"],jiāng:["僵","壃","姜","橿","殭","江","畕","疅","礓","繮","缰","翞","茳","葁","薑","螀","螿","豇","韁","鱂","鳉"],mǐn:["僶","冺","刡","勄","悯","惽","愍","慜","憫","抿","敃","敏","敯","泯","潣","皿","笢","笽","簢","蠠","閔","閩","闵","闽","鰵","鳘","黽"],jìn:["僸","凚","噤","嚍","墐","壗","妗","嬧","搢","晉","晋","枃","殣","浕","浸","溍","濅","濜","烬","煡","燼","琎","瑨","璶","盡","祲","縉","缙","荩","藎","覲","觐","賮","贐","赆","近","进","進","靳","齽"],"jià jie":["價"],qiào:["僺","峭","帩","撬","殻","窍","竅","誚","诮","躈","陗","鞩","韒","髚"],pì:["僻","媲","嫓","屁","澼","甓","疈","譬","闢","鷿","鸊","䴙"],sài:["僿","簺","賽","赛"],"chán tǎn shàn":["儃"],"dāng dàng":["儅","当","闣"],xuān:["儇","喧","塇","媗","宣","愃","愋","揎","昍","暄","煊","煖","瑄","睻","矎","禤","箮","翧","翾","萱","萲","蓒","蕿","藼","蘐","蝖","蠉","諠","諼","譞","谖","軒","轩","鍹","駽","鰚","𫓶","𫍽"],"dān dàn":["儋","擔","瘅"],càn:["儏","澯","灿","燦","璨","粲","薒","謲"],"bīn bìn":["儐"],"án àn":["儑"],tái:["儓","坮","嬯","抬","擡","檯","炱","炲","籉","臺","薹","跆","邰","颱","鮐","鲐"],lán:["儖","兰","囒","婪","岚","嵐","幱","拦","攔","斓","斕","栏","欄","欗","澜","瀾","灆","灡","燣","燷","璼","篮","籃","籣","繿","葻","蓝","藍","蘫","蘭","褴","襕","襤","襴","襽","譋","讕","谰","躝","鑭","镧","闌","阑","韊","𬒗"],"nǐ yì ài yí":["儗"],méng:["儚","幪","曚","朦","橗","檬","氋","溕","濛","甍","甿","盟","礞","艨","莔","萌","蕄","虻","蝱","鄳","鄸","霿","靀","顭","饛","鯍","鸏","鹲","𫑡","㠓"],níng:["儜","凝","咛","嚀","嬣","柠","橣","檸","狞","獰","聍","聹","薴","鑏","鬡","鸋"],qióng:["儝","卭","宆","惸","憌","桏","橩","焪","焭","煢","熍","琼","瓊","睘","穷","穹","窮","竆","笻","筇","舼","茕","藑","藭","蛩","蛬","赹","跫","邛","銎","䓖"],liè:["儠","冽","列","劣","劽","埒","埓","姴","峛","巤","挒","捩","栵","洌","浖","烈","烮","煭","犣","猎","猟","獵","聗","脟","茢","蛚","趔","躐","迾","颲","鬛","鬣","鮤","鱲","鴷","䴕","𫚭"],kuǎng:["儣","夼","懭"],bào:["儤","勽","報","忁","报","抱","曓","爆","犦","菢","虣","蚫","豹","鉋","鑤","铇","骲","髱","鮑","鲍"],biāo:["儦","墂","幖","彪","标","標","滮","瀌","熛","爂","猋","瘭","磦","膘","臕","謤","贆","鏢","鑣","镖","镳","颮","颷","飆","飇","飈","飊","飑","飙","飚","驫","骉","髟"],zǎn:["儧","儹","噆","攅","昝","趱","趲"],háo:["儫","嗥","嘷","噑","嚎","壕","椃","毜","毫","濠","獆","獔","竓","籇","蚝","蠔","譹","豪"],qìng:["儬","凊","庆","慶","櫦","濪","碃","磬","罄","靘"],chèn:["儭","嚫","榇","櫬","疢","衬","襯","讖","谶","趁","趂","齓","齔","龀"],téng:["儯","幐","滕","漛","疼","籐","籘","縢","腾","藤","虅","螣","誊","謄","邆","駦","騰","驣","鰧","䲢"],"lǒng lóng lòng":["儱"],"chán chàn":["儳"],"ráng xiāng":["儴","勷"],"huì xié":["儶"],luó:["儸","攞","椤","欏","猡","玀","箩","籮","罗","羅","脶","腡","萝","蘿","螺","覼","逻","邏","鏍","鑼","锣","镙","饠","騾","驘","骡","鸁"],léi:["儽","嫘","檑","欙","瓃","畾","縲","纍","纝","缧","罍","羸","蔂","蘲","虆","轠","鐳","鑘","镭","雷","靁","鱩","鼺"],"nàng nāng":["儾"],"wù wū":["兀"],yǔn:["允","喗","夽","抎","殒","殞","狁","磒","荺","賱","鈗","阭","陨","隕","霣","馻","齫","齳"],zān:["兂","橵","簪","簮","糌","鐕","鐟","鵤"],yuán:["元","円","原","厡","厵","园","圆","圎","園","圓","垣","塬","媴","嫄","援","榞","榬","橼","櫞","沅","湲","源","溒","爰","猨","猿","笎","緣","縁","缘","羱","茒","薗","蝝","蝯","螈","袁","褤","謜","轅","辕","邍","邧","酛","鈨","鎱","騵","魭","鶢","鶰","黿","鼋","𫘪"],xiōng:["兄","兇","凶","匂","匈","哅","忷","恟","汹","洶","胷","胸","芎","訩","詾","讻"],chōng:["充","嘃","忡","憃","憧","摏","沖","浺","珫","罿","翀","舂","艟","茺","衝","蹖","㳘"],zhào:["兆","垗","旐","曌","枛","櫂","照","燳","狣","瞾","笊","罀","罩","羄","肁","肇","肈","詔","诏","赵","趙","鮡","𬶐"],"duì ruì yuè":["兊","兌","兑"],kè:["克","刻","勀","勊","堁","娔","客","恪","愙","氪","溘","碦","緙","缂","艐","衉","課","课","錁","锞","騍","骒"],tù:["兎","兔","堍","迌","鵵"],dǎng:["党","攩","欓","譡","讜","谠","黨","𣗋"],dōu:["兜","兠","唗","橷","篼","蔸"],huǎng:["兤","奛","幌","怳","恍","晄","炾","熀","縨","詤","謊","谎"],rù:["入","嗕","媷","扖","杁","洳","溽","縟","缛","蓐","褥","鳰"],nèi:["內","氝","氞","錗"],"yú shù":["兪"],"liù lù":["六"],han:["兯","爳"],tiān:["兲","天","婖","添","酟","靔","靝","黇"],"xīng xìng":["兴"],diǎn:["典","嚸","奌","婰","敟","椣","点","碘","蒧","蕇","踮","點"],"zī cí":["兹"],jiān:["兼","冿","囏","坚","堅","奸","姦","姧","尖","幵","惤","戋","戔","搛","椾","樫","櫼","歼","殱","殲","湔","瀐","瀸","煎","熞","熸","牋","瑊","睷","礛","礷","笺","箋","緘","縑","缄","缣","肩","艰","艱","菅","菺","葌","蒹","蔪","蕑","蕳","虃","譼","豜","鑯","雃","鞯","韀","韉","餰","馢","鰔","鰜","鰹","鲣","鳒","鵑","鵳","鶼","鹣","麉"],shòu:["兽","受","售","壽","夀","寿","授","狩","獣","獸","痩","瘦","綬","绶","膄"],jì:["兾","冀","剂","剤","劑","勣","坖","垍","塈","妓","季","寂","寄","廭","彑","徛","忌","悸","惎","懻","技","旡","既","旣","暨","暩","曁","梞","檕","檵","洎","漃","漈","瀱","痵","癠","禝","稩","稷","穄","穊","穧","紀","継","績","繋","繼","继","绩","罽","臮","芰","茍","茤","葪","蓟","蔇","薊","蘎","蘮","蘻","裚","襀","覬","觊","計","記","誋","计","记","跡","跽","蹟","迹","际","際","霁","霽","驥","骥","髻","鬾","魝","魥","鯚","鯽","鰶","鰿","鱀","鱭","鲚","鲫","鵋","鷑","齌","𪟝","𬶨","𬶭"],jiōng:["冂","冋","坰","埛","扃","蘏","蘔","駉","駫","𬳶"],mào:["冃","冐","媢","帽","愗","懋","暓","柕","楙","毷","瑁","皃","眊","瞀","耄","茂","萺","蝐","袤","覒","貌","貿","贸","鄚","鄮"],rǎn:["冄","冉","姌","媣","染","珃","苒","蒅","䎃"],"nèi nà":["内"],gāng:["冈","冮","刚","剛","堈","堽","岡","掆","摃","棡","牨","犅","疘","綱","纲","缸","罁","罡","肛","釭","鎠","㭎"],cè:["冊","册","厕","厠","夨","廁","恻","惻","憡","敇","测","測","笧","策","筞","筴","箣","荝","萗","萴","蓛"],guǎ:["冎","剐","剮","叧","寡"],"mào mò":["冒"],gòu:["冓","啂","坸","垢","够","夠","媾","彀","搆","撀","构","構","煹","覯","觏","訽","詬","诟","購","购","遘","雊"],xǔ:["冔","喣","暊","栩","珝","盨","糈","詡","諿","诩","鄦","醑"],mì:["冖","冪","嘧","塓","宻","密","峚","幂","幎","幦","怽","榓","樒","櫁","汨","淧","滵","漞","濗","熐","羃","蔤","蜜","覓","覔","覛","觅","謐","谧","鼏"],"yóu yín":["冘"],xiě:["写","冩","藛"],jūn:["军","君","均","桾","汮","皲","皸","皹","碅","莙","蚐","袀","覠","軍","鈞","銁","銞","鍕","钧","頵","鮶","鲪","麏"],mí:["冞","擟","瀰","爢","猕","獼","祢","禰","縻","蒾","藌","蘪","蘼","袮","詸","謎","迷","醚","醾","醿","釄","镾","鸍","麊","麋","麛"],"guān guàn":["冠","覌","観","觀","观"],měng:["冡","勐","懵","掹","猛","獴","艋","蜢","蠓","錳","锰","鯭","鼆"],zhǒng:["冢","塚","尰","歱","煄","瘇","肿","腫","踵"],zuì:["冣","嶵","晬","最","栬","槜","檇","檌","祽","絊","罪","蕞","辠","酔","酻","醉","錊"],yuān:["冤","剈","囦","嬽","寃","棩","淵","渁","渆","渊","渕","灁","眢","肙","葾","蒬","蜎","蜵","駌","鳶","鴛","鵷","鸢","鸳","鹓","鼘","鼝"],míng:["冥","名","明","暝","朙","榠","洺","溟","猽","眀","眳","瞑","茗","螟","覭","詺","鄍","銘","铭","鳴","鸣"],kòu:["冦","叩","宼","寇","扣","敂","滱","窛","筘","簆","蔲","蔻","釦","鷇"],tài:["冭","太","夳","忲","态","態","汰","汱","泰","溙","肽","舦","酞","鈦","钛"],"féng píng":["冯","馮"],"chōng chòng":["冲"],kuàng:["况","圹","壙","岲","懬","旷","昿","曠","框","況","爌","眖","眶","矿","砿","礦","穬","絋","絖","纊","纩","貺","贶","軦","邝","鄺","鉱","鋛","鑛","黋"],lěng:["冷"],pàn:["冸","判","叛","沜","泮","溿","炍","牉","畔","盼","聁","袢","襻","詊","鋬","鑻","頖","鵥"],fā:["冹","彂","沷","発","發"],xiǎn:["冼","尟","尠","崄","嶮","幰","攇","显","櫶","毨","灦","烍","燹","狝","猃","獫","獮","玁","禒","筅","箲","藓","蘚","蚬","蜆","譣","赻","跣","鍌","险","険","險","韅","顕","顯","㬎"],qià:["冾","圶","帢","恰","殎","洽","硈","胢","髂"],"jìng chēng":["净","凈","淨"],sōu:["凁","嗖","廀","廋","捜","搜","摉","溲","獀","艘","蒐","螋","鄋","醙","鎪","锼","颼","飕","餿","馊","騪"],měi:["凂","媄","媺","嬍","嵄","挴","毎","每","浼","渼","燘","美","躾","鎂","镁","黣"],tú:["凃","図","图","圖","圗","塗","屠","峹","嵞","庩","廜","徒","悇","揬","涂","瘏","筡","腯","荼","蒤","跿","途","酴","鈯","鍎","馟","駼","鵌","鶟","鷋","鷵","𬳿"],zhǔn:["准","凖","埻","準","𬘯"],"liáng liàng":["凉","涼","量"],diāo:["凋","刁","刟","叼","奝","弴","彫","汈","琱","碉","簓","虭","蛁","貂","錭","雕","鮉","鯛","鲷","鵰","鼦"],còu:["凑","湊","腠","輳","辏"],ái:["凒","啀","嘊","捱","溰","癌","皑","皚"],duó:["凙","剫","夺","奪","痥","踱","鈬","鐸","铎"],dú:["凟","匵","嬻","椟","櫝","殰","涜","牍","牘","犊","犢","独","獨","瓄","皾","裻","読","讀","讟","豄","贕","錖","鑟","韇","韣","韥","騳","髑","黩","黷"],"jǐ jī":["几"],fán:["凡","凢","凣","匥","墦","杋","柉","棥","樊","瀿","烦","煩","燔","璠","矾","礬","笲","籵","緐","羳","舤","舧","薠","蘩","蠜","襎","蹯","釩","鐇","鐢","钒","鷭","𫔍","𬸪"],jū:["凥","匊","娵","婮","居","崌","抅","挶","掬","梮","椐","檋","毩","毱","泃","涺","狙","琚","疽","砠","罝","腒","艍","蜛","裾","諊","跔","踘","躹","陱","雎","鞠","鞫","駒","驹","鮈","鴡","鶋","𬶋"],"chù chǔ":["処","处"],zhǐ:["凪","劧","咫","址","坧","帋","恉","扺","指","旨","枳","止","汦","沚","洔","淽","疻","砋","祉","秖","紙","纸","芷","藢","衹","襧","訨","趾","軹","轵","酯","阯","黹"],píng:["凭","凴","呯","坪","塀","岼","帡","帲","幈","平","慿","憑","枰","洴","焩","玶","瓶","甁","竮","箳","簈","缾","荓","萍","蓱","蚲","蛢","評","评","軿","輧","郱","鮃","鲆"],kǎi:["凯","凱","剀","剴","垲","塏","恺","愷","慨","暟","蒈","輆","鍇","鎧","铠","锴","闓","闿","颽"],gān:["凲","坩","尲","尴","尶","尷","柑","泔","漧","玕","甘","疳","矸","竿","筸","粓","肝","苷","迀","酐","魐"],"kǎn qiǎn":["凵"],tū:["凸","堗","嶀","捸","涋","湥","痜","禿","秃","突","葖","鋵","鵚","鼵","㻬"],"āo wā":["凹"],chū:["出","初","岀","摴","榋","樗","貙","齣","䢺","䝙"],dàng:["凼","圵","垱","壋","档","檔","氹","璗","瓽","盪","瞊","砀","碭","礑","簜","荡","菪","蕩","蘯","趤","逿","雼","𬍡"],hán:["函","凾","含","圅","娢","寒","崡","晗","梒","浛","涵","澏","焓","琀","甝","筨","蜬","邗","邯","鋡","韓","韩"],záo:["凿","鑿"],dāo:["刀","刂","忉","氘","舠","螩","釖","魛","鱽"],chuāng:["刅","摐","牎","牕","疮","瘡","窓","窗","窻"],"fēn fèn":["分"],"qiè qiē":["切"],kān:["刊","勘","堪","戡","栞","龕","龛"],cǔn:["刌","忖"],chú:["刍","厨","幮","廚","橱","櫉","櫥","滁","犓","篨","耡","芻","蒢","蒭","蜍","蟵","豠","趎","蹰","躇","躕","鉏","鋤","锄","除","雏","雛","鶵"],"huà huá":["划"],lí:["刕","剓","剺","劙","厘","喱","嚟","囄","嫠","孷","廲","悡","梨","梸","棃","漓","灕","犁","犂","狸","琍","璃","瓈","盠","睝","离","穲","竰","筣","篱","籬","糎","縭","缡","罹","艃","荲","菞","蓠","蔾","藜","蘺","蜊","蟍","蟸","蠫","褵","謧","貍","醨","鋫","錅","鏫","鑗","離","驪","骊","鯏","鯬","鱺","鲡","鵹","鸝","鹂","黎","黧","㰀"],yuè:["刖","嬳","岄","岳","嶽","恱","悅","悦","戉","抈","捳","月","樾","瀹","爚","玥","礿","禴","篗","籆","籥","籰","粤","粵","蘥","蚎","蚏","説","越","跀","跃","躍","軏","鈅","鉞","鑰","钺","閱","閲","阅","鸑","鸙","黦","龠","𫐄","𬸚"],liú:["刘","劉","嚠","媹","嵧","旈","旒","榴","橊","流","浏","瀏","琉","瑠","瑬","璢","畄","留","畱","疁","瘤","癅","硫","蒥","蓅","蟉","裗","鎏","鏐","鐂","镠","飀","飅","飗","駠","駵","騮","驑","骝","鰡","鶹","鹠","麍"],zé:["则","則","啧","嘖","嫧","帻","幘","択","樍","歵","沢","泎","溭","皟","瞔","矠","礋","箦","簀","舴","蔶","蠌","襗","謮","賾","赜","迮","鸅","齚","齰"],"chuàng chuāng":["创","創"],qù:["刞","厺","去","閴","闃","阒","麮","鼁"],"bié biè":["別","别"],"páo bào":["刨"],"chǎn chàn":["刬","剗","幝"],guā:["刮","劀","桰","歄","煱","瓜","胍","踻","颪","颳","騧","鴰","鸹"],gēng:["刯","庚","椩","浭","焿","畊","絚","羮","羹","耕","菮","賡","赓","鶊","鹒"],dào:["到","噵","悼","椡","檤","燾","瓙","盗","盜","稲","稻","纛","翿","艔","菿","衜","衟","軇","道"],chuàng:["刱","剏","剙","怆","愴"],kū:["刳","哭","圐","堀","枯","桍","矻","窟","跍","郀","骷","鮬"],duò:["刴","剁","墯","尮","惰","憜","挅","桗","舵","跥","跺","陊","陏","飿","饳","鵽"],"shuā shuà":["刷"],"quàn xuàn":["券"],"chà shā":["刹","剎"],"cì cī":["刺"],guì:["刽","刿","劊","劌","撌","攰","昋","桂","椢","槶","樻","櫃","猤","禬","筀","蓕","襘","貴","贵","跪","鐀","鑎","鞼","鱖","鱥"],lóu:["剅","娄","婁","廔","楼","樓","溇","漊","熡","耧","耬","艛","蒌","蔞","蝼","螻","謱","軁","遱","鞻","髅","髏","𪣻"],cuò:["剉","剒","厝","夎","挫","措","棤","莝","莡","蓌","逪","銼","錯","锉","错"],"xiāo xuē":["削"],"kēi kè":["剋","尅"],"là lá":["剌"],tī:["剔","梯","踢","銻","锑","鷈","鷉","䏲","䴘"],pōu:["剖"],wān:["剜","塆","壪","帵","弯","彎","湾","潫","灣","睕","蜿","豌"],"bāo bō":["剝","剥"],duō:["剟","咄","哆","嚉","多","夛","掇","毲","畓","裰","㙍"],qíng:["剠","勍","夝","情","擎","晴","暒","棾","樈","檠","氰","甠","硘","葝","黥"],"yǎn shàn":["剡"],"dū zhuó":["剢"],yān:["剦","嫣","崦","嶖","恹","懕","懨","樮","淊","淹","漹","烟","焉","焑","煙","珚","篶","胭","臙","菸","鄢","醃","閹","阉","黫"],huō:["剨","劐","吙","攉","秴","耠","锪","騞","𬴃"],shèng:["剩","剰","勝","圣","墭","嵊","晠","榺","橳","琞","聖","蕂","貹","賸"],"duān zhì":["剬"],wū:["剭","呜","嗚","圬","屋","巫","弙","杇","歍","汙","汚","污","洿","烏","窏","箼","螐","誈","誣","诬","邬","鄔","鎢","钨","鰞","鴮"],gē:["割","哥","圪","彁","戈","戓","戨","歌","滒","犵","肐","袼","謌","鎶","鴚","鴿","鸽"],"dá zhá":["剳"],chuán:["剶","暷","椽","篅","舡","舩","船","輲","遄"],"tuán zhuān":["剸","漙","篿"],"lù jiū":["剹"],pēng:["剻","匉","嘭","怦","恲","抨","梈","烹","砰","軯","駍"],piāo:["剽","勡","慓","旚","犥","翲","螵","飃","飄","飘","魒"],kōu:["剾","彄","抠","摳","眍","瞘","芤","𫸩"],"jiǎo chāo":["剿","劋","勦","摷"],qiāo:["劁","勪","墝","幧","敲","橇","毃","燆","硗","磽","繑","趬","跷","踍","蹺","蹻","郻","鄡","鄥","鍫","鍬","鐰","锹","頝"],"huá huà":["劃"],"zhā zhá":["劄"],"pī pǐ":["劈","悂"],tāng:["劏","嘡","羰","薚","蝪","蹚","鞺","鼞"],chán:["劖","嚵","壥","婵","嬋","巉","廛","棎","毚","湹","潹","潺","澶","瀍","瀺","煘","獑","磛","緾","纏","纒","缠","艬","蝉","蟐","蟬","蟾","誗","讒","谗","躔","鄽","酁","鋋","鑱","镵","饞","馋"],zuān:["劗","躜","躦","鉆","鑚"],mó:["劘","嫫","嬤","嬷","尛","摹","擵","橅","糢","膜","藦","蘑","謨","謩","谟","饃","饝","馍","髍","魔","魹"],zhú:["劚","斸","曯","欘","灟","炢","烛","燭","爥","瘃","竹","笁","笜","舳","茿","蓫","蠋","蠾","躅","逐","逫","钃","鱁"],quàn:["劝","勧","勸","牶","韏"],"jìn jìng":["劤","劲","勁"],kēng:["劥","坑","牼","硁","硜","誙","銵","鍞","鏗","铿","阬"],"xié liè":["劦"],"zhù chú":["助"],nǔ:["努","弩","砮","胬"],shào:["劭","卲","哨","潲","紹","綤","绍","袑","邵"],miǎo:["劰","杪","淼","渺","眇","秒","篎","緲","缈","藐","邈"],kǒu:["劶","口"],wā:["劸","娲","媧","屲","挖","攨","洼","溛","漥","瓾","畖","穵","窊","窪","蛙","韈","鼃"],kuāng:["劻","匡","匩","哐","恇","洭","筐","筺","誆","诓","軭","邼"],hé:["劾","咊","啝","姀","峆","敆","曷","柇","楁","毼","河","涸","渮","澕","熆","皬","盇","盉","盍","盒","禾","篕","籺","粭","翮","菏","萂","覈","訸","詥","郃","釛","鉌","鑉","閡","闔","阂","阖","鞨","頜","餄","饸","魺","鹖","麧","齕","龁","龢","𬌗"],gào:["勂","吿","告","峼","祮","祰","禞","筶","誥","诰","郜","鋯","锆"],"bó bèi":["勃"],láng:["勆","嫏","廊","斏","桹","榔","樃","欴","狼","琅","瑯","硠","稂","艆","蓈","蜋","螂","躴","郒","郞","鋃","鎯","锒"],xūn:["勋","勛","勲","勳","嚑","坃","埙","塤","壎","壦","曛","燻","獯","矄","纁","臐","薫","薰","蘍","醺","𫄸"],"juàn juān":["勌","瓹"],"lè lēi":["勒"],kài:["勓","炌","烗","鎎"],"wěng yǎng":["勜"],qín:["勤","嗪","噙","嶜","庈","懃","懄","捦","擒","斳","檎","澿","珡","琴","琹","瘽","禽","秦","耹","芩","芹","菦","螓","蠄","鈙","鈫","雂","靲","鳹","鵭"],jiàng:["勥","匞","匠","嵹","弜","弶","摾","櫤","洚","滰","犟","糡","糨","絳","绛","謽","酱","醤","醬"],fān:["勫","嬏","帆","幡","忛","憣","旙","旛","繙","翻","藩","轓","颿","飜","鱕"],juān:["勬","姢","娟","捐","涓","蠲","裐","鎸","鐫","镌","鹃"],"tóng dòng":["勭","烔","燑","狪"],lǜ:["勴","垏","嵂","律","慮","氯","滤","濾","爈","箻","綠","繂","膟","葎","虑","鑢"],chè:["勶","坼","彻","徹","掣","撤","澈","烢","爡","瞮","硩","聅","迠","頙","㬚"],sháo:["勺","玿","韶"],"gōu gòu":["勾"],cōng:["匆","囪","囱","忩","怱","悤","暰","樬","漗","瑽","璁","瞛","篵","繱","聡","聦","聪","聰","苁","茐","葱","蓯","蔥","蟌","鍯","鏓","鏦","騘","驄","骢"],"táo yáo":["匋","陶"],páo:["匏","咆","垉","庖","爮","狍","袍","褜","軳","鞄","麅"],dá:["匒","妲","怛","炟","燵","畣","笪","羍","荙","薘","蟽","詚","达","迏","迖","迚","逹","達","鐽","靼","鞑","韃","龖","龘","𫟼"],"huà huā":["化"],"běi bèi":["北"],nǎo:["匘","垴","堖","嫐","恼","悩","惱","瑙","碯","脑","脳","腦"],"chí shi":["匙"],fāng:["匚","堏","方","淓","牥","芳","邡","鈁","錺","钫","鴋"],zā:["匝","咂","帀","沞","臜","臢","迊","鉔","魳"],qiè:["匧","厒","妾","怯","悏","惬","愜","挈","穕","窃","竊","笡","箧","篋","籡","踥","鍥","锲","鯜"],"zāng cáng":["匨"],fěi:["匪","奜","悱","棐","榧","篚","翡","蕜","誹","诽"],"kuì guì":["匮","匱"],suǎn:["匴"],pǐ:["匹","噽","嚭","圮","庀","痞","癖","脴","苉","銢","鴄"],"qū ōu":["区","區"],"kē qià":["匼"],"yǎn yàn":["匽","棪"],biǎn:["匾","惼","揙","碥","稨","窆","藊","褊","貶","贬","鴘"],nì:["匿","堄","嫟","嬺","惄","愵","昵","暱","氼","眤","睨","縌","胒","腻","膩","逆","𨺙"],niàn:["卄","唸","埝","廿","念","惗","艌"],sà:["卅","櫒","脎","萨","蕯","薩","鈒","隡","颯","飒","馺"],zú:["卆","哫","崪","族","箤","足","踤","镞"],shēng:["升","呏","声","斘","昇","曻","枡","殅","泩","湦","焺","牲","珄","生","甥","竔","笙","聲","鉎","鍟","阩","陞","陹","鵿","鼪"],wàn:["卍","卐","忨","杤","瞣","脕","腕","萬","蟃","贎","輐","錽","𬇕"],"huá huà huā":["华","華"],bēi:["卑","悲","揹","杯","桮","盃","碑","藣","鵯","鹎"],"zú cù":["卒"],"dān shàn chán":["单","單"],"nán nā":["南"],"shuài lǜ":["卛"],"bǔ bo pú":["卜"],"kuàng guàn":["卝"],biàn:["卞","变","変","峅","弁","徧","忭","抃","昪","汳","汴","玣","艑","苄","覍","諚","變","辡","辧","辨","辩","辫","辮","辯","遍","釆","𨚕"],bǔ:["卟","哺","捕","补","補","鸔","𬷕"],"zhàn zhān":["占","覱"],"kǎ qiǎ":["卡"],lú:["卢","嚧","垆","壚","庐","廬","曥","枦","栌","櫨","泸","瀘","炉","爐","獹","玈","瓐","盧","矑","籚","纑","罏","胪","臚","舮","舻","艫","芦","蘆","蠦","轤","轳","鈩","鑪","顱","颅","馿","髗","魲","鱸","鲈","鸕","鸬","黸","𬬻"],lǔ:["卤","塷","掳","擄","樐","橹","櫓","氌","滷","澛","瀂","硵","磠","穞","艣","艪","蓾","虏","虜","鏀","鐪","鑥","镥","魯","鲁","鹵"],guà:["卦","啩","挂","掛","罣","褂","詿","诖"],"áng yǎng":["卬"],yìn:["印","垽","堷","廕","慭","憖","憗","懚","洕","湚","猌","癊","胤","茚","酳","鮣","䲟"],què:["却","卻","塙","崅","悫","愨","慤","搉","榷","燩","琷","皵","确","確","礭","闋","阕","鵲","鹊","𬒈"],luǎn:["卵"],"juàn juǎn":["卷","巻"],"chǎng ān hàn":["厂"],"wěi yán":["厃"],tīng:["厅","厛","听","庁","廰","廳","汀","烃","烴","綎","耓","聴","聼","聽","鞓","𬘩"],"zhé zhái":["厇"],"hàn àn":["厈","屽"],yǎ:["厊","唖","庌","痖","瘂","蕥"],shè:["厍","厙","弽","慑","慴","懾","摂","欇","涉","涻","渉","滠","灄","社","舎","蔎","蠂","設","设","赦","騇","麝"],dǐ:["厎","呧","坘","弤","抵","拞","掋","牴","砥","菧","觝","詆","诋","軧","邸","阺","骶","鯳"],"zhǎ zhǎi":["厏"],páng:["厐","嫎","庞","徬","舽","螃","逄","鰟","鳑","龎","龐"],"zhì shī":["厔"],máng:["厖","吂","哤","娏","忙","恾","杗","杧","汒","浝","牻","痝","盲","硭","笀","芒","茫","蘉","邙","釯","鋩","铓","駹"],zuī:["厜","樶","纗","蟕"],"shà xià":["厦","廈"],áo:["厫","嗷","嗸","廒","敖","滶","獒","獓","璈","翱","翶","翺","聱","蔜","螯","謷","謸","遨","鏖","隞","鰲","鳌","鷔","鼇"],"lán qiān":["厱"],"sī mǒu":["厶"],"gōng hóng":["厷"],"lín miǎo":["厸"],"qiú róu":["厹"],dū:["厾","嘟","督","醏"],"xiàn xuán":["县","縣"],"cān shēn cēn sān":["参","參","叄","叅"],"ài yǐ":["叆"],"chā chà chǎ chá":["叉"],shuāng:["双","孀","孇","欆","礵","艭","雙","霜","騻","驦","骦","鷞","鸘","鹴"],shōu:["収","收"],guái:["叏"],bá:["叐","妭","抜","拔","炦","癹","胈","茇","菝","詙","跋","軷","魃","鼥"],"fā fà":["发"],"zhuó yǐ lì jué":["叕"],qǔ:["取","娶","竬","蝺","詓","齲","龋"],"jiǎ xiá":["叚","徦"],"wèi yù":["叞","尉","蔚"],dié:["叠","垤","堞","峌","幉","恎","惵","戜","曡","殜","氎","牃","牒","瓞","畳","疂","疉","疊","碟","絰","绖","耊","耋","胅","艓","苵","蜨","蝶","褋","詄","諜","谍","跮","蹀","迭","镻","鰈","鲽","鴩","𫶇"],ruì:["叡","枘","汭","瑞","睿","芮","蚋","蜹","銳","鋭","锐"],"jù gōu":["句"],lìng:["另","呤","炩","蘦"],"dāo dáo tāo":["叨"],"zhī zhǐ":["只"],jiào:["叫","呌","嘂","嘦","噍","嬓","斍","斠","滘","漖","獥","珓","皭","窖","藠","訆","譥","趭","較","轎","轿","较","酵","醮","釂"],"zhào shào":["召"],"kě kè":["可"],"tái tāi":["台","苔"],pǒ:["叵","尀","笸","箥","鉕","钷","駊"],"yè xié":["叶"],"hào háo":["号"],tàn:["叹","嘆","探","歎","湠","炭","碳","舕"],"hōng hóng":["叿"],miē:["吀","咩","哶","孭"],"xū yū yù":["吁"],chī:["吃","哧","喫","嗤","噄","妛","媸","彨","彲","摛","攡","殦","瓻","痴","癡","眵","瞝","笞","粚","胵","蚩","螭","訵","魑","鴟","鵄","鸱","黐","齝","𫄨"],"xuān sòng":["吅"],yāo:["吆","喓","夭","妖","幺","楆","殀","祅","腰","葽","訞","邀","鴁","鴢","㙘"],zǐ:["吇","姉","姊","子","杍","梓","榟","橴","滓","矷","秭","笫","籽","紫","耔","虸","訿","釨"],"hé gě":["合","鲄"],"cùn dòu":["吋"],"tóng tòng":["同"],"tǔ tù":["吐","唋"],"zhà zhā":["吒","奓"],"xià hè":["吓"],"ā yā":["吖"],"ma má mǎ":["吗"],lìn:["吝","恡","悋","橉","焛","甐","膦","蔺","藺","賃","赁","蹸","躏","躙","躪","轥","閵"],tūn:["吞","暾","朜","焞"],"bǐ pǐ":["吡"],qìn:["吢","吣","唚","抋","揿","搇","撳","沁","瀙","菣","藽"],"jiè gè":["吤"],"fǒu pǐ":["否"],"ba bā":["吧"],dūn:["吨","噸","墩","墪","惇","撉","撴","犜","獤","礅","蜳","蹾","驐"],fēn:["吩","帉","昐","朆","梤","棻","氛","竕","紛","纷","翂","芬","衯","訜","躮","酚","鈖","雰","餴","饙","馚"],"é huā":["吪"],"kēng háng":["吭","妔"],shǔn:["吮"],"zhī zī":["吱"],"yǐn shěn":["吲"],wú:["吳","吴","呉","墲","峿","梧","橆","毋","洖","浯","無","珸","璑","祦","芜","茣","莁","蕪","蜈","蟱","譕","郚","鋙","铻","鯃","鵐","鷡","鹀","鼯"],"chǎo chāo":["吵"],"nà nè":["吶"],"xuè chuò jué":["吷"],chuī:["吹","炊","龡"],"dōu rú":["吺"],hǒu:["吼","犼"],"hōng hǒu ōu":["吽"],"wú yù":["吾"],"ya yā":["呀"],"è e":["呃"],dāi:["呆","懛","獃"],"mèn qǐ":["呇"],hōng:["呍","嚝","揈","灴","烘","焢","硡","薨","訇","谾","軣","輷","轟","轰","鍧"],nà:["呐","捺","笝","納","纳","肭","蒳","衲","豽","貀","軜","郍","鈉","钠","靹","魶"],"tūn tiān":["呑"],"fǔ ḿ":["呒","嘸"],"dāi tǎi":["呔"],"ǒu ōu òu":["呕"],"bài bei":["呗"],"yuán yún yùn":["员","員"],guō:["呙","啯","嘓","埚","堝","墎","崞","彉","彍","懖","猓","瘑","聒","蝈","蟈","郭","鈛","鍋","锅"],"huá qì":["呚"],"qiàng qiāng":["呛","跄"],shī:["呞","失","尸","屍","师","師","施","浉","湤","湿","溮","溼","濕","狮","獅","瑡","絁","葹","蒒","蓍","虱","蝨","褷","襹","詩","诗","邿","釃","鉇","鍦","鯴","鰤","鲺","鳲","鳾","鶳","鸤","䴓","𫚕"],juǎn:["呟","埍","臇","菤","錈","锩"],pěn:["呠","翸"],"wěn mǐn":["呡"],"ne ní":["呢"],"ḿ m̀ móu":["呣"],rán:["呥","嘫","然","燃","繎","肰","蚦","蚺","衻","袇","袡","髥","髯"],"tiè chè":["呫"],"qì zhī":["呮"],"zǐ cī":["呰"],"guā gū guǎ":["呱"],"cī zī":["呲"],"hǒu xǔ gòu":["呴"],"hē ā á ǎ à a":["呵"],náo:["呶","夒","峱","嶩","巎","挠","撓","猱","硇","蛲","蟯","詉","譊","鐃","铙"],"xiā gā":["呷"],pēi:["呸","怌","肧","胚","衃","醅"],"háo xiāo":["呺"],mìng:["命","掵"],"dá dàn":["呾"],"zuǐ jǔ":["咀"],"xián gān":["咁"],pǒu:["咅","哣","犃"],"yǎng yāng":["咉"],"zǎ zé zhā":["咋"],"hé hè huó huò hú":["和"],hāi:["咍"],dā:["咑","哒","噠","墶","搭","撘","耷","褡","鎝","𨱏"],"kǎ kā":["咔"],gū:["咕","唂","唃","姑","嫴","孤","巬","巭","柧","橭","沽","泒","稒","笟","箍","箛","篐","罛","苽","菇","菰","蓇","觚","軱","軲","轱","辜","酤","鈲","鮕","鴣","鸪"],"kā gā":["咖"],zuo:["咗"],lóng:["咙","嚨","嶐","巃","巄","昽","曨","朧","栊","槞","櫳","湰","滝","漋","爖","珑","瓏","癃","眬","矓","砻","礱","礲","窿","竜","聋","聾","胧","茏","蘢","蠪","蠬","襱","豅","鏧","鑨","霳","靇","驡","鸗","龍","龒","龙"],"xiàn xián":["咞"],qì:["咠","唭","噐","器","夡","弃","憇","憩","暣","棄","欫","气","気","氣","汔","汽","泣","湆","湇","炁","甈","盵","矵","碛","碶","磜","磧","罊","芞","葺","藒","蟿","訖","讫","迄","鐑"],"xì dié":["咥"],"liē liě lié lie":["咧"],zī:["咨","嗞","姕","姿","孜","孳","孶","崰","嵫","栥","椔","淄","湽","滋","澬","玆","禌","秶","粢","紎","緇","緕","纃","缁","茊","茲","葘","諮","谘","貲","資","赀","资","赼","趑","趦","輜","輺","辎","鄑","鈭","錙","鍿","鎡","锱","镃","頾","頿","髭","鯔","鰦","鲻","鶅","鼒","齍","齜","龇"],mī:["咪"],"jī xī qià":["咭"],"gē luò kǎ lo":["咯"],"shù xún":["咰"],"zán zá zǎ zan":["咱"],"hāi ké":["咳"],huī:["咴","噅","噕","婎","媈","幑","徽","恢","拻","挥","揮","晖","暉","楎","洃","瀈","灰","灳","烣","睳","禈","翚","翬","蘳","袆","褘","詼","诙","豗","輝","辉","鰴","麾","㧑"],"huài shì":["咶"],táo:["咷","啕","桃","檮","洮","淘","祹","綯","绹","萄","蜪","裪","迯","逃","醄","鋾","鞀","鞉","饀","駣","騊","鼗","𫘦"],xián:["咸","啣","娴","娹","婱","嫌","嫺","嫻","弦","挦","撏","涎","湺","澖","甉","痫","癇","癎","絃","胘","舷","藖","蚿","蛝","衔","衘","誸","諴","賢","贒","贤","輱","醎","銜","鑦","閑","闲","鷳","鷴","鷼","鹇","鹹","麙","𫍯"],"è àn":["咹"],"xuān xuǎn":["咺","烜"],"wāi hé wǒ guǎ guō":["咼"],"yàn yè yān":["咽"],āi:["哀","哎","埃","溾","銰","鎄","锿"],pǐn:["品","榀"],shěn:["哂","婶","嬸","审","宷","審","弞","曋","渖","瀋","瞫","矤","矧","覾","訠","諗","讅","谂","谉","邥","頣","魫"],"hǒng hōng hòng":["哄"],"wā wa":["哇"],"hā hǎ hà":["哈"],zāi:["哉","栽","渽","溨","災","灾","烖","睵","賳"],"dì diè":["哋"],pài:["哌","沠","派","渒","湃","蒎","鎃"],"gén hěn":["哏"],"yǎ yā":["哑","雅"],"yuě huì":["哕","噦"],nián:["哖","年","秊","秥","鮎","鯰","鲇","鲶","鵇","黏"],"huá huā":["哗","嘩"],"jì jiē zhāi":["哜","嚌"],mōu:["哞"],"yō yo":["哟","喲"],lòng:["哢","梇","贚"],"ò ó é":["哦"],"lī lǐ li":["哩"],"nǎ na nǎi né něi":["哪"],hè:["哬","垎","壑","寉","惒","焃","煂","燺","爀","癋","碋","翯","褐","謞","賀","贺","赫","靍","靎","靏","鶴","鸖","鹤"],"bō pò bā":["哱"],zhé:["哲","啠","喆","嚞","埑","悊","摺","晢","晣","歽","矺","砓","磔","籷","粍","虴","蛰","蟄","袩","詟","謫","謺","讁","讋","谪","輒","輙","轍","辄","辙","鮿"],"liàng láng":["哴"],"liè lǜ":["哷"],hān:["哻","憨","蚶","谽","酣","頇","顸","馠","魽","鼾"],"hēng hng":["哼"],gěng:["哽","埂","峺","挭","梗","綆","绠","耿","莄","郠","骾","鯁","鲠","𬒔"],"chuò yuè":["哾"],"gě jiā":["哿"],"bei bài":["唄"],"hán hàn":["唅"],chún:["唇","浱","湻","滣","漘","犉","純","纯","脣","莼","蒓","蓴","醇","醕","錞","陙","鯙","鶉","鹑","𬭚"],"ài āi":["唉"],"jiá qiǎn":["唊"],"yán dàn xián":["唌"],chē:["唓","砗","硨","莗","蛼"],"wú ńg ń":["唔"],zào:["唕","唣","噪","慥","梍","灶","煰","燥","皁","皂","竃","竈","簉","艁","譟","趮","躁","造","𥖨"],dí:["唙","啇","嘀","嚁","嫡","廸","敌","敵","梑","涤","滌","狄","笛","籴","糴","苖","荻","蔋","蔐","藡","覿","觌","豴","迪","靮","頔","馰","髢","鸐","𬱖"],"gòng hǒng gǒng":["唝","嗊"],dóu:["唞"],"lào láo":["唠","嘮","憦"],huàn:["唤","喚","奂","奐","宦","嵈","幻","患","愌","换","換","擐","攌","梙","槵","浣","涣","渙","漶","澣","烉","焕","煥","瑍","痪","瘓","睆","肒","藧","豢","轘","逭","鯇","鯶","鰀","鲩"],léng:["唥","塄","楞","碐","薐"],"wō wěi":["唩"],fěng:["唪","覂","諷","讽"],"yín jìn":["唫"],"hǔ xià":["唬"],wéi:["唯","围","圍","壝","峗","峞","嵬","帏","帷","幃","惟","桅","沩","洈","涠","湋","溈","潍","潙","潿","濰","犩","矀","維","维","蓶","覹","违","違","鄬","醀","鍏","闈","闱","韋","韦","鮠","𣲗","𬶏"],shuā:["唰"],chàng:["唱","怅","悵","暢","焻","畅","畼","誯","韔","鬯"],"ér wā":["唲"],qiàng:["唴","炝","熗","羻"],yō:["唷"],yū:["唹","淤","瘀","盓","箊","紆","纡","込","迂","迃","陓"],lài:["唻","濑","瀨","瀬","癞","癩","睐","睞","籁","籟","藾","賚","賴","赉","赖","頼","顂","鵣"],tuò:["唾","嶞","柝","毤","毻","箨","籜","萚","蘀","跅"],"zhōu zhāo tiào":["啁"],kěn:["啃","垦","墾","恳","懇","肎","肯","肻","豤","錹"],"zhuó zhào":["啅","濯"],"hēng hèng":["啈","悙"],"lín lán":["啉"],"a ā á ǎ à":["啊"],qiāng:["啌","嗴","嶈","戕","摤","斨","枪","槍","溬","牄","猐","獇","羌","羗","腔","蜣","謒","鏘","锖","锵"],"tūn zhūn xiāng duǐ":["啍"],wèn:["問","妏","揾","搵","璺","问","顐"],"cuì qi":["啐"],"dié shà jié tì":["啑"],"yuē wā":["啘"],"zǐ cǐ":["啙"],"bǐ tú":["啚"],"chuò chuài":["啜"],"yǎ yā è":["啞"],fēi:["啡","婓","婔","扉","暃","渄","猆","緋","绯","裶","霏","非","靟","飛","飝","飞","餥","馡","騑","騛","鯡","鲱","𬴂"],pí:["啤","壀","枇","毗","毘","焷","琵","疲","皮","篺","罴","羆","脾","腗","膍","蚍","蚽","蜱","螷","蠯","豼","貔","郫","鈹","阰","陴","隦","魮","鮍","鲏","鵧","鼙"],shá:["啥"],"lā la":["啦"],"yīng qíng":["啨"],pā:["啪","妑","舥","葩","趴"],"zhě shì":["啫"],sè:["啬","嗇","懎","擌","栜","歮","涩","渋","澀","澁","濇","濏","瀒","瑟","璱","瘷","穑","穡","穯","繬","譅","轖","銫","鏼","铯","飋"],niè:["啮","嗫","噛","嚙","囁","囓","圼","孼","孽","嵲","嶭","巕","帇","敜","枿","槷","櫱","涅","湼","痆","篞","籋","糱","糵","聂","聶","臬","臲","蘖","蠥","讘","踂","踗","踙","蹑","躡","錜","鎳","鑈","鑷","钀","镊","镍","闑","陧","隉","顳","颞","齧","𫔶"],"luō luó luo":["啰","囉"],"tān chǎn tuō":["啴"],bo:["啵","蔔"],dìng:["啶","定","椗","矴","碇","碠","磸","聢","腚","萣","蝊","訂","订","錠","锭","顁","飣","饤"],lāng:["啷"],"án ān":["啽"],kā:["喀","擖"],"yóng yú":["喁"],"lā lá lǎ":["喇"],jiē:["喈","喼","嗟","堦","媘","接","掲","擑","湝","煯","疖","痎","癤","皆","秸","稭","脻","蝔","街","謯","阶","階","鞂","鶛"],hóu:["喉","帿","猴","瘊","睺","篌","糇","翭","葔","鄇","鍭","餱","骺","鯸","𬭤"],"dié zhá":["喋"],wāi:["喎","歪","竵"],"nuò rě":["喏"],"xù huò guó":["喐"],zán:["喒"],"wō ō":["喔"],hú:["喖","嘝","囫","壶","壷","壺","媩","弧","搰","斛","楜","槲","湖","瀫","焀","煳","狐","猢","瑚","瓳","箶","絗","縠","胡","葫","蔛","蝴","螜","衚","觳","醐","鍸","頶","餬","鬍","魱","鰗","鵠","鶘","鶦","鹕"],"huàn yuán xuǎn hé":["喛"],xǐ:["喜","囍","壐","屣","徙","憙","枲","橲","歖","漇","玺","璽","矖","禧","縰","葈","葸","蓰","蟢","謑","蹝","躧","鈢","鉨","鉩","鱚","𬭳","𬶮"],"hē hè yè":["喝"],kuì:["喟","嘳","媿","嬇","愦","愧","憒","篑","簣","籄","聩","聭","聵","膭","蕢","謉","餽","饋","馈"],"zhǒng chuáng":["喠"],"wéi wèi":["喡","為","爲"],"duó zhà":["喥"],"sāng sàng":["喪"],"qiáo jiāo":["喬"],"pèn bēn":["喯"],"cān sūn qī":["喰"],"zhā chā":["喳"],miāo:["喵"],"pēn pèn":["喷"],kuí:["喹","夔","奎","巙","戣","揆","晆","暌","楏","楑","櫆","犪","睽","葵","藈","蘷","虁","蝰","躨","逵","鄈","鍨","鍷","頯","馗","騤","骙","魁"],"lou lóu":["喽"],"zào qiāo":["喿"],"hè xiāo xiào hù":["嗃"],"á shà":["嗄"],xiù:["嗅","岫","峀","溴","珛","琇","璓","秀","綉","繍","繡","绣","螑","袖","褎","褏","銹","鏥","鏽","锈","齅"],"qiāng qiàng":["嗆","戗","戧","蹌","蹡"],"ài yì":["嗌","艾"],"má mǎ ma":["嗎"],"kè kē":["嗑"],"dā tà":["嗒","鎉"],sǎng:["嗓","搡","磉","褬","鎟","顙","颡"],chēn:["嗔","抻","琛","瞋","諃","謓","賝","郴","𬘭"],"wā gǔ":["嗗"],"pǎng bēng":["嗙"],"xián qiǎn qiān":["嗛"],lào:["嗠","嫪","橯","涝","澇","耢","耮","躼","軂","酪"],wēng:["嗡","翁","聬","螉","鎓","鶲","鹟","𬭩"],wà:["嗢","腽","膃","袜","襪","韤"],"hēi hāi":["嗨"],hē:["嗬","欱","蠚","訶","诃"],zi:["嗭"],sǎi:["嗮"],"ǹg ńg ňg":["嗯"],gě:["嗰","舸"],ná:["嗱","拏","拿","鎿","镎"],diǎ:["嗲"],"ài ǎi āi":["嗳"],tōng:["嗵","樋","炵","蓪"],"zuī suī":["嗺"],"zhē zhè zhù zhe":["嗻"],mò:["嗼","圽","塻","墨","妺","嫼","寞","帞","昩","末","枺","歿","殁","沫","漠","爅","獏","瘼","皌","眽","眿","瞐","瞙","砞","礳","秣","絈","纆","耱","茉","莈","蓦","蛨","蟔","貃","貊","貘","銆","鏌","镆","陌","靺","驀","魩","默","黙","𬙊"],sòu:["嗽","瘶"],tǎn:["嗿","坦","忐","憳","憻","暺","毯","璮","菼","袒","襢","醓","鉭","钽"],"jiào dǎo":["嘄"],"kǎi gě":["嘅"],"shān càn":["嘇"],cáo:["嘈","嶆","曹","曺","槽","漕","艚","蓸","螬","褿","鏪","𥕢"],piào:["嘌","徱","蔈","驃"],"lóu lou":["嘍"],gǎ:["尕","玍"],"gǔ jiǎ":["嘏"],"jiāo xiāo":["嘐"],"xū shī":["嘘","噓"],pó:["嘙","嚩","婆","櫇","皤","鄱"],"dē dēi":["嘚"],"ma má":["嘛"],"lē lei":["嘞"],"gā gá gǎ":["嘠"],sāi:["嘥","噻","毢","腮","顋","鰓"],"zuō chuài":["嘬"],"cháo zhāo":["嘲","朝","鼂"],zuǐ:["嘴","噿","嶊","璻"],"qiáo qiào":["嘺","翹","谯"],"chù xù shòu":["嘼"],"tān chǎn":["嘽"],"dàn tán":["嘾","弾","彈","惔","澹"],"hēi mò":["嘿"],ě:["噁","砨","頋","騀","鵈"],"fān bo":["噃"],chuáng:["噇","床","牀"],"cù zā hé":["噈"],"tūn kuò":["噋"],"cēng chēng":["噌"],dēng:["噔","嬁","灯","燈","璒","登","竳","簦","艠","豋"],pū:["噗","扑","撲","攴","攵","潽","炇","陠"],juē:["噘","屩","屫","撧"],lū:["噜","嚕","撸","擼","謢"],zhān:["噡","岾","惉","旃","旜","枬","栴","毡","氈","氊","沾","瞻","薝","蛅","詀","詹","譫","谵","趈","邅","閚","霑","飦","饘","驙","魙","鱣","鸇","鹯","𫗴"],ō:["噢"],"zhòu zhuó":["噣"],"jiào qiào chī":["噭"],yuàn:["噮","妴","怨","愿","掾","瑗","禐","苑","衏","裫","褑","院","願"],"ǎi ài āi":["噯"],"yōng yǒng":["噰","澭"],"jué xué":["噱"],"pēn pèn fèn":["噴"],gá:["噶","尜","釓","錷","钆"],"xīn hěn hèn":["噷"],dāng:["噹","澢","珰","璫","筜","簹","艡","蟷","裆","襠"],làn:["嚂","滥","濫","烂","燗","爁","爛","爤","瓓","糷","钄"],tà:["嚃","嚺","崉","挞","搨","撻","榻","橽","毾","涾","澾","濌","禢","粏","誻","譶","蹋","蹹","躂","躢","遝","錔","闒","闥","闼","阘","鞜","鞳"],"huō huò ǒ":["嚄"],hāo:["嚆","茠","蒿","薅"],"hè xià":["嚇"],"xiù pì":["嚊"],"zhōu chóu":["嚋","盩","诪"],mē:["嚒"],"chā cā":["嚓"],"bó pào bào":["嚗"],"me mèi mò":["嚜"],"xié hái":["嚡"],"áo xiāo":["嚣"],mō:["嚤","摸"],pín:["嚬","娦","嫔","嬪","玭","矉","薲","蠙","貧","贫","顰","颦","𬞟"],mè:["嚰","濹"],"rǎng rāng":["嚷"],lá:["嚹","旯"],"jiáo jué jiào":["嚼"],chuò:["嚽","娖","擉","歠","涰","磭","踀","輟","辍","辵","辶","酫","鑡","餟","齪","龊"],"huān huàn":["嚾"],"zá cà":["囃"],chài:["囆","虿","蠆","袃","訍"],"náng nāng":["囊"],"zá zàn cān":["囋"],sū:["囌","櫯","甦","稣","穌","窣","蘇","蘓","酥","鯂"],zèng:["囎","熷","甑","贈","赠","鋥","锃"],"zá niè yàn":["囐"],nāng:["囔"],"luó luō luo":["囖"],"wéi guó":["囗"],huí:["囘","回","囬","廻","廽","恛","洄","痐","茴","蚘","蛔","蛕","蜖","迴","逥","鮰"],nín:["囜","您","脌"],"jiǎn nān":["囝"],nān:["囡"],tuán:["团","団","團","慱","抟","摶","檲","糰","鏄","鷒","鷻"],"tún dùn":["囤","坉"],guó:["囯","囶","囻","国","圀","國","帼","幗","慖","摑","漍","聝","腘","膕","蔮","虢","馘","𬇹"],kùn:["困","涃","睏"],"wéi tōng":["囲"],qūn:["囷","夋","逡"],rì:["囸","日","衵","鈤","馹","驲"],tāi:["囼","孡","胎"],pǔ:["圃","圑","擈","普","暜","樸","檏","氆","浦","溥","烳","諩","譜","谱","蹼","鐠","镨"],"quān juàn juān":["圈","圏"],"chuí chuán":["圌"],tuǎn:["圕","畽","疃"],lüè:["圙","掠","略","畧","稤","鋝","鋢","锊","䂮"],"huán yuán":["圜"],luán:["圝","圞","奱","娈","孌","孪","孿","峦","巒","挛","攣","曫","栾","欒","滦","灤","癴","癵","羉","脔","臠","虊","銮","鑾","鵉","鸞","鸾"],tǔ:["土","圡","釷","钍"],"xū wéi":["圩"],"dì de":["地","嶳"],"qiān sú":["圱"],zhèn:["圳","塦","挋","振","朕","栚","甽","眹","紖","絼","纼","誫","賑","赈","鋴","鎭","鎮","镇","阵","陣","震","鴆","鸩"],"chǎng cháng":["场","場","塲"],"qí yín":["圻"],jiá:["圿","忦","恝","戞","扴","脥","荚","莢","蛱","蛺","裌","跲","郏","郟","鋏","铗","頬","頰","颊","鴶","鵊"],"zhǐ zhì":["坁"],bǎn:["坂","岅","昄","板","版","瓪","粄","舨","蝂","鈑","钣","阪","魬"],qǐn:["坅","寑","寝","寢","昑","梫","笉","螼","赾","鋟","锓"],"méi fén":["坆"],"rǒng kēng":["坈"],"fāng fáng":["坊"],"fèn bèn":["坋"],tān:["坍","怹","摊","擹","攤","滩","灘","瘫","癱","舑","貪","贪"],"huài pēi pī péi":["坏"],"dì làn":["坔"],tán:["坛","墰","墵","壇","壜","婒","憛","昙","曇","榃","檀","潭","燂","痰","磹","罈","罎","藫","談","譚","譠","谈","谭","貚","郯","醰","錟","顃"],bà:["坝","垻","壩","弝","欛","灞","爸","矲","覇","霸","鮁","鲅"],fén:["坟","墳","妢","岎","幩","枌","棼","汾","焚","燌","燓","羒","羵","蒶","蕡","蚠","蚡","豮","豶","轒","鐼","隫","馩","魵","黂","鼖","鼢","𣸣"],zhuì:["坠","墜","惴","甀","畷","礈","綴","縋","缀","缒","腏","膇","諈","贅","赘","醊","錣","鑆"],pō:["坡","岥","泼","溌","潑","釙","鏺","钋","頗","颇","䥽"],"pǎn bàn":["坢"],kūn:["坤","堃","堒","崐","崑","昆","晜","潉","焜","熴","猑","琨","瑻","菎","蜫","裈","裩","褌","醌","錕","锟","騉","髠","髡","髨","鯤","鲲","鵾","鶤","鹍"],diàn:["坫","垫","墊","壂","奠","婝","店","惦","扂","橂","殿","淀","澱","玷","琔","电","癜","簟","蜔","鈿","電","靛","驔"],"mù mǔ":["坶"],"kē kě":["坷","軻"],xuè:["坹","岤","桖","瀥","狘","瞲","謔","谑","趐"],"dǐ chí":["坻","柢"],lā:["垃","柆","菈","邋"],lǒng:["垄","垅","壟","壠","拢","攏","竉","陇","隴","𬕂"],mín:["垊","姄","岷","崏","捪","旻","旼","民","珉","琘","琝","瑉","痻","盿","砇","緍","緡","缗","罠","苠","鈱","錉","鍲","鴖"],"dòng tóng":["垌","峒","洞"],cí:["垐","嬨","慈","柌","濨","珁","瓷","甆","磁","礠","祠","糍","茨","詞","词","辝","辞","辤","辭","雌","飺","餈","鴜","鶿","鷀","鹚"],duī:["垖","堆","塠","痽","磓","鐓","鐜","鴭"],"duò duǒ":["垛"],"duǒ duò":["垜","挆"],chá:["垞","察","嵖","搽","槎","檫","猹","茬","茶","詧","靫","𥻗"],shǎng:["垧","晌","樉","賞","贘","赏","鋿","鏛","鑜"],shǒu:["垨","守","手","扌","艏","首"],da:["垯","繨","跶"],háng:["垳","斻","杭","筕","絎","绗","航","苀","蚢","裄","貥","迒","頏","颃","魧"],"ān ǎn":["垵"],xīng:["垶","惺","星","曐","煋","猩","瑆","皨","篂","腥","興","觪","觲","謃","騂","骍","鮏","鯹"],"yuàn huán":["垸"],bāng:["垹","帮","幇","幚","幫","捠","梆","浜","邦","邫","鞤","𠳐"],"póu fú":["垺"],cén:["埁","岑","涔"],"běng fēng":["埄"],"dì fáng":["埅"],"xiá jiā":["埉"],"mái mán":["埋"],làng:["埌","崀","浪","蒗","閬","㫰"],"shān yán":["埏"],"qín jīn":["埐"],"pǔ bù":["埔"],huā:["埖","婲","椛","硴","糀","花","蒊","蘤","誮","錵"],"suì sù":["埣"],"pí pì":["埤"],"qīng zhēng":["埥","鲭"],"wǎn wān":["埦"],lǔn:["埨","稐","𫭢"],"zhēng chéng":["埩"],kōng:["埪","崆","箜","躻","錓","鵼"],"cǎi cài":["埰","寀","采"],"chù tòu":["埱"],běng:["埲","琫","菶","鞛"],"kǎn xiàn":["埳"],"yì shì":["埶","醳"],péi:["培","毰","裴","裵","賠","赔","錇","锫","阫","陪"],"sào sǎo":["埽"],"jǐn qīn jìn":["堇"],"péng bèng":["堋"],"qiàn zàn jiàn":["堑"],àn:["堓","屵","岸","按","暗","案","胺","荌","豻","貋","錌","闇","隌","黯"],"duò huī":["堕","墮"],huán:["堚","寏","寰","峘","桓","洹","澴","獂","环","環","糫","繯","缳","羦","荁","萈","萑","豲","鍰","鐶","锾","镮","闤","阛","雈","鬟","鹮","𬘫","𤩽"],"bǎo bǔ pù":["堡"],"máo móu wǔ":["堥"],ruán:["堧","壖","撋"],"ài è yè":["堨"],gèng:["堩","暅"],méi:["堳","塺","媒","嵋","徾","攗","枚","栂","梅","楣","楳","槑","湄","湈","煤","猸","玫","珻","瑂","眉","睂","禖","脄","脢","腜","苺","莓","葿","郿","酶","鎇","镅","霉","鶥","鹛","黴"],dǔ:["堵","琽","睹","笃","篤","覩","賭","赌"],féng:["堸","綘","艂","逢"],hèng:["堼"],chūn:["堾","媋","旾","春","暙","杶","椿","槆","橁","櫄","瑃","箺","萅","蝽","輴","鰆","鶞","䲠"],jiǎng:["塂","奖","奨","奬","桨","槳","獎","耩","膙","蒋","蔣","講","讲","顜"],huāng:["塃","巟","慌","肓","荒","衁"],duàn:["塅","断","斷","椴","段","毈","煅","瑖","碫","簖","籪","緞","缎","腶","葮","躖","鍛","锻"],tǎ:["塔","墖","獭","獺","鮙","鰨","鳎"],wěng:["塕","奣","嵡","攚","暡","瞈","蓊"],"sāi sài sè":["塞"],zàng:["塟","弉","臓","臟","葬","蔵","銺"],tián:["塡","屇","恬","沺","湉","璳","甛","甜","田","畋","畑","碵","磌","胋","闐","阗","鴫","鷆","鷏"],zhèng:["塣","幁","政","証","諍","證","证","诤","郑","鄭","靕","鴊"],"tián zhèn":["填"],wēn:["塭","昷","榲","殟","温","溫","瑥","瘟","蕰","豱","輼","轀","辒","鎾","饂","鰛","鰮","鳁"],liù:["塯","廇","磟","翏","雡","霤","餾","鬸","鷚","鹨"],hǎi:["塰","海","烸","酼","醢"],lǎng:["塱","朖","朗","朤","烺","蓢","㮾"],bèng:["塴","揼","泵","甏","綳","蹦","迸","逬","鏰","镚"],chén:["塵","宸","尘","忱","敐","敶","晨","曟","栕","樄","沉","煁","瘎","臣","茞","莀","莐","蔯","薼","螴","訦","諶","軙","辰","迧","鈂","陈","陳","霃","鷐","麎"],"ōu qiū":["塸"],"qiàn jiàn":["塹"],"zhuān tuán":["塼"],shuǎng:["塽","慡","漺","爽","縔","鏯"],shú:["塾","婌","孰","璹","秫","贖","赎"],lǒu:["塿","嵝","嶁","甊","篓","簍"],chí:["墀","弛","持","池","漦","竾","筂","箎","篪","茌","荎","蚳","謘","貾","赿","踟","迟","迡","遅","遟","遲","鍉","馳","驰"],shù:["墅","庶","庻","怷","恕","戍","束","树","樹","沭","漱","潄","濖","竖","竪","絉","腧","荗","蒁","虪","術","裋","豎","述","鉥","錰","鏣","霔","鶐","𬬸"],"dì zhì":["墆","疐"],kàn:["墈","崁","瞰","矙","磡","衎","鬫"],chěn:["墋","夦","硶","碜","磣","贂","趻","踸","鍖"],"zhǐ zhuó":["墌"],qiǎng:["墏","繈","繦","羥","襁"],zēng:["増","增","憎","璔","矰","磳","罾","譄","鄫","鱛","䎖"],qiáng:["墙","墻","嫱","嬙","樯","檣","漒","牆","艢","蔃","蔷","蘠"],"kuài tuí":["墤"],"tuǎn dǒng":["墥"],"qiáo què":["墧"],"zūn dūn":["墫"],"qiāo áo":["墽"],"yì tú":["墿"],"xué bó jué":["壆"],lǎn:["壈","嬾","孄","孏","懒","懶","揽","擥","攬","榄","欖","浨","漤","灠","纜","缆","罱","覧","覽","览","醂","顲"],huài:["壊","壞","蘾"],rǎng:["壌","壤","攘","爙"],"làn xiàn":["壏"],dǎo:["壔","导","導","岛","島","嶋","嶌","嶹","捣","搗","擣","槝","祷","禂","禱","蹈","陦","隝","隯"],ruǐ:["壡","桵","橤","繠","蕊","蕋","蘂","蘃"],san:["壭"],zhuàng:["壮","壯","壵","撞","焋","状","狀"],"ké qiào":["壳","殼"],kǔn:["壸","壼","悃","捆","梱","硱","祵","稇","稛","綑","裍","閫","閸","阃"],mǎng:["壾","漭","茻","莽","莾","蠎"],cún:["壿","存"],"zhǐ zhōng":["夂"],"gǔ yíng":["夃"],"jiàng xiáng":["夅","降"],"páng féng fēng":["夆"],zhāi:["夈","捚","摘","斋","斎","榸","粂","齋"],"xuàn xiòng":["夐"],wài:["外","顡"],"wǎn yuàn wān yuān":["夗"],"mǎo wǎn":["夘"],mèng:["夢","夣","孟","梦","癦","霥"],"dà dài":["大"],"fū fú":["夫","姇","枎","粰"],guài:["夬","怪","恠"],yāng:["央","姎","抰","殃","泱","秧","胦","鉠","鍈","雵","鴦","鸯"],"hāng bèn":["夯"],gǎo:["夰","搞","杲","槀","槁","檺","稁","稾","稿","縞","缟","菒","藁","藳"],"tāo běn":["夲"],"tóu tou":["头"],"yǎn tāo":["夵"],"kuā kuà":["夸","誇"],"jiá jiā gā xiá":["夹"],huà:["夻","婳","嫿","嬅","崋","摦","杹","枠","桦","槬","樺","澅","画","畫","畵","繣","舙","話","諙","譮","话","黊"],"jiā jiá gā xiá":["夾"],ēn:["奀","恩","蒽"],"dī tì":["奃"],"yǎn yān":["奄","渰"],pào:["奅","疱","皰","砲","礟","礮","靤","麭"],nài:["奈","柰","渿","耐","萘","褦","錼","鼐"],"quān juàn":["奍","弮","棬"],zòu:["奏","揍"],"qì qiè xiè":["契"],kāi:["奒","开","揩","鐦","锎","開"],"bēn bèn":["奔","泍"],tào:["套"],"zàng zhuǎng":["奘"],běn:["奙","本","楍","畚","翉","苯"],"xùn zhuì":["奞"],shē:["奢","檨","猞","畭","畲","賒","賖","赊","輋","𪨶"],"hǎ pò tǎi":["奤"],"ào yù":["奥","奧","澚"],yūn:["奫","氲","氳","蒀","蒕","蝹","贇","赟","𫖳"],"duǒ chě":["奲"],"nǚ rǔ":["女"],nú:["奴","孥","笯","駑","驽"],"dīng dǐng tiǎn":["奵"],"tā jiě":["她"],nuán:["奻"],"hǎo hào":["好"],fàn:["奿","嬎","梵","汎","泛","滼","瀪","犯","畈","盕","笵","範","范","訉","販","贩","軬","輽","飯","飰","饭"],shuò:["妁","搠","朔","槊","烁","爍","矟","蒴","鎙","鑠","铄"],"fēi pèi":["妃"],wàng:["妄","忘","旺","望","朢"],zhuāng:["妆","妝","娤","庄","庒","桩","梉","樁","粧","糚","荘","莊","装","裝"],mā:["妈","媽"],"fū yōu":["妋"],"hài jiè":["妎"],dù:["妒","妬","杜","殬","渡","秺","芏","荰","螙","蠧","蠹","鍍","镀","靯","𬭊"],miào:["妙","庙","庿","廟","玅","竗"],"fǒu pēi pī":["妚"],"yuè jué":["妜"],niū:["妞"],"nà nàn":["妠"],tuǒ:["妥","嫷","庹","椭","楕","橢","鬌","鰖","鵎"],"wàn yuán":["妧"],fáng:["妨","房","肪","防","魴","鲂"],nī:["妮"],zhóu:["妯","碡"],zhāo:["妱","巶","招","昭","釗","鉊","鍣","钊","駋","𬬿"],"nǎi nǐ":["妳"],tǒu:["妵","敨","紏","蘣","黈"],"xián xuán xù":["妶"],"zhí yì":["妷","秇"],ē:["妸","妿","婀","屙"],mèi:["妹","媚","寐","抺","旀","昧","沬","煝","痗","眛","睸","祙","篃","蝞","袂","跊","鬽","魅"],"qī qì":["妻"],"xū xǔ":["姁","稰"],"shān shàn":["姍","姗","苫","釤","钐"],mán:["姏","慲","樠","蛮","蠻","謾","饅","馒","鬗","鬘","鰻","鳗"],jiě:["姐","媎","檞","毑","飷"],"wěi wēi":["委"],pīn:["姘","拼","礗","穦","馪","驞"],"huá huó":["姡"],"jiāo xiáo":["姣"],"gòu dù":["姤"],"lǎo mǔ":["姥"],"nián niàn":["姩"],zhěn:["姫","屒","弫","抮","昣","枕","畛","疹","眕","稹","縝","縥","缜","聄","萙","袗","裖","覙","診","诊","軫","轸","辴","駗","鬒"],héng:["姮","恆","恒","烆","珩","胻","蘅","衡","鑅","鴴","鵆","鸻"],"jūn xún":["姰"],"kuā hù":["姱"],"è yà":["姶"],"xiān shēn":["姺"],wá:["娃"],"ráo rǎo":["娆","嬈"],"shào shāo":["娋"],xiē:["娎","揳","楔","歇","蝎","蠍"],"wǔ méi mǔ":["娒"],"chuò lài":["娕"],niáng:["娘","嬢","孃"],"nà nuó":["娜","𦰡"],"pōu bǐ":["娝"],"něi suī":["娞"],tuì:["娧","煺","蛻","蜕","退","駾"],mǎn:["娨","屘","満","满","滿","螨","蟎","襔","鏋"],"wú wù yú":["娪"],"xī āi":["娭"],"zhuì shuì":["娷"],"dōng dòng":["娻"],"ǎi ái è":["娾"],"ē ě":["娿"],mián:["婂","嬵","宀","杣","棉","檰","櫋","眠","矈","矊","矏","綿","緜","绵","芇","蝒"],"pǒu péi bù":["婄"],biǎo:["婊","脿","表","裱","褾","諘","錶"],"fù fàn":["婏"],wǒ:["婐","婑","我"],"ní nǐ":["婗","棿"],"quán juàn":["婘","惓"],hūn:["婚","昏","昬","棔","涽","睧","睯","碈","荤","葷","蔒","轋","閽","阍"],"qiān jǐn":["婜"],"wān wà":["婠"],"lái lài":["婡","徕","徠"],"zhōu chōu":["婤"],"chuò nào":["婥"],"nüè àn":["婩"],"hùn kūn":["婫"],"dàng yáng":["婸"],nàn:["婻"],"ruò chuò":["婼"],jiǎ:["婽","岬","斚","斝","榎","槚","檟","玾","甲","胛","鉀","钾"],"tōu yú":["婾","媮"],"yù yú":["媀"],"wéi wěi":["媁"],"dì tí":["媂","珶","苐"],róu:["媃","揉","柔","渘","煣","瑈","瓇","禸","粈","糅","脜","腬","葇","蝚","蹂","輮","鍒","鞣","騥","鰇","鶔","𫐓"],"ruǎn nèn":["媆"],miáo:["媌","嫹","描","瞄","苗","鶓","鹋"],"yí pèi":["媐"],"mián miǎn":["媔"],"tí shì":["媞","惿"],"duò tuó":["媠","沲"],ǎo:["媪","媼","艹","芺","袄","襖","镺"],"chú zòu":["媰"],yìng:["媵","映","暎","硬","膡","鱦"],"qín shēn":["嫀"],jià:["嫁","幏","架","榢","稼","駕","驾"],sǎo:["嫂"],"zhēn zhěn":["嫃"],"jiē suǒ":["嫅"],"míng mǐng":["嫇"],niǎo:["嫋","嬝","嬲","茑","蔦","袅","裊","褭","鸟"],tāo:["嫍","幍","弢","慆","掏","搯","槄","涛","滔","濤","瑫","絛","縚","縧","绦","詜","謟","轁","鞱","韜","韬","飸","饕"],biáo:["嫑"],"piáo piāo":["嫖","薸"],xuán:["嫙","悬","懸","暶","檈","漩","玄","璇","璿","痃","蜁","𫠊"],"màn mān":["嫚"],kāng:["嫝","嵻","康","慷","槺","漮","砊","穅","糠","躿","鏮","鱇","𡐓","𩾌"],"hān nǎn":["嫨"],nèn:["嫩","嫰"],zhē:["嫬","遮"],"mā má":["嫲"],piè:["嫳"],zhǎn:["嫸","展","搌","斩","斬","琖","盏","盞","輾","醆","颭","飐"],"xiān yǎn jìn":["嬐"],liǎn:["嬚","敛","斂","琏","璉","羷","脸","臉","蔹","蘝","蘞","裣","襝","鄻"],"qióng huán xuān":["嬛"],dǒng:["嬞","懂","箽","董","蕫","諌"],cān:["嬠","湌","爘","飡","餐","驂","骖"],tiǎo:["嬥","宨","晀","朓","窱","脁"],bí:["嬶","荸","鼻"],liǔ:["嬼","柳","栁","桞","桺","橮","熮","珋","綹","绺","罶","羀","鋶","锍"],"qiān xiān":["孅","欦"],"xié huī":["孈"],"huān quán":["孉"],"lí lì":["孋","麗"],"zhú chuò":["孎"],kǒng:["孔","恐"],"mā zī":["孖"],"sūn xùn":["孙","孫"],"bèi bó":["孛","誖"],"yòu niū":["孧"],zhuǎn:["孨","竱","轉"],hái:["孩","骸"],nāo:["孬"],"chán càn":["孱"],bò:["孹","檗","蘗","譒"],nái:["孻","腉"],"níng nìng":["宁","寍","寗","寜","寧","甯"],zhái:["宅"],"tū jiā":["宊"],sòng:["宋","訟","誦","讼","诵","送","鎹","頌","颂","餸"],ròu:["宍","肉","譳"],zhūn:["宒","窀","衠","諄","谆","迍"],"mì fú":["宓"],"dàng tàn":["宕"],"wǎn yuān":["宛"],chǒng:["宠","寵"],qún:["宭","峮","帬","羣","群","裙","裠"],zǎi:["宰","崽"],"bǎo shí":["宲"],"jiā jia jie":["家"],"huāng huǎng":["宺"],kuān:["宽","寛","寬","臗","鑧","髋","髖"],"sù xiǔ xiù":["宿"],"jié zǎn":["寁"],"bìng bǐng":["寎"],"jìn qǐn":["寖"],"lóu jù":["寠"],"xiě xiè":["寫"],"qīn qìn":["寴"],cùn:["寸","籿"],duì:["对","対","對","怼","憝","懟","濧","瀩","碓","祋","綐","薱","譈","譵","轛","队","陮"],"lüè luó":["寽"],"shè yè yì":["射"],"jiāng jiàng qiāng":["将"],"jiāng jiàng":["將","浆","漿","畺"],zūn:["尊","嶟","樽","罇","遵","鐏","鱒","鳟","鶎","鷷","𨱔"],"shù zhù":["尌","澍"],xiǎo:["小","晓","暁","曉","皛","皢","筱","筿","篠","謏","𫍲"],"jié jí":["尐","诘","鞊"],"shǎo shào":["少"],ěr:["尒","尓","尔","栮","毦","洱","爾","珥","耳","薾","衈","趰","迩","邇","鉺","铒","餌","饵","駬"],"wāng yóu":["尢"],wāng:["尣","尩","尪","尫","汪"],liào:["尥","尦","廖","撂","料","炓","窷","鐐","镣","𪤗"],"méng máng lóng páng":["尨"],gà:["尬","魀"],"kuì kuǐ":["尯"],tuí:["尵","弚","穨","蘈","蹪","隤","頹","頺","頽","颓","魋","𬯎"],yǐn:["尹","嶾","引","朄","檃","檼","櫽","淾","濥","瘾","癮","粌","蘟","蚓","螾","讔","赺","趛","輑","鈏","靷"],"chǐ chě":["尺"],kāo:["尻","髛"],"jìn jǐn":["尽"],"wěi yǐ":["尾"],"niào suī":["尿"],céng:["层","層","嶒","驓"],diǎo:["屌"],"píng bǐng bīng":["屏"],lòu:["屚","漏","瘘","瘺","瘻","鏤","镂","陋"],"shǔ zhǔ":["属","屬"],"xiè tì":["屟"],"chè cǎo":["屮"],"tún zhūn":["屯"],"nì jǐ":["屰"],"hóng lóng":["屸"],"qǐ kǎi":["岂","豈"],áng:["岇","昂","昻"],"gǎng gāng":["岗","崗"],kě:["岢","敤","渇","渴","炣"],gǒu:["岣","狗","玽","笱","耇","耈","耉","苟","豿"],tiáo:["岧","岹","樤","祒","笤","芀","萔","蓚","蓨","蜩","迢","鋚","鎥","鞗","髫","鯈","鰷","鲦","齠","龆"],"qū jū":["岨"],lǐng:["岭","嶺","領","领"],pò:["岶","敀","洦","湐","烞","珀","破","砶","粕","蒪","魄"],"bā kè":["峇"],luò:["峈","摞","洛","洜","犖","珞","笿","纙","荦","詻","雒","駱","骆","鵅"],"fù niè":["峊"],ěn:["峎"],"zhì shì":["峙","崻"],qiǎ:["峠","跒","酠","鞐"],"qiáo jiào":["峤","癄"],"xié yé":["峫"],bū:["峬","庯","晡","誧","逋","鈽","錻","钸","餔","鵏"],chóng:["崇","崈","爞","虫","蝩","蟲","褈","隀"],"zú cuì":["崒","椊"],"líng léng":["崚"],"dòng dōng":["崠"],xiáo:["崤","洨","淆","訤","誵"],"pí bǐ":["崥","芘"],"zhǎn chán":["崭","嶃","嶄"],"wǎi wēi":["崴"],"yáng dàng":["崵"],"shì dié":["崼"],yào:["崾","曜","熎","燿","矅","穾","窔","筄","耀","艞","药","葯","薬","藥","袎","覞","詏","讑","靿","鷂","鹞","鼼"],"kān zhàn":["嵁"],"hán dǎng":["嵅"],"qiàn kàn":["嵌"],"wù máo":["嵍"],"kě jié":["嵑","嶱"],"wēi wěi":["嵔"],kē:["嵙","柯","棵","榼","樖","牁","牱","犐","珂","疴","瞌","磕","礚","科","稞","窠","萪","薖","蚵","蝌","趷","轲","醘","鈳","钶","頦","顆","颗","髁"],"dàng táng":["嵣"],"róng yíng":["嵤","爃"],"ái kǎi":["嵦"],"kāo qiāo":["嵪"],cuó:["嵯","嵳","痤","矬","蒫","蔖","虘","鹺","鹾"],"qiǎn qīn":["嵰"],"dì dié":["嵽"],cēn:["嵾"],dǐng:["嵿","艼","薡","鐤","頂","顶","鼎","鼑"],"áo ào":["嶅"],"pǐ pèi":["嶏"],"jiào qiáo":["嶠","潐"],"jué guì":["嶡","鳜"],"zhān shàn":["嶦","鳣"],"xiè jiè":["嶰"],"guī xī juàn":["嶲"],rū:["嶿"],"lì liè":["巁","棙","爄","綟"],"xī guī juàn":["巂"],"yíng hōng":["巆"],yǐng:["巊","廮","影","摬","梬","潁","瘿","癭","矨","穎","郢","鐛","頴","颍","颕","颖"],chǎo:["巐","炒","煼","眧","麨"],cuán:["巑","櫕","欑"],chuān:["巛","川","氚","瑏","穿"],"jīng xíng":["巠"],cháo:["巢","巣","晁","漅","潮","牊","窲","罺","謿","轈","鄛","鼌"],qiǎo:["巧","愀","髜"],gǒng:["巩","廾","拱","拲","栱","汞","珙","輁","鞏"],"chà chā chāi cī":["差"],"xiàng hàng":["巷"],shuài:["帅","帥","蟀"],pà:["帊","帕","怕","袙"],"tǎng nú":["帑"],"mò wà":["帓"],"tiē tiě tiè":["帖"],zhǒu:["帚","晭","疛","睭","箒","肘","菷","鯞"],"juǎn juàn":["帣"],shuì:["帨","涗","涚","睡","稅","税","裞"],"chóu dào":["帱","幬"],"jiǎn jiān sàn":["帴"],"shà qiè":["帹"],"qí jì":["帺","荠"],"shān qiāo shēn":["幓"],"zhuàng chuáng":["幢"],"chān chàn":["幨"],miè:["幭","懱","搣","滅","灭","烕","礣","篾","蔑","薎","蠛","衊","鑖","鱴","鴓"],"gān gàn":["干"],"bìng bīng":["并","幷"],"jī jǐ":["幾"],"guǎng ān":["广"],guǎng:["広","廣","犷","獷"],me:["庅"],"dùn tún":["庉"],"bài tīng":["庍"],"yìng yīng":["应"],"dǐ de":["底"],"dù duó":["度"],"máng méng páng":["庬"],"bìng píng":["庰"],chěng:["庱","悜","睈","逞","騁","骋"],"jī cuò":["庴"],qǐng:["庼","廎","檾","漀","苘","請","謦","请","頃","顷"],"guī wěi huì":["廆"],"jǐn qín":["廑"],kuò:["廓","扩","拡","擴","濶","筈","萿","葀","蛞","闊","阔","霩","鞟","鞹","韕","頢","鬠"],"qiáng sè":["廧","薔"],"yǐn yìn":["廴","隐","隠","隱","飮","飲","饮"],"pò pǎi":["廹","迫"],"nòng lòng":["弄"],"dì tì tuí":["弟"],"jué zhāng":["弡"],"mí mǐ":["弥","彌","靡"],chāo:["弨","怊","抄","欩","訬","超","鈔","钞"],yi:["弬"],shāo:["弰","旓","烧","焼","燒","筲","艄","萷","蕱","輎","髾","鮹"],"xuān yuān":["弲"],"qiáng qiǎng jiàng":["強","强"],"tán dàn":["弹","醈"],biè:["彆"],"qiáng jiàng qiǎng":["彊"],"jì xuě":["彐"],tuàn:["彖","褖"],yuē:["彟","曰","曱","矱"],"shān xiǎn":["彡"],wén:["彣","文","炆","珳","瘒","繧","聞","芠","蚉","蚊","螡","蟁","閺","閿","闅","闦","闻","阌","雯","馼","駇","魰","鳼","鴍","鼤","𫘜"],"péng bāng":["彭"],"piāo piào":["彯"],"zhuó bó":["彴"],"tuǒ yí":["彵"],"páng fǎng":["彷"],wǎng:["彺","往","徃","惘","枉","棢","網","网","罒","罓","罔","罖","菵","蛧","蝄","誷","輞","辋","魍"],cú:["徂","殂"],"dài dāi":["待"],huái:["徊","怀","懐","懷","槐","淮","耲","蘹","褢","褱","踝"],"wā wàng jiā":["徍"],"chěng zhèng":["徎"],"dé děi de":["得"],"cóng zòng":["從"],"shì tǐ":["徥"],"tí chí":["徲","鶗","鶙"],dé:["徳","德","恴","悳","惪","淂","鍀","锝"],"zhǐ zhēng":["徴","徵"],bié:["徶","癿","莂","蛂","襒","蹩"],"chōng zhǒng":["徸"],"jiǎo jiào":["徼","笅","筊"],"lòng lǒng":["徿"],"qú jù":["忂","渠","瞿","螶"],"dìng tìng":["忊"],gǎi:["忋","改"],rěn:["忍","栠","栣","秹","稔","綛","荏","荵","躵"],chàn:["忏","懴","懺","硟","羼","韂","顫"],tè:["忑","慝","特","蟘","鋱","铽"],"tè tēi tuī":["忒"],"gān hàn":["忓","攼"],"yì qì":["忔"],"tài shì":["忕"],"xī liě":["忚"],"yīng yìng":["応","應","譍"],"mǐn wěn mín":["忞","忟"],"sōng zhōng":["忪"],"yù shū":["忬","悆"],"qí shì":["忯","耆"],"tún zhūn dùn":["忳"],"qián qín":["忴","扲"],hún:["忶","浑","渾","餛","馄","魂","鼲"],niǔ:["忸","扭","炄","狃","紐","纽","莥","鈕","钮","靵"],"kuáng wǎng":["忹"],"kāng hàng":["忼"],"kài xì":["忾","愾"],òu:["怄","慪"],"bǎo bào":["怉"],"mín mén":["怋"],"zuò zhà":["怍"],zěn:["怎"],yàng:["怏","恙","样","様","樣","漾","羕","詇"],"kòu jù":["怐"],"náo niú":["怓"],"zhēng zhèng":["怔","掙","钲","铮"],"tiē zhān":["怗"],"hù gù":["怘"],"cū jù zū":["怚"],"sī sāi":["思"],"yóu chóu":["怞"],"tū dié":["怢"],"yōu yào":["怮"],xuàn:["怰","昡","楦","泫","渲","炫","琄","眩","碹","絢","縼","繏","绚","蔙","衒","袨","贙","鉉","鏇","铉","镟","颴"],"xù xuè":["怴"],"bì pī":["怶"],"xī shù":["怸"],"nèn nín":["恁"],"tiāo yáo":["恌"],"xī qī xù":["恓"],"xiào jiǎo":["恔"],"hū kuā":["恗"],nǜ:["恧","朒","衂","衄"],hèn:["恨"],"dòng tōng":["恫"],"quán zhuān":["恮"],"è wù ě wū":["恶","惡"],tòng:["恸","慟","憅","痛","衕"],"yuān juàn":["悁"],"qiāo qiǎo":["悄"],"jiè kè":["悈"],"hào jiào":["悎"],huǐ:["悔","檓","毀","毁","毇","燬","譭"],"mán mèn":["悗","鞔"],"yī yì":["悘","衣"],quān:["悛","箞","鐉","𨟠"],"kuī lǐ":["悝"],"yì niàn":["悥"],"mèn mēn":["悶"],guàn:["悹","悺","惯","慣","掼","摜","樌","欟","泴","涫","潅","灌","爟","瓘","盥","礶","祼","罆","罐","貫","贯","躀","遦","鏆","鑵","鱹","鸛","鹳"],"kōng kǒng":["悾"],"lǔn lùn":["惀"],guǒ:["惈","果","椁","槨","粿","綶","菓","蜾","裹","褁","輠","餜","馃"],"yuān wǎn":["惌","箢"],"lán lín":["惏"],"yù xù":["惐","淢"],"chuò chuì":["惙"],"hūn mèn":["惛"],"chǎng tǎng":["惝"],"suǒ ruǐ":["惢"],cǎn:["惨","慘","憯","黪","黲","䅟"],cán:["惭","慙","慚","残","殘","蚕","蝅","蠶","蠺"],"dàn dá":["惮","憚"],rě:["惹"],"yú tōu":["愉"],"kài qì":["愒"],"dàng táng shāng yáng":["愓"],"chén xìn dān":["愖"],"kè qià":["愘"],nuò:["愞","懦","懧","掿","搦","榒","稬","穤","糑","糥","糯","諾","诺","蹃","逽","鍩","锘"],gǎn:["感","擀","敢","桿","橄","澉","澸","皯","秆","稈","笴","芉","衦","赶","趕","鱤","鳡"],"còng sōng":["愡"],"sāi sī sǐ":["愢"],"gōng gòng hǒng":["愩","慐"],"shuò sù":["愬","洬"],"yáo yào":["愮"],huàng:["愰","曂","榥","滉","皝","皩","鎤","㿠"],zhěng:["愸","抍","拯","整","晸"],cǎo:["愺","艸","草","騲"],"xì xié":["慀"],"cǎo sāo":["慅"],"xù chù":["慉"],"qiè qiàn":["慊"],"cáo cóng":["慒"],"ào áo":["慠"],"lián liǎn":["慩","梿","槤","櫣"],"jìn qín jǐn":["慬"],"dì chì":["慸"],"zhí zhé":["慹"],"lóu lǚ":["慺","鷜"],còng:["憁","謥"],"zhī zhì":["憄","知","織","织"],chēng:["憆","摚","撐","撑","晿","柽","棦","橕","檉","泟","浾","琤","瞠","碀","緽","罉","蛏","蟶","赪","赬","鏿","鐣","阷","靗","頳","饓"],biē:["憋","虌","鱉","鳖","鼈","龞"],"chéng dèng zhèng":["憕"],"xǐ xī":["憘"],"duì dùn tūn":["憞"],"xiāo jiāo":["憢"],"xián xiàn":["憪"],"liáo liǎo":["憭","燎","爎","爒"],shéng:["憴","縄","繉","繩","绳","譝"],"náo nǎo náng":["憹"],"jǐng jìng":["憼"],"jǐ jiǎo":["憿"],"xuān huān":["懁"],"cǎo sāo sào":["懆"],mèn:["懑","懣","暪","焖","燜"],"mèng méng měng":["懜"],"ài yì nǐ":["懝"],"méng měng":["懞","瞢","矒"],"qí jī jì":["懠"],mǒ:["懡"],"lán xiàn":["懢"],"yōu yǒu":["懮"],"liú liǔ":["懰","藰"],ràng:["懹","譲","讓","让"],huān:["懽","欢","歓","歡","獾","讙","貛","酄","驩","鴅","鵍"],nǎn:["戁","揇","湳","煵","腩","蝻","赧"],"mí mó":["戂"],"gàng zhuàng":["戅","戆"],"zhuàng gàng":["戇"],"xū qu":["戌"],"xì hū":["戏","戯","戲"],"jiá gā":["戛"],zéi:["戝","蠈","賊","贼","鰂","鱡","鲗"],děng:["戥","等"],"hū xì":["戱"],chuō:["戳","踔","逴"],"biǎn piān":["扁"],"shǎng jiōng":["扄"],"shàn shān":["扇"],cái:["才","材","纔","裁","財","财"],"zhā zā zhá":["扎"],"lè lì cái":["扐"],"bā pá":["扒"],"dǎ dá":["打"],rēng:["扔"],"fǎn fú":["払"],"diǎo dí yuē lì":["扚"],"káng gāng":["扛"],"yū wū":["扜"],"yū wū kū":["扝"],"tuō chǐ yǐ":["扡"],"gǔ jié xì gē":["扢"],dèn:["扥","扽"],"sǎo sào":["扫","掃"],rǎo:["扰","擾","隢"],"xī chā qì":["扱"],"bān pān":["扳"],"bā ào":["扷"],"xī zhé":["扸"],"zhì sǔn kǎn":["扻"],zhǎo:["找","沼","瑵"],"kuáng wǎng zài":["抂"],"hú gǔ":["抇","鹄","鹘"],"bǎ bà":["把"],"dǎn shěn":["抌"],"nè nì ruì nà":["抐"],zhuā:["抓","檛","簻","膼","髽"],póu:["抔","裒"],"zhé shé zhē":["折"],"póu pōu fū":["抙","捊"],pāo:["抛","拋","脬","萢"],"ǎo ào niù":["抝"],"lūn lún":["抡","掄"],"qiǎng qiāng chēng":["抢"],"zhǐ zhǎi":["抧"],"bù pū":["抪","柨"],"yǎo tāo":["抭"],"hē hè qiā":["抲"],"nǐ ní":["抳"],"pī pēi":["抷"],"mǒ mò mā":["抹"],chōu:["抽","犨","犫","瘳","篘"],"jiā yá":["拁"],"fú bì":["拂","畐","鶝"],zhǎ:["拃","眨","砟","鮺","鲝"],"dān dàn dǎn":["担"],"chāi cā":["拆"],niān:["拈","蔫"],"lā lá lǎ là":["拉"],"bàn pàn":["拌"],pāi:["拍"],līn:["拎"],guǎi:["拐","枴","柺"],"tuò tà zhí":["拓"],"ào ǎo niù":["拗"],"jū gōu":["拘"],"pīn pàn fān":["拚"],"bài bái":["拜"],bài:["拝","敗","稗","粺","薭","贁","败","韛"],qiá:["拤"],"nǐng níng nìng":["拧"],"zé zhái":["择","擇"],hén:["拫","痕","鞎"],"kuò guā":["括"],"jié jiá":["拮"],nǐn:["拰"],shuān:["拴","栓","閂","闩"],"cún zùn":["拵"],"zā zǎn":["拶","桚"],kǎo:["拷","攷","栲","烤","考"],"yí chǐ hài":["拸"],"cè sè chuò":["拺"],"zhuài zhuāi yè":["拽"],"shí shè":["拾"],bāi:["挀","掰"],"kuò guāng":["挄"],nòng:["挊","挵","齈"],"jiào jiāo":["挍","敎","教"],"kuà kū":["挎"],"ná rú":["挐"],"tiāo tiǎo":["挑"],"dié shè":["挕"],liě:["挘","毟"],"yà yǎ":["挜","掗"],"wō zhuā":["挝"],"xié jiā":["挟","挾"],"dǎng dàng":["挡","擋"],"zhèng zhēng":["挣","正","症"],"āi ái":["挨"],"tuō shuì":["挩","捝"],"tǐ tì":["挮"],"suō shā":["挱"],"sā shā suō":["挲"],"kēng qiān":["挳","摼"],"bàng péng":["挷"],"ruó ruá":["挼"],"jiǎo kù":["捁"],"wǔ wú":["捂"],tǒng:["捅","桶","筒","筩","統","綂","统","㛚"],"huò chì":["捇"],"tú shū chá":["捈"],"lǚ luō":["捋"],"shāo shào":["捎","稍"],niē:["捏","揑"],"shù sǒng sōu":["捒"],"yé yú":["捓"],"jué zhuó":["捔"],"bù pú zhì":["捗"],zùn:["捘","銌"],lāo:["捞","撈","粩"],sǔn:["损","損","榫","笋","筍","箰","鎨","隼"],"wàn wǎn wān yù":["捥"],pěng:["捧","淎","皏"],shě:["捨"],"fǔ fù bǔ":["捬"],dáo:["捯"],"luò luǒ wǒ":["捰"],"juǎn quán":["捲"],"chēn tiǎn":["捵"],"niǎn niē":["捻"],"ruó wěi ré":["捼"],zuó:["捽","昨","秨","稓","筰","莋","鈼"],"wò xiá":["捾"],"qìng qiàn":["掅"],"póu pǒu":["掊"],qiā:["掐","葜"],"pái pǎi":["排"],"qiān wàn":["掔"],"yè yē":["掖"],"niè nǐ yì":["掜"],"huò xù":["掝"],"yàn shàn yǎn":["掞"],"zhěng dìng":["掟"],kòng:["控","鞚"],tuī:["推","蓷","藬"],"zōu zhōu chōu":["掫"],tiàn:["掭","舚"],kèn:["掯","裉","褃"],pá:["掱","杷","潖","爬","琶","筢"],"guó guāi":["掴"],"dǎn shàn":["掸","撣"],"chān xiān càn shǎn":["掺"],sāo:["掻","搔","溞","繅","缫","螦","騒","騷","鰠","鱢","鳋"],pèng:["掽","椪","槰","碰","踫"],"zhēng kēng":["揁"],"jiū yóu":["揂"],"jiān jiǎn":["揃","籛"],"pì chè":["揊"],"sāi zǒng cāi":["揌"],"tí dī dǐ":["提"],"zǒng sōng":["揔"],"huáng yóng":["揘"],"zǎn zuàn":["揝"],"xū jū":["揟"],"ké qiā":["揢"],"chuāi chuǎi chuài tuán zhuī":["揣"],"dì tì":["揥"],"lá là":["揦"],là:["揧","楋","溂","瓎","瘌","翋","臘","蝋","蝲","蠟","辢","辣","鑞","镴","鬎","鯻","𬶟"],"jiē qì":["揭"],"chòng dǒng":["揰"],"dié shé yè":["揲"],"jiàn qián jiǎn":["揵"],yé:["揶","爷","爺","瑘","鋣","鎁","铘"],chān:["搀","摻","攙","裧","襜","覘","觇","辿","鋓"],"gē gé":["搁","擱"],"lǒu lōu":["搂","摟"],"chōu zǒu":["搊"],chuāi:["搋"],sūn:["搎","槂","狲","猻","荪","蓀","蕵","薞","飧","飱"],"róng náng nǎng":["搑"],"péng bàng":["搒"],cuō:["搓","瑳","磋","蹉","遳","醝"],"kē è":["搕"],"nù nuò nòu":["搙"],"lā xié xiàn":["搚"],qiǔ:["搝","糗"],"xiǎn xiān":["搟"],"jié zhé":["搩"],"pán bān pó":["搫"],bān:["搬","攽","斑","斒","班","瘢","癍","肦","螁","螌","褩","辬","頒","颁","𨭉"],"zhì nái":["搱"],"wā wǎ wà":["搲"],huá:["搳","撶","滑","猾","蕐","螖","譁","鏵","铧","驊","骅","鷨"],"qiāng qiǎng chēng":["搶"],"tián shēn":["搷"],"ná nuò":["搻"],èn:["摁"],"shè niè":["摄","攝"],bìn:["摈","擯","殡","殯","膑","臏","髌","髕","髩","鬂","鬓","鬢"],"shā sà shǎi":["摋"],"chǎn sùn":["摌"],"jiū liú liáo jiǎo náo":["摎"],"féng pěng":["摓"],shuāi:["摔"],"dì tú zhí":["摕"],"qì jì chá":["摖"],"sōu sǒng":["摗"],"liǎn liàn":["摙"],"gài xì":["摡"],"hù chū":["摢"],tàng:["摥","烫","燙","鐋"],"nái zhì":["摨"],"mó mā":["摩"],"jiāng qiàng":["摪"],"áo qiáo":["摮"],"niè chè":["摰"],"mán màn":["摱"],"chàn cán":["摲"],"sè mí sù":["摵"],"biāo biào":["摽"],"juē jué":["撅"],piē:["撆","暼","氕","瞥"],"piě piē":["撇"],"zǎn zān zēn qián":["撍"],"sā sǎ":["撒"],hòng:["撔","訌","讧","闀","鬨"],"héng guàng":["撗"],niǎn:["撚","撵","攆","涊","焾","碾","簐","蹍","蹨","躎","輦","辇"],"chéng zhěng":["撜"],"huī wéi":["撝"],cāo:["撡","操","糙"],"xiāo sōu":["撨"],"liáo liāo":["撩"],"cuō zuǒ":["撮"],"wěi tuǒ":["撱"],cuān:["撺","攛","汆","蹿","躥","鑹","镩"],"qiào yāo jī":["撽"],"zhuā wō":["撾"],"lèi léi":["擂"],nǎng:["擃","攮","曩","灢"],"qíng jǐng":["擏"],kuǎi:["擓","蒯","㧟"],"pǐ bò":["擗"],"bò bāi":["擘"],"jù jǐ":["據"],mēng:["擝"],"sǒu sòu":["擞"],xǐng:["擤","箵","醒"],cā:["擦"],"níng nǐng nìng":["擰"],"zhì jié":["擳"],"là liè":["擸","爉"],"sòu sǒu":["擻"],"lì luò yuè":["擽"],"tī zhāi zhì":["擿"],pān:["攀","潘","眅","萠"],lèi:["攂","泪","涙","淚","禷","类","纇","蘱","酹","銇","錑","頛","頪","類","颣"],"cā sǎ":["攃"],"jùn pèi":["攈"],"lì luò":["攊","躒"],"là lài":["攋","櫴"],"lú luó":["攎"],"zǎn cuán":["攒"],"xiān jiān":["攕"],"mí mǐ mó":["攠"],"zǎn cuán zàn zuān":["攢"],zuàn:["攥"],"lì shài":["攦"],"lì luǒ":["攭"],"guǐ guì":["攱"],"jī qī yǐ":["攲"],fàng:["放"],"wù móu":["敄"],"chù shōu":["敊"],"gé guó è":["敋"],"duó duì":["敓","敚"],"duō què":["敠","敪"],"sàn sǎn":["散"],"dūn duì":["敦","镦"],"qī yǐ jī":["敧"],"xiào xué":["敩"],"shù shǔ shuò":["数","數"],"ái zhú":["敱","敳"],"xiòng xuàn":["敻"],"zhuó zhú":["斀"],"yì dù":["斁"],"lí tái":["斄"],"fěi fēi":["斐"],"yǔ zhōng":["斔"],"dòu dǒu":["斗"],"wò guǎn":["斡"],"tǒu tiǎo":["斢"],dòu:["斣","梪","浢","痘","窦","竇","脰","荳","豆","逗","郖","酘","閗","闘","餖","饾","鬥","鬦","鬪","鬬","鬭"],"yín zhì":["斦"],"chǎn jiè":["斺"],"wū yū yú":["於"],"yóu liú":["斿"],"páng bàng":["旁"],"máo mào":["旄"],"pī bì":["旇"],"xuán xuàn":["旋"],"wú mó":["无"],zǎo:["早","枣","栆","棗","澡","璪","薻","藻","蚤"],gā:["旮"],"gàn hàn":["旰"],"tái yīng":["旲"],"xū xù":["旴"],"tūn zhùn":["旽"],"wù wǔ":["旿"],"pò pèi":["昢"],zòng:["昮","猔","疭","瘲","粽","糉","糭","縦"],ǎi:["昹","毐","矮","蔼","藹","譪","躷","霭","靄"],"huàng huǎng":["晃"],xuǎn:["晅","癣","癬","选","選"],"xù kuā":["晇"],hǒng:["晎"],shài:["晒","曬"],"yūn yùn":["晕","煴"],"shèng chéng":["晟","椉","盛"],"jǐng yǐng":["景"],shǎn:["晱","熌","睒","覢","閃","闪","陕","陝"],"qǐ dù":["晵"],"ǎn àn yǎn":["晻"],"wǎng wàng":["暀"],zàn:["暂","暫","瓉","瓒","瓚","禶","襸","讃","讚","賛","贊","赞","蹔","鄼","錾","鏨","饡"],"yùn yūn":["暈"],"mín mǐn":["暋"],"dǔ shǔ":["暏"],shǔ:["暑","曙","潻","癙","糬","署","薥","薯","藷","蜀","蠴","襡","襩","鱪","鱰","黍","鼠","鼡"],"jiǎn lán":["暕"],nuǎn:["暖","煗","餪"],"bào pù":["暴"],"xī xǐ":["暿"],"pù bào":["曝","瀑"],"qū qǔ":["紶"],"qǔ qū":["曲"],"gèng gēng":["更"],"hū hù":["曶","雽"],"zēng céng":["曽","橧"],"céng zēng":["曾","竲"],"cǎn qián jiàn":["朁"],"qiè hé":["朅"],"bì pí":["朇","禆","笓","裨"],"yǒu yòu":["有"],"bān fén":["朌","鳻"],"fú fù":["服","洑"],"fěi kū":["朏","胐"],"qú xù chǔn":["朐"],"juān zuī":["朘"],"huāng máng wáng":["朚"],"qī jī":["期"],"tóng chuáng":["朣","橦"],zhá:["札","牐","箚","蚻","譗","鍘","铡","閘","闸"],"zhú shù shú":["朮"],"shù shú zhú":["术"],"zhū shú":["朱"],"pǔ pò pō piáo":["朴"],"dāo tiáo mù":["朷"],"guǐ qiú":["朹"],xiǔ:["朽","滫","潃","糔"],"chéng chēng":["朾"],zá:["杂","沯","砸","襍","雑","雜","雥","韴"],"yú wū":["杅"],"gān gǎn":["杆"],"chā chà":["杈"],"shān shā":["杉"],cūn:["村","皴","竴","膥","踆","邨"],"rèn ér":["杒","梕"],"sháo biāo":["杓"],"dì duò":["杕","枤"],"gū gài":["杚"],"yí zhì lí duò":["杝"],"gàng gāng":["杠"],"tiáo tiāo":["条","條"],"mà mǎ":["杩"],"sì zhǐ xǐ":["杫"],"yuán wán":["杬","蚖"],"bèi fèi":["杮"],"shū duì":["杸"],"niǔ chǒu":["杻"],"wò yuè":["枂","臒"],máo:["枆","毛","氂","渵","牦","矛","罞","茅","茆","蝥","蟊","軞","酕","鉾","錨","锚","髦","鶜"],"pī mì":["枈"],àng:["枊","盎","醠"],"fāng bìng":["枋"],"hù dǐ":["枑"],xín:["枔","襑","鐔","鬵"],"yāo yǎo":["枖"],"ě è":["枙"],"zhī qí":["枝"],"cōng zōng":["枞","樅"],"xiān zhēn":["枮"],"tái sì":["枱"],"gǒu jǔ gōu":["枸"],"bāo fú":["枹"],"yì xiè":["枻","栧"],"tuó duò":["柁","馱","駄","驮"],"yí duò lí":["柂"],"nǐ chì":["柅"],"pán bàn":["柈","跘"],"yǎng yàng yāng yīng":["柍"],"fù fū fǔ":["柎"],"bǎi bó bò":["柏"],mǒu:["某"],"sháo shào":["柖"],zhè:["柘","樜","浙","淛","蔗","蟅","這","鷓","鹧","䗪"],"yòu yóu":["柚","櫾"],"guì jǔ":["柜"],"zhà zuò":["柞"],"dié zhì":["柣","眰"],"zhā zǔ zū":["柤"],"chá zhā":["查","査"],"āo ào":["柪","軪"],"bā fú pèi bó biē":["柭"],"duò zuó wù":["柮"],"bì bié":["柲"],"zhù chù":["柷"],"bēi pēi":["柸"],"shì fèi":["柹"],"shān zhà shi cè":["栅"],"lì yuè":["栎","櫟"],"qì qiè":["栔","砌"],"qī xī":["栖","蹊"],"guā kuò":["栝"],"bīng bēn":["栟"],"xiào jiào":["校"],"jiàn zùn":["栫","袸"],"yǒu yù":["栯"],"hé hú":["核"],gēn:["根","跟"],"zhī yì":["栺"],"gé gē":["格"],"héng háng":["桁"],"guàng guāng":["桄"],"yí tí":["桋","荑"],sāng:["桑","桒","槡"],"jú jié":["桔"],"yú móu":["桙"],"ráo náo":["桡","橈"],"guì huì":["桧","檜"],"chén zhèn":["桭"],"tīng yíng":["桯"],"bó po":["桲"],"bèn fàn":["桳"],"fēng fèng":["桻","葑"],"sù yìn":["梀"],"tǐng tìng":["梃"],"xuān juān xié":["梋"],"tú chá":["梌"],"āo yòu":["梎"],kuǎn:["梡","欵","款","歀"],"shāo sào":["梢"],"qín chén cén":["梣"],"lí sì qǐ":["梩"],"chān yán":["梴"],"bīn bīng":["梹","槟","檳"],"táo chóu dào":["梼"],"cōng sōng":["棇"],"gùn hùn":["棍"],"dé zhé":["棏"],"pái bèi pèi":["棑"],"bàng pǒu bèi bēi":["棓"],"dì dài tì":["棣"],sēn:["森","椮","槮","襂"],"rěn shěn":["棯"],"léng lēng líng":["棱"],"fú sù":["棴"],"zōu sǒu":["棷"],zōu:["棸","箃","緅","諏","诹","邹","郰","鄒","鄹","陬","騶","驺","鯫","鲰","黀","齱","齺"],"zhào zhuō":["棹"],"chēn shēn":["棽"],"jiē qiè":["椄"],"yǐ yī":["椅"],"chóu zhòu diāo":["椆"],"qiāng kōng":["椌"],"zhuī chuí":["椎"],"bēi pí":["椑"],mēn:["椚"],"quān juàn quán":["椦"],"duǒ chuán":["椯"],"wěi huī":["椲"],"jiǎ jiā":["椵"],"hán jiān":["椷"],"shèn zhēn":["椹"],"yàn yà":["椻"],"zhā chá":["楂"],"guō kuǎ":["楇"],"jí zhì":["楖"],"kǔ hù":["楛"],"yóu yǒu":["楢"],"sǒng cōng":["楤"],"yuán xuàn":["楥"],"yǎng yàng yīng":["楧"],pián:["楩","胼","腁","賆","蹁","駢","騈","骈","骿","㛹"],"dié yè":["楪"],"dùn shǔn":["楯"],"còu zòu":["楱"],"dì dǐ shì":["楴"],"kǎi jiē":["楷"],"róu ròu":["楺"],"lè yuè":["楽"],"wēn yùn":["榅","鞰"],lǘ:["榈","櫚","氀","膢","藘","閭","闾","驢","驴"],shén:["榊","神","鉮","鰰","𬬹"],"bī pi":["榌"],"zhǎn niǎn zhèn":["榐"],"fú fù bó":["榑"],"jiàn jìn":["榗"],"bǎng bàng":["榜"],"shā xiè":["榝","樧"],nòu:["槈","耨","鎒","鐞"],"qiǎn lián xiàn":["槏"],gàng:["槓","焵","焹","筻","鿍"],gāo:["槔","槹","橰","櫜","睾","篙","糕","羔","臯","韟","餻","高","髙","鷎","鷱","鼛"],"diān zhěn zhēn":["槙"],"kǎn jiàn":["槛"],"xí dié":["槢"],"jī guī":["槣"],"róng yōng":["槦"],"tuán shuàn quán":["槫"],"qì sè":["槭"],"cuī zhǐ":["槯"],"yǒu chǎo":["槱"],"màn wàn":["槾"],"lí chī":["樆"],"léi lěi":["樏","櫑","礌"],"cháo jiǎo chāo":["樔"],"chēng táng":["樘"],"jiū liáo":["樛"],"mó mú":["模"],"niǎo mù":["樢"],"héng hèng":["横","橫"],xuě:["樰","膤","艝","轌","雪","鱈","鳕"],"fá fèi":["橃"],rùn:["橍","润","潤","膶","閏","閠","闰"],"zhǎn jiǎn":["橏"],shùn:["橓","瞚","瞬","舜","蕣","順","顺","鬊"],"tuí dūn":["橔"],"táng chēng":["橖"],"sù qiū":["橚"],"tán diàn":["橝"],"fén fèn fèi":["橨"],"rǎn yān":["橪"],"cū chu":["橻"],"shū qiāo":["橾"],"píng bò":["檘"],"zhái shì tú":["檡"],"biǎo biāo":["檦"],"qiān lián":["檶"],"nǐ mí":["檷"],"jiàn kǎn":["檻"],"nòu ruǎn rú":["檽"],"jī jì":["櫅","禨"],"huǎng guǒ gǔ":["櫎"],"lǜ chū":["櫖"],"miè mèi":["櫗"],ōu:["櫙","欧","歐","殴","毆","瓯","甌","膒","藲","謳","讴","鏂","鴎","鷗","鸥"],"zhù zhuó":["櫡"],"jué jì":["櫭"],"huái guī":["櫰"],"chán zhàn":["欃"],"wéi zuì":["欈"],cáng:["欌","鑶"],"yù yì":["欥"],"chù qù xì":["欪"],"kài ài":["欬"],"yì yīn":["欭"],"xì kài":["欯"],"shuò sòu":["欶"],"ǎi ēi éi ěi èi ê̄ ế ê̌ ề":["欸"],"qī yī":["欹"],"chuā xū":["欻"],"chǐ chuài":["欼"],"kǎn qiàn":["欿"],"kǎn kè":["歁"],"chuǎn chuán":["歂"],"yīn yān":["歅"],"jìn qūn":["歏"],pēn:["歕"],"xū chuā":["歘"],"xī shè":["歙"],"liǎn hān":["歛"],"zhì chí":["歭"],"sè shà":["歰"],sǐ:["死"],"wěn mò":["歾"],piǎo:["殍","皫","瞟","醥","顠"],"qíng jìng":["殑"],"fǒu bó":["殕"],"zhí shi":["殖"],"yè yān yàn":["殗"],"hūn mèi":["殙"],chòu:["殠","臰","遚"],"kuì huì":["殨","溃","潰"],cuàn:["殩","熶","爨","窜","竄","篡","簒"],"yīn yān yǐn":["殷"],"qìng kēng shēng":["殸"],"yáo xiáo xiào":["殽"],"gū gǔ":["毂","蛄"],"guàn wān":["毌"],"dú dài":["毒"],"xún xùn":["毥"],mú:["毪","氁"],"dòu nuò":["毭"],"sāi suī":["毸"],lu:["氇"],sào:["氉","瘙","矂","髞"],"shì zhī":["氏"],"dī dǐ":["氐"],"máng méng":["氓"],"yáng rì":["氜"],shuǐ:["水","氵","氺","閖"],"zhěng chéng zhèng":["氶"],tǔn:["氽"],"fán fàn":["氾"],"guǐ jiǔ":["氿"],"bīn pà pā":["汃"],"zhuó què":["汋"],"dà tài":["汏"],pìn:["汖","牝","聘"],"hàn hán":["汗","馯"],tu:["汢"],"tāng shāng":["汤","湯"],"zhī jì":["汥"],"gàn hán cén":["汵"],"wèn mén":["汶"],"fāng pāng":["汸"],"hǔ huǎng":["汻"],"niú yóu":["汼"],hàng:["沆"],"shěn chén":["沈"],"dùn zhuàn":["沌"],"nǜ niǔ":["沑"],"méi mò":["沒","没"],"tà dá":["沓"],"mì wù":["沕"],"hóng pāng":["沗"],"shā shà":["沙"],"zhuǐ zǐ":["沝"],"ōu òu":["沤","漚"],"jǔ jù":["沮"],"tuō duó":["沰"],"mǐ lì":["沵"],"yí chí":["沶"],"xiè yì":["泄"],"bó pō":["泊"],"mì bì":["泌","秘"],"chù shè":["泏"],"yōu yòu āo":["泑"],"pēng píng":["泙","硑"],"pào pāo":["泡"],"ní nì":["泥","秜"],"yuè sà":["泧"],"jué xuè":["泬","疦"],"lóng shuāng":["泷","瀧"],"luò pō":["泺","濼"],"zé shì":["泽","澤"],"sǎ xǐ":["洒"],"sè qì zì":["洓"],"xǐ xiǎn":["洗"],"kǎo kào":["洘"],"àn yàn è":["洝"],"lěi lèi":["洡"],"qiè jié":["洯"],"qiǎn jiān":["浅"],"jì jǐ":["济","済","濟","纪"],"hǔ xǔ":["浒","滸"],"jùn xùn":["浚","濬"],"yǐng chéng yíng":["浧"],"liàn lì":["浰"],"féng hóng":["浲","溄"],"jiǒng jiōng":["浻"],"suī něi":["浽"],"yǒng chōng":["涌"],"tūn yūn":["涒"],"wō guō":["涡","渦"],hēng:["涥","脝"],"zhǎng zhàng":["涨","漲"],"shòu tāo":["涭"],shuàn:["涮","腨"],"kōng náng":["涳"],"wò wǎn yuān":["涴"],"tuō tuò":["涶"],wō:["涹","猧","窝","窩","莴","萵","蜗","蝸","踒"],"qiè jí":["淁"],"guǒ guàn":["淉"],"lín lìn":["淋","獜","疄"],"tǎng chǎng":["淌"],"nào chuò zhuō":["淖"],"péng píng":["淜"],féi:["淝","肥","腓","蜰"],"pì pèi":["淠"],"niǎn shěn":["淰"],"biāo hǔ":["淲"],"chún zhūn":["淳"],"hùn hún":["混"],qiǎn:["淺","繾","缱","肷","膁","蜸","譴","谴","遣","鑓"],"wèn mín":["渂"],"rè ruò luò":["渃"],"dú dòu":["渎","瀆","读"],"jiàn jiān":["渐","溅","漸","濺"],"miǎn shéng":["渑","澠"],"nuǎn nuán":["渜"],"qiú wù":["渞"],"tíng tīng":["渟"],"dì tí dī":["渧"],"gǎng jiǎng":["港"],"hōng qìng":["渹"],tuān:["湍","煓"],"huì mǐn xū":["湏"],"xǔ xù":["湑"],pén:["湓","瓫","盆","葐"],"mǐn hūn":["湣"],"tuàn nuǎn":["湪"],"qiū jiǎo":["湫","湬"],"yān yīn":["湮"],"bàn pán":["湴"],"zhuāng hún":["湷"],"yàn guì":["溎"],"lián liǎn nián xián xiàn":["溓"],"dá tǎ":["溚","鿎"],"liū liù":["溜","澑","蹓"],lùn:["溣"],mǎ:["溤","犸","獁","玛","瑪","码","碼","遤","鎷","馬","马","鰢","鷌"],"zhēn qín":["溱"],"nì niào":["溺"],"chù xù":["滀","畜"],"wěng wēng":["滃"],"hào xuè":["滈"],"qì xì xiē":["滊"],"xíng yíng":["滎"],"zé hào":["滜"],"piāo piào piǎo":["漂"],"cóng sǒng":["漎"],"féng péng":["漨"],"luò tà":["漯"],"pēng bēn":["漰"],"chóng shuāng":["漴"],"huǒ kuò huò":["漷"],"liáo liú":["漻"],"cuǐ cuī":["漼"],"cóng zǒng":["潀"],"cóng zōng":["潈"],"pì piē":["潎"],"dàng xiàng":["潒"],"huáng guāng":["潢"],"liáo lào lǎo":["潦"],"cōng zòng":["潨"],"zhí zhì":["潪"],"tān shàn":["潬"],"tú zhā":["潳"],"sàn sǎ":["潵"],hēi:["潶","黑","黒","𬭶"],"chéng dèng":["澄","瀓"],"cūn cún":["澊"],"péng pēng":["澎"],"hòng gǒng":["澒","銾"],"wàn màn":["澫"],"kuài huì":["澮"],"guō wō":["濄"],"pēn fén":["濆"],"jí shà":["濈"],"huì huò":["濊"],"dǐng tìng":["濎"],"mǐ nǐ":["濔"],"bì pì":["濞"],"cuì zuǐ":["濢"],"hù huò":["濩"],"ǎi kài kè":["濭"],"wěi duì":["濻","瀢"],"zàn cuán":["濽","灒"],"yǎng yàng":["瀁"],"wǎng wāng":["瀇"],"mò miè":["瀎","眜"],suǐ:["瀡","膸","髓"],"huái wāi":["瀤"],"zùn jiàn":["瀳"],"yīng yǐng yìng":["瀴"],"ráng ràng":["瀼"],shuàng:["灀"],"zhuó jiào zé":["灂"],sǎ:["灑","訯","靸"],"luán luàn":["灓"],"dǎng tǎng":["灙"],"xún quán quàn":["灥"],"huǒ biāo":["灬"],"zhà yù":["灹"],"fén bèn":["炃"],"jiǒng guì":["炅"],"pàng fēng":["炐"],quē:["炔","缺","缼","蒛"],biān:["炞","煸","甂","砭","笾","箯","籩","編","编","蝙","邉","邊","鍽","鞭","鯾","鯿","鳊"],"zhāo zhào":["炤"],"zhuō chù":["炪"],"pào páo bāo":["炮"],"páo fǒu":["炰"],"shǎn qián shān":["炶"],"zhà zhá":["炸"],"jiǎo yào":["烄"],quǎn:["烇","犬","犭","畎","綣","绻","虇"],"yàng yáng":["烊"],"lào luò":["烙"],"huí huǐ":["烠"],rè:["热","熱"],"fú páo":["烰"],"xiè chè":["烲","焎"],"yàn shān":["烻"],"hūn xūn":["焄"],kào:["焅","犒","銬","铐","靠","鮳","鯌","鲓","㸆"],"juān yè":["焆"],"jùn qū":["焌"],"tāo dào":["焘"],"chǎo jù":["焣"],"wò ài":["焥"],"zǒng cōng":["焧"],"xī yì":["焬"],"xìn xīn":["焮"],"chāo zhuō":["焯"],"xiǒng yīng":["焸","焽"],kuǐ:["煃","跬","蹞","頍","𫠆"],"huī yùn xūn":["煇"],"jiǎo qiāo":["煍"],"qián shǎn shān":["煔"],"xī yí":["煕"],"shà shā":["煞"],"yè zhá":["煠"],"yáng yàng":["煬"],"ēn yūn":["煾"],"yūn yǔn":["熅"],"hè xiāo":["熇"],xióng:["熊","熋","雄"],"xūn xùn":["熏","爋"],gòng:["熕","貢","贡"],liū:["熘"],"cōng zǒng":["熜"],"lù āo":["熝"],"shú shóu":["熟"],"fēng péng":["熢"],"cuǐ suī":["熣"],tēng:["熥","膯","鼟"],"yùn yù":["熨"],"áo āo":["熬"],"hàn rǎn":["熯"],"ōu ǒu":["熰"],"huáng huǎng":["熿"],"chǎn dǎn chàn":["燀"],"jiāo zhuó qiáo jué":["燋"],"yàn yān":["燕"],"tài liè":["燤"],āo:["爊"],"yàn xún":["爓"],"jué jiào":["爝","覐","覚","覺","觉"],"lǎn làn":["爦"],"zhuǎ zhǎo":["爪"],"zhǎo zhuǎ":["爫"],"fù fǔ":["父"],diē:["爹","褺","跌"],zāng:["牂","羘","臧","賍","賘","贓","贜","赃","髒"],"piàn piān":["片"],"biān miàn":["牑"],bǎng:["牓","綁","绑"],"yǒu yōng":["牗"],"chēng chèng":["牚","竀"],niú:["牛","牜"],"jiū lè":["牞"],"mù móu":["牟"],māng:["牤"],"gē qiú":["牫"],"yòu chōu":["牰"],"tè zhí":["犆"],bēn:["犇","錛","锛"],"jiān qián":["犍","玪"],má:["犘","痲","蔴","蟇","麻"],"máo lí":["犛"],"bá quǎn":["犮"],"zhuó bào":["犳"],"àn hān":["犴"],"kàng gǎng":["犺"],"pèi fèi":["犻"],"fān huān":["犿"],kuáng:["狂","狅","誑","诳","軖","軠","鵟","𫛭"],"yí quán chí":["狋"],"xīng shēng":["狌"],"tuó yí":["狏"],kǔ:["狜","苦"],"huán huān":["狟"],"hé mò":["狢"],"tà shì":["狧"],"máng dòu":["狵"],"xī shǐ":["狶"],suān:["狻","痠","酸"],"bài pí":["猈"],"jiān yàn":["猏","豣"],"yī yǐ":["猗"],"yá wèi":["猚"],cāi:["猜"],"māo máo":["猫","貓"],"chuàn chuān":["猭"],"tuān tuàn":["猯","貒"],"yà jiá qiè":["猰"],"hè xiē gé hài":["猲"],"biān piàn":["猵","獱"],"bó pò":["猼"],"háo gāo":["獋"],"fén fèn":["獖"],"yào xiāo":["獟"],"shuò xī":["獡"],"gé liè xiē":["獦"],"nòu rú":["獳"],"náo nǎo yōu":["獶"],ráng:["獽","瓤","禳","穣","穰","蘘","躟","鬤"],"náo yōu":["獿"],"lǜ shuài":["率"],"wáng wàng":["王"],"yáng chàng":["玚"],"mín wén":["玟"],"bīn fēn":["玢"],"mén yǔn":["玧"],"qiāng cāng":["玱","瑲","篬"],"án gān":["玵"],"xuán xián":["玹"],"cī cǐ":["玼","跐"],"yí tāi":["珆"],"zǔ jù":["珇"],fà:["珐","琺","蕟","髪","髮"],"yín kèn":["珢"],"huī hún":["珲"],"xuán qióng":["琁"],"fú fū":["琈"],"bǐng pín":["琕"],"cuì sè":["琗"],"yù wéi":["琟"],"tiǎn tiàn":["琠"],"zhuó zuó":["琢"],"běng pěi":["琣"],guǎn:["琯","璭","痯","筦","管","舘","輨","錧","館","馆","鳤"],"hún huī":["琿"],"xié jiē":["瑎"],"chàng dàng yáng":["瑒"],"tiàn zhèn":["瑱"],"bīn pián":["瑸","璸"],"tú shū":["瑹"],cuǐ:["璀","皠","趡"],"zǎo suǒ":["璅"],"jué qióng":["璚"],"lú fū":["璷"],"jì zī":["璾"],suí:["瓍","綏","绥","遀","随","隨","髄"],"mí xǐ":["瓕"],"qióng wěi wèi":["瓗"],"huán yè yà":["瓛"],"bó páo":["瓟"],"zhí hú":["瓡"],piáo:["瓢","闝"],"wǎ wà":["瓦"],"xiáng hóng":["瓨"],wèng:["瓮","甕","罋","蕹","齆"],"shèn shén":["甚"],ruí:["甤","緌","蕤"],yòng:["用","砽","苚","蒏","醟","㶲"],shuǎi:["甩"],béng:["甭","甮"],"yóu zhá":["甴"],"diàn tián shèng":["甸"],"tǐng dīng":["町","甼"],"zāi zī":["甾"],"bì qí":["畁"],"dá fú":["畗"],"cè jì":["畟"],"zāi zī tián":["畠"],"zhì chóu shì":["畤"],"fān pān":["畨","番"],"shē yú":["畬"],"dāng dàng dǎng":["當"],"jiāng qiáng":["疆"],"pǐ yǎ shū":["疋"],"jié qiè":["疌"],"yí nǐ":["疑"],nè:["疒","眲","訥","讷"],"gē yì":["疙"],"nüè yào":["疟","瘧"],"lì lài":["疠","癘"],"yǎ xiā":["疨"],xuē:["疶","蒆","薛","辥","辪","靴","鞾"],"dǎn da":["疸"],"fá biǎn":["疺"],"fèi féi":["疿","痱"],"shān diàn":["痁"],"téng chóng":["痋"],"tōng tóng":["痌"],"wěi yòu yù":["痏"],"tān shǐ":["痑"],"pū pù":["痡","鋪"],"bēng péng":["痭"],"má lìn":["痳"],"tiǎn diàn":["痶"],"ān yè è":["痷"],"kē ē":["痾"],"zhì chì":["瘈"],"jiǎ xiá xiā":["瘕"],"lěi huì":["瘣"],"chài cuó":["瘥"],"diān chēn":["瘨"],"da dá":["瘩"],"biě biē":["瘪"],qué:["瘸"],"dàn dān":["癉"],"guì wēi":["癐"],"nòng nóng":["癑"],"biē biě":["癟"],"bō bǒ":["癷"],bái:["白"],"jí bī":["皀"],"de dì dí dī":["的"],"pā bà":["皅"],"gāo háo":["皋"],"gāo yáo":["皐"],"lì luò bō":["皪"],"zhā cǔ":["皻"],"zhāo zhǎn dǎn":["皽"],"jiān jiàn":["监","監","鋻","间","鞬"],"gài gě hé":["盖"],"máng wàng":["盳"],yuǎn:["盶","逺","遠"],"tián xián":["盷"],"xiāng xiàng":["相"],dǔn:["盹","趸","躉"],"xì pǎn":["盻"],"shěng xǐng":["省"],"yún hùn":["眃"],"miǎn miàn":["眄"],"kàn kān":["看"],"yìng yāng yǎng":["眏"],"yǎo āo ǎo":["眑"],"jū xū kōu":["眗"],"yí chì":["眙"],"dié tì":["眣"],"bǐng fǎng":["眪"],"pàng pán":["眫"],"mī mí":["眯","瞇"],"xuàn shùn xún":["眴"],tiào:["眺","粜","糶","覜","趒"],"zhe zhuó zháo zhāo":["着"],"qiáo shào xiāo":["睄"],"cuó zhuài":["睉"],gùn:["睔","謴"],"suì zuì":["睟"],"pì bì":["睥","稫","辟"],"yì zé gāo":["睪"],"xǐng xìng":["睲"],"guì wèi kuì":["瞆"],"kòu jì":["瞉"],"qióng huán":["瞏"],"mán mén":["瞒","瞞"],"diāo dōu":["瞗"],"lou lóu lǘ":["瞜"],"shùn rún":["瞤"],"liào liǎo":["瞭","钌"],"jiàn xián":["瞯"],"wǔ mí":["瞴"],"guì kuì":["瞶"],"nǐng chēng":["矃"],"huò yuè":["矆"],"mēng méng":["矇"],"kuàng guō":["矌"],"guàn quán":["矔"],"mǎn mán":["矕"],"jīn guān qín":["矜"],"jīn qín guān":["矝"],"yù xù jué":["矞"],"jiǎo jiáo":["矫","矯"],duǎn:["短"],"shí dàn":["石"],"gāng qiāng kòng":["矼"],"huā xū":["砉"],"pīn bīn fēn":["砏"],"yán yàn":["研","硏"],"luǒ kē":["砢"],"fú fèi":["砩","笰"],"zhǔ zhù":["砫"],"lá lì lā":["砬"],"kuāng guāng":["硄"],"gè luò":["硌"],"shuò shí":["硕","碩"],"wèi wéi ái":["硙"],"què kè kù":["硞"],"mǎng bàng":["硥"],"luò lòng":["硦"],"yǒng tóng":["硧"],nüè:["硸","虐"],"kēng kěng":["硻"],"yān yǎn":["硽"],"zhuì chuí duǒ":["硾"],"kōng kòng":["硿"],"zòng cóng":["碂"],"jiān zhàn":["碊"],"lù liù":["碌","陆"],"què xī":["碏"],"lún lǔn lùn":["碖"],"náo gāng":["碙"],"jié yà":["碣"],"wèi wěi":["碨"],"tí dī":["碮"],"chá chā":["碴"],"qiāo què":["碻"],"sù xiè":["碿"],"liú liù":["磂","遛","鎦","馏"],"sī tí":["磃"],"bàng páng":["磅"],"huá kě gū":["磆"],"wěi kuǐ":["磈"],"xiá qià yà":["磍"],"lián qiān":["磏"],"wèi ái gài":["磑"],"lá lā":["磖"],"áo qiāo":["磝"],"pēng pèng":["磞","閛"],"yīn yǐn":["磤"],"lěi léi":["磥"],"mó mò":["磨"],"qì zhú":["磩"],"láo luò":["磱"],"pán bō":["磻"],"jí shé":["磼"],"hé qiāo qiào":["礉"],"kè huò":["礊"],"què hú":["礐"],"è qì":["礘"],cǎ:["礤","礸"],"xián xín":["礥"],"léi lěi lèi":["礧"],"yán yǎn":["礹"],"qí zhǐ":["祇","蚔"],"bēng fāng":["祊"],"bì mì":["祕"],suàn:["祘","笇","筭","算","蒜"],"piào piāo":["票"],"jì zhài":["祭"],"shuì lèi":["祱"],"jìn jīn":["禁"],"chán shàn":["禅"],"yáng shāng":["禓"],"zhī zhǐ tí":["禔"],"shàn chán":["禪"],"yú yù ǒu":["禺"],"zǐ zì":["秄"],"chá ná":["秅"],"zhǒng zhòng chóng":["种"],"hào mào":["秏"],"kù kū":["秙"],zū:["租","葅"],chèng:["秤","穪"],"huó kuò":["秮","秳"],"chēng chèn chèng":["称","稱"],"shì zhì":["秲","銴"],"fù pū":["秿"],"xùn zè":["稄"],"tú shǔ":["稌"],"zhùn zhǔn":["稕"],"jī qí":["稘","綨","觭"],"léng líng":["稜"],"zuì zú sū":["稡"],"xì qiè":["稧","郄"],"zhǒng zhòng":["種"],"zōng zǒng":["稯"],"xián jiān liàn":["稴"],"zī jiū":["稵"],"jī qǐ":["稽"],ròng:["穃"],"shān cǎn cēn":["穇"],"mén méi":["穈"],"jǐ jì":["穖"],"xiāo rào":["穘"],"zhuō bó":["穛"],"tóng zhǒng zhòng":["穜"],zuō:["穝"],"biāo pāo":["穮","藨"],"zhuō jué":["穱"],"cuán zàn":["穳"],"kōng kòng kǒng":["空"],"yū yǔ":["穻"],zhǎi:["窄","鉙"],báo:["窇","雹"],"kū zhú":["窋"],"jiào liáo liù":["窌"],"wā guī":["窐"],"tiǎo yáo":["窕"],"xūn yìn":["窨"],"yà yē":["窫"],"tián diān yǎn":["窴"],"chāo kē":["窼"],"kuǎn cuàn":["窽","窾"],"chù qì":["竐"],"qǔ kǒu":["竘"],"jìng zhěn":["竧"],"kǎn kàn":["竷"],"zhú dǔ":["竺"],"lè jīn":["竻"],"zhuì ruì":["笍"],"háng hàng":["笐"],"cén jìn hán":["笒"],"dā xiá nà":["笚"],"zé zuó":["笮"],"lóng lǒng":["笼","篭","籠","躘","龓"],"zhù zhú":["筑","築"],"dá dā":["答","荅"],shāi:["筛","篩","簁","籭"],"yún jūn":["筠"],"láng làng":["筤","郎","阆"],"zhì zhǐ":["筫"],o:["筽"],"póu bù fú pú":["箁"],"pái bēi":["箄"],gè:["箇","虼","鉻","铬"],"tái chí":["箈"],"guǎi dài":["箉"],"zhào dào":["箌"],"jīng qìng":["箐"],"lín lǐn":["箖"],"jùn qūn":["箘"],"shī yí":["箷","釶"],"yuē yào chuò":["箹"],"xiāo shuò qiào":["箾"],"gōng gǎn lǒng":["篢"],"páng péng":["篣"],"zhuó huò":["篧"],"jiǎn jiān":["篯"],"dí zhú":["篴"],"zān cēn cǎn":["篸"],"zhuàn suǎn zuàn":["篹"],"piǎo biāo":["篻"],"guó guì":["簂"],"cè jí":["簎"],"mì miè":["簚"],"shāi sī":["簛"],"sǔn zhuàn":["簨"],"gàn gǎn":["簳"],"bò bǒ":["簸"],"bó bù":["簿"],shi:["籂"],"zhēn jiān":["籈"],"zhuàn zuǎn":["籑"],"fān pān biān":["籓"],"sǒu shǔ":["籔"],zuǎn:["籫","繤","纂","纉","纘","缵"],nǚ:["籹","釹","钕"],"shā chǎo":["粆"],"kāng jīng":["粇"],fěn:["粉","黺"],cū:["粗","觕","麁","麄","麤"],"nián zhān":["粘"],"cè sè":["粣"],"zhōu yù":["粥"],"shēn sǎn":["糁"],"biān biǎn":["糄","萹"],miàn:["糆","面","靣","麪","麫","麵","麺"],"hú hū hù":["糊"],"gǔ gòu":["糓"],"mí méi":["糜"],"sǎn shēn":["糝","糣"],zāo:["糟","蹧","遭","醩"],"mì sī":["糸"],"jiū jiǔ":["糺"],"xì jì":["系","繫"],"zhēng zhěng":["糽"],"chà chǎ":["紁","衩"],"yuē yāo":["約","约"],"hóng gōng":["紅","红"],"hé gē":["紇","纥"],"wén wèn":["紋","纹"],fóu:["紑"],"jì jié jiè":["紒"],"pī pí bǐ":["紕","纰"],"jīn jìn":["紟"],"zhā zā":["紥","紮"],hā:["紦"],"fū fù":["紨"],"chōu chóu":["紬"],"lèi léi lěi":["累"],"bō bì":["紴"],"tiǎn zhěn":["紾"],"jiōng jiǒng":["絅"],"jié jiē":["結","结","节"],"guà kuā":["絓"],"bǎi mò":["絔"],"gēng huán":["絙"],"jié xié":["絜"],"quán shuān":["絟"],"gǎi ǎi":["絠"],"luò lào":["絡","络"],"bīng bēng pēng":["絣"],"gěi jǐ":["給","给"],"tóng tōng dòng":["絧"],"tiào diào dào":["絩"],"lěi lèi léi":["絫"],"gāi hài":["絯"],"chī zhǐ":["絺"],"wèn miǎn mán wàn":["絻"],"huán huàn wàn":["綄"],"qīn xiān":["綅"],"tì tí":["綈"],"yán xiàn":["綖"],"zōng zèng zòng":["綜"],"chēn lín":["綝"],"zhǔn zhùn":["綧"],"qiàn qīng zhēng":["綪"],"qìng qǐ":["綮"],"lún guān":["綸","纶"],"chuò chāo":["綽","绰"],"tián tǎn chān":["緂"],"lǜ lù":["緑","绿"],"ruǎn ruàn":["緛"],"jí qī":["緝"],"zhòng chóng":["緟","重"],"miáo máo":["緢"],"xiè yè":["緤"],huǎn:["緩","缓","㬊"],"gēng gèng":["緪","縆"],"tōu xū shū":["緰"],"zōng zòng":["緵","繌"],"yùn gǔn":["緷"],"guā wō":["緺"],"yùn yūn wēn":["緼","縕"],"bāng bàng":["縍"],"gǔ hú":["縎","鶻"],"cī cuò suǒ":["縒"],"cuī shuāi":["縗"],"róng rǒng ròng":["縙"],"zài zēng":["縡"],cài:["縩","菜","蔡"],"féng fèng":["縫"],"suō sù":["縮","缩"],"yǎn yǐn":["縯","酓"],"zòng zǒng":["縱","纵"],"zhuàn juàn":["縳"],"mò mù":["縸","莫"],"piǎo piāo":["縹","缥"],"fán pó":["繁"],"bēng bèng":["繃"],"móu miù miào liǎo":["繆"],"yáo yóu zhòu":["繇"],"zēng zèng":["繒","缯"],"jú jué":["繘"],"chuō chuò":["繛"],"zūn zǔn":["繜"],rào:["繞","绕","遶"],"chǎn chán":["繟"],"huì huí":["繢","缋","藱"],"qiāo sāo zǎo":["繰"],"jiǎo zhuó":["繳","缴"],"dàn tán chán":["繵"],nǒng:["繷"],"pú fú":["纀"],"yào lì":["纅"],"rǎng xiāng":["纕"],"lí sǎ xǐ lǐ":["纚"],"xiān qiàn":["纤"],"jīng jìng":["经"],"tí tì":["绨"],"bēng běng bèng":["绷"],"zōng zèng":["综"],"jī qī":["缉"],"wēn yùn yūn":["缊"],"fèng féng":["缝"],"shuāi cuī suī":["缞"],"miù móu liáo miào mù":["缪"],"qiāo sāo":["缲"],fǒu:["缶","缹","缻","雬","鴀"],"bà ba pí":["罢","罷"],"guà guǎi":["罫"],"yáng xiáng":["羊","羏"],"měi gāo":["羙"],"yì xī":["羛"],"qiǎng qiān":["羟"],"qiāng kòng":["羫"],"qián xián yán":["羬"],nóu:["羺"],"hóng gòng":["羾"],"pī bì pō":["翍"],"qú yù":["翑"],ké:["翗"],"qiào qiáo":["翘"],"zhái dí":["翟"],"dào zhōu":["翢"],"hóu qú":["翵"],shuǎ:["耍"],"ruǎn nuò":["耎"],"ér nài":["耏"],"zhuān duān":["耑"],"pá bà":["耙"],"chí sì":["耛"],"qù chú":["耝"],"lún lǔn":["耣"],"jí jiè":["耤"],"tāng tǎng":["耥"],pǎng:["耪","覫"],"zhá zé":["耫"],"yē yé":["耶"],"yún yíng":["耺"],"wà tuǐ zhuó":["聉"],"ér nǜ":["聏"],"tiē zhé":["聑"],"dǐ zhì":["聜"],qié:["聺"],"nǐ jiàn":["聻"],"lèi lē":["肋"],cào:["肏","襙","鄵","鼜"],"bó dí":["肑"],"xiào xiāo":["肖"],"dù dǔ":["肚"],chāi:["肞","釵","钗"],"hán qín hàn":["肣"],"pàng pán pàn":["肨","胖"],"zhūn chún":["肫"],āng:["肮","骯"],"yù yō":["育"],"pí bǐ bì":["肶"],"fèi bì":["胇"],"bèi bēi":["背"],"fèi zǐ":["胏"],"píng pēng":["胓","苹"],"fū fú zhǒu":["胕"],"shèng shēng":["胜"],kuà:["胯","跨","骻"],"gǎi hǎi":["胲"],"gē gé gā":["胳"],"néng nài":["能"],"guī kuì":["胿"],"mài mò":["脉"],"zāng zàng":["脏"],"jiǎo jué":["脚","角"],cuǒ:["脞"],"de te":["脦"],"zuī juān":["脧"],něi:["脮","腇","餒","馁","鮾","鯘"],"pú fǔ":["脯"],niào:["脲"],shuí:["脽"],guò:["腂","過","鐹"],"là xī":["腊"],"yān ā":["腌"],"gāo gào":["膏"],"lù biāo":["膔"],chuái:["膗"],"zhuān chuán chún zhuǎn":["膞"],chuài:["膪","踹"],"fán pán":["膰"],"wǔ hū":["膴"],"shān dàn":["膻"],tún:["臀","臋","蛌","豘","豚","軘","霕","飩","饨","魨","鲀","黗"],"bì bei":["臂"],"là gé":["臈"],"sào sāo":["臊"],nào:["臑","閙","闹","鬧"],"ní luán":["臡"],"qiān xián":["臤"],"guàng jiǒng":["臦"],"guǎng jiǒng":["臩"],"chòu xiù":["臭"],"mián biān":["臱"],"dié zhí":["臷"],"zhī jìn":["臸"],"shè shě":["舍"],pù:["舖","舗"],"bān bō pán":["般"],kuā:["舿"],"gèn gěn":["艮"],"sè shǎi":["色"],"fú bó":["艴"],"jiāo qiú":["艽"],"chāi chā":["芆"],"sháo què":["芍"],"hù xià":["芐"],"zì zǐ":["芓"],"huì hū":["芔"],"tún chūn":["芚"],"jiè gài":["芥"],"xù zhù":["芧"],"yuán yán":["芫"],"xīn xìn":["芯"],"lún huā":["芲"],"wù hū":["芴"],"gōu gǒu":["芶"],"mào máo":["芼"],"fèi fú":["芾"],"chán yín":["苂"],qiē:["苆"],"sū sù":["苏"],"tiáo sháo":["苕"],"lì jī":["苙"],"kē hē":["苛"],"jù qǔ":["苣"],"ruò rě":["若"],"zhù níng":["苧"],"pā bó":["苩"],xiú:["苬"],"zhǎ zuó":["苲"],"jū chá":["苴"],nié:["苶"],"shēng ruí":["苼"],"qié jiā":["茄"],"zǐ cí":["茈"],"qiàn xī":["茜"],chǎi:["茝"],"fá pèi":["茷"],ráo:["荛","蕘","襓","饒","饶"],"yíng xíng":["荥"],"qián xún":["荨","蕁"],"yìn yīn":["荫"],"hé hè":["荷"],"shā suō":["莎"],"péng fēng":["莑"],"shēn xīn":["莘"],"wǎn guān guǎn":["莞"],"yóu sù":["莤"],"shāo xiāo":["莦","蛸"],"làng liáng":["莨"],"piǎo fú":["莩"],"wèn wǎn miǎn":["莬"],"shì shí":["莳","蒔"],"tù tú":["莵"],"xiān liǎn":["莶","薟"],"wǎn yù":["菀"],"zōu chù":["菆"],"lù lǜ":["菉"],"jūn jùn":["菌"],"niè rěn":["菍"],"zī zì zāi":["菑"],"tú tù":["菟"],"jiē shà":["菨"],"qiáo zhǎo":["菬"],"tái zhī chí":["菭"],"fēi fěi":["菲","蜚"],"qín qīn jīn":["菳"],"zū jù":["菹","蒩"],"lǐn má":["菻"],"tián tiàn":["菾"],tiē:["萜","貼","贴"],"luò là lào luō":["落"],"zhù zhuó zhe":["著"],"shèn rèn":["葚"],"gě gé":["葛"],"jùn suǒ":["葰"],"kuì kuài":["蒉"],"rú ná":["蒘"],"méng mēng měng":["蒙"],"yuán huán":["蒝"],"xú shú":["蒣"],"xí xì":["蒵"],"mì míng":["蓂"],"sōu sǒu":["蓃"],"gài gě hé hài":["蓋"],"yǎo zhuó":["蓔"],"diào tiáo dí":["蓧"],"xū qiū fū":["蓲"],"zí jú":["蓻"],"liǎo lù":["蓼"],xu:["蓿"],"hàn hǎn":["蔊"],"màn wàn mán":["蔓"],"pó bò":["蔢"],"fān fán bō":["蕃"],"hóng hòng":["蕻"],"yù ào":["薁","隩"],"xí xiào":["薂"],"báo bó bò":["薄"],"cí zī":["薋"],"wàn luàn":["薍"],"kǎo hāo":["薧"],"yuǎn wěi":["薳"],"zhòu chóu":["薵"],"wō mái":["薶"],"xiāo hào":["藃"],"yù xù xū":["藇"],"jiè jí":["藉"],"diào zhuó":["藋"],"cáng zàng":["藏"],lǎ:["藞"],"chú zhū":["藸"],"pín píng":["蘋"],"gān hán":["虷"],"hóng jiàng":["虹"],"huī huǐ":["虺"],"xiā há":["虾"],"mǎ mà mā":["蚂"],"fāng bàng":["蚄"],"bàng bèng":["蚌"],"jué quē":["蚗"],"qín qián":["蚙"],"gōng zhōng":["蚣"],"fǔ fù":["蚥"],"dài dé":["蚮"],"gǒu qú xù":["蚼"],"bǒ pí":["蚾"],"shé yí":["蛇"],tiě:["蛈","鉄","銕","鐡","鐵","铁","驖"],"gé luò":["蛒"],"máng bàng":["蛖"],"yì xǔ":["蛡"],"há gé":["蛤"],"qiè ní":["蛪"],"é yǐ":["蛾"],"zhē zhé":["蜇"],"là zhà":["蜡"],suò:["蜶","逤"],"yóu qiú":["蝤"],"xiā hā":["蝦"],"xī qī":["螇"],"bī pí":["螕"],"nài něng":["螚"],"hé xiá":["螛"],"guì huǐ":["螝"],"mǎ mā mà":["螞"],"shì zhē":["螫"],"zhì dié":["螲"],"jiàn chán":["螹"],"ma má mò":["蟆"],"mǎng měng":["蟒"],"biē bié":["蟞"],"bēn fèi":["蟦"],"láo liáo":["蟧"],"yín xún":["蟫"],"lí lǐ":["蠡"],"xuè xiě":["血"],"xíng háng hàng héng":["行"],"shuāi cuī":["衰"],"tuó tuō":["袉"],"lǐng líng":["袊"],"bào páo pào":["袌"],"jù jiē":["袓"],"hè kè":["袔"],"yí yì":["袘","貤"],"nà jué":["袦"],"bèi pī":["被"],"chǐ nuǒ":["袲"],"chǐ qǐ duǒ nuǒ":["袳"],"jiá qiā jié":["袷"],"bó mò":["袹"],"guī guà":["袿"],"liè liě":["裂"],"chéng chěng":["裎"],"jiē gé":["裓"],"dāo chóu":["裯"],"shang cháng":["裳"],"yuān gǔn":["裷"],"yǎn ān":["裺"],"tì xī":["裼"],"fù fú":["褔"],"chǔ zhǔ":["褚"],"tuì tùn":["褪"],lǎi:["襰"],"yào yāo":["要"],"qín tán":["覃"],"jiàn xiàn":["見","见"],piǎn:["覑","諞","谝","貵","𡎚"],"piē miè":["覕"],"yíng yǐng":["覮"],"qù qū":["覰","覷","觑"],"jiàn biǎn":["覵"],"luó luǎn":["覶"],"zī zuǐ":["觜"],"huà xiè":["觟"],"jiě jiè xiè":["解","觧"],"xué hù":["觷"],"lì lù":["觻"],tǎo:["討","讨"],zhùn:["訰"],"zī zǐ":["訾"],"yí dài":["詒","诒"],xiòng:["詗","诇"],"diào tiǎo":["誂"],"yí chǐ chì":["誃"],"lǎng làng":["誏"],"ēi éi ěi èi xī":["誒","诶"],shuà:["誜"],"yǔ yù":["語","语","雨"],"shuō shuì yuè":["說","说"],"shuí shéi":["誰","谁"],"qū juè":["誳"],"chī lài":["誺"],"nì ná":["誽"],"diào tiáo":["調"],"pǐ bēi":["諀"],"jì jī":["諅"],"zé zuò zhǎ cuò":["諎"],"chù jí":["諔"],"háo xià":["諕"],"lùn lún":["論","论"],"shì dì":["諟"],"huà guā":["諣"],"xǐ shāi āi":["諰"],"nán nàn":["諵","難"],miù:["謬","谬"],zèn:["譖","谮"],"shí zhì":["識","识"],"juàn xuān":["讂"],"yí tuī":["讉"],zhán:["讝"],"xǔ hǔ":["许"],"xiáng yáng":["详"],"tiáo diào zhōu":["调"],"chén shèn":["谌"],"mí mèi":["谜"],"màn mán":["谩"],"gǔ yù":["谷"],"huō huò huá":["豁"],"zhì zhài":["豸"],"huān huán":["貆"],"kěn kūn":["貇"],"mò hé":["貈"],"mò hé háo":["貉"],"jù lóu":["貗"],"zé zhài":["責","责"],"dài tè":["貸"],"bì bēn":["賁"],"jiǎ gǔ jià":["賈"],"xiōng mín":["賯"],càng:["賶"],"zhuàn zuàn":["賺","赚"],"wàn zhuàn":["贃"],"gàn gòng zhuàng":["贛"],"yuán yùn":["贠"],"bēn bì":["贲"],"jiǎ gǔ":["贾"],zǒu:["走","赱","鯐"],"dié tú":["趃"],"jū qiè":["趄"],"qū cù":["趋","趨"],"jí jié":["趌"],"guā huó":["趏"],"què qì jí":["趞"],"tàng tāng":["趟"],"chuō zhuó":["趠"],"qù cù":["趣"],"yuè tì":["趯"],"bō bào":["趵"],"kuà wù":["趶"],"guì jué":["趹"],"fāng fàng páng":["趽"],"páo bà":["跁"],"qí qǐ":["跂"],"jiàn chén":["跈"],"pǎo páo":["跑"],"diǎn diē tiē":["跕"],"jū jù qiè":["跙"],bǒ:["跛"],"luò lì":["跞"],"dài duò duō chí":["跢"],zhuǎi:["跩"],"bèng pián":["跰"],"tiào táo":["跳"],"shū chōu":["跾"],"liàng liáng":["踉"],"tà tā":["踏"],chǎ:["蹅","鑔","镲"],"dí zhí":["蹢"],"dēng dèng":["蹬","鐙","镫"],cèng:["蹭"],"dūn cún":["蹲"],"juě jué":["蹶"],liāo:["蹽"],"xiè sǎ":["躠"],tǐ:["躰","軆","骵"],"yà zhá gá":["轧","軋"],"xìn xiàn":["軐"],"fàn guǐ":["軓"],"zhuàn zhuǎn":["転"],"zhóu zhòu":["軸","轴"],bú:["轐","醭","鳪"],"zhuǎn zhuàn zhuǎi":["转"],"zǎi zài":["载"],"niǎn zhǎn":["辗"],"biān bian":["边"],"dào biān":["辺"],"yǐ yí":["迆","迤","迱"],"guò guo guō":["过"],"wàng kuāng":["迋"],"hái huán":["还"],"zhè zhèi":["这"],"yuǎn yuàn":["远"],"zhì lì":["迣"],"zhù wǎng":["迬"],"zhuī duī":["追"],"shì kuò":["适"],tòu:["透"],"tōng tòng":["通"],guàng:["逛"],"dǎi dài":["逮"],"suì suí":["遂"],"tí dì":["遆"],"yí wèi":["遗"],"shì dí zhé":["適"],cà:["遪"],"huán hái":["還"],"lí chí":["邌"],"kàng háng":["邟"],"nà nèi nā":["那"],"xié yá yé yú xú":["邪"],"gāi hái":["郂"],"huán xún":["郇"],"chī xī":["郗"],hǎo:["郝"],"lì zhí":["郦"],"xiáo ǎo":["郩"],"dōu dū":["都"],liǎo:["曢","鄝","镽"],"zàn cuán cuó":["酂","酇"],"dīng dǐng":["酊"],"cù zuò":["酢"],"fā pō":["酦"],"shāi shī":["酾"],niàng:["酿","醸"],"qiú chōu":["醔"],"pō fā":["醗","醱"],"chǎn chěn":["醦"],"yàn liǎn xiān":["醶"],"niàng niáng":["釀"],"lǐ li":["里"],"lí xǐ xī":["釐"],"liǎo liào":["釕"],"dīng dìng":["釘","钉"],"qiǎo jiǎo":["釥"],"yú huá":["釪"],"huá wū":["釫"],"rì rèn jiàn":["釰","釼"],"dì dài":["釱"],"pī zhāo":["釽"],"yá yé":["釾"],"bǎ pá":["鈀","钯"],"tā tuó":["鉈","铊"],běi:["鉳"],"bǐng píng":["鉼"],"hā kē":["鉿","铪"],chòng:["銃","铳"],"xiǎng jiōng":["銄"],"yù sì":["銉"],"xù huì":["銊"],"rén rěn":["銋"],"shàn shuò":["銏"],"chì lì":["銐"],"xiǎn xǐ":["銑","铣"],"hóu xiàng":["銗"],"diào tiáo yáo":["銚"],"xiān kuò tiǎn guā":["銛","銽","铦"],"zhé niè":["銸"],"zhōng yōng":["銿"],"tōu tù dòu":["鋀"],"méi méng":["鋂"],"wàn jiǎn":["鋄","鎫"],"tǐng dìng":["鋌","铤"],"juān jiān cuān":["鋑"],"sī tuó":["鋖"],"juān xuān juàn":["鋗"],"wú huá wū":["鋘"],"zhuó chuò":["鋜"],"xíng xìng jīng":["鋞"],"jū jú":["鋦","锔"],"zuì niè":["鋷"],"yuān yuǎn wǎn wān":["鋺"],"gāng gàng":["鋼","钢"],zhuī:["錐","锥","騅","骓","鵻"],ā:["錒","锕"],"cuō chā":["鎈"],"suǒ sè":["鎍"],"yáo zú":["鎐"],"yè tà gé":["鎑"],"qiāng chēng":["鎗"],"gé lì":["鎘","镉","鬲"],"bī pī bì":["鎞"],"gǎo hào":["鎬"],"zú chuò":["鏃"],"xiū xiù":["鏅"],"shòu sōu":["鏉"],"dí dī":["鏑","镝"],"qiāo sǎn càn":["鏒"],"lù áo":["鏕"],"tāng táng":["鏜"],"jiàn zàn":["鏩"],"huì suì ruì":["鏸"],"qiǎng qiāng":["鏹","镪"],"sǎn xiàn sà":["鏾"],"jiǎn jiàn":["鐧","锏"],"dāng chēng":["鐺","铛"],"zuān zuàn":["鑽"],"sà xì":["钑"],"yào yuè":["钥"],"tǒu dǒu":["钭"],"zuàn zuān":["钻"],"qiān yán":["铅"],"pí pī":["铍"],"yáo diào tiáo":["铫"],"tāng tàng":["铴"],"pù pū":["铺"],"tán xiān":["锬"],"liù liú":["镏"],"hào gǎo":["镐"],"táng tāng":["镗"],"tán chán xín":["镡"],"huò shǎn":["閄"],"hàn bì":["閈","闬"],"kāng kàng":["閌","闶"],"xián jiàn jiān jiǎn":["閒"],"xiā xiǎ":["閕"],"xiǎ kě":["閜"],"biàn guān":["閞"],"hé gé":["閤","颌"],"hòng xiàng":["閧"],"sē xī":["閪"],"tíng tǐng":["閮"],"è yān":["閼","阏"],"hòng juǎn xiàng":["闂"],"bǎn pàn":["闆"],"dū shé":["闍","阇"],"què quē":["闕"],"tāng táng chāng":["闛"],"kàn hǎn":["闞","阚"],"xì sè tà":["闟"],"mēn mèn":["闷"],"quē què":["阙"],"yán diàn":["阽"],"ā ē":["阿"],"bēi pō pí":["陂"],"yàn yǎn":["隁"],"yú yáo shù":["隃"],"lóng lōng":["隆"],"duì zhuì":["隊"],"suí duò":["隋"],"gāi qí ái":["隑"],"huī duò":["隓","隳"],"wěi kuí":["隗"],"lì dài":["隸"],"zhuī cuī wéi":["隹"],"hè hú":["隺","鶮"],"jùn juàn":["隽","雋"],"nán nàn nuó":["难"],"què qiāo qiǎo":["雀"],"guàn huán":["雚"],"guī xī":["雟"],"sè xí":["雭"],án:["雸"],"wù méng":["雺"],tèng:["霯"],"lù lòu":["露"],mái:["霾"],"jìng liàng":["靚"],"gé jí":["革"],bǎ:["靶"],"yāng yàng":["鞅"],"gé tà sǎ":["鞈"],"biān yìng":["鞕"],"qiào shāo":["鞘"],"juān xuān":["鞙"],"shàng zhǎng":["鞝"],"pí bǐng bì bēi":["鞞"],la:["鞡"],"xiè dié":["鞢"],ēng:["鞥"],"móu mù":["鞪"],"bì bǐng":["鞸"],"mèi wà":["韎"],rǒu:["韖"],"shè xiè":["韘"],"yùn wēn":["韫"],"dùn dú":["頓","顿"],duǐ:["頧"],luō:["頱"],"bīn pín":["頻"],yóng:["顒","颙","鰫"],mān:["顢","颟"],"jǐng gěng":["颈"],"jié xié jiá":["颉"],"kē ké":["颏"],"pín bīn":["频"],"chàn zhàn":["颤"],"fēng fěng":["風","风"],"biāo diū":["颩"],"bá fú":["颰"],"sāo sōu":["颾"],"liù liáo":["飂"],"shí sì yì":["食"],"yǎng juàn":["飬"],"zhù tǒu":["飳"],"yí sì":["飴"],"zuò zé zhā":["飵"],tiè:["飻","餮"],"xiǎng náng":["饟"],"táng xíng":["饧"],"gē le":["饹"],"chā zha":["馇"],"náng nǎng":["馕"],"yūn wò":["馧"],"zhī shì":["馶"],"xìn jìn":["馸"],"kuài jué":["駃"],zǎng:["駔","驵"],"tái dài":["駘"],"xún xuān":["駨"],"liáng láng":["駺"],piàn:["騗","騙","骗","魸"],"dài tái":["骀"],"sāo sǎo":["骚"],"gǔ gū":["骨"],"bèi mó":["骳"],"xiāo qiāo":["骹"],"bǎng pǎng":["髈"],"bó jué":["髉"],"bì pǒ":["髲"],"máo méng":["髳"],"kuò yuè":["髺"],"bā bà":["魞","鲃"],"jì cǐ":["鮆"],"bó bà":["鮊"],"zhǎ zhà":["鮓","鲊"],"chóu dài":["鮘"],"luò gé":["鮥"],"guī xié wā kuí":["鮭"],"xiān xiǎn":["鮮","鲜"],"pū bū":["鯆"],"yì sī":["鯣"],"bà bó":["鲌"],"guī xié":["鲑"],"sāi xǐ":["鳃"],"niǎo diǎo":["鳥"],"diāo zhāo":["鳭"],"gān hàn yàn":["鳱"],"fū guī":["鳺"],"jiān qiān zhān":["鳽"],"hé jiè":["鶡"],"piān biǎn":["鶣"],"chuàn zhì":["鶨"],"cāng qiāng":["鶬"],"sǔn xùn":["鶽"],"biāo páo":["麃"],"zhù cū":["麆"],"jūn qún":["麇","麕"],chi:["麶"],"mó me":["麼"],"mó me ma":["麽"],"mí mǒ":["麿"],"dàn shèn":["黮"],"zhěn yān":["黰"],"dǎn zhǎn":["黵"],"miǎn mǐn měng":["黾"],hōu:["齁"],nàng:["齉"],"qí jì zī zhāi":["齐"],"yín kěn yǎn":["龂"],"yín kěn":["龈"],"gōng wò":["龏"],"guī jūn qiū":["龜","龟"],"kuí wā":["䖯"],lōu:["䁖"],"ōu qū":["𫭟"],"lóu lǘ":["𦝼"],"gǎ gā gá":["嘎"],"wā guà":["坬"],"zhǐ dǐ":["茋"],"gǒng hóng":["硔"],"yáo xiào":["滧"]},lc=new a$;Object.keys(mS).forEach(e=>{const t=mS[e];for(let n of t)lc.set(n,e)});const vS={这个:"zhè ge",成为:"chéng wéi",认为:"rèn wéi",作为:"zuò wéi",部分:"bù fen",要求:"yāo qiú",应该:"yīng gāi",增长:"zēng zhǎng",提供:"tí gōng",觉得:"jué de",任务:"rèn wu",那个:"nà ge",称为:"chēng wéi",为主:"wéi zhǔ",了解:"liǎo jiě",处理:"chǔ lǐ",皇上:"huáng shang",只要:"zhǐ yào",大量:"dà liàng",力量:"lì liàng",几乎:"jī hū",干部:"gàn bù",目的:"mù dì",行为:"xíng wéi",只见:"zhǐ jiàn",认识:"rèn shi",市长:"shì zhǎng",师父:"shī fu",调查:"diào chá",重新:"chóng xīn",分为:"fēn wéi",知识:"zhī shi",导弹:"dǎo dàn",质量:"zhì liàng",行款:"háng kuǎn",行列:"háng liè",行话:"háng huà",行业:"háng yè",隔行:"gé háng",在行:"zài háng",行家:"háng jia",内行:"nèi háng",外行:"wài háng",同行:"tóng háng",本行:"běn háng",行伍:"háng wǔ",洋行:"yáng háng",银行:"yín háng",商行:"shāng háng",支行:"zhī háng",总行:"zǒng háng",行情:"háng qíng",懂行:"dǒng háng",行规:"háng guī",行当:"háng dang",行货:"háng huò",太行:"tài háng",入行:"rù háng",中行:"zhōng háng",农行:"nóng háng",工行:"gōng háng",建行:"jiàn háng",各行:"gè háng",行号:"háng hào",行高:"háng gāo",行首:"háng shǒu",行尾:"háng wěi",行末:"háng mò",行长:"háng zhǎng",行距:"háng jù",换行:"huàn háng",行会:"háng huì",行辈:"háng bèi",行道:"háng dào",道行:"dào heng",参与:"cān yù",充分:"chōng fèn",尽管:"jǐn guǎn",生长:"shēng zhǎng",数量:"shù liàng",应当:"yīng dāng",院长:"yuàn zhǎng",强调:"qiáng diào",只能:"zhǐ néng",音乐:"yīn yuè",以为:"yǐ wéi",处于:"chǔ yú",部长:"bù zhǎng",蒙古:"měng gǔ",只有:"zhǐ yǒu",适当:"shì dàng",只好:"zhǐ hǎo",成长:"chéng zhǎng",高兴:"gāo xìng",不了:"bù liǎo",产量:"chǎn liàng",胖子:"pàng zi",显得:"xiǎn de",只是:"zhǐ shì",似的:"shì de",率领:"shuài lǐng",改为:"gǎi wéi",不禁:"bù jīn",成分:"chéng fèn",答应:"dā ying",少年:"shào nián",兴趣:"xìng qù",太监:"tài jian",休息:"xiū xi",校长:"xiào zhǎng",更新:"gēng xīn",合同:"hé tong",喝道:"hè dào",重庆:"chóng qìng",重建:"chóng jiàn",使得:"shǐ de",审查:"shěn chá",累计:"lěi jì",给予:"jǐ yǔ",极为:"jí wéi",冠军:"guàn jūn",仿佛:"fǎng fú",头发:"tóu fa",投降:"tóu xiáng",家长:"jiā zhǎng",仔细:"zǐ xì",要是:"yào shi",将领:"jiàng lǐng",含量:"hán liàng",更为:"gèng wéi",积累:"jī lěi",地处:"dì chǔ",县长:"xiàn zhǎng",少女:"shào nǚ",路上:"lù shang",只怕:"zhǐ pà",能量:"néng liàng",储量:"chǔ liàng",供应:"gōng yìng",挑战:"tiǎo zhàn",西藏:"xī zàng",记得:"jì de",总量:"zǒng liàng",当真:"dàng zhēn",将士:"jiàng shì",差别:"chā bié",较为:"jiào wéi",长老:"zhǎng lǎo",大夫:"dài fu",差异:"chā yì",懂得:"dǒng de",尽量:"jǐn liàng",模样:"mú yàng",的确:"dí què",为首:"wéi shǒu",便宜:"pián yi",更名:"gēng míng",石头:"shí tou",州长:"zhōu zhǎng",为止:"wéi zhǐ",漂亮:"piào liang",炮弹:"pào dàn",藏族:"zàng zú",角色:"jué sè",当作:"dàng zuò",尽快:"jǐn kuài",人为:"rén wéi",重复:"chóng fù",胡同:"hú tòng",差距:"chā jù",弟兄:"dì xiong",大将:"dà jiàng",睡觉:"shuì jiào",一觉:"yí jiào",团长:"tuán zhǎng",队长:"duì zhǎng",区长:"qū zhǎng",难得:"nán dé",丫头:"yā tou",会长:"huì zhǎng",弟弟:"dì di",王爷:"wáng ye",重量:"zhòng liàng",誉为:"yù wéi",家伙:"jiā huo",华山:"huà shān",椅子:"yǐ zi",流量:"liú liàng",长大:"zhǎng dà",勉强:"miǎn qiǎng",会计:"kuài jì",过分:"guò fèn",济南:"jǐ nán",调动:"diào dòng",燕京:"yān jīng",少将:"shào jiàng",中毒:"zhòng dú",晓得:"xiǎo de",变更:"biàn gēng",打更:"dǎ gēng",认得:"rèn de",苹果:"píng guǒ",念头:"niàn tou",挣扎:"zhēng zhá",三藏:"sān zàng",剥削:"bō xuē",丞相:"chéng xiàng",少量:"shǎo liàng",寻思:"xún si",夺得:"duó dé",干线:"gàn xiàn",呼吁:"hū yù",处罚:"chǔ fá",长官:"zhǎng guān",柏林:"bó lín",亲戚:"qīn qi",身分:"shēn fèn",胳膊:"gē bo",着手:"zhuó shǒu",炸弹:"zhà dàn",咳嗽:"ké sou",叶子:"yè zi",外长:"wài zhǎng",供给:"gōng jǐ",师长:"shī zhǎng",变量:"biàn liàng",应有:"yīng yǒu",下载:"xià zài",乐器:"yuè qì",间接:"jiàn jiē",底下:"dǐ xià",打扮:"dǎ bàn",子弹:"zǐ dàn",弹药:"dàn yào",热量:"rè liàng",削弱:"xuē ruò",骨干:"gǔ gàn",容量:"róng liàng",模糊:"mó hu",转动:"zhuàn dòng",称呼:"chēng hu",科长:"kē zhǎng",处置:"chǔ zhì",着重:"zhuó zhòng",着急:"zháo jí",强迫:"qiǎng pò",庭长:"tíng zhǎng",首相:"shǒu xiàng",喇嘛:"lǎ ma",镇长:"zhèn zhǎng",只管:"zhǐ guǎn",重重:"chóng chóng",免得:"miǎn de",着实:"zhuó shí",度假:"dù jià",真相:"zhēn xiàng",相貌:"xiàng mào",处分:"chǔ fèn",委屈:"wěi qu",为期:"wéi qī",伯伯:"bó bo",伯子:"bǎi zi",圈子:"quān zi",见识:"jiàn shi",笼罩:"lǒng zhào",与会:"yù huì",都督:"dū du",都市:"dū shì",成都:"chéng dū",首都:"shǒu dū",帝都:"dì dū",王都:"wáng dū",东都:"dōng dū",都护:"dū hù",都城:"dū chéng",建都:"jiàn dū",迁都:"qiān dū",故都:"gù dū",定都:"dìng dū",中都:"zhōng dū",六安:"lù ān",宰相:"zǎi xiàng",较量:"jiào liàng",对称:"duì chèn",总长:"zǒng zhǎng",相公:"xiàng gong",空白:"kòng bái",打量:"dǎ liang",水分:"shuǐ fèn",舌头:"shé tou",没收:"mò shōu",行李:"xíng li",判处:"pàn chǔ",散文:"sǎn wén",处境:"chǔ jìng",孙子:"sūn zi",拳头:"quán tou",打发:"dǎ fā",组长:"zǔ zhǎng",骨头:"gǔ tou",宁可:"nìng kě",更换:"gēng huàn",薄弱:"bó ruò",还原:"huán yuán",重修:"chóng xiū",重来:"chóng lái",只顾:"zhǐ gù",爱好:"ài hào",馒头:"mán tou",军长:"jūn zhǎng",首长:"shǒu zhǎng",厂长:"chǎng zhǎng",司长:"sī zhǎng",长子:"zhǎng zǐ",强劲:"qiáng jìng",恰当:"qià dàng",头儿:"tóu er",站长:"zhàn zhǎng",折腾:"zhē teng",相处:"xiāng chǔ",统率:"tǒng shuài",中将:"zhōng jiàng",命中:"mìng zhòng",名将:"míng jiàng",木头:"mù tou",动弹:"dòng tan",地壳:"dì qiào",干活:"gàn huó",少爷:"shào ye",水量:"shuǐ liàng",补给:"bǔ jǐ",尾巴:"wěi ba",来得:"lái de",好奇:"hào qí",钥匙:"yào shi",当做:"dàng zuò",沉着:"chén zhuó",哑巴:"yǎ ba",车子:"chē zi",上将:"shàng jiàng",恶心:"ě xīn",担子:"dàn zi",应届:"yīng jiè",主角:"zhǔ jué",运转:"yùn zhuǎn",兄长:"xiōng zhǎng",格式:"gé shì",正月:"zhēng yuè",营长:"yíng zhǎng",当成:"dàng chéng",女婿:"nǚ xu",咽喉:"yān hóu",重阳:"chóng yáng",化为:"huà wéi",吐蕃:"tǔ bō",钻进:"zuān jìn",乐队:"yuè duì",亮相:"liàng xiàng",被子:"bèi zi",舍得:"shě de",杉木:"shā mù",击中:"jī zhòng",排长:"pái zhǎng",假期:"jià qī",分量:"fèn liàng",数次:"shù cì",提防:"dī fáng",吆喝:"yāo he",查处:"chá chǔ",量子:"liàng zǐ",里头:"lǐ tou",调研:"diào yán",伺候:"cì hou",重申:"chóng shēn",枕头:"zhěn tou",拚命:"pīn mìng",社长:"shè zhǎng",归还:"guī huán",批量:"pī liàng",畜牧:"xù mù",点着:"diǎn zháo",甚为:"shèn wéi",小将:"xiǎo jiàng",着眼:"zhuó yǎn",处死:"chǔ sǐ",厌恶:"yàn wù",鼓乐:"gǔ yuè",树干:"shù gàn",秘鲁:"bì lǔ",大方:"dà fāng",外头:"wài tou",班长:"bān zhǎng",星宿:"xīng xiù",宁愿:"nìng yuàn",钦差:"qīn chāi",为数:"wéi shù",勾当:"gòu dàng",削减:"xuē jiǎn",间谍:"jiàn dié",埋怨:"mán yuàn",结实:"jiē shi",计量:"jì liáng",淹没:"yān mò",村长:"cūn zhǎng",连长:"lián zhǎng",自给:"zì jǐ",武将:"wǔ jiàng",温差:"wēn chā",直奔:"zhí bèn",供求:"gōng qiú",剂量:"jì liàng",道长:"dào zhǎng",泄露:"xiè lòu",王八:"wáng ba",切割:"qiē gē",间隔:"jiàn gé",一晃:"yì huǎng",长假:"cháng jià",令狐:"líng hú",为害:"wéi hài",句子:"jù zi",偿还:"cháng huán",疙瘩:"gē da",燕山:"yān shān",堵塞:"dǔ sè",夺冠:"duó guàn",扎实:"zhā shi",电荷:"diàn hè",看守:"kān shǒu",复辟:"fù bì",郁闷:"yù mèn",尽早:"jǐn zǎo",切断:"qiē duàn",指头:"zhǐ tou",为生:"wéi shēng",畜生:"chù sheng",切除:"qiē chú",着力:"zhuó lì",着想:"zhuó xiǎng",级差:"jí chā",投奔:"tóu bèn",棍子:"gùn zi",含糊:"hán hu",少妇:"shào fù",兴致:"xìng zhì",纳闷:"nà mèn",干流:"gàn liú",卷起:"juǎn qǐ",扇子:"shàn zi",更改:"gēng gǎi",笼络:"lǒng luò",喇叭:"lǎ ba",载荷:"zài hè",妥当:"tuǒ dàng",为难:"wéi nán",着陆:"zhuó lù",燕子:"yàn zi",干吗:"gàn má",白发:"bái fà",总得:"zǒng děi",夹击:"jiā jī",曝光:"bào guāng",曲调:"qǔ diào",相机:"xiàng jī",叫化:"jiào huà",角逐:"jué zhú",啊哟:"ā yō",载重:"zài zhòng",长辈:"zhǎng bèi",出差:"chū chāi",垛口:"duǒ kǒu",撇开:"piē kāi",厅长:"tīng zhǎng",组分:"zǔ fèn",误差:"wù chā",家当:"jiā dàng",传记:"zhuàn jì",个子:"gè zi",铺设:"pū shè",干事:"gàn shì",杆菌:"gǎn jūn",定量:"dìng liàng",运载:"yùn zài",会儿:"huì er",酋长:"qiú zhǎng",重返:"chóng fǎn",差额:"chā é",露面:"lòu miàn",钻研:"zuān yán",大城:"dài chéng",上当:"shàng dàng",销量:"xiāo liàng",作坊:"zuō fang",照相:"zhào xiàng",哎呀:"āi yā",调集:"diào jí",看中:"kàn zhòng",议长:"yì zhǎng",风筝:"fēng zheng",辟邪:"bì xié",空隙:"kòng xì",更迭:"gēng dié",偏差:"piān chā",声调:"shēng diào",适量:"shì liàng",屯子:"tún zi",无量:"wú liàng",空地:"kòng dì",调度:"diào dù",散射:"sǎn shè",创伤:"chuāng shāng",海参:"hǎi shēn",满载:"mǎn zài",重叠:"chóng dié",落差:"luò chā",单调:"dān diào",老将:"lǎo jiàng",人参:"rén shēn",间断:"jiàn duàn",重现:"chóng xiàn",夹杂:"jiā zá",调用:"diào yòng",萝卜:"luó bo",附着:"fù zhuó",应声:"yìng shēng",主将:"zhǔ jiàng",罪过:"zuì guo",咀嚼:"jǔ jué",为政:"wéi zhèng",过量:"guò liàng",乐曲:"yuè qǔ",负荷:"fù hè",枪弹:"qiāng dàn",悄然:"qiǎo rán",处方:"chǔ fāng",悄声:"qiǎo shēng",曲子:"qǔ zi",情调:"qíng diào",挑衅:"tiǎo xìn",代为:"dài wéi",了结:"liǎo jié",打中:"dǎ zhòng",酒吧:"jiǔ bā",懒得:"lǎn de",增量:"zēng liàng",衣着:"yī zhuó",部将:"bù jiàng",要塞:"yào sài",茶几:"chá jī",杠杆:"gàng gǎn",出没:"chū mò",鲜有:"xiǎn yǒu",间隙:"jiàn xì",重担:"zhòng dàn",重演:"chóng yǎn",重试:"chóng shì",应酬:"yìng chou",只当:"zhǐ dāng",毋宁:"wú nìng",包扎:"bāo zā",前头:"qián tou",卷烟:"juǎn yān",非得:"fēi děi",弹道:"dàn dào",杆子:"gān zi",门将:"mén jiàng",后头:"hòu tou",喝彩:"hè cǎi",暖和:"nuǎn huo",累积:"lěi jī",调遣:"diào qiǎn",倔强:"jué jiàng",宝藏:"bǎo zàng",丧事:"sāng shì",约莫:"yuē mo",纤夫:"qiàn fū",更替:"gēng tì",装载:"zhuāng zài",背包:"bēi bāo",帖子:"tiě zi",松散:"sōng sǎn",呼喝:"hū hè",可恶:"kě wù",自转:"zì zhuàn",供电:"gōng diàn",反省:"fǎn xǐng",坦率:"tǎn shuài",苏打:"sū dá",本分:"běn fèn",落得:"luò de",鄙薄:"bǐ bó",相间:"xiāng jiàn",单薄:"dān bó",混蛋:"hún dàn",贞观:"zhēn guān",附和:"fù hè",能耐:"néng nài",吓唬:"xià hu",未了:"wèi liǎo",引着:"yǐn zháo",抽调:"chōu diào",沙子:"shā zi",席卷:"xí juǎn",标的:"biāo dì",别扭:"biè niu",思量:"sī liang",喝采:"hè cǎi",论语:"lún yǔ",盖子:"gài zi",分外:"fèn wài",弄堂:"lòng táng",乐舞:"yuè wǔ",雨量:"yǔ liàng",毛发:"máo fà",差遣:"chāi qiǎn",背负:"bēi fù",转速:"zhuàn sù",声乐:"shēng yuè",夹攻:"jiā gōng",供水:"gōng shuǐ",主干:"zhǔ gàn",惩处:"chéng chǔ",长相:"zhǎng xiàng",公差:"gōng chāi",榴弹:"liú dàn",省得:"shěng de",条子:"tiáo zi",重围:"chóng wéi",阻塞:"zǔ sè",劲风:"jìng fēng",纠葛:"jiū gé",颠簸:"diān bǒ",点中:"diǎn zhòng",重创:"zhòng chuāng",姥姥:"lǎo lao",迷糊:"mí hu",公家:"gōng jia",几率:"jī lǜ",苦闷:"kǔ mèn",度量:"dù liàng",差错:"chā cuò",暑假:"shǔ jià",参差:"cēn cī",搭载:"dā zài",助长:"zhù zhǎng",相称:"xiāng chèn",红晕:"hóng yùn",舍命:"shě mìng",喜好:"xǐ hào",列传:"liè zhuàn",劲敌:"jìng dí",蛤蟆:"há ma",请假:"qǐng jià",钉子:"dīng zi",沉没:"chén mò",高丽:"gāo lí",休假:"xiū jià",无为:"wú wéi",巴结:"bā jie",了得:"liǎo dé",变相:"biàn xiàng",核弹:"hé dàn",亲家:"qìng jia",承载:"chéng zài",喝问:"hè wèn",还击:"huán jī",交还:"jiāo huán",将令:"jiàng lìng",单于:"chán yú",空缺:"kòng quē",绿林:"lù lín",胆量:"dǎn liàng",执着:"zhí zhuó",低调:"dī diào",闭塞:"bì sè",轻薄:"qīng bó",得当:"dé dàng",占卜:"zhān bǔ",扫帚:"sào zhou",龟兹:"qiū cí",年长:"nián zhǎng",外传:"wài zhuàn",头子:"tóu zi",裁缝:"cái feng",礼乐:"lǐ yuè",血泊:"xuè pō",散乱:"sǎn luàn",动量:"dòng liàng",倒腾:"dǎo teng",取舍:"qǔ shě",咱家:"zán jiā",长发:"cháng fà",爪哇:"zhǎo wā",弹壳:"dàn ké",省悟:"xǐng wù",嚷嚷:"rāng rang",连累:"lián lèi",应得:"yīng dé",族长:"zú zhǎng",柜子:"guì zi",擂鼓:"léi gǔ",眩晕:"xuàn yùn",调配:"tiáo pèi",躯干:"qū gàn",差役:"chāi yì",坎坷:"kǎn kě",少儿:"shào ér",乐团:"yuè tuán",养分:"yǎng fèn",退还:"tuì huán",格调:"gé diào",语调:"yǔ diào",音调:"yīn diào",乐府:"yuè fǔ",古朴:"gǔ pǔ",打点:"dǎ diǎn",差使:"chāi shǐ",匀称:"yún chèn",瘦削:"shòu xuē",膏药:"gāo yao",吞没:"tūn mò",调任:"diào rèn",散居:"sǎn jū",上头:"shàng tóu",风靡:"fēng mǐ",放假:"fàng jià",估量:"gū liang",失当:"shī dàng",中弹:"zhòng dàn",妄为:"wàng wéi",长者:"zhǎng zhě",起哄:"qǐ hòng",末了:"mò liǎo",相声:"xiàng sheng",校正:"jiào zhèng",劝降:"quàn xiáng",矢量:"shǐ liàng",沉闷:"chén mèn",给与:"jǐ yǔ",解法:"jiě fǎ",塞外:"sài wài",将校:"jiàng xiào",嗜好:"shì hào",没落:"mò luò",朴刀:"pō dāo",片子:"piān zi",切削:"qiē xiāo",弹丸:"dàn wán",稀薄:"xī bó",亏得:"kuī dé",间歇:"jiàn xiē",翘首:"qiáo shǒu",色调:"sè diào",处决:"chǔ jué",表率:"biǎo shuài",尺子:"chǐ zi",招降:"zhāo xiáng",称职:"chèn zhí",斗篷:"dǒu peng",铺子:"pù zi",底子:"dǐ zi",负载:"fù zài",干警:"gàn jǐng",倒数:"dào shǔ",将官:"jiàng guān",锄头:"chú tou",归降:"guī xiáng",疟疾:"nüè ji",唠叨:"láo dao",限量:"xiàn liàng",屏息:"bǐng xī",重逢:"chóng féng",器乐:"qì yuè",氢弹:"qīng dàn",脖颈:"bó gěng",妃子:"fēi zi",处事:"chǔ shì",参量:"cān liàng",轻率:"qīng shuài",缥缈:"piāo miǎo",中奖:"zhòng jiǎng",才干:"cái gàn",施舍:"shī shě",卷子:"juàn zi",游说:"yóu shuì",巷子:"xiàng zi",膀胱:"páng guāng",切勿:"qiè wù",看管:"kān guǎn",风头:"fēng tou",精干:"jīng gàn",高差:"gāo chā",恐吓:"kǒng hè",扁担:"biǎn dàn",给养:"jǐ yǎng",格子:"gé zi",供需:"gōng xū",反差:"fǎn chā",飞弹:"fēi dàn",微薄:"wēi bó",发型:"fà xíng",即兴:"jí xìng",攒动:"cuán dòng",间或:"jiàn huò",浅薄:"qiǎn bó",乐章:"yuè zhāng",顺差:"shùn chā",调子:"diào zi",相位:"xiàng wèi",转子:"zhuàn zǐ",劲旅:"jìng lǚ",咔嚓:"kā chā",了事:"liǎo shì",转悠:"zhuàn you",当铺:"dàng pù",爪子:"zhuǎ zi",单子:"dān zi",好战:"hào zhàn",燕麦:"yàn mài",只许:"zhǐ xǔ",干练:"gàn liàn",女将:"nǚ jiàng",酒量:"jiǔ liàng",划船:"huá chuán",伎俩:"jì liǎng",挑拨:"tiǎo bō",少校:"shào xiào",着落:"zhuó luò",憎恶:"zēng wù",刻薄:"kè bó",要挟:"yāo xié",用处:"yòng chu",还手:"huán shǒu",模具:"mú jù",执著:"zhí zhuó",喝令:"hè lìng",保长:"bǎo zhǎng",吸着:"xī zhe",症结:"zhēng jié",公转:"gōng zhuàn",校勘:"jiào kān",重提:"chóng tí",扫兴:"sǎo xìng",铺盖:"pū gài",长史:"zhǎng shǐ",差价:"chā jià",压根:"yà gēn",怔住:"zhèng zhù",应允:"yīng yǔn",切入:"qiē rù",战将:"zhàn jiàng",年少:"nián shào",舍身:"shě shēn",执拗:"zhí niù",处世:"chǔ shì",中风:"zhòng fēng",等量:"děng liàng",放量:"fàng liàng",腔调:"qiāng diào",老少:"lǎo shào",没入:"mò rù",瓜葛:"guā gé",将帅:"jiàng shuài",车载:"chē zài",窝囊:"wō nang",长进:"zhǎng jìn",可汗:"kè hán",并州:"bīng zhōu",供销:"gōng xiāo",切片:"qiē piàn",差事:"chāi shì",知会:"zhī hui",鹰爪:"yīng zhǎo",处女:"chǔ nǚ",切磋:"qiē cuō",日头:"rì tou",押解:"yā jiè",滋长:"zī zhǎng",道观:"dào guàn",脚色:"jué sè",当量:"dāng liàng",婆家:"pó jia",缘分:"yuán fèn",空闲:"kòng xián",好色:"hào sè",怒喝:"nù hè",笼统:"lǒng tǒng",边塞:"biān sài",何曾:"hé céng",重合:"chóng hé",零散:"líng sǎn",轰隆:"hōng lōng",化子:"huà zi",内蒙:"nèi měng",数落:"shǔ luò",逆差:"nì chā",牟利:"móu lì",栅栏:"zhà lan",中标:"zhòng biāo",调档:"diào dàng",佝偻:"gōu lóu",场子:"chǎng zi",甲壳:"jiǎ qiào",重温:"chóng wēn",炮制:"páo zhì",返还:"fǎn huán",自传:"zì zhuàn",高调:"gāo diào",殷红:"yān hóng",固着:"gù zhuó",强求:"qiǎng qiú",本相:"běn xiàng",骄横:"jiāo hèng",草率:"cǎo shuài",气闷:"qì mèn",着色:"zhuó sè",宁肯:"nìng kěn",兴头:"xìng tou",拘泥:"jū nì",夹角:"jiā jiǎo",发髻:"fà jì",猛将:"měng jiàng",约摸:"yuē mo",拖累:"tuō lěi",呢绒:"ní róng",钻探:"zuān tàn",夹层:"jiā céng",落魄:"luò pò",巷道:"hàng dào",运量:"yùn liàng",解闷:"jiě mèn",空儿:"kòng er",估摸:"gū mo",好客:"hào kè",钻孔:"zuān kǒng",糊弄:"hù nòng",荥阳:"xíng yáng",烦闷:"fán mèn",仓卒:"cāng cù",分叉:"fēn chà",厂子:"chǎng zi",小调:"xiǎo diào",少阳:"shào yáng",受降:"shòu xiáng",染坊:"rǎn fáng",胳臂:"gē bei",将门:"jiàng mén",模板:"mú bǎn",配给:"pèi jǐ",为伍:"wéi wǔ",跟头:"gēn tou",划算:"huá suàn",累赘:"léi zhui",哄笑:"hōng xiào",晕眩:"yūn xuàn",干掉:"gàn diào",缝制:"féng zhì",难处:"nán chù",着意:"zhuó yì",蛮横:"mán hèng",奇数:"jī shù",短发:"duǎn fà",生还:"shēng huán",还清:"huán qīng",看护:"kān hù",直率:"zhí shuài",奏乐:"zòu yuè",载客:"zài kè",专横:"zhuān hèng",湮没:"yān mò",空格:"kòng gé",铺垫:"pū diàn",良将:"liáng jiàng",哗啦:"huā lā",散漫:"sǎn màn",脱发:"tuō fà",送还:"sòng huán",埋没:"mái mò",累及:"lěi jí",薄雾:"bó wù",调离:"diào lí",舌苔:"shé tāi",机长:"jī zhǎng",栓塞:"shuān sè",配角:"pèi jué",切口:"qiē kǒu",创口:"chuāng kǒu",哈欠:"hā qian",实弹:"shí dàn",铺平:"pū píng",哈达:"hǎ dá",懒散:"lǎn sǎn",实干:"shí gàn",填空:"tián kòng",刁钻:"diāo zuān",乐师:"yuè shī",量变:"liàng biàn",诱降:"yòu xiáng",搪塞:"táng sè",征调:"zhēng diào",夹道:"jiā dào",干咳:"gān ké",止咳:"zhǐ ké",乐工:"yuè gōng",划过:"huá guò",着火:"zháo huǒ",更正:"gēng zhèng",给付:"jǐ fù",空子:"kòng zi",哪吒:"né zhā",正着:"zhèng zháo",刷子:"shuā zi",丧葬:"sāng zàng",夹带:"jiā dài",安分:"ān fèn",中意:"zhòng yì",长孙:"zhǎng sūn",校订:"jiào dìng",卷曲:"juǎn qū",载运:"zài yùn",投弹:"tóu dàn",柞蚕:"zuò cán",份量:"fèn liàng",调换:"diào huàn",了然:"liǎo rán",咧嘴:"liě zuǐ",典当:"diǎn dàng",寒假:"hán jià",长兄:"zhǎng xiōng",给水:"jǐ shuǐ",须发:"xū fà",枝干:"zhī gàn",属相:"shǔ xiàng",哄抢:"hōng qiǎng",刻划:"kè huà",塞子:"sāi zi",单干:"dān gàn",还乡:"huán xiāng",兆头:"zhào tou",寺观:"sì guàn",督率:"dū shuài",啊哈:"ā ha",割舍:"gē shě",抹布:"mā bù",好恶:"hào wù",下处:"xià chǔ",消长:"xiāo zhǎng",离间:"lí jiàn",准头:"zhǔn tou",校对:"jiào duì",什物:"shí wù",番禺:"pān yú",佛爷:"fó ye",吗啡:"mǎ fēi",盐分:"yán fèn",虎将:"hǔ jiàng",薄荷:"bò he",独处:"dú chǔ",空位:"kòng wèi",铺路:"pū lù",乌拉:"wū lā",调回:"diào huí",来头:"lái tou",闲散:"xián sǎn",胶卷:"jiāo juǎn",冒失:"mào shi",干劲:"gàn jìn",弦乐:"xián yuè",相国:"xiàng guó",丹参:"dān shēn",助兴:"zhù xìng",铺开:"pū kāi",次长:"cì zhǎng",发卡:"fà qiǎ",拮据:"jié jū",刹车:"shā chē",生发:"shēng fà",重播:"chóng bō",缝合:"féng hé",音量:"yīn liàng",少尉:"shào wèi",冲压:"chòng yā",苍劲:"cāng jìng",厚薄:"hòu báo",威吓:"wēi hè",外相:"wài xiàng",呼号:"hū háo",着迷:"zháo mí",挑担:"tiāo dàn",纹路:"wén lù",还俗:"huán sú",强横:"qiáng hèng",着数:"zhāo shù",降顺:"xiáng shùn",挑明:"tiǎo míng",眯缝:"mī feng",分内:"fèn nèi",更衣:"gēng yī",软和:"ruǎn huo",尽兴:"jìn xìng",号子:"hào zi",爪牙:"zhǎo yá",败将:"bài jiàng",猜中:"cāi zhòng",结扎:"jié zā",没空:"méi kòng",夹缝:"jiā fèng",拾掇:"shí duo",掺和:"chān huo",簸箕:"bò ji",电量:"diàn liàng",荷载:"hè zǎi",调式:"diào shì",处身:"chǔ shēn",打手:"dǎ shǒu",弹弓:"dàn gōng",横蛮:"hèng mán",能干:"néng gàn",校点:"jiào diǎn",加载:"jiā zài",干校:"gàn xiào",哄传:"hōng chuán",校注:"jiào zhù",淤塞:"yū sè",马扎:"mǎ zhá",月氏:"yuè zhī",高干:"gāo gàn",经传:"jīng zhuàn",曾孙:"zēng sūn",好斗:"hào dòu",关卡:"guān qiǎ",逃奔:"táo bèn",磨蹭:"mó ceng",牟取:"móu qǔ",颤栗:"zhàn lì",蚂蚱:"mà zha",撮合:"cuō he",趔趄:"liè qie",摔打:"shuāi dǎ",台子:"tái zi",分得:"fēn de",粘着:"nián zhuó",采邑:"cài yì",散装:"sǎn zhuāng",婀娜:"ē nuó",兴味:"xìng wèi",行头:"xíng tou",气量:"qì liàng",调运:"diào yùn",处治:"chǔ zhì",乐音:"yuè yīn",充塞:"chōng sè",恫吓:"dòng hè",论调:"lùn diào",相中:"xiāng zhòng",民乐:"mín yuè",炮仗:"pào zhang",丧服:"sāng fú",骁将:"xiāo jiàng",量刑:"liàng xíng",缝补:"féng bǔ",财会:"cái kuài",大干:"dà gàn",历数:"lì shǔ",校场:"jiào chǎng",塞北:"sài běi",识相:"shí xiàng",辱没:"rǔ mò",鲜亮:"xiān liàng",语塞:"yǔ sè",露脸:"lòu liǎn",凉快:"liáng kuai",腰杆:"yāo gǎn",溜达:"liū da",嘎嘎:"gā gā",公干:"gōng gàn",桔梗:"jié gěng",挑逗:"tiǎo dòu",看门:"kān mén",乐歌:"yuè gē",拓片:"tà piàn",挑动:"tiǎo dòng",准将:"zhǔn jiàng",遒劲:"qiú jìng",磨坊:"mò fáng",逶迤:"wēi yí",搅和:"jiǎo huo",摩挲:"mó suō",作弄:"zuò nòng",苗头:"miáo tou",打颤:"dǎ zhàn",大藏:"dà zàng",畜牲:"chù shēng",勾搭:"gōu da",树荫:"shù yīn",树杈:"shù chà",铁杆:"tiě gǎn",将相:"jiàng xiàng",份子:"fèn zi",视差:"shì chā",绿荫:"lǜ yīn",枪杆:"qiāng gǎn",缝纫:"féng rèn",愁闷:"chóu mèn",点将:"diǎn jiàng",华佗:"huà tuó",劲射:"jìng shè",箱笼:"xiāng lǒng",终了:"zhōng liǎo",鬓发:"bìn fà",结巴:"jiē ba",苦干:"kǔ gàn",看家:"kān jiā",正旦:"zhēng dàn",中肯:"zhòng kěn",厦门:"xià mén",东莞:"dōng guǎn",食量:"shí liàng",宫调:"gōng diào",间作:"jiàn zuò",弹片:"dàn piàn",差池:"chā chí",漂白:"piǎo bái",杠子:"gàng zi",调处:"tiáo chǔ",好动:"hào dòng",转炉:"zhuàn lú",屏气:"bǐng qì",夹板:"jiā bǎn",哀乐:"āi yuè",干道:"gàn dào",苦处:"kǔ chù",劈柴:"pǐ chái",长势:"zhǎng shì",天华:"tiān huá",共处:"gòng chǔ",校验:"jiào yàn",出塞:"chū sài",磨盘:"mò pán",萎靡:"wěi mǐ",奔丧:"bēn sāng",唱和:"chàng hè",大调:"dà diào",非分:"fēi fèn",钻营:"zuān yíng",夹子:"jiā zi",超载:"chāo zài",更始:"gēng shǐ",铃铛:"líng dang",披散:"pī sàn",发还:"fā huán",转轮:"zhuàn lún",横财:"hèng cái",泡桐:"pāo tóng",抛撒:"pāo sǎ",天呀:"tiān yā",糊糊:"hū hu",躯壳:"qū qiào",通量:"tōng liàng",奉还:"fèng huán",午觉:"wǔ jiào",闷棍:"mèn gùn",浪头:"làng tou",砚台:"yàn tái",油坊:"yóu fáng",学长:"xué zhǎng",过载:"guò zài",笔调:"bǐ diào",衣被:"yī bèi",畜产:"xù chǎn",调阅:"diào yuè",蛮干:"mán gàn",曾祖:"zēng zǔ",提干:"tí gàn",变调:"biàn diào",覆没:"fù mò",模子:"mú zi",乐律:"yuè lǜ",称心:"chèn xīn",木杆:"mù gān",重印:"chóng yìn",自省:"zì xǐng",提调:"tí diào",看相:"kàn xiàng",芋头:"yù tou",下切:"xià qiē",塞上:"sài shàng",铺张:"pū zhāng",藤蔓:"téng wàn",薄幸:"bó xìng",解数:"xiè shù",褪去:"tuì qù",霰弹:"xiàn dàn",柚木:"yóu mù",痕量:"hén liàng",雅乐:"yǎ yuè",号哭:"háo kū",诈降:"zhà xiáng",猪圈:"zhū juàn",咋舌:"zé shé",铣床:"xǐ chuáng",防弹:"fáng dàn",健将:"jiàn jiàng",丽水:"lí shuǐ",削发:"xuē fà",空当:"kòng dāng",多相:"duō xiàng",鲜见:"xiǎn jiàn",划桨:"huá jiǎng",载波:"zài bō",跳蚤:"tiào zao",俏皮:"qiào pí",吧嗒:"bā dā",结发:"jié fà",了断:"liǎo duàn",同调:"tóng diào",石磨:"shí mò",时差:"shí chā",鼻塞:"bí sè",挑子:"tiāo zi",推磨:"tuī mò",武侯:"wǔ hóu",抹煞:"mǒ shā",调转:"diào zhuǎn",籍没:"jí mò",还债:"huán zhài",调演:"diào yǎn",分划:"fēn huá",奇偶:"jī ǒu",断喝:"duàn hè",闷雷:"mèn léi",狼藉:"láng jí",饭量:"fàn liàng",还礼:"huán lǐ",转调:"zhuǎn diào",星相:"xīng xiàng",手相:"shǒu xiàng",配乐:"pèi yuè",盖头:"gài tou",连杆:"lián gǎn",簿记:"bù jì",刀把:"dāo bà",量词:"liàng cí",名角:"míng jué",步调:"bù diào",校本:"jiào běn",账簿:"zhàng bù",隽永:"juàn yǒng",稍为:"shāo wéi",易传:"yì zhuàn",乐谱:"yuè pǔ",牵累:"qiān lěi",答理:"dā li",喝斥:"hè chì",吟哦:"yín é",干渠:"gàn qú",海量:"hǎi liàng",精当:"jīng dàng",着床:"zhuó chuáng",月相:"yuè xiàng",庶几:"shù jī",宫观:"gōng guàn",论处:"lùn chǔ",征辟:"zhēng bì",厚朴:"hòu pò",介壳:"jiè qiào",吭哧:"kēng chī",咯血:"kǎ xiě",铺陈:"pū chén",重生:"chóng shēng",乐理:"yuè lǐ",哀号:"āi háo",藏历:"zàng lì",刚劲:"gāng jìng",削平:"xuē píng",浓荫:"nóng yīn",城垛:"chéng duǒ",当差:"dāng chāi",正传:"zhèng zhuàn",并处:"bìng chǔ",创面:"chuāng miàn",旦角:"dàn jué",薄礼:"bó lǐ",晃荡:"huàng dang",臊子:"sào zi",家什:"jiā shí",闷头:"mēn tóu",美发:"měi fà",度数:"dù shu",着凉:"zháo liáng",闯将:"chuǎng jiàng",几案:"jī àn",姘头:"pīn tou",差数:"chā shù",散碎:"sǎn suì",壅塞:"yōng sè",寒颤:"hán zhàn",牵强:"qiān qiǎng",无间:"wú jiàn",轮转:"lún zhuàn",号叫:"háo jiào",铺排:"pū pái",降伏:"xiáng fú",轧钢:"zhá gāng",东阿:"dōng ē",病假:"bìng jià",累加:"lěi jiā",梗塞:"gěng sè",弹夹:"dàn jiā",钻心:"zuān xīn",晃眼:"huǎng yǎn",魔爪:"mó zhǎo",标量:"biāo liàng",憋闷:"biē mèn",猜度:"cāi duó",处士:"chǔ shì",官差:"guān chāi",讨还:"tǎo huán",长门:"cháng mén",馏分:"liú fēn",里弄:"lǐ lòng",色相:"sè xiàng",雅兴:"yǎ xìng",角力:"jué lì",弹坑:"dàn kēng",枝杈:"zhī chà",夹具:"jiā jù",处刑:"chǔ xíng",悍将:"hàn jiàng",好学:"hào xué",好好:"hǎo hǎo",银发:"yín fà",扫把:"sào bǎ",法相:"fǎ xiàng",贵干:"guì gàn",供气:"gōng qì",空余:"kòng yú",捆扎:"kǔn zā",瘠薄:"jí bó",浆糊:"jiàng hu",嘎吱:"gā zhī",调令:"diào lìng",法帖:"fǎ tiè",淋病:"lìn bìng",调派:"diào pài",转盘:"zhuàn pán",供稿:"gōng gǎo",差官:"chāi guān",忧闷:"yōu mèn",教长:"jiào zhǎng",重唱:"chóng chàng",酒兴:"jiǔ xìng",乐坛:"yuè tán",花呢:"huā ní",叱喝:"chì hè",膀臂:"bǎng bì",得空:"dé kòng",转圈:"zhuàn quān",横暴:"hèng bào",哄抬:"hōng tái",引吭:"yǐn háng",载货:"zài huò",中计:"zhòng jì",官长:"guān zhǎng",相面:"xiàng miàn",看头:"kàn tou",盼头:"pàn tou",意兴:"yì xìng",军乐:"jūn yuè",累次:"lěi cì",骨嘟:"gǔ dū",燕赵:"yān zhào",报丧:"bào sāng",弥撒:"mí sa",挨斗:"ái dòu",扁舟:"piān zhōu",丑角:"chǒu jué",吊丧:"diào sāng",强将:"qiáng jiàng",重奏:"chóng zòu",发辫:"fà biàn",着魔:"zháo mó",着法:"zhāo fǎ",盛放:"shèng fàng",填塞:"tián sè",凶横:"xiōng hèng",稽首:"qǐ shǒu",碑帖:"bēi tiè",冲量:"chōng liàng",发菜:"fà cài",假发:"jiǎ fà",翻卷:"fān juǎn",小量:"xiǎo liàng",胶着:"jiāo zhuó",里子:"lǐ zi",调调:"diào diao",散兵:"sǎn bīng",高挑:"gāo tiǎo",播撒:"bō sǎ",夹心:"jiā xīn",扇动:"shān dòng",叨扰:"tāo rǎo",霓裳:"ní cháng",捻子:"niǎn zi",弥缝:"mí féng",撒布:"sǎ bù",场院:"cháng yuàn",省亲:"xǐng qīn",提拉:"tí lā",惯量:"guàn liàng",强逼:"qiáng bī",强征:"qiáng zhēng",晕车:"yùn chē",数道:"shù dào",带累:"dài lèi",拓本:"tà běn",嫌恶:"xián wù",宿将:"sù jiàng",龟裂:"jūn liè",缠夹:"chán jiā",发式:"fà shì",隔扇:"gé shàn",天分:"tiān fèn",癖好:"pǐ hào",四通:"sì tōng",白术:"bái zhú",划伤:"huá shāng",角斗:"jué dòu",听差:"tīng chāi",岁差:"suì chā",丧礼:"sāng lǐ",脉脉:"mò mò",削瘦:"xuē shòu",撒播:"sǎ bō",莎草:"suō cǎo",犍为:"qián wéi",调头:"diào tóu",龙卷:"lóng juǎn",外调:"wài diào",字帖:"zì tiè",卷发:"juǎn fà",揣度:"chuǎi duó",洋相:"yáng xiàng",散光:"sǎn guāng",骨碌:"gū lu",薄命:"bó mìng",笼头:"lóng tóu",咽炎:"yān yán",碌碡:"liù zhou",片儿:"piàn er",纤手:"qiàn shǒu",散体:"sǎn tǐ",内省:"nèi xǐng",强留:"qiáng liú",解送:"jiè sòng",反间:"fǎn jiàn",少壮:"shào zhuàng",留空:"liú kōng",告假:"gào jià",咳血:"ké xuè",薄暮:"bó mù",铺轨:"pū guǐ",磨削:"mó xuē",治丧:"zhì sāng",叉子:"chā zi",哄动:"hōng dòng",蛾子:"é zi",出落:"chū luò",股长:"gǔ zhǎng",贵处:"guì chù",还魂:"huán hún",例假:"lì jià",刹住:"shā zhù",身量:"shēn liàng",同好:"tóng hào",模量:"mó liàng",更生:"gēng shēng",服丧:"fú sāng",率直:"shuài zhí",字模:"zì mú",散架:"sǎn jià",答腔:"dā qiāng",交恶:"jiāo wù",薄情:"bó qíng",眼泡:"yǎn pāo",袅娜:"niǎo nuó",草垛:"cǎo duò",冲劲:"chòng jìn",呢喃:"ní nán",切中:"qiè zhòng",挑灯:"tiǎo dēng",还愿:"huán yuàn",激将:"jī jiàng",更鼓:"gēng gǔ",没药:"mò yào",败兴:"bài xìng",切面:"qiē miàn",散户:"sǎn hù",累进:"lěi jìn",背带:"bēi dài",秤杆:"chèng gǎn",碾坊:"niǎn fáng",簿子:"bù zi",扳手:"bān shǒu",铅山:"yán shān",儒将:"rú jiàng",重光:"chóng guāng",剪发:"jiǎn fà",长上:"zhǎng shàng",小传:"xiǎo zhuàn",压轴:"yā zhòu",弱冠:"ruò guàn",花卷:"huā juǎn",横祸:"hèng huò",夹克:"jiā kè",光晕:"guāng yùn",披靡:"pī mǐ",对调:"duì diào",夹持:"jiā chí",空额:"kòng é",平调:"píng diào",铺床:"pū chuáng",丧钟:"sāng zhōng",作乐:"zuò lè",少府:"shào fǔ",数数:"shuò shuò",奔头:"bèn tou",进给:"jìn jǐ",率性:"shuài xìng",乐子:"lè zi",绑扎:"bǎng zā",挑唆:"tiǎo suō",漂洗:"piǎo xǐ",夹墙:"jiā qiáng",咳喘:"ké chuǎn",乜斜:"miē xie",错处:"cuò chù",闷酒:"mèn jiǔ",时调:"shí diào",重孙:"chóng sūn",经幢:"jīng chuáng",圩场:"xū chǎng",调门:"diào mén",花头:"huā tóu",划拉:"huá la",套色:"tào shǎi",粗率:"cū shuài",相率:"xiāng shuài",款识:"kuǎn zhì",吁请:"yù qǐng",荫蔽:"yīn bì",文蛤:"wén gé",嘀嗒:"dī dā",调取:"diào qǔ",交差:"jiāo chāi",落子:"luò zǐ",相册:"xiàng cè",絮叨:"xù dao",落发:"luò fà",异相:"yì xiàng",浸没:"jìn mò",角抵:"jué dǐ",卸载:"xiè zài",春卷:"chūn juǎn",扎挣:"zhá zheng",畜养:"xù yǎng",吡咯:"bǐ luò",垛子:"duò zi",恶少:"è shào",发际:"fà jì",红苕:"hóng sháo",糨糊:"jiàng hu",哭丧:"kū sāng",稍息:"shào xī",晕船:"yùn chuán",校样:"jiào yàng",外差:"wài chā",脚爪:"jiǎo zhǎo",铺展:"pū zhǎn",芫荽:"yán sui",夹紧:"jiā jǐn",尿泡:"suī pào",丧乱:"sāng luàn",凶相:"xiōng xiàng",华发:"huá fà",打场:"dǎ cháng",云量:"yún liàng",正切:"zhèng qiē",划拳:"huá quán",划艇:"huá tǐng",评传:"píng zhuàn",拉纤:"lā qiàn",句读:"jù dòu",散剂:"sǎn jì",骨殖:"gǔ shi",塞音:"sè yīn",铺叙:"pū xù",阏氏:"yān zhī",冷颤:"lěng zhàn",煞住:"shā zhù",少男:"shào nán",管乐:"guǎn yuè",号啕:"háo táo",纳降:"nà xiáng",拥塞:"yōng sè",万乘:"wàn shèng",杆儿:"gǎn ér",葛藤:"gé téng",簿籍:"bù jí",皮夹:"pí jiā",校准:"jiào zhǔn",允当:"yǔn dàng",器量:"qì liàng",选调:"xuǎn diào",扮相:"bàn xiàng",干才:"gàn cái",基干:"jī gàn",割切:"gē qiē",国乐:"guó yuè",卡壳:"qiǎ ké",辟谷:"bì gǔ",磨房:"mò fáng",咿呀:"yī yā",芥末:"jiè mo",薄技:"bó jì",产假:"chǎn jià",诗兴:"shī xìng",重出:"chóng chū",转椅:"zhuàn yǐ",酌量:"zhuó liang",簿册:"bù cè",藏青:"zàng qīng",的士:"dī shì",调人:"diào rén",解元:"jiè yuán",茎干:"jīng gàn",巨量:"jù liàng",榔头:"láng tou",率真:"shuài zhēn",喷香:"pèn xiāng",锁钥:"suǒ yuè",虾蟆:"há má",相图:"xiàng tú",兴会:"xìng huì",灶头:"zào tóu",重婚:"chóng hūn",钻洞:"zuān dòng",忖度:"cǔn duó",党参:"dǎng shēn",调温:"diào wēn",杆塔:"gān tǎ",葛布:"gé bù",拱券:"gǒng xuàn",夹生:"jiā shēng",露馅:"lòu xiàn",恰切:"qià qiè",散见:"sǎn jiàn",哨卡:"shào qiǎ",烫发:"tàng fà",体量:"tǐ liàng",挺括:"tǐng kuò",系带:"jì dài",相士:"xiàng shì",羊圈:"yáng juàn",转矩:"zhuàn jǔ",吧台:"bā tái",苍术:"cāng zhú",菲薄:"fěi bó",蛤蚧:"gé jiè",蛤蜊:"gé lí",瓜蔓:"guā wàn",怪相:"guài xiàng",临帖:"lín tiè",女红:"nǚ gōng",刨床:"bào chuáng",翘楚:"qiáo chǔ",数九:"shǔ jiǔ",谈兴:"tán xìng",雄劲:"xióng jìng",扎染:"zā rǎn",遮荫:"zhē yīn",周正:"zhōu zhèng",赚头:"zhuàn tou",扒手:"pá shǒu",搀和:"chān huo",诚朴:"chéng pǔ",肚量:"dù liàng",干结:"gān jié",工尺:"gōng chě",家累:"jiā lěi",曲水:"qū shuǐ",沙参:"shā shēn",挑花:"tiǎo huā",阿门:"ā mén",背篓:"bēi lǒu",瘪三:"biē sān",裁处:"cái chǔ",创痛:"chuāng tòng",福相:"fú xiàng",更动:"gēng dòng",豪兴:"háo xìng",还阳:"huán yáng",还嘴:"huán zuǐ",借调:"jiè diào",卷云:"juǎn yún",流弹:"liú dàn",想头:"xiǎng tou",削价:"xuē jià",校阅:"jiào yuè",雅量:"yǎ liàng",别传:"bié zhuàn",薄酒:"bó jiǔ",春假:"chūn jià",发妻:"fà qī",哗哗:"huā huā",宽绰:"kuān chuo",了悟:"liǎo wù",切花:"qiē huā",审度:"shěn duó",应许:"yīng xǔ",转台:"zhuàn tái",仔猪:"zǐ zhū",裁量:"cái liáng",藏戏:"zàng xì",乘兴:"chéng xìng",绸缪:"chóu móu",摧折:"cuī zhé",调经:"tiáo jīng",调职:"diào zhí",缝缀:"féng zhuì",骨朵:"gū duǒ",核儿:"hú er",恒量:"héng liàng",还价:"huán jià",浑朴:"hún pǔ",苦差:"kǔ chāi",面糊:"miàn hù",煞车:"shā chē",省视:"xǐng shì",什锦:"shí jǐn",信差:"xìn chāi",余切:"yú qiē",攒眉:"cuán méi",炸糕:"zhá gāo",钻杆:"zuàn gǎn",扒灰:"pá huī",拌和:"bàn huò",长调:"cháng diào",大溜:"dà liù",抖搂:"dǒu lōu",飞转:"fēi zhuàn",干仗:"gàn zhàng",好胜:"hào shèng",画片:"huà piàn",搅混:"jiǎo hún",螺杆:"luó gǎn",木模:"mù mú",怒号:"nù háo",频数:"pín shù",无宁:"wú níng",遗少:"yí shào",邮差:"yóu chāi",占卦:"zhān guà",占星:"zhān xīng",重审:"chóng shěn",自量:"zì liàng",调防:"diào fáng",发廊:"fà láng",反调:"fǎn diào",缝子:"fèng zi",更夫:"gēng fū",骨子:"gǔ zi",光杆:"guāng gǎn",夹棍:"jiā gùn",居丧:"jū sāng",巨贾:"jù gǔ",看押:"kān yā",空转:"kōng zhuàn",量力:"liàng lì",炮烙:"páo luò",赔还:"péi huán",扑扇:"pū shān",散记:"sǎn jì",散件:"sǎn jiàn",删削:"shān xuē",射干:"shè gàn",条几:"tiáo jī",偷空:"tōu kòng",削壁:"xuē bì",校核:"jiào hé",阴干:"yīn gān",择菜:"zhái cài",重九:"chóng jiǔ",主调:"zhǔ diào",自禁:"zì jīn",吧唧:"bā jī",便溺:"biàn niào",词调:"cí diào",叨咕:"dáo gu",落枕:"lào zhěn",铺砌:"pū qì",刷白:"shuà bái",委靡:"wěi mǐ",系泊:"xì bó",相马:"xiàng mǎ",熨帖:"yù tiē",转筋:"zhuàn jīn",棒喝:"bàng hè",傧相:"bīn xiàng",镐头:"gǎo tóu",间苗:"jiàn miáo",乐池:"yuè chí",卖相:"mài xiàng",屏弃:"bǐng qì",铅弹:"qiān dàn",切变:"qiē biàn",请调:"qǐng diào",群氓:"qún méng",散板:"sǎn bǎn",省察:"xǐng chá",事假:"shì jià",纤绳:"qiàn shéng",重影:"chóng yǐng",耕种:"gēng zhòng",种地:"zhòng dì",种菜:"zhòng cài",栽种:"zāi zhòng",接种:"jiē zhòng",垦种:"kěn zhòng",种殖:"zhòng zhí",种瓜:"zhòng guā",种豆:"zhòng dòu",种树:"zhòng shù",睡着:"shuì zháo",笼子:"lóng zi",重启:"chóng qǐ",重整:"chóng zhěng",重弹:"chóng tán",重足:"chóng zú",重山:"chóng shān",重游:"chóng yóu",重峦:"chóng luán",爷爷:"yé ye",奶奶:"nǎi nai",姥爷:"lǎo ye",爸爸:"bà ba",妈妈:"mā ma",婶婶:"shěn shen",舅舅:"jiù jiu",姑姑:"gū gu",叔叔:"shū shu",姨夫:"yí fu",舅母:"jiù mu",姑父:"gū fu",姐夫:"jiě fu",婆婆:"pó po",公公:"gōng gong",舅子:"jiù zi",姐姐:"jiě jie",哥哥:"gē ge",妹妹:"mèi mei",妹夫:"mèi fu",姨子:"yí zi",宝宝:"bǎo bao",娃娃:"wá wa",孩子:"hái zi",日子:"rì zi",样子:"yàng zi",狮子:"shī zi",身子:"shēn zi",架子:"jià zi",嫂子:"sǎo zi",鼻子:"bí zi",亭子:"tíng zi",折子:"zhé zi",面子:"miàn zi",脖子:"bó zi",辈子:"bèi zi",帽子:"mào zi",拍子:"pāi zi",柱子:"zhù zi",辫子:"biàn zi",鸽子:"gē zi",房子:"fáng zi",丸子:"wán zi",摊子:"tān zi",牌子:"pái zi",胡子:"hú zi",鬼子:"guǐ zi",矮子:"ǎi zi",鸭子:"yā zi",小子:"xiǎo zi",影子:"yǐng zi",屋子:"wū zi",对子:"duì zi",点子:"diǎn zi",本子:"běn zi",种子:"zhǒng zi",儿子:"ér zi",兔子:"tù zi",骗子:"piàn zi",院子:"yuàn zi",猴子:"hóu zi",嗓子:"sǎng zi",侄子:"zhí zi",柿子:"shì zi",钳子:"qián zi",虱子:"shī zi",瓶子:"píng zi",豹子:"bào zi",筷子:"kuài zi",篮子:"lán zi",绳子:"shéng zi",嘴巴:"zuǐ ba",耳朵:"ěr duo",茄子:"qié zi",蚌埠:"bèng bù",崆峒:"kōng tóng",琵琶:"pí pa",蘑菇:"mó gu",葫芦:"hú lu",狐狸:"hú li",桔子:"jú zi",盒子:"hé zi",桌子:"zhuō zi",竹子:"zhú zi",师傅:"shī fu",衣服:"yī fu",袜子:"wà zi",杯子:"bēi zi",刺猬:"cì wei",麦子:"mài zi",队伍:"duì wu",知了:"zhī liǎo",鱼儿:"yú er",馄饨:"hún tun",灯笼:"dēng long",庄稼:"zhuāng jia",聪明:"cōng ming",镜子:"jìng zi",银子:"yín zi",盘子:"pán zi",了却:"liǎo què",力气:"lì qi",席子:"xí zi",林子:"lín zi",朝霞:"zhāo xiá",朝夕:"zhāo xī",朝气:"zhāo qì",翅膀:"chì bǎng",省长:"shěng zhǎng",臧否:"zāng pǐ",否泰:"pǐ tài",变得:"biàn de",丈夫:"zhàng fu",豆腐:"dòu fu",笔杆:"bǐ gǎn",枞阳:"zōng yáng",行人:"xíng rén",打着:"dǎ zhe",第一:"dì yī",万一:"wàn yī",之一:"zhī yī",得之:"dé zhī",统一:"tǒng yī",唯一:"wéi yī",专一:"zhuān yī",单一:"dān yī",如一:"rú yī",其一:"qí yī",合一:"hé yī",逐一:"zhú yī",周一:"zhōu yī",初一:"chū yī",研一:"yán yī",归一:"guī yī",假一:"jiǎ yī",闻一:"wén yī",了了:"liǎo liǎo",公了:"gōng liǎo",私了:"sī liǎo",一月:"yī yuè",一号:"yī hào",一级:"yī jí",一等:"yī děng",一哥:"yī gē",月一:"yuè yī",一一:"yī yī",二一:"èr yī",三一:"sān yī",四一:"sì yī",五一:"wǔ yī",六一:"liù yī",七一:"qī yī",八一:"bā yī",九一:"jiǔ yī","一〇":"yī líng",一零:"yī líng",一二:"yī èr",一三:"yī sān",一四:"yī sì",一五:"yī wǔ",一六:"yī liù",一七:"yī qī",一八:"yī bā",一九:"yī jiǔ",一又:"yī yòu",一饼:"yī bǐng",一楼:"yī lóu",为例:"wéi lì",为准:"wéi zhǔn",沧海:"cāng hǎi",难为:"nán wéi",责难:"zé nàn",患难:"huàn nàn",磨难:"mó nàn",大难:"dà nàn",刁难:"diāo nàn",殉难:"xùn nàn",落难:"luò nàn",罹难:"lí nàn",灾难:"zāi nàn",难民:"nàn mín",苦难:"kǔ nàn",危难:"wēi nàn",发难:"fā nàn",逃难:"táo nàn",避难:"bì nàn",遇难:"yù nàn",阻难:"zǔ nàn",厄难:"è nàn",徇难:"xùn nàn",空难:"kōng nàn",喜欢:"xǐ huan",朝朝:"zhāo zhāo",不行:"bù xíng",轧轧:"yà yà",弯曲:"wān qū",扭曲:"niǔ qū",曲直:"qū zhí",委曲:"wěi qū",酒曲:"jiǔ qū",曲径:"qū jìng",曲解:"qū jiě",歪曲:"wāi qū",曲线:"qū xiàn",曲阜:"qū fù",九曲:"jiǔ qū",曲折:"qū zhé",曲肱:"qū gōng",曲意:"qū yì",仡佬:"gē lǎo"},Ble=Object.keys(vS).map(e=>({zh:e,pinyin:vS[e],probability:2e-8,length:2,priority:Yr.Normal,dict:Symbol("dict2")})),yS={为什么:"wèi shén me",实际上:"shí jì shang",检察长:"jiǎn chá zhǎng",干什么:"gàn shén me",这会儿:"zhè huì er",尽可能:"jǐn kě néng",董事长:"dǒng shì zhǎng",了不起:"liǎo bù qǐ",参谋长:"cān móu zhǎng",朝鲜族:"cháo xiǎn zú",海内外:"hǎi nèi wài",禁不住:"jīn bú zhù",柏拉图:"bó lā tú",不在乎:"bú zài hu",洛杉矶:"luò shān jī",有点儿:"yǒu diǎn er",迫击炮:"pǎi jī pào",不得了:"bù dé liǎo",马尾松:"mǎ wěi sōng",运输量:"yùn shū liàng",发脾气:"fā pí qi",士大夫:"shì dà fū",鸭绿江:"yā lù jiāng",压根儿:"yà gēn er",对得起:"duì de qǐ",那会儿:"nà huì er",自个儿:"zì gě er",物理量:"wù lǐ liàng",怎么着:"zěn me zhāo",明晃晃:"míng huǎng huǎng",节假日:"jié jià rì",心里话:"xīn lǐ huà",发行量:"fā xíng liàng",兴冲冲:"xìng chōng chōng",分子量:"fēn zǐ liàng",国子监:"guó zǐ jiàn",老大难:"lǎo dà nán",党内外:"dǎng nèi wài",这么着:"zhè me zhāo",少奶奶:"shào nǎi nai",暗地里:"àn dì lǐ",更年期:"gēng nián qī",工作量:"gōng zuò liàng",背地里:"bèi dì lǐ",山里红:"shān li hóng",好好儿:"hǎo hāo er",交响乐:"jiāo xiǎng yuè",好意思:"hǎo yì si",吐谷浑:"tǔ yù hún",没意思:"méi yì si",理发师:"lǐ fà shī",塔什干:"tǎ shí gān",充其量:"chōng qí liàng",靠得住:"kào de zhù",车行道:"chē xíng dào",人行道:"rén xíng dào",中郎将:"zhōng láng jiàng",照明弹:"zhào míng dàn",烟幕弹:"yān mù dàn",没奈何:"mò nài hé",乱哄哄:"luàn hōng hōng",惠更斯:"huì gēng sī",载重量:"zài zhòng liàng",瞧得起:"qiáo de qǐ",纪传体:"jì zhuàn tǐ",阿房宫:"ē páng gōng",卷心菜:"juǎn xīn cài",戏班子:"xì bān zi",过得去:"guò de qù",花岗石:"huā gāng shí",外甥女:"wài sheng nǚ",团团转:"tuán tuán zhuàn",大堡礁:"dà bǎo jiāo",燃烧弹:"rán shāo dàn",劳什子:"láo shí zi",摇滚乐:"yáo gǔn yuè",夹竹桃:"jiā zhú táo",闹哄哄:"nào hōng hōng",三连冠:"sān lián guàn",重头戏:"zhòng tóu xì",二人转:"èr rén zhuàn",节骨眼:"jiē gǔ yǎn",知识面:"zhī shi miàn",护士长:"hù shi zhǎng",信号弹:"xìn hào dàn",干电池:"gān diàn chí",枪杆子:"qiāng gǎn zi",哭丧棒:"kū sāng bàng",鼻咽癌:"bí yān ái",瓦岗军:"wǎ gāng jūn",买得起:"mǎi de qǐ",癞蛤蟆:"lài há ma",脊梁骨:"jǐ liang gǔ",子母弹:"zǐ mǔ dàn",开小差:"kāi xiǎo chāi",女强人:"nǚ qiáng rén",英雄传:"yīng xióng zhuàn",爵士乐:"jué shì yuè",说笑话:"shuō xiào hua",碰头会:"pèng tóu huì",玻璃钢:"bō li gāng",曳光弹:"yè guāng dàn",少林拳:"shào lín quán",咏叹调:"yǒng tàn diào",少先队:"shào xiān duì",灵长目:"líng zhǎng mù",对着干:"duì zhe gàn",蒙蒙亮:"méng méng liàng",软骨头:"ruǎn gǔ tou",铺盖卷:"pū gài juǎn",和稀泥:"huò xī ní",背黑锅:"bēi hēi guō",红彤彤:"hóng tōng tōng",武侯祠:"wǔ hóu cí",打哆嗦:"dǎ duō suo",户口簿:"hù kǒu bù",马尾藻:"mǎ wěi zǎo",夜猫子:"yè māo zi",打手势:"dǎ shǒu shì",龙王爷:"lóng wáng yé",气头上:"qì tóu shang",糊涂虫:"hú tu chóng",笔杆子:"bǐ gǎn zi",占便宜:"zhàn pián yi",打主意:"dǎ zhǔ yì",多弹头:"duō dàn tóu",露一手:"lòu yì shǒu",堰塞湖:"yàn sè hú",保得住:"bǎo de zhù",趵突泉:"bào tū quán",奥得河:"ào de hé",司务长:"sī wù zhǎng",禁不起:"jīn bù qǐ",什刹海:"shí chà hǎi",莲花落:"lián huā lào",见世面:"jiàn shì miàn",豁出去:"huō chū qù",电位差:"diàn wèi chā",挨个儿:"āi gè er",那阵儿:"nà zhèn er",肺活量:"fèi huó liàng",大师傅:"dà shī fu",掷弹筒:"zhì dàn tǒng",打呼噜:"dǎ hū lu",广渠门:"ān qú mén",未见得:"wèi jiàn dé",大婶儿:"dà shěn er",谈得来:"tán de lái",脚丫子:"jiǎo yā zi",空包弹:"kōng bāo dàn",窝里斗:"wō li dòu",弹着点:"dàn zhuó diǎn",个头儿:"gè tóu er",看得起:"kàn de qǐ",糊涂账:"hú tu zhàng",大猩猩:"dà xīng xing",禁得起:"jīn de qǐ",法相宗:"fǎ xiàng zōng",可怜相:"kě lián xiàng",吃得下:"chī de xià",汉堡包:"hàn bǎo bāo",闹嚷嚷:"nào rāng rāng",数来宝:"shǔ lái bǎo",合得来:"hé de lái",干性油:"gān xìng yóu",闷葫芦:"mèn hú lu",呱呱叫:"guā guā jiào",西洋参:"xī yáng shēn",林荫道:"lín yīn dào",拉家常:"lā jiā cháng",卷铺盖:"juǎn pū gài",过得硬:"guò de yìng",飞将军:"fēi jiāng jūn",挑大梁:"tiǎo dà liáng",哈巴狗:"hǎ ba gǒu",过家家:"guò jiā jiā",催泪弹:"cuī lèi dàn",雨夹雪:"yǔ jiā xuě",敲竹杠:"qiāo zhú gàng",列车长:"liè chē zhǎng",华达呢:"huá dá ní",犯得着:"fàn de zháo",土疙瘩:"tǔ gē da",煞风景:"shā fēng jǐng",轻量级:"qīng liàng jí",羞答答:"xiū dā dā",石子儿:"shí zǐ er",达姆弹:"dá mǔ dàn",科教片:"kē jiào piān",侃大山:"kǎn dà shān",丁点儿:"dīng diǎn er",吃得消:"chī de xiāo",捋虎须:"luō hǔ xū",高丽参:"gāo lí shēn",众生相:"zhòng shēng xiàng",咽峡炎:"yān xiá yán",禁得住:"jīn de zhù",吃得开:"chī de kāi",柞丝绸:"zuò sī chóu",应声虫:"yìng shēng chóng",数得着:"shǔ de zháo",傻劲儿:"shǎ jìn er",铅玻璃:"qiān bō li",可的松:"kě dì sōng",划得来:"huá de lái",晕乎乎:"yūn hū hū",屎壳郎:"shǐ ke làng",尥蹶子:"liào juě zi",藏红花:"zàng hóng huā",闷罐车:"mèn guàn chē",卡脖子:"qiǎ bó zi",红澄澄:"hóng deng deng",赶得及:"gǎn de jí",当间儿:"dāng jiàn er",露马脚:"lòu mǎ jiǎo",鸡内金:"jī nèi jīn",犯得上:"fàn de shàng",钉齿耙:"dīng chǐ bà",饱和点:"bǎo hé diǎn",龙爪槐:"lóng zhǎo huái",喝倒彩:"hè dào cǎi",定冠词:"dìng guàn cí",担担面:"dàn dan miàn",吃得住:"chī de zhù",爪尖儿:"zhuǎ jiān er",支着儿:"zhī zhāo er",折跟头:"zhē gēn tou",阴着儿:"yīn zhāo er",烟卷儿:"yān juǎn er",宣传弹:"xuān chuán dàn",信皮儿:"xìn pí er",弦切角:"xián qiē jiǎo",缩砂密:"sù shā mì",说得来:"shuō de lái",水漂儿:"shuǐ piāo er",耍笔杆:"shuǎ bǐ gǎn",数得上:"shǔ de shàng",数不着:"shǔ bù zháo",数不清:"shǔ bù qīng",什件儿:"shí jiàn er",生死簿:"shēng sǐ bù",扇风机:"shān fēng jī",撒呓挣:"sā yì zheng",日记簿:"rì jì bù",热得快:"rè de kuài",亲家公:"qìng jia gōng",奇函数:"jī hán shù",拍纸簿:"pāi zhǐ bù",努劲儿:"nǔ jìn er",泥娃娃:"ní wá wa",内切圆:"nèi qiē yuán",哪会儿:"nǎ huì er",闷头儿:"mēn tóu er",没谱儿:"méi pǔ er",铆劲儿:"mǎo jìn er",溜肩膀:"liū jiān bǎng",了望台:"liào wàng tái",老来少:"lǎo lái shào",坤角儿:"kūn jué er",考勤簿:"kǎo qín bù",卷笔刀:"juǎn bǐ dāo",进给量:"jìn jǐ liàng",划不来:"huá bù lái",汗褂儿:"hàn guà er",鼓囊囊:"gǔ nāng nāng",够劲儿:"gòu jìn er",公切线:"gōng qiē xiàn",搁得住:"gé de zhù",赶浪头:"gǎn làng tóu",赶得上:"gǎn de shàng",干酵母:"gān jiào mǔ",嘎渣儿:"gā zhā er",嘎嘣脆:"gā bēng cuì",对得住:"duì de zhù",逗闷子:"dòu mèn zi",顶呱呱:"dǐng guā guā",滴溜儿:"dī liù er",大轴子:"dà zhòu zi",打板子:"dǎ bǎn zi",寸劲儿:"cùn jìn er",醋劲儿:"cù jìn er",揣手儿:"chuāi shǒu er",冲劲儿:"chòng jìn er",吃得来:"chī de lái",不更事:"bù gēng shì",奔头儿:"bèn tou er",百夫长:"bǎi fū zhǎng",娃娃亲:"wá wa qīn",死劲儿:"sǐ jìn er",骨朵儿:"gū duǒ er",功劳簿:"gōng láo bù",都江堰:"dū jiāng yàn",一担水:"yí dàn shuǐ",否极泰:"pǐ jí tài",泰来否:"tài lái pǐ",咳特灵:"ké tè líng",开户行:"kāi hù háng",郦食其:"lì yì jī",花事了:"huā shì liǎo",一更更:"yì gēng gēng",一重山:"yì chóng shān",风一更:"fēng yì gēng",雪一更:"xuě yì gēng",归一码:"guī yì mǎ",星期一:"xīng qī yī",礼拜一:"lǐ bài yī",一季度:"yī jì dù",一月一:"yī yuè yī",一字马:"yī zì mǎ",一是一:"yī shì yī",一次方:"yī cì fāng",一阳指:"yī yáng zhǐ",一字决:"yī zì jué",一年级:"yī nián jí",一不做:"yī bú zuò",屈戌儿:"qū qu ér",难为水:"nán wéi shuǐ",难为情:"nán wéi qíng",行一行:"xíng yì háng",别别的:"biè bié de",干哪行:"gàn nǎ háng",干一行:"gàn yì háng",曲别针:"qū bié zhēn"},zle=Object.keys(yS).map(e=>({zh:e,pinyin:yS[e],probability:2e-8,length:3,priority:Yr.Normal,dict:Symbol("dict3")})),kS={成吉思汗:"chéng jí sī hán",四通八达:"sì tōng bā dá",一模一样:"yì mú yí yàng",青藏高原:"qīng zàng gāo yuán",阿弥陀佛:"ē mí tuó fó",解放思想:"jiè fàng sī xiǎng",所作所为:"suǒ zuò suǒ wéi",迷迷糊糊:"mí mí hu hū",荷枪实弹:"hè qiāng shí dàn",兴高采烈:"xìng gāo cǎi liè",无能为力:"wú néng wéi lì",布鲁塞尔:"bù lǔ sài ěr",为所欲为:"wéi suǒ yù wéi",克什米尔:"kè shí mǐ ěr",没完没了:"méi wán méi liǎo",不为人知:"bù wéi rén zhī",结结巴巴:"jiē jiē bā bā",前仆后继:"qián pū hòu jì",铺天盖地:"pū tiān gài dì",直截了当:"zhí jié liǎo dàng",供不应求:"gōng bú yìng qiú",御史大夫:"yù shǐ dà fū",不为瓦全:"bù wéi wǎ quán",不可收拾:"bù kě shōu shi",胡作非为:"hú zuò fēi wéi",分毫不差:"fēn háo bú chà",模模糊糊:"mó mó hu hū",不足为奇:"bù zú wéi qí",悄无声息:"qiǎo wú shēng xī",了如指掌:"liǎo rú zhǐ zhǎng",深恶痛绝:"shēn wù tòng jué",高高兴兴:"gāo gāo xìng xìng",唉声叹气:"āi shēng tàn qì",汉藏语系:"hàn zàng yǔ xì",处心积虑:"chǔ xīn jī lǜ",泣不成声:"qì bù chéng shēng",半夜三更:"bàn yè sān gēng",失魂落魄:"shī hún luò pò",二十八宿:"èr shí bā xiù",转来转去:"zhuàn lái zhuàn qù",数以万计:"shǔ yǐ wàn jì",相依为命:"xiāng yī wéi mìng",恋恋不舍:"liàn liàn bù shě",屈指可数:"qū zhǐ kě shǔ",神出鬼没:"shén chū guǐ mò",结结实实:"jiē jiē shí shí",有的放矢:"yǒu dì fàng shǐ",叽哩咕噜:"jī lǐ gū lū",调兵遣将:"diào bīng qiǎn jiàng",载歌载舞:"zài gē zài wǔ",转危为安:"zhuǎn wēi wéi ān",踏踏实实:"tā tā shi shí",桑给巴尔:"sāng jǐ bā ěr",装模作样:"zhuāng mú zuò yàng",见义勇为:"jiàn yì yǒng wéi",相差无几:"xiāng chā wú jǐ",叹为观止:"tàn wéi guān zhǐ",闷闷不乐:"mèn mèn bú lè",喜怒哀乐:"xǐ nù āi lè",鲜为人知:"xiǎn wéi rén zhī",张牙舞爪:"zhāng yá wǔ zhǎo",为非作歹:"wéi fēi zuò dǎi",含糊其辞:"hán hú qí cí",疲于奔命:"pí yú bēn mìng",勉为其难:"miǎn wéi qí nán",依依不舍:"yī yī bù shě",顶头上司:"dǐng tóu shàng si",不着边际:"bù zhuó biān jì",大模大样:"dà mú dà yàng",寻欢作乐:"xún huān zuò lè",一走了之:"yì zǒu liǎo zhī",字里行间:"zì lǐ háng jiān",含含糊糊:"hán hán hu hū",恰如其分:"qià rú qí fèn",破涕为笑:"pò tì wéi xiào",深更半夜:"shēn gēng bàn yè",千差万别:"qiān chā wàn bié",数不胜数:"shǔ bú shèng shǔ",据为己有:"jù wéi jǐ yǒu",天旋地转:"tiān xuán dì zhuàn",养尊处优:"yǎng zūn chǔ yōu",玻璃纤维:"bō li xiān wéi",吵吵闹闹:"chāo chao nào nào",晕头转向:"yūn tóu zhuàn xiàng",土生土长:"tǔ shēng tǔ zhǎng",宁死不屈:"nìng sǐ bù qū",不省人事:"bù xǐng rén shì",尽力而为:"jìn lì ér wéi",精明强干:"jīng míng qiáng gàn",唠唠叨叨:"láo lao dāo dāo",叽叽喳喳:"jī ji zhā zhā",功不可没:"gōng bù kě mò",锲而不舍:"qiè ér bù shě",排忧解难:"pái yōu jiě nàn",稀里糊涂:"xī li hú tú",各有所长:"gè yǒu suǒ cháng",的的确确:"dí dí què què",哄堂大笑:"hōng táng dà xiào",听而不闻:"tīng ér bù wén",刀耕火种:"dāo gēng huǒ zhòng",内分泌腺:"nèi fèn mì xiàn",化险为夷:"huà xiǎn wéi yí",百发百中:"bǎi fā bǎi zhòng",重见天日:"chóng jiàn tiān rì",反败为胜:"fǎn bài wéi shèng",一了百了:"yì liǎo bǎi liǎo",大大咧咧:"dà da liē liē",心急火燎:"xīn jí huǒ liǎo",粗心大意:"cū xīn dà yi",鸡皮疙瘩:"jī pí gē da",夷为平地:"yí wéi píng dì",日积月累:"rì jī yuè lěi",设身处地:"shè shēn chǔ dì",投其所好:"tóu qí suǒ hào",间不容发:"jiān bù róng fà",人满为患:"rén mǎn wéi huàn",穷追不舍:"qióng zhuī bù shě",为时已晚:"wéi shí yǐ wǎn",如数家珍:"rú shǔ jiā zhēn",心里有数:"xīn lǐ yǒu shù",以牙还牙:"yǐ yá huán yá",神不守舍:"shén bù shǒu shě",孟什维克:"mèng shí wéi kè",各自为战:"gè zì wéi zhàn",怨声载道:"yuàn shēng zài dào",救苦救难:"jiù kǔ jiù nàn",好好先生:"hǎo hǎo xiān sheng",怪模怪样:"guài mú guài yàng",抛头露面:"pāo tóu lù miàn",游手好闲:"yóu shǒu hào xián",无所不为:"wú suǒ bù wéi",调虎离山:"diào hǔ lí shān",步步为营:"bù bù wéi yíng",好大喜功:"hào dà xǐ gōng",众矢之的:"zhòng shǐ zhī dì",长生不死:"cháng shēng bù sǐ",蔚为壮观:"wèi wéi zhuàng guān",不可胜数:"bù kě shèng shǔ",鬼使神差:"guǐ shǐ shén chāi",洁身自好:"jié shēn zì hào",敢作敢为:"gǎn zuò gǎn wéi",茅塞顿开:"máo sè dùn kāi",走马换将:"zǒu mǎ huàn jiàng",为时过早:"wéi shí guò zǎo",为人师表:"wéi rén shī biǎo",阴差阳错:"yīn chā yáng cuò",油腔滑调:"yóu qiāng huá diào",重蹈覆辙:"chóng dǎo fù zhé",骂骂咧咧:"mà ma liē liē",絮絮叨叨:"xù xù dāo dāo",如履薄冰:"rú lǚ bó bīng",损兵折将:"sǔn bīng zhé jiàng",拐弯抹角:"guǎi wān mò jiǎo",像模像样:"xiàng mú xiàng yàng",供过于求:"gōng guò yú qiú",开花结果:"kāi huā jiē guǒ",仔仔细细:"zǐ zǐ xì xì",川藏公路:"chuān zàng gōng lù",河北梆子:"hé běi bāng zi",长年累月:"cháng nián lěi yuè",正儿八经:"zhèng er bā jīng",不识抬举:"bù shí tái ju",重振旗鼓:"chóng zhèn qí gǔ",气息奄奄:"qì xī yān yān",紧追不舍:"jǐn zhuī bù shě",服服帖帖:"fú fu tiē tiē",强词夺理:"qiǎng cí duó lǐ",噼里啪啦:"pī li pā lā",人才济济:"rén cái jǐ jǐ",发人深省:"fā rén shēn xǐng",不足为凭:"bù zú wéi píng",为富不仁:"wéi fù bù rén",连篇累牍:"lián piān lěi dú",呼天抢地:"hū tiān qiāng dì",落落大方:"luò luò dà fāng",自吹自擂:"zì chuī zì léi",乐善好施:"lè shàn hào shī",以攻为守:"yǐ gōng wéi shǒu",磨磨蹭蹭:"mó mó cèng cèng",削铁如泥:"xuē tiě rú ní",助纣为虐:"zhù zhòu wéi nüè",以退为进:"yǐ tuì wéi jìn",嘁嘁喳喳:"qī qī chā chā",枪林弹雨:"qiāng lín dàn yǔ",令人发指:"lìng rén fà zhǐ",转败为胜:"zhuǎn bài wéi shèng",转弯抹角:"zhuǎn wān mò jiǎo",在劫难逃:"zài jié nán táo",正当防卫:"zhèng dàng fáng wèi",不足为怪:"bù zú wéi guài",难兄难弟:"nàn xiōng nàn dì",咿咿呀呀:"yī yī yā yā",弹尽粮绝:"dàn jìn liáng jué",阿谀奉承:"ē yú fèng chéng",稀里哗啦:"xī li huā lā",返老还童:"fǎn lǎo huán tóng",好高骛远:"hào gāo wù yuǎn",鹿死谁手:"lù sǐ shéi shǒu",差强人意:"chā qiáng rén yì",大吹大擂:"dà chuī dà léi",成家立业:"chéng jiā lì yè",自怨自艾:"zì yuàn zì yì",负债累累:"fù zhài lěi lěi",古为今用:"gǔ wéi jīn yòng",入土为安:"rù tǔ wéi ān",下不为例:"xià bù wéi lì",一哄而上:"yì hōng ér shàng",没头苍蝇:"méi tóu cāng ying",天差地远:"tiān chā dì yuǎn",风卷残云:"fēng juǎn cán yún",多灾多难:"duō zāi duō nàn",乳臭未干:"rǔ xiù wèi gān",行家里手:"háng jiā lǐ shǒu",狼狈为奸:"láng bèi wéi jiān",处变不惊:"chǔ biàn bù jīng",一唱一和:"yí chàng yí hè",一念之差:"yí niàn zhī chā",金蝉脱壳:"jīn chán tuō qiào",滴滴答答:"dī dī dā dā",硕果累累:"shuò guǒ léi léi",好整以暇:"hào zhěng yǐ xiá",红得发紫:"hóng de fā zǐ",传为美谈:"chuán wéi měi tán",富商大贾:"fù shāng dà gǔ",四海为家:"sì hǎi wéi jiā",了若指掌:"liǎo ruò zhǐ zhǎng",大有可为:"dà yǒu kě wéi",出头露面:"chū tóu lù miàn",鼓鼓囊囊:"gǔ gu nāng nāng",窗明几净:"chuāng míng jī jìng",泰然处之:"tài rán chǔ zhī",怒发冲冠:"nù fà chōng guān",有机玻璃:"yǒu jī bō li",骨头架子:"gǔ tou jià zi",义薄云天:"yì bó yún tiān",一丁点儿:"yī dīng diǎn er",时来运转:"shí lái yùn zhuǎn",陈词滥调:"chén cí làn diào",化整为零:"huà zhěng wéi líng",火烧火燎:"huǒ shāo huǒ liǎo",干脆利索:"gàn cuì lì suǒ",吊儿郎当:"diào er láng dāng",广种薄收:"guǎng zhòng bó shōu",种瓜得瓜:"zhòng guā dé guā",种豆得豆:"zhòng dòu dé dòu",难舍难分:"nán shě nán fēn",歃血为盟:"shà xuè wéi méng",奋发有为:"fèn fā yǒu wéi",阴错阳差:"yīn cuò yáng chā",东躲西藏:"dōng duǒ xī cáng",烟熏火燎:"yān xūn huǒ liǎo",钻牛角尖:"zuān niú jiǎo jiān",乔装打扮:"qiáo zhuāng dǎ bàn",改弦更张:"gǎi xián gēng zhāng",河南梆子:"hé nán bāng zi",好吃懒做:"hào chī lǎn zuò",何乐不为:"hé lè bù wéi",大出风头:"dà chū fēng tóu",攻城掠地:"gōng chéng lüè dì",漂漂亮亮:"piào piào liang liang",折衷主义:"zhé zhōng zhǔ yì",大马哈鱼:"dà mǎ hǎ yú",绿树成荫:"lǜ shù chéng yīn",率先垂范:"shuài xiān chuí fàn",家长里短:"jiā cháng lǐ duǎn",宽大为怀:"kuān dà wéi huái",左膀右臂:"zuǒ bǎng yòu bì",一笑了之:"yí xiào liǎo zhī",天下为公:"tiān xià wéi gōng",还我河山:"huán wǒ hé shān",何足为奇:"hé zú wéi qí",好自为之:"hǎo zì wéi zhī",风姿绰约:"fēng zī chuò yuē",大雨滂沱:"dà yǔ pāng tuó",传为佳话:"chuán wéi jiā huà",吃里扒外:"chī lǐ pá wài",重操旧业:"chóng cāo jiù yè",小家子气:"xiǎo jiā zi qì",少不更事:"shào bù gēng shì",难分难舍:"nán fēn nán shě",添砖加瓦:"tiān zhuān jiā wǎ",是非分明:"shì fēi fēn míng",舍我其谁:"shě wǒ qí shuí",偏听偏信:"piān tīng piān xìn",量入为出:"liàng rù wéi chū",降龙伏虎:"xiáng lóng fú hǔ",钢化玻璃:"gāng huà bō li",正中下怀:"zhèng zhòng xià huái",以身许国:"yǐ shēn xǔ guó",一语中的:"yì yǔ zhòng dì",丧魂落魄:"sàng hún luò pò",三座大山:"sān zuò dà shān",济济一堂:"jǐ jǐ yì táng",好事之徒:"hào shì zhī tú",干净利索:"gàn jìng lì suǒ",出将入相:"chū jiàng rù xiàng",袅袅娜娜:"niǎo niǎo nuó nuó",狐狸尾巴:"hú li wěi ba",好逸恶劳:"hào yì wù láo",大而无当:"dà ér wú dàng",打马虎眼:"dǎ mǎ hu yǎn",板上钉钉:"bǎn shàng dìng dīng",吆五喝六:"yāo wǔ hè liù",虾兵蟹将:"xiā bīng xiè jiàng",水调歌头:"shuǐ diào gē tóu",数典忘祖:"shǔ diǎn wàng zǔ",人事不省:"rén shì bù xǐng",曲高和寡:"qǔ gāo hè guǎ",屡教不改:"lǚ jiào bù gǎi",互为因果:"hù wéi yīn guǒ",互为表里:"hù wéi biǎo lǐ",厚此薄彼:"hòu cǐ bó bǐ",过关斩将:"guò guān zhǎn jiàng",疙疙瘩瘩:"gē ge dā dā",大腹便便:"dà fù pián pián",走为上策:"zǒu wéi shàng cè",冤家对头:"yuān jia duì tóu",有隙可乘:"yǒu xì kě chèng",一鳞半爪:"yì lín bàn zhǎo",片言只语:"piàn yán zhǐ yǔ",开花结实:"kāi huā jié shí",经年累月:"jīng nián lěi yuè",含糊其词:"hán hú qí cí",寡廉鲜耻:"guǎ lián xiǎn chǐ",成年累月:"chéng nián lěi yuè",不徇私情:"bú xùn sī qíng",不当人子:"bù dāng rén zǐ",膀大腰圆:"bǎng dà yāo yuán",指腹为婚:"zhǐ fù wéi hūn",这么点儿:"zhè me diǎn er",意兴索然:"yì xīng suǒ rán",绣花枕头:"xiù huā zhěn tou",无的放矢:"wú dì fàng shǐ",望闻问切:"wàng wén wèn qiè",舍己为人:"shě jǐ wèi rén",穷年累月:"qióng nián lěi yuè",排难解纷:"pái nàn jiě fēn",处之泰然:"chǔ zhī tài rán",指鹿为马:"zhǐ lù wéi mǎ",危如累卵:"wēi rú lěi luǎn",天兵天将:"tiān bīng tiān jiàng",舍近求远:"shě jìn qiú yuǎn",南腔北调:"nán qiāng běi diào",苦中作乐:"kǔ zhōng zuò lè",厚积薄发:"hòu jī bó fā",臭味相投:"xiù wèi xiāng tóu",长幼有序:"zhǎng yòu yǒu xù",逼良为娼:"bī liáng wéi chāng",悲悲切切:"bēi bēi qiè qiē",败军之将:"bài jūn zhī jiàng",欺行霸市:"qī háng bà shì",削足适履:"xuē zú shì lǚ",先睹为快:"xiān dǔ wéi kuài",啼饥号寒:"tí jī háo hán",疏不间亲:"shū bú jiàn qīn",神差鬼使:"shén chāi guǐ shǐ",敲敲打打:"qiāo qiāo dǎ dǎ",平铺直叙:"píng pū zhí xù",没头没尾:"méi tóu mò wěi",寥寥可数:"liáo liáo kě shǔ",哼哈二将:"hēng hā èr jiàng",鹤发童颜:"hè fà tóng yán",各奔前程:"gè bèn qián chéng",弹无虚发:"dàn wú xū fā",大人先生:"dà rén xiān sheng",与民更始:"yǔ mín gēng shǐ",树碑立传:"shù bēi lì zhuàn",是非得失:"shì fēi dé shī",实逼处此:"shí bī chǔ cǐ",塞翁失马:"sài wēng shī mǎ",日薄西山:"rì bó xī shān",切身体会:"qiè shēn tǐ huì",片言只字:"piàn yán zhǐ zì",跑马卖解:"pǎo mǎ mài xiè",宁折不弯:"nìng zhé bù wān",零零散散:"líng líng sǎn sǎn",量体裁衣:"liàng tǐ cái yī",连中三元:"lián zhòng sān yuán",礼崩乐坏:"lǐ bēng yuè huài",不为已甚:"bù wéi yǐ shèn",转悲为喜:"zhuǎn bēi wéi xǐ",以眼还眼:"yǐ yǎn huán yǎn",蔚为大观:"wèi wéi dà guān",未为不可:"wèi wéi bù kě",童颜鹤发:"tóng yán hè fà",朋比为奸:"péng bǐ wéi jiān",莫此为甚:"mò cǐ wéi shèn",夹枪带棒:"jiā qiāng dài bàng",富商巨贾:"fù shāng jù jiǎ",淡然处之:"dàn rán chǔ zhī",箪食壶浆:"dān shí hú jiāng",创巨痛深:"chuāng jù tòng shēn",草长莺飞:"cǎo zhǎng yīng fēi",坐视不救:"zuò shī bú jiù",以己度人:"yǐ jǐ duó rén",随行就市:"suí háng jiù shì",文以载道:"wén yǐ zài dào",文不对题:"wén bú duì tí",铁板钉钉:"tiě bǎn dìng dīng",身体发肤:"shēn tǐ fà fū",缺吃少穿:"quē chī shǎo chuān",目无尊长:"mù wú zūn zhǎng",吉人天相:"jí rén tiān xiàng",毁家纾难:"huǐ jiā shū nàn",钢筋铁骨:"gāng jīn tiě gǔ",丢卒保车:"diū zú bǎo jū",丢三落四:"diū sān là sì",闭目塞听:"bì mù sè tīng",削尖脑袋:"xuē jiān nǎo dài",为非作恶:"wéi fēi zuò è",人才难得:"rén cái nán dé",情非得已:"qíng fēi dé yǐ",切中要害:"qiè zhòng yào hài",火急火燎:"huǒ jí huǒ liǎo",画地为牢:"huà dì wéi láo",好酒贪杯:"hào jiǔ tān bēi",长歌当哭:"cháng gē dàng kū",载沉载浮:"zài chén zài fú",遇难呈祥:"yù nàn chéng xiáng",榆木疙瘩:"yú mù gē da",以邻为壑:"yǐ lín wéi hè",洋为中用:"yáng wéi zhōng yòng",言为心声:"yán wéi xīn shēng",言必有中:"yán bì yǒu zhòng",图穷匕见:"tú qióng bǐ xiàn",滂沱大雨:"páng tuó dà yǔ",目不暇给:"mù bù xiá jǐ",量才录用:"liàng cái lù yòng",教学相长:"jiào xué xiāng zhǎng",悔不当初:"huǐ bù dāng chū",呼幺喝六:"hū yāo hè liù",不足为训:"bù zú wéi xùn",不拘形迹:"bù jū xíng jī",傍若无人:"páng ruò wú rén",罪责难逃:"zuì zé nán táo",自我吹嘘:"zì wǒ chuī xū",转祸为福:"zhuǎn huò wéi fú",勇冠三军:"yǒng guàn sān jūn",易地而处:"yì dì ér chǔ",卸磨杀驴:"xiè mò shā lǘ",玩儿不转:"wán ér bú zhuàn",天道好还:"tiān dào hǎo huán",身单力薄:"shēn dān lì bó",撒豆成兵:"sǎ dòu chéng bīng",片纸只字:"piàn zhǐ zhī zì",宁缺毋滥:"nìng quē wú làn",没没无闻:"mò mò wú wén",量力而为:"liàng lì ér wéi",历历可数:"lì lì kě shǔ",口碑载道:"kǒu bēi zài dào",君子好逑:"jūn zǐ hǎo qiú",好为人师:"hào wéi rén shī",豪商巨贾:"háo shāng jù jiǎ",各有所好:"gè yǒu suǒ hào",度德量力:"duó dé liàng lì",指天为誓:"zhǐ tiān wéi shì",逸兴遄飞:"yì xìng chuán fēi",心宽体胖:"xīn kuān tǐ pán",为德不卒:"wéi dé bù zú",天下为家:"tiān xià wéi jiā",视为畏途:"shì wéi wèi tú",三灾八难:"sān zāi bā nàn",沐猴而冠:"mù hóu ér guàn",哩哩啦啦:"lī li lā lā",见缝就钻:"jiàn fèng jiù zuān",夹层玻璃:"jiā céng bō li",急公好义:"jí gōng hào yì",积年累月:"jī nián lěi yuè",划地为牢:"huá dì wéi láo",更名改姓:"gēng míng gǎi xìng",奉为圭臬:"fèng wéi guī niè",多难兴邦:"duō nàn xīng bāng",不破不立:"bú pò bú lì",坐地自划:"zuò dì zì huá",坐不重席:"zuò bù chóng xí",坐不窥堂:"zuò bù kuī táng",作嫁衣裳:"zuò jià yī shang",左枝右梧:"zuǒ zhī yòu wú",左宜右有:"zuǒ yí yòu yǒu",钻头觅缝:"zuān tóu mì fèng",钻天打洞:"zuān tiān dǎ dòng",钻皮出羽:"zuān pí chū yǔ",钻火得冰:"zuān huǒ dé bīng",钻洞觅缝:"zuàn dòng mì féng",钻冰求火:"zuān bīng qiú huǒ",子为父隐:"zǐ wéi fù yǐn",擢发难数:"zhuó fà nán shǔ",着人先鞭:"zhuó rén xiān biān",斫雕为朴:"zhuó diāo wéi pǔ",锥处囊中:"zhuī chǔ náng zhōng",椎心饮泣:"chuí xīn yǐn qì",椎心泣血:"chuí xīn qì xuè",椎牛飨士:"chuí niú xiǎng shì",椎牛歃血:"chuí niú shà xuè",椎牛发冢:"chuí niú fà zhǒng",椎埋屠狗:"chuí mái tú gǒu",椎埋狗窃:"chuí mái gǒu qiè",壮发冲冠:"zhuàng fā chōng guàn",庄严宝相:"zhuāng yán bǎo xiàng",转愁为喜:"zhuǎn chóu wéi xǐ",转嗔为喜:"zhuǎn chēn wéi xǐ",拽巷啰街:"zhuài xiàng luó jiē",拽耙扶犁:"zhuāi pá fú lí",拽布拖麻:"zhuài bù tuō má",箸长碗短:"zhù cháng wǎn duǎn",铸剑为犁:"zhù jiàn wéi lí",杼柚其空:"zhù yòu qí kōng",杼柚空虚:"zhù yòu kōng xū",助天为虐:"zhù tiān wéi nüè",属垣有耳:"zhǔ yuán yǒu ěr",属毛离里:"zhǔ máo lí lǐ",属辞比事:"zhǔ cí bǐ shì",逐物不还:"zhú wù bù huán",铢量寸度:"zhū liáng cùn duó",铢两悉称:"zhū liǎng xī chèn",侏儒观戏:"zhū rú guān xì",朱轓皁盖:"zhū fān zào gài",昼度夜思:"zhòu duó yè sī",诪张为幻:"zhōu zhāng wéi huàn",重明继焰:"chóng míng jì yàn",众啄同音:"zhòng zhuó tóng yīn",众毛攒裘:"zhòng máo cuán qiú",众好众恶:"zhòng hào zhòng wù",擿埴索涂:"zhāi zhí suǒ tú",稚齿婑媠:"zhì chǐ wǒ tuó",至当不易:"zhì dàng bú yì",指皂为白:"zhǐ zào wéi bái",指雁为羹:"zhǐ yàn wéi gēng",指树为姓:"zhǐ shù wéi xìng",指山说磨:"zhǐ shān shuō mò",止戈为武:"zhǐ gē wéi wǔ",枝干相持:"zhī gàn xiāng chí",枝大于本:"zh dà yú běn",支吾其词:"zhī wú qí cí",正身率下:"zhèng shēn shuài xià",正冠李下:"zhèng guàn lǐ xià",整冠纳履:"zhěng guān nà lǚ",整躬率物:"zhěng gōng shuài wù",整顿干坤:"zhěng dùn gàn kūn",针头削铁:"zhēn tóu xuē tiě",贞松劲柏:"zhēn sōng jìng bǎi",赭衣塞路:"zhě yī sè lù",折箭为誓:"shé jiàn wéi shì",折而族之:"zhé ér zú zhī",昭德塞违:"zhāo dé sè wéi",章句小儒:"zhāng jù xiǎo rú",湛恩汪濊:"zhàn ēn wāng huì",占风望气:"zhān fēng wàng qì",斩将搴旗:"zhǎn jiàng qiān qí",曾母投杼:"zēng mǔ tóu zhù",曾参杀人:"zēng shēn shā rén",造谣中伤:"zào yáo zhòng shāng",早占勿药:"zǎo zhān wù yào",凿龟数策:"záo guī shǔ cè",攒三聚五:"cuán sān jù wǔ",攒眉蹙额:"cuán mei cù é",攒零合整:"cuán líng hé zhěng",攒锋聚镝:"cuán fēng jù dí",载笑载言:"zài xiào zài yán",载酒问字:"zài jiǔ wèn zì",殒身不恤:"yǔn shēn bú xù",云舒霞卷:"yún shū xiá juǎn",月中折桂:"yuè zhōng shé guì",月落参横:"yuè luò shēn héng",鬻驽窃价:"yù nú qiè jià",鬻鸡为凤:"yù jī wéi fèng",遇难成祥:"yù nàn chéng xiáng",郁郁累累:"yù yù lěi lěi",玉卮无当:"yù zhī wú dàng",语笑喧阗:"yǔ xiào xuān tián",与世沉浮:"yǔ shì chén fú",与时消息:"yǔ shí xiāo xi",逾墙钻隙:"yú qiáng zuān xì",渔夺侵牟:"yú duó qīn móu",杅穿皮蠹:"yú chuān pí dù",余勇可贾:"yú yǒng kě gǔ",予智予雄:"yú zhì yú xióng",予取予求:"yú qǔ yú qiú",于家为国:"yú jiā wéi guó",有借无还:"yǒu jiè wú huán",有加无已:"yǒu jiā wú yǐ",有国难投:"yǒu guó nán tóu",游必有方:"yóu bì yǒu fāng",油干灯尽:"yóu gàn dēng jìn",尤云殢雨:"yóu yún tì yǔ",庸中皦皦:"yōng zhōng jiǎo jiǎo",郢书燕说:"yǐng shū yān shuō",营蝇斐锦:"yíng yíng fēi jǐn",鹰心雁爪:"yīng xīn yàn zhǎo",莺吟燕儛:"yīng yín yàn wǔ",应天顺时:"yīng tiān shùn shí",印累绶若:"yìn léi shòu ruò",隐占身体:"yǐn zhàn shēn tǐ",饮犊上流:"yìn dú shàng liú",引绳切墨:"yǐn shéng qiē mò",龈齿弹舌:"yín chǐ dàn shé",因缘为市:"yīn yuán wéi shì",因树为屋:"yīn shù wéi wū",溢美溢恶:"yì měi yì wù",抑塞磊落:"yì sè lěi luò",倚闾望切:"yǐ lǘ wàng qiē",以意为之:"yǐ yì wéi zhī",以言为讳:"yǐ yán wéi huì",以疏间亲:"yǐ shū jiàn qīn",以水济水:"yǐ shuǐ jǐ shuǐ",以书为御:"yǐ shū wéi yù",以守为攻:"yǐ shǒu wéi gōng",以升量石:"yǐ shēng liáng dàn",以慎为键:"yǐ shèn wéi jiàn",以筌为鱼:"yǐ quán wéi yú",以利累形:"yǐ lì lěi xíng",以毁为罚:"yǐ huǐ wéi fá",以黑为白:"yǐ hēi wéi bái",以规为瑱:"yǐ guī wéi tiàn",以古为鉴:"yǐ gǔ wéi jiàn",以宫笑角:"yǐ gōng xiào jué",以法为教:"yǐ fǎ wéi jiào",以大恶细:"yǐ dà wù xì",遗世忘累:"yí shì wàng lěi",遗寝载怀:"yí qǐn zài huái",移的就箭:"yí dì jiù jiàn",依头缕当:"yī tóu lǚ dàng",衣租食税:"yì zū shí shuì",衣轻乘肥:"yì qīng chéng féi",衣裳之会:"yī shang zhī huì",衣单食薄:"yī dān shí bó",一还一报:"yì huán yí bào",叶公好龙:"yè gōng hào lóng",野调无腔:"yě diào wú qiāng",瑶池女使:"yáo chí nǚ shǐ",幺麽小丑:"yāo mó xiǎo chǒu",养精畜锐:"yǎng jīng xù ruì",卬首信眉:"áng shǒu shēn méi",洋洋纚纚:"yáng yáng sǎ sǎ",羊羔美酒:"yáng gāo měi jiǔ",扬风扢雅:"yáng fēng jié yǎ",燕昭市骏:"yān zhāo shì jùn",燕昭好马:"yān zhāo hǎo mǎ",燕石妄珍:"yān shí wàng zhēn",燕骏千金:"yān jùn qiān jīn",燕金募秀:"yān jīn mù xiù",燕驾越毂:"yān jià yuè gǔ",燕歌赵舞:"yān gē zhào wǔ",燕岱之石:"yān dài zhī shí",燕处危巢:"yàn chǔ wēi cháo",掞藻飞声:"shàn zǎo fēi shēng",偃革为轩:"yǎn gé wéi xuān",妍蚩好恶:"yán chī hǎo è",压良为贱:"yā liáng wéi jiàn",搀行夺市:"chān háng duó shì",泣数行下:"qì shù háng xià",当行出色:"dāng háng chū sè",秀出班行:"xiù chū bān háng",儿女成行:"ér nǚ chéng háng",大行大市:"dà háng dà shì",寻行数墨:"xún háng shǔ mò",埙篪相和:"xūn chí xiāng hè",血债累累:"xuè zhài lěi lěi",炫玉贾石:"xuàn yù gǔ shí",炫石为玉:"xuàn shí wéi yù",悬石程书:"xuán dàn chéng shū",悬狟素飡:"xuán huán sù cān",悬龟系鱼:"xuán guī xì yú",揎拳捋袖:"xuān quán luō xiù",轩鹤冠猴:"xuān hè guàn hóu",畜妻养子:"xù qī yǎng zǐ",羞人答答:"xiū rén dā dā",修鳞养爪:"xiū lín yǎng zhǎo",熊据虎跱:"xióng jù hǔ zhì",兄死弟及:"xiōng sǐ dì jí",腥闻在上:"xīng wén zài shàng",兴文匽武:"xīng wén yǎn wǔ",兴观群怨:"xìng guān qún yuàn",兴高彩烈:"xìng gāo cǎi liè",心手相应:"xīn shǒu xiāng yìng",心口相应:"xīn kǒu xiāng yīng",挟势弄权:"xié shì nòng quán",胁肩累足:"xié jiān lěi zú",校短量长:"jiào duǎn liáng cháng",小眼薄皮:"xiǎo yǎn bó pí",硝云弹雨:"xiāo yún dàn yǔ",鸮鸣鼠暴:"xiāo míng shǔ bào",削株掘根:"xuē zhū jué gēn",削铁无声:"xuē tiě wú shēng",削职为民:"xuē zhí wéi mín",削木为吏:"xuē mù wéi lì",想望风褱:"xiǎng wàng fēng huái",香培玉琢:"xiang pei yu zhuó",相鼠有皮:"xiàng shǔ yǒu pí",相时而动:"xiàng shí ér dòng",相切相磋:"xiāng qiē xiāng cuō",相女配夫:"xiàng nǚ pèi fū",相门有相:"xiàng mén yǒu xiàng",挦章撦句:"xián zhāng chě jù",先我着鞭:"xiān wǒ zhuó biān",习焉不察:"xí yān bù chá",歙漆阿胶:"shè qī ē jiāo",晰毛辨发:"xī máo biàn fà",悉索薄赋:"xī suǒ bó fù",雾鳞云爪:"wù lín yún zhǎo",物稀为贵:"wù xī wéi guì",碔砆混玉:"wǔ fū hùn yù",武断专横:"wǔ duàn zhuān héng",五石六鹢:"wǔ shí liù yì",五色相宣:"wǔ sè xiāng xuān",五侯七贵:"wǔ hóu qī guì",五侯蜡烛:"wǔ hòu là zhú",五羖大夫:"wǔ gǔ dà fū",吾自有处:"wú zì yǒu chǔ",无下箸处:"wú xià zhù chǔ",无伤无臭:"wú shāng wú xiù",无能为役:"wú néng wéi yì",无寇暴死:"wú kòu bào sǐ",无孔不钻:"wú kǒng bú zuàn",无间可乘:"wú jiān kě chéng",无间冬夏:"wú jiān dōng xià",无恶不为:"wú è bù wéi",无动为大:"wú dòng wéi dà",诬良为盗:"wū liáng wéi dào",握拳透爪:"wò quán tòu zhǎo",文武差事:"wén wǔ chāi shì",委委佗佗:"wēi wēi tuó tuó",惟日为岁:"wéi rì wéi suì",帷薄不修:"wéi bó bù xiū",为善最乐:"wéi shàn zuì lè",为山止篑:"wéi shān zhǐ kuì",为仁不富:"wéi rén bú fù",为裘为箕:"wéi qiú wéi jī",为民父母:"wéi mín fù mǔ",为虺弗摧:"wéi huǐ fú cuī",为好成歉:"wéi hǎo chéng qiàn",为鬼为蜮:"wéi guǐ wéi yù",望风响应:"wàng fēng xiǎng yīng",望尘僄声:"wàng chén piào shēng",往渚还汀:"wǎng zhǔ huán tīng",王贡弹冠:"wáng gòng dàn guàn",亡国大夫:"wáng guó dà fū",万贯家私:"wàn guàn jiā sī",晚食当肉:"wǎn shí dàng ròu",晚节不保:"wǎn jié bù bǎo",玩岁愒时:"wán suì kài shí",蛙蟆胜负:"wā má shèng fù",吞言咽理:"tūn yán yàn lǐ",颓垣断堑:"tuí yuán duàn qiàn",推干就湿:"tuī gàn jiù shī",剸繁决剧:"tuán fán jué jù",团头聚面:"tuán tóu jù miàn",兔丝燕麦:"tù sī yàn mài",兔头麞脑:"tù tóu zhāng nǎo",兔葵燕麦:"tù kuí yàn mài",吐哺握发:"tǔ bǔ wò fà",投传而去:"tóu zhuàn ér qù",头没杯案:"tóu mò bēi àn",头昏脑闷:"tóu hūn nǎo mèn",头会箕敛:"tóu kuài jī liǎn",头出头没:"tóu chū tóu mò",痛自创艾:"tòng zì chuāng yì",同恶相助:"tóng wù xiāng zhù",同恶相恤:"tóng wù xiāng xù",痌瘝在抱:"tōng guān zài bào",通文调武:"tōng wén diào wǔ",停留长智:"tíng liú zhǎng zhì",铁树开华:"tiě shù kāi huā",条贯部分:"tiáo guàn bù fēn",挑牙料唇:"tiǎo yá liào chún",挑么挑六:"tiāo yāo tiāo liù",挑唇料嘴:"tiǎo chún liào zuǐ",恬不为意:"tián bù wéi yì",恬不为怪:"tián bù wéi guài",天下为笼:"tiān xià wéi lóng",天台路迷:"tiān tái lù mí",天年不遂:"tiān nián bú suì",探囊胠箧:"tàn náng qū qiè",谭言微中:"tán yán wēi zhòng",谈言微中:"tán yán wēi zhòng",狧穅及米:"shì kāng jí mǐ",随物应机:"suí wù yīng jī",搜岩采干:"sōu yán cǎi gàn",宋斤鲁削:"sòng jīn lǔ xuē",松筠之节:"sōng yún zhī jié",四亭八当:"sì tíng bā dàng",四马攒蹄:"sì mǎ cuán tí",四不拗六:"sì bú niù liù",思所逐之:"sī suǒ zhú zhī",丝恩发怨:"sī ēn fà yuàn",硕望宿德:"shuò wàng xiǔ dé",铄古切今:"shuò gǔ qiē jīn",顺风而呼:"shùn fēng ér hū",顺风吹火:"shùn fēng chuī huǒ",水中著盐:"shuǐ zhōng zhuó yán",双柑斗酒:"shuāng gān dǒu jiǔ",数米而炊:"shǔ mǐ ér chuī",数米量柴:"shǔ mǐ liáng chái",数理逻辑:"shù lǐ luó ji",数黑论黄:"shǔ hēi lùn huáng",数白论黄:"shǔ bái lùn huáng",束缊还妇:"shù yūn huán fù",束蒲为脯:"shù pú wéi pú",束椽为柱:"shù chuán wéi zhù",书缺有间:"shū quē yǒu jiàn",手足重茧:"shǒu zú chóng jiǎn",手足异处:"shǒu zú yì chǔ",手脚干净:"shǒu jiǎo gàn jìng",手不应心:"shǒu bù yīng xīn",螫手解腕:"shì shǒu jiě wàn",释知遗形:"shì zhī yí xíng",适时应务:"shì shí yīng wù",适情率意:"shì qíng shuài yì",适当其冲:"shì dāng qí chōng",视为知己:"shì wéi zhī jǐ",使羊将狼:"shǐ yáng jiàng láng",食为民天:"shí wéi mín tiān",拾掇无遗:"shí duō wú yí",实与有力:"shí yù yǒu lì",石英玻璃:"shí yīng bō li",石室金匮:"shí shì jīn guì",什袭珍藏:"shí xí zhēn cáng",什伍东西:"shí wǔ dōng xī",什围伍攻:"shí wéi wǔ gōng",十魔九难:"shí mó jiǔ nàn",诗书发冢:"shī shū fà zhǒng",虱处裈中:"shī chǔ kūn zhōng",师直为壮:"shī zhí wéi zhuàng",尸居龙见:"shī jū lóng xiàn",圣经贤传:"shèng jīng xián zhuàn",圣君贤相:"shèng jūn xián xiàng",生拖死拽:"shēng tuō sǐ zhuài",审己度人:"shěn jǐ duó rén",神武挂冠:"shén wǔ guà guàn",神龙失埶:"shén lóng shī shì",深文曲折:"shēn wén qǔ shé",深厉浅揭:"shēn lì qiǎn qì",深谷为陵:"shēn gǔ wéi líng",深恶痛疾:"shēn wù tòng jí",深仇宿怨:"shēn chóu xiǔ yuàn",舍己为公:"shě jǐ wèi gōng",舍短取长:"shě duǎn qǔ cháng",舍策追羊:"shě cè zhuī yáng",蛇蝎为心:"shé xiē wéi xīn",少成若性:"shào chéng ruò xìng",上当学乖:"shàng dàng xué guāi",赏不当功:"shǎng bù dāng gōng",善自为谋:"shàn zì wéi móu",善为说辞:"shàn wéi shuō cí",善善恶恶:"shàn shàn wù è",善财难舍:"shàn cái nán shě",苫眼铺眉:"shān yǎn pū méi",讪牙闲嗑:"shàn yá xián kē",山阴乘兴:"shān yīn chéng xīng",山殽野湋:"shān yáo yě wéi",山溜穿石:"shān liù chuān shí",山节藻棁:"shān jié zǎo zhuō",杀鸡为黍:"shā jī wéi shǔ",色厉胆薄:"sè lì dǎn bó",桑荫未移:"sāng yīn wèi yí",桑荫不徙:"sāng yīn bù xǐ",桑土绸缪:"sāng tǔ chóu miù",桑户棬枢:"sāng hù juàn shū",三战三北:"sān zhàn sān běi",三瓦两舍:"sān wǎ liǎng shě",三人为众:"sān rén wèi zhòng",三差两错:"sān chā liǎng cuò",塞井焚舍:"sāi jǐng fén shě",洒心更始:"sǎ xīn gèng shǐ",洒扫应对:"sǎ sǎo yìng duì",软红香土:"ruǎn hóng xiāng tǔ",入吾彀中:"rù wú gòu zhōng",入铁主簿:"rù tiě zhǔ bù",入理切情:"rù lǐ qiē qíng",汝成人耶:"rǔ chéng rén yé",如水投石:"rú shuǐ tóu shí",如切如磋:"rú qiē rú cuō",如登春台:"rú dēng chūn tái",肉薄骨并:"ròu bó gǔ bìng",柔情绰态:"róu qíng chuò tài",戎马劻勷:"róng mǎ kuāng ráng",日中为市:"rì zhōng wéi shì",日月参辰:"rì yuè shēn chén",日省月修:"rì xǐng yuè xiū",日削月割:"rì xuē yuè gē",日省月试:"rì xǐng yuè shì",任达不拘:"rèn dá bù jū",人言藉藉:"rén yán jí jí",人模狗样:"rén mú gǒu yàng",人莫予毒:"rén mò yú dú",热熬翻饼:"rè áo fān bǐng",圈牢养物:"juàn láo yǎng wù",取予有节:"qǔ yǔ yǒu jié",诎要桡腘:"qū yāo ráo guó",穷形尽相:"qióng xíng jìn xiàng",情凄意切:"qíng qī yì qiè",情见势屈:"qíng xiàn shì qū",情见乎辞:"qíng xiàn hū cí",清都绛阙:"qīng dōu jiàng què",倾肠倒肚:"qīng cháng dào dǔ",青紫被体:"qīng zǐ pī tǐ",青林黑塞:"qīng lín hēi sài",螓首蛾眉:"qín shǒu é méi",琴瑟之好:"qín sè zhī hào",且住为佳:"qiě zhù wéi jiā",切树倒根:"qiē shù dǎo gēn",切理餍心:"qiē lǐ yàn xīn",切近的当:"qiē jìn de dāng",翘足引领:"qiáo zú yǐn lǐng",巧发奇中:"qiǎo fā qí zhòng",强嘴拗舌:"jiàng zuǐ niù shé",强直自遂:"qiáng zhí zì suí",强死强活:"qiǎng sǐ qiǎng huó",强食自爱:"qiǎng shí zì ài",强食靡角:"qiǎng shí mí jiǎo",强弓劲弩:"qiáng gōng jìng nǔ",强聒不舍:"qiǎng guō bù shě",强凫变鹤:"qiáng fú biàn hè",强而后可:"qiǎng ér hòu kě",强得易贫:"qiǎng dé yì pín",遣兴陶情:"qiǎn xìng táo qíng",牵羊担酒:"qiān yáng dān jiǔ",千了百当:"qiān liǎo bǎi dàng",泣下如雨:"qì xià rú yǔ",起偃为竖:"qǐ yǎn wéi shù",岂弟君子:"kǎi tì jūn zǐ",綦溪利跂:"qí xī lì qí",棋输先著:"qí shū xiān zhuó",齐王舍牛:"qí wáng shě niú",欺天诳地:"qī tiān kuáng dì",普天率土:"pǔ tiān shuài tǔ",铺胸纳地:"pū xiōng nà dì",铺锦列绣:"pū jǐn liè xiù",破家为国:"pò jiā wèi guó",破觚为圜:"pò gū wéi yuán",萍飘蓬转:"píng piāo péng zhuàn",帡天极地:"píng tiān jí dì",屏声息气:"bǐng shēng xī qì",凭几据杖:"píng jī jù zhàng",贫嘴薄舌:"pín zuǐ bó shé",片语只辞:"piàn yǔ zhī cí",披发文身:"pī fà wén shēn",烹龙炮凤:"pēng lóng páo fèng",炰鳖脍鲤:"fǒu biē kuài lǐ",庞眉皓发:"páng méi hào fà",攀花折柳:"pān huā zhé liǔ",攀蟾折桂:"pān chán shé guì",女大难留:"nǚ dà nán liú",弄玉吹箫:"nòng yù chuī xiāo",弄管调弦:"nòng guǎn tiáo xián",弄粉调朱:"nòng fěn diào zhū",浓抹淡妆:"nóng mò dàn zhuāng",捻土为香:"niǎn tǔ wéi xiāng",年谊世好:"nián yì shì hǎo",年华垂暮:"nián huá chuí mù",儗不于伦:"nǐ bù yú lún",泥而不滓:"ní ér bù zǐ",能者为师:"néng zhě wéi shī",能不称官:"néng bú chèn guān",挠直为曲:"náo zhí wéi qū",难进易退:"nán jìn yì tuì",难得糊涂:"nán dé hú tú",南蛮鴂舌:"nán mán jué shé",南贩北贾:"nán fàn běi gǔ",牧猪奴戏:"mù zhū nú xì",目眢心忳:"mù yuān xīn tún",目挑心招:"mù tiǎo xīn zhāo",目量意营:"mù liàng yì yíng",木头木脑:"mù tóu mù nǎo",木干鸟栖:"mù gàn niǎo qī",侔色揣称:"móu sè chuǎi chèn",莫予毒也:"mò yú dú yě",抹粉施脂:"mò fěn shī zhī",磨砻镌切:"mó lóng juān qiē",磨棱刓角:"mó léng wán jiǎo",摸门不着:"mō mén bù zháo",摸不着边:"mō bù zhuó biān",命中注定:"mìng zhōng zhù dìng",鸣鹤之应:"míng hè zhī yìng",明效大验:"míng xiào dà yàn",名我固当:"míng wǒ gù dāng",邈处欿视:"miǎo chǔ kǎn shì",黾穴鸲巢:"měng xué qú cháo",绵里薄材:"mián lǐ bó cái",靡有孑遗:"mǐ yǒu jié yí",靡衣偷食:"mǐ yī tōu shí",迷恋骸骨:"mí liàn hái gǔ",扪参历井:"mén shēn lì jǐng",门单户薄:"mén dān hù bó",昧旦晨兴:"mèi dàn chén xīng",冒名接脚:"mào míng jiē jiǎo",毛遂堕井:"máo suí duò jǐng",毛发倒竖:"máo fā dǎo shù",卖文为生:"mài wén wéi shēng",卖李钻核:"mài lǐ zuān hé",买椟还珠:"mǎi dú huán zhū",埋三怨四:"mán sān yuàn sì",马入华山:"mǎ rù huá shān",落魄江湖:"luò pò jiāng hú",落落难合:"luò luò nán hé",落草为寇:"luò cǎo wéi kòu",罗织构陷:"luó zhī gòu xiàn",鸾凤和鸣:"luán fèng hè míng",率由旧章:"shuài yóu jiù zhāng",率土同庆:"shuài tǔ tóng qìng",率兽食人:"shuài shòu shí rén",率土归心:"shuài tǔ guī xīn",率马以骥:"shuài mǎ yǐ jì",率尔成章:"shuài ěr chéng zhāng",鲁斤燕削:"lǔ jīn yàn xuē",漏尽更阑:"lòu jìn gēng lán",笼鸟槛猿:"lóng niǎo jiàn yuán",笼鸟池鱼:"lóng niǎo chí yú",龙游曲沼:"lóng yóu qū zhǎo",龙血玄黄:"lóng xuè xuán huáng",龙雕凤咀:"lóng diāo fèng jǔ",六尺之讬:"liù chǐ zhī tuō",令原之戚:"líng yuán zhī qī",令人捧腹:"lìng rén pěng fù",陵劲淬砺:"líng jìng cuì lì",临敌易将:"lín dí yì jiàng",裂裳衣疮:"liè shang yī chuāng",裂冠毁冕:"liè guàn huǐ miǎn",了无惧色:"liǎo wú jù sè",了身达命:"liǎo shēn dá mìng",了然无闻:"liǎo rán wú wén",了不可见:"liǎo bù kě jiàn",了不长进:"liǎo bù zhǎng jìn",燎发摧枯:"liǎo fà cuī kū",审时度势:"shěn shí duó shì",量小力微:"liàng xiǎo lì wēi",相时度力:"xiāng shí duó lì",量枘制凿:"liàng ruì zhì záo",量如江海:"liàng rú jiāng hǎi",量金买赋:"liàng jīn mǎi fù",量己审分:"liàng jǐ shěn fēn",敛骨吹魂:"liǎn gǔ chuī hún",詈夷为跖:"lì yí wéi zhí",利令志惛:"lì lìng zhì hūn",李广不侯:"lǐ guǎng bú hòu",礼为情貌:"lǐ wéi qíng mào",礼让为国:"lǐ ràng wéi guó",犁生骍角:"lí shēng xīng jiǎo",离本徼末:"lí běn jiǎo mò",楞眉横眼:"léng méi hèng yǎn",擂天倒地:"léi tiān dǎo dì",累足成步:"lěi zú chéng bù",累瓦结绳:"lěi wǎ jié shéng",累土至山:"lěi tǔ zhì shān",累土聚沙:"lěi tǔ jù shā",累卵之危:"lěi luǎn zhī wēi",累累如珠:"lěi lěi rú zhū",累块积苏:"lěi kuài jī sū",乐山乐水:"lè shān lè shuǐ",潦原浸天:"lǎo yuán jìn tiān",老师宿儒:"lǎo shī xiǔ rú",牢什古子:"láo shí gǔ zi",琅嬛福地:"láng huán fú dì",揆情度理:"kuí qíng duó lǐ",旷日累时:"kuàng rì lěi shí",匡救弥缝:"kuāng jiù mí fèng",枯树生华:"kū shù shēng huā",口轻舌薄:"kǒu qīng shé bó",口角生风:"kǒu jiǎo shēng fēng",口角春风:"kǒu jiǎo chūn fēng",口角风情:"kǒu jiǎo fēng qíng",口干舌焦:"kǒu gān shé jiāo",口腹之累:"kǒu fù zhī lěi",空腹便便:"kōng fù pián pián",嗑牙料嘴:"kē yá liào zuǐ",刻木为鹄:"kè mù wéi hú",咳珠唾玉:"ké zhū tuò yù",咳唾成珠:"ké tuò chéng zhū",抗颜为师:"kàng yán wéi shī",开华结果:"kāi huā jié guǒ",峻阪盐车:"jùn bǎn yán chē",嚼铁咀金:"jiáo tiě jǔ jīn",嚼墨喷纸:"jué mò pēn zhǐ",倔头强脑:"juè tóu jiàng nǎo",倔头倔脑:"juè tóu juè nǎo",倦鸟知还:"juàn niǎo zhī huán",卷席而葬:"juǎn xí ér zàng",卷甲倍道:"juǎn jiǎ bèi dào",聚米为山:"jù mǐ wéi shān",举手相庆:"jǔ shǒu xiāng qìng",举世混浊:"jǔ shì hún zhuó",鞠为茂草:"jū wéi mào cǎo",拘神遣将:"jū shén qiǎn jiàng",居下讪上:"jū xià shàn shàng",久要不忘:"jiǔ yāo bú wàng",九转功成:"jiǔ zhuǎn gōng chéng",九蒸三熯:"jiǔ zhēng sān hàn",敬业乐群:"jìng yè lè qún",井底虾蟆:"jǐng dǐ xiā má",旌旗卷舒:"jīng qí juǎn shū",荆棘载途:"jīng jí zài tú",禁舍开塞:"jìn shě kāi sāi",祲威盛容:"jìn wēi shèng róng",进退消长:"jìn tuì xiāo cháng",进退应矩:"jìn tuì yīng jǔ",进退触籓:"jìn tuì chù fān",进退跋疐:"jìn tuì bá zhì",尽多尽少:"jǐn duō jǐn shǎo",锦囊还矢:"jǐn náng huán shǐ",矜己自饰:"jīn jǐ zì shì",矜功负气:"jīn gōng fù qì",津关险塞:"jīn guān xiǎn sài",金吾不禁:"jīn wú bú jìn",金翅擘海:"jīn chì bāi hǎi",解衣衣人:"jiě yī yī rén",解人难得:"jiě rén nán dé",解铃系铃:"jiě líng xì líng",解发佯狂:"jiě fà yáng kuáng",诘屈磝碻:"jié qū áo qiāo",教猱升木:"jiāo náo shēng mù",较瘦量肥:"jiào shòu liàng féi",角立杰出:"jiǎo lì jié chū",焦沙烂石:"jiāo shā làn shí",骄儿騃女:"jiāo ér sì nǚ",浇风薄俗:"jiāo fēng bó sú",降妖捉怪:"xiáng yāo zhuō guài",将取固予:"jiāng qǔ gù yǔ",将门有将:"jiàng mén yǒu jiàng",将夺固与:"jiāng duó gù yǔ",槛花笼鹤:"jiàn huā lóng hè",鉴影度形:"jiàn yǐng duó xíng",渐不可长:"jiàn bù kě zhǎng",见素抱朴:"xiàn sù bào pǔ",见弃于人:"jiàn qì yú rén",简丝数米:"jiǎn sī shǔ mǐ",俭不中礼:"jiǎn bú zhòng lǐ",间见层出:"jiàn xiàn céng chū",尖嘴薄舌:"jiān zuǐ bó shé",甲冠天下:"jiǎ guàn tiān xià",葭莩之亲:"jiā fú zhī qīn",家累千金:"jiā lèi qiān jīn",家给人足:"jiā jǐ rén zú",家道从容:"jiā dào cóng róng",夹袋人物:"jiā dài rén wù",霁风朗月:"jì fēng lǎng yuè",寄兴寓情:"jì xìng yù qíng",计深虑远:"jì shēn lǜ yuǎn",计功量罪:"jì gōng liàng zuì",掎裳连襼:"jǐ shang lián yì",虮虱相吊:"jǐ shī xiāng diào",疾不可为:"jí bù kě wéi",极深研几:"jí shēn yán jī",及宾有鱼:"jí bīn yǒu yú",激薄停浇:"jī bó tíng jiāo",积素累旧:"jī sù lěi jiù",积时累日:"jī shí lěi rì",积露为波:"jī lù wéi bō",积德累功:"jī dé lěi gōng",积谗糜骨:"jī chán méi gǔ",击排冒没:"jī pái mào mò",祸为福先:"huò wéi fú xiān",祸福相依:"huò fú xiāng yī",获隽公车:"huò jùn gōng chē",混应滥应:"hùn yīng làn yīng",毁舟为杕:"huǐ zhōu wéi duò",毁钟为铎:"huǐ zhōng wéi duó",毁冠裂裳:"huǐ guān liè cháng",晦盲否塞:"huì máng pǐ sè",回船转舵:"huí chuán zhuàn duò",潢池盗弄:"huáng chí dào nòng",黄冠草履:"huáng guàn cǎo lǚ",黄发儿齿:"huáng fà ér chǐ",黄发垂髫:"huáng fà chuí tiáo",还珠返璧:"huán zhū fǎn bì",还年驻色:"huán nián zhù sè",还年却老:"huán nián què lǎo",坏裳为裤:"huài shang wéi kù",画荻和丸:"huà dí huò wán",化枭为鸠:"huà xiāo wéi jiū",化腐为奇:"huà fǔ wéi qí",化鸱为凤:"huà chī wéi fèng",花不棱登:"huā bu lēng dēng",户限为穿:"hù xiàn wéi chuān",呼卢喝雉:"hū lú hè zhì",呼来喝去:"hū lái hè qù",呼不给吸:"hū bù jǐ xī",厚味腊毒:"hòu wèi xī dú",厚德载物:"hòu dé zài wù",鸿渐于干:"hóng jiàn yú gàn",洪炉燎发:"hóng lú liáo fà",红绳系足:"hóng shéng jì zú",红不棱登:"hóng bu lēng dēng",横抢硬夺:"hèng qiǎng yìng duó",横恩滥赏:"hèng ēn làn shǎng",恨海难填:"hèn hǎi nán tián",鹤发鸡皮:"hè fà jī pí",涸思干虑:"hé sī gān lǜ",河涸海干:"hé hé hǎi gān",和颜说色:"hé yán yuè sè",合从连衡:"hé zòng lián héng",浩浩汤汤:"hào hào shāng shāng",好勇斗狠:"hào yǒng dòu hěn",好问则裕:"hào wèn zé yù",好为事端:"hào wéi shì duān",好问决疑:"hào wèn jué yí",好生之德:"hào shēng zhī dé",好奇尚异:"hǎo qí shàng yì",好恶不同:"hǎo è bù tóng",好丹非素:"hào dān fēi sù",豪干暴取:"háo gàn bào qǔ",毫发不爽:"háo fà bù shuǎng",寒酸落魄:"hán suān luò pò",含英咀华:"hán yīng jǔ huá",含糊不明:"hán hú bù míng",过为已甚:"guò wéi yǐ shèn",桂折兰摧:"guì shé lán cuī",规旋矩折:"guī xuán jǔ shé",广文先生:"guǎng wén xiān sheng",广陵散绝:"guǎng líng sǎn jué",冠山戴粒:"guàn shān dài lì",冠屦倒施:"guàn jù dǎo shī",挂席为门:"guà xí wéi mén",寡见鲜闻:"guǎ jiàn xiǎn wén",瓜葛相连:"guā gé xiāng lián",鼓吻奋爪:"gǔ wěn fèn zhǎo",古调单弹:"gǔ diào dān tán",古调不弹:"gǔ diào bù tán",姑射神人:"gū yè shén rén",苟合取容:"gǒu hé qǔ róng",狗续侯冠:"gǒu xù hòu guàn",钩爪锯牙:"gōu zhǎo jù yá",共枝别干:"gòng zhī bié gàn",共为唇齿:"gòng wéi chún chǐ",拱手而降:"gǒng shǒu ér xiáng",拱肩缩背:"gǒng jiān suō bèi",功薄蝉翼:"gōng bó chán yì",弓调马服:"gōng diào mǎ fú",更姓改物:"gēng xìng gǎi wù",更仆难数:"gēng pú nán shǔ",更令明号:"gēng lìng míng hào",更待干罢:"gèng dài gàn bà",更唱迭和:"gēng chàng dié hé",更长梦短:"gēng cháng mèng duǎn",各色名样:"gè sè míng yàng",格格不纳:"gé gé bú nà",格格不吐:"gé gé bù tǔ",告朔饩羊:"gù shuò xì yáng",膏车秣马:"gào chē mò mǎ",高义薄云:"gāo yì bó yún",岗头泽底:"gāng tóu zé dǐ",敢为敢做:"gǎn wéi gǎn zuò",甘分随时:"gān fèn suí shí",甘处下流:"gān chǔ xià liú",干啼湿哭:"gàn tí shī kū",干名犯义:"gàn míng fàn yì",干将莫邪:"gān jiāng mò yé",干城之将:"gān chéng zhī jiàng",腹载五车:"fù zài wǔ chē",父债子还:"fù zhài zǐ huán",父为子隐:"fù wéi zǐ yǐn",辅世长民:"fǔ shì zhǎng mín",福为祸始:"fú wéi huò shǐ",符号逻辑:"fú hào luó jí",浮收勒折:"fú shōu lè shé",肤受之愬:"fū shòu zhī sù",否终则泰:"pǐ zhōng zé tài",佛头著粪:"fó tóu zhuó fèn",奉为楷模:"fèng wéi kǎi mó",凤靡鸾吪:"fèng mǐ luán é",封豨修蛇:"fēng xī xiū shé",风影敷衍:"fēng yǐng fū yǎn",丰屋蔀家:"fēng wū bù jiā",粪土不如:"fèn tǔ bù rú",分风劈流:"fēn fēng pǐ liú",沸沸汤汤:"fèi fèi shāng shāng",菲食薄衣:"fěi shí bó yī",飞将数奇:"fēi jiàng shù qí",放辟邪侈:"fàng pì xié chǐ",方领圆冠:"fāng lǐng yuán guàn",犯而不校:"fàn ér bú jiào",返本还源:"fǎn běn huán yuán",反劳为逸:"fǎn láo wéi yì",法轮常转:"fǎ lún cháng zhuàn",罚不当罪:"fá bù dāng zuì",发引千钧:"fà yǐn qiān jūn",发奸擿伏:"fā jiān tī fú",发短心长:"fà duǎn xīn cháng",二竖为虐:"èr shù wéi nüè",儿女心肠:"ér nǚ xīn cháng",儿女亲家:"ér nǚ qìng jiā",遏恶扬善:"è wù yáng shàn",饿殍枕藉:"è piǎo zhěn jí",饿殍载道:"è piǎo zài dào",恶醉强酒:"wù zuì qiǎng jiǔ",恶意中伤:"è yì zhòng shāng",恶湿居下:"wù shī jū xià",恶居下流:"wù jū xià liú",恶不去善:"wù bú qù shàn",扼吭夺食:"è háng duó shí",扼襟控咽:"è jīn kòng yān",峨峨汤汤:"é é shāng shāng",屙金溺银:"ē jīn niào yín",朵颐大嚼:"duǒ yí dà jiáo",夺人所好:"duó rén suǒ hào",多言数穷:"duō yán shuò qióng",多文为富:"duō wén wéi fù",多端寡要:"duō duān guǎ yào",多财善贾:"duō cái shàn gǔ",遁世无闷:"dùn shì wú mèn",遁迹黄冠:"dùn jì huáng guàn",堆案盈几:"duī àn yíng jī",断还归宗:"duàn huán guī zōng",短见薄识:"duǎn jiàn bó shí",蠹居棊处:"dù jū qí chǔ",度己以绳:"duó jǐ yǐ shéng",杜默为诗:"dù mò wéi shī",杜鹃啼血:"dù juān tí xuè",笃近举远:"dǔ jìn jǔ yuǎn",独有千秋:"dú yǒu qiān qiū",读书得间:"dú shū dé jiàn",斗转参横:"dǒu zhuǎn shēn héng",兜肚连肠:"dōu dǔ lián cháng",洞见症结:"dòng jiàn zhèng jié",恫疑虚喝:"dòng yí xū hè",动中窾要:"dòng zhōng kuǎn yào",东鸣西应:"dōng míng xī yīng",东鳞西爪:"dōng lín xī zhǎo",东量西折:"dōng liàng xī shé",东家西舍:"dōng jiā xī shè",东扯西拽:"dōng chě xī zhuāi",鼎铛有耳:"dǐng chēng yǒu ěr",鼎铛玉石:"dǐng chēng yù shí",钉头磷磷:"dīng tóu lín lín",跌宕不羁:"diē dàng bù jī",跌弹斑鸠:"diē dàn bān jiū",雕心雁爪:"diāo xīn yàn zhǎo",颠倒衣裳:"diān dǎo yī cháng",德薄能鲜:"dé bó néng xiǎn",得马折足:"dé mǎ shé zú",蹈其覆辙:"dǎo qí fù zhé",捣虚撇抗:"dǎo xū piē kàng",倒载干戈:"dào zài gān gē",倒裳索领:"dào cháng suǒ lǐng",倒果为因:"dào guǒ wéi yīn",叨在知己:"tāo zài zhī jǐ",叨陪末座:"tāo péi mò zuò",党豺为虐:"dǎng chái wéi nüè",当轴处中:"dāng zhóu chǔ zhōng",当着不着:"dāng zhuó bù zhuó",当务始终:"dāng wù shǐ zhōng",淡汝浓抹:"dàn rǔ nóng mǒ",弹丸脱手:"tán wán tuō shǒu",弹铗无鱼:"dàn jiá wú yú",箪食瓢饮:"dān sì piáo yǐn",大璞不完:"dà pú bù wán",大明法度:"dà míng fǎ dù",大车以载:"dà chē yǐ zài",打闷葫芦:"dǎ mèn hú lu",沓来踵至:"tà lái zhǒng zhì",厝火燎原:"cuò huǒ liǎo yuán",撮科打哄:"cuō kē dǎ hòng",寸积铢累:"cùn jī zhū lěi",啛啛喳喳:"cuì cuì chā chā",摧折豪强:"cuī zhé háo qiáng",摧刚为柔:"cuī gāng wéi róu",从俗就简:"cóng sú jiù jiǎn",此发彼应:"cǐ fā bǐ yīng",此唱彼和:"cǐ chàng bǐ hè",慈悲为本:"cí bēi wéi běn",纯属骗局:"chún shǔ piàn jú",春笋怒发:"chūn sǔn nù fā",垂头搨翼:"chuí tóu tà yì",传为笑谈:"chuán wéi xiào tán",传风扇火:"chuán fēng shān huǒ",穿红着绿:"chuān hóng zhuó lǜ",触处机来:"chù chǔ jī lái",处尊居显:"chǔ zūn jū xiǎn",处堂燕雀:"chǔ táng yàn què",处实效功:"chǔ shí xiào gōng",处高临深:"chǔ gāo lín shēn",出入无间:"chū rù wú jiān",出门应辙:"chū mén yīng zhé",出处语默:"chū chǔ yǔ mò",出处殊途:"chū chǔ shū tú",出处进退:"chū chǔ jìn tuì",愁山闷海:"chóu shān mèn hǎi",冲冠眦裂:"chōng guàn zì liè",齿牙为祸:"chǐ yá wéi huò",尺二冤家:"chǐ èr yuān jia",尺短寸长:"chǐ duǎn cùn cháng",尺寸之功:"chǐ cùn zhī gōng",城北徐公:"chéng běi xú gōng",成败兴废:"chéng bài xīng fèi",趁水和泥:"chèn shuǐ huò ní",称雨道晴:"chēng yǔ dào qíng",称体载衣:"chēng tǐ zài yī",称体裁衣:"chèn tǐ cái yī",称家有无:"chèn jiā yǒu wú",称德度功:"chēng dé duó gōng",沉吟章句:"chén yín zhāng jù",沉吟不决:"chén yín bù jué",沉疴宿疾:"chén kē sù jí",扯纤拉烟:"chě qiàn lā yān",扯顺风旗:"chě shùn fēng qí",车载船装:"chē zǎi chuán zhuāng",朝升暮合:"zhāo shēng mù gě",朝攀暮折:"zhāo pān mù shé",超今冠古:"chāo jīn guàn gǔ",倡而不和:"chàng ér bú hè",畅所欲为:"chàng suǒ yù wéi",苌弘碧血:"cháng hóng bì xiě",长幼尊卑:"zhǎng yòu zūn bēi",长绳系日:"cháng shéng jì rì",长年三老:"zhǎng nián sān lǎo",长春不老:"cháng chūn bù lǎo",长傲饰非:"zhǎng ào shì fēi",昌亭旅食:"chāng tíng lǚ shí",禅絮沾泥:"chán xù zhān ní",差三错四:"chā sān cuò sì",层台累榭:"céng tái lěi xiè",层见迭出:"céng xiàn dié chū",藏踪蹑迹:"cáng zōng niè jì",苍蝇见血:"cāng yíng jiàn xiě",餐松啖柏:"cān sōng dàn bó",骖风驷霞:"cān fēng sì xiá",参伍错综:"cēn wǔ cuò zōng",参辰卯酉:"shēn chén mǎo yǒu",材优干济:"cái yōu gān jǐ",材薄质衰:"cái bó zhì shuāi",才大难用:"cái dà nán yòng",才薄智浅:"cái bó zhì qiǎn",不足为意:"bù zú wéi yì",不足为据:"bù zú wéi jù",不足为法:"bù zú wéi fǎ",不足齿数:"bù zú chǐ shǔ",不着疼热:"bù zhuó téng rè",不知薡蕫:"bù zhī dǐng dǒng",不越雷池:"bú yuè léi chí",不相为谋:"bù xiāng wéi móu",不贪为宝:"bù tān wéi bǎo",不了而了:"bù liǎo ér liǎo",不可揆度:"bù kě kuí duó",不遑启处:"bù huáng qǐ chǔ",不当不正:"bù dāng bú zhèng",不差什么:"bú chà shén me",不差累黍:"bù chā lěi shǔ",擘两分星:"bò liǎng fēn xīng",簸土扬沙:"bǒ tǔ yáng shā",薄物细故:"bó wù xì gù",薄寒中人:"bó hán zhòng rén",博文约礼:"bó wén yuē lǐ",播糠眯目:"bō kāng mí mù",剥皮抽筋:"bō pí chōu jīn",剥肤椎髓:"bō fū chuí suǐ",波属云委:"bō zhǔ yún wěi",波骇云属:"bō hài yún zhǔ",兵微将寡:"bīng wēi jiàng guǎ",兵强将勇:"bīng qiáng jiàng yǒng",兵多将广:"bīng duō jiàng guǎng",兵不由将:"bīng bù yóu jiàng",冰解的破:"bīng jiě dì pò",彬彬济济:"bīn bīn jǐ jǐ",摽梅之年:"biào méi zhī nián",表里为奸:"biǎo lǐ wéi jiān",飙发电举:"biāo fā diàn jǔ",变贪厉薄:"biàn tān lì bó",敝盖不弃:"bì gài bú qì",秕言谬说:"bǐ yán miù shuō",比物属事:"bǐ wù zhǔ shì",被山带河:"pī shān dài hé",被甲枕戈:"pī jiǎ zhěn gē",被甲据鞍:"pī jiǎ jù ān",被褐怀玉:"pī hè huái yù",被发缨冠:"pī fà yīng guàn",背曲腰躬:"bèi qǔ yāo gōng",北窗高卧:"běi chuāng gāo wò",北辰星拱:"běi chén xīng gǒng",北鄙之音:"běi bǐ zhī yīn",卑宫菲食:"bēi gōng fěi shí",暴衣露冠:"pù yī lù guàn",暴腮龙门:"pù sāi lóng mén",暴露文学:"bào lù wén xué",暴虎冯河:"bào hǔ píng hé",抱蔓摘瓜:"bào wàn zhāi guā",抱法处势:"bào fǎ chǔ shì",褒贬与夺:"bāo biǎn yǔ duó",帮闲钻懒:"bāng xián zuān lǎn",拜将封侯:"bài jiàng fēng hóu",百兽率舞:"bǎi shòu shuài wǔ",百孔千创:"bǎi kǒng qiān chuāng",白衣卿相:"bái yī qīng xiàng",白首为郎:"bái shǒu wéi láng",白首相知:"bái shǒu xiāng zhī",把玩无厌:"bǎ wán wú yàn",拔锅卷席:"bá guō juǎn xí",拔本塞源:"bá běn sè yuán",傲不可长:"ào bù kě zhǎng",熬更守夜:"áo gēng shǒu yè",安时处顺:"ān shí chǔ shùn",安身为乐:"ān shēn wéi lè",安老怀少:"ān lǎo huái shào",安步当车:"ān bù dàng chē",爱人好士:"ài rén hào shì",矮人观场:"ǎi rén guān chǎng",捱风缉缝:"ái fēng jī fèng",挨山塞海:"āi shān sè hǎi",阿家阿翁:"ā jiā ā wēng",阿党相为:"ē dǎng xiāng wéi",追亡逐北:"zhuī wáng zhú běi",竹篮打水:"zhú lán dá shuǐ",知疼着热:"zhī téng zháo rè",语不惊人:"yǔ bù jīng rén",于今为烈:"yú jīn wéi liè",一日三省:"yí rì sān xǐng",穴居野处:"xué jū yě chǔ",五脊六兽:"wǔ jǐ liù shòu",无声无臭:"wú shēng wú xiù",谓予不信:"wèi yú bú xìn",舍身为国:"shě shēn wéi guó",杀妻求将:"shā qī qiú jiàng",强作解人:"qiǎng zuò jiě rén",气冲斗牛:"qì chōng dǒu niú",临深履薄:"lín shēn lǚ bó",钧天广乐:"jūn tiān guǎng yuè",艰难竭蹶:"jiān nán jié jué",夹七夹八:"jiā qī jiā bā",混混噩噩:"hún hún è è",厚古薄今:"hòu gǔ bó jīn",鬼怕恶人:"guǐ pà è rén",伽马射线:"gā mǎ shè xiàn",佛头着粪:"fó tóu zhuó fèn",奉为至宝:"fèng wéi zhì bǎo",登坛拜将:"dēng tán bài jiàng",晨昏定省:"chén hūn dìng xǐng",察察为明:"chá chá wéi míng",博闻强识:"bó wén qiáng zhì",避难就易:"bì nán jiù yì",了无生机:"liǎo wú shēng jī",有一说一:"yǒu yī shuō yī",独一无二:"dú yī wú èr",说一不二:"shuō yī bù èr",举一反三:"jǔ yī fǎn sān",数一数二:"shǔ yī shǔ èr",杀一儆百:"shā yī jǐng bǎi",丁一卯二:"dīng yī mǎo èr",丁一确二:"dīng yī què èr",不一而止:"bù yī ér zhǐ",无一幸免:"wú yī xìng miǎn",表里不一:"biǎo lǐ bù yī",良莠不一:"liáng yǒu bù yī",心口不一:"xīn kǒu bù yī",言行不一:"yán xíng bù yī",政令不一:"zhèng lìng bù yī",参差不一:"cēn cī bù yī",纷纷不一:"fēn fēn bù yī",毁誉不一:"huǐ yù bù yī",不一而三:"bù yī ér sān",百不一遇:"bǎi bù yī yù",言行抱一:"yán xíng bào yī",瑜百瑕一:"yú bǎi xiá yī",背城借一:"bèi chéng jiè yī",凭城借一:"píng chéng jiè yī",劝百讽一:"quàn bǎi fěng yī",群居和一:"qún jū hé yī",百不获一:"bǎi bù huò yī",百不失一:"bǎi bù shī yī",百无失一:"bǎi wú shī yī",万不失一:"wàn bù shī yī",万无失一:"wàn wú shī yī",合而为一:"hé ér wéi yī",合两为一:"hé liǎng wéi yī",合二为一:"hé èr wéi yī",天下为一:"tiān xià wéi yī",相与为一:"xiāng yǔ wéi yī",较若画一:"jiào ruò huà yī",较如画一:"jiào rú huà yī",斠若画一:"jiào ruò huà yī",言行若一:"yán xíng ruò yī",始终若一:"shǐ zhōng ruò yī",终始若一:"zhōng shǐ ruò yī",惟精惟一:"wéi jīng wéi yī",众多非一:"zhòng duō fēi yī",不能赞一:"bù néng zàn yī",问一答十:"wèn yī dá shí",一不扭众:"yī bù niǔ zhòng",一以贯之:"yī yǐ guàn zhī",一以当百:"yī yǐ dāng bǎi",百不当一:"bǎi bù dāng yī",十不当一:"shí bù dāng yī",以一警百:"yǐ yī jǐng bǎi",以一奉百:"yǐ yī fèng bǎi",以一持万:"yǐ yī chí wàn",以一知万:"yǐ yī zhī wàn",百里挑一:"bǎi lǐ tiāo yī",整齐划一:"zhěng qí huà yī",一来二去:"yī lái èr qù",一路公交:"yī lù gōng jiāo",一路汽车:"yī lù qì chē",一路巴士:"yī lù bā shì",朝朝朝落:"zhāo cháo zhāo luò",曲意逢迎:"qū yì féng yíng",一行不行:"yì háng bù xíng",行行不行:"háng háng bù xíng"},Rle=Object.keys(kS).map(e=>({zh:e,pinyin:kS[e],probability:2e-8,length:4,priority:Yr.Normal,dict:Symbol("dict4")})),bS={巴尔干半岛:"bā ěr gàn bàn dǎo",巴尔喀什湖:"bā ěr kā shí hú",不幸而言中:"bú xìng ér yán zhòng",布尔什维克:"bù ěr shí wéi kè",何乐而不为:"hé lè ér bù wéi",苛政猛于虎:"kē zhèng měng yú hǔ",蒙得维的亚:"méng dé wéi dì yà",民以食为天:"mín yǐ shí wéi tiān",事后诸葛亮:"shì hòu zhū gě liàng",物以稀为贵:"wù yǐ xī wéi guì",先下手为强:"xiān xià shǒu wéi qiáng",行行出状元:"háng háng chū zhuàng yuan",亚得里亚海:"yà dé lǐ yà hǎi",眼不见为净:"yǎn bú jiàn wéi jìng",竹筒倒豆子:"zhú tǒng dào dòu zi"},Ole=Object.keys(bS).map(e=>({zh:e,pinyin:bS[e],probability:2e-8,length:5,priority:Yr.Normal,dict:Symbol("dict5")}));function AS(e,t){return e&&(e.decimal<t.decimal||e.decimal===t.decimal&&e.probability>t.probability)?e:t}function CS(e){e.probability<1e-300&&(e.probability*=1e300,e.decimal+=1)}function Ple(e){return e.priority===Yr.Custom?-(e.length*e.length*100):e.priority===Yr.Surname?-(e.length*e.length*10):0}function jle(e,t){const n=[];let i=e.length-1,s=e[i];for(let o=t-1;o>=0;o--){const r=o+1>=t?{probability:1,decimal:0,patterns:[]}:n[o+1];for(;s&&s.index+s.length-1===o;){const a=s.index,u={probability:s.probability*r.probability,decimal:r.decimal+Ple(s),patterns:r.patterns,concatPattern:s};CS(u),n[a]=AS(n[a],u),s=e[--i]}const l={probability:1e-13*r.probability,decimal:0,patterns:r.patterns};CS(l),n[o]=AS(n[o],l),n[o].concatPattern&&(n[o].patterns=n[o].patterns.concat(n[o].concatPattern),n[o].concatPattern=void 0,delete n[o+1])}return n[0].patterns.reverse()}function wS(e,t){return e&&e.count<=t.count?e:t}function Hle(e){return e.priority===Yr.Custom?-(e.length*e.length*1e5):e.priority===Yr.Surname?-(e.length*e.length*100):1}function Wle(e,t){const n=[];let i=e.length-1,s=e[i];for(let o=t-1;o>=0;o--){const r=o+1>=t?{count:0,patterns:[]}:n[o+1];for(;s&&s.index+s.length-1===o;){const a=s.index,u={count:Hle(s)+r.count,patterns:r.patterns,concatPattern:s};n[a]=wS(n[a],u),s=e[--i]}const l={count:1+r.count,patterns:r.patterns};n[o]=wS(n[o],l),n[o].concatPattern&&(n[o].patterns=n[o].patterns.concat(n[o].concatPattern),n[o].concatPattern=void 0,delete n[o+1])}return n[0].patterns.reverse()}function qle(e,t){return!(t.index+t.length<=e.index||t.priority>e.priority||t.priority===e.priority&&t.length>e.length)}function Ule(e){const t=[];for(let n=e.length-1;n>=0;){const{index:i}=e[n];let s=n-1;for(;s>=0&&qle(e[n],e[s]);)s--;(s<0||e[s].index+e[s].length<=i)&&t.push(e[n]),n=s}return t.reverse()}var xS;(function(e){e[e.ReverseMaxMatch=1]="ReverseMaxMatch",e[e.MaxProbability=2]="MaxProbability",e[e.MinTokenization=3]="MinTokenization"})(xS||(xS={}));class SS{constructor(t,n="",i=""){this.children=new Map,this.fail=null,this.patterns=[],this.parent=t,this.prefix=n,this.key=i}}class Kle{constructor(){this.dictMap=new Map,this.queues=[],this.root=new SS(null)}build(t){this.buildTrie(t),this.buildFailPointer()}buildTrie(t){for(let n of t){const i=Tb(n.zh);let s=this.root;for(let o=0;o<i.length;o++){let r=i[o];if(!s.children.has(r)){const l=new SS(s,i.slice(0,o).join(""),r);s.children.set(r,l),this.addNodeToQueues(l)}s=s.children.get(r)}this.insertPattern(s.patterns,n),n.node=s,this.addPatternToDictMap(n)}}buildFailPointer(){let t=[],n=0;for(this.queues.forEach(i=>{t=t.concat(i)}),this.queues=[];t.length>n;){let i=t[n++],s=i.parent&&i.parent.fail,o=i.key;for(;s&&!s.children.has(o);)s=s.fail;s?i.fail=s.children.get(o):i.fail=this.root}}addPatternToDictMap(t){this.dictMap.has(t.dict)||this.dictMap.set(t.dict,new Set),this.dictMap.get(t.dict).add(t)}addNodeToQueues(t){this.queues[Nl(t.prefix)]||(this.queues[Nl(t.prefix)]=[]),this.queues[Nl(t.prefix)].push(t)}insertPattern(t,n){for(let i=t.length-1;i>=0;i--){const s=t[i];if(n.priority===s.priority&&n.probability>=s.probability)t[i+1]=s;else if(n.priority>s.priority)t[i+1]=s;else{t[i+1]=n;return}}t[0]=n}removeDict(t){this.dictMap.has(t)&&(this.dictMap.get(t).forEach(i=>{i.node.patterns=i.node.patterns.filter(s=>s!==i)}),this.dictMap.delete(t))}match(t,n){let i=this.root,s=[];const o=Tb(t);for(let r=0;r<o.length;r++){let l=o[r];for(;i!==null&&!i.children.has(l);)i=i.fail;if(i===null)i=this.root;else{i=i.children.get(l);const a=i.patterns.find(c=>n==="off"?c.priority!==Yr.Surname:n==="head"?c.length-1-r===0:!0);a&&s.push(Object.assign(Object.assign({},a),{index:r-a.length+1}));let u=i.fail;for(;u!==null;){const c=u.patterns.find(d=>n==="off"?d.priority!==Yr.Surname:n==="head"?d.length-1-r===0:!0);c&&s.push(Object.assign(Object.assign({},c),{index:r-c.length+1})),u=u.fail}}}return s}search(t,n,i=2){const s=this.match(t,n);return i===1?Ule(s):i===3?Wle(s,Nl(t)):jle(s,Nl(t))}}const Vle=[...Ole,...Rle,...zle,...Ble,...Nle,...$le],c$=new Kle;c$.build(Vle);const Zle=new a$,Gle=()=>Zle,Qle=[];function Yle(){return Qle}const Z1=e=>{const t=lc.get(e);return t?t.split(" ")[0]:e},Jle=e=>{const t=[],n=Yle();for(let i=0;i<e.length;i++){const s=e[i],o=s.charCodeAt(0);n[o]?t[i]=n[o]:t[i]=s}return t.join("")},Xle=(e,t,n,i,s)=>{const o=s?Jle(e):e,r=c$.search(o,n,i);let l=0;const a=Tb(e);for(let u=0;u<a.length;){const c=r[l];if(c&&u===c.index){if(c.length===1&&c.priority<=Yr.Normal){const h=a[u];c.zh=h;let g="";g=_S(h,a[u-1],a[u+1]),t[u]={origin:h,result:g,isZh:g!==h,originPinyin:g},u++,l++;continue}const d=c.pinyin.split(" ");let f=0;s&&(c.zh=a.slice(c.index,c.index+c.length).join(""));for(let h=0;h<c.length;h++)t[u+h]={origin:a[h+c.index],result:d[f]||"",isZh:!0,originPinyin:d[f]||""},f++;u+=c.length,l++}else{const d=a[u];let f="";f=_S(d,a[u-1],a[u+1]),t[u]={origin:d,result:f,isZh:f!==d,originPinyin:f},u++}}return{list:t,matches:r}},Uy=e=>e.replace(/(ā|á|ǎ|à)/g,"a").replace(/(ō|ó|ǒ|ò)/g,"o").replace(/(ē|é|ě|è)/g,"e").replace(/(ī|í|ǐ|ì)/g,"i").replace(/(ū|ú|ǔ|ù)/g,"u").replace(/(ǖ|ǘ|ǚ|ǜ)/g,"ü").replace(/(n̄|ń|ň|ǹ)/g,"n").replace(/(m̄|ḿ|m̌|m̀)/g,"m").replace(/(ê̄|ế|ê̌|ề)/g,"ê"),d$=(e,t="off")=>{const n=Gle();let i=lc.get(e)?lc.get(e).split(" "):[];if(n.get(e))i=n.get(e).split(" ");else if(t!=="off"){const s=Lb[e];s&&(i=[s].concat(i.filter(o=>o!==s)))}return i},eae=(e,t="off")=>{let n=d$(e,t);return n.length>0?n.map(i=>({origin:e,result:i,isZh:!0,originPinyin:i})):[{origin:e,result:e,isZh:!1,originPinyin:e}]},iv=(e,t)=>{const n=e.split(" "),i=[],s=[];for(let o of n)for(let r of _le)if(o.startsWith(r)){let l=o.slice(r.length);Ile.indexOf(r)!==-1&&Mle.indexOf(l)!==-1&&(l=Ele[l]),i.push(r),s.push(l);break}return t==="standard"&&i.forEach((o,r)=>{(o==="y"||o==="w")&&(i[r]="")}),{final:s.join(" "),initial:i.join(" ")}},Xm=e=>{const{final:t}=iv(e);let n="",i="",s="";return Tle.indexOf(Uy(t))!==-1?(n=t[0],i=t[1],s=t.slice(2)):(i=t[0]||"",s=t.slice(1)||""),{head:n,body:i,tail:s}},Ky=e=>{const t=/(ā|ō|ē|ī|ū|ǖ|n̄|m̄|ê̄)/,n=/(á|ó|é|í|ú|ǘ|ń|ḿ|ế)/,i=/(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň|m̌|ê̌)/,s=/(à|ò|è|ì|ù|ǜ|ǹ|m̀|ề)/,o=/(a|o|e|i|u|ü|ê)/,r=/(n|m)$/,l=[];return e.split(" ").forEach(u=>{t.test(u)?l.push("1"):n.test(u)?l.push("2"):i.test(u)?l.push("3"):s.test(u)?l.push("4"):o.test(u)||r.test(u)?l.push("0"):l.push("")}),l.join(" ")},tae=(e,t)=>{const n=Uy(e).split(" "),i=Ky(t).split(" "),s=[];return n.forEach((o,r)=>{s.push(`${o}${i[r]}`)}),s.join(" ")},f$=(e,t)=>{const n=[];return e.split(" ").forEach(s=>{n.push(t?s[0]:s)}),n.join(" ")};function nae(e,t,n){if(Dle.indexOf(e)===-1)return Z1(e);if(t===n&&t&&Z1(t)!==t)return Uy(Z1(e));if(n&&!Fle[e].includes(n)){const i=Z1(n);if(i!==n){const s=Ky(i),o=u$[e];for(let r in o)if(o[r].indexOf(Number(s))!==-1)return r}}}function iae(e,t){if(e==="了"&&(!t||!lc.get(t)))return"liǎo"}function sae(e,t){if(e==="々")return!t||!lc.get(t)?"tóng":lc.get(t).split(" ")[0]}function _S(e,t,n){return sae(e,t)||iae(e,t)||nae(e,t,n)||Z1(e)}const oae=e=>typeof e!="string"?(console.error("The first param of pinyin is error: "+e+' is not assignable to type "string".'),!1):!0;function Q4(e,t){return t instanceof RegExp?t.test(e):!0}const rae=(e,t)=>{let n=t.nonZh;if(n==="removed")return e.filter(i=>i.isZh||!Q4(i.origin,t.nonZhScope));if(n==="consecutive"){for(let i=e.length-2;i>=0;i--){const s=e[i],o=e[i+1];!s.isZh&&!o.isZh&&Q4(s.origin,t.nonZhScope)&&Q4(o.origin,t.nonZhScope)&&(s.origin+=o.origin,s.result+=o.result,o.delete=!0)}return e.filter(i=>!i.delete)}else return e},IS=(e,t)=>Nl(e)===1&&t.multiple?eae(e,t.surname):!1,lae=(e,t)=>{switch(t.pattern){case"pinyin":break;case"num":e.forEach(n=>{n.result=n.isZh?Ky(n.result):""});break;case"initial":e.forEach(n=>{n.result=n.isZh?iv(n.result,t.initialPattern).initial:""});break;case"final":e.forEach(n=>{n.result=n.isZh?iv(n.result,t.initialPattern).final:""});break;case"first":e.forEach(n=>{n.result=f$(n.result,n.isZh)});break;case"finalHead":e.forEach(n=>{n.result=n.isZh?Xm(n.result).head:""});break;case"finalBody":e.forEach(n=>{n.result=n.isZh?Xm(n.result).body:""});break;case"finalTail":e.forEach(n=>{n.result=n.isZh?Xm(n.result).tail:""});break}},aae=(e,t)=>{switch(t.toneType){case"symbol":break;case"none":e.forEach(n=>{n.isZh&&(n.result=Uy(n.result))});break;case"num":{e.forEach(n=>{n.isZh&&(n.result=tae(n.result,n.originPinyin))});break}}},uae=(e,t)=>{t.v&&e.forEach(n=>{n.isZh&&(n.result=n.result.replace(/ü/g,typeof t.v=="string"?t.v:"v"))})},cae=(e,t,n)=>{if(t.multiple&&Nl(n)===1){let i="";e=e.filter(s=>{const o=s.result!==i;return i=s.result,o})}return t.type==="array"?e.map(i=>i.result):t.type==="all"?e.map(i=>{const s=i.isZh?i.result:"",{initial:o,final:r}=iv(s,t.initialPattern),{head:l,body:a,tail:u}=Xm(s);let c=[];return s!==""&&(c=[s].concat(d$(i.origin,t.surname).filter(d=>d!==s))),{origin:i.origin,pinyin:s,initial:o,final:r,first:f$(i.result,i.isZh),finalHead:l,finalBody:a,finalTail:u,num:Number(Ky(i.originPinyin)),isZh:i.isZh,polyphonic:c,inZhRange:!!lc.get(i.origin),result:i.result}}):e.map(i=>i.result).join(t.separator)},dae=(e,t)=>(t===!1&&e.forEach(n=>{n.origin==="一"?n.result=n.originPinyin="yī":n.origin==="不"&&(n.result=n.originPinyin="bù")}),e),fae={pattern:"pinyin",toneType:"symbol",type:"string",multiple:!1,mode:"normal",removeNonZh:!1,nonZh:"spaced",v:!1,separator:" ",toneSandhi:!0,segmentit:2};function sv(e,t){if(t=Object.assign(Object.assign({},fae),t||{}),!oae(e))return e;if(e==="")return t.type==="array"||t.type==="all"?[]:"";t.surname===void 0&&(t.mode==="surname"?t.surname="all":t.surname="off"),t.type==="all"&&(t.pattern="pinyin"),t.pattern==="num"&&(t.toneType="none"),t.removeNonZh&&(t.nonZh="removed");let i=Array(Nl(e)),{list:s}=Xle(e,i,t.surname,t.segmentit,t.traditional);return s=dae(s,t.toneSandhi),s=rae(s,t),IS(e,t)&&(s=IS(e,t)),lae(s,t),aae(s,t),uae(s,t),cae(s,t,e)}var Nb;(function(e){e[e.AllSegment=1]="AllSegment",e[e.AllArray=2]="AllArray",e[e.AllString=3]="AllString",e[e.PinyinSegment=4]="PinyinSegment",e[e.PinyinArray=5]="PinyinArray",e[e.PinyinString=6]="PinyinString",e[e.ZhSegment=7]="ZhSegment",e[e.ZhArray=8]="ZhArray",e[e.ZhString=9]="ZhString"})(Nb||(Nb={}));Nb.AllSegment;const h$=[{name:"/new",desc:"commands.new.desc"},{name:"/clear",desc:"commands.clear.desc"},{name:"/login",desc:"commands.login.desc"},{name:"/plan",desc:"commands.plan.desc"},{name:"/swarm",desc:"commands.swarm.desc"},{name:"/goal",desc:"commands.goal.desc"},{name:"/btw",desc:"commands.btw.desc",acceptsInput:!0},{name:"/auto",desc:"commands.auto.desc"},{name:"/yolo",desc:"commands.yolo.desc"},{name:"/thinking",desc:"commands.thinking.desc"},{name:"/compact",desc:"commands.compact.desc",acceptsInput:!0},{name:"/undo",desc:"commands.undo.desc"},{name:"/fork",desc:"commands.fork.desc"},{name:"/export",desc:"commands.export.desc"},{name:"/status",desc:"commands.status.desc"}];function hae(e){if(!e.startsWith("/"))return null;const t=e.indexOf(" ");return t===-1?{cmd:e,arg:""}:{cmd:e.slice(0,t),arg:e.slice(t+1)}}const ov="skill:";function pae(e){const t=e.startsWith("/")?e.slice(1):e;return t.startsWith(ov)?t.slice(ov.length):t}function p$(e=[]){const t=e.map(n=>({name:n.source==="builtin"?`/${n.name}`:`/${ov}${n.name}`,desc:n.description,isSkill:!0,acceptsInput:!0}));return[...h$,...t]}const MS=new Map;function g$(e){let t=MS.get(e);if(!t){const n=sv(e,{toneType:"none",type:"array"}),i=sv(e,{pattern:"first",toneType:"none",type:"array"});t=gae(e,n,i),MS.set(e,t)}return t}const ES={full:[],first:[],offsets:[],literal:[]};function gae(e,t,n){if(t.length!==n.length)return ES;const i=[],s=[];let o=0;for(let r=0;r<t.length;r++){i.push(o);const l=t[r];l.length>0&&e.slice(o,o+l.length).toLowerCase()===l.toLowerCase()?(s.push(!0),o+=l.length):(s.push(!1),o+=Array.from(e.slice(o))[0]?.length??0)}return i.push(o),o!==e.length?ES:{full:t,first:n,offsets:i,literal:s}}function Fb(e,t,n,i){const s=e[t];let o=0,r=-1,l=-1,a=0,u=0;for(let f=0;f<s.length;f++){const h=o+(s[f]?.length??0);if(r<0&&n<h&&(r=f,a=o),i<=h){l=f,u=o;break}o=h}if(r<0||l<0)return;const c=e.literal[r]?e.offsets[r]+(n-a):e.offsets[r],d=e.literal[l]?e.offsets[l]+(i-u):e.offsets[l+1];return[c,d]}const TS=new Map;function mae(e){let t=TS.get(e);return t||(t={full:sv(e,{toneType:"none",type:"string",separator:""}),first:sv(e,{pattern:"first",toneType:"none",type:"string",separator:""})},TS.set(e,t)),t}function m$(e,t){const n=e.toLowerCase().indexOf(t);return n<0?void 0:[n,n+t.length]}function vae(e,t){const n=e.toLowerCase();let i=0,s=-1,o=-1;for(let r=0;r<n.length&&i<t.length;r++)n[r]===t[i]&&(i===0&&(s=r),o=r,i++);return i===t.length?[s,o+1]:void 0}function yae(e,t){return m$(e,t)??vae(e,t)}function kae(e,t){const n=m$(e,t);if(n)return n;if(!/^[\x21-\x7e]+$/.test(t))return;const i=g$(e),s=i.first.join("").indexOf(t);if(s>=0)return Fb(i,"first",s,s+t.length);const o=i.full.join("").indexOf(t);if(!(o<0))return Fb(i,"full",o,o+t.length)}function bae(e,t,n){const i=e.trim().replace(/^\//,"").toLowerCase();if(i==="")return{};const s=yae(t,i),o=kae(n,i);return{name:s?[s]:void 0,desc:o?[o]:void 0}}const Aae={keys:[{name:"name",weight:3},{name:"desc",weight:1},{name:"pinyinFull",weight:1},{name:"pinyinFirst",weight:1}],includeScore:!0,includeMatches:!0,ignoreLocation:!0,threshold:.4};function Cae(e,t){const n=e.toLowerCase(),i=t.toLowerCase();return n===i?0:n.startsWith(i)?1:2}function LS(e){const t=[...e].sort((i,s)=>i[0]-s[0]),n=[];for(const i of t){const s=n[n.length-1];s&&i[0]<=s[1]?s[1]=Math.max(s[1],i[1]):n.push([...i])}return n}function wae(e,t){const n=[],i=[];for(const s of t??[])for(const[o,r]of s.indices)if(s.key==="name")n.push([o+1,r+2]);else if(s.key==="desc")i.push([o,r+1]);else if(s.key==="pinyinFirst"||s.key==="pinyinFull"){const l=Fb(g$(e.desc),s.key==="pinyinFirst"?"first":"full",o,r+1);l&&i.push(l)}return{name:n.length>0?LS(n):void 0,desc:i.length>0?LS(i):void 0}}function xae(e,t=h$,n=i=>i.desc){const i=e.trim().replace(/^\//,"");if(i==="")return t.map(o=>({item:o,ranges:{}}));const s=t.map((o,r)=>{const l=n(o),a=mae(l);return{index:r,item:o,name:o.name.replace(/^\//,""),desc:l,pinyinFull:a.full,pinyinFirst:a.first}});return new Cle(s,Aae).search(i).map(({item:o,score:r,matches:l})=>({doc:o,score:r??1,rank:Cae(o.name,i),ranges:wae(o,l)})).sort((o,r)=>o.rank!==r.rank?o.rank-r.rank:o.score!==r.score?o.score-r.score:o.doc.index-r.doc.index).map(({doc:o,ranges:r})=>({item:o.item,ranges:r}))}function Sae(e,t){if(t.length===0||e.length===0)return t;const n=Date.parse(t[0].createdAt);if(Number.isNaN(n))return t;const i=new Set(t.map(r=>r.id)),s=new Set(t.flatMap(r=>r.role==="user"&&r.promptId!==void 0?[r.promptId]:[])),o=e.filter(r=>{const l=Date.parse(r.createdAt);return!(Number.isNaN(l)||l>=n||i.has(r.id)||r.role==="user"&&(r.userMessageId!==void 0&&i.has(r.userMessageId)||r.promptId!==void 0&&s.has(r.promptId)))});return o.length>0?[...o,...t]:t}function _ae(e){const t=new Map,n=new Set;function i(o){const r=t.get(o);if(r!==void 0)return r;const l=(async()=>e(o))().finally(()=>{t.delete(o),n.delete(o)&&i(o)});return t.set(o,l),l}function s(o){if(t.has(o)){n.add(o);return}i(o)}return{run:i,request:s}}const hn={permission:"kimi-web.permission",activeWorkspace:"kimi-active-workspace",planArmed:"kimi-web.plan-armed",swarmMode:"kimi-web.swarm-mode",goalMode:"kimi-web.goal-mode",fontScale:"kimi-web.font-scale",starredModels:"kimi-web.starred-models",unread:"kimi-web.unread",onboarded:"kimi-web.onboarded",colorScheme:"kimi-web.color-scheme",hiddenWorkspaces:"kimi-web.hidden-workspaces",collapsedWorkspaces:"kimi-web.collapsed-workspaces",workspaceOrder:"kimi-web.workspace-order",workspaceSort:"kimi-web.workspace-sort",workspaceRecencyFloor:"kimi-web.workspace-recency-floor",pinnedSessions:"kimi-web.pinned-sessions",pinnedCollapsed:"kimi-web.pinned-collapsed",workspaceNameOverrides:"kimi-web.workspace-name-overrides",notifyEnabled:"kimi-web.notify-enabled",notifySound:"kimi-web.notify-sound",inputHistory:"kimi-web.input-history",locale:"kimi-locale",clientId:"kimi-web.client-id",debug:"kimi-web.debug",openInDefaultTarget:"kimi-web.open-in.default-target",openInLastTarget:"kimi-web.open-in.last-target",sidebarCollapsed:"kimi-web.sidebar-collapsed",sidebarWidth:"kimi-web.sidebar-width",sidebarViewMode:"kimi-web.sidebar-view-mode",shortcutOverrides:"kimi-web.shortcut-overrides",dockIconChoice:"kimi-web.dock-icon-choice",updateSkippedVersion:"kimi-web.update-skipped-version",planMode:"kimi-web.plan-mode",codeFont:"kimi-web.code-font",contentAlign:"kimi-web.content-align",theme:"kimi-web.theme",thinking:"kimi-web.thinking",accent:"kimi-web.accent",notifyOnComplete:"kimi-web.notify-on-complete",notifyOnQuestion:"kimi-web.notify-on-question",notifyOnApproval:"kimi-web.notify-on-approval",soundOnComplete:"kimi-web.sound-on-complete"};function NS(e){return`kimi-web.draft.${e&&e.length>0?e:"__new__"}`}function To(e){try{return globalThis.localStorage.getItem(e)}catch{return null}}function Js(e,t){try{globalThis.localStorage.setItem(e,t)}catch{}}function Tr(e){try{globalThis.localStorage.removeItem(e)}catch{}}function tf(e){const t=To(e);if(t===null)return null;try{return JSON.parse(t)}catch{return null}}function _c(e,t){try{globalThis.localStorage.setItem(e,JSON.stringify(t))}catch{}}function c6(){const e=To(hn.unread);if(!e)return{};try{const t=JSON.parse(e);if(!t||typeof t!="object")return{};const n={};for(const[i,s]of Object.entries(t))s===!0&&(n[i]=!0);return n}catch{return{}}}function d6(e){const n={...c6()};for(const[i,s]of Object.entries(e))s?n[i]=!0:delete n[i];Js(hn.unread,JSON.stringify(n))}function Iae(){const e=tf(hn.collapsedWorkspaces);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Y4(e){_c(hn.collapsedWorkspaces,Array.from(e))}function Mae(){return tf(hn.pinnedCollapsed)===!0}function Db(e){_c(hn.pinnedCollapsed,e)}function Eae(){return To(hn.sidebarViewMode)==="flat"?"flat":"grouped"}function Tae(e){Js(hn.sidebarViewMode,e)}function Lae(){const e=tf(hn.workspaceOrder);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function v$(e){_c(hn.workspaceOrder,Array.from(e))}function Nae(){return To(hn.workspaceSort)==="recent"?"recent":"manual"}function Fae(e){Js(hn.workspaceSort,e)}function Dae(){const e=tf(hn.workspaceRecencyFloor);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="number"&&Number.isFinite(i)&&(t[n]=i);return t}function y$(e){_c(hn.workspaceRecencyFloor,e)}function k$(){const e=tf(hn.pinnedSessions);return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function J4(e){_c(hn.pinnedSessions,Array.from(e))}function lm(){const e=tf(hn.workspaceNameOverrides);if(!e||typeof e!="object")return{};const t={};for(const[n,i]of Object.entries(e))typeof i=="string"&&(t[n]=i);return t}function FS(e){_c(hn.workspaceNameOverrides,e)}function DS(e,t){const n=new Set(e.map(u=>u.id)),i=t.filter(u=>u.kind==="subagent"&&!n.has(u.id));if(i.length===0)return e;const s=new Map(e.map(u=>[u.id,u])),o=new Map(e.filter(u=>u.kind==="subagent"&&u.agentId!==void 0).map(u=>[u.agentId,u])),r=new Set,l=i.map(u=>{const c=(u.backgroundTaskId!==void 0?s.get(u.backgroundTaskId):void 0)??o.get(u.agentId??u.id);if(c===void 0)return u;r.add(c.id);const d=u.status==="running"&&c.status!=="running";return{...u,status:u.status==="running"?c.status:u.status,subagentPhase:d?c.status==="completed"?"completed":"failed":u.subagentPhase,completedAt:c.completedAt??u.completedAt,completedAtEstimated:c.completedAt!==void 0?void 0:u.completedAtEstimated,outputPreview:c.outputPreview??u.outputPreview,outputBytes:c.outputBytes??u.outputBytes,model:u.model??c.model,thinkingEffort:u.thinkingEffort??c.thinkingEffort}});return[...e.filter(u=>!r.has(u.id)),...l]}function $ae(e,t){if(e.length===0)return t;const n=new Map(t.map(r=>[r.id,r])),i=new Set(e.map(r=>r.id)),s=e.map(r=>{const l=n.get(r.id);if(!l)return r;const a=r.completedAt===void 0&&l.completedAt===void 0&&l.status==="running"&&r.status!=="running";return{...r,outputLines:l.outputLines,text:l.text,completedAt:r.completedAt??l.completedAt??(a?new Date().toISOString():void 0),completedAtEstimated:r.completedAt!==void 0?void 0:l.completedAt!==void 0?l.completedAtEstimated:a?!0:void 0,model:r.model??l.model,thinkingEffort:r.thinkingEffort??l.thinkingEffort}}),o=t.filter(r=>!i.has(r.id));return o.length===0?s:[...s,...o]}function Bae(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const e=navigator.userAgentData;return e?.platform==="macOS"||e?.platform==="iOS"}function zae(e,t=Bae()){return(t?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey)&&!e.altKey&&!e.shiftKey&&(e.code==="KeyF"||e.key.toLowerCase()==="f")&&!e.defaultPrevented}const Rae=new Map([["ς","σ"],["ß","ss"],["ſ","s"],["ff","ff"],["fi","fi"],["fl","fl"],["ffi","ffi"],["ffl","ffl"],["ſt","st"],["st","st"],["ʼn","ʼn"],["µ","μ"],["K","k"],["Å","å"],["Ω","ω"]]);function Oae(e){return e==="pre"||e==="pre-wrap"||e==="break-spaces"?"preserve":e==="pre-line"?"pre-line":"collapse"}function Pae(e,t){if(t==="preserve")return{text:e,map:Array.from({length:e.length},(r,l)=>l)};const n=t==="collapse"?/[\t\n\f\r ]/:/[\t ]/;let i="";const s=[];let o=!1;for(let r=0;r<e.length;r++)n.test(e[r])?o||(i+=" ",s.push(r),o=!0):(i+=e[r],s.push(r),o=!1);return{text:i,map:s}}function $S(e){let t="";const n=[];let i=0;for(const s of e){const o=s.toLowerCase(),r=Rae.get(o)??o;t+=r;for(let l=0;l<r.length;l++)n.push({start:i,length:s.length});i+=s.length}return{folded:t,map:n}}function*jae(e,t){if(t.length===0||e.length===0)return;const n=e.map(c=>$S(c.text)),i="\0";let s="";const o=[];for(let c=0;c<e.length;c++)c>0&&e[c].gapBefore&&(s+=i),o[c]=s.length,s+=n[c].folded;const r=Wae($S(t).folded);if(r===null)return;const l=new RegExp(r,"g");function a(c){let d=0,f=o.length-1,h=0;for(;d<=f;){const g=d+f>>1;o[g]<=c?(h=g,d=g+1):f=g-1}return h}let u;for(;;){const c=l.exec(s);if(c===null)return;const d=c.index,f=d+c[0].length-1,h=a(d),g=a(f),m=n[h].map[d-o[h]],y=n[g].map[f-o[g]],A={startSeg:h,startOffset:m.start,endSeg:g,endOffset:y.start+y.length};u!==void 0&&u.startSeg===A.startSeg&&u.startOffset===A.startOffset&&u.endSeg===A.endSeg&&u.endOffset===A.endOffset||(u=A,yield A)}}const Hae=/[.*+?^${}()|[\]\\]/g;function Wae(e){const t=[];let n=0;for(;n<e.length;){const i=/^\s+/.exec(e.slice(n));if(i!==null){t.push("\\s+"),n+=i[0].length;continue}const s=/^[^\s]+/.exec(e.slice(n));t.push(s[0].replaceAll(Hae,"\\$&")),n+=s[0].length}return t.length===0?null:t.join("")}const BS="script, style, noscript, template, [inert], .top-sentinel",qae=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","BR","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"]),Uae=new Set(["inline","inline-block","inline-flex","inline-grid","inline-table","contents","ruby"]);function Kae(e,t){const n=t.get(e);if(n!==void 0)return n;const i=qae.has(e.tagName)||!Uae.has(getComputedStyle(e).display);return t.set(e,i),i}function Vae(e,t,n){let i=e.parentElement;for(;i!==null&&i!==t&&!Kae(i,n);)i=i.parentElement;return i??t}const Zae=1e3;function Gae(e,t){if(t.length===0)return{ranges:[],truncated:!1};const n=e.ownerDocument,i=n.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode(u){return u.nodeType===Node.ELEMENT_NODE?u.matches(BS)?NodeFilter.FILTER_REJECT:u.matches("br, hr, wbr")&&!u.closest(BS)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}}),s=new WeakMap,o=new WeakMap,r=[];let l=!1;for(let u=i.nextNode();u!==null;u=i.nextNode()){if(u.nodeType===Node.ELEMENT_NODE){l=!0;continue}const c=u.nodeValue??"";if(c.length===0)continue;const d=u.parentElement;if(d===null)continue;let f=o.get(d);f===void 0&&(f=Oae(getComputedStyle(d).whiteSpace),o.set(d,f));let{text:h,map:g}=Pae(c,f);if(h.length===0)continue;const m=Vae(u,e,s),y=r.at(-1),A=l||y===void 0||y.block!==m;!A&&y.text.endsWith(" ")&&h.startsWith(" ")&&(h=h.slice(1),g=g.slice(1),h.length===0)||(r.push({text:h,gapBefore:A,node:u,block:m,wsMap:g}),l=!1)}const a=[];for(const u of jae(r,t)){const c=r[u.startSeg],d=r[u.endSeg],f=n.createRange();if(f.setStart(c.node,c.wsMap[u.startOffset]),f.setEnd(d.node,d.wsMap[u.endOffset-1]+1),f.getClientRects().length!==0){if(a.length>=Zae)return{ranges:a,truncated:!0};a.push(f)}}return{ranges:a,truncated:!1}}const b$="kimi-transcript-search",$b="kimi-transcript-search-current";function A$(){return globalThis.CSS?.highlights??null}function X4(e,t){const n=A$(),i=globalThis.Highlight;if(!n||!i)return;if(e.length===0){Bb();return}const s=new i;for(const r of e)s.add(r);n.set(b$,s);const o=e[t];if(o!==void 0){const r=new i;r.add(o),n.set($b,r)}else n.delete($b)}function Bb(){const e=A$();e?.delete(b$),e?.delete($b)}const Qae=`https://www.kimi.com/code?from=${Wh?"kimi_code_desktop":"kimi_code_web"}`;function z0(){window.open(Qae,"_blank","noopener")}function Yae(e,t,n){if(e.length===0)return null;const i=new Set(e),s=t.filter(r=>i.has(r)),o=e.filter(r=>!t.includes(r));return o.length===0&&s.length===t.length?null:t.length===0&&n!==void 0?o.toSorted((r,l)=>(n.get(l)??Number.NEGATIVE_INFINITY)-(n.get(r)??Number.NEGATIVE_INFINITY)):[...o,...s]}function Jae(e,t){const n=new Map(t.map((i,s)=>[i,s]));return e.toSorted((i,s)=>(n.get(i.id)??-1)-(n.get(s.id)??-1))}function Xae(e,t,n,i="before"){const s=e.indexOf(t),o=e.indexOf(n);if(s===-1||o===-1||s===o)return e;const r=[...e];r.splice(s,1);const l=s<o?o-1:o,a=i==="before"?l:l+1;return r.splice(a,0,t),r}function eue(e,t){return e.toSorted((n,i)=>(t.get(i.id)??Number.NEGATIVE_INFINITY)-(t.get(n.id)??Number.NEGATIVE_INFINITY))}function tue(e,t){let n=!1;const i={...e};for(const[s,o]of t)o>(i[s]??Number.NEGATIVE_INFINITY)&&(i[s]=o,n=!0);return{next:i,changed:n}}function nue(e,t){const n=new Map;for(const i of e){if(i.parentSessionId||i.archived)continue;const s=new Date(i.updatedAt).getTime();if(Number.isNaN(s))continue;const o=t(i);s>(n.get(o)??Number.NEGATIVE_INFINITY)&&n.set(o,s)}return n}function iue(e,t){const n=new Map;for(const i of e){const s=t[i.id]??Number.NEGATIVE_INFINITY,o=i.lastOpenedAt?Date.parse(i.lastOpenedAt):Number.NaN,r=Number.isNaN(o)?Number.NEGATIVE_INFINITY:o;n.set(i.id,Math.max(s,r))}return n}function sue(e,t){const n=Object.keys(e);if(!n.some(s=>!t.has(s)))return{next:e,changed:!1};const i={};for(const s of n)t.has(s)&&(i[s]=e[s]);return{next:i,changed:!0}}const oue=5;function rue(e,t,n,i=oue){if(e.length<=i)return e;const s=e.slice(0,i);if(t&&!s.some(o=>o.id===t)){const o=e.find(r=>r.id===t);o&&(s[i-1]=o)}return s}const lue={class:"sd-body"},aue={class:"sd-search"},uue=["aria-label"],cue={key:0,class:"sd-section","aria-hidden":"true"},due={class:"sd-section-count"},fue=["aria-selected","onClick","onMousemove"],hue=["innerHTML"],pue=["innerHTML"],gue=["aria-selected","onClick","onMousemove"],mue={class:"sd-line1"},vue=["innerHTML"],yue={class:"sd-time"},kue={class:"sd-line2"},bue=["innerHTML"],Aue=["innerHTML"],Cue={key:1,class:"sd-empty"},wue={class:"sd-foot","aria-hidden":"true"},xue={class:"sd-hint"},Sue={class:"sd-hint"},_ue={class:"sd-hint"},Iue=200,Mue=3,Eue=Qe({__name:"SearchSessionsDialog",props:{sessions:{},workspaces:{},activeId:{}},emits:["select","selectWorkspace","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G(!0),r=G(""),l=G(null),a=G(null),u=L(()=>{const _=r.value.trim().toLowerCase(),I=[];if(_.length===0)for(const $ of i.workspaces.slice(0,Mue))I.push({kind:"workspace",key:`ws:${$.id}`,hit:{workspace:$,inName:!1,inPath:!1}});else for(const $ of i.workspaces){const D=$.name.toLowerCase().includes(_),T=$.shortPath.toLowerCase().includes(_);!D&&!T||I.push({kind:"workspace",key:`ws:${$.id}`,hit:{workspace:$,inName:D,inPath:T}})}const M=[];for(const $ of i.sessions){const D=$.title??"",T=$.lastPrompt??"",N=$.workspaceName??"",O=_.length>0&&D.toLowerCase().includes(_),P=_.length>0&&T.toLowerCase().includes(_),R=_.length>0&&N.toLowerCase().includes(_);if(!(_.length>0&&!O&&!P&&!R)&&(M.push({kind:"session",key:`s:${$.id}`,hit:{session:$,inTitle:O,inWorkspace:R,snippetText:T?cre(T,r.value):""}}),M.length>=Iue))break}return I.length>0&&M.length>0&&(I[0].section={label:n("sidebar.workspaces"),count:I.length},M[0].section={label:n("sidebar.sessionsHeader"),count:M.length}),[...I,...M]}),c=G(0);qe(r,()=>{c.value=0});function d(_){const I=u.value.length;return I===0?0:Math.max(0,Math.min(I-1,_))}async function f(){await kt(),a.value?.querySelector('[aria-selected="true"]')?.scrollIntoView({block:"nearest"})}function h(_){c.value=d(c.value+_),f()}function g(_){s("select",_),s("close")}function m(_){s("selectWorkspace",_),s("close")}function y(){r.value="",l.value?.focus()}function A(){const _=u.value[c.value];_&&(_.kind==="workspace"?m(_.hit.workspace.id):g(_.hit.session.id))}function b(){return l.value?.el??null}const{handleCompositionStart:C,handleCompositionEnd:v,isComposingKeyEvent:x}=Xr();function S(_){if(x(_)){_.key==="Escape"&&_.stopPropagation();return}_.key==="ArrowDown"?(_.preventDefault(),h(1)):_.key==="ArrowUp"?(_.preventDefault(),h(-1)):_.key==="Enter"&&(_.preventDefault(),A())}return mn(()=>{l.value?.focus()}),(_,I)=>(k(),de(p(bc),{open:o.value,"onUpdate:open":I[1]||(I[1]=M=>o.value=M),title:p(n)("sidebar.searchPlaceholder"),size:"lg",height:"fixed",padded:!1,"initial-focus":b,onClose:I[2]||(I[2]=M=>s("close"))},{default:he(()=>[w("div",lue,[w("div",aue,[K(p(wo),{ref_key:"inputRef",ref:l,modelValue:r.value,"onUpdate:modelValue":I[0]||(I[0]=M=>r.value=M),placeholder:p(n)("sidebar.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:S,onCompositionstart:p(C),onCompositionend:p(v)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),K(p(kn),{text:p(n)("sidebar.searchClear")},{default:he(()=>[w("button",{type:"button",class:Fe(["search-clear",{"is-on":r.value.length>0}]),tabindex:"-1","aria-label":p(n)("sidebar.searchClear"),onClick:y},[K(p(ve),{name:"close",size:"sm"})],10,uue)]),_:1},8,["text"])]),w("div",{ref_key:"listRef",ref:a,class:"sd-list",role:"listbox"},[u.value.length>0?(k(!0),E(Te,{key:0},ht(u.value,(M,$)=>(k(),E(Te,{key:M.key},[M.section?(k(),E("div",cue,[w("span",null,F(M.section.label),1),w("span",due,F(M.section.count),1)])):te("",!0),M.kind==="workspace"?(k(),E("button",{key:1,class:Fe(["sd-row sd-row-ws",{on:$===c.value}]),role:"option","aria-selected":$===c.value,onClick:D=>m(M.hit.workspace.id),onMousemove:D=>c.value=$},[K(p(ve),{class:"sd-folder",name:"folder-closed",size:"sm"}),w("span",{class:"sd-ws-name",innerHTML:p(S1)(M.hit.workspace.name,M.hit.inName?r.value:"")},null,8,hue),w("span",{class:"sd-ws-path",innerHTML:p(S1)(M.hit.workspace.shortPath,M.hit.inPath?r.value:"")},null,8,pue)],42,fue)):(k(),E("button",{key:2,class:Fe(["sd-row",{on:$===c.value,active:M.hit.session.id===e.activeId}]),role:"option","aria-selected":$===c.value,onClick:D=>g(M.hit.session.id),onMousemove:D=>c.value=$},[w("span",mue,[w("span",{class:"sd-title",innerHTML:p(S1)(M.hit.session.title,M.hit.inTitle?r.value:"")},null,8,vue),w("span",yue,F(M.hit.session.time),1)]),w("span",kue,[w("span",{class:"sd-meta-ws",innerHTML:p(S1)(M.hit.session.workspaceName??M.hit.session.workspaceId??"",M.hit.inWorkspace?r.value:"")},null,8,bue),M.hit.snippetText?(k(),E(Te,{key:0},[I[3]||(I[3]=w("span",{class:"sd-meta-sep","aria-hidden":"true"},"·",-1)),w("span",{class:"sd-meta-snippet",innerHTML:p(S1)(M.hit.snippetText,r.value)},null,8,Aue)],64)):te("",!0)])],42,gue))],64))),128)):(k(),E("div",Cue,[K(p(FG),{title:r.value.trim()?p(n)("sidebar.searchNoResults"):p(n)("sidebar.searchEmpty")},{icon:he(()=>[K(p(ve),{name:"search",size:"lg"})]),_:1},8,["title"])]))],512),w("div",wue,[w("span",xue,[K(p(Ja),{keys:["↑","↓"]}),$e(F(p(n)("sidebar.searchHintSelect")),1)]),I[4]||(I[4]=w("span",{class:"sd-dot"},"·",-1)),w("span",Sue,[K(p(Ja),{keys:["Enter"]}),$e(F(p(n)("sidebar.searchHintOpen")),1)]),I[5]||(I[5]=w("span",{class:"sd-dot"},"·",-1)),w("span",_ue,[K(p(Ja),{keys:["Esc"]}),$e(F(p(n)("sidebar.searchHintClose")),1)])])])]),_:1},8,["open","title"]))}}),Tue=gt(Eue,[["__scopeId","data-v-5bf43f78"]]);function e3(e){return{fileId:e.fileId,kind:e.kind,sessionId:e.kind==="file"?void 0:e.sessionId,name:e.name,mediaType:e.mediaType,size:e.size}}function C$(e,t){const n=t.kind==="file"?void 0:t.sessionId;return{kind:t.kind,url:n?e.getSessionMediaUrl(n,t.fileId):e.getFileUrl(t.fileId),fileId:t.fileId,sessionId:n,name:t.name,mediaType:t.mediaType,size:t.size}}function rv(e){const t=[];for(const n of e??[])n.kind==="video"?t.push({type:"video",source:n.sessionId?{kind:"sessionMedia",fileId:n.fileId}:{kind:"file",fileId:n.fileId}}):n.kind==="file"?t.push({type:"file",fileId:n.fileId,name:n.name??"",mediaType:n.mediaType||"application/octet-stream",size:n.size??0}):t.push({type:"image",source:n.sessionId?{kind:"sessionMedia",fileId:n.fileId}:{kind:"file",fileId:n.fileId}});return t}const Lue=1e3,Nue=4096,zS=32*1024;function Fue(e,t,n){let i=null,s;const o=new Set;async function r(h){try{const m=await n.api.listTasks(h),y=e.tasksBySession[h]??[],A=new Map(y.map(v=>[v.id,v])),b=new Map(y.filter(v=>v.backgroundTaskId!==void 0).map(v=>[v.backgroundTaskId,v])),C=m.map(v=>{const x=A.get(v.id)??b.get(v.id),S=v.completedAt===void 0&&x?.completedAt===void 0&&x?.status==="running"&&v.status!=="running";return{...v,completedAt:v.completedAt??x?.completedAt??(S?new Date().toISOString():void 0),completedAtEstimated:v.completedAt!==void 0?void 0:x?.completedAt!==void 0?x.completedAtEstimated:S?!0:void 0}});e.tasksBySession={...e.tasksBySession,[h]:DS(C,y)},await l(h,m)}catch{}}async function l(h,g){if(e.activeSessionId!==h)return;const m=g??e.tasksBySession[h]??[],y=n.api,A=new Map;if(await Promise.all(m.map(async C=>{if((C.status==="completed"||C.status==="failed"||C.status==="cancelled")&&!o.has(C.id)&&!((C.outputLines?.length??0)>0))try{const x=await y.getTask(h,C.id,{withOutput:!0,outputBytes:zS});x.outputPreview!==void 0&&A.set(C.id,{preview:x.outputPreview,bytes:x.outputBytes}),o.add(C.id)}catch{}})),A.size===0)return;const b=e.tasksBySession[h]??[];e.tasksBySession={...e.tasksBySession,[h]:b.map(C=>{const v=A.get(C.id)??(C.backgroundTaskId!==void 0?A.get(C.backgroundTaskId):void 0);return v?{...C,outputPreview:v.preview,outputBytes:v.bytes}:C})}}async function a(h){if(e.activeSessionId!==h)return;const g=n.api;let m;try{m=await g.listTasks(h)}catch{return}const y=new Map;await Promise.all(m.map(async x=>{const S=x.status==="running",_=x.status==="completed"||x.status==="failed"||x.status==="cancelled";if(!(!S&&!_)&&!(_&&(o.has(x.id)||(x.outputLines?.length??0)>0)))try{const I=await g.getTask(h,x.id,{withOutput:!0,outputBytes:S?Nue:zS});I.outputPreview!==void 0&&y.set(x.id,{preview:I.outputPreview,bytes:I.outputBytes}),_&&o.add(x.id)}catch{}}));const A=e.tasksBySession[h]??[],b=new Map(A.map(x=>[x.id,x])),C=new Map(A.filter(x=>x.backgroundTaskId!==void 0).map(x=>[x.backgroundTaskId,x])),v=m.map(x=>{const S=b.get(x.id)??C.get(x.id),_=y.get(x.id),I=x.completedAt===void 0&&S?.completedAt===void 0&&S?.status==="running"&&x.status!=="running";return{...x,outputLines:S?.outputLines,text:S?.text,completedAt:x.completedAt??S?.completedAt??(I?new Date().toISOString():void 0),completedAtEstimated:x.completedAt!==void 0?void 0:S?.completedAt!==void 0?S.completedAtEstimated:I?!0:void 0,outputPreview:_?.preview??S?.outputPreview,outputBytes:_?.bytes??S?.outputBytes}});e.tasksBySession={...e.tasksBySession,[h]:DS(v,A)}}function u(h){i!==null&&s===h||(c(),s=h,a(h),i=setInterval(()=>{typeof document<"u"&&document.visibilityState==="hidden"||(e.activeSessionId===h?a(h):c())},Lue))}function c(){i!==null&&(clearInterval(i),i=null),s=void 0,o.clear()}const d=G(0);let f=null;return qe(()=>t.value.some(h=>h.status==="running"),h=>{h&&f===null?f=setInterval(()=>{d.value=(d.value+1)%Number.MAX_SAFE_INTEGER},1e3):!h&&f!==null&&(clearInterval(f),f=null)},{immediate:!0}),qe(()=>{const h=e.activeSessionId;if(!h)return{sid:void 0,hasRunning:!1};const g=e.tasksBySession[h]??[];return{sid:h,hasRunning:g.some(m=>m.status==="running")}},({sid:h,hasRunning:g},m,y)=>{let A;g&&h!==void 0?u(h):h!==void 0?A=setTimeout(()=>{(e.tasksBySession[h]??[]).some(C=>C.status==="running")||c()},1500):c(),y(()=>{A!==void 0&&clearTimeout(A)})},{deep:!0,immediate:!0}),{taskClock:L(()=>d.value),loadTasksForSession:r}}function Due(e,t){const{api:n,pushOperationFailure:i,nextOptimisticMsgId:s,connectEventsIfNeeded:o,getEventConn:r,resolveThinkingForPrompt:l,refreshSessionStatus:a}=t,u=G({}),c=L(()=>{const q=e.activeSessionId;if(!q)return null;const j=u.value[q];return j?{parentId:q,agentId:j.agentId}:null}),d=L(()=>c.value?.parentId??null),f=L(()=>c.value!==null),h=L(()=>{const q=c.value;return q?!!e.sideChatSendingByAgent[q.agentId]:!1}),g=L(()=>{const q=c.value;return q?e.sideChatSendingByAgent[q.agentId]?!0:(e.tasksBySession[q.parentId]??[]).some(j=>j.id===q.agentId&&j.status==="running"):!1}),m=q=>n.getFileUrl(q),y=[],A=_D(),b=L(()=>{const q=c.value;return q?A({messages:e.sideChatMessagesByAgent[q.agentId]??[],approvals:y,getFileUrl:m,sessionActive:g.value}):[]});function C(q,j){e.sideChatMessagesByAgent[q]=j(e.sideChatMessagesByAgent[q]??[])}function v(q,j){C(q,W=>[...W,j])}function x(q,j){C(q,W=>{const z=W.find(H=>H.id===j);return z?.promptId!==void 0||z?.userMessageId!==void 0?W:W.filter(H=>H.id!==j)})}function S(q,j){const W=e.sideChatUserMessageIdsBySession[q]??[];W.includes(j)||(e.sideChatUserMessageIdsBySession={...e.sideChatUserMessageIdsBySession,[q]:[...W,j]})}function _(q,j,W,z){C(q,H=>{const ee=H.findIndex(Z=>Z.id===j);if(ee===-1)return H;const V=H.findIndex((Z,pe)=>pe!==ee&&Z.role==="user"&&(Z.id===z||Z.userMessageId===z||Z.promptId===W)),ie=H[ee],se=V===-1?ie:H[V];return H.flatMap((Z,pe)=>pe===V?[]:pe!==ee?[Z]:[{...se,id:ie.id,promptId:W,userMessageId:z,metadata:{...se.metadata,...ie.metadata}}])})}function I(q,j){S(j.sessionId,j.userMessageId??j.id),C(q,W=>{const z=W.findIndex(V=>V.role==="user"&&(V.userMessageId===(j.userMessageId??j.id)||V.promptId!==void 0&&V.promptId===j.promptId));if(z===-1)return[...W,j];const H=W[z],ee=[...W];return ee[z]={...j,id:H.id,promptId:j.promptId??H.promptId,userMessageId:j.userMessageId??j.id,metadata:{...j.metadata,...H.metadata}},ee})}function M(q,j,W){W&&C(q,z=>{const H=z.at(-1);if(H?.role==="assistant"){const ee=H.content[0],V=ee?.type==="text"?ee.text:"";return[...z.slice(0,-1),{...H,content:[{type:"text",text:`${V}${W}`}]}]}return[...z,{id:s(),sessionId:j,role:"assistant",content:[{type:"text",text:W}],createdAt:new Date().toISOString()}]})}function $(q,j,W){if(e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[q]:!1},!W)return;const H=(e.sideChatMessagesByAgent[q]??[]).at(-1);(H?.role==="assistant"&&H.content[0]?.type==="text"?H.content[0].text:"").trim().length>0||M(q,j,W)}async function D(q){const j=e.activeSessionId;return j?T(j,q):!1}async function T(q,j){if(!u.value[q]){let W;try{({agentId:W}=await n.startBtw(q))}catch(z){return i("openSideChat",z,{sessionId:q}),!1}e.sideChatMessagesByAgent={...e.sideChatMessagesByAgent,[W]:e.sideChatMessagesByAgent[W]??[]},u.value={...u.value,[q]:{agentId:W}},o(),r()?.markSideChannelAgent(q,W)}return j&&j.trim()?N(q,j.trim()):!0}async function N(q,j){const W=u.value[q],z=j.trim();if(!W||!z)return!1;const H=q,ee=W.agentId;e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[ee]:!0};const V=s(),ie={id:V,sessionId:H,role:"user",content:[{type:"text",text:z}],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};v(ee,ie);let se,Z=!1;try{const pe=e.sessions.find(X=>X.id===H),re=(pe?.model&&pe.model.length>0?pe.model:e.defaultModel)??void 0,fe=await l(H,re)??e.thinking;se=e.pendingThinkingBySession[H],Z=!0;const Ee=await n.submitPrompt(H,{content:[{type:"text",text:z}],agentId:ee,model:re,thinking:fe,permissionMode:e.permission,planMode:e.planModeBySession[H]??!1,swarmMode:e.swarmModeBySession[H]??!1});return fe!==void 0&&Xa(e,H,se),_(ee,V,Ee.promptId,Ee.userMessageId),S(H,Ee.userMessageId),!0}catch(pe){return Xa(e,H,se)&&a(H),i("sendSideChatPrompt",pe,{sessionId:H}),x(ee,V),e.sideChatSendingByAgent={...e.sideChatSendingByAgent,[ee]:!1},!(!Z||pe instanceof Wu)}}function O(){const q=e.activeSessionId;if(!q)return;const{[q]:j,...W}=u.value;u.value=W}async function P(q){const j=c.value;return j?N(j.parentId,q):!1}function R(q){if(!u.value[q])return;const{[q]:j,...W}=u.value;u.value=W}return{sideChatTargetBySession:u,sideChatSessionId:d,sideChatVisible:f,sideChatSending:h,sideChatRunning:g,sideChatTurns:b,appendSideChatAssistantText:M,finishSideChatAgent:$,reconcileSideChatUserMessage:I,openSideChat:D,openSideChatOn:T,closeSideChat:O,sendSideChatPrompt:P,clearSideChatForSession:R}}/*! + * pinia v4.0.3 + * (c) 2026 Eduardo San Martin Morote + * @license MIT + */let w$;const Vy=e=>w$=e,x$=Symbol();function RS(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}function $ue(){const e=r5(!0),t=e.run(()=>G({}));let n=[],i=[];const s=xt({install(o){Vy(s),s._a=o,o.provide(x$,s),o.config.globalProperties.$pinia=s,i.forEach(r=>n.push(r)),i=[]},use(o){return this._a?n.push(o):i.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const zb=()=>{};function OS(e,t,n,i=zb){e.add(t);const s=()=>{e.delete(t)&&i()};return!n&&M0()&&Xd(s),s}function Mf(e,...t){e.forEach(n=>{n(...t)})}const Bue=e=>e(),PS=Symbol(),t3=Symbol();function Rb(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,i)=>e.set(i,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!Object.hasOwn(t,n))continue;const i=t[n],s=e[n];RS(s)&&RS(i)&&Object.hasOwn(e,n)&&!Hi(i)&&!ga(i)?e[n]=Rb(s,i):e[n]=i}return e}const zue=Symbol();function Rue(e){return!e||typeof e!="object"||!Object.hasOwn(e,zue)}const{assign:Tu}=Object;function Oue(e){return!!(Hi(e)&&e.effect)}function Pue(e,t,n,i){const{state:s,actions:o,getters:r}=t,l=n.state.value[e];let a;function u(){l||(n.state.value[e]=s?s():{});const c=uW(n.state.value[e]);return Tu(c,o,Object.keys(r||{}).reduce((d,f)=>(d[f]=xt(L(()=>{Vy(n);const h=n._s.get(e);return r[f].call(h,h)})),d),{}))}return a=S$(e,u,t,n,i,!0),a}function S$(e,t,n={},i,s,o){let r;const l=Tu({actions:{}},n),a={deep:!0};let u,c,d=new Set,f=new Set,h;const g=i.state.value[e];!o&&!g&&(i.state.value[e]={});let m;function y(_){let I;u=c=!1,typeof _=="function"?(_(i.state.value[e]),I={type:"patch function",storeId:e,events:h}):(Rb(i.state.value[e],_),I={type:"patch object",payload:_,storeId:e,events:h});const M=m=Symbol();kt().then(()=>{m===M&&(u=!0)}),c=!0,Mf(d,I,i.state.value[e])}const A=o?function(){const{state:I}=n,M=I?I():{};this.$patch($=>{Tu($,M)})}:zb;function b(){r.stop(),d.clear(),f.clear(),i._s.delete(e)}const C=(_,I="")=>{if(PS in _)return _[t3]=I,_;const M=function(){Vy(i);const $=Array.from(arguments),D=new Set,T=new Set;function N(R){D.add(R)}function O(R){T.add(R)}Mf(f,{args:$,name:M[t3],store:x,after:N,onError:O});let P;try{P=_.apply(this&&this.$id===e?this:x,$)}catch(R){throw Mf(T,R),R}return P instanceof Promise?P.then(R=>(Mf(D,R),R)).catch(R=>(Mf(T,R),Promise.reject(R))):(Mf(D,P),P)};return M[PS]=!0,M[t3]=I,M},v={_p:i,$id:e,$onAction:OS.bind(null,f),$patch:y,$reset:A,$subscribe(_,I={}){if(d.has(_))return zb;const M=OS(d,_,I.detached,()=>$()),$=r.run(()=>qe(()=>i.state.value[e],D=>{(I.flush==="sync"?c:u)&&_({storeId:e,type:"direct",events:h},D)},Tu({},a,I)));return M},$dispose:b},x=Ss(v);i._s.set(e,x);const S=(i._a&&i._a.runWithContext||Bue)(()=>i._e.run(()=>(r=r5()).run(()=>t({action:C}))));for(const _ in S){const I=S[_];Hi(I)&&!Oue(I)||ga(I)?o||(g&&Rue(I)&&(Hi(I)?I.value=g[_]:((I instanceof Set||I instanceof Map)&&I.clear(),Rb(I,g[_]))),i.state.value[e][_]=I):typeof I=="function"&&(S[_]=C(I,_),l.actions[_]=I)}return Tu(x,S),Tu(Vn(x),S),Object.defineProperty(x,"$state",{get:()=>i.state.value[e],set:_=>{y(I=>{Tu(I,_)})}}),i._p.forEach(_=>{const I=r.run(()=>_({store:x,app:i._a,pinia:i,options:l}));Tu(x,I)}),g&&o&&n.hydrate&&n.hydrate(x.$state,g),u=!0,c=!0,x}/*! #__NO_SIDE_EFFECTS__ */function R0(e,t,n){let i;const s=typeof t=="function";i=s?n:t;function o(r,l){const a=AW();return r=r||(a?cn(x$,null):null),r&&Vy(r),r=w$,r._s.has(e)||(s?S$(e,t,i,r):Pue(e,i,r)),r._s.get(e)}return o.$id=e,o}const jue={api:()=>{throw new Error("[@moonshot-ai/app-client] client deps not installed — call setKimiClientDeps() at app bootstrap")},t:e=>e},Hl=globalThis.__kimiAppClientDeps??={current:jue};function Hue(e){Hl.current=e}const Wue=new Proxy({},{get(e,t){return Hl.current.api()[t]}});function Pt(){return Wue}function si(e,t){return Hl.current.t(e,t)}function que(e,t){Hl.current.traceClientEvent?.(e,t)}function dl(e,t){Hl.current.traceKeyEvent?.(e,t)}function Uue(){return Hl.current.sessionExportTraceToJsonl?.()??""}function jS(e){Hl.current.onSessionDestroyed?.(e)}function Kue(e,t,n){Hl.current.onWorkspaceDestroyed?.(e,t,n)}function Vue(e){return Hl.current.consumeSessionIntent?.(e)??e}function Zue(e){return Hl.current.onPluginsShelfEvent?(Hl.current.onPluginsShelfEvent(e),!0):!1}const qh=$ue(),_$=hn.starredModels;function Gue(){try{const e=To(_$);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t)&&t.every(n=>typeof n=="string"))return t}catch{}return[]}function Que(e){try{Js(_$,JSON.stringify(e))}catch{}}const Yue=R0("kimi.models",()=>{const e=G([]),t=G(Gue()),n=G([]),i=G({}),s=G({}),o=G({}),r=G({}),l=new Set,a=new Set,u=G(null);function c(b){e.value=b}function d(b){n.value=b}function f(b){u.value=b}function h(b,C){i.value={...i.value,[b]:C}}function g(b,C){s.value={...s.value,[b]:C}}function m(b){const C=new Set(t.value);C.has(b)?C.delete(b):C.add(b),t.value=Array.from(C),Que(t.value)}async function y(b){if(l.has(b))return;l.add(b);const C={...o.value};delete C[b],o.value=C;try{const v=await Pt().listSkills(b);h(b,v)}catch{}finally{l.delete(b),o.value={...o.value,[b]:!0}}}async function A(b){if(a.has(b))return;a.add(b);const C={...r.value};delete C[b],r.value=C;try{const v=await Pt().listSkillsForWorkspace(b);g(b,v)}catch{}finally{a.delete(b),r.value={...r.value,[b]:!0}}}return{models:e,starredModelIds:t,providers:n,draftModel:u,skillsBySession:i,skillsByWorkspace:s,skillsFetchedBySession:o,skillsFetchedByWorkspace:r,setModels:c,setProviders:d,setDraftModel:f,setSkillsForSession:h,setSkillsForWorkspace:g,toggleStarModel:m,loadSkillsForSession:y,loadSkillsForWorkspace:A}});function Ob(){return Yue(qh)}const HS=new Error("profile persist failed");function Jue(e,t){const{api:n,pushOperationFailure:i,refreshSessionStatus:s,persistSessionProfile:o,savePlanModeToStorage:r,activity:l,updateSession:a,updateSessionMessages:u,loadConfig:c,checkAuth:d,beginLocalTurn:f,settleLocalTurn:h}=t,g=Ob();function m(se){if(!(se==null||se.length===0))return g.models.find(Z=>Z.id===se)??g.models.find(Z=>Z.model===se)}function y(){const se=e.activeSessionId?e.sessions.find(pe=>pe.id===e.activeSessionId):void 0,Z=se===void 0?g.draftModel??e.defaultModel:se.model||e.defaultModel;return m(Z)?.id??Z??void 0}function A(se){if(se===void 0)return;const Z=m(se);return Z===void 0?void 0:i0(Z)}function b(se,Z){const pe=se==null?void 0:e.thinkingBySession[se];return pe!==void 0&&Loe(Z,pe)?pe:i0(Z)}function C(se,Z){if(Z===void 0)return;const pe=m(Z);return pe===void 0?void 0:b(se,pe)}async function v(se,Z){return se!=null&&e.thinkingBySession[se]===void 0&&await s(se),C(se,Z)}function x(se){e.thinking=se;const Z=e.activeSessionId;return se!==void 0&&Z!==null&&Z!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Z]:se},pb(e,Z)),se}qe([()=>e.activeSessionId,()=>y(),()=>{const se=e.activeSessionId;return se==null?void 0:e.thinkingBySession[se]}],()=>{const se=m(y());se!==void 0&&(e.thinking=b(e.activeSessionId,se))});function S(se){n.setConfig({thinking:Noe(se,m(y())?.supportEfforts)}).catch(Z=>i("setConfig",Z))}async function _(){try{g.setModels(await n.listModels());const se=m(y());se!==void 0&&(e.thinking=b(e.activeSessionId,se))}catch(se){i("loadModels",se)}}async function I(){try{g.setProviders(await n.listProviders())}catch(se){i("loadProviders",se)}}async function M(se){const Z=e.activeSessionId,pe=m(se),re=e.thinking,fe=Z?e.sessions.find(Y=>Y.id===Z)?.model:void 0,Ee=y()!==(pe?.id??se),X=Foe(pe,re,Ee);if(!Z)return g.setDraftModel(se),e.thinking=X,X!==re&&X!==void 0&&S(X),!0;a(Z,Y=>({...Y,model:se}));let we;X!==re&&(e.thinking=X,X!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Z]:X},we=pb(e,Z)));try{await n.updateSession(Z,{model:se,thinking:X!==re?X:void 0})}catch(Y){return a(Z,le=>({...le,model:fe??le.model})),X!==re&&(e.thinking=re,re!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Z]:re}),Xa(e,Z,we)&&s(Z)),i("setModel",Y,{sessionId:Z}),!1}return X!==re&&X!==void 0&&S(X),Xa(e,Z,we),await s(Z),!0}async function $(se,Z,pe,re,fe){const Ee=re??e.activeSessionId;if(!Ee)return!1;const X=l.value==="idle"&&!e.inFlightBySession[Ee],we=`msg_skill_opt_${Date.now().toString(36)}`,Y=X?f(Ee):void 0;let le=!1;if(X){e.inFlightBySession={...e.inFlightBySession,[Ee]:!0};const Ce={id:we,sessionId:Ee,role:"user",content:[{type:"text",text:`/${se}${Z?` ${Z}`:""}`},...rv(pe)],createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0,origin:{kind:"skill_activation",trigger:"user-slash",skillName:se,skillArgs:Z}}};u(Ee,ae=>[...ae,Ce])}try{if(fe?.skipThinkingPersist!==!0){const Ce=e.sessions.find(ne=>ne.id===Ee)?.model,ae=(Ce&&Ce.length>0?Ce:e.defaultModel)??void 0,oe=e.planArmedBySession[Ee]??!1;if(!await o({thinking:await v(Ee,ae)??e.thinking,swarmMode:e.swarmModeBySession?.[Ee]??!1,permissionMode:e.permission,...oe?{planMode:!0}:{}},Ee))throw HS;oe&&(e.planArmedBySession={...e.planArmedBySession,[Ee]:!1},r(),e.planModeBySession={...e.planModeBySession,[Ee]:!0})}return le=!0,await n.activateSkill(Ee,se,Z,rv(pe)),!0}catch(Ce){return X&&(e.inFlightBySession={...e.inFlightBySession,[Ee]:!1},u(Ee,ae=>ae.filter(oe=>oe.id!==we))),Ce!==HS&&i("activateSkill",Ce,{sessionId:Ee}),!(!le||Ce instanceof Wu)}finally{Y!==void 0&&h(Ee,Y)}}async function D(se){return n.getProvider(se)}async function T(se){try{return await n.addProvider(se),await Promise.all([I(),_(),c()]),await d(),null}catch(Z){return Ua("[kimi-code] operation failed: addProvider",Z),Z instanceof Error?Z.message:String(Z)}}async function N(se,Z){try{return await n.updateProvider(se,Z),await Promise.all([I(),_(),c()]),null}catch(pe){return Ua("[kimi-code] operation failed: updateProvider",pe),pe instanceof Error?pe.message:String(pe)}}async function O(se){try{const Z=await n.deleteProvider(se);return await Promise.all([I(),_(),c()]),await d(),Z}catch(Z){return i("deleteProvider",Z),null}}async function P(se){try{const Z=await n.refreshProvider(se);for(const pe of Z.failed)i("refreshProvider",new Error(pe.reason),{message:pe.provider});await Promise.all([I(),_(),c()])}catch(Z){i("refreshProvider",Z)}}async function R(){try{const se=await n.refreshAllProviders();for(const Z of se.failed)i("refreshAllProviders",new Error(Z.reason),{message:Z.provider});await Promise.all([I(),_(),c()])}catch(se){i("refreshAllProviders",se)}}async function q(){try{return{kind:"ok",items:await n.listCatalogProviders()}}catch(se){return se instanceof Wu&&se.code===void 0?{kind:"unsupported"}:(Ua("[kimi-code] operation failed: loadCatalogProviders",se),{kind:"error"})}}async function j(se){try{return await n.importCatalogProvider(se),await Promise.all([I(),_(),c()]),await d(),null}catch(Z){return Ua("[kimi-code] operation failed: importCatalogProvider",Z),Z instanceof Error?Z.message:String(Z)}}async function W(se){try{const Z=await n.importCustomRegistry(se);return await Promise.all([I(),_(),c()]),await d(),Z}catch(Z){return Ua("[kimi-code] operation failed: importCustomRegistry",Z),Z instanceof Error?Z.message:String(Z)}}async function z(){try{return await n.startOAuthLogin()}catch{return null}}async function H(){try{return await n.pollOAuthLogin()}catch(se){return ya("[kimi-code] pollOAuthLogin failed",se),null}}async function ee(){try{await n.cancelOAuthLogin()}catch{}}async function V(){try{return await n.getUsage()}catch(se){return{kind:"error",message:se instanceof Error?se.message:String(se)}}}function ie(se){const Z=x(se);o({thinking:Z}),Z!==void 0&&S(Z)}return{models:L(()=>g.models),starredModelIds:L(()=>g.starredModelIds),providers:L(()=>g.providers),draftModel:L(()=>g.draftModel),skillsBySession:L(()=>g.skillsBySession),skillsByWorkspace:L(()=>g.skillsByWorkspace),skillsFetchedBySession:L(()=>g.skillsFetchedBySession),skillsFetchedByWorkspace:L(()=>g.skillsFetchedByWorkspace),loadSkillsForSession:g.loadSkillsForSession,loadSkillsForWorkspace:g.loadSkillsForWorkspace,loadModels:_,loadProviders:I,setModel:M,thinkingLevelForModelId:A,thinkingLevelForSessionId:C,resolveThinkingForPrompt:v,toggleStarModel:g.toggleStarModel,activateSkill:$,addProvider:T,updateProvider:N,deleteProvider:O,getProvider:D,loadCatalogProviders:q,importCatalogProvider:j,importCustomRegistry:W,refreshProvider:P,refreshAllProviders:R,startOAuthLogin:z,pollOAuthLogin:H,cancelOAuthLogin:ee,getUsage:V,setThinking:ie}}const Fl=G(null),fh=G(!1),Xue=L(()=>Fl.value!==null);function f6(e){const t=Fl.value;!t||fh.value||(Fl.value=null,t.resolve(e))}async function ece(){const e=Fl.value;if(!(!e||fh.value)){if(!e.action){f6(!0);return}fh.value=!0;try{await e.action(),Fl.value===e&&(Fl.value=null),e.resolve(!0)}catch(t){Fl.value===e&&(Fl.value=null),e.reject(t)}finally{fh.value=!1}}}function tce(e){return fh.value?Promise.resolve(!1):(Fl.value&&f6(!1),new Promise((t,n)=>{Fl.value={...e,resolve:t,reject:n}}))}function Ic(){return{current:Fl,busy:fh,isConfirmOpen:Xue,confirm:tce,settle:f6,runAction:ece}}const nce=R0("kimi.approvals",()=>{const e=G({}),t=G({});function n(c){vr(e.value,c)}function i(c){vr(t.value,c)}function s(c,d){e.value[c]=d}function o(c,d){t.value[c]=d}function r(c,d){const f=e.value[c]??[];e.value[c]=f.filter(h=>h.approvalId!==d)}function l(c,d){const f=t.value[c]??[];t.value[c]=f.filter(h=>h.questionId!==d)}function a(c){delete e.value[c]}function u(c){delete t.value[c]}return{approvalsBySession:e,questionsBySession:t,applyApprovalsDiff:n,applyQuestionsDiff:i,setSessionApprovals:s,setSessionQuestions:o,removePendingApproval:r,removePendingQuestion:l,clearSessionApprovals:a,clearSessionQuestions:u}});function xo(){return nce(qh)}const ice=R0("kimi.sessions",()=>{const e=G([]),t=G(void 0),n=G(k$());function i(h){e.value=h}function s(h,g){e.value=e.value.map(m=>m.id===h?g(m):m)}function o(h){e.value=JD(e.value,h)}function r(h){e.value=[...e.value,h]}function l(h){e.value=e.value.filter(g=>g.id!==h)}function a(h){t.value=h}function u(h){const g=Zoe(n.value,h);g!==n.value&&(n.value=g,J4(g))}function c(h){const g=Goe(n.value,h);g!==n.value&&(n.value=g,J4(g))}function d(h){const g=new Set(h),m=n.value.filter(y=>!g.has(y));m.length!==n.value.length&&(n.value=m,J4(m))}function f(h){n.value.includes(h)?c(h):u(h)}return{sessions:e,activeSessionId:t,pinnedSessionIds:n,setSessions:i,updateSession:s,upsertSessionSorted:o,appendSession:r,removeSession:l,setActiveSessionId:a,pinSession:u,unpinSession:c,unpinSessions:d,togglePinSession:f}});function Wo(){return ice(qh)}const sce=40409;function oce(e){return!e||e.state!=="open"&&e.state!=="closed"&&e.state!=="merged"?null:{number:e.number,state:e.state,url:e.url}}function rce(e,t){return e==null||t==null?e==null&&t==null:e.number===t.number&&e.state===t.state&&e.url===t.url}const lce=R0("kimi.files",()=>{const e=G(null),t=G([]),n=G(!1),i=G(null),s=G(!1),o=G({});async function r(d){const f=Wo().activeSessionId;if(!f)return null;try{const g=await Pt().readFile(f,{path:d});return{path:g.path,content:g.content,encoding:g.encoding,mime:g.mime,languageId:g.languageId,isBinary:g.isBinary,size:g.size,lineCount:g.lineCount}}catch(h){if(ya("[kimi-code] readFileContent failed for",d,h),zs(h)&&h.code===sce)throw h;return null}}async function l(d){const f=Wo().activeSessionId;if(f){e.value=d,t.value=[],i.value=null,s.value=!1,n.value=!0;try{const g=await Pt().getFileDiff(f,d);if(e.value!==d||Wo().activeSessionId!==f)return;const m=Dse(g.diff);if(t.value=m,m.length===0){const A=await r(d).catch(()=>null);if(e.value!==d||Wo().activeSessionId!==f)return;s.value=A!==null&&A.size===0;return}n.value=!1;const y=await Cse(m,{truncated:g.truncated,readNewText:async()=>{const A=await r(d).catch(()=>null);return!A||A.isBinary||A.encoding!=="utf-8"?null:A.content}});if(e.value!==d||Wo().activeSessionId!==f)return;i.value=y}catch(h){e.value===d&&(t.value=[]),ya("[loadFileDiff] diff unavailable for",d,h)}finally{e.value===d&&(n.value=!1)}}}function a(){e.value=null,t.value=[],i.value=null,s.value=!1,n.value=!1}async function u(d){try{const h=await Pt().getGitStatus(d);o.value[d]=h;const g=oce(h.pullRequest);Wo().updateSession(d,m=>rce(m.pullRequest,g)?m:{...m,pullRequest:g})}catch{}}function c(d){delete o.value[d]}return{selectedDiffPath:e,fileDiffLines:t,fileDiffLoading:n,fileDiffTexts:i,fileDiffEmptyFile:s,gitStatusBySession:o,readFileContent:r,loadFileDiff:l,clearFileDiff:a,loadGitStatus:u,clearSessionGitStatus:c}});function Ao(){return lce(qh)}const ace=50,e2=5,h6=5,qu=50,uce=40401,cce=40402,dce=40410,WS=40409,fce=40902,hce=2e3,pce=10;function n3(e){return zs(e)&&e.code===fce}const gce=40904;function mce(e){return zs(e)&&e.code===gce}const Jc=Ss({}),am=Ss({}),i3=Ss({}),na=Ss(new Set),Zy=new Map,Wd=new Map,lv=new Map;let vce=0;const ad=new Map,yce=3,kce=3,t2=new Map;function bce(e){const t=t2.get(e);if(!(t!==void 0&&(t.done||t.attempts>=kce))){t2.set(e,{attempts:(t?.attempts??0)+1,done:!1});try{Pt().generateSessionTitle(e,{source:"first_turn"}).then(n=>{n!==null&&t2.set(e,{attempts:0,done:!0})}).catch(()=>{})}catch{}}}let qS=0;function Ace(){return qS+=1,`${Date.now().toString(36)}-${qS}`}function Cce(e){return{generation:Zy.get(e)??0,pending:(Wd.get(e)?.size??0)>0}}function Pb(e){const t=++vce;Zy.set(e,t);const n=Wd.get(e)??new Set;return n.add(t),Wd.set(e,n),t}function jb(e,t){const n=Wd.get(e);if(n===void 0||(n.delete(t),n.size>0))return;Wd.delete(e);const i=lv.get(e);lv.delete(e),i?.()}function wce(e){Zy.delete(e),Wd.delete(e),lv.delete(e),ad.delete(e)}function xce(e,t){return!t.pending&&t.generation===(Zy.get(e)??0)}function Sce(e,t){if((Wd.get(e)?.size??0)===0){t();return}lv.set(e,t)}function _ce(e,t){const{confirm:n}=Ic(),{taskPoller:i,sideChat:s,modelProvider:o,pushOperationFailure:r,notify:l,activity:a,sessionsKnownEmpty:u,setSessions:c,updateSession:d,upsertSessionSorted:f,appendSession:h,forgetSession:g,unpinSessions:m,setActiveSessionId:y,updateSessionMessages:A,nextOptimisticMsgId:b,getEventConn:C,syncSessionFromSnapshot:v,reopenSession:x,hasLoadedMessages:S,refreshSessionStatus:_,refreshSessionGoal:I,refillSessionGoalOnReload:M,refreshSessionPlans:$,settlePlanReviewLocally:D,persistSessionProfile:T,mergedWorkspaces:N,workspacesView:O,status:P,workspaceIdForSession:R,savePermissionToStorage:q,savePlanModeToStorage:j,saveSwarmModeToStorage:W,saveGoalModeToStorage:z,draftModes:H,saveUnread:ee,saveActiveWorkspaceToStorage:V,saveHiddenWorkspacesToStorage:ie,goalErrorMessage:se,initialized:Z,connectIssue:pe}=t;let re=0,fe=!1;function Ee(U,me,ke,ze){A(U,Ye=>{const Ve=Ye.findIndex(Gt=>Gt.id===me);if(Ve===-1)return Ye;const wt=Ye.findIndex((Gt,Cn)=>Cn!==Ve&&Gt.role==="user"&&(Gt.id===ze||Gt.userMessageId===ze||Gt.promptId===ke)),pt=Ye[Ve],Ht=wt===-1?pt:Ye[wt];return Ye.flatMap((Gt,Cn)=>Cn===wt?[]:Cn!==Ve?[Gt]:[{...Ht,id:pt.id,promptId:ke,userMessageId:ze,metadata:{...Ht.metadata,...pt.metadata}}])})}async function X(U){if(e.messagesLoadingMoreBySession[U])return;const me=e.messagesBySession[U];if(!me||me.length===0)return;const ke=me[0].id;e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[U]:!0},e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[U]:!1};try{const ze=await Pt().listMessages(U,{beforeId:ke,pageSize:ace}),Ye=[...ze.items].reverse();A(U,Ve=>[...Ye,...Ve]),e.messagesHasMoreBySession={...e.messagesHasMoreBySession,[U]:ze.hasMore}}catch(ze){e.messagesLoadMoreErrorBySession={...e.messagesLoadMoreErrorBySession,[U]:!0},r("loadOlderMessages",ze,{sessionId:U})}finally{e.messagesLoadingMoreBySession={...e.messagesLoadingMoreBySession,[U]:!1}}}function we(U,me){i.loadTasksForSession(U),Ao().loadGitStatus(U),me?.skipStatus!==!0&&_(U),I(U),$(U),Object.prototype.hasOwnProperty.call(o.skillsBySession.value,U)||o.loadSkillsForSession(U)}let Y=0;async function le(U){try{const me=await Pt().getUserInfo();if(U!==Y||e.managedProviderStatus!=="authenticated")return;e.managedUserInfo=me.kind==="ok"?me.userInfo:null,me.kind==="ok"?e.managedMembership=me.userInfo.userLevel===pce?"free":"member":e.managedMembership=me.status===402?"free":null}catch{if(U!==Y)return;e.managedProviderStatus==="authenticated"&&(e.managedUserInfo=null,e.managedMembership=null)}}async function Ce(){e.managedProviderStatus==="authenticated"&&await le(++Y)}async function ae(){const U=++Y;try{const ke=await Pt().getAuth();return e.authReady=ke.ready,e.defaultModel=ke.defaultModel,e.managedProviderStatus=ke.managedProvider?.status??null,e.managedProviderStatus==="authenticated"?le(U):(e.managedUserInfo=null,e.managedMembership=null),pe.value=null,"proceed"}catch(me){return zs(me)&&(me.code===401||me.code===vF)?(pe.value=null,"server-auth-required"):(pe.value=(me instanceof Error?me.message:String(me)).slice(0,140),"retry")}}async function oe(){let U=!0;for(;;){const me=await ae();if(me!=="retry")return me;U&&(pe.value=null,U=!1),await new Promise(ke=>{setTimeout(ke,hce)})}}async function Q(){try{const U=Pt();e.config=await U.getConfig()}catch{}}async function ne(U){try{const ke=await Pt().setConfig(U);return e.config=ke,e.defaultModel=ke.defaultModel??null,!0}catch(me){return r("setConfig",me),!1}}const ge=100,Ae=720*60*1e3;async function _e(U){const me=Pt(),ke=[];let ze,Ye;for(;U?.shouldContinue?.()!==!1;){let Ve;try{Ve=await me.listSessions({pageSize:ge,beforeId:ze,excludeEmpty:!0})}catch(wt){if(ke.length===0)throw wt;Ye=wt;break}if(ke.push(...Ve.items),!Ve.hasMore||Ve.items.length===0)break;ze=Ve.items[Ve.items.length-1].id}return{sessions:ke,error:Ye}}function Ke(U){const me=new Map(e.sessions.map(ke=>[ke.id,ke]));c(U.map(ke=>{const ze=me.get(ke.id);if(ze===void 0)return ke;const Ye=Z2(ke.usage)&&!Z2(ze.usage),Ve=ke.pullRequest??ze.pullRequest;return!Ye&&Ve===ke.pullRequest?ke:{...ke,usage:Ye?ze.usage:ke.usage,pullRequest:Ve}}))}function xe(U){const me=[...U],ke=new Set(me.map(ze=>ze.id));for(const ze of e.sessions)ke.has(ze.id)||(me.push(ze),ke.add(ze.id));return me.sort((ze,Ye)=>new Date(Ye.updatedAt).getTime()-new Date(ze.updatedAt).getTime()),me}async function Ne(U){const me=Pt(),ke=[],ze=Date.now(),Ye=Gt=>ze-new Date(Gt.updatedAt).getTime();let Ve,wt=!1,pt=!0,Ht;for(;;){let Gt;try{Gt=await me.listSessions({workspaceId:U,pageSize:e2,beforeId:Ve,excludeEmpty:!0})}catch(jt){if(pt)throw jt;Ht=jt,wt=!0;break}if(wt=Gt.hasMore,Gt.items.length===0)break;const Cn=Gt.items[Gt.items.length-1],Qn=Ye(Cn)>=Ae;if(!pt&&Qn){const jt=Gt.items.findIndex(Bn=>Ye(Bn)>=Ae),Rt=jt>=0?jt+1:Gt.items.length;ke.push(...Gt.items.slice(0,Rt)),wt=Gt.hasMore||Rt<Gt.items.length;break}if(ke.push(...Gt.items),pt=!1,!Gt.hasMore||Qn)break;Ve=Cn.id}return{workspaceId:U,page:{items:ke,hasMore:wt},error:Ht}}async function et(){const U=e.workspaces;if(U.length===0){const jt=await _e(),Rt=jt.error===void 0?jt.sessions:xe(jt.sessions);return e.sessionsHasMoreByWorkspace={},e.sessionsCursorByWorkspace={},e.sessionsInitialCountByWorkspace={},e.sessionsFullyLoaded=jt.error===void 0,jt.error!==void 0&&r("load",jt.error),Rt}const me=await Promise.allSettled(U.map(jt=>Ne(jt.id))),ke=[],ze=new Set,Ye=new Map,Ve=new Set;let wt;for(let jt=0;jt<me.length;jt++){const Rt=me[jt];if(Rt.status==="fulfilled"){Ye.set(Rt.value.workspaceId,Rt.value.page),Rt.value.error!==void 0&&(Ve.size===0&&(wt=Rt.value.error),Ve.add(Rt.value.workspaceId));for(const Bn of Rt.value.page.items)ze.has(Bn.id)||(ke.push(Bn),ze.add(Bn.id));continue}Ve.size===0&&(wt=Rt.reason),Ve.add(U[jt].id)}if(Ye.size===0){r("load",wt);return}const pt=new Set(U.filter(jt=>Ve.has(jt.id)).map(jt=>jt.root)),Ht=new Set(U.map(jt=>jt.id));for(const jt of e.sessions)!(jt.workspaceId!==void 0&&Ht.has(jt.workspaceId)?Ve.has(jt.workspaceId):pt.has(jt.cwd)||Ve.has(R(jt)))||ze.has(jt.id)||(ke.push(jt),ze.add(jt.id));const Gt={},Cn={},Qn={};for(const{id:jt}of U){const Rt=Ye.get(jt);if(Rt===void 0){const Bn=e.sessionsHasMoreByWorkspace[jt],ei=e.sessionsCursorByWorkspace[jt],ji=e.sessionsInitialCountByWorkspace[jt];Bn!==void 0&&(Gt[jt]=Bn),ei!==void 0&&(Cn[jt]=ei),ji!==void 0&&(Qn[jt]=ji);continue}Gt[jt]=Rt.hasMore,Cn[jt]=Rt.items.length>0?Rt.items[Rt.items.length-1].id:void 0,Qn[jt]=Math.max(Rt.items.length,e2)}return e.sessionsHasMoreByWorkspace=Gt,e.sessionsCursorByWorkspace=Cn,e.sessionsInitialCountByWorkspace=Qn,e.sessionsFullyLoaded=!1,ke.sort((jt,Rt)=>new Date(Rt.updatedAt).getTime()-new Date(jt.updatedAt).getTime()),Ve.size>0&&r("load",wt),ke}async function ut(U){if(!e.sessionsLoadingMoreByWorkspace[U]&&e.sessionsHasMoreByWorkspace[U]!==!1&&e.sessionsCursorByWorkspace[U]!==void 0){e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[U]:!0};try{let me=e.sessionsCursorByWorkspace[U],ke;for(let Ve=0;Ve<3&&me!==void 0&&(ke=await Pt().listSessions({workspaceId:U,pageSize:h6,beforeId:me,excludeEmpty:!0}),e.sessionsCursorByWorkspace[U]!==me);Ve+=1)ke=void 0,me=e.sessionsCursorByWorkspace[U];if(ke===void 0)return;const ze=new Set(e.sessions.map(Ve=>Ve.id)),Ye=ke.items.filter(Ve=>!ze.has(Ve.id));Ye.length>0&&c([...e.sessions,...Ye]),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[U]:ke.items.length>0?ke.items[ke.items.length-1].id:me},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[U]:ke.hasMore}}catch(me){r("loadMoreSessions",me)}finally{e.sessionsLoadingMoreByWorkspace={...e.sessionsLoadingMoreByWorkspace,[U]:!1}}}}function yt(U){return e.sessions.filter(me=>!me.parentSessionId&&R(me)===U)}const Mt=5;function Ze(U,me){const ke=new Set(e.sessions.map(Ve=>Ve.id)),ze=U.items.filter(Ve=>!ke.has(Ve.id)&&(Ve.meta.last_prompt??"").length>0).map(B4);ze.length>0&&c([...e.sessions,...ze]);for(const Ve of U.items)if(ke.has(Ve.id)&&Ve.git!==void 0){const wt=Ve.git.pull_request;d(Ve.id,pt=>pt.pullRequest===wt?pt:{...pt,pullRequest:wt})}if(U.items.length>0){const Ve=Math.min(...U.items.map(wt=>wt.meta.updated_at));e.flatSessionsFrontier=me?.resetFrontier===!0||e.flatSessionsFrontier===null?Ve:Math.min(e.flatSessionsFrontier,Ve)}e.flatSessionsNextPageToken=U.nextPageToken,e.flatSessionsHasMore=U.hasMore;const Ye=new Set(O.value.map(Ve=>Ve.id));return U.items.filter(Ve=>(Ve.meta.last_prompt??"").length>0&&Ye.has(R({workspaceId:Ve.workspace.id,cwd:Ve.workspace.cwd??""}))).length}async function Ge(){const U=await Pt().listSessionsV2({pageSize:qu,include:"git"});Ze(U,{resetFrontier:!0}),e.flatSessionsSeeded=!0}async function lt(){if(!(e.flatSessionsSeeded||e.flatSessionsLoading)){e.flatSessionsLoading=!0;try{await Ge()}catch(U){r("ensureFlatSessions",U)}finally{e.flatSessionsLoading=!1}}}async function tt(){if(!(e.flatSessionsLoading||e.flatSessionsLoadingMore)&&e.flatSessionsHasMore){e.flatSessionsLoadingMore=!0;try{if(!e.flatSessionsSeeded){await Ge();return}if(e.flatSessionsNextPageToken===null)return;for(let U=0;U<Mt;U+=1){const me=e.flatSessionsNextPageToken;if(me===null||!e.flatSessionsHasMore)break;let ke;try{ke=await Pt().listSessionsV2({pageSize:qu,pageToken:me,include:"git"})}catch(ze){if(!Bw(ze))throw ze;e.flatSessionsNextPageToken=null,await Ge();break}if(Ze(ke)>0)break}}catch(U){r("loadMoreFlatSessions",U)}finally{e.flatSessionsLoadingMore=!1}}}async function It(){const U=await Pt().listSessionsV2({pageSize:qu,include:"git",archived:!0}),me=new Set;e.doneSessions=U.items.filter(ke=>(ke.meta.last_prompt??"").length>0).filter(ke=>me.has(ke.id)?!1:(me.add(ke.id),!0)).map(B4),e.doneSessionsNextPageToken=U.nextPageToken,e.doneSessionsHasMore=U.hasMore}async function Ut(){if(!(e.doneSessionsSeeded||e.doneSessionsLoading)){e.doneSessionsLoading=!0;try{await It(),e.doneSessionsSeeded=!0}catch(U){r("ensureDoneSessions",U)}finally{e.doneSessionsLoading=!1}}}async function fn(){if(!(e.doneSessionsLoading||e.doneSessionsLoadingMore)&&e.doneSessionsHasMore){e.doneSessionsLoadingMore=!0;try{if(!e.doneSessionsSeeded){await It(),e.doneSessionsSeeded=!0;return}let U=3;for(;;){const me=e.doneSessionsNextPageToken;if(me===null)return;let ke;try{ke=await Pt().listSessionsV2({pageSize:qu,pageToken:me,include:"git",archived:!0})}catch(Ve){if(!Bw(Ve))throw Ve;e.doneSessionsNextPageToken=null,await It();return}const ze=new Set(e.doneSessions.map(Ve=>Ve.id)),Ye=ke.items.filter(Ve=>!ze.has(Ve.id)&&(Ve.meta.last_prompt??"").length>0).map(B4);if(Ye.length>0&&(e.doneSessions=[...e.doneSessions,...Ye]),e.doneSessionsNextPageToken=ke.nextPageToken,e.doneSessionsHasMore=ke.hasMore,U-=1,Ye.length>0||!ke.hasMore||U<=0)return}}catch(U){r("loadMoreDoneSessions",U)}finally{e.doneSessionsLoadingMore=!1}}}async function Nn(U,me,ke,ze){if(e.sessionsCursorByWorkspace[U]===me){const Ve=new Date(ke).getTime();let wt;for(const pt of e.sessions){if(R(pt)!==U)continue;const Ht=new Date(pt.updatedAt).getTime();Ht<=Ve||(wt===void 0||Ht<new Date(wt.updatedAt).getTime())&&(wt=pt)}e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[U]:wt?.id}}let Ye=3;for(;Ye>0&&yt(U).length<ze&&(e.sessionsHasMoreByWorkspace[U]??!1);){const Ve=e.sessionsCursorByWorkspace[U],wt=yt(U).length;if(Ve===void 0)try{const pt=await Pt().listSessions({workspaceId:U,pageSize:e2,excludeEmpty:!0}),Ht=new Set(e.sessions.map(Cn=>Cn.id)),Gt=pt.items.filter(Cn=>!Ht.has(Cn.id));Gt.length>0&&c([...e.sessions,...Gt].sort((Cn,Qn)=>new Date(Qn.updatedAt).getTime()-new Date(Cn.updatedAt).getTime())),e.sessionsCursorByWorkspace={...e.sessionsCursorByWorkspace,[U]:pt.items.length>0?pt.items[pt.items.length-1].id:void 0},e.sessionsHasMoreByWorkspace={...e.sessionsHasMoreByWorkspace,[U]:pt.hasMore}}catch(pt){r("loadMoreSessions",pt);break}else await ut(U);if(Ye-=1,yt(U).length===wt&&e.sessionsCursorByWorkspace[U]===Ve)break}}async function Qt(){if(e.sessionsFullyLoaded)return;const U=await _e().catch(ze=>(ya("[kimi-code] loadAllSessions failed; search covers only loaded sessions",ze),null));if(U===null)return;const me=U.error===void 0?U.sessions:xe(U.sessions);if(Ke(me),e.sessionsFullyLoaded=U.error===void 0,U.error!==void 0)return;const ke={};for(const ze of e.workspaces)ke[ze.id]=!1;e.sessionsHasMoreByWorkspace=ke}async function un(){const U=await Pt().getMeta().catch(()=>null);U!==null&&(e.serverVersion=U.serverVersion,e.availableOpenInApps=U.openInApps,e.dangerousBypassAuth=U.dangerousBypassAuth,e.experimentalFlags=U.experimentalFlags,e.backend=U.backend,e.webTitle=U.webTitle)}async function Dn(){const U=Date.now();let me="accepted";dl("app:load:start"),e.loading=!0;const ke=!Z.value;let ze=!0;try{if(ke&&await oe()==="server-auth-required"){ze=!1,me="auth-required";return}const Ye=Pt();await Promise.all([Ye.getHealth().catch(()=>null),un(),o.loadModels()]),ke||await ae(),await Q(),await pn();const Ve=await et(),wt=Ve??e.sessions;if(Ve!==void 0&&Ke(Ve),!ke&&Ve!==void 0&&e.flatSessionsSeeded){e.flatSessionsSeeded=!1,e.flatSessionsNextPageToken=null,e.flatSessionsHasMore=!0,e.flatSessionsFrontier=null;try{await Ge()}catch(Rt){r("ensureFlatSessions",Rt)}}const pt=k$().filter(Rt=>!e.sessions.some(Bn=>Bn.id===Rt));if(pt.length>0){const Rt=await Promise.all(pt.map(ei=>co(ei))),Bn=pt.filter((ei,ji)=>Rt[ji]==="stale");Bn.length>0&&m(Bn)}for(const Rt of e.sessions)(Rt.mainTurnActive??Rt.busy)&&e.goalBySession[Rt.id]===void 0&&M(Rt.id);const Ht=wt[0],Gt=e.activeWorkspaceId;!(Gt!==null&&N.value.some(Rt=>Rt.id===Gt))&&Ht&&bn(R(Ht)),fo();const Qn=typeof window<"u"&&nS(window.location);Qn&&(e.mainView="sessionAdmin");const jt=typeof window<"u"?iS(window.location):void 0;!e.activeSessionId&&jt!==void 0&&(e.sessions.some(Bn=>Bn.id===jt)||await Oi(jt))&&await Pi(jt,{urlMode:"replace",skipTrack:!0}),!e.activeSessionId&&wt.length>0&&await Pi(wt[0].id,{urlMode:Qn?"none":"replace",skipTrack:!0})}catch(Ye){me="failed",r("load",Ye)}finally{e.loading=!1,ze&&(Z.value=!0),dl("app:load:complete",{status:me,sessionId:e.activeSessionId,sessionCount:e.sessions.length,workspaceCount:e.workspaces.length,durationMs:Date.now()-U})}}async function pn(){try{const U=Pt(),[me,ke]=await Promise.all([U.listWorkspaces().catch(()=>[]),U.getFsHome().catch(()=>({home:"",recentRoots:[]}))]);e.workspaces=wn(me),e.fsHome=ke.home||null,e.recentRoots=ke.recentRoots}catch{}}function wn(U){const me=lm();return Object.keys(me).length===0?U:U.map(ke=>{const ze=me[ke.root];return ze!==void 0?{...ke,name:ze}:ke})}function bn(U){e.activeWorkspaceId=U,V(U)}function Xn(U){e.mainView="chat",bn(U);const me=e.sessions.filter(ke=>R(ke)===U);if(me.length>0){const ke=me[0];ke&&ke.id!==e.activeSessionId&&Pi(ke.id,{skipTrack:!0})}else y(void 0),Pn(void 0,"push")}function Ue(U){const me=lm()[U.root],ke=me!==void 0?{...U,name:me}:U,ze=Ml(ke.root);e.hiddenWorkspaceRoots.some(wt=>Ml(wt)===ze)&&(e.hiddenWorkspaceRoots=e.hiddenWorkspaceRoots.filter(wt=>Ml(wt)!==ze),ie(e.hiddenWorkspaceRoots));const Ye=e.workspaces.findIndex(wt=>wt.id===ke.id||wt.root===ke.root);if(Ye===-1){e.workspaces=[ke,...e.workspaces];return}const Ve=[...e.workspaces];Ve[Ye]=ke,e.workspaces=Ve}function st(U){if(U.type==="workspaceCreated"||U.type==="workspaceUpdated"){Ue(U.workspace);return}const me=e.workspaces.find(ze=>ze.id===U.workspaceId)?.root??U.root;if(me&&!e.hiddenWorkspaceRoots.includes(me)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,me],ie(e.hiddenWorkspaceRoots)),e.workspaces=e.workspaces.filter(ze=>ze.id!==U.workspaceId&&ze.root!==me),e.activeWorkspaceId===U.workspaceId||e.activeWorkspaceId===me){const ze=O.value[0]?.id??null;if(e.activeWorkspaceId=ze,ze)V(ze);else try{Tr(hn.activeWorkspace)}catch{}y(void 0),e.sessionLoading=!1,Ao().clearFileDiff(),Pn(void 0,"replace")}}function ct(){y(void 0),e.mainView="chat",Pn(void 0,"push")}function ot(U,me){me?.entry!==void 0&&(e.draftEntry=me.entry),bn(U),ct(),Ao().clearFileDiff()}async function sn(U){const me=N.value.find(Cn=>Cn.id===U);if(!me)return null;Vue("sidebar");const ke=e.thinking,ze=Pt();let Ye,Ve=me.root;try{const Cn=await ze.addWorkspace({root:me.root});Ye=Cn.id,Ve=Cn.root,Ue(Cn)}catch{}const wt=Ob().draftModel??void 0,pt=await ze.createSession({workspaceId:Ye,cwd:Ve,model:wt});Ob().setDraftModel(null);const Ht=wt!==void 0&&(!pt.model||pt.model.length===0)?{...pt,model:wt}:pt;f(Ht);const Gt=pt.id;return ke!==void 0&&(e.thinkingBySession={...e.thinkingBySession,[Gt]:ke},pb(e,Gt)),bn(pt.workspaceId??Ye??U),await Pi(pt.id,{skipTrack:!0,skipStatusRefresh:!0}),H.planMode&&(e.planArmedBySession={...e.planArmedBySession,[Gt]:!0},j()),H.swarmMode&&(e.swarmModeBySession={...e.swarmModeBySession,[Gt]:!0},W()),H.goalMode&&(e.goalModeBySession={...e.goalModeBySession,[Gt]:!0},z()),H.planMode=!1,H.swarmMode=!1,H.goalMode=!1,Gt}async function Nt(U,me,ke){if(na.has(U))return null;na.add(U);let ze=null;try{const Ye=await sn(U);return Ye?(ze=Ye,await es(Ye,me,ke),Ye):null}catch(Ye){return r("startSessionAndSendPrompt",Ye),ze}finally{na.delete(U)}}async function Tn(U,me,ke,ze){if(na.has(U))return{sessionId:null,activated:!1};na.add(U);let Ye=null;try{const Ve=await sn(U);if(!Ve)return{sessionId:null,activated:!1};Ye=Ve;const wt=e.planArmedBySession[Ve]??!1,pt=e.swarmModeBySession[Ve]??!1,Ht=e.sessions.find(Rt=>Rt.id===Ve),Gt=(Ht?.model&&Ht.model.length>0?Ht.model:e.defaultModel)??void 0,Cn=await o.resolveThinkingForPrompt(Ve,Gt)??e.thinking;if(!await T({model:Gt,planMode:wt,swarmMode:pt,permissionMode:e.permission,thinking:Cn},Ve))return{sessionId:Ve,activated:!1};wt&&(e.planArmedBySession={...e.planArmedBySession,[Ve]:!1},j(),e.planModeBySession={...e.planModeBySession,[Ve]:!0});const jt=await o.activateSkill(me,ke,ze,Ve,{skipThinkingPersist:!0});return{sessionId:Ve,activated:jt}}catch(Ve){return r("startSessionAndActivateSkill",Ve),{sessionId:Ye,activated:!1}}finally{na.delete(U)}}async function fs(U,me){if(na.has(U))return null;na.add(U);let ke=null;try{const ze=await sn(U);return ze?(ke=ze,await s.openSideChatOn(ze,me),ze):null}catch(ze){return r("startSessionAndOpenSideChat",ze),ke}finally{na.delete(U)}}async function vi(U){const me=U.trim();if(!me)return!1;const ke=Pt();try{const ze=await ke.addWorkspace({root:me});return Ue(ze),ot(ze.id,{entry:"workspace"}),!0}catch(ze){return ya("[kimi-code] addWorkspaceByPath failed for",me,ze),!1}}async function Dt(U){try{return await Pt().browseFs(U)}catch{return{path:"",parent:null,entries:[]}}}async function Is(){try{return await Pt().getFsHome()}catch{return{home:"",recentRoots:[]}}}function Ei(U,me){if(me!=="none"&&!(typeof window>"u"||!window.history)&&window.location.pathname!==U)try{me==="push"?window.history.pushState(null,"",U):window.history.replaceState(null,"",U)}catch{}}function Pn(U,me){e.mainView==="chat"&&Ei(Ere(U),me)}function bs(){e.mainView!=="sessionAdmin"&&(e.mainView="sessionAdmin",Ei(XD,"push"))}function Lo(U){e.mainView==="sessionAdmin"&&(e.mainView="chat",Pn(e.activeSessionId,U?.urlMode??"push"))}async function Oi(U){try{const me=await Pt().getSession(U);return e.sessions.some(ke=>ke.id===me.id)||h(me),!0}catch{return!1}}async function co(U){try{const me=await Pt().getSession(U);return me.archived?"stale":(e.sessions.some(ke=>ke.id===me.id)||h(me),"ok")}catch(me){return zs(me)&&me.code===uce?"stale":"retry"}}function Wi(){if(nS(window.location)){e.mainView="sessionAdmin";return}e.mainView="chat";const U=iS(window.location);if(U===void 0){y(void 0);return}if(U!==e.activeSessionId){if(e.sessions.some(me=>me.id===U)){Pi(U,{urlMode:"none",skipTrack:!0});return}(async()=>{if(await Oi(U)){await Pi(U,{urlMode:"none",skipTrack:!0});return}const me=e.sessions[0];me?await Pi(me.id,{urlMode:"replace",skipTrack:!0}):(y(void 0),Pn(void 0,"replace"))})()}}let As=!1;function fo(){As||typeof window>"u"||(As=!0,window.addEventListener("popstate",Wi))}async function Pi(U,me){const ke=me?.source??"sidebar";if(!e.sessions.some(wt=>wt.id===U)){const wt=++re;if(!await Oi(U)||wt!==re)return}const ze=S(U),Ye=!ze&&u.has(U);u.delete(U);const Ve=e.activeSessionId!==U;try{(me?.urlMode??"push")==="push"&&(e.mainView="chat"),Pn(U,me?.urlMode??"push"),e.sessionLoading=!ze&&!Ye,y(U),!me?.skipTrack&&Ve&&void 0,e.unreadBySession[U]&&(e.unreadBySession={...e.unreadBySession,[U]:!1},ee({[U]:!1})),Ao().clearFileDiff();const wt=e.sessions.find(pt=>pt.id===U);if(wt){const pt=R(wt);e.activeWorkspaceId!==pt&&bn(pt)}if(ze){if(await x(U)==="not-found")return}else if(await v(U,{skipStatusRefresh:me?.skipStatusRefresh===!0})==="not-found")return;we(U,{skipStatus:me?.skipStatusRefresh===!0})}catch(wt){r("selectSession",wt,{sessionId:U})}finally{e.activeSessionId===U&&(e.sessionLoading=!1)}}async function es(U,me,ke){const ze=Pb(U);e.inFlightBySession={...e.inFlightBySession,[U]:!0};const Ye=b();let Ve=e.pendingThinkingBySession[U];try{const wt=Pt(),pt=[];if(me&&pt.push({type:"text",text:me}),pt.push(...rv(ke)),pt.length===0)return e.inFlightBySession={...e.inFlightBySession,[U]:!1},"rejected";const Ht={id:Ye,sessionId:U,role:"user",content:pt,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};A(U,$o=>[...$o,Ht]);const Gt=e.sessions.find($o=>$o.id===U),Cn=(Gt?.model&&Gt.model.length>0?Gt.model:e.defaultModel)??void 0,Qn=e.planArmedBySession[U]??!1,jt=Qn||(e.planModeBySession[U]??!1),Rt=e.swarmModeBySession[U]??!1,Bn=e.goalModeBySession[U]??!1;Qn&&(e.planArmedBySession={...e.planArmedBySession,[U]:!1},j(),(e.planModeBySession[U]??!1)||(await wt.updateSession(U,{planMode:!0}),e.planModeBySession={...e.planModeBySession,[U]:!0})),Bn&&me&&(await wt.updateSession(U,{goalObjective:me.trim(),planMode:!1}),e.planModeBySession={...e.planModeBySession,[U]:!1});const ei=await o.resolveThinkingForPrompt(U,Cn)??e.thinking;Ve=e.pendingThinkingBySession[U];const ji=await wt.submitPrompt(U,{content:pt,model:Cn,thinking:ei,permissionMode:e.permission,planMode:jt&&!(Bn&&me),swarmMode:Rt});return ei!==void 0&&Xa(e,U,Ve),Bn&&me&&(e.goalModeBySession={...e.goalModeBySession,[U]:!1},z()),e.promptIdBySession={...e.promptIdBySession,[U]:ji.promptId},Ee(U,Ye,ji.promptId,ji.userMessageId),C()?.bindNextPromptId(U,ji.promptId),"ok"}catch(wt){return e.inFlightBySession={...e.inFlightBySession,[U]:!1},A(U,pt=>pt.some(Ht=>Ht.id===Ye)?pt.filter(Ht=>Ht.id!==Ye||Ht.promptId!==void 0||Ht.userMessageId!==void 0):pt),Xa(e,U,Ve)&&_(U),r("sendPrompt",wt,{sessionId:U}),zs(wt)?"rejected":"uncertain"}finally{jb(U,ze)}}async function Ai(U,me){const ke=e.activeSessionId;if(ke){if(a.value!=="idle"||e.inFlightBySession[ke]){Ti(U,me);return}if((e.queuedBySession[ke]?.length??0)>0){Ti(U,me),Yt(ke);return}await es(ke,U,me)}}async function No(U,me){const ke=e.activeSessionId;if(!ke)return;const ze=e.queuedBySession[ke]??[],Ye=[],Ve=[];for(const Rt of ze){const Bn=Rt.text.trim();Bn&&Ye.push(Bn),Rt.attachments?.length&&Ve.push(...Rt.attachments)}const wt=U.trim();if(wt&&Ye.push(wt),me?.length&&Ve.push(...me),Ye.length===0&&Ve.length===0)return;ze.length>0&&(e.queuedBySession={...e.queuedBySession,[ke]:[]});const pt=Ye.join(` + +`),Ht=()=>{if(ze.length===0)return;const Rt=e.queuedBySession[ke]??[];e.queuedBySession={...e.queuedBySession,[ke]:[...ze,...Rt]}};if(a.value==="idle"&&!e.inFlightBySession[ke]){await es(ke,pt,Ve)==="rejected"&&Ht();return}const Gt=[];pt&&Gt.push({type:"text",text:pt}),Gt.push(...rv(Ve));const Cn=b(),Qn={id:Cn,sessionId:ke,role:"user",content:Gt,createdAt:new Date().toISOString(),metadata:{"kimiWeb.optimisticUserMessage":!0}};A(ke,Rt=>[...Rt,Qn]);const jt=Pb(ke);try{const Rt=Pt(),Bn=e.sessions.find(De=>De.id===ke),ei=(Bn?.model&&Bn.model.length>0?Bn.model:e.defaultModel)??void 0,ji=await o.resolveThinkingForPrompt(ke,ei)??e.thinking,$o=e.pendingThinkingBySession[ke],Go=await Rt.submitPrompt(ke,{content:Gt,model:ei,thinking:ji,permissionMode:e.permission,planMode:e.planModeBySession[ke]??!1,swarmMode:e.swarmModeBySession[ke]??!1});if(ji!==void 0&&Xa(e,ke,$o),Ee(ke,Cn,Go.promptId,Go.userMessageId),Go.status!=="queued"){e.promptIdBySession={...e.promptIdBySession,[ke]:Go.promptId},C()?.bindNextPromptId(ke,Go.promptId);return}try{await Rt.steerPrompts(ke,[Go.promptId])}catch{}}catch(Rt){A(ke,Bn=>Bn.filter(ei=>ei.id!==Cn||ei.promptId!==void 0||ei.userMessageId!==void 0)),zs(Rt)&&Ht(),r("steer",Rt,{sessionId:ke})}finally{jb(ke,jt)}}async function Ci(U,me){try{const ze=await Pt().uploadFile({file:U,name:me});return{fileId:ze.id,name:ze.name,mediaType:ze.mediaType}}catch(ke){return r("uploadImage",ke),null}}function Ti(U,me){const ke=e.activeSessionId;if(!ke)return;const ze=e.queuedBySession[ke]??[],Ye={text:U,attachments:me,id:Ace()};e.queuedBySession={...e.queuedBySession,[ke]:[...ze,Ye]}}function Yt(U){const[me,...ke]=e.queuedBySession[U]??[];me!==void 0&&(e.queuedBySession={...e.queuedBySession,[U]:ke},es(U,me.text,me.attachments).then(ze=>{if(ze==="ok"){ad.delete(U);return}if(ze==="uncertain"){ad.delete(U);return}if(!e.sessions.some(Ht=>Ht.id===U)){ad.delete(U);return}const Ye=me.id??me.text,Ve=ad.get(U),wt=Ve!==void 0&&Ve.key===Ye?Ve.count+1:1;if(wt>=yce){ad.delete(U),(e.queuedBySession[U]?.length??0)>0&&Yt(U);return}ad.set(U,{key:Ye,count:wt});const pt=e.queuedBySession[U]??[];e.queuedBySession={...e.queuedBySession,[U]:[me,...pt]}}))}function vn(U,me){const ke=e.inFlightBySession[U]===!0;if(e.inFlightBySession={...e.inFlightBySession,[U]:!1},e.promptIdBySession[U]!==void 0){const Ye={...e.promptIdBySession};delete Ye[U],e.promptIdBySession=Ye}return(ke||me?.turnWasActive===!0||(e.turnActiveBySession[U]??!1))&&Yt(U),ke}function ts(U,me){me.inFlightTurn!==null&&me.busy||vn(U)}async function fi(){const U=e.activeSessionId;if(!U)return!1;const me=e.sessions.find(pt=>pt.id===U);let ke=e.promptIdBySession[U];if(ke===void 0){const pt=me?.currentPromptId;pt!==void 0&&pt.length>0&&!pt.startsWith("pr_")&&(ke=pt)}const ze=Pt();let Ye=!1;const Ve=()=>{e.inFlightBySession={...e.inFlightBySession,[U]:!1},e.turnActiveBySession={...e.turnActiveBySession,[U]:!1}};if(ke!==void 0)try{if((await ze.abortPrompt(U,ke)).aborted)return!0;Ye=!0;const Ht={...e.promptIdBySession};delete Ht[U],e.promptIdBySession=Ht,Ve()}catch(pt){if(zs(pt)&&pt.code===cce){Ye=!0;const Ht={...e.promptIdBySession};delete Ht[U],e.promptIdBySession=Ht,Ve()}else return r("abortCurrentPrompt",pt,{sessionId:U}),!1}if(Ye||!((e.inFlightBySession[U]??!1)||(e.turnActiveBySession[U]??!1)||(me?.mainTurnActive??!1)))return!1;try{return(await ze.abortSession(U)).aborted===!0}catch(pt){return r("abortCurrentPrompt",pt,{sessionId:U}),!1}}async function Fr(U,me){const ke=e.activeSessionId;if(!ke||am[U])return;am[U]=!0;const ze=e.approvalsBySession[ke]?.find(Ye=>Ye.approvalId===U&&Ye.toolName==="ExitPlanMode")?.toolCallId;try{const Ye=Pt(),Ve={decision:me.decision,scope:me.scope,feedback:me.feedback,selectedLabel:me.selectedLabel};await Ye.respondApproval(ke,U,Ve),xo().removePendingApproval(ke,U),ze!==void 0&&(D(ke,ze,{state:me.decision,selectedOption:me.selectedLabel,feedback:me.feedback}),$(ke,ze))}catch(Ye){n3(Ye)?(xo().removePendingApproval(ke,U),ze!==void 0&&$(ke,ze)):r("respondApproval",Ye,{sessionId:ke})}finally{delete am[U]}}async function Ni(U,me){const ke=e.activeSessionId;if(ke&&!Jc[U]){Jc[U]="answer";try{await Pt().respondQuestion(ke,U,me),xo().removePendingQuestion(ke,U)}catch(ze){n3(ze)?xo().removePendingQuestion(ke,U):r("respondQuestion",ze,{sessionId:ke})}finally{delete Jc[U]}}}async function hi(U){const me=e.activeSessionId;if(me&&!Jc[U]){Jc[U]="dismiss";try{await Pt().dismissQuestion(me,U),xo().removePendingQuestion(me,U)}catch(ke){n3(ke)?xo().removePendingQuestion(me,U):r("dismissQuestion",ke,{sessionId:me})}finally{delete Jc[U]}}}async function ho(U){const me=e.activeSessionId;if(me&&!i3[U]){i3[U]=!0;try{const ke=Pt(),ze=(e.tasksBySession[me]??[]).find(Ve=>Ve.id===U)?.backgroundTaskId;await ke.cancelTask(me,ze??U);const Ye=e.tasksBySession[me]??[];e.tasksBySession={...e.tasksBySession,[me]:Ye.map(Ve=>(ze!==void 0?Ve.backgroundTaskId===ze:Ve.id===U||Ve.backgroundTaskId===U)?{...Ve,status:"cancelled",completedAt:Ve.completedAt??new Date().toISOString(),completedAtEstimated:Ve.completedAt===void 0?!0:Ve.completedAtEstimated}:Ve)}}catch(ke){mce(ke)||r("cancelTask",ke,{sessionId:me})}finally{delete i3[U]}}}function Xs(U){const me=e.activeSessionId;me?(e.planArmedBySession={...e.planArmedBySession,[me]:U},j(),!U&&(e.planModeBySession[me]??!1)&&(e.planModeBySession={...e.planModeBySession,[me]:!1},T({planMode:!1},me))):H.planMode=U}function ns(){const U=e.activeSessionId,me=U?(e.planArmedBySession[U]??!1)||(e.planModeBySession[U]??!1):H.planMode;Xs(!me)}function qi(U){const me=e.activeSessionId;me?(e.swarmModeBySession={...e.swarmModeBySession,[me]:U},W(),T({swarmMode:U})):H.swarmMode=U}async function an(){const U=e.activeSessionId,ke=!(U?e.swarmModeBySession[U]??!1:H.swarmMode);ke&&e.permission==="manual"&&!await n({title:si("workspace.swarmEnableTitle"),message:si("workspace.swarmEnableConfirm"),variant:"primary"})||qi(ke)}function eo(U){const me=e.activeSessionId;me?(e.goalModeBySession={...e.goalModeBySession,[me]:U},z()):H.goalMode=U}function Us(){const U=e.activeSessionId,me=U?e.goalModeBySession[U]??!1:H.goalMode;eo(!me)}async function Fo(U){const me=U.trim();if(!me||e.permission==="manual"&&!await n({title:si("workspace.goalStartTitle"),message:si("workspace.goalStartConfirm",{objective:me}),variant:"primary"}))return null;let ke=e.activeSessionId,ze=null;if(!ke){const Ye=e.activeWorkspaceId,Ve=Ye&&O.value.some(wt=>wt.id===Ye)?Ye:O.value[0]?.id??null;if(!Ve)return null;try{ke=await sn(Ve)??void 0,ze=ke??null}catch(wt){return r("createGoal",wt),null}if(!ke)return null}try{await Pt().updateSession(ke,{goalObjective:me,planMode:!1}),e.planModeBySession={...e.planModeBySession,[ke]:!1}}catch(Ye){return r("createGoal",Ye,{sessionId:ke,message:se(Ye)}),ze}return e.goalModeBySession[ke]&&(e.goalModeBySession={...e.goalModeBySession,[ke]:!1},z()),e.activeSessionId===ke?await Ai(me):await es(ke,me),ze}function Ms(U){const me=e.activeSessionId;me&&Promise.resolve(Pt().updateSession(me,{goalControl:U})).catch(ke=>{r("controlGoal",ke,{sessionId:me,message:se(ke)})})}function Es(U){e.permission=U,q(U),T({permissionMode:U})}function to(U){const me=[...e.warnings];me.splice(U,1),e.warnings=me}async function Li(U,me){try{await Pt().updateSession(U,{title:me}),d(U,ze=>({...ze,title:me})),e.doneSessions.some(ze=>ze.id===U)&&(e.doneSessions=e.doneSessions.map(ze=>ze.id===U?{...ze,title:me}:ze))}catch(ke){r("renameSession",ke,{sessionId:U})}}async function wi(U){const me=await Pt().generateSessionTitle(U,{force:!0,source:"digest"});return me===null?l({severity:"info",title:si("sidebar.genTitleUnavailable")}):e.doneSessions.some(ke=>ke.id===U)&&(e.doneSessions=e.doneSessions.map(ke=>ke.id===U?{...ke,title:me}:ke)),me}async function Vo(U,me){const ke=e.workspaces.find(Ye=>Ye.id===U)?.root,ze=()=>{e.workspaces=e.workspaces.map(Ye=>Ye.id===U?{...Ye,name:me}:Ye)};try{if(await Pt().updateWorkspace(U,{name:me}),ke!==void 0){const Ye=lm();ke in Ye&&(delete Ye[ke],FS(Ye))}ze()}catch(Ye){if(ke!==void 0&&zs(Ye)&&Ye.code===dce){FS({...lm(),[ke]:me}),ze();return}r("renameWorkspace",Ye)}}async function Ts(U){const me=e.workspaces.find(Ve=>Ve.id===U)?.root??N.value.find(Ve=>Ve.id===U)?.root??U,ke=e.activeSessionId?e.sessions.find(Ve=>Ve.id===e.activeSessionId):void 0,ze=e.activeWorkspaceId===U||e.activeWorkspaceId===me,Ye=!!(ke&&(ke.cwd===me||ke.workspaceId===U||R(ke)===U));me&&!e.hiddenWorkspaceRoots.includes(me)&&(e.hiddenWorkspaceRoots=[...e.hiddenWorkspaceRoots,me],ie(e.hiddenWorkspaceRoots));try{await Pt().deleteWorkspace(U)}catch(Ve){ya("[kimi-code] deleteWorkspace registry cleanup failed for",U,Ve)}if(e.workspaces=e.workspaces.filter(Ve=>Ve.id!==U&&Ve.root!==me),ze||Ye){const Ve=O.value[0]?.id??null;if(e.activeWorkspaceId=Ve,Ve)V(Ve);else try{Tr(hn.activeWorkspace)}catch{}}(ze||Ye)&&(y(void 0),e.sessionLoading=!1,Ao().clearFileDiff(),Pn(void 0,"replace"))}async function po(U,me){const ke=new Set(U);if(me){const Ye=new Date().toISOString(),Ve=e.sessions.filter(wt=>ke.has(wt.id));Ve.length>0&&(e.doneSessions=[...Ve.map(wt=>({...wt,archived:!0,archivedAt:Ye})),...e.doneSessions.filter(wt=>!ke.has(wt.id))]);for(const wt of U){g(wt),t2.delete(wt),s.clearSideChatForSession(wt);const{[wt]:pt,...Ht}=e.sideChatUserMessageIdsBySession;e.sideChatUserMessageIdsBySession=Ht}if(e.activeSessionId!==void 0&&ke.has(e.activeSessionId)){const wt=e.sessions[0];wt?await Pi(wt.id,{urlMode:"replace",skipTrack:!0}):(y(void 0),Pn(void 0,"replace"))}return}const ze=e.doneSessions.filter(Ye=>ke.has(Ye.id));e.doneSessions=e.doneSessions.filter(Ye=>!ke.has(Ye.id));for(const Ye of ze)e.sessions.some(Ve=>Ve.id===Ye.id)||f({...Ye,archived:!1})}async function Ks(U){try{const me=Pt(),ke=e.sessions.find(Ve=>Ve.id===U),ze=ke!==void 0?R(ke):void 0,Ye=ze!==void 0?yt(ze).length:0;await me.archiveSession(U),await po([U],!0),ke!==void 0&&ze!==void 0&&Nn(ze,U,ke.updatedAt,Ye)}catch(me){r("archiveSession",me,{sessionId:U})}}async function Zo(U){if(fe)return!1;const me=U??e.activeSessionId;if(!me){const ze=si("commands.export.noSession");return dl("export:failed",{status:"no-session"}),r("exportSession",new Error(ze),{message:ze}),!1}fe=!0;const ke=Date.now();dl("export:start",{sessionId:me});try{const ze=Uue(),{blob:Ye,fileName:Ve}=await Pt().exportSession(me,ze,{desktop:Wh});if(typeof document>"u")throw new Error("Document is unavailable");const wt=URL.createObjectURL(Ye);let pt;try{pt=document.createElement("a"),pt.href=wt,pt.download=Ve,document.body.append(pt),pt.click()}finally{pt?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(wt)}catch{}},0)}return dl("export:accepted",{sessionId:me,status:"accepted",zipBytes:Ye.size,durationMs:Date.now()-ke}),!0}catch(ze){const Ye=typeof ze=="object"&&ze!==null?ze:void 0;return dl("export:failed",{sessionId:me,status:"failed",durationMs:Date.now()-ke,errorName:typeof Ye?.name=="string"?Ye.name:typeof ze,errorCode:typeof Ye?.code=="number"?Ye.code:void 0,requestId:typeof Ye?.requestId=="string"?Ye.requestId:void 0,phase:typeof Ye?.phase=="string"?Ye.phase:void 0,httpStatus:typeof Ye?.status=="number"?Ye.status:void 0}),r("exportSession",ze,{sessionId:me,...zs(ze)&&ze.code===_Q?{message:si("commands.export.tooLarge",{sessionId:me})}:{}}),!1}finally{fe=!1}}async function Be(U){try{const me=await Pt().restoreSession(U);return f(me),await po([U],!1),!0}catch(me){return r("restoreSession",me,{sessionId:U}),!1}}function Pe(U){return Pt().listSessions({archivedOnly:!0,beforeId:U?.beforeId,pageSize:U?.pageSize??50})}async function dt(){try{await Pt().logout(),await ae(),await Dn()}catch(U){r("logout",U)}}function St(U){const me=e.activeSessionId;me&&Pt().compactSession(me,U).catch(ke=>{r("compact",ke,{sessionId:me})})}async function An(U){const me=U??e.activeSessionId;if(me)try{const ke=await Pt().forkSession(me);f(ke),await Pi(ke.id,{skipTrack:!0})}catch(ke){r("fork",ke,{sessionId:me})}}async function pi(U=1){const me=e.activeSessionId;if(!me)return null;const ke=e.messagesBySession[me]??[];let ze=-1;for(let pt=ke.length-1;pt>=0;pt--){const Ht=ke[pt];if(Ht.role==="user"&&!(Ht.metadata?.origin&&Ht.metadata.origin.kind!=="user")){ze=pt;break}}const Ye=ze>=0?ke[ze].content.filter(pt=>pt.type==="text").map(pt=>pt.text).join(` +`):null,Ve=U===1&&ze>=0&&ke.slice(ze+1).every(pt=>pt.role!=="user"),wt=Ve?e.sessions.find(pt=>pt.id===me):void 0;if(Ve&&(e.messagesBySession={...e.messagesBySession,[me]:ke.slice(0,ze)},wt!==void 0)){const pt={...wt};delete pt.lastTurnReason,f(pt)}try{return await Pt().undoSession(me,U),await v(me),{text:Ye}}catch(pt){return Ve&&(e.messagesBySession={...e.messagesBySession,[me]:ke},wt!==void 0&&f(wt),await v(me).catch(()=>{})),r("undo",pt,{sessionId:me}),null}}function hs(U){const me=e.activeSessionId;if(!me)return;const ke=e.queuedBySession[me]??[];if(U<0||U>=ke.length)return;const ze=[...ke];ze.splice(U,1),e.queuedBySession={...e.queuedBySession,[me]:ze}}function is(U,me){const ke=e.activeSessionId;if(!ke)return;const ze=e.queuedBySession[ke]??[];if(U===me||U<0||U>=ze.length||me<0||me>=ze.length)return;const Ye=[...ze],[Ve]=Ye.splice(U,1);Ve!==void 0&&(Ye.splice(me,0,Ve),e.queuedBySession={...e.queuedBySession,[ke]:Ye})}async function Ls(U){const me=e.activeSessionId;if(!me)return[];try{return(await Pt().listDirectory(me,{path:U,includeGitStatus:!0})).items}catch{return[]}}async function Ui(U,me){const ke=e.activeSessionId;if(!ke){let ze=U;if(!dr(U)){const Ye=e.activeWorkspaceId,Ve=Ye&&O.value.some(pt=>pt.id===Ye)?Ye:O.value[0]?.id??null,wt=Ve?N.value.find(pt=>pt.id===Ve)?.root:void 0;if(!wt)return!0;ze=`${wt.replace(/[\\/]+$/,"")}/${U}`}try{return await On(ze),!0}catch(Ye){return!(zs(Ye)&&Ye.code===WS)}}try{if(dr(U))return await On(U),!0;const ze=Pt();return me==="folder"?await ze.listDirectory(ke,{path:U}):await ze.readFile(ke,{path:U,length:1}),!0}catch(ze){return!(zs(ze)&&ze.code===WS)}}async function On(U){return Pt().readHostFileContent(U)}const Cs=10485760;function Do(U){const me=e.activeSessionId;return me?Pt().getFileDownloadUrl(me,U):null}async function ws(U,me){const ke=e.activeSessionId;if(!ke)return!1;try{return await Pt().openFile(ke,{path:U,line:me}),!0}catch(ze){return r("openFile",ze,{sessionId:ke}),!1}}async function tl(U){const me=e.activeSessionId;if(!me)return;const ke=P.value.cwd||".";try{await Pt().openInApp(me,U,ke)}catch(ze){r("openInApp",ze,{sessionId:me})}}async function xi(U){const me=e.activeSessionId;if(!me)return!1;try{return await Pt().revealFile(me,{path:U}),!0}catch(ke){return r("revealFile",ke,{sessionId:me}),!1}}function dr(U){return U.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(U)||U.startsWith("\\\\")}async function rt(U){if(/^(https?:|data:|blob:)/i.test(U))return U;const me=e.activeSessionId;if(!me)return U;let ke=U;if(dr(ke)){const ze=e.sessions.find(Ve=>Ve.id===me)?.cwd,Ye=ze?Wy(ke,ze):null;if(Ye)ke=Ye;else try{const Ve=await On(ke);return!Ve.isBinary||Ve.encoding!=="base64"?U:`data:${Ve.mime};base64,${Ve.content}`}catch{return U}}try{const Ye=await Pt().readFile(me,{path:ke,length:Cs});return!Ye.isBinary||Ye.encoding!=="base64"||Ye.truncated?U:`data:${Ye.mime};base64,${Ye.content}`}catch{return U}}async function Se(U){const me=e.sessions.find(ze=>ze.id===e.activeSessionId),ke=me===void 0?e.activeWorkspaceId:R(me);if(!ke)return[];try{return(await Pt().searchFiles(ke,{query:U,limit:20})).items.map(Ve=>({path:Ve.path,name:Ve.name,kind:Ve.kind}))}catch{return[]}}return{checkAuth:ae,probeManagedMembership:Ce,loadConfig:Q,updateConfig:ne,listAllSessionsGlobal:_e,load:Dn,refreshServerMeta:un,loadWorkspaces:pn,loadMoreSessions:ut,loadAllSessions:Qt,ensureFlatSessions:lt,loadMoreFlatSessions:tt,ensureDoneSessions:Ut,loadMoreDoneSessions:fn,selectWorkspace:bn,openWorkspace:Xn,upsertWorkspacePreserveOrder:Ue,applyWorkspaceEvent:st,clearActiveSession:ct,openWorkspaceDraft:ot,startSessionAndSendPrompt:Nt,startSessionAndActivateSkill:Tn,startSessionAndOpenSideChat:fs,addWorkspaceByPath:vi,browseFs:Dt,getFsHome:Is,writeSessionUrl:Pn,openSessionAdmin:bs,closeSessionAdmin:Lo,fetchSessionIntoList:Oi,onSessionRoutePopState:Wi,bindSessionRoute:fo,selectSession:Pi,submitPromptInternal:es,finishPromptLocal:vn,maybeGenerateSessionTitle:bce,localTurnStartState:Cce,isLocalTurnSnapshotCurrent:xce,afterLocalTurnStartsSettle:Sce,handleSessionSnapshot:ts,sendPrompt:Ai,steerPrompt:No,uploadImage:Ci,enqueue:Ti,unqueue:hs,reorderQueue:is,abortCurrentPrompt:fi,respondApproval:Fr,respondQuestion:Ni,dismissQuestion:hi,pendingQuestionActions:Jc,pendingApprovalActions:am,cancelTask:ho,setPlanMode:Xs,togglePlanMode:ns,setSwarmMode:qi,toggleSwarmMode:an,setGoalMode:eo,toggleGoalMode:Us,createGoal:Fo,controlGoal:Ms,setPermission:Es,dismissWarning:to,renameSession:Li,regenerateSessionTitle:wi,renameWorkspace:Vo,deleteWorkspace:Ts,archiveSession:Ks,applySessionsArchivedLocally:po,exportSession:Zo,restoreSession:Be,loadArchivedSessions:Pe,logout:dt,compact:St,forkSession:An,undo:pi,listDir:Ls,readHostFileContent:On,probeWorkspacePath:Ui,getFileDownloadUrl:Do,openWorkspaceFile:ws,openInApp:tl,revealWorkspaceFile:xi,resolveImageUrl:rt,searchFiles:Se,loadOlderMessages:X,refreshSessionSidecars:we,isStartingFirstPrompt:()=>na.size>0}}const Ice=20,Mce=300,Ece=1e4,US=5e3;function I$(e){const[t,n,i]=e.split("-").map(Number);return new Date(t??0,(n??1)-1,i??1,0,0,0,0).getTime()}function M$(e){const[t,n,i]=e.split("-").map(Number);return new Date(t??0,(n??1)-1,i??1,23,59,59,999).getTime()}function Tce(e,t,n){return{workspaceIds:e.workspaceIds.length>0?[...e.workspaceIds]:void 0,archived:e.status==="all"?"all":e.status==="done",updatedAfter:e.updatedFrom!==""?I$(e.updatedFrom):void 0,updatedBefore:e.updatedTo!==""?M$(e.updatedTo):void 0,sort:"meta.updated_at_desc",page:t,pageSize:n}}function Lce(e){return{workspaceIds:e.workspaceIds.length>0?[...e.workspaceIds]:void 0,archived:e.status==="all"?"all":e.status==="done",updatedAfter:e.updatedFrom!==""?I$(e.updatedFrom):void 0,updatedBefore:e.updatedTo!==""?M$(e.updatedTo):void 0,sort:"meta.updated_at_desc"}}function um(e){return JSON.stringify([[...e.workspaceIds].toSorted(),e.status,e.updatedFrom,e.updatedTo])}function Nce(e){const t=Ss({filters:{workspaceIds:[],status:"all",updatedFrom:"",updatedTo:""},page:1,pageSize:Ice,items:[],total:0,loading:!1,seeded:!1,selectedIds:new Set,selectedArchivedById:new Map,allMatching:!1,materializingAll:!1});let n=0,i=null;async function s(){i!==null&&(clearTimeout(i),i=null);const _=++n;t.loading=!0;try{const I=await Pt().listSessionsV2(Tce(t.filters,t.page,t.pageSize));if(_!==n)return;t.items=I.items,t.total=I.total;for(const $ of I.items)t.selectedArchivedById.has($.id)&&t.selectedArchivedById.set($.id,$.meta.archived);const M=Math.max(1,Math.ceil(I.total/t.pageSize));t.page>M&&(t.page=M,s())}catch(I){if(_!==n)return;e.pushOperationFailure("sessionAdmin",I)}finally{_===n&&(t.loading=!1)}}function o(){i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,s()},Mce)}function r(){t.seeded||(t.seeded=!0,s())}async function l(){await s()}function a(_){t.allMatching&&um(_)!==um(t.filters)&&A(),t.filters.workspaceIds=[..._.workspaceIds],t.filters.status=_.status,t.filters.updatedFrom=_.updatedFrom,t.filters.updatedTo=_.updatedTo,t.page=1,t.seeded=!0,s()}function u(_){t.allMatching&&A(),t.filters.workspaceIds=[..._],t.page=1,o()}function c(_){t.allMatching&&A(),t.filters.status=_,t.page=1,o()}function d(_,I){t.allMatching&&A(),t.filters.updatedFrom=_,t.filters.updatedTo=I,t.page=1,o()}function f(_){_!==t.page&&(t.page=_,o())}function h(_){_!==t.pageSize&&(t.pageSize=_,t.page=1,o())}function g(_,I){if(t.selectedIds.has(_)){t.selectedIds.delete(_),t.selectedArchivedById.delete(_),t.selectedIds.size===0&&(t.allMatching=!1);return}t.selectedIds.add(_),t.selectedArchivedById.set(_,I)}function m(_){const I=_.length>0&&_.every(M=>t.selectedIds.has(M.id));for(const M of _)I?(t.selectedIds.delete(M.id),t.selectedArchivedById.delete(M.id)):(t.selectedIds.add(M.id),t.selectedArchivedById.set(M.id,M.archived));t.selectedIds.size===0&&(t.allMatching=!1)}function y(_){t.selectedIds=new Set(_.map(I=>I.id)),t.selectedArchivedById=new Map(_.map(I=>[I.id,I.archived])),t.allMatching=!1}function A(){t.selectedIds=new Set,t.selectedArchivedById=new Map,t.allMatching=!1}async function b(){if(t.allMatching||t.materializingAll)return;t.materializingAll=!0;const _=Lce(t.filters),I=um(t.filters);try{const M=[];let $;for(;;){const D=await Pt().listSessionIdsV2({..._,pageSize:Ece,pageToken:$});if(M.push(...D.items),!D.hasMore||D.nextPageToken===null)break;$=D.nextPageToken}if(um(t.filters)!==I)return;for(const D of M)t.selectedIds.add(D.id),t.selectedArchivedById.set(D.id,D.archived);t.allMatching=!0}catch(M){e.pushOperationFailure("sessionAdmin",M)}finally{t.materializingAll=!1}}function C(_){const I=[];for(const[M,$]of t.selectedArchivedById)$===_&&I.push(M);return I}async function v(_,I,M){const $=[];let D=0,T=0;for(let N=0;N<_.length;N+=US){const O=_.slice(N,N+US);try{const P=await M(O),R=P.results.filter(q=>q.ok).map(q=>q.id);$.push(...R),D+=P.succeeded,T+=P.failed}catch(P){T+=_.length-N,e.pushOperationFailure(I?"archiveSessions":"restoreSessions",P);break}}if($.length>0){await e.applySessionsArchivedLocally($,I);for(const N of $)t.selectedIds.delete(N),t.selectedArchivedById.delete(N);t.selectedIds.size===0&&(t.allMatching=!1),await l()}return{okIds:$,succeeded:D,failed:T}}async function x(_){return v(_,!0,I=>Pt().archiveSessions(I))}async function S(_){return v(_,!1,I=>Pt().restoreSessions(I))}return{state:t,ensureSeeded:r,refresh:l,applyFilters:a,setWorkspaceIds:u,setStatus:c,setTimeRange:d,setPage:f,setPageSize:h,toggleSelection:g,togglePageSelection:m,setSelection:y,clearSelection:A,selectAllMatching:b,selectedIdsByArchived:C,archiveSessions:x,restoreSessions:S}}function Fce(e,t,n){return e==="idle"&&!t&&!n}function p6(...e){for(const t of e){const n=t?.trim();if(n)return n}return""}function Dce(e,t){return{title:e("settings.notifyTitle"),body:p6(t,e("settings.notifyFallback"))}}function $ce(e,t,n){return{title:e("settings.notifyQuestionTitle"),body:p6(n,t,e("settings.notifyQuestionFallback"))}}function Bce(e,t,n){return{title:e("settings.notifyApprovalTitle"),body:p6(n,t,e("settings.notifyApprovalFallback"))}}function zce(e){if(e.startsWith("kimi-complete-"))return"turn_complete";if(e.startsWith("kimi-question-"))return"question";if(e.startsWith("kimi-approval-"))return"approval"}function KS(e,t){const n=To(e);return n===null?t:n==="1"}const Rce="/favicon.ico",Oce=R0("kimi.notifications",()=>{const e=G(KS(hn.notifyEnabled,!0)),t=G(KS(hn.notifySound,!0)),n=G(typeof Notification<"u"?Notification.permission:"denied");async function i(c){if(!c){e.value=!1,Js(hn.notifyEnabled,"0");return}if(typeof Notification>"u")return;let d=Notification.permission;if(d==="default")try{d=await Notification.requestPermission()}catch{}n.value=d,d==="granted"&&(e.value=!0,Js(hn.notifyEnabled,"1"))}function s(c){t.value=c,Js(hn.notifySound,c?"1":"0")}function o(c,d,f){if(!e.value||typeof Notification>"u")return;const h=Notification.permission;if(h!=="denied"){if(h==="default"){Notification.requestPermission().then(g=>{n.value=g,g==="granted"&&r(c,d,f)});return}r(c,d,f)}}function r(c,d,f){if(!c.isUserWatching)try{const h=new Notification(d.title,{body:d.body,tag:f,icon:Rce,silent:!t.value}),g=zce(f);g!==void 0&&void 0,h.onclick=()=>{try{window.kimiDesktop?.showWindow?.(),window.focus()}catch{}g!==void 0&&void 0,c.onClick(),h.close()}}catch{}}function l(c,d){o(d,Dce(si,d.sessionTitle),`kimi-complete-${c}-${d.promptId??Date.now()}`)}function a(c){o(c,$ce(si,c.sessionTitle,c.questionPreview),`kimi-question-${c.questionId}`)}function u(c){o(c,Bce(si,c.sessionTitle,c.toolName),`kimi-approval-${c.approvalId}`)}return{notifyEnabled:e,notifySound:t,notifyPermission:n,setNotifyEnabled:i,setNotifySound:s,maybeNotifyCompletion:l,maybeNotifyQuestion:a,maybeNotifyApproval:u}});function Ou(){return Oce(qh)}class Pce{transcript;sessionId;agentId;fetchPage;pageSize;onChange;onGap;refreshPromise=null;buffered=[];agents_=[];seq_;loadingOlder_=!1;loadOlderError_=!1;refreshError_=!1;constructor(t){this.sessionId=t.sessionId,this.agentId=t.agentId,this.transcript=new hY(t.agentId),this.fetchPage=t.fetchPage,this.pageSize=t.pageSize??20,this.onChange=t.onChange,this.onGap=t.onGap}get snapshot(){return this.transcript.snapshot()}get seq(){return this.seq_}get agents(){return this.agents_}get loading(){return this.refreshPromise!==null}get loadingOlder(){return this.loadingOlder_}get loadOlderError(){return this.loadOlderError_}get refreshError(){return this.refreshError_}refresh(){if(this.refreshPromise!==null)return this.refreshPromise;this.refreshError_=!1;const t=this.fetchPage({pageSize:this.pageSize}).then(n=>this.applyPage(n,!0)).catch(n=>{throw this.refreshError_=!0,n}).finally(()=>{this.refreshPromise=null;const n=this.buffered;this.buffered=[];for(const i of n)this.applyOps(i.ops,i.seq);this.onChange?.()});return this.refreshPromise=t,this.onChange?.(),t}receiveReset(t,n){this.transcript.receive([{op:"reset",agentId:this.agentId,snapshot:t}]),n!==void 0&&(this.seq_=n),this.refreshError_=!1,this.onChange?.()}applyOps(t,n){if(this.refreshPromise!==null||this.loadingOlder_)return this.buffered.push({ops:t,...n!==void 0?{seq:n}:{}}),!1;if(n!==void 0&&this.seq_!==void 0){if(n<=this.seq_)return!0;if(n!==this.seq_+1)return this.onGap?.(),!1}const i=this.transcript.apply(t);return n!==void 0&&(this.seq_=n),i.gap!==void 0&&this.onGap?.(),i.accepted.length>0&&this.onChange?.(),i.gap===void 0}async loadOlder(){if(!this.snapshot.hasMoreOlder||this.loadingOlder_)return;const t=this.snapshot.items.find(n=>n.kind==="turn");if(t?.kind==="turn"){this.loadingOlder_=!0,this.loadOlderError_=!1,this.onChange?.();try{const n=await this.fetchPage({beforeTurn:t.turnId,pageSize:this.pageSize});this.applyPage(n,!1)}catch(n){throw this.loadOlderError_=!0,n}finally{this.loadingOlder_=!1;const n=this.buffered;this.buffered=[];for(const i of n)this.applyOps(i.ops,i.seq);this.onChange?.()}}}applyPage(t,n){this.agents_=t.agents;const i=this.snapshot,s=n?t:{...t,items:jce(t.items,i.items),hasMoreOlder:t.hasMoreOlder};this.receiveReset(s,n?t.seq:void 0)}}function jce(e,t){const n=new Set,i=[];for(const s of[...e,...t]){const o=s.kind==="turn"?s.turnId:s.kind==="marker"?s.markerId:s.refId;n.has(o)||(n.add(o),i.push(s))}return i}function Hce(e){const t=xL(new Map),n=new Map,i=new Map,s=new Set;let o=null,r=null;function l(){o!==null&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(o),o=null),r!==null&&(clearTimeout(r),r=null);for(const C of s)C.version.value+=1;s.clear()}function a(C){s.add(C),!(o!==null||r!==null)&&(typeof requestAnimationFrame=="function"&&(o=requestAnimationFrame(l)),r=setTimeout(l,50))}function u(C,v){return`${C}\0${v}`}function c(C,v,x){const S=e.getEventConnection();S!==null&&(S.subscribeTranscript(C,v,x),i.set(C,v))}function d(C,v){const x=u(C,v),S=t.get(x);if(S!==void 0)return S;const _={channel:new Pce({sessionId:C,agentId:v,fetchPage:I=>e.api.getSessionTranscript(C,{...I,agentId:v}),onChange:()=>{a(_)},onGap:()=>{f(_)}}),version:G(0),baselineLoaded:!1,resumePromise:null};return t.set(x,_),_}async function f(C){if(C.resumePromise!==null)return C.resumePromise;const v=h(C).finally(()=>{C.resumePromise===v&&(C.resumePromise=null)});return C.resumePromise=v,v}async function h(C){try{await C.channel.refresh(),C.baselineLoaded=!0,n.get(C.channel.sessionId)===C.channel.agentId&&c(C.channel.sessionId,C.channel.agentId,C.channel.seq)}catch{n.get(C.channel.sessionId)===C.channel.agentId&&c(C.channel.sessionId,C.channel.agentId)}}function g(C,v){e.connectEventsIfNeeded(),n.set(C,v);const x=d(C,v);return x.baselineLoaded?c(C,v,x.channel.seq):f(x),x}function m(C,v){if(n.get(C)!==v)return;n.delete(C);const x=i.get(C);x!==void 0&&(e.getEventConnection()?.unsubscribeTranscript(C,[x]),i.delete(C))}function y(C,v,x,S){if(n.get(C)!==v)return;const _=d(C,v);_.channel.receiveReset(x,S),_.baselineLoaded=!0}function A(C,v,x,S){return n.get(C)!==v?!0:d(C,v).channel.applyOps(x,S)}function b(C){n.delete(C),i.delete(C)&&e.getEventConnection()?.unsubscribeTranscript(C);for(const[v,x]of t)x.channel.sessionId===C&&(t.delete(v),s.delete(x))}return{getEntry:(C,v)=>t.get(u(C,v)),activate:g,deactivate:m,receiveReset:y,applyOps:A,forgetSession:b}}function Wce(e){const t=e.replace(/[/\\]+$/,"");return t===""?e:t.split(/[/\\]/).pop()??t}function qce(e,t){return e!==""?e:t?`${Wce(t)} | Kimi Code`:"Kimi Code"}function Uce(e){return L(()=>qce(Vu(e.webTitle),Vu(e.activeWorkspaceRoot)))}const cm=n6(),E$=hn.permission,T$=hn.activeWorkspace,L$=hn.planArmed,N$=hn.swarmMode,F$=hn.goalMode,VS=40401,av=hn.onboarded;Tr(hn.codeFont);Tr(hn.accent);Tr(hn.theme);Tr(hn.thinking);Tr(hn.notifyOnComplete);Tr(hn.notifyOnQuestion);Tr(hn.notifyOnApproval);Tr(hn.soundOnComplete);function Kce(){try{const e=To(E$);if(e==="auto"||e==="yolo"||e==="manual")return e}catch{}return"manual"}function Vce(e){try{Js(E$,e)}catch{}}function dm(e){const t=To(e);if(!t)return{};try{const n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))return{};const i={};for(const[s,o]of Object.entries(n))o===!0&&(i[s]=!0);return i}catch{return{}}}function g6(e,t){try{const n={};for(const[i,s]of Object.entries(t))s&&(n[i]=!0);Js(e,JSON.stringify(n))}catch{}}function m6(){g6(L$,Me.planArmedBySession)}function D$(){g6(N$,Me.swarmModeBySession)}function $$(){g6(F$,Me.goalModeBySession)}function Zce(){try{return To(T$)}catch{return null}}const B$=hn.hiddenWorkspaces;function Gce(){try{const e=To(B$);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function Qce(e){try{Js(B$,JSON.stringify(e))}catch{}}function Yce(e){try{Js(T$,e)}catch{}}function Jce(e,t){if(t&&e.startsWith(t)){const i=e.slice(t.length);return i?`~${i}`:"~"}const n=e.match(/^\/(?:Users|home)\/[^/]+(\/.*)?$/);return n?`~${n[1]??""}`:e}const Me=Ss({...gie(),get sessions(){return Wo().sessions},set sessions(e){Wo().setSessions(e)},get activeSessionId(){return Wo().activeSessionId},set activeSessionId(e){Wo().setActiveSessionId(e)},get approvalsBySession(){return xo().approvalsBySession},get questionsBySession(){return xo().questionsBySession},get gitStatusBySession(){return Ao().gitStatusBySession},connected:!1,serverVersion:"",webTitle:"",dangerousBypassAuth:!1,backend:"v1",experimentalFlags:{},workspaceName:"kimi-code",connection:"disconnected",permission:Kce(),thinking:void 0,thinkingBySession:{},pendingThinkingBySession:{},planModeBySession:dm(hn.planMode),planArmedBySession:dm(L$),swarmModeBySession:dm(N$),goalModeBySession:dm(F$),loading:!1,sessionLoading:!1,queuedBySession:{},promptIdBySession:{},inFlightBySession:{},unreadBySession:c6(),authReady:!1,defaultModel:null,managedProviderStatus:null,managedUserInfo:null,managedMembership:null,workspaces:[],activeWorkspaceId:Zce(),fsHome:null,recentRoots:[],hiddenWorkspaceRoots:Gce(),availableOpenInApps:[],config:null,sideChatMessagesByAgent:{},sideChatSendingByAgent:{},sideChatUserMessageIdsBySession:{},messagesLoadingMoreBySession:{},messagesHasMoreBySession:{},messagesLoadMoreErrorBySession:{},sessionsHasMoreByWorkspace:{},sessionsLoadingMoreByWorkspace:{},sessionsCursorByWorkspace:{},sessionsInitialCountByWorkspace:{},sessionsFullyLoaded:!1,flatSessionsNextPageToken:null,flatSessionsHasMore:!0,flatSessionsLoading:!1,flatSessionsLoadingMore:!1,flatSessionsSeeded:!1,flatSessionsFrontier:null,doneSessions:[],doneSessionsNextPageToken:null,doneSessionsHasMore:!0,doneSessionsLoading:!1,doneSessionsLoadingMore:!1,doneSessionsSeeded:!1,draftEntry:"newChat",mainView:"chat"}),eu=Ss({}),v6=Ss({}),gp=new Map,G1=new Map;function Xce(e,t){return`${e}\0${t??"*"}`}function z$(e,t,n){v6[t]=n;const i=eu[e]?.[t];i&&(eu[e]={...eu[e],[t]:{...i,review:n}})}async function o0(e,t){if(t!==void 0){o0(e);return}const n=Xce(e,t),i=(gp.get(n)??0)+1;gp.set(n,i),t!==void 0&&G1.set(e,(G1.get(e)??0)+1);const s=G1.get(e)??0;try{const o=await Pt().getSessionPlans(e,{agentId:"main",toolCallId:t});if(gp.get(n)!==i||t===void 0&&(G1.get(e)??0)!==s||!Me.sessions.some(l=>l.id===e))return;const r=Object.fromEntries(o.map(l=>[l.toolCallId,l]));for(const[l,a]of Object.entries(r)){const u=v6[l];u&&(!a.review||a.review.state==="pending")&&(r[l]={...a,review:u})}eu[e]=t===void 0?r:{...eu[e],...r}}catch(o){ya("[refreshSessionPlans] plan history unavailable for",e,o)}}function ede(e){const t=`${e}\0`;for(const n of gp.keys())n.startsWith(t)&&gp.delete(n);G1.delete(e),delete eu[e]}function tde(e){delete eu[e]}const O0=Ss({planMode:!1,swarmMode:!1,goalMode:!1});function y6(e){Me.sessions=e}function Gy(e,t){Me.sessions=Me.sessions.map(n=>n.id===e?t(n):n)}function nde(e){Me.sessions=JD(Me.sessions,e)}function ide(e){Me.sessions=[...Me.sessions,e]}function sde(e){Me.sessions=Me.sessions.filter(t=>t.id!==e)}function R$(){const e=Me.activeSessionId;e&&Me.unreadBySession[e]&&typeof document<"u"&&document.visibilityState==="visible"&&(Me.unreadBySession[e]=!1,d6({[e]:!1}))}typeof window<"u"&&window.addEventListener("storage",e=>{e.key===hn.unread&&(Me.unreadBySession=c6(),R$())});function Hb(){if(Wr===null||!Wr.health().stale)return;dl("ws:stale-reconnect",{sessionId:Me.activeSessionId,status:"stale"}),que("ws: stale socket on focus, reconnecting",{activeSessionId:Me.activeSessionId}),Wr.reconnect();const e=Me.activeSessionId;e&&hv.request(e)}typeof document<"u"&&document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&(R$(),Hb())});typeof window<"u"&&(window.addEventListener("focus",Hb),window.addEventListener("online",Hb));function k6(e){Me.activeSessionId=e}function ode(e){vr(Me.messagesBySession,e)}function rde(e,t){Me.messagesBySession[e]=t}function O$(e,t){Me.messagesBySession[e]=t(Me.messagesBySession[e]??[])}function lde(e){delete Me.messagesBySession[e]}function P$(e){Wr?.unsubscribe(e),cv.forgetSession(e),qb.delete(e),Lde(e),hh.discard(({meta:t})=>t.sessionId===e),sde(e),lde(e),ede(e),xo().clearSessionApprovals(e),xo().clearSessionQuestions(e),delete Me.tasksBySession[e],delete Me.goalBySession[e],Ao().clearSessionGitStatus(e),delete Me.lastSeqBySession[e],delete Me.compactionBySession[e],delete Me.messagesLoadingMoreBySession[e],delete Me.messagesHasMoreBySession[e],delete Me.messagesLoadMoreErrorBySession[e],delete Wb[e],fv.delete(e),n2.delete(e),Q$.delete(e),wce(e),delete Me.queuedBySession[e],delete Me.promptIdBySession[e],delete Me.inFlightBySession[e],delete Me.turnActiveBySession[e],delete Me.turnEndedPromptIdBySession[e],delete Me.turnErrorBySession[e],delete Me.turnRetryBySession[e],delete Me.planModeBySession[e],delete Me.planArmedBySession[e],delete Me.swarmModeBySession[e],delete Me.goalModeBySession[e],delete Me.thinkingBySession[e],delete Me.pendingThinkingBySession[e],m6(),D$(),$$(),Wo().unpinSession(e)}const j$=G(!1),H$=G(null);async function qd(e){let t;try{t=await Pt().getSessionStatus(e)}catch{return}Gy(e,n=>({...n,model:t.model||n.model,usage:{...n.usage,contextTokens:t.contextTokens,contextLimit:t.maxContextTokens}})),Me.swarmModeBySession[e]=t.swarmMode,Me.planModeBySession[e]=t.planMode,Tr(hn.planMode),t.thinkingEffort.length>0&&jD(Me,e,t.thinkingEffort)}const uv=new Set;function ade(e){uv.add(e),W$(e).finally(()=>{uv.delete(e)})}async function W$(e){const t=Me.goalVersionBySession[e]??0;let n;try{n=await Pt().getSessionGoal(e)}catch{return}(Me.goalVersionBySession[e]??0)===t&&(n===null||n.status==="complete"?delete Me.goalBySession[e]:Me.goalBySession[e]=n)}function q$(e,t){const n=t??Me.activeSessionId;if(!n)return Promise.resolve(!1);const i=e.thinking!==void 0?Me.pendingThinkingBySession[n]:void 0;return Promise.resolve(Pt().updateSession(n,e)).then(()=>(Xa(Me,n,i),qd(n))).then(()=>!0).catch(s=>(Xa(Me,n,i)&&qd(n),Uh("persistSessionProfile",s,{sessionId:n}),!1))}function U$(e){try{return To(e)??""}catch{return""}}function ude(){return typeof window>"u"?!1:new URLSearchParams(window.location.search).get("kimi_onboarded")==="1"}const K$=ude();if(K$&&U$(av)!=="1")try{Js(av,"1")}catch{}const V$=G(K$||U$(av)==="1");function cde(e){V$.value=e;try{Js(av,e?"1":"0")}catch{}e&&window.kimiDesktop?.setOnboarded?.()}let Wr=null;const cv=Hce({api:Pt(),connectEventsIfNeeded:b6,getEventConnection:()=>Wr});let ZS=0;function Z$(){return ZS+=1,`msg_opt_${Date.now().toString(36)}_${ZS}`}function GS(e,t,n){const i={sessions:Me.sessions,activeSessionId:Me.activeSessionId,messagesBySession:Me.messagesBySession,approvalsBySession:Me.approvalsBySession,planReviewByToolCallId:Me.planReviewByToolCallId,questionsBySession:Me.questionsBySession,tasksBySession:Me.tasksBySession,goalBySession:Me.goalBySession,goalVersionBySession:Me.goalVersionBySession,lastSeqBySession:Me.lastSeqBySession,turnActiveBySession:Me.turnActiveBySession,turnEndedPromptIdBySession:Me.turnEndedPromptIdBySession,turnErrorBySession:Me.turnErrorBySession,turnRetryBySession:Me.turnRetryBySession,compactionBySession:Me.compactionBySession,config:Me.config,warnings:Me.warnings},s=xie(i,e,{sessionId:t,seq:n},{t:(o,r)=>r===void 0?si(o):si(o,r)});s.sessions!==i.sessions&&y6(s.sessions),s.activeSessionId!==i.activeSessionId&&k6(s.activeSessionId),ode(s.messagesBySession),xo().applyApprovalsDiff(s.approvalsBySession),vr(Me.planReviewByToolCallId,s.planReviewByToolCallId),xo().applyQuestionsDiff(s.questionsBySession),vr(Me.tasksBySession,s.tasksBySession),vr(Me.goalBySession,s.goalBySession),vr(Me.goalVersionBySession,s.goalVersionBySession),vr(Me.lastSeqBySession,s.lastSeqBySession),vr(Me.turnActiveBySession,s.turnActiveBySession),vr(Me.turnEndedPromptIdBySession,s.turnEndedPromptIdBySession),vr(Me.turnErrorBySession,s.turnErrorBySession),vr(Me.turnRetryBySession,s.turnRetryBySession),vr(Me.compactionBySession,s.compactionBySession),s.config!==i.config&&(Me.config=s.config??null),Sie(s.warnings,i.warnings)||(Me.warnings=s.warnings),e.type==="goalUpdated"&&uv.delete(t),e.type==="configChanged"&&(Me.defaultModel=e.config.defaultModel??null),e.type==="modelCatalogChanged"&&(qn.loadModels(),qn.loadProviders()),e.type==="sessionUsageUpdated"&&(e.swarmMode!==void 0&&(Me.swarmModeBySession[e.sessionId]=e.swarmMode),e.planMode!==void 0&&(Me.planModeBySession[e.sessionId]=e.planMode),e.thinking!==void 0&&jD(Me,e.sessionId,e.thinking)),e.type==="sessionDeleted"&&(aB(e.sessionId),jS(e.sessionId)),e.type==="sessionUpdated"&&e.session.archived===!0&&jS(e.session.id)}function dde(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role==="user")return;if(n.role==="assistant")for(let i=n.content.length-1;i>=0;i--){const s=n.content[i];if(s.type==="toolUse"&&s.toolName==="ExitPlanMode")return s.toolCallId}}}function fde(e,t){const n=Me.lastSeqBySession[t.sessionId]??0,i=Me.turnActiveBySession[t.sessionId]??!1,s=e.type==="approvalResolved"||e.type==="approvalExpired"?Me.approvalsBySession[t.sessionId]?.find(r=>r.approvalId===e.approvalId&&r.toolName==="ExitPlanMode")?.toolCallId:void 0,o=Po.sideChatTargetBySession.value[t.sessionId];if(e.type==="messageCreated"&&e.message.role==="user"&&e.agentId!==void 0&&Object.prototype.hasOwnProperty.call(Me.sideChatMessagesByAgent,e.agentId)){GS({type:"unknown",raw:{_noop:!0}},t.sessionId,t.seq),Po.reconcileSideChatUserMessage(e.agentId,e.message);return}if(GS(e,t.sessionId,t.seq),o){const{agentId:r}=o,l=t.sessionId;e.type==="agentDelta"&&e.agentId===r?e.delta.text&&Po.appendSideChatAssistantText(r,l,e.delta.text):e.type==="agentTurnEnded"&&e.agentId===r?Po.finishSideChatAgent(r,l):e.type==="taskProgress"&&e.taskId===r?Po.appendSideChatAssistantText(r,l,e.outputChunk):e.type==="taskCompleted"&&e.taskId===r&&Po.finishSideChatAgent(r,l,e.outputPreview)}if(e.type==="messageCreated"&&e.message.role==="user"&&e.message.promptId!==void 0){const r=e.message.sessionId;Me.promptIdBySession[r]!==e.message.promptId&&(Me.promptIdBySession[r]=e.message.promptId)}if(e.type==="turnActiveChanged"&&!e.active&&t.seq>n){const r=e.reason;rhe(e.sessionId,r==="cancelled"||r==="failed"||r==="blocked"?"aborted":"idle",i);const l=dde(Me.messagesBySession[e.sessionId]??[]);l!==void 0&&o0(e.sessionId,l)}if(e.type==="sessionWorkChanged"&&(e.mainTurnActive===!1&&i||e.mainTurnActive===void 0&&!e.busy)&&t.seq>n&&ohe(e.sessionId),(e.type==="promptAborted"||e.type==="promptCompleted"&&e.reason==="blocked")&&t.seq>n&&Me.promptIdBySession[e.sessionId]===e.promptId&&Ft.finishPromptLocal(e.sessionId),e.type==="questionRequested"&&lhe(e.sessionId,e.question),e.type==="approvalRequested"&&ahe(e.sessionId,e.approval),s!==void 0){const r=e.type==="approvalResolved"?{state:e.decision,selectedOption:e.selectedLabel,feedback:e.feedback}:{state:"cancelled"};z$(t.sessionId,s,r),o0(t.sessionId,s)}}const hh=Mse(({appEvent:e,meta:t})=>fde(e,t),({appEvent:e})=>xse(e),{coalesce:Tse}),hde=3e4;let QS=0,Oo=null;const mp=new Map;let dv=0,ph=null;function pde(){ph!==null&&(clearTimeout(ph),ph=null)}function YS(e){if(!Me.connected||ph!==null)return;const t=Math.min(hde,1e3*2**dv);dv+=1,ya("[kimi-code] session work reconciliation incomplete; retrying",e),ph=setTimeout(()=>{ph=null,Me.connected&&G$()},t)}function gde(e,t){const n=new Map(e.map(u=>[u.id,u]));let i=!1,s=!1;const o={...Me.turnActiveBySession},r=[],l=new Map,a=Me.sessions.map(u=>{const c=n.get(u.id);if(c===void 0)return u;const d=t.workEventSeqBySession.get(u.id)??0,f=t.turnEventSeqBySession.get(u.id)??0,h=t.pendingEventBySession.get(u.id),g=d>c.lastSeq,m=f>c.lastSeq,y=h!==void 0&&h.seq>c.lastSeq,A=g||m&&u.mainTurnActive===!0?u.busy||u.mainTurnActive===!0:c.busy,b=g||m?u.mainTurnActive:c.mainTurnActive??(A?u.mainTurnActive:!1),C=y?h.source==="work"?u.pendingInteraction:(Me.approvalsBySession[u.id]?.length??0)>0?"approval":(Me.questionsBySession[u.id]?.length??0)>0?"question":"none":c.pendingInteraction??(A?u.pendingInteraction:"none");(y&&h.source==="work"||!y&&(c.pendingInteraction!==void 0||c.busy===!1))&&C!==void 0&&l.set(u.id,C);const v=g?u.lastTurnReason:c.lastTurnReason;mp.set(u.id,Math.max(mp.get(u.id)??0,c.lastSeq));const x=t.turnStartBySession.get(u.id);return(b===!1||b===void 0&&!A)&&t.witnessedTurnBySession.has(u.id)&&x!==void 0&&Ft.isLocalTurnSnapshotCurrent(u.id,x)&&r.push(u.id),b===!0&&!o[u.id]?(o[u.id]=!0,s=!0):(b===!1||!A)&&o[u.id]&&(delete o[u.id],s=!0),u.busy===A&&u.mainTurnActive===b&&u.pendingInteraction===C&&u.lastTurnReason===v?u:(i=!0,{...u,busy:A,mainTurnActive:b,pendingInteraction:C,lastTurnReason:v})});i&&y6(a),s&&vr(Me.turnActiveBySession,o);for(const[u,c]of l)c==="none"?(xo().clearSessionApprovals(u),xo().clearSessionQuestions(u)):c==="question"&&xo().clearSessionApprovals(u);for(const u of r)Ft.finishPromptLocal(u,{turnWasActive:!0})}async function G$(){const e={workEventSeqBySession:new Map,turnEventSeqBySession:new Map,pendingEventBySession:new Map,turnStartBySession:new Map(Me.sessions.map(t=>[t.id,Ft.localTurnStartState(t.id)])),witnessedTurnBySession:new Set(Me.sessions.filter(t=>Me.inFlightBySession[t.id]||Me.turnActiveBySession[t.id]).map(t=>t.id))};Oo=e;try{const t=await Ft.listAllSessionsGlobal({shouldContinue:()=>Oo===e&&Me.connected});if(Oo!==e||!Me.connected)return;hh.flush(),gde(t.sessions,e),Oo=null,t.error!==void 0?YS(t.error):dv=0}catch(t){if(Oo!==e||!Me.connected)return;Oo=null,YS(t)}}function b6(){if(Wr!==null||typeof WebSocket>"u")return;dl("ws:connection",{status:"connecting"}),Me.connection="connecting",Wr=Pt().connectEvents({onEvent(t,n){if(t.type==="workspaceCreated"||t.type==="workspaceUpdated"||t.type==="workspaceDeleted"){if(t.type==="workspaceDeleted"){const r=Me.sessions.filter(l=>l.workspaceId===t.workspaceId||l.cwd===t.root).map(l=>l.id);Kue(t.workspaceId,t.root,r)}Ft.applyWorkspaceEvent(t);return}if((t.type==="pluginsChanged"||t.type==="capabilityChanged")&&Zue(t))return;const i=t.type==="sessionWorkChanged",s=t.type==="turnActiveChanged",o=t.type==="approvalRequested"||t.type==="approvalResolved"||t.type==="approvalExpired"||t.type==="questionRequested"||t.type==="questionAnswered"||t.type==="questionDismissed";if((i||s||o)&&n.seq>0){const r=mp.get(n.sessionId)??0;if(n.seq<=r)return;mp.set(n.sessionId,n.seq)}if(Oo!==null&&(i||s||o))if(i){const r=Oo.workEventSeqBySession.get(n.sessionId)??0;if(n.seq>r&&Oo.workEventSeqBySession.set(n.sessionId,n.seq),t.pendingInteraction!==void 0||!t.busy){const l=Oo.pendingEventBySession.get(n.sessionId);(l===void 0||n.seq>l.seq)&&Oo.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"work"})}}else if(s){const r=Oo.turnEventSeqBySession.get(n.sessionId)??0;n.seq>r&&Oo.turnEventSeqBySession.set(n.sessionId,n.seq)}else{const r=Oo.pendingEventBySession.get(n.sessionId);(r===void 0||n.seq>r.seq)&&Oo.pendingEventBySession.set(n.sessionId,{seq:n.seq,source:"interaction"})}for(const r of Ese({appEvent:t,meta:n}))hh(r)},onResync(t,n,i){dl("ws:resync",{sessionId:t,status:"required",seq:n}),hh.flush(),fv.add(t),hv.request(t)},onError(t,n,i){dl("ws:error",{status:"failed",errorCode:t,fatal:i}),P0({severity:"error",title:si("warnings.wsTitle"),message:n,details:[os("message",n)].filter(s=>s!==void 0)})},onConnectionChange(t){dl("ws:connection",{status:t?"connected":"disconnected"}),Me.connected=t,Me.connection=t?"connected":"disconnected",t||(Oo=null,mp.clear(),pde(),dv=0),t&&(QS+=1,wde(),Ft.refreshServerMeta())},onReplayComplete(){hh.flush(),QS>1&&G$()},onTranscriptReset(t,n,i,s){cv.receiveReset(t,n,i,s)},onTranscriptOps(t,n,i,s){return cv.applyOps(t,n,i,s)}})}const Wb={},fv=new Set,n2=new Set,Q$=new Set;function mde(e){return zs(e)&&e.code===VS?!0:typeof e=="object"&&e!==null&&e.code===VS}function os(e,t){if(!(t==null||t===""))return{label:si(`warnings.details.${e}`),value:Y$(t)}}function Y$(e){if(e instanceof Error)return typeof e.stack=="string"&&e.stack?e.stack:e.message?`${e.name}: ${e.message}`:e.name;if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function vde(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.name=="string"?e.name:void 0}function yde(e){return e instanceof Error||typeof e=="object"&&e!==null&&typeof e.message=="string"?e.message:void 0}function kde(e){return e instanceof Error&&typeof e.stack=="string"&&e.stack?e.stack:void 0}function bde(e){if(!(typeof e!="number"||!Number.isFinite(e)))return new Date(e).toISOString()}function JS(e){if(!(typeof e!="number"||!Number.isFinite(e)))return`${Math.round(e)}ms`}function Ade(e,t,n){const i=Dy(t),s=zs(t),o=i||s?t.timestamp:void 0,r=i||s?t.durationMs:void 0,l=[os("operation",e),os("sessionId",n??Me.activeSessionId),os("connection",Me.connection),os("timestamp",bde(o??Date.now()))];return i?l.push(os("duration",JS(r)),os("request",`${t.method} ${t.path}`),os("endpoint",t.url),os("requestId",t.requestId),os("phase",t.phase),os("timeout",`${t.timeoutMs}ms`),os("status",t.status===void 0?void 0:`${t.status} ${t.statusText??""}`.trim()),os("contentType",t.contentType),os("responsePreview",t.bodyPreview),os("cause",t.cause)):s?l.push(os("duration",JS(r)),os("code",t.code),os("requestId",t.requestId),os("message",t.message),os("details",t.details)):l.push(os("errorName",vde(t)),os("message",yde(t)??Y$(t)),os("stack",kde(t))),l.filter(a=>a!==void 0)}function Cde(e,t,n={}){const i=Dy(t),s=zs(t),o=xQ(t),r=n.title??si(i?o?"warnings.daemonTimeoutTitle":"warnings.daemonNetworkTitle":s?"warnings.daemonApiTitle":"warnings.operationFailedTitle"),l=n.message??(i?si(o?"warnings.daemonTimeoutMessage":"warnings.daemonNetworkMessage"):s?t.message:si("warnings.operationFailedMessage"));return{severity:"error",title:r,message:l,details:Ade(e,t,n.sessionId)}}function P0(e){Me.warnings=[...Me.warnings,e]}function wde(){const e=si("warnings.wsTitle"),t=Me.warnings.filter(n=>!(typeof n=="object"&&n!==null&&n.severity==="error"&&n.title===e));t.length!==Me.warnings.length&&(Me.warnings=t)}function Uh(e,t,n){Ua(`[kimi-code] operation failed: ${e}`,t);const i=zs(t),s=Dy(t);dl("operation:failed",{sessionId:n?.sessionId,status:"failed",operation:e,errorName:t instanceof Error?t.name:typeof t,errorCode:i?t.code:void 0,requestId:i||s?t.requestId:void 0,phase:s?t.phase:void 0,httpStatus:s?t.status:void 0}),P0(Cde(e,t,n))}const xde={40913:"warnings.goal.alreadyExists",40914:"warnings.goal.notFound",40915:"warnings.goal.statusInvalid",40916:"warnings.goal.notResumable",40918:"warnings.goal.objectiveTooLong"};function Sde(e){if(!zs(e)||e.code===void 0)return;const t=xde[e.code];return t?si(t):void 0}async function _de(e){if(P$(e),Me.activeSessionId!==e)return;const t=Me.sessions[0];t?await Ft.selectSession(t.id,{urlMode:"replace",skipTrack:!0}):(k6(void 0),Me.sessionLoading=!1,Ft.writeSessionUrl(void 0,"replace"))}const XS=new Set;async function Ide(e){if(!XS.has(e)){XS.add(e);try{const t=await Pt().getSessionWarnings(e),n=si("warnings.noteLabel");for(const i of t)P0(`${n}: ${i.message}`)}catch{}}}async function A6(e,t){const n=Ft.localTurnStartState(e);try{const s=await Pt().getSessionSnapshot(e);if(!Me.sessions.some(d=>d.id===e))return"ok";hh.flush();const o=Me.lastSeqBySession[e]??0,r=Wb[e],l=fv.has(e)||pv.has(e);if(!l&&r!==void 0&&r===s.epoch&&o>s.asOfSeq)return n2.delete(e)||(n2.add(e),hv.request(e)),"ok";if(!Ft.isLocalTurnSnapshotCurrent(e,n))return Ft.afterLocalTurnStartsSettle(e,()=>{hv.request(e)}),"ok";const a=Me.turnRetryBySession[e];a!==void 0&&a.turnId!==s.inFlightTurn?.turnId&&delete Me.turnRetryBySession[e],(l||s.session.lastTurnReason!=="failed")&&delete Me.turnErrorBySession[e];const u=Z2(s.session.usage),c=s.session.mainTurnActive??(s.inFlightTurn!==null&&s.session.busy);Gy(e,d=>LQ(d,s.session,c)),rde(e,Sae(Me.messagesBySession[e]??[],s.messages)),Me.tasksBySession[e]=$ae(s.subagents,Me.tasksBySession[e]??[]),Me.messagesHasMoreBySession[e]=s.hasMoreMessages,xo().setSessionApprovals(e,s.pendingApprovals);for(const d of s.pendingApprovals){const f=d.display;f?.kind==="plan_review"&&typeof f.plan=="string"&&f.plan.length>0&&(Me.planReviewByToolCallId[d.toolCallId]={plan:f.plan,path:typeof f.path=="string"?f.path:void 0})}return xo().setSessionQuestions(e,s.pendingQuestions),Me.lastSeqBySession[e]=s.asOfSeq,Wb[e]=s.epoch,fv.delete(e),n2.delete(e),Ft.handleSessionSnapshot(e,{inFlightTurn:s.inFlightTurn,busy:s.session.busy}),c?Me.turnActiveBySession[e]=!0:delete Me.turnActiveBySession[e],b6(),Wr&&(Wr.seedSnapshot(e,s),Wr.subscribe(e,{seq:s.asOfSeq,epoch:s.epoch}),Tde(e)),pv.delete(e),u&&t?.skipStatusRefresh!==!0&&qd(e),Ide(e),"ok"}catch(i){return mde(i)?(await _de(e),"not-found"):(Uh("getSessionSnapshot",i,{title:si("warnings.sessionSnapshotTitle"),message:si("warnings.sessionSnapshotMessage"),sessionId:e}),"failed")}}const hv=_ae(A6);function Mde(e){return Object.prototype.hasOwnProperty.call(Me.messagesBySession,e)}const Ede=4,Oa=[],pv=new Set;function Tde(e){const t=Oa.indexOf(e);for(t!==-1&&Oa.splice(t,1),Oa.unshift(e);Oa.length>Ede;){let n=-1;for(let s=Oa.length-1;s>=0;s--)if(Oa[s]!==Me.activeSessionId){n=s;break}if(n===-1)break;const[i]=Oa.splice(n,1);if(i===void 0)break;Wr?.unsubscribe(i),pv.add(i)}}function Lde(e){const t=Oa.indexOf(e);t!==-1&&Oa.splice(t,1),pv.delete(e)}async function Nde(e){return A6(e)}function Ud(e,t){return(Me.inFlightBySession[e]??!1)||(Me.turnActiveBySession[e]??!1)||(t??Me.sessions.find(n=>n.id===e)?.mainTurnActive??!1)}function nf(e){try{const t=new Date(e),i=Date.now()-t.getTime(),s=i/36e5;if(i<6e4)return si("sessions.justNow");if(s<1)return`${Math.round(i/6e4)}m`;if(s<24)return`${Math.round(s)}h`;const o=i/864e5;return o<7?`${Math.round(o)}d`:o<30?`${Math.round(o/7)}w`:o<365?`${Math.round(o/30)}mo`:`${Math.round(o/365)}y`}catch{return e}}const Fde=3e4,ac=G(0);let s3=null;function Dde(){s3===null&&(s3=setInterval(()=>{ac.value=(ac.value+1)%Number.MAX_SAFE_INTEGER},Fde),s3.unref?.())}function $de(e){return{questionId:e.questionId,sessionId:e.sessionId,toolCallId:e.toolCallId,questions:e.questions.map(t=>({id:t.id,question:t.question,header:t.header,body:t.body,options:t.options.map(n=>({id:n.id,label:n.label,description:n.description,recommended:n.recommended})),multiSelect:t.multiSelect,allowOther:t.allowOther,otherLabel:t.otherLabel}))}}const Bde=L(()=>{const e=Me.activeSessionId,t=e?Me.messagesBySession[e]??[]:[],n=new Map;for(const s of t)if(s.role==="assistant")for(const o of s.content){if(o.type!=="toolUse"||o.toolName!=="Bash"&&o.toolName!=="bash")continue;const r=o.input,l=r&&typeof r.command=="string"?r.command:void 0;l&&n.set(o.toolCallId,l)}const i=new Map;if(n.size===0)return i;for(const s of t)if(s.role==="tool")for(const o of s.content){if(o.type!=="toolResult")continue;const r=Y5(o.output);if(!r)continue;let l;for(const u of r){const c=/task_id:\s*(\S+)/.exec(u);if(c?.[1]){l=c[1];break}}if(!l)continue;const a=n.get(o.toolCallId);a&&i.set(l,a)}return i});function J$(e){return Bde.value.get(e.id)}const zde=L(()=>{const e=Me.activeSessionId,t=e?Me.messagesBySession[e]??[]:[],n=new Map;for(const i of t)if(i.role==="assistant")for(const s of i.content){if(s.type!=="toolUse")continue;const o=s.input,r=o&&typeof o.prompt=="string"?o.prompt:void 0;r&&!n.has(s.toolCallId)&&n.set(s.toolCallId,r);const l=o?.items;if(!r&&Array.isArray(l)&&!n.has(s.toolCallId)){const a=l.filter(u=>typeof u=="string");a.length>0&&n.set(s.toolCallId,a)}}return n});function Rde(e){if(!e.parentToolCallId)return;const t=zde.value.get(e.parentToolCallId);return Array.isArray(t)?e.swarmIndex!==void 0?t[e.swarmIndex]:void 0:t}function Ode(e){let t;e.status==="running"?t="run":e.status==="completed"?t="done":e.status==="cancelled"?t="cancelled":t="fail";let n="",i;if(e.status==="running"&&e.startedAt){i=Date.now()-new Date(e.startedAt).getTime();const l=Math.round(i/1e3),a=Math.floor(l/60),u=l%60;n=si("tasks.timingRunning",{time:`${a}:${String(u).padStart(2,"0")}`})}else e.completedAt&&e.startedAt&&!e.completedAtEstimated?(i=new Date(e.completedAt).getTime()-new Date(e.startedAt).getTime(),n=si("tasks.timingDone",{time:su(i,{h:si("status.timeUnitHour"),m:si("status.timeUnitMinute"),s:si("status.timeUnitSecond")})})):n=e.status;const s=e.outputLines&&e.outputLines.length>0?e.outputLines:e.outputPreview?e.outputPreview.split(/\r?\n/):void 0,o=e.command??J$(e),r=e.kind==="bash"&&o?`$ ${o}`:e.kind==="subagent"?Rde(e)??e.subagentType:void 0;return{id:e.id,agentId:e.agentId,backgroundTaskId:e.backgroundTaskId,name:e.description,kind:e.kind,state:t,timing:n,durationMs:i,meta:r,output:s,runInBackground:e.runInBackground,parentToolCallId:e.parentToolCallId,swarmIndex:e.swarmIndex,completedAt:e.completedAt,createdAt:e.createdAt,model:e.model,thinkingEffort:e.thinkingEffort}}const Pde=L(()=>{const e=Me.sessions.find(n=>n.id===Me.activeSessionId),t=e?e.cwd.split("/").pop()??e.cwd:"main";return{name:Me.workspaceName,branch:t}}),jde=L(()=>(ac.value,Me.sessions.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).map(e=>({id:e.id,title:e.title,time:nf(e.updatedAt),busy:Ud(e.id,e.mainTurnActive),pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason,workspaceId:cr(e),cwd:e.cwd})))),Hde=L(()=>Me.activeSessionId??""),Wde=L(()=>{const e=Me.activeSessionId;if(e)return qn.skillsBySession.value[e]??[];const t=W0.value;return t?qn.skillsByWorkspace.value[t]??[]:[]}),qde=L(()=>{const e=Me.activeSessionId;if(e)return qn.skillsFetchedBySession.value[e]===!0;const t=W0.value;return t?qn.skillsFetchedByWorkspace.value[t]===!0:!1}),C6=L(()=>{const e=Me.activeSessionId;return e?Me.inFlightBySession[e]??!1:!1}),Ude=L(()=>Ft.isStartingFirstPrompt()),Po=Due(Me,{api:Pt(),pushOperationFailure:Uh,nextOptimisticMsgId:Z$,connectEventsIfNeeded:b6,getEventConn:()=>Wr,resolveThinkingForPrompt:(e,t)=>qn.resolveThinkingForPrompt(e,t),refreshSessionStatus:qd}),j0=L(()=>{const e=Me.activeSessionId;if(!e)return[];const t=Po.sideChatTargetBySession.value[e]?.agentId;return(Me.tasksBySession[e]??[]).filter(n=>n.id!==t)}),X$=Fue(Me,j0,{api:Pt()}),H0=L(()=>{const e=Me.activeSessionId;return e?(Me.turnActiveBySession[e]??!1)||(Me.sessions.find(t=>t.id===e)?.mainTurnActive??!1):!1}),Kde=L(()=>{const e=Me.activeSessionId;if(e)return Me.turnErrorBySession[e]}),Vde=L(()=>{const e=Me.activeSessionId;if(e&&H0.value)return Me.turnRetryBySession[e]}),eB=e=>Pt().getFileUrl(e),tB=(e,t)=>Pt().getSessionMediaUrl(e,t),Zde=[],Gde=_D(),nB=L(()=>{const e=Me.activeSessionId;if(!e)return[];const t=new Set(Me.sideChatUserMessageIdsBySession[e]??[]);return Gde({messages:(Me.messagesBySession[e]??[]).filter(n=>!t.has(n.id)),approvals:Me.approvalsBySession[e]??Zde,getFileUrl:eB,getSessionMediaUrl:tB,sessionActive:H0.value,planReviewByToolCallId:Me.planReviewByToolCallId,plansByToolCallId:eu[e]})}),Qde=L(()=>C6.value||H0.value),qb=new Map,Yde=L(()=>{X$.taskClock.value;const e=j0.value.map(Ode),t=Me.activeSessionId;if(t){let n=qb.get(t);n||(n=new Map,qb.set(t,n));const i=e.filter(r=>r.kind==="subagent"&&r.runInBackground);for(const r of i){const l=r.agentId??r.id;if(r.agentId!==void 0&&r.backgroundTaskId!==void 0&&!n.has(l)){const a=n.get(r.backgroundTaskId);a!==void 0&&(n.delete(r.backgroundTaskId),n.set(l,a))}}const s=i.filter(r=>!n.has(r.agentId??r.id)).sort((r,l)=>(r.createdAt??"").localeCompare(l.createdAt??""));let o=n.size===0?0:Math.max(...n.values())+1;for(const r of s)n.set(r.agentId??r.id,o++);for(const r of i)r.swarmIndex=n.get(r.agentId??r.id)}return e}),iB=L(()=>Hse(j0.value)),Jde=L(()=>qse(j0.value)),Pf=L(()=>{const e=Me.activeSessionId;return e?Me.goalBySession[e]??null:null}),Xde=L(()=>{const e=Me.activeSessionId;return e?Nse(Me.messagesBySession[e]??[]):[]}),efe=L(()=>{const e=Me.activeSessionId;return e?Me.compactionBySession[e]??null:null}),tfe=L(()=>Me.connection),nfe=L(()=>Me.loading),ife=L(()=>Me.sessionLoading),sfe=L(()=>{const e=Me.activeSessionId;return e?Me.messagesLoadingMoreBySession[e]??!1:!1}),ofe=L(()=>{const e=Me.activeSessionId;return e?Me.messagesHasMoreBySession[e]??!1:!1}),rfe=L(()=>{const e=Me.activeSessionId;return e?Me.messagesLoadMoreErrorBySession[e]??!1:!1}),lfe=L(()=>Me.serverVersion),sB=L(()=>Me.webTitle),afe=L(()=>Me.experimentalFlags),ufe=L(()=>Me.backend),cfe=L(()=>Me.dangerousBypassAuth);function dfe(){Me.dangerousBypassAuth=!1}const ffe=L(()=>Me.permission),hfe=L(()=>Me.thinking),oB=L(()=>{const e=Me.activeSessionId;return e?Me.planModeBySession[e]??!1:O0.planMode}),pfe=L(()=>{const e=Me.activeSessionId;return e?Me.planArmedBySession[e]??!1:O0.planMode}),gfe=L(()=>{const e=Me.activeSessionId;return e?Me.swarmModeBySession[e]??!1:O0.swarmMode}),mfe=L(()=>{const e=Me.activeSessionId;return e?Me.goalModeBySession[e]??!1:O0.goalMode}),vfe=L(()=>{const e=Me.activeSessionId,t=(e?eu[e]:void 0)??{},n={},i=new Set;for(const o of nB.value)for(const r of o.tools??[]){if(r.name!=="ExitPlanMode")continue;i.add(r.id);const l=t[r.id];if(l){n[r.id]=l;continue}const a=Me.planReviewByToolCallId[r.id],u=yfe(r.arg),c=a?.plan??u?.plan,d=r.planPath??a?.path;!c&&!d||(n[r.id]={agentId:"main",toolCallId:r.id,turnId:o.id,source:"interaction",plan:c??"",path:d,options:u?.options,review:v6[r.id]})}return{...Object.fromEntries(Object.entries(t).filter(([o])=>!i.has(o))),...n}});function yfe(e){try{const t=JSON.parse(e);return{plan:typeof t.plan=="string"?t.plan:void 0,options:Array.isArray(t.options)?t.options:void 0}}catch{return}}const kfe=L(()=>{const e=Wse(iB.value);return{plan:oB.value,goal:Pf.value&&Pf.value.status!=="complete"?{status:Pf.value.status,turnsUsed:Pf.value.turnsUsed,elapsedMs:Pf.value.wallClockMs}:null,swarm:e.total>0?e:null}}),bfe=L(()=>{const e=Me.activeSessionId;if(!e)return[];const t=Pt();return(Me.queuedBySession[e]??[]).map(n=>({id:n.id??n.text,text:n.text,attachmentCount:n.attachments?.length??0,attachments:n.attachments?.map(i=>C$(t,i))}))}),Afe=L(()=>Me.warnings),Cfe=L(()=>{const e=Me.activeSessionId;return e?(Me.questionsBySession[e]??[]).map($de):[]}),wfe=L(()=>{const e=Me.activeSessionId;return e?(Me.approvalsBySession[e]??[]).map(t=>({approvalId:t.approvalId,block:AD(t),agentName:t.agentName,toolCallId:t.toolCallId})):[]}),w6=L(()=>{const e=Me.activeSessionId;return e?(Me.approvalsBySession[e]??[]).length>0?"awaiting-approval":(Me.questionsBySession[e]??[]).length>0?"awaiting-question":C6.value||H0.value?"running":"idle":"idle"}),qn=Jue(Me,{api:Pt(),pushOperationFailure:Uh,refreshSessionStatus:qd,persistSessionProfile:q$,savePlanModeToStorage:m6,activity:w6,updateSession:Gy,updateSessionMessages:O$,loadConfig:()=>Ft.loadConfig(),checkAuth:()=>Ft.checkAuth(),beginLocalTurn:Pb,settleLocalTurn:jb}),Ub=L(()=>{const e=Me.activeSessionId;if(!e)return null;const t=Me.gitStatusBySession[e];return t?{branch:t.branch,ahead:t.ahead,behind:t.behind}:null}),xfe=L(()=>{const e=Me.activeSessionId;return e?Me.gitStatusBySession[e]?.pullRequest??null:null}),Sfe=L(()=>{const e=Me.activeSessionId;if(!e)return[];const t=Me.gitStatusBySession[e];return t?Object.entries(t.entries).map(([n,i])=>({path:n,status:i})).sort((n,i)=>n.path.localeCompare(i.path)):[]}),_fe=L(()=>{const e=Me.activeSessionId;if(!e)return null;const t=Me.gitStatusBySession[e];return t?{totalAdditions:t.additions,totalDeletions:t.deletions}:null}),rB=L(()=>{const e=Me.sessions.find(r=>r.id===Me.activeSessionId),t=Ub.value?.branch??(e?e.cwd.split("/").pop()??e.cwd:"main"),n=e===void 0?qn.draftModel.value:null,i=(e?.model&&e.model.length>0?e.model:n??Me.defaultModel)??"—",s=qn.models.value.find(r=>r.id===i)??qn.models.value.find(r=>r.model===i);return{model:s?.displayName||s?.model||(i.includes("/")?i.split("/").pop():i),modelId:s?.id??i,ctxUsed:e?.usage.contextTokens??0,ctxMax:e?.usage.contextLimit??0,permission:Me.permission,branch:t,cwd:e?.cwd??"",isGitRepo:Ub.value!==null}}),Ife=L(()=>Ao().fileDiffLines),Mfe=L(()=>Me.sessions.find(t=>t.id===Me.activeSessionId)?.usage.totalCostUsd??0),Efe=L(()=>Me.authReady),Tfe=L(()=>Me.defaultModel),Lfe=L(()=>Me.managedProviderStatus),Nfe=L(()=>Me.managedUserInfo),Ffe=L(()=>Me.managedMembership),Dfe=L(()=>Me.config),$fe=L(()=>{const e=Me.activeSessionId;if(!e)return{};const t=Me.gitStatusBySession[e];return t?{...t.entries}:{}}),Bfe=L(()=>{const e=new Map;for(const t of Me.workspaces){const n=Ml(t.root);e.has(n)||e.set(n,t.id)}return e});function cr(e){return Bfe.value.get(Ml(e.cwd))??e.workspaceId??e.cwd}const Qy=L(()=>_oe({workspaces:Me.workspaces,sessions:Me.sessions,hiddenWorkspaceRoots:Me.hiddenWorkspaceRoots,sessionsHasMoreByWorkspace:Me.sessionsHasMoreByWorkspace})),gv=G(Lae()),mv=G(Nae());function zfe(e){mv.value!==e&&(mv.value=e,Fae(e))}const r0=G(Dae());qe(()=>Me.sessions,e=>{const t=nue(e,cr),{next:n,changed:i}=tue(r0.value,t);i&&(r0.value=n,y$(n))});const lB=L(()=>iue(Qy.value,r0.value));qe(()=>[Qy.value.map(e=>e.id).join("\0"),Me.loading],([e,t])=>{if(t)return;const n=e?e.split("\0"):[],i=Yae(n,gv.value,lB.value);i!==null&&(gv.value=i,v$(i));const{next:s,changed:o}=sue(r0.value,new Set(n));o&&(r0.value=s,y$(s))});const x6=L(()=>Wo().pinnedSessionIds);function Rfe(e){Wo().pinSession(e)}function aB(e){Wo().unpinSession(e)}function Ofe(e){Wo().unpinSessions(e)}function Pfe(e){Wo().togglePinSession(e)}const Lr=L(()=>{const e=Qy.value.map(t=>({id:t.id,name:t.name,root:t.root,shortPath:Jce(t.root,Me.fsHome),sessionCount:t.sessionCount}));return mv.value==="recent"?eue(e,lB.value):Jae(e,gv.value)}),W0=L(()=>{const e=Me.activeWorkspaceId,t=Lr.value;return e&&t.some(n=>n.id===e)?e:t[0]?.id??null});qe(W0,e=>{e&&(Object.prototype.hasOwnProperty.call(qn.skillsByWorkspace.value,e)||qn.loadSkillsForWorkspace(e))},{immediate:!0});const uB=L(()=>{const e=W0.value;return e?Lr.value.find(t=>t.id===e)??null:null}),jfe=Uce({webTitle:sB,activeWorkspaceRoot:()=>uB.value?.root??null}),Hfe=L(()=>{ac.value;const e=new Set(Lr.value.map(n=>n.id)),t=new Map(Lr.value.map(n=>[n.id,n.name]));return Me.sessions.filter(n=>!n.parentSessionId&&e.has(cr(n))).map(n=>{const i=cr(n);return{id:n.id,title:n.title,time:nf(n.updatedAt),busy:Ud(n.id,n.mainTurnActive),pendingInteraction:n.pendingInteraction,lastTurnReason:n.lastTurnReason,lastPrompt:n.lastPrompt,workspaceId:i,workspaceName:t.get(i)}})}),Kb=G(qu),Yy=L(()=>{ac.value;const e=new Set(Lr.value.map(r=>r.id)),t=new Map(Lr.value.map(r=>[r.id,r.name])),n=new Set(x6.value),i=(r,l)=>new Date(l.updatedAt).getTime()-new Date(r.updatedAt).getTime(),s=Me.flatSessionsFrontier,o=[];for(const r of Me.sessions)r.parentSessionId||r.archived||n.has(r.id)||!e.has(cr(r))||!(qy({busy:Ud(r.id,r.mainTurnActive),unread:I6.value[r.id]??!1,questionCount:l0.value[r.id]?.questions??0,approvalCount:l0.value[r.id]?.approvals??0,pendingInteraction:r.pendingInteraction,lastTurnReason:r.lastTurnReason})!=="idle")&&s!==null&&new Date(r.updatedAt).getTime()<s||o.push(r);return o.sort(i),o.map(r=>{const l=cr(r);return{id:r.id,title:r.title,time:nf(r.updatedAt),busy:Ud(r.id,r.mainTurnActive),pendingInteraction:r.pendingInteraction,lastTurnReason:r.lastTurnReason,lastPrompt:r.lastPrompt,updatedAt:r.updatedAt,workspaceId:l,workspaceName:t.get(l),cwdLabel:r.cwd?uu(r.cwd):"-",pullRequest:r.pullRequest}})});function Wfe(e){return qy({busy:e.busy,unread:I6.value[e.id]??!1,questionCount:l0.value[e.id]?.questions??0,approvalCount:l0.value[e.id]?.approvals??0,pendingInteraction:e.pendingInteraction,lastTurnReason:e.lastTurnReason})!=="idle"}const S6=L(()=>{const e=Yy.value;let t=Kb.value;for(let n=e.length-1;n>=t;n--)if(Wfe(e[n])){t=n+1;break}return t}),qfe=L(()=>Yy.value.slice(0,S6.value)),Ufe=L(()=>Me.flatSessionsHasMore||S6.value<Yy.value.length);function Kfe(){Kb.value=S6.value+qu,Kb.value>Yy.value.length&&Me.flatSessionsHasMore&&Ft.loadMoreFlatSessions()}const vv=G(qu),_6=L(()=>{ac.value;const e=new Set(Lr.value.map(n=>n.id)),t=new Map(Lr.value.map(n=>[n.id,n.name]));return Me.doneSessions.filter(n=>e.has(cr(n))).map(n=>{const i=cr(n),s=Me.sessions.find(r=>r.id===n.id),o=s!==void 0&&new Date(s.updatedAt).getTime()>new Date(n.updatedAt).getTime()?s.updatedAt:n.updatedAt;return{id:n.id,title:n.title,time:nf(o),busy:s?.busy??n.busy,pendingInteraction:s?.pendingInteraction??n.pendingInteraction,lastTurnReason:s?.lastTurnReason??n.lastTurnReason,lastPrompt:n.lastPrompt,updatedAt:o,workspaceId:i,workspaceName:t.get(i),archived:!0,cwdLabel:n.cwd?uu(n.cwd):"-",pullRequest:n.pullRequest}}).sort((n,i)=>new Date(i.updatedAt).getTime()-new Date(n.updatedAt).getTime())}),Vfe=L(()=>_6.value.slice(0,vv.value)),Zfe=L(()=>Me.doneSessionsHasMore||vv.value<_6.value.length);function Gfe(){vv.value+=qu,vv.value>_6.value.length&&Me.doneSessionsHasMore&&Ft.loadMoreDoneSessions()}const Qfe=L(()=>{const e=Me.activeSessionId;return e?Me.sessions.find(t=>t.id===e)?.archived===!0:!1});function Yfe(e,t=6){if(!e)return[];const n=new Map(Lr.value.map(r=>[r.id,r.name])),i=(r,l)=>({id:r.id,title:r.title,time:nf(l??r.updatedAt),busy:l===void 0&&Ud(r.id,r.mainTurnActive),pendingInteraction:l===void 0?r.pendingInteraction:void 0,lastTurnReason:l===void 0?r.lastTurnReason:void 0,lastPrompt:r.lastPrompt,updatedAt:l??r.updatedAt,workspaceId:e,workspaceName:n.get(e),archived:l!==void 0,cwdLabel:r.cwd?uu(r.cwd):"-",pullRequest:r.pullRequest}),s=Me.sessions.filter(r=>!r.parentSessionId&&!r.archived&&cr(r)===e).sort((r,l)=>new Date(l.updatedAt).getTime()-new Date(r.updatedAt).getTime()),o=Me.doneSessions.filter(r=>cr(r)===e);return[...s.map(r=>i(r)),...o.map(r=>i(r,r.updatedAt))].slice(0,t)}function cB(e){ac.value;const t=new Set(x6.value),n=new Map,i=new Map;for(const s of Me.sessions.toSorted((o,r)=>new Date(r.updatedAt).getTime()-new Date(o.updatedAt).getTime())){if(s.parentSessionId||s.archived)continue;const o=cr(s);if(e&&t.has(s.id)){i.set(o,(i.get(o)??0)+1);continue}const r={id:s.id,title:s.title,time:nf(s.updatedAt),busy:Ud(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt},l=n.get(o)??[];l.push(r),n.set(o,l)}return Lr.value.map(s=>({workspace:s,sessions:n.get(s.id)??[],pinnedCount:i.get(s.id)??0,hasMore:Me.sessionsHasMoreByWorkspace[s.id]??!1,loadingMore:Me.sessionsLoadingMoreByWorkspace[s.id]??!1,initialCount:Me.sessionsInitialCountByWorkspace[s.id]??e2}))}const Jfe=L(()=>cB(!0)),Xfe=L(()=>cB(!1)),ehe=L(()=>{ac.value;const e=new Set(Lr.value.map(s=>s.id)),t=new Map(Lr.value.map(s=>[s.id,s.name])),n=Me.sessions.filter(s=>!s.parentSessionId&&!s.archived&&e.has(cr(s)));return Qoe(n,x6.value).pinned.toSorted((s,o)=>new Date(o.updatedAt).getTime()-new Date(s.updatedAt).getTime()).map(s=>{const o=cr(s);return{id:s.id,title:s.title,time:nf(s.updatedAt),busy:Ud(s.id,s.mainTurnActive),pendingInteraction:s.pendingInteraction,lastTurnReason:s.lastTurnReason,updatedAt:s.updatedAt,workspaceId:o,workspaceName:t.get(o),pinned:!0,cwdLabel:s.cwd?uu(s.cwd):"-",pullRequest:s.pullRequest}})});function the(e){gv.value=e,v$(e)}const dB=L(()=>{const e={};for(const[t,n]of Object.entries(Me.approvalsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);for(const[t,n]of Object.entries(Me.questionsBySession))n.length>0&&(e[t]=(e[t]??0)+n.length);return e}),l0=L(()=>{const e={};for(const[t,n]of Object.entries(Me.approvalsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).approvals=n.length);for(const[t,n]of Object.entries(Me.questionsBySession))n.length>0&&((e[t]??={approvals:0,questions:0}).questions=n.length);return e}),I6=L(()=>{const e={};for(const[t,n]of Object.entries(Me.unreadBySession))n&&(e[t]=!0);return e}),nhe=L(()=>{const e={},t=dB.value;for(const n of Me.sessions){const i=t[n.id]??0;if(i<=0)continue;const s=cr(n);e[s]=(e[s]??0)+i}return e}),ihe=L(()=>Me.recentRoots),she=L(()=>Me.availableOpenInApps),Ft=_ce(Me,{taskPoller:X$,sideChat:Po,modelProvider:qn,pushOperationFailure:Uh,notify:P0,activity:w6,sessionsKnownEmpty:Q$,setSessions:y6,updateSession:Gy,upsertSessionSorted:nde,appendSession:ide,forgetSession:P$,unpinSessions:Ofe,setActiveSessionId:k6,updateSessionMessages:O$,nextOptimisticMsgId:Z$,getEventConn:()=>Wr,syncSessionFromSnapshot:A6,reopenSession:Nde,hasLoadedMessages:Mde,refreshSessionStatus:qd,refreshSessionGoal:W$,refillSessionGoalOnReload:ade,refreshSessionPlans:o0,settlePlanReviewLocally:z$,persistSessionProfile:q$,mergedWorkspaces:Qy,workspacesView:Lr,status:rB,workspaceIdForSession:cr,savePermissionToStorage:Vce,savePlanModeToStorage:m6,saveSwarmModeToStorage:D$,saveGoalModeToStorage:$$,draftModes:O0,saveUnread:d6,saveActiveWorkspaceToStorage:Yce,saveHiddenWorkspacesToStorage:Qce,goalErrorMessage:Sde,initialized:j$,connectIssue:H$}),Si=Nce({pushOperationFailure:Uh,applySessionsArchivedLocally:Ft.applySessionsArchivedLocally});qe(()=>Me.mainView,e=>{e==="sessionAdmin"&&Si.ensureSeeded()});function M6(e){return e===Me.activeSessionId&&typeof document<"u"&&document.visibilityState==="visible"&&document.hasFocus()}function ohe(e){Me.turnActiveBySession[e]&&delete Me.turnActiveBySession[e],Me.inFlightBySession[e]&&(Me.inFlightBySession[e]=!1)}function rhe(e,t,n){const i=Me.promptIdBySession[e],s=Me.goalBySession[e]?.status==="active"||uv.has(e);Ft.finishPromptLocal(e,{turnWasActive:n}),(Me.experimentalFlags?.auto_session_title??Me.config?.experimental?.auto_session_title)===!0&&Ft.maybeGenerateSessionTitle(e),Ao().loadGitStatus(e),e===Me.activeSessionId?qd(e):t==="idle"&&!s&&(Me.unreadBySession[e]=!0,d6({[e]:!0}));const o=(Me.approvalsBySession[e]??[]).length>0,r=(Me.questionsBySession[e]??[]).length>0;!s&&Fce(t,o,r)&&Ou().maybeNotifyCompletion(e,{isUserWatching:M6(e),sessionTitle:Me.sessions.find(l=>l.id===e)?.title??"",promptId:i,onClick:()=>{Ft.selectSession(e,{source:"notification"})}})}function lhe(e,t){const n=t.questions[0],i=n?.header?.trim()??"",s=n?.question?.trim()??"",o=i&&s?`${i}: ${s}`:s||i;Ou().maybeNotifyQuestion({isUserWatching:M6(e),sessionTitle:Me.sessions.find(r=>r.id===e)?.title??"",questionPreview:o,questionId:t.questionId,onClick:()=>{Ft.selectSession(e,{source:"notification"})}})}function ahe(e,t){Ou().maybeNotifyApproval({isUserWatching:M6(e),sessionTitle:Me.sessions.find(n=>n.id===e)?.title??"",toolName:t.toolName,approvalId:t.approvalId,onClick:()=>{Ft.selectSession(e,{source:"notification"})}})}function Kl(){return Dde(),{workspace:Pde,sessions:jde,activeSessionId:Hde,workspacesView:Lr,workspaceSortMode:mv,visibleWorkspace:uB,activeWorkspaceId:W0,sessionsForView:Hfe,workspaceGroups:Jfe,mobileWorkspaceGroups:Xfe,pinnedSessions:ehe,flatSessions:qfe,flatSessionsHasMore:Ufe,flatSessionsLoadingMore:L(()=>Me.flatSessionsLoadingMore),doneSessions:Vfe,doneSessionsHasMore:Zfe,doneSessionsLoadingMore:L(()=>Me.doneSessionsLoadingMore),activeSessionArchived:Qfe,recentSessionsForWorkspace:Yfe,draftEntry:L(()=>Me.draftEntry),mainView:L(()=>Me.mainView),attentionBySession:dB,pendingBySession:l0,attentionByWorkspace:nhe,unreadBySession:I6,recentRoots:ihe,turns:nB,tasks:Yde,activeAppTasks:j0,findBashCommandForTask:J$,auxiliaryTranscripts:cv,getFileUrl:eB,getSessionMediaUrl:tB,todos:Xde,goal:Pf,sessionPlans:vfe,refreshSessionPlans:o0,invalidateSessionPlans:tde,swarms:iB,swarmMembersByToolCallId:Jde,activationBadges:kfe,compaction:efe,status:rB,sessionCost:Mfe,fileDiff:Ife,selectedDiffPath:L(()=>Ao().selectedDiffPath),fileDiffLoading:L(()=>Ao().fileDiffLoading),fileDiffTexts:L(()=>Ao().fileDiffTexts),fileDiffEmptyFile:L(()=>Ao().fileDiffEmptyFile),changes:Sfe,gitInfo:Ub,gitDiffStats:_fe,activePullRequest:xfe,changesByPath:$fe,pendingApprovals:wfe,availableOpenInApps:she,connection:tfe,loading:nfe,sessionLoading:ife,loadingMoreMessages:sfe,hasMoreMessages:ofe,loadMoreMessagesError:rfe,serverVersion:lfe,webTitle:sB,documentBaseTitle:jfe,backend:ufe,dangerousBypassAuth:cfe,experimentalFlags:afe,clearDangerousBypassAuth:dfe,initialized:j$,connectIssue:H$,permission:ffe,thinking:hfe,planMode:oB,planArmed:pfe,swarmMode:gfe,goalMode:mfe,queued:bfe,warnings:Afe,questions:Cfe,activity:w6,turnActive:H0,activeTurnError:Kde,activeTurnRetry:Vde,inFlight:C6,working:Qde,isStartingFirstPrompt:Ude,models:qn.models,starredModelIds:qn.starredModelIds,providers:qn.providers,fontScale:cm.fontScale,setFontScale:cm.setFontScale,colorScheme:cm.colorScheme,setColorScheme:cm.setColorScheme,notifyEnabled:L(()=>Ou().notifyEnabled),notifySound:L(()=>Ou().notifySound),notifyPermission:L(()=>Ou().notifyPermission),setNotifyEnabled:e=>Ou().setNotifyEnabled(e),setNotifySound:e=>Ou().setNotifySound(e),onboarded:V$,setOnboarded:cde,load:Ft.load,selectSession:Ft.selectSession,clearActiveSession:Ft.clearActiveSession,openSessionAdmin:e=>{e!==void 0&&Si.applyFilters({workspaceIds:[e],status:"all",updatedFrom:"",updatedTo:""}),Ft.openSessionAdmin()},closeSessionAdmin:Ft.closeSessionAdmin,sessionAdminItems:L(()=>Si.state.items),sessionAdminTotal:L(()=>Si.state.total),sessionAdminLoading:L(()=>Si.state.loading),sessionAdminFilters:L(()=>Si.state.filters),sessionAdminPage:L(()=>Si.state.page),sessionAdminPageSize:L(()=>Si.state.pageSize),refreshSessionAdminSessions:Si.refresh,applySessionAdminFilters:Si.applyFilters,setSessionAdminWorkspaceFilter:Si.setWorkspaceIds,setSessionAdminStatusFilter:Si.setStatus,setSessionAdminTimeRange:Si.setTimeRange,setSessionAdminPage:Si.setPage,setSessionAdminPageSize:Si.setPageSize,sessionAdminSelectedIds:L(()=>Si.state.selectedIds),sessionAdminSelectedCount:L(()=>Si.state.selectedIds.size),sessionAdminOpenSelectedIds:L(()=>Si.selectedIdsByArchived(!1)),sessionAdminDoneSelectedIds:L(()=>Si.selectedIdsByArchived(!0)),toggleSessionAdminSelection:Si.toggleSelection,toggleSessionAdminPageSelection:Si.togglePageSelection,setSessionAdminSelection:Si.setSelection,clearSessionAdminSelection:Si.clearSelection,selectSessionAdminAllMatching:Si.selectAllMatching,sessionAdminAllMatching:L(()=>Si.state.allMatching),sessionAdminMaterializingAll:L(()=>Si.state.materializingAll),archiveSessions:Si.archiveSessions,restoreSessions:Si.restoreSessions,loadOlderMessages:Ft.loadOlderMessages,loadWorkspaces:Ft.loadWorkspaces,loadMoreSessions:Ft.loadMoreSessions,loadAllSessions:Ft.loadAllSessions,ensureFlatSessions:Ft.ensureFlatSessions,loadMoreFlatSessions:Kfe,ensureDoneSessions:Ft.ensureDoneSessions,loadMoreDoneSessions:Gfe,selectWorkspace:Ft.selectWorkspace,openWorkspace:Ft.openWorkspace,openWorkspaceDraft:Ft.openWorkspaceDraft,startSessionAndSendPrompt:Ft.startSessionAndSendPrompt,startSessionAndActivateSkill:Ft.startSessionAndActivateSkill,startSessionAndOpenSideChat:Ft.startSessionAndOpenSideChat,addWorkspaceByPath:Ft.addWorkspaceByPath,browseFs:Ft.browseFs,getFsHome:Ft.getFsHome,sendPrompt:Ft.sendPrompt,steerPrompt:Ft.steerPrompt,sideChatVisible:Po.sideChatVisible,sideChatSessionId:Po.sideChatSessionId,sideChatTurns:Po.sideChatTurns,sideChatRunning:Po.sideChatRunning,sideChatSending:Po.sideChatSending,openSideChat:Po.openSideChat,closeSideChat:Po.closeSideChat,sendSideChatPrompt:Po.sendSideChatPrompt,uploadImage:Ft.uploadImage,abortCurrentPrompt:Ft.abortCurrentPrompt,respondApproval:Ft.respondApproval,respondQuestion:Ft.respondQuestion,dismissQuestion:Ft.dismissQuestion,pendingQuestionActions:Ft.pendingQuestionActions,pendingApprovalActions:Ft.pendingApprovalActions,cancelTask:Ft.cancelTask,setPermission:Ft.setPermission,setThinking:qn.setThinking,setPlanMode:Ft.setPlanMode,togglePlanMode:Ft.togglePlanMode,setSwarmMode:Ft.setSwarmMode,toggleSwarmMode:Ft.toggleSwarmMode,setGoalMode:Ft.setGoalMode,toggleGoalMode:Ft.toggleGoalMode,createGoal:Ft.createGoal,controlGoal:Ft.controlGoal,enqueue:Ft.enqueue,dismissWarning:Ft.dismissWarning,renameSession:Ft.renameSession,regenerateSessionTitle:Ft.regenerateSessionTitle,renameWorkspace:Ft.renameWorkspace,deleteWorkspace:Ft.deleteWorkspace,reorderWorkspaces:the,setWorkspaceSortMode:zfe,pinSession:Rfe,unpinSession:aB,togglePinSession:Pfe,archiveSession:Ft.archiveSession,exportSession:Ft.exportSession,restoreSession:Ft.restoreSession,loadArchivedSessions:Ft.loadArchivedSessions,compact:Ft.compact,forkSession:Ft.forkSession,undo:Ft.undo,unqueue:Ft.unqueue,reorderQueue:Ft.reorderQueue,searchFiles:Ft.searchFiles,loadGitStatus:Ao().loadGitStatus,loadFileDiff:Ao().loadFileDiff,clearFileDiff:Ao().clearFileDiff,listDir:Ft.listDir,readFileContent:Ao().readFileContent,readHostFileContent:Ft.readHostFileContent,probeWorkspacePath:Ft.probeWorkspacePath,getFileDownloadUrl:Ft.getFileDownloadUrl,openWorkspaceFile:Ft.openWorkspaceFile,openInApp:Ft.openInApp,revealWorkspaceFile:Ft.revealWorkspaceFile,resolveImageUrl:Ft.resolveImageUrl,loadModels:qn.loadModels,loadProviders:qn.loadProviders,skills:Wde,skillsLoaded:qde,activateSkill:qn.activateSkill,setModel:qn.setModel,toggleStarModel:qn.toggleStarModel,addProvider:qn.addProvider,updateProvider:qn.updateProvider,getProvider:qn.getProvider,deleteProvider:qn.deleteProvider,refreshProvider:qn.refreshProvider,refreshAllProviders:qn.refreshAllProviders,loadCatalogProviders:qn.loadCatalogProviders,importCatalogProvider:qn.importCatalogProvider,importCustomRegistry:qn.importCustomRegistry,authReady:Efe,defaultModel:Tfe,managedProviderStatus:Lfe,managedUserInfo:Nfe,managedMembership:Ffe,notify:P0,config:Dfe,loadConfig:Ft.loadConfig,updateConfig:Ft.updateConfig,checkAuth:Ft.checkAuth,probeManagedMembership:Ft.probeManagedMembership,startOAuthLogin:qn.startOAuthLogin,pollOAuthLogin:qn.pollOAuthLogin,cancelOAuthLogin:qn.cancelOAuthLogin,getUsage:qn.getUsage,logout:Ft.logout}}const uhe=640,che=`(max-width: ${uhe}px)`;function dhe(){const e=G(!1);if(typeof window>"u"||typeof window.matchMedia!="function")return e;const t=window.matchMedia(che);e.value=t.matches;const n=i=>{e.value=i.matches};return typeof t.addEventListener=="function"?(t.addEventListener("change",n),Mn(()=>t.removeEventListener("change",n))):typeof t.addListener=="function"&&(t.addListener(n),Mn(()=>t.removeListener(n))),e}const fB=G(typeof window>"u"?0:window.innerWidth);let fm=0,yv=!1;function Vb(){fB.value=window.innerWidth}function fhe(){yv||typeof window>"u"||(window.addEventListener("resize",Vb),yv=!0,Vb())}function hhe(){!yv||typeof window>"u"||(window.removeEventListener("resize",Vb),yv=!1)}function hB(e,t,n){return Math.max(t,e-n)}function Zb(e,t,n){return Math.min(n,Math.max(t,e))}function pB(){return mn(()=>{fm+=1,fhe()}),Gn(()=>{fm=Math.max(0,fm-1),fm===0&&hhe()}),{viewportWidth:fB}}const phe=24;function ghe(e){const t=G(null),n=G(!0);let i=null,s=null,o=null,r=0,l=0,a=!1,u=0;function c(){const y=t.value;y&&(y.scrollTop=Math.max(y.scrollTop,r))}function d(){const A=t.value?.firstElementChild??null;A!==o&&(o&&i?.unobserve(o),o=A,A&&i?.observe(A))}function f(){const y=t.value;!y||a||(n.value=r-y.scrollTop-l<phe)}function h(y){y!==u||!a||(a=!1,f())}function g(){n.value=!1,a=!0;const y=++u;if(typeof requestAnimationFrame!="function"){queueMicrotask(()=>h(y));return}requestAnimationFrame(()=>{requestAnimationFrame(()=>h(y))})}function m(){const y=t.value;y&&(i?.disconnect(),s?.disconnect(),o=null,a=!1,u++,r=0,l=0,typeof ResizeObserver=="function"?(i=new ResizeObserver(()=>{const A=t.value;if(!A)return;const{scrollHeight:b,clientHeight:C}=A,v=b>r+1,x=C<l-1;if(r=b,l=C,a){h(u);return}n.value&&(v||x)&&c()}),i.observe(y),d()):(r=y.scrollHeight,l=y.clientHeight,c()),typeof MutationObserver=="function"&&(s=new MutationObserver(d),s.observe(y,{childList:!0})))}return qe(e,()=>{n.value=!0,kt(m)}),qe(t,()=>void kt(m)),mn(()=>void kt(m)),Mn(()=>{u++,i?.disconnect(),s?.disconnect()}),{scroller:t,following:n,onScroll:f,pinScroll:g}}function mhe(e){try{const t=To(e);if(t===null)return null;const n=Number(t);return Number.isFinite(n)?n:null}catch{return null}}function e_(e,t){try{Js(e,String(t))}catch{}}function vhe(e){const{storageKey:t,defaultWidth:n,min:i,max:s,reverse:o=!1,axis:r="x",applyLive:l}=e;function a(D){return Number.isFinite(D)?Math.min(Vu(s),Math.max(i,Math.round(D))):n}const u=G(a(mhe(t)??n)),c=G(!1);function d(D){const T=D<=i,N=D>=Vu(s),O=r==="x"?"col-resize":"row-resize";if(T&&N)return O;const[P,R]=r==="x"?["e-resize","w-resize"]:["s-resize","n-resize"];return N?o?P:R:T?o?R:P:O}const f=G(null),h=L(()=>d(f.value??u.value));function g(D){typeof document>"u"||(document.body.style.cursor=d(D))}function m(D){const T=a(D);u.value=T,e_(t,T)}qe(()=>Vu(s),D=>{!c.value&&u.value>D&&m(D)});let y=0,A=0,b=null,C=-1,v=0,x=0,S=0;function _(){if(x=0,!c.value)return;const D=v-y;S=a(A+(o?-D:D)),f.value=S,g(S),l?l(S):u.value=S}function I(D){if(c.value&&(v=r==="x"?D.clientX:D.clientY,x===0)){if(typeof requestAnimationFrame!="function"){_();return}x=requestAnimationFrame(_)}}function M(){if(c.value){if(x!==0&&(cancelAnimationFrame(x),_()),c.value=!1,l?m(S):e_(t,u.value),f.value=null,typeof document<"u"&&(document.body.style.userSelect="",document.body.style.cursor=""),b){try{b.releasePointerCapture(C)}catch{}b.removeEventListener("pointermove",I),b.removeEventListener("pointerup",M),b.removeEventListener("pointercancel",M)}b=null,C=-1}}function $(D){D.preventDefault(),c.value=!0,y=r==="x"?D.clientX:D.clientY,A=a(u.value),S=A,b=D.currentTarget,C=D.pointerId,typeof document<"u"&&(document.body.style.userSelect="none"),g(A);try{b.setPointerCapture(C)}catch{}b.addEventListener("pointermove",I),b.addEventListener("pointerup",M),b.addEventListener("pointercancel",M)}return Gn(M),{width:u,dragging:c,cursor:h,clamp:a,setWidth:m,onPointerDown:$}}function yhe(e){const{sessionId:t}=e;function n(a){return To(NS(a))??""}function i(a,u){const c=NS(a);u?Js(c,u):Tr(c)}const s=G(n(t())),o=G(null);qe(s,a=>{i(t(),a)}),qe(t,(a,u)=>{a!==u&&(i(u,s.value),s.value=n(a))});function r(a){s.value=a,kt(()=>{const u=o.value;if(!u)return;u.focus();const c=a.length;u.setSelectionRange(c,c)})}function l(){i(t(),"")}return{text:s,editorRef:o,loadForEdit:r,clearDraft:l}}function khe(e){return e?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable===!0:!1}function bhe(e){const{sessionId:t,mobile:n,starting:i,dockedComposer:s,emptyComposer:o}=e,r=G(!1);qe(t,()=>{n()||(r.value=!0)}),qe([r,s,o,i],()=>{if(!r.value)return;const l=s.value??o.value;if(!l)return;const a=typeof document<"u"?document.activeElement:null;if(khe(a)){r.value=!1;return}l.focus(),(typeof document>"u"||document.activeElement!==a)&&(r.value=!1)},{flush:"post"})}const kv=100;function Ahe(e){const t=tf(hn.inputHistory);if(Array.isArray(t)){const n=t.filter(o=>typeof o=="string"&&o.length>0);if(!e||n.length===0)return{};const i=n.length>kv?n.slice(-kv):n,s={[e]:i};return _c(hn.inputHistory,s),s}return t&&typeof t=="object"?t:{}}function Che(e){const{text:t,editorRef:n,sessionId:i}=e,s=G(Ahe(i())),o=L(()=>s.value[i()??""]??[]);let r=-1,l="";function a(y){const A=i();if(r=-1,!A)return;const b=y.trim();if(!b)return;const C=s.value[A]??[];if(C.at(-1)===b)return;const v=[...C,b],x=v.length>kv?v.slice(-kv):v;s.value={...s.value,[A]:x},_c(hn.inputHistory,s.value)}function u(){const y=n.value;return y?(y.selectionStart??0)===0:!1}function c(y){t.value=y,kt(()=>{const A=n.value;if(!A)return;const b=y.length;A.setSelectionRange(b,b)})}function d(){const y=o.value;if(y.length!==0){if(r===-1)l=t.value,r=y.length-1;else if(r>0)r-=1;else return;c(y[r])}}function f(){if(r===-1)return;const y=o.value;r<y.length-1?(r+=1,c(y[r])):(r=-1,c(l))}function h(){r=-1}function g(){return r!==-1}function m(){return o.value.length>0}return qe(i,()=>{r=-1}),{push:a,caretAtTextStart:u,recallOlder:d,recallNewer:f,resetBrowsing:h,isBrowsing:g,hasHistory:m}}function whe(e){const{text:t,editorRef:n,skills:i,emitCommand:s,historyPush:o,clearDraft:r,resolveDesc:l}=e,a=G(!1),u=G([]),c=G([]),d=G(0);function f(){const g=t.value;if(/^\/\S*$/.test(g)){const m=xae(g,p$(i()),l);u.value=m.map(y=>y.item),c.value=m.map(y=>y.ranges),d.value=0,a.value=!0}else a.value=!1}function h(g){if(a.value=!1,g.acceptsInput){t.value=`${g.name} `,kt(()=>{const m=n.value;if(!m)return;const y=t.value.length;m.setSelectionRange(y,y),m.focus()});return}t.value="",r?.(),o(g.name),s(g.name)}return{open:a,items:u,ranges:c,active:d,update:f,select:h}}function t_(e,t){const n=t.toLowerCase(),i=[],s=[];for(const o of e){const r=o.name.toLowerCase();r.startsWith(n)?i.push(o):r.includes(n)&&s.push(o)}return[...i,...s]}function n_(e){return e.kind==="directory"||e.path.endsWith("/")?"folder":"file"}function xhe(e){const{text:t,editorRef:n,searchFiles:i,skills:s,insertMention:o}=e,r=G(!1),l=G([]),a=G(!1),u=G([]),c=G(0),d=G(!1),f=L(()=>[...l.value.map(N=>({kind:n_(N),file:N})),...u.value.map(N=>({kind:"skill",skill:N}))]);let h=null,g=0,m=null,y=!1;function A(){const N=t.value,O=n.value?.selectionStart??N.length,P=n.value?.inlineTextRunStart?.()??0;let R=O-1;for(;R>=P&&!/\s/.test(N[R]);)R--;R++,R=Math.max(R,P);const q=N.slice(R,O);return!q.startsWith("@")&&!q.startsWith("@")?null:{token:q.slice(1),start:R,end:O}}function b(N){return N.kind==="skill"?`skill:${N.skill.name}`:`${N.kind}:${N.file.path}`}let C=!1,v=!1;qe(c,()=>{v||(C=!0)},{flush:"sync"});function x(N){v=!0,c.value=N,v=!1}function S(N){a.value=!1;const O=f.value[c.value],P=O?b(O):null;if(l.value=N,!C&&N.length>0&&O?.kind==="skill"){x(0);return}if(P===null){x(0);return}const R=f.value.findIndex(q=>b(q)===P);x(R===-1?0:R)}async function _(N,O){const P=++g;d.value=!0,r.value=!0;const R=()=>{const q=A();return P===g&&q!==null&&q.token===O&&r.value};try{const q=await N(O);R()&&S(q)}catch{R()&&S([])}finally{R()&&(d.value=!1)}}function I(){const N=A(),O=i();if(h!==null&&clearTimeout(h),y=!1,C=!1,!N){m=null,r.value=!1,d.value=!1,a.value=!1;return}const P=N.token;if(P!==m&&(l.value.length>0&&(a.value=!0),g+=1),m=P,u.value=P.length>0?t_(s?.()??[],P):[],x(0),!O){l.value=[],d.value=!1,a.value=!1,r.value=u.value.length>0;return}if(P.length===0){_(O,P);return}u.value.length>0&&(r.value=!0),h=setTimeout(()=>{h=null;const R=A();!R||R.token!==P||_(O,P)},200)}function M(){const N=A();N&&(u.value=N.token.length>0?t_(s?.()??[],N.token):[],c.value>=f.value.length&&x(0))}qe(()=>s?.(),()=>{y||M()});function $(N){if(N.kind==="skill")return{kind:"skill",name:N.skill.name};const O=N.file.path;return{kind:n_(N.file),path:O,name:N.file.name||O.split("/").filter(Boolean).pop()||O}}function D(){h!==null&&(clearTimeout(h),h=null),y=!0,C=!1,r.value=!1,d.value=!1,a.value=!1,l.value=[],m=null,g+=1}function T(N){const O=A();if(!O||N.kind!=="skill"&&a.value)return;if(D(),o){o($(N),{start:O.start,end:O.end});return}if(N.kind==="skill")return;const P=t.value;t.value=P.slice(0,O.start)+N.file.path+P.slice(O.end),kt(()=>{const R=n.value;if(!R)return;const q=O.start+N.file.path.length;R.setSelectionRange(q,q),R.focus()})}return{open:r,items:f,fileItems:l,fileStale:a,skillItems:u,active:c,loading:d,update:I,close:D,select:T}}const She="kimi-web.file-preview-width",jf=320;function _he({client:e,sideWidth:t,detailTarget:n,closeFilePreview:i}){const{viewportWidth:s}=pB(),o=L(()=>Math.max(0,s.value-t.value)),r=L(()=>hB(o.value,jf,jf));function l(ae){return Zb(Math.round(ae),jf,r.value)}function a(){return l(o.value/2)}const u=L(()=>a()),c=G(u.value),d=L(()=>Zb(c.value,jf,r.value)),f=G(null),h=L(()=>{const ae=f.value;if(!ae)return null;const oe=e.turns.value.find(Q=>Q.id===ae.turnId);return oe?.role==="compaction"&&oe.text?oe.text:null}),g=L(()=>h.value!==null);function m(ae){if(f.value?.turnId===ae.turnId){f.value=null,n.value==="compaction"&&(n.value=null);return}n.value="compaction",f.value=ae}function y(){f.value=null,n.value==="compaction"&&(n.value=null)}const A=G(null),b=L(()=>{const ae=A.value;if(!ae)return{entry:void 0,version:0};const oe=e.auxiliaryTranscripts.getEntry(ae.sessionId,ae.subagentId);return{entry:oe,version:oe?.version.value??0}});function C(ae){const oe=e.turns.value.flatMap(Q=>Q.tools??[]).find(Q=>Q.agentId===ae);if(!oe)return{};try{const Q=JSON.parse(oe.arg);return{name:typeof Q.description=="string"?Q.description:void 0,subagentType:typeof Q.subagent_type=="string"?Q.subagent_type:void 0,status:oe.status,outputLines:oe.output}}catch{return{}}}const v=L(()=>{const ae=A.value;if(!ae)return null;const oe=e.activeAppTasks.value.find(Mt=>Mt.agentId===ae.subagentId||Mt.id===ae.subagentId||Mt.backgroundTaskId===ae.subagentId);if(oe)return nse(oe,e.findBashCommandForTask(oe));const Q=b.value.entry?.channel,ne=Q?.agents.find(Mt=>Mt.agentId===ae.subagentId),ge=Q?.refreshError??!1,Ae=Q===void 0||Q.loading,_e=Q?.snapshot.meta.activity==="turn",Ke=C(ae.subagentId),xe=Q?.snapshot.items.findLast(Mt=>Mt.kind==="turn"),Ne=xe?.kind==="turn"&&xe.state==="cancelled",et=xe?.kind==="turn"&&xe.state==="failed"||Ke.status==="error",ut=_e?"working":Ne?"cancelled":et?"failed":Ae?"queued":ge&&Ke.status===void 0?"failed":"completed",yt=_e?"running":Ne?"cancelled":et?"failed":Ae?"running":ge&&Ke.status===void 0?"failed":"completed";return{id:ae.subagentId,name:ne?.label??Ke.name??ae.subagentId,subagentType:Ke.subagentType??(ne?.type==="sub"?"subagent":ne?.type),phase:ut,status:yt,outputLines:Ke.outputLines}}),x=L(()=>{const ae=b.value.entry;if(!ae)return[];const oe=A.value,Q=ae.channel.agents.find(ne=>ne.agentId===oe?.subagentId);return pse(ae.channel.snapshot,e.getFileUrl,Q,{sessionId:oe?.sessionId,getSessionMediaUrl:e.getSessionMediaUrl})}),S=L(()=>b.value.entry?.channel.loading??!1),_=L(()=>b.value.entry?.channel.refreshError??!1),I=L(()=>b.value.entry?.channel.loadingOlder??!1),M=L(()=>b.value.entry?.channel.loadOlderError??!1),$=L(()=>b.value.entry?.channel.snapshot.hasMoreOlder??!1),D=L(()=>b.value.entry?.channel.snapshot.meta.activity==="turn"),T=L(()=>v.value!==null);function N(ae){const oe=e.activeAppTasks.value.find(Q=>Q.agentId===ae||Q.id===ae||Q.backgroundTaskId===ae);return!oe||oe.kind==="subagent"&&oe.agentId===ae}function O(ae){return e.activeAppTasks.value.find(Q=>Q.agentId===ae||Q.id===ae||Q.backgroundTaskId===ae)?.agentId??ae}function P(ae){const oe=e.activeSessionId.value;if(!ae||!oe)return;const Q=O(ae);if(n.value==="agent"&&A.value?.sessionId===oe&&A.value.subagentId===Q){R();return}const ne=A.value;ne&&ne.subagentId!==Q&&e.auxiliaryTranscripts.deactivate(ne.sessionId,ne.subagentId),A.value={sessionId:oe,subagentId:Q},n.value="agent",N(Q)&&e.auxiliaryTranscripts.activate(oe,Q)}qe(()=>e.activeAppTasks.value,ae=>{const oe=A.value;if(!oe)return;const Q=ae.find(ne=>ne.backgroundTaskId===oe.subagentId&&ne.agentId!==void 0);!Q||Q.agentId===oe.subagentId||(A.value={sessionId:oe.sessionId,subagentId:Q.agentId},n.value==="agent"&&e.auxiliaryTranscripts.activate(oe.sessionId,Q.agentId))});function R(){const ae=A.value;ae&&e.auxiliaryTranscripts.deactivate(ae.sessionId,ae.subagentId),A.value=null,n.value==="agent"&&(n.value=null)}qe(n,(ae,oe)=>{if(oe!=="agent"||ae==="agent")return;const Q=A.value;Q&&e.auxiliaryTranscripts.deactivate(Q.sessionId,Q.subagentId)});function q(){const ae=b.value.entry;ae&&ae.channel.loadOlder().catch(()=>{})}const j=G("list"),W=G(null);function z(){if(n.value==="diff"){H();return}n.value="diff",j.value="list",W.value=null,e.loadGitStatus(e.activeSessionId.value)}function H(){n.value==="diff"&&(n.value=null),j.value="list",W.value=null,e.clearFileDiff()}async function ee(ae){j.value="detail",W.value=ae,await e.loadFileDiff(ae)}const V=Ul(null);function ie(ae){if(V.value===ae&&n.value==="turn-diff"){se();return}V.value=ae,n.value="turn-diff"}function se(){V.value=null,n.value==="turn-diff"&&(n.value=null)}async function Z(ae){if(!e.activeSessionId.value&&e.activeWorkspaceId.value){const oe=await e.startSessionAndOpenSideChat(e.activeWorkspaceId.value,ae);return n.value="btw",oe}return await e.openSideChat(ae),n.value="btw",null}function pe(){e.closeSideChat(),n.value==="btw"&&(n.value=null)}function re(){n.value==="btw"&&(n.value=null)}const fe=L(()=>e.sideChatVisible.value),Ee=L(()=>n.value!==null&&(n.value!=="compaction"||g.value)&&(n.value!=="agent"||T.value)&&(n.value!=="btw"||fe.value)),X=G(!1),we=G({});function Y(){switch(n.value){case"compaction":return f.value?{kind:"compaction",...f.value}:null;case"agent":return A.value?{kind:"agent",...A.value}:null;case"btw":return{kind:"btw"};default:return null}}function le(ae){if(ae)switch(ae.kind){case"compaction":f.value={turnId:ae.turnId},n.value="compaction";break;case"agent":if(e.activeSessionId.value){const oe=O(ae.subagentId);A.value={sessionId:e.activeSessionId.value,subagentId:oe},n.value="agent",N(oe)&&e.auxiliaryTranscripts.activate(e.activeSessionId.value,oe)}break;case"btw":e.sideChatVisible.value&&(n.value="btw");break}}function Ce(){return n.value==="compaction"&&g.value?(y(),!0):n.value==="agent"&&T.value?(R(),!0):n.value==="file"?(i(),!0):n.value==="diff"?(H(),!0):n.value==="turn-diff"?(se(),!0):n.value==="btw"?(pe(),!0):!1}return qe(e.activeSessionId,(ae,oe)=>{if(oe){const Q=Y();Q?we.value[oe]=Q:delete we.value[oe]}i(),y(),R(),H(),se(),re(),ae&&le(we.value[ae])}),{PREVIEW_WIDTH_KEY:She,PREVIEW_MIN:jf,previewDefaultWidth:u,previewMax:r,previewWidth:c,previewPanelWidth:d,compactionPanelText:h,compactionPanelVisible:g,openCompactionPanel:m,closeCompactionPanel:y,agentPanelMember:v,agentPanelTurns:x,agentPanelLoading:S,agentPanelLoadError:_,agentPanelLoadingMore:I,agentPanelLoadMoreError:M,agentPanelHasMore:$,agentPanelRunning:D,agentPanelVisible:T,openAgentPanel:P,closeAgentPanel:R,loadOlderAgentMessages:q,detailDiffMode:j,detailDiffPath:W,openDiffDetail:z,closeDiffDetail:H,selectDiffFile:ee,turnDiffChange:V,openTurnDiff:ie,closeTurnDiff:se,btwVisible:fe,openSideChatTab:Z,closeSideChat:pe,hideSideChatPanel:re,sidePanelVisible:Ee,panelDragging:X,closeOpenSidePanel:Ce}}const Ihe=hn.sidebarWidth,i_=hn.sidebarCollapsed,s_=270,o3=220,Mhe=480,Ehe=320;function The(e={}){const{viewportWidth:t}=pB(),n=G(s_),i=G(!1),s=G(!1),o=L(()=>{const c=Ehe+(Vu(e.previewOpen)?jf:0);return Math.min(Mhe,hB(t.value,o3,c))}),r=L(()=>Zb(n.value,o3,o.value));function l(){try{i.value=To(i_)==="true"}catch{i.value=!1}}function a(){try{Js(i_,String(i.value))}catch{}}function u(){i.value=!i.value,a()}return{SIDEBAR_WIDTH_KEY:Ihe,SIDEBAR_DEFAULT:s_,SIDEBAR_MIN:o3,sidebarMax:o,sessionColWidth:n,sidebarCollapsed:i,sidebarDragging:s,sideWidth:r,loadSidebarCollapsed:l,toggleSidebarCollapse:u}}const Lhe=40409;function o_(e){return zs(e)&&e.code===Lhe}function r_(e){return e.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(e)||e.startsWith("\\\\")}function l_(e){if(e.startsWith("\\\\"))return e;const t=/^[a-zA-Z]:/.test(e)?e.slice(0,2):"",n=[];for(const i of e.slice(t.length).split(/[\\/]+/))if(!(!i||i===".")){if(i===".."){n.pop();continue}n.push(i)}return t?`${t}/${n.join("/")}`:`/${n.join("/")}`}function Nhe({client:e,detailTarget:t,t:n}){const i=G(null),s=G(null),o=G(!1),r=G(null),l=G(null);let a=0;const u=L(()=>{const v=l.value;return v?e.getFileDownloadUrl(v):null}),c=L(()=>i.value!==null&&l.value!==null);function d(v){return v.length>1?v.replace(/\/+$/,""):v}function f(v){const x=Wy(v,e.status.value.cwd);return x===null||x.split(/[\\/]+/).includes("..")?null:h(x)||null}function h(v){const x=[];for(const S of v.split(/[\\/]+/))if(!(!S||S===".")){if(S===".."){x.pop();continue}x.push(S)}return x.join("/")}function g(v){const x=v.trim();if(!x)return{error:n("filePreview.errors.emptyPath")};if(/^[a-z][a-z0-9+.-]*:\/\//i.test(x))return{error:n("filePreview.errors.unsupportedPath")};if(x.startsWith("~"))return{error:n("filePreview.errors.outsideWorkspace")};const S=d(e.status.value.cwd);if(x.startsWith("/")){if(!S||x!==S&&!x.startsWith(`${S}/`))return{error:n("filePreview.errors.outsideWorkspace")};const I=x===S?"":x.slice(S.length+1);if(I.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const M=h(I);return M?{path:M}:{error:n("filePreview.errors.isDirectory")}}if(x.split(/[\\/]+/).includes(".."))return{error:n("filePreview.errors.outsideWorkspace")};const _=h(x);return _?{path:_}:{error:n("filePreview.errors.emptyPath")}}async function m(v){const x=i.value;if(t.value==="file"&&x&&x.path===v.path&&x.line===v.line&&(x.content??"")===(v.content??"")){A();return}const S=++a;if(t.value="file",s.value=null,r.value=null,o.value=!0,i.value=v,l.value=null,typeof v.content=="string"){o.value=!1,s.value={path:v.path,content:v.content,encoding:"utf-8",mime:"text/markdown",isBinary:!1,size:v.content.length};return}if(!r_(v.path)&&v.path.split(/[\\/]+/).includes("..")){const I=d(e.status.value.cwd);I&&(v={...v,path:l_(`${I}/${v.path}`)})}if(r_(v.path)){v={...v,path:l_(v.path)};const I=f(v.path);if(I!==null)v={...v,path:I};else{try{const M=await e.readHostFileContent(v.path);if(S!==a)return;l.value=null,s.value={path:v.path,content:M.content,encoding:M.encoding,mime:M.mime,isBinary:M.isBinary,size:M.size}}catch(M){if(S!==a)return;r.value=o_(M)?n("filePreview.errors.notFound"):SQ(M)?n("filePreview.errors.tooLarge"):M instanceof Error?M.message:n("filePreview.errors.loadFailed")}finally{S===a&&(o.value=!1)}return}}const _=g(v.path);if("error"in _){o.value=!1,r.value=_.error;return}l.value=_.path;try{const I=await e.readFileContent(_.path);if(S!==a)return;I?s.value={...I,path:I.path||_.path}:r.value=n("filePreview.errors.loadFailed")}catch(I){if(S!==a)return;r.value=o_(I)?n("filePreview.errors.notFound"):I instanceof Error?I.message:n("filePreview.errors.loadFailed")}finally{S===a&&(o.value=!1)}}function y(){a+=1,i.value=null,l.value=null,s.value=null,r.value=null,o.value=!1}function A(){y(),t.value==="file"&&(t.value=null)}qe(t,(v,x)=>{x==="file"&&v!=="file"&&y()});function b(){const v=s.value?.path??i.value?.path;v&&e.openWorkspaceFile(v,i.value?.line)}function C(){const v=s.value?.path??i.value?.path;v&&e.revealWorkspaceFile(v)}return{previewTarget:i,previewFile:s,previewLoading:o,previewError:r,previewDownloadUrl:u,previewExternalActions:c,openFilePreview:m,closeFilePreview:A,openPreviewInEditor:b,revealPreviewFile:C}}function Fhe({running:e,title:t="Kimi Code"}){if(Wh){_k(()=>{typeof document<"u"&&(document.title=Vu(t))});return}const n=["◐","◓","◑","◒"],i=G(0);let s=null;function o(){s===null&&(i.value=0,s=setInterval(()=>{i.value=(i.value+1)%n.length},250))}function r(){s!==null&&(clearInterval(s),s=null),i.value=0}qe(e,a=>{a?o():r()},{immediate:!0});const l=L(()=>`${e.value?`${n[i.value]} `:""}${Vu(t)}`);_k(()=>{typeof document<"u"&&(document.title=l.value)}),Mn(()=>{r()})}function Dhe(e){const{api:t,uploadImage:n,sessionId:i,insertFolderPaths:s}=e,o=G({}),r=L(()=>o.value[i()??""]??[]),l=G(null),a=G(null),u=G(!1);let c=0;function d(){return`att_${++c}`}function f(H,ee){o.value={...o.value,[H]:ee}}function h(H){if(H.previewUrl!==void 0)try{URL.revokeObjectURL(H.previewUrl)}catch{}}function g(H){return H.startsWith("image/")?"image":H.startsWith("video/")?"video":"file"}function m(H){return H<1024*1024?"<1mb":H<10*1024*1024?"1-10mb":H<50*1024*1024?"10-50mb":"50mb+"}async function y(H,ee){const V=n();if(!V)return;const ie=i()??"";if(H.length!==0)for(const se of H){const Z=g(se.type);m(se.size),Math.min(H.length,100);const pe=d(),re=Z==="file"?void 0:URL.createObjectURL(se),fe={localId:pe,name:se.name,kind:Z,previewUrl:re,mediaType:se.type||"application/octet-stream",size:se.size,uploading:!0};f(ie,[...o.value[ie]??[],fe]),V(se,se.name).then(Ee=>{const X=o.value[ie]??[];f(ie,X.map(we=>we.localId===pe?{...we,uploading:!1,fileId:Ee?.fileId,mediaType:Ee?.mediaType??we.mediaType,error:Ee===null}:we))}).catch(()=>{const Ee=o.value[ie]??[];f(ie,Ee.map(X=>X.localId===pe?{...X,uploading:!1,error:!0}:X))})}}function A(H){const ee=i()??"",V=o.value[ee]??[],ie=V.find(se=>se.localId===H);l.value?.localId===H&&(l.value=null),ie&&h(ie),f(ee,V.filter(se=>se.localId!==H))}function b(H){l.value=H}function C(){l.value=null}function v(){a.value?.click()}function x(H){const ee=H.target,V=Array.from(ee.files??[]);y(V),ee.value=""}function S(H){const ee=H.clipboardData;if(!ee)return;const{files:V,folderPaths:ie,hasFolders:se}=Boe(ee);if(ie.length>0?(s?.(ie),H.preventDefault()):se&&H.preventDefault(),!n()||V.length===0)return;const Z=V.map(pe=>{if(pe.name.includes("."))return pe;const re=pe.type.split("/")[1]??"png";return new File([pe],`paste-${Date.now()}.${re}`,{type:pe.type})});H.preventDefault(),y(Z)}let _=0;function I(H){!n()||!Array.from(H.dataTransfer?.items??[]).some(V=>V.kind==="file")||(H.preventDefault(),H.stopPropagation(),u.value=!0)}function M(){u.value=!1}function $(H){_=0,u.value=!1;const{files:ee,folderPaths:V}=gb(H);V.length>0&&(s?.(V),H.preventDefault(),H.stopPropagation()),n()&&(H.preventDefault(),H.stopPropagation(),y(ee))}function D(H){return Array.from(H.dataTransfer?.items??[]).some(ee=>ee.kind==="file")}function T(H){!n()||!D(H)||(H.preventDefault(),_+=1,u.value=!0)}function N(H){!n()||!D(H)||H.preventDefault()}function O(H){!n()||!D(H)||(_=Math.max(0,_-1),_===0&&(u.value=!1))}function P(H){_=0,u.value=!1;const{files:ee,folderPaths:V}=gb(H);V.length>0&&(s?.(V),H.preventDefault()),n()&&(H.preventDefault(),y(ee))}function R(){const H=i()??"";for(const ee of o.value[H]??[])h(ee);f(H,[])}function q(){l.value=null,R()}function j(H,ee,V){const ie=o.value[H]??[];ie.some(se=>se.localId===ee)&&f(H,ie.map(se=>se.localId===ee?{...se,...V}:se))}function W(H){return fetch(H).then(ee=>{if(!ee.ok)throw new Error(`fetch failed: ${ee.status}`);return ee.blob()})}function z(H,ee,V){const ie=ee??i()??"";if(V?.append!==!0){for(const se of o.value[ie]??[])h(se);f(ie,[])}for(const se of H){const Z=d(),pe=/^data:/i.test(se.url),re=/^blob:/i.test(se.url),fe=se.name??se.kind;if(se.fileId){const Ee={localId:Z,name:fe,kind:se.kind,previewUrl:se.kind==="file"?void 0:se.url,uploading:!1,fileId:se.fileId,sessionId:se.sessionId,mediaType:se.mediaType,size:se.size};f(ie,[...o.value[ie]??[],Ee]),se.kind==="image"&&!pe&&!re&&(se.sessionId?t.getSessionMediaBlob(se.sessionId,se.fileId):t.getFileBlob(se.fileId)).then(we=>{const Y=URL.createObjectURL(we);if(!(o.value[ie]??[]).some(Ce=>Ce.localId===Z)){URL.revokeObjectURL(Y);return}j(ie,Z,{previewUrl:Y})}).catch(()=>{})}else{if(!se.url)continue;const Ee=n();if(!Ee)continue;const X={localId:Z,name:fe,kind:se.kind,previewUrl:se.url,uploading:!0};f(ie,[...o.value[ie]??[],X]),W(se.url).then(we=>{const Y=fe.includes(".")?fe:`${fe}.${we.type.split("/")[1]??"bin"}`;return Ee(we,Y)}).then(we=>{if(we===null){const Y=o.value[ie]??[];f(ie,Y.filter(le=>le.localId!==Z));return}j(ie,Z,{uploading:!1,fileId:we.fileId})}).catch(()=>{const we=o.value[ie]??[];f(ie,we.filter(Y=>Y.localId!==Z))})}}}return qe(i,()=>{l.value=null}),mn(()=>{document.addEventListener("paste",S),document.addEventListener("dragenter",T),document.addEventListener("dragover",N),document.addEventListener("dragleave",O),document.addEventListener("drop",P)}),Mn(()=>{document.removeEventListener("paste",S),document.removeEventListener("dragenter",T),document.removeEventListener("dragover",N),document.removeEventListener("dragleave",O),document.removeEventListener("drop",P);for(const H of Object.values(o.value))for(const ee of H)h(ee);l.value=null}),{attachments:r,previewAttachment:l,fileInputRef:a,isDragOver:u,removeAttachment:A,openAttachmentPreview:b,closeAttachmentPreview:C,openFilePicker:v,handleFileInputChange:x,handleDragOver:I,handleDragLeave:M,handleDrop:$,clearAfterSubmit:R,clearAttachments:q,loadAttachments:z}}const $he=3;function gB(e){const t=G("starting"),n=G(!1),i=G(null),s=G(0);let o=null,r=null,l=null,a=0,u=!1,c=!1;function d(){o&&(clearTimeout(o),o=null),r&&(clearInterval(r),r=null),l&&(clearTimeout(l),l=null)}function f(A){d(),t.value="success",l=setTimeout(()=>{l=null,e.onSuccess?.()},A)}function h(){r&&clearInterval(r),r=setInterval(()=>{s.value>0?s.value--:(r&&clearInterval(r),r=null)},1e3)}function g(A){o&&clearTimeout(o),o=setTimeout(async()=>{const b=await e.onPollOAuthLogin();if(!c&&!u){if(b===null){if(a+=1,a>=$he){d(),n.value=!0,t.value="error";return}g(A);return}a=0,b.status==="authenticated"?f(1200):b.status==="expired"||b.status==="cancelled"?(d(),t.value="expired",b.status,void 0):g(A)}},A*1e3)}async function m(){d(),i.value=null,n.value=!1,a=0,u=!1,t.value="starting";const A=await e.onStartOAuthLogin();if(c){A!==null&&A.status!=="authenticated"&&e.onCancelOAuthLogin();return}if(!A){t.value="error";return}if(A.status==="authenticated"){f(800);return}i.value={flowId:A.flowId,verificationUri:A.verificationUri,verificationUriComplete:A.verificationUriComplete,userCode:A.userCode,expiresIn:A.expiresIn,interval:A.interval},s.value=A.expiresIn,t.value="device-code",h(),g(A.interval)}function y(){t.value!=="success"&&(d(),t.value==="device-code"&&!u&&(u=!0,e.onCancelOAuthLogin()))}return M0()&&Xd(()=>{c=!0,y()}),{step:t,pollError:n,flow:i,secondsLeft:s,startFlow:m,cancelFlow:y}}const Bhe={state:"idle"};function zhe(e){const t=G(Bhe),n=G(To(hn.updateSkippedVersion)),i=G(!1);if(typeof e?.getUpdateAutoDownload=="function"&&e.getUpdateAutoDownload().then(o=>{i.value=o}).catch(()=>{}),e!==void 0){let o=!1;e.onUpdateStatus(r=>{o=!0,t.value=r}),e.getUpdateStatus().then(r=>{o||(t.value=r)}).catch(()=>{})}const s=L(()=>{const o=t.value;return!(o.state==="idle"||o.state==="available"&&o.version!==void 0&&o.version===n.value)});return{status:t,visible:s,canCheck:typeof e?.checkForUpdates=="function",autoDownload:i,canToggleAutoDownload:typeof e?.getUpdateAutoDownload=="function"&&typeof e?.setUpdateAutoDownload=="function",setAutoDownload:(o,r)=>{i.value=o,typeof e?.setUpdateAutoDownload=="function"&&e.setUpdateAutoDownload(o).then(()=>{}).catch(()=>{})},skipVersion:()=>{const o=t.value.version;t.value.state==="available"&&o!==void 0&&(n.value=o,Js(hn.updateSkippedVersion,o))},check:async()=>{if(typeof e?.checkForUpdates!="function")return Promise.resolve({outcome:"unsupported"});const o=await e.checkForUpdates().catch(()=>({outcome:"error",message:"bridge call failed"}));return o.outcome==="available"&&o.version!==void 0&&o.version===n.value&&(n.value=null,Tr(hn.updateSkippedVersion)),o},download:()=>{e?.downloadUpdate().catch(()=>{})},install:()=>{e?.installUpdate().catch(()=>{})}}}let r3=null;function Rhe(){return r3===null&&(r3=zhe(window.kimiDesktop)),r3}const bv=[{code:"en",label:"English"},{code:"zh",label:"简体中文"}],Wl=PZ({locale:dF()});function E6(e){Wl.global.locale.value=e,Js(hn.locale,e)}const Ohe=["aria-expanded"],Phe={class:"user-menu-avatar","aria-hidden":"true"},jhe=["src"],Hhe={class:"user-menu-name"},Whe={class:"user-menu-name"},qhe={class:"user-menu-item-label"},Uhe={class:"user-menu-item-label"},Khe={class:"user-menu-item-label user-menu-login-label"},Vhe={class:"user-menu-item-label"},Zhe={class:"user-menu-row-value"},Ghe={class:"user-menu-item-label"},Qhe={class:"user-menu-row-value"},Yhe={class:"user-menu-item-label"},Jhe={key:0,class:"user-menu-usage"},Xhe={key:0,class:"user-menu-usage-state"},e1e={key:1,class:"user-menu-usage-state"},t1e={class:"user-menu-usage-error"},n1e={key:2,class:"user-menu-usage-state user-menu-usage-empty"},i1e={class:"user-menu-usage-main"},s1e={class:"user-menu-usage-label"},o1e={key:0,class:"user-menu-usage-hint"},r1e={class:"user-menu-item-label"},l1e={class:"user-menu-item-label"},a1e=Qe({__name:"UserMenu",emits:["login","openSettings"],setup(e,{emit:t}){const n=t,{t:i,locale:s}=Bt(),o=Kl(),{confirm:r}=Ic(),l=L(()=>o.managedProviderStatus.value==="authenticated"),a=o.managedUserInfo,u=o.managedMembership,c=L(()=>a.value?.nickname||i("sidebar.defaultUserName")),d=L(()=>u.value==="free"||Xoe(a.value?.userLevel)),f=L(()=>u.value!=="free"),h=G(!1);qe(()=>a.value?.avatar,()=>{h.value=!1});const g=L(()=>!!a.value?.avatar&&!h.value),m=o.colorScheme,y=L(()=>i(`theme.${m.value}`)),A=L(()=>m.value==="light"?"light-mode":m.value==="dark"?"dark-mode":"follow-system"),b=[{value:"light",labelKey:"theme.light",icon:"light-mode"},{value:"dark",labelKey:"theme.dark",icon:"dark-mode"},{value:"system",labelKey:"theme.system",icon:"follow-system"}];function C(ne){o.setColorScheme(ne)}const v=L(()=>bv.find(ne=>ne.code===s.value)?.label??s.value);function x(ne){s.value!==ne&&E6(ne)}const S=G(!1),_=G({}),I=G(null),M=G(null);let $=null;function D(ne){const ge=ne.target;ge.closest(".user-menu")||ge.closest(".user-menu-trigger")||ge.closest(".user-submenu")||R()}function T(ne){ne.key==="Escape"&&(ne.stopPropagation(),R())}async function N(){if(S.value){R();return}S.value=!0,document.addEventListener("mousedown",D),document.addEventListener("keydown",T,!0),window.addEventListener("resize",R),l.value&&X(),await kt(),O();const ne=M.value;ne&&($=new ResizeObserver(P),$.observe(ne))}function O(){const ne=M.value,ge=I.value?.el;if(!ne||!ge)return;const Ae=ne.getBoundingClientRect(),_e=4,Ke=8,xe=ge.offsetHeight,Ne={left:`${Math.round(Ae.left)}px`,width:`${Math.round(Ae.width)}px`};Ae.top-xe-_e<Ke?_.value={...Ne,top:`${Math.round(Math.min(Ae.bottom+_e,window.innerHeight-xe-Ke))}px`,bottom:"auto",transformOrigin:"top left","--menu-pop-shift":"-2px"}:_.value={...Ne,top:"auto",bottom:`${Math.round(window.innerHeight-Ae.top+_e)}px`,transformOrigin:"bottom left","--menu-pop-shift":"2px"}}function P(){const ne=M.value;if(!ne)return;q.value=null;const ge=ne.getBoundingClientRect();_.value={..._.value,left:`${Math.round(ge.left)}px`,width:`${Math.round(ge.width)}px`}}function R(){S.value=!1,q.value=null,Z(),$?.disconnect(),$=null,document.removeEventListener("mousedown",D),document.removeEventListener("keydown",T,!0),window.removeEventListener("resize",R)}Gn(R);const q=G(null),j=G({}),W=G(null),z={usage:null,theme:null,language:null};let H=null;function ee(ne){return ge=>{z[ne]=ge instanceof HTMLElement?ge:ge?.$el??null}}function V(ne){Z(),q.value!==ne&&(q.value=ne,kt(pe))}function ie(ne,ge){ne.key!=="Enter"&&ne.key!==" "&&ne.key!=="ArrowRight"||(ne.preventDefault(),V(ge))}function se(){Z(),H=setTimeout(()=>{q.value=null,H=null},250)}function Z(){H!==null&&(clearTimeout(H),H=null)}function pe(){const ne=q.value,ge=I.value?.el,Ae=W.value?.el,_e=ne!==null?z[ne]:null;if(!ge||!Ae||!_e)return;const Ke=4,xe=8,Ne=ge.getBoundingClientRect(),et=_e.getBoundingClientRect(),ut=Ae.offsetHeight,yt=Math.min(Ae.offsetWidth,Ne.width);let Mt=Ne.right+Ke,Ze=!1;Mt+yt>window.innerWidth-xe&&(Mt=Math.max(xe,Ne.left-yt-Ke),Ze=!0);const Ge=Math.max(xe,Math.min(et.top,window.innerHeight-ut-xe));j.value={top:`${Math.round(Ge)}px`,left:`${Math.round(Mt)}px`,maxWidth:`${Math.round(Ne.width)}px`,transformOrigin:Ze?"top right":"top left","--menu-pop-shift":"-2px"}}const re=G(!1),fe=G(null);let Ee=0;async function X(){const ne=++Ee;re.value=!0;try{const ge=await o.getUsage();ne===Ee&&(fe.value=ge)}finally{ne===Ee&&(re.value=!1)}}const we=L(()=>{if(fe.value?.kind!=="ok")return[];const{summary:ne,limits:ge}=fe.value,Ae=Yoe(ge,5,"hour");return[ne,Ae].filter(_e=>_e!=null)}),Y=L(()=>fe.value?.kind==="error"?fe.value.message:i("settings.planUsage.loadFailed"));function le(ne){return ne.resetAt===void 0?"":qD(ne.resetAt,i)}function Ce(){R(),z0()}function ae(){R(),n("login")}function oe(){R(),n("openSettings")}async function Q(){R(),await r({title:i("sidebar.logoutConfirmTitle"),message:i("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>o.logout()})}return(ne,ge)=>(k(),E(Te,null,[w("button",{ref_key:"triggerRef",ref:M,class:"user-menu-trigger",type:"button","aria-haspopup":"menu","aria-expanded":S.value,onClick:Ct(N,["stop"])},[l.value?(k(),E(Te,{key:0},[w("span",Phe,[g.value?(k(),E("img",{key:0,src:p(a)?.avatar,alt:"",onError:ge[0]||(ge[0]=Ae=>h.value=!0)},null,40,jhe)):(k(),de(p(ve),{key:1,name:"user",size:"sm"}))]),w("span",Hhe,F(c.value),1)],64)):(k(),E(Te,{key:1},[K(p(ve),{name:"user"}),w("span",Whe,F(p(i)("sidebar.notSignedIn")),1)],64))],8,Ohe),(k(),de(Gr,{to:"body"},[K(ls,{name:"menu-pop"},{default:he(()=>[S.value?(k(),de(p(sr),{key:0,ref_key:"menuRef",ref:I,class:"user-menu",style:qt(_.value),onClick:ge[14]||(ge[14]=Ct(()=>{},["stop"]))},{default:he(()=>[l.value?(k(),E(Te,{key:0},[f.value?(k(),de(p(Wt),{key:0,ref:ee("usage"),"aria-haspopup":"true","aria-expanded":q.value==="usage",onMouseenter:ge[1]||(ge[1]=Ae=>V("usage")),onMouseleave:se,onFocus:ge[2]||(ge[2]=Ae=>V("usage")),onBlur:se,onClick:ge[3]||(ge[3]=Ae=>V("usage")),onKeydown:ge[4]||(ge[4]=Ae=>ie(Ae,"usage"))},{default:he(()=>[K(p(ve),{name:"histogram",size:"sm"}),w("span",qhe,F(p(i)("settings.planUsage.title")),1),K(p(ve),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"])):te("",!0),d.value?(k(),de(p(Wt),{key:1,onClick:Ce,onMouseenter:se},{default:he(()=>[K(p(ve),{name:"music",size:"sm"}),w("span",Uhe,F(p(i)("sidebar.upgradeMembership")),1),K(p(ve),{name:"external-link",size:"sm"})]),_:1})):te("",!0),K(p(Wt),{separator:""})],64)):(k(),E(Te,{key:1},[K(p(Wt),{class:"user-menu-login",onClick:ae,onMouseenter:se},{default:he(()=>[K(p(ve),{name:"log-in",size:"sm"}),w("span",Khe,F(p(i)("sidebar.signIn")),1)]),_:1}),K(p(Wt),{separator:""})],64)),K(p(Wt),{ref:ee("theme"),"aria-haspopup":"true","aria-expanded":q.value==="theme",onMouseenter:ge[5]||(ge[5]=Ae=>V("theme")),onMouseleave:se,onFocus:ge[6]||(ge[6]=Ae=>V("theme")),onBlur:se,onClick:ge[7]||(ge[7]=Ae=>V("theme")),onKeydown:ge[8]||(ge[8]=Ae=>ie(Ae,"theme"))},{default:he(()=>[K(p(ve),{name:A.value,size:"sm"},null,8,["name"]),w("span",Vhe,F(p(i)("theme.colorSchemeLabel")),1),w("span",Zhe,F(y.value),1),K(p(ve),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),K(p(Wt),{ref:ee("language"),"aria-haspopup":"true","aria-expanded":q.value==="language",onMouseenter:ge[9]||(ge[9]=Ae=>V("language")),onMouseleave:se,onFocus:ge[10]||(ge[10]=Ae=>V("language")),onBlur:se,onClick:ge[11]||(ge[11]=Ae=>V("language")),onKeydown:ge[12]||(ge[12]=Ae=>ie(Ae,"language"))},{default:he(()=>[K(p(ve),{name:"translate",size:"sm"}),w("span",Ghe,F(p(i)("sidebar.language")),1),w("span",Qhe,F(v.value),1),K(p(ve),{name:"chevron-right",size:"sm"})]),_:1},8,["aria-expanded"]),K(p(Wt),{onClick:oe,onMouseenter:se},{default:he(()=>[K(p(ve),{name:"settings",size:"sm"}),w("span",Yhe,F(p(i)("settings.title")),1)]),_:1}),l.value?(k(),E(Te,{key:2},[K(p(Wt),{separator:""}),K(p(Wt),{onClick:ge[13]||(ge[13]=Ae=>void Q()),onMouseenter:se},{default:he(()=>[K(p(ve),{name:"log-out",size:"sm"}),$e(" "+F(p(i)("sidebar.signOut")),1)]),_:1})],64)):te("",!0)]),_:1},8,["style"])):te("",!0)]),_:1})])),(k(),de(Gr,{to:"body"},[K(ls,{name:"menu-pop"},{default:he(()=>[q.value!==null?(k(),de(p(sr),{key:0,ref_key:"submenuRef",ref:W,class:"user-submenu",style:qt(j.value),role:q.value==="usage"?"dialog":"menu",onClick:ge[16]||(ge[16]=Ct(()=>{},["stop"])),onMouseenter:Z,onMouseleave:se,onFocusin:Z,onFocusout:se},{default:he(()=>[q.value==="usage"?(k(),E("div",Jhe,[re.value?(k(),E("div",Xhe,[K(p(Mi),{size:"sm"})])):fe.value?.kind!=="ok"?(k(),E("div",e1e,[w("span",t1e,F(Y.value),1),K(p(Zt),{variant:"ghost",size:"sm",onClick:ge[15]||(ge[15]=Ae=>void X())},{default:he(()=>[$e(F(p(i)("settings.planUsage.retry")),1)]),_:1})])):we.value.length===0?(k(),E("span",n1e,F(p(i)("settings.planUsage.empty")),1)):(k(!0),E(Te,{key:3},ht(we.value,(Ae,_e)=>(k(),E("div",{key:_e,class:"user-menu-usage-row"},[w("span",i1e,[w("span",s1e,F(p(WD)(Ae,p(i))),1),le(Ae)?(k(),E("span",o1e,F(le(Ae)),1)):te("",!0)]),w("span",{class:Fe(["user-menu-usage-value",`sev-${p(mb)(Ae.used,Ae.limit)}`])},F(p(i)("settings.planUsage.usedPct",{pct:p(Qm)(Ae.used,Ae.limit)})),3)]))),128))])):q.value==="theme"?(k(),E(Te,{key:1},ht(b,Ae=>K(p(Wt),{key:Ae.value,onClick:_e=>C(Ae.value)},{default:he(()=>[K(p(ve),{name:Ae.icon,size:"sm"},null,8,["name"]),w("span",r1e,F(p(i)(Ae.labelKey)),1),p(m)===Ae.value?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)]),_:2},1032,["onClick"])),64)):(k(!0),E(Te,{key:2},ht(p(bv),Ae=>(k(),de(p(Wt),{key:Ae.code,onClick:_e=>x(Ae.code)},{default:he(()=>[w("span",l1e,F(Ae.label),1),p(s)===Ae.code?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)]),_:2},1032,["onClick"]))),128))]),_:1},8,["style","role"])):te("",!0)]),_:1})]))],64))}}),u1e=gt(a1e,[["__scopeId","data-v-ba83fe5b"]]),c1e={class:"ep-search"},d1e=["placeholder"],f1e={class:"ep-scroll"},h1e={key:0,class:"ep-grid"},p1e=["onClick"],g1e={key:1,class:"ep-empty"},m1e={class:"ep-label"},v1e={class:"ep-grid"},y1e=["onClick"],k1e={class:"ep-label"},b1e={class:"ep-grid"},A1e=["onClick"],a_="kimi-web.recent-emojis",C1e=Qe({__name:"SessionEmojiPicker",props:{current:{default:null},removable:{type:Boolean,default:!0}},emits:["pick"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),{handleCompositionStart:s,handleCompositionEnd:o,isComposingKeyEvent:r}=Xr(),l=e,a=n,u=["⏳","⚠️","🐛","✨","🔥","🚀","🎯","🧪","📝","🔍","🛠️","💡","📦","🎨","🔒","📈","🧹","🚧","✅","❓","🌙","☕","🐳","🗂️","📊","🤖","🧩","⚙️","🌱","📌","💥","🕐"],c={faces:"sidebar.emojiGroupFaces",nature:"sidebar.emojiGroupNature",food:"sidebar.emojiGroupFood",activity:"sidebar.emojiGroupActivity",objects:"sidebar.emojiGroupObjects",symbols:"sidebar.emojiGroupSymbols"},d=boe.map(S=>({id:S,labelKey:c[S],emojis:RD.filter(_=>_.group===S).map(_=>_.emoji)})),f=G(h());function h(){try{const S=JSON.parse(localStorage.getItem(a_)??"[]");return Array.isArray(S)?S.filter(_=>typeof _=="string"):[]}catch{return[]}}function g(S,_){f.value=xoe(f.value,S);try{localStorage.setItem(a_,JSON.stringify(f.value))}catch{}a("pick",S,_)}const m=G(""),y=L(()=>m.value.trim().length>0),A=L(()=>Coe(m.value)),b=G(null);mn(()=>b.value?.focus());function C(S){if(r(S))return;const _=A.value[0];y.value&&_&&g(_)}function v(){let S=l.current??void 0;for(;S===void 0||S===l.current;)S=u[Math.floor(Math.random()*u.length)];g(S,"random")}const x=G(null);return t({el:L(()=>x.value?.el),isComposingKeyEvent:r}),(S,_)=>(k(),de(p(sr),{ref_key:"menuRef",ref:x,class:"emoji-picker",role:"dialog","aria-label":p(i)("sidebar.sessionEmojiTitle"),onKeydown:_[4]||(_[4]=Ct(()=>{},["stop"]))},{default:he(()=>[w("div",c1e,[K(p(ve),{name:"search",size:"sm"}),$n(w("input",{ref_key:"inputRef",ref:b,"onUpdate:modelValue":_[0]||(_[0]=I=>m.value=I),class:"ep-input",type:"text",placeholder:p(i)("sidebar.searchEmoji"),autocomplete:"off",spellcheck:"false",onKeydown:_s(C,["enter"]),onCompositionstart:_[1]||(_[1]=(...I)=>p(s)&&p(s)(...I)),onCompositionend:_[2]||(_[2]=(...I)=>p(o)&&p(o)(...I))},null,40,d1e),[[uo,m.value]])]),w("div",f1e,[y.value?(k(),E(Te,{key:0},[A.value.length?(k(),E("div",h1e,[(k(!0),E(Te,null,ht(A.value,I=>(k(),E("button",{key:I,class:Fe(["ep-e",{sel:I===e.current}]),type:"button",onClick:M=>g(I)},F(I),11,p1e))),128))])):(k(),E("div",g1e,F(p(i)("sidebar.noEmojiResults")),1))],64)):(k(),E(Te,{key:1},[f.value.length?(k(),E(Te,{key:0},[w("div",m1e,F(p(i)("sidebar.recentEmojis")),1),w("div",v1e,[(k(!0),E(Te,null,ht(f.value,I=>(k(),E("button",{key:I,class:Fe(["ep-e",{sel:I===e.current}]),type:"button",onClick:M=>g(I)},F(I),11,y1e))),128))])],64)):te("",!0),(k(!0),E(Te,null,ht(p(d),I=>(k(),E(Te,{key:I.id},[w("div",k1e,F(p(i)(I.labelKey)),1),w("div",b1e,[(k(!0),E(Te,null,ht(I.emojis,M=>(k(),E("button",{key:M,class:Fe(["ep-e",{sel:M===e.current}]),type:"button",onClick:$=>g(M)},F(M),11,A1e))),128))])],64))),128))],64))]),K(p(Wt),{separator:""}),K(p(Wt),{role:"button",disabled:!(e.current&&e.removable),onClick:_[3]||(_[3]=I=>a("pick",null))},{default:he(()=>[K(p(ve),{name:"close",size:"sm"}),$e(" "+F(p(i)("sidebar.removeEmoji")),1)]),_:1},8,["disabled"]),K(p(Wt),{role:"button",onClick:v},{default:he(()=>[K(p(ve),{name:"sparkles",size:"sm"}),$e(" "+F(p(i)("sidebar.randomEmoji")),1)]),_:1})]),_:1},8,["aria-label"]))}}),w1e=gt(C1e,[["__scopeId","data-v-b0dbbae4"]]),x1e={class:"row"},S1e={key:0,class:"lead"},_1e={class:"left"},I1e=["readonly","onKeydown"],M1e={key:0,class:"gen-dots","aria-hidden":"true"},E1e=["aria-label"],T1e={key:1,class:"act"},L1e={key:0,class:"ts"},N1e={key:1,class:"st"},F1e={key:1,class:"unread-dot"},D1e={key:2,class:"ha"},$1e={key:0,class:"sub"},B1e={class:"sub-text"},z1e=["aria-label"],R1e={class:"menu-time"},O1e=Qe({__name:"SessionRow",props:{session:{},active:{type:Boolean},approvalCount:{default:0},questionCount:{default:0},unread:{type:Boolean,default:!1},stateTag:{default:void 0}},emits:["select","rename","generateTitle","renameStateChange","archive","restore","fork","export","pin"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),{sidebarTabs:s}=Hh(),o=e,r=n;function l(tt){const It=new Date(tt);if(Number.isNaN(It.getTime()))return tt;const Ut=fn=>String(fn).padStart(2,"0");return`${It.getFullYear()}-${Ut(It.getMonth()+1)}-${Ut(It.getDate())} ${Ut(It.getHours())}:${Ut(It.getMinutes())}`}const a=L(()=>o.session.updatedAt?l(o.session.updatedAt):o.session.time),u=L(()=>o.session.cwdLabel!==void 0),c=L(()=>ie.value?"idle":qy({busy:o.session.busy,unread:o.unread,questionCount:o.questionCount,approvalCount:o.approvalCount,pendingInteraction:o.session.pendingInteraction,lastTurnReason:o.session.lastTurnReason})),d=L(()=>c.value==="awaiting-question"),f=L(()=>c.value==="awaiting-approval"),h=L(()=>c.value==="aborted"),g=L(()=>c.value==="running"),m=L(()=>c.value==="unread"),y=L(()=>c.value!=="idle"),A=G(!1),b=G(null),C=G({});function v(tt){const It=tt.target;b.value?.el?.contains(It)||S()}async function x(){P(),A.value=!0,setTimeout(()=>document.addEventListener("mousedown",v),0),window.addEventListener("resize",S),await kt()}function S(){A.value=!1,document.removeEventListener("mousedown",v),window.removeEventListener("resize",S)}Mn(()=>{document.removeEventListener("mousedown",v),document.removeEventListener("mousedown",R),window.removeEventListener("keydown",q,!0),window.removeEventListener("resize",S),window.removeEventListener("resize",P)});const _=L(()=>YD(o.session.title)),I=L(()=>{const tt=_.value.emoji;return tt?o.session.title.slice(tt.length):o.session.title}),M=G(!1),$=G(null),D=G({});let T=null;function N(tt,It,Ut){const fn=$.value?.el,Nn=4,Qt=8,un=fn?.offsetHeight??0,Dn=fn?.offsetWidth??0;let pn=tt.bottom+Nn,wn=!1;pn+un>window.innerHeight-Qt&&(pn=Math.max(Qt,tt.top-un-Nn),wn=!0);const bn=Ut??(It==="left"?tt.left:tt.right-Dn),Xn=Math.max(Qt,Math.min(bn,window.innerWidth-Dn-Qt)),Ue=Ut===void 0?It:`${Math.round(Math.min(Math.max(Ut-Xn,0),Dn))}px`;D.value={top:`${Math.round(pn)}px`,left:`${Math.round(Xn)}px`,transformOrigin:`${Ue} ${wn?"bottom":"top"}`,"--menu-pop-shift":wn?"2px":"-2px"}}async function O(tt,It,Ut="left",fn){const Nn=It??tt?.getBoundingClientRect();if(Nn){if(M.value){P();return}S(),T=tt??null,M.value=!0,setTimeout(()=>document.addEventListener("mousedown",R),0),window.addEventListener("keydown",q,!0),window.addEventListener("resize",P),await kt(),N(Nn,Ut,fn)}}function P(){M.value=!1,T=null,document.removeEventListener("mousedown",R),window.removeEventListener("keydown",q,!0),window.removeEventListener("resize",P)}function R(tt){const It=tt.target;$.value?.el?.contains(It)||T?.contains(It)||P()}function q(tt){tt.key==="Escape"&&($.value?.isComposingKeyEvent(tt)||(tt.preventDefault(),tt.stopPropagation(),P()))}function j(tt){return tt.clientX||tt.clientY?new DOMRect(tt.clientX,tt.clientY,0,0):void 0}function W(tt){tt.stopPropagation();const It=tt;O(It.currentTarget,j(It),"left",It.clientX||void 0)}function z(tt){const It=b.value?.el,Ut=tt,fn=j(Ut)??It?.getBoundingClientRect();S(),O(It,fn,"left",Ut.clientX||void 0)}function H(tt){if(P(),tt===_.value.emoji)return;const It=Mre(o.session.title,tt);It&&It!==o.session.title&&r("rename",o.session.id,It)}const ee=Kl(),V=L(()=>(ee.experimentalFlags.value.auto_session_title??ee.config.value?.experimental?.auto_session_title)===!0),ie=G(!1),se=G(""),Z=G(null),pe=G(null),re=G(!1);let fe="",Ee=null;const{handleCompositionStart:X,handleCompositionEnd:we,isComposingKeyEvent:Y}=Xr();async function le(){S(),P(),ie.value=!0,se.value=o.session.title,await kt();try{Z.value?.focus(),Z.value?.select()}catch{}}function Ce(){if(!ie.value)return;const tt=se.value.trim();tt&&tt!==Ee&&tt!==o.session.title&&r("rename",o.session.id,tt),ie.value=!1}function ae(){re.value||Ce()}function oe(tt){Y(tt)||re.value||Ce()}function Q(tt){Y(tt)||ne()}function ne(){re.value=!1,ie.value=!1}function ge(tt){const It=pe.value;if(!(It===null||!(tt.target instanceof Node)||It.contains(tt.target))){if(re.value){re.value=!1,ie.value=!1;return}Ce()}}qe(ie,tt=>{tt?document.addEventListener("pointerdown",ge,!0):document.removeEventListener("pointerdown",ge,!0)}),Mn(()=>document.removeEventListener("pointerdown",ge,!0));function Ae(){re.value||(re.value=!0,fe=se.value,Ee=null,se.value="",r("generateTitle",o.session.id,tt=>{re.value=!1,ie.value&&(se.value=tt??fe,Ee=tt,kt(()=>{try{Z.value?.focus(),Z.value?.select()}catch{}}))}))}qe(ie,tt=>r("renameStateChange",tt));async function _e(tt){ie.value||(tt.preventDefault(),tt.stopPropagation(),A.value&&S(),await x(),Ke(tt))}function Ke(tt){const It=b.value?.el,Ut=8,fn=It?.offsetHeight??0,Nn=It?.offsetWidth??0;let Qt=tt.clientY,un=!1;Qt+fn>window.innerHeight-Ut&&(Qt=Math.max(Ut,tt.clientY-fn),un=!0);let Dn=tt.clientX,pn=!1;Dn+Nn>window.innerWidth-Ut&&(Dn=Math.max(Ut,tt.clientX-Nn),pn=!0),C.value={top:`${Math.round(Qt)}px`,left:`${Math.round(Dn)}px`,transformOrigin:`${un?"bottom":"top"} ${pn?"right":"left"}`,"--menu-pop-shift":un?"2px":"-2px"}}const xe=G(!1),Ne=G(!1);async function et(){const tt=await ao(o.session.id);xe.value=tt,Ne.value=!tt,setTimeout(()=>{xe.value=!1,Ne.value=!1,S()},1500)}function ut(){S(),r("fork",o.session.id)}function yt(){S(),r("export",o.session.id)}function Mt(){S(),r("pin",o.session.id)}function Ze(){S(),r("archive",o.session.id)}function Ge(){S(),r("restore",o.session.id)}t({closeMenu:S});function lt(){const tt=o.session.pullRequest?.url;tt&&window.open(tt,"_blank","noopener")}return(tt,It)=>(k(),E("div",{class:Fe(["se",{on:e.active,flat:u.value}]),onClick:It[8]||(It[8]=Ut=>r("select",e.session.id)),onContextmenu:_e},[w("div",x1e,[u.value?te("",!0):(k(),E("span",S1e)),w("div",_1e,[ie.value?(k(),E("div",{key:0,ref_key:"renameWrapRef",ref:pe,class:Fe(["rename-wrap",{generating:re.value}]),onClick:It[4]||(It[4]=Ct(()=>{},["stop"]))},[$n(w("input",{ref_key:"renameInputRef",ref:Z,"onUpdate:modelValue":It[0]||(It[0]=Ut=>se.value=Ut),class:"rename-input",readonly:re.value,onKeydown:[_s(Ct(oe,["stop"]),["enter"]),_s(Ct(Q,["stop"]),["esc"])],onCompositionstart:It[1]||(It[1]=(...Ut)=>p(X)&&p(X)(...Ut)),onCompositionend:It[2]||(It[2]=(...Ut)=>p(we)&&p(we)(...Ut)),onBlur:ae},null,40,I1e),[[uo,se.value]]),re.value?(k(),E("span",M1e,[...It[9]||(It[9]=[w("i",null,null,-1),w("i",null,null,-1),w("i",null,null,-1)])])):te("",!0),V.value?(k(),de(p(kn),{key:1,text:p(i)("sidebar.genTitle")},{default:he(()=>[K(p(tn),{class:"gen-title-btn",size:"sm",label:p(i)("sidebar.genTitle"),disabled:re.value,onMousedown:It[3]||(It[3]=Ct(()=>{},["prevent","stop"])),onClick:Ct(Ae,["stop"])},{default:he(()=>[K(p(ve),{name:"gen-title"})]),_:1},8,["label","disabled"])]),_:1},8,["text"])):te("",!0)],2)):(k(),E("span",{key:1,class:"t",onDblclick:Ct(le,["stop"])},[_.value.emoji?(k(),E("button",{key:0,type:"button",class:"emoji","aria-label":p(i)("sidebar.setEmoji"),onClick:Ct(W,["stop"]),onDblclick:It[5]||(It[5]=Ct(()=>{},["stop"]))},F(_.value.emoji),41,E1e)):te("",!0),$e(F(I.value),1)],32))]),ie.value?te("",!0):(k(),E("span",T1e,[K(p(kn),{text:p(i)("workspace.awaitingAnswerTitle")},{default:he(()=>[d.value?(k(),de(p(va),{key:0,variant:"info",size:"sm"},{default:he(()=>[$e(F(p(i)("workspace.awaitingAnswer")),1)]),_:1})):te("",!0)]),_:1},8,["text"]),K(p(kn),{text:p(i)("workspace.awaitingPermissionTitle")},{default:he(()=>[f.value?(k(),de(p(va),{key:0,variant:"warning",size:"sm"},{default:he(()=>[$e(F(p(i)("workspace.awaitingPermission")),1)]),_:1})):te("",!0)]),_:1},8,["text"]),K(p(kn),{text:p(i)("workspace.abortedTitle")},{default:he(()=>[h.value?(k(),de(p(va),{key:0,variant:"danger",size:"sm"},{default:he(()=>[$e(F(p(i)("workspace.aborted")),1)]),_:1})):te("",!0)]),_:1},8,["text"]),y.value?g.value||m.value?(k(),E("span",N1e,[g.value?(k(),de(p(Mi),{key:0,size:"sm"})):(k(),E("span",F1e))])):te("",!0):(k(),E("span",L1e,F(e.session.time),1)),ie.value?te("",!0):(k(),E("span",D1e,[e.stateTag==="done"?(k(),de(p(kn),{key:0,text:p(i)("sidebar.reopen")},{default:he(()=>[K(p(tn),{class:"reopen-btn",size:"sm",label:p(i)("sidebar.reopen"),onClick:Ct(Ge,["stop"])},{default:he(()=>[K(p(ve),{name:"undo"})]),_:1},8,["label"])]),_:1},8,["text"])):(k(),E(Te,{key:1},[K(p(kn),{text:e.session.pinned?p(i)("sidebar.unpin"):p(i)("sidebar.pin")},{default:he(()=>[K(p(tn),{class:"pin-btn",size:"sm",label:e.session.pinned?p(i)("sidebar.unpin"):p(i)("sidebar.pin"),onClick:Ct(Mt,["stop"])},{default:he(()=>[K(p(ve),{name:e.session.pinned?"unpin":"pin"},null,8,["name"])]),_:1},8,["label"])]),_:1},8,["text"]),K(p(kn),{text:p(s)?p(i)("sidebar.complete"):p(i)("sidebar.archive")},{default:he(()=>[K(p(tn),{class:Fe(p(s)?"complete-btn":"archive-btn"),size:"sm",label:p(s)?p(i)("sidebar.complete"):p(i)("sidebar.archive"),onClick:Ct(Ze,["stop"])},{default:he(()=>[K(p(ve),{name:p(s)?"state-done":"archive"},null,8,["name"])]),_:1},8,["class","label"])]),_:1},8,["text"])],64))]))]))]),e.session.cwdLabel!==void 0?(k(),E("div",$1e,[K(p(ve),{class:"sub-icon",name:"folder-closed",size:"sm"}),w("span",B1e,F(e.session.cwdLabel),1),e.session.pullRequest?(k(),E("button",{key:0,type:"button",class:Fe(["pr",`pr--${e.session.pullRequest.state}`]),"aria-label":`PR #${e.session.pullRequest.number}`,onClick:Ct(lt,["stop"])},[K(p(ve),{name:"git-pull-request",size:"sm"}),w("span",null,"#"+F(e.session.pullRequest.number),1)],10,z1e)):te("",!0)])):te("",!0),(k(),de(Gr,{to:"body"},[K(ls,{name:"menu-pop"},{default:he(()=>[A.value?(k(),de(p(sr),{key:0,ref_key:"menuRef",ref:b,class:"menu",style:qt(C.value),onClick:It[6]||(It[6]=Ct(()=>{},["stop"]))},{default:he(()=>[K(p(Wt),{danger:Ne.value,onClick:et},{default:he(()=>[K(p(ve),{name:"copy",size:"sm"}),$e(" "+F(Ne.value?p(i)("sidebar.copyFailed"):xe.value?p(i)("sidebar.copied"):p(i)("sidebar.copySessionId")),1)]),_:1},8,["danger"]),K(p(Wt),{separator:""}),K(p(Wt),{onClick:le},{default:he(()=>[K(p(ve),{name:"pencil",size:"sm"}),$e(" "+F(p(i)("sidebar.rename")),1)]),_:1}),K(p(Wt),{onClick:z},{default:he(()=>[K(p(ve),{name:"emoji",size:"sm"}),$e(" "+F(p(i)("sidebar.setEmoji")),1)]),_:1}),K(p(Wt),{onClick:ut},{default:he(()=>[K(p(ve),{name:"git-fork",size:"sm"}),$e(" "+F(p(i)("sidebar.fork")),1)]),_:1}),K(p(Wt),{onClick:yt},{default:he(()=>[K(p(ve),{name:"download",size:"sm"}),$e(" "+F(p(i)("sidebar.export")),1)]),_:1}),e.stateTag!=="done"?(k(),de(p(Wt),{key:0,onClick:Mt},{default:he(()=>[K(p(ve),{name:e.session.pinned?"unpin":"pin",size:"sm"},null,8,["name"]),$e(" "+F(e.session.pinned?p(i)("sidebar.unpin"):p(i)("sidebar.pin")),1)]),_:1})):te("",!0),e.stateTag==="done"?(k(),de(p(Wt),{key:1,onClick:Ge},{default:he(()=>[K(p(ve),{name:"undo",size:"sm"}),$e(" "+F(p(i)("sidebar.reopen")),1)]),_:1})):(k(),de(p(Wt),{key:2,onClick:Ze},{default:he(()=>[K(p(ve),{name:p(s)?"state-done":"archive",size:"sm"},null,8,["name"]),$e(" "+F(p(s)?p(i)("sidebar.markDone"):p(i)("sidebar.archive")),1)]),_:1})),K(p(Wt),{separator:""}),w("div",R1e,F(a.value),1)]),_:1},8,["style"])):te("",!0)]),_:1})])),(k(),de(Gr,{to:"body"},[K(ls,{name:"menu-pop"},{default:he(()=>[M.value?(k(),de(w1e,{key:0,ref_key:"pickerRef",ref:$,class:"picker",style:qt(D.value),current:_.value.emoji,removable:_.value.rest.length>0,onClick:It[7]||(It[7]=Ct(()=>{},["stop"])),onPick:H},null,8,["style","current","removable"])):te("",!0)]),_:1})]))],34))}}),vp=gt(O1e,[["__scopeId","data-v-d577d143"]]),P1e=["draggable"],j1e={class:"gh-top"},H1e={class:"gh-name"},W1e=["inert"],q1e={key:0,class:"show-more-row"},U1e=["disabled"],K1e={class:"show-more-label"},V1e={key:1,class:"show-more-sep","aria-hidden":"true"},Z1e={class:"show-more-label"},G1e={key:1,class:"group-empty"},Q1e=Qe({__name:"WorkspaceGroup",props:{group:{},activeWorkspaceId:{},activeId:{},renamingId:{},renameValue:{},renameInputRef:{},pendingBySession:{},unreadBySession:{},wsMenuOpenId:{},dragging:{type:Boolean},sortable:{type:Boolean},isCollapsed:{type:Function},visibleLimit:{type:Function},flashSessionId:{},pinnedDragSession:{},stateTag:{}},emits:["groupClick","groupContextmenu","toggleWsMenu","createInWorkspace","selectSession","renameSession","generateSessionTitle","archiveSession","forkSession","exportSession","pinSession","dropPinnedSession","expand","collapse","confirmRename","cancelRename","updateRenameValue","wsDragstart","wsDragend"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=L({get:()=>i.renameValue,set:$=>s("updateRenameValue",$)}),r=G(!1),l=L(()=>i.pinnedDragSession!=null),a=L(()=>i.pinnedDragSession?.workspaceId===i.group.workspace.id);function u($){if(i.pinnedDragSession!=null){if(!a.value){$.dataTransfer&&($.dataTransfer.dropEffect="none");return}$.preventDefault(),$.dataTransfer&&($.dataTransfer.dropEffect="move"),r.value=!0}}function c($){i.pinnedDragSession==null||!a.value||($.preventDefault(),r.value=!1,s("dropPinnedSession",i.pinnedDragSession.id))}function d($){$.currentTarget.contains($.relatedTarget)||(r.value=!1)}const f=L(()=>i.visibleLimit(i.group.workspace.id)??i.group.initialCount),h=L(()=>{const $=i.group.sessions.slice(0,f.value);if(i.activeId&&!$.some(D=>D.id===i.activeId)){const D=i.group.sessions.find(T=>T.id===i.activeId);if(D)return[...$,D]}return $}),g=L(()=>i.group.sessions.length>f.value||i.group.hasMore||i.group.loadingMore),m=L(()=>f.value>i.group.initialCount);function y($){i.renameInputRef.value=$ instanceof HTMLInputElement?$:null}const{handleCompositionStart:A,handleCompositionEnd:b,isComposingKeyEvent:C}=Xr();function v($){C($)||s("confirmRename")}function x($){C($)||s("cancelRename")}const S=G(null);function _($){i.renamingId!==i.group.workspace.id&&s("groupContextmenu",i.group.workspace,$)}function I($){i.sortable!==!1&&$.dataTransfer&&($.dataTransfer.effectAllowed="move",$.dataTransfer.setData("text/plain",i.group.workspace.id),s("wsDragstart",i.group.workspace.id))}function M($,D){D.dataTransfer&&(D.dataTransfer.effectAllowed="move",D.dataTransfer.setData(ev,$),D.dataTransfer.setData("text/plain",$))}return($,D)=>(k(),E("div",{class:Fe(["group",{dragging:e.dragging,"pinned-drag-active":l.value&&a.value,"pinned-drop-hover":r.value,"pinned-drop-blocked":l.value&&!a.value}]),onDragover:u,onDrop:c,onDragleave:d},[w("div",{class:Fe(["gh",{on:e.group.workspace.id===e.activeWorkspaceId&&e.activeId==="",collapsed:e.isCollapsed(e.group.workspace.id)}]),draggable:e.sortable!==!1&&e.renamingId!==e.group.workspace.id,onClick:D[7]||(D[7]=Ct(T=>s("groupClick",e.group.workspace.id,T),["stop"])),onContextmenu:_,onDragstart:I,onDragend:D[8]||(D[8]=T=>s("wsDragend"))},[w("div",j1e,[e.isCollapsed(e.group.workspace.id)?(k(),de(p(ve),{key:0,class:"gh-folder",name:"folder-closed"})):(k(),de(p(ve),{key:1,class:"gh-folder",name:"folder"})),e.renamingId!==e.group.workspace.id?(k(),de(p(kn),{key:2,text:e.group.workspace.root},{default:he(()=>[w("span",H1e,F(e.group.workspace.name),1)]),_:1},8,["text"])):$n((k(),E("input",{key:3,ref:y,"onUpdate:modelValue":D[0]||(D[0]=T=>o.value=T),class:"gh-rename",type:"text",onKeydown:[_s(v,["enter"]),_s(x,["esc"])],onCompositionstart:D[1]||(D[1]=(...T)=>p(A)&&p(A)(...T)),onCompositionend:D[2]||(D[2]=(...T)=>p(b)&&p(b)(...T)),onBlur:D[3]||(D[3]=T=>s("cancelRename")),onClick:D[4]||(D[4]=Ct(()=>{},["stop"]))},null,544)),[[uo,o.value]]),e.renamingId!==e.group.workspace.id?(k(),E("div",{key:4,class:Fe(["gh-actions",{open:e.wsMenuOpenId===e.group.workspace.id}])},[K(p(tn),{class:Fe(["gh-more",{open:e.wsMenuOpenId===e.group.workspace.id}]),size:"sm",label:p(n)("sidebar.options"),tooltip:p(n)("sidebar.options"),"aria-haspopup":"menu","aria-expanded":e.wsMenuOpenId===e.group.workspace.id,onClick:D[5]||(D[5]=Ct(T=>s("toggleWsMenu",e.group.workspace,T),["stop"]))},{default:he(()=>[K(p(ve),{name:"dots-horizontal"})]),_:1},8,["class","label","tooltip","aria-expanded"]),K(p(tn),{class:"gh-add",size:"sm",label:p(n)("workspace.newInGroup"),tooltip:p(n)("workspace.newInGroup"),onClick:D[6]||(D[6]=Ct(T=>s("createInWorkspace",e.group.workspace.id),["stop"]))},{default:he(()=>[K(p(ve),{name:"chat-new"})]),_:1},8,["label","tooltip"])],2)):te("",!0)])],42,P1e),w("div",{class:Fe(["group-sessions",{collapsed:e.isCollapsed(e.group.workspace.id)}]),inert:e.isCollapsed(e.group.workspace.id)},[(k(!0),E(Te,null,ht(h.value,T=>(k(),de(vp,{key:T.id,session:T,active:T.id===e.activeId,"approval-count":e.pendingBySession[T.id]?.approvals??0,"question-count":e.pendingBySession[T.id]?.questions??0,unread:e.unreadBySession[T.id]??!1,"state-tag":i.stateTag,draggable:S.value!==T.id,"data-session-id":T.id,class:Fe({"se-locate-flash":e.flashSessionId===T.id}),onDragstart:N=>M(T.id,N),onRenameStateChange:N=>S.value=N?T.id:null,onSelect:D[9]||(D[9]=N=>s("selectSession",N)),onRename:D[10]||(D[10]=(N,O)=>s("renameSession",N,O)),onGenerateTitle:D[11]||(D[11]=(N,O)=>s("generateSessionTitle",N,O)),onArchive:D[12]||(D[12]=N=>s("archiveSession",N)),onFork:D[13]||(D[13]=N=>s("forkSession",N)),onExport:D[14]||(D[14]=N=>s("exportSession",N)),onPin:D[15]||(D[15]=N=>s("pinSession",N))},null,8,["session","active","approval-count","question-count","unread","state-tag","draggable","data-session-id","class","onDragstart","onRenameStateChange"]))),128)),g.value||m.value?(k(),E("div",q1e,[g.value?(k(),E("button",{key:0,class:"show-more",disabled:e.group.loadingMore,onClick:D[16]||(D[16]=Ct(T=>s("expand",e.group.workspace.id),["stop"]))},[K(p(ve),{name:"chevron-down",size:"sm"}),w("span",K1e,F(e.group.loadingMore?p(n)("sidebar.loadingMore"):p(n)("sidebar.showMore")),1)],8,U1e)):te("",!0),g.value&&m.value?(k(),E("span",V1e,"·")):te("",!0),m.value?(k(),E("button",{key:2,class:"show-more",onClick:D[17]||(D[17]=Ct(T=>s("collapse",e.group.workspace.id),["stop"]))},[K(p(ve),{name:"chevron-up",size:"sm"}),w("span",Z1e,F(p(n)("sidebar.showLess")),1)])):te("",!0)])):te("",!0),e.group.sessions.length===0?(k(),E("div",G1e,F(e.group.pinnedCount>0?p(n)("sidebar.allPinned",{count:e.group.pinnedCount}):p(n)("sidebar.noSessions")),1)):te("",!0)],10,W1e)],34))}}),Y1e=gt(Q1e,[["__scopeId","data-v-6756fbf6"]]),J1e={class:"pinned-label"},X1e={class:"pinned-title"},epe={key:0,class:"pinned-rows"},tpe=["draggable","onDragstart"],npe=Qe({__name:"PinnedSessionList",props:{sessions:{},activeId:{},pendingBySession:{},unreadBySession:{},stateTag:{},flashSessionId:{}},emits:["selectSession","renameSession","generateSessionTitle","archiveSession","forkSession","exportSession","pinSession","dropPin","sessionDragStart","sessionDragEnd"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=e,o=n,r=G(Mae());function l(){r.value=!r.value,Db(r.value)}function a(){r.value&&(r.value=!1,Db(!1))}t({expand:a});const u=G(null),c=G(null);function d(b,C){if(!C.dataTransfer)return;C.dataTransfer.effectAllowed="move",C.dataTransfer.setData("text/plain",b),u.value=b;const v=s.sessions.find(x=>x.id===b)?.workspaceId;v!==void 0&&o("sessionDragStart",b,v)}function f(){u.value=null,o("sessionDragEnd")}qe(()=>s.sessions,b=>{u.value!==null&&!b.some(C=>C.id===u.value)&&(u.value=null)});const h=G(!1);function g(b){return b.dataTransfer?.types.includes(ev)??!1}function m(b){g(b)&&(b.preventDefault(),b.dataTransfer&&(b.dataTransfer.dropEffect="move"),h.value=!0)}function y(b){h.value=!1;const C=b.dataTransfer?.getData(ev);C&&o("dropPin",C)}function A(b){b.currentTarget.contains(b.relatedTarget)||(h.value=!1)}return(b,C)=>(k(),E("div",{class:Fe(["pinned",{"drop-active":h.value}]),onDragover:m,onDrop:y,onDragleave:A},[w("div",J1e,[w("span",X1e,F(p(i)("sidebar.pinned")),1),K(p(tn),{class:Fe(["pinned-toggle",{"pinned-toggle--on":r.value}]),size:"sm",label:r.value?p(i)("sidebar.expandPinned"):p(i)("sidebar.collapsePinned"),tooltip:r.value?p(i)("sidebar.expandPinned"):p(i)("sidebar.collapsePinned"),onClick:Ct(l,["stop"])},{default:he(()=>[r.value?(k(),de(p(ve),{key:0,name:"chevron-right"})):(k(),de(p(ve),{key:1,name:"chevron-down"}))]),_:1},8,["class","label","tooltip"])]),r.value?te("",!0):(k(),E("div",epe,[(k(!0),E(Te,null,ht(e.sessions,v=>(k(),E("div",{key:v.id,class:Fe(["pin-row",{dragging:u.value===v.id}]),draggable:c.value!==v.id,onDragstart:x=>d(v.id,x),onDragend:f},[K(vp,{session:v,active:v.id===e.activeId,"approval-count":e.pendingBySession[v.id]?.approvals??0,"question-count":e.pendingBySession[v.id]?.questions??0,unread:e.unreadBySession[v.id]??!1,"state-tag":s.stateTag,"data-session-id":v.id,class:Fe({"se-locate-flash":e.flashSessionId===v.id}),onRenameStateChange:x=>c.value=x?v.id:null,onSelect:C[0]||(C[0]=x=>o("selectSession",x)),onRename:C[1]||(C[1]=(x,S)=>o("renameSession",x,S)),onGenerateTitle:C[2]||(C[2]=(x,S)=>o("generateSessionTitle",x,S)),onArchive:C[3]||(C[3]=x=>o("archiveSession",x)),onFork:C[4]||(C[4]=x=>o("forkSession",x)),onExport:C[5]||(C[5]=x=>o("exportSession",x)),onPin:C[6]||(C[6]=x=>o("pinSession",x))},null,8,["session","active","approval-count","question-count","unread","state-tag","data-session-id","class","onRenameStateChange"])],42,tpe))),128))]))],34))}}),ipe=gt(npe,[["__scopeId","data-v-d4e69bf4"]]),spe={class:"ch"},ope={class:"ch-brand"},rpe={class:"ch-tail"},lpe={class:"search-input"},ape={key:0,class:"status-tabs"},upe={class:"side-section-label"},cpe={class:"side-section-title"},dpe={class:"side-section-actions"},fpe={key:0,class:"empty"},hpe={key:1,class:"show-more-row"},ppe=["disabled"],gpe={class:"show-more-label"},mpe={key:0,class:"empty"},vpe={key:1,class:"empty"},ype=["data-ws-id","onDragover","onDrop"],kpe=["onClick","onContextmenu"],bpe={class:"done-gh-name"},Ape={class:"done-gh-count"},Cpe={class:"done-gh-act"},wpe={key:0,class:"done-sessions"},xpe={key:2,class:"empty"},Spe={key:3,class:"show-more-row"},_pe=["disabled"],Ipe={class:"show-more-label"},Mpe=["onClick","onContextmenu"],Epe={class:"ws-dir-row"},Tpe=["onKeydown"],Lpe={key:1,class:"ws-dir-name"},Npe={class:"ws-dir-act"},Fpe={class:"ws-dir-sub"},Dpe={key:0,class:"empty"},$pe={class:"folder-drop-card"},Bpe={class:"view-menu-label"},zpe={class:"view-menu-check"},Rpe={class:"view-menu-check"},Ope={class:"view-menu-label"},Ppe={class:"view-menu-check"},jpe={class:"view-menu-check"},u_="var(--color-accent)",Hpe=!1,Wpe=1e3,qpe=Qe({__name:"Sidebar",props:{activeWorkspace:{default:null},activeWorkspaceId:{default:null},sessions:{},groups:{},workspaceSortMode:{default:"manual"},pinnedSessions:{default:()=>[]},flatSessions:{default:()=>[]},flatHasMore:{type:Boolean,default:!1},flatLoadingMore:{type:Boolean,default:!1},doneSessions:{default:()=>[]},doneHasMore:{type:Boolean,default:!1},doneLoadingMore:{type:Boolean,default:!1},initialized:{type:Boolean,default:!1},activeId:{},attentionBySession:{default:()=>({})},pendingBySession:{default:()=>({})},unreadBySession:{default:()=>({})},colWidth:{default:220},collapsed:{type:Boolean,default:!1},dragging:{type:Boolean,default:!1}},emits:["select","create","createInWorkspace","selectWorkspace","addWorkspace","addWorkspacePaths","rename","generateTitle","archive","restore","fork","export","pin","dropPin","unpin","renameWorkspace","deleteWorkspace","reorderWorkspaces","setWorkspaceSortMode","loadMoreSessions","loadAllSessions","ensureFlatSessions","loadMoreFlatSessions","ensureDoneSessions","loadMoreDoneSessions","openSessionAdmin","openSettings","login","collapse"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G(!1),r=c()?["⌘","K"]:["Ctrl","K"],l=c()?["⌃","⇧","O"]:["Ctrl","Shift","O"];function a(){s("loadAllSessions"),o.value=!0}function u(Be){if(Fre(Be)){Be.preventDefault(),a();return}!Be.metaKey&&Be.ctrlKey&&Be.shiftKey&&Be.key.toLowerCase()==="o"&&(Be.preventDefault(),s("create"))}mn(()=>window.addEventListener("keydown",u)),Gn(()=>window.removeEventListener("keydown",u));function c(){if(typeof navigator>"u")return!1;if(/Mac|iPod|iPhone|iPad/.test(navigator.platform))return!0;const Be=navigator.userAgentData;return Be?.platform==="macOS"||Be?.platform==="iOS"}const d=G(null),f=G(!1),h=G(!1),g=G(!1);let m=null;function y(Be=d.value){Be&&(f.value=Be.scrollTop>0,h.value=Be.scrollTop+Be.clientHeight<Be.scrollHeight-1)}function A(Be){y(Be.target),g.value=!0,m&&clearTimeout(m),m=setTimeout(()=>{g.value=!1,m=null},900)}let b=null;mn(()=>{kt(()=>{y(),typeof ResizeObserver=="function"&&d.value&&(b=new ResizeObserver(()=>y()),b.observe(d.value))})}),N0(()=>y()),Gn(()=>{b?.disconnect(),m&&clearTimeout(m),pn&&clearTimeout(pn),It&&clearTimeout(It)});const C=G(new Set(Iae()));function v(Be){return C.value.has(Be)}function x(Be){const Pe=new Set(C.value);Pe.has(Be)?Pe.delete(Be):Pe.add(Be),C.value=Pe,Y4(Pe)}function S(){const Be=new Set(i.groups.map(Pe=>Pe.workspace.id));C.value=Be,Y4(Be)}function _(){const Be=new Set;C.value=Be,Y4(Be)}const I=L(()=>i.groups.length>0&&i.groups.every(Be=>C.value.has(Be.workspace.id))),M=G(new Map);function $(Be){return M.value.get(Be)}function D(Be){const Pe=i.groups.find(An=>An.workspace.id===Be);if(!Pe)return;const dt=(M.value.get(Be)??Pe.initialCount)+h6,St=new Map(M.value);St.set(Be,dt),M.value=St,Pe.sessions.length<dt&&Pe.hasMore&&s("loadMoreSessions",Be)}function T(Be){if(!M.value.has(Be))return;const Pe=new Map(M.value);Pe.delete(Be),M.value=Pe}const N=G(null),O=G(null);function P(Be){N.value=Be}function R(){N.value=null,O.value=null}function q(Be){const Pe=Be.currentTarget.getBoundingClientRect();return Be.clientY<Pe.top+Pe.height/2?"before":"after"}function j(Be,Pe){N.value===null||N.value===Pe||(Be.preventDefault(),Be.dataTransfer&&(Be.dataTransfer.dropEffect="move"),O.value={id:Pe,position:q(Be)})}function W(Be){const Pe=N.value,dt=O.value?.id===Be?O.value.position:"before";if(O.value=null,N.value=null,!Pe||Pe===Be)return;const St=Xae(i.groups.map(An=>An.workspace.id),Pe,Be,dt);s("reorderWorkspaces",St)}const z=G(null);function H(Be,Pe){z.value={id:Be,workspaceId:Pe}}function ee(){z.value=null}function V(Be){z.value=null,s("unpin",Be)}const ie=G(Eae());function se(Be){ie.value!==Be&&(ie.value=Be,Tae(Be))}const Z=G("open"),{sidebarTabs:pe}=Hh();qe(pe,Be=>{!Be&&Z.value!=="open"&&(Z.value="open")});const re=L(()=>eS([...i.pinnedSessions,...i.flatSessions].map(Be=>({busy:Be.busy,unread:i.unreadBySession[Be.id]??!1,questionCount:i.pendingBySession[Be.id]?.questions??0,approvalCount:i.pendingBySession[Be.id]?.approvals??0,pendingInteraction:Be.pendingInteraction,lastTurnReason:Be.lastTurnReason})))),fe=L(()=>eS(i.doneSessions.map(Be=>({busy:Be.busy,unread:i.unreadBySession[Be.id]??!1,questionCount:i.pendingBySession[Be.id]?.questions??0,approvalCount:i.pendingBySession[Be.id]?.approvals??0,pendingInteraction:Be.pendingInteraction,lastTurnReason:Be.lastTurnReason})))),Ee=L(()=>[{value:"open",label:n("sidebar.tabOpen"),swatch:re.value===null?void 0:u_},{value:"done",label:n("sidebar.tabDone"),swatch:fe.value===null?void 0:u_},{value:"workspaces",label:n("sidebar.tabWorkspaces")}]);function X(Be){pe.value&&(Z.value=Be,Be==="done"&&s("ensureDoneSessions"))}const we=L(()=>i.groups.filter(Be=>Be.sessions.length>0||Be.workspace.id===i.activeWorkspaceId)),Y=L(()=>i.groups.map(Be=>({workspace:Be.workspace,sessions:i.doneSessions.filter(Pe=>Pe.workspaceId===Be.workspace.id).map(Pe=>({...Pe,cwdLabel:void 0}))})).filter(Be=>Be.sessions.length>0));qe(()=>i.initialized,Be=>{Be&&(s("ensureFlatSessions"),s("ensureDoneSessions"))},{immediate:!0});const le=G(!1),Ce=G({}),ae=G(null);function oe(Be){const Pe=Be.target;Pe.closest(".view-menu")||Pe.closest(".side-section-view")||ne()}async function Q(Be){if(le.value){ne();return}const Pe=Be.currentTarget;le.value=!0,document.addEventListener("mousedown",oe),window.addEventListener("resize",ne),await kt();const dt=ae.value?.el,St=Pe.getBoundingClientRect(),An=4,pi=8,hs=dt?.offsetHeight??0,is=dt?.offsetWidth??0;let Ls=St.bottom+An,Ui=!1;Ls+hs>window.innerHeight-pi&&(Ls=Math.max(pi,St.top-hs-An),Ui=!0);let On=St.right-is;On<pi&&(On=pi),Ce.value={top:`${Math.round(Ls)}px`,left:`${Math.round(On)}px`,transformOrigin:Ui?"bottom right":"top right","--menu-pop-shift":Ui?"2px":"-2px"}}function ne(){le.value=!1,document.removeEventListener("mousedown",oe),window.removeEventListener("resize",ne)}function ge(Be){se(Be),ne()}function Ae(Be){s("setWorkspaceSortMode",Be),ne()}function _e(){s("openSessionAdmin"),ne()}const Ke=G(null);function xe(Be,Pe){Pe.dataTransfer&&(Pe.dataTransfer.effectAllowed="move",Pe.dataTransfer.setData(ev,Be),Pe.dataTransfer.setData("text/plain",Be))}const Ne=L(()=>Z.value==="open"&&ie.value==="flat"),et=G(!1);function ut(Be){!Ne.value||z.value===null||(Be.preventDefault(),Be.dataTransfer&&(Be.dataTransfer.dropEffect="move"),et.value=!0)}function yt(Be){!Ne.value||z.value===null||(Be.preventDefault(),et.value=!1,V(z.value.id))}function Mt(Be){Be.currentTarget.contains(Be.relatedTarget)||(et.value=!1)}function Ze(Be,Pe){Pe.target.closest(".gh-more, .gh-add")||x(Be)}function Ge(Be){s("select",Be)}function lt(Be){s("select",Be),un(Be)}const tt=G(null);let It=null;const Ut=L(()=>i.groups.map(Be=>Be.workspace));function fn(Be,Pe){const dt=getComputedStyle(Be).getPropertyValue(Pe).trim(),St=/^([\d.]+)(ms|s)$/.exec(dt);if(!St)return 0;const An=Number.parseFloat(St[1]);return St[2]==="s"?An*1e3:An}function Nn(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}function Qt(Be,Pe){tt.value=Be,It&&clearTimeout(It),It=setTimeout(()=>{tt.value=null,It=null},fn(Pe,"--duration-flash"))}function un(Be){const Pe=i.groups.find(dt=>dt.sessions.some(St=>St.id===Be));if(!Pe){bn.value?.expand(),kt(()=>{const St=[...bn.value?.$el?.querySelectorAll("[data-session-id]")??[]].find(An=>An.dataset.sessionId===Be);St?.scrollIntoView({block:"nearest",behavior:Nn()}),St&&Qt(Be,St)});return}Z.value!=="open"&&X("open"),ie.value!=="grouped"&&se("grouped"),v(Pe.workspace.id)&&x(Pe.workspace.id),kt(()=>{const dt=[...d.value?.querySelectorAll("[data-session-id]")??[]].find(St=>St.dataset.sessionId===Be);dt?.scrollIntoView({block:"start",behavior:Nn()}),dt&&Qt(Be,dt)})}const Dn=G(null);let pn=null;function wn(Be){Z.value!=="open"&&X("open"),ie.value!=="grouped"&&se("grouped"),v(Be)&&x(Be),s("selectWorkspace",Be),kt(()=>{const Pe=[...d.value?.querySelectorAll("[data-ws-id]")??[]].find(dt=>dt.dataset.wsId===Be);Pe?.scrollIntoView({block:"start",behavior:Nn()}),Pe&&(Dn.value=Be,pn&&clearTimeout(pn),pn=setTimeout(()=>{Dn.value=null,pn=null},fn(Pe,"--duration-flash")))})}const bn=G(null);function Xn(Be){bn.value?bn.value.expand():Db(!1),s("pin",Be)}function Ue(Be){bn.value?.expand(),s("dropPin",Be)}const st=G(0),ct=G(!1);function ot(){st.value=0,ct.value=!1}function sn(Be){!sm()||!K4(Be)||(Be.preventDefault(),Be.stopPropagation(),st.value+=1,ct.value=!0)}function Nt(Be){!sm()||!K4(Be)||(Be.preventDefault(),Be.stopPropagation(),Be.dataTransfer&&(Be.dataTransfer.dropEffect="copy"))}function Tn(Be){!sm()||!K4(Be)||(st.value=Math.max(0,st.value-1),st.value===0&&(ct.value=!1))}function fs(Be){if(ot(),!sm())return;const Pe=$oe(Be);Pe.length!==0&&(Be.preventDefault(),Be.stopPropagation(),s("addWorkspacePaths",Pe))}const vi=G(null),Dt=G(""),Is=G(""),Ei=G(null);function Pn(){return Ei}function bs(Be,Pe){vi.value=Be,Is.value=Pe,Dt.value=Pe,kt().then(()=>Ei.value?.focus())}function Lo(){const Be=vi.value,Pe=Dt.value.trim();Be&&Pe&&Pe!==Is.value&&s("renameWorkspace",Be,Pe),vi.value=null}function Oi(){vi.value=null}function co(Be){Dt.value=Be}const{handleCompositionStart:Wi,handleCompositionEnd:As,isComposingKeyEvent:fo}=Xr();function Pi(Be){fo(Be)||Lo()}const es=G(!1),Ai=G(null),No=G({}),Ci=G(null);function Ti(Be){Ci.value?.el&&!Ci.value.el.contains(Be.target)&&vn()}function Yt(Be,Pe){Pe.preventDefault(),Pe.stopPropagation(),Ai.value=Be,No.value={top:`${Pe.clientY}px`,left:`${Pe.clientX}px`,transformOrigin:"top left","--menu-pop-shift":"-2px"},es.value=!0,document.addEventListener("mousedown",Ti,!0)}function vn(){es.value=!1,document.removeEventListener("mousedown",Ti,!0),Ai.value=null}function ts(){Ai.value&&ao(Ai.value.root),vn()}function fi(){Ai.value&&bs(Ai.value.id,Ai.value.name),vn()}function Fr(){const Be=Ai.value;Be&&(vn(),s("deleteWorkspace",Be.id))}const Ni=G(null),hi=G(null),ho=G({}),Xs=G(null);function ns(Be){const Pe=Be.target;Pe.closest(".gh-more")||Pe.closest(".ws-menu")||an()}async function qi(Be,Pe){if(Ni.value===Be.id){an();return}const dt=Pe.currentTarget;hi.value=Be,Ni.value=Be.id,document.addEventListener("mousedown",ns),window.addEventListener("resize",an),await kt();const St=Xs.value?.el,An=dt.getBoundingClientRect(),pi=4,hs=8,is=St?.offsetHeight??0,Ls=St?.offsetWidth??0;let Ui=An.bottom+pi,On=!1;Ui+is>window.innerHeight-hs&&(Ui=Math.max(hs,An.top-is-pi),On=!0);let Cs=An.right-Ls;Cs<hs&&(Cs=hs),ho.value={top:`${Math.round(Ui)}px`,left:`${Math.round(Cs)}px`,transformOrigin:On?"bottom right":"top right","--menu-pop-shift":On?"2px":"-2px"}}function an(){Ni.value=null,hi.value=null,document.removeEventListener("mousedown",ns),window.removeEventListener("resize",an)}function eo(Be){ao(Be.root),an()}function Us(Be){bs(Be.id,Be.name),an()}function Fo(Be){an(),s("deleteWorkspace",Be.id)}Gn(()=>{document.removeEventListener("mousedown",Ti,!0),document.removeEventListener("mousedown",ns),document.removeEventListener("mousedown",oe),window.removeEventListener("resize",an),window.removeEventListener("resize",ne)});const Ms=G(null);let Es;function to(){const Be=Ms.value;Be&&(Be.classList.remove("blink-now"),Be.getBoundingClientRect(),Be.classList.add("blink-now"),clearTimeout(Es),Es=setTimeout(()=>Be.classList.remove("blink-now"),300))}const Li=Dl(()=>vs(()=>import("./DesignSystemView-B4B2cx0C.js"),__vite__mapDeps([0,1]))),wi=G(!1);let Vo,Ts=!1;function po(Be){Ts=!1,clearTimeout(Vo),Be.currentTarget.setPointerCapture?.(Be.pointerId),Vo=setTimeout(()=>{Ts=!0,wi.value=!0},Wpe)}function Ks(Be){clearTimeout(Vo);const Pe=Be.currentTarget;Pe.hasPointerCapture?.(Be.pointerId)&&Pe.releasePointerCapture(Be.pointerId)}function Zo(){if(Ts){Ts=!1;return}to()}return Gn(()=>{clearTimeout(Vo)}),(Be,Pe)=>(k(),E("aside",{class:Fe(["side",{"macos-desktop":p(Gu),collapsed:e.collapsed,"no-anim":e.dragging}]),style:qt({width:e.collapsed?"0px":e.colWidth+"px"})},[w("div",{class:"col",style:qt({width:e.colWidth+"px"}),onDragenter:sn,onDragover:Nt,onDragleave:Tn,onDrop:fs},[w("div",spe,[w("div",ope,[p(Gu)?te("",!0):(k(),E(Te,{key:0},[(k(),E("svg",{ref_key:"logoRef",ref:Ms,class:"ch-logo",viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Kimi Code",onClick:Zo,onPointerdown:po,onPointerup:Ks,onPointercancel:Ks},[...Pe[53]||(Pe[53]=[mc('<defs data-v-2d3d457d><mask id="kimiEyes" maskUnits="userSpaceOnUse" data-v-2d3d457d><rect x="0" y="0" width="32" height="22" fill="#fff" data-v-2d3d457d></rect><g class="ch-eyes" fill="#000" data-v-2d3d457d><rect class="ch-eye" x="11.8" y="7" width="2.8" height="8" rx="1.4" data-v-2d3d457d></rect><rect class="ch-eye" x="17.4" y="7" width="2.8" height="8" rx="1.4" data-v-2d3d457d></rect></g></mask></defs><rect x="1" y="1" width="30" height="20" rx="6" fill="var(--logo)" mask="url(#kimiEyes)" data-v-2d3d457d></rect>',2)])],544)),Pe[54]||(Pe[54]=w("span",{class:"ch-name"},"Kimi Code",-1))],64))]),w("div",rpe,[p(Gu)?te("",!0):(k(),de(p(tn),{key:0,class:"ch-collapse",size:"sm",label:p(n)("sidebar.collapseSidebar"),tooltip:p(n)("sidebar.collapseSidebar"),onClick:Pe[0]||(Pe[0]=Ct(dt=>s("collapse"),["stop"]))},{default:he(()=>[K(p(ve),{name:"panel-collapse"})]),_:1},8,["label","tooltip"]))])]),w("div",{class:Fe(["sidebar-actions",{"sidebar-actions--has-workspace-action":Hpe}])},[w("button",{class:"btn-new-chat",type:"button",onClick:Pe[1]||(Pe[1]=Ct(dt=>s("create"),["stop"]))},[K(p(ve),{name:"chat-new"}),w("span",null,F(p(n)("sidebar.newChat")),1),K(p(Ja),{keys:p(l)},null,8,["keys"])]),te("",!0),w("button",{class:"search",type:"button",onClick:a},[K(p(ve),{class:"search-icon",name:"search"}),w("span",lpe,F(p(n)("sidebar.search")),1),K(p(Ja),{keys:p(r)},null,8,["keys"])])],2),p(pe)?(k(),E("div",ape,[K(p(Mo),{class:"status-seg",size:"sm","model-value":Z.value,options:Ee.value,"onUpdate:modelValue":X},null,8,["model-value","options"])])):te("",!0),w("div",{class:Fe(["sessions-head",{"sessions-head--scrolled":f.value}])},[e.pinnedSessions.length>0&&Z.value==="open"?(k(),de(ipe,{key:0,ref_key:"pinnedListRef",ref:bn,sessions:e.pinnedSessions,"active-id":e.activeId,"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,"state-tag":"open","flash-session-id":tt.value,onSelectSession:Ge,onRenameSession:Pe[3]||(Pe[3]=(dt,St)=>s("rename",dt,St)),onGenerateSessionTitle:Pe[4]||(Pe[4]=(dt,St)=>s("generateTitle",dt,St)),onArchiveSession:Pe[5]||(Pe[5]=dt=>s("archive",dt)),onForkSession:Pe[6]||(Pe[6]=dt=>s("fork",dt)),onExportSession:Pe[7]||(Pe[7]=dt=>s("export",dt)),onPinSession:Xn,onDropPin:Ue,onSessionDragStart:H,onSessionDragEnd:ee},null,8,["sessions","active-id","pending-by-session","unread-by-session","flash-session-id"])):te("",!0),w("div",upe,[w("span",cpe,F(Z.value==="workspaces"?p(n)("sidebar.tabWorkspaces"):Z.value==="done"?p(n)("sidebar.tabDone"):p(n)("sidebar.sessionsHeader")),1),w("div",dpe,[Z.value==="workspaces"?(k(),de(p(kn),{key:0,text:p(n)("sidebar.newWorkspace")},{default:he(()=>[K(p(tn),{class:"side-section-toggle",size:"sm",label:p(n)("sidebar.newWorkspace"),onClick:Pe[8]||(Pe[8]=Ct(dt=>s("addWorkspace"),["stop"]))},{default:he(()=>[K(p(ve),{name:"folder-plus"})]),_:1},8,["label"])]),_:1},8,["text"])):te("",!0),Z.value!=="workspaces"&&ie.value==="grouped"?(k(),de(p(tn),{key:1,class:"side-section-toggle",size:"sm",label:I.value?p(n)("sidebar.expandAll"):p(n)("sidebar.collapseAll"),tooltip:I.value?p(n)("sidebar.expandAll"):p(n)("sidebar.collapseAll"),onClick:Pe[9]||(Pe[9]=Ct(dt=>I.value?_():S(),["stop"]))},{default:he(()=>[I.value?(k(),de(p(ve),{key:0,name:"expand"})):(k(),de(p(ve),{key:1,name:"collapse"}))]),_:1},8,["label","tooltip"])):te("",!0),Z.value!=="workspaces"?(k(),de(p(kn),{key:2,text:p(n)("sidebar.viewSwitcher")},{default:he(()=>[K(p(tn),{class:"side-section-toggle side-section-view",size:"sm",label:p(n)("sidebar.viewSwitcher"),onClick:Ct(Q,["stop"])},{default:he(()=>[K(p(ve),{name:"list-settings"})]),_:1},8,["label"])]),_:1},8,["text"])):te("",!0)])])],2),w("div",{ref_key:"sessionsEl",ref:d,class:Fe(["sessions",{scrolling:g.value,"pinned-drag-active":Ne.value&&z.value!==null,"flat-pinned-drop-hover":et.value}]),onScroll:A,onDragover:ut,onDrop:yt,onDragleave:Mt},[Z.value==="open"?(k(),E(Te,{key:0},[ie.value==="flat"?(k(),E(Te,{key:0},[(k(!0),E(Te,null,ht(e.flatSessions,dt=>(k(),de(vp,{key:dt.id,session:dt,active:dt.id===e.activeId,"approval-count":e.pendingBySession[dt.id]?.approvals??0,"question-count":e.pendingBySession[dt.id]?.questions??0,unread:e.unreadBySession[dt.id]??!1,"state-tag":"open",draggable:Ke.value!==dt.id,onDragstart:St=>xe(dt.id,St),onRenameStateChange:St=>Ke.value=St?dt.id:null,onSelect:Ge,onRename:Pe[10]||(Pe[10]=(St,An)=>s("rename",St,An)),onGenerateTitle:Pe[11]||(Pe[11]=(St,An)=>s("generateTitle",St,An)),onArchive:Pe[12]||(Pe[12]=St=>s("archive",St)),onFork:Pe[13]||(Pe[13]=St=>s("fork",St)),onExport:Pe[14]||(Pe[14]=St=>s("export",St)),onPin:Xn},null,8,["session","active","approval-count","question-count","unread","draggable","onDragstart","onRenameStateChange"]))),128)),e.flatSessions.length===0&&!e.flatHasMore&&e.pinnedSessions.length===0?(k(),E("div",fpe,F(p(n)("sidebar.noSessions")),1)):te("",!0),e.flatHasMore?(k(),E("div",hpe,[w("button",{class:"show-more",disabled:e.flatLoadingMore,onClick:Pe[15]||(Pe[15]=Ct(dt=>s("loadMoreFlatSessions"),["stop"]))},[w("span",gpe,F(e.flatLoadingMore?p(n)("sidebar.loadingMore"):p(n)("sidebar.loadMore")),1),K(p(ve),{name:"chevron-down",size:"sm"})],8,ppe)])):te("",!0)],64)):(k(),E(Te,{key:1},[e.groups.length===0?(k(),E("div",mpe,F(p(n)("workspace.noWorkspace")),1)):we.value.length===0&&e.pinnedSessions.length===0?(k(),E("div",vpe,F(p(n)("sidebar.noOpenSessions")),1)):(k(!0),E(Te,{key:2},ht(we.value,dt=>(k(),E("div",{key:dt.workspace.id,class:Fe(["ws-drop-target",{"drop-before":O.value?.id===dt.workspace.id&&O.value.position==="before","drop-after":O.value?.id===dt.workspace.id&&O.value.position==="after","ws-locate-flash":Dn.value===dt.workspace.id}]),"data-ws-id":dt.workspace.id,onDragover:St=>j(St,dt.workspace.id),onDrop:St=>W(dt.workspace.id)},[K(Y1e,{group:dt,"active-workspace-id":e.activeWorkspaceId,"active-id":e.activeId,"renaming-id":vi.value,"rename-value":Dt.value,"rename-input-ref":Pn(),"pending-by-session":e.pendingBySession,"unread-by-session":e.unreadBySession,"ws-menu-open-id":Ni.value,dragging:N.value===dt.workspace.id,sortable:e.workspaceSortMode==="manual","is-collapsed":v,"visible-limit":$,"flash-session-id":tt.value,"pinned-drag-session":z.value,"state-tag":"open",onGroupClick:Ze,onGroupContextmenu:Yt,onToggleWsMenu:qi,onCreateInWorkspace:Pe[16]||(Pe[16]=St=>s("createInWorkspace",St)),onSelectSession:Ge,onRenameSession:Pe[17]||(Pe[17]=(St,An)=>s("rename",St,An)),onGenerateSessionTitle:Pe[18]||(Pe[18]=(St,An)=>s("generateTitle",St,An)),onArchiveSession:Pe[19]||(Pe[19]=St=>s("archive",St)),onForkSession:Pe[20]||(Pe[20]=St=>s("fork",St)),onExportSession:Pe[21]||(Pe[21]=St=>s("export",St)),onPinSession:Xn,onDropPinnedSession:V,onExpand:D,onCollapse:T,onConfirmRename:Lo,onCancelRename:Oi,onUpdateRenameValue:co,onWsDragstart:P,onWsDragend:R},null,8,["group","active-workspace-id","active-id","renaming-id","rename-value","rename-input-ref","pending-by-session","unread-by-session","ws-menu-open-id","dragging","sortable","flash-session-id","pinned-drag-session"])],42,ype))),128))],64))],64)):Z.value==="done"?(k(),E(Te,{key:1},[ie.value==="flat"?(k(!0),E(Te,{key:0},ht(e.doneSessions,dt=>(k(),de(vp,{key:dt.id,session:dt,active:dt.id===e.activeId,"approval-count":e.pendingBySession[dt.id]?.approvals??0,"question-count":e.pendingBySession[dt.id]?.questions??0,unread:e.unreadBySession[dt.id]??!1,"state-tag":"done",onSelect:Ge,onRename:Pe[22]||(Pe[22]=(St,An)=>s("rename",St,An)),onGenerateTitle:Pe[23]||(Pe[23]=(St,An)=>s("generateTitle",St,An)),onRestore:Pe[24]||(Pe[24]=St=>s("restore",St)),onFork:Pe[25]||(Pe[25]=St=>s("fork",St)),onExport:Pe[26]||(Pe[26]=St=>s("export",St))},null,8,["session","active","approval-count","question-count","unread"]))),128)):(k(!0),E(Te,{key:1},ht(Y.value,dt=>(k(),E("div",{key:dt.workspace.id,class:"done-group"},[w("div",{class:"done-gh",onClick:St=>x(dt.workspace.id),onContextmenu:St=>Yt(dt.workspace,St)},[v(dt.workspace.id)?(k(),de(p(ve),{key:0,class:"done-gh-folder",name:"folder-closed"})):(k(),de(p(ve),{key:1,class:"done-gh-folder",name:"folder"})),w("span",bpe,F(dt.workspace.name),1),w("span",Ape,F(dt.sessions.length),1),w("span",Cpe,[K(p(tn),{class:Fe(["gh-more",{open:Ni.value===dt.workspace.id}]),size:"sm",label:p(n)("sidebar.options"),tooltip:p(n)("sidebar.options"),"aria-haspopup":"menu","aria-expanded":Ni.value===dt.workspace.id,onClick:Ct(St=>qi(dt.workspace,St),["stop"])},{default:he(()=>[K(p(ve),{name:"dots-horizontal"})]),_:1},8,["class","label","tooltip","aria-expanded","onClick"])])],40,kpe),v(dt.workspace.id)?te("",!0):(k(),E("div",wpe,[(k(!0),E(Te,null,ht(dt.sessions,St=>(k(),de(vp,{key:St.id,session:St,active:St.id===e.activeId,"approval-count":e.pendingBySession[St.id]?.approvals??0,"question-count":e.pendingBySession[St.id]?.questions??0,unread:e.unreadBySession[St.id]??!1,"state-tag":"done",onSelect:Ge,onRename:Pe[27]||(Pe[27]=(An,pi)=>s("rename",An,pi)),onGenerateTitle:Pe[28]||(Pe[28]=(An,pi)=>s("generateTitle",An,pi)),onRestore:Pe[29]||(Pe[29]=An=>s("restore",An)),onFork:Pe[30]||(Pe[30]=An=>s("fork",An)),onExport:Pe[31]||(Pe[31]=An=>s("export",An))},null,8,["session","active","approval-count","question-count","unread"]))),128))]))]))),128)),e.doneSessions.length===0&&!e.doneHasMore?(k(),E("div",xpe,F(p(n)("sidebar.noDoneSessions")),1)):te("",!0),e.doneHasMore?(k(),E("div",Spe,[w("button",{class:"show-more",disabled:e.doneLoadingMore,onClick:Pe[32]||(Pe[32]=Ct(dt=>s("loadMoreDoneSessions"),["stop"]))},[w("span",Ipe,F(e.doneLoadingMore?p(n)("sidebar.loadingMore"):p(n)("sidebar.loadMore")),1),K(p(ve),{name:"chevron-down",size:"sm"})],8,_pe)])):te("",!0)],64)):(k(),E(Te,{key:2},[(k(!0),E(Te,null,ht(e.groups,dt=>(k(),E("div",{key:dt.workspace.id,class:Fe(["ws-dir",{on:dt.workspace.id===e.activeWorkspaceId}]),onClick:St=>s("createInWorkspace",dt.workspace.id),onContextmenu:St=>Yt(dt.workspace,St)},[w("div",Epe,[K(p(ve),{class:"ws-dir-icon",name:"folder-closed"}),vi.value===dt.workspace.id?$n((k(),E("input",{key:0,ref_for:!0,ref:St=>Ei.value=St,"onUpdate:modelValue":Pe[33]||(Pe[33]=St=>Dt.value=St),class:"ws-dir-rename",type:"text",onKeydown:[_s(Ct(Pi,["stop"]),["enter"]),Pe[34]||(Pe[34]=_s(Ct(St=>Oi(),["stop"]),["esc"]))],onCompositionstart:Pe[35]||(Pe[35]=(...St)=>p(Wi)&&p(Wi)(...St)),onCompositionend:Pe[36]||(Pe[36]=(...St)=>p(As)&&p(As)(...St)),onBlur:Pe[37]||(Pe[37]=St=>Oi()),onClick:Pe[38]||(Pe[38]=Ct(()=>{},["stop"]))},null,40,Tpe)),[[uo,Dt.value]]):(k(),E("span",Lpe,F(dt.workspace.name),1)),w("span",Npe,[vi.value!==dt.workspace.id?(k(),de(p(tn),{key:0,class:Fe(["gh-more",{open:Ni.value===dt.workspace.id}]),size:"sm",label:p(n)("sidebar.options"),tooltip:p(n)("sidebar.options"),"aria-haspopup":"menu","aria-expanded":Ni.value===dt.workspace.id,onClick:Ct(St=>qi(dt.workspace,St),["stop"])},{default:he(()=>[K(p(ve),{name:"dots-horizontal"})]),_:1},8,["class","label","tooltip","aria-expanded","onClick"])):te("",!0)])]),w("div",Fpe,F(dt.workspace.root),1)],42,Mpe))),128)),e.groups.length===0?(k(),E("div",Dpe,F(p(n)("workspace.noWorkspace")),1)):te("",!0)],64))],34),w("div",{class:Fe(["side-footer",{"side-footer--shadowed":h.value}])},[K(u1e,{onLogin:Pe[39]||(Pe[39]=dt=>s("login")),onOpenSettings:Pe[40]||(Pe[40]=dt=>s("openSettings"))})],2),w("div",{class:Fe(["folder-drop-overlay",{show:ct.value}]),"aria-hidden":"true"},[w("div",$pe,[K(p(ve),{name:"folder",size:"lg"}),w("span",null,F(p(n)("sidebar.dropToAddWorkspace")),1)])],2)],36),K(ls,{name:"menu-pop"},{default:he(()=>[es.value?(k(),de(p(sr),{key:0,ref_key:"ghMenuRef",ref:Ci,class:"gh-menu",style:qt(No.value),onClick:Pe[41]||(Pe[41]=Ct(()=>{},["stop"]))},{default:he(()=>[K(p(Wt),{onClick:ts},{default:he(()=>[K(p(ve),{name:"copy",size:"sm"}),$e(" "+F(p(n)("sidebar.copyPath")),1)]),_:1}),K(p(Wt),{class:"workspace-rename-item",onClick:fi},{default:he(()=>[K(p(ve),{name:"pencil",size:"sm"}),$e(" "+F(p(n)("sidebar.rename")),1)]),_:1}),K(p(Wt),{danger:"",onClick:Fr},{default:he(()=>[K(p(ve),{name:"close",size:"sm"}),$e(" "+F(p(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):te("",!0)]),_:1}),K(ls,{name:"menu-pop"},{default:he(()=>[Ni.value!==null&&hi.value?(k(),de(p(sr),{key:0,ref_key:"wsMenuRef",ref:Xs,class:"ws-menu",style:qt(ho.value),onClick:Pe[45]||(Pe[45]=Ct(()=>{},["stop"]))},{default:he(()=>[K(p(Wt),{onClick:Pe[42]||(Pe[42]=dt=>eo(hi.value))},{default:he(()=>[K(p(ve),{name:"copy",size:"sm"}),$e(" "+F(p(n)("sidebar.copyPath")),1)]),_:1}),K(p(Wt),{class:"workspace-rename-item",onClick:Pe[43]||(Pe[43]=dt=>Us(hi.value))},{default:he(()=>[K(p(ve),{name:"pencil",size:"sm"}),$e(" "+F(p(n)("sidebar.rename")),1)]),_:1}),K(p(Wt),{danger:"",onClick:Pe[44]||(Pe[44]=dt=>Fo(hi.value))},{default:he(()=>[K(p(ve),{name:"close",size:"sm"}),$e(" "+F(p(n)("sidebar.removeWorkspace")),1)]),_:1})]),_:1},8,["style"])):te("",!0)]),_:1}),K(ls,{name:"menu-pop"},{default:he(()=>[le.value?(k(),de(p(sr),{key:0,ref_key:"viewMenuRef",ref:ae,class:"view-menu",style:qt(Ce.value),onClick:Pe[50]||(Pe[50]=Ct(()=>{},["stop"]))},{default:he(()=>[w("div",Bpe,F(p(n)("sidebar.viewGroup")),1),K(p(Wt),{onClick:Pe[46]||(Pe[46]=dt=>ge("flat"))},{default:he(()=>[K(p(ve),{name:"list",size:"sm"}),$e(" "+F(p(n)("sidebar.viewFlat"))+" ",1),w("span",zpe,[ie.value==="flat"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1}),K(p(Wt),{onClick:Pe[47]||(Pe[47]=dt=>ge("grouped"))},{default:he(()=>[K(p(ve),{name:"tree-view",size:"sm"}),$e(" "+F(p(n)("sidebar.viewGrouped"))+" ",1),w("span",Rpe,[ie.value==="grouped"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1}),ie.value==="grouped"?(k(),E(Te,{key:0},[w("div",Ope,F(p(n)("sidebar.sortGroup")),1),K(p(Wt),{onClick:Pe[48]||(Pe[48]=dt=>Ae("manual"))},{default:he(()=>[K(p(ve),{name:"grip",size:"sm"}),$e(" "+F(p(n)("sidebar.sortManual"))+" ",1),w("span",Ppe,[e.workspaceSortMode==="manual"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1}),K(p(Wt),{onClick:Pe[49]||(Pe[49]=dt=>Ae("recent"))},{default:he(()=>[K(p(ve),{name:"clock",size:"sm"}),$e(" "+F(p(n)("sidebar.sortRecent"))+" ",1),w("span",jpe,[e.workspaceSortMode==="recent"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)])]),_:1})],64)):te("",!0),p(pe)?(k(),E(Te,{key:1},[K(p(Wt),{separator:""}),K(p(Wt),{onClick:_e},{default:he(()=>[K(p(ve),{name:"session-admin",size:"sm"}),$e(" "+F(p(n)("sidebar.sessionAdmin")),1)]),_:1})],64)):te("",!0)]),_:1},8,["style"])):te("",!0)]),_:1}),o.value?(k(),de(Tue,{key:0,sessions:e.sessions,workspaces:Ut.value,"active-id":e.activeId,onSelect:lt,onSelectWorkspace:wn,onClose:Pe[51]||(Pe[51]=dt=>o.value=!1)},null,8,["sessions","workspaces","active-id"])):te("",!0),(k(),de(Gr,{to:"body"},[wi.value?(k(),de(p(Li),{key:0,onClose:Pe[52]||(Pe[52]=dt=>wi.value=!1)})):te("",!0)]))],6))}}),Upe=gt(qpe,[["__scopeId","data-v-2d3d457d"]]),Kpe=["aria-label"],Vpe=Qe({__name:"ResizeHandle",props:{storageKey:{},defaultWidth:{},min:{},max:{},reverse:{type:Boolean},ariaLabel:{},applyLive:{}},emits:["update:width","update:dragging"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),{width:o,dragging:r,cursor:l,onPointerDown:a}=vhe({storageKey:n.storageKey,defaultWidth:n.defaultWidth,min:n.min,max:()=>n.max,reverse:n.reverse,applyLive:n.applyLive});return i("update:width",o.value),qe(o,u=>i("update:width",u)),qe(r,u=>i("update:dragging",u)),(u,c)=>(k(),E("div",{class:Fe(["rh",{dragging:p(r)}]),style:qt({cursor:p(l)}),role:"separator","aria-orientation":"vertical","aria-label":e.ariaLabel??p(s)("layout.resizeHandleAria"),onPointerdown:c[0]||(c[0]=(...d)=>p(a)&&p(a)(...d))},[...c[1]||(c[1]=[w("span",{class:"rh-bar","aria-hidden":"true"},null,-1)])],46,Kpe))}}),c_=gt(Vpe,[["__scopeId","data-v-1c6dfdc5"]]),Zpe={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Gpe(e,t){return k(),E("svg",Zpe,[...t[0]||(t[0]=[w("path",{d:"M12.0684 2.03418C12.5654 2.03421 12.9687 2.43755 12.9688 2.93457V11.0996H21.0654C21.5625 11.0996 21.9658 11.503 21.9658 12C21.9658 12.497 21.5625 12.9004 21.0654 12.9004H12.9688V21.0654C12.9687 21.5624 12.5654 21.9658 12.0684 21.9658C11.5713 21.9658 11.168 21.5625 11.168 21.0654V12.9004H2.93457C2.43751 12.9004 2.03418 12.4971 2.03418 12C2.03418 11.5029 2.43751 11.0996 2.93457 11.0996H11.168V2.93457C11.168 2.43753 11.5713 2.03418 12.0684 2.03418Z",fill:"currentColor"},null,-1)])])}const Qpe=xt({name:"kimi-add",render:Gpe}),Ype={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Jpe(e,t){return k(),E("svg",Ype,[...t[0]||(t[0]=[w("path",{id:"p0",d:"M 0 -9.9 C -5.468 -9.9 -9.9 -5.468 -9.9 0 C -9.9 1.923 -9.351 3.719 -8.402 5.239 C -8.402 5.239 -9.483 7.821 -9.483 7.821 C -9.896 8.809 -9.171 9.9 -8.099 9.9 C -8.099 9.9 0 9.9 0 9.9 C 5.468 9.9 9.9 5.468 9.9 0 C 9.9 -5.468 5.468 -9.9 0 -9.9 Z M -8.1 0 C -8.1 -4.474 -4.474 -8.1 0 -8.1 C 4.473 -8.1 8.1 -4.474 8.1 0 C 8.1 4.473 4.473 8.1 -0.001 8.1 C -0.001 8.1 -7.648 8.1 -7.648 8.1 L -6.365 5.035 C -6.365 5.035 -6.648 4.629 -6.648 4.629 C -7.563 3.317 -8.1 1.723 -8.1 0 Z",transform:"matrix(1 0 0 1 12 12)",fill:"currentColor","fill-rule":"evenodd"},null,-1),w("path",{id:"p1",d:"M 3.6 0.5 L -2.6 0.5 M 0.5 -2.573 L 0.5 3.573",transform:"translate(11.5 11.5)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"},null,-1)])])}const Xpe=xt({name:"kimi-add-conversation",render:Jpe}),e0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function t0e(e,t){return k(),E("svg",e0e,[...t[0]||(t[0]=[w("path",{d:"M15.0996 12C15.5967 12 16 12.4033 16 12.9004C15.9998 13.3973 15.5965 13.7998 15.0996 13.7998H8.90039C8.40346 13.7998 8.00021 13.3973 8 12.9004C8 12.4033 8.40333 12 8.90039 12H15.0996Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 3.2002C20.5464 3.2002 21.7998 4.4536 21.7998 6V7C21.7998 8.03565 21.2363 8.93754 20.4004 9.42188V17C20.4004 19.1539 18.6539 20.9004 16.5 20.9004H7.5C5.34609 20.9004 3.59961 19.1539 3.59961 17V9.42188C2.76374 8.93754 2.2002 8.03565 2.2002 7V6C2.2002 4.4536 3.4536 3.2002 5 3.2002H19ZM5.40039 17C5.40039 18.1598 6.3402 19.0996 7.5 19.0996H16.5C17.6598 19.0996 18.5996 18.1598 18.5996 17V9.7998H5.40039V17ZM4.89746 5.00488C4.39333 5.05621 4 5.48232 4 6V7L4.00488 7.10254C4.05278 7.57297 4.42703 7.94722 4.89746 7.99512L5 8H19C19.5523 8 20 7.55228 20 7V6C20 5.44772 19.5523 5 19 5H5L4.89746 5.00488Z",fill:"currentColor"},null,-1)])])}const n0e=xt({name:"kimi-archive",render:t0e}),i0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function s0e(e,t){return k(),E("svg",i0e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 21.6387C11.7378 21.988 12.3059 21.987 12.6565 21.6364L18.1949 16.098C18.5464 15.7465 18.5464 15.1766 18.1949 14.8252C17.8434 14.4737 17.2736 14.4737 16.9221 14.8252L12.9201 18.8272V3.00002C12.9201 2.50297 12.5171 2.10003 12.0201 2.10003C11.523 2.10003 11.1201 2.50297 11.1201 3.00002V18.8383L7.07554 14.8229C6.7228 14.4727 6.15295 14.4747 5.80275 14.8275C5.45255 15.1802 5.45461 15.7501 5.80735 16.1003L11.386 21.6387Z",fill:"currentColor"},null,-1)])])}const o0e=xt({name:"kimi-arrow-down",render:s0e}),r0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function l0e(e,t){return k(),E("svg",r0e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.16127 12.814C1.81197 12.4622 1.81299 11.8941 2.16357 11.5435L7.70203 6.00506C8.0535 5.65359 8.62335 5.65359 8.97482 6.00506C9.32629 6.35653 9.32629 6.92638 8.97482 7.27785L4.97276 11.2799H20.8C21.297 11.2799 21.7 11.6829 21.7 12.1799C21.7 12.677 21.297 13.0799 20.8 13.0799H4.96171L8.97712 17.1244C9.32732 17.4772 9.32526 18.047 8.97252 18.3972C8.61978 18.7474 8.04993 18.7454 7.69973 18.3926L2.16127 12.814Z",fill:"currentColor"},null,-1)])])}const a0e=xt({name:"kimi-arrow-left",render:l0e}),u0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function c0e(e,t){return k(),E("svg",u0e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21.4387 12.814C21.788 12.4622 21.787 11.8941 21.4364 11.5436L15.8979 6.0051C15.5464 5.65363 14.9766 5.65363 14.6251 6.0051C14.2737 6.35657 14.2737 6.92642 14.6251 7.27789L18.6272 11.28H2.79998C2.30293 11.28 1.89998 11.6829 1.89998 12.18C1.89998 12.677 2.30293 13.08 2.79998 13.08H18.6382L14.6228 17.1245C14.2726 17.4772 14.2747 18.0471 14.6274 18.3973C14.9802 18.7475 15.55 18.7454 15.9002 18.3927L21.4387 12.814Z",fill:"currentColor"},null,-1)])])}const d0e=xt({name:"kimi-arrow-right",render:c0e}),f0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function h0e(e,t){return k(),E("svg",f0e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.386 2.36129C11.7378 2.01198 12.3059 2.013 12.6565 2.36358L18.1949 7.90204C18.5464 8.25351 18.5464 8.82336 18.1949 9.17483C17.8434 9.52631 17.2736 9.52631 16.9221 9.17483L12.9201 5.17277V21C12.9201 21.497 12.5171 21.9 12.0201 21.9C11.523 21.9 11.1201 21.497 11.1201 21V5.16172L7.07554 9.17713C6.7228 9.52733 6.15295 9.52527 5.80275 9.17253C5.45255 8.81979 5.45461 8.24995 5.80735 7.89975L11.386 2.36129Z",fill:"currentColor"},null,-1)])])}const p0e=xt({name:"kimi-arrow-up",render:h0e}),g0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function m0e(e,t){return k(),E("svg",g0e,[...t[0]||(t[0]=[w("path",{d:"M19.3027 5.9053C19.6542 5.55397 20.2247 5.55388 20.5761 5.9053C20.9273 6.25675 20.9273 6.82734 20.5761 7.17874L9.65911 18.0948C9.30773 18.4461 8.73814 18.446 8.38665 18.0948L3.42376 13.1328C3.0726 12.7814 3.07263 12.2118 3.42376 11.8604C3.77524 11.509 4.34575 11.5089 4.6972 11.8604L9.02239 16.1856L19.3027 5.9053Z",fill:"currentColor"},null,-1)])])}const v0e=xt({name:"kimi-check",render:m0e}),y0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function k0e(e,t){return k(),E("svg",y0e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 16.7134C11.743 17.0627 12.3111 17.0617 12.6617 16.7111L19.6364 9.73641C19.9878 9.38494 19.9878 8.81509 19.6364 8.46362C19.2849 8.11215 18.7151 8.11215 18.3636 8.46362L12.023 14.8042L5.63407 8.46132C5.28133 8.11112 4.71149 8.11318 4.36129 8.46592C4.01109 8.81866 4.01314 9.3885 4.36588 9.73871L11.3912 16.7134Z",fill:"currentColor"},null,-1)])])}const b0e=xt({name:"kimi-chevron-down",render:k0e}),A0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function C0e(e,t){return k(),E("svg",A0e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.1261 12.6088C16.4754 12.257 16.4743 11.6889 16.1238 11.3383L9.14904 4.36363C8.79757 4.01216 8.22772 4.01216 7.87625 4.36363C7.52477 4.7151 7.52477 5.28495 7.87625 5.63642L14.2169 11.977L7.87395 18.3659C7.52375 18.7187 7.52581 19.2885 7.87855 19.6387C8.23129 19.9889 8.80113 19.9869 9.15133 19.6341L16.1261 12.6088Z",fill:"currentColor"},null,-1)])])}const w0e=xt({name:"kimi-chevron-right",render:C0e}),x0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function S0e(e,t){return k(),E("svg",x0e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.3912 8.46132C11.743 8.11202 12.3111 8.11304 12.6617 8.46362L19.6364 15.4383C19.9878 15.7898 19.9878 16.3597 19.6364 16.7111C19.2849 17.0626 18.7151 17.0626 18.3636 16.7111L12.023 10.3705L5.63407 16.7134C5.28133 17.0636 4.71149 17.0616 4.36129 16.7088C4.01109 16.3561 4.01314 15.7862 4.36588 15.436L11.3912 8.46132Z",fill:"currentColor"},null,-1)])])}const _0e=xt({name:"kimi-chevron-up",render:S0e}),I0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function M0e(e,t){return k(),E("svg",I0e,[...t[0]||(t[0]=[w("circle",{cx:"12",cy:"12",r:"10.875",stroke:"currentColor","stroke-width":"2.25"},null,-1),w("path",{d:"M7.125 12.6L10.65 16.125L17.025 8.85",stroke:"currentColor","stroke-width":"2.25","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const E0e=xt({name:"kimi-circle-check",render:M0e}),T0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L0e(e,t){return k(),E("svg",T0e,[...t[0]||(t[0]=[w("path",{d:"M11.8999 6.79965C12.397 6.79965 12.7997 7.20235 12.7997 7.69941V11.7266L14.7359 13.6629C15.0873 14.0143 15.0879 14.584 14.7366 14.9355C14.3852 15.287 13.8148 15.287 13.4633 14.9355L11.2632 12.7355C11.0947 12.5668 11.0002 12.338 11.0001 12.0995V7.69941C11.0001 7.20238 11.4029 6.7997 11.8999 6.79965Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 1.89893C17.4677 1.89893 21.9001 6.33147 21.9002 11.7991C21.9002 17.2669 17.4678 21.6993 12 21.6993C6.53228 21.6993 2.09985 17.2669 2.09985 11.7991C2.09998 6.33147 6.53236 1.89893 12 1.89893ZM20.1 11.7998C20.1 7.32616 16.4737 3.69984 12 3.69984C7.5264 3.69984 3.90008 7.32616 3.90008 11.7998C3.90032 16.2732 7.52655 19.8998 12 19.8998C16.4735 19.8998 20.0998 16.2732 20.1 11.7998Z",fill:"currentColor"},null,-1)])])}const N0e=xt({name:"kimi-clock",render:L0e}),F0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D0e(e,t){return k(),E("svg",F0e,[...t[0]||(t[0]=[w("path",{d:"M17.9542 4.77253C18.3056 4.42106 18.8761 4.42106 19.2276 4.77253C19.579 5.12401 19.579 5.69452 19.2276 6.04597L13.2735 12.0001L19.2276 17.9542C19.5791 18.3056 19.5791 18.8761 19.2276 19.2276C18.8761 19.5791 18.3056 19.5791 17.9542 19.2276L12.0001 13.2735L6.04595 19.2276C5.69451 19.5791 5.12399 19.579 4.77252 19.2276C4.42104 18.8761 4.42104 18.3056 4.77252 17.9542L10.7266 12.0001L4.77252 6.04597C4.42104 5.6945 4.42104 5.124 4.77252 4.77253C5.12399 4.42107 5.69448 4.42106 6.04595 4.77253L12.0001 10.7266L17.9542 4.77253Z",fill:"currentColor"},null,-1)])])}const $0e=xt({name:"kimi-close",render:D0e}),B0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function z0e(e,t){return k(),E("svg",B0e,[...t[0]||(t[0]=[w("path",{d:"M9.85815 11.957C10.9074 11.957 11.7583 12.8083 11.7585 13.8574V19.8574C11.7585 20.3545 11.3552 20.7578 10.8582 20.7578C10.3611 20.7578 9.95776 20.3545 9.95776 19.8574V13.8574C9.95755 13.8024 9.91325 13.7578 9.85815 13.7578H3.85815C3.3611 13.7578 2.95776 13.3545 2.95776 12.8574C2.95798 12.3605 3.36123 11.957 3.85815 11.957H9.85815Z",fill:"currentColor"},null,-1),w("path",{d:"M12.8582 2.95703C13.3551 2.95703 13.7583 3.36054 13.7585 3.85742V9.85742C13.7585 9.91265 13.8029 9.95703 13.8582 9.95703H19.8582C20.3551 9.95703 20.7583 10.3605 20.7585 10.8574C20.7585 11.3545 20.3552 11.7578 19.8582 11.7578H13.8582C12.8088 11.7578 11.9578 10.9068 11.9578 9.85742V3.85742C11.958 3.36054 12.3612 2.95703 12.8582 2.95703Z",fill:"currentColor"},null,-1)])])}const R0e=xt({name:"kimi-collapse",render:z0e}),O0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function P0e(e,t){return k(),E("svg",O0e,[...t[0]||(t[0]=[w("path",{d:"M11.9004 2.19995C17.3678 2.20016 21.7998 6.63285 21.7998 12.1003C21.7996 17.5677 17.3677 21.9995 11.9004 21.9998H3.80078C2.72946 21.9996 2.00334 20.9089 2.41699 19.9207L3.49805 17.3386C2.54871 15.8189 2.00007 14.0226 2 12.1003C2 6.63272 6.43277 2.19995 11.9004 2.19995ZM11.9004 3.99976C7.42688 3.99976 3.7998 7.62684 3.7998 12.1003C3.79989 13.8228 4.33669 15.4175 5.25195 16.7292L5.53516 17.1345L4.25195 20.2H11.8994C16.3727 20.1999 19.9998 16.5736 20 12.1003C20 7.62697 16.3737 3.99997 11.9004 3.99976ZM8.9541 10.8005C9.75473 10.8006 10.4041 11.4491 10.4043 12.2498C10.4043 13.0505 9.75482 13.6998 8.9541 13.7C8.15329 13.7 7.50391 13.0506 7.50391 12.2498C7.50406 11.4491 8.15339 10.8005 8.9541 10.8005ZM15.1533 10.8005C15.9539 10.8006 16.6034 11.4491 16.6035 12.2498C16.6035 13.0505 15.954 13.6998 15.1533 13.7C14.3525 13.7 13.7031 13.0506 13.7031 12.2498C13.7033 11.4491 14.3526 10.8005 15.1533 10.8005Z",fill:"currentColor"},null,-1)])])}const j0e=xt({name:"kimi-comment",render:P0e}),H0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function W0e(e,t){return k(),E("svg",H0e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 7.09961C19.1539 7.09961 20.9004 8.84609 20.9004 11V17C20.9004 19.1539 19.1539 20.9004 17 20.9004H11C8.84609 20.9004 7.09961 19.1539 7.09961 17V11C7.09961 8.84609 8.84609 7.09961 11 7.09961H17ZM11 8.90039C9.8402 8.90039 8.90039 9.8402 8.90039 11V17C8.90039 18.1598 9.8402 19.0996 11 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V11C19.0996 9.8402 18.1598 8.90039 17 8.90039H11Z",fill:"currentColor"},null,-1),w("path",{d:"M13 3.09961C14.4447 3.09961 15.705 3.88644 16.3779 5.0498C16.6265 5.47999 16.4789 6.03049 16.0488 6.2793C15.6186 6.52781 15.0681 6.38029 14.8193 5.9502C14.4548 5.32041 13.776 4.90039 13 4.90039H7C5.8402 4.90039 4.90039 5.8402 4.90039 7V13C4.90039 13.776 5.32041 14.4548 5.9502 14.8193C6.38029 15.0681 6.52781 15.6186 6.2793 16.0488C6.03049 16.4789 5.47999 16.6265 5.0498 16.3779C3.88644 15.705 3.09961 14.4447 3.09961 13V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H13Z",fill:"currentColor"},null,-1)])])}const q0e=xt({name:"kimi-copy",render:W0e}),U0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function K0e(e,t){return k(),E("svg",U0e,[...t[0]||(t[0]=[w("path",{d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 10.2797 2.43414 8.66074 3.19922 7.24707C3.20172 7.24246 3.20453 7.23801 3.20703 7.2334C3.33385 6.99995 3.47181 6.77351 3.61621 6.55176C3.73214 6.37355 3.85079 6.19744 3.97754 6.02734C5.35905 4.17471 7.36856 2.81959 9.68945 2.27051C9.69952 2.26813 9.70965 2.26602 9.71973 2.26367C9.85224 2.23276 9.98563 2.2043 10.1201 2.17871C10.1542 2.17221 10.1884 2.16631 10.2227 2.16016C10.3466 2.13791 10.4712 2.11724 10.5967 2.09961C10.6301 2.09489 10.6637 2.0913 10.6973 2.08691C10.8216 2.07073 10.9465 2.05552 11.0723 2.04395C11.1125 2.04022 11.153 2.0384 11.1934 2.03516C11.4595 2.0139 11.7284 2 12 2ZM11.9941 3.7998C11.9968 3.86623 12 3.93292 12 4C12 6.76142 9.76142 9 7 9C6.14209 9 5.33517 8.78324 4.62988 8.40234C4.09862 9.48861 3.7998 10.7093 3.7998 12C3.7998 12.4438 3.83644 12.8791 3.9043 13.3037C4.52807 12.5673 5.45945 12.0996 6.5 12.0996C8.37777 12.0996 9.90039 13.6222 9.90039 15.5C9.90039 17.0702 8.83532 18.3903 7.38867 18.7812C8.70267 19.6765 10.2901 20.2002 12 20.2002C12.468 20.2002 12.9264 20.1583 13.373 20.083C13.1323 19.4342 13 18.7327 13 18C13 14.6863 15.6863 12 19 12C19.4098 12 19.8098 12.0416 20.1963 12.1201C20.1969 12.0801 20.2002 12.0401 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998H11.9941ZM19 13.7998C16.6804 13.7998 14.7998 15.6804 14.7998 18C14.7998 18.5617 14.9112 19.0972 15.1113 19.5869C17.5225 18.597 19.3558 16.4929 19.9727 13.9141C19.6605 13.8399 19.3349 13.7998 19 13.7998ZM6.5 13.9004C5.61634 13.9004 4.90039 14.6163 4.90039 15.5C4.90039 16.3837 5.61634 17.0996 6.5 17.0996C7.38366 17.0996 8.09961 16.3837 8.09961 15.5C8.09961 14.6163 7.38366 13.9004 6.5 13.9004ZM15.5 6.09961C16.8255 6.09961 17.9004 7.17452 17.9004 8.5C17.9004 9.82548 16.8255 10.9004 15.5 10.9004C14.1745 10.9004 13.0996 9.82548 13.0996 8.5C13.0996 7.17452 14.1745 6.09961 15.5 6.09961ZM15.5 7.90039C15.1686 7.90039 14.9004 8.16863 14.9004 8.5C14.9004 8.83137 15.1686 9.09961 15.5 9.09961C15.8314 9.09961 16.0996 8.83137 16.0996 8.5C16.0996 8.16863 15.8314 7.90039 15.5 7.90039ZM10.1992 4C8.35326 4.41375 6.74333 5.44923 5.59961 6.87598C6.02235 7.08306 6.49716 7.2002 7 7.2002C8.76731 7.2002 10.1992 5.76731 10.1992 4Z",fill:"currentColor"},null,-1)])])}const V0e=xt({name:"kimi-dark-mode",render:K0e}),Z0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function G0e(e,t){return k(),E("svg",Z0e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2.90002C12.4971 2.90002 12.9 3.30297 12.9 3.80002V12.2939L15.8081 9.38585C16.1595 9.03438 16.7294 9.03438 17.0808 9.38585C17.4323 9.73732 17.4323 10.3072 17.0808 10.6586L12.6364 15.1031C12.4676 15.2719 12.2387 15.3667 12 15.3667C11.7613 15.3667 11.5324 15.2719 11.3636 15.1031L6.91917 10.6586C6.5677 10.3072 6.5677 9.73732 6.91917 9.38585C7.27064 9.03438 7.84049 9.03438 8.19196 9.38585L11.1 12.2939V3.80002C11.1 3.30297 11.503 2.90002 12 2.90002ZM4.00001 13.5874C4.49706 13.5874 4.90001 13.9903 4.90001 14.4874V18.043C4.90001 18.2758 4.99249 18.499 5.1571 18.6636C5.32172 18.8282 5.54498 18.9207 5.77778 18.9207H18.2222C18.455 18.9207 18.6783 18.8283 18.8429 18.6636C19.0075 18.499 19.1 18.2758 19.1 18.043V14.4874C19.1 13.9903 19.5029 13.5874 20 13.5874C20.4971 13.5874 20.9 13.9903 20.9 14.4874V18.043C20.9 18.7531 20.6179 19.4342 20.1157 19.9364C19.6135 20.4386 18.9324 20.7207 18.2222 20.7207H5.77778C5.06759 20.7207 4.38649 20.4386 3.88431 19.9364C3.38213 19.4342 3.10001 18.7531 3.10001 18.043V14.4874C3.10001 13.9903 3.50295 13.5874 4.00001 13.5874Z",fill:"currentColor"},null,-1)])])}const Q0e=xt({name:"kimi-download",render:G0e}),Y0e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function J0e(e,t){return k(),E("svg",Y0e,[...t[0]||(t[0]=[w("path",{d:"M18.0179 3.09998C18.3963 3.10003 18.7709 3.17491 19.1205 3.31971C19.4701 3.46454 19.7884 3.67614 20.056 3.94373C20.3237 4.21144 20.5362 4.52965 20.681 4.87928C20.8258 5.22887 20.8997 5.60423 20.8997 5.9828C20.8997 6.36118 20.8257 6.73591 20.681 7.08533C20.5362 7.43497 20.3237 7.75317 20.056 8.02088L17.639 10.4379L9.15756 18.9183C8.5296 19.5463 7.74274 19.992 6.8812 20.2074L4.21811 20.8734C3.91148 20.95 3.5871 20.8596 3.36362 20.6361C3.14017 20.4126 3.05063 20.0883 3.12729 19.7816L3.79233 17.1185C4.00771 16.257 4.45344 15.4701 5.08139 14.8422L15.9798 3.94373C16.5203 3.40346 17.2536 3.09998 18.0179 3.09998ZM19.0003 19.1C19.4972 19.1002 19.8997 19.5034 19.8997 20.0004C19.8995 20.4971 19.4971 20.8996 19.0003 20.8998H12.0003C11.5034 20.8998 11.1001 20.4973 11.0999 20.0004C11.0999 19.5033 11.5033 19.1 12.0003 19.1H19.0003ZM18.0179 4.89979C17.7309 4.89979 17.4553 5.01417 17.2523 5.21717L6.35385 16.1146C5.95661 16.5119 5.67469 17.01 5.53842 17.5551L5.23666 18.7631L6.44467 18.4613C6.98971 18.3251 7.48782 18.0431 7.8851 17.6459L18.7826 6.74744C18.883 6.64702 18.9635 6.52821 19.0179 6.39686C19.0723 6.26558 19.0999 6.1247 19.0999 5.9828C19.0999 5.84075 19.0723 5.69916 19.0179 5.56776C18.9635 5.43645 18.883 5.31757 18.7826 5.21717C18.6821 5.11678 18.5631 5.03716 18.432 4.9828C18.3008 4.92845 18.16 4.89983 18.0179 4.89979Z",fill:"currentColor"},null,-1)])])}const X0e=xt({name:"kimi-edit",render:J0e}),ege={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function tge(e,t){return k(),E("svg",ege,[...t[0]||(t[0]=[w("path",{d:"M5 11.0996C5.49693 11.0996 5.90018 11.5031 5.90039 12V18C5.90039 18.0552 5.94477 18.0996 6 18.0996H12C12.4969 18.0996 12.9002 18.5031 12.9004 19C12.9004 19.4971 12.4971 19.9004 12 19.9004H6C4.95066 19.9004 4.09961 19.0493 4.09961 18V12C4.09982 11.5031 4.50307 11.0996 5 11.0996ZM18 4.09961C19.0492 4.09961 19.9002 4.95084 19.9004 6V12C19.9004 12.4971 19.4971 12.9004 19 12.9004C18.5029 12.9004 18.0996 12.4971 18.0996 12V6C18.0994 5.94495 18.0551 5.90039 18 5.90039H12C11.5029 5.90039 11.0996 5.49706 11.0996 5C11.0998 4.50312 11.5031 4.09961 12 4.09961H18Z",fill:"currentColor"},null,-1)])])}const nge=xt({name:"kimi-expand",render:tge}),ige={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sge(e,t){return k(),E("svg",ige,[...t[0]||(t[0]=[w("g",null,[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1723 2.1001C13.9413 2.10018 14.6793 2.40592 15.2231 2.94971L19.0512 6.77783C19.595 7.32162 19.9007 8.0596 19.9008 8.82861V18.0005C19.9008 20.1544 18.1543 21.9009 16.0004 21.9009H8.0004C5.84649 21.9009 4.10001 20.1544 4.10001 18.0005V6.00049C4.10001 3.84658 5.84649 2.1001 8.0004 2.1001H13.1723ZM8.0004 3.90088C6.8406 3.90088 5.90079 4.84069 5.90079 6.00049V18.0005C5.90079 19.1603 6.8406 20.1001 8.0004 20.1001H16.0004C17.1602 20.1001 18.1 19.1603 18.1 18.0005V9.90088H15.0004C13.3988 9.90088 12.1 8.60211 12.1 7.00049V3.90088H8.0004ZM13.9008 7.00049C13.9008 7.608 14.3929 8.1001 15.0004 8.1001H17.8217C17.8072 8.08375 17.7933 8.06681 17.7777 8.05127L13.9496 4.22314C13.9339 4.20745 13.9173 4.19286 13.9008 4.17822V7.00049Z",fill:"currentColor"})],-1)])])}const d_=xt({name:"kimi-file",render:sge}),oge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rge(e,t){return k(),E("svg",oge,[...t[0]||(t[0]=[w("path",{d:"M15.4795 15.4971C15.9765 15.4971 16.3799 15.9004 16.3799 16.3975C16.3799 16.8945 15.9765 17.2978 15.4795 17.2979H8.52051C8.02345 17.2979 7.62012 16.8945 7.62012 16.3975C7.62012 15.9004 8.02345 15.4971 8.52051 15.4971H15.4795Z",fill:"currentColor"},null,-1),w("path",{d:"M12.3359 11.0996C12.8329 11.0997 13.2354 11.503 13.2354 12C13.2354 12.497 12.8329 12.9003 12.3359 12.9004H8.52051C8.02345 12.9004 7.62012 12.4971 7.62012 12C7.62012 11.5029 8.02345 11.0996 8.52051 11.0996H12.3359Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.1719 2.09961C13.9408 2.09969 14.6789 2.40555 15.2227 2.94922L19.0508 6.77734C19.5946 7.32113 19.9003 8.05911 19.9004 8.82812V18C19.9004 20.1539 18.1539 21.9004 16 21.9004H8C5.84626 21.9002 4.09961 20.1538 4.09961 18V6C4.09961 3.84621 5.84626 2.09981 8 2.09961H13.1719ZM8 3.90039C6.84037 3.90059 5.90039 4.84032 5.90039 6V18C5.90039 19.1597 6.84037 20.0994 8 20.0996H16C17.1598 20.0996 18.0996 19.1598 18.0996 18V9.90039H15C13.3985 9.90019 12.0996 8.6015 12.0996 7V3.90039H8ZM13.9004 7C13.9004 7.60739 14.3927 8.09941 15 8.09961H17.8213C17.8068 8.08333 17.7928 8.06626 17.7773 8.05078L13.9492 4.22266C13.9335 4.20696 13.9169 4.19237 13.9004 4.17773V7Z",fill:"currentColor"},null,-1)])])}const lge=xt({name:"kimi-file-text",render:rge}),age={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function uge(e,t){return k(),E("svg",age,[...t[0]||(t[0]=[w("path",{d:"M9.2373 3.7002C10.4169 3.7002 11.5297 4.24779 12.249 5.18262L12.4424 5.43359H18C20.0987 5.43359 21.7998 7.13472 21.7998 9.2334V16.5C21.7998 18.5987 20.0987 20.2998 18 20.2998H6C3.90132 20.2998 2.2002 18.5987 2.2002 16.5V7.5C2.2002 5.40132 3.90132 3.7002 6 3.7002H9.2373ZM6 5.5C4.89543 5.5 4 6.39543 4 7.5V16.5C4 17.6046 4.89543 18.5 6 18.5H18C19.0357 18.5 19.887 17.7128 19.9893 16.7041L20 16.5V9.2334C20 8.19775 19.2128 7.34641 18.2041 7.24414L18 7.2334H12.0479L11.9326 7.22656C11.666 7.19561 11.4205 7.05812 11.2549 6.84277L10.8223 6.28027C10.4437 5.78834 9.85808 5.5 9.2373 5.5H6ZM16 9.59961C16.4971 9.59961 16.9004 10.0029 16.9004 10.5C16.9004 10.9971 16.4971 11.4004 16 11.4004H8C7.50294 11.4004 7.09961 10.9971 7.09961 10.5C7.09961 10.0029 7.50294 9.59961 8 9.59961H16Z",fill:"currentColor"},null,-1)])])}const cge=xt({name:"kimi-folder",render:uge}),dge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fge(e,t){return k(),E("svg",dge,[...t[0]||(t[0]=[w("g",null,[w("path",{d:"M18.3623 9.99976L18.209 8.48999C18.2031 8.43161 18.2004 8.37289 18.2002 8.31421C18.1988 8.31196 18.1956 8.30842 18.1904 8.30347C18.1718 8.28559 18.1302 8.26245 18.0713 8.26245H11C10.261 8.26245 9.59753 7.81016 9.32617 7.1228L8.9082 6.06421C8.88101 5.9953 8.85737 5.92501 8.83887 5.85327C8.83778 5.85099 8.833 5.84268 8.81836 5.83179C8.79454 5.81475 8.7549 5.79939 8.70605 5.80054H3.92871C3.86986 5.80054 3.82825 5.82368 3.80957 5.84155C3.80816 5.8429 3.80675 5.84428 3.80566 5.84546L4.47559 14.0955L3.62109 17.5154L5.12109 11.5154C5.34367 10.6251 6.1438 9.99977 7.06152 9.99976H18.3623ZM7.06152 11.7996C6.96976 11.7996 6.88944 11.8629 6.86719 11.9519L5.36719 17.9519C5.33598 18.078 5.43158 18.1999 5.56152 18.2H19.4385C19.5302 18.1999 19.6106 18.1376 19.6328 18.0486L21.1328 12.0486C21.1644 11.9224 21.0686 11.7996 20.9385 11.7996H7.06152ZM20.9385 9.99976C22.2396 9.99977 23.1945 11.2228 22.8789 12.4851L21.3789 18.4851C21.1563 19.3754 20.3562 19.9997 19.4385 19.9998H4.92871C4.41722 19.9998 3.92613 19.8059 3.56445 19.4597C3.20281 19.1135 3.00004 18.6436 3 18.1541L2 5.84644C2.00006 5.35711 2.20311 4.88786 2.56445 4.54175C2.92613 4.19554 3.41722 4.00073 3.92871 4.00073H8.66406C9.10133 3.99051 9.5296 4.1225 9.87793 4.37573C10.2285 4.63118 10.4767 4.99457 10.582 5.40405L11 6.46167H18.0713C18.5828 6.46167 19.0739 6.65648 19.4355 7.00269C19.7971 7.34888 20 7.81883 20 8.30835L20.1719 9.99976H20.9385Z",fill:"currentColor"})],-1)])])}const hge=xt({name:"kimi-folder-open",render:fge}),pge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gge(e,t){return k(),E("svg",pge,[...t[0]||(t[0]=[w("path",{d:"M9.5 3Q10.8 8.2 16 9.5Q10.8 10.8 9.5 16Q8.2 10.8 3 9.5Q8.2 8.2 9.5 3Z",fill:"currentColor"},null,-1),w("path",{d:"M17.25 13.5Q18 16.5 21 17.25Q18 18 17.25 21Q16.5 18 13.5 17.25Q16.5 16.5 17.25 13.5Z",fill:"currentColor"},null,-1)])])}const mge=xt({name:"kimi-gen-title",render:gge}),vge={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function yge(e,t){return k(),E("svg",vge,[...t[0]||(t[0]=[w("path",{id:"af-p0",d:"M -2.619 -8.3 C -1.815 -8.3 -1.048 -7.97 -0.499 -7.39 C -0.499 -7.39 0.141 -6.712 0.141 -6.712 C 0.141 -6.712 5.75 -6.712 5.75 -6.712 C 7.904 -6.712 9.65 -4.986 9.65 -2.858 C 9.65 -2.858 9.65 -1.71 9.65 -1.71 C 9.65 -1.219 9.247 -0.821 8.75 -0.821 C 8.253 -0.821 7.85 -1.219 7.85 -1.71 C 7.85 -1.71 7.85 -2.858 7.85 -2.858 C 7.849 -4.004 6.91 -4.934 5.75 -4.934 C 5.75 -4.934 -0.207 -4.934 -0.207 -4.934 C -0.484 -4.934 -0.749 -5.047 -0.938 -5.247 C -0.938 -5.247 -1.815 -6.177 -1.815 -6.177 C -2.023 -6.397 -2.315 -6.521 -2.619 -6.521 C -2.619 -6.521 -6.25 -6.521 -6.25 -6.521 C -7.41 -6.521 -8.35 -5.592 -8.35 -4.446 C -8.35 -4.446 -8.35 4.446 -8.35 4.446 C -8.35 5.592 -7.41 6.521 -6.25 6.521 C -6.25 6.521 1.25 6.521 1.25 6.521 C 1.747 6.521 2.15 6.919 2.15 7.41 C 2.15 7.901 1.747 8.3 1.25 8.3 C 1.25 8.3 -6.25 8.3 -6.25 8.3 C -8.404 8.3 -10.15 6.574 -10.15 4.446 C -10.15 4.446 -10.15 -4.446 -10.15 -4.446 C -10.15 -6.574 -8.404 -8.3 -6.25 -8.3 C -6.25 -8.3 -2.619 -8.3 -2.619 -8.3 Z M 3.75 -2.5 C 4.247 -2.5 4.65 -2.097 4.65 -1.6 C 4.65 -1.103 4.247 -0.699 3.75 -0.699 C 3.75 -0.699 -4.25 -0.699 -4.25 -0.699 C -4.747 -0.699 -5.15 -1.103 -5.15 -1.6 C -5.15 -2.097 -4.747 -2.5 -4.25 -2.5 C -4.25 -2.5 3.75 -2.5 3.75 -2.5 Z",transform:"matrix(1 0 0 1 11.75 12)",fill:"currentColor"},null,-1),w("g",{id:"af-p1"},[w("path",{d:"M 2.635 0 L -2.635 0 M 0 -2.635 L 0 2.635",transform:"matrix(1 0 0 1 18.4 16.3)",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})],-1)])])}const kge=xt({name:"kimi-folder-plus",render:yge}),bge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Age(e,t){return k(),E("svg",bge,[...t[0]||(t[0]=[w("path",{d:"M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM12 19.2002C15.9764 19.2002 19.2002 15.9764 19.2002 12C19.2002 8.02355 15.9764 4.7998 12 4.7998V19.2002Z",fill:"currentColor"},null,-1)])])}const Cge=xt({name:"kimi-follow-system",render:Age}),wge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xge(e,t){return k(),E("svg",wge,[...t[0]||(t[0]=[w("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7ZM12 15.6992C12.4968 15.6992 12.8994 16.1028 12.8994 16.5996C12.8994 17.0964 12.4968 17.5 12 17.5C11.5024 17.5 11.0996 17.0964 11.0996 16.5996C11.0996 16.1028 11.5024 15.6992 12 15.6992ZM12 6.49902C12.4969 6.49922 12.8994 6.86908 12.8994 7.3252V13.6729C12.8994 14.129 12.4969 14.4988 12 14.499C11.5029 14.499 11.0996 14.1291 11.0996 13.6729V7.3252C11.0996 6.86896 11.5029 6.49902 12 6.49902Z",fill:"currentColor"},null,-1)])])}const Sge=xt({name:"kimi-full-access",render:xge}),_ge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ige(e,t){return k(),E("svg",_ge,[...t[0]||(t[0]=[w("path",{d:"M12.5092 2.11279C17.7402 2.37781 21.8998 6.70364 21.8998 12.0005C21.8996 17.4153 17.5524 21.8108 12.1576 21.895C12.1056 21.898 12.0532 21.8999 12.0004 21.8999C11.948 21.8999 11.8954 21.8968 11.8432 21.896L11.8422 21.895C6.44751 21.8107 2.10022 17.4152 2.10001 12.0005C2.10001 6.53287 6.53278 2.1001 12.0004 2.1001L12.5092 2.11279ZM8.92715 13.0005C9.02896 14.9787 9.42581 16.721 9.99356 17.9985C10.3249 18.7441 10.6971 19.292 11.0639 19.6411C11.4259 19.9855 11.741 20.1001 12.0004 20.1001C12.2598 20.1 12.5749 19.9856 12.9369 19.6411C13.3037 19.292 13.6749 18.7441 14.0063 17.9985C14.574 16.721 14.9718 14.9788 15.0736 13.0005H8.92715ZM3.96329 13.0005C4.31462 15.8522 6.14714 18.2427 8.66837 19.3823C8.55544 19.1733 8.44916 18.9552 8.34903 18.73C7.66574 17.1926 7.22657 15.1926 7.12344 13.0005H3.96329ZM16.8764 13.0005C16.7732 15.1926 16.3341 17.1926 15.6508 18.73C15.5506 18.9554 15.4435 19.1732 15.3305 19.3823C17.8522 18.2429 19.6851 15.8525 20.0365 13.0005H16.8764ZM8.66934 4.6167C6.08869 5.78266 4.22826 8.25964 3.93985 11.1997H7.11661C7.20176 8.92954 7.64512 6.85497 8.34903 5.271C8.4494 5.04516 8.5561 4.82619 8.66934 4.6167ZM12.0004 3.8999C11.7411 3.8999 11.4259 4.01454 11.0639 4.35889C10.6971 4.70797 10.3249 5.25587 9.99356 6.00146C9.40671 7.32188 9.00186 9.13885 8.91739 11.1997H15.0834C14.9989 9.13884 14.5931 7.32189 14.0063 6.00146C13.6749 5.2559 13.3037 4.70796 12.9369 4.35889C12.5749 4.0144 12.2598 3.90002 12.0004 3.8999ZM15.3295 4.61572C15.443 4.82559 15.5502 5.04471 15.6508 5.271C16.3547 6.85498 16.799 8.92949 16.8842 11.1997H20.06C19.7715 8.25914 17.9108 5.78143 15.3295 4.61572Z",fill:"currentColor"},null,-1)])])}const Mge=xt({name:"kimi-globe",render:Ige}),Ege={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tge(e,t){return k(),E("svg",Ege,[...t[0]||(t[0]=[w("path",{d:"M8 17C8.82834 17 9.5 17.6717 9.5 18.5C9.5 19.3283 8.82834 20 8 20C7.17166 20 6.5 19.3283 6.5 18.5C6.5 17.6717 7.17166 17 8 17ZM16 17C16.8283 17 17.5 17.6717 17.5 18.5C17.5 19.3283 16.8283 20 16 20C15.1717 20 14.5 19.3283 14.5 18.5C14.5 17.6717 15.1717 17 16 17ZM8 10.5C8.82834 10.5 9.5 11.1717 9.5 12C9.5 12.8283 8.82834 13.5 8 13.5C7.17166 13.5 6.5 12.8283 6.5 12C6.5 11.1717 7.17166 10.5 8 10.5ZM16 10.5C16.8283 10.5 17.5 11.1717 17.5 12C17.5 12.8283 16.8283 13.5 16 13.5C15.1717 13.5 14.5 12.8283 14.5 12C14.5 11.1717 15.1717 10.5 16 10.5ZM8 4C8.82834 4 9.5 4.67166 9.5 5.5C9.5 6.32834 8.82834 7 8 7C7.17166 7 6.5 6.32834 6.5 5.5C6.5 4.67166 7.17166 4 8 4ZM16 4C16.8283 4 17.5 4.67166 17.5 5.5C17.5 6.32834 16.8283 7 16 7C15.1717 7 14.5 6.32834 14.5 5.5C14.5 4.67166 15.1717 4 16 4Z",fill:"currentColor"},null,-1)])])}const Lge=xt({name:"kimi-grip",render:Tge}),Nge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fge(e,t){return k(),E("svg",Nge,[...t[0]||(t[0]=[w("path",{d:"M7.22264 6.10352C7.22264 5.5078 7.48259 4.95449 7.91405 4.56055C8.34271 4.16918 8.90831 3.96198 9.48241 3.96191C9.64155 3.96191 9.80001 3.97936 9.95507 4.01074C10.0127 3.5042 10.2586 3.04178 10.6338 2.69922C11.0625 2.30778 11.6279 2.09961 12.2021 2.09961C12.7763 2.09966 13.3418 2.30783 13.7705 2.69922C13.9947 2.90401 14.1709 3.15244 14.29 3.42676C14.4947 3.37044 14.7071 3.34182 14.9209 3.3418C15.4951 3.3418 16.0605 3.549 16.4892 3.94043C16.8644 4.28293 17.1093 4.74548 17.167 5.25195C17.3223 5.22045 17.4812 5.20312 17.6406 5.20312C18.2147 5.20318 18.7803 5.41135 19.209 5.80273C19.6402 6.19663 19.9004 6.74922 19.9004 7.34473V14.6543C19.9004 17.413 19.2914 19.0434 18.0137 20.21C16.82 21.2998 15.2175 21.9004 13.5615 21.9004C11.7538 21.9004 10.2315 21.5696 8.95702 20.8535C7.67664 20.1341 6.71683 19.0652 5.97362 17.708L3.3496 12.916C3.18848 12.6213 3.10112 12.2914 3.0996 11.9531C3.09812 11.6147 3.18309 11.2835 3.34179 10.9873C3.5001 10.692 3.72639 10.4416 3.99706 10.251C4.26771 10.0604 4.57776 9.93235 4.90136 9.87305C5.56617 9.75102 6.25934 9.84517 6.86425 10.1445C6.9942 10.2088 7.11461 10.2788 7.22264 10.3477V6.10352ZM9.02343 12.7969C9.02336 13.1912 8.76624 13.5395 8.38964 13.6562C8.0129 13.773 7.60387 13.6309 7.38085 13.3057L6.53514 12.0723C6.51218 12.0529 6.48411 12.0282 6.45018 12.002C6.34595 11.9213 6.20986 11.8289 6.06639 11.7578C5.81525 11.6335 5.51637 11.5904 5.22655 11.6436H5.22557C5.15055 11.6573 5.08558 11.6865 5.03417 11.7227C4.98289 11.7588 4.94815 11.7998 4.92772 11.8379C4.90762 11.8755 4.90023 11.9122 4.90038 11.9453C4.90057 11.9782 4.9084 12.0144 4.9287 12.0518L7.55272 16.8438C8.16912 17.9693 8.90989 18.7622 9.83886 19.2842C10.7737 19.8094 11.9704 20.0996 13.5615 20.0996C14.7902 20.0996 15.9536 19.6533 16.7998 18.8809C17.5619 18.185 18.0996 17.1383 18.0996 14.6543V7.34473C18.0996 7.28204 18.0734 7.20342 17.9951 7.13184C17.9139 7.05771 17.7875 7.00396 17.6406 7.00391C17.4937 7.00391 17.3674 7.05771 17.2861 7.13184C17.2077 7.20347 17.1807 7.28199 17.1807 7.34473V11.0693C17.1805 11.5661 16.778 11.9685 16.2812 11.9688C15.7843 11.9688 15.381 11.5662 15.3808 11.0693V5.48242C15.3808 5.41973 15.3537 5.34107 15.2754 5.26953C15.1941 5.19547 15.0677 5.1416 14.9209 5.1416C14.774 5.14166 14.6476 5.19541 14.5664 5.26953C14.4881 5.34105 14.462 5.41974 14.4619 5.48242V11.0693C14.4617 11.5662 14.0584 11.9688 13.5615 11.9688C13.0646 11.9687 12.6613 11.5662 12.6611 11.0693V4.24121C12.6611 4.17852 12.635 4.09989 12.5566 4.02832C12.4754 3.95419 12.349 3.90045 12.2021 3.90039C12.0552 3.90039 11.9289 3.95421 11.8476 4.02832C11.7692 4.09992 11.7422 4.17849 11.7422 4.24121V11.0693C11.742 11.5661 11.3395 11.9685 10.8428 11.9688C10.3458 11.9688 9.94257 11.5662 9.94237 11.0693V6.10352L9.93651 6.05371C9.92534 6.00177 9.89573 5.94433 9.8369 5.89062C9.75567 5.81647 9.62938 5.76172 9.48241 5.76172C9.33554 5.76179 9.2091 5.81651 9.12792 5.89062C9.04964 5.96222 9.02343 6.04084 9.02343 6.10352V12.7969Z",fill:"currentColor"},null,-1)])])}const Dge=xt({name:"kimi-hand",render:Fge}),$ge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Bge(e,t){return k(),E("svg",$ge,[...t[0]||(t[0]=[w("path",{d:"M4 3.33203C4.55224 3.33203 4.99993 3.7798 5 4.33203V18.0908H20.0674C20.6195 18.0908 21.0671 18.5388 21.0674 19.0908C21.0674 19.6431 20.6197 20.0908 20.0674 20.0908H5C3.89543 20.0908 3 19.1954 3 18.0908V4.33203C3.00007 3.7798 3.44776 3.33203 4 3.33203ZM8.19922 9.28418C8.7515 9.28418 9.19922 9.73189 9.19922 10.2842V15.6045C9.19908 16.1567 8.75142 16.6045 8.19922 16.6045C7.64719 16.6043 7.19936 16.1565 7.19922 15.6045V10.2842C7.19922 9.73202 7.6471 9.28438 8.19922 9.28418ZM17.2227 6.85645C17.7748 6.85658 18.2226 7.3043 18.2227 7.85645V15.6045C18.2225 16.1566 17.7747 16.6044 17.2227 16.6045C16.6705 16.6045 16.2228 16.1566 16.2227 15.6045V7.85645C16.2227 7.30422 16.6704 6.85645 17.2227 6.85645ZM12.7109 3.96387C13.2631 3.96387 13.7107 4.41175 13.7109 4.96387V15.6035C13.7109 16.1558 13.2632 16.6035 12.7109 16.6035C12.1587 16.6035 11.7109 16.1558 11.7109 15.6035V4.96387C11.7111 4.41175 12.1588 3.96387 12.7109 3.96387Z",fill:"currentColor"},null,-1)])])}const zge=xt({name:"kimi-histogram",render:Bge}),Rge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Oge(e,t){return k(),E("svg",Rge,[...t[0]||(t[0]=[w("path",{d:"M8.00916 7.50488C8.47326 7.50488 8.91828 7.68943 9.24646 8.01758C9.57465 8.34577 9.75916 8.79075 9.75916 9.25488C9.75916 9.71901 9.57465 10.164 9.24646 10.4922C8.91828 10.8203 8.47326 11.0049 8.00916 11.0049C7.54507 11.0049 7.10001 10.8203 6.77185 10.4922C6.4437 10.164 6.25916 9.71898 6.25916 9.25488C6.25916 8.79078 6.4437 8.34576 6.77185 8.01758C7.10001 7.68942 7.54507 7.50492 8.00916 7.50488Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.8998 4.09961C20.0537 4.09961 21.8002 5.84609 21.8002 8V16C21.8002 18.1539 20.0537 19.9004 17.8998 19.9004H5.89978C3.74598 19.9003 1.99939 18.1538 1.99939 16V8C1.99939 5.84617 3.74598 4.09974 5.89978 4.09961H17.8998ZM15.4867 12.2539C15.448 12.2184 15.3885 12.2192 15.351 12.2559L11.7338 15.8027C11.0146 16.5079 9.87305 16.5222 9.13708 15.835L6.98669 13.8262C6.95049 13.7924 6.89516 13.791 6.85681 13.8223L3.82361 16.2988C3.96873 17.3168 4.84165 18.0995 5.89978 18.0996H17.8998C18.9375 18.0996 19.7964 17.3466 19.9662 16.3574L15.4867 12.2539ZM5.89978 5.90039C4.74009 5.90052 3.80017 6.84028 3.80017 8V14.002L5.73181 12.4238C6.46046 11.8286 7.51253 11.8634 8.20056 12.5059L10.351 14.5146C10.3897 14.5508 10.4498 14.5497 10.4877 14.5127L14.1049 10.9658C14.819 10.2656 15.9506 10.2466 16.6879 10.9219L19.9994 13.9551V8C19.9994 6.8402 19.0596 5.90039 17.8998 5.90039H5.89978Z",fill:"currentColor"},null,-1)])])}const Pge=xt({name:"kimi-image",render:Oge}),jge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hge(e,t){return k(),E("svg",jge,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.09375 2.81174C5.4825 2.50796 6.04376 2.56488 6.34766 2.93869L20.1855 19.9602C20.4895 20.3341 20.421 20.8836 20.0322 21.1877C19.6435 21.4917 19.0823 21.4355 18.7783 21.0617L17.9971 20.1008H5.99609C3.84224 20.1008 2.0958 18.3552 2.0957 16.2014V8.13889C2.09589 6.26755 3.41429 4.70428 5.17285 4.32639L4.93945 4.03928C4.63577 3.66536 4.7051 3.11573 5.09375 2.81174ZM7.13184 14.1096C7.09416 14.0738 7.03659 14.0713 6.99609 14.1037L3.92871 16.5569C4.09761 17.5472 4.95753 18.301 5.99609 18.301H16.5342L13.373 14.4133L11.9072 15.9455C11.1531 16.7324 9.92202 16.7621 9.13281 16.0119L7.13184 14.1096ZM5.99609 6.03928C4.83643 6.03928 3.89669 6.97927 3.89648 8.13889V14.1408L5.83496 12.5901C6.60469 11.9742 7.69929 12.022 8.41504 12.7024L10.416 14.6037C10.4575 14.6431 10.5218 14.642 10.5615 14.6008L12.1641 12.926L9.78906 10.0051C9.70282 10.2646 9.55682 10.5038 9.35645 10.7004C9.02202 11.0285 8.56767 11.2131 8.09473 11.2131C7.62195 11.213 7.1683 11.0284 6.83398 10.7004C6.49961 10.3724 6.31152 9.92701 6.31152 9.46311C6.3116 8.99941 6.49981 8.55474 6.83398 8.22678C7.12986 7.93654 7.51931 7.75901 7.93262 7.7219L6.56543 6.03928H5.99609Z",fill:"currentColor"},null,-1),w("path",{d:"M18.0049 4.31272C20.1587 4.31288 21.9043 6.0593 21.9043 8.21311V13.718C21.9039 15.4743 19.7248 16.2906 18.5713 14.966L14.9141 10.7658C14.5882 10.3912 14.6278 9.82271 15.002 9.49631C15.3768 9.16994 15.9451 9.20948 16.2715 9.5842L19.9287 13.7844C19.9528 13.812 19.9696 13.8167 19.9775 13.8186C19.9908 13.8216 20.0141 13.8213 20.04 13.8117C20.0655 13.8021 20.0826 13.7875 20.0908 13.7766C20.0955 13.7702 20.1044 13.7552 20.1045 13.718V8.21311C20.1045 7.05341 19.1645 6.11366 18.0049 6.1135H10.6328C10.1361 6.11327 9.73267 5.70981 9.73242 5.21311C9.73242 4.71619 10.136 4.31295 10.6328 4.31272H18.0049Z",fill:"currentColor"},null,-1)])])}const Wge=xt({name:"kimi-image-failed",render:Hge}),qge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Uge(e,t){return k(),E("svg",qge,[...t[0]||(t[0]=[w("path",{d:"M12 2.1001C17.4676 2.10031 21.8994 6.53286 21.8994 12.0005C21.8992 17.4679 17.4674 21.8997 12 21.8999C6.53237 21.8999 2.09982 17.4681 2.09961 12.0005C2.09961 6.53273 6.53224 2.1001 12 2.1001ZM12 3.8999C7.52636 3.8999 3.89941 7.52684 3.89941 12.0005C3.89963 16.474 7.52649 20.1001 12 20.1001C16.4733 20.0999 20.0994 16.4738 20.0996 12.0005C20.0996 7.52697 16.4735 3.90011 12 3.8999ZM12 9.50049C12.4969 9.50068 12.8994 9.87055 12.8994 10.3267V16.6743C12.8992 17.1303 12.4968 17.5003 12 17.5005C11.503 17.5005 11.0998 17.1304 11.0996 16.6743V10.3267C11.0996 9.87043 11.5029 9.50049 12 9.50049ZM12 6.49951C12.4968 6.49951 12.8994 6.90313 12.8994 7.3999C12.8992 7.8965 12.4966 8.30029 12 8.30029C11.5025 8.30028 11.0998 7.8965 11.0996 7.3999C11.0996 6.90313 11.5024 6.49952 12 6.49951Z",fill:"currentColor"},null,-1)])])}const Kge=xt({name:"kimi-info",render:Uge}),Vge={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zge(e,t){return k(),E("svg",Vge,[...t[0]||(t[0]=[mc('<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.09998C6.53222 2.09998 2.09998 6.53222 2.09998 12C2.09998 17.4677 6.53222 21.9 12 21.9C17.4677 21.9 21.9 17.4677 21.9 12C21.9 6.53222 17.4677 2.09998 12 2.09998ZM3.89998 12C3.89998 7.52633 7.52633 3.89998 12 3.89998C16.4736 3.89998 20.1 7.52633 20.1 12C20.1 16.4736 16.4736 20.1 12 20.1C7.52633 20.1 3.89998 16.4736 3.89998 12Z" fill="currentColor"></path><path d="M9.4286 9.47153C9.4286 8.97448 9.83154 8.57153 10.3286 8.57153H11.1C11.5971 8.57153 12 8.97448 12 9.47153C12 9.96859 11.5971 10.3715 11.1 10.3715H10.3286C9.83154 10.3715 9.4286 9.96859 9.4286 9.47153Z" fill="currentColor"></path><path d="M5.14289 9.47155C5.14289 8.97449 5.54583 8.57155 6.04289 8.57155H7.67146C8.16851 8.57155 8.57146 8.97449 8.57146 9.47155C8.57146 9.9686 8.16851 10.3715 7.67146 10.3715H6.04289C5.54583 10.3715 5.14289 9.9686 5.14289 9.47155Z" fill="currentColor"></path><path d="M8.57146 16.3287C8.57146 15.8316 8.9744 15.4287 9.47145 15.4287H14.5286C15.0257 15.4287 15.4286 15.8316 15.4286 16.3287C15.4286 16.8257 15.0257 17.2287 14.5286 17.2287H9.47145C8.9744 17.2287 8.57146 16.8257 8.57146 16.3287Z" fill="currentColor"></path><path d="M6.04288 12.0001C5.54583 12.0001 5.14288 12.403 5.14288 12.9001C5.14288 13.3972 5.54583 13.8001 6.04288 13.8001H6.81431C7.31137 13.8001 7.71431 13.3972 7.71431 12.9001C7.71431 12.403 7.31137 12.0001 6.81431 12.0001H6.04288Z" fill="currentColor"></path><path d="M9.47145 12.0001C8.9744 12.0001 8.57146 12.403 8.57146 12.9001C8.57146 13.3972 8.9744 13.8001 9.47146 13.8001H10.2429C10.7399 13.8001 11.1429 13.3972 11.1429 12.9001C11.1429 12.403 10.7399 12.0001 10.2429 12.0001H9.47145Z" fill="currentColor"></path><path d="M12.8572 9.47153C12.8572 8.97448 13.2601 8.57153 13.7572 8.57153H14.5286C15.0257 8.57153 15.4286 8.97448 15.4286 9.47153C15.4286 9.96859 15.0257 10.3715 14.5286 10.3715H13.7572C13.2601 10.3715 12.8572 9.96859 12.8572 9.47153Z" fill="currentColor"></path><path d="M12.9 12.0001C12.403 12.0001 12 12.403 12 12.9001C12 13.3972 12.403 13.8001 12.9 13.8001H13.6715C14.1685 13.8001 14.5715 13.3972 14.5715 12.9001C14.5715 12.403 14.1685 12.0001 13.6715 12.0001H12.9Z" fill="currentColor"></path><path d="M16.2857 9.47153C16.2857 8.97448 16.6887 8.57153 17.1857 8.57153H17.9572C18.4542 8.57153 18.8572 8.97448 18.8572 9.47153C18.8572 9.96859 18.4542 10.3715 17.9572 10.3715H17.1857C16.6887 10.3715 16.2857 9.96859 16.2857 9.47153Z" fill="currentColor"></path><path d="M16.3286 12.0001C15.8315 12.0001 15.4286 12.403 15.4286 12.9001C15.4286 13.3972 15.8315 13.8001 16.3286 13.8001H17.9572C18.4542 13.8001 18.8572 13.3972 18.8572 12.9001C18.8572 12.403 18.4542 12.0001 17.9572 12.0001H16.3286Z" fill="currentColor"></path>',10)])])}const Gge=xt({name:"kimi-keyboard",render:Zge}),Qge={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function Yge(e,t){return k(),E("svg",Qge,[...t[0]||(t[0]=[w("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),w("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),w("path",{id:"bar-arrow",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const Jge=xt({name:"kimi-left-panel",render:Yge}),Xge={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function eme(e,t){return k(),E("svg",Xge,[...t[0]||(t[0]=[w("path",{id:"bar-divider",d:"M 9.3 18.951 L 9.3 4.3",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),w("path",{id:"bar-box",d:"M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"butt","stroke-linejoin":"miter",transform:"matrix(1 0 0 1 11.8 11.8)"},null,-1),w("path",{id:"bar-arrow-expand",d:"M -1.25 -2.5 L 1.25 0 L -1.25 2.5",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const tme=xt({name:"kimi-left-panel-expand",render:eme}),nme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ime(e,t){return k(),E("svg",nme,[...t[0]||(t[0]=[mc('<g><path d="M12.9 1.7999C12.9 1.30285 12.4971 0.899902 12 0.899902C11.5029 0.899902 11.1 1.30285 11.1 1.7999V2.7999C11.1 3.29696 11.5029 3.6999 12 3.6999C12.4971 3.6999 12.9 3.29696 12.9 2.7999V1.7999Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.1 11.9999C6.1 8.7414 8.74152 6.09988 12 6.09988C15.2585 6.09988 17.9 8.7414 17.9 11.9999C17.9 15.2584 15.2585 17.8999 12 17.8999C8.74152 17.8999 6.1 15.2584 6.1 11.9999ZM12 7.89988C9.73563 7.89988 7.9 9.73551 7.9 11.9999C7.9 14.2642 9.73563 16.0999 12 16.0999C14.2644 16.0999 16.1 14.2642 16.1 11.9999C16.1 9.73551 14.2644 7.89988 12 7.89988Z" fill="currentColor"></path><path d="M0.899994 11.9999C0.899994 11.5028 1.30294 11.0999 1.79999 11.0999H2.79999C3.29705 11.0999 3.69999 11.5028 3.69999 11.9999C3.69999 12.4969 3.29705 12.8999 2.79999 12.8999H1.79999C1.30294 12.8999 0.899994 12.4969 0.899994 11.9999Z" fill="currentColor"></path><path d="M12 20.2991C12.4971 20.2991 12.9 20.702 12.9 21.1991V22.1991C12.9 22.6961 12.4971 23.0991 12 23.0991C11.5029 23.0991 11.1 22.6961 11.1 22.1991V21.1991C11.1 20.702 11.5029 20.2991 12 20.2991Z" fill="currentColor"></path><path d="M21.2016 11.0999C20.7045 11.0999 20.3016 11.5028 20.3016 11.9999C20.3016 12.4969 20.7045 12.8999 21.2016 12.8999H22.2016C22.6986 12.8999 23.1016 12.4969 23.1016 11.9999C23.1016 11.5028 22.6986 11.0999 22.2016 11.0999H21.2016Z" fill="currentColor"></path><path d="M20.1995 3.79903C20.551 4.1505 20.551 4.72035 20.1995 5.07182L19.4924 5.77893C19.141 6.1304 18.5711 6.1304 18.2196 5.77893C17.8682 5.42746 17.8682 4.85761 18.2196 4.50614L18.9268 3.79903C19.2782 3.44756 19.8481 3.44756 20.1995 3.79903Z" fill="currentColor"></path><path d="M19.4942 18.2215C19.1427 17.87 18.5729 17.87 18.2214 18.2215C17.87 18.573 17.87 19.1428 18.2214 19.4943L18.9285 20.2014C19.28 20.5529 19.8498 20.5529 20.2013 20.2014C20.5528 19.8499 20.5528 19.2801 20.2013 18.9286L19.4942 18.2215Z" fill="currentColor"></path><path d="M5.78079 18.2213C6.13227 18.5727 6.13227 19.1426 5.78079 19.4941L5.07369 20.2012C4.72222 20.5526 4.15237 20.5526 3.8009 20.2012C3.44942 19.8497 3.44942 19.2798 3.8009 18.9284L4.508 18.2213C4.85947 17.8698 5.42932 17.8698 5.78079 18.2213Z" fill="currentColor"></path><path d="M5.07077 3.79912C4.7193 3.44764 4.14945 3.44764 3.79798 3.79912C3.4465 4.15059 3.4465 4.72044 3.79798 5.07191L4.50508 5.77901C4.85655 6.13049 5.4264 6.13049 5.77787 5.77902C6.12935 5.42754 6.12935 4.85769 5.77787 4.50622L5.07077 3.79912Z" fill="currentColor"></path></g>',1)])])}const sme=xt({name:"kimi-light-mode",render:ime}),ome={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rme(e,t){return k(),E("svg",ome,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.97427 8.06961C4.99348 7.33581 6.18946 7.1 7.00001 7.1H9.00001C9.49706 7.1 9.90001 7.50294 9.90001 8C9.90001 8.49706 9.49706 8.9 9.00001 8.9H7.00001C6.47755 8.9 5.67353 9.06419 5.02599 9.53039C4.42434 9.96356 3.90001 10.6934 3.90001 12C3.90001 13.3066 4.42434 14.0364 5.02599 14.4696C5.67353 14.9358 6.47755 15.1 7.00001 15.1H9.00001C9.49706 15.1 9.90001 15.5029 9.90001 16C9.90001 16.4971 9.49706 16.9 9.00001 16.9H7.00001C6.18946 16.9 4.99348 16.6642 3.97427 15.9304C2.90917 15.1636 2.10001 13.8934 2.10001 12C2.10001 10.1066 2.90917 8.83644 3.97427 8.06961ZM14.1 8C14.1 7.50294 14.5029 7.1 15 7.1H17C17.8105 7.1 19.0065 7.33581 20.0257 8.06961C21.0908 8.83644 21.9 10.1066 21.9 12C21.9 13.8934 21.0908 15.1636 20.0257 15.9304C19.0065 16.6642 17.8105 16.9 17 16.9H15C14.5029 16.9 14.1 16.4971 14.1 16C14.1 15.5029 14.5029 15.1 15 15.1H17C17.5225 15.1 18.3265 14.9358 18.974 14.4696C19.5757 14.0364 20.1 13.3066 20.1 12C20.1 10.6934 19.5757 9.96356 18.974 9.53039C18.3265 9.06419 17.5225 8.9 17 8.9H15C14.5029 8.9 14.1 8.49706 14.1 8ZM7.10001 12C7.10001 11.5029 7.50295 11.1 8.00001 11.1H16C16.4971 11.1 16.9 11.5029 16.9 12C16.9 12.4971 16.4971 12.9 16 12.9H8.00001C7.50295 12.9 7.10001 12.4971 7.10001 12Z",fill:"currentColor"},null,-1)])])}const lme=xt({name:"kimi-link",render:rme}),ame={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ume(e,t){return k(),E("svg",ame,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.10001 5.99998C4.10001 5.50292 4.50295 5.09998 5.00001 5.09998H19C19.4971 5.09998 19.9 5.50292 19.9 5.99998C19.9 6.49703 19.4971 6.89998 19 6.89998H5.00001C4.50295 6.89998 4.10001 6.49703 4.10001 5.99998ZM4.10001 12C4.10001 11.5029 4.50295 11.1 5.00001 11.1H19C19.4971 11.1 19.9 11.5029 19.9 12C19.9 12.497 19.4971 12.9 19 12.9H5.00001C4.50295 12.9 4.10001 12.497 4.10001 12ZM4.10001 18C4.10001 17.5029 4.50295 17.1 5.00001 17.1H19C19.4971 17.1 19.9 17.5029 19.9 18C19.9 18.497 19.4971 18.9 19 18.9H5.00001C4.50295 18.9 4.10001 18.497 4.10001 18Z",fill:"currentColor"},null,-1)])])}const cme=xt({name:"kimi-list",render:ume}),dme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function fme(e,t){return k(),E("svg",dme,[...t[0]||(t[0]=[w("g",null,[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18 4.09961C20.1539 4.09961 21.9004 5.84609 21.9004 8V16C21.9004 18.1539 20.1539 19.9004 18 19.9004H6C3.84609 19.9004 2.09961 18.1539 2.09961 16V8C2.09961 5.84609 3.84609 4.09961 6 4.09961H18ZM3.90039 16C3.90039 17.1598 4.8402 18.0996 6 18.0996H18C19.1598 18.0996 20.0996 17.1598 20.0996 16V9.49805L13.5361 13.5361C12.5955 14.1147 11.4075 14.1084 10.4727 13.5205L3.90039 9.38672V16ZM6 5.90039C5.0746 5.90039 4.29039 6.49909 4.01074 7.33008L11.4316 11.9971C11.7861 12.2199 12.2361 12.2222 12.5928 12.0029L20.0195 7.43457C19.7725 6.54993 18.9636 5.90039 18 5.90039H6Z",fill:"currentColor"})],-1)])])}const hme=xt({name:"kimi-mail",render:fme}),pme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function gme(e,t){return k(),E("svg",pme,[...t[0]||(t[0]=[w("path",{d:"M17 11.0996C17.4971 11.0996 17.9004 11.5029 17.9004 12C17.9004 12.4971 17.4971 12.9004 17 12.9004H7C6.50294 12.9004 6.09961 12.4971 6.09961 12C6.09961 11.5029 6.50294 11.0996 7 11.0996H17Z",fill:"currentColor"},null,-1)])])}const mme=xt({name:"kimi-minus",render:gme}),vme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yme(e,t){return k(),E("svg",vme,[...t[0]||(t[0]=[w("path",{d:"M15.182 3.32802C15.9304 2.72235 17.0309 2.76978 17.724 3.46767L18.5424 4.29189L18.6722 4.43642C19.2377 5.13495 19.234 6.1404 18.6635 6.83486L18.5326 6.97841L18.0248 7.48232C17.9549 7.55172 17.8793 7.61254 17.8021 7.66884C17.9794 8.18027 17.9316 8.7498 17.6595 9.22841C17.6847 9.24522 17.7091 9.2635 17.7328 9.2831L17.8002 9.3456L17.9847 9.53798C19.8515 11.5442 20.4549 14.0022 19.6224 16.2196C19.1921 17.3657 18.4025 18.3827 17.2992 19.203H19.0873L19.1801 19.2079C19.6337 19.2542 19.9877 19.6375 19.9877 20.1034C19.9876 20.5692 19.6337 20.9527 19.1801 20.9989L19.0873 21.0028H13.0385C13.0244 21.0033 13.0104 21.0031 12.9965 21.0028H4.9115C4.41448 21.0028 4.01117 20.6004 4.01111 20.1034C4.01111 19.6064 4.41444 19.203 4.9115 19.203H12.9047C15.7614 18.5471 17.3679 17.1023 17.9369 15.5868C18.4678 14.1726 18.179 12.4782 16.807 10.9188L16.5189 10.6093L16.4574 10.5399C16.4549 10.5368 16.453 10.5333 16.4506 10.5302L12.3011 14.6522C11.6031 15.3454 10.5023 15.3845 9.75818 14.7733L9.61365 14.6425L7.31091 12.3231C6.5717 11.5786 6.57617 10.376 7.32068 9.63662L12.3676 4.62392L12.5121 4.49404C13.0358 4.06988 13.7318 3.96755 14.3402 4.18251C14.3969 4.10597 14.4591 4.03197 14.5287 3.96279L15.0365 3.45791L15.182 3.32802ZM4.83044 12.9335C5.16112 12.6052 5.68305 12.5863 6.03552 12.8759L6.10291 12.9384L9.07361 15.9286L9.13513 15.997C9.42218 16.3514 9.3992 16.8727 9.06873 17.2011C8.7381 17.5294 8.21712 17.5482 7.86462 17.2587L7.79626 17.1972L4.82654 14.2069L4.76501 14.1376C4.47792 13.7831 4.49979 13.2619 4.83044 12.9335ZM13.6693 5.87978L13.6361 5.90126L8.58826 10.914C8.54935 10.9529 8.54943 11.0165 8.58826 11.0556L10.891 13.3739L10.9242 13.3964C10.9602 13.4111 11.0032 13.404 11.0326 13.3749L16.0795 8.3622L16.1019 8.329C16.1117 8.3049 16.1117 8.2779 16.1019 8.2538L16.0804 8.2206L13.7777 5.90224C13.7486 5.87289 13.7054 5.86535 13.6693 5.87978ZM16.3383 4.71376L16.3051 4.73525L15.7972 5.24013C15.7584 5.27904 15.7585 5.34166 15.7972 5.38076L16.6146 6.20498L16.6478 6.22744C16.6838 6.24221 16.7268 6.23487 16.7562 6.20595L17.264 5.70107L17.2865 5.66787C17.2962 5.64382 17.2963 5.61672 17.2865 5.59267L17.265 5.55947L16.4467 4.73623C16.4174 4.70681 16.3744 4.6992 16.3383 4.71376Z",fill:"currentColor"},null,-1)])])}const kme=xt({name:"kimi-microscope",render:yme}),bme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ame(e,t){return k(),E("svg",bme,[...t[0]||(t[0]=[w("path",{d:"M6 12C6 12.8283 5.32834 13.5 4.5 13.5C3.67166 13.5 3 12.8283 3 12C3 11.1717 3.67166 10.5 4.5 10.5C5.32834 10.5 6 11.1717 6 12Z",fill:"currentColor"},null,-1),w("path",{d:"M13.5 12C13.5 12.8283 12.8283 13.5 12 13.5C11.1717 13.5 10.5 12.8283 10.5 12C10.5 11.1717 11.1717 10.5 12 10.5C12.8283 10.5 13.5 11.1717 13.5 12Z",fill:"currentColor"},null,-1),w("path",{d:"M19.5002 13.5C20.3287 13.5 21 12.8287 21 12.0002C21 11.1718 20.3287 10.5 19.5002 10.5C18.6718 10.5 18 11.1718 18 12.0002C18 12.8287 18.6718 13.5 19.5002 13.5Z",fill:"currentColor"},null,-1)])])}const Cme=xt({name:"kimi-more",render:Ame}),wme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xme(e,t){return k(),E("svg",wme,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 12.0993C8.49691 12.0993 8.90016 12.5028 8.90039 12.9997V17.9997C8.90039 19.6013 7.60163 20.9001 6 20.9001C4.39837 20.9001 3.09961 19.6013 3.09961 17.9997C3.09984 16.3982 4.39852 15.0993 6 15.0993C6.38939 15.0993 6.76033 15.1778 7.09961 15.317V12.9997C7.09984 12.5028 7.50309 12.0993 8 12.0993ZM6 16.9001C5.39263 16.9001 4.90062 17.3923 4.90039 17.9997C4.90039 18.6072 5.39249 19.0993 6 19.0993C6.60751 19.0993 7.09961 18.6072 7.09961 17.9997C7.09938 17.3923 6.60737 16.9001 6 16.9001Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.627 3.35611C19.8025 3.12106 20.9001 4.02068 20.9004 5.21939V15.9997C20.9004 17.6013 19.6016 18.9001 18 18.9001C16.3984 18.9001 15.0996 17.6013 15.0996 15.9997C15.0998 14.3982 16.3985 13.0993 18 13.0993C18.3894 13.0993 18.7603 13.1778 19.0996 13.317V9.21939C19.0993 9.15657 19.0421 9.10946 18.9805 9.12173L12.6768 10.3825C12.1894 10.4799 11.7148 10.1637 11.6172 9.67642C11.52 9.18922 11.8361 8.71439 12.3232 8.61685L18.627 7.35611C18.7868 7.32415 18.9452 7.31502 19.0996 7.32291V5.21939C19.0993 5.15657 19.0421 5.10946 18.9805 5.12173L12.6768 6.38248C12.1894 6.47994 11.7148 6.16372 11.6172 5.67642C11.52 5.18922 11.8361 4.71439 12.3232 4.61685L18.627 3.35611ZM18 14.9001C17.3926 14.9001 16.9006 15.3923 16.9004 15.9997C16.9004 16.6072 17.3925 17.0993 18 17.0993C18.6075 17.0993 19.0996 16.6072 19.0996 15.9997C19.0994 15.3923 18.6074 14.9001 18 14.9001Z",fill:"currentColor"},null,-1),w("path",{d:"M7.32422 5.38931C7.61669 4.87032 8.38346 4.87015 8.67578 5.38931L8.73047 5.50845L8.89551 5.95376L8.97949 6.1481C9.19937 6.58817 9.57968 6.93145 10.0459 7.10415L10.4912 7.26919C11.127 7.50461 11.1666 8.36217 10.6104 8.67544L10.4912 8.73013L10.0459 8.89517C9.5799 9.06783 9.19939 9.41141 8.97949 9.85123L8.89551 10.0456L8.73047 10.4909C8.49495 11.1267 7.63737 11.1665 7.32422 10.61L7.26953 10.4909L7.10449 10.0456C6.93172 9.57931 6.58767 9.19898 6.14746 8.97916L5.9541 8.89517L5.50879 8.73013C4.83054 8.47903 4.83061 7.52037 5.50879 7.26919L5.9541 7.10415L6.14746 7.02017C6.58757 6.80032 6.93176 6.41995 7.10449 5.95376L7.26953 5.50845L7.32422 5.38931Z",fill:"currentColor"},null,-1)])])}const Sme=xt({name:"kimi-music",render:xme}),_me={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ime(e,t){return k(),E("svg",_me,[...t[0]||(t[0]=[w("path",{d:"M17.9551 6.32648C17.955 5.82951 17.5517 5.42706 17.0547 5.42706H15.4844C14.9875 5.42717 14.5851 5.82958 14.585 6.32648V17.6732C14.585 18.1701 14.9874 18.5734 15.4844 18.5735H17.0547C17.5518 18.5735 17.9551 18.1702 17.9551 17.6732V6.32648ZM19.7549 17.6732C19.7549 19.1643 18.5459 20.3734 17.0547 20.3734H15.4844C13.9933 20.3732 12.7842 19.1643 12.7842 17.6732V6.32648C12.7843 4.83546 13.9934 3.62639 15.4844 3.62628H17.0547C18.5458 3.62628 19.7548 4.8354 19.7549 6.32648V17.6732Z",fill:"currentColor"},null,-1),w("path",{d:"M9.41571 6.32648C9.41561 5.82951 9.01231 5.42706 8.51532 5.42706H6.94501C6.44811 5.42717 6.0457 5.82958 6.04559 6.32648V17.6732C6.04559 18.1701 6.44804 18.5734 6.94501 18.5735H8.51532C9.01238 18.5735 9.41571 18.1702 9.41571 17.6732V6.32648ZM11.2155 17.6732C11.2155 19.1643 10.0065 20.3734 8.51532 20.3734H6.94501C5.45393 20.3732 4.24481 19.1643 4.24481 17.6732V6.32648C4.24492 4.83546 5.45399 3.62639 6.94501 3.62628H8.51532C10.0064 3.62628 11.2154 4.8354 11.2155 6.32648V17.6732Z",fill:"currentColor"},null,-1)])])}const Mme=xt({name:"kimi-pause",render:Ime}),Eme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tme(e,t){return k(),E("svg",Eme,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.0176 4.89998C17.7305 4.89998 17.4552 5.014 17.2522 5.217L6.35429 16.1149C5.957 16.5122 5.67517 17.01 5.53889 17.5551L5.23691 18.763L6.44486 18.4611C6.98994 18.3248 7.48773 18.0429 7.88502 17.6456L18.783 6.74773C18.8834 6.64728 18.9631 6.52797 19.0176 6.39658C19.072 6.26517 19.1 6.12441 19.1 5.98236C19.1 5.84031 19.072 5.69956 19.0176 5.56815C18.9631 5.43676 18.8834 5.31745 18.783 5.217C18.6825 5.11649 18.5631 5.03676 18.4318 4.98237C18.3005 4.92798 18.1597 4.89998 18.0176 4.89998ZM15.9794 3.94421C16.52 3.40366 17.2531 3.09998 18.0176 3.09998C18.3961 3.09998 18.7709 3.17452 19.1207 3.31938C19.4704 3.46424 19.7881 3.67656 20.0558 3.94421C20.3235 4.21192 20.5357 4.52969 20.6805 4.87932C20.8254 5.22895 20.9 5.60375 20.9 5.98236C20.9 6.36098 20.8254 6.73578 20.6805 7.08541C20.5357 7.43504 20.3235 7.75281 20.0558 8.02052L17.6385 10.4378L9.15781 18.9184C8.52984 19.5464 7.74301 19.9919 6.88142 20.2073L4.21828 20.8731C3.91158 20.9498 3.58714 20.8599 3.3636 20.6364C3.14006 20.4128 3.05019 20.0884 3.12686 19.7817L3.79264 17.1185C4.00803 16.257 4.45351 15.4701 5.0815 14.8421L15.9794 3.94421Z",fill:"currentColor"},null,-1)])])}const Lme=xt({name:"kimi-pencil",render:Tme}),Nme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fme(e,t){return k(),E("svg",Nme,[...t[0]||(t[0]=[w("path",{d:"M7.76251 3.10547C8.25776 3.10552 8.74422 3.23849 9.17072 3.49023L19.533 9.60742C20.8536 10.3869 21.2922 12.0901 20.5174 13.4121C20.2785 13.8195 19.9398 14.1604 19.533 14.4004L9.16974 20.5156C7.84721 21.2958 6.14595 20.8511 5.36993 19.5273C5.1196 19.1003 4.98719 18.6142 4.98712 18.1191V5.88672C4.98716 4.3537 6.2273 3.10547 7.76251 3.10547ZM6.7879 18.1191C6.78797 18.2945 6.8343 18.4664 6.92267 18.6172C7.19638 19.0841 7.79336 19.2377 8.25568 18.9648L18.618 12.8496C18.7607 12.7654 18.8803 12.6458 18.9647 12.502C19.2393 12.0334 19.082 11.4311 18.618 11.1572L8.25568 5.04102C8.1061 4.95273 7.93562 4.9063 7.76251 4.90625C7.22703 4.90625 6.78794 5.34218 6.7879 5.88672V18.1191Z",fill:"currentColor"},null,-1)])])}const Dme=xt({name:"kimi-play",render:Fme}),$me={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Bme(e,t){return k(),E("svg",$me,[...t[0]||(t[0]=[w("path",{d:"M18.36 6.64a9 9 0 1 1-12.73 0",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),w("path",{d:"M12 2v10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])}const zme=xt({name:"kimi-power",render:Bme}),Rme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ome(e,t){return k(),E("svg",Rme,[...t[0]||(t[0]=[w("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1),w("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 3.7998C7.47126 3.7998 3.7998 7.47126 3.7998 12C3.7998 16.5287 7.47126 20.2002 12 20.2002C16.5287 20.2002 20.2002 16.5287 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998Z",fill:"currentColor"},null,-1)])])}const Pme=xt({name:"kimi-question",render:Ome}),jme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hme(e,t){return k(),E("svg",jme,[...t[0]||(t[0]=[w("path",{d:"M12 2C13.1046 2 14 2.89543 14 4C14 4.78019 13.552 5.45353 12.9004 5.7832V7H16.5C18.1569 7 19.5 8.34315 19.5 10V17C19.5 18.6051 18.2394 19.9158 16.6543 19.9961L16.5 20H7.5L7.3457 19.9961C5.81166 19.9184 4.58163 18.6883 4.50391 17.1543L4.5 17V10C4.5 8.34315 5.84315 7 7.5 7H11.0996V5.7832C10.448 5.45353 10 4.78019 10 4C10 2.89543 10.8954 2 12 2ZM7.5 8.7998C6.83726 8.7998 6.2998 9.33726 6.2998 10V17C6.2998 17.6627 6.83726 18.2002 7.5 18.2002H16.5C17.1627 18.2002 17.7002 17.6627 17.7002 17V10C17.7002 9.33726 17.1627 8.7998 16.5 8.7998H7.5ZM3 10.7666C3.49706 10.7666 3.90039 11.1699 3.90039 11.667V15C3.90039 15.4971 3.49706 15.9004 3 15.9004C2.50294 15.9004 2.09961 15.4971 2.09961 15V11.667C2.09961 11.1699 2.50294 10.7666 3 10.7666ZM21 10.7666C21.4971 10.7666 21.9004 11.1699 21.9004 11.667V15C21.9004 15.4971 21.4971 15.9004 21 15.9004C20.5029 15.9004 20.0996 15.4971 20.0996 15V11.667C20.0996 11.1699 20.5029 10.7666 21 10.7666ZM9.5 11.0996C9.99706 11.0996 10.4004 11.5029 10.4004 12V14.5C10.4004 14.9971 9.99706 15.4004 9.5 15.4004C9.00294 15.4004 8.59961 14.9971 8.59961 14.5V12C8.59961 11.5029 9.00294 11.0996 9.5 11.0996ZM14.5 11.0996C14.9971 11.0996 15.4004 11.5029 15.4004 12V14.5C15.4004 14.9971 14.9971 15.4004 14.5 15.4004C14.0029 15.4004 13.5996 14.9971 13.5996 14.5V12C13.5996 11.5029 14.0029 11.0996 14.5 11.0996ZM12 3.5C11.7239 3.5 11.5 3.72386 11.5 4C11.5 4.27614 11.7239 4.5 12 4.5C12.2761 4.5 12.5 4.27614 12.5 4C12.5 3.72386 12.2761 3.5 12 3.5Z",fill:"currentColor"},null,-1)])])}const Wme=xt({name:"kimi-robot",render:Hme}),qme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ume(e,t){return k(),E("svg",qme,[...t[0]||(t[0]=[w("path",{d:"M11.5 3C16.1944 3 20 6.80558 20 11.5C20 13.523 19.2933 15.381 18.1132 16.8404L21.1364 19.8636C21.4879 20.2151 21.4879 20.7849 21.1364 21.1364C20.7849 21.4879 20.2151 21.4879 19.8636 21.1364L16.8404 18.1132C15.381 19.2933 13.523 20 11.5 20C6.80558 20 3 16.1944 3 11.5C3 6.80558 6.80558 3 11.5 3ZM11.5 18.2C15.2003 18.2 18.2 15.2003 18.2 11.5C18.2 7.79969 15.2003 4.8 11.5 4.8C7.79969 4.8 4.8 7.79969 4.8 11.5C4.8 15.2003 7.79969 18.2 11.5 18.2Z",fill:"currentColor"},null,-1)])])}const Kme=xt({name:"kimi-search",render:Ume}),Vme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zme(e,t){return k(),E("svg",Vme,[...t[0]||(t[0]=[w("path",{d:"M16.5364 10.1636C16.8879 10.5151 16.8879 11.0849 16.5364 11.4364C16.1849 11.7879 15.6151 11.7879 15.2636 11.4364L12.9 9.07281V17.1C12.9 17.597 12.4971 18 12 18C11.503 18 11.1 17.597 11.1 17.1V9.07281L8.73641 11.4364C8.38494 11.7879 7.81509 11.7879 7.46362 11.4364C7.11214 11.0849 7.11214 10.5151 7.46362 10.1636L11.3636 6.2636C11.7151 5.91211 12.2849 5.91211 12.6364 6.2636L16.5364 10.1636Z",fill:"currentColor"},null,-1)])])}const Gme=xt({name:"kimi-send",render:Zme}),Qme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Yme(e,t){return k(),E("svg",Qme,[...t[0]||(t[0]=[w("path",{d:"M16.0404 12C16.0404 9.76874 14.2313 7.9596 12.0001 7.9596C9.76883 7.9596 7.95972 9.76874 7.95972 12C7.95972 14.2313 9.76883 16.0404 12.0001 16.0404C14.2313 16.0404 16.0404 14.2313 16.0404 12ZM14.2222 12C14.2222 13.2271 13.2271 14.2222 12 14.2222C10.7729 14.2222 9.77783 13.2271 9.77783 12C9.77783 10.7729 10.7729 9.77778 12 9.77778C13.2271 9.77778 14.2222 10.7729 14.2222 12Z",fill:"currentColor"},null,-1),w("path",{d:"M9.91145 21.8009C9.29001 21.6797 8.76914 21.2612 8.50632 20.6922L8.07372 19.7556C7.88838 19.3544 7.43553 19.1048 6.95371 19.1549L5.89572 19.2647C5.2733 19.3293 4.64823 19.114 4.22298 18.6611C3.74343 18.1504 3.32454 17.6037 2.97033 17.0181C2.61571 16.4318 2.32839 15.8106 2.10407 15.1566C1.89769 14.5549 2.02148 13.8954 2.4089 13.3902L3.0376 12.5704C3.30043 12.2277 3.30042 11.7722 3.03758 11.4295L2.40413 10.6035C2.01474 10.0958 1.891 9.43198 2.10208 8.82826C2.55037 7.54612 3.27017 6.35997 4.22 5.34259C4.64518 4.8872 5.27275 4.67067 5.89701 4.73544L6.95383 4.84514C7.43561 4.89515 7.88844 4.6456 8.07377 4.24441L8.50266 3.31593C8.76494 2.74818 9.28448 2.33019 9.90423 2.20761C11.2916 1.9332 12.7148 1.93127 14.0885 2.19913C14.7099 2.32029 15.2308 2.73881 15.4937 3.3078L15.9263 4.24441C16.1116 4.6456 16.5644 4.89514 17.0462 4.84514L18.1043 4.73532C18.7267 4.67072 19.3518 4.88603 19.777 5.33886C20.2566 5.84953 20.6755 6.3963 21.0297 6.98193C21.3843 7.56823 21.6716 8.18942 21.8959 8.84339C22.1023 9.44509 21.9785 10.1046 21.5911 10.6098L20.9624 11.4295C20.6996 11.7722 20.6996 12.2278 20.9624 12.5705L21.5959 13.3964C21.9853 13.9042 22.109 14.568 21.8979 15.1717C21.4497 16.4538 20.7299 17.6399 19.7801 18.6573C19.3549 19.1128 18.7273 19.3294 18.103 19.2646L17.0462 19.1549C16.5645 19.1049 16.1116 19.3544 15.9263 19.7556L15.4974 20.6841C15.2351 21.2518 14.7156 21.6698 14.0958 21.7924C12.7083 22.0668 11.2852 22.0687 9.91145 21.8009ZM13.7432 20.0088C13.7844 20.0006 13.8259 19.9673 13.847 19.9216L14.2758 18.9931C14.7915 17.8768 15.9886 17.2171 17.2341 17.3464L18.2909 17.4561C18.3649 17.4638 18.4272 17.4423 18.4512 17.4166C19.2296 16.5828 19.8171 15.6146 20.1817 14.5716C20.1845 14.5636 20.1796 14.5373 20.1532 14.5029L19.5198 13.677C18.7564 12.6815 18.7564 11.3185 19.5198 10.323L20.1485 9.5033C20.1746 9.46927 20.1795 9.4429 20.1762 9.43327C19.9932 8.89965 19.7603 8.39623 19.4741 7.92293C19.1873 7.4489 18.846 7.00333 18.4517 6.58351C18.4272 6.55739 18.3656 6.53616 18.2921 6.54378L17.234 6.65361C15.9886 6.78287 14.7915 6.12317 14.2758 5.00689L13.8432 4.07027C13.822 4.02448 13.7811 3.9916 13.7406 3.98371C12.5983 3.76097 11.4132 3.76258 10.2571 3.99124C10.2158 3.99941 10.1744 4.03271 10.1533 4.07842L9.72441 5.00689C9.20875 6.12317 8.01164 6.7829 6.76619 6.6536L5.70942 6.54391C5.63535 6.53623 5.573 6.55774 5.54905 6.5834C4.77067 7.41713 4.18312 8.38534 3.81845 9.42835C3.81564 9.43637 3.82054 9.46265 3.84693 9.49706L4.48038 10.323C5.24381 11.3185 5.24383 12.6815 4.48041 13.6769L3.85171 14.4967C3.82561 14.5307 3.82066 14.5571 3.82396 14.5667C4.00701 15.1004 4.23986 15.6038 4.52613 16.0771C4.81284 16.5511 5.15421 16.9967 5.54845 17.4165C5.57298 17.4426 5.63461 17.4638 5.70811 17.4562L6.76608 17.3464C8.01157 17.2171 9.20871 17.8768 9.72438 18.9932L10.157 19.9297C10.1781 19.9755 10.2191 20.0084 10.2595 20.0163C11.4018 20.239 12.587 20.2374 13.7432 20.0088Z",fill:"currentColor"},null,-1)])])}const Jme=xt({name:"kimi-setting",render:Yme}),Xme={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function e2e(e,t){return k(),E("svg",Xme,[...t[0]||(t[0]=[w("path",{d:"M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7Z",fill:"currentColor"},null,-1),w("path",{d:"M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z",fill:"currentColor"},null,-1),w("path",{d:"M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z",fill:"currentColor"},null,-1)])])}const t2e=xt({name:"kimi-shield-question",render:e2e}),n2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function i2e(e,t){return k(),E("svg",n2e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.90005 12C2.90005 11.503 3.303 11.1 3.80005 11.1H12.2939L9.38588 8.19197C9.03441 7.8405 9.03441 7.27065 9.38588 6.91918C9.73735 6.56771 10.3072 6.56771 10.6587 6.91918L15.1031 11.3636C15.2719 11.5324 15.3667 11.7613 15.3667 12C15.3667 12.2387 15.2719 12.4676 15.1031 12.6364L10.6587 17.0809C10.3072 17.4323 9.73735 17.4323 9.38588 17.0809C9.03441 16.7294 9.03441 16.1595 9.38588 15.8081L12.2939 12.9H3.80005C3.303 12.9 2.90005 12.4971 2.90005 12ZM13.5874 20C13.5874 19.503 13.9904 19.1 14.4874 19.1H18.043C18.2758 19.1 18.4991 19.0075 18.6637 18.8429C18.8283 18.6783 18.9208 18.455 18.9208 18.2222V5.7778C18.9208 5.545 18.8283 5.32174 18.6637 5.15712C18.499 4.9925 18.2758 4.90002 18.043 4.90002H14.4874C13.9904 4.90002 13.5874 4.49708 13.5874 4.00002C13.5874 3.50297 13.9904 3.10003 14.4874 3.10003H18.043C18.7532 3.10003 19.4343 3.38215 19.9365 3.88433C20.4386 4.38651 20.7208 5.06761 20.7208 5.7778V18.2222C20.7208 18.9324 20.4386 19.6135 19.9365 20.1157C19.4343 20.6179 18.7532 20.9 18.043 20.9H14.4874C13.9904 20.9 13.5874 20.4971 13.5874 20Z",fill:"currentColor"},null,-1)])])}const s2e=xt({name:"kimi-sign-in",render:i2e}),o2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function r2e(e,t){return k(),E("svg",o2e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.6364 11.3636C20.9879 11.7151 20.9879 12.2849 20.6364 12.6364L16.1919 17.0808C15.8405 17.4323 15.2706 17.4323 14.9192 17.0808C14.5677 16.7293 14.5677 16.1595 14.9192 15.808L17.8272 12.9H9.33333C8.83627 12.9 8.43333 12.497 8.43333 12C8.43333 11.5029 8.83627 11.1 9.33333 11.1H17.8272L14.9192 8.19193C14.5677 7.84046 14.5677 7.27061 14.9192 6.91914C15.2706 6.56766 15.8405 6.56766 16.1919 6.91914L20.6364 11.3636ZM10.2333 3.99998C10.2333 4.49703 9.83038 4.89998 9.33333 4.89998H5.77777C5.54497 4.89998 5.3217 4.99246 5.15709 5.15707C4.99247 5.32169 4.89999 5.54495 4.89999 5.77775V18.2222C4.89999 18.455 4.99247 18.6783 5.15709 18.8429C5.32171 19.0075 5.54497 19.1 5.77777 19.1H9.33333C9.83038 19.1 10.2333 19.5029 10.2333 20C10.2333 20.497 9.83038 20.9 9.33333 20.9H5.77777C5.06758 20.9 4.38648 20.6179 3.8843 20.1157C3.38212 19.6135 3.09999 18.9324 3.09999 18.2222V5.77775C3.09999 5.06756 3.38212 4.38646 3.8843 3.88428C4.38648 3.3821 5.06758 3.09998 5.77777 3.09998H9.33333C9.83038 3.09998 10.2333 3.50292 10.2333 3.99998Z",fill:"currentColor"},null,-1)])])}const l2e=xt({name:"kimi-sign-out",render:r2e}),a2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function u2e(e,t){return k(),E("svg",a2e,[...t[0]||(t[0]=[mc('<path d="M4 6H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M18.0 6H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="16" cy="6" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle><path d="M4 12H6.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M10.5 12H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="8.5" cy="12" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle><path d="M4 18H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><path d="M18.0 18H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path><circle cx="16" cy="18" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"></circle>',9)])])}const c2e=xt({name:"kimi-sliders",render:u2e}),d2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function f2e(e,t){return k(),E("svg",d2e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.78027 8.90405C7.5 9.45411 7.5 10.1742 7.5 11.6144V12.3856C7.5 13.8258 7.5 14.5459 7.78027 15.096C8.02681 15.5798 8.42019 15.9732 8.90405 16.2197C9.45411 16.5 10.1742 16.5 11.6144 16.5H12.3856C13.8258 16.5 14.5459 16.5 15.096 16.2197C15.5798 15.9732 15.9732 15.5798 16.2197 15.096C16.5 14.5459 16.5 13.8258 16.5 12.3856V11.6144C16.5 10.1742 16.5 9.45411 16.2197 8.90405C15.9732 8.42019 15.5798 8.02681 15.096 7.78027C14.5459 7.5 13.8258 7.5 12.3856 7.5H11.6144C10.1742 7.5 9.45411 7.5 8.90405 7.78027C8.42019 8.02681 8.02681 8.42019 7.78027 8.90405Z",fill:"currentColor"},null,-1)])])}const h2e=xt({name:"kimi-stop",render:f2e}),p2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function g2e(e,t){return k(),E("svg",p2e,[...t[0]||(t[0]=[w("path",{d:"M7.01562 3.41459C7.4446 3.16449 7.9954 3.30924 8.24609 3.73784C8.49645 4.167 8.35189 4.71868 7.92285 4.96928C5.51497 6.37506 3.90054 8.98498 3.90039 11.9703C3.90076 16.4435 7.52672 20.0699 12 20.0699C16.4733 20.0699 20.0992 16.4435 20.0996 11.9703C20.0996 11.2291 20 10.5116 19.8145 9.83159C19.6838 9.35222 19.967 8.85702 20.4463 8.72612C20.9256 8.59541 21.4207 8.87778 21.5518 9.35698C21.7792 10.1901 21.9004 11.0674 21.9004 11.9703C21.9 17.4376 17.4674 21.8697 12 21.8697C6.53261 21.8697 2.09998 17.4376 2.09961 11.9703C2.09976 8.31904 4.07782 5.12972 7.01562 3.41459ZM8.39258 8.24077C8.75015 7.89591 9.3199 7.90591 9.66504 8.26323C10.01 8.62076 9.99985 9.19051 9.64258 9.53569C9.00203 10.1541 8.60558 11.02 8.60547 11.979C8.60584 13.8536 10.1253 15.3736 12 15.3736C13.8746 15.3735 15.3942 13.8536 15.3945 11.979C15.3945 11.6847 15.3577 11.3989 15.2881 11.1285C15.1646 10.6474 15.4536 10.1568 15.9346 10.0328C16.4158 9.9089 16.9071 10.1991 17.0312 10.6802C17.1383 11.096 17.1943 11.5321 17.1943 11.979C17.194 14.8477 14.8688 17.1733 12 17.1734C9.1312 17.1734 6.80506 14.8478 6.80469 11.979C6.8048 10.5117 7.41519 9.18431 8.39258 8.24077ZM11.5459 1.12651C11.8216 0.965605 12.1631 0.963306 12.4414 1.11967L19.1953 4.91752C19.4859 5.08108 19.662 5.39277 19.6533 5.72612C19.6443 6.05972 19.4515 6.36154 19.1523 6.50932L12.9004 9.5933V12.2583C12.9004 12.7554 12.4971 13.1587 12 13.1587C11.5029 13.1587 11.0996 12.7554 11.0996 12.2583V1.90385C11.0999 1.58444 11.2702 1.2878 11.5459 1.12651ZM12.9004 7.58549L16.8252 5.64897L12.9004 3.44194V7.58549Z",fill:"currentColor"},null,-1)])])}const m2e=xt({name:"kimi-target",render:g2e}),v2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function y2e(e,t){return k(),E("svg",v2e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.9893 6.60743C20.5897 6.60757 21.8877 7.8926 21.8877 9.47736C21.8877 10.7416 21.0607 11.8129 19.9141 12.1955V14.257C19.914 15.8428 18.6152 17.1288 17.0137 17.1289H12.8438V20.1381C12.8437 20.6301 12.4412 21.0293 11.9443 21.0296C11.4473 21.0296 11.044 20.6302 11.0439 20.1381V16.4356C11.0441 15.8343 11.5363 15.3461 12.1436 15.3458H17.0137C17.6211 15.3457 18.1133 14.8585 18.1133 14.257V12.2129C16.9408 11.8451 16.0909 10.7598 16.0908 9.47736C16.0908 7.89251 17.3887 6.60743 18.9893 6.60743ZM18.9893 8.38953C18.3828 8.38953 17.8906 8.87684 17.8906 9.47736C17.8907 10.0778 18.3828 10.5642 18.9893 10.5642C19.5956 10.5641 20.0869 10.0777 20.0869 9.47736C20.0869 8.87693 19.5956 8.38967 18.9893 8.38953Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.89844 6.60743C6.49899 6.60747 7.79688 7.89254 7.79688 9.47736C7.79684 10.7388 6.97371 11.8078 5.83105 12.1926V14.4021C5.83105 15.0036 6.32315 15.4918 6.93066 15.4918H8.37109C8.86789 15.492 9.27038 15.8905 9.27051 16.3824C9.27051 16.8744 8.86797 17.2737 8.37109 17.2739H6.93066C5.32904 17.2739 4.03027 15.9879 4.03027 14.4021V12.2158C2.85382 11.8504 2.00004 10.7627 2 9.47736C2 7.89251 3.29784 6.60743 4.89844 6.60743ZM4.89844 8.38953C4.29196 8.38953 3.7998 8.87684 3.7998 9.47736C3.79985 10.0778 4.29198 10.5642 4.89844 10.5642C5.50485 10.5642 5.99605 10.0778 5.99609 9.47736C5.99609 8.87687 5.50488 8.38958 4.89844 8.38953Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.9434 2.9707C13.5439 2.97075 14.8418 4.25581 14.8418 5.84063C14.8418 7.11413 14.0035 8.1923 12.8438 8.56745V13.0135C12.8436 13.5056 12.4403 13.9041 11.9434 13.9041C11.4466 13.9039 11.0431 13.5055 11.043 13.0135V8.56745C9.8836 8.19209 9.04496 7.11387 9.04492 5.84063C9.04492 4.25592 10.343 2.97093 11.9434 2.9707ZM11.9434 4.75281C11.3371 4.75303 10.8447 5.24026 10.8447 5.84063C10.8448 6.44097 11.3371 6.92726 11.9434 6.92749C12.5498 6.92745 13.041 6.44108 13.041 5.84063C13.041 5.24014 12.5498 4.75285 11.9434 4.75281Z",fill:"currentColor"},null,-1)])])}const k2e=xt({name:"kimi-task",render:y2e}),b2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function A2e(e,t){return k(),E("svg",b2e,[...t[0]||(t[0]=[w("path",{d:"M16.5293 15.0596C16.9496 15.1021 17.2772 15.4572 17.2773 15.8887C17.2773 16.3202 16.9497 16.6753 16.5293 16.7178L16.4443 16.7217H12C11.5399 16.7216 11.167 16.3488 11.167 15.8887C11.1671 15.4286 11.54 15.0558 12 15.0557H16.4443L16.5293 15.0596Z",fill:"currentColor"},null,-1),w("path",{d:"M6.96582 7.52246C7.27077 7.21751 7.75375 7.1983 8.08105 7.46484L8.14453 7.52246L10.8232 10.2002C11.5102 10.8872 11.5102 12.0014 10.8232 12.6885L8.14453 15.3672L8.08105 15.4248C7.75377 15.6913 7.27075 15.6721 6.96582 15.3672C6.66114 15.0621 6.64234 14.5791 6.90918 14.252L6.96582 14.1885L9.64453 11.5098C9.68057 11.4736 9.68062 11.415 9.64453 11.3789L6.96582 8.7002C6.64116 8.37488 6.6411 7.84774 6.96582 7.52246Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17 3.09961C19.1539 3.09966 20.9004 4.84612 20.9004 7V17C20.9004 19.1539 19.1539 20.9003 17 20.9004H7C4.84609 20.9004 3.09961 19.1539 3.09961 17V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H17ZM7 4.90039C5.8402 4.90039 4.90039 5.8402 4.90039 7V17C4.90039 18.1598 5.8402 19.0996 7 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V7C19.0996 5.84024 18.1598 4.90044 17 4.90039H7Z",fill:"currentColor"},null,-1)])])}const C2e=xt({name:"kimi-terminal",render:A2e}),w2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function x2e(e,t){return k(),E("svg",w2e,[...t[0]||(t[0]=[w("path",{d:"M16.9971 3.90597C15.9799 2.99725 14.7342 2.38312 13.394 2.12966C12.0538 1.8762 10.6699 1.99301 9.39111 2.46751C8.11236 2.94202 6.98721 3.75626 6.13676 4.82261C5.2863 5.88896 4.74274 7.16703 4.56457 8.5193C4.40455 9.70501 4.53253 10.9118 4.93767 12.0376C5.34281 13.1634 6.01318 14.175 6.89207 14.9868C7.43557 15.4634 7.87413 16.0477 8.17997 16.7027C8.48581 17.3577 8.65224 18.0691 8.66873 18.7918V18.926C8.66962 19.7412 8.99387 20.5229 9.57035 21.0993C10.1468 21.6758 10.9285 22.0001 11.7437 22.001H12.2604C13.0757 22.0001 13.8573 21.6758 14.4338 21.0993C15.0103 20.5229 15.3345 19.7412 15.3354 18.926V18.4685C15.3479 17.8297 15.4982 17.2011 15.7761 16.6258C16.0539 16.0505 16.4528 15.542 16.9454 15.1351C17.7442 14.4355 18.3853 13.5741 18.826 12.608C19.2668 11.642 19.4973 10.5932 19.5022 9.53136C19.5071 8.46948 19.2863 7.41869 18.8544 6.4486C18.4225 5.4785 17.7894 4.61125 16.9971 3.9043V3.90597ZM12.2604 20.3343H11.7437C11.3704 20.3339 11.0124 20.1853 10.7484 19.9213C10.4844 19.6573 10.3358 19.2993 10.3354 18.926C10.3354 18.926 10.3296 18.7093 10.3287 18.6676H13.6687V18.926C13.6683 19.2993 13.5198 19.6573 13.2558 19.9213C12.9917 20.1853 12.6338 20.3339 12.2604 20.3343ZM15.8437 13.8835C14.8949 14.7064 14.2097 15.7908 13.8737 17.001H12.8354V11.0143C13.3212 10.8426 13.742 10.5249 14.0403 10.1049C14.3387 9.68482 14.4999 9.18285 14.5021 8.66763C14.5021 8.44662 14.4143 8.23466 14.258 8.07838C14.1017 7.9221 13.8897 7.8343 13.6687 7.8343C13.4477 7.8343 13.2358 7.9221 13.0795 8.07838C12.9232 8.23466 12.8354 8.44662 12.8354 8.66763C12.8354 8.88865 12.7476 9.10061 12.5913 9.25689C12.435 9.41317 12.2231 9.50097 12.0021 9.50097C11.7811 9.50097 11.5691 9.41317 11.4128 9.25689C11.2565 9.10061 11.1687 8.88865 11.1687 8.66763C11.1687 8.44662 11.0809 8.23466 10.9247 8.07838C10.7684 7.9221 10.5564 7.8343 10.3354 7.8343C10.1144 7.8343 9.90242 7.9221 9.74614 8.07838C9.58986 8.23466 9.50207 8.44662 9.50207 8.66763C9.5042 9.18285 9.66547 9.68482 9.96381 10.1049C10.2621 10.5249 10.683 10.8426 11.1687 11.0143V17.001H10.0671C9.69123 15.7586 8.98633 14.6411 8.02707 13.7668C7.21286 13.0081 6.63267 12.0324 6.35496 10.9547C6.07725 9.87703 6.1136 8.7424 6.45974 7.68471C6.80588 6.62702 7.44735 5.69042 8.30846 4.98543C9.16956 4.28045 10.2144 3.83649 11.3196 3.70597C11.5487 3.68039 11.779 3.66759 12.0096 3.66763C13.4409 3.66338 14.8226 4.19149 15.8862 5.1493C16.5026 5.69896 16.9952 6.37337 17.3312 7.12782C17.6672 7.88227 17.839 8.69952 17.8352 9.5254C17.8314 10.3513 17.6522 11.1669 17.3092 11.9183C16.9663 12.6696 16.4677 13.3395 15.8462 13.8835H15.8437Z",fill:"currentColor"},null,-1)])])}const S2e=xt({name:"kimi-thinking",render:x2e}),_2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function I2e(e,t){return k(),E("svg",_2e,[...t[0]||(t[0]=[mc('<path d="M9.28994 4.92561C9.6436 4.57634 9.64716 4.0065 9.29789 3.65284C8.94862 3.29918 8.37878 3.29563 8.02512 3.6449L5.91339 5.73041L5.16642 4.95888C4.82067 4.60177 4.2509 4.59256 3.89379 4.9383C3.53668 5.28404 3.52747 5.85382 3.87321 6.21093L5.25245 7.63551C5.41956 7.80811 5.64874 7.90674 5.88897 7.90943C6.1292 7.91213 6.36053 7.81866 6.53146 7.64985L9.28994 4.92561Z" fill="currentColor"></path><path d="M12 5.10022C11.503 5.10022 11.1 5.50316 11.1 6.00022C11.1 6.49728 11.503 6.90022 12 6.90022L19.9965 6.90022C20.4935 6.90022 20.8965 6.49728 20.8965 6.00022C20.8965 5.50316 20.4935 5.10022 19.9965 5.10022L12 5.10022Z" fill="currentColor"></path><path d="M12 11.1002C11.503 11.1002 11.1 11.5032 11.1 12.0002C11.1 12.4973 11.503 12.9002 12 12.9002H19.9965C20.4935 12.9002 20.8965 12.4973 20.8965 12.0002C20.8965 11.5032 20.4935 11.1002 19.9965 11.1002L12 11.1002Z" fill="currentColor"></path><path d="M11.1 18.0002C11.1 17.5032 11.503 17.1002 12 17.1002L19.9965 17.1002C20.4935 17.1002 20.8965 17.5032 20.8965 18.0002C20.8965 18.4973 20.4935 18.9002 19.9965 18.9002H12C11.503 18.9002 11.1 18.4973 11.1 18.0002Z" fill="currentColor"></path><path d="M9.29789 9.77064C9.64716 10.1243 9.6436 10.6941 9.28994 11.0434L6.53146 13.7676C6.36053 13.9365 6.1292 14.0299 5.88897 14.0272C5.64874 14.0245 5.41956 13.9259 5.25245 13.7533L3.87321 12.3287C3.52747 11.9716 3.53668 11.4018 3.89379 11.0561C4.2509 10.7104 4.82067 10.7196 5.16642 11.0767L5.91339 11.8482L8.02512 9.76269C8.37878 9.41342 8.94862 9.41698 9.29789 9.77064Z" fill="currentColor"></path><path d="M9.29789 15.7436C9.64716 16.0973 9.6436 16.6671 9.28994 17.0164L6.53146 19.7406C6.36053 19.9094 6.1292 20.0029 5.88897 20.0002C5.64874 19.9975 5.41956 19.8989 5.25245 19.7263L3.87321 18.3017C3.52747 17.9446 3.53668 17.3748 3.89379 17.0291C4.2509 16.6833 4.82067 16.6926 5.16642 17.0497L5.91339 17.8212L8.02512 15.7357C8.37878 15.3864 8.94862 15.39 9.29789 15.7436Z" fill="currentColor"></path>',6)])])}const M2e=xt({name:"kimi-todo",render:I2e}),E2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function T2e(e,t){return k(),E("svg",E2e,[...t[0]||(t[0]=[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.09752 2.19507C8.5421 1.97278 9.08271 2.15298 9.305 2.59756L10.0562 4.10005H13.5C13.9971 4.10005 14.4 4.50299 14.4 5.00005C14.4 5.49711 13.9971 5.90005 13.5 5.90005H12.3106C12.2556 6.2319 12.1667 6.64073 12.0226 7.0987C11.7254 8.04355 11.191 9.20402 10.2334 10.3239C11.4166 11.196 12.5606 11.7524 13.4512 12.0987C13.978 12.3036 14.4136 12.434 14.7124 12.5122L14.7348 12.5181L15.695 10.5976C15.8475 10.2927 16.1591 10.1 16.5 10.1C16.8409 10.1 17.1525 10.2927 17.305 10.5976L20.7969 17.5814L20.8044 17.5959L20.8137 17.615L21.805 19.5976C22.0273 20.0421 21.8471 20.5827 21.4025 20.805C20.9579 21.0273 20.4173 20.8471 20.195 20.4025L19.4438 18.9H13.5562L12.805 20.4025C12.5827 20.8471 12.0421 21.0273 11.5975 20.805C11.1529 20.5827 10.9727 20.0421 11.195 19.5976L12.1863 17.615C12.1917 17.6036 12.1973 17.5924 12.2031 17.5814L13.9146 14.1583C13.6034 14.0667 13.2256 13.9423 12.7988 13.7764C11.7294 13.3605 10.3442 12.6802 8.92538 11.5924C7.79753 12.5167 6.69473 13.0764 5.83285 13.4112C5.33899 13.603 4.92286 13.7216 4.62401 13.7931C4.47449 13.8288 4.35399 13.8529 4.26741 13.8684C4.2241 13.8762 4.18924 13.8818 4.16343 13.8858L4.13156 13.8904L4.12084 13.8919L4.11682 13.8924L4.11514 13.8927C4.11514 13.8927 4.11368 13.8928 4.00001 13L4.11368 13.8928C3.62061 13.9556 3.17 13.6068 3.10722 13.1137C3.0446 12.6219 3.39148 12.1723 3.88256 12.1077L3.94947 12.0967C4.00428 12.0869 4.09114 12.0698 4.20543 12.0424C4.43422 11.9877 4.77156 11.8924 5.18106 11.7334C5.84103 11.477 6.68484 11.0564 7.56458 10.3753C7.15054 9.93496 6.78945 9.48388 6.50421 9.10102C6.26672 8.78224 6.07517 8.50172 5.94227 8.29973C5.87571 8.19858 5.82359 8.11671 5.78748 8.05909C5.76942 8.03027 5.75535 8.00749 5.74545 7.99135L5.73377 7.9722L5.73032 7.96651L5.72864 7.96371C5.71133 7.9349 5.69582 7.9055 5.68208 7.87566C5.49265 7.46416 5.6393 6.96717 6.03659 6.72853C6.09037 6.69623 6.14617 6.6702 6.20315 6.65023C6.59739 6.51205 7.04758 6.66421 7.27129 7.03623L7.27266 7.0385L7.28001 7.05054C7.28695 7.06186 7.29793 7.07964 7.31274 7.10328C7.34239 7.15059 7.38731 7.2212 7.44595 7.31032C7.56343 7.48886 7.73484 7.73997 7.94765 8.02562C8.21085 8.37889 8.52772 8.77187 8.8756 9.14201C9.64226 8.24147 10.0681 7.3133 10.3056 6.55854C10.381 6.3186 10.4372 6.09683 10.4791 5.90005H9.51951C9.50696 5.90031 9.49442 5.90031 9.48191 5.90005H4.00001C3.50296 5.90005 3.10001 5.49711 3.10001 5.00005C3.10001 4.50299 3.50296 4.10005 4.00001 4.10005H8.04378L7.69503 3.40254C7.67314 3.35877 7.65516 3.31407 7.64094 3.26883C7.51078 2.8546 7.69671 2.39547 8.09752 2.19507ZM16.5 13.0125L18.5438 17.1H14.4562L16.5 13.0125Z",fill:"currentColor"},null,-1),w("path",{d:"M15.1 4.00007C15.1 3.50301 15.5029 3.10007 16 3.10007H18C19.6016 3.10007 20.9 4.39844 20.9 6.00007V8.00007C20.9 8.49712 20.497 8.90007 20 8.90007C19.5029 8.90007 19.1 8.49712 19.1 8.00007V6.00007C19.1 5.39255 18.6075 4.90007 18 4.90007H16C15.5029 4.90007 15.1 4.49712 15.1 4.00007Z",fill:"currentColor"},null,-1),w("path",{d:"M3.99998 15.1001C4.49703 15.1001 4.89998 15.503 4.89998 16.0001V18.0001C4.89998 18.6076 5.39246 19.1001 5.99998 19.1001H7.99998C8.49703 19.1001 8.89998 19.503 8.89998 20.0001C8.89998 20.4971 8.49703 20.9001 7.99998 20.9001H5.99998C4.39835 20.9001 3.09998 19.6017 3.09998 18.0001V16.0001C3.09998 15.503 3.50292 15.1001 3.99998 15.1001Z",fill:"currentColor"},null,-1)])])}const L2e=xt({name:"kimi-translate",render:T2e}),N2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function F2e(e,t){return k(),E("svg",N2e,[...t[0]||(t[0]=[w("path",{d:"M8.10001 3C8.10001 2.50294 8.50295 2.1 9.00001 2.1H15C15.4971 2.1 15.9 2.50294 15.9 3C15.9 3.49706 15.4971 3.9 15 3.9H9.00001C8.50295 3.9 8.10001 3.49706 8.10001 3Z",fill:"currentColor"},null,-1),w("path",{d:"M10 15.9C9.50295 15.9 9.10001 15.4971 9.10001 15L9.10001 10C9.10001 9.50294 9.50295 9.1 10 9.1C10.4971 9.1 10.9 9.50294 10.9 10L10.9 15C10.9 15.4971 10.4971 15.9 10 15.9Z",fill:"currentColor"},null,-1),w("path",{d:"M13.1 15C13.1 15.4971 13.5029 15.9 14 15.9C14.4971 15.9 14.9 15.4971 14.9 15L14.9 10C14.9 9.50294 14.4971 9.1 14 9.1C13.5029 9.1 13.1 9.50294 13.1 10V15Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.10001 6C2.10001 5.50294 2.50295 5.1 3.00001 5.1H4.99152C4.99785 5.09993 5.00417 5.09993 5.01048 5.1H18.9895C18.9958 5.09993 19.0021 5.09993 19.0085 5.1H21C21.4971 5.1 21.9 5.50294 21.9 6C21.9 6.49706 21.4971 6.9 21 6.9H19.8281L18.8448 18.6993C18.7412 19.9432 17.7013 20.9 16.4531 20.9H7.54686C6.29865 20.9 5.25881 19.9432 5.15515 18.6993L4.17188 6.9H3.00001C2.50295 6.9 2.10001 6.49706 2.10001 6ZM5.97811 6.9L18.0219 6.9L17.0511 18.5498C17.0251 18.8608 16.7652 19.1 16.4531 19.1H7.54686C7.23481 19.1 6.97485 18.8608 6.94893 18.5498L5.97811 6.9Z",fill:"currentColor"},null,-1)])])}const D2e=xt({name:"kimi-trash",render:F2e}),$2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function B2e(e,t){return k(),E("svg",$2e,[...t[0]||(t[0]=[w("path",{d:"M7.36336 3.3634C7.71483 3.01192 8.28533 3.01192 8.6368 3.3634C8.98817 3.71488 8.98824 4.2854 8.6368 4.63683L6.17391 7.09972H15.0001C18.2585 7.09977 20.9005 9.74166 20.9005 13.0001C20.9004 16.2585 18.2585 18.9005 15.0001 18.9005H7.00008C6.50307 18.9005 6.09976 18.4971 6.09969 18.0001C6.09969 17.5031 6.50302 17.0997 7.00008 17.0997H15.0001C17.2644 17.0997 19.0996 15.2644 19.0997 13.0001C19.0997 10.7358 17.2644 8.90055 15.0001 8.90051H6.17391L8.6368 11.3634L8.69832 11.4318C8.98668 11.7853 8.96632 12.3073 8.6368 12.6368C8.30728 12.9663 7.78521 12.9867 7.43172 12.6984L7.36336 12.6368L3.36336 8.63683C3.33098 8.60445 3.30286 8.56908 3.27645 8.53332C3.25597 8.50559 3.23607 8.47741 3.21883 8.44738C3.20492 8.42311 3.19221 8.39837 3.18074 8.37316C3.1764 8.36365 3.17109 8.35453 3.16707 8.34484C3.1627 8.33427 3.1593 8.32331 3.15535 8.31261C3.12946 8.24274 3.11237 8.16872 3.10457 8.09191C3.09258 7.97426 3.10262 7.85446 3.1368 7.74035C3.14281 7.72035 3.15094 7.70114 3.15828 7.68176C3.16165 7.67283 3.16341 7.66325 3.16707 7.65441C3.17216 7.64216 3.17806 7.63025 3.18367 7.61828C3.19055 7.60356 3.19744 7.58874 3.20516 7.57433C3.24709 7.49624 3.3012 7.42556 3.36336 7.3634L7.36336 3.3634Z",fill:"currentColor"},null,-1)])])}const z2e=xt({name:"kimi-undo",render:B2e}),R2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function O2e(e,t){return k(),E("svg",R2e,[...t[0]||(t[0]=[w("path",{d:"M11.9997 12.8779C16.0197 12.878 19.4393 15.3848 20.7048 18.8828C21.0812 19.9234 20.2782 20.8962 19.2038 21.0137L18.9861 21.0264H5.0134L4.79562 21.0137C3.7213 20.8961 2.91743 19.9233 3.29367 18.8828C4.55905 15.3847 7.9797 12.8781 11.9997 12.8779ZM11.9997 14.6777C8.84467 14.6779 6.17462 16.5794 5.09152 19.2256H18.9079C17.8248 16.5793 15.1549 14.6778 11.9997 14.6777ZM12.2312 3.00586C14.6088 3.1264 16.4997 5.09239 16.4997 7.5L16.4939 7.73145C16.3734 10.1091 14.4073 11.9999 11.9997 12C9.59225 11.9998 7.62604 10.109 7.50558 7.73145L7.49973 7.5C7.49973 5.01485 9.51462 3.00021 11.9997 3L12.2312 3.00586ZM11.9997 4.7998C10.5087 4.80001 9.29953 6.00896 9.29953 7.5C9.29953 8.99104 10.5087 10.2 11.9997 10.2002C13.4908 10.2001 14.6999 8.99112 14.6999 7.5C14.6999 6.00888 13.4908 4.79989 11.9997 4.7998Z",fill:"currentColor"},null,-1)])])}const P2e=xt({name:"kimi-user",render:O2e}),j2e={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function H2e(e,t){return k(),E("svg",j2e,[...t[0]||(t[0]=[w("path",{d:"M11.9996 7C11.5026 7 11.0996 7.36985 11.0996 7.82609V14.1739C11.0996 14.6301 11.5026 15 11.9996 15C12.4967 15 12.8996 14.6301 12.8996 14.1739V7.82609C12.8996 7.36985 12.4967 7 11.9996 7Z",fill:"currentColor"},null,-1),w("path",{d:"M12.8996 17.1006C12.8996 17.5974 12.4968 18.001 11.9992 18.001C11.5024 18.001 11.0996 17.5974 11.0996 17.1006C11.0996 16.6038 11.5024 16.2002 11.9992 16.2002C12.4968 16.2002 12.8996 16.6038 12.8996 17.1006Z",fill:"currentColor"},null,-1),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.5108 3.5501C13.3946 1.61676 10.6041 1.61676 9.48786 3.5501L1.69363 17.0501C0.577423 18.9834 1.97269 21.4001 4.20511 21.4001H19.7936C22.026 21.4001 23.4212 18.9834 22.305 17.0501L14.5108 3.5501ZM11.0467 4.4501C11.4701 3.71676 12.5286 3.71676 12.952 4.4501L20.7462 17.9501C21.1696 18.6834 20.6403 19.6001 19.7936 19.6001H4.20511C3.35833 19.6001 2.82909 18.6834 3.25248 17.9501L11.0467 4.4501Z",fill:"currentColor"},null,-1)])])}const W2e=xt({name:"kimi-warning",render:H2e}),q2e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function U2e(e,t){return k(),E("svg",q2e,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0M4 6h8m4 0h4M6 12a2 2 0 1 0 4 0a2 2 0 1 0-4 0m-2 0h2m4 0h10m-5 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0M4 18h11m4 0h1"},null,-1)])])}const K2e=xt({name:"tabler-adjustments-horizontal",render:U2e}),V2e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Z2e(e,t){return k(),E("svg",V2e,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 6l-6 6l6 6"},null,-1)])])}const G2e=xt({name:"tabler-chevron-left",render:Z2e}),Q2e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Y2e(e,t){return k(),E("svg",Q2e,[...t[0]||(t[0]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"}),w("path",{d:"m9 12l2 2l4-4"})],-1)])])}const J2e=xt({name:"tabler-circle-check",render:Y2e}),X2e={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function eve(e,t){return k(),E("svg",X2e,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8.56 3.69a9 9 0 0 0-2.92 1.95M3.69 8.56A9 9 0 0 0 3 12m.69 3.44a9 9 0 0 0 1.95 2.92m2.92 1.95A9 9 0 0 0 12 21m3.44-.69a9 9 0 0 0 2.92-1.95m1.95-2.92A9 9 0 0 0 21 12m-.69-3.44a9 9 0 0 0-1.95-2.92m-2.92-1.95A9 9 0 0 0 12 3"},null,-1)])])}const tve=xt({name:"tabler-circle-dashed",render:eve}),nve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function ive(e,t){return k(),E("svg",nve,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 3h6m-5 6h4m-4-6v6L6 20a.7.7 0 0 0 .5 1h11a.7.7 0 0 0 .5-1L14 9V3"},null,-1)])])}const sve=xt({name:"tabler-flask",render:ive}),ove={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function rve(e,t){return k(),E("svg",ove,[...t[0]||(t[0]=[w("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[w("path",{d:"M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm11-2v16"}),w("path",{d:"m9 10l2 2l-2 2"})],-1)])])}const lve=xt({name:"tabler-layout-sidebar-right-collapse",render:rve}),ave={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function uve(e,t){return k(),E("svg",ave,[...t[0]||(t[0]=[w("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3L18 10a3 3 0 0 0-6-6l-6.5 6.5a4.5 4.5 0 0 0 9 9L21 13"},null,-1)])])}const cve=xt({name:"tabler-paperclip",render:uve}),dve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function fve(e,t){return k(),E("svg",dve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12A2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3m16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5"},null,-1)])])}const hve=xt({name:"ri-braces-line",render:fve}),pve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gve(e,t){return k(),E("svg",pve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M9 3V1H7v2H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-4V1h-2v2zm-5 7h16v9H4zm0-5h3v1h2V5h6v1h2V5h3v3H4zm5.879 5.964L12 13.086l2.121-2.122l1.415 1.415l-2.122 2.121l2.121 2.121l-1.414 1.414L12 15.915l-2.121 2.12l-1.415-1.414l2.122-2.12l-2.122-2.122z"},null,-1)])])}const mve=xt({name:"ri-calendar-close-line",render:gve}),vve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function yve(e,t){return k(),E("svg",vve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M7 3V1h2v2h6V1h2v2h4a1 1 0 0 1 1 1v5h-2V5h-3v2h-2V5H9v2H7V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm10 9a4 4 0 1 0 0 8a4 4 0 0 0 0-8m-6 4a6 6 0 1 1 12 0a6 6 0 0 1-12 0m5-3v3.414l2.293 2.293l1.414-1.414L18 15.586V13z"},null,-1)])])}const kve=xt({name:"ri-calendar-schedule-line",render:yve}),bve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ave(e,t){return k(),E("svg",bve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1zm11 10H4v8h16zM8 14v2H6v-2zm10 0v2h-8v-2zM7 5H4v4h16V5h-3v2h-2V5H9v2H7z"},null,-1)])])}const Cve=xt({name:"ri-calendar-todo-line",render:Ave}),wve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function xve(e,t){return k(),E("svg",wve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"m23 12l-7.071 7.071l-1.414-1.414L20.172 12l-5.657-5.657l1.414-1.414zM3.828 12l5.657 5.657l-1.414 1.414L1 12l7.071-7.071l1.414 1.414z"},null,-1)])])}const Sve=xt({name:"ri-code-line",render:xve}),_ve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ive(e,t){return k(),E("svg",_ve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-4-7h8a4 4 0 0 1-8 0m0-2a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8 0a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3"},null,-1)])])}const Mve=xt({name:"ri-emotion-line",render:Ive}),Eve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Tve(e,t){return k(),E("svg",Eve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z"},null,-1)])])}const Lve=xt({name:"ri-external-link-line",render:Tve}),Nve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Fve(e,t){return k(),E("svg",Nve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M12 3c5.392 0 9.878 3.88 10.819 9c-.94 5.12-5.427 9-10.819 9s-9.878-3.88-10.818-9C2.122 6.88 6.608 3 12 3m0 16a9.005 9.005 0 0 0 8.778-7a9.005 9.005 0 0 0-17.555 0A9.005 9.005 0 0 0 12 19m0-2.5a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5"},null,-1)])])}const Dve=xt({name:"ri-eye-line",render:Fve}),$ve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Bve(e,t){return k(),E("svg",$ve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M17.883 19.297A10.95 10.95 0 0 1 12 21c-5.392 0-9.878-3.88-10.818-9A11 11 0 0 1 4.52 5.935L1.394 2.808l1.414-1.414l19.799 19.798l-1.414 1.415zM5.936 7.35A8.97 8.97 0 0 0 3.223 12a9.005 9.005 0 0 0 13.201 5.838l-2.028-2.028A4.5 4.5 0 0 1 8.19 9.604zm6.978 6.978l-3.242-3.241a2.5 2.5 0 0 0 3.241 3.241m7.893 2.265l-1.431-1.431A8.9 8.9 0 0 0 20.778 12A9.005 9.005 0 0 0 9.552 5.338L7.974 3.76C9.221 3.27 10.58 3 12 3c5.392 0 9.878 3.88 10.819 9a10.95 10.95 0 0 1-2.012 4.593m-9.084-9.084Q11.86 7.5 12 7.5a4.5 4.5 0 0 1 4.492 4.778z"},null,-1)])])}const zve=xt({name:"ri-eye-off-line",render:Bve}),Rve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Ove(e,t){return k(),E("svg",Rve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M15 4H5v16h14V8h-4zM3 2.992C3 2.444 3.447 2 3.999 2H16l5 5v13.993A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008zM11 11V8h2v3h3v2h-3v3h-2v-3H8v-2z"},null,-1)])])}const Pve=xt({name:"ri-file-add-line",render:Ove}),jve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Hve(e,t){return k(),E("svg",jve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"},null,-1)])])}const Wve=xt({name:"ri-flashlight-line",render:Hve}),qve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Uve(e,t){return k(),E("svg",qve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M14 4.438A2.437 2.437 0 0 0 16.438 2h1.125A2.437 2.437 0 0 0 20 4.438v1.125A2.437 2.437 0 0 0 17.563 8h-1.125A2.437 2.437 0 0 0 14 5.563zM1 11a6 6 0 0 0 6-6h2a6 6 0 0 0 6 6v2a6 6 0 0 0-6 6H7a6 6 0 0 0-6-6zm3.876 1A8.04 8.04 0 0 1 8 15.124A8.04 8.04 0 0 1 11.124 12A8.04 8.04 0 0 1 8 8.876A8.04 8.04 0 0 1 4.876 12m12.374 2A3.25 3.25 0 0 1 14 17.25v1.5A3.25 3.25 0 0 1 17.25 22h1.5A3.25 3.25 0 0 1 22 18.75v-1.5A3.25 3.25 0 0 1 18.75 14z"},null,-1)])])}const Kve=xt({name:"ri-sparkling-line",render:Uve}),Vve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Zve(e,t){return k(),E("svg",Vve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])}const Gve=xt({name:"ri-folder-fill",render:Zve}),Qve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Yve(e,t){return k(),E("svg",Qve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2M3 6a3 3 0 1 1 4 2.83V9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-.17a3.001 3.001 0 1 1 2 0V9a4 4 0 0 1-4 4h-2v2.17a3.001 3.001 0 1 1-2 0V13H9a4 4 0 0 1-4-4v-.17A3 3 0 0 1 3 6m15-1a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-6 12a1 1 0 1 0 0 2a1 1 0 0 0 0-2"},null,-1)])])}const Jve=xt({name:"ri-git-fork-line",render:Yve}),Xve={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function eye(e,t){return k(),E("svg",Xve,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M15 5h2a2 2 0 0 1 2 2v8.17a3.001 3.001 0 1 1-2 0V7h-2v3l-4.5-4L15 2zM5 8.83a3.001 3.001 0 1 1 2 0v6.34a3.001 3.001 0 1 1-2 0zM6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 12a1 1 0 1 0 0-2a1 1 0 0 0 0 2m12 0a1 1 0 1 0 0-2a1 1 0 0 0 0 2"},null,-1)])])}const tye=xt({name:"ri-git-pull-request-line",render:eye}),nye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function iye(e,t){return k(),E("svg",nye,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M2 18h7v2H2zm0-7h9v2H2zm0-7h20v2H2zm18.674 9.025l1.156-.391l1 1.732l-.916.805a4 4 0 0 1 0 1.658l.916.805l-1 1.732l-1.156-.391a4 4 0 0 1-1.435.83L19 21h-2l-.24-1.196a4 4 0 0 1-1.434-.83l-1.156.392l-1-1.732l.916-.805a4 4 0 0 1 0-1.658l-.916-.805l1-1.732l1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196a4 4 0 0 1 1.434.83M18 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4"},null,-1)])])}const sye=xt({name:"ri-list-settings-line",render:iye}),oye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function rye(e,t){return k(),E("svg",oye,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M10 2a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H8v2h5V9a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H8v6h5v-1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H7a1 1 0 0 1-1-1V8H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm9 16h-4v2h4zm0-8h-4v2h4zM9 4H5v2h4z"},null,-1)])])}const lye=xt({name:"ri-node-tree",render:rye}),aye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function uye(e,t){return k(),E("svg",aye,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"m13.827 1.69l8.486 8.485l-1.415 1.414l-.707-.707l-4.242 4.243l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243l1.414-1.414l3.536-.707l4.242-4.243l-.707-.707zm.707 3.536l-4.67 4.67l-2.822.565l6.5 6.5l.564-2.822l4.671-4.67z"},null,-1)])])}const cye=xt({name:"ri-pushpin-line",render:uye}),dye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function fye(e,t){return k(),E("svg",dye,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"},null,-1)])])}const hye=xt({name:"ri-sort-desc",render:fye}),pye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function gye(e,t){return k(),E("svg",pye,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928z"},null,-1)])])}const mye=xt({name:"ri-star-fill",render:gye}),vye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function yye(e,t){return k(),E("svg",vye,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928zm0-2.292l4.247 2.377l-.948-4.773l3.573-3.305l-4.833-.573l-2.038-4.419l-2.039 4.42l-4.833.572l3.573 3.305l-.948 4.773z"},null,-1)])])}const kye=xt({name:"ri-star-line",render:yye}),bye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function Aye(e,t){return k(),E("svg",bye,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"M5.33 3.272a3.5 3.5 0 0 1 4.254 4.962l10.709 10.71l-1.414 1.414l-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 0 0 2.121-2.121zm10.367 1.883l3.182-1.768l1.414 1.415l-1.768 3.182l-1.768.353l-2.12 2.121l-1.415-1.414l2.121-2.121zm-6.718 8.132l1.415 1.414l-5.304 5.303a1 1 0 0 1-1.492-1.327l.078-.087z"},null,-1)])])}const Cye=xt({name:"ri-tools-line",render:Aye}),wye={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"};function xye(e,t){return k(),E("svg",wye,[...t[0]||(t[0]=[w("path",{fill:"currentColor",d:"m20.97 17.172l-1.414 1.414l-3.535-3.535l-.073.074l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243L5.34 8.761l3.536-.707l.073-.074l-3.536-3.536L6.828 3.03zM10.365 9.394l-.502.502l-2.822.565l6.5 6.5l.564-2.822l.502-.502zm8.411.074l-1.34 1.34l1.414 1.415l1.34-1.34l.707.707l1.415-1.415l-8.486-8.485l-1.414 1.414l.707.707l-1.34 1.34l1.414 1.415l1.34-1.34z"},null,-1)])])}const Sye=xt({name:"ri-unpin-line",render:xye}),_ye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M12.0684 2.03418C12.5654 2.03421 12.9687 2.43755 12.9688 2.93457V11.0996H21.0654C21.5625 11.0996 21.9658 11.503 21.9658 12C21.9658 12.497 21.5625 12.9004 21.0654 12.9004H12.9688V21.0654C12.9687 21.5624 12.5654 21.9658 12.0684 21.9658C11.5713 21.9658 11.168 21.5625 11.168 21.0654V12.9004H2.93457C2.43751 12.9004 2.03418 12.4971 2.03418 12C2.03418 11.5029 2.43751 11.0996 2.93457 11.0996H11.168V2.93457C11.168 2.43753 11.5713 2.03418 12.0684 2.03418Z" fill="currentColor"/> +</svg> +`,Iye=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <path id="p0" d="M 0 -9.9 C -5.468 -9.9 -9.9 -5.468 -9.9 0 C -9.9 1.923 -9.351 3.719 -8.402 5.239 C -8.402 5.239 -9.483 7.821 -9.483 7.821 C -9.896 8.809 -9.171 9.9 -8.099 9.9 C -8.099 9.9 0 9.9 0 9.9 C 5.468 9.9 9.9 5.468 9.9 0 C 9.9 -5.468 5.468 -9.9 0 -9.9 Z M -8.1 0 C -8.1 -4.474 -4.474 -8.1 0 -8.1 C 4.473 -8.1 8.1 -4.474 8.1 0 C 8.1 4.473 4.473 8.1 -0.001 8.1 C -0.001 8.1 -7.648 8.1 -7.648 8.1 L -6.365 5.035 C -6.365 5.035 -6.648 4.629 -6.648 4.629 C -7.563 3.317 -8.1 1.723 -8.1 0 Z" transform="matrix(1 0 0 1 12 12)" fill="currentColor" fill-rule="evenodd"/> + <path id="p1" d="M 3.6 0.5 L -2.6 0.5 M 0.5 -2.573 L 0.5 3.573" transform="translate(11.5 11.5)" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/> +</svg> +`,Mye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M15.0996 12C15.5967 12 16 12.4033 16 12.9004C15.9998 13.3973 15.5965 13.7998 15.0996 13.7998H8.90039C8.40346 13.7998 8.00021 13.3973 8 12.9004C8 12.4033 8.40333 12 8.90039 12H15.0996Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M19 3.2002C20.5464 3.2002 21.7998 4.4536 21.7998 6V7C21.7998 8.03565 21.2363 8.93754 20.4004 9.42188V17C20.4004 19.1539 18.6539 20.9004 16.5 20.9004H7.5C5.34609 20.9004 3.59961 19.1539 3.59961 17V9.42188C2.76374 8.93754 2.2002 8.03565 2.2002 7V6C2.2002 4.4536 3.4536 3.2002 5 3.2002H19ZM5.40039 17C5.40039 18.1598 6.3402 19.0996 7.5 19.0996H16.5C17.6598 19.0996 18.5996 18.1598 18.5996 17V9.7998H5.40039V17ZM4.89746 5.00488C4.39333 5.05621 4 5.48232 4 6V7L4.00488 7.10254C4.05278 7.57297 4.42703 7.94722 4.89746 7.99512L5 8H19C19.5523 8 20 7.55228 20 7V6C20 5.44772 19.5523 5 19 5H5L4.89746 5.00488Z" fill="currentColor"/> +</svg> +`,Eye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M11.386 21.6387C11.7378 21.988 12.3059 21.987 12.6565 21.6364L18.1949 16.098C18.5464 15.7465 18.5464 15.1766 18.1949 14.8252C17.8434 14.4737 17.2736 14.4737 16.9221 14.8252L12.9201 18.8272V3.00002C12.9201 2.50297 12.5171 2.10003 12.0201 2.10003C11.523 2.10003 11.1201 2.50297 11.1201 3.00002V18.8383L7.07554 14.8229C6.7228 14.4727 6.15295 14.4747 5.80275 14.8275C5.45255 15.1802 5.45461 15.7501 5.80735 16.1003L11.386 21.6387Z" fill="currentColor"/> +</svg> +`,Tye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16127 12.814C1.81197 12.4622 1.81299 11.8941 2.16357 11.5435L7.70203 6.00506C8.0535 5.65359 8.62335 5.65359 8.97482 6.00506C9.32629 6.35653 9.32629 6.92638 8.97482 7.27785L4.97276 11.2799H20.8C21.297 11.2799 21.7 11.6829 21.7 12.1799C21.7 12.677 21.297 13.0799 20.8 13.0799H4.96171L8.97712 17.1244C9.32732 17.4772 9.32526 18.047 8.97252 18.3972C8.61978 18.7474 8.04993 18.7454 7.69973 18.3926L2.16127 12.814Z" fill="currentColor"/> +</svg> +`,Lye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M21.4387 12.814C21.788 12.4622 21.787 11.8941 21.4364 11.5436L15.8979 6.0051C15.5464 5.65363 14.9766 5.65363 14.6251 6.0051C14.2737 6.35657 14.2737 6.92642 14.6251 7.27789L18.6272 11.28H2.79998C2.30293 11.28 1.89998 11.6829 1.89998 12.18C1.89998 12.677 2.30293 13.08 2.79998 13.08H18.6382L14.6228 17.1245C14.2726 17.4772 14.2747 18.0471 14.6274 18.3973C14.9802 18.7475 15.55 18.7454 15.9002 18.3927L21.4387 12.814Z" fill="currentColor"/> +</svg> +`,Nye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M11.386 2.36129C11.7378 2.01198 12.3059 2.013 12.6565 2.36358L18.1949 7.90204C18.5464 8.25351 18.5464 8.82336 18.1949 9.17483C17.8434 9.52631 17.2736 9.52631 16.9221 9.17483L12.9201 5.17277V21C12.9201 21.497 12.5171 21.9 12.0201 21.9C11.523 21.9 11.1201 21.497 11.1201 21V5.16172L7.07554 9.17713C6.7228 9.52733 6.15295 9.52527 5.80275 9.17253C5.45255 8.81979 5.45461 8.24995 5.80735 7.89975L11.386 2.36129Z" fill="currentColor"/> +</svg> +`,mB=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M19.3027 5.9053C19.6542 5.55397 20.2247 5.55388 20.5761 5.9053C20.9273 6.25675 20.9273 6.82734 20.5761 7.17874L9.65911 18.0948C9.30773 18.4461 8.73814 18.446 8.38665 18.0948L3.42376 13.1328C3.0726 12.7814 3.07263 12.2118 3.42376 11.8604C3.77524 11.509 4.34575 11.5089 4.6972 11.8604L9.02239 16.1856L19.3027 5.9053Z" fill="currentColor"/> +</svg> +`,Fye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M11.3912 16.7134C11.743 17.0627 12.3111 17.0617 12.6617 16.7111L19.6364 9.73641C19.9878 9.38494 19.9878 8.81509 19.6364 8.46362C19.2849 8.11215 18.7151 8.11215 18.3636 8.46362L12.023 14.8042L5.63407 8.46132C5.28133 8.11112 4.71149 8.11318 4.36129 8.46592C4.01109 8.81866 4.01314 9.3885 4.36588 9.73871L11.3912 16.7134Z" fill="currentColor"/> +</svg> +`,Dye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M16.1261 12.6088C16.4754 12.257 16.4743 11.6889 16.1238 11.3383L9.14904 4.36363C8.79757 4.01216 8.22772 4.01216 7.87625 4.36363C7.52477 4.7151 7.52477 5.28495 7.87625 5.63642L14.2169 11.977L7.87395 18.3659C7.52375 18.7187 7.52581 19.2885 7.87855 19.6387C8.23129 19.9889 8.80113 19.9869 9.15133 19.6341L16.1261 12.6088Z" fill="currentColor"/> +</svg> +`,$ye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M11.3912 8.46132C11.743 8.11202 12.3111 8.11304 12.6617 8.46362L19.6364 15.4383C19.9878 15.7898 19.9878 16.3597 19.6364 16.7111C19.2849 17.0626 18.7151 17.0626 18.3636 16.7111L12.023 10.3705L5.63407 16.7134C5.28133 17.0636 4.71149 17.0616 4.36129 16.7088C4.01109 16.3561 4.01314 15.7862 4.36588 15.436L11.3912 8.46132Z" fill="currentColor"/> +</svg> +`,Bye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<circle cx="12" cy="12" r="10.875" stroke="currentColor" stroke-width="2.25"/> +<path d="M7.125 12.6L10.65 16.125L17.025 8.85" stroke="currentColor" stroke-width="2.25" stroke-linecap="round" stroke-linejoin="round"/> +</svg> +`,zye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M11.8999 6.79965C12.397 6.79965 12.7997 7.20235 12.7997 7.69941V11.7266L14.7359 13.6629C15.0873 14.0143 15.0879 14.584 14.7366 14.9355C14.3852 15.287 13.8148 15.287 13.4633 14.9355L11.2632 12.7355C11.0947 12.5668 11.0002 12.338 11.0001 12.0995V7.69941C11.0001 7.20238 11.4029 6.7997 11.8999 6.79965Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M12 1.89893C17.4677 1.89893 21.9001 6.33147 21.9002 11.7991C21.9002 17.2669 17.4678 21.6993 12 21.6993C6.53228 21.6993 2.09985 17.2669 2.09985 11.7991C2.09998 6.33147 6.53236 1.89893 12 1.89893ZM20.1 11.7998C20.1 7.32616 16.4737 3.69984 12 3.69984C7.5264 3.69984 3.90008 7.32616 3.90008 11.7998C3.90032 16.2732 7.52655 19.8998 12 19.8998C16.4735 19.8998 20.0998 16.2732 20.1 11.7998Z" fill="currentColor"/> +</svg> +`,Rye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M17.9542 4.77253C18.3056 4.42106 18.8761 4.42106 19.2276 4.77253C19.579 5.12401 19.579 5.69452 19.2276 6.04597L13.2735 12.0001L19.2276 17.9542C19.5791 18.3056 19.5791 18.8761 19.2276 19.2276C18.8761 19.5791 18.3056 19.5791 17.9542 19.2276L12.0001 13.2735L6.04595 19.2276C5.69451 19.5791 5.12399 19.579 4.77252 19.2276C4.42104 18.8761 4.42104 18.3056 4.77252 17.9542L10.7266 12.0001L4.77252 6.04597C4.42104 5.6945 4.42104 5.124 4.77252 4.77253C5.12399 4.42107 5.69448 4.42106 6.04595 4.77253L12.0001 10.7266L17.9542 4.77253Z" fill="currentColor"/> +</svg> +`,Oye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M9.85815 11.957C10.9074 11.957 11.7583 12.8083 11.7585 13.8574V19.8574C11.7585 20.3545 11.3552 20.7578 10.8582 20.7578C10.3611 20.7578 9.95776 20.3545 9.95776 19.8574V13.8574C9.95755 13.8024 9.91325 13.7578 9.85815 13.7578H3.85815C3.3611 13.7578 2.95776 13.3545 2.95776 12.8574C2.95798 12.3605 3.36123 11.957 3.85815 11.957H9.85815Z" fill="currentColor"/> +<path d="M12.8582 2.95703C13.3551 2.95703 13.7583 3.36054 13.7585 3.85742V9.85742C13.7585 9.91265 13.8029 9.95703 13.8582 9.95703H19.8582C20.3551 9.95703 20.7583 10.3605 20.7585 10.8574C20.7585 11.3545 20.3552 11.7578 19.8582 11.7578H13.8582C12.8088 11.7578 11.9578 10.9068 11.9578 9.85742V3.85742C11.958 3.36054 12.3612 2.95703 12.8582 2.95703Z" fill="currentColor"/> +</svg> +`,Pye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M11.9004 2.19995C17.3678 2.20016 21.7998 6.63285 21.7998 12.1003C21.7996 17.5677 17.3677 21.9995 11.9004 21.9998H3.80078C2.72946 21.9996 2.00334 20.9089 2.41699 19.9207L3.49805 17.3386C2.54871 15.8189 2.00007 14.0226 2 12.1003C2 6.63272 6.43277 2.19995 11.9004 2.19995ZM11.9004 3.99976C7.42688 3.99976 3.7998 7.62684 3.7998 12.1003C3.79989 13.8228 4.33669 15.4175 5.25195 16.7292L5.53516 17.1345L4.25195 20.2H11.8994C16.3727 20.1999 19.9998 16.5736 20 12.1003C20 7.62697 16.3737 3.99997 11.9004 3.99976ZM8.9541 10.8005C9.75473 10.8006 10.4041 11.4491 10.4043 12.2498C10.4043 13.0505 9.75482 13.6998 8.9541 13.7C8.15329 13.7 7.50391 13.0506 7.50391 12.2498C7.50406 11.4491 8.15339 10.8005 8.9541 10.8005ZM15.1533 10.8005C15.9539 10.8006 16.6034 11.4491 16.6035 12.2498C16.6035 13.0505 15.954 13.6998 15.1533 13.7C14.3525 13.7 13.7031 13.0506 13.7031 12.2498C13.7033 11.4491 14.3526 10.8005 15.1533 10.8005Z" fill="currentColor"/> +</svg> +`,vB=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M17 7.09961C19.1539 7.09961 20.9004 8.84609 20.9004 11V17C20.9004 19.1539 19.1539 20.9004 17 20.9004H11C8.84609 20.9004 7.09961 19.1539 7.09961 17V11C7.09961 8.84609 8.84609 7.09961 11 7.09961H17ZM11 8.90039C9.8402 8.90039 8.90039 9.8402 8.90039 11V17C8.90039 18.1598 9.8402 19.0996 11 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V11C19.0996 9.8402 18.1598 8.90039 17 8.90039H11Z" fill="currentColor"/> +<path d="M13 3.09961C14.4447 3.09961 15.705 3.88644 16.3779 5.0498C16.6265 5.47999 16.4789 6.03049 16.0488 6.2793C15.6186 6.52781 15.0681 6.38029 14.8193 5.9502C14.4548 5.32041 13.776 4.90039 13 4.90039H7C5.8402 4.90039 4.90039 5.8402 4.90039 7V13C4.90039 13.776 5.32041 14.4548 5.9502 14.8193C6.38029 15.0681 6.52781 15.6186 6.2793 16.0488C6.03049 16.4789 5.47999 16.6265 5.0498 16.3779C3.88644 15.705 3.09961 14.4447 3.09961 13V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H13Z" fill="currentColor"/> +</svg> +`,jye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 10.2797 2.43414 8.66074 3.19922 7.24707C3.20172 7.24246 3.20453 7.23801 3.20703 7.2334C3.33385 6.99995 3.47181 6.77351 3.61621 6.55176C3.73214 6.37355 3.85079 6.19744 3.97754 6.02734C5.35905 4.17471 7.36856 2.81959 9.68945 2.27051C9.69952 2.26813 9.70965 2.26602 9.71973 2.26367C9.85224 2.23276 9.98563 2.2043 10.1201 2.17871C10.1542 2.17221 10.1884 2.16631 10.2227 2.16016C10.3466 2.13791 10.4712 2.11724 10.5967 2.09961C10.6301 2.09489 10.6637 2.0913 10.6973 2.08691C10.8216 2.07073 10.9465 2.05552 11.0723 2.04395C11.1125 2.04022 11.153 2.0384 11.1934 2.03516C11.4595 2.0139 11.7284 2 12 2ZM11.9941 3.7998C11.9968 3.86623 12 3.93292 12 4C12 6.76142 9.76142 9 7 9C6.14209 9 5.33517 8.78324 4.62988 8.40234C4.09862 9.48861 3.7998 10.7093 3.7998 12C3.7998 12.4438 3.83644 12.8791 3.9043 13.3037C4.52807 12.5673 5.45945 12.0996 6.5 12.0996C8.37777 12.0996 9.90039 13.6222 9.90039 15.5C9.90039 17.0702 8.83532 18.3903 7.38867 18.7812C8.70267 19.6765 10.2901 20.2002 12 20.2002C12.468 20.2002 12.9264 20.1583 13.373 20.083C13.1323 19.4342 13 18.7327 13 18C13 14.6863 15.6863 12 19 12C19.4098 12 19.8098 12.0416 20.1963 12.1201C20.1969 12.0801 20.2002 12.0401 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998H11.9941ZM19 13.7998C16.6804 13.7998 14.7998 15.6804 14.7998 18C14.7998 18.5617 14.9112 19.0972 15.1113 19.5869C17.5225 18.597 19.3558 16.4929 19.9727 13.9141C19.6605 13.8399 19.3349 13.7998 19 13.7998ZM6.5 13.9004C5.61634 13.9004 4.90039 14.6163 4.90039 15.5C4.90039 16.3837 5.61634 17.0996 6.5 17.0996C7.38366 17.0996 8.09961 16.3837 8.09961 15.5C8.09961 14.6163 7.38366 13.9004 6.5 13.9004ZM15.5 6.09961C16.8255 6.09961 17.9004 7.17452 17.9004 8.5C17.9004 9.82548 16.8255 10.9004 15.5 10.9004C14.1745 10.9004 13.0996 9.82548 13.0996 8.5C13.0996 7.17452 14.1745 6.09961 15.5 6.09961ZM15.5 7.90039C15.1686 7.90039 14.9004 8.16863 14.9004 8.5C14.9004 8.83137 15.1686 9.09961 15.5 9.09961C15.8314 9.09961 16.0996 8.83137 16.0996 8.5C16.0996 8.16863 15.8314 7.90039 15.5 7.90039ZM10.1992 4C8.35326 4.41375 6.74333 5.44923 5.59961 6.87598C6.02235 7.08306 6.49716 7.2002 7 7.2002C8.76731 7.2002 10.1992 5.76731 10.1992 4Z" fill="currentColor"/> +</svg> +`,Hye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.90002C12.4971 2.90002 12.9 3.30297 12.9 3.80002V12.2939L15.8081 9.38585C16.1595 9.03438 16.7294 9.03438 17.0808 9.38585C17.4323 9.73732 17.4323 10.3072 17.0808 10.6586L12.6364 15.1031C12.4676 15.2719 12.2387 15.3667 12 15.3667C11.7613 15.3667 11.5324 15.2719 11.3636 15.1031L6.91917 10.6586C6.5677 10.3072 6.5677 9.73732 6.91917 9.38585C7.27064 9.03438 7.84049 9.03438 8.19196 9.38585L11.1 12.2939V3.80002C11.1 3.30297 11.503 2.90002 12 2.90002ZM4.00001 13.5874C4.49706 13.5874 4.90001 13.9903 4.90001 14.4874V18.043C4.90001 18.2758 4.99249 18.499 5.1571 18.6636C5.32172 18.8282 5.54498 18.9207 5.77778 18.9207H18.2222C18.455 18.9207 18.6783 18.8283 18.8429 18.6636C19.0075 18.499 19.1 18.2758 19.1 18.043V14.4874C19.1 13.9903 19.5029 13.5874 20 13.5874C20.4971 13.5874 20.9 13.9903 20.9 14.4874V18.043C20.9 18.7531 20.6179 19.4342 20.1157 19.9364C19.6135 20.4386 18.9324 20.7207 18.2222 20.7207H5.77778C5.06759 20.7207 4.38649 20.4386 3.88431 19.9364C3.38213 19.4342 3.10001 18.7531 3.10001 18.043V14.4874C3.10001 13.9903 3.50295 13.5874 4.00001 13.5874Z" fill="currentColor"/> +</svg> +`,Wye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M18.0179 3.09998C18.3963 3.10003 18.7709 3.17491 19.1205 3.31971C19.4701 3.46454 19.7884 3.67614 20.056 3.94373C20.3237 4.21144 20.5362 4.52965 20.681 4.87928C20.8258 5.22887 20.8997 5.60423 20.8997 5.9828C20.8997 6.36118 20.8257 6.73591 20.681 7.08533C20.5362 7.43497 20.3237 7.75317 20.056 8.02088L17.639 10.4379L9.15756 18.9183C8.5296 19.5463 7.74274 19.992 6.8812 20.2074L4.21811 20.8734C3.91148 20.95 3.5871 20.8596 3.36362 20.6361C3.14017 20.4126 3.05063 20.0883 3.12729 19.7816L3.79233 17.1185C4.00771 16.257 4.45344 15.4701 5.08139 14.8422L15.9798 3.94373C16.5203 3.40346 17.2536 3.09998 18.0179 3.09998ZM19.0003 19.1C19.4972 19.1002 19.8997 19.5034 19.8997 20.0004C19.8995 20.4971 19.4971 20.8996 19.0003 20.8998H12.0003C11.5034 20.8998 11.1001 20.4973 11.0999 20.0004C11.0999 19.5033 11.5033 19.1 12.0003 19.1H19.0003ZM18.0179 4.89979C17.7309 4.89979 17.4553 5.01417 17.2523 5.21717L6.35385 16.1146C5.95661 16.5119 5.67469 17.01 5.53842 17.5551L5.23666 18.7631L6.44467 18.4613C6.98971 18.3251 7.48782 18.0431 7.8851 17.6459L18.7826 6.74744C18.883 6.64702 18.9635 6.52821 19.0179 6.39686C19.0723 6.26558 19.0999 6.1247 19.0999 5.9828C19.0999 5.84075 19.0723 5.69916 19.0179 5.56776C18.9635 5.43645 18.883 5.31757 18.7826 5.21717C18.6821 5.11678 18.5631 5.03716 18.432 4.9828C18.3008 4.92845 18.16 4.89983 18.0179 4.89979Z" fill="currentColor"/> +</svg> +`,qye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M5 11.0996C5.49693 11.0996 5.90018 11.5031 5.90039 12V18C5.90039 18.0552 5.94477 18.0996 6 18.0996H12C12.4969 18.0996 12.9002 18.5031 12.9004 19C12.9004 19.4971 12.4971 19.9004 12 19.9004H6C4.95066 19.9004 4.09961 19.0493 4.09961 18V12C4.09982 11.5031 4.50307 11.0996 5 11.0996ZM18 4.09961C19.0492 4.09961 19.9002 4.95084 19.9004 6V12C19.9004 12.4971 19.4971 12.9004 19 12.9004C18.5029 12.9004 18.0996 12.4971 18.0996 12V6C18.0994 5.94495 18.0551 5.90039 18 5.90039H12C11.5029 5.90039 11.0996 5.49706 11.0996 5C11.0998 4.50312 11.5031 4.09961 12 4.09961H18Z" fill="currentColor"/> +</svg> +`,Gb=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g> +<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1723 2.1001C13.9413 2.10018 14.6793 2.40592 15.2231 2.94971L19.0512 6.77783C19.595 7.32162 19.9007 8.0596 19.9008 8.82861V18.0005C19.9008 20.1544 18.1543 21.9009 16.0004 21.9009H8.0004C5.84649 21.9009 4.10001 20.1544 4.10001 18.0005V6.00049C4.10001 3.84658 5.84649 2.1001 8.0004 2.1001H13.1723ZM8.0004 3.90088C6.8406 3.90088 5.90079 4.84069 5.90079 6.00049V18.0005C5.90079 19.1603 6.8406 20.1001 8.0004 20.1001H16.0004C17.1602 20.1001 18.1 19.1603 18.1 18.0005V9.90088H15.0004C13.3988 9.90088 12.1 8.60211 12.1 7.00049V3.90088H8.0004ZM13.9008 7.00049C13.9008 7.608 14.3929 8.1001 15.0004 8.1001H17.8217C17.8072 8.08375 17.7933 8.06681 17.7777 8.05127L13.9496 4.22314C13.9339 4.20745 13.9173 4.19286 13.9008 4.17822V7.00049Z" fill="currentColor"/> +</g> +</svg> +`,Uye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M15.4795 15.4971C15.9765 15.4971 16.3799 15.9004 16.3799 16.3975C16.3799 16.8945 15.9765 17.2978 15.4795 17.2979H8.52051C8.02345 17.2979 7.62012 16.8945 7.62012 16.3975C7.62012 15.9004 8.02345 15.4971 8.52051 15.4971H15.4795Z" fill="currentColor"/> +<path d="M12.3359 11.0996C12.8329 11.0997 13.2354 11.503 13.2354 12C13.2354 12.497 12.8329 12.9003 12.3359 12.9004H8.52051C8.02345 12.9004 7.62012 12.4971 7.62012 12C7.62012 11.5029 8.02345 11.0996 8.52051 11.0996H12.3359Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1719 2.09961C13.9408 2.09969 14.6789 2.40555 15.2227 2.94922L19.0508 6.77734C19.5946 7.32113 19.9003 8.05911 19.9004 8.82812V18C19.9004 20.1539 18.1539 21.9004 16 21.9004H8C5.84626 21.9002 4.09961 20.1538 4.09961 18V6C4.09961 3.84621 5.84626 2.09981 8 2.09961H13.1719ZM8 3.90039C6.84037 3.90059 5.90039 4.84032 5.90039 6V18C5.90039 19.1597 6.84037 20.0994 8 20.0996H16C17.1598 20.0996 18.0996 19.1598 18.0996 18V9.90039H15C13.3985 9.90019 12.0996 8.6015 12.0996 7V3.90039H8ZM13.9004 7C13.9004 7.60739 14.3927 8.09941 15 8.09961H17.8213C17.8068 8.08333 17.7928 8.06626 17.7773 8.05078L13.9492 4.22266C13.9335 4.20696 13.9169 4.19237 13.9004 4.17773V7Z" fill="currentColor"/> +</svg> +`,Kye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M9.2373 3.7002C10.4169 3.7002 11.5297 4.24779 12.249 5.18262L12.4424 5.43359H18C20.0987 5.43359 21.7998 7.13472 21.7998 9.2334V16.5C21.7998 18.5987 20.0987 20.2998 18 20.2998H6C3.90132 20.2998 2.2002 18.5987 2.2002 16.5V7.5C2.2002 5.40132 3.90132 3.7002 6 3.7002H9.2373ZM6 5.5C4.89543 5.5 4 6.39543 4 7.5V16.5C4 17.6046 4.89543 18.5 6 18.5H18C19.0357 18.5 19.887 17.7128 19.9893 16.7041L20 16.5V9.2334C20 8.19775 19.2128 7.34641 18.2041 7.24414L18 7.2334H12.0479L11.9326 7.22656C11.666 7.19561 11.4205 7.05812 11.2549 6.84277L10.8223 6.28027C10.4437 5.78834 9.85808 5.5 9.2373 5.5H6ZM16 9.59961C16.4971 9.59961 16.9004 10.0029 16.9004 10.5C16.9004 10.9971 16.4971 11.4004 16 11.4004H8C7.50294 11.4004 7.09961 10.9971 7.09961 10.5C7.09961 10.0029 7.50294 9.59961 8 9.59961H16Z" fill="currentColor"/> +</svg> +`,yB=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g> +<path d="M18.3623 9.99976L18.209 8.48999C18.2031 8.43161 18.2004 8.37289 18.2002 8.31421C18.1988 8.31196 18.1956 8.30842 18.1904 8.30347C18.1718 8.28559 18.1302 8.26245 18.0713 8.26245H11C10.261 8.26245 9.59753 7.81016 9.32617 7.1228L8.9082 6.06421C8.88101 5.9953 8.85737 5.92501 8.83887 5.85327C8.83778 5.85099 8.833 5.84268 8.81836 5.83179C8.79454 5.81475 8.7549 5.79939 8.70605 5.80054H3.92871C3.86986 5.80054 3.82825 5.82368 3.80957 5.84155C3.80816 5.8429 3.80675 5.84428 3.80566 5.84546L4.47559 14.0955L3.62109 17.5154L5.12109 11.5154C5.34367 10.6251 6.1438 9.99977 7.06152 9.99976H18.3623ZM7.06152 11.7996C6.96976 11.7996 6.88944 11.8629 6.86719 11.9519L5.36719 17.9519C5.33598 18.078 5.43158 18.1999 5.56152 18.2H19.4385C19.5302 18.1999 19.6106 18.1376 19.6328 18.0486L21.1328 12.0486C21.1644 11.9224 21.0686 11.7996 20.9385 11.7996H7.06152ZM20.9385 9.99976C22.2396 9.99977 23.1945 11.2228 22.8789 12.4851L21.3789 18.4851C21.1563 19.3754 20.3562 19.9997 19.4385 19.9998H4.92871C4.41722 19.9998 3.92613 19.8059 3.56445 19.4597C3.20281 19.1135 3.00004 18.6436 3 18.1541L2 5.84644C2.00006 5.35711 2.20311 4.88786 2.56445 4.54175C2.92613 4.19554 3.41722 4.00073 3.92871 4.00073H8.66406C9.10133 3.99051 9.5296 4.1225 9.87793 4.37573C10.2285 4.63118 10.4767 4.99457 10.582 5.40405L11 6.46167H18.0713C18.5828 6.46167 19.0739 6.65648 19.4355 7.00269C19.7971 7.34888 20 7.81883 20 8.30835L20.1719 9.99976H20.9385Z" fill="currentColor"/> +</g> +</svg> +`,Vye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M9.5 3Q10.8 8.2 16 9.5Q10.8 10.8 9.5 16Q8.2 10.8 3 9.5Q8.2 8.2 9.5 3Z" fill="currentColor"/> +<path d="M17.25 13.5Q18 16.5 21 17.25Q18 18 17.25 21Q16.5 18 13.5 17.25Q16.5 16.5 17.25 13.5Z" fill="currentColor"/> +</svg> +`,Zye=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <path id="af-p0" d="M -2.619 -8.3 C -1.815 -8.3 -1.048 -7.97 -0.499 -7.39 C -0.499 -7.39 0.141 -6.712 0.141 -6.712 C 0.141 -6.712 5.75 -6.712 5.75 -6.712 C 7.904 -6.712 9.65 -4.986 9.65 -2.858 C 9.65 -2.858 9.65 -1.71 9.65 -1.71 C 9.65 -1.219 9.247 -0.821 8.75 -0.821 C 8.253 -0.821 7.85 -1.219 7.85 -1.71 C 7.85 -1.71 7.85 -2.858 7.85 -2.858 C 7.849 -4.004 6.91 -4.934 5.75 -4.934 C 5.75 -4.934 -0.207 -4.934 -0.207 -4.934 C -0.484 -4.934 -0.749 -5.047 -0.938 -5.247 C -0.938 -5.247 -1.815 -6.177 -1.815 -6.177 C -2.023 -6.397 -2.315 -6.521 -2.619 -6.521 C -2.619 -6.521 -6.25 -6.521 -6.25 -6.521 C -7.41 -6.521 -8.35 -5.592 -8.35 -4.446 C -8.35 -4.446 -8.35 4.446 -8.35 4.446 C -8.35 5.592 -7.41 6.521 -6.25 6.521 C -6.25 6.521 1.25 6.521 1.25 6.521 C 1.747 6.521 2.15 6.919 2.15 7.41 C 2.15 7.901 1.747 8.3 1.25 8.3 C 1.25 8.3 -6.25 8.3 -6.25 8.3 C -8.404 8.3 -10.15 6.574 -10.15 4.446 C -10.15 4.446 -10.15 -4.446 -10.15 -4.446 C -10.15 -6.574 -8.404 -8.3 -6.25 -8.3 C -6.25 -8.3 -2.619 -8.3 -2.619 -8.3 Z M 3.75 -2.5 C 4.247 -2.5 4.65 -2.097 4.65 -1.6 C 4.65 -1.103 4.247 -0.699 3.75 -0.699 C 3.75 -0.699 -4.25 -0.699 -4.25 -0.699 C -4.747 -0.699 -5.15 -1.103 -5.15 -1.6 C -5.15 -2.097 -4.747 -2.5 -4.25 -2.5 C -4.25 -2.5 3.75 -2.5 3.75 -2.5 Z" transform="matrix(1 0 0 1 11.75 12)" fill="currentColor"/> + <g id="af-p1"> + <path d="M 2.635 0 L -2.635 0 M 0 -2.635 L 0 2.635" transform="matrix(1 0 0 1 18.4 16.3)" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/> + </g> +</svg> +`,Gye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3ZM12 19.2002C15.9764 19.2002 19.2002 15.9764 19.2002 12C19.2002 8.02355 15.9764 4.7998 12 4.7998V19.2002Z" fill="currentColor"/> +</svg> +`,Qye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7ZM12 15.6992C12.4968 15.6992 12.8994 16.1028 12.8994 16.5996C12.8994 17.0964 12.4968 17.5 12 17.5C11.5024 17.5 11.0996 17.0964 11.0996 16.5996C11.0996 16.1028 11.5024 15.6992 12 15.6992ZM12 6.49902C12.4969 6.49922 12.8994 6.86908 12.8994 7.3252V13.6729C12.8994 14.129 12.4969 14.4988 12 14.499C11.5029 14.499 11.0996 14.1291 11.0996 13.6729V7.3252C11.0996 6.86896 11.5029 6.49902 12 6.49902Z" fill="currentColor"/> +</svg> +`,Yye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M12.5092 2.11279C17.7402 2.37781 21.8998 6.70364 21.8998 12.0005C21.8996 17.4153 17.5524 21.8108 12.1576 21.895C12.1056 21.898 12.0532 21.8999 12.0004 21.8999C11.948 21.8999 11.8954 21.8968 11.8432 21.896L11.8422 21.895C6.44751 21.8107 2.10022 17.4152 2.10001 12.0005C2.10001 6.53287 6.53278 2.1001 12.0004 2.1001L12.5092 2.11279ZM8.92715 13.0005C9.02896 14.9787 9.42581 16.721 9.99356 17.9985C10.3249 18.7441 10.6971 19.292 11.0639 19.6411C11.4259 19.9855 11.741 20.1001 12.0004 20.1001C12.2598 20.1 12.5749 19.9856 12.9369 19.6411C13.3037 19.292 13.6749 18.7441 14.0063 17.9985C14.574 16.721 14.9718 14.9788 15.0736 13.0005H8.92715ZM3.96329 13.0005C4.31462 15.8522 6.14714 18.2427 8.66837 19.3823C8.55544 19.1733 8.44916 18.9552 8.34903 18.73C7.66574 17.1926 7.22657 15.1926 7.12344 13.0005H3.96329ZM16.8764 13.0005C16.7732 15.1926 16.3341 17.1926 15.6508 18.73C15.5506 18.9554 15.4435 19.1732 15.3305 19.3823C17.8522 18.2429 19.6851 15.8525 20.0365 13.0005H16.8764ZM8.66934 4.6167C6.08869 5.78266 4.22826 8.25964 3.93985 11.1997H7.11661C7.20176 8.92954 7.64512 6.85497 8.34903 5.271C8.4494 5.04516 8.5561 4.82619 8.66934 4.6167ZM12.0004 3.8999C11.7411 3.8999 11.4259 4.01454 11.0639 4.35889C10.6971 4.70797 10.3249 5.25587 9.99356 6.00146C9.40671 7.32188 9.00186 9.13885 8.91739 11.1997H15.0834C14.9989 9.13884 14.5931 7.32189 14.0063 6.00146C13.6749 5.2559 13.3037 4.70796 12.9369 4.35889C12.5749 4.0144 12.2598 3.90002 12.0004 3.8999ZM15.3295 4.61572C15.443 4.82559 15.5502 5.04471 15.6508 5.271C16.3547 6.85498 16.799 8.92949 16.8842 11.1997H20.06C19.7715 8.25914 17.9108 5.78143 15.3295 4.61572Z" fill="currentColor"/> +</svg> +`,Jye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M8 17C8.82834 17 9.5 17.6717 9.5 18.5C9.5 19.3283 8.82834 20 8 20C7.17166 20 6.5 19.3283 6.5 18.5C6.5 17.6717 7.17166 17 8 17ZM16 17C16.8283 17 17.5 17.6717 17.5 18.5C17.5 19.3283 16.8283 20 16 20C15.1717 20 14.5 19.3283 14.5 18.5C14.5 17.6717 15.1717 17 16 17ZM8 10.5C8.82834 10.5 9.5 11.1717 9.5 12C9.5 12.8283 8.82834 13.5 8 13.5C7.17166 13.5 6.5 12.8283 6.5 12C6.5 11.1717 7.17166 10.5 8 10.5ZM16 10.5C16.8283 10.5 17.5 11.1717 17.5 12C17.5 12.8283 16.8283 13.5 16 13.5C15.1717 13.5 14.5 12.8283 14.5 12C14.5 11.1717 15.1717 10.5 16 10.5ZM8 4C8.82834 4 9.5 4.67166 9.5 5.5C9.5 6.32834 8.82834 7 8 7C7.17166 7 6.5 6.32834 6.5 5.5C6.5 4.67166 7.17166 4 8 4ZM16 4C16.8283 4 17.5 4.67166 17.5 5.5C17.5 6.32834 16.8283 7 16 7C15.1717 7 14.5 6.32834 14.5 5.5C14.5 4.67166 15.1717 4 16 4Z" fill="currentColor"/> +</svg> +`,Xye=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M7.22264 6.10352C7.22264 5.5078 7.48259 4.95449 7.91405 4.56055C8.34271 4.16918 8.90831 3.96198 9.48241 3.96191C9.64155 3.96191 9.80001 3.97936 9.95507 4.01074C10.0127 3.5042 10.2586 3.04178 10.6338 2.69922C11.0625 2.30778 11.6279 2.09961 12.2021 2.09961C12.7763 2.09966 13.3418 2.30783 13.7705 2.69922C13.9947 2.90401 14.1709 3.15244 14.29 3.42676C14.4947 3.37044 14.7071 3.34182 14.9209 3.3418C15.4951 3.3418 16.0605 3.549 16.4892 3.94043C16.8644 4.28293 17.1093 4.74548 17.167 5.25195C17.3223 5.22045 17.4812 5.20312 17.6406 5.20312C18.2147 5.20318 18.7803 5.41135 19.209 5.80273C19.6402 6.19663 19.9004 6.74922 19.9004 7.34473V14.6543C19.9004 17.413 19.2914 19.0434 18.0137 20.21C16.82 21.2998 15.2175 21.9004 13.5615 21.9004C11.7538 21.9004 10.2315 21.5696 8.95702 20.8535C7.67664 20.1341 6.71683 19.0652 5.97362 17.708L3.3496 12.916C3.18848 12.6213 3.10112 12.2914 3.0996 11.9531C3.09812 11.6147 3.18309 11.2835 3.34179 10.9873C3.5001 10.692 3.72639 10.4416 3.99706 10.251C4.26771 10.0604 4.57776 9.93235 4.90136 9.87305C5.56617 9.75102 6.25934 9.84517 6.86425 10.1445C6.9942 10.2088 7.11461 10.2788 7.22264 10.3477V6.10352ZM9.02343 12.7969C9.02336 13.1912 8.76624 13.5395 8.38964 13.6562C8.0129 13.773 7.60387 13.6309 7.38085 13.3057L6.53514 12.0723C6.51218 12.0529 6.48411 12.0282 6.45018 12.002C6.34595 11.9213 6.20986 11.8289 6.06639 11.7578C5.81525 11.6335 5.51637 11.5904 5.22655 11.6436H5.22557C5.15055 11.6573 5.08558 11.6865 5.03417 11.7227C4.98289 11.7588 4.94815 11.7998 4.92772 11.8379C4.90762 11.8755 4.90023 11.9122 4.90038 11.9453C4.90057 11.9782 4.9084 12.0144 4.9287 12.0518L7.55272 16.8438C8.16912 17.9693 8.90989 18.7622 9.83886 19.2842C10.7737 19.8094 11.9704 20.0996 13.5615 20.0996C14.7902 20.0996 15.9536 19.6533 16.7998 18.8809C17.5619 18.185 18.0996 17.1383 18.0996 14.6543V7.34473C18.0996 7.28204 18.0734 7.20342 17.9951 7.13184C17.9139 7.05771 17.7875 7.00396 17.6406 7.00391C17.4937 7.00391 17.3674 7.05771 17.2861 7.13184C17.2077 7.20347 17.1807 7.28199 17.1807 7.34473V11.0693C17.1805 11.5661 16.778 11.9685 16.2812 11.9688C15.7843 11.9688 15.381 11.5662 15.3808 11.0693V5.48242C15.3808 5.41973 15.3537 5.34107 15.2754 5.26953C15.1941 5.19547 15.0677 5.1416 14.9209 5.1416C14.774 5.14166 14.6476 5.19541 14.5664 5.26953C14.4881 5.34105 14.462 5.41974 14.4619 5.48242V11.0693C14.4617 11.5662 14.0584 11.9688 13.5615 11.9688C13.0646 11.9687 12.6613 11.5662 12.6611 11.0693V4.24121C12.6611 4.17852 12.635 4.09989 12.5566 4.02832C12.4754 3.95419 12.349 3.90045 12.2021 3.90039C12.0552 3.90039 11.9289 3.95421 11.8476 4.02832C11.7692 4.09992 11.7422 4.17849 11.7422 4.24121V11.0693C11.742 11.5661 11.3395 11.9685 10.8428 11.9688C10.3458 11.9688 9.94257 11.5662 9.94237 11.0693V6.10352L9.93651 6.05371C9.92534 6.00177 9.89573 5.94433 9.8369 5.89062C9.75567 5.81647 9.62938 5.76172 9.48241 5.76172C9.33554 5.76179 9.2091 5.81651 9.12792 5.89062C9.04964 5.96222 9.02343 6.04084 9.02343 6.10352V12.7969Z" fill="currentColor"/> +</svg> +`,e9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M4 3.33203C4.55224 3.33203 4.99993 3.7798 5 4.33203V18.0908H20.0674C20.6195 18.0908 21.0671 18.5388 21.0674 19.0908C21.0674 19.6431 20.6197 20.0908 20.0674 20.0908H5C3.89543 20.0908 3 19.1954 3 18.0908V4.33203C3.00007 3.7798 3.44776 3.33203 4 3.33203ZM8.19922 9.28418C8.7515 9.28418 9.19922 9.73189 9.19922 10.2842V15.6045C9.19908 16.1567 8.75142 16.6045 8.19922 16.6045C7.64719 16.6043 7.19936 16.1565 7.19922 15.6045V10.2842C7.19922 9.73202 7.6471 9.28438 8.19922 9.28418ZM17.2227 6.85645C17.7748 6.85658 18.2226 7.3043 18.2227 7.85645V15.6045C18.2225 16.1566 17.7747 16.6044 17.2227 16.6045C16.6705 16.6045 16.2228 16.1566 16.2227 15.6045V7.85645C16.2227 7.30422 16.6704 6.85645 17.2227 6.85645ZM12.7109 3.96387C13.2631 3.96387 13.7107 4.41175 13.7109 4.96387V15.6035C13.7109 16.1558 13.2632 16.6035 12.7109 16.6035C12.1587 16.6035 11.7109 16.1558 11.7109 15.6035V4.96387C11.7111 4.41175 12.1588 3.96387 12.7109 3.96387Z" fill="currentColor"/> +</svg> +`,t9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M8.00916 7.50488C8.47326 7.50488 8.91828 7.68943 9.24646 8.01758C9.57465 8.34577 9.75916 8.79075 9.75916 9.25488C9.75916 9.71901 9.57465 10.164 9.24646 10.4922C8.91828 10.8203 8.47326 11.0049 8.00916 11.0049C7.54507 11.0049 7.10001 10.8203 6.77185 10.4922C6.4437 10.164 6.25916 9.71898 6.25916 9.25488C6.25916 8.79078 6.4437 8.34576 6.77185 8.01758C7.10001 7.68942 7.54507 7.50492 8.00916 7.50488Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M17.8998 4.09961C20.0537 4.09961 21.8002 5.84609 21.8002 8V16C21.8002 18.1539 20.0537 19.9004 17.8998 19.9004H5.89978C3.74598 19.9003 1.99939 18.1538 1.99939 16V8C1.99939 5.84617 3.74598 4.09974 5.89978 4.09961H17.8998ZM15.4867 12.2539C15.448 12.2184 15.3885 12.2192 15.351 12.2559L11.7338 15.8027C11.0146 16.5079 9.87305 16.5222 9.13708 15.835L6.98669 13.8262C6.95049 13.7924 6.89516 13.791 6.85681 13.8223L3.82361 16.2988C3.96873 17.3168 4.84165 18.0995 5.89978 18.0996H17.8998C18.9375 18.0996 19.7964 17.3466 19.9662 16.3574L15.4867 12.2539ZM5.89978 5.90039C4.74009 5.90052 3.80017 6.84028 3.80017 8V14.002L5.73181 12.4238C6.46046 11.8286 7.51253 11.8634 8.20056 12.5059L10.351 14.5146C10.3897 14.5508 10.4498 14.5497 10.4877 14.5127L14.1049 10.9658C14.819 10.2656 15.9506 10.2466 16.6879 10.9219L19.9994 13.9551V8C19.9994 6.8402 19.0596 5.90039 17.8998 5.90039H5.89978Z" fill="currentColor"/> +</svg> +`,n9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M5.09375 2.81174C5.4825 2.50796 6.04376 2.56488 6.34766 2.93869L20.1855 19.9602C20.4895 20.3341 20.421 20.8836 20.0322 21.1877C19.6435 21.4917 19.0823 21.4355 18.7783 21.0617L17.9971 20.1008H5.99609C3.84224 20.1008 2.0958 18.3552 2.0957 16.2014V8.13889C2.09589 6.26755 3.41429 4.70428 5.17285 4.32639L4.93945 4.03928C4.63577 3.66536 4.7051 3.11573 5.09375 2.81174ZM7.13184 14.1096C7.09416 14.0738 7.03659 14.0713 6.99609 14.1037L3.92871 16.5569C4.09761 17.5472 4.95753 18.301 5.99609 18.301H16.5342L13.373 14.4133L11.9072 15.9455C11.1531 16.7324 9.92202 16.7621 9.13281 16.0119L7.13184 14.1096ZM5.99609 6.03928C4.83643 6.03928 3.89669 6.97927 3.89648 8.13889V14.1408L5.83496 12.5901C6.60469 11.9742 7.69929 12.022 8.41504 12.7024L10.416 14.6037C10.4575 14.6431 10.5218 14.642 10.5615 14.6008L12.1641 12.926L9.78906 10.0051C9.70282 10.2646 9.55682 10.5038 9.35645 10.7004C9.02202 11.0285 8.56767 11.2131 8.09473 11.2131C7.62195 11.213 7.1683 11.0284 6.83398 10.7004C6.49961 10.3724 6.31152 9.92701 6.31152 9.46311C6.3116 8.99941 6.49981 8.55474 6.83398 8.22678C7.12986 7.93654 7.51931 7.75901 7.93262 7.7219L6.56543 6.03928H5.99609Z" fill="currentColor"/> +<path d="M18.0049 4.31272C20.1587 4.31288 21.9043 6.0593 21.9043 8.21311V13.718C21.9039 15.4743 19.7248 16.2906 18.5713 14.966L14.9141 10.7658C14.5882 10.3912 14.6278 9.82271 15.002 9.49631C15.3768 9.16994 15.9451 9.20948 16.2715 9.5842L19.9287 13.7844C19.9528 13.812 19.9696 13.8167 19.9775 13.8186C19.9908 13.8216 20.0141 13.8213 20.04 13.8117C20.0655 13.8021 20.0826 13.7875 20.0908 13.7766C20.0955 13.7702 20.1044 13.7552 20.1045 13.718V8.21311C20.1045 7.05341 19.1645 6.11366 18.0049 6.1135H10.6328C10.1361 6.11327 9.73267 5.70981 9.73242 5.21311C9.73242 4.71619 10.136 4.31295 10.6328 4.31272H18.0049Z" fill="currentColor"/> +</svg> +`,i9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M12 2.1001C17.4676 2.10031 21.8994 6.53286 21.8994 12.0005C21.8992 17.4679 17.4674 21.8997 12 21.8999C6.53237 21.8999 2.09982 17.4681 2.09961 12.0005C2.09961 6.53273 6.53224 2.1001 12 2.1001ZM12 3.8999C7.52636 3.8999 3.89941 7.52684 3.89941 12.0005C3.89963 16.474 7.52649 20.1001 12 20.1001C16.4733 20.0999 20.0994 16.4738 20.0996 12.0005C20.0996 7.52697 16.4735 3.90011 12 3.8999ZM12 9.50049C12.4969 9.50068 12.8994 9.87055 12.8994 10.3267V16.6743C12.8992 17.1303 12.4968 17.5003 12 17.5005C11.503 17.5005 11.0998 17.1304 11.0996 16.6743V10.3267C11.0996 9.87043 11.5029 9.50049 12 9.50049ZM12 6.49951C12.4968 6.49951 12.8994 6.90313 12.8994 7.3999C12.8992 7.8965 12.4966 8.30029 12 8.30029C11.5025 8.30028 11.0998 7.8965 11.0996 7.3999C11.0996 6.90313 11.5024 6.49952 12 6.49951Z" fill="currentColor"/> +</svg> +`,s9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2.09998C6.53222 2.09998 2.09998 6.53222 2.09998 12C2.09998 17.4677 6.53222 21.9 12 21.9C17.4677 21.9 21.9 17.4677 21.9 12C21.9 6.53222 17.4677 2.09998 12 2.09998ZM3.89998 12C3.89998 7.52633 7.52633 3.89998 12 3.89998C16.4736 3.89998 20.1 7.52633 20.1 12C20.1 16.4736 16.4736 20.1 12 20.1C7.52633 20.1 3.89998 16.4736 3.89998 12Z" fill="currentColor"/> +<path d="M9.4286 9.47153C9.4286 8.97448 9.83154 8.57153 10.3286 8.57153H11.1C11.5971 8.57153 12 8.97448 12 9.47153C12 9.96859 11.5971 10.3715 11.1 10.3715H10.3286C9.83154 10.3715 9.4286 9.96859 9.4286 9.47153Z" fill="currentColor"/> +<path d="M5.14289 9.47155C5.14289 8.97449 5.54583 8.57155 6.04289 8.57155H7.67146C8.16851 8.57155 8.57146 8.97449 8.57146 9.47155C8.57146 9.9686 8.16851 10.3715 7.67146 10.3715H6.04289C5.54583 10.3715 5.14289 9.9686 5.14289 9.47155Z" fill="currentColor"/> +<path d="M8.57146 16.3287C8.57146 15.8316 8.9744 15.4287 9.47145 15.4287H14.5286C15.0257 15.4287 15.4286 15.8316 15.4286 16.3287C15.4286 16.8257 15.0257 17.2287 14.5286 17.2287H9.47145C8.9744 17.2287 8.57146 16.8257 8.57146 16.3287Z" fill="currentColor"/> +<path d="M6.04288 12.0001C5.54583 12.0001 5.14288 12.403 5.14288 12.9001C5.14288 13.3972 5.54583 13.8001 6.04288 13.8001H6.81431C7.31137 13.8001 7.71431 13.3972 7.71431 12.9001C7.71431 12.403 7.31137 12.0001 6.81431 12.0001H6.04288Z" fill="currentColor"/> +<path d="M9.47145 12.0001C8.9744 12.0001 8.57146 12.403 8.57146 12.9001C8.57146 13.3972 8.9744 13.8001 9.47146 13.8001H10.2429C10.7399 13.8001 11.1429 13.3972 11.1429 12.9001C11.1429 12.403 10.7399 12.0001 10.2429 12.0001H9.47145Z" fill="currentColor"/> +<path d="M12.8572 9.47153C12.8572 8.97448 13.2601 8.57153 13.7572 8.57153H14.5286C15.0257 8.57153 15.4286 8.97448 15.4286 9.47153C15.4286 9.96859 15.0257 10.3715 14.5286 10.3715H13.7572C13.2601 10.3715 12.8572 9.96859 12.8572 9.47153Z" fill="currentColor"/> +<path d="M12.9 12.0001C12.403 12.0001 12 12.403 12 12.9001C12 13.3972 12.403 13.8001 12.9 13.8001H13.6715C14.1685 13.8001 14.5715 13.3972 14.5715 12.9001C14.5715 12.403 14.1685 12.0001 13.6715 12.0001H12.9Z" fill="currentColor"/> +<path d="M16.2857 9.47153C16.2857 8.97448 16.6887 8.57153 17.1857 8.57153H17.9572C18.4542 8.57153 18.8572 8.97448 18.8572 9.47153C18.8572 9.96859 18.4542 10.3715 17.9572 10.3715H17.1857C16.6887 10.3715 16.2857 9.96859 16.2857 9.47153Z" fill="currentColor"/> +<path d="M16.3286 12.0001C15.8315 12.0001 15.4286 12.403 15.4286 12.9001C15.4286 13.3972 15.8315 13.8001 16.3286 13.8001H17.9572C18.4542 13.8001 18.8572 13.3972 18.8572 12.9001C18.8572 12.403 18.4542 12.0001 17.9572 12.0001H16.3286Z" fill="currentColor"/> +</svg> +`,o9e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <path id="bar-divider" d="M 9.3 18.951 L 9.3 4.3" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> + <path id="bar-box" d="M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="butt" stroke-linejoin="miter" transform="matrix(1 0 0 1 11.8 11.8)"/> + <path id="bar-arrow" d="M -1.25 -2.5 L 1.25 0 L -1.25 2.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> +</svg> +`,r9e=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <path id="bar-divider" d="M 9.3 18.951 L 9.3 4.3" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> + <path id="bar-box" d="M -7.9 -4.8 C -7.9 -6.512 -6.512 -7.9 -4.8 -7.9 L 4.8 -7.9 C 6.512 -7.9 7.9 -6.512 7.9 -4.8 L 7.9 4.8 C 7.9 6.512 6.512 7.9 4.8 7.9 L -4.8 7.9 C -6.512 7.9 -7.9 6.512 -7.9 4.8 L -7.9 -4.8 Z" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="butt" stroke-linejoin="miter" transform="matrix(1 0 0 1 11.8 11.8)"/> + <path id="bar-arrow-expand" d="M -1.25 -2.5 L 1.25 0 L -1.25 2.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/> +</svg> +`,l9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g> +<path d="M12.9 1.7999C12.9 1.30285 12.4971 0.899902 12 0.899902C11.5029 0.899902 11.1 1.30285 11.1 1.7999V2.7999C11.1 3.29696 11.5029 3.6999 12 3.6999C12.4971 3.6999 12.9 3.29696 12.9 2.7999V1.7999Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M6.1 11.9999C6.1 8.7414 8.74152 6.09988 12 6.09988C15.2585 6.09988 17.9 8.7414 17.9 11.9999C17.9 15.2584 15.2585 17.8999 12 17.8999C8.74152 17.8999 6.1 15.2584 6.1 11.9999ZM12 7.89988C9.73563 7.89988 7.9 9.73551 7.9 11.9999C7.9 14.2642 9.73563 16.0999 12 16.0999C14.2644 16.0999 16.1 14.2642 16.1 11.9999C16.1 9.73551 14.2644 7.89988 12 7.89988Z" fill="currentColor"/> +<path d="M0.899994 11.9999C0.899994 11.5028 1.30294 11.0999 1.79999 11.0999H2.79999C3.29705 11.0999 3.69999 11.5028 3.69999 11.9999C3.69999 12.4969 3.29705 12.8999 2.79999 12.8999H1.79999C1.30294 12.8999 0.899994 12.4969 0.899994 11.9999Z" fill="currentColor"/> +<path d="M12 20.2991C12.4971 20.2991 12.9 20.702 12.9 21.1991V22.1991C12.9 22.6961 12.4971 23.0991 12 23.0991C11.5029 23.0991 11.1 22.6961 11.1 22.1991V21.1991C11.1 20.702 11.5029 20.2991 12 20.2991Z" fill="currentColor"/> +<path d="M21.2016 11.0999C20.7045 11.0999 20.3016 11.5028 20.3016 11.9999C20.3016 12.4969 20.7045 12.8999 21.2016 12.8999H22.2016C22.6986 12.8999 23.1016 12.4969 23.1016 11.9999C23.1016 11.5028 22.6986 11.0999 22.2016 11.0999H21.2016Z" fill="currentColor"/> +<path d="M20.1995 3.79903C20.551 4.1505 20.551 4.72035 20.1995 5.07182L19.4924 5.77893C19.141 6.1304 18.5711 6.1304 18.2196 5.77893C17.8682 5.42746 17.8682 4.85761 18.2196 4.50614L18.9268 3.79903C19.2782 3.44756 19.8481 3.44756 20.1995 3.79903Z" fill="currentColor"/> +<path d="M19.4942 18.2215C19.1427 17.87 18.5729 17.87 18.2214 18.2215C17.87 18.573 17.87 19.1428 18.2214 19.4943L18.9285 20.2014C19.28 20.5529 19.8498 20.5529 20.2013 20.2014C20.5528 19.8499 20.5528 19.2801 20.2013 18.9286L19.4942 18.2215Z" fill="currentColor"/> +<path d="M5.78079 18.2213C6.13227 18.5727 6.13227 19.1426 5.78079 19.4941L5.07369 20.2012C4.72222 20.5526 4.15237 20.5526 3.8009 20.2012C3.44942 19.8497 3.44942 19.2798 3.8009 18.9284L4.508 18.2213C4.85947 17.8698 5.42932 17.8698 5.78079 18.2213Z" fill="currentColor"/> +<path d="M5.07077 3.79912C4.7193 3.44764 4.14945 3.44764 3.79798 3.79912C3.4465 4.15059 3.4465 4.72044 3.79798 5.07191L4.50508 5.77901C4.85655 6.13049 5.4264 6.13049 5.77787 5.77902C6.12935 5.42754 6.12935 4.85769 5.77787 4.50622L5.07077 3.79912Z" fill="currentColor"/> +</g> +</svg> +`,a9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M3.97427 8.06961C4.99348 7.33581 6.18946 7.1 7.00001 7.1H9.00001C9.49706 7.1 9.90001 7.50294 9.90001 8C9.90001 8.49706 9.49706 8.9 9.00001 8.9H7.00001C6.47755 8.9 5.67353 9.06419 5.02599 9.53039C4.42434 9.96356 3.90001 10.6934 3.90001 12C3.90001 13.3066 4.42434 14.0364 5.02599 14.4696C5.67353 14.9358 6.47755 15.1 7.00001 15.1H9.00001C9.49706 15.1 9.90001 15.5029 9.90001 16C9.90001 16.4971 9.49706 16.9 9.00001 16.9H7.00001C6.18946 16.9 4.99348 16.6642 3.97427 15.9304C2.90917 15.1636 2.10001 13.8934 2.10001 12C2.10001 10.1066 2.90917 8.83644 3.97427 8.06961ZM14.1 8C14.1 7.50294 14.5029 7.1 15 7.1H17C17.8105 7.1 19.0065 7.33581 20.0257 8.06961C21.0908 8.83644 21.9 10.1066 21.9 12C21.9 13.8934 21.0908 15.1636 20.0257 15.9304C19.0065 16.6642 17.8105 16.9 17 16.9H15C14.5029 16.9 14.1 16.4971 14.1 16C14.1 15.5029 14.5029 15.1 15 15.1H17C17.5225 15.1 18.3265 14.9358 18.974 14.4696C19.5757 14.0364 20.1 13.3066 20.1 12C20.1 10.6934 19.5757 9.96356 18.974 9.53039C18.3265 9.06419 17.5225 8.9 17 8.9H15C14.5029 8.9 14.1 8.49706 14.1 8ZM7.10001 12C7.10001 11.5029 7.50295 11.1 8.00001 11.1H16C16.4971 11.1 16.9 11.5029 16.9 12C16.9 12.4971 16.4971 12.9 16 12.9H8.00001C7.50295 12.9 7.10001 12.4971 7.10001 12Z" fill="currentColor"/> +</svg> +`,u9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M4.10001 5.99998C4.10001 5.50292 4.50295 5.09998 5.00001 5.09998H19C19.4971 5.09998 19.9 5.50292 19.9 5.99998C19.9 6.49703 19.4971 6.89998 19 6.89998H5.00001C4.50295 6.89998 4.10001 6.49703 4.10001 5.99998ZM4.10001 12C4.10001 11.5029 4.50295 11.1 5.00001 11.1H19C19.4971 11.1 19.9 11.5029 19.9 12C19.9 12.497 19.4971 12.9 19 12.9H5.00001C4.50295 12.9 4.10001 12.497 4.10001 12ZM4.10001 18C4.10001 17.5029 4.50295 17.1 5.00001 17.1H19C19.4971 17.1 19.9 17.5029 19.9 18C19.9 18.497 19.4971 18.9 19 18.9H5.00001C4.50295 18.9 4.10001 18.497 4.10001 18Z" fill="currentColor"/> +</svg> +`,c9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g> +<path fill-rule="evenodd" clip-rule="evenodd" d="M18 4.09961C20.1539 4.09961 21.9004 5.84609 21.9004 8V16C21.9004 18.1539 20.1539 19.9004 18 19.9004H6C3.84609 19.9004 2.09961 18.1539 2.09961 16V8C2.09961 5.84609 3.84609 4.09961 6 4.09961H18ZM3.90039 16C3.90039 17.1598 4.8402 18.0996 6 18.0996H18C19.1598 18.0996 20.0996 17.1598 20.0996 16V9.49805L13.5361 13.5361C12.5955 14.1147 11.4075 14.1084 10.4727 13.5205L3.90039 9.38672V16ZM6 5.90039C5.0746 5.90039 4.29039 6.49909 4.01074 7.33008L11.4316 11.9971C11.7861 12.2199 12.2361 12.2222 12.5928 12.0029L20.0195 7.43457C19.7725 6.54993 18.9636 5.90039 18 5.90039H6Z" fill="currentColor"/> +</g> +</svg> +`,d9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M17 11.0996C17.4971 11.0996 17.9004 11.5029 17.9004 12C17.9004 12.4971 17.4971 12.9004 17 12.9004H7C6.50294 12.9004 6.09961 12.4971 6.09961 12C6.09961 11.5029 6.50294 11.0996 7 11.0996H17Z" fill="currentColor"/> +</svg> +`,f9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M15.182 3.32802C15.9304 2.72235 17.0309 2.76978 17.724 3.46767L18.5424 4.29189L18.6722 4.43642C19.2377 5.13495 19.234 6.1404 18.6635 6.83486L18.5326 6.97841L18.0248 7.48232C17.9549 7.55172 17.8793 7.61254 17.8021 7.66884C17.9794 8.18027 17.9316 8.7498 17.6595 9.22841C17.6847 9.24522 17.7091 9.2635 17.7328 9.2831L17.8002 9.3456L17.9847 9.53798C19.8515 11.5442 20.4549 14.0022 19.6224 16.2196C19.1921 17.3657 18.4025 18.3827 17.2992 19.203H19.0873L19.1801 19.2079C19.6337 19.2542 19.9877 19.6375 19.9877 20.1034C19.9876 20.5692 19.6337 20.9527 19.1801 20.9989L19.0873 21.0028H13.0385C13.0244 21.0033 13.0104 21.0031 12.9965 21.0028H4.9115C4.41448 21.0028 4.01117 20.6004 4.01111 20.1034C4.01111 19.6064 4.41444 19.203 4.9115 19.203H12.9047C15.7614 18.5471 17.3679 17.1023 17.9369 15.5868C18.4678 14.1726 18.179 12.4782 16.807 10.9188L16.5189 10.6093L16.4574 10.5399C16.4549 10.5368 16.453 10.5333 16.4506 10.5302L12.3011 14.6522C11.6031 15.3454 10.5023 15.3845 9.75818 14.7733L9.61365 14.6425L7.31091 12.3231C6.5717 11.5786 6.57617 10.376 7.32068 9.63662L12.3676 4.62392L12.5121 4.49404C13.0358 4.06988 13.7318 3.96755 14.3402 4.18251C14.3969 4.10597 14.4591 4.03197 14.5287 3.96279L15.0365 3.45791L15.182 3.32802ZM4.83044 12.9335C5.16112 12.6052 5.68305 12.5863 6.03552 12.8759L6.10291 12.9384L9.07361 15.9286L9.13513 15.997C9.42218 16.3514 9.3992 16.8727 9.06873 17.2011C8.7381 17.5294 8.21712 17.5482 7.86462 17.2587L7.79626 17.1972L4.82654 14.2069L4.76501 14.1376C4.47792 13.7831 4.49979 13.2619 4.83044 12.9335ZM13.6693 5.87978L13.6361 5.90126L8.58826 10.914C8.54935 10.9529 8.54943 11.0165 8.58826 11.0556L10.891 13.3739L10.9242 13.3964C10.9602 13.4111 11.0032 13.404 11.0326 13.3749L16.0795 8.3622L16.1019 8.329C16.1117 8.3049 16.1117 8.2779 16.1019 8.2538L16.0804 8.2206L13.7777 5.90224C13.7486 5.87289 13.7054 5.86535 13.6693 5.87978ZM16.3383 4.71376L16.3051 4.73525L15.7972 5.24013C15.7584 5.27904 15.7585 5.34166 15.7972 5.38076L16.6146 6.20498L16.6478 6.22744C16.6838 6.24221 16.7268 6.23487 16.7562 6.20595L17.264 5.70107L17.2865 5.66787C17.2962 5.64382 17.2963 5.61672 17.2865 5.59267L17.265 5.55947L16.4467 4.73623C16.4174 4.70681 16.3744 4.6992 16.3383 4.71376Z" fill="currentColor"/> +</svg> +`,h9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M6 12C6 12.8283 5.32834 13.5 4.5 13.5C3.67166 13.5 3 12.8283 3 12C3 11.1717 3.67166 10.5 4.5 10.5C5.32834 10.5 6 11.1717 6 12Z" fill="currentColor"/> +<path d="M13.5 12C13.5 12.8283 12.8283 13.5 12 13.5C11.1717 13.5 10.5 12.8283 10.5 12C10.5 11.1717 11.1717 10.5 12 10.5C12.8283 10.5 13.5 11.1717 13.5 12Z" fill="currentColor"/> +<path d="M19.5002 13.5C20.3287 13.5 21 12.8287 21 12.0002C21 11.1718 20.3287 10.5 19.5002 10.5C18.6718 10.5 18 11.1718 18 12.0002C18 12.8287 18.6718 13.5 19.5002 13.5Z" fill="currentColor"/> +</svg> +`,p9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M8 12.0993C8.49691 12.0993 8.90016 12.5028 8.90039 12.9997V17.9997C8.90039 19.6013 7.60163 20.9001 6 20.9001C4.39837 20.9001 3.09961 19.6013 3.09961 17.9997C3.09984 16.3982 4.39852 15.0993 6 15.0993C6.38939 15.0993 6.76033 15.1778 7.09961 15.317V12.9997C7.09984 12.5028 7.50309 12.0993 8 12.0993ZM6 16.9001C5.39263 16.9001 4.90062 17.3923 4.90039 17.9997C4.90039 18.6072 5.39249 19.0993 6 19.0993C6.60751 19.0993 7.09961 18.6072 7.09961 17.9997C7.09938 17.3923 6.60737 16.9001 6 16.9001Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M18.627 3.35611C19.8025 3.12106 20.9001 4.02068 20.9004 5.21939V15.9997C20.9004 17.6013 19.6016 18.9001 18 18.9001C16.3984 18.9001 15.0996 17.6013 15.0996 15.9997C15.0998 14.3982 16.3985 13.0993 18 13.0993C18.3894 13.0993 18.7603 13.1778 19.0996 13.317V9.21939C19.0993 9.15657 19.0421 9.10946 18.9805 9.12173L12.6768 10.3825C12.1894 10.4799 11.7148 10.1637 11.6172 9.67642C11.52 9.18922 11.8361 8.71439 12.3232 8.61685L18.627 7.35611C18.7868 7.32415 18.9452 7.31502 19.0996 7.32291V5.21939C19.0993 5.15657 19.0421 5.10946 18.9805 5.12173L12.6768 6.38248C12.1894 6.47994 11.7148 6.16372 11.6172 5.67642C11.52 5.18922 11.8361 4.71439 12.3232 4.61685L18.627 3.35611ZM18 14.9001C17.3926 14.9001 16.9006 15.3923 16.9004 15.9997C16.9004 16.6072 17.3925 17.0993 18 17.0993C18.6075 17.0993 19.0996 16.6072 19.0996 15.9997C19.0994 15.3923 18.6074 14.9001 18 14.9001Z" fill="currentColor"/> +<path d="M7.32422 5.38931C7.61669 4.87032 8.38346 4.87015 8.67578 5.38931L8.73047 5.50845L8.89551 5.95376L8.97949 6.1481C9.19937 6.58817 9.57968 6.93145 10.0459 7.10415L10.4912 7.26919C11.127 7.50461 11.1666 8.36217 10.6104 8.67544L10.4912 8.73013L10.0459 8.89517C9.5799 9.06783 9.19939 9.41141 8.97949 9.85123L8.89551 10.0456L8.73047 10.4909C8.49495 11.1267 7.63737 11.1665 7.32422 10.61L7.26953 10.4909L7.10449 10.0456C6.93172 9.57931 6.58767 9.19898 6.14746 8.97916L5.9541 8.89517L5.50879 8.73013C4.83054 8.47903 4.83061 7.52037 5.50879 7.26919L5.9541 7.10415L6.14746 7.02017C6.58757 6.80032 6.93176 6.41995 7.10449 5.95376L7.26953 5.50845L7.32422 5.38931Z" fill="currentColor"/> +</svg> +`,g9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M17.9551 6.32648C17.955 5.82951 17.5517 5.42706 17.0547 5.42706H15.4844C14.9875 5.42717 14.5851 5.82958 14.585 6.32648V17.6732C14.585 18.1701 14.9874 18.5734 15.4844 18.5735H17.0547C17.5518 18.5735 17.9551 18.1702 17.9551 17.6732V6.32648ZM19.7549 17.6732C19.7549 19.1643 18.5459 20.3734 17.0547 20.3734H15.4844C13.9933 20.3732 12.7842 19.1643 12.7842 17.6732V6.32648C12.7843 4.83546 13.9934 3.62639 15.4844 3.62628H17.0547C18.5458 3.62628 19.7548 4.8354 19.7549 6.32648V17.6732Z" fill="currentColor"/> +<path d="M9.41571 6.32648C9.41561 5.82951 9.01231 5.42706 8.51532 5.42706H6.94501C6.44811 5.42717 6.0457 5.82958 6.04559 6.32648V17.6732C6.04559 18.1701 6.44804 18.5734 6.94501 18.5735H8.51532C9.01238 18.5735 9.41571 18.1702 9.41571 17.6732V6.32648ZM11.2155 17.6732C11.2155 19.1643 10.0065 20.3734 8.51532 20.3734H6.94501C5.45393 20.3732 4.24481 19.1643 4.24481 17.6732V6.32648C4.24492 4.83546 5.45399 3.62639 6.94501 3.62628H8.51532C10.0064 3.62628 11.2154 4.8354 11.2155 6.32648V17.6732Z" fill="currentColor"/> +</svg> +`,m9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M18.0176 4.89998C17.7305 4.89998 17.4552 5.014 17.2522 5.217L6.35429 16.1149C5.957 16.5122 5.67517 17.01 5.53889 17.5551L5.23691 18.763L6.44486 18.4611C6.98994 18.3248 7.48773 18.0429 7.88502 17.6456L18.783 6.74773C18.8834 6.64728 18.9631 6.52797 19.0176 6.39658C19.072 6.26517 19.1 6.12441 19.1 5.98236C19.1 5.84031 19.072 5.69956 19.0176 5.56815C18.9631 5.43676 18.8834 5.31745 18.783 5.217C18.6825 5.11649 18.5631 5.03676 18.4318 4.98237C18.3005 4.92798 18.1597 4.89998 18.0176 4.89998ZM15.9794 3.94421C16.52 3.40366 17.2531 3.09998 18.0176 3.09998C18.3961 3.09998 18.7709 3.17452 19.1207 3.31938C19.4704 3.46424 19.7881 3.67656 20.0558 3.94421C20.3235 4.21192 20.5357 4.52969 20.6805 4.87932C20.8254 5.22895 20.9 5.60375 20.9 5.98236C20.9 6.36098 20.8254 6.73578 20.6805 7.08541C20.5357 7.43504 20.3235 7.75281 20.0558 8.02052L17.6385 10.4378L9.15781 18.9184C8.52984 19.5464 7.74301 19.9919 6.88142 20.2073L4.21828 20.8731C3.91158 20.9498 3.58714 20.8599 3.3636 20.6364C3.14006 20.4128 3.05019 20.0884 3.12686 19.7817L3.79264 17.1185C4.00803 16.257 4.45351 15.4701 5.0815 14.8421L15.9794 3.94421Z" fill="currentColor"/> +</svg> +`,v9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M7.76251 3.10547C8.25776 3.10552 8.74422 3.23849 9.17072 3.49023L19.533 9.60742C20.8536 10.3869 21.2922 12.0901 20.5174 13.4121C20.2785 13.8195 19.9398 14.1604 19.533 14.4004L9.16974 20.5156C7.84721 21.2958 6.14595 20.8511 5.36993 19.5273C5.1196 19.1003 4.98719 18.6142 4.98712 18.1191V5.88672C4.98716 4.3537 6.2273 3.10547 7.76251 3.10547ZM6.7879 18.1191C6.78797 18.2945 6.8343 18.4664 6.92267 18.6172C7.19638 19.0841 7.79336 19.2377 8.25568 18.9648L18.618 12.8496C18.7607 12.7654 18.8803 12.6458 18.9647 12.502C19.2393 12.0334 19.082 11.4311 18.618 11.1572L8.25568 5.04102C8.1061 4.95273 7.93562 4.9063 7.76251 4.90625C7.22703 4.90625 6.78794 5.34218 6.7879 5.88672V18.1191Z" fill="currentColor"/> +</svg> +`,y9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M18.36 6.64a9 9 0 1 1-12.73 0" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> +<path d="M12 2v10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> +</svg> +`,k9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z" fill="currentColor"/> +<path d="M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 3.7998C7.47126 3.7998 3.7998 7.47126 3.7998 12C3.7998 16.5287 7.47126 20.2002 12 20.2002C16.5287 20.2002 20.2002 16.5287 20.2002 12C20.2002 7.47126 16.5287 3.7998 12 3.7998Z" fill="currentColor"/> +</svg> +`,b9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M12 2C13.1046 2 14 2.89543 14 4C14 4.78019 13.552 5.45353 12.9004 5.7832V7H16.5C18.1569 7 19.5 8.34315 19.5 10V17C19.5 18.6051 18.2394 19.9158 16.6543 19.9961L16.5 20H7.5L7.3457 19.9961C5.81166 19.9184 4.58163 18.6883 4.50391 17.1543L4.5 17V10C4.5 8.34315 5.84315 7 7.5 7H11.0996V5.7832C10.448 5.45353 10 4.78019 10 4C10 2.89543 10.8954 2 12 2ZM7.5 8.7998C6.83726 8.7998 6.2998 9.33726 6.2998 10V17C6.2998 17.6627 6.83726 18.2002 7.5 18.2002H16.5C17.1627 18.2002 17.7002 17.6627 17.7002 17V10C17.7002 9.33726 17.1627 8.7998 16.5 8.7998H7.5ZM3 10.7666C3.49706 10.7666 3.90039 11.1699 3.90039 11.667V15C3.90039 15.4971 3.49706 15.9004 3 15.9004C2.50294 15.9004 2.09961 15.4971 2.09961 15V11.667C2.09961 11.1699 2.50294 10.7666 3 10.7666ZM21 10.7666C21.4971 10.7666 21.9004 11.1699 21.9004 11.667V15C21.9004 15.4971 21.4971 15.9004 21 15.9004C20.5029 15.9004 20.0996 15.4971 20.0996 15V11.667C20.0996 11.1699 20.5029 10.7666 21 10.7666ZM9.5 11.0996C9.99706 11.0996 10.4004 11.5029 10.4004 12V14.5C10.4004 14.9971 9.99706 15.4004 9.5 15.4004C9.00294 15.4004 8.59961 14.9971 8.59961 14.5V12C8.59961 11.5029 9.00294 11.0996 9.5 11.0996ZM14.5 11.0996C14.9971 11.0996 15.4004 11.5029 15.4004 12V14.5C15.4004 14.9971 14.9971 15.4004 14.5 15.4004C14.0029 15.4004 13.5996 14.9971 13.5996 14.5V12C13.5996 11.5029 14.0029 11.0996 14.5 11.0996ZM12 3.5C11.7239 3.5 11.5 3.72386 11.5 4C11.5 4.27614 11.7239 4.5 12 4.5C12.2761 4.5 12.5 4.27614 12.5 4C12.5 3.72386 12.2761 3.5 12 3.5Z" fill="currentColor"/> +</svg> +`,A9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M11.5 3C16.1944 3 20 6.80558 20 11.5C20 13.523 19.2933 15.381 18.1132 16.8404L21.1364 19.8636C21.4879 20.2151 21.4879 20.7849 21.1364 21.1364C20.7849 21.4879 20.2151 21.4879 19.8636 21.1364L16.8404 18.1132C15.381 19.2933 13.523 20 11.5 20C6.80558 20 3 16.1944 3 11.5C3 6.80558 6.80558 3 11.5 3ZM11.5 18.2C15.2003 18.2 18.2 15.2003 18.2 11.5C18.2 7.79969 15.2003 4.8 11.5 4.8C7.79969 4.8 4.8 7.79969 4.8 11.5C4.8 15.2003 7.79969 18.2 11.5 18.2Z" fill="currentColor"/> +</svg> +`,C9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M16.5364 10.1636C16.8879 10.5151 16.8879 11.0849 16.5364 11.4364C16.1849 11.7879 15.6151 11.7879 15.2636 11.4364L12.9 9.07281V17.1C12.9 17.597 12.4971 18 12 18C11.503 18 11.1 17.597 11.1 17.1V9.07281L8.73641 11.4364C8.38494 11.7879 7.81509 11.7879 7.46362 11.4364C7.11214 11.0849 7.11214 10.5151 7.46362 10.1636L11.3636 6.2636C11.7151 5.91211 12.2849 5.91211 12.6364 6.2636L16.5364 10.1636Z" fill="currentColor"/> +</svg> +`,w9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M16.0404 12C16.0404 9.76874 14.2313 7.9596 12.0001 7.9596C9.76883 7.9596 7.95972 9.76874 7.95972 12C7.95972 14.2313 9.76883 16.0404 12.0001 16.0404C14.2313 16.0404 16.0404 14.2313 16.0404 12ZM14.2222 12C14.2222 13.2271 13.2271 14.2222 12 14.2222C10.7729 14.2222 9.77783 13.2271 9.77783 12C9.77783 10.7729 10.7729 9.77778 12 9.77778C13.2271 9.77778 14.2222 10.7729 14.2222 12Z" fill="currentColor"/> +<path d="M9.91145 21.8009C9.29001 21.6797 8.76914 21.2612 8.50632 20.6922L8.07372 19.7556C7.88838 19.3544 7.43553 19.1048 6.95371 19.1549L5.89572 19.2647C5.2733 19.3293 4.64823 19.114 4.22298 18.6611C3.74343 18.1504 3.32454 17.6037 2.97033 17.0181C2.61571 16.4318 2.32839 15.8106 2.10407 15.1566C1.89769 14.5549 2.02148 13.8954 2.4089 13.3902L3.0376 12.5704C3.30043 12.2277 3.30042 11.7722 3.03758 11.4295L2.40413 10.6035C2.01474 10.0958 1.891 9.43198 2.10208 8.82826C2.55037 7.54612 3.27017 6.35997 4.22 5.34259C4.64518 4.8872 5.27275 4.67067 5.89701 4.73544L6.95383 4.84514C7.43561 4.89515 7.88844 4.6456 8.07377 4.24441L8.50266 3.31593C8.76494 2.74818 9.28448 2.33019 9.90423 2.20761C11.2916 1.9332 12.7148 1.93127 14.0885 2.19913C14.7099 2.32029 15.2308 2.73881 15.4937 3.3078L15.9263 4.24441C16.1116 4.6456 16.5644 4.89514 17.0462 4.84514L18.1043 4.73532C18.7267 4.67072 19.3518 4.88603 19.777 5.33886C20.2566 5.84953 20.6755 6.3963 21.0297 6.98193C21.3843 7.56823 21.6716 8.18942 21.8959 8.84339C22.1023 9.44509 21.9785 10.1046 21.5911 10.6098L20.9624 11.4295C20.6996 11.7722 20.6996 12.2278 20.9624 12.5705L21.5959 13.3964C21.9853 13.9042 22.109 14.568 21.8979 15.1717C21.4497 16.4538 20.7299 17.6399 19.7801 18.6573C19.3549 19.1128 18.7273 19.3294 18.103 19.2646L17.0462 19.1549C16.5645 19.1049 16.1116 19.3544 15.9263 19.7556L15.4974 20.6841C15.2351 21.2518 14.7156 21.6698 14.0958 21.7924C12.7083 22.0668 11.2852 22.0687 9.91145 21.8009ZM13.7432 20.0088C13.7844 20.0006 13.8259 19.9673 13.847 19.9216L14.2758 18.9931C14.7915 17.8768 15.9886 17.2171 17.2341 17.3464L18.2909 17.4561C18.3649 17.4638 18.4272 17.4423 18.4512 17.4166C19.2296 16.5828 19.8171 15.6146 20.1817 14.5716C20.1845 14.5636 20.1796 14.5373 20.1532 14.5029L19.5198 13.677C18.7564 12.6815 18.7564 11.3185 19.5198 10.323L20.1485 9.5033C20.1746 9.46927 20.1795 9.4429 20.1762 9.43327C19.9932 8.89965 19.7603 8.39623 19.4741 7.92293C19.1873 7.4489 18.846 7.00333 18.4517 6.58351C18.4272 6.55739 18.3656 6.53616 18.2921 6.54378L17.234 6.65361C15.9886 6.78287 14.7915 6.12317 14.2758 5.00689L13.8432 4.07027C13.822 4.02448 13.7811 3.9916 13.7406 3.98371C12.5983 3.76097 11.4132 3.76258 10.2571 3.99124C10.2158 3.99941 10.1744 4.03271 10.1533 4.07842L9.72441 5.00689C9.20875 6.12317 8.01164 6.7829 6.76619 6.6536L5.70942 6.54391C5.63535 6.53623 5.573 6.55774 5.54905 6.5834C4.77067 7.41713 4.18312 8.38534 3.81845 9.42835C3.81564 9.43637 3.82054 9.46265 3.84693 9.49706L4.48038 10.323C5.24381 11.3185 5.24383 12.6815 4.48041 13.6769L3.85171 14.4967C3.82561 14.5307 3.82066 14.5571 3.82396 14.5667C4.00701 15.1004 4.23986 15.6038 4.52613 16.0771C4.81284 16.5511 5.15421 16.9967 5.54845 17.4165C5.57298 17.4426 5.63461 17.4638 5.70811 17.4562L6.76608 17.3464C8.01157 17.2171 9.20871 17.8768 9.72438 18.9932L10.157 19.9297C10.1781 19.9755 10.2191 20.0084 10.2595 20.0163C11.4018 20.239 12.587 20.2374 13.7432 20.0088Z" fill="currentColor"/> +</svg> +`,x9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M17 2C19.2091 2 21 3.79086 21 6V15.7646C21 17.2361 20.192 18.5884 18.8965 19.2861L13.8965 21.9785C12.7126 22.616 11.2874 22.616 10.1035 21.9785L5.10352 19.2861C3.80802 18.5884 3 17.2361 3 15.7646V6C3 3.79086 4.79086 2 7 2H17ZM7 3.7998C5.78498 3.7998 4.79981 4.78497 4.7998 6V15.7646C4.7998 16.574 5.24443 17.3184 5.95703 17.7021L10.957 20.3936C11.6082 20.7442 12.3918 20.7442 13.043 20.3936L18.043 17.7021C18.7556 17.3184 19.2002 16.574 19.2002 15.7646V6C19.2002 4.78497 18.215 3.7998 17 3.7998H7Z" fill="currentColor"/> +<path d="M10.1611 7.37109C10.9017 6.79576 11.8605 6.60385 12.7881 6.8457C13.808 7.10861 14.6385 7.93756 14.9014 8.95898C15.2694 10.3845 14.5793 11.8629 13.2598 12.4736C13.0803 12.557 12.75 12.9552 12.75 13.3525V13.502C12.75 13.9172 12.4142 14.2527 11.999 14.2529C11.5837 14.2529 11.248 13.9173 11.248 13.502V13.3525C11.248 12.313 11.9587 11.4215 12.6279 11.1113C13.1777 10.8567 13.6681 10.192 13.4473 9.33496C13.3195 8.84253 12.9038 8.42684 12.4121 8.2998C11.9292 8.17289 11.4573 8.26727 11.0811 8.55859C10.71 8.84626 10.4971 9.28012 10.4971 9.74805C10.4968 10.1632 10.1613 10.499 9.74609 10.499C9.33092 10.499 8.99536 10.1632 8.99512 9.74805C8.99512 8.81152 9.41918 7.94493 10.1611 7.37109Z" fill="currentColor"/> +<path d="M11.999 15.0049C12.6208 15.0049 13.1259 15.5091 13.126 16.1309C13.126 16.7528 12.6209 17.2578 11.999 17.2578C11.3773 17.2576 10.873 16.7526 10.873 16.1309C10.8732 15.5092 11.3774 15.0051 11.999 15.0049Z" fill="currentColor"/> +</svg> +`,S9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M2.90005 12C2.90005 11.503 3.303 11.1 3.80005 11.1H12.2939L9.38588 8.19197C9.03441 7.8405 9.03441 7.27065 9.38588 6.91918C9.73735 6.56771 10.3072 6.56771 10.6587 6.91918L15.1031 11.3636C15.2719 11.5324 15.3667 11.7613 15.3667 12C15.3667 12.2387 15.2719 12.4676 15.1031 12.6364L10.6587 17.0809C10.3072 17.4323 9.73735 17.4323 9.38588 17.0809C9.03441 16.7294 9.03441 16.1595 9.38588 15.8081L12.2939 12.9H3.80005C3.303 12.9 2.90005 12.4971 2.90005 12ZM13.5874 20C13.5874 19.503 13.9904 19.1 14.4874 19.1H18.043C18.2758 19.1 18.4991 19.0075 18.6637 18.8429C18.8283 18.6783 18.9208 18.455 18.9208 18.2222V5.7778C18.9208 5.545 18.8283 5.32174 18.6637 5.15712C18.499 4.9925 18.2758 4.90002 18.043 4.90002H14.4874C13.9904 4.90002 13.5874 4.49708 13.5874 4.00002C13.5874 3.50297 13.9904 3.10003 14.4874 3.10003H18.043C18.7532 3.10003 19.4343 3.38215 19.9365 3.88433C20.4386 4.38651 20.7208 5.06761 20.7208 5.7778V18.2222C20.7208 18.9324 20.4386 19.6135 19.9365 20.1157C19.4343 20.6179 18.7532 20.9 18.043 20.9H14.4874C13.9904 20.9 13.5874 20.4971 13.5874 20Z" fill="currentColor"/> +</svg> +`,_9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M20.6364 11.3636C20.9879 11.7151 20.9879 12.2849 20.6364 12.6364L16.1919 17.0808C15.8405 17.4323 15.2706 17.4323 14.9192 17.0808C14.5677 16.7293 14.5677 16.1595 14.9192 15.808L17.8272 12.9H9.33333C8.83627 12.9 8.43333 12.497 8.43333 12C8.43333 11.5029 8.83627 11.1 9.33333 11.1H17.8272L14.9192 8.19193C14.5677 7.84046 14.5677 7.27061 14.9192 6.91914C15.2706 6.56766 15.8405 6.56766 16.1919 6.91914L20.6364 11.3636ZM10.2333 3.99998C10.2333 4.49703 9.83038 4.89998 9.33333 4.89998H5.77777C5.54497 4.89998 5.3217 4.99246 5.15709 5.15707C4.99247 5.32169 4.89999 5.54495 4.89999 5.77775V18.2222C4.89999 18.455 4.99247 18.6783 5.15709 18.8429C5.32171 19.0075 5.54497 19.1 5.77777 19.1H9.33333C9.83038 19.1 10.2333 19.5029 10.2333 20C10.2333 20.497 9.83038 20.9 9.33333 20.9H5.77777C5.06758 20.9 4.38648 20.6179 3.8843 20.1157C3.38212 19.6135 3.09999 18.9324 3.09999 18.2222V5.77775C3.09999 5.06756 3.38212 4.38646 3.8843 3.88428C4.38648 3.3821 5.06758 3.09998 5.77777 3.09998H9.33333C9.83038 3.09998 10.2333 3.50292 10.2333 3.99998Z" fill="currentColor"/> +</svg> +`,I9e='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M18.0 6H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="16" cy="6" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M4 12H6.5" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M10.5 12H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="8.5" cy="12" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M4 18H14.0" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><path d="M18.0 18H20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/><circle cx="16" cy="18" r="2.0" fill="none" stroke="currentColor" stroke-width="1.8"/></svg>',M9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M7.78027 8.90405C7.5 9.45411 7.5 10.1742 7.5 11.6144V12.3856C7.5 13.8258 7.5 14.5459 7.78027 15.096C8.02681 15.5798 8.42019 15.9732 8.90405 16.2197C9.45411 16.5 10.1742 16.5 11.6144 16.5H12.3856C13.8258 16.5 14.5459 16.5 15.096 16.2197C15.5798 15.9732 15.9732 15.5798 16.2197 15.096C16.5 14.5459 16.5 13.8258 16.5 12.3856V11.6144C16.5 10.1742 16.5 9.45411 16.2197 8.90405C15.9732 8.42019 15.5798 8.02681 15.096 7.78027C14.5459 7.5 13.8258 7.5 12.3856 7.5H11.6144C10.1742 7.5 9.45411 7.5 8.90405 7.78027C8.42019 8.02681 8.02681 8.42019 7.78027 8.90405Z" fill="currentColor"/> +</svg> +`,E9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M7.01562 3.41459C7.4446 3.16449 7.9954 3.30924 8.24609 3.73784C8.49645 4.167 8.35189 4.71868 7.92285 4.96928C5.51497 6.37506 3.90054 8.98498 3.90039 11.9703C3.90076 16.4435 7.52672 20.0699 12 20.0699C16.4733 20.0699 20.0992 16.4435 20.0996 11.9703C20.0996 11.2291 20 10.5116 19.8145 9.83159C19.6838 9.35222 19.967 8.85702 20.4463 8.72612C20.9256 8.59541 21.4207 8.87778 21.5518 9.35698C21.7792 10.1901 21.9004 11.0674 21.9004 11.9703C21.9 17.4376 17.4674 21.8697 12 21.8697C6.53261 21.8697 2.09998 17.4376 2.09961 11.9703C2.09976 8.31904 4.07782 5.12972 7.01562 3.41459ZM8.39258 8.24077C8.75015 7.89591 9.3199 7.90591 9.66504 8.26323C10.01 8.62076 9.99985 9.19051 9.64258 9.53569C9.00203 10.1541 8.60558 11.02 8.60547 11.979C8.60584 13.8536 10.1253 15.3736 12 15.3736C13.8746 15.3735 15.3942 13.8536 15.3945 11.979C15.3945 11.6847 15.3577 11.3989 15.2881 11.1285C15.1646 10.6474 15.4536 10.1568 15.9346 10.0328C16.4158 9.9089 16.9071 10.1991 17.0312 10.6802C17.1383 11.096 17.1943 11.5321 17.1943 11.979C17.194 14.8477 14.8688 17.1733 12 17.1734C9.1312 17.1734 6.80506 14.8478 6.80469 11.979C6.8048 10.5117 7.41519 9.18431 8.39258 8.24077ZM11.5459 1.12651C11.8216 0.965605 12.1631 0.963306 12.4414 1.11967L19.1953 4.91752C19.4859 5.08108 19.662 5.39277 19.6533 5.72612C19.6443 6.05972 19.4515 6.36154 19.1523 6.50932L12.9004 9.5933V12.2583C12.9004 12.7554 12.4971 13.1587 12 13.1587C11.5029 13.1587 11.0996 12.7554 11.0996 12.2583V1.90385C11.0999 1.58444 11.2702 1.2878 11.5459 1.12651ZM12.9004 7.58549L16.8252 5.64897L12.9004 3.44194V7.58549Z" fill="currentColor"/> +</svg> +`,T9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M18.9893 6.60743C20.5897 6.60757 21.8877 7.8926 21.8877 9.47736C21.8877 10.7416 21.0607 11.8129 19.9141 12.1955V14.257C19.914 15.8428 18.6152 17.1288 17.0137 17.1289H12.8438V20.1381C12.8437 20.6301 12.4412 21.0293 11.9443 21.0296C11.4473 21.0296 11.044 20.6302 11.0439 20.1381V16.4356C11.0441 15.8343 11.5363 15.3461 12.1436 15.3458H17.0137C17.6211 15.3457 18.1133 14.8585 18.1133 14.257V12.2129C16.9408 11.8451 16.0909 10.7598 16.0908 9.47736C16.0908 7.89251 17.3887 6.60743 18.9893 6.60743ZM18.9893 8.38953C18.3828 8.38953 17.8906 8.87684 17.8906 9.47736C17.8907 10.0778 18.3828 10.5642 18.9893 10.5642C19.5956 10.5641 20.0869 10.0777 20.0869 9.47736C20.0869 8.87693 19.5956 8.38967 18.9893 8.38953Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M4.89844 6.60743C6.49899 6.60747 7.79688 7.89254 7.79688 9.47736C7.79684 10.7388 6.97371 11.8078 5.83105 12.1926V14.4021C5.83105 15.0036 6.32315 15.4918 6.93066 15.4918H8.37109C8.86789 15.492 9.27038 15.8905 9.27051 16.3824C9.27051 16.8744 8.86797 17.2737 8.37109 17.2739H6.93066C5.32904 17.2739 4.03027 15.9879 4.03027 14.4021V12.2158C2.85382 11.8504 2.00004 10.7627 2 9.47736C2 7.89251 3.29784 6.60743 4.89844 6.60743ZM4.89844 8.38953C4.29196 8.38953 3.7998 8.87684 3.7998 9.47736C3.79985 10.0778 4.29198 10.5642 4.89844 10.5642C5.50485 10.5642 5.99605 10.0778 5.99609 9.47736C5.99609 8.87687 5.50488 8.38958 4.89844 8.38953Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9434 2.9707C13.5439 2.97075 14.8418 4.25581 14.8418 5.84063C14.8418 7.11413 14.0035 8.1923 12.8438 8.56745V13.0135C12.8436 13.5056 12.4403 13.9041 11.9434 13.9041C11.4466 13.9039 11.0431 13.5055 11.043 13.0135V8.56745C9.8836 8.19209 9.04496 7.11387 9.04492 5.84063C9.04492 4.25592 10.343 2.97093 11.9434 2.9707ZM11.9434 4.75281C11.3371 4.75303 10.8447 5.24026 10.8447 5.84063C10.8448 6.44097 11.3371 6.92726 11.9434 6.92749C12.5498 6.92745 13.041 6.44108 13.041 5.84063C13.041 5.24014 12.5498 4.75285 11.9434 4.75281Z" fill="currentColor"/> +</svg> +`,L9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M16.5293 15.0596C16.9496 15.1021 17.2772 15.4572 17.2773 15.8887C17.2773 16.3202 16.9497 16.6753 16.5293 16.7178L16.4443 16.7217H12C11.5399 16.7216 11.167 16.3488 11.167 15.8887C11.1671 15.4286 11.54 15.0558 12 15.0557H16.4443L16.5293 15.0596Z" fill="currentColor"/> +<path d="M6.96582 7.52246C7.27077 7.21751 7.75375 7.1983 8.08105 7.46484L8.14453 7.52246L10.8232 10.2002C11.5102 10.8872 11.5102 12.0014 10.8232 12.6885L8.14453 15.3672L8.08105 15.4248C7.75377 15.6913 7.27075 15.6721 6.96582 15.3672C6.66114 15.0621 6.64234 14.5791 6.90918 14.252L6.96582 14.1885L9.64453 11.5098C9.68057 11.4736 9.68062 11.415 9.64453 11.3789L6.96582 8.7002C6.64116 8.37488 6.6411 7.84774 6.96582 7.52246Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M17 3.09961C19.1539 3.09966 20.9004 4.84612 20.9004 7V17C20.9004 19.1539 19.1539 20.9003 17 20.9004H7C4.84609 20.9004 3.09961 19.1539 3.09961 17V7C3.09961 4.84609 4.84609 3.09961 7 3.09961H17ZM7 4.90039C5.8402 4.90039 4.90039 5.8402 4.90039 7V17C4.90039 18.1598 5.8402 19.0996 7 19.0996H17C18.1598 19.0996 19.0996 18.1598 19.0996 17V7C19.0996 5.84024 18.1598 4.90044 17 4.90039H7Z" fill="currentColor"/> +</svg> +`,N9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M16.9971 3.90597C15.9799 2.99725 14.7342 2.38312 13.394 2.12966C12.0538 1.8762 10.6699 1.99301 9.39111 2.46751C8.11236 2.94202 6.98721 3.75626 6.13676 4.82261C5.2863 5.88896 4.74274 7.16703 4.56457 8.5193C4.40455 9.70501 4.53253 10.9118 4.93767 12.0376C5.34281 13.1634 6.01318 14.175 6.89207 14.9868C7.43557 15.4634 7.87413 16.0477 8.17997 16.7027C8.48581 17.3577 8.65224 18.0691 8.66873 18.7918V18.926C8.66962 19.7412 8.99387 20.5229 9.57035 21.0993C10.1468 21.6758 10.9285 22.0001 11.7437 22.001H12.2604C13.0757 22.0001 13.8573 21.6758 14.4338 21.0993C15.0103 20.5229 15.3345 19.7412 15.3354 18.926V18.4685C15.3479 17.8297 15.4982 17.2011 15.7761 16.6258C16.0539 16.0505 16.4528 15.542 16.9454 15.1351C17.7442 14.4355 18.3853 13.5741 18.826 12.608C19.2668 11.642 19.4973 10.5932 19.5022 9.53136C19.5071 8.46948 19.2863 7.41869 18.8544 6.4486C18.4225 5.4785 17.7894 4.61125 16.9971 3.9043V3.90597ZM12.2604 20.3343H11.7437C11.3704 20.3339 11.0124 20.1853 10.7484 19.9213C10.4844 19.6573 10.3358 19.2993 10.3354 18.926C10.3354 18.926 10.3296 18.7093 10.3287 18.6676H13.6687V18.926C13.6683 19.2993 13.5198 19.6573 13.2558 19.9213C12.9917 20.1853 12.6338 20.3339 12.2604 20.3343ZM15.8437 13.8835C14.8949 14.7064 14.2097 15.7908 13.8737 17.001H12.8354V11.0143C13.3212 10.8426 13.742 10.5249 14.0403 10.1049C14.3387 9.68482 14.4999 9.18285 14.5021 8.66763C14.5021 8.44662 14.4143 8.23466 14.258 8.07838C14.1017 7.9221 13.8897 7.8343 13.6687 7.8343C13.4477 7.8343 13.2358 7.9221 13.0795 8.07838C12.9232 8.23466 12.8354 8.44662 12.8354 8.66763C12.8354 8.88865 12.7476 9.10061 12.5913 9.25689C12.435 9.41317 12.2231 9.50097 12.0021 9.50097C11.7811 9.50097 11.5691 9.41317 11.4128 9.25689C11.2565 9.10061 11.1687 8.88865 11.1687 8.66763C11.1687 8.44662 11.0809 8.23466 10.9247 8.07838C10.7684 7.9221 10.5564 7.8343 10.3354 7.8343C10.1144 7.8343 9.90242 7.9221 9.74614 8.07838C9.58986 8.23466 9.50207 8.44662 9.50207 8.66763C9.5042 9.18285 9.66547 9.68482 9.96381 10.1049C10.2621 10.5249 10.683 10.8426 11.1687 11.0143V17.001H10.0671C9.69123 15.7586 8.98633 14.6411 8.02707 13.7668C7.21286 13.0081 6.63267 12.0324 6.35496 10.9547C6.07725 9.87703 6.1136 8.7424 6.45974 7.68471C6.80588 6.62702 7.44735 5.69042 8.30846 4.98543C9.16956 4.28045 10.2144 3.83649 11.3196 3.70597C11.5487 3.68039 11.779 3.66759 12.0096 3.66763C13.4409 3.66338 14.8226 4.19149 15.8862 5.1493C16.5026 5.69896 16.9952 6.37337 17.3312 7.12782C17.6672 7.88227 17.839 8.69952 17.8352 9.5254C17.8314 10.3513 17.6522 11.1669 17.3092 11.9183C16.9663 12.6696 16.4677 13.3395 15.8462 13.8835H15.8437Z" fill="currentColor"/> +</svg> +`,F9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M9.28994 4.92561C9.6436 4.57634 9.64716 4.0065 9.29789 3.65284C8.94862 3.29918 8.37878 3.29563 8.02512 3.6449L5.91339 5.73041L5.16642 4.95888C4.82067 4.60177 4.2509 4.59256 3.89379 4.9383C3.53668 5.28404 3.52747 5.85382 3.87321 6.21093L5.25245 7.63551C5.41956 7.80811 5.64874 7.90674 5.88897 7.90943C6.1292 7.91213 6.36053 7.81866 6.53146 7.64985L9.28994 4.92561Z" fill="currentColor"/> +<path d="M12 5.10022C11.503 5.10022 11.1 5.50316 11.1 6.00022C11.1 6.49728 11.503 6.90022 12 6.90022L19.9965 6.90022C20.4935 6.90022 20.8965 6.49728 20.8965 6.00022C20.8965 5.50316 20.4935 5.10022 19.9965 5.10022L12 5.10022Z" fill="currentColor"/> +<path d="M12 11.1002C11.503 11.1002 11.1 11.5032 11.1 12.0002C11.1 12.4973 11.503 12.9002 12 12.9002H19.9965C20.4935 12.9002 20.8965 12.4973 20.8965 12.0002C20.8965 11.5032 20.4935 11.1002 19.9965 11.1002L12 11.1002Z" fill="currentColor"/> +<path d="M11.1 18.0002C11.1 17.5032 11.503 17.1002 12 17.1002L19.9965 17.1002C20.4935 17.1002 20.8965 17.5032 20.8965 18.0002C20.8965 18.4973 20.4935 18.9002 19.9965 18.9002H12C11.503 18.9002 11.1 18.4973 11.1 18.0002Z" fill="currentColor"/> +<path d="M9.29789 9.77064C9.64716 10.1243 9.6436 10.6941 9.28994 11.0434L6.53146 13.7676C6.36053 13.9365 6.1292 14.0299 5.88897 14.0272C5.64874 14.0245 5.41956 13.9259 5.25245 13.7533L3.87321 12.3287C3.52747 11.9716 3.53668 11.4018 3.89379 11.0561C4.2509 10.7104 4.82067 10.7196 5.16642 11.0767L5.91339 11.8482L8.02512 9.76269C8.37878 9.41342 8.94862 9.41698 9.29789 9.77064Z" fill="currentColor"/> +<path d="M9.29789 15.7436C9.64716 16.0973 9.6436 16.6671 9.28994 17.0164L6.53146 19.7406C6.36053 19.9094 6.1292 20.0029 5.88897 20.0002C5.64874 19.9975 5.41956 19.8989 5.25245 19.7263L3.87321 18.3017C3.52747 17.9446 3.53668 17.3748 3.89379 17.0291C4.2509 16.6833 4.82067 16.6926 5.16642 17.0497L5.91339 17.8212L8.02512 15.7357C8.37878 15.3864 8.94862 15.39 9.29789 15.7436Z" fill="currentColor"/> +</svg> +`,D9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M8.09752 2.19507C8.5421 1.97278 9.08271 2.15298 9.305 2.59756L10.0562 4.10005H13.5C13.9971 4.10005 14.4 4.50299 14.4 5.00005C14.4 5.49711 13.9971 5.90005 13.5 5.90005H12.3106C12.2556 6.2319 12.1667 6.64073 12.0226 7.0987C11.7254 8.04355 11.191 9.20402 10.2334 10.3239C11.4166 11.196 12.5606 11.7524 13.4512 12.0987C13.978 12.3036 14.4136 12.434 14.7124 12.5122L14.7348 12.5181L15.695 10.5976C15.8475 10.2927 16.1591 10.1 16.5 10.1C16.8409 10.1 17.1525 10.2927 17.305 10.5976L20.7969 17.5814L20.8044 17.5959L20.8137 17.615L21.805 19.5976C22.0273 20.0421 21.8471 20.5827 21.4025 20.805C20.9579 21.0273 20.4173 20.8471 20.195 20.4025L19.4438 18.9H13.5562L12.805 20.4025C12.5827 20.8471 12.0421 21.0273 11.5975 20.805C11.1529 20.5827 10.9727 20.0421 11.195 19.5976L12.1863 17.615C12.1917 17.6036 12.1973 17.5924 12.2031 17.5814L13.9146 14.1583C13.6034 14.0667 13.2256 13.9423 12.7988 13.7764C11.7294 13.3605 10.3442 12.6802 8.92538 11.5924C7.79753 12.5167 6.69473 13.0764 5.83285 13.4112C5.33899 13.603 4.92286 13.7216 4.62401 13.7931C4.47449 13.8288 4.35399 13.8529 4.26741 13.8684C4.2241 13.8762 4.18924 13.8818 4.16343 13.8858L4.13156 13.8904L4.12084 13.8919L4.11682 13.8924L4.11514 13.8927C4.11514 13.8927 4.11368 13.8928 4.00001 13L4.11368 13.8928C3.62061 13.9556 3.17 13.6068 3.10722 13.1137C3.0446 12.6219 3.39148 12.1723 3.88256 12.1077L3.94947 12.0967C4.00428 12.0869 4.09114 12.0698 4.20543 12.0424C4.43422 11.9877 4.77156 11.8924 5.18106 11.7334C5.84103 11.477 6.68484 11.0564 7.56458 10.3753C7.15054 9.93496 6.78945 9.48388 6.50421 9.10102C6.26672 8.78224 6.07517 8.50172 5.94227 8.29973C5.87571 8.19858 5.82359 8.11671 5.78748 8.05909C5.76942 8.03027 5.75535 8.00749 5.74545 7.99135L5.73377 7.9722L5.73032 7.96651L5.72864 7.96371C5.71133 7.9349 5.69582 7.9055 5.68208 7.87566C5.49265 7.46416 5.6393 6.96717 6.03659 6.72853C6.09037 6.69623 6.14617 6.6702 6.20315 6.65023C6.59739 6.51205 7.04758 6.66421 7.27129 7.03623L7.27266 7.0385L7.28001 7.05054C7.28695 7.06186 7.29793 7.07964 7.31274 7.10328C7.34239 7.15059 7.38731 7.2212 7.44595 7.31032C7.56343 7.48886 7.73484 7.73997 7.94765 8.02562C8.21085 8.37889 8.52772 8.77187 8.8756 9.14201C9.64226 8.24147 10.0681 7.3133 10.3056 6.55854C10.381 6.3186 10.4372 6.09683 10.4791 5.90005H9.51951C9.50696 5.90031 9.49442 5.90031 9.48191 5.90005H4.00001C3.50296 5.90005 3.10001 5.49711 3.10001 5.00005C3.10001 4.50299 3.50296 4.10005 4.00001 4.10005H8.04378L7.69503 3.40254C7.67314 3.35877 7.65516 3.31407 7.64094 3.26883C7.51078 2.8546 7.69671 2.39547 8.09752 2.19507ZM16.5 13.0125L18.5438 17.1H14.4562L16.5 13.0125Z" fill="currentColor"/> +<path d="M15.1 4.00007C15.1 3.50301 15.5029 3.10007 16 3.10007H18C19.6016 3.10007 20.9 4.39844 20.9 6.00007V8.00007C20.9 8.49712 20.497 8.90007 20 8.90007C19.5029 8.90007 19.1 8.49712 19.1 8.00007V6.00007C19.1 5.39255 18.6075 4.90007 18 4.90007H16C15.5029 4.90007 15.1 4.49712 15.1 4.00007Z" fill="currentColor"/> +<path d="M3.99998 15.1001C4.49703 15.1001 4.89998 15.503 4.89998 16.0001V18.0001C4.89998 18.6076 5.39246 19.1001 5.99998 19.1001H7.99998C8.49703 19.1001 8.89998 19.503 8.89998 20.0001C8.89998 20.4971 8.49703 20.9001 7.99998 20.9001H5.99998C4.39835 20.9001 3.09998 19.6017 3.09998 18.0001V16.0001C3.09998 15.503 3.50292 15.1001 3.99998 15.1001Z" fill="currentColor"/> +</svg> +`,$9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M8.10001 3C8.10001 2.50294 8.50295 2.1 9.00001 2.1H15C15.4971 2.1 15.9 2.50294 15.9 3C15.9 3.49706 15.4971 3.9 15 3.9H9.00001C8.50295 3.9 8.10001 3.49706 8.10001 3Z" fill="currentColor"/> +<path d="M10 15.9C9.50295 15.9 9.10001 15.4971 9.10001 15L9.10001 10C9.10001 9.50294 9.50295 9.1 10 9.1C10.4971 9.1 10.9 9.50294 10.9 10L10.9 15C10.9 15.4971 10.4971 15.9 10 15.9Z" fill="currentColor"/> +<path d="M13.1 15C13.1 15.4971 13.5029 15.9 14 15.9C14.4971 15.9 14.9 15.4971 14.9 15L14.9 10C14.9 9.50294 14.4971 9.1 14 9.1C13.5029 9.1 13.1 9.50294 13.1 10V15Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M2.10001 6C2.10001 5.50294 2.50295 5.1 3.00001 5.1H4.99152C4.99785 5.09993 5.00417 5.09993 5.01048 5.1H18.9895C18.9958 5.09993 19.0021 5.09993 19.0085 5.1H21C21.4971 5.1 21.9 5.50294 21.9 6C21.9 6.49706 21.4971 6.9 21 6.9H19.8281L18.8448 18.6993C18.7412 19.9432 17.7013 20.9 16.4531 20.9H7.54686C6.29865 20.9 5.25881 19.9432 5.15515 18.6993L4.17188 6.9H3.00001C2.50295 6.9 2.10001 6.49706 2.10001 6ZM5.97811 6.9L18.0219 6.9L17.0511 18.5498C17.0251 18.8608 16.7652 19.1 16.4531 19.1H7.54686C7.23481 19.1 6.97485 18.8608 6.94893 18.5498L5.97811 6.9Z" fill="currentColor"/> +</svg> +`,B9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M7.36336 3.3634C7.71483 3.01192 8.28533 3.01192 8.6368 3.3634C8.98817 3.71488 8.98824 4.2854 8.6368 4.63683L6.17391 7.09972H15.0001C18.2585 7.09977 20.9005 9.74166 20.9005 13.0001C20.9004 16.2585 18.2585 18.9005 15.0001 18.9005H7.00008C6.50307 18.9005 6.09976 18.4971 6.09969 18.0001C6.09969 17.5031 6.50302 17.0997 7.00008 17.0997H15.0001C17.2644 17.0997 19.0996 15.2644 19.0997 13.0001C19.0997 10.7358 17.2644 8.90055 15.0001 8.90051H6.17391L8.6368 11.3634L8.69832 11.4318C8.98668 11.7853 8.96632 12.3073 8.6368 12.6368C8.30728 12.9663 7.78521 12.9867 7.43172 12.6984L7.36336 12.6368L3.36336 8.63683C3.33098 8.60445 3.30286 8.56908 3.27645 8.53332C3.25597 8.50559 3.23607 8.47741 3.21883 8.44738C3.20492 8.42311 3.19221 8.39837 3.18074 8.37316C3.1764 8.36365 3.17109 8.35453 3.16707 8.34484C3.1627 8.33427 3.1593 8.32331 3.15535 8.31261C3.12946 8.24274 3.11237 8.16872 3.10457 8.09191C3.09258 7.97426 3.10262 7.85446 3.1368 7.74035C3.14281 7.72035 3.15094 7.70114 3.15828 7.68176C3.16165 7.67283 3.16341 7.66325 3.16707 7.65441C3.17216 7.64216 3.17806 7.63025 3.18367 7.61828C3.19055 7.60356 3.19744 7.58874 3.20516 7.57433C3.24709 7.49624 3.3012 7.42556 3.36336 7.3634L7.36336 3.3634Z" fill="currentColor"/> +</svg> +`,z9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M11.9997 12.8779C16.0197 12.878 19.4393 15.3848 20.7048 18.8828C21.0812 19.9234 20.2782 20.8962 19.2038 21.0137L18.9861 21.0264H5.0134L4.79562 21.0137C3.7213 20.8961 2.91743 19.9233 3.29367 18.8828C4.55905 15.3847 7.9797 12.8781 11.9997 12.8779ZM11.9997 14.6777C8.84467 14.6779 6.17462 16.5794 5.09152 19.2256H18.9079C17.8248 16.5793 15.1549 14.6778 11.9997 14.6777ZM12.2312 3.00586C14.6088 3.1264 16.4997 5.09239 16.4997 7.5L16.4939 7.73145C16.3734 10.1091 14.4073 11.9999 11.9997 12C9.59225 11.9998 7.62604 10.109 7.50558 7.73145L7.49973 7.5C7.49973 5.01485 9.51462 3.00021 11.9997 3L12.2312 3.00586ZM11.9997 4.7998C10.5087 4.80001 9.29953 6.00896 9.29953 7.5C9.29953 8.99104 10.5087 10.2 11.9997 10.2002C13.4908 10.2001 14.6999 8.99112 14.6999 7.5C14.6999 6.00888 13.4908 4.79989 11.9997 4.7998Z" fill="currentColor"/> +</svg> +`,R9e=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M11.9996 7C11.5026 7 11.0996 7.36985 11.0996 7.82609V14.1739C11.0996 14.6301 11.5026 15 11.9996 15C12.4967 15 12.8996 14.6301 12.8996 14.1739V7.82609C12.8996 7.36985 12.4967 7 11.9996 7Z" fill="currentColor"/> +<path d="M12.8996 17.1006C12.8996 17.5974 12.4968 18.001 11.9992 18.001C11.5024 18.001 11.0996 17.5974 11.0996 17.1006C11.0996 16.6038 11.5024 16.2002 11.9992 16.2002C12.4968 16.2002 12.8996 16.6038 12.8996 17.1006Z" fill="currentColor"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M14.5108 3.5501C13.3946 1.61676 10.6041 1.61676 9.48786 3.5501L1.69363 17.0501C0.577423 18.9834 1.97269 21.4001 4.20511 21.4001H19.7936C22.026 21.4001 23.4212 18.9834 22.305 17.0501L14.5108 3.5501ZM11.0467 4.4501C11.4701 3.71676 12.5286 3.71676 12.952 4.4501L20.7462 17.9501C21.1696 18.6834 20.6403 19.6001 19.7936 19.6001H4.20511C3.35833 19.6001 2.82909 18.6834 3.25248 17.9501L11.0467 4.4501Z" fill="currentColor"/> +</svg> +`,O9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0M4 6h8m4 0h4M6 12a2 2 0 1 0 4 0a2 2 0 1 0-4 0m-2 0h2m4 0h10m-5 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0M4 18h11m4 0h1"/></svg>',P9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 6l-6 6l6 6"/></svg>',j9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g></svg>',H9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.56 3.69a9 9 0 0 0-2.92 1.95M3.69 8.56A9 9 0 0 0 3 12m.69 3.44a9 9 0 0 0 1.95 2.92m2.92 1.95A9 9 0 0 0 12 21m3.44-.69a9 9 0 0 0 2.92-1.95m1.95-2.92A9 9 0 0 0 21 12m-.69-3.44a9 9 0 0 0-1.95-2.92m-2.92-1.95A9 9 0 0 0 12 3"/></svg>',W9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 3h6m-5 6h4m-4-6v6L6 20a.7.7 0 0 0 .5 1h11a.7.7 0 0 0 .5-1L14 9V3"/></svg>',q9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm11-2v16"/><path d="m9 10l2 2l-2 2"/></g></svg>',U9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3L18 10a3 3 0 0 0-6-6l-6.5 6.5a4.5 4.5 0 0 0 9 9L21 13"/></svg>',K9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M4 18v-3.7a1.5 1.5 0 0 0-1.5-1.5H2v-1.6h.5A1.5 1.5 0 0 0 4 9.7V6a3 3 0 0 1 3-3h1v2H7a1 1 0 0 0-1 1v4.1A2 2 0 0 1 4.626 12A2 2 0 0 1 6 13.9V18a1 1 0 0 0 1 1h1v2H7a3 3 0 0 1-3-3m16-3.7V18a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-4.1a2 2 0 0 1 1.374-1.9A2 2 0 0 1 18 10.1V6a1 1 0 0 0-1-1h-1V3h1a3 3 0 0 1 3 3v3.7a1.5 1.5 0 0 0 1.5 1.5h.5v1.6h-.5a1.5 1.5 0 0 0-1.5 1.5"/></svg>',V9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M9 3V1H7v2H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1h-4V1h-2v2zm-5 7h16v9H4zm0-5h3v1h2V5h6v1h2V5h3v3H4zm5.879 5.964L12 13.086l2.121-2.122l1.415 1.415l-2.122 2.121l2.121 2.121l-1.414 1.414L12 15.915l-2.121 2.12l-1.415-1.414l2.122-2.12l-2.122-2.122z"/></svg>',Z9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M7 3V1h2v2h6V1h2v2h4a1 1 0 0 1 1 1v5h-2V5h-3v2h-2V5H9v2H7V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm10 9a4 4 0 1 0 0 8a4 4 0 0 0 0-8m-6 4a6 6 0 1 1 12 0a6 6 0 0 1-12 0m5-3v3.414l2.293 2.293l1.414-1.414L18 15.586V13z"/></svg>',G9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M9 1v2h6V1h2v2h4a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h4V1zm11 10H4v8h16zM8 14v2H6v-2zm10 0v2h-8v-2zM7 5H4v4h16V5h-3v2h-2V5H9v2H7z"/></svg>',Q9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="m23 12l-7.071 7.071l-1.414-1.414L20.172 12l-5.657-5.657l1.414-1.414zM3.828 12l5.657 5.657l-1.414 1.414L1 12l7.071-7.071l1.414 1.414z"/></svg>',Y9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-4-7h8a4 4 0 0 1-8 0m0-2a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8 0a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3"/></svg>',kB='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M10 6v2H5v11h11v-5h2v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm11-3v8h-2V6.413l-7.793 7.794l-1.414-1.414L17.585 5H13V3z"/></svg>',J9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M12 3c5.392 0 9.878 3.88 10.819 9c-.94 5.12-5.427 9-10.819 9s-9.878-3.88-10.818-9C2.122 6.88 6.608 3 12 3m0 16a9.005 9.005 0 0 0 8.778-7a9.005 9.005 0 0 0-17.555 0A9.005 9.005 0 0 0 12 19m0-2.5a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9m0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5"/></svg>',X9e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M17.883 19.297A10.95 10.95 0 0 1 12 21c-5.392 0-9.878-3.88-10.818-9A11 11 0 0 1 4.52 5.935L1.394 2.808l1.414-1.414l19.799 19.798l-1.414 1.415zM5.936 7.35A8.97 8.97 0 0 0 3.223 12a9.005 9.005 0 0 0 13.201 5.838l-2.028-2.028A4.5 4.5 0 0 1 8.19 9.604zm6.978 6.978l-3.242-3.241a2.5 2.5 0 0 0 3.241 3.241m7.893 2.265l-1.431-1.431A8.9 8.9 0 0 0 20.778 12A9.005 9.005 0 0 0 9.552 5.338L7.974 3.76C9.221 3.27 10.58 3 12 3c5.392 0 9.878 3.88 10.819 9a10.95 10.95 0 0 1-2.012 4.593m-9.084-9.084Q11.86 7.5 12 7.5a4.5 4.5 0 0 1 4.492 4.778z"/></svg>',e4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M15 4H5v16h14V8h-4zM3 2.992C3 2.444 3.447 2 3.999 2H16l5 5v13.993A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008zM11 11V8h2v3h3v2h-3v3h-2v-3H8v-2z"/></svg>',t4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M13 9h8L11 24v-9H4l9-15zm-2 2V7.22L7.532 13H13v4.394L17.263 11z"/></svg>',bB='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M14 4.438A2.437 2.437 0 0 0 16.438 2h1.125A2.437 2.437 0 0 0 20 4.438v1.125A2.437 2.437 0 0 0 17.563 8h-1.125A2.437 2.437 0 0 0 14 5.563zM1 11a6 6 0 0 0 6-6h2a6 6 0 0 0 6 6v2a6 6 0 0 0-6 6H7a6 6 0 0 0-6-6zm3.876 1A8.04 8.04 0 0 1 8 15.124A8.04 8.04 0 0 1 11.124 12A8.04 8.04 0 0 1 8 8.876A8.04 8.04 0 0 1 4.876 12m12.374 2A3.25 3.25 0 0 1 14 17.25v1.5A3.25 3.25 0 0 1 17.25 22h1.5A3.25 3.25 0 0 1 22 18.75v-1.5A3.25 3.25 0 0 1 18.75 14z"/></svg>',n4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"/></svg>',i4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2M3 6a3 3 0 1 1 4 2.83V9a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-.17a3.001 3.001 0 1 1 2 0V9a4 4 0 0 1-4 4h-2v2.17a3.001 3.001 0 1 1-2 0V13H9a4 4 0 0 1-4-4v-.17A3 3 0 0 1 3 6m15-1a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-6 12a1 1 0 1 0 0 2a1 1 0 0 0 0-2"/></svg>',s4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M15 5h2a2 2 0 0 1 2 2v8.17a3.001 3.001 0 1 1-2 0V7h-2v3l-4.5-4L15 2zM5 8.83a3.001 3.001 0 1 1 2 0v6.34a3.001 3.001 0 1 1-2 0zM6 7a1 1 0 1 0 0-2a1 1 0 0 0 0 2m0 12a1 1 0 1 0 0-2a1 1 0 0 0 0 2m12 0a1 1 0 1 0 0-2a1 1 0 0 0 0 2"/></svg>',o4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2 18h7v2H2zm0-7h9v2H2zm0-7h20v2H2zm18.674 9.025l1.156-.391l1 1.732l-.916.805a4 4 0 0 1 0 1.658l.916.805l-1 1.732l-1.156-.391a4 4 0 0 1-1.435.83L19 21h-2l-.24-1.196a4 4 0 0 1-1.434-.83l-1.156.392l-1-1.732l.916-.805a4 4 0 0 1 0-1.658l-.916-.805l1-1.732l1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196a4 4 0 0 1 1.434.83M18 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4"/></svg>',r4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M10 2a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H8v2h5V9a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H8v6h5v-1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1v-1H7a1 1 0 0 1-1-1V8H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm9 16h-4v2h4zm0-8h-4v2h4zM9 4H5v2h4z"/></svg>',l4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="m13.827 1.69l8.486 8.485l-1.415 1.414l-.707-.707l-4.242 4.243l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243l1.414-1.414l3.536-.707l4.242-4.243l-.707-.707zm.707 3.536l-4.67 4.67l-2.822.565l6.5 6.5l.564-2.822l4.671-4.67z"/></svg>',a4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M20 4v12h3l-4 5l-4-5h3V4zm-8 14v2H3v-2zm2-7v2H3v-2zm0-7v2H3V4z"/></svg>',u4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928z"/></svg>',c4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="m12 18.26l-7.053 3.948l1.575-7.928L.588 8.792l8.027-.952L12 .5l3.385 7.34l8.027.952l-5.934 5.488l1.575 7.928zm0-2.292l4.247 2.377l-.948-4.773l3.573-3.305l-4.833-.573l-2.038-4.419l-2.039 4.42l-4.833.572l3.573 3.305l-.948 4.773z"/></svg>',d4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M5.33 3.272a3.5 3.5 0 0 1 4.254 4.962l10.709 10.71l-1.414 1.414l-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 0 0 2.121-2.121zm10.367 1.883l3.182-1.768l1.414 1.415l-1.768 3.182l-1.768.353l-2.12 2.121l-1.415-1.414l2.121-2.121zm-6.718 8.132l1.415 1.414l-5.304 5.303a1 1 0 0 1-1.492-1.327l.078-.087z"/></svg>',f4e='<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="m20.97 17.172l-1.414 1.414l-3.535-3.535l-.073.074l-.707 3.536l-1.415 1.414l-4.242-4.243l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.243-4.243L5.34 8.761l3.536-.707l.073-.074l-3.536-3.536L6.828 3.03zM10.365 9.394l-.502.502l-2.822.565l6.5 6.5l.564-2.822l.502-.502zm8.411.074l-1.34 1.34l1.414 1.415l1.34-1.34l.707.707l1.415-1.415l-8.486-8.485l-1.414 1.414l.707.707l-1.34 1.34l1.414 1.415l1.34-1.34z"/></svg>',h4e={sm:14,md:16,lg:20};function Et(e,t){return{component:e,svg:t}}const AB={plus:Et(Qpe,_ye),"chat-new":Et(Xpe,Iye),"calendar-close":Et(mve,V9e),"calendar-schedule":Et(kve,Z9e),"calendar-todo":Et(Cve,G9e),close:Et($0e,Rye),check:Et(v0e,mB),"circle-check":Et(E0e,Bye),"state-open":Et(tve,H9e),"state-done":Et(J2e,j9e),archive:Et(n0e,Mye),search:Et(Kme,A9e),copy:Et(q0e,vB),link:Et(lme,a9e),"external-link":Et(Lve,kB),download:Et(Q0e,Hye),undo:Et(z2e,B9e),send:Et(Gme,C9e),image:Et(Pge,t9e),settings:Et(Jme,w9e),sliders:Et(c2e,I9e),"light-mode":Et(sme,l9e),"dark-mode":Et(V0e,jye),"follow-system":Et(Cge,Gye),"log-in":Et(s2e,S9e),"log-out":Et(l2e,_9e),hand:Et(Dge,Xye),"full-access":Et(Sge,Qye),"shield-question":Et(t2e,x9e),"chevron-down":Et(b0e,Fye),"chevron-right":Et(w0e,Dye),"chevron-left":Et(G2e,P9e),"chevron-up":Et(_0e,$ye),"arrow-up":Et(p0e,Nye),"arrow-down":Et(o0e,Eye),"arrow-right":Et(d0e,Lye),"arrow-left":Et(a0e,Tye),minus:Et(mme,d9e),microscope:Et(kme,f9e),flask:Et(sve,W9e),"panel-collapse":Et(Jge,o9e),"panel-collapse-right":Et(lve,q9e),"panel-expand":Et(tme,r9e),expand:Et(nge,qye),collapse:Et(R0e,Oye),list:Et(cme,u9e),"list-settings":Et(sye,o4e),"tree-view":Et(lye,r4e),sort:Et(hye,a4e),grip:Et(Lge,Jye),"session-admin":Et(K2e,O9e),folder:Et(hge,yB),"folder-closed":Et(cge,Kye),"folder-plus":Et(kge,Zye),"folder-solid":Et(Gve,n4e),file:Et(d_,Gb),"file-text":Et(lge,Uye),"file-edit":Et(X0e,Wye),"file-plus":Et(Pve,e4e),"file-off":Et(d_,Gb),attachment:Et(cve,U9e),"image-off":Et(Wge,n9e),eye:Et(Dve,J9e),"eye-off":Et(zve,X9e),code:Et(Sve,Q9e),terminal:Et(C2e,L9e),pencil:Et(Lme,m9e),tool:Et(Cye,d4e),glob:Et(hve,K9e),globe:Et(Mge,Yye),translate:Et(L2e,D9e),"check-list":Et(M2e,F9e),bolt:Et(Wve,t4e),sparkling:Et(Kve,bB),keyboard:Et(Gge,s9e),trash:Et(D2e,$9e),"git-fork":Et(Jve,i4e),"git-pull-request":Et(tye,s4e),message:Et(j0e,Pye),mail:Et(hme,c9e),user:Et(P2e,z9e),info:Et(Kge,i9e),"help-circle":Et(Pme,k9e),"alert-triangle":Et(W2e,R9e),clock:Et(N0e,zye),robot:Et(Wme,b9e),sparkles:Et(k2e,T9e),"gen-title":Et(mge,Vye),histogram:Et(zge,e9e),music:Et(Sme,p9e),emoji:Et(Mve,Y9e),target:Et(m2e,E9e),pause:Et(Mme,g9e),play:Et(Dme,v9e),power:Et(zme,y9e),pin:Et(cye,l4e),stop:Et(h2e,M9e),star:Et(mye,u4e),"star-outline":Et(kye,c4e),unpin:Et(Sye,f4e),"dots-horizontal":Et(Cme,h9e),thinking:Et(S2e,N9e)};function p4e(e){return AB[e]}function g4e(e,t){return e.replace(/<svg\b[^>]*>/,n=>n.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^<svg\b/,`<svg class="kw-icon" width="${t}" height="${t}" aria-hidden="true"`)}function m4e(e,t="md"){const n=AB[e];return n?g4e(n.svg,h4e[t]):""}const _at=[["Actions",["plus","attachment","chat-new","close","check","search","copy","link","external-link","download","undo","send","image","settings","sliders","log-in","log-out","eye","eye-off"]],["Navigation & layout",["chevron-down","chevron-right","chevron-up","arrow-up","arrow-down","arrow-right","arrow-left","minus","panel-collapse","panel-collapse-right","panel-expand","expand","collapse","list","list-settings","tree-view","sort","grip"]],["Files & tools",["folder","folder-closed","folder-plus","folder-solid","file","file-text","file-edit","file-plus","file-off","image-off","code","terminal","pencil","tool","glob","globe","check-list","bolt","git-fork","git-pull-request","archive","pin","unpin","target","calendar-schedule","calendar-todo","calendar-close","keyboard","trash","microscope","flask"]],["Communication",["message","mail","user","robot","emoji","translate"]],["Status & media",["info","help-circle","alert-triangle","hand","full-access","shield-question","clock","histogram","music","sparkles","sparkling","gen-title","pause","play","stop","star","star-outline","dots-horizontal","thinking","light-mode","dark-mode","follow-system"]]],T6=(e,t)=>t===void 0?Wl.global.t(e):Wl.global.t(e,t);function Kh(e){return gD(T6,e)}function f_(e,t,n=!1){return Q5(T6,e,t,n)}function v4e(e){return Jne(T6,e)}const y4e={read:"file-text",bash:"terminal",edit:"pencil",multi_edit:"pencil",write:"file-plus",grep:"search",search:"search",glob:"glob",ls:"folder",web_fetch:"globe",todo:"check-list",task:"sparkles",agentswarm:"sparkles",askuserquestion:"help-circle",exitplanmode:"file-text",creategoal:"target",getgoal:"target",setgoalbudget:"target",updategoal:"target",croncreate:"calendar-schedule",cronlist:"calendar-todo",crondelete:"calendar-close"};function CB(e){const t=Eo(e);let n=y4e[t];return!n&&(e??"").trim().toLowerCase().includes("skill")&&(n="bolt"),n||(n="tool"),n}function wB(e){return m4e(CB(e),"sm")}const k4e={class:"op"},b4e={key:0,class:"op-empty"},A4e=Qe({__name:"OutputPanel",props:{lines:{default:void 0},emptyText:{default:""}},setup(e){const t=e,n=L(()=>t.lines??[]);return(i,s)=>(k(),E("div",k4e,[n.value.length===0&&e.emptyText?(k(),E("div",b4e,F(e.emptyText),1)):te("",!0),(k(!0),E(Te,null,ht(n.value,(o,r)=>(k(),E("div",{key:r},F(o),1))),128))]))}}),el=gt(A4e,[["__scopeId","data-v-ab413c67"]]),C4e=["disabled","aria-label","aria-expanded"],w4e={class:"lead","aria-hidden":"true"},x4e={class:"main"},S4e={class:"task"},_4e={key:0,class:"type"},I4e={class:"tail"},M4e=["aria-label"],E4e=["aria-expanded"],T4e=Qe({__name:"AgentTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openAgent"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(v){if(!v)return{};try{const x=JSON.parse(v);return{description:typeof x.description=="string"?x.description:void 0,subagentType:typeof x.subagent_type=="string"?x.subagent_type:void 0}}catch{return{}}}const r=L(()=>o(i.tool.arg)),l=L(()=>i.tool.status),a=L(()=>r.value.description||r.value.subagentType||Kh(i.tool.name)),u=L(()=>r.value.description?r.value.subagentType:""),c=cn("resolveAgentTaskId"),d=cn("resolveAgentModel"),f=L(()=>i.tool.agentId??c?.(i.tool.id)),h=L(()=>f.value!==void 0),g=L(()=>d?.(i.tool.id,f.value)),m=L(()=>[u.value,g.value?.display,g.value?.effort].filter(v=>v).join(" · ")),y=L(()=>!!i.tool.output&&i.tool.output.length>0),A=L(()=>h.value||y.value),b=G(!1);function C(){if(f.value!==void 0){s("openAgent",f.value);return}y.value&&(b.value=!b.value)}return(v,x)=>(k(),E("div",{class:Fe(["agent-card",{err:l.value==="error"}])},[w("button",{class:"head",type:"button",disabled:!A.value,"aria-label":h.value?p(n)("tasks.openDetail"):void 0,"aria-expanded":h.value?void 0:b.value,onClick:C},[w("span",w4e,[K(p(ve),{name:"robot",size:"sm"})]),w("span",x4e,[w("span",S4e,F(a.value),1),m.value?(k(),E("span",_4e,F(m.value),1)):te("",!0)]),w("span",I4e,[w("span",{class:Fe(["st",l.value]),role:"status","aria-label":l.value},[l.value==="ok"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):l.value==="error"?(k(),de(p(ve),{key:1,name:"close",size:"sm"})):(k(),de(p(jl),{key:2,status:"running"}))],10,M4e),h.value?(k(),de(p(ve),{key:0,class:"go",name:"arrow-right",size:"sm","aria-hidden":"true"})):y.value?(k(),de(p(ve),{key:1,class:Fe(["go car",{open:b.value}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"])):te("",!0)])],8,C4e),h.value&&y.value?(k(),E("button",{key:0,class:"saved-result",type:"button","aria-expanded":b.value,onClick:x[0]||(x[0]=S=>b.value=!b.value)},[K(p(ve),{class:Fe(["saved-result__chevron",{open:b.value}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"]),w("span",null,F(p(n)("tools.output.saved")),1)],8,E4e)):te("",!0),y.value&&b.value?(k(),E("div",{key:1,class:Fe(["result",{"result--legacy":!h.value}])},[K(el,{lines:e.tool.output},null,8,["lines"])],2)):te("",!0)],2))}}),L4e=gt(T4e,[["__scopeId","data-v-5bbb3a70"]]);function N4e(e){if(!e)return[];try{const n=JSON.parse(e).questions;if(!Array.isArray(n))return[];const i=[];for(const s of n){if(!s||typeof s!="object")continue;const o=s,r=Array.isArray(o.options)?o.options.map(l=>{const a=l&&typeof l=="object"?l:{};return{label:typeof a.label=="string"?a.label:"",description:typeof a.description=="string"?a.description:""}}):[];i.push({question:typeof o.question=="string"?o.question:"",header:typeof o.header=="string"?o.header:"",options:r,multiSelect:o.multi_select===!0})}return i}catch{return[]}}const hm={recognized:!1,answers:{},note:""};function F4e(e){const t=e?.[0];if(!t)return hm;let n;try{n=JSON.parse(t)}catch{return hm}if(!n||typeof n!="object"||Array.isArray(n))return hm;const i=n.answers;if(!i||typeof i!="object"||Array.isArray(i))return hm;const s={};for(const[o,r]of Object.entries(i))typeof r=="string"?s[o]=r:r===!0&&(s[o]=!0);return{recognized:!0,answers:s,note:typeof n.note=="string"?n.note:""}}function D4e(e,t,n){return e[t]??e[`q_${n}`]}const $4e=/^opt_\d+_(\d+)$/;function B4e(e,t=[]){if(e===void 0)return{selected:new Set,otherText:"",indeterminate:!1};if(e===!0)return{selected:new Set,otherText:"",indeterminate:!0};const n=new Map;t.forEach((r,l)=>{r.label.length>0&&!n.has(r.label)&&n.set(r.label,l)});const i=n.get(e);if(i!==void 0)return{selected:new Set([i]),otherText:"",indeterminate:!1};const s=new Set,o=[];for(const r of e.split(",")){const l=r.trim(),a=n.get(l);if(a!==void 0){s.add(a);continue}const u=$4e.exec(l);u?s.add(Number(u[1])):l.length>0&&o.push(l)}return{selected:s,otherText:o.join(", "),indeterminate:!1}}const z4e={class:"tl-ic","aria-hidden":"true"},R4e={class:"tl-main"},O4e=["aria-expanded","aria-label"],P4e={class:"tl-tail"},j4e=["aria-label"],H4e=["inert"],W4e={class:"tl-body-inner"},q4e=Qe({__name:"ToolDisclosure",props:{status:{},open:{type:Boolean,default:!1},expandable:{type:Boolean,default:!1}},emits:["toggle"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=cn("pinScroll",()=>{}),r=G(null);function l(){if(!n.expandable)return;i("toggle");const u=r.value;u&&kt(()=>o(u))}const a=L(()=>n.open?s("tools.disclosure.collapse"):s("tools.disclosure.expand"));return(u,c)=>(k(),E("div",{class:Fe(["tool-line",{open:e.open,expandable:e.expandable,err:e.status==="error"}])},[w("div",{ref_key:"headEl",ref:r,class:Fe(["tl-head",{clickable:e.expandable}]),onClick:l},[w("span",z4e,[Rn(u.$slots,"leading")]),w("span",R4e,[Rn(u.$slots,"default"),K(p(kn),{text:a.value},{default:he(()=>[e.expandable?(k(),E("button",{key:0,class:"tl-car",type:"button","aria-expanded":e.open,"aria-label":a.value,onClick:Ct(l,["stop"])},[K(p(ve),{class:"tl-car-ic",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,O4e)):te("",!0)]),_:1},8,["text"])]),w("span",P4e,[Rn(u.$slots,"trailing"),w("span",{class:Fe(["tl-status",e.status]),role:"status","aria-label":e.status},[e.status==="ok"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):e.status==="error"?(k(),de(p(ve),{key:1,name:"close",size:"sm"})):e.status==="suspended"?(k(),de(p(jl),{key:2,status:"suspended"})):(k(),de(p(jl),{key:3,status:"running"}))],10,j4e)])],2),e.expandable?(k(),E("div",{key:0,class:Fe(["tl-body",{open:e.open}]),inert:!e.open},[w("div",W4e,[Rn(u.$slots,"body")])],10,H4e)):te("",!0)],2))}}),Vl=gt(q4e,[["__scopeId","data-v-58658159"]]),U4e={key:0,class:"rc-flat"},K4e={class:"rc-head"},V4e={class:"rc-st"},Z4e={class:"rc-qtext"},G4e={class:"rc-lb"},Q4e={key:0,class:"rc-opt"},Y4e={class:"rc-lb"},J4e={class:"rc-ds"},X4e={key:1,class:"rc-opt"},e3e={class:"rc-lb"},t3e={key:2,class:"rc-qskip"},n3e={class:"tl-name"},i3e={key:0,class:"tl-dim"},s3e={key:0,class:"tl-chip"},o3e=80,r3e=Qe({__name:"AskUserTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile"],setup(e){const t=e,{t:n}=Bt();function i(_,I=o3e){const M=_.trim();return M.length>I?M.slice(0,I-1)+"…":M}const s=L(()=>N4e(t.tool.arg)),o=L(()=>F4e(t.tool.output)),r=L(()=>o.value.recognized),l=L(()=>r.value&&Object.keys(o.value.answers).length===0&&o.value.note.length>0),a=L(()=>s.value.map((_,I)=>B4e(D4e(o.value.answers,_.question,I),_.options))),u=L(()=>Object.keys(o.value.answers).length);function c(_,I){return a.value[_]?.selected.has(I)??!1}function d(_){return a.value[_]?.otherText??""}function f(_){return a.value[_]?.indeterminate??!1}const h=L(()=>t.tool.status),g=L(()=>s.value.map((_,I)=>({q:_,selected:_.options.map((M,$)=>({o:M,oi:$})).filter(({oi:M})=>c(I,M))}))),m=L(()=>s.value.length===1?n("tools.ask.question",{count:1}):n("tools.ask.questions",{count:s.value.length})),y=L(()=>{const _=s.value[0]?.question??"",I=n("tools.ask.unanswered");return _?`${_} —— ${I}`:I}),A=L(()=>{if(!r.value)return i(t.tool.output?.[0]??"");if(l.value)return n("tools.ask.dismissed");const _=s.value[0]?.question??"",I=i(_);return s.value.length<=1?I:`${I} ${n("tools.ask.more",{count:s.value.length-1})}`}),b=L(()=>r.value?l.value?n("tools.ask.dismissed"):u.value===0?"":u.value===1?n("tools.ask.answer",{count:1}):n("tools.ask.answers",{count:u.value}):""),C=L(()=>!!t.tool.output&&t.tool.output.length>0),v=L(()=>r.value&&(s.value.length>0||l.value)||C.value),x=G(t.tool.defaultExpanded===!0&&v.value),S=L(()=>Kh(t.tool.name));return qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&v.value&&(x.value=!0)}),(_,I)=>r.value&&h.value==="ok"?(k(),E("div",{key:0,class:Fe(["ask-receipt",{flat:l.value||u.value===0}])},[l.value||u.value===0?(k(),E("span",U4e,F(y.value),1)):(k(),E(Te,{key:1},[w("div",K4e,[w("span",null,F(p(n)("tools.ask.collected"))+" · "+F(m.value),1),w("span",V4e,[K(p(ve),{name:"check",size:"sm"})])]),(k(!0),E(Te,null,ht(g.value,(M,$)=>(k(),E("div",{key:$,class:"rc-q"},[w("div",Z4e,[w("span",null,F(M.q.question),1)]),(k(!0),E(Te,null,ht(M.selected,D=>(k(),E("div",{key:D.oi,class:"rc-opt"},[w("span",{class:Fe(["rc-g on",M.q.multiSelect?"chk":"rad"])},null,2),w("span",G4e,F(D.o.label),1)]))),128)),d($)?(k(),E("div",Q4e,[w("span",{class:Fe(["rc-g on",M.q.multiSelect?"chk":"rad"])},null,2),w("span",Y4e,F(d($)),1),w("span",J4e,F(p(n)("tools.ask.freeInput")),1)])):te("",!0),f($)?(k(),E("div",X4e,[I[1]||(I[1]=w("span",{class:"rc-g rad on"},null,-1)),w("span",e3e,F(p(n)("tools.ask.answered")),1)])):te("",!0),M.selected.length===0&&!d($)&&!f($)?(k(),E("div",t3e,F(p(n)("tools.ask.unanswered")),1)):te("",!0)]))),128))],64))],2)):(k(),de(Vl,{key:1,status:h.value,open:x.value,expandable:v.value,onToggle:I[0]||(I[0]=M=>x.value=!x.value)},{leading:he(()=>[K(p(ve),{name:"help-circle",size:"sm"})]),trailing:he(()=>[b.value?(k(),E("span",s3e,F(b.value),1)):te("",!0)]),body:he(()=>[K(el,{lines:e.tool.output},null,8,["lines"])]),default:he(()=>[w("span",n3e,F(S.value),1),A.value?(k(),E("span",i3e,F(A.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),l3e=gt(r3e,[["__scopeId","data-v-f29eda04"]]);function Mc(e){const t=(e??"").trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);return n&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function oi(e){return typeof e=="string"&&e.length>0?e:void 0}function Lu(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function xB(e){if(e)return oi(e.path)??oi(e.file_path)??oi(e.filePath)??oi(e.filename)}function SB(e){return/^(.*)[\\/][^\\/]+[\\/]?$/.exec(e)?.[1]??""}function a3e(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean)[0];return n?`${t.host}/${n}`:t.host}catch{return e.replace(/^https?:\/\//,"")}}const u3e={class:"tl-name"},c3e={class:"tl-mono"},d3e={key:0,class:"tl-chip"},f3e={class:"cmd-echo"},h3e=Qe({__name:"BashTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=L(()=>t.tool.status),s=L(()=>{const u=Mc(t.tool.arg);return(oi(u?.command)??oi(u?.cmd)??oi(u?.script)??t.tool.arg.replace(/^·\s*/,"")).trim()}),o=L(()=>t.tool.status==="running"),r=L(()=>!!t.tool.output&&t.tool.output.length>0),l=L(()=>r.value||o.value||s.value.length>0),a=G(t.tool.defaultExpanded===!0&&l.value);return qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&l.value&&(a.value=!0)}),(u,c)=>(k(),de(Vl,{status:i.value,open:a.value,expandable:l.value,onToggle:c[0]||(c[0]=d=>a.value=!a.value)},{leading:he(()=>[K(p(ve),{name:"terminal",size:"sm"})]),trailing:he(()=>[e.tool.timing?(k(),E("span",d3e,F(e.tool.timing),1)):te("",!0)]),body:he(()=>[w("div",f3e,F(s.value),1),K(el,{lines:e.tool.output,"empty-text":o.value?p(n)("tools.output.waiting"):p(n)("tools.output.empty")},null,8,["lines","empty-text"])]),default:he(()=>[w("span",u3e,F(p(n)("tools.label.bash")),1),w("span",c3e,F(s.value),1)]),_:1},8,["status","open","expandable"]))}}),p3e=gt(h3e,[["__scopeId","data-v-8869dd42"]]),g3e={class:"hl-body"},m3e={key:0,class:"hl-gutter"},v3e={key:1,class:"hl-gutter new"},y3e={class:"hl-sign"},k3e={class:"hl-text"},b3e=["data-line"],A3e={key:0,class:"hl-gutter"},C3e={class:"hl-text"},w3e=200,x3e=Qe({__name:"HighlightedCode",props:{code:{default:void 0},lines:{default:void 0},path:{default:void 0},lineNumbers:{type:[Boolean,Array],default:!1},framed:{type:Boolean,default:!0},fullTexts:{default:null},lineClass:{type:Function,default:void 0}},setup(e){const t=e,n=jy(),i=L(()=>moe(t.path)),s=L(()=>t.lines!==void 0),o=L(()=>t.lineNumbers===!0&&s.value),r=L(()=>(t.lines??[]).some(N=>N.oldNo!==void 0)),l=L(()=>(t.lines??[]).some(N=>N.newNo!==void 0)),a=L(()=>Array.isArray(t.lineNumbers)?t.lineNumbers:null),u=L(()=>Array.isArray(t.code)?t.code:Ca(t.code??"")),c=L(()=>{const N=t.lines;return N?t.fullTexts?t.fullTexts:{before:N.filter(O=>O.oldNo!==void 0).map(O=>O.text).join(` +`),after:N.filter(O=>O.newNo!==void 0).map(O=>O.text).join(` +`)}:null}),d=G(null),f=G(null),h=G(null);function g(){d.value=null,f.value=null,h.value=null}let m=null,y=0,A=0;async function b(){const N=++A;y=Date.now();const O=i.value;if(!O){N===A&&g();return}try{const{codeToTokens:P}=await vs(async()=>{const{codeToTokens:j}=await import("./index-C6iX4-LJ.js").then(W=>W.i);return{codeToTokens:j}},[]),R=n.value?"github-dark":"github-light",q=c.value;if(q){const[j,W]=await Promise.all([q.before?P(q.before,{lang:O,theme:R}):Promise.resolve(null),q.after?P(q.after,{lang:O,theme:R}):Promise.resolve(null)]);if(N!==A)return;f.value=j?.tokens??null,h.value=W?.tokens??null}else{const j=u.value.length>0?await P(u.value.join(` +`),{lang:O,theme:R}):null;if(N!==A)return;d.value=j?.tokens??null}}catch{N===A&&g()}}function C(){if(m!==null)return;const N=Math.max(0,w3e-(Date.now()-y));m=setTimeout(()=>{m=null,b()},N)}const v=L(()=>u.value.join(` +`)),x=L(()=>c.value?.before??null),S=L(()=>c.value?.after??null);qe([v,x,S],C),qe([i,n,()=>t.fullTexts],()=>{A++,g(),C()}),mn(b),Mn(()=>{A++,m!==null&&clearTimeout(m),m=null});const _=L(()=>{let N=0;if(Array.isArray(t.lineNumbers))for(const O of t.lineNumbers)O>N&&(N=O);else for(const O of t.lines??[])O.oldNo!==void 0&&O.oldNo>N&&(N=O.oldNo),O.newNo!==void 0&&O.newNo>N&&(N=O.newNo);return Math.max(4,String(N).length)});function I(N){if(N.type==="del"){if(N.oldNo===void 0)return null;const P=t.fullTexts?N.oldNo-1:M.value.get(N.oldNo);return P===void 0?null:f.value?.[P]??null}if(N.newNo===void 0)return null;const O=t.fullTexts?N.newNo-1:$.value.get(N.newNo);return O===void 0?null:h.value?.[O]??null}const M=L(()=>{const N=new Map;let O=0;for(const P of t.lines??[])P.oldNo!==void 0&&N.set(P.oldNo,O++);return N}),$=L(()=>{const N=new Map;let O=0;for(const P of t.lines??[])P.newNo!==void 0&&N.set(P.newNo,O++);return N});function D(N){const O={};N.color&&(O.color=N.color);const P=N.fontStyle??0;return P&1&&(O.fontStyle="italic"),P&2&&(O.fontWeight="var(--weight-semibold)"),P&4&&(O.textDecoration="underline"),O}function T(N){return N.type==="add"?"+":N.type==="del"?"-":" "}return(N,O)=>(k(),E("div",{class:Fe(["hl-code",{gutter:o.value,"plain-pad":!s.value&&!a.value,framed:e.framed}]),style:qt({"--gutter-ch":`${_.value}ch`})},[w("div",g3e,[s.value?(k(!0),E(Te,{key:0},ht(e.lines??[],(P,R)=>(k(),E("div",{key:R,class:Fe(["hl-row",`row-${P.type}`])},[o.value?(k(),E(Te,{key:0},[r.value?(k(),E("span",m3e,F(P.oldNo??""),1)):te("",!0),l.value?(k(),E("span",v3e,F(P.newNo??""),1)):te("",!0)],64)):te("",!0),w("span",y3e,F(T(P)),1),w("span",k3e,[I(P)?(k(!0),E(Te,{key:0},ht(I(P)??[],(q,j)=>(k(),E("span",{key:j,style:qt(D(q))},F(q.content),5))),128)):(k(),E(Te,{key:1},[$e(F(P.text),1)],64))])],2))),128)):(k(!0),E(Te,{key:1},ht(u.value,(P,R)=>(k(),E("div",{key:R,class:Fe(["hl-row",e.lineClass?.(a.value?.[R]??-1)]),"data-line":a.value?.[R]},[a.value?(k(),E("span",A3e,F(a.value[R]??""),1)):te("",!0),w("span",C3e,[d.value?.[R]?(k(!0),E(Te,{key:0},ht(d.value[R]??[],(q,j)=>(k(),E("span",{key:j,style:qt(D(q))},F(q.content),5))),128)):(k(),E(Te,{key:1},[$e(F(P),1)],64))])],10,b3e))),128))])],6))}}),$l=gt(x3e,[["__scopeId","data-v-6735e4da"]]),S3e={class:"tl-name"},_3e={key:1,class:"tl-dim"},I3e={key:2,class:"tl-faint"},M3e={key:0,class:"tl-add"},E3e={key:1,class:"tl-del"},T3e={class:"diffbar","aria-hidden":"true"},L3e={key:1,class:"tl-chip"},N3e=Qe({__name:"EditTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>n.tool.status),r=L(()=>Eo(n.tool.name)==="write"),l=L(()=>xB(Mc(n.tool.arg))??""),a=L(()=>l.value?uu(l.value):""),u=L(()=>l.value?SB(l.value):""),c=L(()=>SD(n.tool)),d=L(()=>Kse(n.tool)),f=L(()=>{const x=c.value;return!x||n.tool.status==="error"?{added:0,removed:0}:kD(x)}),h=L(()=>f.value.added>0||f.value.removed>0),g=L(()=>!!n.tool.output&&n.tool.output.length>0),m=L(()=>c.value!==null&&n.tool.status!=="error"),y=L(()=>d.value!==null&&n.tool.status!=="error"),A=L(()=>m.value||y.value||g.value),b=G(!1),C=G(b.value);qe(b,x=>{x&&(C.value=!0)});function v(){l.value&&i("openFile",{path:l.value})}return(x,S)=>(k(),de(Vl,{status:o.value,open:b.value,expandable:A.value,onToggle:S[0]||(S[0]=_=>b.value=!b.value)},{leading:he(()=>[K(p(ve),{name:r.value?"file-plus":"pencil",size:"sm"},null,8,["name"])]),trailing:he(()=>[h.value?(k(),E(Te,{key:0},[f.value.added>0?(k(),E("span",M3e,"+"+F(f.value.added),1)):te("",!0),f.value.removed>0?(k(),E("span",E3e,"−"+F(f.value.removed),1)):te("",!0),w("span",T3e,[w("span",{class:"seg-add",style:qt({flexGrow:f.value.added})},null,4),w("span",{class:"seg-del",style:qt({flexGrow:f.value.removed})},null,4)])],64)):r.value&&o.value==="ok"?(k(),E("span",L3e,F(p(s)("tools.chip.created")),1)):te("",!0)]),body:he(()=>[m.value&&C.value?(k(),de($l,{key:0,lines:c.value??[],path:l.value},null,8,["lines","path"])):y.value&&C.value?(k(),de($l,{key:1,code:d.value?.content??"",path:d.value?.path},null,8,["code","path"])):(k(),de(el,{key:2,lines:e.tool.output,"empty-text":p(s)("tools.output.waiting")},null,8,["lines","empty-text"]))]),default:he(()=>[w("span",S3e,F(r.value?p(s)("tools.label.write"):p(s)("tools.label.edit")),1),a.value?(k(),E("button",{key:0,class:"tl-file",type:"button",onClick:Ct(v,["stop"])},F(a.value),1)):(k(),E("span",_3e,F(l.value||e.tool.arg),1)),u.value?(k(),E("span",I3e,F(u.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),F3e=gt(N3e,[["__scopeId","data-v-bbf61950"]]),D3e=["innerHTML"],$3e={class:"tl-name"},B3e={key:0,class:"tl-dim"},z3e={key:0,class:"tl-chip"},R3e={key:1,class:"tl-chip"},O3e={key:0,class:"arg-full"},P3e=Qe({__name:"GenericTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile"],setup(e){const t=e,{t:n}=Bt(),i=L(()=>t.tool.status),s=L(()=>Kh(t.tool.name)),o=L(()=>wB(t.tool.name)),r=L(()=>f_(t.tool.name,t.tool.arg)),l=L(()=>f_(t.tool.name,t.tool.arg,!0)),a=L(()=>v4e({name:t.tool.name,arg:t.tool.arg,output:t.tool.output,timing:t.tool.timing,status:t.tool.status})),u=L(()=>!!t.tool.output&&t.tool.output.length>0),c=L(()=>u.value||!!l.value&&l.value!==r.value),d=G(t.tool.defaultExpanded===!0&&c.value);return qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status,t.tool.name],()=>{t.tool.defaultExpanded===!0&&c.value&&(d.value=!0)}),(f,h)=>(k(),de(Vl,{status:i.value,open:d.value,expandable:c.value,onToggle:h[0]||(h[0]=g=>d.value=!d.value)},{leading:he(()=>[w("span",{class:"gl",innerHTML:o.value},null,8,D3e)]),trailing:he(()=>[a.value?(k(),E("span",z3e,F(a.value),1)):e.tool.timing?(k(),E("span",R3e,F(e.tool.timing),1)):te("",!0)]),body:he(()=>[l.value&&l.value!==r.value?(k(),E("div",O3e,F(l.value),1)):te("",!0),K(el,{lines:e.tool.output,"empty-text":i.value==="running"?p(n)("tools.output.waiting"):p(n)("tools.output.empty")},null,8,["lines","empty-text"])]),default:he(()=>[w("span",$3e,F(s.value),1),r.value?(k(),E("span",B3e,F(r.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),j3e=gt(P3e,[["__scopeId","data-v-b12a8498"]]),H3e={class:"tl-name"},W3e={key:0,class:"tl-mono"},q3e={key:1,class:"tl-mono"},U3e={key:2,class:"tl-dim"},K3e={key:3,class:"tl-faint"},V3e={key:0,class:"tl-chip"},Z3e={key:0,class:"file-list"},G3e=["onClick"],Q3e=Qe({__name:"GlobTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>n.tool.status),r=L(()=>Eo(n.tool.name)==="glob"),l=L(()=>Mc(n.tool.arg)),a=L(()=>{const m=l.value;return oi(m?.pattern)??oi(m?.glob)??oi(m?.query)??""}),u=L(()=>{const m=l.value;return oi(m?.path)??oi(m?.dir)??oi(m?.directory)??oi(m?.cwd)??""}),c=L(()=>(n.tool.output??[]).filter(m=>m.trim().length>0)),d=L(()=>c.value.length>0),f=L(()=>d.value),h=G(n.tool.defaultExpanded===!0&&f.value);qe(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&f.value&&(h.value=!0)});function g(m){const y=m.trim();y&&i("openFile",{path:y})}return(m,y)=>(k(),de(Vl,{status:o.value,open:h.value,expandable:f.value,onToggle:y[0]||(y[0]=A=>h.value=!h.value)},{leading:he(()=>[K(p(ve),{name:r.value?"tree-view":"list",size:"sm"},null,8,["name"])]),trailing:he(()=>[r.value&&c.value.length>0?(k(),E("span",V3e,F(p(s)("tools.chip.files",{count:c.value.length})),1)):te("",!0)]),body:he(()=>[r.value?(k(),E("div",Z3e,[(k(!0),E(Te,null,ht(c.value,(A,b)=>(k(),E("button",{key:b,class:"file-row",type:"button",onClick:C=>g(A)},F(A),9,G3e))),128))])):(k(),de(el,{key:1,lines:e.tool.output},null,8,["lines"]))]),default:he(()=>[w("span",H3e,F(p(s)(r.value?"tools.label.glob":"tools.label.ls")),1),r.value&&a.value?(k(),E("span",W3e,F(a.value),1)):!r.value&&u.value?(k(),E("span",q3e,F(u.value),1)):(k(),E("span",U3e,F(e.tool.arg),1)),r.value&&u.value?(k(),E("span",K3e,F(u.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),Y3e=gt(Q3e,[["__scopeId","data-v-3936099e"]]),J3e={class:"tl-name"},X3e={key:0,class:"tl-dim"},eke={key:1,class:"tl-pill pill-active"},tke={key:0,class:"goal-block"},nke={class:"goal-text"},ike={key:0,class:"goal-criterion"},ske=Qe({__name:"GoalTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=L(()=>t.tool.status),s=L(()=>Eo(t.tool.name)),o=L(()=>Mc(t.tool.arg)),r=L(()=>oi(o.value?.objective)??""),l=L(()=>oi(o.value?.completionCriterion)??oi(o.value?.completion_criterion)??""),a={active:"status.goalStatusActive",blocked:"status.goalStatusBlocked",complete:"status.goalStatusComplete"},u=L(()=>oi(o.value?.status)??""),c=L(()=>{const b=a[u.value];return b?n(b):u.value}),d=L(()=>{switch(u.value){case"complete":return"pill-done";case"blocked":return"pill-blocked";default:return"pill-active"}}),f=L(()=>{const b=Lu(o.value?.value),C=oi(o.value?.unit);return b===void 0||!C?"":["turns","tokens","milliseconds","seconds","minutes","hours"].includes(C)?n(`tools.goal.${C}`,{value:b}):n("tools.goal.budget",{value:b,unit:C})}),h=L(()=>{switch(s.value){case"creategoal":return r.value;case"updategoal":return c.value;case"setgoalbudget":return f.value;default:return""}}),g=L(()=>!!t.tool.output&&t.tool.output.length>0),m=L(()=>!!l.value||s.value==="creategoal"&&g.value),y=L(()=>m.value||g.value),A=G(t.tool.defaultExpanded===!0&&y.value);return qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&y.value&&(A.value=!0)}),(b,C)=>(k(),de(Vl,{status:i.value,open:A.value,expandable:y.value,onToggle:C[0]||(C[0]=v=>A.value=!A.value)},{leading:he(()=>[K(p(ve),{name:"target",size:"sm"})]),trailing:he(()=>[s.value==="updategoal"&&c.value?(k(),E("span",{key:0,class:Fe(["tl-pill",d.value])},F(c.value),3)):s.value==="creategoal"?(k(),E("span",eke,F(p(n)("status.goalStatusActive")),1)):te("",!0)]),body:he(()=>[r.value?(k(),E("div",tke,[w("div",nke,F(r.value),1),l.value?(k(),E("div",ike,F(l.value),1)):te("",!0)])):te("",!0),g.value?(k(),de(el,{key:1,lines:e.tool.output},null,8,["lines"])):te("",!0)]),default:he(()=>[w("span",J3e,F(p(Kh)(e.tool.name)),1),h.value?(k(),E("span",X3e,F(h.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),oke=gt(ske,[["__scopeId","data-v-862274de"]]),rke={class:"tl-name"},lke={key:0,class:"tl-mono"},ake={key:1,class:"tl-dim"},uke={key:2,class:"tl-faint"},cke={key:0,class:"tl-chip"},dke={key:0,class:"match-list"},fke=["onClick"],hke={key:0,class:"mref"},pke={class:"mtext"},gke=Qe({__name:"GrepTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>n.tool.status),r=L(()=>Eo(n.tool.name)==="grep"),l=L(()=>Mc(n.tool.arg)),a=L(()=>{const y=l.value;return oi(y?.pattern)??oi(y?.query)??oi(y?.regex)??""}),u=L(()=>{const y=l.value;return oi(y?.path)??oi(y?.glob)??oi(y?.include)??""}),c=L(()=>(n.tool.output??[]).filter(y=>y.trim().length>0).map(y=>{const A=/^(.+?):(\d+)[:-](.*)$/.exec(y);return A?{path:A[1],line:Number(A[2]),text:(A[3]??"").trim()}:{text:y}})),d=L(()=>c.value.length),f=L(()=>d.value>0),h=L(()=>f.value),g=G(n.tool.defaultExpanded===!0&&h.value);qe(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&h.value&&(g.value=!0)});function m(y){y.path&&i("openFile",{path:y.path,line:y.line})}return(y,A)=>(k(),de(Vl,{status:o.value,open:g.value,expandable:h.value,onToggle:A[0]||(A[0]=b=>g.value=!g.value)},{leading:he(()=>[K(p(ve),{name:"search",size:"sm"})]),trailing:he(()=>[d.value>0?(k(),E("span",cke,F(p(s)("tools.chip.results",{count:d.value})),1)):te("",!0)]),body:he(()=>[r.value?(k(),E("div",dke,[(k(!0),E(Te,null,ht(c.value,(b,C)=>(k(),E("button",{key:C,class:Fe(["match-row",{link:b.path}]),type:"button",onClick:v=>m(b)},[b.path?(k(),E("span",hke,F(b.path)+":"+F(b.line),1)):te("",!0),w("span",pke,F(b.text),1)],10,fke))),128))])):(k(),de(el,{key:1,lines:e.tool.output},null,8,["lines"]))]),default:he(()=>[w("span",rke,F(p(s)(r.value?"tools.label.grep":"tools.label.search")),1),a.value?(k(),E("span",lke,F(a.value),1)):(k(),E("span",ake,F(e.tool.arg),1)),u.value?(k(),E("span",uke,F(u.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),mke=gt(gke,[["__scopeId","data-v-899c1a48"]]),vke=["app:load:start","app:load:complete","export:start","export:accepted","export:failed","prompt:start","prompt:accepted","prompt:failed","session:snapshot:start","session:snapshot:accepted","session:snapshot:failed","operation:failed","window:error","window:unhandled-rejection","ws:connection","ws:error","ws:resync","ws:stale-reconnect"],_B=500,Av=256*1024,h_=200,l3=16384,a3=500,u3=50,c3=50,yke=6,kke=/api[_-]?key|authorization|token|secret|password|cookie|credential|email|phone|nickname|avatar/i,bke=/^[A-Za-z0-9+/=_-]{200,}$/;let d3=null;function Zl(){if(d3!==null)return d3;let e=!1;try{if(typeof location<"u"){const t=new URLSearchParams(location.search).get("debug");(t==="1"||t==="true")&&(e=!0)}}catch{}return e||(e=To(hn.debug)==="1"),d3=e,e}const Qu=[],Yf=[];let Q1=0;const fd=[];let Y1=0,Ake=1;const Cv=new TextEncoder,Cke=new Set(vke),L6=G(0),J1=Ul(!1);function wke(){return Qu}function xke(){Qu.length=0,Yf.length=0,Q1=0,fd.length=0,Y1=0,L6.value++}function cu(e){if(!J1.value){try{const t={id:Ake++,ts:Date.now(),source:e.source,kind:String(gh(e.kind)),label:String(gh(e.label)),sessionId:e.sessionId===void 0?void 0:String(gh(e.sessionId)),method:e.method,path:e.path,eventType:e.eventType,seq:e.seq,offset:e.offset,status:e.status,code:e.code,requestId:e.requestId,durationMs:e.durationMs,detail:Ec(e.detail)},n=JSON.stringify(t),i=Cv.encode(n).byteLength;if(i>Av)return;for(Qu.push(t),Yf.push(n),Q1+=i+(Yf.length>1?1:0);Qu.length>_B||Q1>Av;){const s=Yf.shift();Qu.shift(),s!==void 0&&(Q1-=Cv.encode(s).byteLength,Yf.length>0&&(Q1-=1))}}catch{return}L6.value++}}function Xc(e){if(typeof e=="string")return e.length<=h_?e:e.slice(0,h_)}function ol(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function Ske(e,t){if(Cke.has(e))try{const n={ts:Date.now(),event:e,sessionId:Xc(t?.sessionId),status:Xc(t?.status),operation:Xc(t?.operation),seq:ol(t?.seq),durationMs:ol(t?.durationMs),messageCount:ol(t?.messageCount),contentCount:ol(t?.contentCount),mediaCount:ol(t?.mediaCount),sessionCount:ol(t?.sessionCount),workspaceCount:ol(t?.workspaceCount),promptId:Xc(t?.promptId),zipBytes:ol(t?.zipBytes),errorName:Xc(t?.errorName),errorCode:ol(t?.errorCode),requestId:Xc(t?.requestId),phase:Xc(t?.phase),httpStatus:ol(t?.httpStatus),fatal:typeof t?.fatal=="boolean"?t.fatal:void 0,line:ol(t?.line),col:ol(t?.col)},i=JSON.stringify(n),s=Cv.encode(i).byteLength;if(s>Av)return;for(fd.push(i),Y1+=s+(fd.length>1?1:0);fd.length>_B||Y1>Av;){const o=fd.shift();o!==void 0&&(Y1-=Cv.encode(o).byteLength,fd.length>0&&(Y1-=1))}}catch{return}}function gh(e,t=0){if(e==null)return e;const n=typeof e;if(n==="number"||n==="boolean")return e;if(n==="string"){const o=e;return bke.test(o)?`[base64-like, ${o.length} chars omitted]`:o.length>a3?`${o.slice(0,a3)}… [+${o.length-a3} chars]`:o}if(n!=="object")return String(e);if(t>=yke)return"[max depth]";if(Array.isArray(e)){const o=e.slice(0,u3).map(r=>gh(r,t+1));return e.length>u3&&o.push(`[+${e.length-u3} more items]`),o}const i={},s=Object.entries(e);for(const[o,r]of s.slice(0,c3))i[o]=kke.test(o)?"[redacted]":gh(r,t+1);return s.length>c3&&(i._truncatedKeys=s.length-c3),i}function Ec(e){if(e===void 0)return;const t=gh(e);try{const n=JSON.stringify(t);if(n!==void 0&&n.length>l3)return{_truncated:`detail JSON was ${n.length} chars; first ${l3} kept`,preview:n.slice(0,l3)}}catch{return"[unserializable detail]"}return t}function _ke(e){Zl()&&cu({source:"rest",kind:"rest:request",label:`→ ${e.method} ${e.path}`,method:e.method,path:e.path,requestId:e.requestId,detail:{url:e.url,body:Ec(e.body)}})}function Ike(e){if(!Zl())return;const t=e.code!==0;cu({source:"rest",kind:t?"rest:error":"rest:response",label:`← ${e.method} ${e.path} ${e.status} code=${e.code}${t?` "${e.msg}"`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,code:e.code,durationMs:e.durationMs,detail:{envelope:{code:e.code,msg:e.msg,request_id:e.envelopeRequestId},data:Ec(e.data)}})}function Mke(e){Zl()&&cu({source:"rest",kind:"rest:error",label:`✕ ${e.method} ${e.path} ${e.phase} error${e.status!==void 0?` (HTTP ${e.status})`:""} ${Math.round(e.durationMs)}ms`,method:e.method,path:e.path,requestId:e.requestId,status:e.status,durationMs:e.durationMs,detail:{phase:e.phase,error:String(e.error)}})}function Eke(e,t){Zl()&&cu({source:"ws",kind:"ws:lifecycle",eventType:e,label:`ws ${e}`,detail:Ec(t)})}function Tke(e){if(!Zl())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",i=t.payload,s=typeof i?.session_id=="string"?i.session_id:void 0;cu({source:"ws",kind:"ws:out",eventType:n,sessionId:s,label:`→ ${n}`,detail:Ec(e)})}function Lke(e){if(!Zl())return;const t=e??{},n=typeof t.type=="string"?t.type:"(unknown)",i=typeof t.session_id=="string"?t.session_id:typeof t.payload?.session_id=="string"?t.payload.session_id:void 0,s=typeof t.seq=="number"?t.seq:void 0,o=typeof t.offset=="number"?t.offset:void 0,r=[i,s!==void 0?`seq=${s}`:void 0,o!==void 0?`offset=${o}`:void 0,t.volatile===!0?"volatile":void 0].filter(Boolean);cu({source:"ws",kind:"ws:in",eventType:n,sessionId:i,seq:s,offset:o,label:`← ${n}${r.length>0?` (${r.join(" ")})`:""}`,detail:Ec(t.payload)})}const Nke={error:"✕",warn:"⚠",info:"ℹ",debug:"·",log:"·"};function Fke(e,t,n){Zl()&&cu({source:"client",kind:`client:${e}`,label:`${Nke[e]} ${t}`,detail:Ec(n)})}function Dke(e,t){Zl()&&cu({source:"client",kind:"client:event",label:`· ${e}`,detail:Ec(t)})}function wv(e,t){Ske(e,t),cu({source:"client",kind:"client:key",label:e,sessionId:typeof t?.sessionId=="string"?t.sessionId:void 0,seq:typeof t?.seq=="number"?t.seq:void 0,durationMs:typeof t?.durationMs=="number"?t.durationMs:void 0,detail:t})}let f3=!1,pm=null;function $ke(){if(f3)return()=>pm?.();f3=!0;const e=[];try{if(typeof window<"u"){const n=s=>{wv("window:error",{status:"failed",errorName:s.error instanceof Error?s.error.name:"Error",line:s.lineno,col:s.colno}),Ua(`[kimi-web] window error: ${s.message}`,s.error instanceof Error?s.error.stack:void 0)},i=s=>{const o=s.reason;wv("window:unhandled-rejection",{status:"failed",errorName:o instanceof Error?o.name:typeof o}),Ua(`[kimi-web] unhandled rejection: ${zke(o)}`,o instanceof Error?o.stack:void 0)};window.addEventListener("error",n),window.addEventListener("unhandledrejection",i),e.push(()=>{window.removeEventListener("error",n)}),e.push(()=>{window.removeEventListener("unhandledrejection",i)})}}catch{}if(Zl())for(const n of["error","warn","log","info","debug"]){const i=console[n];if(typeof i!="function")continue;const s=(...o)=>{try{Fke(n,o.map(Bke).join(" "),o.length>1?o:o[0])}catch{}i.apply(console,o)};console[n]=s,e.push(()=>{console[n]===s&&(console[n]=i)})}const t=()=>{if(pm===t){for(const n of e.toReversed())n();pm=null,f3=!1}};return pm=t,t}function Bke(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)}catch{return String(e)}}function zke(e){if(e instanceof Error)return e.message;try{return String(e)}catch{return"[unstringifiable reason]"}}function IB(e=Qu){if(typeof document>"u")return;const t=new Blob([Rke(e)],{type:"application/x-ndjson"}),n=URL.createObjectURL(t);let i;try{i=document.createElement("a"),i.href=n,i.download=`kimi-web-log-${new Date().toISOString().replaceAll(/[:.]/g,"-")}.jsonl`,document.body.append(i),i.click()}finally{i?.remove(),setTimeout(()=>{try{URL.revokeObjectURL(n)}catch{}},0)}}function Rke(e=Qu){return e===Qu?Yf.join(` +`):e.map(t=>JSON.stringify(t)).join(` +`)}function Oke(){return fd.join(` +`)}const p_=hn.clientId,Pke="kimi-code-web",jke="web";function Hke(){return{serverHttpUrl:qke(),clientId:Kke(),clientName:Pke,clientVersion:Vke(),clientUiMode:jke}}function Wke(){return typeof window<"u"&&window.location?.origin?window.location.origin:"http://127.0.0.1:58627"}function qke(){const e=MB();return Qb(e||void 0)}const g_="kimi-desktop-server-origin";function MB(){if(typeof window>"u")return;const e=new URLSearchParams(window.location.search).get("kimi_origin");try{return e?(window.sessionStorage.setItem(g_,e),e):window.sessionStorage.getItem(g_)??void 0}catch{return e??void 0}}function Qb(e){const t=e&&e.trim()?e:Wke(),n=new URL(t);return n.pathname=n.pathname.replace(/\/v1\/?$/,"").replace(/\/$/,""),n.search="",n.hash="",n.toString().replace(/\/$/,"")}function m_(e){return e.replace(/^https?:\/\//,"").replace(/\/$/,"")}function Uke(){if(typeof window<"u"){const t=MB();if(t)return m_(Qb(t))}const e=typeof window<"u"&&window.location?.origin?window.location.origin:"";return m_(e)}function Kke(){const e=To(p_);if(e)return e;const t=`web_${globalThis.crypto?.randomUUID?.()||Math.random().toString(36).slice(2)}`;return Js(p_,t),t}function Vke(){return"0.37.1".trim()?"0.37.1":"0.0.0-dev"}const Zke={restRequest:e=>_ke(e),restResponse:e=>Ike(e),restFailure:e=>Mke(e),wsEvent:e=>{switch(e.kind){case"lifecycle":Eke(e.event,e.detail);break;case"in":Lke(e.frame);break;case"out":Tke(e.frame);break}},traceKeyEvent:(e,t)=>wv(e,t)},Gke={getToken:vre,markAuthRequired:Are},Qke=(e,t)=>t===void 0?Wl.global.t(e):Wl.global.t(e,t);function Yke(){const e=Hke();return fie({origin:e.serverHttpUrl,identity:{clientId:e.clientId,clientName:e.clientName,clientVersion:e.clientVersion,clientUiMode:e.clientUiMode},tracer:Zke,credentialStore:Gke,t:Qke})}const Jke=Yke();function uc(){return Jke}const Xke=["src","controls","muted"],ebe=["src","alt"],tbe=Qe({__name:"AuthMedia",props:{url:{},kind:{},alt:{},fileId:{},sessionId:{},mediaClass:{default:"u-img"},controls:{type:Boolean,default:!0},muted:{type:Boolean,default:!1}},setup(e){const t=e,n=G(t.fileId?"":t.url),i=G(null),s=G(!t.fileId);let o=null,r=0,l=!1,a=null;function u(){o!==null&&(URL.revokeObjectURL(o),o=null)}async function c(){const d=++r;if(u(),!t.fileId){n.value=t.url;return}if(s.value)try{const f=t.sessionId?await uc().getSessionMediaBlob(t.sessionId,t.fileId):await uc().getFileBlob(t.fileId),h=URL.createObjectURL(f);if(l||d!==r){URL.revokeObjectURL(h);return}o=h,n.value=o}catch{if(l||d!==r)return;n.value=t.url}}return qe(()=>[t.fileId,t.sessionId,t.url,s.value],c,{immediate:!0}),mn(()=>{typeof IntersectionObserver=="function"&&i.value?(a=new IntersectionObserver(d=>{d[0]?.isIntersecting&&(s.value=!0,a?.disconnect(),a=null)},{rootMargin:"200px"}),a.observe(i.value)):s.value=!0}),Gn(()=>{l=!0,a?.disconnect(),a=null,u()}),(d,f)=>e.kind==="video"?(k(),E("video",{key:0,ref_key:"mediaEl",ref:i,class:Fe(e.mediaClass),src:n.value||void 0,controls:e.controls,muted:e.muted,playsinline:"",preload:"metadata"},null,10,Xke)):(k(),E("img",{key:1,ref_key:"mediaEl",ref:i,class:Fe([e.mediaClass,{"is-resolving":!n.value}]),src:n.value||void 0,alt:e.alt||"",loading:"lazy"},null,10,ebe))}}),q0=gt(tbe,[["__scopeId","data-v-23acd4fa"]]),nbe={class:"media-title"},ibe=["src","alt"],sbe=["aria-label"],obe={key:0,class:"media-video-tile","aria-hidden":"true"},rbe={class:"media-play-badge","aria-hidden":"true"},lbe=["src"],abe=Qe({__name:"MediaTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia"],setup(e,{emit:t}){const n=e,i=t,s=L(()=>n.tool.status==="ok"?n.tool.media:void 0);function o(d){return d.split(/[\\/]+/).pop()||d}function r(d){return d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/1024/1024).toFixed(1)} MB`}const l=L(()=>{const d=s.value;if(!d)return"";const f=[d.path?o(d.path):n.tool.name];return d.mimeType&&f.push(d.mimeType),d.bytes!==void 0&&f.push(r(d.bytes)),d.dimensions&&f.push(d.dimensions),f.join(" · ")}),a=L(()=>s.value?.url.startsWith("blob:")??!1),u=L(()=>{const d=s.value;return d?.kind==="video"&&d.fileId!==void 0&&!a.value});function c(d){const f=s.value;if(f?.kind!=="image"&&f?.kind!=="video")return;const h=f.kind==="image"?d.currentTarget.querySelector("img"):null;i("openMedia",{media:f,originImg:h})}return(d,f)=>s.value?(k(),E("div",{key:0,class:Fe(["media-tool",{mob:e.mobile}])},[K(p(kn),{text:s.value.path||l.value},{default:he(()=>[w("div",nbe,F(l.value),1)]),_:1},8,["text"]),s.value.kind==="image"?(k(),de(p(kn),{key:0,text:s.value.path||l.value},{default:he(()=>[w("button",{type:"button",class:"media-image-button",onClick:c},[w("img",{class:"media-image",src:s.value.url,alt:s.value.path?o(s.value.path):l.value,loading:"lazy"},null,8,ibe)])]),_:1},8,["text"])):s.value.kind==="video"?(k(),de(p(kn),{key:1,text:s.value.path||l.value},{default:he(()=>[w("button",{type:"button",class:"media-image-button media-video-button","aria-label":s.value.path?o(s.value.path):l.value,onClick:c},[u.value?(k(),E("span",obe)):(k(),de(q0,{key:1,url:s.value.url,kind:"video","file-id":a.value?void 0:s.value.fileId,"media-class":"media-video",controls:!1,muted:""},null,8,["url","file-id"])),w("span",rbe,[K(p(ve),{name:"play",size:"sm"})])],8,sbe)]),_:1},8,["text"])):(k(),E("audio",{key:2,class:"media-audio",src:s.value.url,controls:""},null,8,lbe))],2)):te("",!0)}}),ube=gt(abe,[["__scopeId","data-v-3bc3ee1a"]]);var cbe=Object.create,N6=Object.defineProperty,dbe=Object.getOwnPropertyDescriptor,EB=Object.getOwnPropertyNames,fbe=Object.getPrototypeOf,hbe=Object.prototype.hasOwnProperty,TB=(e,t)=>function(){return t||(0,e[EB(e)[0]])((t={exports:{}}).exports,t),t.exports},pbe=e=>{let t={};for(var n in e)N6(t,n,{get:e[n],enumerable:!0});return t},gbe=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=EB(t),o=0,r=s.length,l;o<r;o++)l=s[o],!hbe.call(e,l)&&l!==n&&N6(e,l,{get:(a=>t[a]).bind(null,l),enumerable:!(i=dbe(t,l))||i.enumerable});return e},LB=(e,t,n)=>(n=e!=null?cbe(fbe(e)):{},gbe(N6(n,"default",{value:e,enumerable:!0}),e));function mbe(e,t,n,i){const s=Number(e[t].meta.id+1).toString();let o="";return typeof i.docId=="string"&&(o=`-${i.docId}-`),o+s}function vbe(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function ybe(e,t,n,i,s){const o=s.rules.footnote_anchor_name(e,t,n,i,s),r=s.rules.footnote_caption(e,t,n,i,s);let l=o;return e[t].meta.subId>0&&(l+=`:${e[t].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${o}" id="fnref${l}">${r}</a></sup>`}function kbe(e,t,n){return(n.xhtmlOut?`<hr class="footnotes-sep" /> +`:`<hr class="footnotes-sep"> +`)+`<section class="footnotes"> +<ol class="footnotes-list"> +`}function bbe(){return`</ol> +</section> +`}function Abe(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),`<li id="fn${o}" class="footnote-item">`}function Cbe(){return`</li> +`}function wbe(e,t,n,i,s){let o=s.rules.footnote_anchor_name(e,t,n,i,s);return e[t].meta.subId>0&&(o+=`:${e[t].meta.subId}`),` <a href="#fnref${o}" class="footnote-backref">↩︎</a>`}function xbe(e){const t=e.helpers.parseLinkLabel,n=e.utils.isSpace;e.renderer.rules.footnote_ref=ybe,e.renderer.rules.footnote_block_open=kbe,e.renderer.rules.footnote_block_close=bbe,e.renderer.rules.footnote_open=Abe,e.renderer.rules.footnote_close=Cbe,e.renderer.rules.footnote_anchor=wbe,e.renderer.rules.footnote_caption=vbe,e.renderer.rules.footnote_anchor_name=mbe;function i(l,a,u,c){const d=l.bMarks[a]+l.tShift[a],f=l.eMarks[a];if(d+4>f||l.src.charCodeAt(d)!==91||l.src.charCodeAt(d+1)!==94)return!1;let h;for(h=d+2;h<f;h++){if(l.src.charCodeAt(h)===32)return!1;if(l.src.charCodeAt(h)===93)break}if(h===d+2||h+1>=f||l.src.charCodeAt(++h)!==58)return!1;if(c)return!0;h++,l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.refs||(l.env.footnotes.refs={});const g=l.src.slice(d+2,h-2);l.env.footnotes.refs[`:${g}`]=-1;const m=new l.Token("footnote_reference_open","",1);m.meta={label:g},m.level=l.level++,l.tokens.push(m);const y=l.bMarks[a],A=l.tShift[a],b=l.sCount[a],C=l.parentType,v=h,x=l.sCount[a]+h-(l.bMarks[a]+l.tShift[a]);let S=x;for(;h<f;){const I=l.src.charCodeAt(h);if(n(I))I===9?S+=4-S%4:S++;else break;h++}l.tShift[a]=h-v,l.sCount[a]=S-x,l.bMarks[a]=v,l.blkIndent+=4,l.parentType="footnote",l.sCount[a]<l.blkIndent&&(l.sCount[a]+=l.blkIndent),l.md.block.tokenize(l,a,u,!0),l.parentType=C,l.blkIndent-=4,l.tShift[a]=A,l.sCount[a]=b,l.bMarks[a]=y;const _=new l.Token("footnote_reference_close","",-1);return _.level=--l.level,l.tokens.push(_),!0}function s(l,a){const u=l.posMax,c=l.pos;if(c+2>=u||l.src.charCodeAt(c)!==94||l.src.charCodeAt(c+1)!==91)return!1;const d=c+2,f=t(l,c+1);if(f<0)return!1;if(!a){l.env.footnotes||(l.env.footnotes={}),l.env.footnotes.list||(l.env.footnotes.list=[]);const h=l.env.footnotes.list.length,g=[];l.md.inline.parse(l.src.slice(d,f),l.md,l.env,g);const m=l.push("footnote_ref","",0);m.meta={id:h},l.env.footnotes.list[h]={content:l.src.slice(d,f),tokens:g}}return l.pos=f+1,l.posMax=u,!0}function o(l,a){const u=l.posMax,c=l.pos;if(c+3>u||!l.env.footnotes||!l.env.footnotes.refs||l.src.charCodeAt(c)!==91||l.src.charCodeAt(c+1)!==94)return!1;let d;for(d=c+2;d<u;d++){if(l.src.charCodeAt(d)===32||l.src.charCodeAt(d)===10)return!1;if(l.src.charCodeAt(d)===93)break}if(d===c+2||d>=u)return!1;d++;const f=l.src.slice(c+2,d-1);if(typeof l.env.footnotes.refs[`:${f}`]>"u")return!1;if(!a){l.env.footnotes.list||(l.env.footnotes.list=[]);let h;l.env.footnotes.refs[`:${f}`]<0?(h=l.env.footnotes.list.length,l.env.footnotes.list[h]={label:f,count:0},l.env.footnotes.refs[`:${f}`]=h):h=l.env.footnotes.refs[`:${f}`];const g=l.env.footnotes.list[h].count;l.env.footnotes.list[h].count++;const m=l.push("footnote_ref","",0);m.meta={id:h,subId:g,label:f}}return l.pos=d,l.posMax=u,!0}function r(l){let a,u,c,d=!1;const f={};if(!l.env.footnotes||(l.tokens=l.tokens.filter(function(g){return g.type==="footnote_reference_open"?(d=!0,u=[],c=g.meta.label,!1):g.type==="footnote_reference_close"?(d=!1,f[":"+c]=u,!1):(d&&u.push(g),!d)}),!l.env.footnotes.list))return;const h=l.env.footnotes.list;l.tokens.push(new l.Token("footnote_block_open","",1));for(let g=0,m=h.length;g<m;g++){const y=new l.Token("footnote_open","",1);if(y.meta={id:g,label:h[g].label},l.tokens.push(y),h[g].tokens){a=[];const C=new l.Token("paragraph_open","p",1);C.block=!0,a.push(C);const v=new l.Token("inline","",0);v.children=h[g].tokens,v.content=h[g].content,a.push(v);const x=new l.Token("paragraph_close","p",-1);x.block=!0,a.push(x)}else h[g].label&&(a=f[`:${h[g].label}`]);a&&(l.tokens=l.tokens.concat(a));let A;l.tokens[l.tokens.length-1].type==="paragraph_close"?A=l.tokens.pop():A=null;const b=h[g].count>0?h[g].count:1;for(let C=0;C<b;C++){const v=new l.Token("footnote_anchor","",0);v.meta={id:g,subId:C,label:h[g].label},l.tokens.push(v)}A&&l.tokens.push(A),l.tokens.push(new l.Token("footnote_close","",-1))}l.tokens.push(new l.Token("footnote_block_close","",-1))}e.block.ruler.before("reference","footnote_def",i,{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",s),e.inline.ruler.after("footnote_inline","footnote_ref",o),e.core.ruler.after("inline","footnote_tail",r)}function Sbe(e){function t(i,s){const o=i.pos,r=i.src.charCodeAt(o);if(s||r!==43)return!1;const l=i.scanDelims(i.pos,!0);let a=l.length;const u=String.fromCharCode(r);if(a<2)return!1;if(a%2){const c=i.push("text","",0);c.content=u,a--}for(let c=0;c<a;c+=2){const d=i.push("text","",0);d.content=u+u,!(!l.can_open&&!l.can_close)&&i.delimiters.push({marker:r,length:0,jump:c/2,token:i.tokens.length-1,end:-1,open:l.can_open,close:l.can_close})}return i.pos+=l.length,!0}function n(i,s){let o;const r=[],l=s.length;for(let a=0;a<l;a++){const u=s[a];if(u.marker!==43||u.end===-1)continue;const c=s[u.end];o=i.tokens[u.token],o.type="ins_open",o.tag="ins",o.nesting=1,o.markup="++",o.content="",o=i.tokens[c.token],o.type="ins_close",o.tag="ins",o.nesting=-1,o.markup="++",o.content="",i.tokens[c.token-1].type==="text"&&i.tokens[c.token-1].content==="+"&&r.push(c.token-1)}for(;r.length;){const a=r.pop();let u=a+1;for(;u<i.tokens.length&&i.tokens[u].type==="ins_close";)u++;u--,a!==u&&(o=i.tokens[u],i.tokens[u]=i.tokens[a],i.tokens[a]=o)}}e.inline.ruler.before("emphasis","ins",t),e.inline.ruler2.before("emphasis","ins",function(i){const s=i.tokens_meta,o=(i.tokens_meta||[]).length;n(i,i.delimiters);for(let r=0;r<o;r++)s[r]&&s[r].delimiters&&n(i,s[r].delimiters)})}function _be(e){function t(i,s){const o=i.pos,r=i.src.charCodeAt(o);if(s||r!==61)return!1;const l=i.scanDelims(i.pos,!0);let a=l.length;const u=String.fromCharCode(r);if(a<2)return!1;if(a%2){const c=i.push("text","",0);c.content=u,a--}for(let c=0;c<a;c+=2){const d=i.push("text","",0);d.content=u+u,!(!l.can_open&&!l.can_close)&&i.delimiters.push({marker:r,length:0,jump:c/2,token:i.tokens.length-1,end:-1,open:l.can_open,close:l.can_close})}return i.pos+=l.length,!0}function n(i,s){const o=[],r=s.length;for(let l=0;l<r;l++){const a=s[l];if(a.marker!==61||a.end===-1)continue;const u=s[a.end],c=i.tokens[a.token];c.type="mark_open",c.tag="mark",c.nesting=1,c.markup="==",c.content="";const d=i.tokens[u.token];d.type="mark_close",d.tag="mark",d.nesting=-1,d.markup="==",d.content="",i.tokens[u.token-1].type==="text"&&i.tokens[u.token-1].content==="="&&o.push(u.token-1)}for(;o.length;){const l=o.pop();let a=l+1;for(;a<i.tokens.length&&i.tokens[a].type==="mark_close";)a++;if(a--,l!==a){const u=i.tokens[a];i.tokens[a]=i.tokens[l],i.tokens[l]=u}}}e.inline.ruler.before("emphasis","mark",t),e.inline.ruler2.before("emphasis","mark",function(i){let s;const o=i.tokens_meta,r=(i.tokens_meta||[]).length;for(n(i,i.delimiters),s=0;s<r;s++)o[s]&&o[s].delimiters&&n(i,o[s].delimiters)})}const Ibe=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function Mbe(e,t){const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==94||t||i+2>=n)return!1;e.pos=i+1;let s=!1;for(;e.pos<n;){if(e.src.charCodeAt(e.pos)===94){s=!0;break}e.md.inline.skipToken(e)}if(!s||i+1===e.pos)return e.pos=i,!1;const o=e.src.slice(i+1,e.pos);if(o.match(/(^|[^\\])(\\\\)*\s/))return e.pos=i,!1;e.posMax=e.pos,e.pos=i+1;const r=e.push("sup_open","sup",1);r.markup="^";const l=e.push("text","",0);l.content=o.replace(Ibe,"$1");const a=e.push("sup_close","sup",-1);return a.markup="^",e.pos=e.posMax+1,e.posMax=n,!0}function Ebe(e){e.inline.ruler.after("emphasis","sup",Mbe)}var Tbe=TB({"../../node_modules/.pnpm/markdown-it-task-checkbox@1.0.6/node_modules/markdown-it-task-checkbox/index.js":((e,t)=>{t.exports=function(m,y){y=Object.assign({},{disabled:!0,divWrap:!1,divClass:"checkbox",idPrefix:"cbx_",ulClass:"task-list",liClass:"task-list-item"},y),m.core.ruler.after("inline","github-task-lists",function(A){for(var b=A.tokens,C=0,v=2;v<b.length;v++)s(b,v)&&(o(b[v],C,y,A.Token),C+=1,n(b[v-2],"class",y.liClass),n(b[i(b,v-2)],"class",y.ulClass))})};function n(m,y,A){var b=m.attrIndex(y),C=[y,A];b<0?m.attrPush(C):m.attrs[b]=C}function i(m,y){for(var A=m[y].level-1,b=y-1;b>=0;b--)if(m[b].level===A)return b;return-1}function s(m,y){return d(m[y])&&f(m[y-1])&&h(m[y-2])&&g(m[y])}function o(m,y,A,b){var C=A.idPrefix+y;m.children[0].content=m.children[0].content.slice(3),m.children.unshift(l(C,b)),m.children.push(a(b)),m.children.unshift(r(m,C,A,b)),A.divWrap&&(m.children.unshift(u(A,b)),m.children.push(c(b)))}function r(m,y,A,b){var C=new b("checkbox_input","input",0);return C.attrs=[["type","checkbox"],["id",y]],/^\[[xX]\][ \u00A0]/.test(m.content)===!0&&C.attrs.push(["checked","true"]),A.disabled===!0&&C.attrs.push(["disabled","true"]),C}function l(m,y){var A=new y("label_open","label",1);return A.attrs=[["for",m]],A}function a(m){return new m("label_close","label",-1)}function u(m,y){var A=new y("checkbox_open","div",0);return A.attrs=[["class",m.divClass]],A}function c(m){return new m("checkbox_close","div",-1)}function d(m){return m.type==="inline"}function f(m){return m.type==="paragraph_open"}function h(m){return m.type==="list_item_open"}function g(m){return/^\[[xX \u00A0]\][ \u00A0]/.test(m.content)}})});const Lbe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Nbe(e){return e>=55296&&e<=57343||e>1114111?65533:Lbe.get(e)??e}function Fbe(e){const t=atob(e),n=t.length&-2,i=new Uint16Array(n/2);for(let s=0,o=0;s<n;s+=2){const r=t.charCodeAt(s),l=t.charCodeAt(s+1);i[o++]=r|l<<8}return i}const Dbe=Fbe("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IAAOA12J/c8iFvaxBhAAhOVGFjZGZnbG1vcHFzdHV4owOlA6kDsAO/A8IDxgPNA9ID8gP9AwEEFAQeBCAEJQRHAEphSAA7gNAA0EBjAHUAdABlADuAyQDJQIABYWl5ALYDuQO+A/Ihb24aYXIAYwA7gMoAykAtZG8AdAAWYXIAAOA12AjdcgBhAHYAZQA7gMgAyEDlIm1lbnQAoAgiAAFhcNYD2QNjAHIAEmF0AHkAUwLhAwAAAADpA20lYWxsU3F1YXJlAACg+yVlJ3J5U21hbGxTcXVhcmUAAKCrJQABZ3D2A/kDbwBuABhhZgAA4DXYPN3zImlsb26VY3UAAAFhaQYEDgRsAFSgdSppImxkZQAAoEIi7CNpYnJpdW0AoMwhAAFjaRgEGwRyAACgMCFtAACgcyphAJdjbQBsADuAywDLQAABaXApBC0E8yF0cwCgAyLvJG5lbnRpYWxFAKBHIYACY2Zpb3MAPQQ/BEMEXQRyBHkAJGRyAADgNdgJ3WwibGVkAFMCTAQAAAAAVARtJWFsbFNxdWFyZQAAoPwlZSdyeVNtYWxsU3F1YXJlAACgqiVwA2UEAABpBAAAAABtBGYAAOA12D3dwSFsbACgACLyI2llcnRyZgCgMSFjAPIAcQQABkpUYWJjZGZnb3JzdIgEiwSOBJMElwSkBKcEqwStBLIE5QTqBGMAeQADZDuAPgA+QO0hbWFkoJMD3GNyImV2ZQAeYYABZWl5AJ0EoASjBOQhaWwiYXIAYwAcYRNkbwB0ACBhcgAA4DXYCt0AoNkicABmAADgNdg+3eUiYXRlcgADRUZHTFNUvwTIBM8E1QTZBOAEcSJ1YWwATKBlIuUhc3MAoNsidSRsbEVxdWFsAACgZyJyI2VhdGVyAACgoirlIXNzAKB3IuwkYW50RXF1YWwAoH4qaSJsZGUAAKBzImMAcgAA4DXYotwAoGsiAARBYWNmaW9zdfkE/QQFBQgFCwUTBSIFKwVSIkRjeQAqZAABY3QBBQQFZQBrAMdiXmDpIXJjJGFyAACgDCFsJWJlcnRTcGFjZQAAoAsh8AEYBQAAGwVmAACgDSHpJXpvbnRhbExpbmUAoAAlAAFjdCYFKAXyABIF8iFvayZhbQBwAEQBMQU5BW8AdwBuAEgAdQBtAPAAAAFxInVhbAAAoE8iAAdFSk9hY2RmZ21ub3N0dVMFVgVZBVwFYwVtBXAFcwV6BZAFtgXFBckFzQVjAHkAFWTsIWlnMmFjAHkAAWRjAHUAdABlADuAzQDNQAABaXlnBWwFcgBjADuAzgDOQBhkbwB0ADBhcgAAoBEhcgBhAHYAZQA7gMwAzEAAoREhYXB/BYsFAAFjZ4MFhQVyACphaSNuYXJ5SQAAoEghbABpAGUA8wD6AvQBlQUAAKUFZaAsIgABZ3KaBZ4F8iFhbACgKyLzI2VjdGlvbgCgwiJpI3NpYmxlAAABQ1SsBbEFbyJtbWEAAKBjIGkibWVzAACgYiCAAWdwdAC8Bb8FwwVvAG4ALmFmAADgNdhA3WEAmWNjAHIAAKAQIWkibGRlAChh6wHSBQAA1QVjAHkABmRsADuAzwDPQIACY2Zvc3UA4QXpBe0F8gX9BQABaXnlBegFcgBjADRhGWRyAADgNdgN3XAAZgAA4DXYQd3jAfcFAAD7BXIAAOA12KXc8iFjeQhk6yFjeQRkgANISmFjZm9zAAwGDwYSBhUGHQYhBiYGYwB5ACVkYwB5AAxk8CFwYZpjAAFleRkGHAbkIWlsNmEaZHIAAOA12A7dcABmAADgNdhC3WMAcgAA4DXYptyABUpUYWNlZmxtb3N0AD0GQAZDBl4GawZkB2gHcAd0B80H2gdjAHkACWQ7gDwAPECAAmNtbnByAEwGTwZSBlUGWwb1IXRlOWHiIWRhm2NnAACg6ifsI2FjZXRyZgCgEiFyAACgniGAAWFleQBkBmcGagbyIW9uPWHkIWlsO2EbZAABZnNvBjQHdAAABUFDREZSVFVWYXKABp4GpAbGBssG3AYDByEHwQIqBwABbnKEBowGZyVsZUJyYWNrZXQAAKDoJ/Ihb3cAoZAhQlKTBpcGYQByAACg5CHpJGdodEFycm93AKDGIWUjaWxpbmcAAKAII28A9QGqBgAAsgZiJWxlQnJhY2tldAAAoOYnbgDUAbcGAAC+BmUkZVZlY3RvcgAAoGEp5SJjdG9yQqDDIWEAcgAAoFkpbCJvb3IAAKAKI2kiZ2h0AAABQVbSBtcGciJyb3cAAKCUIeUiY3RvcgCgTikAAWVy4AbwBmUAAKGjIkFW5gbrBnIicm93AACgpCHlImN0b3IAoFopaSNhbmdsZQBCorIi+wYAAAAA/wZhAHIAAKDPKXEidWFsAACgtCJwAIABRFRWAAoHEQcYB+8kd25WZWN0b3IAoFEpZSRlVmVjdG9yAACgYCnlImN0b3JCoL8hYQByAACgWCnlImN0b3JCoLwhYQByAACgUilpAGcAaAB0AGEAcgByAG8A9wDMAnMAAANFRkdMU1Q/B0cHTgdUB1gHXwfxJXVhbEdyZWF0ZXIAoNoidSRsbEVxdWFsAACgZiJyI2VhdGVyAACgdiLlIXNzAKChKuwkYW50RXF1YWwAoH0qaSJsZGUAAKByInIAAOA12A/dZaDYIuYjdGFycm93AKDaIWkiZG90AD9hgAFucHcAege1B7kHZwAAAkxSbHKCB5QHmwerB+UhZnQAAUFSiAeNB3Iicm93AACg9SfpJGdodEFycm93AKD3J+kkZ2h0QXJyb3cAoPYn5SFmdAABYXLcAqEHaQBnAGgAdABhAHIAcgBvAPcA5wJpAGcAaAB0AGEAcgByAG8A9wDuAmYAAOA12EPdZQByAAABTFK/B8YHZSRmdEFycm93AACgmSHpJGdodEFycm93AKCYIYABY2h0ANMH1QfXB/IAWgYAoLAh8iFva0FhAKBqIgAEYWNlZmlvc3XpB+wH7gf/BwMICQgOCBEIcAAAoAUpeQAcZAABZGzyB/kHaSR1bVNwYWNlAACgXyBsI2ludHJmAACgMyFyAADgNdgQ3e4jdXNQbHVzAKATInAAZgAA4DXYRN1jAPIA/gecY4AESmFjZWZvc3R1ACEIJAgoCDUIgQiFCDsKQApHCmMAeQAKZGMidXRlAENhgAFhZXkALggxCDQI8iFvbkdh5CFpbEVhHWSAAWdzdwA7CGEIfQjhInRpdmWAAU1UVgBECEwIWQhlJWRpdW1TcGFjZQAAoAsgaABpAAABY25SCFMIawBTAHAAYQBjAOUASwhlAHIAeQBUAGgAaQDuAFQI9CFlZAABR0xnCHUIcgBlAGEAdABlAHIARwByAGUAYQB0AGUA8gDrBGUAcwBzAEwAZQBzAPMA2wdMImluZQAKYHIAAOA12BHdAAJCbnB0jAiRCJkInAhyImVhawAAoGAgwiZyZWFraW5nU3BhY2WgYGYAAKAVIUOq7CqzCMIIzQgAAOcIGwkAAAAAAAAtCQAAbwkAAIcJAACdCcAJGQoAADQKAAFvdbYIvAjuI2dydWVudACgYiJwIkNhcAAAoG0ibyh1YmxlVmVydGljYWxCYXIAAKAmIoABbHF4ANII1wjhCOUibWVudACgCSL1IWFsVKBgImkibGRlAADgQiI4A2kic3RzAACgBCJyI2VhdGVyAACjbyJFRkdMU1T1CPoIAgkJCQ0JFQlxInVhbAAAoHEidSRsbEVxdWFsAADgZyI4A3IjZWF0ZXIAAOBrIjgD5SFzcwCgeSLsJGFudEVxdWFsAOB+KjgDaSJsZGUAAKB1IvUhbXBEASAJJwnvI3duSHVtcADgTiI4A3EidWFsAADgTyI4A2UAAAFmczEJRgn0JFRyaWFuZ2xlQqLqIj0JAAAAAEIJYQByAADgzyk4A3EidWFsAACg7CJzAICibiJFR0xTVABRCVYJXAlhCWkJcSJ1YWwAAKBwInIjZWF0ZXIAAKB4IuUhc3MA4GoiOAPsJGFudEVxdWFsAOB9KjgDaSJsZGUAAKB0IuUic3RlZAABR0x1CX8J8iZlYXRlckdyZWF0ZXIA4KIqOAPlI3NzTGVzcwDgoSo4A/IjZWNlZGVzAKGAIkVTjwmVCXEidWFsAADgryo4A+wkYW50RXF1YWwAoOAiAAFlaaAJqQl2JmVyc2VFbGVtZW50AACgDCLnJWh0VHJpYW5nbGVCousitgkAAAAAuwlhAHIAAODQKTgDcSJ1YWwAAKDtIgABcXXDCeAJdSNhcmVTdQAAAWJwywnVCfMhZXRF4I8iOANxInVhbAAAoOIi5SJyc2V0ReCQIjgDcSJ1YWwAAKDjIoABYmNwAOYJ8AkNCvMhZXRF4IIi0iBxInVhbAAAoIgi4yJlZWRzgKGBIkVTVAD6CQAKBwpxInVhbAAA4LAqOAPsJGFudEVxdWFsAKDhImkibGRlAADgfyI4A+UicnNldEXggyLSIHEidWFsAACgiSJpImxkZQCAoUEiRUZUACIKJwouCnEidWFsAACgRCJ1JGxsRXF1YWwAAKBHImkibGRlAACgSSJlJXJ0aWNhbEJhcgAAoCQiYwByAADgNdip3GkAbABkAGUAO4DRANFAnWMAB0VhY2RmZ21vcHJzdHV2XgphCmgKcgp2CnoKgQqRCpYKqwqtCrsKyArNCuwhaWdSYWMAdQB0AGUAO4DTANNAAAFpeWwKcQpyAGMAO4DUANRAHmRiImxhYwBQYXIAAOA12BLdcgBhAHYAZQA7gNIA0kCAAWFlaQCHCooKjQpjAHIATGFnAGEAqWNjInJvbgCfY3AAZgAA4DXYRt3lI25DdXJseQABRFGeCqYKbyV1YmxlUXVvdGUAAKAcIHUib3RlAACgGCAAoFQqAAFjbLEKtQpyAADgNdiq3GEAcwBoADuA2ADYQGkAbAHACsUKZABlADuA1QDVQGUAcwAAoDcqbQBsADuA1gDWQGUAcgAAAUJQ0wrmCgABYXLXCtoKcgAAoD4gYQBjAAABZWvgCuIKAKDeI2UAdAAAoLQjYSVyZW50aGVzaXMAAKDcI4AEYWNmaGlsb3JzAP0KAwsFCwkLCwsMCxELIwtaC3IjdGlhbEQAAKACInkAH2RyAADgNdgT3WkApmOgY/Ujc01pbnVzsWAAAWlwFQsgC24AYwBhAHIAZQBwAGwAYQBuAOUACgVmAACgGSGAobsqZWlvACoLRQtJC+MiZWRlc4CheiJFU1QANAs5C0ALcSJ1YWwAAKCvKuwkYW50RXF1YWwAoHwiaSJsZGUAAKB+Im0AZQAAoDMgAAFkcE0LUQv1IWN0AKAPIm8jcnRpb24AYaA3ImwAAKAdIgABY2leC2ILcgAA4DXYq9yoYwACVWZvc2oLbwtzC3cLTwBUADuAIgAiQHIAAOA12BTdcABmAACgGiFjAHIAAOA12KzcAAZCRWFjZWZoaW9yc3WPC5MLlwupC7YL2AvbC90LhQyTDJoMowzhIXJyAKAQKUcAO4CuAK5AgAFjbnIAnQugC6ML9SF0ZVRhZwAAoOsncgB0oKAhbAAAoBYpgAFhZXkArwuyC7UL8iFvblhh5CFpbFZhIGR2oBwhZSJyc2UAAAFFVb8LzwsAAWxxwwvIC+UibWVudACgCyL1JGlsaWJyaXVtAKDLIXAmRXF1aWxpYnJpdW0AAKBvKXIAAKAcIW8AoWPnIWh0AARBQ0RGVFVWYewLCgwQDDIMNwxeDHwM9gIAAW5y8Av4C2clbGVCcmFja2V0AACg6SfyIW93AKGSIUJM/wsDDGEAcgAAoOUhZSRmdEFycm93AACgxCFlI2lsaW5nAACgCSNvAPUBFgwAAB4MYiVsZUJyYWNrZXQAAKDnJ24A1AEjDAAAKgxlJGVWZWN0b3IAAKBdKeUiY3RvckKgwiFhAHIAAKBVKWwib29yAACgCyMAAWVyOwxLDGUAAKGiIkFWQQxGDHIicm93AACgpiHlImN0b3IAoFspaSNhbmdsZQBCorMiVgwAAAAAWgxhAHIAAKDQKXEidWFsAACgtSJwAIABRFRWAGUMbAxzDO8kd25WZWN0b3IAoE8pZSRlVmVjdG9yAACgXCnlImN0b3JCoL4hYQByAACgVCnlImN0b3JCoMAhYQByAACgUykAAXB1iQyMDGYAAKAdIe4kZEltcGxpZXMAoHAp6SRnaHRhcnJvdwCg2yEAAWNongyhDHIAAKAbIQCgsSHsJGVEZWxheWVkAKD0KYAGSE9hY2ZoaW1vcXN0dQC/DMgMzAzQDOIM5gwKDQ0NFA0ZDU8NVA1YDQABQ2PDDMYMyCFjeSlkeQAoZEYiVGN5ACxkYyJ1dGUAWmEAorwqYWVpedgM2wzeDOEM8iFvbmBh5CFpbF5hcgBjAFxhIWRyAADgNdgW3e8hcnQAAkRMUlXvDPYM/QwEDW8kd25BcnJvdwAAoJMhZSRmdEFycm93AACgkCHpJGdodEFycm93AKCSIXAjQXJyb3cAAKCRIechbWGjY+EkbGxDaXJjbGUAoBgicABmAADgNdhK3XICHw0AAAAAIg10AACgGiLhIXJlgKGhJUlTVQAqDTINSg3uJXRlcnNlY3Rpb24AoJMidQAAAWJwNw1ADfMhZXRFoI8icSJ1YWwAAKCRIuUicnNldEWgkCJxInVhbAAAoJIibiJpb24AAKCUImMAcgAA4DXYrtxhAHIAAKDGIgACYmNtcF8Nag2ODZANc6DQImUAdABFoNAicSJ1YWwAAKCGIgABY2huDYkNZSJlZHMAgKF7IkVTVAB4DX0NhA1xInVhbAAAoLAq7CRhbnRFcXVhbACgfSJpImxkZQAAoH8iVABoAGEA9ADHCwCgESIAodEiZXOVDZ8NciJzZXQARaCDInEidWFsAACghyJlAHQAAKDRIoAFSFJTYWNmaGlvcnMAtQ27Db8NyA3ODdsN3w3+DRgOHQ4jDk8AUgBOADuA3gDeQMEhREUAoCIhAAFIY8MNxg1jAHkAC2R5ACZkAAFidcwNzQ0JYKRjgAFhZXkA1A3XDdoN8iFvbmRh5CFpbGJhImRyAADgNdgX3QABZWnjDe4N8gHoDQAA7Q3lImZvcmUAoDQiYQCYYwABY27yDfkNayNTcGFjZQAA4F8gCiDTInBhY2UAoAkg7CFkZYChPCJFRlQABw4MDhMOcSJ1YWwAAKBDInUkbGxFcXVhbAAAoEUiaSJsZGUAAKBIInAAZgAA4DXYS93pI3BsZURvdACg2yAAAWN0Jw4rDnIAAOA12K/c8iFva2Zh4QpFDlYOYA5qDgAAbg5yDgAAAAAAAAAAAAB5DnwOqA6zDgAADg8RDxYPGg8AAWNySA5ODnUAdABlADuA2gDaQHIAb6CfIeMhaXIAoEkpcgDjAVsOAABdDnkADmR2AGUAbGEAAWl5Yw5oDnIAYwA7gNsA20AjZGIibGFjAHBhcgAA4DXYGN1yAGEAdgBlADuA2QDZQOEhY3JqYQABZGl/Dp8OZQByAAABQlCFDpcOAAFhcokOiw5yAF9gYQBjAAABZWuRDpMOAKDfI2UAdAAAoLUjYSVyZW50aGVzaXMAAKDdI28AbgBQoMMi7CF1cwCgjiIAAWdwqw6uDm8AbgByYWYAAOA12EzdAARBREVUYWRwc78O0g7ZDuEOBQPqDvMOBw9yInJvdwDCoZEhyA4AAMwOYQByAACgEilvJHduQXJyb3cAAKDFIW8kd25BcnJvdwAAoJUhcSV1aWxpYnJpdW0AAKBuKWUAZQBBoKUiciJyb3cAAKClIW8AdwBuAGEAcgByAG8A9wAQA2UAcgAAAUxS+Q4AD2UkZnRBcnJvdwAAoJYh6SRnaHRBcnJvdwCglyFpAGyg0gNvAG4ApWPpIW5nbmFjAHIAAOA12LDcaSJsZGUAaGFtAGwAO4DcANxAgAREYmNkZWZvc3YALQ8xDzUPNw89D3IPdg97D4AP4SFzaACgqyJhAHIAAKDrKnkAEmThIXNobKCpIgCg5ioAAWVyQQ9DDwCgwSKAAWJ0eQBJD00Paw9hAHIAAKAWIGmgFiDjIWFsAAJCTFNUWA9cD18PZg9hAHIAAKAjIukhbmV8YGUkcGFyYXRvcgAAoFgnaSJsZGUAAKBAItQkaGluU3BhY2UAoAogcgAA4DXYGd1wAGYAAOA12E3dYwByAADgNdix3GQiYXNoAACgqiKAAmNlZm9zAI4PkQ+VD5kPng/pIXJjdGHkIWdlAKDAInIAAOA12BrdcABmAADgNdhO3WMAcgAA4DXYstwAAmZpb3OqD64Prw+0D3IAAOA12BvdnmNwAGYAAOA12E/dYwByAADgNdiz3IAEQUlVYWNmb3N1AMgPyw/OD9EP2A/gD+QP6Q/uD2MAeQAvZGMAeQAHZGMAeQAuZGMAdQB0AGUAO4DdAN1AAAFpedwP3w9yAGMAdmErZHIAAOA12BzdcABmAADgNdhQ3WMAcgAA4DXYtNxtAGwAeGEABEhhY2RlZm9z/g8BEAUQDRAQEB0QIBAkEGMAeQAWZGMidXRlAHlhAAFheQkQDBDyIW9ufWEXZG8AdAB7YfIBFRAAABwQbwBXAGkAZAB0AOgAVAhhAJZjcgAAoCghcABmAACgJCFjAHIAAOA12LXc4QtCEEkQTRAAAGcQbRByEAAAAAAAAAAAeRCKEJcQ8hD9EAAAGxEhETIROREAAD4RYwB1AHQAZQA7gOEA4UByImV2ZQADYYCiPiJFZGl1eQBWEFkQWxBgEGUQAOA+IjMDAKA/InIAYwA7gOIA4kB0AGUAO4C0ALRAMGRsAGkAZwA7gOYA5kByoGEgAOA12B7dcgBhAHYAZQA7gOAA4EAAAWVwfBCGEAABZnCAEIQQ8yF5bQCgNSHoAIMQaABhALFjAAFhcI0QWwAAAWNskRCTEHIAAWFnAACgPypkApwQAAAAALEQAKInImFkc3ajEKcQqRCuEG4AZAAAoFUqAKBcKmwib3BlAACgWCoAoFoqAKMgImVsbXJzersQvRDAEN0Q5RDtEACgpCllAACgICJzAGQAYaAhImEEzhDQENIQ1BDWENgQ2hDcEACgqCkAoKkpAKCqKQCgqykAoKwpAKCtKQCgrikAoK8pdAB2oB8iYgBkoL4iAKCdKQABcHTpEOwQaAAAoCIixWDhIXJyAKB8IwABZ3D1EPgQbwBuAAVhZgAA4DXYUt0Ao0giRWFlaW9wBxEJEQ0RDxESERQRAKBwKuMhaXIAoG8qAKBKImQAAKBLInMAJ2DyIW94ZaBIIvEADhFpAG4AZwA7gOUA5UCAAWN0eQAmESoRKxFyAADgNdi23CpgbQBwAGWgSCLxAPgBaQBsAGQAZQA7gOMA40BtAGwAO4DkAORAAAFjaUERRxFvAG4AaQBuAPQA6AFuAHQAAKARKgAITmFiY2RlZmlrbG5vcHJzdWQRaBGXEZ8RpxGrEdIR1hErEjASexKKEn0RThNbE3oTbwB0AACg7SoAAWNybBGJEWsAAAJjZXBzdBF4EX0RghHvIW5nAKBMInAjc2lsb24A9mNyImltZQAAoDUgaQBtAGWgPSJxAACgzSJ2AY0RkRFlAGUAAKC9ImUAZABnoAUjZQAAoAUjcgBrAHSgtSPiIXJrAKC2IwABb3mjEaYRbgDnAHcRMWTxIXVvAKAeIIACY21wcnQAtBG5Eb4RwRHFEeEhdXPloDUi5ABwInR5dgAAoLApcwDpAH0RbgBvAPUA6gCAAWFodwDLEcwRzhGyYwCgNiHlIWVuAKBsInIAAOA12B/dZwCAA2Nvc3R1dncA4xHyEQUSEhIhEiYSKRKAAWFpdQDpEesR7xHwAKMFcgBjAACg7yVwAACgwyKAAWRwdAD4EfwRABJvAHQAAKAAKuwhdXMAoAEqaSJtZXMAAKACKnECCxIAAAAADxLjIXVwAKAGKmEAcgAAoAUm8iNpYW5nbGUAAWR1GhIeEu8hd24AoL0lcAAAoLMlcCJsdXMAAKAEKmUA5QBCD+UAkg9hInJvdwAAoA0pgAFha28ANhJoEncSAAFjbjoSZRJrAIABbHN0AEESRxJNEm8jemVuZ2UAAKDrKXEAdQBhAHIA5QBcBPIjaWFuZ2xlgKG0JWRscgBYElwSYBLvIXduAKC+JeUhZnQAoMIlaSJnaHQAAKC4JWsAAKAjJLEBbRIAAHUSsgFxEgAAcxIAoJIlAKCRJTQAAKCTJWMAawAAoIglAAFlb38ShxJx4D0A5SD1IWl2AOBhIuUgdAAAoBAjAAJwdHd4kRKVEpsSnxJmAADgNdhT3XSgpSJvAG0AAKClIvQhaWUAoMgiAAZESFVWYmRobXB0dXayEsES0RLgEvcS+xIKExoTHxMjEygTNxMAAkxSbHK5ErsSvRK/EgCgVyUAoFQlAKBWJQCgUyUAolAlRFVkdckSyxLNEs8SAKBmJQCgaSUAoGQlAKBnJQACTFJsctgS2hLcEt4SAKBdJQCgWiUAoFwlAKBZJQCjUSVITFJobHLrEu0S7xLxEvMS9RIAoGwlAKBjJQCgYCUAoGslAKBiJQCgXyVvAHgAAKDJKQACTFJscgITBBMGEwgTAKBVJQCgUiUAoBAlAKAMJQCiACVEVWR1EhMUExYTGBMAoGUlAKBoJQCgLCUAoDQlaSJudXMAAKCfIuwhdXMAoJ4iaSJtZXMAAKCgIgACTFJsci8TMRMzEzUTAKBbJQCgWCUAoBglAKAUJQCjAiVITFJobHJCE0QTRhNIE0oTTBMAoGolAKBhJQCgXiUAoDwlAKAkJQCgHCUAAWV2UhNVE3YA5QD5AGIAYQByADuApgCmQAACY2Vpb2ITZhNqE24TcgAA4DXYt9xtAGkAAKBPIG0A5aA9IogRbAAAoVwAYmh0E3YTAKDFKfMhdWIAoMgnbAF+E4QTbABloCIgdAAAoCIgcAAAoU4iRWWJE4sTAKCuKvGgTyI8BeEMqRMAAN8TABQDFB8UAAAjFDQUAAAAAIUUAAAAAI0UAAAAANcU4xT3FPsUAACIFQAAlhWAAWNwcgCuE7ET1RP1IXRlB2GAoikiYWJjZHMAuxO/E8QTzhPSE24AZAAAoEQqciJjdXAAAKBJKgABYXXIE8sTcAAAoEsqcAAAoEcqbwB0AACgQCoA4CkiAP4AAWVv2RPcE3QAAKBBIO4ABAUAAmFlaXXlE+8T9RP4E/AB6hMAAO0TcwAAoE0qbwBuAA1hZABpAGwAO4DnAOdAcgBjAAlhcABzAHOgTCptAACgUCpvAHQAC2GAAWRtbgAIFA0UEhRpAGwAO4C4ALhAcCJ0eXYAAKCyKXQAAIGiADtlGBQZFKJAcgBkAG8A9ABiAXIAAOA12CDdgAFjZWkAKBQqFDIUeQBHZGMAawBtoBMn4SFyawCgEyfHY3IAAKPLJUVjZWZtcz8UQRRHFHcUfBSAFACgwykAocYCZWxGFEkUcQAAoFciZQBhAlAUAAAAAGAUciJyb3cAAAFsclYUWhTlIWZ0AKC6IWkiZ2h0AACguyGAAlJTYWNkAGgUaRRrFG8UcxSuYACgyCRzAHQAAKCbIukhcmMAoJoi4SFzaACgnSJuImludAAAoBAqaQBkAACg7yrjIWlyAKDCKfUhYnN1oGMmaQB0AACgYybsApMUmhS2FAAAwxRvAG4AZaA6APGgVCKrAG0CnxQAAAAAoxRhAHSgLABAYAChASJmbKcUqRTuABMNZQAAAW14rhSyFOUhbnQAoAEiZQDzANIB5wG6FAAAwBRkoEUibwB0AACgbSpuAPQAzAGAAWZyeQDIFMsUzhQA4DXYVN1vAOQA1wEAgakAO3MeAdMUcgAAoBchAAFhb9oU3hRyAHIAAKC1IXMAcwAAoBcnAAFjdeYU6hRyAADgNdi43AABYnDuFPIUZaDPKgCg0SploNAqAKDSKuQhb3QAoO8igANkZWxwcnZ3AAYVEBUbFSEVRBVlFYQV4SFycgABbHIMFQ4VAKA4KQCgNSlwAhYVAAAAABkVcgAAoN4iYwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");var Jo;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Jo||(Jo={}));var rs;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(rs||(rs={}));const v_=32;function Yb(e){return e>=rs.ZERO&&e<=rs.NINE}function $be(e){return e>=rs.UPPER_A&&e<=rs.UPPER_F||e>=rs.LOWER_A&&e<=rs.LOWER_F}function Bbe(e){return e>=rs.UPPER_A&&e<=rs.UPPER_Z||e>=rs.LOWER_A&&e<=rs.LOWER_Z||Yb(e)}function zbe(e){return e===rs.EQUALS||Bbe(e)}var so;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(so||(so={}));var Pu;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Pu||(Pu={}));var Rbe=class{decodeTree;emitCodePoint;errors;constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n}state=so.EntityStart;consumed=1;result=0;treeIndex=0;excess=1;decodeMode=Pu.Strict;runConsumed=0;startEntity(e){this.decodeMode=e,this.state=so.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(e,t){switch(this.state){case so.EntityStart:return e.charCodeAt(t)===rs.NUM?(this.state=so.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=so.NamedEntity,this.stateNamedEntity(e,t));case so.NumericStart:return this.stateNumericStart(e,t);case so.NumericDecimal:return this.stateNumericDecimal(e,t);case so.NumericHex:return this.stateNumericHex(e,t);case so.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|v_)===rs.LOWER_X?(this.state=so.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=so.NumericDecimal,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){for(;t<e.length;){const n=e.charCodeAt(t);if(Yb(n)||$be(n)){const i=n<=rs.NINE?n-rs.ZERO:(n|v_)-rs.LOWER_A+10;this.result=this.result*16+i,this.consumed++,t++}else return this.emitNumericEntity(n,3)}return-1}stateNumericDecimal(e,t){for(;t<e.length;){const n=e.charCodeAt(t);if(Yb(n))this.result=this.result*10+(n-rs.ZERO),this.consumed++,t++;else return this.emitNumericEntity(n,2)}return-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===rs.SEMI)this.consumed+=1;else if(this.decodeMode===Pu.Strict)return 0;return this.emitCodePoint(Nbe(this.result),this.consumed),this.errors&&(e!==rs.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let i=n[this.treeIndex],s=(i&Jo.VALUE_LENGTH)>>14;for(;t<e.length;){if(s===0&&(i&Jo.FLAG13)!==0){const r=(i&Jo.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const l=i&Jo.JUMP_TABLE;if(e.charCodeAt(t)!==l)return this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}for(;this.runConsumed<r;){if(t>=e.length)return-1;const l=this.runConsumed-1,a=n[this.treeIndex+1+(l>>1)],u=l%2===0?a&255:a>>8&255;if(e.charCodeAt(t)!==u)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();t++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(r>>1),i=n[this.treeIndex],s=(i&Jo.VALUE_LENGTH)>>14}if(t>=e.length)break;const o=e.charCodeAt(t);if(o===rs.SEMI&&s!==0&&(i&Jo.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);if(this.treeIndex=Pbe(n,i,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===Pu.Attribute&&(s===0||zbe(o))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],s=(i&Jo.VALUE_LENGTH)>>14,s!==0){if(o===rs.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Pu.Strict&&(i&Jo.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}t++,this.excess++}return-1}emitNotTerminatedNamedEntity(){const{result:e,decodeTree:t}=this,n=(t[e]&Jo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(e,n,this.consumed),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:i}=this;return this.emitCodePoint(t===1?i[e]&~(Jo.VALUE_LENGTH|Jo.FLAG13):i[e+1],n),t===3&&this.emitCodePoint(i[e+2],n),n}end(){switch(this.state){case so.NamedEntity:return this.result!==0&&(this.decodeMode!==Pu.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case so.NumericDecimal:return this.emitNumericEntity(0,2);case so.NumericHex:return this.emitNumericEntity(0,3);case so.NumericStart:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case so.EntityStart:return 0}}};function Obe(e){let t="";const n=new Rbe(e,i=>t+=String.fromCodePoint(i));return function(s,o){let r=0,l=0;for(;(l=s.indexOf("&",l))>=0;){t+=s.slice(r,l),n.startEntity(o);const u=n.write(s,l+1);if(u<0){r=l+n.end();break}r=l+u,l=u===0?r+1:r}const a=t+s.slice(r);return t="",a}}function Pbe(e,t,n,i){const s=(t&Jo.BRANCH_LENGTH)>>7,o=t&Jo.JUMP_TABLE;if(s===0)return o!==0&&i===o?n:-1;if(o){const u=i-o;return u<0||u>=s?-1:e[n+u]-1}const r=s+1>>1;let l=0,a=s-1;for(;l<=a;){const u=l+a>>>1,c=e[n+(u>>1)]>>(u&1)*8&255;if(c<i)l=u+1;else if(c>i)a=u-1;else return e[n+r+u]}return-1}const jbe=Obe(Dbe);function F6(e,t=Pu.Legacy){return jbe(e,t)}var Hbe=LB(Tbe());const y_={};function Wbe(e){let t=y_[e];if(t)return t;t=y_[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);t.push(i)}for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return t}function Jy(e,t){typeof t!="string"&&(t=Jy.defaultChars);const n=Wbe(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let s="";for(let o=0,r=i.length;o<r;o+=3){const l=parseInt(i.slice(o+1,o+3),16);if(l<128){s+=n[l];continue}if((l&224)===192&&o+3<r){const a=parseInt(i.slice(o+4,o+6),16);if((a&192)===128){const u=l<<6&1984|a&63;u<128?s+="��":s+=String.fromCharCode(u),o+=3;continue}}if((l&240)===224&&o+6<r){const a=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16);if((a&192)===128&&(u&192)===128){const c=l<<12&61440|a<<6&4032|u&63;c<2048||c>=55296&&c<=57343?s+="���":s+=String.fromCharCode(c),o+=6;continue}}if((l&248)===240&&o+9<r){const a=parseInt(i.slice(o+4,o+6),16),u=parseInt(i.slice(o+7,o+9),16),c=parseInt(i.slice(o+10,o+12),16);if((a&192)===128&&(u&192)===128&&(c&192)===128){let d=l<<18&1835008|a<<12&258048|u<<6&4032|c&63;d<65536||d>1114111?s+="����":(d-=65536,s+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),o+=9;continue}}s+="�"}return s})}Jy.defaultChars=";/?:@&=+$,#";Jy.componentChars="";var Jb=Jy;const k_={};function qbe(e){let t=k_[e];if(t)return t;t=k_[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Xy(e,t,n){typeof t!="string"&&(n=t,t=Xy.defaultChars),typeof n>"u"&&(n=!0);const i=qbe(t);let s="";for(let o=0,r=e.length;o<r;o++){const l=e.charCodeAt(o);if(n&&l===37&&o+2<r&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){s+=e.slice(o,o+3),o+=2;continue}if(l<128){s+=i[l];continue}if(l>=55296&&l<=57343){if(l>=55296&&l<=56319&&o+1<r){const a=e.charCodeAt(o+1);if(a>=56320&&a<=57343){s+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[o])}return s}Xy.defaultChars=";/?:@&=+$,-_.!~*'()#";Xy.componentChars="-_.!~*'()";var NB=Xy;function D6(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function xv(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Ube=/^([a-z0-9.+-]+:)/i,Kbe=/:[0-9]*$/,Vbe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Zbe=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",` +`," "]),Gbe=["'"].concat(Zbe),b_=["%","/","?",";","#"].concat(Gbe),A_=["/","?","#"],Qbe=255,C_=/^[+a-z0-9A-Z_-]{0,63}$/,Ybe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w_={javascript:!0,"javascript:":!0},x_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Jbe(e,t){if(e&&e instanceof xv)return e;const n=new xv;return n.parse(e,t),n}xv.prototype.parse=function(e,t){let n,i,s,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const u=Vbe.exec(o);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let r=Ube.exec(o);if(r&&(r=r[0],n=r.toLowerCase(),this.protocol=r,o=o.substr(r.length)),(t||r||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=o.substr(0,2)==="//",s&&!(r&&w_[r])&&(o=o.substr(2),this.slashes=!0)),!w_[r]&&(s||r&&!x_[r])){let u=-1;for(let g=0;g<A_.length;g++)i=o.indexOf(A_[g]),i!==-1&&(u===-1||i<u)&&(u=i);let c,d;u===-1?d=o.lastIndexOf("@"):d=o.lastIndexOf("@",u),d!==-1&&(c=o.slice(0,d),o=o.slice(d+1),this.auth=c),u=-1;for(let g=0;g<b_.length;g++)i=o.indexOf(b_[g]),i!==-1&&(u===-1||i<u)&&(u=i);u===-1&&(u=o.length),o[u-1]===":"&&u--;const f=o.slice(0,u);o=o.slice(u),this.parseHost(f),this.hostname=this.hostname||"";const h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h){const g=this.hostname.split(/\./);for(let m=0,y=g.length;m<y;m++){const A=g[m];if(A&&!A.match(C_)){let b="";for(let C=0,v=A.length;C<v;C++)A.charCodeAt(C)>127?b+="x":b+=A[C];if(!b.match(C_)){const C=g.slice(0,m),v=g.slice(m+1),x=A.match(Ybe);x&&(C.push(x[1]),v.unshift(x[2])),v.length&&(o=v.join(".")+o),this.hostname=C.join(".");break}}}}this.hostname.length>Qbe&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=o.indexOf("#");l!==-1&&(this.hash=o.substr(l),o=o.slice(0,l));const a=o.indexOf("?");return a!==-1&&(this.search=o.substr(a),o=o.slice(0,a)),o&&(this.pathname=o),x_[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};xv.prototype.parseHost=function(e){let t=Kbe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var $6=Jbe,FB=pbe({decode:()=>Jb,encode:()=>NB,format:()=>D6,parse:()=>$6}),Xbe=Object.defineProperty,DB=e=>{let t={};for(var n in e)Xbe(t,n,{get:e[n],enumerable:!0});return t},Qs=class{type;tag;attrs;map;nesting;level;children;content;markup;info;meta;block;hidden;constructor(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,i=t.length;n<i;n++)if(t[n][0]===e)return n;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){const n=this.attrIndex(e),i=[e,t];n<0?this.attrPush(i):this.attrs[n]=i}attrGet(e){const t=this.attrIndex(e);let n=null;return t>=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},e8e=DB({arrayReplaceAt:()=>l8e,assign:()=>o8e,countLines:()=>ps,escapeHtml:()=>m8e,escapeRE:()=>y8e,fromCodePoint:()=>u0,has:()=>s8e,isMdAsciiPunct:()=>Iv,isPunctChar:()=>_v,isPunctCode:()=>Xb,isSpace:()=>r8e,isString:()=>n8e,isValidEntityCode:()=>t9,isWhiteSpace:()=>a0,lib:()=>k8e,mdurl:()=>FB,normalizeReference:()=>e9,ucmicro:()=>Sv,unescapeAll:()=>c0,unescapeMd:()=>d8e});const Sv={Any:/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cc:/[\0-\x1F\x7F-\x9F]/,Cf:/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,P:/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,S:/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Z:/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/};function t8e(e){return Object.prototype.toString.call(e)}function n8e(e){return t8e(e)==="[object String]"}const i8e=Object.prototype.hasOwnProperty;function s8e(e,t){return i8e.call(e,t)}function o8e(e,...t){return t.forEach(n=>{if(n){if(typeof n!="object")throw new TypeError(`${String(n)}must be object`);Object.keys(n).forEach(i=>{e[i]=n[i]})}}),e}function r8e(e){return e===9||e===32}function a0(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function _v(e){return Sv.P.test(e)||Sv.S.test(e)}const S_=new Map;function Xb(e){if(Iv(e))return!0;if(e>=0&&e<128)return!1;const t=S_.get(e);if(t!==void 0)return t;const n=_v(String.fromCharCode(e));return S_.set(e,n),n}function Iv(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function e9(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function l8e(e,t,n){return[...e.slice(0,t),...n,...e.slice(t+1)]}function t9(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function u0(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const $B=/\\([!"#$%&'()*+,\-\./:;<=>?@[\\\]^_`{|}~])/g,a8e=new RegExp(`${$B.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),u8e=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function c8e(e,t){if(t.charCodeAt(0)===35&&u8e.test(t)){const i=t[1].toLowerCase()==="x"?Number.parseInt(t.slice(2),16):Number.parseInt(t.slice(1),10);return t9(i)?u0(i):e}const n=F6(e);return n!==e?n:e}function d8e(e){return e.includes("\\")?e.replace($B,"$1"):e}function c0(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(a8e,(t,n,i)=>n||c8e(t,i))}const f8e=/[&<>"]/,h8e=/[&<>"]/g,p8e={"&":"&","<":"<",">":">",'"':"""};function g8e(e){return p8e[e]}function m8e(e){return f8e.test(e)?e.replace(h8e,g8e):e}const v8e=/[.?*+^$[\]\\(){}|-]/g;function y8e(e){return e.replace(v8e,"\\$&")}const k8e={mdurl:FB,ucmicro:Sv};function ps(e){if(e.length===0)return 0;let t=0,n=-1;for(;(n=e.indexOf(` +`,n+1))!==-1;)t++;return t}const b8e=/(?:^|\n)[ \t]{0,3}\[\^[^\]\n]+\]:/m,A8e=/(?:^|\n)[ \t]{0,3}\*\[[^\]\n]+\]:/m,C8e=/(?:^|\n)[ \t]{0,3}\[(?!\^)(?:\\[\s\S]|[^\]\\[])+\][ \t]*:/m,B6=["references","footnotes","abbreviations","abbr","abbrs"],z6=Symbol.for("markdown-it-ts.global-state"),R6=Object.prototype.hasOwnProperty;function __(e){return e==="reference-definition"||e==="footnote-definition"||e==="abbreviation-definition"}function Bl(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Yu(e){if(Array.isArray(e))return e.map(t=>Yu(t));if(Bl(e)){const t={};for(const n of Object.keys(e))t[n]=Yu(e[n]);return t}return e}function Mv(e){return Array.isArray(e)?e.map((t,n)=>String(n)):Bl(e)?Object.keys(e):[]}function e8(e,t){if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!e8(e[n],t[n]))return!1;return!0}if(Bl(e)||Bl(t)){if(!Bl(e)||!Bl(t))return!1;const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(const s of n)if(!R6.call(t,s)||!e8(e[s],t[s]))return!1;return!0}return Object.is(e,t)}function BB(e,t){if(Array.isArray(e))return e[Number(t)];if(Bl(e))return e[t]}function w8e(e,t){if(Array.isArray(e)&&Array.isArray(t)){e.length=t.length;for(let n=0;n<t.length;n++)e[n]=Yu(t[n]);return e}if(Bl(e)&&Bl(t)){for(const n of Object.keys(e))R6.call(t,n)||delete e[n];for(const n of Object.keys(t))e[n]=Yu(t[n]);return e}return Yu(t)}function x8e(e,t,n){const i=n.ownedKeys??[],s=e[t];if(Bl(s)||Array.isArray(s)){const o=new Set(Mv(n.value));for(const r of i)n.existed&&o.has(r)?s[r]=Yu(BB(n.value,r)):delete s[r];!n.existed&&Mv(s).length===0&&delete e[t];return}n.existed?e[t]=Yu(n.value):delete e[t]}function O6(e){const t=e[z6];return __(t)?{reason:t,snapshot:{}}:t&&typeof t=="object"&&__(t.reason)&&t.snapshot&&typeof t.snapshot=="object"?t:null}function S8e(e,t){Object.defineProperty(e,z6,{value:t,enumerable:!1,configurable:!0,writable:!0})}function yr(e){return!e||!e.includes("]:")&&!e.includes("*[")?null:b8e.test(e)?"footnote-definition":A8e.test(e)?"abbreviation-definition":C8e.test(e)?"reference-definition":null}function U0(e){return O6(e)?.reason??null}function mh(e,t,n){if(U0(e)&&ru(e),!t)return n();P6(e,t);try{const i=n();return j6(e),i}catch(i){throw ru(e),i}}function P6(e,t){try{ru(e);const n={};for(const i of B6)n[i]=R6.call(e,i)?{existed:!0,value:Yu(e[i])}:{existed:!1};S8e(e,{reason:t,snapshot:n})}catch{}}function j6(e){const t=O6(e);if(t)for(const n of B6){const i=t.snapshot[n];if(!i)continue;i.ownedKeys=[];const s=e[n];if(!Bl(s)&&!Array.isArray(s))continue;const o=new Set(Mv(i.existed?i.value:void 0));i.ownedKeys=Mv(s).filter(r=>o.has(r)?!e8(s[r],BB(i.value,r)):!0)}}function ru(e){const t=O6(e);if(t){for(const n of B6){const i=t.snapshot[n];if(!i){delete e[n];continue}if(i.ownedKeys){x8e(e,n,i);continue}i.existed?e[n]=w8e(e[n],i.value):delete e[n]}delete e[z6]}}function h3(e){return{area:e,attempted:!0,matched:!1,attemptMs:0,blocks:0,headings:0,paragraphs:0,lists:0,fences:0,paragraphCacheHits:0,paragraphCacheMisses:0,paragraphCacheBypasses:0,listCacheHits:0,listCacheMisses:0,fenceCacheHits:0,fenceCacheMisses:0}}const t8=Symbol.for("markdown-it-ts.diagnostics");function K0(e,t){if(e)try{const n=e[t8];if(n&&typeof n=="object")return n;if(!t)return;const i={};return e[t8]=i,i}catch{return}}function Pa(e){return K0(e,!1)}function _8e(e){if(e)try{const t=e[t8];t&&typeof t=="object"&&(delete t.strategy,delete t.chunk,delete t.unbounded,delete t.editable,delete t.stockFast)}catch{}}function er(e){_8e(e)}function _1(e,t){const n=K0(e,!0);n&&(n.stockFast=t)}function $s(e,t){const n=K0(e,!0);n&&(n.strategy=t)}function p3(e,t){const n=K0(e,!0);n&&(n.chunk=t)}function zB(e,t){const n=K0(e,!0);n&&(n.unbounded=t)}const I8e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,M8e=/[\0-\x1F\x7F-\x9F]/,E8e=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,T8e=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var L8e=class{src_Any=I8e.source;src_Cc=M8e.source;src_Z=T8e.source;src_P=E8e.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){const i=this.escapeRE(e),s=this.escapeRE(t),o=`(?:(?!${this.src_ZCc}|${i}|${s}).)`;let r=`${i}${o}{0,1000}${s}`;for(let l=2;l<=n;l++)r=`${i}(?:${o}|${r}){0,1000}${s}`;return r}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},g3={validate:(e,t,n)=>{const i=n.re.get_http_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)},N8e={"http:":g3,"https:":g3,"ftp:":g3,"//":{validate:function(e,t,n){const i=n.re.get_relative_proto_validator();i.lastIndex=t;const s=i.exec(e);return s?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:s[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){const i=n.re.get_mailto_validator();i.lastIndex=t;const s=i.exec(e);return s?s[0].length:0},normalize:(e,t)=>t.normalize(e)}},F8e="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",D8e="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function $8e(){const e=D8e.split("|");return F8e.split("|").forEach(t=>{const n=t.indexOf(":"),i=t.slice(0,n);for(const s of t.slice(n+1))e.push(i+s)}),e}var B8e={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:$8e(),urlAuth:!1,maxLength:1e4},I_=class{schema;index;lastIndex;raw;text;url;constructor(e,t,n,i){const s=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=s,this.text=s,this.url=s}},RB=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:t,...n}=e;this.__opts__={...B8e,...n},this.__schemas__={...N8e},this.re=t||new L8e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{const n={normalize:(i,s)=>s.normalize(i),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const i=this.re.get_fuzzy_mail_host_search(),s=this.re.get_mail_name_validator();for(i.lastIndex=0;(t=i.exec(e))!==null;){const o=e.slice(Math.max(0,t.index-65),t.index);if(s.test(o))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){const t=[],n=this.re.get_schema_search();let i,s,o,r,l,a,u=!1,c=!1,d=!1,f=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(s=this.re.get_fuzzy_mail_host_search(),s.lastIndex=0,o=this.re.get_mail_name_validator());;){const h=Math.max(f-1,0);if(s&&o&&!d&&(!l||l.index<f))for(s.lastIndex<h&&(s.lastIndex=h);;){const b=s.exec(e);if(!b){d=!0,l=void 0;break}const C=o.exec(e.slice(Math.max(0,b.index-65),b.index));if(C){if(l={schema:"mailto:",index:b.index-C[1].length,lastIndex:b.index+b[0].length},l.index>=f)break;s.lastIndex<h&&(s.lastIndex=h)}}if(i&&!c&&(!r||r.index<f))for(i.lastIndex<h&&(i.lastIndex=h);;){const b=i.exec(e);if(!b){c=!0,r=void 0;break}if(r={schema:"",index:b.index+b[1].length,lastIndex:b.index+b[0].length},r.index>=f)break;i.lastIndex<h&&(i.lastIndex=h)}let g=l;(!g||r&&(r.index<g.index||r.index===g.index&&r.lastIndex>g.lastIndex))&&(g=r);let m;if(!u)for(;;){if(!a){n.lastIndex<h&&(n.lastIndex=h);const v=n.exec(e);if(!v){u=!0;break}a={schema:v[2],index:v.index+v[1].length,lastIndex:v.index+v[0].length}}if(a.index<f){a=void 0;continue}if(g&&a.index>g.index)break;const b=a;a=void 0;const C=this.testSchemaAt(e,b.schema,b.lastIndex);if(C){m={schema:b.schema,index:b.index,lastIndex:b.lastIndex+C};break}}let y=m;if((!y||l&&(l.index<y.index||l.index===y.index&&l.lastIndex>y.lastIndex))&&(y=l),(!y||r&&(r.index<y.index||r.index===y.index&&r.lastIndex>y.lastIndex))&&(y=r),!y)break;y===l?l=void 0:y===r&&(r=void 0);const A=new I_(e,y.schema,y.index,y.lastIndex);A.schema?this.__schemas__[A.schema].normalize(A,this):this.normalize(A),t.push(A),f=y.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;const i=new I_(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[i.schema].normalize(i,this),i}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}},z8e=TB({"../../node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.js":((e,t)=>{const d=/^xn--/,f=/[^\0-\x7F]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=35,y=Math.floor,A=String.fromCharCode;function b(P){throw new RangeError(g[P])}function C(P,R){const q=[];let j=P.length;for(;j--;)q[j]=R(P[j]);return q}function v(P,R){const q=P.split("@");let j="";q.length>1&&(j=q[0]+"@",P=q[1]),P=P.replace(h,".");const W=C(P.split("."),R).join(".");return j+W}function x(P){const R=[];let q=0;const j=P.length;for(;q<j;){const W=P.charCodeAt(q++);if(W>=55296&&W<=56319&&q<j){const z=P.charCodeAt(q++);(z&64512)==56320?R.push(((W&1023)<<10)+(z&1023)+65536):(R.push(W),q--)}else R.push(W)}return R}const S=P=>String.fromCodePoint(...P),_=function(P){return P>=48&&P<58?26+(P-48):P>=65&&P<91?P-65:P>=97&&P<123?P-97:36},I=function(P,R){return P+22+75*(P<26)-((R!=0)<<5)},M=function(P,R,q){let j=0;for(P=q?y(P/700):P>>1,P+=y(P/R);P>m*26>>1;j+=36)P=y(P/m);return y(j+(m+1)*P/(P+38))},$=function(P){const R=[],q=P.length;let j=0,W=128,z=72,H=P.lastIndexOf("-");H<0&&(H=0);for(let ee=0;ee<H;++ee)P.charCodeAt(ee)>=128&&b("not-basic"),R.push(P.charCodeAt(ee));for(let ee=H>0?H+1:0;ee<q;){const V=j;for(let se=1,Z=36;;Z+=36){ee>=q&&b("invalid-input");const pe=_(P.charCodeAt(ee++));pe>=36&&b("invalid-input"),pe>y((2147483647-j)/se)&&b("overflow"),j+=pe*se;const re=Z<=z?1:Z>=z+26?26:Z-z;if(pe<re)break;const fe=36-re;se>y(2147483647/fe)&&b("overflow"),se*=fe}const ie=R.length+1;z=M(j-V,ie,V==0),y(j/ie)>2147483647-W&&b("overflow"),W+=y(j/ie),j%=ie,R.splice(j++,0,W)}return String.fromCodePoint(...R)},D=function(P){const R=[];P=x(P);const q=P.length;let j=128,W=0,z=72;for(const V of P)V<128&&R.push(A(V));const H=R.length;let ee=H;for(H&&R.push("-");ee<q;){let V=2147483647;for(const se of P)se>=j&&se<V&&(V=se);const ie=ee+1;V-j>y((2147483647-W)/ie)&&b("overflow"),W+=(V-j)*ie,j=V;for(const se of P)if(se<j&&++W>2147483647&&b("overflow"),se===j){let Z=W;for(let pe=36;;pe+=36){const re=pe<=z?1:pe>=z+26?26:pe-z;if(Z<re)break;const fe=Z-re,Ee=36-re;R.push(A(I(re+fe%Ee,0))),Z=y(fe/Ee)}R.push(A(I(Z,0))),z=M(W,ie,ee===H),W=0,++ee}++W,++j}return R.join("")},O={version:"2.3.1",ucs2:{decode:x,encode:S},decode:$,encode:D,toASCII:function(P){return v(P,function(R){return f.test(R)?"xn--"+D(R):R})},toUnicode:function(P){return v(P,function(R){return d.test(R)?$(R.slice(4).toLowerCase()):R})}};t.exports=O})}),OB=LB(z8e());function H6(e,t,n){let i,s=t;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(s)===60){for(s++;s<n;){if(i=e.charCodeAt(s),i===10||i===60)return o;if(i===62)return o.pos=s+1,o.str=c0(e.slice(t+1,s)),o.ok=!0,o;if(i===92&&s+1<n){s+=2;continue}s++}return o}let r=0;for(;s<n&&(i=e.charCodeAt(s),!(i===32||i<32||i===127));){if(i===92&&s+1<n){if(e.charCodeAt(s+1)===32)break;s+=2;continue}if(i===40&&(r++,r>32))return o;if(i===41){if(r===0)break;r--}s++}return t===s||r!==0||(o.str=c0(e.slice(t,s)),o.pos=s,o.ok=!0),o}var PB=H6;const i2=-2;function R8e(e,t,n,i){let s=1,o=t+1;for(;o<n;){const r=e.charCodeAt(o);if(r===93){if(s--,s===0)return o;if(i){const l=o+1<n?e.charCodeAt(o+1):0;if(l===40||l===91)return i2}o++;continue}if(r===92){o+=2;continue}if(r===96||r===60||r===33&&o+1<n&&e.charCodeAt(o+1)===91)return i2;if(r===91){s++,o++;continue}o++}return-1}function W6(e,t,n){let i=1,s=!1,o,r;const l=e.src,a=e.posMax,u=e.pos,c=e.linkLabelNoCloseFrom;if(c>=0&&t+1>=c)return-1;const d=l.indexOf("]",t+1);if(d<0||d>=a)return e.linkLabelNoCloseFrom=t+1,-1;const f=R8e(l,t,a,n);if(f!==i2)return f;for(e.pos=t+1;e.pos<a;){if(o=l.charCodeAt(e.pos),o===93&&(i--,i===0)){s=!0;break}if(r=e.pos,e.md.inline.skipToken(e),o===91){if(r===e.pos-1)i++;else if(n)return e.pos=u,-1}}let h=-1;return s&&(h=e.pos),e.pos=u,h}var Ev=W6;function q6(e,t,n,i){let s,o=t;const r={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)r.str=i.str,r.marker=i.marker;else{if(o>=n)return r;let l=e.charCodeAt(o);if(l!==34&&l!==39&&l!==40)return r;t++,o++,l===40&&(l=41),r.marker=l}for(;o<n;){if(s=e.charCodeAt(o),s===r.marker)return r.pos=o+1,r.str+=c0(e.slice(t,o)),r.ok=!0,r;if(s===40&&r.marker===41)return r;s===92&&o+1<n&&o++,o++}return r.can_continue=!0,r.str+=c0(e.slice(t,o)),r}var jB=q6;function n9(e,t){if(!e.attrs)return-1;for(let n=0;n<e.attrs.length;n++)if(e.attrs[n][0]===t)return n;return-1}function U6(e,t){e.attrs||(e.attrs=[]),e.attrs.push(t)}function O8e(e,t,n){const i=n9(e,t),s=[t,n];i<0?U6(e,s):e.attrs[i]=s}function P8e(e,t){const n=n9(e,t);return n>=0?e.attrs[n][1]:null}function j8e(e,t,n){const i=n9(e,t);i<0?U6(e,[t,n]):e.attrs[i][1]=`${e.attrs[i][1]} ${n}`}var H8e=DB({attrGet:()=>P8e,attrIndex:()=>n9,attrJoin:()=>j8e,attrPush:()=>U6,attrSet:()=>O8e,parseLinkDestination:()=>H6,parseLinkLabel:()=>W6,parseLinkTitle:()=>q6});function W8e(e){return e.includes("\r")||e.includes("\0")}function HB(e){return typeof e=="string"?e:e.toString()}function q8e(e){if(e.inlineMode){const t=new Qs("inline","",0);t.content=HB(e.src),t.map=[0,1],t.children=[],t.level=0,e.tokens.push(t)}else e.md&&e.md.block&&e.md.block.parse(e.src,e.md,e.env,e.tokens)}const U8e=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,K8e=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function V8e(e,t){let n=e.pos;const i=e.src;if(i.charCodeAt(n)!==60)return!1;const s=n,o=e.posMax;for(;;){if(++n>=o)return!1;const l=i.charCodeAt(n);if(l===60)return!1;if(l===62)break}const r=i.slice(s+1,n);if(K8e.test(r)){const l=e.md.normalizeLink(r);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(r);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=r.length+2,!0}if(U8e.test(r)){const l=e.md.normalizeLink(`mailto:${r}`);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(r);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=r.length+2,!0}return!1}var WB=V8e;function Z8e(e,t){const n=e.src;let i=e.pos;if(n.charCodeAt(i)!==96)return!1;const s=i;i++;const o=e.posMax;for(;i<o&&n.charCodeAt(i)===96;)i++;const r=n.slice(s,i),l=r.length;if(e.backticksScanned&&(e.backticks[l]||0)<=s)return t||(e.pending+=r),e.pos+=l,!0;let a=i,u;for(;(u=n.indexOf("`",a))!==-1;){for(a=u+1;a<o&&n.charCodeAt(a)===96;)a++;const c=a-u;if(c===l){if(!t){const d=e.push("code_inline","code",0);d.markup=r;let f=n.slice(i,u);f.includes(` +`)&&(f=f.replace(/\n/g," ")),f.length>2&&f.charCodeAt(0)===32&&f.charCodeAt(f.length-1)===32&&(f=f.slice(1,-1)),d.content=f}return e.pos=a,!0}e.backticks[c]=u}return e.backticksScanned=!0,t||(e.pending+=r),e.pos+=l,!0}var qB=Z8e;function M_(e){const t={},n=e.length;if(!n)return;let i=0,s=-2;const o=[];for(let r=0;r<n;r++){const l=e[r];if(o.push(0),(e[i].marker!==l.marker||s!==l.token-1)&&(i=r),s=l.token,l.length=l.length||0,!l.close)continue;Object.prototype.hasOwnProperty.call(t,l.marker)||(t[l.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[l.marker][(l.open?3:0)+l.length%3];let u=i-o[i]-1,c=u;for(;u>a;u-=o[u]+1){const d=e[u];if(d.marker===l.marker&&d.open&&d.end<0){let f=!1;if((d.close||l.open)&&(d.length+l.length)%3===0&&(d.length%3!==0||l.length%3!==0)&&(f=!0),!f){const h=u>0&&!e[u-1].open?o[u-1]+1:0;o[r]=r-u+h,o[u]=h,l.open=!1,d.end=r,d.close=!1,c=-1,s=-2;break}}}c!==-1&&(t[l.marker][(l.open?3:0)+(l.length||0)%3]=c)}}function G8e(e){const t=e.tokens_meta,n=e.tokens_meta.length;M_(e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&M_(t[i].delimiters)}var Q8e=G8e;const UB="*",KB="_";function Y8e(e,t){if(t)return!1;const n=e.src.charCodeAt(e.pos);if(n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);if(!i||i.length===0)return!1;const s=n===42?UB:KB,o=i.length,r=i.can_open,l=i.can_close,a=e.tokens,u=e.delimiters;for(let c=0;c<o;c++){const d=e.push("text","",0);d.content=s,u.push({marker:n,length:o,token:a.length-1,end:-1,open:r,close:l})}return e.pos+=o,!0}function E_(e,t){const n=t.length,i=e.tokens;for(let s=n-1;s>=0;s--){const o=t[s],r=o.marker;if(r!==95&&r!==42||o.end===-1)continue;const l=t[o.end],a=o.token,u=l.token,c=s>0&&t[s-1].end===o.end+1&&t[s-1].marker===r&&t[s-1].token===a-1&&t[o.end+1].token===u+1,d=r===42?UB:KB,f=i[a];c?(f.type="strong_open",f.tag="strong",f.nesting=1,f.markup=d+d,f.content=""):(f.type="em_open",f.tag="em",f.nesting=1,f.markup=d,f.content="");const h=i[u];c?(h.type="strong_close",h.tag="strong",h.nesting=-1,h.markup=d+d,h.content=""):(h.type="em_close",h.tag="em",h.nesting=-1,h.markup=d,h.content=""),c&&(i[t[s-1].token].content="",i[t[o.end+1].token].content="",s--)}}function J8e(e){const t=e.tokens_meta,n=e.tokens_meta.length;E_(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&E_(e,t[i].delimiters)}const n8={tokenize:Y8e,postProcess:J8e};function VB(e){return F6(e)}function K6(e){return e>=48&&e<=57}function X8e(e){const t=e|32;return K6(e)||t>=97&&t<=102}function ZB(e){const t=e|32;return t>=97&&t<=122}function e5e(e){return ZB(e)||K6(e)}function t5e(e,t,n){let i=t+2;if(i>=n)return null;let s=!1,o=7,r=i;for((e.charCodeAt(i)|32)===120&&(s=!0,o=6,i++,r=i);i<n&&i-r<o;){const l=e.charCodeAt(i);if(!(s?X8e(l):K6(l)))break;i++}return i===r||i>=n||e.charCodeAt(i)!==59?null:e.slice(t,i+1)}function n5e(e,t,n){let i=t+1;if(i>=n||!ZB(e.charCodeAt(i)))return null;for(i++;i<n&&i-t-1<32&&e5e(e.charCodeAt(i));)i++;if(i-t-1<2||i>=n||e.charCodeAt(i)!==59)return null;const s=e.slice(t,i+1);return VB(s)!==s?s:null}function i5e(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const s=t5e(e.src,n,i);if(s){if(!t){const o=(s.charCodeAt(2)|32)===120?Number.parseInt(s.slice(3,-1),16):Number.parseInt(s.slice(2,-1),10),r=e.push("text_special","",0);r.content=t9(o)?u0(o):u0(65533),r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}else{const s=n5e(e.src,n,i);if(s){const o=VB(s);if(!t){const r=e.push("text_special","",0);r.content=o,r.markup=s,r.info="entity"}return e.pos+=s.length,!0}}return!1}var GB=i5e;const QB=(()=>{const e=new Array(256).fill(0),t="\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-";for(let n=0;n<32;n++)e[t.charCodeAt(n)]=1;return e})(),i8=new Array(128),YB=new Array(128);for(let e=0;e<128;e++){const t=String.fromCharCode(e);i8[e]=`\\${t}`,YB[e]=QB[e]?t:i8[e]}function T_(e,t,n){e.pending&&e.pushPending();const i=new Qs("text_special","",0);i.level=e.level,i.content=t,i.markup=n,i.info="escape",e.pendingLevel=e.level,e.tokens.push(i),e.tokens_meta.push(null)}function s5e(e,t){let n=e.pos;const i=e.posMax,s=e.src;if(s.charCodeAt(n)!==92||(n++,n>=i))return!1;let o=s.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(o=s.charCodeAt(n),!(o!==9&&o!==32));)n++;return e.pos=n,!0}if(o<128)return t?(e.pos=n+1,!0):(T_(e,YB[o],i8[o]),e.pos=n+1,!0);if(t){if(o>=55296&&o<=56319&&n+1<i){const a=s.charCodeAt(n+1);a>=56320&&a<=57343&&n++}return e.pos=n+1,!0}let r=s.charAt(n);if(o>=55296&&o<=56319&&n+1<i){const a=s.charCodeAt(n+1);a>=56320&&a<=57343&&(r+=s.charAt(n+1),n++)}const l=`\\${r}`;return T_(e,o<256&&QB[o]?r:l,l),e.pos=n+1,!0}var JB=s5e;function o5e(e){let t,n,i=0;const s=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++){const r=s[t];r&&(r.nesting&&r.nesting<0&&i--,r.level=i,r.nesting&&r.nesting>0&&i++,r.type==="text"&&t+1<o&&s[t+1]?.type==="text"?s[t+1].content=r.content+s[t+1].content:(t!==n&&(s[n]=r),n++))}t!==n&&(s.length=n)}var r5e=o5e;const XB=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,ez="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",l5e=new RegExp(`^(?:${XB}|${ez}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<\\?[\\s\\S]*?\\?>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),a5e=new RegExp(`^(?:${XB}|${ez})`);function tz(e){return e===32||e===9||e===10||e===12||e===13}function u5e(e){if(e.length<3||e.charCodeAt(0)!==60||(e.charCodeAt(1)|32)!==97)return!1;const t=e.charCodeAt(2);return t===62||tz(t)}function c5e(e){if(e.length<4||e.charCodeAt(0)!==60||e.charCodeAt(1)!==47||(e.charCodeAt(2)|32)!==97)return!1;for(let t=3;t<e.length;t++){const n=e.charCodeAt(t);if(n===62)return!0;if(!tz(n))return!1}return!1}function d5e(e){const t=e|32;return t>=97&&t<=122}function f5e(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos,s=e.src;if(s.charCodeAt(i)!==60||i+2>=n)return!1;const o=s.charCodeAt(i+1);if(o!==33&&o!==63&&o!==47&&!d5e(o))return!1;const r=s.slice(i).match(l5e);if(!r)return!1;const l=r[0];if(!t){const a=e.pushSimple("html_inline","");a.content=l,u5e(l)&&e.linkLevel++,c5e(l)&&e.linkLevel--}return e.pos+=l.length,!0}var nz=f5e;function h5e(e,t){let n,i,s,o,r,l,a,u,c="";const d=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const h=e.pos+2,g=Ev(e,e.pos+1,!1);if(g<0)return!1;if(o=g+1,o<f&&e.src.charCodeAt(o)===40){for(o++;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);if(o>=f)return!1;if(l=PB(e.src,o,e.posMax),l.ok){for(c=e.md.normalizeLink(l.str),e.md.validateLink(c)?o=l.pos:c="",u=o;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);if(l=jB(e.src,o,e.posMax),o<f&&u!==o&&l.ok)for(a=l.str,o=l.pos;o<f&&(n=e.src.charCodeAt(o),!(n!==32&&n!==10));o++);else a=""}if(o>=f||e.src.charCodeAt(o)!==41)return e.pos=d,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<f&&e.src.charCodeAt(o)===91?(u=o+1,o=Ev(e,o),o>=0?s=e.src.slice(u,o++):o=g+1):o=g+1,s||(s=e.src.slice(h,g)),r=e.env.references[e9(s)],!r)return e.pos=d,!1;c=r.href,a=r.title}if(!t){i=e.src.slice(h,g);const m=[];e.md.inline.parse(i,e.md,e.env,m);const y=e.push("image","img",0);y.attrs=[["src",c],["alt",""]],y.children=m,y.content=i,a&&y.attrs.push(["title",a])}return e.pos=o,e.posMax=f,!0}var iz=h5e;function m3(e,t,n){for(;t<n;){const i=e.charCodeAt(t);if(i!==32&&i!==10)break;t++}return t}function p5e(e,t){if(e.src.charCodeAt(e.pos)!==91)return!1;const n=e.src,i=e.pos,s=e.posMax,o=e.pos+1,r=Ev(e,e.pos,!0);if(r<0)return!1;let l=r+1,a="",u="",c=!0;if(l<s&&n.charCodeAt(l)===40){l=m3(n,l+1,s);const d=PB(n,l,s);if(d.ok){const f=e.md.normalizeLink(d.str);e.md.validateLink(f)&&(a=f,l=d.pos,c=!1)}else l<s&&n.charCodeAt(l)===41&&(a="",c=!1);if(!c){if(l=m3(n,l,s),l<s&&n.charCodeAt(l)!==41){const f=jB(n,l,s);f.ok&&(u=f.str,l=m3(n,f.pos,s))}l<s&&n.charCodeAt(l)===41?l++:c=!0}}if(c){if(typeof e.env.references>"u")return!1;let d;if(l=r+1,l<s&&n.charCodeAt(l)===91){const h=l+1,g=Ev(e,l);g>=0?(d=n.slice(h,g),d||(d=n.slice(o,r)),l=g+1):d=n.slice(o,r)}else d=n.slice(o,r);const f=e.env.references[e9(d)];if(!f)return e.pos=i,!1;a=f.href,u=f.title}if(!t){e.pos=o,e.posMax=r;const d=e.push("link_open","a",1);d.attrs=u?[["href",a],["title",u]]:[["href",a]],e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=l,e.posMax=s,!0}var sz=p5e;function oz(e){const t=e|32;return t>=97&&t<=122}function g5e(e){return e>=48&&e<=57}function m5e(e){return oz(e)||g5e(e)||e===43||e===45||e===46}function v5e(e){if(e.length===0)return null;let t=e.length-1;for(;t>=0&&m5e(e.charCodeAt(t));)t--;return t++,t>=e.length||!oz(e.charCodeAt(t))?null:e.slice(t)}function y5e(e,t,n){let i=t;for(;i<n;){const s=e.charCodeAt(i);if(s<=32||s===127||s===60)break;i++}return e.slice(t,i)}function rz(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const s=v5e(e.pending);if(!s)return!1;const o=y5e(e.src,n-s.length,i),r=e.md.linkify.matchAtStart(o);if(!r)return!1;let l=r.url;if(l.length<=s.length)return!1;let a=l.length;for(;a>0&&l.charCodeAt(a-1)===42;)a--;a!==l.length&&(l=l.slice(0,a));const u=e.md.normalizeLink(l);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const c=e.push("link_open","a",1);c.attrs=[["href",u]],c.markup="linkify",c.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(l);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=l.length-s.length,!0}function k5e(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,s=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.pushSimple("hardbreak","br")}else e.pending=e.pending.slice(0,-1),e.pushSimple("softbreak","br");else e.pushSimple("softbreak","br");for(n++;n<s;){const o=e.src.charCodeAt(n);if(o!==9&&o!==32)break;n++}return e.pos=n,!0}var lz=k5e;function b5e(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;const s=e.scanDelims(e.pos,!0);if(!s)return!1;let o=s.length;const r=String.fromCharCode(i);if(o<2)return!1;let l;o%2&&(l=e.push("text","",0),l.content=r,o--);for(let a=0;a<o;a+=2)l=e.push("text","",0),l.content=r+r,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close});return e.pos+=s.length,!0}function L_(e,t){let n;const i=[],s=t.length;for(let o=0;o<s;o++){const r=t[o];if(r.marker!==126||r.end===-1)continue;const l=t[r.end];n=e.tokens[r.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[l.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[l.token-1].type==="text"&&e.tokens[l.token-1].content==="~"&&i.push(l.token-1)}for(;i.length;){const o=i.pop();let r=o+1;for(;r<e.tokens.length&&e.tokens[r].type==="s_close";)r++;r--,o!==r&&(n=e.tokens[r],e.tokens[r]=e.tokens[o],e.tokens[o]=n)}}function A5e(e){const t=e.delimiters;L_(e,t);const n=e.tokens_meta;if(n)for(let i=0;i<n.length;i++)n[i]&&n[i].delimiters&&L_(e,n[i].delimiters)}const s8={tokenize:b5e,postProcess:A5e};function N_(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function C5e(e,t){const n=e.src,i=e.pos,s=e.posMax;if(i>=s||N_(n.charCodeAt(i)))return!1;let o=i+1;for(;o<s&&!N_(n.charCodeAt(o));)o++;return t||(e.pending+=o===i+1?n.charAt(i):n.slice(i,o)),e.pos=o,!0}var az=C5e;function V6(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function w5e(e){if(e.length===0)return 0;const t=e.slice().sort((i,s)=>i-s),n=Math.floor(t.length/2);return t.length%2===0?(t[n-1]+t[n])/2:t[n]}function x5e(e,t){return{chain:e,name:t,calls:0,hits:0,inclusiveMs:0,medianMs:0,maxMs:0,normalCalls:0,normalHits:0,silentCalls:0,silentHits:0,samples:[]}}function uz(e){const t=e;if(!t)return null;if(t.__mdtsRuleProfile)return t.__mdtsRuleProfile;if(!t.__mdtsProfileRules)return null;const n=t.__mdtsProfileRules===!0?{}:t.__mdtsProfileRules,i={enabled:!0,fixture:n.fixture,mode:n.mode,startedAt:V6(),records:Object.create(null)};return t.__mdtsRuleProfile=i,i}function vh(e,t,n,i,s,o){const r=uz(e);if(!r)return;const l=`${t}:${n}`,a=r.records[l]??(r.records[l]=x5e(t,n));a.calls++,a.inclusiveMs+=i,i>a.maxMs&&(a.maxMs=i),a.samples.push(i),o?(a.silentCalls++,s&&a.silentHits++):(a.normalCalls++,s&&a.normalHits++),s&&a.hits++,r.completedAt=V6()}function S5e(e){const t=uz(e);if(!t)return null;const n=Object.keys(t.records);for(let i=0;i<n.length;i++){const s=t.records[n[i]];s.medianMs=w5e(s.samples)}return t.completedAt=V6(),t}var F_=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t,n){const i=this.rules.findIndex(s=>s.name===e);i>=0&&this.rules.splice(i,1),this.rules.push({name:e,fn:t,alt:n?.alt||[],enabled:!0}),this.invalidateCache()}at(e,t,n){const i=this.rules.findIndex(s=>s.name===e);if(t===void 0){if(i<0)return;const s=this.rules[i];return Object.freeze({name:s.name,fn:s.fn,alt:s.alt?Object.freeze(s.alt.slice()):void 0,enabled:s.enabled})}if(i<0)throw new Error(`Parser rule not found: ${e}`);this.rules[i].fn=t,n?.alt!==void 0&&(this.rules[i].alt=n.alt),this.invalidateCache()}before(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}after(e,t,n,i){const s=this.rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this.rules.findIndex(r=>r.name===t);o>=0&&this.rules.splice(o,1),this.rules.splice(s+1,0,{name:t,fn:n,alt:i?.alt||[],enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.enabled=s,n=!0)}n&&this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache.get(t)??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache.get(t)??[]}compileCache(){const e=new Set([""]);for(const i of this.rules)if(i.enabled&&i.alt)for(const s of i.alt)e.add(s);const t=new Map,n=new Map;for(const i of e){const s=[],o=[];for(const r of this.rules)r.enabled&&(i!==""&&!r.alt?.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t.set(i,s),n.set(i,o)}this.cache=t,this.namedCache=n}},cz=class{src;md;env;tokens;tokens_meta;pos;posMax;level;pending;pendingLevel;cache;delimiters;_prev_delimiters;backticks;backticksScanned;linkLevel;linkLabelNoCloseFrom;maxNesting;constructor(e,t,n,i){this.src=e,this.md=t,this.env=n,this.tokens=i,this.tokens_meta=new Array(i.length),this.pos=0,this.posMax=e.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0,this.linkLabelNoCloseFrom=-1,this.maxNesting=t.options.maxNesting}pushPending(){const e=new Qs("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}pushSimple(e,t){this.pending&&this.pushPending();const n=new Qs(e,t,0);return n.level=this.level,this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(null),n}push(e,t,n){if(this.pending&&this.pushPending(),n===0)return this.pushSimple(e,t);const i=new Qs(e,t,n);let s=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(s),i}scanDelims(e,t){const{src:n,posMax:i}=this,s=n.charCodeAt(e);let o=e;for(;o<i&&n.charCodeAt(o)===s;)o++;const r=o-e,l=e>0?n.charCodeAt(e-1):32,a=o<i?n.charCodeAt(o):32,u=a0(l),c=a0(a),d=Xb(l),f=Xb(a),h=!c&&(!f||u||d),g=!u&&(!d||c||f);return{can_open:h&&(t||!g||d),can_close:g&&(t||!h||f),length:r}}};cz.prototype.Token=Qs;const _5e=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/;function D_(e,t){switch(e.src.charCodeAt(e.pos)){case 10:return lz(e,t);case 33:return iz(e,t);case 38:return GB(e,t);case 42:case 95:return n8.tokenize(e,t);case 58:return e.md.options.linkify&&rz(e,t);case 60:return WB(e,t)||nz(e,t);case 91:return sz(e,t);case 92:return JB(e,t);case 96:return qB(e,t);case 126:return s8.tokenize(e,t);default:return az(e,t)}}function dz(e){return!_5e.test(e)}var I5e=class{ruler;ruler2;cachedRulesVersion=-1;cachedRules=[];cachedRules2Version=-1;cachedRules2=[];defaultRulerVersion;defaultRuler2Version;constructor(){this.ruler=new F_,this.ruler2=new F_,this.ruler.push("text",az),this.ruler.push("linkify",rz),this.ruler.push("newline",lz),this.ruler.push("escape",JB),this.ruler.push("backticks",qB),this.ruler.push("strikethrough",s8.tokenize),this.ruler.push("emphasis",n8.tokenize),this.ruler.push("link",sz),this.ruler.push("image",iz),this.ruler.push("autolink",WB),this.ruler.push("html_inline",nz),this.ruler.push("entity",GB),this.ruler2.push("balance_pairs",Q8e),this.ruler2.push("strikethrough",s8.postProcess),this.ruler2.push("emphasis",n8.postProcess),this.ruler2.push("fragments_join",r5e),this.defaultRulerVersion=this.ruler.version,this.defaultRuler2Version=this.ruler2.version}skipToken(e){const t=e.pos,n=this.getRules(),i=n.length,s=e.cache,o=s[t],r=!!e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules"));if(o!==void 0){e.pos=o;return}let l=!1;if(e.level<e.maxNesting){if(r){const a=this.ruler.getNamedRules("");for(let u=0;u<i;u++){e.level++;const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();l=a[u].fn(e,!0);const d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(vh(e.env,"inline",a[u].name,d-c,!!l,!0),e.level--,l){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}}else if(this.isDefaultRuleset()){if(e.level++,l=D_(e,!0),e.level--,l&&t>=e.pos)throw new Error("inline rule didn't increment state.pos")}else for(let a=0;a<i;a++)if(e.level++,l=n[a](e,!0),e.level--,l){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;l||e.pos++,s[t]=e.pos}tokenize(e){const t=this.getRules(),n=t.length,i=e.posMax;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const o=this.isDefaultRuleset();for(;e.pos<i;){const r=e.pos;let l=!1;if(e.level<e.maxNesting){if(o)l=D_(e,!1);else for(let a=0;a<n&&(l=t[a](e,!1),!l);a++);if(l&&r>=e.pos)throw new Error("inline rule didn't increment state.pos")}if(l){if(e.pos>=i)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending();return}const s=this.ruler.getNamedRules("");for(;e.pos<i;){const o=e.pos;let r=!1;if(e.level<e.maxNesting)for(let l=0;l<n;l++){const a=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();r=s[l].fn(e,!1);const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(vh(e.env,"inline",s[l].name,u-a,!!r,!1),r){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(r){if(e.pos>=i)break;continue}e.pending+=e.src.charAt(e.pos++)}e.pending&&e.pushPending()}isDefaultRuleset(){return this.ruler.version===this.defaultRulerVersion&&this.ruler2.version===this.defaultRuler2Version}parseSource(e,t,n,i){if(typeof e=="string"&&e.length>0&&this.isDefaultRuleset()&&dz(e)){const a=new Qs("text","",0);a.content=e,i.push(a);return}const s=new cz(e,t,n,i);this.tokenize(s);const o=this.getRules2(),r=o.length;if(!(s.env&&(Object.prototype.hasOwnProperty.call(s.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(s.env,"__mdtsProfileRules")))){for(let a=0;a<r;a++)o[a](s,!1);return}const l=this.ruler2.getNamedRules("");for(let a=0;a<r;a++){const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();l[a].fn(s,!1);const c=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();vh(s.env,"inline2",l[a].name,c-u,!0,!1)}}parse(e,t,n,i){this.parseSource(e,t,n,i)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}getRules2(){return this.cachedRules2Version!==this.ruler2.version&&(this.cachedRules2=this.ruler2.getRules(""),this.cachedRules2Version=this.ruler2.version),this.cachedRules2}};function M5e(e){const t=e.tokens,n=!!e.md?.inline?.isDefaultRuleset?.();for(let i=0,s=t.length;i<s;i++){const o=t[i];if(o.type==="inline"&&e.md){if(o.children||(o.children=[]),n&&o.content.length>0&&dz(o.content)){const r=new Qs("text","",0);r.content=o.content,o.children.push(r);continue}e.md.inline.parse(o.content,e.md,e.env,o.children)}}}const E5e=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u,T5e=/[0-9a-z]/i;function L5e(e){return/^<a[>\s]/i.test(e)}function N5e(e){return/^<\/a\s*>/i.test(e)}function F5e(e,t){if(t.schema||t.index!==0||!t.raw)return t;for(let n=1;n<t.raw.length;n++){const i=t.raw[n-1],s=t.raw[n];if(!E5e.test(i)||!T5e.test(s))continue;const o=t.raw.slice(n),r=e.match(o)?.[0];if(!(!r||r.index!==0||r.lastIndex!==o.length))return{...r,index:t.index+n,lastIndex:t.index+n+r.lastIndex}}return t}function D5e(e){const t=e.tokens;if(e.md?.options?.linkify)for(let n=0;n<t.length;n++){const i=t[n];if(i.type!=="inline"||!e.md.linkify.test(i.content))continue;let s=i.children;s||(s=[],i.children=s);let o=0;for(let r=s.length-1;r>=0;r--){const l=s[r];if(l.type==="link_close"){for(r--;r>=0&&s[r].level!==l.level&&s[r].type!=="link_open";)r--;continue}if(l.type==="html_inline"&&(L5e(l.content)&&o>0&&o--,N5e(l.content)&&o++),o>0||l.type!=="text"||!e.md.linkify.test(l.content))continue;const a=l.content;let u=(e.md.linkify.match(a)||[]).map(h=>F5e(e.md.linkify,h));if(u.length===0)continue;const c=[];let d=l.level,f=0;u.length>0&&u[0].index===0&&r>0&&s[r-1].type==="text_special"&&(u=u.slice(1));for(let h=0;h<u.length;h++){const g=u[h],m=e.md.normalizeLink(g.url);if(!e.md.validateLink(m))continue;let y=g.text;g.schema?g.schema==="mailto:"&&!/^mailto:/i.test(y)?y=e.md.normalizeLinkText(`mailto:${y}`).replace(/^mailto:/,""):y=e.md.normalizeLinkText(y):y=e.md.normalizeLinkText(`http://${y}`).replace(/^http:\/\//,"");const A=g.index;if(A>f){const x=new Qs("text","",0);x.content=a.slice(f,A),x.level=d,c.push(x)}const b=new Qs("link_open","a",1);b.attrs=[["href",m]],b.level=d++,b.markup="linkify",b.info="auto",c.push(b);const C=new Qs("text","",0);C.content=y,C.level=d,c.push(C);const v=new Qs("link_close","a",-1);v.level=--d,v.markup="linkify",v.info="auto",c.push(v),f=g.lastIndex}if(f!==0){if(f<a.length){const h=new Qs("text","",0);h.content=a.slice(f),h.level=d,c.push(h)}s.splice(r,1,...c)}}}}const $5e=/\r\n?|\n/g,B5e=/\0/g;function z5e(e){if(!e||typeof e.src!="string")return;const t=e.src,n=t.includes("\r"),i=t.includes("\0");if(!n&&!i)return;let s=t;n&&(s=s.replace($5e,` +`)),i&&(s=s.replace(B5e,"�")),e.src=s}const fz=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,R5e=/\((?:c|tm|r)\)/i,O5e=/\((c|tm|r)\)/gi,P5e={c:"©",r:"®",tm:"™"};function j5e(e,t){return P5e[t.toLowerCase()]}function H5e(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(O5e,j5e)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function W5e(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&fz.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function q5e(e){if(e.md?.options?.typographer)for(let t=e.tokens.length-1;t>=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const i=n.content||(Array.isArray(n.children)?n.children.map(s=>s.type==="text"?s.content:"").join(""):"");R5e.test(i)&&H5e(n.children||[]),fz.test(i)&&W5e(n.children||[])}}var U5e=class{rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t){const n=this.rules.findIndex(i=>i.name===e);n>=0&&this.rules.splice(n,1),this.rules.push({name:e,fn:t,enabled:!0}),this.invalidateCache()}at(e,t){const n=this.rules.findIndex(i=>i.name===e);if(n<0)throw new Error(`Parser rule not found: ${e}`);this.rules[n].fn=t,this.invalidateCache()}before(e,t,n){const i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}after(e,t,n){const i=this.rules.findIndex(o=>o.name===e);if(i<0)throw new Error(`Parser rule not found: ${e}`);const s=this.rules.findIndex(o=>o.name===t);s>=0&&this.rules.splice(s,1),this.rules.splice(i+1,0,{name:t,fn:n,enabled:!0}),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled||(this.rules[r].enabled=!0,s=!0)}return s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;for(const o of n){const r=this.rules.findIndex(l=>l.name===o);if(r<0){if(!t)throw new Error(`Rules manager: invalid rule name ${o}`);continue}i.push(o),this.rules[r].enabled&&(this.rules[r].enabled=!1,s=!0)}return s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this.rules){const s=t.has(i.name);i.enabled!==s&&(i.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){this.cache=this.rules.filter(e=>e.enabled).map(e=>e.fn),this.namedCache=this.rules.filter(e=>e.enabled).map(e=>({name:e.name,fn:e.fn}))}getRules(e=""){return this.cache||this.compileCache(),this.cache}getNamedRules(e=""){return this.namedCache||this.compileCache(),this.namedCache}};const K5e=/['"]/,$_=/['"]/g,B_="’";function gm(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function V5e(e,t){let n;const i=[],s=t.md&&t.md.options&&t.md.options.quotes||"“”‘’";for(let o=0;o<e.length;o++){const r=e[o],l=e[o].level;for(n=i.length-1;n>=0&&!(i[n].level<=l);n--);if(i.length=n+1,r.type!=="text")continue;let a=r.content,u=0,c=a.length;e:for(;u<c;){$_.lastIndex=u;const d=$_.exec(a);if(!d)break;let f=!0,h=!0;u=d.index+1;const g=d[0]==="'";let m=32;if(d.index-1>=0)m=a.charCodeAt(d.index-1);else for(n=o-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let y=32;if(u<c)y=a.charCodeAt(u);else for(n=o+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){y=e[n].content.charCodeAt(0);break}const A=Iv(m)||_v(String.fromCharCode(m)),b=Iv(y)||_v(String.fromCharCode(y)),C=a0(m),v=a0(y);if(v?f=!1:b&&(C||A||(f=!1)),C?h=!1:A&&(v||b||(h=!1)),y===34&&d[0]==='"'&&m>=48&&m<=57&&(h=f=!1),f&&h&&(f=A,h=b),!f&&!h){g&&(r.content=gm(r.content,d.index,B_));continue}if(h)for(n=i.length-1;n>=0;n--){let x=i[n];if(i[n].level<l)break;if(x.single===g&&i[n].level===l){x=i[n];let S,_;g?(S=s[2]||"‘",_=s[3]||"’"):(S=s[0]||"“",_=s[1]||"”"),r.content=gm(r.content,d.index,_),e[x.token].content=gm(e[x.token].content,x.pos,S),u+=_.length-1,x.token===o&&(u+=S.length-1),a=r.content,c=a.length,i.length=n;continue e}}f?i.push({token:o,pos:d.index,single:g,level:l}):h&&g&&(r.content=gm(r.content,d.index,B_))}}}function Z5e(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--){const n=e.tokens[t];if(n.type!=="inline")continue;const i=typeof n.content=="string"?n.content:(n.children||[]).map(s=>s.content||"").join("");!K5e.test(i)||!n.children||V5e(n.children,e)}}function G5e(e){const t=e.tokens||[],n=t.length;for(let i=0;i<n;i++){const s=t[i];if(s.type!=="inline"||!Array.isArray(s.children))continue;const o=s.children,r=o.length;for(let u=0;u<r;u++)o[u].type==="text_special"&&(o[u].type="text");let l=0,a=0;for(;a<r;a++)o[a].type==="text"&&a+1<r&&o[a+1].type==="text"?o[a+1].content=o[a].content+o[a+1].content:(a!==l&&(o[l]=o[a]),l++);a!==l&&(o.length=l)}}const Q5e=/^(?:vbscript|javascript|file|data):/,Y5e=/^data:image\/(?:gif|png|jpeg|webp);/,hz=["http:","https:","mailto:"];function pz(e){const t=e.trim().toLowerCase();return Q5e.test(t)?Y5e.test(t):!0}function gz(e){const t=$6(e,!0);if(t.hostname&&(!t.protocol||hz.includes(t.protocol)))try{t.hostname=OB.default.toASCII(t.hostname)}catch{}return NB(D6(t))}function mz(e){const t=$6(e,!0);if(t.hostname&&(!t.protocol||hz.includes(t.protocol)))try{t.hostname=OB.default.toUnicode(t.hostname)}catch{}return Jb(D6(t),`${Jb.defaultChars}%`)}function J5e(e){switch(e){case 9:case 32:return!0}return!1}function X5e(e,t,n,i){const s=e.src,o=e.bMarks,r=e.eMarks,l=e.tShift,a=e.sCount,u=e.bsCount;let c=o[t]+l[t],d=r[t];const f=e.lineMax;if(a[t]-e.blkIndent>=4||s.charCodeAt(c)!==62)return!1;if(i)return!0;const h=[],g=[],m=[],y=[],A=e.md.block.ruler.getRulesForState(e,"blockquote"),b=e.parentType;e.parentType="blockquote";let C=!1,v;for(v=t;v<n;v++){const M=a[v]<e.blkIndent;if(c=o[v]+l[v],d=r[v],c>=d)break;if(s.charCodeAt(c++)===62&&!M){let D=a[v]+1,T,N;s.charCodeAt(c)===32?(c++,D++,N=!1,T=!0):s.charCodeAt(c)===9?(T=!0,(u[v]+D)%4===3?(c++,D++,N=!1):N=!0):T=!1;let O=D;for(h.push(o[v]),o[v]=c;c<d;){const P=s.charCodeAt(c);if(J5e(P))P===9?O+=4-(O+u[v]+(N?1:0))%4:O++;else break;c++}C=c>=d,g.push(u[v]),u[v]=a[v]+1+(T?1:0),m.push(a[v]),a[v]=O-D,y.push(l[v]),l[v]=c-o[v];continue}if(C)break;let $=!1;for(let D=0,T=A.length;D<T;D++)if(A[D](e,v,n,!0)){$=!0;break}if($){e.lineMax=v,e.blkIndent!==0&&(h.push(o[v]),g.push(u[v]),y.push(l[v]),m.push(a[v]),a[v]-=e.blkIndent);break}h.push(o[v]),g.push(u[v]),y.push(l[v]),m.push(a[v]),a[v]=-1}const x=e.blkIndent;e.blkIndent=0;const S=e.push("blockquote_open","blockquote",1);S.markup=">";const _=[t,0];S.map=_,e.md.block.tokenize(e,t,v);const I=e.push("blockquote_close","blockquote",-1);I.markup=">",e.lineMax=f,e.parentType=b,_[1]=e.line;for(let M=0;M<y.length;M++)o[M+t]=h[M],l[M+t]=y[M],a[M+t]=m[M],u[M+t]=g[M];return e.blkIndent=x,!0}function e6e(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,s=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,s=i;continue}break}e.line=s;const o=e.push("code_block","code",0);return o.content=`${e.getLines(t,s,4+e.blkIndent,!1)} +`,o.map=[t,e.line],!0}function t6e(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||s+3>o)return!1;const r=e.src.charCodeAt(s);if(r!==126&&r!==96)return!1;let l=s;s=e.skipChars(s,r);let a=s-l;if(a<3)return!1;const u=e.src.slice(l,s),c=e.src.slice(s,o);if(r===96&&c.includes(String.fromCharCode(r)))return!1;if(i)return!0;let d=t,f=!1;for(;d++,!(d>=n||(s=l=e.bMarks[d]+e.tShift[d],o=e.eMarks[d],s<o&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(s)===r&&!(e.sCount[d]-e.blkIndent>=4)&&(s=e.skipChars(s,r),!(s-l<a)&&(s=e.skipSpaces(s),!(s<o)))){f=!0;break}a=e.sCount[t],e.line=d+(f?1:0);const h=e.push("fence","code",0);return h.info=c,h.content=e.getLines(t+1,d,a,!0),h.markup=u,h.map=[t,e.line],!0}const z_=["","h1","h2","h3","h4","h5","h6"],R_=["","#","##","###","####","#####","######"];function O_(e){switch(e){case 9:case 32:return!0}return!1}function n6e(e,t,n,i){const s=e.src,o=e.bMarks,r=e.tShift,l=e.eMarks;let a=o[t]+r[t],u=l[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let c=s.charCodeAt(a);if(c!==35||a>=u)return!1;let d=1;for(c=s.charCodeAt(++a);c===35&&a<u&&d<=6;)d++,c=s.charCodeAt(++a);if(d>6||a<u&&!O_(c))return!1;if(i)return!0;u=e.skipSpacesBack(u,a);const f=e.skipCharsBack(u,35,a);f>a&&O_(s.charCodeAt(f-1))&&(u=f),e.line=t+1;const h=e.push("heading_open",z_[d],1);h.markup=R_[d],h.map=[t,e.line];const g=e.push("inline","",0);g.content=s.slice(a,u).trim(),g.map=[t,e.line],g.children=[];const m=e.push("heading_close",z_[d],-1);return m.markup=R_[d],!0}function i6e(e){switch(e){case 9:case 32:return!0}return!1}function s6e(e,t,n,i){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(o++);if(r!==42&&r!==45&&r!==95)return!1;let l=1;for(;o<s;){const u=e.src.charCodeAt(o++);if(u!==r&&!i6e(u))return!1;u===r&&l++}if(l<3)return!1;if(i)return!0;e.line=t+1;const a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=new Array(l+1).join(String.fromCharCode(r)),!0}const Ef=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${["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"].join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${a5e.source}\\s*$`),/^$/,!1]];function o6e(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;let r=e.src.slice(s,o),l=0;for(;l<Ef.length&&!Ef[l][0].test(r);l++);if(l===Ef.length)return!1;if(i)return Ef[l][2];let a=t+1;if(!Ef[l][1].test(r)){for(;a<n&&!(e.sCount[a]<e.blkIndent);a++)if(s=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],r=e.src.slice(s,o),Ef[l][1].test(r)){r.length!==0&&a++;break}}e.line=a;const u=e.push("html_block","",0);return u.map=[t,a],u.content=e.getLines(t,a,e.blkIndent,!0),!0}function P_(e){switch(e){case 9:case 32:return!0}return!1}const yp={Pipe:1,ParagraphTerminator:2};function r6e(e){switch(e){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 124:case 126:return!0}return e>=48&&e<=57}var vz=class{src;md;env;tokens;bMarks=[];eMarks=[];tShift=[];sCount=[];bsCount=[];lineFlags=[];blkIndent=0;line=0;lineMax=0;tight=!1;ddIndent=-1;listIndent=-1;parentType="root";level=0;constructor(e,t,n,i){this.src=e,this.md=t,this.env=n,this.tokens=i;const s=this.src;let o=0,r=0,l=0,a=!1,u=0;for(let c=0,d=s.length;c<d;c++){const f=s.charCodeAt(c);if(f===124&&(u|=yp.Pipe|yp.ParagraphTerminator),!a)if(P_(f)){o++,f===9?r+=4-r%4:r++;continue}else a=!0,r6e(f)&&(u|=yp.ParagraphTerminator);(f===10||c===d-1)&&(f!==10&&c++,this.bMarks.push(l),this.eMarks.push(c),this.tShift.push(o),this.sCount.push(r),this.bsCount.push(0),this.lineFlags.push(u),a=!1,o=0,r=0,u=0,l=c+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineFlags.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){if(n===0){const s=new Qs(e,t,0);return s.block=!0,s.level=this.level,this.tokens.push(s),s}const i=new Qs(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){const t=this.bMarks,n=this.tShift,i=this.eMarks;for(let s=this.lineMax;e<s&&!(t[e]+n[e]<i[e]);e++);return e}skipSpaces(e){const t=this.src;for(let n=t.length;e<n;e++){const i=t.charCodeAt(e);if(i!==9&&i!==32)break}return e}skipSpacesBack(e,t){if(e<=t)return e;const n=this.src;for(;e>t;){const i=n.charCodeAt(--e);if(i!==9&&i!==32)return e+1}return e}skipChars(e,t){const n=this.src;for(let i=n.length;e<i&&n.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,n){if(e<=n)return e;const i=this.src;for(;e>n;)if(t!==i.charCodeAt(--e))return e+1;return e}getLines(e,t,n,i){if(e>=t)return"";if(e+1===t){const c=e,d=this.bMarks[c];let f=d;const h=i?this.eMarks[c]+1:this.eMarks[c];let g=0;const m=this.src,y=this.bsCount,A=this.tShift;for(;f<h&&g<n;){const b=m.charCodeAt(f);if(b===9||b===32)b===9?g+=4-(g+y[c])%4:g++;else if(f-d<A[c])g++;else break;f++}return g>n?new Array(g-n+1).join(" ")+m.slice(f,h):m.slice(f,h)}const s=new Array(t-e),o=this.src,r=this.bMarks,l=this.eMarks,a=this.bsCount,u=this.tShift;for(let c=0,d=e;d<t;d++,c++){let f=0;const h=r[d];let g=h,m;for(d+1<t||i?m=l[d]+1:m=l[d];g<m&&f<n;){const y=o.charCodeAt(g);if(P_(y))y===9?f+=4-(f+a[d])%4:f++;else if(g-h<u[d])f++;else break;g++}f>n?s[c]=new Array(f-n+1).join(" ")+o.slice(g,m):s[c]=o.slice(g,m)}return s.join("")}};vz.prototype.Token=Qs;function l6e(e,t,n){for(let i=t;i<n;i++)if(e.charCodeAt(i)===124)return!0;return!1}function yz(e){const t=e?.md?.block?.ruler;return t?t.version===t.__mdtsDefaultVersion:!1}function kz(e,t,n,i,s){if(e.lineFlags&&(e.lineFlags[t]&yp.ParagraphTerminator)===0||i>=s)return!1;const o=n.charCodeAt(i);switch(o){case 35:case 42:case 43:case 45:case 60:case 62:case 95:case 96:case 126:return!0}return o>=48&&o<=57?!0:l6e(n,i,s)}const j_=["","h1","h2"];function a6e(e,t,n){const i=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.src,o=e.bMarks,r=e.tShift,l=e.eMarks,a=e.sCount,u=e.blkIndent,c=yz(e);if(a[t]-u>=4)return!1;const d=e.parentType;e.parentType="paragraph";let f=0,h,g=t+1;for(;g<n;g++){const v=o[g]+r[g],x=l[g];if(v>=x)break;if(a[g]-u>3)continue;if(a[g]>=u&&(h=s.charCodeAt(v),h===45||h===61)){let _=v+1,I=_;for(;_<x&&s.charCodeAt(_)===h;)_++;for(I=_;_<x;){const M=s.charCodeAt(_);if(M!==9&&M!==32)break;_++}if(_>=x){f=h===61?1:2;break}if(I-v>1)continue}if(a[g]<0||c&&!kz(e,g,s,v,x))continue;let S=!1;for(let _=0,I=i.length;_<I;_++)if(i[_](e,g,n,!0)){S=!0;break}if(S)break}if(!f)return!1;let m;if(g===t+1){const v=o[t]+r[t];let x=l[t];for(;x>v;){const S=s.charCodeAt(x-1);if(S!==9&&S!==32)break;x--}m=s.slice(v,x)}else m=e.getLines(t,g,u,!1).trim();e.line=g+1;const y=h===61?"=":"-",A=e.push("heading_open",j_[f],1);A.markup=y,A.map=[t,e.line];const b=e.push("inline","",0);b.content=m,b.map=[t,e.line-1],b.children=[];const C=e.push("heading_close",j_[f],-1);return C.markup=y,e.parentType=d,!0}function bz(e){switch(e){case 9:case 32:return!0}return!1}function H_(e,t){const n=e.eMarks,i=e.bMarks,s=e.tShift,o=e.src,r=n[t];let l=i[t]+s[t];const a=o.charCodeAt(l++);return a!==42&&a!==45&&a!==43||l<r&&!bz(o.charCodeAt(l))?-1:l}function W_(e,t){const n=e.bMarks,i=e.tShift,s=e.eMarks,o=e.src,r=n[t]+i[t],l=s[t];let a=r;if(a+1>=l)return-1;let u=o.charCodeAt(a++);if(u<48||u>57)return-1;for(;;){if(a>=l)return-1;if(u=o.charCodeAt(a++),u>=48&&u<=57){if(a-r>=10)return-1;continue}if(u===41||u===46)break;return-1}return a<l&&(u=o.charCodeAt(a),!bz(u))?-1:a}function u6e(e,t,n){const i=e.bMarks,s=e.tShift,o=e.src,r=i[t]+s[t];let l=0;for(let a=r;a<n-1;a++)l=l*10+o.charCodeAt(a)-48;return l}const c6e=["0","1","2","3","4","5","6","7","8","9"];function d6e(e,t){const n=e.level+2,i=e.tokens;for(let s=t+2,o=i.length-2;s<o;s++){const r=i[s];if(r.level===n){if(r.type==="paragraph_open"){r.hidden=!0,i[s+2].hidden=!0,s+=2;continue}if(r.nesting===1){let l=1;for(;l>0&&++s<o;)l+=i[s].nesting}}}}function f6e(e,t,n,i){let s,o,r=0,l=t,a=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let u=!1;i&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(u=!0);let c,d,f;const h=e.src,g=e.bMarks,m=e.tShift,y=e.eMarks,A=e.sCount,b=e.bsCount,C=g[l]+m[l];if(C>=y[l])return!1;const v=h.charCodeAt(C);if(v>=48&&v<=57){if(f=W_(e,l),f<0||(c=!0,r=C,d=u6e(e,l,f),u&&d!==1))return!1}else if(v===42||v===45||v===43){if(f=H_(e,l),f<0)return!1;c=!1}else return!1;if(u&&e.skipSpaces(f)>=y[l])return!1;if(i)return!0;const x=h.charCodeAt(f-1),S=String.fromCharCode(x);if(c){const T=e.push("ordered_list_open","ol",1);d!==void 0&&d!==1&&(T.attrs=[["start",String(d)]])}else e.push("bullet_list_open","ul",1);const _=[l,0];e.tokens[e.tokens.length-1].map=_,e.tokens[e.tokens.length-1].markup=S;let I=!1;const M=e.tokens.length-1,$=e.md.block.ruler.getRulesForState(e,"list"),D=e.parentType;for(e.parentType="list";l<n;){o=f,s=y[l];const T=A[l]+f-(g[l]+m[l]);let N=T;for(;o<s;){const ie=h.charCodeAt(o);if(ie===9)N+=4-(N+b[l])%4;else if(ie===32)N++;else break;o++}const O=o;let P;O>=s?P=1:P=N-T,P>4&&(P=1);const R=T+P,q=e.push("list_item_open","li",1);q.markup=S;const j=[l,0];q.map=j,c&&(q.info=f-r-1===1?c6e[h.charCodeAt(r)-48]:h.slice(r,f-1));const W=e.tight,z=e.tShift[l],H=e.sCount[l],ee=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=R,e.tight=!0,e.tShift[l]=O-g[l],e.sCount[l]=N,O>=s&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||I)&&(a=!1),I=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ee,e.tShift[l]=z,e.sCount[l]=H,e.tight=W,e.push("list_item_close","li",-1).markup=S,l=e.line,j[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let V=!1;for(let ie=0,se=$.length;ie<se;ie++)if($[ie](e,l,n,!0)){V=!0;break}if(V)break;if(c){if(f=W_(e,l),f<0)break;r=g[l]+m[l]}else if(f=H_(e,l),f<0)break;if(x!==h.charCodeAt(f-1))break}return c?e.push("ordered_list_close","ol",-1).markup=S:e.push("bullet_list_close","ul",-1).markup=S,_[1]=l,e.line=l,e.parentType=D,a&&d6e(e,M),!0}function q_(e){return e===9||e===32}function h6e(e,t,n){const i=e.md.block.ruler.getRulesForState(e,"paragraph"),s=e.parentType,o=e.src,r=e.bMarks,l=e.tShift,a=e.eMarks,u=e.sCount,c=e.blkIndent,d=yz(e);let f=t+1;for(e.parentType="paragraph";f<n&&!e.isEmpty(f);f++){if(u[f]-c>3||u[f]<0)continue;if(s==="list"&&u[f]>=c){const C=r[f]+l[f],v=a[f];if(C<v){const x=o.charCodeAt(C);if(x===42||x===45||x===43){if(C+1>=v||q_(o.charCodeAt(C+1)))break}else if(x>=48&&x<=57&&C+1<v){let S=C+1;for(;;){if(S>=v){S=-1;break}const _=o.charCodeAt(S++);if(_>=48&&_<=57){if(S-C>=10){S=-1;break}continue}if((_===41||_===46)&&(S>=v||q_(o.charCodeAt(S))))break;S=-1;break}if(S>=0)break}}}const y=r[f]+l[f],A=a[f];if(d&&!kz(e,f,o,y,A))continue;let b=!1;for(let C=0,v=i.length;C<v;C++)if(i[C](e,f,n,!0)){b=!0;break}if(b)break}const h=e.getLines(t,f,c,!1).trim();e.line=f;const g=e.push("paragraph_open","p",1);g.map=[t,e.line];const m=e.push("inline","",0);return m.content=h,m.map=[t,e.line],m.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}function mm(e){switch(e){case 9:case 32:return!0}return!1}function p6e(e,t,n,i){let s=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],r=t+1;const l=e.md.block.ruler.getRulesForState(e,"reference");if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(s)!==91)return!1;function a(C){const v=e.lineMax;if(C>=v||e.isEmpty(C))return null;let x=!1;if(e.sCount[C]-e.blkIndent>3&&(x=!0),e.sCount[C]<0&&(x=!0),!x){const I=e.parentType;e.parentType="reference";let M=!1;for(let $=0,D=l.length;$<D;$++)if(l[$](e,C,v,!0)){M=!0;break}if(e.parentType=I,M)return null}const S=e.bMarks[C]+e.tShift[C],_=e.eMarks[C];return e.src.slice(S,_+1)}let u=e.src.slice(s,o+1);o=u.length;let c=-1;for(s=1;s<o;s++){const C=u.charCodeAt(s);if(C===91)return!1;if(C===93){c=s;break}else if(C===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(C===92&&(s++,s<o&&u.charCodeAt(s)===10)){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}}if(c<0||u.charCodeAt(c+1)!==58)return!1;for(s=c+2;s<o;s++){const C=u.charCodeAt(s);if(C===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(!mm(C))break}const d=e.md.helpers.parseLinkDestination(u,s,o);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;s=d.pos;const h=s,g=r,m=s;for(;s<o;s++){const C=u.charCodeAt(s);if(C===10){const v=a(r);v!==null&&(u+=v,o=u.length,r++)}else if(!mm(C))break}let y=e.md.helpers.parseLinkTitle(u,s,o);for(;y.can_continue;){const C=a(r);if(C===null)break;u+=C,s=o,o=u.length,r++,y=e.md.helpers.parseLinkTitle(u,s,o,y)}let A;for(s<o&&m!==s&&y.ok?(A=y.str,s=y.pos):(A="",s=h,r=g);s<o&&mm(u.charCodeAt(s));)s++;if(s<o&&u.charCodeAt(s)!==10&&A)for(A="",s=h,r=g;s<o&&mm(u.charCodeAt(s));)s++;if(s<o&&u.charCodeAt(s)!==10)return!1;const b=e9(u.slice(1,c));return b?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[b]>"u"&&(e.env.references[b]={title:A,href:f}),e.line=r),!0):!1}function v3(e){switch(e){case 9:case 32:return!0}return!1}const g6e=65536;function y3(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function m6e(e,t){if(e.lineFlags)return(e.lineFlags[t]&yp.Pipe)!==0;for(let n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];n<i;n++)if(e.src.charCodeAt(n)===124)return!0;return!1}function U_(e){const t=[],n=e.length;let i=0,s=e.charCodeAt(i),o=!1,r=0,l="";for(;i<n;)s===124&&(o?(l+=e.substring(r,i-1),r=i):(t.push(l+e.substring(r,i)),l="",r=i+1)),o=s===92,i++,s=e.charCodeAt(i);return t.push(l+e.substring(r)),t}function v6e(e,t,n,i){if(t+2>n)return!1;let s=t+1;if(e.sCount[s]<e.blkIndent||e.sCount[s]-e.blkIndent>=4)return!1;let o=e.bMarks[s]+e.tShift[s];if(o>=e.eMarks[s])return!1;const r=e.src.charCodeAt(o++);if(r!==124&&r!==45&&r!==58||o>=e.eMarks[s])return!1;const l=e.src.charCodeAt(o++);if(l!==124&&l!==45&&l!==58&&!v3(l)||r===45&&v3(l)||!m6e(e,t))return!1;for(;o<e.eMarks[s];){const v=e.src.charCodeAt(o);if(v!==124&&v!==45&&v!==58&&!v3(v))return!1;o++}let a=y3(e,t+1),u=a.split("|");const c=[];for(let v=0;v<u.length;v++){const x=u[v].trim();if(!x){if(v===0||v===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(x))return!1;x.charCodeAt(x.length-1)===58?c.push(x.charCodeAt(0)===58?"center":"right"):x.charCodeAt(0)===58?c.push("left"):c.push("")}if(a=y3(e,t).trim(),e.sCount[t]-e.blkIndent>=4)return!1;u=U_(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const d=u.length;if(d===0||d!==c.length)return!1;if(i)return!0;const f=e.parentType;e.parentType="table";const h=e.md.block.ruler.getRulesForState(e,"blockquote"),g=e.push("table_open","table",1),m=[t,0];g.map=m;const y=e.push("thead_open","thead",1);y.map=[t,t+1];const A=e.push("tr_open","tr",1);A.map=[t,t+1];for(let v=0;v<u.length;v++){const x=e.push("th_open","th",1);c[v]&&(x.attrs=[["style",`text-align:${c[v]}`]]);const S=e.push("inline","",0);S.content=u[v].trim(),S.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let b,C=0;for(s=t+2;s<n&&!(e.sCount[s]<e.blkIndent);s++){let v=!1;for(let S=0,_=h.length;S<_;S++)if(h[S](e,s,n,!0)){v=!0;break}if(v||(a=y3(e,s).trim(),!a)||e.sCount[s]-e.blkIndent>=4||(u=U_(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),C+=d-u.length,C>g6e))break;if(s===t+2){const S=e.push("tbody_open","tbody",1);S.map=b=[t+2,0]}const x=e.push("tr_open","tr",1);x.map=[s,s+1];for(let S=0;S<d;S++){const _=e.push("td_open","td",1);c[S]&&(_.attrs=[["style",`text-align:${c[S]}`]]);const I=e.push("inline","",0);I.content=u[S]?u[S].trim():"",I.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return b&&(e.push("tbody_close","tbody",-1),b[1]=s),e.push("table_close","table",-1),m[1]=s,e.parentType=f,e.line=s,!0}var y6e=class{_rules=[];cache=null;namedCache=null;version=0;invalidateCache(){this.cache=null,this.namedCache=null,this.version++}push(e,t,n){this._rules.push({name:e,enabled:!0,fn:t,alt:n?.alt||[]}),this.invalidateCache()}before(e,t,n,i){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s,0,{name:t,enabled:!0,fn:n,alt:i?.alt||[]}),this.invalidateCache()}after(e,t,n,i){const s=this._rules.findIndex(r=>r.name===e);if(s<0)throw new Error(`Parser rule not found: ${e}`);const o=this._rules.findIndex(r=>r.name===t);o>=0&&this._rules.splice(o,1),this._rules.splice(s+1,0,{name:t,enabled:!0,fn:n,alt:i?.alt||[]}),this.invalidateCache()}getRules(e){const t=e||"";return this.cache||this.compileCache(),this.cache[t]??[]}getNamedRules(e){const t=e||"";return this.namedCache||this.compileCache(),this.namedCache[t]??[]}getRulesForState(e,t){const n=e?.env;return n&&(Object.prototype.hasOwnProperty.call(n,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(n,"__mdtsProfileRules"))?this.getNamedRules(t).map(({name:i,fn:s})=>(o,r,l,a)=>{const u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),c=s(o,r,l,a),d=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();return vh(o?.env,"block",i,d-u,c,!!a),c}):this.getRules(t)}at(e,t,n){const i=this._rules.findIndex(s=>s.name===e);if(i===-1)throw new Error(`Parser rule not found: ${e}`);this._rules[i].fn=t,n?.alt&&(this._rules[i].alt=n.alt),this.invalidateCache()}enable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled||(this._rules[r].enabled=!0,s=!0)}),s&&this.invalidateCache(),i}disable(e,t){const n=Array.isArray(e)?e:[e],i=[];let s=!1;return n.forEach(o=>{const r=this._rules.findIndex(l=>l.name===o);if(r===-1){if(t)return;throw new Error(`Rules manager: invalid rule name ${o}`)}i.push(o),this._rules[r].enabled&&(this._rules[r].enabled=!1,s=!0)}),s&&this.invalidateCache(),i}enableOnly(e){const t=new Set(e);let n=!1;for(const i of this._rules){const s=t.has(i.name);i.enabled!==s&&(i.enabled=s,n=!0)}n&&this.invalidateCache()}compileCache(){const e=new Set([""]);for(const i of this._rules)if(i.enabled)for(const s of i.alt)e.add(s);const t=Object.create(null),n=Object.create(null);for(const i of e){const s=[],o=[];for(const r of this._rules)r.enabled&&(i!==""&&!r.alt.includes(i)||(s.push(r.fn),o.push({name:r.name,fn:r.fn})));t[i]=s,n[i]=o}this.cache=t,this.namedCache=n}};const vm=[["table",v6e,["paragraph","reference"]],["code",e6e],["fence",t6e,["paragraph","reference","blockquote","list"]],["blockquote",X5e,["paragraph","reference","blockquote","list"]],["hr",s6e,["paragraph","reference","blockquote","list"]],["list",f6e,["paragraph","reference","blockquote"]],["reference",p6e],["html_block",o6e,["paragraph","reference","blockquote"]],["heading",n6e,["paragraph","reference","blockquote"]],["lheading",a6e],["paragraph",h6e]];var k6e=class{ruler;cachedRulesVersion=-1;cachedRules=[];constructor(){this.ruler=new y6e;for(let e=0;e<vm.length;e++)this.ruler.push(vm[e][0],vm[e][1],{alt:(vm[e][2]||[]).slice()});this.ruler.__mdtsDefaultVersion=this.ruler.version}tokenize(e,t,n){const i=this.getRules(),s=i.length,o=e.md.options.maxNesting,r=e.bMarks,l=e.tShift,a=e.eMarks,u=e.sCount;let c=t,d=!1;if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){for(;c<n;){for(;c<n&&r[c]+l[c]>=a[c];)c++;if(e.line=c,c>=n||u[c]<e.blkIndent)break;if(e.level>=o){e.line=n;break}const h=e.line;let g=!1;for(let m=0;m<s;m++)if(g=i[m](e,c,n,!1),g){if(h>=e.line)throw new Error("block rule didn't increment state.line");break}if(!g)throw new Error("none of the block rules matched");e.tight=!d,r[e.line-1]+l[e.line-1]>=a[e.line-1]&&(d=!0),c=e.line,c<n&&r[c]+l[c]>=a[c]&&(d=!0,c++,e.line=c)}return}const f=this.ruler.getNamedRules("");for(;c<n;){for(;c<n&&r[c]+l[c]>=a[c];)c++;if(e.line=c,c>=n||u[c]<e.blkIndent)break;if(e.level>=o){e.line=n;break}const h=e.line;let g=!1;for(let m=0;m<s;m++){const y=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();g=f[m].fn(e,c,n,!1);const A=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();if(vh(e.env,"block",f[m].name,A-y,g,!1),g){if(h>=e.line)throw new Error("block rule didn't increment state.line");break}}if(!g)throw new Error("none of the block rules matched");e.tight=!d,r[e.line-1]+l[e.line-1]>=a[e.line-1]&&(d=!0),c=e.line,c<n&&r[c]+l[c]>=a[c]&&(d=!0,c++,e.line=c)}}parse(e,t,n,i){if(!e||e.length===0)return;const s=new vz(e,t,n,i);this.tokenize(s,s.line,s.lineMax)}getRules(){return this.cachedRulesVersion!==this.ruler.version&&(this.cachedRules=this.ruler.getRules(""),this.cachedRulesVersion=this.ruler.version),this.cachedRules}},Az=class{src;env;tokens;inlineMode;md;constructor(e,t,n={}){this.src=typeof e=="string"?e||"":e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}};Az.prototype.Token=Qs;const K_=[["normalize",z5e],["block",q8e],["inline",M5e],["linkify",D5e],["replacements",q5e],["smartquotes",Z5e],["text_join",G5e]],b6e={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:100},A6e={parseLinkLabel:W6,parseLinkDestination:H6,parseLinkTitle:q6};function C6e(){return{...b6e}}function w6e(){return{...A6e}}var x6e=class{fallbackParser;lastState=null;block;inline;ruler;linkifyInstance=null;cachedCoreRulesVersion=-1;cachedCoreRules=[];cachedCoreNamedRulesVersion=-1;cachedCoreNamedRules=[];constructor(){this.block=new k6e,this.inline=new I5e,this.ruler=new U5e;for(let e=0;e<K_.length;e++){const[t,n]=K_[e];this.ruler.push(t,n)}this.fallbackParser={block:this.block,inline:this.inline,core:this,options:C6e(),helpers:w6e(),normalizeLink:gz,normalizeLinkText:mz,validateLink:pz,linkify:null}}resolveParser(e){return e||(this.linkifyInstance||(this.linkifyInstance=new RB({fuzzyLink:!0})),this.fallbackParser.block!==this.block&&(this.fallbackParser.block=this.block),this.fallbackParser.inline!==this.inline&&(this.fallbackParser.inline=this.inline),this.fallbackParser.core=this,this.fallbackParser.linkify=this.linkifyInstance,this.fallbackParser)}createState(e,t={},n){return new Az(e,this.resolveParser(n),t)}getCoreRules(){return this.cachedCoreRulesVersion!==this.ruler.version&&(this.cachedCoreRules=this.ruler.getRules(""),this.cachedCoreRulesVersion=this.ruler.version),this.cachedCoreRules}getCoreNamedRules(){return this.cachedCoreNamedRulesVersion!==this.ruler.version&&(this.cachedCoreNamedRules=this.ruler.getNamedRules(""),this.cachedCoreNamedRulesVersion=this.ruler.version),this.cachedCoreNamedRules}process(e){if(!(e.env&&(Object.prototype.hasOwnProperty.call(e.env,"__mdtsRuleProfile")||Object.prototype.hasOwnProperty.call(e.env,"__mdtsProfileRules")))){const n=this.getCoreRules();for(let i=0;i<n.length;i++)n[i](e);return}const t=this.getCoreNamedRules();for(let n=0;n<t.length;n++){const i=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();t[n].fn(e);const s=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();vh(e.env,"core",t[n].name,s-i,!0,!1)}S5e(e.env)}parseSource(e,t={},n){if(typeof e!="string"&&W8e(e))return this.parse(HB(e),t,n);const i=this.createState(e,t,n);return this.process(i),this.lastState=i,i}parse(e,t={},n){if(typeof e!="string")throw new TypeError("Input data should be a String");return this.parseSource(e,t,n)}getTokens(){return this.lastState?this.lastState.tokens:[]}};const S6e=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/;function Tv(e){return!S6e.test(e)}function X1(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function s2(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9)return!1}return!0}function V_(e,t,n){return t+2<n&&e.charCodeAt(t)===96&&e.charCodeAt(t+1)===96&&e.charCodeAt(t+2)===96}function k3(e,t,n){return t+1<n&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===32}function _6e(e){if(e.length>3)return Tv(e);for(let t=0;t<e.length;t++)switch(e.charCodeAt(t)){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!1}return!0}const I6e=["","h1","h2","h3","h4","h5","h6"],M6e=["","#","##","###","####","#####","######"],Z_=0,b3=1,A3=2;function pl(e,t,n,i){const s=new Qs(e,t,n);return s.level=i,s.block=!0,s}function Z6(e,t,n){const i=pl("inline","",0,n);i.map=[t,t+1],i.content=e;const s=new Qs("text","",0);return s.content=e,i.children=[s],i}function E6e(e,t,n,i,s){let o=0,r=n;for(;r<i&&t.charCodeAt(r)===35&&o<6;)r++,o++;if(o===0||r>=i||t.charCodeAt(r)!==32)return!1;let l=r+1;for(;l<i&&t.charCodeAt(l)===32;)l++;let a=i;for(;a>l&&t.charCodeAt(a-1)===32;)a--;let u=a;for(;u>l&&t.charCodeAt(u-1)===35;)u--;if(u>l&&t.charCodeAt(u-1)===32)for(a=u-1;a>l&&t.charCodeAt(a-1)===32;)a--;const c=t.slice(l,a);if(!Tv(c))return!1;const d=I6e[o],f=M6e[o],h=pl("heading_open",d,1,0);h.map=[s,s+1],h.markup=f,e.push(h),e.push(Z6(c,s,1));const g=pl("heading_close",d,-1,0);return g.markup=f,e.push(g),!0}function T6e(e,t,n){const i=pl("paragraph_open","p",1,0);i.map=[n,n+1],e.push(i),e.push(Z6(t,n,1)),e.push(pl("paragraph_close","p",-1,0))}function L6e(e,t,n){const i=e.charCodeAt(n-1);return i===32||i===9?e.slice(t,n).trim():e.slice(t,n)}function C3(e,t){for(;t<e.length&&e.charCodeAt(t)===10;)t++;return t}function N6e(e,t){const n=pl("bullet_list_open","ul",1,0);return n.map=[t,t],n.markup="-",e.push(n),n}function F6e(e,t,n){const i=pl("list_item_open","li",1,1);i.map=[n,n+1],i.markup="-",e.push(i);const s=pl("paragraph_open","p",1,2);s.map=[n,n+1],s.hidden=!0,e.push(s),e.push(Z6(t,n,3));const o=pl("paragraph_close","p",-1,2);o.hidden=!0,e.push(o);const r=pl("list_item_close","li",-1,1);return r.markup="-",e.push(r),i}function D6e(e){const t=pl("bullet_list_close","ul",-1,0);t.markup="-",e.push(t)}function $6e(e,t,n,i){if(!V_(e,t,n))return null;const s=e.slice(t+3,n);if(s.includes("`"))return null;const o=n<e.length?n+1:n;let r=o,l=o,a=i+1;for(;l<e.length;){const u=X1(e,l);if(V_(e,l,u)&&s2(e,l+3,u)){const c=pl("fence","code",0,0);return c.map=[i,a+1],c.markup="```",c.info=s,c.content=e.slice(o,r),{token:c,nextPos:u<e.length?u+1:u,nextLine:a+1}}l=u<e.length?u+1:u,r=l,a++}return null}function B6e(e,t){if(e.length===0)return t&&(t.matched=!0),[];if(e.includes("\r")||e.includes("\0"))return null;const n=[];let i=e.length>=1e5?Z_:A3,s="",o=!1,r=!1,l=0,a=0;for(;l<e.length;){const u=X1(e,l);if(l===u){l=u<e.length?u+1:u,a++;continue}const c=e.charCodeAt(l);if(c===32||c===9){if(!s2(e,l,u))return null;l=u<e.length?u+1:u,a++;continue}if(c===35){if(!E6e(n,e,l,u,a))return null;t&&(t.blocks++,t.headings++);const g=u<e.length?u+1:u;l=C3(e,g),a+=1+l-g;continue}if(c===45){if(!k3(e,l,u))return null;const g=a;let m=l,y=a,A=null,b=null;for(;m<e.length;){const x=X1(e,m);if(!k3(e,m,x))break;const S=m+2,_=x===S+1?e[S]:e.slice(S,x);if(!_6e(_))return null;A===null&&(A=N6e(n,g)),b=F6e(n,_,y),m=x<e.length?x+1:x,y++}if(A===null||b===null)return null;let C=m,v=y;for(;C<e.length;){if(e.charCodeAt(C)===10){C++,v++;continue}const x=X1(e,C);if(!s2(e,C,x)){if(k3(e,C,x))return null;break}C=x<e.length?x+1:x,v++}A.map[1]=v,b.map[1]=v,D6e(n),t&&(t.blocks++,t.lists++),l=C,a=v;continue}if(c===96){const g=$6e(e,l,u,a);if(!g)return null;n.push(g.token),t&&(t.blocks++,t.fences++),l=C3(e,g.nextPos),a=g.nextLine+l-g.nextPos;continue}const d=L6e(e,l,u);let f;if(i===A3?(t&&t.paragraphCacheBypasses++,f=Tv(d)):i===b3&&d===s?(t&&t.paragraphCacheHits++,f=o):(t&&t.paragraphCacheMisses++,f=Tv(d),i===Z_?(r&&(i=d===s?b3:A3),s=d,o=f,r=!0):i===b3&&(s=d,o=f)),!f)return null;const h=u<e.length?u+1:u;if(h<e.length&&e.charCodeAt(h)!==10&&!s2(e,h,X1(e,h)))return null;T6e(n,d,a),t&&(t.blocks++,t.paragraphs++),l=C3(e,h),a+=1+l-h}return t&&(t.matched=!0),n}const z6e=/[&<>"]/,G_=/[&<>"]/g,R6e=/&/g,O6e=/[<>"]/g,P6e={"&":"&","<":"<",">":">",'"':"""};function w3(e){return P6e[e]||e}function ki(e){if(e.length===0)return"";if(e.length<32)return z6e.test(e)?e.replace(G_,w3):e;const t=e.includes("&"),n=e.includes("<"),i=e.includes(">"),s=e.includes('"');return!t&&!n&&!i&&!s?e:t&&!n&&!i&&!s?e.replace(R6e,"&"):t?e.replace(G_,w3):e.replace(O6e,w3)}const j6e=new RegExp(`${/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),H6e=/^#(?:x[a-f0-9]{1,8}|\d{1,8})$/i;function Cz(e){return!e.includes("\\")&&!e.includes("&")?e:e.replace(j6e,(t,n,i)=>{if(n)return n;if(H6e.test(i)){const o=i[1].toLowerCase()==="x"?Number.parseInt(i.slice(2),16):Number.parseInt(i.slice(1),10);return t9(o)?u0(o):"�"}const s=F6(t);return s!==t?s:t})}const W6e=/[\n!#$%&*+\-:<=>@[\]\\^_`{}~]/,q6e=/[\n!"#$%&*+\-:<=>@[\]\\^_`{}~]/,U6e=/"/g;function Jf(e,t){const n=e.indexOf(` +`,t);return n===-1?e.length:n}function Lv(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9)return!1}return!0}function ym(e,t){for(;t<e.length&&e.charCodeAt(t)===10;)t++;return t}function K6e(e,t){return t>=e.length||e.charCodeAt(t)===10?!1:!Lv(e,t,Jf(e,t))}function Q_(e,t,n){return t+2<n&&e.charCodeAt(t)===96&&e.charCodeAt(t+1)===96&&e.charCodeAt(t+2)===96}function V6e(e,t,n){const i=e.charCodeAt(n-1);return i===32||i===9?e.slice(t,n).trim():e.slice(t,n)}function G6(e){return q6e.test(e)?W6e.test(e)?null:e.replace(U6e,"""):e}function Z6e(e,t,n){let i=0,s=t;for(;s<n&&e.charCodeAt(s)===35&&i<6;)s++,i++;if(i===0||s>=n||e.charCodeAt(s)!==32)return null;let o=s+1;for(;o<n&&e.charCodeAt(o)===32;)o++;let r=n;for(;r>o&&e.charCodeAt(r-1)===32;)r--;let l=r;for(;l>o&&e.charCodeAt(l-1)===35;)l--;if(l>o&&e.charCodeAt(l-1)===32)for(r=l-1;r>o&&e.charCodeAt(r-1)===32;)r--;const a=G6(e.slice(o,r));return a===null?null:`<h${i}>${a}</h${i}> +`}function Y_(e,t,n){return t+1<n&&e.charCodeAt(t)===45&&e.charCodeAt(t+1)===32}function G6e(e,t){switch(e.charCodeAt(t)){case 34:return`<li>"</li> +`;case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return null}return`<li>${e[t]}</li> +`}function Q6e(e,t,n){const i=t+2;if(n===i+1)return G6e(e,i);const s=G6(e.slice(t+2,n));return s===null?null:`<li>${s}</li> +`}function Y6e(e,t,n){for(;t<n;){const s=e.charCodeAt(t);if(s!==32&&s!==9)break;t++}for(;n>t;){const s=e.charCodeAt(n-1);if(s!==32&&s!==9)break;n--}let i=n;for(let s=t;s<n;s++){const o=e.charCodeAt(s);if(o===96)return null;if(o===32||o===9){i=s;break}}return e.slice(t,i)}function J6e(e,t,n,i,s){if(!Q_(e,t,n))return null;const o=Y6e(e,t+3,n);if(o===null)return null;const r=n<e.length?n+1:n;let l=r,a=r;for(;a<e.length;){const u=Jf(e,a);if(Q_(e,a,u)&&Lv(e,a+3,u)){const c=e.slice(r,l);let d;return o===i.lang?(s&&s.fenceCacheHits++,d=i.open):(s&&s.fenceCacheMisses++,d=o?`<pre><code class="language-${ki(o)}">`:"<pre><code>",i.lang=o,i.open=d),{html:`${d}${ki(c)}</code></pre> +`,nextPos:u<e.length?u+1:u}}a=u<e.length?u+1:u,l=a}return null}function wz(e,t){if(e.length===0)return t&&(t.matched=!0),"";if(e.includes("\r")||e.includes("\0"))return null;let n=0,i="";const s=e.length>=25e4,o=[],r={lang:null,open:""};let l="",a="",u="",c="";for(;n<e.length;){const d=Jf(e,n);if(n===d){n=d<e.length?d+1:d;continue}const f=e.charCodeAt(n);if(f===32||f===9){if(!Lv(e,n,d))return null;n=d<e.length?d+1:d;continue}if(f===35){const y=Z6e(e,n,d);if(y===null)return null;t&&(t.blocks++,t.headings++),s?o.push(y):i+=y,n=ym(e,d<e.length?d+1:d);continue}if(f===45){let y=n;for(;y<e.length;){const v=Jf(e,y);if(!Y_(e,y,v))break;y=v<e.length?v+1:v}if(y===n)return null;const A=e.slice(n,y);let b;if(A===l)t&&t.listCacheHits++,b=a;else{t&&t.listCacheMisses++;let v=n;for(b=`<ul> +`;v<y;){const x=Jf(e,v),S=Q6e(e,v,x);if(S===null)return null;b+=S,v=x<e.length?x+1:x}b+=`</ul> +`,l=A,a=b}let C=ym(e,y);for(;C<e.length;){if(e.charCodeAt(C)===10){C++;continue}const v=Jf(e,C);if(!Lv(e,C,v)){if(Y_(e,C,v))return null;break}C=v<e.length?v+1:v}t&&(t.blocks++,t.lists++),s?o.push(b):i+=b,n=C;continue}if(f===96){const y=J6e(e,n,d,r,t);if(!y)return null;t&&(t.blocks++,t.fences++),s?o.push(y.html):i+=y.html,n=ym(e,y.nextPos);continue}const h=V6e(e,n,d);let g;if(h===u)t&&t.paragraphCacheHits++,g=c;else{t&&t.paragraphCacheMisses++;const y=G6(h);if(y===null)return null;g=`<p>${y}</p> +`,u=h,c=g}const m=d<e.length?d+1:d;if(m<e.length&&e.charCodeAt(m)!==10&&K6e(e,m))return null;t&&(t.blocks++,t.paragraphs++),s?o.push(g):i+=g,n=ym(e,m)}return t&&(t.matched=!0),s?o.join(""):i}function J_(e){return wz(e)}function X_(e,t){return wz(e,t)}const X6e={maxChunkChars:1e4,maxChunkLines:200,fenceAware:!0,maxChunks:void 0,fallbackOnGlobalState:!0};function Nv(e,t,n={},i){er(n);const s={...X6e,...i||{}},o=yr(t);if(s.fallbackOnGlobalState!==!1&&o)return p3(n,{count:1,fallback:!0,fallbackReason:o,globalStateDetected:o,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),mh(n,o,()=>e.core.parse(t,n,e).tokens);let r=o2(t,s);if(s.maxChunks&&r.length>s.maxChunks&&(r=i7e(r,s.maxChunks)),r2(t,r))return p3(n,{count:1,fallback:!0,fallbackReason:"unsafe-chunk-boundary",maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines}),mh(n,o,()=>e.core.parse(t,n,e).tokens);let l=0;const a=[];return p3(n,{count:r.length,maxChunkChars:s.maxChunkChars,maxChunkLines:s.maxChunkLines,globalStateDetected:o||void 0,globalStateFallbackDisabled:s.fallbackOnGlobalState===!1&&!!o}),mh(n,o,()=>{for(let u=0;u<r.length;u++){const c=r[u],d=t.slice(c.start,c.end),f=e.core.parse(d,n,e).tokens;l!==0&&f.length&&t7e(f,l),n7e(a,f),l+=c.lineCount}return a})}function o2(e,t,n=!0){const i=[];let s=0,o=0,r=0,l=0,a=0,u=0,c=null;function d(f){f<=r||(i.push({start:r,end:f,lineCount:l}),r=f,s=0,o=0,l=0)}for(let f=0;f<e.length;){let h=e.indexOf(` +`,f),g=h;h===-1?(h=e.length,g=e.length):g=h+1;const m=s7e(e,f,h);if(t.fenceAware){let b=f;for(;b<h;){const v=e.charCodeAt(b);if(v===32||v===9)b++;else break}const C=e[b];if(C==="`"||C==="~"){let v=b;for(;v<h&&e[v]===C;)v++;const x=v-b;x>=3&&(c?c.marker===C&&x>=c.length&&(c=null):c={marker:C,length:x})}}const y=g-f;s+=y,o+=1,l+=1,m?(a=0,u=0):(a+=1,u+=y);const A=m;if((s>=t.maxChunkChars||o>=t.maxChunkLines)&&!c)if(A)d(g);else{const b=Math.max(10,Math.floor(t.maxChunkLines*.5)),C=Math.max(t.maxChunkChars,8e3);(a>=b||u>=C)&&d(g)}f=g}return n&&d(e.length),i}function r2(e,t,n={rangesCoverWholeSource:!0}){const i=n.rangesCoverWholeSource?t.length-1:t.length;for(let s=0;s<i;s++)if(!e7e(e,t[s].end))return!0;return!1}function e7e(e,t){if(t<=0||t>e.length||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;for(let i=n+1;i<t-1;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}function t7e(e,t){if(t===0)return;const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function n7e(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function i7e(e,t){if(e.length<=t)return e;const n=[];let i=0;for(let s=0;s<t;s++){const o=t-s,r=e.length-i,l=Math.ceil(r/o),a=e.slice(i,i+l);let u=0;for(let c=0;c<a.length;c++)u+=a[c].lineCount;n.push({start:a[0].start,end:a[a.length-1].end,lineCount:u}),i+=l}return n}function s7e(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}const xz=4e6,Sz=8e4,o7e=1e4,r7e=200,l7e=1e4,a7e=200;function _z(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function u7e(e,t){if(t===0)return;const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);for(;n.length;){const i=n.pop();if(i.map&&(i.map[0]+=t,i.map[1]+=t),i.children)for(let s=i.children.length-1;s>=0;s--)n.push(i.children[s])}}function wu(e){return e.length===0?0:ps(e)+(e.charCodeAt(e.length-1)===10?0:1)}function c7e(e,t,n){for(let i=t;i<n;i++){const s=e.charCodeAt(i);if(s!==32&&s!==9&&s!==13)return!1}return!0}function d7e(e,t){if(!t||e.length===0)return!1;let n=null;for(let i=0;i<e.length;){let s=e.indexOf(` +`,i);s===-1&&(s=e.length);let o=i;for(;o<s;){const l=e.charCodeAt(o);if(l===32||l===9)o++;else break}const r=e[o];if(r==="`"||r==="~"){let l=o;for(;l<s&&e[l]===r;)l++;const a=l-o;a>=3&&(n?n.marker===r&&a>=n.length&&(n=null):n={marker:r,length:a})}i=s===e.length?e.length:s+1}return n!==null}function f7e(e,t){if(e.length===0||e.charCodeAt(e.length-1)!==10)return!1;let n=e.length-2;for(;n>=0&&e.charCodeAt(n)!==10;)n--;return c7e(e,n+1,e.length-1)?!d7e(e,t):!1}function h7e(e,t,n,i={}){const s=i.mode??"full",o=i.fenceAware??(s==="stream"?e.options.streamChunkFenceAware??!0:e.options.fullChunkFenceAware??!0);if(i.maxChunkChars!==void 0||i.maxChunkLines!==void 0||i.autoTune===!1){const r=i.maxChunkChars??(s==="stream"?e.options.streamChunkSizeChars??l7e:e.options.fullChunkSizeChars??o7e),l=i.maxChunkLines??(s==="stream"?e.options.streamChunkSizeLines??a7e:e.options.fullChunkSizeLines??r7e);return{maxChunkChars:r,maxChunkLines:l,holdBelowChars:r,holdBelowLines:l,fenceAware:o}}return s==="stream"?t<=5e3?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=2e4?{maxChunkChars:16e3,maxChunkLines:200,holdBelowChars:16e3,holdBelowLines:200,fenceAware:o}:t<=5e4?{maxChunkChars:16e3,maxChunkLines:250,holdBelowChars:16e3,holdBelowLines:250,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}:t<=1e5&&n<=2500?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:1e5,holdBelowLines:2500,fenceAware:o}:t<=2e5?{maxChunkChars:2e4,maxChunkLines:150,holdBelowChars:2e4,holdBelowLines:150,fenceAware:o}:t<=5e5?{maxChunkChars:32e3,maxChunkLines:350,holdBelowChars:32e3,holdBelowLines:350,fenceAware:o}:{maxChunkChars:64e3,maxChunkLines:700,holdBelowChars:64e3,holdBelowLines:700,fenceAware:o}}var V0=class{md;options;pending="";tokens=[];committedChars=0;committedLines=0;fedChunks=0;parsedChunks=0;globalStateEnv=null;markedGlobalStateReason=null;constructor(e,t={}){if(this.md=e,this.options={mode:"full",autoTune:!0,retainTokens:!0,...t},this.options.retainTokens===!1&&!this.options.onChunkTokens)throw new Error("UnboundedBuffer with retainTokens=false requires onChunkTokens")}feed(e){e&&(this.pending+=e,this.fedChunks+=1)}flushAvailable(e={}){if(!this.pending)return null;const t=this.resolveWindow(),n=wu(this.pending);if(this.pending.length<t.holdBelowChars&&n<t.holdBelowLines)return this.updateEnvDiagnostics(e,t,n),null;const i=o2(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!1);if(!i.length)return this.updateEnvDiagnostics(e,t,n),null;if(r2(this.pending,i,{rangesCoverWholeSource:!1}))return this.updateEnvDiagnostics(e,t,n),null;const s=this.commitRanges(i,e);return this.pending=this.pending.slice(s),this.updateEnvDiagnostics(e,t,wu(this.pending)),this.tokens}flushIfBoundary(e={}){if(!this.pending)return null;const t=this.resolveWindow();if(!f7e(this.pending,t.fenceAware))return this.updateEnvDiagnostics(e,t,wu(this.pending)),null;const n=o2(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!0);if(!n.length)return this.updateEnvDiagnostics(e,t,wu(this.pending)),null;const i=r2(this.pending,n,{rangesCoverWholeSource:!0})?[{start:0,end:this.pending.length,lineCount:wu(this.pending)}]:n;return this.commitRanges(i,e),this.pending="",this.updateEnvDiagnostics(e,t,0),this.tokens}flushForce(e={}){if(!this.pending){this.prepareGlobalStateEnv(e,"");const i=this.resolveWindow();return this.updateEnvDiagnostics(e,i,0),this.tokens}const t=this.resolveWindow(),n=o2(this.pending,{maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,fenceAware:t.fenceAware},!0);if(n.length){const i=r2(this.pending,n,{rangesCoverWholeSource:!0})?[{start:0,end:this.pending.length,lineCount:wu(this.pending)}]:n;this.commitRanges(i,e),this.pending=""}return this.updateEnvDiagnostics(e,t,0),this.tokens}reset(){this.pending="",this.tokens=[],this.committedChars=0,this.committedLines=0,this.fedChunks=0,this.parsedChunks=0,this.globalStateEnv=null,this.markedGlobalStateReason=null}peek(){return this.tokens}pendingText(){return this.pending}stats(){return{mode:this.options.mode??"full",fedChunks:this.fedChunks,parsedChunks:this.parsedChunks,committedChars:this.committedChars,committedLines:this.committedLines,pendingChars:this.pending.length,pendingLines:wu(this.pending),retainedTokens:this.options.retainTokens!==!1}}resolveWindow(){const e=this.committedChars+this.pending.length,t=this.committedLines+wu(this.pending);return h7e(this.md,e,t,this.options)}prepareGlobalStateEnv(e,t){if(this.globalStateEnv!==e&&(U0(e)&&ru(e),this.globalStateEnv=e,this.markedGlobalStateReason=null),this.markedGlobalStateReason)return;const n=yr(t);n&&(P6(e,n),this.markedGlobalStateReason=n)}commitRanges(e,t){if(!e.length)return 0;this.prepareGlobalStateEnv(t,this.pending);let n=0;try{for(let i=0;i<e.length;i++){const s=e[i],o=this.pending.slice(s.start,s.end),r=this.md.core.parse(o,t,this.md).tokens,l=this.committedChars,a=this.committedLines;a!==0&&r.length&&u7e(r,a),this.options.retainTokens!==!1&&_z(this.tokens,r),this.committedChars+=o.length,this.committedLines+=s.lineCount,this.parsedChunks+=1,this.options.onChunkTokens&&this.options.onChunkTokens(r,{chunkIndex:this.parsedChunks,chunkChars:o.length,chunkLines:s.lineCount,tokenCount:r.length,startOffset:l,endOffset:this.committedChars,startLine:a,endLine:this.committedLines}),n=s.end}return this.markedGlobalStateReason&&j6(t),n}catch(i){throw this.markedGlobalStateReason&&(ru(t),this.globalStateEnv=null,this.markedGlobalStateReason=null),i}}updateEnvDiagnostics(e,t,n){zB(e,{mode:this.options.mode??"full",maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,committedChars:this.committedChars,committedLines:this.committedLines,pendingChars:this.pending.length,pendingLines:n,fedChunks:this.fedChunks,parsedChunks:this.parsedChunks,globalStateDetected:this.markedGlobalStateReason||void 0})}};function p7e(e,t,n={},i={}){er(n);const s=new V0(e,{mode:"full",...i});for(const o of t)s.feed(o),s.flushAvailable(n);return s.flushForce(n)}async function g7e(e,t,n={},i={}){er(n);const s=new V0(e,{mode:"full",...i});for await(const o of t)s.feed(o),s.flushAvailable(n);return s.flushForce(n)}function m7e(e,t,n,i={},s={}){er(i);const o=new V0(e,{mode:"full",...s,retainTokens:!1,onChunkTokens:n});for(const r of t)o.feed(r),o.flushAvailable(i);return o.flushForce(i),o.stats()}async function v7e(e,t,n,i={},s={}){er(i);const o=new V0(e,{mode:"full",...s,retainTokens:!1,onChunkTokens:n});for await(const r of t)o.feed(r),o.flushAvailable(i);return o.flushForce(i),o.stats()}function Iz(e,t,n){if(e.options.autoUnbounded===!1)return!1;const i=e.options.autoUnboundedThresholdChars??xz,s=e.options.autoUnboundedThresholdLines??Sz;return t>=i||n>=s}function Mz(e,t,n){if(e.options.autoUnbounded===!1)return"no";if(t>=(e.options.autoUnboundedThresholdChars??xz))return"yes";const i=e.options.autoUnboundedThresholdLines??Sz;return n!==void 0?n>=i?"yes":"no":t+1<i?"no":"need-lines"}function kp(e,t,n={},i={}){er(n);const s=yr(t);if(U0(n)&&ru(n),i.fallbackOnGlobalState!==!1&&s)return zB(n,{mode:"full",fallback:!0,fallbackReason:s,committedChars:t.length,committedLines:ps(t),pendingChars:0,pendingLines:0,fedChunks:1,parsedChunks:1,globalStateDetected:s}),mh(n,s,()=>e.core.parse(t,n,e).tokens);const o=[],r=new V0(e,{mode:"full",...i,retainTokens:!1,onChunkTokens(l){_z(o,l)}});if(s&&P6(n,s),r.feed(t),r.flushForce(n),s&&(j6(n),i.fallbackOnGlobalState===!1)){const l=Pa(n)?.unbounded;l&&(l.globalStateDetected=s,l.globalStateFallbackDisabled=!0)}return o}const yh=(e,t,n)=>e<t?t:e>n?n:e;function Ez(e){return e.experimental?{...e,...e.experimental}:e}const eI=[{max:5e3,strategy:"discrete",maxChunkChars:32e3,maxChunkLines:150,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:24e3,maxChunkLines:200,maxChunks:12,notes:"<=20k"},{max:1e5,strategy:"plain",notes:"<=100k plain"},{max:2e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:150,maxChunks:12,notes:"<=200k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:16,notes:"<=5M"}],tI=[{max:5e3,strategy:"discrete",maxChunkChars:16e3,maxChunkLines:250,maxChunks:8,notes:"<=5k"},{max:2e4,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=20k"},{max:1e5,strategy:"discrete",maxChunkChars:2e4,maxChunkLines:200,maxChunks:24,notes:"<=100k"},{max:5e5,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=500k"},{max:5e6,strategy:"discrete",maxChunkChars:64e3,maxChunkLines:700,maxChunks:32,notes:"<=5M"}];function Tz(e,t){return{strategy:t.strategy,maxChunkChars:t.maxChunkChars,maxChunkLines:t.maxChunkLines,maxChunks:t.maxChunks,fenceAware:e,notes:t.notes}}function y7e(e,t=Math.max(0,e/40|0),n={}){const i=Ez(n),s=i.fullChunkFenceAware??!0,o=i.fullChunkTargetChunks??8,r=i.fullChunkAdaptive!==!1;for(let l=0;l<eI.length;l++){const a=eI[l];if(e<=a.max){if(a.strategy!=="adaptive")return Tz(s,a);break}}return e>5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:yh(Math.ceil(e/o),8e3,64e3),maxChunkLines:yh(Math.ceil(t/o),150,700),maxChunks:yh(Math.ceil(e/64e3),o,16),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.fullChunkSizeChars??1e4,maxChunkLines:i.fullChunkSizeLines??200,fenceAware:s,maxChunks:i.fullChunkMaxChunks}}function nI(e,t=Math.max(0,e/40|0),n={}){const i=Ez(n),s=i.streamChunkFenceAware??!0,o=i.streamChunkTargetChunks??8,r=i.streamChunkAdaptive!==!1;for(let l=0;l<tI.length;l++){const a=tI[l];if(e<=a.max){if(a.strategy!=="adaptive")return Tz(s,a);break}}return e>5e6?{strategy:"plain",fenceAware:s,notes:">5M plain"}:r?{strategy:"adaptive",maxChunkChars:yh(Math.ceil(e/o),8e3,64e3),maxChunkLines:yh(Math.ceil(t/o),150,700),maxChunks:yh(Math.ceil(e/64e3),o,32),fenceAware:s,notes:"adaptive fallback"}:{strategy:"discrete",maxChunkChars:i.streamChunkSizeChars??1e4,maxChunkLines:i.streamChunkSizeLines??200,maxChunks:i.streamChunkMaxChunks,fenceAware:s}}var k7e={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"]},inline2:{rules:["balance_pairs","emphasis","fragments_join"]}}},b7e={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},A7e={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"]},inline2:{rules:["balance_pairs","fragments_join"]}}};function i9(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"}function l2(e,t){if(i9(e))throw new TypeError(`Renderer rule "${t}" returned a Promise. Use renderAsync() instead.`);return e}const iI=e=>i9(e)?e:Promise.resolve(e);function bp(e){switch(e){case"alt":case"class":case"href":case"id":case"lang":case"rel":case"src":case"start":case"style":case"target":case"title":return e;default:return ki(e)}}function cc(e){if(!e||e.length===0)return"";const t=e[0];let n=` ${bp(t[0])}="${ki(t[1])}"`;for(let i=1;i<e.length;i++){const s=e[i];n+=` ${bp(s[0])}="${ki(s[1])}"`}return n}function Lz(e){if(!e)return{langName:"",langAttrs:""};let t=0;for(;t<e.length;){const i=e.charCodeAt(t);if(i===32||i===9||i===10)break;t++}if(t>=e.length)return{langName:e,langAttrs:""};let n=t;for(;n<e.length;){const i=e.charCodeAt(n);if(i!==32&&i!==9&&i!==10)break;n++}return{langName:e.slice(0,t),langAttrs:n<e.length?e.slice(n):""}}function Ap(e,t,n,i,s){if(t.indexOf("<pre")===0)return`${t} +`;if(n){if(!e.attrs||e.attrs.length===0)return`<pre><code class="${ki(`${s.langPrefix??"language-"}${i}`)}">${t}</code></pre> +`;const o=e.attrIndex("class"),r=e.attrs?e.attrs.slice():[],l=`${s.langPrefix??"language-"}${i}`;return o<0?r.push(["class",l]):(r[o]=r[o].slice(),r[o][1]+=` ${l}`),`<pre><code${cc(r)}>${t}</code></pre> +`}return`<pre><code${cc(e.attrs)}>${t}</code></pre> +`}function d0(e){return!e.attrs||e.attrs.length===0?`<code>${ki(e.content)}</code>`:`<code${cc(e.attrs)}>${ki(e.content)}</code>`}function o8(e){const t=ki(e.content);return e.attrs?`<pre${cc(e.attrs)}><code>${t}</code></pre> +`:`<pre><code>${t}</code></pre> +`}function C7e(e,t){const n=e.attrs;if(!n||n.length===0)switch(e.type){case"paragraph_open":return`${t}<p>`;case"heading_open":return`<${e.tag}>`;case"td_open":return`${t}<td>`;case"th_open":return`${t}<th>`;default:return null}if(n.length===1&&n[0][0]==="style"){if(e.type==="td_open")return`${t}<td style="${ki(n[0][1])}">`;if(e.type==="th_open")return`${t}<th style="${ki(n[0][1])}">`}return null}function sI(e){const t=e.attrs;return!t||t.length===0?"<a>":t.length===1?`<a ${bp(t[0][0])}="${ki(t[0][1])}">`:t.length===2?`<a ${bp(t[0][0])}="${ki(t[0][1])}" ${bp(t[1][0])}="${ki(t[1][1])}">`:`<a${cc(t)}>`}function w7e(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":case"image":return!0;default:return!1}}function oI(e){switch(e.type){case"text":case"text_special":case"softbreak":case"hardbreak":case"html_inline":case"code_inline":return!0;default:return!1}}function Fv(e,t){if(e.hidden)return"";const n=e.attrs,i=e.nesting,s=e.tag;if(!n||n.length===0)return i===0?t?`<${s} />`:`<${s}>`:i===-1?`</${s}>`:`<${s}>`;let o=(i===-1?"</":"<")+s+cc(n);return i===0&&t&&(o+=" /"),`${o}>`}const x7e={langPrefix:"language-",xhtmlOut:!1,breaks:!1},km=Object.prototype.hasOwnProperty,Yn={code_inline(e,t){return d0(e[t])},code_block(e,t){return o8(e[t])},fence(e,t,n,i,s){const o=e[t],r=o.info?Cz(o.info).trim():"",{langName:l,langAttrs:a}=Lz(r),u=n.highlight,c=ki(o.content);if(!u)return Ap(o,c,r,l,n);const d=u(o.content,l,a);return i9(d)?d.then(f=>Ap(o,f||c,r,l,n)):Ap(o,d||c,r,l,n)},image(e,t,n,i,s){const o=e[t],r=s.renderInlineAsText(o.children||[],n,i),l=o.attrIndex("alt");return l>=0&&o.attrs?o.attrs[l][1]=r:o.attrs?o.attrs.push(["alt",r]):o.attrs=[["alt",r]],Fv(o,n.xhtmlOut===!0)},hardbreak(e,t,n){return n.xhtmlOut?`<br /> +`:`<br> +`},softbreak(e,t,n){return n.breaks?n.xhtmlOut?`<br /> +`:`<br> +`:` +`},text(e,t){return ki(e[t].content)},text_special(e,t){return ki(e[t].content)},html_block(e,t){return e[t].content},html_inline(e,t){return e[t].content}};function rI(e,t,n){const i=e.info?Cz(e.info).trim():"",{langName:s,langAttrs:o}=Lz(i),r=t.highlight,l=ki(e.content);if(!r)return Ap(e,l,i,s,t);const a=r(e.content,s,o);if(i9(a))throw new TypeError('Renderer rule "fence" returned a Promise. Use renderAsync() instead.');return Ap(e,a||l,i,s,t)}function x3(e,t,n,i){switch(e.type){case"text":return t.text===Yn.text?e.content.length===0?"":ki(e.content):null;case"text_special":return t.text_special===Yn.text_special?e.content.length===0?"":ki(e.content):null;case"softbreak":return t.softbreak===Yn.softbreak?i:null;case"hardbreak":return t.hardbreak===Yn.hardbreak?n:null;case"html_inline":return t.html_inline===Yn.html_inline?e.content:null;case"code_inline":return t.code_inline===Yn.code_inline?d0(e):null;default:return null}}function S7e(e,t,n,i,s){const o=e[0];switch(o.type){case"text":if(s.text===Yn.text)return o.content.length===0?"":ki(o.content);break;case"text_special":if(s.text_special===Yn.text_special)return o.content.length===0?"":ki(o.content);break;case"softbreak":if(s.softbreak===Yn.softbreak)return t.breaks?t.xhtmlOut?`<br /> +`:`<br> +`:` +`;break;case"hardbreak":if(s.hardbreak===Yn.hardbreak)return t.xhtmlOut?`<br /> +`:`<br> +`;break;case"html_inline":if(s.html_inline===Yn.html_inline)return o.content;break;case"code_inline":if(s.code_inline===Yn.code_inline)return d0(o);break}const r=s[o.type];if(!r)return Fv(o,t.xhtmlOut===!0);const l=r(e,0,t,n,i);return typeof l=="string"?l:l2(l,o.type)}var _7e=class{rules;baseOptions;normalizedBase;constructor(e={}){this.baseOptions={...e},this.normalizedBase=this.buildNormalizedBase(),this.rules={...Yn}}set(e){return this.baseOptions={...this.baseOptions,...e},this.normalizedBase=this.buildNormalizedBase(),this}render(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");if(e.length===1)return this.renderSingleToken(e,e[0],t,n);const i=this.mergeOptions(t),s=n??{},o=this.rules,r=i.xhtmlOut===!0;let l,a,u,c,d,f,h="",g="",m=!1,y="";for(let A=0;A<e.length;A++){const b=e[A],C=b.type,v=A>0&&e[A-1].hidden?` +`:"";if(C==="list_item_open"&&(!b.attrs||b.attrs.length===0)&&A+3<e.length){const _=e[A+1],I=e[A+2],M=e[A+3];if(_.type==="paragraph_open"&&_.hidden&&I.type==="inline"&&M.type==="paragraph_close"&&M.hidden){y+=`${v}<li>${this.renderInlineTokens(I.children||[],i,s)}`,A+=3;continue}}if(A+2<e.length){const _=e[A+1],I=e[A+2];if(_.type==="inline"&&I.nesting===-1&&I.tag===b.tag&&!I.hidden){const M=C7e(b,v);if(M!==null){y+=`${M+this.renderInlineTokens(_.children||[],i,s)}</${b.tag}> +`,A+=2;continue}}}if(C==="inline"){const _=b.children||[];if(_.length===1){m||(l=o.text,a=o.text_special,u=o.softbreak,c=o.hardbreak,d=o.html_inline,f=o.code_inline,h=i.xhtmlOut?`<br /> +`:`<br> +`,g=i.breaks?h:` +`,m=!0);const I=_[0];switch(I.type){case"text":if(l===Yn.text){y+=ki(I.content);continue}break;case"text_special":if(a===Yn.text_special){y+=ki(I.content);continue}break;case"softbreak":if(u===Yn.softbreak){y+=g;continue}break;case"hardbreak":if(c===Yn.hardbreak){y+=h;continue}break;case"html_inline":if(d===Yn.html_inline){y+=I.content;continue}break;case"code_inline":if(f===Yn.code_inline){y+=d0(I);continue}break}}y+=this.renderInlineTokens(_,i,s);continue}const x=o[C];if(!x){const _=b.attrs;if(!b.hidden){if(!_||_.length===0)switch(C){case"hr":y+=r?`<hr /> +`:`<hr> +`;continue;case"heading_open":y+=`<${b.tag}>`;continue;case"heading_close":y+=`</${b.tag}> +`;continue;case"paragraph_open":y+=`${v}<p>`;continue;case"paragraph_close":y+=`</p> +`;continue;case"list_item_open":{const I=e[A+1];y+=v+(I&&(I.type==="inline"||I.hidden||I.nesting===-1&&I.tag==="li")?"<li>":`<li> +`);continue}case"list_item_close":y+=`</li> +`;continue;case"bullet_list_open":y+=`${v}<ul> +`;continue;case"bullet_list_close":y+=`</ul> +`;continue;case"blockquote_open":y+=v+(e[A+1]&&e[A+1].nesting===-1&&e[A+1].tag==="blockquote"?"<blockquote>":`<blockquote> +`);continue;case"blockquote_close":y+=`</blockquote> +`;continue;case"ordered_list_open":y+=`${v}<ol> +`;continue;case"ordered_list_close":y+=`</ol> +`;continue;case"table_open":y+=`${v}<table> +`;continue;case"table_close":y+=`</table> +`;continue;case"thead_open":y+=`${v}<thead> +`;continue;case"thead_close":y+=`</thead> +`;continue;case"tbody_open":y+=`${v}<tbody> +`;continue;case"tbody_close":y+=`</tbody> +`;continue;case"tr_open":y+=`${v}<tr> +`;continue;case"tr_close":y+=`</tr> +`;continue;case"td_open":y+=`${v}<td>`;continue;case"td_close":y+=`</td> +`;continue;case"th_open":y+=`${v}<th>`;continue;case"th_close":y+=`</th> +`;continue}else if(_.length===1){const I=_[0];if(C==="ordered_list_open"&&I[0]==="start"){y+=`${v}<ol start="${ki(I[1])}"> +`;continue}if(C==="td_open"&&I[0]==="style"){y+=`${v}<td style="${ki(I[1])}">`;continue}if(C==="th_open"&&I[0]==="style"){y+=`${v}<th style="${ki(I[1])}">`;continue}}}y+=this.renderToken(e,A,i);continue}if(C==="code_block"&&x===Yn.code_block){y+=o8(b);continue}if(C==="fence"&&x===Yn.fence){y+=rI(b,i);continue}if(C==="html_block"&&x===Yn.html_block){y+=b.content;continue}const S=x(e,A,i,s,this);typeof S=="string"?y+=S:y+=l2(S,b.type)}return y}async renderAsync(e,t,n){if(!Array.isArray(e))throw new TypeError("render expects token array as first argument");const i=this.mergeOptions(t),s=n??{},o=this.rules;let r="";for(let l=0;l<e.length;l++){const a=e[l];if(a.type==="inline"){r+=await this.renderInlineTokensAsync(a.children||[],i,s);continue}const u=o[a.type];u?r+=await iI(u(e,l,i,s,this)):r+=this.renderToken(e,l,i)}return r}renderInline(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineTokens(e,i,s)}async renderInlineAsync(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineTokensAsync(e,i,s)}renderInlineAsText(e,t,n){const i=this.mergeOptions(t),s=n??{};return this.renderInlineAsTextInternal(e,i,s)}renderAttrs(e){return cc(e.attrs)}renderToken(e,t,n){const i=e[t];if(i.hidden)return"";const s=i.block,o=i.nesting,r=i.tag,l=i.attrs;let a=!1;if(s&&(a=!0,o===1&&t+1<e.length)){const f=e[t+1];(f.type==="inline"||f.hidden||f.nesting===-1&&f.tag===r)&&(a=!1)}const u=s&&o!==-1&&t>0&&e[t-1].hidden?` +`:"",c=a?`> +`:">";if(!l||l.length===0)return o===0?n.xhtmlOut?`${u}<${r} /${c}`:`${u}<${r}${c}`:o===-1?`${u}</${r}${c}`:`${u}<${r}${c}`;let d=u+(o===-1?"</":"<")+r+cc(l);return o===0&&n.xhtmlOut&&(d+=" /"),d+c}mergeOptions(e){const t=this.normalizedBase;if(!e||e.highlight===t.highlight&&e.langPrefix===t.langPrefix&&e.xhtmlOut===t.xhtmlOut&&e.breaks===t.breaks)return t;let n=null;const i=()=>(n||(n={...t}),n);if(km.call(e,"highlight")&&e.highlight!==t.highlight&&(i().highlight=e.highlight),km.call(e,"langPrefix")){const s=e.langPrefix;s!==t.langPrefix&&(i().langPrefix=s)}if(km.call(e,"xhtmlOut")){const s=e.xhtmlOut;s!==t.xhtmlOut&&(i().xhtmlOut=s)}if(km.call(e,"breaks")){const s=e.breaks;s!==t.breaks&&(i().breaks=s)}return n||t}buildNormalizedBase(){return Object.freeze({...x7e,...this.baseOptions})}renderSingleToken(e,t,n,i){const s=this.rules,o=t.type;if(o==="code_block"&&s.code_block===Yn.code_block)return o8(t);if(o==="html_block"&&s.html_block===Yn.html_block)return t.content;const r=this.mergeOptions(n),l=i??{};if(o==="inline")return this.renderInlineTokens(t.children||[],r,l);const a=s[o];if(!a)return t.block?this.renderToken(e,0,r):Fv(t,r.xhtmlOut===!0);if(o==="fence"&&a===Yn.fence)return rI(t,r);const u=a(e,0,r,l,this);return typeof u=="string"?u:l2(u,o)}renderInlineTokens(e,t,n){if(!e||e.length===0)return"";const i=this.rules;if(e.length===1)return S7e(e,t,n,this,i);const s=t.xhtmlOut===!0,o=s?`<br /> +`:`<br> +`,r=t.breaks?o:` +`,l=i.text,a=i.text_special,u=i.softbreak,c=i.hardbreak,d=i.html_inline,f=i.code_inline,h=i.link_open,g=i.link_close,m=i.em_open,y=i.em_close,A=i.strong_open,b=i.strong_close;let C="";for(let v=0;v<e.length;v++){const x=e[v];if(x.type==="link_open"&&!h&&!g&&v+2<e.length){const I=e[v+1];if(e[v+2].type==="link_close"&&w7e(I)){const M=x3(I,i,o,r);if(M!==null){const $=`${sI(x)+M}</a>`;if(u===Yn.softbreak&&v+3<e.length&&e[v+3].type==="softbreak"){C+=$+r,v+=3;continue}C+=$,v+=2;continue}}}if(x.type==="link_open"&&!h&&!g&&v+1<e.length&&e[v+1].type==="link_close"){C+=`${sI(x)}</a>`,v+=1;continue}if(x.type==="em_open"&&!m&&!y&&v+2<e.length){const I=e[v+1];if(e[v+2].type==="em_close"&&oI(I)){const M=x3(I,i,o,r);if(M!==null){C+=`<em>${M}</em>`,v+=2;continue}}}if(x.type==="strong_open"&&!A&&!b&&v+2<e.length){const I=e[v+1];if(e[v+2].type==="strong_close"&&oI(I)){const M=x3(I,i,o,r);if(M!==null){C+=`<strong>${M}</strong>`,v+=2;continue}}}switch(x.type){case"text":if(l===Yn.text){const I=x.content.length===0?"":ki(x.content);if(d===Yn.html_inline&&v+1<e.length&&e[v+1].type==="html_inline"){for(C+=I+e[++v].content;v+1<e.length&&e[v+1].type==="html_inline";)C+=e[++v].content;continue}C+=I;continue}break;case"text_special":if(a===Yn.text_special){x.content.length!==0&&(C+=ki(x.content));continue}break;case"softbreak":if(u===Yn.softbreak){C+=r;continue}break;case"hardbreak":if(c===Yn.hardbreak){C+=o;continue}break;case"html_inline":if(d===Yn.html_inline){for(C+=x.content;v+1<e.length&&e[v+1].type==="html_inline";)C+=e[++v].content;continue}break;case"code_inline":if(f===Yn.code_inline){C+=d0(x);continue}break}const S=i[x.type];if(!S){C+=x.block?this.renderToken(e,v,t):Fv(x,s);continue}const _=S(e,v,t,n,this);typeof _=="string"?C+=_:C+=l2(_,x.type)}return C}async renderInlineTokensAsync(e,t,n){if(!e||e.length===0)return"";const i=this.rules;let s="";for(let o=0;o<e.length;o++){const r=i[e[o].type];r?s+=await iI(r(e,o,t,n,this)):s+=this.renderToken(e,o,t)}return s}renderInlineAsTextInternal(e,t,n){if(!e||e.length===0)return"";let i="";for(let s=0;s<e.length;s++){const o=e[s];switch(o.type){case"text":case"text_special":i+=o.content;break;case"image":i+=this.renderInlineAsTextInternal(o.children||[],t,n);break;case"html_inline":case"html_block":i+=o.content;break;case"softbreak":case"hardbreak":i+=` +`;break}}return i}},I7e=_7e;const M7e=[],S3=4096;function E7e(e){const t=e.length;let n=0;for(;n<=t;){let i=e.indexOf(` +`,n);i===-1&&(i=t);const s=i<t;let o=n,r=0;for(;o<i;){const l=e.charCodeAt(o);if(l===32){if(r++,o++,r>=4)return!0;continue}if(l===9){if(r+=4-r%4,o++,r>=4)return!0;continue}break}if(o<i){const l=e.charCodeAt(o);switch(l){case 35:{let a=o;for(;a<i&&e.charCodeAt(a)===35;)a++;const u=a-o;if(u>0&&u<=6){if(a<i){const c=e.charCodeAt(a);if(c===32||c===9||c===13)return!0}else if(a===i&&s)return!0}break}case 62:{const a=o+1;if(a<i){const u=e.charCodeAt(a);if(u===32||u===9||u===13)return!0}else if(a===i&&s)return!0;break}case 45:case 42:case 43:{const a=o+1;if(a<i){const u=e.charCodeAt(a);if(u===32||u===9||u===13)return!0}else if(a===i&&s)return!0;break}case 96:case 126:{let a=o;for(;a<i&&e.charCodeAt(a)===l;)a++;if(a-o>=3)return!0;break}default:if(l>=48&&l<=57){let a=o+1;for(;a<i;){const u=e.charCodeAt(a);if(u<48||u>57)break;a++}if(a<i&&e.charCodeAt(a)===46){const u=a+1;if(u<i){const c=e.charCodeAt(u);if(c===32||c===9||c===13)return!0}else if(u===i&&s)return!0}}break}}if(i===t)break;n=i+1}return!1}function T7e(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n][0]!==t[n][0]||e[n][1]!==t[n][1])return!1;return!0}function L7e(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Nz(e[n],t[n]))return!1;return!0}function Nz(e,t){if(!e||!t||e.type!==t.type)return!1;const n=e.map,i=t.map;return!!n!=!!i||n&&i&&(n[0]!==i[0]||n[1]!==i[1])||e.tag!==t.tag||e.nesting!==t.nesting||e.markup!==t.markup||e.info!==t.info||e.block!==t.block||e.hidden!==t.hidden||!T7e(e.attrs,t.attrs)||!L7e(e.children,t.children)?!1:(e.content||"")===(t.content||"")}function lI(){return{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}}var N7e=class{core;cache=null;stats=lI();MIN_SIZE_FOR_OPTIMIZATION=1e3;DEFAULT_SKIP_CACHE_CHARS=1e6;DEFAULT_SKIP_CACHE_LINES=1e5;IMPLICIT_STREAM_CHUNK_MIN_CHARS=16e4;MIN_LIST_LINES_FOR_MERGE=80;MIN_LIST_CHARS_FOR_MERGE=800;MIN_TABLE_LINES_FOR_MERGE=48;MIN_TABLE_CHARS_FOR_MERGE=1200;MIN_UNBOUNDED_APPEND_TOTAL_CHARS=5e5;MIN_UNBOUNDED_APPEND_CHARS=64e3;MIN_UNBOUNDED_APPEND_LINES=700;constructor(e){this.core=e}reset(){this.cache=null,this.stats.resets+=1,this.stats.lastMode="reset"}resetStats(){const{resets:e}=this.stats;this.stats=lI(),this.stats.resets=e}parse(e,t,n){const i=t,s=this.cache;if(er(i??s?.env),!s||i&&i!==s.env){const N=i??{},O=!!n.__explicitStreamChunkFallbackSetting,P=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,R=!!n.options?.streamChunkedFallback,q=!O&&P,j=R||q,W=n.options?.streamChunkAdaptive!==!1,z=n.options?.streamChunkTargetChunks??8,H=n.options?.streamChunkSizeChars,ee=n.options?.streamChunkSizeLines,V=n.options?.streamChunkMaxChunks,ie=!!n.__explicitStreamChunkConfig,se=n.options?.autoTuneChunks!==!1,Z=n.options?.streamChunkFenceAware??!0,pe=n.options?.streamLargeCachePolicy??"retain",re=n.options?.streamSkipCacheAboveChars??this.DEFAULT_SKIP_CACHE_CHARS,fe=n.options?.streamSkipCacheAboveLines??this.DEFAULT_SKIP_CACHE_LINES;let Ee,X=!1;if(pe==="skip"&&(X=e.length>=re,!X&&fe!==void 0&&(Ee=ps(e),X=Ee>=fe)),X){const Y=this.parseFullDocument(e,N,n,Ee,!1);return this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",$s(N,{area:"stream",path:"stream-full",reason:"skip-cache-large-one-shot",unbounded:!!Pa(N)?.unbounded}),Y.tokens}else if(j){const Y=(ge,Ae,_e)=>ge<Ae?Ae:ge>_e?_e:ge;Ee===void 0&&(Ee=ps(e));const le=se&&!ie?nI(e.length,Ee,n.options):null,Ce=le?.maxChunkChars??(W?Y(Math.ceil(e.length/z),8e3,64e3):H??1e4),ae=le?.maxChunkLines??(W?Y(Math.ceil(Ee/z),150,700):ee??200),oe=le?.maxChunks??(W?Y(Math.ceil(e.length/64e3),z,32):V),Q=e.length>0&&e.charCodeAt(e.length-1)===10,ne=q&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&le?.strategy!=="plain";if((R||ne)&&(e.length>=Ce*2||Ee>=ae*2)&&Q){const ge=Nv(n,e,N,{maxChunkChars:Ce,maxChunkLines:ae,fenceAware:le?.fenceAware??Z,maxChunks:oe});return this.cache={src:e,tokens:ge,env:N,lineCount:Ee,lastSegment:void 0,globalStateReason:yr(e)},this.updateCacheLineCount(this.cache,Ee),this.recordChunkedParseResult(N,R?"explicit-initial-large-doc":"default-initial-large-doc"),ge}}const we=this.parseFullDocument(e,N,n,Ee);return Ee=we.lineCount,this.cache={src:e,tokens:we.tokens,env:N,lineCount:Ee,lastSegment:void 0,globalStateReason:yr(e)},this.updateCacheLineCount(this.cache,Ee),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",$s(N,{area:"stream",path:"stream-full",reason:"initial-parse",unbounded:!!Pa(N)?.unbounded}),we.tokens}if(e===s.src)return this.stats.total+=1,this.stats.cacheHits+=1,this.stats.lastMode="cache",$s(s.env,{area:"stream",path:"stream-cache",reason:"same-source"}),s.tokens;const o=e.startsWith(s.src)?e.slice(s.src.length):null;let r=s.globalStateReason;r===void 0&&(r=yr(s.src),s.globalStateReason=r);const l=r?null:o!==null?this.detectGlobalStateForAppend(s,o):yr(e),a=r||l;if(a){const N=i??s.env;ru(N);const O=yr(e),P=this.parseFullDocument(e,N,n),R=P.tokens,q=P.lineCount;return this.cache={src:e,tokens:R,env:N,lineCount:q,lastSegment:void 0,globalStateReason:O},this.updateCacheLineCount(this.cache,q),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",$s(N,{area:"stream",path:"stream-full",reason:`global-state:${a}`,unbounded:!!Pa(N)?.unbounded}),R}const u=n.options?.streamOptimizationMinSize??this.MIN_SIZE_FOR_OPTIMIZATION;if(s.src.length<u&&e.length<u*1.5&&!e.startsWith(s.src)){const N=i??s.env,O=this.parseFullDocument(e,N,n),P=O.tokens,R=O.lineCount;return this.cache={src:e,tokens:P,env:N,lineCount:R,lastSegment:void 0,globalStateReason:yr(e)},this.updateCacheLineCount(this.cache,R),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",$s(N,{area:"stream",path:"stream-full",reason:"small-non-append",unbounded:!!Pa(N)?.unbounded}),P}const c=this.getAppendedSegment(s.src,e,o);if(c&&!this.shouldPreferTailReparseForAppend(s)){const N=s.lineCount??ps(s.src);let O=3;c.length>5e3?O=8:c.length>1e3?O=6:c.length>200&&(O=4),O=Math.min(O,N);let P=null;const R=n.options?.streamContextParseStrategy??"chars",q=n.options?.streamContextParseMinChars??200,j=n.options?.streamContextParseMinLines??2;let W;const z=()=>(W===void 0&&(W=ps(c)),W),H=this.canDirectlyParseAppend(s),ee=H&&this.shouldUseUnboundedAppend(e,s,c);let V=!1;if(!H)switch(R){case"lines":V=z()>=j;break;case"constructs":if(c.length>=q){V=!0;break}if(E7e(c)){V=!0;break}V=z()>=j;break;case"chars":default:V=c.length>=q}if(O>0&&V){const Z=this.getTailLines(s.src,O)+c;try{const pe=this.core.parse(Z,s.env,n).tokens,re=pe.findIndex(fe=>fe.map&&typeof fe.map[1]=="number"&&fe.map[1]>O);if(re!==-1){const fe=pe.slice(re),Ee=N-O;Ee!==0&&this.shiftTokenLines(fe,Ee),P={tokens:fe}}}catch{P=null}}else P=null;if(!P){const Z=N;if(ee)P={tokens:kp(n,c,s.env,{mode:"stream"})},Z>0&&this.shiftTokenLines(P.tokens,Z);else{const pe=this.core.parse(c,s.env,n);Z>0&&this.shiftTokenLines(pe.tokens,Z),P=pe}}let ie=0;if(s.tokens.length>0&&P.tokens.length>0){const Z=s.tokens[s.tokens.length-1],pe=P.tokens[0];try{Z.type==="inline"&&pe.type==="inline"&&(pe.children&&pe.children.length>0&&(Z.children||(Z.children=[]),this.appendTokens(Z.children,pe.children)),Z.content=(Z.content||"")+(pe.content||""),ie=1)}catch{ie=0}}const se=s.tokens.length;if(P.tokens.length>ie){const Z=s.tokens,pe=P.tokens,re=Math.min(Z.length,pe.length-ie);let fe=0;for(let Ee=re;Ee>0;Ee--){let X=!0;for(let we=0;we<Ee;we++){const Y=Z[Z.length-Ee+we],le=pe[ie+we];if(!Nz(Y,le)){X=!1;break}}if(X){fe=Ee;break}}fe>0&&(ie+=fe),pe.length>ie&&this.appendTokens(s.tokens,pe,ie)}if(s.src=e,s.globalStateReason=null,s.lineCount=N+(W??z()),s.tokens.length>se){const Z=this.getLastSegment(s.tokens,e,se,s.tokens.length,e.length-c.length,N);Z?s.lastSegment=Z:s.lastSegment=void 0}else s.lastSegment=void 0;return this.stats.total+=1,this.stats.appendHits+=1,ee&&(this.stats.unboundedAppendHits=(this.stats.unboundedAppendHits||0)+1),this.stats.lastMode="append",$s(s.env,{area:"stream",path:ee?"stream-unbounded-append":"stream-append",reason:ee?"large-delta":"safe-append",unbounded:ee}),s.tokens}const d=i??s.env,f=this.tryTailSegmentReparse(e,s,d,n);if(f)return this.stats.total+=1,this.stats.tailHits+=1,this.stats.lastMode="tail",$s(d,{area:"stream",path:"stream-tail",reason:"tail-reparse"}),f;const h=!!n.__explicitStreamChunkFallbackSetting,g=typeof n.__canUseImplicitLargeInputStrategy=="function"?n.__canUseImplicitLargeInputStrategy():!0,m=!!n.options?.streamChunkedFallback,y=!h&&!c&&g,A=m||y,b=n.options?.streamChunkAdaptive!==!1,C=n.options?.streamChunkTargetChunks??8,v=n.options?.streamChunkSizeChars,x=n.options?.streamChunkSizeLines,S=n.options?.streamChunkMaxChunks,_=!!n.__explicitStreamChunkConfig,I=n.options?.autoTuneChunks!==!1,M=n.options?.streamChunkFenceAware??!0;let $=c&&s.lineCount!==void 0?s.lineCount+ps(c):void 0;if(A){$===void 0&&($=ps(e));const N=(z,H,ee)=>z<H?H:z>ee?ee:z,O=I&&!_?nI(e.length,$,n.options):null,P=O?.maxChunkChars??(b?N(Math.ceil(e.length/C),8e3,64e3):v??1e4),R=O?.maxChunkLines??(b?N(Math.ceil($/C),150,700):x??200),q=O?.maxChunks??(b?N(Math.ceil(e.length/64e3),C,32):S),j=e.length>0&&e.charCodeAt(e.length-1)===10,W=y&&e.length>=this.IMPLICIT_STREAM_CHUNK_MIN_CHARS&&O?.strategy!=="plain";if((m||W)&&(e.length>=P*2||$>=R*2)&&j){const z=Nv(n,e,d,{maxChunkChars:P,maxChunkLines:R,fenceAware:O?.fenceAware??M,maxChunks:q});return this.cache={src:e,tokens:z,env:d,lineCount:$,lastSegment:void 0,globalStateReason:yr(e)},this.updateCacheLineCount(this.cache,$),this.recordChunkedParseResult(d,m?"explicit-fallback-large-doc":"default-fallback-large-doc"),z}}const D=this.parseFullDocument(e,d,n,$),T=D.tokens;return $=D.lineCount,this.cache={src:e,tokens:T,env:d,lineCount:$,lastSegment:void 0,globalStateReason:yr(e)},this.updateCacheLineCount(this.cache,$),this.stats.total+=1,this.stats.fullParses+=1,this.stats.lastMode="full",$s(d,{area:"stream",path:"stream-full",reason:"fallback-full",unbounded:!!Pa(d)?.unbounded}),T}recordChunkedParseResult(e,t){const n=Pa(e)?.chunk,i=n?.fallback?String(n.fallbackReason||"global-state"):null;if(this.stats.total+=1,i){this.stats.fullParses+=1,this.stats.lastMode="full",$s(e,{area:"stream",path:"stream-full",reason:`global-state:${i}`,unbounded:!!Pa(e)?.unbounded});return}this.stats.chunkedParses=(this.stats.chunkedParses||0)+1,this.stats.lastMode="chunked",$s(e,{area:"stream",path:"stream-chunked",chunked:!0,reason:t})}parseFullDocument(e,t,n,i,s=!0){const o=yr(e);U0(t)&&ru(t);const r=typeof n.__canUseImplicitLargeInputStrategy!="function"||n.__canUseImplicitLargeInputStrategy()?Mz(n,e.length,i):"no";if(r==="yes"){const a=kp(n,e,t);return $s(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-char-threshold",unbounded:!0}),{tokens:a,lineCount:i??(s?ps(e):0)}}let l=i;if(r==="need-lines"&&(l=ps(e),Iz(n,e.length,l))){const a=kp(n,e,t);return $s(t,{area:"stream",path:"stream-full",reason:"auto-unbounded-line-threshold",unbounded:!0}),{tokens:a,lineCount:l}}return l===void 0&&(l=s?ps(e):0),{tokens:mh(t,o,()=>this.core.parse(e,t,n).tokens),lineCount:l}}shouldUseUnboundedAppend(e,t,n){return!n||e.length<this.MIN_UNBOUNDED_APPEND_TOTAL_CHARS&&n.length<this.MIN_UNBOUNDED_APPEND_CHARS?!1:n.length>=this.MIN_UNBOUNDED_APPEND_CHARS?!0:ps(n)>=this.MIN_UNBOUNDED_APPEND_LINES}getAppendedSegment(e,t,n){if(n===null||n===void 0&&!t.startsWith(e)||!e.endsWith(` +`))return null;const i=n??t.slice(e.length);if(!i)return null;const s=i.length;if(i.charCodeAt(s-1)!==10)return null;let o=0,r=-1;for(let a=0;a<s&&!(i.charCodeAt(a)===10&&(r===-1&&(r=a),o++,o>=2));a++);if(o<2)return null;const l=(r===-1?i:i.slice(0,r)).trim();if(l.length===0)return null;if(/^[-=]+$/.test(l)){const a=e.slice(0,-1),u=a.lastIndexOf(` +`);if(a.slice(u+1).trim().length>0)return null}return this.endsInsideOpenFence(e)||this.mayContainReferenceDefinition(i)?null:i}tryTailSegmentReparse(e,t,n,i){const s=this.ensureLastSegment(t);if(!s||s.srcOffset<=0&&s.tokenStart<=0)return null;const o=t.src.slice(0,s.srcOffset);if(!e.startsWith(o))return null;const r=t.src.slice(s.srcOffset),l=e.slice(s.srcOffset);if(l===r)return null;const a=e.startsWith(t.src)?e.slice(t.src.length):null;if(a){const u=this.tryContainerTailAppendMerge(e,t,n,i,s,a);if(u)return u}if(this.mayContainReferenceDefinition(r)||this.mayContainReferenceDefinition(l))return null;try{const u=this.core.parse(l,n,i),c=this.getLastSegment(u.tokens,l);return s.lineStart>0&&this.shiftTokenLines(u.tokens,s.lineStart),t.src=e,t.env=n,t.globalStateReason=null,t.globalStateCarry=void 0,t.tokens.length=s.tokenStart,this.appendTokens(t.tokens,u.tokens),t.lineCount=s.lineStart+ps(l),c?t.lastSegment={tokenStart:s.tokenStart+c.tokenStart,tokenEnd:s.tokenStart+c.tokenEnd,lineStart:s.lineStart+c.lineStart,lineEnd:s.lineStart+c.lineEnd,srcOffset:s.srcOffset+c.srcOffset}:t.lastSegment=null,t.tokens}catch{return null}}getTailLines(e,t){if(t<=0)return"";let n=t;for(let i=e.length-1;i>=0;i--)if(e.charCodeAt(i)===10&&(n--,n===0))return e.slice(i+1);return e}endsInsideOpenFence(e){const n=e.length>4e3?e.length-4e3:0,i=e.slice(n),s=i.length;let o=null,r=0;for(;r<=s;){let l=i.indexOf(` +`,r);l===-1&&(l=s);let a=r;for(;a<l;){const u=i.charCodeAt(a);if(u===32||u===9)a++;else break}if(a<l){const u=i.charCodeAt(a);if(u===96||u===126){let c=a;for(;c<l&&i.charCodeAt(c)===u;)c++;const d=c-a;d>=3&&(o?o.marker===u&&d>=o.length&&(o=null):o={marker:u,length:d})}}if(l===s)break;r=l+1}return o!==null}peek(){return this.cache?.tokens??M7e}getStats(){return{...this.stats}}appendTokens(e,t,n=0,i=t.length){for(let s=n;s<i;s++)e.push(t[s])}updateCacheLineCount(e,t){e.lineCount=t??ps(e.src),e.lastSegment=void 0,e.globalStateCarry=void 0}detectGlobalStateForAppend(e,t){if(e.globalStateReason)return e.globalStateReason;const n=(e.globalStateCarry??e.src.slice(-S3))+t,i=yr(n);return e.globalStateCarry=n.length>S3?n.slice(n.length-S3):n,i&&(e.globalStateReason=i),i}ensureLastSegment(e){return e.lastSegment!==void 0||(e.lastSegment=this.getLastSegment(e.tokens,e.src)),e.lastSegment}getLastSegment(e,t,n=0,i=e.length,s,o){if(i<=n)return null;let r=Number.POSITIVE_INFINITY,l=-1,a=0;for(let u=i-1;u>=n;u--){const c=e[u];if(c.map&&(c.map[0]<r&&(r=c.map[0]),c.map[1]>l&&(l=c.map[1])),c.nesting<0){a+=-c.nesting;continue}if(c.nesting>0){if(a-=c.nesting,c.level===0&&a<=0){const d=Number.isFinite(r)?r:c.map?.[0]??0,f=l>=d?l:c.map?.[1]??d;return{tokenStart:u,tokenEnd:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}continue}if(c.level===0&&a===0){const d=Number.isFinite(r)?r:c.map?.[0]??0,f=l>=d?l:c.map?.[1]??d;return{tokenStart:u,tokenEnd:i,lineStart:d,lineEnd:f,srcOffset:this.getLineStartOffset(t,d,s,o)}}}return null}getLineStartOffset(e,t,n,i){if(n!==void 0&&i!==void 0&&t>=i)return this.getLineStartOffsetFrom(e,n,t-i);if(t<=0)return 0;let s=t,o=-1;for(;s>0;){if(o=e.indexOf(` +`,o+1),o===-1)return e.length;s--}return o+1}getLineStartOffsetFrom(e,t,n){if(n<=0)return t;let i=n,s=t-1;for(;i>0;){if(s=e.indexOf(` +`,s+1),s===-1)return e.length;i--}return s+1}mayContainReferenceDefinition(e){return e.includes("]:")?/(?:^|\n)[ \t]{0,3}\[[^\]\n]+\]:/.test(e):!1}canDirectlyParseAppend(e){if(!this.endsWithBlankLine(e.src))return!1;const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"paragraph_open":case"heading_open":case"fence":case"code_block":case"html_block":case"hr":case"table_open":return!0;default:return!1}}tryContainerTailAppendMerge(e,t,n,i,s,o){if(!o||this.mayContainReferenceDefinition(o))return null;const r=t.tokens[s.tokenStart];switch(r?.type){case"bullet_list_open":case"ordered_list_open":return this.tryListTailAppendMerge(e,t,n,i,s,o,r);case"table_open":return this.tryTableTailAppendMerge(e,t,n,i,s,o,r);default:return null}}tryListTailAppendMerge(e,t,n,i,s,o,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10)return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l<this.MIN_LIST_LINES_FOR_MERGE&&a<this.MIN_LIST_CHARS_FOR_MERGE)return null;const u=r.type==="bullet_list_open"?"bullet_list_close":"ordered_list_close";let c;try{c=this.core.parse(o,n,i).tokens}catch{return null}if(!this.isSingleTopLevelContainer(c,r.type,u,r.markup))return null;const d=c.slice(1,-1);if(d.length===0)return null;const f=t.lineCount??ps(t.src);f>0&&this.shiftTokenLines(d,f);const h=this.getListParagraphMode(t.tokens,s.tokenStart,t.tokens.length,r.level),g=this.getListParagraphMode(c,0,c.length,0);(h==="loose"||g==="loose"||this.endsWithBlankLine(t.src)||(c[0]?.map?.[0]??0)>0)&&(this.setListParagraphVisibility(t.tokens,s.tokenStart,t.tokens.length,r.level,!1),this.setListParagraphVisibility(d,0,d.length,r.level,!1)),t.tokens.splice(t.tokens.length-1,0,...d),t.src=e,t.env=n,t.globalStateReason=null;const m=f+ps(o);t.lineCount=m;const y=this.getDocLineCount(e,m);return r.map&&(r.map[1]=y),t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:y,srcOffset:s.srcOffset},t.tokens}tryTableTailAppendMerge(e,t,n,i,s,o,r){if(t.src.length===0||t.src.charCodeAt(t.src.length-1)!==10||/(?:^|\n)[ \t]*\n/.test(o))return null;const l=s.lineEnd-s.lineStart,a=t.src.length-s.srcOffset;if(l<this.MIN_TABLE_LINES_FOR_MERGE&&a<this.MIN_TABLE_CHARS_FOR_MERGE)return null;const u=this.getTableHeaderContext(t.src.slice(s.srcOffset));if(!u)return null;const c=`${u}${o}`;let d;try{d=this.core.parse(c,n,i).tokens}catch{return null}if(!this.isSingleTopLevelContainer(d,"table_open","table_close")||(d[0]?.map?.[1]??-1)!==this.getDocLineCount(c))return null;const f=this.getTableBodySection(d,0,d.length,0),h=this.getTableBodySection(t.tokens,s.tokenStart,t.tokens.length,r.level);if(!f||!h||f.tbodyOpenIndex<0||f.tbodyCloseIndex<0)return null;const g=h.tbodyOpenIndex>=0?d.slice(f.tbodyOpenIndex+1,f.tbodyCloseIndex):d.slice(f.tbodyOpenIndex,f.tbodyCloseIndex+1);if(g.length===0)return null;const m=s.lineEnd-2;m!==0&&this.shiftTokenLines(g,m);const y=h.tbodyCloseIndex>=0?h.tbodyCloseIndex:h.tableCloseIndex,A=t.lineCount??ps(t.src);t.tokens.splice(y,0,...g),t.src=e,t.env=n,t.globalStateReason=null;const b=A+ps(o);t.lineCount=b;const C=this.getDocLineCount(e,b);if(r.map&&(r.map[1]=C),h.tbodyOpenIndex>=0){const v=t.tokens[h.tbodyOpenIndex];v?.map&&(v.map[1]=C)}return t.lastSegment={tokenStart:s.tokenStart,tokenEnd:t.tokens.length,lineStart:s.lineStart,lineEnd:C,srcOffset:s.srcOffset},t.tokens}getTableHeaderContext(e){const t=e.indexOf(` +`);if(t<0)return null;const n=e.indexOf(` +`,t+1);return n<0?null:e.slice(0,n+1)}getTableBodySection(e,t,n,i){if(t<0||t>=n||e[t]?.type!=="table_open")return null;let s=-1;for(let l=n-1;l>t;l--){const a=e[l];if(a.type==="table_close"&&a.level===i){s=l;break}}if(s<0)return null;let o=-1,r=-1;for(let l=t+1;l<s;l++){const a=e[l];if(a.type==="tbody_open"&&a.level===i+1){o=l;break}}if(o>=0){for(let l=s-1;l>o;l--){const a=e[l];if(a.type==="tbody_close"&&a.level===i+1){r=l;break}}if(r<0)return null}return{tableCloseIndex:s,tbodyOpenIndex:o,tbodyCloseIndex:r}}isSingleTopLevelContainer(e,t,n,i){if(e.length<2)return!1;const s=e[0],o=e[e.length-1];if(s.type!==t||o.type!==n||s.level!==0||o.level!==0||i!==void 0&&s.markup!==i)return!1;let r=0;for(let l=0;l<e.length;l++){const a=e[l];if(a.level===0&&l>0&&l<e.length-1&&r===0)return!1;(a.nesting>0||a.nesting<0)&&(r+=a.nesting)}return r===0}getListParagraphMode(e,t,n,i){let s=!1,o=!1;const r=i+2;for(let l=t;l<n;l++){const a=e[l];if(!(a.type!=="paragraph_open"||a.level!==r)&&(a.hidden?s=!0:o=!0,s&&o))return"loose"}return o?"loose":s?"tight":"none"}setListParagraphVisibility(e,t,n,i,s){const o=i+2;for(let r=t;r<n;r++){const l=e[r];(l.type==="paragraph_open"||l.type==="paragraph_close")&&l.level===o&&(l.hidden=s)}}shouldPreferTailReparseForAppend(e){const t=this.ensureLastSegment(e);if(!t)return!1;switch(e.tokens[t.tokenStart]?.type){case"bullet_list_open":case"ordered_list_open":case"blockquote_open":case"table_open":return!0;case"paragraph_open":case"code_block":case"html_block":return!this.endsWithBlankLine(e.src);default:return!1}}endsWithBlankLine(e){const t=e.length;if(t<2||e.charCodeAt(t-1)!==10)return!1;let n=t-2;for(;n>=0;){const i=e.charCodeAt(n);if(i===32||i===9){n--;continue}return i===10}return!0}getDocLineCount(e,t=ps(e)){return e.length===0?0:e.charCodeAt(e.length-1)===10?t:t+1}shiftTokenLines(e,t){if(t===0)return;let n=null;for(let i=0;i<e.length;i++){const s=e[i];if(s.map&&(s.map[0]+=t,s.map[1]+=t),s.children){n??=[];for(let o=s.children.length-1;o>=0;o--)n.push(s.children[o]);for(;n.length>0;){const o=n.pop();if(o.map&&(o.map[0]+=t,o.map[1]+=t),o.children)for(let r=o.children.length-1;r>=0;r--)n.push(o.children[r])}}}}};const aI={default:b7e,zero:A7e,commonmark:k7e};function F7e(e){return{core:e.core.ruler.version,block:e.block.ruler.version,inline:e.inline.ruler.version,inline2:e.inline.ruler2.version}}function D7e(e,t){return e.core.ruler.version!==t.core||e.block.ruler.version!==t.block||e.inline.ruler.version!==t.inline||e.inline.ruler2.version!==t.inline2}function uI(e){return e.experimental?{...e,...e.experimental}:e}function ll(e,t){if(!e)return!1;if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==void 0)return!0;const n=e.experimental;return!!n&&Object.prototype.hasOwnProperty.call(n,t)&&n[t]!==void 0}function cI(e,t,n){for(let i=0;i<n.length;i++){const s=n[i];if(ll(t,s)||ll(e,s))return!0}return!1}function dI(e,t,n){return ll(t,n)||ll(e,n)}function fI(e,t){const n=Pa(e)?.chunk;if(n?.fallback){$s(e,{area:"parse",path:"plain",reason:`global-state:${n.fallbackReason||"unknown"}`});return}$s(e,{area:"parse",path:"full-chunk",chunked:!0,reason:t})}function Tf(){return typeof performance<"u"?performance.now():Date.now()}function $7e(e,t){let n={html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100,stream:!1,streamOptimizationMinSize:1e3,streamChunkedFallback:!1,streamChunkSizeChars:1e4,streamChunkSizeLines:200,streamChunkFenceAware:!0,streamChunkAdaptive:!0,streamChunkTargetChunks:8,streamChunkMaxChunks:void 0,streamLargeCachePolicy:"retain",streamSkipCacheAboveChars:1e6,streamSkipCacheAboveLines:1e5,fullChunkedFallback:!1,fullChunkThresholdChars:2e4,fullChunkThresholdLines:400,fullChunkSizeChars:1e4,fullChunkSizeLines:200,fullChunkFenceAware:!0,fullChunkAdaptive:!0,fullChunkTargetChunks:8,fullChunkMaxChunks:void 0,autoTuneChunks:!0,autoUnbounded:!0,autoUnboundedThresholdChars:4e6,autoUnboundedThresholdLines:8e4},i="default",s;!t&&typeof e!="string"?(s=e,i="default"):typeof e=="string"&&(i=e,s=t);const o=aI[i];if(!o)throw new Error(`Wrong \`markdown-it\` preset "${i}", check name`);if(o?.options&&(n={...n,...o.options}),s&&(n={...n,...s}),n=uI(n),typeof n.quotes=="string"){const I=n.quotes;I.length>=4?n.quotes=[I[0],I[1],I[2],I[3]]:n.quotes=["“","”","‘","’"]}let r=cI(o?.options,s,["fullChunkSizeChars","fullChunkSizeLines","fullChunkMaxChunks"]),l=cI(o?.options,s,["streamChunkSizeChars","streamChunkSizeLines","streamChunkMaxChunks"]),a=dI(o?.options,s,"fullChunkedFallback"),u=dI(o?.options,s,"streamChunkedFallback"),c=!1,d=null,f=null;const h=new x6e;let g=null;const m=()=>(g||(g=new I7e(n)),g);let y=null;const A=()=>(y||(y=new N7e(h)),y);let b=null;const C=()=>(b||(b=new RB({fuzzyLink:!0})),b),v=I=>!c&&!!d&&!D7e(I,d),x=(I,M)=>i==="default"&&!c&&g===null&&f!==null&&I.parse===f&&v(I)&&!I.stream.enabled&&M<(I.options.autoUnboundedThresholdChars??4e6)&&I.options.html===!1&&I.options.xhtmlOut===!1&&I.options.breaks===!1&&I.options.langPrefix==="language-"&&I.options.linkify===!1&&I.options.typographer===!1&&I.options.highlight===null,S=(I,M)=>i==="default"&&!c&&v(I)&&!I.stream.enabled&&!I.options.fullChunkedFallback&&M<(I.options.autoUnboundedThresholdChars??4e6)&&I.options.html===!1&&I.options.linkify===!1&&I.options.typographer===!1,_={core:h,block:h.block,inline:h.inline,get linkify(){const I=C();return Object.defineProperty(this,"linkify",{value:I,writable:!0,configurable:!0}),I},get renderer(){const I=m();return Object.defineProperty(this,"renderer",{value:I,writable:!0,configurable:!0}),I},options:n,__explicitFullChunkConfig:r,__explicitStreamChunkConfig:l,__explicitFullChunkFallbackSetting:a,__explicitStreamChunkFallbackSetting:u,__canUseImplicitLargeInputStrategy(){return v(this)},set(I){const M=uI(I);return this.options={...this.options,...M},(ll(I,"fullChunkSizeChars")||ll(I,"fullChunkSizeLines")||ll(I,"fullChunkMaxChunks"))&&(r=!0,this.__explicitFullChunkConfig=!0),(ll(I,"streamChunkSizeChars")||ll(I,"streamChunkSizeLines")||ll(I,"streamChunkMaxChunks"))&&(l=!0,this.__explicitStreamChunkConfig=!0),ll(I,"fullChunkedFallback")&&(a=!0,this.__explicitFullChunkFallbackSetting=!0),ll(I,"streamChunkedFallback")&&(u=!0,this.__explicitStreamChunkFallbackSetting=!0),g&&g.set(M),typeof M.stream=="boolean"&&(this.stream.enabled=M.stream,y&&(y.reset(),y.resetStats())),this},configure(I){const M=typeof I=="string"?aI[I]:I;if(!M)throw new Error("Wrong `markdown-it` preset, can't be empty");if(M.options&&this.set(M.options),M.components){const $=M.components;$.core?.rules&&this.core.ruler.enableOnly($.core.rules),$.block?.rules&&this.block.ruler.enableOnly($.block.rules),$.inline?.rules&&this.inline.ruler.enableOnly($.inline.rules),$.inline2?.rules&&this.inline.ruler2.enableOnly($.inline2.rules)}return this},enable(I,M){const $=Array.isArray(I)?I:[I],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const N of D){if(!N)continue;const O=N.enable($,!0);for(let P=0;P<O.length;P++)T.add(O[P])}if(!M){const N=$.filter(O=>!T.has(O));if(N.length)throw new Error(`Rules manager: invalid rule name ${N.join(", ")}`)}return this},disable(I,M){const $=Array.isArray(I)?I:[I],D=[this.core?.ruler,this.block?.ruler,this.inline?.ruler,this.inline?.ruler2],T=new Set;for(const N of D){if(!N)continue;const O=N.disable($,!0);for(let P=0;P<O.length;P++)T.add(O[P])}if(!M){const N=$.filter(O=>!T.has(O));if(N.length)throw new Error(`Rules manager: invalid rule name ${N.join(", ")}`)}return this},use(I,...M){const $=typeof I=="function"?I:I&&typeof I.default=="function"?I.default:void 0;if(!$)throw new TypeError("MarkdownIt.use: plugin must be a function");const D=[this,...M],T=I;return c=!0,$.apply(T,D),this},render(I,M){let $;if(x(this,I.length)){M!==void 0&&(er(M),$=h3("render"));const N=$?Tf():0,O=$?X_(I,$):J_(I);if($&&($.attemptMs=Tf()-N,O===null&&($.fallbackReason="unsupported-stock-subset"),_1(M,$)),O!==null)return M!==void 0&&$s(M,{area:"render",path:"stock-fast",reason:"stock-subset"}),O}const D=M??{},T=this.parse(I,D);return $&&_1(D,$),m().render(T,this.options,D)},async renderAsync(I,M){let $;if(x(this,I.length)){M!==void 0&&(er(M),$=h3("render"));const N=$?Tf():0,O=$?X_(I,$):J_(I);if($&&($.attemptMs=Tf()-N,O===null&&($.fallbackReason="unsupported-stock-subset"),_1(M,$)),O!==null)return M!==void 0&&$s(M,{area:"render",path:"stock-fast",reason:"stock-subset"}),O}const D=M??{},T=this.parse(I,D);return $&&_1(D,$),m().renderAsync(T,this.options,D)},renderIterable(I,M={}){const $=this.parseIterable(I,M);return m().render($,this.options,M)},async renderAsyncIterable(I,M={}){const $=await this.parseAsyncIterable(I,M);return m().renderAsync($,this.options,M)},renderInline(I,M={}){const $=this.parseInline(I,M);return m().render($,this.options,M)},validateLink:pz,normalizeLink:gz,normalizeLinkText:mz,utils:e8e,helpers:{...H8e},parse(I,M){if(typeof I!="string")throw new TypeError("Input data should be a String");if(M!==void 0&&er(M),S(this,I.length)){const N=M===void 0?void 0:h3("parse"),O=N?Tf():0,P=B6e(I,N);if(N&&(N.attemptMs=Tf()-O,P===null&&(N.fallbackReason="unsupported-stock-subset"),_1(M,N)),P!==null)return M!==void 0&&$s(M,{area:"parse",path:"stock-fast",reason:"stock-subset"}),P}const $=M??{};let D;if(!this.stream.enabled&&!this.options.fullChunkedFallback&&v(this)){const N=Mz(this,I.length);if(N==="yes"){const O=kp(this,I,$);return $s(M,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"char-threshold"}),O}N==="need-lines"&&(D=ps(I))}if(!this.stream.enabled){const N=I.length,O=this.options.autoTuneChunks!==!1,P=r,R=!a&&v(this),q=!!this.options.fullChunkedFallback,j=R&&N>=2e5;let W;(q||j||D!==void 0)&&(W=D??ps(I));const z=(q||j)&&O&&!P?y7e(N,W,this.options):null;if(q||j){const H=W??0;if(q?N>=(this.options.fullChunkThresholdChars??2e4)||H>=(this.options.fullChunkThresholdLines??400):j){if(z&&z.strategy!=="plain"){const ee=Nv(this,I,$,{maxChunkChars:z.maxChunkChars,maxChunkLines:z.maxChunkLines,fenceAware:z.fenceAware,maxChunks:z.maxChunks});return M&&fI(M,q?"explicit-full-chunk":"default-large-string"),ee}if(q){const ee=(X,we,Y)=>X<we?we:X>Y?Y:X,V=this.options.fullChunkAdaptive!==!1,ie=this.options.fullChunkTargetChunks??8,se=ee(Math.ceil(N/ie),8e3,64e3),Z=ee(Math.ceil(H/ie),150,700),pe=V?se:this.options.fullChunkSizeChars??1e4,re=V?Z:this.options.fullChunkSizeLines??200,fe=V?ee(Math.ceil(N/64e3),ie,32):this.options.fullChunkMaxChunks,Ee=Nv(this,I,$,{maxChunkChars:pe,maxChunkLines:re,fenceAware:this.options.fullChunkFenceAware??!0,maxChunks:fe});return M&&fI(M,"explicit-full-chunk"),Ee}}}if(D!==void 0&&v(this)&&Iz(this,N,W??D)){const H=kp(this,I,$);return $s(M,{area:"parse",path:"auto-unbounded",unbounded:!0,reason:"line-threshold"}),H}}const T=yr(I);return $s(M,{area:"parse",path:"plain",reason:"default-plain"}),mh($,T,()=>h.parse(I,$,this).tokens)},parseIterable(I,M={}){return er(M),p7e(this,I,M)},parseAsyncIterable(I,M={}){return er(M),g7e(this,I,M)},parseIterableToSink(I,M,$={}){return er($),m7e(this,I,M,$)},parseAsyncIterableToSink(I,M,$={}){return er($),v7e(this,I,M,$)},parseInline(I,M={}){if(typeof I!="string")throw new TypeError("Input data should be a String");er(M),U0(M)&&ru(M);const $=h.createState(I,M,this);return $.inlineMode=!0,h.process($),$.tokens}};if(_.stream={enabled:!!n.stream,parse(I,M){return _.stream.enabled?A().parse(I,M,_):_.parse(I,M??{})},reset(){A().reset()},peek(){return y?y.peek():[]},stats(){return y?y.getStats():{total:0,cacheHits:0,appendHits:0,unboundedAppendHits:0,tailHits:0,fullParses:0,resets:0,chunkedParses:0,lastMode:"idle"}},resetStats(){y&&y.resetStats()}},o?.components){const I=o.components;I.core?.rules&&_.core.ruler.enableOnly(I.core.rules),I.block?.rules&&_.block.ruler.enableOnly(I.block.rules),I.inline?.rules&&_.inline.ruler.enableOnly(I.inline.rules),I.inline2?.rules&&_.inline.ruler2.enableOnly(I.inline2.rules)}return d=F7e(_),f=_.parse,_}var B7e=$7e;const Fz=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],z7e=["a","abbr","b","bdi","bdo","button","cite","code","data","del","dfn","em","font","i","ins","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var"],Dz=["article","aside","blockquote","details","div","figcaption","figure","footer","header","h1","h2","h3","h4","h5","h6","li","main","nav","ol","p","pre","section","summary","table","tbody","td","th","thead","tr","ul"],R7e=["svg","g","path"],O7e=["address","audio","body","canvas","caption","colgroup","datalist","dd","dialog","dl","dt","fieldset","form","head","hgroup","html","iframe","legend","map","menu","meter","noscript","object","optgroup","option","output","picture","progress","rp","rt","ruby","script","select","style","template","textarea","tfoot","title","video"],P7e=["onclick","onerror","onload","onmouseover","onmouseout","onmousedown","onmouseup","onkeydown","onkeyup","onfocus","onblur","onsubmit","onreset","onchange","onselect","ondblclick","ontouchstart","ontouchend","ontouchmove","ontouchcancel","onwheel","onscroll","oncopy","oncut","onpaste","oninput","oninvalid","onsearch","innerhtml","outerhtml","textcontent","innertext","srcdoc","ping"],j7e=["action","data","href","src","srcset","poster","xlink:href","formaction"],H7e=["script"],W7e=["pre","iframe","picture","script","style","table","tbody","td","tfoot","th","thead","textarea","tr","title","video"],dc=new Set(Fz),$z=new Set(Dz),f0=new Set([...Fz,...z7e,...Dz,...R7e]),Bz=new Set([...f0,...O7e]),q7e=new Set(P7e),U7e=new Set(j7e),Z0=new Set(H7e),zz=new Set(W7e);function Rz(e){let t="";for(const n of e){const i=n.charCodeAt(0);i<=31||i>=127&&i<=159||/\s/u.test(n)||(t+=n)}return t}const K7e={amp:"&",bsol:"\\",colon:":",newline:` +`,sol:"/",tab:" "};function Oz(e){return e.replace(/&(?:#(\d+)|#x([0-9a-f]+)|([a-z][a-z0-9]+));?/gi,(t,n,i,s)=>{const o=n??i;if(o){const r=Number.parseInt(o,n?10:16);try{return Number.isFinite(r)?String.fromCodePoint(r):""}catch{return""}}return K7e[String(s??"").toLowerCase()]??t})}const bm=new Set(["http","https","mailto","tel"]),V7e=new Set(["javascript","vbscript","data","file","ftp","blob","filesystem","intent","chrome","chrome-extension","moz-extension","ms-browser-extension","view-source"]),ed=new Set(["http","https"]);function Pz(e){return e.match(/^([a-z][a-z0-9+.-]*):/i)?.[1]?.toLowerCase()??""}const Z7e=/^https?:\/\//i;function G7e(e){if(!Z7e.test(e))return!1;for(const t of e){const n=t.charCodeAt(0);if(t==="&"||n<=32||n>=127&&n<=159||n>127&&/\s/u.test(t))return!1}return!0}function Q7e(e,t,n){if(!Cp(t,n)||!e.startsWith("file:///"))return!1;const i=e.charAt(8);return i!=="/"&&i!=="\\"}function Cp(e,t){return e?(e==="a"||e==="area")&&(!t||t==="href"||t==="xlink:href"):!t||t==="href"}function Y7e(e,t){return t==="href"||t==="xlink:href"?Cp(e,t)?bm:ed:t==="src"||t==="srcset"||t==="poster"||t==="action"||t==="formaction"||t==="data"?ed:(Cp(e,t),bm)}function Td(e,t={}){if(G7e(e))return!1;const n=Rz(Oz(e)).toLowerCase(),i=String(t.tagName??"").toLowerCase(),s=String(t.attrName??"").toLowerCase();if(!n)return!1;if(n.startsWith("data:")){const r=/^data:image\/(?:png|gif|jpe?g|webp|avif|bmp);/i.test(n);return i==="img"&&s==="src"?!r:!0}if(/^[\\/]{2}/.test(n))return!0;if(n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||n.startsWith("#")||n.startsWith("?"))return!1;const o=Pz(n);return o?o==="file"?!Q7e(n,i,s):Cp(i,s)?V7e.has(o):!Y7e(i,s).has(o):!1}function J7e(e){const t=Oz(String(e??"")).trim();if(!t||t.startsWith("#")||t.startsWith("/")||t.startsWith("./")||t.startsWith("../")||t.startsWith("?"))return!1;const n=Pz(Rz(t).toLowerCase());return n==="http"||n==="https"}function X7e(e,t={}){const n=String(e??"").trim();return n?Td(n,t)?"":n:""}function hI(e){return X7e(e,{tagName:"img",attrName:"src"})}function eAe(e,t,n){function i(f){return f.trim().split(" ",2)[0]===t}function s(f,h,g,m,y){return f[h].nesting===1&&f[h].attrJoin("class",t),y.renderToken(f,h,g,m,y)}n=n||{};const o=3,r=n.marker||":",l=r.charCodeAt(0),a=r.length,u=n.validate||i,c=n.render||s;function d(f,h,g,m){let y,A=!1,b=f.bMarks[h]+f.tShift[h],C=f.eMarks[h];if(l!==f.src.charCodeAt(b))return!1;for(y=b+1;y<=C&&r[(y-b)%a]===f.src[y];y++);const v=Math.floor((y-b)/a);if(v<o)return!1;y-=(y-b)%a;const x=f.src.slice(b,y),S=f.src.slice(y,C);if(!u(S,x))return!1;if(m)return!0;let _=h;for(;_++,!(_>=g||(b=f.bMarks[_]+f.tShift[_],C=f.eMarks[_],b<C&&f.sCount[_]<f.blkIndent));)if(l===f.src.charCodeAt(b)&&!(f.sCount[_]-f.blkIndent>=4)){for(y=b+1;y<=C&&r[(y-b)%a]===f.src[y];y++);if(!(Math.floor((y-b)/a)<v)&&(y-=(y-b)%a,y=f.skipSpaces(y),!(y<C))){A=!0;break}}const I=f.parentType,M=f.lineMax;f.parentType="container",f.lineMax=_;const $=f.push("container_"+t+"_open","div",1);$.markup=x,$.block=!0,$.info=S,$.map=[h,_],f.md.block.tokenize(f,h+1,_);const D=f.push("container_"+t+"_close","div",-1);return D.markup=f.src.slice(b,y),D.block=!0,f.parentType=I,f.lineMax=M,f.line=_+(A?1:0),!0}e.block.ruler.before("fence","container_"+t,d,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules["container_"+t+"_open"]=c,e.renderer.rules["container_"+t+"_close"]=c}function tAe(e){const t=String(e??"").trim();if(!t.startsWith("{")||!t.endsWith("}"))return null;const n=t.slice(1,-1).trim();if(!n)return{};if(n.includes("{")||n.includes("[")||n.includes("]"))return null;const i=[];let s="",o=!1,r=!1;for(let a=0;a<n.length;a++){const u=n[a];if(u==="\\"){s+=u,a+1<n.length&&(s+=n[a+1],a++);continue}if(!r&&u==="'"){o=!o,s+=u;continue}if(!o&&u==='"'){r=!r,s+=u;continue}if(!o&&!r&&u===","){i.push(s.trim()),s="";continue}s+=u}s.trim()&&i.push(s.trim());const l={};for(const a of i){if(!a)continue;let u=!1,c=!1,d=-1;for(let y=0;y<a.length;y++){const A=a[y];if(A==="\\"){y++;continue}if(!c&&A==="'"){u=!u;continue}if(!u&&A==='"'){c=!c;continue}if(!u&&!c&&A===":"){d=y;break}}if(d===-1)return null;const f=a.slice(0,d).trim(),h=a.slice(d+1).trim();if(!f)return null;let g=f;if(g.startsWith('"')&&g.endsWith('"')||g.startsWith("'")&&g.endsWith("'"))try{g=JSON.parse(g.replace(/^'/,'"').replace(/'$/,'"'))}catch{return null}if(!/^[_$A-Z][\w$-]*$/i.test(g))return null;let m;if(!h)m="";else if(h.startsWith('"')&&h.endsWith('"')||h.startsWith("'")&&h.endsWith("'"))try{m=JSON.parse(h.replace(/^'/,'"').replace(/'$/,'"'))}catch{m=h}else/^-?\d+(?:\.\d+)?$/.test(h)?m=Number(h):h==="true"||h==="false"?m=h==="true":h==="null"?m=null:m=h;l[g]=m}return l}function jz(e,t,n){for(const i of e){const s=i,o=s.map;if(Array.isArray(o)&&o.length>=2){const r=Number(o[0]),l=Number(o[1]);Number.isFinite(r)&&Number.isFinite(l)&&(s.map=[r+t,Math.min(l+t,n)])}Array.isArray(s.children)&&jz(s.children,t,n)}}function nAe(e){["admonition","info","warning","error","tip","danger","note","caution"].forEach(t=>{e.use(eAe,t,{render(n,i){return n[i].nesting===1?`<div class="vmr-container vmr-container-${t}">`:`</div> +`}})}),e.block.ruler.before("fence","vmr_container_fallback",(t,n,i,s)=>{const o=t,r=o.bMarks[n]+o.tShift[n],l=o.eMarks[n],a=o.src.slice(r,l),u=a.match(/^:::\s*([^\s{]+)/);if(!u)return!1;const c=u[1];if(!c.trim())return!1;const d=a.slice(u[0].length).trim();let f,h;const g=d.indexOf("{"),m=g>=0?d.slice(g).trimStart():void 0;if(g===-1)f=d||void 0;else{if(f=d.slice(0,g).trim()||void 0,m?.startsWith("{")){let S=0,_=-1;for(let I=0;I<m.length;I++)if(m[I]==="{"?S++:m[I]==="}"&&S--,S===0){_=I+1;break}_>0&&(h=m.slice(0,_))}h||(f=d||void 0)}if(s)return!0;const y=!!o.env.__markstreamFinal;let A=n+1,b=!1;for(;A<=i;){const S=o.bMarks[A]+o.tShift[A],_=o.eMarks[A];if(o.src.slice(S,_).trim()===":::"){b=!0;break}A++}b||(A=i);const C=o.push("vmr_container_open","div",1);if(C.attrSet("class",`vmr-container vmr-container-${c}`),C.map=[n,b?A:i],C.meta={...C.meta??{},unclosed:!b&&!y},f&&C.attrSet("data-args",f),h)try{const S=JSON.parse(h);for(const[_,I]of Object.entries(S)){const M=I!=null&&typeof I=="object";C.attrSet(`data-${_}`,M?JSON.stringify(I):String(I))}}catch{const S=tAe(h);if(S)for(const[_,I]of Object.entries(S)){const M=I!=null&&typeof I=="object";C.attrSet(`data-${_}`,M?JSON.stringify(I):String(I))}else C.attrSet("data-attrs",h)}const v=[];for(let S=n+1;S<A;S++){const _=o.bMarks[S]+o.tShift[S],I=o.eMarks[S];v.push(o.src.slice(_,I))}if(v.some(S=>S.trim().length>0)){let S=v.join(` +`);S.endsWith(` +`)||(S+=` +`),S.endsWith(` + +`)||(S+=` +`);const _=o.tokens[o.tokens.length-1];_&&(_.raw=S);const I=[];o.md.block.parse(S,o.md,o.env,I),jz(I,n+1,n+1+v.length),o.tokens.push(...I)}const x=o.push("vmr_container_close","div",-1);return b||(x.hidden=!0,x.map=[i,i]),o.line=b?A+1:A,!0},{alt:["paragraph","reference","blockquote","list"]})}function ql(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ys(e){let t=!1,n=!1;for(let i=0;i<e.length;i++){const s=e[i];if(s==="\\"){i++;continue}if(!n&&s==="'"){t=!t;continue}if(!t&&s==='"'){n=!n;continue}if(!t&&!n&&s===">")return i}return-1}function s9(e){const t=[],n=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let i;for(;(i=n.exec(e))!==null;){const s=i[1];if(!s)continue;const o=i[2]||i[3]||i[4]||"";t.push([s,o])}return t}const iAe=/^[a-z][a-z0-9_-]*$/;function pI(e){return iAe.test(String(e??"").trim().toLowerCase())}function yl(e){const t=String(e??"").trim();if(!t)return"";if(!t.startsWith("<"))return pI(t)?t.toLowerCase():"";let n=1;for(;n<t.length&&/\s/.test(t[n]);)n++;if(t[n]==="/")for(n++;n<t.length&&/\s/.test(t[n]);)n++;const i=n;for(;n<t.length&&/[\w-]/.test(t[n]);)n++;const s=t.slice(i,n).toLowerCase(),o=t[n]??"";return o&&!/[\s/>]/.test(o)?"":pI(s)?s:""}function sf(e){if(!e||e.length===0)return[];const t=new Set,n=[];for(const i of e){const s=yl(i);!s||t.has(s)||(t.add(s),n.push(s))}return n}function sAe(...e){const t=new Set,n=[];for(const i of e)for(const s of sf(i))t.has(s)||(t.add(s),n.push(s));return n}function oAe(e){const t=sf(e);return{key:t.join(","),tags:t}}function Hz(e){return yl(e)}function rAe(e,t){const n=String(e??""),i=yl(t);if(!i)return!1;const s=ql(i),o=n.match(new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?(\s*\/)?>`,"i"));return o?o[1]?!0:new RegExp(String.raw`<\s*\/\s*${s}\s*>`,"i").test(n):!1}function Wz(e,t){const n=yl(t);return!!n&&!f0.has(n)&&!rAe(e,n)}function lAe(e,t){const n=String(e??""),i=yl(t);if(!i)return n;const s=ql(i),o=new RegExp(String.raw`^\s*<\s*${s}(?:\s[^>]*)?>\s*`,"i"),r=new RegExp(String.raw`\s*<\s*\/\s*${s}\s*>\s*$`,"i");return n.replace(o,"").replace(r,"")}const qz=dc,aAe=f0,Uz=new Set($z);Uz.delete("details");const uAe=/<([A-Z][\w-]*)(?=[\s/>]|$)/gi,cAe=/<\/\s*([A-Z][\w-]*)(?=[\s/>]|$)/gi,r8=/^<\s*(?:\/\s*)?([A-Z][\w-]*)/i,dAe=/^<\s*([A-Z][\w:-]*)(?=[\s/>]|$)/i;function Dv(e){return(e.match(r8)?.[1]??"").toLowerCase()}function Q6(e){return/^\s*<\s*\//.test(e)}function Y6(e,t){return qz.has(t)||/\/\s*>\s*$/.test(e)}function fAe(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i];if(!s||s.type!=="html_inline")continue;const o=String(s.content??""),r=Dv(o);if(r===t){if(Q6(o)){if(n===0)return i;n--;continue}Y6(o,r)||n++}}return-1}function hAe(e,t){let n=0;for(const i of e){if(!i||i.type!=="html_inline")continue;const s=String(i.content??""),o=Dv(s);if(o===t){if(Q6(s)){n>0&&n--;continue}Y6(s,o)||n++}}return n}function gI(e,t,n=0){const i=new RegExp(String.raw`<\s*(\/?)\s*${ql(t)}(?=[\s>/])[^>]*>`,"gi");i.lastIndex=Math.max(0,n);let s=0,o;for(;(o=i.exec(e))!==null;){const r=o[0]??"",l=!!o[1],a=!l&&/\/\s*>$/.test(r);if(l){if(s===0)return{start:o.index,end:o.index+r.length};s--;continue}a||s++}return null}function pAe(e,t){const n=new RegExp(String.raw`<\s*(\/?)\s*${ql(t)}(?=[\s>/])[^>]*>`,"gi");let i=0,s;for(;(s=n.exec(e))!==null;){const o=s[0]??"",r=!!s[1],l=!r&&/\/\s*>$/.test(o);if(r){i>0&&i--;continue}l||i++}return i}function $v(e){const t=e;return String(t.raw??t.content??t.markup??"")}function gAe(e){const t=e;return t.meta||(t.meta={}),t.meta}function _3(e,t,n){const i=gAe(e);i.markstreamCustomHtmlRaw=t,i.markstreamCustomHtmlInner=n}function mAe(e,t){if(!t.size)return;const n=Array.from(t,h=>new RegExp(String.raw`<\s*${ql(h)}(?=[\s>/])`,"i")),i=[];let s=!1;const o=h=>h?n.some(g=>g.test(h)):!1,r=h=>{if(!(!h||!i.length))for(const g of i)g.raw+=h,g.inner+=h},l=()=>{!i.length||!s||(r(` +`),s=!1)},a=h=>{r(h)},u=h=>{for(let m=0;m<i.length;m++)i[m].raw+=h,m<i.length-1&&(i[m].inner+=h);const g=i.pop();_3(g.token,g.raw,g.inner)},c=h=>{const g=i[i.length-1]?.tag;if(!g)return null;const m=new RegExp(String.raw`^\s*<\s*\/\s*${ql(g)}\s*>`,"i");return h.match(m)?.[0]??null},d=h=>!!c(h),f=(h,g,m)=>{const y=m??(h.type==="html_inline"?Dv(g):"");if(!(y&&t.has(y))){r(g);return}const A=Q6(g),b=!A&&Y6(g,y);if(A){if(!i.length||i[i.length-1].tag!==y){r(g);return}u(g);return}if(r(g),b){_3(h,g,"");return}i.push({tag:y,token:h,raw:g,inner:""})};for(const h of e){if(h.type==="inline"&&Array.isArray(h.children)){const g=String(h.content??"");if(d(g)?s=!1:l(),!i.length&&!o(g)){s=!1;continue}let m=0,y=!0;for(const A of h.children){const b=$v(A),C=A.type==="html_inline"?Dv(b):"",v=C&&t.has(C);let x=b;if(y&&g&&b&&(i.length||v)){const S=g.indexOf(b,m);if(S!==-1)a(g.slice(m,S)),x=g.slice(S,S+b.length),m=S+b.length;else{if(i.length&&!v)continue;y=!1}}f(A,x,C)}y&&g&&m<g.length&&i.length&&a(g.slice(m)),s=i.length>0;continue}if(i.length&&typeof h.content=="string"){const g=$v(h),m=h.type==="html_block"?c(g):null;if(m){u(`${s?` +`:""}${m}`),s=i.length>0;continue}if(!h.content)continue;l(),r(h.content),s=!0}}for(const h of i)_3(h.token,h.raw,h.inner)}function vAe(e){return/^\s*<\s*[!?]/.test(e)}function yAe(e){const t=new Set(aAe);if(e&&Array.isArray(e))for(const n of e){const i=String(n??"").trim();if(!i)continue;const s=i.match(/^[<\s/]*([A-Z][\w-]*)/i);s&&t.add(s[1].toLowerCase())}return t}function mI(e,t){if(t.has(e))return!0;for(const n of t)if(n.startsWith(e))return!0;return!1}function kAe(e,t){let n=null;for(const o of e.matchAll(uAe)){const r=o.index??-1;if(r<0)continue;const l=(o[1]??"").toLowerCase();mI(l,t)&&ys(e.slice(r))===-1&&(!n||r<n.index)&&(n={index:r,tag:l,closing:!1})}for(const o of e.matchAll(cAe)){const r=o.index??-1;if(r<0)continue;const l=(o[1]??"").toLowerCase();mI(l,t)&&ys(e.slice(r))===-1&&(!n||r<n.index)&&(n={index:r,tag:l,closing:!0})}const i=/<\/\s*$/.exec(e);if(i&&typeof i.index=="number"){const o=i.index;!e.slice(o).includes(">")&&(!n||o<n.index)&&(n={index:o,tag:"",closing:!0})}const s=/<\s*$/.exec(e);if(s&&typeof s.index=="number"){const o=s.index,r=e.slice(o);!r.startsWith("</")&&!r.includes(">")&&(!n||o<n.index)&&(n={index:o,tag:"",closing:!1})}return n}function bAe(e,t){const n=e;return Object.assign(Object.create(Object.getPrototypeOf(n)),n,{type:"text",content:t,raw:t})}function AAe(e,t){if(!e.length)return{children:e};const n=[];let i=null,s=null;function o(a,u){a&&(u?n.push(bAe(u,a)):n.push({type:"text",content:a,raw:a}))}function r(a,u){let c=0;for(;c<a.length;){const d=a.indexOf("<",c);if(d===-1){o(a.slice(c),u);break}o(a.slice(c,d),u);const f=a.slice(d),h=f.match(r8);if(!h){o("<",u),c=d+1;continue}const g=ys(f);if(g===-1){o("<",u),c=d+1;continue}const m=f.slice(0,g+1),y=(h[1]??"").toLowerCase();t.has(y)?n.push({type:"html_inline",tag:"",content:m,raw:m}):o(m,u),c=d+m.length}}function l(a,u){if(!a)return;const c=kAe(a,t);if(!c){r(a,u);return}const d=a.slice(0,c.index);d&&r(d,u),i={tag:c.tag,buffer:a.slice(c.index),closing:c.closing},s=i.buffer}for(const a of e){if(i){i.buffer+=$v(a),s=i.buffer;const u=ys(i.buffer);if(u===-1)continue;const c=i.buffer.slice(0,u+1),d=i.buffer.slice(u+1);n.push({type:"html_inline",tag:"",content:c,raw:c}),i=null,s=null,d&&l(d);continue}if(a.type==="html_inline"){const u=$v(a),c=(u.match(r8)?.[1]??"").toLowerCase();if(c&&t.has(c)&&ys(u)===-1){i={tag:c,buffer:u,closing:/^<\s*\//.test(u)},s=i.buffer;continue}}if(a.type==="text"){const u=String(a.content??"");if(!u.includes("<")){n.push(a);continue}l(u,a);continue}n.push(a)}return{children:n,pendingBuffer:s??void 0}}const CAe=["a","span","strong","em","b","i","u"];function wAe(e,t={}){const n=new Set;if(t.customHtmlTags?.length)for(const f of t.customHtmlTags){const h=yl(f);h&&n.add(h)}const i=f=>{const h=f,g=new Set(n),m=Array.isArray(h.env?.__markstreamCustomHtmlTags)?h.env.__markstreamCustomHtmlTags:[];for(const C of m){const v=yl(String(C??""));v&&g.add(v)}const y=yAe(Array.from(g)),A=new Set(CAe);for(const C of g)A.add(C);return{autoCloseInlineTagSet:A,commonHtmlTags:y,customTagSet:g,shouldMergeHtmlBlockTag:C=>g.has(C)||!y.has(C)||Uz.has(C)}},s=f=>{if(f.type==="html_block")return String(f.content??"");if(f.type!=="inline"||!Array.isArray(f.children)||f.children.length!==1)return"";const h=f.children[0];return h?.type!=="html_block"?"":String(f.content??h.content??"")},o=(f,h)=>{f.type="html_block",f.content=h,f.raw=h,f.children=[]},r=f=>f.replace(/^(?:\r?\n)+/,""),l=f=>/^(?: {4}|\t)/.test(f),a=f=>f.replace(/^(?: {4}|\t)/gm,""),u=(f,h)=>{const g=r(f);if(!/\S/.test(g))return[];if(l(g))return[{type:"code_block",content:a(g),raw:g}];const m=g.replace(/^[\t ]+/,"");if(!m)return[];if(m.startsWith("<"))return[{type:"html_block",content:m}];const y={type:"inline",tag:"",nesting:0,content:m,children:[{type:"text",content:m,raw:m}]};return h==="paragraph"?[{type:"paragraph_open",tag:"p",nesting:1},y,{type:"paragraph_close",tag:"p",nesting:-1}]:h==="text"?[{type:"text",content:m,raw:m}]:[y]},c=(f,h,g)=>f[h-1]?.type==="paragraph_open"&&f[h+1]?.type==="paragraph_close"?"inline":g,d=(f,h)=>{const g=r(h);return!/\S/.test(g)||f.type!=="inline"||!Array.isArray(f.children)?!1:(f.content=`${String(f.content??"")}${g}`,f.children.push({type:"text",content:g,raw:g}),!0)};e.core.ruler.after("inline","fix_html_inline_streaming",f=>{const h=f.tokens??[],{commonHtmlTags:g,customTagSet:m}=i(f);for(const y of h){const A=y;if(A.type!=="inline"||!Array.isArray(A.children))continue;const b=String(A.content??""),C=A.children.length?A.children:b.includes("<")?[{type:"text",content:b,raw:b}]:null;if(C)try{const v=AAe(C,g);if(A.children=v.children,v.pendingBuffer){const x=b.lastIndexOf(v.pendingBuffer);if(x!==-1){const S=b.slice(0,x);A.content=S,typeof A.raw=="string"&&(A.raw=S)}}}catch(v){console.error("[applyFixHtmlInlineTokens] failed to fix streaming html inline",v)}}mAe(h,m)}),e.core.ruler.push("fix_html_inline_tokens",f=>{const h=f.tokens??[],{autoCloseInlineTagSet:g,customTagSet:m,shouldMergeHtmlBlockTag:y}=i(f),A=[];for(let b=0;b<h.length;b++){const C=h[b];if(A.length>0){const[x,S]=A[A.length-1];if(b!==S){if(C.type==="paragraph_open"||C.type==="paragraph_close"){h.splice(b,1),b--;continue}const _=String(C.content??C.raw??"");if(_){const I=h[S],M=`${String(I.content||"")} +${_}`,$=ys(M),D=$===-1?null:gI(M,x,$+1);if(D){const T=M.slice(0,D.end),N=M.slice(D.end);I.content=T,I.loading=!1,h.splice(b,1),A.pop();const O=d(I,N)?[]:u(N,c(h,b,"paragraph"));O.length&&h.splice(b,0,...O),b--;continue}I.content=M,I.loading!==!1&&(I.loading=!0)}h.splice(b,1),b--;continue}}const v=s(C);if(v){if(vAe(v))continue;const x=(v.match(/<\s*(?:\/\s*)?([^\s>/]+)/)?.[1]??"").toLowerCase(),S=/^\s*<\s*\//.test(v);if(!x||!y(x))continue;if(o(C,v),!S)x&&!new RegExp(`^\\s*<\\s*${x}\\b[^>]*\\/\\s*>`,"i").test(v)&&pAe(v,x)>0&&A.push([x,b]);else if(A.length>0&&x&&A[A.length-1][0]===x){const[,_]=A[A.length-1],I=h[_];I.content=`${String(I.content||"")} +${v}`,I.loading=!1,A.pop(),h.splice(b,1),b--}continue}else if(A.length>0){if(C.type==="paragraph_open"||C.type==="paragraph_close"){h.splice(b,1),b--;continue}const x=C.content||"",S=new RegExp(`<\\s*\\/\\s*${A[A.length-1][0]}\\s*>`,"i").test(x);if(x){const[,_]=A[A.length-1],I=h[_];I.content=`${I.content||""} +${x}`,I.loading!==!1&&(I.loading=!S)}S&&A.pop(),h.splice(b,1),b--}else continue}if(m.size>0){const b=new Map,C=new Map,v=_=>{let I=b.get(_);return I||(I=new RegExp(`<\\s*${_}\\b`,"i"),b.set(_,I)),I},x=_=>{let I=C.get(_);return I||(I=new RegExp(`<\\s*\\/\\s*${_}\\s*>`,"i"),C.set(_,I)),I},S=[];for(let _=0;_<h.length;_++){const I=h[_],M=String(I.content??"");if(S.length>0){const D=S[S.length-1],T=h[D.index],N=I.type==="html_block"?x(D.tag).exec(M):null;if(N){const R=N.index+N[0].length,q=M.slice(0,R),j=M.slice(R);T.content=`${String(T.content??"")} +${q}`,Array.isArray(T.children)&&T.children.push({type:"html_inline",content:`</${D.tag}>`,raw:`</${D.tag}>`}),S.pop();const W=d(T,j)?[]:u(j,c(h,_,"paragraph"));W.length?h.splice(_,1,...W):(h.splice(_,1),_--);continue}if(I.type!=="inline")continue;const O=Array.isArray(I.children)?I.children:[],P=fAe(O,D.tag);if(P!==-1){const R=O.slice(0,P+1),q=O.slice(P+1),j=R.map(W=>String(W?.content??W?.raw??"")).join("");if(T.content=`${String(T.content??"")} +${j}`,Array.isArray(T.children)&&T.children.push(...R),q.length){const W=q.map(z=>String(z.content??z.raw??"")).join("");if(W.trim()){const z=W.replace(/^\s+/,"");if(d(T,W))h.splice(_,1),_--;else if(z.startsWith("<"))h.splice(_,1,{type:"html_block",content:z});else{const H=u(W,c(h,_,"paragraph"));h.splice(_,1,...H)}}else h.splice(_,1),_--}else h.splice(_,1),_--;S.pop();continue}T.content=`${String(T.content??"")} +${M}`,Array.isArray(T.children)&&T.children.push(...O),h.splice(_,1),_--;continue}if(I.type!=="inline")continue;const $=Array.isArray(I.children)?I.children:[];for(const D of m)if(($.length?hAe($,D):v(D).test(M)&&!x(D).test(M)?1:0)>0){S.push({tag:D,index:_});break}}}{let b=0;for(let C=0;C<h.length;C++){const v=h[C];if(v.type==="paragraph_open"){b++;continue}v.type==="paragraph_close"&&(b>0?b--:(h.splice(C,1),C--))}}for(let b=0;b<h.length;b++){const C=h[b];if(C.type==="html_block"){const I=(C.content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(I.startsWith("!")||I.startsWith("?")){C.loading=!1;continue}if(m.has(I)){const P=String(C.content??""),R=ys(P),q=R===-1?null:gI(P,I,R+1);C.loading=q?!1:C.loading!==void 0?C.loading:!0;const j=q?.start??-1,W=q?q.end-q.start:0;if(j!==-1){const z=P.slice(0,j+W);let H="";R!==-1&&R<j&&(H=P.slice(R+1,j)),C.children=[{type:I,content:H,raw:z,attrs:[],tag:I,loading:!1}],C.content=z,C.raw=z;const ee=u(P.slice(j+W)||"","text");ee.length&&h.splice(b+1,0,...ee)}else C.children=[{type:I,content:"",raw:P,attrs:[],tag:I,loading:!0}];continue}if(["br","hr","img","input","link","meta","div","p","ul","li"].includes(I))continue;C.type="inline";const M=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let $;for(;($=M.exec(C.content||""))!==null;)$[1],$[2]||$[3]||$[4];const D=String(C.content??""),T=new RegExp(`<\\/\\s*${I}\\s*>`,"i").exec(D),N=T?T.index:-1,O=T?T[0].length:0;if(N!==-1){const P=D.slice(0,N+O),R=(D.slice(N+O)||"").replace(/^\s+/,"");C.children=[{type:"html_block",content:P,tag:I,loading:!1}],C.content=P,C.raw=P,R&&h.splice(b+1,0,R.startsWith("<")?{type:"html_block",content:R}:{type:"text",content:R,raw:R})}else C.children=[{type:"html_block",content:C.content,tag:I,loading:!0}];continue}if(!C||C.type!=="inline")continue;if(C.children.length===2&&C.children[0].type==="html_inline"){const I=(C.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase(),M=C.children[1],$=String(M?.content??"").match(/^<\s*\/\s*([^\s>]+)/)?.[1]?.toLowerCase()??"";if(M?.type==="html_inline"&&$===I)continue;g.has(I)?(C.children[0].loading=!0,C.children[0].tag=I,C.children.push({type:"html_inline",tag:I,loading:!0,content:`</${I}>`})):C.children=[{type:"html_block",loading:!0,tag:I,content:String(C.children[0]?.content??"")+String(C.children[1]?.content??"")}];continue}else if(C.children.length===3&&C.children[0].type==="html_inline"&&C.children[2].type==="html_inline"){const I=(C.children[0].content?.match(/<([^\s>/]+)/)?.[1]??"").toLowerCase();if(g.has(I))continue;C.children=[{type:"html_block",loading:!1,tag:I,content:C.children.map(M=>M.content).join("")}];continue}if(!C.content?.startsWith("<")||C.children?.length!==1)continue;const v=String(C.content),x=C,S=x.children[0];if(S?.type!=="html_inline"){/^<\s*(?:\/\s*)?[A-Z][\w:-]*\s*$/i.test(v)&&(x.children.length=0);continue}const _=String(S.content??v).match(dAe)?.[1]?.toLowerCase()??"";if(_){if(/\/\s*>\s*$/.test(v)||qz.has(_)){x.children=[{type:"html_inline",content:v}];continue}x.children.length=0}}})}function xAe(e){const t=e.trim();return!t||/^&[a-z0-9#]+;/i.test(t)?!1:!!(/^(?:const|let|var|function|class|import|export|if|for|while|return|await|async|yield|try|catch|throw|new|typeof|instanceof|switch|case|break|continue|def|ruby|perl|print|echo|true|false|null|undefined|NaN|Infinity|this)\b/.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\])*\s*\(/i.test(t)||/[a-z_$][\w$]*(?:\.[a-z_$][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[[\d+\]])+/i.test(t)||/\w+\s*(?:===?|!==?|<=?|>=?|\+\+|--|&&|\|\||\?\.)/.test(t)||/^(?:!!|\+\+|--)\s*\w/.test(t)||/[\w$]+\s*(?:\+=|-=|\*=|\/=|%=|\*\*=|=)/.test(t)||/^(?:https?:\/\/|ftp:\/\/|file:\/\/|\/\/|www\.)/i.test(t)||/`[^`]*\$\{[^}]*\}[^`]*`/.test(t)||/<\/?[A-Z][a-zA-Z0-9]*/.test(t)||/<[a-z][a-z0-9]*\s[^>]+>/.test(t)||/^(["'`]).*\1\s*[;,]?$/.test(t)||/^\[[\s\S]*\]$/.test(t)||/^\{[\s\S]*\}$/.test(t)||/^\(\s*\)$/.test(t)||/[\w$]+(?:\s*[+\-*/%<>=!&|^~:]+\s*[\w$]+|\s*\.\s*[\w$]+)/.test(t)||/=>|->|::/.test(t)||/^@[\w.$]+$/.test(t)||/^(?:0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\d+(?:\.\d*)?(?:px|em|rem|%|vh|vw|deg|s|ms)?)$/.test(t)||/^\$[\w$]+\s*[=:]/.test(t)||/\|\s*\w+|\w+\s*\|/.test(t)||/^(?:git|npm|yarn|pnpm|bun|pip|cargo|go|rust|python|node|java|mvn|gradle|docker|kubectl)\s+/.test(t)||/(?:console|window|document|Math|JSON|Date|Array|Object|String|Number|Boolean)\.[a-zA-Z]/.test(t)||/^(?:\/\/|#|\/\*|\*\/|<!--|-->)/.test(t)||/^(?:<<<|<<\s*['"]?\w+['"]?)/.test(t))}function SAe(e,t={}){t.enabled!==!1&&e.core.ruler.after("inline","fix_indented_code_block",n=>{const i=n.tokens??[];for(let s=0;s<i.length;s++){const o=i[s];if(o.type!=="code_block")continue;const r=String(o.content??"").trim();if(!r)continue;const l=r.split(/\r?\n/).filter(a=>a.trim().length>0);if(l.length===1&&!xAe(l[0]??"")){const a=l[0]??"",u=o.level??0;i.splice(s,1,{type:"paragraph_open",tag:"p",nesting:1,level:u},{type:"inline",tag:"",nesting:0,level:u,content:a,children:[{type:"text",content:a,level:u+1,raw:a}],block:!0},{type:"paragraph_close",tag:"p",nesting:-1,level:u}),s+=2}}})}const Kz=/\.([a-z0-9]{1,15})$/i,_Ae=/[_()[\]{}<>]/u,IAe=/^(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/i,MAe=/[?#@]/u,EAe=/[\\/]/u,TAe=/^[\p{L}\p{N}./\\-]+$/u,LAe=/^[A-Za-z0-9-]{1,63}$/u,NAe=/^xn--[a-z0-9-]{2,59}$/i,FAe=/^(?:[A-Z]{1,6}|\d{1,8})$/u,DAe=/^(?=.{1,12}$)[A-Z0-9]+(?:[-.][A-Z0-9]+)*$/iu,$Ae=/文件名\s*[::]?|附件\s*[::]?|路径\s*[::]?|路徑\s*[::]?|文件列表\s*[::]?|文档列表\s*[::]?|文檔列表\s*[::]?|\bfile\s*names?\b\s*[::]?|\battachments?\b\s*[::]?|\bpaths?\b\s*[::]?|\bfile\s+lists?\b\s*[::]?|\bdocument\s+lists?\b\s*[::]?/iu,BAe=/文件名\s*[::]?|文件\s*[::]?|附件\s*[::]?|档案\s*[::]?|檔案\s*[::]?|文档\s*[::]?|文檔\s*[::]?|资料\s*[::]?|資料\s*[::]?|路径\s*[::]?|路徑\s*[::]?|\bfile\s*name\b\s*[::]?|\battachments?\b\s*[::]?|\bfiles?\b\s*[::]?|\bdocuments?\b\s*[::]?|\bdocs?\b\s*[::]?|\bpaths?\b\s*[::]?/iu,zAe=/股票代码|股票代碼|证券代码|證券代碼|(?:代码|代碼|交易所|后缀|後綴|市场|市場)(?=$|[\s::/|,,、()()])|\btickers?\b|\bsymbols?\b|\bexchanges?\b/iu,RAe=2e3,OAe=512,PAe={},jAe=new Set(["ai","md","py","rs","sh","zip"]),Vz=new Set(["as","bj","de","hk","l","ln","ny","pa","sh","ss","sz","t","us"]),HAe=new Set([...Vz,"at","ax","cn","co","it","jp","ks","mc","mx","nz","pl","sa","si","to","tw"]),WAe=new Set(["com","dev","io","page","site"]),qAe=new Set(["app","apk","dmg","exe","ipa","lock","log","markdown","webmanifest"]),UAe=new Set(["7z","ai","astro","avi","bash","bz2","c","cjs","cpp","cs","csv","doc","docx","fish","flac","gif","go","gz","h","hpp","html","java","jpeg","jpg","js","json","jsx","kt","md","mdx","mjs","mov","mp3","mp4","pdf","php","png","ppt","pptx","ps1","py","rar","rb","rs","sh","sql","svg","swift","svelte","tar","tgz","toml","ts","tsx","txt","vue","wav","webp","xls","xlsx","xml","yaml","yml","zip","zsh"]),yd=new Map;function vI(e,t){if(!e||e.length>OAe)return t;for(yd.set(e,t);yd.size>RAe;){const n=yd.keys().next().value;if(!n)break;yd.delete(n)}return t}function h0(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function I3(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return h0(n)?n:void 0}function yI(e,t){if(!h0(t))return e;const n=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:n?.filename||t?.filename,explicitFilename:n?.explicitFilename||t?.explicitFilename,marketTicker:n?.marketTicker||t?.marketTicker}}}function kI(e){const t=G0(e);return h0(t)?t:void 0}function KAe(e){return e.replace(/^[\s>*_`[\]((【《"'“‘]+/u,"").replace(/[\s<*_`\]))】》"'.。;;,,、::!?!?]+$/u,"")}function bI(e,t){if(!h0(t))return;const n=String(e??"").trim().split(/\s+/u).map(KAe).filter(Boolean);if(n.length===0)return;const i={};return t?.filename&&n.every(s=>Bv(s,{filename:!0,explicitFilename:t.explicitFilename}))&&(i.filename=!0),t?.explicitFilename&&i.filename&&(i.explicitFilename=!0),t?.marketTicker&&n.every(s=>Bv(s,{marketTicker:!0}))&&(i.marketTicker=!0),h0(i)?i:void 0}function Tc(e,t=!1){let n;return{options(i){return t||i==null?yI(e,n):yI(e,I3(kI(i),bI(i,n)))},remember(i){const s=kI(i);n=t?I3(n,s):I3(s,bI(i,n))},reset(){n=void 0}}}function AI(e){return LAe.test(e)&&!e.startsWith("-")&&!e.endsWith("-")}function VAe(e){const t=e.split(".");if(t.length<2)return!1;const n=t[t.length-1]?.toLowerCase()??"";return AI(n)||NAe.test(n)?t.every(AI):!1}function Zz(e){return Array.from(e).some(t=>t.charCodeAt(0)>127)}function ZAe(e){return e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,"").split(/[/?#]/,1)[0]??""}function GAe(e){return e.split(".").some(t=>t.toLowerCase().startsWith("xn--"))}function Gz(e,t,n){const i=ZAe(t);return Zz(e)&&GAe(i)&&String(n??"").toLowerCase().includes(i.toLowerCase())}function QAe(e){if(!e)return!1;if(e.includes("文件")||e.includes("附件")||e.includes("路径")||e.includes("路徑")||e.includes("文档")||e.includes("文檔")||e.includes("档案")||e.includes("檔案")||e.includes("资料")||e.includes("資料")||e.includes("股票")||e.includes("证券")||e.includes("證券")||e.includes("代码")||e.includes("代碼")||e.includes("交易所")||e.includes("后缀")||e.includes("後綴")||e.includes("市场")||e.includes("市場"))return!0;const t=e.toLowerCase();return t.includes("file")||t.includes("attachment")||t.includes("document")||t.includes("doc")||t.includes("path")||t.includes("ticker")||t.includes("symbol")||t.includes("exchange")}function G0(e){const t=String(e??""),n=yd.get(t);return n?(yd.delete(t),yd.set(t,n),n):QAe(t)?vI(t,{explicitFilename:$Ae.test(t),filename:BAe.test(t),marketTicker:zAe.test(t)}):vI(t,PAe)}function YAe(e){return VAe(e.split(/[\\/]/)[0]??"")}function JAe(e){const t=e.replace(/[^a-z]/gi,"");return t.length>=2&&t===t.toUpperCase()}function XAe(e){if(_Ae.test(e)||!TAe.test(e))return!0;if(EAe.test(e))return!YAe(e);const t=e.replace(Kz,"");return Zz(t)?!0:t.split(".").filter(Boolean).some(JAe)}function eCe(e,t,n){if(!(n?HAe:Vz).has(t))return!1;const i=e.slice(0,-(t.length+1));return i===""?e.startsWith("."):(n?DAe:FAe).test(i)}function Bv(e,t={}){if(!e||IAe.test(e)||MAe.test(e))return!1;const n=e.match(Kz);if(!n)return!1;const i=String(n[1]??"").toLowerCase();return eCe(e,i,t.marketTicker===!0)?!0:UAe.has(i)?!jAe.has(i)||t.filename?!0:XAe(e):!!(t.explicitFilename&&WAe.has(i)||t.filename&&qAe.has(i))}const Qz=new WeakMap,Yz=new WeakSet;function l8(e,t){return Qz.set(e,t),e}function tCe(e){return Qz.get(e)}function nCe(e){Yz.add(e)}function iCe(e){return e===void 0||Yz.has(e)}const CI=["!"];function wI(e){return e==="linkify"||e==="autolink"?e:"recovery"}function pr(e){return{type:"text",content:e,raw:e}}function td(e,t){t===1?e.push({type:"em_open",tag:"em",nesting:1}):t===2?e.push({type:"strong_open",tag:"strong",nesting:1}):t===3&&(e.push({type:"strong_open",tag:"strong",nesting:1}),e.push({type:"em_open",tag:"em",nesting:1}))}function nd(e,t){t===1?e.push({type:"em_close",tag:"em",nesting:-1}):t===2?e.push({type:"strong_close",tag:"strong",nesting:-1}):t===3&&(e.push({type:"em_close",tag:"em",nesting:-1}),e.push({type:"strong_close",tag:"strong",nesting:-1}))}function xu(e,t,n,i="recovery"){let s="";if(t.includes('"')){const o=t.split('"');t=o[0].trim(),s=o[1].trim()}return l8({type:"link",loading:n,href:t,title:s,text:e,children:[{type:"text",content:e,raw:e}],raw:`[${e}](${t})`},i)}function sCe(e,t){if(!(!e||!t)&&(e.href=String(e.href??"")+t,e.text=String(e.text??"")+t,e.raw=`[${e.text}](${e.href})`,Array.isArray(e.children)&&e.children.length)){const n=e.children[e.children.length-1];n?.type==="text"?(n.content=String(n.content??"")+t,n.raw=String(n.raw??"")+t):e.children.push(pr(t))}}function xI(e,t){let n=-1;for(const i of t){const s=e.indexOf(i);s!==-1&&(n===-1||s<n)&&(n=s)}return n}function oCe(e){const t=e.attrs?.find(n=>n?.[0]==="href")?.[1];return typeof t=="string"?t:""}function rCe(e,t){if(!e)return;e.attrs=Array.isArray(e.attrs)?e.attrs:[];const n=e.attrs.findIndex(i=>i?.[0]==="href");n>=0?e.attrs[n][1]=t:e.attrs.push(["href",t])}function SI(e,t,n){let i="";for(let s=t+1;s<n;s++){const o=e[s];if(o?.type!=="text"||typeof o.content!="string")return null;i+=o.content}return i||null}function _I(e){let t=0;for(let n=0;n<e.length;n++){const i=e[n];if(i==="(")t++;else if(i===")"){if(t===0)return n;t--}}return-1}function lCe(e){e.core.ruler.after("inline","fix_link_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=aCe(s.children,typeof s.content=="string"?s.content:void 0)}catch(o){console.error("[applyFixLinkTokens] failed to fix inline children",o)}}})}function aCe(e,t){if(e.length<3)return e;const n=e.some(r=>r.type==="code_inline"),i=new Map;let s=0;for(let r=0;r<e.length;r++){const l=e[r];if(l.type==="link_open"){let a=-1;for(let u=r+1;u<e.length;u++)if(e[u]?.type==="link_close"){a=u;break}if(a!==-1&&l.markup==="linkify"){i.set(l,s);const u=SI(e,r,a),c=s>0&&u?_I(u):-1;if(c!==-1&&u)for(const d of u.slice(c))d==="("?s++:d===")"&&s>0&&s--}a!==-1&&(r=a);continue}if(!(l.type!=="text"||typeof l.content!="string"))for(const a of l.content)a==="("?s++:a===")"&&s>0&&s--}const o=G0(t);for(let r=0;r<=e.length-1;r++){r<0&&(r=0);const l=e[r];if(!l)break;if(l.type==="link_open"&&(l.markup==="linkify"||l.markup==="autolink")){let a=-1;for(let u=r+1;u<e.length;u++)if(e[u]?.type==="link_close"){a=u;break}if(a!==-1){const u=SI(e,r,a),c=oCe(l);if(!n&&l.markup==="linkify"&&u&&!Gz(u,c,t)&&Bv(u,o)){e.splice(r,a-r+1,pr(u));continue}let d=xI(u??"",CI);if(l.markup==="linkify"&&u?.includes(")")&&(i.get(l)??0)>0){const g=_I(u);g!==-1&&(d===-1||g<d)&&(d=g)}const f=xI(c,CI);let h=d;for(let g=r+1;g<a;g++){const m=e[g];if(m?.type!=="text"||typeof m.content!="string")continue;if(h>=m.content.length){h-=m.content.length;continue}if(h<0)break;const y=m.content[h],A=m.content.slice(0,h);let b=m.content.slice(h);for(let x=g+1;x<a;x++){const S=e[x];S?.type==="text"&&typeof S.content=="string"&&(b+=S.content)}m.content=A,m.raw=A;const C=a-(g+1);C>0&&(e.splice(g+1,C),a=g+1);let v=c;if(y==="!"&&f!==-1)v=c.slice(0,f);else if(b){const x=encodeURI(b);if(x&&c.endsWith(x))v=c.slice(0,c.length-x.length);else{const S=y?encodeURI(y):"",_=S?c.indexOf(S):-1;_!==-1&&(v=c.slice(0,_))}}v!==c&&rCe(l,v),b&&e.splice(a+1,0,pr(b));break}}}if(!n){if(l?.type==="em_open"&&e[r-1]?.type==="text"&&e[r-1].content?.endsWith("*")){const a=e[r-1].content?.replace(/(\*+)$/,"")||"";e[r-1].content=a,l.type="strong_open",l.tag="strong",l.markup="**";for(let u=r+1;u<e.length;u++)if(e[u]?.type==="em_close"){e[u].type="strong_close",e[u].tag="strong",e[u].markup="**";break}}else if(l?.type==="text"&&l.content?.endsWith("(")&&e[r+1]?.type==="link_open"){const a=l.content.match(/\[([^\]]+)\]/);if(a){let u=l.content.slice(0,a.index);const c=u.match(/(\*+)$/),d=wI(e[r+1]?.markup),f=[];if(c){u=u.slice(0,c.index),u&&f.push(pr(u));const h=a[1],g=c[1].length;td(f,g);let m=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(m+=e[r+4]?.content||"",e[r+4].content=""),f.push(xu(h,m,!e[r+4]?.content?.startsWith(")"),d)),nd(f,g),e[r+4]?.type==="text"){const y=e[r+4].content?.replace(/^\)\**/,"");y&&f.push(pr(y)),e.splice(r,5,...f)}else e.splice(r,4,...f)}else{u&&f.push(pr(u));let h=a[1];const g=h.match(/^\*+/);if(g){const y=g[0].length;h=h.replace(/^\*+/,"").replace(/\*+$/,"");let A=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(A+=e[r+4]?.content||"",e[r+4].content=""),td(f,y),f.push(xu(h,A,!e[r+4]?.content?.startsWith(")"),d)),nd(f,y),e[r+4]?.type==="text"){const b=e[r+4].content?.replace(/^\)/,"");b&&f.push(pr(b)),e.splice(r,5,...f)}else e.splice(r,4,...f);r===0?r=f.length-1:r-=f.length+1;continue}let m=e[r+2]?.content||"";if(e[r+4]?.type==="text"&&!e[r+4].content?.startsWith(")")&&(m+=e[r+4]?.content||"",e[r+4].content=""),f.push(xu(h,m,!e[r+4]?.content?.startsWith(")"),d)),e[r+4]?.type==="text"){const y=e[r+4].content?.replace(/^\)/,"");y&&f.push(pr(y)),e.splice(r,5,...f)}else e.splice(r,4,...f)}r-=f.length+1;continue}}else if(l.type==="link_open"&&l.markup==="linkify"&&e[r-1]?.type==="text"&&e[r-1].content?.endsWith("(")){if(e[r-2]?.type==="link_close"){const a=[],u=e[r-3].content||"";let c=l.attrs?.find(d=>d[0]==="href")?.[1]||"";if(e[r+3]?.type==="text"){const d=(e[r+3]?.content??"").indexOf(")"),f=d===-1;d===-1&&(c+=e[r+3]?.content?.slice(0,d)||"",e[r+3].content=""),a.push(xu(u,c,f,"linkify"));const h=e[r+3].content?.replace(/^\)\**/,"");h&&a.push(pr(h)),e.splice(r-4,8,...a)}else a.push(l8({type:"link",loading:!0,href:c,title:"",text:u,children:[{type:"text",content:c,raw:c}],raw:`[${u}](${c})`},"linkify")),e.splice(r-4,7,...a);continue}else if(e[r-1].content==="]("&&e[r-3]?.type==="text"&&e[r-3].content?.endsWith(")"))if(e[r-2]?.type==="strong_open"){const[a,u]=e[r-3].content?.split("[**")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}else if(e[r-2]?.type==="em_open"){const[a,u]=e[r-3].content?.split("[*")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}else{const[a,u]=e[r-3].content?.split("[")||[];e[r+1].content=u||"",e[r-3].content=a||"",e[r-1].content=""}}if(l.type==="link_close"&&l.nesting===-1&&e[r-2]?.type==="link_open"&&e[r+1]?.type==="text"&&e[r-1]?.type==="text"){const a=e[r-1].content||"",u=e[r-2].attrs||[],c=u.find(A=>A[0]==="href")?.[1]||"",d=u.find(A=>A[0]==="title")?.[1]||"";let f=3,h=2;const g=(e[r-3]?.content||"").match(/^(\*+)$/),m=[];if(g){h+=1;const A=g[1].length;td(m,A)}if(l.markup!=="linkify"&&e[r+1].type==="text"&&e[r+1]?.content?.startsWith("](")){f+=1;for(let A=r+1;A<e.length;A++){const b=g?g[1].length:e[r-3].markup.length,C=e[A];if(b===1&&C.type==="em_close")break;if(b===2&&C.type==="strong_close")break;if(b===3&&(C.type==="em_close"||C.type==="strong_close"))break;f+=1}}const y=l8({type:"link",loading:!1,href:c,title:d,text:a,children:[{type:"text",content:a,raw:a}],raw:`[${a}](${c})`},l.markup?wI(l.markup):"explicit");if(m.push(y),g){const A=g[1].length;nd(m,A)}e.splice(r-h,f,...m),r-=m.length+1;continue}else if(l.content?.startsWith("](")&&e[r-1].markup?.includes("*")&&e[r-4]?.type==="text"&&e[r-4].content?.endsWith("[")){const a=e[r-1].markup.length,u=[],c=e[r-4].content.slice(0,e[r-4].content.length-a);c&&u.push(pr(c)),td(u,a);const d=e[r-2].content||"";let f=l.content.slice(2),h=!0;if(e[r+1]?.type==="text"){const g=(e[r+1]?.content??"").indexOf(")");h=g===-1,g===-1&&(f+=e[r+1]?.content?.slice(0,g)||"",e[r+1].content="")}if(u.push(xu(d,f,h)),nd(u,a),e[r+1]?.type==="text"){const g=e[r+1].content?.replace(/^\)\**/,"");g&&u.push(pr(g)),e.splice(r-4,8,...u)}else e[r+1]?.type==="link_open"?e.splice(r-4,10,...u):e.splice(r-4,7,...u);r-=u.length+1;continue}else if(l.content?.startsWith("](")&&e[r-1].type==="strong_close"&&e[r-4]?.type==="text"&&e[r-4]?.content?.includes("**[")){const a=[],u=e[r-4].content.split("**[")[0];u&&a.push(pr(u)),td(a,2);const c=e[r-2].content||"";let d=l.content.slice(2),f=!0;if(e[r+1]?.type==="text"){const h=(e[r+1]?.content??"").indexOf(")");f=h===-1,h===-1&&(d+=e[r+1]?.content?.slice(0,h)||"",e[r+1].content="")}if(a.push(xu(c,d,f)),nd(a,2),e[r+1]?.type==="text"){const h=e[r+1].content?.replace(/^\)\**/,"");h&&a.push(pr(h)),e.splice(r-4,8,...a)}else e[r+1]?.type==="link_open"?e.splice(r-4,10,...a):e.splice(r-4,7,...a);r-=a.length+1;continue}else if(l.type==="strong_close"&&e[r+1]?.type==="text"&&e[r+1].content?.includes("](")&&e[r-1].type==="text"&&/\[.*$/.test(e[r-1].content||"")){const a=[],[u,c]=e[r-1].content?.split("[")||["",""];u&&a.push(pr(u)),td(a,2);let[d,f]=e[r+1].content.split("](");d=c+d;let h=4;if(e[r+2]?.type==="link_open"){const m=e[r+2].attrs?.find(y=>y[0]==="href")?.[1];e[r+5]?.type==="text"&&e[r+5].content==="."?(f=(m||f)+e[r+5].content,e[r+5].content=""):f=m||f,h+=3}let g=!0;if(l.nesting===-1&&(d=d.replace(/\*+$/,"")),e[r+2]?.type==="text"){const m=(e[r+2]?.content??"").indexOf(")");g=m===-1,m===-1&&(f+=e[r+2]?.content?.slice(0,m)||"",e[r+2].content="")}a.push(xu(d,f,g)),nd(a,2),e.splice(r-2,h,...a)}if(l.type==="text"&&/\*+\[[^\]]*$/.test(l.content||"")&&e[r+1]?.type==="strong_open"&&e[r+2]?.type==="text"&&e[r+2].content==="]("&&e[r+3]?.type==="link_open"&&e[r+5]?.type==="link_close"&&e[r+6]?.type==="text"&&e[r+6].content===")"&&e[r+7]?.type==="strong_close"){const a=(l.content||"").match(/^(\*+)\[(.*)$/);if(a){const u=(a[2]||"")+a[1];let c=e[r+3]?.attrs?.find(f=>f[0]==="href")?.[1]||"";!c&&e[r+4]?.type==="text"&&(c=e[r+4].content||"");const d=[];td(d,2),d.push(xu(u,c,!1)),nd(d,2),e.splice(r,9,...d),r-=d.length-1;continue}}}}if(n)return e;for(let r=0;r<e.length-1;r++){const l=e[r],a=e[r+1];if(l?.type!=="link"||a?.type!=="text"||typeof a.content!="string"||!a.content.startsWith("!"))continue;const u=String(l.href??"");if(String(l.text??"")!==u||!u.endsWith("=")&&!u.endsWith("#"))continue;sCe(l,"!");const c=a.content.slice(1);c?(a.content=c,a.raw=c):e.splice(r+1,1)}return e}function uCe(e){e.core.ruler.after("inline","fix_list_item_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=cCe(s.children)}catch(o){console.error("[applyFixListItem] failed to fix inline children",o)}}})}function cCe(e){const t=e[e.length-1],n=String(t?.content??"");return t?.type==="text"&&/^\s*\d+\.\s*$/.test(n)&&e[e.length-2]?.tag==="br"&&e.splice(e.length-1,1),e}function dCe(e){e.core.ruler.after("inline","fix_strong_tokens",t=>{const n=t.tokens??[];for(let i=0;i<n.length;i++){const s=n[i];if(s&&s.type==="inline"&&Array.isArray(s.children))try{s.children=fCe(s.children)}catch(o){console.error("[applyFixStrongTokens] failed to fix inline children",o)}}})}function fCe(e){let t=0;const n=new Set,i=new Set;let s=0;for(let c=0;c<e.length;c++){const d=e[c],f=d.type;if(f==="strong_open"){t++;const h=String(d.markup??"");let g=c-1;for(;g>=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y<e.length&&e[y].type==="text"&&e[y].content==="";)y++;const A=e[y];h==="__"&&(m?.content?.endsWith("_")||A?.content?.startsWith("_")||A?.markup?.includes("_"))&&(d.type="text",d.tag="",d.content=h,d.raw=h,d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null,n.add(t))}else if(f==="strong_close")n.has(t)&&d.markup==="__"&&(d.type="text",d.content=d.markup,d.raw=String(d.markup??""),d.tag="",d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null),t--,t<0&&(t=0);else if(f==="em_open"){s++;const h=String(d.markup??"");let g=c-1;for(;g>=0&&e[g].type==="text"&&e[g].content==="";)g--;const m=e[g];let y=c+1;for(;y<e.length&&e[y].type==="text"&&e[y].content==="";)y++;const A=e[y];h==="_"&&(m?.content?.endsWith("_")||A?.content?.startsWith("_")||A?.markup?.includes("_"))&&(d.type="text",d.tag="",d.content=h,d.raw=h,d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null,i.add(s))}else f==="em_close"&&(i.has(s)&&d.markup==="_"&&(d.type="text",d.content=d.markup,d.raw=String(d.markup??""),d.tag="",d.markup="",d.attrs=null,d.map=null,d.info="",d.meta=null),s--,s<0&&(s=0))}if(e.length<5)return e;const o=e.length-4,r=e[o];let l=[...e];const a=e[o+1],u=String(r.content??"");if(r.type==="link_open"&&e[o-1]?.type==="em_open"&&e[o-2]?.type==="text"&&e[o-2].content?.endsWith("*")){const c=String(e[o-2].content??"").slice(0,-1),d=[{type:"strong_open",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""},e[o],e[o+1],e[o+2],{type:"strong_close",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""}];c&&d.unshift({type:"text",content:c,raw:c}),l.splice(o-2,6,...d)}else if(r.type==="text"&&u.endsWith("*")&&a.type==="em_open"){const c=e[o+2],d=c?.type==="text"?4:3,f=[{type:"strong_open",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""},{type:"text",content:c?.type==="text"?String(c.content??""):"",raw:c?.type==="text"?String(c.content??""):""},{type:"strong_close",tag:"strong",attrs:null,map:null,children:null,content:"",markup:"**",info:"",meta:null,raw:""}],h=u.slice(0,-1);h&&f.unshift({type:"text",content:h,raw:h}),l.splice(o,d,...f)}return l=hCe(l),l}function hCe(e){if(e.length<7)return e;const t=[];for(let n=0;n<e.length;n++){const i=e[n],s=e[n+1],o=e[n+2],r=e[n+3],l=e[n+4],a=e[n+5],u=e[n+6];if(i?.type==="strong_open"&&s?.type==="text"&&o?.type==="strong_close"&&r?.type==="strong_open"&&l?.type==="math_inline"&&a?.type==="strong_close"&&u?.type==="text"){const c=String(u.content??""),d=c.indexOf("**");if(d!==-1){const f=c.slice(0,d),h=c.slice(d+2);t.push(i),t.push(s),t.push(l),f&&t.push({...u,type:"text",content:f,raw:f}),t.push(a),h&&t.push({...u,type:"text",content:h,raw:h}),n+=6;continue}}if(i?.type==="strong_open"&&s?.type==="text"&&o?.type==="strong_close"&&r?.type==="strong_open"&&l?.type==="math_inline"&&a?.type==="strong_close"){const c=pCe(e,n+6);if(c){t.push(i),t.push(s),t.push(l);for(let d=n+6;d<c.index;d++)t.push(e[d]);c.beforeClose&&t.push({...e[c.index],type:"text",content:c.beforeClose,raw:c.beforeClose}),t.push(a),c.afterClose&&t.push({...e[c.index],type:"text",content:c.afterClose,raw:c.afterClose}),n=c.index;continue}}t.push(i)}return t}function pCe(e,t){for(let n=t;n<e.length;n++){const i=e[n];if(i?.type==="strong_open")return null;if(i?.type!=="text")continue;const s=String(i.content??""),o=s.indexOf("**");if(o!==-1)return{index:n,beforeClose:s.slice(0,o),afterClose:s.slice(o+2)}}return null}function gCe(e){e.core.ruler.after("block","fix_table_tokens",t=>{const n=t;try{const i=ACe(n.tokens??[],!!n.env?.__markstreamFinal,n.src??"");Array.isArray(i)&&(n.tokens=i)}catch(i){console.error("[applyFixTableTokens] failed to fix table tokens",i)}})}function II(){return[{type:"table_open",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,loading:!0,meta:null},{type:"thead_open",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"tr_open",tag:"tr",attrs:null,block:!0,level:2,children:null}]}function MI(){return[{type:"tr_close",tag:"tr",attrs:null,block:!0,level:2,children:null},{type:"thead_close",tag:"thead",attrs:null,block:!0,level:1,children:null},{type:"table_close",tag:"table",attrs:null,map:null,children:null,content:"",markup:"",info:"",level:0,meta:null}]}function EI(e){return[{type:"th_open",tag:"th",attrs:null,block:!0,level:3,children:null},{type:"inline",tag:"",children:null,content:e,level:4,attrs:null,block:!0},{type:"th_close",tag:"th",attrs:null,block:!0,level:3,children:null}]}function Jz(e,t){if(!e.startsWith("|")||e.includes(` +`)||!e.endsWith("|"))return null;const n=e.slice(1).split("|");return n.at(-1)===""&&n.pop(),n.length>0&&n.every(i=>i.trim().length>0)?n:null}function M3(e){return Jz(e)!==null}function Xz(e){return/^:?-+:?$/.test(e.trim())}function mCe(e){if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|");return t.at(-1)===""&&t.pop(),t.length>0&&t.every(Xz)}function vCe(e){return/^(?:[::]-*|:?-+:?)?$/.test(e.trim())}function yCe(e){if(e==="")return!0;if(!e.startsWith("|"))return!1;const t=e.slice(1).split("|"),n=t.at(-1)??"";return t.slice(0,-1).every(Xz)&&vCe(n)}function kCe(e){return e==="|"||e==="|:"}function bCe(e){const t=Jz(e);return t!==null&&t.every(n=>!n.includes(":"))}function ACe(e,t=!1,n=""){const i=[...e];if(e.length<3)return i;const s=e.length-2,o=e[s];if(o.type==="inline"){const r=String(o.content??""),l=r.split(` +`)[0]??"",[a="",u="",...c]=r.split(` +`),d=!t&&!r.includes(` +`)&&/\r?\n$/.test(n)&&M3(r);if(!t&&(r.includes(` +`)&&c.length===0&&M3(a)&&yCe(u)||d)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>EI(g)),h=[...II(),...f,...MI()];i.splice(s-1,3,...h)}else if(r.includes(` +`)&&c.length===0&&M3(a)&&mCe(u)){const f=l.slice(1,-1).split("|").map(g=>g.trim()).flatMap(g=>EI(g)),h=[...II(),...f,...MI()];i.splice(s-1,3,...h)}else r.includes(` +`)&&c.length===0&&bCe(a)&&kCe(u)&&(o.content=r.slice(0,-2),o.children.splice(2,1))}return i}function CCe(e,t,n,i){const s=e.length;if(n==="$$"&&i==="$$"){let u=t;for(;u<s-1;){if(e[u]==="$"&&e[u+1]==="$"){let c=u-1,d=0;for(;c>=0&&e[c]==="\\";)d++,c--;if(d%2===0)return u}u++}return-1}const o=n[n.length-1],r=i;let l=0,a=t;for(;a<s;){if(e.slice(a,a+r.length)===r){let c=a-1,d=0;for(;c>=0&&e[c]==="\\";)d++,c--;if(d%2===0){if(l===0)return a;l--,a+=r.length;continue}}const u=e[a];if(u==="\\"){a+=2;continue}u===o?l++:u===r[r.length-1]&&l>0&&l--,a++}return-1}var wCe=CCe;const xCe=["boldsymbol","mathbb","mathcal","mathfrak","mathrm","mathit","mathsf","vec","hat","bar","tilde","overline","underline","mathscr","mathnormal","operatorname","mathbf*"],zv=xCe.map(e=>e.replace(/[.*+?^${}()|[\\]"\]/g,"\\$&")).join("|"),SCe=/\\[a-z]+/i,eR="(?:\\\\|\\u0008)",_Ce=new RegExp(String.raw`${eR}(?:${zv})\s*\{[^}]+\}`,"i"),ICe=new RegExp(String.raw`(?:${eR})?(?:${zv})\s*\{`,"i"),MCe=/\\(?:text|frac|left|right|times)/,ECe=/(?:^|[^+])\+(?!\+)|[=\-*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/,TCe=/\b[A-Z]{2,}-[A-Z]{2,}\b/i,LCe=/[A-Z]+\s*\([^)]+\)/i,NCe=/^\(\s*[a-z](?:\s*,\s*[a-z])+\s*\)$/i,FCe=/\b(?:sin|cos|tan|log|ln|exp|sqrt|frac|sum|lim|int|prod)\b/,DCe=/\b\d{4}\/\d{1,2}\/\d{1,2}(?:[ T]\d{1,2}:\d{2}(?::\d{2})?)?\b/,$Ce={"\b":"\\b","\v":"\\v","\f":"\\f"};function BCe(e){let t="";for(const n of e)t+=$Ce[n]??n;return t}function ju(e){if(!e)return!1;const t=BCe(e),n=t.trim();if(DCe.test(n)||n.includes("**"))return!1;if(n.length>2e3)return!0;const i=SCe.test(t),s=_Ce.test(t),o=ICe.test(t),r=MCe.test(t),l=/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)_(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t)||/(?:^|[^\w\\])(?:[A-Z]|\\[A-Z]+)\^(?:\{[^}]+\}|[A-Z0-9\\])/i.test(t),a=ECe.test(t)&&!TCe.test(t),u=LCe.test(t),c=NCe.test(n),d=FCe.test(t),f=/^\([a-z]\)$/i.test(n)||/^(?:[a-z]|pi)$/i.test(n),h=/^(?:[A-Z][a-z]?(?:_\{?\d+\}?|\^\{?\d+\}?)?)+$/.test(n);return i||s||o||r||l||a||u||c||d||f||h}const tR="__markstreamMathPluginApplied",a8=80,nR=2e4,TI=nR+4096;function J6(e){return!!e[tR]}function zCe(e){e[tR]=!0}const iR=["ldots","cdots","quad","in","displaystyle","int_","lim","lim_","ce","pu","end","infty","perp","mid","operatorname","to","rightarrow","leftarrow","math","mathrm","mathit","mathbb","mathcal","mathfrak","implies","alpha","beta","gamma","delta","epsilon","lambda","sum","sum_","prod","sqrt","fbox","boxed","color","rule","edef","fcolorbox","hline","hdashline","cdot","times","pm","le","ge","neq","sin","cos","tan","log","ln","exp","frac","text","left","right"],RCe=["cdot","mathbf{","partial","mu_{"],sR=iR.slice().sort((e,t)=>t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),oR="[ \r\b\f\v]",OCe=new RegExp(`([^\\\\])(${RCe.map(e=>e).join("|")})+`,"g"),PCe=/span\{([^}]+)\}/,jCe=/\\operatorname\{span\}\{((?:[^{}]|\{[^}]*\})+)\}/,HCe=/(^|[^\\])\\\r?\n/g,WCe=/(^|[^\\])\\$/g,qCe=/[\p{L}\p{M}\p{N}\p{Pe}\p{Pf}'′″‴|‖]/u,UCe=new RegExp(`(${oR})|(${sR})\\b`,"g"),LI=new Map,NI=new Map;function KCe(e){if(!e)return UCe;const t=[...e];t.sort((r,l)=>l.length-r.length);const n=t.join(""),i=LI.get(n);if(i)return i;const s=`(?:${t.map(r=>r.replace(/[.*+?^${}()|[\\]\\"\]/g,"\\$&")).join("|")})`,o=new RegExp(`(${oR})|(${s})\\b`,"g");return LI.set(n,o),o}function VCe(e,t){const n=e?[]:[...t??[]];e||n.sort((l,a)=>a.length-l.length);const i=e?"__default__":n.join(""),s=NI.get(i);if(s)return s;const o=e?[zv,sR].filter(Boolean).join("|"):[n.map(l=>l.replace(/[.*+?^${}()|[\\]\\\]/g,"\\$&")).join("|"),zv].filter(Boolean).join("|"),r=new RegExp(`(^|[^\\\\\\w])(${o})\\s*\\{`,"g");return NI.set(i,r),r}const FI={" ":"t","\r":"r","\b":"b","\f":"f","\v":"v"};function DI(e){const t=/(^|[^\\])(__|\*\*)/g;let n=0;for(;t.exec(e)!==null;)n++;return n}function ZCe(e){return e.replace(/(^|[^\\])!+/gu,(t,n)=>{if(n&&qCe.test(n))return t;const i=n?t.slice(n.length):t;return`${n}${"\\!".repeat(i.length)}`})}function $I(e){const t=/(^|[^\\])(__|\*\*)/g;let n,i=null;for(;(n=t.exec(e))!==null;)i={marker:n[2],index:n.index+(n[1]?.length??0)};return i}function Su(e,t){const n=t?.commands??iR,i=t?.escapeExclamation??!0,s=t?.commands==null,o=KCe(s?void 0:n);let r=e.replace(o,(u,c,d,f,h)=>{if(c!==void 0&&FI[c]!==void 0)return`\\${FI[c]}`;if(d&&n.includes(d)){const g=h&&typeof f=="number"?h[f-1]:void 0;return g==="\\"||g&&/\w/.test(g)?u:`\\${d}`}return u});i&&(r=ZCe(r));let l=r;const a=VCe(s,s?void 0:n);return l=l.replace(a,(u,c,d)=>`${c}\\${d}{`),l=l.replace(PCe,"span\\{$1\\}").replace(jCe,"\\operatorname{span}\\{$1\\}"),l=l.replace(HCe,`$1\\\\ +`),l=l.replace(WCe,"$1\\\\"),l=l.replace(OCe,"$1\\$2"),l}function BI(e){const t=e.trim();return!(!ju(t)||/"[^"\n]{1,80}"\s*:\s*/.test(t)||!(/\\[a-z]+/i.test(t)||/[=+*/^<>]|\\times|\\pm|\\cdot|\\le|\\ge|\\neq/.test(t)||/[_^]/.test(t))&&/\s-\s/.test(t))}function rR(e){const t=[];let n=0;for(;n<e.length;){if(e[n]!=="`"){n++;continue}const i=n;let s=1;for(;i+s<e.length&&e[i+s]==="`";)s++;let o=i+s,r=-1;for(;o<e.length;){if(e[o]!=="`"){o++;continue}let l=1;for(;o+l<e.length&&e[o+l]==="`";)l++;if(l===s){r=o;break}o+=l}if(r!==-1){t.push([i,r+s]),n=r+s;continue}n=i+s}return t}function Rv(e,t){for(const n of e)if(t>=n[0]&&t<n[1])return n;return null}function GCe(e,t=!1){const n=[];let i=0;for(;i<e.length-1;){if(e[i]==="!"&&e[i+1]==="["){const s=i;let o=i+2,r=1;for(;o<e.length&&r>0;){if(e[o]==="\\"&&o+1<e.length){o+=2;continue}e[o]==="["?r++:e[o]==="]"&&r--,o++}if(r===0&&o<e.length&&e[o]==="("){let l=o+1,a=1;for(;l<e.length&&a>0;){if(e[l]==="\\"&&l+1<e.length){l+=2;continue}e[l]==="("?a++:e[l]===")"&&a--,l++}if(a===0){n.push([s,l]),i=l;continue}if(t){n.push([s,e.length]),i=e.length;continue}}}i++}return n}function Q0(e,t){let n=t-1,i=0;for(;n>=0&&e[n]==="\\";)i++,n--;return i%2===1}function u8(e,t){let n=t;for(;n<e.length;){const i=e.indexOf("$",n);if(i===-1)return-1;if(Q0(e,i)){n=i+1;continue}return i}return-1}function E3(e,t){let n=t;for(;n<e.length;){const i=u8(e,n);if(i===-1)return-1;if(i>0&&e[i-1]==="$"||i+1<e.length&&e[i+1]==="$"){n=i+1;continue}return i}return-1}function Hf(e,t,n=0){let i=Math.max(0,n);for(;i<e.length;){const s=e.indexOf(t,i);if(s===-1)return-1;if(!Q0(e,s))return s;i=s+Math.max(1,t.length)}return-1}function zI(e,t,n=0,i=e.length,s=[]){let o=0,r=Math.max(0,n);const l=Math.min(e.length,Math.max(0,i));for(;r<l;){const a=e.indexOf(t,r);if(a===-1||a>=l)break;const u=Rv(s,a);if(u){r=Math.max(a+Math.max(1,t.length),u[1]);continue}Q0(e,a)||o++,r=a+Math.max(1,t.length)}return o}function X6(e,t,n){const i=g0(String(e??""));if(!i.endsWith(t))return-1;const s=i.length-t.length;if(s<=0||!g0(i.slice(0,s)).trim()||Q0(i,s))return-1;const o=rR(i);if(Rv(o,s))return-1;const r=zI(i,t,0,s,o);if(t==="$$"){if(r%2===1)return-1}else if(r>zI(i,n,0,s,o))return-1;return s}function p0(e){return e===" "||e===" "}function g0(e){let t=e.length;for(;t>0&&p0(e[t-1]);)t--;return e.slice(0,t)}function RI(e){let t=0;for(let n=0;n<e.length;n++)e[n]===` +`&&t++;return t}function OI(e){if(!e)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}function QCe(e){if(e.length<3)return!1;const t=e[0];if(t!=="-"&&t!=="*"&&t!=="_"&&t!=="=")return!1;let n=0;for(let i=0;i<e.length;i++){const s=e[i];if(s===t){n++;continue}if(!p0(s))return!1}return n>=3}function YCe(e){const t=e.trim();if(!t)return!1;let n=0;t[n]===":"&&n++;let i=0;for(;t[n]==="-";)i++,n++;return i<3?!1:(t[n]===":"&&n++,n===t.length)}function JCe(e){if(!e.includes("|"))return!1;const t=e[0]==="|"?e.slice(1):e;return(t.endsWith("|")?t.slice(0,-1):t).split("|").every(YCe)}function XCe(e){let t=0;if(!OI(e[t]))return!1;for(;OI(e[t]);)t++;return e[t]!=="."&&e[t]!==")"?!1:p0(e[t+1])}function lR(e){const t=e.trimStart();if(!t||t.startsWith("```")||t.startsWith("~~~")||t.startsWith(":::")||t[0]===">"||t[0]==="<")return!0;if(t[0]==="#"){let n=0;for(;t[n]==="#";)n++;if(n>=1&&n<=6&&p0(t[n]))return!0}return!!((t[0]==="-"||t[0]==="+"||t[0]==="*")&&p0(t[1])||XCe(t)||QCe(t)||JCe(t))}function PI(e,t){return e?t?`${e} +${t}`:e:t}function c8(e){const t=String(e??"").trim();return t?ju(t):!1}function jI(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)|0;return t.toString(36)}function aR(e){if(e.length<=TI)return{source:e,lineOffset:0};let t=e.length-TI;const n=e.indexOf(` +`,t);return n===-1?{source:"",lineOffset:RI(e)}:(t=n+1,{source:e.slice(t),lineOffset:RI(e.slice(0,t))})}function uR(e){const t=String(e??"");if(!t||!t.includes("$$")&&!t.includes("\\["))return!1;const{source:n}=aR(t);if(!n)return!1;const i=n.split(/\r?\n/),s=Math.max(0,i.length-a8-2),o=[["$$","$$"],["\\[","\\]"]];for(let r=s;r<i.length;r++){const l=g0(i[r]);if(l&&!lR(l)){for(const[a,u]of o)if(X6(l,a,u)!==-1)return!0}}return!1}function ewe(e){const t=String(e??"");if(!t||!t.includes("$$")&&!t.includes("\\["))return null;const{source:n,lineOffset:i}=aR(t);if(!n)return null;const s=n.split(/\r?\n/),o=Math.max(0,s.length-a8-2),r=[["$$","$$"],["\\[","\\]"]];for(let l=o;l<s.length-1;l++){const a=g0(s[l]);for(const[u,c]of r){const d=X6(a,u,c);if(d===-1)continue;let f="",h=!1;for(let g=l+1;g<s.length;g++){if(g-l>a8){h=!0;break}const m=s[g],y=Hf(m,c);if(y!==-1){const A=PI(f,m.slice(0,y));if(!c8(A)){h=!0;break}const b=m.slice(y+c.length),C=b.trim()?`suffix:${jI(b)}`:"nosuffix";return["closed",u,i+l,d,i+g,y,jI(A),C].join(":")}if(lR(m)){h=!0;break}if(f=PI(f,m),f.length>nR){h=!0;break}}if(!h&&c8(f))return["pending",u,i+l,d].join(":")}}return null}function T3(e,t){const n=String(e??"").trim();return!n||!/^\d[\d,.]*\s*[~~-]\s*$/.test(n)?!1:/\d/.test(String(t??""))}function twe(e){const t=String(e??"").trimStart(),n=t.match(/^\d+(?:,\d{3})*(?:\.\d+)?/);if(!n)return!1;const i=t.slice(n[0].length);return/^\s*(?:[+\-*/^_=<>]|\\[a-z]+)/i.test(i)?!1:i===""||/^[)\s,.!?;:]/.test(i)}function L3(e){const t=String(e??"").trim();return t?/^(?:\.{3,}|…+)$/.test(t):!1}function nwe(e,t){zCe(e);const n=(r,l,a)=>{const u=String(l??"").replace(/^[\t ]+/,"").replace(/[\t ]+$/,"");if(!u)return;const c=r.push("paragraph_open","p",1);c.map=[a,a+1];const d=r.push("inline","",0);d.content=u,d.map=[a,a+1],d.children=[],r.push("paragraph_close","p",-1)},i=(r,l)=>{const a=r,u=!!t?.strictDelimiters,c=!a?.env?.__markstreamFinal,d=(b,C)=>{let v=C;for(;v<b.length&&(b[v]===" "||b[v]===" ");)v++;if(v===C||!(b[v]===` +`||b[v]==="\r"&&b[v+1]===` +`))return C;const x=b.slice(C,v),S=a.push("text","",0);return S.content=x,v};if(/^\*[^*]+/.test(a.src))return!1;if(a.src[a.pos]==="$"){let b=a.pos+1;for(;a.src[b]==="$";)b++;const C=b-a.pos,v=a.src[b];if(C>=3&&(!v||/\s/.test(v))){const x=a.push("text","",0);return x.content=a.src.slice(a.pos,b),a.pos=b,!0}}const f=[["$$","$$"],["$","$"],["\\(","\\)"]],h=String(a.pending??""),g=Math.max(0,a.pos-h.length);let m=g,y=g;const A=g;for(const[b,C]of f){const v=a.src,x=rR(v),S=GCe(v,c);let _=!1;b==="$$"&&m!==A&&(m=A);let I=-1,M=-1,$=0;const D=T=>{if((T==="undefined"||T==null)&&(T=""),T==="\\"){a.pos=a.pos+T.length,m=a.pos;return}if(T==="\\)"||T==="\\("){const P=a.push("text_special","",0);P.content=T==="\\)"?")":"(",P.markup=T,a.pos=a.pos+T.length,m=a.pos;return}if(!T)return;if(b==="$$"&&T.includes("$")){let P=0;for(;P<T.length;){const R=u8(T,P);if(R===-1){const Z=T.slice(P);if(Z){const pe=a.push("text","",0);pe.content=Z,a.pos=a.pos+Z.length,m=a.pos}break}if(R>0&&T[R-1]==="$"||R+1<T.length&&T[R+1]==="$"){const Z=T.slice(P,R+1);if(Z){const pe=a.push("text","",0);pe.content=Z,a.pos=a.pos+Z.length,m=a.pos}P=R+1;continue}const q=T.slice(P,R);if(q){const Z=a.push("text","",0);Z.content=q,a.pos=a.pos+q.length,m=a.pos}const j=E3(T,R+1);if(j===-1){const Z=T.slice(R),pe=a.push("text","",0);pe.content=Z,a.pos=a.pos+Z.length,m=a.pos;break}const W=T.slice(R+1,j),z=W.includes("`"),H=!W||!W.trim(),ee=T[j+1],V=T3(W,ee),ie=L3(W);if(!z&&!H&&!V&&!ie){const Z=a.push("math_inline","math",0);Z.content=Su(W,t),Z.markup="$",Z.raw=`$${W}$`,Z.loading=!1,a.pos=a.pos+(j-R+1),m=a.pos,P=j+1;continue}const se=a.push("text","",0);se.content="$",a.pos=a.pos+1,m=a.pos,P=R+1}return}const N=T.indexOf("![");if(N!==-1){if(N>0){const q=T.slice(0,N),j=a.push("text","",0);j.content=q,a.pos=a.pos+q.length,m=a.pos}const P=T.slice(N).match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(P){const[,q,j]=P,W=j.match(/^(\S+)(?:\s+"([^"]+)")?\s*$/),z=W?W[1]:j,H=W&&W[2]?W[2]:null,ee=a.push("image","img",0);ee.attrs=[["src",z],["alt",q]],H&&ee.attrs.push(["title",H]),ee.content=q,ee.children=[{type:"text",content:q,tag:""}],a.pos=a.pos+P[0].length,m=a.pos;const V=T.slice(N+P[0].length);V&&D(V);return}const R=a.push("text","",0);R.content=T,a.pos=a.pos+T.length,m=a.pos;return}const O=a.push("text","",0);O.content=T,a.pos=a.pos+T.length,m=a.pos};for(;!(m>=v.length);){const T=v.indexOf(b,m);if(T===-1)break;if(Q0(v,T)){m=T+Math.max(1,b.length);continue}const N=Rv(x,T);if(N){m=N[1];continue}const O=Rv(S,T);if(O){m=O[1];continue}if(T===I&&m===M){if($++,$>2){m=T+Math.max(1,b.length);continue}}else $=0,I=T,M=m;if(b==="("&&T>0){let V=T-1;for(;V>=0&&v[V]===" ";)V--;if(V>=0&&v[V]==="]"){m=T+b.length;continue}}if(b==="$"&&T>0&&v[T-1]==="$"){m=T+1;continue}if(b==="$"&&T<v.length-1&&v[T+1]==="$"){m=T+2;continue}const P=b==="$"?E3(v,T+b.length):wCe(v,T+b.length,b,C);if(P===-1){const V=v.slice(T+b.length);if(V.includes(b)){m=v.indexOf(b,T+b.length);continue}if(P===-1){const ie=b==="$"&&twe(V);if(c&&!u&&!ie&&ju(V)&&!V.includes("`")){if(m=T+b.length,_=!0,!l){a.pending="";const se=y?v.slice(y,m):v.slice(0,m),Z=DI(se)%2===1;if(y)D(v.slice(y,m));else{let pe=v.slice(0,m);pe.endsWith(b)&&(pe=pe.slice(0,pe.length-b.length)),D(pe)}if(Z){const pe=$I(se)?.marker??"**",re=a.push("strong_open","",0);re.markup=pe;const fe=a.push("math_inline","math",0);fe.content=Su(V,t),fe.markup=b==="$$"?"$$":b==="\\("?"\\(\\)":b==="$"?"$":"()",fe.raw=`${b}${V}${C}`,fe.loading=!0,re.content=V,a.push("strong_close","",0)}else{const pe=a.push("math_inline","math",0);pe.content=Su(V,t),pe.markup=b==="$$"?"$$":b==="\\("?"\\(\\)":b==="$"?"$":"()",pe.raw=`${b}${V}${C}`,pe.loading=!0}a.pos=v.length}m=v.length,y=m}break}}const R=v.slice(T+b.length,P),q=R.includes("`"),j=!R||!R.trim(),W=b==="$",z=v[P+C.length],H=W&&T3(R,z),ee=W&&L3(R);if(u?q||j||H||ee:q||j||H||ee||!W&&!ju(R)){m=P+C.length;const V=v.slice(a.pos,m);a.pending||(D(V),y=m);continue}if(_=!0,!l){const V=v.slice(a.pos-(a.pending??"").length,T);let ie=v.slice(0,m)?v.slice(y,T):V;const se=DI(ie)%2===1;T!==a.pos&&se&&(ie=a.pending+v.slice(a.pos,T));const Z=se?$I(ie):null,pe=Z?.marker??"**";if(a.pending!==ie)if(a.pending="",se)if(Z){const re=ie.slice(Z.index+pe.length);D(ie.slice(0,Z.index));const fe=a.push("strong_open","",0);fe.markup=pe;const Ee=a.push("text","",0);Ee.content=re,a.push("strong_close","",0)}else D(ie);else D(ie);if(se){const re=a.push("strong_open","",0);re.markup=pe;const fe=a.push("math_inline","math",0);fe.content=Su(R,t),fe.markup=b==="$$"?"$$":b==="\\("?"\\(\\)":b==="$"?"$":"()",fe.raw=`${b}${R}${C}`,fe.loading=!1;const Ee=v.slice(P+C.length).startsWith(pe);return Ee&&a.push("strong_close","",0),a.pos=d(v,P+C.length),m=a.pos,y=m,Ee||a.push("strong_close","",0),!0}else{const re=a.push("math_inline","math",0);re.content=Su(R,t),re.markup=b==="$$"?"$$":b==="\\("?"\\(\\)":b==="$"?"$":"()",re.raw=`${b}${R}${C}`,re.loading=!1}}return m=d(v,P+C.length),y=m,a.pos=m,!0}if(_){if(l)a.pos=m;else{if(b==="$$"&&m<v.length&&v.slice(m).includes("$")){let T=m;for(;!(T>=v.length);){const N=u8(v,T);if(N===-1)break;if(N+1<v.length&&v[N+1]==="$"){T=N+2;continue}if(N>0&&v[N-1]==="$"){T=N+1;continue}const O=E3(v,N+1);if(O===-1)break;const P=v.slice(N+1,O),R=P.includes("`"),q=!P||!P.trim(),j=v[O+1],W=T3(P,j),z=L3(P);if(!R&&!q&&!W&&!z){const H=v.slice(m,N);H&&D(H);const ee=a.push("math_inline","math",0);ee.content=Su(P,t),ee.markup="$",ee.raw=`$${P}$`,ee.loading=!1,m=O+1,T=O+1}else D("$"),T=N+1}T<v.length&&D(v.slice(T))}else m<v.length&&D(v.slice(m));a.pos=v.length}return!0}}return!1},s=(r,l,a,u)=>{const c=r,d=!c?.env?.__markstreamFinal,f=t?.strictDelimiters,h=f?[["\\[","\\]"],["$$","$$"]]:[["\\[","\\]"],["[","]"],["$$","$$"]],g=c.bMarks[l]+c.tShift[l];let m=c.src.slice(g,c.eMarks[l]).trim(),y=!1,A="",b="",C=!1,v="",x=!1;for(const[H,ee]of h)if(m.startsWith(H))if(H.includes("[")){const V=H==="\\["?m.slice(H.length):"";if(H==="\\["&&Hf(V,ee)===-1&&!/^\s*!\[/.test(V)&&!V.includes("`")&&ju(V)){y=!0,A=H,b=ee;break}if(t?.strictDelimiters){if(m.replace("\\","")==="["){if(l+1<a){y=!0,A=H,b=ee;break}continue}}else if(m.replace("\\","")==="["){if(l+1<a){y=!0,A=H,b=ee;break}continue}else{const ie=c.tokens[c.tokens.length-1];if(ie&&ie.type==="list_item_open"&&ie.mark==="-"&&m.slice(H.length,m.indexOf("]")).trim()==="x")continue;if(m.replace("\\","").startsWith("[")&&!m.includes("](")){const se=m.indexOf("]");if(m.slice(se).trim()!=="]")continue;const Z=m.slice(H.length,se);if(H==="["?BI(Z):ju(Z)){y=!0,A=H,b=ee;break}continue}}}else{y=!0,A=H,b=ee;break}else if((H==="$$"||H==="\\[")&&m.endsWith(H)&&l+1<a){const V=X6(m,H,ee);if(V===-1)continue;v=g0(m.slice(0,V)),x=!0;const ie=c.bMarks[l+1]+c.tShift[l+1];m=c.src.slice(ie,c.eMarks[l+1]).trim(),C=!0,y=!0,A=H,b=ee;break}if(!y)return!1;if(u&&!x)return!0;const S=m.indexOf(A),_=S+A.length,I=!f&&A==="["?m.indexOf("\\]",_):-1,M=I>=0?"\\]":b,$=I>=0?I:Hf(m,b,_);if(!C&&$>A.length){const H=m.slice(S+A.length,$),ee=c.push("math_block","math",0);ee.content=Su(H),ee.markup=A==="$$"?"$$":A==="["?"[]":"\\[\\]",ee.map=[l,l+1],ee.raw=`${A}${H}${M}`,ee.block=!0,ee.loading=!1,c.line=l+1;const V=m.slice($+M.length);return V.trim()&&n(c,V,l),!0}let D=l,T="",N=!1,O="",P=l;const R=C?m:m===A?"":m.slice(A.length),q=!f&&A==="\\["?"]":"",j=Hf(R,b);if(j!==-1){const H=j;T=R.slice(0,H),O=R.slice(H+b.length),P=C?l+1:l,N=!0,D=P}else for(R&&!C&&(T=R),D=l+1;D<a;D++){const H=c.bMarks[D]+c.tShift[D],ee=c.eMarks[D],V=c.src.slice(H,ee),ie=V.trim();if(!f&&A==="["&&ie==="\\]"){b="\\]",N=!0;break}if(q&&V.trim()===q){b=q,N=!0;break}if(ie===b){N=!0;break}else if(!f&&A==="["&&V.includes("\\]")){N=!0;const se=V.indexOf("\\]");b="\\]";const Z=V.slice(0,se);Z&&(T+=(T?` +`:"")+Z),O=V.slice(se+b.length),P=D;break}else if(Hf(V,b)!==-1){N=!0;const se=Hf(V,b),Z=V.slice(0,se);Z&&(T+=(T?` +`:"")+Z),O=V.slice(se+b.length),P=D;break}T+=(T?` +`:"")+V}if((!d||f)&&!N)return!1;const W=/^\s*!\[/.test(T);if(!(x?!W&&c8(T):A==="$$"?!W:A==="["?BI(T):ju(T)))return!1;if(u)return!0;v&&n(c,v,l);const z=c.push("math_block","math",0);return z.content=Su(T),z.markup=A==="$$"?"$$":A==="["?"[]":"\\[\\]",z.raw=`${A}${T}${T.startsWith(` +`)?` +`:""}${b}`,z.map=[l,D+1],z.block=!0,z.loading=!N,c.line=D+1,O.trim()&&n(c,O,P),!0},o=(r,l,a,u)=>{const c=r,d=c.bMarks[l]+c.tShift[l],f=c.src.slice(d,c.eMarks[l]).trim();return!f.startsWith("$$")&&!f.startsWith("\\[")?!1:s(r,l,a,u)};e.inline.ruler.before("escape","math",i),e.block.ruler.before("lheading","explicit_math_block",o,{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph","math_block",s,{alt:["paragraph","reference","blockquote","list"]})}function iwe(e){const t=e.renderer.rules.image||function(n,i,s,o,r){const l=n,a=r;return a.renderToken?a.renderToken(l,i,s):""};e.renderer.rules.image=(n,i,s,o,r)=>{const l=n;return l[i].attrSet?.("loading","lazy"),t(l,i,s,o,r)},e.renderer.rules.fence=e.renderer.rules.fence||((n,i)=>{const s=n[i],o=String(s.info??"").trim();return`<pre class="${o?`language-${e.utils.escapeHtml(o.split(/\s+/g)[0])}`:""}"><code>${e.utils.escapeHtml(String(s.content??""))}</code></pre>`})}const swe=/^<a[>\s]/i,owe=/^<\/a\s*>/i;function rwe(e,t){if(e?.type!=="inline")return!1;const n=e.children;if(!Array.isArray(n)||n.length===0)return t.test(String(e.content??""));let i=0;for(let s=n.length-1;s>=0;s--){const o=n[s];if(o?.type==="link_close"){for(s--;s>=0&&n[s]?.level!==o.level&&n[s]?.type!=="link_open";)s--;continue}if(o?.type==="html_inline"){const r=String(o.content??"");swe.test(r)&&i>0&&i--,owe.test(r)&&i++}if(!(i>0)&&o?.type==="text"&&t.test(String(o.content??"")))return!0}return!1}function lwe(e){const t=e.core?.ruler,n=t.getNamedRules?.().find(i=>i.name==="linkify")?.fn;typeof n=="function"&&t.at("linkify",i=>{if(!i.md?.options?.linkify)return;const s=Array.isArray(i.tokens)?i.tokens:[],o=i.md.linkify;if(!o)return;const r=s.filter(l=>rwe(l,o));if(r.length)return n(Object.assign(Object.create(Object.getPrototypeOf(i)),i,{tokens:r}))})}function awe(e){const t=e.inline.ruler,n=t.getNamedRules?.(),i=n?.find(l=>l.name==="link")?.fn,s=n?.find(l=>l.name==="image")?.fn;if(typeof i!="function"||typeof s!="function")return;const o=e.validateLink,r=e;r.__markstreamOriginalValidateLink=o,t.at("link",(...l)=>{const a=l[0].md,u=a?.validateLink===o?a.options?.validateLink:a?.validateLink;if(!a||typeof u!="function")return i(...l);const c=a.validateLink;a.validateLink=u;try{return i(...l)}finally{a.validateLink=c}}),t.at("image",(...l)=>{const a=l[0].md;if(!a)return s(...l);const u=a.validateLink;a.validateLink=o;try{return s(...l)}finally{a.validateLink=u}})}function uwe(e={}){const t=e.markdownItOptions??{},n=typeof t.experimental=="object"&&t.experimental!==null?t.experimental:{},i=Object.prototype.hasOwnProperty.call(t,"stream")?!!t.stream:!0,s=Object.prototype.hasOwnProperty.call(t,"validateLink"),o=new B7e({html:!0,linkify:!0,typographer:!0,...t,experimental:{stream:i,...n}});if(!s){const r=l=>!Td(l,{tagName:"a",attrName:"href"});nCe(r),o.set({validateLink:r})}return awe(o),lwe(o),(e.enableMath??!0)&&nwe(o,{...e.mathOptions??{}}),(e.enableContainers??!0)&&nAe(o),e.enableFixIndentedCodeBlock!==!1&&SAe(o),lCe(o),dCe(o),uCe(o),gCe(o),iwe(o),wAe(o,{customHtmlTags:e.customHtmlTags}),o}function Ld(e){const t=Object.assign(Object.create(Object.getPrototypeOf(e)),e);return Array.isArray(e.attrs)&&(t.attrs=e.attrs.map(n=>[...n])),Array.isArray(e.map)&&(t.map=[...e.map]),Array.isArray(e.children)&&(t.children=e.children.map(n=>Ld(n))),t}function cwe(e){const t=e.meta??{};return{type:"checkbox",checked:t.checked===!0,raw:t.checked?"[x]":"[ ]"}}function dwe(e){const t=e,n=t.attrGet?t.attrGet("checked"):void 0,i=n===""||n==="true";return{type:"checkbox_input",checked:i,raw:i?"[x]":"[ ]"}}function fwe(e){const t=String(e.content??"");return{type:"emoji",name:t,markup:String(e.markup??""),raw:`:${t}:`}}function Am(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="em_close";){const l=e[o];s+=String(e[o].content??l.text??""),r.push(e[o]),o++}return i.push(...as(r,void 0,void 0,n)),{node:{type:"emphasis",children:i,raw:`*${s}*`},nextIndex:o<e.length?o+1:e.length}}function hwe(e,t){return new RegExp(`\r? +[ \\t]*${e}{${t},}[ \\t]*$`)}const cR=["diff ","index ","--- ","+++ ","@@ "],pwe=/\r?\n/;function gwe(e){const t=String(e??"");return t?cR.some(n=>n.startsWith(t)||t.startsWith(n)):!1}function HI(e,t,n,i){n.length>0&&e.push(...n),i.length>0&&t.push(...i),n.length=0,i.length=0}function WI(e,t){return!t&&e.startsWith(" ")&&!e.startsWith(" ")?` ${e}`:e}function mwe(e,t){const n=[],i=[],s=[],o=[],r=e.split(pwe),l=/\r?\n$/.test(e),a=r.some(h=>h.startsWith("diff ")||h.startsWith("--- ")||h.startsWith("+++ ")||h.startsWith("@@ ")),u=h=>{const g=h;if(!cR.some(m=>g.startsWith(m)))if(g.startsWith("-")){const m=g.slice(1);s.push(WI(m,a))}else if(g.startsWith("+")){const m=g.slice(1);o.push(WI(m,a))}else{HI(n,i,s,o);const m=a&&g.startsWith(" ")?g.slice(1):g;n.push(m),i.push(m)}},c=l?Math.max(0,r.length-1):r.length;for(let h=0;h<c;h++){const g=r[h]??"";!t&&!l&&h===c-1&&gwe(g)||u(g)}(t||s.length>0||o.length>0)&&HI(n,i,s,o);const d=n.join(` +`),f=i.join(` +`);return{original:t&&l&&d?`${d} +`:d,updated:t&&l&&f?`${f} +`:f}}function e7(e){const t=Array.isArray(e.map)&&e.map.length===2,n=e.meta??{},i=typeof n.closed=="boolean"?n.closed:void 0,s=i===!0||i!==!1&&t,o=String(e.info??""),r=o.startsWith("diff"),l=r?(()=>{const u=o,c=u.indexOf(" ");return c===-1?"":String(u.slice(c+1)??"")})():o;let a=String(e.content??"");if(!s&&e.markup){const u=e.markup[0],c=e.markup.length,d=hwe(u,c);d.test(a)&&(a=a.replace(d,""))}if(r){const{original:u,updated:c}=mwe(a,s===!0);return{type:"code_block",language:l,code:String(c??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t,originalCode:u,updatedCode:c}}return{type:"code_block",language:l,code:String(a??""),raw:String(a??""),diff:r,loading:i===!0?!1:i===!1?!0:!t}}function vwe(e){const t=e.meta??{};return{type:"footnote_reference",id:String(t.label??""),raw:`[^${String(t.label??"")}]`}}function ywe(){return{type:"hardbreak",raw:`\\ +`}}function kwe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="mark_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...as(r,void 0,void 0,n)),{node:{type:"highlight",children:i,raw:`==${s}==`},nextIndex:o<e.length?o+1:e.length}}let N3=null;const F3=new WeakMap;function qI(){return N3||(N3={customTagSet:null,allowedTagSet:a9()}),N3}function dR(e){const t=e.match(/^<\s*(?:\/\s*)?([\w-]+)/);return t?t[1].toLowerCase():""}function fR(e){return/^<\s*\//.test(e)}function hR(e,t){return/\/\s*>\s*$/.test(t)||dc.has(e)}function bwe(e){if(!e||e.length===0)return qI();const t=F3.get(e);if(t)return t;const n=e.map(yl).filter(Boolean);if(!n.length){const s=qI();return F3.set(e,s),s}const i={customTagSet:new Set(n),allowedTagSet:a9({customHtmlTags:e})};return F3.set(e,i),i}function pR(e){const t=e,n=t.raw??t.content??t.markup??"";return String(n??"")}function Awe(e){const t=e.meta,n=t?.markstreamCustomHtmlRaw,i=t?.markstreamCustomHtmlInner;return typeof n=="string"&&typeof i=="string"?{raw:n,inner:i}:null}function Ov(e,t){const n=t.toLowerCase();for(let i=e.length-1;i>=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function Cwe(e,t,n){const i=e.slice();return Ov(i,"href")||i.push(["href",t]),n!=null&&!Ov(i,"title")&&i.push(["title",n]),i}function d8(e){return e.map(pR).join("")}function a2(e){const t=[],n=i=>{const s=String(i??"");if(!s)return;const o=t[t.length-1];if(o?.type==="text"){o.content=`${o.content}${s}`,o.raw=`${o.raw}${s}`;return}t.push({type:"text",content:s,raw:s})};for(const i of e)if(i){if(i.type==="reference"||i.type==="footnote_reference"){n(String(i.raw??""));continue}if("children"in i&&Array.isArray(i.children)){t.push({...i,children:a2(i.children)});continue}t.push(i)}return t}function wwe(e,t,n){let i=0;for(let s=t;s<e.length;s++){const o=e[s];if(o.type!=="html_inline")continue;const r=String(o.content??""),l=dR(r),a=fR(r),u=hR(l,r);if(!a&&!u&&l===n){i++;continue}if(a&&l===n){if(i===0)return s;i--}}return-1}function D3(e,t,n){const i=[e[t]];let s=[],o=t+1,r=!1;const l=n?wwe(e,t+1,n):-1;return l!==-1?(s=e.slice(t+1,l),i.push(...s,e[l]),o=l+1,r=!0):(s=e.slice(t+1),s.length&&i.push(...s),o=e.length),{closed:r,html:d8(i),innerTokens:s,nextIndex:o}}function xwe(e,t,n,i,s,o,r){const l=String(e.content??""),a=dR(l),{customTagSet:u,allowedTagSet:c}=bwe(r?.customHtmlTags);if(!a)return[{type:"inline_code",code:l,raw:l},n+1];if(!c.has(a)&&!D3(t,n,a).closed){const x=pR(e);return[{type:"text",content:x,raw:x},n+1]}if(a==="br")return[{type:"hardbreak",raw:l},n+1];const d=fR(l),f=hR(a,l);if(d)return[{type:"html_inline",tag:a,content:l,children:[],raw:l,loading:!1},n+1];if(a==="a"){const x=D3(t,n,a),S=s9(l),_=x.innerTokens,I=String(Ov(S,"href")??""),M=Ov(S,"title"),$=M==null?null:String(M),D=Cwe(S,I,$),T=a2(_.length?i(_,s,o,r):[]),N=_.length?d8(_):I||"";return!T.length&&N&&T.push({type:"text",content:N,raw:N}),[{type:"link",href:I,title:$,text:N,attrs:D,children:T,loading:!x.closed,raw:x.html||l},x.nextIndex]}if(f)return[{type:u?.has(a)?a:"html_inline",tag:a,content:l,children:[],raw:l,loading:!1},n+1];const h=D3(t,n,a);if(a==="p"||a==="div")return[{type:"paragraph",children:a2(h.innerTokens.length?i(h.innerTokens,s,o,r):[]),raw:h.html},h.nextIndex];const g=a2(h.innerTokens.length?i(h.innerTokens,s,o,r):[]);let m=h.html||l,y=!h.closed,A=!1;if(!h.closed){const x=`</${a}>`;m.toLowerCase().includes(x.toLowerCase())||(m+=x),A=!0,y=!0}const b=[],C=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let v;for(;(v=C.exec(l))!==null;){const x=v[1],S=v[2]||v[3]||v[4]||"";b.push([x,S])}if(u?.has(a)){const x=Awe(e);return[{type:a,tag:a,attrs:b,content:x?x.inner:h.innerTokens.length?d8(h.innerTokens):"",children:h.innerTokens.length?i(h.innerTokens,s,o,r):[],raw:x?.raw??m,loading:e.loading||y,autoClosed:A},h.nextIndex]}return[{type:"html_inline",tag:a,attrs:b,content:m,children:g,raw:m,loading:y,autoClosed:A},h.nextIndex]}function gR(e){if(e.type==="math_inline"){if(e.raw)return String(e.raw);const t=e.markup==="$$"?"$$":"$";return`${t}${String(e.content??"")}${t}`}return Array.isArray(e.children)&&e.children.length>0?e.children.map(t=>gR(t)).join(""):String(e.content??"")}function Swe(e){return!e||!Array.isArray(e.children)||e.children.length===0?"":e.children.map(t=>gR(t)).join("")}function UI(e,t=!1){let n=e.attrs??[],i=null;if((!n||n.length===0)&&Array.isArray(e.children))for(const d of e.children){const f=d.attrs;if(Array.isArray(f)&&f.length>0){n=f,i=d;break}}const s=String(n.find(d=>d[0]==="src")?.[1]??""),o=n.find(d=>d[0]==="alt")?.[1],r=Swe(i??e);let l="";r?l=r:o!=null&&String(o).length>0?l=String(o):i?.content!=null&&String(i.content).length>0?l=String(i.content):Array.isArray(i?.children)&&i.children[0]?.content?l=String(i.children[0].content):Array.isArray(e.children)&&e.children[0]?.content?l=String(e.children[0].content):e.content!=null&&String(e.content).length>0&&(l=String(e.content));const a=n.find(d=>d[0]==="title")?.[1]??null,u=a===null?null:String(a),c=String(e.content??"");return{type:"image",src:s,alt:l,title:u,raw:c,loading:t}}function _we(e){const t=String(e.content??"");return{type:"inline_code",code:t,raw:t}}function Iwe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="ins_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...as(r,void 0,void 0,n)),{node:{type:"insert",children:i,raw:`++${String(s)}++`},nextIndex:o<e.length?o+1:e.length}}function Mwe(e){const t=[];if(!Array.isArray(e))return t;for(const n of e){const i=n?.[0];i&&t.push([String(i),String(n?.[1]??"")])}return t}function Pv(e,t){const n=t.toLowerCase();for(let i=e.length-1;i>=0;i--){const[s,o]=e[i];if(String(s).toLowerCase()===n)return o}}function Ewe(e,t,n){const i=e.slice();return Pv(i,"href")||i.push(["href",t]),n!=null&&!Pv(i,"title")&&i.push(["title",n]),i}function Cm(e,t,n){const i=e[t],s=Mwe(i.attrs),o=String(Pv(s,"href")??""),r=Pv(s,"title"),l=r==null?null:String(r),a=Ewe(s,o,l);let u=t+1;const c=[];let d=!0;for(;u<e.length&&e[u].type!=="link_close";)c.push(e[u]),u++;e[u]?.type==="link_close"&&(d=!1);let f=c;const h=c[c.length-1];if(n?.__insideStrong&&h?.type==="text"&&String(h.content??"").endsWith("**")&&!c.some(y=>y.type==="strong_open")){const y=String(h.content??""),A=String(h.raw??y),b=Ld(h);b.content=y.slice(0,-2),b.raw=A.replace(/\*\*$/,""),f=c.slice(),f[f.length-1]=b}const g=as(f,void 0,void 0,n),m=g.map(y=>{const A=y;return"content"in y?String(A.content??""):String(A.raw??"")}).join("");return{node:{type:"link",href:o,title:l,text:m,children:g,raw:`[${m}](${o}${l?` "${l}"`:""})`,loading:d,attrs:a},nextIndex:u<e.length?u+1:e.length}}function KI(e){const t=e.content??"",n=e.raw==="$$"?`$${t}$`:e.raw||"";return{type:"math_inline",content:t,loading:!!e.loading,raw:n,markup:e.markup}}function Twe(e){return{type:"reference",id:String(e.content??""),raw:String(e.markup??`[${e.content??""}]`)}}function VI(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="s_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...as(r,void 0,void 0,n)),{node:{type:"strikethrough",children:i,raw:`~~${s}~~`},nextIndex:o<e.length?o+1:e.length}}const Lwe=/\\([\\()[\]`$|*_\-!])/g;function Nwe(e,t){if(!e)return;const n=String(e);if(n&&(n===t||n.replace(Lwe,"$1")===t))return n}function I1(e,t,n,i){const s=[];let o="",r=t+1;const l=[];let a=1;for(;r<e.length;){if(e[r].type==="strong_close"){if(a===1)break;a--}e[r].type==="strong_open"&&a++,o+=String(e[r].content??""),l.push(e[r]),r++}const u={...i,__insideStrong:!0};return s.push(...as(l,Nwe(n,o),void 0,u)),{node:{type:"strong",children:s,raw:`**${String(o)}**`},nextIndex:r<e.length?r+1:e.length}}function Fwe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="sub_close";)s+=String(e[o].content??""),r.push(e[o]),o++;i.push(...as(r,void 0,void 0,n));const l=String(e[t].content??""),a=s||l;return{node:{type:"subscript",children:i.length>0?i:[{type:"text",content:a,raw:a}],raw:`~${a}~`},nextIndex:o<e.length?o+1:e.length}}function Dwe(e,t,n){const i=[];let s="",o=t+1;const r=[];for(;o<e.length&&e[o].type!=="sup_close";)s+=String(e[o].content??""),r.push(e[o]),o++;return i.push(...as(r,void 0,void 0,n)),{node:{type:"superscript",children:i.length>0?i:[{type:"text",content:s||String(e[t].content??""),raw:s||String(e[t].content??"")}],raw:`^${s||String(e[t].content??"")}^`},nextIndex:o<e.length?o+1:e.length}}function $we(e){const t=String(e.content??"");return{type:"text",content:t,raw:t}}const Bwe=/[^~]*~{2,}[^~]+/,zwe=/\*\*/,Rwe=/[[_*^~]/,Owe=/\\([\\()[\]`$|*_\-!])/g,t7=new Set(["\\","(",")","[","]","`","$","|","*","_","-","!"]),Pwe=/\s/u,jwe=/[!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]/,Hwe=/\p{P}/u,Wwe=/^[\x22\x27《「『【〔〖〘〚〈([{“‘﹁﹃﹙﹛﹝]$/u,qwe=/^[\x22\x27》」』】〕〗〙〛〉)]}”’﹂﹄﹚﹜﹞]$/u,Uwe=/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,Kwe=/:\/\//,f8=1,mR=2,Vwe=4,Zwe=8,vR=16,Nu=32,u2=64,ep=128,yR=256,Gwe=512,tp=1024,Qwe=1982;function wm(e){let t=0;for(let n=0;n<e.length;n++)switch(e.charCodeAt(n)){case 33:t|=ep;break;case 36:t|=yR;break;case 40:t|=tp;break;case 42:t|=mR;break;case 91:t|=Nu;break;case 92:t|=f8;break;case 93:t|=u2;break;case 95:t|=Vwe;break;case 96:t|=vR;break;case 124:t|=Gwe;break;case 126:t|=Zwe;break}return t}function Ywe(e){let t=0,n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="*"){n+=2;continue}e[n]==="*"&&t++,n++}return t}function kR(e,t=0){if(!e)return-1;let n=0;for(let i=0;i<e.length;i++){const s=e[i],o=e[i+1];if(s==="\\"&&o&&t7.has(o)){if(o==="*"&&n>=t){n++,i++;continue}n++,i++;continue}if(s==="*"&&n>=t)return n;n++}return-1}function fc(e){return!!e&&Pwe.test(e)}function hc(e){return!!e&&(jwe.test(e)||Hwe.test(e))}function bR(e,t){return!!e&&!!t&&/^\p{Script=Han}$/u.test(t)&&Wwe.test(e)}function AR(e,t){return!!e&&!!t&&/^[\p{L}\p{N}]$/u.test(t)&&qwe.test(e)}function Jwe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!i||fc(i)?!1:!(hc(i)&&!bR(i,n)&&n&&!fc(n)&&!hc(n))}function Xwe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+1];return!n||fc(n)?!1:!(hc(n)&&!AR(n,i)&&i&&!fc(i)&&!hc(i))}function exe(e,t,n=0){let i=n,s=!1;for(;i<t.length;){const o=e?kR(e,i):t.indexOf("*",i);if(o===-1)break;if(Xwe(t,o))return{index:o,sawInvalidClose:s};s=!0,i=o+1}return{index:-1,sawInvalidClose:s}}function txe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+2];return!i||fc(i)?!1:!(hc(i)&&!bR(i,n)&&n&&!fc(n)&&!hc(n))}function nxe(e,t){const n=t>0?e[t-1]:void 0,i=e[t+2];return!n||fc(n)?!1:!(hc(n)&&!AR(n,i)&&i&&!fc(i)&&!hc(i))}function ixe(e,t=0){let n=t,i=!1;for(;n<e.length;){const s=e.indexOf("**",n);if(s===-1)break;if(nxe(e,s))return{index:s,sawInvalidClose:i};i=!0,n=s+2}return{index:-1,sawInvalidClose:i}}function sxe(e){let t="",n=0;for(;n<e.length;){if(e[n]!=="\\"){t+=e[n],n++;continue}let i=0;for(;n+i<e.length&&e[n+i]==="\\";)i++;const s=e[n+i];if(t+="\\".repeat(Math.floor(i/2)),i%2===1){if(s&&t7.has(s)){t+=s,n+=i+1;continue}t+="\\"}n+=i}return t}function oxe(e,t){let n=0;for(let i=0;i<e.length;i++){const s=e[i],o=e[i+1];if(s==="\\"&&o&&t7.has(o)){if(n===t)return i+1;n++,i++;continue}if(n===t)return i;n++}return-1}function rxe(e,t,n){const i=oxe(e,t);if(i===-1||e[i]!==n)return!1;let s=0;for(let o=i-1;o>=0&&e[o]==="\\";o--)s++;return s%2===1}const lxe=/[\p{L}\p{N}]/u,axe=/^[\p{L}\p{N}]+$/u;function h8(e){return e?lxe.test(e):!1}function CR(e){return e?axe.test(e):!1}function wp(e,t){let n=t;for(;n<e.length&&e[n]==="*";)n++;const i=t>0?e[t-1]:void 0,s=n<e.length?e[n]:void 0;return{len:n-t,prev:i,next:s,intraword:h8(i)&&h8(s)}}function uxe(e){const t=[];for(let n=0;n<e.length;){if(e[n]!=="*"){n++;continue}const i=wp(e,n),s=n+i.len;i.len>=2&&i.intraword&&t.push({start:n,end:s}),n=s}for(let n=0;n<t.length-1;n++){const i=t[n],s=t[n+1];if(!CR(e.slice(i.end,s.start)))return s.end}return-1}function cxe(e){return!!e&&e.trim()===e&&/^[\p{L}\p{N}\s]+$/u.test(e)}function dxe(e,t){let n=t;for(;n<e.length;){const i=e.indexOf("***",n);if(i===-1)return-1;const s=wp(e,i);if(s.len>=3)return i;n=i+s.len}return-1}function fxe(e){return e?Uwe.test(e)||Kwe.test(e):!1}function hxe(e,t){if(!e||!t)return null;const n=e.match(/\[([^\]\n]+)\]\(([^)]*)$/);return n&&n[2]===t?n[1]:null}function as(e,t,n,i){if(!e||e.length===0)return[];const s=i?.__linkifyDemotionContext,o=G0(t),r={filename:s?.filename||o.filename,explicitFilename:s?.explicitFilename||o.explicitFilename,marketTicker:s?.marketTicker||o.marketTicker};(r.filename||r.explicitFilename||r.marketTicker)&&(i={...i,__linkifyDemotionContext:r});const l=i,a=[];let u=null,c=0;const d=i?.requireClosingStrong,f=e;function h(){return e===f&&(e=e.slice()),e}function g(){u=null}function m(X,we){const Y=e.length===1?t:String(we.content??""),le=[],Ce=uxe(X);if(Ce!==-1){x(X.slice(0,Ce),X.slice(0,Ce));const oe=X.slice(Ce);return oe&&(D({type:"text",content:oe,raw:oe}),c--),c++,!0}if(Bwe.test(X)){const oe=X.indexOf("~~");oe!==-1&&le.push({type:"strikethrough",index:oe})}if(zwe.test(X)){const oe=X.indexOf("**");oe!==-1&&le.push({type:"strong",index:oe})}if(/[^*]*\*[^*]+/.test(X)){const oe=Y?kR(Y,0):X.indexOf("*");if(Y&&oe===-1)return!1;oe!==-1&&le.push({type:"emphasis",index:oe})}le.sort((oe,Q)=>oe.index!==Q.index?oe.index-Q.index:oe.type===Q.type?0:oe.type==="strong"?-1:Q.type==="strong"?1:0);const ae=le[0];if(!ae)return!1;if(ae.type==="strikethrough"){const oe=ae.index,Q=oe>-1?X.slice(0,oe):"";if(Q&&x(Q,Q),oe===-1)return c++,!0;const ne=X.indexOf("~~",oe+2),ge=ne===-1?X.slice(oe+2):X.slice(oe+2,ne),Ae=ne===-1?"":X.slice(ne+2),{node:_e}=VI([{type:"s_open",tag:"s",content:"",markup:"~~",info:"",meta:null},{type:"text",tag:"",content:ge,markup:"",info:"",meta:null},{type:"s_close",tag:"s",content:"",markup:"~~",info:"",meta:null}],0,i);return g(),v(_e),Ae&&(D({type:"text",content:Ae,raw:Ae}),c--),c++,!0}if(ae.type==="strong"){const oe=ae.index,Q=oe>-1?X.slice(0,oe):"";if(Q&&x(Q,Q),oe===-1)return c++,!0;if(t&&oe===0){let xe=!1,Ne=0;for(;Ne<X.length&&X[Ne]==="*";)Ne++;if(t.startsWith("\\*")&&(xe=!0),xe){let et=0,ut=0;for(;ut<t.length&&et<Ne;)if(t[ut]==="\\"&&ut+1<t.length&&t[ut+1]==="*")et+=1,ut+=2;else{if(t[ut]==="*")break;ut++}if(et>=2)return x(X,X),c++,!0}}if(t&&(X.match(/\*/g)||[]).length>Ywe(t))return x(X.slice(Q.length),X.slice(Q.length)),c++,!0;const ne=wp(X,oe);if(ne.len>=3){const xe=dxe(X,oe+ne.len);if(xe!==-1){const Ne=X.slice(oe+ne.len,xe);if(cxe(Ne)){const{node:et}=I1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Ne,markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,i);g(),v(et);const ut=X.slice(xe+3);return ut&&(D({type:"text",content:ut,raw:ut}),c--),c++,!0}}}if(!txe(X,oe)){const xe=X.slice(oe,oe+ne.len);x(xe,xe);const Ne=X.slice(oe+ne.len);return Ne&&(D({type:"text",content:Ne,raw:Ne}),c--),c++,!0}const ge=ixe(X,oe+2);let Ae="",_e="";if(ge.index!==-1){Ae=X.slice(oe+2,ge.index),_e=X.slice(ge.index+2);const xe=ge.index,Ne=wp(X,xe);if(ne.intraword&&Ne.intraword&&!CR(Ae)||!Ae&&ne.len>=4&&ne.intraword)return x(X.slice(Q.length),X.slice(Q.length)),c++,!0}else{if(d||ge.sawInvalidClose||ne.intraword)return x(X.slice(Q.length),X.slice(Q.length)),c++,!0;Ae=X.slice(oe+2),_e=""}if(!Ae&&/^\*+$/.test(_e))return x(X,X),c++,!0;const{node:Ke}=I1([{type:"strong_open",tag:"strong",content:"",markup:"**",info:"",meta:null},{type:"text",tag:"",content:Ae,markup:"",info:"",meta:null},{type:"strong_close",tag:"strong",content:"",markup:"**",info:"",meta:null}],0,t,i);return g(),v(Ke),_e&&(D({type:"text",content:_e,raw:_e}),c--),c++,!0}if(ae.type==="emphasis"){let oe=ae.index;oe===-1&&(oe=0);const Q=X.slice(0,oe);if(Q&&x(Q,Q),!Jwe(X,oe)){x(X[oe],X[oe]);const xe=X.slice(oe+1);return xe&&(D({type:"text",content:xe,raw:xe}),c--),c++,!0}const ne=wp(X,oe),ge=exe(Y,X,oe+1),Ae=ge.index,_e=e[c+1];if(i?.final&&_e?.type==="em_open"&&Ae!==-1&&X.slice(oe+1,Ae).trim()!==X.slice(oe+1,Ae)||Ae===-1&&(ge.sawInvalidClose||i?.final||ne.intraword||!h8(X[oe+1])))return x(X.slice(oe),X.slice(oe)),c++,!0;const{node:Ke}=Am([{type:"em_open",tag:"em",content:"",markup:"*",info:"",meta:null},{type:"text",tag:"",content:Ae>-1?X.slice(oe+1,Ae):X.slice(oe+1),markup:"",info:"",meta:null},{type:"em_close",tag:"em",content:"",markup:"*",info:"",meta:null}],0,i);if(g(),v(Ke),Ae!==-1&&Ae<X.length-1){const xe=X.slice(Ae+1);xe&&(D({type:"text",content:xe,raw:xe}),c--)}return c++,!0}return!1}function y(X,we){if(!X.includes("`"))return!1;const le=(_e=>{for(let Ke=0;Ke<_e.length;Ke++){if(_e[Ke]!=="`")continue;let xe=0;for(let Ne=Ke-1;Ne>=0&&_e[Ne]==="\\";Ne--)xe++;if(xe%2===0)return Ke}return-1})(X);if(le===-1)return!1;let Ce=1;for(let _e=le+1;_e<X.length&&X[_e]==="`";_e++)Ce++;const ae="`".repeat(Ce),oe=le+Ce,Q=X.indexOf(ae,oe);if(Q===-1){if(Ce===1){const Ke=X.slice(0,le),xe=X.slice(le+1);return Ke&&(m(Ke,we)?c--:x(Ke,Ke)),b({type:"inline_code",code:xe,raw:String(xe)}),c++,!0}let _e=X;for(let Ke=c+1;Ke<e.length;Ke++)_e+=String((e[Ke].content??"")+(e[Ke].markup??""));return c=e.length-1,x(_e,_e),c++,!0}g();const ne=X.slice(0,le),ge=X.slice(le+Ce,Q),Ae=X.slice(Q+Ce);return ne&&(m(ne,we)?c--:x(ne,ne)),b({type:"inline_code",code:ge,raw:String(ge??"")}),Ae&&(D({type:"text",content:Ae,raw:Ae}),c--),c++,!0}function A(X){const we=l?.__markdownIt;if(!we||e.length<=1||!e.some(ae=>ae?.type==="math_inline")||!Rwe.test(X))return null;const Y=we.parseInline(X,{__markstreamFinal:!!i?.final});if(!Array.isArray(Y)||Y.length===0)return null;const le=(Y.find(ae=>ae?.type==="inline")?.children??[]).filter(ae=>!(ae?.type==="text"&&String(ae.content??"")===""));if(!le.length||!le.some(ae=>ae?.type!=="text")||le.length===1&&le[0]?.type==="text"&&String(le[0].content??"")===X)return null;const Ce=as(le,X,n,i);return Ce.length?Ce:null}function b(X){g(),a.push(X)}function C(X){g();const we=Ld(X);a.push(we)}function v(X){b(X)}function x(X,we){u?(u.content+=X,u.raw+=we??X):(u={type:"text",content:String(X??""),raw:String(we??X??"")},a.push(u))}function S(X,we){if(!X)return;const Y=as([{...we,type:"text",content:X,raw:X}],X,n,i);if(Y.length===1&&Y[0]?.type==="text"){const le=Y[0];x(String(le.content??""),String(le.raw??le.content??""));return}for(const le of Y)v(le)}function _(X,we){return String(X.markup??"").startsWith(we)}function I(X){if(!u||X.loading!==!0||X.markup!=="\\(\\)")return;const we=e[c-1];!we||we.type!=="text"||!_(we,"\\(")||u.content.endsWith("(")&&(u.content=u.content.slice(0,-1),u.raw.endsWith("(")&&(u.raw=u.raw.slice(0,-1)),!u.content&&a[a.length-1]===u&&(a.pop(),u=null))}function M(X){return X.endsWith("](")?e[c+1]?.type==="link_open"&&e[c+1]?.markup==="linkify"&&e[c+2]?.type==="text"&&e[c+3]?.type==="link_close"&&e[c+4]?.type==="text"&&String(e[c+4]?.content??"").startsWith(")"):!1}function $(X,we,Y=wm(X)){let le=X;const Ce=String(we.content??"");return(Y&f8)!==0&&le.endsWith("\\")&&!_(we,"\\\\")&&!Ce.endsWith("\\\\")&&(le=le.slice(0,-1)),(Y&tp)!==0&&le.endsWith("(")&&!_(we,"\\(")&&!Ce.endsWith("\\(")&&(le=le.slice(0,-1)),(Y&mR)!==0&&/\*+$/.test(le)&&!_(we,"\\*")&&!Ce.endsWith("\\*")&&(le=le.replace(/\*+$/,"")),le}for(;c<e.length;){const X=e[c];D(X)}function D(X){switch(X.type){case"text":N(X);break;case"softbreak":u?(u.content+=` +`,u.raw+=` +`):(u={type:"text",content:` +`,raw:` +`},a.push(u)),c++;break;case"code_inline":v(_we(X)),c++;break;case"html_inline":{const[we,Y]=xwe(X,e,c,as,t,n,i);v(we),c=Y;break}case"link_open":O(X);break;case"image":ie(X)||(g(),v(UI(X)),c++);break;case"strong_open":{g();const{node:we,nextIndex:Y}=I1(e,c,X.content,i);v(we),c=Y;break}case"em_open":{g();const{node:we,nextIndex:Y}=Am(e,c,i);v(we),c=Y;break}case"s_open":{g();const{node:we,nextIndex:Y}=VI(e,c,i);v(we),c=Y;break}case"mark_open":{g();const{node:we,nextIndex:Y}=kwe(e,c,i);v(we),c=Y;break}case"ins_open":{g();const{node:we,nextIndex:Y}=Iwe(e,c,i);v(we),c=Y;break}case"sub_open":{g();const{node:we,nextIndex:Y}=Fwe(e,c,i);v(we),c=Y;break}case"sup_open":{g();const{node:we,nextIndex:Y}=Dwe(e,c,i);v(we),c=Y;break}case"sub":g(),v({type:"subscript",children:[{type:"text",content:String(X.content??""),raw:String(X.content??"")}],raw:`~${String(X.content??"")}~`}),c++;break;case"sup":g(),v({type:"superscript",children:[{type:"text",content:String(X.content??""),raw:String(X.content??"")}],raw:`^${String(X.content??"")}^`}),c++;break;case"emoji":{g();const we=e[c-1];we?.type==="text"&&/\|:-+/.test(String(we.content??""))?x("",""):v(fwe(X)),c++;break}case"checkbox":g(),v(cwe(X)),c++;break;case"checkbox_input":g(),v(dwe(X)),c++;break;case"footnote_ref":g(),v(vwe(X)),c++;break;case"footnote_anchor":{g();const we=X.meta??{};b({type:"footnote_anchor",id:String(we.label??X.content??""),raw:String(X.content??"")}),c++;break}case"hardbreak":g(),v(ywe()),c++;break;case"fence":g(),v(e7(e[c])),c++;break;case"math_inline":I(X),g(),!X.content&&X.markup==="$"&&e[c+1]?.type==="text"&&e[c+2]?.type==="math_inline"?(v(KI({...X,content:e[c+1].content})),c+=2):v(KI(X)),c++;break;case"reference":R(X);break;case"text_special":x(String(X.content??""),String(X.content??"")),c++;break;default:{const we=X;if(X.type==="link"&&we.href!=null&&i?.validateLink&&!i.validateLink(String(we.href))){g();const Y=String(we.text??"");x(Y,Y),c++}else se(X)||j(X)||z(X)||q(X)||C(X),c++;break}}}function T(X,we,Y,le,Ce=wm(X)){const ae=$we({...we,content:X});if(u){u.content+=i?.final?ae.content:$(ae.content,we,Ce),u.raw+=ae.raw;return}const oe=Y?.tag==="br"&&e[c-2]?.content==="[";le||(ae.content=i?.final?ae.content:$(ae.content,we,Ce)),u=ae,u.center=oe,a.push(u)}function N(X){const we=String(X.content??""),Y=wm(we),le=(Y&f8)!==0,Ce=e.length===1&&le&&typeof t=="string"?String(t):"";let ae=Ce?sxe(Ce):le?we.replace(Owe,"$1"):we;const oe=ae===we?Y:wm(ae);if(X.content==="<"||ae==="1"&&e[c-1]?.tag==="br"){c++;return}const Q=(oe&yR)!==0?ae.indexOf("$"):-1;Q!==-1&&Q===ae.lastIndexOf("$")&&ae.endsWith("$")&&(ae=ae.slice(0,-1)),ae.endsWith("undefined")&&!t?.endsWith("undefined")&&(ae=ae.slice(0,-9));let ne=a.length,ge="";for(let xe=a.length-1;xe>=0;xe--){const Ne=a[xe];if(Ne.type!=="text")break;ne=xe,ge=String(Ne.content??"")+ge}ne<a.length&&(ae.startsWith(ge)?(u=null,a.length=ne):u=a[a.length-1]);const Ae=e[c+1];if((ae==="`"||ae==="|"||ae==="$")&&!_(X,`\\${ae}`)||/^\*+$/.test(ae)&&!_(X,"\\*")){c++;return}if(!Ae&&i?.final!==!0&&(oe&tp)!==0&&/[^\]]\s*\(\s*$/.test(ae)&&(ae=ae.replace(/\(\s*$/,"")),!ae){c++;return}if((oe&(Nu|ep))===(Nu|ep)&&V(ae)||(oe&(u2|tp))===(u2|tp)&&Z(ae))return;if((oe&Qwe)===0){T(ae,X,e[c-1],Ae,oe),c++;return}if((oe&Nu)!==0&&Ee(ae))return;const _e=e[c-1];if((oe&Nu)!==0&&ae==="["&&!Ae?.markup?.includes("*")&&!_(X,"\\[")||(oe&u2)!==0&&ae==="]"&&!_e?.markup?.includes("*")&&!_(X,"\\]")){c++;return}if((oe&vR)!==0&&y(we,X)||(oe&(ep|Nu))===(ep|Nu)&&fe(ae)||(oe&Nu)!==0&&(e[c+1]?.type!=="link_open"||M(ae))&&re(ae,X))return;const Ke=A(we);if(Ke){g();for(const xe of Ke)v(xe);c++;return}m(ae,X)||(T(ae,X,_e,Ae,oe),c++)}function O(X){if(P(X))return;if(pe()){const{node:ne,nextIndex:ge}=Cm(e,c,i),Ae=String(ne.text||ne.href||"");x(Ae,Ae),c=ge;return}g();const we=c,{node:Y,nextIndex:le}=Cm(e,c,i);c=le;const Ce=Y.text||Y.href||"";if(X.markup==="linkify"&&!Gz(Ce,Y.href,t)&&Bv(Ce,l?.__linkifyDemotionContext)){x(Ce,Ce);return}const ae=Y.children.length===1&&Y.children[0]?.type==="text";if(Y.loading&&t&&Y.text===Y.href&&ae){const ne=hxe(t,Y.href);ne&&(Y.text=ne,Y.children=[{type:"text",content:ne,raw:ne}],Y.raw=`[${ne}](${Y.href}${Y.title?` "${Y.title}"`:""})`)}if(i?.validateLink&&!i.validateLink(Y.href)){x(Y.text,Y.text);return}const oe=X.attrs?.find(([ne])=>ne==="href")?.[1],Q=String(oe??"");if(t&&Q){const ne=t.indexOf("](");if(ne!==-1){const ge=t.indexOf(")",ne+2);ge===-1?Y.loading=!0:Y.loading&&t.slice(ne+2,ge).includes(Q)&&(Y.loading=!1)}}/^file:\/\/\/[a-z]:\//i.test(Y.href)&&z(Y,we-1)||q(Y)||b(Y)}function P(X){if(X.markup!=="linkify")return!1;const{node:we,nextIndex:Y}=Cm(e,c,i);return W(we,Y)?(c=Y,!0):!1}function R(X){g(),v(Twe(X)),c++}function q(X){if(X.type!=="link")return!1;const we=a[a.length-1];if(!we||we.type!=="text")return!1;const Y=String(we.content??"").match(/^([^[]*)\[([^\]\n]+)\]\($/);if(!Y)return!1;const le=X,Ce=String(le.href??""),ae=String(le.text??""),oe=String(Y[2]??""),Q=Ce.replace(/^(?:https?:\/\/|mailto:|ftp:\/\/)/i,"");if(!Ce||!(ae===Ce||ae===Q||fxe(ae)))return!1;const ne=String(Y[1]??"");return ne?(we.content=ne,we.raw=ne):a.pop(),b({...X,text:oe,children:[{type:"text",content:oe,raw:oe}],raw:`[${oe}](${Ce}${le.title?` "${le.title}"`:""})`}),!0}function j(X){if(X.type!=="link")return!1;const we=X,Y=String(we.href??"");return Y?W({href:Y,title:we.title==null||we.title===""?null:String(we.title),loading:!!we.loading},c+1):!1}function W(X,we){const Y=a[a.length-1];if(Y?.type!=="image"||Y.src||!Y.loading||!String(Y.raw??"").endsWith("]("))return!1;const le=e[we],Ce=String(le?.content??"");if(le?.type!=="text"||!Ce.startsWith(")"))return!1;a.pop(),u=null;const ae=String(Y.alt??"");b({type:"image",src:X.href,alt:ae,title:X.title,raw:`![${ae}](${X.href}${X.title?` "${X.title}"`:""})`,loading:!!X.loading});const oe=Ce.slice(1),Q=Ld(le);return Q.content=oe,Q.raw=oe,h()[we]=Q,!0}function z(X,we=c-1){if(X.type!=="link")return!1;const Y=a[a.length-1],le=e[we];if(!Y||Y.type!=="text"||le?.type!=="text")return!1;const Ce=String(Y.content??""),ae=String(le.content??"");if(!Ce.endsWith("!")||!ae.endsWith("!")||_(le,"\\!"))return!1;const oe=Ce.slice(0,-1);oe?(Y.content=oe,Y.raw=oe,u=Y):(a.pop(),u=null);const Q=X,ne=String(Q.text??Q.children?.map(_e=>String(_e?.content??_e?.raw??"")).join("")??""),ge=String(Q.href??""),Ae=Q.title==null||Q.title===""?null:String(Q.title);return b({type:"image",src:ge,alt:ne,title:Ae,raw:`![${ne}](${ge}${Ae?` "${Ae}"`:""})`,loading:!!Q.loading}),!0}function H(X,we="",Y=null){const le=String(X.alt??X.raw??"");return{type:"link",href:we,title:Y,text:le,children:[X],raw:`[${le}](${we}${Y?` "${Y}"`:""})`,loading:!0}}function ee(X){const we=X.startsWith("![")?X:`![${X}`,Y=we.slice(2),le=Y.indexOf("](");return{type:"image",src:"",alt:le===-1?Y.replace(/\]$/,""):Y.slice(0,le),title:null,raw:we,loading:!0}}function V(X){const we=X.indexOf("[![");if(we===-1||typeof t=="string"&&e.length===1&&rxe(t,we,"["))return!1;const Y=X.slice(0,we);return Y&&x(Y,Y),b(H(ee(X.slice(we+1)))),c++,!0}function ie(X){if(i?.final)return!1;const we=e[c-1];if(we?.type!=="text"||!String(we.content??"").endsWith("[")||_(we,"\\["))return!1;const Y=a[a.length-1];if(Y?.type==="text"&&Y.content.endsWith("[")){const le=Y.content.slice(0,-1);le?(Y.content=le,Y.raw=le,u=Y):(a.pop(),u=null)}return b(H(UI(X))),c++,!0}function se(X){if(X.type!=="link")return!1;const we=X,Y=String(we.raw??""),le=String(we.text??"");if(!Y.startsWith("[![")&&!le.startsWith("!["))return!1;const Ce=we.title==null||we.title===""?null:String(we.title);return b(H({type:"image",src:String(we.href??""),alt:le.replace(/^!\[/,"").replace(/\]$/,""),title:Ce,raw:Y.startsWith("[![")?Y.slice(1):Y,loading:!0})),!0}function Z(X){if(!X.startsWith("]("))return!1;const we=e[c-2];if(we?.type==="text"&&String(we.content??"").endsWith("[")&&_(we,"\\["))return!1;const Y=a[a.length-1];if(Y?.type!=="image"&&Y?.type!=="link")return!1;const le=Y,Ce=Y?.type==="link"&&Array.isArray(le.children)&&le.children.length===1&&le.children[0]?.type==="image"?a.pop():null,ae=Ce?Ce.children[0]:a.pop();if(!ae||ae.type!=="image")return!1;const oe=e[c+1];let Q=String(Ce?.href??""),ne=Ce?.title==null?null:String(Ce.title),ge=!0;if(oe?.type==="link_open"){const{node:_e,nextIndex:Ke}=Cm(e,c+1,i);Q=_e.href,ne=_e.title,ge=!0,c=Ke}else{if(Q=X.slice(2),Q.includes('"')){const _e=Q.split('"');Q=String(_e[0]??"").trim(),ne=_e[1]==null?null:String(_e[1]).trim()}c++}const Ae=H(ae,Q,ne);return Ae.loading=ge,b(Ae),!0}function pe(){const X=e[c-3];return e[c-2]?.type==="image"&&e[c-1]?.type==="text"&&String(e[c-1].content??"")==="]("&&X?.type==="text"&&String(X.content??"").endsWith("[")&&_(X,"\\[")}function re(X,we){const Y=X.indexOf("[");if(Y===-1)return!1;let le=X.slice(0,Y);const Ce=X.indexOf("](",Y);if(Ce!==-1){const ae=e[c+2];let oe=X.slice(Y+1,Ce);if(oe.includes("[")){const xe=oe.indexOf("[");le+=X.slice(0,Y+xe+1);const Ne=Y+xe+1;oe=X.slice(Ne+1,Ce)}const Q=e[c+1];if(X.endsWith("](")&&Q?.type==="link_open"&&ae){const xe=e[c+4];let Ne=4,et=!0;if(xe?.type==="text"){const yt=String(xe.content??"");if(yt.startsWith(")")){et=!1;const Mt=yt.slice(1);if(Mt){const Ze=Ld(xe);Ze.content=Mt,Ze.raw=Mt,h()[c+4]=Ze}else Ne++}else yt==="."&&Ne++}S(le,we);const ut=String(ae.content??"");return i?.validateLink&&!i.validateLink(ut)?x(oe,oe):b({type:"link",href:ut,title:null,text:oe,children:[{type:"text",content:oe,raw:oe}],loading:et}),c+=Ne,!0}const ne=X.indexOf(")",Ce),ge=ne!==-1?X.slice(Ce+2,ne):"",Ae=ne===-1;let _e=le.match(/\*+$/);if(_e&&(le=le.replace(/\*+$/,"")),S(le,we),_e||(_e=oe.match(/^\*+/)),!d&&_e){const xe=_e[0].length;oe=oe.replace(/^\*+/,"").replace(/\*+$/,"");const Ne=[];if(xe===1?Ne.push({type:"em_open",tag:"em",nesting:1}):xe===2?Ne.push({type:"strong_open",tag:"strong",nesting:1}):xe===3&&(Ne.push({type:"strong_open",tag:"strong",nesting:1}),Ne.push({type:"em_open",tag:"em",nesting:1})),Ne.push({type:"link",href:ge,title:null,text:oe,children:[{type:"text",content:oe,raw:oe}],loading:Ae}),xe===1){Ne.push({type:"em_close",tag:"em",nesting:-1});const{node:et}=Am(Ne,0,i);v(et)}else if(xe===2){Ne.push({type:"strong_close",tag:"strong",nesting:-1});const{node:et}=I1(Ne,0,void 0,i);v(et)}else if(xe===3){Ne.push({type:"em_close",tag:"em",nesting:-1}),Ne.push({type:"strong_close",tag:"strong",nesting:-1});const{node:et}=I1(Ne,0,void 0,i);v(et)}else{const{node:et}=Am(Ne,0,i);v(et)}}else i?.validateLink&&!i.validateLink(ge)?x(oe,oe):b({type:"link",href:ge,title:null,text:oe,children:[{type:"text",content:oe,raw:oe}],loading:Ae});const Ke=ne!==-1?X.slice(ne+1):"";return Ke&&(D({type:"text",content:Ke,raw:Ke}),c--),c++,!0}return!1}function fe(X){const we=X.indexOf("![");if(we===-1)return!1;const Y=X.slice(0,we);return Y&&!u?u={type:"text",content:Y,raw:Y}:Y&&u&&(u.content+=Y),u&&(a.push(u),u=null),b(ee(X.slice(we))),c++,!0}function Ee(X){if(!(X?.startsWith("[")&&n?.type==="list_item_open"))return!1;const we=X.slice(1).match(/[^\s\]]/);if(we===null)return c++,!0;if(we&&/x/i.test(we[0])){const Y=we[0]==="x"||we[0]==="X";return b({type:"checkbox_input",checked:Y,raw:Y?"[x]":"[ ]"}),c++,!0}return!1}return a}function n7(e,t,n){const i=n?.__sourceLineMapper;if(!i)return{startLine:e,endLine:t};const s=i(e),o=t>e?i(t-1).endLine:i(t).startLine;return{startLine:s.startLine,endLine:Math.max(s.startLine,o)}}function ZI(e,t){const n=Math.max(0,Math.min(e.length,Math.trunc(t)));let i=0;for(let s=0;s<n;s++)e[s]===` +`&&i++;return i}function pxe(e,t,n){const i=Math.max(0,Math.min(e.length,Math.trunc(t))),s=Math.max(i,Math.min(e.length,Math.trunc(n))),o=ZI(e,i);let r=ZI(e,s);return s>i&&e[s-1]!==` +`&&r++,{startLine:o,endLine:r}}function m0(e,t,n,i){const s=pxe(e,t,n);return n7(s.startLine,s.endLine,i)}function gxe(e,t){const n=e?.map;if(!Array.isArray(n)||n.length<2)return null;const i=Number(n[0]),s=Number(n[1]);return!Number.isFinite(i)||!Number.isFinite(s)?null:n7(i,s,t)}function Jn(e,t,n){if(!n?.includeSourceMap)return e;const i=gxe(t,n);if(!i)return e;if(e.sourceMap=i,e.type==="code_block"){const s=e;s.startLine=i.startLine,s.endLine=i.endLine}return e}function mxe(e,t,n,i){if(!i?.includeSourceMap)return e;const s=t?.map;if(!Array.isArray(s)||s.length<2)return e;const o=Number(s[0]),r=Number(s[1]),l=Number(n);return!Number.isFinite(o)||!Number.isFinite(r)||!Number.isFinite(l)||(e.sourceMap=n7(o,Math.max(r,l),i)),e}function vxe(e){const t=String(e.content??""),n=t.replace(/[ \t\r\n]+$/g,"");if(n===t)return;e.content=n;const i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??""),r=o.replace(/[ \t\r\n]+$/g,"");if(r===o)break;if(r){s.content=r;break}i.pop();continue}break}}function yxe(e){const t=String(e.content??""),n=t.match(/\r?\n\s*\d+[.)]?\s*$/);if(!n||typeof n.index!="number")return;e.content=t.slice(0,n.index);const i=e.children;if(!(!Array.isArray(i)||i.length===0))for(;i.length;){const s=i[i.length-1];if(!s){i.pop();continue}if(s.type==="softbreak"||s.type==="hardbreak"){i.pop();continue}if(s.type==="text"){const o=String(s.content??"");if(/^[ \t\r\n\d.)]*$/.test(o)){i.pop();continue}const r=o.replace(/[ \t\r\n\d.)]+$/g,"");r!==o&&(r?s.content=r:i.pop())}break}}function kxe(e){const t=String(e.content??"");return/[ \t\r\n]+$/.test(t)||/\r?\n\s*\d+[.)]?\s*$/.test(t)}function Vh(e,t,n){const i=e[t],s=[],o=Tc(n,!0);let r=t+1;for(;r<e.length&&e[r].type!=="bullet_list_close"&&e[r].type!=="ordered_list_close";)if(e[r].type==="list_item_open"){const a=[];let u=r+1;for(;u<e.length&&e[u].type!=="list_item_close";)if(e[u].type==="paragraph_open"){const d=e[u+1],f=kxe(d)?Ld(d):d,h=e[u-1];f!==d&&(yxe(f),vxe(f));const g=String(f.content??""),m={type:"paragraph",children:as(f.children||[],g,h,o.options()),raw:g};n?.includeSourceMap&&Jn(m,e[u],n),a.push(m),o.remember(g),u+=3}else if(e[u].type==="blockquote_open"){const[d,f]=Zh(e,u,o.options());a.push(d),o.remember(d.raw),u=f}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=Vh(e,u,o.options());a.push(d),o.remember(d.raw),u=f}else{const d=s7(e,u,o.options(),i7);d?(a.push(d[0]),o.remember(d[0].raw),u=d[1]):u+=1}const c={type:"list_item",children:a,raw:a.map(d=>d.raw).join("")};n?.includeSourceMap&&Jn(c,e[r],n),s.push(c),r=u+1}else r+=1;const l={type:"list",ordered:i.type==="ordered_list_open",start:(()=>{if(i.attrs&&i.attrs.length){const a=i.attrs.find(u=>u[0]==="start");if(a){const u=Number(a[1]);return Number.isFinite(u)&&u!==0?u:1}}})(),items:s,raw:s.map(a=>a.raw).join(` +`)};return n?.includeSourceMap&&Jn(l,i,n),[l,r+1]}function bxe(e,t,n,i){const s=String(n[1]??"note"),o=String(n[2]??s.charAt(0).toUpperCase()+s.slice(1)),r=[],l=Tc(i,!0);let a=t+1;for(;a<e.length&&e[a].type!=="container_close";)if(e[a].type==="paragraph_open"){const u=e[a+1];if(u){const c={type:"paragraph",children:as(u.children||[],String(u.content??""),void 0,l.options()),raw:String(u.content??"")};i?.includeSourceMap&&Jn(c,e[a],i),r.push(c),l.remember(c.raw)}a+=3}else if(e[a].type==="bullet_list_open"||e[a].type==="ordered_list_open"){const[u,c]=Vh(e,a,l.options());i?.includeSourceMap&&Jn(u,e[a],i),r.push(u),l.remember(u.raw),a=c}else if(e[a].type==="blockquote_open"){const[u,c]=Zh(e,a,l.options());i?.includeSourceMap&&Jn(u,e[a],i),r.push(u),l.remember(u.raw),a=c}else{const u=o9(e,a,l.options());u?(r.push(u[0]),l.remember(u[0].raw),a=u[1]):a++}return[{type:"admonition",kind:s,title:o,children:r,raw:`:::${s} ${o} +${r.map(u=>u.raw).join(` +`)} +:::`},a+1]}const Axe=new Set(["warning","info","note","tip","danger","caution"]);function Cxe(e){let t=0;for(;t<e.length&&t<3&&e[t]===":";)t++;if(t===0||e[t]===":")return null;const n=e.slice(t).trimStart();if(!n)return null;const i=n.search(/\s/),s=(i===-1?n:n.slice(0,i)).toLowerCase();return Axe.has(s)?{kind:s,title:i===-1?"":n.slice(i).trim()}:null}function wxe(e,t,n){const i=e[t];let s="note",o="";const r=i.type.match(/^container_(\w+)_open$/);if(r){s=r[1];const d=String(i.info??"").trim();if(d&&!d.startsWith(":::")&&d.toLowerCase().startsWith(s)){const f=d.slice(s.length).trim();f&&(o=f)}}else{const d=Cxe(String(i.info??"").trim());d&&(s=d.kind,o=d.title)}o||(o=s.charAt(0).toUpperCase()+s.slice(1));const l=[],a=Tc(n,!0);let u=t+1;const c=new RegExp(`^container_${s}_close$`);for(;u<e.length&&e[u].type!=="container_close"&&!c.test(e[u].type);)if(e[u].type==="paragraph_open"){const d=e[u+1];if(d){const f=d.children||[];let h=-1;for(let m=f.length-1;m>=0;m--){const y=f[m];if(y.type==="text"&&/:+/.test(y.content)){h=m;break}}const g={type:"paragraph",children:as((h!==-1?f.slice(0,h):f)||[],void 0,void 0,a.options()),raw:String(d.content??"").replace(/\n:+$/,"").replace(/\n\s*:::\s*$/,"")};n?.includeSourceMap&&Jn(g,e[u],n),l.push(g),a.remember(g.raw)}u+=3}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[d,f]=Vh(e,u,a.options());n?.includeSourceMap&&Jn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else if(e[u].type==="blockquote_open"){const[d,f]=Zh(e,u,a.options());n?.includeSourceMap&&Jn(d,e[u],n),l.push(d),a.remember(d.raw),u=f}else{const d=o9(e,u,a.options());d?(l.push(d[0]),a.remember(d[0].raw),u=d[1]):u++}return[{type:"admonition",kind:s,title:o,children:l,raw:`:::${s} ${o} +${l.map(d=>d.raw).join(` +`)} +:::`},u+1]}const xxe=/^::: ?(warning|info|note|tip|danger|caution|error) ?(.*)$/;function Sxe(e,t,n){const i=e[t];if(i.type!=="container_open")return null;const s=xxe.exec(String(i.info??""));return s?bxe(e,t,s,n):null}const i7={parseContainer:(e,t,n)=>wxe(e,t,n),matchAdmonition:Sxe};function Zh(e,t,n){const i=[],s=Tc(n,!0);let o=t+1;for(;o<e.length&&e[o].type!=="blockquote_close";){const l=e[o];switch(l.type){case"paragraph_open":{const a=e[o+1],u={type:"paragraph",children:as(a.children||[],String(a.content??""),void 0,s.options()),raw:String(a.content??"")};n?.includeSourceMap&&Jn(u,l,n),i.push(u),s.remember(u.raw),o+=3;break}case"bullet_list_open":case"ordered_list_open":{const[a,u]=Vh(e,o,s.options());i.push(a),s.remember(a.raw),o=u;break}case"blockquote_open":{const[a,u]=Zh(e,o,s.options());i.push(a),s.remember(a.raw),o=u;break}default:{const a=s7(e,o,s.options(),i7);a?(i.push(a[0]),s.remember(a[0].raw),o=a[1]):o++;break}}}const r={type:"blockquote",children:i,raw:i.map(l=>l.raw).join(` +`)};return n?.includeSourceMap&&Jn(r,e[t],n),[r,o+1]}function _xe(e){if(e.info?.startsWith("diff"))return e7(e);const t=String(e.content??""),n=t.match(/ type="application\/vnd\.ant\.([^"]+)"/);let i=t;n?.[1]&&(i=t.replace(/<antArtifact[^>]*>/g,"").replace(/<\/antArtifact>/g,""));const s=Array.isArray(e.map)&&e.map.length===2;return{type:"code_block",language:n?n[1]:String(e.info??""),code:i,raw:i,loading:!s}}function Ixe(e,t,n){const i=[];let s=t+1,o=[],r=[];const l=Tc(n,!0);for(;s<e.length&&e[s].type!=="dl_close";)if(e[s].type==="dt_open"){const a=e[s+1];o=as(a.children||[],void 0,void 0,l.options()),l.remember(o.map(u=>u.raw).join("")),s+=3}else if(e[s].type==="dd_open"){let a=s+1;for(r=[];a<e.length&&e[a].type!=="dd_close";)if(e[a].type==="paragraph_open"){const u=e[a+1];r.push({type:"paragraph",children:as(u.children||[],String(u.content??""),void 0,l.options()),raw:String(u.content??"")}),l.remember(String(u.content??"")),a+=3}else a++;o.length>0&&(i.push({type:"definition_item",term:o,definition:r,raw:`${o.map(u=>u.raw).join("")}: ${r.map(u=>u.raw).join(` +`)}`}),o=[]),s=a+1}else s++;return[{type:"definition_list",items:i,raw:i.map(a=>a.raw).join(` +`)},s+1]}function Mxe(e,t,n){const i=e[t].meta??{},s=String(i?.label??"0"),o=[],r=Tc(n,!0);let l=t+1;for(;l<e.length&&e[l].type!=="footnote_close";)if(e[l].type==="paragraph_open"){const a=e[l+1],u=a.children?[...a.children]:[];e[l+2].type==="footnote_anchor"&&u.push(e[l+2]);const c={type:"paragraph",children:as(u,String(a.content??""),void 0,r.options()),raw:String(a.content??"")};o.push(c),r.remember(c.raw),l+=3}else l++;return[{type:"footnote",id:s,children:o,raw:`[^${s}]: ${o.map(a=>a.raw).join(` +`)}`},l+1]}function Exe(e,t,n){const i=e[t],s=i.attrs,o=Array.isArray(s)&&s.length?Object.fromEntries(s.filter(c=>Array.isArray(c)&&c.length>=1&&c[0]).map(([c,d])=>[String(c),d==null||d===""?!0:String(d)])):void 0,r=String(i.tag?.substring(1)??"1"),l=Number.parseInt(r,10),a=e[t+1],u=String(a.content??"");return{type:"heading",level:l,text:u,...o?{attrs:o}:{},children:as(a.children||[],u,void 0,n),raw:u}}function Txe(e,t,n){const i=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${i}(?=\s|>|/)`,"i"),o=new RegExp(String.raw`^<\s*\/\s*${i}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l<e.length;){const a=e.indexOf("<",l);if(a===-1)return-1;const u=e.slice(a);if(o.test(u)){const c=ys(u);if(c===-1)return-1;if(r===0)return a+c+1;r--,l=a+c+1;continue}if(s.test(u)){const c=ys(u);if(c===-1)return-1;const d=u.slice(0,c+1);/\/\s*>$/.test(d)||r++,l=a+c+1;continue}l=a+1}return-1}function wR(e){const t=String(e.content??"");if(/^\s*<!--/.test(t)||/^\s*<!/.test(t)||/^\s*<\?/.test(t))return{type:"html_block",content:t,raw:t,tag:"",loading:!1};const n=(t.match(/^\s*<([A-Z][\w:-]*)/i)?.[1]||"").toLowerCase();if(!n)return{type:"html_block",content:t,raw:t,tag:"",loading:!1};const i=ys(t),s=i===-1?t:t.slice(0,i+1),o=i!==-1&&/\/\s*>$/.test(s),r=dc.has(n),l=s9(s),a=(i===-1?-1:Txe(t,n,i+1))!==-1,u=!(r||o||a);return{type:"html_block",content:u?`${t.replace(/<[^>]*$/,"")} +</${n}>`:t,raw:t,tag:n,attrs:l.length?l:void 0,loading:u}}function Lxe(e){const t=String(e.content??""),n=e.raw==="$$"?`$$${t}$$`:String(e.raw??"");return{type:"math_block",content:t,loading:!!e.loading,raw:n,markup:e.markup}}function Nxe(e){if(!e)return"left";for(const t of e){if(!t)continue;const[n,i]=t;if(!i)continue;const s=String(i).trim().toLowerCase();if(n==="style"){const o=/text-align\s*:\s*(left|right|center)/i.exec(s);if(o)return o[1].toLowerCase()}}return"left"}function xR(e){return e?.filename===!0||e?.explicitFilename===!0||e?.marketTicker===!0}function SR(e,t){const n={filename:e?.filename||t?.filename,explicitFilename:e?.explicitFilename||t?.explicitFilename,marketTicker:e?.marketTicker||t?.marketTicker};return xR(n)?n:void 0}function Fxe(e,t,n){const i=SR(G0(t),n);if(!xR(i))return e;const s=e?.__linkifyDemotionContext;return{...e,__linkifyDemotionContext:{filename:s?.filename||i?.filename,explicitFilename:s?.explicitFilename||i?.explicitFilename,marketTicker:s?.marketTicker||i?.marketTicker}}}function Dxe(e,t,n){let i=t+1,s=null;const o=[];let r=!1;for(;i<e.length&&e[i].type!=="table_close";)if(e[i].type==="thead_open")r=!0,i++;else if(e[i].type==="thead_close")r=!1,i++;else if(e[i].type==="tbody_open"||e[i].type==="tbody_close")i++;else if(e[i].type==="tr_open"){const a=[];let u=i+1,c;for(;u<e.length&&e[u].type!=="tr_close";)if(e[u].type==="th_open"||e[u].type==="td_open"){const f=e[u].type==="th_open",h=e[u+1],g=String(h.content??""),m=Nxe(e[u].attrs),y=a.length,A=!f&&!r,b=A?s?.cells[y]?.raw:void 0;a.push({type:"table_cell",header:f||r,children:as(h.children||[],g,void 0,Fxe(n,b,A?c:void 0)),raw:g,align:m}),A&&(c=SR(c,G0(g))),u+=3}else u++;const d={type:"table_row",cells:a,raw:a.map(f=>f.raw).join("|")};r?s=d:o.push(d),i=u+1}else i++;s||(s={type:"table_row",cells:[],raw:""});const l=e[t].loading===!0;return[{type:"table",header:s,rows:o,loading:l&&!n?.final&&o.length===0,raw:[s,...o].map(a=>a.raw).join(` +`)},i+1]}function $xe(){return{type:"thematic_break",raw:"---"}}let $3=null;const B3=new WeakMap;function GI(){return $3||($3={allowedTagSet:a9(),customTagSet:null}),$3}function Bxe(e){if(!e||e.length===0)return GI();const t=B3.get(e);if(t)return t;const n=e.map(yl).filter(Boolean);if(!n.length){const s=GI();return B3.set(e,s),s}const i={allowedTagSet:a9({customHtmlTags:e}),customTagSet:new Set(n)};return B3.set(e,i),i}function zxe(e,t,n){const i=e[t],s=i.attrs;let o="";const r={};if(s){for(const[h,g]of s)if(h==="class"){const m=g.match(/(?:\s|^)vmr-container-(\S+)/);m&&(o=m[1])}else if(h.startsWith("data-")){const m=h.slice(5);try{r[m]=JSON.parse(g)}catch{r[m]=g}}}const l=[],a=Tc(n,!0);let u=t+1;for(;u<e.length&&e[u].type!=="vmr_container_close";)if(e[u].type==="paragraph_open"){const h=e[u+1];if(h){const g={type:"paragraph",children:as(h.children||[],void 0,void 0,a.options()),raw:String(h.content??"")};n?.includeSourceMap&&Jn(g,e[u],n),l.push(g),a.remember(g.raw)}u+=3}else if(e[u].type==="bullet_list_open"||e[u].type==="ordered_list_open"){const[h,g]=Vh(e,u,a.options());n?.includeSourceMap&&Jn(h,e[u],n),l.push(h),a.remember(h.raw),u=g}else if(e[u].type==="blockquote_open"){const[h,g]=Zh(e,u,a.options());n?.includeSourceMap&&Jn(h,e[u],n),l.push(h),a.remember(h.raw),u=g}else{const h=o9(e,u,a.options());h?(l.push(h[0]),a.remember(h[0].raw),u=h[1]):u++}const c=u<e.length&&e[u].type==="vmr_container_close",d=c&&i.meta?.unclosed!==!0||!!n?.final;let f=`::: ${o}`;return Object.keys(r).length>0&&(f+=` ${JSON.stringify(r)}`),f+=` +`,l.length>0&&(f+=i.raw??l.map(h=>h.raw).join(` +`),f+=` +`),f+=":::",[{type:"vmr_container",name:o,loading:!d,attrs:Object.keys(r).length>0?r:void 0,children:l,raw:f},c?u+1:u]}function z3(e,t,n,i){if(n?.type.endsWith("_close")){let s=Array.isArray(n.map)?Number(n.map[1]):NaN;return Number.isFinite(s)||(s=Array.isArray(t.map)?Number(t.map[1])+1:NaN),mxe(e,t,s,i)}return Jn(e,t,i)}function Rxe(e){return e.replace(/^\r?\n/,"").replace(/\r?\n$/,"")}function Oxe(e,t){if(!e||!t)return e;const n=new RegExp(String.raw`[\t ]*<\s*\/\s*${t}[^>]*$`,"i");return e.replace(n,"")}function Pxe(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=new RegExp(String.raw`^<\s*${ql(i)}(?=\s|>|/)`,"i"),o=new RegExp(String.raw`^<\s*\/\s*${ql(i)}(?=\s|>)`,"i");let r=0,l=Math.max(0,n);for(;l<e.length;){const a=e.indexOf("<",l);if(a===-1)break;const u=e.slice(a);if(o.test(u)){const c=ys(u);if(c===-1)return null;if(r===0)return{start:a,end:a+c+1};r--,l=a+c+1;continue}if(s.test(u)){const c=ys(u);if(c===-1)return null;const d=u.slice(0,c+1);/\/\s*>$/.test(d)||r++,l=a+c+1;continue}l=a+1}return null}function jxe(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=new RegExp(String.raw`<\s*${i}(?=\s|>|/)`,"gi");s.lastIndex=Math.max(0,n||0);const o=s.exec(e);if(!o||o.index==null)return null;const r=o.index,l=e.slice(r),a=ys(l);if(a===-1)return null;const u=r+a;if(/\/\s*>\s*$/.test(l.slice(0,a+1))){const g=u+1;return{raw:e.slice(r,g),start:r,end:g}}let c=1,d=u+1;const f=g=>{const m=e.slice(g);return new RegExp(String.raw`^<\s*${i}(?=\s|>|/)`,"i").test(m)},h=g=>{const m=e.slice(g);return new RegExp(String.raw`^<\s*\/\s*${i}(?=\s|>)`,"i").test(m)};for(;d<e.length;){const g=e.indexOf("<",d);if(g===-1)return{raw:e.slice(r),start:r,end:e.length};if(h(g)){const m=e.indexOf(">",g);if(m===-1)return null;if(c--,c===0){const y=m+1;return{raw:e.slice(r,y),start:r,end:y}}d=m+1;continue}if(f(g)){const m=ys(e.slice(g));if(m===-1)return null;c++,d=g+m+1;continue}d=g+1}return{raw:e.slice(r),start:r,end:e.length}}function p8(e){return Number.isFinite(e)&&e>0?e:0}function Hxe(e,t){const n=p8(t);if(!e||n<=0)return 0;let i=0;for(let s=0;s<e.length;s++)if(e[s]===` +`&&(i++,i===n))return s+1;return e.length}function o9(e,t,n){const i=e[t],s=n?.includeSourceMap===!0;switch(i.type){case"heading_open":{const o=Exe(e,t,n);return s&&Jn(o,i,n),[o,t+3]}case"code_block":{const o=_xe(i);return s&&Jn(o,i,n),[o,t+1]}case"fence":{const o=e7(i);return s&&Jn(o,i,n),[o,t+1]}case"math_block":{const o=Lxe(i);return s&&Jn(o,i,n),[o,t+1]}case"html_block":{const o=wR(i),r=o.tag?Bxe(n?.customHtmlTags):null;if(o.tag&&o.loading&&r&&!r.allowedTagSet.has(o.tag)){const l=String(i.content??"").replace(/\n+$/,""),a={type:"paragraph",children:l?[{type:"text",content:l,raw:l}]:[],raw:l};return s&&Jn(a,i,n),[a,t+1]}if(o.tag&&r?.customTagSet?.has(o.tag)){const l=o.tag,a=String(n?.__sourceMarkdown??""),u=Number(n?.__customHtmlBlockCursor??0),c=Array.isArray(i.map)?Hxe(a,Number(i.map?.[0]??0)):0,d=jxe(a,l,Math.max(p8(u),p8(c)));d&&n&&(n.__customHtmlBlockCursor=d.end);const f=String(d?.raw??o.raw??""),h=ys(f),g=h!==-1?f.slice(0,h+1):f,m=h!==-1&&/\/\s*>\s*$/.test(g),y=h===-1?null:Pxe(f,l,h+1),A=y?.start??-1;let b="";h!==-1&&(A!==-1&&h<A?b=f.slice(h+1,A):b=f.slice(h+1)),A===-1&&(b=Oxe(b,l));const C=[],v=/\s([\w:-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g;let x;for(;(x=v.exec(g))!==null;){const I=x[1];if(!I||I.toLowerCase()===l)continue;const M=x[2]||x[3]||x[4]||"";C.push([I,M])}const S=!n?.final&&!m&&y==null,_={type:l,tag:l,content:Rxe(b),raw:String(d?.raw??o.raw??f),loading:S,attrs:C.length?C:void 0};return s&&(d?_.sourceMap=m0(a,d.start,d.end,n):Jn(_,i,n)),[_,t+1]}return s&&Jn(o,i,n),[o,t+1]}case"table_open":{const[o,r]=Dxe(e,t,n);return s&&Jn(o,i,n),[o,r]}case"dl_open":{const[o,r]=Ixe(e,t,n);return s&&Jn(o,i,n),[o,r]}case"footnote_open":{const[o,r]=Mxe(e,t,n);return s&&Jn(o,i,n),[o,r]}case"hr":{const o=$xe();return s&&Jn(o,i,n),[o,t+1]}}return null}function s7(e,t,n,i){const s=o9(e,t,n);if(s)return s;const o=e[t],r=n?.includeSourceMap===!0;switch(o.type){case"container_warning_open":case"container_info_open":case"container_note_open":case"container_tip_open":case"container_danger_open":case"container_caution_open":case"container_error_open":if(i?.parseContainer){const l=i.parseContainer(e,t,n);return r&&z3(l[0],o,e[l[1]-1],n),l}break;case"container_open":if(i?.matchAdmonition){const l=i.matchAdmonition(e,t,n);if(l)return r&&z3(l[0],o,e[l[1]-1],n),l}break;case"vmr_container_open":{const l=zxe(e,t,n);return r&&z3(l[0],o,e[l[1]-1],n),l}}return null}function Wxe(){return{type:"hardbreak",raw:`\\ +`}}function qxe(e,t,n){const i=e[t+1],s=String(i.content??"");return{type:"paragraph",children:as(i.children||[],s,void 0,n),raw:s}}const QI=new WeakMap,_R=new WeakMap,YI=new WeakMap,JI=new WeakMap;function ia(e,t,n){const i=t?.map,s=n?.__sourceMarkdown;if(!Array.isArray(i)||i.length<2||typeof s!="string"||!n)return;const o=Number(i[0]),r=Number(i[1]);if(!Number.isFinite(o)||!Number.isFinite(r))return;let l=YI.get(n);if(!l){l=[0];for(let a=0;a<s.length;a++)s[a]===` +`&&l.push(a+1);YI.set(n,l)}_R.set(e,{start:l[Math.max(0,Math.trunc(o))]??s.length,end:l[Math.max(0,Math.trunc(r))]??s.length})}const r9=new WeakMap,XI=new WeakMap,Uxe=["$","\\["],Kxe=/(^|\r?\n)[\t ]*:::[\t ]*(?:warning|info|note|tip|danger|caution|error)(?=[\t ]|\r?\n|$)[^\r\n]*(?:\r?\n[\t ]*)*$/,Vxe=1024,Zxe=16,g8=new WeakMap,xp=new WeakMap,np=new WeakMap,Gxe=new Set(["code_inline","em_close","em_open","emoji","hardbreak","html_block","html_inline","image","ins_close","ins_open","link","link_close","link_open","mark_close","mark_open","math_inline","s_close","s_open","softbreak","strong_close","strong_open","sub","sup","text"]),Qxe=new Map([["paragraph_open","paragraph_close"],["heading_open","heading_close"],["bullet_list_open","bullet_list_close"],["ordered_list_open","ordered_list_close"],["blockquote_open","blockquote_close"],["table_open","table_close"]]),Yxe=new Set(["code_block","fence","hr","inline","math_block"]);function El(){return typeof performance<"u"?performance.now():Date.now()}function Ju(e,t,n){e&&(e[t]=(e[t]??0)+n)}function IR(e){return e.__timing}function MR(e,t,n){return t&&Ju(t,"parseMarkdownToStructureTotalMs",El()-n),e}function ER(e,t){const n=t.postTransformNodes;if(typeof n!="function")return e;const i=n(e);return Array.isArray(i)?i:e}function eM(e,t,n,i){return MR(ER(e,t),n,i)}function Wf(e,t,n){if(!n)return hM(e,t);Ju(n,"processTokensInputTokens",e.length);const i=El(),s=hM(e,t);return Ju(n,"processTokensMs",El()-i),s}function TR(e,t){return e.every(n=>{if(!Gxe.has(n.type)||(n.type==="link"||n.type==="link_open"||n.type==="link_close")&&!iCe(t))return!1;if(n.type==="link"){const s=tCe(n);if(s!=="explicit"&&s!=="linkify"&&s!=="autolink")return!1}if(n.type==="link_open"||n.type==="link_close"){const s=n.markup??"";if(s!==""&&s!=="linkify"&&s!=="autolink")return!1}const i=n.children;return!Array.isArray(i)||TR(i,t)})}function Jxe(e){const t=Qxe.get(e);if(t)return t;const n=/^container_(.+)_open$/.exec(e);return n?`container_${n[1]}_close`:void 0}function Xxe(e,t){const n=[];let i=!1,s=0;for(;s<e.length;){const o=e[s];if(!o||o.level!==0)return null;const r=Jxe(o.type);let l=s+1;if(r){if(o.nesting!==1)return null;for(;l<e.length;){const a=e[l];if(a.level===0){if(a.type!==r||a.nesting!==-1)return null;l++;break}l++}if(e[l-1]?.type!==r)return null;if(o.type==="paragraph_open"||o.type==="heading_open"){if(l!==s+3||e[s+1]?.type!=="inline")return null}else i=!0}else if(Yxe.has(o.type)){if(o.nesting!==0)return null;i=!0}else return null;for(let a=s;a<l;a++){const u=e[a];if(u.type!=="inline")continue;const c=u.children;if(!Array.isArray(c)||!TR(c,t))return null}n.push(s),s=l}return{mixed:i,starts:n}}function eSe(e){return/\r?\n[\t ]*\r?\n[\t ]*$/.test(e)}function tSe(e){return e.__reuseStableTopLevelNodes===!0&&e.final!==!0&&!e.preTransformTokens&&!e.postTransformTokens&&!e.postTransformNodes&&!e.customHtmlTags?.length&&e.includeSourceMap!==!0}function tM(e,t,n,i,s,o){const r=i.starts;if(r.length===0||s.length!==r.length){xp.delete(e);return}const l=r.map((a,u)=>{const c=r[u+1]??n.length;return{firstToken:n[a],lastToken:n[c-1],tokenCount:c-a}});xp.set(e,{groupBoundaries:l,source:t,nodes:s,stableGroupCount:i.mixed?Math.max(0,r.length-1):eSe(t)?r.length:Math.max(0,r.length-1),requireClosingStrong:o.requireClosingStrong,validateLink:o.validateLink})}function nSe(e,t,n,i){const s=n.length-1;for(let o=0;o<i;o++){const r=n[o],l=n[o+1]??t.length,a=e.groupBoundaries[o];if(!a||a.tokenCount!==l-r)return!1;if(!(a.firstToken===t[r]&&a.lastToken===t[l-1])&&(o>=s||!sM(a.firstToken,t[r])||!sM(a.lastToken,t[l-1])))return!1}return!0}function iSe(e,t,n,i,s){const o=e,r=i.__disableStructuredReuse===!0;if(!(o7(e,i)&&tSe(i)))return r||xp.delete(o),Wf(n,i,s);if(r)return Wf(n,i,s);const l=Xxe(n,i.validateLink);if(!l)return xp.delete(o),Wf(n,i,s);const a=l.starts,u=xp.get(o),c=np.get(o),d=u&&l.mixed?Math.min(u.stableGroupCount,Math.max(0,u.groupBoundaries.length-1)):u?.stableGroupCount??0;if(u&&d>0&&u.requireClosingStrong===i.requireClosingStrong&&u.validateLink===i.validateLink&&t.startsWith(u.source)&&a.length>=d&&(c==="append"||c==="tail")&&nSe(u,n,a,d)){const h=a[d]??n.length,g=Wf(n.slice(h),{...i,__linkifyDemotionSeed:u.nodes.slice(0,d).map(y=>String(y.raw??""))},s),m=a.length-d;if(g.length===m){const y=u.nodes.slice(0,d).concat(g);return Ju(s,"processTokensReusedTopLevelNodes",d),tM(e,t,n,l,y,i),y}}const f=Wf(n,i,s);return tM(e,t,n,l,f,i),f}function sSe(e){const t=e?.customHtmlTags;if(!Array.isArray(t)||t.length===0)return null;const n=sf(t);return n.length?new Set(n):null}function oSe(e,t){const n=e;let i=QI.get(n);i||(i=new Map,QI.set(n,i));const s=t.__markstreamFinal===!0?"final":"streaming";let o=i.get(s);o||(o={},i.set(s,o));for(const r of Object.keys(o))Object.prototype.hasOwnProperty.call(t,r)||delete o[r];return Object.assign(o,t),o}function rSe(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function xm(e,t,n){for(const i of Reflect.ownKeys(e)){const s=Object.getOwnPropertyDescriptor(e,i);if(!s||!("value"in s))continue;const o=Object.getOwnPropertyDescriptor(t,i);o&&(!("value"in o)||o.writable===!1)||(t[i]=hd(s.value,n))}}function hd(e,t=new WeakMap){if(!e||typeof e!="object")return e;const n=e,i=t.get(n);if(i)return i;if(Array.isArray(e)){const r=[];t.set(n,r);for(const l of e)r.push(hd(l,t));return r}if(e instanceof Map){const r=new Map;t.set(n,r);for(const[l,a]of e)r.set(hd(l,t),hd(a,t));return r}if(e instanceof Set){const r=new Set;t.set(n,r);for(const l of e)r.add(hd(l,t));return r}if(e instanceof Date){const r=new Date(e.getTime());return t.set(n,r),r}if(e instanceof RegExp){const r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,t.set(n,r),r}if(typeof URL<"u"&&e instanceof URL){const r=new URL(e.href);return t.set(n,r),xm(n,r,t),r}if(typeof URLSearchParams<"u"&&e instanceof URLSearchParams){const r=new URLSearchParams(e.toString());return t.set(n,r),xm(n,r,t),r}if(e instanceof Error){let r;const l=e.constructor;try{r=new l(e.message)}catch{r=new Error(e.message)}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),t.set(n,r),xm(n,r,t),r}if(typeof Promise<"u"&&e instanceof Promise||typeof Node<"u"&&e instanceof Node)return t.set(n,e),e;if(!rSe(e)){const r=Object.create(Object.getPrototypeOf(e));return t.set(n,r),xm(n,r,t),r}const s={};t.set(n,s);const o=e;for(const r of Object.keys(o))s[r]=hd(o[r],t);return s}function LR(e,t=!0){if(!t)return Ld(e);const n=Object.create(Object.getPrototypeOf(e)),i=new WeakMap;for(const s of Reflect.ownKeys(e)){const o=Object.getOwnPropertyDescriptor(e,s);if(!o)continue;if(!("value"in o)){Object.defineProperty(n,s,o);continue}const r=o.value;let l=r;s==="attrs"&&Array.isArray(r)?l=r.map(a=>[...a]):s==="map"&&Array.isArray(r)?l=[...r]:s==="children"&&Array.isArray(r)?l=r.map(a=>LR(a,t)):t&&r&&typeof r=="object"&&(l=hd(r,i)),Object.defineProperty(n,s,{...o,value:l})}return n}function nM(e,t=!0){return e.map(n=>LR(n,t))}function o7(e,t){const n=t,i=e.stream,s=t.streamParse??"auto";return n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&(s===!0||s==="auto"&&t.final!==!0)&&i?.enabled===!0&&typeof i.parse=="function"}function lSe(e,t){const n=t,i=t.streamParse??"auto",s=e.stream;return t.final===!0&&i==="auto"&&n.__disableStreamParse!==!0&&e.__markstreamHasCustomParserExtensions!==!0&&s?.enabled===!0&&typeof s.reset=="function"}function aSe(e){r9.delete(e)}function uSe(){return{fenceChar:"",fenceInBlockquote:!1,fenceInList:!1,fenceLen:0,fenceListIndent:0,inDollarMath:!1,inFence:!1,inMath:!1,listContentIndent:null,dollarMathOpenOffset:null,mathOpenOffset:null}}function Sp(e){return{...e}}function cSe(e,t,n,i=l9(t).state){r9.set(e,{explicitBracketMath:i,source:t,key:n,pendingCandidate:n===null&&uR(t)})}function dSe(e){return e.endsWith("$")||e.endsWith("\\")}function fSe(e){const t=Math.max(e.lastIndexOf(` +`)+1,0),n=e.slice(t).replace(/[\t ]+$/,"");return Uxe.some(i=>n.endsWith(i))}function hSe(e,t){return t?!!(t.includes("$$")||t.includes("\\[")||e.endsWith("$")&&t[0]==="$"||e.endsWith("\\")&&t[0]==="["||fSe(e)&&/[\r\n]/.test(t)):!1}function ca(e,t){let n=t-1,i=0;for(;n>=0&&e[n]==="\\";)i++,n--;return i%2===1}function m8(e){return e===" "||e===" "}function NR(e,t){return t===" "?e+1:e+4-e%4}function r7(e){let t=0,n=0;for(;t<e.length&&m8(e[t]);)n=NR(n,e[t]),t++;return{index:t,column:n}}function Gh(e){const t=r7(e);return t.column>3?null:t}function R3(e){const t=Gh(e);if(!t)return null;const n=t.index,i=e[n];if(i!=="`"&&i!=="~")return null;let s=n;for(;s<e.length&&e[s]===i;)s++;const o=s-n;if(o<3)return null;const r=e.slice(s);return i==="`"&&r.includes("`")?null:{markerChar:i,markerLen:o,rest:r}}function l7(e){const t=Gh(e);if(!t)return null;const n=e.slice(t.index),i=/^(?:[-+*]|\d{1,9}[.)])(?=[\t ]|$)/.exec(n)?.[0];if(!i)return null;let s=t.index+i.length,o=t.column+i.length;if(!m8(e[s]))return null;for(;s<e.length&&m8(e[s]);)o=NR(o,e[s]),s++;return{content:e.slice(s),contentIndent:o}}function a7(e){let t=e,n=!1;for(;;){const i=Gh(t);if(!i)return n?t:null;let s=i.index;if(t[s]!==">")return n?t:null;n=!0,s++,(t[s]===" "||t[s]===" ")&&s++,t=t.slice(s)}}function u7(e){const t=R3(e);if(t)return{...t,inBlockquote:!1,inList:!1,listIndent:0};const n=a7(e),i=n==null?null:R3(n);if(i)return{...i,inBlockquote:!0,inList:!1,listIndent:0};const s=l7(e);if(!s)return null;const o=R3(s.content);return o==null?null:{...o,inBlockquote:!1,inList:!0,listIndent:s.contentIndent}}function FR(e,t){let n=!1,i="",s=0,o=!1,r=!1,l=0,a=null,u=0;for(;u<t;){const c=e.indexOf(` +`,u),d=c===-1||c>=t?t:c,f=e.slice(u,d),h=f.endsWith("\r")?f.slice(0,-1):f,g=r7(h),m=l7(h);n&&o&&h.trim()&&a7(h)==null&&(n=!1,i="",s=0,o=!1,r=!1,l=0),n&&r&&h.trim()&&g.column<l&&!m&&(n=!1,i="",s=0,o=!1,r=!1,l=0),m?a=m.contentIndent:h.trim()&&a!=null&&g.column<a&&!n&&(a=null);const y=u7(h);if(y&&(n?y.markerChar===i&&y.markerLen>=s&&/^\s*$/.test(y.rest)&&(n=!1,i="",s=0,o=!1,r=!1,l=0):(n=!0,i=y.markerChar,s=y.markerLen,o=y.inBlockquote,r=y.inList||a!=null&&!y.inBlockquote&&g.column>=a,l=y.listIndent||a||0)),c===-1||c>=t)break;u=c+1}return n}function pSe(e,t){const n=d=>d===" "||d===" ",i=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"||d===":"},s=d=>{if(d[0]!=="<")return null;let f=1;for(;f<d.length&&n(d[f]);)f++;const h=d[f]==="/";if(h)for(f++;f<d.length&&n(d[f]);)f++;const g=f;for(;f<d.length&&i(d[f]);)f++;if(f===g)return null;const m=d.slice(g,f).toLowerCase();if(!$z.has(m))return null;const y=d[f];if(y&&y!==" "&&y!==" "&&y!==">"&&y!=="/")return null;const A=ys(d);if(A===-1)return null;let b=A-1;for(;b>=0&&n(d[b]);)b--;return{closing:h,tag:m,selfClosing:!h&&d[b]==="/",after:d.slice(A+1)}},o=(d,f)=>{const h=d.toLowerCase();let g=0;for(;g<h.length;){const m=h.indexOf("</",g);if(m===-1)return!1;for(g=m+2;g<h.length&&n(h[g]);)g++;if(h.startsWith(f,g)){const y=h[g+f.length];if(!y||y===" "||y===" "||y===">")return!0}}return!1},r=[];let l=!1,a=!1,u=!1,c=0;for(;c<t;){const d=e.indexOf(` +`,c),f=d===-1||d>=t?t:d,h=e.slice(c,f),g=h.endsWith("\r")?h.slice(0,-1):h,m=Gh(g);if(m){const y=g.slice(m.index);if(l)l=!y.includes("-->");else if(a)a=!y.includes(">");else if(u)u=!y.includes("?>");else if(y.startsWith("<!--"))l=!y.includes("-->");else if(y.startsWith("<?"))u=!y.includes("?>");else if(y.startsWith("<!"))a=!y.includes(">");else{const A=s(y);if(A)if(A.closing){for(let b=r.length-1;b>=0;b--)if(r[b]===A.tag){r.length=b;break}}else A.selfClosing||o(A.after,A.tag)||r.push(A.tag)}}if(d===-1||d>=t)break;c=d+1}return l||a||u||r.length>0}function gSe(e,t,n){if(!n?.length)return!1;const i=new Set(sf(n));if(!i.size)return!1;const s=c=>{const d=c.charCodeAt(0);return d>=65&&d<=90||d>=97&&d<=122||d>=48&&d<=57||c==="_"||c==="-"||c===":"},o=c=>c===" "||c===" ",r=c=>{if(c[0]!=="<")return null;let d=1;for(;d<c.length&&o(c[d]);)d++;const f=c[d]==="/";if(f)for(d++;d<c.length&&o(c[d]);)d++;const h=d;for(;d<c.length&&s(c[d]);)d++;if(d===h)return null;const g=c.slice(h,d).toLowerCase();if(!i.has(g))return null;const m=c[d];if(m&&m!==" "&&m!==" "&&m!==">"&&m!=="/")return null;const y=c.indexOf(">",d);if(y===-1)return null;let A=y-1;for(;A>=0&&o(c[A]);)A--;return{closing:f,tag:g,selfClosing:!f&&c[A]==="/",after:c.slice(y+1)}},l=(c,d)=>{const f=c.toLowerCase();let h=0;for(;h<f.length;){const g=f.indexOf("</",h);if(g===-1)return!1;for(h=g+2;h<f.length&&o(f[h]);)h++;if(f.startsWith(d,h)){const m=f[h+d.length];if(!m||m===" "||m===" "||m===">")return!0}}return!1},a=[];let u=0;for(;u<t;){const c=e.indexOf(` +`,u),d=c===-1||c>=t?t:c,f=e.slice(u,d),h=f.endsWith("\r")?f.slice(0,-1):f,g=Gh(h);if(g){const m=r(h.slice(g.index));if(m)if(m.closing){for(let y=a.length-1;y>=0;y--)if(a[y]===m.tag){a.length=y;break}}else m.selfClosing||l(m.after,m.tag)||a.push(m.tag)}if(c===-1||c>=t)break;u=c+1}return a.length>0}function mSe(e,t){const n=Kxe.exec(e);if(!n)return null;const i=n[1]??"",s=n.index+i.length,o=e.indexOf(` +`,s),r=e.slice(s,o===-1?e.length:o);return!Gh(r.endsWith("\r")?r.slice(0,-1):r)||FR(e,s)||pSe(e,s)||gSe(e,s,t)?null:`${e.slice(0,n.index)}${i}`}function c7(e,t,n){let i=t;for(;i<e.length&&e[i]===n;)i++;return i-t}function DR(e,t,n){let i=t;for(;i<e.length;){const s=e.indexOf("`",i);if(s===-1)return-1;const o=c7(e,s,"`");if(o===n)return s;i=s+o}return-1}function O3(e){e.inFence=!1,e.fenceChar="",e.fenceLen=0,e.fenceInBlockquote=!1,e.fenceInList=!1,e.fenceListIndent=0}function iM(e,t,n,i,s){let o=0,r=!1;for(;o<e.length;){const l=o;if(t.inMath){if(e.startsWith("\\]",o)&&!ca(e,l)){i!=null&&s&&n+o+2>i&&(r=!0),t.inMath=!1,t.mathOpenOffset=null,o+=2;continue}o++;continue}if(t.inDollarMath){if(e.startsWith("$$",o)&&!ca(e,l)){i!=null&&s&&n+o+2>i&&(r=!0),t.inDollarMath=!1,t.dollarMathOpenOffset=null,o+=2;continue}o++;continue}if(e[o]==="`"&&!ca(e,l)){const a=c7(e,o,"`"),u=DR(e,o+a,a);if(u===-1)break;o=u+a;continue}if(e.startsWith("\\[",o)&&!ca(e,l)){t.inMath=!0,t.mathOpenOffset=n+o,o+=2;continue}if(e.startsWith("$$",o)&&!ca(e,l)){t.inDollarMath=!0,t.dollarMathOpenOffset=n+o,o+=2;continue}o++}return r}function vSe(e,t){if(!J6(t))return e;const n=t,i=XI.get(n),s=i?.source===e?i.state:i&&e.startsWith(i.source)?$R(i.state,e.slice(i.source.length),i.source.length-i.state.lineBuffer.length).state:l9(e).state;XI.set(n,{source:e,state:s});const{context:o}=s,r=o.inMath?o.mathOpenOffset:o.inDollarMath?o.dollarMathOpenOffset:null;if(r==null)return e;const l=e.slice(r+2),a=e.lastIndexOf(` +`,r-1)+1;if(e.slice(a,r).trim()!==""&&!/^\r?\n/.test(l)||/^\s*!\[/.test(l))return e;const u=l.trim(),c=/^(?:[a-z]|pi)$/i.test(u);return ju(l)&&!c?e:e.slice(0,r)}function ySe(e,t,n,i,s){const o=r7(e),r=l7(e);if(t.inFence&&t.fenceInBlockquote&&e.trim()&&a7(e)==null&&O3(t),t.inFence&&t.fenceInList&&e.trim()&&o.column<t.fenceListIndent&&!r&&O3(t),r?t.listContentIndent=r.contentIndent:e.trim()&&t.listContentIndent!=null&&o.column<t.listContentIndent&&!t.inFence&&(t.listContentIndent=null),!t.inMath&&!t.inDollarMath){const l=u7(e);if(l)t.inFence?l.markerChar===t.fenceChar&&l.markerLen>=t.fenceLen&&/^\s*$/.test(l.rest)&&O3(t):(t.inFence=!0,t.fenceChar=l.markerChar,t.fenceLen=l.markerLen,t.fenceInBlockquote=l.inBlockquote,t.fenceInList=l.inList||t.listContentIndent!=null&&!l.inBlockquote&&o.column>=t.listContentIndent,t.fenceListIndent=l.listIndent||t.listContentIndent||0);else if(!t.inFence)return iM(e,t,n,i,s)}else return iM(e,t,n,i,s);return!1}function l9(e,t=uSe(),n=null,i=!1,s=0){const o=Sp(t);let r=Sp(t),l="",a=!1,u=0;for(;u<e.length;){const c=e.indexOf(` +`,u),d=c!==-1,f=d&&c>u&&e[c-1]==="\r"?c-1:d?c:e.length,h=e.slice(u,f);ySe(h,o,s+u,n,i)&&(a=!0),d?(r=Sp(o),l=""):l=h,u=d?c+1:e.length}return{closedOpenMath:a,state:{committedContext:r,context:o,lineBuffer:l}}}function $R(e,t,n=0){return t&&!e.context.inMath&&!e.context.inDollarMath&&!e.context.inFence&&!e.committedContext.inFence&&!/[\\$`~\r\n]/.test(t)&&!(e.lineBuffer.endsWith("\\")&&(t[0]==="["||t[0]==="]"))?{closedOpenMath:!1,state:{committedContext:Sp(e.committedContext),context:Sp(e.context),lineBuffer:e.lineBuffer+t}}:l9(e.lineBuffer+t,e.committedContext,n+e.lineBuffer.length,e.context.inMath||e.context.inDollarMath,n)}function kSe(e,t){if(!J6(e))return;const n=e.stream;if(typeof n?.reset!="function")return;const i=e,s=r9.get(i);if(s?.source===t)return;const o=s?t.startsWith(s.source):!1,r=o&&s?t.slice(s.source.length):"",l=o&&s?$R(s.explicitBracketMath,r,s.source.length-s.explicitBracketMath.lineBuffer.length):l9(t),a=l.state,u=o&&s?l.closedOpenMath:!1;if(s&&o&&s.key===null&&s.pendingCandidate===!1&&!u&&!hSe(s.source,r)&&!dSe(t)){s.source=t,s.explicitBracketMath=a;return}const c=ewe(t);(s&&(s&&!o||s.key!==c||u)||!s&&c)&&n.reset(),cSe(e,t,c,a)}function bSe(e){return typeof e.preTransformTokens=="function"||typeof e.postTransformTokens=="function"}function BR(e,t){const n=e?.map,i=t?.map;return n===i?!0:!Array.isArray(n)||!Array.isArray(i)?!1:n.length===i.length&&n.every((s,o)=>s===i[o])}function ASe(e,t){const n=e?.attrs,i=t?.attrs;if(n===i)return!0;if(!Array.isArray(n)||!Array.isArray(i)||n.length!==i.length)return!1;for(let s=0;s<n.length;s++){const o=n[s],r=i[s];if(o[0]!==r[0]||o[1]!==r[1])return!1}return!0}function sM(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.level===t.level&&e.markup===t.markup&&e.content===t.content&&e.info===t.info&&BR(e,t)&&ASe(e,t)}function P3(e,t){return!!e&&!!t&&e.type===t.type&&e.tag===t.tag&&e.nesting===t.nesting&&e.markup===t.markup&&e.content===t.content&&BR(e,t)}function oM(e,t){return e[t]?.type==="paragraph_open"&&e[t+1]?.type==="inline"&&e[t+2]?.type==="paragraph_close"}function CSe(e){for(let t=0;t+5<e.length;t++)if(oM(e,t)&&oM(e,t+3)&&P3(e[t],e[t+3])&&P3(e[t+1],e[t+4])&&P3(e[t+2],e[t+5]))return!0;return!1}function wSe(e,t,n){return J6(e)&&uR(t)&&CSe(n)}function xSe(e){const t=r9.get(e);return typeof t?.key=="string"&&t.key.startsWith("pending:")}function rM(e,t,n,i){const s=e;if(i.customHtmlTags?.length&&(n.__markstreamCustomHtmlTags=i.customHtmlTags),!o7(e,i)||(kSe(e,t),xSe(e)))return np.set(s,"sync"),e.parse(t,n);const o=e.stream.parse(t,oSe(e,n));if(wSe(e,t,o))return e.stream?.reset?.(),np.set(s,"sync"),e.parse(t,n);const r=e.stream?.stats?.();if(np.set(s,r?.lastMode??"stream"),!bSe(i))return o;const l=IR(i);if(!l)return nM(o,!0);const a=El(),u=nM(o,!0);return Ju(l,"tokenCloneMs",El()-a),u}function a9(e){const t=e?.customHtmlTags;if(!Array.isArray(t)||t.length===0)return f0;const n=new Set(f0);for(const i of sf(t))i&&n.add(i);return n}function SSe(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:e.type==="hardbreak"?"<br>":""}function lM(e){return{type:"paragraph",children:e,raw:e.map(SSe).join("")}}function aM(e,t){if(t.sourceMap)for(const n of e)n.sourceMap||(n.sourceMap=t.sourceMap)}function uM(e,t){if(e.type!=="paragraph")return null;const n=e.children,i=Array.isArray(n)?n:[];if(i.length===0)return null;const s=sSe(t);if(!s?.size)return null;let o=-1;for(let c=0;c<i.length;c++){const d=i[c];if(!s.has(String(d?.type??"").toLowerCase()))continue;const f=i.slice(0,c);if(String(d.content??"").trim()&&f.some(h=>h?.type==="hardbreak")){o=c;break}}if(o===-1)return null;const r=i.slice(0,o),l=i[o];if(!l)return null;const a=[];r.length&&a.push(lM(r)),a.push(l);const u=i.slice(o+1);return u.length&&a.push(lM(u)),a}function _Se(e){const t=e.trim();if(!t)return null;const n=/^(?:<!doctype\s+html[^>]*>\s*)?<html(?:\s[^>]*)?>/i.test(t),i=/<\/html>\s*$/i.test(t);return!n||!i?null:[{type:"html_block",tag:"html",raw:e,content:e,loading:!1}]}function _p(e){const t=e.raw;if(typeof t=="string")return t;const n=e.content;return typeof n=="string"?n:""}function ISe(e,t){if(e.type!=="html_block"||!t)return!1;const n=String(e.raw??e.content??"");return new RegExp(String.raw`^\s*<\s*\/\s*${ql(t)}\s*>\s*$`,"i").test(n)}const j3=new Set(["iframe","script","style","textarea","title"]);function Y0(e,t,n){if(!e||!t)return null;const i=t.toLowerCase(),s=f=>{if(e.startsWith("<!--",f)){const C=e.indexOf("-->",f+4);return{closing:!1,end:C===-1?e.length:C+3,selfClosing:!1,tag:""}}if(e.startsWith("<![CDATA[",f)){const C=e.indexOf("]]>",f+9);return{closing:!1,end:C===-1?e.length:C+3,selfClosing:!1,tag:""}}const h=ys(e.slice(f));if(h===-1)return null;const g=f+h+1,m=e.slice(f,g);if(/^<\s*[!?]/.test(m))return{closing:!1,end:g,selfClosing:!1,tag:""};let y=m.slice(1).trimStart();const A=y.startsWith("/");A&&(y=y.slice(1).trimStart());const b=y.match(/^([A-Z][\w:-]*)/i);return b?.[1]?{closing:A,end:g,selfClosing:/\/\s*>$/.test(m),tag:b[1].toLowerCase()}:{closing:!1,end:f+1,selfClosing:!1,tag:""}},o=(f,h)=>{const g=new RegExp(String.raw`<\s*\/\s*${ql(f)}(?=\s|>)`,"gi");g.lastIndex=h;const m=g.exec(e);if(!m||m.index==null)return null;const y=s(m.index);return y?{start:m.index,end:y.end}:null};let r=-1,l=-1,a=Math.max(0,n);for(;a<e.length;){const f=e.indexOf("<",a);if(f===-1)return null;const h=s(f);if(!h)return null;if(!h.closing&&h.tag===i){r=f,l=h.end-1;break}if(!h.closing&&j3.has(h.tag)){a=o(h.tag,h.end)?.end??e.length;continue}a=h.end}if(r===-1||l===-1)return null;const u=e.slice(r,l+1);if(dc.has(i)||/\/\s*>$/.test(u))return{raw:u,start:r,end:l+1,closed:!0};if(j3.has(i)){const f=o(i,l+1);return f?{raw:e.slice(r,f.end),start:r,end:f.end,closeStart:f.start,closed:!0}:{raw:e.slice(r),start:r,end:e.length,closed:!1}}let c=1,d=l+1;for(;d<e.length;){const f=e.indexOf("<",d);if(f===-1)return{raw:e.slice(r),start:r,end:e.length,closed:!1};const h=s(f);if(!h)return null;if(h.closing&&h.tag===i){c--;const g=h.end;if(c===0)return{raw:e.slice(r,g),start:r,end:g,closeStart:f,closed:!0};d=g;continue}if(!h.closing&&h.tag===i){!h.selfClosing&&!dc.has(h.tag)&&c++,d=h.end;continue}if(!h.closing&&j3.has(h.tag)){d=o(h.tag,h.end)?.end??e.length;continue}d=h.end}return{raw:e.slice(r),start:r,end:e.length,closed:!1}}function MSe(e,t){if(!t)return 0;let n=0,i=0;for(;n<e.length&&i<t.length;){if(e[n]===t[i]){n++,i++;continue}if(e[n]==="\r"||e[n]===` +`){n++;continue}return-1}return i===t.length?n:-1}function ESe(e,t,n){return n?e:`${e.replace(/<[^>]*$/,"")} +</${t}>`}function cM(e){return e.replace(/\r\n/g,` +`).replace(/(^|\n)[ \t]{1,4}/g,"$1")}function TSe(e,t,n){return n?e.includes(n,t)?!0:cM(e.slice(Math.max(0,t))).includes(cM(n)):!1}function LSe(e,t){let n=Math.max(0,t);for(;n<e.length&&(e[n]===" "||e[n]===" ");)n++;return e[n]==="\r"?(n++,e[n]===` +`&&n++,n):e[n]===` +`?n+1:t}function dM(e){if(e.type!=="html_block"||String(e.tag??"").toLowerCase()!=="details")return!1;const t=String(e.raw??e.content??"");return/^\s*<details\b/i.test(t)}function NSe(e){if(e.type!=="html_block")return!1;const t=String(e.raw??e.content??"");return/^\s*<\/details\b/i.test(t)}function zR(e,t){const n=new RegExp(String.raw`<\s*\/\s*${ql(t)}(?=\s|>)`,"gi");let i=-1,s;for(;(s=n.exec(e))!==null;)i=s.index;return i}function RR(e,t){return{final:t,__disableStreamParse:!0,requireClosingStrong:e.requireClosingStrong,customHtmlTags:e.customHtmlTags,validateLink:e.validateLink}}const FSe=new Set(["admonition","blockquote","code_block","definition_list","footnote","heading","list","math_block","table","thematic_break"]),DSe=/(?:^|\n)\s{0,3}(?:#{1,6}\s+\S|[-+*]\s+\S|\d+[.)]\s+\S|>\s*\S|`{3,}|~{3,}|(?:\*{3,}|-{3,}|_{3,})(?:\s|$)|\|.*\|)/m;function $Se(e){return/\n\s*\n/.test(e)||DSe.test(e)}function BSe(e,t){if(!e.trim()||t.length===0)return!1;if(t.some(i=>FSe.has(String(i?.type??"").toLowerCase()))||t.some(i=>{if(i?.type!=="html_block")return!1;const s=i;return Array.isArray(s.children)&&s.children.length>0}))return!0;if(!$Se(e))return!1;if(t.length>1)return!0;const[n]=t;return!!(n&&n.type==="paragraph")}function zSe(e){const t=[];let n=0;for(;n<e.length;){for(;/\s/.test(e[n]??"");)n++;if(n>=e.length)break;const i=e.slice(n).match(/^<([A-Z][\w:-]*)/i);if(!i?.[1])return null;const s=Y0(e,i[1],n);if(!s||s.start!==n)return null;t.push(s.raw),n=s.end}return t.length>1?t:null}function RSe(e,t,n,i){const s=n.customHtmlTags?.join("\0")??"",o=t,r=JI.get(o),l=r&&r.final===i&&r.customHtmlTags===s&&r.requireClosingStrong===n.requireClosingStrong&&r.validateLink===n.validateLink,a=e.map((u,c)=>l&&r.blocks[c]===u?r.children[c]:kh(u,t,n));return JI.set(o,{blocks:e,children:a,customHtmlTags:s,final:i,requireClosingStrong:n.requireClosingStrong,validateLink:n.validateLink}),a.flat()}function OSe(e,t,n,i){return e.map(s=>{if(s?.type!=="html_block")return s;const o=s,r=String(o.tag??"").toLowerCase();if(!r||r==="details"||zz.has(r)||Array.isArray(o.children))return s;const l=String(s.raw??o.content??"");if(!l)return s;const a=ys(l);if(a===-1)return s;const u=Y0(l,r,0),c=u?.closeStart??-1,d=u?.closed===!0&&c>=a+1,f=d?l.slice(a+1,c):l.slice(a+1);if(!f.trim())return s;const h=RR(n,i),g=d?null:zSe(f),m=g?RSe(g,t,h,i):kh(f,t,h);return BSe(f,m)?{...s,children:m}:s})}function PSe(e){for(const t of e)if(t?.type==="html_block")return!0;return!1}function kh(e,t,n){return e.trim()?PR(e,t,{...n,__disableStreamParse:!0,__disableStructuredReuse:!0}):[]}function jSe(e,t,n){const i=kh(e,t,n),s=i[0];return i.length===1&&s?.type==="paragraph"&&Array.isArray(s.children)?s.children:i}function HSe(e,t,n){const i=wR({content:e}),s=ys(e),o=zR(e,"summary");if(s!==-1&&o!==-1&&o>=s+1){const r=jSe(e.slice(s+1,o),t,n);r.length>0&&(i.children=r)}return i.raw=e,i}function WSe(e,t,n){const i=ys(e);if(i===-1)return[];const s=e.slice(i+1);if(!s.trim())return[];const o=Y0(s,"summary",0);if(!o)return kh(s,t,n);const r=s.slice(0,o.start),l=s.slice(o.end);return[...kh(r,t,n),HSe(o.raw,t,n),...kh(l,t,n)]}function OR(e,t,n,i,s,o=0){const r=[];let l=o;for(let a=0;a<e.length;a++){const u=e[a],c=_p(u);let d=-1;if(c&&(d=t.indexOf(c,l),d!==-1&&(l=d+c.length)),!dM(u)){r.push(u);continue}const f=String(u.raw??_p(u)??""),h=d!==-1?d:t.indexOf(f,Math.max(0,l-f.length));if(h===-1){r.push(u);continue}let g=1,m=-1;for(let z=a+1;z<e.length;z++){const H=e[z];if(dM(H)){g++;continue}if(NSe(H)&&(g--,g===0)){m=z;break}}const y=Y0(t,"details",h),A=m===-1&&y?.closed===!0,b=A?(()=>{const z=zR(f,"details");return z!==-1?f.slice(0,z):f})():f,[C]=OR(A?[]:m===-1?e.slice(a+1):e.slice(a+1,m),t,n,i,s,h+f.length),v=WSe(b,n,RR(i,s)),x=m===-1?"</details>":String(e[m].raw??_p(e[m])??"</details>"),S=A||m!==-1&&y?.closed===!0,_=x.replace(/[\t\r\n ]+$/,""),I=S?(()=>{const z=(y?.raw??"").lastIndexOf(_);return z===-1?t.length:h+z})():t.length,M=ys(f),$=A&&M!==-1?h+M+1:h+f.length,D=t.slice($,I===-1?t.length:I),T=n.parse(D,{__markstreamFinal:s}),N=n.renderer.render(T,n.options,{__markstreamFinal:s}),O=I+_.length,P=S?Math.max(I+x.length,LSe(t,O)):t.length,R=S?t.slice(I,P):x,q=S?t.slice(h,P):t.slice(h),j=A&&M!==-1?f.slice(0,M+1):f,W={...u,tag:"details",attrs:s9(f.slice(0,M+1)),raw:q,content:`${j}${N}${R}`,children:[...v,...C],loading:!s&&!S};if(i.includeSourceMap&&(W.sourceMap=m0(t,h,S?P:t.length,i)),r.push(W),l=S?P:t.length,m===-1&&!A)break;m!==-1&&(a=m)}return[r,l]}function qSe(e,t,n,i){if(!n)return e;const s=e.slice();let o=0;for(let r=0;r<s.length;r++){const l=s[r],a=_p(l),u=a?n.indexOf(a,o):-1;if(l?.type!=="html_block"){u!==-1&&(o=u+a.length);continue}const c=String(l.tag??"").toLowerCase();if(!c)continue;if(c==="details"){u!==-1&&(o=u+a.length);continue}const d=Y0(n,c,u!==-1?u:o);if(!d)continue;o=d.end;const f=String(l.content??a),h=String(l.raw??f),g=u+h.length;if(u!==-1&&d.end<g&&n.slice(u,g)===h){o=g,i?.includeSourceMap&&(l.sourceMap=m0(n,u,g,i));continue}const m=ESe(d.raw,c,d.closed),y=!t&&!d.closed,A=f!==m||h!==d.raw||!!l.loading!==y,b=ys(d.raw),C=b===-1?"":d.raw.slice(0,b+1),v=C?s9(C):[];if(l.content=m,l.raw=d.raw,l.loading=y,l.attrs=v.length?v:void 0,i?.includeSourceMap&&(l.sourceMap=m0(n,d.start,d.end,i)),!A)continue;let x=MSe(d.raw,h);x===-1&&(x=0);const S=r+1;for(;S<s.length;){if(d.closed&&ISe(s[S],c)){s.splice(S,1);continue}const _=_p(s[S]);if(!_)break;const I=d.raw.indexOf(_,x);if(I===-1){if(TSe(n,d.end,_))break;const M=_R.get(s[S]);if(!M)break;if(M.start>=d.start&&M.end<=d.end){s.splice(S,1);continue}break}x=I+_.length,s.splice(S,1)}}return s}function USe(e){const t=l=>l===" "||l===" "||l===` +`||l==="\r",n=l=>{if(!l||l[0]!=="<"||l.includes(">"))return!1;let a=1;if(a<l.length&&t(l[a])||l.startsWith("<!--")||l.startsWith("<?")||l.startsWith("<!")||l[a]==="/"&&(a++,a<l.length&&t(l[a])))return!1;const u=m=>{const y=m.charCodeAt(0);return y>=65&&y<=90||y>=97&&y<=122},c=m=>{const y=m.charCodeAt(0);return y>=48&&y<=57},d=m=>m==="!"||u(m),f=m=>u(m)||c(m)||m===":"||m==="-",h=m=>u(m)||c(m)||m==="_"||m==="."||m===":"||m==="-",g=h;if(a>=l.length||!d(l[a]))return!1;for(a++;a<l.length&&f(l[a]);)a++;for(;a<l.length;){for(;a<l.length&&t(l[a]);)a++;if(a>=l.length)return!0;if(l[a]==="/"){for(a++;a<l.length&&t(l[a]);)a++;return a>=l.length}if(!h(l[a]))return!1;for(a++;a<l.length&&g(l[a]);)a++;for(;a<l.length&&t(l[a]);)a++;if(a<l.length&&l[a]==="="){for(a++;a<l.length&&t(l[a]);)a++;if(a>=l.length)return!0;const m=l[a];if(m==='"'||m==="'"){for(a++;a<l.length&&l[a]!==m;)a++;if(a>=l.length)return!0;a++}else{for(;a<l.length;){const y=l[a];if(t(y)||y==="<"||y===">"||y==='"'||y==="'"||y==="`")break;a++}if(a>=l.length)return!0}}}return!0},i=(l,a)=>FR(l,a),s=String(e??""),o=s.lastIndexOf("<");if(o===-1||i(s,o))return s;if(o>0){const l=s[o-1],a=l===" "||l===" "||l===` +`||l==="\r",u=s[o-2];if(!a&&!((l==="n"||l==="r")&&u==="\\"))return s}const r=s.slice(o);return r.includes(">")||r.length>1&&(r[1]===" "||r[1]===" "||r[1]===` +`||r[1]==="\r")||!n(r)?s:s.slice(0,o)}function fM(e,t){if(e===t)return;const n=e.split(/\r?\n/),i=t.split(/\r?\n/),s=[];let o=0;for(let r=0;r<i.length;r++){const l=i[r]??"";if(n[o]===l){s[r]={startLine:o,endLine:o+1},o++;continue}const a=n[o]??"";if(l!==""&&a!==l&&a.startsWith(l)){let h=l,g=-1;for(let m=r+1;m<i.length;m++){if(h+=i[m]??"",h===a){g=m;break}if(!a.startsWith(h))break}if(g!==-1){for(let m=r;m<=g;m++)s[m]={startLine:o,endLine:o+1};o++,r=g;continue}s[r]={startLine:o,endLine:o+1};continue}let u=n[o]??"",c=-1;for(let h=o+1;h<n.length;h++){if(u+=`\\n${n[h]??""}`,u===l){c=h+1;break}if(!l.startsWith(u))break}if(c!==-1){s[r]={startLine:o,endLine:c},o=c;continue}let d=-1;if(l!==""){const h=Math.min(n.length,o+80);for(let g=o;g<h;g++)if(n[g]===l){d=g;break}}if(d!==-1){s[r]={startLine:d,endLine:d+1},o=d+1;continue}const f=Math.min(Math.max(0,n.length-1),Math.max(0,o-1));s[r]={startLine:f,endLine:f+1}}return r=>{const l=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0;if(l<s.length)return s[l]??{startLine:0,endLine:0};const a=s[s.length-1]??{startLine:Math.max(0,n.length-1),endLine:n.length},u=Math.min(n.length,a.endLine+l-s.length);return{startLine:u,endLine:Math.min(n.length,u+1)}}}function KSe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(g=>String(g??"").toLowerCase()).filter(Boolean));if(!n.size)return e;const i=g=>g===" "||g===" ",s=g=>{const m=g.charCodeAt(0);return m>=65&&m<=90||m>=97&&m<=122||m>=48&&m<=57||g==="_"||g==="-"||g===":"},o=g=>{if(!g)return!1;if(g[0]===" ")return!0;let m=0;for(let y=0;y<g.length;y++){const A=g[y];if(A===" "){if(m++,m>=4)return!0;continue}if(A===" ")return!0;break}return!1},r=g=>{let m=!1,y=!1;for(let A=0;A<g.length;A++){const b=g[A];if(b==="\\"){A++;continue}if(!y&&b==="'"){m=!m;continue}if(!m&&b==='"'){y=!y;continue}if(!m&&!y&&b===">")return A}return-1},l=g=>{let m=0;for(;m<g.length&&i(g[m]);)m++;const y=g[m];if(y!=="`"&&y!=="~")return null;let A=m;for(;A<g.length&&g[A]===y;)A++;const b=A-m;return b<3?null:{markerChar:y,markerLen:b,rest:g.slice(A)}},a=(g,m)=>{if(o(g))return-1;const y=g.replace(/^[ \t]+/,"");if(!y||y.startsWith(">")||y.startsWith("|")||/^(?:[*+-]|\d+[.)])[\t ]+/.test(y))return-1;let A=!1,b=0;for(;b<g.length;){const C=g[b];if(C!=="<"){i(C)||(A=!0),b++;continue}const v=r(g.slice(b));if(v===-1){A=!0,b++;continue}const x=g.slice(b,b+v+1);let S=1;for(;S<x.length&&i(x[S]);)S++;if(S>=x.length){A=!0,b++;continue}const _=x[S];if(_==="!"||_==="?"){A=!0,b+=v+1;continue}if(_==="/"){A=!0,b+=v+1;continue}const I=S;for(;S<x.length&&s(x[S]);)S++;if(S===I){A=!0,b++;continue}const M=x.slice(I,S).toLowerCase(),$=x[S];if($&&$!==" "&&$!==" "&&$!==">"&&$!=="/"){A=!0,b++;continue}const D=new RegExp(String.raw`<\s*\/\s*${M}\s*>`,"i"),T=/\/\s*>$/.test(x),N=D.test(g.slice(b+v+1)),O=D.test(e.slice(m+b+v+1)),P=/[\r\n]/.test(e.slice(m+b+v+1));if(A&&n.has(M)&&!T&&!N&&(O||P))return b;A=!0,b+=v+1}return-1};let u=!1,c="",d=0,f="",h=0;for(;h<e.length;){const g=e.indexOf(` +`,h),m=g!==-1,y=m&&g>h&&e[g-1]==="\r",A=m?y?g-1:g:e.length,b=e.slice(h,A),C=m?y?`\r +`:` +`:"",v=l(b);let x=b;if(!u&&!v){const S=a(b,h);if(S!==-1){const _=C||` +`;x=`${b.slice(0,S).replace(/[ \t]+$/,"")}${_}${_}${b.slice(S).replace(/^[ \t]+/,"")}`}}f+=x,f+=C,v&&(u?v.markerChar===c&&v.markerLen>=d&&/^\s*$/.test(v.rest)&&(u=!1,c="",d=0):(u=!0,c=v.markerChar,d=v.markerLen)),h=m?g+1:e.length}return f}function VSe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(d=>String(d??"").toLowerCase()));if(!n.size)return e;const i=d=>d===" "||d===" ",s=d=>{const f=d.charCodeAt(0);return f>=65&&f<=90||f>=97&&f<=122||f>=48&&f<=57||d==="_"||d==="-"},o=d=>{let f=0;for(;f<d.length&&i(d[f]);)f++;return d.slice(f)},r=d=>{let f=!1,h=!1;for(let g=0;g<d.length;g++){const m=d[g];if(m==="\\"){g++;continue}if(!h&&m==="'"){f=!f;continue}if(!f&&m==='"'){h=!h;continue}if(!f&&!h&&m===">")return g}return-1},l=(d,f,h)=>{const g=h.toLowerCase();let m=d.indexOf("<",f);for(;m!==-1;){let y=m+1;for(;y<d.length&&i(d[y]);)y++;if(y>=d.length||d[y]!=="/"){m=d.indexOf("<",m+1);continue}for(y++;y<d.length&&i(d[y]);)y++;if(y+g.length>d.length){m=d.indexOf("<",m+1);continue}let A=!0;for(let C=0;C<g.length;C++){const v=d[y+C];if((v>="A"&&v<="Z"?String.fromCharCode(v.charCodeAt(0)+32):v)!==g[C]){A=!1;break}}if(!A){m=d.indexOf("<",m+1);continue}let b=y+g.length;if(b<d.length&&s(d[b])){m=d.indexOf("<",m+1);continue}for(;b<d.length&&i(d[b]);)b++;if(b<d.length&&d[b]===">")return!0;m=d.indexOf("<",m+1)}return!1},a=d=>{let f=0;for(;f<d.length&&i(d[f]);)f++;if(f>=d.length||d[f]!=="<")return d;for(f++;f<d.length&&i(d[f]);)f++;if(f>=d.length||d[f]==="/")return d;const h=f;for(;f<d.length&&s(d[f]);)f++;if(f===h)return d;const g=d.slice(h,f).toLowerCase();if(!n.has(g))return d;const m=r(d.slice(f));if(m===-1)return d;const y=f+m;if(l(d,y+1,g))return d;const A=o(d.slice(y+1));return A?`${d.slice(0,y+1)} +${A}`:d};let u="",c=0;for(;c<e.length;){const d=e.indexOf(` +`,c);if(d===-1){u+=a(e.slice(c));break}const f=d>c&&e[d-1]==="\r",h=f?d-1:d,g=e.slice(c,h);u+=a(g),u+=f?`\r +`:` +`,c=d+1}return u}function ZSe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(f=>String(f??"").toLowerCase()));if(!n.size)return e;const i=f=>f===" "||f===" ",s=f=>{let h=0,g=!1,m=0;for(;h<f.length;){for(;h<f.length&&i(f[h]);)h++;if(h>=f.length||f[h]!==">")break;for(g=!0,h++;h<f.length&&i(f[h]);)h++;m=h}return g?{prefix:f.slice(0,m),content:f.slice(m)}:null},o=f=>{let h=0;for(;h<f.length&&i(f[h]);)h++;const g=f[h];if(g!=="`"&&g!=="~")return null;let m=h;for(;m<f.length&&f[m]===g;)m++;const y=m-h;return y<3?null:{markerChar:g,markerLen:y,rest:f.slice(m)}},r=Array.from(n).map(f=>new RegExp(String.raw`(<\s*\/\s*${f}\s*>)${"(?=[\\t ]*(?:#{1,6}[\\t ]+|>|(?:[*+-]|\\d+[.)])[\\t ]+|(?:`{3,}|~{3,})|\\||\\$\\$|:{3,}|\\[\\^[^\\]]+\\]:|(?:-{3,}|\\*{3,}|_{3,})))"}`,"gi"));let l=!1,a="",u=0,c="",d=0;for(;d<e.length;){const f=e.indexOf(` +`,d),h=f!==-1,g=h&&f>d&&e[f-1]==="\r",m=h?g?f-1:f:e.length,y=e.slice(d,m),A=h?g?`\r +`:` +`:"",b=s(y),C=b?.prefix??"",v=b?.content??y,x=o(v);x&&(l?x.markerChar===a&&x.markerLen>=u&&/^\s*$/.test(x.rest)&&(l=!1,a="",u=0):(l=!0,a=x.markerChar,u=x.markerLen));let S=v;if(!l&&S.includes("</"))for(const _ of r)S=S.replace(_,(I,M,$,D)=>{if(D.replace(/^[\t ]+/,"").startsWith("|"))return I;const T=D.slice(0,$).replace(/^[\t ]+/,"");if(T.length>0){const N=M.match(/^<\s*\/\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"",O=T.match(/^<\s*([A-Z][\w:-]*)/i)?.[1]?.toLowerCase()??"";if(!N||!O||N!==O)return I}return`${M} + +`});if(C){const _=C+S.split(` +`).join(` +${C}`);c+=_}else c+=S;c+=A,d=h?f+1:e.length}return c}function GSe(e,t){if(!e||!t.length)return e;const n=new Set(t.map(T=>String(T??"").toLowerCase()));if(!n.size)return e;const i=T=>T===" "||T===" ",s=T=>{if(!T)return!1;if(T[0]===" ")return!0;let N=0;for(let O=0;O<T.length;O++){const P=T[O];if(P===" "){if(N++,N>=4)return!0;continue}if(P===" ")return!0;break}return!1},o=T=>{const N=T.charCodeAt(0);return N>=65&&N<=90||N>=97&&N<=122||N>=48&&N<=57||T==="_"||T==="-"||T===":"},r=T=>{let N=0;for(;N<T.length&&i(T[N]);)N++;return T.slice(N)},l=T=>{let N=0,O=!1,P=0;for(;N<T.length;){for(;N<T.length&&i(T[N]);)N++;if(N>=T.length||T[N]!==">")break;for(O=!0,N++;N<T.length&&i(T[N]);)N++;P=N}if(!O)return null;const R=T.slice(0,P);return{prefix:R,key:R.replace(/[ \t]+$/,""),content:T.slice(P)}},a=T=>r(T).startsWith("<"),u=T=>{for(let N=0;N<T.length;N++){const O=T[N];if(O!==" "&&O!==" ")return!1}return!0},c=T=>{if(s(T))return"";const N=r(T);if(!N.startsWith("<"))return"";let O=1;for(;O<N.length&&i(N[O]);)O++;if(O>=N.length||N[O]==="/"||N[O]==="!"||N[O]==="?")return"";const P=O;for(;O<N.length&&o(N[O]);)O++;if(O===P)return"";const R=N.slice(P,O).toLowerCase();if(!n.has(R))return"";const q=N[O];return q&&q!==" "&&q!==" "&&q!==">"&&q!=="/"?"":R},d=T=>{if(s(T))return null;const N=r(T);if(!N.startsWith("<"))return null;let O=1;for(;O<N.length&&i(N[O]);)O++;if(O>=N.length)return null;const P=N[O]==="/";if(P)for(O++;O<N.length&&i(N[O]);)O++;const R=N[O];if(!R||R==="!"||R==="?")return null;const q=O;for(;O<N.length&&o(N[O]);)O++;if(O===q)return null;const j=N.slice(q,O).toLowerCase();if(!n.has(j))return null;const W=N[O];if(W&&W!==" "&&W!==" "&&W!==">"&&W!=="/")return null;if(P)return{type:"close",name:j};if(/\/\s*>\s*$/.test(N))return{type:"open",name:j,complete:!0};const z=N.indexOf(">",O);if(z!==-1){const H=N.slice(z+1);if(new RegExp(`<\\s*\\/\\s*${j}\\s*>`,"i").test(H))return{type:"open",name:j,complete:!0}}return{type:"open",name:j,complete:!1}},f=T=>{if(s(T))return null;const N=r(T).replace(/[ \t]+$/,"");if(!N.startsWith("<")||/^<\s*(?:!--|!doctype\b|\?)/i.test(N))return null;const O=N.match(/^<\s*([A-Z][\w:-]*)\b[^>]*\/\s*>\s*$/i);if(O?.[1])return O[1].toLowerCase();const P=N.match(/^<\s*([A-Z][\w:-]*)\b[^>]*>[\s\S]*<\s*\/\s*([A-Z][\w:-]*)\s*>\s*$/i);if(!P?.[1]||!P[2])return null;const R=P[1].toLowerCase();return R===P[2].toLowerCase()?R:null};let h=!1,g="",m=0;const y=T=>{let N=0;for(;N<T.length&&i(T[N]);)N++;const O=T[N];if(O!=="`"&&O!=="~")return null;let P=N;for(;P<T.length&&T[P]===O;)P++;const R=P-N;return R<3?null:{markerChar:O,markerLen:R,rest:T.slice(P)}},A=T=>y(T),b=T=>{const N=r(T);return N?s(T)?!0:/^(?:#{1,6}[ \t]+|>|[*+-][ \t]+|\d+[.)][ \t]+|`{3,}|~{3,}|\||\$\$|:{3,}|\[\^[^\]]+\]:|-{3,}|\*{3,}|_{3,})/.test(N):!1},C=(T,N,O)=>{let P=T,R=0;for(;P<e.length;){const q=e.indexOf(` +`,P),j=q!==-1,W=j&&q>P&&e[q-1]==="\r",z=j?W?q-1:q:e.length,H=e.slice(P,z),ee=l(H),V=ee?.key??"";if(R>0&&N&&V!==N)break;const ie=ee?.content??H,se=d(ie);if(se?.name===O){if(se.type==="open")se.complete||R++;else if(R>0&&(R--,R===0))return!1}else if(R>0&&(u(ie)||b(ie)))return!0;if(j)P=q+1;else break}return!1};let v="",x=0,S=!0,_=!1,I=!1,M=` +`;const $=[];let D="";for(;x<e.length;){const T=e.indexOf(` +`,x),N=T!==-1,O=N&&T>x&&e[T-1]==="\r",P=N?O?T-1:T:e.length,R=e.slice(x,P),q=N?O?`\r +`:` +`:"",j=l(R),W=j?.key??"",z=j?.content??R,H=A(z);H&&(h?H.markerChar===g&&H.markerLen>=m&&/^\s*$/.test(H.rest)&&(h=!1,g="",m=0):(h=!0,g=H.markerChar,m=H.markerLen));const ee=$.length>0;if(!h&&!ee){const ie=c(z),se=!!ie&&!S&&_&&I&&C(x,W,ie);ie&&!S&&(!_||se)&&(W&&D&&W===D?v+=`${W}${M}`:W||(v+=M))}if(v+=R,v+=q,q&&(M=q),!h){const ie=d(z);if(ie){if(ie.type==="open")ie.complete||$.push(ie.name);else for(let se=$.length-1;se>=0;se--)if($[se]===ie.name){$.length=se;break}}}const V=u(z);S=V,_=!V&&a(z),I=!V&&!!f(z),D=W,x=N?T+1:e.length}return v}function QSe(e){let t=!1,n="",i=0,s=!1,o=!1,r=!1,l=0;const a=(c,d)=>{const f=u7(c);if(f){t?f.markerChar===n&&f.markerLen>=i&&/^\s*$/.test(f.rest)&&(t=!1,n="",i=0):(t=!0,n=f.markerChar,i=f.markerLen);return}if(t)return;let h=0;for(;h<c.length;){if(s){c.startsWith("$$",h)&&!ca(c,h)?(s=!1,h+=2):h++;continue}if(o){c.startsWith("\\]",h)&&!ca(c,h)?(o=!1,h+=2):h++;continue}const g=c[h];if(g==="`"){const m=c7(c,h,"`"),y=DR(c,h+m,m);if(y===-1)break;h=y+m;continue}if(g==="\\"){const m=c[h+1];m==="["&&!ca(c,h)?(o=!0,h+=2):(m==="]"&&ca(c,h),h+=2);continue}if(g==="$"){if(c[h+1]==="$"&&!ca(c,h)){s=!0,r=!1,h+=2;continue}if(r){r=!1,h++;continue}const m=c[h+1];(m===void 0||m!==" "&&m!==" "&&!/\d/.test(m))&&(r=!0),h++;continue}h++}};return{scanTo:c=>{for(;l<c;){const d=e.indexOf(` +`,l),f=d===-1||d>=c?c:d,h=f>l&&e[f-1]==="\r"?f-1:f;if(a(e.slice(l,h)),d===-1||d>=c){l=c;break}r=!1,l=d+1}},inMath:()=>s||o||r}}function H3(e,t,n,i){let s=e.replace(/([^\\])\r(ight|ho)/g,"$1\\r$2");const o=QSe(s);if(s=s.replace(/([^\\])\r?\n(abla|eq|ot|exists)/g,(r,l,a,u)=>{o.scanTo(u+1);const c=o.inMath();return o.scanTo(u+r.length),c?`${l}\\n${a}`:r}),t||(s.endsWith("- *")&&(s=s.replace(/- \*$/,"- \\*")),/(?:^|\n)\s*-\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*-\s*$/,r=>r.startsWith(` +`)?` +`:""):/(?:^|\n)\s*--\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*--\s*$/,r=>r.startsWith(` +`)?` +`:""):/(?:^|\n)\s*>\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*>\s*$/,r=>r.startsWith(` +`)?` +`:""):/\n\s*[*+]\s*$/.test(s)?s=s.replace(/\n\s*[*+]\s*$/,` +`):/(?:^|\n)\s*\d+\s*$/.test(s)?/^\d+$/.test(s.trim())||(s=s.replace(/(?:^|\n)\s*\d+\s*$/,r=>r.startsWith(` +`)?` +`:"")):/(?:^|\n)\s*\d+[.)]\s+\*{1,3}\s*$/.test(s)?s=s.replace(/((?:^|\n)\s*\d+[.)]\s+)(\*{1,3})\s*$/,(r,l,a)=>`${l}${a.split("").map(()=>"\\*").join("")}`):/(?:^|\n)\s*\d+[.)]\s*$/.test(s)?s=s.replace(/(?:^|\n)\s*\d+[.)]\s*$/,r=>r.startsWith(` +`)?` +`:""):/\n[[(]\n*$/.test(s)&&(s=s.replace(/(\n\[|\n\()+\n*$/g,` +`)),s=mSe(s,i.customHtmlTags)??s),i.customHtmlTags?.length&&s.includes("<")){const r=sf(i.customHtmlTags);if(r.length&&(s=KSe(s,r),s=VSe(s,r),s=GSe(s,r),s=ZSe(s,r),s.includes("</")))for(const l of r){const a=new RegExp(String.raw`(^[\t ]*<\s*\/\s*${l}\s*>[\t ]*)(\r?\n)(?![\t ]*\r?\n|$)`,"gim");s=s.replace(a,"$1$2$2")}}return t||(s=USe(s)),s}function YSe(e,t,n,i){const s=e,o=`${n?"final":"stream"}:${(i.customHtmlTags??[]).join(",")}`,r=g8.get(s);let l;if(!n&&!i.customHtmlTags?.length&&r&&r.mode===o&&t.length>=r.source.length&&t.startsWith(r.source)){const a=Math.max(0,r.source.length-Vxe-Zxe),u=H3(t.slice(a),n,e,i),c=r.source.length-a;l=u.length>=c&&u.slice(0,c)===r.safeMarkdown.slice(-c)?r.safeMarkdown.slice(0,r.safeMarkdown.length-c)+u:H3(t,n,e,i)}else l=H3(t,n,e,i);return n||(l=vSe(l,e)),g8.set(s,{source:t,safeMarkdown:l,mode:o}),l}function PR(e,t,n={}){const i=IR(n),s=i?El():0,o=!!n.final,r=(e??"").toString();lSe(t,n)&&(t.stream.reset(),aSe(t),g8.delete(t));const l=YSe(t,r,o,n);i&&Ju(i,"safeMarkdownMs",El()-s);const a=_Se(l);if(a){if(n.includeSourceMap){const x={...n,__sourceLineMapper:fM(r,l)};a[0].sourceMap=m0(l,0,l.length,x)}const C=n.preTransformTokens,v=n.postTransformTokens;if(o7(t,n)||typeof C=="function"||typeof v=="function"){const x=rM(t,l,{__markstreamFinal:o},n),S=typeof C=="function"&&C(x)||x;typeof v=="function"&&v(S)}return eM(a,n,i,s)}const u=i?El():0,c=rM(t,l,{__markstreamFinal:o},n);if(i&&Ju(i,"tokenizeMs",El()-u),!c||!Array.isArray(c))return eM([],n,i,s);const d=n.preTransformTokens,f=n.postTransformTokens;let h=c;d&&typeof d=="function"&&(h=d(h)||h);const g=t,m=typeof g.validateLink=="function"&&g.__markstreamOriginalValidateLink&&g.validateLink!==g.__markstreamOriginalValidateLink?g.validateLink:void 0,y=n.validateLink??m??g.options?.validateLink??(typeof g.validateLink=="function"?g.validateLink:void 0),A={...n,validateLink:y,__markdownIt:t,__sourceLineMapper:n.includeSourceMap===!0?fM(r,l):void 0,__sourceMarkdown:l,__customHtmlBlockCursor:0};let b=iSe(t,l,h,A,i);if(f&&typeof f=="function"){const C=f(h);if(Array.isArray(C)){const v=C[0],x=v?.type;v&&typeof x=="string"?b=Wf(C,{...A,__customHtmlBlockCursor:0},i):b=C}}if(PSe(b)){const C=i?El():0;b=qSe(b,o,l,A),b=OR(b,l,t,A,o)[0],b=OSe(b,t,A,o),i&&Ju(i,"htmlBlockPassesMs",El()-C)}if(o){const C=new WeakSet,v=x=>{if(!x||typeof x!="object"||C.has(x))return;if(C.add(x),Array.isArray(x)){for(const _ of x)v(_);return}const S=x;S.type==="html_block"&&S.loading===!0&&(S.loading=!1);for(const _ of Object.values(S))v(_)};v(b)}return b=ER(b,n),n.debug&&console.log("Parsed Markdown Tree Structure:",b),MR(b,i,s)}function hM(e,t){if(!e||!Array.isArray(e))return[];const n=[],i=Tc(t),s=t?.__linkifyDemotionSeed;if(Array.isArray(s)&&s.length)for(const l of s)i.remember(String(l??""));const o=t?.includeSourceMap===!0;let r=0;for(;r<e.length;){const l=s7(e,r,i.options(),i7);if(l){ia(l[0],e[r],t),n.push(l[0]),i.remember(l[0].raw),r=l[1];continue}const a=e[r];switch(a.type){case"paragraph_open":{const u=String(e[r+1]?.content??""),c=qxe(e,r,i.options(u));o&&Jn(c,a,t);const d=uM(c,t);if(d){o&&aM(d,c);for(const f of d)ia(f,a,t);n.push(...d)}else ia(c,a,t),n.push(c);i.remember(c.raw),r+=3;break}case"bullet_list_open":case"ordered_list_open":{const[u,c]=Vh(e,r,i.options());o&&Jn(u,a,t),ia(u,a,t),n.push(u),i.remember(u.raw),r=c;break}case"blockquote_open":{const[u,c]=Zh(e,r,i.options());o&&Jn(u,a,t),ia(u,a,t),n.push(u),i.remember(u.raw),r=c;break}case"footnote_anchor":{const u=a.meta??{},c={type:"footnote_anchor",id:String(u.label??a.content??""),raw:String(a.content??"")};o&&Jn(c,a,t),ia(c,a,t),n.push(c),i.remember(String(a.content??"")),r++;break}case"hardbreak":n.push(Wxe()),i.reset(),r++;break;case"text":{const u=String(a.content??""),c={type:"paragraph",raw:u,children:u?[{type:"text",content:u,raw:u}]:[]};o&&Jn(c,a,t),ia(c,a,t),n.push(c),i.remember(u),r++;break}case"inline":{const u=String(a.content??""),c=as(a.children||[],u,void 0,i.options(u));if(c.length!==0)if(c.every(d=>d.type==="html_block")){if(o)for(const d of c)Jn(d,a,t);for(const d of c)ia(d,a,t);n.push(...c)}else{const d={type:"paragraph",raw:u,children:c};o&&Jn(d,a,t);const f=uM(d,t);if(f){o&&aM(f,d);for(const h of f)ia(h,a,t);n.push(...f)}else ia(d,a,t),n.push(d)}i.remember(u)}r+=1;break;default:r+=1;break}}return n}const JSe=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g,Ip=/\d/u,XSe=/[,.!?;:,。;、!?:]/u,e_e=/\d\p{Script=Han}{1,3}$/u;function t_e(e){return e.pos>0&&e.pos+1<e.posMax&&Ip.test(e.src[e.pos-1])&&Ip.test(e.src[e.pos+1])}function n_e(e,t,n,i,s,o={}){const r=e.charCodeAt(0);return(l,a)=>{const u=l,c=u.posMax,d=u.pos;if(u.src.charCodeAt(d)!==r||a||o.refuseDigitRange&&t_e(u))return!1;u.pos=d+1;let f=!1;for(;u.pos<c;){if(u.src.charCodeAt(u.pos)===r){f=!0;break}u.md.inline.skipToken(u)}if(!f||d+1===u.pos)return u.pos=d,!1;const h=u.src.slice(d+1,u.pos);if(!h||h.match(/(^|[^\\])(\\\\)*\s/))return u.pos=d,!1;const g=u.src[u.pos+1],m=Ip.test(h[0]),y=g!==void 0&&Ip.test(g);if(m&&y&&(e_e.test(u.src.slice(0,d))||XSe.test(h)||Ip.test(h[h.length-1])))return u.pos=d,!1;const A=u.push(n,s,1);A.markup=t;const b=u.push("text","",0);b.content=h.replace(JSe,"$1");const C=u.push(i,s,-1);return C.markup=t,u.pos=u.pos+1,!0}}function i_e(e){const t=n_e("~","~","sub_open","sub_close","sub",{refuseDigitRange:!0});e.inline.ruler.after("emphasis","sub",t)}const s_e=/^([a-z][\w-]*)(?=[\t\n\f\r />]|$)/i,o_e=new Set([...Z0,"base","button","datalist","dialog","embed","fieldset","form","iframe","input","legend","link","meta","object","optgroup","option","output","param","select","style","template","textarea","title"]),r_e=new Set(["a","abbr","b","blockquote","br","caption","code","col","colgroup","dd","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","picture","pre","s","small","source","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","ul"]);function pM(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l_e(e){return typeof e=="string"?e:e==null?"":String(e)}function jR(e){return/^[^\s"'<>`=]+$/.test(e)&&!/^on/i.test(e)}function Hu(e){return l_e(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function HR(e){return Hu(e).replace(/`/g,"`")}function u9(e){return String(e??"").trim().toLowerCase()}function d7(e,t="safe"){const n=u9(e);return n?t==="escape"?!0:t==="trusted"?Z0.has(n):!r_e.has(n):!1}function WR(e,t="safe"){const n=u9(e);return n?t==="escape"?!0:t==="trusted"?Z0.has(n):o_e.has(n):!1}function gM(e){const t=Object.entries(e);return t.length===0?"":t.map(([n,i])=>i===""?` ${n}`:` ${n}="${HR(i)}"`).join("")}function qR(e){const t=e.startsWith("/"),n=t?e.slice(1):e,i=n.match(s_e);return i?{attrsStr:t?"":n.slice(i[0].length).trimStart(),isClosing:t,isSelfClosing:!t&&e.trimEnd().endsWith("/"),tagName:i[1]}:null}function a_e(e,t){const n=e.split(",").map(i=>i.trim()).filter(Boolean);return n.length===0?!1:n.some(i=>{const s=i.split(/\s+/,1)[0]??"";return!s||Td(s,{tagName:t,attrName:"srcset"})})}function UR(e,t,n,i){return q7e.has(e)||n==="safe"&&e==="style"?!0:e==="srcset"?a_e(t,i):!!(U7e.has(e)&&t&&Td(t,{tagName:i,attrName:e}))}function pd(e,t){const n=t.toLowerCase();return Object.keys(e).find(i=>i.toLowerCase()===n)}function KR(e,t,n,i=!1){if(t!=="safe"||u9(n)!=="a")return e;const s=pd(e,"href");if(i&&(!s||!e[s])){const a=pd(e,"target"),u=pd(e,"rel");return a&&delete e[a],u&&delete e[u],e}const o=pd(e,"target");if((o?String(e[o]).trim():"").toLowerCase()!=="_blank")return e;const r=pd(e,"rel"),l=new Set(String(r?e[r]:"").split(/\s+/).map(a=>a.trim()).filter(Boolean).filter(a=>a.toLowerCase()!=="opener"));return l.add("noopener"),l.add("noreferrer"),r&&r!=="rel"&&delete e[r],e.rel=Array.from(l).join(" "),e}function mM(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!jR(r)||UR(l,o,t,n)||(i[r]=o)}return KR(i,t,n,!!pd(e,"href"))}function VR(e,t){const n=e.toLowerCase();return Bz.has(n)?!1:pM(t,n)||pM(t,e)}function f7(e,t="safe",n){const i={};for(const[s,o]of Object.entries(e)){const r=s.trim(),l=r.toLowerCase();!r||!jR(r)||UR(l,o,t,n)||(i[r]=o)}return KR(i,t,n,!!pd(e,"href"))}function Mp(e){const t={};if(!Array.isArray(e)||e.length===0)return t;for(const[n,i]of e)n&&(t[String(n)]=i==null?"":String(i));return t}function c2(e,t="safe",n){const i=f7(Mp(e),t,n),s=Object.entries(i).map(([o,r])=>[o,r]);return s.length>0?s:void 0}function u_e(e,t){const n=t.toLowerCase();if(["checked","disabled","readonly","required","autofocus","multiple","hidden"].includes(n))return e==="true"||e===""||e===t;if(["value","min","max","step","width","height","size","maxlength"].includes(n)){const i=Number(e);if(e!==""&&!Number.isNaN(i))return i}return e}function c_e(e){const t={};for(const[n,i]of Object.entries(e))t[n]=u_e(i,n);return t}function W3(e){return e.trim().length>0}function ZR(e){const t=[];let n=0;for(;n<e.length;){if(e.startsWith("<!--",n)){const r=e.indexOf("-->",n);if(r!==-1){n=r+3;continue}break}const i=e.indexOf("<",n);if(i===-1){if(n<e.length){const r=e.slice(n);W3(r)&&t.push({type:"text",content:r})}break}if(i>n){const r=e.slice(n,i);W3(r)&&t.push({type:"text",content:r})}if(e.startsWith("![CDATA[",i+1)){const r=e.indexOf("]]>",i);if(r!==-1){t.push({type:"text",content:e.slice(i,r+3)}),n=r+3;continue}break}if(e.startsWith("!",i+1)){const r=e.indexOf(">",i);if(r!==-1){n=r+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=qR(e.slice(i+1,s));if(!o){const r=e.slice(i,s+1);W3(r)&&t.push({type:"text",content:r}),n=s+1;continue}if(o.isClosing)t.push({type:"tag_close",tagName:o.tagName});else{const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||dc.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r})}n=s+1}return t}function d_e(e){const t=[];let n=0;for(;n<e.length;){if(e.startsWith("<!--",n)){const l=e.indexOf("-->",n);if(l!==-1){n=l+3;continue}break}const i=e.indexOf("<",n);if(i===-1){n<e.length&&t.push({type:"text",content:e.slice(n)});break}if(i>n&&t.push({type:"text",content:e.slice(n,i)}),e.startsWith("![CDATA[",i+1)){const l=e.indexOf("]]>",i);if(l!==-1){t.push({type:"text",content:e.slice(i,l+3)}),n=l+3;continue}break}if(e.startsWith("!",i+1)){const l=e.indexOf(">",i);if(l!==-1){n=l+1;continue}break}const s=e.indexOf(">",i);if(s===-1)break;const o=qR(e.slice(i+1,s));if(!o){t.push({type:"text",content:e.slice(i,s+1)}),n=s+1;continue}if(o.isClosing){t.push({type:"tag_close",tagName:o.tagName}),n=s+1;continue}const r={};if(o.attrsStr){const l=/([^\s=]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S*)))?/g;let a;for(;(a=l.exec(o.attrsStr))!==null;){const u=a[1],c=a[2]??a[3]??a[4]??"";u&&!u.endsWith("/")&&(r[u]=c)}}t.push({type:o.isSelfClosing||dc.has(o.tagName.toLowerCase())?"self_closing":"tag_open",tagName:o.tagName,attrs:r}),n=s+1}return t}function f_e(e){const t=String(e.tagName??"").trim();if(!t)return"";if(e.type==="tag_close")return`</${Hu(t)}>`;const n=Object.entries(e.attrs??{}).map(([i,s])=>s===""?` ${Hu(i)}`:` ${Hu(i)}="${HR(s)}"`).join("");return e.type==="self_closing"?`<${Hu(t)}${n} />`:`<${Hu(t)}${n}>`}function h_e(e,t){if(!e||!e.includes("<")||!t||Object.keys(t).length===0)return!1;for(const n of ZR(e))if((n.type==="tag_open"||n.type==="self_closing")&&VR(n.tagName??"",t))return!0;return!1}function bh(e,t="safe"){if(!e)return"";if(t==="escape")return Hu(e);const n=d_e(e),i=[],s=[],o=[];for(const r of n){if(r.type==="text"){o.length===0&&s.push(Hu(r.content??""));continue}const l=u9(r.tagName);if(!l)continue;if(WR(l,t)){r.type==="tag_open"?o.push(l):r.type==="tag_close"&&o[o.length-1]===l&&o.pop();continue}if(o.length>0)continue;if(t==="safe"&&d7(l,t)){s.push(f_e(r));continue}if(r.type==="self_closing"){s.push(`<${l}${gM(mM(r.attrs??{},t,l))}>`);continue}if(r.type==="tag_open"){s.push(`<${l}${gM(mM(r.attrs??{},t,l))}>`),dc.has(l)||i.push(l);continue}const a=i.lastIndexOf(l);if(a===-1)continue;for(;i.length>a+1;){const c=i.pop();c&&s.push(`</${c}>`)}const u=i.pop();u&&s.push(`</${u}>`)}for(;i.length>0;){const r=i.pop();r&&s.push(`</${r}>`)}return s.join("")}const p_e=[/javascript:/i,/vbscript:/i,/data:text\/html/i,/expression\s*\(/i,/@import/i],vM="http://www.w3.org/2000/svg",g_e=new Set(["script","style","iframe","object","embed","link","meta"]),m_e=new Set(["svg","style","g","a","defs","marker","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","title","desc","use","image","lineargradient","radialgradient","stop","clippath","mask","pattern"]),v_e=new Set(["href","xlink:href","src","srcdoc","action","data","formaction","poster"]),y_e=new Set(["clip-path","fill","filter","marker-end","marker-mid","marker-start","mask","stroke"]),k_e=new Set(["circle","ellipse","image","line","path","polygon","polyline","rect","text","tspan","use"]);function b_e(e){return(e.getAttribute("href")||e.getAttribute("xlink:href"))?.startsWith("#")===!0}function A_e(e){return!!(e.getAttribute("href")||e.getAttribute("xlink:href")||e.getAttribute("src"))}function C_e(e){const t=e.nodeName.toLowerCase();return t==="use"?b_e(e):t==="image"?A_e(e):t==="text"||t==="tspan"?!!e.textContent?.trim():k_e.has(t)}function w_e(e){return e.replace(/(["'])\s*javascript:/gi,"$1#").replace(/\bjavascript:/gi,"#").replace(/(["'])\s*vbscript:/gi,"$1#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#")}function x_e(e,t,n){const i=e.toLowerCase(),s=t.toLowerCase(),o=String(n??"").trim();return o?(i==="use"||i==="marker"||i==="clippath"||i==="mask")&&(s==="href"||s==="xlink:href")?o.startsWith("#")?o:"":i==="a"&&(s==="href"||s==="xlink:href")?Td(o,{tagName:"a",attrName:"href"})?"":o:i==="image"&&(s==="href"||s==="xlink:href"||s==="src")?Td(o,{tagName:"img",attrName:"src"})?"":o:s==="href"||s==="xlink:href"?o.startsWith("#")?o:"":Td(o,{tagName:i,attrName:s})?"":o:""}function S_e(e,t){let n=t+4;for(;n<e.length&&/\s/.test(e[n]??"");)n++;const i=e[n];if(i==='"'||i==="'"){const o=n+1,r=e.indexOf(i,o);if(r===-1)return{next:e.length,url:""};for(n=r+1;n<e.length&&/\s/.test(e[n]??"");)n++;return{next:n<e.length&&e[n]===")"?n+1:n,url:e.slice(o,r)}}const s=n;for(;n<e.length&&e[n]!==")";)n++;return{next:n<e.length?n+1:n,url:e.slice(s,n)}}function GR(e){return e.replace(/\\([0-9a-f]{1,6}\s?|.)/gi,(t,n)=>{const i=n.trim();if(/^[0-9a-f]+$/i.test(i)){const s=Number.parseInt(i,16);try{return Number.isFinite(s)?String.fromCodePoint(s):""}catch{return""}}return String(n).trim()})}function QR(e){const t=GR(e),n=t.toLowerCase();let i=0;for(;i<n.length;){const s=n.indexOf("url(",i);if(s===-1)return!1;const o=S_e(t,s);if(i=Math.max(o.next,s+4),!o.url.trim().startsWith("#"))return!0}return!1}function yM(e){const t=GR(e);return p_e.some(n=>n.test(t))||QR(t)}function __e(e){if(e.tagName.toLowerCase()!=="a"||e.getAttribute("target")?.trim().toLowerCase()!=="_blank")return;const t=new Set(String(e.getAttribute("rel")??"").split(/\s+/).map(n=>n.trim()).filter(Boolean).filter(n=>n.toLowerCase()!=="opener"));t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",Array.from(t).join(" "))}function Sm(e){const t=Number.parseFloat(String(e??""));return Number.isFinite(t)?t:0}function YR(e,t){if(e.nodeType===Node.TEXT_NODE){const s=e.textContent??"";s&&t.push(s);return}if(e.nodeType!==Node.ELEMENT_NODE)return;const n=e,i=n.tagName.toLowerCase();if(!g_e.has(i)){if(i==="br"){t.push(` +`);return}for(const s of Array.from(n.childNodes))YR(s,t)}}function I_e(e){for(const t of Array.from(e.querySelectorAll("foreignObject"))){const n=[];YR(t,n);const i=n.join("").split(/\r?\n/).map(c=>c.trim()).filter(Boolean);if(!i.length){t.remove();continue}const s=Sm(t.getAttribute("width")),o=Sm(t.getAttribute("height")),r=Sm(t.getAttribute("x")),l=Sm(t.getAttribute("y")),a=e.ownerDocument.createElementNS(vM,"text");a.setAttribute("x",String(r+s/2)),a.setAttribute("y",String(l+o/2)),a.setAttribute("text-anchor","middle"),a.setAttribute("dominant-baseline","central");const u=t.querySelector(".nodeLabel");if(u?.getAttribute("class")&&a.setAttribute("class",u.getAttribute("class")),i.length===1)a.textContent=i[0];else{const c=-.6*(i.length-1);for(const[d,f]of i.entries()){const h=e.ownerDocument.createElementNS(vM,"tspan");h.setAttribute("x",String(r+s/2)),h.setAttribute("dy",d===0?`${c}em`:"1.2em"),h.textContent=f,a.appendChild(h)}}t.parentNode?.replaceChild(a,t)}}function M_e(e){I_e(e);const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){const i=n.tagName.toLowerCase();if(!m_e.has(i)){n.remove();continue}if(i==="style"&&yM(n.textContent??"")){n.remove();continue}const s=Array.from(n.attributes);for(const o of s){const r=o.name.toLowerCase();if(/^on/i.test(r)){n.removeAttribute(o.name);continue}if(r==="style"&&o.value&&yM(o.value)){n.removeAttribute(o.name);continue}if(r==="srcdoc"){n.removeAttribute(o.name);continue}if(v_e.has(r)&&o.value){const l=x_e(i,r,o.value);if(!l){n.removeAttribute(o.name);continue}l!==o.value&&n.setAttribute(o.name,l);continue}if(y_e.has(r)&&o.value&&QR(o.value)){n.removeAttribute(o.name);continue}if(o.value){const l=w_e(o.value);l!==o.value&&n.setAttribute(o.name,l)}}__e(n)}}function Iat(e){if(typeof DOMParser>"u"||!e)return null;try{const t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;if(!t||t.nodeName.toLowerCase()!=="svg")return null;const n=t;return M_e(n),E_e(n)?null:n}catch{return null}}function E_e(e){const t=e.getAttribute("viewBox");if(t){const s=t.trim().split(/[\s,]+/);if(s.length===4){const o=Number.parseFloat(s[2]||""),r=Number.parseFloat(s[3]||"");if(!Number.isFinite(o)||!Number.isFinite(r)||o<=0||r<=0)return!0}}const n=[e,...Array.from(e.querySelectorAll("*"))];let i=!1;for(const s of n){C_e(s)&&(i=!0);for(const o of Array.from(s.attributes))if(/\bNaN\b/i.test(o.value)||o.name==="style"&&/max-width:\s*0(?:px)?/i.test(o.value))return!0}return!i}const _m=[];function q3(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function T_e(e){return(String(e||"text").trim().split(/\s+/)[0]||"text").replace(/[^\w+.#:-]/g,"-").replace(/-+/g,"-")||"text"}function L_e(e){return e.replace(/[^\w:.+-]/g,"-").replace(/-+/g,"-")}function kM(e=`editor-${Date.now()}`,t={}){const n=uwe(t),i=n;i.__markstreamRegisteredPluginCount=_m.length,i.__markstreamHasCustomParserExtensions=!!(t.plugin?.length||t.apply?.length||_m.length);const s={"common.copy":"Copy"};let o;if(typeof t.i18n=="function")o=t.i18n;else if(t.i18n&&typeof t.i18n=="object"){const h=t.i18n;o=g=>h[g]??s[g]??g}else o=h=>s[h]??h;if(Array.isArray(t.plugin))for(const h of t.plugin){const g=h;if(Array.isArray(g)){const[m,...y]=g;typeof m=="function"&&n.use(m,...y)}else typeof g=="function"&&n.use(g)}if(Array.isArray(t.apply))for(const h of t.apply)try{h(n)}catch(g){console.error("[getMarkdown] apply function threw an error",g)}if(_m.length)for(const h of _m)if(Array.isArray(h)){const[g,...m]=h;typeof g=="function"&&n.use(g,...m)}else typeof h=="function"&&n.use(h);n.use(i_e),n.use(Ebe),n.use(_be);const r=Hbe,l=r.default??r;n.use(l),n.use(Sbe),n.use(xbe),n.core.ruler.after("block","mark_fence_closed",h=>{const g=h,m=g.src,y=!!g.env?.__markstreamFinal,A=m.split(/\r?\n/);for(const b of g.tokens){if(b.type!=="fence"||!b.map||!b.markup)continue;const C=b.map[0],v=b.map[1],x=b.markup,S=x[0],_=x.length,I=A[Math.max(0,v-1)]??"";let M=0;for(;M<I.length&&(I[M]===" "||I[M]===" ");)M++;let $=0;for(;M+$<I.length&&I[M+$]===S;)$++;let D=M+$;for(;D<I.length&&(I[D]===" "||I[D]===" ");)D++;const T=y?!0:v>C+1&&$>=_&&D===I.length,N=b;N.meta=N.meta??{},N.meta.unclosed=!T,N.meta.closed=!!T}}),n.renderer.rules.fence=(h,g)=>{const m=h[g],y=String(m.info??"").trim(),A=String(m.content??""),b=btoa(unescape(encodeURIComponent(A))),C=T_e(y),v=q3(C),x=L_e(`editor-${e}-${g}-${C}`),S=q3(o("common.copy"));return`<div class="code-block" data-code="${b}" data-lang="${v}" id="${x}"> + <div class="code-header"> + <span class="code-lang">${q3(C.toUpperCase())}</span> + <button class="copy-button" data-code="${b}">${S}</button> + </div> + <div class="code-editor"></div> + </div>`};const a=/^\[(\d+)\]/,u=/^\[([^\]\n]+)\]/,c=h=>{if(!h.startsWith("["))return!1;const g=u.exec(h);if(!g)return h!=="["&&!/^\[\d+$/.test(h);const m=String(g[1]??"");return h.slice(g[0].length).startsWith("(")?!1:!/^\d+$/.test(m)},d=(h,g)=>{const m=h;if(m.src[m.pos]!=="[")return!1;const y=a.exec(m.src.slice(m.pos));if(!y)return!1;const A=m.src.slice(Math.max(0,m.pos-120),m.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(A))return!1;const b=m.src.slice(m.pos+y[0].length);if(b.startsWith("](")||b.startsWith("(")||c(b))return!1;if(!g){const C=y[1],v=m.push("reference","span",0);v.content=C,v.markup=y[0],v.raw=y[0]}return m.pos+=y[0].length,!0};n.inline.ruler.before("escape","reference",d),n.renderer.rules.reference=(h,g)=>{const y=String(h[g].content??"");return`<span class="reference-link" data-reference-id="${y}" role="button" tabindex="0" title="Click to view reference">${y}</span>`};const f=n.use.bind(n);return n.use=((...h)=>(i.__markstreamHasCustomParserExtensions=!0,f(...h))),n}function N_e({nextContent:e,previousContent:t,typewriterEnabled:n}){return n?e===t?{settledContent:e,streamedDelta:"",appended:!1}:t&&e.startsWith(t)&&e.length>t.length?{settledContent:t,streamedDelta:e.slice(t.length),appended:!0}:{settledContent:e,streamedDelta:"",appended:!1}:{settledContent:e,streamedDelta:"",appended:!1}}function JR({nextContent:e,persistedContent:t,currentState:n,typewriterEnabled:i,streamRenderVersionChanged:s=!1}){const o=`${n.settledContent}${n.streamedDelta}`;return i?n.streamedDelta&&o===e?s?{settledContent:o,streamedDelta:"",appended:!1}:{settledContent:n.settledContent,streamedDelta:n.streamedDelta,appended:!1}:N_e({nextContent:e,previousContent:t??o,typewriterEnabled:i}):{settledContent:e,streamedDelta:"",appended:!1}}const F_e={plain:"plaintext",text:"plaintext",txt:"plaintext",js:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",golang:"go",py:"python",rb:"ruby",rs:"rust",kt:"kotlin",kts:"kotlin",md:"markdown",yml:"yaml",sh:"shellscript",bash:"shellscript",zsh:"shellscript",shell:"shellscript",shellscript:"shellscript",ps:"powershell",ps1:"powershell",pwsh:"powershell","c++":"cpp","c#":"csharp",cs:"csharp",objc:"objective-c",objectivec:"objective-c","objective-c":"objective-c",objectivecpp:"objective-cpp","objective-c++":"objective-cpp","objective-cpp":"objective-cpp"};function D_e(e){const t=String(e??"").trim();if(!t)return"";const[n=""]=t.split(/\s+/);return n.split(":")[0]?.trim().toLowerCase()??""}function XR(e){const t=D_e(e);return F_e[t]??t}function $_e(e){if(!Array.isArray(e))return;const t=e.filter(i=>typeof i=="string").map(i=>XR(i)).filter(Boolean),n=Array.from(new Set(t)).sort();return n.length>0?n:void 0}function B_e(e){if(!Array.isArray(e))return;const t=[],n=new Set;for(const i of e){if(typeof i!="string")continue;const s=i.trim();!s||n.has(s)||(n.add(s),t.push(s))}return t.length>0?t:void 0}function z_e(e){return B_e(e)?.join("\0")??""}function R_e(e,t){return`${z_e(e)}\0\0${$_e(t)?.join("\0")??""}`}function Lf(e,t,n=1){const i=Number(e);return Number.isFinite(i)?Math.max(n,i):t}function bM(e,t){const n=Number(e);return Number.isFinite(n)?Math.max(0,n):t}var O_e=class{constructor(e={},t){this.source="",this.visible="",this.done=!1,this.paused=!1,this.listeners=new Set,this.rafId=0,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.hasStarted=!1,this.destroyed=!1,this.getSnapshot=()=>({source:this.source,visible:this.visible,done:this.done,paused:this.paused,pendingChars:this.pendingChars,caughtUp:this.caughtUp,final:this.final}),this.subscribe=d=>this.destroyed?()=>{}:(this.listeners.add(d),()=>{this.listeners.delete(d)}),this.enqueue=d=>{if(this.destroyed||!d)return;this.done&&(this.done=!1);const f=this.source.length>0,h=this.pendingChars<=0;if(this.source+=d,h){const g=AM();this.startedAt=f&&this.hasStarted?g-this.normalizedStartDelayMs:g,this.lastTick=g,this.charBudget=0}this.hasStarted=!0,this.emit(),this.ensureLoop()},this.finish=(d={})=>{if(!this.destroyed){if(this.done=!0,d.flush??this.flushOnFinish){this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit();return}this.emit(),this.ensureLoop()}},this.flush=()=>{this.destroyed||(this.visible=this.source,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.cancelLoop(),this.emit())},this.reset=(d="")=>{this.destroyed||(this.cancelLoop(),this.source=d,this.visible=d,this.done=!1,this.paused=!1,this.hasStarted=!1,this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond,this.emit())},this.pause=()=>{this.destroyed||this.paused||(this.paused=!0,this.cancelLoop(),this.emit())},this.resume=()=>{if(this.destroyed||!this.paused)return;this.paused=!1;const d=AM();this.lastTick=d,this.startedAt||=d,this.emit(),this.ensureLoop()},this.destroy=()=>{this.destroyed||(this.destroyed=!0,this.cancelLoop(),this.listeners.clear())},this.dispose=()=>{this.destroy()},this.tick=d=>{if(this.rafId=0,this.destroyed||this.paused)return;if(this.pendingChars<=0){this.startedAt=0,this.lastTick=0,this.charBudget=0,this.currentCps=this.minCharsPerSecond;return}if(d-this.startedAt<this.normalizedStartDelayMs){this.rafId=requestAnimationFrame(this.tick);return}const f=1e3/Math.max(1,this.maxCommitFps),h=Math.min(100,Math.max(0,d-this.lastTick));if(h<f){this.rafId=requestAnimationFrame(this.tick);return}this.lastTick=d;const g=this.pendingChars,m=g>this.normalizedCatchUpThreshold?this.normalizedCatchUpLatencyMs:this.normalizedTargetLatencyMs,y=W_e(g/Math.max(.001,m/1e3),this.minCharsPerSecond,this.maxCharsPerSecond);if(this.currentCps+=(y-this.currentCps)*.2,this.charBudget+=this.currentCps*(h/1e3),this.charBudget<1){this.ensureLoop();return}const A=Math.min(Math.floor(this.charBudget),this.maxCharsPerCommit),b=H_e(this.source.slice(this.visible.length),A,this.segmenter);b.text&&(this.visible+=b.text,this.charBudget=Math.max(0,this.charBudget-b.graphemeCount),this.emit()),this.ensureLoop()};const{minCharsPerSecond:n=40,maxCharsPerSecond:i=1e3,targetLatencyMs:s=900,catchUpLatencyMs:o=350,catchUpThreshold:r=600,maxCommitFps:l=30,startDelayMs:a=80,maxCharsPerCommit:u=80,flushOnFinish:c=!1}=e;this.minCharsPerSecond=Lf(n,40,1),this.maxCharsPerSecond=Math.max(this.minCharsPerSecond,Lf(i,1e3,1)),this.normalizedTargetLatencyMs=Lf(s,900,1),this.normalizedCatchUpLatencyMs=Lf(o,350,1),this.normalizedCatchUpThreshold=bM(r,600),this.normalizedStartDelayMs=bM(a,80),this.maxCommitFps=Math.trunc(Lf(l,30,1)),this.maxCharsPerCommit=Math.trunc(Lf(u,80,1)),this.flushOnFinish=c,this.segmenter=j_e(),t&&this.listeners.add(t),this.currentCps=this.minCharsPerSecond}get pendingChars(){return Math.max(0,this.source.length-this.visible.length)}get caughtUp(){return this.pendingChars===0}get final(){return this.done&&this.caughtUp}ensureLoop(){if(!(this.destroyed||this.rafId||this.paused||this.pendingChars<=0)){if(typeof requestAnimationFrame!="function"){this.flush();return}this.rafId=requestAnimationFrame(this.tick)}}cancelLoop(){this.rafId&&(typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(this.rafId),this.rafId=0)}emit(){if(!this.destroyed)for(const e of this.listeners)e()}};function P_e(e={},t){const n=new O_e(e,t);return{getSnapshot:n.getSnapshot,subscribe:n.subscribe,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,destroy:n.destroy,dispose:n.dispose}}function j_e(){if(typeof Intl>"u")return null;const e=Intl.Segmenter;return e?new e(void 0,{granularity:"grapheme"}):null}function H_e(e,t,n){if(!e||t<=0)return{text:"",graphemeCount:0};if(!n){const o=Array.from(e).slice(0,t);return{text:o.join(""),graphemeCount:o.length}}let i="",s=0;for(const o of n.segment(e)){if(s>=t)break;i+=o.segment,s++}return{text:i,graphemeCount:s}}function AM(){return typeof performance<"u"?performance.now():Date.now()}function W_e(e,t,n){return Math.min(n,Math.max(t,e))}var q_e=(e,t,n)=>new Promise((i,s)=>{var o=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const v8=Symbol.for("markstream-vue:node-lifecycle");function Mat(){}const h7=new Map;let eO="material";const Xf=new Map,CM=new Map;let y8=null;function U_e(e){h7.set(e.id,e)}function K_e(e){const t=h7.get(eO);if(!t)return;const n=t.core[e];if(n)return n;const i=Xf.get(t.id);if(i){const s=i[e];if(s)return s}t.loadExtended&&!Xf.has(t.id)&&Z_e(t)}function V_e(){var e,t;return(t=(e=h7.get(eO))==null?void 0:e.fallback)!=null?t:""}function Z_e(e){return q_e(this,null,function*(){var t,n,i;if(Xf.has(e.id))return(t=Xf.get(e.id))!=null?t:null;let s=CM.get(e.id);return s||(s=((i=(n=e.loadExtended)==null?void 0:n.call(e))!=null?i:Promise.resolve(null)).then(o=>(Xf.set(e.id,o),y8?.(),o)).catch(()=>(Xf.set(e.id,null),null)),CM.set(e.id,s)),s})}const wM='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>',xM='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>',G_e={id:"material",core:{"":xM,plain:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>',text:xM,javascript:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ffca28" d="M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>',typescript:'<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><path fill="#0288d1" d="M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>',jsx:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00bcd4" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#00bcd4" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#00bcd4" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#00bcd4" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>',tsx:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#0288d1" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#0288d1" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#0288d1" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>',html:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e65100" d="m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z"/></svg>',css:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/></svg>',scss:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ec407a" d="M27.837 5.673a4.33 4.33 0 0 0-2.293-2.701c-2.362-1.261-6.11-1.298-9.548-.092a26.3 26.3 0 0 0-8.76 4.966c-2.752 2.542-3.438 4.925-3.189 6.194.523 2.668 3.274 4.539 5.485 6.042.418.284.822.559 1.175.816-1.429.76-4.261 2.444-5.088 4.248a3.88 3.88 0 0 0-.118 3.332A2.37 2.37 0 0 0 6.869 29.8a5.6 5.6 0 0 0 1.49.2 6.35 6.35 0 0 0 5.19-2.856 6.74 6.74 0 0 0 .864-5.382 7.3 7.3 0 0 1 2.044-.03 3.92 3.92 0 0 1 2.816 1.311 1.82 1.82 0 0 1 .423 1.262 1.55 1.55 0 0 1-.772 1.05c-.234.14-.586.355-.504.803.036.194.198.633.894.512a2.93 2.93 0 0 0 2.145-2.651 4 4 0 0 0-1.197-2.904 5.94 5.94 0 0 0-4.396-1.626 10.6 10.6 0 0 0-2.672.304 20 20 0 0 0-2.203-1.846c-1.712-1.3-3.33-2.529-3.235-4.26.125-2.263 2.468-4.532 6.964-6.744 4.016-1.976 7.254-2.037 8.944-1.438a2 2 0 0 1 1.204.883 2.77 2.77 0 0 1-.36 2.47 9.71 9.71 0 0 1-7.425 4.304 3.86 3.86 0 0 1-3.238-.757c-.278-.302-.593-.645-1.074-.383q-.565.31-.225 1.189a3.9 3.9 0 0 0 2.407 1.92 11.7 11.7 0 0 0 7.128-.671c3.527-1.35 6.681-5.202 5.756-8.787M11.895 24.475a4 4 0 0 1-.192.468 4.5 4.5 0 0 1-.753 1.081 2.83 2.83 0 0 1-2.533 1.107c-.056-.032-.078-.146-.085-.193a3.28 3.28 0 0 1 1.076-2.284 11.3 11.3 0 0 1 2.644-1.933 3.85 3.85 0 0 1-.157 1.754"/></svg>',json:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="#f9a825" d="M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z"/></svg>',python:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711"/><path fill="#fdd835" d="M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89"/></svg>',ruby:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#f44336" d="M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z"/></svg>',go:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00acc1" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#00acc1" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/></svg>',java:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z"/></svg>',kotlin:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><defs><linearGradient id="a" x1="1.725" x2="22.185" y1="22.67" y2="1.982" gradientTransform="translate(1.306 1.129)scale(.89324)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7c4dff"/><stop offset=".5" stop-color="#d500f9"/><stop offset="1" stop-color="#ef5350"/></linearGradient></defs><path fill="url(#a)" d="M2.975 2.976v18.048h18.05v-.03l-4.478-4.511-4.48-4.515 4.48-4.515 4.443-4.477z"/></svg>',c:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>',cpp:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>',cs:wM,csharp:wM,php:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1e88e5" d="M12 18.08c-6.63 0-12-2.72-12-6.08s5.37-6.08 12-6.08S24 8.64 24 12s-5.37 6.08-12 6.08m-5.19-7.95c.54 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.58 1.09q-.42.33-1.29.33h-.87l.53-2.76zm-3.5 5.55h1.44l.34-1.75h1.23c.54 0 .98-.06 1.33-.17.35-.12.67-.31.96-.58.24-.22.43-.46.58-.73.15-.26.26-.56.31-.88.16-.78.05-1.39-.33-1.82-.39-.44-.99-.65-1.82-.65H4.59zm7.25-8.33-1.28 6.58h1.42l.74-3.77h1.14c.36 0 .6.06.71.18s.13.34.07.66l-.57 2.93h1.45l.59-3.07c.13-.62.03-1.07-.27-1.36-.3-.27-.85-.4-1.65-.4h-1.27L12 7.35zM18 10.13c.55 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.57 1.09-.29.22-.72.33-1.3.33h-.85l.5-2.76zm-3.5 5.55h1.44l.34-1.75h1.22c.55 0 1-.06 1.35-.17.35-.12.65-.31.95-.58.24-.22.44-.46.58-.73.15-.26.26-.56.32-.88.15-.78.04-1.39-.34-1.82-.36-.44-.99-.65-1.82-.65h-2.75z"/></svg>',shell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>',powershell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#03a9f4" d="M29.07 6H7.677A1.535 1.535 0 0 0 6.24 7.113l-4.2 17.774A.852.852 0 0 0 2.93 26h21.393a1.535 1.535 0 0 0 1.436-1.113L29.96 7.112A.852.852 0 0 0 29.07 6M8.626 23.797a1.4 1.4 0 0 1-1.814-.31l-.007-.009a1.075 1.075 0 0 1 .315-1.599l9.6-6.061-6.102-5.852-.01-.01a1.068 1.068 0 0 1 .084-1.625l.037-.03a1.38 1.38 0 0 1 1.8.07l7.233 6.957a1.1 1.1 0 0 1 .236.739 1.08 1.08 0 0 1-.412.79c-.074.04-.146.119-10.951 6.935ZM24 22.94A1.135 1.135 0 0 1 22.803 24h-5.634a1.061 1.061 0 1 1 .001-2.112h5.633A1.134 1.134 0 0 1 24 22.938Z"/></svg>',sql:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2"/></svg>',yaml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff5252" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z"/></svg>',markdown:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>',xml:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>',rust:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10"/></svg>',vue:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#41b883" d="M1.791 3.851 12 21.471 22.209 3.936V3.85H18.24l-6.18 10.616L5.906 3.851z"/><path fill="#35495e" d="m5.907 3.851 6.152 10.617L18.24 3.851h-3.723L12.084 8.03 9.66 3.85z"/></svg>',mermaid:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>'},fallback:'<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>',loadExtended:()=>vs(()=>import("./extended-p72mFE2C.js"),[]).then(e=>e.materialExtendedMap)},Q_e=Ul(0);y8=()=>{Q_e.value++},U_e(G_e);const Y_e={"":"",javascript:"javascript",js:"javascript",mjs:"javascript",cjs:"javascript",typescript:"typescript",ts:"typescript",jsx:"jsx",tsx:"tsx",golang:"go",py:"python",rb:"ruby",sh:"shell",bash:"shell",zsh:"shell",shellscript:"shell",bat:"shell",batch:"shell",ps1:"powershell",plaintext:"plain",text:"plain",txt:"plain","c++":"cpp","c#":"csharp",cs:"csharp","objective-c":"objectivec","objective-c++":"objectivecpp",yml:"yaml",md:"markdown",rs:"rust",kt:"kotlin"};function c9(e){var t;const n=(function(i){if(!i)return"";const s=i.trim();if(!s)return"";const[o]=s.split(/\s+/),[r]=o.split(":");return r.toLowerCase()})(e);return(t=Y_e[n])!=null?t:n}function Eat(e){const t=c9(e);if(!t)return"plaintext";switch(t){case"plain":return"plaintext";case"jsx":return"javascript";case"tsx":return"typescript";case"objectivec":return"objective-c";case"objectivecpp":return"objective-cpp";default:return t}}function Tat(e){return K_e(c9(e))||V_e()}const SM={js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",jsx:"JSX",tsx:"TSX",html:"HTML",css:"CSS",scss:"SCSS",json:"JSON",py:"Python",python:"Python",rb:"Ruby",go:"Go",java:"Java",c:"C",cpp:"C++",cs:"C#",csharp:"C#",php:"PHP",sh:"Shell",bash:"Bash",sql:"SQL",yaml:"YAML",md:"Markdown",d2:"D2",d2lang:"D2","":"Plain Text",plain:"Plain Text"};var d9=(e,t,n)=>new Promise((i,s)=>{var o=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});let nr=null,kd=!1,bd=null,f9=g7;function J0(e){var t;const n=(t=e?.default)!=null?t:e;return n&&typeof n.renderToString=="function"?n:null}function p7(){try{const e=globalThis;return J0(e?.katex)}catch{return null}}function g7(){return d9(null,null,function*(){const e=p7();if(e)return e;const t=yield vs(()=>import("./katex-DnlPpQZa.js"),[]);try{yield vs(()=>import("./mhchem-DtR62fUK.js"),__vite__mapDeps([2,3]))}catch{}return J0(t)})}function tO(e){const t=Promise.resolve(e).then(n=>{var i;return bd===t&&n?(nr=(i=J0(n))!=null?i:n,nr):null}).catch(()=>null).finally(()=>{bd===t&&(bd=null)});return bd=t,kd=!0,t}function J_e(e){f9=e,nr=null,kd=!1,bd=null}function X_e(e){J_e(g7)}function nO(){return typeof f9=="function"}function Lat(){var e;const t=f9;if(!t||t===g7)return null;if(nr)return nr;const n=p7();if(n)return nr=n,nr;if(kd)return null;try{const i=t();return i?typeof i?.then=="function"?(tO(i),null):(nr=(e=J0(i))!=null?e:i,nr):null}catch{return null}}function iO(){return d9(this,null,function*(){var e;const t=p7();if(t)return nr=t,nr;if(nr)return nr;if(bd)return bd;if(kd)return null;const n=f9;if(!n)return kd=!0,null;try{const i=n();if(typeof i?.then=="function")return tO(i);if(i)return nr=(e=J0(i))!=null?e:i,kd=!0,nr}catch{}return kd=!0,null})}function sO(e){return e?e.replace(/·/g,"⋅").replace(/℃/g,"°C"):""}let Uu=null,Bu=null;const Co=new Map,Za=new Map;let v0=5;const Nd=new Set;function Ep(){if(Co.size<v0&&Nd.size){let e=v0-Co.size;for(const t of Array.from(Nd)){if(e<=0)break;Nd.delete(t),e--;try{t()}catch{}}}}function oO(){for(const e of Array.from(Nd)){Nd.delete(e);try{e()}catch{}}}function eIe(e){Uu=e,Bu=null,Uu.onmessage=t=>{const{id:n,html:i,error:s}=t.data,o=Co.get(n);if(o)if(Co.delete(n),clearTimeout(o.timeoutId),o.cleanup(),Ep(),s)o.aborted||o.reject(new Error(s));else{const{content:r,displayMode:l}=t.data;if(r){const a=`${l?"d":"i"}:${r}`;if(Za.set(a,i),Za.size>200){const u=Za.keys().next().value;Za.delete(u)}}o.aborted||o.resolve(i)}},Uu.onerror=t=>{console.error("[katexWorkerClient] Worker error:",t);for(const[n,i]of Co.entries())clearTimeout(i.timeoutId),i.cleanup(),i.aborted||i.reject(new Error(`Worker error: ${t.message}`));Co.clear(),oO()}}function tIe(){var e;for(const t of Co.values())clearTimeout(t.timeoutId),t.cleanup(),t.aborted||t.reject(new Error("Worker cleared"));Co.clear(),oO(),Uu&&((e=Uu.terminate)==null||e.call(Uu)),Uu=null,Bu=null}function nIe(e,t=!0,n=2e3,i){return d9(this,null,function*(){performance.now();const s=sO(e);if(!nO()){const a=new Error("KaTeX rendering disabled");return a.name="KaTeXDisabled",a.code="KATEX_DISABLED",Promise.reject(a)}if(Bu)return Promise.reject(Bu);const o=`${t?"d":"i"}:${s}`,r=Za.get(o);if(r)return Ep(),Promise.resolve(r);const l=Uu||(Bu=new Error("[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker()."),Bu.name="WorkerInitError",Bu.code="WORKER_INIT_ERROR",null);if(!l)return Promise.reject(Bu);if(Co.size>=v0){const a=new Error("Worker busy");return a.name="WorkerBusy",a.code="WORKER_BUSY",a.busy=!0,a.inFlight=Co.size,a.max=v0,Promise.reject(a)}return new Promise((a,u)=>{if(i?.aborted){const m=new Error("Aborted");return m.name="AbortError",void u(m)}const c=Math.random().toString(36).slice(2);let d=null;const f=globalThis.setTimeout(()=>{const m=Co.get(c);if(!m)return;Co.delete(c),m.cleanup();const y=new Error("Worker render timed out");y.name="WorkerTimeout",y.code="WORKER_TIMEOUT",m.aborted||m.reject(y),Ep()},n);d=()=>{const m=Co.get(c);if(!m||m.aborted)return;m.aborted=!0,m.cleanup();const y=new Error("Aborted");y.name="AbortError",u(y)},i&&i.addEventListener("abort",d,{once:!0});const h=a,g=u;Co.set(c,{resolve:m=>{h(m)},reject:m=>{g(m)},timeoutId:f,aborted:!1,cleanup:()=>{i&&d&&i.removeEventListener("abort",d),d=null}});try{l.postMessage({id:c,content:s,displayMode:t})}catch(m){const y=Co.get(c);Co.delete(c),clearTimeout(f),y?.cleanup(),y?.reject(m),Ep()}})})}function Nat(e,t=!0,n){const i=`${t?"d":"i"}:${sO(e)}`;if(Za.set(i,n),Za.size>200){const s=Za.keys().next().value;Za.delete(s)}}const iIe="WORKER_BUSY";function sIe(e=2e3,t){return Co.size<v0?Promise.resolve():new Promise((n,i)=>{let s,o=!1,r=null,l=()=>{};const a=()=>{s&&globalThis.clearTimeout(s),Nd.delete(l),t&&r&&t.removeEventListener("abort",r),r=null};l=()=>{o||(o=!0,a(),n())},Nd.add(l),s=globalThis.setTimeout(()=>{if(o)return;o=!0,a();const u=new Error("Wait for worker slot timed out");u.name="WorkerBusyTimeout",u.code="WORKER_BUSY_TIMEOUT",i(u)},e),queueMicrotask(()=>Ep()),t&&(r=()=>{if(o)return;o=!0,a();const u=new Error("Aborted");u.name="AbortError",i(u)},t.aborted?r():t.addEventListener("abort",r,{once:!0}))})}const M1={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};function Fat(e){return d9(this,arguments,function*(t,n=!0,i={}){var s,o,r,l;if(!nO()){const m=new Error("KaTeX rendering disabled");throw m.name="KaTeXDisabled",m.code="KATEX_DISABLED",m}const a=(s=i.timeout)!=null?s:M1.timeout,u=(o=i.waitTimeout)!=null?o:M1.waitTimeout,c=(r=i.backoffMs)!=null?r:M1.backoffMs,d=(l=i.maxRetries)!=null?l:M1.maxRetries,f=Number.isFinite(d)?Math.max(0,Math.min(Math.floor(d),8)):M1.maxRetries,h=i.signal;let g=0;for(;;){if(h?.aborted){const m=new Error("Aborted");throw m.name="AbortError",m}try{return yield nIe(t,n,a,h)}catch(m){if(m?.code!==iIe||g>=f)throw m;if(g++,yield sIe(u,h).catch(()=>{}),h?.aborted){const y=new Error("Aborted");throw y.name="AbortError",y}c>0&&(yield new Promise(y=>globalThis.setTimeout(y,c*g)))}}})}function eh(e){const t=typeof e=="number"?e:Number.parseFloat(String(e??""));return Number.isFinite(t)&&t>0?t:null}function oIe(e){var t;for(const n of e.split(/\r?\n/)){const i=n.trim();if(!i||i.startsWith("%%"))continue;const s=i.match(/^([A-Z][\w-]*)\b/i);return((t=s?.[1])==null?void 0:t.toLowerCase())||""}return""}function jv(e){const t=e.split(/\r?\n/).map(s=>s.trim()).filter(s=>s&&!s.startsWith("%%")),n=Math.max(1,t.length),i=oIe(e);return i==="gantt"?220+28*n:i==="sequencediagram"?180+26*n:i==="classdiagram"||i==="statediagram"||i==="erdiagram"?180+24*n:i==="flowchart"||i==="graph"?170+28*n:200+22*n}function Hv(e){const t=e.split(/\r?\n/).filter(n=>/^\s*-\s+/.test(n)).length;return t>=3?500:t>0?280+60*t:360}function rO(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function Wv(e,t=360,n=500){return rO(e,t,n)}function qv(e,t=360,n=500){return rO(e,t,n)}var rIe=Object.defineProperty,lIe=Object.defineProperties,aIe=Object.getOwnPropertyDescriptors,_M=Object.getOwnPropertySymbols,uIe=Object.prototype.hasOwnProperty,cIe=Object.prototype.propertyIsEnumerable,IM=(e,t,n)=>t in e?rIe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lO=(e,t)=>{for(var n in t||(t={}))uIe.call(t,n)&&IM(e,n,t[n]);if(_M)for(var n of _M(t))cIe.call(t,n)&&IM(e,n,t[n]);return e},MM=(e,t,n)=>new Promise((i,s)=>{var o=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const Uv=()=>vs(()=>import("./mermaid.core-BKBZnrB_.js").then(e=>e.bp),__vite__mapDeps([4,5]));let za=null,th=Uv,ip=null,k8=!1,b8=!1,sp=0;function dIe(e){th=e,sp++,za=null,ip=null,k8=!1,b8=!1}function fIe(e){dIe(Uv)}function EM(){return typeof th=="function"}function TM(e){if(!e)return e;const t=e&&e.default?e.default:e;if(t&&(typeof t.render=="function"||typeof t.parse=="function"||typeof t.initialize=="function"))return t;if(t&&t.mermaidAPI&&(typeof t.mermaidAPI.render=="function"||typeof t.mermaidAPI.parse=="function")){const s=t.mermaidAPI;return n=lO({},t),i={render:s.render.bind(s),parse:s.parse?s.parse.bind(s):void 0,initialize:o=>typeof t.initialize=="function"?t.initialize(o):s.initialize?s.initialize(o):void 0},lIe(n,aIe(i))}var n,i;return e.mermaid&&typeof e.mermaid.render=="function"?e.mermaid:t}function LM(e){if(e)try{const t=e?.initialize;e.initialize=n=>{const i=lO({suppressErrorRendering:!0},n||{});return typeof t=="function"?t.call(e,i):e?.mermaidAPI&&typeof e.mermaidAPI.initialize=="function"?e.mermaidAPI.initialize(i):void 0}}catch{}}function Dat(){return MM(this,null,function*(){if(za)return za;const e=(function(){try{const i=globalThis;return TM(i?.mermaid)}catch{return null}})();if(e)return za=e,LM(za),za;const t=th,n=sp;return t?t===Uv&&k8?null:ip||(ip=MM(null,null,function*(){let i;try{i=yield t()}catch(s){if(t===Uv)return n===sp&&t===th&&(k8=!0,(function(o){b8||(b8=!0,console.warn('[markstream-vue] Optional dependency "mermaid" is not installed. Mermaid blocks will render as source.',o))})(s)),null;throw s}finally{n===sp&&t===th&&(ip=null)}return n!==sp||t!==th?null:i?(za=TM(i),LM(za),za):null}),ip):null})}let kr=null,zu=null;const Tl=new Map,ud=new Map;function d2(e){for(const t of Tl.values())t.reject(e);Tl.clear(),ud.clear()}let NM=5,FM=!1;const hIe="WORKER_BUSY",DM="MERMAID_DISABLED";function pIe(e){if(kr&&kr!==e){const n=new Error("Worker replaced");n.code="WORKER_REPLACED",d2(n)}kr=e,zu=null;const t=e;kr.onmessage=n=>{if(kr!==t)return;const{id:i,ok:s,result:o,error:r}=n.data,l=Tl.get(i);l&&(s===!1||r?l.reject(new Error(r||"Unknown error")):l.resolve(o))},kr.onerror=n=>{var i,s;if(kr===t)if(Tl.size!==0){try{FM?console.error("[mermaidWorkerClient] Worker error:",n?.message||n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker error:",n?.message||n)}catch{}d2(new Error(`Worker error: ${n.message}`))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker error (no pending):",n?.message||n)},kr.onmessageerror=n=>{var i,s;if(kr===t)if(Tl.size!==0){try{FM?console.error("[mermaidWorkerClient] Worker messageerror:",n):(s=console.debug)==null||s.call(console,"[mermaidWorkerClient] Worker messageerror:",n)}catch{}d2(new Error("Worker messageerror"))}else(i=console.debug)==null||i.call(console,"[mermaidWorkerClient] Worker messageerror (no pending):",n)}}function gIe(){var e;if(kr)try{d2(new Error("Worker cleared")),(e=kr.terminate)==null||e.call(kr)}catch{}kr=null,zu=null}function aO(e,t,n,i){if(!EM()){const r=new Error("Mermaid rendering disabled");return r.name="MermaidDisabled",r.code=DM,Promise.reject(r)}const s=`${e}\0${t.theme}\0${n}\0${t.code}`;let o=ud.get(s);return o||(o=(function(r,l,a=1400){if(!EM()){const c=new Error("Mermaid rendering disabled");return c.name="MermaidDisabled",c.code=DM,Promise.reject(c)}if(zu)return Promise.reject(zu);const u=kr||(zu=new Error("[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker()."),zu.name="WorkerInitError",zu.code="WORKER_INIT_ERROR",null);if(!u)return Promise.reject(zu);if(Tl.size>=NM){const c=new Error("Worker busy");return c.name="WorkerBusy",c.code=hIe,c.inFlight=Tl.size,c.max=NM,Promise.reject(c)}return new Promise((c,d)=>{const f=Math.random().toString(36).slice(2);let h,g=!1;const m=()=>{g||(g=!0,h!=null&&globalThis.clearTimeout(h),Tl.delete(f))},y={resolve:A=>{m(),c(A)},reject:A=>{m(),d(A)}};Tl.set(f,y);try{u.postMessage({id:f,action:r,payload:l})}catch(A){return Tl.delete(f),void d(A)}h=globalThis.setTimeout(()=>{const A=new Error("Worker call timed out");A.name="WorkerTimeout",A.code="WORKER_TIMEOUT";const b=Tl.get(f);b&&b.reject(A)},a)})})(e,t,n),ud.set(s,o),o.then(()=>{ud.get(s)===o&&ud.delete(s)},()=>{ud.get(s)===o&&ud.delete(s)})),(function(r,l){if(!l)return r;if(l.aborted){const a=new Error("Aborted");return a.name="AbortError",Promise.reject(a)}return new Promise((a,u)=>{let c=()=>{};const d=()=>l.removeEventListener("abort",c);c=()=>{d();const f=new Error("Aborted");f.name="AbortError",u(f)},l.addEventListener("abort",c,{once:!0}),r.then(f=>{d(),a(f)},f=>{d(),u(f)})})})(o,i)}function $at(e,t,n=1400,i){return aO("canParse",{code:e,theme:t},n,i)}function Bat(e,t,n=1400,i){return aO("findPrefix",{code:e,theme:t},n,i)}var mIe=Object.defineProperty,vIe=Object.defineProperties,yIe=Object.getOwnPropertyDescriptors,$M=Object.getOwnPropertySymbols,kIe=Object.prototype.hasOwnProperty,bIe=Object.prototype.propertyIsEnumerable,BM=(e,t,n)=>t in e?mIe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_t=(e,t)=>{for(var n in t||(t={}))kIe.call(t,n)&&BM(e,n,t[n]);if($M)for(var n of $M(t))bIe.call(t,n)&&BM(e,n,t[n]);return e},yn=(e,t)=>vIe(e,yIe(t)),Bi=(e,t,n)=>new Promise((i,s)=>{var o=a=>{try{l(n.next(a))}catch(u){s(u)}},r=a=>{try{l(n.throw(a))}catch(u){s(u)}},l=a=>a.done?i(a.value):Promise.resolve(a.value).then(o,r);l((n=n.apply(e,t)).next())});const AIe="__global__",U3="__MARKSTREAM_VUE_CUSTOM_COMPONENTS_STORE__",A8=(()=>{const e=globalThis;if(e[U3])return e[U3];const t={scopedCustomComponents:{},revision:Ul(0)};return e[U3]=t,t})(),zM=A8.revision,CIe=Symbol("markstreamCustomComponents"),wIe=new Set(["text","paragraph","heading","code_block","list","list_item","blockquote","table","table_row","table_cell","definition_list","definition_item","footnote","footnote_reference","footnote_anchor","admonition","hardbreak","link","image","thematic_break","math_inline","math_block","strong","emphasis","strikethrough","highlight","insert","subscript","superscript","emoji","checkbox","checkbox_input","inline_code","html_inline","html_block","reference","mermaid","infographic","d2","vmr_container"]);function X0(e){return wIe.has(String(e).trim().toLowerCase())}function xIe(e){return e.trim().replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function K3(e={}){const t={};for(const[n,i]of Object.entries(e))if(i!=null){t[n]=i;for(const s of new Set([yl(n),yl(xIe(n))]))!s||X0(s)||Object.prototype.hasOwnProperty.call(t,s)||(t[s]=i)}return t}function qs(e){const t=cn(CIe,null);return L(()=>{var n;return zM.value,(function(i,s={}){return zM.value,_t(_t(_t({},K3(A8.scopedCustomComponents[AIe]||{})),K3(s)),K3((function(o){return o&&A8.scopedCustomComponents[o]||{}})(i)))})(e?.(),(n=t?.value)!=null?n:{})})}const SIe=["aria-label"],_Ie={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-unchecked"},IIe={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",class:"checkbox-icon checkbox-checked"},di=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},qr=di(Qe({__name:"CheckboxNode",props:{node:{}},setup:e=>(t,n)=>(k(),E("span",{class:"checkbox-node",role:"img","aria-label":e.node.checked?"checked":"unchecked"},[e.node.checked?(k(),E("svg",IIe,[...n[1]||(n[1]=[w("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",fill:"currentColor"},null,-1),w("path",{d:"M9 12l2 2 4-4",stroke:"hsl(var(--ms-background))","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):(k(),E("svg",_Ie,[...n[0]||(n[0]=[w("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4",stroke:"currentColor","stroke-width":"2"},null,-1)])]))],8,SIe))}),[["__scopeId","data-v-be21ab83"]]);qr.install=e=>{e.component(qr.__name,qr)};const MIe={class:"emoji-node"},xr=di(Qe({__name:"EmojiNode",props:{node:{}},setup:e=>(t,n)=>(k(),E("span",MIe,F(e.node.name),1))}),[["__scopeId","data-v-de55dc97"]]);xr.install=e=>{e.component(xr.__name,xr)};const EIe=["id"],TIe=["title"],Ur=di(Qe({__name:"FootnoteReferenceNode",props:{node:{}},setup(e){const t=`#fnref--${e.node.id}`;function n(){if(typeof document>"u")return;const i=document.querySelector(t);i?i.scrollIntoView({behavior:"smooth"}):console.warn(`Element with href: ${t} not found`)}return(i,s)=>(k(),E("sup",{id:`fnref-${e.node.id}`,class:"footnote-reference",onClick:n},[w("span",{href:t,title:`查看脚注 ${e.node.id}`,class:"footnote-link cursor-pointer"},"["+F(e.node.id)+"]",9,TIe)],8,EIe))}}),[["__scopeId","data-v-c1463a29"]]);Ur.install=e=>{e.component(Ur.__name,Ur)};const uO=(()=>{try{return!1}catch{}return!1})();function V3(e){uO&&console.warn(e)}function RM(e,t="safe",n){return f7(e,t,n)}function cO(e){return c_e(e)}function Z3(e){return e===!0?"":e===!1?"false":e==null?null:String(e)}function m7(e,t="safe"){const n=String(e.tag||e.type||"").trim(),i=c2((s=e.attrs)?Array.isArray(s)?s.every(Array.isArray)?s.map(([r,l])=>[String(r),Z3(l)]):s.filter(r=>r&&typeof r=="object"&&!Array.isArray(r)&&"name"in r).map(r=>[String(r.name),Z3(r.value)]):Object.entries(s).map(([r,l])=>[r,Z3(l)]):null,t,n);var s;if(!i)return;const o=cO(Mp(i));return Object.keys(o).length>0?o:void 0}function OM(e,t,n=!1){const i=Object.entries(t??{}),s=i.length>0?i.map(([o,r])=>r===""?` ${o}`:` ${o}="${r}"`).join(""):"";return n?`<${e}${s} />`:`<${e}${s}>`}function E1(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function G3(e,t,n,i,s,o,r=!1){const l=(function(d,f){return VR(d,f)})(e,i);if(Z0.has(e.toLowerCase())||!l&&WR(e,o))return null;if(!l&&d7(e,o))return r?[OM(e,t,!0)]:[OM(e,t),...n,`</${e}>`];const a=f7(t,o,e),u=a.key,c=u!=null&&u!==""?u:s;if(l){const d=i[e]||i[e.toLowerCase()],f=cO(a);return gn(d,yn(_t({},f),{key:c}),n.length>0?n:void 0)}return gn(e,yn(_t({},a),{innerHTML:void 0,key:c}),n.length>0?n:void 0)}function dO(e,t){return h_e(e,t)}function Kv(e,t,n="safe"){if(!e)return[];try{return(function(o,r,l="safe"){let a=0;const u=[],c=[];for(const d of o)if(d.type==="text")(u.length>0?u[u.length-1].children:c).push(d.content);else if(d.type==="self_closing"){const f=G3(d.tagName,d.attrs||{},[],r,"ms-html-"+a++,l,!0);E1(u.length>0?u[u.length-1].children:c,f)}else if(d.type==="tag_open")u.push({tagName:d.tagName,children:[],attrs:d.attrs,autoKey:"ms-html-"+a++});else if(d.type==="tag_close"){const f=d.tagName.toLowerCase();let h=-1;for(let g=u.length-1;g>=0;g--)if(u[g].tagName.toLowerCase()===f){h=g;break}if(h!==-1)for(;u.length>h;){const g=u.pop(),m=G3(g.tagName,g.attrs||{},g.children,r,g.autoKey,l);u.length>0?E1(u[u.length-1].children,m):E1(c,m),g.tagName.toLowerCase()!==f&&u.length>h&&V3(`Auto-closing unclosed tag: <${g.tagName}>`)}else V3(`Ignoring closing tag with no matching opening tag: </${d.tagName}>`)}for(;u.length>0;){const d=u.pop(),f=G3(d.tagName,d.attrs||{},d.children,r,d.autoKey,l);u.length>0?E1(u[u.length-1].children,f):E1(c,f),V3(`Auto-closing unclosed tag: <${d.tagName}>`)}return c})(ZR(e),t,n)}catch(s){return i=s,uO&&console.error("Failed to parse HTML to VNodes:",i),null}var i}const LIe=["innerHTML"],Kr=di(Qe({__name:"HtmlInlineNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=cn("markstreamHtmlPolicy",void 0),i=L(()=>{var l,a;return(a=(l=t.htmlPolicy)!=null?l:n?.value)!=null?a:"safe"}),s=qs(()=>t.customId),o=Qe({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),r=L(()=>{const l=t.node.content;if(!l)return{mode:"html",content:""};if(i.value==="escape")return{mode:"html",content:bh(l,i.value)};if(t.node.loading&&!t.node.autoClosed)return{mode:"text",content:l};if(t.node.loading&&t.node.autoClosed){const u=Kv(l,s.value,i.value);if(u!==null)return{mode:"dynamic",nodes:u}}if(!dO(l,s.value))return{mode:"html",content:bh(l,i.value)};const a=Kv(l,s.value,i.value);return a===null?{mode:"html",content:bh(l,i.value)}:{mode:"dynamic",nodes:a}});return(l,a)=>r.value.mode==="dynamic"?(k(),E("span",{key:0,class:Fe(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},[K(p(o),{nodes:r.value.nodes},null,8,["nodes"])],2)):r.value.mode==="text"?(k(),E("span",{key:1,class:Fe(["html-inline-node",{"html-inline-node--loading":t.node.loading}])},F(r.value.content),3)):(k(),E("span",{key:2,class:Fe(["html-inline-node",{"html-inline-node--loading":t.node.loading}]),innerHTML:r.value.content},null,10,LIe))}}),[["__scopeId","data-v-d17f12b0"]]);Kr.install=e=>{e.component(Kr.__name,Kr)};const NIe={class:"inline-code"},FIe={key:0},Uo=di(Qe({__name:"InlineCodeNode",props:{node:{}},setup(e){const t=e,n=Rh(),i=cn("markstreamFade",void 0),s=cn("markstreamTextStreamState",void 0),o=cn("markstreamStreamVersion",void 0),r=L(()=>{const b=n.fade;return b===""||b===!0||b==="true"||b!==!1&&b!=="false"&&void 0}),l=L(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=L(()=>{var b;return String((b=t.node.code)!=null?b:"")}),u=L(()=>!l.value),c=L(()=>{var b;const C=(b=n["index-key"])!=null?b:n.indexKey;return C==null||C===""?"":String(C)}),d=G(t.node.code),f=G(""),h=G(0);let g;function m(){g?.(),g=void 0}function y(){m(),f.value&&(d.value=d.value+f.value,f.value="")}qe([()=>t.node.code,c,l],([b])=>{const C=String(b??""),v=c.value,x=JR({nextContent:C,persistedContent:v?s?.get(v):void 0,currentState:{settledContent:d.value,streamedDelta:f.value},typewriterEnabled:l.value});d.value=x.settledContent,f.value=x.streamedDelta,x.appended?(h.value+=1,(function(){if(!f.value||g||!o)return;const S=o.value;g=qe(()=>o.value,_=>{_!==S&&y()},{flush:"sync"})})()):f.value||m(),v&&s?.set(v,C)},{immediate:!0}),Xd(m);const A=L(()=>h.value%2==0?"inline-code-stream-delta--a":"inline-code-stream-delta--b");return(b,C)=>(k(),E("code",NIe,[u.value?(k(),E(Te,{key:0},[$e(F(a.value),1)],64)):(k(),E(Te,{key:1},[d.value?(k(),E("span",FIe,F(d.value),1)):te("",!0),f.value?(k(),E("span",{key:1,class:Fe(["inline-code-stream-delta",[A.value]]),onAnimationend:y},F(f.value),35)):te("",!0)],64))]))}}),[["__scopeId","data-v-4e331c97"]]);Uo.install=e=>{e.component(Uo.__name,Uo)};const C8=G(!1),PM=G(""),jM=G("top"),Tp=G(null),Lp=G(null),w8=G(null),x8=G(null),HM=G(null);let f2=null,h2=null,S8=0;function fO(){f2&&(clearTimeout(f2),f2=null),h2&&(clearTimeout(h2),h2=null)}let Im=!1,Mm=null,WM=!1;function DIe(e,t,n="top",i=!1,s,o){if(!e)return;const r=++S8;fO();const l=()=>Bi(null,null,function*(){var a,u;if(yield(function(){return Bi(this,null,function*(){if(!Im&&!WM&&typeof document<"u"){Mm!=null||(Mm=Bi(null,null,function*(){const[{createApp:c,h:d},{default:f}]=yield Promise.all([vs(()=>import("./vue.runtime.esm-bundler-C_QWhoww.js"),[]),vs(()=>import("./Tooltip-OrMK9Tfr.js"),[])]),h=document.createElement("div");h.setAttribute("data-singleton-tooltip","1"),document.body.appendChild(h),c({setup:()=>()=>{var g;return d(f,{visible:C8.value,"anchor-el":Tp.value,content:PM.value,placement:jM.value,id:Lp.value,originX:w8.value,originY:x8.value,isDark:(g=HM.value)!=null?g:void 0})}}).mount(h),Im=!0}));try{yield Mm}catch(c){Im=!1,Mm=null,WM=!0,console.warn("[markstream-vue] Failed to mount Tooltip component. Tooltips will be disabled.",c)}}})})(),Im&&r===S8){Lp.value=`tooltip-${Date.now()}-${Math.floor(1e3*Math.random())}`,Tp.value=e,PM.value=t,jM.value=n,w8.value=(a=s?.x)!=null?a:null,x8.value=(u=s?.y)!=null?u:null,HM.value=typeof o=="boolean"?o:null,C8.value=!0;try{e.setAttribute("aria-describedby",Lp.value)}catch{}}});i?l():f2=setTimeout(l,80)}function $Ie(e=!1){S8+=1,fO();const t=()=>{if(Tp.value&&Lp.value)try{Tp.value.removeAttribute("aria-describedby")}catch{}C8.value=!1,Tp.value=null,Lp.value=null,w8.value=null,x8.value=null};e?t():h2=setTimeout(t,120)}const BIe={"common.copy":"Copy","common.copied":"Copied","common.decrease":"Decrease","common.reset":"Reset","common.increase":"Increase","common.expand":"Expand","common.collapse":"Collapse","common.preview":"Preview","common.source":"Source","common.export":"Export","common.open":"Open","common.minimize":"Minimize","common.zoomIn":"Zoom in","common.zoomOut":"Zoom out","common.resetZoom":"Reset zoom","image.loadError":"Image failed to load","image.loading":"Loading image..."},zIe=Symbol("markstreamI18nFallback");function hO(e,t){var n;return(n=t?.[e])!=null?n:BIe[e]}const _8=(e,t)=>{var n;return(n=hO(e,t))!=null?n:(function(i){return(i.split(".").pop()||i).replace(/[_-]/g," ").replace(/([A-Z])/g," $1").replace(/\s+/g," ").replace(/\b\w/g,s=>s.toUpperCase()).trim()})(e)};function qM(e,t){return{t(n){const i=hO(n,t);if(e.te&&i!=null&&!e.te(n))return _8(n,t);const s=e.t(n);return s===n&&i!=null?_8(n,t):s}}}function RIe(){const e=(function(){var n,i,s;try{const o=Ws(),r=zIe,l=o?.provides,a=(n=o?.appContext)==null?void 0:n.provides;return(s=(i=l?.[r])!=null?i:a?.[r])!=null?s:null}catch{}return null})(),t=(function(){var n,i;try{const s=Ws(),o=s?.proxy,r=o?.$t;if(typeof r=="function"){const u=o?.$te;return{t:r.bind(o),te:typeof u=="function"?u.bind(o):void 0}}const l=(i=(n=s?.appContext)==null?void 0:n.config)==null?void 0:i.globalProperties,a=l?.$t;if(typeof a=="function"){const u=l?.$te;return{t:a.bind(l),te:typeof u=="function"?u.bind(l):void 0}}}catch{}return null})();if(t)return qM(t,e);try{const n=globalThis.$vueI18nUse||null;if(n&&typeof n=="function")try{const i=n();if(i&&typeof i.t=="function")return qM({t:i.t.bind(i),te:typeof i.te=="function"?i.te.bind(i):void 0},e)}catch{}}catch{}return{t:n=>_8(n,e)}}const pO=Symbol("ViewportPriority"),gO=Symbol("ViewportPriorityOptions"),mO=Symbol("OffscreenHeavyNodeDeferral"),OIe=L(()=>!1),Kd="400px";function v7(){return cn(gO,void 0)}function y7(){return cn(mO,OIe)}function PIe(e,t){var n,i;const s=typeof window<"u"&&typeof document<"u",o=typeof t=="boolean"?G(t):t,r=s?(n=window.requestIdleCallback)!=null?n:_=>window.setTimeout(()=>_({didTimeout:!0,timeRemaining:()=>0}),16):null,l=s?(i=window.cancelIdleCallback)!=null?i:_=>window.clearTimeout(_):null,a=new WeakMap;let u=1;const c=new Map,d=new Map,f=new Set;let h=null,g=null;function m(_){if(!_)return"viewport";let I=a.get(_);return I||(I=u++,a.set(_,I)),String(I)}function y(){if(h!=null){try{l?.(h)}catch{}h=null}}function A(_){if(_){const I=c.get(_);if(I&&!I.targets.size){try{I.io.disconnect()}catch{}c.delete(_)}}d.size||f.size||y()}function b(_){const I=d.get(_);if(!I)return;const M=c.get(I.bucketKey);if(!I.visible.value){I.visible.value=!0;try{I.resolve()}catch{}}try{M?.io.unobserve(_)}catch{}M?.targets.delete(_),d.delete(_),f.delete(_),A(I.bucketKey)}function C(){window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&r&&h==null&&f.size&&(h=r(()=>{h=null;const _=f.values().next().value;_&&(f.delete(_),b(_),f.size&&C())},{timeout:1200}))}function v(_,I){if(!s||typeof IntersectionObserver>"u")return null;const M=(function(P,R){var q,j,W;return{root:(q=e?.(P??null))!=null?q:null,rootMargin:(j=R?.rootMargin)!=null?j:Kd,threshold:(W=R?.threshold)!=null?W:0}})(_,I),$=[m((D=M).root),D.rootMargin,D.threshold].join("\0");var D;const T=c.get($);if(T)return{key:$,bucket:T};let N;try{N=new IntersectionObserver(P=>{for(const R of P)(R.isIntersecting||R.intersectionRatio>0)&&b(R.target)},{root:M.root,rootMargin:M.rootMargin,threshold:M.threshold})}catch{return null}const O={io:N,targets:new Map};return c.set($,O),{key:$,bucket:O}}function x(){if(s&&o.value)for(const[_,I]of Array.from(d.entries())){const M=v(_,I.opts);if(!M){b(_);continue}if(M.key===I.bucketKey)continue;const $=I.bucketKey,D=c.get($);try{D?.io.unobserve(_)}catch{}D?.targets.delete(_),I.bucketKey=M.key,M.bucket.targets.set(_,I),M.bucket.io.observe(_),A($)}}qe(o,_=>{if(!_){for(const I of Array.from(d.keys()))b(I);y()}},{flush:"sync"});const S=(_,I)=>{const M=G(!1);let $,D=!1;const T=new Promise(R=>{$=()=>{D||(D=!0,R())}}),N=()=>{const R=d.get(_);if(!R)return f.delete(_),void A();const q=c.get(R.bucketKey);try{q?.io.unobserve(_)}catch{}q?.targets.delete(_),d.delete(_),f.delete(_),A(R.bucketKey)};if(!s||!o.value)return M.value=!0,$(),{isVisible:M,whenVisible:T,destroy:N};const O=v(_,I);if(!O)return M.value=!0,$(),{isVisible:M,whenVisible:T,destroy:N};const P={resolve:$,visible:M,bucketKey:O.key,opts:I};return d.set(_,P),O.bucket.targets.set(_,P),O.bucket.io.observe(_),s&&g==null&&(g=window.requestAnimationFrame(()=>{g=null,x()})),I?.allowIdle!==!1&&(f.add(_),C()),{isVisible:M,whenVisible:T,destroy:N}};return S.refresh=x,Kn(pO,S),S}function k7(){var e,t;const n=cn(pO,void 0);if(n)return n;const i=new WeakMap,s=new Map,o=new Set;let r=null;const l=typeof window<"u"?(e=window.requestIdleCallback)!=null?e:h=>window.setTimeout(()=>h({didTimeout:!0,timeRemaining:()=>0}),16):null,a=typeof window<"u"?(t=window.cancelIdleCallback)!=null?t:h=>window.clearTimeout(h):null,u=()=>{if(r!=null){try{a?.(r)}catch{}r=null}},c=h=>{if(!h)return;const g=s.get(h);if(g&&!g.targets.size){try{g.io.disconnect()}catch{}s.delete(h)}},d=h=>{const g=i.get(h);if(!g)return;const m=s.get(g.bucketKey);if(!g.visible.value){g.visible.value=!0;try{g.resolve()}catch{}}try{m?.io.unobserve(h)}catch{}i.delete(h),m?.targets.delete(h),o.delete(h),c(g.bucketKey),o.size||u()},f=()=>{window.__MARKSTREAM_DISABLE_VIEWPORT_PRIORITY_IDLE_DRAIN__!==!0&&l&&r==null&&o.size&&(r=l(()=>{r=null;const h=o.values().next().value;h&&(o.delete(h),d(h),o.size&&f())},{timeout:1200}))};return(h,g)=>{const m=G(!1);let y,A=!1;const b=new Promise(x=>{y=()=>{A||(A=!0,x())}}),C=()=>{const x=i.get(h);if(!x)return o.delete(h),void(o.size||u());const S=s.get(x.bucketKey);try{S?.io.unobserve(h)}catch{}i.delete(h),S?.targets.delete(h),o.delete(h),c(x.bucketKey),o.size||u()},v=(x=>{var S,_;if(typeof window>"u"||typeof IntersectionObserver>"u")return null;const I=(N=>{var O,P;return[(O=N?.rootMargin)!=null?O:Kd,(P=N?.threshold)!=null?P:0].join("\0")})(x),M=s.get(I);if(M)return{key:I,bucket:M};const $=(S=x?.rootMargin)!=null?S:Kd;let D;try{D=new IntersectionObserver(N=>{for(const O of N)(O.isIntersecting||O.intersectionRatio>0)&&d(O.target)},{root:null,rootMargin:$,threshold:(_=x?.threshold)!=null?_:0})}catch{return null}const T={io:D,targets:new Set};return s.set(I,T),{key:I,bucket:T}})(g);return v?(i.set(h,{resolve:y,visible:m,bucketKey:v.key}),v.bucket.targets.add(h),v.bucket.io.observe(h),g?.allowIdle!==!1&&(o.add(h),f()),{isVisible:m,whenVisible:b,destroy:C}):(m.value=!0,y(),{isVisible:m,whenVisible:b,destroy:C})}}function jIe(e,t){var n,i;const s=(i=(n=e.indexKey)!=null?n:t["index-key"])!=null?i:t.indexKey;return s==null||s===""?"":String(s)}const HIe=["data-markstream-viewport-pending"],WIe=["src","alt","title","loading","fetchpriority","decoding","tabindex","aria-label"],qIe={key:1,class:"image-placeholder"},UIe={key:1,class:"image-node__raw-text"},KIe={key:2,class:"image-shimmer-overlay"},VIe={key:1,class:"image-node__raw-text"},ZIe={key:3,class:"image-error"},Xu=di(Qe({__name:"ImageNode",props:{node:{},fallbackSrc:{default:""},lazy:{type:Boolean,default:!1},usePlaceholder:{type:Boolean,default:!0}},emits:["load","error","click"],setup(e,{emit:t}){var n,i,s;const o=e,r=t,l=G(!1),a=G(!1),u=G(""),c=G("primary"),d=G(null),f=Rh(),h=cn(v8,null),g=k7(),m=v7(),y=y7(),A=L(()=>hI(o.node.src)),b=L(()=>hI(o.fallbackSrc)),C=(s=(i=(n=Ws())==null?void 0:n.vnode.el)==null?void 0:i.querySelector)==null?void 0:s.call(i,"img"),v=typeof window<"u"&&C?.getAttribute("src")===(A.value||b.value),x=G(typeof window>"u"||v||!y.value),S=Ul(null);let _="",I=null;const M=L(()=>u.value),$=L(()=>!o.lazy),D=L(()=>typeof window<"u"&&y.value&&!v),T=L(()=>!D.value||x.value),N=L(()=>T.value?M.value:""),O=L(()=>{var re,fe;return(fe=(re=m?.value.heavyBlockMargin)!=null?re:m?.value.rootMargin)!=null?fe:Kd}),P=L(()=>!o.node.loading&&c.value!=="failed"&&u.value.length>0),R=L(()=>c.value==="failed"),q=L(()=>(!$.value||D.value&&!x.value)&&!l.value&&!a.value&&c.value!=="failed"&&u.value.length>0),j=L(()=>jIe(o,f));function W(re=j.value){re&&d.value&&h?.reportHeight(re,d.value.offsetHeight)}function z(re=j.value){re&&kt(()=>{W(re)})}function H(){I&&(clearTimeout(I),I=null)}function ee(){const re=j.value;re&&_!==re&&(_&&h?.markSettled(_),H(),_=re,h?.markPending(re),typeof window<"u"&&(I=window.setTimeout(()=>{_===re&&(z(re),V())},8e3)))}function V(){return Bi(this,null,function*(){const re=_;re&&(H(),_="",yield kt(),W(re),h?.markSettled(re))})}function ie(){if(c.value==="primary"&&b.value&&b.value!==u.value)return c.value="fallback",u.value=b.value,l.value=!1,a.value=!1,void z();c.value="failed",a.value=!0,r("error",u.value),z()}function se(){l.value=!0,a.value=!1,r("load",M.value),z()}function Z(re){re.preventDefault(),l.value&&!a.value&&r("click",[re,M.value])}const{t:pe}=RIe();return qe([A,b,()=>o.node.loading],()=>(l.value=!1,a.value=!1,o.node.loading||A.value?(u.value=A.value,void(c.value="primary")):b.value?(u.value=b.value,void(c.value="fallback")):(u.value="",c.value="failed",void(a.value=!0))),{immediate:!0}),typeof window<"u"&&qe([d,D],([re,fe],Ee,X)=>{var we;if((we=S.value)==null||we.destroy(),S.value=null,!fe||x.value)return void(x.value=!0);if(!re)return void(x.value=!1);let Y=!0;const le=g(re,{rootMargin:O.value,allowIdle:!1});S.value=le,x.value=le.isVisible.value,le.whenVisible.then(()=>{Y&&S.value===le&&(x.value=!0)}),X(()=>{Y=!1,le.destroy(),S.value===le&&(S.value=null)})},{immediate:!0}),qe([P,l,a,M,()=>o.lazy,T],([re,fe,Ee,X,we,Y])=>re&&X&&!Ee&&Y?fe?(V(),void z()):we?(ee(),void z()):void(fe||Ee||ee()):(V(),void z()),{flush:"post",immediate:!0}),Gn(()=>{var re;(re=S.value)==null||re.destroy(),S.value=null,(function(){const fe=_;fe&&(H(),_="",h?.markSettled(fe))})()}),(re,fe)=>{var Ee,X,we,Y,le;return k(),E("span",{ref_key:"rootRef",ref:d,class:"image-node-container","data-markstream-viewport-pending":D.value&&!x.value?"true":void 0},[P.value?(k(),E("img",{key:0,src:N.value||void 0,alt:String((X=(Ee=o.node.alt)!=null?Ee:o.node.title)!=null?X:""),title:String((Y=(we=o.node.title)!=null?we:o.node.alt)!=null?Y:""),class:Fe(["image-node__img",{"is-loading":!$.value&&!l.value,"is-loaded":$.value||l.value,"has-natural-size":l.value,"cursor-pointer":l.value}]),loading:o.lazy?"lazy":void 0,fetchpriority:$.value?"high":void 0,decoding:$.value?"sync":"async",tabindex:l.value?0:-1,"aria-label":(le=o.node.alt)!=null?le:p(pe)("image.preview"),onError:ie,onLoad:se,onClick:Z},null,42,WIe)):te("",!0),e.node.loading&&!a.value?(k(),E("span",qIe,[o.usePlaceholder?Rn(re.$slots,"placeholder",{key:0,node:o.node,displaySrc:M.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[fe[0]||(fe[0]=w("span",{class:"image-shimmer"},null,-1))],!0):(k(),E("span",UIe,F(e.node.raw),1))])):te("",!0),q.value&&!e.node.loading?(k(),E("span",KIe,[o.usePlaceholder?Rn(re.$slots,"placeholder",{key:0,node:o.node,displaySrc:M.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[fe[1]||(fe[1]=w("span",{class:"image-shimmer"},null,-1))],!0):(k(),E("span",VIe,F(e.node.raw),1))])):te("",!0),R.value?(k(),E("span",ZIe,[Rn(re.$slots,"error",{node:o.node,displaySrc:M.value,imageLoaded:l.value,hasError:a.value,fallbackSrc:o.fallbackSrc,lazy:o.lazy},()=>[fe[2]||(fe[2]=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[w("path",{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z"})],-1)),w("span",null,F(p(pe)("image.loadError")),1)],!0)])):te("",!0)],8,HIe)}}}),[["__scopeId","data-v-046e82ac"]]);Xu.install=e=>{e.component(Xu.__name,Xu)};const GIe={key:2},_a=Qe({__name:"NodeChildRenderer",props:{node:{},components:{},customId:{},indexKey:{},fallbackToText:{type:Boolean,default:!1}},setup(e){const t=e,n=qs(()=>t.customId),i=cn("markstreamHtmlPolicy",void 0),s=cn("markstreamNestedRendererProps",void 0),o=L(()=>{var g;return(g=i?.value)!=null?g:"safe"}),r=L(()=>{var g,m;const y=(g=s?.value)!=null?g:{};return yn(_t({},y),{customId:(m=t.customId)!=null?m:y.customId,htmlPolicy:o.value})}),l=Dl({loader:()=>Promise.resolve().then(()=>T7),suspensible:!1}),a=L(()=>t.components[String(t.node.type)]),u=L(()=>!!(a.value&&n.value[t.node.type]&&!X0(String(t.node.type)))),c=L(()=>u.value?m7(t.node,o.value):void 0),d=L(()=>Array.isArray(t.node.children)&&t.node.children.length>0),f=L(()=>{var g;return String((g=t.node.content)!=null?g:"")}),h=L(()=>{var g,m;return String((m=(g=t.node.content)!=null?g:t.node.raw)!=null?m:"")});return(g,m)=>a.value&&u.value?(k(),de(xs(a.value),Un({key:0},c.value,{node:e.node,loading:e.node.loading,"index-key":e.indexKey,"custom-id":e.customId,"is-dark":r.value.isDark}),{default:he(()=>[d.value?(k(),de(p(l),Un({key:0},r.value,{nodes:e.node.children,"index-key":e.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):f.value?(k(),de(p(l),Un({key:1},r.value,{content:f.value,final:!e.node.loading,"index-key":`${e.indexKey||"child"}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:1},16,["node","loading","index-key","custom-id","is-dark"])):a.value?(k(),de(xs(a.value),{key:1,node:e.node,"custom-id":e.customId,"index-key":e.indexKey},null,8,["node","custom-id","index-key"])):e.fallbackToText?(k(),E("span",GIe,F(h.value),1)):te("",!0)}}),UM=Object.freeze({enabled:!0,contextLineCount:2,minimumLineCount:4,revealLineCount:5});function QIe(e){var t;if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const n=e;return yn(_t(_t({},UM),n),{enabled:(t=n.enabled)==null||t})}return _t({},UM)}function b7(e,t){if(e.renderSideBySide===!1)return!0;if(e.useInlineViewWhenSpaceIsLimited!==!0)return!1;const n=e.renderSideBySideInlineBreakpoint,i=typeof n=="number"&&Number.isFinite(n)?n:900;return t>0&&t<=i}function vO(e){var t,n;const i=(n=(t=String(e??"").split(/\r?\n/,1)[0])==null?void 0:t.trim())!=null?n:"";if(i.length<3)return"";const s=i[0];if(s!=="`"&&s!=="~"||i[1]!==s||i[2]!==s)return"";let o=3;for(;i[o]===s;)o+=1;return i.slice(o).trim()}function KM(e){var t;return((t=String(e??"").trim().split(/\s+/,1)[0])!=null?t:"")==="diff"}function YIe(e){var t;return e.diff===!0||KM(e.language)||KM(vO(String((t=e.raw)!=null?t:"")))}function JIe(e,t,n){const i=(function(s){const o=vO(s);if(!o)return"";const r=o.split(/\s+/).filter(Boolean);if(!r.length)return"";const l=r[0]==="diff"?r.slice(1):r;for(const a of l){const u=a.includes(":")?a.slice(a.indexOf(":")+1):a;if(u&&/[./\\-]/.test(u))return u}return""})(e);return{title:i||t,caption:i?n?`Diff / ${t}`:t:""}}const XIe=["aria-busy","aria-label","data-language","data-markstream-line-numbers"],eMe={key:0,translate:"no",class:"markstream-pre__diff-code"},tMe={class:"markstream-pre__diff-pane-content"},nMe={class:"markstream-pre__diff-number","aria-hidden":"true"},iMe={class:"markstream-pre__diff-content"},sMe={class:"markstream-pre__diff-content-inner"},oMe={key:0,class:"markstream-pre__line-numbers","aria-hidden":"true"},rMe=["textContent"],lMe=["textContent"],br=Qe({__name:"PreCodeNode",props:{node:{},loading:{type:Boolean},showLineNumbers:{type:Boolean},diffInline:{type:Boolean},diffHideUnchangedRegions:{type:[Boolean,Object]},reservedHeightPx:{}},setup(e){const t=e;function n(Z,pe){const re=String(Z??"");return pe?re:re.replace(/\r\n$|\n$|\r$/,"")}const i=L(()=>{var Z,pe,re;const fe=String((pe=(Z=t.node)==null?void 0:Z.language)!=null?pe:"");return String((re=String(fe).split(/\s+/g)[0])!=null?re:"").toLowerCase().replace(/[^\w-]/g,"")||"plaintext"}),s=L(()=>`language-${i.value}`),o=L(()=>{var Z;return t.loading===!0||((Z=t.node)==null?void 0:Z.loading)===!0}),r=L(()=>{var Z;return n((Z=t.node)==null?void 0:Z.code,o.value)});let l="",a=1;const u=L(()=>(function(Z){let pe=0,re=1;Z.startsWith(l)&&(pe=l.length,re=a,pe>0&&Z[pe-1]==="\r"&&Z[pe]===` +`&&pe++);for(let fe=pe;fe<Z.length;fe++)Z[fe]===` +`?re++:Z[fe]==="\r"&&(re++,Z[fe+1]===` +`&&fe++);return l=Z,a=re,re})(r.value)),c=L(()=>r.value.split(/\r\n|\n|\r/));let d=0,f="";const h=L(()=>{const Z=u.value;Z<d&&(d=0,f="");for(let pe=d+1;pe<=Z;pe++)f+=`${f?` +`:""}${pe}`;return d=Z,f}),g=L(()=>{var Z;return t.showLineNumbers===!0&&((Z=t.node)==null?void 0:Z.diff)===!0}),m=L(()=>g.value&&t.diffInline===!0),y=L(()=>{const Z=Number(t.reservedHeightPx);if(!Number.isFinite(Z)||Z<=0)return;const pe=`${Math.ceil(Z)}px`;return o.value?{maxHeight:pe,overflow:"auto"}:{height:pe,minHeight:pe,maxHeight:pe,overflow:"auto"}}),A=["diff ","index ","--- ","+++ ","@@ "];function b(Z){return String(Z??"").trim().length===0}function C(Z,pe="context",re={}){const fe=b(Z);return{code:Z,kind:fe&&pe!=="hunk"&&pe!=="spacer"&&!re.preserveBlankKind?"context":pe,empty:fe}}function v(Z){const pe=n(Z,o.value);return pe?pe.split(/\r\n|\n|\r/):[]}function x(Z,pe){return!b(Z[pe])||pe<Z.length-1}function S(Z){return Z.startsWith("-")&&!Z.startsWith("---")}function _(Z){return Z.startsWith("+")&&!Z.startsWith("+++")}function I(Z){return Z.some(pe=>A.some(re=>pe.startsWith(re)))}function M(Z,pe){return pe||!Z.startsWith(" ")||Z.startsWith(" ")?Z:` ${Z}`}function $(Z,pe){const re=Z.length,fe=pe.length,Ee=[];let X=0;for(;X<re&&X<fe&&Z[X]===pe[X];)Ee.push({originalIndex:X,modifiedIndex:X}),X++;const we=[];let Y=re-1,le=fe-1;for(;Y>=X&&le>=X&&Z[Y]===pe[le];)we.unshift({originalIndex:Y,modifiedIndex:le}),Y--,le--;const Ce=Y-X+1,ae=le-X+1;if(Ce<=0||ae<=0||o.value||(Ce+1)*(ae+1)>15e5)return Ee.concat(we);const oe=ae+1,Q=new Uint32Array((Ce+1)*(ae+1));for(let _e=Ce-1;_e>=0;_e--)for(let Ke=ae-1;Ke>=0;Ke--){const xe=_e*oe+Ke;if(Z[X+_e]===pe[X+Ke])Q[xe]=Q[(_e+1)*oe+Ke+1]+1;else{const Ne=Q[(_e+1)*oe+Ke],et=Q[_e*oe+Ke+1];Q[xe]=Ne>=et?Ne:et}}const ne=[];let ge=0,Ae=0;for(;ge<Ce&&Ae<ae;)Z[X+ge]===pe[X+Ae]?(ne.push({originalIndex:X+ge,modifiedIndex:X+Ae}),ge++,Ae++):Q[(ge+1)*oe+Ae]>=Q[ge*oe+Ae+1]?ge++:Ae++;return Ee.concat(ne,we)}function D(Z){var pe;const re=(function(){var le,Ce;const ae=t.diffHideUnchangedRegions;if(ae==null||ae===!1)return null;const oe=ae===!0?{}:ae;return oe.enabled===!1?null:{contextLineCount:Math.max(0,Math.floor((le=oe.contextLineCount)!=null?le:2)),minimumLineCount:Math.max(1,Math.floor((Ce=oe.minimumLineCount)!=null?Ce:4))}})();if(!re||Z.length<1||Z.length>2||Z.length===2&&Z[0].lines.length!==Z[1].lines.length)return Z;const fe=Z[0].lines,Ee=(pe=Z[1])==null?void 0:pe.lines,X=le=>fe[le].kind==="context"&&(Ee===void 0||Ee[le].kind==="context"&&fe[le].code===Ee[le].code),we=[];let Y=0;for(;Y<fe.length;){const le=Y;for(;Y<fe.length&&X(Y);)Y++;const Ce=Y;if(Ce-le>=re.minimumLineCount){const ae=le+(le===0?0:re.contextLineCount),oe=Ce-(Ce===fe.length?0:re.contextLineCount);oe-ae>=re.minimumLineCount&&we.push({start:ae,end:oe})}Y===le&&Y++}return we.length?Z.map((le,Ce)=>{const ae=[];let oe=0;for(const Q of we)ae.push(...le.lines.slice(oe,Q.start)),ae.push({code:Ce===0?"Unmodified lines":"",kind:"collapsed",empty:!1,key:`${le.key}-collapsed-${Q.start}-${Q.end}`,number:""}),oe=Q.end;return ae.push(...le.lines.slice(oe)),yn(_t({},le),{lines:ae})}):Z}const T=L(()=>{var Z,pe,re,fe;if(!g.value)return[];const Ee=(function(Ce){const ae=Ce.some(Q=>S(Q)),oe=Ce.some(Q=>_(Q));return ae&&oe||(function(){var Q,ne,ge,Ae;if(i.value==="diff")return!0;const _e=(Ae=(ge=String((ne=(Q=t.node)==null?void 0:Q.raw)!=null?ne:"").split(/\r?\n/,1)[0])==null?void 0:ge.trim())!=null?Ae:"";return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(_e)})()&&(ae||oe)})(c.value),X=(function(){var Ce,ae;return((Ce=t.node)==null?void 0:Ce.originalCode)!=null||((ae=t.node)==null?void 0:ae.updatedCode)!=null})();if(m.value){const Ce=X?(function(ae,oe){const Q=v(ae),ne=v(oe),ge=$(Q,ne);if(ge.length>0){const et=[];let ut=0,yt=0;for(const Mt of ge){for(;ut<Mt.originalIndex;)et.push(yn(_t({},C(Q[ut],"removed",{preserveBlankKind:x(Q,ut)})),{key:`inline-removed-source-${ut}`,number:ut+1})),ut++;for(;yt<Mt.modifiedIndex;)et.push(yn(_t({},C(ne[yt],"added",{preserveBlankKind:x(ne,yt)})),{key:`inline-added-source-${yt}`,number:yt+1})),yt++;et.push(yn(_t({},C(ne[Mt.modifiedIndex])),{key:`inline-context-source-${Mt.originalIndex}-${Mt.modifiedIndex}`,number:Mt.modifiedIndex+1})),ut=Mt.originalIndex+1,yt=Mt.modifiedIndex+1}for(;ut<Q.length;)et.push(yn(_t({},C(Q[ut],"removed",{preserveBlankKind:x(Q,ut)})),{key:`inline-removed-source-${ut}`,number:ut+1})),ut++;for(;yt<ne.length;)et.push(yn(_t({},C(ne[yt],"added",{preserveBlankKind:x(ne,yt)})),{key:`inline-added-source-${yt}`,number:yt+1})),yt++;return et}const Ae=[];let _e=0,Ke=Q.length-1,xe=ne.length-1;for(;_e<=Ke&&_e<=xe&&Q[_e]===ne[_e];)Ae.push(yn(_t({},C(ne[_e])),{key:`inline-prefix-${_e}`,number:_e+1})),_e++;const Ne=[];for(;Ke>=_e&&xe>=_e&&Q[Ke]===ne[xe];)Ne.unshift(yn(_t({},C(ne[xe])),{key:`inline-suffix-${xe}`,number:xe+1})),Ke--,xe--;for(let et=_e;et<=Ke;et++)Ae.push(yn(_t({},C(Q[et],"removed",{preserveBlankKind:x(Q,et)})),{key:`inline-removed-source-${et}`,number:et+1}));for(let et=_e;et<=xe;et++)Ae.push(yn(_t({},C(ne[et],"added",{preserveBlankKind:x(ne,et)})),{key:`inline-added-source-${et}`,number:et+1}));return Ae.concat(Ne)})((Z=t.node)==null?void 0:Z.originalCode,(pe=t.node)==null?void 0:pe.updatedCode):(function(ae){const oe=[];let Q=1,ne=1;const ge=I(ae);for(const[Ae,_e]of ae.entries())if(_e.startsWith("@@")){const Ke=_e.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);Ke&&(Q=Number(Ke[1]),ne=Number(Ke[2])),oe.push(yn(_t({},C(_e,"hunk")),{key:`inline-hunk-${Ae}`,number:""}))}else if(S(_e))oe.push(yn(_t({},C(M(_e.slice(1),ge),"removed",{preserveBlankKind:!0})),{key:`inline-removed-${Ae}`,number:Q++}));else if(_(_e))oe.push(yn(_t({},C(M(_e.slice(1),ge),"added",{preserveBlankKind:!0})),{key:`inline-added-${Ae}`,number:ne++}));else{const Ke=ge&&_e.startsWith(" ")?_e.slice(1):_e;oe.push(yn(_t({},C(Ke)),{key:`inline-context-${Ae}`,number:ne})),Q++,ne++}return oe})(c.value);return D([{key:"inline",className:"markstream-pre__diff-pane--inline",lines:Ce}])}if(!Ee&&X)return(function(Ce,ae){const oe=v(Ce),Q=v(ae),ne=$(oe,Q),ge=[],Ae=[];let _e=0,Ke=0,xe=0;const Ne=(et,ut)=>{const yt=Math.max(et-_e,ut-Ke);for(let Mt=0;Mt<yt;Mt++){const Ze=_e+Mt,Ge=Ke+Mt;ge.push(Ze<et?yn(_t({},C(oe[Ze],"removed",{preserveBlankKind:x(oe,Ze)})),{key:`original-changed-${xe}-${Ze}`,number:Ze+1}):yn(_t({},C("","spacer")),{key:`original-spacer-${xe}-${Mt}`,number:""})),Ae.push(Ge<ut?yn(_t({},C(Q[Ge],"added",{preserveBlankKind:x(Q,Ge)})),{key:`modified-changed-${xe}-${Ge}`,number:Ge+1}):yn(_t({},C("","spacer")),{key:`modified-spacer-${xe}-${Mt}`,number:""}))}_e=et,Ke=ut,xe++};for(const et of ne)Ne(et.originalIndex,et.modifiedIndex),ge.push(yn(_t({},C(oe[et.originalIndex])),{key:`original-context-${et.originalIndex}-${et.modifiedIndex}`,number:et.originalIndex+1})),Ae.push(yn(_t({},C(Q[et.modifiedIndex])),{key:`modified-context-${et.originalIndex}-${et.modifiedIndex}`,number:et.modifiedIndex+1})),_e=et.originalIndex+1,Ke=et.modifiedIndex+1;return Ne(oe.length,Q.length),D([{key:"original",className:"markstream-pre__diff-pane--original",lines:ge},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:Ae}])})((re=t.node)==null?void 0:re.originalCode,(fe=t.node)==null?void 0:fe.updatedCode);const we=[],Y=[],le=I(c.value);for(const Ce of c.value)if(Ce.startsWith("@@"))we.push(C(Ce,"hunk")),Y.push(C(Ce,"hunk"));else if(Ce.startsWith("-")&&!Ce.startsWith("---"))we.push(C(M(Ce.slice(1),le),"removed",{preserveBlankKind:!0}));else if(Ce.startsWith("+")&&!Ce.startsWith("+++"))Y.push(C(M(Ce.slice(1),le),"added",{preserveBlankKind:!0}));else{const ae=le&&Ce.startsWith(" ")?Ce.slice(1):Ce;we.push(C(ae)),Y.push(C(ae))}return D([{key:"original",className:"markstream-pre__diff-pane--original",lines:we.map((Ce,ae)=>yn(_t({},Ce),{key:`original-${ae}`,number:ae+1}))},{key:"modified",className:"markstream-pre__diff-pane--modified",lines:Y.map((Ce,ae)=>yn(_t({},Ce),{key:`modified-${ae}`,number:ae+1}))}])}),N=L(()=>{var Z,pe;if(t.showLineNumbers!==!0)return;let re=g.value?1:u.value;if(g.value){re=Math.max(re,v((Z=t.node)==null?void 0:Z.originalCode).length,v((pe=t.node)==null?void 0:pe.updatedCode).length);for(const Ee of T.value)for(const X of Ee.lines)typeof X.number=="number"&&(re=Math.max(re,X.number))}const fe=`${Math.max(2,String(re).length)}ch`;return{"--markstream-pre-line-number-width":fe,"--markstream-pre-diff-line-number-width":fe,"--markstream-code-padding-left":"calc(var(--markstream-pre-line-number-padding-left, 2ch) + var(--markstream-pre-line-number-width, 2ch) + var(--markstream-pre-line-number-padding-right, 1ch) + var(--markstream-pre-line-number-separator-width, 2px) + var(--markstream-pre-line-number-gap-to-code, 1ch))"}}),O=L(()=>T.value.some(Z=>Z.lines.some(pe=>pe.kind==="collapsed"))),P=L(()=>{const Z=i.value;return Z?`Code block: ${Z}`:"Code block"}),R=G(null),q=G([]);let j=null,W=!1,z=null;function H(Z){const pe=Number.parseFloat(String(Z??""));return Number.isFinite(pe)&&pe>0?pe:0}function ee(Z,pe){var re;if(!Z)return pe;if(Z.classList.contains("markstream-pre__diff-line--collapsed"))return 32;const fe=Z.querySelector(".markstream-pre__diff-content"),Ee=fe?.getBoundingClientRect(),X=(re=Ee?.height)!=null?re:0;return Math.max(pe,Math.ceil(X))}function V(){W||typeof window>"u"||(j!=null&&window.cancelAnimationFrame(j),j=window.requestAnimationFrame(()=>{j=null,W||(function(){var Z,pe;j=null;const re=R.value;if(!re||!g.value||m.value||!re.classList.contains("is-wrap"))return void(q.value.length&&(q.value=[]));const fe=(function(ae){const oe=window.getComputedStyle(ae),Q=H(oe.getPropertyValue("--markstream-pre-diff-line-height"));if(Q>0)return Q;const ne=H(oe.lineHeight);return ne>0?ne:18})(re),Ee=Array.from(re.querySelectorAll(".markstream-pre__diff-pane--original .markstream-pre__diff-line")),X=Array.from(re.querySelectorAll(".markstream-pre__diff-pane--modified .markstream-pre__diff-line")),we=Math.max(Ee.length,X.length),Y=[];for(let ae=0;ae<we;ae++){const oe=ee((Z=Ee[ae])!=null?Z:null,fe),Q=ee((pe=X[ae])!=null?pe:null,fe),ne=Math.max(fe,oe,Q);Y.push({rowHeight:ne,originalHeight:oe,modifiedHeight:Q})}var le,Ce;le=q.value,Ce=Y,le.length===Ce.length&&le.every((ae,oe)=>{const Q=Ce[oe];return Q&&Math.abs(ae.rowHeight-Q.rowHeight)<=.5&&Math.abs(ae.originalHeight-Q.originalHeight)<=.5&&Math.abs(ae.modifiedHeight-Q.modifiedHeight)<=.5})||(q.value=Y)})()}))}function ie(Z){z?.disconnect(),z=null,Z&&g.value&&!m.value&&typeof ResizeObserver<"u"&&(z=new ResizeObserver(()=>{V()}),z.observe(Z))}function se(Z,pe){const re=q.value[Z];if(!re)return;const fe=pe==="original"?re.originalHeight:re.modifiedHeight;return{"--markstream-pre-diff-synced-row-height":`${Math.ceil(re.rowHeight)}px`,"--markstream-pre-diff-content-height":`${Math.ceil(fe)}px`}}return qe(R,Z=>{ie(Z),kt(()=>V())},{flush:"post"}),qe([g,m,T],()=>{ie(R.value),kt(()=>V())},{flush:"post",immediate:!0}),Gn(()=>{W=!0,j!=null&&(window.cancelAnimationFrame(j),j=null),z?.disconnect(),z=null}),(Z,pe)=>(k(),E("pre",{ref_key:"preRef",ref:R,style:qt([y.value,N.value]),class:Fe([s.value,{"markstream-pre--line-numbers":t.showLineNumbers,"markstream-pre--diff-preview":g.value,"markstream-pre--diff-inline":m.value,"markstream-pre--diff-collapsed":O.value}]),"aria-busy":o.value,"aria-label":P.value,"data-language":i.value,"data-markstream-line-numbers":t.showLineNumbers?"1":void 0,"data-markstream-pre":"1",tabindex:"0"},[g.value?(k(),E("code",eMe,[(k(!0),E(Te,null,ht(T.value,re=>(k(),E("span",{key:re.key,class:Fe(["markstream-pre__diff-pane",re.className])},[w("span",tMe,[(k(!0),E(Te,null,ht(re.lines,(fe,Ee)=>(k(),E("span",{key:fe.key,class:Fe(["markstream-pre__diff-line",[`markstream-pre__diff-line--${fe.kind}`,{"markstream-pre__diff-line--empty":fe.empty}]]),style:qt(se(Ee,re.key))},[pe[0]||(pe[0]=w("span",{class:"markstream-pre__diff-rail","aria-hidden":"true"},null,-1)),w("span",nMe,F(fe.number),1),w("span",iMe,[w("span",sMe,F(fe.code),1)])],6))),128))])],2))),128))])):(k(),E(Te,{key:1},[t.showLineNumbers?(k(),E("span",oMe,[w("span",{class:"markstream-pre__line-numbers-text",textContent:F(h.value)},null,8,rMe)])):te("",!0),w("code",{translate:"no",class:"markstream-pre__code",textContent:F(r.value)},null,8,lMe)],64))],14,XIe))}});br.install=e=>{e.component(br.__name,br)};const ks=di(Qe({__name:"TextNode",props:{node:{}},emits:["copy"],setup(e){const t=e,n=Rh(),i=cn("markstreamFade",void 0),s=cn("markstreamTextStreamState",void 0),o=cn("markstreamStreamVersion",void 0),r=L(()=>{const x=n.fade;return x===""||x===!0||x==="true"||x!==!1&&x!=="false"&&void 0}),l=L(()=>typeof r.value=="boolean"?r.value:typeof i?.value!="boolean"||i.value),a=L(()=>{var x;const S=(x=n["index-key"])!=null?x:n.indexKey;return S==null||S===""?"":String(S)}),u=G(t.node.content),c=G(""),d=G(0),f=G(t.node.content);let h;const g=G(null),m=G(null);let y="",A=null;function b(){h?.(),h=void 0}function C(){b(),c.value&&(u.value=u.value+c.value,c.value="")}qe([u,g,m],function(){var x,S;const _=g.value;if(!_)return;const I=String((x=u.value)!=null?x:""),M=m.value;return A||(A=_.firstChild,y=(S=A?.data)!=null?S:""),I.startsWith(y)?!A&&I?(_.textContent=I,A=_.firstChild,void(y=I)):void(I.length>y.length&&M&&(M.appendChild(document.createTextNode(I.slice(y.length))),y=I)):(_.textContent=I,A=_.firstChild,M&&(M.textContent=""),void(y=I))},{immediate:!0}),qe([()=>t.node.content,a,l],([x])=>{const S=String(x??""),_=a.value,I=JR({nextContent:S,persistedContent:_?s?.get(_):void 0,currentState:{settledContent:u.value,streamedDelta:c.value},typewriterEnabled:l.value});u.value=I.settledContent,c.value=I.streamedDelta,I.appended?(d.value+=1,(function(){if(!c.value||h||!o)return;const M=o.value;h=qe(()=>o.value,$=>{$!==M&&C()},{flush:"sync"})})()):c.value||b(),_&&s?.set(_,S)},{immediate:!0}),Xd(b);const v=L(()=>d.value%2==0?"text-node-stream-delta--a":"text-node-stream-delta--b");return(x,S)=>(k(),E("span",{class:Fe([[e.node.center?"text-node-center":""],"text-node"])},[$n(w("span",{ref_key:"settledTextEl",ref:g},F(f.value),513),[[Qi,u.value!==""]]),$n(w("span",{ref_key:"settledAppendsEl",ref:m},null,512),[[Qi,u.value!==""]]),c.value?(k(),E("span",{key:0,class:Fe(["text-node-stream-delta",[v.value]]),onAnimationend:C},F(c.value),35)):te("",!0)],2))}}),[["__scopeId","data-v-fd79037c"]]);function op(e,t,n){return Qe({name:e,inheritAttrs:!1,setup(i,{attrs:s,slots:o}){var r,l;const a=k7(),u=v7(),c=y7(),d=typeof window<"u"&&((l=(r=Ws())==null?void 0:r.vnode.el)==null?void 0:l.nodeType)===1,f=G(typeof window>"u"||d||!c.value),h=Ul(null);let g=null;function m(y){const A=y&&"$el"in y?y.$el:y;h.value=A instanceof HTMLElement?A:null}return typeof window<"u"&&qe([h,c],([y,A],b,C)=>{if(g?.destroy(),g=null,!A||f.value)return void(f.value=!0);if(!y)return;let v=!0;const x=a(y,{rootMargin:u?.value.heavyBlockMargin,allowIdle:!1});g=x,f.value=x.isVisible.value,x.whenVisible.then(()=>{v&&g===x&&(f.value=!0)}),C(()=>{v=!1,x.destroy(),g===x&&(g=null)})},{immediate:!0}),Gn(()=>{g?.destroy(),g=null}),()=>gn(f.value?t:n,yn(_t({},s),{ref:m}),o)}})}ks.install=e=>{e.component(ks.__name,ks)};const Vv=Qe({name:"CodeBlockNodeLoading",inheritAttrs:!1,props:["node","isDark","loading","stream","theme","darkTheme","lightTheme","isShowPreview","monacoOptions","enableFontSizeControl","minWidth","maxWidth","themes","showHeader","showCopyButton","showExpandButton","showPreviewButton","showCollapseButton","showFontSizeButtons","showTooltips","htmlPreviewAllowScripts","htmlPreviewSandbox","customId","estimatedHeightPx","estimatedContentHeightPx","estimatedDiffInline"],emits:["previewCode","copy"],setup(e,{attrs:t}){const n=e;return()=>{var i,s,o,r,l,a,u;const c=c9(String((s=(i=n.node)==null?void 0:i.language)!=null?s:"")),d=SM[c]||(c?c.charAt(0).toUpperCase()+c.slice(1):SM[""]),f=YIe(n.node),h=JIe(String((r=(o=n.node)==null?void 0:o.raw)!=null?r:""),d,f),g=n.monacoOptions,m=f&&((l=n.estimatedDiffInline)!=null?l:b7(g??{},typeof window>"u"?0:window.innerWidth)),y=g?.diffAppearance,A=y==="dark"||y!=="light"&&n.isDark===!0,b=typeof g?.fontSize=="number"&&Number.isFinite(g.fontSize)&&g.fontSize>0?g.fontSize:12,C=typeof g?.lineHeight=="number"&&Number.isFinite(g.lineHeight)&&g.lineHeight>0?g.lineHeight:b===12?18:Math.max(12,Math.round(1.5*b)),v=typeof g?.tabSize=="number"&&Number.isFinite(g.tabSize)&&g.tabSize>0?g.tabSize:4,x=f?0:8,S=typeof((a=g?.padding)==null?void 0:a.top)=="number"&&Number.isFinite(g.padding.top)&&g.padding.top>=0?g.padding.top:x,_=typeof((u=g?.padding)==null?void 0:u.bottom)=="number"&&Number.isFinite(g.padding.bottom)&&g.padding.bottom>=0?g.padding.bottom:x,I=typeof g?.fontFamily=="string"?g.fontFamily.trim():"",M=_t(_t({fontSize:`${b}px`,lineHeight:`${C}px`,tabSize:v,paddingTop:`${S}px`,paddingBottom:`${_}px`,"--markstream-pre-line-number-top":`${S}px`},f?{"--markstream-pre-diff-line-height":`${C}px`}:{}),I?{"--markstream-code-font-family":I}:{}),$=()=>gn("button",{class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0","aria-hidden":"true",disabled:!0,tabindex:-1,type:"button"},[gn("svg",{class:"action-icon",width:"14",height:"14"})]),D=n.isShowPreview!==!1&&(c==="html"||c==="svg"),T=n.showFontSizeButtons!==!1&&n.enableFontSizeControl!==!1||n.showExpandButton!==!1||D&&n.showPreviewButton!==!1,N=P=>{if(P!=null)return typeof P=="number"?`${P}px`:String(P)},O=_t(_t(_t({"--markstream-code-layout-character-width":"1ch"},N(n.minWidth)?{minWidth:N(n.minWidth)}:{}),N(n.maxWidth)?{maxWidth:N(n.maxWidth)}:{}),f?{}:{color:"var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))",backgroundColor:"var(--markstream-code-fallback-bg, var(--code-bg, #fff))",borderColor:"var(--markstream-code-border-color, var(--code-border))"});return gn("div",yn(_t({},t),{class:["code-block-container","rounded-lg","border",{dark:n.isDark===!0,"is-rendering":n.loading!==!1,"is-dark":A,"is-diff":f,"is-plain-text":c===""||c==="plaintext"||c==="text"},t.class],style:[O,t.style],"data-markstream-code-block":"1","data-markstream-enhanced":"false","data-markstream-code-block-state":n.loading?"streaming":"settled","data-markstream-code-loading":"1"}),[n.showHeader===!1?null:gn("div",{class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},[gn("div",{class:"code-header-main",style:{minWidth:0,flex:"1 1 auto",display:"flex",alignItems:"center",gap:"var(--ms-gap-header-main, 0.625rem)",overflow:"hidden"}},[gn("span",{class:"icon-slot h-4 w-4 flex-shrink-0","aria-hidden":"true",style:{display:"inline-flex",width:"1rem",height:"1rem",flex:"0 0 auto"}}),gn("div",{class:"code-header-copy",style:{minWidth:0,display:"grid",gap:"2px"}},[gn("div",{class:"code-header-title",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"var(--ms-text-label, 0.75rem)",fontWeight:"500",color:"var(--code-action-fg)"}},h.title),h.caption?gn("div",{class:"code-header-caption",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"0.75rem",color:"var(--code-line-number)"}},h.caption):null])]),gn("div",{class:"flex items-center gap-0.5",style:{visibility:"hidden"}},[f?gn("div",{class:"code-diff-stats","aria-hidden":"true"},[gn("span",{class:"code-diff-stat removed"},"-0"),gn("span",{class:"code-diff-stat added"},"+0")]):null,n.showCopyButton===!1?null:$(),n.showCollapseButton===!1?null:$(),T?gn("div",{class:"relative"},[$()]):null])]),gn("div",{class:"code-block-shell-content",style:n.stream!==!1||n.loading===!1?void 0:{display:"none"}},[gn(br,{node:n.node,loading:n.loading,showLineNumbers:!0,reservedHeightPx:f?void 0:n.estimatedContentHeightPx,diffInline:m,diffHideUnchangedRegions:f?QIe(g?.diffHideUnchangedRegions):void 0,class:"code-pre-fallback",style:M,"data-markstream-code-loading":"1"})]),gn("div",{class:"code-loading-placeholder",style:n.stream===!1&&n.loading!==!1?void 0:{display:"none"}},[gn("div",{class:"loading-skeleton"},[gn("div",{class:"skeleton-line"}),gn("div",{class:"skeleton-line"}),gn("div",{class:"skeleton-line short"})])]),gn("span",{class:"sr-only","aria-live":"polite",role:"status"})])}}}),Q3=op("ViewportDeferredCodeBlockNode",Dl({loader:()=>Bi(null,null,function*(){try{return(yield vs(()=>import("./CodeBlockNode-EUGAgT_h.js"),__vite__mapDeps([6,7]))).default}catch(e){return console.warn('[markstream-vue] Failed to load the enhanced CodeBlockNode chunk; falling back to preformatted code rendering. Enhanced code blocks require the optional "stream-diffs" peer (or "stream-monaco" as a fallback).',e),br}}),loadingComponent:Vv,delay:0,suspensible:!1}),Vv),Gl=Dl(()=>Bi(null,null,function*(){var e;if(((e=(function(){const t=Reflect.get(globalThis,"process");return t?.env})())==null?void 0:e.NODE_ENV)==="test"&&typeof window<"u")return t=>{var n,i,s,o;return gn(ks,yn(_t({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))};try{return yield iO(),(yield vs(()=>import("./index7-3cymNRfD.js"),[])).default}catch(t){console.warn('[markstream-vue] Optional peer dependencies for MathInlineNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',t)}return t=>{var n,i,s,o;return gn(ks,yn(_t({},t),{node:{type:"text",content:(i=t.node.raw)!=null?i:`$${(n=t.node.content)!=null?n:""}$`,raw:(o=t.node.raw)!=null?o:`$${(s=t.node.content)!=null?s:""}$`}}))}})),yO=Dl(()=>Bi(null,null,function*(){try{return yield iO(),(yield vs(()=>import("./index6-It9n1WlQ.js"),[])).default}catch(e){console.warn('[markstream-vue] Optional peer dependencies for MathBlockNode are missing. Falling back to text rendering. To enable full math rendering features, please install "katex".',e)}return e=>{var t,n,i,s;return gn(ks,yn(_t({},e),{node:{type:"text",content:(n=e.node.raw)!=null?n:`$$${(t=e.node.content)!=null?t:""}$$`,raw:(s=e.node.raw)!=null?s:`$$${(i=e.node.content)!=null?i:""}$$`}}))}})),or=di(Qe({__name:"ReferenceNode",props:{node:{},messageId:{},threadId:{}},emits:["click","mouseEnter","mouseLeave"],setup:e=>(t,n)=>(k(),E("span",{class:"reference-node cursor-pointer text-xs rounded-md px-1.5 mx-0.5",role:"button",tabindex:"0",onClick:n[0]||(n[0]=i=>t.$emit("click",i,e.node.id,e.messageId,e.threadId)),onMouseenter:n[1]||(n[1]=i=>t.$emit("mouseEnter",i,e.node.id,e.messageId,e.threadId)),onMouseleave:n[2]||(n[2]=i=>t.$emit("mouseLeave",i,e.node.id,e.messageId,e.threadId))},F(e.node.id),33))}),[["__scopeId","data-v-775c65e4"]]);or.install=e=>{e.component(or.__name,or)};const aMe={class:"superscript-node"},Sr=di(Qe({__name:"SuperscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,emphasis:ur,footnote_reference:Ur,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,emoji:xr,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("sup",aMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"superscript"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"superscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-24160b22"]]);Sr.install=e=>{e.component(Sr.__name,Sr)};const uMe={class:"subscript-node"},_r=di(Qe({__name:"SubscriptNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,emphasis:ur,footnote_reference:Ur,strikethrough:lr,highlight:Vr,insert:Ir,superscript:Sr,emoji:xr,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("sub",uMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"subscript"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"subscript"}-${l}`,"fallback-to-text":""},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-197fa13b"]]);_r.install=e=>{e.component(_r.__name,_r)};const cMe={class:"strong-node"},rr=di(Qe({__name:"StrongNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,emphasis:ur,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,footnote_reference:Ur,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("strong",cMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"strong"}-${l}`,components:i.value,node:r,"index-key":`${e.indexKey||"strong"}-${l}`,"custom-id":t.customId},null,8,["components","node","index-key","custom-id"]))),128))]))}}),[["__scopeId","data-v-a8647104"]]);rr.install=e=>{e.component(rr.__name,rr)};const dMe={class:"strikethrough-node"},lr=di(Qe({__name:"StrikethroughNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,emphasis:ur,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,footnote_reference:Ur,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("del",dMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"strikethrough"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"strikethrough"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-b7a531fa"]]);lr.install=e=>{e.component(lr.__name,lr)};const fMe=["href","title","aria-label","aria-hidden","target","rel"],hMe=["aria-hidden"],pMe={class:"link-text-wrapper relative inline-flex"},gMe={class:"leading-[normal] link-text"},ar=di(Qe({__name:"LinkNode",props:{node:{},indexKey:{},customId:{},showTooltip:{type:Boolean,default:!0},color:{},underlineHeight:{},underlineBottom:{},animationDuration:{},animationOpacity:{},animationTiming:{},animationIteration:{}},setup(e){const t=e,n=cn("markstreamShowTooltips",void 0),i=L(()=>{const A=n?.value;return typeof A=="boolean"?A:t.showTooltip}),s=L(()=>{var A,b,C,v,x;const S=t.underlineBottom!==void 0?typeof t.underlineBottom=="number"?`${t.underlineBottom}px`:String(t.underlineBottom):"-3px",_=(A=t.animationOpacity)!=null?A:.35,I=Math.max(.12,Math.min(.5*_,_)),M={"--underline-height":`${(b=t.underlineHeight)!=null?b:2}px`,"--underline-bottom":S,"--underline-opacity":String(_),"--underline-rest-opacity":String(I),"--underline-duration":`${(C=t.animationDuration)!=null?C:1.6}s`,"--underline-timing":(v=t.animationTiming)!=null?v:"ease-in-out","--underline-iteration":typeof t.animationIteration=="number"?String(t.animationIteration):(x=t.animationIteration)!=null?x:"infinite"};return t.color&&(M["--link-color"]=t.color),M}),o=qs(()=>t.customId),r=L(()=>_t({text:ks,strong:rr,strikethrough:lr,emphasis:ur,image:Xu,html_inline:Kr,inline_code:Uo},o.value)),l=Rh(),a=L(()=>{var A,b;const C=(A=t.node)==null?void 0:A.attrs;if(!C||typeof C!="object")return{};const v={};if(Array.isArray(C))for(const x of C)Array.isArray(x)&&x[0]&&(v[String(x[0])]=String((b=x[1])!=null?b:""));else for(const[x,S]of Object.entries(C))x&&S!=null&&S!==!1&&(v[x]=S===!0?"":String(S));return RM(v,"safe","a")}),u=L(()=>_t(_t({},l),a.value)),c=L(()=>{var A,b;return RM({href:String((b=(A=t.node)==null?void 0:A.href)!=null?b:"")},"safe","a").href}),d=L(()=>{if(!c.value)return;const A=u.value.target;return(typeof A=="string"?A.trim():String(A??"").trim())||(J7e(c.value)?"_blank":void 0)}),f=L(()=>{var A;return String((A=d.value)!=null?A:"").trim().toLowerCase()==="_blank"}),h=L(()=>{if(!c.value)return;const A=u.value.rel,b=new Set((typeof A=="string"?A:String(A??"")).split(/\s+/).filter(Boolean)),C=new Set(Array.from(b).filter(v=>v.toLowerCase()!=="opener"));return f.value&&(C.add("noopener"),C.add("noreferrer")),C.size>0?Array.from(C).join(" "):void 0}),g=L(()=>{const A=_t({},u.value);return delete A.title,delete A.href,delete A.target,delete A.rel,A});function m(){i.value&&$Ie()}const y=L(()=>{var A,b;const C=(A=t.node)==null?void 0:A.title;return typeof C=="string"&&C.trim().length>0?C:String((b=c.value)!=null?b:"")});return(A,b)=>{var C,v;return e.node.loading?(k(),E("span",Un({key:1,class:"link-loading inline-flex items-baseline gap-1.5","aria-hidden":e.node.loading?"false":"true"},p(l),{style:s.value}),[w("span",pMe,[w("span",gMe,[K(p(ks),{class:"leading-[normal] link-text",node:{type:"text",content:String((C=e.node.text)!=null?C:""),raw:String((v=e.node.text)!=null?v:"")},"index-key":`${e.indexKey||"link-text"}-loading`},null,8,["node","index-key"])]),b[1]||(b[1]=w("span",{class:"link-loading-indicator","aria-hidden":"true"},null,-1))])],16,hMe)):(k(),E("a",Un({key:0,class:"link-node",href:c.value,title:i.value?"":y.value,"aria-label":`Link: ${y.value}`,"aria-hidden":e.node.loading?"true":"false",target:d.value,rel:h.value},g.value,{style:s.value,onMouseenter:b[0]||(b[0]=x=>(function(S){var _,I,M,$;if(!i.value)return;const D=S,T=D?.clientX!=null&&D?.clientY!=null?{x:D.clientX,y:D.clientY}:void 0,N=((_=t.node)==null?void 0:_.title)||((I=c.value)!=null&&I.includes("xn--")&&(($=(M=t.node)==null?void 0:M.text)!=null&&$.includes("://"))?t.node.text:c.value)||"";DIe(S.currentTarget,N,"top",!1,T)})(x)),onMouseleave:m}),[(k(!0),E(Te,null,ht(e.node.children,(x,S)=>(k(),de(p(_a),{key:`${e.indexKey||"emphasis"}-${S}`,components:r.value,node:x,"custom-id":t.customId,"index-key":`${e.indexKey||"link-text"}-${S}`},null,8,["components","node","custom-id","index-key"]))),128))],16,fMe))}}}),[["__scopeId","data-v-367e6ca4"]]);ar.install=e=>{e.component(ar.__name,ar)};const mMe={class:"insert-node"},Ir=di(Qe({__name:"InsertNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,emphasis:ur,strikethrough:lr,highlight:Vr,subscript:_r,superscript:Sr,emoji:xr,footnote_reference:Ur,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("ins",mMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"insert"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"insert"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-1e2c29d4"]]);Ir.install=e=>{e.component(Ir.__name,Ir)};const vMe={class:"highlight-node"},Vr=di(Qe({__name:"HighlightNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,emphasis:ur,strikethrough:lr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,footnote_reference:Ur,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("mark",vMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"highlight"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"highlight"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-7a62982a"]]);Vr.install=e=>{e.component(Vr.__name,Vr)};const yMe={class:"emphasis-node"},ur=di(Qe({__name:"EmphasisNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>_t({text:ks,inline_code:Uo,link:ar,html_inline:Kr,strong:rr,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,footnote_reference:Ur,math_inline:Gl,reference:or},n.value));return(s,o)=>(k(),E("em",yMe,[(k(!0),E(Te,null,ht(e.node.children,(r,l)=>(k(),de(p(_a),{key:`${e.indexKey||"emphasis"}-${l}`,components:i.value,node:r,"custom-id":t.customId,"index-key":`${e.indexKey||"emphasis"}-${l}`},null,8,["components","node","custom-id","index-key"]))),128))]))}}),[["__scopeId","data-v-2a5aafbf"]]);ur.install=e=>{e.component(ur.__name,ur)};const kMe={class:"hard-break"},ec=di(Qe({__name:"HardBreakNode",props:{node:{}},setup:e=>(t,n)=>(k(),E("br",kMe))}),[["__scopeId","data-v-50c58f70"]]);ec.install=e=>{e.component(ec.__name,ec)};const y0=Qe({__name:"SimpleInlineRenderer",props:{nodes:{},customId:{},indexKey:{}},setup(e){const t=e,n=xt({checkbox:qr,checkbox_input:qr,emoji:xr,emphasis:ur,hardbreak:ec,highlight:Vr,inline_code:Uo,insert:Ir,link:ar,reference:or,strikethrough:lr,strong:rr,subscript:_r,superscript:Sr,text:ks}),i=qs(()=>t.customId),s=L(()=>{const o=i.value;return Object.keys(o).length>0?_t(_t({},n),o):n});return(o,r)=>(k(!0),E(Te,null,ht(e.nodes,(l,a)=>(k(),de(p(_a),{key:a,components:s.value,node:l,"custom-id":t.customId,"index-key":`${e.indexKey||"inline"}-${a}`},null,8,["components","node","custom-id","index-key"]))),128))}});function I8(e){if(!e||typeof e!="object")return!1;const t=`|${e.type}|`;if(!"|checkbox|checkbox_input|emoji|emphasis|hardbreak|highlight|inline_code|insert|link|reference|strikethrough|strong|subscript|superscript|text|".includes(t))return!1;if(!"|emphasis|highlight|insert|link|strikethrough|strong|subscript|superscript|".includes(t))return!0;const n=e.children;return Array.isArray(n)&&n.every(I8)}function Zv(e,t=!0,n=!1){if(!e||!n&&e.length===0)return null;if(e.every(I8))return e;if(!t||e.length!==1)return null;const i=e[0];if(i?.type!=="paragraph"||!Array.isArray(i.children))return null;const s=i.children;return(n||s.length>0)&&s.every(I8)?s:null}function Vd(e){var t,n;if(!e?.length)return null;let i="";for(const s of e){if(s?.type!=="text"||s.center===!0)return null;i+=String((n=(t=s.content)!=null?t:s.raw)!=null?n:"")}return i}const bMe=["cite"],AMe={key:0,dir:"auto",class:"paragraph-node"},CMe=["custom-id"],p2=di(Qe({__name:"BlockquoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=qs(()=>t.customId),i=L(()=>!!n.value.paragraph),s=L(()=>!!n.value.text),o=L(()=>Zv(t.node.children,!i.value)),r=L(()=>t.fade!==!1||s.value?null:Vd(o.value));return Kn("markstreamShowTooltips",L(()=>t.showTooltips)),Kn("markstreamFade",L(()=>t.fade)),(l,a)=>(k(),E("blockquote",{class:"blockquote blockquote-node",dir:"auto",cite:e.node.cite},[o.value?(k(),E("p",AMe,[r.value!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(r.value),9,CMe)):(k(),de(p(y0),{key:1,nodes:o.value,"custom-id":t.customId,"index-key":`blockquote-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):(k(),de(p(Mr),{key:1,"show-tooltips":t.showTooltips,"index-key":`blockquote-${t.indexKey}`,nodes:t.node.children||[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:a[0]||(a[0]=u=>l.$emit("copy",u))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade"]))],8,bMe))}}),[["__scopeId","data-v-abfecebc"]]);p2.install=e=>{e.component(p2.__name,p2)};const wMe={class:"definition-list"},xMe={class:"definition-term"},SMe={class:"definition-desc"},g2=di(Qe({__name:"DefinitionListNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(k(),E("dl",wMe,[(k(!0),E(Te,null,ht(t.node.items,(s,o)=>(k(),E(Te,{key:o},[w("dt",xMe,[K(p(Mr),{"index-key":`definition-term-${t.indexKey}-${o}`,nodes:s.term,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])]),w("dd",SMe,[K(p(Mr),{"index-key":`definition-desc-${t.indexKey}-${o}`,nodes:s.definition,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[1]||(i[1]=r=>n.$emit("copy",r))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],64))),128))]))}}),[["__scopeId","data-v-4e103b30"]]);g2.install=e=>{e.component(g2.__name,g2)};const _Me=["href","title"],Np=di(Qe({__name:"FootnoteAnchorNode",props:{node:{}},setup(e){const t=e;function n(i){var s;if(i.preventDefault(),typeof document>"u")return;const o=`fnref-${String((s=t.node.id)!=null?s:"")}`,r=document.getElementById(o);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}return(i,s)=>(k(),E("a",{class:"footnote-anchor text-sm hover:underline cursor-pointer",href:`#fnref-${e.node.id}`,title:`返回引用 ${e.node.id}`,onClick:n}," ↩︎ ",8,_Me))}}),[["__scopeId","data-v-e1eb37b6"]]);Np.install=e=>{e.component(Np.__name,Np)};const IMe=["id"],MMe={class:"flex-1"},m2=Qe({__name:"FootnoteNode",props:{node:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e){const t=e;return(n,i)=>(k(),E("div",{id:`fnref--${e.node.id}`,class:"footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border)] pt-2"},[w("div",MMe,[K(p(Mr),{"index-key":`footnote-${t.indexKey}`,nodes:t.node.children,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,onCopy:i[0]||(i[0]=s=>n.$emit("copy",s))},null,8,["index-key","nodes","custom-id","typewriter","fade"])])],8,IMe))}});m2.install=e=>{e.component(m2.__name,m2)};const EMe=["custom-id"],M8=di(Qe({__name:"HeadingNode",props:{node:{},customId:{},indexKey:{}},setup(e){const t=e,n=qs(()=>t.customId),i=cn("markstreamFade",void 0),s=L(()=>i?.value!==!1||n.value.text?null:Vd(t.node.children)),o=L(()=>_t({text:ks,inline_code:Uo,link:ar,image:Xu,strong:rr,emphasis:ur,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,checkbox:qr,checkbox_input:qr,footnote_reference:Ur,hardbreak:ec,math_inline:Gl,reference:or},n.value));return(r,l)=>(k(),de(xs(`h${e.node.level}`),Un({class:["heading-node",[`heading-${e.node.level}`]],dir:"auto"},e.node.attrs),{default:he(()=>[s.value!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(s.value),9,EMe)):(k(!0),E(Te,{key:1},ht(e.node.children,(a,u)=>(k(),de(p(_a),{key:u,components:o.value,"custom-id":t.customId,node:a,"index-key":`${e.indexKey||"heading"}-${u}`},null,8,["components","custom-id","node","index-key"]))),128))]),_:1},16,["class"]))}}),[["__scopeId","data-v-7122dbe1"]]),h9=M8;h9.install=e=>{e.component(M8.__name,M8)};const TMe={key:0,dir:"auto",class:"paragraph-node"},LMe=["custom-id"],NMe={dir:"auto",class:"paragraph-node"},FMe=["custom-id"],Ah=di(Qe({__name:"ListItemNode",props:{node:{},item:{},indexKey:{},customId:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},value:{},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=L(()=>{var h;return(h=t.node)!=null?h:t.item}),i=qs(()=>t.customId),s=L(()=>!!i.value.paragraph),o=L(()=>!!i.value.text),r=L(()=>{var h;return Zv((h=n.value)==null?void 0:h.children,!s.value)}),l=L(()=>{var h;if(s.value)return null;const g=(h=n.value)==null?void 0:h.children;if(!Array.isArray(g)||g.length<2)return null;const m=g[0];if(m?.type!=="paragraph"||!Array.isArray(m.children))return null;const y=g.slice(1);if(!y.every(b=>b?.type==="list"))return null;const A=Zv([m]);return A?{paragraphChildren:A,nestedLists:y}:null});function a(){return t.fade===!1&&!o.value}const u=L(()=>a()?Vd(r.value):null),c=L(()=>{var h;return a()?Vd((h=l.value)==null?void 0:h.paragraphChildren):null}),d=Object.freeze({}),f=L(()=>{const{value:h}=t;return typeof h=="number"&&Number.isFinite(h)?{value:h}:d});return Kn("markstreamShowTooltips",L(()=>t.showTooltips)),Kn("markstreamFade",L(()=>t.fade)),(h,g)=>{var m,y;return k(),E("li",Un({class:"list-item",dir:"auto"},f.value),[r.value?(k(),E("p",TMe,[u.value!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(u.value),9,LMe)):(k(),de(p(y0),{key:1,nodes:r.value,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))])):l.value?(k(),E(Te,{key:1},[w("p",NMe,[c.value!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(c.value),9,FMe)):(k(),de(p(y0),{key:1,nodes:l.value.paragraphChildren,"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-paragraph`},null,8,["nodes","custom-id","index-key"]))]),(k(!0),E(Te,null,ht(l.value.nestedLists,(A,b)=>(k(),de(p(Mr),{key:b,nodes:[A],"custom-id":t.customId,"index-key":`list-item-${t.indexKey}-nested-${b}`,"show-tooltips":t.showTooltips,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0,onCopy:g[0]||(g[0]=C=>h.$emit("copy",C))},null,8,["nodes","custom-id","index-key","show-tooltips","typewriter","fade","is-dark"]))),128))],64)):(k(),de(p(Mr),{key:2,"show-tooltips":t.showTooltips,"index-key":`list-item-${t.indexKey}`,nodes:(y=(m=n.value)==null?void 0:m.children)!=null?y:[],"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"is-dark":t.isDark,"batch-rendering":!1,onCopy:g[1]||(g[1]=A=>h.$emit("copy",A))},null,8,["show-tooltips","index-key","nodes","custom-id","typewriter","fade","is-dark"]))],16)}}}),[["__scopeId","data-v-617214f9"]]);Ah.install=e=>{e.component(Ah.__name,Ah)};const Ch=di(Qe({__name:"ListNode",props:{node:{},customId:{},indexKey:{},typewriter:{type:Boolean},fade:{type:Boolean},showTooltips:{type:Boolean},isDark:{type:Boolean}},emits:["copy"],setup(e){const t=qs(()=>e.customId),n=L(()=>t.value.list_item||Ah);return(i,s)=>(k(),de(xs(e.node.ordered?"ol":"ul"),{class:Fe(["list-node",{"list-decimal":e.node.ordered,"list-disc":!e.node.ordered}])},{default:he(()=>[(k(!0),E(Te,null,ht(e.node.items,(o,r)=>{var l;return k(),de(xs(n.value),Un({key:`${e.indexKey||"list"}-${r}`},{ref_for:!0},{showTooltips:e.showTooltips},{node:o,"custom-id":e.customId,"index-key":`${e.indexKey||"list"}-${r}`,typewriter:e.typewriter,fade:e.fade,"is-dark":e.isDark,value:e.node.ordered?((l=e.node.start)!=null?l:1)+r:void 0,onCopy:s[0]||(s[0]=a=>i.$emit("copy",a))}),null,16,["node","custom-id","index-key","typewriter","fade","is-dark","value"])}),128))]),_:1},8,["class"]))}}),[["__scopeId","data-v-99cb95e0"]]);Ch.install=e=>{e.component(Ch.__name,Ch)};const DMe={key:2,class:"html-block-node__raw"},$Me=["innerHTML"],BMe={key:1,class:"html-block-node__placeholder"},Fp=di(Qe({__name:"HtmlBlockNode",props:{node:{},customId:{},htmlPolicy:{}},setup(e){const t=e,n=cn("markstreamHtmlPolicy",void 0),i=cn("markstreamNestedRendererProps",void 0),s=L(()=>{var T,N;return(N=(T=t.htmlPolicy)!=null?T:n?.value)!=null?N:"safe"}),o=L(()=>{var T,N;const O=(T=i?.value)!=null?T:{};return yn(_t({},O),{customId:(N=t.customId)!=null?N:O.customId,htmlPolicy:s.value})}),r=Dl({loader:()=>Promise.resolve().then(()=>T7),suspensible:!1}),l=L(()=>{const T=c2(t.node.attrs,s.value);if(!T)return;const N=Mp(T);return Object.keys(N).length>0?N:void 0}),a=L(()=>{const T=String(t.node.tag||"").trim(),N=c2(t.node.attrs,s.value,T);if(!N)return;const O=Mp(N);return Object.keys(O).length>0?O:void 0}),u=qs(()=>t.customId),c=Qe({name:"DynamicRenderer",props:{nodes:{type:Array,required:!0}},render(){return this.nodes}}),d=G(null),f=G(typeof window>"u"),h=G(t.node.content),g=L(()=>Array.isArray(t.node.children)?t.node.children:[]),m=L(()=>String(t.node.tag||"div")),y=L(()=>{var T;if(m.value.trim().toLowerCase()!=="details"||(T=t.node.attrs)!=null&&T.some(([O])=>String(O).toLowerCase()==="open"))return null;const N=g.value[0];return N?.type==="html_block"&&String(N.tag||"").toLowerCase()==="summary"?N:null}),A=L(()=>{var T;return Vd((T=y.value)==null?void 0:T.children)}),b=L(()=>{const T=y.value;if(!T)return;const N=c2(T.attrs,s.value,"summary");if(!N)return;const O=Mp(N);return Object.keys(O).length>0?O:void 0}),C=L(()=>A.value==null?g.value:g.value.slice(1)),v=L(()=>{const T=m.value.trim().toLowerCase();return zz.has(T)||d7(T,s.value)}),x=L(()=>g.value.length>0&&!!t.node.tag&&!v.value),S=L(()=>{var T,N,O;if(x.value)return{mode:"structured"};if(!f.value)return{mode:"html",content:(T=h.value)!=null?T:""};const P=(N=h.value)!=null?N:t.node.content;if(!P)return{mode:"html",content:""};if(s.value==="escape")return{mode:"html",content:bh(P,s.value)};if(t.node.loading){const q=Kv(P,u.value,s.value);return q===null?{mode:"text",content:(O=t.node.raw)!=null?O:P}:{mode:"dynamic",nodes:q}}if(!dO(P,u.value))return{mode:"html",content:bh(P,s.value)};const R=Kv(P,u.value,s.value);return R===null?{mode:"html",content:bh(P,s.value)}:{mode:"dynamic",nodes:R}}),_=k7(),I=v7(),M=y7(),$=Ul(null),D=!!t.node.loading;return typeof window<"u"?(qe([()=>d.value,()=>I?.value.heavyBlockMargin,()=>I?.value.rootMargin],([T],N,O)=>{var P,R,q,j;if((R=(P=$.value)==null?void 0:P.destroy)==null||R.call(P),$.value=null,!D)return f.value=!0,void(h.value=t.node.content);if(!T)return void(f.value=!1);let W=!0;const z=(j=(q=I?.value.heavyBlockMargin)!=null?q:I?.value.rootMargin)!=null?j:Kd,H=_(T,{rootMargin:z,allowIdle:!M.value});$.value=H,f.value=f.value||H.isVisible.value,H.whenVisible.then(()=>{W&&$.value===H&&(f.value=!0)}),O(()=>{W=!1,H.destroy(),$.value===H&&($.value=null)})},{immediate:!0}),qe(()=>t.node.content,T=>{D&&!f.value||(h.value=T)})):f.value=!0,Gn(()=>{var T,N;(N=(T=$.value)==null?void 0:T.destroy)==null||N.call(T),$.value=null}),(T,N)=>(k(),de(xs(x.value?m.value:"div"),Un({ref_key:"htmlRef",ref:d,class:"html-block-node","data-markstream-viewport-pending":p(M)&&!f.value?"true":void 0},x.value?a.value:void 0),{default:he(()=>[f.value?(k(),E(Te,{key:0},[S.value.mode==="structured"?(k(),E(Te,{key:0},[A.value!==null?(k(),E(Te,{key:0},[w("summary",$H(gN(b.value)),F(A.value),17),C.value.length?(k(),de(p(r),Un({key:0},o.value,{nodes:C.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"])):te("",!0)],64)):(k(),de(p(r),Un({key:1},o.value,{nodes:g.value,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes"]))],64)):S.value.mode==="dynamic"?(k(),de(p(c),{key:1,nodes:S.value.nodes},null,8,["nodes"])):S.value.mode==="text"?(k(),E("pre",DMe,F(S.value.content),1)):(k(),E("div",Un({key:3},l.value,{innerHTML:S.value.content}),null,16,$Me))],64)):(k(),E("div",BMe,[Rn(T.$slots,"placeholder",{node:e.node},()=>[N[0]||(N[0]=w("span",{class:"html-block-node__placeholder-bar"},null,-1)),N[1]||(N[1]=w("span",{class:"html-block-node__placeholder-bar w-4/5"},null,-1)),N[2]||(N[2]=w("span",{class:"html-block-node__placeholder-bar w-2/3"},null,-1))],!0)]))]),_:3},16,["data-markstream-viewport-pending"]))}}),[["__scopeId","data-v-e140a874"]]);Fp.install=e=>{e.component(Fp.__name,Fp)};const zMe={dir:"auto",class:"paragraph-node"},RMe=["custom-id"],Fd=di(Qe({__name:"ParagraphNode",props:{node:{},customId:{},indexKey:{},customHtmlTags:{},parseOptions:{},customMarkdownIt:{type:Function}},setup(e){const t=e,n=qs(()=>t.customId),i=cn("markstreamHtmlPolicy",void 0),s=cn("markstreamFade",void 0),o=cn("markstreamParseOptions",void 0),r=cn("markstreamCustomMarkdownIt",void 0),l=cn("markstreamNestedRendererProps",void 0),a=L(()=>{var I;return(I=i?.value)!=null?I:"safe"}),u=L(()=>{var I;return(I=t.parseOptions)!=null?I:o?.value}),c=L(()=>{var I;return(I=t.customMarkdownIt)!=null?I:r?.value}),d=L(()=>{var I,M;return(M=t.customHtmlTags)!=null?M:(I=l?.value)==null?void 0:I.customHtmlTags}),f=L(()=>{var I,M;const $=(I=l?.value)!=null?I:{};return yn(_t({},$),{customId:(M=t.customId)!=null?M:$.customId,customHtmlTags:d.value,parseOptions:u.value,customMarkdownIt:c.value,htmlPolicy:a.value})}),h=Dl({loader:()=>Promise.resolve().then(()=>T7),suspensible:!1});function g(I){var M;return I.type==="text"&&String((M=I.content)!=null?M:"").trim()===""}const m=L(()=>t.node.children.filter(I=>!g(I))),y=L(()=>m.value.length>0&&m.value.every(I=>I.type==="image"||(function(M){var $;const D=(function(T){return T.type==="link"&&Array.isArray(T.children)?T.children.filter(N=>!g(N)):[]})(M);return D.length===1&&(($=D[0])==null?void 0:$.type)==="image"})(I))),A=L(()=>new Set(sf(d.value))),b=L(()=>{if(!y.value||m.value.length<=1)return t.node.children;const I=[];for(let M=0;M<t.node.children.length;M++){const $=t.node.children[M];if(!g($)){I.push($);continue}const D=I.length>0,T=t.node.children.slice(M+1).some(N=>!g(N));D&&T&&I.push(yn(_t({},$),{content:" ",raw:" "}))}return I}),C=L(()=>s?.value===!1&&!n.value.text),v=L(()=>C.value?Vd(b.value):null);function x(I,M){return{node:I,"index-key":`${t.indexKey}-${M}`,"custom-id":t.customId,"custom-html-tags":d.value}}const S=L(()=>_t({inline_code:Uo,image:Xu,link:ar,hardbreak:ec,emphasis:ur,strong:rr,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,html_inline:Kr,html_block:Fp,emoji:xr,checkbox:qr,math_inline:Gl,checkbox_input:qr,reference:or,footnote_anchor:Np,footnote_reference:Ur,text:ks},n.value)),_=L(()=>b.value.map((I,M)=>{var $;const D=(function(T){var N,O,P,R;if(T.type==="html_block"||T.type==="html_inline"){const q=String((N=T.tag)!=null?N:"").trim().toLowerCase()||Hz(T.content);if(q&&!A.value.has(q)&&Wz((O=T.content)!=null?O:T.raw,q)){const j=String((R=(P=T.content)!=null?P:T.raw)!=null?R:"");return{child:{type:"text",content:j,raw:j},component:ks,isCustomComponent:!1}}}return{child:T,component:S.value[T.type],isCustomComponent:!!(n.value[T.type]&&!X0(String(T.type)))}})(I);return yn(_t({},D),{index:M,key:`${t.indexKey||"paragraph"}-${M}`,customAttrs:D.isCustomComponent?m7(D.child,a.value):void 0,hasSlotChildren:Array.isArray(D.child.children)&&D.child.children.length>0,slotContent:String(($=D.child.content)!=null?$:""),originalChild:I})}));return(I,M)=>(k(),E("p",zMe,[v.value!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(v.value),9,RMe)):(k(!0),E(Te,{key:1},ht(_.value,$=>{return k(),E(Te,{key:$.key},[y.value&&g($.originalChild)?(k(),E(Te,{key:0},[$e(F((D=$.originalChild,String((T=D.content)!=null?T:""))),1)],64)):$.isCustomComponent?(k(),de(xs($.component),Un({key:1,ref_for:!0},$.customAttrs,{node:$.child,loading:$.child.loading,"index-key":$.key,"custom-id":t.customId,"custom-html-tags":d.value,"is-dark":f.value.isDark}),{default:he(()=>[$.hasSlotChildren?(k(),de(p(h),Un({key:0,ref_for:!0},f.value,{nodes:$.child.children,"index-key":$.key,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):$.slotContent?(k(),de(p(h),Un({key:1,ref_for:!0},f.value,{content:$.slotContent,final:!$.child.loading,"index-key":`${$.key}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","custom-html-tags","is-dark"])):(k(),de(xs($.component),Un({key:2,ref_for:!0},x($.child,$.index)),null,16))],64);var D,T}),128))]))}}),[["__scopeId","data-v-c59ff506"]]);Fd.install=e=>{e.component(Fd.__name,Fd)};const OMe={class:"table-node-wrapper"},PMe=["aria-busy"],jMe={key:0},HMe=["custom-id"],WMe=["aria-label","onPointerdown"],qMe=["custom-id"],UMe={key:0,class:"table-node__loading",role:"status","aria-live":"polite"},Dp=di(Qe({__name:"TableNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{},showTooltips:{type:Boolean}},emits:["copy"],setup(e){const t=e,n=L(()=>{var A;return(A=t.node.loading)!=null&&A}),i=L(()=>{var A;return(A=t.node.rows)!=null?A:[]}),s=G(null),o=G([]);let r=null;const l=L(()=>t.node.header.cells.length),a=L(()=>o.value.some(A=>Number.isFinite(A)&&A>0)),u=L(()=>a.value?o.value.map(A=>A>0?{width:`${A}px`}:void 0):[]);Kn("markstreamShowTooltips",L(()=>t.showTooltips)),Kn("markstreamFade",L(()=>t.fade));const c=qs(()=>t.customId),d=L(()=>!!c.value.text),f=L(()=>!!c.value.paragraph),h=new WeakMap;function g(A){const b=t.fade===!1&&!d.value,C=!f.value,v=h.get(A);if(v?.children===A.children&&v.textFastPath===b&&v.paragraphFastPath===C)return v.info;const x=Zv(A.children,C,!0),S={simpleChildren:x,plainText:x&&b?Vd(x):null};return h.set(A,{children:A.children,textFastPath:b,paragraphFastPath:C,info:S}),S}function m(A){if(!r)return;A.preventDefault();const b=r.startWidth+r.nextStartWidth,C=Math.min(48,Math.floor(b/2)),v=Math.max(C,Math.min(b-C,Math.round(r.startWidth+A.clientX-r.startX))),x=[...r.widths];x[r.index]=v,x[r.index+1]=b-v,o.value=x}function y(){r&&(window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),r=null)}return qe(l,()=>{y(),o.value=[]}),Gn(y),(A,b)=>(k(),E("div",OMe,[w("table",{ref_key:"tableRef",ref:s,class:Fe(["table-node",{"table-node--loading":n.value}]),"aria-busy":n.value},[a.value?(k(),E("colgroup",jMe,[(k(!0),E(Te,null,ht(e.node.header.cells,(C,v)=>(k(),E("col",{key:v,style:qt(u.value[v])},null,4))),128))])):te("",!0),w("thead",null,[w("tr",null,[(k(!0),E(Te,null,ht(e.node.header.cells,(C,v)=>(k(),E("th",{key:v,dir:"auto",class:Fe([C.align==="right"?"text-right":C.align==="center"?"text-center":"text-left"])},[g(C).plainText!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(g(C).plainText),9,HMe)):g(C).simpleChildren?(k(),de(p(y0),{key:1,nodes:g(C).simpleChildren,"custom-id":t.customId,"index-key":`table-th-${t.indexKey}-${v}`},null,8,["nodes","custom-id","index-key"])):(k(),de(p(Mr),{key:2,nodes:C.children,"index-key":`table-th-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:b[0]||(b[0]=x=>A.$emit("copy",x))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"])),v<e.node.header.cells.length-1?(k(),E("button",{key:3,type:"button",class:"table-node__resize-handle","aria-label":`Resize columns ${v+1} and ${v+2}`,onPointerdown:x=>(function(S,_){if(_.button!==0)return;const I=(function(){var D;const T=(D=s.value)==null?void 0:D.querySelectorAll("thead th");return Array.from(T??[],N=>Math.round(N.getBoundingClientRect().width))})(),M=I[S],$=I[S+1];M&&$&&(_.preventDefault(),r={index:S,startX:_.clientX,startWidth:M,nextStartWidth:$,widths:I},o.value=I,window.addEventListener("pointermove",m),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y))})(v,x)},null,40,WMe)):te("",!0)],2))),128))])]),w("tbody",null,[(k(!0),E(Te,null,ht(i.value,(C,v)=>(k(),E("tr",{key:v},[(k(!0),E(Te,null,ht(C.cells,(x,S)=>(k(),E("td",{key:S,class:Fe([x.align==="right"?"text-right":x.align==="center"?"text-center":"text-left"]),dir:"auto"},[g(x).plainText!==null?(k(),E("span",{key:0,class:"text-node","custom-id":t.customId},F(g(x).plainText),9,qMe)):g(x).simpleChildren?(k(),de(p(y0),{key:1,nodes:g(x).simpleChildren,"custom-id":t.customId,"index-key":`table-td-${t.indexKey}-${v}-${S}`},null,8,["nodes","custom-id","index-key"])):(k(),de(p(Mr),{key:2,nodes:x.children,"index-key":`table-td-${t.indexKey}`,"custom-id":t.customId,typewriter:t.typewriter,fade:t.fade,"show-tooltips":t.showTooltips,onCopy:b[1]||(b[1]=_=>A.$emit("copy",_))},null,8,["nodes","index-key","custom-id","typewriter","fade","show-tooltips"]))],2))),128))]))),128))])],10,PMe),K(ls,{name:"table-node-fade"},{default:he(()=>[n.value?(k(),E("div",UMe,[Rn(A.$slots,"loading",{isLoading:n.value},()=>[b[2]||(b[2]=w("span",{class:"table-node__spinner animate-spin","aria-hidden":"true"},null,-1)),b[3]||(b[3]=w("span",{class:"sr-only"},"Loading",-1))],!0)])):te("",!0)]),_:3})]))}}),[["__scopeId","data-v-39f87b5d"]]);Dp.install=e=>{e.component(Dp.__name,Dp)};const KMe={class:"hr-node"},v2=di({},[["render",function(e,t){return k(),E("hr",KMe)}],["__scopeId","data-v-39b2349c"]]);v2.install=e=>{e.component(v2.__name,v2)};const VMe={class:"unknown-node"},E8=Qe({__name:"FallbackComponent",props:{node:{}},setup:e=>(t,n)=>(k(),E("div",VMe,F(e.node.raw),1))}),y2=di(Qe({__name:"VmrContainerNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},setup(e){const t=e,n=L(()=>`vmr-container vmr-container-${t.node.name}`),i=qs(()=>t.customId),s=L(()=>_t({text:ks,paragraph:Fd,heading:h9,inline_code:Uo,link:ar,image:Xu,strong:rr,emphasis:ur,strikethrough:lr,insert:Ir,subscript:_r,superscript:Sr,checkbox:qr,checkbox_input:qr,hardbreak:ec,math_inline:Gl,reference:or,list:Ch,math_block:yO,table:Dp},i.value));return(o,r)=>(k(),E("div",Un({class:n.value},e.node.attrs),[(k(!0),E(Te,null,ht(e.node.children,(l,a)=>{return k(),de(xs((u=l.type,s.value[u]||E8)),{key:`${e.indexKey||"vmr-container"}-${a}`,"custom-id":t.customId,node:l,"index-key":`${e.indexKey||"vmr-container"}-${a}`,typewriter:t.typewriter,fade:t.fade},null,8,["custom-id","node","index-key","typewriter","fade"]);var u}),128))],16))}}),[["__scopeId","data-v-911e41c4"]]);y2.install=e=>{e.component(y2.__name,y2)};const ZMe=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],VM=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function GMe(e){if(e<=255)return ZMe[e];let t=0,n=VM.length-1;for(;t<=n;){const i=t+n>>1,s=VM[i];if(e<s[0])n=i-1;else{if(!(e>s[1]))return s[2];t=i+1}}return"L"}const QMe=/[ \t\n\r\f]+/g,YMe=/[\t\n\r\f]| {2,}|^ | $/;let Y3=null;const JMe=new RegExp("\\p{Script=Arabic}","u"),pc=new RegExp("\\p{M}","u"),A7=new RegExp("\\p{Nd}","u");function ZM(e){return JMe.test(e)}function GM(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function ha(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){const i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){if(GM(i-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(GM(n))return!0}}return!1}const XMe=new Set([" "," ","⁠","\uFEFF"]),eEe=new Set(["-","‐","–","—"]);function kO(e,t){return!((function(n){const i=$p(n);return i!==null&&XMe.has(i)})(e)||t&&((function(n){const i=$p(n);return i!==null&&(C7.has(i)||Zd.has(i))})(e)||(function(n){const i=$p(n);return i!==null&&eEe.has(i)})(e)))}const C7=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),p9=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),w7=new Set(["'","’"]),Zd=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),tEe=new Set([":",".","،","؛"]),nEe=new Set(["၏"]),iEe=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function sEe(e){if(x7(e))return!0;let t=!1;for(const n of e)if(Zd.has(n)||Qv(n))t=!0;else if(!t||!pc.test(n))return!1;return t}function oEe(e){for(const t of e)if(!C7.has(t)&&!Zd.has(t))return!1;return e.length>0}function rEe(e){if(x7(e))return!0;for(const t of e)if(!(p9.has(t)||w7.has(t)||pc.test(t)||Qv(t)))return!1;return e.length>0}function x7(e){let t=!1;for(const n of e)if(n!=="\\"&&!pc.test(n)){if(!(p9.has(n)||Zd.has(n)||w7.has(n)))return!1;t=!0}return t}function Gv(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const i=e.charCodeAt(n);if(i<56320||i>57343)return n;const s=n-1;if(s<0)return n;const o=e.charCodeAt(s);return o>=55296&&o<=56319?s:n}function $p(e){if(e.length===0)return null;const t=Gv(e,e.length);return e.slice(t)}const lEe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function Qv(e){const t=e.codePointAt(0);return t!==void 0&&(function(n,i){for(let s=0;s<i.length;s+=2)if(n>=i[s]&&n<=i[s+1])return!0;return!1})(t,lEe)}function aEe(e){const t=(function(n){for(const i of n)if(!pc.test(i))return i;return null})(e);return t!==null&&A7.test(t)}function uEe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const i=t[n-1];if(pc.test(i))n--;else{if(!p9.has(i)&&!w7.has(i))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function cEe(e,t,n){return n!=="text"||t||e.length!==1||e==="-"||e==="—"?null:e}function QM(e,t,n,i){const s=t[i],o=e[i];if(s==null)return o;const r=n[i];if(o.length===r)return o;const l=s.repeat(r);return e[i]=l,l}function YM(e,t){return e&&t!==null&&tEe.has(t)}function dEe(e){const t=$p(e);return t!==null&&nEe.has(t)}function fEe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return new RegExp("^\\p{M}+$","u").test(t)?{space:" ",marks:t}:null}function T8(e){let t=e.length;for(;t>0;){const n=Gv(e,t),i=e.slice(n,t);if(iEe.has(i))return!0;if(!Zd.has(i))return!1;t=n}return!1}function hEe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` +`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const pEe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function _l(e){return e.length===1?e[0]:e.join("")}function gEe(e,t){const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),_l(n)}function mEe(e,t,n,i){if(!pEe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let o=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=hEe(c,i),f=d==="text"&&t;o===null||d!==o||f!==a?(o!==null&&s.push({text:_l(r),isWordLike:a,kind:o,start:l}),o=d,r=[c],l=n+u,a=f,u+=c.length):(r.push(c),u+=c.length)}return o!==null&&s.push({text:_l(r),isWordLike:a,kind:o,start:l}),s}function J3(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const vEe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function yEe(e,t){const n=e.texts[t];return!!n.startsWith("www.")||vEe.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function kEe(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}const bEe=new Set([":","-","/","×",",",".","+","–","—"]),AEe=/[\p{P}\p{S}\p{Co}]/u,CEe=new RegExp("\\p{Emoji_Presentation}","u"),wEe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function bO(e){const t=e.charCodeAt(0);return t<128?(function(n){return n>=33&&n<=47&&n!==45||n>=58&&n<=64&&n!==63||n>=91&&n<=96||n>=123&&n<=126})(t):!wEe.has(e)&&!CEe.test(e)&&AEe.test(e)}function JM(e){let t=!1;for(const n of e)if(!pc.test(n)){if(!bO(n))return!1;t=!0}return t}function xEe(e,t,n,i){const s=!t&&JM(e),o=!i&&JM(n),r=(function(a){const u=(function(c){for(let d=c.length;d>0;){const f=Gv(c,d),h=c.slice(f,d);if(!pc.test(h))return h;d=f}return null})(a);return u!==null&&Qv(u)})(e),l=(t||r)&&(function(a){for(let u=a.length;u>0;){const c=Gv(a,u),d=a.slice(c,u);if(!pc.test(d))return bO(d)||Qv(d);u=c}return!1})(e);return!!(s||o||l)&&!ha(e)&&!ha(n)&&(t||s||r)&&(i||o)}function XM(e){for(const t of e)if(A7.test(t))return!0;return!1}function k2(e){if(e.length===0)return!1;for(const t of e)if(!A7.test(t)&&!bEe.has(t))return!1;return!0}function SEe(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let i=0;for(let s=0;s<e.len;s++)e.kinds[s]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:s,consumedEndSegmentIndex:s+1}),i=s+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function _Ee(e,t,n="normal",i="normal"){const s=(function(a){const u=a??"normal";return u==="pre-wrap"?{mode:u,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:u,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}})(n),o=s.mode==="pre-wrap"?(function(a){return/[\r\f]/.test(a)?a.replace(/\r\n/g,` +`).replace(/[\r\f]/g,` +`):a})(e):(function(a){if(!YMe.test(a))return a;let u=a.replace(QMe," ");return u.charCodeAt(0)===32&&(u=u.slice(1)),u.length>0&&u.charCodeAt(u.length-1)===32&&(u=u.slice(0,-1)),u})(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=(function(a,u,c){var d,f,h;const g=(Y3===null&&(Y3=new Intl.Segmenter(void 0,{granularity:"word"})),Y3);let m=0;const y=[],A=[],b=[],C=[],v=[],x=[],S=[],_=[],I=[],M=[],$=[],D=[];for(const R of g.segment(a))for(const q of mEe(R.segment,(d=R.isWordLike)!=null&&d,R.index,c)){let j=function(){x[Z]!==null&&(A[Z]=[QM(y,x,S,Z)],x[Z]=null),A[Z].push(q.text),b[Z]=b[Z]||q.isWordLike,_[Z]=_[Z]||H,I[Z]=I[Z]||ee,M[Z]=ie,$[Z]=se,D[Z]=YM(I[Z],V)};const W=q.kind==="text",z=cEe(q.text,q.isWordLike,q.kind),H=ha(q.text),ee=ZM(q.text),V=$p(q.text),ie=T8(q.text),se=dEe(q.text),Z=m-1;u.carryCJKAfterClosingQuote&&W&&m>0&&C[Z]==="text"&&H&&_[Z]&&M[Z]||W&&m>0&&C[Z]==="text"&&oEe(q.text)&&_[Z]||W&&m>0&&C[Z]==="text"&&$[Z]?j():W&&m>0&&C[Z]==="text"&&q.isWordLike&&ee&&D[Z]?(j(),b[Z]=!0):z!==null&&m>0&&C[Z]==="text"&&x[Z]===z?S[Z]=((f=S[Z])!=null?f:1)+1:W&&!q.isWordLike&&m>0&&C[Z]==="text"&&!_[Z]&&(sEe(q.text)||q.text==="-"&&b[Z])?j():(y[m]=q.text,A[m]=[q.text],b[m]=q.isWordLike,C[m]=q.kind,v[m]=q.start,x[m]=z,S[m]=z===null?0:1,_[m]=H,I[m]=ee,M[m]=ie,$[m]=se,D[m]=YM(ee,V),m++)}for(let R=0;R<m;R++)x[R]===null?y[R]=_l(A[R]):y[R]=QM(y,x,S,R);for(let R=1;R<m;R++)C[R]!=="text"||b[R]||!x7(y[R])||C[R-1]!=="text"||_[R-1]||(y[R-1]+=y[R],b[R-1]=b[R-1]||b[R],y[R]="");const T=Array.from({length:m},()=>null);let N=-1;for(let R=m-1;R>=0;R--){const q=y[R];if(q.length!==0){if(C[R]==="text"&&!b[R]&&N>=0&&C[N]==="text"&&(rEe(q)||q==="-"&&aEe(y[N]))){const j=(h=T[N])!=null?h:[];j.push(q),T[N]=j,v[N]=v[R],y[R]="";continue}N=R}}for(let R=0;R<m;R++){const q=T[R];q!=null&&(y[R]=gEe(q,y[R]))}let O=0;for(let R=0;R<m;R++){const q=y[R];q.length!==0&&(O!==R&&(y[O]=q,b[O]=b[R],C[O]=C[R],v[O]=v[R]),O++)}y.length=O,b.length=O,C.length=O,v.length=O;const P=(function(R){const q=R.texts.slice(),j=R.isWordLike.slice(),W=R.kinds.slice(),z=R.starts.slice();for(let H=0;H<q.length-1;H++){if(W[H]!=="text"||W[H+1]!=="text"||!ha(q[H])||!ha(q[H+1]))continue;const ee=uEe(q[H]);ee!==null&&(q[H]=ee.head,q[H+1]=ee.tail+q[H+1],z[H+1]=z[H]+ee.head.length)}return{len:q.length,texts:q,isWordLike:j,kinds:W,starts:z}})((function(R){const q=[],j=[],W=[],z=[];let H=0;for(;H<R.len;){const ee=R.texts[H],V=R.kinds[H],ie=R.isWordLike[H];if(V==="text"){const se=[ee];let Z=H+1,pe=ie;for(;Z<R.len&&R.kinds[Z]==="text"&&xEe(R.texts[Z-1],R.isWordLike[Z-1],R.texts[Z],R.isWordLike[Z]);){const re=R.texts[Z];se.push(re),pe=pe||R.isWordLike[Z],Z++}if(Z>H+1){q.push(_l(se)),j.push(pe),W.push("text"),z.push(R.starts[H]),H=Z;continue}}q.push(ee),j.push(ie),W.push(V),z.push(R.starts[H]),H++}return{len:q.length,texts:q,isWordLike:j,kinds:W,starts:z}})((function(R){const q=[],j=[],W=[],z=[];for(let H=0;H<R.len;H++){const ee=R.texts[H];if(R.kinds[H]==="text"&&ee.includes("-")){const V=ee.split("-");let ie=V.length>1;for(let se=0;se<V.length;se++){const Z=V[se];if(!ie)break;Z.length!==0&&XM(Z)&&k2(Z)||(ie=!1)}if(ie){let se=0;for(let Z=0;Z<V.length;Z++){const pe=V[Z],re=Z<V.length-1?`${pe}-`:pe;q.push(re),j.push(!0),W.push("text"),z.push(R.starts[H]+se),se+=re.length}continue}}q.push(ee),j.push(R.isWordLike[H]),W.push(R.kinds[H]),z.push(R.starts[H])}return{len:q.length,texts:q,isWordLike:j,kinds:W,starts:z}})((function(R){const q=[],j=[],W=[],z=[];for(let H=0;H<R.len;H++){const ee=R.texts[H],V=R.kinds[H];if(V==="text"&&k2(ee)&&XM(ee)){const ie=[ee];let se=H+1;for(;se<R.len&&R.kinds[se]==="text"&&k2(R.texts[se]);)ie.push(R.texts[se]),se++;q.push(_l(ie)),j.push(!0),W.push("text"),z.push(R.starts[H]),H=se-1;continue}q.push(ee),j.push(R.isWordLike[H]),W.push(V),z.push(R.starts[H])}return{len:q.length,texts:q,isWordLike:j,kinds:W,starts:z}})((function(R){const q=[],j=[],W=[],z=[];for(let H=0;H<R.len;H++){const ee=R.texts[H];if(q.push(ee),j.push(R.isWordLike[H]),W.push(R.kinds[H]),z.push(R.starts[H]),!kEe(ee))continue;const V=H+1;if(V>=R.len||J3(R.kinds[V]))continue;const ie=[],se=R.starts[V];let Z=V;for(;Z<R.len&&!J3(R.kinds[Z]);)ie.push(R.texts[Z]),Z++;ie.length>0&&(q.push(_l(ie)),j.push(!0),W.push("text"),z.push(se),H=Z-1)}return{len:q.length,texts:q,isWordLike:j,kinds:W,starts:z}})((function(R){const q=R.texts.slice(),j=R.isWordLike.slice(),W=R.kinds.slice(),z=R.starts.slice();for(let ee=0;ee<R.len;ee++){if(W[ee]!=="text"||!yEe(R,ee))continue;const V=[q[ee]];let ie=ee+1;for(;ie<R.len&&!J3(W[ie]);){V.push(q[ie]),j[ee]=!0;const se=q[ie].includes("?");if(W[ie]="text",q[ie]="",ie++,se)break}q[ee]=_l(V)}let H=0;for(let ee=0;ee<q.length;ee++){const V=q[ee];V.length!==0&&(H!==ee&&(q[H]=V,j[H]=j[ee],W[H]=W[ee],z[H]=z[ee]),H++)}return q.length=H,j.length=H,W.length=H,z.length=H,{len:H,texts:q,isWordLike:j,kinds:W,starts:z}})((function(R){const q=[],j=[],W=[],z=[];let H=0;for(;H<R.len;){const ee=[R.texts[H]];let V=R.isWordLike[H],ie=R.kinds[H],se=R.starts[H];if(ie==="glue"){const Z=[ee[0]],pe=se;for(H++;H<R.len&&R.kinds[H]==="glue";)Z.push(R.texts[H]),H++;const re=_l(Z);if(!(H<R.len&&R.kinds[H]==="text")){q.push(re),j.push(!1),W.push("glue"),z.push(pe);continue}ee[0]=re,ee.push(R.texts[H]),V=R.isWordLike[H],ie="text",se=pe,H++}else H++;if(ie==="text")for(;H<R.len&&R.kinds[H]==="glue";){const Z=[];for(;H<R.len&&R.kinds[H]==="glue";)Z.push(R.texts[H]),H++;const pe=_l(Z);H<R.len&&R.kinds[H]==="text"?(ee.push(pe,R.texts[H]),V=V||R.isWordLike[H],H++):ee.push(pe)}q.push(_l(ee)),j.push(V),W.push(ie),z.push(se)}return{len:q.length,texts:q,isWordLike:j,kinds:W,starts:z}})({len:O,texts:y,isWordLike:b,kinds:C,starts:v})))))));for(let R=0;R<P.len-1;R++){const q=fEe(P.texts[R]);q!==null&&(P.kinds[R]!=="space"&&P.kinds[R]!=="preserved-space"||P.kinds[R+1]!=="text"||!ZM(P.texts[R+1])||(P.texts[R]=q.space,P.isWordLike[R]=!1,P.kinds[R]=P.kinds[R]==="preserved-space"?"preserved-space":"space",P.texts[R+1]=q.marks+P.texts[R+1],P.starts[R+1]=P.starts[R]+q.space.length))}return P})(o,t,s),l=i==="keep-all"?(function(a,u,c){if(u.len<=1)return u;const d=[],f=[],h=[],g=[];let m=-1,y=!1;function A(C){d.push(u.texts[C]),f.push(u.isWordLike[C]),h.push("text"),g.push(u.starts[C])}function b(C){if(!(m<0)){if(y)m+1===C?A(m):(function(v,x){let S=!1;for(let M=v;M<x;M++)S=S||u.isWordLike[M];const _=u.starts[v],I=x<u.len?u.starts[x]:a.length;d.push(a.slice(_,I)),f.push(S),h.push("text"),g.push(_)})(m,C);else for(let v=m;v<C;v++)A(v);m=-1,y=!1}}for(let C=0;C<u.len;C++){const v=u.texts[C],x=u.kinds[C];x!=="text"?(b(C),d.push(v),f.push(u.isWordLike[C]),h.push(x),g.push(u.starts[C])):(m>=0&&!kO(u.texts[C-1],c)&&b(C),m<0&&(m=C),y=y||ha(v))}return b(u.len),{len:d.length,texts:d,isWordLike:f,kinds:h,starts:g}})(o,r,t.breakKeepAllAfterPunctuation):r;return _t({normalized:o,chunks:SEe(l,s)},l)}let Nf=null;const eE=new Map;let Ff=null;const IEe=new RegExp("\\p{Emoji_Presentation}","u"),MEe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let X3=null;const tE=new Map;function L8(){if(Nf!==null)return Nf;if(typeof OffscreenCanvas<"u")return Nf=new OffscreenCanvas(1,1).getContext("2d"),Nf;if(typeof document<"u")return Nf=document.createElement("canvas").getContext("2d"),Nf;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function _u(e,t){let n=t.get(e);return n===void 0&&(n={width:L8().measureText(e).width,containsCJK:ha(e)},t.set(e,n)),n}function Yv(){if(Ff!==null)return Ff;if(typeof navigator>"u")return Ff={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Ff;const e=navigator.userAgent,t=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Ff={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},Ff}function AO(){return X3===null&&(X3=new Intl.Segmenter(void 0,{granularity:"grapheme"})),X3}function EEe(e){return IEe.test(e)||e.includes("️")}function id(e,t,n){return n===0?t.width:t.width-(function(i,s){return s.emojiCount===void 0&&(s.emojiCount=(function(o){let r=0;const l=AO();for(const a of l.segment(o))EEe(a.segment)&&r++;return r})(i)),s.emojiCount})(e,t)*n}function TEe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function nE(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function iE(e,t,n=e.widths.length){for(;t<n&&TEe(e.kinds[t]);)t++;return t}function LEe(e,t){if(t<=0)return 0;const n=e%t;return Math.abs(n)<=1e-6?t:t-n}function NEe(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function S7(e,t){return t===0?0:e+t}function FEe(e,t,n,i,s){return S7(i,t==="tab"?s+(function(o,r){return o.letterSpacing!==0&&o.spacingGraphemeCounts[r]>0?o.letterSpacing:0})(e,n):e.lineEndFitAdvances[n])}function sE(e,t,n,i){return S7(i,t==="tab"?0:e.lineEndFitAdvances[n])}function oE(e,t,n,i,s){return S7(i,t==="tab"?s:e.lineEndPaintAdvances[n])}function DEe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function $Ee(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function Em(e,t,n){let i=t;for(;i<e.length&&e[i]<n;)i++;return i}function BEe(e,t){return(function(n,i){if(n.simpleLineWalkFastPath)return(function(T,N){const{widths:O,kinds:P,breakableFitAdvances:R,breakablePreferredBreaks:q}=T;if(O.length===0)return 0;const j=N+Yv().lineFitEpsilon;let W=0,z=0,H=!1,ee=0,V=0,ie=-1,se=0;function Z(we=ee,Y=V,le=z){W++,z=0,H=!1,ie=-1,se=0}function pe(we,Y){H=!0,ee=we+1,V=0,z=Y}function re(we,Y,le){H=!0,ee=we,V=Y+1,z=le}function fe(we,Y){H?(z+=Y,ee=we+1,V=0):pe(we,Y)}function Ee(we,Y){var le;const Ce=R[we],ae=(le=q[we])!=null?le:null;let oe=ae===null?-1:Em(ae,0,Y+1),Q=-1,ne=0,ge=Y;for(;ge<Ce.length;){const Ae=Ce[ge];if(H)if(z+Ae>j){if(ae!==null&&Q>Y){Z(we,Q,ne),ge=Q,oe=Em(ae,oe,ge+1),Q=-1,ne=0;continue}Z(),re(we,ge,Ae)}else z+=Ae,ee=we,V=ge+1;else re(we,ge,Ae);const _e=ge+1;ae!==null&&ae[oe]===_e&&(Q=_e,ne=z,oe++),ge++}H&&ee===we&&V===Ce.length&&(ee=we+1,V=0)}let X=0;for(;X<O.length&&(H||(X=iE(T,X),!(X>=O.length)));){const we=O[X],Y=nE(P[X]);if(H)if(z+we>j){if(Y){fe(X,we),Z(X+1,0,z-we),X++;continue}if(ie>=0){if(ee>ie||ee===ie&&V>0){Z();continue}Z(ie,0,se);continue}if(we>j&&R[X]!==null){Z(),Ee(X,0),X++;continue}Z()}else fe(X,we),Y&&(ie=X+1,se=z-we),X++;else we>j&&R[X]!==null?Ee(X,0):pe(X,we),Y&&(ie=X+1,se=z-we),X++}return H&&Z(),W})(n,i);const{widths:s,kinds:o,breakableFitAdvances:r,breakablePreferredBreaks:l,discretionaryHyphenWidth:a,chunks:u}=n;if(s.length===0||u.length===0)return 0;const c=Yv(),d=i+c.lineFitEpsilon;let f=0,h=0,g=!1,m=0,y=0,A=-1,b=0,C=null;function v(){A=-1,b=0,C=null}function x(T=m,N=y,O){f++,h=0,g=!1,v()}function S(T,N){g=!0,m=T+1,y=0,h=N}function _(T,N,O){g=!0,m=T,y=N+1,h=O}function I(T,N){g?(h+=N,m=T+1,y=0):S(T,N)}function M(T,N,O,P,R,q){if(!N)return;const j=sE(n,T,O,R);oE(n,T,O,R,P),A=O+1,b=h-q+j,C=T}function $(T,N){var O;const P=r[T],R=(O=l[T])!=null?O:null;let q=R===null?-1:Em(R,0,N+1),j=-1,W=N;for(;W<P.length;){const z=P[W];if(g){const ee=DEe(n,!0,z),V=h+ee;if($Ee(n,V)>d){if(R!==null&&j>N){x(T,j),W=j,q=Em(R,q,W+1),j=-1;continue}x(),_(T,W,z)}else h=V,m=T,y=W+1}else _(T,W,z);const H=W+1;R!==null&&R[q]===H&&(j=H,q++),W++}g&&m===T&&y===P.length&&(m=T+1,y=0)}function D(T){f++,v()}for(let T=0;T<u.length;T++){const N=u[T];if(N.startSegmentIndex===N.endSegmentIndex){D();continue}g=!1,h=0,N.startSegmentIndex,m=N.startSegmentIndex,y=0,v();let O=N.startSegmentIndex;for(;O<N.endSegmentIndex&&(g||(O=iE(n,O,N.endSegmentIndex),!(O>=N.endSegmentIndex)));){const P=o[O],R=nE(P),q=NEe(n,g,O),j=P==="tab"?LEe(h+q,n.tabStopAdvance):s[O],W=q+j,z=FEe(n,P,O,q,j);if(P!=="soft-hyphen")if(g){if(h+z>d){const H=h+sE(n,P,O,q);if(oE(n,P,O,q,j),C==="soft-hyphen"&&c.preferEarlySoftHyphenBreak&&b<=d){x(A,0);continue}if(R&&H<=d){I(O,W),x(O+1,0),O++;continue}if(A>=0&&b<=d){if(m>A||m===A&&y>0){x();continue}const ee=A;x(ee,0),O=ee;continue}if(z>d&&r[O]!==null){x(),$(O,0),O++;continue}x();continue}I(O,W),M(P,R,O,j,q,W),O++}else z>d&&r[O]!==null?$(O,0):S(O,j),M(P,R,O,j,q,W),O++;else g&&(m=O+1,y=0,A=O+1,b=h+a,C=P),O++}g&&(N.consumedEndSegmentIndex,x(N.consumedEndSegmentIndex,0))}return f})(e,t)}let ek=null;function _7(){return ek===null&&(ek=new Intl.Segmenter(void 0,{granularity:"grapheme"})),ek}function zEe(e,t){const n=[];let i=[],s=0,o=!1,r=!1,l=!1;function a(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:s}),i=[],o=!1,r=!1,l=!1)}function u(d,f,h){i=[d],s=f,o=h,r=T8(d),l=p9.has(d)}function c(d,f){i.push(d),o=o||f;const h=T8(d);r=d.length===1&&Zd.has(d)&&r||h,l=!1}for(const d of _7().segment(e)){const f=d.segment,h=ha(f);i.length!==0?l||C7.has(f)||Zd.has(f)||t.carryCJKAfterClosingQuote&&h&&r?c(f,h):o||h?(a(),u(f,d.index,h)):c(f,h):u(f,d.index,h)}return a(),n}function REe(e,t,n){if(t.length<=1)return t;const i=[];let s=-1,o=!1;function r(l){if(!(s<0)){if(o)s+1===l?i.push(t[s]):(function(a,u){const c=t[a].start,d=u<t.length?t[u].start:e.length;i.push({text:e.slice(c,d),start:c})})(s,l);else for(let a=s;a<l;a++)i.push(t[a]);s=-1,o=!1}}for(let l=0;l<t.length;l++){const a=t[l];s>=0&&!kO(t[l-1].text,n)&&r(l),s<0&&(s=l),o=o||ha(a.text)}return r(t.length),i}function rE(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const i=_7();for(const s of i.segment(e))n++;return n}function OEe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function PEe(e,t,n,i,s){const o=Yv(),{cache:r,emojiCorrection:l}=(function(D,T){L8().font=D;const N=(function(R){let q=eE.get(R);return q||(q=new Map,eE.set(R,q)),q})(D),O=(function(R){const q=R.match(/(\d+(?:\.\d+)?)\s*px/);return q?parseFloat(q[1]):16})(D),P=T?(function(R,q){let j=tE.get(R);if(j!==void 0)return j;const W=L8();W.font=R;const z=W.measureText("😀").width;if(j=0,z>q+.5&&typeof document<"u"&&document.body!==null){const H=document.createElement("span");H.style.font=R,H.style.display="inline-block",H.style.visibility="hidden",H.style.position="absolute",H.textContent="😀",document.body.appendChild(H);const ee=H.getBoundingClientRect().width;document.body.removeChild(H),z-ee>.5&&(j=z-ee)}return tE.set(R,j),j})(D,O):0;return{cache:N,fontSize:O,emojiCorrection:P}})(t,(a=e.normalized,MEe.test(a)));var a;const u=id("-",_u("-",r),l)+(s===0?0:2*s),c=8*id(" ",_u(" ",r),l),d=s!==0;if(e.len===0)return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]};const f=[],h=[],g=[],m=[];let y=e.chunks.length<=1&&!d;const A=null,b=[],C=[],v=[],x=null,S=Array.from({length:e.len});function _(D,T,N,O,P,R,q,j,W){P!=="text"&&P!=="space"&&P!=="zero-width-break"&&(y=!1),f.push(T),h.push(N),g.push(O),m.push(P),b.push(q),C.push(j),d&&v.push(W)}function I(D,T,N,O,P){const R=_u(D,r),q=d?rE(D,T):0,j=(function(ee,V,ie){return V>1?ee+(V-1)*ie:ee})(id(D,R,l),q,s),W=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:j,z=W===0?0:W+(q>0?s:0),H=T==="space"||T==="zero-width-break"?0:j;if(P&&O&&D.length>1){let ee="sum-graphemes";s!==0?ee="segment-prefixes":k2(D)?ee="pair-context":o.preferPrefixWidthsForBreakableRuns&&(ee="segment-prefixes");const V=(function(se,Z,pe,re,fe){if(Z.breakableFitAdvances!==void 0&&Z.breakableFitMode===fe)return Z.breakableFitAdvances;Z.breakableFitMode=fe;const Ee=AO(),X=[];for(const Ce of Ee.segment(se))X.push(Ce.segment);if(X.length<=1)return Z.breakableFitAdvances=null,Z.breakableFitAdvances;if(fe==="sum-graphemes"){const Ce=[];for(const ae of X){const oe=_u(ae,pe);Ce.push(id(ae,oe,re))}return Z.breakableFitAdvances=Ce,Z.breakableFitAdvances}if(fe==="pair-context"||X.length>96){const Ce=[];let ae=null,oe=0;for(const Q of X){const ne=id(Q,_u(Q,pe),re);if(ae===null)Ce.push(ne);else{const ge=ae+Q,Ae=_u(ge,pe);Ce.push(id(ge,Ae,re)-oe)}ae=Q,oe=ne}return Z.breakableFitAdvances=Ce,Z.breakableFitAdvances}const we=[];let Y="",le=0;for(const Ce of X){Y+=Ce;const ae=id(Y,_u(Y,pe),re);we.push(ae-le),le=ae}return Z.breakableFitAdvances=we,Z.breakableFitAdvances})(D,R,r,l,ee),ie=V===null||i==="keep-all"?null:(function(se){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(se))return null;const Z=[];let pe=0;for(const re of _7().segment(se))pe++,OEe(re.segment)&&Z.push(pe);return Z.length===0?null:Z})(D);return void _(D,j,z,H,T,N,V,ie,q)}_(D,j,z,H,T,N,null,null,q)}for(let D=0;D<e.len;D++){S[D]=f.length;const T=e.texts[D],N=e.isWordLike[D],O=e.kinds[D],P=e.starts[D];if(O==="soft-hyphen"){_(T,0,u,u,O,P,null,null,0);continue}if(O==="hard-break"){_(T,0,0,0,O,P,null,null,0);continue}if(O==="tab"){_(T,0,0,0,O,P,null,null,d?rE(T,O):0);continue}const R=_u(T,r);if(O==="text"&&R.containsCJK){const q=zEe(T,o),j=i==="keep-all"?REe(T,q,o.breakKeepAllAfterPunctuation):q;for(let W=0;W<j.length;W++){const z=j[W];I(z.text,"text",P+z.start,N,i==="keep-all"||!ha(z.text))}continue}I(T,O,P,N,!0)}const M=(function(D,T,N){const O=[];for(let P=0;P<D.length;P++){const R=D[P],q=R.startSegmentIndex<T.length?T[R.startSegmentIndex]:N,j=R.endSegmentIndex<T.length?T[R.endSegmentIndex]:N,W=R.consumedEndSegmentIndex<T.length?T[R.consumedEndSegmentIndex]:N;O.push({startSegmentIndex:q,endSegmentIndex:j,consumedEndSegmentIndex:W})}return O})(e.chunks,S,f.length),$=A===null?null:(function(D,T){const N=(function(P){const R=P.length;if(R===0)return null;const q=new Array(R);let j=!1;for(let ie=0;ie<R;){const se=P.charCodeAt(ie);let Z=se,pe=1;if(se>=55296&&se<=56319&&ie+1<R){const fe=P.charCodeAt(ie+1);fe>=56320&&fe<=57343&&(Z=fe-56320+(se-55296<<10)+65536,pe=2)}const re=GMe(Z);re!=="R"&&re!=="AL"&&re!=="AN"||(j=!0);for(let fe=0;fe<pe;fe++)q[ie+fe]=re;ie+=pe}if(!j)return null;let W=0;for(let ie=0;ie<R;ie++){const se=q[ie];if(se==="L"){W=0;break}if(se==="R"||se==="AL"){W=1;break}}const z=new Int8Array(R);for(let ie=0;ie<R;ie++)z[ie]=W;const H=1&W?"R":"L",ee=H;let V=ee;for(let ie=0;ie<R;ie++)q[ie]==="NSM"?q[ie]=V:V=q[ie];V=ee;for(let ie=0;ie<R;ie++){const se=q[ie];se==="EN"?q[ie]=V==="AL"?"AN":"EN":se!=="R"&&se!=="L"&&se!=="AL"||(V=se)}for(let ie=0;ie<R;ie++)q[ie]==="AL"&&(q[ie]="R");for(let ie=1;ie<R-1;ie++)q[ie]==="ES"&&q[ie-1]==="EN"&&q[ie+1]==="EN"&&(q[ie]="EN"),q[ie]!=="CS"||q[ie-1]!=="EN"&&q[ie-1]!=="AN"||q[ie+1]!==q[ie-1]||(q[ie]=q[ie-1]);for(let ie=0;ie<R;ie++){if(q[ie]!=="EN")continue;let se;for(se=ie-1;se>=0&&q[se]==="ET";se--)q[se]="EN";for(se=ie+1;se<R&&q[se]==="ET";se++)q[se]="EN"}for(let ie=0;ie<R;ie++){const se=q[ie];se!=="WS"&&se!=="ES"&&se!=="ET"&&se!=="CS"||(q[ie]="ON")}V=ee;for(let ie=0;ie<R;ie++){const se=q[ie];se==="EN"?q[ie]=V==="L"?"L":"EN":se!=="R"&&se!=="L"||(V=se)}for(let ie=0;ie<R;ie++){if(q[ie]!=="ON")continue;let se=ie+1;for(;se<R&&q[se]==="ON";)se++;const Z=(ie>0?q[ie-1]:ee)!=="L"?"R":"L";if(Z===((se<R?q[se]:ee)!=="L"?"R":"L"))for(let pe=ie;pe<se;pe++)q[pe]=Z;ie=se-1}for(let ie=0;ie<R;ie++)q[ie]==="ON"&&(q[ie]=H);for(let ie=0;ie<R;ie++){const se=q[ie];1&z[ie]?se!=="L"&&se!=="AN"&&se!=="EN"||z[ie]++:se==="R"?z[ie]++:se!=="AN"&&se!=="EN"||(z[ie]+=2)}return z})(D);if(N===null)return null;const O=new Int8Array(T.length);for(let P=0;P<T.length;P++)O[P]=N[T[P]];return O})(e.normalized,A);return x!==null?{widths:f,lineEndFitAdvances:h,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:$,breakableFitAdvances:b,breakablePreferredBreaks:C,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:u,tabStopAdvance:c,chunks:M,segments:x}:{widths:f,lineEndFitAdvances:h,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:$,breakableFitAdvances:b,breakablePreferredBreaks:C,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:u,tabStopAdvance:c,chunks:M}}const tk="__MARKSTREAM_VUE_HEIGHT_ESTIMATION_EXPERIMENT__",jEe=["diff ","index ","--- ","+++ ","@@ "],Vs=(()=>{const e=globalThis;if(e[tk])return e[tk];const t={configs:{},controllers:{},revision:Ul(0),preparedCache:new Map,blockEstimateCache:new Map};return e[tk]=t,t})();let T1=null;const nk=Vs.revision;function lE(e){var t;return e&&(t=Vs.configs[e])!=null?t:null}function aE(e,t){const n=Number.parseFloat(String(e??""));return Number.isFinite(n)&&n>0?n:t}function HEe(e){return e?.type==="text"||e?.type==="emoji"||e?.type==="hardbreak"}function ik(e){var t,n,i;if(!Array.isArray(e)||e.length===0)return null;let s="";for(const o of e){if(!HEe(o))return null;o.type==="text"?s+=String((t=o.content)!=null?t:""):o.type==="emoji"?s+=String((i=(n=o.name)!=null?n:o.raw)!=null?i:""):o.type==="hardbreak"&&(s+=` +`)}return s.length>0?s:null}function sk(e,t,n){var i,s;if(!e||!Number.isFinite(t)||t<=0||!(function(){var o;if(T1!=null)return T1;if(typeof document>"u")return!1;try{const r=document.createElement("canvas");return T1=!!((o=r.getContext)!=null&&o.call(r,"2d")),T1}catch{return T1=!1,!1}})())return null;try{const o=Math.round(100*t)/100,r=[(i=n.whiteSpace)!=null?i:"pre-wrap",n.font,n.lineHeight,n.wrapperOverhead,n.widthAdjustment,o,e].join("\0"),l=Vs.blockEstimateCache.get(r);if(l)return Vs.blockEstimateCache.delete(r),Vs.blockEstimateCache.set(r,l),{kind:"simple-text",height:l.height,contentHeight:l.contentHeight};const a=(s=n.whiteSpace)!=null?s:"pre-wrap",u=(function(h,g,m){const y=`${m}\0${g}\0${h}`,A=Vs.preparedCache.get(y);if(A)return Vs.preparedCache.delete(y),Vs.preparedCache.set(y,A),A.prepared;const b=(function(C,v,x){return(function(S,_,I,M){var $,D;const T=($=M?.wordBreak)!=null?$:"normal",N=(D=M?.letterSpacing)!=null?D:0;return PEe(_Ee(S,Yv(),M?.whiteSpace,T),_,!1,T,N)})(C,v,0,x)})(h,g,{whiteSpace:m});for(Vs.preparedCache.set(y,{prepared:b});Vs.preparedCache.size>240;){const C=Vs.preparedCache.keys().next().value;if(!C)break;Vs.preparedCache.delete(C)}return b})(e,n.font,a),c=(function(h,g,m){const y=BEe(h,g);return{lineCount:y,height:y*m}})(u,Math.max(24,o-n.widthAdjustment),n.lineHeight),d=Math.max(n.lineHeight,c.height),f=Math.max(n.lineHeight,Math.round(d+n.wrapperOverhead));for(Vs.blockEstimateCache.set(r,{height:f,contentHeight:Math.round(d)});Vs.blockEstimateCache.size>4e3;){const h=Vs.blockEstimateCache.keys().next().value;if(!h)break;Vs.blockEstimateCache.delete(h)}return{kind:"simple-text",height:f,contentHeight:Math.round(d)}}catch{return null}}function CO(e,t,n){var i,s;if(!n||!e||!Number.isFinite(t)||t<=0)return null;if(e.type==="paragraph"){const o=ik(e.children);return o&&n.paragraph?sk(o,t,n.paragraph):null}if(e.type==="heading"){const o=Number(e.level||0),r=ik(e.children),l=n.headings[o];return r&&l?sk(r,t,l):null}if(e.type==="list_item"){const o=Array.isArray(e.children)?e.children:[];if(o.length!==1||((i=o[0])==null?void 0:i.type)!=="paragraph"||!n.listItem)return null;const r=ik((s=o[0])==null?void 0:s.children);return r?sk(r,t,n.listItem):null}if(e.type==="list"){const o=Array.isArray(e.items)?e.items:[];if(!o.length)return null;let r=Math.max(0,n.listWrapperOverhead);for(const l of o){const a=CO(l,t,n);if(!a)return null;r+=a.height}return{kind:"simple-text",height:Math.max(1,Math.round(r)),contentHeight:Math.max(1,Math.round(r))}}return null}function L1(e){if(!e)return 1;const t=String(e).split(/\r?\n/);return Math.max(1,t.length)}function sd(e,t){const n=String(e??"");return t?n:n.replace(/\r\n$|\n$|\r$/,"")}function ok(e,t,n=0){return e.diff?b7(t??{},n)?(function(i){const s=sd(i.raw);if(s){const o=s.split(/\r?\n/);return i.originalCode!=null||i.updatedCode!=null?Math.max(1,o.filter(r=>!jEe.some(l=>r.startsWith(l))).length):Math.max(1,o.length)}return L1(sd(i.originalCode))+L1(sd(i.updatedCode))})(e):(function(i){const s=i.originalCode,o=i.updatedCode;if(s!=null||o!=null)return Math.max(L1(sd(s)),L1(sd(o)));const r=sd(i.code).split(/\r?\n/);let l=0,a=0;for(const u of r)u.startsWith("+")&&!u.startsWith("+++")?a++:u.startsWith("-")&&!u.startsWith("---")?l++:(l++,a++);return Math.max(1,l,a)})(e):L1(sd(e.code,e.loading===!0))}function WEe(e){return e?`${e.fontStyle||"normal"} ${e.fontWeight||"400"} ${e.fontSize||"16px"} ${e.fontFamily||"sans-serif"}`:""}function rk(e,t,n="pre-wrap"){if(!e||!t||typeof window>"u")return null;const i=window.getComputedStyle(t),s=e.offsetHeight,o=aE(i.lineHeight,1.5*aE(i.fontSize,16)),r=e.getBoundingClientRect().width,l=t.getBoundingClientRect().width;return{font:WEe(i),lineHeight:o,wrapperOverhead:Math.max(0,s-o),widthAdjustment:Math.max(0,r-l),whiteSpace:n}}const qEe=new Set(["node","key","ref","ctx","renderNode","indexKey","__proto__","prototype","constructor"]);function uE(e,t={}){var n;const i={},s=new Set((n=t.omit)!=null?n:[]);if(!e||typeof e!="object")return i;const o=Object.getOwnPropertyDescriptors(e);for(const[r,l]of Object.entries(o))qEe.has(r)||s.has(r)||l.enumerable&&"value"in l&&(i[r]=l.value);return i}function cE(e,t,n,i){var s;const o=(function(f){return Math.max(0,Math.ceil(f.scrollHeight||0)-Math.ceil(f.clientHeight||0))})(e),r=(function(f,h){return Number.isFinite(f)?Math.min(Math.max(0,f),h):0})(n,o);if(!i.isReverseFlexScrollRoot(e))return void(e.scrollTop=r);const l=Math.max(0,o-r),a=[-l,l];let u=a[0],c=Number.POSITIVE_INFINITY;for(const f of a){e.scrollTop=f;const h=i.getNormalizedScrollTop(e,t,!1),g=Math.abs(h-r);g<c&&(c=g,u=f)}e.scrollTop=u;const d=(s=i.epsilonPx)!=null?s:2;Math.abs(i.getNormalizedScrollTop(e,t,!1)-r)>d&&(e.scrollTop=u)}function dE(e,t){let n=0,i=null,s=null;const o=()=>{const r=s;s=null,i=null,r&&(n=Date.now(),e(...r))};return function(...r){const l=Date.now(),a=t-(l-n);s=r,a<=0?(i&&(clearTimeout(i),i=null),n=l,s=null,e(...r)):i||(i=setTimeout(o,a))}}function fE(e){return e==="simple"?"simple":e===!0||e==="true"||e==="precise"?"precise":"off"}const wO=Symbol("MarkstreamMathBlockMinHeightCache");function zat(){return cn(wO,null)}const UEe=new Set(["text","inline_code","emoji","footnote_reference"]),KEe=new Set(["strong","emphasis","strikethrough","highlight","insert","subscript","superscript","link"]);function N1(e){const t=Number(e);return!Number.isFinite(t)||t<=0?-1:Math.round(t/32)}function od(e,t,n,i=22){const s=String(e??"");if(!s)return n;const o=Math.max(18,Math.floor(Math.max(320,t)/8)),r=s.split(/\r?\n/).length,l=Math.ceil(s.length/o),a=Math.max(1,r,l);return Math.max(n,Math.ceil(a*i+12))}function xO(e){var t;if(!e||typeof e!="object")return!1;const n=e,i=String((t=n.type)!=null?t:"");if(UEe.has(i))return!0;if(!KEe.has(i))return!1;const s=n.children;return!Array.isArray(s)||!s.length||s.every(xO)}function N8(e){var t,n,i,s,o,r,l,a;if(!e||typeof e!="object")return"";const u=e,c=String((t=u.type)!=null?t:"");if(c==="text")return String((i=(n=u.content)!=null?n:u.raw)!=null?i:"");if(c==="inline_code")return String((r=(o=(s=u.code)!=null?s:u.content)!=null?o:u.raw)!=null?r:"");if(c==="emoji")return String((a=(l=u.name)!=null?l:u.raw)!=null?a:"");if(typeof u.text=="string")return u.text;const d=[];for(const f of["children","items","cells","rows"]){const h=u[f];if(Array.isArray(h)){const g=h.map(N8).filter(Boolean).join(" ");g&&d.push(g)}}return d.join(" ").replace(/\s+/g," ").trim()}function SO(e){if(!e||typeof e!="object")return!1;const t=e;return t.type==="inline_code"||["children","items","cells","rows"].some(n=>{const i=t[n];return Array.isArray(i)&&i.some(SO)})}function VEe(e,t){if(!e)return 30;const n=Math.max(18,Math.floor(Math.max(320,t)/8)),i=e.split(/\r?\n/).length,s=Math.ceil(e.length/n),o=Math.max(1,i,s);return 30+26*Math.max(0,o-1)}function ZEe(e,t){var n,i,s,o,r,l,a,u,c,d,f,h,g,m;if(!e||typeof e!="object")return 32;const y=e,A=String((n=y.type)!=null?n:""),b=Number.isFinite(t)&&t>0?t:640;switch(A){case"heading":return(function(C){var v;const x=Number((v=C.level)!=null?v:C.depth);return x>=4?20:x===3?30:x===2?32:44})(y);case"paragraph":return(function(C,v){const x=String(C??"");if(!x)return 28;const S=Math.max(18,Math.floor(Math.max(320,v)/8)),_=x.split(/\r?\n/).length,I=Math.ceil(x.length/S);return Math.max(1,_,I)<=1?28:od(x,v,34)})(String((s=(i=y.raw)!=null?i:y.content)!=null?s:""),b);case"list":return(function(C,v){var x;const S=Array.isArray(C.items)?C.items:[];if(!S.length)return 48;const _=Math.max(48,30*S.length+12);let I=12;for(const D of S)I+=VEe(N8(D)||String((x=D.raw)!=null?x:""),v);const M=Math.max(0,I-_);if(S.length>20){const D=Math.round(2.4*S.length);return Math.round(_+Math.max(D,Math.min(M,3*S.length)))}if(M<=0)return _;const $=S.length>8?8*S.length:M;return Math.round(_+Math.min(M,$))})(y,b);case"list_item":return od(String((r=(o=y.raw)!=null?o:y.content)!=null?r:""),b,34);case"blockquote":return od(String((a=(l=y.raw)!=null?l:y.content)!=null?a:""),b,56);case"table":return(function(C,v){const x=[...C.header?[C.header]:[],...Array.isArray(C.rows)?C.rows:[]];if(!x.length){const S=Array.isArray(C.children)?C.children.length:3;return Math.max(120,38*S+48)}return Math.max(120,Math.round(4+x.reduce((S,_)=>S+(function(I,M){const $=Math.max(1,I.length),D=Math.max(80,(M-32)/$),T=Math.max(10,Math.floor(D/8)),N=Math.max(1,...I.map(O=>{var P;const R=N8(O)||String((P=O?.raw)!=null?P:"");return Math.ceil(R.length/T)||1}));return 54+34*Math.max(0,N-1)+($<=3&&I.some(SO)?14:0)})((function(I){var M;return Array.isArray(I?.cells)&&(M=I.cells)!=null?M:[]})(_),v),0)))})(y,b);case"code_block":{const C=String((u=y.language)!=null?u:"").trim().toLowerCase(),v=String((d=(c=y.code)!=null?c:y.raw)!=null?d:"");return C==="mermaid"?Wv(jv(v)):C==="infographic"?qv(Hv(v)):od(v,b,96,20)}case"math_block":return 72;case"image":return 220;case"admonition":case"vmr_container":case"html_block":return(function(C,v){var x,S,_;const I=C.match(/^\s*<details\b([^>]*)>/i);return I&&!/(?:^|\s)open(?:\s|=|$)/i.test((x=I[1])!=null?x:"")?od(((_=(S=C.match(/<summary\b[^>]*>([\s\S]*?)<\/summary>/i))==null?void 0:S[1])==null?void 0:_.replace(/<[^>]*>/g,"").trim())||"Details",v,28,28):od(C,v,96)})(String((h=(f=y.raw)!=null?f:y.content)!=null?h:""),b);case"thematic_break":return 24;default:return od(String((m=(g=y.raw)!=null?g:y.content)!=null?m:""),b,40)}}function hE(e,t,n){return Math.min(Math.max(e,t),n)}const GEe=["total","cacheHits","appendHits","tailHits","fullParses","chunkedParses"],QEe=["tokenCloneMs","processTokensInputTokens","processTokensReusedTopLevelNodes","processTokensMs","safeMarkdownMs","tokenizeMs","htmlBlockPassesMs","parseMarkdownToStructureTotalMs"],YEe=new Set(["attrs","data","items","header","payload","props","rows","cells","term","definition","sourceMap"]),_O=["raw","content","code","originalCode","updatedCode"],pE=new WeakMap,gE=new WeakMap;let JEe=1;function Sl(){return typeof performance<"u"?performance.now():Date.now()}function mE(e){const t=e.stream;return t&&typeof t.stats=="function"?t.stats():null}function Or(e){if(typeof e!="object"&&typeof e!="function"||e===null)return"";const t=e;let n=pE.get(t);return n||(n=JEe++,pE.set(t,n)),String(n)}function vE(e,t,n,i={}){var s,o;const r=i.includeFinal!==!1,l={md:Or(t),customMarkdownIt:Or(n),requireClosingStrong:e.requireClosingStrong===!0,customHtmlTags:(s=e.customHtmlTags)!=null?s:[],includeSourceMap:e.includeSourceMap===!0,streamParse:(o=e.streamParse)!=null?o:"auto",validateLink:Or(e.validateLink),preTransformTokens:Or(e.preTransformTokens),postTransformTokens:Or(e.postTransformTokens),postTransformNodes:Or(e.postTransformNodes)};return r&&(l.final=e.final===!0),JSON.stringify(l)}function yE(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===10;)t-=1;const n=e.lastIndexOf(` +`,t-1)+1;return e.slice(n,t).trim()}function kE(e){const t=IO(e);return t.length>=2&&t.every(n=>{const i=n.trim();return i.length>=1&&i.replace(/^:/,"").replace(/:$/,"").split("").every(s=>s==="-")})}function IO(e){return e.includes("|")?e.replace(/^\|/,"").replace(/\|$/,"").split("|"):[]}function MO(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function I7(e){const t=String(e??"");return`${t.length}:${MO(t)}`}function F8(e,t=new WeakMap,n=0){if(e==null||typeof e=="number"||typeof e=="boolean")return String(e);if(typeof e=="string")return`s:${(function(r){return r.length<=8192?I7(r):`${r.length}:${MO(r.slice(0,8192))}:truncated`})(e)}`;if(typeof e=="function")return`fn:${Or(e)}`;if(typeof e!="object")return typeof e;const i=e,s=t.get(i);if(s)return`cycle:${s}`;if(n>=6)return`object:${Or(i)}`;const o=Or(i);if(t.set(i,o),Array.isArray(e)){const r=e.slice(0,200);return`a:${e.length}:${r.map(l=>F8(l,t,n+1)).join(",")}`}if(typeof e=="object"){const r=e,l=Object.keys(r).sort(),a=l.slice(0,80);return`o:${l.length}:${a.sort().map(u=>`${u}:${F8(r[u],t,n+1)}`).join(";")}`}return typeof e}function Jv(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"&&typeof e.raw=="string"}function EO(e,t=new WeakMap,n=0){return Array.isArray(e)?`a:${e.length}:${e.slice(0,200).map(i=>Jv(i)?gc(i,t,n+1):EO(i,t,n+1)).join(",")}`:Jv(e)?gc(e,t,n):F8(e,t,n)}function XEe(e,t,n){return Object.keys(e).sort().filter(i=>i!=="children"&&!_O.includes(i)).map(i=>{const s=e[i];return typeof s=="string"?`${i}=s:${I7(s)}`:typeof s=="number"||typeof s=="boolean"||s==null?`${i}=${String(s)}`:typeof s=="function"?`${i}=fn:${Or(s)}`:YEe.has(i)&&(Array.isArray(s)||typeof s=="object")?`${i}=${EO(s,t,n+1)}`:s&&typeof s=="object"?`${i}=object:${Or(s)}`:""}).filter(Boolean).join(";")}function eTe(e){return _O.map(t=>{const n=e[t];return typeof n=="string"?`${t}=s:${I7(n)}`:""}).filter(Boolean).join(";")}function gc(e,t=new WeakMap,n=0){const i=gE.get(e);if(i)return i;const s=e,o=t.get(s);if(o)return`node-cycle:${o}`;if(n>=6)return`node:${e.type}:${Or(s)}`;const r=Or(s);t.set(s,r);const l=(function(a,u,c){const d=a,f=Array.isArray(d.children)?d.children:[],h=f.length?f.slice(0,200).map(g=>gc(g,u,c+1)).join("|"):"";return[a.type,eTe(d),XEe(d,u,c),f.length,h].join(":")})(e,t,n);return gE.set(s,l),l}function TO(e,t){return gc(e)===gc(t)}function M7(e,t,n){const i=Sl(),s=t==="stabilizeSignatureMs"?"stabilizeSignatureCallCount":"primeSignatureCallCount";try{return n()}finally{e[t]+=Sl()-i,e[s]+=1,e.signatureMs=e.stabilizeSignatureMs+e.primeSignatureMs,e.signatureCallCount=e.stabilizeSignatureCallCount+e.primeSignatureCallCount}}function bE(e,t,n){return M7(t,n,()=>gc(e))}function LO(e,t,n){return bE(e,n,"stabilizeSignatureMs")===bE(t,n,"stabilizeSignatureMs")}function Tm(e){return{reusedNodeCount:0,dirtyStartIndex:e>0?0:-1,stablePrefixNodeCount:0,dirtyTailNodeCount:e}}function AE(e,t,n){return e<0?0:Math.max(t.length,n.length)-e}function CE(e){return e.__markstreamHasCustomParserExtensions===!0||(function(t){var n;return Number((n=t.__markstreamRegisteredPluginCount)!=null?n:0)>0})(e)}function tTe(e,t){return e.length===t.length&&e===t}function E7(e,t,n=0){if(n>=4)return null;if(e.type!==t.type)return!1;const i=e,s=t,o=Object.keys(i).filter(c=>c!=="type"&&c!=="children").sort(),r=Object.keys(s).filter(c=>c!=="type"&&c!=="children").sort();if(o.length!==r.length)return!1;for(let c=0;c<o.length;c++){const d=o[c];if(d!==r[c])return!1;const f=i[d],h=s[d];if(typeof f!=typeof h)return!1;if(typeof f!="string"){if(typeof f!="number"&&typeof f!="boolean"&&f!=null)return null;if(!Object.is(f,h))return!1}else if(typeof h!="string"||!tTe(f,h))return!1}const l=Object.prototype.hasOwnProperty.call(i,"children");if(l!==Object.prototype.hasOwnProperty.call(s,"children"))return!1;if(!l)return!0;const a=i.children,u=s.children;if(!Array.isArray(a)||!Array.isArray(u))return null;if(a.length!==u.length)return!1;for(let c=0;c<a.length;c++){const d=a[c],f=u[c];if(!Jv(d)||!Jv(f))return null;const h=E7(d,f,n+1);if(h==null)return null;if(!h)return!1}return!0}function nTe(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.type!==t.type)return!1;const n=E7(e,t);return n??TO(e,t)}function iTe(e,t,n){if(!e||!t)return!1;if(e===t)return!0;if(e.type!==t.type)return!1;let i=null;return M7(n,"stabilizeSignatureMs",()=>{i=E7(e,t)}),i??LO(e,t,n)}function sTe(e,t){const n={};for(const i of GEe){const s=e[i],o=t?.[i];typeof s=="number"&&(n[i]=s-(typeof o=="number"?o:0))}return n}function oTe(e,t){var n;const i=kM(t.instanceMsgId),s=new Map,o=(n=t.smoothStreamingEnabled)!=null?n:L(()=>!1),r=G(t.renderContent.value);let l=[],a="",u="",c="",d=!1;const f=(function(){let O="",P=0,R=!1,q=!1,j=!1,W=!1;function z(){O="",P=0,R=!1,q=!1,j=!1,W=!1}function H(ee){let V=!1;for(let ie=0;ie<ee.length;ie++){const se=ee.charCodeAt(ie);if(se===10||se===13){const pe=se===10&&W;W=se===13,R=!1,pe||(j||(q=!1,P=0),j=!1);continue}W=!1;const Z=se===9||se===32;if(Z||(j=!0,q&&(V=!0)),P)if(P!==1)Z||(se!==58?P=se===91?1:0:(V=!0,q=!0));else{if(R){R=!1;continue}if(se===92){R=!0;continue}se===93&&(P=2)}else se===91&&(P=1)}return V}return(ee,V)=>{if(!ee||!V.startsWith(ee)||V.length<=ee.length)return z(),[!0,0];let ie=0;O!==ee&&(z(),H(ee),ie=ee.length);const se=V.slice(ee.length),Z=H(se);return O=V,[Z,ie+se.length]}})();let h,g=0,m=0,y=Sl(),A=-1,b=0;function C(O){A=Number.isInteger(O)?O:0,b+=1}function v(){h&&(clearTimeout(h),h=void 0)}function x(){v();const O=t.renderContent.value;r.value!==O&&(r.value=O),y=Sl()}qe([t.renderContent,t.effectiveFinal,o],([O,P,R])=>{r.value!==O&&(!R||P||(function(q,j){if(!q&&j||j.length<=80||j.length<q.length||!j.startsWith(q))return!0;const W=j.slice(q.length);return!!W&&(!!kE(yE(j))||!(!W.includes(` + +`)&&!/(?:^|\n)(?:#{1,6}\s|[-+*]\s+|\d+[.)]\s+|>\s*|`{3,}|~{3,})/.test(W))||W.endsWith(` +`)&&!(function(z){const H=yE(z);if(kE(H))return!1;const ee=IO(H);return ee.length>=2&&ee.some(V=>V.trim())})(j))})(r.value,O)?x():(function(){if(m+=1,h)return;const q=Math.max(0,(function(j){const W=j.parseCoalesceMs;return typeof W=="number"&&Number.isFinite(W)&&W>=0?W:80})(e)-(Sl()-y));q<=0?x():h=setTimeout(x,q)})())},{flush:"sync",immediate:!0}),Xd(v);const S=L(()=>{var O,P,R,q;return sAe(e.customHtmlTags,(O=e.parseOptions)==null?void 0:O.customHtmlTags,(q=(R=(P=t.customComponentsMap)==null?void 0:P.value)!=null?R:{},Object.entries(q).map(([j,W])=>{const z=yl(j);return W==null||!z||X0(z)||Bz.has(z)||Z0.has(z)?"":z}).filter(Boolean)))}),_=L(()=>{const{key:O,tags:P}=oAe(S.value);if(!O)return i;const R=s.get(O);if(R)return R;const q=kM(t.instanceMsgId,{customHtmlTags:P});return s.set(O,q),q}),I=L(()=>{const O=_.value;if(!e.customMarkdownIt)return O;const P=e.customMarkdownIt(O);return O.__markstreamHasCustomParserExtensions=!0,P.__markstreamHasCustomParserExtensions=!0,P}),M=L(()=>{var O,P;const R=(O=e.parseOptions)!=null?O:{},q=t.effectiveFinal.value,j=S.value,W=q!=null,z=j.length>0;return W||z||R.streamParse==null?_t(_t(yn(_t({},R),{streamParse:(P=R.streamParse)==null||P}),W?{final:q}:{}),z?{customHtmlTags:j}:{}):R}),$=L(()=>{var O;return new Set(((O=M.value.customHtmlTags)!=null?O:[]).map(P=>String(P).trim().toLowerCase()).filter(Boolean))}),D=L(()=>vE(M.value,I.value,e.customMarkdownIt,{includeFinal:!0})),T=L(()=>vE(M.value,I.value,e.customMarkdownIt,{includeFinal:!1}));qe([D,T],([O,P],[R,q])=>{R&&(O===R&&P===q||(x(),P!==q&&(l=[],c="")))},{flush:"sync"});const N=L(()=>{var O,P,R,q,j,W,z,H,ee,V,ie;if((O=e.nodes)!=null&&O.length)return l=[],c="",C(0),xt(e.nodes.slice());const se=r.value;if(!se)return l=[],c="",C(-1),[];const Z=t.debugPerformanceEnabled.value,pe=Z?Sl():0,re=I.value,fe=D.value,Ee=T.value;a&&fe!==a&&(function(ut){var yt,Mt;(Mt=(yt=ut.stream)==null?void 0:yt.reset)==null||Mt.call(yt)})(re),u&&Ee!==u&&(l=[],c="");const X=Object.keys((R=(P=t.customComponentsMap)==null?void 0:P.value)!=null?R:{}).length>0||typeof M.value.postTransformNodes=="function";X!==d&&(l=[],c="");const we=!X&&l.length>0&&se.startsWith(c)&&Ee===u,Y=Z?mE(re):null,le=Z?{}:void 0,Ce=CE(re),ae=!Ce&&!X,oe=_t(_t(yn(_t({},M.value),{__reuseStableTopLevelNodes:ae}),Ce?{__disableStreamParse:!0}:{}),le?{__timing:le}:{}),Q=PR(se,re,oe),ne=Z?Sl():0,ge=Z?{signatureMs:0,stabilizeSignatureMs:0,primeSignatureMs:0,signatureCallCount:0,stabilizeSignatureCallCount:0,primeSignatureCallCount:0}:void 0;let Ae,_e=Z?Tm(Q.length):void 0,Ke=0,xe=0,Ne=0;if(we){const ut=Z?Sl():0,[yt,Mt]=(function(Ge){var lt,tt;const[It,Ut]=Ge.scanGlobalReferenceAppend(Ge.previousContent,Ge.content),fn=Ge.parseOptions;return[Ge.previousDirtyStartIndex>0&&fn.final!==!0&&!Ge.customMarkdownIt&&!CE(Ge.md)&&!It&&typeof fn.preTransformTokens!="function"&&typeof fn.postTransformTokens!="function"&&typeof fn.postTransformNodes!="function"&&((tt=(lt=fn.customHtmlTags)==null?void 0:lt.length)!=null?tt:0)===0?Ge.previousDirtyStartIndex:0,Ut]})({content:se,previousContent:c,previousDirtyStartIndex:A,parseOptions:M.value,customMarkdownIt:e.customMarkdownIt,md:re,scanGlobalReferenceAppend:f});Ne=Mt;const Ze=yt<=0;if(ge){const Ge=(function(lt,tt,It,Ut={}){var fn;if(!tt.length)return{nodes:lt,metrics:Tm(lt.length)};const Nn=(fn=Ut.scanStartIndex)!=null?fn:0,Qt=Ut.reuseDirtyTail!==!1,un=(function(wn,bn,Xn,Ue=0){const st=Math.min(wn.length,bn.length);for(let ct=Math.min(st,Math.max(0,Ue));ct<st;ct++)if(!iTe(bn[ct],wn[ct],Xn))return ct;return wn.length===bn.length?-1:st})(lt,tt,It,Nn);if(un<0)return{nodes:tt,metrics:{reusedNodeCount:lt.length,dirtyStartIndex:un,stablePrefixNodeCount:lt.length,dirtyTailNodeCount:0}};const Dn=lt.slice();let pn=un;for(let wn=0;wn<un;wn++)Dn[wn]=tt[wn];if(Qt)for(let wn=un;wn<lt.length;wn++){const bn=tt[wn],Xn=lt[wn];bn&&LO(bn,Xn,It)&&(Dn[wn]=bn,pn+=1)}return{nodes:Dn,metrics:{reusedNodeCount:pn,dirtyStartIndex:un,stablePrefixNodeCount:un,dirtyTailNodeCount:AE(un,lt,tt)}}})(Q,l,ge,{reuseDirtyTail:Ze,scanStartIndex:yt});Ae=Ge.nodes,_e=Ge.metrics}else{const Ge=(function(lt,tt,It={}){var Ut;if(!tt.length)return{nodes:lt,metrics:Tm(lt.length)};const fn=(Ut=It.scanStartIndex)!=null?Ut:0,Nn=It.reuseDirtyTail!==!1,Qt=(function(pn,wn,bn=0){const Xn=Math.min(pn.length,wn.length);for(let Ue=Math.min(Xn,Math.max(0,bn));Ue<Xn;Ue++)if(!nTe(wn[Ue],pn[Ue]))return Ue;return pn.length===wn.length?-1:Xn})(lt,tt,fn);if(Qt<0)return{nodes:tt,metrics:{reusedNodeCount:lt.length,dirtyStartIndex:Qt,stablePrefixNodeCount:lt.length,dirtyTailNodeCount:0}};const un=lt.slice();let Dn=Qt;for(let pn=0;pn<Qt;pn++)un[pn]=tt[pn];if(Nn)for(let pn=Qt;pn<lt.length;pn++){const wn=tt[pn],bn=lt[pn];wn&&TO(wn,bn)&&(un[pn]=wn,Dn+=1)}return{nodes:un,metrics:{reusedNodeCount:Dn,dirtyStartIndex:Qt,stablePrefixNodeCount:Qt,dirtyTailNodeCount:AE(Qt,lt,tt)}}})(Q,l,{reuseDirtyTail:Ze,scanStartIndex:yt});Ae=Ge.nodes,_e=Ge.metrics}Ke=Z?Sl()-ut:0,xe=Ze?_e?.dirtyStartIndex==null||_e.dirtyStartIndex<0?Ae.length:_e.dirtyStartIndex:Ae.length}else Ae=Q,_e=Tm(Ae.length);t.effectiveFinal.value!==!0&&(ge?(function(ut,yt,Mt=0){for(let Ze=Math.max(0,Mt);Ze<ut.length;Ze++)M7(yt,"primeSignatureMs",()=>gc(ut[Ze]))})(Ae,ge,xe):(function(ut,yt=0){for(let Mt=Math.max(0,yt);Mt<ut.length;Mt++)gc(ut[Mt])})(Ae,xe));const et=Z?Sl()-ne:0;if(g+=1,c=se,a=fe,u=Ee,d=X,l=Ae,C((q=_e?.dirtyStartIndex)!=null?q:0),Z){const ut=mE(re),yt=typeof ut?.total=="number"&&ut.total>((j=Y?.total)!=null?j:0);t.logPerf(yt?"parse(stream)":"parse(sync)",_t(_t(_t({rendererId:t.instanceMsgId,ms:Math.round(Sl()-pe),nodes:Ae.length,contentLength:se.length,parseCommitCount:g,parseCoalescedCount:m,nodeReuseMs:et,referenceDefinitionScanChars:Ne,signatureMs:(W=ge?.signatureMs)!=null?W:0,stabilizeSignatureMs:(z=ge?.stabilizeSignatureMs)!=null?z:0,primeSignatureMs:(H=ge?.primeSignatureMs)!=null?H:0,signatureCallCount:(ee=ge?.signatureCallCount)!=null?ee:0,stabilizeSignatureCallCount:(V=ge?.stabilizeSignatureCallCount)!=null?V:0,primeSignatureCallCount:(ie=ge?.primeSignatureCallCount)!=null?ie:0,stabilizeMs:Ke},_e??{}),le?Object.fromEntries(QEe.map(Mt=>{var Ze;return[Mt,(Ze=le[Mt])!=null?Ze:0]})):{}),ut?{streamMode:ut.lastMode,streamDelta:sTe(ut,Y),streamStats:ut}:{}))}return xt(Ae)});return{effectiveCustomHtmlTags:S,effectiveCustomHtmlTagsSet:$,mdBase:_,mdInstance:I,mergedParseOptions:M,getParsedNodesDirtyStartIndex:()=>A,getParsedNodesRevision:()=>b,parsedNodes:N}}function rTe(e){const{isClient:t}=e,n=G(new Set),i=new Map,s=new Map,o=new Map;function r(u){if(!t)return;const c=o.get(u);c!=null&&(window.clearTimeout(c),o.delete(u))}function l(){if(t)for(const u of o.values())window.clearTimeout(u);o.clear()}function a(){n.value=new Set}return{visibleNodeIndices:n,nodeVisibilityHandles:i,nodeVisibilityWatchStops:s,nodeVisibilityFallbackTimers:o,clearVisibilityFallback:r,clearAllVisibilityFallbacks:l,markNodeVisible:function(u,c=!0){var d;c&&r(u),(function(f,h){if((m=(g=e.shouldTrackVisibleNodeIndices)==null?void 0:g.call(e))!=null&&!m)return;var g,m;const y=n.value,A=y.has(f);if(h){if(A)return;const C=new Set(y);return C.add(f),void(n.value=C)}if(!A)return;const b=new Set(y);b.delete(f),n.value=b})(u,c),c&&((d=e.onNodeMarkedVisible)==null||d.call(e,u))},resetNodeVisibleState:a,cleanupNodeVisibility:function(u){var c;if(e.shouldCleanupNodeVisibility&&!e.shouldCleanupNodeVisibility())return;for(const[f,h]of s.entries())f<u||(h(),s.delete(f));for(const[f,h]of i.entries())f<u||(h.destroy(),i.delete(f),r(f),(c=e.onNodeVisibilityCleaned)==null||c.call(e,f));for(const f of Array.from(o.keys()))f<u||r(f);if(!n.value.size)return;const d=new Set;for(const f of n.value)f<u&&d.add(f);n.value=d},destroyNodeVisibilityState:function(){a();for(const u of s.values())u();s.clear();for(const u of i.values())u.destroy();i.clear(),l()}}}function lTe(e={}){const t=G(""),n=G(""),i=G(!1),s=P_e(e),o=()=>{const c=s.getSnapshot();t.value=c.source,n.value=c.visible,i.value=c.done},r=s.subscribe(o);o();const l=L(()=>Math.max(0,t.value.length-n.value.length)),a=L(()=>l.value===0),u=L(()=>i.value&&a.value);return M0()&&Xd(()=>{r(),s.destroy()}),{source:t,visible:n,done:i,final:u,caughtUp:a,pendingChars:l,enqueue:c=>s.enqueue(c),finish:c=>s.finish(c),flush:()=>s.flush(),reset:c=>s.reset(c),pause:()=>s.pause(),resume:()=>s.resume()}}const aTe={maxCharsPerSecond:3e3,maxCommitFps:20,maxCharsPerCommit:160,catchUpLatencyMs:220,catchUpThreshold:400},wE=/auto|scroll|overlay/i;function uTe(e){if(!e)return!1;const t=(e.overflowY||"").toLowerCase(),n=(e.overflow||"").toLowerCase();return wE.test(t)||wE.test(n)}function cTe(e){const t=Math.ceil(e.scrollHeight)>Math.ceil(e.clientHeight)+1,n=Math.ceil(e.scrollWidth)>Math.ceil(e.clientWidth)+1;return t||n}const dTe={class:"m-0 p-0"},fTe=["data-probe"],hTe=di(Qe(yn(_t({},{name:"HeightEstimationProbes"}),{__name:"HeightEstimationProbes",props:{width:{},flowRoot:{type:Boolean},paragraphNode:{},listItemNode:{},listNode:{},headingNodes:{},setParagraphWrapper:{type:Function},setListItemWrapper:{type:Function},setListWrapper:{type:Function},setHeadingWrapper:{type:Function}},setup(e){const t=e;function n(i){var s,o;return(o=(s=t.headingNodes)==null?void 0:s[i])!=null?o:null}return(i,s)=>(k(),E("div",{class:"height-estimation-probes",style:qt({width:`${e.width}px`}),"aria-hidden":"true"},[w("div",{ref:o=>e.setParagraphWrapper(o),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"paragraph"},[K(p(Fd),{node:e.paragraphNode,"index-key":"probe-paragraph"},null,8,["node"])],2),w("div",{ref:o=>e.setListItemWrapper(o),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list-item"},[w("ul",dTe,[K(p(Ah),{node:e.listItemNode,"index-key":"probe-list-item"},null,8,["node"])])],2),w("div",{ref:o=>e.setListWrapper(o),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":"list"},[K(p(Ch),{node:e.listNode,"index-key":"probe-list"},null,8,["node"])],2),(k(),E(Te,null,ht(6,o=>w("div",{key:`probe-heading-${o}`,ref_for:!0,ref:r=>e.setHeadingWrapper(o,r),class:Fe(["node-content",{"node-content-flow-root":e.flowRoot}]),"data-probe":`heading-${o}`},[K(p(h9),{node:n(o),"index-key":`probe-heading-${o}`},null,8,["node","index-key"])],10,fTe)),64))],4))}})),[["__scopeId","data-v-3e0766e2"]]),xE=Qe({name:"InfographicBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=L(()=>{var n,i;return qv((i=eh(e.estimatedPreviewHeightPx))!=null?i:Hv(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return gn("div",{class:"infographic-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",background:"var(--diagram-bg)",borderColor:"var(--diagram-border)",color:"hsl(var(--ms-foreground))"},"data-markstream-infographic":"1","data-markstream-mode":"pending"},[e.showHeader?gn("div",{class:"infographic-block-header flex justify-between items-center border-b",style:{padding:"var(--ms-inset-panel-y) var(--ms-inset-panel-x)",background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)",minHeight:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding) + var(--ms-inset-panel-y) + var(--ms-inset-panel-y) + 1px)"}},[gn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[gn("span",{class:"icon-slot action-icon shrink-0",style:{display:"inline-flex",width:"var(--ms-action-btn-icon)",height:"var(--ms-action-btn-icon)"}}),gn("span",{class:"infographic-label font-medium font-mono truncate",style:{fontSize:"var(--ms-text-label)",color:"hsl(var(--ms-muted-foreground))"}},"Infographic")]),gn("div",{class:"infographic-header-actions flex items-center opacity-0 pointer-events-none",style:{gap:"var(--ms-gap-header-actions)"},"aria-hidden":"true"},Array.from({length:4},()=>gn("span",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",style:{width:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))",height:"calc(var(--ms-action-btn-icon) + var(--ms-action-btn-padding) + var(--ms-action-btn-padding))"}})))]):null,gn("div",{class:"infographic-preview relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[gn("pre",{class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",zIndex:"1",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),gn("div",{class:"absolute inset-0"},[gn("div",{class:"w-full text-center flex items-center justify-center min-h-full"})])])])}}}),SE=Qe({name:"MermaidBlockNodeLoading",props:{node:{type:Object,required:!0},showHeader:{type:Boolean,default:!0},estimatedPreviewHeightPx:{type:Number,default:void 0}},setup(e){const t=L(()=>{var n,i;return Wv((i=eh(e.estimatedPreviewHeightPx))!=null?i:jv(String((n=e.node.code)!=null?n:"")))});return()=>{var n;return gn("div",{class:"mermaid-block-container rounded-lg border overflow-hidden",style:{margin:"var(--ms-flow-diagram-y) 0",borderColor:"var(--diagram-border)"},"data-markstream-mermaid":"1","data-markstream-mode":"pending"},[e.showHeader?gn("div",{class:"mermaid-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]",style:{background:"var(--diagram-header-bg)",borderColor:"var(--diagram-border)"}},[gn("div",{class:"flex items-center gap-x-2 overflow-hidden"},[gn("span",{class:"mermaid-label-text text-[length:var(--ms-text-label)] font-medium font-mono truncate",style:{color:"var(--code-action-fg)"}},"Mermaid")]),gn("div",{class:"mermaid-header-actions flex items-center gap-[var(--ms-gap-header-actions)] opacity-0 pointer-events-none","aria-hidden":"true"},Array.from({length:4},()=>gn("span",{class:"mermaid-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded"},[gn("span",{class:"action-icon block"})])))]):null,gn("div",{class:"mermaid-preview-area relative overflow-hidden block",style:{height:`${t.value}px`,minHeight:"var(--ms-size-diagram-min-height)",background:"var(--diagram-bg)"}},[gn("pre",{class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap",style:{position:"absolute",inset:"0",margin:"0",padding:"var(--ms-inset-panel-body)",overflow:"auto",textAlign:"left"}},String((n=e.node.code)!=null?n:"")),gn("div",{class:"_mermaid w-full text-center flex items-center justify-center min-h-full",style:{fontFamily:"inherit",contentVisibility:"auto",contain:"content",containIntrinsicSize:"var(--ms-size-diagram-min-height) 240px"}})])])}}}),pTe={docs:{showTooltips:!0,fade:!0,batchRendering:!0,initialRenderBatchSize:40,renderBatchSize:80,renderBatchDelay:16,renderBatchBudgetMs:6,renderBatchIdleTimeoutMs:120,deferNodesUntilVisible:!0,maxLiveNodes:220,liveNodeBuffer:60,nodeVirtual:"auto"},chat:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"},minimal:{showTooltips:!1,fade:!1,batchRendering:!0,initialRenderBatchSize:32,renderBatchSize:48,renderBatchDelay:6,renderBatchBudgetMs:8,renderBatchIdleTimeoutMs:60,deferNodesUntilVisible:!0,maxLiveNodes:0,liveNodeBuffer:0,nodeVirtual:"auto"}};function io(e){if(e==null)return"";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);try{return JSON.stringify(e)}catch{return String(e)}}const gTe=["data-custom-id"],mTe=["data-node-index","data-node-type"],_E="typewriter-simple-cursor-target",NO=di(Qe(yn(_t({},{name:"NodeRenderer"}),{__name:"NodeRenderer",props:{content:{},nodes:{},final:{type:Boolean},parseOptions:{},customMarkdownIt:{},debugPerformance:{type:Boolean,default:!1},customHtmlTags:{},mode:{},domMode:{},htmlPolicy:{},viewportPriority:{type:Boolean,default:void 0},viewportPriorityOptions:{},codeBlockStream:{type:Boolean,default:!0},codeBlockDarkTheme:{},codeBlockLightTheme:{},codeBlockMonacoOptions:{},codeRenderer:{},renderCodeBlocksAsPre:{type:Boolean,default:void 0},codeBlockMinWidth:{},codeBlockMaxWidth:{},codeBlockProps:{},mermaidProps:{},d2Props:{},infographicProps:{},showTooltips:{type:Boolean,default:void 0},themes:{},langs:{},isDark:{type:Boolean},customId:{},indexKey:{},typewriter:{type:[Boolean,String],default:!1},smoothStreaming:{type:[Boolean,String],default:"auto"},smoothStreamingOptions:{},parseCoalesceMs:{},fade:{type:Boolean,default:void 0},batchRendering:{type:Boolean,default:void 0},initialRenderBatchSize:{},renderBatchSize:{},renderBatchDelay:{},renderBatchBudgetMs:{},renderBatchIdleTimeoutMs:{},deferNodesUntilVisible:{type:Boolean,default:void 0},maxLiveNodes:{},liveNodeBuffer:{},nodeVirtual:{type:[Boolean,String],default:void 0},virtualScroll:{},renderAsFragment:{type:Boolean}},emits:["copy","copy-code","handleArtifactClick","click","mouseover","mouseout","virtual-state-change","height-change","render-settled","render-final","anchor-change"],setup(e,{expose:t,emit:n}){const i=e,s=n;function o(B){if(!(typeof Event<"u"&&B instanceof Event))return typeof B=="string"&&s("copy-code",B),void s("copy",B)}const r=Ws(),l=cn("markstreamNestedRendererProps",void 0);function a(B){const J=r?.vnode.props;return!!J&&(Object.prototype.hasOwnProperty.call(J,B)||Object.prototype.hasOwnProperty.call(J,String(B).replace(/[A-Z]/g,ue=>`-${ue.toLowerCase()}`)))}function u(B){var J,ue;const ce=i[B];return a(B)?ce:(ue=(J=l?.value)==null?void 0:J[B])!=null?ue:ce}const c=L(()=>{return(B=u("mode"))==="chat"||B==="minimal"||B==="docs"?B:"docs";var B}),d=L(()=>fE(u("typewriter"))),f=L(()=>d.value!=="off"),h=L(()=>u("domMode")==="minimal"?"minimal":"full"),g=L(()=>{return(B={mode:c.value,codeRenderer:u("codeRenderer"),renderCodeBlocksAsPre:u("renderCodeBlocksAsPre")}).renderCodeBlocksAsPre===!0?"pre":B.codeRenderer==="pre"||B.codeRenderer==="shiki"||B.codeRenderer==="monaco"?B.codeRenderer:B.renderCodeBlocksAsPre===!1||B.mode==="docs"?"monaco":"pre";var B}),m=L(()=>pTe[c.value]),y=L(()=>{var B;return(B=u("showTooltips"))!=null?B:m.value.showTooltips}),A=L(()=>{var B;return(B=u("fade"))!=null?B:m.value.fade}),b=L(()=>{var B;return(B=u("batchRendering"))!=null?B:m.value.batchRendering}),C=L(()=>{var B;return(B=u("initialRenderBatchSize"))!=null?B:m.value.initialRenderBatchSize}),v=L(()=>{var B;return(B=u("renderBatchSize"))!=null?B:m.value.renderBatchSize}),x=L(()=>{var B;return(B=u("renderBatchDelay"))!=null?B:m.value.renderBatchDelay}),S=L(()=>{var B;return(B=u("renderBatchBudgetMs"))!=null?B:m.value.renderBatchBudgetMs}),_=L(()=>{var B;return(B=u("renderBatchIdleTimeoutMs"))!=null?B:m.value.renderBatchIdleTimeoutMs}),I=L(()=>{var B;return(B=u("deferNodesUntilVisible"))!=null?B:m.value.deferNodesUntilVisible}),M=L(()=>{var B;return(B=u("maxLiveNodes"))!=null?B:m.value.maxLiveNodes}),$=L(()=>{var B;return(B=u("liveNodeBuffer"))!=null?B:m.value.liveNodeBuffer}),D=L(()=>{var B;return(B=u("nodeVirtual"))!=null?B:m.value.nodeVirtual}),T={get content(){return i.content},get nodes(){return i.nodes},get final(){return i.final},get parseOptions(){return u("parseOptions")},get customMarkdownIt(){return u("customMarkdownIt")},get debugPerformance(){return i.debugPerformance},get customHtmlTags(){return u("customHtmlTags")},get mode(){return u("mode")},get domMode(){return h.value},get htmlPolicy(){return u("htmlPolicy")},get viewportPriority(){return u("viewportPriority")},get viewportPriorityOptions(){return u("viewportPriorityOptions")},get codeBlockStream(){return u("codeBlockStream")},get codeBlockDarkTheme(){return u("codeBlockDarkTheme")},get codeBlockLightTheme(){return u("codeBlockLightTheme")},get codeBlockMonacoOptions(){return u("codeBlockMonacoOptions")},get codeRenderer(){return u("codeRenderer")},get renderCodeBlocksAsPre(){return u("renderCodeBlocksAsPre")},get codeBlockMinWidth(){return u("codeBlockMinWidth")},get codeBlockMaxWidth(){return u("codeBlockMaxWidth")},get codeBlockProps(){return u("codeBlockProps")},get mermaidProps(){return u("mermaidProps")},get d2Props(){return u("d2Props")},get infographicProps(){return u("infographicProps")},get showTooltips(){return y.value},get themes(){return u("themes")},get langs(){return u("langs")},get isDark(){return u("isDark")},get customId(){return u("customId")},get indexKey(){return i.indexKey},get typewriter(){return u("typewriter")},get smoothStreaming(){return i.smoothStreaming},get smoothStreamingOptions(){return u("smoothStreamingOptions")},get parseCoalesceMs(){return u("parseCoalesceMs")},get fade(){return A.value},get batchRendering(){return b.value},get initialRenderBatchSize(){return C.value},get renderBatchSize(){return v.value},get renderBatchDelay(){return x.value},get renderBatchBudgetMs(){return S.value},get renderBatchIdleTimeoutMs(){return _.value},get deferNodesUntilVisible(){return I.value},get maxLiveNodes(){return M.value},get liveNodeBuffer(){return $.value},get nodeVirtual(){return D.value},get virtualScroll(){return i.virtualScroll},get renderAsFragment(){return i.renderAsFragment}};function N(B){s("height-change",B)}function O(B){s("virtual-state-change",B)}function P(B){s("anchor-change",B)}const R=G(),q=G(null),j=G(null),W=G(null),z=Ss({1:null,2:null,3:null,4:null,5:null,6:null}),H=G(!1),ee=new Map,V=G(0),ie=G(0),se=G({paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}});function Z(B,J){return typeof B!="string"?J:B.trim()||J}function pe(B){const J=Number(B);return Number.isFinite(J)&&J>0?Math.max(1,Math.trunc(J)):640}const re=L(()=>{var B;const J=(B=T.viewportPriorityOptions)!=null?B:{},ue=Z(J.rootMargin,Kd);return{rootMargin:ue,heavyBlockMargin:Z(J.heavyBlockMargin,ue),maxTargets:pe(J.maxTargets)}}),fe=L(()=>{var B;return(B=re.value.rootMargin)!=null?B:Kd}),Ee=L(()=>{var B;return(B=re.value.maxTargets)!=null?B:640});function X(){var B,J;if(((B=i.virtualScroll)==null?void 0:B.enabled)!==!0)return null;const ue=(J=i.virtualScroll)==null?void 0:J.scrollRoot;return we(typeof ue=="function"?ue():ue)}function we(B){return B?typeof HTMLElement<"u"&&B instanceof HTMLElement?B:typeof B=="object"&&"value"in B?we(B.value):typeof B=="object"&&"$el"in B?we(B.$el):null:null}Kn(gO,re);const{isClient:Y,renderAsFragment:le,debugPerformanceEnabled:Ce,resolvedShowTooltips:ae,resolvedHtmlPolicy:oe,inheritedSmoothStreaming:Q,ownsTypewriterCursor:ne}=(function(B){const J=typeof window<"u",ue=Rh(),ce=cn("markstreamHtmlPolicy",void 0),be=cn("markstreamTypewriterCursor",void 0),Le=cn("markstreamSmoothStreaming",void 0),Re=L(()=>B.renderAsFragment===!0),je=L(()=>!!(B.debugPerformance&&J&&typeof console<"u")),it=L(()=>{var nt;if(typeof B.showTooltips=="boolean")return B.showTooltips;const Oe=(nt=ue.showTooltips)!=null?nt:ue["show-tooltips"];return Oe===""||Oe===!0||Oe==="true"||Oe!==!1&&Oe!=="false"&&void 0}),He=L(()=>{var nt,Oe;return(Oe=(nt=B.htmlPolicy)!=null?nt:ce?.value)!=null?Oe:"safe"}),Je=L(()=>be?.value!==!0);return{isClient:J,renderAsFragment:Re,debugPerformanceEnabled:je,resolvedShowTooltips:it,resolvedHtmlPolicy:He,inheritedSmoothStreaming:Le,inheritedTypewriterCursor:be,ownsTypewriterCursor:Je}})(T),{resolveViewportRoot:ge,resolveScrollContainer:Ae,isReverseFlexScrollRoot:_e,getNormalizedScrollTop:Ke,getOffsetTopWithinRoot:xe}=(function(B,J){function ue(){var je,it;return(it=(je=J.scrollRoot)==null?void 0:je.call(J))!=null?it:null}function ce(je){if(typeof window>"u")return null;const it=ue();if(it)return it;const He=je??B.value;if(!He)return null;const Je=He.ownerDocument||document,nt=Je.scrollingElement||Je.documentElement;let Oe=He;for(;Oe&&Oe!==Je.body&&Oe!==nt;){if(uTe(window.getComputedStyle(Oe))&&cTe(Oe))return Oe;Oe=Oe.parentElement}return null}function be(je){if(!J.isClient)return!1;try{const it=window.getComputedStyle(je);return!!(it.display||"").toLowerCase().includes("flex")&&(it.flexDirection||"").toLowerCase().endsWith("reverse")}catch{return!1}}function Le(je,it,He){var Je,nt;if(He)return Re(it);const Oe=je.scrollTop;if(!be(je))return Oe;const Xe=Oe<0?-Oe:Oe;return Math.max(0,((Je=je.scrollHeight)!=null?Je:0)-((nt=je.clientHeight)!=null?nt:0))-Xe}function Re(je){var it,He,Je,nt,Oe;const Xe=Number((it=je.scrollingElement)==null?void 0:it.scrollTop),ft=Number((Je=(He=je.documentElement)==null?void 0:He.scrollTop)!=null?Je:0),at=Number((Oe=(nt=je.body)==null?void 0:nt.scrollTop)!=null?Oe:0);return Math.max(0,Number.isFinite(Xe)?Xe:0,Number.isFinite(ft)?ft:0,Number.isFinite(at)?at:0)}return{resolveViewportRoot:ce,resolveScrollContainer:function(je){var it,He,Je,nt;const Oe=ue();if(Oe)return Oe;const Xe=ce((it=je??B.value)!=null?it:null);if(Xe)return Xe;const ft=(nt=(Je=je?.ownerDocument)!=null?Je:(He=B.value)==null?void 0:He.ownerDocument)!=null?nt:typeof document<"u"?document:null;return ft?.scrollingElement||ft?.documentElement||null},isReverseFlexScrollRoot:be,getNormalizedScrollTop:Le,getOffsetTopWithinRoot:function(je,it){const He=it.ownerDocument||je.ownerDocument||document;if((function(Xe,ft){return Xe===ft.documentElement||Xe===ft.body||Xe===ft.scrollingElement})(it,He))return je.getBoundingClientRect().top+Re(He);const Je=it.getBoundingClientRect(),nt=je.getBoundingClientRect(),Oe=Le(it,He,!1);return nt.top-Je.top+Oe}}})(R,{isClient:Y,scrollRoot:X});Kn("markstreamShowTooltips",ae),Kn("markstreamHtmlPolicy",oe),Kn("markstreamTypewriter",f),Kn("markstreamFade",L(()=>T.fade!==!1)),Kn("markstreamTypewriterCursor",L(()=>!0)),Kn("markstreamTextStreamState",ee),Kn("markstreamStreamVersion",V),Kn("markstreamParseOptions",L(()=>T.parseOptions)),Kn("markstreamCustomMarkdownIt",L(()=>T.customMarkdownIt));const{smoothStreamingEnabled:Ne,renderContent:et,requestedFinal:ut,effectiveFinal:yt}=(function(B,J){const ue=lTe(_t(_t({},aTe),B.smoothStreamingOptions)),ce=L(()=>{var Oe,Xe,ft;return B.smoothStreaming!==!1&&!((Oe=B.nodes)!=null&&Oe.length)&&(B.smoothStreaming===!0||!((Xe=J.inheritedSmoothStreaming)!=null&&Xe.value))&&(B.smoothStreaming===!0||fE(B.typewriter)!=="off"||((ft=B.maxLiveNodes)!=null?ft:0)<=0)}),be=G(!J.isClient||B.smoothStreaming===!0);mn(()=>{be.value=!0});const Le=L(()=>be.value&&ce.value),Re=L(()=>{var Oe;return Le.value?ue.visible.value:(Oe=B.content)!=null?Oe:""}),je=L(()=>{var Oe,Xe;const ft=(Oe=B.parseOptions)!=null?Oe:{};return(Xe=B.final)!=null?Xe:ft.final}),it=L(()=>{const Oe=je.value;return Le.value&&Oe!=null?!!Oe&&ue.caughtUp.value:Oe});let He=0,Je=!1;function nt(){He=0,Je=!1}return qe([()=>B.content,()=>B.nodes,Le,je],([Oe,Xe,ft,at])=>{if(Xe?.length)return nt(),void ue.reset("");const Lt=Oe??"";if(!ft)return nt(),ue.reset(Lt),void(at&&ue.finish({flush:!0}));const At=ue.source.value;if(Lt){if(Lt!==At)if(Lt.startsWith(At)){const Ot=Lt.slice(At.length),Kt=ue.pendingChars.value;Ot.length<=8?(He++,Je||He>=2&&Kt<=8?(Je=!0,ue.reset(Lt)):ue.enqueue(Ot)):(nt(),ue.enqueue(Ot))}else nt(),ue.reset(Lt)}else nt(),ue.reset("");at&&ue.finish()},{immediate:!0}),{smoothStream:ue,smoothStreamingEligible:ce,smoothStreamingEnabled:Le,renderContent:Re,requestedFinal:je,effectiveFinal:it}})(T,{isClient:Y,inheritedSmoothStreaming:Q}),Mt=ut.value===!0;Kn("markstreamSmoothStreaming",Ne);const Ze=G(!1),Ge=G(!1),lt=G(!1);let tt="",It=!1,Ut=null;function fn(){Y&&Ut!=null&&(window.clearTimeout(Ut),Ut=null)}function Nn(){Ze.value=!1,fn()}function Qt(B,J){if(!Ce.value)return;const ue=(function(){if(!Ce.value)return null;const ce=bn(un),be=bn(Dn),Le=Math.max(wn,be);if(ce<=0&&Le<=0)return null;const Re={total:ce,maxPerFrame:Le,byLabel:(je=un,Object.fromEntries(Array.from(je.entries()).sort((it,He)=>He[1]-it[1]||it[0].localeCompare(He[0]))))};var je;return un.clear(),Dn.clear(),wn=0,Re})();console.info(`[markstream-vue][perf] ${B}`,ue?yn(_t({},J),{layoutReads:ue}):J)}qe([()=>T.indexKey,()=>T.customId],()=>{var B,J;Nn(),Ge.value=!1,lt.value=!((B=i.nodes)!=null&&B.length)&&ut.value!==!0&&!!i.content,tt=(J=et.value)!=null?J:"",It=tt.length>0},{flush:"sync"}),qe([()=>i.content,()=>i.nodes,ut],([B,J,ue])=>{!J?.length&&ue!==!0&&B&&(lt.value=!0)},{flush:"sync",immediate:!0}),qe([et,()=>i.nodes,ut],([B,J,ue])=>{const ce=B??"";return J?.length||ue===!0?(Nn(),Ge.value=!1,tt=ce,void(It=!0)):(ce.length>0&&(lt.value=!0),It?(tt&&ce.length>tt.length&&ce.startsWith(tt)?(Ze.value=!0,Ge.value=!0,Y&&(fn(),Ut=window.setTimeout(()=>{var be;Ut=null,yt.value===!0||(be=i.nodes)!=null&&be.length||(yf(),Ze.value=!1,Ta())},1200))):(ce.length<tt.length||!ce.startsWith(tt))&&(Nn(),Ge.value=!1),void(tt=ce)):(tt=ce,void(It=!0)))},{flush:"sync",immediate:!0});const un=new Map,Dn=new Map;let pn=!1,wn=0;function bn(B){let J=0;for(const ue of B.values())J+=ue;return J}function Xn(){wn=Math.max(wn,bn(Dn)),Dn.clear(),pn=!1}function Ue(B){B.maxPerFrame=Math.max(Number(B.maxPerFrame||0),Number(B.currentFrameTotal||0)),B.currentFrameTotal=0,B.frameScheduled=!1}function st(B){var J,ue;Ce.value&&(un.set(B,((J=un.get(B))!=null?J:0)+1),Dn.set(B,((ue=Dn.get(B))!=null?ue:0)+1),(function(ce){const be=(function(){if(!Y||typeof window>"u")return null;const Le=window;if(Le.__markstreamLayoutReadPerformance)return Le.__markstreamLayoutReadPerformance;const Re={total:0,maxPerFrame:0,byLabel:{}};return Le.__markstreamLayoutReadPerformance=Re,Re})();be&&(be.total=Number(be.total||0)+1,be.byLabel[ce]=Number(be.byLabel[ce]||0)+1,be.currentFrameTotal=Number(be.currentFrameTotal||0)+1,be.frameScheduled||(be.frameScheduled=!0,typeof window.requestAnimationFrame!="function"?typeof queueMicrotask!="function"?setTimeout(()=>Ue(be),0):queueMicrotask(()=>Ue(be)):window.requestAnimationFrame(()=>Ue(be))))})(B),pn||(pn=!0,Y&&typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(Xn):typeof queueMicrotask!="function"?setTimeout(Xn,0):queueMicrotask(Xn)))}function ct(B,J){return st(B),J()}const ot=T.customId?`renderer-${T.customId}`:`renderer-${Date.now()}-${Math.random().toString(36).slice(2)}`,sn=(function(B){const J=new Map;return{scope:B,cache:J,clear:()=>J.clear()}})(ot),Nt=ot;Kn(wO,sn);const Tn=qs(()=>T.customId),{effectiveCustomHtmlTagsSet:fs,mergedParseOptions:vi,parsedNodes:Dt,getParsedNodesDirtyStartIndex:Is,getParsedNodesRevision:Ei}=oTe(T,{instanceMsgId:ot,renderContent:et,effectiveFinal:yt,smoothStreamingEnabled:Ne,debugPerformanceEnabled:Ce,customComponentsMap:Tn,logPerf:Qt});qe(Dt,()=>{Ze.value||sn.clear(),V.value+=1},{immediate:!0});const Pn=L(()=>({customId:T.customId,customHtmlTags:vi.value.customHtmlTags,parseOptions:T.parseOptions,customMarkdownIt:T.customMarkdownIt,htmlPolicy:oe.value,viewportPriority:T.viewportPriority,viewportPriorityOptions:re.value,mode:c.value,domMode:T.domMode,codeRenderer:g.value,codeBlockStream:T.codeBlockStream,codeBlockDarkTheme:T.codeBlockDarkTheme,codeBlockLightTheme:T.codeBlockLightTheme,codeBlockMonacoOptions:T.codeBlockMonacoOptions,renderCodeBlocksAsPre:T.renderCodeBlocksAsPre,codeBlockMinWidth:T.codeBlockMinWidth,codeBlockMaxWidth:T.codeBlockMaxWidth,codeBlockProps:T.codeBlockProps,mermaidProps:T.mermaidProps,d2Props:T.d2Props,infographicProps:T.infographicProps,showTooltips:ae.value,themes:T.themes,langs:T.langs,isDark:T.isDark,typewriter:f.value,smoothStreamingOptions:T.smoothStreamingOptions,parseCoalesceMs:T.parseCoalesceMs,fade:T.fade}));Kn("markstreamNestedRendererProps",Pn);const bs=L(()=>Dt.value),Lo=L(()=>Dt.value.length),Oi=G(null),co=G(null),Wi=G(null),As=G(null),fo=i.indexKey!=null&&String(i.indexKey).startsWith("list-item-"),Pi=!fo&&T.customId?lE(T.customId):null,es=L(()=>Pi?(nk.value,lE(T.customId)):null),Ai=L(()=>{var B;return!!(!le.value&&T.customId&&!fo&&((B=es.value)!=null&&B.enabled))}),No=L(()=>!!(Y&&Ai.value)),Ci=L(()=>{var B;return!!(!le.value&&((B=i.virtualScroll)!=null&&B.enabled))}),Ti=L(()=>Ci.value),Yt=G(!1);mn(()=>{Yt.value=!0});const vn=L(()=>!!(Y&&Ci.value));Kn("markstreamHostScrollManaged",vn);const ts=L(()=>!!(Yt.value&&vn.value)),fi=L(()=>No.value||vn.value),Fr=L(()=>No.value||ts.value),Ni=L(()=>{var B;return fi.value&&((B=es.value)==null?void 0:B.textEstimation)!==!1});function hi(){const B=ie.value||ct("getMeasuredContainerWidth.clientWidth",()=>{var J;return((J=R.value)==null?void 0:J.clientWidth)||0});return Number.isFinite(B)&&B>0?B:0}const ho=L(()=>{const B=hi();return B>0?Math.max(1,Math.round(B)):640}),Xs=L(()=>{var B,J;return!(yt.value!==!0||Ci.value||c.value!=="chat"&&c.value!=="minimal"||a("maxLiveNodes")||a("liveNodeBuffer")||(B=i.nodes)!=null&&B.length||lt.value||!(((J=T.maxLiveNodes)!=null?J:0)<=0))}),ns=L(()=>{var B;return Xs.value?50:Math.max(1,(B=T.maxLiveNodes)!=null?B:320)}),qi=L(()=>{var B;return Xs.value?16:Math.max(0,(B=T.liveNodeBuffer)!=null?B:60)}),an=L(()=>{var B;return!le.value&&T.nodeVirtual!==!1&&!(((B=T.maxLiveNodes)!=null?B:0)<=0&&!Xs.value)&&(T.nodeVirtual===!0?Dt.value.length>0:Dt.value.length>ns.value)}),eo=L(()=>an.value||No.value||vn.value),Us=L(()=>T.viewportPriority!==!1),Fo=L(()=>!!Us.value&&!H.value);var Ms;Ms=L(()=>Us.value),Kn(mO,Ms);const Es=L(()=>{var B;return!(le.value||T.deferNodesUntilVisible===!1||((B=T.maxLiveNodes)!=null?B:0)<=0||an.value||Dt.value.length>900||T.viewportPriority===!1)}),to=PIe(B=>{var J;return ge((J=B??R.value)!=null?J:null)},Us),{requestFrame:Li,cancelFrame:wi,hasIdleCallback:Vo,isTestEnv:Ts}=(function(B){const J=B.isClient&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame.bind(window):null,ue=B.isClient&&typeof window.cancelAnimationFrame=="function"?window.cancelAnimationFrame.bind(window):null,ce=B.isClient&&typeof window.requestIdleCallback=="function",be=(function(){var Le;if(typeof globalThis>"u"||!("process"in globalThis))return;const Re=(Le=Object.getOwnPropertyDescriptor(globalThis,"process"))==null?void 0:Le.value;return Re?.env})();return{requestFrame:J,cancelFrame:ue,hasIdleCallback:ce,isTestEnv:be?.NODE_ENV==="test"}})({isClient:Y}),po=L(()=>yt.value===!0&&!Ci.value),{resolvedBatchSize:Ks,resolvedInitialBatch:Zo,batchingEnabled:Be,incrementalRenderingActive:Pe,renderedCount:dt,previousRenderContext:St,adaptiveBatchSize:An,previousBatchConfig:pi}=(function(B,J){var ue;const ce=L(()=>{var nt;const Oe=Math.trunc((nt=B.renderBatchSize)!=null?nt:80);return Number.isFinite(Oe)?Math.max(0,Oe):0}),be=L(()=>{var nt;const Oe=Math.trunc((nt=B.initialRenderBatchSize)!=null?nt:ce.value);return Number.isFinite(Oe)?Math.max(0,Oe):ce.value}),Le=L(()=>!J.renderAsFragment.value&&B.batchRendering!==!1&&ce.value>0&&J.isClient&&!J.isTestEnv),Re=G(0),je=G({key:B.indexKey,total:0}),it=G(Math.max(1,ce.value||1)),He=L(()=>{var nt,Oe,Xe;return Le.value&&!((nt=J.continuousStreaming)!=null&&nt.value)&&!((Oe=J.forceFullRenderFinalContent)!=null&&Oe.value)&&((Xe=B.maxLiveNodes)!=null?Xe:0)<=0}),Je=G({batchSize:ce.value,initial:be.value,delay:(ue=B.renderBatchDelay)!=null?ue:16,enabled:He.value});return{resolvedBatchSize:ce,resolvedInitialBatch:be,batchingEnabled:Le,incrementalRenderingActive:He,renderedCount:Re,previousRenderContext:je,adaptiveBatchSize:it,previousBatchConfig:Je}})(T,{isClient:Y,isTestEnv:Ts,renderAsFragment:le,forceFullRenderFinalContent:po,continuousStreaming:L(()=>Ge.value&&yt.value!==!0)}),hs=L(()=>{var B;return!le.value&&T.batchRendering!==!1&&Ks.value>0&&!Ts&&((B=T.maxLiveNodes)!=null?B:0)<=0&&!po.value}),is=L(()=>hs.value),Ls=L(()=>fi.value||is.value),Ui=L(()=>{var B;return Ls.value&&((B=es.value)==null?void 0:B.codeBlockEstimation)!==!1}),On=new Map,Cs=new Map,Do=new WeakMap;let ws=null;const tl=new WeakMap,xi=new Map,dr=[];let rt=[],Se=[],U=-1;const me=Ul(dr),ke=new Set,ze=G(0);let Ye=0;const Ve=G(0),wt=L(()=>(Ve.value,Array.from(On.entries()).sort((B,J)=>B[0]-J[0]))),pt=G(null),Ht=G(null);let Gt,Cn=null,Qn=0,jt=null;function Rt(){Gt.markFallbackHeightPrefixDirty()}function Bn(B){return Gt.getFallbackNodeHeight(B)}function ei(B,J){return Gt.estimateHeightRange(B,J)}function ji(B){return Gt.estimateIndexForOffset(B)}const{activeRestoreAnchor:$o,getRelativeScrollTopWithinContainer:Go,setRelativeScrollTopWithinContainer:De,resolveAnchorOffset:vt,clearRestoreReconcile:mt,scheduleRestoreReconcile:Jt,captureRestoreAnchor:Ki,restoreAnchor:Bo,getAnchorDrift:bl}=(function(B){const{isClient:J,containerRef:ue,parsedNodeCount:ce,requestFrame:be,cancelFrame:Le,resolveScrollContainer:Re,getNormalizedScrollTop:je,getOffsetTopWithinRoot:it,isReverseFlexScrollRoot:He,estimateIndexForOffset:Je,estimateHeightRange:nt,getFallbackNodeHeight:Oe,clamp:Xe}=B,ft=G(null);let at=null,Lt=[];function At(){const rn=Re(),En=ue.value;if(!rn||!En)return null;const zn=rn.ownerDocument||En.ownerDocument||document;if(rn===zn.documentElement||rn===zn.body||rn===zn.scrollingElement){const yi=En.getBoundingClientRect();return Math.max(0,-yi.top)}return Math.max(0,je(rn,zn,!1)-it(En,rn))}function Ot(rn){var En;const zn=Re(),yi=ue.value;if(!zn||!yi)return;const yo=Math.max(0,rn),no=zn.ownerDocument||yi.ownerDocument||document,Cl=no.defaultView||(typeof window<"u"?window:null);if(zn===no.documentElement||zn===no.body||zn===no.scrollingElement){const Xl=je(zn,no,!0)+yi.getBoundingClientRect().top;return void((En=Cl?.scrollTo)==null||En.call(Cl,0,Math.max(0,Xl+yo)))}cE(zn,no,it(yi,zn)+yo,{isReverseFlexScrollRoot:Xl=>{var v1;return(v1=He?.(Xl))!=null&&v1},getNormalizedScrollTop:je})}function Kt(rn){const En=ce.value,zn=Xe(rn.nodeIndex,0,Math.max(0,En-1));return nt(0,zn)+Math.max(0,rn.offsetWithinNodePx)}function on(){if(at!=null&&(Le?.(at),at=null),J)for(const rn of Lt)window.clearTimeout(rn);Lt=[]}function Xt(rn){const En=Kt(rn),zn=At();zn!=null&&Math.abs(zn-En)<=.5||Ot(En)}return{activeRestoreAnchor:ft,getRelativeScrollTopWithinContainer:At,setRelativeScrollTopWithinContainer:Ot,resolveAnchorOffset:Kt,clearRestoreReconcile:on,applyRestoreAnchor:Xt,scheduleRestoreReconcile:function(){ft.value&&J&&at==null&&(at=be?be(()=>{at=null,ft.value&&Xt(ft.value)}):null,at==null&&ft.value&&Xt(ft.value))},captureRestoreAnchor:function(){const rn=At(),En=ce.value;if(rn==null||En<=0)return null;const zn=Xe(Je(rn+1),0,En-1),yi=nt(0,zn),yo=Oe(zn);return{nodeIndex:zn,offsetWithinNodePx:Xe(rn-yi,0,Math.max(0,yo-1))}},restoreAnchor:function(rn){const En=ce.value;if(ft.value={nodeIndex:Xe(rn.nodeIndex,0,Math.max(0,En-1)),offsetWithinNodePx:Math.max(0,rn.offsetWithinNodePx)},on(),Xt(ft.value),J)for(const zn of[0,120,280,480])Lt.push(window.setTimeout(()=>{ft.value&&Xt(ft.value)},zn))},getAnchorDrift:function(rn){const En=At();return En==null?null:En-Kt(rn)}}})({isClient:Y,containerRef:R,parsedNodeCount:Lo,requestFrame:Li,cancelFrame:wi,resolveScrollContainer:()=>pt.value||Ae(),getNormalizedScrollTop:Ke,getOffsetTopWithinRoot:xe,isReverseFlexScrollRoot:_e,estimateIndexForOffset:ji,estimateHeightRange:ei,getFallbackNodeHeight:Bn,clamp:vo}),{nodeHeights:ss,heightStats:Ns,heightTreeSize:du,heightSumTree:lf,heightKnownTree:x9,averageNodeHeight:Qh,resetHeightMeasurements:ug,pruneHeightMeasurements:cg,rebuildHeightTrees:$c,recordNodeHeight:dg,removeNodeHeights:S9,exportHeightCache:_9,importHeightCache:I9,fenwickRangeSum:ye}=(function(B={}){const J=Ss({}),ue=Ss({total:0,count:0}),ce=G(0),be=G([]),Le=G([]);function Re(){for(const Oe of Object.keys(J))delete J[Number(Oe)];ue.total=0,ue.count=0,ce.value=0,be.value=[],Le.value=[]}function je(Oe,Xe,ft){for(let at=Xe+1;at<Oe.length;at+=at&-at)Oe[at]+=ft}function it(Oe,Xe){let ft=0;for(let at=Xe+1;at>0;at-=at&-at)ft+=Oe[at];return ft}function He(Oe){ce.value=Oe;const Xe=new Array(Oe+1).fill(0),ft=new Array(Oe+1).fill(0);for(const[at,Lt]of Object.entries(J)){const At=Number(at),Ot=Number(Lt);!Number.isFinite(At)||At<0||At>=Oe||!Number.isFinite(Ot)||Ot<=0||(je(Xe,At,Ot),je(ft,At,1))}be.value=Xe,Le.value=ft}function Je(Oe){if(!Number.isInteger(Oe)||Oe<0)return!1;const Xe=J[Oe];if(!Number.isFinite(Xe)||Xe<=0)return!1;if(delete J[Oe],ue.total=Math.max(0,ue.total-Xe),ue.count=Math.max(0,ue.count-1),ce.value>Oe){const ft=be.value,at=Le.value;ft.length&&at.length&&(je(ft,Oe,-Xe),je(at,Oe,-1))}return!0}const nt=L(()=>ue.count>0?Math.max(12,ue.total/ue.count):32);return{nodeHeights:J,heightStats:ue,heightTreeSize:ce,heightSumTree:be,heightKnownTree:Le,averageNodeHeight:nt,resetHeightMeasurements:Re,pruneHeightMeasurements:function(Oe){if(Oe<=0)return void Re();let Xe=0,ft=0;for(const[at,Lt]of Object.entries(J)){const At=Number(at),Ot=Number(Lt);!Number.isFinite(At)||At<0||At>=Oe||!Number.isFinite(Ot)||Ot<=0?delete J[At]:(Xe+=Ot,ft++)}ue.total=Xe,ue.count=ft},rebuildHeightTrees:He,recordNodeHeight:function(Oe,Xe,ft={}){(function(at,Lt,At={}){var Ot;if(!Number.isFinite(Lt)||Lt<=0)return!1;const Kt=J[at];if(Kt&&(At.allowShrink===!1&&Lt<Kt||Math.abs(Lt-Kt)<=1))return!1;if(J[at]=Lt,Kt?ue.total+=Lt-Kt:(ue.total+=Lt,ue.count++),ce.value>at){const on=be.value,Xt=Le.value;if(on.length&&Xt.length)if(Kt){const rn=Lt-Kt;rn!==0&&je(on,at,rn)}else je(on,at,Lt),je(Xt,at,1)}At.notify!==!1&&((Ot=B.onHeightRecorded)==null||Ot.call(B))})(Oe,Xe,yn(_t({},ft),{notify:!0}))},removeNodeHeight:function(Oe,Xe={}){var ft;const at=Je(Oe);return at&&Xe.notify!==!1&&((ft=B.onHeightRecorded)==null||ft.call(B)),at},removeNodeHeights:function(Oe,Xe={}){var ft;let at=0;for(const Lt of Oe)Je(Number(Lt))&&at++;return at>0&&Xe.notify!==!1&&((ft=B.onHeightRecorded)==null||ft.call(B)),at},exportHeightCache:function(){return Object.entries(J).map(([Oe,Xe])=>({index:Number(Oe),height:Number(Xe)})).filter(Oe=>Number.isFinite(Oe.index)&&Oe.index>=0&&Number.isFinite(Oe.height)&&Oe.height>0).sort((Oe,Xe)=>Oe.index-Xe.index)},importHeightCache:function(Oe,Xe={}){var ft;if(!Array.isArray(Oe))return;const at=ce.value;let Lt=!1;if(Xe.mode!=="merge"){const At=Object.keys(J);if(At.length>0){for(const Ot of At)delete J[Number(Ot)];Lt=!0}}for(const At of Oe){const Ot=Number(At.index),Kt=Number(At.height);if(!Number.isInteger(Ot)||Ot<0||at>0&&Ot>=at||!Number.isFinite(Kt)||Kt<=0)continue;const on=J[Ot];on&&Math.abs(on-Kt)<=1||(J[Ot]=Kt,Lt=!0)}Lt&&((function(){let At=0,Ot=0;const Kt=ce.value;for(const[on,Xt]of Object.entries(J)){const rn=Number(on),En=Number(Xt);!Number.isFinite(rn)||rn<0||Kt>0&&rn>=Kt||!Number.isFinite(En)||En<=0?delete J[rn]:(At+=En,Ot++)}ue.total=At,ue.count=Ot})(),at>0&&He(at),(ft=B.onHeightRecorded)==null||ft.call(B))},fenwickRangeSum:function(Oe,Xe,ft){if(ft<=Xe)return 0;const at=it(Oe,ft-1);return Xe<=0?at:at-it(Oe,Xe-1)}}})({onHeightRecorded:()=>{Rt(),vn.value&&d1(),$o.value&&Jt(),Ht.value&&gf(),Di("node-resize")}});function Ie(B){Number.isInteger(B)&&B>=0&&ke.add(B)}function We(B){for(const J of B)Ie(Number(J))}function $t(B){Ye++;let J=!0;try{const ue=B();return J=ue!==!1,ue}finally{Ye--,Ye===0&&J&&ze.value++}}function ln(){rt=[],Se=[],U=-1,ke.clear(),me.value=dr}function Sn(){ln(),$t(()=>ug()),xi.clear()}function ti(B){!Number.isInteger(B)||B<0||B>=Dt.value.length||xi.set(B,e1(B))}function Fi(B,J,ue={}){const ce=ss[B];Ie(B),dg(B,J,ue);const be=ss[B];return Object.is(ce,be)?(ke.delete(B),!1):(be&&be>0?ti(B):ce&&xi.delete(B),!0)}function go(B,J){const ue=ct("getNodeLayoutHeight.slot.offsetHeight",()=>{var ce,be;return(be=(ce=On.get(B))==null?void 0:ce.offsetHeight)!=null?be:0});return ue>0?ue:ct("getNodeLayoutHeight.content.offsetHeight",()=>J.offsetHeight)}function Bc(B,J={}){J.mode!=="merge"?ln():We(B.map(ue=>ue.index)),$t(()=>I9(B,J)),t4()}const Dr=L(()=>Es.value&&Fo.value),Fj=L(()=>{var B;return!le.value&&T.batchRendering!==!1&&Ks.value>0&&((B=T.maxLiveNodes)!=null?B:0)<=0}),Dj=L(()=>!le.value&&Mt&&yt.value===!0&&!an.value&&!Ci.value&&!Ai.value&&!Dr.value&&!Fj.value),lA=L(()=>!!to&&Dr.value),aA=L(()=>an.value||vn.value),{focusIndex:Ia,liveRange:mo,updateLiveRange:Yh}=(function(B,J){const{parsedNodeCount:ue,virtualizationEnabled:ce,maxLiveNodesResolved:be,liveNodeBufferResolved:Le,clamp:Re}=J,je=Le??L(()=>{var Je;return Math.max(0,(Je=B.liveNodeBuffer)!=null?Je:60)}),it=G(0),He=Ss({start:0,end:0});return{liveNodeBufferResolved:je,focusIndex:it,liveRange:He,updateLiveRange:function(){const Je=ue.value;if(!ce.value||Je===0)return He.start=0,void(He.end=Je);const nt=Math.min(be.value,Je),Oe=je.value,Xe=Re(it.value-Oe,0,Math.max(0,Je-nt));He.start=Xe,He.end=Math.min(Je,Xe+nt)}}})(T,{parsedNodeCount:Lo,virtualizationEnabled:an,maxLiveNodesResolved:ns,liveNodeBufferResolved:qi,clamp:vo}),Yl=new Map,zc=new Map,fu=new Map,fg=[],Ma=new Map,hu=new Set,uA=G(0);let M9=!1;const cA=L(()=>(uA.value,hu.size)),$r=new Map,Jl=new Map,dA=G(0),E9=L(()=>{dA.value;let B=0;for(const J of $r.values())B+=Math.max(0,J);return B});let Br=null;const hg=L(()=>{if(!an.value)return Dt.value.length;const B=qi.value,J=Math.max(mo.end+B,Zo.value),ue=Math.min(Dt.value.length,J);return Math.max(dt.value,ue)});function pg(){M9||(M9=!0,queueMicrotask(()=>{M9=!1,uA.value+=1}))}function fA(B,J,ue="node-resize"){if(!Y||typeof window>"u")return null;const ce=window.setTimeout(()=>{hu.delete(ce)&&pg();try{J()}finally{Di(ue)}},Math.max(0,B));return hu.add(ce),pg(),ce}function gg(B){Y&&B!=null&&(hu.delete(B)&&pg(),window.clearTimeout(B))}function hA(){if(Y&&typeof window<"u")for(const B of hu)window.clearTimeout(B);hu.size&&(hu.clear(),pg()),fg.length=0,fu.clear()}function $j(B){q.value=B}function Bj(B){j.value=B}function zj(B){W.value=B}const{cancelScheduledFocusSync:T9,scheduleFocusSync:Al}=(function(B){const{isClient:J,containerRef:ue,virtualizationEnabled:ce,requestFrame:be,cancelFrame:Le,syncFocusToScroll:Re}=B;let je=null;function it(){var Je,nt,Oe;return(Oe=(nt=(Je=ue.value)==null?void 0:Je.ownerDocument)==null?void 0:nt.defaultView)!=null?Oe:typeof window<"u"?window:null}function He(){if(!je)return;const Je=it();je.viaTimeout?Je?Je.clearTimeout(je.id):clearTimeout(je.id):Le?.(je.id),je=null}return{cancelScheduledFocusSync:He,scheduleFocusSync:function(Je={}){if(!ce.value)return;if(!J)return void Re(!0);if(Je.immediate)return He(),void Re(!0);if(je)return;const nt=()=>{je=null,Re()};if(be)return void(je={id:be(nt),viaTimeout:!1});const Oe=it();je={id:Oe?Oe.setTimeout(nt,16):setTimeout(nt,16),viaTimeout:!0}}}})({isClient:Y,containerRef:R,virtualizationEnabled:an,requestFrame:Li,cancelFrame:wi,syncFocusToScroll:function(B=!1){var J;if(!an.value)return;const ue=pt.value||Ae();if(!ue)return;const ce=ue.ownerDocument||((J=R.value)==null?void 0:J.ownerDocument)||document,be=ce?.defaultView||(typeof window<"u"?window:null),Le=ue===ce?.documentElement||ue===ce?.body,Re=Dt.value.length;if(Re<=0)return;if(!Le&&Re>0&&_e(ue)){const at=ct("syncFocusToScroll.clientHeight",()=>ue.clientHeight||0),Lt=ct("syncFocusToScroll.scrollTop",()=>ue.scrollTop),At=Lt<0?-Lt:Lt;return void yg(vo((je=Math.max(0,At)+.5*Math.max(0,at),Gt.estimateIndexForOffsetFromEnd(je)),0,Math.max(0,Re-1)),B)}var je;const it=(function(at,Lt,At,Ot){const Kt=R.value;if(!Kt)return null;const on=Ot?0:ct("syncFocusToScroll.model.root.getBoundingClientRect",()=>at.getBoundingClientRect().top),Xt=ct("syncFocusToScroll.model.container.getBoundingClientRect",()=>Kt.getBoundingClientRect().top),rn=Math.max(0,on-Xt),En=Ot?ct("syncFocusToScroll.model.viewport.clientHeight",()=>{var zn,yi,yo,no;return(no=(yo=(yi=At?.innerHeight)!=null?yi:(zn=Lt.documentElement)==null?void 0:zn.clientHeight)!=null?yo:at.clientHeight)!=null?no:0}):ct("syncFocusToScroll.model.root.clientHeight",()=>at.clientHeight);return vo(ji(rn+.5*Math.max(0,En)),0,Math.max(0,Dt.value.length-1))})(ue,ce,be,Le);if(it!=null)return void yg(it,B);const He=Le?null:ct("syncFocusToScroll.root.getBoundingClientRect",()=>ue.getBoundingClientRect()),Je=Le?0:He.top,nt=Le?ct("syncFocusToScroll.viewport.clientHeight",()=>{var at,Lt;return(Lt=(at=be?.innerHeight)!=null?at:ue.clientHeight)!=null?Lt:0}):He.bottom,Oe=wt.value;let Xe=null,ft=null;for(const[at,Lt]of Oe){if(!Lt)continue;const At=ct("syncFocusToScroll.slot.getBoundingClientRect",()=>Lt.getBoundingClientRect());At.bottom<=Je||At.top>=nt||(Xe==null&&(Xe=at),ft=at)}if(Xe==null||ft==null){const at=R.value;if(!at)return;const Lt=Le?{top:0}:ct("syncFocusToScroll.fallback.root.getBoundingClientRect",()=>ue.getBoundingClientRect()),At=ct("syncFocusToScroll.fallback.scrollTop",()=>Ke(ue,ce,Le)),Ot=Le?(()=>{const on=ct("syncFocusToScroll.fallback.container.getBoundingClientRect",()=>at.getBoundingClientRect()),Xt=(Le?0:Lt.top)-on.top;return Math.max(0,Xt)})():(()=>{const on=xe(at,ue);return Math.max(0,At-on)})(),Kt=Le?ct("syncFocusToScroll.fallback.viewport.clientHeight",()=>{var on,Xt,rn,En;return(En=(rn=(Xt=be?.innerHeight)!=null?Xt:(on=ce?.documentElement)==null?void 0:on.clientHeight)!=null?rn:ue.clientHeight)!=null?En:0}):ct("syncFocusToScroll.fallback.root.clientHeight",()=>ue.clientHeight);return void yg(vo(ji(Ot+.5*Math.max(0,Kt)),0,Math.max(0,Dt.value.length-1)),!0)}yg(Math.round((Xe+ft)/2),B)}}),{visibleNodeIndices:L9,nodeVisibilityHandles:af,nodeVisibilityWatchStops:mg,nodeVisibilityFallbackTimers:pA,clearVisibilityFallback:vg,markNodeVisible:pu,cleanupNodeVisibility:Rj,destroyNodeVisibilityState:N9}=rTe({isClient:Y,shouldTrackVisibleNodeIndices:()=>Dr.value,shouldCleanupNodeVisibility:()=>an.value,onNodeMarkedVisible:B=>{an.value?Al():Ia.value=vo(B,0,Math.max(0,Dt.value.length-1))},onNodeVisibilityCleaned:B=>{On.delete(B)&&HA()}}),{cleanupScrollListener:gA,setupScrollListener:Oj}=(function(B){const{isClient:J,virtualizationEnabled:ue,listenerEnabled:ce,scrollRootElement:be,resolveScrollContainer:Le,scheduleFocusSync:Re,onScroll:je}=B;let it=null,He=null;function Je(){it&&(it(),it=null),He=null,be.value=null}function nt(Oe){const Xe=B.getScrollTop?B.getScrollTop(Oe):Oe.scrollTop;return Math.max(0,Number.isFinite(Xe)?Math.abs(Xe):0)}return{cleanupScrollListener:Je,setupScrollListener:function(){if(!J)return;if(!((Oe=ce?.value)!=null?Oe:ue.value))return void Je();var Oe;const Xe=Le();if(!Xe)return void Je();if(be.value===Xe&&it)return;Je(),He=nt(Xe);const ft=()=>{if(je?.(),ue.value){const at=(function(Lt){const At=nt(Lt),Ot=He;He=At;const Kt=Math.max(480,.75*(Lt.clientHeight||0));return Ot==null?At>Kt?{immediate:!0}:void 0:Math.abs(At-Ot)>Kt?{immediate:!0}:void 0})(Xe);at?Re(at):Re()}};Xe.addEventListener("scroll",ft,{passive:!0}),be.value=Xe,it=()=>{Xe.removeEventListener("scroll",ft)}}}})({isClient:Y,virtualizationEnabled:an,listenerEnabled:aA,scrollRootElement:pt,resolveScrollContainer:Ae,scheduleFocusSync:Al,onScroll:function(){const B=Ht.value;if(!B)return;const J=Xh();if(!J||(function(ce){if(o1()>=Qn)return jt=null,!1;const be=jt;if(be==null)return!0;const Le=Math.abs(ce.scrollTop-be)<=2;return Le||(jt=null),Le})(J))return;const ue=TA(J);ue!=null?(ue<-32||Math.abs(Math.max(0,ue)-Math.max(0,B.distanceFromBottomPx))>32)&&pf("restore"):pf("restore")},getScrollTop:B=>{var J;const ue=B.ownerDocument||((J=R.value)==null?void 0:J.ownerDocument)||document,ce=B===ue.documentElement||B===ue.body||B===ue.scrollingElement;return ct("scrollListener.getScrollTop",()=>Ke(B,ue,ce))}});function yg(B,J=!1){const ue=vo(B,0,Math.max(0,Dt.value.length-1));!J&&Math.abs(ue-Ia.value)<=1||(Ia.value=ue,Yh())}function vo(B,J,ue){return Math.min(Math.max(B,J),ue)}function F9(B=Dt.value.length){const J=Is();return!Number.isInteger(J)||J<0?B:vo(J,0,B)}function D9(B){return B?.firstElementChild}function mA(B,J){var ue;return B?(ue=B.matches)!=null&&ue.call(B,J)?B:B.querySelector(J):null}function Pj(B,J){B<1||B>6||(z[B]=J)}function vA(){if(!fi.value)return void(ie.value=0);const B=ct("updateExperimentContainerWidth.clientWidth",()=>{var J,ue;return(ue=(J=R.value)==null?void 0:J.clientWidth)!=null?ue:0});ie.value=B>0?B:0}let Jh=null;function $9(){Jh?.disconnect(),Jh=null}const yA=op("ViewportDeferredMarkdownCodeBlockNode",Dl({loader:()=>Bi(null,null,function*(){return(yield vs(()=>import("./index5-D0Y6cLP4.js"),__vite__mapDeps([8,6,7]))).default}),loadingComponent:Vv,delay:0,suspensible:!1}),Vv);function kA(B){return B===yA}const bA=L(()=>g.value==="pre"?br:g.value==="shiki"?yA:Q3);function AA(){var B;return((B=T.codeBlockProps)==null?void 0:B.showHeader)!==!1}function CA(B,J,ue){const ce=ss[J],be=typeof ce=="number"&&ce>0;if(Ni.value&&!be&&!(function(Le){return!!Tn.value.paragraph&&(Le.type==="paragraph"||Le.type==="list_item"||Le.type==="list")})(B)){const Le=CO(B,ue,se.value);if(Le)return Le}if(Ui.value&&B.type==="code_block"){const Le=(function(Re){if(Re.type!=="code_block")return null;const je=eC(Re,Mg(Re));return kA(je)?"markdown":je===br?"pre":je===bA.value||je===Q3?"monaco":null})(B);if(Le==="monaco"||Le==="markdown"||Le==="pre")return(function(Re,je){var it,He,Je;if(!Re||Re.type!=="code_block")return null;const nt=je.rendererKind,Oe=nt!=="pre"&&je.showHeader!==!1,Xe=!!Re.diff;let ft=0,at=500;if(nt==="monaco"){const At=(it=je.monacoOptions)!=null?it:{},Ot=ok(Re,At,je.width),Kt=(function(Xt){const rn=typeof Xt?.fontSize=="number"&&Xt.fontSize>0?Xt.fontSize:12;return typeof Xt?.lineHeight=="number"&&Xt.lineHeight>0?Xt.lineHeight:Math.round(1.5*rn)})(At),on=(function(Xt,rn){var En,zn;const yi=typeof((En=Xt?.padding)==null?void 0:En.top)=="number"?Xt.padding.top:rn?0:8,yo=typeof((zn=Xt?.padding)==null?void 0:zn.bottom)=="number"?Xt.padding.bottom:rn?0:8;return Math.max(0,yi)+Math.max(0,yo)})(At,Xe);at=typeof At.MAX_HEIGHT=="number"&&At.MAX_HEIGHT>0?At.MAX_HEIGHT:500,ft=Math.round(Ot*Kt+on)}else if(nt==="markdown"){const At=ok(Re);ft=Math.round(21*At+32)}else{const At=ok(Re);ft=Math.round(28*At),at=Number.POSITIVE_INFINITY}const Lt=Math.max(1,Math.min(ft,at));return _t({kind:"code-block",height:Math.round(Lt+(Oe?40:0)),contentHeight:Lt,rendererKind:nt},Xe&&nt==="monaco"?{diffInline:b7((He=je.monacoOptions)!=null?He:{},(Je=je.width)!=null?Je:0)}:{})})(B,{rendererKind:Le,monacoOptions:T.codeBlockMonacoOptions,showHeader:AA(),width:ue})}return null}_k(()=>{if(ze.value,Ye>0)return;const B=Dt.value,J=Ei();if(!B.length||!Ls.value)return rt=[],Se=[],U=-1,ke.clear(),void(me.value=dr);const ue=ie.value||ct("estimatedNodeHeights.clientWidth",()=>{var He;return((He=R.value)==null?void 0:He.clientWidth)||0});if(!Number.isFinite(ue)||ue<=0)return rt=[],Se=[],U=-1,ke.clear(),void(me.value=dr);const ce=(function(He){return[Math.round(He),Ni.value,Ui.value,se.value,T.codeBlockMonacoOptions,AA(),g.value,Tn.value,nk.value]})(ue),be=rt.length<=B.length&&(Re=ce,(Le=Se).length===Re.length&&Le.every((He,Je)=>Object.is(He,Re[Je])));var Le,Re;const je=be&&U===J?B.length:be?F9(B.length):0,it=be?Array.from(ke):[];rt.length=B.length;for(let He=je;He<B.length;He++)rt[He]=CA(B[He],He,ue);for(const He of it)He>=0&&He<B.length&&He<je&&(rt[He]=CA(B[He],He,ue));ke.clear(),Se=ce,U=J,me.value=rt,oW(me)},{flush:"sync"});const uf=L(()=>me.value);Gt=(function(B){let J=!0,ue=[0],ce="";function be(Je){var nt;const Oe=B.nodeHeights[Je];if(Number.isFinite(Oe)&&Oe>0)return Oe;const Xe=B.parsedNodes.value[Je],ft=Xe?.type,at=!!((nt=B.hasCustomParagraphComponent)!=null&&nt.call(B)),Lt=B.estimatedNodeHeights.value[Je],At=Lt?.height;if(!(function(Kt,on,Xt){return!!(Xt&&on?.kind==="simple-text"&&(Kt==="paragraph"||Kt==="list_item"||Kt==="list"))})(ft,Lt,at)&&Number.isFinite(At)&&At>0)return At;const Ot=ZEe(Xe,B.getContainerWidth()||640);return ft==="heading"||ft==="paragraph"&&Ot<=28&&(function(Kt,on){if(on)return!1;const Xt=Kt.children;return!Array.isArray(Xt)||!Xt.length||Xt.every(xO)})(Xe,at)?Ot:Math.max(B.averageNodeHeight.value,Ot)}function Le(){var Je;const nt=B.parsedNodes.value.length,Oe=B.getPrefixCacheKeyParts().join(":");if(!J&&ce===Oe)return ue;const Xe=new Array(nt+1);Xe[0]=0;for(let ft=0;ft<nt;ft++)Xe[ft+1]=Xe[ft]+(B.heightEstimationActive.value?be(ft):(Je=B.nodeHeights[ft])!=null?Je:B.averageNodeHeight.value);return ue=Xe,ce=Oe,J=!1,Xe}function Re(Je){var nt,Oe;const Xe=B.parsedNodes.value.length;if(Xe<=0||Je<=0)return 0;const ft=Le();if(Je>=((nt=ft[Xe])!=null?nt:0))return Xe-1;let at=0,Lt=Xe-1,At=Xe-1;for(;at<=Lt;){const Ot=at+Lt>>1;((Oe=ft[Ot+1])!=null?Oe:0)>=Je?(At=Ot,Lt=Ot-1):at=Ot+1}return At}function je(Je,nt){var Oe,Xe;if(Je>=nt)return 0;if(B.heightEstimationActive.value)return(function(Lt,At){var Ot,Kt;const on=B.parsedNodes.value.length,Xt=hE(Math.trunc(Lt),0,on),rn=hE(Math.trunc(At),Xt,on);if(Xt>=rn)return 0;const En=Le();return((Ot=En[rn])!=null?Ot:0)-((Kt=En[Xt])!=null?Kt:0)})(Je,nt);if(B.heightTreeSize.value!==B.parsedNodes.value.length){let Lt=0;for(let At=Je;At<nt;At++)Lt+=(Oe=B.nodeHeights[At])!=null?Oe:B.averageNodeHeight.value;return Lt}const ft=B.heightSumTree.value,at=B.heightKnownTree.value;if(!ft.length||!at.length){let Lt=0;for(let At=Je;At<nt;At++)Lt+=(Xe=B.nodeHeights[At])!=null?Xe:B.averageNodeHeight.value;return Lt}return B.fenwickRangeSum(ft,Je,nt)+(nt-Je-B.fenwickRangeSum(at,Je,nt))*B.averageNodeHeight.value}function it(Je){var nt;if(Je<=0)return 0;const Oe=B.parsedNodes.value;if(B.heightEstimationActive.value)return Re(Je);if(B.heightTreeSize.value===Oe.length&&B.heightSumTree.value.length&&B.heightKnownTree.value.length){const ft=B.averageNodeHeight.value,at=B.heightSumTree.value,Lt=B.heightKnownTree.value,At=Xt=>Xt<=0?0:B.fenwickRangeSum(at,0,Xt)+(Xt-B.fenwickRangeSum(Lt,0,Xt))*ft;let Ot=0,Kt=Oe.length-1,on=Oe.length-1;for(;Ot<=Kt;){const Xt=Ot+Kt>>1;At(Xt+1)>=Je?(on=Xt,Kt=Xt-1):Ot=Xt+1}return on}let Xe=Je;for(let ft=0;ft<Oe.length;ft++){const at=(nt=B.nodeHeights[ft])!=null?nt:B.averageNodeHeight.value;if(Xe<=at)return ft;Xe-=at}return Math.max(0,Oe.length-1)}function He(){if(!B.heightEstimationActive.value)return 0;let Je=0;const nt=B.estimatedNodeHeights.value;for(let Oe=0;Oe<nt.length;Oe++){if(!nt[Oe])continue;const Xe=B.nodeHeights[Oe];Number.isFinite(Xe)&&Xe>0||Je++}return Je}return{markFallbackHeightPrefixDirty:function(){J=!0},getFallbackNodeHeight:be,estimateHeightRange:je,estimateIndexForOffset:it,estimateIndexForOffsetFromEnd:function(Je){var nt,Oe;const Xe=B.parsedNodes.value;if(!Xe.length)return 0;if(Je<=0)return Math.max(0,Xe.length-1);if(B.heightEstimationActive.value){const at=(nt=Le()[Xe.length])!=null?nt:0;return Re(Math.max(0,at-Je))}if(B.heightTreeSize.value===Xe.length){const at=je(0,Xe.length);return it(Math.max(0,at-Je))}let ft=Je;for(let at=Xe.length-1;at>=0;at--){const Lt=(Oe=B.nodeHeights[at])!=null?Oe:B.averageNodeHeight.value;if(ft<=Lt)return at;ft-=Lt}return 0},getEstimatedNodeHeightCount:He,buildVirtualHeightSummary:function(Je){var nt;const Oe=B.parsedNodes.value.length;return{totalNodes:Oe,measuredCount:B.heightStats.count,estimatedCount:He(),averageNodeHeight:B.averageNodeHeight.value,topSpacerHeight:Je.topSpacerHeight,bottomSpacerHeight:Je.bottomSpacerHeight,estimatedTotalHeight:je(0,Oe),width:(nt=Je.width)!=null?nt:B.getContainerWidth()}}}})({parsedNodes:Dt,nodeHeights:ss,heightStats:Ns,heightTreeSize:du,heightSumTree:lf,heightKnownTree:x9,averageNodeHeight:Qh,heightEstimationActive:fi,estimatedNodeHeights:uf,getContainerWidth:hi,hasCustomParagraphComponent:()=>!!Tn.value.paragraph,getPrefixCacheKeyParts:()=>{var B;const J=N1(ie.value||ct("getFallbackHeightPrefix.clientWidth",()=>{var ce;return((ce=R.value)==null?void 0:ce.clientWidth)||0})),ue=((B=i.virtualScroll)==null?void 0:B.measurementKey)==null?"":String(i.virtualScroll.measurementKey);return[Dt.value.length,Ns.count,Math.round(Ns.total),Math.round(100*Qh.value),ue,J,fi.value?1:0,nk.value,V.value,Tn.value.paragraph?1:0]},fenwickRangeSum:ye}),qe(()=>Dt.value.length,B=>{var J;Rt(),B<=0?Sn():(B<du.value&&(J=B,ln(),$t(()=>cg(J))),B!==du.value&&$c(B))},{immediate:!0});const jj=L(()=>{if(!an.value)return Dt.value.map((ce,be)=>({node:ce,index:be}));const B=Dt.value.length,J=vo(mo.start,0,B),ue=vo(mo.end,J,B);return Dt.value.slice(J,ue).map((ce,be)=>({node:ce,index:J+be}))}),B9=L(()=>an.value?ei(0,Math.min(mo.start,Dt.value.length)):0),z9=L(()=>{if(!an.value)return 0;const B=Dt.value.length;return ei(Math.min(mo.end,B),B)});function wA(){return Gt.buildVirtualHeightSummary({topSpacerHeight:B9.value,bottomSpacerHeight:z9.value,width:Rc()})}function Hj(){const B=Dt.value,J=wA();return yn(_t({},J),{probe:{paragraphReady:!!se.value.paragraph,listItemReady:!!se.value.listItem,listWrapperOverhead:se.value.listWrapperOverhead,headingReadyLevels:Object.entries(se.value.headings).filter(([,ue])=>!!ue).map(([ue])=>Number(ue))},nodes:B.map((ue,ce)=>{var be,Le,Re,je,it,He,Je,nt,Oe;return{index:ce,type:ue.type,estimateKind:(Le=(be=uf.value[ce])==null?void 0:be.kind)!=null?Le:null,rendererKind:(je=(Re=uf.value[ce])==null?void 0:Re.rendererKind)!=null?je:null,estimatedHeight:(He=(it=uf.value[ce])==null?void 0:it.height)!=null?He:null,estimatedContentHeight:(nt=(Je=uf.value[ce])==null?void 0:Je.contentHeight)!=null?nt:null,measuredHeight:(Oe=ss[ce])!=null?Oe:null}})})}function R9(){return i.indexKey!=null?String(i.indexKey):Ci.value?`virtual-${Vi()}`:"markdown-renderer"}function xA(B){const J=String(B),ue=`${R9()}-`;if(!J.startsWith(ue))return null;const ce=J.slice(ue.length).match(/^(\d+)(?:$|-)/);if(!ce)return null;const be=Number(ce[1]);return!Number.isInteger(be)||be<0||be>=Dt.value.length?null:be}function Vi(){var B,J,ue;const ce=(B=i.virtualScroll)==null?void 0:B.sessionKey;return String(ce!=null&&ce!==""?ce:(ue=(J=i.indexKey)!=null?J:T.customId)!=null?ue:ot)}function Fs(){var B;const J=(B=i.virtualScroll)==null?void 0:B.threadKey;return J==null||J===""?void 0:String(J)}const Wj=L(()=>{var B,J,ue;return(ue=Fs())!=null?ue:String((J=(B=i.indexKey)!=null?B:T.customId)!=null?J:ot)});function O9(B){var J;return(B??"")===((J=Fs())!=null?J:"")}function Ea(){var B,J,ue;return J=(B=i.virtualScroll)==null?void 0:B.measurementKey,ue=(function(){const ce=g.value;return(function(be){var Le,Re;const je=be.renderer,it=je==="monaco"?be.codeBlockMonacoOptions:void 0,He=be.codeBlockProps,Je=je==="shiki";return[be.isDark?"dark":"light",je==="monaco"?"code-rich":je==="pre"?"code-pre":"code-shiki",be.codeBlockStream===!1?"code-static":"code-stream",io(be.codeBlockMinWidth),io(be.codeBlockMaxWidth),...Je?[R_e((Le=He?.themes)!=null?Le:be.themes,(Re=He?.langs)!=null?Re:be.langs)]:[],io(it?.fontSize),io(it?.lineHeight),io(it?.fontFamily),io(it?.tabSize),io(it?.MAX_HEIGHT),io(it?.wordWrap),io(it?.wrappingIndent),io(it?.padding),io(He?.showHeader),io(He?.showCopyButton),io(He?.showExpandButton),io(He?.showPreviewButton),io(He?.showCollapseButton),io(He?.showFontSizeButtons)].join("\0")})({renderer:ce,isDark:T.isDark,codeBlockStream:T.codeBlockStream,codeBlockMinWidth:T.codeBlockMinWidth,codeBlockMaxWidth:T.codeBlockMaxWidth,codeBlockMonacoOptions:ce==="monaco"?T.codeBlockMonacoOptions:void 0,codeBlockProps:T.codeBlockProps,themes:ce==="shiki"?T.themes:void 0,langs:ce==="shiki"?T.langs:void 0})})(),[J==null?"":String(J),ue].join("\0")}function Rc(){return hi()}const kg=L(()=>N1(Rc())),zr=L(()=>[Ea(),kg.value].join("\0")),qj=L(()=>{var B;return Ci.value?["virtual",(B=Fs())!=null?B:"",Vi(),zr.value].join("\0"):i.indexKey});function cf(){dA.value+=1}function P9(B){return!(!B||!Number.isInteger(B.index)||B.index<0||B.index>=Dt.value.length||B.sessionKey!==Vi()||B.threadKey!==Fs()||B.layoutEpochKey!==zr.value)}function SA(B){const J=String(B),ue=Jl.get(J);return ue?P9(ue)?ue.index:null:xA(J)}function _A(B="async-node"){($r.size||Jl.size)&&($r.clear(),Jl.clear(),cf(),Di(B))}const df=cn(v8,null),j9={reportHeight(B,J){if(!vn.value)return;const ue=SA(B);if(ue==null)return;const ce=Yl.get(ue);if(!ce)return;const be=Number(J),Le=go(ue,ce);(function(Re,je,it={}){$t(()=>Fi(Re,je,it))})(ue,Number.isFinite(be)&&be>0?Math.max(be,Le||0):Le)},markPending(B){if(!vn.value)return;const J=xA(B);J!=null&&(function(ue,ce){var be;const Le=Jl.get(ue);if(Le&&P9(Le))return $r.set(ue,Math.max(0,(be=$r.get(ue))!=null?be:0)+1),cf(),void Di("async-node");$r.set(ue,1),Jl.set(ue,(function(Re){return{index:Re,sessionKey:Vi(),threadKey:Fs(),layoutEpochKey:zr.value}})(ce)),cf(),Di("async-node")})(String(B),J)},markSettled(B){if(!vn.value)return;const J=String(B),ue=SA(B);(ue!=null||(function(ce){return $r.has(String(ce))})(J))&&(function(ce){var be;const Le=(be=$r.get(ce))!=null?be:0;return!(Le<=0||(Le<=1?($r.delete(ce),Jl.delete(ce)):$r.set(ce,Le-1),cf(),Le===1&&Di("async-node"),0))})(J)&&ue!=null&&Ta()}};function Uj(){let B=0;for(const J of Yl.values())B+=ct("getVisibleDomHeight.offsetHeight",()=>{var ue;return(ue=J?.offsetHeight)!=null?ue:0});return Math.ceil(Math.max(0,B))}Kn(v8,{reportHeight(B,J){j9.reportHeight(B,J),df?.reportHeight(B,J)},markPending(B){j9.markPending(B),df?.markPending(B)},markSettled(B){j9.markSettled(B),df?.markSettled(B)}});let H9,W9=null,ff=null;function bg(B){return B!==!1&&B!=null&&B!==""}function IA(){return an.value?(function(){if(!an.value)return!0;const B=Dt.value.length,J=vo(mo.start,0,B),ue=vo(mo.end,J,B);if(J>=ue)return!0;for(let ce=J;ce<ue;ce++)if(!On.has(ce)||xg(ce)&&!Yl.has(ce))return!1;return!0})():dt.value>=hg.value}function q9(){return yt.value===!0&&!Ze.value&&E9.value===0&&hu.size===0&&Ma.size===0&&Br==null&&IA()}function MA(){var B,J;if(((B=i.virtualScroll)==null?void 0:B.settleMode)!=="manual"||W9===Vi()&&H9===Fs())return!0;const ue=(J=i.virtualScroll)==null?void 0:J.settledToken;return!!bg(ue)&&ff===f1(ue)}function U9(){return q9()&&MA()}function Kj(B,J){return J.totalNodes<=0?B==="final"?"final":"estimate":J.measuredCount>=J.totalNodes?B==="final"?"final":"measured":J.measuredCount>0||J.estimatedCount>0?"mixed":"estimate"}function Oc(B="manual",J){const ue=wA(),ce=(function(be){return be||(yt.value!==!0?Dt.value.length>0?"streaming":"estimating":!IA()||Ma.size>0||Br!=null?"measuring":U9()?"settled":"settling")})(J);return{sessionKey:Vi(),threadKey:Fs(),phase:ce,nodeCount:ue.totalNodes,liveRange:{start:mo.start,end:mo.end},renderedCount:dt.value,measuredCount:ue.measuredCount,estimatedCount:ue.estimatedCount,averageNodeHeight:ue.averageNodeHeight,topSpacerHeight:ue.topSpacerHeight,bottomSpacerHeight:ue.bottomSpacerHeight,visibleDomHeight:Uj(),totalHeight:EA(),width:ue.width,final:yt.value===!0,stable:U9(),confidence:Kj(ce,ue),reason:B}}function Xh(){const B=pt.value||Ae(),J=R.value;if(!B||!J)return null;const ue=B.ownerDocument||J.ownerDocument||document,ce=B===ue.documentElement||B===ue.body||B===ue.scrollingElement,be=ct("getScrollBox.scrollTop",()=>Ke(B,ue,ce)),Le=ct("getScrollBox.scrollHeight",()=>{var je,it,He,Je,nt;return ce?Math.max((it=(je=ue.documentElement)==null?void 0:je.scrollHeight)!=null?it:0,(Je=(He=ue.body)==null?void 0:He.scrollHeight)!=null?Je:0,(nt=B.scrollHeight)!=null?nt:0):B.scrollHeight}),Re=ct("getScrollBox.clientHeight",()=>{var je;return ce?((je=ue.documentElement)==null?void 0:je.clientHeight)||B.clientHeight||0:B.clientHeight});return{root:B,doc:ue,isViewportRoot:ce,scrollTop:be,scrollHeight:Le,clientHeight:Re}}function EA(){const B=Dt.value.length,J=Math.max(0,ei(0,B)),ue=ct("getRendererLogicalHeight.offsetHeight",()=>{var be,Le;return(Le=(be=R.value)==null?void 0:be.offsetHeight)!=null?Le:0}),ce=Math.max(0,ue>0?ue:ct("getRendererLogicalHeight.scrollHeight",()=>{var be,Le;return(Le=(be=R.value)==null?void 0:be.scrollHeight)!=null?Le:0}));return B<=0?Math.ceil(ue):an.value?J>0?Math.max(1,Math.ceil(J),(function(){let be=B9.value+z9.value;for(const Le of On.values())Le&&(be+=Math.max(0,ct("getVirtualizedDomLogicalHeight.offsetHeight",()=>Le.offsetHeight||0)));return Math.ceil(Math.max(0,be))})(),(function(be,Le){return be<=0||Le<=0?0:Le<=be+Math.max(512,.05*be)?Math.ceil(Le):0})(J,ce)):Math.max(1,Math.ceil(ce)):vn.value?J>0||Ns.count>0||Gt.getEstimatedNodeHeightCount()>0?(Pe.value&&dt.value,Math.max(1,Math.ceil(ce),Math.ceil(J))):Math.ceil(ce):Math.max(1,Math.ceil(ce),Math.ceil(J))}function TA(B){const J=R.value;if(!J)return null;const ue=ct("getRendererBottomDistanceFromViewport.getBoundingClientRect",()=>J.getBoundingClientRect());return(function(be){return be.isViewportRoot?be.clientHeight:ct("getViewportBottomInRoot.getBoundingClientRect",()=>be.root.getBoundingClientRect().bottom)})(B)-ue.bottom}function Vj(B={}){const J=B.requireViewport!==!1,ue=(function(Le=64){const Re=Xh(),je=R.value;if(!Re||!je)return!1;const it=(function(Je){if(Je.isViewportRoot)return{top:0,bottom:Je.clientHeight};const nt=ct("getVirtualViewportRect.getBoundingClientRect",()=>Je.root.getBoundingClientRect());return{top:nt.top,bottom:nt.bottom}})(Re),He=ct("isRendererNearVirtualViewport.getBoundingClientRect",()=>je.getBoundingClientRect());return He.bottom>=it.top-Le&&He.top<=it.bottom+Le})();if(J&&!ue)return null;const ce=(function(){const Le=Xh(),Re=R.value;if(!Le||!Re||Math.max(0,Le.scrollHeight-Le.scrollTop-Le.clientHeight)>64)return null;const je=TA(Le);return je==null?null:je>=-8&&je<=160?{type:"bottom",distanceFromBottomPx:Math.max(0,je)}:null})();if(ce)return{anchor:ce,captured:!0};const be=Ki();if(be)return{anchor:{type:"node",nodeIndex:be.nodeIndex,offsetWithinNodePx:be.offsetWithinNodePx},captured:ue};if(B.allowFallback===!0){const Le=(function(){const Re=Dt.value.length;return Re<=0?null:{type:"node",nodeIndex:vo(Ia.value,0,Math.max(0,Re-1)),offsetWithinNodePx:0}})();return Le?{anchor:Le,captured:!1}:null}return null}function K9(B){let J=2166136261;for(let ue=0;ue<B.length;ue++)J^=B.charCodeAt(ue),J=Math.imul(J,16777619);return(J>>>0).toString(36)}function Zj(B,J){let ue=B;for(let ce=0;ce<J.length;ce++)ue^=J.charCodeAt(ce),ue=Math.imul(ue,16777619);return ue^=31,ue=Math.imul(ue,16777619),ue}const Gj=new Set(["children","items","header","rows","cells","attrs","data","term","definition"]);function Ag(B,J=new WeakSet,ue=0){if(B==null||typeof B=="number"||typeof B=="boolean")return String(B);if(typeof B=="string")return`s:${(function(ce){const be=ce.length>8192?`${ce.slice(0,8192)}...${ce.length}`:ce;return`${ce.length}:${K9(be)}`})(B)}`;if(typeof B=="function")return"fn";if(typeof B!="object")return typeof B;if(J.has(B))return"cycle";if(ue>=6)return"max-depth";J.add(B);try{if(Array.isArray(B)){if(B.length<=160){const He=[];for(let Je=0;Je<B.length;Je++)He.push(Ag(B[Je],J,ue+1));return`a:${B.length}:${He.join(",")}`}const Le=[],Re=[],je=Math.max(0,B.length-32);let it=2166136261;for(let He=0;He<B.length;He++){const Je=Ag(B[He],J,ue+1);it=Zj(it,Je),He<32&&Le.push(Je),He>=je&&Re.push(Je)}return[`a:${B.length}`,`h=${Le.join(",")}`,`t=${Re.join(",")}`,`all=${(it>>>0).toString(36)}`].join(":")}const ce=B,be=Object.keys(ce).filter(Le=>{const Re=ce[Le];return Le!=="parent"&&Le!=="el"&&Le!=="component"&&(Re==null||typeof Re=="string"||typeof Re=="number"||typeof Re=="boolean"||Gj.has(Le))}).sort();return`o:${be.length}:${be.map(Le=>`${Le}=${Ag(ce[Le],J,ue+1)}`).join(";")}`}finally{J.delete(B)}}let V9=-1,Z9="",Pc=[2166136261];function e1(B){const J=Dt.value[B];return J?K9(Ag(J)):""}function Qj(B,J){let ue=B;for(let ce=0;ce<J.length;ce++)ue^=J.charCodeAt(ce),ue=Math.imul(ue,16777619);return ue>>>0}function G9(){var B,J;const ue=V.value;if(V9===ue)return Z9;const ce=Dt.value.length;let be=F9(ce);(V9!==ue-1||be>ce||Pc.length<be+1)&&(be=0),be===0?Pc=[2166136261]:Pc.length=be+1;for(let Le=be;Le<ce;Le++){const Re=e1(Le);Pc[Le+1]=Qj((B=Pc[Le])!=null?B:2166136261,Re)}return Pc.length=ce+1,Z9=(((J=Pc[ce])!=null?J:2166136261)>>>0).toString(36),V9=ue,Z9}function hf(B,J={}){var ue;const ce=J.includeHeightCache===!0,be=(ue=J.includeContentHash)!=null?ue:ce,Le=ce?(function(je){const it=(function(){var at,Lt;const At=Number((Lt=(at=i.virtualScroll)==null?void 0:at.heightCacheLimit)!=null?Lt:5e3);return!Number.isFinite(At)||At<=0?Number.POSITIVE_INFINITY:Math.max(1,Math.trunc(At))})();if(!Number.isFinite(it)||je.length<=it)return je;const He=new Map,Je=at=>{!at||He.size>=it||He.set(at.index,at)},nt=Dt.value.length,Oe=vo(mo.start-2*qi.value,0,nt),Xe=vo(mo.end+2*qi.value,Oe,nt);for(const at of je)at.index>=Oe&&at.index<Xe&&Je(at);const ft=Math.max(1,Math.ceil(je.length/it));for(let at=0;at<je.length&&He.size<it;at+=ft)Je(je[at]);for(let at=je.length-1;at>=0&&He.size<it;at-=ft)Je(je[at]);return Array.from(He.values()).sort((at,Lt)=>at.index-Lt.index).slice(0,it)})(_9().map(je=>{var it;const He=Dt.value[je.index];return He?yn(_t({},je),{nodeType:String((it=He.type)!=null?it:""),signature:e1(je.index)}):null}).filter(je=>!!je)):[],Re=Vj({allowFallback:J.allowAnchorFallback===!0,requireViewport:J.requireViewport});return Re||Le.length||J.includeEmptyState===!0?yn(_t({sessionKey:B.sessionKey,threadKey:B.threadKey},Re?{anchor:Re.anchor,anchorCaptured:Re.captured}:{anchorCaptured:!1}),{metrics:B,width:B.width,contentHash:be?G9():void 0,measurementKey:Ea()||void 0,heightCache:Le.length?Le:void 0}):null}function Q9(B){var J,ue;const ce=Xh();if(!ce)return;const be=(function(je){const it=R.value;if(!it)return null;const He=xe(it,je.root),Je=Dt.value.length,nt=ct("getRendererBottomOffsetWithinRoot.offsetHeight",()=>it.offsetHeight||0),Oe=Math.max(0,nt>0?nt:Je>0?ct("getRendererBottomOffsetWithinRoot.scrollHeight",()=>it.scrollHeight||0):0),Xe=EA();return He+Math.max(Oe,Xe)})(ce);if(be==null)return;const Le=Math.max(0,B.distanceFromBottomPx),Re=Math.max(0,be-ce.clientHeight-Le);(function(je){Qn=o1()+120,jt=je})(Re),ce.isViewportRoot?(ue=(J=ce.doc.defaultView)==null?void 0:J.scrollTo)==null||ue.call(J,0,Re):cE(ce.root,ce.doc,Re,{isReverseFlexScrollRoot:_e,getNormalizedScrollTop:Ke})}const Y9=[];function LA(){if(Y)for(Cn!=null&&(wi?.(Cn),Cn=null);Y9.length;){const B=Y9.pop();B!=null&&window.clearTimeout(B)}}function pf(B){const J=!!Ht.value;Ht.value=null,Qn=0,jt=null,LA(),J&&B&&Di(B)}function gf(){if(!Ht.value||!Y||Cn!=null)return;const B=()=>{Cn=null;const J=Ht.value;J&&Q9(J)};Cn=Li?Li(B):null,Cn==null&&B()}function NA(B,J={}){const ue=Dt.value.length;return ue<=0?[]:B.filter(ce=>!(!Number.isInteger(ce.index)||ce.index<0||ce.index>=ue)&&!(!Number.isFinite(ce.height)||ce.height<=0)&&!(J.requireSignature&&!ce.signature)&&!(J.requireCompatibilityMetadata&&!ce.nodeType&&!ce.signature)&&(function(be){var Le;const Re=Dt.value[be.index];return!(!Re||be.nodeType&&be.nodeType!==String((Le=Re.type)!=null?Le:"")||be.signature&&be.signature!==e1(be.index))})(ce))}function FA(B){const J=N1(Rc()),ue=N1(B);return J!==-1&&ue!==-1&&J===ue}function J9(B){var J;const ue=Number(B?.width);if(Number.isFinite(ue)&&ue>0)return ue;const ce=Number((J=B?.metrics)==null?void 0:J.width);return Number.isFinite(ce)&&ce>0?ce:null}function DA(B){var J;return B.sessionKey===Vi()&&!!O9(B.threadKey)&&((J=B.measurementKey)!=null?J:"")===Ea()&&!!FA(J9(B))&&!!(function(ue){const ce=ue.heightCache;return!!ce?.length&&($A(ue)?ce.some(be=>!!(be.nodeType||be.signature)):ce.some(be=>!!be.signature))})(B)}function $A(B){return!!(B.contentHash&&B.contentHash===G9())}function Yj(B){return!$A(B)}let jc=null,Hc=null,Cg=null,t1=null,n1=null;function X9(B){var J;const ue=B.map(be=>{var Le,Re;return[be.index,Math.round(10*be.height),(Le=be.nodeType)!=null?Le:"",(Re=be.signature)!=null?Re:""].join("")}).join(""),ce=N1(Rc());return[(J=Fs())!=null?J:"",Vi(),Ea(),Dt.value.length,ce,B.length,K9(ue)].join(":")}function BA(B=(J=>(J=i.virtualScroll)==null?void 0:J.heightCache)()){if(!vn.value||!B?.length||Dt.value.length<=0||!FA((J=i.virtualScroll)==null?void 0:J.heightCacheWidth))return!1;var J;const ue=NA(B,{requireSignature:!0});if(!ue.length)return!1;const ce=X9(ue);return ce===jc?(Hc="standalone",!0):(Bc(ue,{mode:"merge"}),Rt(),jc=ce,Hc="standalone",l1(),Di("restore"),!0)}function e4(B,J={}){var ue,ce,be;if(!vn.value||!B||B.sessionKey!==Vi()||!O9(B.threadKey)||Dt.value.length<=0)return!1;const Le=!!((ue=B.heightCache)!=null&&ue.length)&&!wg(),Re=!B.anchor||B.anchorCaptured===!1&&J.allowUncapturedAnchor!==!0?null:B.anchor,je=J.restoreAnchor===!0&&!!Re&&!wg()&&Number(J9(B))>0;let it=!1;if((ce=B.heightCache)!=null&&ce.length&&DA(B)){const Je=NA(B.heightCache,{requireCompatibilityMetadata:!B.contentHash,requireSignature:Yj(B)});Je.length&&(Bc(Je,{mode:"merge"}),Rt(),jc=X9(Je),Hc="restore",l1(),it=!0)}if(Le||je)return!1;if(!J.restoreAnchor||!Re)return it&&Di("restore"),!0;const He=(function(Je,nt){var Oe;const Xe=Je.anchor,ft=Xe?Xe.type==="bottom"?`bottom:${Math.round(Xe.distanceFromBottomPx)}`:`node:${Xe.nodeIndex}:${Math.round(Xe.offsetWithinNodePx)}`:"none";return[(Oe=Fs())!=null?Oe:"",Vi(),Ea(),kg.value,nt,ft].join(":")})(B,(be=J.restoreToken)!=null?be:"imperative");return Cg===He?(it&&Di("restore"),!0):(Cg=He,(function(Je){const nt=()=>{if(Je.type==="node")return pf(),void Bo({nodeIndex:Je.nodeIndex,offsetWithinNodePx:Je.offsetWithinNodePx});if(mt(),$o.value=null,Ht.value=Je,LA(),Q9(Je),Y)for(const Oe of[0,120,280,480])Y9.push(window.setTimeout(()=>{const Xe=Ht.value;Xe&&Q9(Xe)},Oe))};(function(Oe){if(!an.value)return!1;const Xe=Dt.value.length;return!(Xe<=0||(Ia.value=Oe.type==="node"?vo(Oe.nodeIndex,0,Xe-1):Xe-1,Yh(),0))})(Je)?kt(nt):nt()})(Re),Di("restore"),!0)}function wg(){const B=Rc();return Number.isFinite(B)&&B>0}function zA(B){var J;return B.sessionKey===Vi()&&!!O9(B.threadKey)&&(Dt.value.length<=0||!(!((J=B.heightCache)!=null&&J.length)||wg())||!(!(B.anchor&&Number(J9(B))>0)||wg()))}function t4(){xi.clear();for(const B of Object.keys(ss)){const J=Number(B);Number.isInteger(J)&&J>=0&&J<Dt.value.length&&ti(J)}}function i1(){Br!=null&&(wi?.(Br),Br=null),c4()}function RA(){return!Y||Ts?Promise.resolve():new Promise(B=>{let J=!1,ue=null;const ce=()=>{J||(J=!0,ue!=null&&window.clearTimeout(ue),B())};if(Li)return Li(ce),void(ue=window.setTimeout(ce,50));ue=window.setTimeout(ce,0)})}function n4(B,J=Fs(),ue=zr.value){return Vi()===B&&Fs()===J&&zr.value===ue}function i4(){return Bi(this,arguments,function*(B={}){var J,ue,ce,be,Le;const Re=Vi(),je=Fs(),it=zr.value,He=(J=B.frames)!=null?J:2,Je=(ue=B.timeoutMs)!=null?ue:120,nt=(ce=B.reason)!=null?ce:"manual",Oe=B.expectedSettledTokenKey,Xe=B.flushPendingTimers===!0,ft=Oc(nt),at=()=>yn(_t({},ft),{phase:ft.final?"settling":ft.phase,stable:!1,confidence:ft.confidence==="final"?"mixed":ft.confidence,reason:nt}),Lt=()=>n4(Re,je,it)&&(Oe==null||r1()===Oe);for(let on=0;on<He;on++){if(yield kt(),!Lt()||(yield RA(),!Lt()))return at();Ta(),i1()}if(yield(function(on){return!Y||on<=0?Promise.resolve():new Promise(Xt=>window.setTimeout(Xt,on))})(Je),!Lt()||(Xe&&hA(),Ta(),i1(),!Lt()))return at();const At=q9();At&&(W9=Re,H9=je,((be=i.virtualScroll)==null?void 0:be.settleMode)==="manual"&&Oe!=null&&bg((Le=i.virtualScroll)==null?void 0:Le.settledToken)&&r1()===Oe&&(ff=f1(i.virtualScroll.settledToken)));const Ot=Lt()&&At&&MA(),Kt=Oc(nt,Ot?"final":void 0);return a4(Kt,!0),Kt})}let s4="content",Wc=null,qc=null,o4=0,s1=null,mf=null,r4=null,l4=null;function o1(){return typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now()}function OA(B){var J,ue;const ce=s1;if(!ce)return!0;const be=(ue=(J=i.virtualScroll)==null?void 0:J.heightDiffThresholdPx)!=null?ue:1;return Math.abs(B.totalHeight-ce.totalHeight)>be||B.sessionKey!==ce.sessionKey||B.phase!==ce.phase||B.stable!==ce.stable||B.final!==ce.final||B.threadKey!==ce.threadKey||B.nodeCount!==ce.nodeCount||B.measuredCount!==ce.measuredCount||B.width!==ce.width}function r1(B=(J=>(J=i.virtualScroll)==null?void 0:J.settledToken)()){return io(B)}function PA(B,J){var ue,ce;return[B,J.sessionKey,(ue=J.threadKey)!=null?ue:"",Ea(),G9(),io((ce=i.virtualScroll)==null?void 0:ce.settledToken),Math.round(J.totalHeight),Math.round(J.width)].join("\0")}function l1(){r4=null,l4=null,mf=null}function Jj(B){const J=B.heightCache;return J?.length?X9(J):""}function a1(B){var J,ue,ce;const be=B.metrics,Le=B.anchor?(Re=B.anchor).type==="bottom"?`bottom:${Math.round(Re.distanceFromBottomPx)}`:`node:${Re.nodeIndex}:${Math.round(Re.offsetWithinNodePx)}`:"none";var Re;return[B.sessionKey,(J=B.threadKey)!=null?J:"",(ue=B.measurementKey)!=null?ue:Ea(),(ce=B.contentHash)!=null?ce:"",Jj(B),Le,B.anchorCaptured?1:0,be.liveRange.start,be.liveRange.end,be.renderedCount,be.nodeCount,Math.round(be.totalHeight),Math.round(be.width),be.phase,be.stable?1:0].join("\0")}function a4(B,J=!1){if(!vn.value||(function(Re=!1){return!Re&&Ci.value&&!ts.value})(J))return;const ue=J||OA(B),ce=(function(Re,je=!1){return je||Re.stable||Re.phase==="final"?{state:hf(Re,{includeHeightCache:!0})}:{state:hf(Re)}})(B,J),be=ce.state,Le=!!(be&&(ue||(function(Re,je=!1){return!!je||a1(Re)!==mf})(be,J)));if(ue&&(N(B),s1=B,o4=o1()),be&&Le&&(O(be),be.anchor&&P(be.anchor),mf=a1(be)),B.stable){const Re=PA("settled",B);if(Re!==r4){r4=Re;const je=hf(B,{includeHeightCache:!0});je&&(O(je),mf=a1(je)),(function(it){s("render-settled",it)})(B)}}if(B.phase==="final"){const Re=PA("final",B);if(Re!==l4){l4=Re;const je=hf(B,{includeHeightCache:!0});je&&(O(je),mf=a1(je)),(function(it){s("render-final",it)})(B)}}}function u4(){Wc!=null&&(wi?.(Wc),Wc=null),qc!=null&&Y&&(window.clearTimeout(qc),qc=null)}function jA(){Wc=null,qc=null,(function(B){if(Ma.size>0||Br!=null)return!0;switch(B){case"node-resize":case"async-node":case"resize":case"restore":case"final":case"manual":return!0;default:return!1}})(s4)&&(Ta(),i1()),a4(Oc(s4))}function Di(B){var J,ue;if(!vn.value||(s4=B,Wc!=null||qc!=null))return;const ce=Math.max(0,(ue=(J=i.virtualScroll)==null?void 0:J.emitIntervalMs)!=null?ue:32),be=Math.max(0,ce-(o1()-o4)),Le=()=>{qc=null,Wc=Li?Li(jA):null,Wc==null&&jA()};Y&&be>0?qc=window.setTimeout(Le,be):Le()}function HA(){Ve.value+=1}function xg(B){if(Pe.value&&B>=dt.value){const J=Dt.value[B],ue=ut.value===!0&&yt.value!==!0&&B>=Dt.value.length-2,ce=J?.type==="code_block"||J?.type==="image"||J?.type==="mermaid"||J?.type==="infographic";if(!ue||ce)return!1}return!Dr.value||B<Zo.value||L9.value.has(B)}function vf(B){const J=mg.get(B);J&&(J(),mg.delete(B));const ue=af.get(B);ue&&(ue.destroy(),af.delete(B)),vg(B)}function Sg(B,J){let ue=!1;if(J){const Le=On.get(B);On.set(B,J),Le!==J&&(ue=!0)}else On.delete(B)&&(ue=!0);if(ue&&HA(),J||vg(B),!lA.value||!to)return vf(B),void(J&&Dr.value&&pu(B,!0));if(!an.value&&Dr.value&&!H.value&&af.size>=Ee.value&&(H.value||(H.value=!0,N9()),!lA.value||!to))return vf(B),void(J&&pu(B,!0));if(B<Zo.value&&!an.value||L9.value.has(B))return vf(B),void pu(B,!0);if(!J)return void vf(B);vf(B);const ce=to(J,{rootMargin:fe.value});if(!ce)return;af.set(B,ce),pu(B,ce.isVisible.value),Dr.value&&(function(Le){if(!Y||!Dr.value)return;vg(Le);const Re=Le%17*23,je=window.setTimeout(()=>{if(pA.delete(Le),!Dr.value||L9.value.has(Le))return;const it=On.get(Le);if(!it)return;const He=Ae(it),Je=it.ownerDocument||document,nt=Je.defaultView||window,Oe=!He||He===Je.documentElement||He===Je.body,Xe=!Oe&&He?ct("nodeVisibilityFallback.root.getBoundingClientRect",()=>He.getBoundingClientRect()):null,ft=Oe?0:Xe.top,at=Oe?ct("nodeVisibilityFallback.clientHeight",()=>{var At,Ot;return(Ot=(At=nt.innerHeight)!=null?At:He?.clientHeight)!=null?Ot:0}):Xe.bottom,Lt=ct("nodeVisibilityFallback.node.getBoundingClientRect",()=>it.getBoundingClientRect());Lt.bottom>=ft-500&&Lt.top<=at+500&&pu(Le,!0)},1800+Re);pA.set(Le,je)})(B);let be=null;be=qe(()=>ce.isVisible.value,Le=>{if(Le){vg(B),pu(B,!0),be?.(),mg.delete(B),af.get(B)===ce&&af.delete(B);try{ce.destroy()}catch{}}},{immediate:!0}),mg.set(B,be),an.value&&Al()}function c4(){Br=null,$t(()=>{let B=!1;for(const[J,ue]of Ma)Ma.delete(J),Yl.get(J)===ue.el&&zc.get(J)===ue.version&&(B=Fi(J,ue.height,{allowShrink:ue.allowShrink})||B);return B})}function yf(){Br!=null&&(wi?.(Br),Br=null),Ma.clear()}function _g(B,J){(function(ue,ce,be){var Le;if(!Number.isFinite(be)||be<=0||Yl.get(ue)!==ce)return;const Re=zc.get(ue);if(Re==null)return;const je=Dt.value[ue],it=Ze.value&&yt.value!==!0&&!((Le=i.nodes)!=null&&Le.length)&&ue>=Dt.value.length-2,He=!(je?.loading===!0||it),Je=Ma.get(ue),nt=Je?Je.allowShrink&&He:He,Oe=Je&&!nt?Math.max(Je.height,be):be;Ma.set(ue,{height:Oe,allowShrink:nt,version:Re,el:ce}),Br==null&&(Br=Li?Li(c4):null,Br==null&&c4())})(B,J,go(B,J))}function Ta(){for(const[B,J]of Yl)J&&_g(B,J)}function WA(){ws?.disconnect(),ws=null,Cs.clear()}function d4(){for(;fg.length;)gg(fg.pop())}qe(ts,B=>{B&&Di("content")},{flush:"post"}),t({getVirtualMetrics:Oc,captureVirtualState:function(B={}){var J;return hf(Oc("manual"),{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:B.allowFallbackAnchor===!0,requireViewport:B.requireViewport===!0,includeEmptyState:(J=B.includeEmptyState)==null||J})},restoreVirtualState:function(B,J={}){const ue=J.restoreAnchor===!0,ce=J.restoreToken==null?"imperative":String(J.restoreToken);t1=B,n1={restoreAnchor:ue,restoreToken:ce,allowUncapturedAnchor:J.allowUncapturedAnchor===!0},!e4(B,{restoreAnchor:ue,restoreToken:ce,allowUncapturedAnchor:J.allowUncapturedAnchor===!0})&&zA(B)||(t1=null,n1=null)},forceMeasure:function(B="manual"){return Bi(this,null,function*(){yield kt(),yield RA(),Ta(),i1(),yield kt();const J=Oc(B);return a4(J,!0),J})},settle:i4,scrollToNode:function(B,J="start"){pf(),mt();const ue=Dt.value.length;if(ue<=0)return;const ce=vo(B,0,ue-1),be=()=>{var Le;const Re=vt({nodeIndex:ce,offsetWithinNodePx:0}),je=Bn(ce),it=Xh(),He=(Le=it?.clientHeight)!=null?Le:0,Je=Go();let nt=Re;if(J==="center")nt=Re-He/2+je/2;else if(J==="end")nt=Re-He+je;else if(J==="nearest"&&Je!=null){if(Re>=Je&&Re+je<=Je+He)return;nt=Re<Je?Re:Re-He+je}De(Math.max(0,nt)),Al({immediate:!0}),an.value&&(Ia.value=ce,Yh())};if(an.value)return Ia.value=ce,Yh(),void kt(be);be()}}),qe(()=>eo.value,B=>{if(!B){WA();for(const J of fu.values())for(const ue of J)gg(ue);fu.clear(),zc.clear(),d4(),yf()}},{immediate:!0}),qe(yt,B=>{B&&(function(){if(Y&&yt.value&&Yl.size){d4();for(const J of[80,240,640]){const ue=fA(J,()=>{for(const[ce,be]of Yl)be&&_g(ce,be)},"final");ue!=null&&fg.push(ue)}}})(),Di(B?"final":"content")});const Xj=dE(()=>Di("content"),16),eH=dE(()=>Di("batch"),16);qe([()=>Dt.value.length,()=>dt.value],()=>{Ht.value&&gf(),Xj()},{flush:"post",immediate:!0}),qe([()=>mo.start,()=>mo.end],()=>{eH()},{flush:"post"});const{cleanupBatchScheduler:tH}=(function(B){const{props:J,isClient:ue,isTestEnv:ce,parsedNodesIdentity:be,parsedNodeCount:Le,desiredRenderedCount:Re,datasetKey:je,batchingEnabled:it,incrementalRenderingActive:He,resolvedBatchSize:Je,resolvedInitialBatch:nt,renderedCount:Oe,adaptiveBatchSize:Xe,previousRenderContext:ft,previousBatchConfig:at,requestFrame:Lt,cancelFrame:At,hasIdleCallback:Ot,cleanupNodeVisibility:Kt,onDatasetKeyChanged:on,onDatasetChanged:Xt}=B;let rn=null,En="raf",zn=null,yi=0,yo=!1,no=!1;const Cl=new Set,Xl=new Set;function v1(){if(ue){rn!=null&&(En==="raf"&&At?At(rn):En==="idle"&&typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(rn):En==="timeout"&&window.clearTimeout(rn),rn=null),yi+=1;for(const zo of Cl)At&&At(zo);for(const zo of Xl)window.clearTimeout(zo);Cl.clear(),Xl.clear(),zn=null,yo=!1,no=!1}}function $g(){return typeof performance<"u"?performance.now():Date.now()}function lC(zo){(function(La){var mu;if(!He.value)return;const Na=Math.max(2,(mu=J.renderBatchBudgetMs)!=null?mu:6),Fa=Math.max(1,Je.value||1),wl=Math.max(1,Math.floor(Fa/4));La>1.5*Na?Xe.value=Math.max(wl,Math.floor(.8*Xe.value)):La<.6*Na&&Xe.value<Fa&&(Xe.value=Math.min(Fa,Math.ceil(1.2*Xe.value)))})(zo),yo=!1;const hr=no||Oe.value<Re.value;no=!1,hr&&cC()}function aC(zo,hr={}){var La,mu;if(!He.value)return;const Na=Re.value;if(Oe.value>=Na)return;const Fa=Math.max(1,zo),wl=()=>{const Af=$g();rn=null;const y1=zn??Fa;zn=null;const Cf=$g();Oe.value=Math.min(Na,Oe.value+y1),Kt(Oe.value),(function(y4,Bg){if(!ue)return void lC(Bg);yo=!0;const dC=++yi;kt().then(()=>{var fC;if(dC!==yi)return;const CH=$g(),wH=Math.max(Bg,CH-y4),hC=()=>{dC===yi&&lC(wH)};if(Lt){let Kc=null,wf=null,gC=!1;const mC=()=>{gC||(gC=!0,Kc!==null&&(Cl.delete(Kc),Kc=null),wf!==null&&(Xl.delete(wf),window.clearTimeout(wf),wf=null),hC())};return Kc=Lt(()=>{mC()}),Cl.add(Kc),wf=window.setTimeout(()=>{Kc!==null&&At&&At(Kc),mC()},Math.max(32,(fC=J.renderBatchIdleTimeoutMs)!=null?fC:120)),void Xl.add(wf)}const pC=window.setTimeout(()=>{Xl.delete(pC),hC()},0);Xl.add(pC)})})(Af,$g()-Cf)};if(!ue||hr.immediate)return void wl();const vu=Math.max(0,(La=J.renderBatchDelay)!=null?La:16);if(zn=zn!=null?Math.max(zn,Fa):Fa,rn==null){if(!ce&&Ot&&window.requestIdleCallback){const Af=Math.max(0,(mu=J.renderBatchIdleTimeoutMs)!=null?mu:120);return En="idle",void(rn=window.requestIdleCallback(()=>wl(),{timeout:Af}))}if(Lt&&!ce)return En="raf",void(rn=Lt(()=>{vu===0?wl():(En="timeout",rn=window.setTimeout(()=>wl(),vu))}));En="timeout",rn=window.setTimeout(()=>wl(),vu)}}function uC(zo,hr={}){yo?no=!0:zo==null?cC():aC(zo,hr)}function cC(){He.value&&aC(it.value?Math.max(1,Math.round(Xe.value)):Math.max(1,Je.value))}return qe([be,Le,je,He,Je,nt,()=>J.renderBatchDelay],()=>{var zo;const hr=Le.value,La=ft.value,mu=je.value,Na=!Object.is(mu,La.key),Fa=hr!==La.total,wl=Na||Fa;ft.value={key:mu,total:hr};const vu=at.value,Af=(zo=J.renderBatchDelay)!=null?zo:16,y1=vu.batchSize!==Je.value||vu.initial!==nt.value||vu.delay!==Af||vu.enabled!==He.value;at.value={batchSize:Je.value,initial:nt.value,delay:Af,enabled:He.value},Na&&on(hr),(wl||y1||!He.value)&&v1(),(wl||y1)&&(Xe.value=Math.max(1,Je.value||1)),wl&&Xt();const Cf=Re.value;if(!hr)return Oe.value=0,void Kt(0);if(!He.value)return Oe.value=Cf,void Kt(Oe.value);const y4=Na||La.total===0;Oe.value=y4||y1?Math.min(Cf,nt.value):Math.min(Oe.value,Cf);const Bg=Math.max(1,nt.value||Je.value||hr);Oe.value<Cf?uC(Bg,{immediate:!ue}):Kt(Oe.value)},{immediate:!0}),qe(Re,(zo,hr)=>{He.value&&(typeof hr=="number"&&zo<=hr||zo>Oe.value&&uC())}),{cleanupBatchScheduler:v1}})({props:T,isClient:Y,isTestEnv:Ts,parsedNodesIdentity:bs,parsedNodeCount:Lo,desiredRenderedCount:hg,datasetKey:qj,batchingEnabled:Be,incrementalRenderingActive:Pe,resolvedBatchSize:Ks,resolvedInitialBatch:Zo,renderedCount:dt,adaptiveBatchSize:An,previousRenderContext:St,previousBatchConfig:pi,requestFrame:Li,cancelFrame:wi,hasIdleCallback:Vo,cleanupNodeVisibility:Rj,onDatasetKeyChanged:B=>{yf(),Sn(),Rt(),l1(),B>0&&$c(B)},onDatasetChanged:()=>{an.value&&Al({immediate:!0})}});qe([aA,an,()=>R.value,()=>X()],([B,J])=>{if(!B)return gA(),void T9();Oj(),J?Al({immediate:!0}):T9()},{flush:"post",immediate:!0}),qe([()=>Dt.value.length,()=>an.value],B=>Bi(null,[B],function*([J,ue]){ue&&J&&Y&&(yield kt(),Al({immediate:!0}))}),{flush:"post"}),qe(fi,B=>{B&&(function(){var J;if(Oi.value&&co.value&&Wi.value&&((J=As.value)!=null&&J[1]))return;const ue=xt({type:"paragraph",children:[{type:"text",content:"Probe paragraph text",raw:"Probe paragraph text"}],raw:"Probe paragraph text"}),ce=xt({type:"list_item",children:[ue],raw:"- Probe paragraph text"}),be=xt({type:"list",ordered:!1,items:[ce],raw:"- Probe paragraph text"});Oi.value=ue,co.value=ce,Wi.value=be;const Le={1:null,2:null,3:null,4:null,5:null,6:null};for(let Re=1;Re<=6;Re++)Le[Re]=xt({type:"heading",level:Re,text:"Probe heading",children:[{type:"text",content:"Probe heading",raw:"Probe heading"}],raw:`${"#".repeat(Re)} Probe heading`});As.value=Le})()},{immediate:!0}),qe([()=>R.value,fi],()=>{if(!fi.value)return $9(),void(ie.value=0);vA(),$9(),fi.value&&R.value&&typeof ResizeObserver<"u"&&(Jh=new ResizeObserver(()=>{vA(),$o.value&&Jt(),Ht.value&&gf(),Di("resize")}),Jh.observe(R.value))},{immediate:!0}),qe([fi,ho,zr],()=>Bi(null,null,function*(){if(!fi.value)return se.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Rt();yield kt(),(function(){if(!fi.value||typeof window>"u")return se.value={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},void Rt();const B={paragraph:null,listItem:null,listWrapperOverhead:0,headings:{1:null,2:null,3:null,4:null,5:null,6:null}},J=mA(D9(q.value),".paragraph-node");B.paragraph=rk(q.value,J,"pre-wrap");const ue=D9(j.value),ce=ue?.querySelector(".paragraph-node");B.listItem=rk(j.value,ce,"pre-wrap");const be=ct("readSimpleTextProbeProfile.list.offsetHeight",()=>{var Re,je;return(je=(Re=W.value)==null?void 0:Re.offsetHeight)!=null?je:0}),Le=ct("readSimpleTextProbeProfile.listItem.offsetHeight",()=>{var Re,je;return(je=(Re=j.value)==null?void 0:Re.offsetHeight)!=null?je:0});B.listWrapperOverhead=Math.max(0,be-Le);for(let Re=1;Re<=6;Re++){const je=mA(D9(z[Re]),`h${Re}`);B.headings[Re]=rk(z[Re],je,"pre-wrap")}se.value=B,Rt()})()}),{flush:"post",immediate:!0}),qe(()=>Dt.value.length,()=>{an.value&&Al({immediate:!0})}),qe([fi,ie],()=>{Rt(),an.value&&Al({immediate:!0}),$o.value&&Jt(),Ht.value&&gf(),Di("resize")},{immediate:!1}),qe(()=>Dr.value,B=>{if(B)for(const[J,ue]of On)Sg(J,ue);else if(N9(),an.value)Al({immediate:!0});else for(const[J,ue]of On)ue&&pu(J,!0)},{immediate:!1}),qe([fe,Ee,()=>X()],()=>{var B;(B=to.refresh)==null||B.call(to);for(const[J,ue]of On)Sg(J,ue)},{immediate:!1}),qe([()=>T.viewportPriority,()=>Dt.value.length,Ee],([B,J,ue])=>{if(B!==!1){if(H.value&&(J<=200||J<=ue)){H.value=!1;for(const[ce,be]of On)Sg(ce,be)}}else H.value=!1}),qe(()=>dt.value,()=>{an.value&&Al({immediate:!0})}),qe([Ia,ns,qi,()=>Dt.value.length,an],()=>{Yh()},{immediate:!0});let u1=null,c1=!1,kf=null;function d1(){u1=null,W9=null,H9=void 0,ff=null,l1()}function f4(){yf(),Sn(),Rt(),xi.clear();const B=Dt.value.length;B>0&&$c(B),t4()}function h4(){u4(),hA(),s1=null,jc=null,Hc=null,Cg=null,t1=null,n1=null,c1=!1,d1(),_A("restore"),mt(),pf()}function f1(B){var J;return[(J=Fs())!=null?J:"",Vi(),Ea(),kg.value,r1(B),Dt.value.length,Math.round(ei(0,Dt.value.length)),Math.round(Rc()),Ns.count,Math.round(Ns.total)].join(":")}function qA(){return Bi(this,null,function*(){var B,J,ue,ce;const be=(B=i.virtualScroll)==null?void 0:B.settledToken,Le=r1(be),Re=Vi(),je=Fs(),it=zr.value;if(vn.value&&((J=i.virtualScroll)==null?void 0:J.settleMode)==="manual"&&bg(be))if(q9()){if(f1(be)!==ff&&!c1){c1=!0;try{const He=yield i4({reason:"manual",expectedSettledTokenKey:Le}),Je=r1()===Le;n4(Re,je,it)&&He.sessionKey===Re&&He.threadKey===je&&Je&&He.stable&&He.phase==="final"&&(ff=f1((ue=i.virtualScroll)==null?void 0:ue.settledToken))}finally{c1=!1,yield kt();const He=(ce=i.virtualScroll)==null?void 0:ce.settledToken,Je=bg(He)?f1(He):"";n4(Re,je,it)&&Je&&ff!==Je&&qA()}}}else Di("manual")})}qe(vn,(B,J)=>{if(B!==J){if(!B)return h4(),void u4();h4(),f4(),kf=zr.value,Di("content")}},{flush:"post"}),qe([vn,zr],([B,J])=>{B?kf!=null?kf!==J&&(kf=J,(function(ue="resize"){yf(),Sn(),Rt(),xi.clear();const ce=Dt.value.length;ce>0&&$c(ce),t4(),jc=null,Hc=null,Cg=null,s1=null,c1=!1,d1(),BA(),kt(()=>{Ta(),$o.value&&Jt(),Ht.value&&gf(),Di(ue)})})("resize")):kf=J:kf=null},{flush:"post",immediate:!0}),qe([vn,()=>Vi(),()=>Fs()],([B])=>{B&&(h4(),f4(),_A("content"),Di("content"))}),qe([vn,()=>Vi(),()=>Fs(),zr,()=>Dt.value.length],([B])=>{B&&(function(J="async-node"){let ue=!1;for(const[ce,be]of Array.from(Jl.entries()))P9(be)||(Jl.delete(ce),$r.delete(ce),ue=!0);ue&&(cf(),Di(J))})("async-node")},{flush:"post"}),qe([vn,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.sessionKey},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.measurementKey},()=>i.indexKey,()=>V.value],([B])=>{B&&(l1(),(function(J="content"){if(!vn.value)return;const ue=[],ce=Dt.value.length,be=F9(ce);for(const Le of Array.from(xi.keys())){if(Le>=ce){ue.push(Le);continue}if(Le<be)continue;const Re=e1(Le),je=xi.get(Le);je!=null&&je!==Re&&ue.push(Le),xi.set(Le,Re)}for(const Le of Array.from(xi.keys()))Le>=ce&&xi.delete(Le);ue.length&&((function(Le,Re={}){const je=Array.from(Le,Number);We(je);let it=0;if($t(()=>(it=S9(je,Re),it>0)),it>0)(function(He){for(const Je of He)xi.delete(Je)})(je);else for(const He of je)ke.delete(He)})(ue,{notify:!1}),Rt(),d1(),$o.value&&Jt(),Ht.value&&gf(),Di(J))})("content"))},{flush:"post",immediate:!0}),qe([vn,()=>Dt.value.length,()=>Vi(),()=>Fs()],([B,J,ue,ce],[be,Le,Re,je])=>{B&&be&&ue===Re&&ce===je&&J!==Le&&d1()},{flush:"post"}),qe([vn,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.heightCache},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.heightCacheWidth},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.restoreState},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.measurementKey},()=>Dt.value.length,()=>Vi(),ie],()=>{BA()},{flush:"post",immediate:!0}),qe([vn,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.restoreState},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.restoreAnchor},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.measurementKey},()=>Dt.value.length,()=>Vi(),ie],B=>Bi(null,[B],function*([J,ue]){if(!J||!ue)return;yield kt();const ce=(function(){var be;const Le=(be=i.virtualScroll)==null?void 0:be.restoreAnchor;return Le==null||Le===!1?null:Le===!0?"true":String(Le)})();e4(ue,{restoreAnchor:ce!=null,restoreToken:ce??void 0})}),{flush:"post",immediate:!0}),qe([vn,ie,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.restoreState},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.measurementKey}],([B])=>{var J;if(!B)return;const ue=(J=i.virtualScroll)==null?void 0:J.restoreState;ue&&jc&&Hc==="restore"&&(DA(ue)||(f4(),jc=null,Hc=null,Di("resize")))},{flush:"post"}),qe([vn,()=>Dt.value.length,()=>Vi(),ie],B=>Bi(null,[B],function*([J]){var ue;const ce=t1,be=n1;J&&ce&&(yield kt(),!e4(ce,{restoreAnchor:be?.restoreAnchor===!0,restoreToken:(ue=be?.restoreToken)!=null?ue:"imperative",allowUncapturedAnchor:be?.allowUncapturedAnchor===!0})&&zA(ce)||(t1=null,n1=null))}),{flush:"post",immediate:!0}),qe([vn,yt,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.settleMode},()=>Vi(),()=>Fs(),zr,E9,cA,()=>dt.value,hg,()=>Ns.count,()=>Ns.total],([B,J,ue])=>{if(!B||J!==!0||ue==="manual"||!U9())return;const ce=(function(){var be;const Le=Dt.value.length;return[(be=Fs())!=null?be:"",Vi(),Ea(),kg.value,Le,Math.round(ei(0,Le)),Math.round(Rc()),Ns.count,Math.round(Ns.total)].join(":")})();u1!==ce&&(u1=ce,i4({reason:"final"}).then(be=>{be.stable||u1!==ce||(u1=null)}))},{flush:"post",immediate:!0}),qe([vn,yt,()=>{var B;return(B=i.virtualScroll)==null?void 0:B.settleMode},()=>{var B;return(B=i.virtualScroll)==null?void 0:B.settledToken},()=>Vi(),()=>Fs(),zr,E9,cA,()=>dt.value,hg,()=>Dt.value.length,()=>Ns.count,()=>Ns.total],()=>{qA()},{flush:"post",immediate:!0}),qe([()=>Dt.value.length,an,ns,qi,()=>mo.start,()=>mo.end],([B,J,ue,ce,be,Le])=>{Ce.value&&Qt("virtualization",{nodes:B,virtualization:J,maxLiveNodes:ue,buffer:ce,focusIndex:Ia.value,scroll:J?(()=>{const Re=pt.value||Ae();return Re?{reverse:_e(Re),scrollTop:Math.round(Re.scrollTop),scrollTopAbs:Math.round(Math.abs(Re.scrollTop)),scrollHeight:Math.round(Re.scrollHeight),clientHeight:Math.round(Re.clientHeight)}:null})():null,liveRange:{start:be,end:Le},rendered:dt.value})}),qe([()=>T.customId],([B],J,ue)=>{if(!B||fo)return;const ce=(function(be,Le){return be?(Vs.controllers[be]=Le,()=>{Vs.controllers[be]===Le&&delete Vs.controllers[be]}):()=>{}})(B,{captureRestoreAnchor:Ki,restoreAnchor:Bo,getAnchorDrift:bl,getReport:Hj});ue(()=>{ce()})},{immediate:!0}),Gn(()=>{(function(){if(vn.value)try{Ta(),i1();const B=Oc("manual");OA(B)&&(N(B),s1=B,o4=o1());const J=hf(B,{includeHeightCache:!0,includeContentHash:!0,allowAnchorFallback:!1,requireViewport:!0,includeEmptyState:!0});J&&(O(J),J.anchor&&P(J.anchor),mf=a1(J))}catch{}})(),tH(),N9(),fn(),WA();for(const B of fu.values())for(const J of B)gg(J);fu.clear(),zc.clear(),xi.clear(),d4(),yf(),$9(),mt(),pf(),u4(),gA(),T9()});const nH=op("ViewportDeferredMermaidBlockNode",Dl({loader:()=>Bi(null,null,function*(){try{return(yield vs(()=>import("./index11-D6nykIM1.js"),__vite__mapDeps([9,7]))).default}catch(B){return console.warn('[markstream-vue] Optional peer dependencies for MermaidBlockNode are missing. Falling back to preformatted code rendering. To enable Mermaid rendering, please install "mermaid".',B),br}}),loadingComponent:SE,delay:0}),SE),iH=op("ViewportDeferredInfographicBlockNode",Dl({loader:()=>Bi(null,null,function*(){try{return(yield vs(()=>import("./index10-BY9KLppN.js"),[])).default}catch(B){return console.warn('[markstream-vue] Failed to load InfographicBlockNode. Falling back to preformatted code rendering. To enable Infographic rendering, install "@antv/infographic" and configure setInfographicLoader with a dynamic loader.',B),br}}),loadingComponent:xE,delay:0}),xE),sH=op("ViewportDeferredD2BlockNode",Dl(()=>Bi(null,null,function*(){try{return(yield vs(()=>import("./index8-CdUxL-Tk.js"),[])).default}catch(B){return console.warn('[markstream-vue] Optional peer dependencies for D2BlockNode are missing. Falling back to preformatted code rendering. To enable D2 rendering, please install "@terrastruct/d2".',B),br}})),br),UA={text:ks,paragraph:Fd,heading:h9,code_block:Q3,list:Ch,list_item:Ah,blockquote:p2,table:Dp,definition_list:g2,footnote:m2,footnote_reference:Ur,footnote_anchor:Np,admonition:b2,vmr_container:y2,hardbreak:ec,link:ar,image:Xu,thematic_break:v2,math_inline:Gl,math_block:yO,strong:rr,emphasis:ur,strikethrough:lr,highlight:Vr,insert:Ir,subscript:_r,superscript:Sr,emoji:xr,checkbox:qr,checkbox_input:qr,inline_code:Uo,html_inline:Kr,reference:or,html_block:Fp},oH=L(()=>R9()),KA=L(()=>uE(T.codeBlockProps)),rH=L(()=>uE(T.codeBlockProps,{omit:["langs"]})),VA=L(()=>_t(_t({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,monacoOptions:T.codeBlockMonacoOptions,themes:T.themes,langs:g.value==="shiki"?T.langs:void 0,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof ae.value=="boolean"?{showTooltips:ae.value}:{}),rH.value)),ZA=L(()=>_t(yn(_t({},VA.value),{langs:T.langs}),KA.value));function GA(B){return typeof B=="boolean"?B:void 0}const lH=L(()=>{const B=T.codeBlockProps||{},J={},ue=GA(B.showLineNumbers);ue!==void 0&&(J.showLineNumbers=ue);const ce=GA(B.diffInline);ce!==void 0&&(J.diffInline=ce);const be=(function(Le){const Re=Number(Le);return Number.isFinite(Re)&&Re>0?Re:void 0})(B.reservedHeightPx);return be!==void 0&&(J.reservedHeightPx=be),J}),aH=L(()=>_t(_t({stream:T.codeBlockStream,darkTheme:T.codeBlockDarkTheme,lightTheme:T.codeBlockLightTheme,themes:T.themes,langs:T.langs,minWidth:T.codeBlockMinWidth,maxWidth:T.codeBlockMaxWidth},typeof ae.value=="boolean"?{showTooltips:ae.value}:{}),KA.value)),uH=L(()=>_t({},T.mermaidProps||{})),QA=L(()=>_t({},T.d2Props||{})),cH=L(()=>_t({},T.infographicProps||{})),h1=L(()=>({typewriter:f.value,fade:T.fade,customHtmlTags:vi.value.customHtmlTags})),dH=L(()=>_t(_t({},h1.value),typeof ae.value=="boolean"?{showTooltip:ae.value}:{})),fH=L(()=>_t(_t({},h1.value),typeof ae.value=="boolean"?{showTooltips:ae.value}:{})),hH=L(()=>_t(_t({},h1.value),typeof ae.value=="boolean"?{showTooltips:ae.value}:{})),pH=L(()=>_t(_t({},h1.value),typeof ae.value=="boolean"?{showTooltips:ae.value}:{}));function gH(B){return Array.isArray(B.children)&&B.children.length>0}const Ig=L(()=>jj.value.map(B=>{var J,ue,ce,be,Le,Re,je,it;let He=(function(At){var Ot,Kt,on,Xt,rn,En,zn;if(At.type!=="code_block")return At;const yi=At,yo=[String((Ot=yi.language)!=null?Ot:""),String((Kt=yi.loading)!=null?Kt:""),String((on=yi.diff)!=null?on:""),String((Xt=yi.code)!=null?Xt:""),String((rn=yi.originalCode)!=null?rn:""),String((En=yi.updatedCode)!=null?En:""),String((zn=yi.raw)!=null?zn:"")].join("\0"),no=tl.get(yi);if(no&&no.signature===yo)return no.node;const Cl=_t({},yi);return tl.set(yi,{signature:yo,node:Cl}),Cl})(B.node);const Je=Mg(He);let nt=eC(He,Je);if((He.type==="html_block"||He.type==="html_inline")&&nt===UA[He.type]){const At=He,Ot=String((J=At.tag)!=null?J:"").trim().toLowerCase()||Hz(At.content);if(Ot){const Kt=Tn.value[Ot];if(fs.value.has(Ot)&&Kt)nt=Kt,He=yn(_t({},At),{type:Ot,tag:Ot,content:lAe(At.content,Ot)});else if(Wz((ue=At.content)!=null?ue:At.raw,Ot)){const on=String((be=(ce=At.content)!=null?ce:At.raw)!=null?be:"");He.type==="html_inline"?(nt=ks,He={type:"text",content:on,raw:on}):(nt=Fd,He={type:"paragraph",children:[{type:"text",content:on,raw:on}],raw:on})}}}const Oe=He.type==="code_block"&&g.value==="pre"&&nt===br&&!p4(Tn.value,Je);let Xe=_t({},(function(At,Ot,Kt){const on=Ot??Mg(At);if(At.type==="code_block"){const Xt=on?p4(Tn.value,on):void 0;if(Kt&&g.value==="pre"&&!Xt&&Kt===br)return lH.value;if(Kt&&on&&Kt===Xt)return on==="mermaid"?JA(At):on==="infographic"?XA(At):on==="d2"||on==="d2lang"?QA.value:ZA.value;if(Kt&&Kt===Tn.value.code_block)return ZA.value;if(kA(Kt))return aH.value}return on==="mermaid"?JA(At):on==="infographic"?XA(At):on==="d2"||on==="d2lang"?QA.value:At.type==="link"?dH.value:At.type==="list"?fH.value:At.type==="blockquote"?hH.value:At.type==="table"?pH.value:At.type==="code_block"?VA.value:h1.value})(He,Je,nt));const ft=fi.value?uf.value[B.index]:null;He.type==="code_block"&&ft?.kind==="code-block"&&(Xe=yn(_t({},Xe),Oe?{reservedHeightPx:(Le=ft.height)!=null?Le:ft.contentHeight}:{estimatedHeightPx:ft.height,estimatedContentHeightPx:ft.contentHeight,estimatedDiffInline:ft.diffInline})),Oe||He.type!=="code_block"||Je!=="mermaid"||eh(Xe.estimatedPreviewHeightPx)!=null||(Xe=yn(_t({},Xe),{estimatedPreviewHeightPx:Wv(jv(String((Re=He.code)!=null?Re:"")))})),Oe||He.type!=="code_block"||Je!=="infographic"||eh(Xe.estimatedPreviewHeightPx)!=null||(Xe=yn(_t({},Xe),{estimatedPreviewHeightPx:qv(Hv(String((je=He.code)!=null?je:"")))})),He.type==="math_block"&&(Xe=yn(_t({},Xe),{cacheScope:Nt}));const at=(function(At,Ot){const Kt=String(At.type);return!X0(Kt)&&Tn.value[Kt]===Ot})(He,nt),Lt=at?m7(He,oe.value):void 0;return yn(_t({},B),{node:He,component:nt,bindings:Xe,customBindings:_t(_t({},Lt??{}),Xe),rendersCustomNode:at,hasSlotChildren:gH(He),slotContent:String((it=He.content)!=null?it:""),isCodeBlock:He.type==="code_block",indexKey:`${oH.value}-${B.index}`,vnodeKey:`${Wj.value}\0${B.index}\0${He.type}`})}));function Mg(B){var J;return B?.type==="code_block"?String((J=B.language)!=null?J:"").trim().toLowerCase():""}function p4(B,J){const ue=J.trim().toLowerCase();if(ue)for(const ce of[ue,c9(ue),XR(ue)]){const be=ce&&B[ce];if(be)return be}}function YA(B,J,ue,ce){var be,Le;const Re=_t({},B.value);return eh(Re.estimatedPreviewHeightPx)==null&&(Re.estimatedPreviewHeightPx=ce(ue(String((be=J?.code)!=null?be:"")),void 0,Re.maxHeight==="none"?null:(Le=eh(Re.maxHeight))!=null?Le:void 0)),Re}function JA(B){return YA(uH,B,jv,Wv)}function XA(B){return YA(cH,B,Hv,qv)}function eC(B,J){if(!B)return E8;const ue=Tn.value,ce=ue[String(B.type)];if(B.type==="code_block"){const be=J??Mg(B),Le=be?p4(ue,be):void 0;return Le||(g.value==="pre"?ue.code_block||br:be==="mermaid"?ue.mermaid||nH:be==="infographic"?ue.infographic||iH:be==="d2"||be==="d2lang"?ue.d2||sH:ce||ue.code_block||bA.value)}return ce||UA[String(B.type)]||E8}function g4(B){s("click",B)}function mH(B){var J;(J=B.target)!=null&&J.closest("[data-node-index]")&&s("mouseover",B)}function vH(B){var J;(J=B.target)!=null&&J.closest("[data-node-index]")&&s("mouseout",B)}function tC(B){s("mouseover",B)}function nC(B){s("mouseout",B)}const Uc=G(null),fr=G(!1),p1=G(null),yH=L(()=>!(T.domMode!=="minimal"||le.value||T.fade!==!1||f.value||fr.value||hs.value||an.value||Ti.value||Ai.value||Es.value||Object.keys(Tn.value).length!==0));let g1,bf=null,m4=0,Eg=0,Tg=0;const iC=["code_block","admonition","table","math_block","html_block","image","thematic_break"],kH=new Set(iC),sC=[".typewriter-cursor",".height-estimation-probes",...iC.map(B=>`[data-node-type="${B}"]`),"script","style"].join(",");function oC(B){if(!B||typeof B!="object")return!1;const J=B.type;return typeof J=="string"&&kH.has(J)}function Lg(B){var J,ue;if(!B||typeof B!="object")return 0;const ce=B,be=(ue=(J=ce.raw)!=null?J:ce.content)!=null?ue:ce.code;if(typeof be=="string")return be.length;const Le=ce.children;if(Array.isArray(Le))return Le.reduce((je,it)=>je+Lg(it),0);const Re=ce.items;return Array.isArray(Re)?Re.reduce((je,it)=>je+Lg(it),0):0}function Ng(){g1&&(clearTimeout(g1),g1=void 0)}function v4(){m4+=1,bf!=null&&(wi?.(bf),bf=null)}function m1(){v4(),gu(),Uc.value&&(Uc.value.style.visibility="hidden")}function bH(B){var J;if(B.nodeType!==Node.TEXT_NODE||!((J=B.textContent)!=null?J:"").trim())return!1;const ue=B.parentElement;return!!ue&&!ue.closest(sC)}function AH(B){let J=B.lastChild;for(;J;){if(bH(J))return J;if(J.nodeType===Node.ELEMENT_NODE){const ue=J;if(!ue.matches(sC)&&ue.lastChild){J=ue.lastChild;continue}}for(;J&&J!==B&&!J.previousSibling;)J=J.parentNode;if(!J||J===B)break;J=J.previousSibling}return null}function rC(){const B=Ig.value;for(let J=B.length-1;J>=0;J--){const ue=B[J];if(!ue||oC(ue.node)||!xg(ue.index))continue;const ce=On.get(ue.index);if(!ce)continue;const be=AH(ce);if(be)return be}return null}function gu(){p1.value&&(p1.value.classList.remove(_E),p1.value=null)}function Fg(){if(d.value!=="simple"||!Y||!fr.value||!R.value)return void gu();const B=rC(),J=B?(function(ue){var ce;const be=(ce=ue.parentElement)==null?void 0:ce.closest(".text-node");return be instanceof HTMLElement?be:ue.parentElement})(B):null;J!==p1.value&&(gu(),J&&(J.classList.add(_E),p1.value=J))}function Dg(){if(d.value!=="precise"||!Y||!fr.value||bf!=null)return;const B=m4,J=()=>{bf=null,B===m4&&(function(){var ue,ce;if(d.value!=="precise"||!(Y&&fr.value&&R.value&&Uc.value))return;const be=R.value,Le=Uc.value;Le.style.visibility="hidden";const Re=rC();if(!Re)return;let je=0,it=0,He=20,Je=!1;if(Re?.textContent){const nt=Re.textContent.length,Oe=document.createRange();Oe.setStart(Re,Math.max(0,nt-1)),Oe.setEnd(Re,nt);const Xe=typeof Oe.getClientRects=="function"?Oe.getClientRects():void 0,ft=(ce=Xe?.[Xe.length-1])!=null?ce:(ue=Re.parentElement)==null?void 0:ue.getBoundingClientRect();if(ft){const at=ct("typewriterCursor.root.getBoundingClientRect",()=>be.getBoundingClientRect());je=ft.right-at.left+be.scrollLeft,it=ft.top-at.top+be.scrollTop,He=ft.height||He,Je=!0}Oe.detach()}Je&&(Le.style.transform=`translate(${Math.max(0,je)}px, ${Math.max(0,it)}px)`,Le.style.height=`${He}px`,Le.style.visibility="visible")})()};Li?bf=Li(J):J()}return qe([et,()=>i.content,()=>i.nodes,()=>T.typewriter,yt],()=>Bi(null,null,function*(){var B,J;if(!Y||le.value||!ne.value)return;if(yt.value)return fr.value=!1,Ng(),void m1();if((B=i.nodes)!=null&&B.length)return fr.value=!1,Ng(),m1(),Eg=((J=i.content)!=null?J:"").length,void(Tg=et.value.length);const ue=(function(){var je,it;return(je=i.nodes)!=null&&je.length?i.nodes.reduce((He,Je)=>He+Lg(Je),0):((it=i.content)!=null?it:"").length})(),ce=(function(){var je;return(je=i.nodes)!=null&&je.length?i.nodes.reduce((it,He)=>it+Lg(He),0):et.value.length})(),be=!oC(Dt.value[Dt.value.length-1]),Le=ue>Eg,Re=ce>Tg;if(!f.value||!be||!Le&&!Re)return f.value&&be||(fr.value=!1,m1()),Eg=ue,void(Tg=ce);Eg=ue,Tg=ce,fr.value=!0,d.value==="precise"&&Uc.value&&(Uc.value.style.visibility="hidden"),Ng(),yield kt(),d.value==="simple"?Fg():(gu(),Dg()),g1=setTimeout(()=>{g1=void 0,fr.value=!1},3e3)}),{flush:"post",immediate:!0}),qe(fr,B=>Bi(null,null,function*(){B?(yield kt(),d.value!=="simple"?(gu(),d.value==="precise"&&Dg()):Fg()):m1()}),{flush:"post"}),qe(d,()=>Bi(null,null,function*(){if(Y&&!le.value&&ne.value&&fr.value){if(yield kt(),d.value==="simple")return v4(),void Fg();gu(),d.value!=="precise"?m1():Dg()}}),{flush:"post"}),qe([()=>dt.value,()=>mo.start,()=>mo.end],()=>Bi(null,null,function*(){Y&&!le.value&&ne.value&&fr.value&&(yield kt(),d.value!=="simple"?(gu(),d.value==="precise"&&Dg()):Fg())}),{flush:"post"}),Gn(()=>{Ng(),v4(),gu(),sn.clear()}),(B,J)=>{const ue=WL("NodeRenderer",!0);return p(le)?(k(!0),E(Te,{key:0},ht(Ig.value,ce=>(k(),E(Te,{key:ce.vnodeKey},[ce.rendersCustomNode?(k(),de(xs(ce.component),Un({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onClick:g4,onMouseover:tC,onMouseout:nC,onCopy:J[0]||(J[0]=be=>o(be)),onHandleArtifactClick:J[1]||(J[1]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ce.hasSlotChildren?(k(),de(ue,Un({key:0,ref_for:!0},Pn.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(k(),de(ue,Un({key:1,ref_for:!0},Pn.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(k(),de(xs(ce.component),Un({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onClick:g4,onMouseover:tC,onMouseout:nC,onCopy:J[2]||(J[2]=be=>o(be)),onHandleArtifactClick:J[3]||(J[3]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))],64))),128)):(k(),E("div",{key:1,ref_key:"containerRef",ref:R,class:Fe(["markstream-vue markdown-renderer",[{dark:T.isDark},{virtualized:an.value},{"virtual-scroll-coordinated":ts.value},{"stable-layout":Dj.value},{"typewriter-simple-cursor":fr.value&&d.value==="simple"}]]),"data-custom-id":T.customId,onClick:g4,onMouseover:mH,onMouseout:vH},[Fr.value||an.value?(k(),E(Te,{key:0},[Fr.value?(k(),de(hTe,{key:0,width:ho.value,"flow-root":an.value||ts.value,"paragraph-node":Oi.value,"list-item-node":co.value,"list-node":Wi.value,"heading-nodes":As.value,"set-paragraph-wrapper":$j,"set-list-item-wrapper":Bj,"set-list-wrapper":zj,"set-heading-wrapper":Pj},null,8,["width","flow-root","paragraph-node","list-item-node","list-node","heading-nodes"])):te("",!0),an.value?(k(),E("div",{key:1,class:"node-spacer",style:qt({height:`${B9.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],64)):te("",!0),yH.value?(k(!0),E(Te,{key:1},ht(Ig.value,ce=>(k(),E(Te,{key:ce.vnodeKey},[xg(ce.index)?(k(),de(xs(ce.component),Un({key:0,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onMouseover:J[4]||(J[4]=be=>s("mouseover",be)),onMouseout:J[5]||(J[5]=be=>s("mouseout",be)),onCopy:J[6]||(J[6]=be=>o(be)),onHandleArtifactClick:J[7]||(J[7]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):te("",!0)],64))),128)):(k(!0),E(Te,{key:2},ht(Ig.value,ce=>(k(),E("div",{key:ce.vnodeKey,ref_for:!0,ref:be=>Sg(ce.index,be),class:"node-slot","data-node-index":ce.index,"data-node-type":ce.node.type},[xg(ce.index)?(k(),E("div",{key:0,ref_for:!0,ref:be=>(function(Le,Re){var je;Re||(function(nt){const Oe=`${R9()}-${nt}`;let Xe=!1;for(const ft of Array.from($r.keys())){const at=Jl.get(ft);(at?.index===nt||ft===Oe||ft.startsWith(`${Oe}-`))&&($r.delete(ft),Jl.delete(ft),Xe=!0)}Xe&&(cf(),Di("async-node"))})(Le),Ma.delete(Le),(function(nt){var Oe;const Xe=((Oe=zc.get(nt))!=null?Oe:0)+1;zc.set(nt,Xe)})(Le);const it=fu.get(Le);if(it){for(const nt of it)gg(nt);fu.delete(Le)}if((function(nt){const Oe=Cs.get(nt);Oe&&(ws?.unobserve(Oe),Do.delete(Oe),Cs.delete(nt))})(Le),!Re||!eo.value)return Yl.delete(Le),void zc.delete(Le);Yl.set(Le,Re);const He=()=>{_g(Le,Re)};queueMicrotask(He);const Je=(ws||typeof ResizeObserver>"u"||(ws=new ResizeObserver(nt=>{if(nt.length)for(const Oe of nt){const Xe=Do.get(Oe.target),ft=Cs.get(Xe??-1);Xe!=null&&ft&&_g(Xe,ft)}else Ta()})),ws);if(Je&&(Cs.set(Le,Re),Do.set(Re,Le),Je.observe(Re)),typeof window<"u"){const nt=((je=Dt.value[Le])==null?void 0:je.type)==="code_block"?[16,80,240,800]:yt.value?[80]:[];if(nt.length){const Oe=nt.map(Xe=>fA(Xe,He,"node-resize")).filter(Xe=>Xe!=null);Oe.length&&fu.set(Le,Oe)}}})(ce.index,be),class:"node-content"},[ce.isCodeBlock?ce.rendersCustomNode?(k(),de(xs(ce.component),Un({key:1,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:J[12]||(J[12]=be=>o(be)),onHandleArtifactClick:J[13]||(J[13]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ce.hasSlotChildren?(k(),de(ue,Un({key:0,ref_for:!0},Pn.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(k(),de(ue,Un({key:1,ref_for:!0},Pn.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(k(),de(xs(ce.component),Un({key:2,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:J[14]||(J[14]=be=>o(be)),onHandleArtifactClick:J[15]||(J[15]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"])):(k(),de(ls,{key:0,name:"fade",css:T.fade!==!1,appear:T.fade!==!1},{default:he(()=>[ce.rendersCustomNode?(k(),de(xs(ce.component),Un({key:0,ref_for:!0},ce.customBindings,{node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey,"custom-id":T.customId,"is-dark":T.isDark,onCopy:J[8]||(J[8]=be=>o(be)),onHandleArtifactClick:J[9]||(J[9]=be=>s("handleArtifactClick",be))}),{default:he(()=>[ce.hasSlotChildren?(k(),de(ue,Un({key:0,ref_for:!0},Pn.value,{nodes:ce.node.children,"index-key":ce.indexKey,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["nodes","index-key"])):ce.slotContent?(k(),de(ue,Un({key:1,ref_for:!0},Pn.value,{content:ce.slotContent,final:!ce.node.loading,"index-key":`${ce.indexKey}-content`,"smooth-streaming":!1,"batch-rendering":!1,"defer-nodes-until-visible":!1,"render-as-fragment":!0}),null,16,["content","final","index-key"])):te("",!0)]),_:2},1040,["node","loading","index-key","custom-id","is-dark"])):(k(),de(xs(ce.component),Un({key:1,node:ce.node,loading:ce.node.loading,"index-key":ce.indexKey},{ref_for:!0},ce.bindings,{"custom-id":T.customId,"is-dark":T.isDark,onCopy:J[10]||(J[10]=be=>o(be)),onHandleArtifactClick:J[11]||(J[11]=be=>s("handleArtifactClick",be))}),null,16,["node","loading","index-key","custom-id","is-dark"]))]),_:2},1032,["css","appear"]))],512)):(k(),E("div",{key:1,class:"node-placeholder",style:qt({height:`${Bn(ce.index)}px`})},null,4))],8,mTe))),128)),fr.value&&d.value==="precise"?(k(),E("span",{key:3,ref_key:"typewriterCursorRef",ref:Uc,class:"typewriter-cursor","aria-hidden":"true"},null,512)):te("",!0),an.value?(k(),E("div",{key:4,class:"node-spacer",style:qt({height:`${z9.value}px`}),"aria-hidden":"true"},null,4)):te("",!0)],42,gTe))}}})),[["__scopeId","data-v-a9489508"]]),Mr=NO;Mr.install=e=>{const t=new Set(["MarkdownRender","NodeRenderer",Mr.__name,Mr.name].filter(n=>!!n));for(const n of t)e.component(n,NO)};const T7=Object.freeze(Object.defineProperty({__proto__:null,default:Mr},Symbol.toStringTag,{value:"Module"})),vTe={key:0,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},yTe={key:1,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},kTe={key:2,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},bTe={key:3,xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"admonition-icon"},ATe={class:"admonition-title"},CTe=["aria-expanded","aria-controls"],wTe=["id"],b2=di(Qe({__name:"AdmonitionNode",props:{node:{},indexKey:{},isDark:{type:Boolean},typewriter:{type:Boolean},fade:{type:Boolean},customId:{}},emits:["copy"],setup(e,{emit:t}){var n;const i=e,s=t,o=L(()=>{if(i.node.title&&i.node.title.trim().length)return i.node.title;const u=i.node.kind||"note";return u.charAt(0).toUpperCase()+u.slice(1)}),r=G(!!i.node.collapsible&&!((n=i.node.open)==null||n));function l(){i.node.collapsible&&(r.value=!r.value)}const a=`admonition-${Math.random().toString(36).slice(2,9)}`;return(u,c)=>(k(),E("div",{class:Fe(["admonition",[`admonition-${i.node.kind}`]])},[w("div",{id:a,class:"admonition-legend"},[i.node.kind==="note"||i.node.kind==="info"?(k(),E("svg",vTe,[...c[1]||(c[1]=[w("circle",{cx:"12",cy:"12",r:"10"},null,-1),w("path",{d:"M12 16v-4"},null,-1),w("path",{d:"M12 8h.01"},null,-1)])])):i.node.kind==="tip"?(k(),E("svg",yTe,[...c[2]||(c[2]=[w("path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"},null,-1),w("path",{d:"M9 18h6"},null,-1),w("path",{d:"M10 22h4"},null,-1)])])):i.node.kind==="warning"||i.node.kind==="caution"?(k(),E("svg",kTe,[...c[3]||(c[3]=[w("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-3"},null,-1),w("path",{d:"M12 9v4"},null,-1),w("path",{d:"M12 17h.01"},null,-1)])])):i.node.kind==="danger"||i.node.kind==="error"?(k(),E("svg",bTe,[...c[4]||(c[4]=[w("polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2"},null,-1),w("path",{d:"M12 8v4"},null,-1),w("path",{d:"M12 16h.01"},null,-1)])])):te("",!0),w("span",ATe,F(o.value),1),i.node.collapsible?(k(),E("button",{key:4,class:"admonition-toggle","aria-expanded":!r.value,"aria-controls":`${a}-content`,onClick:l},[(k(),E("svg",{style:qt({rotate:r.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[...c[5]||(c[5]=[w("path",{d:"m9 18 6-6-6-6"},null,-1)])],4))],8,CTe)):te("",!0)]),$n(w("div",{id:`${a}-content`,class:"admonition-content","aria-labelledby":a},[K(p(Mr),{"index-key":`admonition-${e.indexKey}`,nodes:i.node.children,"custom-id":i.customId,typewriter:i.typewriter,fade:i.fade,onCopy:c[0]||(c[0]=d=>s("copy",d))},null,8,["index-key","nodes","custom-id","typewriter","fade"])],8,wTe),[[Qi,!r.value]])],2))}}),[["__scopeId","data-v-a83480e1"]]);b2.install=e=>{e.component(b2.__name,b2)};const D8=()=>vs(()=>import("./d2_markstream-vue-yoD6TSFD.js"),[]);let Lm=null,Nm=D8,Fm=null,IE=!1,ME=!1;function Rat(){return Bi(this,null,function*(){if(Lm)return Lm;const e=Nm;return e?e===D8&&IE?null:Fm||(Fm=Bi(null,null,function*(){let t;try{t=yield e()}catch(n){if(e===D8)return e===Nm&&(IE=!0,(function(i){ME||(ME=!0,console.warn('[markstream-vue] Optional dependency "@terrastruct/d2" is not installed. D2 blocks will render as source.',i))})(n)),null;throw n}finally{e===Nm&&(Fm=null)}return e!==Nm?null:t?(Lm=(function(n){var i;if(!n)return n;if(n.D2&&typeof n.D2=="function")return n.D2;if(n.default&&n.default.D2&&typeof n.default.D2=="function")return n.default.D2;const s=(i=n.default)!=null?i:n;return typeof s=="function"?s:s?.D2&&typeof s.D2=="function"?s.D2:s})(t),Lm):null}),Fm):null})}let Dm=null,FO=null,$m=null;function Oat(){return typeof FO=="function"}function Pat(){return Bi(this,null,function*(){if(Dm)return Dm;const e=FO;return e?$m||($m=Bi(null,null,function*(){const t=yield e(),n=(function(i){var s,o,r;if(!i)return null;const l=(s=i.default)!=null?s:i,a=typeof l=="function"&&typeof((o=l.prototype)==null?void 0:o.render)=="function"?l:(r=i.Infographic)!=null?r:l?.Infographic;return typeof a=="function"?a:null})(t);return n?(Dm=n,Dm):null}).finally(()=>{$m=null}),$m):null})}const jat=Symbol("markstreamLanguageIconResolver"),EE=document.createElement("i");function xTe(e){const t="&"+e+";";EE.innerHTML=t;const n=EE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wa(e,t,n,i){const s=e.length;let o=0,r;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)r=Array.from(i),r.unshift(t,n),e.splice(...r);else for(n&&e.splice(t,n);o<i.length;)r=i.slice(o,o+1e4),r.unshift(t,0),e.splice(...r),o+=1e4,t+=1e4}function fl(e,t){return e.length>0?(wa(e,e.length,0,t),e):t}const TE={}.hasOwnProperty;function STe(e){const t={};let n=-1;for(;++n<e.length;)_Te(t,e[n]);return t}function _Te(e,t){let n;for(n in t){const s=(TE.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let r;if(o)for(r in o){TE.call(s,r)||(s[r]=[]);const l=o[r];ITe(s[r],Array.isArray(l)?l:l?[l]:[])}}}function ITe(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);wa(e,0,0,i)}function L7(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const da=Lc(/[A-Za-z]/),zl=Lc(/[\dA-Za-z]/),MTe=Lc(/[#-'*+\--9=?A-Z^-~]/);function $8(e){return e!==null&&(e<32||e===127)}const B8=Lc(/\d/),ETe=Lc(/[\dA-Fa-f]/),TTe=Lc(/[!-/:-@[-`{-~]/);function In(e){return e!==null&&e<-2}function Er(e){return e!==null&&(e<0||e===32)}function ui(e){return e===-2||e===-1||e===32}const LTe=Lc(/\p{P}|\p{S}/u),NTe=Lc(/\s/);function Lc(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function zi(e,t,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let o=0;return r;function r(a){return ui(a)?(e.enter(n),l(a)):t(a)}function l(a){return ui(a)&&o++<s?(e.consume(a),l):(e.exit(n),t(a))}}const FTe={tokenize:DTe};function DTe(e){const t=e.attempt(this.parser.constructs.contentInitial,i,s);let n;return t;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),zi(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),o(l)}function o(l){const a=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=a),n=a,r(l)}function r(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return In(l)?(e.consume(l),e.exit("chunkText"),o):(e.consume(l),r)}}const $Te={tokenize:BTe},LE={tokenize:zTe};function BTe(e){const t=this,n=[];let i=0,s,o,r;return l;function l(C){if(i<n.length){const v=n[i];return t.containerState=v[1],e.attempt(v[0].continuation,a,u)(C)}return u(C)}function a(C){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&b();const v=t.events.length;let x=v,S;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){S=t.events[x][1].end;break}A(i);let _=v;for(;_<t.events.length;)t.events[_][1].end={...S},_++;return wa(t.events,x+1,0,t.events.slice(v)),t.events.length=_,u(C)}return l(C)}function u(C){if(i===n.length){if(!s)return f(C);if(s.currentConstruct&&s.currentConstruct.concrete)return g(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(LE,c,d)(C)}function c(C){return s&&b(),A(i),f(C)}function d(C){return t.parser.lazy[t.now().line]=i!==n.length,r=t.now().offset,g(C)}function f(C){return t.containerState={},e.attempt(LE,h,g)(C)}function h(C){return i++,n.push([t.currentConstruct,t.containerState]),f(C)}function g(C){if(C===null){s&&b(),A(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),m(C)}function m(C){if(C===null){y(e.exit("chunkFlow"),!0),A(0),e.consume(C);return}return In(C)?(e.consume(C),y(e.exit("chunkFlow")),i=0,t.interrupt=void 0,l):(e.consume(C),m)}function y(C,v){const x=t.sliceStream(C);if(v&&x.push(null),C.previous=o,o&&(o.next=C),o=C,s.defineSkip(C.start),s.write(x),t.parser.lazy[C.start.line]){let S=s.events.length;for(;S--;)if(s.events[S][1].start.offset<r&&(!s.events[S][1].end||s.events[S][1].end.offset>r))return;const _=t.events.length;let I=_,M,$;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(M){$=t.events[I][1].end;break}M=!0}for(A(i),S=_;S<t.events.length;)t.events[S][1].end={...$},S++;wa(t.events,I+1,0,t.events.slice(_)),t.events.length=S}}function A(C){let v=n.length;for(;v-- >C;){const x=n[v];t.containerState=x[1],x[0].exit.call(t,e)}n.length=C}function b(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function zTe(e,t,n){return zi(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function NE(e){if(e===null||Er(e)||NTe(e))return 1;if(LTe(e))return 2}function N7(e,t,n){const i=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!i.includes(o)&&(t=o(t,n),i.push(o))}return t}const z8={name:"attention",resolveAll:RTe,tokenize:OTe};function RTe(e,t){let n=-1,i,s,o,r,l,a,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[i][1].end},f={...e[n][1].start};FE(d,-a),FE(f,a),r={type:a>1?"strongSequence":"emphasisSequence",start:d,end:{...e[i][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},o={type:a>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:a>1?"strong":"emphasis",start:{...r.start},end:{...l.end}},e[i][1].end={...r.start},e[n][1].start={...l.end},u=[],e[i][1].end.offset-e[i][1].start.offset&&(u=fl(u,[["enter",e[i][1],t],["exit",e[i][1],t]])),u=fl(u,[["enter",s,t],["enter",r,t],["exit",r,t],["enter",o,t]]),u=fl(u,N7(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),u=fl(u,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=fl(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,wa(e,i-1,n-i+3,u),n=i+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function OTe(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=NE(i);let o;return r;function r(a){return o=a,e.enter("attentionSequence"),l(a)}function l(a){if(a===o)return e.consume(a),l;const u=e.exit("attentionSequence"),c=NE(a),d=!c||c===2&&s||n.includes(a),f=!s||s===2&&c||n.includes(i);return u._open=!!(o===42?d:d&&(s||!f)),u._close=!!(o===42?f:f&&(c||!d)),t(a)}}function FE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const PTe={name:"autolink",tokenize:jTe};function jTe(e,t,n){let i=0;return s;function s(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return da(h)?(e.consume(h),r):h===64?n(h):u(h)}function r(h){return h===43||h===45||h===46||zl(h)?(i=1,l(h)):u(h)}function l(h){return h===58?(e.consume(h),i=0,a):(h===43||h===45||h===46||zl(h))&&i++<32?(e.consume(h),l):(i=0,u(h))}function a(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||$8(h)?n(h):(e.consume(h),a)}function u(h){return h===64?(e.consume(h),c):MTe(h)?(e.consume(h),u):n(h)}function c(h){return zl(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),i=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||zl(h))&&i++<63){const g=h===45?f:d;return e.consume(h),g}return n(h)}}const g9={partial:!0,tokenize:HTe};function HTe(e,t,n){return i;function i(o){return ui(o)?zi(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||In(o)?t(o):n(o)}}const DO={continuation:{tokenize:qTe},exit:UTe,name:"blockQuote",tokenize:WTe};function WTe(e,t,n){const i=this;return s;function s(r){if(r===62){const l=i.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(r),e.exit("blockQuoteMarker"),o}return n(r)}function o(r){return ui(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}}function qTe(e,t,n){const i=this;return s;function s(r){return ui(r)?zi(e,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r):o(r)}function o(r){return e.attempt(DO,t,n)(r)}}function UTe(e){e.exit("blockQuote")}const $O={name:"characterEscape",tokenize:KTe};function KTe(e,t,n){return i;function i(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return TTe(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const BO={name:"characterReference",tokenize:VTe};function VTe(e,t,n){const i=this;let s=0,o,r;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),a}function a(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,r=zl,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,r=ETe,c):(e.enter("characterReferenceValue"),o=7,r=B8,c(d))}function c(d){if(d===59&&s){const f=e.exit("characterReferenceValue");return r===zl&&!xTe(i.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return r(d)&&s++<o?(e.consume(d),c):n(d)}}const DE={partial:!0,tokenize:GTe},$E={concrete:!0,name:"codeFenced",tokenize:ZTe};function ZTe(e,t,n){const i=this,s={partial:!0,tokenize:x};let o=0,r=0,l;return a;function a(S){return u(S)}function u(S){const _=i.events[i.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,l=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===l?(r++,e.consume(S),c):r<3?n(S):(e.exit("codeFencedFenceSequence"),ui(S)?zi(e,d,"whitespace")(S):d(S))}function d(S){return S===null||In(S)?(e.exit("codeFencedFence"),i.interrupt?t(S):e.check(DE,m,v)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(S))}function f(S){return S===null||In(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):ui(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),zi(e,h,"whitespace")(S)):S===96&&S===l?n(S):(e.consume(S),f)}function h(S){return S===null||In(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||In(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===l?n(S):(e.consume(S),g)}function m(S){return e.attempt(s,v,y)(S)}function y(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),A}function A(S){return o>0&&ui(S)?zi(e,b,"linePrefix",o+1)(S):b(S)}function b(S){return S===null||In(S)?e.check(DE,m,v)(S):(e.enter("codeFlowValue"),C(S))}function C(S){return S===null||In(S)?(e.exit("codeFlowValue"),b(S)):(e.consume(S),C)}function v(S){return e.exit("codeFenced"),t(S)}function x(S,_,I){let M=0;return $;function $(P){return S.enter("lineEnding"),S.consume(P),S.exit("lineEnding"),D}function D(P){return S.enter("codeFencedFence"),ui(P)?zi(S,T,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):T(P)}function T(P){return P===l?(S.enter("codeFencedFenceSequence"),N(P)):I(P)}function N(P){return P===l?(M++,S.consume(P),N):M>=r?(S.exit("codeFencedFenceSequence"),ui(P)?zi(S,O,"whitespace")(P):O(P)):I(P)}function O(P){return P===null||In(P)?(S.exit("codeFencedFence"),_(P)):I(P)}}}function GTe(e,t,n){const i=this;return s;function s(r){return r===null?n(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),o)}function o(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}const lk={name:"codeIndented",tokenize:YTe},QTe={partial:!0,tokenize:JTe};function YTe(e,t,n){const i=this;return s;function s(u){return e.enter("codeIndented"),zi(e,o,"linePrefix",5)(u)}function o(u){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?r(u):n(u)}function r(u){return u===null?a(u):In(u)?e.attempt(QTe,r,a)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||In(u)?(e.exit("codeFlowValue"),r(u)):(e.consume(u),l)}function a(u){return e.exit("codeIndented"),t(u)}}function JTe(e,t,n){const i=this;return s;function s(r){return i.parser.lazy[i.now().line]?n(r):In(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),s):zi(e,o,"linePrefix",5)(r)}function o(r){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(r):In(r)?s(r):n(r)}}const XTe={name:"codeText",previous:tLe,resolve:eLe,tokenize:nLe};function eLe(e){let t=e.length-4,n=3,i,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)s===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(s=i):(i===t||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),t-=i-s-2,i=s+2),s=void 0);return e}function tLe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nLe(e,t,n){let i=0,s,o;return r;function r(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),i++,l):(e.exit("codeTextSequence"),a(d))}function a(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),a):d===96?(o=e.enter("codeTextSequence"),s=0,c(d)):In(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),a):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||In(d)?(e.exit("codeTextData"),a(d)):(e.consume(d),u)}function c(d){return d===96?(e.consume(d),s++,c):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(o.type="codeTextData",u(d))}}class iLe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&F1(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),F1(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),F1(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);F1(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);F1(this.left,n.reverse())}}}function F1(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}function zO(e){const t={};let n=-1,i,s,o,r,l,a,u;const c=new iLe(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(i=c.get(n),n&&i[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(a=i[1]._tokenizer.events,o=0,o<a.length&&a[o][1].type==="lineEndingBlank"&&(o+=2),o<a.length&&a[o][1].type==="content"))for(;++o<a.length&&a[o][1].type!=="content";)a[o][1].type==="chunkText"&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,sLe(c,n)),n=t[n],u=!0);else if(i[1]._container){for(o=n,s=void 0;o--;)if(r=c.get(o),r[1].type==="lineEnding"||r[1].type==="lineEndingBlank")r[0]==="enter"&&(s&&(c.get(s)[1].type="lineEndingBlank"),r[1].type="lineEnding",s=o);else if(!(r[1].type==="linePrefix"||r[1].type==="listItemIndent"))break;s&&(i[1].end={...c.get(s)[1].start},l=c.slice(s,n),l.unshift(i),c.splice(s,n-s+1,l))}}return wa(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function sLe(e,t){const n=e.get(t)[1],i=e.get(t)[2];let s=t-1;const o=[];let r=n._tokenizer;r||(r=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(r._contentTypeTextTrailing=!0));const l=r.events,a=[],u={};let c,d,f=-1,h=n,g=0,m=0;const y=[m];for(;h;){for(;e.get(++s)[1]!==h;);o.push(s),h._tokenizer||(c=i.sliceStream(h),h.next||c.push(null),d&&r.defineSkip(h.start),h._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=!0),r.write(c),h._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(m=f+1,y.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(r.events=[],h?(h._tokenizer=void 0,h.previous=void 0):y.pop(),f=y.length;f--;){const A=l.slice(y[f],y[f+1]),b=o.pop();a.push([b,b+A.length-1]),e.splice(b,2,A)}for(a.reverse(),f=-1;++f<a.length;)u[g+a[f][0]]=g+a[f][1],g+=a[f][1]-a[f][0]-1;return u}const oLe={resolve:lLe,tokenize:aLe},rLe={partial:!0,tokenize:uLe};function lLe(e){return zO(e),e}function aLe(e,t){let n;return i;function i(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?o(l):In(l)?e.check(rLe,r,o)(l):(e.consume(l),s)}function o(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function r(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function uLe(e,t,n){const i=this;return s;function s(r){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),zi(e,o,"linePrefix")}function o(r){if(r===null||In(r))return n(r);const l=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}}function RO(e,t,n,i,s,o,r,l,a){const u=a||Number.POSITIVE_INFINITY;let c=0;return d;function d(A){return A===60?(e.enter(i),e.enter(s),e.enter(o),e.consume(A),e.exit(o),f):A===null||A===32||A===41||$8(A)?n(A):(e.enter(i),e.enter(r),e.enter(l),e.enter("chunkString",{contentType:"string"}),m(A))}function f(A){return A===62?(e.enter(o),e.consume(A),e.exit(o),e.exit(s),e.exit(i),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),h(A))}function h(A){return A===62?(e.exit("chunkString"),e.exit(l),f(A)):A===null||A===60||In(A)?n(A):(e.consume(A),A===92?g:h)}function g(A){return A===60||A===62||A===92?(e.consume(A),h):h(A)}function m(A){return!c&&(A===null||A===41||Er(A))?(e.exit("chunkString"),e.exit(l),e.exit(r),e.exit(i),t(A)):c<u&&A===40?(e.consume(A),c++,m):A===41?(e.consume(A),c--,m):A===null||A===32||A===40||$8(A)?n(A):(e.consume(A),A===92?y:m)}function y(A){return A===40||A===41||A===92?(e.consume(A),m):m(A)}}function OO(e,t,n,i,s,o){const r=this;let l=0,a;return u;function u(h){return e.enter(i),e.enter(s),e.consume(h),e.exit(s),e.enter(o),c}function c(h){return l>999||h===null||h===91||h===93&&!a||h===94&&!l&&"_hiddenFootnoteSupport"in r.parser.constructs?n(h):h===93?(e.exit(o),e.enter(s),e.consume(h),e.exit(s),e.exit(i),t):In(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||In(h)||l++>999?(e.exit("chunkString"),c(h)):(e.consume(h),a||(a=!ui(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),l++,d):d(h)}}function PO(e,t,n,i,s,o){let r;return l;function l(f){return f===34||f===39||f===40?(e.enter(i),e.enter(s),e.consume(f),e.exit(s),r=f===40?41:f,a):n(f)}function a(f){return f===r?(e.enter(s),e.consume(f),e.exit(s),e.exit(i),t):(e.enter(o),u(f))}function u(f){return f===r?(e.exit(o),a(r)):f===null?n(f):In(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),zi(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(f))}function c(f){return f===r||f===null||In(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:c)}function d(f){return f===r||f===92?(e.consume(f),c):c(f)}}function Bp(e,t){let n;return i;function i(s){return In(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):ui(s)?zi(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}const cLe={name:"definition",tokenize:fLe},dLe={partial:!0,tokenize:hLe};function fLe(e,t,n){const i=this;let s;return o;function o(h){return e.enter("definition"),r(h)}function r(h){return OO.call(i,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function l(h){return s=L7(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),a):n(h)}function a(h){return Er(h)?Bp(e,u)(h):u(h)}function u(h){return RO(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(dLe,d,d)(h)}function d(h){return ui(h)?zi(e,f,"whitespace")(h):f(h)}function f(h){return h===null||In(h)?(e.exit("definition"),i.parser.defined.push(s),t(h)):n(h)}}function hLe(e,t,n){return i;function i(l){return Er(l)?Bp(e,s)(l):n(l)}function s(l){return PO(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function o(l){return ui(l)?zi(e,r,"whitespace")(l):r(l)}function r(l){return l===null||In(l)?t(l):n(l)}}const pLe={name:"hardBreakEscape",tokenize:gLe};function gLe(e,t,n){return i;function i(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return In(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const mLe={name:"headingAtx",resolve:vLe,tokenize:yLe};function vLe(e,t){let n=e.length-2,i=3,s,o;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},o={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},wa(e,i,n-i+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function yLe(e,t,n){let i=0;return s;function s(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),r(c)}function r(c){return c===35&&i++<6?(e.consume(c),r):c===null||Er(c)?(e.exit("atxHeadingSequence"),l(c)):n(c)}function l(c){return c===35?(e.enter("atxHeadingSequence"),a(c)):c===null||In(c)?(e.exit("atxHeading"),t(c)):ui(c)?zi(e,l,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function a(c){return c===35?(e.consume(c),a):(e.exit("atxHeadingSequence"),l(c))}function u(c){return c===null||c===35||Er(c)?(e.exit("atxHeadingText"),l(c)):(e.consume(c),u)}}const kLe=["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"],BE=["pre","script","style","textarea"],bLe={concrete:!0,name:"htmlFlow",resolveTo:wLe,tokenize:xLe},ALe={partial:!0,tokenize:_Le},CLe={partial:!0,tokenize:SLe};function wLe(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 xLe(e,t,n){const i=this;let s,o,r,l,a;return u;function u(V){return c(V)}function c(V){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(V),d}function d(V){return V===33?(e.consume(V),f):V===47?(e.consume(V),o=!0,m):V===63?(e.consume(V),s=3,i.interrupt?t:z):da(V)?(e.consume(V),r=String.fromCharCode(V),y):n(V)}function f(V){return V===45?(e.consume(V),s=2,h):V===91?(e.consume(V),s=5,l=0,g):da(V)?(e.consume(V),s=4,i.interrupt?t:z):n(V)}function h(V){return V===45?(e.consume(V),i.interrupt?t:z):n(V)}function g(V){const ie="CDATA[";return V===ie.charCodeAt(l++)?(e.consume(V),l===ie.length?i.interrupt?t:T:g):n(V)}function m(V){return da(V)?(e.consume(V),r=String.fromCharCode(V),y):n(V)}function y(V){if(V===null||V===47||V===62||Er(V)){const ie=V===47,se=r.toLowerCase();return!ie&&!o&&BE.includes(se)?(s=1,i.interrupt?t(V):T(V)):kLe.includes(r.toLowerCase())?(s=6,ie?(e.consume(V),A):i.interrupt?t(V):T(V)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(V):o?b(V):C(V))}return V===45||zl(V)?(e.consume(V),r+=String.fromCharCode(V),y):n(V)}function A(V){return V===62?(e.consume(V),i.interrupt?t:T):n(V)}function b(V){return ui(V)?(e.consume(V),b):$(V)}function C(V){return V===47?(e.consume(V),$):V===58||V===95||da(V)?(e.consume(V),v):ui(V)?(e.consume(V),C):$(V)}function v(V){return V===45||V===46||V===58||V===95||zl(V)?(e.consume(V),v):x(V)}function x(V){return V===61?(e.consume(V),S):ui(V)?(e.consume(V),x):C(V)}function S(V){return V===null||V===60||V===61||V===62||V===96?n(V):V===34||V===39?(e.consume(V),a=V,_):ui(V)?(e.consume(V),S):I(V)}function _(V){return V===a?(e.consume(V),a=null,M):V===null||In(V)?n(V):(e.consume(V),_)}function I(V){return V===null||V===34||V===39||V===47||V===60||V===61||V===62||V===96||Er(V)?x(V):(e.consume(V),I)}function M(V){return V===47||V===62||ui(V)?C(V):n(V)}function $(V){return V===62?(e.consume(V),D):n(V)}function D(V){return V===null||In(V)?T(V):ui(V)?(e.consume(V),D):n(V)}function T(V){return V===45&&s===2?(e.consume(V),R):V===60&&s===1?(e.consume(V),q):V===62&&s===4?(e.consume(V),H):V===63&&s===3?(e.consume(V),z):V===93&&s===5?(e.consume(V),W):In(V)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(ALe,ee,N)(V)):V===null||In(V)?(e.exit("htmlFlowData"),N(V)):(e.consume(V),T)}function N(V){return e.check(CLe,O,ee)(V)}function O(V){return e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),P}function P(V){return V===null||In(V)?N(V):(e.enter("htmlFlowData"),T(V))}function R(V){return V===45?(e.consume(V),z):T(V)}function q(V){return V===47?(e.consume(V),r="",j):T(V)}function j(V){if(V===62){const ie=r.toLowerCase();return BE.includes(ie)?(e.consume(V),H):T(V)}return da(V)&&r.length<8?(e.consume(V),r+=String.fromCharCode(V),j):T(V)}function W(V){return V===93?(e.consume(V),z):T(V)}function z(V){return V===62?(e.consume(V),H):V===45&&s===2?(e.consume(V),z):T(V)}function H(V){return V===null||In(V)?(e.exit("htmlFlowData"),ee(V)):(e.consume(V),H)}function ee(V){return e.exit("htmlFlow"),t(V)}}function SLe(e,t,n){const i=this;return s;function s(r){return In(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),o):n(r)}function o(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}function _Le(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(g9,t,n)}}const ILe={name:"htmlText",tokenize:MLe};function MLe(e,t,n){const i=this;let s,o,r;return l;function l(z){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(z),a}function a(z){return z===33?(e.consume(z),u):z===47?(e.consume(z),x):z===63?(e.consume(z),C):da(z)?(e.consume(z),I):n(z)}function u(z){return z===45?(e.consume(z),c):z===91?(e.consume(z),o=0,g):da(z)?(e.consume(z),b):n(z)}function c(z){return z===45?(e.consume(z),h):n(z)}function d(z){return z===null?n(z):z===45?(e.consume(z),f):In(z)?(r=d,q(z)):(e.consume(z),d)}function f(z){return z===45?(e.consume(z),h):d(z)}function h(z){return z===62?R(z):z===45?f(z):d(z)}function g(z){const H="CDATA[";return z===H.charCodeAt(o++)?(e.consume(z),o===H.length?m:g):n(z)}function m(z){return z===null?n(z):z===93?(e.consume(z),y):In(z)?(r=m,q(z)):(e.consume(z),m)}function y(z){return z===93?(e.consume(z),A):m(z)}function A(z){return z===62?R(z):z===93?(e.consume(z),A):m(z)}function b(z){return z===null||z===62?R(z):In(z)?(r=b,q(z)):(e.consume(z),b)}function C(z){return z===null?n(z):z===63?(e.consume(z),v):In(z)?(r=C,q(z)):(e.consume(z),C)}function v(z){return z===62?R(z):C(z)}function x(z){return da(z)?(e.consume(z),S):n(z)}function S(z){return z===45||zl(z)?(e.consume(z),S):_(z)}function _(z){return In(z)?(r=_,q(z)):ui(z)?(e.consume(z),_):R(z)}function I(z){return z===45||zl(z)?(e.consume(z),I):z===47||z===62||Er(z)?M(z):n(z)}function M(z){return z===47?(e.consume(z),R):z===58||z===95||da(z)?(e.consume(z),$):In(z)?(r=M,q(z)):ui(z)?(e.consume(z),M):R(z)}function $(z){return z===45||z===46||z===58||z===95||zl(z)?(e.consume(z),$):D(z)}function D(z){return z===61?(e.consume(z),T):In(z)?(r=D,q(z)):ui(z)?(e.consume(z),D):M(z)}function T(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),s=z,N):In(z)?(r=T,q(z)):ui(z)?(e.consume(z),T):(e.consume(z),O)}function N(z){return z===s?(e.consume(z),s=void 0,P):z===null?n(z):In(z)?(r=N,q(z)):(e.consume(z),N)}function O(z){return z===null||z===34||z===39||z===60||z===61||z===96?n(z):z===47||z===62||Er(z)?M(z):(e.consume(z),O)}function P(z){return z===47||z===62||Er(z)?M(z):n(z)}function R(z){return z===62?(e.consume(z),e.exit("htmlTextData"),e.exit("htmlText"),t):n(z)}function q(z){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),j}function j(z){return ui(z)?zi(e,W,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):W(z)}function W(z){return e.enter("htmlTextData"),r(z)}}const F7={name:"labelEnd",resolveAll:NLe,resolveTo:FLe,tokenize:DLe},ELe={tokenize:$Le},TLe={tokenize:BLe},LLe={tokenize:zLe};function NLe(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",t+=s}}return e.length!==n.length&&wa(e,0,e.length,n),e}function FLe(e,t){let n=e.length,i=0,s,o,r,l;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(r){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(r=n);const a={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[r][1].end}},c={type:"labelText",start:{...e[o+i+2][1].end},end:{...e[r-2][1].start}};return l=[["enter",a,t],["enter",u,t]],l=fl(l,e.slice(o+1,o+i+3)),l=fl(l,[["enter",c,t]]),l=fl(l,N7(t.parser.constructs.insideSpan.null,e.slice(o+i+4,r-3),t)),l=fl(l,[["exit",c,t],e[r-2],e[r-1],["exit",u,t]]),l=fl(l,e.slice(r+1)),l=fl(l,[["exit",a,t]]),wa(e,o,e.length,l),e}function DLe(e,t,n){const i=this;let s=i.events.length,o,r;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){o=i.events[s][1];break}return l;function l(f){return o?o._inactive?d(f):(r=i.parser.defined.includes(L7(i.sliceSerialize({start:o.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),a):n(f)}function a(f){return f===40?e.attempt(ELe,c,r?c:d)(f):f===91?e.attempt(TLe,c,r?u:d)(f):r?c(f):d(f)}function u(f){return e.attempt(LLe,c,d)(f)}function c(f){return t(f)}function d(f){return o._balanced=!0,n(f)}}function $Le(e,t,n){return i;function i(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),s}function s(d){return Er(d)?Bp(e,o)(d):o(d)}function o(d){return d===41?c(d):RO(e,r,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function r(d){return Er(d)?Bp(e,a)(d):c(d)}function l(d){return n(d)}function a(d){return d===34||d===39||d===40?PO(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return Er(d)?Bp(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function BLe(e,t,n){const i=this;return s;function s(l){return OO.call(i,e,o,r,"reference","referenceMarker","referenceString")(l)}function o(l){return i.parser.defined.includes(L7(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function r(l){return n(l)}}function zLe(e,t,n){return i;function i(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const RLe={name:"labelStartImage",resolveAll:F7.resolveAll,tokenize:OLe};function OLe(e,t,n){const i=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),o}function o(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),r):n(l)}function r(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const PLe={name:"labelStartLink",resolveAll:F7.resolveAll,tokenize:jLe};function jLe(e,t,n){const i=this;return s;function s(r){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(r),e.exit("labelMarker"),e.exit("labelLink"),o}function o(r){return r===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(r):t(r)}}const ak={name:"lineEnding",tokenize:HLe};function HLe(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),zi(e,t,"linePrefix")}}const A2={name:"thematicBreak",tokenize:WLe};function WLe(e,t,n){let i=0,s;return o;function o(u){return e.enter("thematicBreak"),r(u)}function r(u){return s=u,l(u)}function l(u){return u===s?(e.enter("thematicBreakSequence"),a(u)):i>=3&&(u===null||In(u))?(e.exit("thematicBreak"),t(u)):n(u)}function a(u){return u===s?(e.consume(u),i++,a):(e.exit("thematicBreakSequence"),ui(u)?zi(e,l,"whitespace")(u):l(u))}}const gr={continuation:{tokenize:VLe},exit:GLe,name:"list",tokenize:KLe},qLe={partial:!0,tokenize:QLe},ULe={partial:!0,tokenize:ZLe};function KLe(e,t,n){const i=this,s=i.events[i.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,r=0;return l;function l(h){const g=i.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!i.containerState.marker||h===i.containerState.marker:B8(h)){if(i.containerState.type||(i.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(A2,n,u)(h):u(h);if(!i.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(h)}return n(h)}function a(h){return B8(h)&&++r<10?(e.consume(h),a):(!i.interrupt||r<2)&&(i.containerState.marker?h===i.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||h,e.check(g9,i.interrupt?n:c,e.attempt(qLe,f,d))}function c(h){return i.containerState.initialBlankLine=!0,o++,f(h)}function d(h){return ui(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return i.containerState.size=o+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function VLe(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(g9,s,o);function s(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,zi(e,t,"listItemIndent",i.containerState.size+1)(l)}function o(l){return i.containerState.furtherBlankLines||!ui(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(ULe,t,r)(l))}function r(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,zi(e,e.attempt(gr,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function ZLe(e,t,n){const i=this;return zi(e,s,"listItemIndent",i.containerState.size+1);function s(o){const r=i.events[i.events.length-1];return r&&r[1].type==="listItemIndent"&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?t(o):n(o)}}function GLe(e){e.exit(this.containerState.type)}function QLe(e,t,n){const i=this;return zi(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const r=i.events[i.events.length-1];return!ui(o)&&r&&r[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const zE={name:"setextUnderline",resolveTo:YLe,tokenize:JLe};function YLe(e,t){let n=e.length,i,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const r={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",r,t]),e.splice(o+1,0,["exit",e[i][1],t]),e[i][1].end={...e[o][1].end}):e[i][1]=r,e.push(["exit",r,t]),e}function JLe(e,t,n){const i=this;let s;return o;function o(u){let c=i.events.length,d;for(;c--;)if(i.events[c][1].type!=="lineEnding"&&i.events[c][1].type!=="linePrefix"&&i.events[c][1].type!=="content"){d=i.events[c][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(e.enter("setextHeadingLine"),s=u,r(u)):n(u)}function r(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===s?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),ui(u)?zi(e,a,"lineSuffix")(u):a(u))}function a(u){return u===null||In(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const XLe={tokenize:eNe};function eNe(e){const t=this,n=e.attempt(g9,i,e.attempt(this.parser.constructs.flowInitial,s,zi(e,e.attempt(this.parser.constructs.flow,s,e.attempt(oLe,s)),"linePrefix")));return n;function i(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const tNe={resolveAll:HO()},nNe=jO("string"),iNe=jO("text");function jO(e){return{resolveAll:HO(e==="text"?sNe:void 0),tokenize:t};function t(n){const i=this,s=this.parser.constructs[e],o=n.attempt(s,r,l);return r;function r(c){return u(c)?o(c):l(c)}function l(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),a}function a(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),a)}function u(c){if(c===null)return!0;const d=s[c];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(i,i.previous))return!0}return!1}}}function HO(e){return t;function t(n,i){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,i):n}}function sNe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],s=t.sliceStream(i);let o=s.length,r=-1,l=0,a;for(;o--;){const u=s[o];if(typeof u=="string"){for(r=u.length;u.charCodeAt(r-1)===32;)l++,r--;if(r)break;r=-1}else if(u===-2)a=!0,l++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||a||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?r:i.start._bufferIndex+r,_index:i.start._index+o,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},end:{...i.end}};i.end={...u.start},i.start.offset===i.end.offset?Object.assign(i,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const oNe={42:gr,43:gr,45:gr,48:gr,49:gr,50:gr,51:gr,52:gr,53:gr,54:gr,55:gr,56:gr,57:gr,62:DO},rNe={91:cLe},lNe={[-2]:lk,[-1]:lk,32:lk},aNe={35:mLe,42:A2,45:[zE,A2],60:bLe,61:zE,95:A2,96:$E,126:$E},uNe={38:BO,92:$O},cNe={[-5]:ak,[-4]:ak,[-3]:ak,33:RLe,38:BO,42:z8,60:[PTe,ILe],91:PLe,92:[pLe,$O],93:F7,95:z8,96:XTe},dNe={null:[z8,tNe]},fNe={null:[42,95]},hNe={null:[]},pNe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:fNe,contentInitial:rNe,disable:hNe,document:oNe,flow:aNe,flowInitial:lNe,insideSpan:dNe,string:uNe,text:cNe},Symbol.toStringTag,{value:"Module"}));function gNe(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let r=[],l=[];const a={attempt:_(x),check:_(S),consume:b,enter:C,exit:v,interrupt:_(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:g,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let c=t.tokenize.call(u,a);return t.resolveAll&&o.push(t),u;function d(D){return r=fl(r,D),y(),r[r.length-1]!==null?[]:(I(t,0),u.events=N7(o,u.events,u),u.events)}function f(D,T){return vNe(h(D),T)}function h(D){return mNe(r,D)}function g(){const{_bufferIndex:D,_index:T,line:N,column:O,offset:P}=i;return{_bufferIndex:D,_index:T,line:N,column:O,offset:P}}function m(D){s[D.line]=D.column,$()}function y(){let D;for(;i._index<r.length;){const T=r[i._index];if(typeof T=="string")for(D=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===D&&i._bufferIndex<T.length;)A(T.charCodeAt(i._bufferIndex));else A(T)}}function A(D){c=c(D)}function b(D){In(D)?(i.line++,i.column=1,i.offset+=D===-3?2:1,$()):D!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===r[i._index].length&&(i._bufferIndex=-1,i._index++)),u.previous=D}function C(D,T){const N=T||{};return N.type=D,N.start=g(),u.events.push(["enter",N,u]),l.push(N),N}function v(D){const T=l.pop();return T.end=g(),u.events.push(["exit",T,u]),T}function x(D,T){I(D,T.from)}function S(D,T){T.restore()}function _(D,T){return N;function N(O,P,R){let q,j,W,z;return Array.isArray(O)?ee(O):"tokenize"in O?ee([O]):H(O);function H(Z){return pe;function pe(re){const fe=re!==null&&Z[re],Ee=re!==null&&Z.null,X=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return ee(X)(re)}}function ee(Z){return q=Z,j=0,Z.length===0?R:V(Z[j])}function V(Z){return pe;function pe(re){return z=M(),W=Z,Z.partial||(u.currentConstruct=Z),Z.name&&u.parser.constructs.disable.null.includes(Z.name)?se():Z.tokenize.call(T?Object.assign(Object.create(u),T):u,a,ie,se)(re)}}function ie(Z){return D(W,z),P}function se(Z){return z.restore(),++j<q.length?V(q[j]):R}}}function I(D,T){D.resolveAll&&!o.includes(D)&&o.push(D),D.resolve&&wa(u.events,T,u.events.length-T,D.resolve(u.events.slice(T),u)),D.resolveTo&&(u.events=D.resolveTo(u.events,u))}function M(){const D=g(),T=u.previous,N=u.currentConstruct,O=u.events.length,P=Array.from(l);return{from:O,restore:R};function R(){i=D,u.previous=T,u.currentConstruct=N,u.events.length=O,l=P,$()}}function $(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function mNe(e,t){const n=t.start._index,i=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let r;if(n===s)r=[e[n].slice(i,o)];else{if(r=e.slice(n,s),i>-1){const l=r[0];typeof l=="string"?r[0]=l.slice(i):r.shift()}o>0&&r.push(e[s].slice(0,o))}return r}function vNe(e,t){let n=-1;const i=[];let s;for(;++n<e.length;){const o=e[n];let r;if(typeof o=="string")r=o;else switch(o){case-5:{r="\r";break}case-4:{r=` +`;break}case-3:{r=`\r +`;break}case-2:{r=t?" ":" ";break}case-1:{if(!t&&s)continue;r=" ";break}default:r=String.fromCharCode(o)}s=o===-2,i.push(r)}return i.join("")}function yNe(e){const i={constructs:STe([pNe,...(e||{}).extensions||[]]),content:s(FTe),defined:[],document:s($Te),flow:s(XLe),lazy:{},string:s(nNe),text:s(iNe)};return i;function s(o){return r;function r(l){return gNe(i,o,l)}}}function kNe(e){for(;!zO(e););return e}const RE=/[\0\t\n\r]/g;function bNe(){let e=1,t="",n=!0,i;return s;function s(o,r,l){const a=[];let u,c,d,f,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(r||void 0).decode(o)),d=0,t="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(RE.lastIndex=d,u=RE.exec(o),f=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(f),!u){t=o.slice(d);break}if(h===10&&d===f&&i)a.push(-3),i=void 0;else switch(i&&(a.push(-5),i=void 0),d<f&&(a.push(o.slice(d,f)),e+=f-d),h){case 0:{a.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,a.push(-2);e++<c;)a.push(-1);break}case 10:{a.push(-4),e=1;break}default:i=!0,e=1}d=f+1}return l&&(i&&a.push(-5),t&&a.push(t),a.push(null)),a}}function ko(e){this.content=e}ko.prototype={constructor:ko,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,s=i.find(e),o=i.content.slice();return s==-1?o.push(n||e,t):(o[s+1]=t,n&&(o[s]=n)),new ko(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new ko(n)},addToStart:function(e,t){return new ko([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new ko(n)},addBefore:function(e,t,n){var i=this.remove(t),s=i.content.slice(),o=i.find(e);return s.splice(o==-1?s.length:o,0,t,n),new ko(s)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=ko.from(e),e.size?new ko(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=ko.from(e),e.size?new ko(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=ko.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};ko.from=function(e){if(e instanceof ko)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ko(t)};function WO(e,t,n){for(let i=0;;i++){if(i==e.childCount||i==t.childCount)return e.childCount==t.childCount?null:n;let s=e.child(i),o=t.child(i);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){let r=s.text,l=o.text,a=0;for(;r[a]==l[a];a++)n++;return a&&a<r.length&&a<l.length&&KO(r.charCodeAt(a-1))&&UO(r.charCodeAt(a))&&n--,n}if(s.content.size||o.content.size){let r=WO(s.content,o.content,n+1);if(r!=null)return r}n+=s.nodeSize}}function qO(e,t,n,i){for(let s=e.childCount,o=t.childCount;;){if(s==0||o==0)return s==o?null:{a:n,b:i};let r=e.child(--s),l=t.child(--o),a=r.nodeSize;if(r==l){n-=a,i-=a;continue}if(!r.sameMarkup(l))return{a:n,b:i};if(r.isText&&r.text!=l.text){let u=r.text,c=l.text,d=u.length,f=c.length;for(;d>0&&f>0&&u[d-1]==c[f-1];)d--,f--,n--,i--;return d&&f&&d<u.length&&KO(u.charCodeAt(d-1))&&UO(u.charCodeAt(d))&&(n++,i++),{a:n,b:i}}if(r.content.size||l.content.size){let u=qO(r.content,l.content,n-1,i-1);if(u)return u}n-=a,i-=a}}function UO(e){return e>=56320&&e<57344}function KO(e){return e>=55296&&e<56320}class Ln{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let i=0;i<t.length;i++)this.size+=t[i].nodeSize}nodesBetween(t,n,i,s=0,o){for(let r=0,l=0;l<n;r++){let a=this.content[r],u=l+a.nodeSize;if(u>t&&i(a,s+l,o||null,r)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,t-c),Math.min(a.content.size,n-c),i,s+c)}l=u}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,i,s){let o="",r=!0;return this.nodesBetween(t,n,(l,a)=>{let u=l.isText?l.text.slice(Math.max(t,a)-a,n-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&i&&(r?r=!1:o+=i),o+=u},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,i=t.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(s[s.length-1]=n.withText(n.text+i.text),o=1);o<t.content.length;o++)s.push(t.content[o]);return new Ln(s,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let i=[],s=0;if(n>t)for(let o=0,r=0;r<n;o++){let l=this.content[o],a=r+l.nodeSize;a>t&&((r<t||a>n)&&(l.isText?l=l.cut(Math.max(0,t-r),Math.min(l.text.length,n-r)):l=l.cut(Math.max(0,t-r-1),Math.min(l.content.size,n-r-1))),i.push(l),s+=l.nodeSize),r=a}return new Ln(i,s)}cutByIndex(t,n){return t==n?Ln.empty:t==0&&n==this.content.length?this:new Ln(this.content.slice(t,n))}replaceChild(t,n){let i=this.content[t];if(i==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return s[t]=n,new Ln(s,o)}addToStart(t){return new Ln([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Ln(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,i=0;n<this.content.length;n++){let s=this.content[n];t(s,i,n),i+=s.nodeSize}}findDiffStart(t,n=0){return WO(this,t,n)}findDiffEnd(t,n=this.size,i=t.size){return qO(this,t,n,i)}findIndex(t){if(t==0)return Bm(0,t);if(t==this.size)return Bm(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,i=0;;n++){let s=this.child(n),o=i+s.nodeSize;if(o>=t)return o==t?Bm(n+1,o):Bm(n,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Ln.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return Ln.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Ln.empty;let n,i=0;for(let s=0;s<t.length;s++){let o=t[s];i+=o.nodeSize,s&&o.isText&&t[s-1].sameMarkup(o)?(n||(n=t.slice(0,s)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new Ln(n||t,i)}static from(t){if(!t)return Ln.empty;if(t instanceof Ln)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Ln([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ln.empty=new Ln([],0);const uk={index:0,offset:0};function Bm(e,t){return uk.index=e,uk.offset=t,uk}function Xv(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!Xv(e[i],t[i]))return!1}else{for(let i in e)if(!(i in t)||!Xv(e[i],t[i]))return!1;for(let i in t)if(!(i in e))return!1}return!0}class Ri{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,i=!1;for(let s=0;s<t.length;s++){let o=t[s];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,s));else{if(o.type.excludes(this.type))return t;!i&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,s)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=t.slice()),i||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Xv(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=t.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=i.create(n.attrs);return i.checkAttrs(s.attrs),s}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].eq(n[i]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return Ri.none;if(t instanceof Ri)return[t];let n=t.slice();return n.sort((i,s)=>i.type.rank-s.type.rank),n}}Ri.none=[];class k0 extends Error{}class Hn{constructor(t,n,i){this.content=t,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let i=ZO(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return i&&new Hn(i,this.openStart,this.openEnd)}removeBetween(t,n){return new Hn(VO(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return Hn.empty;let i=n.openStart||0,s=n.openEnd||0;if(typeof i!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Hn(Ln.fromJSON(t,n.content),i,s)}static maxOpen(t,n=!0){let i=0,s=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new Hn(t,i,s)}}Hn.empty=new Hn(Ln.empty,0,0);function VO(e,t,n){let{index:i,offset:s}=e.findIndex(t),o=e.maybeChild(i),{index:r,offset:l}=e.findIndex(n);if(s==t||o.isText){if(l!=n&&!e.child(r).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(i!=r)throw new RangeError("Removing non-flat range");return e.replaceChild(i,o.copy(VO(o.content,t-s-1,n-s-1)))}function ZO(e,t,n,i,s,o){let{index:r,offset:l}=e.findIndex(t),a=e.maybeChild(r);if(l==t||a.isText)return o&&i<=0&&s<=0&&!o.canReplace(r,r,n)?null:e.cut(0,t).append(n).append(e.cut(t));let u=ZO(a.content,t-l-1,n,r==0?i-1:0,r==e.childCount-1?s-1:0,a);return u&&e.replaceChild(r,a.copy(u))}function ANe(e,t,n){if(n.openStart>e.depth)throw new k0("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new k0("Inconsistent open depths");return GO(e,t,n,0)}function GO(e,t,n,i){let s=e.index(i),o=e.node(i);if(s==t.index(i)&&i<e.depth-n.openStart){let r=GO(e,t,n,i+1);return o.copy(o.content.replaceChild(s,r))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==i&&t.depth==i){let r=e.parent,l=r.content;return $d(r,l.cut(0,e.parentOffset).append(n.content).append(l.cut(t.parentOffset)))}else{let{start:r,end:l}=CNe(n,e);return $d(o,YO(e,r,l,t,i))}else return $d(o,ey(e,t,i))}function QO(e,t){if(!t.type.compatibleContent(e.type))throw new k0("Cannot join "+t.type.name+" onto "+e.type.name)}function R8(e,t,n){let i=e.node(n);return QO(i,t.node(n)),i}function Dd(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function zp(e,t,n,i){let s=(t||e).node(n),o=0,r=t?t.index(n):s.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(Dd(e.nodeAfter,i),o++));for(let l=o;l<r;l++)Dd(s.child(l),i);t&&t.depth==n&&t.textOffset&&Dd(t.nodeBefore,i)}function $d(e,t){if(!e.type.validContent(t))throw new k0("Invalid content for node "+e.type.name);return e.copy(t)}function YO(e,t,n,i,s){let o=e.depth>s&&R8(e,t,s+1),r=i.depth>s&&R8(n,i,s+1),l=[];return zp(null,e,s,l),o&&r&&t.index(s)==n.index(s)?(QO(o,r),Dd($d(o,YO(e,t,n,i,s+1)),l)):(o&&Dd($d(o,ey(e,t,s+1)),l),zp(t,n,s,l),r&&Dd($d(r,ey(n,i,s+1)),l)),zp(i,null,s,l),new Ln(l)}function ey(e,t,n){let i=[];if(zp(null,e,n,i),e.depth>n){let s=R8(e,t,n+1);Dd($d(s,ey(e,t,n+1)),i)}return zp(t,null,n,i),new Ln(i)}function CNe(e,t){let n=t.depth-e.openStart,s=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)s=t.node(o).copy(Ln.from(s));return{start:s.resolveNoCache(e.openStart+n),end:s.resolveNoCache(s.content.size-e.openEnd-n)}}class b0{constructor(t,n,i){this.pos=t,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],s=t.child(n);return i?t.child(n).cut(i):s}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let i=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)s+=i.child(o).nodeSize;return s}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Ri.none;if(this.textOffset)return t.child(n).marks;let i=t.maybeChild(n-1),s=t.maybeChild(n);if(!i){let l=i;i=s,s=l}let o=i.marks;for(var r=0;r<o.length;r++)o[r].type.spec.inclusive===!1&&(!s||!o[r].isInSet(s.marks))&&(o=o[r--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,s=t.parent.maybeChild(t.index());for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);i>=0;i--)if(t.pos<=this.end(i)&&(!n||n(this.node(i))))return new SNe(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let i=[],s=0,o=n;for(let r=t;;){let{index:l,offset:a}=r.content.findIndex(o),u=o-a;if(i.push(r,l,s+a),!u||(r=r.child(l),r.isText))break;o=u-1,s+=a+1}return new b0(n,i,o)}static resolveCached(t,n){let i=OE.get(t);if(i)for(let o=0;o<i.elts.length;o++){let r=i.elts[o];if(r.pos==n)return r}else OE.set(t,i=new wNe);let s=i.elts[i.i]=b0.resolve(t,n);return i.i=(i.i+1)%xNe,s}}class wNe{constructor(){this.elts=[],this.i=0}}const xNe=12,OE=new WeakMap;class SNe{constructor(t,n,i){this.$from=t,this.$to=n,this.depth=i}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const _Ne=Object.create(null);let wh=class O8{constructor(t,n,i,s=Ri.none){this.type=t,this.attrs=n,this.marks=s,this.content=i||Ln.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,i,s=0){this.content.nodesBetween(t,n,i,s,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,i,s){return this.content.textBetween(t,n,i,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,i){return this.type==t&&Xv(this.attrs,n||t.defaultAttrs||_Ne)&&Ri.sameSet(this.marks,i||Ri.none)}copy(t=null){return t==this.content?this:new O8(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new O8(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,i=!1){if(t==n)return Hn.empty;let s=this.resolve(t),o=this.resolve(n),r=i?0:s.sharedDepth(n),l=s.start(r),u=s.node(r).content.cut(s.pos-l,o.pos-l);return new Hn(u,s.depth-r,o.depth-r)}replace(t,n,i){return ANe(this.resolve(t),this.resolve(n),i)}nodeAt(t){for(let n=this;;){let{index:i,offset:s}=n.content.findIndex(t);if(n=n.maybeChild(i),!n)return null;if(s==t||n.isText)return n;t-=s+1}}childAfter(t){let{index:n,offset:i}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(t);if(i<t)return{node:this.content.child(n),index:n,offset:i};let s=this.content.child(n-1);return{node:s,index:n-1,offset:i-s.nodeSize}}resolve(t){return b0.resolveCached(this,t)}resolveNoCache(t){return b0.resolve(this,t)}rangeHasMark(t,n,i){let s=!1;return n>t&&this.nodesBetween(t,n,o=>(i.isInSet(o.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),JO(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,i=Ln.empty,s=0,o=i.childCount){let r=this.contentMatchAt(t).matchFragment(i,s,o),l=r&&r.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let a=s;a<o;a++)if(!this.type.allowsMarks(i.child(a).marks))return!1;return!0}canReplaceWith(t,n,i,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(t).matchType(i),r=o&&o.matchFragment(this.content,n);return r?r.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=Ri.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),t=i.addToSet(t)}if(!Ri.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,i)}let s=Ln.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,s,i);return o.type.checkAttrs(o.attrs),o}};wh.prototype.text=void 0;class ty extends wh{constructor(t,n,i,s){if(super(t,n,null,s),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):JO(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new ty(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new ty(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function JO(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Gd{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let i=new INe(t,n);if(i.next==null)return Gd.empty;let s=XO(i);i.next&&i.err("Unexpected trailing text");let o=DNe(FNe(s));return $Ne(o,i),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,i=t.childCount){let s=this;for(let o=n;s&&o<i;o++)s=s.matchType(t.child(o).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let i=0;i<t.next.length;i++)if(this.next[n].type==t.next[i].type)return!0;return!1}fillBefore(t,n=!1,i=0){let s=[this];function o(r,l){let a=r.matchFragment(t,i);if(a&&(!n||a.validEnd))return Ln.from(l.map(u=>u.createAndFill()));for(let u=0;u<r.next.length;u++){let{type:c,next:d}=r.next[u];if(!(c.isText||c.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=o(d,l.concat(c));if(f)return f}}return null}return o(this,[])}findWrapping(t){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==t)return this.wrapCache[i+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let s=i.shift(),o=s.match;if(o.matchType(t)){let r=[];for(let l=s;l.type;l=l.via)r.push(l.type);return r.reverse()}for(let r=0;r<o.next.length;r++){let{type:l,next:a}=o.next[r];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!s.type||a.validEnd)&&(i.push({match:l.contentMatch,type:l,via:s}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(i){t.push(i);for(let s=0;s<i.next.length;s++)t.indexOf(i.next[s].next)==-1&&n(i.next[s].next)}return n(this),t.map((i,s)=>{let o=s+(i.validEnd?"*":" ")+" ";for(let r=0;r<i.next.length;r++)o+=(r?", ":"")+i.next[r].type.name+"->"+t.indexOf(i.next[r].next);return o}).join(` +`)}}Gd.empty=new Gd(!0);class INe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function XO(e){let t=[];do t.push(MNe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function MNe(e){let t=[];do t.push(ENe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function ENe(e){let t=NNe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=TNe(e,t);else break;return t}function PE(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function TNe(e,t){let n=PE(e),i=n;return e.eat(",")&&(e.next!="}"?i=PE(e):i=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:t}}function LNe(e,t){let n=e.nodeTypes,i=n[t];if(i)return[i];let s=[];for(let o in n){let r=n[o];r.isInGroup(t)&&s.push(r)}return s.length==0&&e.err("No node type or group '"+t+"' found"),s}function NNe(e){if(e.eat("(")){let t=XO(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=LNe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function FNe(e){let t=[[]];return s(o(e,0),n()),t;function n(){return t.push([])-1}function i(r,l,a){let u={term:a,to:l};return t[r].push(u),u}function s(r,l){r.forEach(a=>a.to=l)}function o(r,l){if(r.type=="choice")return r.exprs.reduce((a,u)=>a.concat(o(u,l)),[]);if(r.type=="seq")for(let a=0;;a++){let u=o(r.exprs[a],l);if(a==r.exprs.length-1)return u;s(u,l=n())}else if(r.type=="star"){let a=n();return i(l,a),s(o(r.expr,a),a),[i(a)]}else if(r.type=="plus"){let a=n();return s(o(r.expr,l),a),s(o(r.expr,a),a),[i(a)]}else{if(r.type=="opt")return[i(l)].concat(o(r.expr,l));if(r.type=="range"){let a=l;for(let u=0;u<r.min;u++){let c=n();s(o(r.expr,a),c),a=c}if(r.max==-1)s(o(r.expr,a),a);else for(let u=r.min;u<r.max;u++){let c=n();i(a,c),s(o(r.expr,a),c),a=c}return[i(a)]}else{if(r.type=="name")return[i(l,void 0,r.value)];throw new Error("Unknown expr type")}}}}function eP(e,t){return t-e}function jE(e,t){let n=[];return i(t),n.sort(eP);function i(s){let o=e[s];if(o.length==1&&!o[0].term)return i(o[0].to);n.push(s);for(let r=0;r<o.length;r++){let{term:l,to:a}=o[r];!l&&n.indexOf(a)==-1&&i(a)}}}function DNe(e){let t=Object.create(null);return n(jE(e,0));function n(i){let s=[];i.forEach(r=>{e[r].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c<s.length;c++)s[c][0]==l&&(u=s[c][1]);jE(e,a).forEach(c=>{u||s.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let o=t[i.join(",")]=new Gd(i.indexOf(e.length-1)>-1);for(let r=0;r<s.length;r++){let l=s[r][1].sort(eP);o.next.push({type:s[r][0],next:t[l.join(",")]||n(l)})}return o}}function $Ne(e,t){for(let n=0,i=[e];n<i.length;n++){let s=i[n],o=!s.validEnd,r=[];for(let l=0;l<s.next.length;l++){let{type:a,next:u}=s.next[l];r.push(a.name),o&&!(a.isText||a.hasRequiredAttrs())&&(o=!1),i.indexOf(u)==-1&&i.push(u)}o&&t.err("Only non-generatable nodes ("+r.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function tP(e){let t=Object.create(null);for(let n in e){let i=e[n];if(!i.hasDefault)return null;t[n]=i.default}return t}function nP(e,t){let n=Object.create(null);for(let i in e){let s=t&&t[i];if(s===void 0){let o=e[i];if(o.hasDefault)s=o.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=s}return n}function iP(e,t,n,i){for(let s in t)if(!(s in e))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${i}`);for(let s in e)e[s].validate&&e[s].validate(t[s])}function sP(e,t){let n=Object.create(null);if(t)for(let i in t)n[i]=new zNe(e,i,t[i]);return n}let HE=class oP{constructor(t,n,i){this.name=t,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=sP(t,i.attrs),this.defaultAttrs=tP(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Gd.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:nP(this.attrs,t)}create(t=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new wh(this,this.computeAttrs(t),Ln.from(n),Ri.setFrom(i))}createChecked(t=null,n,i){return n=Ln.from(n),this.checkContent(n),new wh(this,this.computeAttrs(t),n,Ri.setFrom(i))}createAndFill(t=null,n,i){if(t=this.computeAttrs(t),n=Ln.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let s=this.contentMatch.matchFragment(n),o=s&&s.fillBefore(Ln.empty,!0);return o?new wh(this,t,n.append(o),Ri.setFrom(i)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let i=0;i<t.childCount;i++)if(!this.allowsMarks(t.child(i).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){iP(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let i=0;i<t.length;i++)this.allowsMarkType(t[i].type)?n&&n.push(t[i]):n||(n=t.slice(0,i));return n?n.length?n:Ri.none:t}static compile(t,n){let i=Object.create(null);t.forEach((o,r)=>i[o]=new oP(o,n,r));let s=n.spec.topNode||"doc";if(!i[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function BNe(e,t,n){let i=n.split("|");return s=>{let o=s===null?"null":typeof s;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${t} on type ${e}, got ${o}`)}}class zNe{constructor(t,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?BNe(t,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class D7{constructor(t,n,i,s){this.name=t,this.rank=n,this.schema=i,this.spec=s,this.attrs=sP(t,s.attrs),this.excluded=null;let o=tP(this.attrs);this.instance=o?new Ri(this,o):null}create(t=null){return!t&&this.instance?this.instance:new Ri(this,nP(this.attrs,t))}static compile(t,n){let i=Object.create(null),s=0;return t.forEach((o,r)=>i[o]=new D7(o,s++,n,r)),i}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){iP(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class RNe{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in t)n[s]=t[s];n.nodes=ko.from(t.nodes),n.marks=ko.from(t.marks||{}),this.nodes=HE.compile(this.spec.nodes,this),this.marks=D7.compile(this.spec.marks,this);let i=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],r=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=i[r]||(i[r]=Gd.parse(r,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?WE(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],r=o.spec.excludes;o.excluded=r==null?[o]:r==""?[]:WE(this,r.split(" "))}this.nodeFromJSON=s=>wh.fromJSON(this,s),this.markFromJSON=s=>Ri.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,i,s){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof HE){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,i,s)}text(t,n){let i=this.nodes.text;return new ty(i,i.defaultAttrs,t,Ri.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function WE(e,t){let n=[];for(let i=0;i<t.length;i++){let s=t[i],o=e.marks[s],r=o;if(o)n.push(o);else for(let l in e.marks){let a=e.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&n.push(r=a)}if(!r)throw new SyntaxError("Unknown mark type: '"+t[i]+"'")}return n}function ONe(e){return e.tag!=null}function PNe(e){return e.style!=null}let jNe=class P8{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(s=>{if(ONe(s))this.tags.push(s);else if(PNe(s)){let o=/[^=]*/.exec(s.style)[0];i.indexOf(o)<0&&i.push(o),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let o=t.nodes[s.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let i=new UE(this,n,!1);return i.addAll(t,Ri.none,n.from,n.to),i.finish()}parseSlice(t,n={}){let i=new UE(this,n,!0);return i.addAll(t,Ri.none,n.from,n.to),Hn.maxOpen(i.finish())}matchTag(t,n,i){for(let s=i?this.tags.indexOf(i)+1:0;s<this.tags.length;s++){let o=this.tags[s];if(qNe(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let r=o.getAttrs(t);if(r===!1)continue;o.attrs=r||void 0}return o}}}matchStyle(t,n,i,s){for(let o=s?this.styles.indexOf(s)+1:0;o<this.styles.length;o++){let r=this.styles[o],l=r.style;if(!(l.indexOf(t)!=0||r.context&&!i.matchesContext(r.context)||l.length>t.length&&(l.charCodeAt(t.length)!=61||l.slice(t.length+1)!=n))){if(r.getAttrs){let a=r.getAttrs(n);if(a===!1)continue;r.attrs=a||void 0}return r}}}static schemaRules(t){let n=[];function i(s){let o=s.priority==null?50:s.priority,r=0;for(;r<n.length;r++){let l=n[r];if((l.priority==null?50:l.priority)<o)break}n.splice(r,0,s)}for(let s in t.marks){let o=t.marks[s].spec.parseDOM;o&&o.forEach(r=>{i(r=KE(r)),r.mark||r.ignore||r.clearMark||(r.mark=s)})}for(let s in t.nodes){let o=t.nodes[s].spec.parseDOM;o&&o.forEach(r=>{i(r=KE(r)),r.node||r.ignore||r.mark||(r.node=s)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new P8(t,P8.schemaRules(t)))}};const rP={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},HNe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},lP={ol:!0,ul:!0},A0=1,j8=2,Rp=4;function qE(e,t,n){return t!=null?(t?A0:0)|(t==="full"?j8:0):e&&e.whitespace=="pre"?A0|j8:n&~Rp}class zm{constructor(t,n,i,s,o,r){this.type=t,this.attrs=n,this.marks=i,this.solid=s,this.options=r,this.content=[],this.activeMarks=Ri.none,this.match=o||(r&Rp?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Ln.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,s;return(s=i.findWrapping(t.type))?(this.match=i,s):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&A0)){let i=this.content[this.content.length-1],s;if(i&&i.isText&&(s=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-s[0].length))}}let n=Ln.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Ln.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!rP.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class UE{constructor(t,n,i){this.parser=t,this.options=n,this.isOpen=i,this.open=0,this.localPreserveWS=!1;let s=n.topNode,o,r=qE(null,n.preserveWhitespace,0)|(i?Rp:0);s?o=new zm(s.type,s.attrs,Ri.none,!0,n.topMatch||s.type.contentMatch,r):i?o=new zm(null,null,Ri.none,!0,null,r):o=new zm(t.schema.topNodeType,null,Ri.none,!0,null,r),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let i=t.nodeValue,s=this.top,o=s.options&j8?"full":this.localPreserveWS||(s.options&A0)>0,{schema:r}=this.parser;if(o==="full"||s.inlineContext(t)||/[^ \t\r\n\u000c]/.test(i)){if(o)if(o==="full")i=i.replace(/\r\n?/g,` +`);else if(r.linebreakReplacement&&/[\r\n]/.test(i)&&this.top.findWrapping(r.linebreakReplacement.create())){let l=i.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(r.linebreakReplacement.create(),n,!0),l[a]&&this.insertNode(r.text(l[a]),n,!/\S/.test(l[a]));i=""}else i=i.replace(/\r?\n|\r/g," ");else if(i=i.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(i)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=t.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(i=i.slice(1))}i&&this.insertNode(r.text(i),n,!/\S/.test(i)),this.findInText(t)}else this.findInside(t)}addElement(t,n,i){let s=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let r=t.nodeName.toLowerCase(),l;lP.hasOwnProperty(r)&&this.parser.normalizeLists&&WNe(t);let a=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(l=this.parser.matchTag(t,this,i));e:if(a?a.ignore:HNe.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(t=a.skip);let u,c=this.needsBlock;if(rP.hasOwnProperty(r))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),u=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let d=a&&a.skip?n:this.readStyles(t,n);d&&this.addAll(t,d),u&&this.sync(o),this.needsBlock=c}else{let u=this.readStyles(t,n);u&&this.addElementByRule(t,a,u,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` +`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let i=t.style;if(i&&i.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let o=this.parser.matchedStyles[s],r=i.getPropertyValue(o);if(r)for(let l=void 0;;){let a=this.parser.matchStyle(o,r,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(u=>!a.clearMark(u)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return n}addElementByRule(t,n,i,s){let o,r;if(n.node)if(r=this.parser.schema.nodes[n.node],r.isLeaf)this.insertNode(r.create(n.attrs),i,t.nodeName=="BR")||this.leafFallback(t,i);else{let a=this.enter(r,n.attrs||null,i,n.preserveWhitespace);a&&(o=!0,i=a)}else{let a=this.parser.schema.marks[n.mark];i=i.concat(a.create(n.attrs))}let l=this.top;if(r&&r.isLeaf)this.findInside(t);else if(s)this.addElement(t,i,s);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(a=>this.insertNode(a,i,!1));else{let a=t;typeof n.contentElement=="string"?a=t.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(t):n.contentElement&&(a=n.contentElement),this.findAround(t,a,!0),this.addAll(a,i),this.findAround(t,a,!1)}o&&this.sync(l)&&this.open--}addAll(t,n,i,s){let o=i||0;for(let r=i?t.childNodes[i]:t.firstChild,l=s==null?null:t.childNodes[s];r!=l;r=r.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(r,n);this.findAtPoint(t,o)}findPlace(t,n,i){let s,o;for(let r=this.open,l=0;r>=0;r--){let a=this.nodes[r],u=a.findWrapping(t);if(u&&(!s||s.length>u.length+l)&&(s=u,o=a,!u.length))break;if(a.solid){if(i)break;l+=2}}if(!s)return null;this.sync(o);for(let r=0;r<s.length;r++)n=this.enterInner(s[r],null,n,!1);return n}insertNode(t,n,i){if(t.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let s=this.findPlace(t,n,i);if(s){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(t.type));let r=Ri.none;for(let l of s.concat(t.marks))(o.type?o.type.allowsMarkType(l.type):VE(l.type,t.type))&&(r=l.addToSet(r));return o.content.push(t.mark(r)),!0}return!1}enter(t,n,i,s){let o=this.findPlace(t.create(n),i,!1);return o&&(o=this.enterInner(t,n,i,!0,s)),o}enterInner(t,n,i,s=!1,o){this.closeExtra();let r=this.top;r.match=r.match&&r.match.matchType(t);let l=qE(t,o,r.options);r.options&Rp&&r.content.length==0&&(l|=Rp);let a=Ri.none;return i=i.filter(u=>(r.type?r.type.allowsMarkType(u.type):VE(u.type,t))?(a=u.addToSet(a),!1):!0),this.nodes.push(new zm(t,n,a,s,null,l)),this.open++,i}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=A0)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let s=i.length-1;s>=0;s--)t+=i[s].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let i=0;i<this.find.length;i++)this.find[i].node==t&&this.find[i].offset==n&&(this.find[i].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,i){if(t!=n&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&t.nodeType==1&&t.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(i?2:4)&&(this.find[s].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),i=this.options.context,s=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),o=-(i?i.depth+1:0)+(s?0:1),r=(l,a)=>{for(;l>=0;l--){let u=n[l];if(u==""){if(l==n.length-1||l==0)continue;for(;a>=o;a--)if(r(l-1,a))return!0;return!1}else{let c=a>0||a==0&&s?this.nodes[a].type:i&&a>=o?i.node(a-o).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;a--}}return!0};return r(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}}function WNe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let i=t.nodeType==1?t.nodeName.toLowerCase():null;i&&lP.hasOwnProperty(i)&&n?(n.appendChild(t),t=n):i=="li"?n=t:i&&(n=null)}}function qNe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function KE(e){let t={};for(let n in e)t[n]=e[n];return t}function VE(e,t){let n=t.schema.nodes;for(let i in n){let s=n[i];if(!s.allowsMarkType(e))continue;let o=[],r=l=>{o.push(l);for(let a=0;a<l.edgeCount;a++){let{type:u,next:c}=l.edge(a);if(u==t||o.indexOf(c)<0&&r(c))return!0}};if(r(s.contentMatch))return!0}}class m9{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},i){i||(i=Rm(n).createDocumentFragment());let s=i,o=[];return t.forEach(r=>{if(o.length||r.marks.length){let l=0,a=0;for(;l<o.length&&a<r.marks.length;){let u=r.marks[a];if(!this.marks[u.type.name]){a++;continue}if(!u.eq(o[l][0])||u.type.spec.spanning===!1)break;l++,a++}for(;l<o.length;)s=o.pop()[1];for(;a<r.marks.length;){let u=r.marks[a++],c=this.serializeMark(u,r.isInline,n);c&&(o.push([u,s]),s.appendChild(c.dom),s=c.contentDOM||c.dom)}}s.appendChild(this.serializeNodeInner(r,n))}),i}serializeNodeInner(t,n){if(t.isText)return Rm(n).createTextNode(t.text);let{dom:i,contentDOM:s}=C2(Rm(n),this.nodes[t.type.name](t),null,t.attrs);if(s){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,s)}return i}serializeNode(t,n={}){let i=this.serializeNodeInner(t,n);for(let s=t.marks.length-1;s>=0;s--){let o=this.serializeMark(t.marks[s],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(t,n,i={}){let s=this.marks[t.type.name];return s&&C2(Rm(i),s(t,n),null,t.attrs)}static renderSpec(t,n,i=null,s){return typeof n=="string"?{dom:t.createTextNode(n)}:C2(t,n,i,s)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new m9(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=ZE(t.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(t){return ZE(t.marks)}}function ZE(e){let t={};for(let n in e){let i=e[n].spec.toDOM;i&&(t[n]=i)}return t}function Rm(e){return e.document||window.document}const GE=new WeakMap;function UNe(e){let t=GE.get(e);return t===void 0&&GE.set(e,t=KNe(e)),t}function KNe(e){let t=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")t||(t=[]),t.push(i);else for(let s=0;s<i.length;s++)n(i[s]);else for(let s in i)n(i[s])}return n(e),t}function C2(e,t,n,i){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let s=t[0],o;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(i&&(o=UNe(i))&&o.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let r=s.indexOf(" ");r>0&&(n=s.slice(0,r),s=s.slice(r+1));let l,a=n?e.createElementNS(n,s):e.createElement(s),u=t[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&a.style?a.style.cssText=u[d]:a.setAttribute(d,u[d])}}for(let d=c;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(e.createTextNode(f));else{let{dom:h,contentDOM:g}=C2(e,f,n,i);if(a.appendChild(h),g){if(l)throw new RangeError("Multiple content holes");l=g}}}return{dom:a,contentDOM:l}}const aP=65535,uP=Math.pow(2,16);function VNe(e,t){return e+t*uP}function QE(e){return e&aP}function ZNe(e){return(e-(e&aP))/uP}const cP=1,dP=2,w2=4,fP=8;class YE{constructor(t,n,i){this.pos=t,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&fP)>0}get deletedBefore(){return(this.delInfo&(cP|w2))>0}get deletedAfter(){return(this.delInfo&(dP|w2))>0}get deletedAcross(){return(this.delInfo&w2)>0}}class Pr{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Pr.empty)return Pr.empty}recover(t){let n=0,i=QE(t);if(!this.inverted)for(let s=0;s<i;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[i*3]+n+ZNe(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,i){let s=0,o=this.inverted?2:1,r=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>t)break;let u=this.ranges[l+o],c=this.ranges[l+r],d=a+u;if(t<=d){let f=u?t==a?-1:t==d?1:n:n,h=a+s+(f<0?0:c);if(i)return h;let g=t==(n<0?a:d)?null:VNe(l/3,t-a),m=t==a?dP:t==d?cP:w2;return(n<0?t!=a:t!=d)&&(m|=fP),new YE(h,m,g)}s+=c-u}return i?t+s:new YE(t+s,0,null)}touches(t,n){let i=0,s=QE(n),o=this.inverted?2:1,r=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?i:0);if(a>t)break;let u=this.ranges[l+o],c=a+u;if(t<=c&&l==s*3)return!0;i+=this.ranges[l+r]-u}return!1}forEach(t){let n=this.inverted?2:1,i=this.inverted?1:2;for(let s=0,o=0;s<this.ranges.length;s+=3){let r=this.ranges[s],l=r-(this.inverted?o:0),a=r+(this.inverted?0:o),u=this.ranges[s+n],c=this.ranges[s+i];t(l,l+u,a,a+c),o+=c-u}}invert(){return new Pr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Pr.empty:new Pr(t<0?[0,-t,0]:[0,0,t])}}Pr.empty=new Pr([]);const ck=Object.create(null);class Ko{getMap(){return Pr.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=ck[n.stepType];if(!i)throw new RangeError(`No step type ${n.stepType} defined`);return i.fromJSON(t,n)}static jsonID(t,n){if(t in ck)throw new RangeError("Duplicate use of step JSON ID "+t);return ck[t]=n,n.prototype.jsonID=t,n}}class Ps{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new Ps(t,null)}static fail(t){return new Ps(null,t)}static fromReplace(t,n,i,s){try{return Ps.ok(t.replace(n,i,s))}catch(o){if(o instanceof k0)return Ps.fail(o.message);throw o}}}function $7(e,t,n){let i=[];for(let s=0;s<e.childCount;s++){let o=e.child(s);o.content.size&&(o=o.copy($7(o.content,t,o))),o.isInline&&(o=t(o,n,s)),i.push(o)}return Ln.fromArray(i)}class Ad extends Ko{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=t.resolve(this.from),s=i.node(i.sharedDepth(this.to)),o=new Hn($7(n.content,(r,l)=>!r.isAtom||!l.type.allowsMarkType(this.mark.type)?r:r.mark(this.mark.addToSet(r.marks)),s),n.openStart,n.openEnd);return Ps.fromReplace(t,this.from,this.to,o)}invert(){return new Cd(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Ad(n.pos,i.pos,this.mark)}merge(t){return t instanceof Ad&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ad(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ad(n.from,n.to,t.markFromJSON(n.mark))}}Ko.jsonID("addMark",Ad);class Cd extends Ko{constructor(t,n,i){super(),this.from=t,this.to=n,this.mark=i}apply(t){let n=t.slice(this.from,this.to),i=new Hn($7(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),t),n.openStart,n.openEnd);return Ps.fromReplace(t,this.from,this.to,i)}invert(){return new Ad(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Cd(n.pos,i.pos,this.mark)}merge(t){return t instanceof Cd&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Cd(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Cd(n.from,n.to,t.markFromJSON(n.mark))}}Ko.jsonID("removeMark",Cd);class wd extends Ko{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Ps.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ps.fromReplace(t,this.pos,this.pos+1,new Hn(Ln.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(i))return new wd(this.pos,n.marks[s]);return new wd(this.pos,this.mark)}}return new C0(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new wd(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new wd(n.pos,t.markFromJSON(n.mark))}}Ko.jsonID("addNodeMark",wd);class C0 extends Ko{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return Ps.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ps.fromReplace(t,this.pos,this.pos+1,new Hn(Ln.from(i),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new wd(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new C0(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new C0(n.pos,t.markFromJSON(n.mark))}}Ko.jsonID("removeNodeMark",C0);class Il extends Ko{constructor(t,n,i,s=!1){super(),this.from=t,this.to=n,this.slice=i,this.structure=s}apply(t){return this.structure&&H8(t,this.from,this.to)?Ps.fail("Structure replace would overwrite content"):Ps.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Pr([this.from,this.to-this.from,this.slice.size])}invert(t){return new Il(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),i=this.from==this.to&&Il.MAP_BIAS<0?n:t.mapResult(this.from,1);return i.deletedAcross&&n.deletedAcross?null:new Il(i.pos,Math.max(i.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof Il)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?Hn.empty:new Hn(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Il(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?Hn.empty:new Hn(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Il(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Il(n.from,n.to,Hn.fromJSON(t,n.slice),!!n.structure)}}Il.MAP_BIAS=1;Ko.jsonID("replace",Il);class xh extends Ko{constructor(t,n,i,s,o,r,l=!1){super(),this.from=t,this.to=n,this.gapFrom=i,this.gapTo=s,this.slice=o,this.insert=r,this.structure=l}apply(t){if(this.structure&&(H8(t,this.from,this.gapFrom)||H8(t,this.gapTo,this.to)))return Ps.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ps.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?Ps.fromReplace(t,this.from,this.to,i):Ps.fail("Content does not fit in gap")}getMap(){return new Pr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new xh(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),i=t.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?i.pos:t.map(this.gapTo,1);return n.deletedAcross&&i.deletedAcross||s<n.pos||o>i.pos?null:new xh(n.pos,i.pos,s,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new xh(n.from,n.to,n.gapFrom,n.gapTo,Hn.fromJSON(t,n.slice),n.insert,!!n.structure)}}Ko.jsonID("replaceAround",xh);function H8(e,t,n){let i=e.resolve(t),s=n-t,o=i.depth;for(;s>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,s--;if(s>0){let r=i.node(o).maybeChild(i.indexAfter(o));for(;s>0;){if(!r||r.isLeaf)return!0;r=r.firstChild,s--}}return!1}function GNe(e,t,n){let i=e.resolve(t);if(!n.content.size)return t;let s=n.content;for(let o=0;o<n.openStart;o++)s=s.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let r=i.depth;r>=0;r--){let l=r==i.depth?0:i.pos<=(i.start(r+1)+i.end(r+1))/2?-1:1,a=i.index(r)+(l>0?1:0),u=i.node(r),c=!1;if(o==1)c=u.canReplace(a,a,s);else{let d=u.contentMatchAt(a).findWrapping(s.firstChild.type);c=d&&u.canReplaceWith(a,a,d[0])}if(c)return l==0?i.pos:l<0?i.before(r+1):i.after(r+1)}return null}class Op extends Ko{constructor(t,n,i){super(),this.pos=t,this.attr=n,this.value=i}apply(t){let n=t.nodeAt(this.pos);if(!n)return Ps.fail("No node at attribute step's position");let i=Object.create(null);for(let o in n.attrs)i[o]=n.attrs[o];i[this.attr]=this.value;let s=n.type.create(i,null,n.marks);return Ps.fromReplace(t,this.pos,this.pos+1,new Hn(Ln.from(s),0,n.isLeaf?0:1))}getMap(){return Pr.empty}invert(t){return new Op(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Op(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Op(n.pos,n.attr,n.value)}}Ko.jsonID("attr",Op);class ny extends Ko{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let s in t.attrs)n[s]=t.attrs[s];n[this.attr]=this.value;let i=t.type.create(n,t.content,t.marks);return Ps.ok(i)}getMap(){return Pr.empty}invert(t){return new ny(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new ny(n.attr,n.value)}}Ko.jsonID("docAttr",ny);let w0=class extends Error{};w0=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};w0.prototype=Object.create(Error.prototype);w0.prototype.constructor=w0;w0.prototype.name="TransformError";const dk=Object.create(null);class gs{constructor(t,n,i){this.$anchor=t,this.$head=n,this.ranges=i||[new QNe(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=Hn.empty){let i=n.content.lastChild,s=null;for(let l=0;l<n.openEnd;l++)s=i,i=i.lastChild;let o=t.steps.length,r=this.ranges;for(let l=0;l<r.length;l++){let{$from:a,$to:u}=r[l],c=t.mapping.slice(o);t.replaceRange(c.map(a.pos),c.map(u.pos),l?Hn.empty:n),l==0&&eT(t,o,(i?i.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(t,n){let i=t.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){let{$from:r,$to:l}=s[o],a=t.mapping.slice(i),u=a.map(r.pos),c=a.map(l.pos);o?t.deleteRange(u,c):(t.replaceRangeWith(u,c,n),eT(t,i,n.isInline?-1:1))}}static findFrom(t,n,i=!1){let s=t.parent.inlineContent?new Yi(t):qf(t.node(0),t.parent,t.pos,t.index(),n,i);if(s)return s;for(let o=t.depth-1;o>=0;o--){let r=n<0?qf(t.node(0),t.node(o),t.before(o+1),t.index(o),n,i):qf(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,i);if(r)return r}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new ka(t.node(0))}static atStart(t){return qf(t,t,0,0,1)||new ka(t)}static atEnd(t){return qf(t,t,t.content.size,t.childCount,-1)||new ka(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=dk[n.type];if(!i)throw new RangeError(`No selection type ${n.type} defined`);return i.fromJSON(t,n)}static jsonID(t,n){if(t in dk)throw new RangeError("Duplicate use of selection JSON ID "+t);return dk[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Yi.between(this.$anchor,this.$head).getBookmark()}}gs.prototype.visible=!0;class QNe{constructor(t,n){this.$from=t,this.$to=n}}let JE=!1;function XE(e){!JE&&!e.parent.inlineContent&&(JE=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Yi extends gs{constructor(t,n=t){XE(t),XE(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let i=t.resolve(n.map(this.head));if(!i.parent.inlineContent)return gs.near(i);let s=t.resolve(n.map(this.anchor));return new Yi(s.parent.inlineContent?s:i,i)}replace(t,n=Hn.empty){if(super.replace(t,n),n==Hn.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof Yi&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new v9(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Yi(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,i=n){let s=t.resolve(n);return new this(s,i==n?s:t.resolve(i))}static between(t,n,i){let s=t.pos-n.pos;if((!i||s)&&(i=s>=0?1:-1),!n.parent.inlineContent){let o=gs.findFrom(n,i,!0)||gs.findFrom(n,-i,!0);if(o)n=o.$head;else return gs.near(n,i)}return t.parent.inlineContent||(s==0?t=n:(t=(gs.findFrom(t,-i,!0)||gs.findFrom(t,i,!0)).$anchor,t.pos<n.pos!=s<0&&(t=n))),new Yi(t,n)}}gs.jsonID("text",Yi);class v9{constructor(t,n){this.anchor=t,this.head=n}map(t){return new v9(t.map(this.anchor),t.map(this.head))}resolve(t){return Yi.between(t.resolve(this.anchor),t.resolve(this.head))}}class li extends gs{constructor(t){let n=t.nodeAfter,i=t.node(0).resolve(t.pos+n.nodeSize);super(t,i),this.node=n}map(t,n){let{deleted:i,pos:s}=n.mapResult(this.anchor),o=t.resolve(s);return i?gs.near(o):new li(o)}content(){return new Hn(Ln.from(this.node),0,0)}eq(t){return t instanceof li&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new B7(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new li(t.resolve(n.anchor))}static create(t,n){return new li(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}li.prototype.visible=!1;gs.jsonID("node",li);class B7{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:i}=t.mapResult(this.anchor);return n?new v9(i,i):new B7(i)}resolve(t){let n=t.resolve(this.anchor),i=n.nodeAfter;return i&&li.isSelectable(i)?new li(n):gs.near(n)}}class ka extends gs{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=Hn.empty){if(n==Hn.empty){t.delete(0,t.doc.content.size);let i=gs.atStart(t.doc);i.eq(t.selection)||t.setSelection(i)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new ka(t)}map(t){return new ka(t)}eq(t){return t instanceof ka}getBookmark(){return YNe}}gs.jsonID("all",ka);const YNe={map(){return this},resolve(e){return new ka(e)}};function qf(e,t,n,i,s,o=!1){if(t.inlineContent)return Yi.create(e,n);for(let r=i-(s>0?0:1);s>0?r<t.childCount:r>=0;r+=s){let l=t.child(r);if(l.isAtom){if(!o&&li.isSelectable(l))return li.create(e,n-(s<0?l.nodeSize:0))}else{let a=qf(e,l,n+s,s<0?l.childCount:0,s,o);if(a)return a}n+=l.nodeSize*s}return null}function eT(e,t,n){let i=e.steps.length-1;if(i<t)return;let s=e.steps[i];if(!(s instanceof Il||s instanceof xh))return;let o=e.mapping.maps[i],r;o.forEach((l,a,u,c)=>{r==null&&(r=c)}),e.setSelection(gs.near(e.doc.resolve(r),n))}function tT(e,t){return!t||!e?e:e.bind(t)}class Om{constructor(t,n,i){this.name=t,this.init=tT(n.init,i),this.apply=tT(n.apply,i)}}new Om("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new Om("selection",{init(e,t){return e.selection||gs.atStart(t.doc)},apply(e){return e.selection}}),new Om("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,i){return i.selection.$cursor?e.storedMarks:null}}),new Om("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}});function hP(e,t,n){for(let i in e){let s=e[i];s instanceof Function?s=s.bind(t):i=="handleDOMEvents"&&(s=hP(s,t,{})),n[i]=s}return n}class JNe{constructor(t){this.spec=t,this.props={},t.props&&hP(t.props,this,this.props),this.key=t.key?t.key.key:XNe("plugin")}getState(t){return t[this.key]}}const fk=Object.create(null);function XNe(e){return e in fk?e+"$"+ ++fk[e]:(fk[e]=0,e+"$")}const iy="kimi-code://skill/";function pP(e){return e?e.startsWith(iy)&&e.length>iy.length?"skill":e.startsWith("#")||e.startsWith("?")||e.startsWith("//")||/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(e)&&!/^[a-zA-Z]:(?:[\\/]|%5c)/i.test(e)?null:e.endsWith("/")||e.endsWith("\\")||/%5c$/i.test(e)?"folder":"file":null}function rp(e){const t=e.search(/[#?]/);return t>0?e.slice(0,t):e}function gP(e){let t="";for(const n of e)n.codePointAt(0)>127||/[A-Za-z0-9\-._~]/.test(n)?t+=n:t+=`%${n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0")}`;return t}function eFe(e){const t=e.split("/").map(gP).join("/");return t.startsWith("//")?`/%2F${t.slice(2)}`:t}function tFe(e){return e.replace(/%/g,"%25").replace(/&/g,"%26").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/([\\[\]])/g,"\\$1").replace(/\n/g,"%0A").replace(/\r/g,"%0D")}function nFe(e){return e.replace(/\\([\\[\]])/g,"$1").replace(/%0A/g,` +`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function iFe(e){return e.replace(/%0A/g,` +`).replace(/%0D/g,"\r").replace(/%26/g,"&").replace(/%3C/g,"<").replace(/%3E/g,">").replace(/%25/g,"%")}function sFe(e,t){const n=t?e.replace(/\\([\\<>])/g,"$1"):e.replace(/\\([\\()])/g,"$1");try{return decodeURIComponent(n)}catch{return n}}function mP(e){const t=e.slice(iy.length);try{return decodeURIComponent(t)}catch{return t}}function vP(e){const t=tFe(e.name);if(e.kind==="skill")return`[${t}](${iy}${gP(e.name)})`;const n=e.kind==="folder"&&!e.path.endsWith("/")&&!e.path.endsWith("\\")?`${e.path}/`:e.path;return`[${t}](${eFe(n)})`}const oFe=new RNe({nodes:{doc:{content:"block+"},paragraph:{group:"block",content:"inline*",toDOM:()=>["p",0],parseDOM:[{tag:"p"}]},text:{group:"inline"},mention:{group:"inline",inline:!0,atom:!0,selectable:!0,attrs:{kind:{},name:{},path:{default:""}},leafText:e=>vP(e.attrs),toDOM:e=>{const t=e.attrs;return["span",{class:`mention-pill mention-${t.kind}`,"data-mention-path":t.path},t.name]}}}}),rFe={extensions:[{disable:{null:["attention","autolink","blockQuote","characterReference","codeFenced","codeIndented","codeText","definition","hardBreakEscape","headingAtx","htmlFlow","htmlText","list","setextUnderline","thematicBreak"]}}]};function z7(e){if(e.includes(` +`)){const a=[];let u=0;for(const c of e.split(` +`)){for(const d of z7(c))a.push({...d,start:d.start+u,end:d.end+u});u+=c.length+1}return a}const t=kNe(yNe(rFe).document().write(bNe()(e,void 0,!0))),n=[];let i=null,s=!1,o=!1,r=null,l=0;for(const[a,u]of t){if(u.type==="image"){l+=a==="enter"?1:-1;continue}if(l>0)continue;if(a==="enter"){u.type==="label"?i={start:u.start.offset,end:u.end.offset}:u.type==="resource"&&i!==null&&u.start.offset===i.end?(s=!0,o=!1,r=null):u.type==="resourceTitle"&&s?o=!0:u.type==="resourceDestination"&&s&&(r={start:u.start.offset,end:u.end.offset});continue}if(u.type!=="resource"||!s||i===null)continue;s=!1;const{start:c,end:d}=i;i=null;const f=u.end.offset;if(o||e[c]!=="["||r===null)continue;const h=e.slice(c+1,d-1);let g=e.slice(r.start,r.end),m=!1;if(g.startsWith("<")&&(m=!0,g=g.slice(1,-1)),!h||!g)continue;const y=pP(g);if(y!==null)if(y==="skill")n.push({start:c,end:f,attrs:{kind:y,name:mP(g),path:""},rawDest:g});else{const A=sFe(g,m);n.push({start:c,end:f,attrs:{kind:y,name:nFe(h),path:A},rawDest:g})}}return n}function lFe(e){const t=z7(e);if(t.length===0)return[{type:"text",value:e}];const n=[];let i=0;for(const s of t)s.start>i&&n.push({type:"text",value:e.slice(i,s.start)}),n.push({type:"mention",attrs:s.attrs,rawDest:s.rawDest}),i=s.end;return i<e.length&&n.push({type:"text",value:e.slice(i)}),n}function Uf(e){try{return decodeURIComponent(e)}catch{return e}}const of=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},yP=function(e,t,n,i){return n&&(nT(e,t,n,i,-1)||nT(e,t,n,i,1))},aFe=/^(img|br|input|textarea|hr)$/i;function nT(e,t,n,i,s){for(var o;;){if(e==n&&t==i)return!0;if(t==(s<0?0:sy(e))){let r=e.parentNode;if(!r||r.nodeType!=1||R7(e)||aFe.test(e.nodeName)||e.contentEditable=="false")return!1;t=of(e)+(s<0?0:1),e=r}else if(e.nodeType==1){let r=e.childNodes[t+(s<0?-1:0)];if(r.nodeType==1&&r.contentEditable=="false")if(!((o=r.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection)t+=s;else return!1;else e=r,t=s<0?sy(e):0}else return!1}}function sy(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function uFe(e,t,n){for(let i=t==0,s=t==sy(e);i||s;){if(e==n)return!0;let o=of(e);if(e=e.parentNode,!e)return!1;i=i&&o==0,s=s&&o==sy(e)}}function R7(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const kP=function(e){return e.focusNode&&yP(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function bP(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const xa=typeof navigator<"u"?navigator:null,iT=typeof document<"u"?document:null,Nc=xa&&xa.userAgent||"",W8=/Edge\/(\d+)/.exec(Nc),AP=/MSIE \d/.exec(Nc),q8=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Nc),eg=!!(AP||q8||W8),CP=AP?document.documentMode:q8?+q8[1]:W8?+W8[1]:0,y9=!eg&&/gecko\/(\d+)/i.test(Nc);y9&&+(/Firefox\/(\d+)/.exec(Nc)||[0,0])[1];const U8=!eg&&/Chrome\/(\d+)/.exec(Nc),Fc=!!U8,wP=U8?+U8[1]:0,rf=!eg&&!!xa&&/Apple Computer/.test(xa.vendor),O7=rf&&(/Mobile\/\w+/.test(Nc)||!!xa&&xa.maxTouchPoints>2),ul=O7||(xa?/Mac/.test(xa.platform):!1),xP=xa?/Win/.test(xa.platform):!1,tg=/Android \d/.test(Nc),P7=!!iT&&"webkitFontSmoothing"in iT.documentElement.style,cFe=P7?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function dFe(e,t=null){let n=e.domSelectionRange(),i=e.state.doc;if(!n.focusNode)return null;let s=e.docView.nearestDesc(n.focusNode),o=s&&s.size==0,r=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(r<0)return null;let l=i.resolve(r),a,u;if(kP(n)){for(a=r;s&&!s.node;)s=s.parent;let d=s.node;if(s&&d.isAtom&&li.isSelectable(d)&&s.parent&&!(d.isInline&&uFe(n.focusNode,n.focusOffset,s.dom))){let f=s.posBefore;u=new li(r==f?l:i.resolve(f))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=r,f=r;for(let h=0;h<n.rangeCount;h++){let g=n.getRangeAt(h);d=Math.min(d,e.docView.posFromDOM(g.startContainer,g.startOffset,1)),f=Math.max(f,e.docView.posFromDOM(g.endContainer,g.endOffset,-1))}if(d<0)return null;[a,r]=f==e.state.selection.anchor?[f,d]:[d,f],l=i.resolve(r)}else a=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let c=i.resolve(a);if(!u){let d=t=="pointer"||e.state.selection.head<l.pos&&!o?1:-1;u=_P(e,c,l,d)}return u}function SP(e){return e.editable?e.hasFocus():gFe(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function j7(e,t=!1){let n=e.state.selection;if(pFe(e,n),!SP(e))return;let i=e.input.mouseDown;if(!t&&Fc&&i){let s=e.domSelectionRange(),o=e.domObserver.currentSelection;if(s.anchorNode&&o.anchorNode&&yP(s.anchorNode,s.anchorOffset,o.anchorNode,o.anchorOffset)&&i.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)hFe(e);else{let{anchor:s,head:o}=n,r,l;sT&&!(n instanceof Yi)&&(n.$from.parent.inlineContent||(r=oT(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(l=oT(e,n.to))),e.docView.setSelection(s,o,e,t),sT&&(r&&rT(r),l&&rT(l)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&fFe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}const sT=rf||Fc&&wP<63;function oT(e,t){let{node:n,offset:i}=e.docView.domFromPos(t,0),s=i<n.childNodes.length?n.childNodes[i]:null,o=i?n.childNodes[i-1]:null;if(rf&&s&&s.contentEditable=="false")return hk(s);if((!s||s.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(s)return hk(s);if(o)return hk(o)}}function hk(e){return e.contentEditable="true",rf&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function rT(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function fFe(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),i=n.anchorNode,s=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=i||n.anchorOffset!=s)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!SP(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function hFe(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,i=n.nodeName=="IMG";i?t.collapse(n.parentNode,of(n)+1):t.collapse(n,0),!i&&!e.state.selection.visible&&eg&&CP<=11&&(n.disabled=!0,n.disabled=!1)}function pFe(e,t){if(t instanceof li){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(lT(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else lT(e)}function lT(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function _P(e,t,n,i){return e.someProp("createSelectionBetween",s=>s(e,t,n))||Yi.between(t,n,i)}function gFe(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function K8(e,t){let{$anchor:n,$head:i}=e.selection,s=t>0?n.max(i):n.min(i),o=s.parent.inlineContent?s.depth?e.doc.resolve(t>0?s.after():s.before()):null:s;return o&&gs.findFrom(o,t)}function Ru(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function aT(e,t,n){let i=e.state.selection;if(i instanceof Yi)if(n.indexOf("s")>-1){let{$head:s}=i,o=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let r=e.state.doc.resolve(s.pos+o.nodeSize*(t<0?-1:1));return Ru(e,new Yi(i.$anchor,r))}else if(i.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let s=K8(e.state,t);return s&&s instanceof li?Ru(e,s):!1}else if(!(ul&&n.indexOf("m")>-1)){let s=i.$head,o=s.textOffset?null:t<0?s.nodeBefore:s.nodeAfter,r;if(!o||o.isText)return!1;let l=t<0?s.pos-o.nodeSize:s.pos;return o.isAtom||(r=e.docView.descAt(l))&&!r.contentDOM?li.isSelectable(o)?Ru(e,new li(t<0?e.state.doc.resolve(s.pos-o.nodeSize):s)):P7?Ru(e,new Yi(e.state.doc.resolve(t<0?l:l+o.nodeSize))):!1:!1}}else return!1;else{if(i instanceof li&&i.node.isInline)return Ru(e,new Yi(t>0?i.$to:i.$from));{let s=K8(e.state,t);return s?Ru(e,s):!1}}}function oy(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Pp(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Df(e,t){return t<0?mFe(e):vFe(e)}function mFe(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let s,o,r=!1;for(y9&&n.nodeType==1&&i<oy(n)&&Pp(n.childNodes[i],-1)&&(r=!0);;)if(i>0){if(n.nodeType!=1)break;{let l=n.childNodes[i-1];if(Pp(l,-1))s=n,o=--i;else if(l.nodeType==3)n=l,i=n.nodeValue.length;else break}}else{if(IP(n))break;{let l=n.previousSibling;for(;l&&Pp(l,-1);)s=n.parentNode,o=of(l),l=l.previousSibling;if(l)n=l,i=oy(n);else{if(n=n.parentNode,n==e.dom)break;i=0}}}r?V8(e,n,i):s&&V8(e,s,o)}function vFe(e){let t=e.domSelectionRange(),n=t.focusNode,i=t.focusOffset;if(!n)return;let s=oy(n),o,r;for(;;)if(i<s){if(n.nodeType!=1)break;let l=n.childNodes[i];if(Pp(l,1))o=n,r=++i;else break}else{if(IP(n))break;{let l=n.nextSibling;for(;l&&Pp(l,1);)o=l.parentNode,r=of(l)+1,l=l.nextSibling;if(l)n=l,i=0,s=oy(n);else{if(n=n.parentNode,n==e.dom)break;i=s=0}}}o&&V8(e,o,r)}function IP(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function yFe(e,t){for(;e&&t==e.childNodes.length&&!R7(e);)t=of(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function kFe(e,t){for(;e&&!t&&!R7(e);)t=of(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function V8(e,t,n){if(t.nodeType!=3){let o,r;(r=yFe(t,n))?(t=r,n=0):(o=kFe(t,n))&&(t=o,n=o.nodeValue.length)}let i=e.domSelection();if(!i)return;if(kP(i)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),i.removeAllRanges(),i.addRange(o)}else i.extend&&i.extend(t,n);e.domObserver.setCurSelection();let{state:s}=e;setTimeout(()=>{e.state==s&&j7(e)},50)}function uT(e,t){let n=e.state.doc.resolve(t);if(!(Fc||xP)&&n.parent.inlineContent){let s=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),r=(o.top+o.bottom)/2;if(r>s.top&&r<s.bottom&&Math.abs(o.left-s.left)>1)return o.left<s.left?"ltr":"rtl"}if(t<n.end()){let o=e.coordsAtPos(t+1),r=(o.top+o.bottom)/2;if(r>s.top&&r<s.bottom&&Math.abs(o.left-s.left)>1)return o.left>s.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function cT(e,t,n){let i=e.state.selection;if(i instanceof Yi&&!i.empty||n.indexOf("s")>-1||ul&&n.indexOf("m")>-1)return!1;let{$from:s,$to:o}=i;if(!s.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let r=K8(e.state,t);if(r&&r instanceof li)return Ru(e,r)}if(!s.parent.inlineContent){let r=t<0?s:o,l=i instanceof ka?gs.near(r,t):gs.findFrom(r,t);return l?Ru(e,l):!1}return!1}function dT(e,t){if(!(e.state.selection instanceof Yi))return!0;let{$head:n,$anchor:i,empty:s}=e.state.selection;if(!n.sameParent(i))return!0;if(!s)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=e.state.tr;return t<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),e.dispatch(r),!0}return!1}function fT(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function bFe(e){if(!rf||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let i=t.firstChild;fT(e,i,"true"),setTimeout(()=>fT(e,i,"false"),20)}return!1}function AFe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function CFe(e,t){let n=t.keyCode,i=AFe(t);if(n==8||ul&&n==72&&i=="c")return dT(e,-1)||Df(e,-1);if(n==46&&!t.shiftKey||ul&&n==68&&i=="c")return dT(e,1)||Df(e,1);if(n==13||n==27)return!0;if(n==37||ul&&n==66&&i=="c"){let s=n==37?uT(e,e.state.selection.from)=="ltr"?-1:1:-1;return aT(e,s,i)||Df(e,s)}else if(n==39||ul&&n==70&&i=="c"){let s=n==39?uT(e,e.state.selection.from)=="ltr"?1:-1:1;return aT(e,s,i)||Df(e,s)}else{if(n==38||ul&&n==80&&i=="c")return cT(e,-1,i)||Df(e,-1);if(n==40||ul&&n==78&&i=="c")return bFe(e)||cT(e,1,i)||Df(e,1);if(i==(ul?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function MP(e,t){e.someProp("transformCopied",h=>{t=h(t,e)});let n=[],{content:i,openStart:s,openEnd:o}=t;for(;s>1&&o>1&&i.childCount==1&&i.firstChild.childCount==1;){s--,o--;let h=i.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),i=h.content}let r=e.someProp("clipboardSerializer")||m9.fromSchema(e.state.schema),l=DP(),a=l.createElement("div");a.appendChild(r.serializeFragment(i,{document:l}));let u=a.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=FP[u.nodeName.toLowerCase()]);){for(let h=c.length-1;h>=0;h--){let g=l.createElement(c[h]);for(;a.firstChild;)g.appendChild(a.firstChild);a.appendChild(g),d++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${s} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=e.someProp("clipboardTextSerializer",h=>h(t,e))||t.content.textBetween(0,t.content.size,` + +`);return{dom:a,text:f,slice:t}}function EP(e,t,n,i,s){let o=s.parent.type.spec.code,r,l;if(!n&&!t)return null;let a=!!t&&(i||o||!n);if(a){if(e.someProp("transformPastedText",f=>{t=f(t,o||i,e)}),o)return l=new Hn(Ln.from(e.state.schema.text(t.replace(/\r\n?/g,` +`))),0,0),e.someProp("transformPasted",f=>{l=f(l,e,!0)}),l;let d=e.someProp("clipboardTextParser",f=>f(t,s,i,e));if(d)l=d;else{let f=s.marks(),{schema:h}=e.state,g=m9.fromSchema(h);r=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=r.appendChild(document.createElement("p"));m&&y.appendChild(g.serializeNode(h.text(m,f)))})}}else e.someProp("transformPastedHTML",d=>{n=d(n,e)}),r=_Fe(n),P7&&IFe(r);let u=r&&r.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=r.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;r=f}if(l||(l=(e.someProp("clipboardParser")||e.someProp("domParser")||jNe.fromSchema(e.state.schema)).parseSlice(r,{preserveWhitespace:!!(a||c),context:s,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!wFe.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)l=MFe(hT(l,+c[1],+c[2]),c[4]);else if(l=Hn.maxOpen(xFe(l.content,s),!0),l.openStart||l.openEnd){let d=0,f=0;for(let h=l.content.firstChild;d<l.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=hT(l,d,f)}return e.someProp("transformPasted",d=>{l=d(l,e,a)}),l}const wFe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function xFe(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let s=t.node(n).contentMatchAt(t.index(n)),o,r=[];if(e.forEach(l=>{if(!r)return;let a=s.findWrapping(l.type),u;if(!a)return r=null;if(u=r.length&&o.length&&LP(a,o,l,r[r.length-1],0))r[r.length-1]=u;else{r.length&&(r[r.length-1]=NP(r[r.length-1],o.length));let c=TP(l,a);r.push(c),s=s.matchType(c.type),o=a}}),r)return Ln.from(r)}return e}function TP(e,t,n=0){for(let i=t.length-1;i>=n;i--)e=t[i].create(null,Ln.from(e));return e}function LP(e,t,n,i,s){if(s<e.length&&s<t.length&&e[s]==t[s]){let o=LP(e,t,n,i.lastChild,s+1);if(o)return i.copy(i.content.replaceChild(i.childCount-1,o));if(i.contentMatchAt(i.childCount).matchType(s==e.length-1?n.type:e[s+1]))return i.copy(i.content.append(Ln.from(TP(n,e,s+1))))}}function NP(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,NP(e.lastChild,t-1)),i=e.contentMatchAt(e.childCount).fillBefore(Ln.empty,!0);return e.copy(n.append(i))}function Z8(e,t,n,i,s,o){let r=t<0?e.firstChild:e.lastChild,l=r.content;return e.childCount>1&&(o=0),s<i-1&&(l=Z8(l,t,n,i,s+1,o)),s>=n&&(l=t<0?r.contentMatchAt(0).fillBefore(l,o<=s).append(l):l.append(r.contentMatchAt(r.childCount).fillBefore(Ln.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,r.copy(l))}function hT(e,t,n){return t<e.openStart&&(e=new Hn(Z8(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Hn(Z8(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const FP={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function DP(){return document.implementation.createHTMLDocument("title")}let pk=null;function SFe(e){let t=window.trustedTypes;return t?(pk||(pk=t.defaultPolicy||t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),pk.createHTML(e)):e}function _Fe(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=DP(),i=n.body,s=/<([a-z][^>\s]+)/i.exec(e),o;if((o=s&&FP[s[1].toLowerCase()])&&(e=o.map(r=>"<"+r+">").join("")+e+o.map(r=>"</"+r+">").reverse().join("")),i.innerHTML=SFe(e),o)for(let r=0;r<o.length;r++)i=i.querySelector(o[r])||i;for(let r=0;r<n.styleSheets.length;r++){let l=n.styleSheets[r];for(let a=0;a<l.rules.length;a++){let u=l.rules[a];if(u instanceof CSSStyleRule){let c=i.querySelectorAll(u.selectorText);for(let d=0;d<c.length;d++)c[d].style.cssText+=u.style.cssText}}}return i}function IFe(e){let t=e.querySelectorAll(Fc?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let i=t[n];i.childNodes.length==1&&i.textContent==" "&&i.parentNode&&i.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),i)}}function MFe(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,i;try{i=JSON.parse(t)}catch{return e}let{content:s,openStart:o,openEnd:r}=e;for(let l=i.length-2;l>=0;l-=2){let a=n.nodes[i[l]];if(!a||a.hasRequiredAttrs())break;s=Ln.from(a.create(i[l+1],s)),o++,r++}return new Hn(s,o,r)}const Ql={},Jr={};function Ga(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}Jr.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!RP(e)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(tg&&Fc&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),O7&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let i=Date.now();e.input.lastIOSEnter=i,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==i&&(e.someProp("handleKeyDown",s=>s(e,bP(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",i=>i(e,n))||CFe(e,n)?n.preventDefault():Ga(e,"key")};Jr.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Jr.keypress=(e,t)=>{let n=t;if(RP(e)||!n.charCode||n.ctrlKey&&!n.altKey||ul&&n.metaKey)return;if(e.someProp("handleKeyPress",s=>s(e,n))){n.preventDefault();return}let i=e.state.selection;if(!(i instanceof Yi)||!i.$from.sameParent(i.$to)){let s=String.fromCharCode(n.charCode),o=()=>e.state.tr.insertText(s).scrollIntoView();!/[\r\n]/.test(s)&&!e.someProp("handleTextInput",r=>r(e,i.$from.pos,i.$to.pos,s,o))&&e.dispatch(o()),n.preventDefault()}};function ng(e){return{left:e.clientX,top:e.clientY}}function EFe(e,t){let n=t.x-e.clientX,i=t.y-e.clientY;return n*n+i*i<100}function H7(e,t,n,i,s){if(i==-1)return!1;let o=e.state.doc.resolve(i);for(let r=o.depth+1;r>0;r--)if(e.someProp(t,l=>r>o.depth?l(e,n,o.nodeAfter,o.before(r),s,!0):l(e,n,o.node(r),o.before(r),s,!1)))return!0;return!1}function ig(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let i=e.state.tr.setSelection(t);i.setMeta("pointer",!0),e.dispatch(i)}function TFe(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),i=n.nodeAfter;return i&&i.isAtom&&li.isSelectable(i)?(ig(e,new li(n)),!0):!1}function LFe(e,t){if(t==-1)return!1;let n=e.state.selection,i,s;n instanceof li&&(i=n.node);let o=e.state.doc.resolve(t);for(let r=o.depth+1;r>0;r--){let l=r>o.depth?o.nodeAfter:o.node(r);if(li.isSelectable(l)){i&&n.$from.depth>0&&r>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?s=o.before(n.$from.depth):s=o.before(r);break}}return s!=null?(ig(e,li.create(e.state.doc,s)),!0):!1}function NFe(e,t,n,i,s){return H7(e,"handleClickOn",t,n,i)||e.someProp("handleClick",o=>o(e,t,i))||(s?LFe(e,n):TFe(e,n))}function FFe(e,t,n,i){return H7(e,"handleDoubleClickOn",t,n,i)||e.someProp("handleDoubleClick",s=>s(e,t,i))}function DFe(e,t,n,i){return H7(e,"handleTripleClickOn",t,n,i)||e.someProp("handleTripleClick",s=>s(e,t,i))||$Fe(e,n,i)}function $Fe(e,t,n){if(n.button!=0)return!1;let i=$P(e,t,!0),s=e.state.doc;return i?(ig(e,i),i instanceof Yi&&s.eq(e.state.doc)&&(e.input.mouseDown=new zFe(e,i)),!0):!1}function $P(e,t,n){let i=e.state.doc;if(t==-1)return i.inlineContent?Yi.create(i,0,i.content.size):null;let s=i.resolve(t);for(let o=s.depth+1;o>0;o--){let r=o>s.depth?s.nodeAfter:s.node(o),l=s.before(o);if(r.inlineContent)return Yi.create(i,l+1,l+1+r.content.size);if(n&&li.isSelectable(r))return li.create(i,l)}return null}function W7(e){return ry(e)}const BP=ul?"metaKey":"ctrlKey";Ql.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let i=W7(e),s=Date.now(),o="singleClick";s-e.input.lastClick.time<500&&EFe(n,e.input.lastClick)&&!n[BP]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:o,button:n.button},e.input.mouseDown&&e.input.mouseDown.done();let r=e.posAtCoords(ng(n));r&&(o=="singleClick"?e.input.mouseDown=new BFe(e,r,n,!!i):(o=="doubleClick"?FFe:DFe)(e,r.pos,r.inside,n)?n.preventDefault():Ga(e,"pointer"))};class zP{constructor(t){this.view=t,this.mightDrag=null,t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this))}up(t){this.done()}move(t){t.buttons==0&&this.done()}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}}class BFe extends zP{constructor(t,n,i,s){super(t),this.pos=n,this.event=i,this.flushed=s,this.delayedSelectionSync=!1,this.startDoc=t.state.doc,this.selectNode=!!i[BP],this.allowDefault=i.shiftKey;let o,r;if(n.inside>-1)o=t.state.doc.nodeAt(n.inside),r=n.inside;else{let c=t.state.doc.resolve(n.pos);o=c.parent,r=c.depth?c.before():0}const l=s?null:i.target,a=l?t.docView.nearestDesc(l,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:u}=t.state;i.button==0&&(o.type.spec.draggable&&o.type.spec.selectable!==!1||u instanceof li&&u.from<=r&&u.to>r)&&(this.mightDrag={node:o,pos:r,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&y9&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),Ga(t,"pointer")}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||j7(this.view)})}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ng(t))),this.updateAllowDefault(t),this.allowDefault||!n?Ga(this.view,"pointer"):NFe(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||rf&&this.mightDrag&&!this.mightDrag.node.isAtom||Fc&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ig(this.view,gs.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Ga(this.view,"pointer")}move(t){this.updateAllowDefault(t),Ga(this.view,"pointer"),super.move(t)}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}}class zFe extends zP{constructor(t,n){super(t),this.startSelection=n,this.startDoc=t.state.doc}move(t){if(t.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}t.preventDefault(),Ga(this.view,"pointer");let n=this.view.posAtCoords(ng(t)),i=n&&$P(this.view,n.inside,!1);if(!i)return;let{doc:s}=this.view.state,o=this.startSelection,[r,l]=i.from<o.from?[o.to,i.from]:[o.from,i.to];ig(this.view,Yi.create(s,r,l))}}Ql.touchstart=e=>{e.input.lastTouch=Date.now(),W7(e),Ga(e,"pointer")};Ql.touchmove=e=>{e.input.lastTouch=Date.now(),Ga(e,"pointer")};Ql.contextmenu=e=>W7(e);function RP(e,t){return e.composing?!0:rf&&Math.abs(Date.now()-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const RFe=tg?5e3:-1;Jr.compositionstart=Jr.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Yi&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)||Fc&&xP&&OFe(e)))e.markCursor=e.state.storedMarks||n.marks(),ry(e,!0),e.markCursor=null;else if(ry(e,!t.selection.empty),y9&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let i=e.domSelectionRange();for(let s=i.focusNode,o=i.focusOffset;s&&s.nodeType==1&&o!=0;){let r=o<0?s.lastChild:s.childNodes[o-1];if(!r)break;if(r.nodeType==3){let l=e.domSelection();l&&l.collapse(r,r.nodeValue.length);break}else s=r,o=-1}}e.input.composing=!0}OP(e,RFe)};function OFe(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let i=t.childNodes[n];return i.nodeType==1&&i.contentEditable=="false"}Jr.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,OP(e,20))};function OP(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>ry(e),t))}function PFe(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function ry(e,t=!1){if(!(tg&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),PFe(e),t||e.docView&&e.docView.dirty){let n=dFe(e),i=e.state.selection;return n&&!n.eq(i)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!i.$from.node(i.$from.sharedDepth(i.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function jFe(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),s=document.createRange();s.selectNodeContents(t),e.dom.blur(),i.removeAllRanges(),i.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const x0=eg&&CP<15||O7&&cFe<604;Ql.copy=Jr.cut=(e,t)=>{let n=t,i=e.state.selection,s=n.type=="cut";if(i.empty)return;let o=x0?null:n.clipboardData,r=i.content(),{dom:l,text:a}=MP(e,r);o?(n.preventDefault(),o.clearData(),o.setData("text/html",l.innerHTML),o.setData("text/plain",a)):jFe(e,l),s&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function HFe(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function WFe(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,i=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let s=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),i.parentNode&&i.parentNode.removeChild(i),n?G8(e,i.value,null,s,t):G8(e,i.textContent,i.innerHTML,s,t)},50)}function G8(e,t,n,i,s){let o=EP(e,t,n,i,e.state.selection.$from);if(e.someProp("handlePaste",a=>a(e,s,o||Hn.empty)))return!0;if(!o)return!1;let r=HFe(o),l=r?e.state.tr.replaceSelectionWith(r,i):e.state.tr.replaceSelection(o);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function PP(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Jr.paste=(e,t)=>{let n=t;if(e.composing&&!tg)return;let i=x0?null:n.clipboardData,s=e.input.shiftKey&&e.input.lastKeyCode!=45;i&&G8(e,PP(i),i.getData("text/html"),s,n)?n.preventDefault():WFe(e,n)};class qFe{constructor(t,n,i){this.slice=t,this.move=n,this.node=i}}const UFe=ul?"altKey":"ctrlKey";function jP(e,t){let n;return e.someProp("dragCopies",i=>{n=n||i(t)}),n!=null?!n:!t[UFe]}Ql.dragstart=(e,t)=>{let n=t,i=e.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let s=e.state.selection,o=s.empty?null:e.posAtCoords(ng(n)),r;if(!(o&&o.pos>=s.from&&o.pos<=(s instanceof li?s.to-1:s.to))){if(i&&i.mightDrag)r=li.create(e.state.doc,i.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=e.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=e.docView&&(r=li.create(e.state.doc,d.posBefore))}}let l=(r||e.state.selection).content(),{dom:a,text:u,slice:c}=MP(e,l);(!n.dataTransfer.files.length||!Fc||wP>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(x0?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",x0||n.dataTransfer.setData("text/plain",u),e.dragging=new qFe(c,jP(e,n),r)};Ql.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Jr.dragover=Jr.dragenter=(e,t)=>t.preventDefault();Jr.drop=(e,t)=>{try{KFe(e,t,e.dragging)}finally{e.dragging=null}};function KFe(e,t,n){if(!t.dataTransfer)return;let i=e.posAtCoords(ng(t));if(!i)return;let s=e.state.doc.resolve(i.pos),o=n&&n.slice;o?e.someProp("transformPasted",h=>{o=h(o,e,!1)}):o=EP(e,PP(t.dataTransfer),x0?null:t.dataTransfer.getData("text/html"),!1,s);let r=!!(n&&jP(e,t));if(e.someProp("handleDrop",h=>h(e,t,o||Hn.empty,r))){t.preventDefault();return}if(!o)return;t.preventDefault();let l=o?GNe(e.state.doc,s.pos,o):s.pos;l==null&&(l=s.pos);let a=e.state.tr;if(r){let{node:h}=n;h?h.replace(a):a.deleteSelection()}let u=a.mapping.map(l),c=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=a.doc;if(c?a.replaceRangeWith(u,u,o.content.firstChild):a.replaceRange(u,u,o),a.doc.eq(d))return;let f=a.doc.resolve(u);if(c&&li.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))a.setSelection(new li(f));else{let h=a.mapping.map(l);a.mapping.maps[a.mapping.maps.length-1].forEach((g,m,y,A)=>h=A),a.setSelection(_P(e,f,a.doc.resolve(h)))}e.focus(),e.dispatch(a.setMeta("uiEvent","drop"))}Ql.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&j7(e)},20))};Ql.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Ql.beforeinput=(e,t)=>{if(tg&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:i}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=i||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",o=>o(e,bP(8,"Backspace")))))return;let{$cursor:s}=e.state.selection;s&&s.pos>0&&e.dispatch(e.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let e in Jr)Ql[e]=Jr[e];function S0(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class ly{constructor(t,n){this.toDOM=t,this.spec=n||Bd,this.side=this.spec.side||0}map(t,n,i,s){let{pos:o,deleted:r}=t.mapResult(n.from+s,this.side<0?-1:1);return r?null:new pa(o-i,o-i,this)}valid(){return!0}eq(t){return this==t||t instanceof ly&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&S0(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class tc{constructor(t,n){this.attrs=t,this.spec=n||Bd}map(t,n,i,s){let o=t.map(n.from+s,this.spec.inclusiveStart?-1:1)-i,r=t.map(n.to+s,this.spec.inclusiveEnd?1:-1)-i;return o>=r?null:new pa(o,r,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof tc&&S0(this.attrs,t.attrs)&&S0(this.spec,t.spec)}static is(t){return t.type instanceof tc}destroy(){}}class q7{constructor(t,n){this.attrs=t,this.spec=n||Bd}map(t,n,i,s){let o=t.mapResult(n.from+s,1);if(o.deleted)return null;let r=t.mapResult(n.to+s,-1);return r.deleted||r.pos<=o.pos?null:new pa(o.pos-i,r.pos-i,this)}valid(t,n){let{index:i,offset:s}=t.content.findIndex(n.from),o;return s==n.from&&!(o=t.child(i)).isText&&s+o.nodeSize==n.to}eq(t){return this==t||t instanceof q7&&S0(this.attrs,t.attrs)&&S0(this.spec,t.spec)}destroy(){}}class pa{constructor(t,n,i){this.from=t,this.to=n,this.type=i}copy(t,n){return new pa(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,i){return this.type.map(t,this,n,i)}static widget(t,n,i){return new pa(t,t,new ly(n,i))}static inline(t,n,i,s){return new pa(t,n,new tc(i,s))}static node(t,n,i,s){return new pa(t,n,new q7(i,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof tc}get widget(){return this.type instanceof ly}}const Kf=[],Bd={};class lo{constructor(t,n){this.local=t.length?t:Kf,this.children=n.length?n:Kf}static create(t,n){return n.length?ay(n,t,0,Bd):Xo}find(t,n,i){let s=[];return this.findInner(t??0,n??1e9,s,0,i),s}findInner(t,n,i,s,o){for(let r=0;r<this.local.length;r++){let l=this.local[r];l.from<=n&&l.to>=t&&(!o||o(l.spec))&&i.push(l.copy(l.from+s,l.to+s))}for(let r=0;r<this.children.length;r+=3)if(this.children[r]<n&&this.children[r+1]>t){let l=this.children[r]+1;this.children[r+2].findInner(t-l,n-l,i,s+l,o)}}map(t,n,i){return this==Xo||t.maps.length==0?this:this.mapInner(t,n,0,0,i||Bd)}mapInner(t,n,i,s,o){let r;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(t,i,s);a&&a.type.valid(n,a)?(r||(r=[])).push(a):o.onRemove&&o.onRemove(this.local[l].spec)}return this.children.length?VFe(this.children,r||[],t,n,i,s,o):r?new lo(r.sort(zd),Kf):Xo}add(t,n){return n.length?this==Xo?lo.create(t,n):this.addInner(t,n,0):this}addInner(t,n,i){let s,o=0;t.forEach((l,a)=>{let u=a+i,c;if(c=WP(n,l,u)){for(s||(s=this.children.slice());o<s.length&&s[o]<a;)o+=3;s[o]==a?s[o+2]=s[o+2].addInner(l,c,u+1):s.splice(o,0,a,a+l.nodeSize,ay(c,l,u+1,Bd)),o+=3}});let r=HP(o?qP(n):n,-i);for(let l=0;l<r.length;l++)r[l].type.valid(t,r[l])||r.splice(l--,1);return new lo(r.length?this.local.concat(r).sort(zd):this.local,s||this.children)}remove(t){return t.length==0||this==Xo?this:this.removeInner(t,0)}removeInner(t,n){let i=this.children,s=this.local;for(let o=0;o<i.length;o+=3){let r,l=i[o]+n,a=i[o+1]+n;for(let c=0,d;c<t.length;c++)(d=t[c])&&d.from>l&&d.to<a&&(t[c]=null,(r||(r=[])).push(d));if(!r)continue;i==this.children&&(i=this.children.slice());let u=i[o+2].removeInner(r,l+1);u!=Xo?i[o+2]=u:(i.splice(o,3),o-=3)}if(s.length){for(let o=0,r;o<t.length;o++)if(r=t[o])for(let l=0;l<s.length;l++)s[l].eq(r,n)&&(s==this.local&&(s=this.local.slice()),s.splice(l--,1))}return i==this.children&&s==this.local?this:s.length||i.length?new lo(s,i):Xo}forChild(t,n){if(this==Xo)return this;if(n.isLeaf)return lo.empty;let i,s;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=t){this.children[l]==t&&(i=this.children[l+2]);break}let o=t+1,r=o+n.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<r&&a.to>o&&a.type instanceof tc){let u=Math.max(o,a.from)-o,c=Math.min(r,a.to)-o;u<c&&(s||(s=[])).push(a.copy(u,c))}}if(s){let l=new lo(s.sort(zd),Kf);return i?new gd([l,i]):l}return i||Xo}eq(t){if(this==t)return!0;if(!(t instanceof lo)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return U7(this.localsInner(t))}localsInner(t){if(this==Xo)return Kf;if(t.inlineContent||!this.local.some(tc.is))return this.local;let n=[];for(let i=0;i<this.local.length;i++)this.local[i].type instanceof tc||n.push(this.local[i]);return n}forEachSet(t){t(this)}}lo.empty=new lo([],[]);lo.removeOverlap=U7;const Xo=lo.empty;class gd{constructor(t){this.members=t}map(t,n){const i=this.members.map(s=>s.map(t,n,Bd));return gd.from(i)}forChild(t,n){if(n.isLeaf)return lo.empty;let i=[];for(let s=0;s<this.members.length;s++){let o=this.members[s].forChild(t,n);o!=Xo&&(o instanceof gd?i=i.concat(o.members):i.push(o))}return gd.from(i)}eq(t){if(!(t instanceof gd)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,i=!0;for(let s=0;s<this.members.length;s++){let o=this.members[s].localsInner(t);if(o.length)if(!n)n=o;else{i&&(n=n.slice(),i=!1);for(let r=0;r<o.length;r++)n.push(o[r])}}return n?U7(i?n:n.sort(zd)):Kf}static from(t){switch(t.length){case 0:return Xo;case 1:return t[0];default:return new gd(t.every(n=>n instanceof lo)?t:t.reduce((n,i)=>n.concat(i instanceof lo?i:i.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function VFe(e,t,n,i,s,o,r){let l=e.slice();for(let u=0,c=o;u<n.maps.length;u++){let d=0;n.maps[u].forEach((f,h,g,m)=>{let y=m-g-(h-f);for(let A=0;A<l.length;A+=3){let b=l[A+1];if(b<0||f>b+c-d)continue;let C=l[A]+c-d;h>=C?l[A+1]=f<=C?-2:-1:f>=c&&y&&(l[A]+=y,l[A+1]+=y)}d+=y}),c=n.maps[u].map(c,-1)}let a=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){a=!0,l[u+1]=-1;continue}let c=n.map(e[u]+o),d=c-s;if(d<0||d>=i.content.size){a=!0;continue}let f=n.map(e[u+1]+o,-1),h=f-s,{index:g,offset:m}=i.content.findIndex(d),y=i.maybeChild(g);if(y&&m==d&&m+y.nodeSize==h){let A=l[u+2].mapInner(n,y,c+1,e[u]+o+1,r);A!=Xo?(l[u]=d,l[u+1]=h,l[u+2]=A):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=ZFe(l,e,t,n,s,o,r),c=ay(u,i,0,r);t=c.local;for(let d=0;d<l.length;d+=3)l[d+1]<0&&(l.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let h=c.children[d];for(;f<l.length&&l[f]<h;)f+=3;l.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new lo(t.sort(zd),l)}function HP(e,t){if(!t||!e.length)return e;let n=[];for(let i=0;i<e.length;i++){let s=e[i];n.push(new pa(s.from+t,s.to+t,s.type))}return n}function ZFe(e,t,n,i,s,o,r){function l(a,u){for(let c=0;c<a.local.length;c++){let d=a.local[c].map(i,s,u);d?n.push(d):r.onRemove&&r.onRemove(a.local[c].spec)}for(let c=0;c<a.children.length;c+=3)l(a.children[c+2],a.children[c]+u+1)}for(let a=0;a<e.length;a+=3)e[a+1]==-1&&l(e[a+2],t[a]+o+1);return n}function WP(e,t,n){if(t.isLeaf)return null;let i=n+t.nodeSize,s=null;for(let o=0,r;o<e.length;o++)(r=e[o])&&r.from>n&&r.to<i&&((s||(s=[])).push(r),e[o]=null);return s}function qP(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function ay(e,t,n,i){let s=[],o=!1;t.forEach((l,a)=>{let u=WP(e,l,a+n);if(u){o=!0;let c=ay(u,l,n+a+1,i);c!=Xo&&s.push(a,a+l.nodeSize,c)}});let r=HP(o?qP(e):e,-n).sort(zd);for(let l=0;l<r.length;l++)r[l].type.valid(t,r[l])||(i.onRemove&&i.onRemove(r[l].spec),r.splice(l--,1));return r.length||s.length?new lo(r,s):Xo}function zd(e,t){return e.from-t.from||e.to-t.to}function U7(e){let t=e;for(let n=0;n<t.length-1;n++){let i=t[n];if(i.from!=i.to)for(let s=n+1;s<t.length;s++){let o=t[s];if(o.from==i.from){o.to!=i.to&&(t==e&&(t=e.slice()),t[s]=o.copy(o.from,i.to),pT(t,s+1,o.copy(i.to,o.to)));continue}else{o.from<i.to&&(t==e&&(t=e.slice()),t[n]=i.copy(i.from,o.from),pT(t,s,i.copy(o.from,i.to)));break}}}return t}function pT(e,t,n){for(;t<e.length&&zd(n,e[t])>0;)t++;e.splice(t,0,n)}const GFe={sm:14,md:16,lg:20},QFe={file:Gb,folder:yB,skill:bB,copy:vB,check:mB,"external-link":kB};function Dh(e,t="md"){const n=GFe[t];return QFe[e].replace(/<svg\b[^>]*>/,i=>i.replace(/\s(?:width|height)="[^"]*"/g,"")).replace(/^<svg\b/,`<svg class="kw-icon" width="${n}" height="${n}" aria-hidden="true"`)}const YFe=Dh("folder","sm"),JFe=Dh("file","sm"),XFe=Dh("skill","sm");function K7(e,t,n){return n||e.endsWith("/")?YFe:JFe}function k9(e,t,n){return e==="skill"?XFe:K7(t,n,e==="folder")}const gk=32;let gT;function mT(e){return gT??=new Intl.Segmenter("und",{granularity:"grapheme"}),[...gT.segment(e)].map(t=>t.segment)}function UP(e){const t=mT(e);if(t.length<=gk)return e;const n=e.lastIndexOf("."),s=(n>0?mT(e.slice(n)):[]).length+4,o=gk-1-s;return o<8?`${t.slice(0,gk-1).join("")}…`:`${t.slice(0,o).join("")}…${t.slice(t.length-s).join("")}`}new JNe({props:{decorations(e){const t=[];return e.doc.forEach((n,i)=>{const s=n.lastChild;if(s&&s.type===oFe.nodes.mention){const o=i+n.nodeSize-1;t.push(pa.widget(o,()=>{const r=document.createElement("span");return r.className="mention-caret-anchor",r.textContent="​",r},{side:1,key:`mention-caret-anchor-${o}`}))}}),lo.create(e.doc,t)}}});function eDe(e){let t=new Set;const n=()=>{const i=e();if(!i)return;const s=i.ownerDocument?.getSelection?.()??document.getSelection(),o=s&&s.rangeCount>0&&!s.isCollapsed?s.getRangeAt(0):null;let r=!1;if(o&&i instanceof Node)try{r=o.intersectsNode(i)}catch{r=!1}if(!o||!r){for(const a of t)a.classList.remove("pill-in-selection");t=new Set;return}const l=new Set;for(const a of i.querySelectorAll(".mention-pill"))try{o.intersectsNode(a)&&l.add(a)}catch{}for(const a of l)t.has(a)||a.classList.add("pill-in-selection");for(const a of t)l.has(a)||a.classList.remove("pill-in-selection");t=l};return document.addEventListener("selectionchange",n),()=>document.removeEventListener("selectionchange",n)}function sg(e,t){let n;return()=>{if(n===void 0){const i=getComputedStyle(document.documentElement).getPropertyValue(e).trim(),s=parseFloat(i);n=Number.isFinite(s)?s:t}return n}}const tDe=sg("--space-1-5",6),nDe=sg("--p-mention-tip-vmargin",12),iDe=sg("--duration-tooltip",150),sDe=sg("--duration-fast",120),oDe=sg("--duration-flash",1e3),rDe=3e4;function lDe(e,t={}){const n=document.createElement("div");n.className="mention-tip-path";const i=document.createElement("div");i.className="mention-tip-path-text";const s=e.split(/([/\\])/);let o=s.length-1;for(;o>0&&(s[o]===""||s[o]==="/"||s[o]==="\\");)o--;for(let a=0;a<s.length;a++){const u=s[a]??"";if(u==="")continue;const c=document.createElement("span");if(u==="/"||u==="\\"){c.className="mention-tip-sep",c.textContent=u,i.append(c,document.createElement("wbr"));continue}a===o&&(c.className="mention-tip-base"),c.textContent=u,i.append(c)}n.append(i);const r=document.createElement("button");r.type="button",r.className="mention-tip-copy",r.setAttribute("aria-label",t.copyLabel??"Copy path");const l=Dh("copy","sm");return r.innerHTML=l,r.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),(async()=>await ao(e)&&(r.innerHTML=Dh("check","sm"),window.setTimeout(()=>{r.innerHTML=l},oDe())))()}),n.append(r),n}function aDe(e,t={}){const n=document.createElement("div");n.className="mention-tip-skill";const i=document.createElement("div");i.className="mention-tip-head";const s=document.createElement("span");if(s.className="mention-tip-name",s.textContent=e.name,i.append(s),e.path&&t.onOpen){const o=document.createElement("button");o.type="button",o.className="mention-tip-open",o.setAttribute("aria-label",t.openLabel??"Open skill file"),o.innerHTML=Dh("external-link","sm");const r=e.path,l=t.onOpen;o.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),l(r)}),i.append(o)}if(n.append(i),e.description){const o=document.createElement("div");o.className="mention-tip-desc",o.textContent=e.description,n.append(o)}return n}function Pm(e){const t=e.dataset.mentionKind??(e.classList.contains("mention-skill")?"skill":e.classList.contains("mention-folder")?"folder":"file"),n=e.dataset.mentionName??e.querySelector(".mention-pill-name")?.textContent??"";return{kind:t,name:n,path:e.dataset.mentionPath??""}}function uDe(e){let t=null,n=null,i=null,s=null,o,r,l;const a=new Map,u=new Map;function c(O){const P=a.get(O);return P!==void 0&&Date.now()-P<rDe}function d(O,P){for(const R of document.querySelectorAll(".mention-pill"))(R.dataset.mentionActionPath??R.dataset.mentionPath??"")===O&&R.classList.toggle("mention-missing",P)}function f(O,P,R){if(!e.probePath||O==="")return;const q=e.probeScope?.()??"",j=R??O,W=`${q}|${j}`;if(c(W))return;s=W;let z=u.get(W);z===void 0&&(z=(async()=>{try{const H=await e.probePath?.(j,P);return(e.probeScope?.()??"")!==q?!1:(H===!1?d(j,!0):(a.set(W,Date.now()),d(j,!1)),!0)}finally{u.delete(W)}})(),u.set(W,z)),z.then(H=>{H&&s===W&&t?.querySelector(".mention-tip-spinner")?.remove()})}function h(O){e.skillsLoaded?.()!==!1&&(O.tabIndex=-1,O.removeAttribute("role"),O.hasAttribute("href")&&(O.dataset.mentionHref=O.getAttribute("href")??"",O.removeAttribute("href"))),O.classList.add("mention-inert")}function g(O){const P=Pm(O);if(P.kind==="skill"){const R=e.resolveSkill?.(P.name);return!R?.path||!e.openPath?h(O):O.classList.contains("mention-inert")&&!O.closest(".q-body")&&(O.tabIndex=0,O.setAttribute("role","button"),O.dataset.mentionHref!==void 0&&(O.setAttribute("href",O.dataset.mentionHref),delete O.dataset.mentionHref),O.classList.remove("mention-inert")),aDe(R??{name:P.name,description:""},{openLabel:e.openSkillLabel?.(),onOpen:R?.path&&e.openPath?q=>{A(),e.openPath?.({path:q})}:void 0})}return lDe(P.path!==""?P.path:P.name,{copyLabel:e.copyPathLabel?.()})}function m(O){if(!t)return;const P=O.getBoundingClientRect(),R=t.offsetWidth,q=t.offsetHeight,j=tDe(),W=nDe();let z=P.top-j-q;z<W&&(z=P.bottom+j),z=Math.min(Math.max(z,W),Math.max(W,window.innerHeight-W-q));const H=Math.min(Math.max(P.left+P.width/2-R/2,W),Math.max(W,window.innerWidth-W-R));t.style.top=`${Math.round(z)}px`,t.style.left=`${Math.round(H)}px`}function y(O){t||(t=document.createElement("div"),t.className="mention-tip",t.id="mention-tip",t.setAttribute("role","tooltip"),t.addEventListener("mouseenter",()=>window.clearTimeout(r)),t.addEventListener("mouseleave",()=>C()),t.addEventListener("focusin",()=>window.clearTimeout(r)),t.addEventListener("focusout",R=>{const q=R.relatedTarget;q instanceof Node&&(t?.contains(q)||n?.contains(q))||A()}),document.body.append(t)),n?.removeAttribute("aria-describedby"),n=O,n.setAttribute("aria-describedby",t.id);const P=Pm(O);if(i=P.kind!=="skill"&&P.path!==""?P.path:null,s=null,t.replaceChildren(g(O)),t.classList.remove("positioned"),m(O),t.classList.add("positioned"),t.removeAttribute("inert"),i!==null&&e.probePath){const R=O.dataset.mentionActionPath??i,q=`${e.probeScope?.()??""}|${R}`;if(!c(q)){const j=document.createElement("span");j.className="mention-tip-spinner",j.setAttribute("aria-hidden","true"),(t.querySelector(".mention-tip-path-text")??t).append(j),f(i,P.kind==="folder"?"folder":"file",O.dataset.mentionActionPath)}}l??=new MutationObserver(()=>{n&&!n.isConnected&&A()}),l.disconnect(),l.observe(document.body,{childList:!0,subtree:!0})}function A(){window.clearTimeout(o),window.clearTimeout(r),n?.removeAttribute("aria-describedby"),n=null,i=null,s=null,l?.disconnect(),t?.classList.remove("positioned"),t?.setAttribute("inert","")}function b(O){window.clearTimeout(o),window.clearTimeout(r);const P=t?.classList.contains("positioned")?0:iDe();o=window.setTimeout(()=>{O.isConnected&&y(O)},P)}function C(){window.clearTimeout(o),window.clearTimeout(r),r=window.setTimeout(A,sDe())}function v(O){return O instanceof Element?O.closest(".mention-pill"):null}function x(O){const P=v(O.target);if(!P)return;if(P===n){window.clearTimeout(r);return}const R=O.relatedTarget;R instanceof Element&&P.contains(R)||b(P)}function S(O){const P=v(O.target);if(!P)return;const R=O.relatedTarget;R instanceof Element&&(P.contains(R)||t?.contains(R))||C()}function _(O){if(O.key==="Enter"||O.key===" "){const P=v(O.target);if(P&&$(P,O))return}if(O.key==="Escape"){t?.classList.contains("positioned")&&(n&&O.target instanceof Node&&t.contains(O.target)&&n.focus(),A(),O.preventDefault(),O.stopImmediatePropagation());return}if(O.key==="Tab"){if(t?.classList.contains("positioned")&&O.target instanceof Node&&t.contains(O.target)){const R=[...t.querySelectorAll("button")],q=R[0],j=R[R.length-1];(!O.shiftKey&&O.target===j||O.shiftKey&&O.target===q)&&(O.preventDefault(),n?.focus(),A());return}if(O.shiftKey)return;if(v(O.target)===n&&t?.classList.contains("positioned")){const R=t.querySelector("button");R&&(O.preventDefault(),R.focus())}return}t&&O.target instanceof Node&&t.contains(O.target)||t?.contains(document.activeElement)||A()}function I(){A()}function M(O){t&&O.target instanceof Node&&t.contains(O.target)||A()}function $(O,P){if(O.closest(".ProseMirror")||O.closest(".q-body")||Pm(O).kind!=="skill")return!1;const R=e.resolveSkill?.(Pm(O).name);return!R?.path||!e.openPath?(h(O),!1):(P.preventDefault(),P.stopPropagation(),A(),e.openPath({path:R.path}),!0)}function D(O){const P=v(O.target);if(P){if(P===n){window.clearTimeout(r);return}b(P)}}function T(O){if(!v(O.target))return;const R=O.relatedTarget;R instanceof Node&&t?.contains(R)||C()}function N(O){const P=v(O.target);P&&$(P,O)}return document.addEventListener("mouseover",x),document.addEventListener("mouseout",S),document.addEventListener("focusin",D),document.addEventListener("focusout",T),document.addEventListener("keydown",_,!0),document.addEventListener("scroll",I,!0),document.addEventListener("pointerdown",M),document.addEventListener("click",N,!0),window.addEventListener("resize",I),()=>{A(),t?.remove(),t=null,document.removeEventListener("mouseover",x),document.removeEventListener("mouseout",S),document.removeEventListener("focusin",D),document.removeEventListener("focusout",T),document.removeEventListener("keydown",_,!0),document.removeEventListener("scroll",I,!0),document.removeEventListener("pointerdown",M),document.removeEventListener("click",N,!0),window.removeEventListener("resize",I)}}const cDe=["data-mention-kind","data-mention-name","data-mention-path","data-mention-action-path","onClick","onKeydown"],dDe=["innerHTML"],fDe={class:"mention-pill-name"},vT=Qe({__name:"ComposerText",props:{text:{},interactive:{type:Boolean,default:!0},openFile:{type:Function,default:void 0}},setup(e){const t=e,n=L(()=>lFe(t.text));function i(a){return!t.interactive||a.kind==="folder"?{}:a.kind==="skill"?{tabindex:0,role:"button"}:t.openFile?{tabindex:0,role:"button"}:{}}function s(a){if(a.type!=="mention"||a.attrs.kind==="skill")return;const u=Uf(rp(a.rawDest));return u!==a.attrs.path?u:void 0}function o(a,u){a.type!=="mention"||!t.interactive||a.attrs.kind!=="file"||!t.openFile||(u.preventDefault(),u.stopPropagation(),t.openFile({path:s(a)??a.attrs.path}))}function r(a,u){u.key!=="Enter"&&u.key!==" "||o(a,u)}function l(a){const u=window.getSelection(),c=a.currentTarget;if(!u||u.isCollapsed||u.rangeCount===0||!c)return;const d=u.getRangeAt(0);if(!c.contains(d.commonAncestorContainer))return;const f=d.cloneContents();for(const h of f.querySelectorAll(".mention-pill")){const g=h.getAttribute("data-mention-kind");if(g!=="file"&&g!=="folder"&&g!=="skill")continue;const m=h.getAttribute("data-mention-name")??"",y=h.getAttribute("data-mention-path")??"";h.replaceWith(document.createTextNode(vP({kind:g,name:m,path:y})))}a.clipboardData?.setData("text/plain",f.textContent??""),a.preventDefault()}return(a,u)=>(k(),E("span",{class:"composer-text",onCopy:l},[(k(!0),E(Te,null,ht(n.value,(c,d)=>(k(),E(Te,{key:d},[c.type==="mention"?(k(),E("span",Un({key:0,class:`mention-pill mention-${c.attrs.kind}`,"data-mention-kind":c.attrs.kind,"data-mention-name":c.attrs.name,"data-mention-path":c.attrs.path||void 0,"data-mention-action-path":s(c)},{ref_for:!0},i(c.attrs),{onClick:f=>o(c,f),onKeydown:f=>r(c,f)}),[w("span",{class:"mention-pill-icon","aria-hidden":"true",innerHTML:p(k9)(c.attrs.kind,c.attrs.path,c.attrs.name)},null,8,dDe),w("span",fDe,F(p(UP)(c.attrs.name)),1)],16,cDe)):(k(),E(Te,{key:1},[$e(F(c.value),1)],64))],64))),128))],32))}}),KP=["cjs","css","csv","gif","htm","html","jpeg","jpg","js","json","jsx","log","md","mjs","pdf","png","scss","svg","ts","tsx","txt","vue","webp","xml","yaml","yml"],hDe=new Set(["AGENTS.md","CHANGELOG.md","Dockerfile","LICENSE","Makefile","README.md","package.json","pnpm-lock.yaml","pnpm-workspace.yaml","tsconfig.json","vite.config.ts"]),Q8=[...KP].sort((e,t)=>t.length-e.length).join("|"),mk=new RegExp([String.raw`(?:^|[\s([{"'`+"`"+String.raw`])`,String.raw`(`,String.raw`(?:~|\.{1,2}|/)?(?:[A-Za-z0-9_.@+()[\]-]+/)+[A-Za-z0-9_.@+()[\]-]+(?:\.(?:${Q8}))?`,String.raw`|`,String.raw`[A-Za-z0-9_.@+()[\]-]+\.(?:${Q8})`,String.raw`)`,String.raw`(?:#L?(\d+)|:(\d+))?`,String.raw`(?=$|[\s)"'\]}>.,;!?,。;!?)])`].join(""),"gi"),VP=/[),.;!?,。;!?)]+$/;function pDe(e){const t=e.toLowerCase();return KP.some(n=>t.endsWith(`.${n}`))}function gDe(e){const t=new Map,n=new RegExp(String.raw`\b(?:path|src)=["'](\/[^"']+\.(?:${Q8}))["']`,"gi");let i;for(;(i=n.exec(e))!==null;){const s=i[1];if(!s)continue;const o=s.split("/").pop();o&&t.set(o,s)}return t}function mDe(e,t={}){const n=e.trim();if(!n||/^[a-z][a-z0-9+.-]*:\/\//i.test(n))return null;const i=n.match(/^(.*?)(?:#L?(\d+)|:(\d+))?$/i);if(!i)return null;let s=(i[1]??"").replace(VP,"");if(!s)return null;const o=s.split("/").pop()??s,r=s.includes("/"),l=hDe.has(o),a=pDe(o);if(r&&!l&&!a)return null;if(!r&&!l){const d=t.aliases?.get(o);if(!d)return null;s=d}const u=i[2]??i[3],c=u?Number(u):void 0;return{path:s,line:c!==void 0&&Number.isFinite(c)&&c>0?c:void 0}}function vDe(e,t={}){const n=[];mk.lastIndex=0;let i;for(;(i=mk.exec(e))!==null;){const s=i[0]??"",o=i[1]??"",r=s.indexOf(o);if(r<0)continue;const l=i[2]??i[3];let a=o+(l?s.slice(r+o.length):"");const u=a.replace(VP,""),c=a.length-u.length;a=u;const d=mDe(a,t);if(!d)continue;const f=i.index+r,h=f+a.length;n.push({...d,start:f,end:h,text:a}),c>0&&(mk.lastIndex-=c)}return n}const yDe=/^---[ \t]*$/,kDe=/^---[ \t]*(?:\r\n|\n)/;function bDe(e){const t=kDe.exec(e);if(t===null)return{frontmatter:null,body:e};let n=t[0].length;const i=n;for(;n<=e.length;){let s=e.indexOf(` +`,n);s===-1&&(s=e.length);let o=e.slice(n,s);if(o.endsWith("\r")&&(o=o.slice(0,-1)),yDe.test(o)){const r=e.slice(i,n);if(r==="")return{frontmatter:null,body:e};const l=s<e.length?e.slice(s+1):"";return{frontmatter:r,body:l}}if(s===e.length)break;n=s+1}return{frontmatter:null,body:e}}function jm(e,t){let n=0,i=t-1;for(;i>=0&&e[i]==="\\";)n++,i--;return n%2===1}const ADe=/\s/,CDe=/\p{Nd}/u;function Qd(e,t){const n=e.codePointAt(t);return n===void 0?void 0:String.fromCodePoint(n)}function wDe(e,t){if(t<=0)return;const n=e.charCodeAt(t-1),i=n>=56320&&n<=57343&&t>1?t-2:t-1,s=e.codePointAt(i);return s===void 0?void 0:String.fromCodePoint(s)}function yT(e){return e!==void 0&&ADe.test(e)}function $h(e){return e!==void 0&&CDe.test(e)}function xDe(e,t){const n=e[t+1];return $h(Qd(e,t+1))?!0:(n==="-"||n==="+"||n==="."||n==="−"||n==="+"||n==="-")&&$h(Qd(e,t+2))}function uy(e){return e!==void 0&&e>="A"&&e<="Z"}const ZP=new RegExp(String.raw`^(?:AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHF|CLF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SLL|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VED|VES|VND|VUV|WST|XAF|XCD|XOF|XPF|YER|ZAR|ZMW|ZWL|HK|US|SG|AU|CA|NZ|NT|TW|RMB|MEX|TT|BZ|EU|UK)$`);function SDe(e,t){if(!uy(e[t-1]))return!1;let n=t-1;for(;n>0&&uy(e[n-1]);)n--;return ZP.test(e.slice(n,t))||$h(Qd(e,t+1))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")&&!/\p{L}/u.test(Qd(e,t+1)??"")}function _De(e,t){if(!uy(e[t-1]))return!1;let n=t-1;for(;n>0&&uy(e[n-1]);)n--;return ZP.test(e.slice(n,t))?!0:t-n<=2&&!/[\p{L}\p{Nd}]/u.test(e[n-1]??"")}const IDe=/^[-–—,,、;;::~~(([【//]$/;function MDe(e,t){const n=e[t+1];if(n!=="-"&&n!=="+"&&n!=="."||!$h(Qd(e,t+2)))return!1;const i=e[t-1];return i!==void 0&&IDe.test(i)}function EDe(e){const t=String.raw`[、,,;;::~~\-–—至到//\s()()=*×=]|和|跟|与|及|或|and|or`;let n=e.replace(new RegExp(String.raw`^(?:${t})+`,"u"),"");for(;;){const s=n.replace(new RegExp(String.raw`^\p{L}+(?:${t})+`,"u"),"").replace(/^[\p{L}][\p{L} ]*(?=\p{Nd})/u,"");if(s===n)break;n=s}if(!/\p{Nd}/u.test(n))return!1;const i=String.raw`[-+]?[\p{Nd}][\p{Nd},.'’]*`;return new RegExp(String.raw`^${i}(?:\p{L}+)?(?:(?:${t})+${i}(?:\p{L}+)?)*$`,"u").test(n)}const sa=-1,kT=1,bT=2,AT=3;function TDe(e){const t=e.length,n=new Uint8Array(t),i=new Int32Array(t+1).fill(sa),s=new Int32Array(t+1),o=new Int32Array(t+1),r=[],l=[];{const j=[];for(let ee=0;ee<t;ee++)if(e[ee]==="`"){if(jm(e,ee))continue;let V=ee+1;for(;V<t&&e[V]==="`";)V++;j.push([ee,V]),ee=V-1}const W=new Map;for(let ee=0;ee<j.length;ee++){const V=j[ee][1]-j[ee][0],ie=W.get(V);ie?ie.push(ee):W.set(V,[ee])}const z=new Map;let H=0;for(;H<j.length;){const[ee,V]=j[H],ie=V-ee,se=W.get(ie);let Z=z.get(ie)??0;for(;Z<se.length&&se[Z]<=H;)Z++;z.set(ie,Z),Z<se.length?(l.push([ee,j[se[Z]][1]]),H=se[Z]+1):H++}}let a=0;const u=j=>{for(;a<l.length&&j>=(l[a]?.[1]??0);)a++;const W=l[a];return W!==void 0&&j>=W[0]},c=new Set(' \n\r)。,、;:!?"<>`「」『』【】〔〕()*—–“”‘’'),d=[];for(const j of e.matchAll(/\b(?:https?:\/\/|ftp:\/\/|mailto:|www\.)/gi))d.push(j.index);for(const j of e.matchAll(/\b(?:localhost|(?:\d{1,3}\.){3}\d{1,3}|[\w-]+(?:\.[\w-]+)*\.[a-zA-Z]{2,})(?=(?:\/|\?|:\d))/gi))d.push(j.index);for(const j of e.matchAll(/(?:\.{1,2})?\/[\p{L}\p{Nd}._-]+(?:\/[\p{L}\p{Nd}._-]*)*\?/gu))(j.index===0||!/[\w~/.-]/.test(e[j.index-1]))&&d.push(j.index);d.sort((j,W)=>j-W);let f=-1;for(const j of d){if(j<f)continue;let W=j,z=0,H=0,ee=0;for(;W<t;){const V=e[W];if(V==="(")z++;else if(V===")"){if(z===0)break;z--}else if(V==="[")H++;else if(V==="]"){if(H===0)break;H--}else if(V==="{")ee++;else if(V==="}"){if(ee===0)break;ee--}else{if(c.has(V))break;if((V===","||V===";"||V==="!"||V==="?")&&!/[A-Za-z0-9$]/.test(e[W+1]??""))break;if(V===":"&&H===0&&W>j+7&&!/[\w/?#@~.+&=%-]/.test(e[W+1]??""))break}W++}r.push([j,W]),f=W}const h=[];for(let j=0;j<t;j++){if(e[j]!=="<"||e[j+1]===void 0||!/[a-zA-Z/]/.test(e[j+1]))continue;let W=j+1;const z=e[W]==="/";z&&W++;const H=/^[a-zA-Z][a-zA-Z0-9-]*/.exec(e.slice(W));if(!H)continue;W+=H[0].length;const ee=e[W];if(ee===void 0||!/[\s/>]/.test(ee))continue;let V=W,ie=sa,se=sa;for(;V<t;){const Z=e[V];if(Z===">"){se=V;break}if(!z&&Z==="/"&&e[V+1]===">"){se=V+1;break}if(!/\s/.test(Z)){ie=V;break}for(;V<t&&/\s/.test(e[V]);)V++;const pe=e[V];if(pe===void 0)break;if(pe===">"){se=V;break}if(z){ie=V;break}if(pe==="/"&&e[V+1]===">"){se=V+1;break}const re=/^[a-zA-Z_:][\w:.-]*/.exec(e.slice(V));if(!re){ie=V;break}V+=re[0].length;let fe=V;for(;fe<t&&/\s/.test(e[fe]);)fe++;if(e[fe]==="="){for(fe++;fe<t&&/\s/.test(e[fe]);)fe++;const Ee=e[fe];if(Ee==='"'||Ee==="'"){const X=e.indexOf(Ee,fe+1);if(X===-1){ie=fe;break}V=X+1}else{const X=/^[^\s"'=<>`]+/.exec(e.slice(fe));if(!X){ie=fe;break}V=fe+X[0].length}}}if(se!==sa)h.push([j,se+1]),j=se;else if(ie!==sa){const Z=e.indexOf("<",j+1);j=(Z!==-1&&Z<ie?Z:ie)-1}else break}let g=!0,m=!0,y=!0,A=!0;for(let j=0;j<t;j++){if(e[j]!=="<")continue;const W=e[j+1];let z=!1;if(W==="?"&&m){const ie=e.indexOf("?>",j+2);ie===-1?m=!1:(h.push([j,ie+2]),j=ie+1,z=!0)}else if(W==="!"){if(e[j+2]==="-"&&e[j+3]==="-"){if(g){const ie=e.indexOf("-->",j+4);ie===-1?g=!1:(h.push([j,ie+3]),j=ie+2,z=!0)}}else if(e.startsWith("[CDATA[",j+2)){if(y){const ie=e.indexOf("]]>",j+9);ie===-1?y=!1:(h.push([j,ie+3]),j=ie+2,z=!0)}}else if(A&&/[A-Z]/.test(e[j+2]??"")){const ie=e.indexOf(">",j+3);ie===-1?A=!1:(h.push([j,ie+1]),j=ie,z=!0)}}if(z)continue;if(W!==void 0&&/[a-zA-Z]/.test(W)){const ie=/^[a-zA-Z][a-zA-Z0-9+.-]{1,31}:/.exec(e.slice(j+1));if(ie){let se=j+1+ie[0].length;for(;se<t&&e[se]!==">"&&e[se]!=="<"&&!/\s/.test(e[se]);)se++;if(e[se]===">"){h.push([j,se+1]),j=se;continue}}}if(W===void 0||!/[\w.!#$%&'*+/=?^`{|}~-]/.test(W))continue;let H=j+1;for(;H<t&&/[\w.!#$%&'*+/=?^`{|}~-]/.test(e[H]);)H++;if(e[H]!=="@")continue;H++;const ee=/^[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?/;let V=ee.exec(e.slice(H));if(V){for(H+=V[0].length;e[H]==="."&&(V=ee.exec(e.slice(H+1)),!!V);)H+=1+V[0].length;e[H]===">"&&(h.push([j,H+1]),j=H)}}h.sort((j,W)=>j[0]-W[0]);const b=[];for(const[j,W]of h){const z=b[b.length-1];z&&j<=z[1]?z[1]=Math.max(z[1],W):b.push([j,W])}r.push(...b);let C=0;const v=j=>{for(;C<b.length&&j>=(b[C]?.[1]??0);)C++;const W=b[C];return W!==void 0&&j>=W[0]},x=[];let S=null,_=0,I=!1;for(let j=0;j<t;j++)if(e[j]==="\\")j++;else if(I)e[j]===">"&&(I=!1);else if(!(u(j)||v(j))){if(S!==null)e[j]===S&&(S=null);else if(x.length>0&&(e[j]==='"'||e[j]==="'")&&j>0&&/\s/.test(e[j-1]))S=e[j];else if(e[j]==="[")_++;else if(e[j]==="]")_>0&&e[j+1]==="("&&(x.push(j),I=e[j+2]==="<",j++),_=Math.max(0,_-1);else if(e[j]==="("&&x.length>0)x.push(-1);else if(e[j]===")"&&x.length>0){const W=x.pop();if(W!==void 0&&W>=0){const z=e.slice(W+2,j);(/\s/.exec(z)===null||z.startsWith("<")&&/^<(?:\\[<>]|[^<>])*>$/.test(z)||/^[^\s]*\s+("([^"\\]|\\.)*"|'([^'\\]|\\.)*'|\(([^()\\]|\\.)*\))$/.test(z))&&r.push([W,j+1])}}}r.sort((j,W)=>j[0]-W[0]);const M=[];for(const[j,W]of r){const z=M[M.length-1];z&&j<=z[1]?z[1]=Math.max(z[1],W):M.push([j,W])}const $=j=>{let W=0,z=M.length-1;for(;W<=z;){const H=W+z>>1,ee=M[H];if(ee===void 0)return!1;if(j<ee[0])z=H-1;else if(j>=ee[1])W=H+1;else return!0}return!1},D=new Uint8Array(t);{let j=-1,W=!1,z=!1,H=0;for(let ee=0;ee<=t;ee++){const V=ee<t&&e[ee]==="`";if(ee===t||V){if(V&&j!==-1&&z&&!W&&H===0)for(let se=j+1;se<ee;se++)D[se]=1;j=ee,W=!1,z=!1,H=0;continue}if(j===-1)continue;const ie=e[ee];ie==="$"?jm(e,ee)||(e[ee+1]==="{"?(z=!0,H++,ee++):H===0&&(W=!0)):H>0&&(ie==="{"?H++:ie==="}"&&H--)}}for(let j=0;j<t;j++)o[j+1]=(o[j]??0)+(e[j]==="`"&&!jm(e,j)?1:0),e[j]==="$"&&(jm(e,j)||$(j)||D[j]===1?n[j]=kT:yT(e[j-1])||$h(Qd(e,j+1))||MDe(e,j)?n[j]=bT:n[j]=AT),s[j+1]=(s[j]??0)+(n[j]===bT?1:0);let T=sa;for(let j=t-1;j>=0;j--)n[j]===AT&&(T=j),i[j]=T;const N=/^[\p{L}\p{Nd}\\|{([+.¬°-±×÷′-″←-⇿∀-⋿^_<>=-]$/u,O=/[^\p{L}\p{Nd}\s]$/u,P=/[^\s\u0020-\u007E\u0370-\u03FF\u{1D400}-\u{1D7FF}\p{Nd}¬°-±×÷′-″←-⇿∀-⋿]/u,R=/(?:^|\s)[a-z]{2,}/,q=(j,W)=>{const z=Qd(e,j+1);if(z===void 0||!N.test(z))return!1;const H=i[j+1]??sa;if(H!==sa){const ee=e.slice(j+1,H);return!(ee.length===((ee.codePointAt(0)??0)>65535?2:1))&&P.test(ee)||/[,;:!?]$/.test(ee)||/^[a-z]{2,}$/.test(ee)?!1:(s[H]??0)-(s[j+1]??0)===0&&(o[H]??0)-(o[j+1]??0)===0}return O.test(W)||P.test(W)||R.test(W)};return(j,W=-1)=>{if(e[j]!=="$"||n[j]===kT||e[j+1]==="$"||e[j-1]==="$"&&W!==j||SDe(e,j)||j+1>=t||yT(e[j+1]))return null;const z=i[j+1]??sa;if(z===sa||(s[z]??0)-(s[j+1]??0)>0||(o[z]??0)-(o[j+1]??0)>0)return null;const H=e.slice(j+1,z);return/^\{[A-Z_][A-Z0-9_]*(?:\}$|[:-])/.test(H)||e[z+1]==="{"&&/^\{[A-Za-z_][A-Za-z0-9_]*(?:[:-][^{}]*)?\}$/.test(H)||$h(wDe(e,j))&&EDe(H)||xDe(e,j)&&(q(z,H)||_De(e,z)||/\s/.test(H)&&/\p{Nd}$/u.test(H)&&!/[+\-*/^=_<>|\\¬°-±×÷′-″←-⇿∀-⋿]/.test(H)||e[z+1]==="$"&&!/\p{L}/u.test(H)&&/[^\p{L}\p{Nd}\s]$/u.test(H))?null:{content:H,end:z+1}}}const CT=new WeakMap;function LDe(e,t){if(e.src[e.pos]!=="$")return!1;let n=CT.get(e);(!n||n.src!==e.src)&&(n={src:e.src,match:TDe(e.src),lastEnd:-1},CT.set(e,n));const i=n.match(e.pos,n.lastEnd);if(!i||i.end>e.posMax)return!1;if(n.lastEnd=i.end,t)return e.pos=i.end,!0;const s=e.push("math_inline","math",0);return s.content=i.content,s.markup="$",s.raw=e.src.slice(e.pos,i.end),s.loading=!1,e.pos=i.end,!0}function NDe(e){return e.set({typographer:!1}),e.inline.ruler.disable("math"),e.inline.ruler.before("escape","math",LDe),e}const FDe=12e4,DDe=6e4,$De=32,BDe=3e4,wT=/(^|\n)(`{3,}|~{3,})[^\n]*\n([\s\S]*?)(?:\n)?\2(?=\n|$)/g;function zDe(e){let t=0,n=0,i=0;wT.lastIndex=0;let s;for(;(s=wT.exec(e))!==null;){const r=s[3]??"";t+=1,n+=r.length,i=Math.max(i,r.length)}return{codeRenderer:e.length>=FDe||n>=DDe||t>=$De||i>=BDe?"pre":"shiki",codeFenceCount:t,codeChars:n}}async function GP(e){const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t&&typeof t.writeText=="function")try{return await t.writeText(e),!0}catch{}return ODe(e)}function RDe(e){if(typeof e!="string")return;const t=typeof navigator<"u"?navigator.clipboard:void 0;t&&typeof t.writeText=="function"||GP(e)}function ODe(e){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",t.style.opacity="0",document.body.appendChild(t);let n=!1;try{t.focus(),t.select(),n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}const QP="md-table-wide",YP="md-table-toggle",JP="md-table-fade",xT="md-table-toggle--show",PDe="md-table-at-end",jDe="kimi-table-layout",XP='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>',HDe='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" y1="10" x2="21" y2="3"/><line x1="3" y1="21" x2="10" y2="14"/></svg>';function og(e){return e.querySelector(`button.${YP}`)}function ej(e){return e.querySelector(`.${JP}`)}const WDe=26;function qDe(e){const t=og(e);if(!t)return;const n=e.querySelector("thead tr")??e.querySelector("tr");if(!n)return;const i=n.getBoundingClientRect(),s=e.getBoundingClientRect().top,o=Math.max(2,Math.round(i.top-s+(i.height-WDe)/2));t.style.top=`${o}px`,t.style.right=`${o}px`}function UDe(e){return e.closest(".a-msg .msg")!==null}function KDe(e){const t=e.querySelector("table");return t!==null&&t.scrollWidth>e.clientWidth+1}function tj(e){const t=`translateX(${e.scrollLeft}px)`,n=ej(e);n&&(n.style.transform=t);const i=og(e);i&&(i.style.transform=t);const s=e.scrollLeft+e.clientWidth>=e.scrollWidth-2;e.classList.toggle(PDe,s)}function VDe(e,t){const n=og(e);if(n)return n;if(!UDe(e))return null;const i=document.createElement("div");i.className=JP,i.setAttribute("aria-hidden","true");const s=document.createElement("button");return s.type="button",s.className=YP,s.innerHTML=XP,s.setAttribute("aria-label",t.widen),s.title=t.widen,s.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),ZDe(e,t)}),e.appendChild(i),e.appendChild(s),e.addEventListener("scroll",()=>tj(e),{passive:!0}),V7(e),s}function ZDe(e,t){const n=e.classList.toggle(QP),i=og(e);if(i){i.innerHTML=n?HDe:XP;const s=n?t.restore:t.widen;i.setAttribute("aria-label",s),i.title=s}V7(e),e.dispatchEvent(new CustomEvent(jDe,{bubbles:!0}))}function V7(e){const t=og(e);if(!t)return;const n=KDe(e),i=e.classList.contains(QP);t.classList.toggle(xT,n||i);const s=ej(e);s&&s.classList.toggle(xT,n),qDe(e),tj(e)}function GDe(e){return new Worker("/assets/katexRenderer.worker-CO_gEm4q.js",{type:"module",name:e?.name})}function QDe(e){return new Worker("/assets/mermaidParser.worker-BFSlSHEW.js",{type:"module",name:e?.name})}const YDe={key:0,class:"md-frontmatter"},JDe={key:1,class:"diff-wrap"},XDe={class:"diff-bar"},e$e=["aria-label","onClick"],t$e={class:"diff-pre"},n$e={key:0,class:"diff-sign"},i$e={class:"diff-text"},s$e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",ST="github-light",_T="github-dark",o$e=Qe({__name:"Markdown",props:{text:{},openFile:{},resolveMentionPath:{},streaming:{type:Boolean,default:!1}},setup(e){X_e(),fIe(),tIe(),gIe(),eIe(new GDe),pIe(new QDe);const{t}=Ph(),n=cn("resolveImage"),i=G(null),s=e,o=L(()=>!s.streaming),r=L(()=>bDe(s.text??"")),l=L(()=>r.value.frontmatter),a=L(()=>r.value.body),u=L(()=>gDe(a.value)),c=L(()=>s.streaming?{codeRenderer:"shiki",codeFenceCount:0,codeChars:0}:zDe(a.value)),d=jy(),f=L(()=>!s.streaming),h=Ss(new Map),g=new Set,m=/(!\[[^\]]*\]\()\s*([^)\s]+)([^)]*\))/g,y=/(<img\b[^>]*?\bsrc=")([^"]+)(")/gi;function A(j){return!/^(https?:|data:|blob:)/i.test(j)}function b(j){if(!n)return;const W=[];for(const z of[m,y]){z.lastIndex=0;let H;for(;(H=z.exec(j))!==null;)W.push(H[2]??"")}for(const z of W)!z||!A(z)||h.has(z)||g.has(z)||(g.add(z),n(z).then(H=>{h.set(z,H!==z?H:"")}).catch(()=>{h.set(z,"")}).finally(()=>{g.delete(z)}))}function C(j){if(!n)return j;const W=z=>{if(!A(z))return null;const H=h.get(z);return H===void 0?s$e:H===""?null:H};return j.replace(m,(z,H,ee,V)=>{const ie=W(ee);return ie===null?z:`${H}${ie}${V}`}).replace(y,(z,H,ee,V)=>{const ie=W(ee);return ie===null?z:`${H}${ie}${V}`})}qe(a,j=>b(j),{immediate:!0});function v(){if(!i.value||!s.openFile||s.streaming)return;const j=document.createTreeWalker(i.value,NodeFilter.SHOW_TEXT),W=[];let z=j.nextNode();for(;z;){const H=z,ee=H.parentElement;ee&&!ee.closest("a, pre, .md-file-link, svg")&&H.data.trim().length>0&&W.push(H),z=j.nextNode()}for(const H of W){const ee=vDe(H.data,{aliases:u.value});if(ee.length===0||!H.parentNode)continue;const V=document.createDocumentFragment();let ie=0;for(const se of ee){se.start>ie&&V.append(document.createTextNode(H.data.slice(ie,se.start)));const Z=document.createElement("button");Z.type="button",Z.className="md-file-link",Z.textContent=se.text,Z.title=se.line?`${se.path}:${se.line}`:se.path,Z.addEventListener("click",pe=>{pe.preventDefault(),pe.stopPropagation(),s.openFile?.({path:se.path,line:se.line})}),V.append(Z),ie=se.end}ie<H.data.length&&V.append(document.createTextNode(H.data.slice(ie))),H.parentNode.replaceChild(V,H)}}function x(){if(!i.value||s.streaming)return;const j=i.value.querySelectorAll("a[href]");for(const W of j){if(W.dataset.mdLinkHandled==="true"||W.closest("svg"))continue;const z=W.getAttribute("href")??"",H=pP(z);if(H===null||W.querySelector("img"))continue;W.dataset.mdLinkHandled="true",W.removeAttribute("title");const ee=H==="skill"?z:Uf(z),V=iFe(W.textContent??"");if(W.classList.add("mention-pill",`mention-${H}`),W.dataset.mentionKind=H,W.dataset.mentionName=H==="skill"?mP(z):V,W.dataset.mentionPath=H==="skill"?ee:s.resolveMentionPath?.(ee)??ee,H!=="skill"){const Z=s.resolveMentionPath?.(Uf(rp(z)))??Uf(rp(z));Z!==W.dataset.mentionPath&&(W.dataset.mentionActionPath=Z)}(H==="skill"||s.openFile)&&W.removeAttribute("href"),(H==="skill"||H==="file"&&s.openFile)&&(W.tabIndex=0,W.setAttribute("role","button"));const ie=UP(V),se=document.createElement("span");if(se.className="mention-pill-name",se.textContent=ie,W.replaceChildren(se),!W.querySelector(".mention-pill-icon")){const Z=document.createElement("span");Z.className="mention-pill-icon",Z.setAttribute("aria-hidden","true"),Z.innerHTML=H==="skill"?k9("skill","",V):K7(ee,V,H==="folder"),W.prepend(Z)}W.addEventListener("click",Z=>{H!=="skill"&&!s.openFile||(Z.preventDefault(),Z.stopPropagation(),H==="file"&&s.openFile?.({path:Uf(rp(z))}))}),H==="file"&&s.openFile&&W.addEventListener("keydown",Z=>{Z.key!=="Enter"&&Z.key!==" "||(Z.preventDefault(),Z.stopPropagation(),s.openFile?.({path:Uf(rp(z))}))})}}function S(){return{widen:t("conversation.widenTable"),restore:t("conversation.restoreTableWidth")}}function _(){if(!i.value||s.streaming)return;const j=S();for(const W of i.value.querySelectorAll(".table-node-wrapper"))VDe(W,j)}function I(){if(!(!i.value||s.streaming))for(const j of i.value.querySelectorAll(".table-node-wrapper"))V7(j)}function M(){kt().then(()=>{v(),x(),_()})}qe(()=>s.text,M),qe(()=>s.streaming,M);let $=null,D=null;mn(()=>{M(),i.value&&($=new MutationObserver(M),$.observe(i.value,{childList:!0,subtree:!0}),D=new ResizeObserver(I),D.observe(i.value))}),Mn(()=>{$?.disconnect(),D?.disconnect()});const T={showHeader:!0,showCopyButton:!0,showExpandButton:!1,showPreviewButton:!1,showCollapseButton:!1,showFontSizeButtons:!1,loading:!1,monacoOptions:{lineNumbers:!1,fontSize:13,fontFamily:"var(--font-mono)",padding:{top:12,bottom:12}}},N=/(^|\n)(?:```|~~~)diff\b[^\n]*\n([\s\S]*?)(?:\n)?(?:```|~~~)(?=\n|$)/g,O=L(()=>{const j=C(a.value),W=[];let z=0;N.lastIndex=0;let H;for(;(H=N.exec(j))!==null;){const V=H[1]??"",ie=j.slice(z,H.index)+(V||"");ie.trim()&&W.push({kind:"md",text:ie}),W.push({kind:"diff",code:H[2]??""}),z=N.lastIndex}const ee=j.slice(z);return(ee.trim()||W.length===0)&&W.push({kind:"md",text:ee}),W});function P(j){return j.split(` +`).map(W=>W.startsWith("@@")?{type:"hunk",sign:"",text:W}:/^\+(?!\+\+)/.test(W)?{type:"add",sign:"+",text:W.slice(1)}:/^-(?!--)/.test(W)?{type:"del",sign:"-",text:W.slice(1)}:W.startsWith(" ")?{type:"ctx",sign:"",text:W.slice(1)}:{type:"ctx",sign:"",text:W})}const R=G(null);function q(j,W){GP(j).then(z=>{z&&(R.value=W,setTimeout(()=>{R.value=null},1400))})}return(j,W)=>(k(),E("div",{ref_key:"mdRef",ref:i,class:"md"},[l.value!==null?(k(),E("pre",YDe,F(l.value),1)):te("",!0),(k(!0),E(Te,null,ht(O.value,(z,H)=>(k(),E(Te,{key:H},[z.kind==="md"?(k(),de(p(Mr),{key:0,content:z.text,"custom-markdown-it":p(NDe),mode:"chat","code-renderer":c.value.codeRenderer,"is-dark":p(d),"code-block-light-theme":ST,"code-block-dark-theme":_T,themes:[ST,_T],"code-block-props":T,final:o.value,"smooth-streaming":e.streaming,"batch-rendering":f.value,"defer-nodes-until-visible":!1,onCopy:p(RDe)},null,8,["content","custom-markdown-it","code-renderer","is-dark","themes","final","smooth-streaming","batch-rendering","onCopy"])):(k(),E("div",JDe,[w("div",XDe,[W[0]||(W[0]=w("span",{class:"diff-lang"},"diff",-1)),K(p(kn),{text:p(t)("filePreview.copyCode")},{default:he(()=>[w("button",{class:"diff-copy","aria-label":p(t)("filePreview.copyCode"),onClick:ee=>q(z.code,H)},[K(p(ve),{name:R.value===H?"check":"copy",size:"sm"},null,8,["name"])],8,e$e)]),_:2},1032,["text"])]),w("pre",t$e,[w("code",null,[(k(!0),E(Te,null,ht(P(z.code),(ee,V)=>(k(),E("span",{key:V,class:Fe(["diff-line",`diff-${ee.type}`])},[ee.type!=="hunk"?(k(),E("span",n$e,F(ee.sign),1)):te("",!0),w("span",i$e,F(ee.text),1)],2))),128))])])]))],64))),128))],512))}}),lu=gt(o$e,[["__scopeId","data-v-33cb819f"]]),r$e=["innerHTML"],l$e={class:"tl-name"},a$e={key:0,class:"tl-faint"},u$e={key:0,class:"tl-chip"},c$e=["title"],d$e={key:1,class:"plan-content"},f$e={key:2,class:"plan-review"},h$e={key:0},p$e={class:"review-label"},g$e={key:1},m$e={class:"review-label"},v$e={class:"review-feedback"},y$e=Qe({__name:"PlanTool",props:{tool:{},mobile:{type:Boolean}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=G(n.tool.defaultExpanded===!0),r=L(()=>n.tool.plan),l=L(()=>r.value?.path??n.tool.planPath),a=L(()=>r.value!==void 0||l.value!==void 0||(n.tool.output?.length??0)>0),u=L(()=>{const d=r.value?.review?.state;return d?s(`tools.plan.review.${d}`):void 0});function c(){l.value&&i("openFile",{path:l.value,content:r.value?.plan})}return(d,f)=>(k(),de(Vl,{status:e.tool.status,open:o.value,expandable:a.value,onToggle:f[0]||(f[0]=h=>o.value=!o.value)},{leading:he(()=>[w("span",{class:"plan-glyph",innerHTML:p(wB)(e.tool.name)},null,8,r$e)]),trailing:he(()=>[e.tool.timing?(k(),E("span",u$e,F(e.tool.timing),1)):te("",!0)]),body:he(()=>[l.value?(k(),E("button",{key:0,type:"button",class:"plan-path",title:l.value,onClick:c},F(l.value),9,c$e)):te("",!0),r.value?(k(),E("div",d$e,[K(p(lu),{text:r.value.plan,"open-file":h=>i("openFile",h)},null,8,["text","open-file"])])):te("",!0),r.value?.review?.selectedOption||r.value?.review?.feedback?(k(),E("div",f$e,[r.value.review.selectedOption?(k(),E("div",h$e,[w("span",p$e,F(p(s)("tools.plan.selectedOption")),1),w("span",null,F(r.value.review.selectedOption),1)])):te("",!0),r.value.review.feedback?(k(),E("div",g$e,[w("span",m$e,F(p(s)("tools.plan.feedback")),1),w("span",v$e,F(r.value.review.feedback),1)])):te("",!0)])):te("",!0),r.value?te("",!0):(k(),de(el,{key:3,lines:e.tool.output,"empty-text":p(s)("tools.output.empty")},null,8,["lines","empty-text"]))]),default:he(()=>[w("span",l$e,F(p(Kh)(e.tool.name)),1),u.value?(k(),E("span",a$e,F(u.value),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),k$e=gt(y$e,[["__scopeId","data-v-8dff80a1"]]),b$e={class:"tl-name"},A$e={key:1,class:"tl-faint"},C$e={key:2,class:"tl-faint"},w$e={key:3,class:"tl-dim"},x$e={key:0,class:"tl-chip"},S$e=Qe({__name:"ReadTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>n.tool.status),r=L(()=>Mc(n.tool.arg)),l=L(()=>xB(r.value)??""),a=L(()=>l.value?uu(l.value):""),u=L(()=>l.value?SB(l.value):""),c=L(()=>{const S=r.value;if(S)return Lu(S.offset)??Lu(S.line_start)??Lu(S.start_line)}),d=L(()=>{const S=r.value;if(!S)return;const _=Lu(S.limit)??Lu(S.length);return Lu(S.line_end)??Lu(S.end_line)??(c.value!==void 0&&_!==void 0?c.value+_:void 0)}),f=L(()=>c.value!==void 0&&d.value!==void 0?`:${c.value}-${d.value}`:c.value!==void 0?`:${c.value}`:""),h=L(()=>n.tool.status==="ok"?rre(n.tool.output??[]):null),g=L(()=>h.value?.contents??[]),m=L(()=>h.value?.lineNumbers),y=L(()=>h.value?.contents.length??n.tool.output?.length??0),A=L(()=>!!n.tool.output&&n.tool.output.length>0),b=L(()=>h.value!==null||A.value),C=G(n.tool.defaultExpanded===!0&&b.value),v=G(C.value);qe(C,S=>{S&&(v.value=!0)}),qe(()=>[n.tool.defaultExpanded,n.tool.output?.length,n.tool.status],()=>{n.tool.defaultExpanded===!0&&b.value&&(C.value=!0)});function x(){l.value&&i("openFile",{path:l.value,line:c.value})}return(S,_)=>(k(),de(Vl,{status:o.value,open:C.value,expandable:b.value,onToggle:_[0]||(_[0]=I=>C.value=!C.value)},{leading:he(()=>[K(p(ve),{name:"file-text",size:"sm"})]),trailing:he(()=>[y.value>0?(k(),E("span",x$e,F(p(s)("tools.chip.lines",{count:y.value})),1)):te("",!0)]),body:he(()=>[l.value?(k(),E("button",{key:0,class:"path-link",type:"button",onClick:x},F(l.value),1)):te("",!0),h.value&&v.value?(k(),de($l,{key:1,code:g.value,path:l.value,"line-numbers":m.value},null,8,["code","path","line-numbers"])):(k(),de(el,{key:2,lines:e.tool.output,"empty-text":p(s)("tools.output.waiting")},null,8,["lines","empty-text"]))]),default:he(()=>[w("span",b$e,F(p(s)("tools.label.read")),1),a.value?(k(),E("button",{key:0,class:"tl-file",type:"button",onClick:Ct(x,["stop"])},F(a.value),1)):te("",!0),u.value?(k(),E("span",A$e,F(u.value),1)):te("",!0),f.value?(k(),E("span",C$e,F(f.value),1)):te("",!0),a.value?te("",!0):(k(),E("span",w$e,F(l.value||e.tool.arg),1))]),_:1},8,["status","open","expandable"]))}}),_$e=gt(S$e,[["__scopeId","data-v-0edbdd82"]]),I$e=["aria-expanded"],M$e={class:"title"},E$e={key:0,class:"meta"},T$e={key:1,class:"sum-txt"},L$e={class:"rt"},N$e={class:"status"},F$e={key:0,class:"chip"},D$e={key:1,class:"tm"},$$e={class:"body"},B$e={class:"overview"},z$e={class:"overview-line"},R$e={class:"big"},O$e={key:0,class:"lbl"},P$e={key:1,class:"lbl"},j$e={key:2,class:"lbl"},H$e={key:3,class:"lbl"},W$e={key:0,class:"seg","aria-hidden":"true"},q$e={key:1,class:"legend"},U$e=["disabled","aria-label","aria-expanded","onClick"],K$e={class:"mname"},V$e={class:"mact"},Z$e={class:"mphase"},G$e=["aria-expanded","onClick"],Q$e={key:1,class:"fallback-output"},Y$e={key:2,class:"waiting"},J$e=Qe({__name:"SwarmTool",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(j){if(!j)return{};try{const W=JSON.parse(j),z=Array.isArray(W.items)?W.items:void 0;return{description:typeof W.description=="string"?W.description:void 0,itemCount:z?.length}}catch{return{}}}const r=cn("resolveSwarmMembers"),l=L(()=>o(i.tool.arg)),a=L(()=>Kh(i.tool.name)),u=L(()=>l.value.description??""),c=L(()=>r?.(i.tool.id)??[]),d=L(()=>Uoe(i.tool.output)),f=cn("modelDisplay"),h=cn("subagentEffort"),g=L(()=>{let j;for(const W of c.value){const z=f?.(W.model),H=h?.(W.thinkingEffort),ee=[z,H].filter(ie=>ie!==void 0);if(ee.length===0)continue;const V=ee.join(" · ");if(j===void 0)j=V;else if(j!==V)return}return j}),m=L(()=>i.tool.status),y=L(()=>m.value==="running"?"running":m.value==="error"||(d.value?.failed??0)>0?"error":"ok"),A=L(()=>Ose(c.value,d.value)),b=L(()=>{const j={completed:0,working:0,suspended:0,queued:0,failed:0,cancelled:0};for(const W of A.value)j[W.phase]++;return j}),C=L(()=>A.value.length||l.value.itemCount||0),v=L(()=>b.value.completed+b.value.failed+b.value.cancelled),x=L(()=>{const j=d.value;if(!j)return"";const W=j.aborted??0;return W>0?n("tools.swarm.doneSubWithCancelled",{completed:j.completed,failed:j.failed,cancelled:W}):n("tools.swarm.doneSub",{completed:j.completed,failed:j.failed})}),S=L(()=>b.value.working+b.value.suspended+b.value.queued),_=[{phase:"completed",cls:"s-ok"},{phase:"working",cls:"s-run"},{phase:"suspended",cls:"s-warn"},{phase:"failed",cls:"s-fail"},{phase:"cancelled",cls:"s-queue"},{phase:"queued",cls:"s-queue"}],I=L(()=>_.map(({phase:j,cls:W})=>({phase:j,count:b.value[j],cls:W})).filter(j=>j.count>0)),M=G(m.value==="running"||S.value>0);function $(){M.value=!M.value}const D=L(()=>A.value.length>0||d.value||m.value==="running"?"":(i.tool.output??[]).join(` +`).trim()),T=G(new Set);function N(j){return T.value.has(j)}function O(j){const W=new Set(T.value);W.has(j)?W.delete(j):W.add(j),T.value=W}function P(j){if(j.agentId){s("openAgent",j.agentId);return}j.body&&O(j.id)}function R(j){return j.agentId!==void 0&&j.body.length>0&&(j.phase==="completed"||j.phase==="failed"||j.phase==="cancelled")}function q(j){return n(`tools.swarm.phase${j[0].toUpperCase()}${j.slice(1)}`)}return(j,W)=>(k(),E("div",{class:Fe(["swarm-card",{open:M.value,err:y.value==="error"}])},[w("button",{class:"head",type:"button","aria-expanded":M.value,onClick:$},[K(p(ve),{class:"ic",name:"sparkles",size:"sm"}),w("span",M$e,F(a.value),1),u.value?(k(),E("span",E$e,"·")):te("",!0),u.value?(k(),E("span",T$e,F(u.value),1)):te("",!0),w("span",L$e,[w("span",N$e,[y.value==="ok"?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):y.value==="error"?(k(),de(p(ve),{key:1,name:"close",size:"sm"})):(k(),de(p(jl),{key:2,status:"running"}))]),v.value>0||C.value>0?(k(),E("span",F$e,F(v.value)+" / "+F(C.value),1)):te("",!0),e.tool.timing?(k(),E("span",D$e,F(e.tool.timing),1)):te("",!0)]),K(p(ve),{class:"car",name:"chevron-right",size:"sm"})],8,I$e),$n(w("div",$$e,[w("div",B$e,[w("div",z$e,[w("span",R$e,F(p(n)("tools.swarm.progress",{done:v.value,total:C.value})),1),g.value?(k(),E("span",O$e,F(g.value),1)):te("",!0),y.value==="running"&&C.value>0?(k(),E("span",P$e,F(p(n)("tools.swarm.runningSub",{count:S.value})),1)):d.value?(k(),E("span",j$e,F(x.value),1)):(k(),E("span",H$e,F(p(n)("tools.swarm.waiting")),1))]),C.value>0&&I.value.length>0?(k(),E("div",W$e,[(k(!0),E(Te,null,ht(I.value,z=>(k(),E("span",{key:z.phase,class:Fe(z.cls),style:qt({flex:z.count})},null,6))),128))])):te("",!0),I.value.length>1?(k(),E("div",q$e,[(k(!0),E(Te,null,ht(I.value,z=>(k(),E("span",{key:z.phase},[w("i",{class:Fe(["lg-dot",z.cls])},null,2),$e(F(q(z.phase))+" "+F(z.count),1)]))),128))])):te("",!0)]),A.value.length>0?(k(!0),E(Te,{key:0},ht(A.value,z=>(k(),E("div",{key:z.id,class:Fe(["member",[`phase-${z.phase}`,{open:!z.agentId&&N(z.id)}]])},[w("button",{class:"member-head",type:"button",disabled:!z.agentId&&!z.body,"aria-label":z.agentId?p(n)("tasks.openDetail"):void 0,"aria-expanded":!z.agentId&&z.body?N(z.id):void 0,onClick:H=>P(z)},[K(p(jl),{class:"row-dot",status:z.phase},null,8,["status"]),K(p(kn),{text:z.name},{default:he(()=>[w("span",K$e,F(z.name),1)]),_:2},1032,["text"]),z.activity?(k(),de(p(kn),{key:0,text:z.activity},{default:he(()=>[w("span",V$e,F(z.activity),1)]),_:2},1032,["text"])):te("",!0),w("span",Z$e,F(q(z.phase)),1),z.agentId?(k(),de(p(ve),{key:1,class:"mcar",name:"arrow-right",size:"sm"})):z.body?(k(),de(p(ve),{key:2,class:"mcar",name:"chevron-right",size:"sm"})):te("",!0)],8,U$e),R(z)?(k(),E("button",{key:0,class:"member-saved",type:"button","aria-expanded":N(z.id),onClick:H=>O(z.id)},[K(p(ve),{class:Fe(["member-saved-car",{open:N(z.id)}]),name:"chevron-right",size:"sm","aria-hidden":"true"},null,8,["class"]),w("span",null,F(p(n)("tools.output.saved")),1)],8,G$e)):te("",!0),z.body&&(!z.agentId||R(z))?$n((k(),E("div",{key:1,class:"member-body"},F(z.body),513)),[[Qi,N(z.id)]]):te("",!0)],2))),128)):D.value?(k(),E("div",Q$e,F(D.value),1)):(k(),E("div",Y$e,F(p(n)("tools.swarm.waiting")),1))],512),[[Qi,M.value]])],2))}}),X$e=gt(J$e,[["__scopeId","data-v-f7b643ea"]]),eBe=Qe({__name:"StatusGlyph",props:{status:{}},setup(e){const t=e;return(n,i)=>(k(),E("span",{class:Fe(["status-glyph",`s-${t.status}`]),"aria-hidden":"true"},[t.status==="run"?(k(),de(p(jl),{key:0,status:"running"})):t.status==="pending"?(k(),de(p(jl),{key:1,status:"idle"})):t.status==="done"?(k(),de(p(ve),{key:2,name:"check",size:"sm"})):(k(),de(p(ve),{key:3,name:"close",size:"sm"}))],2))}}),tBe=gt(eBe,[["__scopeId","data-v-f1aedfd0"]]),nBe={class:"tl-name"},iBe={key:0,class:"tl-dim"},sBe={key:0,class:"tl-chip"},oBe={key:1,class:"todo-bar","aria-hidden":"true"},rBe={key:0,class:"todo-list"},lBe={class:"todo-title"},aBe=Qe({__name:"TodoTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt();function i(g){const m=Mc(g),y=m&&Array.isArray(m.todos)?m.todos:m&&Array.isArray(m.items)?m.items:void 0;if(!y)return[];const A=[];for(const b of y){if(!b||typeof b!="object")continue;const C=b,v=oi(C.title)??oi(C.content)??oi(C.activeForm)??oi(C.text);if(!v)continue;const x=oi(C.status)??"pending";A.push({title:v,status:x==="in_progress"?"in_progress":x==="done"||x==="completed"?"done":"pending"})}return A}const s=L(()=>t.tool.status),o=L(()=>i(t.tool.arg)),r=L(()=>o.value.filter(g=>g.status==="done").length),l=L(()=>o.value.length),a=L(()=>o.value.find(g=>g.status==="in_progress")),u=L(()=>l.value>0?r.value/l.value:0),c=L(()=>!!t.tool.output&&t.tool.output.length>0),d=L(()=>l.value>0||c.value),f=G(t.tool.defaultExpanded===!0&&d.value);qe(()=>[t.tool.defaultExpanded,t.tool.status],()=>{t.tool.defaultExpanded===!0&&d.value&&(f.value=!0)});function h(g){return g.status==="in_progress"?"run":g.status}return(g,m)=>(k(),de(Vl,{status:s.value,open:f.value,expandable:d.value,onToggle:m[0]||(m[0]=y=>f.value=!f.value)},{leading:he(()=>[K(p(ve),{name:"check-list",size:"sm"})]),trailing:he(()=>[l.value>0?(k(),E("span",sBe,F(r.value)+"/"+F(l.value),1)):te("",!0),l.value>0?(k(),E("span",oBe,[w("span",{class:"todo-fill",style:qt({width:`${u.value*100}%`})},null,4)])):te("",!0)]),body:he(()=>[l.value>0?(k(),E("div",rBe,[(k(!0),E(Te,null,ht(o.value,(y,A)=>(k(),E("div",{key:A,class:Fe(["todo-row",`s-${y.status}`])},[K(tBe,{status:h(y)},null,8,["status"]),w("span",lBe,F(y.title),1)],2))),128))])):c.value?(k(),de(el,{key:1,lines:e.tool.output},null,8,["lines"])):te("",!0)]),default:he(()=>[w("span",nBe,F(p(n)("tools.label.todo")),1),a.value?(k(),E("span",iBe,F(a.value.title),1)):te("",!0)]),_:1},8,["status","open","expandable"]))}}),uBe=gt(aBe,[["__scopeId","data-v-1b7f51f3"]]),cBe={class:"tl-name"},dBe={key:0},fBe={key:1,class:"tl-dim"},hBe={key:0,class:"fetch-url"},pBe=Qe({__name:"WebFetchTool",props:{tool:{},mobile:{type:Boolean,default:!1}},setup(e){const t=e,{t:n}=Bt(),i=L(()=>t.tool.status),s=L(()=>{const u=Mc(t.tool.arg);return oi(u?.url)??oi(u?.uri)??""}),o=L(()=>s.value?a3e(s.value):""),r=L(()=>!!t.tool.output&&t.tool.output.length>0),l=L(()=>r.value),a=G(t.tool.defaultExpanded===!0&&l.value);return qe(()=>[t.tool.defaultExpanded,t.tool.output?.length,t.tool.status],()=>{t.tool.defaultExpanded===!0&&l.value&&(a.value=!0)}),(u,c)=>(k(),de(Vl,{status:i.value,open:a.value,expandable:l.value,onToggle:c[0]||(c[0]=d=>a.value=!a.value)},{leading:he(()=>[K(p(ve),{name:"globe",size:"sm"})]),body:he(()=>[s.value?(k(),E("div",hBe,F(s.value),1)):te("",!0),K(el,{lines:e.tool.output,"empty-text":p(n)("tools.output.waiting")},null,8,["lines","empty-text"])]),default:he(()=>[w("span",cBe,F(p(n)("tools.label.web_fetch")),1),o.value?(k(),E("span",dBe,F(o.value),1)):(k(),E("span",fBe,F(e.tool.arg),1))]),_:1},8,["status","open","expandable"]))}}),gBe=gt(pBe,[["__scopeId","data-v-8c248fcc"]]);function mBe(e){if(e.media&&e.status==="ok")return ube;switch(Eo(e.name)){case"bash":return p3e;case"read":return _$e;case"edit":case"write":case"multi_edit":return F3e;case"grep":case"search":return mke;case"glob":case"ls":return Y3e;case"web_fetch":return gBe;case"todo":return uBe;case"task":return L4e;case"agentswarm":return X$e;case"askuserquestion":return l3e;case"exitplanmode":return k$e;case"creategoal":case"getgoal":case"setgoalbudget":case"updategoal":return oke;default:return j3e}}const Z7=Qe({__name:"ToolCall",props:{tool:{},mobile:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,i=t,s=L(()=>mBe(n.tool));return(o,r)=>(k(),de(xs(s.value),{tool:e.tool,mobile:e.mobile,onOpenMedia:r[0]||(r[0]=l=>i("openMedia",l)),onOpenFile:r[1]||(r[1]=l=>i("openFile",l)),onOpenAgent:r[2]||(r[2]=l=>i("openAgent",l))},null,40,["tool","mobile"]))}});function Qa(e){if(e.blocks)return e.blocks;const t=[];e.thinking&&t.push({kind:"thinking",thinking:e.thinking}),e.text&&t.push({kind:"text",text:e.text});for(const n of e.tools??[])t.push({kind:"tool",tool:n});return t}function Y8(e){return Qa(e).some(t=>t.kind==="thinking"&&t.thinking.trim().length>0||t.kind==="text"&&t.text.trim().length>0||t.kind==="tool"||t.kind==="notification")}function nj(e){return!(e.tool.status==="ok"&&e.tool.media)}function vBe(e){const t=Qa(e),n=[];let i=[],s=null;const o=()=>{const[l]=i;i.length===1&&l?n.push(l):i.length>1&&n.push({kind:"activity-run",items:i}),i=[]},r=()=>{s&&n.push({kind:"notification",items:s.items,sourceIndex:s.sourceIndex}),s=null};return t.forEach((l,a)=>{if(l.kind==="notification"){o(),s?s.items.push(l.notification):s={items:[l.notification],sourceIndex:a};return}if(r(),l.kind==="thinking"){i.push({kind:"thinking",thinking:l.thinking,startedAt:l.startedAt,durationMs:l.durationMs,sourceIndex:a});return}if(l.kind==="tool"&&nj(l)){i.push({kind:"tool",tool:l.tool,sourceIndex:a});return}o(),l.kind==="text"?n.push({kind:"text",text:l.text,sourceIndex:a}):l.kind==="tool"&&n.push({kind:"tool",tool:l.tool,sourceIndex:a})}),o(),r(),n}const IT=new WeakMap;function ij(e){const t=IT.get(e);if(t!==void 0)return t;const n=yBe(e);return IT.set(e,n),n}function yBe(e){const t=vBe(e);let n=-1;for(let r=t.length-1;r>=0;r--){const l=t[r];if(l?.kind==="text"&&l.text.trim().length>0){n=r;break}}if(n===-1){for(let r=0;r<t.length;r++){const l=t[r];if(l?.kind==="tool"&&!nj(l)){n=r;break}if(l?.kind==="notification"){n=r;break}}if(n===-1)return{folded:t,visible:[]}}const i=t.slice(0,n),s=t.slice(n),o=i.filter(r=>r.kind==="notification");return o.length>0?{folded:i.filter(r=>r.kind!=="notification"),visible:[...o,...s]}:{folded:i,visible:s}}function kBe(e){const t=n=>n.kind==="activity-run"?n.items[0]?.sourceIndex??-1:n.sourceIndex;return[...e.folded,...e.visible].sort((n,i)=>t(n)-t(i))}function bBe(e){let t;for(const n of e){if(n.kind!=="thinking"||n.startedAt===void 0)continue;const i=Date.parse(n.startedAt);Number.isNaN(i)||(t===void 0||i<t)&&(t=i)}return t}function MT(e){if(e===void 0)return;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function ABe(e){if(e.state.phase==="settled")return e.durationMs!==void 0?Math.max(0,e.durationMs):e.startMs===void 0||e.endedMs===void 0?void 0:Math.max(0,e.endedMs-e.startMs);if(e.startMs!==void 0)return Math.max(0,e.state.nowMs-e.startMs)}function CBe(e){return ij(e).visible.flatMap(t=>t.kind==="text"&&t.text?[t.text]:[]).join(` + +`)}function wBe(e){const t=[];for(const n of Qa(e))if(n.kind==="thinking"&&n.thinking)t.push(`> **Thinking** +> ${n.thinking.split(` +`).join(` +> `)}`);else if(n.kind==="text"&&n.text)t.push(n.text);else if(n.kind==="tool"&&n.tool.output&&n.tool.output.length>0){const i=n.tool.output.join(` +`);t.push(`\`\`\` +[${n.tool.name}] +${i} +\`\`\``)}else if(n.kind==="notification"){const i=n.notification,s=[i.title,i.type,...i.body.split(` +`)].filter(o=>o!=="");s.length>0&&t.push(`> **Notification** +> ${s.join(` +> `)}`)}return t.join(` + +`)}function sj(e){return e.tool.id||`tool-${e.sourceIndex}`}function oj(e,t){return e.kind==="activity-run"?`activity-run-${e.items[0]?.sourceIndex??t}`:e.kind==="tool"?sj({tool:e.tool,sourceIndex:e.sourceIndex}):`${e.kind}-${e.sourceIndex}`}function xBe(e){const t=new Map;for(const n of Qa(e)){if(n.kind!=="tool"||n.tool.status==="error")continue;const i=n.tool,s=Eo(i.name);if(s!=="edit"&&s!=="multi_edit"&&s!=="write")continue;let o,r=0,l=0,a=!1,u=!1,c=null;if(s==="write")o=Ox(i),a=!0,u=!0;else if(c=SD(i),o=Ox(i),c){const h=kD(c);r=h.added,l=h.removed}else u=!0;if(!o)continue;const d=SBe(o),f=t.get(d);if(f)if(f.added+=r,f.removed+=l,f.hasWrite||=a,f.statsIncomplete||=u,f.diff!==null&&c!==null){let h=0,g=0;for(const y of f.diff)y.oldNo!==void 0&&y.oldNo>h&&(h=y.oldNo),y.newNo!==void 0&&y.newNo>g&&(g=y.newNo);const m=c.map(y=>({...y,oldNo:y.oldNo!==void 0?y.oldNo+h:void 0,newNo:y.newNo!==void 0?y.newNo+g:void 0}));f.diff=[...f.diff,{type:"hunk",text:"···"},...m]}else f.diff=null;else t.set(d,{path:o,added:r,removed:l,hasWrite:a,statsIncomplete:u,diff:c})}return[...t.values()]}function SBe(e){const t=e.replace(/\\/g,"/");let n="",i=t,s=!1;const o=/^\/\/([^/]+\/[^/]+)(\/|$)/.exec(t);o?(n=`//${o[1].toLowerCase()}/`,i=t.slice(o[0].length-(o[0].endsWith("/")?1:0)),s=!0):/^[a-zA-Z]:\//.test(t)?(n=`${t[0].toLowerCase()}:/`,i=t.slice(3),s=!0):t.startsWith("/")&&(n="/",i=t.slice(1));const r=n!=="",l=[];for(const c of i.split("/"))if(!(!c||c===".")){if(c===".."){l.length>0&&l[l.length-1]!==".."?l.pop():r||l.push(c);continue}l.push(c)}const a=l.join("/"),u=n+a;return s?u.toLowerCase():u}const _Be=2e3,D1=new Map;function IBe(e){const t=[];for(const n of Qa(e)){if(n.kind!=="tool")continue;const i=n.tool,s=Eo(i.name);s!=="edit"&&s!=="multi_edit"&&s!=="write"||t.push(`${i.id}:${i.status}:${i.arg.length}`)}return t.join("|")}function MBe(e){const t=IBe(e),n=D1.get(e.id);if(n&&n.key===t)return n.changes;const i=xBe(e);if(D1.set(e.id,{key:t,changes:i}),D1.size>_Be){const s=D1.keys().next().value;s!==void 0&&D1.delete(s)}return i}const EBe={class:"think-title"},TBe={key:0,class:"think-time"},LBe=["inert"],NBe={class:"think-text"},FBe=Qe({__name:"ThinkingBlock",props:{text:{},mobile:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1},startedAt:{default:void 0},durationMs:{default:void 0},forceOpen:{type:Boolean,default:!1}},setup(e){const t=e,n=G(!1),i=L(()=>t.forceOpen||n.value),{t:s}=Bt();qe(()=>t.streaming,(f,h)=>{h&&!f&&(n.value=!1)});const o=G(Date.now());qe(()=>[t.streaming,t.startedAt],([f,h],g,m)=>{if(!f||!h)return;o.value=Date.now();const y=setInterval(()=>{o.value=Date.now()},1e3);m(()=>clearInterval(y))},{immediate:!0});const r=L(()=>{if(t.streaming&&t.startedAt){const f=Date.parse(t.startedAt);return Number.isFinite(f)?su(o.value-f):""}if(t.durationMs!==void 0){const f=su(t.durationMs);return f?`· ${f}`:""}return""}),l=cn("pinScroll",()=>{}),a=G(null),u=G(null),c=G(!1);function d(){if(t.forceOpen)return;if(!n.value){const h=(u.value?.scrollHeight??0)>(typeof window<"u"?window.innerHeight:0);c.value=t.streaming&&h}if(n.value=!n.value,t.streaming)return;const f=a.value;f&&kt(()=>l(f))}return(f,h)=>(k(),E("div",{class:Fe(["think",{mob:e.mobile,open:i.value,streaming:e.streaming}])},[(k(),de(xs(e.forceOpen?"div":"button"),Un({ref_key:"headEl",ref:a,class:["think-head",{"is-static":e.forceOpen}]},e.forceOpen?{}:{type:"button","aria-expanded":i.value},{onClick:d}),{default:he(()=>[K(p(ve),{class:"think-bulb",name:"thinking",size:"sm"}),w("span",EBe,F(e.streaming?p(s)("thinking.streaming"):p(s)("thinking.panelTitle")),1),r.value?(k(),E("span",TBe,F(r.value),1)):te("",!0),e.forceOpen?te("",!0):(k(),de(p(ve),{key:1,class:"think-car",name:"chevron-right",size:"sm"}))]),_:1},16,["class"])),w("div",{class:Fe(["think-body",{open:i.value,instant:c.value}]),inert:!i.value},[w("div",{ref_key:"bodyInnerEl",ref:u,class:"think-body-inner"},[w("pre",NBe,F(e.text),1)],512)],10,LBe)],2))}}),G7=gt(FBe,[["__scopeId","data-v-33e6d7d4"]]),rj=(e,t)=>t===void 0?Wl.global.t(e):Wl.global.t(e,t);function DBe(e,t={}){return coe(rj,e,t)}function $Be(e,t){return foe(rj,e,t)}const BBe=["aria-label"],zBe=["title"],RBe={key:0,class:"ar-sep"},OBe=["inert"],PBe={class:"ar-body-inner"},jBe=Qe({__name:"ActivityRun",props:{items:{},mobile:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1},forceOpen:{type:Boolean,default:!1}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,i=t,s=L(()=>n.items.at(-1)),o=L(()=>{const M=s.value;if(n.streaming&&M?.kind==="thinking")return M;for(let $=n.items.length-1;$>=0;$--){const D=n.items[$];if(D?.kind==="tool"&&D.tool.status==="running")return D}return null}),r=L(()=>{if(n.streaming)return"running";for(const M of n.items)if(M.kind==="tool"&&M.tool.status==="running")return"running";for(const M of n.items)if(M.kind==="tool"&&M.tool.status==="error")return"error";return"done"}),l=G(r.value==="running"),a=L(()=>n.forceOpen||l.value),u=cn("pinScroll",()=>{}),c=G(null),d=G(null),f=G(void 0),h=G(Date.now()),g=L(()=>{let M=null;for(const $ of n.items)if($.kind==="thinking"&&$.startedAt!==void 0){const D=Date.parse($.startedAt);Number.isFinite(D)&&(M===null||D<M)&&(M=D)}return M});qe(r,(M,$,D)=>{if(M==="running"){$!==void 0&&$!=="running"&&(l.value=!0),d.value===null&&(d.value=g.value??Date.now()),f.value=void 0,h.value=Date.now();const T=setInterval(()=>{h.value=Date.now()},1e3);D(()=>clearInterval(T));return}$==="running"&&(l.value=!1,d.value!==null&&(f.value=Date.now()-d.value),d.value=null)},{immediate:!0});function m(){if(n.forceOpen||(l.value=!l.value,n.streaming))return;const M=c.value;M&&kt(()=>u(M))}const y=L(()=>{if(r.value==="done")return"check";if(r.value==="error")return"close";const M=o.value??s.value;return M?M.kind==="thinking"?"thinking":CB(M.tool.name):"tool"}),A=L(()=>$Be(n.items,o.value)),b=L(()=>DBe(n.items,{durationMs:f.value})),C=L(()=>r.value!=="running"||d.value===null?"":su(h.value-d.value)),v=L(()=>{if(r.value!=="running")return b.value.clauses;const M=[];return A.value.current&&M.push(A.value.current),M.push(...A.value.done),C.value&&M.push({fragments:[{text:C.value,tone:"faint"}]}),M}),x=L(()=>r.value!=="running"?b.value.plain:[A.value.plain,C.value].filter(Boolean).join(" · "));function S(M){if(M==="danger")return"ar-danger";if(M==="faint")return"ar-faint"}function _(M){return M.kind==="tool"?sj(M):`thinking-${M.sourceIndex}`}function I(M){return n.streaming&&M.kind==="thinking"&&M.durationMs===void 0&&M.sourceIndex===s.value?.sourceIndex}return(M,$)=>(k(),E("div",{class:Fe(["activity-run",{open:a.value}])},[(k(),de(xs(e.forceOpen?"div":"button"),Un({ref_key:"headEl",ref:c,class:["ar-head",{"is-static":e.forceOpen}]},e.forceOpen?{}:{type:"button","aria-expanded":a.value},{onClick:m}),{default:he(()=>[w("span",{class:Fe(["ar-glyph",{run:r.value==="running",err:r.value==="error",ok:r.value==="done"}]),role:"status","aria-label":r.value},[K(p(ve),{name:y.value,size:"sm","aria-hidden":"true"},null,8,["name"])],10,BBe),w("span",{class:"ar-sum",title:x.value},[(k(!0),E(Te,null,ht(v.value,(D,T)=>(k(),E(Te,{key:T},[T>0?(k(),E("span",RBe," · ")):te("",!0),(k(!0),E(Te,null,ht(D.fragments,(N,O)=>(k(),E("span",{key:O,class:Fe(S(N.tone))},F(N.text),3))),128))],64))),128))],8,zBe),e.forceOpen?te("",!0):(k(),de(p(ve),{key:0,class:"ar-car",name:"chevron-right",size:"sm","aria-hidden":"true"}))]),_:1},16,["class"])),w("div",{class:Fe(["ar-body",{open:a.value}]),inert:!a.value},[w("div",PBe,[(k(!0),E(Te,null,ht(e.items,D=>(k(),E(Te,{key:_(D)},[D.kind==="thinking"?(k(),de(G7,{key:0,text:D.thinking,mobile:e.mobile,streaming:I(D),"started-at":D.startedAt,"duration-ms":D.durationMs,"force-open":e.forceOpen},null,8,["text","mobile","streaming","started-at","duration-ms","force-open"])):(k(),de(Z7,{key:1,tool:D.tool,mobile:e.mobile,onOpenMedia:$[0]||($[0]=T=>i("openMedia",T)),onOpenFile:$[1]||($[1]=T=>i("openFile",T)),onOpenAgent:$[2]||($[2]=T=>i("openAgent",T))},null,8,["tool","mobile"]))],64))),128))])],10,OBe)],2))}}),lj=gt(jBe,[["__scopeId","data-v-c3bb6975"]]),HBe={class:"msg-time"},WBe=Qe({__name:"MessageTime",props:{time:{}},setup(e){const t=e,{t:n}=Bt(),i=L(()=>OD(t.time,n("conversation.yesterday")));return(s,o)=>(k(),E("span",HBe,F(i.value),1))}}),cy=gt(WBe,[["__scopeId","data-v-9153170e"]]),qBe=["aria-expanded"],UBe={class:"ntf-chip"},KBe={class:"ntf-main"},VBe={class:"ntf-title"},ZBe={class:"ntf-sub"},GBe={class:"ntf-side"},QBe={class:"ng-dots"},YBe={class:"ng-list"},JBe=["aria-expanded","onClick"],XBe={class:"ntf-chip"},eze={class:"ntf-main"},tze={class:"ntf-title"},nze={class:"ntf-sub"},ize={class:"ntf-side"},sze={class:"st"},oze={class:"ntf-body"},rze={class:"ntf-body-in"},lze={class:"nd-fields"},aze={class:"k"},uze={class:"v"},cze={class:"k"},dze={class:"v"},fze={class:"k"},hze={class:"v"},pze={key:0,class:"nd-body"},gze={key:1,class:"nd-out"},mze=["title"],vze=["onClick"],yze={class:"nd-raw"},kze=["aria-expanded"],bze={class:"ntf-chip"},Aze={class:"ntf-main"},Cze={class:"ntf-title"},wze={class:"ntf-sub"},xze={class:"ntf-side"},Sze={class:"st"},_ze={class:"ntf-body"},Ize={class:"ntf-body-in"},Mze={class:"nd-fields"},Eze={class:"k"},Tze={class:"v"},Lze={class:"k"},Nze={class:"v"},Fze={class:"k"},Dze={class:"v"},$ze={key:0,class:"nd-body"},Bze={key:1,class:"nd-out"},zze=["title"],Rze={class:"nd-raw"},Oze=Qe({__name:"NotificationCard",props:{items:{}},setup(e){const t=e,{t:n}=Bt(),i=L(()=>t.items.length>1),s=G(!1),o=G(new Set);function r(C,v){return C.id!==""?`${C.id}#${v}`:`ntf-${v}`}function l(C){const v=new Set(o.value);v.has(C)?v.delete(C):v.add(C),o.value=v}const a={completed:"check",failed:"alert-triangle",timed_out:"clock",killed:"stop",lost:"alert-triangle",info:"info"};function u(C){const v=Gm(C);return v==="info"&&C.sourceKind==="subagent"?"robot":a[v]}function c(C){return C.sourceKind==="subagent"?n("conversation.notification.kindSubagent"):n("conversation.notification.kindTask")}function d(C){return n(`conversation.notification.title.${Gm(C)}`,{kind:c(C)})}function f(C){return n(`conversation.notification.status.${Gm(C)}`)}function h(C){return Bie(C)}function g(C){return C==="ok"?"done":C==="err"?"error":C==="warn"?"warn":""}const m=L(()=>t.items.map(C=>C.title).filter(C=>C!=="").join(" · ")),y=G(null);let A=null;async function b(C,v){await ao(C)&&(y.value=v,A!==null&&clearTimeout(A),A=setTimeout(()=>{A=null,y.value=null},1200))}return(C,v)=>i.value?(k(),E("div",{key:0,class:Fe(["ntf-group-card",{open:s.value}])},[w("button",{class:"ntf-head",type:"button","aria-expanded":s.value,onClick:v[0]||(v[0]=x=>s.value=!s.value)},[w("span",UBe,[K(p(ve),{name:"terminal",size:"sm"})]),w("span",KBe,[w("span",VBe,F(p(n)("conversation.notification.groupTitle",{n:e.items.length})),1),w("span",ZBe,F(m.value),1)]),w("span",GBe,[w("span",QBe,[(k(!0),E(Te,null,ht(e.items,(x,S)=>(k(),E("span",{key:r(x,S),class:Fe(["dot",g(h(x))])},null,2))),128))]),K(p(ve),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,qBe),$n(w("div",YBe,[(k(!0),E(Te,null,ht(e.items,(x,S)=>(k(),E("div",{key:r(x,S),class:Fe(["ng-item",[h(x),{open:o.value.has(r(x,S))}]])},[w("button",{class:"ntf-head",type:"button","aria-expanded":o.value.has(r(x,S)),onClick:_=>l(r(x,S))},[w("span",XBe,[K(p(ve),{name:u(x),size:"sm"},null,8,["name"])]),w("span",eze,[w("span",tze,F(d(x)),1),w("span",nze,F(x.title),1)]),w("span",ize,[w("span",sze,F(f(x)),1),x.createdAt?(k(),de(cy,{key:0,time:x.createdAt},null,8,["time"])):te("",!0),K(p(ve),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,JBe),$n(w("div",oze,[w("div",rze,[w("div",lze,[w("span",aze,F(p(n)("conversation.notification.fields.type")),1),w("span",uze,F(x.type),1),w("span",cze,F(p(n)("conversation.notification.fields.source")),1),w("span",dze,F(x.sourceKind)+" · "+F(x.sourceId),1),w("span",fze,F(p(n)("conversation.notification.fields.severity")),1),w("span",hze,F(x.severity||"—"),1)]),x.body?(k(),E("div",pze,F(x.body),1)):te("",!0),x.outputFile?(k(),E("div",gze,[K(p(ve),{class:"nd-out-ic",name:"file-text",size:"sm"}),w("span",{class:"path",title:x.outputFile.path},F(x.outputFile.path),9,mze),w("button",{class:"nd-act",type:"button",onClick:Ct(_=>b(x.outputFile.path,r(x,S)),["stop"])},F(y.value===r(x,S)?p(n)("conversation.notification.copied"):p(n)("conversation.notification.copyPath")),9,vze)])):te("",!0),w("details",yze,[w("summary",null,[K(p(ve),{class:"nd-raw-car",name:"chevron-right",size:"sm"}),w("span",null,F(p(n)("conversation.notification.rawPayload")),1)]),w("pre",null,F(x.raw),1)])])],512),[[Qi,o.value.has(r(x,S))]])],2))),128))],512),[[Qi,s.value]])],2)):e.items[0]?(k(),E("div",{key:1,class:Fe(["ntf",[h(e.items[0]),{open:o.value.has(r(e.items[0],0))}]])},[w("button",{class:"ntf-head",type:"button","aria-expanded":o.value.has(r(e.items[0],0)),onClick:v[1]||(v[1]=x=>l(r(e.items[0],0)))},[w("span",bze,[K(p(ve),{name:u(e.items[0]),size:"sm"},null,8,["name"])]),w("span",Aze,[w("span",Cze,F(d(e.items[0])),1),w("span",wze,F(e.items[0].title),1)]),w("span",xze,[w("span",Sze,F(f(e.items[0])),1),e.items[0].createdAt?(k(),de(cy,{key:0,time:e.items[0].createdAt},null,8,["time"])):te("",!0),K(p(ve),{class:"ntf-car",name:"chevron-right",size:"sm"})])],8,kze),$n(w("div",_ze,[w("div",Ize,[w("div",Mze,[w("span",Eze,F(p(n)("conversation.notification.fields.type")),1),w("span",Tze,F(e.items[0].type),1),w("span",Lze,F(p(n)("conversation.notification.fields.source")),1),w("span",Nze,F(e.items[0].sourceKind)+" · "+F(e.items[0].sourceId),1),w("span",Fze,F(p(n)("conversation.notification.fields.severity")),1),w("span",Dze,F(e.items[0].severity||"—"),1)]),e.items[0].body?(k(),E("div",$ze,F(e.items[0].body),1)):te("",!0),e.items[0].outputFile?(k(),E("div",Bze,[K(p(ve),{class:"nd-out-ic",name:"file-text",size:"sm"}),w("span",{class:"path",title:e.items[0].outputFile.path},F(e.items[0].outputFile.path),9,zze),w("button",{class:"nd-act",type:"button",onClick:v[2]||(v[2]=Ct(x=>b(e.items[0].outputFile.path,r(e.items[0],0)),["stop"]))},F(y.value===r(e.items[0],0)?p(n)("conversation.notification.copied"):p(n)("conversation.notification.copyPath")),1)])):te("",!0),w("details",Rze,[w("summary",null,[K(p(ve),{class:"nd-raw-car",name:"chevron-right",size:"sm"}),w("span",null,F(p(n)("conversation.notification.rawPayload")),1)]),w("pre",null,F(e.items[0].raw),1)])])],512),[[Qi,o.value.has(r(e.items[0],0))]])],2)):te("",!0)}}),aj=gt(Oze,[["__scopeId","data-v-69e0a1db"]]),Pze=["aria-expanded"],jze=["title"],Hze=["inert"],Wze={class:"tf-body-inner"},qze={key:1,class:"msg"},Uze=Qe({__name:"TurnFold",props:{items:{},mobile:{type:Boolean,default:!1},streamingTailIndex:{default:null},live:{type:Boolean,default:!1},parked:{type:Boolean,default:!1},seedMs:{default:void 0},createdMs:{default:void 0},endedMs:{default:void 0},durationMs:{default:void 0}},emits:["openMedia","openFile","openAgent"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>n.streamingTailIndex!==null),r=L(()=>n.live?n.parked?"parked":"live":"settled"),l=G(!1),a=L(()=>o.value||l.value),u=G(a.value),c=G(a.value);let d=null;qe(a,_=>{if(_){if(d!==null&&(clearTimeout(d),d=null),u.value){c.value=!0;return}u.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{c.value=!0})});return}c.value=!1,d=setTimeout(()=>{d=null,u.value=!1},200)});const f=cn("pinScroll",()=>{}),h=G(null),g=G(Date.now());let m=null;function y(){m!==null&&(clearInterval(m),m=null)}Mn(()=>{y(),d!==null&&clearTimeout(d)}),qe(r,(_,I)=>{_!=="settled"?(g.value=Date.now(),m===null&&(m=setInterval(()=>{g.value=Date.now()},1e3))):y(),I==="live"&&_!=="live"&&(l.value=!1)},{immediate:!0});const A=L(()=>n.seedMs===void 0?n.createdMs:n.createdMs===void 0?n.seedMs:Math.min(n.seedMs,n.createdMs)),b=L(()=>ABe({startMs:A.value,endedMs:n.endedMs,durationMs:n.durationMs,state:r.value==="settled"?{phase:"settled"}:{phase:"live",nowMs:g.value}}));function C(){l.value=!l.value,kt(()=>{const _=h.value;_&&f(_)})}const v=L(()=>{const _=b.value===void 0?"":su(b.value);return _?s("conversation.fold.worked",{duration:_}):s("conversation.fold.workedUnknown")});function x(_){return n.streamingTailIndex===null||_.kind==="thinking"&&_.durationMs!==void 0?!1:_.sourceIndex===n.streamingTailIndex}function S(_){if(n.streamingTailIndex===null)return!1;const I=_.items.at(-1);return I?.kind==="thinking"&&I.durationMs!==void 0?!1:I!==void 0&&I.sourceIndex===n.streamingTailIndex}return(_,I)=>e.items.length>0?(k(),E("div",{key:0,class:Fe(["turn-fold",{open:a.value,streaming:o.value}])},[o.value?te("",!0):(k(),E("button",{key:0,ref_key:"headEl",ref:h,class:"tf-head",type:"button","aria-expanded":l.value,onClick:C},[w("span",{class:"tf-sum",title:v.value},F(v.value),9,jze),K(p(ve),{class:"tf-car",name:"chevron-right",size:"sm","aria-hidden":"true"})],8,Pze)),u.value?(k(),E("div",{key:1,class:Fe(["tf-body",{open:c.value}]),inert:!a.value},[w("div",Wze,[(k(!0),E(Te,null,ht(e.items,(M,$)=>(k(),E(Te,{key:p(oj)(M,$)},[M.kind==="thinking"?(k(),de(G7,{key:0,text:M.thinking,mobile:e.mobile,streaming:x(M),"started-at":M.startedAt,"duration-ms":M.durationMs},null,8,["text","mobile","streaming","started-at","duration-ms"])):M.kind==="text"&&M.text?(k(),E("div",qze,[K(p(lu),{text:M.text,streaming:x(M),"open-file":D=>i("openFile",D)},null,8,["text","streaming","open-file"])])):M.kind==="activity-run"?(k(),de(lj,{key:2,items:M.items,mobile:e.mobile,streaming:S(M),onOpenMedia:I[0]||(I[0]=D=>i("openMedia",D)),onOpenFile:I[1]||(I[1]=D=>i("openFile",D)),onOpenAgent:I[2]||(I[2]=D=>i("openAgent",D))},null,8,["items","mobile","streaming"])):M.kind==="tool"?(k(),de(Z7,{key:3,tool:M.tool,mobile:e.mobile,onOpenMedia:I[3]||(I[3]=D=>i("openMedia",D)),onOpenFile:I[4]||(I[4]=D=>i("openFile",D)),onOpenAgent:I[5]||(I[5]=D=>i("openAgent",D))},null,8,["tool","mobile"])):M.kind==="notification"?(k(),de(aj,{key:4,items:M.items},null,8,["items"])):te("",!0)],64))),128))])],10,Hze)):te("",!0)],2)):te("",!0)}}),Kze=gt(Uze,[["__scopeId","data-v-66797f5d"]]),Vze={class:"turn-files"},Zze={class:"tf-ic","aria-hidden":"true"},Gze={class:"tf-title"},Qze={key:0,class:"tf-stats"},Yze={key:0,class:"tf-add"},Jze={key:1,class:"tf-del"},Xze={class:"diffbar","aria-hidden":"true"},eRe={class:"tf-list"},tRe={key:0,class:"tf-dir"},nRe={class:"tf-base"},iRe={key:0,class:"tf-stats"},sRe={key:0,class:"tf-add"},oRe={key:1,class:"tf-del"},vk=3,rRe=Qe({__name:"TurnFilesSummary",props:{changes:{},cwd:{},interactive:{type:Boolean,default:!0}},emits:["openDiff","openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>n.interactive!==!1),r=L(()=>{const v=n.changes.length;return s(v===1?"conversation.turnFiles.titleOne":"conversation.turnFiles.titleOther",{number:v})}),l=L(()=>n.changes.some(v=>v.statsIncomplete)),a=L(()=>{let v=0,x=0;for(const S of n.changes)v+=S.added,x+=S.removed;return{added:v,removed:x}}),u=L(()=>!l.value&&(a.value.added>0||a.value.removed>0)),c=G(!1),d=L(()=>c.value?n.changes:n.changes.slice(0,vk)),f=L(()=>Math.max(0,n.changes.length-vk)),h=L(()=>n.changes.length>vk),g=L(()=>c.value?s("conversation.turnFiles.showLess"):f.value===1?s("conversation.turnFiles.moreOne"):s("conversation.turnFiles.more",{number:f.value}));function m(v){const x=n.cwd?Wy(v,n.cwd):null;return x!==null?x||uu(v):v}function y(v){const x=m(v),S=Math.max(x.lastIndexOf("/"),x.lastIndexOf("\\"));return S>0?x.slice(0,S+1):""}function A(v){const x=m(v),S=Math.max(x.lastIndexOf("/"),x.lastIndexOf("\\"));return S>=0?x.slice(S+1):x}function b(v){return v.statsIncomplete||v.added===0&&v.removed===0?null:{added:v.added,removed:v.removed}}function C(v){v.hasWrite?i("openFile",{path:v.path}):i("openDiff",v)}return(v,x)=>(k(),E("div",Vze,[K(p(pG),null,UL({head:he(()=>[w("span",Zze,[K(p(ve),{name:"pencil",size:"sm"})]),w("span",Gze,F(r.value),1),u.value?(k(),E("span",Qze,[a.value.added>0?(k(),E("span",Yze,"+"+F(a.value.added),1)):te("",!0),a.value.removed>0?(k(),E("span",Jze,"−"+F(a.value.removed),1)):te("",!0),w("span",Xze,[w("span",{class:"seg-add",style:qt({flexGrow:a.value.added})},null,4),w("span",{class:"seg-del",style:qt({flexGrow:a.value.removed})},null,4)])])):te("",!0)]),default:he(()=>[w("ul",eRe,[(k(!0),E(Te,null,ht(d.value,S=>(k(),E("li",{key:S.path,class:"tf-row"},[(k(),de(xs(o.value?"button":"span"),{class:"tf-file",type:o.value?"button":void 0,onClick:_=>o.value&&C(S)},{default:he(()=>[y(S.path)?(k(),E("span",tRe,F(y(S.path)),1)):te("",!0),w("span",nRe,F(A(S.path)),1)]),_:2},1032,["type","onClick"])),b(S)?(k(),E("span",iRe,[b(S).added>0?(k(),E("span",sRe,"+"+F(b(S).added),1)):te("",!0),b(S).removed>0?(k(),E("span",oRe,"−"+F(b(S).removed),1)):te("",!0)])):te("",!0)]))),128))])]),_:2},[h.value?{name:"foot",fn:he(()=>[K(p(Zt),{variant:"ghost",size:"sm",class:"tf-more","aria-expanded":c.value,onClick:x[0]||(x[0]=S=>c.value=!c.value)},{default:he(()=>[$e(F(g.value)+" ",1),K(p(ve),{class:Fe(["tf-more-car",{open:c.value}]),name:"chevron-down",size:"sm","aria-hidden":"true"},null,8,["class"])]),_:1},8,["aria-expanded"])]),key:"0"}:void 0]),1024)]))}}),lRe=gt(rRe,[["__scopeId","data-v-f37da416"]]),aRe={class:"activity-notice",role:"status"},uRe={"aria-hidden":"true"},cRe={class:"an-label"},dRe=Qe({__name:"ActivityNotice",props:{label:{}},setup(e){return(t,n)=>(k(),E("div",aRe,[w("span",uRe,[K(p(Mi),{size:"sm"})]),w("span",cRe,F(e.label),1)]))}}),fRe=gt(dRe,[["__scopeId","data-v-cc29061f"]]),hRe=["data-turn-id"],pRe=["title"],gRe={class:"cn-head-text"},mRe={key:0,class:"cn-bubble"},vRe={class:"cn-prompt"},yRe={key:1,class:"cn-meta"},kRe=Qe({__name:"CronNotice",props:{text:{},cron:{},turnId:{},createdAt:{}},setup(e){const t=e,{t:n}=Bt(),i=L(()=>t.cron),s=L(()=>i.value?.missedCount!==void 0),o=L(()=>s.value?n("conversation.cron.missed"):n("conversation.cron.fired")),r=L(()=>{const f=i.value;return!f?.cron||f.recurring===!1?"":f.cron}),l=L(()=>s.value?"error":"ok"),a=L(()=>{const f=i.value;if(!f)return"";const h=[];return f.recurring===!1&&h.push(n("conversation.cron.oneShot")),typeof f.coalescedCount=="number"&&f.coalescedCount>1&&h.push(n("conversation.cron.coalesced",{n:f.coalescedCount})),f.missedCount!==void 0&&h.push(n("conversation.cron.missedCount",{n:f.missedCount})),f.stale===!0&&h.push(n("conversation.cron.finalDelivery")),h.join(" · ")}),u=L(()=>{const f=[o.value];return r.value&&f.push(r.value),a.value&&f.push(a.value),f.join(" · ")}),c=L(()=>{const f=i.value?.jobId;return f?n("conversation.cron.job",{id:f}):void 0}),d=L(()=>t.text??"");return(f,h)=>(k(),E("div",{class:Fe(["cn cron-notice",{"turn-anchor":!!e.turnId}]),"data-turn-id":e.turnId,role:"status"},[w("div",{class:Fe(["cn-head",l.value]),title:c.value},[K(p(ve),{name:"clock",size:"sm",class:"cn-head-ico","aria-hidden":"true"}),w("span",gRe,F(u.value),1)],10,pRe),d.value?(k(),E("div",mRe,[w("span",vRe,F(d.value),1)])):te("",!0),e.createdAt?(k(),E("div",yRe,[K(cy,{time:e.createdAt},null,8,["time"])])):te("",!0)],10,hRe))}}),bRe=gt(kRe,[["__scopeId","data-v-9f79345d"]]);let Q7=!1,xd=null,ET=!1;function ARe(){xd!==null&&(clearTimeout(xd),xd=null),Q7=!0}function CRe(){xd!==null&&clearTimeout(xd),xd=setTimeout(()=>{xd=null,Q7=!1},0)}function wRe(){ET||typeof document>"u"||(ET=!0,document.addEventListener("compositionstart",ARe,!0),document.addEventListener("compositionend",CRe,!0))}function xRe(e){return Q7||e.isComposing||e.keyCode===229}const SRe=/^(application\/pdf|image\/(png|jpe?g|gif|webp|avif|bmp|x-icon|vnd\.microsoft\.icon)|video\/[\w.+-]+|audio\/[\w.+-]+)$/i,_Re=/^(txt|md|markdown|log|json|ya?ml|csv|tsv|ts|mts|tsx|jsx|css|py|go|rs|java|c|h|cc|cpp|hpp|sh|zsh|sql|toml|ini|cfg|conf|vue)$/i,IRe=/^(png|jpe?g|gif|webp|avif|bmp|ico)$/i,TT="text/plain;charset=utf-8";function MRe(e,t){const n=(t??"").toLowerCase();if(SRe.test(n))return n;if(n.startsWith("text/"))return n==="text/html"?null:TT;const i=e?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]?.toLowerCase();return i===void 0?null:_Re.test(i)?TT:IRe.test(i)?`image/${i==="jpg"?"jpeg":i==="ico"?"x-icon":i}`:i==="pdf"?"application/pdf":null}async function uj(e,t,n,i){const s=MRe(n,i);if(s===null)return"unsupported";const o=window.open("","_blank");o!==null&&(o.opener=null);const r=await e.getFileBlob(t).catch(()=>null);if(r===null)return o?.close(),"failed";const l=URL.createObjectURL(new Blob([r],{type:s}));if(o!==null)o.location.href=l;else{const a=document.createElement("a");a.href=l,a.download=n??t,a.click()}return setTimeout(()=>{URL.revokeObjectURL(l)},6e4),"previewed"}/*! + * PhotoSwipe 5.4.4 - https://photoswipe.com + * (c) 2024 Dmytro Semenov + */function jr(e,t,n){const i=document.createElement(t);return e&&(i.className=e),n&&n.appendChild(i),i}function Bs(e,t){return e.x=t.x,e.y=t.y,t.id!==void 0&&(e.id=t.id),e}function cj(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function J8(e,t){const n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.sqrt(n*n+i*i)}function jp(e,t){return e.x===t.x&&e.y===t.y}function rg(e,t,n){return Math.min(Math.max(e,t),n)}function _0(e,t,n){let i=`translate3d(${e}px,${t||0}px,0)`;return n!==void 0&&(i+=` scale3d(${n},${n},1)`),i}function Sd(e,t,n,i){e.style.transform=_0(t,n,i)}const ERe="cubic-bezier(.4,0,.22,1)";function dj(e,t,n,i){e.style.transition=t?`${t} ${n}ms ${i||ERe}`:"none"}function X8(e,t,n){e.style.width=typeof t=="number"?`${t}px`:t,e.style.height=typeof n=="number"?`${n}px`:n}function TRe(e){dj(e)}function LRe(e){return"decode"in e?e.decode().catch(()=>{}):e.complete?Promise.resolve(e):new Promise((t,n)=>{e.onload=()=>t(e),e.onerror=n})}const rl={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function NRe(e){return"button"in e&&e.button===1||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}function FRe(e,t,n=document){let i=[];if(e instanceof Element)i=[e];else if(e instanceof NodeList||Array.isArray(e))i=Array.from(e);else{const s=typeof e=="string"?e:t;s&&(i=Array.from(n.querySelectorAll(s)))}return i}function LT(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let fj=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{fj=!0}}))}catch{}class DRe{constructor(){this._pool=[]}add(t,n,i,s){this._toggleListener(t,n,i,s)}remove(t,n,i,s){this._toggleListener(t,n,i,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,n,i,s,o,r){if(!t)return;const l=o?"removeEventListener":"addEventListener";n.split(" ").forEach(u=>{if(u){r||(o?this._pool=this._pool.filter(d=>d.type!==u||d.listener!==i||d.target!==t):this._pool.push({target:t,type:u,listener:i,passive:s}));const c=fj?{passive:s||!1}:!1;t[l](u,i,c)}})}}function hj(e,t){if(e.getViewportSizeFn){const n=e.getViewportSizeFn(e,t);if(n)return n}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function lp(e,t,n,i,s){let o=0;if(t.paddingFn)o=t.paddingFn(n,i,s)[e];else if(t.padding)o=t.padding[e];else{const r="padding"+e[0].toUpperCase()+e.slice(1);t[r]&&(o=t[r])}return Number(o)||0}function pj(e,t,n,i){return{x:t.x-lp("left",e,t,n,i)-lp("right",e,t,n,i),y:t.y-lp("top",e,t,n,i)-lp("bottom",e,t,n,i)}}class $Re{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:n}=this.slide,i=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,o=lp(t==="x"?"left":"top",n.options,n.viewportSize,this.slide.data,this.slide.index),r=this.slide.panAreaSize[t];this.center[t]=Math.round((r-i)/2)+o,this.max[t]=i>r?Math.round(r-i)+o:this.center[t],this.min[t]=i>r?o:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,n){return rg(n,this.max[t],this.min[t])}}const NT=4e3;class gj{constructor(t,n,i,s){this.pswp=s,this.options=t,this.itemData=n,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,n,i){const s={x:t,y:n};this.elementSize=s,this.panAreaSize=i;const o=i.x/s.x,r=i.y/s.y;this.fit=Math.min(1,o<r?o:r),this.fill=Math.min(1,o>r?o:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const n=t+"ZoomLevel",i=this.options[n];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>NT&&(t=NT/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}class BRe{constructor(t,n,i){this.data=t,this.index=n,this.pswp=i,this.isActive=n===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new gj(i.options,t,n,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:n}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=jr("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new $Re(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;this.heavyAppended||!t.opener.isOpen||t.mainScroll.isShifted()||!this.isActive&&!1||this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this}))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel===this.zoomLevels.initial||!this.isActive?(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}updateContentSize(t){const n=this.currentResolution||this.zoomLevels.initial;if(!n)return;const i=Math.round(this.width*n)||this.pswp.viewportSize.x,s=Math.round(this.height*n)||this.pswp.viewportSize.y;!this.sizeChanged(i,s)&&!t||this.content.setDisplayedSize(i,s)}sizeChanged(t,n){return t!==this.prevDisplayedWidth||n!==this.prevDisplayedHeight?(this.prevDisplayedWidth=t,this.prevDisplayedHeight=n,!0):!1}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}zoomTo(t,n,i,s){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:n,transitionDuration:i}),o.animations.stopAllPan();const r=this.currZoomLevel;s||(t=rg(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",n,r),this.pan.y=this.calculateZoomToPanOffset("y",n,r),cj(this.pan);const l=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:l,duration:i,easing:o.options.easing}):l()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,n,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];n||(n=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const o=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-n[t])*o+n[t])}panTo(t,n){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",n),this.applyCurrentZoomPan()}isPannable(){return!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),Bs(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,n,i){i/=this.currentResolution||this.zoomLevels.initial,Sd(this.container,t,n,i)}calculateSize(){const{pswp:t}=this;Bs(this.panAreaSize,pj(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return _0(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const zRe=.35,RRe=.6,FT=.4,DT=.5;function ORe(e,t){return e*t/(1-t)}class PRe{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&Bs(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:n,dragAxis:i}=this.gestures,{currSlide:s}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const o=s.pan.y+(t.y-n.y);if(!this.pswp.dispatch("verticalDrag",{panY:o}).defaultPrevented){this._setPanWithFriction("y",o,RRe);const r=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(r),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(cj(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:n,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),n.isShifted()){const r=(n.x-n.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-DT&&r<0||t.x<.1&&r<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>DT&&r>0||t.x>-.1&&r>.5)&&(s=-1,t.x=Math.max(t.x,0)),n.moveIndexBy(s,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:n}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:o}=i,r=s[t],l=this.pswp.bgOpacity<1&&t==="y",u=r+ORe(n[t],.995);if(l){const g=this._getVerticalDragRatio(r),m=this._getVerticalDragRatio(u);if(g<0&&m<-FT||g>0&&m>FT){this.pswp.close();return}}const c=o.correctPan(t,u);if(r===c)return;const d=c===u?1:.82,f=this.pswp.bgOpacity,h=c-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:c,velocity:n[t],dampingRatio:d,onUpdate:g=>{if(l&&this.pswp.bgOpacity<1){const m=1-(c-g)/h;this.pswp.applyBgOpacity(rg(f+(1-f)*m,0,1))}s[t]=Math.floor(g),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:n,dragAxis:i,prevP1:s,isMultitouch:o}=this.gestures,{currSlide:r,mainScroll:l}=this.pswp,a=n[t]-s[t],u=l.x+a;if(!a||!r)return!1;if(t==="x"&&!r.isPannable()&&!o)return l.moveTo(u,!0),!0;const{bounds:c}=r,d=r.pan[t]+a;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!o){const f=l.getCurrSlideX(),h=l.x-f,g=a>0,m=!g;if(d>c.min[t]&&g){if(c.min[t]<=this.startPan[t])return l.moveTo(u,!0),!0;this._setPanWithFriction(t,d)}else if(d<c.max[t]&&m){if(this.startPan[t]<=c.max[t])return l.moveTo(u,!0),!0;this._setPanWithFriction(t,d)}else if(h!==0){if(h>0)return l.moveTo(Math.max(u,f),!0),!0;if(h<0)return l.moveTo(Math.min(u,f),!0),!0}else this._setPanWithFriction(t,d)}else t==="y"?!l.isShifted()&&c.min.y!==c.max.y&&this._setPanWithFriction(t,d):this._setPanWithFriction(t,d);return!1}_getVerticalDragRatio(t){var n,i;return(t-((n=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&n!==void 0?n:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,n,i){const{currSlide:s}=this.pswp;if(!s)return;const{pan:o,bounds:r}=s;if(r.correctPan(t,n)!==n||i){const a=Math.round(n-o[t]);o[t]+=a*(i||zRe)}else o[t]=n}}const jRe=.05,HRe=.15;function $T(e,t,n){return e.x=(t.x+n.x)/2,e.y=(t.y+n.y)/2,e}class WRe{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,Bs(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:n,p2:i,startP2:s,pswp:o}=this.gestures,{currSlide:r}=o;if(!r)return;const l=r.zoomLevels.min,a=r.zoomLevels.max;if(!r.isZoomable()||o.mainScroll.isShifted())return;$T(this._startZoomPoint,n,s),$T(this._zoomPoint,t,i);let u=1/J8(n,s)*J8(t,i)*this._startZoomLevel;if(u>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),u<l)if(o.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const c=1-(l-u)/(l/1.2);o.dispatch("pinchClose",{bgOpacity:c}).defaultPrevented||o.applyBgOpacity(c)}else u=l-(l-u)*HRe;else u>a&&(u=a+(u-a)*jRe);r.pan.x=this._calculatePanForZoomLevel("x",u),r.pan.y=this._calculatePanForZoomLevel("y",u),r.setZoomLevel(u),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:n}=t;(!n||n.currZoomLevel<n.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,n){const i=n/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:n}=this.gestures,{currSlide:i}=n;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);const s=i.currZoomLevel;let o,r=!0;s<i.zoomLevels.initial?o=i.zoomLevels.initial:s>i.zoomLevels.max?o=i.zoomLevels.max:(r=!1,o=s);const l=n.bgOpacity,a=n.bgOpacity<1,u=Bs({x:0,y:0},i.pan);let c=Bs({x:0,y:0},u);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,Bs(this._startPan,u)),r&&(c={x:this._calculatePanForZoomLevel("x",o),y:this._calculatePanForZoomLevel("y",o)}),i.setZoomLevel(o),c={x:i.bounds.correctPan("x",c.x),y:i.bounds.correctPan("y",c.y)},i.setZoomLevel(s);const d=!jp(c,u);if(!d&&!r&&!a){i._setResolution(o),i.applyCurrentZoomPan();return}n.animations.stopAllPan(),n.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:f=>{if(f/=1e3,d||r){if(d&&(i.pan.x=u.x+(c.x-u.x)*f,i.pan.y=u.y+(c.y-u.y)*f),r){const h=s+(o-s)*f;i.setZoomLevel(h)}i.applyCurrentZoomPan()}a&&n.bgOpacity<1&&n.applyBgOpacity(rg(l+(1-l)*f,0,1))},onComplete:()=>{i._setResolution(o),i.applyCurrentZoomPan()}})}}function BT(e){return!!e.target.closest(".pswp__container")}class qRe{constructor(t){this.gestures=t}click(t,n){const i=n.target.classList,s=i.contains("pswp__img"),o=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,n):o&&this._doClickOrTapAction("bgClick",t,n)}tap(t,n){BT(n)&&this._doClickOrTapAction("tap",t,n)}doubleTap(t,n){BT(n)&&this._doClickOrTapAction("doubleTap",t,n)}_doClickOrTapAction(t,n,i){var s;const{pswp:o}=this.gestures,{currSlide:r}=o,l=t+"Action",a=o.options[l];if(!o.dispatch(l,{point:n,originalEvent:i}).defaultPrevented){if(typeof a=="function"){a.call(o,n,i);return}switch(a){case"close":case"next":o[a]();break;case"zoom":r?.toggleZoom(n);break;case"zoom-or-close":r!=null&&r.isZoomable()&&r.zoomLevels.secondary!==r.zoomLevels.initial?r.toggleZoom(n):o.options.clickToCloseNonZoomable&&o.close();break;case"toggle-controls":(s=this.gestures.pswp.element)===null||s===void 0||s.classList.toggle("pswp--ui-visible");break}}}}const URe=10,KRe=300,VRe=25;class ZRe{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new PRe(this),this.zoomLevels=new WRe(this),this.tapHandler=new qRe(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,n,i,s){const{pswp:o}=this,{events:r}=o,l=s?t+s:"";r.add(o.scrollWrap,t+n,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+i,this.onPointerUp.bind(this)),l&&r.add(o.scrollWrap,l,this.onPointerUp.bind(this))}onPointerDown(t){const n=t.type==="mousedown"||t.pointerType==="mouse";if(n&&t.button>0)return;const{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(n&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,Bs(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,Bs(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?jp(this.p1,this.prevP1)||this.drag.change():(!jp(this.p1,this.prevP1)||!jp(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const n=Date.now(),i=n-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=n,Bs(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:n}=this.pswp;if(n.isShifted()){n.moveIndexBy(0,!0);return}if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse"){this.tapHandler.click(this.startP1,t);return}const i=this.pswp.options.doubleTapAction?KRe:0;this._tapTimer?(this._clearTapTimer(),J8(this._lastStartP1,this.startP1)<VRe&&this.tapHandler.doubleTap(this.startP1,t)):(Bs(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,n){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&n>5?i/n:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,n){this.pswp.applyFilters("preventPointerEvent",!0,t,n)&&t.preventDefault()}_updatePoints(t,n){if(this._pointerEventEnabled){const i=t,s=this._ongoingPointers.findIndex(o=>o.id===i.pointerId);n==="up"&&s>-1?this._ongoingPointers.splice(s,1):n==="down"&&s===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&Bs(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&Bs(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),n==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){Bs(this.prevP1,this.p1),Bs(this.prevP2,this.p2)}_updateStartPoints(){Bs(this.startP1,this.p1),Bs(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(t!==0){const n=t>0?"x":"y";Math.abs(this.p1[n]-this.startP1[n])>=URe&&(this.dragAxis=n)}}}_convertEventPosToPoint(t,n){return n.x=t.pageX-this.pswp.offset.x,n.y=t.pageY-this.pswp.offset.y,"pointerId"in t?n.id=t.pointerId:t.identifier!==void 0&&(n.id=t.identifier),n}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const GRe=.35;class QRe{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:n}=this,i=Math.round(n.viewportSize.x+n.viewportSize.x*n.options.spacing),s=i!==this.slideWidth;s&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((o,r)=>{s&&Sd(o.el,(r+this._containerShiftIndex)*this.slideWidth),t&&o.slide&&o.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const n=jr("pswp__item","div",this.pswp.container);n.setAttribute("role","group"),n.setAttribute("aria-roledescription","slide"),n.setAttribute("aria-hidden","true"),n.style.display=t===1?"block":"none",this.itemHolders.push({el:n})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,n,i){const{pswp:s}=this;let o=s.potentialIndex+t;const r=s.getNumItems();if(s.canLoop()){o=s.getLoopedIndex(o);const a=(t+r)%r;a<=r/2?t=a:t=a-r}else o<0?o=0:o>=r&&(o=r-1),t=o-s.potentialIndex;s.potentialIndex=o,this._currPositionIndex-=t,s.animations.stopMainScroll();const l=this.getCurrSlideX();if(!n)this.moveTo(l),this.updateCurrItem();else{s.animations.startSpring({isMainScroll:!0,start:this.x,end:l,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:u=>{this.moveTo(u)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let a=s.potentialIndex-s.currIndex;if(s.canLoop()){const u=(a+r)%r;u<=r/2?a=u:a=u-r}Math.abs(a)>1&&this.updateCurrItem()}return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:n}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,n.currIndex=n.potentialIndex;let s=Math.abs(i),o;s>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),s=3,this.itemHolders.forEach(r=>{var l;(l=r.slide)===null||l===void 0||l.destroy(),r.slide=void 0}));for(let r=0;r<s;r++)i>0?(o=this.itemHolders.shift(),o&&(this.itemHolders[2]=o,this._containerShiftIndex++,Sd(o.el,(this._containerShiftIndex+2)*this.slideWidth),n.setContent(o,n.currIndex-s+r+2))):(o=this.itemHolders.pop(),o&&(this.itemHolders.unshift(o),this._containerShiftIndex--,Sd(o.el,this._containerShiftIndex*this.slideWidth),n.setContent(o,n.currIndex+s-r-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),n.animations.stopAllPan(),this.itemHolders.forEach((r,l)=>{r.slide&&r.slide.setIsActive(l===1)}),n.currSlide=(t=this.itemHolders[1])===null||t===void 0?void 0:t.slide,n.contentLoader.updateLazy(i),n.currSlide&&n.currSlide.applyCurrentZoomPan(),n.dispatch("change")}moveTo(t,n){if(!this.pswp.canLoop()&&n){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+s*GRe)}this.x=t,this.pswp.container&&Sd(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:n??!1})}}const YRe={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},rd=(e,t)=>t?e:YRe[e];class JRe{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const n=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&n&&this._wasFocused&&n.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:n}=this;if(n.dispatch("keydown",{originalEvent:t}).defaultPrevented||NRe(t))return;let i,s,o=!1;const r="key"in t;switch(r?t.key:t.keyCode){case rd("Escape",r):n.options.escKey&&(i="close");break;case rd("z",r):i="toggleZoom";break;case rd("ArrowLeft",r):s="x";break;case rd("ArrowUp",r):s="y";break;case rd("ArrowRight",r):s="x",o=!0;break;case rd("ArrowDown",r):o=!0,s="y";break;case rd("Tab",r):this._focusRoot();break}if(s){t.preventDefault();const{currSlide:l}=n;n.options.arrowKeys&&s==="x"&&n.getNumItems()>1?i=o?"next":"prev":l&&l.currZoomLevel>l.zoomLevels.fit&&(l.pan[s]+=o?-80:80,l.panTo(l.pan.x,l.pan.y))}i&&(t.preventDefault(),n[i]())}_onFocusIn(t){const{template:n}=this.pswp;n&&document!==t.target&&n!==t.target&&!n.contains(t.target)&&n.focus()}}const XRe="cubic-bezier(.4,0,.22,1)";class eOe{constructor(t){var n;this.props=t;const{target:i,onComplete:s,transform:o,onFinish:r=()=>{},duration:l=333,easing:a=XRe}=t;this.onFinish=r;const u=o?"transform":"opacity",c=(n=t[u])!==null&&n!==void 0?n:"";this._target=i,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{dj(i,u,l,a),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},l+500),i.style[u]=c},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),TRe(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const tOe=12,nOe=.75;class iOe{constructor(t,n,i){this.velocity=t*1e3,this._dampingRatio=n||nOe,this._naturalFrequency=i||tOe,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,n){let i=0,s;n/=1e3;const o=Math.E**(-this._dampingRatio*this._naturalFrequency*n);if(this._dampingRatio===1)s=this.velocity+this._naturalFrequency*t,i=(t+s*n)*o,this.velocity=i*-this._naturalFrequency+s*o;else if(this._dampingRatio<1){s=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const r=Math.cos(this._dampedFrequency*n),l=Math.sin(this._dampedFrequency*n);i=o*(t*r+s*l),this.velocity=i*-this._naturalFrequency*this._dampingRatio+o*(-this._dampedFrequency*t*l+this._dampedFrequency*s*r)}return i}}class sOe{constructor(t){this.props=t,this._raf=0;const{start:n,end:i,velocity:s,onUpdate:o,onComplete:r,onFinish:l=()=>{},dampingRatio:a,naturalFrequency:u}=t;this.onFinish=l;const c=new iOe(s,a,u);let d=Date.now(),f=n-i;const h=()=>{this._raf&&(f=c.easeFrame(f,Date.now()-d),Math.abs(f)<1&&Math.abs(c.velocity)<50?(o(i),r&&r(),this.onFinish()):(d=Date.now(),o(f+i),this._raf=requestAnimationFrame(h)))};this._raf=requestAnimationFrame(h)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class oOe{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,n){const i=n?new sOe(t):new eOe(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const n=this.activeAnimations.indexOf(t);n>-1&&this.activeAnimations.splice(n,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isPan?(t.destroy(),!1):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isMainScroll?(t.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}class rOe{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:n}=this.pswp;let{deltaX:i,deltaY:s}=t;if(n&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(n.isZoomable()){let o=-s;t.deltaMode===1?o*=.05:o*=t.deltaMode?1:.002,o=2**o;const r=n.currZoomLevel*o;n.zoomTo(r,{x:t.clientX,y:t.clientY})}}else n.isPannable()&&(t.deltaMode===1&&(i*=18,s*=18),n.panTo(n.pan.x-i,n.pan.y-s))}}function lOe(e){if(typeof e=="string")return e;if(!e||!e.isCustomSVG)return"";const t=e;let n='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return n=n.split("%d").join(t.size||32),t.outlineID&&(n+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),n+=t.inner,n+="</svg>",n}class aOe{constructor(t,n){var i;const s=n.name||n.className;let o=n.html;if(t.options[s]===!1)return;typeof t.options[s+"SVG"]=="string"&&(o=t.options[s+"SVG"]),t.dispatch("uiElementCreate",{data:n});let r="";n.isButton?(r+="pswp__button ",r+=n.className||`pswp__button--${n.name}`):r+=n.className||`pswp__${n.name}`;let l=n.isButton?n.tagName||"button":n.tagName||"div";l=l.toLowerCase();const a=jr(r,l);if(n.isButton){l==="button"&&(a.type="button");let{title:d}=n;const{ariaLabel:f}=n;typeof t.options[s+"Title"]=="string"&&(d=t.options[s+"Title"]),d&&(a.title=d);const h=f||d;h&&a.setAttribute("aria-label",h)}a.innerHTML=lOe(o),n.onInit&&n.onInit(a,t),n.onClick&&(a.onclick=d=>{typeof n.onClick=="string"?t[n.onClick]():typeof n.onClick=="function"&&n.onClick(d,a,t)});const u=n.appendTo||"bar";let c=t.element;u==="bar"?(t.topBar||(t.topBar=jr("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),c=t.topBar):(a.classList.add("pswp__hide-on-close"),u==="wrapper"&&(c=t.scrollWrap)),(i=c)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",a,n))}}function mj(e,t,n){e.classList.add("pswp__button--arrow"),e.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(n?e.disabled=!(t.currIndex<t.getNumItems()-1):e.disabled=!(t.currIndex>0))})}const uOe={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:mj},cOe={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(e,t)=>{mj(e,t,!0)}},dOe={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},fOe={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},hOe={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(e,t)=>{let n,i=null;const s=(l,a)=>{e.classList.toggle("pswp__preloader--"+l,a)},o=l=>{n!==l&&(n=l,s("active",l))},r=()=>{var l;if(!((l=t.currSlide)!==null&&l!==void 0&&l.content.isLoading())){o(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var a;o(!!(!((a=t.currSlide)===null||a===void 0)&&a.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",r),t.on("loadComplete",l=>{t.currSlide===l.slide&&r()}),t.ui&&(t.ui.updatePreloaderVisibility=r)}},pOe={name:"counter",order:5,onInit:(e,t)=>{t.on("change",()=>{e.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function zT(e,t){e.classList.toggle("pswp--zoomed-in",t)}class gOe{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[dOe,uOe,cOe,fOe,hOe,pOe],t.dispatch("uiRegister"),this.uiElementsData.sort((n,i)=>(n.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(n=>{this.registerElement(n)}),t.on("change",()=>{var n;(n=t.element)===null||n===void 0||n.classList.toggle("pswp--one-slide",t.getNumItems()===1)}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new aOe(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:n,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!n)return;let{currZoomLevel:s}=n;if(this.pswp.opener.isOpen||(s=n.zoomLevels.initial),s===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const o=n.zoomLevels.initial-n.zoomLevels.secondary;if(Math.abs(o)<.01||!n.isZoomable()){zT(t,!1),t.classList.remove("pswp--zoom-allowed");return}t.classList.add("pswp--zoom-allowed");const r=s===n.zoomLevels.initial?n.zoomLevels.secondary:n.zoomLevels.initial;zT(t,r<=s),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--click-to-zoom")}}function mOe(e){const t=e.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function vOe(e,t,n){const i=e.getBoundingClientRect(),s=i.width/t,o=i.height/n,r=s>o?s:o,l=(i.width-t*r)/2,a=(i.height-n*r)/2,u={x:i.left+l,y:i.top+a,w:t*r};return u.innerRect={w:i.width,h:i.height,x:l,y:a},u}function yOe(e,t,n){const i=n.dispatch("thumbBounds",{index:e,itemData:t,instance:n});if(i.thumbBounds)return i.thumbBounds;const{element:s}=t;let o,r;if(s&&n.options.thumbSelector!==!1){const l=n.options.thumbSelector||"img";r=s.matches(l)?s:s.querySelector(l)}return r=n.applyFilters("thumbEl",r,t,e),r&&(t.thumbCropped?o=vOe(r,t.width||t.w||0,t.height||t.h||0):o=mOe(r)),n.applyFilters("thumbBounds",o,t,e)}class kOe{constructor(t,n){this.type=t,this.defaultPrevented=!1,n&&Object.assign(this,n)}preventDefault(){this.defaultPrevented=!0}}class bOe{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,n,i=100){var s,o,r;this._filters[t]||(this._filters[t]=[]),(s=this._filters[t])===null||s===void 0||s.push({fn:n,priority:i}),(o=this._filters[t])===null||o===void 0||o.sort((l,a)=>l.priority-a.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,n,i)}removeFilter(t,n){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==n)),this.pswp&&this.pswp.removeFilter(t,n)}applyFilters(t,...n){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(s=>{n[0]=s.fn.apply(this,n)}),n[0]}on(t,n){var i,s;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(n),(s=this.pswp)===null||s===void 0||s.on(t,n)}off(t,n){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(s=>n!==s)),(i=this.pswp)===null||i===void 0||i.off(t,n)}dispatch(t,n){var i;if(this.pswp)return this.pswp.dispatch(t,n);const s=new kOe(t,n);return(i=this._listeners[t])===null||i===void 0||i.forEach(o=>{o.call(this,s)}),s}}class AOe{constructor(t,n){if(this.element=jr("pswp__img pswp__img--placeholder",t?"img":"div",n),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,n){this.element&&(this.element.tagName==="IMG"?(X8(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=_0(0,0,t/250)):X8(this.element,t,n))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class COe{constructor(t,n,i){this.instance=n,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=rl.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,n){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new AOe(i,this.slide.container)}this.element&&!n||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=jr("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=jr("pswp__content","div"),this.element.innerHTML=this.data.html||""),n&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var n,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=(n=this.data.src)!==null&&n!==void 0?n:"",s.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=rl.LOADING,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=rl.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===rl.LOADED||this.state===rl.ERROR)&&this.removePlaceholder())}onError(){this.state=rl.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===rl.LOADING,this)}isError(){return this.state===rl.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,n){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,n),!this.instance.dispatch("contentResize",{content:this,width:t,height:n}).defaultPrevented&&(X8(this.element,t,n),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=n,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:n,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==rl.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,n=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||n>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=n+"px",t.dataset.largestUsedSize=String(n))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,n;let i=jr("pswp__error-msg","div");i.innerText=(t=(n=this.instance.options)===null||n===void 0?void 0:n.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=jr("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===rl.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||LT())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!LT()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===rl.LOADED||this.state===rl.ERROR)&&this.removePlaceholder()))}}const wOe=5;function vj(e,t,n){const i=t.createContentFromData(e,n);let s;const{options:o}=t;if(o){s=new gj(o,e,-1);let r;t.pswp?r=t.pswp.viewportSize:r=hj(o,t);const l=pj(o,r,e,n);s.update(i.width,i.height,l)}return i.lazyLoad(),s&&i.setDisplayedSize(Math.ceil(i.width*s.initial),Math.ceil(i.height*s.initial)),i}function xOe(e,t){const n=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:n}).defaultPrevented)return vj(n,t,e)}class SOe{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,wOe),this._cachedItems=[]}updateLazy(t){const{pswp:n}=this;if(n.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=n.options,s=t===void 0?!0:t>=0;let o;for(o=0;o<=i[1];o++)this.loadSlideByIndex(n.currIndex+(s?o:-o));for(o=1;o<=i[0];o++)this.loadSlideByIndex(n.currIndex+(s?-o:o))}loadSlideByIndex(t){const n=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(n);i||(i=xOe(n,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let n=this.getContentByIndex(t.index);return n||(n=this.pswp.createContentFromData(t.data,t.index),this.addToCache(n)),n.setSlide(t),n}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const n=this._cachedItems.findIndex(i=>!i.isAttached&&!i.hasSlide);n!==-1&&this._cachedItems.splice(n,1)[0].destroy()}}removeByIndex(t){const n=this._cachedItems.findIndex(i=>i.index===t);n!==-1&&this._cachedItems.splice(n,1)}getContentByIndex(t){return this._cachedItems.find(n=>n.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}}class _Oe extends bOe{getNumItems(){var t;let n=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?n=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(n=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:n});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,n){return new COe(t,this,n)}getItemData(t){var n;const i=(n=this.options)===null||n===void 0?void 0:n.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),s=i.items[t]);let o=s;o instanceof Element&&(o=this._domElementToItemData(o));const r=this.dispatch("itemData",{itemData:o||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var n,i;return(n=this.options)!==null&&n!==void 0&&n.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?FRe(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const n={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){n.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(n.srcset=i.dataset.pswpSrcset),n.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,n.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,n.w=n.width,n.h=n.height,i.dataset.pswpType&&(n.type=i.dataset.pswpType);const o=t.querySelector("img");if(o){var s;n.msrc=o.currentSrc||o.src,n.alt=(s=o.getAttribute("alt"))!==null&&s!==void 0?s:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(n.thumbCropped=!0)}return this.applyFilters("domItemData",n,t,i)}lazyLoadData(t,n){return vj(t,this,n)}}const $1=.003;class IOe{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,n=this.pswp.currSlide,{options:i}=t;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=n?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&n?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&n&&(n.zoomAndPanToInitial(),n.applyCurrentZoomPan());else{var s;this._animateRootOpacity=(s=i.showHideOpacity)!==null&&s!==void 0?s:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>$1,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String($1)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var o;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(o=this.pswp.currSlide)===null||o===void 0?void 0:o.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String($1)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String($1)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String($1)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(t=>{let n=!1,i=!0;LRe(this._placeholder).finally(()=>{n=!0,i||t(!0)}),setTimeout(()=>{i=!1,n&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var t,n;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(n=this.pswp.element)===null||n===void 0||n.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var n;this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),(n=t.currSlide)===null||n===void 0||n.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:n}=this,{innerRect:i}=this._thumbBounds,{currSlide:s,viewportSize:o}=n;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const r=-o.x+(this._thumbBounds.x-i.x)+i.w,l=-o.y+(this._thumbBounds.y-i.y)+i.h,a=o.x-i.w,u=o.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",_0(r,l)),this._animateTo(this._cropContainer2,"transform",_0(a,u))):(Sd(this._cropContainer1,r,l),Sd(this._cropContainer2,a,u))}s&&(Bs(s.pan,i||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,n,i){if(!this._duration){t.style[n]=i;return}const{animations:s}=this.pswp,o={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};o[n]=i,s.startTransition(o)}}const MOe={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};class EOe extends _Oe{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new DRe,this.animations=new oOe,this.mainScroll=new QRe(this),this.gestures=new ZRe(this),this.opener=new IOe(this),this.keyboard=new JRe(this),this.contentLoader=new SOe(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new rOe(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:n}=this.mainScroll;n[0]&&(n[0].el.style.display="block",this.setContent(n[0],this.currIndex-1)),n[2]&&(n[2].el.style.display="block",this.setContent(n[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const n=this.getNumItems();return this.options.loop&&(t>n-1&&(t-=n),t<0&&(t+=n)),rg(t,0,n-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{var n;(n=t.slide)===null||n===void 0||n.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var n;(n=this.currSlide)===null||n===void 0||n.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||t.toggleZoom()}close(){!this.opener.isOpen||this.isDestroying||(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach(n=>{var i;(i=n.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((n,i)=>{var s,o;let r=((s=(o=this.currSlide)===null||o===void 0?void 0:o.index)!==null&&s!==void 0?s:0)-1+i;if(this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(n,t,!0),i===1)){var l;this.currSlide=n.slide,(l=n.slide)===null||l===void 0||l.setIsActive(!0)}}),this.dispatch("change")}setContent(t,n,i){if(this.canLoop()&&(n=this.getLoopedIndex(n)),t.slide){if(t.slide.index===n&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(n<0||n>=this.getNumItems()))return;const s=this.getItemData(n);t.slide=new BRe(s,n,this),n===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const n=hj(this.options,this);!t&&jp(n,this._prevViewportSize)||(Bs(this._prevViewportSize,n),this.dispatch("beforeResize"),Bs(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){if(!this.hasMouse){var t;this.hasMouse=!0,(t=this.element)===null||t===void 0||t.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,n){this.offset.x=t,this.offset.y=n,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=jr("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=jr("pswp__bg","div",this.element),this.scrollWrap=jr("pswp__scroll-wrap","section",this.element),this.container=jr("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new gOe(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return yOe(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...MOe,...t}}}function TOe(e){return new Promise(t=>{const n=new Image;n.onload=()=>t(n.naturalWidth>0?{w:n.naturalWidth,h:n.naturalHeight}:null),n.onerror=()=>t(null),n.src=e})}async function LOe(e,t,n){if(n?.currentSrc&&n.naturalWidth>0)return{src:n.currentSrc,w:n.naturalWidth,h:n.naturalHeight,objectUrl:null};let i=t.url,s=null;if(t.fileId)try{const r=t.sessionId?await e.getSessionMediaBlob(t.sessionId,t.fileId):await e.getFileBlob(t.fileId);s=URL.createObjectURL(r),i=s}catch{}const o=await TOe(i);return o?{src:i,...o,objectUrl:s}:(s&&URL.revokeObjectURL(s),null)}function NOe(e){const t=(s,o)=>{const r=parseFloat(e(s));return Number.isFinite(r)&&r>0?r:o},n=t("--space-6",24),i=t("--space-8",32)+n;return{top:i,bottom:i,left:n,right:n}}function FOe(e){let t=!1,n=!1,i=null;return(async()=>{const s=await LOe(e.api,e.media,e.thumbImg);if(t){s?.objectUrl&&URL.revokeObjectURL(s.objectUrl);return}if(!s){e.onClose();return}const o=e.thumbImg?.currentSrc===s.src?e.thumbImg:null;i=new EOe({dataSource:[{src:s.src,w:s.w,h:s.h,thumbCropped:!0,...o?{msrc:o.currentSrc,element:o}:{}}],index:0,showHideAnimationType:o?"zoom":"fade",arrowPrev:!1,arrowNext:!1,counter:!1,close:!1,zoom:!1,wheelToZoom:!0,escKey:!0,trapFocus:!1,bgOpacity:1,padding:NOe(l=>getComputedStyle(document.documentElement).getPropertyValue(l))}),i.addFilter("thumbEl",l=>l?.isConnected?l:null);const r=e.media.path;i.on("uiRegister",()=>{const l=i?.ui;!l||!r||l.registerElement({name:"caption",className:"media-preview-caption",isButton:!1,appendTo:"root",onInit:a=>{a.textContent=r}})}),i.on("openingAnimationStart",()=>{_o.value+=1,e.onOpen?.()}),i.on("destroy",()=>{n=!0,_o.value=Math.max(0,_o.value-1),s.objectUrl&&URL.revokeObjectURL(s.objectUrl),e.onClose()}),i.init()})(),()=>{t=!0,i&&!n&&i.close()}}const DOe=["aria-label"],$Oe=["aria-label"],BOe={class:"media-lightbox-card"},zOe={class:"media-lightbox-frame"},ROe={key:0,class:"media-lightbox-name"},OOe=["aria-label"],POe='button:not([disabled]), video[controls], [tabindex]:not([tabindex="-1"])',jOe=Qe({__name:"MediaLightbox",props:{media:{},originImg:{}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>n.media.kind==="image"),r=L(()=>n.media.path??null),l=L(()=>r.value??(n.media.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentImage"))),a=G(null),u=G(null),c=G(!1);let d=null,f=null;function h(g){if(g.key==="Escape"){g.preventDefault(),i("close");return}if(g.key!=="Tab"||!a.value)return;const m=a.value.querySelectorAll(POe),y=m[0],A=m[m.length-1];!y||!A||(a.value.contains(document.activeElement)?g.shiftKey&&document.activeElement===y?(g.preventDefault(),A.focus()):!g.shiftKey&&document.activeElement===A&&(g.preventDefault(),y.focus()):(g.preventDefault(),(g.shiftKey?A:y).focus()))}return mn(()=>{if(o.value){f=FOe({api:uc(),media:n.media,thumbImg:n.originImg??null,onOpen:()=>{c.value=!0},onClose:()=>i("close")});return}_o.value+=1,d=document.activeElement instanceof HTMLElement?document.activeElement:null,window.addEventListener("keydown",h),u.value?.focus()}),Gn(()=>{if(f){f(),f=null;return}_o.value=Math.max(0,_o.value-1),window.removeEventListener("keydown",h),d?.focus()}),(g,m)=>(k(),de(Gr,{to:"body"},[o.value?c.value?(k(),de(p(kn),{key:1,text:p(s)("model.close")},{default:he(()=>[w("button",{type:"button",class:"media-lightbox-close","aria-label":p(s)("model.close"),onClick:m[2]||(m[2]=y=>i("close"))},[K(p(ve),{name:"close",size:"sm"})],8,OOe)]),_:1},8,["text"])):te("",!0):(k(),E("div",{key:0,ref_key:"overlayRef",ref:a,class:"media-lightbox",role:"dialog","aria-modal":"true","aria-label":l.value,onMousedown:m[1]||(m[1]=Ct(y=>i("close"),["self"]))},[K(p(kn),{text:p(s)("model.close")},{default:he(()=>[w("button",{ref_key:"closeRef",ref:u,type:"button",class:"media-lightbox-close","aria-label":p(s)("model.close"),onClick:m[0]||(m[0]=y=>i("close"))},[K(p(ve),{name:"close",size:"sm"})],8,$Oe)]),_:1},8,["text"]),w("div",BOe,[w("div",zOe,[K(q0,{url:e.media.url,kind:e.media.kind==="video"?"video":"image","file-id":e.media.fileId,"session-id":e.media.sessionId,"media-class":"media-lightbox-media",controls:e.media.kind==="video"},null,8,["url","kind","file-id","session-id","controls"])]),r.value?(k(),E("div",ROe,F(r.value),1)):te("",!0)])],40,DOe))]))}}),Y7=gt(jOe,[["__scopeId","data-v-2e2c2784"]]),HOe=["title","aria-label"],WOe={key:1,class:"media-thumb-media media-thumb-tile","aria-hidden":"true"},qOe={key:2,class:"media-thumb-badge","aria-hidden":"true"},UOe={key:3,class:"media-thumb-badge is-error","aria-hidden":"true"},KOe={key:4,class:"media-thumb-badge","aria-hidden":"true"},VOe=["aria-label"],ZOe=Qe({__name:"MediaThumb",props:{kind:{},name:{},url:{},fileId:{},sessionId:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,i=t;function s(u){i("activate",u.currentTarget.querySelector("img"))}const{t:o}=Bt(),r=L(()=>n.name?n.name:n.kind==="video"?o("composer.attachmentVideo"):o("composer.attachmentImage")),l=L(()=>n.url?.startsWith("blob:")??!1),a=L(()=>!n.url||n.kind==="video"&&n.fileId!==void 0&&!l.value);return(u,c)=>(k(),E("span",{class:Fe(["media-thumb",{"is-error":e.error,uploading:e.uploading}])},[w("button",{type:"button",class:"media-thumb-btn",title:r.value,"aria-label":r.value,onClick:s},[a.value?(k(),E("span",WOe)):(k(),de(q0,{key:0,url:e.url,kind:e.kind,"file-id":l.value?void 0:e.fileId,"session-id":l.value?void 0:e.sessionId,"media-class":"media-thumb-media",controls:!1,muted:""},null,8,["url","kind","file-id","session-id"])),e.uploading?(k(),E("span",qOe,[K(p(Mi),{size:"sm",label:p(o)("composer.uploading")},null,8,["label"])])):e.error?(k(),E("span",UOe,[K(p(ve),{name:"info",size:"sm"})])):e.kind==="video"?(k(),E("span",KOe,[K(p(ve),{name:"play",size:"sm"})])):te("",!0)],8,HOe),e.removable?(k(),de(p(kn),{key:0,text:e.removeLabel??p(o)("composer.remove")},{default:he(()=>[w("button",{type:"button",class:"media-thumb-rm","aria-label":e.removeLabel??p(o)("composer.remove"),onClick:c[0]||(c[0]=d=>i("remove"))},[K(p(ve),{name:"close",size:"sm"})],8,VOe)]),_:1},8,["text"])):te("",!0)],2))}}),yj=gt(ZOe,[["__scopeId","data-v-16b8c78d"]]),GOe=["title","data-kind"],QOe=["aria-label"],YOe={class:"att-tile"},JOe={class:"att-name"},XOe={key:1,class:"att-err"},ePe=["aria-label"],tPe=Qe({__name:"AttachmentChip",props:{kind:{},name:{},url:{},fileId:{},sessionId:{},mediaType:{},size:{},uploading:{type:Boolean,default:!1},error:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},removeLabel:{}},emits:["activate","remove"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>{const d=n.name?.match(/\.([A-Za-z0-9]{1,8})$/)?.[1]??n.mediaType?.split("/")[1]?.split("+")[0];return d?d.toUpperCase():void 0}),r=L(()=>{const c=o.value??"";return/^(txt|md|doc|docx|rtf|log)$/i.test(c)?"file-text":"file"}),l=L(()=>n.name?n.name:n.kind==="image"?s("composer.attachmentImage"):n.kind==="video"?s("composer.attachmentVideo"):s("composer.attachmentFile"));function a(c){return c<1024?`${c} B`:c<1024*1024?`${Math.round(c/1024)} KB`:`${(c/(1024*1024)).toFixed(1)} MB`}const u=L(()=>{const c=[l.value];return n.size!==void 0&&c.push(a(n.size)),c.join(" · ")});return(c,d)=>(k(),E("span",{class:Fe(["att-chip",{"is-error":e.error,uploading:e.uploading}]),title:u.value,"data-kind":e.kind},[w("button",{type:"button",class:"att-activate","aria-label":u.value,onClick:d[0]||(d[0]=f=>i("activate"))},[w("span",YOe,[e.kind==="image"&&e.url?(k(),de(q0,{key:0,url:e.url,kind:"image",alt:e.name,"file-id":e.fileId,"session-id":e.sessionId,"media-class":"att-thumb"},null,8,["url","alt","file-id","session-id"])):e.kind==="video"?(k(),de(p(ve),{key:1,name:"play",size:"sm"})):e.kind==="image"?(k(),de(p(ve),{key:2,name:"image",size:"sm"})):(k(),de(p(ve),{key:3,name:r.value,size:"sm"},null,8,["name"]))]),w("span",JOe,F(l.value),1),e.uploading?(k(),de(p(Mi),{key:0,size:"sm",label:p(s)("composer.uploading")},null,8,["label"])):e.error?(k(),E("span",XOe,[K(p(ve),{name:"info",size:"sm"})])):te("",!0)],8,QOe),e.removable?(k(),de(p(kn),{key:0,text:e.removeLabel??p(s)("composer.remove")},{default:he(()=>[w("button",{type:"button",class:"att-rm","aria-label":e.removeLabel??p(s)("composer.remove"),onClick:d[1]||(d[1]=f=>i("remove"))},[K(p(ve),{name:"close",size:"sm"})],8,ePe)]),_:1},8,["text"])):te("",!0)],10,GOe))}}),kj=gt(tPe,[["__scopeId","data-v-37de1632"]]),nPe="/assets/kimi_avatar_default-srYjF2HV.riv",iPe={key:0,class:"mascot-fallback",viewBox:"5 0 240.776 240.776","aria-hidden":"true"},sPe="light/dark",oPe="click_avator",rPe="hoverspace",lPe=Qe({__name:"KimiMascot",setup(e){const t=G(!1),n=G(null),i=jy();let s=null,o=null,r=null;function l(){s!==null&&Yx(s,sPe,i.value?1:0)}mn(async()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)try{const[{Rive:c,RuntimeLoader:d},f,h]=await Promise.all([vs(()=>import("./rive-CeXCFBdn.js").then(b=>b.r),__vite__mapDeps([10,5])),vs(()=>import("./rive-BxcgqsjB.js"),[]).then(b=>b.default),vs(()=>import("./rive_fallback-ByshBW-N.js"),[]).then(b=>b.default)]),g=n.value;if(!g)return;d.setWasmUrl(f),d.setWasmFallbackUrl(h);const m=new c({canvas:g,src:nPe,autoplay:!0,onLoad(){const b=m.stateMachineNames[0];b!==void 0&&m.play(b),requestAnimationFrame(()=>{n.value&&(l(),m.resizeDrawingSurfaceToCanvas(),r=GD(m,g),t.value=!0)})}});s=m;const y=qe(i,l),A=()=>m.resizeDrawingSurfaceToCanvas();window.addEventListener("resize",A),o=()=>{r?.(),r=null,y(),window.removeEventListener("resize",A),m.cleanup(),s=null}}catch{}}),Gn(()=>{o?.(),o=null});function a(c){s!==null&&Yx(s,rPe,c)}function u(){s!==null&&lre(s,oPe)}return(c,d)=>(k(),E("div",{class:"mascot-host",role:"img","aria-label":"Kimi mascot",onPointerenter:d[0]||(d[0]=f=>a(!0)),onPointerleave:d[1]||(d[1]=f=>a(!1)),onClick:u},[t.value?te("",!0):(k(),E("svg",iPe,[...d[2]||(d[2]=[mc('<defs data-v-27600ac7><radialGradient id="mascot-body-gradient" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(125.388 105.735) scale(121.866)" data-v-27600ac7><stop stop-color="#117DFB" data-v-27600ac7></stop><stop stop-color="#449BFF" offset="0.759254" data-v-27600ac7></stop><stop stop-color="#77B6FF" offset="1" data-v-27600ac7></stop></radialGradient></defs><g data-v-27600ac7><path d="M125.388 0C191.877 0 245.776 53.8995 245.776 120.388C245.776 186.877 191.877 240.776 125.388 240.776C58.8996 240.776 5 186.877 5 120.388C5 53.8995 58.8996 0 125.388 0Z" fill="#2389FF" data-v-27600ac7></path><path d="M125.388 0C191.877 0 245.776 53.8995 245.776 120.388C245.776 186.877 191.877 240.776 125.388 240.776C58.8996 240.776 5 186.877 5 120.388C5 53.8995 58.8996 0 125.388 0Z" fill="url(#mascot-body-gradient)" data-v-27600ac7></path></g><g transform="translate(-33.4 0)" data-v-27600ac7><g transform="rotate(7.8 127.94 83.94)" data-v-27600ac7><path d="M111.089 73.2179C109.935 64.8166 115.756 57.078 124.091 55.9333C132.426 54.7886 140.117 60.6713 141.271 69.0726L144.785 94.6564C145.939 103.058 140.118 110.796 131.783 111.941C123.449 113.086 115.757 107.203 114.603 98.8018L111.089 73.2179Z" fill="#FFFFFF" data-v-27600ac7></path></g><g transform="translate(0 8.5) rotate(7.8 189.67 75.44)" data-v-27600ac7><path d="M174.422 65.1492C173.326 57.1679 178.518 49.8626 186.019 48.8324C193.52 47.8021 200.489 53.4371 201.586 61.4184L204.924 85.723C206.02 93.7042 200.828 101.01 193.327 102.04C185.825 103.07 178.856 97.435 177.76 89.4538L174.422 65.1492Z" fill="#FFFFFF" data-v-27600ac7></path></g></g>',3)])])),w("canvas",{ref_key:"canvasRef",ref:n,class:Fe(["mascot-canvas",{ready:t.value}])},null,2)],32))}}),aPe=gt(lPe,[["__scopeId","data-v-27600ac7"]]),uPe={class:"working-indicator",role:"status"},cPe={class:"wi-mascot","aria-hidden":"true"},dPe={class:"wi-label"},fPe=Qe({__name:"WorkingIndicator",props:{label:{}},setup(e){return(t,n)=>(k(),E("div",uPe,[w("span",cPe,[K(aPe)]),w("span",dPe,F(e.label),1)]))}}),bj=gt(fPe,[["__scopeId","data-v-8abb44ef"]]),hPe={key:0,class:"chat-loading"},pPe={class:"chat-loading-text"},gPe={key:1,class:"chat-empty"},mPe={key:1,class:"top-sentinel-text"},vPe={key:0,class:"u-turn"},yPe=["data-turn-id"],kPe={key:0,class:"u-media"},bPe={key:1,class:"u-atts"},APe={key:2,class:"skill-act"},CPe={class:"skill-act-head"},wPe=["data-mention-name"],xPe=["innerHTML"],SPe={class:"mention-pill-name"},_Pe={key:3,class:"skill-act"},IPe={class:"skill-act-head"},MPe=["aria-expanded","onClick"],EPe={key:0,class:"u-meta"},TPe=["aria-label","onClick"],LPe={class:"u-edit-hint"},NPe=["aria-label","onClick"],FPe=["aria-label","onClick"],DPe=["data-turn-id"],$Pe=["onClick"],BPe={class:"cd-view"},zPe={key:1,class:"cd-label"},RPe=["data-turn-id"],OPe={key:0,class:"goal-prov"},PPe={key:1,class:"msg"},jPe={key:3,class:"a-msg-ft"},HPe={key:0,class:"a-time"},WPe=["aria-label","onClick"],qPe={key:4,class:"compact-divider",role:"separator"},UPe={class:"cd-label",role:"status"},KPe={key:3,class:"turn-failed",role:"alert"},VPe={class:"tf-chip","aria-hidden":"true"},ZPe={class:"tf-main"},GPe={class:"tf-title"},QPe=["title"],YPe=["title"],JPe={key:5,class:"sending-placeholder"},XPe={key:6,class:"q-stack"},eje={class:"q-head"},tje={class:"q-title"},nje={class:"q-hint"},ije=["onDragover","onDrop"],sje={class:"u-bub q-bub"},oje=["title","onDragstart"],rje=["title","onClick"],lje={key:0,class:"u-text q-text"},aje={key:1,class:"q-text q-text-placeholder"},uje=["aria-expanded","onClick"],cje={key:0,class:"q-imgs"},dje={key:0,class:"q-file"},fje={key:1,class:"q-tag q-tag-next"},hje={key:2,class:"q-tag q-tag-idx"},pje=["aria-label","onClick"],gje={key:0,class:"open-unsupported",role:"status"},mje=2500,vje=10,yje=Qe({__name:"ChatPane",props:{turns:{},cwd:{},turnFilesInteractive:{type:Boolean,default:!0},approvals:{default:()=>[]},questions:{default:()=>[]},turnActive:{type:Boolean,default:!1},working:{type:Boolean,default:!1},sessionLoading:{type:Boolean},compaction:{default:null},hasMoreMessages:{type:Boolean,default:!1},loadingMore:{type:Boolean,default:!1},loadingMoreError:{type:Boolean,default:!1},isFollowing:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},inspector:{type:Boolean,default:!1},queued:{default:()=>[]},undoHintTurnId:{default:null},interruptedTurnId:{default:null},turnFailed:{type:Boolean,default:!1},turnError:{default:null},turnRetry:{default:null}},emits:["openFile","openMedia","openTurnDiff","copyConversationCopied","openCompaction","openAgent","editMessage","armedUndo","loadOlderMessages","unqueue","editQueued","reorderQueue","resumeTurn"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=k9("skill","",""),{confirm:o}=Ic();Mn(()=>{le!==null&&(clearTimeout(le),le=null),Z!==null&&(clearTimeout(Z),Z=null),ee!==null&&(clearTimeout(ee),ee=null),Ut!==null&&(clearTimeout(Ut),Ut=null)});const r=e,l=G(null);let a=null;function u(){!l.value||typeof IntersectionObserver>"u"||(a?.disconnect(),a=new IntersectionObserver(Ue=>{Ue[0]?.isIntersecting&&r.hasMoreMessages&&!r.loadingMore&&!r.loadingMoreError&&!r.sessionLoading&&!r.isFollowing&&b("loadOlderMessages")},{root:null,rootMargin:"200px 0px 0px 0px",threshold:0}),a.observe(l.value))}mn(u),Mn(()=>{a?.disconnect(),a=null});const c=G(null);let d=null;mn(()=>{d=eDe(()=>c.value)}),Mn(()=>{d?.(),d=null}),qe(()=>[r.hasMoreMessages,r.loadingMore,r.loadingMoreError],()=>{kt().then(u)});const f=L(()=>{if(!r.turnActive||r.turns.length===0)return null;const Ue=r.turns.at(-1);return Ue.role==="assistant"?Ue.id:null}),h=L(()=>{const Ue=new Map;for(const st of r.turns){if(st.role!=="assistant"||st.id===f.value)continue;const ct=MBe(st);ct.length>0&&Ue.set(st.id,ct)}return Ue}),g=L(()=>r.working),m=L(()=>{const Ue=r.turnRetry;if(Ue!=null)return i("conversation.workingRetry",{n:Ue.nextAttempt,max:Ue.maxAttempts});const st=r.turns.at(-1),ct=st?.role==="assistant"&&(st.text.trim().length>0||(st.thinking?.trim().length??0)>0||(st.tools?.length??0)>0);return i(ct?"conversation.working":"conversation.requesting")}),y=L(()=>r.turnError?.code==="loop.max_steps_exceeded"?i("conversation.turnFailedMaxSteps"):i("conversation.turnFailed")),A=L(()=>{const Ue=r.turnError;if(!Ue)return"";const st=[];return Ue.code!==void 0&&Ue.code.length>0&&st.push(Ue.code),Ue.statusCode!==void 0&&st.push(`HTTP ${Ue.statusCode}`),Ue.requestId!==void 0&&Ue.requestId.length>0&&st.push(Ue.requestId),st.join(" · ")}),b=n,C=Ue=>b("openFile",Ue),v=Ue=>b("openMedia",Ue),x=Ue=>b("openAgent",Ue),S=Ue=>b("openTurnDiff",Ue),_=G(null),I=G(null);function M(Ue){return(Ue.attachments?.length??0)>0}function $(Ue){b("editQueued",Ue)}function D(Ue,st){if(_.value=Ue,!st.dataTransfer)return;st.dataTransfer.effectAllowed="move",st.dataTransfer.setData("text/plain",String(Ue));const ct=st.currentTarget?.closest(".q-turn");ct&&st.dataTransfer.setDragImage(ct,24,24)}function T(Ue,st){if(_.value===null)return;st.preventDefault(),st.dataTransfer&&(st.dataTransfer.dropEffect="move");const ct=st.currentTarget.getBoundingClientRect(),ot=st.clientY<ct.top+ct.height/2?"before":"after";I.value={index:Ue,position:ot}}function N(Ue,st){st.preventDefault();const ct=_.value,ot=I.value?.position??"before";if(_.value=null,I.value=null,ct===null)return;let sn=ot==="before"?Ue:Ue+1;ct<sn&&(sn-=1),ct!==sn&&b("reorderQueue",{from:ct,to:sn})}function O(){_.value=null,I.value=null}const P=L(()=>{for(let Ue=r.turns.length-1;Ue>=0;Ue--){const st=r.turns[Ue];if(st.goalContinuation)return null;if(st.role==="user")return st.id}return null});function R(Ue){return!r.readOnly&&Ue.role==="user"&&Ue.id===P.value&&!r.working&&!Ue.pluginCommand&&!Ue.skillActivation}function q(Ue){const st=Ue.skillActivation;if(!st)return!1;const ct=z7(st.args??"").filter(ot=>ot.attrs.kind==="skill");return ct.length===1&&ct[0].attrs.name===st.name}function j(Ue){const st=Ue.compaction,ct=st?.trigger==="auto"?i("conversation.compactedAuto"):i("conversation.compactedPlain");return typeof st?.tokensBefore=="number"&&typeof st?.tokensAfter=="number"?ct+i("conversation.compactedTokens",{before:ou(st.tokensBefore),after:ou(st.tokensAfter)}):ct}const W=G(null);function z(Ue){const st=Ue.createdAt===void 0?NaN:Date.parse(Ue.createdAt),ct=Ue.endedAt??(Number.isFinite(st)&&Ue.durationMs!==void 0?new Date(st+Ue.durationMs).toISOString():Ue.createdAt);return ct===void 0?"":OD(ct,i("conversation.yesterday"))}const H=G(null);let ee=null;async function V(Ue){await o({title:i("conversation.undo"),message:i("conversation.undoConfirm"),variant:"primary"})&&ie(Ue)}function ie(Ue){H.value===null&&(H.value=Ue.id,b("editMessage",{text:Ue.text,attachments:Ue.attachments}),ee=setTimeout(()=>{ee=null,H.value=null},mje))}qe(()=>r.turns,Ue=>{H.value!==null&&(Ue.some(st=>st.id===H.value)||(H.value=null,ee!==null&&(clearTimeout(ee),ee=null)))},{flush:"post"});const se=G(!1);let Z=null;function pe(){if(r.turns.length===0)return;const Ue=[];for(const ct of r.turns){if(ct.role==="compaction"||ct.role==="cron")continue;const ot=ct.role==="user"?"User":"Assistant",sn=wBe(ct);sn.trim()&&Ue.push(`**${ot}** + +${sn}`)}const st=Ue.join(` + +--- + +`);ao(st).then(ct=>{ct&&(se.value=!0,b("copyConversationCopied"),Z!==null&&clearTimeout(Z),Z=setTimeout(()=>{Z=null,se.value=!1},2e3))}).catch(()=>{})}function re(Ue){const st=[];for(let ct=Ue;ct>=0;ct--){const ot=r.turns[ct];if(!ot||ot.role!=="assistant")break;st.unshift(ot)}return st}function fe(Ue){return re(Ue).map(st=>CBe(st)).filter(Boolean).join(` + +`)}function Ee(Ue){return re(Ue).some(Y8)}function X(){for(let Ue=r.turns.length-1;Ue>=0;Ue-=1)if(r.turns[Ue]?.role==="assistant")return fe(Ue);return""}function we(){const Ue=X();Ue.trim()&&ao(Ue).then(st=>{st&&(se.value=!0,b("copyConversationCopied"),Z!==null&&clearTimeout(Z),Z=setTimeout(()=>{Z=null,se.value=!1},2e3))}).catch(()=>{})}t({copyConversation:pe,copyFinalSummary:we});function Y(Ue){const st=r.turns[Ue];if(!st||st.role!=="assistant")return!1;const ct=r.turns[Ue+1];return!ct||ct.role!=="assistant"}let le=null;function Ce(Ue){const st=r.turns[Ue];if(!st)return;const ct=fe(Ue);ct.trim()&&ao(ct).then(ot=>{ot&&(W.value=st.id,le!==null&&clearTimeout(le),le=setTimeout(()=>{le=null,W.value=null},1400))}).catch(()=>{})}function ae(Ue){const st=Ue.text;st.trim()&&ao(st).then(ct=>{ct&&(W.value=Ue.id,le!==null&&clearTimeout(le),le=setTimeout(()=>{le=null,W.value=null},1400))}).catch(()=>{})}const oe=Ss(new Set),Q=Ss(new Set),ne=new Map,ge=new WeakMap,Ae=cn("pinScroll",()=>{}),_e=new ResizeObserver(Ue=>{for(const st of Ue){const ct=st.target,ot=ge.get(ct);ot!==void 0&&Ke(ot,ct)}});Mn(()=>_e.disconnect());function Ke(Ue,st){const ct=parseFloat(getComputedStyle(st).lineHeight);if(!Number.isFinite(ct)||ct<=0)return;const sn=(st.textContent??"").match(/\n+$/)?.[0].length??0;st.scrollHeight-Math.max(0,sn-1)*ct>ct*vje+1?oe.add(Ue):oe.delete(Ue)}function xe(Ue,st){if(!(st instanceof HTMLElement)||ne.get(Ue)===st)return;const ct=ne.get(Ue);ct!==void 0&&_e.unobserve(ct),ne.set(Ue,st),ge.set(st,Ue),_e.observe(st),Ke(Ue,st)}function Ne(Ue){return`queue:${Ue.id}`}qe([()=>r.turns,()=>r.queued],()=>{const Ue=new Set(r.turns.map(st=>st.id));for(const st of r.queued)Ue.add(Ne(st));for(const[st,ct]of ne)Ue.has(st)||(_e.unobserve(ct),ne.delete(st),oe.delete(st),Q.delete(st))});function et(Ue){return Ue.skillActivation?Ue.skillActivation.args||null:Ue.pluginCommand?Ue.pluginCommand.args||null:Ue.text||null}function ut(Ue){return Ue.pluginCommand!==void 0||Ue.skillActivation!==void 0&&!q(Ue)}function yt(Ue){return oe.has(Ue)&&!Q.has(Ue)}function Mt(Ue,st){const ct=Q.has(Ue);ct&&st.currentTarget instanceof HTMLElement&&Ae(st.currentTarget),ct?Q.delete(Ue):Q.add(Ue)}function Ze(Ue){return Ue.kind==="image"||Ue.kind==="video"}function Ge(Ue){return(Ue.attachments??[]).filter(Ze)}function lt(Ue){return(Ue.attachments??[]).filter(st=>!Ze(st))}function tt(Ue){return{kind:Ue.kind==="video"?"video":"image",url:Ue.url,path:Ue.name,fileId:Ue.fileId,sessionId:Ue.sessionId}}const It=G(null);let Ut=null;const fn=G(null),Nn=G(null);function Qt(Ue,st){if(Ue.kind==="image"||Ue.kind==="video"){Nn.value=st??null,fn.value=tt(Ue);return}Ue.fileId!==void 0&&uj(uc(),Ue.fileId,Ue.name,Ue.mediaType).then(ct=>{ct==="unsupported"&&(It.value=Ue.name??Ue.fileId??"",Ut!==null&&clearTimeout(Ut),Ut=setTimeout(()=>{Ut=null,It.value=null},2400))})}function un(Ue,st){return Ue.id!==f.value||st.kind==="thinking"&&st.durationMs!==void 0?!1:st.sourceIndex===Qa(Ue).length-1}function Dn(Ue,st){if(Ue.id!==f.value)return!1;const ct=st.items.at(-1);return ct?.kind==="thinking"&&ct.durationMs!==void 0?!1:ct!==void 0&&ct.sourceIndex===Qa(Ue).length-1}const pn={folded:[],visible:[]};function wn(Ue){return Ue.role!=="assistant"?pn:ij(Ue)}function bn(Ue){const st=wn(Ue);return r.inspector?kBe(st):st.visible}function Xn(Ue){if(Ue.id!==f.value)return null;const st=Qa(Ue),ct=st.at(-1);if(ct?.kind==="thinking"&&ct.durationMs!==void 0)return null;if(ct?.kind==="tool"&&ct.tool.status==="running"){const ot=ct.tool.id;if(r.approvals?.some(sn=>sn.toolCallId===ot)||r.questions?.some(sn=>sn.toolCallId===ot))return null}return st.length-1}return(Ue,st)=>{const ct=WL("i18n-t");return k(),E(Te,null,[w("div",{class:"chat",ref_key:"chatRootRef",ref:c},[e.sessionLoading?(k(),E("div",hPe,[K(p(Mi),{size:"sm"}),w("span",pPe,F(p(i)("conversation.loading")),1)])):e.turns.length===0&&(!e.approvals||e.approvals.length===0)?(k(),E("div",gPe)):te("",!0),e.hasMoreMessages||e.loadingMore?(k(),E("div",{key:2,ref_key:"topSentinelRef",ref:l,class:Fe(["top-sentinel",{"top-sentinel-loading":e.loadingMore}])},[e.loadingMore?(k(),E("span",mPe,[K(p(Mi),{size:"sm"}),$e(" "+F(p(i)("conversation.loadingOlder")),1)])):(k(),E("button",{key:0,type:"button",class:"top-sentinel-btn",onClick:st[0]||(st[0]=ot=>b("loadOlderMessages"))},F(p(i)("conversation.loadOlder")),1))],2)):te("",!0),(k(!0),E(Te,null,ht(e.turns,(ot,sn)=>(k(),E(Te,{key:ot.id},[ot.role==="user"?(k(),E("div",vPe,[w("div",{class:Fe(["u-bub turn-anchor",{undoing:H.value===ot.id}]),"data-turn-id":ot.id},[Ge(ot).length>0?(k(),E("div",kPe,[(k(!0),E(Te,null,ht(Ge(ot),(Nt,Tn)=>(k(),de(yj,{key:Tn,kind:Nt.kind,name:Nt.name,url:Nt.url,"file-id":Nt.fileId,"session-id":Nt.sessionId,onActivate:fs=>Qt(Nt,fs)},null,8,["kind","name","url","file-id","session-id","onActivate"]))),128))])):te("",!0),lt(ot).length>0?(k(),E("div",bPe,[(k(!0),E(Te,null,ht(lt(ot),(Nt,Tn)=>(k(),de(kj,{key:Tn,kind:Nt.kind,name:Nt.name,url:Nt.url,"file-id":Nt.fileId,"media-type":Nt.mediaType,size:Nt.size,onActivate:fs=>Qt(Nt)},null,8,["kind","name","url","file-id","media-type","size","onActivate"]))),128))])):te("",!0),ot.skillActivation&&!q(ot)?(k(),E("div",APe,[w("div",CPe,[st[3]||(st[3]=w("span",{class:"skill-act-arrow"},"▶",-1)),K(ct,{keypath:"conversation.activatedSkill",tag:"span"},{name:he(()=>[w("span",{class:"mention-pill mention-skill","data-mention-kind":"skill","data-mention-name":ot.skillActivation.name,tabindex:"0",role:"button"},[w("span",{class:"mention-pill-icon","aria-hidden":"true",innerHTML:p(s)},null,8,xPe),w("span",SPe,F(ot.skillActivation.name),1)],8,wPe)]),_:2},1024)])])):te("",!0),ot.pluginCommand?(k(),E("div",_Pe,[w("div",IPe,[st[4]||(st[4]=w("span",{class:"skill-act-arrow"},"▶",-1)),w("span",null,"/"+F(ot.pluginCommand.pluginId)+":"+F(ot.pluginCommand.commandName),1)])])):te("",!0),et(ot)!==null?(k(),E("div",{key:4,class:Fe(["u-text-wrap",{"is-clamped":yt(ot.id),"u-text-wrap-args":ut(ot)}])},[w("div",{class:Fe(ut(ot)?"skill-act-args":"u-text"),ref_for:!0,ref:Nt=>xe(ot.id,Nt)},[K(p(vT),{text:et(ot)??"","open-file":C},null,8,["text"])],2),oe.has(ot.id)?(k(),E("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!yt(ot.id),onClick:Nt=>Mt(ot.id,Nt)},[w("span",null,F(yt(ot.id)?p(i)("conversation.userMessage.expand"):p(i)("conversation.userMessage.collapse")),1),K(p(ve),{class:"u-text-toggle-car",name:"chevron-down",size:"sm","aria-hidden":"true"})],8,MPe)):te("",!0)],2)):te("",!0)],10,yPe),ot.createdAt||R(ot)||!e.readOnly&&e.undoHintTurnId===ot.id?(k(),E("div",EPe,[R(ot)||!e.readOnly&&e.undoHintTurnId===ot.id?(k(),E("div",{key:0,class:Fe(["u-edit-wrap",{undoing:H.value===ot.id}])},[e.undoHintTurnId===ot.id?(k(),de(p(kn),{key:0,text:p(i)("conversation.undoTooltip")},{default:he(()=>[w("button",{type:"button",class:"u-edit u-edit-armed","aria-label":p(i)("conversation.undoTooltip"),onClick:Nt=>b("armedUndo",ot.id)},[K(p(ve),{name:"undo",size:"sm"}),w("span",LPe,[$e(F(p(i)("conversation.escUndoHintPre")),1),K(p(Ja),{keys:["Esc"]}),$e(F(p(i)("conversation.escUndoHintPost")),1)])],8,TPe)]),_:2},1032,["text"])):(k(),de(p(kn),{key:1,text:p(i)("conversation.undoTooltip")},{default:he(()=>[w("button",{type:"button",class:"u-edit","aria-label":p(i)("conversation.undoTooltip"),onClick:Nt=>V(ot)},[K(p(ve),{name:"undo",size:"sm"})],8,NPe)]),_:2},1032,["text"]))],2)):te("",!0),K(p(kn),{text:p(i)("filePreview.copy")},{default:he(()=>[ot.text.trim().length>0?(k(),E("button",{key:0,type:"button",class:"u-copy","aria-label":p(i)("filePreview.copy"),onClick:Ct(Nt=>ae(ot),["stop"])},[W.value!==ot.id?(k(),de(p(ve),{key:0,name:"copy",size:"sm"})):(k(),de(p(ve),{key:1,name:"check",size:"sm"}))],8,FPe)):te("",!0)]),_:2},1032,["text"]),ot.createdAt?(k(),de(cy,{key:1,time:ot.createdAt},null,8,["time"])):te("",!0)])):te("",!0)])):ot.role==="compaction"?(k(),E("div",{key:1,class:"compact-divider turn-anchor","data-turn-id":ot.id,role:"separator"},[st[5]||(st[5]=w("span",{class:"cd-line","aria-hidden":"true"},null,-1)),ot.text?(k(),E("button",{key:0,type:"button",class:"cd-label cd-btn",onClick:Nt=>b("openCompaction",{turnId:ot.id})},[w("span",null,F(j(ot)),1),w("span",BPe,F(p(i)("conversation.viewSummary")),1)],8,$Pe)):(k(),E("span",zPe,F(j(ot)),1)),st[6]||(st[6]=w("span",{class:"cd-line","aria-hidden":"true"},null,-1))],8,DPe)):ot.role==="cron"?(k(),de(bRe,{key:2,text:ot.text,cron:ot.cron,"turn-id":ot.id,"created-at":ot.createdAt},null,8,["text","cron","turn-id","created-at"])):(k(),E("div",{key:3,class:"a-msg turn-anchor","data-turn-id":ot.id},[ot.goalContinuation?(k(),E("div",OPe,[K(p(ve),{name:"target",size:"sm","aria-hidden":"true"}),w("span",null,F(p(i)("conversation.goal.continuation")),1)])):te("",!0),!e.inspector&&wn(ot).folded.length>0?(k(),de(Kze,{key:1,items:wn(ot).folded,mobile:"","streaming-tail-index":Xn(ot),live:ot.id===f.value,parked:ot.id===f.value&&Xn(ot)===null,"seed-ms":p(bBe)(p(Qa)(ot)),"created-ms":p(MT)(ot.createdAt),"ended-ms":p(MT)(ot.endedAt),"duration-ms":ot.durationMs,onOpenMedia:v,onOpenFile:C,onOpenAgent:x},null,8,["items","streaming-tail-index","live","parked","seed-ms","created-ms","ended-ms","duration-ms"])):te("",!0),(k(!0),E(Te,null,ht(bn(ot),(Nt,Tn)=>(k(),E(Te,{key:p(oj)(Nt,Tn)},[Nt.kind==="thinking"?(k(),de(G7,{key:0,text:Nt.thinking,mobile:"",streaming:un(ot,Nt),"started-at":Nt.startedAt,"duration-ms":Nt.durationMs,"force-open":e.inspector},null,8,["text","streaming","started-at","duration-ms","force-open"])):Nt.kind==="text"&&Nt.text?(k(),E("div",PPe,[K(p(lu),{text:Nt.text,streaming:un(ot,Nt),"open-file":C},null,8,["text","streaming"])])):Nt.kind==="activity-run"?(k(),de(lj,{key:2,items:Nt.items,mobile:"",streaming:Dn(ot,Nt),"force-open":e.inspector,onOpenMedia:v,onOpenFile:C,onOpenAgent:x},null,8,["items","streaming","force-open"])):Nt.kind==="tool"?(k(),de(Z7,{key:3,tool:Nt.tool,mobile:"",onOpenMedia:v,onOpenFile:C,onOpenAgent:x},null,8,["tool"])):Nt.kind==="notification"?(k(),de(aj,{key:4,items:Nt.items},null,8,["items"])):te("",!0)],64))),128)),h.value.get(ot.id)?(k(),de(lRe,{key:2,changes:h.value.get(ot.id),cwd:r.cwd,interactive:e.turnFilesInteractive,onOpenDiff:S,onOpenFile:C},null,8,["changes","cwd","interactive"])):te("",!0),!e.inspector&&ot.id!==f.value&&Y(sn)&&Ee(sn)&&(fe(sn).trim().length>0||z(ot))?(k(),E("div",jPe,[z(ot)?(k(),E("span",HPe,F(z(ot)),1)):te("",!0),K(p(kn),{text:p(i)("filePreview.copy")},{default:he(()=>[fe(sn).trim().length>0?(k(),E("button",{key:0,class:"a-cpbtn","aria-label":p(i)("filePreview.copy"),onClick:Nt=>Ce(sn)},[W.value!==ot.id?(k(),de(p(ve),{key:0,name:"copy",size:"sm"})):(k(),de(p(ve),{key:1,name:"check",size:"sm"}))],8,WPe)):te("",!0)]),_:2},1032,["text"])])):te("",!0)],8,RPe)),ot.role==="assistant"&&ot.id===e.interruptedTurnId?(k(),E("div",qPe,[st[7]||(st[7]=w("span",{class:"cd-line","aria-hidden":"true"},null,-1)),w("span",UPe,F(p(i)("conversation.turnInterrupted")),1),st[8]||(st[8]=w("span",{class:"cd-line","aria-hidden":"true"},null,-1))])):te("",!0)],64))),128)),e.turnFailed?(k(),E("div",KPe,[w("span",VPe,[K(p(ve),{name:"alert-triangle",size:"sm"})]),w("div",ZPe,[w("span",GPe,F(y.value),1),e.turnError?.message?(k(),E("span",{key:0,class:"tf-sub",title:e.turnError.message},F(e.turnError.message),9,QPe)):te("",!0),A.value?(k(),E("span",{key:1,class:"tf-meta",title:A.value},F(A.value),9,YPe)):te("",!0)]),e.readOnly?te("",!0):(k(),de(p(Zt),{key:0,variant:"secondary",size:"sm",onClick:st[1]||(st[1]=ot=>b("resumeTurn"))},{default:he(()=>[$e(F(p(i)("conversation.turnFailedResume")),1)]),_:1}))])):te("",!0),e.compaction?(k(),de(fRe,{key:4,label:p(i)("conversation.compacting")},null,8,["label"])):te("",!0),g.value?(k(),E("div",JPe,[K(bj,{label:m.value},null,8,["label"])])):te("",!0),e.queued.length>0?(k(),E("div",XPe,[w("div",eje,[w("span",tje,[K(p(ve),{name:"mail",size:"sm"}),$e(" "+F(p(i)("composer.queueLabel"))+" · ",1),w("b",null,F(e.queued.length),1)]),w("span",nje,F(p(i)("composer.queueAutoDrain")),1)]),(k(!0),E(Te,null,ht(e.queued,(ot,sn)=>(k(),E("div",{key:ot.id,class:Fe(["u-turn q-turn",{"q-dragging":_.value===sn,"drop-before":I.value?.index===sn&&I.value.position==="before","drop-after":I.value?.index===sn&&I.value.position==="after"}]),onDragover:Nt=>T(sn,Nt),onDrop:Nt=>N(sn,Nt)},[w("div",sje,[w("span",{class:"q-grip",title:p(i)("composer.queueDragTitle"),draggable:"true",onDragstart:Nt=>D(sn,Nt),onDragend:O},[K(p(ve),{name:"grip",size:"sm"})],40,oje),w("div",{class:Fe(["q-clamp u-text-wrap",{"is-clamped":yt(Ne(ot))}])},[w("button",{type:"button",class:"q-body",title:p(i)("composer.editQueued"),ref_for:!0,ref:Nt=>xe(Ne(ot),Nt),onClick:Nt=>$(sn)},[ot.text?(k(),E("span",lje,[K(p(vT),{text:ot.text,interactive:!1},null,8,["text"])])):(k(),E("span",aje,[K(p(ve),{name:"file",size:"sm"}),$e(" "+F(p(i)("composer.queuedAttachments",{n:ot.attachments?.length??0})),1)]))],8,rje),oe.has(Ne(ot))?(k(),E("button",{key:0,type:"button",class:"u-text-toggle","aria-expanded":!yt(Ne(ot)),onClick:Nt=>Mt(Ne(ot),Nt)},[w("span",null,F(yt(Ne(ot))?p(i)("conversation.userMessage.expand"):p(i)("conversation.userMessage.collapse")),1),K(p(ve),{class:"u-text-toggle-car",name:"chevron-down",size:"sm","aria-hidden":"true"})],8,uje)):te("",!0)],2),M(ot)?(k(),E("div",cje,[(k(!0),E(Te,null,ht(ot.attachments,(Nt,Tn)=>(k(),E(Te,{key:Tn},[Nt.kind==="file"?(k(),E("span",dje,[K(p(ve),{name:"file",size:"sm"}),$e(" "+F(Nt.name??Nt.fileId),1)])):(k(),de(q0,{key:1,url:Nt.url,kind:Nt.kind,"file-id":Nt.fileId,"session-id":Nt.sessionId,"media-class":"q-img",controls:!1,muted:""},null,8,["url","kind","file-id","session-id"]))],64))),128))])):te("",!0),sn===0?(k(),E("span",fje,F(p(i)("composer.queueNext")),1)):(k(),E("span",hje,"#"+F(sn+1),1)),K(p(kn),{text:p(i)("composer.remove")},{default:he(()=>[w("button",{type:"button",class:"q-rm","aria-label":p(i)("composer.remove"),onClick:Ct(Nt=>b("unqueue",sn),["stop"])},[K(p(ve),{name:"close",size:"sm"})],8,pje)]),_:2},1032,["text"])])],42,ije))),128))])):te("",!0)],512),It.value!==null?(k(),E("div",gje,F(p(i)("composer.attachmentOpenUnsupported",{name:It.value})),1)):te("",!0),fn.value?(k(),de(Y7,{key:1,media:fn.value,"origin-img":Nn.value,onClose:st[2]||(st[2]=ot=>{fn.value=null,Nn.value=null})},null,8,["media","origin-img"])):te("",!0)],64)}}}),J7=gt(yje,[["__scopeId","data-v-b75e2feb"]]),kje={class:"ch-id"},bje=["title"],Aje={key:1,class:"ch-ws"},Cje={key:2,class:"ch-sep"},wje=["onKeydown"],xje={class:"ch-ses"},Sje={key:0,class:"ch-pill ch-sync-pill"},_je={key:0,class:"ch-ahead"},Ije={key:1,class:"ch-behind"},Mje={key:1,class:"ch-pill ch-diff-pill"},Eje={key:0,class:"ch-add"},Tje={key:1,class:"ch-del"},Lje={class:"ch-pill ch-pr pr-merged ch-done-pill"},Nje=Qe({__name:"ChatHeader",props:{sessionId:{},workspaceName:{},workspaceRoot:{},sessionTitle:{},branch:{},ahead:{},behind:{},changesCount:{},gitDiffStats:{},isGitRepo:{type:Boolean},pr:{},copied:{type:Boolean},archived:{type:Boolean}},emits:["copyAll","copyFinalSummary","openChanges","openPr","renameSession","forkSession","archiveSession","restoreSession","exportSession"],setup(e,{emit:t}){const{t:n}=Bt(),{sidebarTabs:i}=Hh(),s=e,o=t,r=L(()=>s.ahead??0),l=L(()=>s.behind??0),a=L(()=>s.gitDiffStats?.totalAdditions??0),u=L(()=>s.gitDiffStats?.totalDeletions??0),c=L(()=>a.value>0||u.value>0),d={open:"header.prStatusOpen",closed:"header.prStatusClosed",merged:"header.prStatusMerged",draft:"header.prStatusDraft"};function f(Z){return Z.trim().toLowerCase().replaceAll("_","-")}function h(Z){const pe=f(Z);return d[pe]?`pr-${pe}`:"pr-unknown"}function g(Z){return n(d[f(Z)]??"header.prStatusUnknown")}const m=G(!1),y=G(null),A=G(null),b=G({});function C(Z){const pe=Z.target;A.value?.el?.contains(pe)||y.value?.el?.contains(pe)||S()}function v(){S()}async function x(Z){if(Z.stopPropagation(),m.value){S();return}m.value=!0,document.addEventListener("mousedown",C),window.addEventListener("resize",v),await kt();const pe=y.value?.el,re=A.value?.el;if(!pe||!re)return;const fe=pe.getBoundingClientRect(),Ee=4,X=8,we=re.offsetWidth,Y=re.offsetHeight;let le=fe.bottom+Ee,Ce=!1;le+Y>window.innerHeight-X&&(le=Math.max(X,fe.top-Y-Ee),Ce=!0);let ae=fe.left,oe=!1;ae+we>window.innerWidth-X&&(ae=Math.max(X,fe.right-we),oe=!0),b.value={top:`${Math.round(le)}px`,left:`${Math.round(ae)}px`,transformOrigin:`${Ce?"bottom":"top"} ${oe?"right":"left"}`,"--menu-pop-shift":Ce?"2px":"-2px"}}function S(){m.value=!1,document.removeEventListener("mousedown",C),window.removeEventListener("resize",v)}Mn(()=>{document.removeEventListener("mousedown",C),window.removeEventListener("resize",v)});function _(){o("copyAll"),S()}function I(){o("copyFinalSummary"),S()}const M=G(!1);function $(){s.sessionId&&ao(s.sessionId).then(Z=>{Z&&(M.value=!0,setTimeout(()=>{M.value=!1},1200))})}const D=G(!1),T=G(""),N=G(null),{handleCompositionStart:O,handleCompositionEnd:P,isComposingKeyEvent:R}=Xr();async function q(){if(S(),!!s.sessionId){D.value=!0,T.value=s.sessionTitle??"",await kt();try{N.value?.focus(),N.value?.select()}catch{}}}function j(){const Z=T.value.trim();Z&&s.sessionId&&Z!==(s.sessionTitle??"").trim()&&o("renameSession",s.sessionId,Z),D.value=!1}function W(Z){R(Z)||j()}function z(){D.value=!1}function H(){s.sessionId&&(S(),o("forkSession",s.sessionId))}function ee(){s.sessionId&&(S(),o("exportSession",s.sessionId))}function V(){s.sessionId&&(S(),o("archiveSession",s.sessionId))}function ie(){s.sessionId&&(S(),o("restoreSession",s.sessionId))}const se=!1;return(Z,pe)=>(k(),E("header",{class:Fe(["chat-header",{"macos-desktop":p(Gu)}])},[w("div",kje,[p(se)?(k(),E("span",{key:0,class:"ch-dev",title:p(n)("header.devBadge")},"DEV",8,bje)):te("",!0),e.workspaceName?(k(),E("span",Aje,F(e.workspaceName),1)):te("",!0),e.workspaceName&&e.sessionTitle?(k(),E("span",Cje,"/")):te("",!0),D.value?$n((k(),E("input",{key:3,ref_key:"renameInputRef",ref:N,"onUpdate:modelValue":pe[0]||(pe[0]=re=>T.value=re),class:"ch-rename",type:"text",onKeydown:[_s(Ct(W,["stop"]),["enter"]),_s(Ct(z,["stop"]),["esc"])],onCompositionstart:pe[1]||(pe[1]=(...re)=>p(O)&&p(O)(...re)),onCompositionend:pe[2]||(pe[2]=(...re)=>p(P)&&p(P)(...re)),onBlur:j,onClick:pe[3]||(pe[3]=Ct(()=>{},["stop"]))},null,40,wje)),[[uo,T.value]]):e.sessionTitle?(k(),de(p(kn),{key:4,text:e.sessionTitle},{default:he(()=>[w("span",xje,F(e.sessionTitle),1)]),_:1},8,["text"])):te("",!0)]),K(p(tn),{ref_key:"kebabRef",ref:y,class:Fe(["ch-act-more",{open:m.value}]),label:p(n)("header.options"),tooltip:p(n)("header.options"),"aria-expanded":m.value,"aria-haspopup":"menu",onClick:pe[4]||(pe[4]=Ct(re=>x(re),["stop"]))},{default:he(()=>[K(p(ve),{name:"dots-horizontal",size:"sm"})]),_:1},8,["class","label","tooltip","aria-expanded"]),K(ls,{name:"menu-pop"},{default:he(()=>[m.value?(k(),de(p(sr),{key:0,ref_key:"menuRef",ref:A,class:"ch-menu",style:qt(b.value),onClick:pe[5]||(pe[5]=Ct(()=>{},["stop"]))},{default:he(()=>[K(p(Wt),{onClick:_},{default:he(()=>[K(p(ve),{name:e.copied?"check":"copy",size:"sm"},null,8,["name"]),$e(" "+F(e.copied?p(n)("header.copied"):p(n)("header.copyAll")),1)]),_:1}),K(p(Wt),{onClick:I},{default:he(()=>[K(p(ve),{name:"file-text",size:"sm"}),$e(" "+F(p(n)("header.copyFinalSummary")),1)]),_:1}),e.sessionId?(k(),E(Te,{key:0},[K(p(Wt),{separator:""}),K(p(Wt),{onClick:$},{default:he(()=>[K(p(ve),{name:M.value?"check":"copy",size:"sm"},null,8,["name"]),$e(" "+F(M.value?p(n)("header.copied"):p(n)("header.copySessionId")),1)]),_:1}),K(p(Wt),{onClick:q},{default:he(()=>[K(p(ve),{name:"pencil",size:"sm"}),$e(" "+F(p(n)("header.renameSession")),1)]),_:1}),K(p(Wt),{onClick:H},{default:he(()=>[K(p(ve),{name:"git-fork",size:"sm"}),$e(" "+F(p(n)("header.forkSession")),1)]),_:1}),K(p(Wt),{onClick:ee},{default:he(()=>[K(p(ve),{name:"download",size:"sm"}),$e(" "+F(p(n)("header.exportSession")),1)]),_:1}),e.archived&&p(i)?(k(),de(p(Wt),{key:0,onClick:ie},{default:he(()=>[K(p(ve),{name:"undo",size:"sm"}),$e(" "+F(p(n)("header.reopenSession")),1)]),_:1})):te("",!0),e.archived?te("",!0):(k(),de(p(Wt),{key:1,onClick:V},{default:he(()=>[K(p(ve),{name:p(i)?"state-done":"archive",size:"sm"},null,8,["name"]),$e(" "+F(p(i)?p(n)("header.markSessionDone"):p(n)("header.archiveSession")),1)]),_:1}))],64)):te("",!0)]),_:1},8,["style"])):te("",!0)]),_:1}),pe[8]||(pe[8]=w("div",{class:"ch-spacer"},null,-1)),e.isGitRepo?(k(),E("button",{key:0,type:"button",class:"ch-git",onClick:pe[6]||(pe[6]=re=>o("openChanges"))},[K(p(ve),{class:"ch-branch-icon",name:"git-fork",size:"sm"}),w("span",{class:Fe(["ch-branch",{"ch-detached":!e.branch}])},F(e.branch||p(n)("header.detached")),3),r.value>0||l.value>0?(k(),E("span",Sje,[r.value>0?(k(),E("span",_je,"↑"+F(r.value),1)):te("",!0),l.value>0?(k(),E("span",Ije,"↓"+F(l.value),1)):te("",!0)])):te("",!0),c.value?(k(),E("span",Mje,[a.value>0?(k(),E("span",Eje,"+"+F(a.value),1)):te("",!0),u.value>0?(k(),E("span",Tje,"-"+F(u.value),1)):te("",!0)])):te("",!0)])):te("",!0),e.pr?(k(),E("button",{key:1,type:"button",class:Fe(["ch-pill ch-pr",h(e.pr.state)]),onClick:pe[7]||(pe[7]=re=>e.pr&&o("openPr",e.pr.url))},[K(p(ve),{name:"git-pull-request",size:"sm"}),w("span",null,"PR #"+F(e.pr.number)+" · "+F(g(e.pr.state)),1)],2)):te("",!0),e.sessionId&&e.archived&&p(i)?(k(),E(Te,{key:2},[w("span",Lje,[K(p(ve),{name:"state-done",size:"sm"}),w("span",null,F(p(n)("header.sessionDone")),1)]),K(p(Zt),{variant:"secondary",size:"sm",onClick:ie},{default:he(()=>[K(p(ve),{name:"undo",size:"sm"}),$e(" "+F(p(n)("header.reopenSession")),1)]),_:1})],64)):te("",!0)],2))}}),Fje=gt(Nje,[["__scopeId","data-v-2ee21a3a"]]),Dje=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],RT=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function $je(e){if(e<=255)return Dje[e];let t=0,n=RT.length-1;for(;t<=n;){const i=t+n>>1,s=RT[i];if(e<s[0]){n=i-1;continue}if(e>s[1]){t=i+1;continue}return s[2]}return"L"}function Bje(e){const t=e.length;if(t===0)return null;const n=new Array(t);let i=!1;for(let u=0;u<t;){const c=e.charCodeAt(u);let d=c,f=1;if(c>=55296&&c<=56319&&u+1<t){const g=e.charCodeAt(u+1);g>=56320&&g<=57343&&(d=(c-55296<<10)+(g-56320)+65536,f=2)}const h=$je(d);(h==="R"||h==="AL"||h==="AN")&&(i=!0);for(let g=0;g<f;g++)n[u+g]=h;u+=f}if(!i)return null;let s=0;for(let u=0;u<t;u++){const c=n[u];if(c==="L"){s=0;break}if(c==="R"||c==="AL"){s=1;break}}const o=new Int8Array(t);for(let u=0;u<t;u++)o[u]=s;const r=s&1?"R":"L",l=r;let a=l;for(let u=0;u<t;u++)n[u]==="NSM"?n[u]=a:a=n[u];a=l;for(let u=0;u<t;u++){const c=n[u];c==="EN"?n[u]=a==="AL"?"AN":"EN":(c==="R"||c==="L"||c==="AL")&&(a=c)}for(let u=0;u<t;u++)n[u]==="AL"&&(n[u]="R");for(let u=1;u<t-1;u++)n[u]==="ES"&&n[u-1]==="EN"&&n[u+1]==="EN"&&(n[u]="EN"),n[u]==="CS"&&(n[u-1]==="EN"||n[u-1]==="AN")&&n[u+1]===n[u-1]&&(n[u]=n[u-1]);for(let u=0;u<t;u++){if(n[u]!=="EN")continue;let c;for(c=u-1;c>=0&&n[c]==="ET";c--)n[c]="EN";for(c=u+1;c<t&&n[c]==="ET";c++)n[c]="EN"}for(let u=0;u<t;u++){const c=n[u];(c==="WS"||c==="ES"||c==="ET"||c==="CS")&&(n[u]="ON")}a=l;for(let u=0;u<t;u++){const c=n[u];c==="EN"?n[u]=a==="L"?"L":"EN":(c==="R"||c==="L")&&(a=c)}for(let u=0;u<t;u++){if(n[u]!=="ON")continue;let c=u+1;for(;c<t&&n[c]==="ON";)c++;const d=u>0?n[u-1]:l,f=c<t?n[c]:l,h=d!=="L"?"R":"L";if(h===(f!=="L"?"R":"L"))for(let m=u;m<c;m++)n[m]=h;u=c-1}for(let u=0;u<t;u++)n[u]==="ON"&&(n[u]=r);for(let u=0;u<t;u++){const c=n[u];(o[u]&1)===0?c==="R"?o[u]++:(c==="AN"||c==="EN")&&(o[u]+=2):(c==="L"||c==="AN"||c==="EN")&&o[u]++}return o}function zje(e,t){const n=Bje(e);if(n===null)return null;const i=new Int8Array(t.length);for(let s=0;s<t.length;s++)i[s]=n[t[s]];return i}const Rje=/[ \t\n\r\f]+/g,Oje=/[\t\n\r\f]| {2,}|^ | $/;function Pje(e){const t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function jje(e){if(!Oje.test(e))return e;let t=e.replace(Rje," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Hje(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,` +`).replace(/[\r\f]/g,` +`):e}let yk=null,Wje;function qje(){return yk===null&&(yk=new Intl.Segmenter(Wje,{granularity:"word"})),yk}const Uje=/\p{Script=Arabic}/u,Dc=/\p{M}/u,X7=/\p{Nd}/u;function OT(e){return Uje.test(e)}function PT(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Sa(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){const i=e.charCodeAt(t+1);if(i>=56320&&i<=57343){const s=(n-55296<<10)+(i-56320)+65536;if(PT(s))return!0;t++;continue}}if(PT(n))return!0}}return!1}function Kje(e){const t=lg(e);return t!==null&&(eA.has(t)||Yd.has(t))}const Vje=new Set([" "," ","⁠","\uFEFF"]),Zje=new Set(["-","‐","–","—"]);function Gje(e){const t=lg(e);return t!==null&&Vje.has(t)}function Qje(e){const t=lg(e);return t!==null&&Zje.has(t)}function Aj(e,t){return Gje(e)?!1:t?!(Kje(e)||Qje(e)):!0}const eA=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),b9=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),tA=new Set(["'","’"]),Yd=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),Yje=new Set([":",".","،","؛"]),Jje=new Set(["၏"]),Xje=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function eHe(e){if(nA(e))return!0;let t=!1;for(const n of e){if(Yd.has(n)||C9(n)){t=!0;continue}if(!(t&&Dc.test(n)))return!1}return t}function tHe(e){for(const t of e)if(!eA.has(t)&&!Yd.has(t))return!1;return e.length>0}function nHe(e){if(nA(e))return!0;for(const t of e)if(!b9.has(t)&&!tA.has(t)&&!Dc.test(t)&&!C9(t))return!1;return e.length>0}function nA(e){let t=!1;for(const n of e)if(!(n==="\\"||Dc.test(n))){if(b9.has(n)||Yd.has(n)||tA.has(n)){t=!0;continue}return!1}return t}function A9(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const i=e.charCodeAt(n);if(i<56320||i>57343)return n;const s=n-1;if(s<0)return n;const o=e.charCodeAt(s);return o>=55296&&o<=56319?s:n}function lg(e){if(e.length===0)return null;const t=A9(e,e.length);return e.slice(t)}function iHe(e){for(const t of e)if(!Dc.test(t))return t;return null}function sHe(e){for(let t=e.length;t>0;){const n=A9(e,t),i=e.slice(n,t);if(!Dc.test(i))return i;t=n}return null}const oHe=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function rHe(e,t){for(let n=0;n<t.length;n+=2)if(e>=t[n]&&e<=t[n+1])return!0;return!1}function C9(e){const t=e.codePointAt(0);return t!==void 0&&rHe(t,oHe)}function lHe(e){const t=sHe(e);return t!==null&&C9(t)}function aHe(e){const t=iHe(e);return t!==null&&X7.test(t)}function uHe(e){const t=Array.from(e);let n=t.length;for(;n>0;){const i=t[n-1];if(Dc.test(i)){n--;continue}if(b9.has(i)||tA.has(i)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function cHe(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="—"?e:null}function jT(e,t,n,i){const s=t[i],o=e[i];if(s==null)return o;const r=n[i];if(o.length===r)return o;const l=s.repeat(r);return e[i]=l,l}function HT(e,t){return e&&t!==null&&Yje.has(t)}function dHe(e){const t=lg(e);return t!==null&&Jje.has(t)}function fHe(e){if(e.length<2||e[0]!==" ")return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function e5(e){let t=e.length;for(;t>0;){const n=A9(e,t),i=e.slice(n,t);if(Xje.has(i))return!0;if(!Yd.has(i))return!1;t=n}return!1}function hHe(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===` +`)return"hard-break"}return e===" "?"space":e===" "||e===" "||e==="⁠"||e==="\uFEFF"?"glue":e==="​"?"zero-width-break":e==="­"?"soft-hyphen":"text"}const pHe=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Ol(e){return e.length===1?e[0]:e.join("")}function gHe(e,t){const n=[];for(let i=e.length-1;i>=0;i--)n.push(e[i]);return n.push(t),Ol(n)}function mHe(e,t,n,i){if(!pHe.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const s=[];let o=null,r=[],l=n,a=!1,u=0;for(const c of e){const d=hHe(c,i),f=d==="text"&&t;if(o!==null&&d===o&&f===a){r.push(c),u+=c.length;continue}o!==null&&s.push({text:Ol(r),isWordLike:a,kind:o,start:l}),o=d,r=[c],l=n+u,a=f,u+=c.length}return o!==null&&s.push({text:Ol(r),isWordLike:a,kind:o,start:l}),s}function t5(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}const vHe=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function yHe(e,t){const n=e.texts[t];return n.startsWith("www.")?!0:vHe.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function kHe(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function bHe(e){const t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),s=e.starts.slice();for(let r=0;r<e.len;r++){if(i[r]!=="text"||!yHe(e,r))continue;const l=[t[r]];let a=r+1;for(;a<e.len&&!t5(i[a]);){l.push(t[a]),n[r]=!0;const u=t[a].includes("?");if(i[a]="text",t[a]="",a++,u)break}t[r]=Ol(l)}let o=0;for(let r=0;r<t.length;r++){const l=t[r];l.length!==0&&(o!==r&&(t[o]=l,n[o]=n[r],i[o]=i[r],s[o]=s[r]),o++)}return t.length=o,n.length=o,i.length=o,s.length=o,{len:o,texts:t,isWordLike:n,kinds:i,starts:s}}function AHe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o];if(t.push(r),n.push(e.isWordLike[o]),i.push(e.kinds[o]),s.push(e.starts[o]),!kHe(r))continue;const l=o+1;if(l>=e.len||t5(e.kinds[l]))continue;const a=[],u=e.starts[l];let c=l;for(;c<e.len&&!t5(e.kinds[c]);)a.push(e.texts[c]),c++;a.length>0&&(t.push(Ol(a)),n.push(!0),i.push("text"),s.push(u),o=c-1)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}const CHe=new Set([":","-","/","×",",",".","+","–","—"]),wHe=/[\p{P}\p{S}\p{Co}]/u,xHe=/\p{Emoji_Presentation}/u,SHe=new Set(["?","֊","-","‐","‒","–","—","…","‼","‽","⁉"]);function _He(e){return e>=33&&e<=47&&e!==45||e>=58&&e<=64&&e!==63||e>=91&&e<=96||e>=123&&e<=126}function Cj(e){const t=e.charCodeAt(0);return t<128?_He(t):!SHe.has(e)&&!xHe.test(e)&&wHe.test(e)}function WT(e){let t=!1;for(const n of e)if(!Dc.test(n)){if(!Cj(n))return!1;t=!0}return t}function IHe(e){for(let t=e.length;t>0;){const n=A9(e,t),i=e.slice(n,t);if(Dc.test(i)){t=n;continue}return Cj(i)||C9(i)}return!1}function MHe(e,t,n,i){const s=!t&&WT(e),o=!i&&WT(n),r=lHe(e),l=(t||r)&&IHe(e);return!s&&!o&&!l||Sa(e)||Sa(n)?!1:(t||s||r)&&(i||o)}function wj(e){for(const t of e)if(X7.test(t))return!0;return!1}function dy(e){if(e.length===0)return!1;for(const t of e)if(!(X7.test(t)||CHe.has(t)))return!1;return!0}function EHe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o],l=e.kinds[o];if(l==="text"&&dy(r)&&wj(r)){const a=[r];let u=o+1;for(;u<e.len&&e.kinds[u]==="text"&&dy(e.texts[u]);)a.push(e.texts[u]),u++;t.push(Ol(a)),n.push(!0),i.push("text"),s.push(e.starts[o]),o=u-1;continue}t.push(r),n.push(e.isWordLike[o]),i.push(l),s.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function THe(e){const t=[],n=[],i=[],s=[];let o=0;for(;o<e.len;){const r=e.texts[o],l=e.kinds[o],a=e.isWordLike[o];if(l==="text"){const u=[r];let c=o+1,d=a;for(;c<e.len&&e.kinds[c]==="text"&&MHe(e.texts[c-1],e.isWordLike[c-1],e.texts[c],e.isWordLike[c]);){const f=e.texts[c];u.push(f),d=d||e.isWordLike[c],c++}if(c>o+1){t.push(Ol(u)),n.push(d),i.push("text"),s.push(e.starts[o]),o=c;continue}}t.push(r),n.push(a),i.push(l),s.push(e.starts[o]),o++}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function LHe(e){const t=[],n=[],i=[],s=[];for(let o=0;o<e.len;o++){const r=e.texts[o];if(e.kinds[o]==="text"&&r.includes("-")){const l=r.split("-");let a=l.length>1;for(let u=0;u<l.length;u++){const c=l[u];if(!a)break;(c.length===0||!wj(c)||!dy(c))&&(a=!1)}if(a){let u=0;for(let c=0;c<l.length;c++){const d=l[c],f=c<l.length-1?`${d}-`:d;t.push(f),n.push(!0),i.push("text"),s.push(e.starts[o]+u),u+=f.length}continue}}t.push(r),n.push(e.isWordLike[o]),i.push(e.kinds[o]),s.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function NHe(e){const t=[],n=[],i=[],s=[];let o=0;for(;o<e.len;){const r=[e.texts[o]];let l=e.isWordLike[o],a=e.kinds[o],u=e.starts[o];if(a==="glue"){const c=[r[0]],d=u;for(o++;o<e.len&&e.kinds[o]==="glue";)c.push(e.texts[o]),o++;const f=Ol(c);if(o<e.len&&e.kinds[o]==="text")r[0]=f,r.push(e.texts[o]),l=e.isWordLike[o],a="text",u=d,o++;else{t.push(f),n.push(!1),i.push("glue"),s.push(d);continue}}else o++;if(a==="text")for(;o<e.len&&e.kinds[o]==="glue";){const c=[];for(;o<e.len&&e.kinds[o]==="glue";)c.push(e.texts[o]),o++;const d=Ol(c);if(o<e.len&&e.kinds[o]==="text"){r.push(d,e.texts[o]),l=l||e.isWordLike[o],o++;continue}r.push(d)}t.push(Ol(r)),n.push(l),i.push(a),s.push(u)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function FHe(e){const t=e.texts.slice(),n=e.isWordLike.slice(),i=e.kinds.slice(),s=e.starts.slice();for(let o=0;o<t.length-1;o++){if(i[o]!=="text"||i[o+1]!=="text"||!Sa(t[o])||!Sa(t[o+1]))continue;const r=uHe(t[o]);r!==null&&(t[o]=r.head,t[o+1]=r.tail+t[o+1],s[o+1]=s[o]+r.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:i,starts:s}}function DHe(e,t,n){const i=qje();let s=0;const o=[],r=[],l=[],a=[],u=[],c=[],d=[],f=[],h=[],g=[],m=[],y=[];for(const S of i.segment(e))for(const _ of mHe(S.segment,S.isWordLike??!1,S.index,n)){let R=function(){c[P]!==null&&(r[P]=[jT(o,c,d,P)],c[P]=null),r[P].push(_.text),l[P]=l[P]||_.isWordLike,f[P]=f[P]||$,h[P]=h[P]||D,g[P]=N,m[P]=O,y[P]=HT(h[P],T)};const I=_.kind==="text",M=cHe(_.text,_.isWordLike,_.kind),$=Sa(_.text),D=OT(_.text),T=lg(_.text),N=e5(_.text),O=dHe(_.text),P=s-1;t.carryCJKAfterClosingQuote&&I&&s>0&&a[P]==="text"&&$&&f[P]&&g[P]||I&&s>0&&a[P]==="text"&&tHe(_.text)&&f[P]||I&&s>0&&a[P]==="text"&&m[P]?R():I&&s>0&&a[P]==="text"&&_.isWordLike&&D&&y[P]?(R(),l[P]=!0):M!==null&&s>0&&a[P]==="text"&&c[P]===M?d[P]=(d[P]??1)+1:I&&!_.isWordLike&&s>0&&a[P]==="text"&&!f[P]&&(eHe(_.text)||_.text==="-"&&l[P])?R():(o[s]=_.text,r[s]=[_.text],l[s]=_.isWordLike,a[s]=_.kind,u[s]=_.start,c[s]=M,d[s]=M===null?0:1,f[s]=$,h[s]=D,g[s]=N,m[s]=O,y[s]=HT(D,T),s++)}for(let S=0;S<s;S++){if(c[S]!==null){o[S]=jT(o,c,d,S);continue}o[S]=Ol(r[S])}for(let S=1;S<s;S++)a[S]==="text"&&!l[S]&&nA(o[S])&&a[S-1]==="text"&&!f[S-1]&&(o[S-1]+=o[S],l[S-1]=l[S-1]||l[S],o[S]="");const A=Array.from({length:s},()=>null);let b=-1;for(let S=s-1;S>=0;S--){const _=o[S];if(_.length!==0){if(a[S]==="text"&&!l[S]&&b>=0&&a[b]==="text"&&(nHe(_)||_==="-"&&aHe(o[b]))){const I=A[b]??[];I.push(_),A[b]=I,u[b]=u[S],o[S]="";continue}b=S}}for(let S=0;S<s;S++){const _=A[S];_!=null&&(o[S]=gHe(_,o[S]))}let C=0;for(let S=0;S<s;S++){const _=o[S];_.length!==0&&(C!==S&&(o[C]=_,l[C]=l[S],a[C]=a[S],u[C]=u[S]),C++)}o.length=C,l.length=C,a.length=C,u.length=C;const v=NHe({len:C,texts:o,isWordLike:l,kinds:a,starts:u}),x=FHe(THe(LHe(EHe(AHe(bHe(v))))));for(let S=0;S<x.len-1;S++){const _=fHe(x.texts[S]);_!==null&&(x.kinds[S]!=="space"&&x.kinds[S]!=="preserved-space"||x.kinds[S+1]!=="text"||!OT(x.texts[S+1])||(x.texts[S]=_.space,x.isWordLike[S]=!1,x.kinds[S]=x.kinds[S]==="preserved-space"?"preserved-space":"space",x.texts[S+1]=_.marks+x.texts[S+1],x.starts[S+1]=x.starts[S]+_.space.length))}return x}function $He(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let i=0;for(let s=0;s<e.len;s++)e.kinds[s]==="hard-break"&&(n.push({startSegmentIndex:i,endSegmentIndex:s,consumedEndSegmentIndex:s+1}),i=s+1);return i<e.len&&n.push({startSegmentIndex:i,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function BHe(e,t,n){if(t.len<=1)return t;const i=[],s=[],o=[],r=[];let l=-1,a=!1;function u(f){i.push(t.texts[f]),s.push(t.isWordLike[f]),o.push("text"),r.push(t.starts[f])}function c(f,h){let g=!1;for(let A=f;A<h;A++)g=g||t.isWordLike[A];const m=t.starts[f],y=h<t.len?t.starts[h]:e.length;i.push(e.slice(m,y)),s.push(g),o.push("text"),r.push(m)}function d(f){if(!(l<0)){if(a)l+1===f?u(l):c(l,f);else for(let h=l;h<f;h++)u(h);l=-1,a=!1}}for(let f=0;f<t.len;f++){const h=t.texts[f],g=t.kinds[f];if(g==="text"){l>=0&&!Aj(t.texts[f-1],n)&&d(f),l<0&&(l=f),a=a||Sa(h);continue}d(f),i.push(h),s.push(t.isWordLike[f]),o.push(g),r.push(t.starts[f])}return d(t.len),{len:i.length,texts:i,isWordLike:s,kinds:o,starts:r}}function zHe(e,t,n="normal",i="normal"){const s=Pje(n),o=s.mode==="pre-wrap"?Hje(e):jje(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const r=DHe(o,t,s),l=i==="keep-all"?BHe(o,r,t.breakKeepAllAfterPunctuation):r;return{normalized:o,chunks:$He(l,s),...l}}let $f=null;const qT=new Map;let Bf=null;const RHe=96,OHe=/\p{Emoji_Presentation}/u,PHe=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let kk=null;const UT=new Map;function iA(){if($f!==null)return $f;if(typeof OffscreenCanvas<"u")return $f=new OffscreenCanvas(1,1).getContext("2d"),$f;if(typeof document<"u")return $f=document.createElement("canvas").getContext("2d"),$f;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function jHe(e){let t=qT.get(e);return t||(t=new Map,qT.set(e,t)),t}function Ku(e,t){let n=t.get(e);return n===void 0&&(n={width:iA().measureText(e).width,containsCJK:Sa(e)},t.set(e,n)),n}function w9(){if(Bf!==null)return Bf;if(typeof navigator>"u")return Bf={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Bf;const e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),i=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Bf={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:i,breakKeepAllAfterPunctuation:!n,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Bf}function HHe(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function xj(){return kk===null&&(kk=new Intl.Segmenter(void 0,{granularity:"grapheme"})),kk}function WHe(e){return OHe.test(e)||e.includes("️")}function qHe(e){return PHe.test(e)}function UHe(e,t){let n=UT.get(e);if(n!==void 0)return n;const i=iA();i.font=e;const s=i.measureText("😀").width;if(n=0,s>t+.5&&typeof document<"u"&&document.body!==null){const o=document.createElement("span");o.style.font=e,o.style.display="inline-block",o.style.visibility="hidden",o.style.position="absolute",o.textContent="😀",document.body.appendChild(o);const r=o.getBoundingClientRect().width;document.body.removeChild(o),s-r>.5&&(n=s-r)}return UT.set(e,n),n}function KHe(e){let t=0;const n=xj();for(const i of n.segment(e))WHe(i.segment)&&t++;return t}function VHe(e,t){return t.emojiCount===void 0&&(t.emojiCount=KHe(e)),t.emojiCount}function _d(e,t,n){return n===0?t.width:t.width-VHe(e,t)*n}function ZHe(e,t,n,i,s){if(t.breakableFitAdvances!==void 0&&t.breakableFitMode===s)return t.breakableFitAdvances;t.breakableFitMode=s;const o=xj(),r=[];for(const c of o.segment(e))r.push(c.segment);if(r.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(s==="sum-graphemes"){const c=[];for(const d of r){const f=Ku(d,n);c.push(_d(d,f,i))}return t.breakableFitAdvances=c,t.breakableFitAdvances}if(s==="pair-context"||r.length>RHe){const c=[];let d=null,f=0;for(const h of r){const g=Ku(h,n),m=_d(h,g,i);if(d===null)c.push(m);else{const y=d+h,A=Ku(y,n);c.push(_d(y,A,i)-f)}d=h,f=m}return t.breakableFitAdvances=c,t.breakableFitAdvances}const l=[];let a="",u=0;for(const c of r){a+=c;const d=Ku(a,n),f=_d(a,d,i);l.push(f-u),u=f}return t.breakableFitAdvances=l,t.breakableFitAdvances}function GHe(e,t){const n=iA();n.font=e;const i=jHe(e),s=HHe(e),o=t?UHe(e,s):0;return{cache:i,fontSize:s,emojiCorrection:o}}function QHe(e){return e==="space"||e==="zero-width-break"||e==="soft-hyphen"}function Sj(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function _j(e,t,n=e.widths.length){for(;t<n;){const i=e.kinds[t];if(!QHe(i))break;t++}return t}function YHe(e,t){if(t<=0)return 0;const n=e%t;return Math.abs(n)<=1e-6?t:t-n}function JHe(e,t,n){return e.letterSpacing!==0&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function sA(e,t){return t===0?0:e+t}function XHe(e,t){return e.letterSpacing!==0&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}function eWe(e,t,n,i,s){const o=t==="tab"?s+XHe(e,n):e.lineEndFitAdvances[n];return sA(i,o)}function KT(e,t,n,i){const s=t==="tab"?0:e.lineEndFitAdvances[n];return sA(i,s)}function VT(e,t,n,i,s){const o=t==="tab"?s:e.lineEndPaintAdvances[n];return sA(i,o)}function tWe(e,t,n){return e.letterSpacing!==0&&t?n+e.letterSpacing:n}function nWe(e,t){return e.letterSpacing===0?t:t+e.letterSpacing}function fy(e,t,n){let i=t;for(;i<e.length&&e[i]<n;)i++;return i}function iWe(e,t,n,i,s){if(e.letterSpacing===0)return 0;if(s>0)return e.spacingGraphemeCounts[i]>0?e.letterSpacing:0;for(let o=i-1;o>=t;o--){const r=e.kinds[o];if(!(r==="space"||r==="zero-width-break"||r==="hard-break")){if(r==="soft-hyphen"){if(o===i-1)return 0;continue}return o===t&&n>0||e.spacingGraphemeCounts[o]>0?e.letterSpacing:0}}return 0}function sWe(e,t,n,i,s,o){return t+iWe(e,n,i,s,o)}function oWe(e,t,n){const{widths:i,kinds:s,breakableFitAdvances:o,breakablePreferredBreaks:r}=e;if(i.length===0)return 0;const a=w9().lineFitEpsilon,u=t+a;let c=0,d=0,f=!1,h=0,g=0,m=0,y=0,A=-1,b=0;function C(){A=-1,b=0}function v($=m,D=y,T=d){c++,n?.(T,h,g,$,D),d=0,f=!1,C()}function x($,D){f=!0,h=$,g=0,m=$+1,y=0,d=D}function S($,D,T){f=!0,h=$,g=D,m=$,y=D+1,d=T}function _($,D){if(!f){x($,D);return}d+=D,m=$+1,y=0}function I($,D){const T=o[$],N=r[$]??null;let O=N===null?-1:fy(N,0,D+1),P=-1,R=0,q=D;for(;q<T.length;){const j=T[q];if(!f)S($,q,j);else if(d+j>u){if(N!==null&&P>D){v($,P,R),q=P,O=fy(N,O,q+1),P=-1,R=0;continue}v(),S($,q,j)}else d+=j,m=$,y=q+1;const W=q+1;N!==null&&N[O]===W&&(P=W,R=d,O++),q++}f&&m===$&&y===T.length&&(m=$+1,y=0)}let M=0;for(;M<i.length&&!(!f&&(M=_j(e,M),M>=i.length));){const $=i[M],D=s[M],T=Sj(D);if(!f){$>u&&o[M]!==null?I(M,0):x(M,$),T&&(A=M+1,b=d-$),M++;continue}if(d+$>u){if(T){_(M,$),v(M+1,0,d-$),M++;continue}if(A>=0){if(m>A||m===A&&y>0){v();continue}v(A,0,b);continue}if($>u&&o[M]!==null){v(),I(M,0),M++;continue}v();continue}_(M,$),T&&(A=M+1,b=d-$),M++}return f&&v(),c}function rWe(e,t,n){if(e.simpleLineWalkFastPath)return oWe(e,t,n);const{widths:i,kinds:s,breakableFitAdvances:o,breakablePreferredBreaks:r,discretionaryHyphenWidth:l,chunks:a}=e;if(i.length===0||a.length===0)return 0;const u=w9(),c=u.lineFitEpsilon,d=t+c;let f=0,h=0,g=!1,m=0,y=0,A=0,b=0,C=-1,v=0,x=0,S=null;function _(){C=-1,v=0,x=0,S=null}function I(){return S==="soft-hyphen"&&C===A&&b===0?x:h}function M(R=A,q=b,j){f++,n!==void 0&&n(sWe(e,j??I(),m,y,R,q),m,y,R,q),h=0,g=!1,_()}function $(R,q){g=!0,m=R,y=0,A=R+1,b=0,h=q}function D(R,q,j){g=!0,m=R,y=q,A=R,b=q+1,h=j}function T(R,q){if(!g){$(R,q);return}h+=q,A=R+1,b=0}function N(R,q,j,W,z,H){if(!q)return;const ee=KT(e,R,j,z),V=VT(e,R,j,z,W);C=j+1,v=h-H+ee,x=h-H+V,S=R}function O(R,q){const j=o[R],W=r[R]??null;let z=W===null?-1:fy(W,0,q+1),H=-1,ee=0,V=q;for(;V<j.length;){const ie=j[V];if(!g)D(R,V,ie);else{const Z=tWe(e,!0,ie),pe=h+Z;if(nWe(e,pe)>d){if(W!==null&&H>q){M(R,H,ee),V=H,z=fy(W,z,V+1),H=-1,ee=0;continue}M(),D(R,V,ie)}else h=pe,A=R,b=V+1}const se=V+1;W!==null&&W[z]===se&&(H=se,ee=h,z++),V++}g&&A===R&&b===j.length&&(A=R+1,b=0)}function P(R){f++,n?.(0,R.startSegmentIndex,0,R.consumedEndSegmentIndex,0),_()}for(let R=0;R<a.length;R++){const q=a[R];if(q.startSegmentIndex===q.endSegmentIndex){P(q);continue}g=!1,h=0,m=q.startSegmentIndex,y=0,A=q.startSegmentIndex,b=0,_();let j=q.startSegmentIndex;for(;j<q.endSegmentIndex&&!(!g&&(j=_j(e,j,q.endSegmentIndex),j>=q.endSegmentIndex));){const W=s[j],z=Sj(W),H=JHe(e,g,j),ee=W==="tab"?YHe(h+H,e.tabStopAdvance):i[j],V=H+ee,ie=eWe(e,W,j,H,ee);if(W==="soft-hyphen"){g&&(A=j+1,b=0,C=j+1,v=h+l,x=h+l,S=W),j++;continue}if(!g){ie>d&&o[j]!==null?O(j,0):$(j,ee),N(W,z,j,ee,H,V),j++;continue}if(h+ie>d){const Z=h+KT(e,W,j,H),pe=h+VT(e,W,j,H,ee);if(S==="soft-hyphen"&&u.preferEarlySoftHyphenBreak&&v<=d){M(C,0,x);continue}if(z&&Z<=d){T(j,V),M(j+1,0,pe),j++;continue}if(C>=0&&v<=d){if(A>C||A===C&&b>0){M();continue}const re=C;M(re,0,x),j=re;continue}if(ie>d&&o[j]!==null){M(),O(j,0),j++;continue}M();continue}T(j,V),N(W,z,j,ee,H,V),j++}if(g){const W=C===q.consumedEndSegmentIndex?x:h;M(q.consumedEndSegmentIndex,0,W)}}return f}let bk=null;function oA(){return bk===null&&(bk=new Intl.Segmenter(void 0,{granularity:"grapheme"})),bk}function lWe(e){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],breakablePreferredBreaks:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}}function aWe(e,t){const n=[];let i=[],s=0,o=!1,r=!1,l=!1;function a(){i.length!==0&&(n.push({text:i.length===1?i[0]:i.join(""),start:s}),i=[],o=!1,r=!1,l=!1)}function u(d,f,h){i=[d],s=f,o=h,r=e5(d),l=b9.has(d)}function c(d,f){i.push(d),o=o||f;const h=e5(d);d.length===1&&Yd.has(d)?r=r||h:r=h,l=!1}for(const d of oA().segment(e)){const f=d.segment,h=Sa(f);if(i.length===0){u(f,d.index,h);continue}if(l||eA.has(f)||Yd.has(f)||t.carryCJKAfterClosingQuote&&h&&r){c(f,h);continue}if(!o&&!h){c(f,h);continue}a(),u(f,d.index,h)}return a(),n}function uWe(e,t,n){if(t.length<=1)return t;const i=[];let s=-1,o=!1;function r(a,u){const c=t[a].start,d=u<t.length?t[u].start:e.length;i.push({text:e.slice(c,d),start:c})}function l(a){if(!(s<0)){if(o)s+1===a?i.push(t[s]):r(s,a);else for(let u=s;u<a;u++)i.push(t[u]);s=-1,o=!1}}for(let a=0;a<t.length;a++){const u=t[a];s>=0&&!Aj(t[a-1].text,n)&&l(a),s<0&&(s=a),o=o||Sa(u.text)}return l(t.length),i}function ZT(e,t){if(t==="zero-width-break"||t==="soft-hyphen"||t==="hard-break")return 0;if(t==="tab")return 1;let n=0;const i=oA();for(const s of i.segment(e))n++;return n}function cWe(e){return e==="-"||e==="֊"||e==="‐"||e==="‒"||e==="–"||e==="—"}function dWe(e){if(!/[-\u058A\u2010\u2012\u2013\u2014]/u.test(e))return null;const t=[];let n=0;for(const i of oA().segment(e))n++,cWe(i.segment)&&t.push(n);return t.length===0?null:t}function fWe(e,t,n){return t>1?e+(t-1)*n:e}function hWe(e,t,n,i,s){const o=w9(),{cache:r,emojiCorrection:l}=GHe(t,qHe(e.normalized)),a=_d("-",Ku("-",r),l)+(s===0?0:s*2),c=_d(" ",Ku(" ",r),l)*8,d=s!==0;if(e.len===0)return lWe();const f=[],h=[],g=[],m=[];let y=e.chunks.length<=1&&!d;const A=n?[]:null,b=[],C=[],v=[],x=n?[]:null,S=Array.from({length:e.len});function _(D,T,N,O,P,R,q,j,W){P!=="text"&&P!=="space"&&P!=="zero-width-break"&&(y=!1),f.push(T),h.push(N),g.push(O),m.push(P),A?.push(R),b.push(q),C.push(j),d&&v.push(W),x!==null&&x.push(D)}function I(D,T,N,O,P){const R=Ku(D,r),q=d?ZT(D,T):0,j=fWe(_d(D,R,l),q,s),W=T==="space"||T==="preserved-space"||T==="zero-width-break"?0:j,z=W===0?0:W+(q>0?s:0),H=T==="space"||T==="zero-width-break"?0:j;if(P&&O&&D.length>1){let ee="sum-graphemes";s!==0?ee="segment-prefixes":dy(D)?ee="pair-context":o.preferPrefixWidthsForBreakableRuns&&(ee="segment-prefixes");const V=ZHe(D,R,r,l,ee),ie=V===null||i==="keep-all"?null:dWe(D);_(D,j,z,H,T,N,V,ie,q);return}_(D,j,z,H,T,N,null,null,q)}for(let D=0;D<e.len;D++){S[D]=f.length;const T=e.texts[D],N=e.isWordLike[D],O=e.kinds[D],P=e.starts[D];if(O==="soft-hyphen"){_(T,0,a,a,O,P,null,null,0);continue}if(O==="hard-break"){_(T,0,0,0,O,P,null,null,0);continue}if(O==="tab"){_(T,0,0,0,O,P,null,null,d?ZT(T,O):0);continue}const R=Ku(T,r);if(O==="text"&&R.containsCJK){const q=aWe(T,o),j=i==="keep-all"?uWe(T,q,o.breakKeepAllAfterPunctuation):q;for(let W=0;W<j.length;W++){const z=j[W];I(z.text,"text",P+z.start,N,i==="keep-all"||!Sa(z.text))}continue}I(T,O,P,N,!0)}const M=pWe(e.chunks,S,f.length),$=A===null?null:zje(e.normalized,A);return x!==null?{widths:f,lineEndFitAdvances:h,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:$,breakableFitAdvances:b,breakablePreferredBreaks:C,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:a,tabStopAdvance:c,chunks:M,segments:x}:{widths:f,lineEndFitAdvances:h,lineEndPaintAdvances:g,kinds:m,simpleLineWalkFastPath:y,segLevels:$,breakableFitAdvances:b,breakablePreferredBreaks:C,letterSpacing:s,spacingGraphemeCounts:v,discretionaryHyphenWidth:a,tabStopAdvance:c,chunks:M}}function pWe(e,t,n){const i=[];for(let s=0;s<e.length;s++){const o=e[s],r=o.startSegmentIndex<t.length?t[o.startSegmentIndex]:n,l=o.endSegmentIndex<t.length?t[o.endSegmentIndex]:n,a=o.consumedEndSegmentIndex<t.length?t[o.consumedEndSegmentIndex]:n;i.push({startSegmentIndex:r,endSegmentIndex:l,consumedEndSegmentIndex:a})}return i}function gWe(e,t,n,i){const s=i?.wordBreak??"normal",o=i?.letterSpacing??0,r=zHe(e,w9(),i?.whiteSpace,s);return hWe(r,t,n,s,o)}function mWe(e,t,n){return gWe(e,t,!0,n)}function vWe(e){let t=0;return rWe(e,Number.POSITIVE_INFINITY,n=>{n>t&&(t=n)}),t}const yWe={class:"slash-menu","data-menu-frame":""},kWe={key:0,class:"slash-empty",role:"status"},bWe=["id","aria-selected","onMouseenter","onMousedown"],AWe={class:"slash-name"},CWe={key:0,class:"slash-match"},wWe={class:"slash-desc"},xWe={key:0,class:"slash-desc-match"},SWe=Qe({__name:"SlashMenu",props:{items:{},activeIndex:{},query:{default:""},ranges:{}},emits:["select","hover"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(C,v){if(!v||v.length===0)return[{text:C,hit:!1}];const x=[];let S=0;for(const[_,I]of[...v].sort((M,$)=>M[0]-$[0]))_>S&&x.push({text:C.slice(S,_),hit:!1}),x.push({text:C.slice(_,I),hit:!0}),S=I;return S<C.length&&x.push({text:C.slice(S),hit:!1}),x}function r(C){return C.isSkill?C.desc:n(C.desc)}const l=L(()=>i.items.map((C,v)=>{const x=r(C),S=i.ranges?.[v]??bae(i.query,C.name,x);return{item:C,namePieces:o(C.name,S.name),desc:x,descPieces:o(x,S.desc)}})),a=G(null),u=G(!1),c=G(!1);let d=null;const f=G(null);function h(){const C=a.value;if(!C)return;u.value=C.scrollTop>0,c.value=C.scrollTop+C.clientHeight<C.scrollHeight-1;const{scrollTop:v,scrollHeight:x,clientHeight:S}=C;if(x<=S+1){f.value=null;return}const _=getComputedStyle(C),I=parseFloat(_.getPropertyValue("--menu-scrollbar-track-inset"))||0,M=parseFloat(_.getPropertyValue("--menu-scrollbar-thumb-min"))||24,$=S-I*2,D=Math.max(M,S/x*$),T=x-S,N=C.offsetTop+I+v/T*($-D);f.value={top:N,height:D}}function g(){h()}let m=null;function y(C){const v=a.value,x=f.value;if(!v||!x)return;C.preventDefault(),m?.();const S=C.pointerId;C.target.setPointerCapture?.(C.pointerId);const _=getComputedStyle(v),I=parseFloat(_.getPropertyValue("--menu-scrollbar-track-inset"))||0,M=v.clientHeight-I*2-x.height,$=v.scrollHeight-v.clientHeight,D=C.clientY,T=v.scrollTop,N=R=>{R.pointerId!==S||M<=0||(v.scrollTop=T+(R.clientY-D)/M*$)},O=R=>{R.pointerId===S&&P()},P=()=>{window.removeEventListener("pointerup",O),window.removeEventListener("pointermove",N),window.removeEventListener("pointercancel",O),m===P&&(m=null)};m=P,window.addEventListener("pointermove",N),window.addEventListener("pointerup",O),window.addEventListener("pointercancel",O)}const A=L(()=>{const C=u.value,v=c.value,x="var(--menu-scroll-fade)";if(C&&v)return`linear-gradient(to bottom, transparent 0, black ${x}, black calc(100% - ${x}), transparent 100%)`;if(C)return`linear-gradient(to bottom, transparent, black ${x})`;if(v)return`linear-gradient(to top, transparent, black ${x})`});mn(()=>{h(),typeof ResizeObserver=="function"&&a.value&&(d=new ResizeObserver(h),d.observe(a.value))}),Mn(()=>{d?.disconnect(),d=null,m?.()});function b(){const C=a.value;if(!C)return;const v=C.querySelectorAll('[role="option"]')[i.activeIndex];if(!v)return;const x=C.getBoundingClientRect(),S=v.getBoundingClientRect(),_=S.top-x.top+C.scrollTop,I=_+S.height;_<C.scrollTop?C.scrollTop=_:I>C.scrollTop+C.clientHeight&&(C.scrollTop=I-C.clientHeight)}return qe(()=>i.activeIndex,()=>{kt(b)}),qe(()=>i.items,()=>{kt(()=>{h(),b()})}),(C,v)=>(k(),E("div",yWe,[e.items.length===0?(k(),E("div",kWe,F(p(n)("composer.noCommands")),1)):te("",!0),$n(w("div",{id:"composer-slash-menu",ref_key:"scrollEl",ref:a,class:"slash-scroll",role:"listbox",style:qt({maskImage:A.value}),onScroll:g},[(k(!0),E(Te,null,ht(l.value,(x,S)=>(k(),E("div",{key:`${x.item.name}-${S}`,id:`composer-slash-option-${S}`,class:Fe(["slash-item",{active:S===i.activeIndex}]),role:"option","aria-selected":S===i.activeIndex,onMouseenter:_=>s("hover",S),onMousedown:Ct(_=>s("select",x.item),["prevent"])},[w("span",AWe,[(k(!0),E(Te,null,ht(x.namePieces,(_,I)=>(k(),E(Te,{key:I},[_.hit?(k(),E("span",CWe,F(_.text),1)):(k(),E(Te,{key:1},[$e(F(_.text),1)],64))],64))),128))]),w("span",wWe,[(k(!0),E(Te,null,ht(x.descPieces,(_,I)=>(k(),E(Te,{key:I},[_.hit?(k(),E("span",xWe,F(_.text),1)):(k(),E(Te,{key:1},[$e(F(_.text),1)],64))],64))),128))])],42,bWe))),128))],36),[[Qi,e.items.length>0]]),f.value&&e.items.length>0?(k(),E("div",{key:1,class:"scroll-thumb",onPointerdown:y,style:qt({top:`${f.value.top}px`,height:`${f.value.height}px`})},null,36)):te("",!0)]))}}),_We=gt(SWe,[["__scopeId","data-v-61668b96"]]),IWe={class:"mention-menu","data-menu-frame":""},MWe={key:0,class:"mention-state dim",role:"status"},EWe={key:1,class:"mention-state dim",role:"status"},TWe={key:0,class:"mention-section"},LWe=["id","aria-selected","onMouseenter","onMousedown"],NWe=["innerHTML"],FWe={class:"mention-name"},DWe={key:0,class:"mention-meta"},$We={key:0,class:"mention-section"},BWe=["id","aria-selected","onMouseenter","onMousedown"],zWe=["innerHTML"],RWe={class:"mention-name"},OWe={class:"mention-meta"},PWe=Qe({__name:"MentionMenu",props:{items:{},activeIndex:{},loading:{type:Boolean},stale:{type:Boolean}},emits:["select","hover"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>n.items.filter(v=>v.kind!=="skill")),r=L(()=>n.items.filter(v=>v.kind==="skill"));function l(v){return v.kind==="skill"?k9("skill","",v.skill.name):K7(v.file.path,v.file.name,v.kind==="folder")}function a(v){const x=v.endsWith("/")?v.slice(0,-1):v,S=x.lastIndexOf("/");return S===-1?"":x.slice(0,S)}const u=G(null),c=G(!1),d=G(!1);let f=null;const h=G(null);function g(){const v=u.value;if(!v)return;c.value=v.scrollTop>0,d.value=v.scrollTop+v.clientHeight<v.scrollHeight-1;const{scrollTop:x,scrollHeight:S,clientHeight:_}=v;if(S<=_+1){h.value=null;return}const I=getComputedStyle(v),M=parseFloat(I.getPropertyValue("--menu-scrollbar-track-inset"))||0,$=parseFloat(I.getPropertyValue("--menu-scrollbar-thumb-min"))||24,D=_-M*2,T=Math.max($,_/S*D),N=S-_,O=v.offsetTop+M+x/N*(D-T);h.value={top:O,height:T}}function m(){g()}let y=null;function A(v){const x=u.value,S=h.value;if(!x||!S)return;v.preventDefault(),y?.();const _=v.pointerId;v.target.setPointerCapture?.(v.pointerId);const I=getComputedStyle(x),M=parseFloat(I.getPropertyValue("--menu-scrollbar-track-inset"))||0,$=x.clientHeight-M*2-S.height,D=x.scrollHeight-x.clientHeight,T=v.clientY,N=x.scrollTop,O=q=>{q.pointerId!==_||$<=0||(x.scrollTop=N+(q.clientY-T)/$*D)},P=q=>{q.pointerId===_&&R()},R=()=>{window.removeEventListener("pointerup",P),window.removeEventListener("pointermove",O),window.removeEventListener("pointercancel",P),y===R&&(y=null)};y=R,window.addEventListener("pointermove",O),window.addEventListener("pointerup",P),window.addEventListener("pointercancel",P)}const b=L(()=>{const v=c.value,x=d.value,S="var(--menu-scroll-fade)";if(v&&x)return`linear-gradient(to bottom, transparent 0, black ${S}, black calc(100% - ${S}), transparent 100%)`;if(v)return`linear-gradient(to bottom, transparent, black ${S})`;if(x)return`linear-gradient(to top, transparent, black ${S})`});mn(()=>{g(),typeof ResizeObserver=="function"&&u.value&&(f=new ResizeObserver(g),f.observe(u.value))}),Mn(()=>{f?.disconnect(),f=null,y?.()});function C(){const v=u.value;if(!v)return;const x=v.querySelectorAll('[role="option"]')[n.activeIndex];if(!x)return;const S=v.getBoundingClientRect(),_=x.getBoundingClientRect(),I=_.top-S.top+v.scrollTop,M=I+_.height;I<v.scrollTop?v.scrollTop=I:M>v.scrollTop+v.clientHeight&&(v.scrollTop=M-v.clientHeight)}return qe(()=>n.activeIndex,()=>{kt(C)}),qe(()=>n.items,()=>{kt(()=>{g(),C()})}),(v,x)=>(k(),E("div",IWe,[n.loading&&n.items.length===0?(k(),E("div",MWe,F(p(s)("mention.searching")),1)):n.items.length===0?(k(),E("div",EWe,F(p(s)("mention.noMatch")),1)):te("",!0),n.loading&&n.items.length>0?(k(),de(p(Mi),{key:2,class:"mention-spin",size:"xs"})):te("",!0),$n(w("div",{id:"composer-mention-menu",ref_key:"scrollEl",ref:u,class:"mention-scroll",role:"listbox",style:qt({maskImage:b.value}),onScroll:m},[o.value.length>0?(k(),E(Te,{key:0},[r.value.length>0?(k(),E("div",TWe,F(p(s)("mention.files")),1)):te("",!0),(k(!0),E(Te,null,ht(o.value,(S,_)=>(k(),E("div",{key:S.file.path,id:`composer-mention-option-${_}`,class:Fe(["mention-item",{active:_===n.activeIndex,stale:n.stale}]),role:"option","aria-selected":_===n.activeIndex,onMouseenter:I=>i("hover",_),onMousedown:Ct(I=>i("select",S),["prevent"])},[w("span",{class:"mention-icon",innerHTML:l(S),"aria-hidden":"true"},null,8,NWe),w("span",FWe,F(S.file.name),1),a(S.file.path)?(k(),E("span",DWe,F(a(S.file.path)),1)):te("",!0)],42,LWe))),128))],64)):te("",!0),r.value.length>0?(k(),E(Te,{key:1},[o.value.length>0?(k(),E("div",$We,F(p(s)("mention.skills")),1)):te("",!0),(k(!0),E(Te,null,ht(r.value,(S,_)=>(k(),E("div",{key:S.skill.name,id:`composer-mention-option-${o.value.length+_}`,class:Fe(["mention-item",{active:o.value.length+_===n.activeIndex}]),role:"option","aria-selected":o.value.length+_===n.activeIndex,onMouseenter:I=>i("hover",o.value.length+_),onMousedown:Ct(I=>i("select",S),["prevent"])},[w("span",{class:"mention-icon",innerHTML:l(S),"aria-hidden":"true"},null,8,zWe),w("span",RWe,F(S.skill.name),1),w("span",OWe,F(S.skill.description),1)],42,BWe))),128))],64)):te("",!0)],36),[[Qi,n.items.length>0]]),h.value&&n.items.length>0?(k(),E("div",{key:3,class:"scroll-thumb",onPointerdown:A,style:qt({top:`${h.value.top}px`,height:`${h.value.height}px`})},null,36)):te("",!0)]))}}),jWe=gt(PWe,[["__scopeId","data-v-592070e7"]]),HWe={class:"composer-card"},WWe={key:0,class:"att-strip"},qWe={key:1,class:"att-row"},UWe={key:0,class:"att-more"},KWe={class:"cin-wrap"},VWe=["onClick"],ZWe={class:"am-icon"},GWe={class:"am-name"},QWe={key:0,class:"am-desc"},YWe={class:"input-row"},JWe=["placeholder","disabled","aria-expanded","aria-controls","aria-activedescendant"],XWe=["aria-label"],eqe={class:"toolbar-left"},tqe=["aria-label","onKeydown"],nqe={class:"perm-pill-label"},iqe=["onClick"],sqe={class:"pd-info"},oqe={class:"pd-desc"},rqe={class:"pd-check"},lqe={key:1,class:"swarm-chip"},aqe={class:"swarm-label"},uqe={class:"toolbar-right"},cqe=["aria-label"],dqe=["aria-expanded"],fqe={class:"mp-name"},hqe={key:0,class:"think-suffix"},pqe={class:"mp-name"},gqe={class:"mp-name"},mqe=["aria-label"],vqe=["aria-label","disabled"],yqe={class:"md-list"},kqe={key:0,class:"md-section"},bqe=["onClick"],Aqe={class:"md-check"},Cqe={class:"md-name"},wqe={class:"md-provider"},xqe={key:1,class:"md-divider"},Sqe={key:2,class:"md-section"},_qe=["onClick"],Iqe={class:"md-check"},Mqe={class:"md-name"},Eqe={key:0,class:"md-divider"},Tqe={class:"md-thinking"},Lqe={class:"md-name"},Nqe={key:0,class:"md-note"},Fqe={key:2,class:"md-note"},Dqe={class:"md-cache-note"},$qe={class:"md-check md-more-icon"},Bqe={class:"md-name"},zqe={key:1,class:"composer-footer"},Rqe={class:"drop-card"},GT=36,Oqe=Qe({__name:"Composer",props:{running:{type:Boolean,default:!1},working:{type:Boolean,default:!1},starting:{type:Boolean,default:!1},sessionId:{},queued:{default:()=>[]},searchFiles:{type:Function,default:void 0},uploadImage:{type:Function,default:void 0},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},swarmMode:{type:Boolean},goalMode:{type:Boolean},goal:{},activationBadges:{},models:{default:()=>[]},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{default:()=>[]},skills:{default:()=>[]},hideContext:{type:Boolean}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleSwarm","toggleGoal","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","login"],setup(e,{expose:t,emit:n}){const i=e,s=L(()=>i.starting?r("composer.starting"):i.running?r("composer.placeholderRunning"):i.goalMode?r("status.goalPlaceholder"):i.planArmed||i.planMode?r("status.planPlaceholder"):r("composer.placeholder")),o=n,{t:r,locale:l}=Bt(),{text:a,editorRef:u,loadForEdit:c,clearDraft:d}=yhe({sessionId:()=>i.sessionId}),f=u;function h(){const De=f.value;De&&(De.style.height="auto",De.style.height=`${De.scrollHeight}px`)}qe(a,()=>void kt(h));const g=G(!1);function m(){g.value=!g.value,kt(()=>{h(),C(),f.value?.focus()})}function y(){g.value&&(g.value=!1,kt(h))}function A(De){if(typeof getComputedStyle>"u")return GT;const vt=Number.parseFloat(getComputedStyle(De).minHeight);return Number.isFinite(vt)&&vt>0?vt:GT}const b=G(!1);function C(){const De=f.value;b.value=!!De&&De.scrollHeight>A(De)}qe(a,()=>{kt(C)});const v=Che({text:a,editorRef:f,sessionId:()=>i.sessionId});function x(){Ts.value||(i.goalMode&&o("toggleGoal"),o("togglePlan"))}function S(){if(Zo.value){o("focusGoal");return}i.goalMode||(Ts.value&&o("togglePlan"),o("toggleGoal"))}const{open:_,items:I,ranges:M,active:$,update:D,select:T}=whe({text:a,editorRef:f,skills:()=>i.skills,emitCommand:De=>{if(De==="/plan"){x();return}if(De==="/goal"){S();return}if(De==="/swarm"){po.value||o("toggleSwarm");return}o("command",{cmd:De,attachments:[]})},historyPush:De=>v.push(De),clearDraft:d,resolveDesc:De=>De.isSkill?De.desc:r(De.desc)}),N=L(()=>a.value.startsWith("/")&&!a.value.includes(" ")?a.value.slice(1):""),O=L(()=>{if(_.value)return"composer-slash-menu";if(R.value)return"composer-mention-menu"}),P=L(()=>{if(_.value&&I.value.length>0)return`composer-slash-option-${$.value}`;if(R.value&&q.value.length>0)return`composer-mention-option-${j.value}`}),{open:R,items:q,active:j,loading:W,fileStale:z,update:H,close:ee,select:V}=xhe({text:a,editorRef:f,searchFiles:()=>i.searchFiles});qe(()=>i.sessionId,()=>{g.value=!1,_.value=!1,ee()});function ie(){_.value=!1,ee()}function se(){v.resetBrowsing(),D(),H(),(_.value||R.value||Nt.value)&&Ci()}function Z(De){const vt=De.map(ss=>/\s/.test(ss)?`"${ss}"`:ss).join(" "),mt=f.value,Jt=a.value,Ki=mt&&document.activeElement===mt?mt.selectionStart:Jt.length,Bo=Ki>0&&!/\s/.test(Jt[Ki-1])?" ":"",bl=Ki<Jt.length&&!/\s/.test(Jt[Ki])?" ":"";v.resetBrowsing(),a.value=Jt.slice(0,Ki)+Bo+vt+bl+Jt.slice(Ki),kt(()=>{const ss=f.value;if(!ss)return;const Ns=Ki+Bo.length+vt.length;ss.setSelectionRange(Ns,Ns),ss.focus(),h()})}const{attachments:pe,previewAttachment:re,fileInputRef:fe,isDragOver:Ee,removeAttachment:X,openAttachmentPreview:we,closeAttachmentPreview:Y,openFilePicker:le,handleFileInputChange:Ce,handleDragOver:ae,handleDragLeave:oe,handleDrop:Q,clearAfterSubmit:ne,clearAttachments:ge,loadAttachments:Ae}=Dhe({api:uc(),uploadImage:()=>i.uploadImage,sessionId:()=>i.sessionId,insertFolderPaths:Z}),_e=De=>De.kind==="image"||De.kind==="video",Ke=L(()=>pe.value.filter(_e)),xe=L(()=>pe.value.filter(De=>!_e(De))),Ne=G(null),et=G(null),ut=G(!1);function yt(){const De=Ne.value,vt=et.value;ut.value=De!==null&&vt!==null&&vt.scrollHeight>De.clientHeight+1}let Mt=null;qe(Ne,De=>{if(Mt?.disconnect(),Mt=null,De){const vt=new ResizeObserver(yt);vt.observe(De),Mt=vt}yt()},{immediate:!0}),qe(pe,()=>void kt(yt),{deep:!0}),Mn(()=>Mt?.disconnect());const Ze=G(null);qe(()=>[Ke.value.length,xe.value.length],([De,vt],[mt,Jt])=>{De<=mt&&vt<=Jt||kt(()=>{const Ki=Ne.value;Ki&&(De>mt&&Ze.value?Ki.scrollTop=Ze.value.offsetHeight-Ki.clientHeight:Ki.scrollTop=Ki.scrollHeight)})}),mn(()=>{a.value&&kt(()=>{h(),C()})}),Mn(()=>{pn()});function Ge(){f.value?.focus({preventScroll:!0})}function lt(De){Ae(De)}const tt=G(null);function It(De,vt){if(De.kind==="file"){De.fileId!==void 0&&uj(uc(),De.fileId,De.name,De.mediaType);return}tt.value=vt??null,we(De)}const Ut=L(()=>{const De=re.value;return!De||!De.previewUrl?null:{kind:De.kind==="video"?"video":"image",url:De.previewUrl,path:De.name,fileId:De.previewUrl.startsWith("blob:")?void 0:De.fileId,sessionId:De.previewUrl.startsWith("blob:")?void 0:De.sessionId}}),fn=L(()=>!pe.value.some(De=>De.uploading)&&(a.value.trim()!==""||pe.value.some(De=>!De.error&&De.fileId)));function Nn(){const De=a.value.trim();if(pe.value.some(Jt=>Jt.uploading))return;const vt=pe.value.filter(Jt=>!Jt.uploading&&!Jt.error&&Jt.fileId);if(!De&&vt.length===0)return;if(v.push(De),De==="/plan"){a.value="",d(),_.value=!1,y(),x();return}if(De==="/goal"){a.value="",d(),_.value=!1,y(),S();return}if(De==="/swarm"){a.value="",d(),_.value=!1,y(),po.value||o("toggleSwarm");return}if(De){const Jt=hae(De),Ki=Jt?p$(i.skills).find(Bo=>Bo.name===Jt.cmd||Bo.name===`/${ov}${Jt.cmd.slice(1)}`):void 0;if(Jt&&Ki){const Bo=Jt.arg?`${Jt.cmd} ${Jt.arg}`:Jt.cmd,bl=Ki.isSkill===!0;a.value="",d(),_.value=!1,y(),bl?(re.value=null,tt.value=null,ne(),ee(),o("command",{cmd:Bo,attachments:vt.map(ss=>e3(ss))})):o("command",{cmd:Bo,attachments:[]});return}}const mt={text:De,attachments:vt.map(Jt=>e3(Jt))};re.value=null,tt.value=null,ne(),a.value="",d(),_.value=!1,ee(),y(),o("submit",mt)}function Qt(){if(!i.running||pe.value.some(Jt=>Jt.uploading))return;const De=a.value.trim(),vt=pe.value.filter(Jt=>!Jt.uploading&&!Jt.error&&Jt.fileId);if(!De&&vt.length===0&&i.queued.length===0)return;const mt={text:De,attachments:vt.map(Jt=>e3(Jt))};ne(),v.push(De),a.value="",d(),_.value=!1,ee(),y(),o("steer",mt)}let un=!1,Dn=null;function pn(){Dn!==null&&(clearTimeout(Dn),Dn=null)}function wn(){pn(),un=!0}function bn(){pn(),Dn=setTimeout(()=>{Dn=null,un=!1},0)}function Xn(De){return un||De.isComposing||De.keyCode===229}function Ue(De){if(Xn(De))return;if(Be.value&&De.key==="Backspace"&&!De.shiftKey&&!De.altKey&&!De.metaKey&&!De.ctrlKey){const mt=f.value;if(mt&&mt.selectionStart===0&&mt.selectionEnd===0){De.preventDefault(),Pe();return}}if(De.key==="Escape"){if(Nt.value){De.preventDefault(),Ci();return}if(ot.value){De.preventDefault(),Pi();return}if(sn.value){De.preventDefault(),Ai();return}}if(_.value){if(De.key==="Escape"){De.preventDefault(),_.value=!1;return}if(De.key==="Tab"&&I.value.length===0){_.value=!1;return}}if(_.value&&I.value.length>0){if(De.key==="ArrowDown"){De.preventDefault(),$.value=($.value+1)%I.value.length;return}if(De.key==="ArrowUp"){De.preventDefault(),$.value=($.value-1+I.value.length)%I.value.length;return}if(De.key==="Enter"||De.key==="Tab"){De.preventDefault();const mt=I.value[$.value];mt&&T(mt);return}}if(R.value){if(De.key==="Escape"){De.preventDefault(),ee();return}if(q.value.length>0){if(De.key==="ArrowDown"){De.preventDefault(),j.value=(j.value+1)%q.value.length;return}if(De.key==="ArrowUp"){De.preventDefault(),j.value=(j.value-1+q.value.length)%q.value.length;return}if(De.key==="Enter"||De.key==="Tab"){De.preventDefault();const mt=q.value[j.value];mt&&V(mt);return}}}if(De.key==="s"&&(De.ctrlKey||De.metaKey)&&!De.shiftKey&&!De.altKey){i.running&&(De.preventDefault(),Qt());return}const vt=_.value&&I.value.length>0;if(!g.value&&!vt&&!R.value&&!De.shiftKey&&!De.altKey&&!De.metaKey&&!De.ctrlKey){const mt=v.isBrowsing();if(De.key==="ArrowUp"&&v.hasHistory()&&(mt||v.caretAtTextStart())){De.preventDefault(),v.recallOlder(),_.value=!1;return}if(De.key==="ArrowDown"&&mt){De.preventDefault(),v.recallNewer(),_.value=!1;return}}if(De.key==="Enter"&&!De.shiftKey){if(g.value&&!(De.metaKey||De.ctrlKey))return;De.preventDefault(),Nn()}}const st=L(()=>r("composer.send")),ct=L(()=>!!i.uploadImage),ot=G(!1),sn=G(!1),Nt=G(!1),Tn=G(null),fs=G(null),vi=G(null),Dt=G(null),Is=G(null),Ei=G(null);let Pn=null;function bs(){const De=Is.value;if(!De)return;const{scrollTop:vt,scrollHeight:mt,clientHeight:Jt}=De;if(mt<=Jt+1){Ei.value=null;return}const Ki=getComputedStyle(De),Bo=parseFloat(Ki.getPropertyValue("--menu-scrollbar-track-inset"))||0,bl=parseFloat(Ki.getPropertyValue("--menu-scrollbar-thumb-min"))||24,ss=Jt-Bo*2,Ns=Math.max(bl,Jt/mt*ss),du=mt-Jt,lf=De.offsetTop+Bo+vt/du*(ss-Ns);Ei.value={top:lf,height:Ns}}function Lo(){bs()}qe(Nt,async De=>{Pn?.disconnect(),Pn=null,Ei.value=null,De&&(await kt(),bs(),typeof ResizeObserver=="function"&&Is.value&&(Pn=new ResizeObserver(bs),Pn.observe(Is.value)))}),Mn(()=>{Pn?.disconnect(),Pn=null});const Oi=G(""),co=L(()=>{const De={};return Oi.value&&(De.right=Oi.value),De}),Wi=L(()=>ot.value||sn.value||Nt.value||_.value||R.value);t({loadForEdit:c,loadAttachmentsForEdit:lt,focus:Ge,anyPopupOpen:Wi,isEmpty:()=>a.value.trim().length===0&&pe.value.length===0});function fo(){ot.value=!ot.value,ot.value?(tl(),sn.value=!1,Nt.value=!1,document.addEventListener("click",hi,!0)):document.removeEventListener("click",hi,!0)}function Pi(){ot.value=!1,!sn.value&&!Nt.value&&document.removeEventListener("click",hi,!0)}function es(){sn.value=!sn.value,sn.value?(ws(),ot.value=!1,Nt.value=!1,document.addEventListener("click",hi,!0)):document.removeEventListener("click",hi,!0)}function Ai(){sn.value=!1,!ot.value&&!Nt.value&&document.removeEventListener("click",hi,!0)}function No(){Nt.value=!Nt.value,Nt.value?(ot.value=!1,sn.value=!1,_.value=!1,ee(),document.addEventListener("click",hi,!0),kt(()=>{fs.value?.querySelector(".am-row")?.focus()})):document.removeEventListener("click",hi,!0)}function Ci(){Nt.value=!1,!ot.value&&!sn.value&&document.removeEventListener("click",hi,!0)}const Ti=L(()=>{const De=[];return ct.value&&De.push({id:"files",icon:"attachment",nameKey:"composer.addFiles",action:ts}),De.push({id:"goal",icon:"target",nameKey:"status.goalLabel",descKey:"composer.addGoalDesc",action:fi}),De.push({id:"plan",icon:"file-edit",nameKey:"status.planLabel",descKey:"composer.addPlanDesc",action:Fr}),De.push({id:"swarm",icon:"sparkles",nameKey:"status.swarmLabel",descKey:"composer.addSwarmDesc",action:Ni}),De});function Yt(De){De.action(),f.value?.focus()}function vn(De){if(De.key==="Escape"){De.preventDefault(),Ci(),f.value?.focus();return}if(De.key==="Tab"){Ci();return}if(De.key!=="ArrowDown"&&De.key!=="ArrowUp")return;De.preventDefault();const vt=Array.from(fs.value?.querySelectorAll(".am-row")??[]);if(vt.length===0)return;const mt=vt.indexOf(document.activeElement),Jt=De.key==="ArrowDown"?(mt+1)%vt.length:(mt-1+vt.length)%vt.length;vt[Jt]?.focus()}function ts(){Ci(),le()}function fi(){Ci(),i.goalMode||S()}function Fr(){Ci(),Ts.value||x()}function Ni(){Ci(),po.value||o("toggleSwarm")}function hi(De){const vt=De.target,mt=Tn.value?.contains(vt)??!1,Jt=fs.value?.contains(vt)??!1;!mt&&!Jt&&(Pi(),Ai(),Ci())}Mn(()=>{document.removeEventListener("click",hi,!0)});const ho=L(()=>{const De=i.status?.ctxMax??0;return De<=0?0:Math.min(100,Math.max(0,Math.ceil((i.status?.ctxUsed??0)/De*100)))}),Xs=L(()=>{const De=ou(i.status?.ctxUsed??0),vt=ou(i.status?.ctxMax??0);return r("status.ctxTooltip",{used:De,max:vt,pct:ho.value})}),ns=L(()=>ho.value>=80),qi=L(()=>i.models?.find(De=>De.id===i.status?.modelId)),an=L(()=>Hy(qi.value)),eo=L(()=>B0(qi.value)),Us=L(()=>X2(qi.value,i.thinking)),Fo=L(()=>eo.value.includes(Us.value)?Us.value:""),Ms=L(()=>Toe(Us.value)),Es=L(()=>an.value==="unsupported"||eo.value.length<=1),to=L(()=>{if(!Ms.value)return"";const De=(qi.value?.supportEfforts?.length??0)>0,vt=Us.value;return De&&vt!=="on"?r("composer.thinkingSuffixEffort",{level:vt}):r("composer.thinkingSuffix")});function Li(De){Es.value||o("setThinking",i6(qi.value,De))}function wi(De){return De==="on"?r("status.thinkingOn"):De==="off"?r("status.thinkingOff"):hb(De)}const Vo=L(()=>eo.value.map(De=>({value:De,label:wi(De)}))),Ts=L(()=>i.planArmed===!0||i.planMode===!0),po=L(()=>i.swarmMode===!0),Ks=L(()=>i.goal?.status??i.activationBadges?.goal?.status??null),Zo=L(()=>Ks.value!==null&&Ks.value!=="complete"),Be=L(()=>i.goalMode?"goal":i.planArmed?"plan":null);function Pe(){Be.value==="goal"?o("toggleGoal"):Be.value==="plan"&&o("togglePlan")}const dt=G(null),St=G(""),An=L(()=>St.value?{textIndent:St.value}:void 0);let pi=null;function hs(){const De=dt.value;St.value=De?`calc(${De.offsetWidth}px + var(--space-1-5) - var(--space-05))`:""}qe(Be,async De=>{if(pi?.disconnect(),pi=null,!De){St.value="";return}await kt(),hs(),typeof ResizeObserver=="function"&&dt.value&&(pi=new ResizeObserver(hs),pi.observe(dt.value))},{immediate:!0}),Mn(()=>{pi?.disconnect(),pi=null});const is=[{mode:"manual",icon:"hand",color:"var(--color-text)",labelKey:"status.permissionManual",descKey:"status.permissionManualDesc"},{mode:"yolo",icon:"shield-question",color:"var(--color-warning)",labelKey:"status.permissionYolo",descKey:"status.permissionYoloDesc"},{mode:"auto",icon:"full-access",color:"var(--color-danger)",labelKey:"status.permissionAuto",descKey:"status.permissionAutoDesc"}],Ls=G(null),Ui=G(""),On=G("");function Cs(De){const vt={};return De&&(vt["--composer-menu-desc-width"]=De),vt}const Do=L(()=>({...Cs(Ui.value),...On.value?{left:On.value}:{}}));function ws(){const De=vi.value,vt=Tn.value;if(!De||!vt){On.value="";return}On.value=`${Math.round(De.getBoundingClientRect().left-vt.getBoundingClientRect().left)}px`}function tl(){const De=Dt.value,vt=Tn.value;if(!De||!vt){Oi.value="";return}Oi.value=`${Math.round(vt.getBoundingClientRect().right-De.getBoundingClientRect().right)}px`}let xi=null;function dr(De){const vt=Number.parseFloat(De);return Number.isFinite(vt)?vt:0}function rt(De){return`${De.fontStyle||"normal"} ${De.fontWeight||"400"} ${De.fontSize} ${De.fontFamily}`}function Se(De){return De.letterSpacing==="normal"?0:dr(De.letterSpacing)}function U(De,vt){if(!De)return 0;const mt=mWe(De,rt(vt),{letterSpacing:Se(vt)});return vWe(mt)}function me(){const De=Ls.value?.querySelector(".pd-desc");if(!De)return;const vt=getComputedStyle(De),mt=Math.max(0,...is.map(Jt=>U(r(Jt.descKey),vt)));Ui.value=mt>0?`${Math.ceil(mt)}px`:""}function ke(){typeof window>"u"||(xi!==null&&window.cancelAnimationFrame(xi),kt(()=>{xi=window.requestAnimationFrame(()=>{xi=null,me()})}))}qe(l,()=>{ke(),_.value&&D()},{immediate:!0}),mn(()=>{ke(),document.fonts?.ready.then(ke)}),Mn(()=>{xi!==null&&(window.cancelAnimationFrame(xi),xi=null)});function ze(De){o("setPermission",De),Ai()}const Ye=L(()=>is.find(De=>De.mode===i.status?.permission)),Ve=L(()=>Ye.value?r(Ye.value.labelKey):""),wt=L(()=>Ye.value?.icon??"hand"),pt=L(()=>qi.value?.provider??""),Ht=L(()=>!pt.value||!i.models?.length?[]:i.models.filter(De=>De.provider===pt.value)),Gt=L(()=>(i.models?.length??0)>0),Cn=L(()=>i.authReady===!1&&!Gt.value),Qn=L(()=>Cn.value&&!(i.managedSignedIn??!1)),jt=L(()=>Cn.value&&(i.managedSignedIn??!1)&&i.managedMembership==="free"),Rt=L(()=>new Set(i.starredIds??[]));function Bn(De){return Rt.value.has(De)}const ei=L(()=>i.models?.length?i.models.filter(De=>Bn(De.id)&&De.provider!==pt.value):[]),ji=G(null);qe(ot,async De=>{if(!De)return;await kt(),(ji.value?.querySelector(".md-row.is-current")??ji.value?.querySelector(".md-row"))?.focus()});function $o(De){if(De.key!=="ArrowDown"&&De.key!=="ArrowUp")return;const vt=Array.from(ji.value?.querySelectorAll(".md-row:not(:disabled)")??[]);if(!vt.length)return;De.preventDefault();const mt=vt.indexOf(document.activeElement),Jt=De.key==="ArrowDown"?(mt+1)%vt.length:(mt-1+vt.length)%vt.length;vt[Jt]?.focus()}function Go(De){o("selectModel",De),Pi()}return(De,vt)=>(k(),E("div",{class:Fe(["composer",{"drag-over":p(Ee),expanded:g.value}]),onDragover:vt[19]||(vt[19]=(...mt)=>p(ae)&&p(ae)(...mt)),onDragleave:vt[20]||(vt[20]=(...mt)=>p(oe)&&p(oe)(...mt)),onDrop:vt[21]||(vt[21]=(...mt)=>p(Q)&&p(Q)(...mt))},[Ut.value?(k(),de(Y7,{key:0,media:Ut.value,"origin-img":tt.value,onClose:vt[0]||(vt[0]=mt=>{tt.value=null,p(Y)()})},null,8,["media","origin-img"])):te("",!0),w("div",HWe,[p(pe).length>0?(k(),E("div",WWe,[w("div",{ref_key:"attScrollRef",ref:Ne,class:Fe(["att-scroll",{"is-overflowing":ut.value}])},[w("div",{ref_key:"attScrollContentRef",ref:et,class:"att-scroll-content"},[Ke.value.length>0?(k(),E("div",{key:0,ref_key:"attMediaRowRef",ref:Ze,class:"att-row att-row-media"},[(k(!0),E(Te,null,ht(Ke.value,mt=>(k(),de(yj,{key:mt.localId,kind:mt.kind,name:mt.name,url:mt.previewUrl,"file-id":mt.fileId,"session-id":mt.sessionId,uploading:mt.uploading,error:mt.error,removable:"","remove-label":p(r)("composer.removeNamed",{name:mt.name}),onActivate:Jt=>It(mt,Jt),onRemove:Jt=>p(X)(mt.localId)},null,8,["kind","name","url","file-id","session-id","uploading","error","remove-label","onActivate","onRemove"]))),128))],512)):te("",!0),xe.value.length>0?(k(),E("div",qWe,[(k(!0),E(Te,null,ht(xe.value,mt=>(k(),de(kj,{key:mt.localId,kind:"file",name:mt.name,"media-type":mt.mediaType,size:mt.size,uploading:mt.uploading,error:mt.error,removable:"","remove-label":p(r)("composer.removeNamed",{name:mt.name}),onActivate:Jt=>It(mt),onRemove:Jt=>p(X)(mt.localId)},null,8,["name","media-type","size","uploading","error","remove-label","onActivate","onRemove"]))),128))])):te("",!0)],512)],2),ut.value?(k(),E("span",UWe,F(p(r)("composer.attachmentCount",{n:p(pe).length})),1)):te("",!0),p(pe).length>=2?(k(),de(p(kn),{key:1,text:p(r)("composer.clearAll")},{default:he(()=>[K(p(tn),{class:"att-clear",size:"sm",label:p(r)("composer.clearAll"),onClick:p(ge)},{default:he(()=>[K(p(ve),{name:"trash"})]),_:1},8,["label","onClick"])]),_:1},8,["text"])):te("",!0)])):te("",!0),w("div",KWe,[p(_)?(k(),de(_We,{key:0,items:p(I),ranges:p(M),"active-index":p($),query:N.value,onSelect:p(T),onHover:vt[1]||(vt[1]=mt=>$.value=mt)},null,8,["items","ranges","active-index","query","onSelect"])):te("",!0),p(R)?(k(),de(jWe,{key:1,items:p(q),"active-index":p(j),loading:p(W),stale:p(z),onSelect:p(V),onHover:vt[2]||(vt[2]=mt=>j.value=mt)},null,8,["items","active-index","loading","stale","onSelect"])):te("",!0),K(ls,{name:"composer-menu-pop"},{default:he(()=>[Nt.value?(k(),E("div",{key:0,ref_key:"addMenuRef",ref:fs,class:"add-menu",onClick:vt[4]||(vt[4]=Ct(()=>{},["stop"])),onKeydown:vn},[w("div",{ref_key:"addScrollRef",ref:Is,class:"am-scroll",role:"menu",onScroll:Lo},[(k(!0),E(Te,null,ht(Ti.value,mt=>(k(),E("button",{key:mt.id,type:"button",class:"am-row",role:"menuitem",onMousedown:vt[3]||(vt[3]=Ct(()=>{},["prevent"])),onClick:Jt=>Yt(mt)},[w("span",ZWe,[K(p(ve),{name:mt.icon,size:"sm"},null,8,["name"])]),w("span",GWe,F(p(r)(mt.nameKey)),1),mt.descKey?(k(),E("span",QWe,F(p(r)(mt.descKey)),1)):te("",!0)],40,VWe))),128))],544),Ei.value?(k(),E("div",{key:0,class:"scroll-thumb",style:qt({top:`${Ei.value.top}px`,height:`${Ei.value.height}px`})},null,4)):te("",!0)],544)):te("",!0)]),_:1}),w("div",YWe,[Be.value?(k(),E("span",{key:0,ref_key:"wmPillRef",ref:dt,class:"wm-pill"},[K(p(ve),{name:Be.value==="goal"?"target":"file-edit",size:"sm"},null,8,["name"]),w("span",null,F(Be.value==="goal"?p(r)("status.goalLabel"):p(r)("status.planLabel")),1),K(p(tn),{class:"wm-x",size:"sm",label:p(r)("status.workModeDismiss"),tooltip:p(r)("status.workModeDismiss"),onMousedown:vt[5]||(vt[5]=Ct(()=>{},["prevent"])),onClick:Pe},{default:he(()=>[K(p(ve),{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])],512)):te("",!0),$n(w("textarea",{ref_key:"textareaRef",ref:f,"onUpdate:modelValue":vt[6]||(vt[6]=mt=>Hi(a)?a.value=mt:null),class:"ph",style:qt(An.value),placeholder:s.value,disabled:e.starting,autocomplete:"off",spellcheck:"false",rows:"1",role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!!O.value,"aria-controls":O.value,"aria-activedescendant":P.value,onKeydown:Ue,onCompositionstart:wn,onCompositionend:bn,onInput:se,onBlur:ie},null,44,JWe),[[uo,p(a)]]),K(p(kn),{text:g.value?p(r)("composer.collapseTitle"):p(r)("composer.expandTitle")},{default:he(()=>[g.value||b.value?(k(),E("button",{key:0,class:"expand-btn",type:"button","aria-label":g.value?p(r)("composer.collapseTitle"):p(r)("composer.expandTitle"),onClick:m},[g.value?(k(),de(p(ve),{key:0,name:"collapse",size:"sm"})):(k(),de(p(ve),{key:1,name:"expand",size:"sm"}))],8,XWe)):te("",!0)]),_:1},8,["text"])])]),ct.value?(k(),E("input",{key:1,ref_key:"fileInputRef",ref:fe,type:"file",multiple:"",class:"file-input-hidden",onChange:vt[7]||(vt[7]=(...mt)=>p(Ce)&&p(Ce)(...mt))},null,544)):te("",!0),w("div",{ref_key:"toolbarRef",ref:Tn,class:"toolbar"},[w("div",{ref_key:"menuMeasureRef",ref:Ls,class:"menu-measure","aria-hidden":"true"},[...vt[22]||(vt[22]=[w("span",{class:"pd-desc"},null,-1)])],512),w("div",eqe,[K(p(tn),{class:"composer-attach",size:"md",label:p(r)("composer.addMenu"),tooltip:p(r)("composer.addMenu"),"aria-haspopup":"menu","aria-expanded":Nt.value,onMousedown:vt[8]||(vt[8]=Ct(()=>{},["prevent"])),onClick:Ct(No,["stop"])},{default:he(()=>[K(p(ve),{name:"plus"})]),_:1},8,["label","tooltip","aria-expanded"]),e.status?(k(),E("span",{key:0,ref_key:"permPillRef",ref:vi,class:Fe(["perm-pill",["perm-"+e.status.permission,{open:sn.value}]]),role:"button",tabindex:"0","aria-label":Ve.value,onClick:Ct(es,["stop"]),onKeydown:[_s(es,["enter"]),_s(Ct(es,["prevent"]),["space"])]},[K(p(ve),{class:"perm-pill-icon",name:wt.value,size:"md"},null,8,["name"]),w("span",nqe,F(Ve.value),1)],42,tqe)):te("",!0),K(ls,{name:"composer-menu-pop"},{default:he(()=>[sn.value&&e.status?(k(),E("div",{key:0,class:"perm-dropdown",style:qt(Do.value),role:"menu",onClick:vt[9]||(vt[9]=Ct(()=>{},["stop"]))},[(k(),E(Te,null,ht(is,mt=>w("button",{key:mt.mode,class:Fe(["pd-row",{"is-current":mt.mode===e.status.permission}]),role:"menuitem",onClick:Jt=>ze(mt.mode)},[w("span",{class:"pd-icon",style:qt({color:mt.color})},[K(p(ve),{name:mt.icon,size:"md"},null,8,["name"])],4),w("span",sqe,[w("span",{class:"pd-name",style:qt({color:mt.color})},F(p(r)(mt.labelKey)),5),w("span",oqe,F(p(r)(mt.descKey)),1)]),w("span",rqe,[mt.mode===e.status.permission?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)])],10,iqe)),64))],4)):te("",!0)]),_:1}),po.value?(k(),E("span",lqe,[K(p(ve),{class:"swarm-ic",name:"sparkles",size:"md"}),w("span",aqe,F(p(r)("status.swarmLabel")),1),K(p(tn),{class:"swarm-x",size:"sm",label:p(r)("status.swarmDismiss"),tooltip:p(r)("status.swarmDismiss"),onMousedown:vt[10]||(vt[10]=Ct(()=>{},["prevent"])),onClick:vt[11]||(vt[11]=Ct(mt=>o("toggleSwarm"),["stop"]))},{default:he(()=>[K(p(ve),{name:"close",size:"sm"})]),_:1},8,["label","tooltip"])])):te("",!0)]),w("div",uqe,[ns.value?(k(),E("button",{key:0,class:"compact-chip",onClick:vt[12]||(vt[12]=Ct(mt=>o("compact"),["stop"]))},"/compact")):te("",!0),K(p(kn),{text:Xs.value},{default:he(()=>[e.status&&!e.hideContext?(k(),E("span",{key:0,class:"ctx-group",role:"img",tabindex:"0","aria-label":Xs.value},[K(p(yG),{pct:ho.value},null,8,["pct"])],8,cqe)):te("",!0)]),_:1},8,["text"]),e.status&&!Qn.value&&!jt.value?(k(),E("button",{key:1,ref_key:"modelPillRef",ref:Dt,type:"button",class:Fe(["model-pill",{open:ot.value}]),"aria-haspopup":"menu","aria-expanded":ot.value,onClick:Ct(fo,["stop"])},[w("span",fqe,F(e.status.model),1),to.value?(k(),E("span",hqe,F(to.value),1)):te("",!0),K(p(ve),{class:"cv",name:"chevron-down",size:"sm"})],10,dqe)):e.status&&jt.value?(k(),E("button",{key:2,type:"button",class:"model-pill login-pill",onClick:vt[13]||(vt[13]=Ct(mt=>p(z0)(),["stop"]))},[K(p(ve),{name:"music",size:"sm"}),w("span",pqe,F(p(r)("sidebar.upgrade")),1)])):e.status&&Qn.value?(k(),E("button",{key:3,type:"button",class:"model-pill login-pill",onClick:vt[14]||(vt[14]=Ct(mt=>o("login"),["stop"]))},[K(p(ve),{name:"log-in",size:"sm"}),w("span",gqe,F(p(r)("login.action")),1)])):te("",!0),e.working?(k(),de(p(kn),{key:4,text:p(r)("composer.interruptTitle")},{default:he(()=>[w("button",{class:"stop","aria-label":p(r)("composer.interrupt"),onClick:vt[15]||(vt[15]=mt=>o("interrupt"))},[K(p(ve),{name:"stop",size:"sm"})],8,mqe)]),_:1},8,["text"])):te("",!0),K(p(kn),{text:st.value},{default:he(()=>[w("button",{class:Fe(["send",{"is-starting":e.starting}]),"aria-label":st.value,disabled:e.starting||!fn.value,onClick:vt[16]||(vt[16]=mt=>Nn())},[e.starting?(k(),de(p(Mi),{key:0,size:"sm"})):(k(),de(p(ve),{key:1,name:"send",size:"sm"}))],10,vqe)]),_:1},8,["text"])]),K(ls,{name:"composer-menu-pop"},{default:he(()=>[ot.value&&e.status?(k(),E("div",{key:0,ref_key:"modelDropdownRef",ref:ji,class:"model-dropdown",style:qt(co.value),role:"menu",onClick:vt[18]||(vt[18]=Ct(()=>{},["stop"])),onKeydown:$o},[w("div",yqe,[ei.value.length>0?(k(),E("div",kqe,F(p(r)("status.starredModels")),1)):te("",!0),(k(!0),E(Te,null,ht(ei.value,mt=>(k(),E("button",{key:mt.id,class:Fe(["md-row",{"is-current":mt.id===e.status.modelId}]),role:"menuitem",onClick:Jt=>Go(mt.id)},[w("span",Aqe,[mt.id===e.status.modelId?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)]),w("span",Cqe,F(mt.displayName??mt.model),1),w("span",wqe,F(mt.provider),1),K(p(ve),{class:"md-star",name:"star",size:"sm"})],10,bqe))),128)),ei.value.length>0?(k(),E("div",xqe)):te("",!0),Ht.value.length>0?(k(),E("div",Sqe,F(pt.value),1)):te("",!0),(k(!0),E(Te,null,ht(Ht.value,mt=>(k(),E("button",{key:mt.id,class:Fe(["md-row",{"is-current":mt.id===e.status.modelId}]),role:"menuitem",onClick:Jt=>Go(mt.id)},[w("span",Iqe,[mt.id===e.status.modelId?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)]),w("span",Mqe,F(mt.displayName??mt.model),1),Bn(mt.id)?(k(),de(p(ve),{key:0,class:"md-star",name:"star",size:"sm"})):te("",!0)],10,_qe))),128))]),Ht.value.length>0?(k(),E("div",Eqe)):te("",!0),w("div",Tqe,[w("span",Lqe,F(p(r)("status.thinkingLabel")),1),an.value==="unsupported"?(k(),E("span",Nqe,F(p(r)("status.modeNotSupported")),1)):eo.value.length>1?(k(),de(p(Mo),{key:1,"model-value":Fo.value,options:Vo.value,size:"xs","onUpdate:modelValue":Li},null,8,["model-value","options"])):(k(),E("span",Fqe,F(wi(eo.value[0]??Us.value)),1))]),vt[23]||(vt[23]=w("div",{class:"md-divider"},null,-1)),w("div",Dqe,F(p(r)("status.cacheNote")),1),vt[24]||(vt[24]=w("div",{class:"md-divider"},null,-1)),w("button",{class:"md-row md-row-more",role:"menuitem",onClick:vt[17]||(vt[17]=mt=>{Pi(),o("pickModel")})},[w("span",$qe,[K(p(ve),{name:"list",size:"sm"})]),w("span",Bqe,F(p(r)("status.moreModels")),1),K(p(ve),{class:"md-more-arrow",name:"chevron-right",size:"sm"})])],36)):te("",!0)]),_:1})],512)]),De.$slots.footer?(k(),E("div",zqe,[Rn(De.$slots,"footer",{},void 0,!0)])):te("",!0),w("div",{class:Fe(["drop-overlay",{show:p(Ee)}]),"aria-hidden":"true"},[w("div",Rqe,[K(p(ve),{name:"file-plus",size:"lg"}),w("span",null,F(p(r)("composer.dropToAttach")),1)])],2)],34))}}),Ij=gt(Oqe,[["__scopeId","data-v-139db90d"]]),Pqe={class:"goal-panel"},jqe={key:0,class:"goal-criterion"},Hqe={class:"goal-criterion-label"},Wqe=Qe({__name:"GoalPanel",props:{goal:{},openFile:{type:Function}},setup(e){const{t}=Bt();return(n,i)=>(k(),E("div",Pqe,[K(p(lu),{text:e.goal.objective,"open-file":e.openFile},null,8,["text","open-file"]),e.goal.completionCriterion?(k(),E("div",jqe,[w("span",Hqe,[K(p(ve),{name:"check-list",size:"sm"}),$e(" "+F(p(t)("status.goalDoneWhen")),1)]),K(p(lu),{text:e.goal.completionCriterion,"open-file":e.openFile},null,8,["text","open-file"])])):te("",!0)]))}}),qqe=gt(Wqe,[["__scopeId","data-v-cdb3e8b0"]]),Uqe={class:"plan-panel"},Kqe={key:0,class:"plan-review-row"},Vqe={class:"plan-review-label"},Zqe={key:1,class:"plan-review-row"},Gqe={class:"plan-review-label"},Qqe={class:"plan-review-feedback"},Yqe={key:3,class:"plan-path-only"},Jqe={class:"plan-path-hint"},Xqe={key:1,class:"plan-empty"},eUe=Qe({__name:"PlanPanel",props:{plan:{},planModeOn:{type:Boolean},openFile:{type:Function}},setup(e){const t=e,{t:n}=Bt(),i=L(()=>t.plan&&!t.plan.plan&&t.plan.path?t.plan.path:void 0);function s(){i.value&&t.openFile?.({path:i.value})}return(o,r)=>(k(),E("div",Uqe,[e.plan?(k(),E(Te,{key:0},[e.plan.review?.selectedOption?(k(),E("div",Kqe,[w("span",Vqe,F(p(n)("tools.plan.selectedOption")),1),w("span",null,F(e.plan.review.selectedOption),1)])):te("",!0),e.plan.review?.feedback?(k(),E("div",Zqe,[w("span",Gqe,F(p(n)("tools.plan.feedback")),1),w("span",Qqe,F(e.plan.review.feedback),1)])):te("",!0),e.plan.plan?(k(),de(p(lu),{key:2,text:e.plan.plan,"open-file":e.openFile},null,8,["text","open-file"])):te("",!0),i.value?(k(),E("div",Yqe,[w("span",Jqe,F(p(n)("tools.plan.pathOnlyHint")),1),K(p(Zt),{variant:"ghost",size:"sm",class:"plan-path",onClick:s},{default:he(()=>[$e(F(i.value),1)]),_:1})])):te("",!0)],64)):(k(),E("div",Xqe,[K(p(ve),{name:"file-edit",size:"lg",class:"plan-empty-ico"}),w("span",null,F(e.planModeOn?p(n)("status.planEmptyArmed"):p(n)("status.planEmptyIdle")),1)]))]))}}),tUe=gt(eUe,[["__scopeId","data-v-dea23306"]]),nUe={key:0,class:"qh-chip"},iUe={class:"qtitle"},sUe={class:"qbody"},oUe={class:"qopts"},rUe=["onClick"],lUe={class:"qopt-key"},aUe={class:"qopt-text"},uUe={class:"qopt-label"},cUe={key:0,class:"qopt-desc"},dUe={class:"qopt-label"},fUe=["placeholder"],hUe={class:"qfoot"},pUe={class:"qbtns"},gUe={class:"qhint"},mUe=Qe({__name:"QuestionCard",props:{question:{},busyKind:{}},emits:["answer","dismiss"],setup(e,{emit:t}){const n=e,{t:i}=Bt(),s=t,o=G(0),r=G(!1);function l(){r.value&&(r.value=!1)}const a=L(()=>n.question.questions[o.value]),u=L(()=>n.question.questions.length);function c(){o.value>0&&o.value--}function d(){o.value<u.value-1&&o.value++}function f(z){const H=g.value[z];return H?H.kind==="multi"?H.optionIds.length>0:H.kind==="multiWithOther"?H.optionIds.length>0||H.otherText.trim().length>0:H.kind==="other"?H.text.trim().length>0:!0:!1}function h(){return f(a.value.id)}const g=G({});function m(z){return z.recommended===!0?!0:/\b(?:recommended|recommend)\b|推荐/.test(`${z.label} ${z.description??""}`.toLowerCase())}function y(){const z={...g.value};let H=!1;for(const ee of n.question.questions){if(z[ee.id])continue;const V=ee.options.filter(m);V.length!==0&&(z[ee.id]=ee.multiSelect?{kind:"multi",optionIds:V.map(ie=>ie.id)}:{kind:"single",optionId:V[0].id},H=!0)}H&&(g.value=z)}qe(()=>n.question.questionId,()=>{o.value=0,r.value=!1,g.value={},C.value={}}),qe(()=>n.question,()=>{o.value>=n.question.questions.length&&(o.value=0),y()},{immediate:!0,deep:!0});function A(z,H){const ee=g.value[z];if(ee&&ee.kind==="single"&&ee.optionId===H){const V={...g.value};delete V[z],g.value=V}else g.value={...g.value,[z]:{kind:"single",optionId:H}}}function b(z,H){const ee=g.value[z],V=ee&&(ee.kind==="multi"||ee.kind==="multiWithOther")?ee.kind==="multi"?[...ee.optionIds]:[...ee.optionIds]:[],ie=V.indexOf(H);ie>=0?V.splice(ie,1):V.push(H);const se=g.value[z],Z=se&&se.kind==="multiWithOther"?se.otherText:"";Z?g.value={...g.value,[z]:{kind:"multiWithOther",optionIds:V,otherText:Z}}:g.value={...g.value,[z]:{kind:"multi",optionIds:V}}}const C=G({}),v=G(null);function x(z){const H=n.question.questions.find(V=>V.id===z),ee=C.value[z]??"";if(H.multiSelect){const V=g.value[z],ie=V&&(V.kind==="multi"||V.kind==="multiWithOther")?V.kind==="multi"?[...V.optionIds]:[...V.optionIds]:[];g.value={...g.value,[z]:{kind:"multiWithOther",optionIds:ie,otherText:ee}}}else g.value={...g.value,[z]:{kind:"other",text:ee}}}function S(z){x(z),kt(()=>v.value?.focus())}function _(z,H){const ee=g.value[z];return ee?ee.kind==="single"?ee.optionId===H:ee.kind==="multi"||ee.kind==="multiWithOther"?ee.optionIds.includes(H):!1:!1}function I(z){const H=g.value[z];return!!(H&&(H.kind==="other"||H.kind==="multiWithOther"))}function M(){return n.question.questions.every(z=>f(z.id))}const $=L(()=>n.busyKind==="answer"),D=L(()=>n.busyKind==="dismiss"),T=L(()=>!!n.busyKind);function N(){if(T.value||!M())return;const z={answers:g.value,method:"click"};s("answer",n.question.questionId,z)}function O(){T.value||s("dismiss",n.question.questionId)}const P=G(0);qe([o,()=>n.question.questionId],()=>{P.value=0});const{handleCompositionStart:R,handleCompositionEnd:q,isComposingKeyEvent:j}=Xr();function W(z){const H=(document.activeElement?.tagName??"").toLowerCase(),ee=H==="input"||H==="textarea";if(z.metaKey||z.ctrlKey||z.altKey||T.value||j(z)||_o.value>0)return;if(z.key==="Enter"){if(z.preventDefault(),r.value)return;o.value<u.value-1&&h()?d():M()&&N();return}if(ee)return;if(z.key==="Escape"){if(_o.value>0||z.defaultPrevented)return;z.preventDefault(),O();return}if(r.value)return;if(z.key==="ArrowDown"||z.key==="ArrowUp"){const ie=a.value,se=ie.options.length+(ie.allowOther?1:0);if(se===0)return;z.preventDefault();const Z=z.key==="ArrowDown"?1:-1,pe=Math.min(se-1,Math.max(0,P.value+Z));if(pe===P.value)return;P.value=pe;const re=ie.options[P.value];re?ie.multiSelect||A(ie.id,re.id):ie.allowOther&&!ie.multiSelect&&x(ie.id);return}if(z.key===" "&&a.value.multiSelect){z.preventDefault();const ie=a.value,se=ie.options[P.value];se?b(ie.id,se.id):ie.allowOther&&x(ie.id);return}const V=parseInt(z.key,10);if(!isNaN(V)&&V>=1&&V<=9){z.preventDefault();const ie=a.value,se=V-1,Z=ie.options[se];Z&&(P.value=se,ie.multiSelect?b(ie.id,Z.id):A(ie.id,Z.id))}}return mn(()=>document.addEventListener("keydown",W)),Mn(()=>document.removeEventListener("keydown",W)),(z,H)=>(k(),E("div",{class:Fe(["qcard",{minimized:r.value}])},[w("div",{class:Fe(["qh",{clickable:r.value}]),onClick:l},[u.value>1?(k(),E("span",nUe,F(o.value+1),1)):te("",!0),w("span",iUe,F(a.value.question),1),K(p(tn),{class:"qmin",size:"sm",label:r.value?p(i)("question.expand"):p(i)("question.minimize"),tooltip:r.value?p(i)("question.expand"):p(i)("question.minimize"),onClick:H[0]||(H[0]=Ct(ee=>r.value=!r.value,["stop"]))},{default:he(()=>[r.value?(k(),de(p(ve),{key:0,name:"chevron-up",size:"md"})):(k(),de(p(ve),{key:1,name:"minus",size:"md"}))]),_:1},8,["label","tooltip"]),K(p(tn),{class:"qclose",size:"sm",label:p(i)("question.dismiss"),tooltip:p(i)("question.dismiss"),disabled:T.value,onClick:Ct(O,["stop"])},{default:he(()=>[K(p(ve),{name:"close",size:"md"})]),_:1},8,["label","tooltip","disabled"])],2),r.value?te("",!0):(k(),E(Te,{key:0},[w("div",sUe,[a.value.body?(k(),de(p(lu),{key:0,text:a.value.body,class:"qmdbody"},null,8,["text"])):te("",!0),w("div",oUe,[(k(!0),E(Te,null,ht(a.value.options,(ee,V)=>(k(),E("label",{key:ee.id,class:Fe(["qopt",{selected:_(a.value.id,ee.id),highlighted:a.value.multiSelect&&V===P.value}]),onClick:Ct(ie=>{P.value=V,a.value.multiSelect?b(a.value.id,ee.id):A(a.value.id,ee.id)},["prevent"])},[w("span",lUe,F(V+1),1),w("span",{class:Fe(["qopt-glyph",a.value.multiSelect?"chk":"rad"])},null,2),w("span",aUe,[w("span",uUe,F(ee.label),1),ee.description?(k(),E("span",cUe,F(ee.description),1)):te("",!0)])],10,rUe))),128)),a.value.allowOther?(k(),E("label",{key:0,class:Fe(["qopt",{selected:I(a.value.id),highlighted:a.value.multiSelect&&P.value===a.value.options.length}]),onClick:H[6]||(H[6]=Ct(ee=>{P.value=a.value.options.length,S(a.value.id)},["prevent"]))},[H[7]||(H[7]=w("span",{class:"qopt-key"},null,-1)),w("span",{class:Fe(["qopt-glyph",a.value.multiSelect?"chk":"rad"])},null,2),w("span",dUe,F(a.value.otherLabel??p(i)("question.otherDefault")),1),$n(w("input",{ref_key:"otherInputEl",ref:v,"onUpdate:modelValue":H[1]||(H[1]=ee=>C.value[a.value.id]=ee),class:"other-input",type:"text",placeholder:a.value.otherLabel??p(i)("question.otherDefault"),onInput:H[2]||(H[2]=ee=>x(a.value.id)),onFocus:H[3]||(H[3]=ee=>x(a.value.id)),onCompositionstart:H[4]||(H[4]=(...ee)=>p(R)&&p(R)(...ee)),onCompositionend:H[5]||(H[5]=(...ee)=>p(q)&&p(q)(...ee))},null,40,fUe),[[uo,C.value[a.value.id]]])],2)):te("",!0)])]),w("div",hUe,[w("div",pUe,[o.value<u.value-1?(k(),de(p(Zt),{key:0,class:"qmain",size:"md",variant:"primary",disabled:!h(),onClick:d},{default:he(()=>[$e(F(p(i)("question.nextQuestion")),1)]),_:1},8,["disabled"])):(k(),de(p(Zt),{key:1,class:"qmain",size:"md",variant:"primary",disabled:!M(),loading:$.value,onClick:N},{default:he(()=>[$e(F(p(i)("question.submit")),1)]),_:1},8,["disabled","loading"])),u.value>1?(k(),de(p(Zt),{key:2,size:"md",variant:"ghost",disabled:o.value===0||T.value,onClick:c},{default:he(()=>[$e(F(p(i)("question.back")),1)]),_:1},8,["disabled"])):te("",!0),K(p(Zt),{size:"md",variant:"ghost",loading:D.value,disabled:T.value,onClick:O},{default:he(()=>[$e(F(p(i)("question.dismiss")),1)]),_:1},8,["loading","disabled"])]),w("span",gUe,F(p(i)("question.hint")),1)])],64))],2))}}),vUe=gt(mUe,[["__scopeId","data-v-ca95f2cd"]]),yUe={class:"akind"},kUe={key:1,class:"apeek"},bUe={class:"ab"},AUe=["title"],CUe={class:"code-path"},wUe={key:2,class:"body-shell"},xUe={class:"shell-cmd"},SUe={key:0,class:"shell-cwd"},_Ue={key:1,class:"shell-danger"},IUe={class:"code-path"},MUe={key:4,class:"body-chip"},EUe={class:"chip-label"},TUe={class:"chip-value"},LUe={key:0,class:"chip-detail"},NUe={key:5,class:"body-chip"},FUe={key:0,class:"chip-label"},DUe={class:"chip-value"},$Ue={key:6,class:"body-chip"},BUe={class:"chip-label"},zUe={class:"chip-value"},RUe={key:0,class:"chip-detail"},OUe={key:7,class:"body-chip"},PUe={class:"chip-label"},jUe={class:"chip-value"},HUe={key:0,class:"chip-detail"},WUe={key:8,class:"body-todo"},qUe={class:"todo-glyph"},UUe={key:0,class:"plan-opts"},KUe=["disabled","onClick"],VUe={class:"popt-key"},ZUe={class:"popt-text"},GUe={class:"popt-label"},QUe={key:0,class:"popt-desc"},YUe={key:10,class:"body-generic"},JUe={class:"gen-text"},XUe={key:11,class:"feedback-wrap"},eKe={class:"feedback-hint"},tKe={class:"af"},nKe={class:"abtns"},iKe={key:0,class:"knum"},sKe={key:0,class:"knum"},oKe=.4,rKe=Qe({__name:"ApprovalCard",props:{block:{},agentName:{},busy:{type:Boolean},openFile:{type:Function}},emits:["decide"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>{const fe=n.block;return fe.kind!=="plan_review"?null:{plan:fe.plan,path:fe.path,options:fe.options??[]}}),r=G(!1),l=G(null),a=G(null),u=G(null),c=G(!1),d=G(!1);function f(){c.value=(a.value?.scrollTop??0)>0||(u.value?.scrollTop??0)>0,d.value=(l.value?.scrollTop??0)>0}function h(){f()}const g=G(!1),m=L(()=>{const fe=n.block.kind;return fe==="plan_review"||fe==="diff"||fe==="file"});function y(){r.value&&(r.value=!1)}const A=["shell","diff","file","fileop","url","search","invocation","todo","plan_review","generic"];function b(){return A.includes(n.block.kind)?n.block.kind:"generic"}function C(){return s(`approval.title.${b()}`)}const v=L(()=>{const fe=n.block;switch(fe.kind){case"diff":case"file":case"fileop":return fe.path;case"shell":return fe.command;case"url":return fe.url;case"search":return fe.query;case"invocation":return fe.name;case"generic":return fe.summary;default:return""}}),x=G(!1),S=G(""),_=G(null);function I(){const fe=_.value?.el;if(!fe)return;fe.style.height="auto";const X=(window.visualViewport?.height??window.innerHeight)*oKe;fe.style.height=`${Math.min(fe.scrollHeight,X)}px`,fe.style.overflowY=fe.scrollHeight>X?"auto":"hidden"}qe(S,()=>void kt(I)),qe(r,fe=>{fe||kt(I)});const{fontScale:M}=n6();qe(M,()=>void kt(I));let $=null,D=0;mn(()=>{window.addEventListener("resize",I),window.visualViewport?.addEventListener("resize",I),$=new ResizeObserver(fe=>{const Ee=fe[0]?.contentRect.width??0;Ee!==D&&(D=Ee,I())}),l.value&&$.observe(l.value)}),Mn(()=>{window.removeEventListener("resize",I),window.visualViewport?.removeEventListener("resize",I),$?.disconnect()});function T(){n.busy||(x.value=!0,S.value="",setTimeout(()=>_.value?.el?.focus(),0))}function N(){if(n.busy)return;const fe=S.value.trim();o.value?z("feedback",{decision:"rejected",selectedLabel:"Revise",feedback:fe||void 0}):z("feedback",{decision:"rejected",feedback:fe||void 0}),x.value=!1,S.value=""}function O(){n.busy||(x.value=!1,S.value="")}const{handleCompositionStart:P,handleCompositionEnd:R,isComposingKeyEvent:q}=Xr();function j(fe){q(fe)||(fe.key==="Enter"&&!fe.shiftKey?(fe.preventDefault(),N()):fe.key==="Escape"&&(fe.preventDefault(),O()))}const W=G(null);qe(()=>n.busy,fe=>{fe||(W.value=null)});function z(fe,Ee){n.busy||(W.value=fe,i("decide",Ee))}function H(){z("approve",{decision:"approved"})}function ee(){z("approveSession",{decision:"approved",scope:"session"})}function V(){z("reject",{decision:"rejected"})}function ie(){z("approvePlan",{decision:"approved"})}function se(fe){z(`option:${fe}`,{decision:"approved",selectedLabel:fe})}function Z(){n.busy||T()}function pe(){z("rejectAndExit",{decision:"rejected",selectedLabel:"Reject and Exit"})}function re(fe){const Ee=(document.activeElement?.tagName??"").toLowerCase();if(Ee==="input"||Ee==="textarea"||fe.metaKey||fe.ctrlKey||fe.altKey||_o.value>0||fe.defaultPrevented)return;if(x.value){fe.key==="Escape"&&(fe.preventDefault(),O());return}if(n.busy||r.value)return;const X=o.value;if(X){if(X.options.length===0){fe.key==="1"?(fe.preventDefault(),ie()):fe.key==="2"?(fe.preventDefault(),Z()):fe.key==="3"&&(fe.preventDefault(),pe());return}fe.key==="1"&&X.options[0]?(fe.preventDefault(),se(X.options[0].label)):fe.key==="2"&&X.options[1]?(fe.preventDefault(),se(X.options[1].label)):fe.key==="3"&&X.options[2]&&(fe.preventDefault(),se(X.options[2].label));return}fe.key==="1"?(fe.preventDefault(),H()):fe.key==="2"?(fe.preventDefault(),ee()):fe.key==="3"?(fe.preventDefault(),V()):fe.key==="4"&&(fe.preventDefault(),T())}return mn(()=>document.addEventListener("keydown",re)),Mn(()=>document.removeEventListener("keydown",re)),N0(f),(fe,Ee)=>(k(),E("div",{ref_key:"cardRef",ref:l,class:Fe(["appr",{minimized:r.value,scrolled:d.value}]),onScroll:f},[w("div",{class:Fe(["ah",{clickable:r.value}]),onClick:y},[w("span",yUe,F(C()),1),e.agentName&&!r.value?(k(),de(p(va),{key:0,variant:"neutral",size:"sm"},{default:he(()=>[$e(F(p(s)("approval.subagentBadge",{name:e.agentName})),1)]),_:1})):te("",!0),r.value&&v.value?(k(),E("span",kUe,F(v.value),1)):te("",!0),m.value&&!r.value?(k(),de(p(tn),{key:2,class:"aexpand",size:"sm",label:g.value?p(s)("approval.collapsePlan"):p(s)("approval.expandPlan"),tooltip:g.value?p(s)("approval.collapsePlan"):p(s)("approval.expandPlan"),onClick:Ee[0]||(Ee[0]=X=>g.value=!g.value)},{default:he(()=>[K(p(ve),{name:g.value?"collapse":"expand",size:"md"},null,8,["name"])]),_:1},8,["label","tooltip"])):te("",!0),K(p(tn),{class:"amin",size:"sm",label:r.value?p(s)("question.expand"):p(s)("question.minimize"),tooltip:r.value?p(s)("question.expand"):p(s)("question.minimize"),onClick:Ee[1]||(Ee[1]=Ct(X=>r.value=!r.value,["stop"]))},{default:he(()=>[r.value?(k(),de(p(ve),{key:0,name:"chevron-up",size:"md"})):(k(),de(p(ve),{key:1,name:"minus",size:"md"}))]),_:1},8,["label","tooltip"])],2),r.value?te("",!0):(k(),E(Te,{key:0},[w("div",bUe,[e.block.kind==="plan_review"&&e.block.path?(k(),E("button",{key:0,type:"button",class:"plan-path",title:e.block.path,onClick:Ee[2]||(Ee[2]=X=>n.openFile?.({path:e.block.path,content:e.block.plan}))},F(e.block.path),9,AUe)):te("",!0),e.block.kind==="diff"?(k(),E("div",{key:1,class:Fe(["body-code",{expanded:g.value}])},[w("div",CUe,F(e.block.path),1),e.block.diff.length>0?(k(),de($l,{key:0,lines:e.block.diff,path:e.block.path},null,8,["lines","path"])):te("",!0)],2)):e.block.kind==="shell"?(k(),E("div",wUe,[w("div",xUe,[Ee[4]||(Ee[4]=w("span",{class:"shell-dollar"},"$",-1)),$e(" "+F(e.block.command),1)]),e.block.cwd?(k(),E("div",SUe,"cwd: "+F(e.block.cwd),1)):te("",!0),e.block.danger?(k(),E("div",_Ue,[K(p(ve),{name:"alert-triangle",size:"sm",class:"shell-danger-ic"}),w("span",null,F(p(s)("approval.danger",{detail:e.block.danger})),1)])):te("",!0)])):e.block.kind==="file"?(k(),E("div",{key:3,class:Fe(["body-code",{expanded:g.value}])},[w("div",IUe,F(e.block.path),1),K($l,{code:e.block.content,path:e.block.path},null,8,["code","path"])],2)):e.block.kind==="fileop"?(k(),E("div",MUe,[w("span",EUe,F(e.block.op),1),w("span",TUe,F(e.block.path),1),e.block.detail?(k(),E("span",LUe,F(e.block.detail),1)):te("",!0)])):e.block.kind==="url"?(k(),E("div",NUe,[e.block.method?(k(),E("span",FUe,F(e.block.method),1)):te("",!0),w("span",DUe,F(e.block.url),1)])):e.block.kind==="search"?(k(),E("div",$Ue,[w("span",BUe,F(p(s)("approval.searchQueryLabel")),1),w("span",zUe,F(e.block.query),1),e.block.scope?(k(),E("span",RUe,F(p(s)("approval.searchScope",{scope:e.block.scope})),1)):te("",!0)])):e.block.kind==="invocation"?(k(),E("div",OUe,[w("span",PUe,F(e.block.kind2),1),w("span",jUe,F(e.block.name),1),e.block.description?(k(),E("span",HUe,F(e.block.description),1)):te("",!0)])):e.block.kind==="todo"?(k(),E("div",WUe,[(k(!0),E(Te,null,ht(e.block.items,(X,we)=>(k(),E("div",{key:we,class:"todo-item"},[w("span",qUe,F(X.status==="done"||X.status==="completed"?"✓":"○"),1),w("span",{class:Fe(["todo-title",{"todo-done":X.status==="done"||X.status==="completed"}])},F(X.title),3)]))),128))])):e.block.kind==="plan_review"?(k(),E("div",{key:9,ref_key:"planWrapEl",ref:a,class:Fe(["body-plan-wrap",{scrolled:c.value}]),onScroll:h},[w("div",{ref_key:"planBodyEl",ref:u,class:Fe(["body-plan",{expanded:g.value}]),onScroll:h},[K(p(lu),{text:e.block.plan,"open-file":n.openFile},null,8,["text","open-file"])],34),o.value&&o.value.options.length>0?(k(),E("div",UUe,[(k(!0),E(Te,null,ht(o.value.options,(X,we)=>(k(),E("button",{key:we,type:"button",class:"popt",disabled:e.busy,onClick:Y=>se(X.label)},[w("span",VUe,F(we+1),1),w("span",ZUe,[w("span",GUe,F(X.label),1),X.description?(k(),E("span",QUe,F(X.description),1)):te("",!0)]),W.value===`option:${X.label}`?(k(),de(p(Mi),{key:0,size:"sm",class:"popt-spin"})):te("",!0)],8,KUe))),128))])):te("",!0)],34)):(k(),E("div",YUe,[w("span",JUe,F(e.block.summary),1)])),x.value?(k(),E("div",XUe,[K(p(gQ),{ref_key:"feedbackRef",ref:_,modelValue:S.value,"onUpdate:modelValue":Ee[3]||(Ee[3]=X=>S.value=X),placeholder:p(s)("approval.feedbackPlaceholder"),rows:3,resize:!1,onKeydown:j,onCompositionstart:p(P),onCompositionend:p(R)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),w("div",eKe,F(p(s)("approval.feedbackHint")),1)])):te("",!0)]),w("div",tKe,[w("div",nKe,[x.value?(k(),E(Te,{key:0},[K(p(Zt),{size:"md",variant:"danger-soft",loading:W.value==="feedback",disabled:e.busy,onClick:N},{default:he(()=>[$e(F(p(s)("approval.feedbackSubmit")),1)]),_:1},8,["loading","disabled"]),K(p(Zt),{size:"md",variant:"ghost",disabled:e.busy,onClick:O},{default:he(()=>[$e(F(p(s)("approval.feedbackCancel")),1)]),_:1},8,["disabled"])],64)):o.value?(k(),E(Te,{key:1},[o.value.options.length===0?(k(),de(p(Zt),{key:0,class:"amain",size:"md",variant:"primary",loading:W.value==="approvePlan",disabled:e.busy,onClick:ie},{default:he(()=>[Ee[5]||(Ee[5]=w("span",{class:"knum"},"1",-1)),$e(F(p(s)("approval.approvePlan")),1)]),_:1},8,["loading","disabled"])):te("",!0),K(p(Zt),{size:"md",variant:"ghost",disabled:e.busy,onClick:Z},{default:he(()=>[o.value.options.length===0?(k(),E("span",iKe,"2")):te("",!0),$e(F(p(s)("approval.revise")),1)]),_:1},8,["disabled"]),K(p(Zt),{size:"md",variant:"ghost",loading:W.value==="rejectAndExit",disabled:e.busy,onClick:pe},{default:he(()=>[o.value.options.length===0?(k(),E("span",sKe,"3")):te("",!0),$e(F(p(s)("approval.rejectAndExit")),1)]),_:1},8,["loading","disabled"])],64)):(k(),E(Te,{key:2},[K(p(Zt),{class:"amain",size:"md",variant:"primary",loading:W.value==="approve",disabled:e.busy,onClick:H},{default:he(()=>[Ee[6]||(Ee[6]=w("span",{class:"knum"},"1",-1)),$e(F(p(s)("approval.approve")),1)]),_:1},8,["loading","disabled"]),K(p(Zt),{size:"md",variant:"ghost",loading:W.value==="approveSession",disabled:e.busy,onClick:ee},{default:he(()=>[Ee[7]||(Ee[7]=w("span",{class:"knum"},"2",-1)),$e(F(p(s)("approval.approveSession")),1)]),_:1},8,["loading","disabled"]),K(p(Zt),{size:"md",variant:"ghost",loading:W.value==="reject",disabled:e.busy,onClick:V},{default:he(()=>[Ee[8]||(Ee[8]=w("span",{class:"knum"},"3",-1)),$e(F(p(s)("approval.reject")),1)]),_:1},8,["loading","disabled"]),K(p(Zt),{size:"md",variant:"ghost",disabled:e.busy,onClick:T},{default:he(()=>[Ee[9]||(Ee[9]=w("span",{class:"knum"},"4",-1)),$e(F(p(s)("approval.feedback")),1)]),_:1},8,["disabled"])],64))])])],64))],34))}}),lKe=gt(rKe,[["__scopeId","data-v-319750a5"]]),aKe={class:"taskspane"},uKe={class:"tp-list"},cKe={key:0,class:"tp-empty"},dKe={class:"tp-main"},fKe=["aria-label","onClick"],hKe=["aria-label"],pKe={class:"tp-name"},gKe={key:1,class:"tp-meta"},mKe={key:2,class:"tp-model"},vKe={key:3,class:"tp-model"},yKe={key:4,class:"tp-time"},kKe=Qe({__name:"TasksPane",props:{tasks:{},filter:{}},emits:["cancel","open"],setup(e,{emit:t}){const n=e,i={active:"tasks.emptyRecent",running:"tasks.emptyRunning",done:"tasks.emptyDone",all:"tasks.emptyTasks"},s=L(()=>i[n.filter??"all"]),o=t,{t:r}=Bt();function l(y){return!!(y.output&&y.output.length>0||y.meta)}function a(y){u(y)&&o("open",y.agentId??y.id)}function u(y){return y.kind==="subagent"||l(y)}function c(y){return typeof y.durationMs!="number"?"":su(y.durationMs,{h:r("status.timeUnitHour"),m:r("status.timeUnitMinute"),s:r("status.timeUnitSecond")})}function d(y){return y.state==="done"?r("tasks.stateDone"):y.state==="fail"?r("tasks.stateFail"):y.state==="cancelled"?r("tasks.stateCancelled"):r("tasks.running")}const f=cn("modelDisplay"),h=cn("subagentEffort");function g(y){if(y.kind==="subagent")return f?.(y.model)}function m(y){if(y.kind==="subagent")return h?.(y.thinkingEffort)}return(y,A)=>(k(),E("div",aKe,[w("div",uKe,[e.tasks.length===0?(k(),E("div",cKe,F(p(r)(s.value)),1)):(k(!0),E(Te,{key:1},ht(e.tasks,b=>(k(),E("div",{key:b.id,class:Fe(["tp-row",{fail:b.state==="fail",expandable:u(b)}])},[w("div",dKe,[u(b)?(k(),E("button",{key:0,type:"button",class:"tp-open","aria-label":b.name,onClick:C=>a(b)},null,8,fKe)):te("",!0),w("span",{class:"tp-glyph",role:"img","aria-label":d(b)},[b.state==="run"?(k(),de(p(jl),{key:0,status:"running"})):b.state==="done"?(k(),de(p(ve),{key:1,class:"tp-done",name:"circle-check",size:"sm"})):b.state==="cancelled"?(k(),de(p(ve),{key:2,class:"tp-cancelled",name:"close",size:"sm"})):(k(),de(p(ve),{key:3,class:"tp-fail",name:"close",size:"sm"}))],8,hKe),w("span",pKe,F(b.name),1),b.meta?(k(),E("span",gKe,F(b.meta),1)):te("",!0),g(b)?(k(),E("span",mKe,F(g(b)),1)):te("",!0),m(b)?(k(),E("span",vKe,F(m(b)),1)):te("",!0),c(b)?(k(),E("span",yKe,F(c(b)),1)):te("",!0),b.state==="run"?(k(),de(p(tn),{key:5,class:"tp-stop",size:"sm",label:p(r)("tasks.stop"),tooltip:p(r)("tasks.stop"),onClick:Ct(C=>o("cancel",b.id),["stop"])},{default:he(()=>[K(p(ve),{name:"close",size:"sm"})]),_:1},8,["label","tooltip","onClick"])):te("",!0),u(b)?(k(),de(p(ve),{key:6,class:"tp-chevron",name:"chevron-right",size:"sm"})):te("",!0)])],2))),128))])]))}}),bKe=gt(kKe,[["__scopeId","data-v-d5a5712a"]]),AKe={key:0,class:"sg-empty"},CKe={key:1,class:"sg-grid"},wKe=["aria-label","onClick"],xKe={class:"sg-top"},SKe={class:"sg-num"},_Ke={class:"sg-name"},IKe={key:1,class:"sg-desc"},MKe={class:"sg-foot"},EKe={key:0,class:"sg-model"},TKe={class:"sg-status"},LKe={class:"sg-state"},NKe={key:0,class:"sg-time"},FKe=Qe({__name:"SubagentGrid",props:{tasks:{},filter:{}},emits:["open","cancel"],setup(e,{emit:t}){const n=e,i={active:"tasks.emptyRecent",running:"tasks.emptyRunning",done:"tasks.emptyDone",all:"tasks.emptyTasks"},s=L(()=>i[n.filter??"all"]),o=t,{t:r}=Bt(),l=cn("modelDisplay"),a=cn("subagentEffort");function u(g){const m=[l?.(g.model),a?.(g.thinkingEffort)].filter(y=>y!==void 0);return m.length>0?m.join(" · "):void 0}function c(g){return r(g==="done"?"tasks.stateDone":g==="fail"?"tasks.stateFail":g==="cancelled"?"tasks.stateCancelled":"tasks.running")}function d(g){return typeof g.durationMs!="number"?"":su(g.durationMs,{h:r("status.timeUnitHour"),m:r("status.timeUnitMinute"),s:r("status.timeUnitSecond")})}function f(g,m){return String((g.swarmIndex??m)+1).padStart(2,"0")}function h(g){return!!g.agentId||!!(g.output&&g.output.length>0)}return(g,m)=>e.tasks.length===0?(k(),E("div",AKe,F(p(r)(s.value)),1)):(k(),E("div",CKe,[(k(!0),E(Te,null,ht(e.tasks,(y,A)=>(k(),E("div",{key:y.id,class:Fe(["sg-card",[`s-${y.state}`,{openable:h(y)}]])},[h(y)?(k(),E("button",{key:0,type:"button",class:"sg-open","aria-label":y.name,onClick:b=>o("open",y.agentId??y.id)},null,8,wKe)):te("",!0),w("div",xKe,[w("span",SKe,F(f(y,A)),1),w("span",_Ke,F(y.name),1)]),y.meta?(k(),E("div",IKe,F(y.meta),1)):te("",!0),w("div",MKe,[u(y)?(k(),E("div",EKe,[K(p(ve),{name:"robot",size:"sm"}),w("span",null,F(u(y)),1)])):te("",!0),w("div",TKe,[w("span",LKe,[y.state==="run"?(k(),de(p(jl),{key:0,status:"running"})):y.state==="done"?(k(),de(p(ve),{key:1,class:"sg-ic-done",name:"circle-check",size:"sm"})):(k(),de(p(ve),{key:2,name:"close",size:"sm"})),$e(" "+F(c(y.state)),1)]),d(y)?(k(),E("span",NKe,[K(p(ve),{name:"clock",size:"sm"}),$e(F(d(y)),1)])):te("",!0)])]),y.state==="run"?(k(),de(p(tn),{key:2,class:"sg-cancel",size:"sm",label:p(r)("tasks.stop"),tooltip:p(r)("tasks.stop"),onClick:Ct(b=>o("cancel",y.id),["stop"])},{default:he(()=>[K(p(ve),{name:"close",size:"sm"})]),_:1},8,["label","tooltip","onClick"])):te("",!0)],2))),128))]))}}),DKe=gt(FKe,[["__scopeId","data-v-f7e4b600"]]),$Ke={class:"todo-card"},BKe={key:0,class:"tc-empty"},zKe={class:"tc-name"},RKe=Qe({__name:"TodoCard",props:{todos:{}},setup(e){const t=e,{t:n}=Bt();return(i,s)=>(k(),E("div",$Ke,[t.todos.length===0?(k(),E("div",BKe,[K(p(ve),{name:"check-list",size:"lg",class:"tc-empty-ico"}),w("span",null,F(p(n)("tasks.emptyTodo")),1)])):te("",!0),(k(!0),E(Te,null,ht(t.todos,(o,r)=>(k(),E("div",{key:r,class:Fe(["tc-row",`s-${o.status}`])},[w("span",{class:Fe(["tc-glyph",`g-${o.status}`]),"aria-hidden":"true"},[o.status==="in_progress"?(k(),de(p(Mi),{key:0,size:"xs",class:"tc-spin"})):o.status==="done"?(k(),de(p(ve),{key:1,name:"circle-check",size:"md"})):te("",!0)],2),w("span",zKe,F(o.title),1)],2))),128))]))}}),OKe=gt(RKe,[["__scopeId","data-v-f090f678"]]),B1=Qe({__name:"WorkPill",props:{icon:{},active:{type:Boolean},label:{}},emits:["click"],setup(e,{emit:t}){const n=t;return(i,s)=>(k(),de(p(gF),{active:e.active,"aria-pressed":e.active,"aria-label":e.label,onClick:s[0]||(s[0]=o=>n("click",o))},{default:he(()=>[K(p(ve),{name:e.icon,size:"md"},null,8,["name"]),w("span",null,[Rn(i.$slots,"default")]),Rn(i.$slots,"meta")]),_:3},8,["active","aria-pressed","aria-label"]))}}),PKe={class:"wp-head-tab"},jKe={key:0,class:"wp-head-meta"},HKe={key:0,class:"wp-head-actions"},WKe=Qe({__name:"WorkPanelHead",props:{icon:{},title:{},meta:{}},setup(e){return(t,n)=>(k(),E(Te,null,[w("span",PKe,[K(p(ve),{name:e.icon,size:"md"},null,8,["name"]),w("span",null,F(e.title),1),e.meta?(k(),E("span",jKe,F(e.meta),1)):te("",!0)]),t.$slots.actions?(k(),E("span",HKe,[Rn(t.$slots,"actions",{},void 0,!0)])):te("",!0)],64))}}),z1=gt(WKe,[["__scopeId","data-v-82048a74"]]),qKe={class:"fc-label"},UKe=Qe({__name:"FilterControl",props:{modelValue:{},options:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,s=L(()=>n.options.find($=>$.value===n.modelValue)),o=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches?"lg":"md",r=G(null),l=G(!1);let a=0,u=null;async function c(){const $=r.value?.closest(".dock-work-head");if(!$)return;const D=$.querySelector(".wp-head-tab"),T=getComputedStyle($),N=(parseFloat(T.columnGap)||0)*2,O=$.clientWidth-parseFloat(T.paddingLeft)-parseFloat(T.paddingRight)-N,P=D?.scrollWidth??0;if(!l.value){const q=r.value?.querySelector(".ui-seg");q!==null&&q.offsetWidth>0&&(a=q.offsetWidth)}const R=P+a>O;if(l.value=R,!R){await kt();const q=r.value?.querySelector(".ui-seg");q!==null&&q.offsetWidth>0&&(a=q.offsetWidth),l.value=P+a>O}}mn(()=>{const $=r.value?.closest(".dock-work-head");!$||typeof ResizeObserver!="function"||(u=new ResizeObserver(c),u.observe($),c())}),qe(l,$=>{!$&&d.value&&A()}),qe(_o,$=>{$>0&&d.value&&A()}),qe(()=>n.options,async()=>{a=0,await kt(),c()},{flush:"post"});const d=G(!1),f=G(null);function h(){return f.value?.$el??null}const g=G(null),m=G({left:"0px",top:"0px"});async function y(){if(d.value){A();return}d.value=!0,await kt(),b(),C(),window.addEventListener("mousedown",S,!0),window.addEventListener("keydown",_,!0),window.addEventListener("resize",b),window.addEventListener("scroll",b,!0)}function A($){d.value=!1,window.removeEventListener("mousedown",S,!0),window.removeEventListener("keydown",_,!0),window.removeEventListener("resize",b),window.removeEventListener("scroll",b,!0),$?.refocus&&h()?.focus()}function b(){const $=h();if(!$)return;const D=$.getBoundingClientRect(),T=g.value?.offsetHeight??0,N=getComputedStyle(document.documentElement),O=Number.parseFloat(N.getPropertyValue("--space-2"))||0,P=Number.parseFloat(N.getPropertyValue("--space-1"))||0,R=g.value?.offsetWidth??0,q=Math.min(D.left,Math.max(O,window.innerWidth-R-O));D.bottom+P+T<=window.innerHeight-O?m.value={left:`${q}px`,top:`${D.bottom+P}px`}:m.value={left:`${q}px`,bottom:`${window.innerHeight-D.top+P}px`}}function C(){const $=g.value;if(!$)return;($.querySelector(".ui-menu-item.is-active")??$.querySelector(".ui-menu-item"))?.focus()}function v(){d.value||y()}function x($){const D=$.relatedTarget;D&&(g.value?.contains(D)||h()?.contains(D))||A()}function S($){const D=$.target;if(D){if(g.value?.contains(D)){$.stopImmediatePropagation();return}h()?.contains(D)||A()}}function _($){$.key==="Escape"&&($.preventDefault(),$.stopImmediatePropagation(),A({refocus:!0}))}function I($){if($.key!=="ArrowDown"&&$.key!=="ArrowUp")return;$.preventDefault();const D=Array.from(g.value?.querySelectorAll(".ui-menu-item")??[]);if(D.length===0)return;const T=D.indexOf(document.activeElement),N=$.key==="ArrowDown"?(T+1)%D.length:(T-1+D.length)%D.length;D[N]?.focus()}function M($){i("update:modelValue",$),A({refocus:!0})}return Gn(()=>{u?.disconnect(),d.value&&A()}),($,D)=>(k(),E("span",{ref_key:"root",ref:r,class:"filter-control"},[l.value?(k(),E(Te,{key:0},[K(p(gF),{ref_key:"triggerRef",ref:f,class:"fc-trigger","aria-haspopup":"menu","aria-expanded":d.value,onClick:y,onKeydown:[_s(Ct(v,["prevent"]),["down"]),_s(Ct(v,["prevent"]),["up"])],onFocusout:x},{default:he(()=>[s.value?.icon?(k(),de(p(ve),{key:0,name:s.value.icon,size:"sm"},null,8,["name"])):te("",!0),w("span",null,F(s.value?.label),1),K(p(ve),{class:"fc-chevron",name:"chevron-down",size:"sm"})]),_:1},8,["aria-expanded","onKeydown"]),(k(),de(Gr,{to:"body"},[d.value?(k(),E("div",{key:0,ref_key:"menuBoxRef",ref:g,class:"fc-menu",style:qt(m.value),onKeydown:I,onFocusout:x},[K(p(sr),null,{default:he(()=>[(k(!0),E(Te,null,ht(e.options,T=>(k(),de(p(Wt),{key:T.value,role:"menuitemradio",active:T.value===e.modelValue,"aria-checked":T.value===e.modelValue,size:p(o),onClick:N=>M(T.value)},{default:he(()=>[T.icon?(k(),de(p(ve),{key:0,name:T.icon,size:"sm","data-icon":T.icon},null,8,["name","data-icon"])):te("",!0),w("span",qKe,F(T.label),1),T.value===e.modelValue?(k(),de(p(ve),{key:1,class:"fc-check",name:"check",size:"sm"})):te("",!0)]),_:2},1032,["active","aria-checked","size","onClick"]))),128))]),_:1})],36)):te("",!0)]))],64)):(k(),de(p(Mo),{key:1,"model-value":e.modelValue,options:e.options,size:"md","onUpdate:modelValue":D[0]||(D[0]=T=>i("update:modelValue",T))},null,8,["model-value","options"]))],512))}}),QT=gt(UKe,[["__scopeId","data-v-153e0d9c"]]),KKe={class:"dock-work-head"},VKe={key:0,class:"dock-workbar"},ZKe={key:0,class:"dw-running"},GKe={key:0,class:"dw-running"},QKe={class:"dw-count"},YKe=Qe({__name:"ChatDock",props:{sessionId:{},running:{type:Boolean},working:{type:Boolean},starting:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},swarmMode:{type:Boolean},goalMode:{type:Boolean},activationBadges:{},models:{},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{},skills:{},goal:{},dockPanel:{},overlayOpen:{type:Boolean},sessionPlans:{},bashTasks:{},subagentTasks:{},bashRunning:{},subagentRunning:{},todoDoneCount:{},hasDockWork:{type:Boolean},todos:{},pendingQuestion:{},questionBusyKind:{},pendingApproval:{},approvalBusy:{type:Boolean},openFile:{type:Function},mobile:{type:Boolean}},emits:["submit","steer","command","interrupt","setPermission","setThinking","togglePlan","toggleSwarm","toggleGoal","createGoal","controlGoal","focusGoal","compact","pickModel","selectModel","login","answer","dismiss","approval","cancelTask","toggle-dock-panel","close-dock-panel","openAgent"],setup(e,{expose:t,emit:n}){const i=e,s=n,{t:o}=Bt(),{confirm:r,isConfirmOpen:l}=Ic(),a=L(()=>{switch(i.goal?.status){case"active":return o("status.goalStatusActive");case"paused":return o("status.goalStatusPaused");case"blocked":return o("status.goalStatusBlocked");case"complete":return o("status.goalStatusComplete");default:return""}}),u=L(()=>i.goal?su(i.goal.wallClockMs,{h:o("status.timeUnitHour"),m:o("status.timeUnitMinute"),s:o("status.timeUnitSecond")}):"");async function c(){await r({title:o("status.goalCancel"),message:o("status.goalCancelConfirm"),confirmLabel:o("status.goalCancelConfirmYes"),cancelLabel:o("status.goalCancelConfirmNo"),variant:"danger"})&&s("controlGoal","cancel")}const d=[{id:"active",labelKey:"tasks.filterRecent",icon:"clock"},{id:"running",labelKey:"tasks.filterRunning",icon:"play"},{id:"done",labelKey:"tasks.filterDone",icon:"circle-check"},{id:"all",labelKey:"tasks.filterAll",icon:"list"}];function f(ae,oe){return(oe.completedAt??oe.createdAt??"").localeCompare(ae.completedAt??ae.createdAt??"")||(oe.createdAt??"").localeCompare(ae.createdAt??"")}function h(ae,oe){if(oe==="all")return ae;if(oe==="running")return ae.filter(ne=>ne.state==="run");if(oe==="done")return ae.filter(ne=>ne.state!=="run");const Q=[];for(const ne of ae){if(ne.state==="run")continue;let ge=Q.length;for(;ge>0&&f(Q[ge-1],ne)>0;)ge--;Q.splice(ge,0,ne),Q.length>5&&(Q.length=5)}return[...ae.filter(ne=>ne.state==="run"),...Q]}const g=G("active"),m=G("active"),y=L(()=>h(i.bashTasks,g.value)),A=L(()=>h(i.subagentTasks,m.value)),b=L(()=>d.map(ae=>({value:ae.id,label:o(ae.labelKey),icon:ae.icon}))),C=L({get:()=>g.value,set:ae=>{g.value=ae}}),v=L({get:()=>m.value,set:ae=>{m.value=ae}}),x=L(()=>(i.todos?.length??0)>0&&i.todoDoneCount===(i.todos?.length??0)),S=L(()=>i.bashTasks.some(ae=>ae.kind==="tool")),_=L(()=>S.value?"tasks.dockTasks":"tasks.dockBash"),I=L(()=>`${o("status.goalLabel")} ${a.value}`.trim()),M=L(()=>i.bashRunning>0?`${o(_.value)} ${i.bashRunning} ${o("tasks.running")}`:o(_.value)),$=L(()=>i.subagentRunning>0?`${o("tasks.dockSubagent")} ${i.subagentRunning} ${o("tasks.running")}`:o("tasks.dockSubagent")),D=L(()=>`${o("tasks.todoProgressTitle")} ${i.todoDoneCount}/${i.todos?.length??0}`),T=L(()=>Object.values(i.sessionPlans??{}).at(-1)),N=L(()=>{const ae=T.value?.review?.state;return ae?o(`tools.plan.review.${ae}`):""});function O(){const ae=T.value;ae?.path&&i.openFile?.(ae.plan?{path:ae.path,content:ae.plan}:{path:ae.path})}const P=G(null),R=L(()=>P.value?.anyPopupOpen===!0),q=L(()=>R.value||i.dockPanel!=null),j=G(null),W=G(null),z=G(!1),H=G("50%");function ee(ae,oe){const Q=oe.currentTarget;if(Q&&W.value){const ne=Q.getBoundingClientRect(),ge=W.value.getBoundingClientRect();H.value=`${ne.left+ne.width/2-ge.left}px`}s("toggle-dock-panel",ae)}function V(ae){return P.value?(P.value.loadForEdit(ae),!0):!1}function ie(ae){P.value?.loadAttachmentsForEdit(ae)}function se(){P.value?.focus()}const Z=()=>P.value?.isEmpty?.()??!1;function pe(ae){if(!i.dockPanel)return;const oe=ae.target;oe&&(j.value?.contains(oe)||oe instanceof Element&&oe.closest(".ui-pill")||s("close-dock-panel"))}function re(ae){ae.key!=="Escape"||ae.repeat||xRe(ae)||ae.defaultPrevented||R.value||l.value||i.overlayOpen||(ae.preventDefault(),ae.stopImmediatePropagation(),s("close-dock-panel"))}const fe=G(null),Ee=G(!1);function X(){const ae=fe.value;Ee.value=ae?ae.scrollTop>0:!1}function we(ae){Ee.value=ae.target.scrollTop>0}let Y=null;qe(()=>i.dockPanel,async ae=>{typeof document<"u"&&(document.removeEventListener("mousedown",pe,!0),document.removeEventListener("keydown",re,!0),ae&&(document.addEventListener("mousedown",pe,!0),document.addEventListener("keydown",re,!0))),Y?.disconnect(),Y=null,ae?(await kt(),X(),typeof ResizeObserver=="function"&&fe.value&&(Y=new ResizeObserver(X),Y.observe(fe.value))):Ee.value=!1},{immediate:!0});let le=null;function Ce(){const ae=W.value?.offsetHeight??0;document.documentElement.style.setProperty("--dock-h",`${ae}px`);const oe=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--p-bp-sm"));z.value=(W.value?.offsetWidth??0)<(Number.isFinite(oe)?oe:640)}return mn(()=>{wRe(),!(typeof ResizeObserver!="function"||!W.value)&&(le=new ResizeObserver(Ce),le.observe(W.value),Ce())}),Mn(()=>{typeof document<"u"&&(document.removeEventListener("mousedown",pe,!0),document.removeEventListener("keydown",re,!0)),le?.disconnect(),le=null,Y?.disconnect(),Y=null}),t({loadForEdit:V,loadAttachmentsForEdit:ie,focus:se,anyPopupOpen:R,isEmpty:Z}),(ae,oe)=>(k(),E("div",{ref_key:"dockRef",ref:W,class:Fe(["chat-dock",[e.mobile?"align-mobile":"align-center",{"has-popup":q.value,"has-approval":!!e.pendingApproval&&!e.pendingQuestion,"pills-compact":z.value}]]),onClick:oe[36]||(oe[36]=Ct(()=>{},["stop"]))},[K(ls,{name:"dock-panel"},{default:he(()=>[e.dockPanel?(k(),E("div",{ref_key:"workPanelRef",ref:j,key:e.dockPanel,class:Fe(["dock-work-panel",[`panel-${e.dockPanel}`,{"body-scrolled-up":Ee.value}]]),style:qt({transformOrigin:`${H.value} 100%`}),onClick:oe[11]||(oe[11]=Ct(()=>{},["stop"]))},[w("div",KKe,[e.dockPanel==="bash"?(k(),de(z1,{key:0,icon:"terminal",title:p(o)(_.value),meta:`${e.bashRunning} ${p(o)("tasks.running")}`},{actions:he(()=>[K(QT,{modelValue:C.value,"onUpdate:modelValue":oe[0]||(oe[0]=Q=>C.value=Q),options:b.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="subagent"?(k(),de(z1,{key:1,icon:"sparkles",title:p(o)("tasks.dockSubagent"),meta:`${e.subagentRunning} ${p(o)("tasks.running")}`},{actions:he(()=>[K(QT,{modelValue:v.value,"onUpdate:modelValue":oe[1]||(oe[1]=Q=>v.value=Q),options:b.value},null,8,["modelValue","options"])]),_:1},8,["title","meta"])):e.dockPanel==="todos"?(k(),de(z1,{key:2,icon:x.value?"check-list":"list",title:p(o)("tasks.todoProgressTitle"),meta:`${e.todoDoneCount}/${e.todos?.length??0}`},null,8,["icon","title","meta"])):e.dockPanel==="goal"?(k(),de(z1,{key:3,icon:"target",title:p(o)("status.goalLabel"),meta:u.value},{actions:he(()=>[e.goal?(k(),E(Te,{key:0},[e.goal.status==="active"?(k(),de(p(tn),{key:0,size:"sm",label:p(o)("status.goalPause"),tooltip:p(o)("status.goalPause"),onClick:oe[2]||(oe[2]=Ct(Q=>s("controlGoal","pause"),["stop"]))},{default:he(()=>[K(p(ve),{name:"pause",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),e.goal.status==="paused"||e.goal.status==="blocked"?(k(),de(p(tn),{key:1,size:"sm",label:p(o)("status.goalResume"),tooltip:p(o)("status.goalResume"),onClick:oe[3]||(oe[3]=Ct(Q=>s("controlGoal","resume"),["stop"]))},{default:he(()=>[K(p(ve),{name:"play",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),K(p(tn),{size:"sm",label:p(o)("status.goalCancel"),tooltip:p(o)("status.goalCancel"),onClick:Ct(c,["stop"])},{default:he(()=>[K(p(ve),{name:"power",size:"md"})]),_:1},8,["label","tooltip"]),K(p(tn),{size:"sm",label:p(o)("tasks.closePanel"),tooltip:p(o)("tasks.closePanel"),onClick:oe[4]||(oe[4]=Ct(Q=>s("close-dock-panel"),["stop"]))},{default:he(()=>[K(p(ve),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])],64)):te("",!0)]),_:1},8,["title","meta"])):e.dockPanel==="plan"?(k(),de(z1,{key:4,icon:"file-edit",title:p(o)("status.planLabel"),meta:N.value},{actions:he(()=>[T.value?.path?(k(),de(p(tn),{key:0,size:"sm",label:p(o)("tasks.openPanel"),tooltip:p(o)("tasks.openPanel"),onClick:Ct(O,["stop"])},{default:he(()=>[K(p(ve),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),e.planArmed||e.planMode?(k(),de(p(tn),{key:1,size:"sm",label:p(o)("status.workModeDismiss"),tooltip:p(o)("status.workModeDismiss"),onClick:oe[5]||(oe[5]=Ct(Q=>s("togglePlan"),["stop"]))},{default:he(()=>[K(p(ve),{name:"power",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),K(p(tn),{size:"sm",label:p(o)("tasks.closePanel"),tooltip:p(o)("tasks.closePanel"),onClick:oe[6]||(oe[6]=Ct(Q=>s("close-dock-panel"),["stop"]))},{default:he(()=>[K(p(ve),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])]),_:1},8,["title","meta"])):te("",!0)]),w("div",{ref_key:"workBodyRef",ref:fe,class:"dock-work-body",onScroll:we},[e.dockPanel==="bash"?(k(),de(bKe,{key:0,tasks:y.value,filter:g.value,onCancel:oe[7]||(oe[7]=Q=>s("cancelTask",Q)),onOpen:oe[8]||(oe[8]=Q=>s("openAgent",Q))},null,8,["tasks","filter"])):e.dockPanel==="subagent"?(k(),de(DKe,{key:1,tasks:A.value,filter:m.value,onCancel:oe[9]||(oe[9]=Q=>s("cancelTask",Q)),onOpen:oe[10]||(oe[10]=Q=>s("openAgent",Q))},null,8,["tasks","filter"])):e.dockPanel==="todos"?(k(),de(OKe,{key:2,todos:e.todos??[]},null,8,["todos"])):e.dockPanel==="goal"&&e.goal?(k(),de(qqe,{key:3,goal:e.goal,"open-file":e.openFile},null,8,["goal","open-file"])):e.dockPanel==="plan"?(k(),de(tUe,{key:4,plan:T.value,"plan-mode-on":e.planMode,"open-file":e.openFile},null,8,["plan","plan-mode-on","open-file"])):te("",!0)],544)],6)):te("",!0)]),_:1}),e.hasDockWork||e.planMode||T.value?(k(),E("div",VKe,[e.goal?(k(),de(B1,{key:0,icon:"target",label:I.value,active:e.dockPanel==="goal",onClick:oe[12]||(oe[12]=Q=>ee("goal",Q))},{meta:he(()=>[w("span",{class:Fe(["dw-goal-status",`dw-goal-status--${e.goal.status}`])},F(a.value),3)]),default:he(()=>[$e(F(p(o)("status.goalLabel"))+" ",1)]),_:1},8,["label","active"])):te("",!0),e.planMode||T.value?(k(),de(B1,{key:1,icon:"file-edit",label:p(o)("status.planLabel"),active:e.dockPanel==="plan",onClick:oe[13]||(oe[13]=Q=>ee("plan",Q))},{default:he(()=>[$e(F(p(o)("status.planLabel")),1)]),_:1},8,["label","active"])):te("",!0),e.bashTasks.length>0?(k(),de(B1,{key:2,icon:"terminal",label:M.value,active:e.dockPanel==="bash",onClick:oe[14]||(oe[14]=Q=>ee("bash",Q))},{meta:he(()=>[e.bashRunning>0?(k(),E("span",ZKe,[K(p(jl),{status:"running"}),$e(F(e.bashRunning),1)])):te("",!0)]),default:he(()=>[$e(F(p(o)(_.value))+" ",1)]),_:1},8,["label","active"])):te("",!0),e.subagentTasks.length>0?(k(),de(B1,{key:3,icon:"sparkles",label:$.value,active:e.dockPanel==="subagent",onClick:oe[15]||(oe[15]=Q=>ee("subagent",Q))},{meta:he(()=>[e.subagentRunning>0?(k(),E("span",GKe,[K(p(jl),{status:"running"}),$e(F(e.subagentRunning),1)])):te("",!0)]),default:he(()=>[$e(F(p(o)("tasks.dockSubagent"))+" ",1)]),_:1},8,["label","active"])):te("",!0),(e.todos?.length??0)>0?(k(),de(B1,{key:4,icon:x.value?"check-list":"list",label:D.value,active:e.dockPanel==="todos",onClick:oe[16]||(oe[16]=Q=>ee("todos",Q))},{meta:he(()=>[w("span",QKe,F(e.todoDoneCount)+"/"+F(e.todos?.length??0),1)]),default:he(()=>[$e(F(p(o)("tasks.todoProgressTitle"))+" ",1)]),_:1},8,["icon","label","active"])):te("",!0)])):te("",!0),e.pendingQuestion?(k(),de(vUe,{key:e.pendingQuestion.questionId,question:e.pendingQuestion,"busy-kind":e.questionBusyKind,onAnswer:oe[17]||(oe[17]=(Q,ne)=>s("answer",Q,ne)),onDismiss:oe[18]||(oe[18]=Q=>s("dismiss",Q))},null,8,["question","busy-kind"])):e.pendingApproval?(k(),de(lKe,{key:e.pendingApproval.approvalId,class:"dock-approval",block:e.pendingApproval.block,"agent-name":e.pendingApproval.agentName,busy:e.approvalBusy,"open-file":e.openFile,onDecide:oe[19]||(oe[19]=Q=>s("approval",e.pendingApproval.approvalId,Q))},null,8,["block","agent-name","busy","open-file"])):(k(),de(Ij,{key:3,ref_key:"composerRef",ref:P,"session-id":e.sessionId,running:e.running,working:e.working,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"swarm-mode":e.swarmMode,"goal-mode":e.goalMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"auth-ready":e.authReady,"managed-signed-in":e.managedSignedIn,"managed-membership":e.managedMembership,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,onSubmit:oe[20]||(oe[20]=Q=>s("submit",Q)),onSteer:oe[21]||(oe[21]=Q=>s("steer",Q)),onCommand:oe[22]||(oe[22]=Q=>s("command",Q)),onInterrupt:oe[23]||(oe[23]=Q=>s("interrupt")),onSetPermission:oe[24]||(oe[24]=Q=>s("setPermission",Q)),onSetThinking:oe[25]||(oe[25]=Q=>s("setThinking",Q)),onTogglePlan:oe[26]||(oe[26]=Q=>s("togglePlan")),onToggleSwarm:oe[27]||(oe[27]=Q=>s("toggleSwarm")),onToggleGoal:oe[28]||(oe[28]=Q=>s("toggleGoal")),onCreateGoal:oe[29]||(oe[29]=Q=>s("createGoal",Q)),onControlGoal:oe[30]||(oe[30]=Q=>s("controlGoal",Q)),onFocusGoal:oe[31]||(oe[31]=Q=>s("focusGoal")),onCompact:oe[32]||(oe[32]=Q=>s("compact")),onPickModel:oe[33]||(oe[33]=Q=>s("pickModel")),onSelectModel:oe[34]||(oe[34]=Q=>s("selectModel",Q)),onLogin:oe[35]||(oe[35]=Q=>s("login"))},null,8,["session-id","running","working","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","goal","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","starting"]))],2))}}),JKe=gt(YKe,[["__scopeId","data-v-4e74be75"]]),XKe={class:"ws-home"},eVe={class:"ws-home-title"},tVe={class:"ws-home-name"},nVe={key:0,class:"ws-home-path"},iVe=Qe({__name:"WorkspaceHome",props:{workspaceName:{},workspaceRoot:{}},setup(e){return(t,n)=>(k(),E("div",XKe,[w("div",eVe,[K(p(ve),{class:"ws-home-folder",name:"folder-closed"}),w("span",tVe,F(e.workspaceName),1)]),e.workspaceRoot?(k(),E("div",nVe,F(e.workspaceRoot),1)):te("",!0)]))}}),sVe=gt(iVe,[["__scopeId","data-v-cf7957ea"]]),oVe={class:"wrs"},rVe={class:"wrs-caption"},lVe=["onClick"],aVe={class:"wrs-title"},uVe={class:"wrs-time"},cVe={class:"wrs-foot"},dVe=Qe({__name:"WorkspaceRecentSessions",props:{sessions:{}},emits:["selectSession","openSessionAdmin"],setup(e,{emit:t}){const n=t,{t:i}=Bt();return(s,o)=>(k(),E("div",oVe,[w("div",rVe,F(p(i)("conversation.recentSessions")),1),(k(!0),E(Te,null,ht(e.sessions,r=>(k(),E("button",{key:r.id,type:"button",class:"wrs-row",onClick:l=>n("selectSession",r.id)},[w("span",{class:Fe(["wrs-ico",r.archived?"wrs-ico--done":"wrs-ico--open"])},[K(p(ve),{name:r.archived?"state-done":"state-open",size:"sm"},null,8,["name"])],2),w("span",aVe,F(r.title),1),w("span",uVe,F(r.time),1)],8,lVe))),128)),w("div",cVe,[K(p(kn),{text:p(i)("conversation.sessionAdminTooltip")},{default:he(()=>[w("button",{type:"button",class:"wrs-more",onClick:o[0]||(o[0]=r=>n("openSessionAdmin"))},[$e(F(p(i)("conversation.viewMoreSessions"))+" ",1),K(p(ve),{name:"chevron-down",size:"sm"})])]),_:1},8,["text"])])]))}}),fVe=gt(dVe,[["__scopeId","data-v-f463cc7b"]]),hVe=["aria-label","aria-hidden"],pVe={class:"toc-scroll"},gVe=["onClick"],mVe={class:"toc-label"},vVe=240,yVe=Qe({__name:"ConversationToc",props:{items:{},activeTurnId:{},mobile:{type:Boolean},sessionLoading:{type:Boolean},occluded:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=G(null),r=G(!0);let l=null;function a(){const c=o.value,d=c?.offsetParent;if(!c||!d)return;const f=c.getBoundingClientRect().left,h=d.getBoundingClientRect().right;r.value=h-f>=vVe}const u=L(()=>!n.mobile&&!n.sessionLoading&&n.items.length>1);return qe(u,c=>{l?.disconnect(),l=null,c&&kt(()=>{const d=o.value,f=d?.offsetParent;!d||!f||(typeof ResizeObserver<"u"&&(l=new ResizeObserver(a),l.observe(f)),a())})},{immediate:!0}),Gn(()=>{l?.disconnect(),l=null}),(c,d)=>u.value?(k(),E("nav",{key:0,ref_key:"navRef",ref:o,class:Fe(["conversation-toc",{"toc-clipped":!r.value||e.occluded}]),"aria-label":p(s)("conversation.toc"),"aria-hidden":r.value&&!e.occluded?void 0:!0},[w("div",pVe,[(k(!0),E(Te,null,ht(e.items,f=>(k(),E("button",{key:f.id,type:"button",class:Fe(["toc-row",{active:e.activeTurnId===f.id}]),onClick:h=>i("select",f.id)},[d[0]||(d[0]=w("span",{class:"toc-bar"},null,-1)),w("span",mVe,F(f.title),1)],10,gVe))),128))])],10,hVe)):te("",!0)}}),kVe=gt(yVe,[["__scopeId","data-v-b8ba267a"]]),bVe={class:"tsearch-main"},AVe=["placeholder"],CVe={key:0,class:"tsearch-spin"},wVe=["inert"],xVe={class:"tsearch-foot"},SVe={class:"tsearch-count",role:"status"},_Ve={class:"tsearch-rings","aria-hidden":"true"},IVe=800,MVe=400,EVe=1500,TVe=Qe({__name:"TranscriptSearch",props:{pane:{},reveal:{},mobile:{type:Boolean,default:!1}},emits:["close"],setup(e,{expose:t,emit:n}){const i=e,s=n,{t:o}=Bt(),{handleCompositionStart:r,handleCompositionEnd:l,isComposingKeyEvent:a}=Xr(),u=G(""),c=G(!1),d=G([]),f=G(0),h=G(null),g=L(()=>d.value.length),m=L(()=>u.value.trim()!==""&&!c.value),y=G(!1),A=L(()=>{if(g.value===0)return o("conversation.search.noResults");const ee={current:f.value+1,total:g.value};return y.value?o("conversation.search.resultsCapped",ee):o("conversation.search.results",ee)});let b=null,C=null,v=null,x=null,S=null,_=0;const I=G([]);function M(){const ee=i.pane,V=d.value[f.value];if(!ee||V===void 0){I.value=[];return}const ie=ee.getBoundingClientRect(),se=[];for(const Z of V.getClientRects())se.push({top:`${Z.top-ie.top+ee.scrollTop}px`,left:`${Z.left-ie.left}px`,width:`${Z.width}px`,height:`${Z.height}px`});I.value=se}function $(ee,V){return ee.type==="attributes"&&ee.target===V?!0:D(ee)}function D(ee){const V=ie=>ie instanceof Element&&(ie.classList.contains("tsearch-rings")||ie.closest(".tsearch-rings")!==null);if(V(ee.target))return!0;if(ee.type==="childList"){const ie=[...ee.addedNodes,...ee.removedNodes];if(ie.length>0&&ie.every(V))return!0}return!1}function T(){I.value.length!==0&&(S!==null&&clearTimeout(S),S=setTimeout(()=>{S=null,M()},120))}function N(){return i.pane?.querySelector(".chat")??null}function O(){if(b!==null&&(clearTimeout(b),b=null),u.value.trim()===""){c.value=!1,P();return}c.value=!0,b=setTimeout(P,IVe)}function P(ee="first"){b!==null&&(clearTimeout(b),b=null),c.value=!1;const V=N();if(u.value.trim()===""||V===null){d.value=[],y.value=!1,f.value=0,Bb(),M();return}const ie=d.value[f.value],se=ie?.startContainer??null,Z=ie?.startOffset??0,pe=Gae(V,u.value.trim()),re=pe.ranges;if(y.value=pe.truncated,d.value=re,re.length===0){f.value=0,X4([],0),M();return}if(ee!==!1){const Ee=R(re);f.value=ee==="backward"?(Ee-1+re.length)%re.length:Ee,q();return}const fe=se!==null?re.findIndex(Ee=>Ee.startContainer===se&&Ee.startOffset===Z):-1;f.value=fe>=0?fe:R(re),X4(re,f.value),M()}function R(ee){const V=i.pane?.getBoundingClientRect().top??0,ie=ee.findIndex(se=>{const Z=se.getClientRects(),pe=Z[Z.length-1];return pe!==void 0&&pe.bottom>=V});return ie===-1?0:ie}function q(){const ee=d.value[f.value];X4(d.value,f.value),ee!==void 0&&i.reveal(ee),M()}function j(ee){g.value!==0&&(f.value=(f.value+ee+g.value)%g.value,q())}function W(ee){if(ee.key==="Enter"&&!a(ee)){if(ee.preventDefault(),b!==null){P(ee.shiftKey?"backward":"first");return}j(ee.shiftKey?-1:1)}}function z(ee){ee.key==="Escape"&&(a(ee)||(ee.preventDefault(),ee.stopPropagation(),s("close")))}function H(){const ee=h.value;ee&&(ee.focus(),ee.select())}return t({focusInput:H}),mn(()=>{kt(()=>h.value?.focus()),i.pane&&typeof MutationObserver=="function"&&(v=new MutationObserver(V=>{if(u.value.trim()!==""&&!V.every(ie=>$(ie,i.pane))&&b===null){if(Date.now()-_>=EVe){_=Date.now(),C!==null&&(clearTimeout(C),C=null),P(!1);return}C!==null&&clearTimeout(C),C=setTimeout(()=>{C=null,b===null&&(_=Date.now(),P(!1))},MVe)}}),v.observe(i.pane,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["inert","style","class"]})),i.pane?.addEventListener("scroll",T,{passive:!0});const ee=[i.pane,i.pane?.querySelector(".content-wrap")??null];if(typeof ResizeObserver=="function"){x=new ResizeObserver(()=>M());for(const V of ee)V&&x.observe(V)}}),Mn(()=>{b!==null&&clearTimeout(b),C!==null&&clearTimeout(C),S!==null&&clearTimeout(S),v?.disconnect(),v=null,x?.disconnect(),x=null,i.pane?.removeEventListener("scroll",T),Bb()}),(ee,V)=>(k(),E("div",{class:Fe(["tsearch",{mobile:e.mobile}]),role:"search",onKeydown:z},[w("div",bVe,[K(p(ve),{class:"tsearch-icon",name:"search",size:"sm","aria-hidden":"true"}),$n(w("input",{ref_key:"inputRef",ref:h,"onUpdate:modelValue":V[0]||(V[0]=ie=>u.value=ie),type:"text",class:"tsearch-input",placeholder:p(o)("conversation.search.placeholder"),autocapitalize:"off",autocomplete:"off",spellcheck:"false",onInput:O,onKeydown:W,onCompositionstart:V[1]||(V[1]=(...ie)=>p(r)&&p(r)(...ie)),onCompositionend:V[2]||(V[2]=(...ie)=>p(l)&&p(l)(...ie))},null,40,AVe),[[uo,u.value]]),c.value?(k(),E("span",CVe,[K(p(Mi),{size:"sm",label:p(o)("conversation.search.searching")},null,8,["label"])])):te("",!0),V[6]||(V[6]=w("span",{class:"tsearch-sep","aria-hidden":"true"},null,-1)),K(p(tn),{class:"tsearch-close",size:"sm",label:p(o)("conversation.search.close"),tooltip:p(o)("conversation.search.close"),onClick:V[3]||(V[3]=ie=>s("close"))},{default:he(()=>[K(p(ve),{name:"close"})]),_:1},8,["label","tooltip"])]),w("div",{class:Fe(["tsearch-foot-wrap",{open:m.value}]),inert:!m.value},[w("div",xVe,[K(p(tn),{size:"sm",label:p(o)("conversation.search.previous"),tooltip:p(o)("conversation.search.previous"),disabled:g.value===0,onClick:V[4]||(V[4]=ie=>j(-1))},{default:he(()=>[K(p(ve),{name:"arrow-up"})]),_:1},8,["label","tooltip","disabled"]),K(p(tn),{size:"sm",label:p(o)("conversation.search.next"),tooltip:p(o)("conversation.search.next"),disabled:g.value===0,onClick:V[5]||(V[5]=ie=>j(1))},{default:he(()=>[K(p(ve),{name:"arrow-down"})]),_:1},8,["label","tooltip","disabled"]),w("span",SVe,F(A.value),1)])],10,wVe),e.pane?(k(),de(Gr,{key:0,to:e.pane},[w("div",_Ve,[(k(!0),E(Te,null,ht(I.value,(ie,se)=>(k(),E("div",{key:se,class:"tsearch-ring",style:qt(ie)},null,4))),128))])],8,["to"])):te("",!0)],34))}}),LVe=gt(TVe,[["__scopeId","data-v-26f3fed5"]]),NVe="/assets/k3_doodle1-27EZ2HSw.riv",FVe={class:"doodle-host"},DVe={key:0,class:"doodle-fallback"},$Ve=Qe({__name:"KimiDoodle",setup(e){const t=G(!1),n=G(null),i=jy();let s=null,o=null;return mn(async()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)try{let r=function(){const m=f.stateMachineNames[0];if(!m)return;const y=(f.stateMachineInputs(m)??[]).find(A=>A.name==="light/dark");y&&(y.value=i.value?1:0)};const[{Rive:l,RuntimeLoader:a},u,c]=await Promise.all([vs(()=>import("./rive-CeXCFBdn.js").then(m=>m.r),__vite__mapDeps([10,5])),vs(()=>import("./rive-BxcgqsjB.js"),[]).then(m=>m.default),vs(()=>import("./rive_fallback-ByshBW-N.js"),[]).then(m=>m.default)]),d=n.value;if(!d)return;a.setWasmUrl(u),a.setWasmFallbackUrl(c);const f=new l({canvas:d,src:NVe,autoplay:!0,onLoad(){const m=f.stateMachineNames[0];m&&f.play(m),requestAnimationFrame(()=>{n.value&&(r(),f.resizeDrawingSurfaceToCanvas(),o=GD(f,d),t.value=!0)})}}),h=qe(i,r),g=()=>f.resizeDrawingSurfaceToCanvas();window.addEventListener("resize",g),s=()=>{o?.(),o=null,h(),window.removeEventListener("resize",g),f.cleanup()}}catch{}}),Gn(()=>{s?.(),s=null}),(r,l)=>(k(),E("div",FVe,[t.value?te("",!0):(k(),E("div",DVe,[Rn(r.$slots,"fallback",{},void 0,!0)])),w("canvas",{ref_key:"canvasRef",ref:n,class:Fe(["doodle-canvas",{ready:t.value}]),role:"img","aria-label":"Kimi"},null,2)]))}}),BVe=gt($Ve,[["__scopeId","data-v-694a2ad0"]]),zVe={key:1,class:"empty-hint"},RVe={class:"empty-hint-title"},OVe={key:1,class:"empty-hint-title is-starting"},PVe={key:2,class:"empty-hint-text"},jVe={key:2,class:"upgrade-banner"},HVe={class:"upgrade-banner-text"},WVe={class:"ws-bar"},qVe={key:0,class:"ws-anchor"},UVe=["aria-expanded"],KVe={class:"ws-chip-name"},VVe={class:"ws-caption"},ZVe=["onClick"],GVe={class:"ws-info"},QVe={class:"ws-name"},YVe={class:"ws-path"},JVe=["aria-label"],XVe={key:0,class:"undo-toast",role:"status","aria-live":"polite"},eZe={class:"undo-toast-text"},tZe=48,R1=80,YT=1e3,nZe=420,iZe=3e3,sZe=5e3,oZe=1e4,rZe=2500,lZe=Qe({__name:"ConversationPane",props:{turns:{},sessionId:{},approvals:{},gitInfo:{},tasks:{},todos:{},goal:{},activationBadges:{},status:{},thinking:{},planMode:{type:Boolean},planArmed:{type:Boolean},sessionPlans:{},swarmMode:{type:Boolean},goalMode:{type:Boolean},questions:{},pendingQuestionActions:{},pendingApprovalActions:{},running:{type:Boolean},turnActive:{type:Boolean},queued:{},searchFiles:{type:Function},uploadImage:{type:Function},changes:{},fileReloadKey:{},working:{type:Boolean},lastTurnReason:{},turnError:{},turnRetry:{},overlayOpen:{type:Boolean},starting:{type:Boolean},mobile:{type:Boolean},sessionLoading:{type:Boolean},compaction:{},hasMoreMessages:{type:Boolean},loadingMore:{type:Boolean},loadingMoreError:{type:Boolean},loadOlderMessages:{type:Function},models:{},authReady:{type:Boolean},managedSignedIn:{type:Boolean},managedMembership:{},starredIds:{},skills:{},workspaceName:{},workspaceRoot:{},gitDiffStats:{},workspaces:{},activeWorkspaceId:{},recentSessions:{},draftEntry:{},sessionTitle:{},sessionArchived:{type:Boolean},pr:{}},emits:["submit","steer","approval","cancelTask","answer","dismiss","command","interrupt","unqueue","editQueued","reorderQueue","setPermission","setThinking","togglePlan","toggleSwarm","toggleGoal","createGoal","controlGoal","compact","pickModel","selectModel","login","openFile","openMedia","openTurnDiff","openCompaction","openAgent","openChanges","refreshGitStatus","editMessage","selectWorkspace","addWorkspace","selectSession","openPr","renameSession","forkSession","archiveSession","restoreSession","exportSession","openSessionAdmin"],setup(e,{expose:t,emit:n}){const{t:i}=Bt(),s=e,o=n,r=G(!1),l=G(!1),a=G(null),u=L(()=>s.workspaces?.find(Ie=>Ie.id===s.activeWorkspaceId)?.name??s.workspaceName??""),{sidebarTabs:c}=Hh(),d=L(()=>!s.mobile&&!s.starting&&s.draftEntry==="workspace"&&c.value),f=L(()=>(s.workspaces?.length??0)>0),h=L(()=>s.authReady===!1&&(s.models?.length??0)===0&&s.managedSignedIn===!0&&s.managedMembership==="free"),g=L(()=>rue(s.workspaces??[],s.activeWorkspaceId));function m(ye){if(r.value){r.value=!1;return}const Ie=ye.currentTarget?.closest(".ws-anchor"),We=Ie?.closest(".panes");if(Ie instanceof HTMLElement&&We instanceof HTMLElement){const $t=Ie.getBoundingClientRect(),ln=We.getBoundingClientRect(),Sn=ln.bottom-$t.bottom-4,ti=$t.top-ln.top-4;l.value=ti>Sn;const Fi=Math.max(0,Math.floor(l.value?ti:Sn));a.value=`min(calc(var(--space-8) * 10), ${Fi}px)`}else l.value=!1,a.value=null;r.value=!0}function y(ye){r.value=!1,ye!==s.activeWorkspaceId&&o("selectWorkspace",ye)}Tr(hn.contentAlign);const A=G(null),b=G(null),C=G(null),v=G(!1);let x=null;function S(ye,Ie){const We=C.value??b.value;return!We||We.loadForEdit(ye)===!1?!1:(We.loadAttachmentsForEdit(Ie??[]),!0)}function _(){const ye=C.value??b.value;return ye?ye.isEmpty?.()??!0:!0}function I(){v.value=!0,x!==null&&clearTimeout(x),x=setTimeout(()=>{x=null,v.value=!1},2e3)}const M=L(()=>s.tasks.filter(ye=>ye.kind==="bash"||ye.kind==="tool"&&!ye.id.startsWith("question-"))),$=L(()=>s.tasks.filter(ye=>ye.kind==="subagent"&&ye.runInBackground)),D=L(()=>M.value.filter(ye=>ye.state==="run").length),T=L(()=>$.value.filter(ye=>ye.state==="run").length);function N(ye){const Ie=s.tasks,We=Ie.find(ln=>ln.id===ye)??Ie.find(ln=>ln.parentToolCallId===ye);if(We?.agentId)return We.agentId;const $t=Ie.filter(ln=>ln.kind==="subagent"&&!ln.parentToolCallId&&ln.agentId);if($t.length===1)return $t[0].agentId}Kn("resolveAgentTaskId",N);const O=cn("modelDisplay"),P=cn("subagentEffort");function R(ye,Ie){const We=Ie??N(ye);if(We===void 0)return;const $t=s.tasks.find(ti=>ti.agentId===We||ti.id===We),ln=O?.($t?.model),Sn=P?.($t?.thinkingEffort);if(!(ln===void 0&&Sn===void 0))return{display:ln,effort:Sn}}Kn("resolveAgentModel",R),Kn("pinScroll",ho);const q=L(()=>(s.todos??[]).filter(ye=>ye.status==="done").length),j=L(()=>s.goal!=null||M.value.length>0||$.value.length>0||(s.todos?.length??0)>0),W=G(null),z=L(()=>s.gitInfo?s.changes?.length??0:0);function H(ye){W.value=W.value===ye?null:ye}function ee(){W.value=null}function V(){s.goal&&(W.value="goal")}qe(()=>[s.goal,M.value.length,$.value.length,s.todos?.length,s.planMode,s.sessionPlans],()=>{const ye=W.value;if(ye===null)return;ye==="goal"&&s.goal!=null||ye==="bash"&&M.value.length>0||ye==="subagent"&&$.value.length>0||ye==="todos"&&(s.todos?.length??0)>0||ye==="plan"&&(s.planMode===!0||Object.keys(s.sessionPlans??{}).length>0)||ee()});function ie(ye){if(ye.role==="compaction")return i("conversation.compactedPlain");if(ye.role==="user"){if(ye.skillActivation)return`/${ye.skillActivation.name}`;if(ye.pluginCommand)return`/${ye.pluginCommand.pluginId}:${ye.pluginCommand.commandName}`;const We=ye.text.trim().replaceAll(/\s+/g," ");return We.length>0?We:"user"}const Ie=(ye.text||ye.thinking||"").trim().replaceAll(/\s+/g," ");return Ie.length>0?Ie:(ye.tools?.length??0)>0?`${ye.tools.length} tools`:"kimi"}const se=L(()=>s.turns.filter(ye=>ye.role==="user").map((ye,Ie)=>({id:ye.id,role:ye.role,no:Ie+1,title:ie(ye)}))),Z=G(null);function pe(){const ye=_e.value;if(!ye)return;const Ie=se.value;if(Ie.length===0)return;if(wn()<=R1){Z.value=Ie[Ie.length-1].id;return}if(fe||re===null){const Sn=ye.scrollTop,ti=ye.getBoundingClientRect().top,Fi=[];for(const go of ye.querySelectorAll(".turn-anchor[data-turn-id]")){const Bc=go.dataset.turnId;Bc&&Fi.push({id:Bc,top:go.getBoundingClientRect().top-ti+Sn})}re=Fi,fe=!1}const We=new Set(Ie.map(Sn=>Sn.id)),$t=ye.scrollTop+ye.clientHeight/2;let ln=null;for(const Sn of re)We.has(Sn.id)&&Sn.top<=$t&&(ln=Sn.id);Z.value=ln??Ie[0].id}let re=null,fe=!0;function Ee(){fe=!0}let X=0;function we(){X||(X=Ti(()=>{X=0,pe()}))}const Y=G(!1);let le=0;function Ce(){le||(le=Ti(()=>{le=0,oe()}))}function ae(){Ce(),Ee()}function oe(){const ye=_e.value,Ie=!s.mobile&&ye?ye.closest(".con")?.querySelector(".conversation-toc"):null,We=Ie?.querySelector(".toc-bar");let $t=!1;if(ye&&Ie&&We){const ln=We.getBoundingClientRect(),Sn=Ie.getBoundingClientRect(),ti=ln.left+ln.width/2;$t=Array.from(ye.querySelectorAll(".table-node-wrapper")).some(Fi=>{const go=Fi.getBoundingClientRect();return go.left<=ti&&ti<=go.right&&go.top<Sn.bottom&&go.bottom>Sn.top})}Y.value!==$t&&(Y.value=$t)}const Q=L(()=>s.questions&&s.questions.length>0?s.questions[0]:void 0),ne=L(()=>{const ye=Q.value;if(ye)return s.pendingQuestionActions?.[ye.questionId]}),ge=L(()=>s.approvals&&s.approvals.length>0?s.approvals[0]:void 0),Ae=L(()=>{const ye=ge.value;return ye?!!s.pendingApprovalActions?.[ye.approvalId]:!1}),_e=G(null),Ke=G(null),xe=G(0),Ne=G(0),et=G(!1),ut=G(null);let yt=null;function Mt(){if(s.turns.length!==0){if(et.value){ut.value?.focusInput();return}yt=document.activeElement,et.value=!0}}function Ze(){et.value=!1,kt(()=>{yt instanceof HTMLElement&&yt.isConnected&&yt.focus(),yt=null})}qe(()=>s.turns.length===0&&!s.sessionLoading,ye=>{ye&&et.value&&Ze()});const Ge=L(()=>({"--panes-scrollbar-width":`${xe.value}px`})),lt=L(()=>({"--chat-dock-height":`${Ne.value+tZe}px`}));function tt(ye){return ye instanceof HTMLElement?ye:ye&&"$el"in ye&&ye.$el instanceof HTMLElement?ye.$el:null}let It=0;function Ut(){It||(It=Ti(()=>{It=0;const ye=_e.value,Ie=ye?Math.max(0,ye.offsetWidth-ye.clientWidth):0;Ie!==xe.value&&(xe.value=Ie);const We=Ke.value?.offsetHeight??0;We!==Ne.value&&(Ne.value=We)}))}function fn(ye){const Ie=tt(ye);Ie!==_e.value&&(_e.value=Ie,Ie&&Ye())}function Nn(ye){const Ie=tt(ye);Ie!==Ke.value&&(Ke.value=Ie??null,ye&&"loadForEdit"in ye&&typeof ye.loadForEdit=="function"&&"focus"in ye&&typeof ye.focus=="function"?C.value={loadForEdit:ye.loadForEdit.bind(ye),loadAttachmentsForEdit:"loadAttachmentsForEdit"in ye&&typeof ye.loadAttachmentsForEdit=="function"?ye.loadAttachmentsForEdit.bind(ye):()=>{},focus:ye.focus.bind(ye),get anyPopupOpen(){return"anyPopupOpen"in ye&&ye.anyPopupOpen===!0},isEmpty:"isEmpty"in ye&&typeof ye.isEmpty=="function"?ye.isEmpty.bind(ye):void 0}:C.value=null,ze())}const Qt=G(!0),un=G(!1),Dn=G(!1);let pn=null;function wn(){const ye=_e.value;return ye?pi-ye.scrollTop-hs:0}let bn=0,Xn=0,Ue=0,st=0,ct=0,ot=0,sn=0;function Nt(){return Date.now()<Xn}function Tn(){Ce(),Dn.value=!0,pn&&clearTimeout(pn),pn=setTimeout(()=>{Dn.value=!1,pn=null},900);const ye=_e.value;if(!ye)return;const Ie=ye.scrollTop;if(hi()){bn=Ie;return}if(performance.now()-Ue<100){bn=Ie;return}const We=wn();if(Nt()){Qt.value=!0,un.value=!1,bn=Ie;return}Ie<bn-1&&We>1?ye.scrollHeight-Ie-ye.clientHeight>1&&(Qt.value=!1,un.value=!0):We<=R1&&Ie>bn+1&&Date.now()>=st&&(Qt.value=!0,un.value=!1),bn=Ie,we()}function fs(ye=!1){const Ie=_e.value;Qt.value=!0,un.value=!1,As(),Ie&&(!ye&&performance.now()<ct||(ye?Dt():Ie.scrollTop=Math.max(Ie.scrollTop,pi),bn=Ie.scrollTop))}let vi=0;function Dt(ye=320){const Ie=_e.value;if(!Ie)return;if(vi&&(Yt(vi),vi=0),typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){Ie.scrollTop=Ie.scrollHeight,bn=Ie.scrollTop;return}const We=Ie.scrollTop,$t=performance.now();Ue=$t,ct=$t+ye+nZe;const ln=()=>{vi=0;const Sn=Math.min(1,(performance.now()-$t)/ye),ti=1-Math.pow(1-Sn,3);Ie.scrollTop=We+(Ie.scrollHeight-We)*ti,bn=Ie.scrollTop,Sn<1?vi=Ti(ln):ct=0};vi=Ti(ln)}function Is(ye,Ie){return(Ie.closest("[inert]")?.closest(".tool-group, .activity-run, .turn-fold")??Ie).getBoundingClientRect().top-ye.getBoundingClientRect().top+ye.scrollTop}function Ei(ye,Ie){const We=Array.from(ye.querySelectorAll(".turn-anchor[data-turn-id], [data-scroll-anchor-id]")).map(Sn=>({node:Sn,top:Is(ye,Sn)})),$t=We.findIndex(Sn=>Sn.top>=Ie),ln=$t<0?Math.max(0,We.length-1):$t;return We.slice(ln,ln+2).flatMap(Sn=>{const ti=Sn.node.dataset.scrollAnchorId,Fi=ti??Sn.node.dataset.turnId;return Fi?[{kind:ti?"tool":"turn",id:Fi,top:Sn.top}]:[]})}const Pn=new Map;function bs(ye,Ie){for(const We of Ie.anchors){const $t=We.kind==="tool"?"data-scroll-anchor-id":"data-turn-id",ln=ye.querySelector(`[${$t}="${co(We.id)}"]`);if(ln)return Is(ye,ln)-We.top}return ye.scrollHeight-Ie.oldHeight}function Lo(ye,Ie,We=ye.scrollTop){return ye.scrollTop=We+bs(ye,Ie),bn=ye.scrollTop,ye.scrollTop}async function Oi(){if(!s.sessionId||!s.loadOlderMessages||s.loadingMore||Ui.value||!s.hasMoreMessages)return;const ye=s.sessionId,Ie=_e.value,We=Ie?.scrollTop??0,$t={anchors:Ie?Ei(Ie,We):[],oldHeight:Ie?.scrollHeight??0};On(ye,!0),Do();try{if(await kt(),await s.loadOlderMessages(ye),await kt(),s.sessionId!==ye){Pn.set(ye,$t);return}const ln=_e.value;if(!ln)return;Lo(ln,$t),Pn.delete(ye)}finally{On(ye,!1)}}function co(ye){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(ye):ye.replaceAll(/["\\]/g,"\\$&")}let Wi=null;function As(){Wi!==null&&(clearTimeout(Wi),Wi=null)}function fo(ye){ws(),Qt.value=!1,un.value=wn()>R1,ye.scrollIntoView({behavior:"smooth",block:"center"}),As(),Wi=setTimeout(()=>{Wi=null;const Ie=_e.value;if(!Ie||!ye.isConnected)return;const We=ye.getBoundingClientRect().top+ye.offsetHeight/2-(Ie.getBoundingClientRect().top+Ie.clientHeight/2);Math.abs(We)>48&&(Ie.scrollTop+=We)},480)}function Pi(ye){const Ie=_e.value;if(!Ie)return;const We=Ie.querySelector(`.turn-anchor[data-turn-id="${co(ye)}"]`);We&&fo(We)}function es(ye,Ie){const We=ye.startContainer.parentElement;if(We!==null)for(let $t=We;$t!==null&&$t!==Ie;$t=$t.parentElement){const ln=getComputedStyle($t),Sn=/(auto|scroll)/.test(ln.overflowY)&&$t.scrollHeight>$t.clientHeight,ti=/(auto|scroll)/.test(ln.overflowX)&&$t.scrollWidth>$t.clientWidth;if(!Sn&&!ti)continue;const Fi=ye.getClientRects()[0];if(!Fi)return;const go=$t.getBoundingClientRect();Sn&&($t.scrollTop+=Fi.top+Fi.height/2-(go.top+$t.clientHeight/2)),ti&&($t.scrollLeft+=Fi.left+Fi.width/2-(go.left+$t.clientWidth/2))}}function Ai(ye){const Ie=_e.value;if(!Ie)return;const We=ye.startContainer.parentElement;ws(),Qt.value=!1,un.value=wn()>R1,st=Date.now()+700;const $t=We?.closest(".u-text-wrap.is-clamped");if($t){$t.querySelector(".u-text-toggle")?.click(),kt(()=>No(ye,Ie));return}No(ye,Ie)}function No(ye,Ie){const We=ye.startContainer.parentElement;es(ye,Ie);const $t=ye.getClientRects()[0];if(!$t){We instanceof HTMLElement&&fo(We);return}const ln=Ie.getBoundingClientRect(),Sn=$t.top+$t.height/2-(ln.top+Ie.clientHeight/2),ti=typeof window>"u"||!window.matchMedia("(prefers-reduced-motion: reduce)").matches;Ie.scrollTo({top:Ie.scrollTop+Sn,behavior:ti?"smooth":"auto"}),As(),Wi=setTimeout(()=>{Wi=null;const Fi=_e.value,go=ye.getClientRects()[0];if(!Fi||!go)return;const Bc=Fi.getBoundingClientRect(),Dr=go.top+go.height/2-(Bc.top+Fi.clientHeight/2);Math.abs(Dr)>48&&(Fi.scrollTop+=Dr)},480)}function Ci(){const ye=_e.value;if(!ye)return"none";const Ie=ye.firstElementChild,We=Ie instanceof HTMLElement?Ie.offsetHeight:0,$t=Ke.value?.offsetHeight??0;return`${ye.scrollHeight}:${ye.clientHeight}:${We}:${$t}`}function Ti(ye){return typeof requestAnimationFrame=="function"?requestAnimationFrame(ye):setTimeout(ye,16)}function Yt(ye){typeof cancelAnimationFrame=="function"?cancelAnimationFrame(ye):clearTimeout(ye)}let vn=0,ts=0,fi=null,Fr=0;const Ni=G(!1);function hi(){return performance.now()<vn}function ho(ye,Ie=200){const We=_e.value;if(!We||Ui.value||(ws(),Qt.value=!1,fi=ye,Fr=ye.getBoundingClientRect().top,vn=performance.now()+Ie,Ni.value=!0,ts))return;const $t=()=>{if(ts=0,!fi)return;if(Qt.value){fi=null,Ni.value=!1;return}if(performance.now()>=vn){fi=null,Ni.value=!1,Xs();return}const ln=fi.getBoundingClientRect().top-Fr;ln&&(We.scrollTop+=ln),ts=Ti($t)};ts=Ti($t)}function Xs(){wn()<=R1?(Qt.value=!0,un.value=!1):(Qt.value=!1,un.value=!0)}function ns(ye=36,Ie){if(!Qt.value&&!Nt()){Ie?.();return}const We=++sn;let $t="",ln=0,Sn=0;ot&&(Yt(ot),ot=0);const ti=()=>{if(ot=0,We!==sn)return;if(!Qt.value&&!Nt()){Ie?.();return}fs(!1);const Fi=Ci();ln=Fi===$t?ln+1:0,$t=Fi,Sn++,ln<3&&Sn<ye?ot=Ti(ti):Ie?.()};ot=Ti(ti)}function qi(ye,Ie){return ye!==void 0&&ye.length>0&&Ie.length>=ye.length&&ye.firstId!==Ie.firstId&&ye.lastId===Ie.lastId&&ye.lastTextLen===Ie.lastTextLen&&ye.lastThinkingLen===Ie.lastThinkingLen&&ye.lastToolsLen===Ie.lastToolsLen&&ye.approvalIds===Ie.approvalIds}const an=L(()=>{const ye=(s.approvals??[]).map(Sn=>Sn.approvalId).join(","),Ie=s.turns,We=Ie.at(-1),$t=We?.thinking?.length??0,ln=We?.tools?.reduce((Sn,ti)=>Sn+ti.name.length+(ti.arg?.length??0)+(ti.output?.join("").length??0),0)??0;return{length:Ie.length,firstId:Ie[0]?.id??"",lastId:We?.id??"",lastTextLen:We?.text.length??0,lastThinkingLen:$t,lastToolsLen:ln,approvalIds:ye}});let eo=s.fileReloadKey;qe(an,async(ye,Ie)=>{const We=s.fileReloadKey,$t=We!==eo;if(eo=We,Ui.value&&qi(Ie,ye)){we();return}if($t){we();return}await kt(),Qt.value||Nt()?fs(ye.length<Ie.length):un.value=!0,we()}),qe(Ke,()=>{ze()}),qe(()=>s.mobile,async()=>{await kt(),Ut()});const Us=new Map,Fo=G(!1);let Ms=0,Es=null;function to(){Fo.value=!0,Ms&&(Yt(Ms),Ms=0),Es&&clearTimeout(Es),Es=setTimeout(()=>{Fo.value=!1,Es=null},1200)}function Li(){if(!Fo.value)return;let ye=2;const Ie=()=>{if(Ms=0,ye--,ye>0){Ms=Ti(Ie);return}Fo.value=!1,Es&&(clearTimeout(Es),Es=null)};Ms&&Yt(Ms),Ms=Ti(Ie)}qe(()=>s.fileReloadKey,async(ye,Ie)=>{const We=_e.value;Ie&&We&&Us.set(String(Ie),{top:We.scrollTop,following:Qt.value}),ws(),to(),await kt();const $t=_e.value,ln=ye?Us.get(String(ye)):void 0;if(ln&&$t){const Sn=Pn.get(String(ye)),ti=Sn?Lo($t,Sn,ln.top):ln.top;Sn&&Pn.delete(String(ye)),Qt.value=ln.following,$t.scrollTop=ti,bn=$t.scrollTop,un.value=!ln.following&&wn()>1,ln.following?ns(36,Li):Li()}else Qt.value=!0,bn=0,fs(!1),ns(36,Li);Ee(),pe()}),qe(()=>s.sessionLoading,async(ye,Ie)=>{ye||!Ie||(Qt.value=!0,await kt(),ns(36,Li),we())}),qe(()=>s.turnActive,async(ye,Ie)=>{ye||!Ie||!Qt.value&&!Nt()||(await kt(),ns(48),we())});function wi(){Qt.value=!0,un.value=!1,Xn=Date.now()+YT,kt(()=>{fs(!0),ns(16)})}function Vo(ye){wi(),o("submit",ye)}function Ts(ye){Qt.value=!0,un.value=!1,Xn=Date.now()+YT,o("editMessage",ye)}function po(ye){const Ie=s.queued?.[ye],We=Ie?.text??"";S(We,Ie?.attachments)&&o("editQueued",ye)}function Ks(ye){o("reorderQueue",ye)}function Zo(ye,Ie){wi(),o("answer",ye,Ie)}function Be(ye,Ie){!ye||!Ie||o("approval",ye,Ie)}let Pe=null,dt=null,St=null,An=null,pi=0,hs=0,is=0;const Ls=G(new Set),Ui=L(()=>!!s.sessionId&&Ls.value.has(s.sessionId));function On(ye,Ie){const We=new Set(Ls.value);Ie?We.add(ye):We.delete(ye),Ls.value=We}function Cs(){Ui.value||is||(is=Ti(()=>{is=0,!Ui.value&&(hi()||(Qt.value||Nt())&&fs(!1))}))}function Do(){sn++,ot&&(Yt(ot),ot=0),is&&(Yt(is),is=0)}function ws(){const ye=_e.value;if(Xn=0,st=0,Do(),vn=0,fi=null,Ni.value=!1,vi&&(Yt(vi),vi=0),As(),ye){const Ie=ye.scrollTop;typeof ye.scrollTo=="function"?ye.scrollTo({top:Ie,behavior:"auto"}):ye.scrollTop=Ie}ct=0,Ue=Number.NEGATIVE_INFINITY,ye&&(bn=ye.scrollTop)}function tl(){const ye=_e.value;!ye||ye.scrollHeight-ye.clientHeight<=1&&!s.hasMoreMessages||(Qt.value=!1,ws(),ye.scrollHeight-ye.clientHeight>1&&(un.value=!0))}function xi(ye){const Ie=_e.value;if(!Ie)return!1;for(const We of ye.composedPath()){if(We===Ie)return!1;if(We instanceof HTMLElement&&We.scrollHeight>We.clientHeight+1&&We.scrollTop>1)return!0}return!1}function dr(ye){ye.defaultPrevented||ye.ctrlKey||ye.shiftKey||(As(),!(ye.deltaY>=0||xi(ye))&&tl())}function rt(ye){const Ie=_e.value;if(!Ie||ye.defaultPrevented||ye.button!==0||ye.pointerType==="touch")return;const We=Ie.getBoundingClientRect(),$t=Ie.offsetWidth-Ie.clientWidth,ln=$t>0?$t:12;ye.target===Ie&&ye.clientX>=We.right-ln&&tl()}let Se=null;function U(ye){Se=ye.touches.length===1?ye.touches[0].clientY:null}function me(ye){const Ie=ye.touches.length===1?ye.touches[0].clientY:null;As(),Ie!==null&&Se!==null&&Ie>Se+2&&!xi(ye)&&tl(),Se=Ie}function ke(){if(!dt)return;const ye=_e.value?.firstElementChild??null;ye!==St&&(St&&dt.unobserve(St),St=ye,ye&&dt.observe(ye))}function ze(){if(!dt)return;const ye=Ke.value;ye!==An&&(An&&dt.unobserve(An),An=ye,ye&&dt.observe(ye))}function Ye(){const ye=_e.value;Ut(),Pe&&(Pe.disconnect(),ye&&Pe.observe(ye,{childList:!0,subtree:!0,characterData:!0})),dt&&(dt.disconnect(),St=null,An=null,ye&&dt.observe(ye),ke(),ze()),pi=ye?.scrollHeight??0,hs=ye?.clientHeight??0,Ce(),Ee()}function Ve(){ke(),Cs(),Ce(),Ee()}function wt(){typeof document>"u"||document.visibilityState==="visible"&&Qt.value&&ns()}const pt=G(!1);let Ht=null;function Gt(){pt.value=!0,Ht!==null&&clearTimeout(Ht),Ht=setTimeout(()=>{pt.value=!1},iZe)}const Cn=G(null);let Qn=null;const jt=G(null);let Rt=null,Bn=!1;function ei(){Cn.value=null,jt.value=null,Bn=!1,Qn!==null&&(clearTimeout(Qn),Qn=null),Rt!==null&&(clearTimeout(Rt),Rt=null)}function ji(){for(let ye=s.turns.length-1;ye>=0;ye--){const Ie=s.turns[ye];if(Ie.goalContinuation)return null;if(Ie.role==="user")return Ie}return null}function $o(){if(Cn.value!==null||jt.value!==null||!s.working||(s.queued?.length??0)>0)return;const ye=ji();if(ye===null||ye.skillActivation!==void 0||ye.pluginCommand!==void 0)return;s.turns.slice(s.turns.indexOf(ye)+1).every(We=>We.role==="assistant"&&!Y8(We))?(jt.value=ye.id,Bn=!1,Rt=setTimeout(()=>{jt.value=null},oZe)):Cn.value=ye.id}let Go=!1,De=null;function vt(ye){if(Go)return;ei();const Ie=s.turns.find($t=>$t.id===ye);Ie===void 0||Ie.role!=="user"||ji()?.id!==Ie.id||(C.value??b.value)?.isEmpty?.()===!1||(Go=!0,De=setTimeout(()=>{Go=!1,De=null},rZe),Ts({text:Ie.text,attachments:Ie.attachments}))}function mt(){jt.value===null||s.working||!Bn||vt(jt.value)}qe(()=>s.working,(ye,Ie)=>{if(!(Ie!==!0||ye)){if(jt.value!==null){mt();return}Cn.value!==null&&Qn===null&&(Qn=setTimeout(()=>{Cn.value=null,Qn=null},sZe))}}),qe(()=>ji()?.id??null,(ye,Ie)=>{ye!==Ie&&ei()}),qe(()=>s.sessionId,ei),qe(()=>s.queued?.length,ye=>{(ye??0)>0&&ei()});const Jt=L(()=>{if(s.lastTurnReason!=="cancelled"||s.working||s.turnActive)return null;const ye=s.turns[s.turns.length-1];return ye?.role==="assistant"&&Y8(ye)?ye.id:null}),Ki=L(()=>s.lastTurnReason==="failed"&&!s.working&&!s.turnActive&&s.turns.length>0);function Bo(){wi(),o("submit",{text:i("conversation.turnFailedResumeText"),attachments:[]})}const bl=L(()=>s.working?null:Cn.value);function ss(){o("interrupt")}function Ns(){return(C.value?.anyPopupOpen??b.value?.anyPopupOpen)===!0}const{handleCompositionStart:du,handleCompositionEnd:lf,isComposingKeyEvent:x9}=Xr();let Qh=null;function ug(ye){Qh=ye.target}function cg(ye){const Ie=ye instanceof Element&&ye!==document.body?ye:Qh,We=Nre(Ie,".global-preview");if(We){sS(We);return}const $t=_e.value?.querySelector(".chat");$t&&sS($t)}function $c(ye){if(!(ye.target instanceof Element&&ye.target.closest(".terminal-host")!==null)){if(ye.key==="Escape"&&!s.overlayOpen&&!Ns()&&!ye.defaultPrevented&&!ye.repeat&&!x9(ye)){bl.value!==null?(ye.preventDefault(),vt(bl.value)):s.working&&(ye.preventDefault(),$o(),ss());return}if(zae(ye)&&!s.overlayOpen&&s.turns.length>0){ye.preventDefault(),Mt();return}Tre(ye)&&!s.overlayOpen&&!Lre(ye.target)&&(ye.preventDefault(),cg(ye.target))}}function dg(){Qt.value&&Cs()}mn(()=>{kt(()=>{typeof MutationObserver=="function"&&(Pe=new MutationObserver(Ve)),typeof ResizeObserver=="function"&&(dt=new ResizeObserver(()=>{Ce(),Ee(),Ut();const ye=_e.value;if(!ye)return;const{scrollHeight:Ie,clientHeight:We}=ye,$t=Ie>pi+1,ln=We<hs-1;pi=Ie,hs=We,!hi()&&($t||ln)&&Cs()})),Ye(),ns(48),pe(),_e.value?.addEventListener("kimi-table-layout",ae),typeof document<"u"&&(document.addEventListener("visibilitychange",wt),document.addEventListener("keydown",$c),document.addEventListener("pointerdown",ug,!0),document.addEventListener("compositionstart",du),document.addEventListener("compositionend",lf)),window.visualViewport?.addEventListener("resize",dg)})}),Mn(()=>{_e.value?.removeEventListener("kimi-table-layout",ae),Pe&&Pe.disconnect(),dt&&dt.disconnect(),is&&Yt(is),ot&&Yt(ot),ts&&Yt(ts),vi&&Yt(vi),le&&Yt(le),X&&Yt(X),Wi!==null&&clearTimeout(Wi),pn&&clearTimeout(pn),Ht!==null&&clearTimeout(Ht),Qn!==null&&clearTimeout(Qn),Rt!==null&&clearTimeout(Rt),De!==null&&clearTimeout(De),x!==null&&(clearTimeout(x),x=null),typeof document<"u"&&(document.removeEventListener("visibilitychange",wt),document.removeEventListener("keydown",$c),document.removeEventListener("pointerdown",ug,!0),document.removeEventListener("compositionstart",du),document.removeEventListener("compositionend",lf)),window.visualViewport?.removeEventListener("resize",dg)});function S9(){(C.value??b.value)?.focus()}bhe({sessionId:()=>s.sessionId,mobile:()=>s.mobile===!0,starting:()=>s.starting===!0,dockedComposer:C,emptyComposer:b});function _9(){Gt()}function I9(ye){if(jt.value!==null){if(!ye){Bn||ei();return}Bn=!0,mt()}}return t({loadComposerForEdit:S,isComposerEmpty:_,focusComposer:S9,notifyUndone:_9,onAbortOutcome:I9,selectAllRegion:cg,focusGoal:V}),(ye,Ie)=>(k(),E("section",{class:Fe(["con",{mobile:e.mobile}])},[!e.mobile&&!(e.turns.length===0&&!e.sessionLoading)?(k(),de(Fje,{key:0,"session-id":e.sessionId,"workspace-name":e.workspaceName,"workspace-root":e.workspaceRoot,"session-title":e.sessionTitle,branch:e.gitInfo?.branch,ahead:e.gitInfo?.ahead,behind:e.gitInfo?.behind,"changes-count":z.value,"git-diff-stats":e.gitDiffStats,"is-git-repo":!!e.gitInfo,pr:e.pr,copied:v.value,archived:e.sessionArchived,onOpenChanges:Ie[0]||(Ie[0]=We=>o("openChanges")),onCopyAll:Ie[1]||(Ie[1]=We=>A.value?.copyConversation()),onCopyFinalSummary:Ie[2]||(Ie[2]=We=>A.value?.copyFinalSummary()),onOpenPr:Ie[3]||(Ie[3]=We=>e.pr&&o("openPr",e.pr.url)),onRenameSession:Ie[4]||(Ie[4]=(We,$t)=>o("renameSession",We,$t)),onForkSession:Ie[5]||(Ie[5]=We=>o("forkSession",We)),onArchiveSession:Ie[6]||(Ie[6]=We=>o("archiveSession",We)),onRestoreSession:Ie[7]||(Ie[7]=We=>o("restoreSession",We)),onExportSession:Ie[8]||(Ie[8]=We=>o("exportSession",We))},null,8,["session-id","workspace-name","workspace-root","session-title","branch","ahead","behind","changes-count","git-diff-stats","is-git-repo","pr","copied","archived"])):e.mobile?te("",!0):(k(),E("div",{key:1,class:Fe(["empty-drag",{"macos-desktop":p(Gu)}])},null,2)),K(kVe,{items:se.value,"active-turn-id":Z.value,mobile:e.mobile,"session-loading":e.sessionLoading,occluded:Y.value,onSelect:Pi},null,8,["items","active-turn-id","mobile","session-loading","occluded"]),w("div",{class:"chat-layout",style:qt(lt.value)},[w("div",{ref:fn,class:Fe(["panes chat-scroll",{"is-following":Qt.value,"history-prepending":Ui.value,"is-pinned":Ni.value,scrolling:Dn.value,"session-settling":Fo.value}]),onScrollPassive:Tn,onWheelPassive:dr,onPointerdownPassive:rt,onTouchstartPassive:U,onTouchmovePassive:me},[w("div",{class:Fe(["content-wrap",[e.mobile?"align-mobile":"align-center"]])},[e.turns.length===0&&!e.sessionLoading?(k(),E(Te,{key:0},[Ie[58]||(Ie[58]=w("div",{class:"empty-spacer"},null,-1)),d.value?(k(),de(sVe,{key:0,"workspace-name":u.value,"workspace-root":e.workspaceRoot},null,8,["workspace-name","workspace-root"])):(k(),E("div",zVe,[e.starting?(k(),E("span",OVe,[K(p(Mi),{size:"sm"}),w("span",null,F(p(i)("conversation.starting")),1)])):(k(),de(BVe,{key:0,class:"empty-doodle"},{fallback:he(()=>[w("span",RVe,F(p(i)("composer.emptyConversationTitle")),1)]),_:1})),e.starting?te("",!0):(k(),E("span",PVe,F(p(i)("composer.emptyConversation")),1))])),h.value?(k(),E("div",jVe,[K(p(ve),{class:"upgrade-banner-icon",name:"music",size:"sm"}),w("span",HVe,F(p(i)("composer.upgradeBanner")),1),w("button",{type:"button",class:"upgrade-banner-cta",onClick:Ie[9]||(Ie[9]=We=>p(z0)())},F(p(i)("sidebar.upgrade")),1)])):te("",!0),K(Ij,{ref_key:"emptyComposerRef",ref:b,class:"empty-composer","session-id":e.sessionId,running:e.running,working:e.working,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"swarm-mode":e.swarmMode,"goal-mode":e.goalMode,goal:e.goal,"activation-badges":e.activationBadges,models:e.models,"auth-ready":e.authReady,"managed-signed-in":e.managedSignedIn,"managed-membership":e.managedMembership,"starred-ids":e.starredIds,skills:e.skills,starting:e.starting,"hide-context":"",onSubmit:Vo,onSteer:Ie[12]||(Ie[12]=We=>o("steer",We)),onCommand:Ie[13]||(Ie[13]=We=>o("command",We)),onInterrupt:ss,onUnqueue:Ie[14]||(Ie[14]=We=>o("unqueue",We)),onEditQueued:Ie[15]||(Ie[15]=We=>o("editQueued",We)),onSetPermission:Ie[16]||(Ie[16]=We=>o("setPermission",We)),onSetThinking:Ie[17]||(Ie[17]=We=>o("setThinking",We)),onTogglePlan:Ie[18]||(Ie[18]=We=>o("togglePlan")),onToggleSwarm:Ie[19]||(Ie[19]=We=>o("toggleSwarm")),onToggleGoal:Ie[20]||(Ie[20]=We=>o("toggleGoal")),onOpenBtw:Ie[21]||(Ie[21]=We=>o("command",{cmd:"/btw",attachments:[]})),onCreateGoal:Ie[22]||(Ie[22]=We=>o("createGoal",We)),onControlGoal:Ie[23]||(Ie[23]=We=>o("controlGoal",We)),onFocusGoal:V,onCompact:Ie[24]||(Ie[24]=We=>o("compact")),onPickModel:Ie[25]||(Ie[25]=We=>o("pickModel")),onSelectModel:Ie[26]||(Ie[26]=We=>o("selectModel",We)),onLogin:Ie[27]||(Ie[27]=We=>o("login"))},UL({_:2},[e.starting?void 0:{name:"footer",fn:he(()=>[w("div",WVe,[f.value?(k(),E("div",qVe,[K(p(kn),{text:p(i)("conversation.switchWorkspace")},{default:he(()=>[w("button",{type:"button",class:Fe(["ws-chip",{open:r.value}]),"aria-expanded":r.value,onClick:Ct(m,["stop"])},[K(p(ve),{name:"folder"}),w("span",KVe,F(u.value),1),K(p(ve),{class:"ws-chip-chev",name:"chevron-down",size:"sm"})],10,UVe)]),_:1},8,["text"]),r.value?(k(),E("div",{key:0,class:Fe(["ws-panel",{up:l.value}]),style:qt(a.value?{maxHeight:a.value}:void 0),role:"menu"},[w("div",VVe,F(p(i)("workspace.recentLabel")),1),(k(!0),E(Te,null,ht(g.value,We=>(k(),E("button",{key:We.id,type:"button",class:Fe(["ws-row",{on:We.id===e.activeWorkspaceId}]),role:"menuitem",onClick:Ct($t=>y(We.id),["stop"])},[K(p(ve),{name:"folder"}),w("span",GVe,[w("span",QVe,F(We.name),1),w("span",YVe,F(We.shortPath),1)]),We.id===e.activeWorkspaceId?(k(),de(p(ve),{key:0,class:"ws-check",name:"check",size:"sm"})):te("",!0)],10,ZVe))),128)),Ie[57]||(Ie[57]=w("div",{class:"ws-divider"},null,-1)),w("button",{type:"button",class:"ws-action",role:"menuitem",onClick:Ie[10]||(Ie[10]=Ct(We=>{r.value=!1,o("addWorkspace")},["stop"]))},[K(p(ve),{name:"folder-plus"}),w("span",null,F(p(i)("conversation.pickFolder")),1)])],6)):te("",!0)])):(k(),E("button",{key:1,type:"button",class:"ws-chip ws-ghost",onClick:Ie[11]||(Ie[11]=We=>o("addWorkspace"))},[K(p(ve),{name:"folder-plus"}),w("span",null,F(p(i)("conversation.pickFolder")),1)]))])]),key:"0"}]),1032,["session-id","running","working","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","goal","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","starting"]),r.value?(k(),E("div",{key:3,class:"ws-backdrop",onClick:Ie[28]||(Ie[28]=We=>r.value=!1)})):te("",!0),d.value&&(e.recentSessions?.length??0)>0?(k(),de(fVe,{key:4,sessions:e.recentSessions??[],onSelectSession:Ie[29]||(Ie[29]=We=>o("selectSession",We)),onOpenSessionAdmin:Ie[30]||(Ie[30]=We=>o("openSessionAdmin",e.activeWorkspaceId??void 0))},null,8,["sessions"])):te("",!0),Ie[59]||(Ie[59]=w("div",{class:"empty-spacer"},null,-1))],64)):(k(),de(J7,{ref_key:"chatPaneRef",ref:A,key:e.fileReloadKey??"no-session",turns:e.turns,cwd:e.status.cwd,approvals:e.approvals,questions:e.questions,"turn-active":e.turnActive,working:e.working,"session-loading":e.sessionLoading,compaction:e.compaction,"has-more-messages":e.hasMoreMessages,"loading-more":e.loadingMore,"loading-more-error":e.loadingMoreError,"is-following":Qt.value,queued:e.queued,"undo-hint-turn-id":bl.value,"interrupted-turn-id":Jt.value,"turn-failed":Ki.value,"turn-error":e.turnError??null,"turn-retry":e.turnRetry??null,onResumeTurn:Bo,onOpenFile:Ie[31]||(Ie[31]=We=>o("openFile",We)),onOpenMedia:Ie[32]||(Ie[32]=We=>o("openMedia",We)),onOpenTurnDiff:Ie[33]||(Ie[33]=We=>o("openTurnDiff",We)),onCopyConversationCopied:I,onOpenCompaction:Ie[34]||(Ie[34]=We=>o("openCompaction",We)),onOpenAgent:Ie[35]||(Ie[35]=We=>o("openAgent",We)),onEditMessage:Ts,onArmedUndo:vt,onLoadOlderMessages:Oi,onUnqueue:Ie[36]||(Ie[36]=We=>o("unqueue",We)),onEditQueued:po,onReorderQueue:Ks},null,8,["turns","cwd","approvals","questions","turn-active","working","session-loading","compaction","has-more-messages","loading-more","loading-more-error","is-following","queued","undo-hint-turn-id","interrupted-turn-id","turn-failed","turn-error","turn-retry"]))],2)],34),e.turns.length===0&&!e.sessionLoading?te("",!0):(k(),de(JKe,{key:0,ref:Nn,style:qt(Ge.value),"session-id":e.sessionId,running:e.running,working:e.working,starting:e.starting,queued:e.queued,"search-files":e.searchFiles,"upload-image":e.uploadImage,status:e.status,thinking:e.thinking,"plan-mode":e.planMode,"plan-armed":e.planArmed,"swarm-mode":e.swarmMode,"goal-mode":e.goalMode,"activation-badges":e.activationBadges,models:e.models,"auth-ready":e.authReady,"managed-signed-in":e.managedSignedIn,"managed-membership":e.managedMembership,"starred-ids":e.starredIds,skills:e.skills,goal:e.goal,"session-plans":e.sessionPlans,"dock-panel":W.value,"overlay-open":e.overlayOpen,"bash-tasks":M.value,"subagent-tasks":$.value,"bash-running":D.value,"subagent-running":T.value,"todo-done-count":q.value,"has-dock-work":j.value,todos:e.todos,"pending-question":Q.value,"question-busy-kind":ne.value,"pending-approval":ge.value,"approval-busy":Ae.value,mobile:e.mobile,onToggleDockPanel:Ie[37]||(Ie[37]=We=>H(We)),onCloseDockPanel:Ie[38]||(Ie[38]=We=>ee()),onOpenAgent:Ie[39]||(Ie[39]=We=>o("openAgent",We)),"open-file":We=>o("openFile",We),onAnswer:Zo,onDismiss:Ie[40]||(Ie[40]=We=>o("dismiss",We)),onApproval:Be,onCancelTask:Ie[41]||(Ie[41]=We=>o("cancelTask",We)),onControlGoal:Ie[42]||(Ie[42]=We=>o("controlGoal",We)),onSubmit:Vo,onSteer:Ie[43]||(Ie[43]=We=>o("steer",We)),onCommand:Ie[44]||(Ie[44]=We=>o("command",We)),onInterrupt:ss,onSetPermission:Ie[45]||(Ie[45]=We=>o("setPermission",We)),onSetThinking:Ie[46]||(Ie[46]=We=>o("setThinking",We)),onTogglePlan:Ie[47]||(Ie[47]=We=>o("togglePlan")),onToggleSwarm:Ie[48]||(Ie[48]=We=>o("toggleSwarm")),onToggleGoal:Ie[49]||(Ie[49]=We=>o("toggleGoal")),onOpenBtw:Ie[50]||(Ie[50]=We=>o("command",{cmd:"/btw",attachments:[]})),onCreateGoal:Ie[51]||(Ie[51]=We=>o("createGoal",We)),onFocusGoal:V,onCompact:Ie[52]||(Ie[52]=We=>o("compact")),onPickModel:Ie[53]||(Ie[53]=We=>o("pickModel")),onSelectModel:Ie[54]||(Ie[54]=We=>o("selectModel",We)),onLogin:Ie[55]||(Ie[55]=We=>o("login"))},null,8,["style","session-id","running","working","starting","queued","search-files","upload-image","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","activation-badges","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","goal","session-plans","dock-panel","overlay-open","bash-tasks","subagent-tasks","bash-running","subagent-running","todo-done-count","has-dock-work","todos","pending-question","question-busy-kind","pending-approval","approval-busy","mobile","open-file"]))],4),et.value?(k(),de(LVe,{key:2,ref_key:"transcriptSearchRef",ref:ut,pane:_e.value,mobile:e.mobile,reveal:Ai,onClose:Ze},null,8,["pane","mobile"])):te("",!0),K(ls,{name:"pill"},{default:he(()=>[un.value&&e.turns.length>0?(k(),E("button",{key:0,class:"newmsg-pill",style:qt({bottom:`${Ne.value+12}px`}),"aria-label":p(i)("conversation.jumpToLatestAria"),onClick:Ie[56]||(Ie[56]=We=>fs(!0))},[K(p(ve),{class:"pill-chevron",name:"arrow-down",size:"sm"}),$e(" "+F(p(i)("conversation.newMessages")),1)],12,JVe)):te("",!0)]),_:1}),K(ls,{name:"undo-toast"},{default:he(()=>[pt.value?(k(),E("div",XVe,[w("span",eZe,F(p(i)("conversation.undone")),1)])):te("",!0)]),_:1})],2))}}),aZe=gt(lZe,[["__scopeId","data-v-430dd661"]]),Hm=4,O1=8;function rA(e){const t=G(!1),n=G({});let i=null;function s(){document.removeEventListener("mousedown",l),document.removeEventListener("keydown",a),window.removeEventListener("resize",r),window.removeEventListener("scroll",u,!0)}function o(){document.addEventListener("mousedown",l),document.addEventListener("keydown",a),window.addEventListener("resize",r),window.addEventListener("scroll",u,!0)}function r(){t.value&&(t.value=!1,i=null,s())}function l(g){const m=g.target;m.closest(".sa-menu")||i!==null&&i.contains(m)||r()}function a(g){g.key==="Escape"&&r()}function u(g){g.target instanceof Element&&g.target.closest(".sa-menu")||r()}async function c(g,m,y){t.value||(t.value=!0,o()),await kt();const A=e.value?.el,b=A?.offsetHeight??0,C=A?.offsetWidth??0;let v=m,x=!1;v+b>window.innerHeight-O1&&(v=Math.max(O1,m-b-(y?.flipAboveGap??0)),x=!0);let S=y?.alignRightTo!==void 0?y.alignRightTo-C:g;S+C>window.innerWidth-O1&&(S=Math.max(O1,window.innerWidth-C-O1)),n.value={top:`${Math.round(v)}px`,left:`${Math.round(S)}px`,transformOrigin:x?"bottom left":"top left","--menu-pop-shift":x?"2px":"-2px"}}async function d(g){if(t.value){r();return}i=g.currentTarget;const m=i.getBoundingClientRect();await c(m.left,m.bottom+Hm,{flipAboveGap:m.height+Hm*2})}async function f(g,m){if(t.value){r();return}i=g.currentTarget;const y=i.getBoundingClientRect();await c(y.left,y.bottom+Hm,{flipAboveGap:y.height+Hm*2,alignRightTo:m==="right"?y.right:void 0})}async function h(g,m){i=null,await c(g,m)}return Gn(s),{open:t,menuStyle:n,toggle:d,toggleAnchored:f,openAt:h,close:r}}const uZe=["aria-label"],cZe={class:"sa-select-label"},dZe={class:"sa-check"},fZe=Qe({__name:"FilterSelect",props:{modelValue:{},options:{},ariaLabel:{}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=e,s=n,o=G(null),{open:r,menuStyle:l,toggle:a,close:u}=rA(o);t({open:r});const c=L(()=>i.options.find(f=>f.value===i.modelValue)?.label??"");function d(f){f!==i.modelValue&&s("update:modelValue",f),u()}return(f,h)=>(k(),E(Te,null,[w("button",{class:Fe(["sa-select",{"is-open":p(r)}]),type:"button","aria-label":e.ariaLabel,onClick:h[0]||(h[0]=(...g)=>p(a)&&p(a)(...g))},[w("span",cZe,F(c.value),1),K(p(ve),{class:"sa-select-chev",name:"chevron-down",size:"sm"})],10,uZe),K(ls,{name:"menu-pop"},{default:he(()=>[p(r)?(k(),de(p(sr),{key:0,ref_key:"menuRef",ref:o,class:"sa-menu",style:qt(p(l)),onClick:h[1]||(h[1]=Ct(()=>{},["stop"]))},{default:he(()=>[(k(!0),E(Te,null,ht(e.options,g=>(k(),de(p(Wt),{key:g.value,onClick:m=>d(g.value)},{default:he(()=>[w("span",dZe,[g.value===e.modelValue?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)]),g.dot?(k(),E("span",{key:0,class:Fe(["sa-dot",`sa-dot--${g.dot}`])},null,2)):te("",!0),$e(" "+F(g.label),1)]),_:2},1032,["onClick"]))),128))]),_:1},8,["style"])):te("",!0)]),_:1})],64))}}),n5=gt(fZe,[["__scopeId","data-v-559b928b"]]),hZe=["aria-label","onKeydown"],pZe={class:"sa-tag-name"},gZe=["aria-label","onClick"],mZe={key:0,class:"sa-tag-more"},vZe={key:1,class:"sa-select-label"},yZe={class:"sa-search"},kZe=["placeholder","aria-label"],bZe={class:"sa-opts"},AZe={class:"sa-ws-name"},CZe={key:0,class:"sa-menu-empty"},wZe=Qe({__name:"MultiSelectMenu",props:{options:{},modelValue:{},ariaLabel:{}},emits:["update:modelValue"],setup(e,{expose:t,emit:n}){const i=e,s=n,{t:o}=Bt(),r=G(null),{open:l,menuStyle:a,toggle:u}=rA(r);t({open:l});const c=L(()=>new Set(i.modelValue)),d=L(()=>i.options.length>0&&c.value.size===i.options.length),f=L(()=>i.options.filter(_=>c.value.has(_.id))),h=L(()=>f.value.slice(0,2)),g=L(()=>f.value.length-h.value.length),m=G(""),y=G(null),A=L(()=>{const _=m.value.trim().toLowerCase();return _===""?i.options:i.options.filter(I=>I.name.toLowerCase().includes(_))});qe(l,_=>{_?kt(()=>y.value?.focus()):m.value=""});function b(_){s("update:modelValue",i.options.filter(I=>_.has(I.id)).map(I=>I.id))}function C(_){const I=new Set(c.value);I.has(_)?I.delete(_):I.add(_),b(I)}function v(_){const I=new Set(c.value);I.delete(_),b(I)}function x(){b(d.value?new Set:new Set(i.options.map(_=>_.id)))}function S(_){u(_)}return(_,I)=>(k(),E(Te,null,[w("div",{class:Fe(["sa-select",{"is-open":p(l)}]),role:"button",tabindex:"0","aria-label":e.ariaLabel,onClick:I[2]||(I[2]=(...M)=>p(u)&&p(u)(...M)),onKeydown:[_s(Ct(S,["prevent"]),["enter"]),_s(Ct(S,["prevent"]),["space"])]},[f.value.length>0?(k(),E(Te,{key:0},[(k(!0),E(Te,null,ht(h.value,M=>(k(),E("span",{key:M.id,class:"sa-tag"},[w("span",pZe,F(M.name),1),w("button",{class:"sa-tag-x",type:"button","aria-label":p(o)("admin.removeTag",{name:M.name}),onClick:Ct($=>v(M.id),["stop"]),onKeydown:[I[0]||(I[0]=_s(Ct(()=>{},["stop"]),["enter"])),I[1]||(I[1]=_s(Ct(()=>{},["stop"]),["space"]))]},[K(p(ve),{name:"close",size:"sm"})],40,gZe)]))),128)),g.value>0?(k(),E("span",mZe,"+"+F(g.value),1)):te("",!0)],64)):(k(),E("span",vZe,F(p(o)("admin.allWorkspaces")),1)),K(p(ve),{class:"sa-select-chev",name:"chevron-down",size:"sm"})],42,hZe),K(ls,{name:"menu-pop"},{default:he(()=>[p(l)?(k(),de(p(sr),{key:0,ref_key:"menuRef",ref:r,class:"sa-menu",style:qt(p(a)),role:"dialog",onClick:I[4]||(I[4]=Ct(()=>{},["stop"]))},{default:he(()=>[w("div",yZe,[K(p(ve),{name:"search",size:"sm"}),$n(w("input",{ref_key:"searchRef",ref:y,"onUpdate:modelValue":I[3]||(I[3]=M=>m.value=M),class:"sa-search-input",type:"text",placeholder:p(o)("admin.searchWorkspace"),"aria-label":p(o)("admin.searchWorkspace")},null,8,kZe),[[uo,m.value]])]),K(p(Wt),{role:"button",active:d.value,onClick:x},{default:he(()=>[$e(F(p(o)("admin.selectAll")),1)]),_:1},8,["active"]),K(p(Wt),{separator:""}),w("div",bZe,[(k(!0),E(Te,null,ht(A.value,M=>(k(),de(p(Wt),{key:M.id,role:"button",active:c.value.has(M.id),onClick:$=>C(M.id)},{default:he(()=>[w("span",AZe,F(M.name),1)]),_:2},1032,["active","onClick"]))),128)),A.value.length===0?(k(),E("div",CZe,F(p(o)("admin.noWorkspaceMatch")),1)):te("",!0)])]),_:1},8,["style"])):te("",!0)]),_:1})],64))}}),xZe=gt(wZe,[["__scopeId","data-v-08fc2991"]]);function JT(e){const t=new Date(e),n=i=>String(i).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`}function XT(e){const t=new Date(e),n=i=>String(i).padStart(2,"0");return`${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`}const SZe={class:"sa-menu-head"},_Ze=Qe({__name:"SessionAdminMenu",props:{mode:{},targetArchived:{type:Boolean},counts:{}},emits:["action"],setup(e,{expose:t,emit:n}){const i=n,{t:s}=Bt(),o=G(null),{open:r,menuStyle:l,toggleAnchored:a,openAt:u,close:c}=rA(o);function d(f){c(),i("action",f)}return t({openAt:u,toggleAnchored:a,close:c}),(f,h)=>(k(),de(ls,{name:"menu-pop"},{default:he(()=>[p(r)?(k(),de(p(sr),{key:0,ref_key:"menuRef",ref:o,class:"sa-menu",style:qt(p(l)),onClick:h[11]||(h[11]=Ct(()=>{},["stop"]))},{default:he(()=>[e.mode==="single"?(k(),E(Te,{key:0},[K(p(Wt),{onClick:h[0]||(h[0]=g=>d("open"))},{default:he(()=>[K(p(ve),{name:"external-link",size:"sm"}),$e(" "+F(p(s)("admin.open")),1)]),_:1}),K(p(Wt),{onClick:h[1]||(h[1]=g=>d("rename"))},{default:he(()=>[K(p(ve),{name:"pencil",size:"sm"}),$e(" "+F(p(s)("admin.rename")),1)]),_:1}),K(p(Wt),{onClick:h[2]||(h[2]=g=>d("fork"))},{default:he(()=>[K(p(ve),{name:"git-fork",size:"sm"}),$e(" "+F(p(s)("admin.fork")),1)]),_:1}),K(p(Wt),{onClick:h[3]||(h[3]=g=>d("export"))},{default:he(()=>[K(p(ve),{name:"download",size:"sm"}),$e(" "+F(p(s)("admin.export")),1)]),_:1}),K(p(Wt),{separator:""}),e.targetArchived?(k(),de(p(Wt),{key:0,onClick:h[4]||(h[4]=g=>d("restore"))},{default:he(()=>[K(p(ve),{name:"undo",size:"sm"}),$e(" "+F(p(s)("admin.reopen")),1)]),_:1})):(k(),de(p(Wt),{key:1,onClick:h[5]||(h[5]=g=>d("archive"))},{default:he(()=>[K(p(ve),{name:"state-done",size:"sm"}),$e(" "+F(p(s)("admin.markDone")),1)]),_:1}))],64)):e.mode==="rowActions"?(k(),E(Te,{key:1},[K(p(Wt),{onClick:h[6]||(h[6]=g=>d("rename"))},{default:he(()=>[K(p(ve),{name:"pencil",size:"sm"}),$e(" "+F(p(s)("admin.rename")),1)]),_:1}),K(p(Wt),{onClick:h[7]||(h[7]=g=>d("fork"))},{default:he(()=>[K(p(ve),{name:"git-fork",size:"sm"}),$e(" "+F(p(s)("admin.fork")),1)]),_:1}),K(p(Wt),{onClick:h[8]||(h[8]=g=>d("export"))},{default:he(()=>[K(p(ve),{name:"download",size:"sm"}),$e(" "+F(p(s)("admin.export")),1)]),_:1})],64)):(k(),E(Te,{key:2},[w("div",SZe,F(p(s)("admin.batchSelected",{n:e.counts?.total??0})),1),K(p(Wt),{disabled:(e.counts?.open??0)===0,onClick:h[9]||(h[9]=g=>d("archive"))},{default:he(()=>[K(p(ve),{name:"state-done",size:"sm"}),$e(" "+F(p(s)("admin.markDoneCount",{n:e.counts?.open??0})),1)]),_:1},8,["disabled"]),K(p(Wt),{disabled:(e.counts?.done??0)===0,onClick:h[10]||(h[10]=g=>d("restore"))},{default:he(()=>[K(p(ve),{name:"undo",size:"sm"}),$e(" "+F(p(s)("admin.reopenCount",{n:e.counts?.done??0})),1)]),_:1},8,["disabled"])],64))]),_:1},8,["style"])):te("",!0)]),_:1}))}}),IZe=gt(_Ze,[["__scopeId","data-v-770e2854"]]),MZe={key:0},EZe={class:"sa-col-cb"},TZe=["aria-label"],LZe={key:0,colspan:"7",class:"sa-batch"},NZe={class:"sa-batch-inner"},FZe={class:"sa-batch-count"},DZe=["disabled"],$Ze=["disabled"],BZe=["disabled"],zZe={class:"sa-c-time"},RZe={class:"sa-c-time"},OZe=["onContextmenu"],PZe={class:"sa-col-cb"},jZe=["aria-label","onClick"],HZe=["onKeydown","onBlur"],WZe=["title"],qZe={class:"sa-ws"},UZe=["title"],KZe={class:"sa-c-time"},VZe={class:"sa-time sa-time--full"},ZZe={class:"sa-time sa-time--compact"},GZe={class:"sa-c-time"},QZe={class:"sa-time sa-time--full"},YZe={class:"sa-time sa-time--compact"},JZe={key:1,class:"sa-time sa-none"},XZe={class:"sa-act"},eGe={key:1,class:"sa-state"},tGe={key:2,class:"sa-state"},nGe={class:"sa-empty"},iGe=Qe({__name:"SessionAdminTable",props:{items:{},total:{},loading:{type:Boolean},workspaces:{},batchRunning:{}},emits:["archiveSessions","restoreSessions"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Kl(),r=L(()=>new Map(n.workspaces.map(W=>[W.id,W.name])));function l(W){return W.meta.title??W.meta.last_prompt??W.id.slice(0,12)}function a(W){const z=r.value.get(W.workspace.id);return z!==void 0?z:W.workspace.cwd!==null?uu(W.workspace.cwd):"—"}function u(W){return W.meta.archived?JT(W.meta.archived_at??W.meta.updated_at):null}function c(W){return W.meta.archived?XT(W.meta.archived_at??W.meta.updated_at):null}const d=L(()=>o.sessionAdminSelectedIds.value),f=L(()=>o.sessionAdminSelectedCount.value),h=L(()=>o.sessionAdminOpenSelectedIds.value),g=L(()=>o.sessionAdminDoneSelectedIds.value),m=L(()=>o.sessionAdminAllMatching.value),y=L(()=>o.sessionAdminMaterializingAll.value),A=L(()=>({total:f.value,open:h.value.length,done:g.value.length})),b=L(()=>n.items.map(W=>({id:W.id,archived:W.meta.archived}))),C=L(()=>b.value.length>0&&b.value.every(W=>d.value.has(W.id))),v=L(()=>!C.value&&b.value.some(W=>d.value.has(W.id)));function x(){o.toggleSessionAdminPageSelection(b.value)}const S=G(null),_=G(""),I=G(null);function M(W){S.value=W.id,_.value=l(W),kt(()=>{I.value?.focus(),I.value?.select()})}async function $(W){if(S.value!==W.id)return;const z=_.value.trim();S.value=null,!(z===""||z===l(W))&&(await o.renameSession(W.id,z),await o.refreshSessionAdminSessions())}function D(W,z){W.stopPropagation(),W.key==="Enter"?$(z):W.key==="Escape"&&(S.value=null)}const T=G("single"),N=G(null),O=G(null);function P(W,z){z.preventDefault(),d.value.has(W.id)&&d.value.size>1?(T.value="multi",N.value=null):(o.setSessionAdminSelection([{id:W.id,archived:W.meta.archived}]),T.value="single",N.value=W),O.value?.openAt(z.clientX,z.clientY)}function R(W,z){T.value="rowActions",N.value=W,O.value?.toggleAnchored(z,"right")}function q(W){W.meta.archived?i("restoreSessions",[W.id]):i("archiveSessions",[W.id])}function j(W){if(T.value==="multi"){W==="archive"?i("archiveSessions",[...h.value]):W==="restore"&&i("restoreSessions",[...g.value]);return}const z=N.value;if(z!==null)switch(W){case"open":o.selectSession(z.id);break;case"rename":M(z);break;case"fork":o.forkSession(z.id);break;case"export":o.exportSession(z.id);break;case"archive":i("archiveSessions",[z.id]);break;case"restore":i("restoreSessions",[z.id]);break}}return(W,z)=>(k(),E(Te,null,[w("div",{class:Fe(["sa-table-card",{"is-loading":e.loading&&e.items.length>0}])},[e.items.length>0?(k(),E("table",MZe,[z[5]||(z[5]=w("colgroup",null,[w("col",{class:"sa-col-cb"}),w("col",{class:"sa-col-title"}),w("col",{class:"sa-col-ws"}),w("col",{class:"sa-col-status"}),w("col"),w("col",{class:"sa-col-time"}),w("col",{class:"sa-col-time"}),w("col",{class:"sa-col-act"})],-1)),w("thead",null,[w("tr",null,[w("th",EZe,[w("button",{class:Fe(["sa-cb",{on:C.value,ind:v.value}]),type:"button","aria-label":p(s)("admin.selectPageAll"),onClick:x},[C.value?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):v.value?(k(),de(p(ve),{key:1,name:"minus",size:"sm"})):te("",!0)],10,TZe)]),f.value>0?(k(),E("th",LZe,[w("div",NZe,[w("span",FZe,F(m.value?p(s)("admin.allMatchingSelected",{n:f.value}):p(s)("admin.batchSelected",{n:f.value})),1),m.value?(k(),E("button",{key:0,class:"sa-batch-link",type:"button",onClick:z[0]||(z[0]=H=>p(o).clearSessionAdminSelection())},F(p(s)("admin.clearSelection")),1)):C.value&&e.total>f.value?(k(),E("button",{key:1,class:"sa-batch-link",type:"button",disabled:y.value,onClick:z[1]||(z[1]=H=>p(o).selectSessionAdminAllMatching())},F(y.value?p(s)("admin.materializingAll"):p(s)("admin.selectAllMatching",{total:e.total})),9,DZe)):te("",!0),w("button",{class:"sa-btn-q sa-btn-q--primary",type:"button",disabled:A.value.open===0||e.batchRunning!==null,onClick:z[2]||(z[2]=H=>i("archiveSessions",[...h.value]))},[e.batchRunning==="archive"?(k(),de(p(Mi),{key:0,size:"sm"})):(k(),de(p(ve),{key:1,name:"state-done",size:"sm"})),$e(" "+F(p(s)("admin.markDone")),1)],8,$Ze),w("button",{class:"sa-btn-q",type:"button",disabled:A.value.done===0||e.batchRunning!==null,onClick:z[3]||(z[3]=H=>i("restoreSessions",[...g.value]))},[e.batchRunning==="restore"?(k(),de(p(Mi),{key:0,size:"sm"})):(k(),de(p(ve),{key:1,name:"undo",size:"sm"})),$e(" "+F(p(s)("admin.reopen")),1)],8,BZe)])])):(k(),E(Te,{key:1},[w("th",null,F(p(s)("admin.colTitle")),1),w("th",null,F(p(s)("admin.colWorkspace")),1),w("th",null,F(p(s)("admin.colStatus")),1),w("th",null,F(p(s)("admin.colPrompt")),1),w("th",zZe,F(p(s)("admin.colUpdated")),1),w("th",RZe,F(p(s)("admin.colCompleted")),1),w("th",null,F(p(s)("admin.colActions")),1)],64))])]),w("tbody",null,[(k(!0),E(Te,null,ht(e.items,H=>(k(),E("tr",{key:H.id,onContextmenu:ee=>P(H,ee)},[w("td",PZe,[w("button",{class:Fe(["sa-cb",{on:d.value.has(H.id)}]),type:"button","aria-label":H.id,onClick:ee=>p(o).toggleSessionAdminSelection(H.id,H.meta.archived)},[d.value.has(H.id)?(k(),de(p(ve),{key:0,name:"check",size:"sm"})):te("",!0)],10,jZe)]),w("td",null,[S.value===H.id?$n((k(),E("input",{key:0,ref_for:!0,ref_key:"renameInputRef",ref:I,"onUpdate:modelValue":z[4]||(z[4]=ee=>_.value=ee),class:"sa-rename",type:"text",onKeydown:ee=>D(ee,H),onBlur:ee=>void $(H)},null,40,HZe)),[[uo,_.value]]):(k(),E("span",{key:1,class:"sa-title",title:l(H)},F(l(H)),9,WZe))]),w("td",null,[w("span",qZe,[w("span",null,F(a(H)),1)])]),w("td",null,[w("span",{class:Fe(["sa-st",H.meta.archived?"sa-st--done":"sa-st--open"])},[K(p(ve),{name:H.meta.archived?"state-done":"state-open",size:"sm"},null,8,["name"]),$e(" "+F(H.meta.archived?p(s)("admin.statusDone"):p(s)("admin.statusOpen")),1)],2)]),w("td",{class:"sa-prompt",title:H.meta.last_prompt??void 0},[w("span",{class:Fe({"sa-none":H.meta.last_prompt===null})},F(H.meta.last_prompt??"—"),3)],8,UZe),w("td",KZe,[w("span",VZe,F(p(JT)(H.meta.updated_at)),1),w("span",ZZe,F(p(XT)(H.meta.updated_at)),1)]),w("td",GZe,[u(H)!==null?(k(),E(Te,{key:0},[w("span",QZe,F(u(H)),1),w("span",YZe,F(c(H)),1)],64)):(k(),E("span",JZe,"—"))]),w("td",null,[w("div",XZe,[K(p(tn),{size:"sm",label:H.meta.archived?p(s)("admin.reopen"):p(s)("admin.markDone"),tooltip:H.meta.archived?p(s)("admin.reopen"):p(s)("admin.markDone"),onClick:ee=>q(H)},{default:he(()=>[K(p(ve),{name:H.meta.archived?"undo":"state-done"},null,8,["name"])]),_:2},1032,["label","tooltip","onClick"]),K(p(tn),{size:"sm",label:p(s)("admin.moreActions"),tooltip:p(s)("admin.moreActions"),onClick:ee=>R(H,ee)},{default:he(()=>[K(p(ve),{name:"dots-horizontal"})]),_:1},8,["label","tooltip","onClick"])])])],40,OZe))),128))])])):e.loading?(k(),E("div",eGe,[K(p(Mi),{size:"lg",label:p(s)("admin.loading")},null,8,["label"])])):(k(),E("div",tGe,[w("p",nGe,F(p(s)("admin.empty")),1)]))],2),K(IZe,{ref_key:"adminMenuRef",ref:O,mode:T.value,"target-archived":N.value?.meta.archived,counts:A.value,onAction:j},null,8,["mode","target-archived","counts"])],64))}}),sGe=gt(iGe,[["__scopeId","data-v-9b9dc9c2"]]);function oGe(e,t){return t<=7?Array.from({length:t},(n,i)=>i+1):e<=4?[1,2,3,4,5,"…",t]:e>=t-3?[1,"…",t-4,t-3,t-2,t-1,t]:[1,"…",e-1,e,e+1,"…",t]}const rGe={class:"sa-pager"},lGe={class:"sa-total"},aGe={class:"sa-pager-right"},uGe={key:0,class:"sa-pages"},cGe=["disabled","title","aria-label"],dGe={key:0,class:"sa-ellipsis"},fGe=["onClick"],hGe=["disabled","title","aria-label"],pGe=Qe({__name:"SessionAdminPagination",props:{page:{},pageSize:{},total:{}},emits:["update:page","update:pageSize"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=[10,20,50,100],r=L(()=>Math.max(1,Math.ceil(n.total/n.pageSize))),l=L(()=>oGe(n.page,r.value)),a=L(()=>o.map(c=>({value:String(c),label:s("admin.pageSize",{n:c})}))),u=L({get:()=>String(n.pageSize),set:c=>i("update:pageSize",Number(c))});return(c,d)=>(k(),E("div",rGe,[w("span",lGe,F(p(s)("admin.total",{n:e.total})),1),w("div",aGe,[K(n5,{modelValue:u.value,"onUpdate:modelValue":d[0]||(d[0]=f=>u.value=f),options:a.value,"aria-label":p(s)("admin.pageSize",{n:e.pageSize})},null,8,["modelValue","options","aria-label"]),e.total>0?(k(),E("div",uGe,[w("button",{class:"sa-pg",type:"button",disabled:e.page===1,title:p(s)("admin.prevPage"),"aria-label":p(s)("admin.prevPage"),onClick:d[1]||(d[1]=f=>i("update:page",e.page-1))},[K(p(ve),{name:"chevron-left",size:"sm"})],8,cGe),(k(!0),E(Te,null,ht(l.value,(f,h)=>(k(),E(Te,{key:h},[f==="…"?(k(),E("span",dGe,"…")):(k(),E("button",{key:1,class:Fe(["sa-pg",{cur:f===e.page}]),type:"button",onClick:g=>i("update:page",f)},F(f),11,fGe))],64))),128)),w("button",{class:"sa-pg",type:"button",disabled:e.page===r.value,title:p(s)("admin.nextPage"),"aria-label":p(s)("admin.nextPage"),onClick:d[2]||(d[2]=f=>i("update:page",e.page+1))},[K(p(ve),{name:"chevron-right",size:"sm"})],8,hGe)])):te("",!0)])]))}}),gGe=gt(pGe,[["__scopeId","data-v-a27fa76f"]]),mGe={class:"sa-head"},vGe={class:"sa-title"},yGe={class:"sa-scroll"},kGe={class:"sa-page"},bGe={class:"sa-subtitle"},AGe={class:"sa-f-label"},CGe={class:"sa-f-label"},wGe={class:"sa-f-label"},xGe={class:"sa-f-actions"},SGe=Qe({__name:"SessionAdminView",props:{batchRunning:{}},emits:["archiveSessions","restoreSessions"],setup(e,{emit:t}){const{t:n}=Bt(),i=Kl(),s=t,o=L(()=>i.sessionAdminItems.value),r=L(()=>i.sessionAdminTotal.value),l=L(()=>i.sessionAdminLoading.value),a=L(()=>i.sessionAdminPage.value),u=L(()=>i.sessionAdminPageSize.value),c=L(()=>i.workspacesView.value.map(D=>({id:D.id,name:D.name}))),d={"3d":3,"7d":7,"30d":30};function f(D){if(D==="all")return"";const T=new Date;T.setDate(T.getDate()-d[D]);const N=O=>String(O).padStart(2,"0");return`${T.getFullYear()}-${N(T.getMonth()+1)}-${N(T.getDate())}`}function h(D){for(const T of["3d","7d","30d"])if(f(T)===D)return T;return"all"}const g=G([]),m=G("all"),y=G("all");function A(){const D=i.sessionAdminFilters.value;g.value=[...D.workspaceIds],m.value=D.status,y.value=D.updatedFrom===""?h(D.updatedTo):"all"}A(),qe(()=>i.mainView.value,D=>{D==="sessionAdmin"&&A()});function b(){i.applySessionAdminFilters({workspaceIds:[...g.value],status:m.value,updatedFrom:"",updatedTo:f(y.value)})}function C(){g.value=[],m.value="all",y.value="all",i.applySessionAdminFilters({workspaceIds:[],status:"all",updatedFrom:"",updatedTo:""})}const v=G(null),x=G(null),S=G(null),_=L(()=>v.value?.open===!0||x.value?.open===!0||S.value?.open===!0);function I(){_.value||b()}const M=L(()=>[{value:"all",label:n("admin.statusAll")},{value:"open",label:n("admin.statusOpen"),dot:"open"},{value:"done",label:n("admin.statusDone"),dot:"done"}]),$=L(()=>[{value:"all",label:n("admin.timeAll")},{value:"3d",label:n("admin.timeDaysAgo",{n:3})},{value:"7d",label:n("admin.timeDaysAgo",{n:7})},{value:"30d",label:n("admin.timeDaysAgo",{n:30})}]);return(D,T)=>(k(),E("section",{class:Fe(["con session-admin",{"macos-desktop":p(Gu)}])},[w("header",mGe,[K(p(kn),{text:p(n)("admin.back")},{default:he(()=>[K(p(tn),{size:"sm",label:p(n)("admin.back"),onClick:T[0]||(T[0]=N=>p(i).closeSessionAdmin())},{default:he(()=>[K(p(ve),{name:"chevron-left"})]),_:1},8,["label"])]),_:1},8,["text"]),w("h1",vGe,F(p(n)("admin.title")),1)]),w("div",yGe,[w("div",kGe,[w("p",bGe,F(p(n)("admin.subtitle")),1),w("div",{class:"sa-filters",onKeydown:_s(I,["enter"])},[w("span",AGe,F(p(n)("admin.filterWorkspace")),1),K(xZe,{ref_key:"wsMenuRef",ref:v,modelValue:g.value,"onUpdate:modelValue":T[1]||(T[1]=N=>g.value=N),options:c.value,"aria-label":p(n)("admin.filterWorkspace")},null,8,["modelValue","options","aria-label"]),w("span",CGe,F(p(n)("admin.filterStatus")),1),K(n5,{ref_key:"statusSelectRef",ref:x,modelValue:m.value,"onUpdate:modelValue":T[2]||(T[2]=N=>m.value=N),options:M.value,"aria-label":p(n)("admin.filterStatus")},null,8,["modelValue","options","aria-label"]),w("span",wGe,F(p(n)("admin.filterTime")),1),K(n5,{ref_key:"timeSelectRef",ref:S,modelValue:y.value,"onUpdate:modelValue":T[3]||(T[3]=N=>y.value=N),options:$.value,"aria-label":p(n)("admin.filterTime")},null,8,["modelValue","options","aria-label"]),w("div",xGe,[K(p(Zt),{variant:"primary",size:"sm",onClick:b},{default:he(()=>[$e(F(p(n)("admin.query")),1)]),_:1}),K(p(Zt),{variant:"ghost",size:"sm",onClick:C},{default:he(()=>[$e(F(p(n)("admin.reset")),1)]),_:1})])],32),K(sGe,{items:o.value,total:r.value,loading:l.value,workspaces:p(i).workspacesView.value,"batch-running":e.batchRunning,onArchiveSessions:T[4]||(T[4]=N=>s("archiveSessions",N)),onRestoreSessions:T[5]||(T[5]=N=>s("restoreSessions",N))},null,8,["items","total","loading","workspaces","batch-running"]),K(gGe,{page:a.value,"page-size":u.value,total:r.value,"onUpdate:page":T[6]||(T[6]=N=>p(i).setSessionAdminPage(N)),"onUpdate:pageSize":T[7]||(T[7]=N=>p(i).setSessionAdminPageSize(N))},null,8,["page","page-size","total"])])])],2))}}),_Ge=gt(SGe,[["__scopeId","data-v-01565f3a"]]);function eL(e,t){return t.succeeded===0?null:{direction:e,ids:t.okIds,succeeded:t.succeeded,failed:t.failed}}function IGe(e){return e==="archive"?"restore":"archive"}const MGe={key:0,class:"fp-empty fp-error"},EGe={key:1,class:"fp-empty"},TGe={key:2,class:"fp-loading"},LGe={class:"fp-path"},NGe={class:"fp-meta"},FGe={key:0,class:"fp-lines"},DGe={class:"fp-size"},$Ge={key:3,class:"fp-search"},BGe=["placeholder"],zGe={key:0,class:"fp-search-count"},RGe=["href","aria-label"],OGe={key:1,class:"fp-code"},PGe={key:1,class:"fp-body fp-code"},jGe={key:2,class:"fp-body"},HGe=["srcdoc","title"],WGe={key:1,class:"fp-code"},qGe={key:3,class:"fp-body fp-pdf-wrap"},UGe=["src","title"],KGe={key:1,class:"fp-binary-card"},VGe={class:"fp-binary-label"},ZGe={key:4,class:"fp-body fp-table-wrap"},GGe={class:"fp-table"},QGe=["data-line"],YGe={key:5,class:"fp-body fp-image-wrap"},JGe=["src","alt"],XGe={key:1,class:"fp-binary-card"},eQe={class:"fp-binary-icon"},tQe={class:"fp-binary-label"},nQe={key:6,class:"fp-body fp-code"},iQe={key:7,class:"fp-body fp-binary-wrap"},sQe={class:"fp-binary-card"},oQe={class:"fp-binary-icon"},rQe={class:"fp-binary-label"},lQe=Qe({__name:"FilePreview",props:{file:{},loading:{type:Boolean},error:{},line:{},downloadUrl:{},closable:{type:Boolean},externalActions:{type:Boolean},openFile:{type:Function}},emits:["close","openExternal","reveal"],setup(e,{emit:t}){const{t:n}=Bt(),i=cn("resolveImage",async re=>re),s=L(()=>Koe(u.file?.path??""));function o(re){if(/^(https?:|data:|blob:)/i.test(re)||re.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(re)||re.startsWith("\\\\"))return re;const fe=s.value;return fe?Qx(re,fe):re}async function r(re){const fe=o(re);return i?i(fe):fe}Kn("resolveImage",r);function l(re){return re.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(re)||re.startsWith("\\\\")?re:Qx(re,s.value)}function a(re){const fe=l(re.path);return fe===re.path?re:{...re,path:fe}}const u=e,c=t;function d(re){u.openFile?.(a(re))}const f=G(null),h=L(()=>{const re=u.file;if(!re)return"binary";const fe=re.mime??"",Ee=re.languageId??"",X=re.path.toLowerCase();return fe==="text/markdown"||Ee==="markdown"||Ee==="md"||X.endsWith(".mdx")?"markdown":fe==="application/json"||Ee==="json"?"json":fe==="text/html"||Ee==="html"||X.endsWith(".html")||X.endsWith(".htm")?"html":fe==="application/pdf"||X.endsWith(".pdf")?"pdf":fe==="text/csv"||Ee==="csv"||X.endsWith(".csv")?"csv":fe.startsWith("image/")?"image":re.isBinary?"binary":fe.startsWith("text/")||Ee!==""?"text":"binary"});function g(re){const fe=atob(re),Ee=Uint8Array.from(fe,X=>X.charCodeAt(0));return new TextDecoder().decode(Ee)}const m=L(()=>{const re=u.file;if(!re)return"";if(re.encoding==="base64")try{return g(re.content)}catch{return re.content}return re.content}),y=L(()=>{if(h.value!=="json"||!u.file)return"";try{return JSON.stringify(JSON.parse(m.value),null,2)}catch{return m.value}}),A=L(()=>u.file?(h.value==="json"?y.value:m.value).split(` +`):[]),b=L(()=>u.file?h.value==="json"?y.value:m.value:""),C=L(()=>A.value.map((re,fe)=>fe+1)),v=L(()=>u.file&&b.value.length<=lb?u.file.path:void 0),x=G(""),S=G(0),_=L(()=>{const re=x.value.trim().toLowerCase();if(!re)return[];const fe=[];return A.value.forEach((Ee,X)=>{Ee.toLowerCase().includes(re)&&fe.push(X+1)}),fe});qe(x,()=>{S.value=0});function I(re,fe=!1){re&&kt(()=>{const Ee=f.value?.querySelector(".fp-body"),X=Ee?.querySelector(`[data-line="${re}"]`);if(!Ee||!X)return;fe&&(Ee.scrollTop=0);const we=Ee.getBoundingClientRect(),Y=X.getBoundingClientRect(),le=Y.top-we.top+Ee.scrollTop;Ee.scrollTop=le-Ee.clientHeight/2+Y.height/2})}qe(()=>[u.file?.path,u.line],()=>I(u.line,!0),{immediate:!0});function M(re){const fe=_.value;fe.length!==0&&(S.value=(S.value+re+fe.length)%fe.length,I(fe[S.value]))}function $(re){const fe=_.value;return{target:u.line===re,hit:fe.includes(re),active:fe[S.value]===re}}function D(re){return re<1024?`${re} B`:re<1024*1024?`${(re/1024).toFixed(1)} KB`:`${(re/(1024*1024)).toFixed(1)} MB`}const T=G(!1),N=G(!1);function O(){u.file&&ao(b.value).then(re=>{re&&(T.value=!0,setTimeout(()=>{T.value=!1},1400))})}function P(){u.file&&ao(u.file.path).then(re=>{re&&(N.value=!0,setTimeout(()=>{N.value=!1},1400))})}const R=G("preview"),q=G("preview"),j=G("fit");function W(re){R.value=re}function z(re){q.value=re}function H(re){j.value=re}qe(h,re=>{R.value=re==="html"?"preview":"source",q.value="preview",j.value="fit"});const ee=L(()=>{const re=u.file;return!re||h.value!=="image"?null:re.encoding==="base64"?`data:${re.mime};base64,${re.content}`:re.mime==="image/svg+xml"?`data:${re.mime};charset=utf-8,${encodeURIComponent(re.content)}`:null}),V=L(()=>{const re=u.file;return!re||h.value!=="pdf"?null:u.downloadUrl?u.downloadUrl:re.encoding==="base64"?`data:${re.mime};base64,${re.content}`:null}),ie=L(()=>u.file?["<!doctype html>",'<meta charset="utf-8">',`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: blob:; style-src 'unsafe-inline'; font-src data:;">`,m.value].join(""):"");function se(re){const fe=[];let Ee="",X=!1;for(let we=0;we<re.length;we++){const Y=re[we];Y==='"'&&re[we+1]==='"'?(Ee+='"',we++):Y==='"'?X=!X:Y===","&&!X?(fe.push(Ee),Ee=""):Ee+=Y}return fe.push(Ee),fe}const Z=L(()=>A.value.slice(0,200).map(se));function pe(re,fe=55){return!re||re.length<=fe?re:"…"+re.slice(re.length-fe+1)}return(re,fe)=>(k(),E("div",{ref_key:"rootRef",ref:f,class:"file-preview"},[e.error&&!e.loading?(k(),E("div",MGe,[w("span",null,F(e.error),1),e.closable?(k(),de(p(Zt),{key:0,variant:"secondary",size:"sm",onClick:fe[0]||(fe[0]=Ee=>c("close"))},{default:he(()=>[$e(F(p(n)("filePreview.close")),1)]),_:1})):te("",!0)])):!e.file&&!e.loading?(k(),E("div",EGe,F(p(n)("filePreview.empty")),1)):e.loading?(k(),E("div",TGe,[fe[7]||(fe[7]=w("span",{class:"spinner"},null,-1)),w("span",null,F(p(n)("filePreview.loading")),1)])):e.file?(k(),E(Te,{key:3},[K(p(Pd),{wrap:"",title:p(n)("common.preview"),closable:e.closable,"close-label":p(n)("filePreview.close"),onClose:fe[6]||(fe[6]=Ee=>c("close"))},{default:he(()=>[K(p(kn),{text:e.file.path},{default:he(()=>[w("span",LGe,F(pe(e.file.path)),1)]),_:1},8,["text"]),w("span",NGe,[e.file.lineCount?(k(),E("span",FGe,F(p(n)("filePreview.lineCount",{count:e.file.lineCount})),1)):te("",!0),w("span",DGe,F(D(e.file.size)),1)]),h.value==="html"?(k(),de(p(Mo),{key:0,"model-value":R.value,size:"sm",options:[{value:"preview",label:p(n)("filePreview.preview")},{value:"source",label:p(n)("filePreview.source")}],"onUpdate:modelValue":W},null,8,["model-value","options"])):te("",!0),h.value==="markdown"?(k(),de(p(Mo),{key:1,"model-value":q.value,size:"sm",options:[{value:"preview",label:p(n)("filePreview.preview")},{value:"source",label:p(n)("filePreview.source")}],"onUpdate:modelValue":z},null,8,["model-value","options"])):te("",!0),h.value==="image"?(k(),de(p(Mo),{key:2,"model-value":j.value,size:"sm",options:[{value:"fit",label:p(n)("filePreview.fit")},{value:"actual",label:p(n)("filePreview.actual")}],"onUpdate:modelValue":H},null,8,["model-value","options"])):te("",!0),h.value==="text"||h.value==="json"||h.value==="html"||h.value==="csv"?(k(),E("div",$Ge,[$n(w("input",{"onUpdate:modelValue":fe[1]||(fe[1]=Ee=>x.value=Ee),class:"fp-search-input",type:"search",placeholder:p(n)("filePreview.search")},null,8,BGe),[[uo,x.value]]),x.value.trim()?(k(),E("span",zGe,F(_.value.length),1)):te("",!0),K(p(tn),{size:"sm",disabled:_.value.length===0,label:p(n)("filePreview.prevMatch"),tooltip:p(n)("filePreview.prevMatch"),onClick:fe[2]||(fe[2]=Ee=>M(-1))},{default:he(()=>[K(p(ve),{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label","tooltip"]),K(p(tn),{size:"sm",disabled:_.value.length===0,label:p(n)("filePreview.nextMatch"),tooltip:p(n)("filePreview.nextMatch"),onClick:fe[3]||(fe[3]=Ee=>M(1))},{default:he(()=>[K(p(ve),{name:"arrow-down",size:"md"})]),_:1},8,["disabled","label","tooltip"])])):te("",!0),K(p(tn),{size:"sm",class:Fe({copied:N.value}),label:N.value?p(n)("filePreview.copied"):p(n)("filePreview.copyPath"),tooltip:N.value?p(n)("filePreview.copied"):p(n)("filePreview.copyPath"),onClick:P},{default:he(()=>[N.value?(k(),de(p(ve),{key:1,class:"fp-check",name:"check",size:"md"})):(k(),de(p(ve),{key:0,name:"link",size:"md"}))]),_:1},8,["class","label","tooltip"]),e.externalActions?(k(),de(p(tn),{key:4,size:"sm",label:p(n)("filePreview.openInEditor"),tooltip:p(n)("filePreview.openInEditor"),onClick:fe[4]||(fe[4]=Ee=>c("openExternal"))},{default:he(()=>[K(p(ve),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),e.externalActions?(k(),de(p(tn),{key:5,size:"sm",label:p(n)("filePreview.reveal"),tooltip:p(n)("filePreview.reveal"),onClick:fe[5]||(fe[5]=Ee=>c("reveal"))},{default:he(()=>[K(p(ve),{name:"folder",size:"md"})]),_:1},8,["label","tooltip"])):te("",!0),e.downloadUrl?(k(),de(p(kn),{key:6,text:p(n)("filePreview.download")},{default:he(()=>[w("a",{class:"fp-download",href:e.downloadUrl,target:"_blank",rel:"noreferrer",download:"","aria-label":p(n)("filePreview.download")},[K(p(ve),{name:"download",size:"md"})],8,RGe)]),_:1},8,["text"])):te("",!0),!e.file.isBinary&&h.value!=="image"?(k(),de(p(tn),{key:7,size:"sm",class:Fe({copied:T.value}),label:T.value?p(n)("filePreview.copied"):p(n)("filePreview.copy"),tooltip:T.value?p(n)("filePreview.copied"):p(n)("filePreview.copy"),onClick:O},{default:he(()=>[T.value?(k(),de(p(ve),{key:1,class:"fp-check",name:"check",size:"md"})):(k(),de(p(ve),{key:0,name:"copy",size:"md"}))]),_:1},8,["class","label","tooltip"])):te("",!0)]),_:1},8,["title","closable","close-label"]),h.value==="markdown"?(k(),E("div",{key:0,class:Fe(["fp-body",{"fp-markdown":q.value==="preview"}])},[q.value==="preview"?(k(),de(p(lu),{key:e.file?.path,text:m.value,"open-file":u.openFile?d:void 0,"resolve-mention-path":l},null,8,["text","open-file"])):(k(),E("div",OGe,[K($l,{code:A.value,path:v.value,"line-numbers":C.value,framed:!1,"line-class":$},null,8,["code","path","line-numbers"])]))],2)):h.value==="json"?(k(),E("div",PGe,[K($l,{code:A.value,path:v.value,"line-numbers":C.value,framed:!1,"line-class":$},null,8,["code","path","line-numbers"])])):h.value==="html"?(k(),E("div",jGe,[R.value==="preview"?(k(),E("iframe",{key:0,class:"fp-html-frame",sandbox:"",srcdoc:ie.value,title:e.file.path},null,8,HGe)):(k(),E("div",WGe,[K($l,{code:A.value,path:v.value,"line-numbers":C.value,framed:!1,"line-class":$},null,8,["code","path","line-numbers"])]))])):h.value==="pdf"?(k(),E("div",qGe,[V.value?(k(),E("iframe",{key:0,class:"fp-pdf-frame",src:V.value,title:e.file.path},null,8,UGe)):(k(),E("div",KGe,[w("span",VGe,F(p(n)("filePreview.pdfNoPreview")),1)]))])):h.value==="csv"?(k(),E("div",ZGe,[w("table",GGe,[w("tbody",null,[(k(!0),E(Te,null,ht(Z.value,(Ee,X)=>(k(),E("tr",{key:X,class:Fe($(X+1)),"data-line":X+1},[w("th",null,F(X+1),1),(k(!0),E(Te,null,ht(Ee,(we,Y)=>(k(),E("td",{key:Y},F(we),1))),128))],10,QGe))),128))])])])):h.value==="image"?(k(),E("div",YGe,[ee.value?(k(),E("img",{key:0,src:ee.value,alt:e.file.path,class:Fe(["fp-image",{actual:j.value==="actual"}])},null,10,JGe)):(k(),E("div",XGe,[w("span",eQe,[K(p(ve),{name:"image-off",size:"lg"})]),w("span",tQe,F(p(n)("filePreview.imageNoPreview",{mime:e.file.mime,size:D(e.file.size)})),1)]))])):h.value==="text"?(k(),E("div",nQe,[K($l,{code:A.value,path:v.value,"line-numbers":C.value,framed:!1,"line-class":$},null,8,["code","path","line-numbers"])])):(k(),E("div",iQe,[w("div",sQe,[w("span",oQe,[K(p(ve),{name:"file-off",size:"lg"})]),w("span",rQe,F(p(n)("filePreview.binaryNoPreview",{mime:e.file.mime||p(n)("filePreview.unknownType"),size:D(e.file.size)})),1)])]))],64)):te("",!0)],512))}}),aQe=gt(lQe,[["__scopeId","data-v-9a4f39c9"]]),uQe={class:"tp"},cQe=Qe({__name:"ThinkingPanel",props:{text:{},subtitle:{}},emits:["close"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=G(null);return qe(()=>n.text,()=>{const r=o.value;!r||!(r.scrollHeight-r.scrollTop-r.clientHeight<24)||kt(()=>{o.value&&(o.value.scrollTop=o.value.scrollHeight)})},{immediate:!0}),(r,l)=>(k(),E("div",uQe,[K(p(Pd),{title:p(s)("common.preview"),subtitle:e.subtitle??p(s)("thinking.panelTitle"),"close-label":p(s)("thinking.close"),onClose:l[0]||(l[0]=a=>i("close"))},null,8,["title","subtitle","close-label"]),w("pre",{ref_key:"bodyEl",ref:o,class:"tp-body"},F(e.text),513)]))}}),dQe=gt(cQe,[["__scopeId","data-v-afb1f46f"]]),fQe={class:"agent-panel"},hQe={key:0,class:"agent-fallback"},pQe={key:0,class:"agent-error"},gQe=Qe({__name:"AgentDetailPanel",props:{member:{},turns:{},running:{type:Boolean},loading:{type:Boolean},loadError:{type:Boolean},hasMore:{type:Boolean},loadingMore:{type:Boolean},loadMoreError:{type:Boolean}},emits:["close","loadOlderMessages","openAgent","openFile","openMedia","openTurnDiff"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=G(null),r=L(()=>{const Z=n.member.prompt?.trim(),pe=Z?`$ ${Z}`:null;return H.value.filter(re=>re!==Z&&re!==pe).join(` +`)});let l=null,a=0;function u(Z){const pe=Z==="command"?n.member.prompt:Z==="output"?r.value:[n.member.prompt?.trim(),r.value].filter(Boolean).join(` + +`);if(!pe)return;const re=a;ao(pe).then(fe=>{!fe||re!==a||(l!==null&&clearTimeout(l),o.value=Z,l=setTimeout(()=>{l=null,o.value=null},1400))})}const c=typeof window<"u"&&window.matchMedia?.("(hover: none)").matches,d=c?"lg":"md",f=c?"lg":"sm",h=G(!1),g=G(null),m=G(null),y=G({left:"0px",top:"0px"});function A(){return g.value?.$el??null}async function b(){if(h.value){C();return}h.value=!0,await kt(),I(),v(),window.addEventListener("mousedown",M,!0),window.addEventListener("keydown",$,!0),window.addEventListener("resize",I),window.addEventListener("scroll",I,!0)}function C(Z){h.value=!1,window.removeEventListener("mousedown",M,!0),window.removeEventListener("keydown",$,!0),window.removeEventListener("resize",I),window.removeEventListener("scroll",I,!0),Z?.refocus&&A()?.focus()}function v(){const Z=m.value;Z&&Z.querySelector(".ui-menu-item:not(:disabled)")?.focus()}function x(Z){const pe=Z.relatedTarget;pe&&(m.value?.contains(pe)||A()?.contains(pe))||C()}function S(){h.value||b()}function _(Z){if(Z.key!=="ArrowDown"&&Z.key!=="ArrowUp")return;Z.preventDefault();const pe=Array.from(m.value?.querySelectorAll(".ui-menu-item:not(:disabled)")??[]);if(pe.length===0)return;const re=pe.indexOf(document.activeElement),fe=Z.key==="ArrowDown"?(re+1)%pe.length:(re-1+pe.length)%pe.length;pe[fe]?.focus()}function I(){const Z=A();if(!Z)return;const pe=Z.getBoundingClientRect(),re=getComputedStyle(document.documentElement),fe=Number.parseFloat(re.getPropertyValue("--space-2"))||0,Ee=Number.parseFloat(re.getPropertyValue("--space-1"))||0,X=m.value?.offsetWidth??0,we=Math.max(fe,Math.min(pe.right-X,window.innerWidth-X-fe)),Y=m.value?.offsetHeight??0;pe.bottom+Ee+Y<=window.innerHeight-fe?y.value={left:`${we}px`,top:`${pe.bottom+Ee}px`}:y.value={left:`${we}px`,bottom:`${window.innerHeight-pe.top+Ee}px`}}function M(Z){const pe=Z.target;if(pe){if(m.value?.contains(pe)){Z.stopImmediatePropagation();return}A()?.contains(pe)||C()}}function $(Z){Z.key==="Escape"&&(Z.preventDefault(),Z.stopImmediatePropagation(),C({refocus:!0}))}function D(Z){u(Z),C({refocus:!0})}qe(_o,Z=>{Z>0&&h.value&&C()});const T=L(()=>n.member.id),{scroller:N,following:O,onScroll:P,pinScroll:R}=ghe(T);qe(T,()=>{C(),a++,l!==null&&clearTimeout(l),l=null,o.value=null});const q=G(!1);let j=null,W=null;function z(){j!==null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(j),W!==null&&clearTimeout(W),j=null,W=null}qe(T,()=>{q.value=!1,z();const Z=()=>{z(),q.value=!0};typeof requestAnimationFrame=="function"?j=requestAnimationFrame(()=>{j=requestAnimationFrame(Z)}):W=setTimeout(Z,32)},{immediate:!0}),Gn(()=>{z(),h.value&&C()});const H=L(()=>{const Z=new Set,pe=[],re=n.member.prompt?.trim(),fe=re?`$ ${re}`:null;for(const Ee of[n.member.prompt,n.member.suspendedReason,n.member.text,n.member.outputLines?.join(` +`),n.member.summary]){const X=Ee?.trim();!X||Z.has(X)||fe!==null&&X===fe||(Z.add(X),pe.push(X))}return pe});Kn("pinScroll",()=>{N.value&&R()});function ee(Z){switch(Z){case"queued":return s("tools.swarm.phaseQueued");case"working":return s("tools.swarm.phaseWorking");case"suspended":return s("tools.swarm.phaseSuspended");case"completed":return s("tools.swarm.phaseCompleted");case"failed":return s("tools.swarm.phaseFailed");case"cancelled":return s("tools.swarm.phaseCancelled")}}const V=cn("modelDisplay"),ie=cn("subagentEffort"),se=L(()=>{const Z=[n.member.subagentType,V?.(n.member.model),ie?.(n.member.thinkingEffort)].filter(pe=>!!pe);return Z.length>0?Z.join(" · "):void 0});return(Z,pe)=>(k(),E("div",fQe,[K(p(Pd),{title:e.member.name,subtitle:se.value,"close-label":p(s)("thinking.close"),onClose:pe[3]||(pe[3]=re=>i("close"))},{default:he(()=>[K(p(va),{variant:"neutral",size:"sm"},{default:he(()=>[$e(F(ee(e.member.phase)),1)]),_:1}),e.member.prompt||r.value?(k(),E(Te,{key:0},[K(p(tn),{ref_key:"copyTriggerRef",ref:g,size:p(f),class:Fe({"copy-menu-open":h.value}),label:p(s)("tasks.copy"),tooltip:p(s)("tasks.copy"),"aria-haspopup":"menu","aria-expanded":h.value,onClick:b,onKeydown:[_s(Ct(S,["prevent"]),["down"]),_s(Ct(S,["prevent"]),["up"])],onFocusout:x},{default:he(()=>[K(p(ve),{name:o.value?"check":"copy",size:"sm"},null,8,["name"])]),_:1},8,["size","class","label","tooltip","aria-expanded","onKeydown"]),(k(),de(Gr,{to:"body"},[h.value?(k(),E("div",{key:0,ref_key:"copyMenuBoxRef",ref:m,class:"copy-menu",style:qt(y.value),onKeydown:_,onFocusout:x},[K(p(sr),null,{default:he(()=>[e.member.prompt?(k(),de(p(Wt),{key:0,size:p(d),onClick:pe[0]||(pe[0]=re=>D("command"))},{default:he(()=>[K(p(ve),{name:"terminal",size:"sm"}),w("span",null,F(p(s)("tasks.copyCommand")),1)]),_:1},8,["size"])):te("",!0),K(p(Wt),{disabled:!r.value,size:p(d),onClick:pe[1]||(pe[1]=re=>D("output"))},{default:he(()=>[K(p(ve),{name:"file-text",size:"sm"}),w("span",null,F(p(s)("tasks.copyOutput")),1)]),_:1},8,["disabled","size"]),K(p(Wt),{separator:""}),K(p(Wt),{size:p(d),onClick:pe[2]||(pe[2]=re=>D("all"))},{default:he(()=>[K(p(ve),{name:"copy",size:"sm"}),w("span",null,F(p(s)("tasks.copyAll")),1)]),_:1},8,["size"])]),_:1})],36)):te("",!0)]))],64)):te("",!0)]),_:1},8,["title","subtitle","close-label"]),w("div",{ref_key:"scroller",ref:N,class:"agent-transcript",onScrollPassive:pe[9]||(pe[9]=(...re)=>p(P)&&p(P)(...re))},[q.value?(k(),E(Te,{key:0},[e.turns.length===0&&!e.loading&&(e.loadError||H.value.length>0)?(k(),E("div",hQe,[e.loadError?(k(),E("div",pQe,F(p(s)("tasks.transcriptLoadError")),1)):te("",!0),H.value.length>0?(k(),de(el,{key:1,lines:H.value},null,8,["lines"])):te("",!0)])):(k(),de(J7,{key:1,turns:e.turns,"turn-active":e.running,"session-loading":e.loading&&e.turns.length===0,"has-more-messages":e.hasMore,"loading-more":e.loadingMore,"loading-more-error":e.loadMoreError,"is-following":p(O),"read-only":"",inspector:"",onLoadOlderMessages:pe[4]||(pe[4]=re=>i("loadOlderMessages")),onOpenAgent:pe[5]||(pe[5]=re=>i("openAgent",re)),onOpenFile:pe[6]||(pe[6]=re=>i("openFile",re)),onOpenMedia:pe[7]||(pe[7]=re=>i("openMedia",re)),onOpenTurnDiff:pe[8]||(pe[8]=re=>i("openTurnDiff",re))},null,8,["turns","turn-active","session-loading","has-more-messages","loading-more","loading-more-error","is-following"]))],64)):te("",!0)],544)]))}}),mQe=gt(gQe,[["__scopeId","data-v-87af6ca2"]]),vQe={class:"sc"},yQe={key:0,class:"sc-empty"},kQe={key:2,class:"sc-loading"},bQe={class:"sc-composer"},AQe=["placeholder"],CQe=["disabled"],wQe=Qe({__name:"SideChatPanel",props:{turns:{},running:{type:Boolean},sending:{type:Boolean},title:{},subtitle:{},onSend:{type:Function}},emits:["close","openMedia"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>n.turns.find(S=>S.role==="user")?.text?.trim()??""),r=L(()=>n.title?.trim()||s("sideChat.title")),l=L(()=>n.subtitle?.trim()?n.subtitle.trim():o.value||s("sideChat.subtitle")),a=G(""),u=G(null),c=G(null),d=G(!1);async function f(){const x=a.value,S=x.trim();if(!(!S||d.value)){d.value=!0;try{if(!await n.onSend(S)||a.value!==x)return;a.value="",kt(()=>{u.value&&(u.value.style.height="auto"),h()})}finally{d.value=!1}}}function h(){const x=c.value;x&&(x.scrollTop=x.scrollHeight)}Kn("pinScroll",x=>{const S=c.value;if(!S)return;const _=x.getBoundingClientRect().top;requestAnimationFrame(()=>{S.scrollTop+=x.getBoundingClientRect().top-_})});const g=L(()=>{const x=n.turns;if(x.length===0)return"0";const S=x.at(-1),_=S.thinking?.length??0,I=S.tools?.reduce((M,$)=>M+$.name.length+($.arg?.length??0)+($.output?.join("").length??0),0)??0;return`${x.length}:${S.text.length}:${_}:${I}`});qe(g,async()=>{!n.running&&!n.sending||(await kt(),h())});const m=L(()=>n.sending?n.turns.at(-1)?.role==="user":!1),{handleCompositionStart:y,handleCompositionEnd:A,isComposingKeyEvent:b}=Xr();function C(x){x.key==="Enter"&&!x.shiftKey&&!b(x)&&(x.preventDefault(),f())}function v(){const x=u.value;x&&(x.style.height="auto",x.style.height=`${Math.min(x.scrollHeight,160)}px`)}return(x,S)=>(k(),E("div",vQe,[K(p(Pd),{title:r.value,subtitle:l.value,"close-label":p(s)("thinking.close"),onClose:S[0]||(S[0]=_=>i("close"))},null,8,["title","subtitle","close-label"]),w("div",{ref_key:"bodyRef",ref:c,class:"sc-body"},[e.turns.length===0?(k(),E("div",yQe,F(p(s)("sideChat.empty")),1)):(k(),de(J7,{key:1,turns:e.turns,approvals:[],"turn-active":e.running,working:e.sending||e.running,"turn-files-interactive":!1,onOpenMedia:S[1]||(S[1]=_=>i("openMedia",_))},null,8,["turns","turn-active","working"])),m.value?(k(),E("div",kQe,[K(bj,{label:p(s)("conversation.requesting")},null,8,["label"])])):te("",!0)],512),w("div",bQe,[$n(w("textarea",{ref_key:"inputRef",ref:u,"onUpdate:modelValue":S[2]||(S[2]=_=>a.value=_),class:"sc-input",rows:"1",placeholder:p(s)("sideChat.placeholder"),onInput:v,onKeydown:C,onCompositionstart:S[3]||(S[3]=(..._)=>p(y)&&p(y)(..._)),onCompositionend:S[4]||(S[4]=(..._)=>p(A)&&p(A)(..._))},null,40,AQe),[[uo,a.value]]),K(p(kn),{text:p(s)("sideChat.send")},{default:he(()=>[w("button",{type:"button",class:"sc-send",disabled:!a.value.trim(),onClick:f},[K(p(ve),{name:"arrow-right",size:"sm"})],8,CQe)]),_:1},8,["text"])])]))}}),xQe=gt(wQe,[["__scopeId","data-v-bb28a4e0"]]),SQe={class:"changes-pane"},_Qe={class:"dv-path"},IQe={class:"diff-head"},MQe={class:"back-label"},EQe={key:"loading",class:"empty-state diff-loading"},TQe={key:"lines",class:"dv-lines-wrap"},LQe={key:"empty",class:"empty-state"},NQe={class:"dv-change-count"},FQe={class:"ch-head"},DQe={class:"br-heading"},$Qe={class:"br-label"},BQe={class:"br-name"},zQe={key:0,class:"sync-info"},RQe={key:0,class:"ahead"},OQe={key:0,class:"behind"},PQe={key:1,class:"empty-head"},jQe={class:"ch-list-content"},HQe=["onClick"],WQe={class:"fpath"},qQe=["onClick"],UQe={class:"tree-name"},KQe=["onClick"],VQe={class:"tree-name"},ZQe={key:2,class:"empty-state"},GQe={class:"empty-state-icon","aria-hidden":"true"},QQe={key:3,class:"empty-state"},YQe=Qe({__name:"DiffView",props:{changes:{},gitInfo:{},fileDiff:{},fullTexts:{},emptyFile:{type:Boolean},selectedDiffPath:{},fileDiffLoading:{type:Boolean},mode:{default:"full"},hideBack:{type:Boolean,default:!1},closable:{type:Boolean,default:!0}},emits:["open","back","close"],setup(e,{emit:t}){const{t:n}=Bt();function i(N){return n(N===1?"diff.fileCountOne":"diff.fileCountOther",{number:N})}const s=e,o=t;function r(N){const O=N.toLowerCase();return O==="modified"?"modified":O==="added"?"added":O==="deleted"?"deleted":O==="renamed"?"renamed":O==="untracked"?"untracked":O==="conflicted"?"conflicted":O==="ignored"?"ignored":O==="clean"?"clean":"unknown"}const l={modified:"M",added:"+",deleted:"−",renamed:"→",untracked:"+",conflicted:"C",ignored:"I",clean:"·",unknown:"?"};function a(N){return l[r(N)]??"?"}function u(N,O=60){return N.length<=O?N:"…"+N.slice(N.length-O+1)}const c=L(()=>s.gitInfo!==null),d=L(()=>s.changes.length>0),f=L(()=>(s.selectedDiffPath??null)!==null),h=L(()=>s.mode==="detail"||s.mode==="full"&&f.value),g=L(()=>s.fileDiff??[]),m=L(()=>s.fileDiffLoading===!0);function y(N){o("open",N)}function A(){o("back")}function b(){o("close")}const C=G("list");function v(N){C.value=N}function x(N){const O={children:[]},P=[...N].sort((R,q)=>R.path.localeCompare(q.path));for(const R of P){const q=R.path.endsWith("/"),j=R.path.split("/").filter(Boolean);if(j.length===0)continue;let W=O;for(let z=0;z<j.length;z++){const H=j[z],ee=z===j.length-1&&!q,V=j.slice(0,z+1).join("/");let ie=W.children.find(se=>se.name===H&&se.kind===(ee?"file":"folder"));ie||(ie={name:H,path:V,kind:ee?"file":"folder",status:ee?R.status:void 0,children:[]},W.children.push(ie)),W=ie}}return O.children}const S=L(()=>x(s.changes)),_=G(new Set);function I(N){return!_.value.has(N)}const M=L(()=>{const N=[];function O(P,R){for(const q of P)N.push({node:q,depth:R}),q.kind==="folder"&&I(q.path)&&O(q.children,R+1)}return O(S.value,0),N});function $(N){const O=new Set(_.value);O.has(N.path)?O.delete(N.path):O.add(N.path),_.value=O}function D(N){return`calc(var(--tree-base-indent) + ${N} * var(--tree-indent-step))`}function T(N){return{paddingLeft:D(N),"--tree-depth":String(N)}}return(N,O)=>(k(),E("div",SQe,[h.value?(k(),E(Te,{key:0},[K(p(Pd),{title:p(n)("diff.title"),closable:e.closable,"close-label":p(n)("diff.close"),onClose:b},{default:he(()=>[K(p(kn),{text:e.selectedDiffPath??""},{default:he(()=>[w("span",_Qe,F(u(e.selectedDiffPath??"",50)),1)]),_:1},8,["text"])]),_:1},8,["title","closable","close-label"]),w("div",IQe,[e.hideBack?te("",!0):(k(),de(p(Zt),{key:0,variant:"ghost",size:"sm",onClick:A},{default:he(()=>[K(p(ve),{name:"arrow-left",size:"sm"}),w("span",MQe,F(p(n)("diff.back")),1)]),_:1}))]),K(ls,{name:"diff-content",mode:"out-in"},{default:he(()=>[m.value?(k(),E("div",EQe,[K(p(Mi),{size:"md"}),w("span",null,F(p(n)("diff.loading")),1)])):g.value.length>0?(k(),E("div",TQe,[K($l,{lines:g.value,path:e.selectedDiffPath??void 0,"line-numbers":"",framed:!1,"full-texts":e.fullTexts??null},null,8,["lines","path","full-texts"])])):(k(),E("div",LQe,F(e.emptyFile?p(n)("diff.emptyFile"):p(n)("diff.noDiff")),1))]),_:1})],64)):(k(),E(Te,{key:1},[K(p(Pd),{title:p(n)("diff.title"),closable:e.closable,"close-label":p(n)("diff.close"),onClose:b},{default:he(()=>[w("span",NQe,F(i(e.changes.length)),1),K(p(Mo),{"model-value":C.value,size:"sm",options:[{value:"list",label:p(n)("diff.list"),icon:"list"},{value:"tree",label:p(n)("diff.tree"),icon:"tree-view"}],"onUpdate:modelValue":v},null,8,["model-value","options"])]),_:1},8,["title","closable","close-label"]),w("div",FQe,[c.value?(k(),E(Te,{key:0},[w("span",DQe,[K(p(ve),{class:"br-icon",name:"git-fork",size:"sm"}),w("span",$Qe,F(p(n)("diff.branch")),1)]),w("span",BQe,F(e.gitInfo.branch),1),e.gitInfo.ahead>0||e.gitInfo.behind>0?(k(),E("span",zQe,[K(p(kn),{text:p(n)("diff.aheadTitle")},{default:he(()=>[e.gitInfo.ahead>0?(k(),E("span",RQe,"↑"+F(e.gitInfo.ahead),1)):te("",!0)]),_:1},8,["text"]),K(p(kn),{text:p(n)("diff.behindTitle")},{default:he(()=>[e.gitInfo.behind>0?(k(),E("span",OQe,"↓"+F(e.gitInfo.behind),1)):te("",!0)]),_:1},8,["text"])])):te("",!0)],64)):(k(),E("span",PQe,F(p(n)("diff.empty")),1))]),d.value&&C.value==="list"?(k(),de(p($w),{key:0,class:"ch-list"},{default:he(()=>[w("div",jQe,[(k(!0),E(Te,null,ht(e.changes,P=>(k(),de(p(kn),{key:P.path,text:P.path},{default:he(()=>[w("button",{type:"button",class:"ch-row",onClick:R=>y(P.path)},[w("span",{class:Fe(["badge",r(P.status)])},F(a(P.status)),3),w("span",WQe,F(u(P.path)),1)],8,HQe)]),_:2},1032,["text"]))),128))])]),_:1})):d.value&&C.value==="tree"?(k(),de(p($w),{key:1,class:"ch-list ch-tree"},{default:he(()=>[K(EN,{name:"tree-collapse",tag:"ul",class:"tree-list ch-list-content"},{default:he(()=>[(k(!0),E(Te,null,ht(M.value,({node:P,depth:R})=>(k(),E("li",{key:P.path,class:"tree-node"},[P.kind==="folder"?(k(),E("button",{key:0,type:"button",class:"tree-row tree-folder",style:qt(T(R)),onClick:q=>$(P)},[K(p(ve),{class:"tree-icon",name:"folder-solid",size:"sm"}),w("span",UQe,F(P.name),1)],12,qQe)):(k(),de(p(kn),{key:1,text:P.path},{default:he(()=>[w("button",{type:"button",class:"tree-row tree-file",style:qt(T(R)),onClick:q=>y(P.path)},[w("span",{class:Fe(["badge",r(P.status)])},F(a(P.status)),3),w("span",VQe,F(P.name),1)],12,KQe)]),_:2},1032,["text"]))]))),128))]),_:1})]),_:1})):c.value?(k(),E("div",ZQe,[w("span",GQe,[K(p(ve),{name:"check",size:"lg"})]),$e(" "+F(p(n)("diff.clean")),1)])):(k(),E("div",QQe,F(p(n)("diff.empty")),1))],64))]))}}),JQe=gt(YQe,[["__scopeId","data-v-7d5ab9c7"]]),XQe={class:"td"},eYe={class:"td-path"},tYe={class:"td-body"},nYe={key:1,class:"td-empty"},iYe=Qe({__name:"TurnDiffPanel",props:{change:{},cwd:{},closable:{type:Boolean}},emits:["close","openFile"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=L(()=>{const a=n.cwd?Wy(n.change.path,n.cwd):null;return r(a??n.change.path)});function r(a,u=48){return!a||a.length<=u?a:"…"+a.slice(a.length-u+1)}const l=L(()=>n.change.diff!==null&&n.change.diff.length>0);return(a,u)=>(k(),E("div",XQe,[K(p(Pd),{title:p(s)("conversation.turnFiles.diffTitle"),closable:e.closable,"close-label":p(s)("filePreview.close"),onClose:u[1]||(u[1]=c=>i("close"))},{default:he(()=>[K(p(kn),{text:e.change.path},{default:he(()=>[w("span",eYe,F(o.value),1)]),_:1},8,["text"]),K(p(tn),{size:"sm",label:p(s)("conversation.turnFiles.openFile"),tooltip:p(s)("conversation.turnFiles.openFile"),onClick:u[0]||(u[0]=c=>i("openFile",e.change.path))},{default:he(()=>[K(p(ve),{name:"external-link",size:"md"})]),_:1},8,["label","tooltip"])]),_:1},8,["title","closable","close-label"]),w("div",tYe,[l.value?(k(),de($l,{key:0,lines:e.change.diff,path:e.change.path,framed:!1},null,8,["lines","path"])):(k(),E("div",nYe,[w("p",null,F(p(s)("conversation.turnFiles.diffUnavailable")),1),K(p(Zt),{variant:"ghost",size:"sm",onClick:u[2]||(u[2]=c=>i("openFile",e.change.path))},{default:he(()=>[$e(F(p(s)("conversation.turnFiles.openFile")),1)]),_:1})]))])]))}}),sYe=gt(iYe,[["__scopeId","data-v-fdd0bc05"]]);function Mj(e,t){let n=null;mn(()=>{n=typeof document<"u"&&document.activeElement instanceof HTMLElement?document.activeElement:null,kt(()=>{const i=t?.value??e.value;try{i?.focus()}catch{}})}),Gn(()=>{const i=n;if(n=null,!(!i||typeof document>"u"||!document.contains(i)))try{i.focus()}catch{}})}const oYe={class:"search-wrap"},rYe=["aria-label"],lYe=["aria-label"],aYe=["aria-pressed","onClick"],uYe={key:1,class:"state-row"},cYe={key:2,class:"state-row unavail"},dYe=["aria-label"],fYe=["aria-selected","onClick","onMouseenter"],hYe={class:"model-main"},pYe={class:"model-name"},gYe={class:"model-meta"},mYe={class:"model-side"},vYe={key:0,class:"empty"},yYe={class:"footer-hint","aria-hidden":"true"},kYe=Qe({__name:"ModelPicker",props:{models:{},current:{},starredIds:{},loading:{type:Boolean},unavailable:{type:Boolean}},emits:["select","toggle-star","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=L(()=>new Set(i.starredIds??[]));function r(D){return o.value.has(D)}const l=G(""),a=G(null),u=G(null),c=G(null),d=G("all"),f={image_in:"model.capabilityImageInput",video_in:"model.capabilityVideoInput",tool_use:"model.capabilityToolUse",thinking:"model.capabilityThinking",always_thinking:"model.capabilityAlwaysThinking"};function h(D){const T=f[D];return T?n(T):D.replaceAll("_"," ")}function g(D){const T=[D.provider,n("model.contextSuffix",{size:ou(D.maxContextSize)})];for(const N of D.capabilities??[])T.push(h(N));return T.join(" · ")}Mj(u,a);const m=L(()=>{const D=new Set,T=[{id:"all",label:n("model.allTab")}];for(const N of i.models)D.has(N.provider)||(D.add(N.provider),T.push({id:N.provider,label:N.provider}));return T}),y=L(()=>{const D=l.value.toLowerCase().trim(),T=i.models.filter(N=>{if(d.value!=="all"&&N.provider!==d.value)return!1;const O=(N.displayName??N.model).toLowerCase().includes(D),P=N.provider.toLowerCase().includes(D),R=N.id.toLowerCase().includes(D);return!D||O||P||R});return d.value!=="all"?T:T.sort((N,O)=>{const P=r(N.id)?1:0;return(r(O.id)?1:0)-P})}),A=L(()=>y.value),b=G(0);qe([l,d],()=>{b.value=0}),qe(m,D=>{D.some(T=>T.id===d.value)||(d.value="all")}),qe(A,D=>{b.value=Math.min(b.value,Math.max(D.length-1,0))}),qe(b,async()=>{await kt(),c.value?.querySelector(".model-row.is-selected")?.scrollIntoView({block:"nearest"})});const{handleCompositionStart:C,handleCompositionEnd:v,isComposingKeyEvent:x}=Xr();function S(D){if(!x(D)){if(D.key==="Escape"){s("close");return}if(D.key==="ArrowDown")D.preventDefault(),b.value=Math.min(b.value+1,A.value.length-1);else if(D.key==="ArrowUp")D.preventDefault(),b.value=Math.max(b.value-1,0);else if(D.key==="Enter"){const T=A.value[b.value];T&&s("select",T.id)}}}mn(()=>{document.addEventListener("keydown",S)}),Mn(()=>{document.removeEventListener("keydown",S)});function _(D){s("select",D)}function I(){l.value="",a.value?.focus()}function M(D){return A.value.indexOf(D)}function $(D){d.value=D}return(D,T)=>(k(),de(p(bc),{open:!0,"close-on-esc":!1,title:p(n)("model.title"),size:"lg",height:"fixed",padded:!1,onClose:T[1]||(T[1]=N=>s("close"))},{default:he(()=>[w("div",{ref_key:"dialogRef",ref:u,class:"mp"},[w("div",oYe,[K(p(wo),{ref_key:"searchRef",ref:a,modelValue:l.value,"onUpdate:modelValue":T[0]||(T[0]=N=>l.value=N),placeholder:p(n)("model.searchPlaceholder"),autocomplete:"off",spellcheck:"false",autofocus:"",onCompositionstart:p(C),onCompositionend:p(v)},null,8,["modelValue","placeholder","onCompositionstart","onCompositionend"]),K(p(kn),{text:p(n)("model.clearSearch")},{default:he(()=>[w("button",{type:"button",class:Fe(["search-clear",{"is-on":l.value.length>0}]),tabindex:"-1","aria-label":p(n)("model.clearSearch"),onClick:I},[K(p(ve),{name:"close",size:"sm"})],10,rYe)]),_:1},8,["text"])]),m.value.length>1?(k(),E("div",{key:0,class:"chip-strip","aria-label":p(n)("model.providerTabs")},[(k(!0),E(Te,null,ht(m.value,N=>(k(),E("button",{key:N.id,type:"button",class:Fe(["chip",{"is-active":N.id===d.value}]),"aria-pressed":N.id===d.value,onClick:O=>$(N.id)},F(N.label),11,aYe))),128))],8,lYe)):te("",!0),e.loading?(k(),E("div",uYe,[K(p(Mi),{size:"sm"}),w("span",null,F(p(n)("model.loading")),1)])):e.unavailable?(k(),E("div",cYe,[K(p(ve),{name:"alert-triangle",size:"lg"}),w("span",null,F(p(n)("model.unavailable")),1)])):(k(),E("div",{key:3,ref_key:"listRef",ref:c,class:"model-list",role:"listbox","aria-label":p(n)("model.title")},[(k(!0),E(Te,null,ht(A.value,N=>(k(),E("div",{key:N.id,class:Fe(["model-row",{"is-current":N.id===e.current,"is-selected":M(N)===b.value}]),role:"option","aria-selected":N.id===e.current,onClick:O=>_(N.id),onMouseenter:O=>b.value=M(N)},[w("span",hYe,[w("span",pYe,F(N.displayName??N.model),1),w("span",gYe,F(g(N)),1)]),w("span",mYe,[N.id===e.current?(k(),de(p(ve),{key:0,class:"model-check",name:"check",size:"sm"})):te("",!0),K(p(tn),{class:Fe(["model-star",{"is-starred":r(N.id)}]),size:"sm",label:r(N.id)?p(n)("model.unstarTitle"):p(n)("model.starTitle"),tooltip:r(N.id)?p(n)("model.unstarTitle"):p(n)("model.starTitle"),onClick:Ct(O=>s("toggle-star",N.id),["stop"])},{default:he(()=>[r(N.id)?(k(),de(p(ve),{key:0,name:"star",size:"md"})):(k(),de(p(ve),{key:1,name:"star-outline",size:"md"}))]),_:2},1032,["class","label","tooltip","onClick"])])],42,fYe))),128)),A.value.length===0?(k(),E("div",vYe,F(i.models.length===0?p(n)("model.emptyNoModels"):p(n)("model.emptyNoMatch")),1)):te("",!0)],8,dYe)),w("div",yYe,[K(p(Ja),{keys:["↑","↓"]}),w("span",null,F(p(n)("model.hintNavigate")),1),T[2]||(T[2]=w("span",{class:"hint-dot"},"·",-1)),K(p(Ja),{keys:["Enter"]}),w("span",null,F(p(n)("model.hintSelect")),1),T[3]||(T[3]=w("span",{class:"hint-dot"},"·",-1)),K(p(Ja),{keys:["Esc"]}),w("span",null,F(p(n)("model.hintClose")),1)])],512)]),_:1},8,["title"]))}}),bYe=gt(kYe,[["__scopeId","data-v-3ba22330"]]),AYe={key:0,class:"center-body"},CYe={class:"center-text"},wYe={key:1,class:"nb"},xYe={class:"nb-lead"},SYe=["href"],_Ye={class:"nb-code-row"},IYe=["title"],MYe={class:"nb-status"},EYe={class:"nb-status-text"},TYe={class:"nb-countdown"},LYe={key:2,class:"center-body"},NYe={class:"center-text success-text"},FYe={class:"center-hint"},DYe={class:"center-body"},$Ye={class:"center-text err-text"},BYe={class:"center-hint"},zYe={class:"actions"},RYe={class:"center-body"},OYe={class:"center-text warn-text"},PYe={class:"center-hint"},jYe={class:"actions"},HYe=Qe({__name:"LoginDialog",props:{onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["success","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=G(!0),s=t,o=e,{step:r,pollError:l,flow:a,secondsLeft:u,startFlow:c,cancelFlow:d}=gB({onStartOAuthLogin:o.onStartOAuthLogin,onPollOAuthLogin:o.onPollOAuthLogin,onCancelOAuthLogin:o.onCancelOAuthLogin,onSuccess:()=>{s("success"),s("close")}}),f=G(!1);mn(async()=>{await c()});async function h(){!a.value||!await ao(a.value.verificationUriComplete)||(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}async function g(){d(),s("close")}function m(y){const A=Math.floor(y/60),b=y%60;return`${A}:${String(b).padStart(2,"0")}`}return(y,A)=>(k(),de(p(bc),{open:i.value,"onUpdate:open":A[0]||(A[0]=b=>i.value=b),title:p(n)("login.title"),"close-on-overlay":!1,onClose:g},{default:he(()=>[p(r)==="starting"?(k(),E("div",AYe,[K(p(Mi),{size:"md"}),w("span",CYe,F(p(n)("login.starting")),1)])):p(r)==="device-code"&&p(a)?(k(),E("div",wYe,[w("div",xYe,F(p(n)("login.lead")),1),w("a",{class:"nb-primary",href:p(a).verificationUriComplete,target:"_blank",rel:"noopener noreferrer"},[$e(F(p(n)("login.authorizeInBrowser"))+" ",1),K(p(ve),{name:"external-link",size:"sm"})],8,SYe),w("div",_Ye,[w("span",{class:"nb-link",title:p(a).verificationUriComplete},F(p(a).verificationUriComplete),9,IYe),K(p(Zt),{class:Fe(["nb-copy",{"is-copied":f.value}]),variant:"secondary",size:"sm",onClick:h},{default:he(()=>[f.value?(k(),E(Te,{key:0},[K(p(ve),{name:"check",size:"sm"}),$e(" "+F(p(n)("login.copied")),1)],64)):(k(),E(Te,{key:1},[K(p(ve),{name:"copy",size:"sm"}),$e(" "+F(p(n)("login.copyLink")),1)],64))]),_:1},8,["class"])]),w("div",MYe,[K(p(Mi),{size:"sm",label:p(n)("login.waitingAuth")},null,8,["label"]),w("span",EYe,F(p(n)("login.waitingAutoClose")),1),w("span",TYe,F(m(p(u))),1)])])):p(r)==="success"?(k(),E("div",LYe,[K(p(ch),{kind:"success"}),w("span",NYe,F(p(n)("login.success")),1),w("span",FYe,F(p(n)("login.successHint")),1)])):p(r)==="expired"?(k(),E(Te,{key:3},[w("div",DYe,[K(p(ch),{kind:"expired"}),w("span",$Ye,F(p(n)("login.expiredTitle")),1),w("span",BYe,F(p(n)("login.expiredHint")),1)]),w("div",zYe,[K(p(Zt),{variant:"primary",onClick:p(c)},{default:he(()=>[$e(F(p(n)("login.retry")),1)]),_:1},8,["onClick"]),K(p(Zt),{variant:"secondary",onClick:g},{default:he(()=>[$e(F(p(n)("login.closeBtn")),1)]),_:1})])],64)):p(r)==="error"?(k(),E(Te,{key:4},[w("div",RYe,[K(p(ch),{kind:"error"}),w("span",OYe,F(p(l)?p(n)("login.pollErrorTitle"):p(n)("login.errorTitle")),1),w("span",PYe,F(p(l)?p(n)("login.pollErrorHint"):p(n)("login.errorHint")),1)]),w("div",jYe,[K(p(Zt),{variant:"primary",onClick:p(c)},{default:he(()=>[$e(F(p(n)("login.retry")),1)]),_:1},8,["onClick"]),K(p(Zt),{variant:"secondary",onClick:g},{default:he(()=>[$e(F(p(n)("login.closeBtn")),1)]),_:1})])],64)):te("",!0)]),_:1},8,["open","title"]))}}),WYe=gt(HYe,[["__scopeId","data-v-0b06fca3"]]),Ej=Qe({__name:"LanguageSwitcher",props:{size:{default:"md"}},setup(e){const{locale:t}=Bt(),n=bv.map(s=>({value:s.code,label:s.label}));function i(s){t.value!==s&&E6(s)}return(s,o)=>(k(),de(p(Mo),{"model-value":p(t),options:p(n),size:e.size,"onUpdate:modelValue":i},null,8,["model-value","options","size"]))}}),qYe={class:"msg"},UYe={class:"pf-field"},KYe={class:"pf-field-label"},VYe={class:"pf-field"},ZYe={class:"pf-field-label"},GYe={class:"pf-field"},QYe={class:"pf-field-label"},YYe={class:"pf-key-wrap"},JYe={class:"pf-field"},XYe={class:"pf-field-label"},eJe={class:"pf-field"},tJe={class:"pf-field-label"},nJe={class:"pf-models"},iJe={key:0,class:"pf-models-empty"},sJe={class:"pf-model-grid pf-model-head"},oJe={key:1},rJe={key:0},lJe={class:"pf-foot"},aJe={key:0,class:"pf-managed-note"},uJe={class:"pf-confirm-msg"},cJe=Qe({__name:"ProviderForm",props:{mode:{},provider:{},guard:{type:Boolean}},emits:["dirtyChange","guardStay","guardDiscard","added","saved","deleting","deleted","cancel"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=Kl(),r=Ss({id:"",type:"openai",apiKey:"",baseUrl:"",models:[om()]}),l=G(""),a=G(!1),u=G(!1),c=G(!1),d=L(()=>n.mode==="add"),f=L(()=>n.provider!==void 0&&VD(n.provider)),h=L(()=>{const N=n.provider;return N===void 0?0:vb(N,o.config.value?.models).length}),g=L(()=>f.value&&h.value===0),m=L(()=>tre.map(N=>({value:N,label:s(`providers.types.${N}`)}))),y=L(()=>f.value?s("providers.apiKeyManaged"):!d.value&&n.provider?.hasApiKey===!0?s("providers.apiKeySet"):"sk-…");function A(){l.value="",u.value=!1;const N=n.provider;if(d.value||N===void 0){r.id="",r.type="openai",r.apiKey="",r.baseUrl="",r.models=[om()];return}r.id=N.id,r.type=N.type,r.apiKey="",r.baseUrl=N.baseUrl??"";const O=vb(N,o.config.value?.models);r.models=O.length>0?O:[om()]}mn(()=>{A(),v()});const b=G(!1),C=G(!1);async function v(){const N=n.provider;if(!(d.value||N===void 0||f.value||N.hasApiKey!==!0))try{const O=await o.getProvider(N.id);if(C.value)return;O.apiKey!==void 0&&O.apiKey!==""&&(r.apiKey=O.apiKey,b.value=!0)}catch{}}function x(){i("dirtyChange",!0)}const S=G(!1),_=G();function I(N){l.value=N,kt(()=>_.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}async function M(){if(a.value)return;const N=nre(r,{requireApiKey:d.value,requireBaseUrl:d.value});if(N!==null){I(s(`providers.error.${N}`));return}l.value="",a.value=!0;try{if(d.value){const O=await o.addProvider(ire(r));if(O!==null){I(O);return}i("dirtyChange",!1),o.notify({severity:"success",title:s("providers.added")}),i("added",r.id.trim())}else{const O=n.provider;if(O===void 0)return;const P=o.config.value?.providers?.[O.id]?.defaultModel,R=await o.updateProvider(O.id,sre(r,O,{includeBlankApiKey:b.value,existingDefaultModel:P}));if(R!==null){I(R);return}await o.checkAuth(),o.notify({severity:"success",title:s("providers.saved")}),i("dirtyChange",!1),i("saved",r.id.trim())}}finally{a.value=!1}}async function $(){const N=n.provider;if(!(N===void 0||c.value)){c.value=!0,i("deleting"),await new Promise(O=>setTimeout(O,300));try{if(await o.deleteProvider(N.id)===null){u.value=!1;return}i("dirtyChange",!1),i("deleted",N.id)}finally{c.value=!1}}}function D(){r.models.push(om()),x()}function T(N){r.models.length<=1||(r.models.splice(N,1),x())}return(N,O)=>(k(),E("div",{class:"pf-form",onInput:x},[e.guard?(k(),de(p(dd),{key:0,variant:"warning",class:"pf-guard"},{default:he(()=>[w("span",qYe,F(p(s)("providers.unsavedGuard")),1),K(p(Zt),{variant:"secondary",size:"sm",onClick:O[0]||(O[0]=P=>i("guardStay"))},{default:he(()=>[$e(F(p(s)("providers.guardStay")),1)]),_:1}),K(p(Zt),{variant:"danger",size:"sm",onClick:O[1]||(O[1]=P=>i("guardDiscard"))},{default:he(()=>[$e(F(p(s)("providers.guardDiscard")),1)]),_:1})]),_:1})):te("",!0),l.value?(k(),E("div",{key:1,ref_key:"errorBox",ref:_},[K(p(dd),{variant:"danger"},{default:he(()=>[$e(F(l.value),1)]),_:1})],512)):te("",!0),w("div",UYe,[w("label",KYe,[$e(F(p(s)("providers.fieldId")),1),O[11]||(O[11]=w("span",{class:"req"}," *",-1))]),K(p(wo),{modelValue:r.id,"onUpdate:modelValue":O[2]||(O[2]=P=>r.id=P),placeholder:"my-openai",disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","disabled"])]),w("div",VYe,[w("label",ZYe,[$e(F(p(s)("providers.fieldType")),1),O[12]||(O[12]=w("span",{class:"req"}," *",-1))]),K(p(Jk),{"model-value":r.type,options:m.value,disabled:f.value,"onUpdate:modelValue":O[3]||(O[3]=P=>{r.type=P,x()})},null,8,["model-value","options","disabled"])]),w("div",GYe,[w("label",QYe,[$e(F(p(s)("providers.fieldApiKey")),1),O[13]||(O[13]=w("span",{class:"req"}," *",-1))]),w("div",YYe,[K(p(wo),{modelValue:r.apiKey,"onUpdate:modelValue":O[4]||(O[4]=P=>r.apiKey=P),type:S.value?"text":"password",placeholder:y.value,disabled:f.value,autocomplete:"off",spellcheck:"false",onInput:O[5]||(O[5]=P=>C.value=!0)},null,8,["modelValue","type","placeholder","disabled"]),f.value?te("",!0):(k(),de(p(tn),{key:0,class:"pf-key-eye",size:"sm",label:p(s)(S.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:p(s)(S.value?"providers.hideApiKey":"providers.showApiKey"),onClick:O[6]||(O[6]=P=>S.value=!S.value)},{default:he(()=>[K(p(ve),{name:S.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"]))])]),w("div",JYe,[w("label",XYe,[$e(F(p(s)("providers.fieldBaseUrl")),1),O[14]||(O[14]=w("span",{class:"req"}," *",-1))]),K(p(wo),{modelValue:r.baseUrl,"onUpdate:modelValue":O[7]||(O[7]=P=>r.baseUrl=P),placeholder:p(s)("providers.baseUrlPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder","disabled"])]),w("div",eJe,[w("label",tJe,[$e(F(p(s)("providers.fieldModels")),1),O[15]||(O[15]=w("span",{class:"req"}," *",-1))]),w("div",nJe,[g.value?(k(),E("div",iJe,F(p(s)("providers.noModels")),1)):(k(),E(Te,{key:1},[w("div",sJe,[w("span",null,[$e(F(p(s)("providers.colModelId")),1),O[16]||(O[16]=w("span",{class:"req"}," *",-1))]),w("span",null,[$e(F(p(s)("providers.colContext")),1),O[17]||(O[17]=w("span",{class:"req"}," *",-1))]),w("span",null,F(p(s)("providers.colDisplayName")),1),O[18]||(O[18]=w("span",null,null,-1))]),(k(!0),E(Te,null,ht(r.models,(P,R)=>(k(),E("div",{key:R,class:"pf-model-grid"},[K(p(wo),{modelValue:P.model,"onUpdate:modelValue":q=>P.model=q,placeholder:p(s)("providers.modelIdPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),K(p(wo),{modelValue:P.maxContextSize,"onUpdate:modelValue":q=>P.maxContextSize=q,inputmode:"numeric",placeholder:p(s)("providers.modelContextPlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),K(p(wo),{modelValue:P.displayName,"onUpdate:modelValue":q=>P.displayName=q,placeholder:p(s)("providers.modelNamePlaceholder"),disabled:f.value,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"]),f.value?(k(),E("span",oJe)):(k(),de(p(tn),{key:0,size:"sm",label:p(s)("providers.removeModel"),tooltip:p(s)("providers.removeModel"),disabled:r.models.length<=1,onClick:q=>T(R)},{default:he(()=>[K(p(ve),{name:"trash",size:"sm"})]),_:1},8,["label","tooltip","disabled","onClick"]))]))),128)),f.value?te("",!0):(k(),E("div",rJe,[K(p(Zt),{variant:"ghost",size:"sm",onClick:D},{default:he(()=>[K(p(ve),{name:"plus",size:"sm"}),$e(" "+F(p(s)("providers.addModel")),1)]),_:1})]))],64))])]),w("div",lJe,[f.value?(k(),E("span",aJe,F(p(s)("providers.managedHint")),1)):d.value?(k(),E(Te,{key:1},[K(p(Zt),{variant:"secondary",size:"sm",onClick:O[8]||(O[8]=P=>i("cancel"))},{default:he(()=>[$e(F(p(s)("common.cancel")),1)]),_:1}),K(p(Zt),{variant:"primary",size:"sm",disabled:a.value,onClick:M},{default:he(()=>[$e(F(p(s)("providers.addProvider")),1)]),_:1},8,["disabled"])],64)):u.value&&n.provider!==void 0?(k(),E(Te,{key:2},[w("span",uJe,F(p(s)("providers.deleteConfirm",{id:n.provider.id,count:h.value})),1),O[19]||(O[19]=w("span",{class:"spacer"},null,-1)),K(p(Zt),{variant:"secondary",size:"sm",disabled:c.value,onClick:O[9]||(O[9]=P=>u.value=!1)},{default:he(()=>[$e(F(p(s)("common.cancel")),1)]),_:1},8,["disabled"]),K(p(Zt),{variant:"danger",size:"sm",disabled:c.value,onClick:$},{default:he(()=>[$e(F(p(s)("providers.deleteConfirmYes")),1)]),_:1},8,["disabled"])],64)):(k(),E(Te,{key:3},[K(p(Zt),{variant:"danger-soft",size:"sm",onClick:O[10]||(O[10]=P=>u.value=!0)},{default:he(()=>[$e(F(p(s)("providers.deleteProvider")),1)]),_:1}),O[20]||(O[20]=w("span",{class:"spacer"},null,-1)),K(p(Zt),{variant:"primary",size:"sm",disabled:a.value,onClick:M},{default:he(()=>[$e(F(p(s)("providers.save")),1)]),_:1},8,["disabled"])],64))])],32))}}),Tj=gt(cJe,[["__scopeId","data-v-3164ed08"]]),dJe={class:"af"},fJe={class:"msg"},hJe={key:2,class:"af-catalog"},pJe={key:0,class:"af-center"},gJe={key:1,class:"af-error"},mJe={class:"af-list"},vJe=["disabled","onClick"],yJe={class:"af-entry-name"},kJe={key:1,class:"af-entry-reason"},bJe={key:2,class:"af-entry-count"},AJe={key:0,class:"af-empty"},CJe={class:"af-field"},wJe={class:"af-label"},xJe={class:"af-field"},SJe={class:"af-label"},_Je={class:"af-key-wrap"},IJe={key:0,class:"af-field"},MJe={class:"af-label"},EJe={class:"af-note"},TJe={class:"af-foot"},LJe={class:"af-hint"},NJe={class:"af-field"},FJe={class:"af-label"},DJe={class:"af-field"},$Je={class:"af-label"},BJe={class:"af-key-wrap"},zJe={class:"af-foot"},RJe={class:"af-manual"},OJe=Qe({__name:"AddProviderFlow",props:{guard:{type:Boolean}},emits:["dirtyChange","guardStay","guardDiscard","added","cancel"],setup(e,{emit:t}){const n=t,{t:i,te:s}=Bt(),o=Kl(),r=G("catalog"),l=L(()=>[{value:"catalog",label:i("providers.catalog.sourceCatalog")},{value:"registry",label:i("providers.catalog.sourceRegistry")},{value:"manual",label:i("providers.catalog.sourceManual")}]),a=G("loading"),u=G([]);async function c(){a.value="loading";const j=await o.loadCatalogProviders();j.kind==="ok"?(u.value=j.items,a.value="ready"):j.kind==="unsupported"?(a.value="unsupported",r.value==="catalog"&&(r.value="manual")):a.value="error"}mn(c);const d=G(""),f=L(()=>{const j=d.value.trim().toLowerCase();return j===""?u.value:u.value.filter(W=>W.name.toLowerCase().includes(j)||W.id.toLowerCase().includes(j))});function h(j){const W=j.rejectReason;return W!==null&&s(`providers.catalog.rejectReason.${W}`)?i(`providers.catalog.rejectReason.${W}`):i("providers.catalog.rejected")}const g=G(null),m=G({id:"",apiKey:"",baseUrl:""}),y=G(!1),A=G(!1),b=G("");function C(j){g.value=j,m.value={id:j.id,apiKey:"",baseUrl:""},b.value="",y.value=!1}function v(){g.value=null,b.value="",n("dirtyChange",!1)}function x(){n("dirtyChange",!0)}const S=L(()=>{if(g.value===null)return!1;const W=m.value.id.trim();return W!==""&&o.providers.value.some(z=>z.id===W)}),_=G();function I(j){b.value=j,kt(()=>_.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}function M(){const j=m.value,W=j.id.trim();return W===""?i("providers.error.idRequired"):UD.test(W)?j.apiKey.trim()===""?i("providers.error.apiKeyRequired"):g.value?.needsBaseUrl===!0&&j.baseUrl.trim()===""?i("providers.error.baseUrlRequired"):null:i("providers.error.idInvalid")}async function $(){const j=g.value;if(j===null||A.value)return;const W=M();if(W!==null){I(W);return}b.value="",A.value=!0;try{const z=m.value,H=z.id.trim(),ee=z.baseUrl.trim(),V=await o.importCatalogProvider({catalogId:j.id,apiKey:z.apiKey.trim(),...ee===""?{}:{baseUrl:ee},...H===j.id?{}:{id:H}});if(V!==null){I(V);return}o.notify({severity:"success",title:i("providers.added")}),n("dirtyChange",!1),n("added",H)}finally{A.value=!1}}const D=G({url:"",apiKey:""}),T=G(!1),N=G(!1),O=G(""),P=G();function R(j){O.value=j,kt(()=>P.value?.scrollIntoView({block:"nearest",behavior:"smooth"}))}async function q(){if(N.value)return;const j=D.value.url.trim();if(j===""){R(i("providers.error.registryUrlRequired"));return}O.value="",N.value=!0;try{const W=D.value.apiKey.trim(),z=await o.importCustomRegistry({url:j,...W===""?{}:{apiKey:W}});if(typeof z=="string"){R(z);return}o.notify({severity:"success",title:i("providers.catalog.registryImported",{count:z.providers.length})}),n("dirtyChange",!1);const H=z.providers[0];H!==void 0?n("added",H.id):n("cancel")}finally{N.value=!1}}return(j,W)=>(k(),E("div",dJe,[e.guard?(k(),de(p(dd),{key:0,variant:"warning",class:"af-guard"},{default:he(()=>[w("span",fJe,F(p(i)("providers.unsavedGuard")),1),K(p(Zt),{variant:"secondary",size:"sm",onClick:W[0]||(W[0]=z=>n("guardStay"))},{default:he(()=>[$e(F(p(i)("providers.guardStay")),1)]),_:1}),K(p(Zt),{variant:"danger",size:"sm",onClick:W[1]||(W[1]=z=>n("guardDiscard"))},{default:he(()=>[$e(F(p(i)("providers.guardDiscard")),1)]),_:1})]),_:1})):te("",!0),a.value!=="unsupported"?(k(),de(p(Mo),{key:1,modelValue:r.value,"onUpdate:modelValue":W[2]||(W[2]=z=>r.value=z),size:"sm",options:l.value},null,8,["modelValue","options"])):te("",!0),a.value!=="unsupported"?$n((k(),E("div",hJe,[a.value==="loading"?(k(),E("div",pJe,[K(p(Mi),{size:"sm"}),w("span",null,F(p(i)("providers.catalog.loading")),1)])):a.value==="error"?(k(),E("div",gJe,[K(p(dd),{variant:"danger"},{default:he(()=>[$e(F(p(i)("providers.catalog.loadError")),1)]),_:1}),w("div",null,[K(p(Zt),{variant:"secondary",size:"sm",onClick:c},{default:he(()=>[$e(F(p(i)("providers.catalog.retry")),1)]),_:1})])])):g.value===null?(k(),E(Te,{key:2},[K(p(wo),{modelValue:d.value,"onUpdate:modelValue":W[3]||(W[3]=z=>d.value=z),placeholder:p(i)("providers.catalog.searchPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"]),w("div",mJe,[(k(!0),E(Te,null,ht(f.value,z=>(k(),E("button",{key:z.id,type:"button",class:"af-entry",disabled:z.rejected,onClick:H=>C(z)},[w("span",yJe,F(z.name),1),z.wireType!==null?(k(),de(p(va),{key:0,variant:"neutral",size:"sm"},{default:he(()=>[$e(F(z.wireType),1)]),_:2},1024)):te("",!0),W[16]||(W[16]=w("span",{class:"grow"},null,-1)),z.rejected?(k(),E("span",kJe,F(h(z)),1)):(k(),E("span",bJe,F(p(i)("providers.modelCount",{count:z.models.length})),1))],8,vJe))),128)),f.value.length===0?(k(),E("div",AJe,F(p(i)("providers.catalog.empty")),1)):te("",!0)])],64)):(k(),E("div",{key:3,class:"af-import",onInput:x},[w("button",{type:"button",class:"af-back",onClick:v},[K(p(ve),{name:"arrow-left",size:"sm"}),$e(" "+F(p(i)("providers.catalog.backToList")),1)]),w("div",CJe,[w("label",wJe,[$e(F(p(i)("providers.fieldId")),1),W[17]||(W[17]=w("span",{class:"req"}," *",-1))]),K(p(wo),{modelValue:m.value.id,"onUpdate:modelValue":W[4]||(W[4]=z=>m.value.id=z),autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),w("div",xJe,[w("label",SJe,[$e(F(p(i)("providers.fieldApiKey")),1),W[18]||(W[18]=w("span",{class:"req"}," *",-1))]),w("div",_Je,[K(p(wo),{modelValue:m.value.apiKey,"onUpdate:modelValue":W[5]||(W[5]=z=>m.value.apiKey=z),type:y.value?"text":"password",placeholder:"sk-…",autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type"]),K(p(tn),{class:"af-key-eye",size:"sm",label:p(i)(y.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:p(i)(y.value?"providers.hideApiKey":"providers.showApiKey"),onClick:W[6]||(W[6]=z=>y.value=!y.value)},{default:he(()=>[K(p(ve),{name:y.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])])]),g.value.needsBaseUrl?(k(),E("div",IJe,[w("label",MJe,[$e(F(p(i)("providers.fieldBaseUrl")),1),W[19]||(W[19]=w("span",{class:"req"}," *",-1))]),K(p(wo),{modelValue:m.value.baseUrl,"onUpdate:modelValue":W[7]||(W[7]=z=>m.value.baseUrl=z),placeholder:p(i)("providers.baseUrlPlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder"])])):te("",!0),S.value?(k(),de(p(dd),{key:1,variant:"warning"},{default:he(()=>[$e(F(p(i)("providers.catalog.overwriteWarning")),1)]),_:1})):te("",!0),w("div",EJe,F(p(i)("providers.catalog.willImport",{count:g.value.models.length})),1),b.value?(k(),E("div",{key:2,ref_key:"importErrorBox",ref:_},[K(p(dd),{variant:"danger"},{default:he(()=>[$e(F(b.value),1)]),_:1})],512)):te("",!0),w("div",TJe,[K(p(Zt),{variant:"secondary",size:"sm",onClick:W[8]||(W[8]=z=>n("cancel"))},{default:he(()=>[$e(F(p(i)("common.cancel")),1)]),_:1}),K(p(Zt),{variant:"primary",size:"sm",disabled:A.value,onClick:$},{default:he(()=>[$e(F(p(i)("providers.catalog.importAction")),1)]),_:1},8,["disabled"])])],32))],512)),[[Qi,r.value==="catalog"]]):te("",!0),$n(w("div",{class:"af-registry",onInput:x},[w("div",LJe,F(p(i)("providers.catalog.registryHint")),1),w("div",NJe,[w("label",FJe,[$e(F(p(i)("providers.catalog.registryUrlLabel")),1),W[20]||(W[20]=w("span",{class:"req"}," *",-1))]),K(p(wo),{modelValue:D.value.url,"onUpdate:modelValue":W[9]||(W[9]=z=>D.value.url=z),placeholder:"https://example.com/api.json",autocomplete:"off",spellcheck:"false"},null,8,["modelValue"])]),w("div",DJe,[w("label",$Je,F(p(i)("providers.fieldApiKey")),1),w("div",BJe,[K(p(wo),{modelValue:D.value.apiKey,"onUpdate:modelValue":W[10]||(W[10]=z=>D.value.apiKey=z),type:T.value?"text":"password",placeholder:p(i)("providers.modelNamePlaceholder"),autocomplete:"off",spellcheck:"false"},null,8,["modelValue","type","placeholder"]),K(p(tn),{class:"af-key-eye",size:"sm",label:p(i)(T.value?"providers.hideApiKey":"providers.showApiKey"),tooltip:p(i)(T.value?"providers.hideApiKey":"providers.showApiKey"),onClick:W[11]||(W[11]=z=>T.value=!T.value)},{default:he(()=>[K(p(ve),{name:T.value?"eye-off":"eye",size:"sm"},null,8,["name"])]),_:1},8,["label","tooltip"])])]),O.value?(k(),E("div",{key:0,ref_key:"registryErrorBox",ref:P},[K(p(dd),{variant:"danger"},{default:he(()=>[$e(F(O.value),1)]),_:1})],512)):te("",!0),w("div",zJe,[K(p(Zt),{variant:"secondary",size:"sm",onClick:W[12]||(W[12]=z=>n("cancel"))},{default:he(()=>[$e(F(p(i)("common.cancel")),1)]),_:1}),K(p(Zt),{variant:"primary",size:"sm",disabled:N.value,onClick:q},{default:he(()=>[$e(F(p(i)("providers.catalog.importAction")),1)]),_:1},8,["disabled"])])],544),[[Qi,r.value==="registry"]]),$n(w("div",RJe,[K(Tj,{mode:"add",guard:!1,onDirtyChange:W[13]||(W[13]=z=>n("dirtyChange",z)),onAdded:W[14]||(W[14]=z=>n("added",z)),onCancel:W[15]||(W[15]=z=>n("cancel"))})],512),[[Qi,r.value==="manual"]])]))}}),PJe=gt(OJe,[["__scopeId","data-v-9777a945"]]),jJe={class:"pp"},HJe={class:"pp-head"},WJe={class:"pp-title"},qJe={key:0,class:"pp-loading"},UJe={key:1,class:"pp-group"},KJe={class:"pp-add-label"},VJe={class:"pp-chev"},ZJe={class:"pp-acc"},GJe={class:"pp-acc-in"},QJe={key:1,class:"pp-empty"},YJe=["onClick"],JJe={class:"grow"},XJe={class:"pp-id"},eXe={class:"pp-count"},tXe={class:"pp-chev"},nXe={class:"pp-acc"},iXe={class:"pp-acc-in"},ld="$add",sXe=Qe({__name:"ProvidersPanel",setup(e){const{t}=Bt(),n=Kl(),i=G(!0),s=G(null),o=G(null);let r=0;const l=G(!1),a=G(!1),u=G(null),c=G("");let d=0;const f=L(()=>[...n.providers.value].sort((S,_)=>S.id.localeCompare(_.id)));function h(S){return vb(S,n.config.value?.models).length}qe(s,(S,_)=>{_!==null&&_!==S&&(o.value=_,window.clearTimeout(r),r=window.setTimeout(()=>{o.value=null},300)),l.value=!1}),qe(l,S=>{S||(a.value=!1,u.value=null)}),Mn(()=>{window.clearTimeout(r),window.clearTimeout(d)});const g=G(!1);qe(s,S=>{S===ld?(g.value=!1,kt(()=>requestAnimationFrame(()=>{g.value=!0}))):g.value=!1}),mn(async()=>{i.value=!0;try{await Promise.all([n.loadProviders(),n.loadModels(),n.loadConfig()])}finally{i.value=!1}});function m(S){const _=s.value===S?null:S;if(l.value){u.value=_,a.value=!0;return}s.value=_}function y(){a.value=!1,u.value=null}function A(){a.value=!1,s.value=u.value,u.value=null}function b(S){c.value=S,window.clearTimeout(d),d=window.setTimeout(()=>{c.value=""},1200)}function C(S){s.value=S}function v(S){s.value=S,b(S)}function x(){s.value=null}return(S,_)=>(k(),E("section",jJe,[w("div",HJe,[w("h3",WJe,F(p(t)("settings.tabs.providers")),1),K(p(Zt),{variant:"secondary",size:"sm",onClick:_[0]||(_[0]=I=>m(ld))},{default:he(()=>[K(p(ve),{name:"plus",size:"sm"}),$e(" "+F(p(t)("providers.addProvider")),1)]),_:1})]),i.value?(k(),E("div",qJe,[K(p(Mi),{size:"sm"}),w("span",null,F(p(t)("providers.loading")),1)])):(k(),E("div",UJe,[s.value===ld||o.value===ld?(k(),E("div",{key:0,class:Fe(["pp-item pp-add-item",{open:s.value===ld&&g.value}])},[w("button",{type:"button",class:"pp-row pp-add-row",onClick:_[1]||(_[1]=I=>m(ld))},[w("span",KJe,F(p(t)("providers.addProvider")),1),_[6]||(_[6]=w("span",{class:"grow"},null,-1)),w("span",VJe,[K(p(ve),{name:"chevron-right",size:"sm"})])]),w("div",ZJe,[w("div",GJe,[K(PJe,{guard:a.value&&s.value===ld,onDirtyChange:_[2]||(_[2]=I=>l.value=I),onGuardStay:y,onGuardDiscard:A,onAdded:v,onCancel:_[3]||(_[3]=I=>s.value=null)},null,8,["guard"])])])],2)):te("",!0),f.value.length===0?(k(),E("div",QJe,F(p(t)("providers.empty")),1)):te("",!0),(k(!0),E(Te,null,ht(f.value,I=>(k(),E("div",{key:I.id,class:Fe(["pp-item",{open:s.value===I.id,flash:c.value===I.id}])},[w("button",{type:"button",class:"pp-row",onClick:M=>m(I.id)},[w("div",JJe,[w("span",XJe,F(I.id),1),K(p(va),{variant:"neutral",size:"sm"},{default:he(()=>[$e(F(I.type),1)]),_:2},1024),p(VD)(I)?(k(),de(p(va),{key:0,variant:"info",size:"sm"},{default:he(()=>[$e(F(p(t)("providers.managedBadge")),1)]),_:1})):te("",!0)]),w("span",eXe,F(p(t)("providers.modelCount",{count:h(I)})),1),w("span",tXe,[K(p(ve),{name:"chevron-right",size:"sm"})])],8,YJe),w("div",nXe,[w("div",iXe,[s.value===I.id||o.value===I.id?(k(),de(Tj,{key:0,mode:"edit",provider:I,guard:a.value&&s.value===I.id,onDirtyChange:_[4]||(_[4]=M=>l.value=M),onGuardStay:y,onGuardDiscard:A,onSaved:C,onDeleting:_[5]||(_[5]=M=>s.value=null),onDeleted:x},null,8,["provider","guard"])):te("",!0)])])],2))),128))]))]))}}),oXe=gt(sXe,[["__scopeId","data-v-ee634b62"]]),rXe={class:"sec"},lXe={class:"sec-title"},aXe={class:"pu-group"},uXe={class:"pu-row"},cXe={class:"pu-main"},dXe={class:"pu-label"},fXe={class:"pu-hint"},hXe=Qe({__name:"PlanUpgradeCard",setup(e){const{t}=Bt();return(n,i)=>(k(),E("section",rXe,[w("h3",lXe,F(p(t)("settings.planUsage.title")),1),w("div",aXe,[w("div",uXe,[w("span",cXe,[w("span",dXe,F(p(t)("settings.planUsage.freeTitle")),1),w("span",fXe,F(p(t)("settings.planUsage.freeHint")),1)]),K(p(Zt),{variant:"primary",size:"sm",onClick:i[0]||(i[0]=s=>p(z0)())},{default:he(()=>[$e(F(p(t)("sidebar.upgrade")),1)]),_:1})])])]))}}),Lj=gt(hXe,[["__scopeId","data-v-5711dff8"]]),pXe={class:"sec"},gXe={class:"sec-title"},mXe={class:"pu-group"},vXe={key:0,class:"pu-row pu-state"},yXe={key:1,class:"pu-row pu-state"},kXe={class:"pu-error-text"},bXe={key:2,class:"pu-row pu-state pu-empty"},AXe={class:"pu-main"},CXe={class:"pu-label"},wXe={key:0,class:"pu-hint"},xXe={class:"pu-value"},SXe=["aria-valuenow","aria-valuemax"],_Xe={key:0,class:"sec"},IXe={class:"sec-title"},MXe={class:"pu-group"},EXe={class:"pu-row"},TXe={class:"pu-main"},LXe={class:"pu-label"},NXe={class:"pu-value"},FXe={key:0,class:"pu-value-sub"},DXe={key:0,class:"pu-meter"},$Xe={class:"pu-row"},BXe={class:"pu-main"},zXe={class:"pu-label"},RXe={class:"pu-value"},OXe={class:"pu-row"},PXe={class:"pu-main"},jXe={class:"pu-label"},HXe={class:"pu-value"},WXe={class:"pu-value-sub"},qXe=Qe({__name:"PlanUsageCard",props:{onFetchUsage:{type:Function}},setup(e){const t=e,{t:n}=Bt(),i=G(!0),s=G(null);async function o(){i.value=!0;try{s.value=await t.onFetchUsage()}finally{i.value=!1}}mn(o);const r=L(()=>s.value?.kind==="ok"?s.value:null),l=L(()=>r.value?.extraUsage??null),a=L(()=>{const m=r.value;return m===null?[]:m.summary===null?m.limits:[m.summary,...m.limits]}),u=L(()=>a.value.length>0),c=L(()=>s.value?.kind==="error"?s.value.message:n("settings.planUsage.loadFailed")),d=L(()=>s.value?.kind==="error"&&(s.value.status===402||s.value.status===403)),f=L(()=>l.value!==null&&l.value.monthlyChargeLimitEnabled&&l.value.monthlyChargeLimitCents>0);function h(m,y){const A=ere(m,y);return`${A.symbol}${A.number}`}function g(m){return m.resetAt===void 0?"":qD(m.resetAt,n)}return(m,y)=>d.value?(k(),de(Lj,{key:0})):(k(),E(Te,{key:1},[w("section",pXe,[w("h3",gXe,F(p(n)("settings.planUsage.title")),1),w("div",mXe,[i.value?(k(),E("div",vXe,[K(p(Mi),{size:"sm"})])):r.value===null?(k(),E("div",yXe,[w("span",kXe,F(c.value),1),K(p(Zt),{variant:"ghost",size:"sm",onClick:o},{default:he(()=>[$e(F(p(n)("settings.planUsage.retry")),1)]),_:1})])):u.value?(k(!0),E(Te,{key:3},ht(a.value,(A,b)=>(k(),E("div",{key:b,class:"pu-row"},[w("span",AXe,[w("span",CXe,F(p(WD)(A,p(n))),1),g(A)?(k(),E("span",wXe,F(g(A)),1)):te("",!0)]),w("span",xXe,F(p(n)("settings.planUsage.usedPct",{pct:p(Qm)(A.used,A.limit)})),1),w("span",{class:"pu-meter",role:"progressbar","aria-valuenow":A.used,"aria-valuemax":A.limit},[w("i",{class:Fe(`sev-${p(mb)(A.used,A.limit)}`),style:qt({width:`${p(Qm)(A.used,A.limit)}%`})},null,6)],8,SXe)]))),128)):(k(),E("div",bXe,F(p(n)("settings.planUsage.empty")),1))])]),l.value!==null?(k(),E("section",_Xe,[w("h3",IXe,F(p(n)("settings.planUsage.boosterTitle")),1),w("div",MXe,[w("div",EXe,[w("span",TXe,[w("span",LXe,F(p(n)("settings.planUsage.monthlyUsed")),1)]),w("span",NXe,[$e(F(h(l.value.monthlyUsedCents,l.value.currency)),1),f.value?(k(),E("span",FXe," / "+F(h(l.value.monthlyChargeLimitCents,l.value.currency)),1)):te("",!0)]),f.value?(k(),E("span",DXe,[w("i",{class:Fe(`sev-${p(mb)(l.value.monthlyUsedCents,l.value.monthlyChargeLimitCents)}`),style:qt({width:`${p(Qm)(l.value.monthlyUsedCents,l.value.monthlyChargeLimitCents)}%`})},null,6)])):te("",!0)]),w("div",$Xe,[w("span",BXe,[w("span",zXe,F(p(n)("settings.planUsage.monthlyLimit")),1)]),w("span",RXe,[f.value?(k(),E(Te,{key:0},[$e(F(h(l.value.monthlyChargeLimitCents,l.value.currency)),1)],64)):(k(),E(Te,{key:1},[$e(F(p(n)("settings.planUsage.unlimited")),1)],64))])]),w("div",OXe,[w("span",PXe,[w("span",jXe,F(p(n)("settings.planUsage.boosterBalance")),1)]),w("span",HXe,[$e(F(h(l.value.balanceCents,l.value.currency)),1),w("span",WXe," / "+F(h(l.value.totalCents,l.value.currency)),1)])])])])):te("",!0)],64))}}),UXe=gt(qXe,[["__scopeId","data-v-f39cdded"]]),KXe=["aria-expanded","aria-label"],VXe={class:"sm-picker__value-text"},ZXe=["aria-label"],GXe=["aria-label"],QXe={class:"sm-picker__group"},YXe=["aria-selected","onMouseenter","onClick"],JXe={class:"sm-picker__option-label"},XXe=["aria-label"],eet={class:"sm-picker__group"},tet=["aria-selected","onMouseenter","onClick"],net={class:"sm-picker__option-label"},iet=188,set=250,Ak=8,oet=Qe({__name:"SecondaryModelPicker",props:{modelValue:{},effort:{},groups:{},modelInfoById:{}},emits:["select"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt(),o=G(null),r=G(null),l=G(null),a=G(null),u=new Map,c=G(!1),d=G(!1),f=G({}),h=`sm-picker-${Math.random().toString(36).slice(2,9)}`,g=G(""),m=G(null),y=G("right"),A=G(0),b=G("models"),C=G(0),v=G(0);let x=null;const S=L(()=>n.groups.flatMap(X=>X.options)),_=L(()=>n.modelValue?S.value.find(X=>X.id===n.modelValue)?.label??n.modelValue:""),I=L(()=>n.modelValue?n.effort?`${_.value} · ${n.effort}`:_.value:s("settings.noSecondaryModel")),M=L(()=>{const X=m.value;if(X===null)return[];const we=B0(n.modelInfoById[X]),Y=n.effort===""?[null,...we]:[...we];return n.modelValue===X&&n.effort!==""&&!we.includes(n.effort)&&Y.push(n.effort),Y});function $(X){return n.modelValue!==m.value?!1:X===null?n.effort==="":n.effort===X}function D(){const X=M.value.findIndex(we=>$(we));return X>=0?X:0}function T(X,we){X instanceof HTMLElement?u.set(we,X):u.delete(we)}function N(){x!==null&&(clearTimeout(x),x=null)}function O(){N(),x=setTimeout(()=>{m.value=null,b.value==="efforts"&&(b.value="models")},set)}function P(X){X!==g.value&&(g.value=X,C.value=Math.max(0,S.value.findIndex(we=>we.id===X)))}function R(){const X=r.value,we=l.value;if(!X||!we)return;const Y=X.getBoundingClientRect(),le=we.offsetHeight,Ce=window.innerHeight-Y.bottom;d.value=Ce<le+Ak&&Y.top>le;const ae=Math.max(Ak,window.innerWidth-Y.right);f.value=d.value?{right:`${ae}px`,bottom:`${window.innerHeight-Y.top+4}px`,top:"auto"}:{right:`${ae}px`,top:`${Y.bottom+4}px`,bottom:"auto"}}function q(){const X=l.value,we=m.value===null?void 0:u.get(m.value);if(!X||!we)return;const Y=X.getBoundingClientRect(),le=we.getBoundingClientRect(),Ce=a.value?.offsetHeight??0,ae=Math.max(0,window.innerHeight-Ak-Ce-Y.top);A.value=Math.max(0,Math.min(le.top-Y.top-4,X.offsetHeight-40,ae));const oe=window.innerWidth-Y.right,Q=Y.left;y.value=oe>=iet||oe>=Q?"right":"left"}function j(X,{moveFocus:we=!1}={}){P(X),N(),m.value=X,we&&(b.value="efforts",v.value=D()),kt(q)}function W(){m.value=null,b.value="models"}function z(){c.value||(c.value=!0,g.value=n.modelValue||(S.value[0]?.id??""),C.value=Math.max(0,S.value.findIndex(X=>X.id===g.value)),m.value=null,b.value="models",kt(R))}function H({restoreFocus:X=!1}={}){c.value&&(N(),c.value=!1,m.value=null,X&&kt(()=>r.value?.focus()))}function ee(){c.value?H():z()}function V(X){if(m.value===null)return;const we={model:m.value,effort:X??void 0};(we.model!==n.modelValue||(we.effort??"")!==n.effort)&&i("select",we),H({restoreFocus:!0})}function ie(){kt(()=>{l.value?.querySelector(".sm-picker__option.is-kb-active")?.scrollIntoView({block:"nearest"})})}function se(X){const we=S.value;if(we.length===0)return;const Y=(C.value+X+we.length)%we.length,le=we[Y].id;P(le),m.value!==null&&j(le),ie()}function Z(X){const we=M.value;we.length!==0&&(v.value=(v.value+X+we.length)%we.length,ie())}function pe(X){if(!c.value){(X.key==="Enter"||X.key===" "||X.key==="ArrowDown")&&(X.preventDefault(),z());return}if(X.key==="ArrowDown")X.preventDefault(),b.value==="models"?se(1):Z(1);else if(X.key==="ArrowUp")X.preventDefault(),b.value==="models"?se(-1):Z(-1);else if(X.key==="ArrowRight")X.preventDefault(),j(g.value,{moveFocus:!0});else if(X.key==="ArrowLeft")X.preventDefault(),m.value!==null&&W();else if(X.key==="Enter"||X.key===" ")X.preventDefault(),b.value==="models"?j(g.value,{moveFocus:!0}):V(M.value[v.value]??null);else if(X.key==="Home"||X.key==="End"){X.preventDefault();const we=X.key==="Home";if(b.value==="models"){const Y=S.value;if(Y.length===0)return;const le=(we?Y[0]:Y.at(-1)).id;P(le),m.value!==null&&j(le)}else v.value=we?0:M.value.length-1;ie()}else X.key==="Escape"&&(X.preventDefault(),H({restoreFocus:!0}))}function re(X){const we=X.target;o.value?.contains(we)||l.value?.contains(we)||H()}function fe(X){if(c.value){if(l.value?.contains(X.target)){q();return}R(),q()}}function Ee(){H()}return mn(()=>{document.addEventListener("pointerdown",re),document.addEventListener("scroll",fe,!0),window.addEventListener("resize",Ee)}),Mn(()=>{document.removeEventListener("pointerdown",re),document.removeEventListener("scroll",fe,!0),window.removeEventListener("resize",Ee),N()}),(X,we)=>(k(),E("div",{ref_key:"rootRef",ref:o,class:Fe(["sm-picker",{"is-open":c.value}])},[w("button",{ref_key:"triggerRef",ref:r,class:"sm-picker__trigger",type:"button",role:"combobox","aria-controls":h,"aria-expanded":c.value,"aria-haspopup":"dialog","aria-label":p(s)("settings.secondaryModel"),onClick:ee,onKeydown:pe},[w("span",{class:Fe(["sm-picker__value",{"is-placeholder":!e.modelValue}])},[w("span",VXe,F(I.value),1)],2),K(p(ve),{class:"sm-picker__chevron",name:"chevron-down",size:"sm"})],40,KXe),(k(),de(Gr,{to:"body"},[c.value?(k(),E("div",{key:0,id:h,ref_key:"menuRef",ref:l,class:Fe(["sm-picker__menu",{"sm-picker__menu--up":d.value}]),style:qt(f.value),role:"dialog","aria-label":p(s)("settings.secondaryModel")},[w("div",{class:"sm-picker__models",role:"listbox","aria-label":p(s)("settings.secondaryModel")},[(k(!0),E(Te,null,ht(e.groups,Y=>(k(),E(Te,{key:Y.provider},[w("div",QXe,F(Y.provider),1),(k(!0),E(Te,null,ht(Y.options,le=>(k(),E("button",{key:le.id,ref_for:!0,ref:Ce=>T(Ce,le.id),class:Fe(["sm-picker__option",{"is-selected":le.id===e.modelValue,"is-active":le.id===g.value,"is-kb-active":b.value==="models"&&le.id===g.value}]),type:"button",role:"option","aria-selected":le.id===e.modelValue,onMouseenter:Ce=>j(le.id),onMouseleave:O,onClick:Ce=>j(le.id,{moveFocus:!0})},[K(p(ve),{class:"sm-picker__check",name:"check",size:"sm"}),w("span",JXe,F(le.label),1),K(p(ve),{class:"sm-picker__flyout-caret",name:"chevron-right",size:"sm"})],42,YXe))),128))],64))),128))],8,GXe),m.value!==null?(k(),E("div",{key:0,ref_key:"flyoutRef",ref:a,class:Fe(["sm-picker__flyout",`sm-picker__flyout--${y.value}`]),style:qt({top:`${A.value}px`}),role:"listbox","aria-label":p(s)("settings.secondaryModelEffort"),onMouseenter:N,onMouseleave:O},[w("div",eet,F(p(s)("settings.secondaryModelEffort")),1),(k(!0),E(Te,null,ht(M.value,(Y,le)=>(k(),E("button",{key:Y??"__default__",class:Fe(["sm-picker__option",{"is-selected":$(Y),"is-active":b.value==="efforts"&&le===v.value,"is-kb-active":b.value==="efforts"&&le===v.value,"is-muted":Y===null}]),type:"button",role:"option","aria-selected":$(Y),onMouseenter:Ce=>{b.value="efforts",v.value=le},onClick:Ce=>V(Y)},[K(p(ve),{class:"sm-picker__check",name:"check",size:"sm"}),w("span",net,F(Y??p(s)("settings.secondaryModelEffortAuto")),1)],42,tet))),128))],46,XXe)):te("",!0)],14,ZXe)):te("",!0)]))],2))}}),ret=gt(oet,[["__scopeId","data-v-eb75e643"]]),aet=["aria-label"],uet={class:"settings-tabs-header"},cet={class:"settings-dialog-title"},det={class:"settings-tab-list"},fet=["aria-selected","onClick"],het={class:"settings-region"},pet={class:"settings-region-header"},get={class:"panel"},met={class:"sec"},vet={class:"sec-title"},yet={class:"settings-group"},ket={class:"row"},bet={class:"rlabel"},Aet={class:"hint"},Cet={class:"row language-row"},wet={class:"rlabel"},xet={class:"hint"},_et={class:"row font-size-row"},Iet={class:"rlabel"},Met={class:"hint"},Eet={class:"sec notification-settings"},Tet={class:"sec-title"},Let={class:"settings-group"},Net={class:"row"},Fet={class:"rlabel"},Det={class:"hint"},$et={key:0,class:"hint"},Bet={class:"row"},zet={class:"rlabel"},Ret={class:"hint"},Oet={class:"panel"},Pet={class:"sec"},jet={class:"sec-title"},Het={class:"settings-group"},Wet={class:"account-row"},qet={class:"account-avatar","aria-hidden":"true"},Uet=["src"],Ket={class:"account-meta"},Vet={class:"account-name-row"},Zet={class:"account-name"},Get={class:"account-sub"},Qet={key:0,class:"panel"},Yet={class:"panel"},Jet={class:"sec"},Xet={class:"sec-head"},ett={class:"sec-title"},ttt={class:"settings-group"},ntt={class:"row"},itt={class:"rlabel"},stt={class:"hint"},ott={key:0,class:"select-wrap"},rtt={key:1,class:"rvalue mono"},ltt={class:"row"},att={class:"rlabel"},utt={class:"hint"},ctt={class:"row"},dtt={class:"rlabel"},ftt={class:"hint"},htt={class:"row"},ptt={class:"rlabel"},gtt={class:"hint"},mtt={key:1,class:"empty-config"},vtt={key:0,class:"sec"},ytt={class:"sec-head"},ktt={class:"sec-title"},btt={class:"settings-group"},Att={class:"row"},Ctt={class:"rlabel"},wtt={class:"hint"},xtt={key:0,class:"select-wrap"},Stt={key:1,class:"rvalue mono"},_tt={class:"panel"},Itt={class:"sec"},Mtt={class:"sec-title"},Ett={class:"settings-group"},Ttt={class:"row"},Ltt={class:"rlabel"},Ntt={class:"hint"},Ftt={class:"rvalue"},Dtt={class:"row"},$tt={class:"rlabel"},Btt={class:"hint"},ztt={class:"rvalue"},Rtt={class:"row"},Ott={class:"rlabel"},Ptt={class:"hint"},jtt={class:"rvalue"},Htt={key:0,class:"row"},Wtt={class:"rlabel"},qtt={key:0,class:"hint"},Utt={key:1,class:"hint"},Ktt={key:1,class:"row"},Vtt={class:"rlabel"},Ztt={class:"hint"},Gtt={key:0,class:"sec"},Qtt={class:"sec-title"},Ytt={class:"settings-group"},Jtt={class:"row"},Xtt={class:"rlabel"},ent={class:"hint"},tnt={class:"hint"},nnt={class:"sec"},int={class:"sec-title"},snt={class:"settings-group"},ont={class:"row"},rnt={class:"rlabel"},lnt={class:"hint"},ant={key:0,class:"hint"},unt={class:"panel"},cnt={class:"sec"},dnt={class:"sec-title"},fnt={class:"settings-group"},hnt={class:"row"},pnt={class:"rlabel"},gnt={class:"hint"},mnt={class:"panel"},vnt={class:"panel-head"},ynt={class:"panel-title"},knt={class:"panel-desc"},bnt={class:"archive-toolbar"},Ant={class:"archive-search"},Cnt=["placeholder"],wnt={key:0,class:"archive-empty"},xnt={key:0,class:"archive-list"},Snt={class:"archive-workspace"},_nt={class:"path"},Int={class:"count"},Mnt={class:"setting-card"},Ent={class:"archive-meta"},Tnt={class:"archive-name"},Lnt={class:"archive-time"},Nnt={key:1,class:"archive-empty"},Fnt=100,Dnt=Qe({__name:"SettingsDialog",props:{colorScheme:{},fontScale:{},initialTab:{},managedProviderStatus:{},managedUserInfo:{},onFetchUsage:{type:Function},notify:{type:Boolean},notifyPermission:{},notifySound:{type:Boolean},config:{},models:{},configSaving:{type:Boolean},serverVersion:{},experimentalFlags:{}},emits:["setColorScheme","setFontScale","setNotify","setNotifySound","login","logout","updateConfig","close"],setup(e,{emit:t}){const{t:n}=Bt(),{sidebarTabs:i,setSidebarTabs:s}=Hh();function o(Ze){s(Ze)}const r=e,l=t,a=L(()=>r.managedProviderStatus==="authenticated"),u=L(()=>a.value?r.managedUserInfo?.nickname||n("sidebar.defaultUserName"):n("sidebar.notSignedIn")),c=L(()=>r.managedUserInfo?.userLevelName?.trim()??""),d=G(!1);qe(()=>r.managedUserInfo?.avatar,()=>{d.value=!1});const f=L(()=>!!r.managedUserInfo?.avatar&&!d.value),h=L(()=>a.value?n("settings.signedIn"):n("settings.signedOutHint")),g=G(r.initialTab??"general"),m=G(!1);let y=null;function A(){m.value=!0,y&&clearTimeout(y),y=setTimeout(()=>{m.value=!1,y=null},900)}const b=[{id:"general",labelKey:"settings.tabs.general",icon:"sliders"},{id:"agent",labelKey:"settings.tabs.agent",icon:"robot"},{id:"account",labelKey:"settings.tabs.account",icon:"user"},{id:"providers",labelKey:"settings.tabs.providers",icon:"bolt"},{id:"advanced",labelKey:"settings.tabs.advanced",icon:"microscope"},{id:"lab",labelKey:"settings.tabs.lab",icon:"flask"},{id:"archived",labelKey:"settings.tabs.archived",icon:"archive"}],C=Uke(),v=["manual","yolo","auto"],x={manual:"status.permissionManual",auto:"status.permissionAuto",yolo:"status.permissionYolo"},S=G(null);Mj(S);const{isConfirmOpen:_}=Ic();function I(Ze){Ze.key==="Escape"&&!Ze.defaultPrevented&&!_.value&&l("close")}mn(()=>document.addEventListener("keydown",I)),Mn(()=>{document.removeEventListener("keydown",I),y&&clearTimeout(y)});function M(){IB()}const $=(()=>{const Ze="0.37.1".trim()?"0.37.1":"";let Ge="";if("2026-08-18T17:19:10.899Z".trim()){const tt=new Date("2026-08-18T17:19:10.899Z");if(!Number.isNaN(tt.getTime())){const It=Ut=>String(Ut).padStart(2,"0");Ge=`${tt.getFullYear()}-${It(tt.getMonth()+1)}-${It(tt.getDate())} ${It(tt.getHours())}:${It(tt.getMinutes())}`}}const lt=Ge===""?Ze:`${Ze} · ${Ge}`;return lt===""?"-":lt})(),D=Rhe(),T=G(!1),N=G(null);async function O(){if(!T.value){T.value=!0,N.value=null;try{N.value=await D.check()}finally{T.value=!1}}}const P=L(()=>{const Ze=N.value;if(Ze===null)return"";switch(Ze.outcome){case"available":return D.status.value.state==="downloaded"?n("settings.updateCheckDownloaded",{version:Ze.version??""}):D.autoDownload.value?n("settings.updateCheckAvailableAuto",{version:Ze.version??""}):n("settings.updateCheckAvailable",{version:Ze.version??""});case"latest":return n("settings.updateCheckLatest");case"unsupported":return n("settings.updateCheckUnsupported");case"error":return n("settings.updateCheckFailed")}}),R=L(()=>{const Ze=new Map;for(const Ge of r.models??[])Ze.set(Ge.id,{id:Ge.id,label:Ge.displayName??Ge.model??Ge.id,provider:Ge.provider});for(const[Ge,lt]of Object.entries(r.config?.models??{})){if(Ze.has(Ge))continue;const tt=z(lt);Ze.set(Ge,{id:Ge,label:H(Ge,lt,tt),provider:tt??Ge})}return Array.from(Ze.values())}),q=L(()=>{const Ze=new Map;for(const Ge of R.value){const lt=Ze.get(Ge.provider)??[];lt.push(Ge),Ze.set(Ge.provider,lt)}for(const Ge of Ze.values())Ge.sort((lt,tt)=>lt.label.localeCompare(tt.label));return Array.from(Ze.entries()).toSorted(([Ge],[lt])=>Ge.localeCompare(lt)).map(([Ge,lt])=>({provider:Ge,options:lt}))}),j=L(()=>{const Ze=q.value.flatMap(Ge=>Ge.options.map(lt=>({value:lt.id,label:lt.label,group:Ge.provider})));return r.config?.defaultModel||Ze.unshift({value:"",label:n("settings.noDefaultModel"),group:"",disabled:!0}),Ze}),W=L(()=>{const Ze=r.config?.defaultPermissionMode;return Ze==="auto"||Ze==="yolo"||Ze==="manual"?Ze:"manual"});function z(Ze){if(!Ze||typeof Ze!="object")return;const Ge=Ze;return typeof Ge.provider=="string"?Ge.provider:void 0}function H(Ze,Ge,lt){if(!Ge||typeof Ge!="object")return Ze;const tt=Ge,It=typeof tt.model=="string"?tt.model:void 0,Ut=lt??z(Ge);return It&&Ut?`${Ze} (${Ut}/${It})`:It?`${Ze} (${It})`:Ze}function ee(Ze){return Ze===!0}function V(Ze){!Ze||Ze===r.config?.defaultModel||l("updateConfig",{defaultModel:Ze})}function ie(Ze){Ze!==W.value&&l("updateConfig",{defaultPermissionMode:Ze})}const se=L(()=>(r.experimentalFlags?.["secondary-model"]??r.config?.experimental?.["secondary-model"])===!0),Z=L(()=>r.config?.secondaryModel?.model??""),pe=L(()=>r.config?.secondaryModel?.defaultEffort??""),re=L(()=>Object.fromEntries((r.models??[]).map(Ze=>[Ze.id,Ze])));function fe(Ze){Ze.model===Z.value&&(Ze.effort??"")===pe.value||l("updateConfig",{secondaryModel:Ze.effort?{model:Ze.model,defaultEffort:Ze.effort}:{model:Ze.model}})}function Ee(Ze){const Ge=r.config?.[Ze];l("updateConfig",{[Ze]:!ee(Ge)})}function X(){const Ze=r.config?.thinking;return!Ze||typeof Ze!="object"?!0:Ze.enabled!==!1}function we(){l("updateConfig",{thinking:{enabled:!X()}})}function Y(){const Ze=r.config?.telemetry!==!1;l("updateConfig",{telemetry:!Ze})}function le(Ze){g.value=Ze}const Ce=Kl(),ae=L(()=>a.value&&Ce.managedMembership.value==="free"),oe=G([]),Q=G(!1),ne=G(!1),ge=G(""),Ae=G("all"),_e=G("archived-desc");async function Ke(){if(!(Q.value||ne.value)){Q.value=!0;try{const Ze=[];let Ge;for(;;){const lt=await Ce.loadArchivedSessions({beforeId:Ge,pageSize:Fnt});if(Ze.push(...lt.items),!lt.hasMore||lt.items.length===0)break;const tt=lt.items.at(-1)?.id;if(tt===void 0)break;Ge=tt}oe.value=Ze,ne.value=!0}catch(Ze){ya("loadAllArchived failed",Ze)}finally{Q.value=!1}}}qe(g,Ze=>{Ze==="archived"&&!ne.value&&Ke()},{immediate:!0});const xe=L(()=>{const Ze=new Set;for(const Ge of oe.value)Ze.add(Ge.cwd);return Array.from(Ze).sort((Ge,lt)=>Ge.localeCompare(lt))}),Ne=L(()=>[{value:"all",label:n("settings.archivedAllWorkspaces")},...xe.value.map(Ze=>({value:Ze,label:Ze}))]),et=L(()=>{const Ze=ge.value.trim().toLowerCase();let Ge=oe.value.filter(lt=>lt.archived===!0);return Ae.value!=="all"&&(Ge=Ge.filter(lt=>lt.cwd===Ae.value)),Ze&&(Ge=Ge.filter(lt=>lt.title.toLowerCase().includes(Ze))),Ge=Ge.slice(),_e.value==="archived-desc"?Ge.sort((lt,tt)=>(tt.archivedAt??tt.updatedAt).localeCompare(lt.archivedAt??lt.updatedAt)):_e.value==="created-desc"?Ge.sort((lt,tt)=>tt.createdAt.localeCompare(lt.createdAt)):Ge.sort((lt,tt)=>lt.title.localeCompare(tt.title,"zh")),Ge}),ut=L(()=>{const Ze=new Map;for(const Ge of et.value){const lt=Ze.get(Ge.cwd)??[];lt.push(Ge),Ze.set(Ge.cwd,lt)}return Array.from(Ze.entries()).map(([Ge,lt])=>({cwd:Ge,items:lt}))});async function yt(Ze){await Ce.restoreSession(Ze)&&(oe.value=oe.value.filter(lt=>lt.id!==Ze))}function Mt(Ze){const Ge=new Date(Ze);if(Number.isNaN(Ge.getTime()))return Ze;const lt=tt=>String(tt).padStart(2,"0");return`${Ge.getFullYear()}-${lt(Ge.getMonth()+1)}-${lt(Ge.getDate())} ${lt(Ge.getHours())}:${lt(Ge.getMinutes())}`}return(Ze,Ge)=>(k(),de(p(bc),{open:!0,"close-on-esc":!1,"aria-label":p(n)("settings.title"),size:"xl",height:"fixed",padded:!1,level:"grouped",onClose:Ge[16]||(Ge[16]=lt=>l("close"))},{default:he(()=>[w("div",{ref_key:"dialogRef",ref:S,class:"sd"},[w("nav",{class:"settings-tabs",role:"tablist","aria-label":p(n)("settings.title")},[w("header",uet,[w("h2",cet,F(p(n)("settings.title")),1)]),w("div",det,[(k(),E(Te,null,ht(b,lt=>w("button",{key:lt.id,type:"button",class:Fe(["tab",{on:g.value===lt.id}]),role:"tab","aria-selected":g.value===lt.id,onClick:tt=>le(lt.id)},[K(p(ve),{name:lt.icon,size:"md"},null,8,["name"]),w("span",null,F(p(n)(lt.labelKey)),1)],10,fet)),64))])],8,aet),w("section",het,[w("header",pet,[K(p(tn),{size:"sm",label:p(n)("settings.close"),tooltip:p(n)("settings.close"),onClick:Ge[0]||(Ge[0]=lt=>l("close"))},{default:he(()=>[K(p(ve),{name:"close",size:"md"})]),_:1},8,["label","tooltip"])]),w("div",{class:Fe(["body",{scrolling:m.value}]),onScroll:A},[$n(w("section",get,[w("section",met,[w("h3",vet,F(p(n)("settings.appearance")),1),w("div",yet,[w("div",ket,[w("span",bet,[$e(F(p(n)("theme.colorSchemeLabel"))+" ",1),w("span",Aet,F(p(n)("settings.colorSchemeHint")),1)]),K(p(Mo),{"model-value":e.colorScheme,options:[{value:"light",label:p(n)("theme.light"),icon:"light-mode"},{value:"dark",label:p(n)("theme.dark"),icon:"dark-mode"},{value:"system",label:p(n)("theme.system")}],"onUpdate:modelValue":Ge[1]||(Ge[1]=lt=>l("setColorScheme",lt))},null,8,["model-value","options"])]),w("div",Cet,[w("span",wet,[$e(F(p(n)("sidebar.language"))+" ",1),w("span",xet,F(p(n)("settings.languageHint")),1)]),K(Ej)]),w("div",_et,[w("span",Iet,[$e(F(p(n)("settings.uiFontSize"))+" ",1),w("span",Met,F(p(n)("settings.uiFontSizeHint")),1)]),K(p(Mo),{"model-value":e.fontScale,options:[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],"aria-label":p(n)("settings.uiFontSize"),"onUpdate:modelValue":Ge[2]||(Ge[2]=lt=>l("setFontScale",lt))},null,8,["model-value","aria-label"])])])]),w("section",Eet,[w("h3",Tet,F(p(n)("settings.notifications")),1),w("div",Let,[w("div",Net,[w("span",Fet,[$e(F(p(n)("settings.notifyEnabled"))+" ",1),w("span",Det,F(p(n)("settings.notifyEnabledHint")),1),e.notifyPermission==="denied"?(k(),E("span",$et,F(p(n)("settings.notifyDenied")),1)):te("",!0)]),K(p(Gc),{"model-value":e.notify,disabled:e.notifyPermission==="denied",label:p(n)("settings.notifyEnabled"),"onUpdate:modelValue":Ge[3]||(Ge[3]=lt=>l("setNotify",lt))},null,8,["model-value","disabled","label"])]),w("div",Bet,[w("span",zet,[$e(F(p(n)("settings.notifySound"))+" ",1),w("span",Ret,F(p(n)("settings.notifySoundHint")),1)]),K(p(Gc),{"model-value":e.notifySound,label:p(n)("settings.notifySound"),"onUpdate:modelValue":Ge[4]||(Ge[4]=lt=>l("setNotifySound",lt))},null,8,["model-value","label"])])])])],512),[[Qi,g.value==="general"]]),$n(w("section",Oet,[w("section",Pet,[w("h3",jet,F(p(n)("settings.account")),1),w("div",Het,[w("div",Wet,[w("span",qet,[f.value?(k(),E("img",{key:0,src:r.managedUserInfo?.avatar,alt:"",onError:Ge[5]||(Ge[5]=lt=>d.value=!0)},null,40,Uet)):(k(),de(p(ve),{key:1,name:"user",size:"md"}))]),w("span",Ket,[w("span",Vet,[w("span",Zet,F(u.value),1),c.value?(k(),de(p(va),{key:0,class:"account-level",variant:"neutral",size:"sm"},{default:he(()=>[$e(F(c.value),1)]),_:1})):te("",!0)]),w("span",Get,F(h.value),1)]),a.value?(k(),de(p(Zt),{key:0,variant:"danger-soft",size:"sm",onClick:Ge[6]||(Ge[6]=lt=>l("logout"))},{default:he(()=>[$e(F(p(n)("sidebar.signOut")),1)]),_:1})):(k(),de(p(Zt),{key:1,variant:"primary",size:"sm",onClick:Ge[7]||(Ge[7]=lt=>l("login"))},{default:he(()=>[$e(F(p(n)("sidebar.signIn")),1)]),_:1}))])])]),ae.value?(k(),de(Lj,{key:0})):a.value?(k(),de(UXe,{key:1,"on-fetch-usage":r.onFetchUsage},null,8,["on-fetch-usage"])):te("",!0)],512),[[Qi,g.value==="account"]]),g.value==="providers"?(k(),E("section",Qet,[K(oXe)])):te("",!0),$n(w("section",Yet,[w("section",Jet,[w("div",Xet,[w("h3",ett,F(p(n)("settings.agentDefaults")),1)]),w("div",ttt,[e.config?(k(),E(Te,{key:0},[w("div",ntt,[w("span",itt,[$e(F(p(n)("settings.defaultModel"))+" ",1),w("span",stt,F(p(n)("settings.defaultModelHint")),1)]),q.value.length>0?(k(),E("div",ott,[K(p(Jk),{"model-value":e.config.defaultModel??"",options:j.value,"aria-label":p(n)("settings.defaultModel"),"onUpdate:modelValue":V},null,8,["model-value","options","aria-label"])])):(k(),E("span",rtt,F(e.config.defaultModel??p(n)("settings.noDefaultModel")),1))]),w("div",ltt,[w("span",att,[$e(F(p(n)("settings.defaultPermission"))+" ",1),w("span",utt,F(p(n)("settings.defaultPermissionHint")),1)]),K(p(Mo),{"model-value":W.value,options:v.map(lt=>({value:lt,label:p(n)(x[lt])})),"onUpdate:modelValue":Ge[8]||(Ge[8]=lt=>ie(lt))},null,8,["model-value","options"])]),w("div",ctt,[w("span",dtt,[$e(F(p(n)("settings.defaultThinking"))+" ",1),w("span",ftt,F(p(n)("settings.defaultThinkingHint")),1)]),K(p(Gc),{"model-value":X(),label:p(n)("settings.defaultThinking"),"onUpdate:modelValue":Ge[9]||(Ge[9]=lt=>we())},null,8,["model-value","label"])]),w("div",htt,[w("span",ptt,[$e(F(p(n)("settings.defaultPlanMode"))+" ",1),w("span",gtt,F(p(n)("settings.defaultPlanModeHint")),1)]),K(p(Gc),{"model-value":ee(e.config.defaultPlanMode),label:p(n)("settings.defaultPlanMode"),"onUpdate:modelValue":Ge[10]||(Ge[10]=lt=>Ee("defaultPlanMode"))},null,8,["model-value","label"])])],64)):(k(),E("div",mtt,F(p(n)("settings.configUnavailable")),1))])]),e.config&&se.value?(k(),E("section",vtt,[w("div",ytt,[w("h3",ktt,F(p(n)("settings.secondaryModelSection")),1)]),w("div",btt,[w("div",Att,[w("span",Ctt,[$e(F(p(n)("settings.secondaryModel"))+" ",1),w("span",wtt,F(p(n)("settings.secondaryModelHint")),1)]),q.value.length>0?(k(),E("div",xtt,[K(ret,{"model-value":Z.value,effort:pe.value,groups:q.value,"model-info-by-id":re.value,onSelect:fe},null,8,["model-value","effort","groups","model-info-by-id"])])):(k(),E("span",Stt,F(Z.value||p(n)("settings.noSecondaryModel")),1))])])])):te("",!0)],512),[[Qi,g.value==="agent"]]),$n(w("section",_tt,[w("section",Itt,[w("h3",Mtt,F(p(n)("settings.versionAndUpdates")),1),w("div",Ett,[w("div",Ttt,[w("span",Ltt,[$e(F(p(n)("settings.appVersion"))+" ",1),w("span",Ntt,F(p(n)("settings.appVersionHint")),1)]),w("span",Ftt,F(p($)),1)]),w("div",Dtt,[w("span",$tt,[$e(F(p(n)("settings.serverVersion"))+" ",1),w("span",Btt,F(p(n)("settings.serverVersionHint")),1)]),w("span",ztt,F(e.serverVersion||"-"),1)]),w("div",Rtt,[w("span",Ott,[$e(F(p(n)("settings.serverAddress"))+" ",1),w("span",Ptt,F(p(n)("settings.serverAddressHint")),1)]),w("span",jtt,F(p(C)),1)]),p(D).canCheck?(k(),E("div",Htt,[w("span",Wtt,[$e(F(p(n)("settings.checkUpdate"))+" ",1),P.value?(k(),E("span",qtt,F(P.value),1)):(k(),E("span",Utt,F(p(n)("settings.checkUpdateHint")),1))]),K(p(Zt),{variant:"secondary",size:"sm",disabled:T.value,onClick:O},{default:he(()=>[$e(F(T.value?p(n)("settings.updateChecking"):p(n)("settings.checkUpdateBtn")),1)]),_:1},8,["disabled"])])):te("",!0),p(D).canToggleAutoDownload?(k(),E("div",Ktt,[w("span",Vtt,[$e(F(p(n)("settings.autoDownloadUpdate"))+" ",1),w("span",Ztt,F(p(n)("settings.autoDownloadUpdateHint")),1)]),K(p(Gc),{"model-value":p(D).autoDownload.value,label:p(n)("settings.autoDownloadUpdate"),"onUpdate:modelValue":Ge[11]||(Ge[11]=lt=>p(D).setAutoDownload(lt,"settings"))},null,8,["model-value","label"])])):te("",!0)])]),e.config?(k(),E("section",Gtt,[w("h3",Qtt,F(p(n)("settings.privacy")),1),w("div",Ytt,[w("div",Jtt,[w("span",Xtt,[$e(F(p(n)("settings.telemetry"))+" ",1),w("span",ent,F(p(n)("settings.telemetryHint")),1),w("span",tnt,F(p(n)("settings.telemetryRestartHint")),1)]),K(p(Gc),{"model-value":e.config.telemetry!==!1,disabled:e.configSaving,label:p(n)("settings.telemetry"),"onUpdate:modelValue":Ge[12]||(Ge[12]=lt=>Y())},null,8,["model-value","disabled","label"])])])])):te("",!0),w("section",nnt,[w("h3",int,F(p(n)("settings.diagnostics")),1),w("div",snt,[w("div",ont,[w("span",rnt,[$e(F(p(n)("settings.exportLog"))+" ",1),w("span",lnt,F(p(n)("settings.exportLogHint")),1),p(Zl)()?te("",!0):(k(),E("span",ant,F(p(n)("settings.logHint")),1))]),K(p(Zt),{variant:"secondary",size:"sm",onClick:M},{default:he(()=>[$e(F(p(n)("settings.exportLogBtn")),1)]),_:1})])])])],512),[[Qi,g.value==="advanced"]]),$n(w("section",unt,[w("section",cnt,[w("h3",dnt,F(p(n)("settings.tabs.lab")),1),w("div",fnt,[w("div",hnt,[w("span",pnt,[$e(F(p(n)("settings.lab.sidebarTabs"))+" ",1),w("span",gnt,F(p(n)("settings.lab.sidebarTabsHint")),1)]),K(p(Gc),{"model-value":p(i),label:p(n)("settings.lab.sidebarTabs"),"onUpdate:modelValue":o},null,8,["model-value","label"])])])])],512),[[Qi,g.value==="lab"]]),$n(w("section",mnt,[w("div",vnt,[w("h4",ynt,F(p(n)("settings.archivedTitle")),1),w("p",knt,F(p(n)("settings.archivedDesc")),1)]),w("div",bnt,[w("label",Ant,[Ge[17]||(Ge[17]=w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"},[w("circle",{cx:"11",cy:"11",r:"7"}),w("path",{d:"m21 21-4.3-4.3"})],-1)),$n(w("input",{"onUpdate:modelValue":Ge[13]||(Ge[13]=lt=>ge.value=lt),placeholder:p(n)("settings.archivedSearch")},null,8,Cnt),[[uo,ge.value]])]),K(p(Jk),{"model-value":Ae.value,options:Ne.value,size:"sm","aria-label":p(n)("settings.archivedAllWorkspaces"),"onUpdate:modelValue":Ge[14]||(Ge[14]=lt=>Ae.value=lt)},null,8,["model-value","options","aria-label"]),K(p(Mo),{size:"sm","model-value":_e.value,options:[{value:"archived-desc",label:p(n)("settings.archivedSortArchived"),icon:"clock"},{value:"created-desc",label:p(n)("settings.archivedSortCreated"),icon:"calendar-schedule"},{value:"name-asc",label:p(n)("settings.archivedSortName"),icon:"sort"}],"onUpdate:modelValue":Ge[15]||(Ge[15]=lt=>_e.value=lt)},null,8,["model-value","options"])]),Q.value?(k(),E("div",wnt,F(p(n)("settings.archivedLoadingAll")),1)):(k(),E(Te,{key:1},[ut.value.length>0?(k(),E("div",xnt,[(k(!0),E(Te,null,ht(ut.value,lt=>(k(),E("section",{key:lt.cwd,class:"archive-card"},[w("div",Snt,[K(p(ve),{name:"folder-closed",size:"md"}),w("span",_nt,F(lt.cwd),1),w("span",Int,F(p(n)("settings.archivedSessionsCount",{count:lt.items.length})),1)]),w("div",Mnt,[(k(!0),E(Te,null,ht(lt.items,tt=>(k(),E("div",{key:tt.id,class:"archive-row"},[w("div",Ent,[w("div",Tnt,F(tt.title),1),w("div",Lnt,F(p(n)("settings.archivedAt",{time:Mt(tt.archivedAt??tt.updatedAt)})),1)]),K(p(Zt),{variant:"secondary",size:"sm",onClick:It=>yt(tt.id)},{default:he(()=>[K(p(ve),{name:"undo",size:"sm"}),w("span",null,F(p(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128))])]))),128))])):(k(),E("div",Nnt,F(oe.value.length===0?p(n)("settings.archivedEmpty"):p(n)("settings.archivedNoMatch")),1))],64))],512),[[Qi,g.value==="archived"]])],34)])],512)]),_:1},8,["aria-label"]))}}),$nt=gt(Dnt,[["__scopeId","data-v-347803bd"]]),Bnt={class:"aw"},znt={class:"crumbbar"},Rnt={class:"crumbs"},Ont={key:0,class:"crumb-sep"},Pnt=["onClick"],jnt={key:0,class:"filterbar"},Hnt=["placeholder"],Wnt={class:"folder-list"},qnt={key:0,class:"fl-loading"},Unt=["onClick"],Knt={class:"folder-name search-rel"},Vnt={key:0,class:"fl-empty"},Znt={key:1,class:"fl-loading"},Gnt=["onClick"],Qnt={class:"folder-name"},Ynt={key:0,class:"fl-empty"},Jnt={class:"paste-row"},Xnt={class:"paste-input-wrap"},eit={key:1,class:"add-error",role:"alert"},tit={class:"actions"},nit={class:"footer-hint"},iit=600,sit=6,tL=150,oit=Qe({__name:"AddWorkspaceDialog",props:{browseFs:{type:Function},getFsHome:{type:Function},defaultPath:{},error:{}},emits:["add","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G(!0),r=G(!1),l=G(!1),a=G(""),u=G(null),c=G([]),d=G(""),f=G(!1),h=G([]),g=L(()=>d.value.trim().length>0);let m=0,y=null;function A(j,W){const z=j.toLowerCase(),H=W.toLowerCase();let ee=0;for(let V=0;V<H.length&&ee<z.length;V++)H[V]===z[ee]&&ee++;return ee===z.length}async function b(j){const W=a.value,z=j.trim();if(!W||z===""){h.value=[],f.value=!1;return}const H=++m;f.value=!0;const ee=[],V=[{path:W,depth:0}];let ie=0;for(;V.length>0&&ie<iit&&ee.length<tL;){if(H!==m)return;const se=V.shift();ie++;let Z;try{Z=await i.browseFs(se.path)}catch{continue}if(H!==m)return;for(const pe of Z.entries){if(!pe.isDir)continue;const re=pe.path.startsWith(W)?pe.path.slice(W.length).replace(/^\/+/,""):pe.path;if(A(z,re||pe.name)&&(ee.push({path:pe.path,name:pe.name,rel:re||pe.name}),ee.length>=tL))break;se.depth+1<sit&&V.push({path:pe.path,depth:se.depth+1})}H===m&&(h.value=[...ee])}H===m&&(f.value=!1)}qe(d,j=>{if(y&&clearTimeout(y),j.trim()===""){m++,h.value=[],f.value=!1;return}y=setTimeout(()=>void b(j),220)});const C=G(!1),v=G(""),x=L(()=>v.value.trim()),S=L(()=>{const j=a.value;if(!j)return[];const W=j.split("/").filter(Boolean),z=[{label:"/",path:"/"}];let H="";for(const ee of W)H+=`/${ee}`,z.push({label:ee,path:H});return z}),_=L(()=>a.value.length>0);async function I(j){r.value=!0;try{const W=await i.browseFs(j);if(!W.path){l.value=!0;return}a.value=W.path,u.value=W.parent,c.value=W.entries,d.value="",l.value=!1}catch{l.value=!0}finally{r.value=!1}}function M(j){j.isDir&&I(j.path)}function $(){u.value&&I(u.value)}function D(){_.value&&s("add",a.value)}function T(){x.value.length!==0&&s("add",x.value)}const{handleCompositionStart:N,handleCompositionEnd:O,isComposingKeyEvent:P}=Xr();function R(j){P(j)||T()}function q(j){j.key==="Escape"&&P(j)&&j.stopPropagation()}return mn(async()=>{r.value=!0;try{if(i.defaultPath&&(await I(i.defaultPath),!l.value))return;const j=await i.getFsHome();j.home?await I(j.home):l.value=!0}catch{l.value=!0}finally{r.value=!1}}),Mn(()=>{y&&clearTimeout(y)}),(j,W)=>(k(),de(p(bc),{open:o.value,"onUpdate:open":W[5]||(W[5]=z=>o.value=z),title:p(n)("workspace.addTitle"),size:"lg",height:"fixed",padded:!1,onClose:W[6]||(W[6]=z=>s("close"))},{default:he(()=>[w("div",Bnt,[l.value?te("",!0):(k(),E(Te,{key:0},[w("div",znt,[K(p(tn),{size:"sm",disabled:!u.value,label:p(n)("workspace.up"),tooltip:p(n)("workspace.up"),onClick:$},{default:he(()=>[K(p(ve),{name:"arrow-up",size:"md"})]),_:1},8,["disabled","label","tooltip"]),w("div",Rnt,[(k(!0),E(Te,null,ht(S.value,(z,H)=>(k(),E(Te,{key:z.path},[H>1?(k(),E("span",Ont,"/")):te("",!0),w("button",{class:Fe(["crumb",{last:H===S.value.length-1}]),onClick:ee=>I(z.path)},F(z.label),11,Pnt)],64))),128))])]),r.value?te("",!0):(k(),E("div",jnt,[K(p(ve),{class:"filter-icon",name:"search",size:"md"}),$n(w("input",{"onUpdate:modelValue":W[0]||(W[0]=z=>d.value=z),class:"filter-input",type:"text",placeholder:p(n)("workspace.searchPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:W[1]||(W[1]=Ct(()=>{},["stop"]))},null,40,Hnt),[[uo,d.value]]),f.value?(k(),de(p(Mi),{key:0,size:"sm"})):te("",!0)])),w("div",Wnt,[r.value?(k(),E("div",qnt,F(p(n)("workspace.browsing")),1)):g.value?(k(),E(Te,{key:1},[(k(!0),E(Te,null,ht(h.value,z=>(k(),E("button",{key:z.path,class:"folder-row",onClick:H=>I(z.path)},[K(p(ve),{class:"dir-icon",name:"folder-closed",size:"sm"}),w("span",Knt,F(z.rel),1)],8,Unt))),128)),!f.value&&h.value.length===0?(k(),E("div",Vnt,F(p(n)("workspace.noFilterMatch",{q:d.value.trim()})),1)):f.value&&h.value.length===0?(k(),E("div",Znt,F(p(n)("workspace.searching")),1)):te("",!0)],64)):(k(),E(Te,{key:2},[(k(!0),E(Te,null,ht(c.value,z=>(k(),E("button",{key:z.path,class:"folder-row",onClick:H=>M(z)},[K(p(ve),{class:"dir-icon",name:"folder-closed",size:"sm"}),w("span",Qnt,F(z.name),1)],8,Gnt))),128)),c.value.length===0?(k(),E("div",Ynt,F(p(n)("workspace.noSubfolders")),1)):te("",!0)],64))])],64)),w("div",{class:Fe(["paste-section",{"paste-only":l.value}])},[!l.value&&!C.value?(k(),de(p(Zt),{key:0,variant:"ghost",size:"sm",onClick:W[2]||(W[2]=z=>C.value=!0)},{default:he(()=>[$e(F(p(n)("workspace.pasteToggle")),1)]),_:1})):(k(),de(p(RG),{key:1,label:p(n)("workspace.pathLabel")},{default:he(()=>[w("div",Jnt,[w("div",Xnt,[K(p(wo),{modelValue:v.value,"onUpdate:modelValue":W[3]||(W[3]=z=>v.value=z),placeholder:p(n)("workspace.pathPlaceholder"),autocomplete:"off",spellcheck:"false",onKeydown:[_s(Ct(R,["stop"]),["enter"]),q],onCompositionstart:p(N),onCompositionend:p(O)},null,8,["modelValue","placeholder","onKeydown","onCompositionstart","onCompositionend"])]),K(p(tn),{disabled:x.value.length===0,label:p(n)("workspace.add"),tooltip:p(n)("workspace.add"),onClick:T},{default:he(()=>[K(p(ve),{name:"plus",size:"md"})]),_:1},8,["disabled","label","tooltip"])])]),_:1},8,["label"]))],2),e.error?(k(),E("div",eit,F(e.error),1)):te("",!0),w("div",tit,[K(p(kn),{text:a.value},{default:he(()=>[l.value?te("",!0):(k(),de(p(Zt),{key:0,variant:"primary",disabled:!_.value,onClick:D},{default:he(()=>[$e(F(p(n)("workspace.openThisFolder")),1)]),_:1},8,["disabled"]))]),_:1},8,["text"]),K(p(Zt),{variant:"secondary",onClick:W[4]||(W[4]=z=>s("close"))},{default:he(()=>[$e(F(p(n)("workspace.cancel")),1)]),_:1})]),w("div",nit,F(p(n)("workspace.browseHint")),1)])]),_:1},8,["open","title"]))}}),rit=gt(oit,[["__scopeId","data-v-fea98be5"]]),lit={key:0,class:"confirm-dialog__message"},ait=Qe({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmLabel:{},cancelLabel:{},variant:{default:"danger"},loading:{type:Boolean}},emits:["update:open","confirm","cancel"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt();function o(){n.loading||(i("update:open",!1),i("cancel"))}function r(l){if(l.key!=="Enter"||!n.open||n.loading)return;const a=l.target;a instanceof HTMLButtonElement||a instanceof HTMLAnchorElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement||a instanceof HTMLInputElement||(l.preventDefault(),i("confirm"))}return typeof window<"u"&&window.addEventListener("keydown",r),Gn(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(l,a)=>(k(),de(p(bc),{open:e.open,title:e.title,height:"auto","initial-focus":".confirm-dialog__confirm","close-on-esc":!e.loading,"close-on-overlay":!e.loading,"onUpdate:open":a[1]||(a[1]=u=>i("update:open",u)),onClose:o},{foot:he(()=>[K(p(Zt),{variant:"secondary",disabled:e.loading,onClick:o},{default:he(()=>[$e(F(e.cancelLabel??p(s)("common.cancel")),1)]),_:1},8,["disabled"]),K(p(Zt),{class:"confirm-dialog__confirm",variant:e.variant,loading:e.loading,onClick:a[0]||(a[0]=u=>i("confirm"))},{default:he(()=>[$e(F(e.confirmLabel??p(s)("common.confirm")),1)]),_:1},8,["variant","loading"])]),default:he(()=>[e.message?(k(),E("p",lit,F(e.message),1)):te("",!0)]),_:1},8,["open","title","close-on-esc","close-on-overlay"]))}}),uit=gt(ait,[["__scopeId","data-v-aa5422da"]]),cit=Qe({__name:"ConfirmDialogHost",setup(e){const{current:t,busy:n,settle:i,runAction:s}=Ic();function o(){s()}return(r,l)=>p(t)!==null?(k(),de(uit,{key:0,open:!0,title:p(t).title,message:p(t).message,"confirm-label":p(t).confirmLabel,"cancel-label":p(t).cancelLabel,variant:p(t).variant,loading:p(n),onConfirm:o,onCancel:l[0]||(l[0]=a=>p(i)(!1))},null,8,["title","message","confirm-label","cancel-label","variant","loading"])):te("",!0)}}),dit={class:"rows"},fit={class:"row"},hit={class:"row"},pit={class:"row"},git={class:"row"},mit={class:"row"},vit={class:"row"},yit={class:"ctx-text"},kit={key:0,class:"bar"},bit={class:"row"},Ait=Qe({__name:"StatusPanel",props:{status:{},thinking:{},planMode:{type:Boolean},swarmMode:{type:Boolean},costUsd:{}},emits:["close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G(!0),r=L(()=>i.status.ctxMax<=0?0:Math.min(100,Math.max(0,Math.ceil(i.status.ctxUsed/i.status.ctxMax*100)))),l=L(()=>i.status.ctxMax>0?n("status.statusContextValue",{used:ou(i.status.ctxUsed),max:ou(i.status.ctxMax),pct:r.value}):n("status.statusNone"));function a(g){return n(g==="yolo"?"status.permissionYolo":g==="auto"?"status.permissionAuto":"status.permissionManual")}const u=L(()=>{const g=i.status.permission;return g==="auto"?"var(--color-danger)":g==="yolo"?"var(--color-warning)":"var(--color-text)"}),c=L(()=>i.planMode?n("status.planOn"):n("status.planOff")),d=L(()=>i.swarmMode?n("status.swarmOn"):n("status.swarmOff")),f=L(()=>typeof i.costUsd=="number"&&i.costUsd>0),h=L(()=>f.value?`$${i.costUsd.toFixed(4)}`:n("status.statusNone"));return(g,m)=>(k(),de(p(bc),{open:o.value,"onUpdate:open":m[0]||(m[0]=y=>o.value=y),title:p(n)("status.statusPanelTitle"),onClose:m[1]||(m[1]=y=>s("close"))},{default:he(()=>[w("dl",dit,[w("div",fit,[w("dt",null,F(p(n)("status.statusModel")),1),w("dd",null,F(e.status.model),1)]),w("div",hit,[w("dt",null,F(p(n)("status.statusThinking")),1),w("dd",null,F(e.thinking),1)]),w("div",pit,[w("dt",null,F(p(n)("status.statusPermission")),1),w("dd",{style:qt({color:u.value})},F(a(e.status.permission)),5)]),w("div",git,[w("dt",null,F(p(n)("status.statusPlanMode")),1),w("dd",{class:Fe({"plan-on":e.planMode})},F(c.value),3)]),w("div",mit,[w("dt",null,F(p(n)("status.statusSwarmMode")),1),w("dd",{class:Fe({"swarm-on":e.swarmMode})},F(d.value),3)]),w("div",vit,[w("dt",null,F(p(n)("status.statusContext")),1),w("dd",null,[w("span",yit,F(l.value),1),e.status.ctxMax>0?(k(),E("span",kit,[w("i",{style:qt({width:r.value+"%"})},null,4)])):te("",!0)])]),w("div",bit,[w("dt",null,F(p(n)("status.statusCost")),1),w("dd",null,F(h.value),1)])])]),_:1},8,["open","title"]))}}),Cit=gt(Ait,[["__scopeId","data-v-340d1b31"]]),wit={key:0,class:"actions"},xit=["onClick"],Sit=["onClick"],_it={key:1,class:"details"},Iit=Qe({__name:"WarningToasts",props:{warnings:{}},emits:["dismiss"],setup(e,{emit:t}){const n=e,i=t,{t:s}=Bt();function o(M){return typeof M=="object"&&M!==null}function r(M){return o(M)?M.title:M}function l(M){return o(M)?M.message??"":""}function a(M){return o(M)?M.details:void 0}function u(M){return o(M)?M.severity==="error":M.startsWith(`${s("warnings.errorLabel")}:`)||/\b4\d\d\b|error|失败|failed/i.test(M)}function c(M){return o(M)?M.severity==="error"?"danger":M.severity==="success"?"success":M.severity==="info"?"info":"warning":u(M)?"danger":"warning"}function d(M){return o(M)?`notice:${M.severity}:${M.title}:${M.message??""}:${JSON.stringify(M.details??[])}`:`text:${M}`}function f(M){if(!o(M))return M;const $=[M.title];M.message&&$.push(M.message);const D=M.details??[];if(D.length>0){$.push("",`${s("warnings.diagnostics")}:`);for(const T of D)$.push(`${T.label}: ${T.value}`)}return $.join(` +`)}let h=1;const g=G([]),m=new Map,y=new Map;function A(M){const $=u(M)?12e3:6e3;return typeof window<"u"&&window.matchMedia?.("(hover: none)").matches===!0?$+5e3:$}function b(M,$){const D=m.get(M)??{handle:null,deadline:0,remaining:0};D.handle=setTimeout(()=>I(M),$),D.deadline=Date.now()+$,m.set(M,D)}function C(M){const $=m.get(M);$&&$.handle!==null&&clearTimeout($.handle),m.delete(M)}function v(M){const $=m.get(M);!$||$.handle===null||(clearTimeout($.handle),$.handle=null,$.remaining=Math.max(0,$.deadline-Date.now()))}function x(M){if(g.value.find(T=>T.id===M)?.detailsOpen)return;const D=m.get(M);!D||D.handle!==null||b(M,D.remaining)}function S(M){M.detailsOpen=!M.detailsOpen,M.detailsOpen?v(M.id):x(M.id)}async function _(M){if(!await ao(f(M.warning)))return;M.copied=!0;const D=y.get(M.id);D&&clearTimeout(D),y.set(M.id,setTimeout(()=>{M.copied=!1,y.delete(M.id)},1400))}function I(M){C(M);const $=y.get(M);$&&clearTimeout($),y.delete(M);const D=g.value.findIndex(T=>T.id===M);D!==-1&&(g.value=g.value.filter(T=>T.id!==M),i("dismiss",D))}return qe(()=>n.warnings,M=>{const $=[...g.value];g.value=M.map(D=>{const T=d(D),N=$.findIndex(R=>R.key===T),O=N===-1?void 0:$.splice(N,1)[0];if(O)return O.warning=D,O;const P={id:h++,key:T,warning:D,detailsOpen:!1,copied:!1};return b(P.id,A(D)),P});for(const D of $){C(D.id);const T=y.get(D.id);T&&clearTimeout(T),y.delete(D.id)}},{immediate:!0,flush:"post"}),Mn(()=>{m.forEach(M=>{M.handle!==null&&clearTimeout(M.handle)}),m.clear(),y.forEach(M=>clearTimeout(M)),y.clear()}),(M,$)=>(k(),de(EN,{name:"toast",tag:"div",class:"toasts",role:"status","aria-live":"polite"},{default:he(()=>[(k(!0),E(Te,null,ht(g.value,D=>(k(),de(p(AQ),{key:D.id,variant:c(D.warning),title:r(D.warning),message:l(D.warning),"dismiss-label":p(s)("warnings.dismiss"),onDismiss:T=>I(D.id),onPointerenter:T=>v(D.id),onPointerleave:T=>x(D.id)},{default:he(()=>[a(D.warning)?.length?(k(),E("div",wit,[w("button",{class:"link",type:"button",onClick:T=>S(D)},F(D.detailsOpen?p(s)("warnings.hideDetails"):p(s)("warnings.showDetails")),9,xit),w("button",{class:"link",type:"button",onClick:T=>_(D)},F(D.copied?p(s)("warnings.copied"):p(s)("warnings.copyDetails")),9,Sit)])):te("",!0),D.detailsOpen&&a(D.warning)?.length?(k(),E("dl",_it,[(k(!0),E(Te,null,ht(a(D.warning),T=>(k(),E("div",{key:`${T.label}:${T.value}`,class:"detail-row"},[w("dt",null,F(T.label),1),w("dd",null,F(T.value),1)]))),128))])):te("",!0)]),_:2},1032,["variant","title","message","dismiss-label","onDismiss","onPointerenter","onPointerleave"]))),128))]),_:1}))}}),Mit=gt(Iit,[["__scopeId","data-v-ac44e9ef"]]),Eit={class:"topbar"},Tit={class:"wsq"},Lit=["aria-label"],Nit={class:"tb-path"},Fit={class:"ws"},Dit={class:"se"},$it={class:"tb-sub"},Bit=Qe({__name:"MobileTopBar",props:{workspace:{default:null},sessionTitle:{default:""},running:{type:Boolean,default:!1},branch:{default:""},sessionCount:{default:0}},emits:["openSwitcher","openSettings"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=L(()=>{const a=i.workspace,c=(a?.name||a?.root||"").trim().charAt(0);return c?c.toUpperCase():"K"}),r=L(()=>i.workspace?.name??n("workspace.noWorkspace")),l=L(()=>i.running?n("mobile.running"):n("mobile.idle"));return(a,u)=>(k(),E("div",Eit,[w("span",Tit,F(o.value),1),w("button",{type:"button",class:"tb-mid","aria-label":p(n)("mobile.openSwitcher"),onClick:u[0]||(u[0]=c=>s("openSwitcher"))},[w("span",Nit,[w("span",Fit,F(r.value),1),e.sessionTitle?(k(),E(Te,{key:0},[u[2]||(u[2]=w("span",{class:"sl"},"/",-1)),w("span",Dit,F(e.sessionTitle),1)],64)):te("",!0),u[3]||(u[3]=w("span",{class:"cv"},"⌄",-1))]),w("span",$it,[w("span",{class:Fe(["rd",{on:e.running}])},null,2),w("span",null,F(l.value),1),e.branch?(k(),E(Te,{key:0},[$e(" · "+F(e.branch),1)],64)):te("",!0),e.sessionCount>0?(k(),E(Te,{key:1},[$e(" · "+F(p(n)("mobile.sessionCount",{n:e.sessionCount})),1)],64)):te("",!0)])],8,Lit),K(p(tn),{size:"lg",label:p(n)("mobile.openSettings"),onClick:u[1]||(u[1]=c=>s("openSettings"))},{default:he(()=>[K(p(ve),{name:"sliders",size:"lg"})]),_:1},8,["label"])]))}}),zit=gt(Bit,[["__scopeId","data-v-7f357087"]]),Rit={key:0,class:"sheet-root"},Oit=["aria-label"],Pit=["aria-label"],jit={key:0,class:"sheet-head"},Hit={class:"sheet-title"},Wit={class:"sheet-body"},qit=Qe({__name:"BottomSheet",props:{modelValue:{type:Boolean},title:{default:""},closeOnEsc:{type:Boolean,default:!0}},emits:["update:modelValue","close"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(){s("update:modelValue",!1),s("close")}function r(l){l.key==="Escape"&&i.closeOnEsc&&o()}return qe(()=>i.modelValue,l=>{typeof document>"u"||(l?document.addEventListener("keydown",r):document.removeEventListener("keydown",r))},{immediate:!0}),Mn(()=>{typeof document<"u"&&document.removeEventListener("keydown",r)}),(l,a)=>(k(),de(ls,{name:"sheet"},{default:he(()=>[e.modelValue?(k(),E("div",Rit,[w("div",{class:"sheet-scrim",onClick:o}),w("div",{class:"sheet-panel",role:"dialog","aria-label":e.title||p(n)("mobile.sheetLabel")},[w("button",{type:"button",class:"sheet-grab","aria-label":p(n)("mobile.closeSheet"),onClick:o},null,8,Pit),e.title?(k(),E("div",jit,[w("span",Hit,F(e.title),1)])):te("",!0),w("div",Wit,[Rn(l.$slots,"default",{},void 0,!0)])],8,Oit)])):te("",!0)]),_:3}))}}),Nj=gt(qit,[["__scopeId","data-v-c3d5dadc"]]),Uit={class:"mlist"},Kit={key:0,class:"mempty"},Vit=["onClick"],Zit={class:"mgh-main"},Git={class:"mgh-name"},Qit={class:"mgh-path"},Yit={key:2,class:"att"},Jit={key:0,class:"mempty small"},Xit=["onClick"],est={class:"m"},tst={class:"s"},nst={key:0,class:"att"},ist={key:1,class:"mshow-more-row"},sst=["disabled","onClick"],ost={key:1,class:"mshow-more-sep","aria-hidden":"true"},rst=["onClick"],lst=Qe({__name:"MobileSwitcherSheet",props:{modelValue:{type:Boolean},groups:{},activeWorkspaceId:{default:null},activeId:{},attentionBySession:{default:()=>({})},attentionByWorkspace:{default:()=>({})}},emits:["update:modelValue","select","create","createInWorkspace","addWorkspace","rename","archive","deleteWorkspace","loadMore"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t;function o(){s("update:modelValue",!1)}function r(N){s("select",N),o()}function l(N){s("createInWorkspace",N),o()}function a(){s("create"),o()}function u(){s("addWorkspace"),o()}const c=G(new Set);function d(N){return c.value.has(N)}function f(N){const O=new Set(c.value);O.has(N)?O.delete(N):O.add(N),c.value=O,x.value=null,M.value=null}const h=G(new Map);function g(N){return h.value.get(N.workspace.id)??N.initialCount}function m(N){const O=N.sessions.slice(0,g(N));if(i.activeId&&!O.some(P=>P.id===i.activeId)){const P=N.sessions.find(R=>R.id===i.activeId);if(P)return[...O,P]}return O}function y(N){return N.sessions.length>g(N)||N.hasMore||N.loadingMore}function A(N){return g(N)>N.initialCount}function b(N){const O=i.groups.find(q=>q.workspace.id===N);if(!O)return;const P=g(O)+h6,R=new Map(h.value);R.set(N,P),h.value=R,O.sessions.length<P&&O.hasMore&&s("loadMore",N)}function C(N){if(!h.value.has(N))return;const O=new Map(h.value);O.delete(N),h.value=O}function v(N){return i.attentionByWorkspace[N]??0}const x=G(null);function S(N){x.value=x.value===N?null:N,M.value=null}function _(N){x.value=null;const P=(typeof window<"u"?window.prompt(n("sidebar.rename"),N.title):null)?.trim();P&&s("rename",N.id,P)}function I(N){x.value=null,s("archive",N)}const M=G(null);function $(N){M.value=M.value===N?null:N,x.value=null}function D(N){ao(N.root),M.value=null}function T(N){M.value=null,s("deleteWorkspace",N.id)}return(N,O)=>(k(),de(Nj,{"model-value":e.modelValue,"onUpdate:modelValue":O[2]||(O[2]=P=>s("update:modelValue",P))},{default:he(()=>[w("button",{type:"button",class:"newrow",onClick:a},[K(p(ve),{name:"message",size:"sm"}),$e(" "+F(p(n)("sidebar.newChat")),1)]),w("button",{type:"button",class:"newrow secondary",onClick:u},[K(p(ve),{name:"folder",size:"sm"}),$e(" "+F(p(n)("sidebar.newWorkspace")),1)]),w("div",Uit,[e.groups.length===0?(k(),E("div",Kit,F(p(n)("workspace.noWorkspace")),1)):te("",!0),(k(!0),E(Te,null,ht(e.groups,P=>(k(),E("div",{key:P.workspace.id,class:"mgroup"},[w("div",{class:Fe(["mgh",{on:P.workspace.id===e.activeWorkspaceId}]),onClick:R=>f(P.workspace.id)},[d(P.workspace.id)?(k(),de(p(ve),{key:0,class:"mgh-folder",name:"folder-closed",size:"sm"})):(k(),de(p(ve),{key:1,class:"mgh-folder",name:"folder",size:"sm"})),w("div",Zit,[w("span",Git,F(P.workspace.name),1),K(p(kn),{text:P.workspace.root},{default:he(()=>[w("span",Qit,F(P.workspace.shortPath),1)]),_:2},1032,["text"])]),d(P.workspace.id)&&v(P.workspace.id)>0?(k(),E("span",Yit,F(v(P.workspace.id)),1)):te("",!0),K(p(tn),{size:"lg",class:"mgh-more",label:p(n)("sidebar.options"),onClick:Ct(R=>$(P.workspace.id),["stop"])},{default:he(()=>[K(p(ve),{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),K(p(tn),{size:"lg",class:"mgh-add",label:p(n)("workspace.newInGroup"),onClick:Ct(R=>l(P.workspace.id),["stop"])},{default:he(()=>[K(p(ve),{name:"plus",size:"md"})]),_:1},8,["label","onClick"]),M.value===P.workspace.id?(k(),de(p(sr),{key:3,class:"kmenu wsmenu",onClick:O[0]||(O[0]=Ct(()=>{},["stop"]))},{default:he(()=>[K(p(Wt),{size:"lg",onClick:R=>D(P.workspace)},{default:he(()=>[$e(F(p(n)("sidebar.copyPath")),1)]),_:1},8,["onClick"]),K(p(Wt),{size:"lg",danger:"",onClick:R=>T(P.workspace)},{default:he(()=>[$e(F(p(n)("sidebar.delete")),1)]),_:1},8,["onClick"])]),_:2},1024)):te("",!0)],10,Vit),$n(w("div",null,[P.sessions.length===0?(k(),E("div",Jit,F(p(n)("sidebar.noSessions")),1)):te("",!0),(k(!0),E(Te,null,ht(m(P),R=>(k(),E("div",{key:R.id,class:Fe(["srow",{cur:R.id===e.activeId}]),onClick:q=>r(R.id)},[w("div",est,[w("div",{class:Fe(["t",{run:R.busy,aborted:!R.busy&&(e.attentionBySession[R.id]??0)===0&&R.lastTurnReason==="failed"}])},F(R.title),3),w("div",tst,F(R.time),1)]),(e.attentionBySession[R.id]??0)>0?(k(),E("span",nst,F(e.attentionBySession[R.id]),1)):te("",!0),K(p(tn),{size:"lg",class:"kb",label:p(n)("sidebar.options"),onClick:Ct(q=>S(R.id),["stop"])},{default:he(()=>[K(p(ve),{name:"dots-horizontal",size:"md"})]),_:1},8,["label","onClick"]),x.value===R.id?(k(),de(p(sr),{key:1,class:"kmenu",onClick:O[1]||(O[1]=Ct(()=>{},["stop"]))},{default:he(()=>[K(p(Wt),{size:"lg",onClick:q=>_(R)},{default:he(()=>[$e(F(p(n)("sidebar.rename")),1)]),_:1},8,["onClick"]),K(p(Wt),{size:"lg",onClick:q=>I(R.id)},{default:he(()=>[$e(F(p(n)("sidebar.archive")),1)]),_:1},8,["onClick"])]),_:2},1024)):te("",!0)],10,Xit))),128)),y(P)||A(P)?(k(),E("div",ist,[y(P)?(k(),E("button",{key:0,type:"button",class:"mshow-more",disabled:P.loadingMore,onClick:Ct(R=>b(P.workspace.id),["stop"])},[K(p(ve),{name:"chevron-down",size:"sm"}),$e(" "+F(P.loadingMore?p(n)("sidebar.loadingMore"):p(n)("sidebar.showMore")),1)],8,sst)):te("",!0),y(P)&&A(P)?(k(),E("span",ost,"·")):te("",!0),A(P)?(k(),E("button",{key:2,type:"button",class:"mshow-more",onClick:Ct(R=>C(P.workspace.id),["stop"])},[K(p(ve),{name:"chevron-up",size:"sm"}),$e(" "+F(p(n)("sidebar.showLess")),1)],8,rst)):te("",!0)])):te("",!0)],512),[[Qi,!d(P.workspace.id)]])]))),128))])]),_:1},8,["model-value"]))}}),ast=gt(lst,[["__scopeId","data-v-b9a018f8"]]),ust={class:"group-title"},cst={class:"srow-main"},dst={class:"srow-label"},fst={class:"srow-sub"},hst={class:"srow read-only"},pst={class:"srow-main"},gst={class:"srow-label"},mst={key:0,class:"srow-sub"},vst={class:"cache-note"},yst=["aria-checked"],kst={class:"srow-main"},bst={class:"srow-label"},Ast={class:"srow-sub"},Cst=["aria-checked"],wst={class:"srow-main"},xst={class:"srow-label"},Sst={class:"srow-sub"},_st={class:"srow-main"},Ist={class:"srow-label"},Mst={class:"srow-sub"},Est=["aria-checked"],Tst={class:"srow-main"},Lst={class:"srow-label"},Nst={class:"srow-sub"},Fst={class:"srow-main"},Dst={class:"srow-label"},$st={class:"srow read-only"},Bst={class:"srow-main"},zst={class:"srow-label"},Rst={class:"srow-sub"},Ost=["aria-label"],Pst={class:"group-title"},jst={class:"srow-main"},Hst={class:"srow-label"},Wst={class:"srow-sub"},qst={class:"srow read-only pref"},Ust={class:"srow-main"},Kst={class:"srow-label"},Vst={class:"srow read-only pref"},Zst={class:"srow-main"},Gst={class:"srow-label"},Qst={class:"srow read-only pref"},Yst={class:"srow-main"},Jst={class:"srow-label"},Xst={key:2,class:"srow read-only acct-profile"},eot={class:"acct-avatar","aria-hidden":"true"},tot=["src"],not={class:"srow-main"},iot={class:"acct-name-row"},sot={class:"srow-label"},oot={class:"srow-sub"},rot={class:"srow-main"},lot={class:"srow-label"},aot={class:"srow-main"},uot={class:"srow-label"},cot={key:5,class:"srow read-only"},dot={class:"srow-main"},fot={class:"srow-label"},hot={class:"srow-val dim"},pot={class:"arch-subhead"},got={class:"arch-count"},mot={class:"arch-tools"},vot={key:0,class:"arch-empty"},yot={class:"arch-meta"},kot={class:"arch-name"},bot={class:"arch-time"},Aot={key:2,class:"arch-empty"},Cot=100,wot=Qe({__name:"MobileSettingsSheet",props:{modelValue:{type:Boolean},initialView:{},status:{},thinking:{},planMode:{type:Boolean},goalMode:{type:Boolean},goalActive:{type:Boolean},swarmMode:{type:Boolean},colorScheme:{default:"system"},fontScale:{default:"medium"},managedProviderStatus:{default:null},managedUserInfo:{default:null},serverVersion:{default:""},models:{default:()=>[]}},emits:["update:modelValue","pickModel","setThinking","togglePlan","toggleGoal","focusGoal","toggleSwarm","setPermission","setColorScheme","setFontScale","login","logout"],setup(e,{emit:t}){const{t:n}=Bt(),{isConfirmOpen:i}=Ic(),s=e,o=t;function r(re){o("setColorScheme",re)}const l=["manual","yolo","auto"],a=L(()=>s.models?.find(re=>re.id===s.status?.modelId)),u=L(()=>Hy(a.value)),c=L(()=>B0(a.value)),d=L(()=>X2(a.value,s.thinking)),f=L(()=>c.value.includes(d.value)?d.value:""),h=L(()=>c.value.map(re=>({value:re,label:hb(re)}))),g=L(()=>s.planMode===!0),m=L(()=>s.goalMode===!0);function y(){if(s.goalActive){o("focusGoal");return}!m.value&&g.value&&o("togglePlan"),o("toggleGoal")}function A(){!g.value&&m.value&&o("toggleGoal"),o("togglePlan")}const b=L(()=>s.swarmMode===!0),C=G(!1);qe(()=>s.managedUserInfo?.avatar,()=>{C.value=!1});const v=L(()=>!!s.managedUserInfo?.avatar&&!C.value),x=L(()=>s.managedUserInfo?.userLevelName?.trim()??""),S=L(()=>{const re=s.status.permission;return re==="auto"?"var(--color-danger)":re==="yolo"?"var(--color-warning)":"var(--color-text-muted)"}),_=L(()=>{const re=s.status.permission,fe=n(re==="yolo"?"mobile.permYoloSub":re==="auto"?"mobile.permAutoSub":"mobile.permManualSub");return`${re} · ${fe}`}),I=L(()=>s.status.ctxMax>0?Math.min(100,Math.max(0,Math.ceil(s.status.ctxUsed/s.status.ctxMax*100))):0),M=L(()=>s.status.ctxMax>0?`${ou(s.status.ctxUsed)}/${ou(s.status.ctxMax)}`:n("status.statusNone"));function $(re){o("setThinking",i6(a.value,re))}function D(){const re=l.indexOf(s.status.permission),fe=l[(re+1)%l.length];o("setPermission",fe)}function T(){o("pickModel"),o("update:modelValue",!1)}function N(){o("login"),o("update:modelValue",!1)}function O(){o("logout"),o("update:modelValue",!1)}const P=Kl(),R=G("main"),q=G([]),j=G(!1),W=G(!1),z=G(""),H=G("archived-desc");async function ee(){if(!j.value){j.value=!0,W.value=!1;try{const re=[];let fe;for(;;){const Ee=await P.loadArchivedSessions({beforeId:fe,pageSize:Cot});if(re.push(...Ee.items),!Ee.hasMore||Ee.items.length===0)break;const X=Ee.items.at(-1)?.id;if(X===void 0)break;fe=X}q.value=re,W.value=!0}catch(re){ya("loadAllArchived failed",re)}finally{j.value=!1}}}function V(){R.value="archived",z.value="",ee()}qe(()=>s.modelValue,re=>{re&&s.initialView==="archived"&&V()});function ie(){R.value="main"}const se=L(()=>{const re=z.value.trim().toLowerCase();let fe=q.value.filter(Ee=>Ee.archived===!0);return re&&(fe=fe.filter(Ee=>Ee.title.toLowerCase().includes(re))),fe=fe.slice(),H.value==="archived-desc"?fe.sort((Ee,X)=>(X.archivedAt??X.updatedAt).localeCompare(Ee.archivedAt??Ee.updatedAt)):H.value==="created-desc"?fe.sort((Ee,X)=>X.createdAt.localeCompare(Ee.createdAt)):fe.sort((Ee,X)=>Ee.title.localeCompare(X.title,"zh")),fe});async function Z(re){await P.restoreSession(re)&&(q.value=q.value.filter(Ee=>Ee.id!==re))}function pe(re){const fe=new Date(re);if(Number.isNaN(fe.getTime()))return re;const Ee=X=>String(X).padStart(2,"0");return`${fe.getFullYear()}-${Ee(fe.getMonth()+1)}-${Ee(fe.getDate())} ${Ee(fe.getHours())}:${Ee(fe.getMinutes())}`}return qe(()=>s.modelValue,re=>{re||(R.value="main")}),(re,fe)=>(k(),de(Nj,{"model-value":e.modelValue,title:p(n)("mobile.settingsTitle"),"close-on-esc":!p(i),"onUpdate:modelValue":fe[5]||(fe[5]=Ee=>o("update:modelValue",Ee))},{default:he(()=>[R.value==="main"?(k(),E(Te,{key:0},[w("div",ust,F(p(n)("mobile.groupSession")),1),w("button",{type:"button",class:"srow",onClick:T},[w("span",cst,[w("span",dst,F(p(n)("status.statusModel")),1),w("span",fst,F(e.status.model),1)]),fe[6]||(fe[6]=w("span",{class:"chev"},"›",-1))]),w("div",hst,[w("span",pst,[w("span",gst,F(p(n)("status.statusThinking")),1),u.value==="unsupported"?(k(),E("span",mst,F(p(n)("status.modeNotSupported")),1)):te("",!0)]),c.value.length>1?(k(),de(p(Mo),{key:0,"model-value":f.value,options:h.value,size:"sm","onUpdate:modelValue":$},null,8,["model-value","options"])):(k(),E("span",{key:1,class:Fe(["srow-val",{dim:d.value==="off"}])},F(d.value==="off"?p(n)("status.planOff"):p(hb)(d.value)),3))]),w("div",vst,F(p(n)("status.cacheNote")),1),w("button",{type:"button",class:"srow",role:"switch","aria-checked":g.value,onClick:A},[w("span",kst,[w("span",bst,F(p(n)("status.statusPlanMode")),1),w("span",Ast,F(p(n)("mobile.planModeSub")),1)]),w("span",{class:Fe(["toggle",{on:g.value}]),"aria-hidden":"true"},null,2)],8,yst),e.goalActive?(k(),E("button",{key:1,type:"button",class:"srow",onClick:y},[w("span",_st,[w("span",Ist,F(p(n)("status.goalLabel")),1),w("span",Mst,F(p(n)("mobile.goalModeSub")),1)]),K(p(ve),{class:"srow-chevron",name:"chevron-right",size:"sm","aria-hidden":"true"})])):(k(),E("button",{key:0,type:"button",class:"srow",role:"switch","aria-checked":m.value,onClick:y},[w("span",wst,[w("span",xst,F(p(n)("status.goalLabel")),1),w("span",Sst,F(p(n)("mobile.goalModeSub")),1)]),w("span",{class:Fe(["toggle",{on:m.value}]),"aria-hidden":"true"},null,2)],8,Cst)),w("button",{type:"button",class:"srow",role:"switch","aria-checked":b.value,onClick:fe[0]||(fe[0]=Ee=>o("toggleSwarm"))},[w("span",Tst,[w("span",Lst,F(p(n)("status.statusSwarmMode")),1),w("span",Nst,F(p(n)("mobile.swarmModeSub")),1)]),w("span",{class:Fe(["toggle",{on:b.value}]),"aria-hidden":"true"},null,2)],8,Est),w("button",{type:"button",class:"srow",onClick:D},[w("span",Fst,[w("span",Dst,F(p(n)("status.statusPermission")),1),w("span",{class:"srow-sub",style:qt({color:S.value})},F(_.value),5)]),fe[7]||(fe[7]=w("span",{class:"chev"},"›",-1))]),w("div",$st,[w("span",Bst,[w("span",zst,F(p(n)("status.statusContext")),1),w("span",Rst,F(M.value),1)]),w("span",{class:"ctx-meter","aria-label":M.value},[w("i",{style:qt({width:I.value+"%"})},null,4)],8,Ost)]),w("div",Pst,F(p(n)("mobile.groupApp")),1),w("button",{type:"button",class:"srow",onClick:V},[w("span",jst,[w("span",Hst,F(p(n)("mobile.archivedSessions")),1),w("span",Wst,F(p(n)("mobile.archivedSessionsSub")),1)]),fe[8]||(fe[8]=w("span",{class:"chev"},"›",-1))]),w("div",qst,[w("span",Ust,[w("span",Kst,F(p(n)("theme.colorSchemeLabel")),1)]),K(p(Mo),{"model-value":e.colorScheme??"system",options:[{value:"light",label:p(n)("theme.light"),icon:"light-mode"},{value:"dark",label:p(n)("theme.dark"),icon:"dark-mode"},{value:"system",label:p(n)("theme.system")}],"onUpdate:modelValue":r},null,8,["model-value","options"])]),w("div",Vst,[w("span",Zst,[w("span",Gst,F(p(n)("sidebar.language")),1)]),K(Ej)]),w("div",Qst,[w("span",Yst,[w("span",Jst,F(p(n)("settings.uiFontSize")),1)]),K(p(Mo),{"model-value":e.fontScale,options:[{value:"small",label:"S"},{value:"medium",label:"M"},{value:"large",label:"L"},{value:"xlarge",label:"XL"}],"aria-label":p(n)("settings.uiFontSize"),"onUpdate:modelValue":fe[1]||(fe[1]=Ee=>o("setFontScale",Ee))},null,8,["model-value","aria-label"])]),e.managedProviderStatus==="authenticated"?(k(),E("div",Xst,[w("span",eot,[v.value?(k(),E("img",{key:0,src:e.managedUserInfo?.avatar,alt:"",onError:fe[2]||(fe[2]=Ee=>C.value=!0)},null,40,tot)):(k(),de(p(ve),{key:1,name:"user",size:"md"}))]),w("span",not,[w("span",iot,[w("span",sot,F(e.managedUserInfo?.nickname||p(n)("sidebar.defaultUserName")),1),x.value?(k(),de(p(va),{key:0,class:"acct-level",variant:"neutral",size:"sm"},{default:he(()=>[$e(F(x.value),1)]),_:1})):te("",!0)]),w("span",oot,F(p(n)("settings.signedIn")),1)])])):te("",!0),e.managedProviderStatus==="authenticated"?(k(),E("button",{key:3,type:"button",class:"srow acct out",onClick:O},[w("span",rot,[w("span",lot,F(p(n)("sidebar.signOut")),1)])])):(k(),E("button",{key:4,type:"button",class:"srow acct in",onClick:N},[w("span",aot,[w("span",uot,F(p(n)("sidebar.signIn")),1)])])),e.serverVersion?(k(),E("div",cot,[w("span",dot,[w("span",fot,F(p(n)("settings.serverVersion")),1)]),w("span",hot,F(e.serverVersion),1)])):te("",!0)],64)):(k(),E(Te,{key:1},[w("div",pot,[w("button",{type:"button",class:"arch-back",onClick:ie},[fe[9]||(fe[9]=w("span",{class:"chev back"},"‹",-1)),$e(" "+F(p(n)("mobile.archivedBack")),1)]),w("span",got,F(p(n)("mobile.sessionCount",{n:se.value.length})),1)]),w("div",mot,[K(p(wo),{class:"arch-search-input","model-value":z.value,size:"sm",placeholder:p(n)("settings.archivedSearch"),"onUpdate:modelValue":fe[3]||(fe[3]=Ee=>z.value=Ee)},null,8,["model-value","placeholder"]),K(p(Mo),{size:"sm","model-value":H.value,options:[{value:"archived-desc",label:p(n)("settings.archivedSortArchived")},{value:"created-desc",label:p(n)("settings.archivedSortCreated")},{value:"name-asc",label:p(n)("settings.archivedSortName")}],"onUpdate:modelValue":fe[4]||(fe[4]=Ee=>H.value=Ee)},null,8,["model-value","options"])]),j.value?(k(),E("div",vot,F(p(n)("settings.archivedLoadingAll")),1)):se.value.length>0?(k(!0),E(Te,{key:1},ht(se.value,Ee=>(k(),E("div",{key:Ee.id,class:"arch-row"},[w("div",yot,[w("div",kot,F(Ee.title),1),w("div",bot,F(p(n)("settings.archivedAt",{time:pe(Ee.archivedAt??Ee.updatedAt)})),1)]),K(p(Zt),{variant:"secondary",size:"sm",onClick:X=>Z(Ee.id)},{default:he(()=>[$e(F(p(n)("settings.archivedRestore")),1)]),_:1},8,["onClick"])]))),128)):(k(),E("div",Aot,F(q.value.length===0?p(n)("settings.archivedEmpty"):p(n)("settings.archivedNoMatch")),1))],64))]),_:1},8,["model-value","title","close-on-esc"]))}}),xot=gt(wot,[["__scopeId","data-v-e7d4975b"]]),Sot=["mask"],_ot=Qe({__name:"BrandLogo",props:{size:{default:64}},setup(e){const t=`bl-eyes-${LW()}`,n=G(null);let i;function s(){const o=n.value;o&&(o.classList.remove("blink-now"),o.getBoundingClientRect(),o.classList.add("blink-now"),clearTimeout(i),i=setTimeout(()=>o.classList.remove("blink-now"),300))}return Gn(()=>clearTimeout(i)),(o,r)=>(k(),E("svg",{ref_key:"logoRef",ref:n,class:"brand-logo",style:qt({width:`${e.size}px`,height:`${e.size*22/32}px`}),viewBox:"0 0 32 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Kimi Code",onClick:s},[w("defs",null,[w("mask",{id:t,maskUnits:"userSpaceOnUse"},[...r[0]||(r[0]=[w("rect",{x:"0",y:"0",width:"32",height:"22",fill:"#fff"},null,-1),w("g",{class:"ch-eyes",fill:"#000"},[w("rect",{class:"ch-eye",x:"11.8",y:"7",width:"2.8",height:"8",rx:"1.4"}),w("rect",{class:"ch-eye",x:"17.4",y:"7",width:"2.8",height:"8",rx:"1.4"})],-1)])])]),w("rect",{x:"1",y:"1",width:"30",height:"20",rx:"6",fill:"var(--logo)",mask:`url(#${t})`},null,8,Sot)],4))}}),i5=gt(_ot,[["__scopeId","data-v-f04205a8"]]),Iot={key:0,class:"ls-done-card"},Mot={class:"ls-done-badge"},Eot={class:"ls-card-text"},Tot={class:"ls-card-title"},Lot={class:"ls-card-hint"},Not={key:1,class:"ls-cards"},Fot={class:"ls-card-text"},Dot={class:"ls-card-title"},$ot={class:"ls-reco"},Bot={class:"ls-card-hint"},zot={class:"ls-card-logo ls-card-icon"},Rot={class:"ls-card-text"},Oot={class:"ls-card-title"},Pot={class:"ls-card-hint"},jot={key:2,class:"ls-flow"},Hot={key:0,class:"ls-center"},Wot={class:"ls-center-text"},qot={key:1,class:"ls-device"},Uot={class:"ls-lead"},Kot=["href"],Vot={class:"ls-code-row"},Zot=["title"],Got={class:"ls-status"},Qot={class:"ls-status-text"},Yot={class:"ls-countdown"},Jot={key:2,class:"ls-center"},Xot={class:"ls-center-text ls-success-text"},ert={class:"ls-center-hint"},trt={class:"ls-center"},nrt={class:"ls-center-text ls-err-text"},irt={class:"ls-center-hint"},srt={class:"ls-actions"},ort={class:"ls-center"},rrt={class:"ls-center-text ls-warn-text"},lrt={class:"ls-center-hint"},art={class:"ls-actions"},urt=Qe({__name:"OnboardingLoginStep",props:{authReady:{type:Boolean},onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["success","addProvider"],setup(e,{emit:t}){const{t:n}=Bt(),i=e,s=t,o=G("choice"),{step:r,pollError:l,flow:a,secondsLeft:u,startFlow:c,cancelFlow:d}=gB({onStartOAuthLogin:i.onStartOAuthLogin,onPollOAuthLogin:i.onPollOAuthLogin,onCancelOAuthLogin:i.onCancelOAuthLogin,onSuccess:()=>s("success")}),f=G(!1);function h(){o.value="flow",c()}function g(){d(),o.value="choice"}async function m(){!a.value||!await ao(a.value.verificationUriComplete)||(f.value=!0,setTimeout(()=>{f.value=!1},2e3))}function y(A){const b=Math.floor(A/60),C=A%60;return`${b}:${String(C).padStart(2,"0")}`}return(A,b)=>e.authReady?(k(),E("div",Iot,[w("span",Mot,[K(p(ve),{name:"check",size:"sm"})]),w("div",Eot,[w("div",Tot,F(p(n)("onboarding.login.loggedInTitle")),1),w("div",Lot,F(p(n)("onboarding.login.loggedInHint")),1)])])):o.value==="choice"?(k(),E("div",Not,[w("button",{class:"ls-card",type:"button",onClick:h},[K(i5,{size:40,class:"ls-card-logo"}),w("div",Fot,[w("div",Dot,[$e(F(p(n)("onboarding.login.kimiTitle"))+" ",1),w("span",$ot,F(p(n)("onboarding.login.recommended")),1)]),w("div",Bot,F(p(n)("onboarding.login.kimiHint")),1)]),K(p(ve),{name:"chevron-right",size:"lg",class:"ls-card-chevron"})]),w("button",{class:"ls-card",type:"button",onClick:b[0]||(b[0]=C=>s("addProvider"))},[w("span",zot,[K(p(ve),{name:"bolt",size:"lg"})]),w("div",Rot,[w("div",Oot,F(p(n)("onboarding.login.customProviderTitle")),1),w("div",Pot,F(p(n)("onboarding.login.customProviderHint")),1)]),K(p(ve),{name:"chevron-right",size:"lg",class:"ls-card-chevron"})])])):(k(),E("div",jot,[p(r)==="starting"?(k(),E("div",Hot,[K(p(Mi),{size:"md"}),w("span",Wot,F(p(n)("login.starting")),1)])):p(r)==="device-code"&&p(a)?(k(),E("div",qot,[w("div",Uot,F(p(n)("login.lead")),1),w("a",{class:"ls-primary",href:p(a).verificationUriComplete,target:"_blank",rel:"noopener noreferrer"},[$e(F(p(n)("login.authorizeInBrowser"))+" ",1),K(p(ve),{name:"external-link",size:"sm"})],8,Kot),w("div",Vot,[w("span",{class:"ls-link",title:p(a).verificationUriComplete},F(p(a).verificationUriComplete),9,Zot),K(p(Zt),{class:Fe(["ls-copy",{"is-copied":f.value}]),variant:"secondary",size:"sm",onClick:m},{default:he(()=>[f.value?(k(),E(Te,{key:0},[K(p(ve),{name:"check",size:"sm"}),$e(" "+F(p(n)("login.copied")),1)],64)):(k(),E(Te,{key:1},[K(p(ve),{name:"copy",size:"sm"}),$e(" "+F(p(n)("login.copyLink")),1)],64))]),_:1},8,["class"])]),w("div",Got,[K(p(Mi),{size:"sm",label:p(n)("login.waitingAuth")},null,8,["label"]),w("span",Qot,F(p(n)("login.waitingAutoClose")),1),w("span",Yot,F(y(p(u))),1)])])):p(r)==="success"?(k(),E("div",Jot,[K(p(ch),{kind:"success"}),w("span",Xot,F(p(n)("login.success")),1),w("span",ert,F(p(n)("login.successHint")),1)])):p(r)==="expired"?(k(),E(Te,{key:3},[w("div",trt,[K(p(ch),{kind:"expired"}),w("span",nrt,F(p(n)("login.expiredTitle")),1),w("span",irt,F(p(n)("login.expiredHint")),1)]),w("div",srt,[K(p(Zt),{variant:"secondary",onClick:g},{default:he(()=>[$e(F(p(n)("onboarding.back")),1)]),_:1}),K(p(Zt),{variant:"primary",onClick:p(c)},{default:he(()=>[$e(F(p(n)("login.retry")),1)]),_:1},8,["onClick"])])],64)):p(r)==="error"?(k(),E(Te,{key:4},[w("div",ort,[K(p(ch),{kind:"error"}),w("span",rrt,F(p(l)?p(n)("login.pollErrorTitle"):p(n)("login.errorTitle")),1),w("span",lrt,F(p(l)?p(n)("login.pollErrorHint"):p(n)("login.errorHint")),1)]),w("div",art,[K(p(Zt),{variant:"secondary",onClick:g},{default:he(()=>[$e(F(p(n)("onboarding.back")),1)]),_:1}),K(p(Zt),{variant:"primary",onClick:p(c)},{default:he(()=>[$e(F(p(n)("login.retry")),1)]),_:1},8,["onClick"])])],64)):te("",!0)]))}}),crt=gt(urt,[["__scopeId","data-v-1ff21828"]]),drt=["aria-label"],frt={class:"wiz-body"},hrt={key:0,class:"wiz-step"},prt={class:"wiz-title"},grt={class:"wiz-sub"},mrt={class:"pref-group"},vrt={class:"pref-label"},yrt={class:"lang-cards"},krt=["onClick"],brt={class:"opt-label"},Art={class:"pref-group"},Crt={class:"pref-label"},wrt={class:"theme-cards"},xrt=["onClick"],Srt={class:"opt-label"},_rt={key:1,class:"wiz-step"},Irt={class:"wiz-title"},Mrt={class:"wiz-sub"},Ert={class:"wiz-step-fill"},Trt={class:"wiz-foot"},Lrt={class:"wiz-foot-ghost"},Nrt=Qe({__name:"OnboardingWizard",props:{authReady:{type:Boolean},onStartOAuthLogin:{type:Function},onPollOAuthLogin:{type:Function},onCancelOAuthLogin:{type:Function}},emits:["complete","loginSuccess","addProvider"],setup(e,{emit:t}){const{t:n,locale:i}=Bt(),s=e,o=t;function r(){o("addProvider")}const l=["preferences","login"],a=G(0),u=L(()=>l[a.value]??"preferences");function c(){a.value<l.length-1&&a.value++}function d(){a.value>0&&a.value--}function f(A){i.value!==A&&E6(A)}const{colorScheme:h,setColorScheme:g}=n6(),m=[{value:"system",labelKey:"theme.system"},{value:"light",labelKey:"theme.light"},{value:"dark",labelKey:"theme.dark"}];function y(){o("loginSuccess")}return(A,b)=>(k(),E("div",{class:"wizard",role:"dialog","aria-modal":"true","aria-label":p(n)("onboarding.welcome.title")},[w("div",frt,[u.value==="preferences"?(k(),E("section",hrt,[K(i5,{size:72}),w("h1",prt,F(p(n)("onboarding.welcome.title")),1),w("p",grt,F(p(n)("onboarding.welcome.subtitle")),1),w("div",mrt,[w("div",vrt,F(p(n)("onboarding.welcome.languageLabel")),1),w("div",yrt,[(k(!0),E(Te,null,ht(p(bv),C=>(k(),E("button",{key:C.code,class:Fe(["opt-card lang-card",{selected:p(i)===C.code}]),type:"button",onClick:v=>f(C.code)},[w("span",{class:Fe(["opt-radio",{on:p(i)===C.code}])},null,2),w("span",brt,F(C.label),1)],10,krt))),128))])]),w("div",Art,[w("div",Crt,F(p(n)("onboarding.welcome.themeLabel")),1),w("div",wrt,[(k(),E(Te,null,ht(m,C=>w("button",{key:C.value,class:Fe(["opt-card theme-card",{selected:p(h)===C.value}]),type:"button",onClick:v=>p(g)(C.value)},[w("span",{class:Fe(["tp",`tp-${C.value}`]),"aria-hidden":"true"},[C.value==="system"?(k(),E(Te,{key:0},[b[2]||(b[2]=mc('<span class="tp-half tp-half-light" data-v-6546a2d8><span class="tp-side" data-v-6546a2d8></span><span class="tp-lines" data-v-6546a2d8><span data-v-6546a2d8></span><span data-v-6546a2d8></span><span data-v-6546a2d8></span></span></span><span class="tp-half tp-half-dark" data-v-6546a2d8><span class="tp-side" data-v-6546a2d8></span><span class="tp-lines" data-v-6546a2d8><span data-v-6546a2d8></span><span data-v-6546a2d8></span><span data-v-6546a2d8></span></span></span>',2))],64)):(k(),E(Te,{key:1},[b[3]||(b[3]=w("span",{class:"tp-side"},null,-1)),b[4]||(b[4]=w("span",{class:"tp-lines"},[w("span"),w("span"),w("span")],-1))],64))],2),w("span",Srt,F(p(n)(C.labelKey)),1)],10,xrt)),64))])])])):(k(),E("section",_rt,[K(i5,{size:72}),w("h1",Irt,F(p(n)("onboarding.login.title")),1),w("p",Mrt,F(p(n)("onboarding.login.subtitle")),1),w("div",Ert,[K(crt,{"auth-ready":s.authReady,"on-start-o-auth-login":s.onStartOAuthLogin,"on-poll-o-auth-login":s.onPollOAuthLogin,"on-cancel-o-auth-login":s.onCancelOAuthLogin,onSuccess:y,onAddProvider:r},null,8,["auth-ready","on-start-o-auth-login","on-poll-o-auth-login","on-cancel-o-auth-login"])])])),w("div",Trt,[u.value==="preferences"?(k(),de(p(Zt),{key:0,variant:"primary",size:"lg",class:"wiz-primary",onClick:c},{default:he(()=>[$e(F(p(n)("onboarding.continue")),1)]),_:1})):u.value==="login"&&s.authReady?(k(),de(p(Zt),{key:1,variant:"primary",size:"lg",class:"wiz-primary",onClick:b[0]||(b[0]=C=>o("complete"))},{default:he(()=>[$e(F(p(n)("onboarding.login.finish")),1)]),_:1})):te("",!0),w("div",Lrt,[a.value>0?(k(),de(p(Zt),{key:0,variant:"ghost",onClick:d},{default:he(()=>[$e(F(p(n)("onboarding.back")),1)]),_:1})):te("",!0),u.value==="login"&&s.authReady?te("",!0):(k(),de(p(Zt),{key:1,variant:"ghost",onClick:b[1]||(b[1]=C=>o("complete"))},{default:he(()=>[$e(F(u.value==="login"?p(n)("onboarding.login.skip"):p(n)("onboarding.skip")),1)]),_:1}))])])])],8,drt))}}),Frt=gt(Nrt,[["__scopeId","data-v-6546a2d8"]]),Drt=["aria-label"],$rt={class:"gload-box"},Brt={class:"gload-text"},zrt=Qe({__name:"GlobalLoading",setup(e){const{t}=Bt();return(n,i)=>(k(),E("div",{class:"gload",role:"status","aria-label":p(t)("app.connecting")},[w("div",$rt,[i[0]||(i[0]=mc('<svg class="gload-logo" viewBox="0 0 96 32" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-v-ab85ede1><path fill="currentColor" d="M35.767 31.329c0 .37.3.671.67.671h4.305c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.672-.671h-4.304c-.37 0-.671.3-.671.671z" data-v-ab85ede1></path><path fill="currentColor" d="M90.353 31.329c0 .37.3.671.67.671h4.305c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.672-.671h-4.304a.67.67 0 0 0-.671.671z" data-v-ab85ede1></path><path fill="currentColor" d="M73.256 0a.67.67 0 0 0-.652.512l-6.366 26.1c-.106.428-.607.428-.71 0L59.159.512A.67.67 0 0 0 58.511 0H47.725c-.37 0-.668.3-.668.671V31.33c0 .37.3.671.67.671h4.781c.37 0 .671-.292.671-.662V5.554c0-.515.604-.622.726-.127l6.358 26.06a.67.67 0 0 0 .653.513h9.931c.31 0 .58-.212.653-.512L77.855 5.43c.122-.495.726-.388.726.127v25.772c0 .37.3.671.671.671h4.78c.371 0 .672-.3.672-.671V.67c0-.37-.3-.671-.671-.671z" data-v-ab85ede1></path><path fill="currentColor" d="M15.279 14.837 28.264 1.133A.671.671 0 0 0 27.777 0h-6.043a.67.67 0 0 0-.477.199L6.374 15.223c-.231.234-.573.025-.573-.35V.672c0-.37-.3-.671-.671-.671H.67a.67.67 0 0 0-.67.67V31.33c0 .37.3.671.671.671H5.13c.37 0 .671-.3.671-.671v-6.114a.5.5 0 0 1 .13-.35l4.594-4.69a.293.293 0 0 1 .386-.045l12.286 9.305c1.796 1.245 4.083 2.06 6.178 2.401a.645.645 0 0 0 .743-.648v-5.537a.7.7 0 0 0-.562-.677c-1.215-.262-2.565-.758-3.59-1.468L15.332 15.58c-.22-.152-.248-.544-.052-.744" data-v-ab85ede1></path></svg>',1)),K(p(Mi),{size:"md",label:p(t)("app.connecting")},null,8,["label"]),w("div",Brt,F(p(t)("app.connecting")),1)])],8,Drt))}}),Rrt=gt(zrt,[["__scopeId","data-v-ab85ede1"]]),Ort={class:"kap-root"},Prt={class:"kap-head"},jrt={class:"kap-count"},Hrt={class:"kap-head-actions"},Wrt={class:"kap-filters"},qrt=["value"],Urt={class:"kap-check"},Krt={class:"kap-check"},Vrt={class:"kap-view-toggle",role:"group"},Zrt={key:0,class:"kap-empty"},Grt=["onClick"],Qrt={class:"kap-ts"},Yrt={class:"kap-label"},Jrt={key:0,class:"kap-detail"},Xrt={class:"kap-detail-actions"},elt=["onClick"],tlt={key:1,class:"kap-agg"},nlt={class:"mono"},ilt={class:"mono"},slt={class:"num"},olt={class:"num"},rlt={key:0},llt={class:"mono"},alt={class:"num"},ult={class:"num"},clt={key:0},dlt=Qe({__name:"KapDebugView",emits:["close"],setup(e,{emit:t}){const n=t,i=G("all"),s=G(""),o=G(""),r=G(!1),l=G("timeline"),a=L(()=>(L6.value,[...wke()])),u=L(()=>{const M=new Set;for(const $ of a.value)$.sessionId&&M.add($.sessionId);return[...M].sort()});function c(M){return M.kind==="rest:error"||M.code!==void 0&&M.code!==0||M.eventType==="error"||M.eventType==="parse-error"}const d=L(()=>{const M=s.value.trim().toLowerCase();return a.value.filter($=>!(i.value!=="all"&&$.source!==i.value||o.value&&$.sessionId!==o.value||r.value&&!c($)||M&&!`${$.label} ${$.kind} ${$.eventType??""} ${$.sessionId??""} ${$.requestId??""}`.toLowerCase().includes(M)))}),f=L(()=>{const M=new Map;for(const $ of d.value){if($.kind!=="ws:in"&&$.kind!=="ws:out")continue;const D=$.kind==="ws:in"?"←":"→",T=`${D} ${$.eventType??"?"} @ ${$.sessionId??"-"}`,N=M.get(T)??{key:T,sessionId:$.sessionId??"-",eventType:$.eventType??"?",dir:D,count:0};N.count++,$.seq!==void 0&&(N.lastSeq=$.seq),M.set(T,N)}return[...M.values()].sort(($,D)=>D.count-$.count)}),h=L(()=>{const M=new Map;for(const $ of d.value){if($.source!=="rest"||$.kind==="rest:request")continue;const D=`${$.method??"?"} ${$.path??"?"}`,T=M.get(D)??{count:0,errors:0,totalMs:0,timed:0};T.count++,c($)&&T.errors++,$.durationMs!==void 0&&(T.totalMs+=$.durationMs,T.timed++),M.set(D,T)}return[...M.entries()].map(([$,D])=>({key:$,count:D.count,errors:D.errors,avgMs:D.timed>0?Math.round(D.totalMs/D.timed):0})).sort(($,D)=>D.count-$.count)}),g=G(null),m=G(!0),y=G(null),A=G(null);qe(()=>d.value.length,async()=>{if(!m.value||l.value!=="timeline")return;await kt();const M=y.value;M&&(M.scrollTop=M.scrollHeight)});function b(M){g.value=g.value===M?null:M}function C(M){const $=new Date(M),D=(T,N=2)=>String(T).padStart(N,"0");return`${D($.getHours())}:${D($.getMinutes())}:${D($.getSeconds())}.${D($.getMilliseconds(),3)}`}function v(M){return JSON.stringify(M,null,2)}async function x(M){await ao(v(M))&&(A.value=M.id,setTimeout(()=>{A.value===M.id&&(A.value=null)},1500))}function S(){IB(d.value)}function _(M){return c(M)||M.source==="client"?"b-err":M.source==="rest"?"b-rest":M.kind==="ws:lifecycle"?"b-life":M.kind==="ws:out"?"b-out":"b-in"}function I(M){return M.source==="rest"?"REST":M.source==="client"?"APP":"WS"}return(M,$)=>(k(),E("section",Ort,[w("header",Prt,[$[11]||($[11]=w("strong",null,"KAP debug",-1)),w("span",jrt,F(d.value.length)+"/"+F(a.value.length),1),w("div",Hrt,[w("button",{type:"button",class:Fe({on:p(J1)}),onClick:$[0]||($[0]=D=>J1.value=!p(J1))},F(p(J1)?"resume":"pause"),3),w("button",{type:"button",onClick:$[1]||($[1]=D=>p(xke)())},"clear"),w("button",{type:"button",onClick:$[2]||($[2]=D=>S())},"export jsonl"),K(p(kn),{text:"Close window"},{default:he(()=>[w("button",{type:"button",onClick:$[3]||($[3]=D=>n("close"))},"✕")]),_:1})])]),w("div",Wrt,[$n(w("select",{"onUpdate:modelValue":$[4]||($[4]=D=>i.value=D),"aria-label":"Source filter"},[...$[12]||($[12]=[w("option",{value:"all"},"rest + ws + app",-1),w("option",{value:"rest"},"rest",-1),w("option",{value:"ws"},"ws",-1),w("option",{value:"client"},"app errors",-1)])],512),[[jk,i.value]]),$n(w("select",{"onUpdate:modelValue":$[5]||($[5]=D=>o.value=D),"aria-label":"Session filter"},[$[13]||($[13]=w("option",{value:""},"all sessions",-1)),(k(!0),E(Te,null,ht(u.value,D=>(k(),E("option",{key:D,value:D},F(D),9,qrt))),128))],512),[[jk,o.value]]),$n(w("input",{"onUpdate:modelValue":$[6]||($[6]=D=>s.value=D),type:"text",placeholder:"filter (type / path / id)","aria-label":"Text filter"},null,512),[[uo,s.value]]),w("label",Urt,[$n(w("input",{"onUpdate:modelValue":$[7]||($[7]=D=>r.value=D),type:"checkbox"},null,512),[[W2,r.value]]),$[14]||($[14]=$e(" errors",-1))]),w("label",Krt,[$n(w("input",{"onUpdate:modelValue":$[8]||($[8]=D=>m.value=D),type:"checkbox"},null,512),[[W2,m.value]]),$[15]||($[15]=$e(" follow",-1))]),w("div",Vrt,[w("button",{type:"button",class:Fe({on:l.value==="timeline"}),onClick:$[9]||($[9]=D=>l.value="timeline")},"timeline",2),w("button",{type:"button",class:Fe({on:l.value==="aggregate"}),onClick:$[10]||($[10]=D=>l.value="aggregate")},"aggregate",2)])]),l.value==="timeline"?(k(),E("div",{key:0,ref_key:"listRef",ref:y,class:"kap-list"},[d.value.length===0?(k(),E("div",Zrt," No trace entries yet. REST calls and WS frames will appear here. ")):te("",!0),(k(!0),E(Te,null,ht(d.value,D=>(k(),E("div",{key:D.id,class:"kap-row-wrap"},[w("button",{type:"button",class:Fe(["kap-row",{expanded:g.value===D.id}]),onClick:T=>b(D.id)},[w("span",Qrt,F(C(D.ts)),1),w("span",{class:Fe(["kap-badge",_(D)])},F(I(D)),3),w("span",Yrt,F(D.label),1)],10,Grt),g.value===D.id?(k(),E("div",Jrt,[w("div",Xrt,[w("button",{type:"button",onClick:T=>x(D)},F(A.value===D.id?"copied ✓":"copy json"),9,elt)]),w("pre",null,F(v(D)),1)])):te("",!0)]))),128))],512)):(k(),E("div",tlt,[$[20]||($[20]=w("h4",null,"WS frames by session / type",-1)),w("table",null,[$[17]||($[17]=w("thead",null,[w("tr",null,[w("th",null,"dir"),w("th",null,"type"),w("th",null,"session"),w("th",null,"count"),w("th",null,"last seq")])],-1)),w("tbody",null,[(k(!0),E(Te,null,ht(f.value,D=>(k(),E("tr",{key:D.key},[w("td",null,F(D.dir),1),w("td",nlt,F(D.eventType),1),w("td",ilt,F(D.sessionId),1),w("td",slt,F(D.count),1),w("td",olt,F(D.lastSeq??"—"),1)]))),128)),f.value.length===0?(k(),E("tr",rlt,[...$[16]||($[16]=[w("td",{colspan:"5",class:"kap-empty"},"no ws frames",-1)])])):te("",!0)])]),$[21]||($[21]=w("h4",null,"REST by endpoint",-1)),w("table",null,[$[19]||($[19]=w("thead",null,[w("tr",null,[w("th",null,"endpoint"),w("th",null,"count"),w("th",null,"errors"),w("th",null,"avg ms")])],-1)),w("tbody",null,[(k(!0),E(Te,null,ht(h.value,D=>(k(),E("tr",{key:D.key},[w("td",llt,F(D.key),1),w("td",alt,F(D.count),1),w("td",{class:Fe(["num",{err:D.errors>0}])},F(D.errors),3),w("td",ult,F(D.avgMs),1)]))),128)),h.value.length===0?(k(),E("tr",clt,[...$[18]||($[18]=[w("td",{colspan:"4",class:"kap-empty"},"no rest calls",-1)])])):te("",!0)])])]))]))}}),flt=gt(dlt,[["__scopeId","data-v-2b13888e"]]),hlt=Qe({__name:"DebugPanel",setup(e){const t=G(!1);let n=null,i=null,s=null;const o=["data-color-scheme"];function r(c){const d=document.documentElement,f=c.documentElement;for(const h of o){const g=d.getAttribute(h);g!==null?f.setAttribute(h,g):f.removeAttribute(h)}}function l(c){const d=c.document;d.title="KAP debug";const f=d.createElement("base");f.href=location.href,d.head.appendChild(f);for(const g of Array.from(document.querySelectorAll('style, link[rel="stylesheet"]')))d.head.appendChild(g.cloneNode(!0));r(d),d.body.style.margin="0";const h=d.createElement("div");return h.style.height="100vh",d.body.appendChild(h),h}function a(){s?.disconnect(),s=null;try{i?.unmount()}catch{}i=null,n=null,t.value=!1}function u(){if(n&&!n.closed){n.focus();return}const c=window.open("","kap-debug","popup=yes,width=1040,height=760");if(!c)return;n=c;const d=l(c),f=q2(flt,{onClose:()=>c.close()});f.mount(d),i=f,t.value=!0,s=new MutationObserver(()=>{n&&!n.closed&&r(n.document)}),s.observe(document.documentElement,{attributes:!0,attributeFilter:[...o]}),c.addEventListener("pagehide",a),c.addEventListener("beforeunload",a)}return mn(()=>{u()}),Gn(()=>{n&&!n.closed&&n.close(),a()}),(c,d)=>(k(),de(p(kn),{text:t.value?"Focus KAP debug window":"Open KAP debug window"},{default:he(()=>[w("button",{class:"kap-fab",type:"button",onClick:u}," KAP ")]),_:1},8,["text"]))}}),plt=gt(hlt,[["__scopeId","data-v-21de79fc"]]),glt=Qe({__name:"ServerAuthDialog",setup(e){const t=G(""),n=G(null),i=G(!1);mn(()=>{kt(()=>n.value?.focus())});function s(){const r=t.value;!r||i.value||(i.value=!0,QD(r),window.location.reload())}function o(r){r.key==="Enter"&&(r.preventDefault(),s())}return(r,l)=>(k(),de(p(bc),{open:!0,title:"Server token required","hide-close":!0,"close-on-overlay":!1,"close-on-esc":!1},{foot:he(()=>[K(p(Zt),{variant:"primary",disabled:!t.value||i.value,loading:i.value,onClick:s},{default:he(()=>[$e(F(i.value?"Connecting…":"Connect"),1)]),_:1},8,["disabled","loading"])]),default:he(()=>[l[1]||(l[1]=w("p",{class:"server-auth-hint"},[$e(" This server is protected. Enter the bearer token printed when the server started (or the password set via "),w("code",null,"KIMI_CODE_PASSWORD"),$e("). ")],-1)),K(p(wo),{ref_key:"inputRef",ref:n,modelValue:t.value,"onUpdate:modelValue":l[0]||(l[0]=a=>t.value=a),type:"password",autocomplete:"current-password",placeholder:"Token",disabled:i.value,onKeydown:o},null,8,["modelValue","disabled"])]),_:1}))}}),mlt=gt(glt,[["__scopeId","data-v-331563ff"]]),vlt=["aria-label"],ylt=Qe({__name:"InternalBuildBanner",setup(e){const{t}=Bt(),n=Wh;return(i,s)=>p(n)?(k(),E("span",{key:0,class:"internal-build-tag",role:"note","aria-label":p(t)("app.internalBuildBanner")},[s[0]||(s[0]=w("svg",{viewBox:"0 0 16 16",width:"11",height:"11",fill:"none",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[w("path",{d:"M8 2 14 13H2L8 2Z"}),w("path",{d:"M8 6v3.5"}),w("path",{d:"M8 11.5h.01"})],-1)),w("span",null,F(p(t)("app.internalBuildBanner")),1)],8,vlt)):te("",!0)}}),klt=gt(ylt,[["__scopeId","data-v-14c3d0e0"]]),blt={class:"app-shell"},Alt=["inert"],Clt=["aria-label","aria-hidden"],wlt=Qe({__name:"App",setup(e){mre();const t=G(!1);let n=null;const i=Kl(),s=L(()=>!i.dangerousBypassAuth.value&&t.value);Kn("resolveImage",i.resolveImageUrl),Kn("resolveSwarmMembers",rt=>i.swarmMembersByToolCallId.value.get(rt)??[]),Kn("modelDisplay",rt=>Ioe(rt,i.models.value));const{t:o}=Bt();Kn("subagentEffort",rt=>Moe(rt));const{confirm:r}=Ic(),l=Zl(),a=dhe(),u=G(!1),c=G(!1),d=L(()=>{const rt=i.activeSessionId.value;return i.sessions.value.find(Se=>Se.id===rt)?.title??""}),f=L(()=>{const rt=i.activeSessionId.value;return i.sessions.value.find(Se=>Se.id===rt)?.lastTurnReason??null}),h=L(()=>i.visibleWorkspace.value?.sessionCount??0),g=L(()=>i.activity.value!=="idle");Fhe({running:g,title:i.documentBaseTitle});function m(rt){const Se=i.models.value.find(ze=>ze.id===i.status.value.modelId),U=B0(Se),me=U.indexOf(X2(Se,rt)),ke=U[(me+1)%U.length]??U[0]??"off";return i6(Se,ke)}const y=L(()=>{const rt=i.models.value.find(Se=>Se.id===i.status.value.modelId);return X2(rt,i.thinking.value)}),A=G(!i.onboarded.value);function b(){i.setOnboarded(!0),A.value=!1}function C(){b(),an.value="providers",bs.value=!0}function v(){an.value="archived",bs.value=!0}let x=0;function S(){const rt=window.visualViewport,Se=document.documentElement.style;Se.setProperty("--app-height",`${rt?.height??window.innerHeight}px`),Se.setProperty("--app-top",`${rt?.offsetTop??0}px`)}function _(){x||(x=requestAnimationFrame(()=>{x=0,S()}))}mn(()=>{n=bre(()=>{t.value=!0,i.clearDangerousBypassAuth()}),i.load(),we(),S(),window.visualViewport?.addEventListener("resize",_),window.visualViewport?.addEventListener("scroll",_),window.addEventListener("resize",_),document.addEventListener("keydown",I,!0)}),Mn(()=>{document.removeEventListener("keydown",I,!0),window.visualViewport?.removeEventListener("resize",_),window.visualViewport?.removeEventListener("scroll",_),window.removeEventListener("resize",_),x&&(cancelAnimationFrame(x),x=0),document.documentElement.style.removeProperty("--app-height"),document.documentElement.style.removeProperty("--app-top"),n!==null&&(n(),n=null)});function I(rt){rt.key==="Escape"&&(Wi.value||rt.defaultPrevented||ot()&&(rt.stopImmediatePropagation(),rt.preventDefault()))}const M=G(null),{previewTarget:$,previewFile:D,previewLoading:T,previewError:N,previewDownloadUrl:O,previewExternalActions:P,openFilePreview:R,closeFilePreview:q,openPreviewInEditor:j,revealPreviewFile:W}=Nhe({client:i,detailTarget:M,t:(rt,Se)=>Se===void 0?o(rt):o(rt,Se)}),z=L(()=>M.value!==null);mn(()=>{const rt=uDe({resolveSkill:Se=>i.skills.value.find(U=>U.name===Se)??null,openPath:Se=>void R(Se),openSkillLabel:()=>o("mention.openSkill"),copyPathLabel:()=>o("mention.copyPath"),probePath:(Se,U)=>i.probeWorkspacePath(Se,U),skillsLoaded:()=>i.skillsLoaded.value,probeScope:()=>i.activeSessionId.value||i.activeWorkspaceId.value});Mn(rt)});const H=G(null),ee=G(null);function V(rt){ee.value=rt.originImg??null,H.value=rt.media}const{SIDEBAR_WIDTH_KEY:ie,SIDEBAR_DEFAULT:se,SIDEBAR_MIN:Z,sidebarMax:pe,sessionColWidth:re,sidebarCollapsed:fe,sidebarDragging:Ee,sideWidth:X,loadSidebarCollapsed:we,toggleSidebarCollapse:Y}=The({previewOpen:z}),{PREVIEW_WIDTH_KEY:le,PREVIEW_MIN:Ce,previewDefaultWidth:ae,previewMax:oe,previewWidth:Q,previewPanelWidth:ne,compactionPanelText:ge,compactionPanelVisible:Ae,openCompactionPanel:_e,closeCompactionPanel:Ke,agentPanelMember:xe,agentPanelTurns:Ne,agentPanelLoading:et,agentPanelLoadError:ut,agentPanelLoadingMore:yt,agentPanelLoadMoreError:Mt,agentPanelHasMore:Ze,agentPanelRunning:Ge,openAgentPanel:lt,closeAgentPanel:tt,loadOlderAgentMessages:It,detailDiffMode:Ut,detailDiffPath:fn,openDiffDetail:Nn,closeDiffDetail:Qt,selectDiffFile:un,turnDiffChange:Dn,openTurnDiff:pn,closeTurnDiff:wn,btwVisible:bn,openSideChatTab:Xn,closeSideChat:Ue,sidePanelVisible:st,panelDragging:ct,closeOpenSidePanel:ot}=_he({client:i,sideWidth:X,detailTarget:M,closeFilePreview:q}),sn=G(null);function Nt(rt){sn.value?.style.setProperty("--preview-w",`${rt}px`)}qe([sn,ne],([rt,Se])=>rt?.style.setProperty("--preview-w",`${Se}px`),{immediate:!0});const Tn=G(null),fs=L(()=>{const rt=i.goal.value?.status;return rt==="active"||rt==="paused"||rt==="blocked"});function vi(){c.value=!1,Tn.value?.focusGoal()}const Dt=G(!1),Is=G(!1),Ei=G(!1),Pn=G(!1),bs=G(!1);let Lo;mn(()=>{Lo=window.kimiDesktop?.onMenuAction?.(rt=>{rt==="open-settings"?bs.value=!0:rt==="new-chat"&&Do()})}),Mn(()=>{Lo?.()});const Oi=G(null),co=G(null),Wi=L(()=>_o.value>0||Dt.value||Is.value||Ei.value||Pn.value||bs.value||A.value||u.value||c.value),As=G(!1),fo=G(!1),Pi=G(!1);async function es(){As.value=!0,fo.value=!1,Dt.value=!0;try{await i.refreshAllProviders()}catch{fo.value=!0}finally{As.value=!1}}function Ai(){Is.value=!0}async function No(){await r({title:o("sidebar.logoutConfirmTitle"),message:o("sidebar.logoutConfirmMessage"),variant:"danger",action:()=>i.logout()})}async function Ci(rt){Dt.value=!1,await Ti(rt)}async function Ti(rt){await i.setModel(rt)&&rt!==i.defaultModel.value&&i.updateConfig({defaultModel:rt})}const Yt=G(null);let vn=0;const ts=G(null);async function fi(rt,Se){if(!(Se.length===0||ts.value!==null)){ts.value=rt;try{const U=rt==="archive"?await i.archiveSessions(Se):await i.restoreSessions(Se),me=eL(rt,U);if(me===null){i.notify({severity:"error",title:o(rt==="archive"?"admin.batchDoneFailedNotice":"admin.batchReopenFailedNotice",{n:U.failed})});return}Yt.value={kind:"adminBatch",plan:me,key:++vn}}finally{ts.value=null}}}async function Fr(){const rt=Yt.value;if(!rt||rt.kind!=="adminBatch")return;const Se=IGe(rt.plan.direction),U=Se==="archive"?await i.archiveSessions(rt.plan.ids):await i.restoreSessions(rt.plan.ids),me=eL(Se,U);me!==null&&Yt.value?.key===rt.key&&(Yt.value={kind:"adminBatch",plan:me,key:++vn})}async function Ni(rt){await i.archiveSession(rt),!i.sessionsForView.value.some(Se=>Se.id===rt)&&(Yt.value={kind:"archive",id:rt,key:++vn})}async function hi(rt){await i.restoreSession(rt)&&(Yt.value={kind:"archive",id:rt,reopen:!0,key:++vn})}let ho=!1;async function Xs(rt){if(ho)return;ho=!0;const Se=++vn,U=setTimeout(()=>{(Yt.value===null||Yt.value.key<=Se)&&(Yt.value={kind:"export",state:"running",key:Se})},400);try{await i.exportSession(rt)&&!Wh?(Yt.value===null||Yt.value.key<=Se)&&(Yt.value={kind:"export",state:"done",key:++vn}):Yt.value?.kind==="export"&&Yt.value.key===Se&&(Yt.value=null)}finally{clearTimeout(U),ho=!1}}async function ns(){const rt=Yt.value;if(!(!rt||rt.kind!=="archive")){if(rt.reopen){if(await i.archiveSession(rt.id),i.sessionsForView.value.some(Se=>Se.id===rt.id)||Yt.value?.key!==rt.key)return;Yt.value={kind:"archive",id:rt.id,key:++vn};return}await i.restoreSession(rt.id)&&Yt.value?.key===rt.key&&(Yt.value=null)}}function qi(rt){rt!==void 0&&Yt.value?.key===rt&&(Yt.value=null)}const an=G(void 0),{sidebarTabs:eo}=Hh(),Us=G(void 0);qe(c,rt=>{rt||(Us.value=void 0)});async function Fo(rt){const Se=i.workspacesView.value.find(U=>U.id===rt)?.name??rt;await r({title:o("sidebar.removeWorkspace"),message:o("workspace.removeWorkspaceConfirm",{name:Se}),variant:"danger",action:()=>i.deleteWorkspace(rt)})}async function Ms(rt){Pi.value=!0;try{await i.updateConfig(rt)&&await i.checkAuth()}finally{Pi.value=!1}}async function Es(){return i.startOAuthLogin()}async function to(){return i.pollOAuthLogin()}async function Li(){return i.cancelOAuthLogin()}async function wi(){Is.value=!1,await i.checkAuth(),await i.load()}async function Vo(){b(),await i.checkAuth(),await i.load()}async function Ts(rt){const Se=i.activeSessionId.value;await i.undo(1)!==null&&(Se&&(i.invalidateSessionPlans(Se),i.refreshSessionPlans(Se)),await kt(),Tn.value?.loadComposerForEdit(rt.text,rt.attachments),Tn.value?.notifyUndone())}async function po(){const rt=await i.abortCurrentPrompt();Tn.value?.onAbortOutcome(rt)}function Ks(rt){const Se=uc();return rt.map(U=>C$(Se,U))}async function Zo(rt,Se,U){if(i.authReady.value)return!0;const me=i.managedProviderStatus.value==="authenticated";me&&i.managedMembership.value===null&&await i.probeManagedMembership();const ke=me&&i.managedMembership.value==="free",ze=await r(ke?{title:o("login.upgradeRequiredTitle"),message:o("login.upgradeRequiredMessage"),confirmLabel:o("sidebar.upgrade"),variant:"primary"}:{title:o("login.requiredTitle"),message:o("login.requiredMessage"),confirmLabel:o("login.goToLogin"),variant:"primary"});return Tn.value?.loadComposerForEdit(U??rt,Ks(Se)),ze&&(ke?z0():Ai()),!1}async function Be(rt,Se=[],U){if(i.activeSessionId.value||i.activeWorkspaceId.value)return!0;const me=await r({title:o("workspace.requiredTitle"),message:o("workspace.requiredMessage"),confirmLabel:o("conversation.pickFolder"),variant:"primary"});return Tn.value?.loadComposerForEdit(U??rt,Ks(Se)),me&&(Ei.value=!0),!1}async function Pe(rt,Se=[],U){return await Zo(rt,Se,U)?Be(rt,Se,U):!1}let dt=0;async function St(rt){const{cmd:Se,attachments:U,restoreText:me}=rt;if(Se==="/compact"||Se.startsWith("/compact ")){if(!await Pe(Se))return;i.compact(Se.slice(8).trim()||void 0);return}if(Se==="/swarm"||Se.startsWith("/swarm ")){const ke=Se.slice(6).trim();if(ke==="on")i.setSwarmMode(!0);else if(ke==="off")i.setSwarmMode(!1);else if(ke){if(!await Pe(Se))return;i.setSwarmMode(!0),i.sendPrompt(ke)}else i.toggleSwarmMode();return}if(Se==="/goal"||Se.startsWith("/goal ")){const ke=Se.slice(5).trim();if(ke==="pause"||ke==="resume"||ke==="cancel")i.controlGoal(ke);else if(ke){if(!await Pe(Se))return;i.createGoal(ke)}else i.toggleGoalMode();return}if(Se==="/btw"||Se.startsWith("/btw ")){const ke=Se.slice(4).trim();if(!ke&&i.sideChatVisible.value)Ue();else{if(ke&&!await Pe(Se))return;Xn(ke||void 0)}return}switch(Se){case"/new":case"/clear":Do();break;case"/fork":i.forkSession();break;case"/export":Xs();break;case"/undo":{const ke=i.activeSessionId.value;i.undo().then(ze=>{ze&&ke&&(i.invalidateSessionPlans(ke),i.refreshSessionPlans(ke))});break}case"/auto":i.setPermission("auto");break;case"/yolo":i.setPermission("yolo");break;case"/thinking":i.setThinking(m(i.thinking.value));break;case"/status":Pn.value=!0;break;case"/login":Ai();break;default:{const ke=Se.indexOf(" "),ze=pae((ke===-1?Se:Se.slice(0,ke)).slice(1)),Ye=ke===-1?void 0:Se.slice(ke+1).trim()||void 0;if(!ze)break;const Ve=++dt;if(!await Pe(Se,U,me))return;if(!i.activeSessionId.value&&i.activeWorkspaceId.value){const wt=i.activeWorkspaceId.value,{sessionId:pt,activated:Ht}=await i.startSessionAndActivateSkill(wt,ze,Ye,U);!Ht&&Ve===dt&&Tn.value?.isComposerEmpty()&&(pt===null?i.activeWorkspaceId.value===wt:i.activeSessionId.value===pt)&&Tn.value.loadComposerForEdit(me??Se,Ks(U))}else{const wt=i.activeSessionId.value;i.activateSkill(ze,Ye,U).then(pt=>{pt||i.activeSessionId.value===wt&&Ve===dt&&Tn.value?.isComposerEmpty()&&Tn.value.loadComposerForEdit(me??Se,Ks(U))})}break}}}function An(rt){i.unqueue(rt)}function pi(rt){i.unqueue(rt)}function hs(rt){i.reorderQueue(rt.from,rt.to)}async function is(rt){if(!await Zo(rt.text,rt.attachments))return;dt++;const Se=i.activeWorkspaceId.value;if(!i.activeSessionId.value&&Se){await i.startSessionAndSendPrompt(Se,rt.text,rt.attachments);return}if(!i.activeSessionId.value&&!Se){Oi.value=rt,await r({title:o("workspace.requiredTitle"),message:o("workspace.requiredMessage"),confirmLabel:o("conversation.pickFolder"),variant:"primary"})?Ei.value=!0:Ls();return}i.sendPrompt(rt.text,rt.attachments)}function Ls(){const rt=Oi.value;Oi.value=null,rt&&Tn.value?.loadComposerForEdit(rt.text,Ks(rt.attachments))}async function Ui(rt){if(co.value=null,!await i.addWorkspaceByPath(rt)){co.value=o("workspace.addFailed");return}Ei.value=!1;const U=Oi.value;Oi.value=null;const me=i.activeWorkspaceId.value;U&&me&&await i.startSessionAndSendPrompt(me,U.text,U.attachments)}function On(){Ls(),co.value=null,Ei.value=!1}function Cs(){kt(()=>{Tn.value?.focusComposer()})}function Do(){const rt=i.activeWorkspaceId.value;rt?i.openWorkspaceDraft(rt,{entry:"newChat"}):i.clearActiveSession(),Cs()}function ws(rt){i.openWorkspaceDraft(rt,{entry:"workspace"}),Cs()}function tl(rt){i.openWorkspaceDraft(rt),Cs()}const xi=L(()=>i.recentSessionsForWorkspace(i.activeWorkspaceId.value));function dr(rt){rt&&window.open(rt,"_blank","noopener")}return(rt,Se)=>(k(),E("div",blt,[s.value?(k(),de(mlt,{key:0})):te("",!0),w("div",{class:Fe(["app",{mobile:p(a),"sidebar-collapsed":p(fe)&&!p(a),"macos-desktop":p(Gu)}]),inert:A.value},[p(a)?(k(),de(zit,{key:1,workspace:p(i).visibleWorkspace.value,"session-title":d.value,running:g.value,branch:p(i).status.value.branch,"session-count":h.value,onOpenSwitcher:Se[27]||(Se[27]=U=>u.value=!0),onOpenSettings:Se[28]||(Se[28]=U=>c.value=!0)},null,8,["workspace","session-title","running","branch","session-count"])):(k(),E(Te,{key:0},[K(Upe,{collapsed:p(fe),dragging:p(Ee),"col-width":p(X),"active-workspace":p(i).visibleWorkspace.value,"active-workspace-id":p(i).activeWorkspaceId.value,sessions:p(i).sessionsForView.value,groups:p(i).workspaceGroups.value,"workspace-sort-mode":p(i).workspaceSortMode.value,"pinned-sessions":p(i).pinnedSessions.value,"flat-sessions":p(i).flatSessions.value,"flat-has-more":p(i).flatSessionsHasMore.value,"flat-loading-more":p(i).flatSessionsLoadingMore.value,"done-sessions":p(i).doneSessions.value,"done-has-more":p(i).doneSessionsHasMore.value,"done-loading-more":p(i).doneSessionsLoadingMore.value,initialized:p(i).initialized.value,"active-id":p(i).activeSessionId.value,"attention-by-session":p(i).attentionBySession.value,"pending-by-session":p(i).pendingBySession.value,"unread-by-session":p(i).unreadBySession.value,onSelect:Se[0]||(Se[0]=U=>p(i).selectSession(U)),onCreate:Do,onCreateInWorkspace:Se[1]||(Se[1]=U=>ws(U)),onSelectWorkspace:Se[2]||(Se[2]=U=>p(i).openWorkspace(U)),onAddWorkspace:Se[3]||(Se[3]=U=>Ei.value=!0),onRename:Se[4]||(Se[4]=(U,me)=>p(i).renameSession(U,me)),onGenerateTitle:Se[5]||(Se[5]=(U,me)=>void p(i).regenerateSessionTitle(U).then(me)),onArchive:Se[6]||(Se[6]=U=>Ni(U)),onRestore:Se[7]||(Se[7]=U=>hi(U)),onFork:Se[8]||(Se[8]=U=>p(i).forkSession(U)),onExport:Se[9]||(Se[9]=U=>void Xs(U)),onPin:Se[10]||(Se[10]=U=>p(i).togglePinSession(U)),onUnpin:Se[11]||(Se[11]=U=>p(i).unpinSession(U)),onDropPin:Se[12]||(Se[12]=U=>p(i).pinSession(U)),onRenameWorkspace:Se[13]||(Se[13]=(U,me)=>p(i).renameWorkspace(U,me)),onDeleteWorkspace:Se[14]||(Se[14]=U=>Fo(U)),onReorderWorkspaces:Se[15]||(Se[15]=U=>p(i).reorderWorkspaces(U)),onSetWorkspaceSortMode:Se[16]||(Se[16]=U=>p(i).setWorkspaceSortMode(U)),onLoadMoreSessions:Se[17]||(Se[17]=U=>void p(i).loadMoreSessions(U)),onLoadAllSessions:Se[18]||(Se[18]=U=>void p(i).loadAllSessions()),onEnsureFlatSessions:Se[19]||(Se[19]=U=>void p(i).ensureFlatSessions()),onLoadMoreFlatSessions:Se[20]||(Se[20]=U=>void p(i).loadMoreFlatSessions()),onEnsureDoneSessions:Se[21]||(Se[21]=U=>void p(i).ensureDoneSessions()),onLoadMoreDoneSessions:Se[22]||(Se[22]=U=>void p(i).loadMoreDoneSessions()),onOpenSessionAdmin:Se[23]||(Se[23]=U=>p(i).openSessionAdmin()),onOpenSettings:Se[24]||(Se[24]=U=>bs.value=!0),onLogin:Ai,onCollapse:p(Y)},null,8,["collapsed","dragging","col-width","active-workspace","active-workspace-id","sessions","groups","workspace-sort-mode","pinned-sessions","flat-sessions","flat-has-more","flat-loading-more","done-sessions","done-has-more","done-loading-more","initialized","active-id","attention-by-session","pending-by-session","unread-by-session","onCollapse"]),$n(K(c_,{class:"side-handle","storage-key":p(ie),"default-width":p(se),min:p(Z),max:p(pe),"onUpdate:width":Se[25]||(Se[25]=U=>re.value=U),"onUpdate:dragging":Se[26]||(Se[26]=U=>Ee.value=U)},null,8,["storage-key","default-width","min","max"]),[[Qi,!p(fe)]])],64)),$n(K(aZe,{ref_key:"conversationPaneRef",ref:Tn,mobile:p(a),turns:p(i).turns.value,"session-id":p(i).activeSessionId.value,approvals:p(i).pendingApprovals.value,changes:p(i).changes.value,"git-info":p(i).gitInfo.value,tasks:p(i).tasks.value,todos:p(i).todos.value,goal:p(i).goal.value,"session-plans":p(i).sessionPlans.value,"activation-badges":p(i).activationBadges.value,status:p(i).status.value,thinking:p(i).thinking.value,"plan-mode":p(i).planMode.value,"plan-armed":p(i).planArmed.value,"swarm-mode":p(i).swarmMode.value,"goal-mode":p(i).goalMode.value,models:p(i).models.value,"auth-ready":p(i).authReady.value,"managed-signed-in":p(i).managedProviderStatus.value==="authenticated","managed-membership":p(i).managedMembership.value,"starred-ids":p(i).starredModelIds.value,skills:p(i).skills.value,questions:p(i).questions.value,"pending-question-actions":p(i).pendingQuestionActions,"pending-approval-actions":p(i).pendingApprovalActions,running:g.value,"overlay-open":Wi.value,"turn-active":p(i).turnActive.value,queued:p(i).queued.value,"search-files":p(i).searchFiles,"upload-image":p(i).uploadImage,working:p(i).working.value,"last-turn-reason":f.value,"turn-error":p(i).activeTurnError.value??null,"turn-retry":p(i).activeTurnRetry.value??null,starting:p(i).isStartingFirstPrompt.value,"file-reload-key":p(i).activeSessionId.value,"session-loading":p(i).sessionLoading.value,compaction:p(i).compaction.value,"has-more-messages":p(i).hasMoreMessages.value,"loading-more":p(i).loadingMoreMessages.value,"loading-more-error":p(i).loadMoreMessagesError.value,"load-older-messages":p(i).loadOlderMessages,"workspace-name":p(i).visibleWorkspace.value?.name,"workspace-root":p(i).visibleWorkspace.value?.root??p(i).status.value.cwd,"git-diff-stats":p(i).gitDiffStats.value,workspaces:p(i).workspacesView.value,"active-workspace-id":p(i).activeWorkspaceId.value,"recent-sessions":xi.value,"draft-entry":p(i).draftEntry.value,"session-title":d.value,"session-archived":p(i).activeSessionArchived.value,pr:p(i).activePullRequest.value,onOpenChanges:Se[29]||(Se[29]=U=>p(Nn)()),onSelectWorkspace:Se[30]||(Se[30]=U=>tl(U)),onSelectSession:Se[31]||(Se[31]=U=>p(i).selectSession(U)),onAddWorkspace:Se[32]||(Se[32]=U=>Ei.value=!0),onOpenPr:dr,onOpenSessionAdmin:Se[33]||(Se[33]=U=>p(i).openSessionAdmin(U)),onSubmit:Se[34]||(Se[34]=U=>is(U)),onLogin:Se[35]||(Se[35]=U=>Ai()),onSteer:Se[36]||(Se[36]=U=>p(i).steerPrompt(U.text,U.attachments)),onApproval:Se[37]||(Se[37]=(U,me)=>p(i).respondApproval(U,me)),onCancelTask:Se[38]||(Se[38]=U=>p(i).cancelTask(U)),onAnswer:Se[39]||(Se[39]=(U,me)=>p(i).respondQuestion(U,me)),onDismiss:Se[40]||(Se[40]=U=>p(i).dismissQuestion(U)),onCommand:St,onInterrupt:po,onUnqueue:An,onEditQueued:pi,onReorderQueue:hs,onSetPermission:Se[41]||(Se[41]=U=>p(i).setPermission(U)),onSetThinking:Se[42]||(Se[42]=U=>p(i).setThinking(U)),onTogglePlan:Se[43]||(Se[43]=U=>p(i).togglePlanMode()),onToggleSwarm:Se[44]||(Se[44]=U=>p(i).toggleSwarmMode()),onToggleGoal:Se[45]||(Se[45]=U=>p(i).toggleGoalMode()),onCreateGoal:Se[46]||(Se[46]=U=>p(i).createGoal(U)),onControlGoal:Se[47]||(Se[47]=U=>p(i).controlGoal(U)),onRefreshGitStatus:Se[48]||(Se[48]=U=>p(i).activeSessionId.value&&p(i).loadGitStatus(p(i).activeSessionId.value)),onRenameSession:Se[49]||(Se[49]=(U,me)=>p(i).renameSession(U,me)),onForkSession:Se[50]||(Se[50]=U=>p(i).forkSession(U)),onArchiveSession:Se[51]||(Se[51]=U=>Ni(U)),onRestoreSession:Se[52]||(Se[52]=U=>hi(U)),onExportSession:Se[53]||(Se[53]=U=>void Xs(U)),onCompact:Se[54]||(Se[54]=U=>p(i).compact()),onPickModel:Se[55]||(Se[55]=U=>es()),onSelectModel:Se[56]||(Se[56]=U=>Ti(U)),onOpenFile:Se[57]||(Se[57]=U=>p(R)(U)),onOpenMedia:V,onOpenTurnDiff:Se[58]||(Se[58]=U=>p(pn)(U)),onOpenCompaction:Se[59]||(Se[59]=U=>p(_e)(U)),onOpenAgent:Se[60]||(Se[60]=U=>p(lt)(U)),onEditMessage:Ts},null,8,["mobile","turns","session-id","approvals","changes","git-info","tasks","todos","goal","session-plans","activation-badges","status","thinking","plan-mode","plan-armed","swarm-mode","goal-mode","models","auth-ready","managed-signed-in","managed-membership","starred-ids","skills","questions","pending-question-actions","pending-approval-actions","running","overlay-open","turn-active","queued","search-files","upload-image","working","last-turn-reason","turn-error","turn-retry","starting","file-reload-key","session-loading","compaction","has-more-messages","loading-more","loading-more-error","load-older-messages","workspace-name","workspace-root","git-diff-stats","workspaces","active-workspace-id","recent-sessions","draft-entry","session-title","session-archived","pr"]),[[Qi,p(i).mainView.value==="chat"]]),$n(K(_Ge,{"batch-running":ts.value,onArchiveSessions:Se[61]||(Se[61]=U=>void fi("archive",U)),onRestoreSessions:Se[62]||(Se[62]=U=>void fi("restore",U))},null,8,["batch-running"]),[[Qi,p(i).mainView.value==="sessionAdmin"]]),!p(a)&&(p(Gu)||p(fe))?(k(),de(p(tn),{key:2,class:"sidebar-toggle-btn",size:"sm",label:p(fe)?p(o)("sidebar.expandSidebar"):p(o)("sidebar.collapseSidebar"),tooltip:p(fe)?p(o)("sidebar.expandSidebar"):p(o)("sidebar.collapseSidebar"),onClick:p(Y)},{default:he(()=>[K(p(ve),{name:p(fe)?"panel-expand":"panel-collapse"},null,8,["name"])]),_:1},8,["label","tooltip","onClick"])):te("",!0),!p(a)&&p(fe)?(k(),de(p(tn),{key:3,class:"new-chat-btn",size:"sm",label:p(o)("sidebar.newChat"),tooltip:p(o)("sidebar.newChat"),onClick:Do},{default:he(()=>[K(p(ve),{name:"chat-new"})]),_:1},8,["label","tooltip"])):te("",!0),p(st)&&!p(a)?(k(),de(c_,{key:4,class:"preview-handle","storage-key":p(le),"default-width":p(ae),min:p(Ce),max:p(oe),reverse:"","aria-label":p(o)("layout.resizePreviewAria"),"apply-live":Nt,"onUpdate:width":Se[63]||(Se[63]=U=>Q.value=U),"onUpdate:dragging":Se[64]||(Se[64]=U=>ct.value=U)},null,8,["storage-key","default-width","min","max","aria-label"])):te("",!0),!p(a)||p(st)?(k(),E("aside",{key:5,ref_key:"previewPanelEl",ref:sn,class:Fe(["global-preview",{open:p(st),mobile:p(a)}]),role:"complementary","aria-label":p(o)("layout.detailPanelAria"),"aria-hidden":!p(st)},[M.value==="compaction"&&p(Ae)?(k(),de(dQe,{key:0,text:p(ge)??"",subtitle:p(o)("conversation.summaryTitle"),onClose:p(Ke)},null,8,["text","subtitle","onClose"])):M.value==="agent"&&p(xe)?(k(),de(mQe,{key:1,member:p(xe),turns:p(Ne),running:p(Ge),loading:p(et),"load-error":p(ut),"has-more":p(Ze),"loading-more":p(yt),"load-more-error":p(Mt),onClose:p(tt),onLoadOlderMessages:p(It),onOpenAgent:p(lt),onOpenFile:p(R),onOpenMedia:V,onOpenTurnDiff:Se[65]||(Se[65]=U=>p(pn)(U))},null,8,["member","turns","running","loading","load-error","has-more","loading-more","load-more-error","onClose","onLoadOlderMessages","onOpenAgent","onOpenFile"])):M.value==="btw"&&p(bn)?(k(),de(xQe,{key:2,turns:p(i).sideChatTurns.value,running:p(i).sideChatRunning.value,sending:p(i).sideChatSending.value,"on-send":p(i).sendSideChatPrompt,onClose:p(Ue),onOpenMedia:V},null,8,["turns","running","sending","on-send","onClose"])):M.value==="diff"?(k(),de(JQe,{key:3,mode:p(Ut),changes:p(i).changes.value,"git-info":p(i).gitInfo.value,"file-diff":p(i).fileDiff.value,"full-texts":p(i).fileDiffTexts.value,"empty-file":p(i).fileDiffEmptyFile.value,"selected-diff-path":p(i).selectedDiffPath.value,"file-diff-loading":p(i).fileDiffLoading.value,closable:"",onOpen:p(un),onBack:Se[66]||(Se[66]=U=>{Ut.value="list",fn.value=null,p(i).clearFileDiff()}),onClose:p(Qt)},null,8,["mode","changes","git-info","file-diff","full-texts","empty-file","selected-diff-path","file-diff-loading","onOpen","onClose"])):M.value==="file"?(k(),de(aQe,{key:4,file:p(D),loading:p(T),error:p(N),line:p($)?.line,"download-url":p(O),closable:"","external-actions":p(P),"open-file":p(R),onClose:p(q),onOpenExternal:p(j),onReveal:p(W)},null,8,["file","loading","error","line","download-url","external-actions","open-file","onClose","onOpenExternal","onReveal"])):M.value==="turn-diff"&&p(Dn)?(k(),de(sYe,{key:5,change:p(Dn),cwd:p(i).status.value.cwd,closable:"",onClose:p(wn),onOpenFile:Se[67]||(Se[67]=U=>p(R)({path:U}))},null,8,["change","cwd","onClose"])):te("",!0)],10,Clt)):te("",!0),K(klt,{class:"internal-build-fab"}),Dt.value?(k(),de(bYe,{key:6,models:p(i).models.value,current:p(i).status.value.modelId,"starred-ids":p(i).starredModelIds.value,loading:As.value,unavailable:fo.value,onSelect:Se[68]||(Se[68]=U=>Ci(U)),onToggleStar:Se[69]||(Se[69]=U=>p(i).toggleStarModel(U)),onClose:Se[70]||(Se[70]=U=>Dt.value=!1)},null,8,["models","current","starred-ids","loading","unavailable"])):te("",!0),bs.value?(k(),de($nt,{key:7,"color-scheme":p(i).colorScheme.value,"font-scale":p(i).fontScale.value,"managed-provider-status":p(i).managedProviderStatus.value,"managed-user-info":p(i).managedUserInfo.value,"on-fetch-usage":p(i).getUsage,notify:p(i).notifyEnabled.value,"notify-permission":p(i).notifyPermission.value,"notify-sound":p(i).notifySound.value,config:p(i).config.value,models:p(i).models.value,"config-saving":Pi.value,"server-version":p(i).serverVersion.value,backend:p(i).backend.value,"experimental-flags":p(i).experimentalFlags.value,"initial-tab":an.value,onSetColorScheme:Se[71]||(Se[71]=U=>p(i).setColorScheme(U)),onSetFontScale:Se[72]||(Se[72]=U=>p(i).setFontScale(U)),onSetNotify:Se[73]||(Se[73]=U=>p(i).setNotifyEnabled(U)),onSetNotifySound:Se[74]||(Se[74]=U=>p(i).setNotifySound(U)),onUpdateConfig:Se[75]||(Se[75]=U=>Ms(U)),onLogin:Se[76]||(Se[76]=()=>{bs.value=!1,Ai()}),onLogout:No,onClose:Se[77]||(Se[77]=U=>{bs.value=!1,an.value=void 0})},null,8,["color-scheme","font-scale","managed-provider-status","managed-user-info","on-fetch-usage","notify","notify-permission","notify-sound","config","models","config-saving","server-version","backend","experimental-flags","initial-tab"])):te("",!0),Pn.value?(k(),de(Cit,{key:8,status:p(i).status.value,thinking:y.value,"plan-mode":p(i).planMode.value,"swarm-mode":p(i).swarmMode.value,"cost-usd":p(i).sessionCost.value,onClose:Se[78]||(Se[78]=U=>Pn.value=!1)},null,8,["status","thinking","plan-mode","swarm-mode","cost-usd"])):te("",!0),Ei.value?(k(),de(rit,{key:9,"browse-fs":p(i).browseFs,"get-fs-home":p(i).getFsHome,"default-path":p(i).visibleWorkspace.value?.root??p(i).status.value.cwd,error:co.value,onAdd:Se[79]||(Se[79]=U=>Ui(U)),onClose:On},null,8,["browse-fs","get-fs-home","default-path","error"])):te("",!0),K(ls,{name:"gload-fade"},{default:he(()=>[p(i).initialized.value?te("",!0):(k(),de(Rrt,{key:0,issue:p(i).connectIssue.value},null,8,["issue"]))]),_:1}),K(Mit,{warnings:p(i).warnings.value,onDismiss:p(i).dismissWarning},null,8,["warnings","onDismiss"]),(k(),de(Gr,{to:"body"},[K(ls,{name:"action-toast"},{default:he(()=>[Yt.value?(k(),de(p(QZ),{key:Yt.value.key,duration:Yt.value.kind==="export"?Yt.value.state==="running"?6e4:4e3:8e3,"dismiss-token":Yt.value.key,onDismiss:qi},{default:he(()=>[Yt.value.kind==="archive"?(k(),E(Te,{key:0},[p(eo)?(k(),E(Te,{key:0},[$e(F(Yt.value.reopen?p(o)("sidebar.reopenToastLead"):p(o)("sidebar.completeToastLead"))+" ",1),w("button",{type:"button",onClick:ns},F(p(o)("sidebar.archiveToastUndo")),1)],64)):(k(),E(Te,{key:1},[w("button",{type:"button",onClick:ns},F(p(o)("sidebar.archiveToastUndo")),1),$e(" "+F(p(o)("sidebar.archiveToastMid"))+" ",1),w("button",{type:"button",onClick:v},F(p(o)("sidebar.archiveToastSettings")),1),$e(" "+F(p(o)("sidebar.archiveToastTail")),1)],64))],64)):Yt.value.kind==="adminBatch"?(k(),E(Te,{key:1},[$e(F(Yt.value.plan.direction==="archive"?p(o)("admin.batchDoneToast",{n:Yt.value.plan.succeeded}):p(o)("admin.batchReopenedToast",{n:Yt.value.plan.succeeded})),1),Yt.value.plan.failed>0?(k(),E(Te,{key:0},[$e(F(p(o)("admin.batchFailedSuffix",{n:Yt.value.plan.failed})),1)],64)):te("",!0),w("button",{type:"button",onClick:Fr},F(p(o)("admin.undo")),1)],64)):(k(),E(Te,{key:2},[$e(F(Yt.value.state==="running"?p(o)("commands.export.started"):p(o)("commands.export.done")),1)],64))]),_:1},8,["duration","dismiss-token"])):te("",!0)]),_:1})])),p(l)?(k(),de(plt,{key:10})):te("",!0),K(cit),p(a)?(k(),de(ast,{key:11,modelValue:u.value,"onUpdate:modelValue":Se[80]||(Se[80]=U=>u.value=U),groups:p(i).mobileWorkspaceGroups.value,"active-workspace-id":p(i).activeWorkspaceId.value,"active-id":p(i).activeSessionId.value,"attention-by-session":p(i).attentionBySession.value,"attention-by-workspace":p(i).attentionByWorkspace.value,onSelect:Se[81]||(Se[81]=U=>p(i).selectSession(U)),onCreate:Do,onCreateInWorkspace:Se[82]||(Se[82]=U=>ws(U)),onAddWorkspace:Se[83]||(Se[83]=U=>Ei.value=!0),onRename:Se[84]||(Se[84]=(U,me)=>p(i).renameSession(U,me)),onArchive:Se[85]||(Se[85]=U=>Ni(U)),onDeleteWorkspace:Se[86]||(Se[86]=U=>Fo(U)),onLoadMore:Se[87]||(Se[87]=U=>void p(i).loadMoreSessions(U))},null,8,["modelValue","groups","active-workspace-id","active-id","attention-by-session","attention-by-workspace"])):te("",!0),p(a)?(k(),de(xot,{key:12,modelValue:c.value,"onUpdate:modelValue":Se[88]||(Se[88]=U=>c.value=U),"initial-view":Us.value,status:p(i).status.value,thinking:p(i).thinking.value,models:p(i).models.value,"plan-mode":p(i).planArmed.value||p(i).planMode.value,"goal-mode":p(i).goalMode.value,"goal-active":fs.value,"swarm-mode":p(i).swarmMode.value,"color-scheme":p(i).colorScheme.value,"font-scale":p(i).fontScale.value,"managed-provider-status":p(i).managedProviderStatus.value,"managed-user-info":p(i).managedUserInfo.value,"server-version":p(i).serverVersion.value,onPickModel:Se[89]||(Se[89]=U=>es()),onSetThinking:Se[90]||(Se[90]=U=>p(i).setThinking(U)),onTogglePlan:Se[91]||(Se[91]=U=>p(i).togglePlanMode()),onToggleGoal:Se[92]||(Se[92]=U=>p(i).toggleGoalMode()),onFocusGoal:vi,onToggleSwarm:Se[93]||(Se[93]=U=>p(i).toggleSwarmMode()),onSetPermission:Se[94]||(Se[94]=U=>p(i).setPermission(U)),onSetColorScheme:Se[95]||(Se[95]=U=>p(i).setColorScheme(U)),onSetFontScale:Se[96]||(Se[96]=U=>p(i).setFontScale(U)),onLogin:Se[97]||(Se[97]=()=>{c.value=!1,Ai()}),onLogout:No},null,8,["modelValue","initial-view","status","thinking","models","plan-mode","goal-mode","goal-active","swarm-mode","color-scheme","font-scale","managed-provider-status","managed-user-info","server-version"])):te("",!0)],10,Alt),p(i).initialized.value&&A.value?(k(),de(Frt,{key:1,"auth-ready":p(i).managedProviderStatus.value==="authenticated","on-start-o-auth-login":Es,"on-poll-o-auth-login":to,"on-cancel-o-auth-login":Li,onComplete:b,onLoginSuccess:Vo,onAddProvider:C},null,8,["auth-ready"])):te("",!0),Is.value?(k(),de(WYe,{key:2,"on-start-o-auth-login":Es,"on-poll-o-auth-login":to,"on-cancel-o-auth-login":Li,onSuccess:wi,onClose:Se[98]||(Se[98]=U=>Is.value=!1)})):te("",!0),H.value?(k(),de(Y7,{key:3,media:H.value,"origin-img":ee.value,onClose:Se[99]||(Se[99]=U=>{H.value=null,ee.value=null})},null,8,["media","origin-img"])):te("",!0)]))}}),xlt=gt(wlt,[["__scopeId","data-v-f425edfe"]]);$ke();Hue({api:uc,t:(e,t)=>t===void 0?Wl.global.t(e):Wl.global.t(e,t),traceClientEvent:Dke,traceKeyEvent:(e,t)=>wv(e,t),sessionExportTraceToJsonl:Oke});const ag=q2(xlt).use(Wl);ag.use(qh);const Slt={t:(e,t)=>Wl.global.t(e,t)};ag.provide(fF,Slt);ag.provide(pF,e=>p4e(e)?.component);ag.provide(loe,Kl());ag.mount("#app");if(Wh){const e=window.kimiDesktop;if(e){const t=()=>{const n=document.documentElement.dataset.colorScheme;e.setTheme(n==="light"||n==="dark"?n:"system")};new MutationObserver(t).observe(document.documentElement,{attributes:!0,attributeFilter:["data-color-scheme"]}),t()}}export{r5 as $,UL as A,TW as B,Rs as C,kat as D,aL as E,Te as F,mc as G,$e as H,K as I,aW as J,qlt as K,Dl as L,Qe as M,rU as N,Zlt as O,Glt as P,Jlt as Q,S2 as R,ah as S,Gr as T,Qlt as U,C5 as V,Vlt as W,Aat as X,Ylt as Y,pat as Z,_lt as _,zL as a,xs as a$,Ws as a0,M0 as a1,Nlt as a2,d5 as a3,gN as a4,gn as a5,zh as a6,AW as a7,xat as a8,Plt as a9,HL as aA,UW as aB,YW as aC,mn as aD,QW as aE,GW as aF,Xd as aG,ZW as aH,Mn as aI,N0 as aJ,pW as aK,k as aL,iU as aM,Blt as aN,Kn as aO,_L as aP,$lt as aQ,E2 as aR,Ss as aS,Sk as aT,G as aU,aat as aV,AU as aW,ht as aX,Rn as aY,WL as aZ,Ult as a_,Wlt as aa,Hlt as ab,jlt as ac,cat as ad,Sat as ae,cn as af,Dq as ag,_y as ah,ga as ai,nu as aj,Hi as ak,uat as al,Hr as am,ic as an,xt as ao,tat as ap,nat as aq,Un as ar,kt as as,Oq as at,Fe as au,$H as av,qt as aw,qW as ax,VW as ay,Gn as az,Dlt as b,RIe as b$,vat as b0,Kp as b1,B2 as b2,gat as b3,nc as b4,xL as b5,Mlt as b6,Ul as b7,CW as b8,mat as b9,uo as bA,Qi as bB,$q as bC,fat as bD,qe as bE,_k as bF,Rlt as bG,xW as bH,sat as bI,he as bJ,Xlt as bK,$n as bL,_s as bM,dat as bN,Ct as bO,zlt as bP,di as bQ,vs as bR,Lat as bS,Nat as bT,sO as bU,Fat as bV,iIe as bW,iO as bX,v8 as bY,zat as bZ,jIe as b_,Ilt as ba,F as bb,Wm as bc,Klt as bd,Vn as be,Elt as bf,uW as bg,Vu as bh,lat as bi,oW as bj,p as bk,Rh as bl,wat as bm,bat as bn,aU as bo,LW as bp,oat as bq,wW as br,Cat as bs,eat as bt,Olt as bu,BL as bv,W2 as bw,mU as bx,LN as by,jk as bz,hat as c,k7 as c0,v7 as c1,y7 as c2,Oat as c3,qv as c4,eh as c5,Hv as c6,DIe as c7,$Ie as c8,Pat as c9,lRe as cA,jl as cB,Mi as cC,gt as cD,Rat as ca,Mat as cb,jat as cc,c9 as cd,br as ce,YIe as cf,QIe as cg,Q_e as ch,Tat as ci,K_e as cj,V_e as ck,Eat as cl,b7 as cm,JIe as cn,UM as co,SM as cp,oIe as cq,Wv as cr,jv as cs,Dat as ct,Bat as cu,Iat as cv,$at as cw,ve as cx,_at as cy,bj as cz,rat as d,Zu as e,Tlt as f,ls as g,EN as h,Llt as i,Flt as j,vl as k,E0 as l,Ys as m,yy as n,iu as o,yat as p,L as q,q2 as r,de as s,te as t,E as u,w as v,bq as w,iat as x,kq as y,CU as z}; diff --git a/apps/kimi-code/dist-web/assets/index10-C561zpWg.js b/apps/kimi-code/dist-web/assets/index10-BY9KLppN.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index10-C561zpWg.js rename to apps/kimi-code/dist-web/assets/index10-BY9KLppN.js index 2eec5e165..42d01a08e 100644 --- a/apps/kimi-code/dist-web/assets/index10-C561zpWg.js +++ b/apps/kimi-code/dist-web/assets/index10-BY9KLppN.js @@ -1,2 +1,2 @@ -import{bQ as Re,M as Ae,b$ as qe,c0 as Ge,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-_5lXYMaO.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},$1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},j1=["disabled"],L1=["disabled"],P1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},E1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=qe(),J=Ge(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,q=!1,te="",G=!1,he=0;function le(n){return!G&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(G||!P.value||!p.value)return;if(me)return oe=!0,void(q=q||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`<div style="padding: var(--ms-inset-panel-body); color: hsl(var(--ms-destructive))">Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}</div>`)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=q;oe=!1,q=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){G||!P.value||k.value||c.value||U(()=>{G||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(G=!0,he+=1,oe=!1,q=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(`<svg width="15.52" height="16" viewBox="0 0 291 300" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.59C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z" fill="#FF6376"></path><path d="M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z" fill="#FFCCCC"></path><path d="M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z" fill="#FF939F"></path><path d="M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z" fill="#FF356A"></path><path d="M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z" fill="#FF6376"></path></g></svg> +import{bQ as Re,M as Ae,b$ as qe,c0 as Ge,c1 as Je,c2 as Qe,aU as d,bl as Ke,af as We,bY as e1,bE as B,as as U,aD as n1,c3 as Ze,az as o1,aL as r,u,aY as ge,v as t,bk as s,bb as X,au as b,t as F,aw as Ce,bL as t1,bB as l1,s as a1,I as i1,bJ as r1,bO as s1,g as u1,T as c1,q as T,c4 as Ve,c5 as ie,c6 as d1,c7 as De,c8 as v1,c9 as m1,b_ as h1}from"./index-yKYHPeXU.js";var re=(R,xe,l)=>new Promise((a,J)=>{var V=c=>{try{H(l.next(c))}catch($){J($)}},Q=c=>{try{H(l.throw(c))}catch($){J($)}},H=c=>c.done?a(c.value):Promise.resolve(c.value).then(V,Q);H((l=l.apply(R,xe)).next())});const p1=["data-markstream-mode"],f1={key:0,class:"infographic-block-header flex justify-between items-center border-b"},w1={key:0},g1={key:1,class:"flex items-center gap-x-2 overflow-hidden"},C1=["innerHTML"],k1={key:2},x1={key:3,class:"infographic-mode-toggle flex items-center gap-0.5"},y1=["disabled"],b1={class:"flex items-center gap-x-1"},M1={class:"flex items-center gap-x-1"},B1={key:4},F1={key:5,class:"infographic-header-actions flex items-center"},T1=["aria-pressed"],H1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},$1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},j1=["disabled"],L1=["disabled"],P1={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},E1={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},z1={key:0,class:"infographic-source"},S1={class:"infographic-source-code text-sm font-mono whitespace-pre-wrap"},Z1={key:1,class:"relative"},V1={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},D1={class:"flex items-center gap-2 backdrop-blur rounded-lg"},N1={key:0,class:"infographic-pending-source text-sm font-mono whitespace-pre-wrap"},Y1={class:"dialog-panel infographic-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},_1={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},se="infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",ke=Re(Ae({__name:"InfographicBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0}},emits:["copy","export","openModal"],setup(R,{emit:xe}){const l=R,{t:a}=qe(),J=Ge(),V=Je(),Q=Qe(),H=d(!1),c=d(!1),$=d(),p=d(),k=d(!0),ye=d(!1),j=d(!1),D=d(),K=d(null),L=d(!1),S=d(!1),A=d(null),P=d(typeof window>"u"||!Q.value),Ne=Ke(),x=We(e1,null);let E="";const be=T(()=>h1(l,Ne));typeof window<"u"&&B([()=>$.value,Q],([n,e])=>{var o,i,C;if((o=A.value)==null||o.destroy(),A.value=null,!e||P.value)return void(P.value=!0);if(!n)return void(P.value=!1);const f=(C=(i=V?.value.heavyBlockMargin)!=null?i:V?.value.rootMargin)!=null?C:"160px",w=J(n,{rootMargin:f,allowIdle:!1});A.value=w,P.value=w.isVisible.value,w.whenVisible.then(()=>{P.value=!0})},{immediate:!0});const z=T(()=>l.node.code),ue=T(()=>{var n;return(function(e){if(l.maxHeight==="none")return Ve(e,void 0,null);const o=ie(l.maxHeight);return Ve(e,void 0,o)})((n=ie(l.estimatedPreviewHeightPx))!=null?n:d1(z.value))}),ce=d(`${ue.value}px`),Ye=T(()=>ie(l.estimatedPreviewHeightPx)!=null);function Me(){var n;if(!p.value||Ye.value)return;const e=p.value.scrollHeight;if(e>0){const o=(n=ie((function(i){if(l.maxHeight==="none")return`${i}px`;if(l.maxHeight!=null){const f=Number.parseFloat(String(l.maxHeight));if(Number.isFinite(f))return`${Math.min(i,f)}px`}const C=p.value;if(C){const f=getComputedStyle(C).getPropertyValue("--ms-size-code-max-height").trim(),w=Number.parseFloat(f);if(Number.isFinite(w))return`${Math.min(i,w)}px`}return`${Math.min(i,500)}px`})(e)))!=null?n:e;ce.value=`${Math.max(o,ue.value)}px`}}const M=d(1),N=d(0),Y=d(0),_=d(!1),W=d({x:0,y:0}),Be=T(()=>z.value);function Fe(n){return!n||n.disabled}function h(n,e,o="top"){if(Fe(n.currentTarget))return;const i=n,C=i?.clientX!=null&&i?.clientY!=null?{x:i.clientX,y:i.clientY}:void 0;De(n.currentTarget,e,o,!1,C,l.isDark)}function v(){v1()}function Te(n){if(Fe(n.currentTarget))return;const e=H.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=n,i=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;De(n.currentTarget,e,"top",!1,i,l.isDark)}function _e(){return re(this,null,function*(){try{const n=z.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(n)),H.value=!0,setTimeout(()=>{H.value=!1},1e3)}catch(n){console.error("Failed to copy:",n)}})}function He(n){(n!=="preview"||Ze())&&(ye.value=!0,k.value=n==="source")}function Ie(){var n;const e=(n=p.value)==null?void 0:n.querySelector("svg");e?(function(o){re(this,null,function*(){try{const i=new XMLSerializer().serializeToString(o),C=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),f=URL.createObjectURL(C);if(typeof document<"u"){const w=document.createElement("a");w.href=f,w.download=`infographic-${Date.now()}.svg`;try{document.body.appendChild(w),w.click(),document.body.removeChild(w)}catch{}URL.revokeObjectURL(f)}}catch(i){console.error("Failed to export SVG:",i)}})})(e):console.error("SVG element not found")}function de(n){n.key==="Escape"&&j.value&&ve()}function ve(){if(j.value=!1,D.value&&(D.value.innerHTML=""),K.value=null,typeof document<"u")try{document.body.style.overflow=""}catch{}if(typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}}function Oe(){(function(){if(j.value=!0,typeof document<"u")try{document.body.style.overflow="hidden"}catch{}if(typeof window<"u")try{window.addEventListener("keydown",de)}catch{}U(()=>{if(p.value&&D.value){D.value.innerHTML="";const n=document.createElement("div");n.style.transition="transform 0.1s ease",n.style.transformOrigin="center center",n.style.width="100%",n.style.height="100%",n.style.display="flex",n.style.alignItems="center",n.style.justifyContent="center";const e=p.value.cloneNode(!0);e.classList.add("fullscreen"),e.style.height="auto",n.appendChild(e),D.value.appendChild(n),K.value=n,n.style.transform=`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}})})()}function $e(){M.value<3&&(M.value+=.1)}function je(){M.value>.5&&(M.value-=.1)}function Le(){M.value=1,N.value=0,Y.value=0}function ee(n){_.value=!0,n instanceof MouseEvent?W.value={x:n.clientX-N.value,y:n.clientY-Y.value}:W.value={x:n.touches[0].clientX-N.value,y:n.touches[0].clientY-Y.value}}function ne(n){if(!_.value)return;let e,o;n instanceof MouseEvent?(e=n.clientX,o=n.clientY):(e=n.touches[0].clientX,o=n.touches[0].clientY),N.value=e-W.value.x,Y.value=o-W.value.y}function I(){_.value=!1}let g=null,me=!1,oe=!1,q=!1,te="",G=!1,he=0;function le(n){return!G&&n===he}function Pe(n=!1){return re(this,null,function*(){var e,o;if(G||!P.value||!p.value)return;if(me)return oe=!0,void(q=q||n);const i=Be.value;if(!n&&i===te&&L.value)return;const C=l.loading===!1,f=++he;me=!0,(function(){const m=be.value;m&&E!==m&&(E&&x?.markSettled(E),E=m,x?.markPending(m))})();const w=p.value.innerHTML,pe=L.value,Xe=S.value;S.value=!1;try{const m=yield m1();if(!le(f))return;if(!m)return void console.warn("Infographic library failed to load.");const Z=p.value;if(!Z)return;g&&((e=g.destroy)==null||e.call(g),g=null),Z.innerHTML="",g=new m({container:Z,width:"100%",height:"100%"});let fe="";if((o=g.on)==null||o.call(g,"error",we=>{fe=(Array.isArray(we)?we:[we]).map(y=>{var Se;return y instanceof Error?y.message:typeof y=="string"?y:String(y&&typeof y=="object"&&"message"in y?(Se=y.message)!=null?Se:"":y??"")}).filter(Boolean).join("; ")}),g.render(z.value),fe)throw new Error(fe);if(!Z.childNodes.length)throw new Error("Infographic render returned empty output.");L.value=!0,S.value=!1,te=i,U(()=>{le(f)&&Me()})}catch(m){if(!le(f))return;C&&l.loading===!1&&i===Be.value?(console.error("Failed to render infographic:",m),L.value=!1,S.value=!0,te="",p.value&&(p.value.innerHTML=`<div style="padding: var(--ms-inset-panel-body); color: hsl(var(--ms-destructive))">Failed to render infographic: ${m instanceof Error?m.message:"Unknown error"}</div>`)):(L.value=pe,S.value=Xe,pe&&p.value&&(p.value.innerHTML=w))}finally{if(me=!1,le(f))if(oe){const m=q;oe=!1,q=!1,U(()=>{Pe(m)})}else(function(){re(this,null,function*(){const m=E;m&&(E="",yield U(),(function(Z=be.value){Z&&$.value&&x?.reportHeight(Z,$.value.offsetHeight)})(m),x?.markSettled(m))})})()}})}function O(n=!1){G||!P.value||k.value||c.value||U(()=>{G||Pe(n)})}B(()=>z.value,()=>{O(!0)}),B(()=>l.loading,(n,e)=>{e&&!n&&O(!0)}),B(()=>k.value,n=>{n||O(!0)}),B(()=>c.value,n=>{n||O()}),B(()=>l.maxHeight,()=>{U(()=>{Me()})}),B([()=>l.estimatedPreviewHeightPx,()=>z.value],()=>{L.value||k.value||(ce.value=`${ue.value}px`)}),B(()=>P.value,n=>{!n||k.value||c.value||O()}),n1(()=>{!ye.value&&Ze(),O()}),o1(()=>{var n,e;if(G=!0,he+=1,oe=!1,q=!1,(n=A.value)==null||n.destroy(),A.value=null,(function(){const o=E;o&&(E="",x?.markSettled(o))})(),g&&((e=g.destroy)==null||e.call(g),g=null),te="",typeof window<"u")try{window.removeEventListener("keydown",de)}catch{}});const Ee=T(()=>!0),ae=T(()=>k.value||c.value),Ue=T(()=>k.value?"fallback":S.value?"error":L.value?"preview":"pending"),ze=T(()=>({transform:`translate(${N.value}px, ${Y.value}px) scale(${M.value})`}));return B(ze,n=>{j.value&&K.value&&(K.value.style.transform=n.transform)}),(n,e)=>(r(),u("div",{ref_key:"viewportTarget",ref:$,class:b(["infographic-block-container rounded-lg border overflow-hidden",[{"is-rendering":l.loading,dark:l.isDark}]]),"data-markstream-infographic":"1","data-markstream-mode":Ue.value},[l.showHeader?(r(),u("div",f1,[n.$slots["header-left"]?(r(),u("div",w1,[ge(n.$slots,"header-left",{},void 0,!0)])):(r(),u("div",g1,[t("span",{class:"icon-slot action-icon shrink-0",innerHTML:s(`<svg width="15.52" height="16" viewBox="0 0 291 300" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path d="M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.59C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z" fill="#FF6376"></path><path d="M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z" fill="#FFCCCC"></path><path d="M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z" fill="#FF939F"></path><path d="M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z" fill="#FF356A"></path><path d="M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z" fill="#FF6376"></path></g></svg> `)},null,8,C1),e[21]||(e[21]=t("span",{class:"infographic-label font-medium font-mono truncate"},"Infographic",-1))])),n.$slots["header-center"]?(r(),u("div",k1,[ge(n.$slots,"header-center",{},void 0,!0)])):l.showModeToggle?(r(),u("div",x1,[t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"":"is-active",Ee.value?"opacity-50 cursor-not-allowed":""]]),disabled:Ee.value,onClick:e[0]||(e[0]=()=>He("preview")),onMouseenter:e[1]||(e[1]=o=>h(o,s(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>h(o,s(a)("common.preview")||"Preview")),onMouseleave:v,onBlur:v},[t("div",b1,[e[22]||(e[22]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),t("circle",{cx:"12",cy:"12",r:"3"})])],-1)),t("span",null,X(s(a)("common.preview")||"Preview"),1)])],42,y1),t("button",{class:b(["infographic-mode-btn px-2 py-0.5 rounded transition-colors",[k.value?"is-active":""]]),onClick:e[3]||(e[3]=()=>He("source")),onMouseenter:e[4]||(e[4]=o=>h(o,s(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>h(o,s(a)("common.source")||"Source")),onMouseleave:v,onBlur:v},[t("div",M1,[e[23]||(e[23]=t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m16 18l6-6l-6-6M8 6l-6 6l6 6"})],-1)),t("span",null,X(s(a)("common.source")||"Source"),1)])],34)])):F("",!0),n.$slots["header-right"]?(r(),u("div",B1,[ge(n.$slots,"header-right",{},void 0,!0)])):(r(),u("div",F1,[l.showCollapseButton?(r(),u("button",{key:0,class:b(se),"aria-pressed":c.value,onClick:e[6]||(e[6]=o=>c.value=!c.value),onMouseenter:e[7]||(e[7]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onFocus:e[8]||(e[8]=o=>h(o,c.value?s(a)("common.expand")||"Expand":s(a)("common.collapse")||"Collapse")),onMouseleave:v,onBlur:v},[(r(),u("svg",{style:Ce({rotate:c.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[24]||(e[24]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,T1)):F("",!0),l.showCopyButton?(r(),u("button",{key:1,class:b(se),onClick:_e,onMouseenter:e[9]||(e[9]=o=>Te(o)),onFocus:e[10]||(e[10]=o=>Te(o)),onMouseleave:v,onBlur:v},[H.value?(r(),u("svg",$1,[...e[26]||(e[26]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(r(),u("svg",H1,[...e[25]||(e[25]=[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),t("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],32)):F("",!0),l.showExportButton?(r(),u("button",{key:2,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Ie,onMouseenter:e[11]||(e[11]=o=>h(o,s(a)("common.export")||"Export")),onFocus:e[12]||(e[12]=o=>h(o,s(a)("common.export")||"Export")),onMouseleave:v,onBlur:v},[...e[27]||(e[27]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("path",{d:"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t("path",{d:"m7 10l5 5l5-5"})])],-1)])],42,j1)):F("",!0),l.showFullscreenButton?(r(),u("button",{key:3,class:b(`${se} ${ae.value?"opacity-50 cursor-not-allowed":""}`),disabled:ae.value,onClick:Oe,onMouseenter:e[13]||(e[13]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onFocus:e[14]||(e[14]=o=>h(o,j.value?s(a)("common.minimize")||"Minimize":s(a)("common.open")||"Open")),onMouseleave:v,onBlur:v},[j.value?(r(),u("svg",E1,[...e[29]||(e[29]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(r(),u("svg",P1,[...e[28]||(e[28]=[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])]))],42,L1)):F("",!0)]))])):F("",!0),t1(t("div",null,[k.value?(r(),u("div",z1,[t("pre",S1,X(z.value),1)])):(r(),u("div",Z1,[l.showZoomControls?(r(),u("div",V1,[t("div",D1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e,onMouseenter:e[15]||(e[15]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onFocus:e[16]||(e[16]=o=>h(o,s(a)("common.zoomIn")||"Zoom in")),onMouseleave:v,onBlur:v},[...e[30]||(e[30]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je,onMouseenter:e[17]||(e[17]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onFocus:e[18]||(e[18]=o=>h(o,s(a)("common.zoomOut")||"Zoom out")),onMouseleave:v,onBlur:v},[...e[31]||(e[31]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])],32),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le,onMouseenter:e[19]||(e[19]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onFocus:e[20]||(e[20]=o=>h(o,s(a)("common.resetZoom")||"Reset zoom")),onMouseleave:v,onBlur:v},X(Math.round(100*M.value))+"% ",33)])])):F("",!0),t("div",{class:"infographic-preview relative transition-all overflow-hidden block",style:Ce({height:ce.value}),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},[L.value||S.value?F("",!0):(r(),u("pre",N1,X(z.value),1)),t("div",{class:b(["absolute inset-0 cursor-grab",{"cursor-grabbing":_.value}]),style:Ce(ze.value)},[t("div",{ref_key:"infographicContainer",ref:p,class:"w-full text-center flex items-center justify-center min-h-full"},null,512)],6)],36)]))],512),[[l1,!c.value]]),(r(),a1(c1,{to:"body"},[t("div",{class:b(["markstream-vue",{dark:l.isDark}])},[i1(u1,{name:"infographic-dialog",appear:""},{default:r1(()=>[j.value?(r(),u("div",{key:0,class:"infographic-modal-overlay fixed inset-0 z-50 flex items-center justify-center p-4",onClick:s1(ve,["self"])},[t("div",Y1,[t("div",_1,[t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:$e},[...e[32]||(e[32]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M11 8v6m-3-3h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:je},[...e[33]||(e[33]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21l-4.35-4.35M8 11h6"})])],-1)])]),t("button",{class:"infographic-action-btn p-[var(--ms-action-btn-padding)] rounded",onClick:Le},X(Math.round(100*M.value))+"% ",1),t("button",{class:"infographic-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded",onClick:ve},[...e[34]||(e[34]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M18 6L6 18M6 6l12 12"})],-1)])])]),t("div",{ref_key:"modalContent",ref:D,class:b(["w-full h-full flex items-center justify-center p-4 overflow-hidden",{"cursor-grab":!_.value,"cursor-grabbing":_.value}]),onMousedown:ee,onMousemove:ne,onMouseup:I,onMouseleave:I,onTouchstartPassive:ee,onTouchmovePassive:ne,onTouchendPassive:I},null,34)])])):F("",!0)]),_:1})],2)]))],10,p1))}}),[["__scopeId","data-v-de34ec4b"]]);ke.install=R=>{R.component(ke.__name,ke)};export{ke as default}; diff --git a/apps/kimi-code/dist-web/assets/index11-Cx5Yh-Ch.js b/apps/kimi-code/dist-web/assets/index11-D6nykIM1.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index11-Cx5Yh-Ch.js rename to apps/kimi-code/dist-web/assets/index11-D6nykIM1.js index 3ff048368..98eacdc53 100644 --- a/apps/kimi-code/dist-web/assets/index11-Cx5Yh-Ch.js +++ b/apps/kimi-code/dist-web/assets/index11-D6nykIM1.js @@ -1,4 +1,4 @@ -import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as m,bl as Wn,af as Xn,bY as Vn,bE as Y,az as Un,c8 as wn,aD as Zn,as as q,aI as Kn,aL as M,u as B,aY as Rt,v as u,bk as w,bb as Ze,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-_5lXYMaO.js";import{i as Lt}from"./safeRaf-DGuzXxDK.js";function vl(d,f){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,f-12),f))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function ml(d){const f=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(f)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(f)}function fl(d){if(!d.includes(";"))return d;const f=d.indexOf(":");if(f===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,f))return d;const y=d.slice(0,f+1),z=d.slice(f+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||ml($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function At(d){if(_t(d)!=="sequencediagram")return d;const f=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;z<f.length;z+=2){const a=f[z],$=fl(a);$!==a&&(f[z]=$,y=!0)}return y?f.join(""):d}var hl=Object.defineProperty,gl=Object.defineProperties,pl=Object.getOwnPropertyDescriptors,bn=Object.getOwnPropertySymbols,wl=Object.prototype.hasOwnProperty,yl=Object.prototype.propertyIsEnumerable,kl=Math.pow,Mn=(d,f,y)=>f in d?hl(d,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[f]=y,Tn=(d,f)=>{for(var y in f||(f={}))wl.call(f,y)&&Mn(d,y,f[y]);if(bn)for(var y of bn(f))yl.call(f,y)&&Mn(d,y,f[y]);return d},T=(d,f,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,f)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Ll=["aria-label","disabled"],Al={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:f}){var y,z;const a=d,$=f,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style","br"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=m(!1),P=m(typeof window>"u"),ee=Nn(),Ht=In(),Ee=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Ee.value,dompurifyConfig:Ee.value==="strict"?Q:void 0,htmlLabels:Ee.value!=="strict"&&void 0,flowchart:Ee.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Oe(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var U;for(const J of W)(U=J.parentNode)==null||U.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ke(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Ge=m(!1),X=m(!1),Je=m(),Z=m(),v=m(),se=m(),Qe=m(null),En=qn(),je=m(null),xe=m(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,et=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,et+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++et;yield q(),t===et&&((function(n=Nt.value){n&&Je.value&&te?.reportHeight(n,Je.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,et+=1,te?.markSettled(e))}const Yt=m(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Ee.value==="strict"&&(l.htmlLabels=!1,l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%% +import{cq as _t,bQ as _n,M as Hn,c2 as Nn,c1 as In,b$ as Yn,c0 as qn,aU as m,bl as Wn,af as Xn,bY as Vn,bE as Y,az as Un,c8 as wn,aD as Zn,as as q,aI as Kn,aL as M,u as B,aY as Rt,v as u,bk as w,bb as Ze,au as ae,t as pe,aw as Ft,bL as Gn,bB as Jn,ar as yn,bd as kn,s as Qn,I as el,bJ as tl,bO as nl,g as ll,T as rl,q as F,c7 as xn,c5 as zt,cr as ol,cs as al,ct as il,cu as ul,cv as sl,b_ as cl,cw as dl}from"./index-yKYHPeXU.js";import{i as Lt}from"./safeRaf-DGuzXxDK.js";function vl(d,f){return/(?:&#\d+|#\d+|&[a-z]+)$/i.test(d.slice(Math.max(0,f-12),f))}function Cn(d){return d.includes("->")||d.includes("-->")||d.includes("->>")||d.includes("-->>")||d.includes("-x")||d.includes("--x")||d.includes("-)")||d.includes("--)")||d.includes("-+")||d.includes("--+")}function ml(d){const f=d.trimStart();return/^(?:accDescr|accTitle|activate|actor|and|alt|autonumber|box|break|critical|create\s+(?:actor|participant)|deactivate|destroy|else|end|link|links|loop|Note|opt|option|par|participant|properties|rect)\b/i.test(f)||(function(y){const z=y.split(";",1)[0],a=z.indexOf(":");return a>0&&Cn(z.slice(0,a))})(f)}function fl(d){if(!d.includes(";"))return d;const f=d.indexOf(":");if(f===-1||!(function($,Q){const k=$.slice(0,Q);return/^\s*Note\b/i.test(k)||Cn(k)})(d,f))return d;const y=d.slice(0,f+1),z=d.slice(f+1),a=(function($){let Q="",k=!1;for(let P=0;P<$.length;P++){const ee=$[P];ee!==";"||vl($,P)||ml($.slice(P+1))?Q+=ee:(Q+="#59;",k=!0)}return k?Q:$})(z);return a===z?d:`${y}${a}`}function At(d){if(_t(d)!=="sequencediagram")return d;const f=d.split(/(\r\n|\n|\r)/);let y=!1;for(let z=0;z<f.length;z+=2){const a=f[z],$=fl(a);$!==a&&(f[z]=$,y=!0)}return y?f.join(""):d}var hl=Object.defineProperty,gl=Object.defineProperties,pl=Object.getOwnPropertyDescriptors,bn=Object.getOwnPropertySymbols,wl=Object.prototype.hasOwnProperty,yl=Object.prototype.propertyIsEnumerable,kl=Math.pow,Mn=(d,f,y)=>f in d?hl(d,f,{enumerable:!0,configurable:!0,writable:!0,value:y}):d[f]=y,Tn=(d,f)=>{for(var y in f||(f={}))wl.call(f,y)&&Mn(d,y,f[y]);if(bn)for(var y of bn(f))yl.call(f,y)&&Mn(d,y,f[y]);return d},T=(d,f,y)=>new Promise((z,a)=>{var $=P=>{try{k(y.next(P))}catch(ee){a(ee)}},Q=P=>{try{k(y.throw(P))}catch(ee){a(ee)}},k=P=>P.done?z(P.value):Promise.resolve(P.value).then($,Q);k((y=y.apply(d,f)).next())});const xl=["data-markstream-mode","data-markstream-pending"],bl={key:0,class:"mermaid-block-header flex items-center justify-between border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)]"},Ml={key:0},Tl={key:1,class:"flex items-center gap-x-2 overflow-hidden"},Cl=["innerHTML"],Bl={key:2},El={key:3,class:"mermaid-mode-toggle-group flex items-center gap-0.5"},Ol={class:"flex items-center gap-x-1"},Sl={class:"flex items-center gap-x-1"},$l={key:4},Pl={key:5,class:"mermaid-header-actions flex items-center"},Dl=["aria-pressed"],Rl={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Fl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},zl=["aria-label","disabled"],Ll=["aria-label","disabled"],Al={key:0,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},jl={key:1,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},_l={key:0,class:"mermaid-source-panel"},Hl={class:"mermaid-source-code text-sm font-mono whitespace-pre-wrap"},Nl={key:1,class:"relative"},Il={key:0,class:"absolute top-2 right-2 z-10 rounded-lg"},Yl={class:"flex items-center gap-2 backdrop-blur rounded-lg"},ql={class:"dialog-panel mermaid-modal-panel relative w-full h-full max-w-full max-h-full rounded overflow-hidden"},Wl={class:"absolute top-6 right-6 z-50 flex items-center gap-2"},pt="mermaid-action-btn p-[var(--ms-action-btn-padding)] rounded",jt=_n(Hn({__name:"MermaidBlockNode",props:{node:{},maxHeight:{default:void 0},estimatedPreviewHeightPx:{},loading:{type:Boolean,default:!0},isDark:{type:Boolean},workerTimeoutMs:{default:1400},parseTimeoutMs:{default:1800},renderTimeoutMs:{default:2500},fullRenderTimeoutMs:{default:4e3},renderDebounceMs:{default:300},contentStableDelayMs:{default:500},previewPollDelayMs:{default:800},previewPollMaxDelayMs:{default:4e3},previewPollMaxAttempts:{default:12},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showFullscreenButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showZoomControls:{type:Boolean,default:!0},enableWheelZoom:{type:Boolean,default:!1},isStrict:{type:Boolean,default:!0},enableMermaidInteractions:{type:Boolean,default:!1},showTooltips:{type:Boolean,default:!0},onRenderError:{}},emits:["copy","export","openModal","toggleMode"],setup(d,{emit:f}){var y,z;const a=d,$=f,Q={USE_PROFILES:{svg:!0},FORBID_TAGS:["script"],FORBID_ATTR:[/^on/i],ADD_TAGS:["style","br"],ADD_ATTR:["style"],SAFE_FOR_TEMPLATES:!0},k=m(!1),P=m(typeof window>"u"),ee=Nn(),Ht=In(),Ee=F(()=>a.isStrict?"strict":"loose"),Bn=F(()=>({startOnLoad:!1,securityLevel:Ee.value,dompurifyConfig:Ee.value==="strict"?Q:void 0,htmlLabels:Ee.value!=="strict"&&void 0,flowchart:Ee.value==="strict"?{htmlLabels:!1}:void 0}));function we(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=""}}function Oe(e,t,n={}){if(!e)return null;const l=(function(r,o){if(!r)return null;const c=sl(o);if(!c)return null;const h=(function(i,s){const p=Array.from(i.childNodes),E=document.createElement("div");return E.dataset.mermaidSvgLayer="1",E.style.zIndex="1",E.appendChild(s),i.insertBefore(E,i.firstChild),p.length>0&&(function(W){const j=()=>{var U;for(const J of W)(U=J.parentNode)==null||U.removeChild(J)};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>{requestAnimationFrame(j)}):setTimeout(j,32)})(p),E})(r,c);return{svg:c.outerHTML,bindTarget:h}})(e,t);return l||n.keepPreviousOnFailure||we(e),l}let ie=null;function ye(e){if(a.enableMermaidInteractions&&e?.querySelector("svg"))try{ie?.(e)}catch{}}const{t:g}=Yn();let ue=!1,ke=0;function Ke(){return T(this,null,function*(){try{const e=yield il();return ue?null:(k.value=!!e,e)}catch(e){throw ue||(k.value=!1),e}finally{ue||(P.value=!0)}})}const Ge=m(!1),X=m(!1),Je=m(),Z=m(),v=m(),se=m(),Qe=m(null),En=qn(),je=m(null),xe=m(typeof window>"u"||!ee.value),On=Wn(),te=Xn(Vn,null);let ce="",be=0,et=0;const Nt=F(()=>cl(a,On));function wt(){const e=Nt.value;e&&(ce&&ce!==e&&(te?.markSettled(ce),be=0),ce=e,be+=1,et+=1,be===1&&te?.markPending(e))}function yt(){return T(this,null,function*(){const e=ce;if(!e||(be=Math.max(0,be-1),be>0))return;ce="";const t=++et;yield q(),t===et&&((function(n=Nt.value){n&&Je.value&&te?.reportHeight(n,Je.value.offsetHeight)})(e),te?.markSettled(e))})}function It(){const e=ce;e&&(ce="",be=0,et+=1,te?.markSettled(e))}const Yt=m(),D=F(()=>a.node.code.replace(/\]::([^:])/g,"]:::$1").replace(/:::subgraphNode$/gm,"::subgraphNode"));function Sn(e,t=D.value){const n=t,l={theme:e==="dark"?"dark":"default"};Ee.value==="strict"&&(l.htmlLabels=!1,l.flowchart={htmlLabels:!1});const r=`%%{init: ${JSON.stringify(l)}}%% `;return n.trim().startsWith("%%{")?n:r+n}function qt(){var e;return(function(t){const n=(function(){var r;const o=Z.value?getComputedStyle(Z.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";return(r=zt(o))!=null?r:360})(),l=un();return ol(t,n,l)})((e=zt(a.estimatedPreviewHeightPx))!=null?e:al(D.value))}function Wt(){return`${qt()}px`}const _e=m(null);function kt(){var e;return!!((e=v.value)!=null&&e.querySelector("svg"))}function Xt(){return a.loading!==!1&&(kt()||!!_e.value)}const C=m(1),_=m(0),H=m(0),tt=m(!1),nt=m({x:0,y:0}),x=m(!0),lt=m(!1),re=m(!1),de=m(null);let xt="",bt=!1,ve="";const rt=m(0),Mt=m(!1),$n=F(()=>{var e;return Math.max(0,(e=a.renderDebounceMs)!=null?e:300)}),Pn=F(()=>{var e;return Math.max(0,(e=a.contentStableDelayMs)!=null?e:500)}),He=F(()=>{var e;return Math.max(120,(e=a.previewPollDelayMs)!=null?e:800)}),Dn=F(()=>{var e;return Math.max(He.value,(e=a.previewPollMaxDelayMs)!=null?e:4e3)}),Vt=F(()=>{var e;return Math.max(1,Math.trunc((e=a.previewPollMaxAttempts)!=null?e:12))}),me=F(()=>a.loading!==!1);let Ne=null,Ie=null,Se=null,$e=null,Ye=0;const Ut=(y=globalThis.requestIdleCallback)!=null?y:(e,t)=>setTimeout(()=>e({didTimeout:!0}),16),Zt=(z=globalThis.cancelIdleCallback)!=null?z:e=>clearTimeout(e);function b(e=ke){return!ue&&e===ke}function L(){return b()&&xe.value&&!X.value}function Tt(){Se!=null&&(globalThis.clearTimeout(Se),Se=null),$e!=null&&(Zt($e),$e=null)}function qe(){ue||Se==null&&$e==null&&(Se=globalThis.setTimeout(()=>{Se=null,L()&&($e=Ut(()=>{$e=null,L()&&gn()},{timeout:500}))},$n.value))}function We(){Ie!=null&&(globalThis.clearTimeout(Ie),Ie=null)}function Kt(e=600){if(typeof globalThis>"u"||ue)return;const t=Math.max(0,e);We(),Ie=globalThis.setTimeout(()=>{if(Ie=null,!ue){if(a.loading||re.value||!L())return void Kt(Math.min(1200,Math.max(300,1.2*t)));qe()}},t)}const N=m(Wt()),ot=m(N.value);let Pe=null;const O=m(!1),K=m(!1),fe=m({}),he=m(0);let V=null,De=null;const I=m(!1),Rn=F(()=>{var e,t;return!(X.value||x.value||P.value&&!re.value&&!de.value&&(O.value||I.value&&((t=(e=v.value)==null?void 0:e.textContent)!=null&&t.trim())))}),Me=m({zoom:1,translateX:0,translateY:0,containerHeight:N.value}),Gt=F(()=>a.enableWheelZoom?{wheel:Fn}:{}),G=F(()=>{var e,t,n,l;return{worker:(e=a.workerTimeoutMs)!=null?e:1400,parse:(t=a.parseTimeoutMs)!=null?t:1800,render:(n=a.renderTimeoutMs)!=null?n:2500,fullRender:(l=a.fullRenderTimeoutMs)!=null?l:4e3}});let Re=null,at=null,Fe=!1,Te=He.value,ne=null,it=0,Ct=!0,ut=0;function Ce(e,t){const n=t?.timeoutMs,l=t?.signal;if(l?.aborted)return Promise.reject(new DOMException("Aborted","AbortError"));let r=null,o=!1,c=null;return new Promise((h,i)=>{const s=()=>{r!=null&&clearTimeout(r),c&&l&&l.removeEventListener("abort",c)};n&&n>0&&(r=globalThis.setTimeout(()=>{o||(o=!0,s(),i(new Error("Operation timed out")))},n)),l&&(c=()=>{o||(o=!0,s(),i(new DOMException("Aborted","AbortError")))},l.addEventListener("abort",c)),e().then(p=>{o||(o=!0,s(),h(p))}).catch(p=>{o||(o=!0,s(),i(p))})})}function Jt(e){if(typeof document>"u"||!v.value)return;if(typeof a.onRenderError=="function"&&a.onRenderError(e,D.value,v.value)===!0)return I.value=!0,void A();const t=document.createElement("div");t.style.padding="var(--ms-inset-panel-body)",t.style.color="hsl(var(--ms-destructive))",t.textContent="Failed to render diagram: ";const n=document.createElement("span");n.textContent=e instanceof Error?e.message:"Unknown error",t.appendChild(n),we(v.value),v.value.appendChild(t);const l=v.value?getComputedStyle(v.value).getPropertyValue("--ms-size-diagram-min-height").trim():"";N.value=l||"360px",ot.value=N.value,I.value=!0,A()}function Qt(e){const t=typeof e=="string"?e:typeof e?.message=="string"?e.message:"";return typeof t=="string"&&/timed out/i.test(t)}function en(e){return e?.name==="AbortError"}function Bt(e){return!Qt(e)&&!en(e)}typeof window<"u"&&Y([()=>Je.value,ee],([e,t])=>{var n;if((n=je.value)==null||n.destroy(),je.value=null,!t||xe.value)return void(xe.value=!0);if(!e)return void(xe.value=!1);const l=En(e,{rootMargin:Ht?.value.heavyBlockMargin,allowIdle:!1});je.value=l,xe.value=l.isVisible.value,l.whenVisible.then(()=>{xe.value=!0})},{immediate:!0}),Un(()=>{var e;ue=!0,ke+=1,he.value+=1,(e=je.value)==null||e.destroy(),je.value=null,It(),Tt()});const st=F(()=>a.showTooltips!==!1);function tn(e){return!e||e.disabled}function R(e,t,n="top"){if(!st.value||tn(e.currentTarget))return;const l=e,r=l?.clientX!=null&&l?.clientY!=null?{x:l.clientX,y:l.clientY}:void 0;xn(e.currentTarget,t,n,!1,r,a.isDark)}function S(){st.value&&wn()}function nn(e){if(!st.value||tn(e.currentTarget))return;const t=Ge.value?g("common.copied")||"Copied":g("common.copy")||"Copy",n=e,l=n?.clientX!=null&&n?.clientY!=null?{x:n.clientX,y:n.clientY}:void 0;xn(e.currentTarget,t,"top",!1,l,a.isDark)}function ln(e,t){const n={theme:t==="dark"?"dark":"default"};Ee.value==="strict"&&(n.htmlLabels=!1,n.flowchart={htmlLabels:!1});const l=`%%{init: ${JSON.stringify(n)}}%% `;return e.trimStart().startsWith("%%{")?e:l+e}function ct(){return Ct&&!x.value&&!O.value&&!I.value}function rn(e){const t=e.trim();return!(!t||t.startsWith("%%"))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(":")}function Et(e){if(_t(e)==="gantt")return(function(n){var l;const r=n.split(/\r?\n/);for(!/\r?\n$/.test(n)&&r.length>0&&r.pop();r.length>0;){const o=(l=r[r.length-1])==null?void 0:l.trim();if(o&&!o.startsWith("%%")){if(rn(o))break;r.pop()}else r.pop()}return r.some(rn)?r.join(` `):""})(e);const t=e.split(/\r?\n/);for(;t.length>0;){const n=t[t.length-1].trimEnd();if(n!==""){if(!(/^[-=~>|<\s]+$/.test(n.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(n)||/[-|><]$/.test(n)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(n)))break;t.pop()}else t.pop()}return t.join(` diff --git a/apps/kimi-code/dist-web/assets/index5-BHVixm2V.js b/apps/kimi-code/dist-web/assets/index5-D0Y6cLP4.js similarity index 95% rename from apps/kimi-code/dist-web/assets/index5-BHVixm2V.js rename to apps/kimi-code/dist-web/assets/index5-D0Y6cLP4.js index b1094c6c2..7e19b223d 100644 --- a/apps/kimi-code/dist-web/assets/index5-BHVixm2V.js +++ b/apps/kimi-code/dist-web/assets/index5-D0Y6cLP4.js @@ -1 +1 @@ -import c from"./CodeBlockNode-CZYIqTV_.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-_5lXYMaO.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default}; +import c from"./CodeBlockNode-EUGAgT_h.js";import{M as v,bl as g,aL as P,s as C,A as b,bJ as i,aY as d,av as k,a4 as x,ar as S,bk as T,q as O}from"./index-yKYHPeXU.js";import"./safeRaf-DGuzXxDK.js";var H=Object.defineProperty,z=Object.defineProperties,j=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,m=(o,s,e)=>s in o?H(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e;const h=v({__name:"MarkdownCodeBlockNode",props:{node:{},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isDark:{type:Boolean,default:!1},isShowPreview:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},autoScrollOnUpdate:{type:Boolean},autoScrollInitial:{type:Boolean},estimatedHeightPx:{},estimatedContentHeightPx:{},themes:{},langs:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0}},emits:["previewCode","copy"],setup(o,{emit:s}){const e=o,p=s,w=c,f=g(),y=O(()=>{return t=((a,n)=>{for(var r in n||(n={}))F.call(n,r)&&m(a,r,n[r]);if(u)for(var r of u(n))W.call(n,r)&&m(a,r,n[r]);return a})({},f),l={node:e.node,loading:e.loading,stream:e.stream,darkTheme:e.darkTheme,lightTheme:e.lightTheme,isDark:e.isDark,isShowPreview:e.isShowPreview,enableFontSizeControl:e.enableFontSizeControl,minWidth:e.minWidth,maxWidth:e.maxWidth,themes:e.themes,showHeader:e.showHeader,showCopyButton:e.showCopyButton,showExpandButton:e.showExpandButton,showPreviewButton:e.showPreviewButton,showCollapseButton:e.showCollapseButton,showFontSizeButtons:e.showFontSizeButtons,showTooltips:e.showTooltips,estimatedHeightPx:e.estimatedHeightPx,estimatedContentHeightPx:e.estimatedContentHeightPx},z(t,j(l));var t,l});function B(t){p("previewCode",{type:t.artifactType,content:e.node.code,title:t.artifactTitle})}return(t,l)=>(P(),C(T(w),S(y.value,{onPreviewCode:B,onCopy:l[0]||(l[0]=a=>p("copy",a))}),b({_:2},[t.$slots["header-left"]?{name:"header-left",fn:i(()=>[d(t.$slots,"header-left")]),key:"0"}:void 0,t.$slots["header-right"]?{name:"header-right",fn:i(()=>[d(t.$slots,"header-right")]),key:"1"}:void 0,t.$slots.loading?{name:"loading",fn:i(a=>[d(t.$slots,"loading",k(x(a)))]),key:"2"}:void 0]),1040))}});h.install=o=>{o.component(h.__name,h)};export{h as default}; diff --git a/apps/kimi-code/dist-web/assets/index6-DeApd9L_.js b/apps/kimi-code/dist-web/assets/index6-It9n1WlQ.js similarity index 98% rename from apps/kimi-code/dist-web/assets/index6-DeApd9L_.js rename to apps/kimi-code/dist-web/assets/index6-It9n1WlQ.js index c42204ac0..b8007cdc5 100644 --- a/apps/kimi-code/dist-web/assets/index6-DeApd9L_.js +++ b/apps/kimi-code/dist-web/assets/index6-It9n1WlQ.js @@ -1 +1 @@ -import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-_5lXYMaO.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default}; +import{bQ as Q,M as Y,af as Z,bY as G,a0 as ee,bS as ne,bT as A,aU as _,bZ as te,bE as P,aD as ae,az as le,aL as I,u as O,I as oe,bJ as re,t as ie,v as ue,g as se,au as F,bb as ce,aw as de,q as X,bU as ve,as as j,bV as fe,bW as me,bX as he,b_ as ge}from"./index-yKYHPeXU.js";var q=(S,B,b)=>new Promise((t,s)=>{var i=c=>{try{T(b.next(c))}catch(d){s(d)}},k=c=>{try{T(b.throw(c))}catch(d){s(d)}},T=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,k);T((b=b.apply(S,B)).next())});const pe=["data-markstream-mode","data-markstream-pending"],ye={key:0,class:"math-loading-overlay"},be=["innerHTML"],ke={key:1,class:"math-block__fallback text-left"},N=Q(Y({__name:"MathBlockNode",props:{node:{},indexKey:{},cacheScope:{}},setup(S){var B,b;const t=S,s=_(null),i=Z(G,null),k=X(()=>ve(t.node.content)),T=((b=(B=ee())==null?void 0:B.vnode.el)==null?void 0:b.nodeType)===1,c=X(()=>ge(t,{})),d=(function(){if(!t.node.content)return{html:"",text:t.node.raw,loading:!1};if(t.node.loading)return{html:"",text:"",loading:!0};const e=ne();if(!e){const n=typeof window>"u"||T;return{html:"",text:n?t.node.raw:"",loading:!n}}try{const n=e.renderToString(k.value,{throwOnError:!1,displayMode:!0});return A(k.value,!0,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:t.node.loading?"":t.node.raw,loading:t.node.loading}}})(),u=_(d.html),f=_(d.text);let E=!1,x=0,v=!1,$=null;const m=te();let R=null,h="";const g=_(d.loading),K=_(!1),p=_(D());function H(e){e!=null&&e!==x||(K.value=!1)}function W(){var e;if(t.indexKey==null)return"";const n=(e=t.cacheScope)!=null?e:m?.scope;return`${n!=null&&String(n).length>0?`${String(n)}:`:""}math-block:${String(t.indexKey)}`}function D(){var e;const n=W();return n&&(e=m?.cache.get(n))!=null?e:0}function M(){if(p.value===0)return;p.value=0;const e=W();e&&m?.cache.set(e,0)}function L(e){if(u.value)return void M();if(!Number.isFinite(e)||e<=0)return;const n=Math.max(p.value,e);if(n===p.value)return;p.value=n;const a=W();a&&m?.cache.set(a,n)}function w(){j(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)})}function z(){const e=h;i&&e&&(h="",i.markSettled(e))}function U(){return q(this,null,function*(){if(v)return z(),void H();$&&($.abort(),$=null);const e=++x;if(!t.node.content)return z(),H(),g.value=!1,u.value="",f.value=t.node.raw,E=!1,void w();const n=new AbortController;$=n,K.value=!0,v||e!==x||n.signal.aborted?v||H(e):((function(){const a=c.value;i&&a&&h!==a&&(h&&i.markSettled(h),h=a,i.markPending(a))})(),fe(k.value,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:8,signal:n.signal}).then(a=>{v||e!==x||(u.value=a,f.value="",E=!0,g.value=!1,M(),w())}).catch(a=>q(null,null,function*(){if(v||e!==x)return;const r=a?.code||a?.name,l=r==="KATEX_DISABLED";if(r==="WORKER_INIT_ERROR"||a?.fallbackToRenderer||(r===me||r==="WORKER_TIMEOUT")&&!t.node.loading){const o=yield he();if(v||e!==x)return;if(o){try{const y=o.renderToString(k.value,{throwOnError:t.node.loading,displayMode:!0});u.value=y,f.value="",E=!0,g.value=!1,M(),w(),A(k.value,!0,y)}catch{}return}}if(l||!t.node.loading)return g.value=!1,u.value="",f.value=t.node.raw,void w();E||(g.value=!0)})).finally(()=>{v||e!==x||(H(e),(function(){const a=h;i&&a&&(h="",j(()=>{var r,l;if(!v){const o=(l=(r=s.value)==null?void 0:r.offsetHeight)!=null?l:0;o>0&&i.reportHeight(a,o)}i.markSettled(a)}))})())}))})}d.html&&(E=!0),d.html&&M();const J=[{family:"$$",open:"$$",close:"$$"},{family:"\\[]",open:"\\[",close:"\\]"},{family:"\\[]",open:"\\[",close:"]"},{family:"[]",open:"[",close:"\\]"},{family:"[]",open:"[",close:"]"},{family:"\\()",open:"\\(",close:"\\)"},{family:"$",open:"$",close:"$"}];function V(e,n){return(function(r){const l=String(r??"");for(const{family:o,open:y,close:C}of J)if((y!=="$"||!l.startsWith("$$")&&!l.endsWith("$$"))&&l.length>=y.length+C.length&&l.startsWith(y)&&l.endsWith(C))return{family:o,inner:l.slice(y.length,l.length-C.length),trusted:!0};return null})(e)||{family:"content",inner:String(n??""),trusted:!1}}return P(()=>[t.node.content,t.node.loading,t.node.raw],([e,,n],[a,,r])=>{var l,o;l=V(r,a),o=V(n,e),l.inner===""||l.family===o.family&&(l.trusted&&o.trusted?o.inner.startsWith(l.inner):o.inner===l.inner)||M(),U()},{flush:"post"}),P([()=>t.indexKey,()=>t.cacheScope],()=>{p.value=D(),w()}),ae(()=>{typeof ResizeObserver<"u"&&s.value&&(R=new ResizeObserver(()=>{var e,n;L((n=(e=s.value)==null?void 0:e.offsetHeight)!=null?n:0)}),R.observe(s.value)),w(),u.value||U()}),le(()=>{v=!0,z(),$&&($.abort(),$=null),R?.disconnect(),R=null}),(e,n)=>(I(),O("div",{ref_key:"containerEl",ref:s,class:"math-block text-center overflow-x-auto relative","data-markstream-math":"block","data-markstream-mode":u.value?"katex":f.value?"fallback":"loading","data-markstream-pending":K.value?"true":void 0,style:de(p.value?{minHeight:`${p.value}px`}:void 0)},[oe(se,{name:"math-fade"},{default:re(()=>[!g.value||u.value||f.value?ie("",!0):(I(),O("div",ye,[...n[0]||(n[0]=[ue("div",{class:"math-loading-spinner"},null,-1)])]))]),_:1}),u.value?(I(),O("div",{key:0,class:F(["math-block__content",{"math-rendering":g.value}]),innerHTML:u.value},null,10,be)):f.value?(I(),O("pre",ke,ce(f.value),1)):(I(),O("div",{key:2,class:F(["math-block__content",{"math-rendering":g.value}])},null,2))],12,pe))}}),[["__scopeId","data-v-939191ad"]]);N.install=S=>{S.component(N.__name,N)};export{N as default}; diff --git a/apps/kimi-code/dist-web/assets/index7-DyLV34jk.js b/apps/kimi-code/dist-web/assets/index7-3cymNRfD.js similarity index 98% rename from apps/kimi-code/dist-web/assets/index7-DyLV34jk.js rename to apps/kimi-code/dist-web/assets/index7-3cymNRfD.js index 1ccf8e82a..8df3220b7 100644 --- a/apps/kimi-code/dist-web/assets/index7-DyLV34jk.js +++ b/apps/kimi-code/dist-web/assets/index7-3cymNRfD.js @@ -1 +1 @@ -import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-_5lXYMaO.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default}; +import{bQ as C,M as D,a0 as N,bS as U,bT as L,aU as h,bE as A,aD as K,az as W,aL as y,u as x,bb as z,s as H,bJ as P,v as M,aY as V,g as X,t as j,q as O,bU as q,bV as F,bW as J,bX as Q}from"./index-yKYHPeXU.js";var S=(f,b,r)=>new Promise((e,k)=>{var i=l=>{try{p(r.next(l))}catch(t){k(t)}},d=l=>{try{p(r.throw(l))}catch(t){k(t)}},p=l=>l.done?e(l.value):Promise.resolve(l.value).then(i,d);p((r=r.apply(f,b)).next())});const Y=["data-markstream-mode","data-markstream-pending"],G=["innerHTML"],Z={key:1,class:"math-inline math-inline--fallback"},ee={class:"math-inline__loading",role:"status","aria-live":"polite"},R=C(D({__name:"MathInlineNode",props:{node:{}},setup(f){var b,r;const e=f,k=h(null),i=O(()=>e.node.markup==="$$"),d=O(()=>q(e.node.content)),p=((r=(b=N())==null?void 0:b.vnode.el)==null?void 0:r.nodeType)===1,l=(function(){if(!e.node.content)return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading};if(e.node.loading)return{html:"",text:"",loading:!0};const a=U();if(!a){const n=typeof window>"u"||p;return{html:"",text:n?e.node.raw:"",loading:!n}}try{const n=a.renderToString(d.value,{throwOnError:!1,displayMode:i.value});return L(d.value,i.value,n),{html:n,text:"",loading:!1}}catch{return{html:"",text:e.node.loading?"":e.node.raw,loading:e.node.loading}}})(),t=h(l.html),u=h(l.text);let g=!1,m=0,s=!1,c=null;const v=h(l.loading),_=h(!1);function T(a){a!=null&&a!==m||(_.value=!1)}function B(){return S(this,null,function*(){if(s)return;c&&(c.abort(),c=null);const a=++m;if(!e.node.content)return T(),t.value="",u.value=e.node.loading?"":e.node.raw,v.value=e.node.loading,void(g=!1);const n=new AbortController;c=n,_.value=!0,s||a!==m||n.signal.aborted?T(a):F(d.value,i.value,{timeout:1500,waitTimeout:1500,maxRetries:8,signal:n.signal}).then(o=>{s||a!==m||(t.value=o,u.value="",v.value=!1,g=!0)}).catch(o=>S(null,null,function*(){if(s||a!==m)return;const w=o?.code||o?.name,$=w==="KATEX_DISABLED";if(w==="WORKER_INIT_ERROR"||o?.fallbackToRenderer||(w===J||w==="WORKER_TIMEOUT")&&!e.node.loading){const I=yield Q();if(s||a!==m)return;if(I){try{const E=I.renderToString(d.value,{throwOnError:e.node.loading,displayMode:i.value});t.value=E,u.value="",v.value=!1,g=!0,L(d.value,i.value,E)}catch{}return}}if($||!e.node.loading)return v.value=!1,t.value="",void(u.value=e.node.raw);g||(v.value=!0)})).finally(()=>{s||T(a)})})}return l.html&&(g=!0),A(()=>[e.node.content,e.node.loading,e.node.raw,e.node.markup],()=>{B()}),K(()=>{t.value||B()}),W(()=>{s=!0,c&&(c.abort(),c=null)}),(a,n)=>(y(),x("span",{ref_key:"containerEl",ref:k,class:"math-inline-wrapper","data-markstream-math":"inline","data-markstream-mode":t.value?"katex":u.value?"fallback":"loading","data-markstream-pending":_.value?"true":void 0},[t.value?(y(),x("span",{key:0,class:"math-inline",innerHTML:t.value},null,8,G)):u.value?(y(),x("span",Z,z(u.value),1)):v.value?(y(),H(X,{key:2,name:"table-node-fade"},{default:P(()=>[M("span",ee,[V(a.$slots,"loading",{isLoading:v.value},()=>[n[0]||(n[0]=M("span",{class:"math-inline__spinner animate-spin","aria-hidden":"true"},null,-1)),n[1]||(n[1]=M("span",{class:"sr-only"},"Loading",-1))],!0)])]),_:3})):j("",!0)],8,Y))}}),[["__scopeId","data-v-6c556261"]]);R.install=f=>{f.component(R.__name,R)};export{R as default}; diff --git a/apps/kimi-code/dist-web/assets/index8-B1ktcQVe.js b/apps/kimi-code/dist-web/assets/index8-CdUxL-Tk.js similarity index 99% rename from apps/kimi-code/dist-web/assets/index8-B1ktcQVe.js rename to apps/kimi-code/dist-web/assets/index8-CdUxL-Tk.js index febe8af12..8377928db 100644 --- a/apps/kimi-code/dist-web/assets/index8-B1ktcQVe.js +++ b/apps/kimi-code/dist-web/assets/index8-CdUxL-Tk.js @@ -1 +1 @@ -import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-_5lXYMaO.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},It={class:"d2-code"},Ft={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),I=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",I.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!I.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,F=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=I.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=I.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Ie=(function(Fe){if(typeof window>"u"||typeof DOMParser>"u"||!Fe)return"";const Ze=Fe.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Ie||"",ae.value=Ie?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,F?(F=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(F=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o<e)return F=!0,void(U==null&&(U=window.setTimeout(()=>{U=null,F&&(F=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,I.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,F=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",It,[u("code",null,N(I.value),1)]),s.value?(v(),m("p",Ft,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(I.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default}; +import{bQ as ot,M as lt,bl as at,af as rt,bY as ut,b$ as it,c0 as st,c1 as ct,c2 as dt,aU as d,bE as Z,as as fe,aD as vt,az as mt,aL as v,u as m,v as u,bk as f,au as pe,bb as N,t as T,aw as ge,bL as ft,bB as pt,q as D,c7 as Se,c8 as gt,ca as ht,b_ as yt}from"./index-yKYHPeXU.js";var wt=Object.defineProperty,Le=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable,Ne=(p,n,i)=>n in p?wt(p,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):p[n]=i,he=(p,n)=>{for(var i in n||(n={}))bt.call(n,i)&&Ne(p,i,n[i]);if(Le)for(var i of Le(n))kt.call(n,i)&&Ne(p,i,n[i]);return p},ye=(p,n,i)=>new Promise((w,a)=>{var A=h=>{try{g(i.next(h))}catch(s){a(s)}},k=h=>{try{g(i.throw(h))}catch(s){a(s)}},g=h=>h.done?w(h.value):Promise.resolve(h.value).then(A,k);g((i=i.apply(p,n)).next())});const xt=["data-markstream-mode","data-markstream-pending"],Bt={key:0,class:"d2-block-header flex justify-between items-center border-b"},Dt={class:"d2-header-actions flex items-center"},Ct={key:0,class:"d2-mode-toggle flex items-center gap-0.5"},Mt=["aria-label"],Et={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},Tt={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},At=["aria-label"],jt=["aria-pressed"],Ot={key:0,class:"d2-source"},It={class:"d2-code"},Ft={key:0,class:"d2-error mt-2 text-xs"},Ht={key:1},St={key:0,class:"d2-source"},Lt={class:"d2-code"},Nt={key:0,class:"d2-error mt-2 text-xs"},Pt=["innerHTML"],Rt={key:0,class:"d2-error px-4 pb-3 text-xs"},we=ot(lt({__name:"D2BlockNode",props:{node:{},maxHeight:{default:void 0},loading:{type:Boolean,default:!0},isDark:{type:Boolean},progressiveRender:{type:Boolean,default:!0},progressiveIntervalMs:{default:700},themeId:{},darkThemeId:{},showHeader:{type:Boolean,default:!0},showModeToggle:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExportButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0}},setup(p){const n=p,i=at(),w=rt(ut,null),{t:a}=it(),A=d(!1),k=d(!1),g=d(!1),h=d(!1),s=d(null),W=d(!1),j=d(""),ae=d(""),re=d(0),P=d(""),R=d(""),ee=d(null),ue=d(null),ie=d(null),Pe=st(),te=ct(),be=dt(),Y=d(null),ke=typeof window<"u",xe=d(!1),O=d(typeof window>"u"||!be.value),I=D(()=>{var t;return(t=n.node.code)!=null?t:""}),Re=D(()=>yt(n,i)),se=D(()=>{var t,e;return[n.isDark?"dark":"light",(t=n.themeId)!=null?t:"auto",(e=n.darkThemeId)!=null?e:"auto",I.value].join(":")}),ne=D(()=>!!j.value&&ae.value===se.value),Be=D(()=>{if(!xe.value||!I.value||g.value)return!1;const t=se.value;return!!W.value||P.value!==t&&(!s.value||R.value!==t)}),De=D(()=>ne.value||!!j.value&&Be.value),oe=D(()=>g.value||!h.value||!De.value),_e=D(()=>{if(oe.value&&ue.value)return{minHeight:`${ue.value}px`}}),Ue=D(()=>n.maxHeight==="none"?{maxHeight:"none"}:n.maxHeight!=null?{maxHeight:typeof n.maxHeight=="number"?`${n.maxHeight}px`:String(n.maxHeight)}:void 0);let x=null,ce=!1,_=!1,Ce=0,U=null,F=!1,$=null,C="";typeof window<"u"&&Z([()=>ie.value,be],([t,e])=>{var o,c,H;if((o=Y.value)==null||o.destroy(),Y.value=null,!e||O.value)return void(O.value=!0);if(!t)return void(O.value=!1);const S=(H=(c=te?.value.heavyBlockMargin)!=null?c:te?.value.rootMargin)!=null?H:"160px",V=Pe(t,{rootMargin:S,allowIdle:!1});Y.value=V,O.value=V.isVisible.value,V.whenVisible.then(()=>{O.value=!0})},{immediate:!0});const Ve={N1:"#E5E7EB",N2:"#CBD5E1",N3:"#94A3B8",N4:"#64748B",N5:"#475569",N6:"#334155",N7:"#0B1220",B1:"#60A5FA",B2:"#3B82F6",B3:"#2563EB",B4:"#1D4ED8",B5:"#1E40AF",B6:"#111827",AA2:"#22D3EE",AA4:"#0EA5E9",AA5:"#0284C7",AB4:"#FBBF24",AB5:"#F59E0B"};function Me(t){return!t||t.disabled}function M(t,e,o="top"){if(Me(t.currentTarget))return;const c=t,H=c?.clientX!=null&&c?.clientY!=null?{x:c.clientX,y:c.clientY}:void 0;Se(t.currentTarget,e,o,!1,H,n.isDark)}function b(){gt()}function Ee(t){if(Me(t.currentTarget))return;const e=A.value?a("common.copied")||"Copied":a("common.copy")||"Copy",o=t,c=o?.clientX!=null&&o?.clientY!=null?{x:o.clientX,y:o.clientY}:void 0;Se(t.currentTarget,e,"top",!1,c,n.isDark)}function ze(){return ye(this,null,function*(){try{const t=I.value;typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(t)),A.value=!0,setTimeout(()=>{A.value=!1},1e3)}catch(t){console.error("Copy failed:",t)}})}function Ye(){k.value=!k.value}function Te(t){g.value=t==="source"}const $e=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],qe=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function Xe(t){if(!t)return"";const e=t.trim();return qe.test(e)?e:""}function Ae(){j.value="",ae.value=""}function q(t){return _||t!==re.value}function Ge(){return ye(this,null,function*(){var t,e,o,c,H;if(!ke||_||!O.value||n.loading&&!n.progressiveRender)return;const S=se.value;if(S===P.value&&!s.value&&ne.value)return h.value=!0,void(n.loading&&(g.value=!1));const V=I.value;if(!V)return Ae(),s.value=null,P.value="",void(R.value="");const G=++re.value;W.value=!0,s.value=null,R.value="",(function(){const r=Re.value;w&&r&&C!==r&&(C&&w.markSettled(C),C=r,w.markPending(r))})();try{const r=yield(function(){return ye(this,null,function*(){if(x)return x;const l=yield ht();if(_||!l)return null;if(typeof l=="function"){const Q=new l;return Q&&typeof Q.compile=="function"?x=Q:typeof l.compile=="function"&&(x=l),x}return l?.D2&&typeof l.D2=="function"?(x=new l.D2,x):(typeof l.compile=="function"&&(x=l),x)})})();if(q(G))return;if(!r)return h.value=!1,g.value=!0,Ae(),s.value="D2 is not available.",void(R.value=S);if(typeof r.compile!="function"||typeof r.render!="function")throw new TypeError("D2 instance is missing compile/render methods.");h.value=!0;const y=yield r.compile(V);if(q(G))return;const le=(t=y?.diagram)!=null?t:y,B=(o=(e=y?.renderOptions)!=null?e:y?.options)!=null?o:{},Qe=(c=n.themeId)!=null?c:B.themeID,je=(H=n.darkThemeId)!=null?H:B.darkThemeID,J=he({},B);if(J.themeID=n.isDark&&je!=null?je:Qe,J.darkThemeID=null,J.darkThemeOverrides=null,n.isDark){const l=B.themeOverrides&&typeof B.themeOverrides=="object"?B.themeOverrides:null;J.themeOverrides=he(he({},Ve),l||{})}const Ke=yield r.render(le,J);if(q(G))return;const Oe=(function(l){return l?typeof l=="string"?l:typeof l.svg=="string"?l.svg:typeof l.data=="string"?l.data:"":""})(Ke);if(!Oe)throw new Error("D2 render returned empty output.");(function(l,Q){const Ie=(function(Fe){if(typeof window>"u"||typeof DOMParser>"u"||!Fe)return"";const Ze=Fe.replace(/["']\s*javascript:/gi,"#").replace(/\bjavascript:/gi,"#").replace(/["']\s*vbscript:/gi,"#").replace(/\bvbscript:/gi,"#").replace(/\bdata:text\/html/gi,"#"),ve=new DOMParser().parseFromString(Ze,"image/svg+xml").documentElement;if(!ve||ve.nodeName.toLowerCase()!=="svg")return"";const me=ve;return(function(He){const We=new Set(["script"]),et=[He,...Array.from(He.querySelectorAll("*"))];for(const L of et){if(We.has(L.tagName.toLowerCase())){L.remove();continue}const tt=Array.from(L.attributes);for(const z of tt){const E=z.name;if(/^on/i.test(E))L.removeAttribute(E);else{if(E==="style"&&z.value){const K=z.value;if($e.some(nt=>nt.test(K))){L.removeAttribute(E);continue}}if((E==="href"||E==="xlink:href")&&z.value){const K=Xe(z.value);if(!K){L.removeAttribute(E);continue}K!==z.value&&L.setAttribute(E,K)}}}}})(me),me.classList.add("markstream-d2-root-svg"),me.outerHTML})(l);j.value=Ie||"",ae.value=Ie?Q:""})(Oe,S),P.value=S,R.value="",n.loading&&(g.value=!1),s.value=null}catch(r){if(q(G))return;const y=r?.message?String(r.message):"D2 render failed.";n.loading||(s.value=y,R.value=S),P.value="",y.includes("@terrastruct/d2")&&(h.value=!1,g.value=!0)}finally{q(G)||(W.value=!1,F?(F=!1,X()):(function(){const r=C;w&&r&&(C="",fe(()=>{var y,le;if(!_){const B=(le=(y=ie.value)==null?void 0:y.offsetHeight)!=null?le:0;B>0&&w.reportHeight(r,B)}w.markSettled(r)}))})())}})}function X(t=!1){if(ce||!ke||_)return;if(W.value)return void(F=!0);const e=Math.max(120,Number(n.progressiveIntervalMs)||0),o=Date.now()-Ce;if(!t&&o<e)return F=!0,void(U==null&&(U=window.setTimeout(()=>{U=null,F&&(F=!1,X(!0))},Math.max(0,e-o))));ce=!0;const c=()=>{ce=!1,Ce=Date.now(),Ge()};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(c):setTimeout(c,0)}function Je(){if(ne.value)try{const t=new Blob([j.value],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t);if(typeof document<"u"){const o=document.createElement("a");o.href=e,o.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(o),o.click(),document.body.removeChild(o)}URL.revokeObjectURL(e)}catch(t){console.error("Failed to export SVG:",t)}}function de(){const t=ee.value;if(!t)return;const e=t.getBoundingClientRect().height;e>0&&(ue.value=e)}return Z(()=>[n.node.code,n.loading,n.isDark,n.themeId,n.darkThemeId],()=>{X()},{immediate:!0}),Z(()=>n.loading,(t,e)=>{e&&!t&&X(!0)}),Z(()=>O.value,t=>{t&&X(!0)}),Z(()=>[oe.value,j.value,I.value],()=>{fe(()=>{de()})}),vt(()=>{xe.value=!0,fe(()=>{de()}),typeof ResizeObserver<"u"&&($=new ResizeObserver(()=>{de()}),ee.value&&$.observe(ee.value))}),mt(()=>{var t;_=!0,re.value+=1,F=!1,(function(){const e=C;w&&e&&(C="",w.markSettled(e))})(),P.value="",(t=Y.value)==null||t.destroy(),Y.value=null,U!=null&&(clearTimeout(U),U=null),$?.disconnect(),$=null}),(t,e)=>(v(),m("div",{ref_key:"viewportTarget",ref:ie,class:pe(["d2-block-container rounded-lg border overflow-hidden",{dark:n.isDark}]),"data-markstream-d2":"1","data-markstream-mode":oe.value?"fallback":"preview","data-markstream-pending":Be.value?"true":void 0},[n.showHeader?(v(),m("div",Bt,[e[16]||(e[16]=u("div",{class:"flex items-center gap-x-2"},[u("span",{class:"d2-label font-medium font-mono"},"D2")],-1)),u("div",Dt,[n.showModeToggle?(v(),m("div",Ct,[u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"":"is-active"]),onClick:e[0]||(e[0]=o=>Te("preview")),onMouseenter:e[1]||(e[1]=o=>M(o,f(a)("common.preview")||"Preview")),onFocus:e[2]||(e[2]=o=>M(o,f(a)("common.preview")||"Preview")),onMouseleave:b,onBlur:b},N(f(a)("common.preview")||"Preview"),35),u("button",{type:"button",class:pe(["mode-btn px-2 py-0.5 rounded",g.value?"is-active":""]),onClick:e[3]||(e[3]=o=>Te("source")),onMouseenter:e[4]||(e[4]=o=>M(o,f(a)("common.source")||"Source")),onFocus:e[5]||(e[5]=o=>M(o,f(a)("common.source")||"Source")),onMouseleave:b,onBlur:b},N(f(a)("common.source")||"Source"),35)])):T("",!0),n.showCopyButton?(v(),m("button",{key:1,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":A.value?f(a)("common.copied")||"Copied":f(a)("common.copy")||"Copy",onClick:ze,onMouseenter:e[6]||(e[6]=o=>Ee(o)),onFocus:e[7]||(e[7]=o=>Ee(o)),onMouseleave:b,onBlur:b},[A.value?(v(),m("svg",Tt,[...e[13]||(e[13]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(v(),m("svg",Et,[...e[12]||(e[12]=[u("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[u("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),u("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,Mt)):T("",!0),n.showExportButton&&ne.value?(v(),m("button",{key:2,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-label":f(a)("common.export")||"Export",onClick:Je,onMouseenter:e[8]||(e[8]=o=>M(o,f(a)("common.export")||"Export")),onFocus:e[9]||(e[9]=o=>M(o,f(a)("common.export")||"Export")),onMouseleave:b,onBlur:b},[...e[14]||(e[14]=[u("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"})],-1)])],40,At)):T("",!0),n.showCollapseButton?(v(),m("button",{key:3,type:"button",class:"d2-action-btn p-[var(--ms-action-btn-padding)] rounded-md","aria-pressed":k.value,onClick:Ye,onMouseenter:e[10]||(e[10]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onFocus:e[11]||(e[11]=o=>M(o,k.value?f(a)("common.expand")||"Expand":f(a)("common.collapse")||"Collapse")),onMouseleave:b,onBlur:b},[(v(),m("svg",{style:ge({rotate:k.value?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...e[15]||(e[15]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,jt)):T("",!0)])])):T("",!0),ft(u("div",{ref_key:"bodyRef",ref:ee,class:"d2-block-body",style:ge(_e.value)},[n.loading&&!De.value?(v(),m("div",Ot,[u("pre",It,[u("code",null,N(I.value),1)]),s.value?(v(),m("p",Ft,N(s.value),1)):T("",!0)])):(v(),m("div",Ht,[oe.value?(v(),m("div",St,[u("pre",Lt,[u("code",null,N(I.value),1)]),s.value?(v(),m("p",Nt,N(s.value),1)):T("",!0)])):(v(),m("div",{key:1,class:"d2-render",style:ge(Ue.value)},[u("div",{class:"d2-svg",innerHTML:j.value},null,8,Pt),s.value?(v(),m("p",Rt,N(s.value),1)):T("",!0)],4))]))],4),[[pt,!k.value]])],10,xt))}}),[["__scopeId","data-v-3b434cf5"]]);we.install=p=>{p.component(we.__name,we)};export{we as default}; diff --git a/apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-CqPgDY2n.js b/apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-DmW-BDHY.js similarity index 69% rename from apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-CqPgDY2n.js rename to apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-DmW-BDHY.js index ef063fce7..3e250e37b 100644 --- a/apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-CqPgDY2n.js +++ b/apps/kimi-code/dist-web/assets/infoDiagram-FWYZ7A6U-DmW-BDHY.js @@ -1,2 +1,2 @@ -import{_ as a,l as s,F as n,e as i}from"./mermaid.core-DpBz6UHc.js";import{p}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var g={parse:a(async r=>{const e=await p("info",r);s.debug(e)},"parse")},v={version:"11.16.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,o)=>{s.debug(`rendering info diagram +import{_ as a,l as s,F as n,e as i}from"./mermaid.core-BKBZnrB_.js";import{p}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var g={parse:a(async r=>{const e=await p("info",r);s.debug(e)},"parse")},v={version:"11.16.0"},d=a(()=>v.version,"getVersion"),m={getVersion:d},c=a((r,e,o)=>{s.debug(`rendering info diagram `+r);const t=n(e);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),l={draw:c},w={parser:g,db:m,renderer:l};export{w as diagram}; diff --git a/apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-BrPR76fO.js b/apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-DJxuDwZK.js similarity index 99% rename from apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-BrPR76fO.js rename to apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-DJxuDwZK.js index f9f1dc4eb..9b5caefe7 100644 --- a/apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-BrPR76fO.js +++ b/apps/kimi-code/dist-web/assets/ishikawaDiagram-FXEZZL3T-DJxuDwZK.js @@ -1,4 +1,4 @@ -import{_ as l,c as lt,a1 as ct,F as ut,al as dt,q as yt,k as ft,o as et,a as pt,b as gt,g as kt,s as mt,p as wt,e as _t}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,f.length=f.length-B,r.length=r.length-B}l(X,"popStack");function J(){var B;return B=h.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(h=B,B=h.pop()),B=s.symbols_[B]||B),B}l(J,"lex");for(var M,F,N,Y,W={},G,V,tt,U;;){if(F=i[i.length-1],this.defaultActions[F]?N=this.defaultActions[F]:((M===null||typeof M>"u")&&(M=J()),N=v[F]&&v[F][M]),typeof N>"u"||!N.length||!N[0]){var q="";U=[];for(G in v[F])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`: +import{_ as l,c as lt,a1 as ct,F as ut,al as dt,q as yt,k as ft,o as et,a as pt,b as gt,g as kt,s as mt,p as wt,e as _t}from"./mermaid.core-BKBZnrB_.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var Q=(function(){var t=l(function(T,e,s,i){for(s=s||{},i=T.length;i--;s[T[i]]=e);return s},"o"),d=[1,4],n=[1,14],a=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],x=[1,6,7,11,13,14],D={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:l(function(e,s,i,h,f,r,v){var w=r.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(r[w-1].length,r[w].trim());break;case 16:h.addNode(0,r[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:n,7:[1,10],9:9,12:11,13:a,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:n,12:15,13:a,14:o},{6:n,9:16,12:11,13:a,14:o},{6:p,7:u,10:17,11:m},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:m},{1:[2,7],6:n,12:15,13:a,14:o},t(k,[2,14],{7:g,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(k,[2,13],{7:g,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],r=[],v=this.table,w="",I=0,$=0,L=2,A=1,C=r.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(e,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;r.push(R);var H=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(B){i.length=i.length-2*B,f.length=f.length-B,r.length=r.length-B}l(X,"popStack");function J(){var B;return B=h.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(h=B,B=h.pop()),B=s.symbols_[B]||B),B}l(J,"lex");for(var M,F,N,Y,W={},G,V,tt,U;;){if(F=i[i.length-1],this.defaultActions[F]?N=this.defaultActions[F]:((M===null||typeof M>"u")&&(M=J()),N=v[F]&&v[F][M]),typeof N>"u"||!N.length||!N[0]){var q="";U=[];for(G in v[F])this.terminals_[G]&&G>L&&U.push("'"+this.terminals_[G]+"'");b.showPosition?q="Parse error on line "+(I+1)+`: `+b.showPosition()+` Expecting `+U.join(", ")+", got '"+(this.terminals_[M]||M)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(q,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:U})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+M);switch(N[0]){case 1:i.push(M),f.push(b.yytext),r.push(b.yylloc),i.push(N[1]),M=null,$=b.yyleng,w=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(V=this.productions_[N[1]][1],W.$=f[f.length-V],W._$={first_line:r[r.length-(V||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(V||1)].first_column,last_column:r[r.length-1].last_column},H&&(W._$.range=[r[r.length-(V||1)].range[0],r[r.length-1].range[1]]),Y=this.performAction.apply(W,[w,$,I,S.yy,N[1],f,r].concat(C)),typeof Y<"u")return Y;V&&(i=i.slice(0,-1*V*2),f=f.slice(0,-1*V),r=r.slice(0,-1*V)),i.push(this.productions_[N[1]][0]),f.push(W.$),r.push(W._$),tt=v[i[i.length-2]][i[i.length-1]],i.push(tt);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:l(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:l(function(e,s){return this.yy=s||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var s=e.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:l(function(e){var s=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var h=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===h.length?this.yylloc.first_column:0)+h[h.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(e){this.unput(this.match.slice(e))},"less"),pastInput:l(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var e=this.pastInput(),s=new Array(e.length+1).join("-");return e+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-M5m-6IMM.js b/apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-BXVdGyDj.js similarity index 98% rename from apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-M5m-6IMM.js rename to apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-BXVdGyDj.js index 6285d5f3a..400037ca4 100644 --- a/apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-M5m-6IMM.js +++ b/apps/kimi-code/dist-web/assets/journeyDiagram-5HDEW3XC-BXVdGyDj.js @@ -1,4 +1,4 @@ -import{g as gt}from"./chunk-5VM5RSS4-D5nhu_pI.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-32BRIVSS-Dx199TNh.js";import{g as _t,s as vt,a as bt,b as wt,p as Tt,o as St,_ as s,c as R,d as X,e as $t,q as Mt}from"./mermaid.core-DpBz6UHc.js";import{d as it}from"./arc-BNlcm8Io.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`: +import{g as gt}from"./chunk-5VM5RSS4-BxdGGlTY.js";import{a as mt,g as lt,h as xt,d as kt}from"./chunk-32BRIVSS-CZoTGle4.js";import{g as _t,s as vt,a as bt,b as wt,p as Tt,o as St,_ as s,c as R,d as X,e as $t,q as Mt}from"./mermaid.core-BKBZnrB_.js";import{d as it}from"./arc-myf2kRJl.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var U=(function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,Q=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in v[A])this.terminals_[N]&&N>yt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`: `+_.showPosition()+` Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,Q=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,Q,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-RlJqNQKm.js b/apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-B6mC5age.js similarity index 99% rename from apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-RlJqNQKm.js rename to apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-B6mC5age.js index 1c7cb29fa..503b19642 100644 --- a/apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-RlJqNQKm.js +++ b/apps/kimi-code/dist-web/assets/kanban-definition-HUTT4EX6-B6mC5age.js @@ -1,4 +1,4 @@ -import{_ as o,l as te,c as H,F as fe,af as ye,ag as be,ah as me,ad as _e,D as Y,i as j,Y as ke,Z as Ee,aa as Se,ab as ce,ac as le}from"./mermaid.core-DpBz6UHc.js";import{g as Ne}from"./chunk-5VM5RSS4-D5nhu_pI.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],_=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],k=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(k,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(k,[2,19]),e(k,[2,21],{15:30,24:G}),e(k,[2,22]),e(k,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(k,[2,16],{15:37,24:G}),e(k,[2,17]),e(k,[2,18]),e(k,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(k,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Z=b.yylloc;t.push(Z);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var E,P,x,q,F={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=ae()),x=U[P]&&U[P][E]),typeof x>"u"||!x.length||!x[0]){var Q="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Q="Parse error on line "+(W+1)+`: +import{_ as o,l as te,c as H,F as fe,af as ye,ag as be,ah as me,ad as _e,D as Y,i as j,Y as ke,Z as Ee,aa as Se,ab as ce,ac as le}from"./mermaid.core-BKBZnrB_.js";import{g as Ne}from"./chunk-5VM5RSS4-BxdGGlTY.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),h=[1,4],p=[1,13],s=[1,12],d=[1,15],_=[1,16],m=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],k=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],M=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(i,n,r,a,u,t,U){var c=t.length-1;switch(u){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},{6:I,7:g,10:23,11:w},e(k,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:m,23:l}),e(k,[2,19]),e(k,[2,21],{15:30,24:G}),e(k,[2,22]),e(k,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:_,18:17,19:18,20:m,23:l},e(V,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(k,[2,16],{15:37,24:G}),e(k,[2,17]),e(k,[2,18]),e(k,[2,20],{24:M}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(k,[2,15],{24:M}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],u=[null],t=[],U=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);b.setInput(i,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Z=b.yylloc;t.push(Z);var de=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,u.length=u.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var E,P,x,q,F={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=ae()),x=U[P]&&U[P][E]),typeof x>"u"||!x.length||!x[0]){var Q="";X=[];for(z in U[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");b.showPosition?Q="Parse error on line "+(W+1)+`: `+b.showPosition()+` Expecting `+X.join(", ")+", got '"+(this.terminals_[E]||E)+"'":Q="Parse error on line "+(W+1)+": Unexpected "+(E==re?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(Q,{text:b.match,token:this.terminals_[E]||E,line:b.yylineno,loc:Z,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(x[0]){case 1:r.push(E),u.push(b.yytext),t.push(b.yylloc),r.push(x[1]),E=null,se=b.yyleng,c=b.yytext,W=b.yylineno,Z=b.yylloc;break;case 2:if(C=this.productions_[x[1]][1],F.$=u[u.length-C],F._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(F._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),q=this.performAction.apply(F,[c,se,W,R.yy,x[1],u,t].concat(ge)),typeof q<"u")return q;C&&(r=r.slice(0,-1*C*2),u=u.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),u.push(F.$),t.push(F._$),oe=U[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},K=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var n=i.length,r=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/linear-BWc4ICs9.js b/apps/kimi-code/dist-web/assets/linear-oD38CRgN.js similarity index 98% rename from apps/kimi-code/dist-web/assets/linear-BWc4ICs9.js rename to apps/kimi-code/dist-web/assets/linear-oD38CRgN.js index 32cd3ed58..f6d2dcc94 100644 --- a/apps/kimi-code/dist-web/assets/linear-BWc4ICs9.js +++ b/apps/kimi-code/dist-web/assets/linear-oD38CRgN.js @@ -1 +1 @@ -import{b9 as j,ba as p,bb as w,bc as k,bd as q}from"./mermaid.core-DpBz6UHc.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=N(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=N(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function N(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function d(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=d(u,e),f=t(a,f)):(e=d(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=d(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=x(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=N,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; +import{b9 as j,ba as p,bb as w,bc as k,bd as q}from"./mermaid.core-BKBZnrB_.js";import{i as D}from"./init-Gi6I4Gst.js";import{e as g,f as F,a as z,b as B}from"./defaultLocale-DX6XiGOO.js";function M(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=M,t=(o,c)=>M(n(o),c),e=(o,c)=>n(o)-c):(r=n===M||n===I?n:P,t=n,e=n);function u(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<0?i=l+1:h=l}while(i<h)}return i}function f(o,c,i=0,h=o.length){if(i<h){if(r(c,c)!==0)return h;do{const l=i+h>>>1;t(o[l],c)<=0?i=l+1:h=l}while(i<h)}return i}function a(o,c,i=0,h=o.length){const l=u(o,c,i,h-1);return l>i&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function P(){return 0}function V(n){return n===null?NaN:+n}const $=R(M),x=$.right;R(V).center;const O=Math.sqrt(50),T=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=O?10:f>=T?5:f>=C?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/i<n&&++o,c/i>r&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*i<n&&++o,c*i>r&&--c),c<o&&.5<=t&&t<2?v(n,r,t*2):[o,c,i]}function E(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,f,a]=e?v(r,n,t):v(n,r,t);if(!(f>=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;i<o;++i)c[i]=(f-i)/-a;else for(let i=0;i<o;++i)c[i]=(f-i)*a;else if(a<0)for(let i=0;i<o;++i)c[i]=(u+i)/-a;else for(let i=0;i<o;++i)c[i]=(u+i)*a;return c}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function G(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function H(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(f){for(u=0;u<t;++u)e[u]=n[u]*(1-f)+r[u]*f;return e}}function J(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function K(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),f=new Array(t),a;for(a=0;a<e;++a)u[a]=N(n[a],r[a]);for(;a<t;++a)f[a]=r[a];return function(o){for(a=0;a<e;++a)f[a]=u[a](o);return f}}function L(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function Q(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=N(n[u],r[u]):e[u]=r[u];return function(f){for(u in t)e[u]=t[u](f);return e}}function N(n,r){var t=typeof r,e;return r==null||t==="boolean"?j(r):(t==="number"?p:t==="string"?(e=w(r))?(r=e,k):q:r instanceof w?k:r instanceof Date?L:J(r)?H:Array.isArray(r)?K:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?Q:p)(n,r)}function U(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function W(n){return Math.max(0,-g(Math.abs(n)))}function X(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g(r)/3)))*3-g(Math.abs(n)))}function Y(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g(r)-g(n))+1}function Z(n){return function(){return n}}function _(n){return+n}var A=[0,1];function m(n){return n}function d(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Z(isNaN(r)?NaN:.5)}function b(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u<e?(e=d(u,e),f=t(a,f)):(e=d(e,u),f=t(f,a)),function(o){return f(e(o))}}function rn(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),f=new Array(e),a=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<e;)u[a]=d(n[a],n[a+1]),f[a]=t(r[a],r[a+1]);return function(o){var c=x(n,o,1,e)-1;return f[c](u[c](o))}}function en(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function tn(){var n=A,r=A,t=N,e,u,f,a=m,o,c,i;function h(){var s=Math.min(n.length,r.length);return a!==m&&(a=b(n[0],n[s-1])),o=s>2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=G(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return E(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o<a&&(i=a,a=o,o=i,i=u,u=f,f=i);h-- >0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,G as t}; diff --git a/apps/kimi-code/dist-web/assets/mermaid.core-DpBz6UHc.js b/apps/kimi-code/dist-web/assets/mermaid.core-BKBZnrB_.js similarity index 99% rename from apps/kimi-code/dist-web/assets/mermaid.core-DpBz6UHc.js rename to apps/kimi-code/dist-web/assets/mermaid.core-BKBZnrB_.js index 9a8aed0a5..c5feb2d5a 100644 --- a/apps/kimi-code/dist-web/assets/mermaid.core-DpBz6UHc.js +++ b/apps/kimi-code/dist-web/assets/mermaid.core-BKBZnrB_.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-VKFMJZFB-BCr0U4UL.js","assets/chunk-RYQCIY6F-DYUKYgim.js","assets/graph-DOmOIIwC.js","assets/map-DxJ2ADlA.js","assets/layout-D-LzfAck.js","assets/index-_5lXYMaO.js","assets/index-C_ObXpF5.css","assets/_commonjsHelpers-CqkleIqs.js","assets/swimlanes-5IMT3BWC-BaZl8tge.js","assets/cose-bilkent-JH36ORCC-Bvd7lU_r.js","assets/cytoscape.esm-OyMbaexL.js","assets/c4Diagram-LMCZKHZV-Dus3HzI2.js","assets/chunk-32BRIVSS-Dx199TNh.js","assets/flowDiagram-23GEKE2U-CBIszsQp.js","assets/chunk-5VM5RSS4-D5nhu_pI.js","assets/chunk-XXDRQBXY-BYo5O_6D.js","assets/chunk-VR4S4FIN-JAO0vJUe.js","assets/channel-DPT3_xql.js","assets/swimlanesDiagram-G3AALYLV-WxMWFajS.js","assets/erDiagram-Q63AITRT-CnsIdx2o.js","assets/gitGraphDiagram-IHSO6WYX-BH8WCC4D.js","assets/chunk-2Q5K7J3B-CqtdGPMZ.js","assets/chunk-JWPE2WC7-BtckK32c.js","assets/cynefin-VYW2F7L2-Dac1VpFl.js","assets/ganttDiagram-NO4QXBWP-Bp3UvmyY.js","assets/linear-BWc4ICs9.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-FWYZ7A6U-CqPgDY2n.js","assets/pieDiagram-ENE6RG2P-CJ6o_adA.js","assets/arc-BNlcm8Io.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-ABIIQ3AL-BBv6VFSq.js","assets/xychartDiagram-FW5EYKEG-BJN2UZpr.js","assets/requirementDiagram-TGXJPOKE-CGyvAsFO.js","assets/sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js","assets/classDiagram-OUVF2IWQ-BeJtrUxZ.js","assets/chunk-V7JOEXUC-Bj6HhMBf.js","assets/classDiagram-v2-EOCWNBFH-BeJtrUxZ.js","assets/stateDiagram-2N3HPSRC-DxGZaCFf.js","assets/chunk-EX3LRPZG-5GJmdVbS.js","assets/stateDiagram-v2-6OUMAXLB-BudL4GKN.js","assets/journeyDiagram-5HDEW3XC-M5m-6IMM.js","assets/timeline-definition-FHXFAJF6-zMligh5P.js","assets/mindmap-definition-LN4V7U3C-G8LQJrFP.js","assets/kanban-definition-HUTT4EX6-RlJqNQKm.js","assets/sankeyDiagram-HTMAVEWB-CYJzk73F.js","assets/diagram-NH7WQ7WH-CZRzvszj.js","assets/diagram-WEI45ONY-BhWQTWhi.js","assets/blockDiagram-677ZJIJ3-Cp3c1EWu.js","assets/diagram-OA4YK3LP-B2qPmny7.js","assets/architectureDiagram-ZJ3FMSHR-pdH2rk7i.js","assets/diagram-FQU43EPY-DPlhFZdP.js","assets/ishikawaDiagram-FXEZZL3T-BrPR76fO.js","assets/vennDiagram-L72KCM5P-KpUZjKlm.js","assets/diagram-G47NLZAW-D-tFNEyZ.js","assets/wardleyDiagram-EHGQE667-9gU-F74d.js","assets/cynefinDiagram-TSTJHNR4-cH6p2fBn.js","assets/railroadDiagram-RFXS5EU6-7QSjLg66.js","assets/chunk-MOJQB5TN-B49sRSVS.js","assets/ebnfDiagram-CCIWWBDH-C7ceb06g.js","assets/abnfDiagram-VRR7QNED-COKyJfaN.js","assets/pegDiagram-2B236MQR-Bqe1YNn0.js"])))=>i.map(i=>d[i]); -import{bR as nt}from"./index-_5lXYMaO.js";import{g as gy}from"./_commonjsHelpers-CqkleIqs.js";var _c=Object.defineProperty,p=(e,t)=>_c(e,"name",{value:t,configurable:!0}),my=(e,t)=>{for(var r in t)_c(e,r,{get:t[r],enumerable:!0})},So={exports:{}},yy=So.exports,zl;function Cy(){return zl||(zl=1,(function(e,t){(function(r,i){e.exports=i()})(yy,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var A=["th","st","nd","rd"],F=$%100;return"["+$+(A[(F-20)%10]||A[F]||A[0])+"]"}},k=function($,A,F){var D=String($);return!D||D.length>=A?$:""+Array(A+1-D.length).join(F)+$},T={s:k,z:function($){var A=-$.utcOffset(),F=Math.abs(A),D=Math.floor(F/60),M=F%60;return(A<=0?"+":"-")+k(D,2,"0")+":"+k(M,2,"0")},m:function $(A,F){if(A.date()<F.date())return-$(F,A);var D=12*(F.year()-A.year())+(F.month()-A.month()),M=A.clone().add(D,d),H=F-M<0,Y=A.clone().add(D+(H?-1:1),d);return+(-(D+(F-M)/(H?M-Y:Y-M))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:d,y:u,w:h,d:c,D:g,h:l,m:n,s:a,ms:s,Q:f}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},S="en",_={};_[S]=b;var L="$isDayjsObject",v=function($){return $ instanceof z||!(!$||!$[L])},N=function $(A,F,D){var M;if(!A)return S;if(typeof A=="string"){var H=A.toLowerCase();_[H]&&(M=H),F&&(_[H]=F,M=H);var Y=A.split("-");if(!M&&Y.length>1)return $(Y[0])}else{var G=A.name;_[G]=A,M=G}return!D&&M&&(S=M),M||!D&&S},R=function($,A){if(v($))return $.clone();var F=typeof A=="object"?A:{};return F.date=$,F.args=arguments,new z(F)},P=T;P.l=N,P.i=v,P.w=function($,A){return R($,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var z=(function(){function $(F){this.$L=N(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[L]=!0}var A=$.prototype;return A.parse=function(F){this.$d=(function(D){var M=D.date,H=D.utc;if(M===null)return new Date(NaN);if(P.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var Y=M.match(y);if(Y){var G=Y[2]-1||0,lt=(Y[7]||"0").substring(0,3);return H?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,lt)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,lt)}}return new Date(M)})(F),this.init()},A.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},A.$utils=function(){return P},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(F,D){var M=R(F);return this.startOf(D)<=M&&M<=this.endOf(D)},A.isAfter=function(F,D){return R(F)<this.startOf(D)},A.isBefore=function(F,D){return this.endOf(D)<R(F)},A.$g=function(F,D,M){return P.u(F)?this[D]:this.set(M,F)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(F,D){var M=this,H=!!P.u(D)||D,Y=P.p(F),G=function(Bt,St){var ut=P.w(M.$u?Date.UTC(M.$y,St,Bt):new Date(M.$y,St,Bt),M);return H?ut:ut.endOf(c)},lt=function(Bt,St){return P.w(M.toDate()[Bt].apply(M.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(St)),M)},ht=this.$W,dt=this.$M,bt=this.$D,et="set"+(this.$u?"UTC":"");switch(Y){case u:return H?G(1,0):G(31,11);case d:return H?G(1,dt):G(0,dt+1);case h:var ft=this.$locale().weekStart||0,kt=(ht<ft?ht+7:ht)-ft;return G(H?bt-kt:bt+(6-kt),dt);case c:case g:return lt(et+"Hours",0);case l:return lt(et+"Minutes",1);case n:return lt(et+"Seconds",2);case a:return lt(et+"Milliseconds",3);default:return this.clone()}},A.endOf=function(F){return this.startOf(F,!1)},A.$set=function(F,D){var M,H=P.p(F),Y="set"+(this.$u?"UTC":""),G=(M={},M[c]=Y+"Date",M[g]=Y+"Date",M[d]=Y+"Month",M[u]=Y+"FullYear",M[l]=Y+"Hours",M[n]=Y+"Minutes",M[a]=Y+"Seconds",M[s]=Y+"Milliseconds",M)[H],lt=H===c?this.$D+(D-this.$W):D;if(H===d||H===u){var ht=this.clone().set(g,1);ht.$d[G](lt),ht.init(),this.$d=ht.set(g,Math.min(this.$D,ht.daysInMonth())).$d}else G&&this.$d[G](lt);return this.init(),this},A.set=function(F,D){return this.clone().$set(F,D)},A.get=function(F){return this[P.p(F)]()},A.add=function(F,D){var M,H=this;F=Number(F);var Y=P.p(D),G=function(dt){var bt=R(H);return P.w(bt.date(bt.date()+Math.round(dt*F)),H)};if(Y===d)return this.set(d,this.$M+F);if(Y===u)return this.set(u,this.$y+F);if(Y===c)return G(1);if(Y===h)return G(7);var lt=(M={},M[n]=i,M[l]=o,M[a]=r,M)[Y]||1,ht=this.$d.getTime()+F*lt;return P.w(ht,this)},A.subtract=function(F,D){return this.add(-1*F,D)},A.format=function(F){var D=this,M=this.$locale();if(!this.isValid())return M.invalidDate||m;var H=F||"YYYY-MM-DDTHH:mm:ssZ",Y=P.z(this),G=this.$H,lt=this.$m,ht=this.$M,dt=M.weekdays,bt=M.months,et=M.meridiem,ft=function(St,ut,de,Tt){return St&&(St[ut]||St(D,H))||de[ut].slice(0,Tt)},kt=function(St){return P.s(G%12||12,St,"0")},Bt=et||function(St,ut,de){var Tt=St<12?"AM":"PM";return de?Tt.toLowerCase():Tt};return H.replace(C,(function(St,ut){return ut||(function(de){switch(de){case"YY":return String(D.$y).slice(-2);case"YYYY":return P.s(D.$y,4,"0");case"M":return ht+1;case"MM":return P.s(ht+1,2,"0");case"MMM":return ft(M.monthsShort,ht,bt,3);case"MMMM":return ft(bt,ht);case"D":return D.$D;case"DD":return P.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return ft(M.weekdaysMin,D.$W,dt,2);case"ddd":return ft(M.weekdaysShort,D.$W,dt,3);case"dddd":return dt[D.$W];case"H":return String(G);case"HH":return P.s(G,2,"0");case"h":return kt(1);case"hh":return kt(2);case"a":return Bt(G,lt,!0);case"A":return Bt(G,lt,!1);case"m":return String(lt);case"mm":return P.s(lt,2,"0");case"s":return String(D.$s);case"ss":return P.s(D.$s,2,"0");case"SSS":return P.s(D.$ms,3,"0");case"Z":return Y}return null})(St)||Y.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(F,D,M){var H,Y=this,G=P.p(D),lt=R(F),ht=(lt.utcOffset()-this.utcOffset())*i,dt=this-lt,bt=function(){return P.m(Y,lt)};switch(G){case u:H=bt()/12;break;case d:H=bt();break;case f:H=bt()/3;break;case h:H=(dt-ht)/6048e5;break;case c:H=(dt-ht)/864e5;break;case l:H=dt/o;break;case n:H=dt/i;break;case a:H=dt/r;break;default:H=dt}return M?H:P.a(H)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return _[this.$L]},A.locale=function(F,D){if(!F)return this.$L;var M=this.clone(),H=N(F,D,!0);return H&&(M.$L=H),M},A.clone=function(){return P.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},$})(),W=z.prototype;return R.prototype=W,[["$ms",s],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",g]].forEach((function($){W[$[1]]=function(A){return this.$g(A,$[0],$[1])}})),R.extend=function($,A){return $.$i||($(A,z,R),$.$i=!0),R},R.locale=N,R.isDayjs=v,R.unix=function($){return R(1e3*$)},R.en=_[S],R.Ls=_,R.p={},R}))})(So)),So.exports}var xy=Cy();const by=gy(xy);var Ne={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},q={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Cn=p(function(e="fatal"){let t=Ne.fatal;typeof e=="string"?e.toLowerCase()in Ne&&(t=Ne[e]):typeof e=="number"&&(t=e),q.trace=()=>{},q.debug=()=>{},q.info=()=>{},q.warn=()=>{},q.error=()=>{},q.fatal=()=>{},t<=Ne.fatal&&(q.fatal=console.error?console.error.bind(console,he("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",he("FATAL"))),t<=Ne.error&&(q.error=console.error?console.error.bind(console,he("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",he("ERROR"))),t<=Ne.warn&&(q.warn=console.warn?console.warn.bind(console,he("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",he("WARN"))),t<=Ne.info&&(q.info=console.info?console.info.bind(console,he("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",he("INFO"))),t<=Ne.debug&&(q.debug=console.debug?console.debug.bind(console,he("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("DEBUG"))),t<=Ne.trace&&(q.trace=console.debug?console.debug.bind(console,he("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("TRACE")))},"setLogLevel"),he=p(e=>`%c${by().format("ss.SSS")} : ${e} : `,"format");const _o={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return _o.hue2rgb(s,o,e+1/3)*255;case"g":return _o.hue2rgb(s,o,e)*255;case"b":return _o.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,l=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return l*100;switch(o){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},ky={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},wy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:_o,lang:ky,unit:wy},Je={};for(let e=0;e<=255;e++)Je[e]=at.unit.dec2hex(e);const Gt={ALL:0,RGB:1,HSL:2};class Ty{constructor(){this.type=Gt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Gt.ALL}is(t){return this.type===t}}class Sy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Ty}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Gt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Gt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Gt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Gt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Gt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Gt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Gt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const gs=new Sy({r:0,g:0,b:0,a:0},"transparent"),Xr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Xr.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return gs.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${Je[Math.round(t)]}${Je[Math.round(r)]}${Je[Math.round(i)]}${Je[Math.round(o*255)]}`:`#${Je[Math.round(t)]}${Je[Math.round(r)]}${Je[Math.round(i)]}`}},Cr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Cr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Cr.re);if(!r)return;const[,i,o,s,a,n]=r;return gs.set({h:Cr._hue2deg(i),s:at.channel.clamp.s(parseFloat(o)),l:at.channel.clamp.l(parseFloat(s)),a:a?at.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${o})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Ei={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Ei.colors[e];if(t)return Xr.parse(t)},stringify:e=>{const t=Xr.stringify(e);for(const r in Ei.colors)if(Ei.colors[r]===t)return r}},wi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(wi.re);if(!r)return;const[,i,o,s,a,n,l,c,h]=r;return gs.set({r:at.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(o)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Ee={format:{keyword:Ei,hex:Xr,rgb:wi,rgba:wi,hsl:Cr,hsla:Cr},parse:e=>{if(typeof e!="string")return e;const t=Xr.parse(e)||wi.parse(e)||Cr.parse(e)||Ei.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Gt.HSL)||e.data.r===void 0?Cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?wi.stringify(e):Xr.stringify(e)},Bc=(e,t)=>{const r=Ee.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Ee.stringify(r)},or=(e,t,r=0,i=1)=>{if(typeof e!="number")return Bc(e,{a:t});const o=gs.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Ee.stringify(o)},_y=e=>{const{r:t,g:r,b:i}=Ee.parse(e),o=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(o)},By=e=>_y(e)>=.5,ke=e=>!By(e),vc=(e,t,r)=>{const i=Ee.parse(e),o=i[t],s=at.channel.clamp[t](o+r);return o!==s&&(i[t]=s),Ee.stringify(i)},O=(e,t)=>vc(e,"l",t),I=(e,t)=>vc(e,"l",-t),x=(e,t)=>{const r=Ee.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return Bc(e,i)},vy=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=Ee.parse(e),{r:n,g:l,b:c,a:h}=Ee.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,C=i*m+n*y,b=o*m+l*y,k=s*m+c*y,T=a*d+h*(1-d);return or(C,b,k,T)},B=(e,t=100)=>{const r=Ee.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,vy(r,e,t)};/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function Hl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Ly(e){if(Array.isArray(e))return e}function Fy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,n=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(i=s.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,o=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return n}}function Ay(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-VKFMJZFB-LDM5VIAI.js","assets/chunk-RYQCIY6F-DPVXfp-M.js","assets/graph-DOmOIIwC.js","assets/map-DxJ2ADlA.js","assets/layout-D-LzfAck.js","assets/index-yKYHPeXU.js","assets/index-DBtc5buz.css","assets/_commonjsHelpers-CqkleIqs.js","assets/swimlanes-5IMT3BWC-CfDcaFta.js","assets/cose-bilkent-JH36ORCC-Br_qiVSQ.js","assets/cytoscape.esm-OyMbaexL.js","assets/c4Diagram-LMCZKHZV-Pb2vyZDT.js","assets/chunk-32BRIVSS-CZoTGle4.js","assets/flowDiagram-23GEKE2U-CLFIXYkh.js","assets/chunk-5VM5RSS4-BxdGGlTY.js","assets/chunk-XXDRQBXY-BeefoqH0.js","assets/chunk-VR4S4FIN-CTR9P-lT.js","assets/channel-C2KMAw2n.js","assets/swimlanesDiagram-G3AALYLV-B-ICP983.js","assets/erDiagram-Q63AITRT-qDRc-Mjq.js","assets/gitGraphDiagram-IHSO6WYX-DT7ncN8L.js","assets/chunk-2Q5K7J3B-vvrZ7MG7.js","assets/chunk-JWPE2WC7-D0FrOBtU.js","assets/cynefin-VYW2F7L2-BGL2vhde.js","assets/ganttDiagram-NO4QXBWP-CWQOrsH8.js","assets/linear-oD38CRgN.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-FWYZ7A6U-DmW-BDHY.js","assets/pieDiagram-ENE6RG2P-Bma7UCRc.js","assets/arc-myf2kRJl.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-ABIIQ3AL-AdbtQLWr.js","assets/xychartDiagram-FW5EYKEG-D5HV8EjG.js","assets/requirementDiagram-TGXJPOKE-BM1jojUv.js","assets/sequenceDiagram-DBY2YBRQ-UDhAaHfs.js","assets/classDiagram-OUVF2IWQ-C4oeFc7A.js","assets/chunk-V7JOEXUC-CySsnTrI.js","assets/classDiagram-v2-EOCWNBFH-C4oeFc7A.js","assets/stateDiagram-2N3HPSRC-C83-b98K.js","assets/chunk-EX3LRPZG-CfpEIqXB.js","assets/stateDiagram-v2-6OUMAXLB-DuUdJv-B.js","assets/journeyDiagram-5HDEW3XC-BXVdGyDj.js","assets/timeline-definition-FHXFAJF6-B-aR9mhp.js","assets/mindmap-definition-LN4V7U3C-dirTUANL.js","assets/kanban-definition-HUTT4EX6-B6mC5age.js","assets/sankeyDiagram-HTMAVEWB-CVUG-8BS.js","assets/diagram-NH7WQ7WH-arIhWcCl.js","assets/diagram-WEI45ONY-zMSIhP2J.js","assets/blockDiagram-677ZJIJ3-DAH71x1Q.js","assets/diagram-OA4YK3LP-DRlqkiV7.js","assets/architectureDiagram-ZJ3FMSHR-C9XZJvH9.js","assets/diagram-FQU43EPY-D5pIW94l.js","assets/ishikawaDiagram-FXEZZL3T-DJxuDwZK.js","assets/vennDiagram-L72KCM5P-55dVqqaA.js","assets/diagram-G47NLZAW-Xp-lqyAs.js","assets/wardleyDiagram-EHGQE667-Ip7Q1iRO.js","assets/cynefinDiagram-TSTJHNR4-qBwjxYIX.js","assets/railroadDiagram-RFXS5EU6-DFGDBfNL.js","assets/chunk-MOJQB5TN-BWl8WxOI.js","assets/ebnfDiagram-CCIWWBDH-CxhfT5Dk.js","assets/abnfDiagram-VRR7QNED-BN8tpheJ.js","assets/pegDiagram-2B236MQR-D_Imjl5d.js"])))=>i.map(i=>d[i]); +import{bR as nt}from"./index-yKYHPeXU.js";import{g as gy}from"./_commonjsHelpers-CqkleIqs.js";var _c=Object.defineProperty,p=(e,t)=>_c(e,"name",{value:t,configurable:!0}),my=(e,t)=>{for(var r in t)_c(e,r,{get:t[r],enumerable:!0})},So={exports:{}},yy=So.exports,zl;function Cy(){return zl||(zl=1,(function(e,t){(function(r,i){e.exports=i()})(yy,(function(){var r=1e3,i=6e4,o=36e5,s="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function($){var A=["th","st","nd","rd"],F=$%100;return"["+$+(A[(F-20)%10]||A[F]||A[0])+"]"}},k=function($,A,F){var D=String($);return!D||D.length>=A?$:""+Array(A+1-D.length).join(F)+$},T={s:k,z:function($){var A=-$.utcOffset(),F=Math.abs(A),D=Math.floor(F/60),M=F%60;return(A<=0?"+":"-")+k(D,2,"0")+":"+k(M,2,"0")},m:function $(A,F){if(A.date()<F.date())return-$(F,A);var D=12*(F.year()-A.year())+(F.month()-A.month()),M=A.clone().add(D,d),H=F-M<0,Y=A.clone().add(D+(H?-1:1),d);return+(-(D+(F-M)/(H?M-Y:Y-M))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:d,y:u,w:h,d:c,D:g,h:l,m:n,s:a,ms:s,Q:f}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},S="en",_={};_[S]=b;var L="$isDayjsObject",v=function($){return $ instanceof z||!(!$||!$[L])},N=function $(A,F,D){var M;if(!A)return S;if(typeof A=="string"){var H=A.toLowerCase();_[H]&&(M=H),F&&(_[H]=F,M=H);var Y=A.split("-");if(!M&&Y.length>1)return $(Y[0])}else{var G=A.name;_[G]=A,M=G}return!D&&M&&(S=M),M||!D&&S},R=function($,A){if(v($))return $.clone();var F=typeof A=="object"?A:{};return F.date=$,F.args=arguments,new z(F)},P=T;P.l=N,P.i=v,P.w=function($,A){return R($,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var z=(function(){function $(F){this.$L=N(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[L]=!0}var A=$.prototype;return A.parse=function(F){this.$d=(function(D){var M=D.date,H=D.utc;if(M===null)return new Date(NaN);if(P.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var Y=M.match(y);if(Y){var G=Y[2]-1||0,lt=(Y[7]||"0").substring(0,3);return H?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,lt)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,lt)}}return new Date(M)})(F),this.init()},A.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},A.$utils=function(){return P},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(F,D){var M=R(F);return this.startOf(D)<=M&&M<=this.endOf(D)},A.isAfter=function(F,D){return R(F)<this.startOf(D)},A.isBefore=function(F,D){return this.endOf(D)<R(F)},A.$g=function(F,D,M){return P.u(F)?this[D]:this.set(M,F)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(F,D){var M=this,H=!!P.u(D)||D,Y=P.p(F),G=function(Bt,St){var ut=P.w(M.$u?Date.UTC(M.$y,St,Bt):new Date(M.$y,St,Bt),M);return H?ut:ut.endOf(c)},lt=function(Bt,St){return P.w(M.toDate()[Bt].apply(M.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(St)),M)},ht=this.$W,dt=this.$M,bt=this.$D,et="set"+(this.$u?"UTC":"");switch(Y){case u:return H?G(1,0):G(31,11);case d:return H?G(1,dt):G(0,dt+1);case h:var ft=this.$locale().weekStart||0,kt=(ht<ft?ht+7:ht)-ft;return G(H?bt-kt:bt+(6-kt),dt);case c:case g:return lt(et+"Hours",0);case l:return lt(et+"Minutes",1);case n:return lt(et+"Seconds",2);case a:return lt(et+"Milliseconds",3);default:return this.clone()}},A.endOf=function(F){return this.startOf(F,!1)},A.$set=function(F,D){var M,H=P.p(F),Y="set"+(this.$u?"UTC":""),G=(M={},M[c]=Y+"Date",M[g]=Y+"Date",M[d]=Y+"Month",M[u]=Y+"FullYear",M[l]=Y+"Hours",M[n]=Y+"Minutes",M[a]=Y+"Seconds",M[s]=Y+"Milliseconds",M)[H],lt=H===c?this.$D+(D-this.$W):D;if(H===d||H===u){var ht=this.clone().set(g,1);ht.$d[G](lt),ht.init(),this.$d=ht.set(g,Math.min(this.$D,ht.daysInMonth())).$d}else G&&this.$d[G](lt);return this.init(),this},A.set=function(F,D){return this.clone().$set(F,D)},A.get=function(F){return this[P.p(F)]()},A.add=function(F,D){var M,H=this;F=Number(F);var Y=P.p(D),G=function(dt){var bt=R(H);return P.w(bt.date(bt.date()+Math.round(dt*F)),H)};if(Y===d)return this.set(d,this.$M+F);if(Y===u)return this.set(u,this.$y+F);if(Y===c)return G(1);if(Y===h)return G(7);var lt=(M={},M[n]=i,M[l]=o,M[a]=r,M)[Y]||1,ht=this.$d.getTime()+F*lt;return P.w(ht,this)},A.subtract=function(F,D){return this.add(-1*F,D)},A.format=function(F){var D=this,M=this.$locale();if(!this.isValid())return M.invalidDate||m;var H=F||"YYYY-MM-DDTHH:mm:ssZ",Y=P.z(this),G=this.$H,lt=this.$m,ht=this.$M,dt=M.weekdays,bt=M.months,et=M.meridiem,ft=function(St,ut,de,Tt){return St&&(St[ut]||St(D,H))||de[ut].slice(0,Tt)},kt=function(St){return P.s(G%12||12,St,"0")},Bt=et||function(St,ut,de){var Tt=St<12?"AM":"PM";return de?Tt.toLowerCase():Tt};return H.replace(C,(function(St,ut){return ut||(function(de){switch(de){case"YY":return String(D.$y).slice(-2);case"YYYY":return P.s(D.$y,4,"0");case"M":return ht+1;case"MM":return P.s(ht+1,2,"0");case"MMM":return ft(M.monthsShort,ht,bt,3);case"MMMM":return ft(bt,ht);case"D":return D.$D;case"DD":return P.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return ft(M.weekdaysMin,D.$W,dt,2);case"ddd":return ft(M.weekdaysShort,D.$W,dt,3);case"dddd":return dt[D.$W];case"H":return String(G);case"HH":return P.s(G,2,"0");case"h":return kt(1);case"hh":return kt(2);case"a":return Bt(G,lt,!0);case"A":return Bt(G,lt,!1);case"m":return String(lt);case"mm":return P.s(lt,2,"0");case"s":return String(D.$s);case"ss":return P.s(D.$s,2,"0");case"SSS":return P.s(D.$ms,3,"0");case"Z":return Y}return null})(St)||Y.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(F,D,M){var H,Y=this,G=P.p(D),lt=R(F),ht=(lt.utcOffset()-this.utcOffset())*i,dt=this-lt,bt=function(){return P.m(Y,lt)};switch(G){case u:H=bt()/12;break;case d:H=bt();break;case f:H=bt()/3;break;case h:H=(dt-ht)/6048e5;break;case c:H=(dt-ht)/864e5;break;case l:H=dt/o;break;case n:H=dt/i;break;case a:H=dt/r;break;default:H=dt}return M?H:P.a(H)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return _[this.$L]},A.locale=function(F,D){if(!F)return this.$L;var M=this.clone(),H=N(F,D,!0);return H&&(M.$L=H),M},A.clone=function(){return P.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},$})(),W=z.prototype;return R.prototype=W,[["$ms",s],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",g]].forEach((function($){W[$[1]]=function(A){return this.$g(A,$[0],$[1])}})),R.extend=function($,A){return $.$i||($(A,z,R),$.$i=!0),R},R.locale=N,R.isDayjs=v,R.unix=function($){return R(1e3*$)},R.en=_[S],R.Ls=_,R.p={},R}))})(So)),So.exports}var xy=Cy();const by=gy(xy);var Ne={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},q={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Cn=p(function(e="fatal"){let t=Ne.fatal;typeof e=="string"?e.toLowerCase()in Ne&&(t=Ne[e]):typeof e=="number"&&(t=e),q.trace=()=>{},q.debug=()=>{},q.info=()=>{},q.warn=()=>{},q.error=()=>{},q.fatal=()=>{},t<=Ne.fatal&&(q.fatal=console.error?console.error.bind(console,he("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",he("FATAL"))),t<=Ne.error&&(q.error=console.error?console.error.bind(console,he("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",he("ERROR"))),t<=Ne.warn&&(q.warn=console.warn?console.warn.bind(console,he("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",he("WARN"))),t<=Ne.info&&(q.info=console.info?console.info.bind(console,he("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",he("INFO"))),t<=Ne.debug&&(q.debug=console.debug?console.debug.bind(console,he("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("DEBUG"))),t<=Ne.trace&&(q.trace=console.debug?console.debug.bind(console,he("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",he("TRACE")))},"setLogLevel"),he=p(e=>`%c${by().format("ss.SSS")} : ${e} : `,"format");const _o={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const o=r<.5?r*(1+t):r+t-r*t,s=2*r-o;switch(i){case"r":return _o.hue2rgb(s,o,e+1/3)*255;case"g":return _o.hue2rgb(s,o,e)*255;case"b":return _o.hue2rgb(s,o,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const o=Math.max(e,t,r),s=Math.min(e,t,r),a=(o+s)/2;if(i==="l")return a*100;if(o===s)return 0;const n=o-s,l=a>.5?n/(2-o-s):n/(o+s);if(i==="s")return l*100;switch(o){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},ky={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},wy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},at={channel:_o,lang:ky,unit:wy},Je={};for(let e=0;e<=255;e++)Je[e]=at.unit.dec2hex(e);const Gt={ALL:0,RGB:1,HSL:2};class Ty{constructor(){this.type=Gt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Gt.ALL}is(t){return this.type===t}}class Sy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Ty}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Gt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:o}=t;r===void 0&&(t.h=at.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=at.channel.rgb2hsl(t,"s")),o===void 0&&(t.l=at.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:o}=t;r===void 0&&(t.r=at.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=at.channel.hsl2rgb(t,"g")),o===void 0&&(t.b=at.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Gt.HSL)&&r!==void 0?r:(this._ensureHSL(),at.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Gt.RGB)&&r!==void 0?r:(this._ensureRGB(),at.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Gt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Gt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Gt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Gt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Gt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Gt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const gs=new Sy({r:0,g:0,b:0,a:0},"transparent"),Xr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Xr.re);if(!t)return;const r=t[1],i=parseInt(r,16),o=r.length,s=o%4===0,a=o>4,n=a?1:17,l=a?8:4,c=s?0:-1,h=a?255:15;return gs.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:s?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`#${Je[Math.round(t)]}${Je[Math.round(r)]}${Je[Math.round(i)]}${Je[Math.round(o*255)]}`:`#${Je[Math.round(t)]}${Je[Math.round(r)]}${Je[Math.round(i)]}`}},Cr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Cr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return at.channel.clamp.h(parseFloat(r)*.9);case"rad":return at.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return at.channel.clamp.h(parseFloat(r)*360)}}return at.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Cr.re);if(!r)return;const[,i,o,s,a,n]=r;return gs.set({h:Cr._hue2deg(i),s:at.channel.clamp.s(parseFloat(o)),l:at.channel.clamp.l(parseFloat(s)),a:a?at.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:o}=e;return o<1?`hsla(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%, ${o})`:`hsl(${at.lang.round(t)}, ${at.lang.round(r)}%, ${at.lang.round(i)}%)`}},Ei={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Ei.colors[e];if(t)return Xr.parse(t)},stringify:e=>{const t=Xr.stringify(e);for(const r in Ei.colors)if(Ei.colors[r]===t)return r}},wi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(wi.re);if(!r)return;const[,i,o,s,a,n,l,c,h]=r;return gs.set({r:at.channel.clamp.r(o?parseFloat(i)*2.55:parseFloat(i)),g:at.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:at.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?at.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:o}=e;return o<1?`rgba(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)}, ${at.lang.round(o)})`:`rgb(${at.lang.round(t)}, ${at.lang.round(r)}, ${at.lang.round(i)})`}},Ee={format:{keyword:Ei,hex:Xr,rgb:wi,rgba:wi,hsl:Cr,hsla:Cr},parse:e=>{if(typeof e!="string")return e;const t=Xr.parse(e)||wi.parse(e)||Cr.parse(e)||Ei.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Gt.HSL)||e.data.r===void 0?Cr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?wi.stringify(e):Xr.stringify(e)},Bc=(e,t)=>{const r=Ee.parse(e);for(const i in t)r[i]=at.channel.clamp[i](t[i]);return Ee.stringify(r)},or=(e,t,r=0,i=1)=>{if(typeof e!="number")return Bc(e,{a:t});const o=gs.set({r:at.channel.clamp.r(e),g:at.channel.clamp.g(t),b:at.channel.clamp.b(r),a:at.channel.clamp.a(i)});return Ee.stringify(o)},_y=e=>{const{r:t,g:r,b:i}=Ee.parse(e),o=.2126*at.channel.toLinear(t)+.7152*at.channel.toLinear(r)+.0722*at.channel.toLinear(i);return at.lang.round(o)},By=e=>_y(e)>=.5,ke=e=>!By(e),vc=(e,t,r)=>{const i=Ee.parse(e),o=i[t],s=at.channel.clamp[t](o+r);return o!==s&&(i[t]=s),Ee.stringify(i)},O=(e,t)=>vc(e,"l",t),I=(e,t)=>vc(e,"l",-t),x=(e,t)=>{const r=Ee.parse(e),i={};for(const o in t)t[o]&&(i[o]=r[o]+t[o]);return Bc(e,i)},vy=(e,t,r=50)=>{const{r:i,g:o,b:s,a}=Ee.parse(e),{r:n,g:l,b:c,a:h}=Ee.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,C=i*m+n*y,b=o*m+l*y,k=s*m+c*y,T=a*d+h*(1-d);return or(C,b,k,T)},B=(e,t=100)=>{const r=Ee.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,vy(r,e,t)};/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */function Hl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Ly(e){if(Array.isArray(e))return e}function Fy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,s,a,n=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(i=s.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,o=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return n}}function Ay(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ey(e,t){return Ly(e)||Fy(e,t)||My(e,t)||Ay()}function My(e,t){if(e){if(typeof e=="string")return Hl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hl(e,t):void 0}}const Lc=Object.entries,Yl=Object.setPrototypeOf,$y=Object.isFrozen,Oy=Object.getPrototypeOf,Iy=Object.getOwnPropertyDescriptor;let Ut=Object.freeze,jt=Object.seal,zr=Object.create,Fc=typeof Reflect<"u"&&Reflect,ya=Fc.apply,Ca=Fc.construct;Ut||(Ut=function(t){return t});jt||(jt=function(t){return t});ya||(ya=function(t,r){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];return t.apply(r,o)});Ca||(Ca=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return new t(...i)});const ui=Ot(Array.prototype.forEach),Dy=Ot(Array.prototype.lastIndexOf),Ul=Ot(Array.prototype.pop),Rr=Ot(Array.prototype.push),Py=Ot(Array.prototype.splice),er=Array.isArray,Ti=Ot(String.prototype.toLowerCase),Ks=Ot(String.prototype.toString),jl=Ot(String.prototype.match),fi=Ot(String.prototype.replace),Gl=Ot(String.prototype.indexOf),Ry=Ot(String.prototype.trim),Ny=Ot(Number.prototype.toString),qy=Ot(Boolean.prototype.toString),Xl=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),Vl=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),Nt=Ot(Object.prototype.hasOwnProperty),pi=Ot(Object.prototype.toString),zt=Ot(RegExp.prototype.test),fr=Wy(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return ya(e,t,i)}}function Wy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Ca(e,r)}}function mt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ti;if(Yl&&Yl(e,null),!er(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=r(o);s!==o&&($y(t)||(t[i]=s),o=s)}e[o]=!0}return e}function zy(e){for(let t=0;t<e.length;t++)Nt(e,t)||(e[t]=null);return e}function Qt(e){const t=zr(null);for(const i of Lc(e)){var r=Ey(i,2);const o=r[0],s=r[1];Nt(e,o)&&(er(s)?t[o]=zy(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=Qt(s):t[o]=s)}return t}function Hy(e){switch(typeof e){case"string":return e;case"number":return Ny(e);case"boolean":return qy(e);case"bigint":return Xl?Xl(e):"0";case"symbol":return Vl?Vl(e):"Symbol()";case"undefined":return pi(e);case"function":case"object":{if(e===null)return pi(e);const t=e,r=Be(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:pi(i)}return pi(e)}default:return pi(e)}}function Be(e,t){for(;e!==null;){const i=Iy(e,t);if(i){if(i.get)return Ot(i.get);if(typeof i.value=="function")return Ot(i.value)}e=Oy(e)}function r(){return null}return r}function Yy(e){try{return zt(e,""),!0}catch{return!1}}const Zl=Ut(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Qs=Ut(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Js=Ut(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Uy=Ut(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ta=Ut(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),jy=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Kl=Ut(["#text"]),Ql=Ut(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),ea=Ut(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Jl=Ut(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),uo=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Gy=jt(/{{[\w\W]*|^[\w\W]*}}/g),Xy=jt(/<%[\w\W]*|^[\w\W]*%>/g),Vy=jt(/\${[\w\W]*/g),Zy=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ky=jt(/^aria-[\-\w]+$/),th=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Qy=jt(/^(?:\w+script|data):/i),Jy=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),t0=jt(/^html$/i),e0=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),eh=jt(/<[/\w!]/g),r0=jt(/<[/\w]/g),i0=jt(/<\/no(script|embed|frames)/i),o0=jt(/\/>/i),_e={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},s0=function(){return typeof window>"u"?null:window},a0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(i=r.getAttribute(o));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},rh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Qe=function(t,r,i,o){return Nt(t,r)&&er(t[r])?mt(o.base?Qt(o.base):{},t[r],o.transform):i};function Ac(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s0();const t=j=>Ac(j);if(t.version="3.4.11",t.removed=[],!e||!e.document||e.document.nodeType!==_e.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,o=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,f=n.prototype,u=Be(f,"cloneNode"),g=Be(f,"remove"),m=Be(f,"nextSibling"),y=Be(f,"childNodes"),C=Be(f,"parentNode"),b=Be(f,"shadowRoot"),k=Be(f,"attributes"),T=a&&a.prototype?Be(a.prototype,"nodeType"):null,S=a&&a.prototype?Be(a.prototype,"nodeName"):null;if(typeof s=="function"){const j=r.createElement("template");j.content&&j.content.ownerDocument&&(r=j.content.ownerDocument)}let _,L="",v,N=!1,R=0;const P=function(){if(R>0)throw fr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(w){P(),R++;try{return _.createHTML(w)}finally{R--}},W=function(w){P(),R++;try{return _.createScriptURL(w)}finally{R--}},$=function(){return N||(v=a0(d,o),N=!0),v},A=r,F=A.implementation,D=A.createNodeIterator,M=A.createDocumentFragment,H=A.getElementsByTagName,Y=i.importNode;let G=rh();t.isSupported=typeof Lc=="function"&&typeof C=="function"&&F&&F.createHTMLDocument!==void 0;const lt=Gy,ht=Xy,dt=Vy,bt=Zy,et=Ky,ft=Qy,kt=Jy,Bt=e0;let St=th,ut=null;const de=mt({},[...Zl,...Qs,...Js,...ta,...Kl]);let Tt=null;const Mr=mt({},[...Ql,...ea,...Jl,...uo]);let Lt=Object.seal(zr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),li=null,bl=null;const Ve=Object.seal(zr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let kl=!0,Os=!0,wl=!1,Tl=!0,Ze=!1,hi=!0,dr=!1,Is=!1,Ds=null,Ps=null,Rs=!1,$r=!1,oo=!1,so=!1,Sl=!0,_l=!1;const Bl="user-content-";let Ns=!0,qs=!1,Or={},Te=null;const Ws=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let vl=null;const Ll=mt({},["audio","video","img","source","image","track"]);let zs=null;const Fl=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ao="http://www.w3.org/1998/Math/MathML",no="http://www.w3.org/2000/svg",Se="http://www.w3.org/1999/xhtml";let Ir=Se,Hs=!1,Ys=null;const Jm=mt({},[ao,no,Se],Ks),Al=Ut(["mi","mo","mn","ms","mtext"]);let Us=mt({},Al);const El=Ut(["annotation-xml"]);let js=mt({},El);const ty=mt({},["title","style","font","a","script"]);let ci=null;const ey=["application/xhtml+xml","text/html"],ry="text/html";let Ft=null,Dr=null;const iy=r.createElement("form"),Ml=function(w){return w instanceof RegExp||w instanceof Function},Gs=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Dr&&Dr===w)return;(!w||typeof w!="object")&&(w={}),w=Qt(w),ci=ey.indexOf(w.PARSER_MEDIA_TYPE)===-1?ry:w.PARSER_MEDIA_TYPE,Ft=ci==="application/xhtml+xml"?Ks:Ti,ut=Qe(w,"ALLOWED_TAGS",de,{transform:Ft}),Tt=Qe(w,"ALLOWED_ATTR",Mr,{transform:Ft}),Ys=Qe(w,"ALLOWED_NAMESPACES",Jm,{transform:Ks}),zs=Qe(w,"ADD_URI_SAFE_ATTR",Fl,{transform:Ft,base:Fl}),vl=Qe(w,"ADD_DATA_URI_TAGS",Ll,{transform:Ft,base:Ll}),Te=Qe(w,"FORBID_CONTENTS",Ws,{transform:Ft}),li=Qe(w,"FORBID_TAGS",Qt({}),{transform:Ft}),bl=Qe(w,"FORBID_ATTR",Qt({}),{transform:Ft}),Or=Nt(w,"USE_PROFILES")?w.USE_PROFILES&&typeof w.USE_PROFILES=="object"?Qt(w.USE_PROFILES):w.USE_PROFILES:!1,kl=w.ALLOW_ARIA_ATTR!==!1,Os=w.ALLOW_DATA_ATTR!==!1,wl=w.ALLOW_UNKNOWN_PROTOCOLS||!1,Tl=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ze=w.SAFE_FOR_TEMPLATES||!1,hi=w.SAFE_FOR_XML!==!1,dr=w.WHOLE_DOCUMENT||!1,$r=w.RETURN_DOM||!1,oo=w.RETURN_DOM_FRAGMENT||!1,so=w.RETURN_TRUSTED_TYPE||!1,Rs=w.FORCE_BODY||!1,Sl=w.SANITIZE_DOM!==!1,_l=w.SANITIZE_NAMED_PROPS||!1,Ns=w.KEEP_CONTENT!==!1,qs=w.IN_PLACE||!1,St=Yy(w.ALLOWED_URI_REGEXP)?w.ALLOWED_URI_REGEXP:th,Ir=typeof w.NAMESPACE=="string"?w.NAMESPACE:Se,Us=Nt(w,"MATHML_TEXT_INTEGRATION_POINTS")&&w.MATHML_TEXT_INTEGRATION_POINTS&&typeof w.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qt(w.MATHML_TEXT_INTEGRATION_POINTS):mt({},Al),js=Nt(w,"HTML_INTEGRATION_POINTS")&&w.HTML_INTEGRATION_POINTS&&typeof w.HTML_INTEGRATION_POINTS=="object"?Qt(w.HTML_INTEGRATION_POINTS):mt({},El);const E=Nt(w,"CUSTOM_ELEMENT_HANDLING")&&w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING=="object"?Qt(w.CUSTOM_ELEMENT_HANDLING):zr(null);if(Lt=zr(null),Nt(E,"tagNameCheck")&&Ml(E.tagNameCheck)&&(Lt.tagNameCheck=E.tagNameCheck),Nt(E,"attributeNameCheck")&&Ml(E.attributeNameCheck)&&(Lt.attributeNameCheck=E.attributeNameCheck),Nt(E,"allowCustomizedBuiltInElements")&&typeof E.allowCustomizedBuiltInElements=="boolean"&&(Lt.allowCustomizedBuiltInElements=E.allowCustomizedBuiltInElements),jt(Lt),Ze&&(Os=!1),oo&&($r=!0),Or&&(ut=mt({},Kl),Tt=zr(null),Or.html===!0&&(mt(ut,Zl),mt(Tt,Ql)),Or.svg===!0&&(mt(ut,Qs),mt(Tt,ea),mt(Tt,uo)),Or.svgFilters===!0&&(mt(ut,Js),mt(Tt,ea),mt(Tt,uo)),Or.mathMl===!0&&(mt(ut,ta),mt(Tt,Jl),mt(Tt,uo))),Ve.tagCheck=null,Ve.attributeCheck=null,Nt(w,"ADD_TAGS")&&(typeof w.ADD_TAGS=="function"?Ve.tagCheck=w.ADD_TAGS:er(w.ADD_TAGS)&&(ut===de&&(ut=Qt(ut)),mt(ut,w.ADD_TAGS,Ft))),Nt(w,"ADD_ATTR")&&(typeof w.ADD_ATTR=="function"?Ve.attributeCheck=w.ADD_ATTR:er(w.ADD_ATTR)&&(Tt===Mr&&(Tt=Qt(Tt)),mt(Tt,w.ADD_ATTR,Ft))),Nt(w,"ADD_URI_SAFE_ATTR")&&er(w.ADD_URI_SAFE_ATTR)&&mt(zs,w.ADD_URI_SAFE_ATTR,Ft),Nt(w,"FORBID_CONTENTS")&&er(w.FORBID_CONTENTS)&&(Te===Ws&&(Te=Qt(Te)),mt(Te,w.FORBID_CONTENTS,Ft)),Nt(w,"ADD_FORBID_CONTENTS")&&er(w.ADD_FORBID_CONTENTS)&&(Te===Ws&&(Te=Qt(Te)),mt(Te,w.ADD_FORBID_CONTENTS,Ft)),Ns&&(ut["#text"]=!0),dr&&mt(ut,["html","head","body"]),ut.table&&(mt(ut,["tbody"]),delete li.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw fr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw fr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const U=_;_=w.TRUSTED_TYPES_POLICY;try{L=z("")}catch(J){throw _=U,J}}else w.TRUSTED_TYPES_POLICY===null?(_=void 0,L=""):(_===void 0&&(_=$()),_&&typeof L=="string"&&(L=z("")));Ut&&Ut(w),Dr=w},$l=mt({},[...Qs,...Js,...Uy]),Ol=mt({},[...ta,...jy]),oy=function(w,E,U){return E.namespaceURI===Se?w==="svg":E.namespaceURI===ao?w==="svg"&&(U==="annotation-xml"||Us[U]):!!$l[w]},sy=function(w,E,U){return E.namespaceURI===Se?w==="math":E.namespaceURI===no?w==="math"&&js[U]:!!Ol[w]},ay=function(w,E,U){return E.namespaceURI===no&&!js[U]||E.namespaceURI===ao&&!Us[U]?!1:!Ol[w]&&(ty[w]||!$l[w])},ny=function(w){let E=C(w);(!E||!E.tagName)&&(E={namespaceURI:Ir,tagName:"template"});const U=Ti(w.tagName),J=Ti(E.tagName);return Ys[w.namespaceURI]?w.namespaceURI===no?oy(U,E,J):w.namespaceURI===ao?sy(U,E,J):w.namespaceURI===Se?ay(U,E,J):!!(ci==="application/xhtml+xml"&&Ys[w.namespaceURI]):!1},Ke=function(w){Rr(t.removed,{element:w});try{C(w).removeChild(w)}catch{if(g(w),!C(w))throw fr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Il=function(w){const E=y(w);if(E){const J=[];ui(E,pt=>{Rr(J,pt)}),ui(J,pt=>{try{g(pt)}catch{}})}const U=k(w);if(U)for(let J=U.length-1;J>=0;--J){const pt=U[J],yt=pt&&pt.name;if(typeof yt=="string")try{w.removeAttribute(yt)}catch{}}},ur=function(w,E){try{Rr(t.removed,{attribute:E.getAttributeNode(w),from:E})}catch{Rr(t.removed,{attribute:null,from:E})}if(E.removeAttribute(w),w==="is")if($r||oo)try{Ke(E)}catch{}else try{E.setAttribute(w,"")}catch{}},ly=function(w){const E=k(w);if(E)for(let U=E.length-1;U>=0;--U){const J=E[U],pt=J&&J.name;if(!(typeof pt!="string"||Tt[Ft(pt)]))try{w.removeAttribute(pt)}catch{}}},hy=function(w){const E=[w];for(;E.length>0;){const U=E.pop();(T?T(U):U.nodeType)===_e.element&&ly(U);const pt=y(U);if(pt)for(let yt=pt.length-1;yt>=0;--yt)E.push(pt[yt])}},Dl=function(w){let E=null,U=null;if(Rs)w="<remove></remove>"+w;else{const yt=jl(w,/^[\r\n\t ]+/);U=yt&&yt[0]}ci==="application/xhtml+xml"&&Ir===Se&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const J=_?z(w):w;if(Ir===Se)try{E=new h().parseFromString(J,ci)}catch{}if(!E||!E.documentElement){E=F.createDocument(Ir,"template",null);try{E.documentElement.innerHTML=Hs?L:J}catch{}}const pt=E.body||E.documentElement;return w&&U&&pt.insertBefore(r.createTextNode(U),pt.childNodes[0]||null),Ir===Se?H.call(E,dr?"html":"body")[0]:dr?E.documentElement:pt},Pl=function(w){return D.call(w.ownerDocument||w,w,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},lo=function(w){return w=fi(w,lt," "),w=fi(w,ht," "),w=fi(w,dt," "),w},Xs=function(w){var E;w.normalize();const U=D.call(w.ownerDocument||w,w,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let J=U.nextNode();for(;J;)J.data=lo(J.data),J=U.nextNode();const pt=(E=w.querySelectorAll)===null||E===void 0?void 0:E.call(w,"template");pt&&ui(pt,yt=>{Pr(yt.content)&&Xs(yt.content)})},ho=function(w){const E=S?S(w):null;return typeof E!="string"||Ft(E)!=="form"?!1:typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||w.attributes!==k(w)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function"||w.nodeType!==T(w)||w.childNodes!==y(w)},Pr=function(w){if(!T||typeof w!="object"||w===null)return!1;try{return T(w)===_e.documentFragment}catch{return!1}},di=function(w){if(!T||typeof w!="object"||w===null)return!1;try{return typeof T(w)=="number"}catch{return!1}};function Re(j,w,E){j.length!==0&&ui(j,U=>{U.call(t,w,E,Dr)})}const cy=function(w,E){return!!(hi&&w.hasChildNodes()&&!di(w.firstElementChild)&&zt(eh,w.textContent)&&zt(eh,w.innerHTML)||hi&&w.namespaceURI===Se&&E==="style"&&di(w.firstElementChild)||w.nodeType===_e.processingInstruction||hi&&w.nodeType===_e.comment&&zt(r0,w.data))},dy=function(w,E){if(!li[E]&&ql(E)&&(Lt.tagNameCheck instanceof RegExp&&zt(Lt.tagNameCheck,E)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(E)))return!1;if(Ns&&!Te[E]){const U=C(w),J=y(w);if(J&&U){const pt=J.length;for(let yt=pt-1;yt>=0;--yt){const Rt=qs?J[yt]:u(J[yt],!0);U.insertBefore(Rt,m(w))}}}return Ke(w),!0},Rl=function(w){if(Re(G.beforeSanitizeElements,w,null),ho(w))return Ke(w),!0;const E=Ft(S?S(w):w.nodeName);if(Re(G.uponSanitizeElement,w,{tagName:E,allowedTags:ut}),cy(w,E))return Ke(w),!0;if(li[E]||!(Ve.tagCheck instanceof Function&&Ve.tagCheck(E))&&!ut[E])return dy(w,E);if((T?T(w):w.nodeType)===_e.element&&!ny(w)||(E==="noscript"||E==="noembed"||E==="noframes")&&zt(i0,w.innerHTML))return Ke(w),!0;if(Ze&&w.nodeType===_e.text){const J=lo(w.textContent);w.textContent!==J&&(Rr(t.removed,{element:w.cloneNode()}),w.textContent=J)}return Re(G.afterSanitizeElements,w,null),!1},Nl=function(w,E,U){if(bl[E]||Sl&&(E==="id"||E==="name")&&(U in r||U in iy))return!1;const J=Tt[E]||Ve.attributeCheck instanceof Function&&Ve.attributeCheck(E,w);if(!(Os&&zt(bt,E))){if(!(kl&&zt(et,E))){if(J){if(!zs[E]){if(!zt(St,fi(U,kt,""))){if(!((E==="src"||E==="xlink:href"||E==="href")&&w!=="script"&&Gl(U,"data:")===0&&vl[w])){if(!(wl&&!zt(ft,fi(U,kt,"")))){if(U)return!1}}}}}else if(!(ql(w)&&(Lt.tagNameCheck instanceof RegExp&&zt(Lt.tagNameCheck,w)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(w))&&(Lt.attributeNameCheck instanceof RegExp&&zt(Lt.attributeNameCheck,E)||Lt.attributeNameCheck instanceof Function&&Lt.attributeNameCheck(E,w))||E==="is"&&Lt.allowCustomizedBuiltInElements&&(Lt.tagNameCheck instanceof RegExp&&zt(Lt.tagNameCheck,U)||Lt.tagNameCheck instanceof Function&&Lt.tagNameCheck(U))))return!1}}return!0},uy=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ql=function(w){return!uy[Ti(w)]&&zt(Bt,w)},fy=function(w,E,U,J){if(_&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!U)switch(d.getAttributeType(w,E)){case"TrustedHTML":return z(J);case"TrustedScriptURL":return W(J)}return J},py=function(w,E,U,J){try{U?w.setAttributeNS(U,E,J):w.setAttribute(E,J),ho(w)?Ke(w):Ul(t.removed)}catch{ur(E,w)}},Wl=function(w){Re(G.beforeSanitizeAttributes,w,null);const E=w.attributes;if(!E||ho(w))return;const U={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Tt,forceKeepAttr:void 0};let J=E.length;const pt=Ft(w.nodeName);for(;J--;){const yt=E[J],Rt=yt.name,Mt=yt.namespaceURI,le=yt.value,ue=Ft(Rt),Zs=le;let Kt=Rt==="value"?Zs:Ry(Zs);if(U.attrName=ue,U.attrValue=Kt,U.keepAttr=!0,U.forceKeepAttr=void 0,Re(G.uponSanitizeAttribute,w,U),Kt=U.attrValue,_l&&(ue==="id"||ue==="name")&&Gl(Kt,Bl)!==0&&(ur(Rt,w),Kt=Bl+Kt),hi&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Kt)){ur(Rt,w);continue}if(ue==="attributename"&&jl(Kt,"href")){ur(Rt,w);continue}if(!U.forceKeepAttr){if(!U.keepAttr){ur(Rt,w);continue}if(!Tl&&zt(o0,Kt)){ur(Rt,w);continue}if(Ze&&(Kt=lo(Kt)),!Nl(pt,ue,Kt)){ur(Rt,w);continue}Kt=fy(pt,ue,Mt,Kt),Kt!==Zs&&py(w,Rt,Mt,Kt)}}Re(G.afterSanitizeAttributes,w,null)},co=function(w){let E=null;const U=Pl(w);for(Re(G.beforeSanitizeShadowDOM,w,null);E=U.nextNode();)if(Re(G.uponSanitizeShadowNode,E,null),Rl(E),Wl(E),Pr(E.content)&&co(E.content),(T?T(E):E.nodeType)===_e.element){const pt=b(E);Pr(pt)&&(Vs(pt),co(pt))}Re(G.afterSanitizeShadowDOM,w,null)},Vs=function(w){const E=[{node:w,shadow:null}];for(;E.length>0;){const U=E.pop();if(U.shadow){co(U.shadow);continue}const J=U.node,yt=(T?T(J):J.nodeType)===_e.element,Rt=y(J);if(Rt)for(let Mt=Rt.length-1;Mt>=0;--Mt)E.push({node:Rt[Mt],shadow:null});if(yt){const Mt=S?S(J):null;if(typeof Mt=="string"&&Ft(Mt)==="template"){const le=J.content;Pr(le)&&E.push({node:le,shadow:null})}}if(yt){const Mt=b(J);Pr(Mt)&&E.push({node:null,shadow:Mt},{node:Mt,shadow:null})}}};return t.sanitize=function(j){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,U=null,J=null,pt=null;if(Hs=!j,Hs&&(j="<!-->"),typeof j!="string"&&!di(j)&&(j=Hy(j),typeof j!="string"))throw fr("dirty is not a string, aborting");if(!t.isSupported)return j;Is?(ut=Ds,Tt=Ps):Gs(w),(G.uponSanitizeElement.length>0||G.uponSanitizeAttribute.length>0)&&(ut=Qt(ut)),G.uponSanitizeAttribute.length>0&&(Tt=Qt(Tt)),t.removed=[];const yt=qs&&typeof j!="string"&&di(j);if(yt){const le=S?S(j):j.nodeName;if(typeof le=="string"){const ue=Ft(le);if(!ut[ue]||li[ue])throw fr("root node is forbidden and cannot be sanitized in-place")}if(ho(j))throw fr("root node is clobbered and cannot be sanitized in-place");try{Vs(j)}catch(ue){throw Il(j),ue}}else if(di(j))E=Dl("<!---->"),U=E.ownerDocument.importNode(j,!0),U.nodeType===_e.element&&U.nodeName==="BODY"||U.nodeName==="HTML"?E=U:E.appendChild(U),Vs(U);else{if(!$r&&!Ze&&!dr&&j.indexOf("<")===-1)return _&&so?z(j):j;if(E=Dl(j),!E)return $r?null:so?L:""}E&&Rs&&Ke(E.firstChild);const Rt=Pl(yt?j:E);try{for(;J=Rt.nextNode();)Rl(J),Wl(J),Pr(J.content)&&co(J.content)}catch(le){throw yt&&Il(j),le}if(yt)return ui(t.removed,le=>{le.element&&hy(le.element)}),Ze&&Xs(j),j;if($r){if(Ze&&Xs(E),oo)for(pt=M.call(E.ownerDocument);E.firstChild;)pt.appendChild(E.firstChild);else pt=E;return(Tt.shadowroot||Tt.shadowrootmode)&&(pt=Y.call(i,pt,!0)),pt}let Mt=dr?E.outerHTML:E.innerHTML;return dr&&ut["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&zt(t0,E.ownerDocument.doctype.name)&&(Mt="<!DOCTYPE "+E.ownerDocument.doctype.name+`> `+Mt),Ze&&(Mt=lo(Mt)),_&&so?z(Mt):Mt},t.setConfig=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Gs(j),Is=!0,Ds=ut,Ps=Tt},t.clearConfig=function(){Dr=null,Is=!1,Ds=null,Ps=null,_=v,L=""},t.isValidAttribute=function(j,w,E){Dr||Gs({});const U=Ft(j),J=Ft(w);return Nl(U,J,E)},t.addHook=function(j,w){typeof w=="function"&&Nt(G,j)&&Rr(G[j],w)},t.removeHook=function(j,w){if(Nt(G,j)){if(w!==void 0){const E=Dy(G[j],w);return E===-1?void 0:Py(G[j],E,1)[0]}return Ul(G[j])}},t.removeHooks=function(j){Nt(G,j)&&(G[j]=[])},t.removeAllHooks=function(){G=rh()},t}var Kr=Ac(),xa=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(s=>xa(e,s,o)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(s=>{e.includes(s)||e.push(s)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&t[s]!==null&&(e[s]===void 0||typeof e[s]=="object")?(e[s]===void 0&&(e[s]=Array.isArray(t[s])?[]:{}),e[s]=xa(e[s],t[s],{depth:r-1,clobber:i})):(i||typeof e[s]!="object"&&typeof t[s]!="object")&&(e[s]=t[s])}),e)},"assignWithDepth"),Dt=xa,$e="#ffffff",Oe="#f2f2f2",st=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),n0=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||I(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||I(this.mainBkg,10)):(this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},l0=p(e=>{const t=new n0;return t.calculate(e),t},"getThemeVariables"),h0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=I("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=I(this.sectionBkgColor,10),this.taskBorderColor=or(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=or(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||O(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||I(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=O(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=O(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=O(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=B(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||B(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||O(this["cScale"+e],10);for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??O(this["cScale"+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=O(this.secondaryColor,20),this.git1=O(this.pie2||this.secondaryColor,20),this.git2=O(this.pie3||this.tertiaryColor,20),this.git3=O(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=O(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=O(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=O(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=O(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||O("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||O("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||O("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||O("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||O(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||O(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||O(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||O(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},c0=p(e=>{const t=new h0;return t.calculate(e),t},"getThemeVariables"),d0=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=or(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||I(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||I(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=I(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||x(this["cScale"+e],{h:180});for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{h:30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||B(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||B(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||O(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||O(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||I(B(this.git0),25),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(Object.keys(this).forEach(r=>{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},u0=p(e=>{const t=new d0;return t.calculate(e),t},"getThemeVariables"),f0=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=O("#cde498",10),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.primaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=I(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||I(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||I(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=I(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||x(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||O(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||B(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||B(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},p0=p(e=>{const t=new f0;return t.calculate(e),t},"getThemeVariables"),g0=class{static{p(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=O(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||O(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=O(this.contrast,55),this.border2=this.contrast,this.actorBorder=O(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||B(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||O(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||I(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||x(this.mainBkg,{l:-(5+e*5)}),this["surfacePeer"+e]=this["surfacePeer"+e]||x(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=O(this.contrast,30),this.sectionBkgColor2=O(this.contrast,30),this.taskBorderColor=I(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=O(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=I(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let e=0;e<8;e++)this["venn"+(e+1)]=this["venn"+(e+1)]??this["cScale"+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=I(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},m0=p(e=>{const t=new g0;return t.calculate(e),t},"getThemeVariables"),y0=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||x(e,{h:30}),this.cScale4=this.cScale4||x(e,{h:60}),this.cScale5=this.cScale5||x(e,{h:90}),this.cScale6=this.cScale6||x(e,{h:120}),this.cScale7=this.cScale7||x(e,{h:150}),this.cScale8=this.cScale8||x(e,{h:210,l:150}),this.cScale9=this.cScale9||x(e,{h:270}),this.cScale10=this.cScale10||x(e,{h:300}),this.cScale11=this.cScale11||x(e,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||B(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||I(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||x(e,{h:64}),this.fillType3=this.fillType3||x(t,{h:64}),this.fillType4=this.fillType4||x(e,{h:-64}),this.fillType5=this.fillType5||x(t,{h:-64}),this.fillType6=this.fillType6||x(e,{h:128}),this.fillType7=this.fillType7||x(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||x(e,{l:-10}),this.pie5=this.pie5||x(t,{l:-10}),this.pie6=this.pie6||x(r,{l:-10}),this.pie7=this.pie7||x(e,{h:60,l:-10}),this.pie8=this.pie8||x(e,{h:-60,l:-10}),this.pie9=this.pie9||x(e,{h:120,l:0}),this.pie10=this.pie10||x(e,{h:60,l:-20}),this.pie11=this.pie11||x(e,{h:-60,l:-20}),this.pie12=this.pie12||x(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||x(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||x(e,{h:-30}),this.git4=this.git4||x(e,{h:-60}),this.git5=this.git5||x(e,{h:-90}),this.git6=this.git6||x(e,{h:60}),this.git7=this.git7||x(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},C0=p(e=>{const t=new y0;return t.calculate(e),t},"getThemeVariables"),x0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor=B(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},b0=p(e=>{const t=new x0;return t.calculate(e),t},"getThemeVariables"),k0=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=st("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=I(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||B(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||I(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||x(e,{h:64}),this.fillType3=this.fillType3||x(t,{h:64}),this.fillType4=this.fillType4||x(e,{h:-64}),this.fillType5=this.fillType5||x(t,{h:-64}),this.fillType6=this.fillType6||x(e,{h:128}),this.fillType7=this.fillType7||x(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||x(e,{l:-10}),this.pie5=this.pie5||x(t,{l:-10}),this.pie6=this.pie6||x(r,{l:-10}),this.pie7=this.pie7||x(e,{h:60,l:-10}),this.pie8=this.pie8||x(e,{h:-60,l:-10}),this.pie9=this.pie9||x(e,{h:120,l:0}),this.pie10=this.pie10||x(e,{h:60,l:-20}),this.pie11=this.pie11||x(e,{h:-60,l:-20}),this.pie12=this.pie12||x(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||x(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||x(e,{h:-30}),this.git4=this.git4||x(e,{h:-60}),this.git5=this.git5||x(e,{h:-90}),this.git6=this.git6||x(e,{h:60}),this.git7=this.git7||x(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},w0=p(e=>{const t=new k0;return t.calculate(e),t},"getThemeVariables"),T0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor=B(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=I(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},S0=p(e=>{const t=new T0;return t.calculate(e),t},"getThemeVariables"),_0=class{static{p(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=st(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",t="#E9E9F1",r=x(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||O(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||B(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||O(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||I(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||x(this.mainBkg,{h:180,s:-15,l:i*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||x(e,{h:64}),this.fillType3=this.fillType3||x(t,{h:64}),this.fillType4=this.fillType4||x(e,{h:-64}),this.fillType5=this.fillType5||x(t,{h:-64}),this.fillType6=this.fillType6||x(e,{h:128}),this.fillType7=this.fillType7||x(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||r,this.pie4=this.pie4||x(e,{l:-10}),this.pie5=this.pie5||x(t,{l:-10}),this.pie6=this.pie6||x(r,{l:-10}),this.pie7=this.pie7||x(e,{h:60,l:-10}),this.pie8=this.pie8||x(e,{h:-60,l:-10}),this.pie9=this.pie9||x(e,{h:120,l:0}),this.pie10=this.pie10||x(e,{h:60,l:-20}),this.pie11=this.pie11||x(e,{h:-60,l:-20}),this.pie12=this.pie12||x(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||x(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||r,this.git3=this.git3||x(e,{h:-30}),this.git4=this.git4||x(e,{h:-60}),this.git5=this.git5||x(e,{h:-90}),this.git6=this.git6||x(e,{h:60}),this.git7=this.git7||x(e,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},B0=p(e=>{const t=new _0;return t.calculate(e),t},"getThemeVariables"),v0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=O(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=st(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=O(B("#323D47"),10),this.border1="#ccc",this.border2=or(255,255,255,.25),this.arrowheadColor=B(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||st(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||st(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||st(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||st(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||I(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||O(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||B(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||O(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||I(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=I(this["cScale"+t],75);const e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this["surfacePeer"+t]=this["surfacePeer"+t]||x(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ke(this.quadrant1Fill)?O(this.quadrant1Fill):I(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?I(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=O(this.git0,25),this.git1=O(this.git1,25),this.git2=O(this.git2,25),this.git3=O(this.git3,25),this.git4=O(this.git4,25),this.git5=O(this.git5,25),this.git6=O(this.git6,25),this.git7=O(this.git7,25)):(this.git0=I(this.git0,25),this.git1=I(this.git1,25),this.git2=I(this.git2,25),this.git3=I(this.git3,25),this.git4=I(this.git4,25),this.git5=I(this.git5,25),this.git6=I(this.git6,25),this.git7=I(this.git7,25)),this.gitInv0=this.gitInv0||B(this.git0),this.gitInv1=this.gitInv1||B(this.git1),this.gitInv2=this.gitInv2||B(this.git2),this.gitInv3=this.gitInv3||B(this.git3),this.gitInv4=this.gitInv4||B(this.git4),this.gitInv5=this.gitInv5||B(this.git5),this.gitInv6=this.gitInv6||B(this.git6),this.gitInv7=this.gitInv7||B(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$e,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Oe}calculate(e){if(typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},L0=p(e=>{const t=new v0;return t.calculate(e),t},"getThemeVariables"),He={base:{getThemeVariables:l0},dark:{getThemeVariables:c0},default:{getThemeVariables:u0},forest:{getThemeVariables:p0},neutral:{getThemeVariables:m0},neo:{getThemeVariables:C0},"neo-dark":{getThemeVariables:b0},redux:{getThemeVariables:w0},"redux-dark":{getThemeVariables:S0},"redux-color":{getThemeVariables:B0},"redux-dark-color":{getThemeVariables:L0}},Wt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Ec={...Wt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:He.default.getThemeVariables(),sequence:{...Wt.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Wt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Wt.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Wt.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Wt.pie,useWidth:984},xyChart:{...Wt.xyChart,useWidth:void 0},requirement:{...Wt.requirement,useWidth:void 0},packet:{...Wt.packet},eventmodeling:{...Wt.eventmodeling},treeView:{...Wt.treeView,useWidth:void 0},radar:{...Wt.radar},railroad:{...Wt.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Wt.ishikawa},sankey:{...Wt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Wt.venn},cynefin:{...Wt.cynefin}},Mc=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Mc(e[i],"")]:[...r,t+i],[]),"keyify"),F0=new Set(Mc(Ec,"")),$c=Ec,A0={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},E0=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(q.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Ro=p(e=>{if(q.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ro(t));return}for(const t of Object.keys(e)){if(q.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!F0.has(t)||e[t]==null){q.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=A0[t];i?E0(e[t],i):(q.debug("sanitizing object",t),Ro(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(q.debug("sanitizing css option",t),e[t]=Oc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}q.debug("After sanitization",e)}},"sanitizeDirective"),Oc=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Qr=Object.freeze($c),Ie=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ie=Dt({},Qr),No,Tr=[],Mi=Dt({},Qr),ms=p((e,t)=>{let r=Dt({},e),i={};for(const o of t)Pc(o),i=Dt(i,o);if(r=Dt(r,i),i.theme&&i.theme in He){const o=Dt({},No),s=Dt(o.themeVariables||{},i.themeVariables);r.theme&&r.theme in He&&(r.themeVariables=He[r.theme].getThemeVariables(s))}return Mi=r,Nc(Mi),Mi},"updateCurrentConfig"),M0=p(e=>(ie=Dt({},Qr),ie=Dt(ie,e),e.theme&&He[e.theme]&&(ie.themeVariables=He[e.theme].getThemeVariables(e.themeVariables)),ms(ie,Tr),ie),"setSiteConfig"),$0=p(e=>{No=Dt({},e)},"saveConfigFromInitialize"),O0=p(e=>(ie=Dt(ie,e),ms(ie,Tr),ie),"updateSiteConfig"),Ic=p(()=>Dt({},ie),"getSiteConfig"),Dc=p(e=>(Nc(e),Dt(Mi,e),vt()),"setConfig"),vt=p(()=>Dt({},Mi),"getConfig"),Pc=p(e=>{e&&(["secure",...ie.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(q.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Pc(e[t])}))},"sanitize"),I0=p(e=>{Ro(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Tr.push(e),ms(ie,Tr)},"addDirective"),qo=p((e=ie)=>{Tr=[],ms(e,Tr)},"reset"),D0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},ih={},Rc=p(e=>{ih[e]||(q.warn(D0[e]),ih[e]=!0)},"issueWarning"),Nc=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Rc("LAZY_LOAD_DEPRECATED")},"checkConfig"),kL=p(()=>{let e={};No&&(e=Dt(e,No));for(const t of Tr)e=Dt(e,t);return e},"getUserDefinedConfig"),ee=p(e=>(e.flowchart?.htmlLabels!=null&&Rc("FLOWCHART_HTML_LABELS_DEPRECATED"),Ie(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),qc=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,$i=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,P0=/\s*%%.*\n/gm,Wc=class extends Error{static{p(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},Sr={},xn=p(function(e,t){e=e.replace(qc,"").replace($i,"").replace(P0,` `);for(const[r,{detector:i}]of Object.entries(Sr))if(i(e,t))return r;throw new Wc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ba=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)zc(t,r,i)},"registerLazyLoadedDiagrams"),zc=p((e,t,r)=>{Sr[e]&&q.warn(`Detector with key ${e} already exists. Overwriting.`),Sr[e]={detector:t,loader:r},q.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),R0=p(e=>Sr[e].loader,"getDiagramLoader"),Vi=/<br\s*\/?>/gi,N0=p(e=>e?Uc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),q0=(()=>{let e=!1;return()=>{e||(Hc(),e=!0)}})();function Hc(){const e="data-temp-href-target";Kr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Kr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Hc,"setupDompurifyHooks");var Yc=p(e=>(q0(),Kr.sanitize(e)),"removeScript"),oh=p((e,t)=>{if(ee(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Yc(e):r!=="loose"&&(e=Uc(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=Y0(e))}return e},"sanitizeMore"),be=p((e,t)=>e&&(t.dompurifyConfig?e=Kr.sanitize(oh(e,t),t.dompurifyConfig).toString():e=Kr.sanitize(oh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),W0=p((e,t)=>typeof e=="string"?be(e,t):e.flat().map(r=>be(r,t)),"sanitizeTextOrArray"),z0=p(e=>Vi.test(e),"hasBreaks"),H0=p(e=>e.split(Vi),"splitBreaks"),Y0=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Uc=p(e=>e.replace(Vi,"#br#"),"breakToPlaceholder"),U0=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),j0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),G0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),sh=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let o=t[i];if(o===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];X0(s,a)&&(o=s+","+a,i++,r.pop())}r.push(V0(o))}return r.join("")},"parseGenericTypes"),ka=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),X0=p((e,t)=>{const r=ka(e,"~"),i=ka(t,"~");return r===1&&i===1},"shouldCombineSets"),V0=p(e=>{const t=ka(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let o=i.indexOf("~"),s=i.lastIndexOf("~");for(;o!==-1&&s!==-1&&o!==s;)i[o]="<",i[s]=">",o=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),ah=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),wa=/\$\$(.*?)\$\$/g,Pi=p(e=>(e.match(wa)?.length??0)>0,"hasKatex"),wL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await jc(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Z0=p(async(e,t)=>{if(!Pi(e))return e;if(!(ah()||t.legacyMathML||t.forceLegacyMathML))return e.replace(wa,"MathML is unsupported in this environment.");{const{default:r}=await nt(async()=>{const{default:o}=await import("./katex-HP8lGamR.js");return{default:o}},[]),i=t.forceLegacyMathML||!ah()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Vi).map(o=>Pi(o)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${o}</div>`:`<div>${o}</div>`).join("").replace(wa,(o,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),jc=p(async(e,t)=>be(await Z0(e,t),t),"renderKatexSanitized"),Zi={getRows:N0,sanitizeText:be,sanitizeTextOrArray:W0,hasBreaks:z0,splitBreaks:H0,lineBreakRegex:Vi,removeScript:Yc,getUrl:U0,evaluate:Ie,getMax:j0,getMin:G0},K0=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Q0=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Gc=p(function(e,t,r,i){const o=Q0(t,r,i);K0(e,o)},"configureSvgSize"),J0=p(function(e,t,r,i){const o=t.node().getBBox(),s=o.width,a=o.height;q.info(`SVG bounds: ${s}x${a}`,o);let n=0,l=0;q.info(`Graph bounds: ${n}x${l}`,e),n=s+r*2,l=a+r*2,q.info(`Calculated bounds: ${n}x${l}`),Gc(t,l,n,i);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Bo={};function Ta(e){return[...e.cssRules].map(t=>t.cssText).join(` @@ -300,8 +300,8 @@ Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error L0,20`)},"requirement_arrow"),LS=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 L20,10 M20,10 - L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),FS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),AS=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),ES={extension:hS,composition:cS,aggregation:dS,dependency:uS,lollipop:fS,point:pS,circle:gS,cross:mS,barb:yS,barbNeo:CS,only_one:xS,zero_or_one:bS,one_or_more:kS,zero_or_more:wS,only_one_neo:TS,zero_or_one_neo:SS,one_or_more_neo:_S,zero_or_more_neo:BS,requirement_arrow:vS,requirement_contains:FS,requirement_arrow_neo:LS,requirement_contains_neo:AS},MS=lS,$S={common:Zi,getConfig:vt,insertCluster:LT,insertEdge:nS,insertEdgeLabel:tS,insertMarkers:MS,insertNode:Hg,interpolateToCurve:Vn,labelHelper:it,log:q,positionEdgeLabel:eS},Gi={},Gg=p(e=>{for(const t of e)Gi[t.name]=t},"registerLayoutLoaders"),OS=p(()=>{Gg([{name:"dagre",loader:p(async()=>await nt(()=>import("./dagre-VKFMJZFB-BCr0U4UL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"swimlane",loader:p(async()=>await nt(()=>import("./swimlanes-5IMT3BWC-BaZl8tge.js"),__vite__mapDeps([8,5,6,1,2,3,7])),"loader")},{name:"cose-bilkent",loader:p(async()=>await nt(()=>import("./cose-bilkent-JH36ORCC-Bvd7lU_r.js"),__vite__mapDeps([9,10,7,5,6])),"loader")}])},"registerDefaultLayoutLoaders");OS();var GL=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in Gi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}const i=Gi[e.layoutAlgorithm],o=await i.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),n){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return o.render(e,t,$S,{algorithm:i.algorithm},r)},"render"),XL=p((e="",{fallback:t="dagre"}={})=>{if(e in Gi)return e;if(t in Gi)return q.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),ml="comm",Xg="rule",Vg="decl",IS="@media",DS="@import",PS="@supports",RS="@namespace",un="@keyframes",Zg="@layer",NS="@scope",qS=Math.abs,Di=String.fromCharCode;function Kg(e){return e.trim()}function fn(e,t,r){return e.replace(t,r)}function Zr(e,t){return e.charCodeAt(t)|0}function ii(e,t,r){return e.slice(t,r)}function Fe(e){return e.length}function Qg(e){return e.length}function To(e,t){return t.push(e),e}var Es=1,oi=1,Jg=0,ce=0,$t=0,ni="";function yl(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:Es,column:oi,length:a,return:"",siblings:n}}function WS(){return $t}function zS(){return $t=ce>0?Zr(ni,--ce):0,oi--,$t===10&&(oi=1,Es--),$t}function xe(){return $t=ce<Jg?Zr(ni,ce++):0,oi++,$t===10&&(oi=1,Es++),$t}function ir(){return Zr(ni,ce)}function Do(){return ce}function Ms(e,t){return ii(ni,e,t)}function Xi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function HS(e){return Es=oi=1,Jg=Fe(ni=e),ce=0,[]}function YS(e){return ni="",e}function ga(e){return Kg(Ms(ce-1,pn(e===91?e+2:e===40?e+1:e)))}function US(e){for(;($t=ir())&&$t<33;)xe();return Xi(e)>2||Xi($t)>3?"":" "}function jS(e,t){for(;--t&&xe()&&!($t<48||$t>102||$t>57&&$t<65||$t>70&&$t<97););return Ms(e,Do()+(t<6&&ir()==32&&xe()==32))}function pn(e){for(;xe();)switch($t){case e:return ce;case 34:case 39:e!==34&&e!==39&&pn($t);break;case 40:e===41&&pn(e);break;case 92:xe();break}return ce}function GS(e,t){for(;xe()&&e+$t!==57;)if(e+$t===84&&ir()===47)break;return"/*"+Ms(t,ce-1)+"*"+Di(e===47?e:xe())}function XS(e){for(;!Xi(ir());)xe();return Ms(e,ce)}function VS(e){return YS(Po("",null,null,null,[""],e=HS(e),0,[0],e))}function Po(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,g=0,m=1,y=1,C=1,b=0,k=0,T="",S=o,_=s,L=i,v=T;y;)switch(g=k,k=xe()){case 40:g!=108&&Zr(v,d-1)==58?(b++,v+="("):v+=ga(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=ga(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Di(k);break}v+=US(g);break;case 92:v+=jS(Do()-1,7);continue;case 47:switch(ir()){case 42:case 47:To(ZS(GS(xe(),Do()),t,r,l),l),(Xi(g||1)==5||Xi(ir()||1)==5)&&Fe(v)&&ii(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:n[c++]=Fe(v)*C;case 125*m:case 59:case 0:if(b>0&&k){v+=Di(k);break}switch(k){case 0:case 125:y=0;case 59+h:C==-1&&(v=fn(v,/\f/g,"")),u>0&&(Fe(v)-d||m===0)&&To(u>32?bc(v+";",i,r,d-1,l):bc(fn(v," ","")+";",i,r,d-2,l),l);break;case 59:v+=";";default:if(To(L=xc(v,t,r,c,h,o,n,T,S=[],_=[],d,s),s),k===123)if(h===0)Po(v,t,L,L,S,s,d,n,_);else{switch(f){case 99:if(Zr(v,3)===110)break;case 108:if(Zr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Po(e,L,L,i&&To(xc(e,L,L,0,0,o,n,T,o,S=[],d,_),_),o,_,d,n,i?S:_):Po(v,L,L,L,[""],_,0,n,_)}}c=h=u=0,m=C=1,T=v="",d=a;break;case 58:d=1+Fe(v),u=g;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&zS()==125)continue}switch(v+=Di(k),k*m){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Fe(v)-1)*C,C=1;break;case 64:ir()===45&&(v+=ga(xe())),f=ir(),h=d=Fe(T=v+=XS(Do())),k++;break;case 45:g===45&&Fe(v)==2&&(m=0)}}return s}function xc(e,t,r,i,o,s,a,n,l,c,h,d){for(var f=o-1,u=o===0?s:[""],g=Qg(u),m=0,y=0,C=0;m<i;++m)for(var b=0,k=ii(e,f+1,f=qS(y=a[m])),T=e;b<g;++b)(T=Kg(y>0?u[b]+" "+k:fn(k,/&\f/g,u[b])))&&(l[C++]=T);return yl(e,t,r,o===0?Xg:n,l,c,h,d)}function ZS(e,t,r,i){return yl(e,t,r,ml,Di(WS()),ii(e,2,-2),0,i)}function bc(e,t,r,i,o){return yl(e,t,r,Vg,ii(e,0,i),ii(e,i+1,-1),i,o)}function gn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function KS(e,t,r,i){switch(e.type){case Zg:if(e.children.length)break;case DS:case RS:case Vg:return e.return=e.return||e.value;case ml:return"";case un:return e.return=e.value+"{"+gn(e.children,i)+"}";case Xg:if(!Fe(e.value=e.props.join(",")))return""}return Fe(r=gn(e.children,i))?e.return=e.value+"{"+r+"}":""}function QS(e){var t=Qg(e);return function(r,i,o,s){for(var a="",n=0;n<t;n++)a+=e[n](r,i,o,s)||"";return a}}var tm="c4",JS=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),t_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./c4Diagram-LMCZKHZV-Dus3HzI2.js");return{diagram:t}},__vite__mapDeps([11,12,5,6,7]));return{id:tm,diagram:e}},"loader"),e_={id:tm,detector:JS,loader:t_},r_=e_,em="flowchart",i_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),o_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-CBIszsQp.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:em,diagram:e}},"loader"),s_={id:em,detector:i_,loader:o_},a_=s_,rm="flowchart-v2",n_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),l_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-CBIszsQp.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:rm,diagram:e}},"loader"),h_={id:rm,detector:n_,loader:l_},c_=h_,im="swimlane",d_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),u_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-G3AALYLV-WxMWFajS.js");return{diagram:t}},__vite__mapDeps([18,13,14,15,16,12,17,5,6,7]));return{id:im,diagram:e}},"loader"),f_={id:im,detector:d_,loader:u_},p_=f_,om="er",g_=p(e=>/^\s*erDiagram/.test(e),"detector"),m_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./erDiagram-Q63AITRT-CnsIdx2o.js");return{diagram:t}},__vite__mapDeps([19,15,16,17,5,6,7]));return{id:om,diagram:e}},"loader"),y_={id:om,detector:g_,loader:m_},C_=y_,sm="gitGraph",x_=p(e=>/^\s*gitGraph/.test(e),"detector"),b_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-IHSO6WYX-BH8WCC4D.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,5,6,7]));return{id:sm,diagram:e}},"loader"),k_={id:sm,detector:x_,loader:b_},w_=k_,am="gantt",T_=p(e=>/^\s*gantt/.test(e),"detector"),S_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ganttDiagram-NO4QXBWP-Bp3UvmyY.js");return{diagram:t}},__vite__mapDeps([24,7,25,26,27,5,6]));return{id:am,diagram:e}},"loader"),__={id:am,detector:T_,loader:S_},B_=__,nm="info",v_=p(e=>/^\s*info/.test(e),"detector"),L_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./infoDiagram-FWYZ7A6U-CqPgDY2n.js");return{diagram:t}},__vite__mapDeps([28,23,5,6,7]));return{id:nm,diagram:e}},"loader"),F_={id:nm,detector:v_,loader:L_},lm="pie",A_=p(e=>/^\s*pie/.test(e),"detector"),E_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./pieDiagram-ENE6RG2P-CJ6o_adA.js");return{diagram:t}},__vite__mapDeps([29,22,23,5,6,30,31,26,7]));return{id:lm,diagram:e}},"loader"),M_={id:lm,detector:A_,loader:E_},hm="quadrantChart",$_=p(e=>/^\s*quadrantChart/.test(e),"detector"),O_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./quadrantDiagram-ABIIQ3AL-BBv6VFSq.js");return{diagram:t}},__vite__mapDeps([32,25,26,27,5,6,7]));return{id:hm,diagram:e}},"loader"),I_={id:hm,detector:$_,loader:O_},D_=I_,cm="xychart",P_=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),R_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./xychartDiagram-FW5EYKEG-BJN2UZpr.js");return{diagram:t}},__vite__mapDeps([33,26,31,25,27,5,6,7]));return{id:cm,diagram:e}},"loader"),N_={id:cm,detector:P_,loader:R_},q_=N_,dm="requirement",W_=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),z_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./requirementDiagram-TGXJPOKE-CGyvAsFO.js");return{diagram:t}},__vite__mapDeps([34,15,16,5,6,7]));return{id:dm,diagram:e}},"loader"),H_={id:dm,detector:W_,loader:z_},Y_=H_,um="sequence",U_=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),j_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js");return{diagram:t}},__vite__mapDeps([35,21,12,5,6,7]));return{id:um,diagram:e}},"loader"),G_={id:um,detector:U_,loader:j_},X_=G_,fm="class",V_=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Z_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./classDiagram-OUVF2IWQ-BeJtrUxZ.js");return{diagram:t}},__vite__mapDeps([36,37,14,15,16,12,5,6,7]));return{id:fm,diagram:e}},"loader"),K_={id:fm,detector:V_,loader:Z_},Q_=K_,pm="classDiagram",J_=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),tB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./classDiagram-v2-EOCWNBFH-BeJtrUxZ.js");return{diagram:t}},__vite__mapDeps([38,37,14,15,16,12,5,6,7]));return{id:pm,diagram:e}},"loader"),eB={id:pm,detector:J_,loader:tB},rB=eB,gm="state",iB=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),oB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./stateDiagram-2N3HPSRC-DxGZaCFf.js");return{diagram:t}},__vite__mapDeps([39,40,15,16,12,2,4,3,5,6,7]));return{id:gm,diagram:e}},"loader"),sB={id:gm,detector:iB,loader:oB},aB=sB,mm="stateDiagram",nB=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),lB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-6OUMAXLB-BudL4GKN.js");return{diagram:t}},__vite__mapDeps([41,40,15,16,12,5,6,7]));return{id:mm,diagram:e}},"loader"),hB={id:mm,detector:nB,loader:lB},cB=hB,ym="journey",dB=p(e=>/^\s*journey/.test(e),"detector"),uB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./journeyDiagram-5HDEW3XC-M5m-6IMM.js");return{diagram:t}},__vite__mapDeps([42,14,12,30,5,6,7]));return{id:ym,diagram:e}},"loader"),fB={id:ym,detector:dB,loader:uB},pB=fB,gB=p((e,t,r)=>{q.debug(`rendering svg for syntax error -`);const i=Yk(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Gc(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Cm={draw:gB},mB=Cm,yB={db:{},renderer:Cm,parser:{parse:p(()=>{},"parse")}},CB=yB,xm="flowchart-elk",xB=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),bB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-CBIszsQp.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:xm,diagram:e}},"loader"),kB={id:xm,detector:xB,loader:bB},wB=kB,bm="timeline",TB=p(e=>/^\s*timeline/.test(e),"detector"),SB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6-zMligh5P.js");return{diagram:t}},__vite__mapDeps([43,30,5,6,7]));return{id:bm,diagram:e}},"loader"),_B={id:bm,detector:TB,loader:SB},BB=_B,km="mindmap",vB=p(e=>/^\s*mindmap/.test(e),"detector"),LB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C-G8LQJrFP.js");return{diagram:t}},__vite__mapDeps([44,15,16,5,6,7]));return{id:km,diagram:e}},"loader"),FB={id:km,detector:vB,loader:LB},AB=FB,wm="kanban",EB=p(e=>/^\s*kanban/.test(e),"detector"),MB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6-RlJqNQKm.js");return{diagram:t}},__vite__mapDeps([45,14,5,6,7]));return{id:wm,diagram:e}},"loader"),$B={id:wm,detector:EB,loader:MB},OB=$B,Tm="sankey",IB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),DB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB-CYJzk73F.js");return{diagram:t}},__vite__mapDeps([46,31,26,5,6,7]));return{id:Tm,diagram:e}},"loader"),PB={id:Tm,detector:IB,loader:DB},RB=PB,Sm="packet",NB=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),qB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH-CZRzvszj.js");return{diagram:t}},__vite__mapDeps([47,22,23,5,6,7]));return{id:Sm,diagram:e}},"loader"),WB={id:Sm,detector:NB,loader:qB},_m="radar",zB=p(e=>/^\s*radar-beta/.test(e),"detector"),HB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-WEI45ONY-BhWQTWhi.js");return{diagram:t}},__vite__mapDeps([48,22,23,5,6,7]));return{id:_m,diagram:e}},"loader"),YB={id:_m,detector:zB,loader:HB},Bm="block",UB=p(e=>/^\s*block(-beta)?/.test(e),"detector"),jB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./blockDiagram-677ZJIJ3-Cp3c1EWu.js");return{diagram:t}},__vite__mapDeps([49,14,2,17,5,6,7]));return{id:Bm,diagram:e}},"loader"),GB={id:Bm,detector:UB,loader:jB},XB=GB,vm="treeView",VB=p(e=>/^\s*treeView-beta/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-OA4YK3LP-B2qPmny7.js");return{diagram:t}},__vite__mapDeps([50,21,22,23,5,6,7]));return{id:vm,diagram:e}},"loader"),KB={id:vm,detector:VB,loader:ZB},QB=KB,Lm="architecture",JB=p(e=>/^\s*architecture/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./architectureDiagram-ZJ3FMSHR-pdH2rk7i.js");return{diagram:t}},__vite__mapDeps([51,22,23,5,6,10,7]));return{id:Lm,diagram:e}},"loader"),ev={id:Lm,detector:JB,loader:tv},rv=ev,Fm="eventmodeling",iv=p(e=>/^\s*eventmodeling/.test(e),"detector"),ov=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-FQU43EPY-DPlhFZdP.js");return{diagram:t}},__vite__mapDeps([52,22,23,5,6,7]));return{id:Fm,diagram:e}},"loader"),sv={id:Fm,detector:iv,loader:ov},av=sv,Am="ishikawa",nv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),lv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-FXEZZL3T-BrPR76fO.js");return{diagram:t}},__vite__mapDeps([53,5,6,7]));return{id:Am,diagram:e}},"loader"),hv={id:Am,detector:nv,loader:lv},Em="venn",cv=p(e=>/^\s*venn-beta/.test(e),"detector"),dv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./vennDiagram-L72KCM5P-KpUZjKlm.js");return{diagram:t}},__vite__mapDeps([54,5,6,7]));return{id:Em,diagram:e}},"loader"),uv={id:Em,detector:cv,loader:dv},fv=uv,Mm="treemap",pv=p(e=>/^\s*treemap/.test(e),"detector"),gv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-G47NLZAW-D-tFNEyZ.js");return{diagram:t}},__vite__mapDeps([55,22,16,23,5,6,27,31,26,7]));return{id:Mm,diagram:e}},"loader"),mv={id:Mm,detector:pv,loader:gv},$m="wardley",yv=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./wardleyDiagram-EHGQE667-9gU-F74d.js");return{diagram:t}},__vite__mapDeps([56,22,23,5,6,7]));return{id:$m,diagram:e}},"loader"),xv={id:$m,detector:yv,loader:Cv},bv=xv,Om="cynefin",kv=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),wv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./cynefinDiagram-TSTJHNR4-cH6p2fBn.js");return{diagram:t}},__vite__mapDeps([57,22,23,5,6,7]));return{id:Om,diagram:e}},"loader"),Tv={id:Om,detector:kv,loader:wv},Im="railroad",Sv=p(e=>/^\s*railroad-beta/i.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./railroadDiagram-RFXS5EU6-7QSjLg66.js");return{diagram:t}},__vite__mapDeps([58,59,22,23,5,6,7]));return{id:Im,diagram:e}},"loader"),Bv={id:Im,detector:Sv,loader:_v},Dm="railroadEbnf",vv=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Lv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ebnfDiagram-CCIWWBDH-C7ceb06g.js");return{diagram:t}},__vite__mapDeps([60,59,22,23,5,6,7]));return{id:Dm,diagram:e}},"loader"),Fv={id:Dm,detector:vv,loader:Lv},Pm="railroadAbnf",Av=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Ev=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./abnfDiagram-VRR7QNED-COKyJfaN.js");return{diagram:t}},__vite__mapDeps([61,59,22,23,5,6,7]));return{id:Pm,diagram:e}},"loader"),Mv={id:Pm,detector:Av,loader:Ev},Rm="railroadPeg",$v=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Ov=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./pegDiagram-2B236MQR-Bqe1YNn0.js");return{diagram:t}},__vite__mapDeps([62,59,22,23,5,6,7]));return{id:Rm,diagram:e}},"loader"),Iv={id:Rm,detector:$v,loader:Ov},kc=!1,$s=p(()=>{kc||(kc=!0,zo("error",CB,e=>e.toLowerCase().trim()==="error"),zo("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ba(wB,AB,rv),ba(r_,OB,rB,Q_,C_,B_,F_,M_,Y_,X_,p_,c_,a_,BB,w_,cB,aB,pB,D_,RB,WB,q_,XB,av,QB,YB,hv,mv,Bv,Fv,Mv,Iv,fv,bv,Tv))},"addDiagrams"),Dv=p(async()=>{q.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Sr).map(async([r,{detector:i,loader:o}])=>{if(o)try{Sa(r)}catch{try{const{diagram:s,id:a}=await o();zo(a,s,i)}catch(s){throw q.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Sr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){q.error(`Failed to load ${t.length} external diagrams`);for(const r of t)q.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Pv="graphics-document document";function Nm(e,t){e.attr("role",Pv),t!==""&&e.attr("aria-roledescription",t)}p(Nm,"setA11yDiagramInfo");function qm(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(qm,"addSVGa11yTitleDescription");var mn=class Wm{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static{p(this,"Diagram")}static async fromText(t,r={}){const i=vt(),o=xn(t,i);t=Z2(t)+` + L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),FS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),AS=p((e,t,r)=>{const i=vt(),{themeVariables:o}=i,{strokeWidth:s}=o,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),ES={extension:hS,composition:cS,aggregation:dS,dependency:uS,lollipop:fS,point:pS,circle:gS,cross:mS,barb:yS,barbNeo:CS,only_one:xS,zero_or_one:bS,one_or_more:kS,zero_or_more:wS,only_one_neo:TS,zero_or_one_neo:SS,one_or_more_neo:_S,zero_or_more_neo:BS,requirement_arrow:vS,requirement_contains:FS,requirement_arrow_neo:LS,requirement_contains_neo:AS},MS=lS,$S={common:Zi,getConfig:vt,insertCluster:LT,insertEdge:nS,insertEdgeLabel:tS,insertMarkers:MS,insertNode:Hg,interpolateToCurve:Vn,labelHelper:it,log:q,positionEdgeLabel:eS},Gi={},Gg=p(e=>{for(const t of e)Gi[t.name]=t},"registerLayoutLoaders"),OS=p(()=>{Gg([{name:"dagre",loader:p(async()=>await nt(()=>import("./dagre-VKFMJZFB-LDM5VIAI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"swimlane",loader:p(async()=>await nt(()=>import("./swimlanes-5IMT3BWC-CfDcaFta.js"),__vite__mapDeps([8,5,6,1,2,3,7])),"loader")},{name:"cose-bilkent",loader:p(async()=>await nt(()=>import("./cose-bilkent-JH36ORCC-Br_qiVSQ.js"),__vite__mapDeps([9,10,7,5,6])),"loader")}])},"registerDefaultLayoutLoaders");OS();var GL=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in Gi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}const i=Gi[e.layoutAlgorithm],o=await i.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s?.includes("dark")?"#FFFFFF":"#000000"}`),n){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return o.render(e,t,$S,{algorithm:i.algorithm},r)},"render"),XL=p((e="",{fallback:t="dagre"}={})=>{if(e in Gi)return e;if(t in Gi)return q.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),ml="comm",Xg="rule",Vg="decl",IS="@media",DS="@import",PS="@supports",RS="@namespace",un="@keyframes",Zg="@layer",NS="@scope",qS=Math.abs,Di=String.fromCharCode;function Kg(e){return e.trim()}function fn(e,t,r){return e.replace(t,r)}function Zr(e,t){return e.charCodeAt(t)|0}function ii(e,t,r){return e.slice(t,r)}function Fe(e){return e.length}function Qg(e){return e.length}function To(e,t){return t.push(e),e}var Es=1,oi=1,Jg=0,ce=0,$t=0,ni="";function yl(e,t,r,i,o,s,a,n){return{value:e,root:t,parent:r,type:i,props:o,children:s,line:Es,column:oi,length:a,return:"",siblings:n}}function WS(){return $t}function zS(){return $t=ce>0?Zr(ni,--ce):0,oi--,$t===10&&(oi=1,Es--),$t}function xe(){return $t=ce<Jg?Zr(ni,ce++):0,oi++,$t===10&&(oi=1,Es++),$t}function ir(){return Zr(ni,ce)}function Do(){return ce}function Ms(e,t){return ii(ni,e,t)}function Xi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function HS(e){return Es=oi=1,Jg=Fe(ni=e),ce=0,[]}function YS(e){return ni="",e}function ga(e){return Kg(Ms(ce-1,pn(e===91?e+2:e===40?e+1:e)))}function US(e){for(;($t=ir())&&$t<33;)xe();return Xi(e)>2||Xi($t)>3?"":" "}function jS(e,t){for(;--t&&xe()&&!($t<48||$t>102||$t>57&&$t<65||$t>70&&$t<97););return Ms(e,Do()+(t<6&&ir()==32&&xe()==32))}function pn(e){for(;xe();)switch($t){case e:return ce;case 34:case 39:e!==34&&e!==39&&pn($t);break;case 40:e===41&&pn(e);break;case 92:xe();break}return ce}function GS(e,t){for(;xe()&&e+$t!==57;)if(e+$t===84&&ir()===47)break;return"/*"+Ms(t,ce-1)+"*"+Di(e===47?e:xe())}function XS(e){for(;!Xi(ir());)xe();return Ms(e,ce)}function VS(e){return YS(Po("",null,null,null,[""],e=HS(e),0,[0],e))}function Po(e,t,r,i,o,s,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,g=0,m=1,y=1,C=1,b=0,k=0,T="",S=o,_=s,L=i,v=T;y;)switch(g=k,k=xe()){case 40:g!=108&&Zr(v,d-1)==58?(b++,v+="("):v+=ga(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=ga(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Di(k);break}v+=US(g);break;case 92:v+=jS(Do()-1,7);continue;case 47:switch(ir()){case 42:case 47:To(ZS(GS(xe(),Do()),t,r,l),l),(Xi(g||1)==5||Xi(ir()||1)==5)&&Fe(v)&&ii(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*m:n[c++]=Fe(v)*C;case 125*m:case 59:case 0:if(b>0&&k){v+=Di(k);break}switch(k){case 0:case 125:y=0;case 59+h:C==-1&&(v=fn(v,/\f/g,"")),u>0&&(Fe(v)-d||m===0)&&To(u>32?bc(v+";",i,r,d-1,l):bc(fn(v," ","")+";",i,r,d-2,l),l);break;case 59:v+=";";default:if(To(L=xc(v,t,r,c,h,o,n,T,S=[],_=[],d,s),s),k===123)if(h===0)Po(v,t,L,L,S,s,d,n,_);else{switch(f){case 99:if(Zr(v,3)===110)break;case 108:if(Zr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Po(e,L,L,i&&To(xc(e,L,L,0,0,o,n,T,o,S=[],d,_),_),o,_,d,n,i?S:_):Po(v,L,L,L,[""],_,0,n,_)}}c=h=u=0,m=C=1,T=v="",d=a;break;case 58:d=1+Fe(v),u=g;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&zS()==125)continue}switch(v+=Di(k),k*m){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(b>0)break;n[c++]=(Fe(v)-1)*C,C=1;break;case 64:ir()===45&&(v+=ga(xe())),f=ir(),h=d=Fe(T=v+=XS(Do())),k++;break;case 45:g===45&&Fe(v)==2&&(m=0)}}return s}function xc(e,t,r,i,o,s,a,n,l,c,h,d){for(var f=o-1,u=o===0?s:[""],g=Qg(u),m=0,y=0,C=0;m<i;++m)for(var b=0,k=ii(e,f+1,f=qS(y=a[m])),T=e;b<g;++b)(T=Kg(y>0?u[b]+" "+k:fn(k,/&\f/g,u[b])))&&(l[C++]=T);return yl(e,t,r,o===0?Xg:n,l,c,h,d)}function ZS(e,t,r,i){return yl(e,t,r,ml,Di(WS()),ii(e,2,-2),0,i)}function bc(e,t,r,i,o){return yl(e,t,r,Vg,ii(e,0,i),ii(e,i+1,-1),i,o)}function gn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function KS(e,t,r,i){switch(e.type){case Zg:if(e.children.length)break;case DS:case RS:case Vg:return e.return=e.return||e.value;case ml:return"";case un:return e.return=e.value+"{"+gn(e.children,i)+"}";case Xg:if(!Fe(e.value=e.props.join(",")))return""}return Fe(r=gn(e.children,i))?e.return=e.value+"{"+r+"}":""}function QS(e){var t=Qg(e);return function(r,i,o,s){for(var a="",n=0;n<t;n++)a+=e[n](r,i,o,s)||"";return a}}var tm="c4",JS=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),t_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./c4Diagram-LMCZKHZV-Pb2vyZDT.js");return{diagram:t}},__vite__mapDeps([11,12,5,6,7]));return{id:tm,diagram:e}},"loader"),e_={id:tm,detector:JS,loader:t_},r_=e_,em="flowchart",i_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),o_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-CLFIXYkh.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:em,diagram:e}},"loader"),s_={id:em,detector:i_,loader:o_},a_=s_,rm="flowchart-v2",n_=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),l_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-CLFIXYkh.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:rm,diagram:e}},"loader"),h_={id:rm,detector:n_,loader:l_},c_=h_,im="swimlane",d_=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),u_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-G3AALYLV-B-ICP983.js");return{diagram:t}},__vite__mapDeps([18,13,14,15,16,12,17,5,6,7]));return{id:im,diagram:e}},"loader"),f_={id:im,detector:d_,loader:u_},p_=f_,om="er",g_=p(e=>/^\s*erDiagram/.test(e),"detector"),m_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./erDiagram-Q63AITRT-qDRc-Mjq.js");return{diagram:t}},__vite__mapDeps([19,15,16,17,5,6,7]));return{id:om,diagram:e}},"loader"),y_={id:om,detector:g_,loader:m_},C_=y_,sm="gitGraph",x_=p(e=>/^\s*gitGraph/.test(e),"detector"),b_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-IHSO6WYX-DT7ncN8L.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,5,6,7]));return{id:sm,diagram:e}},"loader"),k_={id:sm,detector:x_,loader:b_},w_=k_,am="gantt",T_=p(e=>/^\s*gantt/.test(e),"detector"),S_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ganttDiagram-NO4QXBWP-CWQOrsH8.js");return{diagram:t}},__vite__mapDeps([24,7,25,26,27,5,6]));return{id:am,diagram:e}},"loader"),__={id:am,detector:T_,loader:S_},B_=__,nm="info",v_=p(e=>/^\s*info/.test(e),"detector"),L_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./infoDiagram-FWYZ7A6U-DmW-BDHY.js");return{diagram:t}},__vite__mapDeps([28,23,5,6,7]));return{id:nm,diagram:e}},"loader"),F_={id:nm,detector:v_,loader:L_},lm="pie",A_=p(e=>/^\s*pie/.test(e),"detector"),E_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./pieDiagram-ENE6RG2P-Bma7UCRc.js");return{diagram:t}},__vite__mapDeps([29,22,23,5,6,30,31,26,7]));return{id:lm,diagram:e}},"loader"),M_={id:lm,detector:A_,loader:E_},hm="quadrantChart",$_=p(e=>/^\s*quadrantChart/.test(e),"detector"),O_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./quadrantDiagram-ABIIQ3AL-AdbtQLWr.js");return{diagram:t}},__vite__mapDeps([32,25,26,27,5,6,7]));return{id:hm,diagram:e}},"loader"),I_={id:hm,detector:$_,loader:O_},D_=I_,cm="xychart",P_=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),R_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./xychartDiagram-FW5EYKEG-D5HV8EjG.js");return{diagram:t}},__vite__mapDeps([33,26,31,25,27,5,6,7]));return{id:cm,diagram:e}},"loader"),N_={id:cm,detector:P_,loader:R_},q_=N_,dm="requirement",W_=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),z_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./requirementDiagram-TGXJPOKE-BM1jojUv.js");return{diagram:t}},__vite__mapDeps([34,15,16,5,6,7]));return{id:dm,diagram:e}},"loader"),H_={id:dm,detector:W_,loader:z_},Y_=H_,um="sequence",U_=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),j_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./sequenceDiagram-DBY2YBRQ-UDhAaHfs.js");return{diagram:t}},__vite__mapDeps([35,21,12,5,6,7]));return{id:um,diagram:e}},"loader"),G_={id:um,detector:U_,loader:j_},X_=G_,fm="class",V_=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Z_=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./classDiagram-OUVF2IWQ-C4oeFc7A.js");return{diagram:t}},__vite__mapDeps([36,37,14,15,16,12,5,6,7]));return{id:fm,diagram:e}},"loader"),K_={id:fm,detector:V_,loader:Z_},Q_=K_,pm="classDiagram",J_=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),tB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./classDiagram-v2-EOCWNBFH-C4oeFc7A.js");return{diagram:t}},__vite__mapDeps([38,37,14,15,16,12,5,6,7]));return{id:pm,diagram:e}},"loader"),eB={id:pm,detector:J_,loader:tB},rB=eB,gm="state",iB=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),oB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./stateDiagram-2N3HPSRC-C83-b98K.js");return{diagram:t}},__vite__mapDeps([39,40,15,16,12,2,4,3,5,6,7]));return{id:gm,diagram:e}},"loader"),sB={id:gm,detector:iB,loader:oB},aB=sB,mm="stateDiagram",nB=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),lB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-6OUMAXLB-DuUdJv-B.js");return{diagram:t}},__vite__mapDeps([41,40,15,16,12,5,6,7]));return{id:mm,diagram:e}},"loader"),hB={id:mm,detector:nB,loader:lB},cB=hB,ym="journey",dB=p(e=>/^\s*journey/.test(e),"detector"),uB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./journeyDiagram-5HDEW3XC-BXVdGyDj.js");return{diagram:t}},__vite__mapDeps([42,14,12,30,5,6,7]));return{id:ym,diagram:e}},"loader"),fB={id:ym,detector:dB,loader:uB},pB=fB,gB=p((e,t,r)=>{q.debug(`rendering svg for syntax error +`);const i=Yk(t),o=i.append("g");i.attr("viewBox","0 0 2412 512"),Gc(i,100,512,!0),o.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),o.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),o.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),o.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),o.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),o.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Cm={draw:gB},mB=Cm,yB={db:{},renderer:Cm,parser:{parse:p(()=>{},"parse")}},CB=yB,xm="flowchart-elk",xB=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),bB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./flowDiagram-23GEKE2U-CLFIXYkh.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,16,12,17]));return{id:xm,diagram:e}},"loader"),kB={id:xm,detector:xB,loader:bB},wB=kB,bm="timeline",TB=p(e=>/^\s*timeline/.test(e),"detector"),SB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./timeline-definition-FHXFAJF6-B-aR9mhp.js");return{diagram:t}},__vite__mapDeps([43,30,5,6,7]));return{id:bm,diagram:e}},"loader"),_B={id:bm,detector:TB,loader:SB},BB=_B,km="mindmap",vB=p(e=>/^\s*mindmap/.test(e),"detector"),LB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./mindmap-definition-LN4V7U3C-dirTUANL.js");return{diagram:t}},__vite__mapDeps([44,15,16,5,6,7]));return{id:km,diagram:e}},"loader"),FB={id:km,detector:vB,loader:LB},AB=FB,wm="kanban",EB=p(e=>/^\s*kanban/.test(e),"detector"),MB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./kanban-definition-HUTT4EX6-B6mC5age.js");return{diagram:t}},__vite__mapDeps([45,14,5,6,7]));return{id:wm,diagram:e}},"loader"),$B={id:wm,detector:EB,loader:MB},OB=$B,Tm="sankey",IB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),DB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./sankeyDiagram-HTMAVEWB-CVUG-8BS.js");return{diagram:t}},__vite__mapDeps([46,31,26,5,6,7]));return{id:Tm,diagram:e}},"loader"),PB={id:Tm,detector:IB,loader:DB},RB=PB,Sm="packet",NB=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),qB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-NH7WQ7WH-arIhWcCl.js");return{diagram:t}},__vite__mapDeps([47,22,23,5,6,7]));return{id:Sm,diagram:e}},"loader"),WB={id:Sm,detector:NB,loader:qB},_m="radar",zB=p(e=>/^\s*radar-beta/.test(e),"detector"),HB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-WEI45ONY-zMSIhP2J.js");return{diagram:t}},__vite__mapDeps([48,22,23,5,6,7]));return{id:_m,diagram:e}},"loader"),YB={id:_m,detector:zB,loader:HB},Bm="block",UB=p(e=>/^\s*block(-beta)?/.test(e),"detector"),jB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./blockDiagram-677ZJIJ3-DAH71x1Q.js");return{diagram:t}},__vite__mapDeps([49,14,2,17,5,6,7]));return{id:Bm,diagram:e}},"loader"),GB={id:Bm,detector:UB,loader:jB},XB=GB,vm="treeView",VB=p(e=>/^\s*treeView-beta/.test(e),"detector"),ZB=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-OA4YK3LP-DRlqkiV7.js");return{diagram:t}},__vite__mapDeps([50,21,22,23,5,6,7]));return{id:vm,diagram:e}},"loader"),KB={id:vm,detector:VB,loader:ZB},QB=KB,Lm="architecture",JB=p(e=>/^\s*architecture/.test(e),"detector"),tv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./architectureDiagram-ZJ3FMSHR-C9XZJvH9.js");return{diagram:t}},__vite__mapDeps([51,22,23,5,6,10,7]));return{id:Lm,diagram:e}},"loader"),ev={id:Lm,detector:JB,loader:tv},rv=ev,Fm="eventmodeling",iv=p(e=>/^\s*eventmodeling/.test(e),"detector"),ov=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-FQU43EPY-D5pIW94l.js");return{diagram:t}},__vite__mapDeps([52,22,23,5,6,7]));return{id:Fm,diagram:e}},"loader"),sv={id:Fm,detector:iv,loader:ov},av=sv,Am="ishikawa",nv=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),lv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-FXEZZL3T-DJxuDwZK.js");return{diagram:t}},__vite__mapDeps([53,5,6,7]));return{id:Am,diagram:e}},"loader"),hv={id:Am,detector:nv,loader:lv},Em="venn",cv=p(e=>/^\s*venn-beta/.test(e),"detector"),dv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./vennDiagram-L72KCM5P-55dVqqaA.js");return{diagram:t}},__vite__mapDeps([54,5,6,7]));return{id:Em,diagram:e}},"loader"),uv={id:Em,detector:cv,loader:dv},fv=uv,Mm="treemap",pv=p(e=>/^\s*treemap/.test(e),"detector"),gv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./diagram-G47NLZAW-Xp-lqyAs.js");return{diagram:t}},__vite__mapDeps([55,22,16,23,5,6,27,31,26,7]));return{id:Mm,diagram:e}},"loader"),mv={id:Mm,detector:pv,loader:gv},$m="wardley",yv=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Cv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./wardleyDiagram-EHGQE667-Ip7Q1iRO.js");return{diagram:t}},__vite__mapDeps([56,22,23,5,6,7]));return{id:$m,diagram:e}},"loader"),xv={id:$m,detector:yv,loader:Cv},bv=xv,Om="cynefin",kv=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),wv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./cynefinDiagram-TSTJHNR4-qBwjxYIX.js");return{diagram:t}},__vite__mapDeps([57,22,23,5,6,7]));return{id:Om,diagram:e}},"loader"),Tv={id:Om,detector:kv,loader:wv},Im="railroad",Sv=p(e=>/^\s*railroad-beta/i.test(e),"detector"),_v=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./railroadDiagram-RFXS5EU6-DFGDBfNL.js");return{diagram:t}},__vite__mapDeps([58,59,22,23,5,6,7]));return{id:Im,diagram:e}},"loader"),Bv={id:Im,detector:Sv,loader:_v},Dm="railroadEbnf",vv=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Lv=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./ebnfDiagram-CCIWWBDH-CxhfT5Dk.js");return{diagram:t}},__vite__mapDeps([60,59,22,23,5,6,7]));return{id:Dm,diagram:e}},"loader"),Fv={id:Dm,detector:vv,loader:Lv},Pm="railroadAbnf",Av=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Ev=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./abnfDiagram-VRR7QNED-BN8tpheJ.js");return{diagram:t}},__vite__mapDeps([61,59,22,23,5,6,7]));return{id:Pm,diagram:e}},"loader"),Mv={id:Pm,detector:Av,loader:Ev},Rm="railroadPeg",$v=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Ov=p(async()=>{const{diagram:e}=await nt(async()=>{const{diagram:t}=await import("./pegDiagram-2B236MQR-D_Imjl5d.js");return{diagram:t}},__vite__mapDeps([62,59,22,23,5,6,7]));return{id:Rm,diagram:e}},"loader"),Iv={id:Rm,detector:$v,loader:Ov},kc=!1,$s=p(()=>{kc||(kc=!0,zo("error",CB,e=>e.toLowerCase().trim()==="error"),zo("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ba(wB,AB,rv),ba(r_,OB,rB,Q_,C_,B_,F_,M_,Y_,X_,p_,c_,a_,BB,w_,cB,aB,pB,D_,RB,WB,q_,XB,av,QB,YB,hv,mv,Bv,Fv,Mv,Iv,fv,bv,Tv))},"addDiagrams"),Dv=p(async()=>{q.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Sr).map(async([r,{detector:i,loader:o}])=>{if(o)try{Sa(r)}catch{try{const{diagram:s,id:a}=await o();zo(a,s,i)}catch(s){throw q.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Sr[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){q.error(`Failed to load ${t.length} external diagrams`);for(const r of t)q.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Pv="graphics-document document";function Nm(e,t){e.attr("role",Pv),t!==""&&e.attr("aria-roledescription",t)}p(Nm,"setA11yDiagramInfo");function qm(e,t,r,i){if(e.insert!==void 0){if(r){const o=`chart-desc-${i}`;e.attr("aria-describedby",o),e.insert("desc",":first-child").attr("id",o).text(r)}if(t){const o=`chart-title-${i}`;e.attr("aria-labelledby",o),e.insert("title",":first-child").attr("id",o).text(t)}}}p(qm,"addSVGa11yTitleDescription");var mn=class Wm{constructor(t,r,i,o,s){this.type=t,this.text=r,this.db=i,this.parser=o,this.renderer=s}static{p(this,"Diagram")}static async fromText(t,r={}){const i=vt(),o=xn(t,i);t=Z2(t)+` `;try{Sa(o)}catch{const c=R0(o);if(!c)throw new Wc(`Diagram ${o} not found.`);const{id:h,diagram:d}=await c();zo(h,d)}const{db:s,parser:a,renderer:n,init:l}=Sa(o);return a.parser&&(a.parser.yy=s),s.clear?.(),l?.(i),r.title&&s.setDiagramTitle?.(r.title),await a.parse(t),new Wm(o,t,s,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},wc=[],Rv=p(()=>{wc.forEach(e=>{e()}),wc=[]},"attachFunctions"),Nv=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function zm(e){const t=e.match(qc);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(` `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(` `):t[2];let o=K1(i,{schema:Z1})??{};o=typeof o=="object"&&!Array.isArray(o)?o:{};const s={};return o.displayMode&&(s.displayMode=o.displayMode.toString()),o.title&&(s.title=o.title.toString()),o.config&&(s.config=o.config),{text:e.slice(t[0].length),metadata:s}}p(zm,"extractFrontMatter");var qv=p(e=>e.replace(/\r\n?/g,` diff --git a/apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-G8LQJrFP.js b/apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-dirTUANL.js similarity index 98% rename from apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-G8LQJrFP.js rename to apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-dirTUANL.js index a61aab5f9..f31e7a7ce 100644 --- a/apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-G8LQJrFP.js +++ b/apps/kimi-code/dist-web/assets/mindmap-definition-LN4V7U3C-dirTUANL.js @@ -1,4 +1,4 @@ -import{g as oe}from"./chunk-XXDRQBXY-BYo5O_6D.js";import{s as ae}from"./chunk-VR4S4FIN-JAO0vJUe.js";import{_ as l,l as C,v as ce,x as le,z as he,D as G,c as B,i as F,b6 as de,aa as ge,ab as ue,ac as pe}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function fe(e,n=0){return(E[e[n+0]]+E[e[n+1]]+E[e[n+2]]+E[e[n+3]]+"-"+E[e[n+4]]+E[e[n+5]]+"-"+E[e[n+6]]+E[e[n+7]]+"-"+E[e[n+8]]+E[e[n+9]]+"-"+E[e[n+10]]+E[e[n+11]]+E[e[n+12]]+E[e[n+13]]+E[e[n+14]]+E[e[n+15]]).toLowerCase()}const me=new Uint8Array(16);function ye(){return crypto.getRandomValues(me)}function Ee(e,n,g){return crypto.randomUUID?crypto.randomUUID():_e(e)}function _e(e,n,g){e=e||{};const a=e.random??e.rng?.()??ye();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,fe(a)}var Y=(function(){var e=l(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),n=[1,4],g=[1,13],a=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],_=[6,7,8],T=[1,26],I=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,p,r,$){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:g,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(_,[2,3]),{1:[2,2]},e(_,[2,4]),e(_,[2,5]),{1:[2,6],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:g,9:22,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:T,7:I,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:I,10:32,11:w},{1:[2,7],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,K=0,ne=2,Q=1,ie=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var z=y.yylloc;r.push(z);var se=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(k){o.length=o.length-2*k,p.length=p.length-k,r.length=r.length-k}l(re,"popStack");function Z(){var k;return k=c.pop()||y.lex()||Q,typeof k!="number"&&(k instanceof Array&&(c=k,k=c.pop()),k=i.symbols_[k]||k),k}l(Z,"lex");for(var b,v,S,W,O={},U,x,ee,V;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((b===null||typeof b>"u")&&(b=Z()),S=$[v]&&$[v][b]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[v])this.terminals_[U]&&U>ne&&V.push("'"+this.terminals_[U]+"'");y.showPosition?X="Parse error on line "+(M+1)+`: +import{g as oe}from"./chunk-XXDRQBXY-BeefoqH0.js";import{s as ae}from"./chunk-VR4S4FIN-CTR9P-lT.js";import{_ as l,l as C,v as ce,x as le,z as he,D as G,c as B,i as F,b6 as de,aa as ge,ab as ue,ac as pe}from"./mermaid.core-BKBZnrB_.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";const E=[];for(let e=0;e<256;++e)E.push((e+256).toString(16).slice(1));function fe(e,n=0){return(E[e[n+0]]+E[e[n+1]]+E[e[n+2]]+E[e[n+3]]+"-"+E[e[n+4]]+E[e[n+5]]+"-"+E[e[n+6]]+E[e[n+7]]+"-"+E[e[n+8]]+E[e[n+9]]+"-"+E[e[n+10]]+E[e[n+11]]+E[e[n+12]]+E[e[n+13]]+E[e[n+14]]+E[e[n+15]]).toLowerCase()}const me=new Uint8Array(16);function ye(){return crypto.getRandomValues(me)}function Ee(e,n,g){return crypto.randomUUID?crypto.randomUUID():_e(e)}function _e(e,n,g){e=e||{};const a=e.random??e.rng?.()??ye();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,fe(a)}var Y=(function(){var e=l(function(D,s,i,o){for(i=i||{},o=D.length;o--;i[D[o]]=s);return i},"o"),n=[1,4],g=[1,13],a=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],_=[6,7,8],T=[1,26],I=[1,24],w=[1,25],d=[6,7,11],R=[1,6,13,15,16,19,22],q=[1,33],J=[1,34],A=[1,6,7,11,13,15,16,19,22],j={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:l(function(s,i,o,c,p,r,$){var u=r.length-1;switch(p){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[u].id),c.addNode(r[u-1].length,r[u].id,r[u].descr,r[u].type);break;case 16:c.getLogger().trace("Icon: ",r[u]),c.decorateNode({icon:r[u]});break;case 17:case 21:c.decorateNode({class:r[u]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[u].id),c.addNode(0,r[u].id,r[u].descr,r[u].type);break;case 20:c.decorateNode({icon:r[u]});break;case 25:c.getLogger().trace("node found ..",r[u-2]),this.$={id:r[u-1],descr:r[u-1],type:c.getType(r[u-2],r[u])};break;case 26:this.$={id:r[u],descr:r[u],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[u-3]),this.$={id:r[u-3],descr:r[u-1],type:c.getType(r[u-2],r[u])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:g,7:[1,10],9:9,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(_,[2,3]),{1:[2,2]},e(_,[2,4]),e(_,[2,5]),{1:[2,6],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:g,9:22,12:11,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:T,7:I,10:23,11:w},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:T,7:I,10:32,11:w},{1:[2,7],6:g,12:21,13:a,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(R,[2,14],{7:q,11:J}),e(A,[2,8]),e(A,[2,9]),e(A,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(R,[2,13],{7:q,11:J}),e(A,[2,11]),e(A,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],c=[],p=[null],r=[],$=this.table,u="",M=0,K=0,ne=2,Q=1,ie=r.slice.call(arguments,1),y=Object.create(this.lexer),L={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(L.yy[H]=this.yy[H]);y.setInput(s,L.yy),L.yy.lexer=y,L.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var z=y.yylloc;r.push(z);var se=y.options&&y.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(k){o.length=o.length-2*k,p.length=p.length-k,r.length=r.length-k}l(re,"popStack");function Z(){var k;return k=c.pop()||y.lex()||Q,typeof k!="number"&&(k instanceof Array&&(c=k,k=c.pop()),k=i.symbols_[k]||k),k}l(Z,"lex");for(var b,v,S,W,O={},U,x,ee,V;;){if(v=o[o.length-1],this.defaultActions[v]?S=this.defaultActions[v]:((b===null||typeof b>"u")&&(b=Z()),S=$[v]&&$[v][b]),typeof S>"u"||!S.length||!S[0]){var X="";V=[];for(U in $[v])this.terminals_[U]&&U>ne&&V.push("'"+this.terminals_[U]+"'");y.showPosition?X="Parse error on line "+(M+1)+`: `+y.showPosition()+` Expecting `+V.join(", ")+", got '"+(this.terminals_[b]||b)+"'":X="Parse error on line "+(M+1)+": Unexpected "+(b==Q?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(X,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:z,expected:V})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(S[0]){case 1:o.push(b),p.push(y.yytext),r.push(y.yylloc),o.push(S[1]),b=null,K=y.yyleng,u=y.yytext,M=y.yylineno,z=y.yylloc;break;case 2:if(x=this.productions_[S[1]][1],O.$=p[p.length-x],O._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},se&&(O._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),W=this.performAction.apply(O,[u,K,M,L.yy,S[1],p,r].concat(ie)),typeof W<"u")return W;x&&(o=o.slice(0,-1*x*2),p=p.slice(0,-1*x),r=r.slice(0,-1*x)),o.push(this.productions_[S[1]][0]),p.push(O.$),r.push(O._$),ee=$[o[o.length-2]][o[o.length-1]],o.push(ee);break;case 3:return!0}}return!0},"parse")},te=(function(){var D={EOF:1,parseError:l(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:l(function(s,i){return this.yy=i||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:l(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===c.length?this.yylloc.first_column:0)+c[c.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-Bqe1YNn0.js b/apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-D_Imjl5d.js similarity index 87% rename from apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-Bqe1YNn0.js rename to apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-D_Imjl5d.js index 0f1b59466..984e3c1eb 100644 --- a/apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-Bqe1YNn0.js +++ b/apps/kimi-code/dist-web/assets/pegDiagram-2B236MQR-D_Imjl5d.js @@ -1 +1 @@ -import{g as l,r as m,d as a}from"./chunk-MOJQB5TN-B49sRSVS.js";import{p}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as t,l as o}from"./mermaid.core-DpBz6UHc.js";import{M as u,d as c}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},L={parser:b,db:a,renderer:m,styles:l};export{L as diagram}; +import{g as l,r as m,d as a}from"./chunk-MOJQB5TN-BWl8WxOI.js";import{p}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{_ as t,l as o}from"./mermaid.core-BKBZnrB_.js";import{M as u,d as c}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},L={parser:b,db:a,renderer:m,styles:l};export{L as diagram}; diff --git a/apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-CJ6o_adA.js b/apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-Bma7UCRc.js similarity index 94% rename from apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-CJ6o_adA.js rename to apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-Bma7UCRc.js index c41294a92..a295ed698 100644 --- a/apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-CJ6o_adA.js +++ b/apps/kimi-code/dist-web/assets/pieDiagram-ENE6RG2P-Bma7UCRc.js @@ -1,4 +1,4 @@ -import{p as at}from"./chunk-JWPE2WC7-BtckK32c.js";import{K as T,N as B,b5 as rt,g as nt,s as it,a as ot,b as st,p as lt,o as ct,_ as g,l as G,c as ut,B as dt,F as gt,a1 as pt,e as ht,q as ft,D as mt}from"./mermaid.core-DpBz6UHc.js";import{p as vt}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import{d as X}from"./arc-BNlcm8Io.js";import{o as xt}from"./ordinal-Cboi1Yqb.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function St(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function yt(t){return t}function wt(){var t=yt,n=St,y=null,b=T(0),l=T(B),p=T(0);function i(e){var r,s=(e=rt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),E=Math.min(B,Math.max(-B,l.apply(this,arguments)-D)),k,F=Math.min(Math.abs(E)/s,p.apply(this,arguments)),u=F*(E<0?-1:1),A;for(r=0;r<s;++r)(A=o[f[r]=r]=+t(e[r],r,e))>0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(E-s*u)/$:0;r<s;++r,D=k)h=f[r],A=o[h],k=D+(A>0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:F};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var At=mt.pie,I={sections:new Map,showData:!1},W=I.sections,V=I.showData,Ct=structuredClone(At),$t=g(()=>structuredClone(Ct),"getConfig"),Dt=g(()=>{W=new Map,V=I.showData,ft()},"clear"),Tt=g(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);W.has(t)||(W.set(t,n),G.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),bt=g(()=>W,"getSections"),kt=g(t=>{V=t},"setShowData"),zt=g(()=>V,"getShowData"),Z={getConfig:$t,clear:Dt,setDiagramTitle:ct,getDiagramTitle:lt,setAccTitle:st,getAccTitle:ot,setAccDescription:it,getAccDescription:nt,addSection:Tt,getSections:bt,setShowData:kt,getShowData:zt},Et=g((t,n)=>{at(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Mt={parse:g(async t=>{const n=await vt("pie",t);G.debug(n),Et(n,Z)},"parse")},Rt=g(t=>` +import{p as at}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{K as T,N as B,b5 as rt,g as nt,s as it,a as ot,b as st,p as lt,o as ct,_ as g,l as G,c as ut,B as dt,F as gt,a1 as pt,e as ht,q as ft,D as mt}from"./mermaid.core-BKBZnrB_.js";import{p as vt}from"./cynefin-VYW2F7L2-BGL2vhde.js";import{d as X}from"./arc-myf2kRJl.js";import{o as xt}from"./ordinal-Cboi1Yqb.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function St(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function yt(t){return t}function wt(){var t=yt,n=St,y=null,b=T(0),l=T(B),p=T(0);function i(e){var r,s=(e=rt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),E=Math.min(B,Math.max(-B,l.apply(this,arguments)-D)),k,F=Math.min(Math.abs(E)/s,p.apply(this,arguments)),u=F*(E<0?-1:1),A;for(r=0;r<s;++r)(A=o[f[r]=r]=+t(e[r],r,e))>0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(E-s*u)/$:0;r<s;++r,D=k)h=f[r],A=o[h],k=D+(A>0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:F};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var At=mt.pie,I={sections:new Map,showData:!1},W=I.sections,V=I.showData,Ct=structuredClone(At),$t=g(()=>structuredClone(Ct),"getConfig"),Dt=g(()=>{W=new Map,V=I.showData,ft()},"clear"),Tt=g(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);W.has(t)||(W.set(t,n),G.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),bt=g(()=>W,"getSections"),kt=g(t=>{V=t},"setShowData"),zt=g(()=>V,"getShowData"),Z={getConfig:$t,clear:Dt,setDiagramTitle:ct,getDiagramTitle:lt,setAccTitle:st,getAccTitle:ot,setAccDescription:it,getAccDescription:nt,addSection:Tt,getSections:bt,setShowData:kt,getShowData:zt},Et=g((t,n)=>{at(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Mt={parse:g(async t=>{const n=await vt("pie",t);G.debug(n),Et(n,Z)},"parse")},Rt=g(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; diff --git a/apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-BBv6VFSq.js b/apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-AdbtQLWr.js similarity index 99% rename from apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-BBv6VFSq.js rename to apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-AdbtQLWr.js index 5869d4c59..258dd945a 100644 --- a/apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-BBv6VFSq.js +++ b/apps/kimi-code/dist-web/assets/quadrantDiagram-ABIIQ3AL-AdbtQLWr.js @@ -1,4 +1,4 @@ -import{s as Se,g as _e,p as ee,o as Ae,a as ke,b as Fe,_ as r,c as Et,l as qt,d as vt,e as Pe,q as ve,D as z,i as Ce,W as Le}from"./mermaid.core-DpBz6UHc.js";import{l as te}from"./linear-BWc4ICs9.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Ct=(function(){var t=r(function(Y,s,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],k=[1,45],ct=[1,14],dt=[1,23],ut=[1,18],xt=[1,19],ot=[1,20],bt=[1,21],lt=[1,22],i=[1,24],Dt=[1,25],zt=[1,26],Vt=[1,27],It=[1,28],wt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Ht=[1,73],Xt=[1,74],Mt=[1,75],Yt=[1,76],jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],St=[1,103],Gt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(c,[2,29],{10:St}),t(Gt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(c,[2,50],{10:St}),t(Gt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Kt=0,Te=2,Zt=1,qe=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(j.yy[At]=this.yy[At]);D.setInput(s,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var kt=D.yylloc;e.push(kt);var me=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){u.length=u.length-2*R,A.length=A.length-R,e.length=e.length-R}r(be,"popStack");function Jt(){var R;return R=d.pop()||D.lex()||Zt,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}r(Jt,"lex");for(var B,G,W,Ft,rt={},pt,M,$t,yt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=Jt()),W=ht[G]&&ht[G][B]),typeof W>"u"||!W.length||!W[0]){var Pt="";yt=[];for(pt in ht[G])this.terminals_[pt]&&pt>Te&&yt.push("'"+this.terminals_[pt]+"'");D.showPosition?Pt="Parse error on line "+(gt+1)+`: +import{s as Se,g as _e,p as ee,o as Ae,a as ke,b as Fe,_ as r,c as Et,l as qt,d as vt,e as Pe,q as ve,D as z,i as Ce,W as Le}from"./mermaid.core-BKBZnrB_.js";import{l as te}from"./linear-oD38CRgN.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Ct=(function(){var t=r(function(Y,s,l,u){for(l=l||{},u=Y.length;u--;l[Y[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],k=[1,45],ct=[1,14],dt=[1,23],ut=[1,18],xt=[1,19],ot=[1,20],bt=[1,21],lt=[1,22],i=[1,24],Dt=[1,25],zt=[1,26],Vt=[1,27],It=[1,28],wt=[1,29],U=[1,32],Q=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Ht=[1,73],Xt=[1,74],Mt=[1,75],Yt=[1,76],jt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,91],Z=[1,92],J=[1,93],$=[1,100],tt=[1,94],et=[1,97],it=[1,95],at=[1,96],nt=[1,98],st=[1,99],St=[1,103],Gt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(_,[2,34]),{27:46,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:m,5:b,10:y,12:T,13:q,14:g,15:k,18:ct,25:dt,35:ut,37:xt,39:ot,41:bt,42:lt,48:i,50:Dt,51:zt,52:Vt,53:It,54:wt,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(c,[2,45]),t(c,[2,46]),{18:[1,51]},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:52,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:53,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:54,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:55,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:56,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,10:y,12:T,13:q,14:g,15:k,43:57,58:31,60:U,61:Q,63:F,64:P,65:v,66:C,67:L},{4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:65,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,21:64},t(c,[2,53],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(c,[2,56],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(c,[2,57],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,58],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,59],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,60],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Bt,5:Rt,6:Nt,7:Wt,8:Ut,9:Qt,10:Ot,11:Ht,12:Xt,13:Mt,14:Yt,15:jt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(c,[2,52],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),t(c,[2,55],{58:31,43:85,4:m,5:b,10:y,12:T,13:q,14:g,15:k,60:U,61:Q,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:89,23:88},t(w,[2,24]),t(c,[2,51],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,54],{59:60,58:61,4:m,5:b,8:H,10:y,12:T,13:q,14:g,15:k,18:X,63:F,64:P,65:v,66:C,67:L}),t(c,[2,47],{22:89,16:90,23:101,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,102]},t(c,[2,29],{10:St}),t(Gt,[2,27],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:89,16:90,23:105,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:90,17:it,18:at,19:nt,20:st,22:106},t(N,[2,26]),t(c,[2,50],{10:St}),t(Gt,[2,28],{16:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Kt=0,Te=2,Zt=1,qe=e.slice.call(arguments,1),D=Object.create(this.lexer),j={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(j.yy[At]=this.yy[At]);D.setInput(s,j.yy),j.yy.lexer=D,j.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var kt=D.yylloc;e.push(kt);var me=D.options&&D.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(R){u.length=u.length-2*R,A.length=A.length-R,e.length=e.length-R}r(be,"popStack");function Jt(){var R;return R=d.pop()||D.lex()||Zt,typeof R!="number"&&(R instanceof Array&&(d=R,R=d.pop()),R=l.symbols_[R]||R),R}r(Jt,"lex");for(var B,G,W,Ft,rt={},pt,M,$t,yt;;){if(G=u[u.length-1],this.defaultActions[G]?W=this.defaultActions[G]:((B===null||typeof B>"u")&&(B=Jt()),W=ht[G]&&ht[G][B]),typeof W>"u"||!W.length||!W[0]){var Pt="";yt=[];for(pt in ht[G])this.terminals_[pt]&&pt>Te&&yt.push("'"+this.terminals_[pt]+"'");D.showPosition?Pt="Parse error on line "+(gt+1)+`: `+D.showPosition()+` Expecting `+yt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Pt="Parse error on line "+(gt+1)+": Unexpected "+(B==Zt?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Pt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:kt,expected:yt})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+B);switch(W[0]){case 1:u.push(B),A.push(D.yytext),e.push(D.yylloc),u.push(W[1]),B=null,Kt=D.yyleng,n=D.yytext,gt=D.yylineno,kt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],rt.$=A[A.length-M],rt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},me&&(rt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Ft=this.performAction.apply(rt,[n,Kt,gt,j.yy,W[1],A,e].concat(qe)),typeof Ft<"u")return Ft;M&&(u=u.slice(0,-1*M*2),A=A.slice(0,-1*M),e=e.slice(0,-1*M)),u.push(this.productions_[W[1]][0]),A.push(rt.$),e.push(rt._$),$t=ht[u[u.length-2]][u[u.length-1]],u.push($t);break;case 3:return!0}}return!0},"parse")},ye=(function(){var Y={EOF:1,parseError:r(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:r(function(s,l){return this.yy=l||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var l=s.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:r(function(s){var l=s.length,u=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var s=this.pastInput(),l=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-7QSjLg66.js b/apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-DFGDBfNL.js similarity index 84% rename from apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-7QSjLg66.js rename to apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-DFGDBfNL.js index ecfba2b27..fd1f13b73 100644 --- a/apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-7QSjLg66.js +++ b/apps/kimi-code/dist-web/assets/railroadDiagram-RFXS5EU6-DFGDBfNL.js @@ -1 +1 @@ -import{g as s,r as l,d as t}from"./chunk-MOJQB5TN-B49sRSVS.js";import{p as m}from"./chunk-JWPE2WC7-BtckK32c.js";import{_ as n,l as i}from"./mermaid.core-DpBz6UHc.js";import{M as p,c as u}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},P={parser:y,db:t,renderer:l,styles:s};export{P as diagram}; +import{g as s,r as l,d as t}from"./chunk-MOJQB5TN-BWl8WxOI.js";import{p as m}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{_ as n,l as i}from"./mermaid.core-BKBZnrB_.js";import{M as p,c as u}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var d=u().Railroad.parser.LangiumParser,a=n(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},P={parser:y,db:t,renderer:l,styles:s};export{P as diagram}; diff --git a/apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-CGyvAsFO.js b/apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-BM1jojUv.js similarity index 99% rename from apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-CGyvAsFO.js rename to apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-BM1jojUv.js index 7ccc888ca..eed658684 100644 --- a/apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-CGyvAsFO.js +++ b/apps/kimi-code/dist-web/assets/requirementDiagram-TGXJPOKE-BM1jojUv.js @@ -1,4 +1,4 @@ -import{g as ze}from"./chunk-XXDRQBXY-BYo5O_6D.js";import{s as Ge}from"./chunk-VR4S4FIN-JAO0vJUe.js";import{_ as h,z as Ye,b as Xe,a as Je,s as Ze,g as et,o as tt,p as st,c as Te,l as Ne,q as it,u as rt,v as nt,x as at,y as lt}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var qe=(function(){var e=h(function($,r,a,c){for(a=a||{},c=$.length;c--;a[$[c]]=r);return a},"o"),u=[1,3],o=[1,4],n=[1,5],i=[1,6],f=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,22],E=[2,7],g=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],Ae=[1,70],Ve=[1,71],ve=[1,72],Le=[1,73],xe=[1,74],Oe=[1,75],we=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:h(function(r,a,c,s,m,t,me){var l=t.length-1;switch(m){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:u,9:o,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:u,9:o,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(f,[2,6]),{3:12,4:2,6:u,9:o,11:n,13:i},{1:[2,2]},{4:17,5:_,7:13,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},e(f,[2,4]),e(f,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:_,7:42,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:43,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:44,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:45,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:46,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:47,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:48,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:49,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:50,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:R},{30:63,33:62,75:P,89:p,90:R},{30:64,33:62,75:P,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{62:77,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{30:78,33:62,75:P,89:p,90:R},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:P,89:p,90:R},{5:[1,97]},{30:98,33:62,75:P,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:De}),{33:103,75:[1,102],89:p,90:R},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:De}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:h(function(r,a){if(a.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=a,c}},"parseError"),parse:h(function(r){var a=this,c=[0],s=[],m=[null],t=[],me=this.table,l="",Re=0,Fe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),y=Object.create(this.lexer),z={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(z.yy[Se]=this.yy[Se]);y.setInput(r,z.yy),z.yy.lexer=y,z.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var be=y.yylloc;t.push(be);var We=y.options&&y.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){c.length=c.length-2*I,m.length=m.length-I,t.length=t.length-I}h(je,"popStack");function Pe(){var I;return I=s.pop()||y.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=a.symbols_[I]||I),I}h(Pe,"lex");for(var b,G,N,Ie,J={},ge,F,Ue,ye;;){if(G=c[c.length-1],this.defaultActions[G]?N=this.defaultActions[G]:((b===null||typeof b>"u")&&(b=Pe()),N=me[G]&&me[G][b]),typeof N>"u"||!N.length||!N[0]){var ke="";ye=[];for(ge in me[G])this.terminals_[ge]&&ge>He&&ye.push("'"+this.terminals_[ge]+"'");y.showPosition?ke="Parse error on line "+(Re+1)+`: +import{g as ze}from"./chunk-XXDRQBXY-BeefoqH0.js";import{s as Ge}from"./chunk-VR4S4FIN-CTR9P-lT.js";import{_ as h,z as Ye,b as Xe,a as Je,s as Ze,g as et,o as tt,p as st,c as Te,l as Ne,q as it,u as rt,v as nt,x as at,y as lt}from"./mermaid.core-BKBZnrB_.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var qe=(function(){var e=h(function($,r,a,c){for(a=a||{},c=$.length;c--;a[$[c]]=r);return a},"o"),u=[1,3],o=[1,4],n=[1,5],i=[1,6],f=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],_=[1,22],E=[2,7],g=[1,26],S=[1,27],k=[1,28],q=[1,29],C=[1,33],A=[1,34],V=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ce=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],de=[27,29],Ae=[1,70],Ve=[1,71],ve=[1,72],Le=[1,73],xe=[1,74],Oe=[1,75],we=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],Ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],De=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:h(function(r,a,c,s,m,t,me){var l=t.length-1;switch(m){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:u,9:o,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:u,9:o,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(f,[2,6]),{3:12,4:2,6:u,9:o,11:n,13:i},{1:[2,2]},{4:17,5:_,7:13,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},e(f,[2,4]),e(f,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:_,7:42,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:43,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:44,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:45,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:46,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:47,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:48,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:49,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{4:17,5:_,7:50,8:E,9:o,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:g,22:S,23:k,24:q,25:23,33:25,41:C,42:A,43:V,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:p,90:R},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:P,89:p,90:R},{30:63,33:62,75:P,89:p,90:R},{30:64,33:62,75:P,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{62:77,65:Ae,66:Ve,67:ve,68:Le,69:xe,70:Oe,71:we},{30:78,33:62,75:P,89:p,90:R},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:P,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:P,89:p,90:R},{5:[1,97]},{30:98,33:62,75:P,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:De}),{33:103,75:[1,102],89:p,90:R},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:De}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(Ee,[2,61]),e(Ee,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:p,90:R},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:h(function(r,a){if(a.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=a,c}},"parseError"),parse:h(function(r){var a=this,c=[0],s=[],m=[null],t=[],me=this.table,l="",Re=0,Fe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),y=Object.create(this.lexer),z={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(z.yy[Se]=this.yy[Se]);y.setInput(r,z.yy),z.yy.lexer=y,z.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var be=y.yylloc;t.push(be);var We=y.options&&y.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){c.length=c.length-2*I,m.length=m.length-I,t.length=t.length-I}h(je,"popStack");function Pe(){var I;return I=s.pop()||y.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=a.symbols_[I]||I),I}h(Pe,"lex");for(var b,G,N,Ie,J={},ge,F,Ue,ye;;){if(G=c[c.length-1],this.defaultActions[G]?N=this.defaultActions[G]:((b===null||typeof b>"u")&&(b=Pe()),N=me[G]&&me[G][b]),typeof N>"u"||!N.length||!N[0]){var ke="";ye=[];for(ge in me[G])this.terminals_[ge]&&ge>He&&ye.push("'"+this.terminals_[ge]+"'");y.showPosition?ke="Parse error on line "+(Re+1)+`: `+y.showPosition()+` Expecting `+ye.join(", ")+", got '"+(this.terminals_[b]||b)+"'":ke="Parse error on line "+(Re+1)+": Unexpected "+(b==$e?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(ke,{text:y.match,token:this.terminals_[b]||b,line:y.yylineno,loc:be,expected:ye})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+b);switch(N[0]){case 1:c.push(b),m.push(y.yytext),t.push(y.yylloc),c.push(N[1]),b=null,Fe=y.yyleng,l=y.yytext,Re=y.yylineno,be=y.yylloc;break;case 2:if(F=this.productions_[N[1]][1],J.$=m[m.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},We&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Ie=this.performAction.apply(J,[l,Fe,Re,z.yy,N[1],m,t].concat(Ke)),typeof Ie<"u")return Ie;F&&(c=c.slice(0,-1*F*2),m=m.slice(0,-1*F),t=t.slice(0,-1*F)),c.push(this.productions_[N[1]][0]),m.push(J.$),t.push(J._$),Ue=me[c[c.length-2]][c[c.length-1]],c.push(Ue);break;case 3:return!0}}return!0},"parse")},Qe=(function(){var $={EOF:1,parseError:h(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:h(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:h(function(r){var a=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===s.length?this.yylloc.first_column:0)+s[s.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(r){this.unput(this.match.slice(r))},"less"),pastInput:h(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-CYJzk73F.js b/apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-CVUG-8BS.js similarity index 99% rename from apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-CYJzk73F.js rename to apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-CVUG-8BS.js index 30d929f53..cf9ac1cd1 100644 --- a/apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-CYJzk73F.js +++ b/apps/kimi-code/dist-web/assets/sankeyDiagram-HTMAVEWB-CVUG-8BS.js @@ -1,4 +1,4 @@ -import{o as kt,p as mt,s as xt,g as _t,b as vt,a as bt,_ as y,c as ot,b8 as St,d as G,ad as wt,q as Lt,k as Et}from"./mermaid.core-DpBz6UHc.js";import{o as At}from"./ordinal-Cboi1Yqb.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function Tt(t){for(var i=t.length/6|0,s=new Array(i),l=0;l<i;)s[l]="#"+t.slice(l*6,++l*6);return s}const Mt=Tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function at(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s<l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function dt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function J(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Nt(t){return t.target.depth}function Ct(t){return t.depth}function Pt(t,i){return i-1-t.height}function gt(t,i){return t.sourceLinks.length?t.depth:i-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,i){return q(t.source,i.source)||t.index-i.index}function ct(t,i){return q(t.target,i.target)||t.index-i.index}function q(t,i){return t.y0-i.y0}function tt(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function Dt(t){return t.links}function ut(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ht({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function jt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,k=Ot,o=gt,a,h,m=$t,_=Dt,d=6;function v(){const n={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),v):k},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:Y(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(m=typeof n=="function"?n:Y(n),v):m},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:Y(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[k(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ut(c,p)),typeof b!="object"&&(b=r.target=ut(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=at(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function $(n){const f=dt(n,c=>(l-i-(c.length-1)*g)/J(c,tt));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;r<c.length;++r){const p=c[r];p.y0+=e*(r+1),p.y1+=e*(r+1)}w(c)}}function S(n){const f=N(n);g=Math.min(x,(l-i)/(at(f,c=>c.length)-1)),$(f);for(let c=0;c<d;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/d);F(f,e,r),C(f,e,r)}}function C(n,f,c){for(let e=1,r=n.length;e<r;++e){const p=n[e];for(const b of p){let L=0,z=0;for(const{source:W,value:Z}of b.targetLinks){let U=Z*(b.layer-W.layer);L+=P(W,b)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function F(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,z=0;for(const{target:W,value:Z}of b.sourceLinks){let U=Z*(W.layer-b.layer);L+=E(b,W)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function D(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),R(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),R(n,i,0,f)}function R(n,f,c,e){for(;c<n.length;++c){const r=n[c],p=(f-r.y0)*e;p>1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function j({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ct);for(const{target:{targetLinks:c}}of n)c.sort(lt)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ct),c.sort(lt)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var et=Math.PI,nt=2*et,B=1e-6,zt=nt-B;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,k=s-t,o=l-i,a=x-t,h=g-i,m=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(m>B)if(!(Math.abs(h*k-o*a)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((et-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,$=I/A;Math.abs(N-1)>B&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+$*k)+","+(this._y1=i+$*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),k=s*Math.sin(l),o=t+g,a=i+k,h=1^x,m=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>B||Math.abs(this._y1-a)>B)&&(this._+="L"+o+","+a),s&&(m<0&&(m=m%nt+nt),m>zt?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=et)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Ft(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var i=Vt,s=Wt,l=Bt,u=Ft,x=null;function g(){var k,o=Rt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=k=pt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(i=k,g):i},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(l=typeof k=="function"?k:ft(+k),g):l},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:ft(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Gt(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var rt=(function(){var t=y(function(k,o,a,h){for(a=a||{},h=k.length;h--;a[k[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,$=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;d.push(D);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function j(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=a.symbols_[L]||L),L}y(j,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=j()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: +import{o as kt,p as mt,s as xt,g as _t,b as vt,a as bt,_ as y,c as ot,b8 as St,d as G,ad as wt,q as Lt,k as Et}from"./mermaid.core-BKBZnrB_.js";import{o as At}from"./ordinal-Cboi1Yqb.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";import"./init-Gi6I4Gst.js";function Tt(t){for(var i=t.length/6|0,s=new Array(i),l=0;l<i;)s[l]="#"+t.slice(l*6,++l*6);return s}const Mt=Tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function at(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s<l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s<u||s===void 0&&u>=u)&&(s=u)}return s}function dt(t,i){let s;if(i===void 0)for(const l of t)l!=null&&(s>l||s===void 0&&l>=l)&&(s=l);else{let l=-1;for(let u of t)(u=i(u,++l,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function J(t,i){let s=0;if(i===void 0)for(let l of t)(l=+l)&&(s+=l);else{let l=-1;for(let u of t)(u=+i(u,++l,t))&&(s+=u)}return s}function Nt(t){return t.target.depth}function Ct(t){return t.depth}function Pt(t,i){return i-1-t.height}function gt(t,i){return t.sourceLinks.length?t.depth:i-1}function It(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,i){return q(t.source,i.source)||t.index-i.index}function ct(t,i){return q(t.target,i.target)||t.index-i.index}function q(t,i){return t.y0-i.y0}function tt(t){return t.value}function Ot(t){return t.index}function $t(t){return t.nodes}function Dt(t){return t.links}function ut(t,i){const s=t.get(i);if(!s)throw new Error("missing: "+i);return s}function ht({nodes:t}){for(const i of t){let s=i.y0,l=s;for(const u of i.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of i.targetLinks)u.y1=l+u.width/2,l+=u.width}}function jt(){let t=0,i=0,s=1,l=1,u=24,x=8,g,k=Ot,o=gt,a,h,m=$t,_=Dt,d=6;function v(){const n={nodes:m.apply(null,arguments),links:_.apply(null,arguments)};return T(n),A(n),M(n),I(n),S(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:Y(n),v):k},v.nodeAlign=function(n){return arguments.length?(o=typeof n=="function"?n:Y(n),v):o},v.nodeSort=function(n){return arguments.length?(a=n,v):a},v.nodeWidth=function(n){return arguments.length?(u=+n,v):u},v.nodePadding=function(n){return arguments.length?(x=g=+n,v):x},v.nodes=function(n){return arguments.length?(m=typeof n=="function"?n:Y(n),v):m},v.links=function(n){return arguments.length?(_=typeof n=="function"?n:Y(n),v):_},v.linkSort=function(n){return arguments.length?(h=n,v):h},v.size=function(n){return arguments.length?(t=i=0,s=+n[0],l=+n[1],v):[s-t,l-i]},v.extent=function(n){return arguments.length?(t=+n[0][0],s=+n[1][0],i=+n[0][1],l=+n[1][1],v):[[t,i],[s,l]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function T({nodes:n,links:f}){for(const[e,r]of n.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(n.map((e,r)=>[k(e,r,n),e]));for(const[e,r]of f.entries()){r.index=e;let{source:p,target:b}=r;typeof p!="object"&&(p=r.source=ut(c,p)),typeof b!="object"&&(b=r.target=ut(c,b)),p.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of n)e.sort(h),r.sort(h)}function A({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function M({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.depth=r;for(const{target:b}of p.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:n}){const f=n.length;let c=new Set(n),e=new Set,r=0;for(;c.size;){for(const p of c){p.height=r;for(const{source:b}of p.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:n}){const f=at(n,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of n){const p=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=p,r.x0=t+p*c,r.x1=r.x0+u,e[p]?e[p].push(r):e[p]=[r]}if(a)for(const r of e)r.sort(a);return e}function $(n){const f=dt(n,c=>(l-i-(c.length-1)*g)/J(c,tt));for(const c of n){let e=i;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+g;for(const p of r.sourceLinks)p.width=p.value*f}e=(l-e+g)/(c.length+1);for(let r=0;r<c.length;++r){const p=c[r];p.y0+=e*(r+1),p.y1+=e*(r+1)}w(c)}}function S(n){const f=N(n);g=Math.min(x,(l-i)/(at(f,c=>c.length)-1)),$(f);for(let c=0;c<d;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/d);F(f,e,r),C(f,e,r)}}function C(n,f,c){for(let e=1,r=n.length;e<r;++e){const p=n[e];for(const b of p){let L=0,z=0;for(const{source:W,value:Z}of b.targetLinks){let U=Z*(b.layer-W.layer);L+=P(W,b)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function F(n,f,c){for(let e=n.length,r=e-2;r>=0;--r){const p=n[r];for(const b of p){let L=0,z=0;for(const{target:W,value:Z}of b.sourceLinks){let U=Z*(W.layer-b.layer);L+=E(b,W)*U,z+=U}if(!(z>0))continue;let V=(L/z-b.y0)*f;b.y0+=V,b.y1+=V,j(b)}a===void 0&&p.sort(q),D(p,c)}}function D(n,f){const c=n.length>>1,e=n[c];O(n,e.y0-g,c-1,f),R(n,e.y1+g,c+1,f),O(n,l,n.length-1,f),R(n,i,0,f)}function R(n,f,c,e){for(;c<n.length;++c){const r=n[c],p=(f-r.y0)*e;p>1e-6&&(r.y0+=p,r.y1+=p),f=r.y1+g}}function O(n,f,c,e){for(;c>=0;--c){const r=n[c],p=(r.y1-f)*e;p>1e-6&&(r.y0-=p,r.y1-=p),f=r.y0-g}}function j({sourceLinks:n,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ct);for(const{target:{targetLinks:c}}of n)c.sort(lt)}}function w(n){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of n)f.sort(ct),c.sort(lt)}function P(n,f){let c=n.y0-(n.sourceLinks.length-1)*g/2;for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c+=r+g}for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c-=r}return c}function E(n,f){let c=f.y0-(f.targetLinks.length-1)*g/2;for(const{source:e,width:r}of f.targetLinks){if(e===n)break;c+=r+g}for(const{target:e,width:r}of n.sourceLinks){if(e===f)break;c-=r}return c}return v}var et=Math.PI,nt=2*et,B=1e-6,zt=nt-B;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,l){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+l)},bezierCurveTo:function(t,i,s,l,u,x){this._+="C"+ +t+","+ +i+","+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+x)},arcTo:function(t,i,s,l,u){t=+t,i=+i,s=+s,l=+l,u=+u;var x=this._x1,g=this._y1,k=s-t,o=l-i,a=x-t,h=g-i,m=a*a+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=i);else if(m>B)if(!(Math.abs(h*k-o*a)>B)||!u)this._+="L"+(this._x1=t)+","+(this._y1=i);else{var _=s-x,d=l-g,v=k*k+o*o,T=_*_+d*d,A=Math.sqrt(v),M=Math.sqrt(m),I=u*Math.tan((et-Math.acos((v+m-T)/(2*A*M)))/2),N=I/M,$=I/A;Math.abs(N-1)>B&&(this._+="L"+(t+N*a)+","+(i+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>a*d)+","+(this._x1=t+$*k)+","+(this._y1=i+$*o)}},arc:function(t,i,s,l,u,x){t=+t,i=+i,s=+s,x=!!x;var g=s*Math.cos(l),k=s*Math.sin(l),o=t+g,a=i+k,h=1^x,m=x?l-u:u-l;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+a:(Math.abs(this._x1-o)>B||Math.abs(this._y1-a)>B)&&(this._+="L"+o+","+a),s&&(m<0&&(m=m%nt+nt),m>zt?this._+="A"+s+","+s+",0,1,"+h+","+(t-g)+","+(i-k)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=a):m>B&&(this._+="A"+s+","+s+",0,"+ +(m>=et)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(t,i,s,l){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +l+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Ft(t){return t[1]}var Rt=Array.prototype.slice;function Vt(t){return t.source}function Wt(t){return t.target}function Ut(t){var i=Vt,s=Wt,l=Bt,u=Ft,x=null;function g(){var k,o=Rt.call(arguments),a=i.apply(this,o),h=s.apply(this,o);if(x||(x=k=pt()),t(x,+l.apply(this,(o[0]=a,o)),+u.apply(this,o),+l.apply(this,(o[0]=h,o)),+u.apply(this,o)),k)return x=null,k+""||null}return g.source=function(k){return arguments.length?(i=k,g):i},g.target=function(k){return arguments.length?(s=k,g):s},g.x=function(k){return arguments.length?(l=typeof k=="function"?k:ft(+k),g):l},g.y=function(k){return arguments.length?(u=typeof k=="function"?k:ft(+k),g):u},g.context=function(k){return arguments.length?(x=k??null,g):x},g}function Gt(t,i,s,l,u){t.moveTo(i,s),t.bezierCurveTo(i=(i+l)/2,s,i,u,l,u)}function Yt(){return Ut(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var rt=(function(){var t=y(function(k,o,a,h){for(a=a||{},h=k.length;h--;a[k[h]]=o);return a},"o"),i=[1,9],s=[1,10],l=[1,5,10,12],u={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:y(function(o,a,h,m,_,d,v){var T=d.length-1;switch(_){case 7:const A=m.findOrCreateNode(d[T-4].trim().replaceAll('""','"')),M=m.findOrCreateNode(d[T-2].trim().replaceAll('""','"')),I=parseFloat(d[T].trim());m.addLink(A,M,I);break;case 8:case 9:case 11:this.$=d[T];break;case 10:this.$=d[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:i,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(l,[2,8]),t(l,[2,9]),{19:[1,16]},t(l,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:i,20:s},{15:18,16:7,17:8,18:i,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(l,[2,10]),{15:21,16:7,17:8,18:i,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:y(function(o,a){if(a.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=a,h}},"parseError"),parse:y(function(o){var a=this,h=[0],m=[],_=[null],d=[],v=this.table,T="",A=0,M=0,I=2,N=1,$=d.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var D=S.yylloc;d.push(D);var R=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,d.length=d.length-L}y(O,"popStack");function j(){var L;return L=m.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(m=L,L=m.pop()),L=a.symbols_[L]||L),L}y(j,"lex");for(var w,P,E,n,f={},c,e,r,p;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=j()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";p=[];for(c in v[P])this.terminals_[c]&&c>I&&p.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: `+S.showPosition()+` Expecting `+p.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:D,expected:p})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),d.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,D=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:d[d.length-(e||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(e||1)].first_column,last_column:d[d.length-1].last_column},R&&(f._$.range=[d[d.length-(e||1)].range[0],d[d.length-1].range[1]]),n=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,d].concat($)),typeof n<"u")return n;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),d=d.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),d.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},x=(function(){var k={EOF:1,parseError:y(function(a,h){if(this.yy.parser)this.yy.parser.parseError(a,h);else throw new Error(a)},"parseError"),setInput:y(function(o,a){return this.yy=a||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:y(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:y(function(o){var a=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===m.length?this.yylloc.first_column:0)+m[m.length-h.length].length-h[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(o){this.unput(this.match.slice(o))},"less"),pastInput:y(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js b/apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-UDhAaHfs.js similarity index 99% rename from apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js rename to apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-UDhAaHfs.js index 6ee7c9b03..bcdb8bc7a 100644 --- a/apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-Bd7WZfp3.js +++ b/apps/kimi-code/dist-web/assets/sequenceDiagram-DBY2YBRQ-UDhAaHfs.js @@ -1,4 +1,4 @@ -import{I as tr}from"./chunk-2Q5K7J3B-CqtdGPMZ.js";import{_ as x,X as er,c as $,d as Vt,l as at,j as Ce,e as rr,f as ar,k as N,b as ke,s as sr,o as ir,a as nr,g as or,p as cr,Y as lr,Z as hr,q as dr,i as Yt,y as Z,$ as Q,a0 as Pt,a1 as Me,a2 as Tr,z as Kt,a3 as pr,a4 as Be}from"./mermaid.core-DpBz6UHc.js";import{a as Er,b as ae,g as dt,d as ur,c as se,e as ie}from"./chunk-32BRIVSS-Dx199TNh.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var te=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],u=[1,14],d=[1,15],p=[1,17],_=[1,18],E=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],H=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],At=[1,74],kt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],ne=[1,87],oe=[1,88],ce=[1,89],le=[1,90],he=[1,91],de=[1,92],Te=[1,93],pe=[1,94],Ee=[1,95],ue=[1,96],fe=[1,97],_e=[1,98],ge=[1,99],xe=[1,100],Ie=[1,101],ye=[1,102],Re=[1,103],Oe=[1,104],Le=[1,105],be=[2,78],St=[4,5,17,51,53,54],Dt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Ut=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Gt=[5,52],F=[70,71,72,73],ot=[1,151],Xt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(S,v,P,y,z,c,wt){var h=c.length-1;switch(z){case 3:return y.apply(c[h]),c[h];case 4:case 10:this.$=[];break;case 5:case 11:c[h-1].push(c[h]),this.$=c[h-1];break;case 6:case 7:case 12:case 13:this.$=c[h];break;case 8:case 9:case 14:this.$=[];break;case 16:c[h].type="createParticipant",this.$=c[h];break;case 17:c[h-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[h-2])}),c[h-1].push({type:"boxEnd",boxText:c[h-2]}),this.$=c[h-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-2]),sequenceIndexStep:Number(c[h-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-1].actor};break;case 30:y.setDiagramTitle(c[h].substring(6)),this.$=c[h].substring(6);break;case 31:y.setDiagramTitle(c[h].substring(7)),this.$=c[h].substring(7);break;case 32:this.$=c[h].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[h].trim(),y.setAccDescription(this.$);break;case 35:c[h-1].unshift({type:"loopStart",loopText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.LOOP_START}),c[h-1].push({type:"loopEnd",loopText:c[h-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[h-1];break;case 36:c[h-1].unshift({type:"rectStart",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_START}),c[h-1].push({type:"rectEnd",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[h-1];break;case 37:c[h-1].unshift({type:"optStart",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_START}),c[h-1].push({type:"optEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[h-1];break;case 38:c[h-1].unshift({type:"altStart",altText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.ALT_START}),c[h-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[h-1];break;case 39:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 40:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 41:c[h-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.CRITICAL_START}),c[h-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[h-1];break;case 42:c[h-1].unshift({type:"breakStart",breakText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_START}),c[h-1].push({type:"breakEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[h-1];break;case 44:this.$=c[h-3].concat([{type:"option",optionText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[h]]);break;case 46:this.$=c[h-3].concat([{type:"and",parText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.PAR_AND},c[h]]);break;case 48:this.$=c[h-3].concat([{type:"else",altText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.ALT_ELSE},c[h]]);break;case 49:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 50:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 51:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 52:case 57:c[h-1].draw="actor",c[h-1].type="addParticipant",this.$=c[h-1];break;case 53:c[h-1].type="destroyParticipant",this.$=c[h-1];break;case 54:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 55:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 56:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 58:this.$=[c[h-1],{type:"addNote",placement:c[h-2],actor:c[h-1].actor,text:c[h]}];break;case 59:c[h-2]=[].concat(c[h-1],c[h-1]).slice(0,2),c[h-2][0]=c[h-2][0].actor,c[h-2][1]=c[h-2][1].actor,this.$=[c[h-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[h-2].slice(0,2),text:c[h]}];break;case 60:this.$=[c[h-1],{type:"addLinks",actor:c[h-1].actor,text:c[h]}];break;case 61:this.$=[c[h-1],{type:"addALink",actor:c[h-1].actor,text:c[h]}];break;case 62:this.$=[c[h-1],{type:"addProperties",actor:c[h-1].actor,text:c[h]}];break;case 63:this.$=[c[h-1],{type:"addDetails",actor:c[h-1].actor,text:c[h]}];break;case 66:this.$=[c[h-2],c[h]];break;case 67:this.$=c[h];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor}];break;case 71:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-4].actor}];break;case 72:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor}];break;case 73:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-4].actor}];break;case 74:this.$=[c[h-5],c[h-1],{type:"addMessage",from:c[h-5].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-5].actor}];break;case 75:this.$=[c[h-3],c[h-1],{type:"addMessage",from:c[h-3].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h]}];break;case 76:this.$={type:"addParticipant",actor:c[h-1],config:c[h]};break;case 77:this.$=c[h-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[h]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[h].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,5]),{9:48,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:At},{23:75,55:76,73:At},{23:77,73:Y},{69:78,72:[1,79],78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],be),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Dt,i,{7:120}),e(Dt,i,{7:121}),e(Dt,i,{7:122}),e(me,i,{41:123,7:124}),e(Ut,i,{43:125,7:126}),e(Ut,i,{7:126,43:127}),e(Ae,i,{46:128,7:129}),e(Dt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Gt,be,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,161],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,162],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,163],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,47],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,50:[1,165],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,45],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,49:[1,167],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,43],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,48:[1,170],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,171],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Gt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:U,53:G,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(St,[2,12]),e(me,i,{7:124,41:201}),e(Ut,i,{7:126,43:202}),e(Ae,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Gt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(S,v){if(v.recoverable)this.trace(S);else{var P=new Error(S);throw P.hash=v,P}},"parseError"),parse:x(function(S){var v=this,P=[0],y=[],z=[null],c=[],wt=this.table,h="",Ct=0,Se=0,Ze=2,we=1,Qe=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Jt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Jt)&&(gt.yy[Jt]=this.yy[Jt]);J.setInput(S,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Zt=J.yylloc;c.push(Zt);var $e=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(it){P.length=P.length-2*it,z.length=z.length-it,c.length=c.length-it}x(je,"popStack");function Ne(){var it;return it=y.pop()||J.lex()||we,typeof it!="number"&&(it instanceof Array&&(y=it,it=y.pop()),it=v.symbols_[it]||it),it}x(Ne,"lex");for(var rt,xt,ct,Qt,Lt={},Mt,Tt,Pe,Bt;;){if(xt=P[P.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Ne()),ct=wt[xt]&&wt[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var $t="";Bt=[];for(Mt in wt[xt])this.terminals_[Mt]&&Mt>Ze&&Bt.push("'"+this.terminals_[Mt]+"'");J.showPosition?$t="Parse error on line "+(Ct+1)+`: +import{I as tr}from"./chunk-2Q5K7J3B-vvrZ7MG7.js";import{_ as x,X as er,c as $,d as Vt,l as at,j as Ce,e as rr,f as ar,k as N,b as ke,s as sr,o as ir,a as nr,g as or,p as cr,Y as lr,Z as hr,q as dr,i as Yt,y as Z,$ as Q,a0 as Pt,a1 as Me,a2 as Tr,z as Kt,a3 as pr,a4 as Be}from"./mermaid.core-BKBZnrB_.js";import{a as Er,b as ae,g as dt,d as ur,c as se,e as ie}from"./chunk-32BRIVSS-CZoTGle4.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var te=(function(){var e=x(function(ut,S,v,P){for(v=v||{},P=ut.length;P--;v[ut[P]]=S);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],u=[1,14],d=[1,15],p=[1,17],_=[1,18],E=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],w=[1,32],A=[1,33],D=[1,34],M=[1,35],V=[1,36],W=[1,37],U=[1,38],G=[1,39],X=[1,40],nt=[1,42],j=[1,43],H=[1,44],st=[1,45],tt=[1,46],Y=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],At=[1,74],kt=[1,80],m=[1,81],k=[1,82],lt=[1,83],et=[1,84],K=[1,85],Ot=[1,86],ne=[1,87],oe=[1,88],ce=[1,89],le=[1,90],he=[1,91],de=[1,92],Te=[1,93],pe=[1,94],Ee=[1,95],ue=[1,96],fe=[1,97],_e=[1,98],ge=[1,99],xe=[1,100],Ie=[1,101],ye=[1,102],Re=[1,103],Oe=[1,104],Le=[1,105],be=[2,78],St=[4,5,17,51,53,54],Dt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Ut=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Ae=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Gt=[5,52],F=[70,71,72,73],ot=[1,151],Xt={trace:x(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:x(function(S,v,P,y,z,c,wt){var h=c.length-1;switch(z){case 3:return y.apply(c[h]),c[h];case 4:case 10:this.$=[];break;case 5:case 11:c[h-1].push(c[h]),this.$=c[h-1];break;case 6:case 7:case 12:case 13:this.$=c[h];break;case 8:case 9:case 14:this.$=[];break;case 16:c[h].type="createParticipant",this.$=c[h];break;case 17:c[h-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[h-2])}),c[h-1].push({type:"boxEnd",boxText:c[h-2]}),this.$=c[h-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-2]),sequenceIndexStep:Number(c[h-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[h-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-1].actor};break;case 30:y.setDiagramTitle(c[h].substring(6)),this.$=c[h].substring(6);break;case 31:y.setDiagramTitle(c[h].substring(7)),this.$=c[h].substring(7);break;case 32:this.$=c[h].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[h].trim(),y.setAccDescription(this.$);break;case 35:c[h-1].unshift({type:"loopStart",loopText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.LOOP_START}),c[h-1].push({type:"loopEnd",loopText:c[h-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[h-1];break;case 36:c[h-1].unshift({type:"rectStart",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_START}),c[h-1].push({type:"rectEnd",color:y.parseMessage(c[h-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[h-1];break;case 37:c[h-1].unshift({type:"optStart",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_START}),c[h-1].push({type:"optEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[h-1];break;case 38:c[h-1].unshift({type:"altStart",altText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.ALT_START}),c[h-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[h-1];break;case 39:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 40:c[h-1].unshift({type:"parStart",parText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[h-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[h-1];break;case 41:c[h-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.CRITICAL_START}),c[h-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[h-1];break;case 42:c[h-1].unshift({type:"breakStart",breakText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_START}),c[h-1].push({type:"breakEnd",optText:y.parseMessage(c[h-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[h-1];break;case 44:this.$=c[h-3].concat([{type:"option",optionText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[h]]);break;case 46:this.$=c[h-3].concat([{type:"and",parText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.PAR_AND},c[h]]);break;case 48:this.$=c[h-3].concat([{type:"else",altText:y.parseMessage(c[h-1]),signalType:y.LINETYPE.ALT_ELSE},c[h]]);break;case 49:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 50:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 51:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 52:case 57:c[h-1].draw="actor",c[h-1].type="addParticipant",this.$=c[h-1];break;case 53:c[h-1].type="destroyParticipant",this.$=c[h-1];break;case 54:c[h-3].draw="participant",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 55:c[h-1].draw="participant",c[h-1].type="addParticipant",this.$=c[h-1];break;case 56:c[h-3].draw="actor",c[h-3].type="addParticipant",c[h-3].description=y.parseMessage(c[h-1]),this.$=c[h-3];break;case 58:this.$=[c[h-1],{type:"addNote",placement:c[h-2],actor:c[h-1].actor,text:c[h]}];break;case 59:c[h-2]=[].concat(c[h-1],c[h-1]).slice(0,2),c[h-2][0]=c[h-2][0].actor,c[h-2][1]=c[h-2][1].actor,this.$=[c[h-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[h-2].slice(0,2),text:c[h]}];break;case 60:this.$=[c[h-1],{type:"addLinks",actor:c[h-1].actor,text:c[h]}];break;case 61:this.$=[c[h-1],{type:"addALink",actor:c[h-1].actor,text:c[h]}];break;case 62:this.$=[c[h-1],{type:"addProperties",actor:c[h-1].actor,text:c[h]}];break;case 63:this.$=[c[h-1],{type:"addDetails",actor:c[h-1].actor,text:c[h]}];break;case 66:this.$=[c[h-2],c[h]];break;case 67:this.$=c[h];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[h-1].actor}];break;case 71:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[h-4].actor}];break;case 72:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor}];break;case 73:this.$=[c[h-4],c[h-1],{type:"addMessage",from:c[h-4].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-4].actor}];break;case 74:this.$=[c[h-5],c[h-1],{type:"addMessage",from:c[h-5].actor,to:c[h-1].actor,signalType:c[h-3],msg:c[h],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[h-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[h-5].actor}];break;case 75:this.$=[c[h-3],c[h-1],{type:"addMessage",from:c[h-3].actor,to:c[h-1].actor,signalType:c[h-2],msg:c[h]}];break;case 76:this.$={type:"addParticipant",actor:c[h-1],config:c[h]};break;case 77:this.$=c[h-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[h]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[h].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,5]),{9:48,13:13,14:u,15:d,18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:Y},{23:56,73:Y},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:At},{23:75,55:76,73:At},{23:77,73:Y},{69:78,72:[1,79],78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:Y},{23:111,73:Y},{23:112,73:Y},{23:113,73:Y},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],be),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(Dt,i,{7:120}),e(Dt,i,{7:121}),e(Dt,i,{7:122}),e(me,i,{41:123,7:124}),e(Ut,i,{43:125,7:126}),e(Ut,i,{7:126,43:127}),e(Ae,i,{46:128,7:129}),e(Dt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Gt,be,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:Y},{69:146,78:kt,79:m,80:k,81:lt,82:et,83:K,84:Ot,85:ne,86:oe,87:ce,88:le,89:he,90:de,91:Te,92:pe,93:Ee,94:ue,95:fe,96:_e,97:ge,98:xe,99:Ie,100:ye,101:Re,102:Oe,103:Le},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:Y},{23:149,60:148,73:Y},{73:[2,68]},{73:[2,69]},{58:150,104:ot},{58:152,104:ot},{58:153,104:ot},{58:154,104:ot},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,161],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,162],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,163],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,47],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,50:[1,165],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,45],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,49:[1,167],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[2,43],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,48:[1,170],51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{4:n,5:s,8:8,9:10,10:o,13:13,14:u,15:d,17:[1,171],18:16,19:p,22:_,23:41,24:E,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:w,40:A,42:D,44:M,45:V,47:W,51:U,53:G,54:X,56:nt,61:j,62:H,63:st,64:tt,73:Y},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Gt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:Y},{23:178,73:Y},{23:179,73:Y},{58:180,104:ot},{23:181,72:[1,182],73:Y},{58:183,104:ot},{58:184,104:ot},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:U,53:G,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ot},{58:196,104:ot},{58:197,104:ot},{5:[2,75]},{58:198,104:ot},{23:199,73:Y},{5:[2,58]},{5:[2,59]},{23:200,73:Y},e(St,[2,12]),e(me,i,{7:124,41:201}),e(Ut,i,{7:126,43:202}),e(Ae,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Gt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ot},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:x(function(S,v){if(v.recoverable)this.trace(S);else{var P=new Error(S);throw P.hash=v,P}},"parseError"),parse:x(function(S){var v=this,P=[0],y=[],z=[null],c=[],wt=this.table,h="",Ct=0,Se=0,Ze=2,we=1,Qe=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Jt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Jt)&&(gt.yy[Jt]=this.yy[Jt]);J.setInput(S,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Zt=J.yylloc;c.push(Zt);var $e=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(it){P.length=P.length-2*it,z.length=z.length-it,c.length=c.length-it}x(je,"popStack");function Ne(){var it;return it=y.pop()||J.lex()||we,typeof it!="number"&&(it instanceof Array&&(y=it,it=y.pop()),it=v.symbols_[it]||it),it}x(Ne,"lex");for(var rt,xt,ct,Qt,Lt={},Mt,Tt,Pe,Bt;;){if(xt=P[P.length-1],this.defaultActions[xt]?ct=this.defaultActions[xt]:((rt===null||typeof rt>"u")&&(rt=Ne()),ct=wt[xt]&&wt[xt][rt]),typeof ct>"u"||!ct.length||!ct[0]){var $t="";Bt=[];for(Mt in wt[xt])this.terminals_[Mt]&&Mt>Ze&&Bt.push("'"+this.terminals_[Mt]+"'");J.showPosition?$t="Parse error on line "+(Ct+1)+`: `+J.showPosition()+` Expecting `+Bt.join(", ")+", got '"+(this.terminals_[rt]||rt)+"'":$t="Parse error on line "+(Ct+1)+": Unexpected "+(rt==we?"end of input":"'"+(this.terminals_[rt]||rt)+"'"),this.parseError($t,{text:J.match,token:this.terminals_[rt]||rt,line:J.yylineno,loc:Zt,expected:Bt})}if(ct[0]instanceof Array&&ct.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+rt);switch(ct[0]){case 1:P.push(rt),z.push(J.yytext),c.push(J.yylloc),P.push(ct[1]),rt=null,Se=J.yyleng,h=J.yytext,Ct=J.yylineno,Zt=J.yylloc;break;case 2:if(Tt=this.productions_[ct[1]][1],Lt.$=z[z.length-Tt],Lt._$={first_line:c[c.length-(Tt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Tt||1)].first_column,last_column:c[c.length-1].last_column},$e&&(Lt._$.range=[c[c.length-(Tt||1)].range[0],c[c.length-1].range[1]]),Qt=this.performAction.apply(Lt,[h,Se,Ct,gt.yy,ct[1],z,c].concat(Qe)),typeof Qt<"u")return Qt;Tt&&(P=P.slice(0,-1*Tt*2),z=z.slice(0,-1*Tt),c=c.slice(0,-1*Tt)),P.push(this.productions_[ct[1]][0]),z.push(Lt.$),c.push(Lt._$),Pe=wt[P[P.length-2]][P[P.length-1]],P.push(Pe);break;case 3:return!0}}return!0},"parse")},Je=(function(){var ut={EOF:1,parseError:x(function(v,P){if(this.yy.parser)this.yy.parser.parseError(v,P);else throw new Error(v)},"parseError"),setInput:x(function(S,v){return this.yy=v||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:x(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var v=S.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},"input"),unput:x(function(S){var v=S.length,P=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),P.length-1&&(this.yylineno-=P.length-1);var z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:P?(P.length===y.length?this.yylloc.first_column:0)+y[y.length-P.length].length-P[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:x(function(S){this.unput(this.match.slice(S))},"less"),pastInput:x(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var S=this.pastInput(),v=new Array(S.length+1).join("-");return S+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-C2VEYVmu.js b/apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-DkAB-D09.js similarity index 86% rename from apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-C2VEYVmu.js rename to apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-DkAB-D09.js index e790a2b6e..91af4ae9c 100644 --- a/apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-C2VEYVmu.js +++ b/apps/kimi-code/dist-web/assets/sizeCapture-X5ZJPWSS-DkAB-D09.js @@ -1 +1 @@ -import{_ as o}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes}; +import{_ as o}from"./mermaid.core-BKBZnrB_.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var p=1;function i(){if(!(typeof globalThis>"u"))return globalThis}o(i,"getCaptureGlobal");function c(){return!!i()?.mermaidCaptureSizes}o(c,"shouldCaptureSizes");function u(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}o(u,"capturedFromLocation");function d(n,r){const t=i();if(!t)return;const e=r.node(),s=((e&&"ownerSVGElement"in e?e.ownerSVGElement:null)??e)?.id??"(unknown)";t.mermaidCapturedSizes??=[];const a={svgId:s,sizes:n};t.mermaidCapturedSizes.push(a),t.mermaidLastCapturedSizes=a}o(d,"emitCapturedSizes");function m(n,r){const t=[];for(const e of r.nodes)e.isGroup||t.push({id:e.id,width:e.width??0,height:e.height??0});t.length!==0&&d({metadata:{captureVersion:p,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:t},n)}o(m,"captureNodeSizes");export{m as captureNodeSizes,c as shouldCaptureSizes}; diff --git a/apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-DxGZaCFf.js b/apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-C83-b98K.js similarity index 96% rename from apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-DxGZaCFf.js rename to apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-C83-b98K.js index 7fc2eb3c5..43e3cbfff 100644 --- a/apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-DxGZaCFf.js +++ b/apps/kimi-code/dist-web/assets/stateDiagram-2N3HPSRC-C83-b98K.js @@ -1 +1 @@ -import{s as R,a as W,S as N}from"./chunk-EX3LRPZG-5GJmdVbS.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,a7 as _,a8 as U,a3 as C,y as F}from"./mermaid.core-DpBz6UHc.js";import{G as O}from"./graph-DOmOIIwC.js";import{l as J}from"./layout-D-LzfAck.js";import"./chunk-XXDRQBXY-BYo5O_6D.js";import"./chunk-VR4S4FIN-JAO0vJUe.js";import"./chunk-32BRIVSS-Dx199TNh.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./map-DxJ2ADlA.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},xt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{xt as diagram}; +import{s as R,a as W,S as N}from"./chunk-EX3LRPZG-CfpEIqXB.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,a7 as _,a8 as U,a3 as C,y as F}from"./mermaid.core-BKBZnrB_.js";import{G as O}from"./graph-DOmOIIwC.js";import{l as J}from"./layout-D-LzfAck.js";import"./chunk-XXDRQBXY-BeefoqH0.js";import"./chunk-VR4S4FIN-CTR9P-lT.js";import"./chunk-32BRIVSS-CZoTGle4.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";import"./map-DxJ2ADlA.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=A(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},xt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{xt as diagram}; diff --git a/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-BudL4GKN.js b/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-BudL4GKN.js deleted file mode 100644 index b4051d7d3..000000000 --- a/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-BudL4GKN.js +++ /dev/null @@ -1 +0,0 @@ -import{s as r,b as e,a,S as s}from"./chunk-EX3LRPZG-5GJmdVbS.js";import{_ as i}from"./mermaid.core-DpBz6UHc.js";import"./chunk-XXDRQBXY-BYo5O_6D.js";import"./chunk-VR4S4FIN-JAO0vJUe.js";import"./chunk-32BRIVSS-Dx199TNh.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-DuUdJv-B.js b/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-DuUdJv-B.js new file mode 100644 index 000000000..f3d41d3e4 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/stateDiagram-v2-6OUMAXLB-DuUdJv-B.js @@ -0,0 +1 @@ +import{s as r,b as e,a,S as s}from"./chunk-EX3LRPZG-CfpEIqXB.js";import{_ as i}from"./mermaid.core-BKBZnrB_.js";import"./chunk-XXDRQBXY-BeefoqH0.js";import"./chunk-VR4S4FIN-CTR9P-lT.js";import"./chunk-32BRIVSS-CZoTGle4.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-BaZl8tge.js b/apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-CfDcaFta.js similarity index 99% rename from apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-BaZl8tge.js rename to apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-CfDcaFta.js index 1400222ed..2b3c8ef83 100644 --- a/apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-BaZl8tge.js +++ b/apps/kimi-code/dist-web/assets/swimlanes-5IMT3BWC-CfDcaFta.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-C2VEYVmu.js","assets/mermaid.core-DpBz6UHc.js","assets/index-_5lXYMaO.js","assets/index-C_ObXpF5.css","assets/_commonjsHelpers-CqkleIqs.js"])))=>i.map(i=>d[i]); -import{bR as Er}from"./index-_5lXYMaO.js";import{c as Tr}from"./chunk-RYQCIY6F-DYUKYgim.js";import{am as wr,an as Ar,ao as Rr,ap as Nr,l as Ke,c as Or,ag as Pr,af as Br,ah as kr,at as _r,av as Fr,z as Dr,as as Hr,aw as Xr,y as Oe,ax as Ye,_ as d,ay as Ao}from"./mermaid.core-DpBz6UHc.js";import{G as Yr}from"./graph-DOmOIIwC.js";import"./map-DxJ2ADlA.js";import"./_commonjsHelpers-CqkleIqs.js";async function _o(t,e){const n=new Yr({multigraph:!0,compound:!0}),o=[...e.edges],s=Or(),r=t.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),c=r.insert("g").attr("class","edges edgePath"),a=r.insert("g").attr("class","edgeLabels"),l=r.insert("g").attr("class","nodes"),g=new Map,x=t.node()!=null;await Promise.all(e.nodes.map(async I=>{if(I.isGroup)n.setNode(I.id,{...I});else{if(x){const u=await Pr(l,I,{config:s,dir:I.dir}),p=u.node()?.getBBox()??{width:0,height:0};g.set(I.id,u),I.width=p.width,I.height=p.height}n.setNode(I.id,{...I})}}));for(const I of o)n.setEdge(I.start,I.end,{...I},I.id),e.edges.some(p=>p.id===I.id)||e.edges.push(I);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:I}=await Er(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-X5ZJPWSS-C2VEYVmu.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3,4]));I(t,e)}return{graph:n,groups:{clusters:i,edgePaths:c,edgeLabels:a,nodes:l,rootGroups:r},nodeElements:g}}d(_o,"createGraphWithElements");var Ro=5,Ge=1e-5,$e=1e-6;function qe(t){const e=[];for(let n=0;n<t.length-1;n++)e.push({a:t[n],b:t[n+1]});return e}d(qe,"buildSegmentList");function Fo(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,c=o.y-n.y,a=s*c-r*i;if(a===0)return null;const l=n.x-t.x,g=n.y-t.y,x=(l*c-g*i)/a,I=(l*r-g*s)/a;return x<=$e||x>=1-$e||I<=$e||I>=1-$e?null:{point:{x:t.x+x*s,y:t.y+x*r},tA:x,tB:I}}d(Fo,"segmentIntersection");function vn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(vn,"isHorizontalSeg");function Do(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n],s=qe(o.points);for(let r=n+1;r<t.length;r++){const i=t[r],c=qe(i.points);for(const[a,l]of s.entries())for(const[g,x]of c.entries()){const I=Fo(l.a,l.b,x.a,x.b);if(!I)continue;const u=vn(l),p=vn(x);(u!==p?u:!1)?e.push({jumpEdgeId:o.id,otherEdgeId:i.id,segIndex:a,t:I.tA,point:I.point}):e.push({jumpEdgeId:i.id,otherEdgeId:o.id,segIndex:g,t:I.tB,point:I.point})}}}return e}d(Do,"findEdgeIntersections");function re(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}d(re,"fmt");function we(t){return`${re(t.x)},${re(t.y)}`}d(we,"pointToString");function Ho(t){const e=t.b.x-t.a.x,n=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(n)?e>=0?1:0:n>=0?1:0}d(Ho,"getArcSweepFlag");var Gr=.001;function Xo(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&Ao[e.arrowTypeStart];if(o){const r=t[0],i=t[1],c=Math.atan2(i.y-r.y,i.x-r.x);n[0].x=r.x+o*Math.cos(c),n[0].y=r.y+o*Math.sin(c)}const s=e.arrowTypeEnd&&Ao[e.arrowTypeEnd];if(s){const r=t.length,i=t[r-2],c=t[r-1],a=Math.atan2(c.y-i.y,c.x-i.x);n[r-1].x=c.x-s*Math.cos(a),n[r-1].y=c.y-s*Math.sin(a)}return n}d(Xo,"applyMarkerOffsets");function Yo(t,e,n,o,s){const r=t.point.x,i=t.point.y,c={x:r-e*t.r,y:i-n*t.r},a={x:r+e*t.r,y:i+n*t.r},l=[`L${we(c)}`];return s==="arc"?l.push(`A${re(t.r)},${re(t.r)} 0 0 ${o} ${we(a)}`):l.push(`M${we(a)}`),l}d(Yo,"emitJump");function Ln(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=n.x-e.x,c=n.y-e.y,a=Math.hypot(s,r),l=Math.hypot(i,c);if(a<Ge||l<Ge)return null;const g=s/a,x=r/a,I=i/l,u=c/l,p=g*I+x*u,f=Math.max(-1,Math.min(1,p)),y=Math.acos(f);if(y<Ge||Math.abs(Math.PI-y)<Ge)return null;const v=Math.min(o/Math.sin(y/2),a/2,l/2);return{startX:e.x-g*v,startY:e.y-x*v,endX:e.x+I*v,endY:e.y+u*v,ctrlX:e.x,ctrlY:e.y,cutLen:v}}d(Ln,"computeRoundedCorner");function Go(t,e,n){const o=t.points;if(o.length<2)return"";const s=Xo(o,t),r=t.curve==="rounded",i=qe(s),c=new Map;for(const l of e){const g=i[l.segIndex];if(!g)continue;const x=Math.hypot(g.b.x-g.a.x,g.b.y-g.a.y),I=c.get(l.segIndex)??[];I.push({t:l.t,point:l.point,d:l.t*x,r:n.jumpRadius}),c.set(l.segIndex,I)}const a=[`M${we(s[0])}`];for(let l=0;l<i.length;l++){const g=i[l],x=Math.hypot(g.b.x-g.a.x,g.b.y-g.a.y),I=x===0?0:(g.b.x-g.a.x)/x,u=x===0?0:(g.b.y-g.a.y)/x,p=Ho(g);let f=0;if(r&&l>0){const E=Ln(s[l-1],s[l],s[l+1]??s[l],Ro);E&&(f=E.cutLen)}let y=x,v=null;r&&l<i.length-1&&(v=Ln(s[l],s[l+1],s[l+2]??s[l+1],Ro),v&&(y=x-v.cutLen));const M=[...c.get(l)??[]].sort((E,T)=>E.t-T.t);for(const E of M)E.r=Math.min(E.r,E.d-f,y-E.d);for(let E=0;E<M.length-1;E++){const T=M[E+1].d-M[E].d;if(M[E].r+M[E+1].r>T){const m=T/2;M[E].r=Math.min(M[E].r,m),M[E+1].r=Math.min(M[E+1].r,m)}}for(const E of M)E.r<Gr||a.push(...Yo(E,I,u,p,n.jumpStyle));r&&v?(a.push(`L${re(v.startX)},${re(v.startY)}`),a.push(`Q${re(v.ctrlX)},${re(v.ctrlY)} ${re(v.endX)},${re(v.endY)}`)):a.push(`L${we(g.b)}`)}return a.join(" ")}d(Go,"rewriteEdgePath");function $o(t){return/^[\d\s+,.LMelm-]*$/.test(t)}d($o,"isStraightPath");function zo(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}d(zo,"curveSupportsLineHops");function Vo(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),n=JSON.parse(e);if(!Array.isArray(n))return null;const o=[];for(const s of n)s&&typeof s.x=="number"&&typeof s.y=="number"&&o.push({x:s.x,y:s.y});return o.length>=2?o:null}catch{return null}}d(Vo,"decodeDataPoints");function jo(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const l of e)s.set(l.id,l);const r=[],i=new Map;for(const l of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(l.id):l.id,x=o.querySelector(`path[data-id="${g}"]`);if(!x)continue;i.set(l.id,x);const u=Vo(x.getAttribute("data-points"))??l.points;r.push({...l,points:u})}const c=Do(r);if(c.length===0)return;const a=new Map;for(const l of c){const g=a.get(l.jumpEdgeId)??[];g.push(l),a.set(l.jumpEdgeId,g)}for(const l of r){const g=a.get(l.id);if(!g||g.length===0)continue;const I=s.get(l.id)?.curve;if(I!==void 0&&!zo(I))continue;const u=i.get(l.id);if(!u)continue;if(I===void 0){const E=u.getAttribute("d")??"";if(!$o(E))continue}const p=u.getAttribute("style")??"",f=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(p),y=f?Number.parseFloat(f[1]):null,v=f?Number.parseFloat(f[2]):null,M=Go(l,g,n);if(u.setAttribute("d",M),y!==null&&v!==null&&typeof u.getTotalLength=="function"){const E=u.getTotalLength(),T=Math.max(0,E-y-v),m=`0 ${y} ${T} ${v}`,S=p.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${m};`).replace(/;\s*;+/g,";");u.setAttribute("style",S)}}}d(jo,"applyLineJumpsToSvg");async function Uo(t,e){for(const s of t.nodes)s.isGroup?await Br(e.clusters,s):kr(s);const n=new Map;for(const s of t.nodes)s?.id&&n.set(s.id,s);for(const s of t.edges){const r=s.start?n.get(s.start)??{}:{},i=s.end?n.get(s.end)??{}:{},c=_r(e.edgePaths,{...s},{},t.type,r,i,t.diagramId);s.label&&await Fr(e.rootGroups,s),s.label&&Wo(s,c)}const o=t.config?.swimlane?.lineHops;if(o!==!1){const s=o==="gap"?"gap":"arc",r=t.edges.filter(i=>Array.isArray(i.points)&&i.points.length>=2).map(i=>({id:i.id,points:i.points,curve:i.curve,arrowTypeStart:i.arrowTypeStart,arrowTypeEnd:i.arrowTypeEnd}));jo(e.edgePaths,r,{enabled:!0,jumpRadius:6,jumpStyle:s})}}d(Uo,"adjustLayout");function Wo(t,e){const n=e?.updatedPath??e?.originalPath,o=Dr(),{subGraphTitleTotalMargin:s}=Hr({flowchart:o.flowchart??{}});if(t.label){const r=Xr.get(t.id);let i=t.x,c=t.y;if(n){const a=Oe.calcLabelPosition(n);Ke.debug("Moving label "+t.label+" from (",i,",",c,") to (",a.x,",",a.y,") abc88"),e&&(i=a.x,c=a.y)}r.attr("transform",`translate(${i}, ${c+s/2})`)}if(t?.startLabelLeft){const r=Ye.get(t.id).startLeft;let i=t?.x,c=t?.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.startLabelRight){const r=Ye.get(t.id).startRight;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.endLabelLeft){const r=Ye.get(t.id).endLeft;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.endLabelRight){const r=Ye.get(t.id).endRight;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}}d(Wo,"positionEdgeLabel");var Mn="__swimlane_default__",$r=21,No=20;function En(t){return Math.max(t.padding??No,No)}d(En,"topLaneHorizontalPadding");function Ko(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const i=n-s/2,c=Math.min(r,n+s/2),a=Math.min($r,Math.max(0,c-i)),l=i+a;if(l<=i){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:i,bottom:l}}d(Ko,"assignTopLaneTitleRect");function qo(t){const e=t.direction,n=t.nodes??=[];for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===Mn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:Mn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=Mn}d(qo,"prepareLayoutForSwimlanes");function Jo(t){const e=new Map;for(const a of t.nodes??[])e.set(a.id,a);const n=[];for(const a of t.edges??[]){const l=typeof a.start=="string"?a.start:void 0,g=typeof a.end=="string"?a.end:void 0;!l||!g||a.labelNodeId||n.push({id:a.id,src:l,dst:g,ref:a})}const o=t.nodes??[],s=o.filter(a=>a.isGroup),r=o.filter(a=>!a.isGroup);return{nodes:[...[...s].reverse(),...r].map(a=>a.id),edges:n,layout:t,nodeById:e}}d(Jo,"toGraphView");function Zo(t,e,n,o){const{layout:s}=t,r=t.nodeById,i=o?.layerGap??100,c=o?.nodeGap??40;let a=0;for(const I of e.layers){let u=0;for(const p of I){const f=r.get(p);if(!f){u++;continue}f.layer=a,f.order=u;const y=n.x[p]??u*c,v=n.y[p]??a*i;f.x=y,f.y=v,u++}a++}const l=s.nodes??[],g=new Map,x=[];for(const I of l){if(!I?.isGroup)continue;I.parentId||x.push(I);const u=l.filter(M=>M.parentId===I.id);let p=1/0,f=-1/0,y=1/0,v=-1/0;for(const M of u){const E=M.x??n.x[M.id],T=M.y??n.y[M.id],m=M.width??0,S=M.height??0;E!=null&&T!=null&&(p=Math.min(p,E-m/2),f=Math.max(f,E+m/2),y=Math.min(y,T-S/2),v=Math.max(v,T+S/2))}if(p===1/0||y===1/0)I.x=I.x??0,I.y=I.y??0,I.width=I.width??0,I.height=I.height??0;else{const M=I.padding??20,E=I.parentId?M:2*En(I),T=M,m=Math.max(0,f-p)+E,S=Math.max(0,v-y)+T,A=(p+f)/2,R=(y+v)/2;I.x=A,I.y=R,I.width=m,I.height=S,g.set(I.id,{minX:p,maxX:f,minY:y,maxY:v})}}if(x.length>0&&g.size>0){let I=1/0,u=-1/0,p=0;for(const f of x){const y=f.padding??20;y>p&&(p=y);const v=g.get(f.id);v&&(I=Math.min(I,v.minY),u=Math.max(u,v.maxY))}if(I!==1/0&&u!==-1/0){const f=Math.max(0,u-I),v=Math.max(p,36),M=f+2*v,E=(I+u)/2;for(const k of x)k.y=E,k.height=M,k.swimlaneContentTop=I;const T=[...x].sort((k,O)=>{const _=k.x??0,H=O.x??0;return _-H}),m=[],S=[],A=[];for(const k of T){const O=g.get(k.id);if(!O)continue;const _=Math.max(0,O.maxX-O.minX)+2*En(k),H=(O.minX+O.maxX)/2;m.push(k.id),S.push(H),A.push(_)}const R=m.length;if(R>0){const k=new Map;if(R===1)k.set(m[0],A[0]);else{const O=[];for(let j=0;j<R-1;j++)O.push(S[j+1]-S[j]);const _=new Array(R);_[0]=0;for(let j=0;j<R-1;j++)_[j+1]=2*O[j]-_[j];let H=0,P=Number.POSITIVE_INFINITY;for(let j=0;j<R;j++){const J=A[j];j%2===0?H=Math.max(H,J-_[j]):P=Math.min(P,_[j]-J)}let G=H;H<=P?G=(H+P)/2:G=H;for(let j=0;j<R;j++){const J=_[j]+(j%2===0?G:-G),dt=Math.max(A[j],J);k.set(m[j],dt)}}for(const O of x){const _=k.get(O.id);_!=null&&(O.width=_),Ko(O)}}}}}d(Zo,"writeBackToLayoutData");var zr="[EdgeLabelNodes]";function Qo(t){const e=[],n=[],o=new Map;for(const i of t.nodes)o.set(i.id,i);for(const i of t.edges){if(!i.label||i.label.length===0||i.isLayoutOnly||i.labelNodeId)continue;const c=i.start?o.get(i.start):void 0,a=i.end?o.get(i.end):void 0;if(!c||!a){Ke.warn(zr,`Edge ${i.id} has missing source or target node`);continue}const l=`edge-label-${i.start}-${i.end}-${i.id}`,x=c.parentId!==a.parentId?a.parentId:c.parentId,I={id:l,label:i.label,edgeStart:i.start??"",edgeEnd:i.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:x,isGroup:!1,labelStyle:Array.isArray(i.labelStyle)?i.labelStyle[0]:i.labelStyle??"",...c.dir?{dir:c.dir}:{}};e.push(I),i.labelNodeId=l,i.label=void 0,i.text=void 0;const u={id:`${i.id}-to-label`,start:i.start,end:l,type:"normal",isLayoutOnly:!0},p={id:`${i.id}-from-label`,start:l,end:i.end,type:"normal",isLayoutOnly:!0};n.push(u,p)}const s=[...t.nodes,...e],r=[...t.edges,...n];return{...t,nodes:s,edges:r}}d(Qo,"createEdgeLabelNodes");var Ft=.001;function oo(t){const e=t.x??0,n=t.y??0,o=t.width??0,s=t.height??0;return o>0&&s>0?{cx:e,cy:n,rect:Ae(e,n,o,s)}:void 0}d(oo,"measuredNodeRect");function so(t){if(t.isGroup)return;const e=oo(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(so,"nodeBoundsInfoFor");function oe(t,e,n=Ft){return Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n}d(oe,"samePoint");function ft(t,e,n=Ft){return Math.abs(t.x-e.x)<n}d(ft,"sameX");function ht(t,e,n=Ft){return Math.abs(t.y-e.y)<n}d(ht,"sameY");function Tt(t,e,n=Ft){return ht(t,e,n)&&Math.abs(t.x-e.x)>n}d(Tt,"isHorizontalSegment");function wt(t,e,n=Ft){return ft(t,e,n)&&Math.abs(t.y-e.y)>n}d(wt,"isVerticalSegment");function zt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(zt,"overlapLength");function ce(t,e,n=Ft){return t.horizontal&&e.horizontal&&ht(t.a,e.a,n)?zt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&ft(t.a,e.a,n)?zt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(ce,"sameAxisSegmentOverlapLength");function Re(t,e=Ft){const n=[];for(let o=0;o<t.length-1;o++){const s=t[o],r=t[o+1],i=Tt(s,r,e),c=wt(s,r,e);(i||c)&&n.push({index:o,a:s,b:r,horizontal:i,vertical:c})}return n}d(Re,"orthogonalSegmentsForPoints");function Qt(t,e=Ft){const n=Re(t,e);let o=0;for(let s=1;s<n.length;s++)n[s-1].horizontal!==n[s].horizontal&&o++;return o}d(Qt,"countOrthogonalBends");function pt(t,e=Ft){const n=[];for(const o of t){const s=n.length>0?n[n.length-1]:void 0;(!s||!oe(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(pt,"dedupeConsecutivePoints");function ro(t,e=Ft){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Tt(n,o,e)&&wt(o,s,e)&&Tt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:wt(n,o,e)&&Tt(o,s,e)&&wt(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(ro,"classifyThreeSegmentRoute");function cn(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),c=Math.max(t.y,e.y);return r>n.left-o&&s<n.right+o&&c>n.top-o&&i<n.bottom+o}d(cn,"segmentBoundsOverlapRect");function io(t,e,n=0){return t.x>e.left+n&&t.x<e.right-n&&t.y>e.top+n&&t.y<e.bottom-n}d(io,"pointInsideRect");function ts(t,e){return t.left<=e.left&&t.right>=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(ts,"rectContainsRect");function Je(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}d(Je,"rectsOverlap");function Tn(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Tn,"inflateRect");function Ae(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(Ae,"rectFromCenterSize");function qt(t){return oo(t)?.rect}d(qt,"rectOfNodeBounds");function Ie(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Ie,"portForRectSide");function co(t,e,n,o,s,r=Ft){const i=e==="left"||e==="right",c=o==="left"||o==="right";if(i&&c){if(e==="right"&&o==="left"&&t.x<n.x||e==="left"&&o==="right"&&t.x>n.x){if(ht(t,n,r))return[t,n];const x=(t.x+n.x)/2;return[t,{x,y:t.y},{x,y:n.y},n]}if(e===o){if(ht(t,n,r))return;const x=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x,y:t.y},{x,y:n.y},n]}return}if(!i&&!c){if(e===o){if(ft(t,n,r))return;const I=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:I},{x:n.x,y:I},n]}if(!(e==="bottom"&&o==="top"&&t.y<n.y||e==="top"&&o==="bottom"&&t.y>n.y))return;if(ft(t,n,r))return[t,n];const x=(t.y+n.y)/2;return[t,{x:t.x,y:x},{x:n.x,y:x},n]}if(i&&!c){const g=e==="right"&&n.x>t.x||e==="left"&&n.x<t.x,x=o==="top"&&t.y<n.y||o==="bottom"&&t.y>n.y;return g&&x?[t,{x:n.x,y:t.y},n]:void 0}const a=e==="bottom"&&n.y>t.y||e==="top"&&n.y<t.y,l=o==="left"&&t.x<n.x||o==="right"&&t.x>n.x;return a&&l?[t,{x:t.x,y:n.y},n]:void 0}d(co,"buildOrthogonalPortPath");function ao(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(ao,"buildSameSideTrackPath");function an(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=so(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(an,"collectRealNodeBounds");function me(t){const e=[],n=[];for(const o of t){const s=so(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(me,"collectNodeRectEntries");function es(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,i=o.width??0,c=o.height??0;n.push({nodeId:o.id,...Ae(s,r,i,c)})}return n}d(es,"collectLayoutNodeRects");function lo(t,e,n=Ft){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),i=e.get(s);if(!(!r||!i))return{srcId:o,dstId:s,srcInfo:r,dstInfo:i,collinearX:Math.abs(r.cx-i.cx)<n,collinearY:Math.abs(r.cy-i.cy)<n}}d(lo,"getNodePairGeometry");function At(t,e,n,o=[],s=0){for(const r of n)if(!o.includes(r.id)&&cn(t,e,r.rect,-s))return!0;return!1}d(At,"segmentHitsAnyRect");function fo(t,e,n,o,s=Ft,r=1e-6){const i=ht(t,e,s),c=ft(t,e,s),a=ht(n,o,s),l=ft(n,o,s);if(i&&a||c&&l||!(i||c)||!(a||l))return!1;const g=i?{a:t,b:e}:{a:n,b:o},x=c?{a:t,b:e}:{a:n,b:o},I=g.a.y,u=Math.min(g.a.x,g.b.x),p=Math.max(g.a.x,g.b.x),f=x.a.x,y=Math.min(x.a.y,x.b.y),v=Math.max(x.a.y,x.b.y);if(f<u||f>p||I<y||I>v)return!1;const M=Math.abs(f-g.a.x)<r&&Math.abs(I-g.a.y)<r||Math.abs(f-g.b.x)<r&&Math.abs(I-g.b.y)<r,E=Math.abs(f-x.a.x)<r&&Math.abs(I-x.a.y)<r||Math.abs(f-x.b.x)<r&&Math.abs(I-x.b.y)<r;return!(M&&E)}d(fo,"orthogonalSegmentsCross");function ns(t,e,n,o,s=Ft){const r=ht(t,e,s),i=ft(t,e,s),c=ht(n,o,s),a=ft(n,o,s);return i&&a&&ft(t,n,s)?zt(t.y,e.y,n.y,o.y)>s:r&&c&&ht(t,n,s)?zt(t.x,e.x,n.x,o.x)>s:!1}d(ns,"sameAxisSegmentsOverlap");function Ze(t,e,n,o,{epsilon:s=Ft,skipDegenerateOther:r=!1}={}){for(const i of n){if(i===o||i.isLayoutOnly)continue;const c=i.points;if(!(!c||c.length<2))for(let a=0;a<c.length-1;a++){const l=c[a],g=c[a+1];if(!(r&&oe(l,g,s))&&(fo(t,e,l,g,s)||ns(t,e,l,g,s)))return!0}}return!1}d(Ze,"segmentConflictsWithAnyEdge");function le(t,e,n,o,s=Ft){const r=ht(t,e,s),i=ft(t,e,s),c=ht(n,o,s),a=ft(n,o,s);if(!(r&&a||i&&c))return!1;const l=r?{a:t,b:e}:{a:n,b:o},g=r?{a:n,b:o}:{a:t,b:e},x=l.a.y,I=Math.min(l.a.x,l.b.x),u=Math.max(l.a.x,l.b.x),p=g.a.x,f=Math.min(g.a.y,g.b.y),y=Math.max(g.a.y,g.b.y);return p>I+s&&p<u-s&&x>f+s&&x<y-s}d(le,"orthogonalSegmentsStrictlyCross");function wn(t,e,n){const o=Math.min(e,n),s=Math.max(e,n);return t>o+Ft&&t<s-Ft}d(wn,"strictlyBetween");function os(t,e,n){return ft(t,e)&&ft(e,n)?wn(e.y,t.y,n.y):ht(t,e)&&ht(e,n)?wn(e.x,t.x,n.x):!1}d(os,"isCollinearIntermediate");function ss(t){let e=!1;const n=[];for(let o=0;o<t.length;o++){const s=n[n.length-1],r=t[o],i=o+1<t.length?t[o+1]:void 0;if(s&&i){if(oe(s,i)){o++,e=!0;continue}if(os(s,r,i)){e=!0;continue}}n.push(r)}return{points:n,changed:e}}d(ss,"simplifyPolylineOnce");function Qe(t){const e=[t[0]];for(let o=1;o<t.length;o++){const s=e[e.length-1],r=t[o];if(!ft(s,r)&&!ht(s,r)){const i=e.length>=2?e[e.length-2]:void 0,a=(i?ft(i,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(a)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!oe(s,o))&&n.push(o)}return n}d(Qe,"orthogonalizePolyline");function ae(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=ss(e);if(e=o.points,!o.changed)break}return e}d(ae,"simplifyPolyline");var nt=.001,Vr=.5,Oo=4;function uo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length<n)return;const s=o.start?e.get(o.start):void 0,r=o.end?e.get(o.end):void 0;return{edge:o,points:o.points,srcRect:s?qt(s):void 0,dstRect:r?qt(r):void 0}}d(uo,"endpointContextFor");function rs(t,e,n){if(ht(t,e,nt))return{x:t.x<n.left?n.left:n.right,y:t.y};if(ft(t,e,nt)){const o=t.y<n.top?n.top:n.bottom;return{x:t.x,y:o}}return{x:Math.min(n.right,Math.max(n.left,t.x)),y:Math.min(n.bottom,Math.max(n.top,t.y))}}d(rs,"segmentEnterPoint");function An(t,e,n){const o=n?1:-1;let s=n?0:t.length-1;for(;s>=0&&s<t.length&&io(t[s],e,Vr);)s+=o;if(s<0||s>=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const i=rs(t[s],t[r],e);return n?[i,...t.slice(s)]:[...t.slice(0,s+1),i]}d(An,"clipEndpoint");function is(t,e){for(const n of t){const o=uo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=An(s,o.srcRect,!0)),o.dstRect&&(s=An(s,o.dstRect,!1)),s=ae(Qe(s)),s=ho(s,o.srcRect,o.dstRect),o.edge.points=ae(Qe(s))}}d(is,"clipEdgeEndpointsToNodeBoundaries");function Rn(t,e,n,o=!1){if(ht(t,e,nt)){if(e.y<n.top-nt||e.y>n.bottom+nt)return e;if(o){if(t.x<n.left-nt)return{x:n.left,y:t.y};if(t.x>n.right+nt)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(ft(t,e,nt)){if(e.x<n.left-nt||e.x>n.right+nt)return e;if(o){if(t.y<n.top-nt)return{x:t.x,y:n.top};if(t.y>n.bottom+nt)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(Rn,"snapEndpointToBoundary");function tn(t,e,n){const o=t[e];for(let s=e+n;s>=0&&s<t.length;s+=n){const r=t[s];if(!oe(r,o,nt))return r}return t[e+n]}d(tn,"firstDistinctAdjacent");function en(t,e){const n=t+Oo,o=e-Oo;return n<=o?{lo:n,hi:o}:{lo:(t+e)/2,hi:(t+e)/2}}d(en,"cornerClearanceRange");function Nn(t,e,n){const{lo:o,hi:s}=en(e,n);return Math.min(s,Math.max(o,t))}d(Nn,"clampToCornerClearance");function cs(t){const e=Math.max(...t.map(o=>o.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(cs,"intersectRanges");function On(t,e){return e==="left"||e==="right"?en(t.top,t.bottom):en(t.left,t.right)}d(On,"clearanceRangeForSide");function nn(t,e,n){const o=t.y>=n.top-nt&&t.y<=n.bottom+nt,s=t.x>=n.left-nt&&t.x<=n.right+nt;if(ht(t,e,nt)&&o){if(Math.abs(t.x-n.left)<nt)return"left";if(Math.abs(t.x-n.right)<nt)return"right"}if(ft(t,e,nt)&&s){if(Math.abs(t.y-n.top)<nt)return"top";if(Math.abs(t.y-n.bottom)<nt)return"bottom"}}d(nn,"terminalSideForSegment");function Pe(t){return t==="left"||t==="right"}d(Pe,"isHorizontalSide");function as(t,e,n,o,s){const r=[],i=n?nn(t,e,n):void 0,c=o?nn(e,t,o):void 0;return n&&i&&Pe(i)===s&&r.push(On(n,i)),o&&c&&Pe(c)===s&&r.push(On(o,c)),r.length>0?cs(r):void 0}d(as,"straightClearanceRange");function Pn(t,e,n,o,s){const r=as(t,e,n,o,s);if(!r)return;const i=s?t.y:t.x,c=Math.min(r.hi,Math.max(r.lo,i));if(!(Math.abs(c-i)<nt))return s?[{x:t.x,y:c},{x:e.x,y:c}]:[{x:c,y:t.y},{x:c,y:e.y}]}d(Pn,"clearStraightEndpointCornerAxis");function ho(t,e,n){if(t.length!==2)return t;const[o,s]=t;return ht(o,s,nt)?Pn(o,s,e,n,!0)??t:ft(o,s,nt)?Pn(o,s,e,n,!1)??t:t}d(ho,"clearStraightEndpointCornerConnections");function ls(t,e,n){return Pe(n)?{x:t.x,y:Nn(t.y,e.top,e.bottom)}:{x:Nn(t.x,e.left,e.right),y:t.y}}d(ls,"cornerClearedEndpoint");function fs(t,e,n,o,s,r){const i=t.map(c=>({...c}));for(let c=e;c>=0&&c<t.length;c+=n){const a=t[c];if(r&&!ht(a,o,nt)||!r&&!ft(a,o,nt))break;r?i[c].y=s.y:i[c].x=s.x}return i}d(fs,"moveCollinearEndpointRun");function Bn(t,e,n){if(t.length<2)return t;const o=n?0:t.length-1,s=n?1:-1,r=t[o],i=tn(t,o,s);if(!i)return t;const c=nn(r,i,e);if(!c)return t;const a=Pe(c),l=ls(r,e,c);return oe(r,l,nt)?t:fs(t,o,s,r,l,a)}d(Bn,"clearEndpointCornerConnection");function kn(t,e,n){const o=Math.min(t.x,e.x)>=n.left-nt&&Math.max(t.x,e.x)<=n.right+nt,s=Math.min(t.y,e.y)>=n.top-nt&&Math.max(t.y,e.y)<=n.bottom+nt;if(Math.abs(t.y-n.top)<nt&&Math.abs(e.y-n.top)<nt&&o)return"top";if(Math.abs(t.y-n.bottom)<nt&&Math.abs(e.y-n.bottom)<nt&&o)return"bottom";if(Math.abs(t.x-n.left)<nt&&Math.abs(e.x-n.left)<nt&&s)return"left";if(Math.abs(t.x-n.right)<nt&&Math.abs(e.x-n.right)<nt&&s)return"right"}d(kn,"borderSideForSegment");function _n(t,e,n,o){switch(t){case"top":return ft(e,n,nt)&&n.y<o.top-nt;case"bottom":return ft(e,n,nt)&&n.y>o.bottom+nt;case"left":return ht(e,n,nt)&&n.x<o.left-nt;case"right":return ht(e,n,nt)&&n.x>o.right+nt}}d(_n,"leavesOutward");function Fn(t,e,n){if(t.length<3)return t;if(n){const r=kn(t[0],t[1],e);return r&&_n(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=kn(t[o-1],t[o],e);return s&&_n(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(Fn,"collapseOwnBorderStub");function ds(t,e,n){let o=t;if(e){const r=tn(o,0,1);if(r){const i=Rn(r,o[0],e);i!==o[0]&&(o=[i,...o.slice(1)])}o=Fn(o,e,!0)}if(n){const r=o.length-1,i=tn(o,r,-1);if(i){const c=Rn(i,o[r],n,!0);c!==o[r]&&(o=[...o.slice(0,r),c])}o=Fn(o,n,!1)}const s=ho(o,e,n);return s!==o||o.length===2?s:(e&&(o=Bn(o,e,!0)),n&&(o=Bn(o,n,!1)),o)}d(ds,"snapAndCollapseEndpoints");function Dn(t,e){for(const n of t){const o=uo(n,e,2);if(!o)continue;const s=pt(o.points,nt),r=ds(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=i}}d(Dn,"prepareEdgeEndpointsForRenderer");function go(t){return new Map(t.map(e=>[e.id,e]))}d(go,"buildNodeMap");function us(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!s?.isGroup)break;o=s.id,n=s.parentId}return o}d(us,"resolveTopLevelGroupId");function Hn(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!s?.isGroup)break;n++,o=s.parentId}return n}d(Hn,"groupDepth");function po(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const i=r.x,c=r.y;if(typeof i!="number"||typeof c!="number")continue;const a=r.width??0,l=r.height??0;e=Math.min(e,i-a/2),n=Math.max(n,i+a/2),o=Math.min(o,c-l/2),s=Math.max(s,c+l/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(po,"boundsForChildren");function hs(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(hs,"applyGroupBounds");function gs(t){const e=go(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>Hn(s,e)-Hn(o,e));for(const o of n){const s=t.filter(i=>i.parentId===o.id),r=po(s);r&&hs(o,r)}}d(gs,"recomputeNestedGroupBounds");function on(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(a=>!a.isGroup);let r=1/0,i=-1/0;for(const a of s){const l=a[e];typeof l=="number"&&(r=Math.min(r,l),i=Math.max(i,l))}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const c=d(a=>r+i-a,"mirror");for(const a of n){const l=a[e];typeof l=="number"&&(a[e]=c(l));const g=a.groupTitleRect;g&&(a.groupTitleRect=e==="x"?{...g,left:c(g.right),right:c(g.left)}:{...g,top:c(g.bottom),bottom:c(g.top)})}for(const a of o)for(const l of a.points??[])l[e]=c(l[e]);return!0}d(on,"mirrorAxis");function ps(t){return(t.nodes??[]).some(n=>!n.isGroup)?on(t,"y"):!0}d(ps,"applyBtDirectionTransform");function ms(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,i=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G<r&&(r=G),j<i&&(i=j)}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const c=36;let a=0,l=0;for(const P of s)a+=P.width??0,l+=P.height??0;const g=a/s.length,x=l/s.length,I=x>0?Math.max(1,g/x):1;for(const P of s){const G=P.x??0,J=((P.y??0)-i)*I+c,dt=G-r;P.x=J,P.y=dt}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,dt=(G.y-i)*I+c,mt=j-r;G.x=dt,G.y=mt}gs(n);const u=n.filter(P=>P.isGroup&&!P.parentId);if(u.length===0)return e==="RL"&&on(t,"x"),!0;const p=go(n),f=new Map;for(const P of n){if(P.isGroup)continue;const G=us(P,p);if(!G)continue;const j=f.get(G)??[];j.push(P),f.set(G,j)}let y=0;for(const P of u){const G=P.padding??0;G>y&&(y=G)}const v=[];let M=1/0,E=-1/0;for(const P of u){const G=f.get(P.id)??[],j=po(G);j&&(M=Math.min(M,j.minX),E=Math.max(E,j.maxX),v.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(M===1/0||E===-1/0)return!0;const T=Math.max(0,E-M),m=Math.max(y,10),S=T+2*m,A=c+S,O=(M+E)/2-S/2-c,_=O+A/2,H=Math.max(y,c);v.sort((P,G)=>P.centerY-G.centerY);for(let P=0;P<v.length;P++){const G=v[P];let j,J;if(P===0?j=G.contentTop-H:j=(v[P-1].contentBottom+G.contentTop)/2,P===v.length-1)J=G.contentBottom+H;else{const kt=v[P+1];J=(G.contentBottom+kt.contentTop)/2}const dt=Math.max(0,J-j),mt=(j+J)/2;G.lane.x=_,G.lane.y=mt,G.lane.width=A,G.lane.height=dt,G.lane.swimlaneContentTop=G.contentTop,G.lane.groupTitleRect={left:O,right:O+c,top:j,bottom:J}}return e==="RL"&&on(t,"x"),!0}d(ms,"applyLrDirectionTransform");var se=1e-6,jr=8,ze=jr,Ur=[0,ze,-ze,2*ze,-2*ze];function ys(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e);for(const s of t){if(s.isLayoutOnly)continue;const r=s.points;if(!r||r.length<4)continue;const i=ro(pt(r,se),se);if(!i)continue;const{p3:c}=i,a=i.kind==="HVH",l=lo(s,n,se);if(!l)continue;const{srcId:g,dstId:x,srcInfo:I,dstInfo:u,collinearX:p,collinearY:f}=l;if(p||f)continue;let y;const v=I.rect;for(const M of Ur){let E,T,m;if(a){const _=u.cy>I.cy?v.bottom:v.top,H=I.cx+M;if(H<=v.left+se||H>=v.right-se)continue;E={x:H,y:_},T={x:H,y:c.y},m={x:c.x,y:c.y}}else{const _=u.cx>I.cx?v.right:v.left,H=I.cy+M;if(H<=v.top+se||H>=v.bottom-se)continue;E={x:_,y:H},T={x:c.x,y:H},m={x:c.x,y:c.y}}const S=oe(E,T,se),A=oe(T,m,se);if(S&&A||!S&&At(E,T,o,[g],1)||!A&&At(T,m,o,[x],1))continue;const R=!S&&Ze(E,T,t,s,{epsilon:se,skipDegenerateOther:!0}),k=!A&&Ze(T,m,t,s,{epsilon:se,skipDegenerateOther:!0});if(!(R||k)){S?y=[T,m]:A?y=[E,T]:y=[E,T,m];break}}y&&(s.points=y)}}d(ys,"portSwapToLShape");function xs(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values());for(const c of t){if(c.isLayoutOnly)continue;const a=c.points;if(!a||a.length<4)continue;const l=pt(a,.001);if(l.length<4)continue;const g=l.length-1,x=l[g],I=l[g-1],u=l[g-2],p=x.x-I.x,f=x.y-I.y,y=Math.hypot(p,f);if(y>=10||y<.001)continue;const v=I.x-u.x,M=I.y-u.y;if(Math.hypot(v,M)<.001)continue;const T=Tt(I,x,.001),m=wt(I,x,.001),S=Tt(u,I,.001),A=wt(u,I,.001);if(!(T&&A||m&&S))continue;const R=c.end,k=c.start,O=R?e.get(R):void 0;if(!O)continue;const _=O.x??0,H=O.y??0,P=qt(O);if(!P)continue;let G,j;if(A){const W=M<0;G={x:_,y:u.y},j={x:_,y:W?P.bottom:P.top}}else{const W=v>0;G={x:u.x,y:H},j={x:W?P.right:P.left,y:H}}if(At(G,j,r,R?[R]:[],-2)||At(G,j,i,[],-2))continue;if(k){const W=e.get(k),et=W?qt(W):void 0;if(et&&io(G,et,2))continue}const J=d((W,et)=>`${W.x.toFixed(3)},${W.y.toFixed(3)}|${et.x.toFixed(3)},${et.y.toFixed(3)}`,"ownSegmentKey"),dt=new Set;for(let W=0;W<l.length-1;W++)dt.add(J(l[W],l[W+1]));const mt=d((W,et)=>{for(const at of t){if(at===c||at.isLayoutOnly)continue;const gt=at.points;if(!(!gt||gt.length<2))for(let xt=0;xt<gt.length-1;xt++){const vt=gt[xt],Vt=gt[xt+1];if(!dt.has(J(vt,Vt))&&le(W,et,vt,Vt,.001))return!0}}return!1},"segmentCrossesOtherEdge");if(mt(G,j))continue;if(g-3>=0){const W=l[g-3],et=[k,R].filter(at=>!!at);if(At(W,G,r,et,-2)||mt(W,G))continue}const Pt=[...l.slice(0,g-2),G,j];c.points=Pt;const Q=c.labelNodeId;if(Q){const W=e.get(Q);if(W){const et=W.width??0,at=W.height??0;if(et>0&&at>0){let gt,xt,vt=-1;for(let Vt=0;Vt<Pt.length-1;Vt++){const jt=Pt[Vt],Ut=Pt[Vt+1],te=Math.hypot(Ut.x-jt.x,Ut.y-jt.y),Se=ht(jt,Ut,.001),de=ft(jt,Ut,.001);(Se&&te>=et+2||de&&te>=at+2)&&te>vt&&(vt=te,gt=(jt.x+Ut.x)/2,xt=(jt.y+Ut.y)/2)}gt!==void 0&&xt!==void 0&&(W.x=gt,W.y=xt)}}}}}d(xs,"collapseShortTerminalStub");var Z=.001,_t=8,it=Re,In=d((t,e)=>ft(t,e,Z)||ht(t,e,Z),"orthogonallyAligned");function bs(t,e){const s=d((u,p)=>{const f=u.x??0,y=u.y??0,v=p.x-f,M=p.y-y;let E=(u.width??0)/2,T=(u.height??0)/2;return Math.abs(M)*E>Math.abs(v)*T?(M<0&&(T=-T),{x:f+(M===0?0:T*v/M),y:y+T}):(v<0&&(E=-E),{x:f+E,y:y+(v===0?0:E*M/v)})},"rectIntersect"),r=d((u,p)=>{const f=pt(u.points??[]);if(f.length<2)return;const y=p?u.start:u.end,v=y?e.get(y):void 0,M=v?qt(v):void 0;if(!v||!y||!M)return;const E=p?f[0]:f[f.length-1],T=p?f[1]:f[f.length-2],m=s(v,E);let S=E;if(In(T,m)&&(S=T),ft(m,S,Z))return{edge:u,edgeId:String(u.id??""),nodeId:y,atStart:p,orientation:"V",coord:m.x,min:Math.min(m.y,S.y),max:Math.max(m.y,S.y),boundary:m,railEnd:S,rect:M};if(ht(m,S,Z))return{edge:u,edgeId:String(u.id??""),nodeId:y,atStart:p,orientation:"H",coord:m.y,min:Math.min(m.x,S.x),max:Math.max(m.x,S.x),boundary:m,railEnd:S,rect:M}},"terminalLaneFor"),i=d((u,p)=>Math.max(0,Math.min(u.max,p.max)-Math.max(u.min,p.min)),"projectedOverlapLength"),c=d((u,p)=>u.nodeId!==p.nodeId||u.orientation!==p.orientation?!1:u.orientation==="H"?(Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1)&&ft(u.boundary,p.boundary,1):(Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1)&&ht(u.boundary,p.boundary,1),"sameTerminalFace"),a=d((u,p)=>u.nodeId!==p.nodeId||u.orientation!==p.orientation?!1:i(u,p)>=_t&&Math.abs(u.coord-p.coord)<.5,"exactTerminalLaneConflict"),l=d((u,p)=>{if(u.nodeId!==p.nodeId||u.orientation!==p.orientation||u.orientation!=="H"||u.atStart===p.atStart)return!1;const f=i(u,p);if(f<_t)return!1;const y=u.rect.bottom-u.rect.top;return f<y||f>2*y?!1:c(u,p)&&Math.abs(u.coord-p.coord)<16},"nearTerminalLaneConflict"),g=d((u,p)=>{const f=pt(u.edge.points??[]);if(f.length<2)return;const y=u.orientation==="V"?{x:u.boundary.x+p,y:u.boundary.y}:{x:u.boundary.x,y:u.boundary.y+p},v=u.orientation==="V"?{x:u.railEnd.x+p,y:u.railEnd.y}:{x:u.railEnd.x,y:u.railEnd.y+p};if(!d(()=>Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1?ht(y,u.boundary,Z)&&y.x>=u.rect.left+1&&y.x<=u.rect.right-1:Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1?ft(y,u.boundary,Z)&&y.y>=u.rect.top+1&&y.y<=u.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(u.atStart){const S=f.length>1&&oe(f[1],u.railEnd,Z),A=f.slice(S?2:1),R=A[0];return R&&!In(R,v)?void 0:[y,v,...A]}const E=f.length>1&&oe(f[f.length-2],u.railEnd,Z),T=f.slice(0,E?-2:-1),m=T[T.length-1];if(!(m&&!In(m,v)))return[...T,v,y]},"shiftedCandidate"),x=d(u=>{const p=u.edge,f=pt(p.points??[]);if(f.length!==2)return!1;const y=p.start,v=p.end,M=y?e.get(y):void 0,E=v?e.get(v):void 0;if(!M||!E)return!1;const T=M.x??0,m=M.y??0,S=E.x??0,A=E.y??0,[R,k]=f;return ht(R,k,Z)&&Math.abs(m-A)<1&&Math.abs(T-S)>1||ft(R,k,Z)&&Math.abs(T-S)<1&&Math.abs(m-A)>1},"laneIsStraightCollinearConnector"),I=[-7,7,-14,14,-21,21];for(let u=0;u<8;u++){const p=t.filter(y=>!y.isLayoutOnly).flatMap(y=>[r(y,!0),r(y,!1)]).filter(y=>!!y);let f=!1;for(let y=0;y<p.length&&!f;y++)for(let v=y+1;v<p.length&&!f;v++){const M=p[y],E=p[v];if(M.edge===E.edge||!(a(M,E)||l(M,E)))continue;const T=!a(M,E),m=[M,E].sort((S,A)=>{const R=x(S),k=x(A);return R!==k?Number(R)-Number(k):+!A.atStart-+!S.atStart});for(const S of m){for(const A of I){const R=g(S,A);if(!R)continue;const k=r({...S.edge,points:R},S.atStart);if(!(!k||p.some(O=>O.edge!==S.edge&&(a(k,O)||T&&l(k,O))))){S.edge.points=R,f=!0;break}}if(f)break}}if(!f)return}}d(bs,"separateSharedRenderedTerminalLanes");function Ms(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=d((c,a)=>{const l=c.start,g=c.end,x=it(a);if(x.length!==a.length-1)return!1;const I=[l,g].filter(u=>!!u);for(const u of x)if(At(u.a,u.b,o,I,-2)||At(u.a,u.b,s,[],-2))return!1;for(const u of t){if(u===c||u.isLayoutOnly)continue;const p=u.points;if(!(!p||p.length<2)){for(const f of x)for(const y of it(pt(p)))if(ce(f,y,.5)>=_t||le(f.a,f.b,y.a,y.b,Z))return!1}}return!0},"candidateIsSafe"),i=d((c,a)=>{if(a+4>=c.length)return;const l=c[a],g=c[a+1],x=c[a+2],I=c[a+3],u=c[a+4],p=Tt(l,g)&&wt(g,x)&&Tt(x,I)&&wt(I,u)&&ft(l,I,Z)&&ft(l,u,Z)&&ft(g,x,Z)&&(g.x-l.x)*(I.x-x.x)<0,f=wt(l,g)&&Tt(g,x)&&wt(x,I)&&Tt(I,u)&&ht(l,I,Z)&&ht(l,u,Z)&&ht(g,x,Z)&&(g.y-l.y)*(I.y-x.y)<0;if(p||f)return pt([...c.slice(0,a+1),u,...c.slice(a+5)]);if(a+5>=c.length)return;const y=c[a+5],v=wt(l,g)&&Tt(g,x)&&wt(x,I)&&Tt(I,u)&&wt(u,y)&&ft(l,u,Z)&&ft(l,y,Z)&&ft(x,I,Z)&&(x.x-g.x)*(u.x-I.x)<0,M=Tt(l,g)&&wt(g,x)&&Tt(x,I)&&wt(I,u)&&Tt(u,y)&&ht(l,u,Z)&&ht(l,y,Z)&&ht(x,I,Z)&&(x.y-g.y)*(u.y-I.y)<0;if(!(!v&&!M))return pt([...c.slice(0,a+1),y,...c.slice(a+6)])},"withoutDogleg");for(let c=0;c<8;c++){let a=!1;for(const l of t){if(l.isLayoutOnly)continue;const g=pt(l.points??[]);for(let x=0;x<=g.length-5;x++){const I=i(g,x);if(!(!I||!r(l,I))){l.points=I,a=!0;break}}if(a)break}if(!a)return}}d(Ms,"collapseRedundantRectangularDoglegs");function Xn(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values()),c=t.filter(p=>!p.isLayoutOnly),a=d((p,f,y)=>pt(p===f?y??[]:p.points??[]),"pointsFor"),l=d((p,f)=>{let y=0;for(let v=0;v<c.length;v++){const M=it(a(c[v],p,f));for(let E=v+1;E<c.length;E++){const T=it(a(c[E],p,f));for(const m of M)for(const S of T)le(m.a,m.b,S.a,S.b,Z)&&y++}}return y},"strictCrossingCount"),g=d(p=>{const f=it(p);if(f.length!==3)return;const y=f[1];if(!(f[0].horizontal===y.horizontal||f[2].horizontal===y.horizontal))return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),x=d((p,f)=>{const y=[p.start,p.end].filter(v=>!!v);return r.filter(v=>{if(y.includes(v.id))return!1;const M=v.rect;return f.horizontal?zt(f.a.x,f.b.x,M.left,M.right)>=_t&&f.a.y>=M.top-2&&f.a.y<=M.bottom+2:zt(f.a.y,f.b.y,M.top,M.bottom)>=_t&&f.a.x>=M.left-2&&f.a.x<=M.right+2})},"blockingRectsFor"),I=d((p,f,y)=>{const v=p.map(E=>({...E}));if(f.horizontal)v[f.index].y=y,v[f.index+1].y=y;else if(f.vertical)v[f.index].x=y,v[f.index+1].x=y;else return;const M=ae(pt(v));return it(M).length===M.length-1?M:void 0},"candidateByMovingRail"),u=d((p,f,y)=>{const v=[p.start,p.end].filter(E=>!!E),M=it(f);if(M.length!==f.length-1)return!1;for(const E of M)if(At(E.a,E.b,r,v,-2)||At(E.a,E.b,i,[],-2))return!1;for(const E of c)if(E!==p){for(const T of M)for(const m of it(a(E)))if(ce(T,m,.5)>=_t)return!1}return l(p,f)<=y},"candidateIsSafe");for(let p=0;p<8;p++){const f=l();let y=!1;for(const v of c){const M=a(v),E=g(M);if(!E)continue;const T=x(v,E.segment);if(T.length===0)continue;const m=E.horizontal?[Math.min(...T.map(S=>S.rect.top))-20,Math.max(...T.map(S=>S.rect.bottom))+20]:[Math.min(...T.map(S=>S.rect.left))-20,Math.max(...T.map(S=>S.rect.right))+20];for(const S of m){const A=I(M,E.segment,S);if(!(!A||!u(v,A,f))){v.points=A,y=!0;break}}if(y)break}if(!y)return}}d(Xn,"liftObstacleHuggingSameSideRails");function Yn(t,e){const o=d(a=>{const l=a.groupTitleRect;if(!(!l||typeof l.left!="number"||typeof l.right!="number"||typeof l.top!="number"||typeof l.bottom!="number"||!Number.isFinite(l.left)||!Number.isFinite(l.right)||!Number.isFinite(l.top)||!Number.isFinite(l.bottom)||l.right<=l.left||l.bottom<=l.top))return{left:l.left,right:l.right,top:l.top,bottom:l.bottom}},"validTitleRect"),s=d(a=>{if(!a.isGroup||a.parentId)return;const l=a.direction,g=typeof l=="string"?l.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const x=o(a),I=a.y,u=a.height;if(!x||typeof I!="number"||typeof u!="number"||!Number.isFinite(I)||!Number.isFinite(u)||u<=0)return;const p=x.right-x.left,f=x.bottom-x.top;if(!(f<=0||p<f))return{node:a,rect:x}},"topLaneTitleFor"),r=d((a,l)=>{if(!a.horizontal)return!1;const g=a.a.y;return g<=l.top+Z||g>=l.bottom-Z?!1:zt(a.a.x,a.b.x,l.left,l.right)>=_t},"horizontalSegmentIntersectsTitle"),i=[...e.values()].map(s).filter(a=>!!a);if(i.length===0)return;let c=0;for(const a of t){if(a.isLayoutOnly)continue;const l=pt(a.points??[]);for(const g of it(l))for(const x of i)r(g,x.rect)&&(c=Math.max(c,x.rect.bottom-g.a.y+4))}if(!(c<=Z))for(const a of i){const l=a.node.y,g=a.node.height;typeof l!="number"||typeof g!="number"||!Number.isFinite(l)||!Number.isFinite(g)||g<=0||(a.node.y=l-c/2,a.node.height=g+c,a.node.groupTitleRect={...a.rect,top:a.rect.top-c,bottom:a.rect.bottom-c})}}d(Yn,"liftTopLaneTitleBandsAboveRails");function Gn(t,e){const o=d(l=>{const g=l.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(l=>{if(!l.isGroup||l.parentId||l.direction!=="LR")return;const x=o(l),I=l.x,u=l.width;if(!x||typeof I!="number"||typeof u!="number"||!Number.isFinite(I)||!Number.isFinite(u)||u<=0)return;const p=x.right-x.left,f=x.bottom-x.top;if(!(p<=0||f<p))return{node:l,rect:x}},"leftLaneTitleFor"),r=d((l,g)=>{if(!l.vertical)return!1;const x=l.a.x;return x<=g.left+Z||x>=g.right-Z?!1:zt(l.a.y,l.b.y,g.top,g.bottom)>=_t},"verticalSegmentIntersectsTitle"),i=d((l,g)=>{if(!l.horizontal)return!1;const x=l.a.y;return x<=g.top+Z||x>=g.bottom-Z?!1:zt(l.a.x,l.b.x,g.left,g.right)>=_t},"horizontalSegmentIntersectsTitle"),c=[...e.values()].map(s).filter(l=>!!l);if(c.length===0)return;let a=0;for(const l of t){if(l.isLayoutOnly)continue;const g=pt(l.points??[]);for(const x of it(g))for(const I of c)if(r(x,I.rect))a=Math.max(a,I.rect.right-x.a.x+4);else if(i(x,I.rect)){const u=Math.min(x.a.x,x.b.x);a=Math.max(a,I.rect.right-u+4)}}if(!(a<=Z))for(const l of c){const g=l.node.x,x=l.node.width;typeof g!="number"||typeof x!="number"||!Number.isFinite(g)||!Number.isFinite(x)||x<=0||(l.node.x=g-a/2,l.node.width=x+a,l.node.groupTitleRect={...l.rect,left:l.rect.left-a,right:l.rect.right-a})}}d(Gn,"shiftLeftLaneTitleBandsLeftOfRails");function Is(t,e){const{realNodeRects:o}=me(e.values()),s=t.filter(p=>!p.isLayoutOnly),r=d((p,f=new Map)=>pt(f.get(p)??p.points??[]),"replacementPointsFor"),i=d((p=new Map)=>{let f=0;for(let y=0;y<s.length;y++){const v=it(r(s[y],p));for(let M=y+1;M<s.length;M++){const E=it(r(s[M],p));for(const T of v)for(const m of E)le(T.a,T.b,m.a,m.b,Z)&&f++}}return f},"crossingCount"),c=d((p=new Map)=>s.reduce((f,y)=>f+Qt(r(y,p)),0),"totalBends"),a=d(p=>{const f=r(p);if(f.length<4)return;const y=f[f.length-2],v=f[f.length-1];if(!(!Tt(y,v,Z)&&!wt(y,v,Z)))return{tailStart:y,terminal:v}},"terminalTailFor"),l=d((p,f)=>{const y=r(p);if(y.length<3)return;const v=y[0],M=y[1];let E;if(Tt(v,M,Z))E={x:M.x,y:f.tailStart.y};else if(wt(v,M,Z))E={x:f.tailStart.x,y:M.y};else return;const T=ae(pt([v,M,E,f.tailStart,f.terminal]));return it(T).length===T.length-1?T:void 0},"candidateWithDestinationTail"),g=d((p,f)=>{const y=[p.start,p.end].filter(v=>!!v);for(const v of it(f))if(At(v.a,v.b,o,y,-2))return!0;return!1},"pathHasNodeHit"),x=d((p,f,y)=>{for(const v of s)if(v!==p){for(const M of it(f))for(const E of it(r(v,y)))if(ce(M,E,.5)>=_t)return!0}return!1},"pathHasSharedTrack"),I=d((p,f,y)=>!g(p,f)&&!x(p,f,y),"candidateIsSafe"),u=d(()=>{const p=new Map;for(const f of s){const y=f.end;if(!y||!e.has(y)||r(f).length<4)continue;const M=p.get(y)??[];M.push(f),p.set(y,M)}return p},"edgesByDestination");for(let p=0;p<4;p++){const f=i();if(f===0)return;const y=c();let v,M=f,E=y;for(const T of u().values())for(let m=0;m<T.length;m++)for(let S=m+1;S<T.length;S++){const A=T[m],R=T[S],k=a(A),O=a(R);if(!k||!O)continue;const _=l(A,O),H=l(R,k);if(!_||!H)continue;const P=new Map([[A,_],[R,H]]);if(!I(A,_,P)||!I(R,H,P))continue;const G=i(P),j=c(P);G>=f||G>M||G===M&&j>=E||(v=P,M=G,E=j)}if(!v)return;for(const[T,m]of v)T.points=m}}d(Is,"swapDestinationTerminalTailsToReduceCrossings");function Ss(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values()),c=t.filter(T=>!T.isLayoutOnly),a=d((T,m=new Map)=>pt(m.get(T)??T.points??[]),"replacementPointsFor"),l=d((T=new Map)=>{let m=0;for(let S=0;S<c.length;S++){const A=it(a(c[S],T));for(let R=S+1;R<c.length;R++){const k=it(a(c[R],T));for(const O of A)for(const _ of k)le(O.a,O.b,_.a,_.b,Z)&&m++}}return m},"strictCrossingCount"),g=d((T=new Map)=>c.reduce((m,S)=>m+Qt(a(S,T)),0),"totalBends"),x=d(T=>{const m=T.start,S=T.end,A=m?e.get(m):void 0,R=S?e.get(S):void 0,k=A?qt(A):void 0,O=R?qt(R):void 0;return k&&O?{src:k,dst:O}:void 0},"endpointRectsFor"),I=d((T,m,S)=>{if(S.index<=0||S.index+1>=m.length-1)return;const A=x(T);if(A){if(S.vertical){const R=S.a.x,k=Math.min(A.src.left,A.dst.left),O=Math.max(A.src.right,A.dst.right),_=R<k-Z?"left":R>O+Z?"right":void 0;return _?{edge:T,points:m,segmentIndex:S.index,axis:"vertical",side:_,coord:R,min:Math.min(S.a.y,S.b.y),max:Math.max(S.a.y,S.b.y)}:void 0}if(S.horizontal){const R=S.a.y,k=Math.min(A.src.top,A.dst.top),O=Math.max(A.src.bottom,A.dst.bottom),_=R<k-Z?"top":R>O+Z?"bottom":void 0;return _?{edge:T,points:m,segmentIndex:S.index,axis:"horizontal",side:_,coord:R,min:Math.min(S.a.x,S.b.x),max:Math.max(S.a.x,S.b.x)}:void 0}}},"externalRailForSegment"),u=d(()=>{const T=[];for(const m of c){const S=a(m);for(const A of it(S)){const R=I(m,S,A);R&&T.push(R)}}return T},"collectExternalRails"),p=d((T,m)=>T.edge!==m.edge&&T.axis===m.axis&&T.side===m.side&&zt(T.min,T.max,m.min,m.max)>=_t,"railsInteract"),f=d(T=>{const m=[],S=new Set;for(const A of T){if(S.has(A))continue;const R=[A],k=[];for(S.add(A);R.length>0;){const O=R.pop();k.push(O);for(const _ of T)!S.has(_)&&p(O,_)&&(S.add(_),R.push(_))}k.length>1&&m.push(k)}return m},"connectedComponents"),y=d(T=>{const m=[];for(const S of T)m.some(A=>Math.abs(A-S.coord)<Z)||m.push(S.coord);for(;m.length<T.length;){const S=Math.min(...m),A=Math.max(...m),R=T[0].side;m.push(R==="left"||R==="top"?S-12*(T.length-m.length):A+12*(T.length-m.length))}return m},"uniqueCoordsFor"),v=d(T=>{const m=T.map(R=>R.coord),S=y(T),A=[];if(T.length<=6){const R=new Array(S.length).fill(!1),k=[],O=d(()=>{if(k.length===T.length){k.some((_,H)=>Math.abs(_-m[H])>=Z)&&A.push([...k]);return}for(const[_,H]of S.entries())R[_]||(R[_]=!0,k.push(H),O(),k.pop(),R[_]=!1)},"visit");return O(),A}for(let R=0;R<m.length;R++)for(let k=R+1;k<m.length;k++){const O=[...m];[O[R],O[k]]=[O[k],O[R]],A.push(O)}return A},"coordinateAssignmentsFor"),M=d((T,m)=>{const S=new Map;for(const[R,k]of T.entries()){const O=m[R],_=S.get(k.edge)??k.points.map(H=>({x:H.x,y:H.y}));k.axis==="vertical"?(_[k.segmentIndex].x=O,_[k.segmentIndex+1].x=O):(_[k.segmentIndex].y=O,_[k.segmentIndex+1].y=O),S.set(k.edge,_)}const A=new Map;for(const[R,k]of S){const O=ae(pt(k));if(it(O).length!==O.length-1)return;A.set(R,O)}return A},"replacementsForAssignment"),E=d(T=>{for(const[m,S]of T){const A=[m.start,m.end].filter(R=>!!R);for(const R of it(S))if(At(R.a,R.b,r,A,-2)||At(R.a,R.b,i,[],-2))return!1}for(let m=0;m<c.length;m++){const S=c[m],A=T.has(S),R=it(a(S,T));for(let k=m+1;k<c.length;k++){const O=c[k];if(!A&&!T.has(O))continue;const _=it(a(O,T));for(const H of R)for(const P of _)if(ce(H,P,.5)>=_t)return!1}}return!0},"candidateIsSafe");for(let T=0;T<4;T++){const m=l();if(m===0)return;let S,A=m,R=g(),k=Number.POSITIVE_INFINITY;for(const O of f(u()))for(const _ of v(O)){const H=M(O,_);if(!H||!E(H))continue;const P=l(H);if(P>=m)continue;const G=g(H),j=O.reduce((J,dt,mt)=>J+Math.abs(_[mt]-dt.coord),0);P>A||P===A&&(G>R||G===R&&j>=k)||(S=H,A=P,R=G,k=j)}if(!S)return;for(const[O,_]of S)O.points=_}}d(Ss,"reassignCrossingExternalRailChannels");function Cs(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=t.filter(u=>!u.isLayoutOnly),i=d((u,p,f)=>pt(u===p?f??[]:u.points??[]),"pointsFor"),c=d(u=>it(u).reduce((p,f)=>{const y=f.a.x-f.b.x,v=f.a.y-f.b.y;return p+Math.hypot(y,v)},0),"pathLength"),a=d((u,p)=>{let f=0;for(let y=0;y<r.length;y++){const v=it(i(r[y],u,p));for(let M=y+1;M<r.length;M++){const E=it(i(r[M],u,p));for(const T of v)for(const m of E)le(T.a,T.b,m.a,m.b,Z)&&f++}}return f},"strictCrossingCount"),l=d((u,p)=>{if(u.horizontal){const f=u.a.y;return(Math.abs(f-p.top)<1||Math.abs(f-p.bottom)<1)&&zt(u.a.x,u.b.x,p.left,p.right)>=_t}if(u.vertical){const f=u.a.x;return(Math.abs(f-p.left)<1||Math.abs(f-p.right)<1)&&zt(u.a.y,u.b.y,p.top,p.bottom)>=_t}return!1},"segmentRunsAlongRectBorder"),g=d(u=>{const p=[u.start,u.end].filter(y=>!!y),f=[];for(const y of p){const v=e.get(y),M=v?qt(v):void 0;M&&f.push(M)}return f},"endpointRectsFor"),x=d((u,p)=>{if(p+3>=u.length)return[];const f=u[p],y=u[p+1],v=u[p+2],M=u[p+3],E=Tt(f,y,Z)&&wt(y,v,Z)&&Tt(v,M,Z),T=wt(f,y,Z)&&Tt(y,v,Z)&&wt(v,M,Z);if(!E&&!T)return[];if(!(E?Math.sign(y.x-f.x)!==Math.sign(M.x-v.x):Math.sign(y.y-f.y)!==Math.sign(M.y-v.y)))return[];const S=ft(f,M,Z)||ht(f,M,Z)?[]:[{x:f.x,y:M.y},{x:M.x,y:f.y}],A=S.length===0?[[...u.slice(0,p+1),...u.slice(p+3)]]:S.map(k=>[...u.slice(0,p+1),k,...u.slice(p+3)]),R=new Set;return A.map(k=>ae(pt(k))).filter(k=>{if(it(k).length!==k.length-1||!k.some(_=>oe(_,M,Z)))return!1;const O=k.map(_=>`${_.x.toFixed(3)},${_.y.toFixed(3)}`).join("|");return R.has(O)?!1:(R.add(O),!0)})},"shortcutCandidatesAt"),I=d((u,p,f)=>{const y=[u.start,u.end].filter(M=>!!M),v=g(u);for(const M of it(p))if(At(M.a,M.b,o,y,-2)||At(M.a,M.b,s,[],-2)||v.some(E=>l(M,E)))return!1;for(const M of r)if(M!==u){for(const E of it(p))for(const T of it(i(M)))if(ce(E,T,.5)>=_t)return!1}return a(u,p)<=f},"candidateIsSafe");for(let u=0;u<8;u++){const p=a();let f,y,v=p,M=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;for(const T of r){const m=i(T),S=Qt(m,Z),A=c(m);for(let R=0;R<=m.length-4;R++)for(const k of x(m,R)){const O=Qt(k,Z),_=c(k);if(!(O<S||O===S&&_<A-Z)||!I(T,k,p))continue;const P=a(T,k);P>v||P===v&&(O>M||O===M&&_>=E)||(f=T,y=k,v=P,M=O,E=_)}}if(!f||!y)return;f.points=y}}d(Cs,"shortcutRedundantOrthogonalJogs");function vs(t,e){const i=[];for(const N of e.values()){if(N.isGroup||N.isEdgeLabel)continue;const F=N.x??0,D=N.y??0,V=qt(N);V&&i.push({id:String(N.id??""),cx:F,cy:D,rect:V})}if(i.length===0)return;const c=new Map(i.map(N=>[N.id,N])),a=i.map(N=>({id:N.id,rect:N.rect})),l=["top","bottom","left","right"],g={top:Math.min(...i.map(N=>N.rect.top))-20,bottom:Math.max(...i.map(N=>N.rect.bottom))+20,left:Math.min(...i.map(N=>N.rect.left))-20,right:Math.max(...i.map(N=>N.rect.right))+20},x=t.filter(N=>!N.isLayoutOnly),I=new Map(x.map((N,F)=>[N,F])),u=d(N=>{const F=N==="left"||N==="top"?-1:1,D=[];for(let V=0;V<=2;V++)D.push(g[N]+F*20*V);return D},"outwardTracksForSide"),p=d((N,F=new Map)=>pt(F.get(N)??N.points??[]),"replacementPointsFor"),f=d((N,F)=>{let D=0;for(const V of N)for(const h of F)le(V.a,V.b,h.a,h.b,Z)&&D++;return D},"crossingCountBetweenSegments"),y=d((N,F)=>f(it(N),it(F)),"crossingCountBetweenPaths"),v=d((N=new Map)=>{let F=0;const D=[],V=new Set,h=[],b=d(C=>{V.has(C)||(V.add(C),h.push(C))},"addEdge");for(let C=0;C<x.length;C++){const L=x[C],w=p(L,N);for(let B=C+1;B<x.length;B++){const U=x[B],q=y(w,p(U,N));q>0&&(F+=q,D.push({first:L,second:U,count:q}),b(L),b(U))}}return h.sort((C,L)=>(I.get(C)??0)-(I.get(L)??0)),{count:F,pairs:D,edgeSet:V,edges:h}},"crossingSnapshot"),M=d((N,F)=>{const D=new Set(F.keys());if(D.size===0)return N.count;let V=0;for(const b of N.pairs)(D.has(b.first)||D.has(b.second))&&(V+=b.count);let h=0;for(let b=0;b<x.length;b++){const C=x[b],L=D.has(C),w=p(C,F);for(let B=b+1;B<x.length;B++){const U=x[B];!L&&!D.has(U)||(h+=y(w,p(U,F)))}}return N.count-V+h},"crossingCountWithReplacements"),E=d(N=>{const F=new Map;for(const h of N.pairs){const b=F.get(h.first)??new Set;b.add(h.second),F.set(h.first,b);const C=F.get(h.second)??new Set;C.add(h.first),F.set(h.second,C)}const D=[],V=new Set;for(const h of N.edges){if(V.has(h))continue;const b=[h],C=[];for(V.add(h);b.length>0;){const L=b.pop();C.push(L);for(const w of F.get(L)??[])V.has(w)||(V.add(w),b.push(w))}C.sort((L,w)=>(I.get(L)??0)-(I.get(w)??0)),C.length>1&&D.push(C)}return D},"crossingComponents"),T=d(N=>[N.start,N.end].filter(F=>!!F),"endpointIdsFor"),m=d(N=>{const F=[];for(const D of E(N)){const V=new Set(D),h=new Set(D.flatMap(C=>T(C))),b=[...D];for(const C of x)V.has(C)||T(C).some(L=>h.has(L))&&b.push(C);b.sort((C,L)=>(I.get(C)??0)-(I.get(L)??0)),F.push(b)}return F},"pairSearchGroups"),S=d((N,F,D)=>M(N,new Map([[F,D]])),"crossingCountWithSingleReplacement"),A=d(N=>{const F=new Map;for(const D of N.pairs)F.set(D.first,(F.get(D.first)??0)+D.count),F.set(D.second,(F.get(D.second)??0)+D.count);return F},"currentCrossingsByEdge"),R=d(N=>N.slice(1).reduce((F,D,V)=>{const h=N[V];return F+Math.abs(D.x-h.x)+Math.abs(D.y-h.y)},0),"pathLength"),k=d((N=new Map)=>x.reduce((F,D)=>F+Qt(p(D,N)),0),"totalBends"),O=d((N=new Map)=>x.reduce((F,D)=>F+R(p(D,N)),0),"totalLength"),_=d((N,F,D=new Map)=>{const V=it(F);for(const h of x)if(h!==N){for(const b of V)for(const C of it(p(h,D)))if(ce(b,C,.5)>=_t)return!0}return!1},"pathHasSegmentConflict"),H=d((N,F)=>{const D=[N.start,N.end].filter(V=>!!V);for(const V of it(F))if(At(V.a,V.b,a,D,-2))return!0;return!1},"pathHitsNode"),P=d((N,F)=>{const D=ae(pt(F));it(D).length===D.length-1&&N.push(D)},"pushOrthogonalCandidate"),G=d(N=>N==="left"||N==="right","sideIsHorizontal"),j=d((N,F,D)=>{switch(F){case"left":return Math.min(N.x,D.x)-20;case"right":return Math.max(N.x,D.x)+20;case"top":return Math.min(N.y,D.y)-20;case"bottom":return Math.max(N.y,D.y)+20}},"localTrackForSameSide"),J=d((N,F,D,V)=>{const h=D==="left"||D==="top"?-1:1,b=[j(F,D,V),g[D]];for(const C of b)for(let L=0;L<=2;L++)P(N,ao(F,D,V,C+h*20*L))},"addSameSideCandidates"),dt=d((N,F,D,V,h)=>{for(const b of u(D))for(const C of u(h))P(N,[F,{x:b,y:F.y},{x:b,y:C},{x:V.x,y:C},V])},"addHorizontalToVerticalCandidates"),mt=d((N,F,D,V,h)=>{for(const b of u(D))for(const C of u(h))P(N,[F,{x:F.x,y:b},{x:C,y:b},{x:C,y:V.y},V])},"addVerticalToHorizontalCandidates"),kt=d((N,F,D,V,h)=>{const b=[...u("top"),...u("bottom")];for(const C of u(D))for(const L of u(h))for(const w of b)P(N,[F,{x:C,y:F.y},{x:C,y:w},{x:L,y:w},{x:L,y:V.y},V])},"addHorizontalPairCandidates"),Pt=d((N,F,D,V,h)=>{const b=[...u("left"),...u("right")];for(const C of u(D))for(const L of u(h))for(const w of b)P(N,[F,{x:F.x,y:C},{x:w,y:C},{x:w,y:L},{x:V.x,y:L},V])},"addVerticalPairCandidates"),Q=d(N=>{const F=new Set;return N.map(D=>pt(D)).filter(D=>{const V=D.map(h=>`${h.x.toFixed(3)},${h.y.toFixed(3)}`).join("|");return F.has(V)||D.length<2?!1:(F.add(V),!0)})},"dedupeCandidatePaths"),W=d((N,F,D,V)=>{const h=[],b=co(N,F,D,V,20,Z);b&&P(h,b),F===V&&J(h,N,F,D);const C=G(F),L=G(V);return C&&!L?dt(h,N,F,D,V):!C&&L?mt(h,N,F,D,V):C?kt(h,N,F,D,V):Pt(h,N,F,D,V),Q(h)},"buildCandidatesForSides"),et=d((N,F,D,V)=>{const h=[...u("left"),...u("right")],b=[...u("top"),...u("bottom")];for(const C of l){const L=Ie(V,C),w=C==="top"||C==="bottom"?u(C):b;for(const B of h){P(N,[F,D,{x:B,y:D.y},{x:B,y:L.y},L]);for(const U of w)P(N,[F,D,{x:B,y:D.y},{x:B,y:U},{x:L.x,y:U},L])}}},"addVerticalDepartureOuterTrackCandidates"),at=d((N,F,D,V)=>{const h=[...u("left"),...u("right")],b=[...u("top"),...u("bottom")];for(const C of l){const L=Ie(V,C),w=C==="left"||C==="right"?u(C):h;for(const B of b){P(N,[F,D,{x:D.x,y:B},{x:L.x,y:B},L]);for(const U of w)P(N,[F,D,{x:D.x,y:B},{x:U,y:B},{x:U,y:L.y},L])}}},"addHorizontalDepartureOuterTrackCandidates"),gt=d(N=>{const F=N.start,D=N.end,V=D?c.get(D):void 0;if(!F||!V)return[];const h=pt(N.points??[]);if(h.length<4)return[];const b=h[0],C=h[1],L=[];return wt(b,C,Z)?et(L,b,C,V):Tt(b,C,Z)&&at(L,b,C,V),L},"terminalPreservingOuterTrackCandidates"),xt=d(N=>{const F=N.start,D=N.end,V=F?c.get(F):void 0,h=D?c.get(D):void 0;if(!V||!h)return[];const b=[];for(const C of l){const L=Ie(V,C);for(const w of l)b.push(...W(L,C,Ie(h,w),w))}return b.push(...gt(N)),b},"candidatePathsFor"),vt=d(()=>new Map(x.map(N=>[N,it(p(N))])),"currentSegmentsByEdge"),Vt=d((N,F,D)=>{const V=new Set;for(const h of x){if(h===N)continue;const b=D.get(h)??it(p(h));F.some(C=>b.some(L=>ce(C,L,.5)>=_t))&&V.add(h)}return V},"sharedTrackConflictsFor"),jt=d((N,F,D,V)=>{const h=new Set;return xt(N).map(C=>ae(pt(C))).filter(C=>{if(H(N,C))return!1;const L=C.map(w=>`${w.x.toFixed(3)},${w.y.toFixed(3)}`).join("|");return h.has(L)||C.length<2?!1:(h.add(L),!0)}).map(C=>{const L=it(C);let w=0;for(const B of x)B!==N&&(w+=f(L,D.get(B)??it(p(B))));return{candidate:C,candidateSegments:L,crossings:F.count-(V.get(N)??0)+w,bends:Qt(C,Z),totalBends:Qt(C),length:R(C)}}).filter(({crossings:C})=>C<=F.count).sort((C,L)=>C.crossings-L.crossings||C.bends-L.bends||C.length-L.length).slice(0,48).map(C=>({path:C.candidate,segments:C.candidateSegments,sharedTrackConflicts:Vt(N,C.candidateSegments,D),totalBends:C.totalBends,length:C.length}))},"pairCandidatesFor"),Ut=d((N,F,D,V,h,b)=>{let C=0;for(const w of N.pairs)(w.first===F||w.second===F||w.first===V||w.second===V)&&(C+=w.count);let L=f(D.segments,h.segments);for(const w of x){if(w===F||w===V)continue;const B=b.get(w)??it(p(w));L+=f(D.segments,B)+f(h.segments,B)}return N.count-C+L},"pairCrossingCount"),te=d((N,F)=>{for(const D of N.sharedTrackConflicts)if(D!==F)return!1;return!0},"conflictsOnlyWith"),Se=d((N,F)=>N.segments.some(D=>F.segments.some(V=>ce(D,V,.5)>=_t)),"candidatesShareTrack"),de=d((N,F,D,V)=>te(F,D.edge)&&te(V,N.edge)&&!Se(F,V),"pairCandidatesAreCompatible"),Ce=d((N,F,D,V,h)=>{const b=Ut(N.current,F.edge,D,V.edge,h,N.baseSegments);if(!(b>=N.current.count))return{replacements:new Map([[F.edge,D.path],[V.edge,h.path]]),crossings:b,bends:N.currentBends-(N.baseBendsByEdge.get(F.edge)??0)-(N.baseBendsByEdge.get(V.edge)??0)+D.totalBends+h.totalBends,length:N.currentLength-(N.baseLengthByEdge.get(F.edge)??0)-(N.baseLengthByEdge.get(V.edge)??0)+D.length+h.length}},"scorePairReplacement"),dn=d((N,F)=>N.crossings<F.crossings||N.crossings===F.crossings&&(N.bends<F.bends||N.bends===F.bends&&N.length<F.length),"pairScoreIsBetter"),un=d((N,F,D,V)=>{let h=V;for(const b of F.candidates)for(const C of D.candidates){if(!de(F,b,D,C))continue;const L=Ce(N,F,b,D,C);L&&dn(L,h)&&(h=L)}return h},"bestScoreForOptionPair"),hn=d(N=>{const F=k(),D=O(),V=vt(),h=A(N),b=new Map(x.map(q=>[q,Qt(p(q))])),C=new Map(x.map(q=>[q,R(p(q))])),L=new Map,w=m(N);for(const q of w)for(const z of q){if(L.has(z))continue;const Y=jt(z,N,V,h);Y.length>0&&L.set(z,{edge:z,candidates:Y})}let B={replacements:new Map,crossings:N.count,bends:F,length:D};const U={current:N,currentBends:F,currentLength:D,baseBendsByEdge:b,baseLengthByEdge:C,baseSegments:V};for(const q of w){const z=new Set(q.filter(ot=>N.edgeSet.has(ot))),Y=q.map(ot=>L.get(ot)).filter(ot=>!!ot);for(let ot=0;ot<Y.length;ot++){const rt=Y[ot];for(let st=ot+1;st<Y.length;st++){const tt=Y[st];!z.has(rt.edge)&&!z.has(tt.edge)||(B=un(U,rt,tt,B))}}}return B.replacements.size>0?B.replacements:void 0},"bestPairedReplacement");for(let N=0;N<4;N++){const F=v(),D=F.count;if(D===0)return;let V,h,b=D,C=Number.POSITIVE_INFINITY;for(const w of F.edges){const B=Qt(p(w),Z);for(const U of xt(w)){const q=H(w,U),z=!q&&_(w,U),Y=S(F,w,U),ot=Qt(U,Z);q||z||!(Y<D||Y===D&&ot<B)||Y>b||Y===b&&ot>=C||(V=w,h=U,b=Y,C=ot)}}if(V&&h){V.points=h;continue}const L=hn(F);if(!L)return;for(const[w,B]of L)w.points=B}}d(vs,"resolveRenderedOrthogonalCrossings");var pe=.001,Wr=8;function Ls(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e),s=["top","bottom","left","right"],r=20,i={top:Math.min(...o.map(f=>f.rect.top))-r,bottom:Math.max(...o.map(f=>f.rect.bottom))+r,left:Math.min(...o.map(f=>f.rect.left))-r,right:Math.max(...o.map(f=>f.rect.right))+r},c=d((f,y,v,M)=>{const E=[],T=co(f,y,v,M,r,pe);return T&&E.push(T),y===M&&E.push(ao(f,y,v,i[y])),E},"buildOrthogonalPathCandidates"),a=d((f,y)=>{for(let v=0;v<f.length-1;v++){const M=f[v],E=f[v+1];if(At(M,E,o,y,1))return!0}return!1},"pathHitsNode"),l=d((f,y,v=!1)=>{let M=0;const E=Re(f,pe),T=y.start,m=y.end;for(const S of t){if(S===y||S.isLayoutOnly)continue;const A=S.start,R=S.end;if(!v&&T&&m&&(A===T||A===m||R===T||R===m))continue;const k=S.points;if(!(!k||k.length<2))for(const O of E)for(const _ of Re(k,pe)){if(fo(O.a,O.b,_.a,_.b,pe,pe)){M++;continue}ce(O,_,pe)>=Wr&&M++}}return M},"pathConflictCount"),g=4,x=d((f,y)=>{const v=Math.abs(f.y-y.rect.top),M=Math.abs(f.y-y.rect.bottom),E=Math.abs(f.x-y.rect.left),T=Math.abs(f.x-y.rect.right);let m="top",S=v;return M<S&&(m="bottom",S=M),E<S&&(m="left",S=E),T<S&&(m="right",S=T),m},"nearestSideOfRect"),I=new Map,u=d((f,y,v)=>{const M=I.get(f)??[];M.push({side:y,edgeId:v}),I.set(f,M)},"addFaceClaim");for(const f of t){if(f.isLayoutOnly)continue;const y=f.points??[];if(y.length<1)continue;const v=f.id??"",M=f.start,E=f.end;if(M){const T=n.get(M);T&&u(M,x(y[0],T),v)}if(E){const T=n.get(E);T&&u(E,x(y[y.length-1],T),v)}}const p=d((f,y,v)=>I.get(f)?.some(M=>M.edgeId!==v&&M.side===y)??!1,"faceIsClaimed");for(const f of t){if(f.isLayoutOnly)continue;const y=f.points;if(!y||y.length<2)continue;const v=Qt(y,pe);if(v<g)continue;const M=f.start,E=f.end;if(!M||!E)continue;const T=n.get(M),m=n.get(E);if(!T||!m)continue;const S=f.id??"",A=l(y,f,!0),R=l(y,f);let k,O=A,_=v;for(const H of s){if(p(M,H,S))continue;const P=Ie(T,H);for(const G of s){if(p(E,G,S))continue;const j=Ie(m,G);for(const J of c(P,H,j,G)){if(a(J,[M,E]))continue;const dt=Qt(J,pe);if(A>0){const mt=l(J,f,!0);if(mt>O||mt===O&&dt>=_)continue;O=mt,_=dt,k=J;continue}l(J,f)>R||dt<_&&(_=dt,k=J)}}}if(k){f.points=k;const H=I.get(M);H&&I.set(M,H.filter(G=>G.edgeId!==S));const P=I.get(E);P&&I.set(E,P.filter(G=>G.edgeId!==S)),u(M,x(k[0],T),S),u(E,x(k[k.length-1],m),S)}}}d(Ls,"simplifyDetouredEdges");var Kt=.001,Po=10,Ve=7;function $n(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const i=r.x-s.x,c=r.y-s.y;if(!(Math.abs(i)+Math.abs(c)<Kt)){if(Math.abs(c)<=Kt){const l=s.x+Math.sign(i)*Po;return{left:Math.min(s.x,l),right:Math.max(s.x,l),top:s.y-Ve,bottom:s.y+Ve}}if(Math.abs(i)<=Kt){const l=s.y+Math.sign(c)*Po;return{left:s.x-Ve,right:s.x+Ve,top:Math.min(s.y,l),bottom:Math.max(s.y,l)}}return{left:Math.min(s.x,r.x),right:Math.max(s.x,r.x),top:Math.min(s.y,r.y),bottom:Math.max(s.y,r.y)}}}d($n,"markerClearanceRectFor");function Es(t){return{left:Math.min(t.left,t.right),right:Math.max(t.left,t.right),top:Math.min(t.top,t.bottom),bottom:Math.max(t.top,t.bottom)}}d(Es,"normalizeRect");function zn(t,e){const n=pt(e),o=$n(n,!0),s=$n(n,!1);return[o,s].some(r=>r&&Je(t,Es(r)))}d(zn,"labelOverlapsOwnMarker");function Ue(t,e){const n=[];for(const p of t){if(p.isLayoutOnly)continue;const f=p.points;if(!(!f||f.length<2))for(let y=0;y<f.length-1;y++)n.push({edgeId:p.id,p1:f[y],p2:f[y+1]})}const o=[],s=[];for(const p of e.values()){const f=p.isGroup,y=p.parentId;if(f&&!y){const M=qt(p);M&&s.push({id:p.id,rect:M});continue}if(f||p.isEdgeLabel)continue;const v=qt(p);v&&o.push({nodeId:p.id,rect:v})}const r=3,i=1,c=12,a=d((p,f)=>{const y=Tn(f,r);for(const{nodeId:v,rect:M}of o)if(v!==p&&Je(y,M))return!0;return!1},"labelOverlapsForeignNode"),l=d((p,f)=>{const y=Tn(f,r);for(const v of n)if(v.edgeId!==p&&cn(v.p1,v.p2,y))return!0;return!1},"labelOverlapsForeignEdge"),g=d((p,f,y)=>a(p,y)||l(f,y),"labelOverlapsAnything"),x=[],I=d(p=>{for(const{id:f,rect:y}of s)if(ts(y,p))return f},"findContainingLane"),u=d((p,f)=>x.some(y=>y.labelId!==p&&Je(f,y.rect)),"overlapsPlacedLabel");for(const p of t){if(p.isLayoutOnly)continue;const f=p.labelNodeId;if(!f)continue;const y=e.get(f);if(!y)continue;const v=p.points;if(!v||v.length<2)continue;const M=y.width??0,E=y.height??0;if(M<=0||E<=0)continue;const T=[];for(let Q=0;Q<v.length-1;Q++){const W=v[Q],et=v[Q+1],at=Math.abs(W.x-et.x),gt=Math.abs(W.y-et.y);at<Kt&><Kt||at>=Kt&>>=Kt||T.push({idx:Q,length:at+gt,orientation:at>=Kt?"horizontal":"vertical",midX:(W.x+et.x)/2,midY:(W.y+et.y)/2})}if(T.length===0)continue;const m=T.length>=3?T.filter(Q=>Q.idx>0&&Q.idx<T.length-1):T,S=m.length>0?m:T,A=M>=E?"horizontal":"vertical",R=d(Q=>[...Q].sort((W,et)=>{const at=W.orientation===A,gt=et.orientation===A;if(at!==gt)return at?-1:1;const xt=W.length>=(W.orientation==="horizontal"?M:E)+2,vt=et.length>=(et.orientation==="horizontal"?M:E)+2;return xt!==vt?xt?-1:1:et.length-W.length}),"rankSegments"),k=T[0],O=T[T.length-1],_=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((Q,W)=>{const et=v[Q.idx],at=v[Q.idx+1];return{midX:et.x+(at.x-et.x)*W,midY:et.y+(at.y-et.y)*W}},"anchorAtT"),P=d((Q,W,et)=>Math.min(et,Math.max(W,Q)),"clamp"),G=d((Q,W)=>Q.midX>=W.left-Kt&&Q.midX<=W.right+Kt&&Q.midY>=W.top-Kt&&Q.midY<=W.bottom+Kt,"pointInsideRectInclusive"),j=d(Q=>{const W=Ae(Q.midX,Q.midY,M,E),et=I(W);if(et)return{laneId:et,anchor:Q,rect:W};const at=s.find(({rect:te})=>G(Q,te));if(!at)return;const gt=at.rect.left+M/2+i,xt=at.rect.right-M/2-i,vt=at.rect.top+E/2+i,Vt=at.rect.bottom-E/2-i;if(gt>xt||vt>Vt)return;const jt={midX:P(Q.midX,gt,xt),midY:P(Q.midY,vt,Vt)},Ut=Ae(jt.midX,jt.midY,M,E);return G(Q,Ut)?{laneId:at.id,anchor:jt,rect:Ut}:void 0},"placementForAnchor"),J=d((Q,W,et)=>Q.orientation==="horizontal"?Math.abs(W.midX-et.x):Math.abs(W.midY-et.y),"distanceAlongSegment"),dt=d((Q,W)=>{const at=(Q.orientation==="horizontal"?M/2:E/2)+c;if(Q===k){const gt=v[Q.idx];if(J(Q,W,gt)+Kt<at)return!1}if(Q===O){const gt=v[Q.idx+1];if(J(Q,W,gt)+Kt<at)return!1}return!0},"labelClearsTerminalEndpoints"),mt=d(Q=>{const W=R(Q);for(const et of W)for(const at of _){const gt=H(et,at);if(!dt(et,gt))continue;const xt=j(gt);if(xt&&!zn(xt.rect,v)&&!u(f,xt.rect)&&!g(f,p.id,xt.rect))return{laneId:xt.laneId,anchor:xt.anchor}}},"tryPool"),kt=d((Q,W,et=!1)=>{const at=R(Q);for(const gt of at){const xt={midX:gt.midX,midY:gt.midY};if(W&&!dt(gt,xt))continue;const vt=j(xt);if(vt&&!zn(vt.rect,v)&&!u(f,vt.rect)&&!a(f,vt.rect)&&(et||!l(p.id,vt.rect)))return{laneId:vt.laneId,anchor:vt.anchor}}},"findLaneContainingFallback"),Pt=mt(S)??(S.length<T.length?mt(T):void 0)??kt(T,!0)??kt(T,!1)??kt(T,!1,!0);if(Pt){y.x=Pt.anchor.midX,y.y=Pt.anchor.midY,y.parentId=Pt.laneId;const Q=Ae(Pt.anchor.midX,Pt.anchor.midY,M,E),W=x.findIndex(et=>et.labelId===f);W>=0?x[W]={labelId:f,rect:Q}:x.push({labelId:f,rect:Q})}}}d(Ue,"anchorLabelsToPolyline");var Sn=1e-6,Kr=8,Bo=Kr/2,qr=3;function Vn(t,e){return t<e?`${t}::${e}`:`${e}::${t}`}d(Vn,"pairKey");function Ts(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e),s=new Map;for(const i of e){const c=i.id;if(!i.isGroup&&i.isEdgeLabel){s.set(c,{w:i.width??0,h:i.height??0});continue}}const r=d((i,c,a,l)=>{const g=Vn(c,a);let x=0;const I=d(u=>{if(!u)return;const p=s.get(u);if(!p)return;const f=l==="x"?p.w/2:p.h/2;f>x&&(x=f)},"consider");I(i.labelNodeId);for(const u of t){if(u===i||u.isLayoutOnly)continue;const p=u.start,f=u.end;!p||!f||Vn(p,f)===g&&I(u.labelNodeId)}return x>0?x+qr:0},"labelClearanceFor");for(const i of t){if(i.isLayoutOnly)continue;const c=i.points;if(!ro(c,Sn))continue;const a=lo(i,n,Sn);if(!a)continue;const{srcId:l,dstId:g,srcInfo:x,dstInfo:I,collinearX:u,collinearY:p}=a;if(u===p)continue;let f,y;if(u){const m=I.cy>x.cy;f={x:x.cx,y:m?x.rect.bottom:x.rect.top},y={x:I.cx,y:m?I.rect.top:I.rect.bottom}}else{const m=I.cx>x.cx;f={x:m?x.rect.right:x.rect.left,y:x.cy},y={x:m?I.rect.left:I.rect.right,y:I.cy}}if(At(f,y,o,[l,g],1))continue;const M=r(i,l,g,u?"x":"y"),E=M>Bo?M:Bo,T=[0,E,-E];for(const m of T){const S={...f},A={...y};if(u){if(S.x+=m,A.x+=m,S.x<=x.rect.left||S.x>=x.rect.right||A.x<=I.rect.left||A.x>=I.rect.right)continue}else if(S.y+=m,A.y+=m,S.y<=x.rect.top||S.y>=x.rect.bottom||A.y<=I.rect.top||A.y>=I.rect.bottom)continue;if(!At(S,A,o,[l,g],1)&&!Ze(S,A,t,i,{epsilon:Sn})){i.points=[S,A];break}}}}d(Ts,"straightenCollinearSiblingDetours");function jn(t,e){const{realNodeRects:a,labelNodeRects:l}=me(e.values()),g=d((m,S)=>Re(S,.001).map(A=>({...A,edge:m,interior:A.index>=1&&A.index<=S.length-3})),"segmentsFor"),x=d(()=>{const m=[];for(const S of t){if(S.isLayoutOnly)continue;const A=S.points;!A||A.length<2||m.push(...g(S,pt(A)))}return m},"allSegments"),I=d((m,S)=>m.horizontal&&S.horizontal?zt(m.a.x,m.b.x,S.a.x,S.b.x)>=8&&Math.abs(m.a.y-S.a.y)<7:m.vertical&&S.vertical?zt(m.a.y,m.b.y,S.a.y,S.b.y)>=8&&Math.abs(m.a.x-S.a.x)<7:!1,"hasCrowdedParallelTrack"),u=d((m,S)=>{const A=m.start,R=m.end,k=g(m,S);if(k.length!==S.length-1)return!1;const O=[A,R].filter(H=>!!H),_=m.labelNodeId?[m.labelNodeId]:[];for(const H of k)if(At(H.a,H.b,a,O,-2)||At(H.a,H.b,l,_,-2))return!1;for(const H of t){if(H===m||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of k)for(const j of g(H,pt(P)))if(I(G,j)||le(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),p=d((m,S)=>{const A=pt(m.edge.points??[]);if(A.length<4||m.index>=A.length-1)return;const R=A.map(k=>({...k}));if(m.horizontal)R[m.index].y+=S,R[m.index+1].y+=S;else if(m.vertical)R[m.index].x+=S,R[m.index+1].x+=S;else return;return g(m.edge,R).length===R.length-1?R:void 0},"shiftedCandidate"),f=d((m,S)=>({x:m.x??(S.left+S.right)/2,y:m.y??(S.top+S.bottom)/2}),"nodeCenter"),y=d(m=>{const S=m.edge,A=pt(S.points??[]);if(A.length!==4||m.index!==1)return;const R=S.start?e.get(S.start):void 0,k=S.end?e.get(S.end):void 0,O=R?qt(R):void 0,_=k?qt(k):void 0,H=A.slice(m.index+2);if(!(!R||!k||!O||!_||H.length===0))return{sourceCenter:f(R,O),targetCenter:f(k,_),sourceRect:O,tail:H}},"sourceDetourContextFor"),v=d((m,S,A,R,k,O)=>{const _=R.y>=A.y,H=_?k.bottom:k.top,P=H+(_?20:-20);if(_&&m.b.y<=P+.001||!_&&m.b.y>=P-.001)return;const G=m.a.x+S;return pt([{x:A.x,y:H},{x:A.x,y:P},{x:G,y:P},{x:G,y:m.b.y},...O],.001)},"verticalSourceDetour"),M=d((m,S,A,R,k,O)=>{const _=R.x>=A.x,H=_?k.right:k.left,P=H+(_?20:-20);if(_&&m.b.x<=P+.001||!_&&m.b.x>=P-.001)return;const G=m.a.y+S;return pt([{x:H,y:A.y},{x:P,y:A.y},{x:P,y:G},{x:m.b.x,y:G},...O],.001)},"horizontalSourceDetour"),E=d((m,S)=>{const A=y(m);if(A){if(m.vertical)return v(m,S,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail);if(m.horizontal)return M(m,S,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail)}},"sourceDetourCandidate"),T=[-7,7,-14,14,-21,21];for(let m=0;m<12;m++){const S=x();let A=!1;for(let R=0;R<S.length&&!A;R++)for(let k=R+1;k<S.length&&!A;k++){const O=S[R],_=S[k];if(O.edge===_.edge||!I(O,_))continue;const H=[O,_].filter(P=>P.interior);for(const P of H){for(const G of T){const j=p(P,G);if(j&&u(P.edge,j)){P.edge.points=j,A=!0;break}const J=E(P,G);if(J&&u(P.edge,J)){P.edge.points=J,A=!0;break}}if(A)break}}if(!A)return}}d(jn,"nudgeSharedInteriorSubpaths");function ws(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,c=o.y-n.y,a=s*c-r*i;if(Math.abs(a)<1e-10)return!1;const l=n.x-t.x,g=n.y-t.y,x=(l*c-g*i)/a,I=(l*r-g*s)/a,u=.01;return x>u&&x<1-u&&I>u&&I<1-u}d(ws,"segmentsIntersect");function As(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=es(e),r=[];for(const c of n){if(c.isLayoutOnly)continue;const a=c.points;if(!a||a.length<2)continue;const l=c.start,g=c.end,x=c.labelNodeId,I=c.id??`${l}->${g}`;for(const u of s)if(!(u.nodeId===l||u.nodeId===g)&&!(x&&u.nodeId===x)){for(let p=0;p<a.length-1;p++)if(cn(a[p],a[p+1],u,-1)){o.push({type:"edge-node-overlap",edgeId:I,targetId:u.nodeId,detail:`segment ${p} passes through node "${u.nodeId}"`});break}}for(let u=0;u<a.length-1;u++)r.push({edgeId:I,start:l,end:g,p1:a[u],p2:a[u+1]})}const i=new Set;for(let c=0;c<r.length;c++)for(let a=c+1;a<r.length;a++){const l=r[c],g=r[a];if(l.edgeId!==g.edgeId&&!(l.start===g.start||l.start===g.end||l.end===g.start||l.end===g.end)&&ws(l.p1,l.p2,g.p1,g.p2)){const x=l.edgeId<g.edgeId?`${l.edgeId}|${g.edgeId}`:`${g.edgeId}|${l.edgeId}`;i.has(x)||(i.add(x),o.push({type:"edge-edge-crossing",edgeId:l.edgeId,targetId:g.edgeId,detail:`edges "${l.edgeId}" and "${g.edgeId}" cross`}))}}if(o.length>0){const c=o.filter(l=>l.type==="edge-node-overlap").length,a=o.filter(l=>l.type==="edge-edge-crossing").length;Ke.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${c} edge-node overlap(s), ${a} edge crossing(s)`);for(const l of o)Ke.warn(`[SWIMLANE_VALIDATE] ${l.type}: ${l.detail}`)}return o}d(As,"validateSwimlanesLayout");function Rs(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(c=>!c.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!ms(t,e)||e==="BT"&&s.length>0&&!ps(t))return;for(const c of o){if(c.isLayoutOnly)continue;const a=c.points;!a||a.length<2||(c.points=ae(Qe(a)))}Ls(o,n),Ts(o,n),ys(o,n);const r=new Map;for(const c of n)r.set(String(c.id),c);Ue(o,r),is(o,r),xs(o,r),jn(o,r),bs(o,r),Ms(o,r),Xn(o,r),Is(o,r);const i=d(()=>{vs(o,r),Ss(o,r),Cs(o,r),Ue(o,r),Dn(o,r),Xn(o,r),Ue(o,r),Dn(o,r)},"finalizeRenderedEdges");i(),jn(o,r),i(),Yn(o,r),Gn(o,r),Yn(o,r),Gn(o,r)}d(Rs,"postProcessSwimlaneLayout");function ye(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const i=`${r.id}:${r.src}->${r.dst}`;n.has(i)||(n.add(i),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(ye,"normalizeGraph");function mo(t,e){return t.edges.filter(n=>n.dst===e)}d(mo,"incoming");function Ns(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(Ns,"buildSuccessorMap");function yo(t){const e=Ns(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(yo,"buildSortedSuccessorMap");function xo(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(xo,"buildInDegreeMap");function bo(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(bo,"sortedZeroInDegreeNodes");function ln(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(ln,"buildPredecessorSuccessorMaps");function Mo(t,e,n,o){let s=0;for(const i of t.nodes)o?.skipGroups&&t.nodeById.get(i)?.isGroup||(s=Math.max(s,n[i]??0));const r=Array.from({length:s+1},()=>[]);for(const i of e)o?.skipGroups&&t.nodeById.get(i)?.isGroup||r[Math.max(0,n[i]??0)].push(i);return r}d(Mo,"buildLayersFromRanks");function Be(t){const e=xo(t),n=bo(e),o=[],s=yo(t);for(;n.length;){const r=n.shift();o.push(r);for(const i of s.get(r)??[])if(e.set(i,(e.get(i)??0)-1),(e.get(i)??0)===0){let c=0;for(;c<n.length&&n[c]<i;)c++;n.splice(c,0,i)}}return o.length===t.nodes.length?o:null}d(Be,"topoSortIfAcyclic");function Ne(t){const e=new Map;let n=0;for(const o of t)e.set(o,n),n++;return e}d(Ne,"buildLayerIndex");function Io(t){const e=new Array(t.length),n=d((o,s)=>{if(s-o<=1)return 0;const r=o+s>>1;let i=n(o,r)+n(r,s),c=o,a=r,l=o;for(;c<r||a<s;)a>=s||c<r&&t[c]<=t[a]?e[l++]=t[c++]:(e[l++]=t[a++],i+=r-c);for(let g=o;g<s;g++)t[g]=e[g];return i},"count");return n(0,t.length)}d(Io,"countInversions");function Os(t){const e=ye(t),n=new Map;for(const g of e.nodes)n.set(g,[]);for(const g of e.edges)n.get(g.src).push(g);for(const g of n.values())g.sort((x,I)=>x.dst===I.dst?x.id.localeCompare(I.id):x.dst.localeCompare(I.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const x of n.get(g)??[]){const I=x.dst;o[I]===0?r(I):o[I]===1&&s.push(x)}o[g]=2},"dfs"),i=[...e.nodes].sort((g,x)=>g.localeCompare(x));for(const g of i)o[g]===0&&r(g);const c=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),a=e.edges.map(g=>c.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:a,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(Os,"removeCycles_DFS");function Ps(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const c=n(r)??r;return e.set(o,c),c},"resolve");for(const o of t.nodes)n(o);return e}d(Ps,"buildTopLaneMap");function fe(t){const e=Ps(t);return n=>e.get(n)??null}d(fe,"createTopLaneResolver");function fn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(fn,"buildTopLaneOrder");function So(t,e){const n=fn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const i of e)!o.has(i)||s.has(i)||(s.add(i),r.push(i));for(const i of n)s.has(i)||r.push(i);return r}d(So,"resolveTopLaneOrder");var Jr={EPSILON:1e-6},sn={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},ko={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Bs(t,e){const n=ye(t),o=e?.laneOf??(()=>null),s=e?.rankHint,{preds:r}=ln(n);for(const m of r.values())m.sort((S,A)=>S.localeCompare(A));const i=Be(n)??[...n.nodes].sort((m,S)=>m.localeCompare(S)),c=new Map;for(const[m,S]of i.entries())c.set(S,m);const a=new Map,l=new Map;for(const m of n.nodes)l.set(m,[]);for(const m of i){const S=(r.get(m)??[]).filter(A=>a.has(A));if(S.length>0){const A=ks(m,S,{laneOf:o,rankHint:s,topoIndex:c});a.set(m,A),l.get(A).push(m)}else a.has(m)||a.set(m,null)}for(const m of n.nodes)a.has(m)||a.set(m,null);const g=new Set;for(const m of n.nodes)(a.get(m)??null)===null&&g.add(m);const x=[...g].sort((m,S)=>{const A=c.get(m)??0,R=c.get(S)??0;return A===R?m.localeCompare(S):A-R}),I=_s(n),u=new Map;for(const[m,S]of I.entries())u.set(m,[...S].sort((A,R)=>A.localeCompare(R)));const p=Fs(u),f=Ds(u),y=new Map;for(const m of n.nodes)y.set(m,[]);for(const m of f)for(const S of m.nodes){const A=y.get(S);A?A.push(m.id):y.set(S,[m.id])}const v=[],M=[],E=new Set,T=d(m=>{if(!E.has(m)){E.add(m),v.push(m);for(const S of l.get(m)??[])T(S);M.push(m)}},"walk");for(const m of x)T(m);for(const m of i)T(m);return{parent:a,children:l,roots:x,componentOf:p,blocks:f,nodeBlocks:y,adjacency:u,preorder:v,postorder:M,topologicalOrder:i}}d(Bs,"buildDrivingTree");function ks(t,e,n){const o=n.laneOf(t);return[...e].sort((r,i)=>{const c=n.laneOf(r),a=n.laneOf(i),l=c!=null&&c===o,g=a!=null&&a===o;if(l!==g)return l?-1:1;const x=n.rankHint?.[r],I=n.rankHint?.[i];if(x!=null&&I!=null&&x!==I)return I-x;const u=n.topoIndex.get(r)??0,p=n.topoIndex.get(i)??0;return u!==p?u-p:r.localeCompare(i)})[0]}d(ks,"chooseParent");function _s(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(_s,"buildAdjacency");function Fs(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const i of t.get(r)??[])e.has(i)||s.push(i)}}n++}return e}d(Fs,"assignComponents");function Ds(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const i=d((c,a)=>{e.set(c,++r),n.set(c,r);for(const l of t.get(c)??[])l!==a&&(e.has(l)?(e.get(l)??0)<(e.get(c)??0)&&(o.push([c,l]),n.set(c,Math.min(n.get(c)??r,e.get(l)??r))):(o.push([c,l]),i(l,c),n.set(c,Math.min(n.get(c)??r,n.get(l)??r)),(n.get(l)??0)>=(e.get(c)??0)&&s.push(Hs(c,l,o,s.length))))},"visit");for(const c of t.keys())e.has(c)||i(c,null);return s}d(Ds,"computeBlocks");function Hs(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const i=n.pop();if(s.push(i),r.add(i[0]),r.add(i[1]),i[0]===t&&i[1]===e||i[0]===e&&i[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d(Hs,"popBlock");function Xs(t,e,n){const o=[...t.nodes],s=new Map;for(const[M,E]of o.entries())s.set(E,M);const r=o.length,i=new Array(r).fill(-1),c=new Array(r).fill(0),a=[],l=new Set;for(const M of o){const E=n.parent.get(M)??null,T=s.get(M);T!=null&&E==null&&(i[T]=-1,c[T]=0,l.has(M)||(l.add(M),a.push(M)))}for(;a.length>0;){const M=a.shift(),E=s.get(M);if(E==null)continue;const T=n.children.get(M)??[];for(const m of T){if(l.has(m))continue;const S=s.get(m);S!=null&&(i[S]=E,c[S]=c[E]+1,l.add(m),a.push(m))}}for(const M of o){if(l.has(M))continue;const E=s.get(M);E!=null&&(i[E]=-1,c[E]=0,l.add(M))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),x=Array.from({length:g},()=>new Array(r).fill(-1));for(let M=0;M<r;M++)x[0][M]=i[M];for(let M=1;M<g;M++)for(let E=0;E<r;E++){const T=x[M-1][E];x[M][E]=T===-1?-1:x[M-1][T]}const I=d((M,E)=>{if(M===-1||E===-1)return-1;c[M]<c[E]&&([M,E]=[E,M]);const T=c[M]-c[E];for(let m=0;m<g;m++)if(T>>m&1&&(M=x[m][M],M===-1))return-1;if(M===E)return M;for(let m=g-1;m>=0;m--){const S=x[m][M],A=x[m][E];S===-1||A===-1||S!==A&&(M=S,E=A)}return x[0][M]},"lcaIndex"),u=Array.from({length:r},()=>new Map);for(const M of t.edges){let E=M.src,T=M.dst,m=e[E],S=e[T];if(m==null||S==null||(m>S&&([E,T]=[T,E],[m,S]=[S,m]),m==null||S==null||m===S))continue;const A=s.get(E),R=s.get(T);if(A==null||R==null)continue;const k=I(A,R);if(k===-1)continue;const O=u[k];for(let _=m;_<S;_++)O.set(_,(O.get(_)??0)+1)}const p=new Map,f=d((M,E)=>{if(E.size!==0)for(const[T,m]of E)M.set(T,(M.get(T)??0)+m)},"mergeInto"),y=new Set,v=d(M=>{const E=s.get(M);y.add(M);const T=E==null?void 0:u[E],m=T?new Map(T):new Map,S=n.children.get(M)??[];for(const A of S){const R=v(A),k=e[M];if(k!=null){let O=p.get(M);O||(O=new Map,p.set(M,O));let _=R.get(k)??0;const H=e[A];H!=null&&H>k&&(_+=1),O.set(A,_)}f(m,R)}return m},"dfs");for(const M of n.roots)y.has(M)||v(M);for(const M of o)y.has(M)||v(M);return p}d(Xs,"computeSubtreeCrossCounts");function Ys(t,e,n){const o=new Map,s=d(r=>{let i=n[r]??0;const c=[...e.get(r)??[]];c.sort(Co(n));for(const a of c){s(a);const l=o.get(a);l!=null&&(i=Math.min(i,l))}o.set(r,i)},"annotate");for(const r of t)s(r);return o}d(Ys,"annotateMinimumLayers");function Co(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(Co,"compareByRankThenId");function Gs(t,e,n,o){let s=0;for(const a of e){const l=n[a]??0;l>s&&(s=l)}const r=Array.from({length:s+1},()=>[]),i=new Set,c=d(a=>{if(i.has(a))return;i.add(a);const l=n[a]??0;r[l]||(r[l]=[]),r[l].push(a);for(const g of o(a))c(g)},"emit");for(const a of t)c(a);for(const a of e)if(!i.has(a)){const l=n[a]??0;r[l]||(r[l]=[]),r[l].push(a),i.add(a)}return r}d(Gs,"emitNodesInTreeOrder");function $s(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d($s,"deduplicateLayers");function zs(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const i=e[s]??0,c=[],a=[],l=n.get(s);for(const g of r){const x=o.get(g)??i;x>i?c.push({child:g,min:x}):a.push(g)}return c.sort((g,x)=>g.min===x.min?g.child.localeCompare(x.child):g.min-x.min),a.sort((g,x)=>{const I=l?.get(g)??0,u=l?.get(x)??0;if(I!==u)return I-u;const p=o.get(g)??i,f=o.get(x)??i;return p!==f?p-f:g.localeCompare(x)}),[...c.map(g=>g.child),...a]}}d(zs,"createChildOrderer");function rn(t,e,n){const o=Bs(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const x of t.nodes)s.has(x)||s.set(x,[]);const i=Xs(t,e,o),c=[...r].sort(Co(e)),a=Ys(c,s,e),l=zs(s,e,i,a);let g=Gs(c,t.nodes,e,l);return g=$s(g),g}d(rn,"buildMultitreeLayerOrder");function Vs(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(e),i=[];for(const c of n)o.has(c.src)&&s.has(c.dst)&&i.push(r.get(c.dst));return Io(i)}d(Vs,"countCrossingsBetweenAdjacent");function Un(t,e,n){const o=[];for(const r of e){const i=n[r.src],c=n[r.dst];if(i==null||c==null||i===c)continue;let a=r.src,l=r.dst,g=i,x=c;i>c&&(a=r.dst,l=r.src,g=c,x=i);for(let I=g;I<x;I++)o.push({id:`${r.id}@${I}`,src:a,dst:l,ref:r.ref})}let s=0;for(let r=0;r+1<t.length;r++)s+=Vs(t[r],t[r+1],o);return s}d(Un,"totalCrossings");function js(t,e){const n={...e},{preds:o}=ln(t),s=fe(t),r=rn(t,n,s);let i=Un(r,t.edges,n);const c=sn.MAX_CROSSING_OPTIMIZATION_PASSES;for(let a=0;a<c;a++){let l=!1;const g=[...t.nodes].sort((x,I)=>(n[I]??0)-(n[x]??0));for(const x of g){const I=n[x]??0;if(I===0)continue;let u=0;for(const v of o.get(x)??[])u=Math.max(u,(n[v]??0)+1);if(u>=I)continue;const p=I;n[x]=u;const f=rn(t,n,s),y=Un(f,t.edges,n);y<i?(i=y,l=!0):n[x]=p}if(!l)break}return n}d(js,"optimizeRanksByCrossings");function Us(t,e){const n=fe(t),o=[...t.nodes].sort((s,r)=>(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const i=t.edges.filter(f=>f.src===s);if(i.length===0)continue;let c=!1,a=0;for(const f of i){const y=n(f.dst);y==null||y===r?c=!0:a++}if(a===0||c)continue;let l=0,g=!1;for(const f of t.edges){if(f.dst!==s)continue;const y=n(f.src);y&&(y===r?g=!0:l++)}if(l>0||!g)continue;const x=e[s]??0,I=x+a;let u=0;for(const f of t.edges)f.dst===s&&(u=Math.max(u,(e[f.src]??0)+1));const p=Math.max(x,u,I);p!==x&&(e[s]=p)}}d(Us,"adjustCrossLaneSources");function Ws(t,e){const n=ye(t),o=Be(n)??[...n.nodes].sort(),s=e?.compactSingleInput??!1,r=fe(n);let i=Object.create(null);for(const a of o){const l=mo(n,a),g=e?.ignoreCrossLaneEdges?l.filter(x=>{const I=r(x.src),u=r(a);return!I||!u?!0:I===u}):l;if(g.length===0)i[a]=0;else if(s&&g.length===1){const x=g[0].src,I=r(x),u=r(a);I!==u?i[a]=i[x]??0:i[a]=(i[x]??0)+1}else{let x=-1/0;for(const I of g)x=Math.max(x,(i[I.src]??0)+1);i[a]=x===-1/0?0:x}}return(e?.optimizeRanksByCrossings??!1)&&(i=js(n,i)),e?.ignoreCrossLaneEdges&&Us(n,i),{layers:rn(n,i,r),rankOf:i,dummy:new Set}}d(Ws,"assignLayers_LongestPath");function Ks(t,e){const n=ye(t),s={...Ws(n,{compactSingleInput:e?.compactSingleInput,ignoreCrossLaneEdges:e?.ignoreCrossLaneEdges,optimizeRanksByCrossings:e?.optimizeRanksByCrossings}).rankOf},r=fe(n),{preds:i,succs:c}=ln(n,p=>{if(e?.ignoreCrossLaneEdges){const f=r(p.src),y=r(p.dst);if(f&&y&&f!==y)return!1}return!0}),a=Be(n)??[...n.nodes],l=[...a].reverse(),g=d((p,f)=>{let y=0;for(const E of i.get(p)??[])y=Math.max(y,(s[E]??0)+1);let v=Number.POSITIVE_INFINITY;const M=c.get(p)??[];return M.length>0&&(v=Math.min(...M.map(E=>(s[E]??0)-1))),Number.isFinite(v)||(v=Math.max(y,f)),Math.min(Math.max(f,y),v)},"clampFeasible"),x=sn.GRAVITY_ITERATIONS,I=d(p=>{let f=!1;for(const y of p){const v=i.get(y)??[],M=c.get(y)??[];if(v.length===0&&M.length===0)continue;const E=v.length>0?v.reduce((A,R)=>A+(s[R]??0)+1,0)/v.length:s[y]??0,T=M.length>0?M.reduce((A,R)=>A+(s[R]??0)-1,0)/M.length:s[y]??0,m=Math.round((E+T)/2),S=g(y,m);S!==s[y]&&(s[y]=S,f=!0)}return f},"relaxOrder");for(let p=0;p<x;p++){const f=I(a),y=I(l);if(!f&&!y)break}for(const p of a){let f=0;for(const y of i.get(p)??[])f=Math.max(f,(s[y]??0)+1);(s[p]??0)<f&&(s[p]=f)}for(const p of l){const f=c.get(p)??[];if(f.length>0){const y=Math.min(...f.map(v=>(s[v]??0)-1));(s[p]??0)>y&&(s[p]=y)}}return{layers:Mo(n,a,s),rankOf:s,dummy:new Set}}d(Ks,"assignLayers_Gravity");function qs(t){const e=xo(t),n=yo(t);let o=bo(e);const s=[];for(;o.length>0;){const r=[];for(const i of o){s.push(i);for(const c of n.get(i)??[])e.set(c,(e.get(c)??0)-1),(e.get(c)??0)===0&&r.push(c)}o=r.sort((i,c)=>i.localeCompare(c))}return s.length===t.nodes.length?s:null}d(qs,"topoSortByGenerationIfAcyclic");function Js(t,e){const n=ye(t),o=e?.direction==="LR"?qs(n)??[...n.nodes].sort():Be(n)??[...n.nodes].sort(),s=fe(n),r=d(g=>s(g)??g,"laneOf"),i=Object.create(null),c=new Map,a=d((g,x)=>e?.ignoreCrossLaneEdges??!0?r(g)===r(x)?1:0:1,"edgeWeight");for(const g of o){if(n.nodeById.get(g)?.isGroup)continue;const I=mo(n,g);let u=0;if(I.length>0)for(const v of I){const M=v.src,E=i[M]??0;u=Math.max(u,E+a(M,g))}const p=r(g),f=c.get(p)??0,y=Math.max(u,f);i[g]=y,c.set(p,y+1)}return{layers:Mo(n,o,i,{skipGroups:!0}),rankOf:i,dummy:new Set}}d(Js,"assignLayers_LaneAwareCompact");function Zs(t,e){const n=ye(e),{rankOf:o}=t,s=t.layers.map(u=>[...u]),r=new Set(t.dummy?[...t.dummy]:[]);let i=0;const c=new Map(n.nodeById),a=d(u=>{const p=`placeholder-${i++}`,f={id:p,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(p,f),r.add(p);s.length<=u;)s.push([]);return s[u].push(p),o[p]=u,p},"addDummyAt"),l=[...n.edges].sort((u,p)=>u.id===p.id?u.src===p.src?u.dst.localeCompare(p.dst):u.src.localeCompare(p.src):u.id.localeCompare(p.id)),g=[];for(const u of l){const p=o[u.src]??0,f=o[u.dst]??0;if(f-p<=1){g.push(u);continue}let y=u.src;for(let M=p+1,E=0;M<f;M++,E++){const T=a(M);g.push({id:`${u.id}#${E}`,src:y,dst:T,weight:u.weight,ref:u.ref}),y=T}const v=f-p-2;g.push({id:`${u.id}#${Math.max(v+1,0)}`,src:y,dst:u.dst,weight:u.weight,ref:u.ref})}const I={nodes:[...n.nodes,...[...r].filter(u=>!n.nodes.includes(u))],edges:g,layout:n.layout,nodeById:c};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:I}}d(Zs,"makeProperLayering");function Wn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(Wn,"median");function Kn(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Kn,"barycenter");function Qs(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(Qs,"neighborPositionsFor");function tr(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(tr,"currentOrderTieBreak");function qn(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(t),i=Ne(e),c=[];for(const l of n)o.has(l.src)&&s.has(l.dst)&&c.push({u:r.get(l.src),v:i.get(l.dst)});c.sort((l,g)=>l.u===g.u?l.v-g.v:l.u-g.u);const a=c.map(l=>l.v);return Io(a)}d(qn,"countCrossingsBetweenAdjacent");function We(t,e,n){return[...t].sort((o,s)=>{const r=Wn(e.get(o)??[]),i=Wn(e.get(s)??[]);return r===i?tr(o,s,n):isFinite(r)?isFinite(i)?r-i:-1:1})}d(We,"sortByHeuristic");function Jn(t,e,n,o,s,r){const i=Ne(t),c=Ne(e),a=Qs(e,i,n,o);if(!s||!r||r.length===0)return We(e,a,c);const l=new Map;for(const I of e){const u=s(I),p=l.get(u)??[];p.push(I),l.set(u,p)}const g=[];for(const I of r){const u=l.get(I);if(!u||u.length===0)continue;const p=We(u,a,c);g.push(...p)}const x=l.get(null);if(x&&x.length>0){const I=We(x,a,c);for(const u of I){const p=Kn(a.get(u)??[]);let f=g.length;if(isFinite(p))for(const[y,v]of g.entries()){const M=Kn(a.get(v)??[]);if(p<M){f=y;break}}g.splice(f,0,u)}}return g}d(Jn,"reorderLayer");function Zn(t,e,n,o,s){const r=[...e],i=new Set(t),c=new Set(e),a=o?new Set(o):null,l=n.filter(f=>i.has(f.src)&&c.has(f.dst)),g=a?n.filter(f=>c.has(f.src)&&a.has(f.dst)):void 0,x=d(f=>{let y=qn(t,f,l);return g&&o&&(y+=qn(f,o,g)),y},"crossingScore"),I=s?new Map:null;if(s&&I)for(const f of e)I.set(f,s(f));let u=!0,p=x(r);for(;u;){u=!1;for(let f=0;f+1<r.length;f++){if(I){const M=I.get(r[f]),E=I.get(r[f+1]);if(M!==E)continue}const y=p;[r[f],r[f+1]]=[r[f+1],r[f]];const v=x(r);v<y?(p=v,u=!0):[r[f],r[f+1]]=[r[f+1],r[f]]}}return r}d(Zn,"transposeImprove");function er(t,e,n){const o=t.layers.map(c=>[...c]),s=e.edges,r=fe(e),i=So(e,n?.laneOrder);for(let c=0;c<3;c++){for(let a=1;a<o.length;a++)o[a]=Jn(o[a-1],o[a],s,"down",r,i),o[a]=Zn(o[a-1],o[a],s,o[a+1],r);for(let a=o.length-2;a>=0;a--)o[a]=Jn(o[a+1],o[a],s,"up",r,i),o[a]=Zn(o[a+1],o[a],s,o[a-1],r)}return{layers:o}}d(er,"orderLayers");function nr(t,e,n){const o=n?.layerGap??ko.DEFAULT_LAYER_GAP,s=n?.nodeGap??ko.DEFAULT_NODE_GAP,r=n?.laneGap??s*2,i=n?.direction??"TB",c=i==="LR"||i==="RL",a=t.layers,l=Object.create(null),g=Object.create(null),x=d(O=>e.nodeById.get(O),"getNode"),I=d(O=>x(O)?.width??0,"getWidth"),u=d(O=>x(O)?.height??0,"getHeight"),p=fe(e),f=So(e,n?.laneOrder),y=a.map(O=>O.reduce((_,H)=>Math.max(_,u(H)),0)),v=[];if(c)for(let O=0;O+1<a.length;O++){const _=a[O].reduce((mt,kt)=>Math.max(mt,I(kt)),0),H=a[O+1].reduce((mt,kt)=>Math.max(mt,I(kt)),0),P=y[O],G=y[O+1],j=P/2+G/2,J=(_+H)/2,dt=Math.max(0,J-j-o);v.push(dt)}const M=new Set;for(const O of a)for(const _ of O)M.add(p(_));const E=M.has(null),T=f.filter(O=>M.has(O)),m=[...E?[null]:[],...T],S=Object.create(null);for(const O of T)S[O]=0;E&&(S.null=0);for(const O of a){const _=Object.create(null),H=[];for(const P of O){const G=p(P);G===null?H.push(P):(_[G]||=[]).push(P)}for(const[P,G]of Object.entries(_)){const j=G.reduce((J,dt)=>J+I(dt),0)+s*Math.max(0,G.length-1);S[P]=Math.max(S[P]??0,j)}if(E&&H.length){const P=H.reduce((G,j)=>G+I(j),0)+s*Math.max(0,H.length-1);S.null=Math.max(S.null??0,P)}}const A=new Map;{const O=m.map(P=>(P===null?S.null:S[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,m.length-1))/2;for(let P=0;P<m.length;P++){const G=m[P],j=O[P]??0,J=H+j/2;A.set(G,J),H+=j,P<m.length-1&&(H+=r)}}let R=0;for(const[O,_]of a.entries()){const H=y[O]??0,P=new Map;for(const j of _){const J=p(j),dt=P.get(J)??[];dt.push(j),P.set(J,dt)}for(const j of m){const J=P.get(j)??[];if(J.length===0)continue;const dt=A.get(j);if(J.length===1){const mt=J[0];l[mt]=dt,g[mt]=R+H/2}else{const mt=J.map(Q=>I(Q)),kt=mt.reduce((Q,W)=>Q+W,0)+s*(J.length-1);let Pt=dt-kt/2;for(const[Q,W]of J.entries()){const et=mt[Q];l[W]=Pt+et/2,g[W]=R+H/2,Pt+=et+s}}}const G=v[O]??0;R+=H+o+G}const k=new Map;for(const O of e.edges){const _=O.ref.id;k.has(_)||k.set(_,[]),k.get(_).push(O)}for(const[,O]of k){if(O.length===0)continue;const _=O[0].ref,H=_.start,P=_.end;if(H==null||P==null)continue;const G=Math.round(((l[H]??0)+(l[P]??0))/2),j=new Set;for(const J of O)j.add(J.src),j.add(J.dst);for(const J of j){if(J===H||J===P)continue;e.nodeById.get(J)?.isDummy&&(l[J]=G)}}return{x:l,y:g}}d(nr,"assignCoordinates");var or=8;function sr(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e>>>0}d(sr,"hashString");function rr(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(rr,"mulberry32");function ir(t,e){const n=[...t],o=rr(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(ir,"deterministicShuffle");function cr(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(cr,"sourceDistance");function Qn(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:i}of e){const c=n.get(s),a=n.get(r);c==null||a==null||(o+=i*Math.abs(c-a))}return o}d(Qn,"laneArrangementCost");function ar(t){const e=fn(t);if(e.length<2)return[];const n=new Map(e.map((r,i)=>[r,i])),o=fe(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const i=typeof r.start=="string"?r.start:void 0,c=typeof r.end=="string"?r.end:void 0;if(!i||!c||!t.nodeById.has(i)||!t.nodeById.has(c))continue;const a=o(i),l=o(c);if(!a||!l||a===l)continue;const g=n.get(a),x=n.get(l);if(g==null||x==null)continue;const[I,u]=g<=x?[a,l]:[l,a],p=`${I}\0${u}`,f=s.get(p);f?f.weight++:s.set(p,{a:I,b:u,weight:1})}return[...s.values()]}d(ar,"buildWeightedLaneEdges");function to(t,e,n){const o=[...t];let s=Qn(o,e),r=!0,i=0;const c=Math.max(1,o.length);for(;r&&i<c;){r=!1,i++;for(let a=0;a+1<o.length;a++){[o[a],o[a+1]]=[o[a+1],o[a]];const l=Qn(o,e);l<s?(s=l,r=!0):[o[a],o[a+1]]=[o[a+1],o[a]]}}return{order:o,cost:s,sourceDistance:cr(o,n)}}d(to,"greedySwitch");function lr(t,e){return t.cost!==e.cost?t.cost<e.cost:t.sourceDistance<e.sourceDistance}d(lr,"isBetterCandidate");function fr(t,e,n){const o=[...e].sort((s,r)=>s.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:i})=>`${s}:${r}:${i}`).join("|");return sr(`${t.join("|")}#${o}#${n}`)}d(fr,"seedForRestart");function dr(t,e={}){const n=fn(t);if(n.length<2)return n;const o=ar(t);if(o.length===0)return n;const s=new Map(n.map((c,a)=>[c,a]));let r=to(n,o,s);const i=Math.max(0,e.restarts??or);for(let c=0;c<i;c++){const a=fr(n,o,c),l=ir(n,a),g=to(l,o,s);lr(g,r)&&(r=g)}return r.order}d(dr,"optimizeTopLaneOrder");function ur(t,e){const n=e?.ignoreCrossLaneEdges??!0,o=e?.optimizeRanksByCrossings??!0,s=ye(t),r=e?.automaticLaneOrdering?dr(s,{restarts:or}):void 0,i=Os(s),c=i.acyclic,a=n?Js(c,{compactSingleInput:e?.compactSingleInput??sn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:e?.direction}):Ks(c,{compactSingleInput:e?.compactSingleInput??sn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:o}),{layering:l,graphWithDummies:g}=Zs(a,c),x=er(l,g,{laneOrder:r}),I=nr(x,g,{layerGap:e?.layerGap,nodeGap:e?.nodeGap,direction:e?.direction,laneOrder:r});return{acyclic:c,reversed:i.reversed,layering:l,ordered:x,coordinates:I}}d(ur,"sugiyamaLayout");var ct=Jr.EPSILON,Zr=8,be=15,Te=15,je=25,ne=20,Cn=10;function eo(t,e,n){const o=t.x??0,s=t.y??0,r=e.x-o,i=e.y-s,c=Math.abs(r),a=Math.abs(i);return c<ct&&a<ct?n:a>ct&&a*3>=c?i>0?"bottom":"top":c>ct?r>0?"right":"left":n}d(eo,"chooseOrthogonalSide");function no(t,e){return Math.abs(t.to-e.from)<ct||Math.abs(t.to-e.to)<ct?t.to:t.from}d(no,"sharedLineEndpointCoord");function Me(t,e){return t.orient==="vertical"?{x:t.coord,y:e}:{x:e,y:t.coord}}d(Me,"pointOnLine");function hr(t,e){const n=t.nodes??[],o=t.edges??[],s=[];for(const h of o)h.isLayoutOnly||s.push({...h,__originalEdge:h});const r=new Map,i=new Map,c=[],a=e==="LR";for(const h of n)r.set(h.id,h);const l=n.filter(h=>h.isGroup&&!h.parentId);for(const h of l){const b={id:h.id},C=d(L=>{i.set(L.id,b),n.filter(w=>w.parentId===L.id).forEach(C)},"assignLane");C(h)}const g=n.filter(h=>!h.isGroup&&!h.isEdgeLabel).map(h=>{const b=h.width??10,C=h.height??10,L=h.x??0,w=h.y??0,B=Zr;return{nodeId:h.id,minX:L-b/2-B,maxX:L+b/2+B,minY:w-C/2-B,maxY:w+C/2+B,visualXHalfExtent:a?C/2+B:b/2+B}}),x=d((h,b,C,L)=>{let w=c.find(B=>B.orientation===h&&Math.abs(B.coord-b)<1);return w||(w={id:`pipe-${h}-${b.toFixed(0)}`,orientation:h,coord:b,spanMin:C,spanMax:L,tracks:[]},c.push(w)),w.spanMin=Math.min(w.spanMin,C),w.spanMax=Math.max(w.spanMax,L),w},"getOrAddPipe"),I=d((h,b)=>{const C=h.width??10,L=h.height??10,w=h.x??0,B=h.y??0;switch(b){case"top":return{x:w,y:B-L/2};case"bottom":return{x:w,y:B+L/2};case"left":return{x:w-C/2,y:B};case"right":return{x:w+C/2,y:B}}},"portForSide"),u=d((h,b,C)=>I(h,eo(h,b,C?"bottom":"top")),"getOrthogonalPort"),p=[],f=[],y=new Set,v=1e3,M=d((h,b,C)=>{if(p.length===0)return 0;const L=Math.abs(b.y-C.y)<ct,w=Math.abs(b.x-C.x)<ct;if(!L&&!w)return 0;let B=0;if(L){const U=b.y,q=Math.min(b.x,C.x)-ct,z=Math.max(b.x,C.x)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===h||Y.orientation!=="vertical"||Y.pipe.coord<q||Y.pipe.coord>z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}else if(w){const U=b.x,q=Math.min(b.y,C.y)-ct,z=Math.max(b.y,C.y)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===h||Y.orientation!=="horizontal"||Y.pipe.coord<q||Y.pipe.coord>z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}return B},"crossingPenalty"),E=s.map((h,b)=>{if(!h.start||!h.end)return{idx:b,crossLane:0,dx:0,dy:0};const C=r.get(h.start),L=r.get(h.end),w=i.get(h.start),B=i.get(h.end),U=w&&B&&w.id!==B.id?1:0,q=C&&L?Math.abs((L.x??0)-(C.x??0)):0,z=C&&L?Math.abs((L.y??0)-(C.y??0)):0;return{idx:b,crossLane:U,dx:q,dy:z}}).sort((h,b)=>{if(h.crossLane!==b.crossLane)return b.crossLane-h.crossLane;const C=h.dx+h.dy,L=b.dx+b.dy;return Math.abs(C-L)>1?C-L:h.idx-b.idx}).map(h=>h.idx),T=d((h,b,C,L)=>{const w=Math.min(h.x,b.x),B=Math.max(h.x,b.x),U=Math.min(h.y,b.y),q=Math.max(h.y,b.y);return!!g.find(Y=>C&&Y.nodeId===C||L&&Y.nodeId===L?!1:Math.abs(h.x-b.x)>ct?Y.minY<h.y&&Y.maxY>h.y&&Y.maxX>w&&Y.minX<B:Y.minX<h.x&&Y.maxX>h.x&&Y.maxY>U&&Y.minY<q)},"isSegmentBlocked"),m=new Map,S=new Map;for(const h of s)!h.start||!h.end||h.start===h.end||(S.set(h.start,(S.get(h.start)??0)+1),S.set(h.end,(S.get(h.end)??0)+1));const A=d((h,b)=>eo(h,b,"bottom"),"determineSide"),R=new Map;for(const[h,b]of s.entries()){if(!b.start||!b.end||b.start===b.end||b.points&&b.points.length>0)continue;const C=r.get(b.start),L=r.get(b.end);if(!C||!L)continue;const w=(L.x??0)-(C.x??0),B=(L.y??0)-(C.y??0);R.set(h,{edgeIdx:h,srcId:b.start,dstId:b.end,srcSide:A(C,{x:L.x??0,y:L.y??0}),dstSide:A(L,{x:C.x??0,y:C.y??0}),absDx:Math.abs(w),absDy:Math.abs(B),dxSign:Math.sign(w),dySign:Math.sign(B)})}const k=d(h=>h.srcSide==="top"||h.srcSide==="bottom"?h.absDx===0?1/0:h.absDy/h.absDx:h.absDy===0?1/0:h.absDx/h.absDy,"preferenceStrength"),O=d(h=>h.srcSide==="top"||h.srcSide==="bottom"?h.dxSign>=0?"right":"left":h.dySign>=0?"bottom":"top","secondarySide"),_=new Map;for(const h of R.values()){const b=`${h.srcId}:${h.srcSide}`;_.has(b)||_.set(b,[]),_.get(b).push(h)}const H=new Map,P=d((h,b)=>`${h}:${b}`,"loadKey");for(const h of R.values())H.set(P(h.srcId,h.srcSide),(H.get(P(h.srcId,h.srcSide))??0)+1),H.set(P(h.dstId,h.dstSide),(H.get(P(h.dstId,h.dstSide))??0)+1);for(const h of _.values())if(!(h.length<2)){h.sort((b,C)=>{const L=k(b),w=k(C);return Math.abs(L-w)>1e-9?w-L:b.edgeIdx-C.edgeIdx});for(let b=1;b<h.length;b++){const C=h[b],L=O(C),w=H.get(P(C.srcId,C.srcSide))??0,B=H.get(P(C.srcId,L))??0;B>=w||(H.set(P(C.srcId,C.srcSide),w-1),H.set(P(C.srcId,L),B+1),C.srcSide=L)}}const G=d(h=>{const b=h?.shape;return b==="question"||b==="diamond"},"isDiamondNode"),j=new Map;for(const h of R.values())j.has(h.dstId)||j.set(h.dstId,new Set),j.get(h.dstId).add(h.dstSide);for(const h of R.values()){if(!G(r.get(h.srcId)))continue;const b=j.get(h.srcId);if(!b?.has(h.srcSide))continue;const C=O(h);if(b.has(C)||(H.get(P(h.srcId,C))??0)>0)continue;const L=H.get(P(h.srcId,h.srcSide))??0;H.set(P(h.srcId,h.srcSide),Math.max(0,L-1)),H.set(P(h.srcId,C),1),h.srcSide=C}for(const h of R.values()){const{edgeIdx:b,srcId:C,dstId:L,srcSide:w,dstSide:B}=h,U=r.get(C),q=r.get(L),z=`${C}:${w}:src`,Y=w==="top"||w==="bottom"?q.x??0:q.y??0;m.has(z)||m.set(z,[]),m.get(z).push({edgeIdx:b,oppositeCoord:Y});const ot=`${L}:${B}:dst`,rt=B==="top"||B==="bottom"?U.x??0:U.y??0;m.has(ot)||m.set(ot,[]),m.get(ot).push({edgeIdx:b,oppositeCoord:rt})}const J=new Map,dt=8;for(const[h,b]of m){if(b.length<2)continue;b.sort((Lt,Dt)=>Lt.oppositeCoord-Dt.oppositeCoord);const C=h.split(":"),L=C.slice(0,-2).join(":"),w=C[C.length-2],B=C[C.length-1],U=r.get(L);if(!U)continue;const z=w==="left"||w==="right"?U.height??10:U.width??10,Y=U.shape,rt=Y==="question"||Y==="diamond"?z*.3:z,tt=Math.min(20,Math.max(dt,rt/(b.length+1))),Rt=-(tt*(b.length-1))/2;for(const[Lt,Dt]of b.entries()){const Jt=Rt+Lt*tt,gn=`${Dt.edgeIdx}:${B}`;J.set(gn,Jt)}}const mt=d(h=>!!s[h]?.labelNodeId,"edgeHasLabelNode"),kt=d((h,b)=>h?(m.get(`${h}:${b}:src`)??[]).some(({edgeIdx:C})=>mt(C))||(m.get(`${h}:${b}:dst`)??[]).some(({edgeIdx:C})=>mt(C)):!1,"faceHasLabelNode"),Pt=d((h,b,C)=>b==="top"||b==="bottom"?{x:h.x+C,y:h.y}:{x:h.x,y:h.y+C},"applyPortOffset"),Q=d((h,b,C)=>{const L=R.get(h),w={x:C.x??0,y:C.y??0},B={x:b.x??0,y:b.y??0},U=L?.srcSide??A(b,w),q=L?.dstSide??A(C,B);let z=L?I(b,L.srcSide):u(b,w,!0),Y=L?I(C,L.dstSide):u(C,B,!1);const ot=J.get(`${h}:src`),rt=J.get(`${h}:dst`);return ot!==void 0&&(z=Pt(z,U,ot)),rt!==void 0&&(Y=Pt(Y,q,rt)),{pSrcPort:z,pDstPort:Y,srcSide:U,dstSide:q}},"portsForEdge");for(const h of E){const b=s[h];if(f[h]=[],!b.start||!b.end||b.points&&b.points.length>0||b.start===b.end)continue;const C=r.get(b.start),L=r.get(b.end);if(!C||!L)continue;const{pSrcPort:w,pDstPort:B,srcSide:U,dstSide:q}=Q(h,C,L),z={...w},Y={...B},ot=U==="top"||U==="bottom",rt=q==="top"||q==="bottom";if(ot){const X=w.y>(C.y??0);z.y=X?w.y+ne:w.y-ne}else{const X=w.x>(C.x??0);z.x=X?w.x+ne:w.x-ne}if(rt){const X=B.y>(L.y??0);Y.y=X?B.y+ne:B.y-ne}else{const X=B.x>(L.x??0);Y.x=X?B.x+ne:B.x-ne}const st=d((X,$)=>{for(const K of g)if(!$.includes(K.nodeId)&&X.x>K.minX&&X.x<K.maxX&&X.y>K.minY&&X.y<K.maxY)return{inside:!0,obstacle:K};return{inside:!1}},"isPointInObstacle"),tt=d((X,$,K,lt,Ct)=>{if(Ct){const Nt=X.y>($.y??0);return{x:(K.x??0)>=X.x?lt.maxX+be:lt.minX-be,y:Nt?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:Nt}}const bt=X.x>($.x??0),Et=(K.y??0)>=X.y;return{x:bt?lt.maxX+be:lt.minX-be,y:Et?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:bt}},"obstacleDetour");let yt=[];const Rt=[b.start,b.end],Lt=st(z,Rt);if(Lt.inside&&Lt.obstacle){const X=Lt.obstacle;if(ot){const $=tt(w,C,L,X,!0);z.x=$.x,z.y=$.y;const K=$.leavesPositiveSide?Math.min(X.minY-2,w.y+ne):Math.max(X.maxY+2,w.y-ne);yt=[{x:w.x,y:K},{x:$.x,y:K},{x:$.x,y:$.y}]}else{const $=tt(w,C,L,X,!1),K=$.leavesPositiveSide?Math.min(X.minX-2,w.x+ne):Math.max(X.maxX+2,w.x-ne);z.x=$.x,z.y=$.y,yt=[{x:K,y:w.y},{x:K,y:$.y},{x:$.x,y:$.y}]}}let Dt=[];const Jt=st(Y,Rt);if(Jt.inside&&Jt.obstacle){const X=Jt.obstacle;if(rt){const $=tt(B,L,C,X,!0);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:B.x,y:$.y}]}else{const $=tt(B,L,C,X,!1);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:$.x,y:B.y}]}}if(yt.length===0&&Dt.length===0){const X=be,$=Math.abs(z.x-Y.x)<X,K=Math.abs(z.y-Y.y)<X,lt=J.get(`${h}:src`)!==void 0||J.get(`${h}:dst`)!==void 0,Ct=(m.get(`${b.start??""}:${U}:src`)?.length??0)+(m.get(`${b.start??""}:${U}:dst`)?.length??0),bt=(m.get(`${b.end??""}:${q}:src`)?.length??0)+(m.get(`${b.end??""}:${q}:dst`)?.length??0),Et=Ct>1||bt>1,Nt=S.get(b.start??"")??0,ut=S.get(b.end??"")??0,Yt=Ct>1&&kt(b.start,U)||bt>1&&kt(b.end,q),ee=Ct<=1||Nt<=2,Bt=bt<=1||ut<=2;if(($||K)&&!lt&&(!Et||Et&&!Yt&&ee&&Bt)&&!T(w,B,b.start,b.end)){b.points=[{...w},{...z},{...Y},{...B}],y.add(h);const Mt=K?"horizontal":"vertical",$t=K?w.y:w.x,It=K?Math.min(w.x,B.x):Math.min(w.y,B.y),St=K?Math.max(w.x,B.x):Math.max(w.y,B.y),Wt={id:`fast-path-${Mt}-${$t.toFixed(0)}-${h}`,orientation:Mt,coord:$t,spanMin:It,spanMax:St,tracks:[]};p.push({edgeIndex:h,segmentIndex:0,orientation:Mt,pipe:Wt,trackIndex:0,from:It,to:St});continue}}const gn=x("vertical",z.x,z.y,z.y);z.x=gn.coord;const mr=x("vertical",Y.x,Y.y,Y.y);Y.x=mr.coord;let ue=Math.min(z.x,Y.x)-50,he=Math.max(z.x,Y.x)+50,ve=Math.min(z.y,Y.y)-50,Le=Math.max(z.y,Y.y)+50;for(const X of g){const $=Math.min(z.x,Y.x),K=Math.max(z.x,Y.x),lt=Math.min(z.y,Y.y),Ct=Math.max(z.y,Y.y);X.minX<K&&X.maxX>$&&X.minY<Ct&&X.maxY>lt&&(ue=Math.min(ue,X.minX-je),he=Math.max(he,X.maxX+je),ve=Math.min(ve,X.minY-je),Le=Math.max(Le,X.maxY+je))}for(const X of g){if(X.maxX<ue||X.minX>he||X.maxY<ve||X.minY>Le)continue;const $=be;x("horizontal",X.minY-$,ue,he),x("horizontal",X.maxY+$,ue,he);const K=Te;x("vertical",X.minX-K,ve,Le),x("vertical",X.maxX+K,ve,Le)}x("horizontal",z.y,ue,he),x("horizontal",Y.y,ue,he);const yr=c.filter(X=>X.orientation==="horizontal"&&X.coord>=ve&&X.coord<=Le),xr=c.filter(X=>X.orientation==="vertical"&&X.coord>=ue&&X.coord<=he),ke=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),_e=ke(z.x,z.y),vo=ke(Y.x,Y.y),Fe=new Map,pn=new Map,mn=new Map,De=new Set,xe=[];Fe.set(_e,0),mn.set(_e,"n"),xe.push({key:_e,f:Math.hypot(Y.x-z.x,Y.y-z.y),pt:z}),De.add(_e);let Ht=[];const ge=d((X,$)=>T(X,$,b.start,b.end),"checkSegmentBlocked"),yn={x:Y.x,y:z.y},br=ge(z,yn),Mr=ge(yn,Y),Ir=br||Mr,xn={x:z.x,y:Y.y},Sr=ge(z,xn),Cr=ge(xn,Y);if(Ir?Sr||Cr||(Math.abs(z.x-Y.x)<ct?Ht=[z,Y]:Ht=[z,xn,Y]):Math.abs(z.y-Y.y)<ct||Math.abs(z.x-Y.x)<ct?Ht=[z,Y]:Ht=[z,yn,Y],Ht.length===0)for(;xe.length>0;){xe.sort((ut,Yt)=>ut.f-Yt.f);const X=xe.shift();if(De.delete(X.key),X.key===vo){let ut=vo,Yt=Y;for(Ht=[Yt];pn.has(ut);){const ee=pn.get(ut);Ht.unshift(ee),Yt=ee,ut=ke(ee.x,ee.y)}break}const $=X.pt.x,K=X.pt.y,lt=xr.sort((ut,Yt)=>ut.coord-Yt.coord),Ct=lt.findIndex(ut=>Math.abs(ut.coord-$)<1),bt=yr.sort((ut,Yt)=>ut.coord-Yt.coord),Et=bt.findIndex(ut=>Math.abs(ut.coord-K)<1),Nt=[];Ct>0&&Nt.push({x:lt[Ct-1].coord,y:K}),Ct>=0&&Ct<lt.length-1&&Nt.push({x:lt[Ct+1].coord,y:K}),Et>0&&Nt.push({x:$,y:bt[Et-1].coord}),Et>=0&&Et<bt.length-1&&Nt.push({x:$,y:bt[Et+1].coord});for(const ut of Nt){const Yt=Math.min($,ut.x),ee=Math.max($,ut.x),Bt=Math.min(K,ut.y),Gt=Math.max(K,ut.y);if(g.some(Zt=>Zt.nodeId===b.start||Zt.nodeId===b.end?!1:Yt!==ee?Zt.minY<K&&Zt.maxY>K&&Zt.maxX>Yt&&Zt.minX<ee:Zt.minX<$&&Zt.maxX>$&&Zt.maxY>Bt&&Zt.minY<Gt))continue;const Mt=ke(ut.x,ut.y),$t=Math.abs(ut.x-$)+Math.abs(ut.y-K),It=M(h,X.pt,ut);let St=0;const Wt=Y.x-z.x,Ee=Y.y-z.y,He=ut.x-$,bn=ut.y-K;(Ee>10&&bn<-5||Ee<-10&&bn>5)&&(St=Math.abs(bn)*100),(Wt>10&&He<-5||Wt<-10&&He>5)&&(St+=Math.abs(He)*50);let Lo=0;const Eo=mn.get(X.key)??"n",To=Math.abs(He)>ct?"h":"v";Eo!=="n"&&Eo!==To&&(Lo=50);const vr=$t+It+St+Lo,Xe=(Fe.get(X.key)??1/0)+vr,wo=Math.abs(Y.x-ut.x)+Math.abs(Y.y-ut.y);if(Xe<(Fe.get(Mt)??1/0))if(pn.set(Mt,X.pt),Fe.set(Mt,Xe),mn.set(Mt,To),!De.has(Mt))xe.push({key:Mt,f:Xe+wo,pt:ut}),De.add(Mt);else{const Zt=xe.findIndex(Lr=>Lr.key===Mt);Zt!==-1&&(xe[Zt].f=Xe+wo)}}}if(Ht.length===0&&(Ht=[z,{x:z.x,y:Y.y},Y]),Ht.length>4){const X=Ht[0],$=Ht[Ht.length-1];let K=Math.min(X.x,$.x),lt=Math.max(X.x,$.x),Ct=Math.min(X.y,$.y),bt=Math.max(X.y,$.y);for(const Bt of Ht)K=Math.min(K,Bt.x),lt=Math.max(lt,Bt.x),Ct=Math.min(Ct,Bt.y),bt=Math.max(bt,Bt.y);const Et=lt>Math.max(X.x,$.x),Nt=K<Math.min(X.x,$.x);if(a){const Bt=Te;if(Et){const Gt=Math.max(X.x,$.x),Ot=Math.min(X.y,$.y),Mt=Math.max(X.y,$.y),$t=g.filter(It=>It.minX<Gt&&It.maxX>Gt&&It.minY<Mt&&It.maxY>Ot);if($t.length>0){let It=Math.max(X.x,$.x);for(const St of $t){const Wt=(St.minX+St.maxX)/2;if(St.visualXHalfExtent===void 0||isNaN(St.visualXHalfExtent))continue;const Ee=Wt+St.visualXHalfExtent+Bt;It=Math.max(It,Ee)}isNaN(It)||(lt=It)}}if(Nt){const Gt=g.filter(Ot=>Ot.minX<Math.min(X.x,$.x)+Bt&&Ot.minY<Math.max(X.y,$.y)&&Ot.maxY>Math.min(X.y,$.y));if(Gt.length>0){let Ot=Math.min(X.x,$.x);for(const Mt of Gt){const It=(Mt.minX+Mt.maxX)/2-Mt.visualXHalfExtent-Bt;Ot=Math.min(Ot,It)}K=Ot}}}const ut=d(Bt=>{const Gt=$.y>X.y,Ot=g.filter(It=>{const St=Math.min(X.x,$.x)<It.maxX&&Math.max(X.x,$.x)>It.minX,Wt=Math.min(X.y,$.y)<It.maxY&&Math.max(X.y,$.y)>It.minY;return St&&Wt});let Mt=Ot;if(a&&Ot.length>0){const It=Ot.filter(St=>St.minX<Bt&&St.maxX>Bt);It.length>0&&(Mt=It)}if(Mt.length===0)return $.y;const $t=be;if(Gt){const St=Math.max(...Mt.map(Wt=>Wt.maxY))+$t;if(St<$.y-ct)return St}else{const St=Math.min(...Mt.map(Wt=>Wt.minY))-$t;if(St>$.y+ct)return St}return $.y},"findBestReturnY"),Yt=d(Bt=>{const Gt=ut(Bt),Ot={x:Bt,y:X.y},Mt={x:Bt,y:Gt},$t={x:$.x,y:Gt},It=ge(X,Ot),St=ge(Ot,Mt),Wt=ge(Mt,$t),Ee=Gt!==$.y?ge($t,$):!1;return!It&&!St&&!Wt&&!Ee?Math.abs(Gt-$.y)<ct?[X,Ot,Mt,$]:[X,Ot,Mt,$t,$]:null},"trySimplifyWithDetourX"),ee=Et&&!Nt?Yt(lt):Nt&&!Et?Yt(K):null;ee&&(Ht=ee)}const Xt=[w,...yt,...Ht,...Dt.reverse(),B];if(Xt.length>=3){const X=Xt[Xt.length-1],$=Xt[Xt.length-2],K=Xt[Xt.length-3],lt=Math.abs(K.y-$.y)<ct&&Math.abs($.y-X.y)<ct,Ct=Math.abs(K.x-$.x)<ct&&Math.abs($.x-X.x)<ct;if(lt){const bt=Math.sign($.x-K.x),Et=Math.sign(X.x-K.x);bt!==0&&bt===Et&&Math.abs($.x-K.x)>Math.abs(X.x-K.x)&&Xt.splice(-2,1)}else if(Ct){const bt=Math.sign($.y-K.y),Et=Math.sign(X.y-K.y);bt!==0&&bt===Et&&Math.abs($.y-K.y)>Math.abs(X.y-K.y)&&Xt.splice(-2,1)}}const ie=[Xt[0]];for(let X=1;X<Xt.length-1;X++){if(X===1){ie.push(Xt[X]);continue}const $=ie[ie.length-1],K=Xt[X],lt=Xt[X+1];if(Math.abs($.y-K.y)<ct&&Math.abs(K.y-lt.y)<ct){const Ct=K.x>$.x,bt=lt.x>K.x;if(Ct!==bt){ie.push(K);continue}continue}if(Math.abs($.x-K.x)<ct&&Math.abs(K.x-lt.x)<ct){const Ct=K.y>$.y,bt=lt.y>K.y;if(Ct!==bt){ie.push(K);continue}continue}ie.push(K)}ie.push(Xt[Xt.length-1]);for(let X=0;X<ie.length-1;X++){const $=ie[X],K=ie[X+1],lt=Math.abs($.x-K.x)<ct?"vertical":"horizontal",Ct=lt==="vertical"?$.x:$.y,bt=lt==="vertical"?Math.min($.y,K.y):Math.min($.x,K.x),Et=lt==="vertical"?Math.max($.y,K.y):Math.max($.x,K.x),Nt=x(lt,Ct,bt,Et),ut={edgeIndex:h,segmentIndex:X,orientation:lt,pipe:Nt,trackIndex:0,from:bt,to:Et};p.push(ut),f[h].push(p.length-1),Nt.tracks[0]||(Nt.tracks[0]={index:0,coord:Nt.coord,segments:[]}),Nt.tracks[0].segments.push({edgeIndex:h,segmentIndex:X,from:bt,to:Et})}}const W=d((h,b)=>h.from<b.to&&b.from<h.to,"segmentsOverlap"),et=d((h,b,C,L)=>{const w=!L.segments.some(U=>(U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex)&&W(U,h)),B=!C.segments.some(U=>(U.edgeIndex!==h.edgeIndex||U.segmentIndex!==h.segmentIndex)&&W(U,b));return w&&B?(h.trackIndex=L.index,b.trackIndex=C.index,C.segments=[...C.segments.filter(U=>U.edgeIndex!==h.edgeIndex||U.segmentIndex!==h.segmentIndex),{edgeIndex:b.edgeIndex,segmentIndex:b.segmentIndex,from:b.from,to:b.to}],L.segments=[...L.segments.filter(U=>U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex),{edgeIndex:h.edgeIndex,segmentIndex:h.segmentIndex,from:h.from,to:h.to}],!0):!1},"trySwapSegmentsAcrossTracks"),at=d(h=>{const b=h.tracks.length;return h.tracks[b]={index:b,coord:h.coord,segments:[]},b},"createNewTrack"),gt=d((h,b)=>{const C=h.pipe.tracks[h.trackIndex];C.segments=C.segments.filter(w=>w.edgeIndex!==h.edgeIndex||w.segmentIndex!==h.segmentIndex),h.trackIndex=b,h.pipe.tracks[b].segments.push({edgeIndex:h.edgeIndex,segmentIndex:h.segmentIndex,from:h.from,to:h.to})},"moveSegmentToTrack"),xt=d((h,b)=>{const C=f[h.edgeIndex];for(const L of C){const w=p[L];w.pipe===h.pipe&>(w,b)}},"moveSegmentChainToTrack"),vt=d(h=>{const b=f[h.edgeIndex],C=b.indexOf(p.indexOf(h)),L=[];return C>0&&L.push(p[b[C-1]]),C<b.length-1&&L.push(p[b[C+1]]),L},"getAdjacentSegmentsAlongEdge"),Vt=d((h,b)=>{if(h.orientation===b.orientation)return!1;const C=h.orientation==="horizontal"?h:b,L=h.orientation==="horizontal"?b:h;return L.pipe.coord>C.from&&L.pipe.coord<C.to&&C.pipe.coord>L.from&&C.pipe.coord<L.to},"haveAnyCrossing"),jt=d((h,b)=>{for(const C of h.tracks)if(!C.segments.some(w=>(w.edgeIndex!==b.edgeIndex||w.segmentIndex!==b.segmentIndex)&&W(w,b)))return C.index;return-1},"findAvailableTrack"),Ut=d((h,b)=>{if(h.trackIndex===b.trackIndex)return W(h,b);const C=vt(h),L=vt(b);return C.some(w=>L.some(B=>Vt(w,B)))},"segmentsConflict"),te=d((h,b,C)=>{if(et(h,b,h.pipe.tracks[h.trackIndex],b.pipe.tracks[b.trackIndex]))return;const L=jt(h.pipe,b);C(b,L!==-1?L:at(h.pipe))},"resolveTrackConflict"),Se=d(h=>{let b=0;for(let C=0;C<h.length;C++)for(let L=C+1;L<h.length;L++){const w=h[C],B=h[L];w.pipe===B.pipe&&Ut(w,B)&&(b++,te(w,B,xt))}return b},"resolveHandleConflicts"),de=new Map,Ce=d(h=>{if(de.has(h))return de.get(h);const b=f[h];if(b.length===0){const q={dest:0,deviation:0,base:0,delta:0};return de.set(h,q),q}const L=p[b[0]].pipe.coord;let w=L;for(let q=1;q<b.length;q++){const z=p[b[q]];if(z.orientation==="horizontal"){const Y=z.from,ot=z.to;w=Math.abs(Y-L)>Math.abs(ot-L)?Y:ot;break}}const B=Math.abs(w-L),U={dest:w,deviation:B,base:L,delta:w-L};return de.set(h,U),U},"getDestInfo"),dn=d(()=>{let h=0;const b=new Map;for(const[L,w]of s.entries())f[L].length!==0&&w.start&&(b.has(w.start)||b.set(w.start,[]),b.get(w.start).push(L));const C=d(L=>{const w=s[L];if(!w.start||!w.end)return 0;const B=r.get(w.start),U=r.get(w.end);if(!B||!U)return 0;const q=(U.x??0)-(B.x??0),z=(U.y??0)-(B.y??0);return Math.abs(q)+Math.abs(z)},"getEdgeDistance");for(const L of b.values()){L.sort((B,U)=>{const q=Ce(B),z=Ce(U);if(Math.abs(q.deviation-z.deviation)>1)return q.deviation-z.deviation;if(Math.abs(q.dest-z.dest)>1)return q.dest-z.dest;const Y=C(B),ot=C(U);if(Math.abs(Y-ot)>1)return ot-Y;const rt=f[B].length,st=f[U].length;if(rt!==st)return rt-st;if(rt===1){const tt=f[B][0],yt=f[U][0];if(p[tt]&&p[yt]){const Rt=p[tt],Lt=p[yt],Dt=Math.abs(Rt.to-Rt.from),Jt=Math.abs(Lt.to-Lt.from);if(Math.abs(Dt-Jt)>1)return Dt-Jt}}return 0});const w=L.map(B=>p[f[B][0]]);h+=Se(w)}return h},"fixSourceHandleCrossings"),un=d(()=>{let h=0;const b=new Map;for(const[C,L]of s.entries())f[C].length!==0&&L.end&&(b.has(L.end)||b.set(L.end,[]),b.get(L.end).push(C));for(const C of b.values()){C.sort((w,B)=>{const U=d(Y=>{const ot=f[Y];if(ot.length<2)return 0;const rt=p[ot[ot.length-2]];return Math.abs(rt.to-rt.from)},"getDist"),q=U(w),z=U(B);return Math.abs(q-z)>.1?q-z:w-B});const L=C.map(w=>p[f[w][f[w].length-1]]);h+=Se(L)}return h},"fixTargetHandleCrossings"),hn=d(()=>{let h=0;for(const b of c){const C=[];for(const L of b.tracks)for(const w of L.segments){const B=f[w.edgeIndex].find(U=>p[U].segmentIndex===w.segmentIndex);B!==void 0&&C.push(p[B])}C.sort((L,w)=>L.edgeIndex-w.edgeIndex||L.segmentIndex-w.segmentIndex);for(let L=0;L<C.length;L++)for(let w=L+1;w<C.length;w++){const B=C[L],U=C[w];Ut(B,U)&&(h++,te(B,U,gt))}}return h},"fixPipeCrossings");let N=0;const F=10;for(;N<F;){let h=0;if(h+=dn(),h+=un(),h+=hn(),h===0)break;N++}const D=new Map;for(const h of c){const b=[];h.tracks.forEach(L=>{L.segments.forEach(w=>{b.push({edgeIndex:w.edgeIndex,segmentIndex:w.segmentIndex,trackIndex:L.index,from:w.from,to:w.to})})}),b.sort((L,w)=>L.from-w.from);const C=[];if(b.length>0){let L=[b[0]],w=b[0].to;for(let B=1;B<b.length;B++){const U=b[B];U.from<w?(L.push(U),w=Math.max(w,U.to)):(C.push(L),L=[U],w=U.to)}C.push(L)}for(const L of C){const w=new Set;L.forEach(tt=>w.add(tt.trackIndex));const B=new Map;L.forEach(tt=>{const yt=Ce(tt.edgeIndex);B.set(tt.trackIndex,(B.get(tt.trackIndex)??0)+yt.delta)});const U=[...w].filter(tt=>(B.get(tt)??0)<-1),q=[...w].filter(tt=>(B.get(tt)??0)>1),z=[...w].filter(tt=>Math.abs(B.get(tt)??0)<=1);U.sort((tt,yt)=>(B.get(yt)??0)-(B.get(tt)??0)),q.sort((tt,yt)=>(B.get(tt)??0)-(B.get(yt)??0));const Y=d((tt,yt)=>{L.filter(Rt=>Rt.trackIndex===tt).forEach(Rt=>{const Lt=y.has(Rt.edgeIndex)?h.coord:yt;D.set(`${Rt.edgeIndex}-${Rt.segmentIndex}`,Lt)})},"assignCoord");let ot=0;for(const tt of U)ot++,Y(tt,h.coord-ot*Cn);if(z.length===0&&w.size>0){const tt=[...w].sort((Lt,Dt)=>Math.abs(B.get(Lt)??0)-Math.abs(B.get(Dt)??0))[0],yt=U.indexOf(tt);yt!==-1&&U.splice(yt,1);const Rt=q.indexOf(tt);Rt!==-1&&q.splice(Rt,1),z.push(tt)}let rt=0;for(const tt of z){if(rt===0)Y(tt,h.coord);else{const yt=rt%2===1?1:-1,Rt=Math.ceil(rt/2);Y(tt,h.coord+yt*Rt*Cn*.5)}rt++}let st=0;for(const tt of q)st++,Y(tt,h.coord+st*Cn)}}for(const[h,b]of s.entries()){const C=f[h]??[];if(C.length===0)continue;const L=[],w=r.get(b.start),B=r.get(b.end),{pSrcPort:U,pDstPort:q}=Q(h,w,B),z=C.map(rt=>{const st=p[rt],tt=D.get(`${st.edgeIndex}-${st.segmentIndex}`)??st.pipe.coord;return{orient:st.orientation,coord:tt,from:st.from,to:st.to}});L.push(U);for(let rt=0;rt<z.length;rt++){const st=z[rt],tt=L[L.length-1],yt=st.orient==="vertical"?tt.y:tt.x,Rt=st.orient==="vertical"?tt.x:tt.y,Lt=z[rt+1],Dt=rt<z.length-1;if(Math.abs(Rt-st.coord)>ct&&L.push(Me(st,yt)),Dt&&Lt.orient===st.orient)if(Math.abs(st.coord-Lt.coord)>ct){const Jt=st.orient==="vertical"?(yt+Lt.from)/2:no(st,Lt);L.push(Me(st,Jt),Me(Lt,Jt))}else(rt===0||rt===z.length-2)&&L.push(Me(st,no(st,Lt)));else if(Dt)L.push(Me(st,Lt.coord));else{const Jt=Math.abs(st.from-yt)<Math.abs(st.to-yt)?st.to:st.from;L.push(Me(st,Jt))}}const Y=L[L.length-1];(Math.abs(Y.x-q.x)>ct||Math.abs(Y.y-q.y)>ct)&&L.push(q);const ot=[];L.length>0&&ot.push(L[0]);for(let rt=1;rt<L.length;rt++){const st=L[rt],tt=ot[ot.length-1];(Math.abs(st.x-tt.x)>ct||Math.abs(st.y-tt.y)>ct)&&ot.push(st)}b.points=ot}for(const h of s){const b=h.__originalEdge;b&&h.points&&(b.points=h.points)}t.edges=(t.edges??[]).filter(h=>!h.isLayoutOnly);const V=d((h,b)=>{const C=b.x??0,L=b.y??0,w=b.width??0,B=b.height??0;if(w<=0||B<=0)return h;const U=C-w/2,q=C+w/2,z=L-B/2,Y=L+B/2;if(h.x<U||h.x>q||h.y<z||h.y>Y)return h;const ot=h.x-U,rt=q-h.x,st=h.y-z,tt=Y-h.y,yt=Math.min(ot,rt,st,tt);return yt===ot?{x:U,y:h.y}:yt===rt?{x:q,y:h.y}:yt===st?{x:h.x,y:z}:{x:h.x,y:Y}},"nodeBoundaryClamp");for(const h of t.edges){const b=h.points;if(!b||b.length<2)continue;const C=h.start,L=h.end,w=C?r.get(C):void 0,B=L?r.get(L):void 0;w&&(b[0]=V(b[0],w)),B&&(b[b.length-1]=V(b[b.length-1],B))}return t}d(hr,"routeEdgesOrthogonal");function gr(t){return t.direction??"TB"}d(gr,"getSwimlaneDirection");function pr(t){const e=Jo(t),n=t.config.flowchart?.nodeSpacing??40,o=t.config.flowchart?.rankSpacing??100,s=t.config.swimlane?.ignoreCrossLaneEdges??!0,r=t.config.swimlane?.optimizeRanksByCrossings??!0,i=t.config.swimlane?.automaticLaneOrdering??!1,c=gr(t),{ordered:a,coordinates:l}=ur(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:i,direction:c});Zo(e,a,l,{nodeGap:n,layerGap:o});for(const g of t.edges??[])delete g.points;hr(t,c);for(const g of t.edges??[])(!g.curve||g.curve==="basis")&&(g.curve="rounded");return Rs(t,c),As(t),c}d(pr,"runSwimlaneLayoutCore");async function Qr(t,e){const n=e.select("g");wr(n,t.markers,t.type,t.diagramId),Ar(),Rr(),Nr(),Tr(),qo(t);const o=Qo(t);t.nodes=o.nodes,t.edges=o.edges;const{groups:s}=await _o(n,t);pr(t),await Uo(t,s)}d(Qr,"render");export{Qr as render}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-DkAB-D09.js","assets/mermaid.core-BKBZnrB_.js","assets/index-yKYHPeXU.js","assets/index-DBtc5buz.css","assets/_commonjsHelpers-CqkleIqs.js"])))=>i.map(i=>d[i]); +import{bR as Er}from"./index-yKYHPeXU.js";import{c as Tr}from"./chunk-RYQCIY6F-DPVXfp-M.js";import{am as wr,an as Ar,ao as Rr,ap as Nr,l as Ke,c as Or,ag as Pr,af as Br,ah as kr,at as _r,av as Fr,z as Dr,as as Hr,aw as Xr,y as Oe,ax as Ye,_ as d,ay as Ao}from"./mermaid.core-BKBZnrB_.js";import{G as Yr}from"./graph-DOmOIIwC.js";import"./map-DxJ2ADlA.js";import"./_commonjsHelpers-CqkleIqs.js";async function _o(t,e){const n=new Yr({multigraph:!0,compound:!0}),o=[...e.edges],s=Or(),r=t.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),c=r.insert("g").attr("class","edges edgePath"),a=r.insert("g").attr("class","edgeLabels"),l=r.insert("g").attr("class","nodes"),g=new Map,x=t.node()!=null;await Promise.all(e.nodes.map(async I=>{if(I.isGroup)n.setNode(I.id,{...I});else{if(x){const u=await Pr(l,I,{config:s,dir:I.dir}),p=u.node()?.getBBox()??{width:0,height:0};g.set(I.id,u),I.width=p.width,I.height=p.height}n.setNode(I.id,{...I})}}));for(const I of o)n.setEdge(I.start,I.end,{...I},I.id),e.edges.some(p=>p.id===I.id)||e.edges.push(I);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:I}=await Er(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-X5ZJPWSS-DkAB-D09.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3,4]));I(t,e)}return{graph:n,groups:{clusters:i,edgePaths:c,edgeLabels:a,nodes:l,rootGroups:r},nodeElements:g}}d(_o,"createGraphWithElements");var Ro=5,Ge=1e-5,$e=1e-6;function qe(t){const e=[];for(let n=0;n<t.length-1;n++)e.push({a:t[n],b:t[n+1]});return e}d(qe,"buildSegmentList");function Fo(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,c=o.y-n.y,a=s*c-r*i;if(a===0)return null;const l=n.x-t.x,g=n.y-t.y,x=(l*c-g*i)/a,I=(l*r-g*s)/a;return x<=$e||x>=1-$e||I<=$e||I>=1-$e?null:{point:{x:t.x+x*s,y:t.y+x*r},tA:x,tB:I}}d(Fo,"segmentIntersection");function vn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(vn,"isHorizontalSeg");function Do(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n],s=qe(o.points);for(let r=n+1;r<t.length;r++){const i=t[r],c=qe(i.points);for(const[a,l]of s.entries())for(const[g,x]of c.entries()){const I=Fo(l.a,l.b,x.a,x.b);if(!I)continue;const u=vn(l),p=vn(x);(u!==p?u:!1)?e.push({jumpEdgeId:o.id,otherEdgeId:i.id,segIndex:a,t:I.tA,point:I.point}):e.push({jumpEdgeId:i.id,otherEdgeId:o.id,segIndex:g,t:I.tB,point:I.point})}}}return e}d(Do,"findEdgeIntersections");function re(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}d(re,"fmt");function we(t){return`${re(t.x)},${re(t.y)}`}d(we,"pointToString");function Ho(t){const e=t.b.x-t.a.x,n=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(n)?e>=0?1:0:n>=0?1:0}d(Ho,"getArcSweepFlag");var Gr=.001;function Xo(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&Ao[e.arrowTypeStart];if(o){const r=t[0],i=t[1],c=Math.atan2(i.y-r.y,i.x-r.x);n[0].x=r.x+o*Math.cos(c),n[0].y=r.y+o*Math.sin(c)}const s=e.arrowTypeEnd&&Ao[e.arrowTypeEnd];if(s){const r=t.length,i=t[r-2],c=t[r-1],a=Math.atan2(c.y-i.y,c.x-i.x);n[r-1].x=c.x-s*Math.cos(a),n[r-1].y=c.y-s*Math.sin(a)}return n}d(Xo,"applyMarkerOffsets");function Yo(t,e,n,o,s){const r=t.point.x,i=t.point.y,c={x:r-e*t.r,y:i-n*t.r},a={x:r+e*t.r,y:i+n*t.r},l=[`L${we(c)}`];return s==="arc"?l.push(`A${re(t.r)},${re(t.r)} 0 0 ${o} ${we(a)}`):l.push(`M${we(a)}`),l}d(Yo,"emitJump");function Ln(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=n.x-e.x,c=n.y-e.y,a=Math.hypot(s,r),l=Math.hypot(i,c);if(a<Ge||l<Ge)return null;const g=s/a,x=r/a,I=i/l,u=c/l,p=g*I+x*u,f=Math.max(-1,Math.min(1,p)),y=Math.acos(f);if(y<Ge||Math.abs(Math.PI-y)<Ge)return null;const v=Math.min(o/Math.sin(y/2),a/2,l/2);return{startX:e.x-g*v,startY:e.y-x*v,endX:e.x+I*v,endY:e.y+u*v,ctrlX:e.x,ctrlY:e.y,cutLen:v}}d(Ln,"computeRoundedCorner");function Go(t,e,n){const o=t.points;if(o.length<2)return"";const s=Xo(o,t),r=t.curve==="rounded",i=qe(s),c=new Map;for(const l of e){const g=i[l.segIndex];if(!g)continue;const x=Math.hypot(g.b.x-g.a.x,g.b.y-g.a.y),I=c.get(l.segIndex)??[];I.push({t:l.t,point:l.point,d:l.t*x,r:n.jumpRadius}),c.set(l.segIndex,I)}const a=[`M${we(s[0])}`];for(let l=0;l<i.length;l++){const g=i[l],x=Math.hypot(g.b.x-g.a.x,g.b.y-g.a.y),I=x===0?0:(g.b.x-g.a.x)/x,u=x===0?0:(g.b.y-g.a.y)/x,p=Ho(g);let f=0;if(r&&l>0){const E=Ln(s[l-1],s[l],s[l+1]??s[l],Ro);E&&(f=E.cutLen)}let y=x,v=null;r&&l<i.length-1&&(v=Ln(s[l],s[l+1],s[l+2]??s[l+1],Ro),v&&(y=x-v.cutLen));const M=[...c.get(l)??[]].sort((E,T)=>E.t-T.t);for(const E of M)E.r=Math.min(E.r,E.d-f,y-E.d);for(let E=0;E<M.length-1;E++){const T=M[E+1].d-M[E].d;if(M[E].r+M[E+1].r>T){const m=T/2;M[E].r=Math.min(M[E].r,m),M[E+1].r=Math.min(M[E+1].r,m)}}for(const E of M)E.r<Gr||a.push(...Yo(E,I,u,p,n.jumpStyle));r&&v?(a.push(`L${re(v.startX)},${re(v.startY)}`),a.push(`Q${re(v.ctrlX)},${re(v.ctrlY)} ${re(v.endX)},${re(v.endY)}`)):a.push(`L${we(g.b)}`)}return a.join(" ")}d(Go,"rewriteEdgePath");function $o(t){return/^[\d\s+,.LMelm-]*$/.test(t)}d($o,"isStraightPath");function zo(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}d(zo,"curveSupportsLineHops");function Vo(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),n=JSON.parse(e);if(!Array.isArray(n))return null;const o=[];for(const s of n)s&&typeof s.x=="number"&&typeof s.y=="number"&&o.push({x:s.x,y:s.y});return o.length>=2?o:null}catch{return null}}d(Vo,"decodeDataPoints");function jo(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const l of e)s.set(l.id,l);const r=[],i=new Map;for(const l of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(l.id):l.id,x=o.querySelector(`path[data-id="${g}"]`);if(!x)continue;i.set(l.id,x);const u=Vo(x.getAttribute("data-points"))??l.points;r.push({...l,points:u})}const c=Do(r);if(c.length===0)return;const a=new Map;for(const l of c){const g=a.get(l.jumpEdgeId)??[];g.push(l),a.set(l.jumpEdgeId,g)}for(const l of r){const g=a.get(l.id);if(!g||g.length===0)continue;const I=s.get(l.id)?.curve;if(I!==void 0&&!zo(I))continue;const u=i.get(l.id);if(!u)continue;if(I===void 0){const E=u.getAttribute("d")??"";if(!$o(E))continue}const p=u.getAttribute("style")??"",f=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(p),y=f?Number.parseFloat(f[1]):null,v=f?Number.parseFloat(f[2]):null,M=Go(l,g,n);if(u.setAttribute("d",M),y!==null&&v!==null&&typeof u.getTotalLength=="function"){const E=u.getTotalLength(),T=Math.max(0,E-y-v),m=`0 ${y} ${T} ${v}`,S=p.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${m};`).replace(/;\s*;+/g,";");u.setAttribute("style",S)}}}d(jo,"applyLineJumpsToSvg");async function Uo(t,e){for(const s of t.nodes)s.isGroup?await Br(e.clusters,s):kr(s);const n=new Map;for(const s of t.nodes)s?.id&&n.set(s.id,s);for(const s of t.edges){const r=s.start?n.get(s.start)??{}:{},i=s.end?n.get(s.end)??{}:{},c=_r(e.edgePaths,{...s},{},t.type,r,i,t.diagramId);s.label&&await Fr(e.rootGroups,s),s.label&&Wo(s,c)}const o=t.config?.swimlane?.lineHops;if(o!==!1){const s=o==="gap"?"gap":"arc",r=t.edges.filter(i=>Array.isArray(i.points)&&i.points.length>=2).map(i=>({id:i.id,points:i.points,curve:i.curve,arrowTypeStart:i.arrowTypeStart,arrowTypeEnd:i.arrowTypeEnd}));jo(e.edgePaths,r,{enabled:!0,jumpRadius:6,jumpStyle:s})}}d(Uo,"adjustLayout");function Wo(t,e){const n=e?.updatedPath??e?.originalPath,o=Dr(),{subGraphTitleTotalMargin:s}=Hr({flowchart:o.flowchart??{}});if(t.label){const r=Xr.get(t.id);let i=t.x,c=t.y;if(n){const a=Oe.calcLabelPosition(n);Ke.debug("Moving label "+t.label+" from (",i,",",c,") to (",a.x,",",a.y,") abc88"),e&&(i=a.x,c=a.y)}r.attr("transform",`translate(${i}, ${c+s/2})`)}if(t?.startLabelLeft){const r=Ye.get(t.id).startLeft;let i=t?.x,c=t?.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.startLabelRight){const r=Ye.get(t.id).startRight;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.endLabelLeft){const r=Ye.get(t.id).endLeft;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}if(t.endLabelRight){const r=Ye.get(t.id).endRight;let i=t.x,c=t.y;if(n){const a=Oe.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);i=a.x,c=a.y}r.attr("transform",`translate(${i}, ${c})`)}}d(Wo,"positionEdgeLabel");var Mn="__swimlane_default__",$r=21,No=20;function En(t){return Math.max(t.padding??No,No)}d(En,"topLaneHorizontalPadding");function Ko(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const i=n-s/2,c=Math.min(r,n+s/2),a=Math.min($r,Math.max(0,c-i)),l=i+a;if(l<=i){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:i,bottom:l}}d(Ko,"assignTopLaneTitleRect");function qo(t){const e=t.direction,n=t.nodes??=[];for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===Mn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:Mn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=Mn}d(qo,"prepareLayoutForSwimlanes");function Jo(t){const e=new Map;for(const a of t.nodes??[])e.set(a.id,a);const n=[];for(const a of t.edges??[]){const l=typeof a.start=="string"?a.start:void 0,g=typeof a.end=="string"?a.end:void 0;!l||!g||a.labelNodeId||n.push({id:a.id,src:l,dst:g,ref:a})}const o=t.nodes??[],s=o.filter(a=>a.isGroup),r=o.filter(a=>!a.isGroup);return{nodes:[...[...s].reverse(),...r].map(a=>a.id),edges:n,layout:t,nodeById:e}}d(Jo,"toGraphView");function Zo(t,e,n,o){const{layout:s}=t,r=t.nodeById,i=o?.layerGap??100,c=o?.nodeGap??40;let a=0;for(const I of e.layers){let u=0;for(const p of I){const f=r.get(p);if(!f){u++;continue}f.layer=a,f.order=u;const y=n.x[p]??u*c,v=n.y[p]??a*i;f.x=y,f.y=v,u++}a++}const l=s.nodes??[],g=new Map,x=[];for(const I of l){if(!I?.isGroup)continue;I.parentId||x.push(I);const u=l.filter(M=>M.parentId===I.id);let p=1/0,f=-1/0,y=1/0,v=-1/0;for(const M of u){const E=M.x??n.x[M.id],T=M.y??n.y[M.id],m=M.width??0,S=M.height??0;E!=null&&T!=null&&(p=Math.min(p,E-m/2),f=Math.max(f,E+m/2),y=Math.min(y,T-S/2),v=Math.max(v,T+S/2))}if(p===1/0||y===1/0)I.x=I.x??0,I.y=I.y??0,I.width=I.width??0,I.height=I.height??0;else{const M=I.padding??20,E=I.parentId?M:2*En(I),T=M,m=Math.max(0,f-p)+E,S=Math.max(0,v-y)+T,A=(p+f)/2,R=(y+v)/2;I.x=A,I.y=R,I.width=m,I.height=S,g.set(I.id,{minX:p,maxX:f,minY:y,maxY:v})}}if(x.length>0&&g.size>0){let I=1/0,u=-1/0,p=0;for(const f of x){const y=f.padding??20;y>p&&(p=y);const v=g.get(f.id);v&&(I=Math.min(I,v.minY),u=Math.max(u,v.maxY))}if(I!==1/0&&u!==-1/0){const f=Math.max(0,u-I),v=Math.max(p,36),M=f+2*v,E=(I+u)/2;for(const k of x)k.y=E,k.height=M,k.swimlaneContentTop=I;const T=[...x].sort((k,O)=>{const _=k.x??0,H=O.x??0;return _-H}),m=[],S=[],A=[];for(const k of T){const O=g.get(k.id);if(!O)continue;const _=Math.max(0,O.maxX-O.minX)+2*En(k),H=(O.minX+O.maxX)/2;m.push(k.id),S.push(H),A.push(_)}const R=m.length;if(R>0){const k=new Map;if(R===1)k.set(m[0],A[0]);else{const O=[];for(let j=0;j<R-1;j++)O.push(S[j+1]-S[j]);const _=new Array(R);_[0]=0;for(let j=0;j<R-1;j++)_[j+1]=2*O[j]-_[j];let H=0,P=Number.POSITIVE_INFINITY;for(let j=0;j<R;j++){const J=A[j];j%2===0?H=Math.max(H,J-_[j]):P=Math.min(P,_[j]-J)}let G=H;H<=P?G=(H+P)/2:G=H;for(let j=0;j<R;j++){const J=_[j]+(j%2===0?G:-G),dt=Math.max(A[j],J);k.set(m[j],dt)}}for(const O of x){const _=k.get(O.id);_!=null&&(O.width=_),Ko(O)}}}}}d(Zo,"writeBackToLayoutData");var zr="[EdgeLabelNodes]";function Qo(t){const e=[],n=[],o=new Map;for(const i of t.nodes)o.set(i.id,i);for(const i of t.edges){if(!i.label||i.label.length===0||i.isLayoutOnly||i.labelNodeId)continue;const c=i.start?o.get(i.start):void 0,a=i.end?o.get(i.end):void 0;if(!c||!a){Ke.warn(zr,`Edge ${i.id} has missing source or target node`);continue}const l=`edge-label-${i.start}-${i.end}-${i.id}`,x=c.parentId!==a.parentId?a.parentId:c.parentId,I={id:l,label:i.label,edgeStart:i.start??"",edgeEnd:i.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:x,isGroup:!1,labelStyle:Array.isArray(i.labelStyle)?i.labelStyle[0]:i.labelStyle??"",...c.dir?{dir:c.dir}:{}};e.push(I),i.labelNodeId=l,i.label=void 0,i.text=void 0;const u={id:`${i.id}-to-label`,start:i.start,end:l,type:"normal",isLayoutOnly:!0},p={id:`${i.id}-from-label`,start:l,end:i.end,type:"normal",isLayoutOnly:!0};n.push(u,p)}const s=[...t.nodes,...e],r=[...t.edges,...n];return{...t,nodes:s,edges:r}}d(Qo,"createEdgeLabelNodes");var Ft=.001;function oo(t){const e=t.x??0,n=t.y??0,o=t.width??0,s=t.height??0;return o>0&&s>0?{cx:e,cy:n,rect:Ae(e,n,o,s)}:void 0}d(oo,"measuredNodeRect");function so(t){if(t.isGroup)return;const e=oo(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(so,"nodeBoundsInfoFor");function oe(t,e,n=Ft){return Math.abs(t.x-e.x)<n&&Math.abs(t.y-e.y)<n}d(oe,"samePoint");function ft(t,e,n=Ft){return Math.abs(t.x-e.x)<n}d(ft,"sameX");function ht(t,e,n=Ft){return Math.abs(t.y-e.y)<n}d(ht,"sameY");function Tt(t,e,n=Ft){return ht(t,e,n)&&Math.abs(t.x-e.x)>n}d(Tt,"isHorizontalSegment");function wt(t,e,n=Ft){return ft(t,e,n)&&Math.abs(t.y-e.y)>n}d(wt,"isVerticalSegment");function zt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(zt,"overlapLength");function ce(t,e,n=Ft){return t.horizontal&&e.horizontal&&ht(t.a,e.a,n)?zt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&ft(t.a,e.a,n)?zt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(ce,"sameAxisSegmentOverlapLength");function Re(t,e=Ft){const n=[];for(let o=0;o<t.length-1;o++){const s=t[o],r=t[o+1],i=Tt(s,r,e),c=wt(s,r,e);(i||c)&&n.push({index:o,a:s,b:r,horizontal:i,vertical:c})}return n}d(Re,"orthogonalSegmentsForPoints");function Qt(t,e=Ft){const n=Re(t,e);let o=0;for(let s=1;s<n.length;s++)n[s-1].horizontal!==n[s].horizontal&&o++;return o}d(Qt,"countOrthogonalBends");function pt(t,e=Ft){const n=[];for(const o of t){const s=n.length>0?n[n.length-1]:void 0;(!s||!oe(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(pt,"dedupeConsecutivePoints");function ro(t,e=Ft){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Tt(n,o,e)&&wt(o,s,e)&&Tt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:wt(n,o,e)&&Tt(o,s,e)&&wt(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(ro,"classifyThreeSegmentRoute");function cn(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),c=Math.max(t.y,e.y);return r>n.left-o&&s<n.right+o&&c>n.top-o&&i<n.bottom+o}d(cn,"segmentBoundsOverlapRect");function io(t,e,n=0){return t.x>e.left+n&&t.x<e.right-n&&t.y>e.top+n&&t.y<e.bottom-n}d(io,"pointInsideRect");function ts(t,e){return t.left<=e.left&&t.right>=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(ts,"rectContainsRect");function Je(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}d(Je,"rectsOverlap");function Tn(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Tn,"inflateRect");function Ae(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(Ae,"rectFromCenterSize");function qt(t){return oo(t)?.rect}d(qt,"rectOfNodeBounds");function Ie(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Ie,"portForRectSide");function co(t,e,n,o,s,r=Ft){const i=e==="left"||e==="right",c=o==="left"||o==="right";if(i&&c){if(e==="right"&&o==="left"&&t.x<n.x||e==="left"&&o==="right"&&t.x>n.x){if(ht(t,n,r))return[t,n];const x=(t.x+n.x)/2;return[t,{x,y:t.y},{x,y:n.y},n]}if(e===o){if(ht(t,n,r))return;const x=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x,y:t.y},{x,y:n.y},n]}return}if(!i&&!c){if(e===o){if(ft(t,n,r))return;const I=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:I},{x:n.x,y:I},n]}if(!(e==="bottom"&&o==="top"&&t.y<n.y||e==="top"&&o==="bottom"&&t.y>n.y))return;if(ft(t,n,r))return[t,n];const x=(t.y+n.y)/2;return[t,{x:t.x,y:x},{x:n.x,y:x},n]}if(i&&!c){const g=e==="right"&&n.x>t.x||e==="left"&&n.x<t.x,x=o==="top"&&t.y<n.y||o==="bottom"&&t.y>n.y;return g&&x?[t,{x:n.x,y:t.y},n]:void 0}const a=e==="bottom"&&n.y>t.y||e==="top"&&n.y<t.y,l=o==="left"&&t.x<n.x||o==="right"&&t.x>n.x;return a&&l?[t,{x:t.x,y:n.y},n]:void 0}d(co,"buildOrthogonalPortPath");function ao(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(ao,"buildSameSideTrackPath");function an(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=so(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(an,"collectRealNodeBounds");function me(t){const e=[],n=[];for(const o of t){const s=so(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(me,"collectNodeRectEntries");function es(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,i=o.width??0,c=o.height??0;n.push({nodeId:o.id,...Ae(s,r,i,c)})}return n}d(es,"collectLayoutNodeRects");function lo(t,e,n=Ft){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),i=e.get(s);if(!(!r||!i))return{srcId:o,dstId:s,srcInfo:r,dstInfo:i,collinearX:Math.abs(r.cx-i.cx)<n,collinearY:Math.abs(r.cy-i.cy)<n}}d(lo,"getNodePairGeometry");function At(t,e,n,o=[],s=0){for(const r of n)if(!o.includes(r.id)&&cn(t,e,r.rect,-s))return!0;return!1}d(At,"segmentHitsAnyRect");function fo(t,e,n,o,s=Ft,r=1e-6){const i=ht(t,e,s),c=ft(t,e,s),a=ht(n,o,s),l=ft(n,o,s);if(i&&a||c&&l||!(i||c)||!(a||l))return!1;const g=i?{a:t,b:e}:{a:n,b:o},x=c?{a:t,b:e}:{a:n,b:o},I=g.a.y,u=Math.min(g.a.x,g.b.x),p=Math.max(g.a.x,g.b.x),f=x.a.x,y=Math.min(x.a.y,x.b.y),v=Math.max(x.a.y,x.b.y);if(f<u||f>p||I<y||I>v)return!1;const M=Math.abs(f-g.a.x)<r&&Math.abs(I-g.a.y)<r||Math.abs(f-g.b.x)<r&&Math.abs(I-g.b.y)<r,E=Math.abs(f-x.a.x)<r&&Math.abs(I-x.a.y)<r||Math.abs(f-x.b.x)<r&&Math.abs(I-x.b.y)<r;return!(M&&E)}d(fo,"orthogonalSegmentsCross");function ns(t,e,n,o,s=Ft){const r=ht(t,e,s),i=ft(t,e,s),c=ht(n,o,s),a=ft(n,o,s);return i&&a&&ft(t,n,s)?zt(t.y,e.y,n.y,o.y)>s:r&&c&&ht(t,n,s)?zt(t.x,e.x,n.x,o.x)>s:!1}d(ns,"sameAxisSegmentsOverlap");function Ze(t,e,n,o,{epsilon:s=Ft,skipDegenerateOther:r=!1}={}){for(const i of n){if(i===o||i.isLayoutOnly)continue;const c=i.points;if(!(!c||c.length<2))for(let a=0;a<c.length-1;a++){const l=c[a],g=c[a+1];if(!(r&&oe(l,g,s))&&(fo(t,e,l,g,s)||ns(t,e,l,g,s)))return!0}}return!1}d(Ze,"segmentConflictsWithAnyEdge");function le(t,e,n,o,s=Ft){const r=ht(t,e,s),i=ft(t,e,s),c=ht(n,o,s),a=ft(n,o,s);if(!(r&&a||i&&c))return!1;const l=r?{a:t,b:e}:{a:n,b:o},g=r?{a:n,b:o}:{a:t,b:e},x=l.a.y,I=Math.min(l.a.x,l.b.x),u=Math.max(l.a.x,l.b.x),p=g.a.x,f=Math.min(g.a.y,g.b.y),y=Math.max(g.a.y,g.b.y);return p>I+s&&p<u-s&&x>f+s&&x<y-s}d(le,"orthogonalSegmentsStrictlyCross");function wn(t,e,n){const o=Math.min(e,n),s=Math.max(e,n);return t>o+Ft&&t<s-Ft}d(wn,"strictlyBetween");function os(t,e,n){return ft(t,e)&&ft(e,n)?wn(e.y,t.y,n.y):ht(t,e)&&ht(e,n)?wn(e.x,t.x,n.x):!1}d(os,"isCollinearIntermediate");function ss(t){let e=!1;const n=[];for(let o=0;o<t.length;o++){const s=n[n.length-1],r=t[o],i=o+1<t.length?t[o+1]:void 0;if(s&&i){if(oe(s,i)){o++,e=!0;continue}if(os(s,r,i)){e=!0;continue}}n.push(r)}return{points:n,changed:e}}d(ss,"simplifyPolylineOnce");function Qe(t){const e=[t[0]];for(let o=1;o<t.length;o++){const s=e[e.length-1],r=t[o];if(!ft(s,r)&&!ht(s,r)){const i=e.length>=2?e[e.length-2]:void 0,a=(i?ft(i,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(a)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!oe(s,o))&&n.push(o)}return n}d(Qe,"orthogonalizePolyline");function ae(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=ss(e);if(e=o.points,!o.changed)break}return e}d(ae,"simplifyPolyline");var nt=.001,Vr=.5,Oo=4;function uo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length<n)return;const s=o.start?e.get(o.start):void 0,r=o.end?e.get(o.end):void 0;return{edge:o,points:o.points,srcRect:s?qt(s):void 0,dstRect:r?qt(r):void 0}}d(uo,"endpointContextFor");function rs(t,e,n){if(ht(t,e,nt))return{x:t.x<n.left?n.left:n.right,y:t.y};if(ft(t,e,nt)){const o=t.y<n.top?n.top:n.bottom;return{x:t.x,y:o}}return{x:Math.min(n.right,Math.max(n.left,t.x)),y:Math.min(n.bottom,Math.max(n.top,t.y))}}d(rs,"segmentEnterPoint");function An(t,e,n){const o=n?1:-1;let s=n?0:t.length-1;for(;s>=0&&s<t.length&&io(t[s],e,Vr);)s+=o;if(s<0||s>=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const i=rs(t[s],t[r],e);return n?[i,...t.slice(s)]:[...t.slice(0,s+1),i]}d(An,"clipEndpoint");function is(t,e){for(const n of t){const o=uo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=An(s,o.srcRect,!0)),o.dstRect&&(s=An(s,o.dstRect,!1)),s=ae(Qe(s)),s=ho(s,o.srcRect,o.dstRect),o.edge.points=ae(Qe(s))}}d(is,"clipEdgeEndpointsToNodeBoundaries");function Rn(t,e,n,o=!1){if(ht(t,e,nt)){if(e.y<n.top-nt||e.y>n.bottom+nt)return e;if(o){if(t.x<n.left-nt)return{x:n.left,y:t.y};if(t.x>n.right+nt)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(ft(t,e,nt)){if(e.x<n.left-nt||e.x>n.right+nt)return e;if(o){if(t.y<n.top-nt)return{x:t.x,y:n.top};if(t.y>n.bottom+nt)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(Rn,"snapEndpointToBoundary");function tn(t,e,n){const o=t[e];for(let s=e+n;s>=0&&s<t.length;s+=n){const r=t[s];if(!oe(r,o,nt))return r}return t[e+n]}d(tn,"firstDistinctAdjacent");function en(t,e){const n=t+Oo,o=e-Oo;return n<=o?{lo:n,hi:o}:{lo:(t+e)/2,hi:(t+e)/2}}d(en,"cornerClearanceRange");function Nn(t,e,n){const{lo:o,hi:s}=en(e,n);return Math.min(s,Math.max(o,t))}d(Nn,"clampToCornerClearance");function cs(t){const e=Math.max(...t.map(o=>o.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(cs,"intersectRanges");function On(t,e){return e==="left"||e==="right"?en(t.top,t.bottom):en(t.left,t.right)}d(On,"clearanceRangeForSide");function nn(t,e,n){const o=t.y>=n.top-nt&&t.y<=n.bottom+nt,s=t.x>=n.left-nt&&t.x<=n.right+nt;if(ht(t,e,nt)&&o){if(Math.abs(t.x-n.left)<nt)return"left";if(Math.abs(t.x-n.right)<nt)return"right"}if(ft(t,e,nt)&&s){if(Math.abs(t.y-n.top)<nt)return"top";if(Math.abs(t.y-n.bottom)<nt)return"bottom"}}d(nn,"terminalSideForSegment");function Pe(t){return t==="left"||t==="right"}d(Pe,"isHorizontalSide");function as(t,e,n,o,s){const r=[],i=n?nn(t,e,n):void 0,c=o?nn(e,t,o):void 0;return n&&i&&Pe(i)===s&&r.push(On(n,i)),o&&c&&Pe(c)===s&&r.push(On(o,c)),r.length>0?cs(r):void 0}d(as,"straightClearanceRange");function Pn(t,e,n,o,s){const r=as(t,e,n,o,s);if(!r)return;const i=s?t.y:t.x,c=Math.min(r.hi,Math.max(r.lo,i));if(!(Math.abs(c-i)<nt))return s?[{x:t.x,y:c},{x:e.x,y:c}]:[{x:c,y:t.y},{x:c,y:e.y}]}d(Pn,"clearStraightEndpointCornerAxis");function ho(t,e,n){if(t.length!==2)return t;const[o,s]=t;return ht(o,s,nt)?Pn(o,s,e,n,!0)??t:ft(o,s,nt)?Pn(o,s,e,n,!1)??t:t}d(ho,"clearStraightEndpointCornerConnections");function ls(t,e,n){return Pe(n)?{x:t.x,y:Nn(t.y,e.top,e.bottom)}:{x:Nn(t.x,e.left,e.right),y:t.y}}d(ls,"cornerClearedEndpoint");function fs(t,e,n,o,s,r){const i=t.map(c=>({...c}));for(let c=e;c>=0&&c<t.length;c+=n){const a=t[c];if(r&&!ht(a,o,nt)||!r&&!ft(a,o,nt))break;r?i[c].y=s.y:i[c].x=s.x}return i}d(fs,"moveCollinearEndpointRun");function Bn(t,e,n){if(t.length<2)return t;const o=n?0:t.length-1,s=n?1:-1,r=t[o],i=tn(t,o,s);if(!i)return t;const c=nn(r,i,e);if(!c)return t;const a=Pe(c),l=ls(r,e,c);return oe(r,l,nt)?t:fs(t,o,s,r,l,a)}d(Bn,"clearEndpointCornerConnection");function kn(t,e,n){const o=Math.min(t.x,e.x)>=n.left-nt&&Math.max(t.x,e.x)<=n.right+nt,s=Math.min(t.y,e.y)>=n.top-nt&&Math.max(t.y,e.y)<=n.bottom+nt;if(Math.abs(t.y-n.top)<nt&&Math.abs(e.y-n.top)<nt&&o)return"top";if(Math.abs(t.y-n.bottom)<nt&&Math.abs(e.y-n.bottom)<nt&&o)return"bottom";if(Math.abs(t.x-n.left)<nt&&Math.abs(e.x-n.left)<nt&&s)return"left";if(Math.abs(t.x-n.right)<nt&&Math.abs(e.x-n.right)<nt&&s)return"right"}d(kn,"borderSideForSegment");function _n(t,e,n,o){switch(t){case"top":return ft(e,n,nt)&&n.y<o.top-nt;case"bottom":return ft(e,n,nt)&&n.y>o.bottom+nt;case"left":return ht(e,n,nt)&&n.x<o.left-nt;case"right":return ht(e,n,nt)&&n.x>o.right+nt}}d(_n,"leavesOutward");function Fn(t,e,n){if(t.length<3)return t;if(n){const r=kn(t[0],t[1],e);return r&&_n(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=kn(t[o-1],t[o],e);return s&&_n(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(Fn,"collapseOwnBorderStub");function ds(t,e,n){let o=t;if(e){const r=tn(o,0,1);if(r){const i=Rn(r,o[0],e);i!==o[0]&&(o=[i,...o.slice(1)])}o=Fn(o,e,!0)}if(n){const r=o.length-1,i=tn(o,r,-1);if(i){const c=Rn(i,o[r],n,!0);c!==o[r]&&(o=[...o.slice(0,r),c])}o=Fn(o,n,!1)}const s=ho(o,e,n);return s!==o||o.length===2?s:(e&&(o=Bn(o,e,!0)),n&&(o=Bn(o,n,!1)),o)}d(ds,"snapAndCollapseEndpoints");function Dn(t,e){for(const n of t){const o=uo(n,e,2);if(!o)continue;const s=pt(o.points,nt),r=ds(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=i}}d(Dn,"prepareEdgeEndpointsForRenderer");function go(t){return new Map(t.map(e=>[e.id,e]))}d(go,"buildNodeMap");function us(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!s?.isGroup)break;o=s.id,n=s.parentId}return o}d(us,"resolveTopLevelGroupId");function Hn(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!s?.isGroup)break;n++,o=s.parentId}return n}d(Hn,"groupDepth");function po(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const i=r.x,c=r.y;if(typeof i!="number"||typeof c!="number")continue;const a=r.width??0,l=r.height??0;e=Math.min(e,i-a/2),n=Math.max(n,i+a/2),o=Math.min(o,c-l/2),s=Math.max(s,c+l/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(po,"boundsForChildren");function hs(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(hs,"applyGroupBounds");function gs(t){const e=go(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>Hn(s,e)-Hn(o,e));for(const o of n){const s=t.filter(i=>i.parentId===o.id),r=po(s);r&&hs(o,r)}}d(gs,"recomputeNestedGroupBounds");function on(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(a=>!a.isGroup);let r=1/0,i=-1/0;for(const a of s){const l=a[e];typeof l=="number"&&(r=Math.min(r,l),i=Math.max(i,l))}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const c=d(a=>r+i-a,"mirror");for(const a of n){const l=a[e];typeof l=="number"&&(a[e]=c(l));const g=a.groupTitleRect;g&&(a.groupTitleRect=e==="x"?{...g,left:c(g.right),right:c(g.left)}:{...g,top:c(g.bottom),bottom:c(g.top)})}for(const a of o)for(const l of a.points??[])l[e]=c(l[e]);return!0}d(on,"mirrorAxis");function ps(t){return(t.nodes??[]).some(n=>!n.isGroup)?on(t,"y"):!0}d(ps,"applyBtDirectionTransform");function ms(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,i=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G<r&&(r=G),j<i&&(i=j)}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const c=36;let a=0,l=0;for(const P of s)a+=P.width??0,l+=P.height??0;const g=a/s.length,x=l/s.length,I=x>0?Math.max(1,g/x):1;for(const P of s){const G=P.x??0,J=((P.y??0)-i)*I+c,dt=G-r;P.x=J,P.y=dt}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,dt=(G.y-i)*I+c,mt=j-r;G.x=dt,G.y=mt}gs(n);const u=n.filter(P=>P.isGroup&&!P.parentId);if(u.length===0)return e==="RL"&&on(t,"x"),!0;const p=go(n),f=new Map;for(const P of n){if(P.isGroup)continue;const G=us(P,p);if(!G)continue;const j=f.get(G)??[];j.push(P),f.set(G,j)}let y=0;for(const P of u){const G=P.padding??0;G>y&&(y=G)}const v=[];let M=1/0,E=-1/0;for(const P of u){const G=f.get(P.id)??[],j=po(G);j&&(M=Math.min(M,j.minX),E=Math.max(E,j.maxX),v.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(M===1/0||E===-1/0)return!0;const T=Math.max(0,E-M),m=Math.max(y,10),S=T+2*m,A=c+S,O=(M+E)/2-S/2-c,_=O+A/2,H=Math.max(y,c);v.sort((P,G)=>P.centerY-G.centerY);for(let P=0;P<v.length;P++){const G=v[P];let j,J;if(P===0?j=G.contentTop-H:j=(v[P-1].contentBottom+G.contentTop)/2,P===v.length-1)J=G.contentBottom+H;else{const kt=v[P+1];J=(G.contentBottom+kt.contentTop)/2}const dt=Math.max(0,J-j),mt=(j+J)/2;G.lane.x=_,G.lane.y=mt,G.lane.width=A,G.lane.height=dt,G.lane.swimlaneContentTop=G.contentTop,G.lane.groupTitleRect={left:O,right:O+c,top:j,bottom:J}}return e==="RL"&&on(t,"x"),!0}d(ms,"applyLrDirectionTransform");var se=1e-6,jr=8,ze=jr,Ur=[0,ze,-ze,2*ze,-2*ze];function ys(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e);for(const s of t){if(s.isLayoutOnly)continue;const r=s.points;if(!r||r.length<4)continue;const i=ro(pt(r,se),se);if(!i)continue;const{p3:c}=i,a=i.kind==="HVH",l=lo(s,n,se);if(!l)continue;const{srcId:g,dstId:x,srcInfo:I,dstInfo:u,collinearX:p,collinearY:f}=l;if(p||f)continue;let y;const v=I.rect;for(const M of Ur){let E,T,m;if(a){const _=u.cy>I.cy?v.bottom:v.top,H=I.cx+M;if(H<=v.left+se||H>=v.right-se)continue;E={x:H,y:_},T={x:H,y:c.y},m={x:c.x,y:c.y}}else{const _=u.cx>I.cx?v.right:v.left,H=I.cy+M;if(H<=v.top+se||H>=v.bottom-se)continue;E={x:_,y:H},T={x:c.x,y:H},m={x:c.x,y:c.y}}const S=oe(E,T,se),A=oe(T,m,se);if(S&&A||!S&&At(E,T,o,[g],1)||!A&&At(T,m,o,[x],1))continue;const R=!S&&Ze(E,T,t,s,{epsilon:se,skipDegenerateOther:!0}),k=!A&&Ze(T,m,t,s,{epsilon:se,skipDegenerateOther:!0});if(!(R||k)){S?y=[T,m]:A?y=[E,T]:y=[E,T,m];break}}y&&(s.points=y)}}d(ys,"portSwapToLShape");function xs(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values());for(const c of t){if(c.isLayoutOnly)continue;const a=c.points;if(!a||a.length<4)continue;const l=pt(a,.001);if(l.length<4)continue;const g=l.length-1,x=l[g],I=l[g-1],u=l[g-2],p=x.x-I.x,f=x.y-I.y,y=Math.hypot(p,f);if(y>=10||y<.001)continue;const v=I.x-u.x,M=I.y-u.y;if(Math.hypot(v,M)<.001)continue;const T=Tt(I,x,.001),m=wt(I,x,.001),S=Tt(u,I,.001),A=wt(u,I,.001);if(!(T&&A||m&&S))continue;const R=c.end,k=c.start,O=R?e.get(R):void 0;if(!O)continue;const _=O.x??0,H=O.y??0,P=qt(O);if(!P)continue;let G,j;if(A){const W=M<0;G={x:_,y:u.y},j={x:_,y:W?P.bottom:P.top}}else{const W=v>0;G={x:u.x,y:H},j={x:W?P.right:P.left,y:H}}if(At(G,j,r,R?[R]:[],-2)||At(G,j,i,[],-2))continue;if(k){const W=e.get(k),et=W?qt(W):void 0;if(et&&io(G,et,2))continue}const J=d((W,et)=>`${W.x.toFixed(3)},${W.y.toFixed(3)}|${et.x.toFixed(3)},${et.y.toFixed(3)}`,"ownSegmentKey"),dt=new Set;for(let W=0;W<l.length-1;W++)dt.add(J(l[W],l[W+1]));const mt=d((W,et)=>{for(const at of t){if(at===c||at.isLayoutOnly)continue;const gt=at.points;if(!(!gt||gt.length<2))for(let xt=0;xt<gt.length-1;xt++){const vt=gt[xt],Vt=gt[xt+1];if(!dt.has(J(vt,Vt))&&le(W,et,vt,Vt,.001))return!0}}return!1},"segmentCrossesOtherEdge");if(mt(G,j))continue;if(g-3>=0){const W=l[g-3],et=[k,R].filter(at=>!!at);if(At(W,G,r,et,-2)||mt(W,G))continue}const Pt=[...l.slice(0,g-2),G,j];c.points=Pt;const Q=c.labelNodeId;if(Q){const W=e.get(Q);if(W){const et=W.width??0,at=W.height??0;if(et>0&&at>0){let gt,xt,vt=-1;for(let Vt=0;Vt<Pt.length-1;Vt++){const jt=Pt[Vt],Ut=Pt[Vt+1],te=Math.hypot(Ut.x-jt.x,Ut.y-jt.y),Se=ht(jt,Ut,.001),de=ft(jt,Ut,.001);(Se&&te>=et+2||de&&te>=at+2)&&te>vt&&(vt=te,gt=(jt.x+Ut.x)/2,xt=(jt.y+Ut.y)/2)}gt!==void 0&&xt!==void 0&&(W.x=gt,W.y=xt)}}}}}d(xs,"collapseShortTerminalStub");var Z=.001,_t=8,it=Re,In=d((t,e)=>ft(t,e,Z)||ht(t,e,Z),"orthogonallyAligned");function bs(t,e){const s=d((u,p)=>{const f=u.x??0,y=u.y??0,v=p.x-f,M=p.y-y;let E=(u.width??0)/2,T=(u.height??0)/2;return Math.abs(M)*E>Math.abs(v)*T?(M<0&&(T=-T),{x:f+(M===0?0:T*v/M),y:y+T}):(v<0&&(E=-E),{x:f+E,y:y+(v===0?0:E*M/v)})},"rectIntersect"),r=d((u,p)=>{const f=pt(u.points??[]);if(f.length<2)return;const y=p?u.start:u.end,v=y?e.get(y):void 0,M=v?qt(v):void 0;if(!v||!y||!M)return;const E=p?f[0]:f[f.length-1],T=p?f[1]:f[f.length-2],m=s(v,E);let S=E;if(In(T,m)&&(S=T),ft(m,S,Z))return{edge:u,edgeId:String(u.id??""),nodeId:y,atStart:p,orientation:"V",coord:m.x,min:Math.min(m.y,S.y),max:Math.max(m.y,S.y),boundary:m,railEnd:S,rect:M};if(ht(m,S,Z))return{edge:u,edgeId:String(u.id??""),nodeId:y,atStart:p,orientation:"H",coord:m.y,min:Math.min(m.x,S.x),max:Math.max(m.x,S.x),boundary:m,railEnd:S,rect:M}},"terminalLaneFor"),i=d((u,p)=>Math.max(0,Math.min(u.max,p.max)-Math.max(u.min,p.min)),"projectedOverlapLength"),c=d((u,p)=>u.nodeId!==p.nodeId||u.orientation!==p.orientation?!1:u.orientation==="H"?(Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1)&&ft(u.boundary,p.boundary,1):(Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1)&&ht(u.boundary,p.boundary,1),"sameTerminalFace"),a=d((u,p)=>u.nodeId!==p.nodeId||u.orientation!==p.orientation?!1:i(u,p)>=_t&&Math.abs(u.coord-p.coord)<.5,"exactTerminalLaneConflict"),l=d((u,p)=>{if(u.nodeId!==p.nodeId||u.orientation!==p.orientation||u.orientation!=="H"||u.atStart===p.atStart)return!1;const f=i(u,p);if(f<_t)return!1;const y=u.rect.bottom-u.rect.top;return f<y||f>2*y?!1:c(u,p)&&Math.abs(u.coord-p.coord)<16},"nearTerminalLaneConflict"),g=d((u,p)=>{const f=pt(u.edge.points??[]);if(f.length<2)return;const y=u.orientation==="V"?{x:u.boundary.x+p,y:u.boundary.y}:{x:u.boundary.x,y:u.boundary.y+p},v=u.orientation==="V"?{x:u.railEnd.x+p,y:u.railEnd.y}:{x:u.railEnd.x,y:u.railEnd.y+p};if(!d(()=>Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1?ht(y,u.boundary,Z)&&y.x>=u.rect.left+1&&y.x<=u.rect.right-1:Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1?ft(y,u.boundary,Z)&&y.y>=u.rect.top+1&&y.y<=u.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(u.atStart){const S=f.length>1&&oe(f[1],u.railEnd,Z),A=f.slice(S?2:1),R=A[0];return R&&!In(R,v)?void 0:[y,v,...A]}const E=f.length>1&&oe(f[f.length-2],u.railEnd,Z),T=f.slice(0,E?-2:-1),m=T[T.length-1];if(!(m&&!In(m,v)))return[...T,v,y]},"shiftedCandidate"),x=d(u=>{const p=u.edge,f=pt(p.points??[]);if(f.length!==2)return!1;const y=p.start,v=p.end,M=y?e.get(y):void 0,E=v?e.get(v):void 0;if(!M||!E)return!1;const T=M.x??0,m=M.y??0,S=E.x??0,A=E.y??0,[R,k]=f;return ht(R,k,Z)&&Math.abs(m-A)<1&&Math.abs(T-S)>1||ft(R,k,Z)&&Math.abs(T-S)<1&&Math.abs(m-A)>1},"laneIsStraightCollinearConnector"),I=[-7,7,-14,14,-21,21];for(let u=0;u<8;u++){const p=t.filter(y=>!y.isLayoutOnly).flatMap(y=>[r(y,!0),r(y,!1)]).filter(y=>!!y);let f=!1;for(let y=0;y<p.length&&!f;y++)for(let v=y+1;v<p.length&&!f;v++){const M=p[y],E=p[v];if(M.edge===E.edge||!(a(M,E)||l(M,E)))continue;const T=!a(M,E),m=[M,E].sort((S,A)=>{const R=x(S),k=x(A);return R!==k?Number(R)-Number(k):+!A.atStart-+!S.atStart});for(const S of m){for(const A of I){const R=g(S,A);if(!R)continue;const k=r({...S.edge,points:R},S.atStart);if(!(!k||p.some(O=>O.edge!==S.edge&&(a(k,O)||T&&l(k,O))))){S.edge.points=R,f=!0;break}}if(f)break}}if(!f)return}}d(bs,"separateSharedRenderedTerminalLanes");function Ms(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=d((c,a)=>{const l=c.start,g=c.end,x=it(a);if(x.length!==a.length-1)return!1;const I=[l,g].filter(u=>!!u);for(const u of x)if(At(u.a,u.b,o,I,-2)||At(u.a,u.b,s,[],-2))return!1;for(const u of t){if(u===c||u.isLayoutOnly)continue;const p=u.points;if(!(!p||p.length<2)){for(const f of x)for(const y of it(pt(p)))if(ce(f,y,.5)>=_t||le(f.a,f.b,y.a,y.b,Z))return!1}}return!0},"candidateIsSafe"),i=d((c,a)=>{if(a+4>=c.length)return;const l=c[a],g=c[a+1],x=c[a+2],I=c[a+3],u=c[a+4],p=Tt(l,g)&&wt(g,x)&&Tt(x,I)&&wt(I,u)&&ft(l,I,Z)&&ft(l,u,Z)&&ft(g,x,Z)&&(g.x-l.x)*(I.x-x.x)<0,f=wt(l,g)&&Tt(g,x)&&wt(x,I)&&Tt(I,u)&&ht(l,I,Z)&&ht(l,u,Z)&&ht(g,x,Z)&&(g.y-l.y)*(I.y-x.y)<0;if(p||f)return pt([...c.slice(0,a+1),u,...c.slice(a+5)]);if(a+5>=c.length)return;const y=c[a+5],v=wt(l,g)&&Tt(g,x)&&wt(x,I)&&Tt(I,u)&&wt(u,y)&&ft(l,u,Z)&&ft(l,y,Z)&&ft(x,I,Z)&&(x.x-g.x)*(u.x-I.x)<0,M=Tt(l,g)&&wt(g,x)&&Tt(x,I)&&wt(I,u)&&Tt(u,y)&&ht(l,u,Z)&&ht(l,y,Z)&&ht(x,I,Z)&&(x.y-g.y)*(u.y-I.y)<0;if(!(!v&&!M))return pt([...c.slice(0,a+1),y,...c.slice(a+6)])},"withoutDogleg");for(let c=0;c<8;c++){let a=!1;for(const l of t){if(l.isLayoutOnly)continue;const g=pt(l.points??[]);for(let x=0;x<=g.length-5;x++){const I=i(g,x);if(!(!I||!r(l,I))){l.points=I,a=!0;break}}if(a)break}if(!a)return}}d(Ms,"collapseRedundantRectangularDoglegs");function Xn(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values()),c=t.filter(p=>!p.isLayoutOnly),a=d((p,f,y)=>pt(p===f?y??[]:p.points??[]),"pointsFor"),l=d((p,f)=>{let y=0;for(let v=0;v<c.length;v++){const M=it(a(c[v],p,f));for(let E=v+1;E<c.length;E++){const T=it(a(c[E],p,f));for(const m of M)for(const S of T)le(m.a,m.b,S.a,S.b,Z)&&y++}}return y},"strictCrossingCount"),g=d(p=>{const f=it(p);if(f.length!==3)return;const y=f[1];if(!(f[0].horizontal===y.horizontal||f[2].horizontal===y.horizontal))return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),x=d((p,f)=>{const y=[p.start,p.end].filter(v=>!!v);return r.filter(v=>{if(y.includes(v.id))return!1;const M=v.rect;return f.horizontal?zt(f.a.x,f.b.x,M.left,M.right)>=_t&&f.a.y>=M.top-2&&f.a.y<=M.bottom+2:zt(f.a.y,f.b.y,M.top,M.bottom)>=_t&&f.a.x>=M.left-2&&f.a.x<=M.right+2})},"blockingRectsFor"),I=d((p,f,y)=>{const v=p.map(E=>({...E}));if(f.horizontal)v[f.index].y=y,v[f.index+1].y=y;else if(f.vertical)v[f.index].x=y,v[f.index+1].x=y;else return;const M=ae(pt(v));return it(M).length===M.length-1?M:void 0},"candidateByMovingRail"),u=d((p,f,y)=>{const v=[p.start,p.end].filter(E=>!!E),M=it(f);if(M.length!==f.length-1)return!1;for(const E of M)if(At(E.a,E.b,r,v,-2)||At(E.a,E.b,i,[],-2))return!1;for(const E of c)if(E!==p){for(const T of M)for(const m of it(a(E)))if(ce(T,m,.5)>=_t)return!1}return l(p,f)<=y},"candidateIsSafe");for(let p=0;p<8;p++){const f=l();let y=!1;for(const v of c){const M=a(v),E=g(M);if(!E)continue;const T=x(v,E.segment);if(T.length===0)continue;const m=E.horizontal?[Math.min(...T.map(S=>S.rect.top))-20,Math.max(...T.map(S=>S.rect.bottom))+20]:[Math.min(...T.map(S=>S.rect.left))-20,Math.max(...T.map(S=>S.rect.right))+20];for(const S of m){const A=I(M,E.segment,S);if(!(!A||!u(v,A,f))){v.points=A,y=!0;break}}if(y)break}if(!y)return}}d(Xn,"liftObstacleHuggingSameSideRails");function Yn(t,e){const o=d(a=>{const l=a.groupTitleRect;if(!(!l||typeof l.left!="number"||typeof l.right!="number"||typeof l.top!="number"||typeof l.bottom!="number"||!Number.isFinite(l.left)||!Number.isFinite(l.right)||!Number.isFinite(l.top)||!Number.isFinite(l.bottom)||l.right<=l.left||l.bottom<=l.top))return{left:l.left,right:l.right,top:l.top,bottom:l.bottom}},"validTitleRect"),s=d(a=>{if(!a.isGroup||a.parentId)return;const l=a.direction,g=typeof l=="string"?l.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const x=o(a),I=a.y,u=a.height;if(!x||typeof I!="number"||typeof u!="number"||!Number.isFinite(I)||!Number.isFinite(u)||u<=0)return;const p=x.right-x.left,f=x.bottom-x.top;if(!(f<=0||p<f))return{node:a,rect:x}},"topLaneTitleFor"),r=d((a,l)=>{if(!a.horizontal)return!1;const g=a.a.y;return g<=l.top+Z||g>=l.bottom-Z?!1:zt(a.a.x,a.b.x,l.left,l.right)>=_t},"horizontalSegmentIntersectsTitle"),i=[...e.values()].map(s).filter(a=>!!a);if(i.length===0)return;let c=0;for(const a of t){if(a.isLayoutOnly)continue;const l=pt(a.points??[]);for(const g of it(l))for(const x of i)r(g,x.rect)&&(c=Math.max(c,x.rect.bottom-g.a.y+4))}if(!(c<=Z))for(const a of i){const l=a.node.y,g=a.node.height;typeof l!="number"||typeof g!="number"||!Number.isFinite(l)||!Number.isFinite(g)||g<=0||(a.node.y=l-c/2,a.node.height=g+c,a.node.groupTitleRect={...a.rect,top:a.rect.top-c,bottom:a.rect.bottom-c})}}d(Yn,"liftTopLaneTitleBandsAboveRails");function Gn(t,e){const o=d(l=>{const g=l.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(l=>{if(!l.isGroup||l.parentId||l.direction!=="LR")return;const x=o(l),I=l.x,u=l.width;if(!x||typeof I!="number"||typeof u!="number"||!Number.isFinite(I)||!Number.isFinite(u)||u<=0)return;const p=x.right-x.left,f=x.bottom-x.top;if(!(p<=0||f<p))return{node:l,rect:x}},"leftLaneTitleFor"),r=d((l,g)=>{if(!l.vertical)return!1;const x=l.a.x;return x<=g.left+Z||x>=g.right-Z?!1:zt(l.a.y,l.b.y,g.top,g.bottom)>=_t},"verticalSegmentIntersectsTitle"),i=d((l,g)=>{if(!l.horizontal)return!1;const x=l.a.y;return x<=g.top+Z||x>=g.bottom-Z?!1:zt(l.a.x,l.b.x,g.left,g.right)>=_t},"horizontalSegmentIntersectsTitle"),c=[...e.values()].map(s).filter(l=>!!l);if(c.length===0)return;let a=0;for(const l of t){if(l.isLayoutOnly)continue;const g=pt(l.points??[]);for(const x of it(g))for(const I of c)if(r(x,I.rect))a=Math.max(a,I.rect.right-x.a.x+4);else if(i(x,I.rect)){const u=Math.min(x.a.x,x.b.x);a=Math.max(a,I.rect.right-u+4)}}if(!(a<=Z))for(const l of c){const g=l.node.x,x=l.node.width;typeof g!="number"||typeof x!="number"||!Number.isFinite(g)||!Number.isFinite(x)||x<=0||(l.node.x=g-a/2,l.node.width=x+a,l.node.groupTitleRect={...l.rect,left:l.rect.left-a,right:l.rect.right-a})}}d(Gn,"shiftLeftLaneTitleBandsLeftOfRails");function Is(t,e){const{realNodeRects:o}=me(e.values()),s=t.filter(p=>!p.isLayoutOnly),r=d((p,f=new Map)=>pt(f.get(p)??p.points??[]),"replacementPointsFor"),i=d((p=new Map)=>{let f=0;for(let y=0;y<s.length;y++){const v=it(r(s[y],p));for(let M=y+1;M<s.length;M++){const E=it(r(s[M],p));for(const T of v)for(const m of E)le(T.a,T.b,m.a,m.b,Z)&&f++}}return f},"crossingCount"),c=d((p=new Map)=>s.reduce((f,y)=>f+Qt(r(y,p)),0),"totalBends"),a=d(p=>{const f=r(p);if(f.length<4)return;const y=f[f.length-2],v=f[f.length-1];if(!(!Tt(y,v,Z)&&!wt(y,v,Z)))return{tailStart:y,terminal:v}},"terminalTailFor"),l=d((p,f)=>{const y=r(p);if(y.length<3)return;const v=y[0],M=y[1];let E;if(Tt(v,M,Z))E={x:M.x,y:f.tailStart.y};else if(wt(v,M,Z))E={x:f.tailStart.x,y:M.y};else return;const T=ae(pt([v,M,E,f.tailStart,f.terminal]));return it(T).length===T.length-1?T:void 0},"candidateWithDestinationTail"),g=d((p,f)=>{const y=[p.start,p.end].filter(v=>!!v);for(const v of it(f))if(At(v.a,v.b,o,y,-2))return!0;return!1},"pathHasNodeHit"),x=d((p,f,y)=>{for(const v of s)if(v!==p){for(const M of it(f))for(const E of it(r(v,y)))if(ce(M,E,.5)>=_t)return!0}return!1},"pathHasSharedTrack"),I=d((p,f,y)=>!g(p,f)&&!x(p,f,y),"candidateIsSafe"),u=d(()=>{const p=new Map;for(const f of s){const y=f.end;if(!y||!e.has(y)||r(f).length<4)continue;const M=p.get(y)??[];M.push(f),p.set(y,M)}return p},"edgesByDestination");for(let p=0;p<4;p++){const f=i();if(f===0)return;const y=c();let v,M=f,E=y;for(const T of u().values())for(let m=0;m<T.length;m++)for(let S=m+1;S<T.length;S++){const A=T[m],R=T[S],k=a(A),O=a(R);if(!k||!O)continue;const _=l(A,O),H=l(R,k);if(!_||!H)continue;const P=new Map([[A,_],[R,H]]);if(!I(A,_,P)||!I(R,H,P))continue;const G=i(P),j=c(P);G>=f||G>M||G===M&&j>=E||(v=P,M=G,E=j)}if(!v)return;for(const[T,m]of v)T.points=m}}d(Is,"swapDestinationTerminalTailsToReduceCrossings");function Ss(t,e){const{realNodeRects:r,labelNodeRects:i}=me(e.values()),c=t.filter(T=>!T.isLayoutOnly),a=d((T,m=new Map)=>pt(m.get(T)??T.points??[]),"replacementPointsFor"),l=d((T=new Map)=>{let m=0;for(let S=0;S<c.length;S++){const A=it(a(c[S],T));for(let R=S+1;R<c.length;R++){const k=it(a(c[R],T));for(const O of A)for(const _ of k)le(O.a,O.b,_.a,_.b,Z)&&m++}}return m},"strictCrossingCount"),g=d((T=new Map)=>c.reduce((m,S)=>m+Qt(a(S,T)),0),"totalBends"),x=d(T=>{const m=T.start,S=T.end,A=m?e.get(m):void 0,R=S?e.get(S):void 0,k=A?qt(A):void 0,O=R?qt(R):void 0;return k&&O?{src:k,dst:O}:void 0},"endpointRectsFor"),I=d((T,m,S)=>{if(S.index<=0||S.index+1>=m.length-1)return;const A=x(T);if(A){if(S.vertical){const R=S.a.x,k=Math.min(A.src.left,A.dst.left),O=Math.max(A.src.right,A.dst.right),_=R<k-Z?"left":R>O+Z?"right":void 0;return _?{edge:T,points:m,segmentIndex:S.index,axis:"vertical",side:_,coord:R,min:Math.min(S.a.y,S.b.y),max:Math.max(S.a.y,S.b.y)}:void 0}if(S.horizontal){const R=S.a.y,k=Math.min(A.src.top,A.dst.top),O=Math.max(A.src.bottom,A.dst.bottom),_=R<k-Z?"top":R>O+Z?"bottom":void 0;return _?{edge:T,points:m,segmentIndex:S.index,axis:"horizontal",side:_,coord:R,min:Math.min(S.a.x,S.b.x),max:Math.max(S.a.x,S.b.x)}:void 0}}},"externalRailForSegment"),u=d(()=>{const T=[];for(const m of c){const S=a(m);for(const A of it(S)){const R=I(m,S,A);R&&T.push(R)}}return T},"collectExternalRails"),p=d((T,m)=>T.edge!==m.edge&&T.axis===m.axis&&T.side===m.side&&zt(T.min,T.max,m.min,m.max)>=_t,"railsInteract"),f=d(T=>{const m=[],S=new Set;for(const A of T){if(S.has(A))continue;const R=[A],k=[];for(S.add(A);R.length>0;){const O=R.pop();k.push(O);for(const _ of T)!S.has(_)&&p(O,_)&&(S.add(_),R.push(_))}k.length>1&&m.push(k)}return m},"connectedComponents"),y=d(T=>{const m=[];for(const S of T)m.some(A=>Math.abs(A-S.coord)<Z)||m.push(S.coord);for(;m.length<T.length;){const S=Math.min(...m),A=Math.max(...m),R=T[0].side;m.push(R==="left"||R==="top"?S-12*(T.length-m.length):A+12*(T.length-m.length))}return m},"uniqueCoordsFor"),v=d(T=>{const m=T.map(R=>R.coord),S=y(T),A=[];if(T.length<=6){const R=new Array(S.length).fill(!1),k=[],O=d(()=>{if(k.length===T.length){k.some((_,H)=>Math.abs(_-m[H])>=Z)&&A.push([...k]);return}for(const[_,H]of S.entries())R[_]||(R[_]=!0,k.push(H),O(),k.pop(),R[_]=!1)},"visit");return O(),A}for(let R=0;R<m.length;R++)for(let k=R+1;k<m.length;k++){const O=[...m];[O[R],O[k]]=[O[k],O[R]],A.push(O)}return A},"coordinateAssignmentsFor"),M=d((T,m)=>{const S=new Map;for(const[R,k]of T.entries()){const O=m[R],_=S.get(k.edge)??k.points.map(H=>({x:H.x,y:H.y}));k.axis==="vertical"?(_[k.segmentIndex].x=O,_[k.segmentIndex+1].x=O):(_[k.segmentIndex].y=O,_[k.segmentIndex+1].y=O),S.set(k.edge,_)}const A=new Map;for(const[R,k]of S){const O=ae(pt(k));if(it(O).length!==O.length-1)return;A.set(R,O)}return A},"replacementsForAssignment"),E=d(T=>{for(const[m,S]of T){const A=[m.start,m.end].filter(R=>!!R);for(const R of it(S))if(At(R.a,R.b,r,A,-2)||At(R.a,R.b,i,[],-2))return!1}for(let m=0;m<c.length;m++){const S=c[m],A=T.has(S),R=it(a(S,T));for(let k=m+1;k<c.length;k++){const O=c[k];if(!A&&!T.has(O))continue;const _=it(a(O,T));for(const H of R)for(const P of _)if(ce(H,P,.5)>=_t)return!1}}return!0},"candidateIsSafe");for(let T=0;T<4;T++){const m=l();if(m===0)return;let S,A=m,R=g(),k=Number.POSITIVE_INFINITY;for(const O of f(u()))for(const _ of v(O)){const H=M(O,_);if(!H||!E(H))continue;const P=l(H);if(P>=m)continue;const G=g(H),j=O.reduce((J,dt,mt)=>J+Math.abs(_[mt]-dt.coord),0);P>A||P===A&&(G>R||G===R&&j>=k)||(S=H,A=P,R=G,k=j)}if(!S)return;for(const[O,_]of S)O.points=_}}d(Ss,"reassignCrossingExternalRailChannels");function Cs(t,e){const{realNodeRects:o,labelNodeRects:s}=me(e.values()),r=t.filter(u=>!u.isLayoutOnly),i=d((u,p,f)=>pt(u===p?f??[]:u.points??[]),"pointsFor"),c=d(u=>it(u).reduce((p,f)=>{const y=f.a.x-f.b.x,v=f.a.y-f.b.y;return p+Math.hypot(y,v)},0),"pathLength"),a=d((u,p)=>{let f=0;for(let y=0;y<r.length;y++){const v=it(i(r[y],u,p));for(let M=y+1;M<r.length;M++){const E=it(i(r[M],u,p));for(const T of v)for(const m of E)le(T.a,T.b,m.a,m.b,Z)&&f++}}return f},"strictCrossingCount"),l=d((u,p)=>{if(u.horizontal){const f=u.a.y;return(Math.abs(f-p.top)<1||Math.abs(f-p.bottom)<1)&&zt(u.a.x,u.b.x,p.left,p.right)>=_t}if(u.vertical){const f=u.a.x;return(Math.abs(f-p.left)<1||Math.abs(f-p.right)<1)&&zt(u.a.y,u.b.y,p.top,p.bottom)>=_t}return!1},"segmentRunsAlongRectBorder"),g=d(u=>{const p=[u.start,u.end].filter(y=>!!y),f=[];for(const y of p){const v=e.get(y),M=v?qt(v):void 0;M&&f.push(M)}return f},"endpointRectsFor"),x=d((u,p)=>{if(p+3>=u.length)return[];const f=u[p],y=u[p+1],v=u[p+2],M=u[p+3],E=Tt(f,y,Z)&&wt(y,v,Z)&&Tt(v,M,Z),T=wt(f,y,Z)&&Tt(y,v,Z)&&wt(v,M,Z);if(!E&&!T)return[];if(!(E?Math.sign(y.x-f.x)!==Math.sign(M.x-v.x):Math.sign(y.y-f.y)!==Math.sign(M.y-v.y)))return[];const S=ft(f,M,Z)||ht(f,M,Z)?[]:[{x:f.x,y:M.y},{x:M.x,y:f.y}],A=S.length===0?[[...u.slice(0,p+1),...u.slice(p+3)]]:S.map(k=>[...u.slice(0,p+1),k,...u.slice(p+3)]),R=new Set;return A.map(k=>ae(pt(k))).filter(k=>{if(it(k).length!==k.length-1||!k.some(_=>oe(_,M,Z)))return!1;const O=k.map(_=>`${_.x.toFixed(3)},${_.y.toFixed(3)}`).join("|");return R.has(O)?!1:(R.add(O),!0)})},"shortcutCandidatesAt"),I=d((u,p,f)=>{const y=[u.start,u.end].filter(M=>!!M),v=g(u);for(const M of it(p))if(At(M.a,M.b,o,y,-2)||At(M.a,M.b,s,[],-2)||v.some(E=>l(M,E)))return!1;for(const M of r)if(M!==u){for(const E of it(p))for(const T of it(i(M)))if(ce(E,T,.5)>=_t)return!1}return a(u,p)<=f},"candidateIsSafe");for(let u=0;u<8;u++){const p=a();let f,y,v=p,M=Number.POSITIVE_INFINITY,E=Number.POSITIVE_INFINITY;for(const T of r){const m=i(T),S=Qt(m,Z),A=c(m);for(let R=0;R<=m.length-4;R++)for(const k of x(m,R)){const O=Qt(k,Z),_=c(k);if(!(O<S||O===S&&_<A-Z)||!I(T,k,p))continue;const P=a(T,k);P>v||P===v&&(O>M||O===M&&_>=E)||(f=T,y=k,v=P,M=O,E=_)}}if(!f||!y)return;f.points=y}}d(Cs,"shortcutRedundantOrthogonalJogs");function vs(t,e){const i=[];for(const N of e.values()){if(N.isGroup||N.isEdgeLabel)continue;const F=N.x??0,D=N.y??0,V=qt(N);V&&i.push({id:String(N.id??""),cx:F,cy:D,rect:V})}if(i.length===0)return;const c=new Map(i.map(N=>[N.id,N])),a=i.map(N=>({id:N.id,rect:N.rect})),l=["top","bottom","left","right"],g={top:Math.min(...i.map(N=>N.rect.top))-20,bottom:Math.max(...i.map(N=>N.rect.bottom))+20,left:Math.min(...i.map(N=>N.rect.left))-20,right:Math.max(...i.map(N=>N.rect.right))+20},x=t.filter(N=>!N.isLayoutOnly),I=new Map(x.map((N,F)=>[N,F])),u=d(N=>{const F=N==="left"||N==="top"?-1:1,D=[];for(let V=0;V<=2;V++)D.push(g[N]+F*20*V);return D},"outwardTracksForSide"),p=d((N,F=new Map)=>pt(F.get(N)??N.points??[]),"replacementPointsFor"),f=d((N,F)=>{let D=0;for(const V of N)for(const h of F)le(V.a,V.b,h.a,h.b,Z)&&D++;return D},"crossingCountBetweenSegments"),y=d((N,F)=>f(it(N),it(F)),"crossingCountBetweenPaths"),v=d((N=new Map)=>{let F=0;const D=[],V=new Set,h=[],b=d(C=>{V.has(C)||(V.add(C),h.push(C))},"addEdge");for(let C=0;C<x.length;C++){const L=x[C],w=p(L,N);for(let B=C+1;B<x.length;B++){const U=x[B],q=y(w,p(U,N));q>0&&(F+=q,D.push({first:L,second:U,count:q}),b(L),b(U))}}return h.sort((C,L)=>(I.get(C)??0)-(I.get(L)??0)),{count:F,pairs:D,edgeSet:V,edges:h}},"crossingSnapshot"),M=d((N,F)=>{const D=new Set(F.keys());if(D.size===0)return N.count;let V=0;for(const b of N.pairs)(D.has(b.first)||D.has(b.second))&&(V+=b.count);let h=0;for(let b=0;b<x.length;b++){const C=x[b],L=D.has(C),w=p(C,F);for(let B=b+1;B<x.length;B++){const U=x[B];!L&&!D.has(U)||(h+=y(w,p(U,F)))}}return N.count-V+h},"crossingCountWithReplacements"),E=d(N=>{const F=new Map;for(const h of N.pairs){const b=F.get(h.first)??new Set;b.add(h.second),F.set(h.first,b);const C=F.get(h.second)??new Set;C.add(h.first),F.set(h.second,C)}const D=[],V=new Set;for(const h of N.edges){if(V.has(h))continue;const b=[h],C=[];for(V.add(h);b.length>0;){const L=b.pop();C.push(L);for(const w of F.get(L)??[])V.has(w)||(V.add(w),b.push(w))}C.sort((L,w)=>(I.get(L)??0)-(I.get(w)??0)),C.length>1&&D.push(C)}return D},"crossingComponents"),T=d(N=>[N.start,N.end].filter(F=>!!F),"endpointIdsFor"),m=d(N=>{const F=[];for(const D of E(N)){const V=new Set(D),h=new Set(D.flatMap(C=>T(C))),b=[...D];for(const C of x)V.has(C)||T(C).some(L=>h.has(L))&&b.push(C);b.sort((C,L)=>(I.get(C)??0)-(I.get(L)??0)),F.push(b)}return F},"pairSearchGroups"),S=d((N,F,D)=>M(N,new Map([[F,D]])),"crossingCountWithSingleReplacement"),A=d(N=>{const F=new Map;for(const D of N.pairs)F.set(D.first,(F.get(D.first)??0)+D.count),F.set(D.second,(F.get(D.second)??0)+D.count);return F},"currentCrossingsByEdge"),R=d(N=>N.slice(1).reduce((F,D,V)=>{const h=N[V];return F+Math.abs(D.x-h.x)+Math.abs(D.y-h.y)},0),"pathLength"),k=d((N=new Map)=>x.reduce((F,D)=>F+Qt(p(D,N)),0),"totalBends"),O=d((N=new Map)=>x.reduce((F,D)=>F+R(p(D,N)),0),"totalLength"),_=d((N,F,D=new Map)=>{const V=it(F);for(const h of x)if(h!==N){for(const b of V)for(const C of it(p(h,D)))if(ce(b,C,.5)>=_t)return!0}return!1},"pathHasSegmentConflict"),H=d((N,F)=>{const D=[N.start,N.end].filter(V=>!!V);for(const V of it(F))if(At(V.a,V.b,a,D,-2))return!0;return!1},"pathHitsNode"),P=d((N,F)=>{const D=ae(pt(F));it(D).length===D.length-1&&N.push(D)},"pushOrthogonalCandidate"),G=d(N=>N==="left"||N==="right","sideIsHorizontal"),j=d((N,F,D)=>{switch(F){case"left":return Math.min(N.x,D.x)-20;case"right":return Math.max(N.x,D.x)+20;case"top":return Math.min(N.y,D.y)-20;case"bottom":return Math.max(N.y,D.y)+20}},"localTrackForSameSide"),J=d((N,F,D,V)=>{const h=D==="left"||D==="top"?-1:1,b=[j(F,D,V),g[D]];for(const C of b)for(let L=0;L<=2;L++)P(N,ao(F,D,V,C+h*20*L))},"addSameSideCandidates"),dt=d((N,F,D,V,h)=>{for(const b of u(D))for(const C of u(h))P(N,[F,{x:b,y:F.y},{x:b,y:C},{x:V.x,y:C},V])},"addHorizontalToVerticalCandidates"),mt=d((N,F,D,V,h)=>{for(const b of u(D))for(const C of u(h))P(N,[F,{x:F.x,y:b},{x:C,y:b},{x:C,y:V.y},V])},"addVerticalToHorizontalCandidates"),kt=d((N,F,D,V,h)=>{const b=[...u("top"),...u("bottom")];for(const C of u(D))for(const L of u(h))for(const w of b)P(N,[F,{x:C,y:F.y},{x:C,y:w},{x:L,y:w},{x:L,y:V.y},V])},"addHorizontalPairCandidates"),Pt=d((N,F,D,V,h)=>{const b=[...u("left"),...u("right")];for(const C of u(D))for(const L of u(h))for(const w of b)P(N,[F,{x:F.x,y:C},{x:w,y:C},{x:w,y:L},{x:V.x,y:L},V])},"addVerticalPairCandidates"),Q=d(N=>{const F=new Set;return N.map(D=>pt(D)).filter(D=>{const V=D.map(h=>`${h.x.toFixed(3)},${h.y.toFixed(3)}`).join("|");return F.has(V)||D.length<2?!1:(F.add(V),!0)})},"dedupeCandidatePaths"),W=d((N,F,D,V)=>{const h=[],b=co(N,F,D,V,20,Z);b&&P(h,b),F===V&&J(h,N,F,D);const C=G(F),L=G(V);return C&&!L?dt(h,N,F,D,V):!C&&L?mt(h,N,F,D,V):C?kt(h,N,F,D,V):Pt(h,N,F,D,V),Q(h)},"buildCandidatesForSides"),et=d((N,F,D,V)=>{const h=[...u("left"),...u("right")],b=[...u("top"),...u("bottom")];for(const C of l){const L=Ie(V,C),w=C==="top"||C==="bottom"?u(C):b;for(const B of h){P(N,[F,D,{x:B,y:D.y},{x:B,y:L.y},L]);for(const U of w)P(N,[F,D,{x:B,y:D.y},{x:B,y:U},{x:L.x,y:U},L])}}},"addVerticalDepartureOuterTrackCandidates"),at=d((N,F,D,V)=>{const h=[...u("left"),...u("right")],b=[...u("top"),...u("bottom")];for(const C of l){const L=Ie(V,C),w=C==="left"||C==="right"?u(C):h;for(const B of b){P(N,[F,D,{x:D.x,y:B},{x:L.x,y:B},L]);for(const U of w)P(N,[F,D,{x:D.x,y:B},{x:U,y:B},{x:U,y:L.y},L])}}},"addHorizontalDepartureOuterTrackCandidates"),gt=d(N=>{const F=N.start,D=N.end,V=D?c.get(D):void 0;if(!F||!V)return[];const h=pt(N.points??[]);if(h.length<4)return[];const b=h[0],C=h[1],L=[];return wt(b,C,Z)?et(L,b,C,V):Tt(b,C,Z)&&at(L,b,C,V),L},"terminalPreservingOuterTrackCandidates"),xt=d(N=>{const F=N.start,D=N.end,V=F?c.get(F):void 0,h=D?c.get(D):void 0;if(!V||!h)return[];const b=[];for(const C of l){const L=Ie(V,C);for(const w of l)b.push(...W(L,C,Ie(h,w),w))}return b.push(...gt(N)),b},"candidatePathsFor"),vt=d(()=>new Map(x.map(N=>[N,it(p(N))])),"currentSegmentsByEdge"),Vt=d((N,F,D)=>{const V=new Set;for(const h of x){if(h===N)continue;const b=D.get(h)??it(p(h));F.some(C=>b.some(L=>ce(C,L,.5)>=_t))&&V.add(h)}return V},"sharedTrackConflictsFor"),jt=d((N,F,D,V)=>{const h=new Set;return xt(N).map(C=>ae(pt(C))).filter(C=>{if(H(N,C))return!1;const L=C.map(w=>`${w.x.toFixed(3)},${w.y.toFixed(3)}`).join("|");return h.has(L)||C.length<2?!1:(h.add(L),!0)}).map(C=>{const L=it(C);let w=0;for(const B of x)B!==N&&(w+=f(L,D.get(B)??it(p(B))));return{candidate:C,candidateSegments:L,crossings:F.count-(V.get(N)??0)+w,bends:Qt(C,Z),totalBends:Qt(C),length:R(C)}}).filter(({crossings:C})=>C<=F.count).sort((C,L)=>C.crossings-L.crossings||C.bends-L.bends||C.length-L.length).slice(0,48).map(C=>({path:C.candidate,segments:C.candidateSegments,sharedTrackConflicts:Vt(N,C.candidateSegments,D),totalBends:C.totalBends,length:C.length}))},"pairCandidatesFor"),Ut=d((N,F,D,V,h,b)=>{let C=0;for(const w of N.pairs)(w.first===F||w.second===F||w.first===V||w.second===V)&&(C+=w.count);let L=f(D.segments,h.segments);for(const w of x){if(w===F||w===V)continue;const B=b.get(w)??it(p(w));L+=f(D.segments,B)+f(h.segments,B)}return N.count-C+L},"pairCrossingCount"),te=d((N,F)=>{for(const D of N.sharedTrackConflicts)if(D!==F)return!1;return!0},"conflictsOnlyWith"),Se=d((N,F)=>N.segments.some(D=>F.segments.some(V=>ce(D,V,.5)>=_t)),"candidatesShareTrack"),de=d((N,F,D,V)=>te(F,D.edge)&&te(V,N.edge)&&!Se(F,V),"pairCandidatesAreCompatible"),Ce=d((N,F,D,V,h)=>{const b=Ut(N.current,F.edge,D,V.edge,h,N.baseSegments);if(!(b>=N.current.count))return{replacements:new Map([[F.edge,D.path],[V.edge,h.path]]),crossings:b,bends:N.currentBends-(N.baseBendsByEdge.get(F.edge)??0)-(N.baseBendsByEdge.get(V.edge)??0)+D.totalBends+h.totalBends,length:N.currentLength-(N.baseLengthByEdge.get(F.edge)??0)-(N.baseLengthByEdge.get(V.edge)??0)+D.length+h.length}},"scorePairReplacement"),dn=d((N,F)=>N.crossings<F.crossings||N.crossings===F.crossings&&(N.bends<F.bends||N.bends===F.bends&&N.length<F.length),"pairScoreIsBetter"),un=d((N,F,D,V)=>{let h=V;for(const b of F.candidates)for(const C of D.candidates){if(!de(F,b,D,C))continue;const L=Ce(N,F,b,D,C);L&&dn(L,h)&&(h=L)}return h},"bestScoreForOptionPair"),hn=d(N=>{const F=k(),D=O(),V=vt(),h=A(N),b=new Map(x.map(q=>[q,Qt(p(q))])),C=new Map(x.map(q=>[q,R(p(q))])),L=new Map,w=m(N);for(const q of w)for(const z of q){if(L.has(z))continue;const Y=jt(z,N,V,h);Y.length>0&&L.set(z,{edge:z,candidates:Y})}let B={replacements:new Map,crossings:N.count,bends:F,length:D};const U={current:N,currentBends:F,currentLength:D,baseBendsByEdge:b,baseLengthByEdge:C,baseSegments:V};for(const q of w){const z=new Set(q.filter(ot=>N.edgeSet.has(ot))),Y=q.map(ot=>L.get(ot)).filter(ot=>!!ot);for(let ot=0;ot<Y.length;ot++){const rt=Y[ot];for(let st=ot+1;st<Y.length;st++){const tt=Y[st];!z.has(rt.edge)&&!z.has(tt.edge)||(B=un(U,rt,tt,B))}}}return B.replacements.size>0?B.replacements:void 0},"bestPairedReplacement");for(let N=0;N<4;N++){const F=v(),D=F.count;if(D===0)return;let V,h,b=D,C=Number.POSITIVE_INFINITY;for(const w of F.edges){const B=Qt(p(w),Z);for(const U of xt(w)){const q=H(w,U),z=!q&&_(w,U),Y=S(F,w,U),ot=Qt(U,Z);q||z||!(Y<D||Y===D&&ot<B)||Y>b||Y===b&&ot>=C||(V=w,h=U,b=Y,C=ot)}}if(V&&h){V.points=h;continue}const L=hn(F);if(!L)return;for(const[w,B]of L)w.points=B}}d(vs,"resolveRenderedOrthogonalCrossings");var pe=.001,Wr=8;function Ls(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e),s=["top","bottom","left","right"],r=20,i={top:Math.min(...o.map(f=>f.rect.top))-r,bottom:Math.max(...o.map(f=>f.rect.bottom))+r,left:Math.min(...o.map(f=>f.rect.left))-r,right:Math.max(...o.map(f=>f.rect.right))+r},c=d((f,y,v,M)=>{const E=[],T=co(f,y,v,M,r,pe);return T&&E.push(T),y===M&&E.push(ao(f,y,v,i[y])),E},"buildOrthogonalPathCandidates"),a=d((f,y)=>{for(let v=0;v<f.length-1;v++){const M=f[v],E=f[v+1];if(At(M,E,o,y,1))return!0}return!1},"pathHitsNode"),l=d((f,y,v=!1)=>{let M=0;const E=Re(f,pe),T=y.start,m=y.end;for(const S of t){if(S===y||S.isLayoutOnly)continue;const A=S.start,R=S.end;if(!v&&T&&m&&(A===T||A===m||R===T||R===m))continue;const k=S.points;if(!(!k||k.length<2))for(const O of E)for(const _ of Re(k,pe)){if(fo(O.a,O.b,_.a,_.b,pe,pe)){M++;continue}ce(O,_,pe)>=Wr&&M++}}return M},"pathConflictCount"),g=4,x=d((f,y)=>{const v=Math.abs(f.y-y.rect.top),M=Math.abs(f.y-y.rect.bottom),E=Math.abs(f.x-y.rect.left),T=Math.abs(f.x-y.rect.right);let m="top",S=v;return M<S&&(m="bottom",S=M),E<S&&(m="left",S=E),T<S&&(m="right",S=T),m},"nearestSideOfRect"),I=new Map,u=d((f,y,v)=>{const M=I.get(f)??[];M.push({side:y,edgeId:v}),I.set(f,M)},"addFaceClaim");for(const f of t){if(f.isLayoutOnly)continue;const y=f.points??[];if(y.length<1)continue;const v=f.id??"",M=f.start,E=f.end;if(M){const T=n.get(M);T&&u(M,x(y[0],T),v)}if(E){const T=n.get(E);T&&u(E,x(y[y.length-1],T),v)}}const p=d((f,y,v)=>I.get(f)?.some(M=>M.edgeId!==v&&M.side===y)??!1,"faceIsClaimed");for(const f of t){if(f.isLayoutOnly)continue;const y=f.points;if(!y||y.length<2)continue;const v=Qt(y,pe);if(v<g)continue;const M=f.start,E=f.end;if(!M||!E)continue;const T=n.get(M),m=n.get(E);if(!T||!m)continue;const S=f.id??"",A=l(y,f,!0),R=l(y,f);let k,O=A,_=v;for(const H of s){if(p(M,H,S))continue;const P=Ie(T,H);for(const G of s){if(p(E,G,S))continue;const j=Ie(m,G);for(const J of c(P,H,j,G)){if(a(J,[M,E]))continue;const dt=Qt(J,pe);if(A>0){const mt=l(J,f,!0);if(mt>O||mt===O&&dt>=_)continue;O=mt,_=dt,k=J;continue}l(J,f)>R||dt<_&&(_=dt,k=J)}}}if(k){f.points=k;const H=I.get(M);H&&I.set(M,H.filter(G=>G.edgeId!==S));const P=I.get(E);P&&I.set(E,P.filter(G=>G.edgeId!==S)),u(M,x(k[0],T),S),u(E,x(k[k.length-1],m),S)}}}d(Ls,"simplifyDetouredEdges");var Kt=.001,Po=10,Ve=7;function $n(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const i=r.x-s.x,c=r.y-s.y;if(!(Math.abs(i)+Math.abs(c)<Kt)){if(Math.abs(c)<=Kt){const l=s.x+Math.sign(i)*Po;return{left:Math.min(s.x,l),right:Math.max(s.x,l),top:s.y-Ve,bottom:s.y+Ve}}if(Math.abs(i)<=Kt){const l=s.y+Math.sign(c)*Po;return{left:s.x-Ve,right:s.x+Ve,top:Math.min(s.y,l),bottom:Math.max(s.y,l)}}return{left:Math.min(s.x,r.x),right:Math.max(s.x,r.x),top:Math.min(s.y,r.y),bottom:Math.max(s.y,r.y)}}}d($n,"markerClearanceRectFor");function Es(t){return{left:Math.min(t.left,t.right),right:Math.max(t.left,t.right),top:Math.min(t.top,t.bottom),bottom:Math.max(t.top,t.bottom)}}d(Es,"normalizeRect");function zn(t,e){const n=pt(e),o=$n(n,!0),s=$n(n,!1);return[o,s].some(r=>r&&Je(t,Es(r)))}d(zn,"labelOverlapsOwnMarker");function Ue(t,e){const n=[];for(const p of t){if(p.isLayoutOnly)continue;const f=p.points;if(!(!f||f.length<2))for(let y=0;y<f.length-1;y++)n.push({edgeId:p.id,p1:f[y],p2:f[y+1]})}const o=[],s=[];for(const p of e.values()){const f=p.isGroup,y=p.parentId;if(f&&!y){const M=qt(p);M&&s.push({id:p.id,rect:M});continue}if(f||p.isEdgeLabel)continue;const v=qt(p);v&&o.push({nodeId:p.id,rect:v})}const r=3,i=1,c=12,a=d((p,f)=>{const y=Tn(f,r);for(const{nodeId:v,rect:M}of o)if(v!==p&&Je(y,M))return!0;return!1},"labelOverlapsForeignNode"),l=d((p,f)=>{const y=Tn(f,r);for(const v of n)if(v.edgeId!==p&&cn(v.p1,v.p2,y))return!0;return!1},"labelOverlapsForeignEdge"),g=d((p,f,y)=>a(p,y)||l(f,y),"labelOverlapsAnything"),x=[],I=d(p=>{for(const{id:f,rect:y}of s)if(ts(y,p))return f},"findContainingLane"),u=d((p,f)=>x.some(y=>y.labelId!==p&&Je(f,y.rect)),"overlapsPlacedLabel");for(const p of t){if(p.isLayoutOnly)continue;const f=p.labelNodeId;if(!f)continue;const y=e.get(f);if(!y)continue;const v=p.points;if(!v||v.length<2)continue;const M=y.width??0,E=y.height??0;if(M<=0||E<=0)continue;const T=[];for(let Q=0;Q<v.length-1;Q++){const W=v[Q],et=v[Q+1],at=Math.abs(W.x-et.x),gt=Math.abs(W.y-et.y);at<Kt&><Kt||at>=Kt&>>=Kt||T.push({idx:Q,length:at+gt,orientation:at>=Kt?"horizontal":"vertical",midX:(W.x+et.x)/2,midY:(W.y+et.y)/2})}if(T.length===0)continue;const m=T.length>=3?T.filter(Q=>Q.idx>0&&Q.idx<T.length-1):T,S=m.length>0?m:T,A=M>=E?"horizontal":"vertical",R=d(Q=>[...Q].sort((W,et)=>{const at=W.orientation===A,gt=et.orientation===A;if(at!==gt)return at?-1:1;const xt=W.length>=(W.orientation==="horizontal"?M:E)+2,vt=et.length>=(et.orientation==="horizontal"?M:E)+2;return xt!==vt?xt?-1:1:et.length-W.length}),"rankSegments"),k=T[0],O=T[T.length-1],_=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((Q,W)=>{const et=v[Q.idx],at=v[Q.idx+1];return{midX:et.x+(at.x-et.x)*W,midY:et.y+(at.y-et.y)*W}},"anchorAtT"),P=d((Q,W,et)=>Math.min(et,Math.max(W,Q)),"clamp"),G=d((Q,W)=>Q.midX>=W.left-Kt&&Q.midX<=W.right+Kt&&Q.midY>=W.top-Kt&&Q.midY<=W.bottom+Kt,"pointInsideRectInclusive"),j=d(Q=>{const W=Ae(Q.midX,Q.midY,M,E),et=I(W);if(et)return{laneId:et,anchor:Q,rect:W};const at=s.find(({rect:te})=>G(Q,te));if(!at)return;const gt=at.rect.left+M/2+i,xt=at.rect.right-M/2-i,vt=at.rect.top+E/2+i,Vt=at.rect.bottom-E/2-i;if(gt>xt||vt>Vt)return;const jt={midX:P(Q.midX,gt,xt),midY:P(Q.midY,vt,Vt)},Ut=Ae(jt.midX,jt.midY,M,E);return G(Q,Ut)?{laneId:at.id,anchor:jt,rect:Ut}:void 0},"placementForAnchor"),J=d((Q,W,et)=>Q.orientation==="horizontal"?Math.abs(W.midX-et.x):Math.abs(W.midY-et.y),"distanceAlongSegment"),dt=d((Q,W)=>{const at=(Q.orientation==="horizontal"?M/2:E/2)+c;if(Q===k){const gt=v[Q.idx];if(J(Q,W,gt)+Kt<at)return!1}if(Q===O){const gt=v[Q.idx+1];if(J(Q,W,gt)+Kt<at)return!1}return!0},"labelClearsTerminalEndpoints"),mt=d(Q=>{const W=R(Q);for(const et of W)for(const at of _){const gt=H(et,at);if(!dt(et,gt))continue;const xt=j(gt);if(xt&&!zn(xt.rect,v)&&!u(f,xt.rect)&&!g(f,p.id,xt.rect))return{laneId:xt.laneId,anchor:xt.anchor}}},"tryPool"),kt=d((Q,W,et=!1)=>{const at=R(Q);for(const gt of at){const xt={midX:gt.midX,midY:gt.midY};if(W&&!dt(gt,xt))continue;const vt=j(xt);if(vt&&!zn(vt.rect,v)&&!u(f,vt.rect)&&!a(f,vt.rect)&&(et||!l(p.id,vt.rect)))return{laneId:vt.laneId,anchor:vt.anchor}}},"findLaneContainingFallback"),Pt=mt(S)??(S.length<T.length?mt(T):void 0)??kt(T,!0)??kt(T,!1)??kt(T,!1,!0);if(Pt){y.x=Pt.anchor.midX,y.y=Pt.anchor.midY,y.parentId=Pt.laneId;const Q=Ae(Pt.anchor.midX,Pt.anchor.midY,M,E),W=x.findIndex(et=>et.labelId===f);W>=0?x[W]={labelId:f,rect:Q}:x.push({labelId:f,rect:Q})}}}d(Ue,"anchorLabelsToPolyline");var Sn=1e-6,Kr=8,Bo=Kr/2,qr=3;function Vn(t,e){return t<e?`${t}::${e}`:`${e}::${t}`}d(Vn,"pairKey");function Ts(t,e){const{nodeInfoById:n,realNodeRects:o}=an(e),s=new Map;for(const i of e){const c=i.id;if(!i.isGroup&&i.isEdgeLabel){s.set(c,{w:i.width??0,h:i.height??0});continue}}const r=d((i,c,a,l)=>{const g=Vn(c,a);let x=0;const I=d(u=>{if(!u)return;const p=s.get(u);if(!p)return;const f=l==="x"?p.w/2:p.h/2;f>x&&(x=f)},"consider");I(i.labelNodeId);for(const u of t){if(u===i||u.isLayoutOnly)continue;const p=u.start,f=u.end;!p||!f||Vn(p,f)===g&&I(u.labelNodeId)}return x>0?x+qr:0},"labelClearanceFor");for(const i of t){if(i.isLayoutOnly)continue;const c=i.points;if(!ro(c,Sn))continue;const a=lo(i,n,Sn);if(!a)continue;const{srcId:l,dstId:g,srcInfo:x,dstInfo:I,collinearX:u,collinearY:p}=a;if(u===p)continue;let f,y;if(u){const m=I.cy>x.cy;f={x:x.cx,y:m?x.rect.bottom:x.rect.top},y={x:I.cx,y:m?I.rect.top:I.rect.bottom}}else{const m=I.cx>x.cx;f={x:m?x.rect.right:x.rect.left,y:x.cy},y={x:m?I.rect.left:I.rect.right,y:I.cy}}if(At(f,y,o,[l,g],1))continue;const M=r(i,l,g,u?"x":"y"),E=M>Bo?M:Bo,T=[0,E,-E];for(const m of T){const S={...f},A={...y};if(u){if(S.x+=m,A.x+=m,S.x<=x.rect.left||S.x>=x.rect.right||A.x<=I.rect.left||A.x>=I.rect.right)continue}else if(S.y+=m,A.y+=m,S.y<=x.rect.top||S.y>=x.rect.bottom||A.y<=I.rect.top||A.y>=I.rect.bottom)continue;if(!At(S,A,o,[l,g],1)&&!Ze(S,A,t,i,{epsilon:Sn})){i.points=[S,A];break}}}}d(Ts,"straightenCollinearSiblingDetours");function jn(t,e){const{realNodeRects:a,labelNodeRects:l}=me(e.values()),g=d((m,S)=>Re(S,.001).map(A=>({...A,edge:m,interior:A.index>=1&&A.index<=S.length-3})),"segmentsFor"),x=d(()=>{const m=[];for(const S of t){if(S.isLayoutOnly)continue;const A=S.points;!A||A.length<2||m.push(...g(S,pt(A)))}return m},"allSegments"),I=d((m,S)=>m.horizontal&&S.horizontal?zt(m.a.x,m.b.x,S.a.x,S.b.x)>=8&&Math.abs(m.a.y-S.a.y)<7:m.vertical&&S.vertical?zt(m.a.y,m.b.y,S.a.y,S.b.y)>=8&&Math.abs(m.a.x-S.a.x)<7:!1,"hasCrowdedParallelTrack"),u=d((m,S)=>{const A=m.start,R=m.end,k=g(m,S);if(k.length!==S.length-1)return!1;const O=[A,R].filter(H=>!!H),_=m.labelNodeId?[m.labelNodeId]:[];for(const H of k)if(At(H.a,H.b,a,O,-2)||At(H.a,H.b,l,_,-2))return!1;for(const H of t){if(H===m||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of k)for(const j of g(H,pt(P)))if(I(G,j)||le(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),p=d((m,S)=>{const A=pt(m.edge.points??[]);if(A.length<4||m.index>=A.length-1)return;const R=A.map(k=>({...k}));if(m.horizontal)R[m.index].y+=S,R[m.index+1].y+=S;else if(m.vertical)R[m.index].x+=S,R[m.index+1].x+=S;else return;return g(m.edge,R).length===R.length-1?R:void 0},"shiftedCandidate"),f=d((m,S)=>({x:m.x??(S.left+S.right)/2,y:m.y??(S.top+S.bottom)/2}),"nodeCenter"),y=d(m=>{const S=m.edge,A=pt(S.points??[]);if(A.length!==4||m.index!==1)return;const R=S.start?e.get(S.start):void 0,k=S.end?e.get(S.end):void 0,O=R?qt(R):void 0,_=k?qt(k):void 0,H=A.slice(m.index+2);if(!(!R||!k||!O||!_||H.length===0))return{sourceCenter:f(R,O),targetCenter:f(k,_),sourceRect:O,tail:H}},"sourceDetourContextFor"),v=d((m,S,A,R,k,O)=>{const _=R.y>=A.y,H=_?k.bottom:k.top,P=H+(_?20:-20);if(_&&m.b.y<=P+.001||!_&&m.b.y>=P-.001)return;const G=m.a.x+S;return pt([{x:A.x,y:H},{x:A.x,y:P},{x:G,y:P},{x:G,y:m.b.y},...O],.001)},"verticalSourceDetour"),M=d((m,S,A,R,k,O)=>{const _=R.x>=A.x,H=_?k.right:k.left,P=H+(_?20:-20);if(_&&m.b.x<=P+.001||!_&&m.b.x>=P-.001)return;const G=m.a.y+S;return pt([{x:H,y:A.y},{x:P,y:A.y},{x:P,y:G},{x:m.b.x,y:G},...O],.001)},"horizontalSourceDetour"),E=d((m,S)=>{const A=y(m);if(A){if(m.vertical)return v(m,S,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail);if(m.horizontal)return M(m,S,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail)}},"sourceDetourCandidate"),T=[-7,7,-14,14,-21,21];for(let m=0;m<12;m++){const S=x();let A=!1;for(let R=0;R<S.length&&!A;R++)for(let k=R+1;k<S.length&&!A;k++){const O=S[R],_=S[k];if(O.edge===_.edge||!I(O,_))continue;const H=[O,_].filter(P=>P.interior);for(const P of H){for(const G of T){const j=p(P,G);if(j&&u(P.edge,j)){P.edge.points=j,A=!0;break}const J=E(P,G);if(J&&u(P.edge,J)){P.edge.points=J,A=!0;break}}if(A)break}}if(!A)return}}d(jn,"nudgeSharedInteriorSubpaths");function ws(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,c=o.y-n.y,a=s*c-r*i;if(Math.abs(a)<1e-10)return!1;const l=n.x-t.x,g=n.y-t.y,x=(l*c-g*i)/a,I=(l*r-g*s)/a,u=.01;return x>u&&x<1-u&&I>u&&I<1-u}d(ws,"segmentsIntersect");function As(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=es(e),r=[];for(const c of n){if(c.isLayoutOnly)continue;const a=c.points;if(!a||a.length<2)continue;const l=c.start,g=c.end,x=c.labelNodeId,I=c.id??`${l}->${g}`;for(const u of s)if(!(u.nodeId===l||u.nodeId===g)&&!(x&&u.nodeId===x)){for(let p=0;p<a.length-1;p++)if(cn(a[p],a[p+1],u,-1)){o.push({type:"edge-node-overlap",edgeId:I,targetId:u.nodeId,detail:`segment ${p} passes through node "${u.nodeId}"`});break}}for(let u=0;u<a.length-1;u++)r.push({edgeId:I,start:l,end:g,p1:a[u],p2:a[u+1]})}const i=new Set;for(let c=0;c<r.length;c++)for(let a=c+1;a<r.length;a++){const l=r[c],g=r[a];if(l.edgeId!==g.edgeId&&!(l.start===g.start||l.start===g.end||l.end===g.start||l.end===g.end)&&ws(l.p1,l.p2,g.p1,g.p2)){const x=l.edgeId<g.edgeId?`${l.edgeId}|${g.edgeId}`:`${g.edgeId}|${l.edgeId}`;i.has(x)||(i.add(x),o.push({type:"edge-edge-crossing",edgeId:l.edgeId,targetId:g.edgeId,detail:`edges "${l.edgeId}" and "${g.edgeId}" cross`}))}}if(o.length>0){const c=o.filter(l=>l.type==="edge-node-overlap").length,a=o.filter(l=>l.type==="edge-edge-crossing").length;Ke.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${c} edge-node overlap(s), ${a} edge crossing(s)`);for(const l of o)Ke.warn(`[SWIMLANE_VALIDATE] ${l.type}: ${l.detail}`)}return o}d(As,"validateSwimlanesLayout");function Rs(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(c=>!c.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!ms(t,e)||e==="BT"&&s.length>0&&!ps(t))return;for(const c of o){if(c.isLayoutOnly)continue;const a=c.points;!a||a.length<2||(c.points=ae(Qe(a)))}Ls(o,n),Ts(o,n),ys(o,n);const r=new Map;for(const c of n)r.set(String(c.id),c);Ue(o,r),is(o,r),xs(o,r),jn(o,r),bs(o,r),Ms(o,r),Xn(o,r),Is(o,r);const i=d(()=>{vs(o,r),Ss(o,r),Cs(o,r),Ue(o,r),Dn(o,r),Xn(o,r),Ue(o,r),Dn(o,r)},"finalizeRenderedEdges");i(),jn(o,r),i(),Yn(o,r),Gn(o,r),Yn(o,r),Gn(o,r)}d(Rs,"postProcessSwimlaneLayout");function ye(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const i=`${r.id}:${r.src}->${r.dst}`;n.has(i)||(n.add(i),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(ye,"normalizeGraph");function mo(t,e){return t.edges.filter(n=>n.dst===e)}d(mo,"incoming");function Ns(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(Ns,"buildSuccessorMap");function yo(t){const e=Ns(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(yo,"buildSortedSuccessorMap");function xo(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(xo,"buildInDegreeMap");function bo(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(bo,"sortedZeroInDegreeNodes");function ln(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(ln,"buildPredecessorSuccessorMaps");function Mo(t,e,n,o){let s=0;for(const i of t.nodes)o?.skipGroups&&t.nodeById.get(i)?.isGroup||(s=Math.max(s,n[i]??0));const r=Array.from({length:s+1},()=>[]);for(const i of e)o?.skipGroups&&t.nodeById.get(i)?.isGroup||r[Math.max(0,n[i]??0)].push(i);return r}d(Mo,"buildLayersFromRanks");function Be(t){const e=xo(t),n=bo(e),o=[],s=yo(t);for(;n.length;){const r=n.shift();o.push(r);for(const i of s.get(r)??[])if(e.set(i,(e.get(i)??0)-1),(e.get(i)??0)===0){let c=0;for(;c<n.length&&n[c]<i;)c++;n.splice(c,0,i)}}return o.length===t.nodes.length?o:null}d(Be,"topoSortIfAcyclic");function Ne(t){const e=new Map;let n=0;for(const o of t)e.set(o,n),n++;return e}d(Ne,"buildLayerIndex");function Io(t){const e=new Array(t.length),n=d((o,s)=>{if(s-o<=1)return 0;const r=o+s>>1;let i=n(o,r)+n(r,s),c=o,a=r,l=o;for(;c<r||a<s;)a>=s||c<r&&t[c]<=t[a]?e[l++]=t[c++]:(e[l++]=t[a++],i+=r-c);for(let g=o;g<s;g++)t[g]=e[g];return i},"count");return n(0,t.length)}d(Io,"countInversions");function Os(t){const e=ye(t),n=new Map;for(const g of e.nodes)n.set(g,[]);for(const g of e.edges)n.get(g.src).push(g);for(const g of n.values())g.sort((x,I)=>x.dst===I.dst?x.id.localeCompare(I.id):x.dst.localeCompare(I.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const x of n.get(g)??[]){const I=x.dst;o[I]===0?r(I):o[I]===1&&s.push(x)}o[g]=2},"dfs"),i=[...e.nodes].sort((g,x)=>g.localeCompare(x));for(const g of i)o[g]===0&&r(g);const c=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),a=e.edges.map(g=>c.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:a,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(Os,"removeCycles_DFS");function Ps(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const c=n(r)??r;return e.set(o,c),c},"resolve");for(const o of t.nodes)n(o);return e}d(Ps,"buildTopLaneMap");function fe(t){const e=Ps(t);return n=>e.get(n)??null}d(fe,"createTopLaneResolver");function fn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(fn,"buildTopLaneOrder");function So(t,e){const n=fn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const i of e)!o.has(i)||s.has(i)||(s.add(i),r.push(i));for(const i of n)s.has(i)||r.push(i);return r}d(So,"resolveTopLaneOrder");var Jr={EPSILON:1e-6},sn={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},ko={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Bs(t,e){const n=ye(t),o=e?.laneOf??(()=>null),s=e?.rankHint,{preds:r}=ln(n);for(const m of r.values())m.sort((S,A)=>S.localeCompare(A));const i=Be(n)??[...n.nodes].sort((m,S)=>m.localeCompare(S)),c=new Map;for(const[m,S]of i.entries())c.set(S,m);const a=new Map,l=new Map;for(const m of n.nodes)l.set(m,[]);for(const m of i){const S=(r.get(m)??[]).filter(A=>a.has(A));if(S.length>0){const A=ks(m,S,{laneOf:o,rankHint:s,topoIndex:c});a.set(m,A),l.get(A).push(m)}else a.has(m)||a.set(m,null)}for(const m of n.nodes)a.has(m)||a.set(m,null);const g=new Set;for(const m of n.nodes)(a.get(m)??null)===null&&g.add(m);const x=[...g].sort((m,S)=>{const A=c.get(m)??0,R=c.get(S)??0;return A===R?m.localeCompare(S):A-R}),I=_s(n),u=new Map;for(const[m,S]of I.entries())u.set(m,[...S].sort((A,R)=>A.localeCompare(R)));const p=Fs(u),f=Ds(u),y=new Map;for(const m of n.nodes)y.set(m,[]);for(const m of f)for(const S of m.nodes){const A=y.get(S);A?A.push(m.id):y.set(S,[m.id])}const v=[],M=[],E=new Set,T=d(m=>{if(!E.has(m)){E.add(m),v.push(m);for(const S of l.get(m)??[])T(S);M.push(m)}},"walk");for(const m of x)T(m);for(const m of i)T(m);return{parent:a,children:l,roots:x,componentOf:p,blocks:f,nodeBlocks:y,adjacency:u,preorder:v,postorder:M,topologicalOrder:i}}d(Bs,"buildDrivingTree");function ks(t,e,n){const o=n.laneOf(t);return[...e].sort((r,i)=>{const c=n.laneOf(r),a=n.laneOf(i),l=c!=null&&c===o,g=a!=null&&a===o;if(l!==g)return l?-1:1;const x=n.rankHint?.[r],I=n.rankHint?.[i];if(x!=null&&I!=null&&x!==I)return I-x;const u=n.topoIndex.get(r)??0,p=n.topoIndex.get(i)??0;return u!==p?u-p:r.localeCompare(i)})[0]}d(ks,"chooseParent");function _s(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(_s,"buildAdjacency");function Fs(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const i of t.get(r)??[])e.has(i)||s.push(i)}}n++}return e}d(Fs,"assignComponents");function Ds(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const i=d((c,a)=>{e.set(c,++r),n.set(c,r);for(const l of t.get(c)??[])l!==a&&(e.has(l)?(e.get(l)??0)<(e.get(c)??0)&&(o.push([c,l]),n.set(c,Math.min(n.get(c)??r,e.get(l)??r))):(o.push([c,l]),i(l,c),n.set(c,Math.min(n.get(c)??r,n.get(l)??r)),(n.get(l)??0)>=(e.get(c)??0)&&s.push(Hs(c,l,o,s.length))))},"visit");for(const c of t.keys())e.has(c)||i(c,null);return s}d(Ds,"computeBlocks");function Hs(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const i=n.pop();if(s.push(i),r.add(i[0]),r.add(i[1]),i[0]===t&&i[1]===e||i[0]===e&&i[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d(Hs,"popBlock");function Xs(t,e,n){const o=[...t.nodes],s=new Map;for(const[M,E]of o.entries())s.set(E,M);const r=o.length,i=new Array(r).fill(-1),c=new Array(r).fill(0),a=[],l=new Set;for(const M of o){const E=n.parent.get(M)??null,T=s.get(M);T!=null&&E==null&&(i[T]=-1,c[T]=0,l.has(M)||(l.add(M),a.push(M)))}for(;a.length>0;){const M=a.shift(),E=s.get(M);if(E==null)continue;const T=n.children.get(M)??[];for(const m of T){if(l.has(m))continue;const S=s.get(m);S!=null&&(i[S]=E,c[S]=c[E]+1,l.add(m),a.push(m))}}for(const M of o){if(l.has(M))continue;const E=s.get(M);E!=null&&(i[E]=-1,c[E]=0,l.add(M))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),x=Array.from({length:g},()=>new Array(r).fill(-1));for(let M=0;M<r;M++)x[0][M]=i[M];for(let M=1;M<g;M++)for(let E=0;E<r;E++){const T=x[M-1][E];x[M][E]=T===-1?-1:x[M-1][T]}const I=d((M,E)=>{if(M===-1||E===-1)return-1;c[M]<c[E]&&([M,E]=[E,M]);const T=c[M]-c[E];for(let m=0;m<g;m++)if(T>>m&1&&(M=x[m][M],M===-1))return-1;if(M===E)return M;for(let m=g-1;m>=0;m--){const S=x[m][M],A=x[m][E];S===-1||A===-1||S!==A&&(M=S,E=A)}return x[0][M]},"lcaIndex"),u=Array.from({length:r},()=>new Map);for(const M of t.edges){let E=M.src,T=M.dst,m=e[E],S=e[T];if(m==null||S==null||(m>S&&([E,T]=[T,E],[m,S]=[S,m]),m==null||S==null||m===S))continue;const A=s.get(E),R=s.get(T);if(A==null||R==null)continue;const k=I(A,R);if(k===-1)continue;const O=u[k];for(let _=m;_<S;_++)O.set(_,(O.get(_)??0)+1)}const p=new Map,f=d((M,E)=>{if(E.size!==0)for(const[T,m]of E)M.set(T,(M.get(T)??0)+m)},"mergeInto"),y=new Set,v=d(M=>{const E=s.get(M);y.add(M);const T=E==null?void 0:u[E],m=T?new Map(T):new Map,S=n.children.get(M)??[];for(const A of S){const R=v(A),k=e[M];if(k!=null){let O=p.get(M);O||(O=new Map,p.set(M,O));let _=R.get(k)??0;const H=e[A];H!=null&&H>k&&(_+=1),O.set(A,_)}f(m,R)}return m},"dfs");for(const M of n.roots)y.has(M)||v(M);for(const M of o)y.has(M)||v(M);return p}d(Xs,"computeSubtreeCrossCounts");function Ys(t,e,n){const o=new Map,s=d(r=>{let i=n[r]??0;const c=[...e.get(r)??[]];c.sort(Co(n));for(const a of c){s(a);const l=o.get(a);l!=null&&(i=Math.min(i,l))}o.set(r,i)},"annotate");for(const r of t)s(r);return o}d(Ys,"annotateMinimumLayers");function Co(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(Co,"compareByRankThenId");function Gs(t,e,n,o){let s=0;for(const a of e){const l=n[a]??0;l>s&&(s=l)}const r=Array.from({length:s+1},()=>[]),i=new Set,c=d(a=>{if(i.has(a))return;i.add(a);const l=n[a]??0;r[l]||(r[l]=[]),r[l].push(a);for(const g of o(a))c(g)},"emit");for(const a of t)c(a);for(const a of e)if(!i.has(a)){const l=n[a]??0;r[l]||(r[l]=[]),r[l].push(a),i.add(a)}return r}d(Gs,"emitNodesInTreeOrder");function $s(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d($s,"deduplicateLayers");function zs(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const i=e[s]??0,c=[],a=[],l=n.get(s);for(const g of r){const x=o.get(g)??i;x>i?c.push({child:g,min:x}):a.push(g)}return c.sort((g,x)=>g.min===x.min?g.child.localeCompare(x.child):g.min-x.min),a.sort((g,x)=>{const I=l?.get(g)??0,u=l?.get(x)??0;if(I!==u)return I-u;const p=o.get(g)??i,f=o.get(x)??i;return p!==f?p-f:g.localeCompare(x)}),[...c.map(g=>g.child),...a]}}d(zs,"createChildOrderer");function rn(t,e,n){const o=Bs(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const x of t.nodes)s.has(x)||s.set(x,[]);const i=Xs(t,e,o),c=[...r].sort(Co(e)),a=Ys(c,s,e),l=zs(s,e,i,a);let g=Gs(c,t.nodes,e,l);return g=$s(g),g}d(rn,"buildMultitreeLayerOrder");function Vs(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(e),i=[];for(const c of n)o.has(c.src)&&s.has(c.dst)&&i.push(r.get(c.dst));return Io(i)}d(Vs,"countCrossingsBetweenAdjacent");function Un(t,e,n){const o=[];for(const r of e){const i=n[r.src],c=n[r.dst];if(i==null||c==null||i===c)continue;let a=r.src,l=r.dst,g=i,x=c;i>c&&(a=r.dst,l=r.src,g=c,x=i);for(let I=g;I<x;I++)o.push({id:`${r.id}@${I}`,src:a,dst:l,ref:r.ref})}let s=0;for(let r=0;r+1<t.length;r++)s+=Vs(t[r],t[r+1],o);return s}d(Un,"totalCrossings");function js(t,e){const n={...e},{preds:o}=ln(t),s=fe(t),r=rn(t,n,s);let i=Un(r,t.edges,n);const c=sn.MAX_CROSSING_OPTIMIZATION_PASSES;for(let a=0;a<c;a++){let l=!1;const g=[...t.nodes].sort((x,I)=>(n[I]??0)-(n[x]??0));for(const x of g){const I=n[x]??0;if(I===0)continue;let u=0;for(const v of o.get(x)??[])u=Math.max(u,(n[v]??0)+1);if(u>=I)continue;const p=I;n[x]=u;const f=rn(t,n,s),y=Un(f,t.edges,n);y<i?(i=y,l=!0):n[x]=p}if(!l)break}return n}d(js,"optimizeRanksByCrossings");function Us(t,e){const n=fe(t),o=[...t.nodes].sort((s,r)=>(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const i=t.edges.filter(f=>f.src===s);if(i.length===0)continue;let c=!1,a=0;for(const f of i){const y=n(f.dst);y==null||y===r?c=!0:a++}if(a===0||c)continue;let l=0,g=!1;for(const f of t.edges){if(f.dst!==s)continue;const y=n(f.src);y&&(y===r?g=!0:l++)}if(l>0||!g)continue;const x=e[s]??0,I=x+a;let u=0;for(const f of t.edges)f.dst===s&&(u=Math.max(u,(e[f.src]??0)+1));const p=Math.max(x,u,I);p!==x&&(e[s]=p)}}d(Us,"adjustCrossLaneSources");function Ws(t,e){const n=ye(t),o=Be(n)??[...n.nodes].sort(),s=e?.compactSingleInput??!1,r=fe(n);let i=Object.create(null);for(const a of o){const l=mo(n,a),g=e?.ignoreCrossLaneEdges?l.filter(x=>{const I=r(x.src),u=r(a);return!I||!u?!0:I===u}):l;if(g.length===0)i[a]=0;else if(s&&g.length===1){const x=g[0].src,I=r(x),u=r(a);I!==u?i[a]=i[x]??0:i[a]=(i[x]??0)+1}else{let x=-1/0;for(const I of g)x=Math.max(x,(i[I.src]??0)+1);i[a]=x===-1/0?0:x}}return(e?.optimizeRanksByCrossings??!1)&&(i=js(n,i)),e?.ignoreCrossLaneEdges&&Us(n,i),{layers:rn(n,i,r),rankOf:i,dummy:new Set}}d(Ws,"assignLayers_LongestPath");function Ks(t,e){const n=ye(t),s={...Ws(n,{compactSingleInput:e?.compactSingleInput,ignoreCrossLaneEdges:e?.ignoreCrossLaneEdges,optimizeRanksByCrossings:e?.optimizeRanksByCrossings}).rankOf},r=fe(n),{preds:i,succs:c}=ln(n,p=>{if(e?.ignoreCrossLaneEdges){const f=r(p.src),y=r(p.dst);if(f&&y&&f!==y)return!1}return!0}),a=Be(n)??[...n.nodes],l=[...a].reverse(),g=d((p,f)=>{let y=0;for(const E of i.get(p)??[])y=Math.max(y,(s[E]??0)+1);let v=Number.POSITIVE_INFINITY;const M=c.get(p)??[];return M.length>0&&(v=Math.min(...M.map(E=>(s[E]??0)-1))),Number.isFinite(v)||(v=Math.max(y,f)),Math.min(Math.max(f,y),v)},"clampFeasible"),x=sn.GRAVITY_ITERATIONS,I=d(p=>{let f=!1;for(const y of p){const v=i.get(y)??[],M=c.get(y)??[];if(v.length===0&&M.length===0)continue;const E=v.length>0?v.reduce((A,R)=>A+(s[R]??0)+1,0)/v.length:s[y]??0,T=M.length>0?M.reduce((A,R)=>A+(s[R]??0)-1,0)/M.length:s[y]??0,m=Math.round((E+T)/2),S=g(y,m);S!==s[y]&&(s[y]=S,f=!0)}return f},"relaxOrder");for(let p=0;p<x;p++){const f=I(a),y=I(l);if(!f&&!y)break}for(const p of a){let f=0;for(const y of i.get(p)??[])f=Math.max(f,(s[y]??0)+1);(s[p]??0)<f&&(s[p]=f)}for(const p of l){const f=c.get(p)??[];if(f.length>0){const y=Math.min(...f.map(v=>(s[v]??0)-1));(s[p]??0)>y&&(s[p]=y)}}return{layers:Mo(n,a,s),rankOf:s,dummy:new Set}}d(Ks,"assignLayers_Gravity");function qs(t){const e=xo(t),n=yo(t);let o=bo(e);const s=[];for(;o.length>0;){const r=[];for(const i of o){s.push(i);for(const c of n.get(i)??[])e.set(c,(e.get(c)??0)-1),(e.get(c)??0)===0&&r.push(c)}o=r.sort((i,c)=>i.localeCompare(c))}return s.length===t.nodes.length?s:null}d(qs,"topoSortByGenerationIfAcyclic");function Js(t,e){const n=ye(t),o=e?.direction==="LR"?qs(n)??[...n.nodes].sort():Be(n)??[...n.nodes].sort(),s=fe(n),r=d(g=>s(g)??g,"laneOf"),i=Object.create(null),c=new Map,a=d((g,x)=>e?.ignoreCrossLaneEdges??!0?r(g)===r(x)?1:0:1,"edgeWeight");for(const g of o){if(n.nodeById.get(g)?.isGroup)continue;const I=mo(n,g);let u=0;if(I.length>0)for(const v of I){const M=v.src,E=i[M]??0;u=Math.max(u,E+a(M,g))}const p=r(g),f=c.get(p)??0,y=Math.max(u,f);i[g]=y,c.set(p,y+1)}return{layers:Mo(n,o,i,{skipGroups:!0}),rankOf:i,dummy:new Set}}d(Js,"assignLayers_LaneAwareCompact");function Zs(t,e){const n=ye(e),{rankOf:o}=t,s=t.layers.map(u=>[...u]),r=new Set(t.dummy?[...t.dummy]:[]);let i=0;const c=new Map(n.nodeById),a=d(u=>{const p=`placeholder-${i++}`,f={id:p,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(p,f),r.add(p);s.length<=u;)s.push([]);return s[u].push(p),o[p]=u,p},"addDummyAt"),l=[...n.edges].sort((u,p)=>u.id===p.id?u.src===p.src?u.dst.localeCompare(p.dst):u.src.localeCompare(p.src):u.id.localeCompare(p.id)),g=[];for(const u of l){const p=o[u.src]??0,f=o[u.dst]??0;if(f-p<=1){g.push(u);continue}let y=u.src;for(let M=p+1,E=0;M<f;M++,E++){const T=a(M);g.push({id:`${u.id}#${E}`,src:y,dst:T,weight:u.weight,ref:u.ref}),y=T}const v=f-p-2;g.push({id:`${u.id}#${Math.max(v+1,0)}`,src:y,dst:u.dst,weight:u.weight,ref:u.ref})}const I={nodes:[...n.nodes,...[...r].filter(u=>!n.nodes.includes(u))],edges:g,layout:n.layout,nodeById:c};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:I}}d(Zs,"makeProperLayering");function Wn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(Wn,"median");function Kn(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Kn,"barycenter");function Qs(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(Qs,"neighborPositionsFor");function tr(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(tr,"currentOrderTieBreak");function qn(t,e,n){const o=new Set(t),s=new Set(e),r=Ne(t),i=Ne(e),c=[];for(const l of n)o.has(l.src)&&s.has(l.dst)&&c.push({u:r.get(l.src),v:i.get(l.dst)});c.sort((l,g)=>l.u===g.u?l.v-g.v:l.u-g.u);const a=c.map(l=>l.v);return Io(a)}d(qn,"countCrossingsBetweenAdjacent");function We(t,e,n){return[...t].sort((o,s)=>{const r=Wn(e.get(o)??[]),i=Wn(e.get(s)??[]);return r===i?tr(o,s,n):isFinite(r)?isFinite(i)?r-i:-1:1})}d(We,"sortByHeuristic");function Jn(t,e,n,o,s,r){const i=Ne(t),c=Ne(e),a=Qs(e,i,n,o);if(!s||!r||r.length===0)return We(e,a,c);const l=new Map;for(const I of e){const u=s(I),p=l.get(u)??[];p.push(I),l.set(u,p)}const g=[];for(const I of r){const u=l.get(I);if(!u||u.length===0)continue;const p=We(u,a,c);g.push(...p)}const x=l.get(null);if(x&&x.length>0){const I=We(x,a,c);for(const u of I){const p=Kn(a.get(u)??[]);let f=g.length;if(isFinite(p))for(const[y,v]of g.entries()){const M=Kn(a.get(v)??[]);if(p<M){f=y;break}}g.splice(f,0,u)}}return g}d(Jn,"reorderLayer");function Zn(t,e,n,o,s){const r=[...e],i=new Set(t),c=new Set(e),a=o?new Set(o):null,l=n.filter(f=>i.has(f.src)&&c.has(f.dst)),g=a?n.filter(f=>c.has(f.src)&&a.has(f.dst)):void 0,x=d(f=>{let y=qn(t,f,l);return g&&o&&(y+=qn(f,o,g)),y},"crossingScore"),I=s?new Map:null;if(s&&I)for(const f of e)I.set(f,s(f));let u=!0,p=x(r);for(;u;){u=!1;for(let f=0;f+1<r.length;f++){if(I){const M=I.get(r[f]),E=I.get(r[f+1]);if(M!==E)continue}const y=p;[r[f],r[f+1]]=[r[f+1],r[f]];const v=x(r);v<y?(p=v,u=!0):[r[f],r[f+1]]=[r[f+1],r[f]]}}return r}d(Zn,"transposeImprove");function er(t,e,n){const o=t.layers.map(c=>[...c]),s=e.edges,r=fe(e),i=So(e,n?.laneOrder);for(let c=0;c<3;c++){for(let a=1;a<o.length;a++)o[a]=Jn(o[a-1],o[a],s,"down",r,i),o[a]=Zn(o[a-1],o[a],s,o[a+1],r);for(let a=o.length-2;a>=0;a--)o[a]=Jn(o[a+1],o[a],s,"up",r,i),o[a]=Zn(o[a+1],o[a],s,o[a-1],r)}return{layers:o}}d(er,"orderLayers");function nr(t,e,n){const o=n?.layerGap??ko.DEFAULT_LAYER_GAP,s=n?.nodeGap??ko.DEFAULT_NODE_GAP,r=n?.laneGap??s*2,i=n?.direction??"TB",c=i==="LR"||i==="RL",a=t.layers,l=Object.create(null),g=Object.create(null),x=d(O=>e.nodeById.get(O),"getNode"),I=d(O=>x(O)?.width??0,"getWidth"),u=d(O=>x(O)?.height??0,"getHeight"),p=fe(e),f=So(e,n?.laneOrder),y=a.map(O=>O.reduce((_,H)=>Math.max(_,u(H)),0)),v=[];if(c)for(let O=0;O+1<a.length;O++){const _=a[O].reduce((mt,kt)=>Math.max(mt,I(kt)),0),H=a[O+1].reduce((mt,kt)=>Math.max(mt,I(kt)),0),P=y[O],G=y[O+1],j=P/2+G/2,J=(_+H)/2,dt=Math.max(0,J-j-o);v.push(dt)}const M=new Set;for(const O of a)for(const _ of O)M.add(p(_));const E=M.has(null),T=f.filter(O=>M.has(O)),m=[...E?[null]:[],...T],S=Object.create(null);for(const O of T)S[O]=0;E&&(S.null=0);for(const O of a){const _=Object.create(null),H=[];for(const P of O){const G=p(P);G===null?H.push(P):(_[G]||=[]).push(P)}for(const[P,G]of Object.entries(_)){const j=G.reduce((J,dt)=>J+I(dt),0)+s*Math.max(0,G.length-1);S[P]=Math.max(S[P]??0,j)}if(E&&H.length){const P=H.reduce((G,j)=>G+I(j),0)+s*Math.max(0,H.length-1);S.null=Math.max(S.null??0,P)}}const A=new Map;{const O=m.map(P=>(P===null?S.null:S[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,m.length-1))/2;for(let P=0;P<m.length;P++){const G=m[P],j=O[P]??0,J=H+j/2;A.set(G,J),H+=j,P<m.length-1&&(H+=r)}}let R=0;for(const[O,_]of a.entries()){const H=y[O]??0,P=new Map;for(const j of _){const J=p(j),dt=P.get(J)??[];dt.push(j),P.set(J,dt)}for(const j of m){const J=P.get(j)??[];if(J.length===0)continue;const dt=A.get(j);if(J.length===1){const mt=J[0];l[mt]=dt,g[mt]=R+H/2}else{const mt=J.map(Q=>I(Q)),kt=mt.reduce((Q,W)=>Q+W,0)+s*(J.length-1);let Pt=dt-kt/2;for(const[Q,W]of J.entries()){const et=mt[Q];l[W]=Pt+et/2,g[W]=R+H/2,Pt+=et+s}}}const G=v[O]??0;R+=H+o+G}const k=new Map;for(const O of e.edges){const _=O.ref.id;k.has(_)||k.set(_,[]),k.get(_).push(O)}for(const[,O]of k){if(O.length===0)continue;const _=O[0].ref,H=_.start,P=_.end;if(H==null||P==null)continue;const G=Math.round(((l[H]??0)+(l[P]??0))/2),j=new Set;for(const J of O)j.add(J.src),j.add(J.dst);for(const J of j){if(J===H||J===P)continue;e.nodeById.get(J)?.isDummy&&(l[J]=G)}}return{x:l,y:g}}d(nr,"assignCoordinates");var or=8;function sr(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return e>>>0}d(sr,"hashString");function rr(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(rr,"mulberry32");function ir(t,e){const n=[...t],o=rr(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(ir,"deterministicShuffle");function cr(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(cr,"sourceDistance");function Qn(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:i}of e){const c=n.get(s),a=n.get(r);c==null||a==null||(o+=i*Math.abs(c-a))}return o}d(Qn,"laneArrangementCost");function ar(t){const e=fn(t);if(e.length<2)return[];const n=new Map(e.map((r,i)=>[r,i])),o=fe(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const i=typeof r.start=="string"?r.start:void 0,c=typeof r.end=="string"?r.end:void 0;if(!i||!c||!t.nodeById.has(i)||!t.nodeById.has(c))continue;const a=o(i),l=o(c);if(!a||!l||a===l)continue;const g=n.get(a),x=n.get(l);if(g==null||x==null)continue;const[I,u]=g<=x?[a,l]:[l,a],p=`${I}\0${u}`,f=s.get(p);f?f.weight++:s.set(p,{a:I,b:u,weight:1})}return[...s.values()]}d(ar,"buildWeightedLaneEdges");function to(t,e,n){const o=[...t];let s=Qn(o,e),r=!0,i=0;const c=Math.max(1,o.length);for(;r&&i<c;){r=!1,i++;for(let a=0;a+1<o.length;a++){[o[a],o[a+1]]=[o[a+1],o[a]];const l=Qn(o,e);l<s?(s=l,r=!0):[o[a],o[a+1]]=[o[a+1],o[a]]}}return{order:o,cost:s,sourceDistance:cr(o,n)}}d(to,"greedySwitch");function lr(t,e){return t.cost!==e.cost?t.cost<e.cost:t.sourceDistance<e.sourceDistance}d(lr,"isBetterCandidate");function fr(t,e,n){const o=[...e].sort((s,r)=>s.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:i})=>`${s}:${r}:${i}`).join("|");return sr(`${t.join("|")}#${o}#${n}`)}d(fr,"seedForRestart");function dr(t,e={}){const n=fn(t);if(n.length<2)return n;const o=ar(t);if(o.length===0)return n;const s=new Map(n.map((c,a)=>[c,a]));let r=to(n,o,s);const i=Math.max(0,e.restarts??or);for(let c=0;c<i;c++){const a=fr(n,o,c),l=ir(n,a),g=to(l,o,s);lr(g,r)&&(r=g)}return r.order}d(dr,"optimizeTopLaneOrder");function ur(t,e){const n=e?.ignoreCrossLaneEdges??!0,o=e?.optimizeRanksByCrossings??!0,s=ye(t),r=e?.automaticLaneOrdering?dr(s,{restarts:or}):void 0,i=Os(s),c=i.acyclic,a=n?Js(c,{compactSingleInput:e?.compactSingleInput??sn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:e?.direction}):Ks(c,{compactSingleInput:e?.compactSingleInput??sn.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:o}),{layering:l,graphWithDummies:g}=Zs(a,c),x=er(l,g,{laneOrder:r}),I=nr(x,g,{layerGap:e?.layerGap,nodeGap:e?.nodeGap,direction:e?.direction,laneOrder:r});return{acyclic:c,reversed:i.reversed,layering:l,ordered:x,coordinates:I}}d(ur,"sugiyamaLayout");var ct=Jr.EPSILON,Zr=8,be=15,Te=15,je=25,ne=20,Cn=10;function eo(t,e,n){const o=t.x??0,s=t.y??0,r=e.x-o,i=e.y-s,c=Math.abs(r),a=Math.abs(i);return c<ct&&a<ct?n:a>ct&&a*3>=c?i>0?"bottom":"top":c>ct?r>0?"right":"left":n}d(eo,"chooseOrthogonalSide");function no(t,e){return Math.abs(t.to-e.from)<ct||Math.abs(t.to-e.to)<ct?t.to:t.from}d(no,"sharedLineEndpointCoord");function Me(t,e){return t.orient==="vertical"?{x:t.coord,y:e}:{x:e,y:t.coord}}d(Me,"pointOnLine");function hr(t,e){const n=t.nodes??[],o=t.edges??[],s=[];for(const h of o)h.isLayoutOnly||s.push({...h,__originalEdge:h});const r=new Map,i=new Map,c=[],a=e==="LR";for(const h of n)r.set(h.id,h);const l=n.filter(h=>h.isGroup&&!h.parentId);for(const h of l){const b={id:h.id},C=d(L=>{i.set(L.id,b),n.filter(w=>w.parentId===L.id).forEach(C)},"assignLane");C(h)}const g=n.filter(h=>!h.isGroup&&!h.isEdgeLabel).map(h=>{const b=h.width??10,C=h.height??10,L=h.x??0,w=h.y??0,B=Zr;return{nodeId:h.id,minX:L-b/2-B,maxX:L+b/2+B,minY:w-C/2-B,maxY:w+C/2+B,visualXHalfExtent:a?C/2+B:b/2+B}}),x=d((h,b,C,L)=>{let w=c.find(B=>B.orientation===h&&Math.abs(B.coord-b)<1);return w||(w={id:`pipe-${h}-${b.toFixed(0)}`,orientation:h,coord:b,spanMin:C,spanMax:L,tracks:[]},c.push(w)),w.spanMin=Math.min(w.spanMin,C),w.spanMax=Math.max(w.spanMax,L),w},"getOrAddPipe"),I=d((h,b)=>{const C=h.width??10,L=h.height??10,w=h.x??0,B=h.y??0;switch(b){case"top":return{x:w,y:B-L/2};case"bottom":return{x:w,y:B+L/2};case"left":return{x:w-C/2,y:B};case"right":return{x:w+C/2,y:B}}},"portForSide"),u=d((h,b,C)=>I(h,eo(h,b,C?"bottom":"top")),"getOrthogonalPort"),p=[],f=[],y=new Set,v=1e3,M=d((h,b,C)=>{if(p.length===0)return 0;const L=Math.abs(b.y-C.y)<ct,w=Math.abs(b.x-C.x)<ct;if(!L&&!w)return 0;let B=0;if(L){const U=b.y,q=Math.min(b.x,C.x)-ct,z=Math.max(b.x,C.x)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===h||Y.orientation!=="vertical"||Y.pipe.coord<q||Y.pipe.coord>z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}else if(w){const U=b.x,q=Math.min(b.y,C.y)-ct,z=Math.max(b.y,C.y)+ct;if(z<=q)return 0;for(const Y of p)Y.edgeIndex===h||Y.orientation!=="horizontal"||Y.pipe.coord<q||Y.pipe.coord>z||Y.from-ct<=U&&Y.to+ct>=U&&(B+=v)}return B},"crossingPenalty"),E=s.map((h,b)=>{if(!h.start||!h.end)return{idx:b,crossLane:0,dx:0,dy:0};const C=r.get(h.start),L=r.get(h.end),w=i.get(h.start),B=i.get(h.end),U=w&&B&&w.id!==B.id?1:0,q=C&&L?Math.abs((L.x??0)-(C.x??0)):0,z=C&&L?Math.abs((L.y??0)-(C.y??0)):0;return{idx:b,crossLane:U,dx:q,dy:z}}).sort((h,b)=>{if(h.crossLane!==b.crossLane)return b.crossLane-h.crossLane;const C=h.dx+h.dy,L=b.dx+b.dy;return Math.abs(C-L)>1?C-L:h.idx-b.idx}).map(h=>h.idx),T=d((h,b,C,L)=>{const w=Math.min(h.x,b.x),B=Math.max(h.x,b.x),U=Math.min(h.y,b.y),q=Math.max(h.y,b.y);return!!g.find(Y=>C&&Y.nodeId===C||L&&Y.nodeId===L?!1:Math.abs(h.x-b.x)>ct?Y.minY<h.y&&Y.maxY>h.y&&Y.maxX>w&&Y.minX<B:Y.minX<h.x&&Y.maxX>h.x&&Y.maxY>U&&Y.minY<q)},"isSegmentBlocked"),m=new Map,S=new Map;for(const h of s)!h.start||!h.end||h.start===h.end||(S.set(h.start,(S.get(h.start)??0)+1),S.set(h.end,(S.get(h.end)??0)+1));const A=d((h,b)=>eo(h,b,"bottom"),"determineSide"),R=new Map;for(const[h,b]of s.entries()){if(!b.start||!b.end||b.start===b.end||b.points&&b.points.length>0)continue;const C=r.get(b.start),L=r.get(b.end);if(!C||!L)continue;const w=(L.x??0)-(C.x??0),B=(L.y??0)-(C.y??0);R.set(h,{edgeIdx:h,srcId:b.start,dstId:b.end,srcSide:A(C,{x:L.x??0,y:L.y??0}),dstSide:A(L,{x:C.x??0,y:C.y??0}),absDx:Math.abs(w),absDy:Math.abs(B),dxSign:Math.sign(w),dySign:Math.sign(B)})}const k=d(h=>h.srcSide==="top"||h.srcSide==="bottom"?h.absDx===0?1/0:h.absDy/h.absDx:h.absDy===0?1/0:h.absDx/h.absDy,"preferenceStrength"),O=d(h=>h.srcSide==="top"||h.srcSide==="bottom"?h.dxSign>=0?"right":"left":h.dySign>=0?"bottom":"top","secondarySide"),_=new Map;for(const h of R.values()){const b=`${h.srcId}:${h.srcSide}`;_.has(b)||_.set(b,[]),_.get(b).push(h)}const H=new Map,P=d((h,b)=>`${h}:${b}`,"loadKey");for(const h of R.values())H.set(P(h.srcId,h.srcSide),(H.get(P(h.srcId,h.srcSide))??0)+1),H.set(P(h.dstId,h.dstSide),(H.get(P(h.dstId,h.dstSide))??0)+1);for(const h of _.values())if(!(h.length<2)){h.sort((b,C)=>{const L=k(b),w=k(C);return Math.abs(L-w)>1e-9?w-L:b.edgeIdx-C.edgeIdx});for(let b=1;b<h.length;b++){const C=h[b],L=O(C),w=H.get(P(C.srcId,C.srcSide))??0,B=H.get(P(C.srcId,L))??0;B>=w||(H.set(P(C.srcId,C.srcSide),w-1),H.set(P(C.srcId,L),B+1),C.srcSide=L)}}const G=d(h=>{const b=h?.shape;return b==="question"||b==="diamond"},"isDiamondNode"),j=new Map;for(const h of R.values())j.has(h.dstId)||j.set(h.dstId,new Set),j.get(h.dstId).add(h.dstSide);for(const h of R.values()){if(!G(r.get(h.srcId)))continue;const b=j.get(h.srcId);if(!b?.has(h.srcSide))continue;const C=O(h);if(b.has(C)||(H.get(P(h.srcId,C))??0)>0)continue;const L=H.get(P(h.srcId,h.srcSide))??0;H.set(P(h.srcId,h.srcSide),Math.max(0,L-1)),H.set(P(h.srcId,C),1),h.srcSide=C}for(const h of R.values()){const{edgeIdx:b,srcId:C,dstId:L,srcSide:w,dstSide:B}=h,U=r.get(C),q=r.get(L),z=`${C}:${w}:src`,Y=w==="top"||w==="bottom"?q.x??0:q.y??0;m.has(z)||m.set(z,[]),m.get(z).push({edgeIdx:b,oppositeCoord:Y});const ot=`${L}:${B}:dst`,rt=B==="top"||B==="bottom"?U.x??0:U.y??0;m.has(ot)||m.set(ot,[]),m.get(ot).push({edgeIdx:b,oppositeCoord:rt})}const J=new Map,dt=8;for(const[h,b]of m){if(b.length<2)continue;b.sort((Lt,Dt)=>Lt.oppositeCoord-Dt.oppositeCoord);const C=h.split(":"),L=C.slice(0,-2).join(":"),w=C[C.length-2],B=C[C.length-1],U=r.get(L);if(!U)continue;const z=w==="left"||w==="right"?U.height??10:U.width??10,Y=U.shape,rt=Y==="question"||Y==="diamond"?z*.3:z,tt=Math.min(20,Math.max(dt,rt/(b.length+1))),Rt=-(tt*(b.length-1))/2;for(const[Lt,Dt]of b.entries()){const Jt=Rt+Lt*tt,gn=`${Dt.edgeIdx}:${B}`;J.set(gn,Jt)}}const mt=d(h=>!!s[h]?.labelNodeId,"edgeHasLabelNode"),kt=d((h,b)=>h?(m.get(`${h}:${b}:src`)??[]).some(({edgeIdx:C})=>mt(C))||(m.get(`${h}:${b}:dst`)??[]).some(({edgeIdx:C})=>mt(C)):!1,"faceHasLabelNode"),Pt=d((h,b,C)=>b==="top"||b==="bottom"?{x:h.x+C,y:h.y}:{x:h.x,y:h.y+C},"applyPortOffset"),Q=d((h,b,C)=>{const L=R.get(h),w={x:C.x??0,y:C.y??0},B={x:b.x??0,y:b.y??0},U=L?.srcSide??A(b,w),q=L?.dstSide??A(C,B);let z=L?I(b,L.srcSide):u(b,w,!0),Y=L?I(C,L.dstSide):u(C,B,!1);const ot=J.get(`${h}:src`),rt=J.get(`${h}:dst`);return ot!==void 0&&(z=Pt(z,U,ot)),rt!==void 0&&(Y=Pt(Y,q,rt)),{pSrcPort:z,pDstPort:Y,srcSide:U,dstSide:q}},"portsForEdge");for(const h of E){const b=s[h];if(f[h]=[],!b.start||!b.end||b.points&&b.points.length>0||b.start===b.end)continue;const C=r.get(b.start),L=r.get(b.end);if(!C||!L)continue;const{pSrcPort:w,pDstPort:B,srcSide:U,dstSide:q}=Q(h,C,L),z={...w},Y={...B},ot=U==="top"||U==="bottom",rt=q==="top"||q==="bottom";if(ot){const X=w.y>(C.y??0);z.y=X?w.y+ne:w.y-ne}else{const X=w.x>(C.x??0);z.x=X?w.x+ne:w.x-ne}if(rt){const X=B.y>(L.y??0);Y.y=X?B.y+ne:B.y-ne}else{const X=B.x>(L.x??0);Y.x=X?B.x+ne:B.x-ne}const st=d((X,$)=>{for(const K of g)if(!$.includes(K.nodeId)&&X.x>K.minX&&X.x<K.maxX&&X.y>K.minY&&X.y<K.maxY)return{inside:!0,obstacle:K};return{inside:!1}},"isPointInObstacle"),tt=d((X,$,K,lt,Ct)=>{if(Ct){const Nt=X.y>($.y??0);return{x:(K.x??0)>=X.x?lt.maxX+be:lt.minX-be,y:Nt?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:Nt}}const bt=X.x>($.x??0),Et=(K.y??0)>=X.y;return{x:bt?lt.maxX+be:lt.minX-be,y:Et?lt.maxY+Te:lt.minY-Te,leavesPositiveSide:bt}},"obstacleDetour");let yt=[];const Rt=[b.start,b.end],Lt=st(z,Rt);if(Lt.inside&&Lt.obstacle){const X=Lt.obstacle;if(ot){const $=tt(w,C,L,X,!0);z.x=$.x,z.y=$.y;const K=$.leavesPositiveSide?Math.min(X.minY-2,w.y+ne):Math.max(X.maxY+2,w.y-ne);yt=[{x:w.x,y:K},{x:$.x,y:K},{x:$.x,y:$.y}]}else{const $=tt(w,C,L,X,!1),K=$.leavesPositiveSide?Math.min(X.minX-2,w.x+ne):Math.max(X.maxX+2,w.x-ne);z.x=$.x,z.y=$.y,yt=[{x:K,y:w.y},{x:K,y:$.y},{x:$.x,y:$.y}]}}let Dt=[];const Jt=st(Y,Rt);if(Jt.inside&&Jt.obstacle){const X=Jt.obstacle;if(rt){const $=tt(B,L,C,X,!0);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:B.x,y:$.y}]}else{const $=tt(B,L,C,X,!1);Y.x=$.x,Y.y=$.y,Dt=[{x:$.x,y:$.y},{x:$.x,y:B.y}]}}if(yt.length===0&&Dt.length===0){const X=be,$=Math.abs(z.x-Y.x)<X,K=Math.abs(z.y-Y.y)<X,lt=J.get(`${h}:src`)!==void 0||J.get(`${h}:dst`)!==void 0,Ct=(m.get(`${b.start??""}:${U}:src`)?.length??0)+(m.get(`${b.start??""}:${U}:dst`)?.length??0),bt=(m.get(`${b.end??""}:${q}:src`)?.length??0)+(m.get(`${b.end??""}:${q}:dst`)?.length??0),Et=Ct>1||bt>1,Nt=S.get(b.start??"")??0,ut=S.get(b.end??"")??0,Yt=Ct>1&&kt(b.start,U)||bt>1&&kt(b.end,q),ee=Ct<=1||Nt<=2,Bt=bt<=1||ut<=2;if(($||K)&&!lt&&(!Et||Et&&!Yt&&ee&&Bt)&&!T(w,B,b.start,b.end)){b.points=[{...w},{...z},{...Y},{...B}],y.add(h);const Mt=K?"horizontal":"vertical",$t=K?w.y:w.x,It=K?Math.min(w.x,B.x):Math.min(w.y,B.y),St=K?Math.max(w.x,B.x):Math.max(w.y,B.y),Wt={id:`fast-path-${Mt}-${$t.toFixed(0)}-${h}`,orientation:Mt,coord:$t,spanMin:It,spanMax:St,tracks:[]};p.push({edgeIndex:h,segmentIndex:0,orientation:Mt,pipe:Wt,trackIndex:0,from:It,to:St});continue}}const gn=x("vertical",z.x,z.y,z.y);z.x=gn.coord;const mr=x("vertical",Y.x,Y.y,Y.y);Y.x=mr.coord;let ue=Math.min(z.x,Y.x)-50,he=Math.max(z.x,Y.x)+50,ve=Math.min(z.y,Y.y)-50,Le=Math.max(z.y,Y.y)+50;for(const X of g){const $=Math.min(z.x,Y.x),K=Math.max(z.x,Y.x),lt=Math.min(z.y,Y.y),Ct=Math.max(z.y,Y.y);X.minX<K&&X.maxX>$&&X.minY<Ct&&X.maxY>lt&&(ue=Math.min(ue,X.minX-je),he=Math.max(he,X.maxX+je),ve=Math.min(ve,X.minY-je),Le=Math.max(Le,X.maxY+je))}for(const X of g){if(X.maxX<ue||X.minX>he||X.maxY<ve||X.minY>Le)continue;const $=be;x("horizontal",X.minY-$,ue,he),x("horizontal",X.maxY+$,ue,he);const K=Te;x("vertical",X.minX-K,ve,Le),x("vertical",X.maxX+K,ve,Le)}x("horizontal",z.y,ue,he),x("horizontal",Y.y,ue,he);const yr=c.filter(X=>X.orientation==="horizontal"&&X.coord>=ve&&X.coord<=Le),xr=c.filter(X=>X.orientation==="vertical"&&X.coord>=ue&&X.coord<=he),ke=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),_e=ke(z.x,z.y),vo=ke(Y.x,Y.y),Fe=new Map,pn=new Map,mn=new Map,De=new Set,xe=[];Fe.set(_e,0),mn.set(_e,"n"),xe.push({key:_e,f:Math.hypot(Y.x-z.x,Y.y-z.y),pt:z}),De.add(_e);let Ht=[];const ge=d((X,$)=>T(X,$,b.start,b.end),"checkSegmentBlocked"),yn={x:Y.x,y:z.y},br=ge(z,yn),Mr=ge(yn,Y),Ir=br||Mr,xn={x:z.x,y:Y.y},Sr=ge(z,xn),Cr=ge(xn,Y);if(Ir?Sr||Cr||(Math.abs(z.x-Y.x)<ct?Ht=[z,Y]:Ht=[z,xn,Y]):Math.abs(z.y-Y.y)<ct||Math.abs(z.x-Y.x)<ct?Ht=[z,Y]:Ht=[z,yn,Y],Ht.length===0)for(;xe.length>0;){xe.sort((ut,Yt)=>ut.f-Yt.f);const X=xe.shift();if(De.delete(X.key),X.key===vo){let ut=vo,Yt=Y;for(Ht=[Yt];pn.has(ut);){const ee=pn.get(ut);Ht.unshift(ee),Yt=ee,ut=ke(ee.x,ee.y)}break}const $=X.pt.x,K=X.pt.y,lt=xr.sort((ut,Yt)=>ut.coord-Yt.coord),Ct=lt.findIndex(ut=>Math.abs(ut.coord-$)<1),bt=yr.sort((ut,Yt)=>ut.coord-Yt.coord),Et=bt.findIndex(ut=>Math.abs(ut.coord-K)<1),Nt=[];Ct>0&&Nt.push({x:lt[Ct-1].coord,y:K}),Ct>=0&&Ct<lt.length-1&&Nt.push({x:lt[Ct+1].coord,y:K}),Et>0&&Nt.push({x:$,y:bt[Et-1].coord}),Et>=0&&Et<bt.length-1&&Nt.push({x:$,y:bt[Et+1].coord});for(const ut of Nt){const Yt=Math.min($,ut.x),ee=Math.max($,ut.x),Bt=Math.min(K,ut.y),Gt=Math.max(K,ut.y);if(g.some(Zt=>Zt.nodeId===b.start||Zt.nodeId===b.end?!1:Yt!==ee?Zt.minY<K&&Zt.maxY>K&&Zt.maxX>Yt&&Zt.minX<ee:Zt.minX<$&&Zt.maxX>$&&Zt.maxY>Bt&&Zt.minY<Gt))continue;const Mt=ke(ut.x,ut.y),$t=Math.abs(ut.x-$)+Math.abs(ut.y-K),It=M(h,X.pt,ut);let St=0;const Wt=Y.x-z.x,Ee=Y.y-z.y,He=ut.x-$,bn=ut.y-K;(Ee>10&&bn<-5||Ee<-10&&bn>5)&&(St=Math.abs(bn)*100),(Wt>10&&He<-5||Wt<-10&&He>5)&&(St+=Math.abs(He)*50);let Lo=0;const Eo=mn.get(X.key)??"n",To=Math.abs(He)>ct?"h":"v";Eo!=="n"&&Eo!==To&&(Lo=50);const vr=$t+It+St+Lo,Xe=(Fe.get(X.key)??1/0)+vr,wo=Math.abs(Y.x-ut.x)+Math.abs(Y.y-ut.y);if(Xe<(Fe.get(Mt)??1/0))if(pn.set(Mt,X.pt),Fe.set(Mt,Xe),mn.set(Mt,To),!De.has(Mt))xe.push({key:Mt,f:Xe+wo,pt:ut}),De.add(Mt);else{const Zt=xe.findIndex(Lr=>Lr.key===Mt);Zt!==-1&&(xe[Zt].f=Xe+wo)}}}if(Ht.length===0&&(Ht=[z,{x:z.x,y:Y.y},Y]),Ht.length>4){const X=Ht[0],$=Ht[Ht.length-1];let K=Math.min(X.x,$.x),lt=Math.max(X.x,$.x),Ct=Math.min(X.y,$.y),bt=Math.max(X.y,$.y);for(const Bt of Ht)K=Math.min(K,Bt.x),lt=Math.max(lt,Bt.x),Ct=Math.min(Ct,Bt.y),bt=Math.max(bt,Bt.y);const Et=lt>Math.max(X.x,$.x),Nt=K<Math.min(X.x,$.x);if(a){const Bt=Te;if(Et){const Gt=Math.max(X.x,$.x),Ot=Math.min(X.y,$.y),Mt=Math.max(X.y,$.y),$t=g.filter(It=>It.minX<Gt&&It.maxX>Gt&&It.minY<Mt&&It.maxY>Ot);if($t.length>0){let It=Math.max(X.x,$.x);for(const St of $t){const Wt=(St.minX+St.maxX)/2;if(St.visualXHalfExtent===void 0||isNaN(St.visualXHalfExtent))continue;const Ee=Wt+St.visualXHalfExtent+Bt;It=Math.max(It,Ee)}isNaN(It)||(lt=It)}}if(Nt){const Gt=g.filter(Ot=>Ot.minX<Math.min(X.x,$.x)+Bt&&Ot.minY<Math.max(X.y,$.y)&&Ot.maxY>Math.min(X.y,$.y));if(Gt.length>0){let Ot=Math.min(X.x,$.x);for(const Mt of Gt){const It=(Mt.minX+Mt.maxX)/2-Mt.visualXHalfExtent-Bt;Ot=Math.min(Ot,It)}K=Ot}}}const ut=d(Bt=>{const Gt=$.y>X.y,Ot=g.filter(It=>{const St=Math.min(X.x,$.x)<It.maxX&&Math.max(X.x,$.x)>It.minX,Wt=Math.min(X.y,$.y)<It.maxY&&Math.max(X.y,$.y)>It.minY;return St&&Wt});let Mt=Ot;if(a&&Ot.length>0){const It=Ot.filter(St=>St.minX<Bt&&St.maxX>Bt);It.length>0&&(Mt=It)}if(Mt.length===0)return $.y;const $t=be;if(Gt){const St=Math.max(...Mt.map(Wt=>Wt.maxY))+$t;if(St<$.y-ct)return St}else{const St=Math.min(...Mt.map(Wt=>Wt.minY))-$t;if(St>$.y+ct)return St}return $.y},"findBestReturnY"),Yt=d(Bt=>{const Gt=ut(Bt),Ot={x:Bt,y:X.y},Mt={x:Bt,y:Gt},$t={x:$.x,y:Gt},It=ge(X,Ot),St=ge(Ot,Mt),Wt=ge(Mt,$t),Ee=Gt!==$.y?ge($t,$):!1;return!It&&!St&&!Wt&&!Ee?Math.abs(Gt-$.y)<ct?[X,Ot,Mt,$]:[X,Ot,Mt,$t,$]:null},"trySimplifyWithDetourX"),ee=Et&&!Nt?Yt(lt):Nt&&!Et?Yt(K):null;ee&&(Ht=ee)}const Xt=[w,...yt,...Ht,...Dt.reverse(),B];if(Xt.length>=3){const X=Xt[Xt.length-1],$=Xt[Xt.length-2],K=Xt[Xt.length-3],lt=Math.abs(K.y-$.y)<ct&&Math.abs($.y-X.y)<ct,Ct=Math.abs(K.x-$.x)<ct&&Math.abs($.x-X.x)<ct;if(lt){const bt=Math.sign($.x-K.x),Et=Math.sign(X.x-K.x);bt!==0&&bt===Et&&Math.abs($.x-K.x)>Math.abs(X.x-K.x)&&Xt.splice(-2,1)}else if(Ct){const bt=Math.sign($.y-K.y),Et=Math.sign(X.y-K.y);bt!==0&&bt===Et&&Math.abs($.y-K.y)>Math.abs(X.y-K.y)&&Xt.splice(-2,1)}}const ie=[Xt[0]];for(let X=1;X<Xt.length-1;X++){if(X===1){ie.push(Xt[X]);continue}const $=ie[ie.length-1],K=Xt[X],lt=Xt[X+1];if(Math.abs($.y-K.y)<ct&&Math.abs(K.y-lt.y)<ct){const Ct=K.x>$.x,bt=lt.x>K.x;if(Ct!==bt){ie.push(K);continue}continue}if(Math.abs($.x-K.x)<ct&&Math.abs(K.x-lt.x)<ct){const Ct=K.y>$.y,bt=lt.y>K.y;if(Ct!==bt){ie.push(K);continue}continue}ie.push(K)}ie.push(Xt[Xt.length-1]);for(let X=0;X<ie.length-1;X++){const $=ie[X],K=ie[X+1],lt=Math.abs($.x-K.x)<ct?"vertical":"horizontal",Ct=lt==="vertical"?$.x:$.y,bt=lt==="vertical"?Math.min($.y,K.y):Math.min($.x,K.x),Et=lt==="vertical"?Math.max($.y,K.y):Math.max($.x,K.x),Nt=x(lt,Ct,bt,Et),ut={edgeIndex:h,segmentIndex:X,orientation:lt,pipe:Nt,trackIndex:0,from:bt,to:Et};p.push(ut),f[h].push(p.length-1),Nt.tracks[0]||(Nt.tracks[0]={index:0,coord:Nt.coord,segments:[]}),Nt.tracks[0].segments.push({edgeIndex:h,segmentIndex:X,from:bt,to:Et})}}const W=d((h,b)=>h.from<b.to&&b.from<h.to,"segmentsOverlap"),et=d((h,b,C,L)=>{const w=!L.segments.some(U=>(U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex)&&W(U,h)),B=!C.segments.some(U=>(U.edgeIndex!==h.edgeIndex||U.segmentIndex!==h.segmentIndex)&&W(U,b));return w&&B?(h.trackIndex=L.index,b.trackIndex=C.index,C.segments=[...C.segments.filter(U=>U.edgeIndex!==h.edgeIndex||U.segmentIndex!==h.segmentIndex),{edgeIndex:b.edgeIndex,segmentIndex:b.segmentIndex,from:b.from,to:b.to}],L.segments=[...L.segments.filter(U=>U.edgeIndex!==b.edgeIndex||U.segmentIndex!==b.segmentIndex),{edgeIndex:h.edgeIndex,segmentIndex:h.segmentIndex,from:h.from,to:h.to}],!0):!1},"trySwapSegmentsAcrossTracks"),at=d(h=>{const b=h.tracks.length;return h.tracks[b]={index:b,coord:h.coord,segments:[]},b},"createNewTrack"),gt=d((h,b)=>{const C=h.pipe.tracks[h.trackIndex];C.segments=C.segments.filter(w=>w.edgeIndex!==h.edgeIndex||w.segmentIndex!==h.segmentIndex),h.trackIndex=b,h.pipe.tracks[b].segments.push({edgeIndex:h.edgeIndex,segmentIndex:h.segmentIndex,from:h.from,to:h.to})},"moveSegmentToTrack"),xt=d((h,b)=>{const C=f[h.edgeIndex];for(const L of C){const w=p[L];w.pipe===h.pipe&>(w,b)}},"moveSegmentChainToTrack"),vt=d(h=>{const b=f[h.edgeIndex],C=b.indexOf(p.indexOf(h)),L=[];return C>0&&L.push(p[b[C-1]]),C<b.length-1&&L.push(p[b[C+1]]),L},"getAdjacentSegmentsAlongEdge"),Vt=d((h,b)=>{if(h.orientation===b.orientation)return!1;const C=h.orientation==="horizontal"?h:b,L=h.orientation==="horizontal"?b:h;return L.pipe.coord>C.from&&L.pipe.coord<C.to&&C.pipe.coord>L.from&&C.pipe.coord<L.to},"haveAnyCrossing"),jt=d((h,b)=>{for(const C of h.tracks)if(!C.segments.some(w=>(w.edgeIndex!==b.edgeIndex||w.segmentIndex!==b.segmentIndex)&&W(w,b)))return C.index;return-1},"findAvailableTrack"),Ut=d((h,b)=>{if(h.trackIndex===b.trackIndex)return W(h,b);const C=vt(h),L=vt(b);return C.some(w=>L.some(B=>Vt(w,B)))},"segmentsConflict"),te=d((h,b,C)=>{if(et(h,b,h.pipe.tracks[h.trackIndex],b.pipe.tracks[b.trackIndex]))return;const L=jt(h.pipe,b);C(b,L!==-1?L:at(h.pipe))},"resolveTrackConflict"),Se=d(h=>{let b=0;for(let C=0;C<h.length;C++)for(let L=C+1;L<h.length;L++){const w=h[C],B=h[L];w.pipe===B.pipe&&Ut(w,B)&&(b++,te(w,B,xt))}return b},"resolveHandleConflicts"),de=new Map,Ce=d(h=>{if(de.has(h))return de.get(h);const b=f[h];if(b.length===0){const q={dest:0,deviation:0,base:0,delta:0};return de.set(h,q),q}const L=p[b[0]].pipe.coord;let w=L;for(let q=1;q<b.length;q++){const z=p[b[q]];if(z.orientation==="horizontal"){const Y=z.from,ot=z.to;w=Math.abs(Y-L)>Math.abs(ot-L)?Y:ot;break}}const B=Math.abs(w-L),U={dest:w,deviation:B,base:L,delta:w-L};return de.set(h,U),U},"getDestInfo"),dn=d(()=>{let h=0;const b=new Map;for(const[L,w]of s.entries())f[L].length!==0&&w.start&&(b.has(w.start)||b.set(w.start,[]),b.get(w.start).push(L));const C=d(L=>{const w=s[L];if(!w.start||!w.end)return 0;const B=r.get(w.start),U=r.get(w.end);if(!B||!U)return 0;const q=(U.x??0)-(B.x??0),z=(U.y??0)-(B.y??0);return Math.abs(q)+Math.abs(z)},"getEdgeDistance");for(const L of b.values()){L.sort((B,U)=>{const q=Ce(B),z=Ce(U);if(Math.abs(q.deviation-z.deviation)>1)return q.deviation-z.deviation;if(Math.abs(q.dest-z.dest)>1)return q.dest-z.dest;const Y=C(B),ot=C(U);if(Math.abs(Y-ot)>1)return ot-Y;const rt=f[B].length,st=f[U].length;if(rt!==st)return rt-st;if(rt===1){const tt=f[B][0],yt=f[U][0];if(p[tt]&&p[yt]){const Rt=p[tt],Lt=p[yt],Dt=Math.abs(Rt.to-Rt.from),Jt=Math.abs(Lt.to-Lt.from);if(Math.abs(Dt-Jt)>1)return Dt-Jt}}return 0});const w=L.map(B=>p[f[B][0]]);h+=Se(w)}return h},"fixSourceHandleCrossings"),un=d(()=>{let h=0;const b=new Map;for(const[C,L]of s.entries())f[C].length!==0&&L.end&&(b.has(L.end)||b.set(L.end,[]),b.get(L.end).push(C));for(const C of b.values()){C.sort((w,B)=>{const U=d(Y=>{const ot=f[Y];if(ot.length<2)return 0;const rt=p[ot[ot.length-2]];return Math.abs(rt.to-rt.from)},"getDist"),q=U(w),z=U(B);return Math.abs(q-z)>.1?q-z:w-B});const L=C.map(w=>p[f[w][f[w].length-1]]);h+=Se(L)}return h},"fixTargetHandleCrossings"),hn=d(()=>{let h=0;for(const b of c){const C=[];for(const L of b.tracks)for(const w of L.segments){const B=f[w.edgeIndex].find(U=>p[U].segmentIndex===w.segmentIndex);B!==void 0&&C.push(p[B])}C.sort((L,w)=>L.edgeIndex-w.edgeIndex||L.segmentIndex-w.segmentIndex);for(let L=0;L<C.length;L++)for(let w=L+1;w<C.length;w++){const B=C[L],U=C[w];Ut(B,U)&&(h++,te(B,U,gt))}}return h},"fixPipeCrossings");let N=0;const F=10;for(;N<F;){let h=0;if(h+=dn(),h+=un(),h+=hn(),h===0)break;N++}const D=new Map;for(const h of c){const b=[];h.tracks.forEach(L=>{L.segments.forEach(w=>{b.push({edgeIndex:w.edgeIndex,segmentIndex:w.segmentIndex,trackIndex:L.index,from:w.from,to:w.to})})}),b.sort((L,w)=>L.from-w.from);const C=[];if(b.length>0){let L=[b[0]],w=b[0].to;for(let B=1;B<b.length;B++){const U=b[B];U.from<w?(L.push(U),w=Math.max(w,U.to)):(C.push(L),L=[U],w=U.to)}C.push(L)}for(const L of C){const w=new Set;L.forEach(tt=>w.add(tt.trackIndex));const B=new Map;L.forEach(tt=>{const yt=Ce(tt.edgeIndex);B.set(tt.trackIndex,(B.get(tt.trackIndex)??0)+yt.delta)});const U=[...w].filter(tt=>(B.get(tt)??0)<-1),q=[...w].filter(tt=>(B.get(tt)??0)>1),z=[...w].filter(tt=>Math.abs(B.get(tt)??0)<=1);U.sort((tt,yt)=>(B.get(yt)??0)-(B.get(tt)??0)),q.sort((tt,yt)=>(B.get(tt)??0)-(B.get(yt)??0));const Y=d((tt,yt)=>{L.filter(Rt=>Rt.trackIndex===tt).forEach(Rt=>{const Lt=y.has(Rt.edgeIndex)?h.coord:yt;D.set(`${Rt.edgeIndex}-${Rt.segmentIndex}`,Lt)})},"assignCoord");let ot=0;for(const tt of U)ot++,Y(tt,h.coord-ot*Cn);if(z.length===0&&w.size>0){const tt=[...w].sort((Lt,Dt)=>Math.abs(B.get(Lt)??0)-Math.abs(B.get(Dt)??0))[0],yt=U.indexOf(tt);yt!==-1&&U.splice(yt,1);const Rt=q.indexOf(tt);Rt!==-1&&q.splice(Rt,1),z.push(tt)}let rt=0;for(const tt of z){if(rt===0)Y(tt,h.coord);else{const yt=rt%2===1?1:-1,Rt=Math.ceil(rt/2);Y(tt,h.coord+yt*Rt*Cn*.5)}rt++}let st=0;for(const tt of q)st++,Y(tt,h.coord+st*Cn)}}for(const[h,b]of s.entries()){const C=f[h]??[];if(C.length===0)continue;const L=[],w=r.get(b.start),B=r.get(b.end),{pSrcPort:U,pDstPort:q}=Q(h,w,B),z=C.map(rt=>{const st=p[rt],tt=D.get(`${st.edgeIndex}-${st.segmentIndex}`)??st.pipe.coord;return{orient:st.orientation,coord:tt,from:st.from,to:st.to}});L.push(U);for(let rt=0;rt<z.length;rt++){const st=z[rt],tt=L[L.length-1],yt=st.orient==="vertical"?tt.y:tt.x,Rt=st.orient==="vertical"?tt.x:tt.y,Lt=z[rt+1],Dt=rt<z.length-1;if(Math.abs(Rt-st.coord)>ct&&L.push(Me(st,yt)),Dt&&Lt.orient===st.orient)if(Math.abs(st.coord-Lt.coord)>ct){const Jt=st.orient==="vertical"?(yt+Lt.from)/2:no(st,Lt);L.push(Me(st,Jt),Me(Lt,Jt))}else(rt===0||rt===z.length-2)&&L.push(Me(st,no(st,Lt)));else if(Dt)L.push(Me(st,Lt.coord));else{const Jt=Math.abs(st.from-yt)<Math.abs(st.to-yt)?st.to:st.from;L.push(Me(st,Jt))}}const Y=L[L.length-1];(Math.abs(Y.x-q.x)>ct||Math.abs(Y.y-q.y)>ct)&&L.push(q);const ot=[];L.length>0&&ot.push(L[0]);for(let rt=1;rt<L.length;rt++){const st=L[rt],tt=ot[ot.length-1];(Math.abs(st.x-tt.x)>ct||Math.abs(st.y-tt.y)>ct)&&ot.push(st)}b.points=ot}for(const h of s){const b=h.__originalEdge;b&&h.points&&(b.points=h.points)}t.edges=(t.edges??[]).filter(h=>!h.isLayoutOnly);const V=d((h,b)=>{const C=b.x??0,L=b.y??0,w=b.width??0,B=b.height??0;if(w<=0||B<=0)return h;const U=C-w/2,q=C+w/2,z=L-B/2,Y=L+B/2;if(h.x<U||h.x>q||h.y<z||h.y>Y)return h;const ot=h.x-U,rt=q-h.x,st=h.y-z,tt=Y-h.y,yt=Math.min(ot,rt,st,tt);return yt===ot?{x:U,y:h.y}:yt===rt?{x:q,y:h.y}:yt===st?{x:h.x,y:z}:{x:h.x,y:Y}},"nodeBoundaryClamp");for(const h of t.edges){const b=h.points;if(!b||b.length<2)continue;const C=h.start,L=h.end,w=C?r.get(C):void 0,B=L?r.get(L):void 0;w&&(b[0]=V(b[0],w)),B&&(b[b.length-1]=V(b[b.length-1],B))}return t}d(hr,"routeEdgesOrthogonal");function gr(t){return t.direction??"TB"}d(gr,"getSwimlaneDirection");function pr(t){const e=Jo(t),n=t.config.flowchart?.nodeSpacing??40,o=t.config.flowchart?.rankSpacing??100,s=t.config.swimlane?.ignoreCrossLaneEdges??!0,r=t.config.swimlane?.optimizeRanksByCrossings??!0,i=t.config.swimlane?.automaticLaneOrdering??!1,c=gr(t),{ordered:a,coordinates:l}=ur(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:i,direction:c});Zo(e,a,l,{nodeGap:n,layerGap:o});for(const g of t.edges??[])delete g.points;hr(t,c);for(const g of t.edges??[])(!g.curve||g.curve==="basis")&&(g.curve="rounded");return Rs(t,c),As(t),c}d(pr,"runSwimlaneLayoutCore");async function Qr(t,e){const n=e.select("g");wr(n,t.markers,t.type,t.diagramId),Ar(),Rr(),Nr(),Tr(),qo(t);const o=Qo(t);t.nodes=o.nodes,t.edges=o.edges;const{groups:s}=await _o(n,t);pr(t),await Uo(t,s)}d(Qr,"render");export{Qr as render}; diff --git a/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-B-ICP983.js b/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-B-ICP983.js new file mode 100644 index 000000000..fdcd6f309 --- /dev/null +++ b/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-B-ICP983.js @@ -0,0 +1,8 @@ +import{c as r,s as e}from"./flowDiagram-23GEKE2U-CLFIXYkh.js";import{_ as a}from"./mermaid.core-BKBZnrB_.js";import"./chunk-5VM5RSS4-BxdGGlTY.js";import"./chunk-XXDRQBXY-BeefoqH0.js";import"./chunk-VR4S4FIN-CTR9P-lT.js";import"./chunk-32BRIVSS-CZoTGle4.js";import"./channel-C2KMAw2n.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var o=a(t=>`${e(t)} + .swimlane.cluster rect { + stroke: ${t.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram}; diff --git a/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-WxMWFajS.js b/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-WxMWFajS.js deleted file mode 100644 index 67aa2454a..000000000 --- a/apps/kimi-code/dist-web/assets/swimlanesDiagram-G3AALYLV-WxMWFajS.js +++ /dev/null @@ -1,8 +0,0 @@ -import{c as r,s as e}from"./flowDiagram-23GEKE2U-CBIszsQp.js";import{_ as a}from"./mermaid.core-DpBz6UHc.js";import"./chunk-5VM5RSS4-D5nhu_pI.js";import"./chunk-XXDRQBXY-BYo5O_6D.js";import"./chunk-VR4S4FIN-JAO0vJUe.js";import"./chunk-32BRIVSS-Dx199TNh.js";import"./channel-DPT3_xql.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var o=a(t=>`${e(t)} - .swimlane.cluster rect { - stroke: ${t.clusterBorder} !important; - } - [data-look="neo"].cluster rect { - filter: none; - } -`,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram}; diff --git a/apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-zMligh5P.js b/apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-B-aR9mhp.js similarity index 99% rename from apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-zMligh5P.js rename to apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-B-aR9mhp.js index 3ddf286cf..6ad3ecdd9 100644 --- a/apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-zMligh5P.js +++ b/apps/kimi-code/dist-web/assets/timeline-definition-FHXFAJF6-B-aR9mhp.js @@ -1,4 +1,4 @@ -import{_ as o,z as pt,aa as Rt,ab as Ct,ac as Wt,c as gt,l as E,F as Pt,a1 as Bt,ad as ft,d as U,u as Vt,ae as Ft,q as zt}from"./mermaid.core-DpBz6UHc.js";import{d as ot}from"./arc-BNlcm8Io.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,X,Z;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";Z=[];for(G in S[$])this.terminals_[G]&&G>W&&Z.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`: +import{_ as o,z as pt,aa as Rt,ab as Ct,ac as Wt,c as gt,l as E,F as Pt,a1 as Bt,ad as ft,d as U,u as Vt,ae as Ft,q as zt}from"./mermaid.core-BKBZnrB_.js";import{d as ot}from"./arc-myf2kRJl.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var tt=(function(){var e=o(function(k,s,d,l){for(d=d||{},l=k.length;l--;d[k[l]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],h=[1,15],c=[1,16],a=[1,19],f=[1,20],g={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o(function(s,d,l,p,x,u,S){var v=u.length-1;switch(x){case 1:return u[v-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:p.addTask(u[v],0,""),this.$=u[v];break;case 19:p.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:h,20:c,21:17,22:18,23:a,24:f},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o(function(s,d){if(d.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=d,l}},"parseError"),parse:o(function(s){var d=this,l=[0],p=[],x=[null],u=[],S=this.table,v="",I=0,R=0,W=2,O=1,L=u.slice.call(arguments,1),w=Object.create(this.lexer),H={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(H.yy[V]=this.yy[V]);w.setInput(s,H.yy),H.yy.lexer=w,H.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var F=w.yylloc;u.push(F);var K=w.options&&w.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(A){l.length=l.length-2*A,x.length=x.length-A,u.length=u.length-A}o(N,"popStack");function b(){var A;return A=p.pop()||w.lex()||O,typeof A!="number"&&(A instanceof Array&&(p=A,A=p.pop()),A=d.symbols_[A]||A),A}o(b,"lex");for(var _,$,T,P,C={},G,B,X,Z;;){if($=l[l.length-1],this.defaultActions[$]?T=this.defaultActions[$]:((_===null||typeof _>"u")&&(_=b()),T=S[$]&&S[$][_]),typeof T>"u"||!T.length||!T[0]){var Y="";Z=[];for(G in S[$])this.terminals_[G]&&G>W&&Z.push("'"+this.terminals_[G]+"'");w.showPosition?Y="Parse error on line "+(I+1)+`: `+w.showPosition()+` Expecting `+Z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Y="Parse error on line "+(I+1)+": Unexpected "+(_==O?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[_]||_,line:w.yylineno,loc:F,expected:Z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+_);switch(T[0]){case 1:l.push(_),x.push(w.yytext),u.push(w.yylloc),l.push(T[1]),_=null,R=w.yyleng,v=w.yytext,I=w.yylineno,F=w.yylloc;break;case 2:if(B=this.productions_[T[1]][1],C.$=x[x.length-B],C._$={first_line:u[u.length-(B||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(B||1)].first_column,last_column:u[u.length-1].last_column},K&&(C._$.range=[u[u.length-(B||1)].range[0],u[u.length-1].range[1]]),P=this.performAction.apply(C,[v,R,I,H.yy,T[1],x,u].concat(L)),typeof P<"u")return P;B&&(l=l.slice(0,-1*B*2),x=x.slice(0,-1*B),u=u.slice(0,-1*B)),l.push(this.productions_[T[1]][0]),x.push(C.$),u.push(C._$),X=S[l[l.length-2]][l[l.length-1]],l.push(X);break;case 3:return!0}}return!0},"parse")},m=(function(){var k={EOF:1,parseError:o(function(d,l){if(this.yy.parser)this.yy.parser.parseError(d,l);else throw new Error(d)},"parseError"),setInput:o(function(s,d){return this.yy=d||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:o(function(s){var d=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var p=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(s){this.unput(this.match.slice(s))},"less"),pastInput:o(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-KpUZjKlm.js b/apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-55dVqqaA.js similarity index 99% rename from apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-KpUZjKlm.js rename to apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-55dVqqaA.js index 5f97ccfc5..41b5f14e5 100644 --- a/apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-KpUZjKlm.js +++ b/apps/kimi-code/dist-web/assets/vennDiagram-L72KCM5P-55dVqqaA.js @@ -1,4 +1,4 @@ -import{b4 as Wt,s as Kt,g as Ht,p as Yt,o as Xt,a as Zt,b as Jt,_ as w,z as wt,F as Qt,d as ot,al as $t,aa as te,ab as ee,ac as ne,e as se,q as ie,B as oe,D as re}from"./mermaid.core-DpBz6UHc.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(q(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});x.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(J(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)J(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)J(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);J(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Ot(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const D=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&D.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(F=>D.has(F)));let I={},C={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Ct(k,r,h)),I=Nt(k,s,e,i,f),C=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const O=x.select("svg");n?O.attr("viewBox",`0 0 ${s} ${e}`):O.attr("width",s).attr("height",e);const R={};let T=!1;O.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(T=!0,R[k.sets[0]]=Me(F))});function A(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,p)}}const G=O.selectAll(".venn-area").data(d,k=>k.sets),P=G.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),L=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),L.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;T&&typeof z.transition=="function"?(z=K(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),p);const N=z.selectAll("text").filter(k=>k.sets in C).text(k=>V(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(T?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const j=K(G.exit()).remove();typeof G.transition=="function"&&j.selectAll("path").attrTween("d",A);const X=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(L.style("font-size","0px"),N.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:G,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Dt:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=q(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(` +import{b4 as Wt,s as Kt,g as Ht,p as Yt,o as Xt,a as Zt,b as Jt,_ as w,z as wt,F as Qt,d as ot,al as $t,aa as te,ab as ee,ac as ne,e as se,q as ie,B as oe,D as re}from"./mermaid.core-BKBZnrB_.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";const kt=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,o=0;const r=[];if(e.length>1){const l=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];o+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let h=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){const p=t[a.parentIndex[b]],M=Math.atan2(a.x-p.x,a.y-p.y),E=Math.atan2(f.x-p.x,f.y-p.y);let _=E-M;_<0&&(_+=2*Math.PI);const S=E-_/2;let g=q(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});g>p.radius*2&&(g=p.radius*2),(h==null||h.width>g)&&(h={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}h!=null&&(r.push(h),i+=lt(h.circle.radius,h.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(q(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=o=0:(i=l.radius*l.radius*Math.PI,r.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return o/=2,n&&(n.area=i+o,n.arcArea=i,n.polygonArea=o,n.arcs=r,n.innerPoints=e,n.intersectionPoints=s),i+o}function ae(t,n){return n.every(s=>q(t,s)<s.radius+_t)}function le(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const o of i)o.parentIndex=[s,e],n.push(o)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function q(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=q(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const o=(e*e-i*i+s*s)/(2*s),r=Math.sqrt(e*e-o*o),l=t.x+o*(n.x-t.x)/s,f=t.y+o*(n.y-t.y)/s,u=-(n.y-t.y)*(r/s),a=-(n.x-t.x)*(r/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,o=e.tolerance||1e-10,r=t(n),l=t(s);let f=s-n;if(r*l>0)throw"Initial bisect points must have opposite signs";if(r===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*r>=0&&(n=a),Math.abs(f)<o||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function $(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt($(t,t))}function ft(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let o=0;o<t.length;++o)t[o]=n*s[o]+e*i[o]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,o=s.zeroDelta||.001,r=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let h;const b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let v=0;v<b;++v){const c=n.slice();c[v]=c[v]?c[v]*i:o,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}const E=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(E),s.history){const x=p.map(d=>{const D=d.slice();return D.fx=d.fx,D.id=d.id,D});x.sort((d,D)=>d.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}h=0;for(let x=0;x<b;++x)h=Math.max(h,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<r&&h<l)break;for(let x=0;x<b;++x){_[x]=0;for(let d=0;d<b;++d)_[x]+=p[d][x];_[x]/=b}const c=p[b];if(J(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)J(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let d=1;d<p.length;++d)J(p[d],1-y,p[0],y,p[d]),p[d].fx=t(p[d])}}else M(S)}return p.sort(E),{fx:p[0].fx,x:p[0]}}function ue(t,n,s,e,i,o,r){const l=s.fx,f=$(s.fxprime,n);let u=l,a=l,y=f,h=0;i=i||1,o=o||1e-6,r=r||.1;function b(p,M,E){for(let _=0;_<16;++_)if(i=(p+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||u>=E)M=i;else{if(Math.abs(y)<=-r*f)return i;y*(M-p)>=0&&(M=p),p=i,E=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=$(e.fxprime,n),u>l+o*i*f||p&&u>=a)return b(h,i,a);if(Math.abs(y)<=-r*f)return i;if(y>=0)return b(i,h,u);a=u,h=i,i*=2}return i}function fe(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const o=n.slice();let r,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),r=e.fxprime.slice(),ft(r,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ue(t,r,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ft(r,e.fxprime,-1);else{J(o,1,i.fxprime,-1,e.fxprime);const y=$(e.fxprime,e.fxprime),h=Math.max(0,$(o,i.fxprime)/y);J(r,h,r,-1,i.fxprime),l=e,e=i,i=l}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||xe,e=n.lossFunction||tt,i=he(t,n),o=s(i,n),r=Object.keys(o),l=[];for(const a of r)l.push(o[a].x),l.push(o[a].y);const u=zt(a=>{const y={};for(let h=0;h<r.length;++h){const b=r[h];y[b]={x:a[2*h],y:a[2*h+1],radius:o[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<r.length;++a){const y=r[a];o[y].x=u[2*a],o[y].y=u[2*a+1]}return o}const Rt=1e-10;function ht(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):ce(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const h=String(f.sets[y]),b=`${a};${h}`,p=`${h};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(const f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}const o=[],r=new Set;for(const l of e)if(l.sets.length===1)o.push(l.sets[0]);else if(l.sets.length===2){const f=l.sets[0],u=l.sets[1];r.add(i(l.sets)),r.add(i([u,f]))}o.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<o.length;++l){const f=o[l];for(let u=l+1;u<o.length;++u){const a=o[u];r.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function de(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(o=>o.sets.length===2).forEach(o=>{const r=s[o.sets[0]],l=s[o.sets[1]],f=Math.sqrt(n[r].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ht(f,u,o.size);e[r][l]=e[l][r]=a;let y=0;o.size+1e-10>=Math.min(n[r].size,n[l].size)?y=1:o.size<=1e-10&&(y=-1),i[r][l]=i[l][r]=y}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let o=0;o<n.length;++o)n[o]=0;let i=0;for(let o=0;o<s.length;++o){const r=t[2*o],l=t[2*o+1];for(let f=o+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[o][f],h=e[o][f],b=(u-r)*(u-r)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;h>0&&p<=y||h<0&&p>=y||(i+=2*M*M,n[2*o]+=4*M*(r-u),n[2*o+1]+=4*M*(l-a),n[2*f]+=4*M*(u-r),n[2*f+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||tt;if(t.length>=8){const i=ye(t,n),o=e(i,t),r=e(s,t);o+1e-8<r&&(s=i)}return s}function ye(t,n={}){const s=n.restarts||10,e=[],i={};for(const h of t)h.sets.length===1&&(i[h.sets[0]]=e.length,e.push(h));let{distances:o,constraints:r}=de(t,e,i);const l=ut(o.map(ut))/o.length;o=o.map(h=>h.map(b=>b/l));const f=(h,b)=>ge(h,b,o,r);let u=null;for(let h=0;h<s;++h){const b=ct(o.length*2).map(Math.random),p=fe(f,b,n);(!u||p.fx<u.fx)&&(u=p)}const a=u.x,y={};for(let h=0;h<e.length;++h){const b=e[h];y[b.sets[0]]={x:a[2*h]*l,y:a[2*h+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const h of n.history)ft(h.x,l);return y}function pe(t,n){const s=n&&n.lossFunction?n.lossFunction:tt,e={},i={};for(const y of t)if(y.sets.length===1){const h=y.sets[0];e[h]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[h]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let h=y.weight!=null?y.weight:1;const b=y.sets[0],p=y.sets[1];y.size+Rt>=Math.min(e[b].size,e[p].size)&&(h=0),i[b].push({set:p,size:y.size,weight:h}),i[p].push({set:b,size:y.size,weight:h})}const o=[];Object.keys(i).forEach(y=>{let h=0;for(let b=0;b<i[y].length;++b)h+=i[y][b].size*i[y][b].weight;o.push({set:y,size:h})});function r(y,h){return h.size-y.size}o.sort(r);const l={};function f(y){return y.set in l}function u(y,h){e[h].x=y.x,e[h].y=y.y,l[h]=!0}u({x:0,y:0},o[0].set);for(let y=1;y<o.length;++y){const h=o[y].set,b=i[h].filter(f),p=e[h];if(b.sort(r),b.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<b.length;++a){const S=e[b[a].set],g=ht(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){const v=e[b[m].set],c=ht(p.radius,v.radius,b[m].size),x=Tt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let E=1e50,_=M[0];for(const S of M){e[h].x=S.x,e[h].y=S.y;const g=s(e,t);g<E&&(E=g,_=S)}u(_,h)}return e}function tt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const r=t[e.sets[0]],l=t[e.sets[1]];i=xt(r.radius,l.radius,q(r,l))}else i=st(e.sets.map(r=>t[r]));const o=e.weight!=null?e.weight:1;s+=o*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],f=t[e.sets[1]];i=xt(l.radius,f.radius,q(l,f))}else i=st(e.sets.map(l=>t[l]));const o=e.weight!=null?e.weight:1,r=Math.log((i+1)/(e.size+1));s+=o*r*r}return s}function me(t,n,s){if(s==null?t.sort((i,o)=>o.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,o=t[0].y;for(const r of t)r.x-=i,r.y-=o}if(t.length===2&&q(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,o=Math.cos(i),r=Math.sin(i);for(const l of t){const f=l.x,u=l.y;l.x=o*f-r*u,l.y=r*f+o*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const o=t[1].y/(1e-10+t[1].x);for(const r of t){var e=(r.x+o*r.y)/(1+o*o);r.x=2*e-r.x,r.y=2*e*o-r.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,o){const r=n(i),l=n(o);r.parent=l}for(let i=0;i<t.length;++i)for(let o=i+1;o<t.length;++o){const r=t[i].radius+t[o].radius;q(t[i],t[o])+1e-10<r&&s(t[o],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const o=n(t[i]).parent.setid;e.has(o)||e.set(o,[]),e.get(o).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((o,r)=>Math.max(o,r[s]+r.radius),Number.NEGATIVE_INFINITY),i=t.reduce((o,r)=>Math.min(o,r[s]-r.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let o=e.bounds;const r=(o.xRange.max-o.xRange.min)/50;function l(u,a,y){if(!u)return;const h=u.bounds;let b,p;if(a)b=o.xRange.max-h.xRange.min+r;else{b=o.xRange.max-h.xRange.max;const M=(h.xRange.max-h.xRange.min)/2-(o.xRange.max-o.xRange.min)/2;M<0&&(b+=M)}if(y)p=o.yRange.max-h.yRange.min+r;else{p=o.yRange.max-h.yRange.max;const M=(h.yRange.max-h.yRange.min)/2-(o.yRange.max-o.yRange.min)/2;M<0&&(p+=M)}for(const M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,o=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const o=Ft(t);n-=2*e,s-=2*e;const{xRange:r,yRange:l}=dt(o);if(r.max===r.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(r.max-r.min),u=s/(l.max-l.min);const a=Math.min(u,f),y=(n-(r.max-r.min)*a)/2,h=(s-(l.max-l.min)*a)/2;return Ot(o.map(b=>({radius:a*b.radius,x:e+y+(b.x-r.min)*a,y:e+h+(b.y-l.min)*a,setid:b.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,o=1e3,r=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,h=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in E)return E[x];var d=E[x]=_[S];return S+=1,S>=_.length&&(S=0),d},m=At,v=tt;function c(x){let d=x.datum();const D=new Set;d.forEach(k=>{k.size==0&&k.sets.length==1&&D.add(k.sets[0])}),d=d.filter(k=>!k.sets.some(F=>D.has(F)));let I={},C={};if(d.length>0){let k=m(d,{lossFunction:v,distinct:b});l&&(k=Ct(k,r,h)),I=Nt(k,s,e,i,f),C=Lt(I,d,M)}const U={};d.forEach(k=>{k.label&&(U[k.sets]=k.label)});function V(k){if(k.sets in U)return U[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const O=x.select("svg");n?O.attr("viewBox",`0 0 ${s} ${e}`):O.attr("width",s).attr("height",e);const R={};let T=!1;O.selectAll(".venn-area path").each(function(k){const F=this.getAttribute("d");k.sets.length==1&&F&&!b&&(T=!0,R[k.sets[0]]=Me(F))});function A(k){return F=>{const H=k.sets.map(et=>{let Y=R[et],Z=I[et];return Y||(Y={x:s/2,y:e/2,radius:1}),Z||(Z={x:s/2,y:e/2,radius:1}),{x:Y.x*(1-F)+Z.x*F,y:Y.y*(1-F)+Z.y*F,radius:Y.radius*(1-F)+Z.radius*F}});return St(H,p)}}const G=O.selectAll(".venn-area").data(d,k=>k.sets),P=G.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),B=P.append("path"),L=P.append("text").attr("class","label").text(k=>V(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(B.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),L.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function K(k){return typeof k.transition=="function"?k.transition("venn").duration(o):k}let z=x;T&&typeof z.transition=="function"?(z=K(x),z.selectAll("path").attrTween("d",A)):z.selectAll("path").attr("d",k=>St(k.sets.map(F=>I[F])),p);const N=z.selectAll("text").filter(k=>k.sets in C).text(k=>V(k)).attr("x",k=>Math.floor(C[k.sets].x)).attr("y",k=>Math.floor(C[k.sets].y));u&&(T?"on"in N?N.on("end",rt(I,V)):N.each("end",rt(I,V)):N.each(rt(I,V)));const j=K(G.exit()).remove();typeof G.transition=="function"&&j.selectAll("path").attrTween("d",A);const X=j.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(L.style("font-size","0px"),N.style("font-size",y),X.style("font-size","0px")),{circles:I,textCentres:C,nodes:G,enter:P,update:z,exit:j}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(o=x,c):o},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(r=x,c):r},c.orientationOrder=function(x){return arguments.length?(h=x,c):h},c.lossFunction=function(x){return arguments.length?(v=x==="default"?tt:x==="logRatio"?Dt:x,c):v},c}function rt(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,o=n(s)||"",r=o.split(/\s+/).reverse(),f=(o.length+r.length)/3;let u=r.pop(),a=[u],y=0;const h=1.1;e.textContent=null;const b=[];function p(g){const m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=r.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}const E=.35-y*h/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${E+m*h}em`)})}}function at(t,n,s){let e=n[0].radius-q(n[0],t);for(let i=1;i<n.length;++i){const o=n[i].radius-q(n[i],t);o<=e&&(e=o)}for(let i=0;i<s.length;++i){const o=q(s[i],t)-s[i].radius;o<=e&&(e=o)}return e}function jt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],o=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=o&&(i=e[a],o=y)}const r=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:r[0],y:r[1]};let f=!0;for(const a of t)if(q(l,a)>a.radius){f=!1;break}for(const a of n)if(q(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?jt(t,[]):Et(u.arcs.map(a=>a.p1))}function Ie(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],o=t[i];for(let r=e+1;r<s.length;++r){const l=s[r],f=t[l],u=q(o,f);u+f.radius<=o.radius+1e-10?n[l].push(i):u+o.radius<=f.radius+1e-10&&n[i].push(l)}}return n}function Lt(t,n,s){const e={},i=Ie(t);for(let o=0;o<n.length;++o){const r=n[o].sets,l={},f={};for(let h=0;h<r.length;++h){l[r[h]]=!0;const b=i[r[h]];for(let p=0;p<b.length;++p)f[b[p]]=!0}const u=[],a=[];for(let h in t)h in l?u.push(t[h]):h in f||a.push(t[h]);const y=jt(u,a,s);e[r]=y,y.disjoint&&n[o].size>0&&console.log("WARNING: area "+r+" not represented on screen")}return e}function ke(t,n,s){const e=[];return e.push(` M`,t,n),e.push(` m`,-s,0),e.push(` a`,s,s,0,1,0,s*2,0),e.push(` diff --git a/apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-D5Z_EMXj.js b/apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-C_QWhoww.js similarity index 98% rename from apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-D5Z_EMXj.js rename to apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-C_QWhoww.js index 8bbe7ba75..4b9f49348 100644 --- a/apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-D5Z_EMXj.js +++ b/apps/kimi-code/dist-web/assets/vue.runtime.esm-bundler-C_QWhoww.js @@ -1,4 +1,4 @@ -import{B as t,a as o,C as r,D as n,E as i,b as c,c as l,F as d,K as p,R as b,S as m,d as f,T as u,e as h,f as S,g as y,h as R,i as v,V as C,j as g,k as w,l as T,m as E,n as x,o as M,p as k,q as D,r as P,s as V,t as A,u as B,v as H,w as N,x as O,y as I,z,A as F,G as U,H as K,I as W,J as j,L as q,M as G,N as L,O as J,P as Q,Q as X,U as Y,W as Z,X as _,Y as $,Z as aa,_ as ea,$ as sa,a0 as ta,a1 as oa,a2 as ra,a3 as na,a4 as ia,a5 as ca,a6 as la,a7 as da,a8 as pa,a9 as ba,aa as ma,ab as fa,ac as ua,ad as ha,ae as Sa,af as ya,ag as Ra,ah as va,ai as Ca,aj as ga,ak as wa,al as Ta,am as Ea,an as xa,ao as Ma,ap as ka,aq as Da,ar as Pa,as as Va,at as Aa,au as Ba,av as Ha,aw as Na,ax as Oa,ay as Ia,az as za,aA as Fa,aB as Ua,aC as Ka,aD as Wa,aE as ja,aF as qa,aG as Ga,aH as La,aI as Ja,aJ as Qa,aK as Xa,aL as Ya,aM as Za,aN as _a,aO as $a,aP as ae,aQ as ee,aR as se,aS as te,aT as oe,aU as re,aV as ne,aW as ie,aX as ce,aY as le,aZ as de,a_ as pe,a$ as be,b0 as me,b1 as fe,b2 as ue,b3 as he,b4 as Se,b5 as ye,b6 as Re,b7 as ve,b8 as Ce,b9 as ge,ba as we,bb as Te,bc as Ee,bd as xe,be as Me,bf as ke,bg as De,bh as Pe,bi as Ve,bj as Ae,bk as Be,bl as He,bm as Ne,bn as Oe,bo as Ie,bp as ze,bq as Fe,br as Ue,bs as Ke,bt as We,bu as je,bv as qe,bw as Ge,bx as Le,by as Je,bz as Qe,bA as Xe,bB as Ye,bC as Ze,bD as _e,bE as $e,bF as as,bG as es,bH as ss,bI as ts,bJ as os,bK as rs,bL as ns,bM as is,bN as cs,bO as ls,bP as ds}from"./index-_5lXYMaO.js";/** +import{B as t,a as o,C as r,D as n,E as i,b as c,c as l,F as d,K as p,R as b,S as m,d as f,T as u,e as h,f as S,g as y,h as R,i as v,V as C,j as g,k as w,l as T,m as E,n as x,o as M,p as k,q as D,r as P,s as V,t as A,u as B,v as H,w as N,x as O,y as I,z,A as F,G as U,H as K,I as W,J as j,L as q,M as G,N as L,O as J,P as Q,Q as X,U as Y,W as Z,X as _,Y as $,Z as aa,_ as ea,$ as sa,a0 as ta,a1 as oa,a2 as ra,a3 as na,a4 as ia,a5 as ca,a6 as la,a7 as da,a8 as pa,a9 as ba,aa as ma,ab as fa,ac as ua,ad as ha,ae as Sa,af as ya,ag as Ra,ah as va,ai as Ca,aj as ga,ak as wa,al as Ta,am as Ea,an as xa,ao as Ma,ap as ka,aq as Da,ar as Pa,as as Va,at as Aa,au as Ba,av as Ha,aw as Na,ax as Oa,ay as Ia,az as za,aA as Fa,aB as Ua,aC as Ka,aD as Wa,aE as ja,aF as qa,aG as Ga,aH as La,aI as Ja,aJ as Qa,aK as Xa,aL as Ya,aM as Za,aN as _a,aO as $a,aP as ae,aQ as ee,aR as se,aS as te,aT as oe,aU as re,aV as ne,aW as ie,aX as ce,aY as le,aZ as de,a_ as pe,a$ as be,b0 as me,b1 as fe,b2 as ue,b3 as he,b4 as Se,b5 as ye,b6 as Re,b7 as ve,b8 as Ce,b9 as ge,ba as we,bb as Te,bc as Ee,bd as xe,be as Me,bf as ke,bg as De,bh as Pe,bi as Ve,bj as Ae,bk as Be,bl as He,bm as Ne,bn as Oe,bo as Ie,bp as ze,bq as Fe,br as Ue,bs as Ke,bt as We,bu as je,bv as qe,bw as Ge,bx as Le,by as Je,bz as Qe,bA as Xe,bB as Ye,bC as Ze,bD as _e,bE as $e,bF as as,bG as es,bH as ss,bI as ts,bJ as os,bK as rs,bL as ns,bM as is,bN as cs,bO as ls,bP as ds}from"./index-yKYHPeXU.js";/** * vue v3.5.39 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT diff --git a/apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-9gU-F74d.js b/apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-Ip7Q1iRO.js similarity index 99% rename from apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-9gU-F74d.js rename to apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-Ip7Q1iRO.js index eda6d1978..885e396f5 100644 --- a/apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-9gU-F74d.js +++ b/apps/kimi-code/dist-web/assets/wardleyDiagram-EHGQE667-Ip7Q1iRO.js @@ -1,4 +1,4 @@ -import{p as St}from"./chunk-JWPE2WC7-BtckK32c.js";import{s as Mt,g as Nt,p as zt,o as Lt,a as Tt,b as At,_ as u,W as Xt,z as Et,B as U,l as K,F as Yt,e as It,q as Bt,c as j}from"./mermaid.core-DpBz6UHc.js";import{p as Ft}from"./cynefin-VYW2F7L2-Dac1VpFl.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),J=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(St(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=J(r.fromPort)??J(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Ft("wardley",e);K.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),Bt()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:At,getAccTitle:Tt,setDiagramTitle:Lt,getDiagramTitle:zt,getAccDescription:Nt,setAccDescription:Mt},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{K.debug(`Rendering Wardley map +import{p as St}from"./chunk-JWPE2WC7-D0FrOBtU.js";import{s as Mt,g as Nt,p as zt,o as Lt,a as Tt,b as At,_ as u,W as Xt,z as Et,B as U,l as K,F as Yt,e as It,q as Bt,c as j}from"./mermaid.core-BKBZnrB_.js";import{p as Ft}from"./cynefin-VYW2F7L2-BGL2vhde.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";var D=u((e,n)=>{const r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:D(n,`${r} evolution`),y:D(e,`${r} visibility`)}),"toCoordinates"),J=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};const r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(St(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){const r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{const x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{const x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,w=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,w)}),e.notes.forEach(r=>{const x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{const x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{const w=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=D(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(w,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,w)})}),e.links.forEach(r=>{const x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=J(r.fromPort)??J(r.toPort);const{flow:d,label:w}=Rt(r.arrow);!a&&d&&(a=d);const C=r.linkLabel,g=w??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{const x=n.getNode(r.component);if(x?.y!==void 0){const a=D(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){const r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{const x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{const x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{const x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),Q={parser:{yy:void 0},parse:u(async e=>{const n=await Ft("wardley",e);K.debug(n);const r=Q.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){const n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){const r=this.pipelines.get(e);r&&r.componentIds.push(n);const x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[n,r]of this.nodes)if(r.label===e)return n;return e}build(){const e=[];for(const n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function tt(){return j()["wardley-beta"]}u(tt,"getConfig");function et(e,n,r,x,a,d,w,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:w,inertia:C,sourceStrategy:g})}u(et,"addNode");function at(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(at,"addLink");function rt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(rt,"addTrend");function ot(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ot,"addAnnotation");function nt(e,n,r){k.addNote({text:e,x:n,y:r})}u(nt,"addNote");function st(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(st,"addAccelerator");function it(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(it,"addDeaccelerator");function dt(e,n){k.setAnnotationsBox(e,n)}u(dt,"setAnnotationsBox");function lt(e,n){k.setSize(e,n)}u(lt,"setSize");function ct(e){k.startPipeline(e)}u(ct,"startPipeline");function pt(e,n){k.addPipelineComponent(e,n)}u(pt,"addPipelineComponent");function ft(e){k.setAxes(e)}u(ft,"updateAxes");function ht(e){return k.getNode(e)}u(ht,"getNode");function xt(e){return k.resolveNodeId(e)}u(xt,"resolveNodeId");function gt(){return k.build()}u(gt,"getWardleyData");function yt(){k.clear(),Bt()}u(yt,"clear");var Dt={getConfig:tt,addNode:et,addLink:at,addTrend:rt,addAnnotation:ot,addNote:nt,addAccelerator:st,addDeaccelerator:it,setAnnotationsBox:dt,setSize:lt,startPipeline:ct,addPipelineComponent:pt,updateAxes:ft,getNode:ht,resolveNodeId:xt,getWardleyData:gt,clear:yt,setAccTitle:At,getAccTitle:Tt,setDiagramTitle:Lt,getDiagramTitle:zt,getAccDescription:Nt,setAccDescription:Mt},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{const{themeVariables:e}=j();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{const e=j()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{K.debug(`Rendering Wardley map `+e);const a=Ht(),d=qt(),w=a.nodeRadius*1.6,C=x.db,g=C.getWardleyData(),F=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,E=Yt(n);E.selectAll("*").remove(),It(E,b,S,a.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);const v=E.append("g").attr("class","wardley-map"),G=E.append("defs");G.append("marker").attr("id",`arrow-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-end-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-start-${n}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const Y=S-a.padding*2,I=b-a.padding*2;F&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(F);const z=u(t=>a.padding+t/100*Y,"projectX"),L=u(t=>b-a.padding-t/100*I,"projectY"),R=v.append("g").attr("class","wardley-axes");R.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),R.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const ut=g.axes.xLabel??"Evolution",wt=g.axes.yLabel??"Visibility";R.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+Y/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(ut),R.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+I/2})`).text(wt);const B=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Gt;if(B.length>0){const t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,o=[];if(s&&s.length===B.length){let i=0;s.forEach(p=>{o.push({start:i,end:p}),i=p})}else{const i=1/B.length;B.forEach((p,l)=>{o.push({start:l*i,end:(l+1)*i})})}B.forEach((i,p)=>{const l=o[p],f=a.padding+l.start*Y,h=a.padding+l.end*Y,y=(f+h)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const o=s/4,i=a.padding+Y*o;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-I*o).attr("y2",b-a.padding-I*o).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:L(t.y),node:t})}),g.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(o=>{if(o.componentIds.length===0)return;const i=o.componentIds.map(h=>({id:h,pos:c.get(h),node:g.nodes.find(y=>y.id===h)})).filter(h=>h.pos&&h.node).sort((h,y)=>h.node.x-y.node.x);for(let h=0;h<i.length-1;h++){const y=i[h],m=i[h+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",m.pos.x).attr("y2",m.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(o.componentIds.forEach(h=>{const y=c.get(h);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){const y=a.nodeRadius*4,m=f-y/2,P=c.get(o.nodeId);if(P){const N=(p+l)/2;P.x=N,P.y=m-w/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",m).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const V=v.append("g").attr("class","wardley-links"),_=new Map;g.pipelines.forEach(t=>{_.set(t.nodeId,new Set(t.componentIds))});const Z=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||_.get(t.target)?.has(t.source)));V.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.x+l/h*p}).attr("y1",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.y+f/h*p}).attr("x2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.x+l/h*p}).attr("y2",t=>{const s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?w/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.y+f/h*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${n})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${n})`:null),V.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=o.y-s.y,l=o.x-s.x,f=Math.sqrt(l*l+p*p),h=8,y=p/f;return i+y*h}).attr("y",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.y+o.y)/2,p=o.x-s.x,l=o.y-s.y,f=Math.sqrt(p*p+l*l),h=8,y=-p/f;return i+y*h}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=(s.y+o.y)/2,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f),y=8,m=f/h,P=-l/h,N=i+m*y,O=p+P*y;let X=Math.atan2(f,l)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${N} ${O})`}).text(t=>t.label);const mt=v.append("g").attr("class","wardley-trends"),kt=g.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const o=z(t.targetX),i=L(t.targetY),p=o-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),h=a.nodeRadius+2,y=f>h?o-p/f*h:o,m=f>h?i-l/f*h:i;return{origin:s,targetX:o,targetY:i,adjustedX2:y,adjustedY2:m}}).filter(t=>t!==null);mt.selectAll("line").data(kt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${n})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const q=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-w/2).attr("y",t=>c.get(t.id).y-w/2).attr("width",w).attr("height",w).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y1",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y-o/2}).attr("x2",t=>{const s=c.get(t.id);let o=t.isPipelineParent?w/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y2",t=>{const s=c.get(t.id),o=t.isPipelineParent?w:a.nodeRadius*2;return s.y+o/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let o=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);const i=t.labelOffsetX??o;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let o=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);const i=t.labelOffsetY??o;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{const o=s.coordinates.map(i=>({x:z(i.x),y:L(i.y)}));if(o.length>1)for(let i=0;i<o.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",o[i].x).attr("y1",o[i].y).attr("x2",o[i+1].x).attr("y2",o[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");o.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),o=L(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),h=[...g.annotations].filter(m=>m.text).sort((m,P)=>m.number-P.number),y=[];if(h.forEach((m,P)=>{const N=f.append("text").attr("x",s+i).attr("y",o+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${m.number}. ${m.text}`);y.push(N)}),y.length>0){let m=0,P=0;y.forEach(H=>{const W=H.node(),Pt=W.getComputedTextLength();m=Math.max(m,Pt);const Ct=W.getBBox();P=Math.max(P,Ct.height)});const N=m+i*2+105,O=h.length*p+i*2+P/2,X=a.padding,bt=S-a.padding-N,$t=a.padding,vt=b-a.padding-O;s=Math.max(X,Math.min(s,bt)),o=Math.max($t,Math.min(o,vt)),y.forEach((H,W)=>{H.attr("x",s+i).attr("y",o+i+(W+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",o).attr("width",N).attr("height",O).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{const o=z(s.x),i=L(s.y);t.append("text").attr("x",o).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{const o=z(s.x),i=L(s.y),p=60,l=30,f=20,h=` M ${o} ${i-l/2} L ${o+p-f} ${i-l/2} diff --git a/apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-BJN2UZpr.js b/apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-D5HV8EjG.js similarity index 99% rename from apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-BJN2UZpr.js rename to apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-D5HV8EjG.js index 17ca9dd8d..428fc55ab 100644 --- a/apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-BJN2UZpr.js +++ b/apps/kimi-code/dist-web/assets/xychartDiagram-FW5EYKEG-D5HV8EjG.js @@ -1,4 +1,4 @@ -import{s as si,g as ai,p as Et,o as ni,a as oi,b as ri,_ as n,l as It,F as hi,e as li,q as ci,z as pt,i as ui,B as Mt,D as gi,W as xi,az as di,a7 as Dt}from"./mermaid.core-DpBz6UHc.js";import{i as fi}from"./init-Gi6I4Gst.js";import{o as pi}from"./ordinal-Cboi1Yqb.js";import{l as vt}from"./linear-BWc4ICs9.js";import"./index-_5lXYMaO.js";import"./_commonjsHelpers-CqkleIqs.js";import"./defaultLocale-DX6XiGOO.js";function mi(t,i,e){t=+t,i=+i,e=(a=arguments.length)<2?(i=t,t=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((i-t)/e))|0,c=new Array(a);++s<a;)c[s]=t+s*e;return c}function ut(){var t=pi().unknown(void 0),i=t.domain,e=t.range,s=0,a=1,c,l,f=!1,S=0,k=0,L=.5;delete t.unknown;function _(){var y=i().length,E=a<s,v=E?a:s,P=E?s:a;c=(P-v)/Math.max(1,y-S+k*2),f&&(c=Math.floor(c)),v+=(P-v-c*(y-S))*L,l=c*(1-S),f&&(v=Math.round(v),l=Math.round(l));var I=mi(y).map(function(p){return v+c*p});return e(E?I.reverse():I)}return t.domain=function(y){return arguments.length?(i(y),_()):i()},t.range=function(y){return arguments.length?([s,a]=y,s=+s,a=+a,_()):[s,a]},t.rangeRound=function(y){return[s,a]=y,s=+s,a=+a,f=!0,_()},t.bandwidth=function(){return l},t.step=function(){return c},t.round=function(y){return arguments.length?(f=!!y,_()):f},t.padding=function(y){return arguments.length?(S=Math.min(1,k=+y),_()):S},t.paddingInner=function(y){return arguments.length?(S=Math.min(1,y),_()):S},t.paddingOuter=function(y){return arguments.length?(k=+y,_()):k},t.align=function(y){return arguments.length?(L=Math.max(0,Math.min(1,y)),_()):L},t.copy=function(){return ut(i(),[s,a]).round(f).paddingInner(S).paddingOuter(k).align(L)},fi.apply(_(),arguments)}var gt=(function(){var t=n(function(F,r,u,g){for(u=u||{},g=F.length;g--;u[F[g]]=r);return u},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],c=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],S=[1,25],k=[1,26],L=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],P=[1,33],I=[1,34],p=[1,35],T=[1,36],h=[1,37],B=[1,43],W=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],b=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],A=[1,65],V=[26,28],R={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,u,g,x,w,o,K){var d=o.length-1;switch(w){case 5:x.setOrientation(o[d]);break;case 9:x.setDiagramTitle(o[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[d]);break;case 13:x.setLineData(o[d-1],o[d]);break;case 14:x.setBarData({text:"",type:"text"},o[d]);break;case 15:x.setBarData(o[d-1],o[d]);break;case 16:this.$=o[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[d-1];break;case 20:case 30:this.$=[o[d-2],...o[d]];break;case 21:case 31:this.$=[o[d]];break;case 22:this.$={value:Number(o[d-1]),label:o[d]};break;case 23:this.$={value:Number(o[d]),label:""};break;case 24:x.setXAxisTitle(o[d]);break;case 25:x.setXAxisTitle(o[d-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[d]);break;case 28:x.setXAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 29:this.$=o[d-1];break;case 32:x.setYAxisTitle(o[d]);break;case 33:x.setYAxisTitle(o[d-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 39:this.$={text:o[d],type:"text"};break;case 40:this.$={text:o[d],type:"text"};break;case 41:this.$={text:o[d],type:"markdown"};break;case 42:this.$=o[d];break;case 43:this.$=o[d-1]+""+o[d];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:c,38:l}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:c,38:l}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:c,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:c,38:l}),{1:[2,3]},t(f,[2,5]),t(i,[2,7],{4:22,36:a,37:c,38:l}),{11:23,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:39,13:38,24:B,29:W,30:S,31:40,32:41,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:45,15:44,29:X,30:S,35:46,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:49,17:48,24:Y,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:52,17:51,24:Y,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{20:[1,53]},{22:[1,54]},t(C,[2,18]),{1:[2,2]},t(C,[2,8]),t(C,[2,9]),t(H,[2,39],{41:55,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h}),t(H,[2,40]),t(H,[2,41]),t(b,[2,42]),t(b,[2,44]),t(b,[2,45]),t(b,[2,46]),t(b,[2,47]),t(b,[2,48]),t(b,[2,49]),t(b,[2,50]),t(b,[2,51]),t(b,[2,52]),t(b,[2,53]),t(C,[2,10]),t(C,[2,24],{32:41,31:56,24:B,29:W}),t(C,[2,26]),t(C,[2,27]),{33:[1,57]},{11:59,30:S,34:58,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},t(C,[2,11]),t(C,[2,32],{35:60,29:X}),t(C,[2,34]),{33:[1,61]},t(C,[2,12]),{17:62,24:Y},{25:63,27:64,29:A},t(C,[2,14]),{17:66,24:Y},t(C,[2,16]),t(C,[2,17]),t(b,[2,43]),t(C,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(C,[2,33]),{29:[1,70]},t(C,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(V,[2,23],{30:[1,73]}),t(C,[2,15]),t(C,[2,28]),t(C,[2,29]),{11:59,30:S,34:74,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},t(C,[2,35]),t(C,[2,19]),{25:75,27:64,29:A},t(V,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,u){if(u.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=u,g}},"parseError"),parse:n(function(r){var u=this,g=[0],x=[],w=[null],o=[],K=this.table,d="",et=0,Rt=0,Jt=2,_t=1,ti=o.slice.call(arguments,1),D=Object.create(this.lexer),U={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&(U.yy[rt]=this.yy[rt]);D.setInput(r,U.yy),U.yy.lexer=D,U.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ht=D.yylloc;o.push(ht);var ii=D.options&&D.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ei(z){g.length=g.length-2*z,w.length=w.length-z,o.length=o.length-z}n(ei,"popStack");function kt(){var z;return z=x.pop()||D.lex()||_t,typeof z!="number"&&(z instanceof Array&&(x=z,z=x.pop()),z=u.symbols_[z]||z),z}n(kt,"lex");for(var M,$,O,lt,G={},st,N,Tt,at;;){if($=g[g.length-1],this.defaultActions[$]?O=this.defaultActions[$]:((M===null||typeof M>"u")&&(M=kt()),O=K[$]&&K[$][M]),typeof O>"u"||!O.length||!O[0]){var ct="";at=[];for(st in K[$])this.terminals_[st]&&st>Jt&&at.push("'"+this.terminals_[st]+"'");D.showPosition?ct="Parse error on line "+(et+1)+`: +import{s as si,g as ai,p as Et,o as ni,a as oi,b as ri,_ as n,l as It,F as hi,e as li,q as ci,z as pt,i as ui,B as Mt,D as gi,W as xi,az as di,a7 as Dt}from"./mermaid.core-BKBZnrB_.js";import{i as fi}from"./init-Gi6I4Gst.js";import{o as pi}from"./ordinal-Cboi1Yqb.js";import{l as vt}from"./linear-oD38CRgN.js";import"./index-yKYHPeXU.js";import"./_commonjsHelpers-CqkleIqs.js";import"./defaultLocale-DX6XiGOO.js";function mi(t,i,e){t=+t,i=+i,e=(a=arguments.length)<2?(i=t,t=0,1):a<3?1:+e;for(var s=-1,a=Math.max(0,Math.ceil((i-t)/e))|0,c=new Array(a);++s<a;)c[s]=t+s*e;return c}function ut(){var t=pi().unknown(void 0),i=t.domain,e=t.range,s=0,a=1,c,l,f=!1,S=0,k=0,L=.5;delete t.unknown;function _(){var y=i().length,E=a<s,v=E?a:s,P=E?s:a;c=(P-v)/Math.max(1,y-S+k*2),f&&(c=Math.floor(c)),v+=(P-v-c*(y-S))*L,l=c*(1-S),f&&(v=Math.round(v),l=Math.round(l));var I=mi(y).map(function(p){return v+c*p});return e(E?I.reverse():I)}return t.domain=function(y){return arguments.length?(i(y),_()):i()},t.range=function(y){return arguments.length?([s,a]=y,s=+s,a=+a,_()):[s,a]},t.rangeRound=function(y){return[s,a]=y,s=+s,a=+a,f=!0,_()},t.bandwidth=function(){return l},t.step=function(){return c},t.round=function(y){return arguments.length?(f=!!y,_()):f},t.padding=function(y){return arguments.length?(S=Math.min(1,k=+y),_()):S},t.paddingInner=function(y){return arguments.length?(S=Math.min(1,y),_()):S},t.paddingOuter=function(y){return arguments.length?(k=+y,_()):k},t.align=function(y){return arguments.length?(L=Math.max(0,Math.min(1,y)),_()):L},t.copy=function(){return ut(i(),[s,a]).round(f).paddingInner(S).paddingOuter(k).align(L)},fi.apply(_(),arguments)}var gt=(function(){var t=n(function(F,r,u,g){for(u=u||{},g=F.length;g--;u[F[g]]=r);return u},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],c=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],S=[1,25],k=[1,26],L=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],P=[1,33],I=[1,34],p=[1,35],T=[1,36],h=[1,37],B=[1,43],W=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],b=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],A=[1,65],V=[26,28],R={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:n(function(r,u,g,x,w,o,K){var d=o.length-1;switch(w){case 5:x.setOrientation(o[d]);break;case 9:x.setDiagramTitle(o[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[d]);break;case 13:x.setLineData(o[d-1],o[d]);break;case 14:x.setBarData({text:"",type:"text"},o[d]);break;case 15:x.setBarData(o[d-1],o[d]);break;case 16:this.$=o[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[d-1];break;case 20:case 30:this.$=[o[d-2],...o[d]];break;case 21:case 31:this.$=[o[d]];break;case 22:this.$={value:Number(o[d-1]),label:o[d]};break;case 23:this.$={value:Number(o[d]),label:""};break;case 24:x.setXAxisTitle(o[d]);break;case 25:x.setXAxisTitle(o[d-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[d]);break;case 28:x.setXAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 29:this.$=o[d-1];break;case 32:x.setYAxisTitle(o[d]);break;case 33:x.setYAxisTitle(o[d-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[d-2]),Number(o[d]));break;case 39:this.$={text:o[d],type:"text"};break;case 40:this.$={text:o[d],type:"text"};break;case 41:this.$={text:o[d],type:"markdown"};break;case 42:this.$=o[d];break;case 43:this.$=o[d-1]+""+o[d];break}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,36:a,37:c,38:l}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,36:a,37:c,38:l}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:a,37:c,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,36:a,37:c,38:l}),{1:[2,3]},t(f,[2,5]),t(i,[2,7],{4:22,36:a,37:c,38:l}),{11:23,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:39,13:38,24:B,29:W,30:S,31:40,32:41,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:45,15:44,29:X,30:S,35:46,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:49,17:48,24:Y,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{11:52,17:51,24:Y,30:S,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},{20:[1,53]},{22:[1,54]},t(C,[2,18]),{1:[2,2]},t(C,[2,8]),t(C,[2,9]),t(H,[2,39],{41:55,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h}),t(H,[2,40]),t(H,[2,41]),t(b,[2,42]),t(b,[2,44]),t(b,[2,45]),t(b,[2,46]),t(b,[2,47]),t(b,[2,48]),t(b,[2,49]),t(b,[2,50]),t(b,[2,51]),t(b,[2,52]),t(b,[2,53]),t(C,[2,10]),t(C,[2,24],{32:41,31:56,24:B,29:W}),t(C,[2,26]),t(C,[2,27]),{33:[1,57]},{11:59,30:S,34:58,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},t(C,[2,11]),t(C,[2,32],{35:60,29:X}),t(C,[2,34]),{33:[1,61]},t(C,[2,12]),{17:62,24:Y},{25:63,27:64,29:A},t(C,[2,14]),{17:66,24:Y},t(C,[2,16]),t(C,[2,17]),t(b,[2,43]),t(C,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(C,[2,33]),{29:[1,70]},t(C,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(V,[2,23],{30:[1,73]}),t(C,[2,15]),t(C,[2,28]),t(C,[2,29]),{11:59,30:S,34:74,39:24,40:k,41:27,42:L,43:_,44:y,45:E,46:v,47:P,48:I,49:p,50:T,51:h},t(C,[2,35]),t(C,[2,19]),{25:75,27:64,29:A},t(V,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:n(function(r,u){if(u.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=u,g}},"parseError"),parse:n(function(r){var u=this,g=[0],x=[],w=[null],o=[],K=this.table,d="",et=0,Rt=0,Jt=2,_t=1,ti=o.slice.call(arguments,1),D=Object.create(this.lexer),U={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&(U.yy[rt]=this.yy[rt]);D.setInput(r,U.yy),U.yy.lexer=D,U.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ht=D.yylloc;o.push(ht);var ii=D.options&&D.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ei(z){g.length=g.length-2*z,w.length=w.length-z,o.length=o.length-z}n(ei,"popStack");function kt(){var z;return z=x.pop()||D.lex()||_t,typeof z!="number"&&(z instanceof Array&&(x=z,z=x.pop()),z=u.symbols_[z]||z),z}n(kt,"lex");for(var M,$,O,lt,G={},st,N,Tt,at;;){if($=g[g.length-1],this.defaultActions[$]?O=this.defaultActions[$]:((M===null||typeof M>"u")&&(M=kt()),O=K[$]&&K[$][M]),typeof O>"u"||!O.length||!O[0]){var ct="";at=[];for(st in K[$])this.terminals_[st]&&st>Jt&&at.push("'"+this.terminals_[st]+"'");D.showPosition?ct="Parse error on line "+(et+1)+`: `+D.showPosition()+` Expecting `+at.join(", ")+", got '"+(this.terminals_[M]||M)+"'":ct="Parse error on line "+(et+1)+": Unexpected "+(M==_t?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(ct,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:ht,expected:at})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+M);switch(O[0]){case 1:g.push(M),w.push(D.yytext),o.push(D.yylloc),g.push(O[1]),M=null,Rt=D.yyleng,d=D.yytext,et=D.yylineno,ht=D.yylloc;break;case 2:if(N=this.productions_[O[1]][1],G.$=w[w.length-N],G._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},ii&&(G._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),lt=this.performAction.apply(G,[d,Rt,et,U.yy,O[1],w,o].concat(ti)),typeof lt<"u")return lt;N&&(g=g.slice(0,-1*N*2),w=w.slice(0,-1*N),o=o.slice(0,-1*N)),g.push(this.productions_[O[1]][0]),w.push(G.$),o.push(G._$),Tt=K[g[g.length-2]][g[g.length-1]],g.push(Tt);break;case 3:return!0}}return!0},"parse")},Q=(function(){var F={EOF:1,parseError:n(function(u,g){if(this.yy.parser)this.yy.parser.parseError(u,g);else throw new Error(u)},"parseError"),setInput:n(function(r,u){return this.yy=u||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var u=r.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:n(function(r){var u=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(r){this.unput(this.match.slice(r))},"less"),pastInput:n(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var r=this.pastInput(),u=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/apps/kimi-code/dist-web/index.html b/apps/kimi-code/dist-web/index.html index e74c0c84e..2d067a195 100644 --- a/apps/kimi-code/dist-web/index.html +++ b/apps/kimi-code/dist-web/index.html @@ -14,8 +14,8 @@ the server's Content-Security-Policy forbids inline scripts. --> <script src="/boot.js"></script> <title>Kimi Code Web - - + +
diff --git a/apps/kimi-code/package.json b/apps/kimi-code/package.json index bbeb38ead..eaec38a41 100644 --- a/apps/kimi-code/package.json +++ b/apps/kimi-code/package.json @@ -1,6 +1,6 @@ { "name": "@moonshot-ai/kimi-code", - "version": "0.36.1", + "version": "0.37.2", "description": "The Starting Point for Next-Gen Agents", "license": "MIT", "author": "Moonshot AI", diff --git a/apps/kimi-code/src/cli/commands.ts b/apps/kimi-code/src/cli/commands.ts index a090df4d0..6b6c3aca0 100644 --- a/apps/kimi-code/src/cli/commands.ts +++ b/apps/kimi-code/src/cli/commands.ts @@ -15,6 +15,7 @@ export type MainCommandHandler = (opts: CLIOptions) => void; export type MigrateCommandHandler = () => void; export type PluginNodeRunnerHandler = (entry: string, args: readonly string[]) => void; export type UpgradeCommandHandler = () => void | Promise; +export type UpdateDownloadHandler = (version: string, manual: boolean) => void; export function createProgram( version: string, @@ -22,6 +23,7 @@ export function createProgram( onMigrate: MigrateCommandHandler, onPluginNodeRunner: PluginNodeRunnerHandler = () => {}, onUpgrade: UpgradeCommandHandler = () => {}, + onUpdateDownload: UpdateDownloadHandler = () => {}, ): Command { const program = new Command(CLI_COMMAND_NAME) .description('The Starting Point for Next-Gen Agents') @@ -138,6 +140,17 @@ export function createProgram( onPluginNodeRunner(entry, args); }); + // Self-spawned worker for native staged updates (detached background + // download, or foreground from `kimi upgrade` — `--manual` marks the + // latter's stage as user-requested). Hidden: not user-facing. + program + .command('__update_download', { hidden: true }) + .argument('') + .option('--manual', 'the stage answers an explicit user-initiated upgrade') + .action((targetVersion: string, options: { manual?: boolean }) => { + onUpdateDownload(targetVersion, options.manual === true); + }); + program.argument('[args...]').action((args: string[]) => { if (args.length > 0) { program.error(`unknown command '${args[0]}'. See '${CLI_COMMAND_NAME} --help'.`); diff --git a/apps/kimi-code/src/cli/sub/update-download.ts b/apps/kimi-code/src/cli/sub/update-download.ts new file mode 100644 index 000000000..efc582ecb --- /dev/null +++ b/apps/kimi-code/src/cli/sub/update-download.ts @@ -0,0 +1,185 @@ +/** + * Hidden `kimi __update_download ` sub-command: the self-spawned + * worker behind native staged updates. Preflight spawns it detached in the + * background (and the `upgrade` command in the foreground); it downloads, + * verifies and stages the binary next to the running exe. The swap into + * place happens on the next startup (see `cli/update/native-swap.ts`). + */ + +import { log } from '@moonshot-ai/kimi-code-sdk'; + +import { + readUpdateInstallLockVersion, + tryAcquireUpdateInstallLock, + type UpdateInstallLockHandle, +} from '#/cli/update/install-lock'; +import { + hashFileSha256, + promoteStagedUpdateToManual, + readStagedNativeUpdate, + stagedExePath, + stageNativeUpdate, +} from '#/cli/update/native-stage'; +import { detectNativeInstall } from '#/cli/update/source'; + +const LOCK_HELD_POLL_INTERVAL_MS = 2_000; + +type StagedUpdateWait = + | { readonly status: 'staged' } + | { readonly status: 'takeover'; readonly lock: UpdateInstallLockHandle | null }; + +/** + * Another worker holds the install lock for the SAME version. Returning right + * away would report a success that has not happened yet — the in-flight + * download may still fail — so wait for it: 'staged' once its staged update is + * verified on disk; 'takeover' once the lock becomes acquirable, with the lock + * already held for the caller. The lock goes stale the moment its holder dies + * (see install-lock), so a killed downloader cannot strand a foreground + * `kimi upgrade` in this loop. + * + * Adoption applies the same integrity bar as stageNativeUpdate's + * already-staged path: the recorded size proves nothing, and the holder may + * still be RE-STAGING a same-size-corrupted payload (its metadata is only + * replaced when the new generation publishes). A recorded stage whose payload + * fails the checksum is treated as not-yet-staged — the lock poll below takes + * over once the holder finishes without repairing it. + * + * A manual (explicit-upgrade) waiter adopts only after CONFIRMING the manual + * marker landed on the stage — a concurrent startup swap may be claiming and + * restoring the metadata right now, and reporting adoption for a promotion + * that never persisted would strand the update under the env opt-out. + */ +async function waitForStagedUpdate( + version: string, + exePath: string, + manual: boolean, +): Promise { + for (;;) { + const staged = await readStagedNativeUpdate(exePath); + const digest = + staged !== null && staged.version === version + ? await hashFileSha256(stagedExePath(exePath, staged)) + : null; + if (staged !== null && digest === staged.sha256) { + if (!manual || (await promoteStagedUpdateToManual(exePath, staged))) { + return { status: 'staged' }; + } + // The stage is being claimed/restored by a concurrent swap — the next + // poll either promotes the restored stage or takes over once it is + // gone. + } else { + // Poll the acquisition itself: while the holder lives its lock stays + // fresh and this returns null without side effects; when the holder + // finishes (or dies) without staging a VERIFIED payload, the takeover + // happens right here. + const lock = await tryAcquireUpdateInstallLock({ version }); + if (lock !== null) return { status: 'takeover', lock }; + } + await new Promise((resolve) => { + setTimeout(resolve, LOCK_HELD_POLL_INTERVAL_MS); + }); + } +} + +export async function runUpdateDownloadCommand( + version: string, + manual: boolean = false, +): Promise { + if (!detectNativeInstall()) { + process.stderr.write('error: update download is only available in the native build\n'); + return 1; + } + const out = process.stdout; + let lock = await tryAcquireUpdateInstallLock({ version }); + if (lock === null) { + const holderVersion = await readUpdateInstallLockVersion(); + if (holderVersion === version) { + // Another worker is already downloading this exact version: wait for it + // and adopt its verified result instead of exiting on a maybe. + out.write( + `A download of Kimi Code ${version} is already in progress; waiting for it to finish…\n`, + ); + const wait = await waitForStagedUpdate(version, process.execPath, manual); + if (wait.status === 'staged') { + out.write(`Kimi Code ${version} is downloaded; it applies on the next start.\n`); + return 0; + } + // The holder finished without staging (failed or died): take over. The + // lock may already be held by another winner of the takeover race — + // the null check below reports that as held. + lock = wait.lock; + } else if (holderVersion === undefined) { + // The lock was released between the two reads — retry the acquire once. + lock = await tryAcquireUpdateInstallLock({ version }); + } + if (lock === null) { + process.stderr.write( + `error: another update (${holderVersion ?? 'unknown version'}) is already downloading\n`, + ); + return 1; + } + } + const label = `Downloading Kimi Code ${version} (${process.platform}-${process.arch})…`; + const onProgress = createDownloadProgress(out, label); + try { + const result = await stageNativeUpdate({ + version, + exePath: process.execPath, + onProgress, + manual, + }); + if (out.isTTY) out.write('\n'); + if (result.status === 'already-staged') { + out.write(`Kimi Code ${version} is already downloaded; it applies on the next start.\n`); + } + return 0; + } catch (error) { + if (out.isTTY) out.write('\n'); + const message = error instanceof Error ? error.message : String(error); + process.stderr.write(`error: failed to download update ${version}: ${message}\n`); + log.warn('native update download failed', { version, error: message }); + return 1; + } finally { + await lock.release().catch(() => {}); + } +} + +const PROGRESS_FRAME_INTERVAL_MS = 100; +const PROGRESS_LINE_INTERVAL_BYTES = 32 * 1024 * 1024; + +function formatDownloadProgress(label: string, downloaded: number, total: number | null): string { + const mb = Math.floor(downloaded / (1024 * 1024)); + if (total === null || total <= 0) return `${label} ${mb} MB`; + const totalMb = Math.max(1, Math.round(total / (1024 * 1024))); + const percent = Math.min(100, Math.floor((downloaded / total) * 100)); + return `${label} ${percent}% (${mb}/${totalMb} MB)`; +} + +/** + * Download progress renderer for the (foreground) downloader: a single + * in-place line on a TTY (`\r` + clear-line, throttled to 10 fps, final frame + * always rendered), or one line per 32 MB when piped to a file. The caller + * owns the trailing newline. + */ +export function createDownloadProgress( + out: NodeJS.WriteStream, + label: string, +): (downloadedBytes: number, totalBytes: number | null) => void { + const isTTY = out.isTTY; + let lastFrameAt = 0; + let lastLineAt = 0; + if (!isTTY) out.write(`${label}\n`); + return (downloaded, total) => { + const done = total !== null && downloaded >= total; + if (isTTY) { + const now = Date.now(); + if (!done && now - lastFrameAt < PROGRESS_FRAME_INTERVAL_MS) return; + lastFrameAt = now; + out.write(`\r\u001B[K${formatDownloadProgress(label, downloaded, total)}`); + return; + } + if (!done && downloaded - lastLineAt < PROGRESS_LINE_INTERVAL_BYTES) return; + lastLineAt = downloaded; + out.write(`${formatDownloadProgress(label, downloaded, total)}\n`); + }; +} diff --git a/apps/kimi-code/src/cli/update/install-lock.ts b/apps/kimi-code/src/cli/update/install-lock.ts index 0b6f3834c..f42042ac3 100644 --- a/apps/kimi-code/src/cli/update/install-lock.ts +++ b/apps/kimi-code/src/cli/update/install-lock.ts @@ -1,10 +1,26 @@ -import { mkdir, open, readFile, unlink } from 'node:fs/promises'; +import { mkdir, readFile, stat, unlink } from 'node:fs/promises'; import { dirname } from 'node:path'; import { getUpdateInstallLockFile } from '#/utils/paths'; +import { createFileIfAbsent } from '#/utils/persistence'; const UPDATE_INSTALL_LOCK_STALE_MS = 30 * 60 * 1000; +/** + * A takeover's critical section is a few syscalls (microseconds), so a + * takeover lock older than this is crash residue and may be swept freely. + */ +const TAKEOVER_LOCK_STALE_MS = 60_000; + +/** + * On filesystems without hard links the lock is published by an exclusive + * create + write (see createFileIfAbsent), which IS observable between create + * and write. A young unparseable lock is almost always that publish window, + * not corruption — only an unparseable lock older than this is swept as + * crash residue. + */ +const LOCK_PUBLISH_GRACE_MS = 60_000; + export interface UpdateInstallLockRequest { readonly version: string; readonly now?: Date; @@ -12,6 +28,8 @@ export interface UpdateInstallLockRequest { export interface UpdateInstallLockHandle { readonly filePath: string; + /** The exact contents this handle published — its ownership identity. */ + readonly content: string; release(): Promise; } @@ -27,42 +45,95 @@ function isAlreadyExists(error: unknown): boolean { ); } -async function isStaleLock(filePath: string, now: Date): Promise { +/** + * Liveness probe for the lock holder. Signal 0 delivers nothing; ESRCH means + * the process is gone, EPERM means it exists but may not be signalled — which + * still counts as alive. + */ +function isProcessAlive(pid: number): boolean { try { - const raw = await readFile(filePath, 'utf-8'); - const parsed = JSON.parse(raw) as unknown; - if (typeof parsed !== 'object' || parsed === null) return true; - const lock = parsed as { readonly startedAt?: unknown }; - if (typeof lock.startedAt !== 'string') return true; - const startedAt = Date.parse(lock.startedAt); - if (!Number.isFinite(startedAt)) return true; - return now.getTime() - startedAt > UPDATE_INSTALL_LOCK_STALE_MS; + process.kill(pid, 0); + return true; } catch (error) { - if (isNotFound(error)) return true; - if (error instanceof SyntaxError) return true; - return false; + return (error as NodeJS.ErrnoException).code === 'EPERM'; } } +interface LockInspection { + readonly content: string; + readonly mtimeMs: number; +} + +/** Read the lock file's content and mtime; null when it is gone/unreadable. */ +async function inspectLockFile(filePath: string): Promise { + const content = await readFile(filePath, 'utf-8').catch(() => null); + if (content === null) return null; + const info = await stat(filePath).catch(() => null); + if (info === null) return null; + return { content, mtimeMs: info.mtimeMs }; +} + +/** + * Staleness check over the lock file's CONTENTS. Shapeless content counts as + * stale (crash residue). Unparseable content is also crash residue — but only + * once it is older than the publish grace: on filesystems without hard links + * a fallback publish is observable mid-write (see LOCK_PUBLISH_GRACE_MS), and + * sweeping that window would break exclusivity. A holder that is gone can + * never release its lock (a killed process skips its finally) nor make + * progress — stale at ANY age; the atomic publish guarantees the pid was + * written complete by a then-live process, so a dead pid means the holder + * died afterwards. Past the age threshold a LIVE holder still survives: a + * native download is idle-bounded but intentionally not duration-bounded, so + * a slow link legitimately exceeds it. (A pid reused by an unrelated process + * can pin the lock until that process exits — a delayed update, never a + * corrupt one.) + */ +function isStaleLock(inspection: LockInspection, now: Date): boolean { + let parsed: unknown; + try { + parsed = JSON.parse(inspection.content); + } catch { + return now.getTime() - inspection.mtimeMs > LOCK_PUBLISH_GRACE_MS; + } + if (typeof parsed !== 'object' || parsed === null) return true; + const lock = parsed as { readonly startedAt?: unknown; readonly pid?: unknown }; + if (typeof lock.startedAt !== 'string') return true; + const startedAt = Date.parse(lock.startedAt); + if (!Number.isFinite(startedAt)) return true; + if (typeof lock.pid === 'number' && !isProcessAlive(lock.pid)) return true; + if (now.getTime() - startedAt <= UPDATE_INSTALL_LOCK_STALE_MS) return false; + return typeof lock.pid !== 'number'; +} + async function createLockFile( filePath: string, request: UpdateInstallLockRequest, -): Promise { +): Promise { const now = request.now ?? new Date(); - const file = await open(filePath, 'wx', 0o600); - try { - await file.writeFile(`${JSON.stringify({ - version: request.version, - pid: process.pid, - startedAt: now.toISOString(), - }, null, 2)}\n`, 'utf-8'); - } finally { - await file.close(); - } + const content = `${JSON.stringify({ + version: request.version, + pid: process.pid, + startedAt: now.toISOString(), + }, null, 2)}\n`; + // Publish atomically and only into a still-free path (EEXIST propagates to + // the caller's inspection flow). The lock file is never observable empty + // on filesystems with hard links; elsewhere the exclusive-create fallback + // leaves a brief publish window, which the inspection side covers with + // LOCK_PUBLISH_GRACE_MS. + await createFileIfAbsent(filePath, content); + // A racing stale-takeover may have removed our just-published lock and + // published its own; only the survivor may proceed. + const published = await readFile(filePath, 'utf-8').catch(() => null); + if (published !== content) return null; return { filePath, + content, release: async (): Promise => { + // Release only the lock instance we own: a stale takeover may have + // replaced the file since we published it. + const current = await readFile(filePath, 'utf-8').catch(() => null); + if (current !== content) return; await unlink(filePath).catch((error: unknown) => { if (!isNotFound(error)) throw error; }); @@ -81,15 +152,103 @@ export async function tryAcquireUpdateInstallLock( if (!isAlreadyExists(error)) throw error; } - if (!(await isStaleLock(filePath, request.now ?? new Date()))) return null; - await unlink(filePath).catch((error: unknown) => { - if (!isNotFound(error)) throw error; - }); + // A lock file exists. Inspect it once to decide whether it is stale. + const inspected = await inspectLockFile(filePath); + if (inspected !== null && !isStaleLock(inspected, request.now ?? new Date())) { + return null; + } + if (inspected === null) { + // Vanished between create and read — retry the create once. + try { + return await createLockFile(filePath, request); + } catch (error) { + if (isAlreadyExists(error)) return null; + throw error; + } + } + // Stale lock. A pathname-level delete can never be conditioned on the file + // still being the inspected instance, so delete+publish MUST NOT run + // concurrently: serialize takeovers through a secondary create-if-absent + // lock and re-validate staleness inside that section. + const takeoverPath = `${filePath}.takeover`; + if (!(await acquireTakeoverLock(takeoverPath))) return null; try { - return await createLockFile(filePath, request); - } catch (error) { - if (isAlreadyExists(error)) return null; - throw error; + const current = await inspectLockFile(filePath); + if (current !== null && !isStaleLock(current, request.now ?? new Date())) { + // A fresh lock appeared while we waited for the takeover section. + return null; + } + if (current !== null) { + await unlink(filePath).catch(() => {}); + } + try { + // A fast-path creator may still win the briefly-free path — its lock is + // legitimate (the path really was free), we simply lose. + return await createLockFile(filePath, request); + } catch (error) { + if (isAlreadyExists(error)) return null; + throw error; + } + } finally { + await unlink(takeoverPath).catch(() => {}); + } +} + +/** + * The takeover lock serializes stale-lock recovery. create-if-absent via the + * shared primitive (hard link, or an exclusive create where unsupported); an + * ancient holder is crash residue (a live section lasts microseconds) and is + * swept, then retried once. + */ +async function acquireTakeoverLock(takeoverPath: string): Promise { + if (await publishTakeoverMarker(takeoverPath)) return true; + const info = await stat(takeoverPath).catch(() => null); + if (info !== null && Date.now() - info.mtimeMs <= TAKEOVER_LOCK_STALE_MS) return false; + await unlink(takeoverPath).catch(() => {}); + return publishTakeoverMarker(takeoverPath); +} + +/** Create-if-absent publish of a small lock marker file. */ +async function publishTakeoverMarker(target: string): Promise { + // Unique marker content doubles as the ownership identity below. + const marker = `${process.pid}.${Date.now()}.${Math.random().toString(16).slice(2)}`; + try { + await createFileIfAbsent(target, marker); + } catch (error) { + if (isAlreadyExists(error)) return false; + throw error; + } + // The stale-marker sweep races this publish: it may unlink our fresh marker + // and publish its own. Verify ownership so only the survivor of that race + // proceeds. (A delete landing after this read is the irreducible residual + // of pathname-only locking — there is no conditional-delete syscall; its + // worst case is a duplicated download cycle, never a corrupt install, + // because swap claims guard the executable independently.) + const published = await readFile(target, 'utf-8').catch(() => null); + return published === marker; +} + +/** + * Return the version recorded in the held lock file, or undefined when the + * lock is gone or unreadable. Lets a downloader that failed to acquire the + * lock distinguish "another instance is staging the SAME version" (its + * outcome is ours — report success) from "a different version is in flight" + * (must not be reported as success to a foreground `kimi upgrade`). + */ +export async function readUpdateInstallLockVersion( + filePath: string = getUpdateInstallLockFile(), +): Promise { + let raw: string; + try { + raw = await readFile(filePath, 'utf-8'); + } catch { + return undefined; + } + try { + const version: unknown = (JSON.parse(raw) as { version?: unknown }).version; + return typeof version === 'string' && version.length > 0 ? version : undefined; + } catch { + return undefined; } } diff --git a/apps/kimi-code/src/cli/update/native-manifest.ts b/apps/kimi-code/src/cli/update/native-manifest.ts new file mode 100644 index 000000000..06c7c5bfc --- /dev/null +++ b/apps/kimi-code/src/cli/update/native-manifest.ts @@ -0,0 +1,101 @@ +/** + * Per-release native artifact manifest (`/binaries//manifest.json`). + * + * Published alongside the release and consumed by the install scripts; the + * staged updater reuses the same file so checksums and file names have a + * single source of truth. Entries point at the bare platform binary + * (`kimi-code-[.exe]`), not an archive. + */ + +import { valid } from 'semver'; +import { z } from 'zod'; + +import { KIMI_CODE_CDN_BINARIES_BASE } from '#/constant/app'; + +const MANIFEST_FETCH_TIMEOUT_MS = 10_000; + +const PlatformEntrySchema = z.object({ + filename: z.string().min(1), + checksum: z.string().regex(/^[a-f0-9]{64}$/, { error: 'invalid sha256' }), +}); + +/** + * Deliberately NOT `.strict()` — unknown fields are ignored so future + * manifest additions never break shipped clients (same contract philosophy + * as the rollout manifest in `cdn.ts`). + */ +export const NativeReleaseManifestSchema = z.object({ + version: z.string().refine((value) => valid(value) !== null, { error: 'invalid semver' }), + platforms: z.record(z.string(), PlatformEntrySchema), +}); + +export type NativeReleaseManifest = z.infer; +export type NativePlatformEntry = z.infer; + +export function nativeManifestUrl(version: string): string { + return `${KIMI_CODE_CDN_BINARIES_BASE}/${version}/manifest.json`; +} + +export function nativeBinaryUrl(version: string, filename: string): string { + return `${KIMI_CODE_CDN_BINARIES_BASE}/${version}/${filename}`; +} + +/** + * Fetch and parse the per-release manifest. **Throws** on any failure + * (network, non-2xx, malformed body, unknown version) — callers treat a + * throw as "staging failed" and record an install failure. + * + * `version` goes into the URL, so it must be a valid semver (it always is: + * upstream sources are the CDN `latest.json` / the `upgrade` command). + * `fetchImpl` is injectable for tests. + */ +export async function fetchNativeReleaseManifest( + version: string, + fetchImpl: typeof fetch = fetch, +): Promise { + if (valid(version) === null) { + throw new Error(`invalid semver for native manifest lookup: ${JSON.stringify(version)}`); + } + const controller = new AbortController(); + const timeout = setTimeout(() => { + controller.abort(); + }, MANIFEST_FETCH_TIMEOUT_MS); + // The timeout must stay armed until the BODY is fully consumed: a CDN or + // proxy can deliver headers within the limit and then stall mid-body, and + // resolving `fetch()` alone would clear the timer and hang the worker. + try { + const response = await fetchImpl(nativeManifestUrl(version), { signal: controller.signal }); + if (!response.ok) { + throw new Error(`native manifest for ${version} returned HTTP ${response.status}`); + } + const manifest = NativeReleaseManifestSchema.parse(JSON.parse(await response.text())); + // A stale or mispublished endpoint can answer with ANOTHER release's + // manifest: its checksums would then be applied to this version's binary + // and every download would fail verification. Reject the mismatch here. + if (manifest.version !== version) { + throw new Error(`manifest for ${version} served content for ${manifest.version}`); + } + return manifest; + } finally { + clearTimeout(timeout); + } +} + +/** + * Pick the entry for the running platform. The release pipeline keys + * platforms by `-` (win32-x64, darwin-arm64, …). + * **Throws** when the platform is missing — a silent skip would strand the + * update in a retry loop. + */ +export function selectPlatformEntry( + manifest: NativeReleaseManifest, + platform: NodeJS.Platform, + arch: string, +): NativePlatformEntry { + const target = `${platform}-${arch}`; + const entry = manifest.platforms[target]; + if (entry === undefined) { + throw new Error(`platform ${target} not found in native manifest for ${manifest.version}`); + } + return entry; +} diff --git a/apps/kimi-code/src/cli/update/native-stage.ts b/apps/kimi-code/src/cli/update/native-stage.ts new file mode 100644 index 000000000..f85b86d7c --- /dev/null +++ b/apps/kimi-code/src/cli/update/native-stage.ts @@ -0,0 +1,486 @@ +/** + * Native staged update: download + verify into `/.staging/`, + * without touching the running executable. The actual swap happens on the + * next startup (see `native-swap.ts`). + * + * The CDN serves the bare platform binary (e.g. `kimi-code-win32-x64.exe`), + * whose sha256 comes from the per-release manifest over HTTPS — a staged + * binary is byte-exact what the release pipeline produced. + */ + +import { createHash } from 'node:crypto'; +import { createReadStream } from 'node:fs'; +import { chmod, mkdir, open, readFile, readdir, rename, rm, rmdir, stat, unlink } from 'node:fs/promises'; +import { basename, join } from 'node:path'; + +import { valid } from 'semver'; +import { z } from 'zod'; + +import { KIMI_CODE_NATIVE_STAGED_STATE_FILE_NAME } from '#/constant/app'; +import { getNativeStagedStateFile, getNativeStagingDir } from '#/utils/paths'; +import { writeJsonFile } from '#/utils/persistence'; + +import { + fetchNativeReleaseManifest, + nativeBinaryUrl, + selectPlatformEntry, +} from './native-manifest'; + +const StagedNativeUpdateSchema = z + .object({ + version: z.string().min(1), + target: z.string().min(1), + /** Base name of the staged executable inside `.staging/`. */ + exeFileName: z + .string() + .min(1) + .refine((value) => basename(value) === value, { error: 'must be a plain file name' }), + /** sha256 of the staged binary (the manifest's checksum). */ + sha256: z.string().regex(/^[a-f0-9]{64}$/), + exeSize: z.number().int().min(1), + stagedAt: z.string().min(1), + /** + * True when the stage was produced by an explicit user-initiated + * `kimi upgrade` (vs the passive background downloader): manual stages + * still apply when automatic updates are opted out via env. + */ + manual: z.boolean().optional(), + }) + .strict(); + +export type StagedNativeUpdate = z.infer; + +export function stagedExeFileName(version: string, platform: NodeJS.Platform): string { + return platform === 'win32' ? `kimi-${version}.exe` : `kimi-${version}`; +} + +/** Uniquifies the published staged-exe name across concurrent in-process workers. */ +let stageTempCounter = 0; + +/** + * The name a stage is published under: the base name plus a unique per-worker + * infix (`kimi-...[.exe]`). Once published, a + * staged executable is NEVER replaced — a same-version re-download publishes + * a new generation and the atomic metadata write retargets the pointer — so + * the pathname a swap validates at claim time is stable: no concurrent + * publisher can exchange the bytes between validation and install. + */ +function uniqueStagedExeFileName(version: string, platform: NodeJS.Platform): string { + const infix = `.${process.pid}.${Date.now()}.${stageTempCounter}`; + stageTempCounter += 1; + return platform === 'win32' ? `kimi-${version}${infix}.exe` : `kimi-${version}${infix}`; +} + +export function stagedExePath(exePath: string, staged: StagedNativeUpdate): string { + return join(getNativeStagingDir(exePath), staged.exeFileName); +} + +/** Parse staged-update metadata from raw text; null when malformed. */ +export function parseStagedNativeUpdate(raw: string): StagedNativeUpdate | null { + let json: unknown; + try { + json = JSON.parse(raw); + } catch { + return null; + } + const parsed = StagedNativeUpdateSchema.safeParse(json); + return parsed.success ? parsed.data : null; +} + +/** + * Read the staged-update metadata, returning null when anything is off: + * missing/corrupt `staged.json`, or the staged exe went away / changed size. + * A null result makes callers behave as if no update was ever staged. + */ +export async function readStagedNativeUpdate( + exePath: string, + filePath: string = getNativeStagedStateFile(exePath), +): Promise { + let raw: string; + try { + raw = await readFile(filePath, 'utf-8'); + } catch { + return null; + } + const staged = parseStagedNativeUpdate(raw); + if (staged === null) return null; + const info = await stat(stagedExePath(exePath, staged)).catch(() => null); + if (info === null || info.size !== staged.exeSize) return null; + return staged; +} + +/** + * Two staged records are the same generation when every field matches — + * ignoring only the `manual` marker that promotion flips. Used to make sure + * a read-modify-write still acts on the record it read. + */ +function isSameStagedRecord(a: StagedNativeUpdate, b: StagedNativeUpdate): boolean { + return ( + a.version === b.version && + a.target === b.target && + a.exeFileName === b.exeFileName && + a.sha256 === b.sha256 && + a.exeSize === b.exeSize && + a.stagedAt === b.stagedAt + ); +} + +/** + * Mark the adopted staged update as manual, confirming the marker actually + * persisted. Used when an explicit `kimi upgrade` adopts a payload the + * passive downloader staged (already on disk, or still downloading): the + * marker lets the startup swap apply it even under the env opt-out. + * + * `expected` is the record the caller read and decided to adopt. The promote + * write only happens while the on-disk metadata still IS that record — a + * concurrent downloader may have published a different stage meanwhile, and + * overwriting its record would orphan a payload whose worker already + * reported success. (Pathname-only writes cannot compare-and-swap, so a + * residual publish-between-check-and-write window remains; the identity + * re-read narrows it to that gap.) + * + * Returns false when the record changed / is concurrently claimed by a + * startup swap (nothing to promote) or a confirming read never sees the + * promoted record — callers must NOT report adoption for a promotion that + * never landed. The write and the confirmation use the same atomic metadata + * path as staging; a swap that claims the PROMOTED file proceeds with the + * marker, which is the desired outcome anyway. + */ +export async function promoteStagedUpdateToManual( + exePath: string, + expected: StagedNativeUpdate, +): Promise { + if (expected.manual === true) return true; + for (let attempt = 0; attempt < 2; attempt += 1) { + const staged = await readStagedNativeUpdate(exePath); + if (staged === null || !isSameStagedRecord(staged, expected)) return false; + // Another promoter already marked this exact record — our work is done. + if (staged.manual === true) return true; + await writeJsonFile(getNativeStagedStateFile(exePath), StagedNativeUpdateSchema, { + ...staged, + manual: true, + }); + // Confirm: a concurrent claim/restore cycle could leave unpromoted + // content behind (the restore never overwrites, so a confirmed marker + // cannot be displaced afterwards). The confirmation must see the + // promoted ADOPTION CANDIDATE itself, not just any manual record. + const confirmed = await readStagedNativeUpdate(exePath); + if (confirmed?.manual === true && isSameStagedRecord(confirmed, expected)) return true; + } + return false; +} + +/** Stream a file's sha256 as hex; null when the file cannot be read. */ +export async function hashFileSha256(filePath: string): Promise { + try { + const hash = createHash('sha256'); + for await (const chunk of createReadStream(filePath)) { + hash.update(chunk as Buffer); + } + return hash.digest('hex'); + } catch { + return null; + } +} + +/** + * Whether a `.staging/` entry is an updater-owned artifact: a staged + * executable (`kimi-[...][.exe]`) or a download + * intermediate (the same plus `.part`). Ownership derives from the + * semver/file-name contract (prerelease and build metadata included), so + * foreign files in the directory are never matched. + */ +function isUpdaterOwnedStagingFile(entry: string): boolean { + if (!entry.startsWith('kimi-')) return false; + let name = entry.slice('kimi-'.length); + if (name.endsWith('.part')) name = name.slice(0, -'.part'.length); + if (name.endsWith('.exe')) name = name.slice(0, -'.exe'.length); + // Published artifacts may carry a unique per-worker infix after the + // version (..., or the older ..) — try with and + // without stripping it (the infix is dot-numeric, which is ambiguous with + // prerelease suffixes, so every candidate is checked). + const candidates = [ + name, + name.replace(/\.\d+\.\d+$/, ''), + name.replace(/\.\d+\.\d+\.\d+$/, ''), + ]; + return candidates.some((candidate) => valid(candidate) !== null); +} + +/** + * An unreferenced artifact is only deleted once it is older than this. A + * concurrent worker's payload publishes BEFORE its metadata, so a freshly + * renamed staged exe can look like an orphan for a moment; publication takes + * milliseconds, so anything unreferenced AND old is definitively abandoned. + */ +const STAGING_ORPHAN_GRACE_MS = 60 * 60 * 1000; + +/** + * Remove files in `.staging/` that nothing references: interrupted downloads + * (`.part`), and staged exes whose `staged.json` never landed (downloader + * killed between the two writes) — each such orphan is ~180 MB and would + * otherwise accumulate forever. The exe referenced by the CURRENT + * `staged.json` is preserved (a superseded record is only replaced by the + * final atomic write, so its payload is still the applicable update while + * this run downloads), and so are swap claim files (`staged.json.swap-*`) + * with the exes they reference: another instance may be mid-swap. + */ +async function cleanupStagingOrphans(stagingDir: string): Promise { + let entries: string[]; + try { + entries = await readdir(stagingDir); + } catch { + return; + } + const keep = new Set([KIMI_CODE_NATIVE_STAGED_STATE_FILE_NAME]); + for (const entry of entries) { + // The current record and every swap claim pin the exe they reference. + if ( + entry !== KIMI_CODE_NATIVE_STAGED_STATE_FILE_NAME && + !entry.startsWith(`${KIMI_CODE_NATIVE_STAGED_STATE_FILE_NAME}.swap-`) + ) { + continue; + } + keep.add(entry); + const raw = await readFile(join(stagingDir, entry), 'utf-8').catch(() => null); + if (raw === null) continue; + try { + const exeFileName: unknown = (JSON.parse(raw) as { exeFileName?: unknown }).exeFileName; + if (typeof exeFileName === 'string' && exeFileName.length > 0) { + // basename(): the metadata contract is a plain file name — never let + // a hand-crafted path escape the staging dir. + keep.add(basename(exeFileName)); + } + } catch { + // Unparseable record/claim: keep the file itself, touch nothing else. + } + } + for (const entry of entries) { + if (keep.has(entry)) continue; + // Only ever unlink updater-owned artifact names (files, never + // directories): the staging dir sits next to the exe and may contain + // data that is not ours. + if (!isUpdaterOwnedStagingFile(entry)) continue; + const full = join(stagingDir, entry); + const info = await stat(full).catch(() => null); + if (info === null) continue; + // Too young to be abandoned — a concurrent worker may be about to + // publish its metadata. + if (Date.now() - info.mtimeMs < STAGING_ORPHAN_GRACE_MS) continue; + await unlink(full).catch(() => {}); + } +} + +export interface StageNativeUpdateOptions { + readonly version: string; + /** Path of the installed executable the staged binary will later replace. */ + readonly exePath: string; + readonly platform?: NodeJS.Platform; + readonly arch?: string; + readonly fetchImpl?: typeof fetch; + /** Download progress (bytes so far, Content-Length total when known). */ + readonly onProgress?: (downloadedBytes: number, totalBytes: number | null) => void; + /** Test hook: override the download idle timeout (default 30 s). */ + readonly idleTimeoutMs?: number; + /** True when the stage answers an explicit user-initiated `kimi upgrade`. */ + readonly manual?: boolean; +} + +export type StageNativeUpdateStatus = 'already-staged' | 'staged'; + +export interface StageNativeUpdateResult { + readonly status: StageNativeUpdateStatus; + readonly staged: StagedNativeUpdate; +} + +/** + * Idle timeout for the binary stream: any 30 s without a arriving chunk + * aborts the download. Total duration is intentionally unbounded — slow + * networks may take as long as they need as long as bytes keep flowing. + */ +const DOWNLOAD_IDLE_TIMEOUT_MS = 30_000; + +async function downloadAndHash( + url: string, + partPath: string, + expectedSha256: string, + fetchImpl: typeof fetch, + onProgress?: (downloadedBytes: number, totalBytes: number | null) => void, + idleTimeoutMs: number = DOWNLOAD_IDLE_TIMEOUT_MS, +): Promise { + const controller = new AbortController(); + let idleTimeout: ReturnType | undefined; + const armIdleTimeout = (): void => { + if (idleTimeout !== undefined) clearTimeout(idleTimeout); + idleTimeout = setTimeout(() => { + controller.abort(new Error(`download stalled: no data for ${idleTimeoutMs}ms`)); + }, idleTimeoutMs); + }; + armIdleTimeout(); + let response: Response; + try { + response = await fetchImpl(url, { signal: controller.signal }); + } catch (error) { + clearTimeout(idleTimeout); + throw error; + } + if (!response.ok || response.body === null) { + clearTimeout(idleTimeout); + throw new Error(`native binary download returned HTTP ${response.status}`); + } + const contentLength = response.headers.get('content-length'); + const total = + contentLength !== null && /^\d+$/.test(contentLength) ? Number(contentLength) : null; + const hash = createHash('sha256'); + let size = 0; + const file = await open(partPath, 'w'); + try { + for await (const chunk of response.body as AsyncIterable) { + armIdleTimeout(); + hash.update(chunk); + size += chunk.length; + // FileHandle.write may persist FEWER bytes than requested (a short + // write, e.g. near disk exhaustion) while the hash and size above + // already account for the whole chunk — an unretried short write would + // publish a truncated binary under a valid checksum. Loop until the + // chunk is fully on disk. + let offset = 0; + while (offset < chunk.length) { + const { bytesWritten } = await file.write(chunk, offset); + if (bytesWritten === 0) { + throw new Error('failed to write the native binary to disk (disk full?)'); + } + offset += bytesWritten; + } + onProgress?.(size, total); + } + } finally { + clearTimeout(idleTimeout); + await file.close(); + } + const digest = hash.digest('hex'); + if (digest !== expectedSha256) { + throw new Error(`sha256 mismatch: expected ${expectedSha256}, got ${digest}`); + } + return size; +} + +/** + * Download + verify `version` next to the running executable. + * + * Short-circuits with `already-staged` when the same version is ready on + * disk (repeat `kimi upgrade`, or foreground/background overlap). **Throws** + * on any failure after cleaning up this version's leftovers — the caller + * records an install failure. + */ +export async function stageNativeUpdate( + options: StageNativeUpdateOptions, +): Promise { + const platform = options.platform ?? process.platform; + const arch = options.arch ?? process.arch; + // Validate BEFORE anything derives a filesystem path from the version: the + // hidden download command takes it from argv, and a non-semver could carry + // path traversal into the cleanup paths below. + if (valid(options.version) === null) { + throw new Error(`invalid semver for native staging: ${JSON.stringify(options.version)}`); + } + const fetchImpl = options.fetchImpl ?? fetch; + const target = `${platform}-${arch}`; + // Unique per-worker publish name — see uniqueStagedExeFileName: a staged + // exe is never replaced once published, so the pathname a swap validates + // at claim time cannot be exchanged by a concurrent publisher. + const exeFileName = uniqueStagedExeFileName(options.version, platform); + + const existing = await readStagedNativeUpdate(options.exePath); + if (existing !== null && existing.version === options.version) { + // readStagedNativeUpdate checks only the recorded size — a same-size + // corruption after the download (disk damage, a non-durable write) + // would still be adopted here and reported as success, only for the + // startup swap's claim-time re-verify to reject and discard it. Compare + // the actual digest before adopting; a mismatch falls through and + // re-stages from the CDN (published under a new generation name — the + // damaged exe is left for the age-gated orphan cleanup). + const digest = await hashFileSha256(stagedExePath(options.exePath, existing)); + if (digest === existing.sha256) { + // An explicit upgrade adopts an auto-staged payload — but only report + // the adoption once the manual marker is confirmed persisted. A stage + // currently being claimed by a startup swap cannot be promoted here; + // fall through and stage afresh instead. + if (options.manual === true && existing.manual !== true) { + if (await promoteStagedUpdateToManual(options.exePath, existing)) { + return { status: 'already-staged', staged: { ...existing, manual: true } }; + } + } else { + return { status: 'already-staged', staged: existing }; + } + } + } + + // A different version was staged earlier and never swapped (skipped + // rollout, user stayed offline, …), or the same version's payload failed + // the integrity check above. The old record is LEFT IN PLACE until the + // atomic metadata write below replaces it: a pathname-level delete could + // remove a concurrent worker's freshly published record (orphaning a + // payload whose worker already reported success), and a swap claiming the + // old stage meanwhile applies a still-valid update. The old exe stays too + // — an unreferenced one is reaped by the age-gated orphan cleanup. + const stagingDir = getNativeStagingDir(options.exePath); + await mkdir(stagingDir, { recursive: true }); + // Drop orphans from interrupted earlier runs before writing ours. + await cleanupStagingOrphans(stagingDir); + + const staged: StagedNativeUpdate = { + version: options.version, + target, + exeFileName, + sha256: '', + exeSize: 0, + stagedAt: new Date().toISOString(), + manual: options.manual === true ? true : undefined, + }; + + // The .part intermediate is just the publish name plus the suffix — the + // name already carries this worker's unique infix, so concurrent workers + // never interleave writes into a shared path. + const partPath = join(stagingDir, `${exeFileName}.part`); + try { + const manifest = await fetchNativeReleaseManifest(options.version, fetchImpl); + const entry = selectPlatformEntry(manifest, platform, arch); + const size = await downloadAndHash( + nativeBinaryUrl(options.version, entry.filename), + partPath, + entry.checksum, + fetchImpl, + options.onProgress, + options.idleTimeoutMs, + ); + // sha256 matched the manifest. Make the private .part file executable + // BEFORE publishing it: a concurrent swap may move the staged exe into + // the install path the instant it appears at its published name, so a + // post-publish chmod could land on a path that is already gone — leaving + // a non-executable installation behind. + await chmod(partPath, 0o755); + await rename(partPath, stagedExePath(options.exePath, staged)); + + staged.sha256 = entry.checksum; + staged.exeSize = size; + // Atomic write: staged.json only ever appears complete and consistent. + await writeJsonFile( + getNativeStagedStateFile(options.exePath), + StagedNativeUpdateSchema, + staged, + ); + return { status: 'staged', staged }; + } catch (error) { + // Remove only what THIS attempt privately owns: its unique .part file. + // If the failure landed after the publishing rename, this attempt's exe + // is already at its unique name with no metadata pointing at it — left + // in place (a just-published exe may belong to a concurrent metadata + // write) and reaped by the age-gated orphan cleanup. + await rm(partPath, { force: true }).catch(() => {}); + // Best effort: drop the staging dir itself when empty (a concurrent + // worker's files keep it around — rmdir only removes empty dirs). + await rmdir(getNativeStagingDir(options.exePath)).catch(() => {}); + throw error; + } +} diff --git a/apps/kimi-code/src/cli/update/native-swap.ts b/apps/kimi-code/src/cli/update/native-swap.ts new file mode 100644 index 000000000..9b477efab --- /dev/null +++ b/apps/kimi-code/src/cli/update/native-swap.ts @@ -0,0 +1,642 @@ +/** + * Native staged swap, executed at the very top of startup. + * + * When a staged update is ready (`.staging/staged.json` next to the running + * exe), swap it in atomically and re-exec so the user session runs the new + * binary immediately. Everything here is best-effort: any failure leaves the + * current exe intact (rollback from `.bak`) and startup continues normally. + * + * Windows semantics make this safe: a running exe can be renamed but not + * overwritten, so the sequence is `rename exe→.bak` (the running process is + * unaffected), `rename staged→exe`, then delete `.bak` (best effort — a + * concurrent old instance keeps it locked until it exits). This is the same + * mechanism install.ps1 already relies on, and the Squirrel/NSIS-style + * "next launch performs the swap" pattern. Leftovers a swap cannot remove + * (its own `.bak` while still running, crash residue in `.staging/`) are + * swept best-effort on every launch. + */ + +import { spawn } from 'node:child_process'; +import { readdir, readFile, rename, rmdir, stat, unlink, utimes } from 'node:fs/promises'; +import { constants as osConstants } from 'node:os'; +import { basename, dirname, join } from 'node:path'; + +import { gt } from 'semver'; + +import { log } from '@moonshot-ai/kimi-code-sdk'; + +import { + KIMI_CODE_NATIVE_STAGED_STATE_FILE_NAME, + KIMI_CODE_UPDATE_REEXEC_ENV, +} from '#/constant/app'; + +import { readUpdateInstallState, writeUpdateInstallState } from './install-state'; +import { + hashFileSha256, + parseStagedNativeUpdate, + readStagedNativeUpdate, + stagedExePath, + type StagedNativeUpdate, +} from './native-stage'; +import { isAutoUpdateDisabledByEnv, shouldAutoInstallUpdates } from './preflight'; +import { getNativeStagedStateFile, getNativeStagingDir } from '#/utils/paths'; +import { createFileIfAbsent } from '#/utils/persistence'; + +export interface NativeSwapDeps { + readonly exePath: string; + readonly argv: readonly string[]; + readonly env: NodeJS.ProcessEnv; + readonly currentVersion: string; + readonly isNative: boolean; + readonly spawnImpl?: typeof spawn; + readonly exitImpl?: (code: number) => void; +} + +export interface SpawnedChild { + once(event: 'error', listener: (error: Error) => void): void; + once(event: 'exit', listener: (code: number | null, signal: NodeJS.Signals | null) => void): void; + once(event: 'close', listener: (code: number | null, signal: NodeJS.Signals | null) => void): void; +} + +function isTruthy(value: string | undefined): boolean { + return ['1', 'true', 'yes', 'on'].includes((value ?? '').trim().toLowerCase()); +} + +function isNotFound(error: unknown): boolean { + return ( + typeof error === 'object' && error !== null && (error as { code?: string }).code === 'ENOENT' + ); +} + +function isAlreadyExists(error: unknown): boolean { + return ( + typeof error === 'object' && error !== null && (error as { code?: string }).code === 'EEXIST' + ); +} + +/** + * A `staged.json.swap-` claim file younger than this marks a swap in + * progress in another instance; older ones are crash residue. The bound + * comfortably exceeds the slowest swap (smoke-check timeout included). + */ +const SWAP_CLAIM_STALE_MS = 5 * 60 * 1000; + +/** + * The swap's executable-renaming critical section is a few filesystem ops + * (well under a second), so a swap mutex older than this is crash residue. + */ +const SWAP_MUTEX_STALE_MS = 60_000; + +/** + * A young unparseable `staged.json` may be an in-flight exclusive-create + * publish (observable mid-write on filesystems without hard links — see + * createFileIfAbsent), not corruption. The publish gap is microscopic, so + * only records younger than this get the benefit of the doubt. + */ +const STAGED_PUBLISH_GRACE_MS = 60_000; + +// First launch of a fresh ~150 MB unsigned exe can sit in an antivirus scan; +// give Windows extra headroom so a slow scan is not misread as a broken binary. +const SMOKE_CHECK_TIMEOUT_MS = process.platform === 'win32' ? 30_000 : 15_000; + +function logSwap(message: string, payload: Record): void { + try { + log.info(`native update swap: ${message}`, payload); + } catch { + // Diagnostics must never affect startup. + } +} + +/** Record a swap failure so preflight stops re-staging the same bad version. */ +async function recordSwapFailure(version: string): Promise { + try { + const state = await readUpdateInstallState(); + const attempts = + (state.lastFailure?.version === version ? state.lastFailure.attempts : 0) + 1; + await writeUpdateInstallState({ + ...state, + active: null, + lastFailure: { version, failedAt: new Date().toISOString(), attempts }, + }); + } catch { + // Never block startup on bookkeeping. + } +} + +/** + * Run `exe --version` as a smoke check: exit code 0 and the EXACT staged + * version as the output (commander prints `\n`). A substring check + * would let a mispublished binary satisfy the wrong target (`1.2.30` + * contains `1.2.3`) — and the manifest checksum cannot catch that case when + * it also describes the wrong artifact. + */ +function smokeCheck( + exePath: string, + staged: StagedNativeUpdate, + spawnImpl: typeof spawn, +): Promise { + return new Promise((resolve) => { + let stdout = ''; + let settled = false; + const finish = (ok: boolean): void => { + if (settled) return; + settled = true; + resolve(ok); + }; + let child: SpawnedChild & { readonly stdout?: NodeJS.ReadableStream | null; kill(): void }; + try { + child = spawnImpl(exePath, ['--version'], { stdio: ['ignore', 'pipe', 'ignore'], windowsHide: true }) as unknown as typeof child; + } catch { + finish(false); + return; + } + const timeout = setTimeout(() => { + try { + child.kill(); + } catch { + // Already gone. + } + finish(false); + }, SMOKE_CHECK_TIMEOUT_MS); + child.stdout?.on('data', (chunk: Buffer) => { + stdout += chunk.toString('utf-8'); + }); + child.once('error', () => { + clearTimeout(timeout); + finish(false); + }); + // 'close', not 'exit': stdio may still be flushing when 'exit' fires, and + // the check needs the complete version output. + child.once('close', (code) => { + clearTimeout(timeout); + finish(code === 0 && stdout.trim() === staged.version); + }); + }); +} + +interface ClaimedStaged { + readonly staged: StagedNativeUpdate; + readonly claimedPath: string; +} + +/** + * Atomically claim the staged metadata file (rename is atomic on both NTFS + * and POSIX, so exactly one of several concurrently starting instances wins), + * THEN parse the claimed contents. Claim-first matters: a concurrent + * downloader may supersede `staged.json` at any moment, so validating before + * the rename could act on metadata this swap never claimed. + * + * Returns null when there is nothing staged, the file disappeared under us, + * or the claimed metadata failed consistency checks. A claimed record that is + * UNPARSEABLE but was young at claim time may be an in-flight + * exclusive-create publish (observable mid-write where hard links are + * unsupported): it is put back with the same inode so the writer completes + * it, never destroyed. Aged corrupt residue and well-formed records whose exe + * is gone/changed are deterministically dead and discarded. + */ +async function claimStagedUpdate(exePath: string): Promise { + const stateFile = getNativeStagedStateFile(exePath); + const claimedPath = `${stateFile}.swap-${process.pid}`; + // Capture the record's age BEFORE the stamp below rewrites it. + const before = await stat(stateFile).catch(() => null); + const youngAtClaim = + before === null || Date.now() - before.mtimeMs <= STAGED_PUBLISH_GRACE_MS; + try { + // The metadata's mtime can be arbitrarily old — the download may have + // finished hours before this launch. Stamp it BEFORE the rename so the + // claim is born fresh: a concurrent launch's sweep never observes a live + // claim that looks like crash residue (and would delete the staged exe + // plus this swap's rollback backup). Stamping the state file itself is + // harmless — nothing reads its mtime. + await utimes(stateFile, new Date(), new Date()).catch(() => {}); + await rename(stateFile, claimedPath); + } catch { + return null; + } + // Parse exactly the metadata we claimed. + const staged = await readStagedNativeUpdate(exePath, claimedPath); + if (staged === null) { + const raw = await readFile(claimedPath, 'utf-8').catch(() => null); + const wellFormed = raw !== null && parseStagedNativeUpdate(raw) !== null; + if (!wellFormed && youngAtClaim) { + // Possible in-flight publish: put the SAME inode back so the writer's + // pending write completes it. rename can overwrite a concurrently + // published newer record — bounded to this parse-failure window, and + // the loser is a newer stage that simply re-downloads, never a corrupt + // install. + await rename(claimedPath, stateFile).catch(() => {}); + return null; + } + await unlink(claimedPath).catch(() => {}); + return null; + } + return { staged, claimedPath }; +} + +/** + * Put a claimed stage's metadata back so a later launch can retry — but only + * into a still-free state-file path: a downloader may have published a NEWER + * stage meanwhile, and an unconditional restore would silently replace it. + * The publish is create-if-absent (hard link, or an exclusive create on + * filesystems without hard-link support), so the restore never overwrites. + * + * The claim file is removed only when the restore landed or the path was + * taken by a newer stage (ours is superseded either way). A transient + * failure (ENOSPC, EACCES, …) RETAINS the claim: discarding it would orphan + * the staged exe with no newer stage to show for it, and the stale-claim + * sweep retries the restore on a later launch. + */ +async function restoreClaimedUpdate(exePath: string, claimedPath: string): Promise { + const content = await readFile(claimedPath, 'utf-8').catch(() => null); + if (content === null) { + // Nothing readable to restore — drop the residue. + await unlink(claimedPath).catch(() => {}); + return; + } + try { + await createFileIfAbsent(getNativeStagedStateFile(exePath), content); + } catch (error) { + if (!isAlreadyExists(error)) return; + // EEXIST: a concurrently published newer stage won the path. + } + await unlink(claimedPath).catch(() => {}); +} + +/** + * Discard a claimed stage: only the claimed metadata file is removed — never + * the staged exe. A same-version downloader may have just renamed its fresh + * payload onto that path (payloads publish before their metadata), and + * genuinely unreferenced exes are reaped by the downloader's own orphan + * cleanup before its next stage. + */ +async function discardClaimedUpdate(claimedPath: string): Promise { + await unlink(claimedPath).catch(() => {}); +} + +async function rollback(bakPath: string, exePath: string): Promise { + try { + await rename(bakPath, exePath); + return true; + } catch { + return false; + } +} + +export interface SwapMutexHandle { + release(): Promise; +} + +/** + * Serialize the swap's executable-renaming critical section across CLI + * processes. The fresh-claim sweep is only a directory SNAPSHOT: two + * processes can both pass it before either claims, then claim different + * stage generations and rename the same installed exe concurrently — + * deleting or replacing each other's `.bak` rollback source. The mutex is + * create-if-absent (via createFileIfAbsent); an aged holder is crash residue + * (the section lasts well under a second) and is swept, then retried once. + */ +async function acquireSwapMutex(stagingDir: string): Promise { + const mutexPath = join(stagingDir, 'swap.lock'); + const marker = `${process.pid}.${Date.now()}.${Math.random().toString(16).slice(2)}`; + for (let attempt = 0; attempt < 2; attempt += 1) { + try { + await createFileIfAbsent(mutexPath, marker); + } catch (error) { + if (!isAlreadyExists(error)) { + // Transient IO failure (ENOSPC, EACCES, …): defer the swap rather + // than abort it — the caller restores the claim for a later launch. + return null; + } + if (attempt === 1) return null; + // Held — or crash residue: only an AGED mutex may be swept. + const info = await stat(mutexPath).catch(() => null); + if (info !== null && Date.now() - info.mtimeMs <= SWAP_MUTEX_STALE_MS) return null; + await unlink(mutexPath).catch(() => {}); + continue; + } + // The stale sweep races this publish; only the survivor proceeds (same + // irreducible residual as the install lock's takeover marker). + const published = await readFile(mutexPath, 'utf-8').catch(() => null); + if (published !== marker) return null; + return { + release: async (): Promise => { + // Release only the mutex instance we own. + const current = await readFile(mutexPath, 'utf-8').catch(() => null); + if (current !== marker) return; + await unlink(mutexPath).catch(() => {}); + }, + }; + } + return null; +} + +/** + * Remove leftover `.bak` siblings of the exe from earlier swaps/installs. + * Only names the updater itself creates are removed: the exact `.bak` + * and the numeric PID fallback `..bak` — anything else with the + * prefix (`kimi.config.bak`, …) belongs to the user. A `.bak` still mapped + * by a running old instance cannot be deleted on Windows — it is simply + * left for a later launch. + */ +async function cleanupBackups(exePath: string, keepPath?: string): Promise { + const dir = dirname(exePath); + const base = basename(exePath); + let entries: string[]; + try { + entries = await readdir(dir); + } catch { + return; + } + for (const entry of entries) { + if (!entry.startsWith(`${base}.`) || !entry.endsWith('.bak')) continue; + const middle = entry.slice(base.length + 1, -'.bak'.length); + if (middle !== '' && !/^\d+$/.test(middle)) continue; + const full = join(dir, entry); + if (full === keepPath) continue; + await unlink(full).catch(() => {}); + } +} + +/** + * Recover `staged.json.swap-` claim files left by instances that died + * mid-swap (or kept by a restore that hit a transient error). An AGED claim + * is restored back onto the state-file path — create-if-absent, so a newer + * published stage is never overwritten — and this very launch can then claim + * and retry the swap; the claim file is dropped once the record is restored + * or superseded, and retained on transient errors. The referenced exes are + * never touched here: they may belong to a freshly published stage, and + * genuinely unreferenced ones are reaped by the downloader's own orphan + * cleanup before its next stage. Returns true when a FRESH claim file was + * seen — i.e. another instance is swapping right now. + */ +async function cleanupStaleSwapClaims(exePath: string): Promise { + const stagingDir = getNativeStagingDir(exePath); + let entries: string[]; + try { + entries = await readdir(stagingDir); + } catch { + return false; + } + let swapInProgress = false; + for (const entry of entries) { + if (!entry.startsWith(`${KIMI_CODE_NATIVE_STAGED_STATE_FILE_NAME}.swap-`)) continue; + const full = join(stagingDir, entry); + const info = await stat(full).catch(() => null); + if (info === null) continue; + if (Date.now() - info.mtimeMs < SWAP_CLAIM_STALE_MS) { + swapInProgress = true; + continue; + } + await restoreClaimedUpdate(exePath, full); + } + return swapInProgress; +} + +/** + * Best-effort startup hygiene for update leftovers, run on every native + * launch. The swap itself can never fully clean up after its own run — the + * old process still holds its renamed image (`.bak`) on Windows — so later + * launches sweep what the previous run could not. + * + * Returns true when another instance holds a fresh swap claim or swap mutex: + * every artifact is then left alone and the caller must not start a second + * swap. + */ +async function sweepStaleNativeUpdateArtifacts(exePath: string): Promise { + try { + if (await cleanupStaleSwapClaims(exePath)) { + // Another instance is mid-swap: leave every artifact alone — the `.bak` + // next to the exe is its rollback source. + return true; + } + // A live swap critical section holds the mutex: same deference. (Only a + // snapshot, but the swap re-checks the mutex after claiming, so a + // freshly-started swap is never entered concurrently.) + const mutexInfo = await stat(join(getNativeStagingDir(exePath), 'swap.lock')).catch( + () => null, + ); + if (mutexInfo !== null && Date.now() - mutexInfo.mtimeMs <= SWAP_MUTEX_STALE_MS) { + return true; + } + await cleanupBackups(exePath); + } catch { + // Hygiene must never affect startup. + } + return false; +} + +/** + * Re-exec the (newly swapped) exe with the original argv, forwarding its exit + * code so the swap is invisible to the caller. Returns false when the spawn + * itself failed — the caller then continues startup with the old in-memory + * code; the binary on disk is already the new version. + */ +function reexec( + deps: NativeSwapDeps & { readonly spawnImpl: typeof spawn }, +): Promise { + return new Promise((resolve) => { + let child: SpawnedChild; + try { + child = deps.spawnImpl(deps.exePath, deps.argv.slice(2), { + stdio: 'inherit', + env: { ...deps.env, [KIMI_CODE_UPDATE_REEXEC_ENV]: '1' }, + }) as unknown as SpawnedChild; + } catch (error) { + logSwap('re-exec spawn threw', { error: String(error) }); + resolve(false); + return; + } + child.once('error', (error) => { + logSwap('re-exec spawn failed', { error: error.message }); + resolve(false); + }); + child.once('exit', (code, signal) => { + resolve(true); + const exitImpl = deps.exitImpl ?? ((exitCode: number) => process.exit(exitCode)); + if (code !== null) { + exitImpl(code); + return; + } + // Terminated by a signal (OOM kill, external SIGKILL, …): mirror the + // shell's 128 + signo convention so the wrapper never reports a killed + // run as a successful CLI invocation. + const signo = signal !== null ? (osConstants.signals[signal] ?? 0) : 0; + exitImpl(signo > 0 ? 128 + signo : 1); + }); + }); +} + +/** + * Swap in a staged native update and re-exec when one is ready. + * + * Returns true only when the process was re-launched (the caller must not + * continue startup — the exit handler fires once the child exits). Every + * other outcome returns false so startup proceeds untouched. + */ +export async function maybeRelaunchWithStagedNativeUpdate( + deps: NativeSwapDeps, +): Promise { + if (!deps.isNative) return false; + const swapInProgress = await sweepStaleNativeUpdateArtifacts(deps.exePath); + if (isTruthy(deps.env[KIMI_CODE_UPDATE_REEXEC_ENV])) { + // Read-once guard: drop it so this session's children (and any nested + // kimi launches from them) do not inherit the swap skip. + delete deps.env[KIMI_CODE_UPDATE_REEXEC_ENV]; + return false; + } + if (swapInProgress) { + // Another instance holds a fresh swap claim and finishes (or rolls back) + // on its own. Starting a second swap here would rename the install path + // from under it and let each launcher delete the `.bak` the other may + // still need for rollback. Its re-exec — or our next launch — lands the + // update, so this session simply runs the current exe. + logSwap('another instance is mid-swap, skipping', { exePath: deps.exePath }); + return false; + } + + const claimed = await claimStagedUpdate(deps.exePath); + if (claimed === null) return false; + const { staged, claimedPath } = claimed; + const spawnImpl = deps.spawnImpl ?? spawn; + + const discard = async (): Promise => { + await discardClaimedUpdate(claimedPath); + return false; + }; + + // Downgrade guard: the staged version must be newer than what is running. + // (The user may have installed a newer build manually after we staged.) + if (!gt(staged.version, deps.currentVersion)) { + logSwap('discarding staged update (not newer)', { + staged: staged.version, + current: deps.currentVersion, + }); + return discard(); + } + + // Automatic stages apply only while automatic updates are enabled — both + // the env opt-out and the persisted `[upgrade] auto_install = false` + // preference gate them. Evaluated on the CLAIMED metadata: a pre-claim + // snapshot could be replaced by a downloader before the claim, smuggling an + // automatic payload past the gate. A manually requested stage always + // applies. When disabled, restore the claim (never overwriting a newer + // stage) so a later launch without the opt-out can still apply it. + if ( + staged.manual !== true && + (isAutoUpdateDisabledByEnv(deps.env) || !(await shouldAutoInstallUpdates())) + ) { + await restoreClaimedUpdate(deps.exePath, claimedPath); + return false; + } + + // Re-verify the staged bytes against the recorded checksum: the exe could + // have been damaged on disk after the download verified it (corruption, a + // non-durable interrupted write), and the `--version` smoke check alone + // would not catch every such case. Only paid once the swap actually + // proceeds. A mismatch discards the stage so a later cycle re-downloads + // it — this is not a swap failure. + const digest = await hashFileSha256(stagedExePath(deps.exePath, staged)); + if (digest !== staged.sha256) { + logSwap('staged exe failed checksum verification, discarding', { + version: staged.version, + }); + return discard(); + } + + const stagedExe = stagedExePath(deps.exePath, staged); + + // 1. Smoke-check the staged exe BEFORE touching the install path: a staged + // binary that cannot start (or lies about its version) is discarded with + // the running exe never moved — the safest possible failure shape. + if (!(await smokeCheck(stagedExe, staged, spawnImpl))) { + logSwap('smoke check failed, discarding staged update', { version: staged.version }); + await recordSwapFailure(staged.version); + return discard(); + } + + // The fresh-claim sweep at startup is only a directory snapshot — another + // instance may have begun its swap after our sweep ran. Take the swap + // mutex before touching the install path so two swaps never rename the + // same exe concurrently (each would delete the other's `.bak` rollback + // source). The staged payload is immutable (unique generation name), so + // nothing validated above can change while we contend here. + const swapMutex = await acquireSwapMutex(getNativeStagingDir(deps.exePath)); + if (swapMutex === null) { + logSwap('another instance is in its swap critical section, deferring', { + exePath: deps.exePath, + }); + await restoreClaimedUpdate(deps.exePath, claimedPath); + return false; + } + try { + // 2. Pick a backup slot and move the running exe aside (rename of a running + // exe is legal on Windows and POSIX alike; overwriting is not). + // + // Crash window: if the process dies between this rename and step 3, the + // install path is left empty and no CLI code can run to self-heal. Each + // rename is atomic, the window is two adjacent syscalls, and recovery is + // `mv .bak ` or re-running the install script. + let bakPath = `${deps.exePath}.bak`; + try { + await unlink(bakPath); + } catch (error) { + if (!isNotFound(error)) { + // The leftover `.bak` is locked by a still-running old instance (or + // undeletable for another reason) — take a unique backup name, the same + // fallback install.ps1 uses. It is best-effort cleaned up on later runs. + bakPath = `${deps.exePath}.${process.pid}.bak`; + } + } + try { + await rename(deps.exePath, bakPath); + } catch (error) { + // Nothing was moved: startup continues with the old exe. Restore the + // claimed metadata so a later launch retries the swap (transient locks + // clear on reboot) — but only into a still-free state-file path: a + // downloader may have published a NEWER stage while we smoke-checked, + // and an unconditional restore would silently replace it. The restore is + // create-if-absent, so it can never overwrite; when the path is taken, + // the newer stage wins and ours is discarded. + logSwap('failed to move exe aside', { exePath: deps.exePath, error: String(error) }); + await restoreClaimedUpdate(deps.exePath, claimedPath); + return false; + } + + // 3. Move the staged exe into place; roll back on failure. + if ((await rename(stagedExe, deps.exePath).catch(() => null)) === null) { + logSwap('failed to move staged exe into place, rolling back', { exePath: deps.exePath }); + if (!(await rollback(bakPath, deps.exePath))) { + // Rollback failed too (transient file lock, AV, …): the install path is + // now absent and no next launch can start. Keep every artifact instead + // of discarding — the `.bak` IS the old exe and the staged payload is a + // second recovery copy, so `mv .bak ` or re-running the + // installer still recovers. + logSwap('rollback failed, keeping recovery artifacts', { + exePath: deps.exePath, + bakPath, + }); + await recordSwapFailure(staged.version); + return false; + } + await recordSwapFailure(staged.version); + return await discard(); + } + + // 4. Success: clean up, STILL INSIDE the mutex — a swap that acquires it + // the instant we release could rename the exe we just installed to the + // shared `.bak` path, and this cleanup would delete that rollback + // source. Then re-exec into the new binary. + await unlink(claimedPath).catch(() => {}); + await unlink(bakPath).catch(() => {}); + await cleanupBackups(deps.exePath, bakPath); + logSwap('swap succeeded, re-launching', { version: staged.version }); + } finally { + await swapMutex.release(); + } + // Cosmetic, now that the release removed our mutex file: drop the staging + // dir when empty. And re-exec OUTSIDE the critical section: the child runs + // the user session, so awaiting it inside the try would hold the mutex for + // its whole lifetime. + await rmdir(getNativeStagingDir(deps.exePath)).catch(() => {}); + return reexec({ ...deps, spawnImpl }); +} diff --git a/apps/kimi-code/src/cli/update/preflight.ts b/apps/kimi-code/src/cli/update/preflight.ts index 5bcad7c9b..f54ff9b22 100644 --- a/apps/kimi-code/src/cli/update/preflight.ts +++ b/apps/kimi-code/src/cli/update/preflight.ts @@ -88,7 +88,7 @@ export function installCommandFor( } } -export function canAutoInstall(source: InstallSource, platform: NodeJS.Platform): boolean { +export function canAutoInstall(source: InstallSource, _platform: NodeJS.Platform): boolean { switch (source) { case 'npm-global': case 'pnpm-global': @@ -100,7 +100,8 @@ export function canAutoInstall(source: InstallSource, platform: NodeJS.Platform) // behind the CDN release — prompt the user to run `brew upgrade` manually. return false; case 'native': - return platform !== 'win32'; + // Staged-swap self update works on every platform (win32 included). + return true; case 'unsupported': return false; } @@ -128,12 +129,12 @@ export function spawnForSource( case 'homebrew': return { cmd: 'brew', args: ['upgrade', 'kimi-code'] }; case 'native': - // `curl … | bash` reports only the trailing bash's exit status, so a - // failed download (curl can't connect → empty stdin → bash exits 0) - // would look like a successful update. `pipefail` makes the pipeline - // surface curl's non-zero status so installUpdate() rejects and we warn - // instead of printing "Updated …". - return { cmd: 'bash', args: ['-c', `set -o pipefail; ${NATIVE_INSTALL_COMMAND_UNIX}`] }; + // Native installs self-spawn the hidden downloader sub-command, which + // stages the binary next to the exe (verified against the release + // manifest's sha256); the swap happens on the next startup. This + // replaces the old `curl|bash` / `irm|iex` re-install dance — no shell, + // no pipeline exit-status loss, no PowerShell dependency on Windows. + return { cmd: process.execPath, args: ['__update_download', version] }; case 'unsupported': throw new Error('unsupported install source cannot be auto-installed'); } @@ -158,6 +159,31 @@ function resolveSpawnCommand(cmd: string, platform: NodeJS.Platform): string | u return platform === 'win32' ? `"${resolved}"` : resolved; } +/** + * Resolve the spawn target for an install. Package managers are resolved from + * `PATH` to an absolute executable via `resolveSpawnCommand` (workspace-trust + * safety, see above). The native self-spawn instead uses `process.execPath` + * verbatim — already absolute — and never goes through a shell. Returns the + * shell flag alongside, since Windows package-manager shims (.cmd) still + * need one. + */ +function resolveInstallSpawn( + source: InstallSource, + version: string, + platform: NodeJS.Platform, + options?: { readonly manual?: boolean }, +): { readonly resolvedCmd: string; readonly args: readonly string[]; readonly shell: boolean } | undefined { + const { cmd, args } = spawnForSource(source, version, platform); + if (source === 'native') { + // A user-confirmed install marks the stage as manual so the startup swap + // applies it even when automatic updates are opted out via env. + return { resolvedCmd: cmd, args: options?.manual === true ? [...args, '--manual'] : args, shell: false }; + } + const resolvedCmd = resolveSpawnCommand(cmd, platform); + if (resolvedCmd === undefined) return undefined; + return { resolvedCmd, args, shell: platform === 'win32' }; +} + const THIRD_PARTY_SOURCE_NOTE = '\nNote: Third-party sources may lag behind the official release.\n' + `For the latest updates, use the official installer: ${KIMI_CODE_OFFICIAL_INSTALL_URL}\n`; @@ -180,7 +206,7 @@ export function renderManualUpdateMessage( sourceDesc = 'homebrew'; break; case 'native': - sourceDesc = 'native (windows). Auto-update is not supported on this platform.'; + sourceDesc = 'native installer'; break; case 'unsupported': sourceDesc = 'unsupported package manager or layout.'; @@ -361,6 +387,44 @@ function hasFreshActiveInstall(state: UpdateInstallState, target: UpdateTarget): return Date.now() - startedAt < AUTO_INSTALL_ACTIVE_TTL_MS; } +/** + * A fresh-looking `active` record is not proof of work for native installs: + * the parent that wrote it may have exited before the spawned downloader's + * exit event (or the downloader died before doing anything), and the 6 h TTL + * would then silently block every retry. Past the spawn grace window — the + * worker needs a moment to self-acquire the lock — lock liveness IS the + * truth: held ⇒ a download is running; free ⇒ the record is an orphan and + * the caller may start a new attempt. Package-manager sources have no such + * liveness signal and keep the TTL behavior above. + */ +const NATIVE_INSTALL_SPAWN_GRACE_MS = 60_000; + +async function hasNativeInstallInFlight( + state: UpdateInstallState, + target: UpdateTarget, +): Promise { + const active = state.active; + if (active === null || active.version !== target.version) return false; + const startedAt = Date.parse(active.startedAt); + if (Number.isFinite(startedAt) && Date.now() - startedAt < NATIVE_INSTALL_SPAWN_GRACE_MS) { + return true; + } + const probe = await tryAcquireUpdateInstallLock({ version: target.version }); + if (probe === null) return true; + await probe.release().catch(() => {}); + return false; +} + +async function hasInstallInFlight( + source: InstallSource, + state: UpdateInstallState, + target: UpdateTarget, +): Promise { + return source === 'native' + ? hasNativeInstallInFlight(state, target) + : hasFreshActiveInstall(state, target); +} + async function showPendingBackgroundInstallNotice( state: UpdateInstallState, currentVersion: string, @@ -424,17 +488,23 @@ async function showPendingBackgroundInstallNotice( /** * `KIMI_CODE_NO_AUTO_UPDATE` (or the legacy `KIMI_CLI_NO_AUTO_UPDATE` alias) - * fully disables the update preflight — no check, no background install, no - * prompt. Migrated from kimi-cli, where the variable gated all auto-update - * behavior. Accepts the usual truthy values (`1`/`true`/`yes`/`on`). + * fully disables automatic update behavior — no check, no background install, + * no prompt, and no staged-swap at startup (see `native-swap.ts`). Migrated + * from kimi-cli, where the variable gated all auto-update behavior. Accepts + * the usual truthy values (`1`/`true`/`yes`/`on`). */ -function isAutoUpdateDisabledByEnv(env: NodeJS.ProcessEnv = process.env): boolean { +export function isAutoUpdateDisabledByEnv(env: NodeJS.ProcessEnv = process.env): boolean { const truthy = (value?: string): boolean => ['1', 'true', 'yes', 'on'].includes((value ?? '').trim().toLowerCase()); return truthy(env['KIMI_CODE_NO_AUTO_UPDATE']) || truthy(env['KIMI_CLI_NO_AUTO_UPDATE']); } -async function shouldAutoInstallUpdates(): Promise { +/** + * The persisted `[upgrade].auto_install` preference (defaults to true when + * the config cannot be read). Gates the passive background install — and the + * startup swap of automatically staged payloads (see `native-swap.ts`). + */ +export async function shouldAutoInstallUpdates(): Promise { try { const config = await loadTuiConfig(); return config.upgrade.autoInstall; @@ -508,19 +578,23 @@ export async function installUpdate( version: string, platform: NodeJS.Platform, ): Promise { - const { cmd, args } = spawnForSource(source, version, platform); - const resolvedCmd = resolveSpawnCommand(cmd, platform); - if (resolvedCmd === undefined) { - throw new Error(`${cmd} was not found in PATH; cannot install the update`); + // installUpdate only runs after an explicit user choice (the `upgrade` + // command or the interactive prompt) — mark the stage as manual. + const spawnTarget = resolveInstallSpawn(source, version, platform, { manual: true }); + if (spawnTarget === undefined) { + throw new Error( + `${spawnForSource(source, version, platform).cmd} was not found in PATH; cannot install the update`, + ); } await new Promise((resolve, reject) => { // Windows package managers (npm/pnpm/yarn) are .cmd shims. Since the // CVE-2024-27980 fix, Node throws EINVAL when spawning a .cmd/.bat without // a shell, so run through the shell on win32. The version is a validated - // semver and the package name is a constant, so args are shell-safe. - const child = spawn(resolvedCmd, [...args], { + // semver and the package name is a constant, so args are shell-safe. The + // native self-spawn is an .exe and needs no shell. + const child = spawn(spawnTarget.resolvedCmd, [...spawnTarget.args], { stdio: 'inherit', - shell: platform === 'win32' ? true : undefined, + shell: spawnTarget.shell ? true : undefined, }); child.once('error', reject); child.once('exit', (code, signal) => { @@ -529,7 +603,7 @@ export async function installUpdate( return; } const detail = signal !== null ? `signal ${signal}` : `code ${String(code)}`; - reject(new Error(`${cmd} exited with ${detail}`)); + reject(new Error(`update install exited with ${detail}`)); }); }); } @@ -544,13 +618,20 @@ async function startBackgroundInstall( logger: UpdateLogger, rolloutTelemetry: RolloutTelemetry, ): Promise { - const lock = await tryAcquireUpdateInstallLock({ version: target.version }); + // The native self-spawned downloader holds the install lock itself for the + // whole download — taking it here too would race the child (it starts before + // this function's finally releases) into a false success. Package-manager + // installs keep the outer lock, which only guards against duplicate spawns. + const lock = + source === 'native' + ? { filePath: '', release: async (): Promise => {} } + : await tryAcquireUpdateInstallLock({ version: target.version }); if (lock === null) return; try { const freshState = await readUpdateInstallState().catch(() => state); if ( - hasFreshActiveInstall(freshState, target) || + (await hasInstallInFlight(source, freshState, target)) || failureAttemptsFor(freshState, target) >= AUTO_INSTALL_FAILURE_PROMPT_THRESHOLD ) { return; @@ -577,7 +658,7 @@ async function startBackgroundInstall( source, }); - const { cmd, args } = spawnForSource(source, target.version, platform); + const spawnTarget = resolveInstallSpawn(source, target.version, platform); let settled = false; const finish = (succeeded: boolean): void => { @@ -629,18 +710,17 @@ async function startBackgroundInstall( }); }; - const resolvedCmd = resolveSpawnCommand(cmd, platform); - if (resolvedCmd === undefined) { + if (spawnTarget === undefined) { // The package manager cannot be resolved to an absolute path outside // the cwd — record a normal install failure instead of spawning a bare // command name that Windows would resolve into the untrusted workspace. finish(false); return; } - const child = spawn(resolvedCmd, [...args], { + const child = spawn(spawnTarget.resolvedCmd, [...spawnTarget.args], { detached: true, stdio: 'ignore', - shell: platform === 'win32' ? true : undefined, + shell: spawnTarget.shell ? true : undefined, // On Windows a detached child gets its own console window; with shell:true // that window would flash during a passive background update. Hide it so // the silent updater stays silent. @@ -670,7 +750,7 @@ async function tryStartAutomaticBackgroundInstall( if (failureAttemptsFor(installState, target) >= AUTO_INSTALL_FAILURE_PROMPT_THRESHOLD) { return false; } - if (!hasFreshActiveInstall(installState, target)) { + if (!(await hasInstallInFlight(source, installState, target))) { await startBackgroundInstall( installState, currentVersion, diff --git a/apps/kimi-code/src/constant/app.ts b/apps/kimi-code/src/constant/app.ts index 19b4acc25..d514d029b 100644 --- a/apps/kimi-code/src/constant/app.ts +++ b/apps/kimi-code/src/constant/app.ts @@ -53,6 +53,12 @@ export const KIMI_CODE_UPDATE_INSTALL_STATE_FILE_NAME = 'install.json'; export const KIMI_CODE_UPDATE_INSTALL_LOCK_FILE_NAME = 'install.lock'; export const KIMI_CODE_UPDATE_ROLLOUT_LOG_FILE_NAME = 'rollout.log'; export const KIMI_CODE_PLUGIN_UPDATE_NOTICE_STATE_FILE_NAME = 'plugin-notices.json'; +// Native staged update: the staged binary + metadata live next to the running +// executable (`/.staging/`); the re-exec guard env breaks the +// swap → re-exec → swap loop. +export const KIMI_CODE_NATIVE_STAGING_DIR_NAME = '.staging'; +export const KIMI_CODE_NATIVE_STAGED_STATE_FILE_NAME = 'staged.json'; +export const KIMI_CODE_UPDATE_REEXEC_ENV = 'KIMI_CODE_UPDATE_REEXEC'; export const KIMI_CODE_INPUT_HISTORY_DIR_NAME = 'user-history'; export const KIMI_CODE_BANNER_DIR_NAME = 'banner'; export const KIMI_CODE_BANNER_STATE_FILE_NAME = 'state.json'; @@ -84,6 +90,10 @@ export const KIMI_CODE_CDN_LATEST_URL = `${KIMI_CODE_CDN_BASE}/latest`; // stays unchanged forever — already-shipped clients hard-fail on non-semver // bodies, and the CDN install scripts read it for fresh installs. export const KIMI_CODE_CDN_LATEST_JSON_URL = `${KIMI_CODE_CDN_BASE}/latest.json`; +// Per-release native artifacts: `/binaries//manifest.json` + +// `/binaries//kimi-code-[.exe]` — the bare platform binary +// (same layout install.ps1 consumes). +export const KIMI_CODE_CDN_BINARIES_BASE = `${KIMI_CODE_CDN_BASE}/binaries`; export const KIMI_CODE_TIPS_BANNER_URL = 'https://cdn.kimi.com/kimi-code-tips/tips.json'; // The marketplace catalog location constants live in the shared // agent-core-v2 plugin domain (kap-server consumes them from there). diff --git a/apps/kimi-code/src/main.ts b/apps/kimi-code/src/main.ts index cfcfb0928..37ec0a882 100644 --- a/apps/kimi-code/src/main.ts +++ b/apps/kimi-code/src/main.ts @@ -31,9 +31,12 @@ import { runPrompt } from './cli/run-prompt'; import { runShell } from './cli/run-shell'; import { formatStartupError } from './cli/startup-error'; import { runPluginNodeEntry } from './cli/sub/plugin-run-node'; +import { runUpdateDownloadCommand } from './cli/sub/update-download'; import { handleUpgrade } from './cli/sub/upgrade'; import { createCliTelemetryBootstrap, initializeCliTelemetry } from './cli/telemetry'; import { runUpdatePreflight } from './cli/update/preflight'; +import { detectNativeInstall } from './cli/update/source'; +import { maybeRelaunchWithStagedNativeUpdate } from './cli/update/native-swap'; import { createKimiCodeHostIdentity, getVersion } from './cli/version'; import { CLI_SHUTDOWN_TIMEOUT_MS, CLI_UI_MODE, PROCESS_NAME } from './constant/app'; import { cleanupStaleNativeCacheForCurrent } from './native/native-assets'; @@ -144,6 +147,24 @@ const MIGRATE_CLI_OPTIONS: CLIOptions = { export function main(): void { process.title = PROCESS_NAME; installCrashHandlers(); + // A staged native update is swapped in and re-exec'd here, before any other + // initialization, so the user session immediately runs the new binary (and + // the old process never replaces itself while running). Every failure path + // inside falls back to a normal startup with the current exe. + void maybeRelaunchWithStagedNativeUpdate({ + exePath: process.execPath, + argv: process.argv, + env: process.env, + currentVersion: getVersion(), + isNative: detectNativeInstall(), + }) + .catch(() => false) + .then((relaunched) => { + if (!relaunched) bootstrap(); + }); +} + +function bootstrap(): void { // Route all outbound fetch through HTTP_PROXY/HTTPS_PROXY (honoring NO_PROXY) // before any client is constructed. No-op when no proxy variable is set; an // invalid proxy URL is reported and ignored rather than aborting startup. @@ -246,6 +267,17 @@ export function main(): void { process.exit(1); }); }, + (targetVersion, manual) => { + void runUpdateDownloadCommand(targetVersion, manual).then( + (code) => { + process.exit(code); + }, + async (error: unknown) => { + await logStartupFailure('download update', error); + process.exit(1); + }, + ); + }, ); program.parse(process.argv); diff --git a/apps/kimi-code/src/tui/components/messages/tool-call.ts b/apps/kimi-code/src/tui/components/messages/tool-call.ts index 050a9a245..4ca5541bb 100644 --- a/apps/kimi-code/src/tui/components/messages/tool-call.ts +++ b/apps/kimi-code/src/tui/components/messages/tool-call.ts @@ -36,6 +36,7 @@ import { ShellExecutionComponent } from './shell-execution'; import { countNonEmptyLines, pickChip } from './tool-renderers/chip'; import { buildGoalToolHeader } from './tool-renderers/goal'; import { isGenericToolResult, pickResultRenderer } from './tool-renderers/registry'; +import { buildWaitForHeader } from './tool-renderers/wait-for'; const MAX_ARG_LENGTH = 60; const MAX_SUB_TOOL_CALLS_SHOWN = 4; @@ -620,6 +621,7 @@ export class ToolCallComponent extends Container { // spinner). Cleared when the result lands — the result is the // authoritative final state. private progressLines: string[] = []; + private progressStatusRows = 0; private static readonly MAX_PROGRESS_LINES = 24; private liveOutput = ''; @@ -731,6 +733,7 @@ export class ToolCallComponent extends Container { // authoritative final state. Without this clear, a finished tool would // show both the streamed status lines and the final output stacked. this.progressLines = []; + this.progressStatusRows = 0; this.liveOutput = ''; this.detachHintVisible = false; this.stopDetachHintTimer(); @@ -759,15 +762,26 @@ export class ToolCallComponent extends Container { /** * Append a live progress line emitted by the tool via * `onUpdate({kind:'status', text})`. Splits on newlines so multi-line - * status payloads render row-by-row. Old lines are dropped once the + * status payloads render row-by-row. With `options.replace`, the previous + * replaceable status block is swapped out first — periodic "still + * waiting" updates would otherwise pile up to the cap with stale rows. + * Old lines are dropped once the * buffer fills past {@link ToolCallComponent.MAX_PROGRESS_LINES} so a * misbehaving tool can't grow the box unboundedly. */ - appendProgress(text: string): void { + appendProgress(text: string, options?: { readonly replace?: boolean }): void { if (this.result !== undefined) return; - for (const line of text.split('\n')) { + if (options?.replace === true && this.progressStatusRows > 0) { + this.progressLines.splice( + Math.max(0, this.progressLines.length - this.progressStatusRows), + this.progressStatusRows, + ); + } + const lines = text.split('\n'); + for (const line of lines) { this.progressLines.push(line); } + this.progressStatusRows = options?.replace === true ? lines.length : 0; while (this.progressLines.length > ToolCallComponent.MAX_PROGRESS_LINES) { this.progressLines.shift(); } @@ -1379,14 +1393,14 @@ export class ToolCallComponent extends Container { this.ui?.requestRender(); } - appendSubToolLiveOutput(id: string, text: string): void { + appendSubToolLiveOutput(id: string, text: string, options?: { readonly replace?: boolean }): void { if (text.length === 0) return; const activity = this.subToolActivities.get(id); const ongoing = this.ongoingSubCalls.get(id); if (activity === undefined && ongoing === undefined) return; const name = activity?.name ?? ongoing?.name ?? 'Tool'; const args = activity?.args ?? ongoing?.args ?? {}; - const existingOutput = activity?.output ?? ''; + const existingOutput = options?.replace === true ? '' : (activity?.output ?? ''); let output = existingOutput + text; if (output.length > MAX_LIVE_OUTPUT_CHARS) { output = `[...truncated]\n${output.slice(output.length - MAX_LIVE_OUTPUT_CHARS)}`; @@ -1503,6 +1517,14 @@ export class ToolCallComponent extends Container { }); if (goalHeader !== undefined) return goalHeader; + const waitForHeader = buildWaitForHeader({ + toolCall, + result, + bullet, + chip: isFinished && result !== undefined ? this.buildHeaderChip(result) : '', + }); + if (waitForHeader !== undefined) return waitForHeader; + if (this.isSingleSubagentView()) { return this.buildSingleSubagentHeader(); } @@ -1880,7 +1902,7 @@ export class ToolCallComponent extends Container { current?.phase === 'ongoing' && current.output !== undefined && current.output.trim().length > 0 && - (current.name === 'Bash' || isGenericToolResult(current.name)) + (current.name === 'Bash' || current.name === 'WaitFor' || isGenericToolResult(current.name)) ) { return { text: current.output, tone: 'text' }; } diff --git a/apps/kimi-code/src/tui/components/messages/tool-renderers/chip.ts b/apps/kimi-code/src/tui/components/messages/tool-renderers/chip.ts index c7c8120f2..37536c140 100644 --- a/apps/kimi-code/src/tui/components/messages/tool-renderers/chip.ts +++ b/apps/kimi-code/src/tui/components/messages/tool-renderers/chip.ts @@ -14,6 +14,7 @@ import type { ToolCallBlockData, ToolResultBlockData } from '#/tui/types'; import { goalStatusChip } from './goal'; import { readMediaChip } from './media'; import { strArg } from './types'; +import { waitForChip } from './wait-for'; export type ChipProvider = (toolCall: ToolCallBlockData, result: ToolResultBlockData) => string; @@ -125,6 +126,7 @@ const REGISTRY: Record = { WebSearch: webSearchChip, CreateGoal: goalStatusOutputChip, GetGoal: goalStatusOutputChip, + WaitFor: waitForChip, }; export function pickChip(toolName: string): ChipProvider | undefined { diff --git a/apps/kimi-code/src/tui/components/messages/tool-renderers/registry.ts b/apps/kimi-code/src/tui/components/messages/tool-renderers/registry.ts index 2a7b39539..eedc4316a 100644 --- a/apps/kimi-code/src/tui/components/messages/tool-renderers/registry.ts +++ b/apps/kimi-code/src/tui/components/messages/tool-renderers/registry.ts @@ -13,6 +13,7 @@ import { readMediaSummary } from './media'; import { shellExecutionResultRenderer } from '../shell-execution'; import { goalSummary } from './goal'; +import { waitForSummary } from './wait-for'; import { editSummary, fetchSummary, @@ -63,6 +64,8 @@ export function pickResultRenderer(toolName: string): ResultRenderer { case 'SetGoalBudget': case 'UpdateGoal': return goalSummary; + case 'WaitFor': + return waitForSummary; default: return renderTruncated; } diff --git a/apps/kimi-code/src/tui/components/messages/tool-renderers/wait-for.ts b/apps/kimi-code/src/tui/components/messages/tool-renderers/wait-for.ts new file mode 100644 index 000000000..8d95a8a66 --- /dev/null +++ b/apps/kimi-code/src/tui/components/messages/tool-renderers/wait-for.ts @@ -0,0 +1,179 @@ +/** + * WaitFor renderer — the wait result is a timeline (header fields, then + * `[finished]` / `[completed_during_wait]` / `[still_running]` sections), + * so the collapsed body shows what the wait came back with instead of the + * raw key-value dump: the finished task with its outcome, plus counts of + * tasks that finished alongside or are still running. A timeout is not an + * error (the tool says so itself), so it renders in the warning tone. + */ + +import { Text, type Component } from '@moonshot-ai/pi-tui'; + +import { STATUS_BULLET } from '#/tui/constant/symbols'; +import { currentTheme } from '#/tui/theme'; +import type { ToolCallBlockData, ToolResultBlockData } from '#/tui/types'; + +import { formatGoalElapsed } from '../goal-format'; +import { renderTruncated } from './truncated'; +import type { ResultRenderer } from './types'; + +const DESCRIPTION_MAX = 72; +const RUNNING_SAMPLES = 3; + +type WaitForStatus = 'completed' | 'timed_out' | 'no_tasks'; + +interface WaitForResultView { + readonly status: WaitForStatus; + readonly waitedMs: number; + readonly finishedTaskId?: string; + readonly finishedStatus?: string; + readonly finishedDescription?: string; + readonly extraCount: number; + readonly runningCount: number; + readonly runningSamples: readonly string[]; +} + +export const waitForSummary: ResultRenderer = (toolCall, result, ctx) => { + if (result.is_error) return renderTruncated(toolCall, result, ctx); + const view = parseWaitForOutput(result.output); + if (view === undefined) return renderTruncated(toolCall, result, ctx); + + const out: Component[] = []; + for (const line of glanceLines(view)) { + out.push(new Text(` ${currentTheme.dim(line)}`, 0, 0)); + } + if (ctx.expanded && result.output.length > 0) { + out.push(new Text(currentTheme.dim(result.output), 4, 0)); + } + return out; +}; + +export function buildWaitForHeader(options: { + readonly toolCall: ToolCallBlockData; + readonly result: ToolResultBlockData | undefined; + readonly bullet: string; + readonly chip: string; +}): string | undefined { + const { toolCall, result, bullet, chip } = options; + if (toolCall.name !== 'WaitFor') return undefined; + + const taskId = typeof toolCall.args['task_id'] === 'string' ? toolCall.args['task_id'] : undefined; + const argText = + taskId === undefined ? '' : currentTheme.dimFg('textDim', ` (${taskId})`); + + if (result === undefined) { + const label = + taskId === undefined ? 'Waiting for any background task' : 'Waiting for background task'; + return `${bullet}${currentTheme.boldFg('primary', label)}${argText}`; + } + if (result.is_error === true) { + return `${bullet}${currentTheme.boldFg('error', 'Could not wait for background task')}${argText}`; + } + + const status = parseWaitForOutput(result.output)?.status; + if (status === 'timed_out') { + return `${currentTheme.fg('warning', STATUS_BULLET)}${currentTheme.boldFg('warning', 'Wait timed out')}${argText}${chip}`; + } + if (status === 'no_tasks') { + return `${bullet}${currentTheme.boldFg('primary', 'No background tasks running')}${chip}`; + } + const label = taskId === undefined ? 'Waited for a background task' : 'Waited for background task'; + return `${bullet}${currentTheme.boldFg('primary', label)}${argText}${chip}`; +} + +export const waitForChip = (_toolCall: ToolCallBlockData, result: ToolResultBlockData): string => { + if (result.is_error === true) return ''; + const view = parseWaitForOutput(result.output); + if (view === undefined || view.status === 'no_tasks') return ''; + return formatGoalElapsed(view.waitedMs); +}; + +function glanceLines(view: WaitForResultView): string[] { + switch (view.status) { + case 'no_tasks': + return []; + case 'timed_out': { + if (view.runningCount === 0) return []; + const summary = `${pluralizeTasks(view.runningCount)} still running`; + if (view.runningSamples.length === 0) return [summary]; + const remaining = view.runningCount - view.runningSamples.length; + const tail = remaining > 0 ? `, +${String(remaining)} more` : ''; + return [`${summary}: ${view.runningSamples.join(', ')}${tail}`]; + } + case 'completed': { + const taskId = view.finishedTaskId ?? 'task'; + const status = view.finishedStatus ?? 'completed'; + const marker = status === 'completed' ? '✓' : '✗'; + const description = + view.finishedDescription === undefined + ? '' + : ` · ${truncateOneLine(view.finishedDescription, DESCRIPTION_MAX)}`; + const lines = [`${marker} ${taskId} ${status}${description}`]; + const parts: string[] = []; + if (view.extraCount > 0) parts.push(`+${String(view.extraCount)} more finished during wait`); + if (view.runningCount > 0) parts.push(`${pluralizeTasks(view.runningCount)} still running`); + if (parts.length > 0) lines.push(parts.join(' · ')); + return lines; + } + } +} + +function pluralizeTasks(count: number): string { + return `${String(count)} background task${count === 1 ? '' : 's'}`; +} + +function parseWaitForOutput(output: string): WaitForResultView | undefined { + const status = field(output, 'wait_status'); + if (status !== 'completed' && status !== 'timed_out' && status !== 'no_tasks') return undefined; + const waitedMs = Number(field(output, 'waited_ms') ?? 0); + const finished = section(output, 'finished'); + const duringWait = section(output, 'completed_during_wait'); + const stillRunning = section(output, 'still_running'); + const runningCount = stillRunning === undefined ? 0 : countField(stillRunning, 'active_background_tasks'); + return { + status, + waitedMs: Number.isFinite(waitedMs) ? waitedMs : 0, + finishedTaskId: field(output, 'task_id'), + finishedStatus: finished === undefined ? undefined : field(finished, 'status'), + finishedDescription: finished === undefined ? undefined : field(finished, 'description'), + extraCount: duringWait === undefined ? 0 : countOccurrences(duringWait, /^task_id: /gm), + runningCount, + runningSamples: + stillRunning === undefined ? [] : sampleDescriptions(stillRunning, runningCount), + }; +} + +function field(text: string, name: string): string | undefined { + const match = new RegExp(`^${name}: (.+)$`, 'm').exec(text); + return match?.[1]; +} + +function countField(text: string, name: string): number { + const value = Number(field(text, name) ?? 0); + return Number.isFinite(value) ? value : 0; +} + +function section(output: string, name: string): string | undefined { + const match = new RegExp(`^\\[${name}\\]$`, 'm').exec(output); + if (match === null) return undefined; + const rest = output.slice(match.index + match[0].length); + const next = /^\[/m.exec(rest); + return (next === null ? rest : rest.slice(0, next.index)).trim(); +} + +function countOccurrences(text: string, pattern: RegExp): number { + return text.match(pattern)?.length ?? 0; +} + +function sampleDescriptions(stillRunning: string, runningCount: number): readonly string[] { + const descriptions = [...stillRunning.matchAll(/^description: (.+)$/gm)].map((match) => + truncateOneLine(match[1] ?? '', 40), + ); + return descriptions.slice(0, Math.min(RUNNING_SAMPLES, runningCount)); +} + +function truncateOneLine(text: string, max: number): string { + const firstLine = text.replaceAll(/\s+/g, ' ').trim(); + if (firstLine.length <= max) return firstLine; + return `${firstLine.slice(0, Math.max(0, max - 1))}…`; +} diff --git a/apps/kimi-code/src/tui/constant/media.ts b/apps/kimi-code/src/tui/constant/media.ts index d125258a9..67618714d 100644 --- a/apps/kimi-code/src/tui/constant/media.ts +++ b/apps/kimi-code/src/tui/constant/media.ts @@ -1,6 +1,6 @@ /** TUI-only daemon staging lifetimes for pasted media. */ -export const IMAGE_STAGING_TTL_SECONDS = 60 * 60; -export const IMAGE_FILE_REF_MIN_REMAINING_MS = 60_000; -/** How long submit waits for a just-pasted image's background ingestion before falling back to the inline form. */ -export const IMAGE_INGESTION_SUBMIT_WAIT_MS = 2_000; +export const MEDIA_STAGING_TTL_SECONDS = 60 * 60; +export const MEDIA_FILE_REF_MIN_REMAINING_MS = 60_000; +/** How long submit waits for a just-pasted medium's background ingestion before giving up on the daemon-ref form. */ +export const MEDIA_INGESTION_SUBMIT_WAIT_MS = 2_000; diff --git a/apps/kimi-code/src/tui/controllers/cache-hint-controller.ts b/apps/kimi-code/src/tui/controllers/cache-hint-controller.ts index 3f74627f4..5863d7679 100644 --- a/apps/kimi-code/src/tui/controllers/cache-hint-controller.ts +++ b/apps/kimi-code/src/tui/controllers/cache-hint-controller.ts @@ -52,7 +52,7 @@ export interface CacheHintHost { * staged media with queue-recall semantics (consume retains, retire staged * copies, rebase videos) — without this the retains/copies would leak. */ - recallStashedMedia(text: string, extraction: ExtractionResult | undefined): void; + recallStashedMedia(extraction: ExtractionResult | undefined): void; showError(message: string): void; createNewSession(): Promise; sendNormalUserInput(text: string, preExtracted?: ExtractionResult): Promise; @@ -394,7 +394,7 @@ export class CacheHintController { if (stash === undefined) return; this.restoredTexts.push(stash.text); this.host.restoreInputText(this.restoredTexts.join('\n')); - this.host.recallStashedMedia(stash.text, stash.extraction); + this.host.recallStashedMedia(stash.extraction); } private upstreamModelId(): string | undefined { diff --git a/apps/kimi-code/src/tui/controllers/editor-keyboard.ts b/apps/kimi-code/src/tui/controllers/editor-keyboard.ts index 73dabd66c..e4474e742 100644 --- a/apps/kimi-code/src/tui/controllers/editor-keyboard.ts +++ b/apps/kimi-code/src/tui/controllers/editor-keyboard.ts @@ -1,7 +1,13 @@ +import { readFile } from 'node:fs/promises'; + import type { FileMeta, KimiHarness, Session } from '@moonshot-ai/kimi-code-sdk'; import { compressImageForModel } from '@moonshot-ai/kimi-code-sdk'; -import { ClipboardMediaError, readClipboardMedia } from '#/utils/clipboard/clipboard-image'; +import { + ClipboardMediaError, + readClipboardMedia, + type ClipboardVideo, +} from '#/utils/clipboard/clipboard-image'; import { parseImageMeta } from '#/utils/image/image-mime'; import { editInExternalEditor, resolveEditorCommand } from '#/utils/process/external-editor'; @@ -13,9 +19,13 @@ import { LLM_NOT_SET_MESSAGE, NO_ACTIVE_SESSION_MESSAGE, } from '../constant/kimi-tui'; -import { IMAGE_STAGING_TTL_SECONDS } from '../constant/media'; +import { MEDIA_STAGING_TTL_SECONDS } from '../constant/media'; import { formatErrorMessage } from '../utils/event-payload'; -import type { ImageAttachment, ImageAttachmentStore } from '../utils/image-attachment-store'; +import type { + ImageAttachment, + ImageAttachmentStore, + VideoAttachment, +} from '../utils/image-attachment-store'; import { extractMediaAttachments, imageExtensionForMime } from '../utils/image-placeholder'; import { extractInlineSkillActivations } from '../utils/inline-skill-tokens'; import type { PendingExit, QueuedMessage, SteerInputItem } from '../types'; @@ -28,7 +38,8 @@ export interface EditorKeyboardHost { /** * True when the TUI runs on the agent-core-v2 engine (startup-selected). * Gates the paste-time upload to the daemon file store; the v1 engine has - * no file store and keeps the submit-time inline base64 form. + * no file store, so images keep the submit-time inline base64 form and + * videos cannot be submitted at all. */ readonly engineV2: boolean; cancelInFlight: (() => void) | undefined; @@ -49,7 +60,7 @@ export interface EditorKeyboardHost { imageAttachmentIds: readonly number[]; videoAttachmentIds: readonly number[]; }): boolean; - releaseStagingMedia(imageAttachmentIds: readonly number[], paths: readonly string[]): void; + releaseStagingMedia(mediaAttachmentIds: readonly number[]): void; recallLastQueued(): QueuedMessage | undefined; showError(msg: string): void; track(event: string, props?: Record): void; @@ -345,7 +356,7 @@ export class EditorKeyboardController { text: trimmed, parts: m.parts, imageAttachmentIds: m.imageAttachmentIds, - stagingPaths: m.stagingPaths, + videoAttachmentIds: m.videoAttachmentIds, }); } } @@ -355,11 +366,12 @@ export class EditorKeyboardController { // Synchronous path: an image still ingesting in the background // extracts to its inline fallback here (no bounded wait like // `sendNormalUserInput` — this handler cannot await without - // interleaving queue/draft edits). + // interleaving queue/draft edits); a video still uploading refuses + // the submission instead (no inline form exists). editorExtraction = extractMediaAttachments(text, this.imageStore); } catch (error) { - // Cache copy failed (e.g. the pasted video's source vanished) — - // leave the queue and the editor draft untouched. + // Media expansion failed (e.g. the pasted video's upload is still + // in flight) — leave the queue and the editor draft untouched. host.showError(`Failed to prepare media attachment: ${formatErrorMessage(error)}`); return; } @@ -370,7 +382,10 @@ export class EditorKeyboardController { editorExtraction.imageAttachmentIds.length > 0 ? editorExtraction.imageAttachmentIds : undefined, - stagingPaths: editorExtraction.stagingPaths, + videoAttachmentIds: + editorExtraction.videoAttachmentIds.length > 0 + ? editorExtraction.videoAttachmentIds + : undefined, }); } flushTextRun(); @@ -383,18 +398,18 @@ export class EditorKeyboardController { editorExtraction !== undefined && !host.validateMediaCapabilities(editorExtraction) ) { - host.releaseStagingMedia( - editorExtraction.imageAttachmentIds, - editorExtraction.stagingPaths, - ); + host.releaseStagingMedia([ + ...editorExtraction.imageAttachmentIds, + ...editorExtraction.videoAttachmentIds, + ]); return; } const session = host.session; if (host.state.appState.model.trim().length === 0 || session === undefined) { - host.releaseStagingMedia( - editorExtraction?.imageAttachmentIds ?? [], - editorExtraction?.stagingPaths ?? [], - ); + host.releaseStagingMedia([ + ...(editorExtraction?.imageAttachmentIds ?? []), + ...(editorExtraction?.videoAttachmentIds ?? []), + ]); host.showError(LLM_NOT_SET_MESSAGE); return; } @@ -540,10 +555,22 @@ export class EditorKeyboardController { if (media === null) return false; if (media.kind === 'video') { + // Same shape as the image flow below: register the attachment and put + // its placeholder in the editor first, then upload the source file to + // the daemon file store in the background — typing never waits on it, + // and submit gives a pending upload the bounded `pendingMediaIngestions` + // wait. Unlike an image there is no inline fallback form, so a video + // whose upload has not landed (or failed) refuses the submission at + // extraction time. const attachment = this.imageStore.addVideo(media.mimeType, media.sourcePath, media.filename); this.host.state.editor.insertTextAtCursor?.(`${attachment.placeholder} `); this.host.state.ui.requestRender(); this.host.track('shortcut_paste', { kind: 'video' }); + attachment.pending = this.finishClipboardVideoPaste(attachment, media).catch( + (error: unknown) => { + this.host.showError(`Failed to process pasted video: ${formatErrorMessage(error)}`); + }, + ); return true; } @@ -663,7 +690,7 @@ export class EditorKeyboardController { const meta = await harness.uploadFile(bytes, { name: `pasted-image.${imageExtensionForMime(mime)}`, mimeType: mime, - expiresInSec: IMAGE_STAGING_TTL_SECONDS, + expiresInSec: MEDIA_STAGING_TTL_SECONDS, }); return meta; } catch { @@ -671,6 +698,53 @@ export class EditorKeyboardController { } } + /** + * Paste-time upload of the video's source file to the engine's daemon file + * store (agent-core-v2 only), run as background ingestion exactly like the + * image upload above. Best effort: any failure returns undefined, leaving + * the attachment without a `fileId` — submit-time expansion then refuses + * the submission, since a video has no inline fallback form. + */ + private async uploadVideoToDaemonFileStore( + media: ClipboardVideo, + ): Promise { + if (!this.host.engineV2) return undefined; + const harness = this.host.harness; + if (harness === undefined) return undefined; + let bytes: Uint8Array; + try { + bytes = await readFile(media.sourcePath); + } catch { + // The source (e.g. a clipboard temp file) vanished before the upload + // could read it — same outcome as a failed upload. + return undefined; + } + try { + return await harness.uploadFile(bytes, { + name: media.filename, + mimeType: media.mimeType, + expiresInSec: MEDIA_STAGING_TTL_SECONDS, + }); + } catch { + return undefined; + } + } + + private async finishClipboardVideoPaste( + attachment: VideoAttachment, + media: ClipboardVideo, + ): Promise { + const uploaded = await this.uploadVideoToDaemonFileStore(media); + const completed = this.imageStore.completeVideo(attachment, { + fileId: uploaded?.id, + fileExpiresAt: parseExpiry(uploaded), + }); + if (completed === undefined && uploaded !== undefined) { + await this.host.harness?.deleteFile(uploaded.id).catch(() => undefined); + } + this.host.state.ui.requestRender(); + } + private async openExternalEditor(): Promise { const { state } = this.host; if (state.externalEditorRunning) return; diff --git a/apps/kimi-code/src/tui/controllers/session-event-handler.ts b/apps/kimi-code/src/tui/controllers/session-event-handler.ts index e0fa8cf10..6f876877a 100644 --- a/apps/kimi-code/src/tui/controllers/session-event-handler.ts +++ b/apps/kimi-code/src/tui/controllers/session-event-handler.ts @@ -663,7 +663,7 @@ export class SessionEventHandler { const tc = this.host.streamingUI.getToolComponent(event.toolCallId); if (tc === undefined) return; if (event.update.kind === 'status') { - tc.appendProgress(text); + tc.appendProgress(text, { replace: event.update.replace === true }); return; } if (event.update.kind === 'stdout' || event.update.kind === 'stderr') { diff --git a/apps/kimi-code/src/tui/controllers/staging-leases.ts b/apps/kimi-code/src/tui/controllers/staging-leases.ts index 4d935aa5f..bc9bfcd78 100644 --- a/apps/kimi-code/src/tui/controllers/staging-leases.ts +++ b/apps/kimi-code/src/tui/controllers/staging-leases.ts @@ -8,11 +8,11 @@ * * - Daemon uploads become garbage — the engine materialized its own session * copy at intake — so the turn-end release deletes them. - * - Local cache copies may still be referenced by persisted history: a v1 - * video degrade writes its `